Cleanup
This commit is contained in:
parent
34cc719917
commit
9cdd9d8c83
|
@ -308,7 +308,8 @@ function Control.encounter(battleState)
|
|||
local isMiss = Memory.value("battle", "miss") == 1
|
||||
if isMiss then
|
||||
if not Control.ignoreMiss and Battle.accurateAttack and Memory.value("battle", "accuracy") == 7 then
|
||||
Bridge.chat("gen 1 missed :( (1 in 256 chance)")
|
||||
local exclaim = Strategies.deepRun and ";_; " or ""
|
||||
Bridge.chat("gen 1 missed "..exclaim.."(1 in 256 chance)")
|
||||
end
|
||||
Control.missed = true
|
||||
Data.increment("misses")
|
||||
|
|
|
@ -309,7 +309,7 @@ strategyFunctions.leerCaterpies = function()
|
|||
if not status.secondCaterpie and not Battle.opponentAlive() then
|
||||
status.secondCaterpie = true
|
||||
end
|
||||
local leerAmount = status.secondCaterpie and 10 or 7
|
||||
local leerAmount = status.secondCaterpie and 7 or 10
|
||||
return strategyFunctions.leer({{"caterpie", leerAmount}})
|
||||
end
|
||||
|
||||
|
|
|
@ -5,10 +5,12 @@ local Utils = require "util.utils"
|
|||
local Pokemon = require "storage.pokemon"
|
||||
|
||||
local version = 0
|
||||
local vIndex = 2
|
||||
for segment in string.gmatch(VERSION, "([^.]+)") do
|
||||
version = version + tonumber(segment) * 100 ^ vIndex
|
||||
vIndex = vIndex - 1
|
||||
if VERSION then
|
||||
local vIndex = 2
|
||||
for segment in string.gmatch(VERSION, "([^.]+)") do
|
||||
version = version + tonumber(segment) * 100 ^ vIndex
|
||||
vIndex = vIndex - 1
|
||||
end
|
||||
end
|
||||
|
||||
Data = {
|
||||
|
|
|
@ -87,10 +87,11 @@ function Utils.increment(amount)
|
|||
end
|
||||
|
||||
function Utils.multiplyString(string, times)
|
||||
local result = string
|
||||
for i=1, times-1 do
|
||||
string = string.." "..string
|
||||
result = result.." "..string
|
||||
end
|
||||
return string
|
||||
return result
|
||||
end
|
||||
|
||||
-- GAME
|
||||
|
|
Loading…
Reference in New Issue