diff --git a/forge-game/src/main/java/forge/game/GameAction.java b/forge-game/src/main/java/forge/game/GameAction.java index 0c9ca45ae34..77c4c009772 100644 --- a/forge-game/src/main/java/forge/game/GameAction.java +++ b/forge-game/src/main/java/forge/game/GameAction.java @@ -439,6 +439,7 @@ public class GameAction { copied.clearDevoured(); copied.clearDelved(); copied.clearConvoked(); + copied.clearExploited(); } // rule 504.6: reveal a face-down card leaving the stack diff --git a/forge-game/src/main/java/forge/game/ability/effects/SacrificeEffect.java b/forge-game/src/main/java/forge/game/ability/effects/SacrificeEffect.java index 1c9bb983029..1f77b737737 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/SacrificeEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/SacrificeEffect.java @@ -151,6 +151,7 @@ public class SacrificeEffect extends SpellAbilityEffect { game.getTriggerHandler().runTrigger(TriggerType.Devoured, runParams, false); } if (exploit) { + card.addExploited(lKICopy); final Map runParams = Maps.newHashMap(); runParams.put("Exploited", lKICopy); runParams.put("Card", card); 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 2bf560661a4..1b7c8a7ea5a 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -99,7 +99,7 @@ public class Card extends GameEntity implements Comparable { private final KeywordCollection hiddenExtrinsicKeyword = new KeywordCollection(); // cards attached or otherwise linked to this card - private CardCollection hauntedBy, devouredCards, delvedCards, convokedCards, imprintedCards, encodedCards; + private CardCollection hauntedBy, devouredCards, exploitedCards, delvedCards, convokedCards, imprintedCards, encodedCards; private CardCollection mustBlockCards, gainControlTargets, chosenCards, blockedThisTurn, blockedByThisTurn; // if this card is attached or linked to something, what card is it currently attached to @@ -816,7 +816,7 @@ public class Card extends GameEntity implements Comparable { return Card.storableSVars; } - public final CardCollectionView getDevoured() { + public final CardCollectionView getDevouredCards() { return CardCollection.getView(devouredCards); } public final void addDevoured(final Card c) { @@ -830,6 +830,19 @@ public class Card extends GameEntity implements Comparable { devouredCards = null; } + public final CardCollectionView getExploited() { + return CardCollection.getView(exploitedCards); + } + public final void addExploited(final Card c) { + if (exploitedCards == null) { + exploitedCards = new CardCollection(); + } + exploitedCards.add(c); + } + public final void clearExploited() { + exploitedCards = null; + } + public final CardCollectionView getDelved() { return CardCollection.getView(delvedCards); } @@ -5152,10 +5165,6 @@ public class Card extends GameEntity implements Comparable { currentState.setSVar("Foil", Integer.toString(f)); } - public final CardCollectionView getDevouredCards() { - return CardCollection.getView(devouredCards); - } - public final CardCollectionView getHauntedBy() { return CardCollection.getView(hauntedBy); } 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 42a83b7af8c..2d8796fdafc 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -1151,7 +1151,7 @@ public class CardFactoryUtil { if (sq[0].startsWith("Devoured")) { final String validDevoured = l[0].split(" ")[1]; - CardCollection cl = CardLists.getValidCards(c.getDevoured(), validDevoured.split(","), cc, c, null); + CardCollection cl = CardLists.getValidCards(c.getDevouredCards(), validDevoured.split(","), cc, c, null); return doXMath(cl.size(), m, c); } 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 0a95db20bc2..8828cc02790 100644 --- a/forge-game/src/main/java/forge/game/card/CardProperty.java +++ b/forge-game/src/main/java/forge/game/card/CardProperty.java @@ -1394,6 +1394,10 @@ public class CardProperty { if (!source.getConvoked().contains(card)) { return false; } + } else if (property.startsWith("exploited")) { + if (!source.getExploited().contains(card)) { + return false; + } } else if (property.startsWith("unequalPT")) { if (card.getNetPower() == card.getNetToughness()) { return false; diff --git a/forge-gui/res/cardsfolder/upcoming/silumgar_scavenger.txt b/forge-gui/res/cardsfolder/upcoming/silumgar_scavenger.txt new file mode 100644 index 00000000000..effab6a23a3 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/silumgar_scavenger.txt @@ -0,0 +1,10 @@ +Name:Silumgar Scavenger +ManaCost:4 B +Types:Creature Zombie Bird +PT:2/3 +K:Flying +K:Exploit +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.YouCtrl+Other | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever another creature you control dies, put a +1/+1 counter on CARDNAME. It gains haste until end of turn if it exploited that creature. +SVar:TrigPutCounter:DB$PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | ConditionPresent$ Card.StrictlySelf | SubAbility$ DBPump +SVar:DBPump:DB$ Pump | Defined$ Self | KW$ Haste | ConditionDefined$ TriggeredCard | ConditionPresent$ Card.exploited +Oracle:Flying\nExploit (When this creature enters the battlefield, you may sacrifice a creature.)\nWhenever another creature you control dies, put a +1/+1 counter on Silumgar Scavenger. It gains haste until end of turn if it exploited that creature.