class Game_Battler
def execute_damage(user)
if @hp_damage > 0 # 伤害为正数
remove_states_shock # 受到攻击解除的状态
end
self.hp -= @hp_damage
self.mp -= @mp_damage
if @absorbed # 吸收的情况
user.hp += @hp_damage
user.mp += @mp_damage
end
#插入-------------------------------------
if self.is_a?(Game_Actor) and self.hp <= 0
$game_temp.next_scene = "gameover"
end
#-----------------------------------------
end
end
class Game_Battler
def execute_damage(user)
if @hp_damage > 0 # 伤害为正数
remove_states_shock # 受到攻击解除的状态
end
self.hp -= @hp_damage
self.mp -= @mp_damage
if @absorbed # 吸收的情况
user.hp += @hp_damage
user.mp += @mp_damage
end
#插入-------------------------------------
if self.is_a?(Game_Actor) and self.hp <= 0
$game_temp.next_scene = "gameover"
end
#-----------------------------------------
end
end