Esempio n. 1
0
 public override void OnShieldLayerBroken()
 {
     _scene.WriteMessage(BreakShieldMessage);
     ShieldLayers--;
     ShieldStrength = 100;
     if (ShieldLayers <= 0)
     {
         ParentAbility.Deactivate();
     }
     base.OnShieldLayerBroken();
 }
Esempio n. 2
0
 public virtual void OnZeroHP()
 {
     if (ParentAbility != null)
     {
         ParentAbility.Deactivate();
     }
     else
     {
         _scene.GetGameObjectPool().GetActor(AffectedActor).RemoveBehavior(this.InstanceID);
         Alive = false;
     }
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
        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);
        }