Skip to content

Commit ca59aee

Browse files
authored
Account for threshold_substitutes in the mutation selector (#82625)
1 parent cc1fe77 commit ca59aee

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/mutation.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,6 +1466,13 @@ bool Character::mutation_selector( const std::vector<trait_id> &prospective_trai
14661466
if( has_permanent_trait( threshreq[i] ) ) {
14671467
c_has_threshreq = true;
14681468
}
1469+
if( !mdata.strict_threshreq ) {
1470+
for( const trait_id &subst : threshreq[i]->threshold_substitutes ) {
1471+
if( has_permanent_trait( subst ) ) {
1472+
c_has_threshreq = true;
1473+
}
1474+
}
1475+
}
14691476
}
14701477
if( !c_has_threshreq ) {
14711478
continue;

0 commit comments

Comments
 (0)