- Converted Sound the Call to script

This commit is contained in:
moomarc
2013-02-04 11:02:56 +00:00
parent 3d9049341a
commit e4fd7f75f7
3 changed files with 4 additions and 34 deletions

View File

@@ -1,8 +1,10 @@
Name:Sound the Call Name:Sound the Call
ManaCost:2 G ManaCost:2 G
Types:Sorcery Types:Sorcery
Text:Put a 1/1 green Wolf creature token onto the battlefield. It has "This creature gets +1/+1 for each card named Sound the Call in each graveyard." Text:no text
A:SP$ Token | Cost$ 2 G | TokenAmount$ 1 | TokenName$ Wolf | TokenTypes$ Creature,Wolf | TokenOwner$ You | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ This creature gets +1/+1 for each card named Sound the Call in each graveyard. A:SP$ Token | Cost$ 2 G | TokenAmount$ 1 | TokenName$ Wolf | TokenTypes$ Creature,Wolf | TokenOwner$ You | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | TokenStaticAbilities$ StaticCall | TokenSVars$ CallCount | SpellDescription$ Put a 1/1 green Wolf creature token onto the battlefield. It has "This creature gets +1/+1 for each card named Sound the Call in each graveyard."
SVar:StaticCall:Mode$ Continuous | Affected$ Card.Self | AddPower$ CallCount | AddToughness$ CallCount | EffectZone$ Battlefield | Description$ This creature gets +1/+1 for each card named Sound the Call in each graveyard.
SVar:CallCount:Count$ValidGraveyard Card.namedSound the Call
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/sound_the_call.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/sound_the_call.jpg
SetInfo:CSP|Common|http://magiccards.info/scans/en/cs/123.jpg SetInfo:CSP|Common|http://magiccards.info/scans/en/cs/123.jpg

View File

@@ -1096,36 +1096,6 @@ public final class GameActionUtil {
}; // Liu_Bei }; // Liu_Bei
/** Constant <code>soundTheCallWolf</code>. */
private static Command soundTheCallWolf = new Command() {
private static final long serialVersionUID = 4614281706799537283L;
@Override
public void execute() {
List<Card> list = Singletons.getModel().getGame().getCardsIn(ZoneType.Battlefield);
list = CardLists.filter(list, new Predicate<Card>() {
@Override
public boolean apply(final Card c) {
return c.getName().equals("Wolf")
&& c.hasKeyword("This creature gets +1/+1 for each card "
+ "named Sound the Call in each graveyard.");
}
});
for (int i = 0; i < list.size(); i++) {
final Card c = list.get(i);
c.setBaseAttack(1 + this.countSoundTheCalls());
c.setBaseDefense(c.getBaseAttack());
}
}
private int countSoundTheCalls() {
List<Card> list = CardLists.filter(Singletons.getModel().getGame().getCardsIn(ZoneType.Graveyard), CardPredicates.nameEquals("Sound the Call"));
return list.size();
}
}; // sounTheCallWolf
/** Constant <code>Tarmogoyf</code>. */ /** Constant <code>Tarmogoyf</code>. */
private static Command tarmogoyf = new Command() { private static Command tarmogoyf = new Command() {
private static final long serialVersionUID = 5895665460018262987L; private static final long serialVersionUID = 5895665460018262987L;
@@ -1214,7 +1184,6 @@ public final class GameActionUtil {
GameActionUtil.getCommands().put("Liu_Bei", GameActionUtil.liuBei); GameActionUtil.getCommands().put("Liu_Bei", GameActionUtil.liuBei);
GameActionUtil.getCommands().put("Old_Man_of_the_Sea", GameActionUtil.oldManOfTheSea); GameActionUtil.getCommands().put("Old_Man_of_the_Sea", GameActionUtil.oldManOfTheSea);
GameActionUtil.getCommands().put("Sound_the_Call_Wolf", GameActionUtil.soundTheCallWolf);
GameActionUtil.getCommands().put("Tarmogoyf", GameActionUtil.tarmogoyf); GameActionUtil.getCommands().put("Tarmogoyf", GameActionUtil.tarmogoyf);
GameActionUtil.getCommands().put("Umbra_Stalker", GameActionUtil.umbraStalker); GameActionUtil.getCommands().put("Umbra_Stalker", GameActionUtil.umbraStalker);

View File

@@ -295,7 +295,6 @@ public class StaticEffects {
StaticEffects.cardToEffectsList.put("Old Man of the Sea", new String[] { "Old_Man_of_the_Sea" }); StaticEffects.cardToEffectsList.put("Old Man of the Sea", new String[] { "Old_Man_of_the_Sea" });
StaticEffects.cardToEffectsList.put("Tarmogoyf", new String[] { "Tarmogoyf" }); StaticEffects.cardToEffectsList.put("Tarmogoyf", new String[] { "Tarmogoyf" });
StaticEffects.cardToEffectsList.put("Umbra Stalker", new String[] { "Umbra_Stalker" }); StaticEffects.cardToEffectsList.put("Umbra Stalker", new String[] { "Umbra_Stalker" });
StaticEffects.cardToEffectsList.put("Wolf", new String[] { "Sound_the_Call_Wolf" });
} }