add Royal Decree (from Alliances)

This commit is contained in:
jendave
2011-08-06 08:07:39 +00:00
parent b5d71ea731
commit 29511daa74
4 changed files with 56 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -2979,6 +2979,7 @@ res/cardsfolder/rotting_rats.txt -text svneol=native#text/plain
res/cardsfolder/roughshod_mentor.txt -text svneol=native#text/plain
res/cardsfolder/rowan_treefolk.txt -text svneol=native#text/plain
res/cardsfolder/royal_assassin.txt -text svneol=native#text/plain
res/cardsfolder/royal_decree.txt -text svneol=native#text/plain
res/cardsfolder/royal_falcon.txt -text svneol=native#text/plain
res/cardsfolder/rubinia_soulsinger.txt -text svneol=native#text/plain
res/cardsfolder/ruby_leech.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,8 @@
Name:Royal Decree
ManaCost:2 W W
Types:Enchantment
Text:Whenever a Swamp, Mountain, black permanent, or red permanent becomes tapped, Royal Decree deals 1 damage to that permanent's controller.
K:Cumulative upkeep:W
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/royal_decree.jpg
End

View File

@@ -2183,5 +2183,30 @@ public class Card extends MyObservable {
public boolean isImmutable() {
return isImmutable;
}
/*
* there are easy checkers for Color. The CardUtil functions should
* be made part of the Card class, so calling out is not necessary
*/
public boolean isBlack() {
return CardUtil.getColors(this).contains(Constant.Color.Black);
}
public boolean isBlue() {
return CardUtil.getColors(this).contains(Constant.Color.Blue);
}
public boolean isRed() {
return CardUtil.getColors(this).contains(Constant.Color.Red);
}
public boolean isGreen() {
return CardUtil.getColors(this).contains(Constant.Color.Green);
}
public boolean isWhite() {
return CardUtil.getColors(this).contains(Constant.Color.White);
}
}

View File

@@ -257,6 +257,28 @@ public class GameActionUtil {
}
}
}//end Spirit Shackle
/*
* Royal Decree - Whenever a Swamp, Mountain, black permanent, or red
* permanent becomes tapped, Royal Decree deals 1 damage to that
* permanent's controller.
*/
if(c.getType().contains("Mountain") || c.getType().contains("Swamp") ||
(c.isPermanent() && (c.isRed() || c.isBlack()))) {
final CardList decrees = AllZoneUtil.getCardsInPlay("Royal Decree");
for(Card decree:decrees) {
final Card crd = decree;
final Card source = c;
Ability ability = new Ability(decree, "0") {
@Override
public void resolve() {
AllZone.GameAction.addDamage(source.getController(), crd, 1);
}
};//Ability
ability.setStackDescription(decree.getName()+" - does 1 damage to "+c.getController()+". ("+c.getName()+" was tapped.)");
AllZone.Stack.add(ability);
}//for
}
}//end executeTapSideEffects()