public void ApplyStatus(statusEffects effect, float duration) { if (effect == statusEffects.stun) { StartCoroutine(ActivateStun(duration)); } }
public void RemoveStatusEffect(statusEffects effect) //call when a tower with a passive sells; { if (currentBuffsFromOtherTowers.Contains(effect)) { currentBuffsFromOtherTowers.Remove(effect); } }
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); }
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); } } } }