import '../game_methods.dart'; import '../state/game_state.dart'; import 'command_l10n.dart'; class AddFactionCardCommand extends Command { final String characterId; final String cardId; final bool add; final GameState _gameState; AddFactionCardCommand( this.characterId, this.cardId, this.add, { required GameState gameState, }) : _gameState = gameState; @override void execute() { final ModifierDeck deck = GameMethods.getModifierDeck(characterId, _gameState); if (add) { deck.addCard(stateAccess, cardId, CardType.add); } else { deck.removeCard(stateAccess, cardId); } } @override String describe() { return add ? commandL10n.cmdAddFactionCard(characterId) : commandL10n.cmdRemoveFactionCard(characterId); } }