pub struct EntityAttributes(pub BTreeMap<String, i64>);Tuple Fields§
§0: BTreeMap<String, i64>Implementations§
Source§impl EntityAttributes
impl EntityAttributes
pub fn add(&mut self, key: &str, delta: i64)
pub fn set(&mut self, key: &str, value: i64)
pub fn remove_zeroes(&mut self)
Sourcepub fn is_summoned(&self) -> bool
pub fn is_summoned(&self) -> bool
Boss-summon-wave: the mob was spawned by a boss summon wave (marked with
the "summoned" attribute in spawn_wave). Summoned reinforcements carry
NO economy weight — their wave_share() is 0, so per-kill drops, pet-ult
charge and counterattack procs from them are zero, and kill quests skip
their deaths. This keeps a boss fight’s total faucet flat when the summon
wave is added (the boss keeps its full, unscaled payout).
Growing-enemy-waves §2: the mob’s reward/weight share as a fraction
(stored per-10000 under "wave_share", like crit_chance). Absent ⇒ 1.0
(legacy content with no reward_mob_budget). Consumers multiply per-kill
drop chance, pet-ult charge fill and counterattack proc chance by this so
they stay count-invariant when concurrency is inflated. Boss-summoned
reinforcements return 0 (no net faucet, see is_summoned).
BAL-026: this combatant’s share of its roster’s initial max-HP budget
(stored per-10000 under "gauge_hp_share", stamped at spawn). It
normalizes the OUTGOING damage gauge, so absolute stats never speed the
bar up: killing a full wave is worth the same gauge at any power.
Absent ⇒ 1.0 (a solo roster); summoned reinforcements return 0 and
never move the gauge. A NEGATIVE stamp is the explicit “worth nothing”
marker (BAL-026’s invalid-fixture rule — the attribute map drops
literal zeros, so 0 cannot be stored directly) and reads as 0.
Sourcepub fn speed_or_baseline(&self, baseline_speed: u64) -> i64
pub fn speed_or_baseline(&self, baseline_speed: u64) -> i64
Convention: the entity’s speed multiplier lives under the "speed" attribute key.
Returns baseline_speed when missing, so unmigrated units keep working at 1× cooldown
rate. baseline_speed is sourced from GameSettings.baseline_speed.
Trait Implementations§
Source§impl Clone for EntityAttributes
impl Clone for EntityAttributes
Source§fn clone(&self) -> EntityAttributes
fn clone(&self) -> EntityAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EntityAttributes
impl Debug for EntityAttributes
Source§impl Default for EntityAttributes
impl Default for EntityAttributes
Source§fn default() -> EntityAttributes
fn default() -> EntityAttributes
Source§impl<'de> Deserialize<'de> for EntityAttributes
impl<'de> Deserialize<'de> for EntityAttributes
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for EntityAttributes
impl JsonSchema for EntityAttributes
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more