Skip to content

Commit

Permalink
fix: avoid quality actions if there's no IQ running
Browse files Browse the repository at this point in the history
  • Loading branch information
Supamiu committed Jul 5, 2019
1 parent 4679182 commit a115caa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/solver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import {
Innovation,
MakersMark,
MuscleMemory,
NameOfTheElements,
Observe,
ProgressAction,
QualityAction,
Reclaim,
Reuse,
Satisfaction,
Expand Down Expand Up @@ -258,6 +258,11 @@ export class Solver {
];
}

// If there's no IQ running, don't use quality actions
if (!run.simulation.getBuff(Buff.INNER_QUIET)) {
excludedActions.push(QualityAction);
}

// Remove all the excluded actions
availableActions = availableActions.filter(a => {
return !excludedActions.some(skippedAction => a.is(skippedAction));
Expand Down

0 comments on commit a115caa

Please sign in to comment.