本帖最后由 taroxd 于 2014-8-3 15:29 编辑
qq19750508 发表于 2014-8-3 11:52
漏了一个
就是在上面的战斗日志上,显示战斗效果同时显示HP减少了多少,
MP减少了多少。
道具上备注 <mp -= 公式>
class Game_ActionResult def make_ex_mp_damage(value, item) @mp_damage = [@battler.mp, value].min @mp_drain = @mp_damage if item.damage.drain? @success = true if @mp_damage != 0 end end class Game_Battler alias mdv_20140803 make_damage_value def make_damage_value(user, item) mdv_20140803(user, item) return unless item.note =~ /<mp\s*-=\s*(.*)>/i a, b, v = user, self, $game_variables value = eval($1) value *= item_element_rate(user, item) value *= pdr if item.physical? value *= mdr if item.magical? value *= rec if item.damage.recover? value = apply_critical(value) if @result.critical value = apply_variance(value, item.damage.variance) value = apply_guard(value) @result.make_ex_mp_damage(value.to_i, item) end end
class Game_ActionResult
def make_ex_mp_damage(value, item)
@mp_damage = [@battler.mp, value].min
@mp_drain = @mp_damage if item.damage.drain?
@success = true if @mp_damage != 0
end
end
class Game_Battler
alias mdv_20140803 make_damage_value
def make_damage_value(user, item)
mdv_20140803(user, item)
return unless item.note =~ /<mp\s*-=\s*(.*)>/i
a, b, v = user, self, $game_variables
value = eval($1)
value *= item_element_rate(user, item)
value *= pdr if item.physical?
value *= mdr if item.magical?
value *= rec if item.damage.recover?
value = apply_critical(value) if @result.critical
value = apply_variance(value, item.damage.variance)
value = apply_guard(value)
@result.make_ex_mp_damage(value.to_i, item)
end
end
|