Function character_power

Source
pub fn character_power(
    config: &GameConfig,
    lookups: &ContentLookups,
    level: i64,
    inventory: &[Item],
    abilities: &EquippedAbilities,
    pets: &[Pet],
) -> Result<i64, String>
Expand description

references. The previous version accepted either real essences structs (the into these typed inputs and then calls this exact function — so results are byte-identical on both paths.

Accumulation order is load-bearing (per-key float sums): char-level attributes, then inventory items (each item’s attributes in order), then pets (in the given slice order, each pet’s stats in order). Abilities are summed slotted-then-unslotted, matching the original.