From f75c68f50c63e56bd0a6d5321f220f9600bb115a Mon Sep 17 00:00:00 2001 From: Kyle Coburn Date: Thu, 16 Apr 2015 12:36:18 -0700 Subject: [PATCH] Update chat messages, clarify precise scenario in Misty battle --- ai/red/strategies.lua | 26 ++++++++++++++++++++------ ai/strategies.lua | 10 +++++----- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/ai/red/strategies.lua b/ai/red/strategies.lua index ddf5c3f..fb21d64 100644 --- a/ai/red/strategies.lua +++ b/ai/red/strategies.lua @@ -746,7 +746,7 @@ strategyFunctions.rivalSandAttack = function(data) if Battle.sacrifice(sacrifice) then if not status.sacrificed then status.sacrificed = true - Bridge.chat("got Sand-Attacked... Swapping out "..Utils.capitalize(sacrifice).." to restore our accuracy (let's hope for no more trolling)") + Bridge.chat("got Sand-Attacked... Swapping out "..Utils.capitalize(sacrifice).." to restore accuracy (no more trolling please)") end return false end @@ -965,11 +965,25 @@ strategyFunctions.fightMisty = function() return false end status.swappedOut = false - if Battle.sacrifice("pidgey", "spearow", "squirtle", "paras") then - if not status.sacrificed then - status.sacrificed = true - Bridge.chat(" Thrash didn't finish the kill :( Swapping out to cure Confusion") + local sacrifice = Pokemon.getSacrifice("pidgey", "spearow", "squirtle", "paras") + if not status.sacrificed then + status.sacrificed = true + local swapMessage = " Thrash didn't finish the kill :( " + if stats.nidoran.speedDV < 11 then + swapMessage = swapMessage.."We're slower than Misty, looks like it's over" + sacrifice = nil + elseif sacrifice then + if Control.yolo then + swapMessage = swapMessage.."Attempting to hit through Confusion to save time" + else + swapMessage = swapMessage.."Swapping out to cure Confusion" + end + else + swapMessage = swapMessage.."We'll have to hit through Confusion here" end + Bridge.chat(swapMessage) + end + if sacrifice and not Control.yolo and Battle.sacrifice(sacrifice) then return false end end @@ -1359,8 +1373,8 @@ strategyFunctions.silphRival = function() if Battle.isActive() then if Strategies.initialize() then if Control.yolo then - Bridge.chat("is attempting to red-bar off Silph Rival. Get ready to spaghetti!") status.gyaradosDamage = Combat.healthFor("RivalGyarados") + Bridge.chat("is attempting to red-bar off Silph Rival. Get ready to spaghetti!", status.gyaradosDamage.." "..Combat.redHP()) end status.canProgress = true end diff --git a/ai/strategies.lua b/ai/strategies.lua index ade1acb..a13ebe0 100644 --- a/ai/strategies.lua +++ b/ai/strategies.lua @@ -1212,7 +1212,7 @@ Strategies.functions = { announceOddish = function() if Pokemon.info("nidoking", "level") < 30 then - Bridge.chat("needs a good damage range to 1-shot this Oddish, which can Paralyze") + Bridge.chat("needs a good damage range to 1-shot this Oddish, which can paralyze") end return true end, @@ -1280,14 +1280,14 @@ Strategies.functions = { status.canProgress = true local currentlyDead = Memory.double("battle", "our_hp") == 0 if currentlyDead then - if not status.died then - status.died = true - Bridge.chat(" Rock Slide missed BibleThump Trying to finish them off with Dig...") - end local backupPokemon = Pokemon.getSacrifice("paras", "squirtle", "sandshrew", "charmander") if not backupPokemon then return Strategies.death() end + if not status.died then + status.died = true + Bridge.chat(" Rock Slide missed BibleThump Trying to finish them off with Dig...") + end if Menu.onPokemonSelect() then Pokemon.select(backupPokemon) else