aggixx

Untitled

Oct 24th, 2013
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 64.24 KB | None | 0 0
  1. # Leafkiller's Feral/Guardian druid script, maintained by ShmooDude and aggixx.
  2. # Support/Discussion thread: http://fluiddruid.net/forum/viewtopic.php?f=3&t=857
  3. # 10/19/13 version 5.4.3.0
  4. # Fixed rest of SoO trinket spell IDs
  5. # Updated damage calculation functions to use asValue=1 so they're treated as constants
  6. # Switched functions that only contained a number to use Define instead
  7. # Changed logic of bleed prediction functions to be true when the buff is expiring instead of isn't and removed unnecessary energy check
  8. # Changed many comparisons to use one node evaluations whenever possible
  9. # Made cat abilities remove clearcasting buff when used and updated HasEnergyFor functions to check for clearcasting
  10. # Switched to BuffAmount() function whenever possible to pull trinket proc values directly from buffs.
  11. # Made AoE rotation use same filler conditions as Main rotation
  12. # Removed mangle specific filler line
  13. # Wrapped crit and mastery into their own functions
  14. # Fixed crit to allow 100% crit vs higher level enemies
  15. # 10/03/13 version 5.4.2.1
  16. # Fixed rake bug
  17. # Added check to ensure you'll have energy to use thrash at the end of a rune before suggesting it
  18. # Reenabled bleed ratio prediction but added a mangle specific filler line that occurs shortly after the traditional filler line so something shows up till Ovale bug is fixed
  19. # Update FoN logic
  20. # Fix Haromm's spell ID
  21. # 9/28/13 version 5.4.2.0
  22. # Temporarily disabled bleed ratio prediction on filler rake until ovale fix can be implemented
  23. # Removed some unnecessary conditionals from FillerActions
  24. # Removed Tiger's Fury condition in TimeTilEnergyForAbility functions
  25. # Reverted to manually calculating the energy cost and TimeTilEnergy for abilities due to weirdness with omen of clarity
  26. # 9/26/13 version 5.4.1.0
  27. # Only overwrite Rake at the end of a rune if its ratio is >75
  28. # Changed potion logic to use the new TimeToHealthPercent() function
  29. # 9/25/13 version 5.4.0.4
  30. # Allowed Ferocious Bite to be used at TimeToDie <=16 without rip present
  31. # Added crit suppression for damage calculations
  32. # Added 20% Rip damage buff
  33. # 9/24/13 version 5.4.0.3
  34. # Changed Rip to use Last functions instead of target.Debuff functions to fix Rip extension bug
  35. # Added Potion logic
  36. # 9/18/13 version 5.4.0.2
  37. # Switched to execute range Rip logic if TimeToDie <=16
  38. # Thrash as filler if the initial hit out damages (per energy) Swipe for AoE rotation
  39. # Added Energy based considerations for when to suggest applying an end of rune bleed
  40. # Added Thrash clipping at end of Rune to normal rotation
  41. # 9/13/13 version 5.4.0.1
  42. # Fixed Incarnation
  43. # Added Nature's Vigil for CD usage
  44. # Modified Berserk check box description to "Suggest Long DPS cooldown(s)"
  45. # Added an AoE rotation for cat
  46. # Moved Bear AoE to its own box to match cat
  47. # Modified checkboxes to have spec specific, more detailed descriptions where appropriate and for consistency
  48. # Changed Big Cat Predictive box to show when on instead of off for consistency
  49. # Changed Bear Small Rage Usage Boxes to be enabled with the same checkbox as Cat Small Predictive Box
  50. # Allowed Small Rage Usage Boxes to coexist with left cooldown boxes
  51. # Cleaned up icon tooltip information
  52. # 9/09/13 version 5.4.0.0
  53. # Added Feral Rage and Feral Fury buffs and logic
  54. # Changed Nature's Swiftness to Ysera's Gift
  55. # Updated FoN logic
  56. # 9/06/13 version 5.4.0.0
  57. # Added SoO trinkets to buff prediction
  58. # Removed waiting on TF for Rip
  59. # Only use fillers during TF for DoC
  60. # Modified DoC Filler line to be less aggressive at building CPs
  61. # Added Energy check for fillers
  62. # 9/05/13 version 5.4.0.0
  63. # Added end of Rune logic for Thrash and Rip
  64. # Added <12 second SR logic, lowered the priority of FB and increased energy pooling for non-berserk FB
  65. # Changed fillers to be used at 1.25 seconds from energy cap instead of 1.0.
  66. # 9/02/13 version 5.4.0.0
  67. # Fixed Savage Roar refresh logic
  68. # Removed line for HotW+SotF that prevented energy pooling
  69. # 8/29/13 version 5.4.0.0
  70. # Defined buffs and ItemLists for new SoO trinkets
  71. # Removed old FoN code, added FoN usage logic to "extraCD" box
  72. # Changed BAD_JUJU and SOUL_CHARM to 10 second durations
  73. # Updated DoC damage modifier to 1.30
  74. # Added DoC as a damage buff to some damage-dealing abilities
  75.  
  76.  
  77. ############################
  78. ## Define Spells, Buffs, Items, Talents ##
  79. ############################
  80.  
  81. # Shared spells
  82. Define(BARKSKIN 22812)
  83. SpellInfo(BARKSKIN cd=60)
  84. Define(FERAL_SPIRIT 110807)
  85. SpellInfo(FERAL_SPIRIT cd=120)
  86. Define(HEALING_TOUCH 5185)
  87. Define(MARK_OF_THE_WILD 1126)
  88. SpellInfo(MARK_OF_THE_WILD duration=3600)
  89. SpellAddBuff(MARK_OF_THE_WILD MARK_OF_THE_WILD=1)
  90. Define(SYMBIOSIS 110309)
  91. SpellAddBuff(SYMBIOSIS SYMBIOSIS=1)
  92. Define(WRATH 5176)
  93. Define(HURRICANE 16914)
  94. SpellInfo(HURRICANE duration=10 tick=1 haste=spell canStopChannelling=9 )
  95.  
  96. # Shared buffs
  97. Define(DREAM_OF_CENARIUS 145152)
  98. SpellInfo(DREAM_OF_CENARIUS duration=30)
  99. Define(NATURES_VIGIL 124974)
  100. SpellInfo(NATURES_VIGIL cd=180)
  101. SpellAddBuff(NATURES_VIGIL NATURES_VIGIL=1)
  102. Define(PREDATORY_SWIFTNESS 69369)
  103. SpellAddBuff(PREDATORY_SWIFTNESS PREDATORY_SWIFTNESS=1)
  104. Define(PRIMAL_FURY 16961)
  105. Define(TRICKS 57933)
  106. SpellAddBuff(TRICKS TRICKS=1)
  107. Define(WEAKENED_ARMOR 113746)
  108. SpellInfo(WEAKENED_ARMOR duration=30)
  109. Define(WEAKENED_BLOWS 115798)
  110. SpellInfo(WEAKENED_BLOWS duration=30)
  111. Define(CLEARCASTING 135700)
  112. Define(FERAL_FURY 144865)
  113. SpellInfo(FERAL_FURY duration=6)
  114. Define(FERAL_RAGE 146874)
  115. SpellInfo(FERAL_RAGE duration=12)
  116.  
  117. # Trinket, Potion and Weapon Enchant buffs
  118. Define(ROR_CRIT 139117)
  119. SpellInfo(ROR_CRIT duration=10)
  120. Define(ROR_MASTERY 139120)
  121. SpellInfo(ROR_MASTERY duration=10)
  122. Define(ROR_HASTE 139121)
  123. SpellInfo(ROR_HASTE duration=10)
  124. SpellList(ROR ROR_CRIT ROR_MASTERY ROR_HASTE)
  125. Define(DANCING_STEEL 120032)
  126. SpellInfo(DANCING_STEEL duration=12)
  127. Define(SOUL_CHARM 138756)
  128. SpellInfo(SOUL_CHARM duration=10)
  129. Define(BLADES 138737)
  130. Define(BAD_JUJU 138939)
  131. SpellInfo(BAD_JUJU duration=10)
  132. Define(VICIOUS_TALISMAN 138700)
  133. SpellInfo(VICIOUS_TALISMAN duration=20)
  134. Define(ASSURANCE_OF_CONSEQUENCE 146308)
  135. SpellInfo(ASSURANCE_OF_CONSEQUENCE duration=20)
  136. Define(HAROMMS_TALISMAN 148903)
  137. SpellInfo(HAROMMS_TALISMAN duration=10)
  138. Define(SIGIL_OF_RAMPAGE 148896)
  139. SpellInfo(SIGIL_OF_RAMPAGE duration=15)
  140. Define(TICKING_EBON_DETONATOR 146310)
  141. SpellInfo(TICKING_EBON_DETONATOR duration=10)
  142. Define(RESTLESS_AGILITY 146310)
  143. Define(VIRMENS_BITE 105697)
  144.  
  145. # Shared items
  146. ItemList(ROR_ITEM 94532 95802 96174 96546 96918)
  147. ItemList(SOUL_CHARM_ITEM 96741 96369 95997 94512 95625)
  148. ItemList(BAD_JUJU_ITEM 96781 96409 96037 94523 95665)
  149. ItemList(VICIOUS_TALISMAN_ITEM 94511)
  150. ItemList(ASSURANCE_OF_CONSEQUENCE_ITEM 104974 104725 102292 105223 104476 105472)
  151. ItemList(HAROMMS_TALISMAN_ITEM 105029 104780 102301 105278 104531 105527)
  152. ItemList(SIGIL_OF_RAMPAGE_ITEM 105082 104833 102302 105331 104584 105580)
  153. ItemList(TICKING_EBON_DETONATOR_ITEM 105114 104865 102311 105363 104616 105612)
  154. Define(VIRMENS_BITE_ITEM 76089)
  155.  
  156. # Talents
  157. Define(YSERAS_GIFT_TALENT 4)
  158. Define(RENEWAL_TALENT 5)
  159. Define(CENARION_WARD_TALENT 6)
  160. Define(FAERIE_SWARM_TALENT 7)
  161. Define(TYPHOON_TALENT 9)
  162. Define(SOUL_OF_THE_FOREST 10)
  163. Define(INCARNATION_TALENT 11)
  164. Define(FORCE_OF_NATURE_TALENT 12)
  165. Define(MIGHTY_BASH_TALENT 15)
  166. Define(HEART_OF_THE_WILD_TALENT 16)
  167. Define(DREAM_OF_CENARIUS_TALENT 17)
  168. Define(NATURES_VIGIL_TALENT 18)
  169.  
  170. # Talent spells
  171. Define(CENARION_WARD 102351)
  172. SpellInfo(CENARION_WARD cd=30)
  173. Define(FORCE_OF_NATURE 106737)
  174. SpellInfo(FORCE_OF_NATURE duration=15 cd=60)
  175. Define(HEART_OF_THE_WILD 108292)
  176. SpellInfo(HEART_OF_THE_WILD cd=360)
  177. SpellAddBuff(HEART_OF_THE_WILD HEART_OF_THE_WILD=1)
  178. Define(INCARNATION 106731)
  179. SpellInfo(INCARNATION cd=180)
  180. Define(MIGHTY_BASH 5211)
  181. SpellInfo(MIGHTY_BASH cd=50)
  182. Define(RENEWAL 108238)
  183. SpellInfo(RENEWAL cd=120)
  184. Define(TYPHOON 132469)
  185. SpellInfo(TYPHOON cd=20)
  186. Define(WILD_CHARGE 102401)
  187. SpellInfo(WILD_CHARGE cd=15)
  188.  
  189. #Glyphs
  190. Define(GLYPH_OF_SHRED 114234)
  191. Define(GLYPH_OF_SAVAGERY 127540)
  192.  
  193. # Shared spells
  194. Define(FAERIE_FERAL 770)
  195. SpellInfo(FAERIE_FERAL duration=300 cd=6)
  196. SpellAddTargetDebuff(FAERIE_FERAL FAERIE_FERAL=1 WEAKENED_ARMOR=1)
  197. Define(FAERIE_SWARM 102355)
  198. SpellInfo(FAERIE_SWARM duration=300 cd=6)
  199. SpellAddTargetDebuff(FAERIE_SWARM FAERIE_SWARM=1 WEAKENED_ARMOR=1)
  200.  
  201. # Cat spells
  202. Define(BERSERK_CAT 106951) #cat cd buff
  203. SpellInfo(BERSERK_CAT duration=15 cd=180)
  204. SpellAddBuff(BERSERK_CAT BERSERK_CAT=1)
  205. Define(CAT_FORM 768)
  206. SpellAddBuff(CAT_FORM CAT_FORM=1)
  207. Define(FEROCIOUS_BITE 22568) #cat finish 25-50 energy
  208. SpellInfo(FEROCIOUS_BITE combo=0)
  209. SpellDamageBuff(FEROCIOUS_BITE DREAM_OF_CENARIUS=1.30)
  210. SpellAddBuff(FEROCIOUS_BITE CLEARCASTING=0)
  211. Define(INCARNATION_CAT 102543)
  212. SpellInfo(INCARNATION_CAT duration=30 cd=180)
  213. Define(MAIM 22570) #cat interrupt
  214. SpellInfo(MAIM cd=10 combo=0)
  215. SpellDamageBuff(MAIM DREAM_OF_CENARIUS=1.30)
  216. SpellAddBuff(MAIM CLEARCASTING=0)
  217. Define(MANGLE_CAT 33876) #cat bleed+debuff
  218. SpellInfo(MANGLE_CAT inccounter=ripshreds combo=1)
  219. SpellInfo(MANGLE_CAT critcombo=1 if_spell=PRIMAL_FURY)
  220. SpellDamageBuff(MANGLE_CAT DREAM_OF_CENARIUS=1.30)
  221. SpellDamageBuff(MANGLE_CAT FERAL_FURY=1.5)
  222. SpellAddBuff(MANGLE_CAT CLEARCASTING=0)
  223. Define(RAKE 1822) #cat bleed
  224. SpellInfo(RAKE combo=1 duration=15 tick=3)
  225. SpellInfo(RAKE base=99 bonusap=0.3)
  226. SpellInfo(RAKE critcombo=1 if_spell=PRIMAL_FURY)
  227. SpellAddTargetDebuff(RAKE RAKE=1)
  228. SpellDamageBuff(RAKE DREAM_OF_CENARIUS=1.30)
  229. SpellAddBuff(RAKE CLEARCASTING=0)
  230. Define(RAVAGE 6785)
  231. SpellInfo(RAVAGE inccounter=ripshreds combo=1)
  232. SpellInfo(RAVAGE critcombo=1 if_spell=PRIMAL_FURY)
  233. SpellDamageBuff(RAVAGE DREAM_OF_CENARIUS=1.30)
  234. SpellDamageBuff(RAVAGE FERAL_FURY=1.5)
  235. SpellAddBuff(RAVAGE CLEARCASTING=0)
  236. Define(RAVAGE_BANG 102545)
  237. SpellInfo(RAVAGE_BANG inccounter=ripshreds combo=1)
  238. SpellInfo(RAVAGE_BANG critcombo=1 if_spell=PRIMAL_FURY)
  239. SpellDamageBuff(RAVAGE_BANG DREAM_OF_CENARIUS=1.30)
  240. SpellDamageBuff(RAVAGE_BANG FERAL_FURY=1.5)
  241. SpellAddBuff(RAVAGE_BANG CLEARCASTING=0)
  242. Define(RIP 1079) #cat bleed
  243. SpellInfo(RIP resetcounter=ripshreds duration=16 tick=2 combo=0)
  244. SpellAddTargetDebuff(RIP RIP=1)
  245. SpellDamageBuff(RIP DREAM_OF_CENARIUS=1.30)
  246. SpellAddBuff(RIP DREAM_OF_CENARIUS=1)
  247. SpellAddBuff(RIP CLEARCASTING=0)
  248. Define(SAVAGE_ROAR_OLD 52610)
  249. SpellInfo(SAVAGE_ROAR_OLD duration=18 combo=0)
  250. SpellAddBuff(SAVAGE_ROAR_OLD SAVAGE_ROAR_OLD=1)
  251. Define(SAVAGE_ROAR_GLYPHED 127538)
  252. SpellInfo(SAVAGE_ROAR_GLYPHED duration=12 combo=-5)
  253. SpellAddBuff(SAVAGE_ROAR_GLYPHED SAVAGE_ROAR_GLYPHED=1)
  254. SpellList(SAVAGE_ROAR 52610 127538)
  255. Define(SHRED 5221) #cat behind
  256. SpellInfo(SHRED inccounter=ripshreds combo=1)
  257. SpellInfo(SHRED critcombo=1 if_spell=PRIMAL_FURY)
  258. SpellDamageBuff(SHRED DREAM_OF_CENARIUS=1.30)
  259. SpellDamageBuff(SHRED FERAL_FURY=1.5)
  260. SpellAddBuff(SHRED CLEARCASTING=0)
  261. Define(SHRED_BANG 114236)
  262. SpellInfo(SHRED_BANG inccounter=ripshreds combo=1)
  263. SpellInfo(SHRED_BANG critcombo=1 if_spell=PRIMAL_FURY)
  264. SpellDamageBuff(SHRED_BANG DREAM_OF_CENARIUS=1.30)
  265. SpellDamageBuff(SHRED_BANG FERAL_FURY=1.5)
  266. SpellAddBuff(SHRED_BANG CLEARCASTING=0)
  267. Define(STAMPEDE 81022)
  268. SpellAddBuff(STAMPEDE STAMPEDE=1)
  269. Define(SKULL_BASH_CAT 80965) #cat interrupt
  270. SpellInfo(SKULL_BASH_CAT cd=15)
  271. Define(THRASH_CAT 106830)
  272. SpellInfo(THRASH_CAT duration=15 tick=3)
  273. SpellAddTargetDebuff(THRASH_CAT THRASH_CAT=1 WEAKENED_BLOWS=1)
  274. SpellDamageBuff(THRASH_CAT DREAM_OF_CENARIUS=1.30)
  275. SpellAddBuff(THRASH_CAT CLEARCASTING=0)
  276. Define(SWIPE_CAT 62078)
  277. SpellInfo(SWIPE_CAT combo=1)
  278. SpellDamageBuff(SWIPE_CAT DREAM_OF_CENARIUS=1.30)
  279. SpellDamageBuff(SWIPE_CAT FERAL_FURY=1.5)
  280. SpellAddBuff(SWIPE_CAT CLEARCASTING=0)
  281. Define(TIGERS_FURY 5217) #cat buff
  282. SpellInfo(TIGERS_FURY duration=6 cd=30)
  283. SpellAddBuff(TIGERS_FURY TIGERS_FURY=1)
  284.  
  285. # Bear spells
  286. Define(BEAR_FORM 5487)
  287. SpellAddBuff(BEAR_FORM BEAR_FORM=1)
  288. Define(BERSERK_BEAR 106952) #cat+bear cd buff
  289. SpellInfo(BERSERK_BEAR duration=10 cd=180 )
  290. SpellAddBuff(BERSERK_BEAR BERSERK_BEAR=1)
  291. Define(ENRAGE 5229)
  292. Define(FRENZIED_REGEN 22842)
  293. Define(INCARNATION_BEAR 102558)
  294. SpellInfo(INCARNATION_BEAR duration=30 cd=180 )
  295. Define(LACERATE 33745)
  296. Define(MANGLE_BEAR 33878)
  297. SpellInfo(MANGLE_BEAR cd=3 buffnocd=INCARNATION_BEAR buffnocd=BERSERK_BEAR)
  298. Define(MAUL 6807)
  299. Define(MIGHT_OF_URSOC 106922)
  300. Define(SAVAGE_DEFENSE 62606)
  301. Define(SURVIVAL_INSTINCTS 61336)
  302. Define(SWIPE_BEAR 779)
  303. Define(THRASH_BEAR 77758)
  304. Define(TOOTH_AND_CLAW 135286)
  305. SpellAddBuff(TOOTH_AND_CLAW TOOTH_AND_CLAW=1)
  306. Define(TOOTH_AND_CLAW_DEBUFF 135601)
  307. SpellAddTargetDebuff(TOOTH_AND_CLAW_DEBUFF TOOTH_AND_CLAW_DEBUFF=1)
  308.  
  309. ###############
  310. ## Define Settings ##
  311. ###############
  312.  
  313. AddCheckBox(cooldownsL "Left: DPS CD Boxes" default mastery=2)
  314. AddCheckBox(cooldownsL "Left: Defensive CD Boxes" default mastery=3)
  315. AddCheckBox(cooldownsR "Right: Bleed/SR Remain Boxes" default mastery=2)
  316. AddCheckBox(cooldownsR "Right: Defensive CD Boxes" default mastery=3)
  317. AddCheckBox(altpredictive "Left: Small Predictive Box" mastery=2)
  318. AddCheckBox(altpredictive "Left: Small Rage Usage Boxes" mastery=3)
  319. # AddCheckBox(bearaoe "Bear AoE Rotation") # Removed; AoE rotation is now its own box
  320. AddCheckBox(showaoe "Right: AoE Rotation" default)
  321. AddCheckBox(cooldownsRatio "Left: Rake/Rip Ratio Boxes" mastery=2)
  322. AddCheckBox(cooldownsRatio "Don't change in Guardian" mastery=3)
  323. AddCheckBox(lucioles SpellName(FAERIE_FERAL) default mastery=2)
  324. AddCheckBox(berserk "Suggest Long DPS CD(s)" default mastery=2)
  325. AddCheckBox(infront "Frontal attack" mastery=2)
  326. AddCheckBox(predictive "Right: Big Predictive Box" mastery=2 default)
  327. AddCheckBox(predictive "Right: Big Rage Usage Box" mastery=3 default)
  328. # AddCheckBox(nvbounce "Use healing CDs for damage" mastery=2) # Currently unused
  329. AddCheckBox(potion "Suggest Virmen's Bite Potion" mastery=2)
  330. AddListItem(expbuffsafetymargin point0 "0.0 seconds" mastery=2)
  331. AddListItem(expbuffsafetymargin point1 "0.1 seconds" mastery=2)
  332. AddListItem(expbuffsafetymargin point2 "0.2 seconds" mastery=2)
  333. AddListItem(expbuffsafetymargin point3 "0.3 seconds" mastery=2)
  334. AddListItem(expbuffsafetymargin point4 "0.4 seconds" mastery=2)
  335. AddListItem(expbuffsafetymargin point5 "0.5 seconds" mastery=2 default)
  336.  
  337. ################
  338. # Static Variables
  339. ################
  340. Define(HeartOfTheWildAgiModifier 1.06)
  341. Define(LeatherSpecAgiModifier 1.05)
  342. Define(StatsBuffBonus 0.05)
  343. Define(RakeBaseDamage 99)
  344. Define(RakeDamagePerAttackPower 0.3)
  345. Define(RipBaseDamage 136)
  346. Define(RipDamagePerComboPoint 384)
  347. Define(RipDamagePerComboPointAttackPower 0.05808)
  348. Define(ThrashHitBaseDamage 1232)
  349. Define(ThrashHitDamagePerAttackPower 0.191)
  350. Define(SwipeCatWeaponDamageMultiplier 4.8)
  351. Define(FerociousBiteBaseDamage 500)
  352. Define(FerociousBiteDamagePerComboPoint 762)
  353. Define(FerociousBiteDamagePerComboPointAttackPower 0.196)
  354. Define(FerociousBiteCritChanceBonus 0.25)
  355. Define(MangleCatBaseDamage 78)
  356. Define(MangleCatWeaponDamageMultiplier 5)
  357. Define(RavageBaseDamage 78)
  358. Define(RavageWeaponDamageMultiplier 9.5)
  359. Define(RavageCritChanceBonus 0.50)
  360. Define(CritPerAttackPower 251904)
  361. AddFunction LevelBasedCritSuppression asValue=1 { if target.RelativeLevel() >0 target.RelativeLevel()/100 0 }
  362. AddFunction ExpiringBuffSafetyMargin asValue=1
  363. {
  364. if List(expbuffsafetymargin point0) 0.0
  365. if List(expbuffsafetymargin point1) 0.1
  366. if List(expbuffsafetymargin point2) 0.2
  367. if List(expbuffsafetymargin point3) 0.3
  368. if List(expbuffsafetymargin point4) 0.4
  369. if List(expbuffsafetymargin point5) 0.5
  370. 0.5
  371. }
  372.  
  373. ################
  374. # Trinket/Proc values
  375. ################
  376. Define(TigersFuryMultiplier 1.15)
  377. Define(RuneMultiplier 2) # Not the actual amount like the rest, but given the power of the rune buff the script should still function properly
  378. Define(DancingSteelAttackPower 3300)
  379. AddFunction SoulCharmAttackPower asValue=1
  380. {
  381. BuffAmount(BLADES)*2
  382. }
  383. AddFunction BadJujuAttackPower asValue=1
  384. {
  385. if HasTrinket(96781) 18864 # Heroic TF 2/2 upgrade
  386. if HasTrinket(96409) 17840 # Heroic 2/2 upgrade
  387. if HasTrinket(96037) 16712 # Normal TF 2/2 upgrade
  388. if HasTrinket(94523) 15806 # Normal 2/2 upgrade
  389. if HasTrinket(95665) 13118 # LFR 2/2 upgrade
  390. }
  391. AddFunction ViciousTalismanAttackPower asValue=1
  392. {
  393. 17600 # 2/2 upgrade
  394. }
  395. AddFunction AssuranceOfConsequenceAttackPower asValue=1
  396. {
  397. BuffAmount(ASSURANCE_OF_CONSEQUENCE)*2
  398. }
  399. AddFunction HarommsTalismanAttackPower asValue=1
  400. {
  401. if HasTrinket(105527) 30248 # Heroic WF 2/2 upgrade
  402. if HasTrinket(104531) 28606 # Heroic 2/2 upgrade
  403. if HasTrinket(105278) 26798 # Normal WF 2/2 upgrade
  404. if HasTrinket(102301) 25342 # Normal 2/2 upgrade
  405. if HasTrinket(104780) 22452 # Flex 2/2 upgrade
  406. if HasTrinket(105029) 20074 # LFR 2/2 upgrade
  407. }
  408. AddFunction SigilOfRampageAttackPower asValue=1
  409. {
  410. BuffAmount(SIGIL_OF_RAMPAGE)*2
  411. }
  412. AddFunction TickingEbonDetonatorAttackPower asValue=1
  413. {
  414. if HasTrinket(105612) 2750 # Heroic WF 2/2 upgrade
  415. if HasTrinket(104616) 2600 # Heroic 2/2 upgrade
  416. if HasTrinket(105363) 2436 # Normal WF 2/2 upgrade
  417. if HasTrinket(102311) 2304 # Normal 2/2 upgrade
  418. if HasTrinket(104865) 2042 # Flex 2/2 upgrade
  419. if HasTrinket(105114) 1826 # LFR 2/2 upgrade
  420. }
  421.  
  422. ################
  423. # Energy related functions
  424. ################
  425. AddFunction EnergyForThrash asValue=1 { if BuffPresent(BERSERK_CAT) 25 50 }
  426. AddFunction EnergyForRake asValue=1 { if BuffPresent(BERSERK_CAT) 18 35 }
  427. AddFunction EnergyForRip asValue=1 { if BuffPresent(BERSERK_CAT) 15 30 }
  428. AddFunction EnergyForMangle asValue=1 { if BuffPresent(BERSERK_CAT) 18 35 }
  429. AddFunction EnergyForShred asValue=1 { if BuffPresent(BERSERK_CAT) 20 40 }
  430. AddFunction EnergyForRavage asValue=1 { if BuffPresent(BERSERK_CAT) 23 45 }
  431. AddFunction EnergyForFerociousBite asValue=1 { if BuffPresent(BERSERK_CAT) 25 50 }
  432. AddFunction HasEnergyForThrash { Energy() >= EnergyForThrash() or BuffPresent(CLEARCASTING) }
  433. AddFunction HasEnergyForRake { Energy() >= EnergyForRake() or BuffPresent(CLEARCASTING) }
  434. AddFunction HasEnergyForRip { Energy() >= EnergyForRip() or BuffPresent(CLEARCASTING) }
  435. AddFunction HasEnergyForMangle { Energy() >= EnergyForMangle() or BuffPresent(CLEARCASTING) }
  436. AddFunction HasEnergyForShred { Energy() >= EnergyForShred() or BuffPresent(CLEARCASTING) }
  437. AddFunction HasEnergyForFerociousBite { Energy() >= EnergyForFerociousBite() or BuffPresent(CLEARCASTING) }
  438. AddFunction HasEnergyForRavage { Energy() >= EnergyForRavage() or BuffPresent(CLEARCASTING) }
  439.  
  440. ################
  441. # Armor and Mastery Functions
  442. ################
  443. AddFunction ArmorReduction asValue=1
  444. {
  445. if target.DebuffPresent(WEAKENED_ARMOR any=1)
  446. {
  447. if target.Level(less 1) 0.679
  448. 0.698
  449. }
  450. if target.Level(less 1) 0.651
  451. 0.671
  452. }
  453. AddFunction CurrentMasteryMultiplier asValue=1 { 1+Mastery()/100 }
  454.  
  455. ################
  456. # Crit Chance Functions
  457. ################
  458. AddFunction CurrentCritChanceRaw asValue=1 { 1+MeleeCritChance(unlimited=1)/100-LevelBasedCritSuppression() }
  459. AddFunction CurrentCritChanceMultiplier asValue=1
  460. {
  461. if CurrentCritChanceRaw() > 2
  462. 2
  463. CurrentCritChanceRaw()
  464. }
  465. AddFunction RakeDebuffCritChanceRaw asValue=1 { 1+target.DebuffMeleeCritChance(RAKE unlimited=1)/100-LevelBasedCritSuppression() }
  466. AddFunction RakeDebuffCritChanceMultiplier asValue=1
  467. {
  468. if RakeDebuffCritChanceRaw() > 2
  469. 2
  470. RakeDebuffCritChanceRaw()
  471. }
  472. AddFunction RipDebuffCritChanceRaw asValue=1 { 1+target.DebuffMeleeCritChance(RIP unlimited=1)/100-LevelBasedCritSuppression() }
  473. AddFunction RipDebuffCritChanceMultiplier asValue=1
  474. {
  475. if RipDebuffCritChanceRaw() > 2
  476. 2
  477. RipDebuffCritChanceRaw()
  478. }
  479. AddFunction FerociousBiteCritChanceRaw asValue=1 { FerociousBiteCritChanceBonus+CurrentCritChanceMultiplier() }
  480. AddFunction FerociousBiteCritChanceMultiplier asValue=1
  481. {
  482. if FerociousBiteCritChanceRaw() > 2
  483. 2
  484. FerociousBiteCritChanceRaw()
  485. }
  486. AddFunction RavageCritChanceRaw asValue=1 { RavageCritChanceBonus+CurrentCritChanceMultiplier() }
  487. AddFunction RavageCritChanceMultiplier asValue=1
  488. {
  489. if target.HealthPercent(atLeast 80)
  490. {
  491. if RavageCritChanceRaw() > 2
  492. 2
  493. RavageCritChanceRaw()
  494. }
  495. CurrentCritChanceMultiplier()
  496. }
  497.  
  498.  
  499. ################
  500. # Time till energy for abilities functions (must come before Rune functions)
  501. # Moved energy check from functions to main code to fix predictive algorithm bug within ovale
  502. # Always use an energy check when utilizing these functions or you will have a disappearing icon problem
  503. # Example:
  504. # if HasEnergyForRake() and target.DebuffRemains(RAKE less 3)
  505. # or not HasEnergyForRake() and target.DebuffRemains(RAKE) < 3 + TimeTilEnergyForRake()
  506. ################
  507. AddFunction TimeTilEnergyForThrash
  508. {
  509. if HasEnergyForThrash()
  510. 0
  511. { EnergyForThrash() - Energy() } / EnergyRegen()
  512. }
  513. AddFunction TimeTilEnergyForRake
  514. {
  515. if HasEnergyForRake()
  516. 0
  517. { EnergyForRake() - Energy() } / EnergyRegen()
  518. }
  519. AddFunction TimeTilEnergyForRip
  520. {
  521. if HasEnergyForRip()
  522. 0
  523. { EnergyForRip() - Energy() } / EnergyRegen()
  524. }
  525. AddFunction TimeTilEnergyForMangle
  526. {
  527. if HasEnergyForMangle()
  528. 0
  529. { EnergyForRip() - Energy() } / EnergyRegen()
  530. }
  531. AddFunction ThrashEnergySafetyMargin { TimeTilEnergyForThrash()+ExpiringBuffSafetyMargin() }
  532.  
  533.  
  534. ################
  535. # Buff Calculation assistance functions
  536. ################
  537. AddFunction AttackPowerToCrit asValue=1 { 1/CritPerAttackPower/{1+0.1*BuffStacks(attack_power_multiplier any=1)} }
  538. AddFunction PrimordiusStats asValue=1 { {1 + 0.05 * DebuffStacks(136184)} * {1 - 0.1 * DebuffStacks(136185)} } # Thick and Fragile bones
  539. AddFunction StatsMultiplier asValue=1 # Leatherwearer, Heart of the Wild, Mark of the Wild/Blessing of Kings, Primordius Buffs
  540. {
  541. if TalentPoints(HEART_OF_THE_WILD)
  542. LeatherSpecAgiModifier * HeartOfTheWildAgiModifier * {1 + StatsBuffBonus * BuffStacks(str_agi_int any=1)} * PrimordiusStats()
  543. LeatherSpecAgiModifier * {1 + StatsBuffBonus * BuffStacks(str_agi_int any=1)} * PrimordiusStats()
  544. }
  545. AddFunction DancingSteelAttackPowerIncrease asValue=1 { DancingSteelAttackPower*StatsMultiplier() }
  546. AddFunction SoulCharmAttackPowerIncrease asValue=1 { SoulCharmAttackPower()*StatsMultiplier() }
  547. AddFunction BadJujuAttackPowerIncrease asValue=1 { BadJujuAttackPower()*StatsMultiplier() }
  548. AddFunction ViciousTalismanAttackPowerIncrease asValue=1 { ViciousTalismanAttackPower()*StatsMultiplier() }
  549. AddFunction AssuranceOfConsequenceAttackPowerIncrease asValue=1 { AssuranceOfConsequenceAttackPower()*StatsMultiplier() }
  550. AddFunction HarommsTalismanAttackPowerIncrease asValue=1 { HarommsTalismanAttackPower()*StatsMultiplier() }
  551. AddFunction SigilOfRampageAttackPowerIncrease asValue=1 { SigilOfRampageAttackPower()*StatsMultiplier() }
  552. AddFunction TickingEbonDetonatorAttackPowerIncrease asValue=1 { TickingEbonDetonatorAttackPower()*BuffStacks(RESTLESS_AGILITY)*StatsMultiplier() }
  553.  
  554.  
  555. ################
  556. # Rake Buff related functions; Checks to ensure you can use a Rake before a buff expires
  557. ################
  558. AddFunction RakeCooldownSafetyMargin asValue=1 { SpellCooldown(RAKE)+ExpiringBuffSafetyMargin() }
  559. AddFunction RakeEnergySafetyMargin asValue=1 { TimeTilEnergyForRake()+ExpiringBuffSafetyMargin() }
  560. AddFunction RuneRakeExpiresBeforeUsable asValue=1
  561. {
  562. BuffRemains(ROR_MASTERY) < RakeCooldownSafetyMargin()
  563. or BuffRemains(ROR_MASTERY) < RakeEnergySafetyMargin()
  564.  
  565. }
  566. AddFunction RuneExpiresRakeMultiplier asValue=1
  567. {
  568. if BuffPresent(ROR_MASTERY) and RuneRakeExpiresBeforeUsable() RuneMultiplier 1
  569. }
  570. AddFunction TigersFuryRakeExpiresBeforeUsable asValue=1
  571. {
  572. BuffRemains(TIGERS_FURY) < RakeCooldownSafetyMargin()
  573. or BuffRemains(TIGERS_FURY) < RakeEnergySafetyMargin()
  574. }
  575. AddFunction TigersFuryExpiresRakeMultiplier asValue=1
  576. {
  577. if BuffPresent(TIGERS_FURY) and TigersFuryRakeExpiresBeforeUsable() TigersFuryMultiplier 1
  578. }
  579. AddFunction DancingSteelRakeExpiresBeforeUsable asValue=1
  580. {
  581. BuffRemains(DANCING_STEEL any=1) < RakeCooldownSafetyMargin()
  582. or BuffRemains(DANCING_STEEL any=1) < RakeEnergySafetyMargin()
  583. }
  584. AddFunction DancingSteelExpiresRakeAttackPower asValue=1
  585. {
  586. if BuffPresent(DANCING_STEEL any=1) and DancingSteelRakeExpiresBeforeUsable() DancingSteelAttackPowerIncrease() 0
  587. }
  588. AddFunction SoulCharmRakeExpiresBeforeUsable asValue=1
  589. {
  590. BuffRemains(SOUL_CHARM any=1) < RakeCooldownSafetyMargin()
  591. or BuffRemains(SOUL_CHARM any=1) < RakeEnergySafetyMargin()
  592. }
  593. AddFunction SoulCharmExpiresRakeAttackPower asValue=1
  594. {
  595. if BuffPresent(SOUL_CHARM any=1) and SoulCharmRakeExpiresBeforeUsable() SoulCharmAttackPowerIncrease() 0
  596. }
  597. AddFunction BadJujuRakeExpiresBeforeUsable asValue=1
  598. {
  599. BuffRemains(BAD_JUJU any=1) < RakeCooldownSafetyMargin()
  600. or BuffRemains(BAD_JUJU any=1) < RakeEnergySafetyMargin()
  601. }
  602. AddFunction BadJujuExpiresRakeAttackPower asValue=1
  603. {
  604. if BuffPresent(BAD_JUJU any=1) and BadJujuRakeExpiresBeforeUsable() BadJujuAttackPowerIncrease() 0
  605. }
  606. AddFunction ViciousTalismanRakeExpiresBeforeUsable asValue=1
  607. {
  608. BuffRemains(VICIOUS_TALISMAN any=1) < RakeCooldownSafetyMargin()
  609. or BuffRemains(VICIOUS_TALISMAN any=1) < RakeEnergySafetyMargin()
  610. }
  611. AddFunction ViciousTalismanExpiresRakeAttackPower asValue=1
  612. {
  613. if BuffPresent(VICIOUS_TALISMAN any=1) and ViciousTalismanRakeExpiresBeforeUsable() ViciousTalismanAttackPowerIncrease() 0
  614. }
  615. AddFunction AssuranceOfConsequenceRakeExpiresBeforeUsable asValue=1
  616. {
  617. BuffRemains(ASSURANCE_OF_CONSEQUENCE any=1) < RakeCooldownSafetyMargin()
  618. or BuffRemains(ASSURANCE_OF_CONSEQUENCE any=1) < RakeEnergySafetyMargin()
  619. }
  620. AddFunction AssuranceOfConsequenceExpiresRakeAttackPower asValue=1
  621. {
  622. if BuffPresent(ASSURANCE_OF_CONSEQUENCE any=1) and AssuranceOfConsequenceRakeExpiresBeforeUsable() AssuranceOfConsequenceAttackPowerIncrease() 0
  623. }
  624. AddFunction HarommsTalismanRakeExpiresBeforeUsable asValue=1
  625. {
  626. BuffRemains(HAROMMS_TALISMAN any=1) < RakeCooldownSafetyMargin()
  627. or BuffRemains(HAROMMS_TALISMAN any=1) < RakeEnergySafetyMargin()
  628. }
  629. AddFunction HarommsTalismanExpiresRakeAttackPower asValue=1
  630. {
  631. if BuffPresent(HAROMMS_TALISMAN any=1) and HarommsTalismanRakeExpiresBeforeUsable() HarommsTalismanAttackPowerIncrease() 0
  632. }
  633. AddFunction SigilOfRampageRakeExpiresBeforeUsable asValue=1
  634. {
  635. BuffRemains(SIGIL_OF_RAMPAGE any=1) < RakeCooldownSafetyMargin()
  636. or BuffRemains(SIGIL_OF_RAMPAGE any=1) < RakeEnergySafetyMargin()
  637. }
  638. AddFunction SigilOfRampageExpiresRakeAttackPower asValue=1
  639. {
  640. if BuffPresent(SIGIL_OF_RAMPAGE any=1) and SigilOfRampageRakeExpiresBeforeUsable() SigilOfRampageAttackPowerIncrease() 0
  641. }
  642. AddFunction TickingEbonDetonatorRakeExpiresBeforeUsable asValue=1
  643. {
  644. BuffRemains(SIGIL_OF_RAMPAGE any=1) < RakeCooldownSafetyMargin()
  645. or BuffRemains(SIGIL_OF_RAMPAGE any=1) < RakeEnergySafetyMargin()
  646. }
  647. AddFunction TickingEbonDetonatorExpiresRakeAttackPower asValue=1
  648. {
  649. if BuffPresent(TICKING_EBON_DETONATOR any=1)
  650. {
  651. if TickingEbonDetonatorRakeExpiresBeforeUsable() TickingEbonDetonatorAttackPowerIncrease()
  652. TickingEbonDetonatorAttackPower()
  653. }
  654. 0
  655. }
  656.  
  657. ################
  658. # Rip Buff related functions; Checks to ensure you can use a Rip before a buff expires
  659. ################
  660. AddFunction RipCooldownSafetyMargin asValue=1 { SpellCooldown(RIP)+ExpiringBuffSafetyMargin() }
  661. AddFunction RipEnergySafetyMargin asValue=1 { TimeTilEnergyForRip()+ExpiringBuffSafetyMargin() }
  662. AddFunction RuneRipExpiresBeforeUsable asValue=1
  663. {
  664. BuffRemains(ROR_MASTERY) < RipCooldownSafetyMargin()
  665. or BuffRemains(ROR_MASTERY) < RipEnergySafetyMargin()
  666.  
  667. }
  668. AddFunction RuneExpiresRipMultiplier asValue=1
  669. {
  670. if BuffPresent(ROR_MASTERY) and RuneRipExpiresBeforeUsable() RuneMultiplier 1
  671. }
  672. AddFunction TigersFuryRipExpiresBeforeUsable asValue=1
  673. {
  674. BuffRemains(TIGERS_FURY) < RipCooldownSafetyMargin()
  675. or BuffRemains(TIGERS_FURY) < RipEnergySafetyMargin()
  676. }
  677. AddFunction TigersFuryExpiresRipMultiplier asValue=1
  678. {
  679. if BuffPresent(TIGERS_FURY) and TigersFuryRipExpiresBeforeUsable() TigersFuryMultiplier 1
  680. }
  681. AddFunction DancingSteelRipExpiresBeforeUsable asValue=1
  682. {
  683. BuffRemains(DANCING_STEEL any=1) < RipCooldownSafetyMargin()
  684. or BuffRemains(DANCING_STEEL any=1) < RipEnergySafetyMargin()
  685. }
  686. AddFunction DancingSteelExpiresRipAttackPower asValue=1
  687. {
  688. if BuffPresent(DANCING_STEEL any=1) and DancingSteelRipExpiresBeforeUsable() DancingSteelAttackPowerIncrease() 0
  689. }
  690. AddFunction SoulCharmRipExpiresBeforeUsable asValue=1
  691. {
  692. BuffRemains(SOUL_CHARM any=1) < RipCooldownSafetyMargin()
  693. or BuffRemains(SOUL_CHARM any=1) < RipEnergySafetyMargin()
  694. }
  695. AddFunction SoulCharmExpiresRipAttackPower asValue=1
  696. {
  697. if BuffPresent(SOUL_CHARM any=1) and SoulCharmRipExpiresBeforeUsable() SoulCharmAttackPowerIncrease() 0
  698. }
  699. AddFunction BadJujuRipExpiresBeforeUsable asValue=1
  700. {
  701. BuffRemains(BAD_JUJU any=1) < RipCooldownSafetyMargin()
  702. or BuffRemains(BAD_JUJU any=1) < RipEnergySafetyMargin()
  703. }
  704. AddFunction BadJujuExpiresRipAttackPower asValue=1
  705. {
  706. if BuffPresent(BAD_JUJU any=1) and BadJujuRipExpiresBeforeUsable() BadJujuAttackPowerIncrease() 0
  707. }
  708. AddFunction ViciousTalismanRipExpiresBeforeUsable asValue=1
  709. {
  710. BuffRemains(VICIOUS_TALISMAN any=1) < RipCooldownSafetyMargin()
  711. or BuffRemains(VICIOUS_TALISMAN any=1) < RipEnergySafetyMargin()
  712. }
  713. AddFunction ViciousTalismanExpiresRipAttackPower asValue=1
  714. {
  715. if BuffPresent(VICIOUS_TALISMAN any=1) and ViciousTalismanRipExpiresBeforeUsable() ViciousTalismanAttackPowerIncrease() 0
  716. }
  717. AddFunction AssuranceOfConsequenceRipExpiresBeforeUsable asValue=1
  718. {
  719. BuffRemains(ASSURANCE_OF_CONSEQUENCE any=1) < RipCooldownSafetyMargin()
  720. or BuffRemains(ASSURANCE_OF_CONSEQUENCE any=1) < RipEnergySafetyMargin()
  721. }
  722. AddFunction AssuranceOfConsequenceExpiresRipAttackPower asValue=1
  723. {
  724. if BuffPresent(ASSURANCE_OF_CONSEQUENCE any=1) and AssuranceOfConsequenceRipExpiresBeforeUsable() AssuranceOfConsequenceAttackPowerIncrease() 0
  725. }
  726. AddFunction HarommsTalismanRipExpiresBeforeUsable asValue=1
  727. {
  728. BuffRemains(HAROMMS_TALISMAN any=1) < RipCooldownSafetyMargin()
  729. or BuffRemains(HAROMMS_TALISMAN any=1) < RipEnergySafetyMargin()
  730. }
  731. AddFunction HarommsTalismanExpiresRipAttackPower asValue=1
  732. {
  733. if BuffPresent(HAROMMS_TALISMAN any=1) and HarommsTalismanRipExpiresBeforeUsable() HarommsTalismanAttackPowerIncrease() 0
  734. }
  735. AddFunction SigilOfRampageRipExpiresBeforeUsable asValue=1
  736. {
  737. BuffRemains(SIGIL_OF_RAMPAGE any=1) < RipCooldownSafetyMargin()
  738. or BuffRemains(SIGIL_OF_RAMPAGE any=1) < RipEnergySafetyMargin()
  739. }
  740. AddFunction SigilOfRampageExpiresRipAttackPower asValue=1
  741. {
  742. if BuffPresent(SIGIL_OF_RAMPAGE any=1) and SigilOfRampageRipExpiresBeforeUsable() SigilOfRampageAttackPowerIncrease() 0
  743. }
  744. AddFunction TickingEbonDetonatorRipExpiresBeforeUsable asValue=1
  745. {
  746. BuffRemains(SIGIL_OF_RAMPAGE any=1) < RipCooldownSafetyMargin()
  747. or BuffRemains(SIGIL_OF_RAMPAGE any=1) < RipEnergySafetyMargin()
  748. }
  749. AddFunction TickingEbonDetonatorExpiresRipAttackPower asValue=1
  750. {
  751. if BuffPresent(TICKING_EBON_DETONATOR any=1)
  752. {
  753. if TickingEbonDetonatorRipExpiresBeforeUsable() TickingEbonDetonatorAttackPowerIncrease()
  754. TickingEbonDetonatorAttackPower()
  755. }
  756. 0
  757. }
  758.  
  759. ################
  760. # Rake Damage functions
  761. ################
  762. AddFunction RakeTickDamage asValue=1 # Switched to raw numbers in place of Damage(RAKE) for 5.3.4+ compatibility
  763. {
  764. {RakeBaseDamage + AttackPower()*RakeDamagePerAttackPower} * DamageMultiplier(RAKE) * CurrentCritChanceMultiplier() * CurrentMasteryMultiplier()
  765. }
  766. AddFunction LastRakeTickDamage asValue=1
  767. {
  768. {RakeBaseDamage + target.DebuffAttackPower(RAKE)*RakeDamagePerAttackPower} * target.DebuffDamageMultiplier(RAKE) * RakeDebuffCritChanceMultiplier() * {1+target.DebuffMastery(RAKE)/100}
  769. }
  770. AddFunction TotalRakeMultiplier asValue=1
  771. {
  772. RuneExpiresRakeMultiplier()*TigersFuryExpiresRakeMultiplier()
  773. }
  774. AddFunction TotalRakeAttackPower asValue=1
  775. {
  776. DancingSteelExpiresRakeAttackPower() +
  777. SoulCharmExpiresRakeAttackPower() +
  778. BadJujuExpiresRakeAttackPower() +
  779. ViciousTalismanExpiresRakeAttackPower() +
  780. AssuranceOfConsequenceExpiresRakeAttackPower() +
  781. HarommsTalismanExpiresRakeAttackPower() +
  782. SigilOfRampageExpiresRakeAttackPower() +
  783. TickingEbonDetonatorExpiresRakeAttackPower()
  784. }
  785. AddFunction FutureRakeTickDamage asValue=1
  786. {
  787. {RakeBaseDamage + {AttackPower() - TotalRakeAttackPower()} * RakeDamagePerAttackPower}
  788. * DamageMultiplier(RAKE) / TotalRakeMultiplier()
  789. * {CurrentCritChanceMultiplier() - TotalRakeAttackPower()*AttackPowerToCrit()}
  790. * CurrentMasteryMultiplier()
  791. }
  792. AddFunction RakeRatio asValue=1
  793. {
  794. if TargetDebuffPresent(RAKE) 100 * FutureRakeTickDamage()/LastRakeTickDamage()
  795. 100.0
  796. }
  797.  
  798. ################
  799. # Rip Damage functions
  800. ################
  801. AddFunction RipTickDamage asValue=1
  802. {
  803. {RipBaseDamage + {{RipDamagePerComboPoint + {RipDamagePerComboPointAttackPower * AttackPower()}} * ComboPoints()}} * DamageMultiplier(RIP) * CurrentCritChanceMultiplier() * CurrentMasteryMultiplier()
  804. }
  805. AddFunction LastRipTickDamage asValue=1
  806. {
  807. {RipBaseDamage + {{RipDamagePerComboPoint + {RipDamagePerComboPointAttackPower * target.DebuffAttackPower(RIP)}} * target.DebuffComboPoints(RIP)}} * target.DebuffDamageMultiplier(RIP) * RipDebuffCritChanceMultiplier() * {1 + target.DebuffMastery(RIP)/100}
  808. }
  809. AddFunction TotalRipMultiplier asValue=1
  810. {
  811. RuneExpiresRipMultiplier()*TigersFuryExpiresRipMultiplier()
  812. }
  813. AddFunction TotalRipAttackPower asValue=1
  814. {
  815. DancingSteelExpiresRipAttackPower() +
  816. SoulCharmExpiresRipAttackPower() +
  817. BadJujuExpiresRipAttackPower() +
  818. ViciousTalismanExpiresRipAttackPower() +
  819. AssuranceOfConsequenceExpiresRipAttackPower() +
  820. HarommsTalismanExpiresRipAttackPower() +
  821. SigilOfRampageExpiresRipAttackPower() +
  822. TickingEbonDetonatorExpiresRipAttackPower()
  823. }
  824. AddFunction FutureRipTickDamage asValue=1
  825. {
  826. {RipBaseDamage + {{RipDamagePerComboPoint + {RipDamagePerComboPointAttackPower * {AttackPower() - TotalRipAttackPower()}}} * ComboPoints()}}
  827. * DamageMultiplier(RIP) / TotalRipMultiplier()
  828. * {CurrentCritChanceMultiplier() - TotalRipAttackPower()*AttackPowerToCrit()}
  829. * CurrentMasteryMultiplier()
  830. }
  831. AddFunction RipDamageTillDead asValue=1
  832. {
  833. # The damage from Rip that is cast under the current conditions and lasting till target is dead.
  834. # Multiply the damage per tick with the number of ticks that can fit into the time to die.
  835. FutureRipTickDamage() * {target.TimeToDie() / 2}
  836. }
  837. AddFunction ExistingRipDamageTillDead asValue=1
  838. {
  839. # The damage from Rip that is already on the target and lasting till target is dead.
  840. if target.DebuffPresent(RIP)
  841. {
  842. # Multiply the damage per tick with the number of ticks that can fit into the time to die.
  843. LastRipTickDamage() * {target.TimeToDie() / 2}
  844. }
  845. 0
  846. }
  847. AddFunction RipRatio asValue=1
  848. {
  849. if TargetDebuffPresent(RIP) 100 * FutureRipTickDamage()/LastRipTickDamage()
  850. 100.0
  851. }
  852.  
  853. ################
  854. # Ability damage functions
  855. ################
  856. AddFunction FerociousBiteDamage asValue=1 # Switched to raw numbers in place of Damage(FEROCIOUS_BITE) for 5.3.4+ compatibility
  857. {
  858. {FerociousBiteBaseDamage + {FerociousBiteDamagePerComboPoint + FerociousBiteDamagePerComboPointAttackPower * AttackPower()} * ComboPoints()} * DamageMultiplier(FEROCIOUS_BITE) * FerociousBiteCritChanceMultiplier() * 2 * ArmorReduction()
  859. }
  860. AddFunction MangleCatDamage asValue=1
  861. {
  862. {MangleCatBaseDamage + WeaponDamage()} * MangleCatWeaponDamageMultiplier * DamageMultiplier(MANGLE_CAT) * CurrentCritChanceMultiplier() * ArmorReduction()
  863. }
  864. AddFunction ShredDamage asValue=1
  865. {
  866. MangleCatDamage()*1.2
  867. }
  868. AddFunction ThrashCatHitDamage asValue=1
  869. {
  870. {ThrashHitBaseDamage + AttackPower()}*ThrashHitDamagePerAttackPower * DamageMultiplier(THRASH_CAT) * CurrentCritChanceMultiplier() * CurrentMasteryMultiplier()
  871. }
  872. AddFunction SwipeCatDamage asValue=1
  873. {
  874. WeaponDamage() * MangleCatWeaponDamageMultiplier * DamageMultiplier(MANGLE_CAT) * CurrentCritChanceMultiplier() * ArmorReduction()
  875. }
  876. AddFunction RavageDamage asValue=1
  877. {
  878. {RavageBaseDamage + WeaponDamage()} * RavageWeaponDamageMultiplier * DamageMultiplier(RAVAGE) * RavageCritChanceMultiplier() * ArmorReduction()
  879. }
  880.  
  881. ################
  882. # Misc functions
  883. ################
  884. AddFunction FaerieFire
  885. {
  886. if TalentPoints(FAERIE_SWARM_TALENT) Spell(FAERIE_SWARM)
  887. unless TalentPoints(FAERIE_SWARM_TALENT) Spell(FAERIE_FERAL)
  888. }
  889. AddFunction SavageRoar
  890. {
  891. if Glyph(GLYPH_OF_SAVAGERY) Spell(SAVAGE_ROAR_GLYPHED)
  892. if Glyph(GLYPH_OF_SAVAGERY no) and ComboPoints(more 0) Spell(SAVAGE_ROAR_OLD)
  893. }
  894. AddFunction UsePotion
  895. {
  896. #virmens_bite_potion
  897. Item(virmens_bite_potion)
  898. }
  899. AddFunction TreantTimeThreshold
  900. {
  901. 1+{Charges(FORCE_OF_NATURE)-1}*0.33
  902. }
  903.  
  904. #############################
  905. ## Feral rotation functions (Mastery=2) ##
  906. #############################
  907.  
  908. AddFunction NotInCombat
  909. {
  910. unless InCombat() {
  911. if BuffExpires(str_agi_int 400 any=1) Spell(MARK_OF_THE_WILD)
  912. if BuffExpires(DREAM_OF_CENARIUS) and TalentPoints(DREAM_OF_CENARIUS_TALENT) Spell(HEALING_TOUCH)
  913. unless Stance(3) Spell(CAT_FORM)
  914. if Glyph(GLYPH_OF_SAVAGERY) and ComboPoints(atMost 0) {
  915. if BuffRemains(SAVAGE_ROAR_GLYPHED less 12) and TimeToMaxEnergy() < BuffRemains(SAVAGE_ROAR_GLYPHED)-11.5
  916. or BuffRemains(SAVAGE_ROAR_GLYPHED less 9) and TimeToMaxEnergy() < BuffRemains(SAVAGE_ROAR_GLYPHED)-8.5
  917. or BuffRemains(SAVAGE_ROAR_GLYPHED less 6) and TimeToMaxEnergy() < BuffRemains(SAVAGE_ROAR_GLYPHED)-5.5
  918. or BuffRemains(SAVAGE_ROAR_GLYPHED less 3) and TimeToMaxEnergy() < BuffRemains(SAVAGE_ROAR_GLYPHED)-2.5
  919. or BuffExpires(SAVAGE_ROAR_GLYPHED)
  920. {
  921. SavageRoar()
  922. }
  923. }
  924. if TalentPoints(FORCE_OF_NATURE_TALENT) Spell(FORCE_OF_NATURE)
  925. }
  926. }
  927.  
  928. AddFunction SpareGcdCooldowns {
  929. # Spirit Wolves goes here when symbiosis is supported appropriately.
  930. }
  931. AddFunction HealingTouch
  932. {
  933. #healing_touch,if=talent.dream_of_cenarius.enabled&buff.predatory_swiftness.up&buff.dream_of_cenarius.down&(buff.predatory_swiftness.remains<1.5|combo_points>=4)
  934. if TalentPoints(DREAM_OF_CENARIUS_TALENT) and BuffPresent(PREDATORY_SWIFTNESS) and BuffExpires(DREAM_OF_CENARIUS_DAMAGE) and
  935. {BuffRemains(PREDATORY_SWIFTNESS atMost 1.5) or ComboPoints(atLeast 4)}
  936. {
  937. Spell(HEALING_TOUCH)
  938. }
  939. }
  940. AddFunction SavageRoarOrWeakenedArmorMissing
  941. {
  942. #savage_roar,if=buff.savage_roar.down
  943. if BuffExpires(SAVAGE_ROAR) SavageRoar()
  944.  
  945. #faerie_fire,if=debuff.weakened_armor.stack<3
  946. if target.DebuffStacks(WEAKENED_ARMOR any=1 less 3) and CheckBoxOn(lucioles) FaerieFire()
  947. }
  948.  
  949. AddFunction RangeCheck
  950. {
  951. #range check
  952. unless target.InRange(MANGLE_CAT) Texture(ability_druid_catformattack)
  953. }
  954.  
  955. AddFunction DpsCooldownLogic
  956. {
  957. #incarnation,if=energy<=35&!buff.omen_of_clarity.react&cooldown.tigers_fury.remains=0&cooldown.berserk.remains=0
  958. #use_item,slot=hands,if=buff.tigers_fury.up
  959. #tigers_fury,if=(energy<=35&!buff.omen_of_clarity.react)|buff.king_of_the_jungle.up
  960. #berserk,if=buff.tigers_fury.up|(target.time_to_die<15&cooldown.tigers_fury.remains>6)
  961. if {{Energy(atMost 35) and BuffExpires(CLEARCASTING)} or BuffPresent(INCARNATION_CAT)} and Spell(TIGERS_FURY)
  962. {
  963. if CheckBoxOn(berserk) and Spell(BERSERK_CAT)
  964. {
  965. if not TalentPoints(INCARNATION_TALENT) or BuffPresent(INCARNATION_CAT) Spell(BERSERK_CAT)
  966. if TalentPoints(INCARNATION_TALENT) wait Spell(INCARNATION) #wait is necessary otherwise it suggests TF for about a half second before suggesting Incarnation
  967. }
  968. unless BuffPresent(BERSERK_CAT) Spell(TIGERS_FURY)
  969. }
  970. if CheckBoxOn(berserk)
  971. {
  972. if TalentPoints(INCARNATION_TALENT) and BuffPresent(BERSERK_CAT) Spell(INCARNATION_CAT)
  973. if TalentPoints(NATURES_VIGIL_TALENT) and {BuffPresent(BERSERK_CAT) or SpellCooldown(BERSERK_CAT more 88)} Spell(NATURES_VIGIL)
  974. }
  975.  
  976. }
  977.  
  978. AddFunction ExecuteRangeRipFerociousBiteLogic
  979. {
  980. #ferocious_bite,if=combo_points>=1&dot.rip.ticking&dot.rip.remains<=3&target.health.pct<=25
  981. if target.HealthPercent(atMost 25) and ComboPoints(more 0)
  982. and target.DebuffPresent(RIP) and target.DebuffRemains(RIP less 4) # is 4 instead of 3 because the remaining time on rip can be inaccurate upto 2 seconds
  983. {
  984. Spell(FEROCIOUS_BITE)
  985. }
  986.  
  987. #thrash_cat,if=target.time_to_die>=6&buff.omen_of_clarity.react&dot.thrash_cat.remains<3
  988. if target.TimeToDie(atLeast 9) and BuffPresent(CLEARCASTING)
  989. and target.DebuffRemains(THRASH_CAT less 3)
  990. {
  991. Spell(THRASH_CAT)
  992. }
  993.  
  994. #ferocious_bite,if=target.time_to_die<=1&combo_points>=3
  995. if target.TimeToDie(atMost 1) and ComboPoints(atLeast 3) Spell(FEROCIOUS_BITE)
  996.  
  997. #savage_roar,if=buff.savage_roar.remains<=3&combo_points>0&target.health.pct<25
  998. if BuffRemains(SAVAGE_ROAR less 3) and ComboPoints(more 0) and target.HealthPercent(atMost 25)
  999. {
  1000. SavageRoar()
  1001. }
  1002.  
  1003. if ComboPoints(atLeast 5)
  1004. {
  1005. if CheckBoxOn(potions) and target.Classification(worldboss) and ItemCount(VIRMENS_BITE_ITEM more 0)
  1006. {
  1007. if TimeToHealthPercent(25 atMost 15)
  1008. {
  1009. #virmens_bite_potion,if=combo_points>=5&$(time_til_bitw)<15&$(rip_ratio)>=1.15&buff.dream_of_cenarius_damage.up
  1010. if not HasTrinket(ROR_ITEM) and ComboPoints(atLeast 5) and {BuffPresent(DREAM_OF_CENARIUS) or not TalentPoints(DREAM_OF_CENARIUS_TALENT)} and RipRatio() >=115 Item(VIRMENS_BITE_ITEM)
  1011.  
  1012. #virmens_bite_potion,if=combo_points>=5&$(time_til_bitw)<15&buff.rune_of_reorigination.up&buff.dream_of_cenarius_damage.up
  1013. if HasTrinket(ROR_ITEM) and ComboPoints(atLeast 5) and {BuffPresent(DREAM_OF_CENARIUS) or not TalentPoints(DREAM_OF_CENARIUS_TALENT)} and BuffPresent(ROR_MASTERY) Item(VIRMENS_BITE_ITEM)
  1014. }
  1015. #virmens_bite_potion,if=target.time_to_die<=40
  1016. if target.TimeToDie(atMost 40) Item(VIRMENS_BITE_ITEM)
  1017. }
  1018.  
  1019. #rip,if=combo_points>=5&(tick_damage*(1+crit_pct_current)-tick_dmg*(1+crit_pct))*target.time_to_die%2>=action.ferocious_bite.hit_damage*(1+action.ferocious_bite.crit_pct_current)*2&target.health.pct<=25
  1020. if RipDamageTillDead() > ExistingRipDamageTillDead() + FerociousBiteDamage() and {target.HealthPercent(atMost 25) or target.TimeToDie(atMost 16)}
  1021. {
  1022. Spell(RIP)
  1023. }
  1024.  
  1025. #pool_resource,wait=0.25,if=combo_points>=5&dot.rip.ticking&target.health.pct<=25&((energy<50&buff.berserk.down)|(energy<25&buff.berserk.remains>1))
  1026. #ferocious_bite,if=combo_points>=5&dot.rip.ticking&target.health.pct<=25
  1027. if target.DebuffPresent(RIP) and target.HealthPercent(atMost 25)
  1028. {
  1029. if not HasEnergyForFerociousBite() SpareGcdCooldowns()
  1030. wait if HasEnergyForFerociousBite() Spell(FEROCIOUS_BITE)
  1031. }
  1032. }
  1033. }
  1034.  
  1035. AddFunction RipLogic
  1036. {
  1037. if target.HealthPercent(more 25) and target.TimeToDie(more 16)
  1038. {
  1039. #rip,if=combo_points>=5&$(rip_ratio)>=1.15
  1040. if ComboPoints(atLeast 5) and RipRatio() >= 115
  1041. {
  1042. Spell(RIP)
  1043. }
  1044.  
  1045. #rip,if=combo_points>=5&target.time_to_die>=6&dot.rip.remains<2
  1046. if ComboPoints(atLeast 5)
  1047. and {{HasEnergyForRip() and target.DebuffRemains(RIP less 2)}
  1048. or {not HasEnergyForRip() and target.DebuffRemains(RIP) <2+TimeTilEnergyForRip()}}
  1049. {
  1050. Spell(RIP)
  1051. }
  1052.  
  1053. #rip,if=combo_points>=5&action.rip.tick_damage%dot.rip.tick_dmg>=1.15
  1054. if BuffPresent(ROR_MASTERY) and RipRatio() >= 95 and ComboPoints(atLeast 4)
  1055. and {{HasEnergyForRip() and BuffRemains(ROR_MASTERY atMost 1.5) and BuffRemains(ROR_MASTERY) > ExpiringBuffSafetyMargin()}
  1056. or {not HasEnergyForRip() and BuffRemains(ROR_MASTERY) <=1.5 + TimeTilEnergyForRip() and BuffRemains(ROR_MASTERY) > RipEnergySafetyMargin() and TimeTilEnergyForRip() < BuffRemains(ROR_MASTERY) - ExpiringBuffSafetyMargin()}}
  1057. {
  1058. Spell(RIP)
  1059. }
  1060. }
  1061. }
  1062.  
  1063. AddFunction SavageRoarRefreshLogic
  1064. {
  1065. #savage_roar,if=buff.savage_roar.remains<3&combo_points>0&buff.savage_roar.remains+2>dot.rip.remains
  1066. if BuffRemains(SAVAGE_ROAR less 3) and ComboPoints(more 0) and BuffRemains(SAVAGE_ROAR) +2 > target.DebuffRemains(RIP)
  1067. {
  1068. SavageRoar()
  1069. }
  1070.  
  1071. #savage_roar,if=buff.savage_roar.remains<6&combo_points>=5&buff.savage_roar.remains+2<=dot.rip.remains&dot.rip.ticking
  1072. if BuffRemains(SAVAGE_ROAR less 6) and ComboPoints(atLeast 5) and BuffRemains(SAVAGE_ROAR) +2 <= target.DebuffRemains(RIP) and target.DebuffPresent(RIP)
  1073. {
  1074. SavageRoar()
  1075. }
  1076.  
  1077. #savage_roar,if=buff.savage_roar.remains<12&combo_points>=5&energy.time_to_max<=1.25&buff.savage_roar.remains<=dot.rip.remains+6&dot.rip.ticking
  1078. if BuffRemains(SAVAGE_ROAR less 12) and ComboPoints(atLeast 5) and TimeToMaxEnergy(atMost 1.25) and BuffRemains(SAVAGE_ROAR) <= target.DebuffRemains(RIP) +6
  1079. {
  1080. SavageRoar()
  1081. }
  1082. }
  1083.  
  1084. AddFunction RakeLogic
  1085. {
  1086. if target.TimeToDie() - target.DebuffRemains(RAKE) >3
  1087. {
  1088. #rake,if=target.time_to_die-dot.rake.remains>3&buff.rune_of_reorigination.up&dot.rake.remains<9&(buff.rune_of_reorigination.remains<=1.5)
  1089. if BuffPresent(ROR_MASTERY) and RakeRatio() > 75
  1090. and {{HasEnergyForRake() and target.DebuffRemains(RAKE less 9) and BuffRemains(ROR_MASTERY atMost 1.5)
  1091. and ExpiringBuffSafetyMargin() < BuffRemains(ROR_MASTERY)}
  1092. or {not HasEnergyForRake() and target.DebuffRemains(RAKE) <9 + TimeTilEnergyForRake() and BuffRemains(ROR_MASTERY) <=1.5 + TimeTilEnergyForRake()
  1093. and RakeEnergySafetyMargin() < BuffRemains(ROR_MASTERY) and TimeTilEnergyForRake() < BuffRemains(ROR_MASTERY) - ExpiringBuffSafetyMargin()}}
  1094. {
  1095. Spell(RAKE)
  1096. }
  1097.  
  1098. #rake,if=target.time_to_die-dot.rake.remains>3&(action.rake.tick_damage>dot.rake.tick_dmg*1.12|(dot.rake.remains<3&action.rake.tick_damage%dot.rake.tick_dmg>=0.75))
  1099. if RakeRatio() > 75
  1100. and {{HasEnergyForRake() and target.DebuffRemains(RAKE less 3)}
  1101. or {not HasEnergyForRake() and target.DebuffRemains(RAKE) < 3 + TimeTilEnergyForRake()}}
  1102. {
  1103. Spell(RAKE)
  1104. }
  1105. if RakeRatio() > 112
  1106. {
  1107. Spell(RAKE)
  1108. }
  1109.  
  1110. #rake if its about to fall off. Simcraft doesn't require this line but ovale does for the prediction box.
  1111. if {HasEnergyForRake() and target.DebuffRemains(RAKE) < 0.001}
  1112. or {not HasEnergyForRake() and target.DebuffRemains(RAKE) < 0.001 + TimeTilEnergyForRake()}
  1113. {
  1114. Spell(RAKE)
  1115. }
  1116. }
  1117. }
  1118.  
  1119. AddFunction ThrashLogic
  1120. {
  1121. #pool_resource,wait=0.25,for_next=1
  1122. #thrash_cat,if=target.time_to_die>=6&dot.thrash_cat.remains<3&(dot.rip.remains>=8&buff.savage_roar.remains>=12|buff.berserk.up|combo_points>=5)&dot.rip.ticking
  1123. if {HasEnergyForThrash()
  1124. and target.DebuffRemains(THRASH_CAT less 3)
  1125. and target.TimeToDie(atLeast 9)
  1126. and {{target.DebuffRemains(RIP atLeast 8) and BuffRemains(SAVAGE_ROAR atLeast 12)}
  1127. or BuffPresent(BERSERK_CAT) or ComboPoints(atLeast 5)}}
  1128. or {not HasEnergyForThrash()
  1129. and target.DebuffRemains(THRASH_CAT) < 3 + TimeTilEnergyForThrash()
  1130. and target.TimeToDie() >=9 + TimeTilEnergyForThrash()
  1131. and {{target.DebuffRemains(RIP) >=8 + TimeTilEnergyForThrash() and BuffRemains(SAVAGE_ROAR) >=12 + TimeTilEnergyForThrash()}
  1132. or BuffPresent(BERSERK_CAT) or ComboPoints(atLeast 5)}}
  1133. {
  1134. if TimeTilEnergyForThrash() >=1.5 SpareGcdCooldowns()
  1135. Spell(THRASH_CAT)
  1136. }
  1137.  
  1138. #pool_resource,for_next=1
  1139. #thrash_cat,if=target.time_to_die>=6&dot.thrash_cat.remains<9&buff.rune_of_reorigination.up&buff.rune_of_reorigination.remains<=1.5&dot.rip.ticking
  1140. if BuffPresent(ROR_MASTERY) and target.DebuffPresent(RIP)
  1141. and {{HasEnergyForThrash()
  1142. and ExpiringBuffSafetyMargin() < BuffRemains(ROR_MASTERY)
  1143. and target.DebuffRemains(THRASH_CAT less 9) and BuffRemains(ROR_MASTERY atMost 1.5)
  1144. and target.TimeToDie(atLeast 9)}
  1145. or {not HasEnergyForThrash()
  1146. and ThrashEnergySafetyMargin() < BuffRemains(ROR_MASTERY)
  1147. and target.DebuffRemains(THRASH_CAT) < 9 + TimeTilEnergyForThrash()
  1148. and BuffRemains(ROR_MASTERY) <=1.5 + TimeTilEnergyForThrash()
  1149. and TimeTilEnergyForThrash() <= BuffRemains(ROR_MASTERY) + ExpiringBuffSafetyMargin()
  1150. and target.TimeToDie() >=9 + TimeTilEnergyForThrash()}}
  1151. {
  1152. if TimeTilEnergyForThrash() >=1.5 SpareGcdCooldowns()
  1153. Spell(THRASH_CAT)
  1154. }
  1155. }
  1156.  
  1157. AddFunction FerociousBiteWaitConditions { TimeToMaxEnergy(atMost 1.25) or {{target.DebuffExpires(RIP) or BuffPresent(BERSERK_CAT) or SpellCooldown(TIGERS_FURY atMost 1.5)} and HasEnergyForFerociousBite()} or {BuffPresent(FERAL_RAGE) and BuffRemains(FERAL_RAGE atMost 1.25)} }
  1158. AddFunction NonExcuteRangeFerociousBiteLogic
  1159. {
  1160. #pool_resource,if=combo_points>=5&!(energy.time_to_max<=1.25|(buff.feral_rage.up&buff.feral_rage.remains<1)|(energy>=50&cooldown.tigers_fury.remains<=1.5)|(buff.berserk.up&energy>=25))&dot.rip.ticking
  1161. #ferocious_bite,if=combo_points>=5&dot.rip.ticking
  1162. if ComboPoints(atLeast 5) and {target.DebuffPresent(RIP) or target.TimeToDie(atMost 16)} and BuffPresent(SAVAGE_ROAR)
  1163. {
  1164. if not FerociousBiteWaitConditions() SpareGcdCooldowns()
  1165. wait if FerociousBiteWaitConditions() Spell(FEROCIOUS_BITE)
  1166. }
  1167. }
  1168. AddFunction RakeVsMangleTargetNotDieing asValue=1 { FutureRakeTickDamage() * {target.TicksRemain(RAKE)+1} - LastRakeTickDamage() * target.TicksRemain(RAKE) >= MangleCatDamage() }
  1169. AddFunction RakeVsMangleTargetIsDieing asValue=1 { FutureRakeTickDamage() * {target.TimeToDie()/3+1} - LastRakeTickDamage() * target.TimeToDie()/3 >= MangleCatDamage() }
  1170. AddFunction FillerActions
  1171. {
  1172. #rake,if=target.time_to_die-dot.rake.remains>3&action.rake.tick_damage*(dot.rake.ticks_remain+1)-dot.rake.tick_dmg*dot.rake.ticks_remain>action.mangle_cat.hit_damage
  1173. if target.TimeToDie() - target.DebuffRemains(RAKE) >=3 and RakeVsMangleTargetNotDieing()
  1174. {
  1175. Spell(RAKE)
  1176. }
  1177. #rake,if=target.time_to_die-dot.rake.remains<=3&action.rake.tick_damage*(target.time_to_die%3+1)-dot.rake.tick_dmg*target.time_to_die%3>action.mangle_cat.hit_damage
  1178. if target.TimeToDie() - target.DebuffRemains(RAKE) <3 and RakeVsMangleTargetIsDieing()
  1179. {
  1180. Spell(RAKE)
  1181. }
  1182. #ravage
  1183. if BuffPresent(INCARNATION_CAT) Spell(RAVAGE)
  1184.  
  1185. #actions.filler+=/shred,if=(buff.omen_of_clarity.react|buff.berserk.up|energy.regen>=15)&buff.king_of_the_jungle.down
  1186. if BuffPresent(CLEARCASTING) Spell(SHRED)
  1187. if BuffPresent(BERSERK_CAT) or EnergyRegen(atLeast 15)
  1188. and {not CheckBoxOn(infront)
  1189. or {Glyph(GLYPH_OF_SHRED) and {BuffPresent(TIGERS_FURY) or BuffPresent(BERSERK_CAT)}}}
  1190. Spell(SHRED)
  1191.  
  1192. #actions.filler+=/mangle_cat,if=buff.king_of_the_jungle.down
  1193. Spell(MANGLE_CAT)
  1194. }
  1195.  
  1196. AddFunction AoeFillerActions
  1197. {
  1198. if ThrashCatHitDamage() > SwipeCatDamage() * 1.11
  1199. and {{HasEnergyForThrash() and ExpiringBuffSafetyMargin() < BuffRemains(ROR_MASTERY)}
  1200. or {not HasEnergyForThrash() and ThrashEnergySafetyMargin() < BuffRemains(ROR_MASTERY)}}
  1201. {
  1202. Spell(THRASH_CAT)
  1203. }
  1204. Spell(SWIPE_CAT)
  1205. }
  1206.  
  1207.  
  1208. # Feral rotation
  1209.  
  1210. AddFunction MainActions
  1211. {
  1212. HealingTouch()
  1213.  
  1214. SavageRoarOrWeakenedArmorMissing()
  1215.  
  1216. RangeCheck()
  1217.  
  1218. DpsCooldownLogic()
  1219.  
  1220. #Also includes Clearcasting Thrash and end of fight Ferocious Bite
  1221. ExecuteRangeRipFerociousBiteLogic()
  1222.  
  1223. RipLogic()
  1224.  
  1225. SavageRoarRefreshLogic()
  1226.  
  1227. RakeLogic()
  1228.  
  1229. ThrashLogic()
  1230.  
  1231. NonExcuteRangeFerociousBiteLogic()
  1232. }
  1233.  
  1234. AddFunction FillerConditions
  1235. {
  1236. #run_action_list,name=filler,if=buff.omen_of_clarity.react
  1237. BuffPresent(CLEARCASTING)
  1238. #run_action_list,name=filler,if=buff.feral_fury.react
  1239. or {BuffPresent(FERAL_FURY) and BuffRemains(FERAL_FURY) > TimeTilEnergyForMangle()}
  1240. #run_action_list,name=filler,if=(combo_points<5&dot.rip.remains<3)|(combo_points=0&buff.savage_roar.remains<2)
  1241. or {not ComboPoints(atLeast 5) and target.DebuffRemains(RIP less 3)}
  1242. or {ComboPoints(atMost 0) and BuffRemains(SAVAGE_ROAR less 2)}
  1243. #run_action_list,name=filler,if=target.time_to_die<=8.5
  1244. or target.TimeToDie(atMost 8.5)
  1245. #run_action_list,name=filler,if=(talent.dream_of_cenarius.enabled&buff.tigers_fury.up)|buff.berserk.up
  1246. or {TalentPoints(DREAM_OF_CENARIUS_TALENT) and BuffPresent(TIGERS_FURY)}
  1247. or BuffPresent(BERSERK_CAT)
  1248. #run_action_list,name=filler,if=cooldown.tigers_fury.remains<=3
  1249. or SpellCooldown(TIGERS_FURY atMost 3)
  1250. #run_action_list,name=filler,if=talent.dream_of_cenarius.enabled&combo_points<=3&buff.predatory_swiftness.remains<(5.5-combo_points)&buff.predatory_swiftness.up
  1251. or {TalentPoints(DREAM_OF_CENARIUS_TALENT) and BuffPresent(PREDATORY_SWIFTNESS) and BuffRemains(PREDATORY_SWIFTNESS) <= {5.5-ComboPoints()} and ComboPoints(less 4)}
  1252. #run_action_list,name=filler,if=energy.time_to_max<=1
  1253. or TimeToMaxEnergy(atMost 1.25)
  1254. }
  1255.  
  1256. AddFunction AoeActions
  1257. {
  1258. HealingTouch()
  1259.  
  1260. SavageRoarOrWeakenedArmorMissing()
  1261.  
  1262. RangeCheck()
  1263.  
  1264. DpsCooldownLogic()
  1265.  
  1266. ExecuteRangeRipFerociousBiteLogic()
  1267.  
  1268. if TalentPoints(DREAM_OF_CENARIUS_TALENT) or TalentPoints(SOUL_OF_THE_FOREST_TALENT) or Enemies(atMost 6)
  1269. {
  1270. RipLogic()
  1271. }
  1272.  
  1273. SavageRoarRefreshLogic()
  1274.  
  1275. #pool_resource,for_next=1
  1276. #thrash_cat,if=dot.thrash_cat.remains<3
  1277. if {HasEnergyForThrash()
  1278. and target.DebuffRemains(THRASH_CAT less 3)}
  1279. or {not HasEnergyForThrash()
  1280. and target.DebuffRemains(THRASH_CAT) < 3 + TimeTilEnergyForThrash()}
  1281. {
  1282. if TimeTilEnergyForThrash() >=1.5 SpareGcdCooldowns()
  1283. Spell(THRASH_CAT)
  1284. }
  1285.  
  1286. if target.TimeToDie() - target.DebuffRemains(RAKE) >15
  1287. {
  1288. #rake,if=buff.rune_of_reorigination.up&active_enemies<=8&dot.rake.remains<3&target.time_to_die>=15&action.rake.tick_damage%dot.rake.tick_dmg>=0.75
  1289. if BuffPresent(ROR_MASTERY) and RakeRatio() >75 and Enemies(atMost 8)
  1290. and {{HasEnergyForRake() and target.DebuffRemains(RAKE less 3) and ExpiringBuffSafetyMargin() < BuffRemains(ROR_MASTERY)}
  1291. or {not HasEnergyForRake() and target.DebuffRemains(RAKE) < 3 + TimeTilEnergyForRake() and RakeEnergySafetyMargin() < BuffRemains(ROR_MASTERY) and TimeTilEnergyForRake() <= BuffRemains(ROR_MASTERY) + ExpiringBuffSafetyMargin()}}
  1292. {
  1293. Spell(RAKE)
  1294. }
  1295.  
  1296. if Enemies(atMost 4)
  1297. {
  1298. #rake,if=active_enemies<=4&dot.rake.remains<3&target.time_to_die>=15&action.rake.tick_damage%dot.rake.tick_dmg>=0.75
  1299. if RakeRatio() >75
  1300. and {{HasEnergyForRake() and target.DebuffRemains(RAKE less 3)}
  1301. or {not HasEnergyForRake() and target.DebuffRemains(RAKE) < 3 + TimeTilEnergyForRake()}}
  1302. {
  1303. Spell(RAKE)
  1304. }
  1305. #rake if its about to fall off. Simcraft doesn't require this line but ovale does for the prediction box.
  1306. if {HasEnergyForRake() and target.DebuffRemains(RAKE less 0.001)}
  1307. or {not HasEnergyForRake() and target.DebuffRemains(RAKE) < 0.001 + TimeTilEnergyForRake()}
  1308. {
  1309. Spell(RAKE)
  1310. }
  1311. }
  1312. }
  1313.  
  1314. #ferocious_bite,if=combo_points>=5&dot.rip.ticking&talent.dream_of_cenarius.enabled&talent.soul_of_the_forest.enabled&buff.berserk.up
  1315. if TalentPoints(DREAM_OF_CENARIUS_TALENT) and TalentPoints(SOUL_OF_THE_FOREST_TALENT) and BuffPresent(BERSERK_CAT)
  1316. {
  1317. Spell(FEROCIOUS_BITE)
  1318. }
  1319.  
  1320. }
  1321.  
  1322. AddFunction Prediction
  1323. {
  1324. if Stance(3) {
  1325. MainActions()
  1326. }
  1327. if Stance(1) {
  1328. if BuffPresent(HEART_OF_THE_WILD) Spell(FRENZIED_REGEN)
  1329. unless BuffPresent(HEART_OF_THE_WILD) Spell(CAT_FORM)
  1330. }
  1331. if Stance(0) {
  1332. if BuffPresent(HEART_OF_THE_WILD) {
  1333. if BuffExpires(HEART_OF_THE_WILD) Texture(spell_holy_blessingofagility)
  1334. }
  1335. unless BuffPresent(HEART_OF_THE_WILD) Spell(CAT_FORM)
  1336. }
  1337. if Stance(4) or Stance(2) Spell(CAT_FORM)
  1338. }
  1339.  
  1340. #####################
  1341. ## Feral icons (Mastery=2) ##
  1342. #####################
  1343.  
  1344. AddIcon help=Rake_Ratio size=small mastery=2 checkboxon=cooldownsRatio
  1345. {
  1346. RakeRatio()
  1347. }
  1348.  
  1349. AddIcon help=Rip_Ratio size=small mastery=2 checkboxon=cooldownsRatio
  1350. {
  1351. RipRatio()
  1352. }
  1353.  
  1354. #AddIcon help=Interrupts_and_Wild_Charge size=small mastery=2 checkboxon=cooldownsL {
  1355. # if target.InRange(SKULL_BASH_CAT) Spell(SKULL_BASH_CAT)
  1356. # unless target.Classification(worldboss)
  1357. # {
  1358. # if TalentPoints(MIGHTY_BASH_TALENT) and target.InRange(MIGHTY_BASH) Spell(MIGHTY_BASH)
  1359. # if TalentPoints(TYPHOON_TALENT) and target.InRange(SKULL_BASH_CAT) Spell(TYPHOON)
  1360. # if ComboPoints(more 0) and target.InRange(MAIM) Spell(MAIM)
  1361. # }
  1362. # Spell(WILD_CHARGE)
  1363. #}
  1364.  
  1365. AddIcon size=small mastery=2 checkboxon=cooldownsL {
  1366. Spell(TIGERS_FURY)
  1367. }
  1368. AddIcon help=Berserk size=small mastery=2 checkboxon=cooldownsL { # Berserk Icon
  1369. if BuffPresent(TIGERS_FURY) Spell(BERSERK_CAT)
  1370. if Spell(BERSERK_CAT) Texture(Ability_mount_polarbear_white)
  1371. }
  1372.  
  1373.  
  1374. # Predictive rotation
  1375. AddIcon help=Predictive size=small mastery=2 checkboxon=altpredictive {
  1376. Prediction()
  1377. }
  1378.  
  1379. AddIcon help=Talent_Cooldowns size=small mastery=2 checkboxon=altpredictive {
  1380. if TalentPoints(FORCE_OF_NATURE_TALENT)
  1381. {
  1382. if Charges(FORCE_OF_NATURE) ==3 or {Charges(FORCE_OF_NATURE) ==2 and SpellChargeCooldown(FORCE_OF_NATURE) <=1} Spell(FORCE_OF_NATURE)
  1383. if BuffPresent(TICKING_EBON_DETONATOR)
  1384. or {BuffPresent(SOUL_CHARM) and BuffRemains(SOUL_CHARM) <= TreantTimeThreshold()}
  1385. or {BuffPresent(ROR_MASTERY) and BuffRemains(ROR_MASTERY) <= TreantTimeThreshold()}
  1386. or {BuffPresent(BAD_JUJU) and BuffRemains(BAD_JUJU) <= TreantTimeThreshold()}
  1387. or {BuffPresent(VICIOUS_TALISMAN) and BuffRemains(VICIOUS_TALISMAN) <= TreantTimeThreshold()}
  1388. or {BuffPresent(ASSURANCE_OF_CONSEQUENCE) and BuffRemains(ASSURANCE_OF_CONSEQUENCE) <= TreantTimeThreshold()}
  1389. or {BuffPresent(HAROMMS_TALISMAN) and BuffRemains(HAROMMS_TALISMAN) <= TreantTimeThreshold()}
  1390. or {BuffPresent(SIGIL_OF_RAMPAGE) and BuffRemains(SIGIL_OF_RAMPAGE) <= TreantTimeThreshold()}
  1391. {
  1392. Spell(FORCE_OF_NATURE)
  1393. }
  1394. }
  1395. unless TalentPoints(FORCE_OF_NATURE_TALENT)
  1396. {
  1397. if TalentPoints(HEART_OF_THE_WILD_TALENT) Spell(HEART_OF_THE_WILD)
  1398. if TalentPoints(DREAM_OF_CENARIUS_TALENT)
  1399. {
  1400. if TalentPoints(CENARION_WARD_TALENT) Spell(CENARION_WARD)
  1401. if TalentPoints(RENEWAL_TALENT) Spell(RENEWAL)
  1402. }
  1403. if TalentPoints(NATURES_VIGIL_TALENT) Spell(NATURES_VIGIL)
  1404. }
  1405. }
  1406.  
  1407. # Main rotation
  1408. AddIcon help=main mastery=2 {
  1409. NotInCombat()
  1410. if Stance(3)
  1411. {
  1412. MainActions()
  1413. if FillerConditions() FillerActions()
  1414. SpareGcdCooldowns()
  1415. }
  1416. if Stance(1)
  1417. {
  1418. if BuffPresent(HEART_OF_THE_WILD)
  1419. BearMain()
  1420. unless BuffPresent(HEART_OF_THE_WILD) Spell(CAT_FORM)
  1421. }
  1422. if Stance(0)
  1423. {
  1424. if BuffPresent(HEART_OF_THE_WILD)
  1425. {
  1426. if CastTime(WRATH) <BuffRemains(HEART_OF_THE_WILD) Spell(WRATH)
  1427. Spell(CAT_FORM)
  1428. }
  1429. unless BuffPresent(HEART_OF_THE_WILD) Spell(CAT_FORM)
  1430. }
  1431. if Stance(4) or Stance(2) Spell(CAT_FORM)
  1432. }
  1433.  
  1434. # Predictive rotation
  1435. AddIcon help=Predictive mastery=2 checkboxon=predictive {
  1436. Prediction()
  1437. }
  1438.  
  1439. AddIcon help=aoe mastery=2 checkboxon=showaoe
  1440. {
  1441. NotInCombat()
  1442. if Stance(3)
  1443. {
  1444. AoeActions()
  1445. if FillerConditions() AoeFillerActions()
  1446. SpareGcdCooldowns()
  1447. }
  1448. if Stance(1)
  1449. {
  1450. if BuffPresent(HEART_OF_THE_WILD)
  1451. BearMainAOE()
  1452. unless BuffPresent(HEART_OF_THE_WILD) Spell(CAT_FORM)
  1453. }
  1454. if Stance(0)
  1455. {
  1456. if BuffRemains(HEART_OF_THE_WILD) > GCD()
  1457. Spell(HURRICANE)
  1458. Spell(CAT_FORM)
  1459. }
  1460. if Stance(4) or Stance(2) Spell(CAT_FORM)
  1461. }
  1462.  
  1463. AddIcon help=Savage_Roar size=small mastery=2 checkboxon=cooldownsR { # Savage Roar
  1464. if BuffExpires(SAVAGE_ROAR) Texture(ability_druid_skinteeth)
  1465. }
  1466. AddIcon help=Rip size=small mastery=2 checkboxon=cooldownsR { # Rip
  1467. if TargetDebuffExpires(RIP) Texture(ability_ghoulfrenzy)
  1468. }
  1469. AddIcon help=Rake size=small mastery=2 checkboxon=cooldownsR { # Rake
  1470. if TargetDebuffExpires(RAKE) Texture(ability_druid_disembowel)
  1471. }
  1472. AddIcon help=Thrash size=small mastery=2 checkboxon=cooldownsR { # Thrash
  1473. if TargetDebuffExpires(THRASH_CAT) Texture(spell_druid_thrash)
  1474. }
  1475.  
  1476. ################################
  1477. ## Guardian rotation functions (Mastery=3) ##
  1478. ################################
  1479.  
  1480. AddFunction BearMain {
  1481. if Threat() <100 and target.DebuffPresent(LACERATE) and target.DebuffRemains(LACERATE less 2) Spell(LACERATE)
  1482. if Threat() <100 and BuffPresent(INCARNATION_BEAR) and target.DebuffRemains(THRASH_BEAR less 2) Spell(THRASH_BEAR)
  1483.  
  1484. Spell(MANGLE_BEAR)
  1485.  
  1486.  
  1487. # Debuff maintenance.
  1488. if target.DebuffRemains(WEAKENED_BLOWS any=1 atMost 3) Spell(THRASH_BEAR)
  1489. if target.DebuffRemains(WEAKENED_ARMOR any=1 atMost 3) or target.DebuffStacks(WEAKENED_ARMOR any=1 less 3)
  1490. {
  1491. FaerieFire()
  1492. }
  1493.  
  1494. Spell(LACERATE)
  1495. if target.DebuffPresent(THRASH_BEAR 6) FaerieFire()
  1496. Spell(THRASH_BEAR)
  1497. }
  1498.  
  1499. AddFunction BearMainAOE {
  1500. Spell(MANGLE_BEAR)
  1501. Spell(THRASH_BEAR)
  1502. Spell(SWIPE_BEAR)
  1503. }
  1504.  
  1505. #######################
  1506. ## Guardian icons (Mastery=3) ##
  1507. #######################
  1508.  
  1509. AddIcon help=Rake size=small mastery=3 checkboxon=cooldownsRatio
  1510. {
  1511. # Offset the guardian icons if the user has bleed ratios enabled
  1512. }
  1513.  
  1514. AddIcon help=Rip size=small mastery=3 checkboxon=cooldownsRatio
  1515. {
  1516. # Offset the guardian icons if the user has bleed ratios enabled
  1517. }
  1518.  
  1519. AddIcon size=small mastery=3 checkboxon=cooldownsL {
  1520. Spell(BARKSKIN)
  1521. }
  1522.  
  1523. AddIcon size=small mastery=3 checkboxon=cooldownsL {
  1524. if TalentPoints(RENEWAL_TALENT) Spell(RENEWAL)
  1525. if TalentPoints(CENARION_WARD_TALENT) Spell(CENARION_WARD)
  1526. }
  1527.  
  1528. AddIcon mastery=3 size=small checkboxon=altpredictive {
  1529. if Rage(less 11) Spell(ENRAGE useable=1)
  1530. Spell(SAVAGE_DEFENSE usable=1)
  1531. Spell(FRENZIED_REGEN)
  1532. }
  1533.  
  1534. AddIcon mastery=3 size=small checkboxon=altpredictive {
  1535. if BuffPresent(TOOTH_AND_CLAW) and target.DebuffExpires(TOOTH_AND_CLAW_DEBUFF) Spell(TOOTH_AND_CLAW)
  1536. unless BuffPresent(TOOTH_AND_CLAW) and target.DebuffExpires(TOOTH_AND_CLAW_DEBUFF) Spell(MAUL)
  1537. }
  1538.  
  1539. # Main rotation
  1540. AddIcon help=main mastery=3 {
  1541. if InCombat(no) and BuffRemains(str_agi_int any=1 less 400) Spell(MARK_OF_THE_WILD)
  1542. unless Stance(1) Spell(BEAR_FORM)
  1543.  
  1544. BearMain()
  1545.  
  1546. }
  1547.  
  1548. AddIcon mastery=3 checkboxon=predictive {
  1549. if Rage(less 11) Spell(ENRAGE useable=1)
  1550. Spell(SAVAGE_DEFENSE usable=1)
  1551. Spell(FRENZIED_REGEN)
  1552. }
  1553.  
  1554. AddIcon help=aoe mastery=3 checkboxon=showaoe {
  1555. if InCombat(no) and BuffRemains(str_agi_int any=1 less 400) Spell(MARK_OF_THE_WILD)
  1556. unless Stance(1) Spell(BEAR_FORM)
  1557.  
  1558. BearMainAOE()
  1559. }
  1560. AddIcon size=small mastery=3 checkboxon=cooldownsR {
  1561. Spell(SURVIVAL_INSTINCTS)
  1562. }
  1563.  
  1564. AddIcon size=small mastery=3 checkboxon=cooldownsR {
  1565. Spell(MIGHT_OF_URSOC)
  1566. }
  1567.  
  1568. AddIcon size=small mastery=3 checkboxon=cooldownsR {
  1569. if TalentPoints(INCARNATION_TALENT) Spell(INCARNATION_BEAR)
  1570. if TalentPoints(FORCE_OF_NATURE_TALENT) Spell(FORCE_OF_NATURE)
  1571. }
  1572.  
  1573. AddIcon size=small mastery=3 checkboxon=cooldownsR {
  1574. Spell(BERSERK_BEAR)
  1575. }
Advertisement
Add Comment
Please, Sign In to add comment