mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
TriggerSpellAbilityCast: extra flag for spent Snow shares color with card
This commit is contained in:
@@ -23,6 +23,7 @@ import java.util.Set;
|
|||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
|
import forge.card.ColorSet;
|
||||||
import forge.game.Game;
|
import forge.game.Game;
|
||||||
import forge.game.GameEntity;
|
import forge.game.GameEntity;
|
||||||
import forge.game.GameObject;
|
import forge.game.GameObject;
|
||||||
@@ -32,6 +33,7 @@ import forge.game.card.CardCollection;
|
|||||||
import forge.game.card.CardLists;
|
import forge.game.card.CardLists;
|
||||||
import forge.game.card.CardUtil;
|
import forge.game.card.CardUtil;
|
||||||
import forge.game.cost.Cost;
|
import forge.game.cost.Cost;
|
||||||
|
import forge.game.mana.Mana;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
import forge.game.spellability.SpellAbilityStackInstance;
|
import forge.game.spellability.SpellAbilityStackInstance;
|
||||||
@@ -261,6 +263,22 @@ public class TriggerSpellAbilityCast extends Trigger {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hasParam("SnowSpentForCardsColor")) {
|
||||||
|
boolean found = false;
|
||||||
|
for (Mana m : spellAbility.getPayingMana()) {
|
||||||
|
if (!m.isSnow()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (cast.determineColor().sharesColorWith(ColorSet.fromMask(m.getColor()))) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
13
forge-gui/res/cardsfolder/upcoming/boreal_outrider.txt
Normal file
13
forge-gui/res/cardsfolder/upcoming/boreal_outrider.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
Name:Boreal Outrider
|
||||||
|
ManaCost:2 G
|
||||||
|
Types:Snow Creature Elf Warrior
|
||||||
|
PT:3/2
|
||||||
|
T:Mode$ SpellCast | ValidCard$ Creature | ValidActivatingPlayer$ You | Execute$ TrigEffect | TriggerZones$ Battlefield | SnowSpentForCardsColor$ True | TriggerDescription$ Whenever you cast a creature spell, if {S} of any of that spell’s colors was spent to cast it, that creature enters the battlefield with an additional +1/+1 counter on it. ({S} is mana from a snow source.)
|
||||||
|
SVar:TrigEffect:DB$ Effect | RememberObjects$ TriggeredCard | ReplacementEffects$ ETBCreat | SVars$ DBPutP1P1,ToBattlefield,DBExile | References$ ETBCreat,DBPutP1P1,ToBattlefield,DBExile
|
||||||
|
SVar:ETBCreat:Event$ Moved | ValidCard$ Card.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBPutP1P1 | Description$ That creature enters the battlefield with an additional +1/+1 counter on it.
|
||||||
|
SVar:DBPutP1P1:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ P1P1 | ETB$ True | CounterNum$ 1 | SubAbility$ ToBattlefield
|
||||||
|
SVar:ToBattlefield:DB$ InternalEtbReplacement | SubAbility$ DBExile
|
||||||
|
SVar:DBExile:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
|
||||||
|
DeckHints:Type$Snow
|
||||||
|
DeckHas:Ability$Counters
|
||||||
|
Oracle:Whenever you cast a creature spell, if {S} of any of that spell’s colors was spent to cast it, that creature enters the battlefield with an additional +1/+1 counter on it. ({S} is mana from a snow source.)
|
||||||
Reference in New Issue
Block a user