public override void OnShieldLayerBroken() { _scene.WriteMessage(BreakShieldMessage); ShieldLayers--; ShieldStrength = 100; if (ShieldLayers <= 0) { ParentAbility.Deactivate(); } base.OnShieldLayerBroken(); }
public virtual void OnZeroHP() { if (ParentAbility != null) { ParentAbility.Deactivate(); } else { _scene.GetGameObjectPool().GetActor(AffectedActor).RemoveBehavior(this.InstanceID); Alive = false; } }
public override TurnResult OnActorStartTurn() { TurnsRemaining--; if (TurnsRemaining <= 0) { _scene.WriteMessage("The stun wears off."); if (ParentAbility != null) { ParentAbility.Deactivate(); } else { _scene.GetGameObjectPool().GetActor(AffectedActor).RemoveBehavior(this.InstanceID); Alive = false; } } return(TurnResult.GOTO_ENDTURN); }
public override TurnResult OnActorStartTurn() { TurnsRemaining--; Actor tgt = _scene.GetGameObjectPool().GetActor(AffectedActor); DamageData dmg = Damage; tgt.TakeDamage(dmg); if (TurnsRemaining <= 0) { if (ParentAbility != null) { ParentAbility.Deactivate(); } else { _scene.GetGameObjectPool().GetActor(AffectedActor).RemoveBehavior(this.InstanceID); Alive = false; } } return(TurnResult.GOTO_TAKETURN); }