Prioritize full or super potions
This commit is contained in:
parent
bc4bce250b
commit
70998c425a
|
@ -32,7 +32,7 @@ local function recover()
|
|||
local maxHP = Pokemon.index(0, "max_hp")
|
||||
if currentHP < maxHP then
|
||||
local first, second
|
||||
if potionIn == "full" then
|
||||
if Control.preferredPotion == "full" then
|
||||
first, second = "full_restore", "super_potion"
|
||||
if maxHP - currentHP > 54 then
|
||||
first = "full_restore"
|
||||
|
@ -42,7 +42,7 @@ local function recover()
|
|||
second = "full_restore"
|
||||
end
|
||||
else
|
||||
if Control.preferSuper and maxHP - currentHP > 22 then
|
||||
if Control.preferredPotion == "super" and maxHP - currentHP > 22 then
|
||||
first = "super_potion"
|
||||
second = "potion"
|
||||
else
|
||||
|
|
|
@ -359,7 +359,7 @@ function Control.reset()
|
|||
|
||||
Control.yolo = false
|
||||
Control.inBattle = false
|
||||
Control.preferSuper = false
|
||||
Control.preferredPotion = nil
|
||||
end
|
||||
|
||||
function Control.init()
|
||||
|
|
|
@ -261,7 +261,7 @@ strategyFunctions.tweetMisty = function()
|
|||
end
|
||||
|
||||
strategyFunctions.tweetSurge = function()
|
||||
Control.preferSuper = true
|
||||
Control.preferredPotion = "super"
|
||||
|
||||
if not Strategies.updates.misty and not Control.yolo then
|
||||
local elt = Utils.elapsedTime()
|
||||
|
|
|
@ -1588,7 +1588,7 @@ function Strategies.init(midGame)
|
|||
splitTime = Utils.timeSince(0)
|
||||
end
|
||||
if midGame then
|
||||
Control.preferSuper = true
|
||||
Control.preferredPotion = "super"
|
||||
Combat.factorPP(true)
|
||||
end
|
||||
Strategies.initGame(midGame)
|
||||
|
|
|
@ -719,6 +719,8 @@ end
|
|||
strategyFunctions.centerSkip = function()
|
||||
if Strategies.initialize() then
|
||||
Strategies.setYolo("e4center")
|
||||
Control.preferredPotion = "full"
|
||||
|
||||
if false then --TODO
|
||||
local message = "is skipping the Elite 4 Center!"
|
||||
Bridge.chat(message)
|
||||
|
@ -877,7 +879,7 @@ function Strategies.initGame(midGame)
|
|||
}
|
||||
end
|
||||
end
|
||||
Control.preferSuper = true
|
||||
Control.preferredPotion = "super"
|
||||
end
|
||||
|
||||
function Strategies.completeGameStrategy()
|
||||
|
|
Loading…
Reference in New Issue