Skip to content

Commit

Permalink
Many fixes, handle it.
Browse files Browse the repository at this point in the history
Classes
+ Instead of requiring custom funcions for abilities that require a
talent (or replace a talent), added talent= and notalent= fields to
abilities.
+ Added Faulty Countermeasure to usable items.
+ Added some shared legendaries and related auras.

Death Knight:
+ pre-populate gargoyle as a pet.
+ sudden_doom stacks to 2 with artifact trait.
+ clawing_shadows fixed.

Demon Hunter
+ health regen effects will no longer cause the addon to stop updating
health information.
+ APL tweaks to reduce Fel Rush overusage, added class setting for Keep
Fel Rush Recharging.

Druid
+ Health gains should affect health.actual (to avoid breaking
health.current) or use gain().

Hunter
+ Fix for T19 detection (wrong itemID used for 1 of the pieces).
+ Health gains should affect health.actual or use gain().

Monk
+ Added healing_elixir, touch_of_karma per request (ToK is in the
updated APL).
+ Imported latest WW APL, hope nothing breaks.

Core/Engine
+ Start looking up to 60 seconds out, to be more friendly to
Brewmaster's defensive icon.

Formatting/UI/Debug
+ Show 'nil' value for variables/conditions that are nil, when looking
at tooltips, etc.

Options
+ Don't let people disable the Global Cooldown using Class Settings /
Exclusions.
+ Imported APLs will now be spaced out for readability's sake.
+ Added Issue Reporting tab to simplify complaining about my shoddy
coding.
+ Special modifiers that tend to be string values (i.e., action list
names) will return string values consistently.

State
+ Possible improvement in time-to-die calculations, though I think I
still want to rewrite this.
+ Non-boss enemy time-to-die now starts at 15 seconds instead of 300
seconds.

Utils
+ Imported APL names will get cleaned up a little more
consistently/accurately using "frontier match" logic.
  • Loading branch information
Hekili committed May 24, 2017
1 parent 2b09cac commit 4db9a70
Show file tree
Hide file tree
Showing 15 changed files with 326 additions and 150 deletions.
52 changes: 21 additions & 31 deletions Classes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,6 @@ addAura( 'archmages_greater_incandescence_str', 177175, 'duration', 10 )
addAura( 'maalus', 187620, 'duration', 15 )
addAura( 'thorasus', 187619, 'duration', 15 )

addAura( 'xavarics_magnum_opus', 207428, 'duration', 30 )

-- Raid Buffs
addAura( 'str_agi_int', -1, 'duration', 3600 )
addAura( 'stamina', -2, 'duration', 3600 )
Expand Down Expand Up @@ -825,6 +823,15 @@ addAura( 'vigilance_perch', 241332, 'duration', 60, 'max_stack', 5 )
addGearSet( 'the_sentinels_eternal_refuge', 146669 )
addAura( 'the_sentinels_eternal_refuge', 241331, 'duration', 60, 'max_stack', 5 )

addGearSet( 'prydaz_xavarics_magnum_opus', 132444 )
addAura( 'xavarics_magnum_opus', 207428, 'duration', 30 )

addGearSet( 'aggramars_stride', 132443 )
addAura( 'aggramars_stride', 207438, 'duration', 3600 )

addGearSet( 'sephuzs_secret', 132452 )
addAura( 'sephuzs_secret', 208051, 'duration', 10 )


class.potions = {
old_war = {
Expand Down Expand Up @@ -921,7 +928,7 @@ addUsableItem( "draught_of_souls", 140808 )
addAura( "fel_crazed_rage", 225141, "duration", 3 )

addAbility( "draught_of_souls", {
id = -7,
id = -100,
item = 140808,
spend = 0,
cast = 0,
Expand All @@ -938,7 +945,7 @@ end )
addUsableItem( "kiljaedens_burning_wish", 144259 )

addAbility( "kiljaedens_burning_wish", {
id = -8,
id = -101,
item = 144259,
spend = 0,
cast = 0,
Expand All @@ -947,40 +954,23 @@ addAbility( "kiljaedens_burning_wish", {
} )


--[[ addAbility( 'use_item', {
id = -6,
name = 'Use Item (Stub)',
addUsableItem( "faulty_countermeasure", 137539 )

addAbility( "faulty_countermeasure", {
id = -102,
item = 137539,
spend = 0,
cast = 0,
gcdType = 'spell',
cooldown = 0,
channeled = false,
passive = false,
known = function () return args.name and equipped[ args.name ] end,
usable = function ()
local iName = args.ModName or args.name
return iName ~= nil and class.usable_items[ iName ] and equipped[ iName ]
end,
cooldown = 120,
gcdType = 'off',
} )

modifyAbility( 'use_item', 'cooldown', function( x ) return class.usable_items[ args.name or args.ModName or 'no_item' ].cooldown or x end )
modifyAbility( 'use_item', 'cast', function( x ) return class.usable_items[ args.name or args.ModName or 'no_item' ].cast or x end )
modifyAbility( 'use_item', 'channeled', function( x ) return class.usable_items[ args.name or args.ModName or 'no_item' ].channeled or x end )
modifyAbility( 'use_item', 'gcdType', function( x ) return class.usable_items[ args.name or args.ModName or 'no_item' ].gcdType or x end )
modifyAbility( 'use_item', 'passive', function( x ) return class.usable_items[ args.name or args.ModName or 'no_item' ].passive or x end )
addHandler( 'use_item', function ()
local iName = args.ModName or args.name
local item = class.usable_items[ iName ]
addAura( "sheathed_in_frost", 214962, "duration", 30 )

if item and item.handler then
item.handler()
end
addHandler( "faulty_countermeasure", function ()
applyBuff( "sheathed_in_frost", 30 )
end )

state.cooldown.use_item.items = {}
setmetatable( state.cooldown.use_item, ns.metatables.mt_use_item_cooldown )
setmetatable( state.cooldown.use_item.items, ns.metatables.mt_use_item_db ) ]]


addAbility( 'variable', {
Expand Down
28 changes: 20 additions & 8 deletions Classes/DeathKnight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,15 @@ if (select(2, UnitClass('player')) == 'DEATHKNIGHT') then

addPet( 'ghoul' )
addPet( 'abomination' )

addPet( 'army_of_the_dead' )

addPet( 'gargoyle' )
addPet( 'valkyr_battlemaiden' )

registerCustomVariable( "last_army", 0 )
registerCustomVariable( "last_valkyr", 0 )
registerCustomVariable( "last_gargoyle", 0 )
registerCustomVariable( "last_transform", 0 )

RegisterUnitEvent( "UNIT_SPELLCAST_SUCCEEDED", function( _, unit, spell, _, _, spellID )
Expand All @@ -191,6 +195,9 @@ if (select(2, UnitClass('player')) == 'DEATHKNIGHT') then
elseif spellID == class.abilities.dark_transformation.id then
state.last_transform = GetTime()

elseif spellID == class.abilities.summon_gargoyle.id then
state.last_gargoyle = GetTime()

end

end )
Expand Down Expand Up @@ -321,8 +328,12 @@ if (select(2, UnitClass('player')) == 'DEATHKNIGHT') then


setPotion( "old_war" )
setRole( "attack" )
setRole( state.spec.blood and 'tank' or 'attack' )

addHook( 'specializationChanged', function ()
setPotion( 'old_war' )
setRole( state.spec.blood and 'tank' or 'attack' )
end )


-- Talents: Unholy
Expand Down Expand Up @@ -485,7 +496,7 @@ if (select(2, UnitClass('player')) == 'DEATHKNIGHT') then
addAura( "aggramars_stride", 207438, "duration", 3600 )
addAura( "antimagic_shell", 48707, "duration", 5 )
modifyAura( "antimagic_shell", "duration", function( x ) return x + ( talent.spell_eater.enabled and 5 or 0 ) end )
addAura( "army_of_the_dead", 42650, "duration", 40 )
addAura( "army_of_the_dead", 42650, "duration", 4 )
addAura( "blinding_sleet", 207167, "duration", 4 )
addAura( "breath_of_sindragosa", 152279, "duration", 3600, "friendly", true )
addAura( "dark_command", 56222, "duration", 3 )
Expand Down Expand Up @@ -514,7 +525,8 @@ if (select(2, UnitClass('player')) == 'DEATHKNIGHT') then
addAura( "runic_corruption", 51462 )
addAura( "runic_empowerment", 81229 )
addAura( "soul_reaper", 130736, "duration", 5 )
addAura( "sudden_doom", 81340, "duration", 10 )
addAura( "sudden_doom", 81340, "duration", 10, "max_stack", 1 )
modifyAura( "sudden_doom", "max_stack", function( x ) return x + ( artifact.sudden_doom.enabled and 1 or 0 ) end )
addAura( "temptation", 234143, "duration", 30 )
addAura( "unholy_strength", 53365, "duration", 15 )
addAura( "virulent_plague", 191587, "duration", 21 )
Expand All @@ -532,9 +544,9 @@ if (select(2, UnitClass('player')) == 'DEATHKNIGHT') then
end )



addGearSet( "blades_of_the_fallen_prince", 128292 )
setArtifact( "blades_of_the_fallen_prince" )

addGearSet( "apocalypse", 128403 )
setArtifact( "apocalypse" )

Expand Down Expand Up @@ -641,6 +653,7 @@ if (select(2, UnitClass('player')) == 'DEATHKNIGHT') then
} )

addHandler( "army_of_the_dead", function ()
applyBuff( "army_of_the_dead", 4 )
-- not sure if we need to summon ghouls as pets, watch these mechanics.
end )

Expand Down Expand Up @@ -733,7 +746,7 @@ if (select(2, UnitClass('player')) == 'DEATHKNIGHT') then
gcdType = "melee",
cooldown = 0,
max_range = 30,
usable = function () return talent.clawing_shadows.enabled end,
talent = "clawing_shadows"
} )

addHandler( "clawing_shadows", function ()
Expand Down Expand Up @@ -778,7 +791,6 @@ if (select(2, UnitClass('player')) == 'DEATHKNIGHT') then
cooldown = 120,
-- min_range = 0,
max_range = 30,
usable = function () return talent.dark_arbiter.enabled end,
toggle = 'cooldowns'
} )

Expand Down Expand Up @@ -1347,7 +1359,7 @@ if (select(2, UnitClass('player')) == 'DEATHKNIGHT') then
cooldown = 0,
-- min_range = 0,
-- max_range = 0,
known = function () return not talent.clawing_shadows.enabled end,
notalent = "clawing_shadows"
} )

addHandler( "scourge_strike", function ()
Expand Down Expand Up @@ -1408,7 +1420,7 @@ if (select(2, UnitClass('player')) == 'DEATHKNIGHT') then
cooldown = 180,
-- min_range = 0,
max_range = 30,
usable = function () return not talent.dark_arbiter.enabled end,
notalent = "dark_arbiter",
toggle = 'cooldowns'
} )

Expand Down
Loading

0 comments on commit 4db9a70

Please sign in to comment.