Add Beast Mode option to go for 1:47
This commit is contained in:
parent
aed2108c37
commit
62c9bb21b1
|
@ -48,7 +48,11 @@ local controlFunctions = {
|
|||
|
||||
encounters = function(data)
|
||||
if RESET_FOR_TIME then
|
||||
maxEncounters = data.limit
|
||||
local limit = data.limit
|
||||
if BEAST_MODE then
|
||||
limit = limit - math.ceil(limit * 0.333)
|
||||
end
|
||||
maxEncounters = limit
|
||||
extraEncounter = data.extra
|
||||
end
|
||||
end,
|
||||
|
@ -129,7 +133,10 @@ local controlFunctions = {
|
|||
end,
|
||||
|
||||
catchNidoran = function()
|
||||
shouldCatch = {{name="nidoran",levels={3,4}}, {name="spearow"}}
|
||||
shouldCatch = {{name="nidoran",levels={3,4}}}
|
||||
if not BEAST_MODE then
|
||||
shouldCatch[2] = {name="spearow"}
|
||||
end
|
||||
end,
|
||||
|
||||
catchFlier = function()
|
||||
|
|
|
@ -52,10 +52,16 @@ end
|
|||
Strategies.timeRequirements = {
|
||||
|
||||
bulbasaur = function() --RESET
|
||||
if BEAST_MODE then
|
||||
return 1.99
|
||||
end
|
||||
return 2.225
|
||||
end,
|
||||
|
||||
nidoran = function() --RESET
|
||||
if BEAST_MODE then
|
||||
return 6
|
||||
end
|
||||
return 6.4 + timeSaveFor("spearow")
|
||||
end,
|
||||
|
||||
|
@ -74,6 +80,10 @@ Strategies.timeRequirements = {
|
|||
end,
|
||||
|
||||
mt_moon = function() --RESET
|
||||
if BEAST_MODE then
|
||||
return 24.75
|
||||
end
|
||||
|
||||
local timeLimit = 25.5 + timeSaveFor("paras")
|
||||
if Pokemon.info("nidoking", "level") >= 18 then
|
||||
timeLimit = timeLimit + 0.33
|
||||
|
@ -106,6 +116,9 @@ Strategies.timeRequirements = {
|
|||
end,
|
||||
|
||||
trash = function() --RESET
|
||||
if BEAST_MODE then
|
||||
return 45.75
|
||||
end
|
||||
return 46.5 + timeForStats()
|
||||
end,
|
||||
|
||||
|
@ -327,13 +340,14 @@ strategyFunctions.fightBulbasaur = function()
|
|||
local attack = Memory.double("battle", "our_attack")
|
||||
if attack > 0 and not status.growled then
|
||||
if attack ~= status.attack then
|
||||
p(attack, Memory.double("battle", "opponent_hp"))
|
||||
-- p(attack, Memory.double("battle", "opponent_hp"))
|
||||
status.attack = attack
|
||||
end
|
||||
local growled
|
||||
if attack <= 2 then
|
||||
local attackBaseline = BEAST_MODE and 2 or 0
|
||||
if attack <= 2 + attackBaseline then
|
||||
growled = not Strategies.opponentDamaged(3)
|
||||
elseif attack <= 3 then
|
||||
elseif attack <= 3 + attackBaseline then
|
||||
growled = not Strategies.opponentDamaged(1.9)
|
||||
end
|
||||
if growled then
|
||||
|
|
|
@ -126,8 +126,13 @@ function Strategies.setYolo(name, forced)
|
|||
if not forced and not RESET_FOR_TIME then
|
||||
return false
|
||||
end
|
||||
local shouldYolo
|
||||
if BEAST_MODE then
|
||||
shouldYolo = true
|
||||
else
|
||||
local minimumTime = Strategies.getTimeRequirement(name)
|
||||
local shouldYolo = Strategies.overMinute(minimumTime)
|
||||
shouldYolo = Strategies.overMinute(minimumTime)
|
||||
end
|
||||
if Control.yolo ~= shouldYolo then
|
||||
Control.yolo = shouldYolo
|
||||
Control.setYolo(shouldYolo)
|
||||
|
|
7
main.lua
7
main.lua
|
@ -1,6 +1,7 @@
|
|||
-- OPTIONS
|
||||
|
||||
RESET_FOR_TIME = false -- Set to true if you're trying to break the record, not just finish a run
|
||||
BEAST_MODE = false -- WARNING: Do not engage. Will yolo everything, and reset at every opportunity in the quest for 1:47.
|
||||
|
||||
local CUSTOM_SEED = nil -- Set to a known seed to replay it, or leave nil for random runs
|
||||
local NIDORAN_NAME = "A" -- Set this to the single character to name Nidoran (note, to replay a seed, it MUST match!)
|
||||
|
@ -55,7 +56,7 @@ local function resetAll()
|
|||
p("RUNNING WITH A FIXED SEED ("..NIDORAN_NAME.." "..Data.run.seed.."), every run will play out identically!", true)
|
||||
else
|
||||
Data.run.seed = os.time()
|
||||
print("PokeBot v"..VERSION..": starting a new run with seed "..Data.run.seed)
|
||||
print("PokeBot v"..VERSION..": "..(BEAST_MODE and "BEAST MODE seed" or "starting a new run with seed").." "..Data.run.seed)
|
||||
end
|
||||
math.randomseed(Data.run.seed)
|
||||
end
|
||||
|
@ -67,11 +68,11 @@ p("Welcome to PokeBot "..Data.gameName.." version "..VERSION, true)
|
|||
Control.init()
|
||||
|
||||
STREAMING_MODE = not Walk.init() and INTERNAL
|
||||
if STREAMING_MODE then
|
||||
if STREAMING_MODE or BEAST_MODE then
|
||||
RESET_FOR_TIME = true
|
||||
end
|
||||
|
||||
if CUSTOM_SEED then
|
||||
if CUSTOM_SEED or BEAST_MODE then
|
||||
client.reboot_core()
|
||||
else
|
||||
hasAlreadyStartedPlaying = Utils.ingame()
|
||||
|
|
Loading…
Reference in New Issue