diff --git a/ai/control.lua b/ai/control.lua index 29c2cd0..c21f03e 100644 --- a/ai/control.lua +++ b/ai/control.lua @@ -336,7 +336,7 @@ function Control.encounter(battleState) local zubatCount = Data.increment("encounters_zubat") Data.run.encounters_zubat = zubatCount if STREAMING_MODE then - Bridge.chat(Utils.multiplyString("NightBat", zubatCount)) + Bridge.chat(Utils.multiplyString("NightBat", zubatCount), true) end elseif opponent == "rattata" then Data.run.encounters_rattata = Data.increment("encounters_rattata") diff --git a/ai/red/strategies.lua b/ai/red/strategies.lua index 9893a47..797c1a0 100644 --- a/ai/red/strategies.lua +++ b/ai/red/strategies.lua @@ -421,7 +421,7 @@ strategyFunctions.catchNidoran = function() Bridge.caught("nidoran") status.canProgress = true if not gotExperience then - Bridge.chat("is waiting in the grass for a suitable encounter for experience.", Pokemon.getExp()) + Bridge.chat("is waiting in the grass for a suitable encounter for experience.") end end if gotExperience then @@ -1040,7 +1040,7 @@ strategyFunctions.potionBeforeMisty = function(data) message = "is limiting heals to attempt to get closer to red-bar off Misty..." end if message then - Bridge.chat(message, potionCount) + Bridge.chat(message, false, potionCount) end end return strategyFunctions.potion({hp=healAmount, chain=data.chain}) @@ -1241,7 +1241,7 @@ strategyFunctions.potionBeforeSurge = function() if Control.yolo then local curr_hp = Combat.hp() if curr_hp > yoloHp and curr_hp <= 21 then - Bridge.chat("is attempting to keep red-bar through Surge", curr_hp) + Bridge.chat("is attempting to keep red-bar through Surge") return true end end @@ -1449,7 +1449,7 @@ strategyFunctions.silphRival = function() if Strategies.initialize() then if Control.yolo then status.gyaradosDamage = Combat.healthFor("RivalGyarados") - Bridge.chat("is attempting to red-bar off Silph Rival. Get ready to spaghetti!", status.gyaradosDamage.." "..Combat.redHP()) + Bridge.chat("is attempting to red-bar off Silph Rival. Get ready to spaghetti!") end end diff --git a/ai/strategies.lua b/ai/strategies.lua index db8d4cb..915fe1b 100644 --- a/ai/strategies.lua +++ b/ai/strategies.lua @@ -51,7 +51,7 @@ function Strategies.hardReset(reason, message, extra, wait) local map, px, py = Memory.value("game", "map"), Player.position() Data.reset(reason, Control.areaName, map, px, py) - Bridge.chat(message, extra) + Bridge.chat(message, false, extra) if wait and INTERNAL and not STREAMING_MODE then strategyFunctions.wait() else @@ -462,7 +462,7 @@ function Strategies.completeCans() prefix = "Reset me now" suffix = " BibleThump" end - Bridge.chat(" "..prefix..", "..status.tries.." try Trashcans"..suffix, Utils.elapsedTime()) + Bridge.chat(" "..prefix..", "..status.tries.." try Trashcans"..suffix) return true end local completePath = { diff --git a/util/bridge.lua b/util/bridge.lua index 8f44eb1..7455d77 100644 --- a/util/bridge.lua +++ b/util/bridge.lua @@ -65,11 +65,13 @@ function Bridge.pollForName() send("poll_name") end -function Bridge.chat(message, extra, newLine) - if extra then - p(message.." || "..extra, newLine) - else - p(message, newLine) +function Bridge.chat(message, suppressed, extra, newLine) + if not suppressed then + if extra then + p(message.." || "..extra, newLine) + else + p(message, newLine) + end end return send("msg", message) end