#============================================================================== # ■ Game_BattleAction #============================================================================== class Game_BattleAction #-------------------------------------------------------------------------- # ● 通常攻撃の評価 (ターゲット指定) # target : 対象バトラー #-------------------------------------------------------------------------- def evaluate_attack_with_target(target) target.clear_action_results target.make_attack_damage_value(battler) n = target.hp_damage.to_f / [target.hp, 1].max battler.plus_state_set.each{|id| n += target.state_probability(id) / 100.0 if !target.state?(id) } n += 0.5 if target.movable? && !target.confusion? return n end #-------------------------------------------------------------------------- # ● スキルの評価 (ターゲット指定) # target : 対象バトラー #-------------------------------------------------------------------------- def evaluate_skill_with_target(target) target.clear_action_results target.make_obj_damage_value(battler, skill) if skill.for_opponent? n = target.hp_damage.to_f / [target.hp, 1].max skill.plus_state_set.each{|id| n += target.state_probability(id) / 100.0 if !target.state?(id) } skill.minus_state_set.each{|id|n += 1.0 if target.state?(id)} n += 0.5 if target.movable? && !target.confusion? else recovery = [-target.hp_damage, target.maxhp - target.hp].min n = recovery.to_f / target.maxhp skill.plus_state_set.each{|id| n += target.state_probability(id) / 100.0 if !target.state?(id) } skill.minus_state_set.each{|id|n += 1.0 if target.state?(id)} n += 0.5 if target.hp < target.maxhp / 4 n += 0.5 if target.hp == 0 end return n end end