class Game_ActionResult
#--------------------------------------------------------------------------
# ● 生成伤害
#--------------------------------------------------------------------------
def make_damage(value, item, hp_drain_state)
@critical = false if value == 0
@hp_damage = value if item.damage.to_hp?
@mp_damage = value if item.damage.to_mp?
@mp_damage = [@battler.mp, @mp_damage].min
@hp_drain = @hp_damage*0.2 if hp_drain_state
@hp_drain = @hp_damage if item.damage.drain?
@hp_drain = [@battler.hp, @hp_drain].min
@success = true if item.damage.to_hp? || @mp_damage != 0
end
end
class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# ● 计算伤害
#--------------------------------------------------------------------------
def make_damage_value(user, item)
value = item.damage.eval(user, self, $game_variables)
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_damage(value.to_i, item,user.state?(26))
end
end