- fixed the "may" ability a little bit (needs testing: can it be called only once ???)
- Added "Clone", yay :)
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-04-01 12:59:53 +00:00
parent 60b35f7f7f
commit bdf989ffac
12 changed files with 201 additions and 25 deletions

View File

@@ -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:

View File

@@ -41,6 +41,7 @@ class MTGAbility: public ActionElement{
GameObserver * game;
public:
int forceDestroy;
ManaCost * cost;
Damageable * target;
int aType;

View File

@@ -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();