pub struct CastProjectileCtx<'a> {
pub caster_entity: &'a Entity,
pub target_entity: &'a Entity,
pub fight: &'a ActiveFight,
pub rng: &'a GameRng,
pub projectile_level: i64,
pub config: &'a GameConfig,
pub lookups: &'a ContentLookups,
pub stones: AbilityStoneResolver<'a>,
pub source: CombatSource,
}Expand description
Inputs available to a cast_projectile native fn.
Fields§
§caster_entity: &'a EntityCasterEntity const.
target_entity: &'a EntityTargetEntity const.
fight: &'a ActiveFightFight const (for player_id in the attack screen-shake branch).
rng: &'a GameRngRNG snapshot (clone at the same state).
projectile_level: i64ProjectileLevel const (passed to get_ability_info).
config: &'a GameConfig§lookups: &'a ContentLookups§stones: AbilityStoneResolver<'a>Ability stones active on the caster (the projectile carries the parent ability’s damage, so it carries the parent ability’s stones too).
source: CombatSourceBreakdown attribution of everything this projectile lands. Resolved by the dispatcher from the projectile id, so the counterattack reflex reads as a counterattack rather than as an anonymous projectile.
Auto Trait Implementations§
impl<'a> Freeze for CastProjectileCtx<'a>
impl<'a> RefUnwindSafe for CastProjectileCtx<'a>
impl<'a> Send for CastProjectileCtx<'a>
impl<'a> Sync for CastProjectileCtx<'a>
impl<'a> Unpin for CastProjectileCtx<'a>
impl<'a> UnwindSafe for CastProjectileCtx<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more