예제 #1
0
        private static bool IsEzKillable()
        {
            if (!Menu.Item("ezKillCheck").GetValue <bool>())
            {
                return(false);
            }
            int  totalDamage = 0;
            int  plusPerc    = 0;
            uint reqMana     = 0;

            if (Ethereal != null && Ethereal.CanBeCasted() &&
                Menu.Item("magicItems").GetValue <AbilityToggler>().IsEnabled(Ethereal.Name))
            {
                totalDamage +=
                    (int)
                    Target.SpellDamageTaken((int)(Me.TotalIntelligence * 2) + 75, DamageType.Magical, Me,
                                            Ethereal.Name);
                plusPerc += 40;
                reqMana  += Ethereal.ManaCost;
            }

            if (Veil != null && Veil.CanBeCasted() &&
                Menu.Item("magicItems").GetValue <AbilityToggler>().IsEnabled(Veil.Name))
            {
                plusPerc += 25;
                reqMana  += Veil.ManaCost;
            }


            if (Silence != null && Silence.CanBeCasted() &&
                Menu.Item("abilities").GetValue <AbilityToggler>().IsEnabled(Silence.Name))
            {
                plusPerc += (int)((Silence.Level - 1) * 5 + 30);
                reqMana  += Silence.ManaCost;
            }


            if (Dagon != null && Dagon.CanBeCasted()
                /*Menu.Item("magicItems").GetValue<AbilityToggler>().IsEnabled("item_dagon")*/)
            {
                totalDamage +=
                    (int)
                    Target.SpellDamageTaken(Dagon.GetAbilityData("damage"), DamageType.Magical, Me, Dagon.Name,
                                            minusMagicResistancePerc: plusPerc);
                reqMana += Dagon.ManaCost;
            }


            if (Bolt != null && Bolt.CanBeCasted() &&
                Menu.Item("abilities").GetValue <AbilityToggler>().IsEnabled(Bolt.Name))
            {
                if (Bolt.Level < 4)
                {
                    totalDamage +=
                        (int)
                        Target.SpellDamageTaken((Bolt.GetAbilityData("bolt_damage") + Me.TotalIntelligence * 1.6f) * 1,
                                                DamageType.Magical, Me, Bolt.Name, minusMagicResistancePerc: plusPerc);
                    reqMana += Bolt.ManaCost;
                }

                else
                {
                    totalDamage +=
                        (int)
                        Target.SpellDamageTaken((Bolt.GetAbilityData("bolt_damage") + Me.TotalIntelligence * 1.6f) * 2,
                                                DamageType.Magical, Me, Bolt.Name, minusMagicResistancePerc: plusPerc);
                    reqMana += Bolt.ManaCost * 2;
                }
            }

            if (Slow != null && Slow.CanBeCasted() &&
                Menu.Item("abilities").GetValue <AbilityToggler>().IsEnabled(Slow.Name))
            {
                totalDamage +=
                    (int)
                    Target.SpellDamageTaken(Slow.GetAbilityData("damage"), DamageType.Magical, Me, Slow.Name,
                                            minusMagicResistancePerc: plusPerc);
                reqMana += Slow.ManaCost;
            }


            if (Me.CanAttack())
            {
                totalDamage += (int)Target.DamageTaken(Me.DamageAverage * 2, DamageType.Physical, Me);
            }

            return(reqMana < Me.Mana && Target.Health < totalDamage);
        }