* Added new game mode: Oathbreaker (#5678);

This commit is contained in:
Oleg Agafonov 2019-05-27 16:17:15 +04:00
parent adb666587b
commit 07cf5201ba
17 changed files with 1100 additions and 236 deletions

View file

@ -522,10 +522,8 @@ public final class SystemUtil {
// as commander (only commander games, look at init code in GameCommanderImpl)
if (game instanceof GameCommanderImpl) {
GameCommanderImpl gameCommander = (GameCommanderImpl) game;
for (Card card : cardsToLoad) {
player.addCommanderId(card.getId());
gameCommander.initCommander(card, player);
}
cardsToLoad.forEach(card -> gameCommander.addCommander(card, player));
cardsToLoad.forEach(card -> gameCommander.initCommander(card, player));
} else {
logger.fatal("Commander card can be used in commander game only: " + command.cardName);
}