mirror of
https://github.com/bryanthaboi/gen1recomp
synced 2026-09-28 23:00:21 -04:00
fix(game3): add partial_trap_name helper and include search path in lint.sh
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user