Skip to content

Commit

Permalink
[Druid] Guardian
Browse files Browse the repository at this point in the history
 - Implement in-game bug: Galactic Guardian procs deal extra damage and grant rage when Lady and the Child deals damage to a secondary target.
  • Loading branch information
aggixx committed Jan 20, 2018
1 parent 754fbf6 commit dddce92
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions engine/class_modules/sc_druid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1651,8 +1651,7 @@ struct druid_action_t : public Base
p() -> active.galactic_guardian -> snapshot_state( gg_s, DMG_DIRECT );
p() -> active.galactic_guardian -> schedule_execute( gg_s );

// Trigger buff
p() -> buff.galactic_guardian -> trigger();
// Buff is triggered in galactic_guardian_damage_t::execute()
}
}

Expand Down Expand Up @@ -2212,16 +2211,25 @@ struct moonfire_t : public druid_spell_t
return td( t ) -> dots.moonfire;
}

virtual double action_da_multiplier() const override
virtual double composite_target_da_multiplier( player_t* t ) const override
{
double adm = druid_spell_t::action_da_multiplier();

if ( benefits_from_galactic_guardian && p()->buff.galactic_guardian->check() )
double tdm = druid_spell_t::composite_target_da_multiplier( t );

// IN-GAME BUG (Jan 20 2018): Lady and the Child Galactic Guardian procs benefit from both the DD modifier and the rage gain.
if ( ( benefits_from_galactic_guardian || ( p() -> bugs && t != target ) )
&& p() -> buff.galactic_guardian -> check() )
{
// Galactic Guardian 7.1 Damage Buff
adm *= 1.0 + galactic_guardian_dd_multiplier;
tdm *= 1.0 + galactic_guardian_dd_multiplier;
}

return tdm;
}

virtual double action_da_multiplier() const override
{
double adm = druid_spell_t::action_da_multiplier();

adm *= 1.0 + p() -> buff.wax_and_wane -> stack_value();

return adm;
Expand All @@ -2246,10 +2254,15 @@ struct moonfire_t : public druid_spell_t
druid_spell_t::impact( s );

// The buff needs to be handled with the damage handler since 7.1 since it impacts Moonfire DD
if ( benefits_from_galactic_guardian && result_is_hit( s -> result ) && p() -> buff.galactic_guardian -> check() )
// IN-GAME BUG (Jan 20 2018): Lady and the Child Galactic Guardian procs benefit from both the DD modifier and the rage gain.
if ( ( benefits_from_galactic_guardian || ( p() -> bugs && s -> chain_target > 0 ) )
&& result_is_hit( s -> result ) && p() -> buff.galactic_guardian -> check() )
{
p() -> resource_gain( RESOURCE_RAGE, p() -> buff.galactic_guardian -> value(), p() -> gain.galactic_guardian );
p() -> buff.galactic_guardian -> expire();

// buff is not consumed when bug occurs
if ( benefits_from_galactic_guardian )
p() -> buff.galactic_guardian -> expire();
}
}

Expand Down Expand Up @@ -2338,6 +2351,13 @@ struct moonfire_t : public druid_spell_t
{
benefits_from_galactic_guardian = false;
}

virtual void execute() override
{
moonfire_damage_t::execute();

p() -> buff.galactic_guardian -> trigger();
}
};

moonfire_damage_t* damage;
Expand Down

0 comments on commit dddce92

Please sign in to comment.