Combat, Initiative & Stealth
Elthoria owns initiative order, round numbers, the current actor, action/resource expenditure, adjudicated combat commands, and hidden-NPC stealth state machines. A tracker is always campaign-scoped and never leaks across campaigns.
TIP
Looking for how the combat rules engine, square geometry, and stealth state machine work? Read Combat, Rules Engine & Stealth Runtime Deep Dive (Developers) or How Combat, Movement & Stealth Work (Game Masters).
Initiative & encounter lifecycle (CombatMcpTools)
| Tool | Purpose |
|---|---|
start_combat | Start a campaign-scoped combat encounter with optional PCs and NPCs |
end_combat | End the active encounter and clear the initiative tracker |
add_combatant | Add exactly one character, NPC, or custom-named combatant |
remove_combatant | Remove a combatant by exactly one of entry ID, entity ID, or name |
roll_initiative | Roll initiative for one combatant (by entry ID, entity ID, or name) |
reroll_initiative | Reroll initiative for all combatants and re-sort turn order |
set_initiative | Set a combatant's initiative explicitly (either total initiative or raw roll) |
list_combatants | List all combatants in sorted initiative order |
get_combat_status | Return active round, turn order, and current acting combatant |
show_initiative_tracker | Read-only display descriptor for the campaign's active initiative tracker |
next_turn / previous_turn | Advance or step back through the turn order (triggers round-advance listeners and timed effect ticks) |
apply_buff / remove_buff / toggle_buff / list_active_buffs | Combat-shortcut buff management |
Combat actions, spells & resource pools (CombatActionMcpTools)
| Tool | Purpose |
|---|---|
recommend_combat_action | Rank legal combat actions using explainable QE (Quadratic-Energy) nested QBAF tactical reasoning (CombatTacticalDecisionService) |
roll_weapon_attack | Roll an attack with a specific equipped weapon including all active bonuses |
roll_damage | Roll damage for a weapon attack (including strength, enhancement, and bonus effects) |
get_attack_bonus_breakdown | Inspect every modifier contributing to an attack roll |
cast_spell | Cast a spell and consume the corresponding spell slot or prepared copy |
use_spell_slot / get_spell_slots_remaining / reset_spell_slots | Track and reset daily spell slots (e.g., on long rest) |
use_resource / restore_resource / get_resource_status / get_all_resource_status | Spend, restore, or inspect class resource pools (ki points, rage rounds, bardic performance, channel energy, etc.) |
reset_resource / reset_all_resources | Reset one or all resource pools after rest |
list_resource_pools / get_resource_pool / create_resource_pool / update_resource_pool / delete_resource_pool | Define and manage custom class resource pools with level progression |
Adjudicated combat commands (GM-only, idempotent)
For strict, receipt-backed tactical adjudication on an activated battle board, use the trusted-local GM combat command pair in CombatMcpTools:
| Tool | Purpose |
|---|---|
get_combat_command_state | Read persisted trusted-local GM combat command state with explicit campaign/tracker IDs (not player-safe) |
execute_combat_command | Execute an explicit adjudicated combat command with idempotency receipts: HP adjustments, prepared-spell expenditure, single-strike adjudicate_npc_melee, and rules-checked ground movement (adjudicate_npc_move, adjudicate_pc_move) |
WARNING
GM-only visibility & movement boundaries. get_combat_command_state and execute_combat_command are not player-safe — never dump raw GM tactical snapshots directly into player-facing panels. For ordinary ground movement on a tactical board, configure movement first via apply_tactical_board_command (configure-movement with square-single-cell-ground.v1 or .v2), then execute legal combat moves via execute_combat_command (adjudicate_npc_move / adjudicate_pc_move). Board-editor moves via apply_tactical_board_command are GM placement edits, not legal combat movement.
AI Stealth NPC runtime (StealthNpcMcpTools)
Elthoria includes a dedicated Pathfinder 1e stealth state machine (elthoria-gameplay-runtime — StealthRuntime, SquarePerceptionGeometry) so hidden foes can stalk the party without the GM leaking their location in prose:
| Tool | Purpose |
|---|---|
initialize_stealth_npc | Initialize an AI-controlled stealthed NPC for a campaign and generate its opening queued plan |
plan_stealth_moves | Queue additional tactical stealth moves (queued only — nothing executes yet) |
execute_stealth_move | Execute the next queued move and apply Pathfinder 1e stealth posture effects |
get_stealth_npc | Inspect a stealthed NPC's persisted visibility (hidden, visible, invisible, greater_invis), active Stealth check result, and queued moves |
set_stealth_visibility | Update physical visibility or trigger rehide: true |
stealth_perception_check | Run a character's Perception check against the NPC's active Stealth result using square perception geometry |
dismiss_stealth_npc | Cleanly remove the NPC's stealth state when combat ends or the NPC withdraws |
Related MCP resources & prompts
- Resources:
combat://current,combat://encounters - Prompts:
combat_tactics,describe_attack,describe_spell,run_combat_encounter,generate_encounter,generate_treasure
Follow Walkthrough 2: Tactical Combat, Initiative & Stealth for a complete multi-round encounter from board activation to stealthed ambush and combat teardown.