CLOSES #1478, CLOSES #1479, CLOSES #1488, CLOSES #1510, CLOSES #1511, CLOSES #1514, CLOSES #1521, CLOSES #1522, CLOSES #1545, CLOSES #1557, CLOSES #1563, CLOSES #1565, CLOSES #1566, CLOSES #1577, CLOSES #1594, CLOSES #1596, CLOSES #1606, CLOSES #1608

This commit is contained in:
bryanthaboi
2026-08-20 17:30:18 -04:00
parent 0f8f6d0e4f
commit dbecc345e3
53 changed files with 881 additions and 225 deletions
+8 -2
View File
@@ -6017,8 +6017,14 @@ function World:trainerWinLossText()
if not vm then return nil, nil end
local obj = vm.trainerObject or {}
local text = self.text or {}
local winKey = vm.winTextOverride or obj.winText
local lossKey = vm.lossTextOverride or obj.lossText
-- `winlosstext` writes BOTH pointers; a 0 argument destroys the struct
-- value rather than falling back to it (engine/overworld/scripting.asm:651)
local winKey, lossKey
if vm.winLossArmed then
winKey, lossKey = vm.winTextOverride, vm.lossTextOverride
else
winKey, lossKey = obj.winText, obj.lossText
end
return winKey and text[winKey] or nil, lossKey and text[lossKey] or nil
end