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

@@ -253,6 +253,19 @@ ThisDescriptor * ThisDescriptorFactory::createThisDescriptor(string s)
return NULL;
}
//this creature has 2 of the same weapons in its children vector
found = s.find("dualwielding");
if (found != string::npos)
{
ThisDualWield * td = NEW ThisDualWield(criterion);
if (td)
{
td->comparisonMode = mode;
return td;
}
return NULL;
}
//controller life
found = s.find("opponentlife");
if (found != string::npos)
@@ -561,6 +574,25 @@ ThisDamaged* ThisDamaged::clone() const
return NEW ThisDamaged(*this);
}
ThisDualWield::ThisDualWield(int dualWield)
{
comparisonCriterion = dualWield;
}
int ThisDualWield::match(MTGCardInstance * card)
{
int result = 0;
if(card->isDualWielding)
result = 1;
return matchValue(result);
}
ThisDualWield* ThisDualWield::clone() const
{
return NEW ThisDualWield(*this);
}
ThisToughness::ThisToughness(int toughness)
{
comparisonCriterion = toughness;