pub struct CastAbilityCtx<'a> {
pub caster_entity: &'a Entity,
pub target_entity: &'a Entity,
pub fight: &'a ActiveFight,
pub rng: &'a GameRng,
pub ability_level: i64,
pub ability_id: Uuid,
pub config: &'a GameConfig,
pub lookups: &'a ContentLookups,
pub stones: AbilityStoneResolver<'a>,
pub source: CombatSource,
}Expand description
ability script scope the shipped scripts read.
Fields§
§caster_entity: &'a EntityCasterEntity const.
target_entity: &'a EntityTargetEntity const.
fight: &'a ActiveFightFight const (used by the cone/AoE ability for Fight.entities).
rng: &'a GameRngRNG snapshot (clone at the same state) so combat primitives draw
ability_level: i64AbilityLevel const (passed to get_ability_info and projectile launches).
ability_id: UuidThe ability actually being cast. Ports that hardcode a donor ability id (pet-ult clones) still read their own numbers; this is what the socketed support stones are keyed by.
config: &'a GameConfig§lookups: &'a ContentLookups§stones: AbilityStoneResolver<'a>Ability stones active on the caster, already resolved against the current world side and the caster’s mana. Identity for every combatant without socketed stones.
source: CombatSourceBreakdown attribution of everything this cast produces: Ability for an
ordinary cast, PetUlt when the charge-driven pet ult is what fired it.
Set by the dispatcher, which is the only place that knows the difference.