# 备注上写 <tcr2 0.5> 之类的,未测试 class Game_BattlerBase def skill_tp_cost(skill) (skill.tp_cost * tcr2).to_i end def tcr2 feature_objects.inject(1.0) do |r, o| o.note =~ /<tcr2\s*(\d+)>/i ? r * $1.to_f : r end end end
# 备注上写 <tcr2 0.5> 之类的,未测试
class Game_BattlerBase
def skill_tp_cost(skill)
(skill.tp_cost * tcr2).to_i
end
def tcr2
feature_objects.inject(1.0) do |r, o|
o.note =~ /<tcr2\s*(\d+)>/i ? r * $1.to_f : r
end
end
end
|