fix(game3): add partial_trap_name helper and include search path in lint.sh

This commit is contained in:
1jamie
2026-09-19 01:37:32 -05:00
parent aed3bbced7
commit 18a30b83f0
2 changed files with 8 additions and 2 deletions
+2
View File
@@ -24,6 +24,8 @@ if [ "${1:-}" = "--gate" ]; then
shift
fi
export PATH="$(pwd)/node_modules/.bin:${HOME:-}/.luarocks/bin:$PATH"
if ! command -v luacheck >/dev/null 2>&1; then
echo "luacheck not found on PATH (install: luarocks install luacheck)" >&2
exit 2
+6 -2
View File
@@ -148,8 +148,12 @@ function Rules.partialTrap.rollTurns(rng)
return (math.floor(n) % 4) + 3
end
function Rules.partialTrap.active()
return Capabilities.gen3PartialTrap
local function partial_trap_name(moveId)
local ok, Moves = pcall(require, "src.core.game3.battle.moves")
if ok and Moves and Moves.displayName then
return Moves.displayName(moveId)
end
return tostring(moveId or "the attack")
end
-- pokefirered/src/battle_message.c:1263