CLOSES #1181, CLOSES #1212, CLOSES #1214, CLOSES #1224, CLOSES #1230, CLOSES #1249, CLOSES #1271, CLOSES #1272, CLOSES #1273, CLOSES #1298, CLOSES #1305, CLOSES #1307, CLOSES #1318, CLOSES #1328, CLOSES #1330, CLOSES #1331, CLOSES #1333, CLOSES #1334, CLOSES #1335, CLOSES #1340, CLOSES #1345, CLOSES #1346, CLOSES #1360, CLOSES #1362 (#1395)

* CLOSES #1181, CLOSES #1212, CLOSES #1214, CLOSES #1224, CLOSES #1230, CLOSES #1249, CLOSES #1271, CLOSES #1272, CLOSES #1273, CLOSES #1298, CLOSES #1305, CLOSES #1307, CLOSES #1318, CLOSES #1328, CLOSES #1330, CLOSES #1331, CLOSES #1333, CLOSES #1334, CLOSES #1335, CLOSES #1340, CLOSES #1345, CLOSES #1346, CLOSES #1360, CLOSES #1362

* conv
This commit is contained in:
bryanthaboi
2026-08-16 06:55:09 -04:00
committed by GitHub
parent a34d8611bf
commit 5f2b2c616e
143 changed files with 2556 additions and 44967 deletions
+24
View File
@@ -257,6 +257,30 @@ do
eq(set[173], true, "the hidden item's flag is set by number")
end
-- engine/events/poisonstep.asm .PlayPoisonSFX: SFX_POISON then
-- LoadPoisonBGPals, four frames (#1362)
do
local World = require("src.world.gen2.World")
local ctx = { poisonBGFlash = World.poisonBGFlash,
playSfxNamed = function() end }
eq(CallAsm.run(ctx, "PlayPoisonSFX"), nil, "PlayPoisonSFX writes no wScriptVar")
eq(ctx.poisonFlash, 4, "and sets the flash to exactly four frames")
local hurt = { game = { save = { party = { { hp = 5, status = "psn" } },
poisonStepCount = 3 } },
poisonBGFlash = World.poisonBGFlash, playSfxNamed = function() end,
stepContext = function() return { linkMode = false } end }
World.countStep(hurt)
eq(hurt.poisonFlash, 4, "the hurt arm reaches it too")
local faint = { poisonBGFlash = World.poisonBGFlash, playSfxNamed = function() end }
World.poisonFaintScript(faint, { fainted = {}, whiteout = false })
eq(faint.poisonFlash, 4, "and so does the faint arm")
local ok = pcall(CallAsm.run, {}, "PlayPoisonSFX")
check(ok, "a ctx with no poisonBGFlash does not error")
end
-- engine/events/poisonstep.asm .CheckWhitedOut ends on
-- CheckPlayerPartyForFitMon, whose answer is 1 when something can still fight;
-- the `iffalse .whiteout` after it is reading "no fit mon".