feat(rules): add the surprise round

SRD Surprise: when some but not all combatants are aware of their
opponents, a surprise round precedes round 1. Aware combatants take a
single standard OR move action plus free actions (swift and full-round
are dropped, full_attack collapses to one standard attack, withdraw
survives as the Restricted Withdraw standard); unaware combatants skip
their turn. New Combatant.aware flag (default true, parsed at the JSON
boundary) keeps every existing encounter bit-identical, exposed in the
observation snapshot. Unaware combatants are not flagged flat-footed
(documented simplification).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-09-13 13:20:37 +02:00
parent 7a8351e3b2
commit 3cc0502228
5 changed files with 301 additions and 6 deletions
+5
View File
@@ -309,3 +309,8 @@ class Combatant(_FrozenModel):
spell_resistance: int = 0
resistances: dict[str, int] = Field(default_factory=dict)
immunities: tuple[str, ...] = ()
# PF1e (SRD "Surprise"): "If some but not all of the combatants are aware
# of their opponents, a surprise round happens before regular rounds
# begin." Unaware combatants do not act in the surprise round. Default
# True keeps every existing encounter on a full first round.
aware: bool = True