mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-18 11:44:42 +02:00
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:
@@ -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".
|
||||
|
||||
Reference in New Issue
Block a user