Skip to content

Commit

Permalink
momir game: fixed game error on start, added momir emblem image
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDi85 committed Jun 17, 2023
1 parent ef85353 commit afe89a1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2006,6 +2006,10 @@ public class ScryfallImageSupportTokens {
put("ODY/Wurm", "https://api.scryfall.com/cards/pr2/6/en?format=image");
put("ODY/Zombie", "https://api.scryfall.com/cards/pr2/4/en?format=image");

// DIS
put("DIS/Emblem Momir", "https://api.scryfall.com/cards/pmoa/61/en?format=image");


// generate supported sets
supportedSets.clear();
for (String cardName : this.keySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ protected void init(UUID choosingPlayerId) {
for (UUID playerId : state.getPlayerList(startingPlayerId)) {
Player player = getPlayer(playerId);
if (player != null) {
CardInfo cardInfo = CardRepository.instance.findCard("Momir Vig, Simic Visionary");
CardInfo cardInfo = CardRepository.instance.findCardWithPreferredSetAndNumber("Momir Vig, Simic Visionary", "DIS", "118");
if (cardInfo == null) {
// 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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public final class MomirEmblem extends Emblem {
// Faking Vanguard as an Emblem; need to come back to this and add a new type of CommandObject

public MomirEmblem() {
super("Emblem Momir Vig, Simic Visionary");
super("Emblem Momir");

// {X}, Discard a card: Create a token that's a copy of a creature card with converted mana cost X chosen at random.
// Activate this ability only any time you could cast a sorcery and only once each turn.
Expand Down
1 change: 1 addition & 0 deletions Mage/src/main/resources/tokens-database.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
|Generate|EMBLEM:MOM|Emblem Wrenn|||WrennAndRealmbreakerEmblem|
|Generate|EMBLEM:MOC|Emblem Elspeth|||ElspethSunsChampionEmblem|
|Generate|EMBLEM:MOC|Emblem Teferi|||TeferisTalentEmblem|
|Generate|EMBLEM:DIS|Emblem Momir|||MomirEmblem|

# ALL PLANES
# Usage hints:
Expand Down

0 comments on commit afe89a1

Please sign in to comment.