From 7dd991ab93f8e1633cfc33744ee357666ed2a68c Mon Sep 17 00:00:00 2001 From: Northmoc <103371817+Northmoc@users.noreply.github.com> Date: Mon, 10 Apr 2023 06:06:27 -0400 Subject: [PATCH] Draft: flitting_guerrilla.txt (#2874) * flitting_guerrilla.txt + support --- .../src/main/java/forge/game/card/CardProperty.java | 6 ++++-- .../res/cardsfolder/upcoming/flitting_guerrilla.txt | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/flitting_guerrilla.txt 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 2a444e70bd4..e31060bf6eb 100644 --- a/forge-game/src/main/java/forge/game/card/CardProperty.java +++ b/forge-game/src/main/java/forge/game/card/CardProperty.java @@ -1961,7 +1961,8 @@ public class CardProperty { } else if (property.startsWith("Triggered")) { if (spellAbility instanceof SpellAbility) { final String key = property.substring(9); - Object o = ((SpellAbility)spellAbility).getTriggeringObject(AbilityKey.fromString(key)); + SpellAbility sa = (SpellAbility) spellAbility; + Object o = sa.getRootAbility().getTriggeringObject(AbilityKey.fromString(key)); boolean found = false; if (o != null) { if (o instanceof CardCollection) { @@ -1979,7 +1980,8 @@ public class CardProperty { } else if (property.startsWith("NotTriggered")) { final String key = property.substring("NotTriggered".length()); if (spellAbility instanceof SpellAbility) { - if (card.equals(((SpellAbility)spellAbility).getTriggeringObject(AbilityKey.fromString(key)))) { + SpellAbility sa = (SpellAbility) spellAbility; + if (card.equals(sa.getRootAbility().getTriggeringObject(AbilityKey.fromString(key)))) { return false; } } else { diff --git a/forge-gui/res/cardsfolder/upcoming/flitting_guerrilla.txt b/forge-gui/res/cardsfolder/upcoming/flitting_guerrilla.txt new file mode 100644 index 00000000000..82b18331e50 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/flitting_guerrilla.txt @@ -0,0 +1,12 @@ +Name:Flitting Guerrilla +ManaCost:2 B +Types:Creature Faerie Rogue +PT:2/2 +K:Flying +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigMill | TriggerDescription$ When CARDNAME dies, each player mills two cards. Then you may exile CARDNAME. When you do, put target creature or battle card from your graveyard on top of your library. (To mill two cards, a player puts the top two cards of their library into their graveyard.) +SVar:TrigMill:DB$ Mill | Defined$ Player | NumCards$ 2 | SubAbility$ DBImmediateTrig +SVar:DBImmediateTrig:DB$ ImmediateTrigger | Execute$ TrigChangeZone | UnlessCost$ ExileAnyGrave<1/Card.TriggeredNewCard> | UnlessPayer$ You | UnlessSwitched$ True | TriggerDescription$ Then you may exile CARDNAME. When you do, put target creature or battle card from your graveyard on top of your library. +SVar:TrigChangeZone:DB$ ChangeZone | ValidTgts$ Creature.YouOwn,Battle.YouOwn | TgtPrompt$ Select target creature or battle card from your graveyard | Origin$ Graveyard | Destination$ Library | LibraryPosition$ 0 +DeckHas:Ability$Mill|Graveyard +DeckHints:Type$Battle +Oracle:Flying\nWhen Flitting Guerrilla dies, each player mills two cards. Then you may exile Flitting Guerrilla. When you do, put target creature or battle card from your graveyard on top of your library. (To mill two cards, a player puts the top two cards of their library into their graveyard.)