- Added Sword of the Ages

This commit is contained in:
jeffwadsworth
2011-10-06 23:14:37 +00:00
parent d70114acbd
commit 0239f25600
4 changed files with 39 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -7881,6 +7881,7 @@ res/cardsfolder/s/sword_of_feast_and_famine.txt svneol=native#text/plain
res/cardsfolder/s/sword_of_fire_and_ice.txt svneol=native#text/plain
res/cardsfolder/s/sword_of_kaldra.txt svneol=native#text/plain
res/cardsfolder/s/sword_of_light_and_shadow.txt svneol=native#text/plain
res/cardsfolder/s/sword_of_the_ages.txt -text svneol=unset#text/plain
res/cardsfolder/s/sword_of_the_chosen.txt svneol=native#text/plain
res/cardsfolder/s/sword_of_the_meek.txt svneol=native#text/plain
res/cardsfolder/s/sword_of_the_paruns.txt svneol=native#text/plain

View File

@@ -0,0 +1,13 @@
Name:Sword of the Ages
ManaCost:6
Types:Artifact
Text:no text
K:CARDNAME enters the battlefield tapped.
A:AB$ ChangeZone | Cost$ T Exile<1/CARDNAME> | Origin$ Battlefield | Destination$ Exile | TargetMin$ 0 | TargetMax$ MaxTgts | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | RememberTargets$ True | SubAbility$ DBDamage | CostDesc$ Exile Sword of the Ages and any number of creatures you control: | SpellDescription$ CARDNAME deals X damage to target creature or player, where X is the total power of the creatures exiled this way.
SVar:DBDamage:DB$ DealDamage | Tgt$ TgtCP | NumDmg$ Y | SubAbility$ DBCleanup
SVar:MaxTgts:Count$Valid Creature.YouCtrl
SVar:Y:Count$RememberedSumPower
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/sword_of_the_ages.jpg
End

View File

@@ -721,6 +721,21 @@ public class CardList implements Iterable<Card> {
}
return total;
}
/**
*
* <p>getTotalCreaturePower.</p>
*
* @return a int.
*/
public final int getTotalCreaturePower() {
int total = 0;
for (int i = 0; i < size(); i++) {
total += get(i).getCurrentPower();
}
return total;
}
/**
* <p>getHighestConvertedManaCost.</p>

View File

@@ -2905,6 +2905,16 @@ public class CardFactoryUtil {
}
return highest;
}
if (l[0].contains("RememberedSumPower")) {
CardList list = new CardList();
for (Object o : c.getRemembered()) {
if (o instanceof Card) {
list.add(AllZoneUtil.getCardState((Card) o));
}
}
return list.getTotalCreaturePower();
}
final String[] sq;
sq = l[0].split("\\.");