Skip to content

Commit

Permalink
[Shaman] Hotfix Chain Lightning Overload Maelstrom generation to the …
Browse files Browse the repository at this point in the history
…appropriate value
  • Loading branch information
Bloodmallet committed Jan 7, 2019
1 parent 1d29b5e commit 86a72b2
Showing 1 changed file with 90 additions and 61 deletions.
151 changes: 90 additions & 61 deletions engine/class_modules/sc_shaman.cpp
Expand Up @@ -7932,16 +7932,16 @@ void shaman_t::init_action_list_enhancement()
return;
}

action_priority_list_t* precombat = get_action_priority_list( "precombat" );
action_priority_list_t* def = get_action_priority_list( "default" );
action_priority_list_t* cds = get_action_priority_list( "cds" );
action_priority_list_t* priority = get_action_priority_list( "priority" );
action_priority_list_t* maintenance = get_action_priority_list( "maintenance" );
action_priority_list_t* freezerburn_core = get_action_priority_list( "freezerburn_core" );
action_priority_list_t* default_core = get_action_priority_list( "default_core" );
action_priority_list_t* filler = get_action_priority_list( "filler" );
action_priority_list_t* opener = get_action_priority_list( "opener" );
action_priority_list_t* asc = get_action_priority_list( "asc" );
action_priority_list_t* precombat = get_action_priority_list( "precombat" );
action_priority_list_t* def = get_action_priority_list( "default" );
action_priority_list_t* cds = get_action_priority_list( "cds" );
action_priority_list_t* priority = get_action_priority_list( "priority" );
action_priority_list_t* maintenance = get_action_priority_list( "maintenance" );
action_priority_list_t* freezerburn_core = get_action_priority_list( "freezerburn_core" );
action_priority_list_t* default_core = get_action_priority_list( "default_core" );
action_priority_list_t* filler = get_action_priority_list( "filler" );
action_priority_list_t* opener = get_action_priority_list( "opener" );
action_priority_list_t* asc = get_action_priority_list( "asc" );

// Flask
precombat->add_action( "flask" );
Expand All @@ -7957,10 +7957,12 @@ void shaman_t::init_action_list_enhancement()
precombat->add_talent( this, "Lightning Shield" );
// All Shamans Bloodlust and Wind Shear by default
def->add_action( this, "Wind Shear" );
def->add_action(
"variable,name=cooldown_sync,value=(talent.ascendance.enabled&(buff.ascendance.up|cooldown.ascendance.remains>50))"
def->add_action(
"variable,name=cooldown_sync,value=(talent.ascendance.enabled&(buff.ascendance.up|cooldown.ascendance.remains>50)"
")"
"|(!talent.ascendance.enabled&(feral_spirit.remains>5|cooldown.feral_spirit.remains>50))",
"Attempt to sync racial cooldowns with Ascendance or Feral Spirits, or use on cooldown if saving them will result "
"Attempt to sync racial cooldowns with Ascendance or Feral Spirits, or use on cooldown if saving them will "
"result "
"in significant cooldown waste" );
def->add_action(
"variable,name=furyCheck_SS,value=maelstrom>=(talent.fury_of_air.enabled*(6+action.stormstrike.cost))",
Expand All @@ -7973,24 +7975,29 @@ void shaman_t::init_action_list_enhancement()
"variable,name=furyCheck_FB,value=maelstrom>=(talent.fury_of_air.enabled*(6+action.frostbrand.cost))" );
def->add_action(
"variable,name=furyCheck_ES,value=maelstrom>=(talent.fury_of_air.enabled*(6+action.earthen_spike.cost))" );
def->add_action(
"variable,name=furyCheck_LB,value=maelstrom>=(talent.fury_of_air.enabled*(6+40))" );
def->add_action( "variable,name=furyCheck_LB,value=maelstrom>=(talent.fury_of_air.enabled*(6+40))" );
def->add_action(
"variable,name=OCPool,value=(active_enemies>1|(cooldown.lightning_bolt.remains>=2*gcd))",
"Attempt to pool maelstrom so you'll be able to cast a fully-powered lightning bolt as soon as it's available "
"when fighting one target." );
def->add_action(
"variable,name=OCPool_SS,value=(variable.OCPool|maelstrom>=(talent.overcharge.enabled*(40+action.stormstrike.cost)))" );
"variable,name=OCPool_SS,value=(variable.OCPool|maelstrom>=(talent.overcharge.enabled*(40+action.stormstrike."
"cost)))" );
def->add_action(
"variable,name=OCPool_LL,value=(variable.OCPool|maelstrom>=(talent.overcharge.enabled*(40+action.lava_lash.cost)))" );
"variable,name=OCPool_LL,value=(variable.OCPool|maelstrom>=(talent.overcharge.enabled*(40+action.lava_lash.cost))"
")" );
def->add_action(
"variable,name=OCPool_CL,value=(variable.OCPool|maelstrom>=(talent.overcharge.enabled*(40+action.crash_lightning.cost)))" );
"variable,name=OCPool_CL,value=(variable.OCPool|maelstrom>=(talent.overcharge.enabled*(40+action.crash_lightning."
"cost)))" );
def->add_action(
"variable,name=OCPool_FB,value=(variable.OCPool|maelstrom>=(talent.overcharge.enabled*(40+action.frostbrand.cost)))" );
"variable,name=OCPool_FB,value=(variable.OCPool|maelstrom>=(talent.overcharge.enabled*(40+action.frostbrand.cost)"
"))" );
def->add_action(
"variable,name=freezerburn_enabled,value=(talent.hot_hand.enabled&talent.hailstorm.enabled&azerite.primal_primer.enabled)" );
"variable,name=freezerburn_enabled,value=(talent.hot_hand.enabled&talent.hailstorm.enabled&azerite.primal_primer."
"enabled)" );
def->add_action(
"variable,name=rockslide_enabled,value=(!variable.freezerburn_enabled&(talent.boulderfist.enabled&talent.landslide.enabled"
"variable,name=rockslide_enabled,value=(!variable.freezerburn_enabled&(talent.boulderfist.enabled&talent."
"landslide.enabled"
"&azerite.strength_of_earth.enabled))" );

// Turn on auto-attack first thing
Expand All @@ -8014,82 +8021,97 @@ void shaman_t::init_action_list_enhancement()
asc->add_action( this, "Rockbiter", "if=talent.landslide.enabled&!buff.landslide.up&charges_fractional>1.7" );
asc->add_action( this, "Windstrike" );

priority->add_action( this, "Crash Lightning", "if=active_enemies>=(8-(talent.forceful_winds.enabled*3))"
"&variable.freezerburn_enabled&variable.furyCheck_CL" );
priority->add_action( this, "Lava Lash", "if=azerite.primal_primer.rank>=2&debuff.primal_primer.stack=10"
"&active_enemies=1&variable.freezerburn_enabled&variable.furyCheck_LL" );
priority->add_action( this, "Crash Lightning", "if=!buff.crash_lightning.up&active_enemies>1"
"&variable.furyCheck_CL" );
priority->add_talent( this, "Fury of Air", "if=!ticking&maelstrom>=20"
"&active_enemies>=(1+variable.freezerburn_enabled)" );
priority->add_action( this, "Crash Lightning",
"if=active_enemies>=(8-(talent.forceful_winds.enabled*3))"
"&variable.freezerburn_enabled&variable.furyCheck_CL" );
priority->add_action( this, "Lava Lash",
"if=azerite.primal_primer.rank>=2&debuff.primal_primer.stack=10"
"&active_enemies=1&variable.freezerburn_enabled&variable.furyCheck_LL" );
priority->add_action( this, "Crash Lightning",
"if=!buff.crash_lightning.up&active_enemies>1"
"&variable.furyCheck_CL" );
priority->add_talent( this, "Fury of Air",
"if=!ticking&maelstrom>=20"
"&active_enemies>=(1+variable.freezerburn_enabled)" );
priority->add_talent( this, "Totem Mastery", "if=buff.resonance_totem.remains<=2*gcd" );
priority->add_talent( this, "Sundering", "if=active_enemies>=3" );
priority->add_action( this, "Rockbiter", "if=talent.landslide.enabled&!buff.landslide.up&charges_fractional>1.7" );
priority->add_action( this, "Frostbrand", "if=(azerite.natural_harmony.enabled&buff.natural_harmony_frost.remains<=2*gcd)"
priority->add_action(
this, "Frostbrand",
"if=(azerite.natural_harmony.enabled&buff.natural_harmony_frost.remains<=2*gcd)"
"&talent.hailstorm.enabled&variable.furyCheck_FB",
"With Natural Harmony, elevate the priority of elemental attacks in order to maintain the buffs when "
"they're about to expire." );
priority->add_action( this, "Flametongue", "if=(azerite.natural_harmony.enabled&buff.natural_harmony_fire.remains<=2*gcd)" );
priority->add_action( this, "Rockbiter", "if=(azerite.natural_harmony.enabled&buff.natural_harmony_nature.remains<=2*gcd)"
"&maelstrom<70" );
priority->add_action( this, "Flametongue",
"if=(azerite.natural_harmony.enabled&buff.natural_harmony_fire.remains<=2*gcd)" );
priority->add_action( this, "Rockbiter",
"if=(azerite.natural_harmony.enabled&buff.natural_harmony_nature.remains<=2*gcd)"
"&maelstrom<70" );

maintenance->add_action( this, "Flametongue", "if=!buff.flametongue.up" );
maintenance->add_action( this, "Frostbrand", "if=talent.hailstorm.enabled&!buff.frostbrand.up&variable.furyCheck_FB" );
maintenance->add_action( this, "Frostbrand",
"if=talent.hailstorm.enabled&!buff.frostbrand.up&variable.furyCheck_FB" );

cds->add_action( this, "Bloodlust", "if=azerite.ancestral_resonance.enabled",
"Cast Bloodlust manually if the Azerite Trait Ancestral Resonance is present." );
cds->add_action(
"berserking,if=variable.cooldown_sync" );
cds->add_action(
"blood_fury,if=variable.cooldown_sync" );
cds->add_action(
"fireblood,if=variable.cooldown_sync" );
cds->add_action(
"ancestral_call,if=variable.cooldown_sync" );
cds->add_action( "berserking,if=variable.cooldown_sync" );
cds->add_action( "blood_fury,if=variable.cooldown_sync" );
cds->add_action( "fireblood,if=variable.cooldown_sync" );
cds->add_action( "ancestral_call,if=variable.cooldown_sync" );
cds->add_action(
"potion,if=buff.ascendance.up|!talent.ascendance.enabled&feral_spirit.remains>5|target.time_to_die<=60",
"Attempt to sync your DPS potion with a cooldown, unless the target is about to die." );
cds->add_action( this, "Feral Spirit" );
cds->add_talent( this, "Ascendance", "if=cooldown.strike.remains>0" );
cds->add_action( this, "Earth Elemental" );

freezerburn_core->add_action(this, "Lava Lash", "if=azerite.primal_primer.rank>=2&debuff.primal_primer.stack=10"
"&variable.furyCheck_LL");
freezerburn_core->add_action( this, "Lava Lash",
"if=azerite.primal_primer.rank>=2&debuff.primal_primer.stack=10"
"&variable.furyCheck_LL" );
freezerburn_core->add_talent( this, "Earthen Spike", "if=variable.furyCheck_ES" );
freezerburn_core->add_action( this, "Stormstrike", "cycle_targets=1,if=active_enemies>1&azerite.lightning_conduit.enabled"
"&!debuff.lightning_conduit.up&variable.furyCheck_SS" );
freezerburn_core->add_action( this, "Stormstrike", "if=buff.stormbringer.up|(active_enemies>1&buff.gathering_storms.up"
"&variable.furyCheck_SS)" );
freezerburn_core->add_action( this, "Stormstrike",
"cycle_targets=1,if=active_enemies>1&azerite.lightning_conduit.enabled"
"&!debuff.lightning_conduit.up&variable.furyCheck_SS" );
freezerburn_core->add_action( this, "Stormstrike",
"if=buff.stormbringer.up|(active_enemies>1&buff.gathering_storms.up"
"&variable.furyCheck_SS)" );
freezerburn_core->add_action( this, "Crash Lightning", "if=active_enemies>=3&variable.furyCheck_CL" );
freezerburn_core->add_action( this, "Lightning Bolt", "if=talent.overcharge.enabled&active_enemies=1"
"&variable.furyCheck_LB&maelstrom>=40" );
freezerburn_core->add_action( this, "Lava Lash", "if=azerite.primal_primer.rank>=2&debuff.primal_primer.stack>7"
"&active_enemies=1&variable.furyCheck_LL" );
freezerburn_core->add_action( this, "Lightning Bolt",
"if=talent.overcharge.enabled&active_enemies=1"
"&variable.furyCheck_LB&maelstrom>=40" );
freezerburn_core->add_action( this, "Lava Lash",
"if=azerite.primal_primer.rank>=2&debuff.primal_primer.stack>7"
"&active_enemies=1&variable.furyCheck_LL" );
freezerburn_core->add_action( this, "Stormstrike", "if=variable.OCPool_SS&variable.furyCheck_SS" );
freezerburn_core->add_action( this, "Lava Lash", "if=debuff.primal_primer.stack=10&variable.furyCheck_LL" );

default_core->add_talent( this, "Earthen Spike", "if=variable.furyCheck_ES" );
default_core->add_action( this, "Stormstrike", "cycle_targets=1,if=active_enemies>1&azerite.lightning_conduit.enabled"
"&!debuff.lightning_conduit.up&variable.furyCheck_SS" );
default_core->add_action( this, "Stormstrike", "if=buff.stormbringer.up|(active_enemies>1&buff.gathering_storms.up"
"&variable.furyCheck_SS)" );
default_core->add_action( this, "Stormstrike",
"cycle_targets=1,if=active_enemies>1&azerite.lightning_conduit.enabled"
"&!debuff.lightning_conduit.up&variable.furyCheck_SS" );
default_core->add_action( this, "Stormstrike",
"if=buff.stormbringer.up|(active_enemies>1&buff.gathering_storms.up"
"&variable.furyCheck_SS)" );
default_core->add_action( this, "Crash Lightning", "if=active_enemies>=3&variable.furyCheck_CL" );
default_core->add_action( this, "Lightning Bolt", "if=talent.overcharge.enabled&active_enemies=1"
"&variable.furyCheck_LB&maelstrom>=40" );
default_core->add_action( this, "Lightning Bolt",
"if=talent.overcharge.enabled&active_enemies=1"
"&variable.furyCheck_LB&maelstrom>=40" );
default_core->add_action( this, "Stormstrike", "if=variable.OCPool_SS&variable.furyCheck_SS" );
default_core->add_action( this, "Lava Lash", "if=talent.hot_hand.enabled&buff.hot_hand.react" );

filler->add_talent( this, "Sundering" );
filler->add_action( this, "Crash Lightning", "if=talent.forceful_winds.enabled&active_enemies>1&variable.furyCheck_CL" );
filler->add_action( this, "Crash Lightning",
"if=talent.forceful_winds.enabled&active_enemies>1&variable.furyCheck_CL" );
filler->add_action( this, "Flametongue", "if=talent.searing_assault.enabled" );
filler->add_action( this, "Lava Lash", "if=talent.hot_hand.enabled&buff.hot_hand.react" );
filler->add_action( this, "Crash Lightning", "if=active_enemies>1&variable.furyCheck_CL" );
filler->add_action( this, "Rockbiter", "if=maelstrom<70&!buff.strength_of_earth.up" );
filler->add_action( this, "Crash Lightning", "if=talent.crashing_storm.enabled&variable.OCPool_CL" );
filler->add_action( this, "Lava Lash", "if=variable.OCPool_LL&variable.furyCheck_LL" );
filler->add_action( this, "Rockbiter" );
filler->add_action( this, "Frostbrand", "if=talent.hailstorm.enabled&buff.frostbrand.remains<4.8+gcd"
"&variable.furyCheck_FB" );
filler->add_action( this, "Frostbrand",
"if=talent.hailstorm.enabled&buff.frostbrand.remains<4.8+gcd"
"&variable.furyCheck_FB" );
filler->add_action( this, "Flametongue" );
}

Expand Down Expand Up @@ -8992,6 +9014,13 @@ struct shaman_module_t : public module_t

void register_hotfixes() const override
{
hotfix::register_effect( "Shaman", "2019-01-07",
"Incorrect Maelstrom generation value for Chain Lightning Overloads.",
723964 ) // spell 190493
.field( "base_value" )
.operation( hotfix::HOTFIX_SET )
.modifier( 2 )
.verification_value( 3 );
}

virtual void combat_begin( sim_t* ) const override
Expand Down

0 comments on commit 86a72b2

Please sign in to comment.