Prioritize full or super potions

This commit is contained in:
Kyle Coburn 2015-04-15 01:38:51 -07:00
parent bc4bce250b
commit 70998c425a
5 changed files with 8 additions and 6 deletions

View File

@ -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

View File

@ -359,7 +359,7 @@ function Control.reset()
Control.yolo = false
Control.inBattle = false
Control.preferSuper = false
Control.preferredPotion = nil
end
function Control.init()

View File

@ -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()

View File

@ -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)

View File

@ -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()