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:
@@ -32,6 +32,14 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
return NEW pairableChooser(observer, card, maxtargets);
|
||||
}
|
||||
|
||||
found = s.find("dredgeable");
|
||||
if (found != string::npos)
|
||||
{
|
||||
int maxtargets = 1;
|
||||
zones[nbzones++] = MTGGameZone::MY_GRAVEYARD;
|
||||
return NEW dredgeChooser(observer,zones,nbzones, card, maxtargets);
|
||||
}
|
||||
|
||||
found = s.find("mytgt");
|
||||
if (found == 0)
|
||||
{
|
||||
@@ -1601,6 +1609,35 @@ bool pairableChooser::equals(TargetChooser * tc)
|
||||
return TypeTargetChooser::equals(tc);
|
||||
}
|
||||
|
||||
//*Dredge targetchooser*//
|
||||
bool dredgeChooser::canTarget(Targetable * target,bool withoutProtections)
|
||||
{
|
||||
if (MTGCardInstance * card = dynamic_cast<MTGCardInstance*>(target))
|
||||
{
|
||||
if((card->data->dredgeAmount < 1) || (card->data->dredgeAmount > card->controller()->game->library->nb_cards))
|
||||
return false;
|
||||
if(card->currentZone == card->controller()->game->graveyard)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
dredgeChooser* dredgeChooser::clone() const
|
||||
{
|
||||
dredgeChooser * a = NEW dredgeChooser(*this);
|
||||
return a;
|
||||
}
|
||||
|
||||
bool dredgeChooser::equals(TargetChooser * tc)
|
||||
{
|
||||
|
||||
dredgeChooser * dtc = dynamic_cast<dredgeChooser *> (tc);
|
||||
if (!dtc)
|
||||
return false;
|
||||
|
||||
return TypeTargetChooser::equals(tc);
|
||||
}
|
||||
//-----------
|
||||
//-----------
|
||||
/*Proliferate Target */
|
||||
bool ProliferateChooser::canTarget(Targetable * target,bool withoutProtections)
|
||||
|
||||
Reference in New Issue
Block a user