diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index a47716f6394..808cc5a08ff 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -786,8 +786,10 @@ public class CardFactoryUtil { final String[] rest = restriction.split(","); CardCollection list = CardLists.getValidCards(cc.getGame().getCardsInGame(), rest, cc, c, null); for (final Card card : list) { - if (!crdname.contains(card.getName())) { - crdname.add(card.getName()); + String name = card.getName(); + // CR 201.2b Those objects have different names only if each of them has at least one name and no two objects in that group have a name in common + if (!crdname.contains(name) && !name.isEmpty()) { + crdname.add(name); } } return doXMath(crdname.size(), m, c); diff --git a/forge-gui/res/cardsfolder/l/lilianas_contract.txt b/forge-gui/res/cardsfolder/l/lilianas_contract.txt index 0d8e92774db..38f59d85062 100644 --- a/forge-gui/res/cardsfolder/l/lilianas_contract.txt +++ b/forge-gui/res/cardsfolder/l/lilianas_contract.txt @@ -1,9 +1,9 @@ Name:Liliana's Contract ManaCost:3 B B Types:Enchantment -T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ DBWin | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, if you control four or more Demons with different names, you win the game. +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ DBWin | TriggerZones$ Battlefield | CheckSVar$ Contractors | SVarCompare$ GE4 | TriggerDescription$ At the beginning of your upkeep, if you control four or more Demons with different names, you win the game. SVar:DBWin:DB$ WinsGame | Defined$ You | ConditionCheckSVar$ Contractors | ConditionSVarCompare$ GE4 -SVar:Contractors:Count$DifferentCardNames_Demon.YouCtrl+inZoneBattlefield +SVar:Contractors:Count$DifferentCardNames_Demon.YouCtrl+inRealZoneBattlefield T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME enters the battlefield, you draw four cards and you lose 4 life. SVar:TrigDraw:DB$ Draw | Defined$ You | NumCards$ 4 | SubAbility$ DBLoseLife SVar:DBLoseLife:DB$ LoseLife | LifeAmount$ 4