From 805f0588dcbf6f8787d4912b63adbd5d9b208388 Mon Sep 17 00:00:00 2001 From: Kyle Coburn Date: Fri, 1 May 2015 11:13:16 -0700 Subject: [PATCH] Update Rattata requirements and potioning --- 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 6d5f0c2..bd52593 100644 --- a/ai/red/strategies.lua +++ b/ai/red/strategies.lua @@ -417,7 +417,7 @@ strategyFunctions.catchNidoran = function() message = Utils.capitalize(opponent) else resetLimit = resetLimit - 0.1 - if opponent == "rattata" and Data.run.encounters_rattata and Data.run.encounters_rattata >= 4 then + if opponent == "rattata" and Data.run.encounters_rattata and Data.run.encounters_rattata >= 5 then message = "Death by Rattata" customReason = true else @@ -762,11 +762,14 @@ strategyFunctions.shortsKid = function() if Strategies.damaged(2) and stats.nidoran.speed == 15 then forced = "horn_attack" end - if Inventory.count("potion") < 8 then - if not Strategies.opponentDamaged() and Strategies.damaged(2) and Strategies.initialize("looper") then + local potions = Inventory.count("potion") + if potions <= 7 then + if Strategies.initialize("looper") then Bridge.chat("Stuck in a heal loop, we're just going to have to risk it.") end disablePotion = true + elseif potions <= 8 then + disablePotion = not Strategies.damaged(2) else disablePotion = Control.yolo and not Strategies.damaged(2) end