Skip to content

[Mage] Implement BoP and GI bug + Fix Arcane's Spellfire Spheres tracking #10432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: thewarwithin
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions engine/class_modules/sc_mage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ struct mage_t final : public player_t
bool trigger_glorious_incandescence;
bool heat_shimmer;
bool gained_initial_clearcasting; // Used to prevent queueing Arcane Missiles immediately after gaining the first stack Clearclasting.
bool has_unqueueable_burden; // For Arcane, Burden of Power has a 15ms delay before it triggers -- this expression is used to track it within the APL.
int embedded_splinters;
int remaining_splinterstorm;
int magis_spark_spells;
Expand Down Expand Up @@ -3638,7 +3639,10 @@ struct arcane_barrage_t final : public dematerialize_spell_t
if ( p()->buffs.glorious_incandescence->check() )
{
p()->buffs.glorious_incandescence->decrement();
p()->trigger_arcane_charge( glorious_incandescence_charges );
// Probably(?) a bug: Barrage together with BoP and GI doesn't grant Arcane Charges from consuming GI,
// yet they still both amplify Barrage's damage, and GI'll summon meteorites.
if ( !p()->bugs || !p()->buffs.burden_of_power->check() )
p()->trigger_arcane_charge( glorious_incandescence_charges );
p()->state.trigger_glorious_incandescence = true;
}
p()->consume_burden_of_power();
Expand Down Expand Up @@ -9556,6 +9560,12 @@ std::unique_ptr<expr_t> mage_t::create_expression( std::string_view name )
{ return 11 - state.intuition_blp_count; } );
}

if ( util::str_compare_ci( name, "unqueueable_burden" ) )
{
return make_fn_expr( name, [ this ]
{ return state.has_unqueueable_burden; } );
}

auto splits = util::string_split<std::string_view>( name, "." );

if ( splits.size() == 3 && util::str_compare_ci( splits[ 0 ], "ground_aoe" ) )
Expand Down Expand Up @@ -9882,19 +9892,26 @@ void mage_t::trigger_spellfire_spheres()
if ( !talents.spellfire_spheres.ok() )
return;

int max_stacks = buffs.spellfire_spheres->max_stack();

buffs.spellfire_spheres->trigger();

auto check_stacks = [ this, s = max_stacks ]
// Expiration of Spellfire Spheres needs to occur instantly as to have Blast (while at 5 spheres) with a queued Barrage end with 1 spheres.
// Otherwise, the 15ms delay will nullify the queued increment because spheres are at max stacks for an extra 10ms.
bool max_stacks = buffs.spellfire_spheres->at_max_stacks();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the way I wrote this is to write around the current Implementation of Spheres instead of directly changing it, I suppose.

What I'm trying to ask is whether or not I should rewrite 9900-9914 to handle the delay + expiration all in one block instead of separating them -- anything works with me. Let me know, thanks.

if ( max_stacks )
{
state.has_unqueueable_burden = true;
buffs.spellfire_spheres->expire();
}

auto check_stacks = [ this, max_stacks ]
{
if ( buffs.spellfire_spheres->check() >= s )
if ( max_stacks )
{
if ( talents.ignite_the_future.ok() && pets.arcane_phoenix && !pets.arcane_phoenix->is_sleeping() && !buffs.spellfire_sphere->at_max_stacks() )
debug_cast<pets::arcane_phoenix::arcane_phoenix_pet_t*>( pets.arcane_phoenix )->exceptional_spells_remaining++;
buffs.spellfire_sphere->trigger();
buffs.spellfire_spheres->expire();
buffs.burden_of_power->trigger();
state.has_unqueueable_burden = false;
}
};

Expand Down
Loading