This commit is contained in:
Kyle Coburn 2015-04-17 18:24:40 -07:00
parent 34cc719917
commit 9cdd9d8c83
4 changed files with 12 additions and 8 deletions

View File

@ -308,7 +308,8 @@ function Control.encounter(battleState)
local isMiss = Memory.value("battle", "miss") == 1 local isMiss = Memory.value("battle", "miss") == 1
if isMiss then if isMiss then
if not Control.ignoreMiss and Battle.accurateAttack and Memory.value("battle", "accuracy") == 7 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 end
Control.missed = true Control.missed = true
Data.increment("misses") Data.increment("misses")

View File

@ -309,7 +309,7 @@ strategyFunctions.leerCaterpies = function()
if not status.secondCaterpie and not Battle.opponentAlive() then if not status.secondCaterpie and not Battle.opponentAlive() then
status.secondCaterpie = true status.secondCaterpie = true
end end
local leerAmount = status.secondCaterpie and 10 or 7 local leerAmount = status.secondCaterpie and 7 or 10
return strategyFunctions.leer({{"caterpie", leerAmount}}) return strategyFunctions.leer({{"caterpie", leerAmount}})
end end

View File

@ -5,10 +5,12 @@ local Utils = require "util.utils"
local Pokemon = require "storage.pokemon" local Pokemon = require "storage.pokemon"
local version = 0 local version = 0
local vIndex = 2 if VERSION then
for segment in string.gmatch(VERSION, "([^.]+)") do local vIndex = 2
version = version + tonumber(segment) * 100 ^ vIndex for segment in string.gmatch(VERSION, "([^.]+)") do
vIndex = vIndex - 1 version = version + tonumber(segment) * 100 ^ vIndex
vIndex = vIndex - 1
end
end end
Data = { Data = {

View File

@ -87,10 +87,11 @@ function Utils.increment(amount)
end end
function Utils.multiplyString(string, times) function Utils.multiplyString(string, times)
local result = string
for i=1, times-1 do for i=1, times-1 do
string = string.." "..string result = result.." "..string
end end
return string return result
end end
-- GAME -- GAME