- Convert Permanent Multikickers to Script

This commit is contained in:
Sol
2013-02-09 03:00:09 +00:00
parent c93c57b60f
commit 3d2d6eb5b2
9 changed files with 28 additions and 169 deletions

View File

@@ -1,10 +1,13 @@
Name:Apex Hawks Name:Apex Hawks
ManaCost:2 W ManaCost:2 W
Types:Creature Bird Types:Creature Bird
Text:Apex Hawks enters the battlefield with a +1/+1 counter on it for each time it was kicked. Text:no text
PT:2/2 PT:2/2
K:Flying K:Flying
K:Multikicker 1 W K:Multikicker 1 W
K:ETBReplacement:Other:Multikicked
SVar:Multikicked:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ XKicked | SpellDescription$ CARDNAME enters the battlefield with a +1/+1 counter on it for each time it was kicked.
SVar:XKicked:Count$TimesKicked
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/apex_hawks.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/apex_hawks.jpg
SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/2.jpg SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/2.jpg

View File

@@ -1,10 +1,13 @@
Name:Enclave Elite Name:Enclave Elite
ManaCost:2 U ManaCost:2 U
Types:Creature Merfolk Soldier Types:Creature Merfolk Soldier
Text:Enclave Elite enters the battlefield with a +1/+1 counter on it for each time it was kicked. Text:no text
PT:2/2 PT:2/2
K:Islandwalk K:Islandwalk
K:Multikicker 1 U K:Multikicker 1 U
K:ETBReplacement:Other:Multikicked
SVar:Multikicked:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ XKicked | SpellDescription$ CARDNAME enters the battlefield with a +1/+1 counter on it for each time it was kicked.
SVar:XKicked:Count$TimesKicked
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/enclave_elite.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/enclave_elite.jpg
SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/27.jpg SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/27.jpg

View File

@@ -1,10 +1,13 @@
Name:Everflowing Chalice Name:Everflowing Chalice
ManaCost:0 ManaCost:0
Types:Artifact Types:Artifact
Text:Everflowing Chalice enters the battlefield with a charge counter on it for each time it was kicked. Text:
K:Multikicker 2 K:Multikicker 2
K:ETBReplacement:Other:Multikicked
SVar:Multikicked:DB$ PutCounter | Defined$ Self | CounterType$ Charge | CounterNum$ XKicked | SpellDescription$ Everflowing Chalice enters the battlefield with a charge counter on it for each time it was kicked.
A:AB$ Mana | Cost$ T | Produced$ 1 | Amount$ X | References$ X | SpellDescription$ Add 1 to your mana pool for each charge counter on CARDNAME. A:AB$ Mana | Cost$ T | Produced$ 1 | Amount$ X | References$ X | SpellDescription$ Add 1 to your mana pool for each charge counter on CARDNAME.
SVar:X:Count$CardCounters.CHARGE SVar:X:Count$CardCounters.CHARGE
SVar:XKicked:Count$TimesKicked
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/everflowing_chalice.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/everflowing_chalice.jpg

View File

@@ -1,9 +1,12 @@
Name:Gnarlid Pack Name:Gnarlid Pack
ManaCost:1 G ManaCost:1 G
Types:Creature Beast Types:Creature Beast
Text:Gnarlid Pack enters the battlefield with a +1/+1 counter on it for each time it was kicked. Text:no text
PT:2/2 PT:2/2
K:Multikicker 1 G K:Multikicker 1 G
K:ETBReplacement:Other:Multikicked
SVar:Multikicked:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ XKicked | SpellDescription$ CARDNAME enters the battlefield with a +1/+1 counter on it for each time it was kicked.
SVar:XKicked:Count$TimesKicked
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/gnarlid_pack.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/gnarlid_pack.jpg
SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/101.jpg SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/101.jpg

View File

@@ -1,11 +1,14 @@
Name:Joraga Warcaller Name:Joraga Warcaller
ManaCost:G ManaCost:G
Types:Creature Elf Warrior Types:Creature Elf Warrior
Text:Joraga Warcaller enters the battlefield with a +1/+1 counter on it for each time it was kicked. Text:no text
PT:1/1 PT:1/1
K:Multikicker 1 G K:Multikicker 1 G
K:ETBReplacement:Other:Multikicked
SVar:Multikicked:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ XKicked | SpellDescription$ CARDNAME enters the battlefield with a +1/+1 counter on it for each time it was kicked.
S:Mode$ Continuous | Affected$ Creature.Elf+Other+YouCtrl | AddPower$ X | AddToughness$ X | Description$ Other Elf creatures you control get +1/+1 for each +1/+1 counter on CARDNAME. S:Mode$ Continuous | Affected$ Creature.Elf+Other+YouCtrl | AddPower$ X | AddToughness$ X | Description$ Other Elf creatures you control get +1/+1 for each +1/+1 counter on CARDNAME.
SVar:X:Count$CardCounters.P1P1 SVar:X:Count$CardCounters.P1P1
SVar:XKicked:Count$TimesKicked
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/joraga_warcaller.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/joraga_warcaller.jpg

View File

@@ -1,10 +1,13 @@
Name:Quag Vampires Name:Quag Vampires
ManaCost:B ManaCost:B
Types:Creature Vampire Rogue Types:Creature Vampire Rogue
Text:Quag Vampires enters the battlefield with a +1/+1 counter on it for each time it was kicked. Text:no text
PT:1/1 PT:1/1
K:Swampwalk K:Swampwalk
K:Multikicker 1 B K:Multikicker 1 B
K:ETBReplacement:Other:Multikicked
SVar:Multikicked:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ XKicked | SpellDescription$ CARDNAME enters the battlefield with a +1/+1 counter on it for each time it was kicked.
SVar:XKicked:Count$TimesKicked
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/quag_vampires.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/quag_vampires.jpg
SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/63.jpg SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/63.jpg

View File

@@ -1,10 +1,13 @@
Name:Skitter of Lizards Name:Skitter of Lizards
ManaCost:R ManaCost:R
Types:Creature Lizard Types:Creature Lizard
Text:Skitter of Lizards enters the battlefield with a +1/+1 counter on it for each time it was kicked. Text:no text
PT:1/1 PT:1/1
K:Haste K:Haste
K:Multikicker 1 R K:Multikicker 1 R
K:ETBReplacement:Other:Multikicked
SVar:Multikicked:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ XKicked | SpellDescription$ CARDNAME enters the battlefield with a +1/+1 counter on it for each time it was kicked.
SVar:XKicked:Count$TimesKicked
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/skitter_of_lizards.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/skitter_of_lizards.jpg
SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/91.jpg SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/91.jpg

View File

@@ -107,20 +107,6 @@ class CardFactoryArtifacts {
card.addSpellAbility(ab1); card.addSpellAbility(ab1);
} // *************** END ************ END ************************** } // *************** END ************ END **************************
// *************** START *********** START **************************
else if (cardName.equals("Everflowing Chalice")) {
final Command comesIntoPlay = new Command() {
private static final long serialVersionUID = 4245563898487609274L;
@Override
public void execute() {
card.addCounter(CounterType.CHARGE, card.getMultiKickerMagnitude(), true);
card.setMultiKickerMagnitude(0);
}
};
card.addComesIntoPlayCommand(comesIntoPlay);
} // *************** END ************ END **************************
// *************** START *********** START ************************** // *************** START *********** START **************************
else if (cardName.equals("Scroll Rack")) { else if (cardName.equals("Scroll Rack")) {
class AbilityScrollRack extends AbilityActivated { class AbilityScrollRack extends AbilityActivated {
@@ -211,125 +197,5 @@ class CardFactoryArtifacts {
ability.setStackDescription(sbStack.toString()); ability.setStackDescription(sbStack.toString());
card.addSpellAbility(ability); card.addSpellAbility(ability);
} // *************** END ************ END ************************** } // *************** END ************ END **************************
// *************** START *********** START **************************
else if (cardName.equals("Temporal Aperture")) {
/*
* 5, Tap: Shuffle your library, then reveal the top card. Until end
* of turn, for as long as that card remains on top of your library,
* play with the top card of your library revealed and you may play
* that card without paying its mana cost. (If it has X in its mana
* cost, X is 0.)
*/
final Card[] topCard = new Card[1];
final Ability freeCast = new Ability(card, SpellManaCost.ZERO) {
@Override
public boolean canPlay() {
final PlayerZone lib = card.getController().getZone(ZoneType.Library);
return super.canPlay() && ((lib.size() > 0) && lib.get(0).equals(topCard[0]));
}
@Override
public void resolve() {
final Card freeCard = topCard[0];
final Player player = card.getController();
if (freeCard != null) {
if (freeCard.isLand()) {
if (player.canPlayLand()) {
player.playLand(freeCard);
} else {
JOptionPane.showMessageDialog(null, "You can't play any more lands this turn.", "",
JOptionPane.INFORMATION_MESSAGE);
}
} else {
Singletons.getModel().getGame().getActionPlay().playCardWithoutManaCost(freeCard, player);
}
} else {
final StringBuilder sb = new StringBuilder();
sb.append("Error in ").append(cardName).append(". freeCard is null");
JOptionPane.showMessageDialog(null, sb.toString(), "", JOptionPane.INFORMATION_MESSAGE);
}
}
@Override
public boolean canPlayAI() {
return false;
}
};
freeCast.setDescription("Play the previously revealed top card of your library for free.");
final StringBuilder sb = new StringBuilder();
sb.append(cardName).append(" - play card without paying its mana cost.");
freeCast.setStackDescription(sb.toString());
class AbilityTemporalAperture extends AbilityActivated {
public AbilityTemporalAperture(final Card ca, final Cost co, final Target t) {
super(ca, co, t);
}
@Override
public AbilityActivated getCopy() {
AbilityActivated res = new AbilityTemporalAperture(getSourceCard(),
getPayCosts(), getTarget() == null ? null : new Target(getTarget()));
CardFactoryUtil.copySpellAbility(this, res);
return res;
}
private static final long serialVersionUID = -7328518969488588777L;
@Override
public void resolve() {
final PlayerZone lib = card.getController().getZone(ZoneType.Library);
if (lib.size() > 0) {
// shuffle your library
card.getController().shuffle();
// reveal the top card
topCard[0] = lib.get(0);
final StringBuilder sb = new StringBuilder();
sb.append("Revealed card:\n").append(topCard[0].getName());
JOptionPane.showMessageDialog(null, sb.toString(), card.getName(), JOptionPane.PLAIN_MESSAGE);
card.addSpellAbility(freeCast);
card.addExtrinsicKeyword("Play with the top card of your library revealed.");
Singletons.getModel().getGame().getEndOfTurn().addUntil(new Command() {
private static final long serialVersionUID = -2860753262177388046L;
@Override
public void execute() {
card.removeSpellAbility(freeCast);
card.removeExtrinsicKeyword("Play with the top card of your library revealed.");
}
});
}
} // resolve
@Override
public boolean canPlayAI() {
return false;
}
}
final Cost abCost = new Cost(card, "5 T", true);
final AbilityActivated ability = new AbilityTemporalAperture(card, abCost, null);
final StringBuilder sbStack = new StringBuilder();
sbStack.append(card).append(" - Shuffle your library, then reveal the top card.");
ability.setStackDescription(sbStack.toString());
final StringBuilder sbDesc = new StringBuilder();
sbDesc.append(abCost).append("Shuffle your library, then reveal the top card. ");
sbDesc.append("Until end of turn, for as long as that card remains on top of your ");
sbDesc.append("library, play with the top card of your library revealed ");
sbDesc.append("and you may play that card without paying its mana cost. ");
sbDesc.append("(If it has X in its mana cost, X is 0.)");
ability.setDescription(sbDesc.toString());
card.addSpellAbility(ability);
} // *************** END ************ END **************************
} }
} }

View File

@@ -397,31 +397,6 @@ public class CardFactoryCreatures {
card.addDestroyCommand(destroy); card.addDestroyCommand(destroy);
} }
private static void getCard_MultikickerP1P1(final Card card, final String cardName) {
final AbilityStatic ability = new AbilityStatic(card, SpellManaCost.ZERO) {
@Override
public void resolve() {
card.addCounter(CounterType.P1P1, card.getMultiKickerMagnitude(), true);
card.setMultiKickerMagnitude(0);
}
};
final StringBuilder sb = new StringBuilder();
sb.append(cardName);
sb.append(" enters the battlefield with a +1/+1 counter ");
sb.append("on it for each time it was kicked.");
ability.setStackDescription(sb.toString());
final Command comesIntoPlay = new Command() {
private static final long serialVersionUID = 4245563898487609274L;
@Override
public void execute() {
Singletons.getModel().getGame().getStack().addSimultaneousStackEntry(ability);
}
};
card.addComesIntoPlayCommand(comesIntoPlay);
}
private static void getCard_SurturedGhoul(final Card card) { private static void getCard_SurturedGhoul(final Card card) {
final int[] numCreatures = new int[1]; final int[] numCreatures = new int[1];
final int[] sumPower = new int[1]; final int[] sumPower = new int[1];
@@ -759,9 +734,6 @@ public class CardFactoryCreatures {
getCard_ApocalypseHydra(card); getCard_ApocalypseHydra(card);
} else if (cardName.equals("Kinsbaile Borderguard")) { } else if (cardName.equals("Kinsbaile Borderguard")) {
getCard_KinsbaileBorderguard(card); getCard_KinsbaileBorderguard(card);
} else if (cardName.equals("Gnarlid Pack") || cardName.equals("Apex Hawks") || cardName.equals("Enclave Elite")
|| cardName.equals("Quag Vampires") || cardName.equals("Skitter of Lizards") || cardName.equals("Joraga Warcaller")) {
getCard_MultikickerP1P1(card, cardName);
} else if (cardName.equals("Sutured Ghoul")) { } else if (cardName.equals("Sutured Ghoul")) {
getCard_SurturedGhoul(card); getCard_SurturedGhoul(card);
} else if (cardName.equals("Phyrexian Dreadnought")) { } else if (cardName.equals("Phyrexian Dreadnought")) {