Actor_ID = 0
class Game_Actor
#--------------------------------------------------------------------------
# * Change HP
# hp : new HP
#--------------------------------------------------------------------------
def hp=(hp)
@hp = [[hp, maxhp].min, 0].max
if @actor_id == Actor_ID
$game_temp.gameover = true
return
end
# add or exclude incapacitation
for i in 1...$data_states.size
if $data_states[i].zero_hp
if self.dead?
add_state(i)
else
remove_state(i)
end
end
end
end
end
Actor_ID = 0
class Game_Actor
#--------------------------------------------------------------------------
# * Change HP
# hp : new HP
#--------------------------------------------------------------------------
def hp=(hp)
@hp = [[hp, maxhp].min, 0].max
# add or exclude incapacitation
for i in 1...$data_states.size
if $data_states[i].zero_hp
if self.dead?
if @actor_id == Actor_ID
$game_temp.gameover = true
return
end
add_state(i)
else
remove_state(i)
end
end
end
end
end