From d176d5b10b36b0818b84ec7f75d9103ad22b5183 Mon Sep 17 00:00:00 2001 From: Kyle Coburn Date: Thu, 23 Apr 2015 18:24:43 -0700 Subject: [PATCH] Added reset for time during Nidoran catch attempts --- ai/red/strategies.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ai/red/strategies.lua b/ai/red/strategies.lua index 7596eee..3a2c448 100644 --- a/ai/red/strategies.lua +++ b/ai/red/strategies.lua @@ -391,6 +391,20 @@ strategyFunctions.catchNidoran = function() Input.cancel() end else + if Memory.value("battle", "menu") == 94 then + local resetLimit = Strategies.getTimeRequirement("nidoran") + local catchTarget + if catchableNidoran or opponent == "spearow" then + resetLimit = resetLimit + 0.33 + catchTarget = Utils.capitalize(opponent) + else + resetLimit = resetLimit - 0.15 + catchTarget = "Nidoran" + end + if Strategies.resetTime(resetLimit, "catch "..catchTarget) then + return true + end + end Battle.handle() end else