add Maralen of the Mornsong (from Morningtide)

This commit is contained in:
slapshot5
2011-08-28 03:43:28 +00:00
parent 60a23ab77f
commit 25bc109322
4 changed files with 28 additions and 3 deletions

1
.gitattributes vendored
View File

@@ -4593,6 +4593,7 @@ res/cardsfolder/m/manta_ray.txt svneol=native#text/plain
res/cardsfolder/m/manta_riders.txt svneol=native#text/plain res/cardsfolder/m/manta_riders.txt svneol=native#text/plain
res/cardsfolder/m/mantis_engine.txt svneol=native#text/plain res/cardsfolder/m/mantis_engine.txt svneol=native#text/plain
res/cardsfolder/m/mantle_of_leadership.txt svneol=native#text/plain res/cardsfolder/m/mantle_of_leadership.txt svneol=native#text/plain
res/cardsfolder/m/maralen_of_the_mornsong.txt -text
res/cardsfolder/m/marauding_knight.txt svneol=native#text/plain res/cardsfolder/m/marauding_knight.txt svneol=native#text/plain
res/cardsfolder/m/maraxus_of_keld.txt svneol=native#text/plain res/cardsfolder/m/maraxus_of_keld.txt svneol=native#text/plain
res/cardsfolder/m/marble_chalice.txt svneol=native#text/plain res/cardsfolder/m/marble_chalice.txt svneol=native#text/plain

View File

@@ -0,0 +1,12 @@
Name:Maralen of the Mornsong
ManaCost:1 B B
Types:Legendary Creature Elf Wizard
Text:Players can't draw cards.
PT:2/3
T:Mode$ Phase | Phase$ Draw | ValidPlayer$ Player | TriggerZones$ Battlefield | Execute$ TrigDrain | TriggerDescription$ At the beginning of each player's draw step, that player loses 3 life, searches his or her library for a card, puts it into his or her hand, then shuffles his or her library.
SVar:TrigDrain:AB$ LoseLife | Cost$ 0 | Defined$ TriggeredPlayer | LifeAmount$ 3 | SubAbility$ SVar=DBTutor
SVar:DBTutor:DB$ ChangeZone | Defined$ TriggeredPlayer | Origin$ Library | Destination$ Hand | ChangeType$ Card | ChangeNum$ 1 | Mandatory$ True
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/maralen_of_the_mornsong.jpg
End

View File

@@ -74,9 +74,7 @@ public class HumanPlayer extends Player {
/** {@inheritDoc} */ /** {@inheritDoc} */
public CardList mayDrawCards(int n) { public CardList mayDrawCards(int n) {
String[] choices = {"Yes", "No"}; if (canDraw() && GameActionUtil.showYesNoDialog(null, "Draw " + n + " cards?"))
Object choice = GuiUtils.getChoice("Draw " + n + " cards?", choices);
if (choice.equals("Yes"))
return drawCards(n); return drawCards(n);
else return new CardList(); else return new CardList();
} }

View File

@@ -810,6 +810,15 @@ public abstract class Player extends MyObservable {
/// ///
//////////////////////////////// ////////////////////////////////
/**
* <p>canDraw</p>
*
* @return true if a player can draw a card, false otherwise
*/
public boolean canDraw() {
return !AllZoneUtil.isCardInPlay("Maralen of the Mornsong");
}
/** /**
* <p>mayDrawCard.</p> * <p>mayDrawCard.</p>
* *
@@ -869,6 +878,11 @@ public abstract class Player extends MyObservable {
*/ */
public CardList drawCards(int n, boolean firstFromDraw) { public CardList drawCards(int n, boolean firstFromDraw) {
CardList drawn = new CardList(); CardList drawn = new CardList();
if(!canDraw()) {
return drawn;
}
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
// TODO: multiple replacements need to be selected by the controller // TODO: multiple replacements need to be selected by the controller