Draft: flitting_guerrilla.txt (#2874)

* flitting_guerrilla.txt + support
This commit is contained in:
Northmoc
2023-04-10 06:06:27 -04:00
committed by GitHub
parent 5dc5bc3bfb
commit 7dd991ab93
2 changed files with 16 additions and 2 deletions

View File

@@ -1961,7 +1961,8 @@ public class CardProperty {
} else if (property.startsWith("Triggered")) { } else if (property.startsWith("Triggered")) {
if (spellAbility instanceof SpellAbility) { if (spellAbility instanceof SpellAbility) {
final String key = property.substring(9); 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; boolean found = false;
if (o != null) { if (o != null) {
if (o instanceof CardCollection) { if (o instanceof CardCollection) {
@@ -1979,7 +1980,8 @@ public class CardProperty {
} else if (property.startsWith("NotTriggered")) { } else if (property.startsWith("NotTriggered")) {
final String key = property.substring("NotTriggered".length()); final String key = property.substring("NotTriggered".length());
if (spellAbility instanceof SpellAbility) { 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; return false;
} }
} else { } else {

View File

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