From 06bd4965a1c76cc1d89d686ebfc6408aad95e97e Mon Sep 17 00:00:00 2001 From: Kyle Coburn Date: Fri, 24 Apr 2015 21:33:34 -0700 Subject: [PATCH] Coordinate Silph red-bar preparations with survivability --- ai/red/strategies.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ai/red/strategies.lua b/ai/red/strategies.lua index c6b7e7f..a7ebf89 100644 --- a/ai/red/strategies.lua +++ b/ai/red/strategies.lua @@ -1364,7 +1364,7 @@ end strategyFunctions.fightSilphMachoke = function() if Strategies.trainerBattle() then - if Control.yolo and stats.nidoran.special > 44 then + if Control.yolo and stats.nidoran.specialDV >= 6 then return Strategies.prepare("x_accuracy") end Battle.automate("thrash") @@ -1389,8 +1389,11 @@ strategyFunctions.silphRival = function() if Strategies.trainerBattle() then if Strategies.initialize() then if Control.yolo then - status.gyaradosDamage = Combat.healthFor("RivalGyarados") - Bridge.chat("is attempting to red-bar off Silph Rival. Get ready to spaghetti!") + local gyaradosDamage = Combat.healthFor("RivalGyarados") + if gyaradosDamage < Pokemon.index(0, "max_hp") then + Bridge.chat("is attempting to red-bar off Silph Rival. Get ready to spaghetti!") + status.gyaradosDamage = gyaradosDamage + end end end