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]
76 lines
1.8 KiB
C++
76 lines
1.8 KiB
C++
#ifndef _REPLACEMENT_EFFECTS_H_
|
|
#define _REPLACEMENT_EFFECTS_H_
|
|
|
|
#include <list>
|
|
using namespace std;
|
|
#include "Damage.h"
|
|
#include "WEvent.h"
|
|
#include "Counters.h"
|
|
|
|
class TargetChooser;
|
|
class MTGAbility;
|
|
|
|
class ReplacementEffect
|
|
{
|
|
public:
|
|
virtual WEvent * replace(WEvent * e)
|
|
{
|
|
return e;
|
|
}
|
|
;
|
|
virtual ~ReplacementEffect() {}
|
|
};
|
|
|
|
class REDamagePrevention: public ReplacementEffect
|
|
{
|
|
protected:
|
|
MTGAbility * source;
|
|
TargetChooser * tcSource;
|
|
TargetChooser * tcTarget;
|
|
int damage;
|
|
bool oneShot;
|
|
int typeOfDamage;
|
|
public:
|
|
REDamagePrevention(MTGAbility * _source, TargetChooser *_tcSource = NULL, TargetChooser *_tcTarget = NULL, int _damage = -1, bool _oneShot = true, int typeOfDamage = DAMAGE_ALL_TYPES);
|
|
WEvent * replace(WEvent *e);
|
|
~REDamagePrevention();
|
|
};
|
|
|
|
class RECountersPrevention: public ReplacementEffect
|
|
{
|
|
protected:
|
|
MTGAbility * source;
|
|
MTGCardInstance * cardSource;
|
|
MTGCardInstance * cardTarget;
|
|
TargetChooser * TargetingCards;
|
|
Counter * counter;
|
|
public:
|
|
RECountersPrevention(MTGAbility * _source,MTGCardInstance * cardSource = NULL,MTGCardInstance * cardTarget = NULL,TargetChooser * tc = NULL,Counter * counter = NULL);
|
|
WEvent * replace(WEvent *e);
|
|
~RECountersPrevention();
|
|
};
|
|
class REDrawReplacement: public ReplacementEffect
|
|
{
|
|
protected:
|
|
MTGAbility * source;
|
|
|
|
public:
|
|
Player * DrawerOfCard;
|
|
MTGAbility * replacementAbility;
|
|
REDrawReplacement(MTGAbility * _source, Player * Drawer = NULL, MTGAbility * replaceWith = NULL);
|
|
WEvent * replace(WEvent *e);
|
|
~REDrawReplacement();
|
|
};
|
|
class ReplacementEffects
|
|
{
|
|
public:
|
|
list<ReplacementEffect *> modifiers;
|
|
ReplacementEffects();
|
|
WEvent * replace(WEvent *e);
|
|
int add(ReplacementEffect * re);
|
|
int remove(ReplacementEffect * re);
|
|
~ReplacementEffects();
|
|
};
|
|
|
|
#endif
|