added basic card draw replacement,

auto=replacedraw choice damage:2

auto=replacedraw choice draw:2 noreplace

notice noreplace exempts the draw from sending a draw event. draw events and drawn events are seperate events.

added dredge and it's rules.

[card]
name=Dakmor Salvage
auto=tap
auto={t}:add{b}
dredge=dredge(2)
text=Dakmor Salvage enters the battlefield tapped. -- {T}: Add {B} to your mana pool. -- Dredge 2 (If you would draw a card, instead you may put exactly two cards from the top of your library into your graveyard. If you do, return this card from your graveyard to your hand. Otherwise, draw a card.)
type=Land
[/card]
This commit is contained in:
omegablast2002@yahoo.com
2013-01-20 20:13:07 +00:00
parent 0709aaefb8
commit ca3dc49d71
20 changed files with 463 additions and 31 deletions

View File

@@ -58,6 +58,7 @@ CardPrimitive::CardPrimitive(CardPrimitive * source)
toughness = source->toughness;
restrictions = source->restrictions ? source->restrictions->clone() : NULL;
suspendedTime = source->suspendedTime;
dredgeAmount = source->dredgeAmount;
magicText = source->magicText;
for (map<string, string>::const_iterator it = source->magicTexts.begin(); it != source->magicTexts.end(); ++it)
@@ -82,6 +83,7 @@ int CardPrimitive::init()
spellTargetType = "";
alias = 0;
restrictions = NULL;
dredgeAmount = 0;
return 1;
}
@@ -100,6 +102,11 @@ bool CardPrimitive::isSpell()
return (!isCreature() && !isLand());
}
int CardPrimitive::dredge()
{
return dredgeAmount;
}
void CardPrimitive::setRestrictions(string _restriction)
{
if (!restrictions)