mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
*Added Radiance parameter to AF_Destroy.
*Converted Leave No Trace to Radiance parameter.
This commit is contained in:
@@ -2,9 +2,7 @@ Name:Leave No Trace
|
||||
ManaCost:1 W
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$ Destroy | Cost$ 1 W | ValidTgts$ Enchantment | TgtPrompt$ Select target enchantment | SubAbility$ SVar=DBDestroyAll | RememberTargets$ True | ForgetOtherTargets$ True | SpellDescription$ Radiance - Destroy target enchantment and each other enchantment that shares a color with it.
|
||||
SVar:DBDestroyAll:DB$DestroyAll | ValidCards$ Remembered.Enchantment+Other+SharesColorWith | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True
|
||||
A:SP$ Destroy | Cost$ 1 W | ValidTgts$ Enchantment | TgtPrompt$ Select target enchantment | Radiance$ True | SpellDescription$ Radiance - Destroy target enchantment and each other enchantment that shares a color with it.
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/leave_no_trace.jpg
|
||||
|
||||
@@ -389,6 +389,7 @@ public class AbilityFactory_Destroy {
|
||||
Card card = sa.getSourceCard();
|
||||
|
||||
ArrayList<Card> tgtCards;
|
||||
ArrayList<Card> untargetedCards = new ArrayList<Card>();
|
||||
|
||||
Target tgt = af.getAbTgt();
|
||||
if (tgt != null)
|
||||
@@ -397,6 +398,12 @@ public class AbilityFactory_Destroy {
|
||||
tgtCards = AbilityFactory.getDefinedCards(sa.getSourceCard(), params.get("Defined"), sa);
|
||||
}
|
||||
|
||||
if(params.containsKey("Radiance")) {
|
||||
for(Card c : CardUtil.getRadiance(af.getHostCard(), tgtCards.get(0), params.get("ValidTgts").split(","))) {
|
||||
untargetedCards.add(c);
|
||||
}
|
||||
}
|
||||
|
||||
for (Card tgtC : tgtCards) {
|
||||
if (AllZoneUtil.isCardInPlay(tgtC) && (tgt == null || CardFactoryUtil.canTarget(card, tgtC))) {
|
||||
if (noRegen)
|
||||
@@ -405,6 +412,15 @@ public class AbilityFactory_Destroy {
|
||||
AllZone.getGameAction().destroy(tgtC);
|
||||
}
|
||||
}
|
||||
|
||||
for(Card unTgtC : untargetedCards) {
|
||||
if(AllZoneUtil.isCardInPlay(unTgtC)) {
|
||||
if(noRegen)
|
||||
AllZone.getGameAction().destroyNoRegeneration(unTgtC);
|
||||
else
|
||||
AllZone.getGameAction().destroy(unTgtC);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// *********************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user