diff --git a/ai/control.lua b/ai/control.lua index ca0a277..98d65d0 100644 --- a/ai/control.lua +++ b/ai/control.lua @@ -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") diff --git a/ai/yellow/strategies.lua b/ai/yellow/strategies.lua index 638e671..a8866f7 100644 --- a/ai/yellow/strategies.lua +++ b/ai/yellow/strategies.lua @@ -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 diff --git a/data/data.lua b/data/data.lua index 47b4118..115205c 100644 --- a/data/data.lua +++ b/data/data.lua @@ -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 = { diff --git a/util/utils.lua b/util/utils.lua index b34e718..46b19d9 100644 --- a/util/utils.lua +++ b/util/utils.lua @@ -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