added miracle ability.
i choose to use other cost instead of creating a brand new cost type.
otherrestriction determines if the card is the miracle for the turn.
[card]
name=Devastation Tide
auto=all(*[-land]) moveto(ownerhand)
other={1}{u} name(Miracle)
otherrestriction=miracle
text=Return all nonland permanents to their owners' hands. -- Miracle {1}{U} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.)
mana={3}{U}{U}
type=Sorcery
[/card]
This commit is contained in:
@@ -242,18 +242,27 @@ void MTGPlayerCards::drawFromLibrary()
|
||||
}
|
||||
|
||||
if(putInZone(toMove, library, hand))
|
||||
{
|
||||
toMove->currentZone = hand;
|
||||
if (!library->miracle)
|
||||
{
|
||||
library->miracle = true;
|
||||
toMove->miracle = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MTGPlayerCards::resetLibrary()
|
||||
{
|
||||
SAFE_DELETE(library);
|
||||
library = NEW MTGLibrary();
|
||||
library->miracle = false;
|
||||
}
|
||||
|
||||
void MTGPlayerCards::init()
|
||||
{
|
||||
library = NEW MTGLibrary();
|
||||
library->miracle = false;
|
||||
graveyard = NEW MTGGraveyard();
|
||||
hand = NEW MTGHand();
|
||||
inPlay = NEW MTGInPlay();
|
||||
|
||||
Reference in New Issue
Block a user