public static bool IsInvulnerable(Obj_AI_Base target, DamageType damageType, bool ignoreShields = true)
        {
            // Tryndamere's Undying Rage (R)
            if (target.HasBuff("Undying Rage") && target.Health <= target.MaxHealth * 0.10f)
            {
                return(true);
            }

            // Kayle's Intervention (R)
            if (target.HasBuff("JudicatorIntervention"))
            {
                return(true);
            }

            if (ignoreShields)
            {
                return(false);
            }

            // Morgana's Black Shield (E)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("BlackShield"))
            {
                return(true);
            }

            if (damageType.Equals(DamageType.Magical) && target.HasSpellShield())
            {
                return(true);
            }


            return(false);
        }
Exemplo n.º 2
0
        public static bool IsInvulnerable(Obj_AI_Base target, DamageType damageType, bool ignoreShields = true)
        {
            var targetBuffs = new HashSet <string>(target.Buffs.Select(buff => buff.Name), StringComparer.OrdinalIgnoreCase);

            // Kindred's Lamb's Respite(R)
            if (targetBuffs.Contains("KindredRNoDeathBuff") && target.HealthPercent <= 10)
            {
                return(true);
            }

            // Vladimir W
            if (targetBuffs.Contains("VladimirSanguinePool"))
            {
                return(true);
            }

            // Tryndamere's Undying Rage (R)
            if (targetBuffs.Contains("UndyingRage") && target.Health <= target.MaxHealth * 0.10f)
            {
                return(true);
            }

            // Kayle's Intervention (R)
            if (targetBuffs.Contains("JudicatorIntervention"))
            {
                return(true);
            }

            if (ignoreShields)
            {
                return(false);
            }

            // Morgana's Black Shield (E)
            if (targetBuffs.Contains("BlackShield") && damageType.Equals(DamageType.Magical))
            {
                return(true);
            }

            // Banshee's Veil (PASSIVE)
            if (targetBuffs.Contains("bansheesveil") && damageType.Equals(DamageType.Magical))
            {
                return(true);
            }

            // Sivir's Spell Shield (E)
            if (targetBuffs.Contains("SivirE") && damageType.Equals(DamageType.Magical))
            {
                return(true);
            }

            // Nocturne's Shroud of Darkness (W)
            if (targetBuffs.Contains("NocturneShroudofDarkness") && damageType.Equals(DamageType.Magical))
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 3
0
        public static bool IsInvulnerable(Obj_AI_Base target, DamageType damageType, bool ignoreShields = true)
        {
            // Tryndamere's Undying Rage (R)
            if (target.HasBuff("Undying Rage") && target.Health <= target.MaxHealth * 0.10f)
            {
                return(true);
            }

            // Kayle's Intervention (R)
            if (target.HasBuff("JudicatorIntervention"))
            {
                return(true);
            }

            // Poppy's Diplomatic Immunity (R)
            if (target.HasBuff("DiplomaticImmunity") && !ObjectManager.Player.HasBuff("poppyulttargetmark"))
            {
                //TODO: Get the actual target mark buff name
                return(true);
            }

            if (ignoreShields)
            {
                return(false);
            }

            // Morgana's Black Shield (E)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("BlackShield"))
            {
                return(true);
            }

            // Banshee's Veil (PASSIVE)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("BansheesVeil"))
            {
                // TODO: Get exact Banshee's Veil buff name.
                return(true);
            }

            // Sivir's Spell Shield (E)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("SivirShield"))
            {
                // TODO: Get exact Sivir's Spell Shield buff name
                return(true);
            }

            // Nocturne's Shroud of Darkness (W)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("ShroudofDarkness"))
            {
                // TODO: Get exact Nocturne's Shourd of Darkness buff name
                return(true);
            }

            return(false);
        }
Exemplo n.º 4
0
        public static bool IsInvulnerable(Obj_AI_Base target, DamageType damageType, bool ignoreShields = true)
        {
            //Kindred's Lamb's Respite(R)

            if (target.HasBuff("kindredrnodeathbuff") && target.HealthPercent <= 10)
            {
                return(true);
            }

            // Tryndamere's Undying Rage (R)
            if (target.HasBuff("Undying Rage") && target.Health <= target.MaxHealth * 0.10f)
            {
                return(true);
            }

            // Kayle's Intervention (R)
            if (target.HasBuff("JudicatorIntervention"))
            {
                return(true);
            }

            if (ignoreShields)
            {
                return(false);
            }

            // Morgana's Black Shield (E)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("BlackShield"))
            {
                return(true);
            }

            // Banshee's Veil (PASSIVE)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("BansheesVeil"))
            {
                // TODO: Get exact Banshee's Veil buff name.
                return(true);
            }

            // Sivir's Spell Shield (E)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("SivirShield"))
            {
                // TODO: Get exact Sivir's Spell Shield buff name
                return(true);
            }

            // Nocturne's Shroud of Darkness (W)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("ShroudofDarkness"))
            {
                // TODO: Get exact Nocturne's Shourd of Darkness buff name
                return(true);
            }

            return(false);
        }
        /// <summary>
        ///     Gets whether or not a target is invulnerable to a spell.
        /// </summary>
        /// <param name="target">Target</param>
        /// <param name="damageType">Damage Type.</param>
        /// <param name="ignoreShields">Ignore shields(Morgana E, Banshees, etc)</param>
        /// <returns>Whether or not a target is invulnerable to a spell.</returns>
        public static bool IsInvulnerable(Obj_AI_Base target, DamageType damageType, bool ignoreShields = true)
        {
            // Tryndamere's Undying Rage (R)
            if (!damageType.Equals(DamageType.True) && target.HasBuff("Undying Rage") && target.Health <= 2f)
            {
                return(true);
            }

            // Kayle's Intervention (R)
            if (target.HasBuff("JudicatorIntervention"))
            {
                return(true);
            }

            if (ignoreShields)
            {
                return(false);
            }

            // Morgana's Black Shield (E)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("BlackShield"))
            {
                return(true);
            }

            // Banshee's Veil (PASSIVE)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("BansheesVeil"))
            {
                // TODO: Get exact Banshee's Veil buff name.
                return(true);
            }

            // Sivir's Spell Shield (E)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("SivirShield"))
            {
                // TODO: Get exact Sivir's Spell Shield buff name
                return(true);
            }

            // Nocturne's Shroud of Darkness (W)
            return(damageType.Equals(DamageType.Magical) && target.HasBuff("ShroudofDarkness"));
        }
Exemplo n.º 6
0
    public virtual void takeDamage(float damage, DamageType damageType)
    {
        float damageMultiplier = 1.0f;

        if (damageType.Equals(weakness))
        {
            damageMultiplier += 0.5f;
        }
        health = health - (damage * damageMultiplier);

        if (health < 0)
        {
            die();
        }
    }
Exemplo n.º 7
0
        public bool Equals(DestinySandboxPerkDefinition input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     DisplayProperties == input.DisplayProperties ||
                     (DisplayProperties != null && DisplayProperties.Equals(input.DisplayProperties))
                     ) &&
                 (
                     PerkIdentifier == input.PerkIdentifier ||
                     (PerkIdentifier != null && PerkIdentifier.Equals(input.PerkIdentifier))
                 ) &&
                 (
                     IsDisplayable == input.IsDisplayable ||
                     (IsDisplayable != null && IsDisplayable.Equals(input.IsDisplayable))
                 ) &&
                 (
                     DamageType == input.DamageType ||
                     (DamageType != null && DamageType.Equals(input.DamageType))
                 ) &&
                 (
                     DamageTypeHash == input.DamageTypeHash ||
                     (DamageTypeHash.Equals(input.DamageTypeHash))
                 ) &&
                 (
                     PerkGroups == input.PerkGroups ||
                     (PerkGroups != null && PerkGroups.Equals(input.PerkGroups))
                 ) &&
                 (
                     Hash == input.Hash ||
                     (Hash.Equals(input.Hash))
                 ) &&
                 (
                     Index == input.Index ||
                     (Index.Equals(input.Index))
                 ) &&
                 (
                     Redacted == input.Redacted ||
                     (Redacted != null && Redacted.Equals(input.Redacted))
                 ));
        }
Exemplo n.º 8
0
        public void applyEffect()
        {
            int total = this.damage;

            if (type.Equals(DamageType.Burn))
            {
            }
            if (type.Equals(DamageType.Frost))
            {
            }
            if (type.Equals(DamageType.Shock))
            {
            }
            if (type.Equals(DamageType.Light))
            {
            }
            if (type.Equals(DamageType.Dark))
            {
            }
            if (type.Equals(DamageType.Impact))
            {
            }
            if (type.Equals(DamageType.Pierce))
            {
            }
            if (type.Equals(DamageType.Slice))
            {
            }
            if (type.Equals(DamageType.Poison))
            {
            }
            if (total <= 0)
            {
                total = 1;
            }
            this.Target.TakeDamage(this.Source, )
        }
Exemplo n.º 9
0
        public static bool IsInvulnerable(Obj_AI_Base target, DamageType damageType, bool ignoreShields = true)
        {
            // Tryndamere's Undying Rage (R)
            if (target.HasBuff("Undying Rage") && target.Health <= target.MaxHealth * 0.10f)
            {
                return true;
            }

            // Kayle's Intervention (R)
            if (target.HasBuff("JudicatorIntervention"))
            {
                return true;
            }

            if (ignoreShields)
            {
                return false;
            }

            // Morgana's Black Shield (E)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("BlackShield"))
            {
                return true;
            }

            // Banshee's Veil (PASSIVE)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("BansheesVeil"))
            {
                // TODO: Get exact Banshee's Veil buff name.
                return true;
            }

            // Sivir's Spell Shield (E)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("SivirShield"))
            {
                // TODO: Get exact Sivir's Spell Shield buff name
                return true;
            }

            // Nocturne's Shroud of Darkness (W)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("ShroudofDarkness"))
            {
                // TODO: Get exact Nocturne's Shourd of Darkness buff name
                return true;
            }

            return false;
        }
Exemplo n.º 10
0
        public static bool IsInvulnerable(Obj_AI_Base target, DamageType damageType, bool ignoreShields = true)
        {
            //Kindred's Lamb's Respite(R)

            if (target.HasBuff("kindrednodeathbuff"))
            {
                return true;
            }

            // Tryndamere's Undying Rage (R)
            if (target.HasBuff("Undying Rage") && target.Health <= target.MaxHealth * 0.10f)
            {
                return true;
            }

            // Kayle's Intervention (R)
            if (target.HasBuff("JudicatorIntervention"))
            {
                return true;
            }

            // Poppy's Diplomatic Immunity (R)
            if (target.HasBuff("DiplomaticImmunity") && !ObjectManager.Player.HasBuff("poppyulttargetmark"))
            {
                //TODO: Get the actual target mark buff name
                return true;
            }

            if (ignoreShields)
            {
                return false;
            }

            // Morgana's Black Shield (E)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("BlackShield"))
            {
                return true;
            }

            // Banshee's Veil (PASSIVE)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("BansheesVeil"))
            {
                // TODO: Get exact Banshee's Veil buff name.
                return true;
            }

            // Sivir's Spell Shield (E)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("SivirShield"))
            {
                // TODO: Get exact Sivir's Spell Shield buff name
                return true;
            }

            // Nocturne's Shroud of Darkness (W)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("ShroudofDarkness"))
            {
                // TODO: Get exact Nocturne's Shourd of Darkness buff name
                return true;
            }

            return false;
        }
Exemplo n.º 11
0
        public static bool IsInvulnerable(Obj_AI_Base target, DamageType damageType, bool ignoreShields = true)
        {
            var targetBuffs = new HashSet<string>(target.Buffs.Select(buff => buff.Name), StringComparer.OrdinalIgnoreCase);

            // Kindred's Lamb's Respite(R)
            if (targetBuffs.Contains("KindredRNoDeathBuff") && target.HealthPercent <= 10)
            {
                return true;
            }

            // Vladimir W
            if (targetBuffs.Contains("VladimirSanguinePool"))
            {
                return true;
            }

            // Tryndamere's Undying Rage (R)
            if (targetBuffs.Contains("UndyingRage") && target.Health <= target.MaxHealth * 0.10f)
            {
                return true;
            }

            // Kayle's Intervention (R)
            if (targetBuffs.Contains("JudicatorIntervention"))
            {
                return true;
            }

            if (ignoreShields)
            {
                return false;
            }

            // Morgana's Black Shield (E)
            if (targetBuffs.Contains("BlackShield") && damageType.Equals(DamageType.Magical))
            {
                return true;
            }

            // Banshee's Veil (PASSIVE)
            if (targetBuffs.Contains("bansheesveil") && damageType.Equals(DamageType.Magical))
            {
                return true;
            }

            // Sivir's Spell Shield (E)
            if (targetBuffs.Contains("SivirE") && damageType.Equals(DamageType.Magical))
            {
                return true;
            }

            // Nocturne's Shroud of Darkness (W)
            if (targetBuffs.Contains("NocturneShroudofDarkness") && damageType.Equals(DamageType.Magical))
            {
                return true;
            }

            return false;
        }
Exemplo n.º 12
0
 public static bool CompareDamageTypes(DamageType a, DamageType b)
 {
     return(a.Equals(DamageType.Inevitable) || b.Equals(DamageType.Inevitable) || a.Equals(b));
 }
Exemplo n.º 13
0
        public static bool IsInvulnerable(Obj_AI_Base target, DamageType damageType, bool ignoreShields = true)
        {
            // Tryndamere's Undying Rage (R)
            if (target.HasBuff("Undying Rage") && target.Health <= target.MaxHealth * 0.10f)
            {
                return true;
            }

            // Kayle's Intervention (R)
            if (target.HasBuff("JudicatorIntervention"))
            {
                return true;
            }

            if (ignoreShields)
            {
                return false;
            }

            // Morgana's Black Shield (E)
            if (damageType.Equals(DamageType.Magical) && target.HasBuff("BlackShield"))
            {
                return true;
            }

            if (damageType.Equals(DamageType.Magical) && target.HasSpellShield())
            {
                return true;
            }

            return false;
        }
        public bool Equals(DestinyItemInstanceComponent input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     DamageType == input.DamageType ||
                     (DamageType != null && DamageType.Equals(input.DamageType))
                     ) &&
                 (
                     DamageTypeHash == input.DamageTypeHash ||
                     (DamageTypeHash.Equals(input.DamageTypeHash))
                 ) &&
                 (
                     PrimaryStat == input.PrimaryStat ||
                     (PrimaryStat != null && PrimaryStat.Equals(input.PrimaryStat))
                 ) &&
                 (
                     ItemLevel == input.ItemLevel ||
                     (ItemLevel.Equals(input.ItemLevel))
                 ) &&
                 (
                     Quality == input.Quality ||
                     (Quality.Equals(input.Quality))
                 ) &&
                 (
                     IsEquipped == input.IsEquipped ||
                     (IsEquipped != null && IsEquipped.Equals(input.IsEquipped))
                 ) &&
                 (
                     CanEquip == input.CanEquip ||
                     (CanEquip != null && CanEquip.Equals(input.CanEquip))
                 ) &&
                 (
                     EquipRequiredLevel == input.EquipRequiredLevel ||
                     (EquipRequiredLevel.Equals(input.EquipRequiredLevel))
                 ) &&
                 (
                     UnlockHashesRequiredToEquip == input.UnlockHashesRequiredToEquip ||
                     (UnlockHashesRequiredToEquip != null && UnlockHashesRequiredToEquip.SequenceEqual(input.UnlockHashesRequiredToEquip))
                 ) &&
                 (
                     CannotEquipReason == input.CannotEquipReason ||
                     (CannotEquipReason != null && CannotEquipReason.Equals(input.CannotEquipReason))
                 ) &&
                 (
                     BreakerType == input.BreakerType ||
                     (BreakerType.Equals(input.BreakerType))
                 ) &&
                 (
                     BreakerTypeHash == input.BreakerTypeHash ||
                     (BreakerTypeHash.Equals(input.BreakerTypeHash))
                 ) &&
                 (
                     Energy == input.Energy ||
                     (Energy != null && Energy.Equals(input.Energy))
                 ));
        }
Exemplo n.º 15
0
        /// <summary>
        ///     Checks whether the target is invulnerable.
        /// </summary>
        /// <param name="target">
        ///     The target
        /// </param>
        /// <param name="damageType">
        ///     The damage type
        /// </param>
        /// <param name="ignoreShields">
        ///     The ignore shields
        /// </param>
        /// <returns>
        ///     The <see cref="bool" />
        /// </returns>
        public static bool IsInvulnerable(this Obj_AI_Base target, DamageType damageType, bool ignoreShields = true)
        {
            // Tryndamere's Undying Rage (R)
            if (!damageType.Equals(DamageType.True) && target.HasBuff("Undying Rage") && target.Health <= 2f)
            {
                return true;
            }

            // Kayle's Intervention (R)
            if (target.HasBuff("JudicatorIntervention"))
            {
                return true;
            }

            return false;
        }
Exemplo n.º 16
0
        public bool Equals(DestinyNodeStepDefinition input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     DisplayProperties == input.DisplayProperties ||
                     (DisplayProperties != null && DisplayProperties.Equals(input.DisplayProperties))
                     ) &&
                 (
                     StepIndex == input.StepIndex ||
                     (StepIndex.Equals(input.StepIndex))
                 ) &&
                 (
                     NodeStepHash == input.NodeStepHash ||
                     (NodeStepHash.Equals(input.NodeStepHash))
                 ) &&
                 (
                     InteractionDescription == input.InteractionDescription ||
                     (InteractionDescription != null && InteractionDescription.Equals(input.InteractionDescription))
                 ) &&
                 (
                     DamageType == input.DamageType ||
                     (DamageType != null && DamageType.Equals(input.DamageType))
                 ) &&
                 (
                     DamageTypeHash == input.DamageTypeHash ||
                     (DamageTypeHash.Equals(input.DamageTypeHash))
                 ) &&
                 (
                     ActivationRequirement == input.ActivationRequirement ||
                     (ActivationRequirement != null && ActivationRequirement.Equals(input.ActivationRequirement))
                 ) &&
                 (
                     CanActivateNextStep == input.CanActivateNextStep ||
                     (CanActivateNextStep != null && CanActivateNextStep.Equals(input.CanActivateNextStep))
                 ) &&
                 (
                     NextStepIndex == input.NextStepIndex ||
                     (NextStepIndex.Equals(input.NextStepIndex))
                 ) &&
                 (
                     IsNextStepRandom == input.IsNextStepRandom ||
                     (IsNextStepRandom != null && IsNextStepRandom.Equals(input.IsNextStepRandom))
                 ) &&
                 (
                     PerkHashes == input.PerkHashes ||
                     (PerkHashes != null && PerkHashes.SequenceEqual(input.PerkHashes))
                 ) &&
                 (
                     StartProgressionBarAtProgress == input.StartProgressionBarAtProgress ||
                     (StartProgressionBarAtProgress.Equals(input.StartProgressionBarAtProgress))
                 ) &&
                 (
                     StatHashes == input.StatHashes ||
                     (StatHashes != null && StatHashes.SequenceEqual(input.StatHashes))
                 ) &&
                 (
                     AffectsQuality == input.AffectsQuality ||
                     (AffectsQuality != null && AffectsQuality.Equals(input.AffectsQuality))
                 ) &&
                 (
                     StepGroups == input.StepGroups ||
                     (StepGroups != null && StepGroups.Equals(input.StepGroups))
                 ) &&
                 (
                     AffectsLevel == input.AffectsLevel ||
                     (AffectsLevel != null && AffectsLevel.Equals(input.AffectsLevel))
                 ) &&
                 (
                     SocketReplacements == input.SocketReplacements ||
                     (SocketReplacements != null && SocketReplacements.SequenceEqual(input.SocketReplacements))
                 ));
        }