Improve hp management in Vermillion
This commit is contained in:
parent
5df9a724e1
commit
07d09f757e
|
@ -992,8 +992,9 @@ strategyFunctions.catchOddish = function()
|
||||||
end
|
end
|
||||||
Battle.handle()
|
Battle.handle()
|
||||||
end
|
end
|
||||||
elseif status.tries == 1 and py == 31 then
|
elseif status.tries == 1 and py == 31 and Combat.hp() > 12 then
|
||||||
Player.interact("Left")
|
Player.interact("Left")
|
||||||
|
Strategies.foughtRaticateEarly = true
|
||||||
else
|
else
|
||||||
local path
|
local path
|
||||||
if caught then
|
if caught then
|
||||||
|
@ -1040,6 +1041,14 @@ strategyFunctions.catchOddish = function()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
strategyFunctions.potionBeforeRaticate = function()
|
||||||
|
if Strategies.foughtRaticateEarly then
|
||||||
|
Strategies.foughtRaticateEarly = nil
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return strategyFunctions.potion({hp=10, yolo=8, chain=true})
|
||||||
|
end
|
||||||
|
|
||||||
strategyFunctions.shopVermilionMart = function()
|
strategyFunctions.shopVermilionMart = function()
|
||||||
if Strategies.initialize() then
|
if Strategies.initialize() then
|
||||||
Strategies.setYolo("vermilion")
|
Strategies.setYolo("vermilion")
|
||||||
|
@ -1125,14 +1134,14 @@ strategyFunctions.fightSurge = function()
|
||||||
status.canProgress = true
|
status.canProgress = true
|
||||||
local forced
|
local forced
|
||||||
if Pokemon.isOpponent("voltorb") then
|
if Pokemon.isOpponent("voltorb") then
|
||||||
Combat.disableThrash = true
|
Combat.disableThrash = not Control.yolo or Combat.inRedBar()
|
||||||
local __, enemyTurns = Combat.enemyAttack()
|
local __, enemyTurns = Combat.enemyAttack()
|
||||||
if not enemyTurns or enemyTurns > 2 then
|
if not enemyTurns or enemyTurns > 2 then
|
||||||
forced = "bubblebeam"
|
forced = "bubblebeam"
|
||||||
elseif enemyTurns == 2 and not Strategies.opponentDamaged() then
|
elseif enemyTurns == 2 and not Strategies.opponentDamaged() then
|
||||||
local curr_hp, red_hp = Combat.hp(), Combat.redHP()
|
local curr_hp, red_hp = Combat.hp(), Combat.redHP()
|
||||||
local afterHit = curr_hp - 20
|
local afterHit = curr_hp - 20
|
||||||
if afterHit > 5 and afterHit <= red_hp then
|
if afterHit > 5 and afterHit <= red_hp - 3 then
|
||||||
forced = "bubblebeam"
|
forced = "bubblebeam"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1164,6 +1173,8 @@ end
|
||||||
|
|
||||||
-- redbarCubone
|
-- redbarCubone
|
||||||
|
|
||||||
|
-- announceOddish
|
||||||
|
|
||||||
strategyFunctions.undergroundElixer = function()
|
strategyFunctions.undergroundElixer = function()
|
||||||
if Strategies.initialize() then
|
if Strategies.initialize() then
|
||||||
if Inventory.contains("elixer") and Inventory.contains("ether") then
|
if Inventory.contains("elixer") and Inventory.contains("ether") then
|
||||||
|
|
|
@ -136,7 +136,7 @@ local Paths = {
|
||||||
-- Underground exit
|
-- Underground exit
|
||||||
{74, {4,4}, {3,8}},
|
{74, {4,4}, {3,8}},
|
||||||
-- Oddish
|
-- Oddish
|
||||||
{17, {17,14}, {c="a",a="Vermilion City"}, {c="catchOddish"}, {17,15}, {s="potion",hp=10,yolo=7}, {17,19}, {s="catchOddish"}, {11,29}, {s="potion",hp=10,yolo=7}, {11,29}, {s="waitToFight",dir="Down"}, {10,29}, {10,30}, {s="potion",hp=10,yolo=7}, {10,31}, {9,31}, {9,36}},
|
{17, {17,14}, {c="a",a="Vermilion City"}, {c="catchOddish"}, {17,15}, {s="potion",hp=10,yolo=7}, {17,19}, {s="catchOddish"}, {11,29}, {s="potion",hp=10,yolo=7}, {11,29}, {s="waitToFight",dir="Down"}, {10,29}, {10,30}, {s="potionBeforeRaticate"}, {10,31}, {9,31}, {9,36}},
|
||||||
-- Enter Vermilion
|
-- Enter Vermilion
|
||||||
{5, {19,0}, {c="disableCatch"}, {19,6}, {21,6}, {21,14}, {23,14}, {23,13}},
|
{5, {19,0}, {c="disableCatch"}, {19,6}, {21,6}, {21,14}, {23,14}, {23,13}},
|
||||||
-- Vermilion mart
|
-- Vermilion mart
|
||||||
|
@ -148,7 +148,7 @@ local Paths = {
|
||||||
-- First deck
|
-- First deck
|
||||||
{95, {27,0}, {27,1}, {26,1}, {26,7}, {2,7}, {2,6}},
|
{95, {27,0}, {27,1}, {26,1}, {26,7}, {2,7}, {2,6}},
|
||||||
-- Rival 3
|
-- Rival 3
|
||||||
{96, {2,4}, {2,11}, {3,11}, {3,12}, {37,12}, {37,9}, {s="swap",item="potion",dest=2,chain=true}, {s="potion",hp=23,yolo=16,chain=true}, {s="teach",move="bubblebeam",replace="tackle",close=true}, {37,8}, {s="rivalSandAttack"}, {37,5}, {36,5}, {36,4}},
|
{96, {2,4}, {2,11}, {3,11}, {3,12}, {37,12}, {37,9}, {s="swap",item="potion",dest=2,chain=true}, {s="potion",hp=25,yolo=19,chain=true}, {s="teach",move="bubblebeam",replace="tackle",close=true}, {37,8}, {s="rivalSandAttack"}, {37,5}, {36,5}, {36,4}},
|
||||||
-- Old man Cut
|
-- Old man Cut
|
||||||
{101, {0,7}, {0,4}, {4,4}, {4,3}, {s="talk",dir="Up"}, {4,5}, {0,5}, {0,7}},
|
{101, {0,7}, {0,4}, {4,4}, {4,3}, {s="talk",dir="Up"}, {4,5}, {0,5}, {0,7}},
|
||||||
-- Second deck out
|
-- Second deck out
|
||||||
|
|
Loading…
Reference in New Issue