コード例 #1
0
        public static void FixMe()
        {
            // conjure water and food don't have any per level bonus
            SpellLineId.MageConjureFood.Apply(spell => spell.ForeachEffect(effect => effect.RealPointsPerLevel  = 0));
            SpellLineId.MageConjureWater.Apply(spell => spell.ForeachEffect(effect => effect.RealPointsPerLevel = 0));

            SpellLineId.MageArcaneArcanePotency.Apply(spell =>
            {
                spell.GetEffect(AuraType.Dummy).AuraEffectHandlerCreator = () => new AddProcHandler(new ArcanePotencyProcHandler(
                                                                                                        ProcTriggerFlags.DoneBeneficialMagicSpell,
                                                                                                        spell.GetEffect(AuraType.Dummy).CalcEffectValue()));
            });

            SpellHandler.Apply(spell =>
            {
                spell.AddEffect((cast, effect) => new ClearCastingAndPresenceOfMindHandler(cast, effect), ImplicitSpellTargetType.Self);
            }, SpellId.EffectClearcasting, SpellId.MageArcanePresenceOfMind);


            // "When your Mana Shield, Frost Ward, Fire Ward, or Ice Barrier absorbs damage
            //  your spell damage is increased by $s1% of the amount absorbed for $44413d."
            SpellLineId.MageArcaneIncantersAbsorption.Apply(spell =>
            {
                var effect = spell.GetEffect(AuraType.Dummy);
                effect.AuraEffectHandlerCreator = () => new IncantersAbsorptionHandler();
            });
            //SpellHandler.Apply(spell => {
            //    var effect = spell.GetEffect(AuraType.ModDamageDone);
            //    if (effect != null)
            //    {
            //        effect.AuraEffectHandlerCreator = () => new IncantersAbsorption2Handler();
            //    }
            //},
            //SpellId.EffectClassSkillIncantersAbsorption);
        }
コード例 #2
0
ファイル: MiscSpells.cs プロジェクト: NecroSharper/WCell
 /// <summary>
 /// The default interrupt spell is used by a multitude of spells
 /// </summary>
 private static void FixDefaultInterrupt()
 {
     // Only for "Non-player victim"
     SpellHandler.Apply(spell =>
                        spell.GetEffect(SpellEffectType.InterruptCast).SpellEffectHandlerCreator = (cast, effct) => new NonPlayerVictimInterruptHandler(cast, effct),
                        SpellId.InterruptRank1);
 }
コード例 #3
0
        private static void FixUnholyFeverAndEbonPlague()
        {
            // Both diseases toggle this spell to increase disease damage taken percent
            var dmgAmplifier       = SpellHandler.AddCustomSpell(65142, "Overridden Disease Damage Percent");
            var dmgAmplifierEffect = dmgAmplifier.AddAuraEffect(() => new ModDiseaseDamagePercentHandler());

            dmgAmplifierEffect.OverrideEffectValue = true;

            // Crypt Fever does not proc correctly
            SpellLineId.DeathKnightUnholyCryptFever.Apply(spell =>
            {
                // proc when a new Aura is applied to a target
                spell.ProcTriggerFlags = ProcTriggerFlags.DoneHarmfulMagicSpell;

                var effect                      = spell.GetEffect(AuraType.OverrideClassScripts);
                effect.IsProc                   = true;
                effect.TriggerSpellId           = CryptFeverRanks[spell.Rank - 1];
                effect.AuraEffectHandlerCreator = () => new CryptFeverHandler();
                effect.ClearAffectMask();
            });

            // The Ebon Plague effect also "increases magic damage taken by $s2%"
            SpellHandler.Apply(spell =>
            {
                var effect      = spell.GetEffect(AuraType.Dummy);
                effect.AuraType = AuraType.ModDamageTakenPercent;
            }, EbonPlagueRanks);
        }
コード例 #4
0
ファイル: PaladinFixes.cs プロジェクト: NecroSharper/WCell
        private static void FixStrongBuffs()
        {
            // used by client only to prevent casting of Invul buffs
            var avengingWrathMarker2 = SpellHandler.AddCustomSpell(61988, "Invul Prevention");

            avengingWrathMarker2.IsPreventionDebuff = true;                                     // is prevention debuff
            avengingWrathMarker2.AddAuraEffect(AuraType.Dummy);                                 // make Aura
            avengingWrathMarker2.Attributes    |= SpellAttributes.InvisibleAura | SpellAttributes.UnaffectedByInvulnerability;
            avengingWrathMarker2.AttributesExC |= SpellAttributesExC.PersistsThroughDeath;
            //avengingWrathMarker2.Durations = new Spell.DurationEntry { Min = 180000, Max = 180000 };
            avengingWrathMarker2.Durations = new Spell.DurationEntry {
                Min = 120000, Max = 120000
            };

            SpellHandler.Apply(spell => spell.AddTargetTriggerSpells(SpellId.Forbearance),
                               SpellLineId.PaladinHandOfProtection,
                               //SpellLineId.PaladinLayOnHands,
                               SpellId.ClassSkillDivineShield,
                               SpellId.ClassSkillDivineProtection);

            SpellHandler.Apply(spell => spell.AddTargetTriggerSpells(SpellId.AvengingWrathMarker, avengingWrathMarker2.SpellId),
                               SpellLineId.PaladinHandOfProtection,
                               SpellId.ClassSkillAvengingWrath,
                               SpellId.ClassSkillDivineShield,
                               SpellId.ClassSkillDivineProtection);

            SpellHandler.Apply(spell => { spell.IsPreventionDebuff = true; },
                               SpellId.AvengingWrathMarker, SpellId.Forbearance);
        }
コード例 #5
0
        public static void FixRogue()
        {
            SpellLineId.RogueVanish.Apply(spell =>
            {
                spell.AddTriggerSpellEffect(SpellId.ClassSkillStealth);

                var effect = spell.GetEffectsWhere(eff => (int)eff.TriggerSpellId == 18461).First();
                spell.RemoveEffect(effect);
            });

            SpellLineId.RogueStealth.Apply(spell =>
            {
                var effect = spell.GetEffect(AuraType.ModStealth);
                effect.AuraEffectHandlerCreator = () => new RogueStealthHandler();
            });

            SpellLineId.RogueCloakOfShadows.Apply(spell =>
            {
                var effect = spell.GetEffect(SpellEffectType.TriggerSpell);
                effect.SpellEffectHandlerCreator = (cast, eff) => new CloakOfShadowsHandler(cast, eff);
            });

            SpellLineId.RogueSubtletyPreparation.Apply(Spell =>
            {
                var effect = Spell.GetEffect(SpellEffectType.Dummy);
                effect.SpellEffectHandlerCreator = (cast, eff) => new PreparationHandler(cast, eff);
            });

            SpellHandler.Apply(spell =>
            {
                spell.Effects[0].AuraEffectHandlerCreator =
                    () => new MasterOfSubtletyPeriodicHandler();
            }, SpellId.MasterOfSubtlety_2);
        }
コード例 #6
0
        public static void InitSneedSpells()
        {
            disarm = SpellHandler.Get(SpellId.Disarm_2);                          //disarm
            disarm.AISettings.SetCooldown(10000);
            disarm.OverrideAITargetDefinitions(DefaultTargetAdders.AddAreaSource, // random hostile nearby character
                                               DefaultTargetEvaluators.RandomEvaluator,
                                               DefaultTargetFilters.IsPlayer, DefaultTargetFilters.IsHostile);


            SpellHandler.Apply(spell => spell.CooldownTime = 20000, SpellId.MoltenMetal);
            SpellHandler.Apply(spell => spell.CooldownTime = 25000, SpellId.MeltOre);


            // Rhakzor's slam has a cooldown of about 12s
            SpellHandler.Apply(spell => { spell.AISettings.SetCooldown(10000, 14000); }, SpellId.RhahkZorSlam);


            SpellHandler.Apply(spell => spell.CooldownTime = 10000, SpellId.SmiteSlam);

            // remember the Spells for later use
            terrify = SpellHandler.Get(SpellId.Terrify);
            terrify.AISettings.SetCooldown(21000);
            terrify.OverrideAITargetDefinitions(DefaultTargetAdders.AddAreaSource,                      // random hostile nearby character
                                                DefaultTargetEvaluators.RandomEvaluator,
                                                DefaultTargetFilters.IsPlayer, DefaultTargetFilters.IsHostile);

            distractingPain = SpellHandler.Get(SpellId.DistractingPain);
            distractingPain.AISettings.SetCooldown(12000);
            distractingPain.OverrideAITargetDefinitions(DefaultTargetAdders.AddAreaSource,                      // random hostile nearby character
                                                        DefaultTargetEvaluators.RandomEvaluator,
                                                        DefaultTargetFilters.IsPlayer, DefaultTargetFilters.IsHostile);

            ejectSneed = SpellHandler.Get(SpellId.EjectSneed);
        }
コード例 #7
0
 static void AddProcTrigger(SpellId id, SpellId triggerId)
 {
     SpellHandler.Apply(spell =>
     {
         var effect            = spell.AddAuraEffect(AuraType.ProcTriggerSpell, ImplicitSpellTargetType.Self);
         effect.TriggerSpellId = triggerId;
     }, id);
 }
コード例 #8
0
ファイル: BlackrockSpire.cs プロジェクト: DanilaSokolov/WCell
 public static void InitSpells()
 {
     SpellHandler.Apply(spell =>
     {
         spell.HasHarmfulEffects = true;
         spell.GetEffect(SpellEffectType.SummonObjectWild).SpellEffectHandlerCreator = (cast, effect) => new SummonRookeryWhelpHandler(cast, effect);
     }, SpellId.CreateRookerySpawner);
 }
コード例 #9
0
 private static void FixForMob()
 {
     SpellHandler.Apply(spell =>
     {
         spell.CooldownTime = 500000;
         spell.Range        = new SimpleRange(0, 5);
     }, SpellId.HauntingSpirits);
 }
コード例 #10
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.
             */
        }
コード例 #11
0
 public static void FixRogue()
 {
     SpellHandler.Apply(spell =>
     {
         spell.RemoveEffect(SpellEffectType.ScriptEffect);
         var effect = spell.GetEffect(SpellEffectType.Dummy);
         effect.SpellEffectHandlerCreator = (cast, eff) => new ImprovedSprintHandler(cast, eff);
     }, SpellId.EffectImprovedSprint);
 }
コード例 #12
0
        public static void InitNPCs()
        {
            //Pandemonius
            pandemoniusEntry = NPCMgr.GetEntry(NPCId.Pandemonius);
            pandemoniusEntry.BrainCreator = pandemonius => new PandemoniusBrain(pandemonius);
            pandemoniusEntry.AddSpells(pandemoniusSpells);

            SpellHandler.Apply(spell => spell.AISettings.SetCooldown(15000, 25000), SpellId.VoidBlast);
            SpellHandler.Apply(spell => spell.CooldownTime = 20000, SpellId.DarkShell);
        }
コード例 #13
0
        public static void FixDeathKnight()
        {
            //Forceful Reflection is missing stat values
            SpellHandler.Apply(spell =>
            {
                spell.Effects[0].MiscValue  = (int)CombatRating.Parry;
                spell.Effects[0].MiscValueB = (int)StatType.Strength;
            },
                               SpellId.ClassSkillForcefulDeflectionPassive);

            // Only one Presence may be active at a time
            AuraHandler.AddAuraGroup(SpellLineId.DeathKnightBloodPresence, SpellLineId.DeathKnightFrostPresence, SpellLineId.DeathKnightUnholyPresence);
        }
コード例 #14
0
ファイル: PlayerSpells.cs プロジェクト: NecroSharper/WCell
        public static void FixSkills()
        {
            // Throw does not require to be behind the target
            SpellHandler.Apply(spell =>
            {
                spell.AttributesExB &= ~SpellAttributesExB.RequiresBehindTarget;
            },
                               SpellId.WeaponProficiencyThrow);

            // Jewelcrafting also gives Prospecting
            SpellHandler.Apply(spell => spell.AdditionallyTaughtSpells.Add(SpellHandler.Get(SpellId.ProfessionProspecting)),
                               SpellId.ProfessionJewelcraftingApprentice);
        }
コード例 #15
0
 static void FixRime()
 {
     // Rime should only proc on Obliterate
     SpellLineId.DeathKnightFrostRime.Apply(spell =>
     {
         var effect = spell.GetEffect(AuraType.ProcTriggerSpell);
         effect.ClearAffectMask();
         effect.AddAffectingSpells(SpellLineId.DeathKnightObliterate);
     });
     SpellHandler.Apply(spell =>
     {
         spell.AddEffect((cast, effct) => new RemoveCooldownEffectHandler(cast, effct), ImplicitSpellTargetType.Self);
     }, SpellId.EffectFreezingFog);
 }
コード例 #16
0
        public static void InitNPCs()
        {
            // (!)Rethilgore
            rethilgoreEntry = NPCMgr.GetEntry(NPCId.Rethilgore);
            rethilgoreEntry.AddSpell(SpellId.SoulDrain);                // add Rethilgore Spell
            rethilgoreEntry.BrainCreator = rethilgore => new RethilgoreBrain(rethilgore);

            // Rethilgore spell has a cooldown of about 30s
            SpellHandler.Apply(spell => { spell.CooldownTime = 30000; }, SpellId.SoulDrain);


            // (!)Baron Silverlaine
            baronsilverlaineEntry = NPCMgr.GetEntry(NPCId.BaronSilverlaine);
            baronsilverlaineEntry.AddSpell(SpellId.VeilOfShadow);
            SpellHandler.Apply(spell => { spell.CooldownTime = 15000; }, SpellId.VeilOfShadow);


            // (!)Commander Springvale
            commanderspringvaleEntry = NPCMgr.GetEntry(NPCId.CommanderSpringvale);
            commanderspringvaleEntry.AddSpell(SpellId.ClassSkillHammerOfJusticeRank2);
            commanderspringvaleEntry.AddSpell(SpellId.HolyLight_7);

            SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, SpellId.ClassSkillHammerOfJusticeRank2);
            SpellHandler.Apply(spell => { spell.CooldownTime = 45000; }, SpellId.HolyLight_7);


            // (!)Odo the Blindwatcher
            blindwatcherEntry = NPCMgr.GetEntry(NPCId.OdoTheBlindwatcher);
            blindwatcherEntry.AddSpell(SpellId.SkullforgeBrand);

            SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, SpellId.HowlingRage_3);


            // (!)Fenrus the Devourer
            fenrusEntry = NPCMgr.GetEntry(NPCId.FenrusTheDevourer);
            fenrusEntry.AddSpell(SpellId.ToxicSaliva);
            fenrusEntry.BrainCreator = fenrus => new FenrusBrain(fenrus);

            SpellHandler.Apply(spell => { spell.CooldownTime = 60000; }, SpellId.ToxicSaliva);


            // (!)Archmage Arugal
            arugalEntry = NPCMgr.GetEntry(NPCId.Arugal);
            arugalEntry.AddSpell(SpellId.Thundershock);
            arugalEntry.AddSpell(SpellId.VoidBolt);

            SpellHandler.Apply(spell => { spell.CooldownTime = 25000; }, SpellId.Thundershock);
            SpellHandler.Apply(spell => { spell.CooldownTime = 40000; }, SpellId.VoidBolt);
        }
コード例 #17
0
 private static void FixWanderingPlague()
 {
     // Wandering Plague has a proc and an AoE damage component
     SpellLineId.DeathKnightUnholyWanderingPlague.Apply(spell =>
     {
         var effect    = spell.GetEffect(AuraType.Dummy);
         effect.IsProc = true;
         effect.AuraEffectHandlerCreator = () => new WanderingPlagueProcHandler();
     });
     SpellHandler.Apply(spell =>
     {
         spell.GetEffect(SpellEffectType.SchoolDamage).SpellEffectHandlerCreator =
             (cast, effct) => new WanderingPlagueDamageHandler(cast, effct);
     }, SpellId.WanderingPlague_2);
 }
コード例 #18
0
ファイル: PaladinFixes.cs プロジェクト: NecroSharper/WCell
        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);
        }
コード例 #19
0
ファイル: NPCSpells.cs プロジェクト: NecroSharper/WCell
        private static void FixOthers()
        {
            SpellHandler.Apply(spell =>
            {
                spell.PowerCost    = 100;
                spell.CooldownTime = 2000;
                spell.Range        = new SimpleRange(0, 10);
            }, SpellId.ConeOfFire);

            SpellHandler.Apply(spell =>
            {
                spell.PowerCost    = 150;
                spell.CastDelay    = 3000;
                spell.CooldownTime = 6000;
            }, SpellId.Chilled);
        }
コード例 #20
0
        private static void FixBloodCakedStrike()
        {
            SpellLineId.DeathKnightUnholyBloodCakedBlade.Apply(spell =>
            {
                var effect    = spell.GetEffect(AuraType.Dummy);
                effect.IsProc = true;
                effect.AuraEffectHandlerCreator = () => new ProcTriggerSpellOnAutoAttackHandler();
            });

            SpellHandler.Apply(spell =>
            {
                // "hits for $50463s1% weapon damage plus ${$50463m1/2}.1% for each of your diseases on the target"
                spell.GetEffect(SpellEffectType.WeaponPercentDamage).SpellEffectHandlerCreator =
                    (cast, effct) => new WeaponDiseaseDamageHalfPercentHandler(cast, effct);
            }, SpellId.EffectBloodCakedStrike);
        }
コード例 #21
0
ファイル: WarsongGulch.cs プロジェクト: NecroSharper/WCell
        public static void AddFlagEffectHandler()
        {
            Spell       hordeFlagSpell = SpellHandler.Get(SpellId.WarsongFlag);
            SpellEffect heffect        = hordeFlagSpell.AddAuraEffect(() => new WarsongFlagsHandler(), ImplicitSpellTargetType.Duel);

            Spell       allianceFlagSpell = SpellHandler.Get(SpellId.SilverwingFlag);
            SpellEffect aeffect           = allianceFlagSpell.AddAuraEffect(() => new WarsongFlagsHandler(), ImplicitSpellTargetType.Duel);

            // Replacing the spelleffectHandler
            SpellHandler.Apply(spell =>
            {
                spell.Effects[0].SpellEffectHandlerCreator =
                    (cast, effct) => new SummonFlagEffectHandler(cast, effct);
            },
                               SpellId.HordeFlagDrop,
                               SpellId.AllianceFlagDrop);
        }
コード例 #22
0
        private static void FixDeathKnightFrostHungeringCold()
        {
            SpellLineId.DeathKnightFrostHungeringCold.Apply(spell =>
            {
                var effect             = spell.GetEffect(SpellEffectType.Dummy);
                effect.ImplicitTargetA = ImplicitSpellTargetType.AllEnemiesAroundCaster;
                effect.ImplicitTargetB = ImplicitSpellTargetType.None;

                effect.EffectType     = SpellEffectType.TriggerSpell;
                effect.TriggerSpellId = SpellId.HungeringColdRank1;
            });
            SpellHandler.Apply(spell =>
            {
                spell.ProcTriggerFlags = ProcTriggerFlags.None;
                spell.AddAuraEffect(() => new HungeringColdDebuffHandler());
            }, SpellId.HungeringColdRank1);
        }
コード例 #23
0
        private static void FixAntiMagicZone()
        {
            SpellLineId.DeathKnightUnholyAntiMagicZone.Apply(spell =>
            {
                // "The Anti-Magic Zone lasts for $51052d or until it absorbs ${$51052m1+2*$AP} spell damage."
                spell.SetDuration(0);                                                                                   // this spell has no duration (the area aura decides that)
                var effect           = spell.GetEffect(SpellEffectType.Summon);
                effect.APValueFactor = 2;                                                                               // value is used for NPC health
            });

            // The AreaAura of the AMZ must reduce the NPC's health as damage gets absorbed
            SpellHandler.Apply(spell =>
            {
                spell.AttributesExC ^= SpellAttributesExC.PersistsThroughDeath;                                         // remove when the totem's health is 0
                spell.GetEffect(AuraType.SchoolAbsorb).AuraEffectHandlerCreator = () => new AMZAuraHandler();
            }, SpellId.AntiMagicZone);
        }
コード例 #24
0
ファイル: HunterFixes.cs プロジェクト: NecroSharper/WCell
        public static void FixHunter()
        {
            // taming has an invalid target
            SpellHandler.Apply(spell =>
            {
                spell.GetEffect(AuraType.PeriodicTriggerSpell).ImplicitTargetA = ImplicitSpellTargetType.SingleEnemy;
            }, SpellId.ClassSkillTameBeast);

            // Only one Aspect can be active at a time
            AuraHandler.AddAuraGroup(SpellLineId.HunterAspectOfTheBeast, SpellLineId.HunterAspectOfTheCheetah,
                                     SpellLineId.HunterAspectOfTheDragonhawk, SpellLineId.HunterAspectOfTheHawk,
                                     SpellLineId.HunterAspectOfTheMonkey,
                                     SpellLineId.HunterAspectOfThePack, SpellLineId.HunterAspectOfTheViper,
                                     SpellLineId.HunterAspectOfTheWild);

            // Only one Sting per Hunter can be active on any one target
            AuraHandler.AddAuraGroup(SpellLineId.HunterSurvivalWyvernSting, SpellLineId.HunterSerpentSting,
                                     SpellLineId.HunterScorpidSting, SpellLineId.HunterViperSting, SpellLineId.HunterSerpentSting);

            // Sealed cooldowns
            SpellLineId.HunterScorpidSting.Apply(spell =>
            {
                spell.CooldownTime = 0;
            });

            SpellLineId.HunterConcussiveShot.Apply(spell =>
            {
                spell.CooldownTime = 12000;
            });

            SpellLineId.HunterSerpentSting.Apply(spell =>
            {
                spell.CooldownTime = 0;
            });

            SpellLineId.HunterViperSting.Apply(spell =>
            {
                spell.CooldownTime = 15000;
            });


            // Expose Weakness aura applied on the target  - Seems the spell has changed
            //SpellHandler.Apply(spell => spell.Effects[0].ImplicitTargetA = ImplicitTargetType.SingleEnemy,
            //                   SpellId.ExposeWeakness_2);
        }
コード例 #25
0
        private static void FixPassiveDiseaseTalent(SpellLineId passiveSpell, SpellId effectId)
        {
            //  the debuff needs to use the disease talent to apply damage
            SpellEffect passiveEffect = null;

            passiveSpell.Apply(spell =>
            {
                passiveEffect = spell.GetEffect(AuraType.Dummy);
                passiveEffect.APValueFactor      = 0.055f * 1.15f;
                passiveEffect.RealPointsPerLevel = 0;
            });

            SpellHandler.Apply(spell =>
            {
                var dmgEffect = spell.GetEffect(AuraType.PeriodicDamage);
                dmgEffect.EffectValueOverrideEffect = passiveEffect;                            // calculate damage based on the passive spell
            }, effectId);
        }
コード例 #26
0
ファイル: MageFixes.cs プロジェクト: NecroSharper/WCell
        private static void FixMageGlyphs()
        {
            // Glyph of Ice Block
            SpellHandler.Apply(
                spell =>
                spell.AddEffect((cast, effect) => new ClearSpellCooldownHandler(cast, effect), ImplicitSpellTargetType.Self),
                SpellLineId.MageIceBlock);

            // Glyph of Invisibility
            SpellHandler.Apply(spell => spell.Effects[0].AddAffectingSpells(SpellLineId.MageInvisibility), SpellId.GlyphOfInvisibility);

            // Glyph of Mana Gem
            SpellHandler.Apply(
                spell =>
                spell.Effects[0].AddAffectingSpells(SpellId.ReplenishManaRank1, SpellId.ReplenishManaRank2,
                                                    SpellId.ReplenishManaRank3, SpellId.ReplenishManaRank4,
                                                    SpellId.ReplenishManaRank5, SpellId.ReplenishManaRank6,
                                                    SpellId.ReplenishManaRank7), SpellId.GlyphOfManaGem);
        }
コード例 #27
0
        private static void FixScentOfBlood()
        {
            // Scent of Blood is triggered by "dodging, parrying or taking  direct damage"
            SpellLineId.DeathKnightBloodScentOfBlood.Apply(spell =>
            {
                var triggerSpellEffect = spell.GetEffect(AuraType.ProcTriggerSpell);
                spell.ClearEffects();                                                                                                           // remove all effects

                spell.ProcHitFlags = ProcHitFlags.Dodge | ProcHitFlags.Parry | ProcHitFlags.Block;
                // create custom handler
                var handler = new TriggerSpellProcHandlerTemplate(
                    SpellHandler.Get(triggerSpellEffect.TriggerSpellId),
                    spell.ProcTriggerFlags,
                    (target, action) =>
                {
                    var daction = action as DamageAction;
                    if (daction == null)
                    {
                        return(false);
                    }
                    return(daction.ActualDamage > 0 ||
                           daction.VictimState == VictimState.Parry || daction.VictimState == VictimState.Dodge);
                }
                    );

                // trigger the spell once per rank
                for (var i = 0; i < spell.Rank; i++)
                {
                    spell.AddProcHandler(handler);
                }
            });
            // The proc'ed Aura of SoB triggers a non-existing spell
            SpellHandler.Apply(spell =>
            {
                // "The next successful melee attack will generate 10 runic power"
                var effect        = spell.GetEffect(AuraType.ProcTriggerSpell);
                effect.BasePoints = 100;
                effect.IsProc     = true;
                effect.AuraEffectHandlerCreator = () => new ProcEnergizeHandler();
            },
                               SpellId.EffectScentOfBlood);
        }
コード例 #28
0
 private static void FixFeralSwiftness(SpellId origSpell, SpellId triggerSpell)
 {
     // Feral Swiftness should only be applied in Cat Form
     SpellHandler.Apply(spell =>
     {
         // only as cat
         // triggers the dodge effect spell
         spell.RequiredShapeshiftMask = ShapeshiftMask.Cat;
         spell.AddTriggerSpellEffect(triggerSpell);
     },
                        origSpell);
     SpellHandler.Apply(spell =>
     {
         // this spell applies the dodge bonus for Feral Swiftness
         // "increases your chance to dodge while in Cat Form, Bear Form and Dire Bear Form"
         // must be passive
         spell.Attributes            |= SpellAttributes.Passive;
         spell.RequiredShapeshiftMask = ShapeshiftMask.Cat | ShapeshiftMask.Bear | ShapeshiftMask.DireBear;
     },
                        triggerSpell);
 }
コード例 #29
0
ファイル: UtgardeKeep.cs プロジェクト: NecroSharper/WCell
        public static void InitNPCs()
        {
            // Dragonflayer Ironhelm
            dragonflayerIronhelm = NPCMgr.GetEntry(NPCId.DragonflayerIronhelm);

            dragonflayerIronhelm.AddSpell(SpellId.HeroicStrike_9);
            SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
                               SpellId.HeroicStrike_9);


            //Prince Keleseth
            SetupPrinceKeleseth();


            // Dragonflayer Ironhelm
            dragonflayerIronhelm = NPCMgr.GetEntry(NPCId.DragonflayerIronhelm);

            dragonflayerIronhelm.AddSpell(SpellId.HeroicStrike_9);
            SpellHandler.Apply(spell => { spell.CooldownTime = 5000; },
                               SpellId.HeroicStrike_9);
        }
コード例 #30
0
        static void FixUnholyBlight()
        {
            // Unholy Blight needs to proc an Aura when Death Coil is casted
            SpellLineId.DeathKnightUnholyUnholyBlight.Apply(spell =>
            {
                var effect      = spell.GetEffect(AuraType.Dummy);
                effect.AuraType = AuraType.ProcTriggerSpell;
                effect.AddToAffectMask(SpellLineId.DeathKnightDeathCoil);
                effect.TriggerSpellId = SpellId.ClassSkillUnholyBlight;
                //effect.AuraEffectHandlerCreator = () => new UnholyBlightHandler();
            });
            SpellHandler.Apply(spell =>
            {
                // add periodic damage
                spell.GetEffect(AuraType.PeriodicDamage).AuraEffectHandlerCreator = () => new UnholyBlightDamageHandler();

                // "preventing any diseases on the victim from being dispelled"
                var dispelImmEffect       = spell.AddAuraEffect(AuraType.DispelImmunity);
                dispelImmEffect.MiscValue = (int)DispelType.Disease;
            }, SpellId.ClassSkillUnholyBlight);
        }