mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Fixed Mana Drain and friends
This commit is contained in:
@@ -1399,7 +1399,16 @@ public class AbilityUtils {
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
if (sq[0].startsWith("TriggerRememberAmount")) {
|
||||
final SpellAbility root = sa.getRootAbility();
|
||||
int count = 0;
|
||||
for (final Object o : root.getTriggerRemembered()) {
|
||||
if (o instanceof Integer) {
|
||||
count += (Integer) o;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
// Count$Compare <int comparator value>.<True>.<False>
|
||||
if (sq[0].startsWith("Compare")) {
|
||||
final String[] compString = sq[0].split(" ");
|
||||
|
||||
@@ -104,6 +104,10 @@ public class CounterEffect extends SpellAbilityEffect {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sa.hasParam("RememberCounteredCMC")) {
|
||||
sa.getHostCard().addRemembered((Integer) tgtSACard.getCMC());
|
||||
}
|
||||
|
||||
this.removeFromStack(tgtSA, sa, si);
|
||||
|
||||
// Destroy Permanent may be able to be turned into a SubAbility
|
||||
|
||||
@@ -58,6 +58,14 @@ public class DelayedTriggerEffect extends SpellAbilityEffect {
|
||||
}
|
||||
}
|
||||
|
||||
if (sa.hasParam("RememberNumber")) {
|
||||
for (final Object o : sa.getHostCard().getRemembered()) {
|
||||
if (o instanceof Integer) {
|
||||
delTrig.addRemembered((Integer) o);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mapParams.containsKey("Execute")) {
|
||||
SpellAbility overridingSA = AbilityFactory.getAbility(sa.getSVar(mapParams.get("Execute")), sa.getHostCard());
|
||||
delTrig.setOverridingAbility(overridingSA);
|
||||
|
||||
@@ -872,6 +872,16 @@ public class CardFactoryUtil {
|
||||
return doXMath(c.getRemembered().size(), m, c);
|
||||
}
|
||||
|
||||
if (l[0].startsWith("RememberedNumber")) {
|
||||
int num = 0;
|
||||
for (final Object o : c.getRemembered()) {
|
||||
if (o instanceof Integer) {
|
||||
num += (Integer) o;
|
||||
}
|
||||
}
|
||||
return doXMath(num, m, c);
|
||||
}
|
||||
|
||||
// Count$CountersAdded <CounterType> <ValidSource>
|
||||
if (l[0].startsWith("CountersAdded")) {
|
||||
final String[] components = l[0].split(" ", 3);
|
||||
|
||||
@@ -2,8 +2,9 @@ Name:Dovescape
|
||||
ManaCost:3 WU WU WU
|
||||
Types:Enchantment
|
||||
T:Mode$ SpellCast | ValidCard$ Card.nonCreature | TriggerZones$ Battlefield | Execute$ TrigCounter | TriggerDescription$ Whenever a player casts a noncreature spell, counter that spell. That player puts X 1/1 white and blue Bird creature tokens with flying onto the battlefield, where X is the spell's converted mana cost.
|
||||
SVar:TrigCounter:AB$ Counter | Cost$ 0 | Defined$ TriggeredSpellAbility | SubAbility$ DBToken
|
||||
SVar:DBToken:DB$ Token | TokenAmount$ X | TokenName$ Bird | TokenTypes$ Creature,Bird | TokenOwner$ TriggeredActivator | TokenColors$ White,Blue | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Flying | References$ X
|
||||
SVar:X:TriggeredCard$CardManaCost
|
||||
SVar:TrigCounter:AB$ Counter | Cost$ 0 | Defined$ TriggeredSpellAbility | RememberCounteredCMC$ True | SubAbility$ DBToken
|
||||
SVar:DBToken:DB$ Token | TokenAmount$ X | TokenName$ Bird | TokenTypes$ Creature,Bird | TokenOwner$ TriggeredActivator | TokenColors$ White,Blue | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Flying | References$ X | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:X:Count$RememberedNumber
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/dovescape.jpg
|
||||
Oracle:({W/U} can be paid with either {W} or {U}.)\nWhenever a player casts a noncreature spell, counter that spell. That player puts X 1/1 white and blue Bird creature tokens with flying onto the battlefield, where X is the spell's converted mana cost.
|
||||
@@ -5,8 +5,9 @@ PT:1/1
|
||||
K:Flash
|
||||
K:Flying
|
||||
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigCounter | TriggerDescription$ When CARDNAME enters the battlefield, counter target spell. Put X +1/+1 counters on CARDNAME, where X is that spell's converted mana cost.
|
||||
SVar:TrigCounter:DB$ Counter | Cost$ 0 | TargetType$ Spell | ValidTgts$ Card | TgtPrompt$ Select target spell | SubAbility$ DBPutcounter
|
||||
SVar:DBPutcounter:DB$ PutCounter | CounterType$ P1P1 | Defined$ Self | CounterNum$ X | References$ X
|
||||
SVar:X:Targeted$CardManaCost
|
||||
SVar:TrigCounter:DB$ Counter | Cost$ 0 | TargetType$ Spell | ValidTgts$ Card | TgtPrompt$ Select target spell | RememberCounteredCMC$ True | SubAbility$ DBPutcounter
|
||||
SVar:DBPutcounter:DB$ PutCounter | CounterType$ P1P1 | Defined$ Self | CounterNum$ X | References$ X | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:X:Count$RememberedNumber
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/draining_whelk.jpg
|
||||
Oracle:Flash (You may cast this spell any time you could cast an instant.)\nFlying\nWhen Draining Whelk enters the battlefield, counter target spell. Put X +1/+1 counters on Draining Whelk, where X is that spell's converted mana cost.
|
||||
@@ -1,9 +1,10 @@
|
||||
Name:Induce Paranoia
|
||||
ManaCost:2 U U
|
||||
Types:Instant
|
||||
A:SP$ Counter | Cost$ 2 U U | TargetType$ Spell | ValidTgts$ Card | SubAbility$ DBMill | SpellDescription$ Counter target spell. If {B} was spent to cast CARDNAME, that spell's controller puts the top X cards of his or her library into his or her graveyard, where X is the spell's converted mana cost.
|
||||
SVar:DBMill:DB$ Mill | NumCards$ X | Defined$ TargetedController | ConditionManaSpent$ B | References$ X
|
||||
SVar:X:Targeted$CardManaCost
|
||||
A:SP$ Counter | Cost$ 2 U U | TargetType$ Spell | ValidTgts$ Card | RememberCounteredCMC$ True | SubAbility$ DBMill | SpellDescription$ Counter target spell. If {B} was spent to cast CARDNAME, that spell's controller puts the top X cards of his or her library into his or her graveyard, where X is the spell's converted mana cost.
|
||||
SVar:DBMill:DB$ Mill | NumCards$ X | Defined$ TargetedController | ConditionManaSpent$ B | References$ X | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:X:Count$RememberedNumber
|
||||
SVar:ManaNeededToAvoidNegativeEffect:black
|
||||
SVar:RemRandomDeck:True
|
||||
DeckNeeds:Color$Black
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
Name:Mana Drain
|
||||
ManaCost:U U
|
||||
Types:Instant
|
||||
A:SP$Counter | Cost$ U U | TargetType$ Spell | RememberCountered$ True | ForgetOtherTargets$ True | ValidTgts$ Card | SubAbility$ DBDelTrig | SpellDescription$ Counter target spell. At the beginning of your next main phase, add {X} to your mana pool, where X is that spell's converted mana cost.
|
||||
SVar:DBDelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ Main1,Main2 | ValidPlayer$ You | Execute$ AddMana | TriggerDescription$ CARDNAME - At the beginning of your next main phase, add X to your mana pool, where X is the countered spell's converted mana cost.
|
||||
A:SP$ Counter | Cost$ U U | TargetType$ Spell | RememberCounteredCMC$ True | ValidTgts$ Card | SubAbility$ DBDelTrig | SpellDescription$ Counter target spell. At the beginning of your next main phase, add {X} to your mana pool, where X is that spell's converted mana cost.
|
||||
SVar:DBDelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ Main1,Main2 | ValidPlayer$ You | Execute$ AddMana | TriggerDescription$ At the beginning of your next main phase, add X to your mana pool, where X is the countered spell's converted mana cost. | RememberNumber$ True | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:AddMana:DB$ Mana | Cost$ 0 | Produced$ 1 | Amount$ X | References$ X
|
||||
SVar:X:Remembered$CardManaCost
|
||||
SVar:X:Count$TriggerRememberAmount
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/mana_drain.jpg
|
||||
Oracle:Counter target spell. At the beginning of your next main phase, add {X} to your mana pool, where X is that spell's converted mana cost.
|
||||
@@ -1,8 +1,9 @@
|
||||
Name:Mystic Genesis
|
||||
ManaCost:2 G U U
|
||||
Types:Instant
|
||||
A:SP$ Counter | Cost$ 2 G U U | TargetType$ Spell | RememberCountered$ True | ForgetOtherTargets$ True | ValidTgts$ Card | SubAbility$ DBToken | SpellDescription$ Counter target spell. Put an X/X green Ooze creature token onto the battlefield, where X is that spell's converted mana cost.
|
||||
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Ooze | TokenTypes$ Creature,Ooze | TokenOwner$ You | TokenColors$ Green | TokenPower$ X | TokenToughness$ X | References$ X
|
||||
SVar:X:Remembered$CardManaCost
|
||||
A:SP$ Counter | Cost$ 2 G U U | TargetType$ Spell | RememberCounteredCMC$ True | ValidTgts$ Card | SubAbility$ DBToken | SpellDescription$ Counter target spell. Put an X/X green Ooze creature token onto the battlefield, where X is that spell's converted mana cost.
|
||||
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Ooze | TokenTypes$ Creature,Ooze | TokenOwner$ You | TokenColors$ Green | TokenPower$ X | TokenToughness$ X | References$ X | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:X:Count$RememberedNumber
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/mystic_genesis.jpg
|
||||
Oracle:Counter target spell. Put an X/X green Ooze creature token onto the battlefield, where X is that spell's converted mana cost.
|
||||
@@ -1,9 +1,10 @@
|
||||
Name:Plasm Capture
|
||||
ManaCost:G G U U
|
||||
Types:Instant
|
||||
A:SP$ Counter | Cost$ G G U U | TargetType$ Spell | RememberCountered$ True | ForgetOtherTargets$ True | ValidTgts$ Card | SubAbility$ DBDelTrig | SpellDescription$ Counter target spell. At the beginning of your next precombat main phase, add X mana in any combination of colors to your mana pool, where X is that spell's converted mana cost.
|
||||
SVar:DBDelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | Execute$ AddMana | TriggerDescription$ CARDNAME - At the beginning of your next precombat main phase, aadd X mana in any combination of colors to your mana pool, where X is that spell's converted mana cost.
|
||||
A:SP$ Counter | Cost$ G G U U | TargetType$ Spell | RememberCounteredCMC$ True | ValidTgts$ Card | SubAbility$ DBDelTrig | SpellDescription$ Counter target spell. At the beginning of your next precombat main phase, add X mana in any combination of colors to your mana pool, where X is that spell's converted mana cost.
|
||||
SVar:DBDelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | Execute$ AddMana | TriggerDescription$ CARDNAME - At the beginning of your next precombat main phase, aadd X mana in any combination of colors to your mana pool, where X is that spell's converted mana cost. | RememberNumber$ True | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:AddMana:DB$ Mana | Cost$ 0 | Produced$ Combo Any | Amount$ X | References$ X | AILogic$ MostProminentInComputerHand
|
||||
SVar:X:Remembered$CardManaCost
|
||||
SVar:X:Count$TriggerRememberAmount
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/plasm_capture.jpg
|
||||
Oracle:Counter target spell. At the beginning of your next precombat main phase, add X mana in any combination of colors to your mana pool, where X is that spell's converted mana cost.
|
||||
Reference in New Issue
Block a user