public void EndStrike(EffectId id) { if (CurrentStrikeOwner != id) { return; } CurrentStrikeOwner = default; _currentStrike = null; }
public virtual void ProjectileHit(StrikeDef strike, EntityId targetId) { if (targetId == this.ParentEntity.Id) { return; } if (strike.PredicateOnTarget == null || strike.PredicateOnTarget.Def.Check(new ScriptingContext(ParentEntity) { Host = targetId, Target = targetId, Parent = new ScriptingContext() { Host = ParentEntity.Id } })) { ((IHasSpells)ParentEntity).SpellsEngine.CastFromInsideEntity(new SpellCast() { Def = strike.SpellOnStrike.Def, OwnerObject = ParentEntity.Id, TargetEntity = targetId }); } }
public void PrepareStrike(EffectId id, StrikeDef def) { CurrentStrikeOwner = id; _currentStrike = def; _struckEntities.Clear(); }