载入中...
搜索中...
未找到
eve::tactics 命名空间参考

类

struct  AbilityReceipt
 One declared ability activation and the resource state it left behind. 更多...
 
struct  AbilitySettlementRequest
 Owning values required to settle one previously declared tactical ability. 更多...
 
class  Battle
 Battle short-root and authoritative owner of board and turn state. 更多...
 
struct  BattleCommand
 One accepted replay command using only persistent identities and values. 更多...
 
struct  BattleEvent
 One deterministic battle lifecycle event owned by Battle. 更多...
 
class  BattleReplay
 Replays accepted commands against an identity-compatible starting battle. 更多...
 
class  BattleSystem
 Stateless systems over the tactics short-root ECS family. 更多...
 
struct  BoardCellRecord
 Owning persistent board record used by snapshots and replay inspection. 更多...
 
struct  BoardEdgeRecord
 Owning persistent edge record used by snapshots and replay inspection. 更多...
 
class  BoardState
 Authoritative board facts and occupancy indexes for one battle. 更多...
 
struct  Cell
 Logical board coordinate independent of rendering projection. 更多...
 
struct  CellState
 One authoritative board cell fact. 更多...
 
struct  ChargeModel
 The charge rule a policy declares for round scheduling. 更多...
 
struct  EdgeState
 One authoritative directed edge fact between two adjacent cells. 更多...
 
class  GridCoverPolicy
 The built-in cover policy: blockers adjacent to the target, prioritising the line. 更多...
 
class  GridLineOfSightPolicy
 The built-in grid policy: a straight-line trace over the board's own topology. 更多...
 
class  ICoverPolicy
 Answers "how much cover does @p target have against @p attacker". 更多...
 
class  ILineOfSightPolicy
 Answers "can @p from see @p to" for one board. 更多...
 
struct  InteractionContext
 Immutable projection of everything the interaction machine is allowed to know. 更多...
 
struct  InteractionIntent
 One player intention, expressed with stable identities only. 更多...
 
class  InteractionSession
 A disposable, non-authoritative interaction session. 更多...
 
class  ITurnPolicy
 One deterministic unit-activation ordering strategy. 更多...
 
struct  MoveReceipt
 Committed tactical movement and remaining resource state. 更多...
 
struct  ObjectiveSpec
 Persistent objective definition using stable side identities. 更多...
 
struct  ObjectiveState
 Mutable objective projection and completion revision. 更多...
 
class  PathQuery
 Pure deterministic board path algorithms. 更多...
 
struct  PresentationCommand
 One intent together with the way to take it back. 更多...
 
struct  PresentationFrame
 What the projector knows about the battle beyond the event itself. 更多...
 
struct  PresentationIntent
 One presentation instruction: what to show, where, and until when. 更多...
 
class  PresentationProjector
 Projects authoritative events into bounded, revertible presentation intents. 更多...
 
struct  PresentationRevert
 The explicit undo contract for one intent. 更多...
 
class  Reachability
 Owning result of one deterministic reachability query. 更多...
 
struct  ReachableCell
 One reachable cell and its minimum fixed-point movement cost. 更多...
 
struct  ReactionCandidate
 One eligible deterministic reaction choice. 更多...
 
struct  ReactionReceipt
 Accepted reaction identity and remaining resource snapshot. 更多...
 
struct  ReactionWindow
 One open reaction window on the battle-owned LIFO stack. 更多...
 
class  TacticalSide
 Tactical side short-root entity. 更多...
 
class  TacticalUnit
 Tactical unit short-root entity. 更多...
 
class  Tactics
 Owns tactics short-root entities and coordinates checked battle setup. 更多...
 
class  TacticsActionExecutor
 Active-effect provider that commits move, face and wait through ActionRuntime. 更多...
 
struct  TacticsBattleSession
 Module-owned script session referencing one battle aggregate. 更多...
 
struct  TacticsBattleSessionTag
 Owner tag for script-visible battle-session handles. 更多...
 
class  TacticsLineOfSightAdapter
 Answers grid line-of-sight queries from the bound tactics battle. 更多...
 
class  TacticsPersistence
 Stateless codec for the authoritative state of one battle. 更多...
 
class  TacticsSettlementRuntime
 Owner-thread settlement bridge between tactics declarations and game-owned combat state. 更多...
 
struct  TurnPolicyKind
 Typed spelling of the built-in turn-policy ids. 更多...
 
class  TurnPolicyRegistry
 Registry of turn policies keyed by stable id. 更多...
 
struct  TurnResourceSpec
 Initial and per-round tactical resource values for one unit. 更多...
 
struct  UnitOrder
 The scheduling projection a policy is allowed to compare. 更多...
 

类型定义

using TacticsBattleSessionRef = script::RuntimeHandleRef< TacticsBattleSessionTag >
 Generation- and module-epoch-qualified battle-session reference.
 
using MoveActionExecutor = TacticsActionExecutor
 Compatibility spelling retained for the original movement-only adapter name.
 

枚举

enum class  InteractionState : std::uint8_t {
  Blocked , AwaitSelection , UnitSelected , Targeting ,
  Resolving , Ended
}
 Where the interaction machine is, as far as the player is concerned. 更多...
 
enum class  InteractionIntentKind : std::uint8_t {
  None , SelectUnit , MoveTo , UseAbilityOn ,
  Cancel , Confirm , EndTurn
}
 What the player asked for. A value, not a mutation. 更多...
 
enum class  CoverLevel : std::uint8_t { None , Half , Full }
 How much protection a cell gives against an attacker. 更多...
 
enum class  UnitVisualState : std::uint8_t {
  Idle , Friendly , Selected , Finished ,
  Targetable , Attacking , Defending , Moving ,
  Destroyed
}
 How a consumer should draw one unit. 更多...
 
enum class  PresentationRevertTrigger : std::uint8_t { Never , OnExpiry , OnNextTurn , OnRoundStart }
 What makes a presentation intent stop being true. 更多...
 
enum class  CellRangeMetric : std::uint8_t { Manhattan , Chebyshev , Hex }
 Deterministic logical distance used by cellsInRange. 更多...
 
enum class  BoardTopology : std::uint8_t { Square4 , Square8 , HexAxial , ExplicitGraph }
 Supported deterministic board-neighbour topologies. 更多...
 
enum class  BattleStatus : std::uint8_t { Setup , Running , Ended }
 Tactical battle lifecycle. 更多...
 
enum class  BattlePhase : std::uint8_t {
  Setup , BattleStart , RoundStart , TurnStart ,
  Acting , Reaction , TurnEnd , RoundEnd ,
  BattleEnd
}
 Explicit, externally observable battle phase. 更多...
 
enum class  BattleCommandKind : std::uint8_t {
  Start , Advance , Move , Face ,
  Wait , EndTurn , Finish , OpenReaction ,
  AcceptReaction , DeclineReaction , DefeatUnit , RollRandom ,
  UseAbility
}
 Accepted deterministic command kinds recorded for replay. 更多...
 
enum class  ObjectiveKind : std::uint8_t { EliminateSide , SurviveRounds , OccupyCells }
 Built-in deterministic objective rules. 更多...
 
enum class  ObjectiveStatus : std::uint8_t { Pending , Completed }
 Objective lifecycle owned by its battle. 更多...
 
enum class  TurnOrder : std::uint8_t { LeftFirst , RightFirst , Equivalent }
 The total order a policy reports for one pair of units. 更多...
 

函数

std::string_view interactionStateName (InteractionState state) noexcept
 Human-readable stable spelling of an interaction state (protocol text).
 
std::string_view interactionIntentKindName (InteractionIntentKind kind) noexcept
 Human-readable stable spelling of an intent kind (protocol text).
 
std::string_view coverLevelName (CoverLevel level) noexcept
 Stable protocol spelling of a cover level.
 
std::shared_ptr< ILineOfSightPolicy > gridLineOfSightPolicy ()
 The process-wide built-in line-of-sight policy.
 
std::shared_ptr< ICoverPolicy > gridCoverPolicy ()
 The process-wide built-in cover policy (same ownership remarks as above).
 
Result< std::vector< Cell > > visibleCellsInRange (const BoardState &board, const ILineOfSightPolicy &policy, Cell origin, int minimum, int maximum, CellRangeMetric metric)
 Cells within a metric range of origin that policy can actually see.
 
std::string_view unitVisualStateName (UnitVisualState state) noexcept
 Human-readable stable spelling of a visual state (protocol text).
 
std::string_view presentationRevertTriggerName (PresentationRevertTrigger trigger) noexcept
 Human-readable stable spelling of a revert trigger (protocol text).
 
 Module_IMPL (Tactics, new Tactics())
 
action::ActionDefinition moveActionDefinition ()
 Build the canonical zero-duration tactics move action definition.
 
action::ActionDefinition faceActionDefinition ()
 Build the canonical zero-duration tactics facing action definition.
 
action::ActionDefinition waitActionDefinition ()
 Build the canonical zero-duration tactics wait action definition.
 
Result< action::ActionRequest > makeMoveRequest (ecs::EntityHandle unit, Cell destination, SimulationTick tick)
 Build a checked move request using canonical integer cell parameters.
 
Result< action::ActionRequest > makeFaceRequest (ecs::EntityHandle unit, int facing, SimulationTick tick)
 Build a checked facing request with optimistic battle revision.
 
Result< action::ActionRequest > makeWaitRequest (ecs::EntityHandle unit, SimulationTick tick)
 Build a checked wait request with optimistic battle revision.
 
Result< AbilityReceipt > validateAbility (Battle &battle, SubjectRef actor, const LogicalId &action, Cell targetCell, SubjectRef targetUnit, std::string_view payload)
 Validate one ability declaration without mutating anything.
 
TacticsLineOfSightAdapter & tacticsLineOfSightAdapter ()
 The process-wide adapter instance the capability answers with.
 
Result< void > registerTacticsLineOfSightProvider ()
 Claim the grid coordinate spaces for the tactics adapter.
 
Result< settlement::SettlementRequest > makeSettlementRequest (const AbilitySettlementRequest &request)
 Validate and project a committed tactical ability into the canonical settlement request.
 
std::string_view phaseName (BattlePhase phase) noexcept
 Return the stable protocol spelling of a battle phase.
 
std::string_view statusName (BattleStatus status) noexcept
 Return the stable protocol spelling of a battle status.
 
std::string_view commandKindName (BattleCommandKind kind) noexcept
 Return the stable protocol spelling of an accepted command kind.
 

变量

constexpr std::string_view kSightBlockerTag = "sight_blocker"
 Cell tag that makes a cell block line of sight.
 
constexpr std::string_view kSideAlternatingPolicyId = "side_alternating"
 Stable id of the built-in side-alternating turn policy.
 
constexpr std::string_view kInitiativePolicyId = "initiative"
 Stable id of the built-in per-unit initiative turn policy.
 
constexpr std::string_view kChargeTimeBattlePolicyId = "charge_time_battle"
 Stable id of the built-in charge-time (CTB/ATB) turn policy.
 
constexpr int kChargeTimeBattleThreshold = 100
 Charge a unit must accumulate before it may activate under CTB scheduling.
 
constexpr std::size_t kMaxAbilityPayloadBytes = 4096
 Upper bound on the opaque ability payload a declaration may carry.
 

类型定义说明

◆ MoveActionExecutor

Compatibility spelling retained for the original movement-only adapter name.

在文件 TacticsAction.h 第 38 行定义.

◆ TacticsBattleSessionRef

Generation- and module-epoch-qualified battle-session reference.

在文件 Tactics.h 第 25 行定义.

枚举类型说明

◆ BattleCommandKind

enum class eve::tactics::BattleCommandKind : std::uint8_t
strong

Accepted deterministic command kinds recorded for replay.

枚举值
Start 
Advance 
Move 
Face 
Wait 
EndTurn 
Finish 
OpenReaction 
AcceptReaction 
DeclineReaction 
DefeatUnit 
RollRandom 
UseAbility 

Declare a unit ability activation against a target cell.

Appended last on purpose: the numeric value is persisted in the command log, so inserting a kind anywhere else would renumber every later kind and silently reinterpret existing payloads. Its legal range is version-gated (schema v4), not widened unconditionally.

在文件 TacticsTypes.h 第 356 行定义.

◆ BattlePhase

enum class eve::tactics::BattlePhase : std::uint8_t
strong

Explicit, externally observable battle phase.

枚举值
Setup 
BattleStart 
RoundStart 
TurnStart 
Acting 
Reaction 
TurnEnd 
RoundEnd 
BattleEnd 

在文件 TacticsTypes.h 第 51 行定义.

◆ BattleStatus

enum class eve::tactics::BattleStatus : std::uint8_t
strong

Tactical battle lifecycle.

枚举值
Setup 
Running 
Ended 

在文件 TacticsTypes.h 第 48 行定义.

◆ BoardTopology

enum class eve::tactics::BoardTopology : std::uint8_t
strong

Supported deterministic board-neighbour topologies.

枚举值
Square4 
Square8 
HexAxial 
ExplicitGraph 

在文件 TacticsTypes.h 第 45 行定义.

◆ CellRangeMetric

enum class eve::tactics::CellRangeMetric : std::uint8_t
strong

Deterministic logical distance used by cellsInRange.

枚举值
Manhattan 
Chebyshev 
Hex 

在文件 TacticsPath.h 第 15 行定义.

◆ CoverLevel

enum class eve::tactics::CoverLevel : std::uint8_t
strong

How much protection a cell gives against an attacker.

枚举值
None 

No protection.

Half 

Partial protection: an adjacent blocker, but not on the incoming line.

Full 

Full protection: a blocker sits between the attacker and the target.

在文件 LineOfSight.h 第 42 行定义.

◆ InteractionIntentKind

enum class eve::tactics::InteractionIntentKind : std::uint8_t
strong

What the player asked for. A value, not a mutation.

枚举值
None 

Nothing to do: the click landed somewhere with no meaning in this state.

SelectUnit 

Focus the controlled unit.

MoveTo 

Move the controlled unit onto InteractionIntent::cell.

UseAbilityOn 

Declare InteractionIntent::action against cell and optional unit.

Cancel 

Armed ability/selection should be dropped.

Confirm 

Submit whatever intent is pending.

EndTurn 

End the controlled unit's activation.

在文件 Interaction.h 第 45 行定义.

◆ InteractionState

enum class eve::tactics::InteractionState : std::uint8_t
strong

Where the interaction machine is, as far as the player is concerned.

枚举值
Blocked 

Not this controller's turn, or the battle is not accepting input at all.

AwaitSelection 

Nothing selected yet; a click picks a destination or the active unit.

UnitSelected 

The controlled unit is selected; the next click acts on a cell.

Targeting 

An ability is armed; the next click picks its target.

Resolving 

The caller has an uncommitted intent and must commit or cancel it.

Ended 

The battle is over; only inspection remains.

在文件 Interaction.h 第 29 行定义.

◆ ObjectiveKind

enum class eve::tactics::ObjectiveKind : std::uint8_t
strong

Built-in deterministic objective rules.

枚举值
EliminateSide 
SurviveRounds 
OccupyCells 

在文件 TacticsTypes.h 第 420 行定义.

◆ ObjectiveStatus

enum class eve::tactics::ObjectiveStatus : std::uint8_t
strong

Objective lifecycle owned by its battle.

枚举值
Pending 
Completed 

在文件 TacticsTypes.h 第 423 行定义.

◆ PresentationRevertTrigger

enum class eve::tactics::PresentationRevertTrigger : std::uint8_t
strong

What makes a presentation intent stop being true.

This is the part a view-object API cannot express, and the reason stale highlights exist.

枚举值
Never 

Durable state (defeat, end of round): never taken back.

OnExpiry 

Clear when expiresAtTick has passed.

OnNextTurn 

Clear when any unit's next turn starts.

OnRoundStart 

Clear at the next round boundary.

在文件 Presentation.h 第 62 行定义.

◆ TurnOrder

enum class eve::tactics::TurnOrder : std::uint8_t
strong

The total order a policy reports for one pair of units.

This is a named three-valued result rather than a bool on purpose: "equivalent" is a real outcome with real meaning (the caller then applies the canonical subject tie-break), and a bool cannot express it without an out-of-band convention that every reader has to know.

枚举值
LeftFirst 

The left unit acts first.

RightFirst 

The right unit acts first.

Equivalent 

Both compare equal; the caller decides by canonical order.

在文件 TurnPolicy.h 第 83 行定义.

◆ UnitVisualState

enum class eve::tactics::UnitVisualState : std::uint8_t
strong

How a consumer should draw one unit.

The set is deliberately small and player-facing: it is the vocabulary a UI needs, not a description of the model. Idle is the resting state every transient state returns to.

枚举值
Idle 

Resting, nothing special.

Friendly 

Controlled by the viewing session.

Selected 

Currently selected or acting.

Finished 

Already finished this round.

Targetable 

A legal target for the armed ability.

Attacking 

Currently declaring an ability.

Defending 

Reacting to an incoming effect.

Moving 

In transit between cells.

Destroyed 

Defeated; terminal.

在文件 Presentation.h 第 36 行定义.

函数说明

◆ commandKindName()

std::string_view eve::tactics::commandKindName ( BattleCommandKind  kind)
noexcept

Return the stable protocol spelling of an accepted command kind.

The command log is persisted and replayed, so its kind spelling is protocol: scripts, diagnostics and tests branch on these strings, never on the numeric enum value, which is free to change with the schema version.

在文件 TacticsTypes.cpp 第 224 行定义.

引用了 commandKindName() , 以及 kind.

被这些函数引用 commandKindName().

◆ coverLevelName()

EVENGINE_API_DOMAINS std::string_view eve::tactics::coverLevelName ( CoverLevel  level)
noexcept

Stable protocol spelling of a cover level.

在文件 LineOfSight.cpp 第 122 行定义.

引用了 Full, Half, level , 以及 None.

◆ faceActionDefinition()

EVENGINE_API_DOMAINS action::ActionDefinition eve::tactics::faceActionDefinition ( )

Build the canonical zero-duration tactics facing action definition.

在文件 TacticsAction.cpp 第 191 行定义.

引用了 eve::LogicalId::parse().

◆ gridCoverPolicy()

EVENGINE_API_DOMAINS std::shared_ptr< ICoverPolicy > eve::tactics::gridCoverPolicy ( )

The process-wide built-in cover policy (same ownership remarks as above).

在文件 LineOfSight.cpp 第 187 行定义.

◆ gridLineOfSightPolicy()

EVENGINE_API_DOMAINS std::shared_ptr< ILineOfSightPolicy > eve::tactics::gridLineOfSightPolicy ( )

The process-wide built-in line-of-sight policy.

返回
A shared handle to an immutable object. The pointer type is deliberately non-const because that is what eve::cap::provide registers, and every method on the interface is const, so the handle grants no way to change behaviour.

在文件 LineOfSight.cpp 第 182 行定义.

被这些函数引用 eve::tactics::Tactics::lineOfSightAlgorithm(), eve::tactics::TacticsLineOfSightAdapter::query() , 以及 eve::tactics::Tactics::visibleCellsInRange().

◆ interactionIntentKindName()

EVENGINE_API_DOMAINS std::string_view eve::tactics::interactionIntentKindName ( InteractionIntentKind  kind)
noexcept

Human-readable stable spelling of an intent kind (protocol text).

在文件 Interaction.cpp 第 34 行定义.

引用了 Cancel, Confirm, EndTurn, kind, MoveTo, None, SelectUnit , 以及 UseAbilityOn.

◆ interactionStateName()

EVENGINE_API_DOMAINS std::string_view eve::tactics::interactionStateName ( InteractionState  state)
noexcept

Human-readable stable spelling of an interaction state (protocol text).

在文件 Interaction.cpp 第 22 行定义.

引用了 AwaitSelection, Blocked, Ended, Resolving, state, Targeting , 以及 UnitSelected.

◆ makeFaceRequest()

EVENGINE_API_DOMAINS Result< action::ActionRequest > eve::tactics::makeFaceRequest ( ecs::EntityHandle  unit,
int  facing,
SimulationTick  tick 
)

Build a checked facing request with optimistic battle revision.

在文件 TacticsAction.cpp 第 215 行定义.

引用了 facing, eve::Result< T >::failure(), eve::LogicalId::parse(), request, eve::Result< T >::success(), tick , 以及 unit.

◆ makeMoveRequest()

EVENGINE_API_DOMAINS Result< action::ActionRequest > eve::tactics::makeMoveRequest ( ecs::EntityHandle  unit,
Cell  destination,
SimulationTick  tick 
)

Build a checked move request using canonical integer cell parameters.

参数
unitGeneration-checked tactical unit source.
destinationLogical target cell.
tickDeterministic request tick.

在文件 TacticsAction.cpp 第 205 行定义.

引用了 eve::Result< T >::failure(), eve::tactics::Cell::layer, eve::LogicalId::parse(), request, eve::Result< T >::success(), tick, unit, eve::tactics::Cell::x , 以及 eve::tactics::Cell::y.

◆ makeSettlementRequest()

EVENGINE_API_DOMAINS Result< settlement::SettlementRequest > eve::tactics::makeSettlementRequest ( const AbilitySettlementRequest &  request)

Validate and project a committed tactical ability into the canonical settlement request.

参数
requestOwning tactical receipt and settlement values.
返回
The exact request consumed by TacticsSettlementRuntime, or a located validation failure. @thread Thread-safe for independent request values; reads no module state. @reentrancy Does not invoke callbacks. @cost Linear in tag and context size due to owning projection.

在文件 TacticsSettlement.cpp 第 8 行定义.

引用了 eve::settlement::SettlementRequest::context, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::SubjectRef::isValid(), eve::settlement::SettlementRequest::kind, eve::settlement::SettlementRequest::magnitude, request, eve::settlement::SettlementRequest::source, eve::Result< T >::success(), eve::settlement::SettlementRequest::tags, target, eve::settlement::SettlementRequest::target , 以及 eve::settlement::SettlementRequest::tick.

被这些函数引用 eve::tactics::TacticsSettlementRuntime::settle() , 以及 eve::tactics::TacticsSettlementRuntime::settleAtomic().

◆ makeWaitRequest()

EVENGINE_API_DOMAINS Result< action::ActionRequest > eve::tactics::makeWaitRequest ( ecs::EntityHandle  unit,
SimulationTick  tick 
)

Build a checked wait request with optimistic battle revision.

在文件 TacticsAction.cpp 第 223 行定义.

引用了 eve::Result< T >::failure(), eve::LogicalId::parse(), eve::Result< T >::success(), tick , 以及 unit.

◆ Module_IMPL()

eve::tactics::Module_IMPL ( Tactics  ,
new   Tactics() 
)

◆ moveActionDefinition()

EVENGINE_API_DOMAINS action::ActionDefinition eve::tactics::moveActionDefinition ( )

Build the canonical zero-duration tactics move action definition.

在文件 TacticsAction.cpp 第 184 行定义.

引用了 eve::LogicalId::parse().

◆ phaseName()

std::string_view eve::tactics::phaseName ( BattlePhase  phase)
noexcept

Return the stable protocol spelling of a battle phase.

在文件 TacticsTypes.cpp 第 200 行定义.

引用了 phase , 以及 phaseName().

被这些函数引用 eve::tactics::Tactics::gameplayEvents(), eve::tactics::Tactics::observeGameplay() , 以及 phaseName().

◆ presentationRevertTriggerName()

EVENGINE_API_DOMAINS std::string_view eve::tactics::presentationRevertTriggerName ( PresentationRevertTrigger  trigger)
noexcept

Human-readable stable spelling of a revert trigger (protocol text).

在文件 Presentation.cpp 第 62 行定义.

引用了 Never, OnExpiry, OnNextTurn , 以及 OnRoundStart.

◆ registerTacticsLineOfSightProvider()

Result< void > eve::tactics::registerTacticsLineOfSightProvider ( )

Claim the grid coordinate spaces for the tactics adapter.

返回
Applied when this call claimed the spaces, NoOp when they were already claimed by this adapter, or the router's own refusal (Conflict for a foreign provider, Unsupported when no router is available).
备注
Called from the module constructor, so importing tactics is what makes grid line of sight available to the targeting pipeline.

在文件 TacticsLineOfSightAdapter.cpp 第 113 行定义.

引用了 adapter, eve::Applied, eve::sensing::ensureLineOfSightRouter(), eve::Result< T >::failure(), eve::sensing::Grid2D, eve::sensing::Grid3D, eve::Status::success(), eve::Result< T >::success() , 以及 tacticsLineOfSightAdapter().

被这些函数引用 eve::tactics::Tactics::Tactics().

◆ statusName()

std::string_view eve::tactics::statusName ( BattleStatus  status)
noexcept

Return the stable protocol spelling of a battle status.

在文件 TacticsTypes.cpp 第 215 行定义.

引用了 status , 以及 statusName().

被这些函数引用 eve::tactics::Tactics::observeGameplay() , 以及 statusName().

◆ tacticsLineOfSightAdapter()

EVENGINE_API_DOMAINS TacticsLineOfSightAdapter & eve::tactics::tacticsLineOfSightAdapter ( )

The process-wide adapter instance the capability answers with.

在文件 TacticsLineOfSightAdapter.cpp 第 59 行定义.

引用了 adapter.

被这些函数引用 eve::tactics::Tactics::attachLineOfSightBoard(), eve::tactics::Tactics::detachLineOfSightBoard() , 以及 registerTacticsLineOfSightProvider().

◆ unitVisualStateName()

EVENGINE_API_DOMAINS std::string_view eve::tactics::unitVisualStateName ( UnitVisualState  state)
noexcept

Human-readable stable spelling of a visual state (protocol text).

在文件 Presentation.cpp 第 47 行定义.

引用了 Attacking, Defending, Destroyed, Finished, Friendly, Idle, Moving, Selected, state , 以及 Targetable.

◆ validateAbility()

Result< AbilityReceipt > eve::tactics::validateAbility ( Battle &  battle,
SubjectRef  actor,
const LogicalId &  action,
Cell  targetCell,
SubjectRef  targetUnit,
std::string_view  payload 
)

◆ visibleCellsInRange()

EVENGINE_API_DOMAINS Result< std::vector< Cell > > eve::tactics::visibleCellsInRange ( const BoardState &  board,
const ILineOfSightPolicy &  policy,
Cell  origin,
int  minimum,
int  maximum,
CellRangeMetric  metric 
)

Cells within a metric range of origin that policy can actually see.

参数
boardAuthoritative board facts.
policySight rule to apply; a caller may pass a project implementation.
originObserver cell.
minimumInclusive lower bound of the range, in metric units.
maximumInclusive upper bound of the range.
metricLogical distance the caller wants the range measured in.
返回
The visible cells in the board's deterministic cell order, or a structured refusal when the origin is unknown or the range bounds are invalid.
备注
This is the query a UI needs to fill InteractionContext::targetableCells, and it deliberately composes the existing range query with the sight policy instead of re-deriving either: range and sight stay separate rules with one owner each. @cost Linear in the number of cells the range query returns, times the trace length of each; the result is a projection of the current board and must be recomputed after any change to it.

在文件 LineOfSight.cpp 第 192 行定义.

引用了 board, cell, eve::tactics::PathQuery::cellsInRange(), maximum, minimum, origin, visible , 以及 eve::tactics::ILineOfSightPolicy::visible().

被这些函数引用 eve::tactics::Tactics::visibleCellsInRange().

◆ waitActionDefinition()

EVENGINE_API_DOMAINS action::ActionDefinition eve::tactics::waitActionDefinition ( )

Build the canonical zero-duration tactics wait action definition.

在文件 TacticsAction.cpp 第 198 行定义.

引用了 eve::LogicalId::parse().

变量说明

◆ kChargeTimeBattlePolicyId

constexpr std::string_view eve::tactics::kChargeTimeBattlePolicyId = "charge_time_battle"
inlineconstexpr

Stable id of the built-in charge-time (CTB/ATB) turn policy.

This policy schedules by accumulated charge instead of "one activation per unit per round", so a unit with higher initiative really does act more often. See ChargeTimeBattlePolicy for the exact gain/ready/consume rule.

在文件 TacticsTypes.h 第 74 行定义.

◆ kChargeTimeBattleThreshold

constexpr int eve::tactics::kChargeTimeBattleThreshold = 100
inlineconstexpr

Charge a unit must accumulate before it may activate under CTB scheduling.

Part of the policy's behaviour rather than of persisted data, but it is a named constant because the charge values stored in a snapshot are only meaningful relative to it.

在文件 TacticsTypes.h 第 82 行定义.

◆ kInitiativePolicyId

constexpr std::string_view eve::tactics::kInitiativePolicyId = "initiative"
inlineconstexpr

Stable id of the built-in per-unit initiative turn policy.

在文件 TacticsTypes.h 第 66 行定义.

◆ kMaxAbilityPayloadBytes

constexpr std::size_t eve::tactics::kMaxAbilityPayloadBytes = 4096
inlineconstexpr

Upper bound on the opaque ability payload a declaration may carry.

The payload is caller-owned effect data that tactics stores and replays verbatim, so the only rule tactics can enforce without reading it is a bound: a persisted snapshot must not grow without limit.

在文件 TacticsTypes.h 第 353 行定义.

被这些函数引用 validateAbility().

◆ kSideAlternatingPolicyId

constexpr std::string_view eve::tactics::kSideAlternatingPolicyId = "side_alternating"
inlineconstexpr

Stable id of the built-in side-alternating turn policy.

在文件 TacticsTypes.h 第 64 行定义.

◆ kSightBlockerTag

constexpr std::string_view eve::tactics::kSightBlockerTag = "sight_blocker"
inlineconstexpr

Cell tag that makes a cell block line of sight.

在文件 LineOfSight.h 第 39 行定义.