src/Game Objects/Game_BattleAction.rb
#--------------------------------------------------------------------------
# * Item Evaluation (target designation)
#     target : Target battler
#--------------------------------------------------------------------------
Item Evaluation (target designation)
target : Target battler
Item Evaluation ( target designation ) target : Target battler
def evaluate_item_with_target(target)
    target.clear_action_results
    target.make_obj_damage_value(battler, item)
    if item.for_opponent?
      return target.hp_damage.to_f / [target.hp, 1].max
    else
      recovery = [-target.hp_damage, target.maxhp - target.hp].min
      return recovery.to_f / target.maxhp
    end
  end
def evaluate_item_with_target ( target ) target . clear_action_results target . make_obj_damage_value ( battler , item ) if item . for_opponent? return target . hp_damage . to_f / [ target . hp , 1 ] . max else recovery = [ - target . hp_damage , target . maxhp - target . hp ] . min return recovery . to_f / target . maxhp end end
Item Evaluation (target designation)
target : Target battler
Item Evaluation ( target designation ) target : Target battler
target
<not_specific>