Skip to content

Commit

Permalink
[Action] apply composite_rolling_ta_multiplier to residual based roll…
Browse files Browse the repository at this point in the history
…ing periodics

composite_rolling_ta_multiplier is normally overridden to 1.0 in base
residual_action_t. It is possible in-game to have multipliers scripted
to snapshot into the multiplier on a rolling periodic update. Overriding
composite_rolling_ta_multiplier in derived classes will match this
behavior.
  • Loading branch information
gastank committed May 16, 2024
1 parent 419d633 commit f6a5511
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions engine/action/action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1321,11 +1321,12 @@ double action_t::calculate_tick_amount( action_state_t* state, double dot_multip
// Base amount rounded to some decimal, but the exact precision is currently unknown. For now assume 3 digits as that
// is what AP/SP multipliers seem to be rounded to.
amount = std::round( amount * 1000 ) * 0.001;
// Assuming both flat value tick amount and coeff tick amount are rolled into rolling periodics. Adjust if disproven.
amount += bonus_ta( state );
double rolling_ta_multiplier = state->composite_rolling_ta_multiplier();
amount += state->composite_spell_power() * spell_tick_power_coefficient( state ) * rolling_ta_multiplier;
amount += state->composite_attack_power() * attack_tick_power_coefficient( state ) * rolling_ta_multiplier;
amount += state->composite_spell_power() * spell_tick_power_coefficient( state );
amount += state->composite_attack_power() * attack_tick_power_coefficient( state );
amount *= state->composite_ta_multiplier();
amount *= state->composite_rolling_ta_multiplier();

double init_tick_amount = amount;

Expand Down

0 comments on commit f6a5511

Please sign in to comment.