Use Paras and Squirtle backup vs Ghastly, fix verifying that they didn't faint before the fight
This commit is contained in:
parent
e0be7a5fbc
commit
241e4f4b65
|
@ -2087,21 +2087,19 @@ strategyFunctions = {
|
|||
digFight = function()
|
||||
if battle.isActive() then
|
||||
canProgress = true
|
||||
local backupIndex = pokemon.indexOf("paras", "squirtle")
|
||||
if pokemon.isDeployed("nidoking") then
|
||||
if pokemon.info("nidoking", "hp") == 0 then
|
||||
if utils.onPokemonSelect(memory.value("battle", "menu")) then
|
||||
menu.select(backupIndex, true)
|
||||
else
|
||||
input.press("A")
|
||||
end
|
||||
else
|
||||
battle.automate()
|
||||
local currentlyDead = memory.double("battle", "our_hp") == 0
|
||||
if currentlyDead then
|
||||
local backupPokemon = pokemon.getSacrifice("paras", "squirtle")
|
||||
if not backupPokemon then
|
||||
return resetDeath()
|
||||
end
|
||||
if utils.onPokemonSelect(memory.value("battle", "menu")) then
|
||||
menu.select(pokemon.indexOf(backupPokemon), true)
|
||||
else
|
||||
input.press("A")
|
||||
end
|
||||
elseif pokemon.info("nidoking", "hp") == 0 and pokemon.index(backupIndex, "hp") == 0 and pokemon.isDeployed("paras", "squirtle") then
|
||||
return resetDeath()
|
||||
else
|
||||
battle.fight("dig")
|
||||
battle.automate()
|
||||
end
|
||||
elseif canProgress then
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue