summaryrefslogtreecommitdiff
path: root/server/lib/core/commands/amd_reveal_command.dart
blob: 1a0a1a30c0a7f96aa76d464ec4d4001067d3577c (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
import 'package:x_haven_server/core/game_methods.dart';

import '../state/game_state.dart';
import 'command_l10n.dart';

class AMDRevealCommand extends Command {
  final int amount;
  final String name;
  final GameState _gameState;

  AMDRevealCommand({
    required this.amount,
    required this.name,
    required GameState gameState,
  }) : _gameState = gameState;

  @override
  void execute() {
    ModifierDeck deck = GameMethods.getModifierDeck(name, _gameState);
    deck.revealCards(stateAccess, amount);
  }

  @override
  String describe() {
    return commandL10n.cmdRevealModifierCards(amount);
  }
}