add Erg Raiders (from Arabian Nights)

This commit is contained in:
jendave
2011-08-06 13:30:06 +00:00
parent be76e3be0d
commit 291933cd4a
3 changed files with 27 additions and 3 deletions

1
.gitattributes vendored
View File

@@ -1502,6 +1502,7 @@ res/cardsfolder/ephemeron.txt -text svneol=native#text/plain
res/cardsfolder/epic_proportions.txt -text svneol=native#text/plain
res/cardsfolder/epic_struggle.txt -text svneol=native#text/plain
res/cardsfolder/erase.txt -text svneol=native#text/plain
res/cardsfolder/erg_raiders.txt -text svneol=native#text/plain
res/cardsfolder/eron_the_relentless.txt -text svneol=native#text/plain
res/cardsfolder/errant_doomsayers.txt -text svneol=native#text/plain
res/cardsfolder/errant_ephemeron.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,8 @@
Name:Erg Raiders
ManaCost:1 B
Types:Creature Human Warrior
Text:At the beginning of your end step, if CARDNAME didn't attack this turn, CARDNAME deals 2 damage to you unless it came under your control this turn.
PT:2/3
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/erg_raiders.jpg
End

View File

@@ -20,9 +20,7 @@ public class EndOfTurn implements java.io.Serializable
AllZone.GameAction.checkWheneverKeyword(AllZone.CardFactory.HumanNullCard,"BeginningOfEndStep",null);
//Pyrohemia and Pestilence
CardList all = new CardList();
all.addAll(AllZone.Human_Battlefield.getCards());
all.addAll(AllZone.Computer_Battlefield.getCards());
CardList all = AllZoneUtil.getCardsInPlay();
CardList creature = all.getType("Creature");
@@ -153,6 +151,23 @@ public class EndOfTurn implements java.io.Serializable
AllZone.Stack.add(change);
}
if(c.getName().equals("Erg Raiders") && !c.getCreatureAttackedThisTurn() &&
!(c.getTurnInZone() == AllZone.Phase.getTurn()) && AllZone.Phase.isPlayerTurn(c.getController())) {
final Card raider = c;
final SpellAbility change = new Ability(raider, "0") {
@Override
public void resolve() {
if(AllZone.GameAction.isCardInPlay(raider)) {
raider.getController().addDamage(2, raider);
}
}
};
StringBuilder sb = new StringBuilder();
sb.append(raider.getName()).append(" deals 2 damage to controller.");
change.setStackDescription(sb.toString());
AllZone.Stack.add(change);
}
if(c.getCreatureAttackedThisTurn()) c.setCreatureAttackedThisTurn(false);
}
execute(at);