From 2c43a255f81ce2b4b10ee597b01e377b3fffc662 Mon Sep 17 00:00:00 2001 From: Kyle Coburn Date: Wed, 29 Apr 2015 14:15:10 -0700 Subject: [PATCH] Report Mt. Moon results --- ai/red/strategies.lua | 1 - ai/strategies.lua | 5 ++++- util/bridge.lua | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ai/red/strategies.lua b/ai/red/strategies.lua index dd56128..92b9214 100644 --- a/ai/red/strategies.lua +++ b/ai/red/strategies.lua @@ -261,7 +261,6 @@ local strategyFunctions = Strategies.functions -- General strategyFunctions.tweetAfterBrock = function() - Bridge.moonGuesses(true) if stats.nidoran.rating < 2 then if not Strategies.overMinute("shorts") then Strategies.tweetProgress("On pace after Brock with a great Nidoran", "brock") diff --git a/ai/strategies.lua b/ai/strategies.lua index b1e504a..ca2207d 100644 --- a/ai/strategies.lua +++ b/ai/strategies.lua @@ -1104,6 +1104,7 @@ Strategies.functions = { catchFlierBackup = function() if Strategies.initialize() then + Bridge.moonGuesses(true) Control.canDie(true) end if not Control.canCatch() then @@ -1203,7 +1204,8 @@ Strategies.functions = { local conjunction = "but" local goodEncounters = moonEncounters < 10 local catchDescription - if Pokemon.inParty(catchPokemon) then + local caughtCutter = Pokemon.inParty(catchPokemon) + if caughtCutter then catchDescription = catchPokemon if goodEncounters then conjunction = "and" @@ -1218,6 +1220,7 @@ Strategies.functions = { end Bridge.caught(catchDescription) Bridge.chat(moonEncounters.." Moon encounters, "..conjunction.." "..parasStatus) + Bridge.moonResults(moonEncounters, caughtCutter) end Strategies.resetTime("mt_moon", "complete Mt. Moon") diff --git a/util/bridge.lua b/util/bridge.lua index 0b9e240..daf3d4b 100644 --- a/util/bridge.lua +++ b/util/bridge.lua @@ -147,6 +147,10 @@ function Bridge.moonGuesses(enabled) send("moon,"..(enabled and "on" or "off")) end +function Bridge.moonResults(encounters, paras) + send("moonresults,"..encounters..","..(paras and "paras" or "none")) +end + function Bridge.reset() send("reset") timeStopped = false