Erwan
- fixed the "may" ability a little bit (needs testing: can it be called only once ???) - Added "Clone", yay :)
This commit is contained in:
@@ -31,6 +31,7 @@ public:
|
||||
int deleteAbility;
|
||||
MayAbility(int _id, MTGAbility * _ability, MTGCardInstance * _source):MTGAbility(_id,_source),ability(_ability){
|
||||
triggered = 0;
|
||||
ability->forceDestroy = 1;
|
||||
deleteAbility = 1;
|
||||
}
|
||||
|
||||
@@ -269,6 +270,28 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
//Copier. TargetAbility
|
||||
class ACopier:public TargetAbility{
|
||||
public:
|
||||
ACopier(int _id, MTGCardInstance * _source, TargetChooser * _tc = NULL, ManaCost * _cost=NULL):TargetAbility(_id,_source, _tc,_cost,0,0){
|
||||
if (!tc) tc = NEW CreatureTargetChooser();
|
||||
}
|
||||
|
||||
int resolve(){
|
||||
MTGCardInstance * _target = tc->getNextCardTarget();
|
||||
if(_target){
|
||||
source->copy(_target);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char * getMenuText(){
|
||||
return "Copy";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//Destroyer. TargetAbility
|
||||
class ADestroyer:public TargetAbility{
|
||||
public:
|
||||
|
||||
@@ -41,6 +41,7 @@ class MTGAbility: public ActionElement{
|
||||
|
||||
GameObserver * game;
|
||||
public:
|
||||
int forceDestroy;
|
||||
ManaCost * cost;
|
||||
Damageable * target;
|
||||
int aType;
|
||||
|
||||
@@ -93,7 +93,7 @@ class MTGCardInstance: public MTGCard, public Damageable, public Targetable {
|
||||
int addProtection(CardDescriptor * cd);
|
||||
int removeProtection(CardDescriptor *cd, int erase = 0);
|
||||
int protectedAgainst(MTGCardInstance * card);
|
||||
|
||||
void copy(MTGCardInstance * card);
|
||||
// in game
|
||||
int isTapped();
|
||||
void untap();
|
||||
|
||||
Reference in New Issue
Block a user