@@ -3457,24 +3457,33 @@ std::string player_t::aura_expr_from_spell_id( unsigned int spell_id, bool on_se
3457
3457
3458
3458
void player_t::parse_assisted_combat_step( const assisted_combat_step_data_t& step, action_priority_list_t* assisted_combat )
3459
3459
{
3460
- std::string options = "";
3460
+ std::string expr = "";
3461
+ std::string base_expr = "";
3461
3462
std::string comment = "";
3462
3463
for ( const auto& rule : assisted_combat_rule_data_t::data( step.id, is_ptr() ) )
3463
3464
{
3464
- parsed_assisted_combat_rule_t rule_str = parse_assisted_combat_rule( rule, step );
3465
- if ( !rule_str.expr.empty() )
3466
- options += options.empty() ? rule_str.expr : "&" + rule_str.expr;
3467
- if ( !rule_str.comment.empty() )
3468
- comment += comment.empty() ? rule_str.comment : ", " + rule_str.comment;
3465
+ parsed_assisted_combat_rule_t derived_combat_rule = parse_assisted_combat_rule( rule, step );
3466
+ parsed_assisted_combat_rule_t base_combat_rule = player_t::parse_assisted_combat_rule( rule, step );
3467
+
3468
+ if ( !derived_combat_rule.expr.empty() )
3469
+ expr += expr.empty() ? derived_combat_rule.expr : "&" + derived_combat_rule.expr;
3470
+ if ( !derived_combat_rule.comment.empty() )
3471
+ comment += comment.empty() ? derived_combat_rule.comment : ", " + derived_combat_rule.comment;
3472
+ if ( !base_combat_rule.expr.empty() )
3473
+ base_expr += base_expr.empty() ? base_combat_rule.expr : "&" + base_combat_rule.expr;
3469
3474
}
3475
+
3476
+ if ( base_expr != expr )
3477
+ comment += comment.empty() ? fmt::format( "({} -> {})", base_expr, expr ) : fmt::format( " ({} -> {})", base_expr, expr );
3478
+
3470
3479
for ( const auto& name : action_names_from_spell_id( step.spell_id ) )
3471
3480
{
3472
3481
if ( !name.empty() )
3473
3482
{
3474
- if ( options .empty() )
3483
+ if ( expr .empty() )
3475
3484
assisted_combat->add_action( name, comment );
3476
3485
else
3477
- assisted_combat->add_action( name + ",if=" + options , comment );
3486
+ assisted_combat->add_action( name + ",if=" + expr , comment );
3478
3487
}
3479
3488
}
3480
3489
}
0 commit comments