This commit is contained in:
Kyle Coburn 2015-04-15 01:47:18 -07:00
parent 33c43b3e88
commit 099c11291a
4 changed files with 16 additions and 13 deletions

View File

@ -495,7 +495,7 @@ strategyFunctions.fightBrock = function()
if status.tries < 1 then
status.tries = 1
end
local bubble, turnsToKill, turnsToDie = Combat.bestMove()
local __, turnsToKill, turnsToDie = Combat.bestMove()
if not Pokemon.isDeployed("squirtle") then
Battle.swap("squirtle")
elseif turnsToDie and turnsToDie < 2 and Inventory.contains("potion") then
@ -729,8 +729,8 @@ strategyFunctions.rivalSandAttack = function(data)
if Memory.value("battle", "accuracy") < 7 then
local sacrifice
if opponent == "pidgeotto" then
local __, turns = Combat.bestMove()
if turns == 1 then
local __, turnsToKill = Combat.bestMove()
if turnsToKill == 1 then
sacrifice = Pokemon.getSacrifice("pidgey", "spearow", "paras", "oddish", "squirtle")
end
elseif opponent == "raticate" then

View File

@ -543,10 +543,10 @@ Strategies.functions = {
end
return false
end
if not status.unavailable and data.item ~= "carbos" and not Inventory.contains(data.item) then
status.unavailable = true
if not status.checked and data.item ~= "carbos" and not Inventory.contains(data.item) then
print("No "..data.item.." available!")
end
status.checked = true
return Strategies.useItem(data)
end
end,
@ -565,6 +565,7 @@ Strategies.functions = {
if type(toHP) == "string" then
toHP = Combat.healthFor(toHP)
end
toHP = math.min(toHP, Pokemon.index(0, "max_hp"))
local toHeal = toHP - curr_hp
if toHeal > 0 then
local toPotion
@ -1076,13 +1077,16 @@ Strategies.functions = {
rareCandyEarly = function(data)
if Strategies.initialize() then
p("RCE", Pokemon.getExp())
if Pokemon.info("nidoking", "level") ~= 20 then
return true
end
if yellow then
p("RCE", Pokemon.getExp())
if Pokemon.getExp() > 5500 then --TODO
return true
end
else
if Pokemon.info("nidoking", "level") ~= 20 or Pokemon.getExp() > 5550 then
if Pokemon.getExp() > 5550 then
return true
end
end
@ -1165,13 +1169,12 @@ Strategies.functions = {
local curr_hp, red_hp = Combat.hp(), Combat.redHP()
local clubDmg = enemyMove.damage
local afterHit = curr_hp - clubDmg
red_hp = red_hp - 2
local acceptableHealth = Control.yolo and -1 or 1
if afterHit >= acceptableHealth and afterHit < red_hp then
if afterHit >= acceptableHealth and afterHit < red_hp - 2 then
forced = "thunderbolt"
else
afterHit = afterHit - clubDmg
if afterHit > 1 and afterHit < red_hp then
if afterHit > 1 and afterHit < red_hp - 4 then
forced = "thunderbolt"
end
end
@ -1589,7 +1592,7 @@ function Strategies.execute(data)
Strategies.status = status
Strategies.completeGameStrategy()
if yellow then
print(data.s)
-- print(data.s)
end
if resetting then
return nil

View File

@ -420,7 +420,7 @@ local Paths = {
-- F3
{198, {23,7}, {23,6}, {22,6}, {22,4}, {s="skill",move="strength"}, {22,2}, {23,2}, {23,1}, {7,1}, {7,0}, {6,0}, {6,1}, {7,1}, {7,2}, {3,2}, {3,1}, {2,1}, {2,4}, {1,4}, {1,5}, {2,5}, {2,4}, {4,4}, {4,2}, {7,2}, {7,1}, {20,1}, {20,6}, {17,6}, {17,4}, {9,4}, {9,10}, {5,10}, {5,8}, {1,8}, {1,15}, {11,15}, {11,16}, {20,16}, {20,15}, {23,15}},
-- F2
{194, {22,16}, {s="potionBeforeLorelei"}, {s="item",item="super_repel",chain=true}, {s="skill",move="strength"}, {s="bicycle"}, {22,17}, {24,17}, {24,16}, {11,16}, {s="push",dir="Left",x=0x02D5,y=0x02D4}, {21,16}, {21,14}, {25,14}},
{194, {22,16}, {s="potionBeforeLorelei"}, {s="item",item="super_repel",chain=true}, {s="skill",move="strength",chain=true}, {s="bicycle"}, {22,17}, {24,17}, {24,16}, {11,16}, {s="push",dir="Left",x=0x02D5,y=0x02D4}, {21,16}, {21,14}, {25,14}},
-- F3
{198, {27,15}, {27,8}, {26,8}},
-- F2 Exit

View File

@ -71,7 +71,7 @@ function Settings.startNewAdventure(startWait)
Menu.select(0)
end
elseif math.random(0, startWait) == 0 then
Input.press("Start")
Input.press("Start", 2)
end
end