blob: 71fd85b69a06c996bb7bedec7ecbb79932cdd1ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
import '../state/game_state.dart';
import 'command_l10n.dart';
class BadOmenCommand extends Command {
static const int _kBadOmenIncrement = 6;
final bool allies;
final GameState _gameState;
BadOmenCommand(this.allies, {required GameState gameState})
: _gameState = gameState;
@override
void execute() {
if (allies) {
_gameState.modifierDeckAllies.setBadOmen(
stateAccess,
_gameState.modifierDeckAllies.badOmen + _kBadOmenIncrement,
);
} else {
_gameState.modifierDeck.setBadOmen(
stateAccess,
_gameState.modifierDeck.badOmen + _kBadOmenIncrement,
);
}
}
@override
String describe() {
return commandL10n.badOmen;
}
}
|