Пример #1
0
        public static void FixIt()
        {
            // Butchery lets you "generate up to 10 runic power" upon kill
            SpellLineId.DeathKnightBloodButchery.Apply(spell =>
            {
                var effect    = spell.GetEffect(AuraType.Dummy);
                effect.IsProc = true;
                effect.ClearAffectMask();
                effect.AuraEffectHandlerCreator = () => new ProcEnergizeHandler();
            });

            FixScentOfBlood();

            // Mark of Blood only has Dummy and None effects
            SpellLineId.DeathKnightBloodMarkOfBlood.Apply(spell =>
            {
                // "that target is healed for $49005s2% of its maximum health"
                var effect2    = spell.Effects[1];
                effect2.IsProc = true;
                effect2.AuraEffectHandlerCreator = () => new MarkOfBloodAuraHandler();
            });

            // Vendetta has a dummy instead of a heal effect
            SpellLineId.DeathKnightBloodVendetta.Apply(spell =>
            {
                // "Heals you for up to $s1% of your maximum health whenever you kill a target that yields experience or honor."
                spell.GetEffect(AuraType.Dummy).AuraType = AuraType.RegenPercentOfTotalHealth;
            });

            // Hysteria does not drain life
            SpellLineId.DeathKnightBloodHysteria.Apply(spell =>
            {
                var effect      = spell.GetEffect(AuraType.Dummy2);
                effect.AuraType = AuraType.PeriodicDamagePercent;
            });

            // Sudden Doom: "Your Blood Strikes and Heart Strikes have a $h% chance to launch a free Death Coil at your target."
            SpellLineId.DeathKnightBloodSuddenDoom.Apply(spell =>
            {
                // only one dummy -> Trigger highest level of death coil that the caster has instead
                // set correct trigger spells
                var effect    = spell.GetEffect(AuraType.Dummy);
                effect.IsProc = true;
                effect.AddToAffectMask(SpellLineId.DeathKnightBloodStrike, SpellLineId.DeathKnightBloodHeartStrike);
                effect.AuraEffectHandlerCreator = () => new SuddenDoomAuraHandler();
            });
            SpellHandler.Apply(spell =>
            {
                // TODO: Scale bloodworm strength
                // TODO: "Caster receives health when the Bloodworm deals damage"
                // Amount of bloodworms is wrong
                var effect        = spell.GetEffect(SpellEffectType.Summon);
                effect.BasePoints = 1;
                effect.DiceSides  = 3;
            }, SpellId.EffectBloodworm);

            // Spell Deflection only has an Absorb effect, but should have a chance to reduce spell damage
            SpellLineId.DeathKnightBloodSpellDeflection.Apply(spell =>
            {
                spell.GetEffect(AuraType.SchoolAbsorb).AuraEffectHandlerCreator = () => new SpellDeflectionHandler();
            });

            // "the Frost and Unholy Runes will become Death Runes when they activate"
            DeathKnightFixes.MakeRuneConversionProc(SpellLineId.DeathKnightBloodDeathRuneMastery,
                                                    SpellLineId.DeathKnightDeathStrike, SpellLineId.DeathKnightObliterate,
                                                    RuneType.Death, RuneType.Frost, RuneType.Unholy);

            // Blood Presence is missing 4% life leech
            SpellLineId.DeathKnightBloodPresence.Apply(spell =>
            {
                var effect        = spell.AddAuraEffect(() => new LifeLeechPercentAuraHandler());
                effect.BasePoints = 4;
            });

            // Improved Blood Presence also applies the 4% life leech to the other two presences
            SpellLineId.DeathKnightBloodImprovedBloodPresence.Apply(spell =>
            {
                var leechEffect = spell.GetEffect(AuraType.Dummy);
                leechEffect.AuraEffectHandlerCreator = () => new LifeLeechPercentAuraHandler();
                leechEffect.AddRequiredActivationAuras(SpellLineId.DeathKnightUnholyPresence, SpellLineId.DeathKnightFrostPresence);
            });

            FixBloodBoil();
            FixDeathPact();

            // Heart Strike adds damage per disease on target
            SpellLineId.DeathKnightBloodHeartStrike.Apply(spell =>
            {
                var effect = spell.GetEffect(SpellEffectType.None);
                effect.SpellEffectHandlerCreator = (cast, effct) => new WeaponDiseaseDamagePercentHandler(cast, effct);
            });
            // The HS glyph procs on the wrong spell
            SpellHandler.Apply(spell => spell.GetEffect(AuraType.ProcTriggerSpell).SetAffectMask(SpellLineId.DeathKnightBloodHeartStrike),
                               SpellId.GlyphOfHeartStrike);

            // Vampiric blood increases health in %
            SpellLineId.DeathKnightBloodVampiricBlood.Apply(spell =>
            {
                var effect      = spell.GetEffect(AuraType.ModIncreaseHealth);
                effect.AuraType = AuraType.ModIncreaseHealthPercent;
            });

            // Blood Strike: "total damage increased by ${$m3/2}.1% for each of your diseases on the target"
            SpellLineId.DeathKnightBloodStrike.Apply(spell =>
            {
                spell.GetEffect(SpellEffectType.None).SpellEffectHandlerCreator =
                    (cast, effct) => new WeaponDiseaseDamageHalfPercentHandler(cast, effct);
            });

            // "Non-player victim spellcasting is also interrupted for $32747d."
            SpellLineId.DeathKnightStrangulate.Apply(spell => spell.AddTargetTriggerSpells(SpellId.InterruptRank1));
        }
Пример #2
0
        public static void FixIt()
        {
            FixMercilessCombat();

            // Chill of the grave does not have the right set of triggering proc spells
            SpellLineId.DeathKnightFrostChillOfTheGrave.Apply(spell =>
            {
                // "Chains of Ice, Howling Blast, Icy Touch and Obliterate"
                var effect = spell.GetEffect(AuraType.ProcTriggerSpellWithOverride);
                effect.ClearAffectMask();
                effect.AddAffectingSpells(SpellLineId.DeathKnightChainsOfIce, SpellLineId.DeathKnightFrostHowlingBlast,
                                          SpellLineId.DeathKnightIcyTouch, SpellLineId.DeathKnightObliterate);
            });

            // Improved Icy Touch needs to increase damage of Icy Touch
            SpellLineId.DeathKnightFrostImprovedIcyTouch.Apply(spell =>
            {
                // "Your Icy Touch does an additional $s1% damage"
                var effect       = spell.GetEffect(AuraType.Dummy);
                effect.AuraType  = AuraType.AddModifierPercent;
                effect.MiscValue = (int)SpellModifierType.SpellPower;
                effect.ClearAffectMask();
                effect.AddAffectingSpells(SpellLineId.DeathKnightIcyTouch);
            });

            FixBladeBarrier();
            FixRime();
            FixDeathKnightFrostAcclimation();
            FixTundraStalker();
            FixDeathKnightFrostHungeringCold();
            FixGlacierRot();
            FixFrostPresence();

            // Improved Frost Presence also applies the s1% stamina to the other two presences
            SpellLineId.DeathKnightFrostImprovedFrostPresence.Apply(spell =>
            {
                var retainEffect       = spell.GetEffect(AuraType.Dummy);
                retainEffect.AuraType  = AuraType.ModTotalStatPercent;
                retainEffect.MiscValue = -1;
                retainEffect.AddRequiredActivationAuras(SpellLineId.DeathKnightUnholyPresence, SpellLineId.DeathKnightBloodPresence);
            });

            // Icy Talons applies a buff, when casting FrostFever
            SpellLineId.DeathKnightFrostIcyTalons.Apply(spell =>
            {
                var effect = spell.GetEffect(AuraType.ProcTriggerSpellWithOverride);
                effect.ClearAffectMask();
                effect.AddAffectingSpells(SpellId.EffectFrostFever);
            });

            // Killing Machine: Proc chance scales with rank (10% per rank)
            SpellLineId.DeathKnightFrostKillingMachine.Apply(spell => spell.ProcChance = (uint)(10 * spell.Rank));

            FixObliterate();

            // Blood of the north converts runes when using "Blood Strike or Pestilence"
            DeathKnightFixes.MakeRuneConversionProc(SpellLineId.DeathKnightFrostBloodOfTheNorth,
                                                    SpellLineId.DeathKnightBloodStrike, SpellLineId.DeathKnightPestilence,
                                                    RuneType.Death, RuneType.Blood);

            // Improved Icy Talons only increases melee haste (not also ranged haste)
            SpellLineId.DeathKnightFrostImprovedIcyTalons.Apply(spell =>
            {
                spell.GetEffect(AuraType.ModHaste).AuraType = AuraType.ModMeleeHastePercent;
            });

            FixThreatOfThassarian();
            FixChainsOfIce();
        }
Пример #3
0
        public static void FixIt()
        {
            // Unholy Virulence has some incorrect restrictions
            SpellLineId.DeathKnightUnholyVirulence.Apply(spell =>
            {
                // Improves all Spells
                spell.GetEffect(AuraType.ModSpellHitChance).MiscValue = 0;
            });

            FixCorpseExplosion();

            // "Blood Strike or Pestilence" -> "the Blood Rune becomes a Death Rune"
            DeathKnightFixes.MakeRuneConversionProc(SpellLineId.DeathKnightUnholyReaping,
                                                    SpellLineId.DeathKnightBloodStrike, SpellLineId.DeathKnightPestilence,
                                                    RuneType.Death, RuneType.Blood);

            FixBloodCakedStrike();
            FixImpurity();

            // Dirge is only triggered by "Death Strike, Plague Strike and Scourge Strike"
            SpellLineId.DeathKnightUnholyDirge.Apply(spell =>
            {
                spell.ProcTriggerFlags = ProcTriggerFlags.DoneMeleeSpell;

                var effect = spell.GetEffect(AuraType.ProcTriggerSpellWithOverride);
                effect.ClearAffectMask();
                effect.AddAffectingSpells(SpellLineId.DeathKnightDeathStrike, SpellLineId.DeathKnightPlagueStrike, SpellLineId.DeathKnightUnholyScourgeStrike);
            });

            SpellLineId.DeathKnightUnholyMagicSuppression.Apply(spell =>
            {
                var effect = spell.GetEffect(AuraType.AddModifierFlat);
                effect.ClearAffectMask();
                effect.AddAffectingSpells(SpellLineId.DeathKnightAntiMagicShell);                               // only affects Anti Magic Shell
            });

            FixRageOfRivendare();
            FixUnholyPresence();

            // Improved Unholy Presence also applies the s1% movement speed to the other two presences and increases rune cooldown
            SpellLineId.DeathKnightUnholyImprovedUnholyPresence.Apply(spell =>
            {
                var retainEffect      = spell.GetEffect(AuraType.Dummy);
                retainEffect.AuraType = AuraType.ModIncreaseSpeed;
                retainEffect.AddRequiredActivationAuras(SpellLineId.DeathKnightBloodPresence, SpellLineId.DeathKnightFrostPresence);

                // "your runes finish their cooldowns $s2% faster in Unholy Presence"
                spell.GetEffect(AuraType.None).AuraEffectHandlerCreator = () => new ModAllRuneCooldownsPercentHandler();
            });

            FixAntiMagicZone();
            FixNecrosis();
            FixAntiMagicShell();

            // Scourge Strike adds damage per disease on target
            SpellLineId.DeathKnightUnholyScourgeStrike.Apply(spell =>
            {
                var effect = spell.GetEffect(SpellEffectType.Dummy);
                effect.SpellEffectHandlerCreator = (cast, effct) => new WeaponDiseaseDamagePercentHandler(cast, effct);
            });

            // Night of the Dead "Also reduces the damage your pet takes from creature area of effect attacks by $s3%."
            SpellLineId.DeathKnightUnholyNightOfTheDead.Apply(spell =>
            {
                // TODO: Pet-aura on owner
            });

            // Desecration has no affect mask
            SpellLineId.DeathKnightUnholyDesecration.Apply(spell =>
            {
                // "Plague Strikes and Scourge Strikes cause the Desecrated Ground effect"
                var effect = spell.GetEffect(AuraType.ProcTriggerSpell);
                effect.SetAffectMask(SpellLineId.DeathKnightPlagueStrike, SpellLineId.DeathKnightUnholyScourgeStrike);
            });

            FixDeathStrike();

            // Desolation has no AffectMask
            SpellLineId.DeathKnightUnholyDesolation.Apply(spell =>
                                                          spell.GetEffect(AuraType.ProcTriggerSpell).SetAffectMask(SpellLineId.DeathKnightBloodStrike));

            FixDeathCoil();

            // Death & Decay simply does periodic damage
            // TODO: "This ability produces a high amount of threat."
            SpellLineId.DeathKnightDeathAndDecay.Apply(spell =>
            {
                var effect      = spell.GetEffect(AuraType.Dummy2);
                effect.AuraType = AuraType.PeriodicDamage;
            });

            SpellLineId.DeathKnightRaiseAlly.Apply(spell =>
            {
                // TODO: Find corpse
                // TODO: Mark corpse unusable
                var effect            = spell.GetEffect(SpellEffectType.Dummy);
                effect.EffectType     = SpellEffectType.TriggerSpell;
                effect.TriggerSpellId = (SpellId)effect.CalcEffectValue();
            });
        }