载入中...
搜索中...
未找到
LineOfSight.h
浏览该文件的文档.
104 [[nodiscard]] virtual Result<CoverLevel> cover(const BoardState& board, Cell attacker, Cell target) const = 0;
146 [[nodiscard]] Result<CoverLevel> cover(const BoardState& board, Cell attacker, Cell target) const override;
178[[nodiscard]] EVENGINE_API_DOMAINS Result<std::vector<Cell>> visibleCellsInRange(const BoardState& board,
Move-only, checked operation results for the common layer.
Deterministic fixed-cost tactics path queries.
Deterministic board values and short-root ECS entities for tactics.
Authoritative board facts and occupancy indexes for one battle.
Definition TacticsTypes.h:155
The built-in cover policy: blockers adjacent to the target, prioritising the line.
Definition LineOfSight.h:140
The built-in grid policy: a straight-line trace over the board's own topology.
Definition LineOfSight.h:123
Answers "how much cover does @p target have against @p attacker".
Definition LineOfSight.h:89
virtual ~ICoverPolicy()=default
Releases ICoverPolicy resources.
virtual std::string_view id() const noexcept=0
Stable id of this implementation.
Answers "can @p from see @p to" for one board.
Definition LineOfSight.h:61
virtual ~ILineOfSightPolicy()=default
Releases ILineOfSightPolicy resources.
static constexpr const char * capabilityName
Capability name a provider registers under.
Definition LineOfSight.h:64
virtual std::string_view id() const noexcept=0
Stable id of this implementation, for diagnostics and configuration.
Definition Interaction.cpp:13
std::string_view coverLevelName(CoverLevel level) noexcept
Stable protocol spelling of a cover level.
Definition LineOfSight.cpp:122
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.
Definition LineOfSight.cpp:192
@ None
Nothing to do: the click landed somewhere with no meaning in this state.
std::shared_ptr< ILineOfSightPolicy > gridLineOfSightPolicy()
The process-wide built-in line-of-sight policy.
Definition LineOfSight.cpp:182
constexpr std::string_view kSightBlockerTag
Cell tag that makes a cell block line of sight.
Definition LineOfSight.h:39
@ Full
Full protection: a blocker sits between the attacker and the target.
@ Half
Partial protection: an adjacent blocker, but not on the incoming line.
std::shared_ptr< ICoverPolicy > gridCoverPolicy()
The process-wide built-in cover policy (same ownership remarks as above).
Definition LineOfSight.cpp:187
Logical board coordinate independent of rendering projection.
Definition TacticsTypes.h:30