From f7c3466b8350813a9521a4a85ff1089d1e8f94ce Mon Sep 17 00:00:00 2001 From: Kyle Coburn Date: Mon, 13 Apr 2015 11:21:03 -0700 Subject: [PATCH] Allow minimum Nido stats when not resetting for time --- ai/red/strategies.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ai/red/strategies.lua b/ai/red/strategies.lua index dbd28e6..17deccb 100644 --- a/ai/red/strategies.lua +++ b/ai/red/strategies.lua @@ -568,10 +568,15 @@ strategyFunctions.fightBrock = function() rating = 0, } p(Pokemon.getDVs("nidoran")) - local resets = att < 15 or spd < 14 or scl < 12 or (att == 15 and spd == 14) - local nStatus = "Att: "..att..", Def: "..def..", Speed: "..spd..", Special: "..scl + + local resetsForStats = att < 15 or spd < 14 or scl < 12 + if not resetsForStats and not RESET_FOR_TIME then + resetsForStats = att == 15 and spd == 14 + end + + local nidoranStatus = "Att: "..att..", Def: "..def..", Speed: "..spd..", Special: "..scl if resets then - return Strategies.reset("Bad Nidoran - "..nStatus) + return Strategies.reset("Bad Nidoran - "..nidoranStatus) end status.tries = 9001 @@ -610,7 +615,7 @@ strategyFunctions.fightBrock = function() superlative = " min stat" exclaim = "." end - Bridge.chat("beat Brock with a"..superlative.." Nidoran"..exclaim.." "..nStatus..", caught at level "..(stats.nidoran.level4 and "4" or "3")..".") + Bridge.chat("beat Brock with a"..superlative.." Nidoran"..exclaim.." "..nidoranStatus..", caught at level "..(stats.nidoran.level4 and "4" or "3")..".") else status.tries = status.tries + 1 end