Page 1 of 1

Shadow - Original

Posted: 29 Jun 2017, 05:24
by Kaminaris
Priest Shadow Original Rotation

Spell List
  1. -- Forms
  2. local _Voidform = 194249;
  3. local _Shadowform = 232698;
  4.  
  5. -- Spells
  6. local _LegacyoftheVoid = 193225;
  7. local _VoidEruption = 228260;
  8. local _VoidBolt = 205448;
  9. local _ShadowWordPain = 589;
  10. local _VampiricTouch = 34914;
  11. local _MindBlast = 8092;
  12. local _MindFlay = 15407;
  13. local _VoidTorrent = 205065;
  14. local _Shadowfiend = 34433;
  15. local _ShadowWordDeath = 32379;
  16. local _MindSpike = 73510;
  17. local _MindSear = 48045;
  18. local _Sanlayn = 199855;
  19. local _AuspiciousSpirits = 155271;
  20. local _ShadowyInsight = 162452;
  21. local _Mindbender = 200174;
  22. local _Dispersion = 47585;
  23. local _ShadowCrash = 205385;
  24. local _ReaperofSouls = 199853;
  25. local _ShadowWordVoid = 205351;
  26. local _ShadowyApparitions = 78203;
  27. local _FortressoftheMind = 193195;
  28. local _PowerInfusion = 10060;
  29. local _SurrendertoMadness = 193223;
  30. local _LingeringInsanity = 197937;
  31. local _TwistofFate = 109142;
  32. local _VoidRay = 205371;
  33. local _Heroism = 32182;
  34. local _Bloodlust = 2825;
  35. local _TimeWarp = 80353;
  36. local _Berserking = 26297;
  37. local _FromtheShadows = 193642;
  38.  
  39. -- Talents
  40. local _LegacyOfTheVoid = 193225;
Rotation
  1. function MaxDps.Priest.Shadow(_, timeShift, currentSpell, gcd, talents)
  2.     local insa = UnitPower('player', SPELL_POWER_INSANITY);
  3.  
  4.     -- Fix a bug when void bolt tooltip does not refresh
  5.     local voidBolt = _VoidBolt;
  6.     if MaxDps:FindSpell(_VoidEruption) then
  7.         voidBolt = _VoidEruption;
  8.     end
  9.  
  10.     local shadowFiend = _Shadowfiend;
  11.     if talents[_Mindbender] then
  12.         shadowFiend = _Mindbender;
  13.     end
  14.     local shadowF = MaxDps:SpellAvailable(shadowFiend, timeShift);
  15.  
  16.     local swd, swdCharges, swdMax = MaxDps:SpellCharges(_ShadowWordDeath, timeShift + 0.5);
  17.  
  18.     local swp, swpCd = MaxDps:TargetAura(_ShadowWordPain, timeShift);
  19.     local vt, vtCd = MaxDps:TargetAura(_VampiricTouch, timeShift);
  20.  
  21.     local vf, vCharges = MaxDps:PersistentAura(_Voidform);
  22.     if not MaxDps:PersistentAura(_Shadowform) and not vf then
  23.         return _Shadowform;
  24.     end
  25.  
  26.     if talents[_PowerInfusion] then
  27.         MaxDps:GlowCooldown(_PowerInfusion, MaxDps:SpellAvailable(_PowerInfusion, timeShift));
  28.     end
  29.  
  30.     -- void form rotation
  31.     if vf or MaxDps:SameSpell(currentSpell, _VoidEruption) then
  32.         -- If dot is not present on target AT ALL
  33.         if not vt and not MaxDps:SameSpell(currentSpell, _VampiricTouch) then
  34.             return _VampiricTouch;
  35.         end
  36.  
  37.         if not swp then
  38.             return _ShadowWordPain;
  39.         end
  40.  
  41.         if MaxDps:SpellAvailable(_VoidTorrent, timeShift) and not MaxDps:SameSpell(currentSpell, _VoidTorrent) and
  42.             swpCd > 5 and vtCd > 5 then
  43.             return _VoidTorrent;
  44.         end
  45.  
  46.         if MaxDps:SpellAvailable(_VoidBolt, timeShift + 0.3) then
  47.             return voidBolt;
  48.         end
  49.  
  50.         if vCharges < 20 and shadowF then
  51.             return shadowFiend;
  52.         end
  53.  
  54.         local targetPh = MaxDps:TargetPercentHealth();
  55.         local canDeath = targetPh < 0.2 or (talents[_ReaperofSouls] and targetPh < 0.35);
  56.         if swdCharges >= swdMax and canDeath then
  57.             return _ShadowWordDeath;
  58.         end
  59.  
  60.         if MaxDps:SpellAvailable(_MindBlast, timeShift + 0.3) and not MaxDps:SameSpell(currentSpell, _MindBlast) then
  61.             return _MindBlast;
  62.         end
  63.  
  64.         if insa < 20 and swdCharges >= 1 and canDeath then
  65.             return _ShadowWordDeath;
  66.         end
  67.  
  68.         if vCharges > 20 and shadowF then
  69.             return shadowFiend;
  70.         end
  71.     else
  72.         -- normal rotation
  73.         if insa >= 100 or (talents[_LegacyoftheVoid] and insa >= 70) then
  74.             return _VoidEruption;
  75.         end
  76.  
  77.         if vtCd < 6 and not MaxDps:SameSpell(currentSpell, _VampiricTouch) then
  78.             return _VampiricTouch;
  79.         end
  80.  
  81.         if swpCd < 5 then
  82.             return _ShadowWordPain;
  83.         end
  84.  
  85.         if MaxDps:SpellAvailable(_MindBlast, timeShift + 0.5) and not MaxDps:SameSpell(currentSpell, _MindBlast) then
  86.             return _MindBlast;
  87.         end
  88.     end
  89.  
  90.     if talents[_MindSpike] then
  91.         return _MindSpike;
  92.     else
  93.         return _MindFlay;
  94.     end
  95. end

Re: Shadow - Original

Posted: 22 Jan 2018, 22:14
by rizalyn30
would it be possible to add Void Torrent at X stacks?

Re: Shadow - Original

Posted: 24 Jan 2018, 02:54
by Kaminaris
Everything is possible, question is where?

Re: Shadow - Original

Posted: 05 Nov 2018, 18:16
by stormlolz
Hello

Thank for job

Question : during cast of "mind-flay", if an other spell going to flash, i stop cast mind-flay and cast the other spell?

What priority cycle do you use ?

Re: Shadow - Original

Posted: 05 Nov 2018, 21:06
by stormlolz
And can you adjust compared to talents ?

view https://www.icy-veins.com/wow/shadow-pr ... -abilities

watch :
2. Single-Target Rotation for Shadow Priest

Re: Shadow - Original

Posted: 06 Nov 2018, 00:04
by Kaminaris
I plan to use simcraft rotation in the near feature.

Re: Shadow - Original

Posted: 06 Nov 2018, 09:47
by stormlolz
How Can I help you ?

Translate that from sim craft ?
You add-on can know when cleave / single / aoe ?
Code: Select all
actions.single=void_eruption

actions.single+=/dark_ascension,if=buff.voidform.down

actions.single+=/void_bolt

actions.single+=/shadow_word_death,if=target.time_to_die<3|cooldown.shadow_word_death.charges=2|(cooldown.shadow_word_death.charges=1&cooldown.shadow_word_death.remains<gcd.max)

actions.single+=/surrender_to_madness,if=buff.voidform.stack>=(15+buff.bloodlust.up)&target.time_to_die>200|target.time_to_die<75

actions.single+=/dark_void,if=raid_event.adds.in>10

actions.single+=/mindbender

actions.single+=/shadow_word_death,if=!buff.voidform.up|(cooldown.shadow_word_death.charges=2&buff.voidform.stack<15)

actions.single+=/shadow_crash,if=raid_event.adds.in>5&raid_event.adds.duration<20

actions.single+=/mind_blast,if=variable.dots_up

actions.single+=/void_torrent,if=dot.shadow_word_pain.remains>4&dot.vampiric_touch.remains>4&buff.voidform.up

actions.single+=/shadow_word_pain,if=refreshable&target.time_to_die>4&!talent.misery.enabled&!talent.dark_void.enabled

actions.single+=/vampiric_touch,if=refreshable&target.time_to_die>6|(talent.misery.enabled&dot.shadow_word_pain.refreshable)

actions.single+=/mind_flay,chain=1,interrupt_immediate=1,interrupt_if=ticks>=2&(cooldown.void_bolt.up|cooldown.mind_blast.up)

actions.single+=/shadow_word_pain

I dont know if possible, but create a module IN GAME who translating sim craft code to your code ?

Edit ; Have tried to translate, i'm a newby but try :

Code: Select all
function MaxDps.Priest.Shadow(_, timeShift, currentSpell, gcd, talents)
    local insa = UnitPower('player', SPELL_POWER_INSANITY);
 
    -- Fix a bug when void bolt tooltip does not refresh
    local voidBolt = _VoidBolt;
    if MaxDps:FindSpell(_VoidEruption) then
        voidBolt = _VoidEruption;
    end
 
    local shadowFiend = _Shadowfiend;
    if talents[_Mindbender] then
        shadowFiend = _Mindbender;
    end
    local shadowF = MaxDps:SpellAvailable(shadowFiend, timeShift);
 
    local swd, swdCharges, swdMax = MaxDps:SpellCharges(_ShadowWordDeath, timeShift + 0.5);
 
    local swp, swpCd = MaxDps:TargetAura(_ShadowWordPain, timeShift);
    local vt, vtCd = MaxDps:TargetAura(_VampiricTouch, timeShift);
 
    local vf, vCharges = MaxDps:PersistentAura(_Voidform);
    if not MaxDps:PersistentAura(_Shadowform) and not vf then
        return _Shadowform;
    end
 
    if talents[_PowerInfusion] then
        MaxDps:GlowCooldown(_PowerInfusion, MaxDps:SpellAvailable(_PowerInfusion, timeShift));
    end
 
		   -- ############################################
		--PRE-COMBAT
		--IF NOT IN FIGHT

		if not shadowF then
					return _Shadowform;
				end

		return _MindBlast;
		return _ShadowWordVoid;	

		-- ################################################
		--local _VoidEruption = 228260;

		return _VoidEruption;

		-- ################################################
		--local _DarkAscension= 280711;
		--local _Voidform = 194249;

		if vf then
					return _DarkAscension;
				end

		-- ################################################
		--local _VoidBolt = 205448;

		return _VoidBolt;

		-- ################################################
		--local _ShadowWordDeath = 32379;

		local targetPh = MaxDps:TargetPercentHealth();
		local canDeath = targetPh < 0.2 and talents[_ShadowWordDeath];
				if swdCharges >= swdMax and canDeath then
					return _ShadowWordDeath;
				end

		-- ################################################
		--local _SurrendertoMadness = 193223;
		--local _Voidform = 194249;
		--local _Bloodlust = 2825; or local _Heroism = 32182;

		--NEED HELP

		-- ################################################
		--local _DarkVoid= 263346;

		--? can add number of add ???

		-- ################################################
		--local _Mindbender = 200174;


		return _Mindbender;

		-- ################################################
		--local _ShadowWordDeath = 32379;
		--local _Voidform = 194249;

		local targetPh = MaxDps:TargetPercentHealth();
		local canDeath = targetPh < 0.2 and talents[_ShadowWordDeath];
				if swdCharges >= swdMax and vf and vCharges < 15 and canDeath then
					return _ShadowWordDeath;
				end

		-- ################################################
		--local _ShadowCrash = 205385;

		-- ???

		-- ################################################
		--local _MindBlast = 8092;


		if vt and swp then
			return _MindBlast;
			End

		-- ################################################
		--local _VoidTorrent = 205065;
		--local _ShadowWordPain = 589;
		--local _VampiricTouch = 34914;
		--local _Voidform = 194249;

		if vf and swpCd > 4 and vtCd > 4 then
			return _VoidTorrent;
			End


		-- ################################################
		--local _ShadowWordPain = 589;
		--local _Misery = 243961;             
		--local _DarkVoid= 263346;

		local targetPh = MaxDps:TargetPercentHealth();
		local canDeath = targetPh < 0.4 and talents[_ShadowWordDeath];

		if  and canDeath and not talents[_Misery] and talents[_DarkVoid] then
			return _ShadowWordPain;
			End

		-- ################################################
		--local _VampiricTouch = 34914;
		--local _Misery = 243961;
		--local _ShadowWordPain = 589;

		local targetPh = MaxDps:TargetPercentHealth();
		local canDeath = targetPh < 0.6 and talents[_ShadowWordDeath];

		if  and canDeath and talents[_Misery] swpCd > 1 and vtCd > 1 then
			return _VampiricTouch;
			End

		-- ################################################
		--local _MindFlay = 15407;
		--local _VoidBolt = 205448;
		--local _MindBlast = 8092;
		
			return _MindFlay;

		-- ################################################
		--local _ShadowWordPain = 589;

		if swpCd < 1 and not talents[_Misery] then
			return __ShadowWordPain;
			
		-- ################################################
		--local _ShadowWordPain = 34914;

		if vtCd < 1 and not talents[_Misery] then
			return __VampiricTouch;
Not in spell list :
Code: Select all
local _Misery = 243961;
local _DarkVoid= 263346;
local _DarkAscension= 280711;
Edit 2 :
Can we use openers spell just once time ?
and after "buckle" a cycle ? how ?

Re: Shadow - Original

Posted: 06 Nov 2018, 16:52
by Kaminaris
I appreciate your help, however I wrote myself a simc translator:
https://github.com/kaminaris/RotationGenerator

I will announce it public once i get few more classes working with it.

My addon now have a smart AOE detection.

But now code looks completely different from how it looked like, read this:
viewtopic.php?f=4&p=2026

So long story short. Unless you know PHP, know simcraft APLs and can program you really cant help me. Biggest problem is my lack of time.

Re: Shadow - Original

Posted: 12 Nov 2018, 05:28
by azlol
I got everything to load when combat starts, but the circles do not appear over the abilities. Maybe i missed something, not sure.

Re: Shadow - Original

Posted: 12 Nov 2018, 06:05
by Kaminaris
rotation function must return a spellID to highlight, if nothing highlights then function returns nil (null)