mirror of
https://github.com/bryanthaboi/gen1recomp
synced 2026-09-26 13:33:27 -04:00
a9ce423bdc
CLOSES #1275, CLOSES #1295, CLOSES #1384, CLOSES #1628, CLOSES #1677, CLOSES #1682, CLOSES #1691, CLOSES #1813, CLOSES #1822, CLOSES #1861, CLOSES #1867, CLOSES #1868, CLOSES #1869, CLOSES #1870, CLOSES #1871, CLOSES #1872, CLOSES #1874, CLOSES #1876, CLOSES #1878, CLOSES #1880, CLOSES #1881, CLOSES #1882, CLOSES #1884, CLOSES #1885, CLOSES #1886, CLOSES #1887, CLOSES #1888, CLOSES #1889, CLOSES #1890, CLOSES #1891, CLOSES #1892, CLOSES #1893, CLOSES #1894, CLOSES #1895, CLOSES #1896, CLOSES #1899, CLOSES #1900, CLOSES #1901
36 lines
1.1 KiB
Lua
36 lines
1.1 KiB
Lua
-- engine/battle/animations.asm:452-473 (#1881)
|
|
package.path = "./?.lua;./?/init.lua;" .. package.path
|
|
|
|
local T = require("tests.modkit")
|
|
local AnimPlayer = require("src.battle.AnimPlayer")
|
|
|
|
local function row(marker)
|
|
return { seq = { { effect = "SE_DARK_SCREEN_FLASH", sound = marker } } }
|
|
end
|
|
|
|
local data = { moveAnims = {
|
|
AMNESIA = row("player_amnesia"),
|
|
REST = row("player_rest"),
|
|
CONF_ANIM = row("enemy_conf"),
|
|
SLP_ANIM = row("enemy_slp"),
|
|
} }
|
|
|
|
local function firstSound(moveId, attackerIsPlayer)
|
|
local p = AnimPlayer.new(data)
|
|
p:start(moveId, attackerIsPlayer)
|
|
for _, ev in ipairs(p.events) do
|
|
if ev.sound then return ev.sound end
|
|
end
|
|
end
|
|
|
|
T.eq(firstSound("AMNESIA", false), "enemy_conf",
|
|
"the foe's Amnesia plays CONF_ANIM, not a coord-flipped AmnesiaAnim")
|
|
T.eq(firstSound("REST", false), "enemy_slp",
|
|
"the foe's Rest plays SLP_ANIM")
|
|
T.eq(firstSound("AMNESIA", true), "player_amnesia",
|
|
"the player's Amnesia keeps its own row")
|
|
T.eq(firstSound("REST", true), "player_rest",
|
|
"the player's Rest keeps its own row")
|
|
T.eq(firstSound("CONF_ANIM", false), "enemy_conf",
|
|
"the status-check ids are untouched")
|