Update chat messages
This commit is contained in:
parent
a8a9f89306
commit
0ef38b2181
|
@ -81,8 +81,8 @@ function Strategies.reset(reason, explanation, extra, wait)
|
||||||
end
|
end
|
||||||
resetMessage = resetMessage..separator.." "..explanation
|
resetMessage = resetMessage..separator.." "..explanation
|
||||||
|
|
||||||
if Strategies.updates.misty or Strategies.updates.surge then
|
if not Data.yellow and (Strategies.updates.misty or Strategies.updates.surge) and Strategies.deepRun then
|
||||||
Strategies.tweetProgress(resetMessage.." in")
|
Strategies.tweetProgress(Utils.capitalize(resetMessage))
|
||||||
end
|
end
|
||||||
|
|
||||||
return Strategies.hardReset(reason, resetMessage, extra, wait)
|
return Strategies.hardReset(reason, resetMessage, extra, wait)
|
||||||
|
@ -93,15 +93,15 @@ function Strategies.death(extra)
|
||||||
if Control.missed then
|
if Control.missed then
|
||||||
explanation = "Missed"
|
explanation = "Missed"
|
||||||
reason = "miss"
|
reason = "miss"
|
||||||
elseif Combat.isConfused() then
|
|
||||||
explanation = "Confusion'd"
|
|
||||||
reason = "confusion"
|
|
||||||
elseif Control.criticaled then
|
elseif Control.criticaled then
|
||||||
explanation = "Critical'd"
|
explanation = "Critical'd"
|
||||||
reason = "critical"
|
reason = "critical"
|
||||||
elseif Combat.sandAttacked() then
|
elseif Combat.sandAttacked() then
|
||||||
explanation = "Sand-Attack'd"
|
explanation = "Sand-Attack'd"
|
||||||
reason = "accuracy"
|
reason = "accuracy"
|
||||||
|
elseif Combat.isConfused() then
|
||||||
|
explanation = "Confusion'd"
|
||||||
|
reason = "confusion"
|
||||||
elseif Control.yolo then
|
elseif Control.yolo then
|
||||||
explanation = "Yolo strats"
|
explanation = "Yolo strats"
|
||||||
reason = "yolo"
|
reason = "yolo"
|
||||||
|
@ -183,6 +183,9 @@ function Strategies.chat(once, message)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Strategies.canHealFor(damage)
|
function Strategies.canHealFor(damage)
|
||||||
|
if type(damage) == "string" then
|
||||||
|
damage = Combat.healthFor(damage)
|
||||||
|
end
|
||||||
local curr_hp, max_hp = Combat.hp(), Combat.maxHP()
|
local curr_hp, max_hp = Combat.hp(), Combat.maxHP()
|
||||||
if max_hp - curr_hp > 3 then
|
if max_hp - curr_hp > 3 then
|
||||||
local healChecks = {"full_restore", "super_potion", "potion"}
|
local healChecks = {"full_restore", "super_potion", "potion"}
|
||||||
|
@ -543,7 +546,7 @@ Strategies.functions = {
|
||||||
tweetMisty = function()
|
tweetMisty = function()
|
||||||
Strategies.setYolo("misty")
|
Strategies.setYolo("misty")
|
||||||
|
|
||||||
if not Strategies.updates.brock and not Control.yolo then
|
if not Strategies.updates.brock and not Control.yolo and (not Combat.inRedBar() or Inventory.contains("potion")) then
|
||||||
local timeLimit = Strategies.getTimeRequirement("misty")
|
local timeLimit = Strategies.getTimeRequirement("misty")
|
||||||
if not Strategies.overMinute(timeLimit) then
|
if not Strategies.overMinute(timeLimit) then
|
||||||
local pbn = ""
|
local pbn = ""
|
||||||
|
@ -719,24 +722,27 @@ Strategies.functions = {
|
||||||
if not status.cancel then
|
if not status.cancel then
|
||||||
if Pokemon.hasMove(data.move) then
|
if Pokemon.hasMove(data.move) then
|
||||||
if data.chain and Memory.value("menu", "main") == 128 then
|
if data.chain and Memory.value("menu", "main") == 128 then
|
||||||
p("128", data.move)
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
status.cancel = true
|
status.cancel = true
|
||||||
else
|
else
|
||||||
|
local teachTo = data.poke
|
||||||
if Strategies.initialize("triedTeaching") then
|
if Strategies.initialize("triedTeaching") then
|
||||||
if not Inventory.contains(itemName) then
|
if not Inventory.contains(itemName) then
|
||||||
|
local errorMessage = "Unable to teach move "..itemName
|
||||||
return Strategies.reset("error", "Unable to teach move "..itemName..(data.poke and " to "..data.poke or ""), nil, true)
|
if teachTo and type(teachTo) == "string" then
|
||||||
|
errorMessage = errorMessage.." to "..teachTo
|
||||||
|
end
|
||||||
|
return Strategies.reset("error", errorMessage, nil, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local replacement
|
local replacement
|
||||||
if data.replace then
|
if data.replace then
|
||||||
replacement = Pokemon.moveIndex(data.replace, data.poke) - 1
|
replacement = Pokemon.moveIndex(data.replace, teachTo) - 1
|
||||||
else
|
else
|
||||||
replacement = 0
|
replacement = 0
|
||||||
end
|
end
|
||||||
if Inventory.teach(itemName, data.poke, replacement) then
|
if Inventory.teach(itemName, teachTo, replacement) then
|
||||||
status.menuOpened = true
|
status.menuOpened = true
|
||||||
else
|
else
|
||||||
Menu.pause()
|
Menu.pause()
|
||||||
|
@ -997,7 +1003,7 @@ Strategies.functions = {
|
||||||
if Pokemon.index(nidx, "level") < 8 then
|
if Pokemon.index(nidx, "level") < 8 then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if status.tries < (Data.yellow and 10 or 300) then
|
if not Data.yellow and status.tries < 300 then
|
||||||
status.tries = status.tries + 1
|
status.tries = status.tries + 1
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -1081,7 +1087,7 @@ Strategies.functions = {
|
||||||
else
|
else
|
||||||
superlative = " good"
|
superlative = " good"
|
||||||
end
|
end
|
||||||
elseif statDiff <= (restrictiveStats and 3 or 4) then
|
elseif statDiff <= ((restrictiveStats or Data.yellow) and 3 or 4) then
|
||||||
superlative = "n okay"
|
superlative = "n okay"
|
||||||
exclaim = "."
|
exclaim = "."
|
||||||
else
|
else
|
||||||
|
@ -1096,7 +1102,9 @@ Strategies.functions = {
|
||||||
end
|
end
|
||||||
message = message.." a"..superlative.." Nidoran"..exclaim
|
message = message.." a"..superlative.." Nidoran"..exclaim
|
||||||
|
|
||||||
if not Data.yellow then
|
if Data.yellow then
|
||||||
|
message = message.." On "..(Strategies.vaporeon and "Vaporeon" or "Flareon").." strats."
|
||||||
|
else
|
||||||
message = message.." Caught at level "..(stats.nidoran.level4 and "4" or "3").."."
|
message = message.." Caught at level "..(stats.nidoran.level4 and "4" or "3").."."
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -445,7 +445,7 @@ strategyFunctions.acquireCharmander = function()
|
||||||
if Pokemon.inParty("sandshrew", "paras") then
|
if Pokemon.inParty("sandshrew", "paras") then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
Bridge.chat("couldn't catch a cutter in Mt. Moon. Getting a free Charmander to teach Cut.")
|
Bridge.chat("couldn't catch a Paras/Sandshrew in Mt. Moon. Getting a free Charmander to teach Cut.")
|
||||||
end
|
end
|
||||||
local acquiredCharmander = Pokemon.inParty("charmander")
|
local acquiredCharmander = Pokemon.inParty("charmander")
|
||||||
if Textbox.isActive() then
|
if Textbox.isActive() then
|
||||||
|
|
Loading…
Reference in New Issue