mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Exploited: add info about exploited creature
This commit is contained in:
committed by
Michael Kamensky
parent
23a95d86dd
commit
361860f23f
@@ -439,6 +439,7 @@ public class GameAction {
|
|||||||
copied.clearDevoured();
|
copied.clearDevoured();
|
||||||
copied.clearDelved();
|
copied.clearDelved();
|
||||||
copied.clearConvoked();
|
copied.clearConvoked();
|
||||||
|
copied.clearExploited();
|
||||||
}
|
}
|
||||||
|
|
||||||
// rule 504.6: reveal a face-down card leaving the stack
|
// rule 504.6: reveal a face-down card leaving the stack
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ public class SacrificeEffect extends SpellAbilityEffect {
|
|||||||
game.getTriggerHandler().runTrigger(TriggerType.Devoured, runParams, false);
|
game.getTriggerHandler().runTrigger(TriggerType.Devoured, runParams, false);
|
||||||
}
|
}
|
||||||
if (exploit) {
|
if (exploit) {
|
||||||
|
card.addExploited(lKICopy);
|
||||||
final Map<String, Object> runParams = Maps.newHashMap();
|
final Map<String, Object> runParams = Maps.newHashMap();
|
||||||
runParams.put("Exploited", lKICopy);
|
runParams.put("Exploited", lKICopy);
|
||||||
runParams.put("Card", card);
|
runParams.put("Card", card);
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
private final KeywordCollection hiddenExtrinsicKeyword = new KeywordCollection();
|
private final KeywordCollection hiddenExtrinsicKeyword = new KeywordCollection();
|
||||||
|
|
||||||
// cards attached or otherwise linked to this card
|
// 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;
|
private CardCollection mustBlockCards, gainControlTargets, chosenCards, blockedThisTurn, blockedByThisTurn;
|
||||||
|
|
||||||
// if this card is attached or linked to something, what card is it currently attached to
|
// 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;
|
return Card.storableSVars;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final CardCollectionView getDevoured() {
|
public final CardCollectionView getDevouredCards() {
|
||||||
return CardCollection.getView(devouredCards);
|
return CardCollection.getView(devouredCards);
|
||||||
}
|
}
|
||||||
public final void addDevoured(final Card c) {
|
public final void addDevoured(final Card c) {
|
||||||
@@ -830,6 +830,19 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
devouredCards = null;
|
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() {
|
public final CardCollectionView getDelved() {
|
||||||
return CardCollection.getView(delvedCards);
|
return CardCollection.getView(delvedCards);
|
||||||
}
|
}
|
||||||
@@ -5152,10 +5165,6 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
currentState.setSVar("Foil", Integer.toString(f));
|
currentState.setSVar("Foil", Integer.toString(f));
|
||||||
}
|
}
|
||||||
|
|
||||||
public final CardCollectionView getDevouredCards() {
|
|
||||||
return CardCollection.getView(devouredCards);
|
|
||||||
}
|
|
||||||
|
|
||||||
public final CardCollectionView getHauntedBy() {
|
public final CardCollectionView getHauntedBy() {
|
||||||
return CardCollection.getView(hauntedBy);
|
return CardCollection.getView(hauntedBy);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1151,7 +1151,7 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
if (sq[0].startsWith("Devoured")) {
|
if (sq[0].startsWith("Devoured")) {
|
||||||
final String validDevoured = l[0].split(" ")[1];
|
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);
|
return doXMath(cl.size(), m, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1394,6 +1394,10 @@ public class CardProperty {
|
|||||||
if (!source.getConvoked().contains(card)) {
|
if (!source.getConvoked().contains(card)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} else if (property.startsWith("exploited")) {
|
||||||
|
if (!source.getExploited().contains(card)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} else if (property.startsWith("unequalPT")) {
|
} else if (property.startsWith("unequalPT")) {
|
||||||
if (card.getNetPower() == card.getNetToughness()) {
|
if (card.getNetPower() == card.getNetToughness()) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
10
forge-gui/res/cardsfolder/upcoming/silumgar_scavenger.txt
Normal file
10
forge-gui/res/cardsfolder/upcoming/silumgar_scavenger.txt
Normal 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.
|
||||||
Reference in New Issue
Block a user