Exploited: add info about exploited creature

This commit is contained in:
Hans Mackowiak
2019-06-03 08:12:44 +00:00
committed by Michael Kamensky
parent 23a95d86dd
commit 361860f23f
6 changed files with 32 additions and 7 deletions

View File

@@ -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

View File

@@ -151,6 +151,7 @@ public class SacrificeEffect extends SpellAbilityEffect {
game.getTriggerHandler().runTrigger(TriggerType.Devoured, runParams, false);
}
if (exploit) {
card.addExploited(lKICopy);
final Map<String, Object> runParams = Maps.newHashMap();
runParams.put("Exploited", lKICopy);
runParams.put("Card", card);

View File

@@ -99,7 +99,7 @@ public class Card extends GameEntity implements Comparable<Card> {
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<Card> {
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<Card> {
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<Card> {
currentState.setSVar("Foil", Integer.toString(f));
}
public final CardCollectionView getDevouredCards() {
return CardCollection.getView(devouredCards);
}
public final CardCollectionView getHauntedBy() {
return CardCollection.getView(hauntedBy);
}

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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.