载入中...
搜索中...
未找到
TacticsTypes.h
浏览该文件的文档.
Strong identity values shared by persistence, content and logical-name APIs.
Move-only, checked operation results for the common layer.
Monotonic state revision for concurrency and change checks.
Stable reference to a runtime gameplay subject.
Common time values and an injectable deterministic simulation clock.
Human-readable, scoped identifier in the form namespace:name.
Definition Identity.h:411
static constexpr StrongUint64 zero() noexcept
Returns the zero value for this strong type.
Definition StrongUint64.h:24
Battle short-root and authoritative owner of board and turn state.
Definition TacticsTypes.h:444
Authoritative board facts and occupancy indexes for one battle.
Definition TacticsTypes.h:155
BoardState()=default
Construct an empty board with square-four topology.
void setTopology(BoardTopology topology) noexcept
Change topology while retaining existing cell facts.
Definition TacticsTypes.h:163
Definition Interaction.cpp:13
constexpr std::string_view kInitiativePolicyId
Stable id of the built-in per-unit initiative turn policy.
Definition TacticsTypes.h:66
@ Completed
constexpr std::string_view kSideAlternatingPolicyId
Stable id of the built-in side-alternating turn policy.
Definition TacticsTypes.h:64
constexpr std::string_view kChargeTimeBattlePolicyId
Stable id of the built-in charge-time (CTB/ATB) turn policy.
Definition TacticsTypes.h:74
@ Running
std::string_view statusName(BattleStatus status) noexcept
Return the stable protocol spelling of a battle status.
Definition TacticsTypes.cpp:215
constexpr int kChargeTimeBattleThreshold
Charge a unit must accumulate before it may activate under CTB scheduling.
Definition TacticsTypes.h:82
BattleCommandKind
Accepted deterministic command kinds recorded for replay.
Definition TacticsTypes.h:356
@ RollRandom
@ AcceptReaction
@ DeclineReaction
@ OpenReaction
@ UseAbility
Declare a unit ability activation against a target cell.
@ DefeatUnit
@ OccupyCells
@ SurviveRounds
@ EliminateSide
std::string_view commandKindName(BattleCommandKind kind) noexcept
Return the stable protocol spelling of an accepted command kind.
Definition TacticsTypes.cpp:224
@ BattleStart
@ RoundEnd
@ Reaction
@ TurnStart
@ TurnEnd
@ RoundStart
@ BattleEnd
constexpr std::size_t kMaxAbilityPayloadBytes
Upper bound on the opaque ability payload a declaration may carry.
Definition TacticsTypes.h:353
std::string_view phaseName(BattlePhase phase) noexcept
Return the stable protocol spelling of a battle phase.
Definition TacticsTypes.cpp:200
@ Square4
@ Square8
@ ExplicitGraph
@ HexAxial
One accepted replay command using only persistent identities and values.
Definition TacticsTypes.h:386
SubjectRef targetUnit
The unit this command targeted, when the command targets one.
Definition TacticsTypes.h:401
std::string payload
Opaque caller-owned effect parameters, as declared by the caller.
Definition TacticsTypes.h:411
std::vector< ReactionCandidate > candidates
Definition TacticsTypes.h:416
Revision resultingRevision
Definition TacticsTypes.h:390
std::uint64_t triggerSequence
Definition TacticsTypes.h:414
One deterministic battle lifecycle event owned by Battle.
Definition TacticsTypes.h:312
std::uint64_t correlationCommand
Definition TacticsTypes.h:315
std::uint64_t causationCommand
Definition TacticsTypes.h:314
Accepted external commands in deterministic sequence order.
Definition TacticsTypes.h:504
std::vector< BattleCommand > values
Definition TacticsTypes.h:506
Transient deterministic event projection; not a second state authority.
Definition TacticsTypes.h:493
Cold, persistent and authoritative battle identity.
Definition TacticsTypes.h:453
Authoritative objective definitions and completion state.
Definition TacticsTypes.h:509
std::vector< ObjectiveState > values
Definition TacticsTypes.h:510
One named deterministic random stream's serializable state.
Definition TacticsTypes.h:513
std::uint64_t rollIndex
Definition TacticsTypes.h:515
Battle-owned named random streams; previews never mutate this component.
Definition TacticsTypes.h:518
std::map< std::string, RandomStreamState > streams
Definition TacticsTypes.h:519
Authoritative transient reaction stack and root-chain cycle guard.
Definition TacticsTypes.h:498
std::vector< ReactionWindow > stack
Definition TacticsTypes.h:500
Authoritative deterministic lifecycle and scheduling state.
Definition TacticsTypes.h:463
std::vector< ecs::EntityHandle > units
Every unit of this battle, as declared by newUnit.
Definition TacticsTypes.h:480
std::vector< ecs::EntityHandle > schedule
The current round's activation queue, in activation order.
Definition TacticsTypes.h:490
std::vector< ecs::EntityHandle > sides
Definition TacticsTypes.h:473
std::optional< ecs::EntityHandle > activeUnit
Definition TacticsTypes.h:472
std::optional< ecs::EntityHandle > activeSide
Definition TacticsTypes.h:471
Owning persistent board record used by snapshots and replay inspection.
Definition TacticsTypes.h:125
std::optional< SubjectRef > occupant
Definition TacticsTypes.h:128
Owning persistent edge record used by snapshots and replay inspection.
Definition TacticsTypes.h:132
Logical board coordinate independent of rendering projection.
Definition TacticsTypes.h:30
friend bool operator==(const Cell &, const Cell &) noexcept=default
Operator ==.
friend auto operator<=>(const Cell &left, const Cell &right) noexcept
Operator <=>.
Definition TacticsTypes.h:38
One authoritative directed edge fact between two adjacent cells.
Definition TacticsTypes.h:115
int extraCost
Additional cost charged only when crossing this direction.
Definition TacticsTypes.h:119
std::vector< std::string > tags
Stable tags for game rules (for example door, one_way).
Definition TacticsTypes.h:121
Persistent objective definition using stable side identities.
Definition TacticsTypes.h:426
std::vector< Cell > requiredCells
Definition TacticsTypes.h:432
Mutable objective projection and completion revision.
Definition TacticsTypes.h:437
Revision completedRevision
Definition TacticsTypes.h:440
One eligible deterministic reaction choice.
Definition TacticsTypes.h:324
Accepted reaction identity and remaining resource snapshot.
Definition TacticsTypes.h:339
int remainingReactionPoints
Definition TacticsTypes.h:343
std::uint64_t triggerSequence
Definition TacticsTypes.h:340
One open reaction window on the battle-owned LIFO stack.
Definition TacticsTypes.h:332
std::uint64_t triggerSequence
Definition TacticsTypes.h:333
std::vector< ReactionCandidate > candidates
Definition TacticsTypes.h:335
Cold, persistent and authoritative identity component.
Definition TacticsTypes.h:248
std::string displayName
Definition TacticsTypes.h:251
Cold, persistent and authoritative identity component.
Definition TacticsTypes.h:267
Linked battle and side identities; both are generation checked on use.
Definition TacticsTypes.h:273
Hot authoritative tactical position and facing.
Definition TacticsTypes.h:278
Hot authoritative per-turn resources.
Definition TacticsTypes.h:284
int roundReactionPoints
Definition TacticsTypes.h:290
int roundMovePoints
Definition TacticsTypes.h:289
int actionPoints
Definition TacticsTypes.h:285
int roundActionPoints
Definition TacticsTypes.h:288
int reactionPoints
Definition TacticsTypes.h:287
Typed spelling of the built-in turn-policy ids.
Definition TacticsTypes.h:92
static constexpr std::string_view ChargeTimeBattle
Definition TacticsTypes.h:95
static constexpr std::string_view SideAlternating
Definition TacticsTypes.h:93
static constexpr std::string_view Initiative
Definition TacticsTypes.h:94
Initial and per-round tactical resource values for one unit.
Definition TacticsTypes.h:139
Result< void > validate() const
Validate non-negative consumable resource values.
Definition TacticsTypes.cpp:194