Update time constraints

This commit is contained in:
Kyle Coburn 2015-05-29 11:27:36 -07:00
parent 39c387e1f6
commit 16aee693f9
1 changed files with 48 additions and 25 deletions

View File

@ -30,51 +30,78 @@ Strategies.warpToCerulean = false
-- TIME CONSTRAINTS -- TIME CONSTRAINTS
local function timeForStats() local function timeForStats(level8)
local timeBonus = (stats.nidoran.attack - 53) * 0.05 local timeBonus = 0
local maxSpeed = math.min(stats.nidoran.speed, 52) if level8 then
return timeBonus + (maxSpeed - 49) * 0.125 if stats.nidoran.attack == 16 then
timeBonus = timeBonus + 0.25
end
if stats.nidoran.speed == 15 then
timeBonus = timeBonus + 0.3
end
else
timeBonus = (stats.nidoran.attack - 53) * 0.05
local maxSpeed = math.min(stats.nidoran.speed, 52)
timeBonus = timeBonus + (maxSpeed - 49) * 0.125
end
return timeBonus
end
local function timeForFlier()
return Pokemon.inParty("pidgey", "spearow") and 0.5 or 0
end end
Strategies.timeRequirements = { Strategies.timeRequirements = {
nidoran = function() nidoran = function()
local timeLimit = 8.25 return 7.5 + timeForFlier()
if Pokemon.inParty("pidgey") then end,
timeLimit = timeLimit + 0.5
end forest = function() --YOLO
return timeLimit return 13 + timeForFlier() + timeForStats(true)
end,
brock = function()
return 15 + timeForFlier() + timeForStats(true)
end, end,
mt_moon = function() mt_moon = function()
local timeLimit = 29.25 local timeLimit = 28.25 + timeForStats(true)
if stats.nidoran.attack > 15 and stats.nidoran.speed > 14 then
timeLimit = timeLimit + 0.25
end
if Pokemon.inParty("paras", "sandshrew") then if Pokemon.inParty("paras", "sandshrew") then
timeLimit = timeLimit + 0.25 timeLimit = timeLimit + 0.25
end end
if Pokemon.getExp() > 4200 then
timeLimit = timeLimit + 0.15
end
return timeLimit return timeLimit
end, end,
misty = function() --TWEET misty = function() --TWEET
return 42 + timeForStats() return 41 + timeForStats()
end, end,
trash = function() trash = function() --YOLO
return 51.25 + timeForStats() return 49.75 + timeForStats()
end, end,
victory_road = function() --TWEET PB mom = function() --YOLO
return 102.8 return 90
end, end,
e4center = function() victory_road = function() --TWEET
return 106.25 local timeLimit = 101.5
if Strategies.requiresE4Center(true, true) then
timeLimit = timeLimit - 0.1
end
return timeLimit
end,
blue = function() --YOLO
return 112.28
end, end,
champion = function() --PB champion = function() --PB
return 116.56 return 115.28
end, end,
} }
@ -467,10 +494,6 @@ strategyFunctions.centerViridian = function()
end end
strategyFunctions.fightSandshrew = function() strategyFunctions.fightSandshrew = function()
if Strategies.initialize() then
Strategies.setYolo("sandshrew")
end
local forced local forced
if Pokemon.isOpponent("sandshrew") then if Pokemon.isOpponent("sandshrew") then
local __, turnsToKill, turnsToDie = Combat.bestMove() local __, turnsToKill, turnsToDie = Combat.bestMove()