Function power_from_attrs

Source
pub fn power_from_attrs(attrs: &AttrMap) -> i64
Expand description

Compute character power from a composed AttrMap as P = DPS × EHP (balance v2). DPS is the offensive product (attack · rate · crit · multicast · bravery · counterattack); EHP the survivability product (hp ÷ the damage that gets through), where armor and dodge use the diminishing-returns curves armor_k and ev/(ev+K_DODGE). Normalised by POWER_NORM so a reference character (attack=BASE_ATTACK, hp=BASE_HP, neutral elsewhere) anchors at BASE_POWER.

Float-accumulation order is load-bearing (see character_attrs_power): the per-attribute reads happen in a fixed order so the floored result is deterministic.