载入中...
搜索中...
未找到
eve::tactics::ChargeModel结构体 参考

The charge rule a policy declares for round scheduling. 更多...

#include <TurnPolicy.h>

Public 成员函数

constexpr bool isChargeBased () const noexcept
 Whether this model schedules by charge at all.
 

Public 属性

int initiativeGain = 0
 Multiplier applied to a unit's initiative to get its per-round charge gain.
 
int cost = 0
 Charge a unit spends when it activates.
 
int threshold = 0
 Charge a unit must reach to be scheduled; 0 means "always ready".
 

详细描述

The charge rule a policy declares for round scheduling.

This is the one place a policy states how charge affects scheduling. The battle owns the mutation (per-unit charge lives in TurnResources, the single authority for per-unit turn state) and the ordering (via order plus the caller's canonical tie-break); the policy only declares the numbers. A policy therefore stays a stateless value-like object and schedules identically after a save/restore.

The default value — all zeros — means "no charge model": every living unit is ready every round and activating costs nothing, which is exactly the one-activation-per-unit-per-round behaviour of a pure ordering policy.

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

成员函数说明

◆ isChargeBased()

constexpr bool eve::tactics::ChargeModel::isChargeBased ( ) const
inlineconstexprnoexcept

Whether this model schedules by charge at all.

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

引用了 threshold.

类成员变量说明

◆ cost

int eve::tactics::ChargeModel::cost = 0

Charge a unit spends when it activates.

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

◆ initiativeGain

int eve::tactics::ChargeModel::initiativeGain = 0

Multiplier applied to a unit's initiative to get its per-round charge gain.

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

◆ threshold

int eve::tactics::ChargeModel::threshold = 0

Charge a unit must reach to be scheduled; 0 means "always ready".

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

被这些函数引用 isChargeBased().


该结构体的文档由以下文件生成: