private void PulseRotattion()
        {
            //actions=auto_attack
            //actions+=/rebuke
            //actions+=/potion,name=old_war,if=(buff.bloodlust.react|buff.avenging_wrath.up|buff.crusade.up&buff.crusade.remains<25|target.time_to_die<=40)
            //actions+=/use_item,name=faulty_countermeasure,if=(buff.avenging_wrath.up|buff.crusade.up)
            //actions+=/blood_fury
            //actions+=/berserking
            //actions+=/arcane_torrent,if=holy_power<5&(buff.crusade.up|buff.avenging_wrath.up|time<2)
            //actions+=/judgment,if=time<2
            //actions+=/blade_of_justice,if=time<2&(equipped.137048|race.blood_elf)
            //actions+=/divine_hammer,if=time<2&(equipped.137048|race.blood_elf)
            //actions+=/wake_of_ashes,if=holy_power<=1&time<2
            //actions+=/holy_wrath
            //actions+=/avenging_wrath
            //actions+=/shield_of_vengeance
            //actions+=/crusade,if=holy_power>=5&!equipped.137048|((equipped.137048|race.blood_elf)&time<2|time>2&holy_power>=4)

            //actions+=/execution_sentence,if=spell_targets.divine_storm<=3&(cooldown.judgment.remains<gcd*4.5|debuff.judgment.remains>gcd*4.67)&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*2)
            if (TalentExecutionSentence && CanCastFinisher3hp)
            {
                if (TargetsDivineStorm <= 3 && (Judgement.SpellCooldownRemaining < Gcd * 4.5 || JudgementDebuff.TargetDebuffRemaining > Gcd * 4.67) &&
                    (!TalentCrusade || Crusade.SpellCooldownRemaining > Gcd * 2))
                {
                    if (ExecutionSentence.SpellCanCast && InMeleeRange)
                    {
                        ExecutionSentence.Cast();
                        return;
                    }
                }
            }


            //actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&buff.divine_purpose.up&buff.divine_purpose.remains<gcd*2
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && TargetsDivineStorm >= 2 && DivinePurpose.PlayerBuff && DivinePurpose.PlayerBuffRemaining < Gcd * 2)
                {
                    if (DivineStorm.SpellCanCastBlind && InMeleeRange)
                    {
                        DivineStorm.Cast();
                        return;
                    }
                }
            }

            //actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&holy_power>=5&buff.divine_purpose.react
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && TargetsDivineStorm >= 2 && HolyPower >= 5 && DivinePurpose.PlayerBuff)
                {
                    if (DivineStorm.SpellCanCastBlind && InMeleeRange)
                    {
                        DivineStorm.Cast();
                        return;
                    }
                }
            }

            //actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&holy_power>=3&buff.crusade.up&(buff.crusade.stack<15|buff.bloodlust.up)
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && TargetsDivineStorm >= 2 && HolyPower >= 3 && Crusade.PlayerBuff && (Crusade.PlayerBuffStacks < 15 || BloodLustUp))
                {
                    if (DivineStorm.SpellCanCastBlind && InMeleeRange)
                    {
                        DivineStorm.Cast();
                        return;
                    }
                }
            }

            //actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&holy_power>=5&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*3)
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && TargetsDivineStorm >= 2 && HolyPower >= 5 && (!TalentCrusade || Crusade.PlayerBuffRemaining > Gcd * 3))
                {
                    if (DivineStorm.SpellCanCastBlind && InMeleeRange)
                    {
                        DivineStorm.Cast();
                        return;
                    }
                }
            }

            //actions+=/templars_verdict,if=debuff.judgment.up&buff.divine_purpose.up&buff.divine_purpose.remains<gcd*2
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && DivinePurpose.PlayerBuff && DivinePurpose.PlayerBuffRemaining < Gcd * 2)
                {
                    if (TemplarVerdict.SpellCanCast && InMeleeRange)
                    {
                        TemplarVerdict.Cast();
                        return;
                    }
                }
            }

            //actions+=/templars_verdict,if=debuff.judgment.up&holy_power>=5&buff.divine_purpose.react
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && HolyPower >= 5 && DivinePurpose.PlayerBuff)
                {
                    if (TemplarVerdict.SpellCanCast && InMeleeRange)
                    {
                        TemplarVerdict.Cast();
                        return;
                    }
                }
            }

            //actions+=/templars_verdict,if=debuff.judgment.up&holy_power>=3&buff.crusade.up&(buff.crusade.stack<15|buff.bloodlust.up)
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && HolyPower >= 3 && Crusade.PlayerBuff && (Crusade.PlayerBuffStacks < 15 || BloodLustUp))
                {
                    if (TemplarVerdict.SpellCanCast && InMeleeRange)
                    {
                        TemplarVerdict.Cast();
                        return;
                    }
                }
            }

            //actions+=/templars_verdict,if=debuff.judgment.up&holy_power>=5&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*3)
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && HolyPower >= 5 && (!TalentCrusade || Crusade.SpellCooldownRemaining > Gcd * 3))
                {
                    if (TemplarVerdict.SpellCanCast && InMeleeRange)
                    {
                        TemplarVerdict.Cast();
                        return;
                    }
                }
            }

            //actions+=/divine_storm,if=debuff.judgment.up&holy_power>=3&spell_targets.divine_storm>=2&(cooldown.wake_of_ashes.remains<gcd*2&artifact.wake_of_ashes.enabled|buff.whisper_of_the_nathrezim.up&buff.whisper_of_the_nathrezim.remains<gcd)&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*4)
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && HolyPower >= 3 && TargetsDivineStorm >= 2 &&
                    (WakeOfAshes.SpellCooldownRemaining < Gcd * 2 /*&& true*/ || WhisperOfTheNathrezim.PlayerBuff && WhisperOfTheNathrezim.PlayerBuffRemaining < Gcd) &&
                    (!TalentCrusade || Crusade.SpellCooldownRemaining > Gcd * 4))
                {
                    if (DivineStorm.SpellCanCastBlind && InMeleeRange)
                    {
                        DivineStorm.Cast();
                        return;
                    }
                }
            }

            //actions+=/templars_verdict,if=debuff.judgment.up&holy_power>=3&(cooldown.wake_of_ashes.remains<gcd*2&artifact.wake_of_ashes.enabled|buff.whisper_of_the_nathrezim.up&buff.whisper_of_the_nathrezim.remains<gcd)&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*4)
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && HolyPower >= 3 &&
                    (WakeOfAshes.SpellCooldownRemaining < Gcd * 2 /*&& true*/ || WhisperOfTheNathrezim.PlayerBuff && WhisperOfTheNathrezim.PlayerBuffRemaining < Gcd) &&
                    (!TalentCrusade || Crusade.SpellCooldownRemaining > Gcd * 4))
                {
                    if (TemplarVerdict.SpellCanCast && InMeleeRange)
                    {
                        TemplarVerdict.Cast();
                        return;
                    }
                }
            }

            //actions+=/wake_of_ashes,if=holy_power=0|holy_power=1&(cooldown.blade_of_justice.remains>gcd|cooldown.divine_hammer.remains>gcd)|holy_power=2&(cooldown.zeal.charges_fractional<=0.65|cooldown.crusader_strike.charges_fractional<=0.65)
            if (HolyPower <= 1 && (BladeOfJustice.SpellCooldownRemaining > Gcd || DivineHammer.SpellCooldownRemaining > Gcd) ||
                HolyPower == 2 && (Zeal.SpellChargesFractional <= 0.65 || CrusaderStrike.SpellChargesFractional <= 0.65))
            {
                if (WakeOfAshes.SpellCanCastBlind && InMeleeRange)
                {
                    WakeOfAshes.Cast();
                    return;
                }
            }

            //actions+=/blade_of_justice,if=holy_power<=3&buff.whisper_of_the_nathrezim.up&buff.whisper_of_the_nathrezim.remains>gcd&buff.whisper_of_the_nathrezim.remains<gcd*3&debuff.judgment.up&debuff.judgment.remains>gcd*2
            if (!TalentDivineHammer)
            {
                if (HolyPower <= 3 && WhisperOfTheNathrezim.PlayerBuff && WhisperOfTheNathrezim.PlayerBuffRemaining > Gcd && WhisperOfTheNathrezim.PlayerBuffRemaining < Gcd * 3 &&
                    JudgementDebuff.TargetDebuff && JudgementDebuff.TargetDebuffRemaining > Gcd * 2)
                {
                    if (BladeOfJustice.SpellCanCast)
                    {
                        BladeOfJustice.Cast();
                        return;
                    }
                }
            }

            //actions+=/divine_hammer,if=holy_power<=3&buff.whisper_of_the_nathrezim.up&buff.whisper_of_the_nathrezim.remains>gcd&buff.whisper_of_the_nathrezim.remains<gcd*3&debuff.judgment.up&debuff.judgment.remains>gcd*2
            if (TalentDivineHammer)
            {
                if (HolyPower <= 3 && WhisperOfTheNathrezim.PlayerBuff && WhisperOfTheNathrezim.PlayerBuffRemaining > Gcd && WhisperOfTheNathrezim.PlayerBuffRemaining < Gcd * 3 &&
                    JudgementDebuff.TargetDebuff && JudgementDebuff.TargetDebuffRemaining > Gcd * 2)
                {
                    if (DivineHammer.SpellCanCastBlind && InMeleeRange)
                    {
                        DivineHammer.Cast();
                        return;
                    }
                }
            }

            //actions+=/blade_of_justice,if=talent.blade_of_wrath.enabled&holy_power<=3
            if (!TalentDivineHammer)
            {
                if (TalentBladeOfWrath && HolyPower <= 3)
                {
                    if (BladeOfJustice.SpellCanCast)
                    {
                        BladeOfJustice.Cast();
                        return;
                    }
                }
            }

            //actions+=/zeal,if=charges=2&holy_power<=4
            if (TalentZeal)
            {
                if (Zeal.SpellCharges == 2 && HolyPower <= 4)
                {
                    if (Zeal.SpellCanCastBlind && InMeleeRange)
                    {
                        Zeal.Cast();
                        return;
                    }
                }
            }

            //actions+=/crusader_strike,if=charges=2&holy_power<=4
            if (!TalentZeal)
            {
                if (CrusaderStrike.SpellCharges == 2 && HolyPower <= 4)
                {
                    if (CrusaderStrike.SpellCanCastBlind && InMeleeRange)
                    {
                        CrusaderStrike.Cast();
                        return;
                    }
                }
            }

            //actions+=/blade_of_justice,if=holy_power<=2|(holy_power<=3&(cooldown.zeal.charges_fractional<=1.34|cooldown.crusader_strike.charges_fractional<=1.34))
            if (!TalentDivineHammer)
            {
                if (HolyPower <= 2 || (HolyPower <= 3 && (Zeal.SpellChargesFractional <= 1.34 || CrusaderStrike.SpellChargesFractional <= 1.34)))
                {
                    if (BladeOfJustice.SpellCanCast)
                    {
                        BladeOfJustice.Cast();
                        return;
                    }
                }
            }

            //actions+=/divine_hammer,if=holy_power<=2|(holy_power<=3&(cooldown.zeal.charges_fractional<=1.34|cooldown.crusader_strike.charges_fractional<=1.34))
            if (TalentDivineHammer)
            {
                if (HolyPower <= 2 || (HolyPower <= 3 && (Zeal.SpellChargesFractional <= 1.34 || CrusaderStrike.SpellChargesFractional <= 1.34)))
                {
                    if (DivineHammer.SpellCanCastBlind && InMeleeRange)
                    {
                        DivineHammer.Cast();
                        return;
                    }
                }
            }

            //actions+=/judgment,if=holy_power>=3|((cooldown.zeal.charges_fractional<=1.67|cooldown.crusader_strike.charges_fractional<=1.67)&(cooldown.divine_hammer.remains>gcd|cooldown.blade_of_justice.remains>gcd))|(talent.greater_judgment.enabled&target.health.pct>50)
            if (HolyPower >= 3 ||
                ((Zeal.SpellChargesFractional <= 1.67 || CrusaderStrike.SpellChargesFractional <= 1.67) &&
                 (DivineHammer.SpellCooldownRemaining > Gcd || BladeOfJustice.SpellCooldownRemaining > Gcd)) || (TalentGreaterJudgment && WoW.TargetHealthPercent > 50))
            {
                if (Judgement.SpellCanCast && InMeleeRange)
                {
                    Judgement.Cast();
                    return;
                }
            }

            //actions+=/consecration
            if (TalentConsecration)
            {
                if (true)
                {
                    if (Consecration.SpellCanCastBlind && InMeleeRange)
                    {
                        Consecration.Cast();
                        return;
                    }
                }
            }

            //actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&buff.divine_purpose.react
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && TargetsDivineStorm >= 2 && DivinePurpose.PlayerBuff)
                {
                    if (DivineStorm.SpellCanCastBlind && InMeleeRange)
                    {
                        DivineStorm.Cast();
                        return;
                    }
                }
            }

            //actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&buff.the_fires_of_justice.react&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*3)
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && TargetsDivineStorm >= 2 && TheFiresOfJustice.PlayerBuff && (!TalentCrusade || Crusade.SpellCooldownRemaining > Gcd * 3))
                {
                    if (DivineStorm.SpellCanCastBlind && InMeleeRange)
                    {
                        DivineStorm.Cast();
                        return;
                    }
                }
            }

            //actions+=/divine_storm,if=debuff.judgment.up&spell_targets.divine_storm>=2&(holy_power>=4|((cooldown.zeal.charges_fractional<=1.34|cooldown.crusader_strike.charges_fractional<=1.34)&(cooldown.divine_hammer.remains>gcd|cooldown.blade_of_justice.remains>gcd)))&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*4)
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && TargetsDivineStorm >= 2 &&
                    (HolyPower >= 4 ||
                     ((Zeal.SpellChargesFractional <= 1.34 || CrusaderStrike.SpellChargesFractional <= 1.34) &&
                      (DivineHammer.SpellCooldownRemaining > Gcd || BladeOfJustice.SpellCooldownRemaining > Gcd))) && (!TalentCrusade || Crusade.SpellCooldownRemaining > Gcd * 4))
                {
                    if (DivineStorm.SpellCanCastBlind && InMeleeRange)
                    {
                        DivineStorm.Cast();
                        return;
                    }
                }
            }

            //actions+=/templars_verdict,if=debuff.judgment.up&buff.divine_purpose.react
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && DivinePurpose.PlayerBuff)
                {
                    if (TemplarVerdict.SpellCanCast && InMeleeRange)
                    {
                        TemplarVerdict.Cast();
                        return;
                    }
                }
            }

            //actions+=/templars_verdict,if=debuff.judgment.up&buff.the_fires_of_justice.react&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*3)
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && TheFiresOfJustice.PlayerBuff && (!TalentCrusade || Crusade.SpellCooldownRemaining > Gcd * 3))
                {
                    if (TemplarVerdict.SpellCanCast && InMeleeRange)
                    {
                        TemplarVerdict.Cast();
                        return;
                    }
                }
            }

            //actions+=/templars_verdict,if=debuff.judgment.up&(holy_power>=4|((cooldown.zeal.charges_fractional<=1.34|cooldown.crusader_strike.charges_fractional<=1.34)&(cooldown.divine_hammer.remains>gcd|cooldown.blade_of_justice.remains>gcd)))&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*4)
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff &&
                    (HolyPower >= 4 ||
                     ((Zeal.SpellChargesFractional <= 1.34 || CrusaderStrike.SpellChargesFractional <= 1.34) &&
                      (DivineHammer.SpellCooldownRemaining > Gcd || BladeOfJustice.SpellCooldownRemaining > Gcd))) && (!TalentCrusade || Crusade.SpellCooldownRemaining > Gcd * 4))
                {
                    if (TemplarVerdict.SpellCanCast && InMeleeRange)
                    {
                        TemplarVerdict.Cast();
                        return;
                    }
                }
            }

            //actions+=/zeal,if=holy_power<=4
            if (TalentZeal)
            {
                if (HolyPower <= 4)
                {
                    if (Zeal.SpellCanCastBlind && InMeleeRange)
                    {
                        Zeal.Cast();
                        return;
                    }
                }
            }


            //actions+=/crusader_strike,if=holy_power<=4
            if (!TalentZeal)
            {
                if (HolyPower <= 4)
                {
                    if (CrusaderStrike.SpellCanCast && InMeleeRange)
                    {
                        CrusaderStrike.Cast();
                        return;
                    }
                }
            }


            //actions+=/divine_storm,if=debuff.judgment.up&holy_power>=3&spell_targets.divine_storm>=2&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*5)
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && HolyPower >= 3 && TargetsDivineStorm >= 2 && (!TalentCrusade || Crusade.SpellCooldownRemaining > Gcd * 5))
                {
                    if (DivineStorm.SpellCanCastBlind && InMeleeRange)
                    {
                        DivineStorm.Cast();
                        return;
                    }
                }
            }

            //actions+=/templars_verdict,if=debuff.judgment.up&holy_power>=3&(!talent.crusade.enabled|cooldown.crusade.remains>gcd*5)
            if (CanCastFinisher3hp)
            {
                if (JudgementDebuff.TargetDebuff && HolyPower >= 3 && (!TalentCrusade || Crusade.SpellCooldownRemaining > Gcd * 5))
                {
                    if (TemplarVerdict.SpellCanCast && InMeleeRange)
                    {
                        TemplarVerdict.Cast();
                    }
                }
            }
        }