Ejemplo n.º 1
0
        public static void FixSealsAndJudgements()
        {
            CreateSealCalculators();

            // Only one Judgement per Paladin can be active at any one time
            AuraHandler.AddAuraCasterGroup(AllJudgements);

            // only one seal can be active at a time
            SealAuraId = AuraHandler.AddAuraGroup(AllSeals);

            // applying of seals allows the carrier to use judgements
            AllowJudgementEffectHandler.AddTo(AllSeals);

            // Judgements trigger this spell to "unleash" the seal
            SpellHandler.Apply(spell =>
            {
                spell.AddTargetTriggerSpells(SpellId.Judgement_5);
                spell.AttributesExB &= ~SpellAttributesExB.RequiresBehindTarget;
            }, AllJudgements);

            // these 2 seals' 3rd effect should trigger the debuff but have wrong settings
            SpellHandler.Apply(spell =>
            {
                var triggerEffect            = spell.Effects[2];
                triggerEffect.AuraType       = AuraType.ProcTriggerSpell;
                triggerEffect.TriggerSpellId = (SpellId)triggerEffect.BasePoints;
            },
                               SpellLineId.PaladinSealOfVengeance, SpellLineId.PaladinSealOfRighteousness);

            // Seal Of Righteousness is a positive aura and should be reapplied
            SpellHandler.Apply(spell =>
            {
                spell.HasBeneficialEffects = true;
            }, SpellLineId.PaladinSealOfRighteousness);

            /*
             * Most Judgements' ProcTriggerSpells need to be changed to use customized values, depending on spellpower, weapon damage etc...
             *
             *              - SpellLineId.PaladinSealOfJustice
             *                      -> Should work
             *              - SpellLineId.PaladinSealOfWisdom
             *                      -> Should work
             *
             *              - SpellLineId.PaladinSealOfRighteousness:
             *                      -> ClassSkillJudgementOfRighteousnessRank1: Dmg + ${$cond($eq($HND,1),0.85*($m1*1.2*1.03*$MWS/100)+0.03*($MW+$mw)/2-1,1.2*($m1*1.2*1.03*$MWS/100)+0.03*($MW+$mw)/2+1)}
             *
             *              - SpellLineId.PaladinSealOfLight:
             *                      -> EffectSealOfLight heals for ${0.15*$AP+0.15*$SPH}
             *
             *              - SpellLineId.PaladinSealOfVengeance:
             *                      -> ClassSkillJudgementOfVengeanceRank1:
             *                              - Dmg + ${(0.013*$SPH+0.025*$AP)*6} + 10% for each application of Blood Corruption on the target
             *                              - Once stacked to $31803u times, each of the Paladin's attacks also deals $42463s1% weapon damage as additional Holy damage.
             *
             *              - SpellLineId.PaladinRetributionSealOfCommand
             *                      -> All melee attacks deal ${0.36*$mw} to ${0.36*$MW} additional Holy damage.  When used with attacks or abilities that strike a single target, this additional Holy damage will strike up to 2 additional targets.
             */
        }
Ejemplo n.º 2
0
        public static void FixPaladin()
        {
            FixBlessings();
            FixStrongBuffs();
            FixHolyShock();

            // Players may only have one Hand on them per Paladin at any one time
            AuraHandler.AddAuraCasterGroup(
                SpellLineId.PaladinHandOfFreedom,
                SpellLineId.PaladinHandOfProtection,
                SpellLineId.PaladinHandOfReckoning,
                SpellLineId.PaladinHandOfSacrifice,
                SpellLineId.PaladinHandOfSalvation);
        }
Ejemplo n.º 3
0
        private static void FixBlessings()
        {
            // Normal and Greater blessings are mutually exclusive
            AuraHandler.AddAuraGroup(SpellLineId.PaladinBlessingOfKings, SpellLineId.PaladinGreaterBlessingOfKings);
            AuraHandler.AddAuraGroup(SpellLineId.PaladinBlessingOfMight, SpellLineId.PaladinGreaterBlessingOfMight);
            AuraHandler.AddAuraGroup(SpellLineId.PaladinBlessingOfWisdom, SpellLineId.PaladinGreaterBlessingOfWisdom);

            // only one blessing per pala
            AuraHandler.AddAuraCasterGroup(
                SpellLineId.PaladinBlessingOfKings,
                SpellLineId.PaladinBlessingOfMight,
                SpellLineId.PaladinBlessingOfWisdom,
                SpellLineId.PaladinGreaterBlessingOfKings,
                SpellLineId.PaladinGreaterBlessingOfMight,
                SpellLineId.PaladinGreaterBlessingOfWisdom,
                SpellLineId.PaladinGreaterBlessingOfSanctuary);

            // Sanctuary is a bit more complicated
            SpellHandler.Apply(spell =>
            {
                // first effect should mod damage taken
                var firstEffect = spell.Effects[0];
                if (firstEffect.EffectType == SpellEffectType.Dummy)
                {
                    firstEffect.EffectType = SpellEffectType.ApplyAura;
                    firstEffect.AuraType   = AuraType.ModDamageTakenPercent;
                }

                // Custom proc (target = the one who is blessed):
                // "When the target blocks, parries, or dodges a melee attack the target will gain $57319s1% of maximum displayed mana."
                spell.AddProcHandler(new TriggerSpellProcHandlerTemplate(
                                         SpellHandler.Get(SpellId.BlessingOfSanctuary),
                                         spell.ProcTriggerFlags,
                                         ProcHandler.DodgeBlockOrParryValidator
                                         ));

                // add str & stam
                var strEff        = spell.AddAuraEffect(AuraType.ModStatPercent, ImplicitSpellTargetType.SingleFriend);
                strEff.MiscValue  = (int)StatType.Strength;
                strEff.BasePoints = 10;

                var stamEff        = spell.AddAuraEffect(AuraType.ModStatPercent, ImplicitSpellTargetType.SingleFriend);
                stamEff.MiscValue  = (int)StatType.Stamina;
                stamEff.BasePoints = 10;
            },
                               SpellLineId.PaladinProtectionBlessingOfSanctuary,
                               SpellLineId.PaladinGreaterBlessingOfSanctuary);
        }
Ejemplo n.º 4
0
        public static void FixIt()
        {
            // Improved Berserker Range can only be proc'ed by Berserker Rage
            SpellLineId.WarriorFuryImprovedBerserkerRage.Apply(spell =>
            {
                spell.AddCasterProcSpells(SpellLineId.WarriorBerserkerRage);
            });

            // Blood Thirst deals damage in % of AP and triggers a proc aura
            // It's proc'ed heal spell heals in % and not a flat value
            SpellLineId.WarriorFuryBloodthirst.Apply(spell =>
            {
                var effect = spell.GetEffect(SpellEffectType.SchoolDamage);
                effect.SpellEffectHandlerCreator = (cast, eff) => new SchoolDamageByAPPctEffectHandler(cast, eff);

                var triggerEffect            = spell.GetEffect(SpellEffectType.Dummy);
                triggerEffect.EffectType     = SpellEffectType.TriggerSpell;
                triggerEffect.TriggerSpellId = SpellId.ClassSkillBloodthirst;
            });
            SpellHandler.Apply(spell =>
            {
                var effect        = spell.GetEffect(SpellEffectType.Heal);
                effect.EffectType = SpellEffectType.RestoreHealthPercent;
                effect.BasePoints = 0;                  // only 1%
            }, SpellId.EffectClassSkillBloodthirst);

            // Intercept should also deal "${$AP*0.12} damage"
            SpellLineId.WarriorIntercept.Apply(spell =>
            {
                var effect           = spell.AddEffect(SpellEffectType.SchoolDamage, ImplicitSpellTargetType.SingleEnemy);
                effect.APValueFactor = 0.12f;
            });

            // There is only one shout per warrior
            AuraHandler.AddAuraCasterGroup(SpellLineId.WarriorBattleShout, SpellLineId.WarriorCommandingShout);
        }
Ejemplo n.º 5
0
        public static void FixWarlock()
        {
            // Curse of Doom cannot be casted on Players and spawns a Demon on target death
            SpellLineId.WarlockCurseOfDoom.Apply(spell =>
            {
                spell.CanCastOnPlayer = false;
                spell.Effects[0].AuraEffectHandlerCreator = () => new SummonDoomguardOnDeathHandler();
            });

            // Armors are mutually exclusive
            AuraHandler.AddAuraGroup(SpellLineId.WarlockFelArmor, SpellLineId.WarlockDemonArmor, SpellLineId.WarlockDemonSkin);

            // can't have more than one of these per caster
            AuraHandler.AddAuraCasterGroup(
                SpellLineId.WarlockCurseOfTongues, SpellLineId.WarlockCurseOfTheElements,
                SpellLineId.WarlockCurseOfDoom, SpellLineId.WarlockCurseOfAgony,
                SpellLineId.WarlockCurseOfWeakness, SpellLineId.WarlockAfflictionCurseOfExhaustion);

            // Shadowflame DoT
            SpellHandler.Apply(spell => spell.AddTargetTriggerSpells(SpellId.Shadowflame_3), SpellId.ClassSkillShadowflameRank1);
            SpellHandler.Apply(spell => spell.AddTargetTriggerSpells(SpellId.Shadowflame_5), SpellId.ClassSkillShadowflameRank2);
            SpellHandler.Apply(spell =>
            {
                spell.Effects[0].ImplicitTargetA = ImplicitSpellTargetType.ConeInFrontOfCaster;
                spell.AddAuraEffect(() => new ApplyImmolateStateHandler(), ImplicitSpellTargetType.SingleEnemy);
            }, SpellId.Shadowflame_3);
            SpellHandler.Apply(spell =>
            {
                spell.Effects[0].ImplicitTargetA = ImplicitSpellTargetType.ConeInFrontOfCaster;
                spell.AddAuraEffect(() => new ApplyImmolateStateHandler(), ImplicitSpellTargetType.SingleEnemy);
            }, SpellId.Shadowflame_5);

            // Incinerate has extra damage if target has Immolate
            SpellLineId.WarlockIncinerate.Apply(spell =>
                                                spell.Effects[0].SpellEffectHandlerCreator = (cast, effect) => new IncreaseDamageIfAuraPresentHandler(cast, effect));

            // Demonic Circle Teleport
            var teleReqSpell = SpellHandler.AddCustomSpell(62388, "DemonicCircleTeleportRequirement");

            teleReqSpell.IsPreventionDebuff = false;
            teleReqSpell.AddAuraEffect(AuraType.Dummy);
            teleReqSpell.Attributes |= SpellAttributes.InvisibleAura;
            teleReqSpell.Durations   = new Spell.DurationEntry {
                Min = 360000, Max = 360000
            };
            SpellHandler.Apply(spell =>
            {
                var efct       = spell.AddEffect(SpellEffectType.Dummy, ImplicitSpellTargetType.None);
                efct.MiscValue = (int)GOEntryId.DemonicCircleSummon;
                efct.SpellEffectHandlerCreator = (cast, effect) => new RecallToGOHandler(cast, effect);
                spell.AddCasterTriggerSpells(teleReqSpell);
            }, SpellId.ClassSkillDemonicCircleTeleport);

            // Demonic Circle Summon
            SpellHandler.Apply(spell => spell.AddCasterTriggerSpells(teleReqSpell.SpellId), SpellLineId.WarlockDemonicCircleSummon);

            //life tap
            SpellHandler.Apply(spell =>
            {
                var spellEffect = spell.GetEffect(SpellEffectType.Dummy);
                spellEffect.SpellEffectHandlerCreator = (cast, effect) => new LifeTapHandler(cast, effect);
            }, SpellLineId.WarlockLifeTap);

            SpellLineId.WarlockImmolate.Apply(spell =>
            {
                spell.AddAuraEffect(() => new ApplyImmolateStateHandler(), ImplicitSpellTargetType.SingleEnemy);
            });

            SpellLineId.WarlockDestructionConflagrate.Apply(spell =>
            {
                var dmgeff         = spell.GetEffect(SpellEffectType.SchoolDamage);
                var periodicdmgeff = spell.GetEffect(AuraType.PeriodicDamage);
                dmgeff.SpellEffectHandlerCreator        = (cast, effect) => new ConflagrateHandler(cast, effect);
                periodicdmgeff.AuraEffectHandlerCreator = () => new ConflagratePeriodicHandler();
            });
        }