mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
add Maralen of the Mornsong (from Morningtide)
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -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/mantis_engine.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/maraxus_of_keld.txt svneol=native#text/plain
|
||||
res/cardsfolder/m/marble_chalice.txt svneol=native#text/plain
|
||||
|
||||
12
res/cardsfolder/m/maralen_of_the_mornsong.txt
Normal file
12
res/cardsfolder/m/maralen_of_the_mornsong.txt
Normal 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
|
||||
@@ -74,9 +74,7 @@ public class HumanPlayer extends Player {
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public CardList mayDrawCards(int n) {
|
||||
String[] choices = {"Yes", "No"};
|
||||
Object choice = GuiUtils.getChoice("Draw " + n + " cards?", choices);
|
||||
if (choice.equals("Yes"))
|
||||
if (canDraw() && GameActionUtil.showYesNoDialog(null, "Draw " + n + " cards?"))
|
||||
return drawCards(n);
|
||||
else return new CardList();
|
||||
}
|
||||
|
||||
@@ -809,6 +809,15 @@ public abstract class Player extends MyObservable {
|
||||
/// replaces AllZone.getGameAction().draw* methods
|
||||
///
|
||||
////////////////////////////////
|
||||
|
||||
/**
|
||||
* <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>
|
||||
@@ -869,6 +878,11 @@ public abstract class Player extends MyObservable {
|
||||
*/
|
||||
public CardList drawCards(int n, boolean firstFromDraw) {
|
||||
CardList drawn = new CardList();
|
||||
|
||||
if(!canDraw()) {
|
||||
return drawn;
|
||||
}
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
|
||||
// TODO: multiple replacements need to be selected by the controller
|
||||
|
||||
Reference in New Issue
Block a user