- Commander Storm cards

This commit is contained in:
swordshine
2018-10-09 20:51:00 +08:00
parent 747aca4342
commit 68de368c46
8 changed files with 57 additions and 6 deletions

View File

@@ -843,6 +843,10 @@ public class CardFactoryUtil {
return doXMath(cc.getCommanderCast(c), m, c);
}
if (l[0].startsWith("TotalCommanderCastFromCommandZone")) {
return doXMath(cc.getTotalCommanderCast(), m, c);
}
if (l[0].startsWith("MostProminentCreatureType")) {
String restriction = l[0].split(" ")[1];
CardCollection list = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), restriction, cc, c);

View File

@@ -2665,6 +2665,14 @@ public class Player extends GameEntity implements Comparable<Player> {
commanderCast.put(commander, getCommanderCast(commander) + 1);
}
public int getTotalCommanderCast() {
int result = 0;
for (Integer i : commanderCast.values()) {
result += i;
}
return result;
}
public boolean isPlayingExtraTurn() {
return isPlayingExtraTrun;
}

View File

@@ -368,7 +368,8 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
// Run SpellCast triggers
if (sp.isSpell()) {
if (source.isCommander() && (ZoneType.Command == source.getCastFrom())) {
if (source.isCommander() && (ZoneType.Command == source.getCastFrom())
&& source.getOwner().equals(activator)) {
activator.incCommanderCast(source);
}
game.getTriggerHandler().runTrigger(TriggerType.SpellCast, runParams, true);

View File

@@ -0,0 +1,9 @@
Name:Echo Storm
ManaCost:3 U U
Types:Sorcery
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigCopy | TriggerDescription$ When you cast this spell, copy it for each time you've cast your commander from the command zone this game.
SVar:TrigCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | Amount$ X | References$ X
SVar:X:Count$TotalCommanderCastFromCommandZone
A:SP$ CopyPermanent | Cost$ 3 U U | ValidTgts$ Artifact | TgtPrompt$ Select target artifact. | SpellDescription$ Create a token that's a copy of target artifact.
DeckHas:Ability$Token
Oracle:When you cast this spell, copy it for each time you've cast your commander from the command zone this game. You may choose new targets for the copies.\nCreate a token that's a copy of target artifact.

View File

@@ -1,9 +1,9 @@
Name:Empyrial Storm
ManaCost:4 W W
Types:Sorcery
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigCopy | TriggerDescription$ When you cast CARDNAME, copy it for each time you've cast your commander from the command zone this game.
SVar:TrigCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility
SVar:X:Count$CommanderCastFromCommandZone
A:SP$ Token | Cost$ 4 W W | TokenAmount$ 1 | TokenName$ Angel | TokenTypes$ Creature,Angel | TokenOwner$ You | TokenColors$ White | TokenPower$ 4 | TokenToughness$ 4 | TokenKeywords$ Flying | TokenImage$ w 4 4 angel gtc | SpellDescription$ Create a 4/4 white Angel creature token with flying.
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigCopy | TriggerDescription$ When you cast this spell, copy it for each time you've cast your commander from the command zone this game.
SVar:TrigCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | Amount$ X | References$ X
SVar:X:Count$TotalCommanderCastFromCommandZone
A:SP$ Token | Cost$ 4 W W | TokenAmount$ 1 | TokenName$ Angel | TokenTypes$ Creature,Angel | TokenOwner$ You | TokenColors$ White | TokenPower$ 4 | TokenToughness$ 4 | TokenKeywords$ Flying | TokenImage$ w 4 4 angel c18 | SpellDescription$ Create a 4/4 white Angel creature token with flying.
DeckHas:Ability$Token
Oracle:When you cast this spell, copy it for each time you've cast your commander from the command zone this game.\nCreate a 4/4 white Angel creature token with flying.

View File

@@ -0,0 +1,8 @@
Name:Fury Storm
ManaCost:2 R R
Types:Instant
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigCopy | TriggerDescription$ When you cast this spell, copy it for each time you've cast your commander from the command zone this game.
SVar:TrigCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | Amount$ X | References$ X
SVar:X:Count$TotalCommanderCastFromCommandZone
A:SP$ CopySpellAbility | Cost$ 2 R R | ValidTgts$ Instant,Sorcery | TargetType$ Spell | SpellDescription$ Copy target instant or sorcery spell. You may choose new targets for the copy.
Oracle:When you cast this spell, copy it for each time you've cast your commander from the command zone this game. You may choose new targets for the copies.\nCopy target instant or sorcery spell. You may choose new targets for the copy.

View File

@@ -0,0 +1,8 @@
Name:Genesis Storm
ManaCost:4 G G
Types:Sorcery
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigCopy | TriggerDescription$ When you cast this spell, copy it for each time you've cast your commander from the command zone this game.
SVar:TrigCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | Amount$ X | References$ X
SVar:X:Count$TotalCommanderCastFromCommandZone
A:SP$ DigUntil | Cost$ 4 G G | Valid$ Permanent.nonland | ValidDescription$ nonland permanent | FoundDestination$ Battlefield | RevealedDestination$ Library | RevealedLibraryPosition$ -1 | RevealRandomOrder$ True | SpellDescription$ Reveal cards from the top of your library until you reveal a nonland permanent card. You may put that card onto the battlefield. Then put all cards revealed this way that weren't put onto the battlefield on the bottom of your library in a random order.
Oracle:When you cast this spell, copy it for each time you've cast your commander from the command zone this game. You may choose new targets for the copies.\nReveal cards from the top of your library until you reveal a nonland permanent card. You may put that card onto the battlefield. Then put all cards revealed this way that weren't put onto the battlefield on the bottom of your library in a random order.

View File

@@ -0,0 +1,13 @@
Name:Skull Storm
ManaCost:7 B B
Types:Sorcery
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigCopy | TriggerDescription$ When you cast this spell, copy it for each time you've cast your commander from the command zone this game.
SVar:TrigCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | Amount$ X | References$ X
SVar:X:Count$TotalCommanderCastFromCommandZone
A:SP$ Sacrifice | Cost$ 7 B B | Defined$ Player.Opponent | SacValid$ Creature | RememberSacrificed$ True | SubAbility$ DBRepeatEach
SVar:DBRepeatEach:DB$ RepeatEach | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ DBLoseLife | SubAbility$ DBCleanup
SVar:DBLoseLife:DB$ LoseLife | Defined$ Player.IsRemembered | LifeAmount$ Y | References$ Z,Y | ConditionCheckSVar$ Z | ConditionSVarCompare$ EQ0 | References$ Z
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Y:PlayerCountRemembered$LifeTotal/HalfUp
SVar:Z:RememberedLKI$Valid Card.RememberedPlayerCtrl
Oracle:When you cast this spell, copy it for each time you've cast your commander from the command zone this game. You may choose new targets for the copies.\nEach opponent sacrifices a creature. Each opponent who can't loses half their life, rounded up.