this(damaged)
added
targetchooser [damaged] status
added
targetchooser [controllerdamager]
targetchooser [opponentdamager]

basically checks for whos doing damage to who in a match per turn.
This commit is contained in:
omegablast2002@yahoo.com
2011-02-02 18:22:08 +00:00
parent 2993388a6e
commit e7fc20bd4c
9 changed files with 123 additions and 12 deletions

View File

@@ -228,6 +228,19 @@ ThisDescriptor * ThisDescriptorFactory::createThisDescriptor(string s)
return NULL;
}
//this creature was dealt damage this turn
found = s.find("damaged");
if (found != string::npos)
{
ThisDamaged * td = NEW ThisDamaged(criterion);
if (td)
{
td->comparisonMode = mode;
return td;
}
return NULL;
}
//controller life
found = s.find("opponentlife");
if (found != string::npos)
@@ -443,6 +456,20 @@ int ThisNotBlocked::match(MTGCardInstance * card)
return matchValue(card->notblocked);
}
ThisDamaged::ThisDamaged(int wasDealtDamage)
{
comparisonCriterion = wasDealtDamage;
}
int ThisDamaged::match(MTGCardInstance * card)
{
int result = 0;
if(card->wasDealtDamage)
result = 1;
return matchValue(result);
}
ThisToughness::ThisToughness(int toughness)
{
comparisonCriterion = toughness;