Separate tree potion risk calculation from Brock
This commit is contained in:
parent
e35b505dad
commit
51e1655a63
|
@ -66,7 +66,11 @@ Strategies.timeRequirements = {
|
|||
end,
|
||||
|
||||
old_man = function()
|
||||
return 6.67 + timeSaveFor("spearow")
|
||||
return 6.8 + timeSaveFor("spearow")
|
||||
end,
|
||||
|
||||
forest = function()
|
||||
return 9.5 + timeSaveFor("spearow")
|
||||
end,
|
||||
|
||||
brock = function()
|
||||
|
@ -450,7 +454,9 @@ strategyFunctions.catchNidoran = function()
|
|||
end
|
||||
end
|
||||
if gotExperience then
|
||||
stats.nidoran = {level4=(Pokemon.info("nidoran", "level") == 4)}
|
||||
p(Pokemon.getDVs("nidoran"))
|
||||
local level4Nidoran = Pokemon.info("nidoran", "level") == 4
|
||||
stats.nidoran = {level4=level4Nidoran}
|
||||
return true
|
||||
end
|
||||
enableDSum = false
|
||||
|
@ -484,7 +490,14 @@ end
|
|||
|
||||
strategyFunctions.grabTreePotion = function()
|
||||
if Strategies.initialize() then
|
||||
if Strategies.setYolo("old_man") or Pokemon.info("squirtle", "hp") > 16 then
|
||||
if Strategies.setYolo("old_man") then
|
||||
return true
|
||||
end
|
||||
local current = Utils.igt()
|
||||
local limit = Strategies.getTimeRequirement("old_man") * 60
|
||||
local diff = math.floor((limit - current) / 5)
|
||||
p("grab", diff)
|
||||
if Pokemon.info("squirtle", "hp") > 14 + diff then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
@ -571,6 +584,11 @@ strategyFunctions.equipForBrock = function(data)
|
|||
return strategyFunctions.swapNidoran()
|
||||
end
|
||||
|
||||
strategyFunctions.exitForest = function()
|
||||
Strategies.setYolo("forest")
|
||||
return true
|
||||
end
|
||||
|
||||
strategyFunctions.fightBrock = function()
|
||||
local squirtleHP = Pokemon.info("squirtle", "hp")
|
||||
if squirtleHP == 0 then
|
||||
|
|
|
@ -51,7 +51,7 @@ local Paths = {
|
|||
-- Viridian Forest
|
||||
{51, {17,47}, {17,43}, {26,43}, {26,34}, {25,34}, {25,32}, {27,32}, {27,20}, {25,20}, {25,12}, {s="grabAntidote"}, {25,9}, {17,9}, {17,16}, {13,16}, {13,3}, {7,3}, {7,22}, {1,22}, {1,19}, {s="grabForestPotion"}, {1,18}, {s="fightWeedle"}, {c="encounters",limit=19,extra="paras"}, {1,16}, {c="potion",b=false}, {s="equipForBrock",anti=true}, {1,5}, {s="equipForBrock"}, {1,-1}},
|
||||
-- Forest exit
|
||||
{47, {4,7}, {4,1}, {5,1}, {5,0}},
|
||||
{47, {4,7}, {s="exitForest"}, {4,1}, {5,1}, {5,0}},
|
||||
-- Road to Pewter City
|
||||
{13, {3,11}, {c="a",a="Pewter City"}, {3,8}, {8,8}, {8,-1}},
|
||||
-- Pewter City
|
||||
|
|
Loading…
Reference in New Issue