diff --git a/forge-game/src/main/java/forge/game/GameAction.java b/forge-game/src/main/java/forge/game/GameAction.java index be3959b2ac7..12d19649791 100644 --- a/forge-game/src/main/java/forge/game/GameAction.java +++ b/forge-game/src/main/java/forge/game/GameAction.java @@ -428,6 +428,7 @@ public class GameAction { if (!c.isToken() && !toBattlefield) { copied.clearDevoured(); copied.clearDelved(); + copied.clearConvoked(); } // rule 504.6: reveal a face-down card leaving the stack diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index f56315a4a29..1a9ed880a56 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -98,7 +98,7 @@ public class Card extends GameEntity implements Comparable { private final KeywordCollection hiddenExtrinsicKeyword = new KeywordCollection(); // cards attached or otherwise linked to this card - private CardCollection equippedBy, fortifiedBy, hauntedBy, devouredCards, delvedCards, imprintedCards, encodedCards; + private CardCollection equippedBy, fortifiedBy, hauntedBy, devouredCards, delvedCards, convokedCards, imprintedCards, encodedCards; private CardCollection mustBlockCards, clones, gainControlTargets, chosenCards, blockedThisTurn, blockedByThisTurn; // if this card is attached or linked to something, what card is it currently attached to @@ -725,6 +725,20 @@ public class Card extends GameEntity implements Comparable { delvedCards = null; } + + public final CardCollectionView getConvoked() { + return CardCollection.getView(convokedCards); + } + public final void addConvoked(final Card c) { + if (convokedCards == null) { + convokedCards = new CardCollection(); + } + convokedCards.add(c); + } + public final void clearConvoked() { + convokedCards = null; + } + public MapOfLists getRememberMap() { return rememberMap; } diff --git a/forge-game/src/main/java/forge/game/card/CardProperty.java b/forge-game/src/main/java/forge/game/card/CardProperty.java index 4a480acb239..d2be541192c 100644 --- a/forge-game/src/main/java/forge/game/card/CardProperty.java +++ b/forge-game/src/main/java/forge/game/card/CardProperty.java @@ -1378,6 +1378,10 @@ public class CardProperty { if (!source.getDelved().contains(card)) { return false; } + } else if (property.startsWith("convoked")) { + if (!source.getConvoked().contains(card)) { + return false; + } } else if (property.startsWith("unequalPT")) { if (card.getNetPower() == card.getNetToughness()) { return false; diff --git a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java index 70d6c91083d..455949c58d5 100644 --- a/forge-game/src/main/java/forge/game/cost/CostAdjustment.java +++ b/forge-game/src/main/java/forge/game/cost/CostAdjustment.java @@ -237,6 +237,7 @@ public class CostAdjustment { } } if (sa.getHostCard().hasKeyword(Keyword.CONVOKE)) { + sa.getHostCard().clearConvoked(); adjustCostByConvokeOrImprovise(cost, sa, false, test); } if (sa.getHostCard().hasKeyword(Keyword.IMPROVISE)) { @@ -270,6 +271,9 @@ public class CostAdjustment { cost.decreaseShard(conv.getValue(), 1); if (!test) { conv.getKey().tap(); + if (!improvise) { + sa.getHostCard().addConvoked(conv.getKey()); + } } } } diff --git a/forge-gui/res/cardsfolder/v/venerated_loxodon.txt b/forge-gui/res/cardsfolder/v/venerated_loxodon.txt new file mode 100644 index 00000000000..f5add8bf2ce --- /dev/null +++ b/forge-gui/res/cardsfolder/v/venerated_loxodon.txt @@ -0,0 +1,8 @@ +Name:Venerated Loxodon +ManaCost:4 W +Types:Creature Elephant Cleric +PT:4/4 +K:Convoke +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounterAll | TriggerDescription$ When CARDNAME enters the battlefield, put a +1/+1 counter on each creature that convoked it. +SVar:TrigPutCounterAll:DB$ PutCounterAll | ValidCards$ Creature.convoked | CounterType$ P1P1 | CounterNum$ 1 +Oracle:Convoke (Your creatures can help cast this spell. Each creature you tap while casting this spell pays for {1} or one mana of the creature's color.)\nWhen Venerated Loxodon enters the battlefield, put a +1/+1 counter on each creature that convoked it.