class Scene_Battle
alias ori_set_target_battlers set_target_battlers
def set_target_battlers(scope)
ori_set_target_battlers(scope)
if scope == 2
if rand(100) < 50
target = @target_battlers.find{|battler|battler.states.include?(2) and battler.is_a?(Game_Actor)}#被攻击对像为角色时battler.is_a?(Game_Enemy) 为敌人时
@target_battlers = [target] if target != nil
end
end
end
end
class Scene_Battle
alias ori_set_target_battlers set_target_battlers
def set_target_battlers(scope)
ori_set_target_battlers(scope)
if scope == 2
if rand(100) < 50
target = @target_battlers.find{|battler|battler.states.include?(2) and battler.is_a?(Game_Actor)}#被攻击对像为角色时battler.is_a?(Game_Enemy) 为敌人时
@target_battlers = [target] if target != nil
end
end
end
end