class Game_Battler < Game_BattlerBase
def item_apply(user, item)
@result.clear
@result.used = item_test(user, item)
@result.missed = (@result.used && rand >= item_hit(user, item))
@result.evaded = (!@result.missed && rand < item_eva(user, item))
if @result.hit?
unless item.damage.none?
@result.critical = (rand < item_cri(user, item))
make_damage_value(user, item)
execute_damage(user)
end
if item.is_a?(RPG::Skill) && item.id == 100
if self.dead?
user.hp += 100
end
end
item.effects.each {|effect| item_effect_apply(user, item, effect) }
item_user_effect(user, item)
end
end
end
class Game_Battler < Game_BattlerBase
def item_apply(user, item)
@result.clear
@result.used = item_test(user, item)
@result.missed = (@result.used && rand >= item_hit(user, item))
@result.evaded = (!@result.missed && rand < item_eva(user, item))
if @result.hit?
unless item.damage.none?
@result.critical = (rand < item_cri(user, item))
make_damage_value(user, item)
execute_damage(user)
end
if item.is_a?(RPG::Skill) && item.id == 100
if self.dead?
user.hp += 100
end
end
item.effects.each {|effect| item_effect_apply(user, item, effect) }
item_user_effect(user, item)
end
end
end