示例#1
0
 public void ApplyStatus(statusEffects effect, float duration)
 {
     if (effect == statusEffects.stun)
     {
         StartCoroutine(ActivateStun(duration));
     }
 }
示例#2
0
 public void RemoveStatusEffect(statusEffects effect) //call when a tower with a passive sells;
 {
     if (currentBuffsFromOtherTowers.Contains(effect))
     {
         currentBuffsFromOtherTowers.Remove(effect);
     }
 }
示例#3
0
 public void AddStatusEffect(statusEffects effect)
 {
     if (!currentBuffsFromOtherTowers.Contains(effect))
     {
         currentBuffsFromOtherTowers.Add(effect);
     }
 }
 public void RemoveStatusEffect(statusEffects statusEffectToBeRemoved)
 {
     if (!currentStatusEffects.Contains(statusEffectToBeRemoved))
     {
         return;
     }
     currentStatusEffects.Remove(statusEffectToBeRemoved);
 }
示例#5
0
    public void postBufferAttackEffect(int amount, attackType type, statusEffects effects, attackLocation location, GameObject source)
    {
        int healthBeforeDamage = HP;

        //CALLS THE METHODS FOR EACH ATTACK TYPE AND STATUS EFFECT.
        //IMMUNITY AND SPECIAL EFFECTS TO DIFFERENT TYPES CAN BE MADE BY OVERRIDING THE VIRTUAL METHODS.
        if (type == attackType.Normal)
        {
            NormalDamage(amount, source);
        }
        if (type == attackType.Fire)
        {
            FireDamage(amount, source);
        }
        if (type == attackType.Heal)
        {
            Heal(amount, source);
        }
        if (type == attackType.LifeSteal)
        {
            LifeStealDamage(amount, source);
        }
        //----------------------------------------------------------------------------------------------

        //CHECK IF DEAD---------------------------
        if (HP <= 0)
        {
            death();
            return;
        }

        foreach (LowHealthTriggerInfo lowHealthTrigger in LowHealthTriggers)
        {
            if (HP <= lowHealthTrigger.TriggerValue && lowHealthTrigger.TriggerValue < healthBeforeDamage)
            {
                if (CombatExecutor.CutsceneDataManager.TriggerATrigger(lowHealthTrigger.Label))
                {
                    GameDataTracker.combatExecutor.AddCutsceneToQueue(Resources.Load <DialogueContainer>(lowHealthTrigger.CutscenePath), name, gameObject);
                }
            }
        }
    }