added countertrack(counterstring) MTGAbility

what this does currently is remove a counter of the type counterstring and when the ability is destroyed it puts the counter back for us.
meant for weapons used as follows.
auto=teach(creature) countertrack(0/0,1,hand)

when the creature is equipped with this weapon it will remove a hand counter from the creature, when you remove the weapon, or the weapon is destroyed or whatever...it will put a hand counter back on the creature.

added dualwielding thisdescriptor...
auto=this(dualwielding) 2/2
auto=this(dualwielding) firststrike

enabled "restriction{" on phasebased triggers @next and @each...

i will work more on countertrack to extend it to domains if it currently isnt possible to use it in this case(haven't tested it on domains)....
This commit is contained in:
omegablast2002@yahoo.com
2011-09-13 14:33:13 +00:00
parent 713cb2aa45
commit 6ea7e00803
8 changed files with 158 additions and 3 deletions

View File

@@ -2271,7 +2271,8 @@ public:
{
if (skills.find(card) != skills.end())
{
game->removeObserver(skills[card]);
if(!game->removeObserver(skills[card]))
skills[card]->destroy();
skills.erase(card);
}
return 1;
@@ -3538,6 +3539,18 @@ public:
ACounterShroud * clone() const;
~ACounterShroud();
};
//track an effect using counters.
class ACounterTracker: public MTGAbility
{
public:
Counter * counter;
int removed;
ACounterTracker(int id, MTGCardInstance * source, MTGCardInstance * target, Counter * counter = NULL);
int addToGame();
int destroy();
ACounterTracker * clone() const;
~ACounterTracker();
};
//Remove all abilities from target
class ALoseAbilities: public MTGAbility
{

View File

@@ -91,6 +91,7 @@ public:
int fresh;
int MaxLevelUp;
int kicked;
bool isDualWielding;
Player * lastController;
MTGGameZone * getCurrentZone();
MTGGameZone * previousZone;

View File

@@ -133,6 +133,14 @@ class ThisDamaged:public ThisDescriptor{
ThisDamaged * clone() const;
};
class ThisDualWield:public ThisDescriptor{
public:
virtual int match(MTGCardInstance * card);
ThisDualWield(int dualWield);
ThisDualWield * clone() const;
};
class ThisPower:public ThisDescriptor{
public:
virtual int match(MTGCardInstance * card);