moy 发表于 2014-6-10 13:10
#--------------------------------------------------------------------------
# ● 目标为敌人
#- ...
谢环境!不过我觉得,也许这样会更加科学一点?(不浪费)
class Game_Action #-------------------------------------------------------------------------- # ● 目标为敌人 #-------------------------------------------------------------------------- def targets_for_opponents if item.for_random? opponents_unit.members.sample(item.number_of_targets) elsif item.for_one? num = 1 + (attack? ? subject.atk_times_add.to_i : 0) if @target_index < 0 [opponents_unit.random_target] * num else [opponents_unit.smooth_target(@target_index)] * num end else opponents_unit.alive_members end end end
class Game_Action
#--------------------------------------------------------------------------
# ● 目标为敌人
#--------------------------------------------------------------------------
def targets_for_opponents
if item.for_random?
opponents_unit.members.sample(item.number_of_targets)
elsif item.for_one?
num = 1 + (attack? ? subject.atk_times_add.to_i : 0)
if @target_index < 0
[opponents_unit.random_target] * num
else
[opponents_unit.smooth_target(@target_index)] * num
end
else
opponents_unit.alive_members
end
end
end
|