Expand description
Native functions for the ability_ids category (run_abilities_ids_script)
fast_equip_abilities_script does (copy Abilities, sort by
balance::ability_damage descending with a floored comparator, take the
top Slots) and then call the already-native
crate::mechanics::balance::ability_damage_from_id for the core damage
formula, so this fn only handles the copy/sort/take marshalling.
Follows the super::power reference shape: a typed *Ctx, a *Fn alias, a
native impl, and a register.
Structs§
- Ability
IdsCtx fast_equip_abilities_scriptsees (Abilities,Slots) plus the config / content lookups thebalancemodule carries (needed bybalance::ability_damage).- Item
IdsCtx - Inputs available to an
item_idsnative fn for thefast_equip_pets_script/ content lookups thebalancemodule carries.
Functions§
- fast_
equip_ abilities - Native port of the live
fast_equip_abilities_script: - fast_
equip_ pets sort_by(|a, b| floor((pet_power(b) - pet_power(a)) * 1000.0))) and return thetemplate_ids of the topmin(pets.len, Slots).
Type Aliases§
- Ability
IdsFn - Signature of an
ability_idsnative fn. Freefn(no captured state) so it isCopyand trivially stored in the registry; runtime context arrives viaAbilityIdsCtx. - Item
IdsFn - Signature of an
item_idsnative fn. Freefn(no captured state) so it isCopyand trivially stored in the registry; runtime context arrives viaItemIdsCtx.