refactor: improved card info

This commit is contained in:
Oleg Agafonov 2024-02-18 22:40:30 +04:00
parent b1e4ea2790
commit ad8e7daf97
47 changed files with 84 additions and 81 deletions

View file

@ -49,7 +49,7 @@ public class MomirDuel extends GameImpl {
Player player = getPlayer(playerId);
if (player != null) {
CardInfo cardInfo = CardRepository.instance.findCard("Momir Vig, Simic Visionary");
addEmblem(new MomirEmblem(), cardInfo.getCard(), playerId);
addEmblem(new MomirEmblem(), cardInfo.createCard(), playerId);
}
}
getState().addAbility(ability, null);

View file

@ -55,7 +55,7 @@ public class MomirGame extends GameImpl {
// how-to fix: make sure that a Momir Emblem and a source card uses same set (DIS - Dissension)
throw new IllegalStateException("Wrong code usage: momir card and emblem must exists in the same set (DIS)");
}
addEmblem(new MomirEmblem(), cardInfo.getCard(), playerId);
addEmblem(new MomirEmblem(), cardInfo.createCard(), playerId);
}
}
getState().addAbility(ability, null);

View file

@ -2283,7 +2283,7 @@ public class ComputerPlayer extends PlayerImpl {
}
for (int i = 0; i < number; i++) {
Card land = cards.get(RandomUtil.nextInt(cards.size())).getCard();
Card land = cards.get(RandomUtil.nextInt(cards.size())).createCard();
deck.getCards().add(land);
}
}