Update bridge messages

This commit is contained in:
Kyle Coburn 2015-04-10 00:34:50 -07:00
parent 05290b0a26
commit f7365cf176
3 changed files with 12 additions and 13 deletions

View File

@ -290,8 +290,8 @@ function Control.encounter(battleState)
if turnMarker == 100 or turnMarker == 128 then
local isMiss = Memory.value("battle", "miss") == 1
if isMiss then
if Battle.accurateAttack and Memory.value("battle", "accuracy") == 7 then
Bridge.chat("Gen 1 missed! (1 in 256 chance.)")
if not Control.ignoreMiss and Battle.accurateAttack and Memory.value("battle", "accuracy") == 7 then
Bridge.chat("gen 1 missed :( (1 in 256 chance)")
end
Control.missed = true
end
@ -321,7 +321,7 @@ function Control.encounter(battleState)
for i,catch in ipairs(gottaCatchEm) do
if opponent == catch then
if not Pokemon.inParty(catch) then
Bridge.chat("Noo, we accidentally killed "..Utils.capitalize(catch).." with a "..(isCritical and "critical" or "high damage range").." :(")
Bridge.chat("accidentally killed "..Utils.capitalize(catch).." with a "..(isCritical and "critical" or "high damage range").." :(")
Control.killedCatch = true
end
break

View File

@ -804,9 +804,10 @@ strategyFunctions.teachThrash = function()
speedDV = spdDv,
specialDV = sclDV,
}
p(Pokemon.getDVs(name))
Bridge.stats(statDesc)
p(attDv, defDV, spdDv, sclDV)
print(statDesc)
Bridge.stats(statDesc)
return true
end
end
@ -1902,7 +1903,7 @@ strategyFunctions.checkGiovanni = function()
if Control.yolo then
message = message.."Risking on Giovanni."
else
message = message.."Time for standard strats."
message = message.."Reverting to standard strats."
end
Bridge.chat(message)
riskGiovanni = false
@ -2118,7 +2119,7 @@ strategyFunctions.lorelei = function()
return false
end
elseif opponentName == "jinx" then
if Battle.pp("horn_drill") < 2 then
if Battle.pp("horn_drill") <= 1 then
forced = "earthquake"
end
end
@ -2248,9 +2249,6 @@ strategyFunctions.blue = function()
else
status.xItem = "x_speed"
end
if not STREAMING_MODE then
status.xItem = "x_speed"
end
end
local boostFirst = Pokemon.index(0, "hp") < 55
@ -2301,7 +2299,7 @@ strategyFunctions.blue = function()
else
if Strategies.prepare(firstItem, secondItem) then
if Pokemon.isOpponent("alakazam") then
if status.xItem == "x_special" then
if status.xItem == "x_speed" then
forced = "earthquake"
end
elseif Pokemon.isOpponent("rhydon") then
@ -2355,7 +2353,7 @@ function Strategies.initGame(midGame)
}
if Pokemon.inParty("nidoking") then
local attDv, defDV, spdDv, sclDV = Pokemon.getDVs("nidoking")
p(Pokemon.getDVs("nidoking"))
p(attDv, defDV, spdDv, sclDV)
stats.nidoran = {
attack = 55,
defense = 45,

View File

@ -161,7 +161,8 @@ function Strategies.hasHealthFor(opponent, extra)
if not extra then
extra = 0
end
return Pokemon.index(0, "hp") + extra > Combat.healthFor(opponent)
local afterHealth = math.min(Pokemon.index(0, "hp") + extra, Pokemon.index(0, "max_hp"))
return afterHealth > Combat.healthFor(opponent)
end
function Strategies.damaged(factor)