From 253a6edfab1fae90f6d4ec4ee4ce4691edbf98fb Mon Sep 17 00:00:00 2001 From: Lucasmingus Date: Fri, 24 Jul 2026 18:23:29 +0200 Subject: [PATCH] Adjust FFE's aoe sqrt calculation --- engine/class_modules/sc_mage.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/engine/class_modules/sc_mage.cpp b/engine/class_modules/sc_mage.cpp index 6d8c5f6e1cb..ff0568ac756 100644 --- a/engine/class_modules/sc_mage.cpp +++ b/engine/class_modules/sc_mage.cpp @@ -5251,8 +5251,23 @@ struct frostfire_empowerment_t final : public spell_t target_filter_callback = secondary_targets_only(); aoe = -1; base_dd_min = base_dd_max = 1.0; - // TODO: Check how it behaves wrt the excluded main target - reduced_aoe_targets = p->talents.frostfire_empowerment->effectN( 5 ).base_value(); + } + + // The excluded main target still counts towards the target cap, + // so it needs to be added back into the target count used for the sqrt reduction. + // This can't be done via reduced_aoe_targets since that compares + // against state->n_targets directly, which only sees the secondary targets. + double composite_aoe_multiplier( const action_state_t* s ) const override + { + double cam = spell_t::composite_aoe_multiplier( s ); + + mage_t* p = debug_cast( player ); + double cap = p->talents.frostfire_empowerment->effectN( 5 ).base_value(); + double n = as( s->n_targets ) + 1; + if ( n > cap ) + cam *= std::sqrt( cap / std::min( sim->max_aoe_enemies, n ) ); + + return cam; } void impact( action_state_t* s ) override