Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Commit 8e5f81d

Browse files
committed
More shadowlands brewmaster.
1 parent 73853b3 commit 8e5f81d

File tree

7 files changed

+129
-10
lines changed

7 files changed

+129
-10
lines changed

WoW9/ThousandJabs/Class_Monk/Profile-900.lua

+106-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,33 @@ local mmax = math.max
1717
local mmin = math.min
1818
local mfloor = math.floor
1919

20+
------------------------------------------------------------------------------------------------------------------------
21+
-- Common profile definition
22+
------------------------------------------------------------------------------------------------------------------------
23+
24+
-- Runeforges
25+
local runeforging_overrides = {
26+
charred_passions = {
27+
runeforge_equipped = false, -- TODO
28+
},
29+
}
30+
31+
-- Covenants
32+
local covenant_overrides = {
33+
weapons_of_order = { -- Kyrian
34+
SpellIDs = { 310454 }, -- TODO, add aura IDs
35+
},
36+
fallen_order = { -- Venthyr
37+
SpellIDs = { 326860 }, -- TODO, add aura IDs
38+
},
39+
bonedust_brew = { -- Necrolord
40+
SpellIDs = { 325216 }, -- TODO, add aura IDs
41+
},
42+
faeline_stomp = { -- Night Fae
43+
SpellIDs = { 327104 }, -- TODO, add aura IDs
44+
},
45+
}
46+
2047
------------------------------------------------------------------------------------------------------------------------
2148
-- Brewmaster profile definition
2249
------------------------------------------------------------------------------------------------------------------------
@@ -87,21 +114,99 @@ local brewmaster_base_overrides = {
87114
end
88115
end,
89116
},
117+
invoke_niuzao_the_black_ox = {
118+
CanCast = function(spell, env)
119+
return env.target.exists
120+
end,
121+
},
122+
touch_of_death = {
123+
CanCast = function(spell, env)
124+
return env.target.exists
125+
end,
126+
},
127+
purifying_brew = {
128+
PerformCast = function(spell,env)
129+
-- Swap stagger urgency to be down one level, to approximate purification (heavy->moderate, moderate->light)
130+
if env.stagger_heavy.aura_up then
131+
env.stagger_moderate.expirationTime = env.stagger_heavy.expirationTime
132+
env.stagger_heavy.expirationTime = 0
133+
elseif env.stagger_moderate.aura_up then
134+
env.stagger_light.expirationTime = env.stagger_moderate.expirationTime
135+
env.stagger_moderate.expirationTime = 0
136+
end
137+
end,
138+
},
139+
elusive_brawler = {
140+
AuraID = 195630,
141+
AuraUnit = 'player',
142+
AuraMine = true,
143+
},
90144
}
91145

92146
local brewmaster_talent_overrides = {
93147
}
94148

149+
local brewmaster_stagger_overrides = {
150+
stagger = {
151+
any = function(spell, env) return spell.light or spell.moderate or spell.heavy or false end,
152+
light = function(spell, env) return (env.stagger_light.aura_remains > 0) and true or false end,
153+
moderate = function(spell, env) return (env.stagger_moderate.aura_remains > 0) and true or false end,
154+
heavy = function(spell, env) return (env.stagger_heavy.aura_remains > 0) and true or false end,
155+
total_damage_staggered = function(spell, env)
156+
return UnitStagger('player') or 0
157+
end,
158+
ticks_remain = function(spell, env)
159+
return mfloor(spell.aura_remains * 2) -- every 0.5 secs, so double the
160+
end,
161+
damage_per_tick = function(spell, env)
162+
local ticks = spell.ticks_remain
163+
if ticks <= 0 then return 0 end
164+
return spell.total_damage_staggered / ticks
165+
end,
166+
aura_remains = function(spell, env)
167+
return spell.heavy and env.stagger_heavy.aura_remains
168+
or spell.moderate and env.stagger_moderate.aura_remains
169+
or spell.light and env.stagger_light.aura_remains
170+
or 0
171+
end,
172+
},
173+
stagger_light = {
174+
AuraID = 124275,
175+
AuraUnit = 'player',
176+
AuraMine = true,
177+
},
178+
stagger_moderate = {
179+
AuraID = 124274,
180+
AuraUnit = 'player',
181+
AuraMine = true,
182+
},
183+
stagger_heavy = {
184+
AuraID = 124273,
185+
AuraUnit = 'player',
186+
AuraMine = true,
187+
},
188+
}
189+
190+
-- Stagger tick damage accumulator
191+
for i = 1,20 do
192+
brewmaster_stagger_overrides.stagger['last_tick_damage_'..i] = function(spell, env)
193+
return spell.damage_per_tick * i
194+
end
195+
end
196+
95197
TJ:RegisterPlayerClass({
96198
name = 'Brewmaster',
97199
class_id = 10,
98200
spec_id = 1,
99201
default_action_profile = 'simc::monk::brewmaster',
100202
resources = { 'energy', 'chi' },
101203
actions = {
204+
runeforging_overrides,
205+
covenant_overrides,
102206
brewmaster_abilities_exported,
103207
brewmaster_base_overrides,
104-
brewmaster_talent_overrides
208+
brewmaster_talent_overrides,
209+
brewmaster_stagger_overrides
105210
},
106211
blacklisted = {
107212
},

WoW9/ThousandJabs/Module-Core.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ function Core:ShowLoggingFrame()
403403
self.log_frame:Show()
404404
self.log_frame.text:Show()
405405
local f = LSM:Fetch("font", "iosevka-tzarc-regular") or LSM:Fetch("font", "Anonymous Pro Bold (U)")
406-
if f then self.log_frame.text:SetFont(f, 8, "OUTLINE") end
406+
if f then self.log_frame.text:SetFont(f, 9, "OUTLINE") end
407407
end
408408

409409
function Core:HideLoggingFrame()

WoW9/ThousandJabs/Profile-Common.lua

+7-6
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ Core.Environment.common = {
125125
},
126126
target = {
127127
exists = function(self,state) return UnitExists('target'), true end,
128+
hostile = function(self,state) return (UnitReaction('target','player') or 4) <= 4 end,
128129
time_to_die = function(self,state) return UnitCache:UnitTimeToDie('target') or 99999 end,
129130
is_casting = false,
130131
is_interruptible = false,
@@ -235,16 +236,16 @@ Core.Environment.common = {
235236
return (env.movement.distance > 5) and true or false
236237
end,
237238
},
238-
concordance_of_the_legionfall = {
239-
AuraID = { 242583, 242584, 242586, 243096 },
240-
AuraUnit = 'player',
241-
AuraMine = true,
242-
},
243-
stoneform = {
239+
240+
-- Racials
241+
stoneform = { -- Dwarf
244242
AuraID = { 20594 },
245243
AuraUnit = 'player',
246244
AuraMine = true,
247245
},
246+
bag_of_tricks = { -- Vulpera
247+
SpellIDs = { 312411 },
248+
},
248249
}
249250
Core.Environment.common.exhaustion = Core.Environment.common.sated
250251

WoW9/ThousandJabs/Profile-State.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ local function StateResetPrototype(self, targetCount, seenTargets)
383383
end
384384

385385
-- Set the initial parameters
386-
env.ptr = Core:MatchesBuild('8.0.0', '8.0.9')
386+
env.ptr = Core:MatchesBuild('9.1.0', '9.9.9')
387387
env.sampleTime = GetTime()
388388
env.active_enemies = self.numTargets
389389
env.spell_targets = self.numTargets

WoW9/ThousandJabs/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Adding new profiles
2+
3+
Copy across one of the profile files
4+
Fixup the class IDs so something gets loaded for the class/spec in question
5+
Make sure the APL name matches the one in Generated-Actions.lua
6+
Run WoW, login as character of that class/spec
7+
Run `/tj _esd` to export the initial actions/talents listing
8+
Paste into the profile
9+
Reload UI
10+
Run `/tj _dcp` to export full state information -- WoW will lock up for a few seconds while it generates the entire text output
11+
Copypaste the output to a text file
12+
Check the top for the error'ing items that need implementation, search for `errors = {`

WoW9/ThousandJabs/TODO.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Convert the chained metatable objects to be closures with local variables, as per: http://lua-users.org/wiki/ObjectOrientationClosureApproach

cleanup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ tjfind -type f | parallel "chmod -x '{1}'"
4343
tjfind -iname '*.sh' -or -iname '*.pl' | parallel "chmod +x '{1}'"
4444

4545
# Make sure everything has Unix line endings
46-
tjfind -iname '*.toc' -or -iname '*.lua' -or -iname '*.sh' -or -iname '*.pl' -or -iname '*.simc' -or -iname '*.xml' -or -iname '*.cpp' -or -iname '*.h' -or -iname '*.hpp' -or -iname '*.inl' | parallel "dos2unix '{1}' >/dev/null 2>&1"
46+
tjfind -iname '*.toc' -or -iname '*.lua' -or -iname '*.sh' -or -iname '*.pl' -or -iname '*.simc' -or -iname '*.xml' -or -iname '*.cpp' -or -iname '*.h' -or -iname '*.hpp' -or -iname '*.inl' -or -iname '*.md' | parallel "dos2unix '{1}' >/dev/null 2>&1"
4747

4848
# Remove trailing whitespace
4949
tjfind -iname '*.toc' -or -iname '*.lua' -or -iname '*.sh' -or -iname '*.py' -or -iname '*.simc' -or -iname '*.cpp' -or -iname '*.h' -or -iname '*.hpp' -or -iname '*.inl' | parallel "sed -i 's/[ \t]*\$//' '{1}'"

0 commit comments

Comments
 (0)