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
51 lines
1.8 KiB
Lua
51 lines
1.8 KiB
Lua
-- pokered engine/battle/core.asm:2315 (#1901)
|
|
|
|
package.path = "./?.lua;./?/init.lua;" .. package.path
|
|
|
|
local T = require("tests.harness")
|
|
local eq = T.eq
|
|
love = love or require("tests.love_stub")
|
|
|
|
local PartyMenu = require("src.ui.PartyMenu")
|
|
|
|
local game = {
|
|
data = { text = {}, pokemon = { LAPRAS = { name = "LAPRAS" } } },
|
|
save = {
|
|
party = { { species = "LAPRAS", hp = 50, stats = { hp = 50 },
|
|
level = 30, moves = {} } },
|
|
inventory = {}, options = {}, flags = {},
|
|
},
|
|
}
|
|
game.stack = { states = {},
|
|
push = function(self, s) table.insert(self.states, s) end,
|
|
pop = function(self) return table.remove(self.states) end,
|
|
top = function(self) return self.states[#self.states] end }
|
|
|
|
local battle = { playerParty = game.save.party }
|
|
|
|
local function message(opts)
|
|
return PartyMenu.new(game, opts):bottomMessage()
|
|
end
|
|
|
|
eq(message({}), "Choose a POKéMON.",
|
|
"field START -> POKéMON is NORMAL_PARTY_MENU")
|
|
eq(message({ battle = battle }), "Choose a POKéMON.",
|
|
"the voluntary PKMN option is NORMAL_PARTY_MENU too")
|
|
eq(message({ battle = battle, forceSwitch = true }),
|
|
"Bring out which\nPOKéMON?",
|
|
"ChooseNextMon / SHIFT is BATTLE_PARTY_MENU")
|
|
eq(message({ battle = battle, itemUse = true }),
|
|
"Use item on which\nPOKéMON?",
|
|
"in-battle medicine keeps USE_ITEM_PARTY_MENU")
|
|
eq(message({ tmhm = { move = "FIX_CUT", kind = "TM" } }),
|
|
"Use TM on which\nPOKéMON?", "TMHM_PARTY_MENU")
|
|
|
|
game.data.text._PartyMenuNormalText = "CHOOSE A #MON."
|
|
game.data.text._PartyMenuBattleText = "BRING OUT WHICH #MON?"
|
|
eq(message({ battle = battle }), "CHOOSE A #MON.",
|
|
"the voluntary open prints PartyMenuNormalText")
|
|
eq(message({ battle = battle, forceSwitch = true }), "BRING OUT WHICH #MON?",
|
|
"the forced open prints PartyMenuBattleText")
|
|
|
|
T.finish("party_battle_prompt_bug1901")
|