class Game_ActionResult
def item_hit=(hit)
@used ? hit : false
end
end
class Game_Battler
def item_final_hit(user, item)
item_hit(user, item) - item_eva(user, item)
end
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.item_hit = (rand < item_final_hit(user, item))
@result.missed = false
@result.evaded = false
unless item.damage.none?
@result.critical = (rand < item_cri(user, item))
make_damage_value(user, item)
execute_damage(user)
end
item.effects.each {|effect| item_effect_apply(user, item, effect) }
item_user_effect(user, item)
end
end
end
class Game_ActionResult
def item_hit=(hit)
@used ? hit : false
end
end
class Game_Battler
def item_final_hit(user, item)
item_hit(user, item) - item_eva(user, item)
end
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.item_hit = (rand < item_final_hit(user, item))
@result.missed = false
@result.evaded = false
unless item.damage.none?
@result.critical = (rand < item_cri(user, item))
make_damage_value(user, item)
execute_damage(user)
end
item.effects.each {|effect| item_effect_apply(user, item, effect) }
item_user_effect(user, item)
end
end
end