summaryrefslogtreecommitdiff
path: root/server/lib/core/commands/amd_reveal_command.dart
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/core/commands/amd_reveal_command.dart')
-rw-r--r--server/lib/core/commands/amd_reveal_command.dart27
1 files changed, 27 insertions, 0 deletions
diff --git a/server/lib/core/commands/amd_reveal_command.dart b/server/lib/core/commands/amd_reveal_command.dart
new file mode 100644
index 0000000..1a0a1a3
--- /dev/null
+++ b/server/lib/core/commands/amd_reveal_command.dart
@@ -0,0 +1,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);
+ }
+}