diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index d6b19b2ad42a7..aae8b2c3a2b26 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -3775,11 +3775,12 @@ void activity_handlers::spellcasting_finish( player_activity *act, Character *yo // spells with the components in hand. spell_being_cast.use_components( *you ); + // pay the cost. Allows ternaries based on having an effect or trait to calculate cost correctly + int cost = spell_being_cast.energy_cost( *you ); + spell_being_cast.cast_all_effects( *you, *target ); if( act->get_value( 2 ) != 0 ) { - // pay the cost - int cost = spell_being_cast.energy_cost( *you ); switch( spell_being_cast.energy_source() ) { case magic_energy_type::mana: you->magic->mod_mana( *you, -cost );