Skip to content

Commit 03393e3

Browse files
committed
Windwalker Monk
1 parent c413e4f commit 03393e3

File tree

2 files changed

+901
-81
lines changed

2 files changed

+901
-81
lines changed

Rotations/Monk/Initial/InitialMonk.lua

Lines changed: 107 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,16 @@ local function createOptions()
7575
-- Vivify
7676
br.ui:createSpinner(section, "Vivify", 60, 0, 100, 5, "|cffFFFFFFHealth Percent to Cast At")
7777
-- Target Heal Key
78-
br.ui:createDropdownWithout(section, "Target Heal Key", br.dropOptions.Toggle, 2)
78+
br.ui:createDropdownWithout(section, "Target Heal Key", br.ui.dropOptions.Toggle, 2)
7979
br.ui:checkSectionState(section)
8080
-------------------------
8181
--- INTERRUPT OPTIONS ---
8282
-------------------------
8383
section = br.ui:createSection(br.ui.window.profile, "Interrupts")
84+
-- Pandaren Racial
85+
if select(2, UnitRace("player")) == "Pandaren" then
86+
br.ui:createCheckbox(section, "Quaking Palm", "|cffFFBB00Pandaren Racial")
87+
end
8488
-- Leg Sweep
8589
br.ui:createCheckbox(section, "Leg Sweep")
8690
-- Interrupt Percentage
@@ -91,15 +95,15 @@ local function createOptions()
9195
----------------------
9296
section = br.ui:createSection(br.ui.window.profile, "Toggle Keys")
9397
-- Single/Multi Toggle
94-
br.ui:createDropdownWithout(section, "Rotation Mode", br.dropOptions.Toggle, 4)
98+
br.ui:createDropdownWithout(section, "Rotation Mode", br.ui.dropOptions.Toggle, 4)
9599
-- Cooldown Key Toggle
96-
br.ui:createDropdownWithout(section, "Cooldown Mode", br.dropOptions.Toggle, 6)
100+
br.ui:createDropdownWithout(section, "Cooldown Mode", br.ui.dropOptions.Toggle, 6)
97101
-- Defensive Key Toggle
98-
br.ui:createDropdownWithout(section, "Defensive Mode", br.dropOptions.Toggle, 6)
102+
br.ui:createDropdownWithout(section, "Defensive Mode", br.ui.dropOptions.Toggle, 6)
99103
-- Interrupts Key Toggle
100-
br.ui:createDropdownWithout(section, "Interrupt Mode", br.dropOptions.Toggle, 6)
104+
br.ui:createDropdownWithout(section, "Interrupt Mode", br.ui.dropOptions.Toggle, 6)
101105
-- Pause Toggle
102-
br.ui:createDropdown(section, "Pause Mode", br.dropOptions.Toggle, 6)
106+
br.ui:createDropdown(section, "Pause Mode", br.ui.dropOptions.Toggle, 6)
103107
br.ui:checkSectionState(section)
104108
end
105109
optionTable = { {
@@ -113,17 +117,21 @@ end
113117
--- Locals ---
114118
--------------
115119
-- BR API Locals
120+
local buff
116121
local cast
117122
local cd
123+
local chi
118124
local enemies
125+
local energy
119126
local module
120127
local ui
121128
local unit
122129
local units
130+
local spell
123131
-- Profile Specific Locals
124132
local actionList = {}
125133
local var = {}
126-
var.getFacingDistance = br["getFacingDistance"]
134+
var.getFacingDistance = br.functions.range.getFacingDistance
127135
var.haltProfile = false
128136
var.profileStop = false
129137

@@ -133,15 +141,15 @@ var.profileStop = false
133141
-- Action List - Extra
134142
actionList.Extra = function()
135143
-- Crackling Jade Lightning
136-
if ui.checked("Crackling Jade Lightning") and not unit.mounted() and not cast.current.cracklingJadeLightning()
137-
and not unit.moving() and cast.able.cracklingJadeLightning("target") and unit.valid("target")
138-
and unit.distance("target") > ui.value("Cancel CJL Range")
139-
then
140-
if cast.cracklingJadeLightning("target") then
141-
ui.debug("Casting Crackling Jade Lightning")
142-
return true
143-
end
144-
end
144+
-- if ui.checked("Crackling Jade Lightning") and not unit.mounted() and not cast.current.cracklingJadeLightning()
145+
-- and not unit.moving() and cast.able.cracklingJadeLightning("target") and unit.valid("target")
146+
-- and unit.distance("target") > ui.value("Cancel CJL Range")
147+
-- then
148+
-- if cast.cracklingJadeLightning("target") then
149+
-- ui.debug("Casting Crackling Jade Lightning")
150+
-- return true
151+
-- end
152+
-- end
145153
-- Roll
146154
if ui.checked("Roll") and cast.able.roll() and unit.moving()
147155
and unit.distance("target") > 10 and unit.valid("target")
@@ -159,52 +167,52 @@ actionList.Defensive = function()
159167
if ui.useDefensive() then
160168
-- Basic Healing Module
161169
module.BasicHealing()
162-
-- Expel Harm
163-
if ui.checked("Expel Harm") and cast.able.expelHarm() and unit.hp() <= ui.value("Expel Harm") then
164-
if cast.expelHarm() then
165-
ui.debug("Casting Expel Harm")
166-
return true
167-
end
168-
end
169-
-- Leg Sweep
170-
if ui.checked("Leg Sweep - HP") and cast.able.legSweep() and unit.hp() <= ui.value("Leg Sweep - HP")
171-
and unit.inCombat() and #enemies.yards5 > 0
172-
then
173-
if cast.legSweep() then
174-
ui.debug("Casting Leg Sweep [HP]")
175-
return true
176-
end
177-
end
178-
if ui.checked("Leg Sweep - AoE") and cast.able.legSweep()
179-
and #enemies.yards5 >= ui.value("Leg Sweep - AoE")
180-
then
181-
if cast.legSweep() then
182-
ui.debug("Casting Leg Sweep [AOE]")
183-
return true
184-
end
185-
end
186-
-- Vivify
187-
local vivifyUnit = unit.friend("target") and "target" or "player"
188-
if ui.checked("Vivify") and cast.able.vivify(vivifyUnit) then
189-
if unit.hp(vivifyUnit) <= ui.value("Vivify") then
190-
if cast.vivify(vivifyUnit) then
191-
ui.debug("Casting Vivify on " .. unit.name(vivifyUnit))
192-
return true
193-
end
194-
end
195-
end
170+
-- -- Expel Harm
171+
-- if ui.checked("Expel Harm") and cast.able.expelHarm() and unit.hp() <= ui.value("Expel Harm") then
172+
-- if cast.expelHarm() then
173+
-- ui.debug("Casting Expel Harm")
174+
-- return true
175+
-- end
176+
-- end
177+
-- -- Leg Sweep
178+
-- if ui.checked("Leg Sweep - HP") and cast.able.legSweep() and unit.hp() <= ui.value("Leg Sweep - HP")
179+
-- and unit.inCombat() and #enemies.yards5 > 0
180+
-- then
181+
-- if cast.legSweep() then
182+
-- ui.debug("Casting Leg Sweep [HP]")
183+
-- return true
184+
-- end
185+
-- end
186+
-- if ui.checked("Leg Sweep - AoE") and cast.able.legSweep()
187+
-- and #enemies.yards5 >= ui.value("Leg Sweep - AoE")
188+
-- then
189+
-- if cast.legSweep() then
190+
-- ui.debug("Casting Leg Sweep [AOE]")
191+
-- return true
192+
-- end
193+
-- end
194+
-- -- Vivify
195+
-- local vivifyUnit = unit.friend("target") and "target" or "player"
196+
-- if ui.checked("Vivify") and cast.able.vivify(vivifyUnit) then
197+
-- if unit.hp(vivifyUnit) <= ui.value("Vivify") then
198+
-- if cast.vivify(vivifyUnit) then
199+
-- ui.debug("Casting Vivify on " .. unit.name(vivifyUnit))
200+
-- return true
201+
-- end
202+
-- end
203+
-- end
196204
end
197205
end -- End Action List - Defensive
198206

199207
-- Action List - Cooldowns
200208
actionList.Cooldowns = function()
201209
-- Touch of Death
202-
if ui.alwaysCdNever("Touch of Death") and cast.able.touchOfDeath(units.dyn5) and unit.health(units.dyn5) < unit.healthMax("player") then
203-
if cast.touchOfDeath(units.dyn5) then
204-
ui.debug("Casting Touch of Death - Omae wa mou shindeiru")
205-
return true
206-
end
207-
end
210+
-- if ui.alwaysCdNever("Touch of Death") and cast.able.touchOfDeath(units.dyn5) and unit.health(units.dyn5) < unit.healthMax("player") then
211+
-- if cast.touchOfDeath(units.dyn5) then
212+
-- ui.debug("Casting Touch of Death - Omae wa mou shindeiru")
213+
-- return true
214+
-- end
215+
-- end
208216
-- Trinket - Non-Specific
209217
if unit.exists(units.dyn5) and unit.distance(units.dyn5) < 5 then
210218
module.BasicTrinkets()
@@ -216,14 +224,21 @@ actionList.Interrupt = function()
216224
if ui.useInterrupt() then
217225
for i = 1, #enemies.yards5 do
218226
local thisUnit = enemies.yards5[i]
219-
if br.canInterrupt(thisUnit, ui.value("Interrupt At")) then
220-
-- Leg Sweep
221-
if ui.checked("Leg Sweep") and cast.able.legSweep(thisUnit) and unit.distance(thisUnit) < 5 then
222-
if cast.legSweep(thisUnit) then
223-
ui.debug("Casting Leg Sweep [Interrupt]")
227+
if br.functions.spell:canInterrupt(thisUnit, ui.value("Interrupt At")) then
228+
-- Quaking Palm (Pandaren Racial)
229+
if ui.checked("Quaking Palm") and unit.race("Pandaren") and cast.able.racial(thisUnit) and unit.distance(thisUnit) < 5 then
230+
if cast.racial(thisUnit) then
231+
ui.debug("Casting Quaking Palm [Interrupt]")
224232
return true
225233
end
226234
end
235+
-- Leg Sweep
236+
-- if ui.checked("Leg Sweep") and cast.able.legSweep(thisUnit) and unit.distance(thisUnit) < 5 then
237+
-- if cast.legSweep(thisUnit) then
238+
-- ui.debug("Casting Leg Sweep [Interrupt]")
239+
-- return true
240+
-- end
241+
-- end
227242
end
228243
end
229244
end -- End Interrupt Check
@@ -234,8 +249,8 @@ actionList.PreCombat = function()
234249
if not unit.inCombat() and not unit.mounted() then
235250
if unit.valid("target") then
236251
-- Auto Attack
237-
if cast.able.autoAttack() and unit.exists(units.dyn5) and unit.distance(units.dyn5) < 5 then
238-
if cast.autoAttack() then
252+
if cast.able.autoAttack("target") and unit.exists("target") and unit.distance("target") < 5 then
253+
if cast.autoAttack("target") then
239254
ui.debug("Casting Auto Attack [Precombat]")
240255
return true
241256
end
@@ -258,27 +273,34 @@ actionList.Combat = function()
258273
end
259274
-- Call Action List - Cooldowns
260275
if actionList.Cooldowns() then return true end
261-
-- Spinning Crane Kick
262-
if cast.able.spinningCraneKick() and #enemies.yards8 > 3 then
263-
if cast.spinningCraneKick() then
264-
ui.debug("Casting Spinning Crane Kick")
265-
return true
266-
end
267-
end
276+
-- -- Spinning Crane Kick
277+
-- if cast.able.spinningCraneKick() and #enemies.yards8 > 3 then
278+
-- if cast.spinningCraneKick() then
279+
-- ui.debug("Casting Spinning Crane Kick")
280+
-- return true
281+
-- end
282+
-- end
268283
-- Blackout Kick
269-
if cast.able.blackoutKick() then
284+
if cast.able.blackoutKick() and buff.tigerPower.exists() then
270285
if cast.blackoutKick() then
271286
ui.debug("Casting Blackout Kick")
272287
return true
273288
end
274289
end
275290
-- Tiger Palm
276-
if cast.able.tigerPalm() and #enemies.yards8 < 4 then
291+
if cast.able.tigerPalm() and (buff.tigerPower.refresh() or (chi() >= chi.max() - 1) or energy() < 40) then
277292
if cast.tigerPalm() then
278293
ui.debug("Casting Tiger Palm")
279294
return true
280295
end
281296
end
297+
-- Jab
298+
if cast.able.jab() then
299+
if cast.jab() then
300+
ui.debug("Casting Jab")
301+
return true
302+
end
303+
end
282304
end -- End In Combat Rotation
283305
end
284306
end -- End Action List - Combat
@@ -291,15 +313,19 @@ local function runRotation()
291313
--- Define Locals ---
292314
---------------------
293315
-- BR API Locals
316+
buff = br.player.buff
294317
cast = br.player.cast
295318
cd = br.player.cd
319+
chi = br.player.power.chi
296320
enemies = br.player.enemies
321+
energy = br.player.power.energy
297322
module = br.player.module
298323
ui = br.player.ui
299324
unit = br.player.unit
300325
units = br.player.units
326+
spell = br.player.spell
301327
-- General Locals
302-
var.haltProfile = (unit.inCombat() and var.profileStop) or unit.mounted() or br.pause() or ui.mode.rotation == 2
328+
var.haltProfile = (unit.inCombat() and var.profileStop) or unit.mounted() or br.functions.misc:pause() or ui.mode.rotation == 2
303329
-- Units
304330
units.get(5)
305331
units.get(40)
@@ -308,12 +334,12 @@ local function runRotation()
308334
enemies.get(8)
309335

310336
-- Cancel Crackling Jade Lightning
311-
if cast.current.cracklingJadeLightning() and unit.distance("target") < ui.value("Cancel CJL Range") then
312-
if cast.cancel.cracklingJadeLightning() then
313-
ui.debug("Canceling Crackling Jade Lightning [Within " .. ui.value("Cancel CJL Range") .. "yrds]")
314-
return true
315-
end
316-
end
337+
-- if cast.current.cracklingJadeLightning() and unit.distance("target") < ui.value("Cancel CJL Range") then
338+
-- if cast.cancel.cracklingJadeLightning() then
339+
-- ui.debug("Canceling Crackling Jade Lightning [Within " .. ui.value("Cancel CJL Range") .. "yrds]")
340+
-- return true
341+
-- end
342+
-- end
317343

318344
---------------------
319345
--- Begin Profile ---
@@ -352,8 +378,8 @@ local function runRotation()
352378
end -- Pause
353379
end -- End runRotation
354380
local id = 1450
355-
if br.rotations[id] == nil then br.rotations[id] = {} end
356-
br._G.tinsert(br.rotations[id], {
381+
if br.loader.rotations[id] == nil then br.loader.rotations[id] = {} end
382+
br._G.tinsert(br.loader.rotations[id], {
357383
name = rotationName,
358384
toggles = createToggles,
359385
options = createOptions,

0 commit comments

Comments
 (0)