Cleanup
This commit is contained in:
parent
f41fec18ea
commit
3b7664c7f2
|
@ -140,15 +140,7 @@ function Battle.isActive()
|
|||
end
|
||||
|
||||
function Battle.isTrainer()
|
||||
local battleType = Memory.value("game", "battle")
|
||||
if battleType == 2 then
|
||||
return true
|
||||
end
|
||||
if battleType == 1 then
|
||||
Battle.handle()
|
||||
else
|
||||
Textbox.handle()
|
||||
end
|
||||
return Memory.value("game", "battle") == 2
|
||||
end
|
||||
|
||||
function Battle.opponent()
|
||||
|
|
|
@ -160,21 +160,23 @@ local function nidoranDSum(enabled)
|
|||
status.path = {0, 4, 12}
|
||||
elseif opponentLevel == 3 then
|
||||
status.path = {0, 14, 11}
|
||||
else
|
||||
elseif opponentLevel == 4 then
|
||||
status.path = {0, 0, 10}
|
||||
end
|
||||
elseif opponentName == "spearow" then
|
||||
if opponentLevel == 3 then
|
||||
status.path = {2, 6, 12}
|
||||
else
|
||||
elseif opponentLevel == 5 then
|
||||
status.path = {3, 6, 12}
|
||||
end
|
||||
elseif opponentName == "nidoran" then
|
||||
status.path = {0, 6, 12}
|
||||
if opponentLevel == 2 then
|
||||
status.path = {0, 6, 12}
|
||||
end
|
||||
elseif opponentName == "nidoranf" then
|
||||
if opponentLevel == 3 then
|
||||
status.path = {4, 6, 12}
|
||||
else
|
||||
elseif opponentLevel == 4 then
|
||||
status.path = {5, 6, 12}
|
||||
end
|
||||
end
|
||||
|
@ -1150,6 +1152,8 @@ end
|
|||
|
||||
-- fourTurnThrash
|
||||
|
||||
-- announceVenonat
|
||||
|
||||
strategyFunctions.redbarCubone = function()
|
||||
if Strategies.trainerBattle() then
|
||||
local forced
|
||||
|
@ -1227,7 +1231,6 @@ strategyFunctions.shopBuffs = function()
|
|||
if Strategies.initialize() then
|
||||
if canRiskGiovanni() then
|
||||
riskGiovanni = true
|
||||
print("Giovanni skip strats!")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ function Strategies.completedMenuFor(data)
|
|||
end
|
||||
|
||||
function Strategies.closeMenuFor(data)
|
||||
if (not status.menuOpened and not data.close) or data.chain then
|
||||
if data.chain or (not status.menuOpened and not data.close) then
|
||||
if Menu.onPokemonSelect() or Menu.hasTextbox() then
|
||||
Input.press("B")
|
||||
return false
|
||||
|
@ -2061,7 +2061,7 @@ Strategies.functions = {
|
|||
return true
|
||||
end
|
||||
end
|
||||
return Strategies.tossItem("antidote", "tm34", "pokeball")
|
||||
return Strategies.tossItem("antidote", "tm34", "x_attack", "pokeball")
|
||||
end,
|
||||
|
||||
grabMaxEther = function()
|
||||
|
|
|
@ -233,7 +233,7 @@ local function depositPikachu()
|
|||
" I don't know how else to say this, but Nido and I are going steady now. Goodbye, Pikachu.",
|
||||
" You're cute, Pikachu. But this is a speedrun, and frankly you're getting in my way.",
|
||||
"come with me the time is right, there's no better team.... oh you're my best friend in a world we must defend... *stores Pikachu in pc*", --alloces
|
||||
" ... and nothing of value was lost", --mymla
|
||||
" ... and nothing of value was lost.", --mymla
|
||||
" Now Pikachu is in Pikajail because it gets in the Pikaway.", --0xAbad1dea
|
||||
" A little bit of Pikachu by my side... Just kidding!", --KatieW25
|
||||
" #moofydraws https://twitter.com/moofinseeker/status/597845848253423617", --moofinseeker
|
||||
|
@ -862,6 +862,8 @@ end
|
|||
|
||||
-- fourTurnThrash
|
||||
|
||||
-- announceVenonat
|
||||
|
||||
-- announceOddish
|
||||
|
||||
strategyFunctions.deptElevator = function()
|
||||
|
@ -940,7 +942,6 @@ end
|
|||
strategyFunctions.silphRival = function()
|
||||
if Strategies.trainerBattle() then
|
||||
if Strategies.prepare("x_accuracy") then
|
||||
-- Strategies.prepare("x_speed")
|
||||
local forced = "horn_drill"
|
||||
local prepare
|
||||
local opponentName = Battle.opponent()
|
||||
|
|
|
@ -68,6 +68,7 @@ local memoryNames = {
|
|||
battle = {
|
||||
opponent_turns = 0x0CD5,
|
||||
attack_turns = 0x1067,
|
||||
cooldown = 0x1068,
|
||||
text = 0x1125,
|
||||
menu = 0x0C50,
|
||||
accuracy = 0x0D1E,
|
||||
|
@ -78,7 +79,6 @@ local memoryNames = {
|
|||
opponent_next_move = 0x0CDD,
|
||||
opponent_last_move = 0x0FCC,
|
||||
|
||||
dig = 0x1067,
|
||||
critical = 0x105E,
|
||||
miss = 0x105F,
|
||||
our_turn = 0x1FF1,
|
||||
|
|
|
@ -106,6 +106,9 @@ end
|
|||
-- GAME
|
||||
|
||||
function Utils.canPotionWith(potion, forDamage, curr_hp, max_hp)
|
||||
if curr_hp > max_hp - 3 then
|
||||
return false
|
||||
end
|
||||
local potion_hp
|
||||
if potion == "full_restore" then
|
||||
potion_hp = 9001
|
||||
|
|
Loading…
Reference in New Issue