#--------------------------------------------------------------------------
# ● require Taroxd基础设置
# 使用方法:在技能/道具上备注 <repeats x y z...>
# 则连续次数将会随机在 x, y, z... 中选择。
# 例:备注 <repeats 1 1 2> 那么该道具将会有 1/3 的几率连续发动 2 次。
#--------------------------------------------------------------------------
regexp = /<repeats((?:\s+\d+)+)>/i
RPG::UsableItem.send :def_chain, :repeats do |old|
@note =~ regexp ? $1.split(' ').sample.to_i : old.call
end
#--------------------------------------------------------------------------
# ● require Taroxd基础设置
# 使用方法:在技能/道具上备注 <repeats x y z...>
# 则连续次数将会随机在 x, y, z... 中选择。
# 例:备注 <repeats 1 1 2> 那么该道具将会有 1/3 的几率连续发动 2 次。
#--------------------------------------------------------------------------
regexp = /<repeats((?:\s+\d+)+)>/i
RPG::UsableItem.send :def_chain, :repeats do |old|
@note =~ regexp ? $1.split(' ').sample.to_i : old.call
end