Ensure forest potion has not already been picked up when required, clarify forest reset messages
This commit is contained in:
parent
4e0e7ca269
commit
726cf290bb
|
@ -960,7 +960,14 @@ strategyFunctions = {
|
||||||
|
|
||||||
grabForestPotion = function()
|
grabForestPotion = function()
|
||||||
if battle.handleWild() then
|
if battle.handleWild() then
|
||||||
if inventory.contains("potion") then
|
local potionCount = inventory.count("potion")
|
||||||
|
if initialize() then
|
||||||
|
tempDir = potionCount
|
||||||
|
end
|
||||||
|
if potionCount > 0 then
|
||||||
|
if tempDir and potionCount > tempDir then
|
||||||
|
tempDir = nil
|
||||||
|
end
|
||||||
local healthNeeded = (pokemon.info("spearow", "level") == 3) and 8 or 15
|
local healthNeeded = (pokemon.info("spearow", "level") == 3) and 8 or 15
|
||||||
if pokemon.info("squirtle", "hp") <= healthNeeded then
|
if pokemon.info("squirtle", "hp") <= healthNeeded then
|
||||||
if menu.pause() then
|
if menu.pause() then
|
||||||
|
@ -969,6 +976,8 @@ strategyFunctions = {
|
||||||
else
|
else
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
elseif not tempDir then
|
||||||
|
return true
|
||||||
elseif menu.close() then
|
elseif menu.close() then
|
||||||
player.interact("Up")
|
player.interact("Up")
|
||||||
end
|
end
|
||||||
|
@ -1018,7 +1027,14 @@ strategyFunctions = {
|
||||||
equipForBrock = function(data)
|
equipForBrock = function(data)
|
||||||
if initialize() then
|
if initialize() then
|
||||||
if pokemon.info("squirtle", "level") < 8 then
|
if pokemon.info("squirtle", "level") < 8 then
|
||||||
return reset("Not level 8 before Brock", pokemon.getExp())
|
local message, wait
|
||||||
|
if pokemon.info("spearow", "level") == 3 then
|
||||||
|
message = "Lost too much exp accidentally killing Weedle with Spearow"
|
||||||
|
else
|
||||||
|
message = "Did not reach level 8 before Brock"
|
||||||
|
wait = true
|
||||||
|
end
|
||||||
|
return reset(message, pokemon.getExp(), wait)
|
||||||
end
|
end
|
||||||
if data.anti then
|
if data.anti then
|
||||||
local poisoned = pokemon.info("squirtle", "status") > 0
|
local poisoned = pokemon.info("squirtle", "status") > 0
|
||||||
|
@ -1026,7 +1042,7 @@ strategyFunctions = {
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
if not inventory.contains("antidote") then
|
if not inventory.contains("antidote") then
|
||||||
return reset("Poisoned, but we skipped the antidote")
|
return reset("Poisoned, but we risked skipping the antidote")
|
||||||
end
|
end
|
||||||
local curr_hp = pokemon.info("squirtle", "hp")
|
local curr_hp = pokemon.info("squirtle", "hp")
|
||||||
if inventory.contains("potion") and curr_hp > 8 and curr_hp < 18 then
|
if inventory.contains("potion") and curr_hp > 8 and curr_hp < 18 then
|
||||||
|
|
Loading…
Reference in New Issue