first part of a series of commits, this one adds "and((" support to the various card removel abilities, tweaks targetedplayer targetchooser, and adds the following number word variables...
counter{}
so you can get a count of a certain counter on a card
the next consist of parts using the same targetchooser method as type:
power:
toughness:
convertedcost:
followed by ---
highest:
lowest:
followed by targetchooser
blah:mybattlefield
so if i want highest converted cost of creatures i control..
convertedcost:highest:creature:mybattlefield
also added an internal ability to reuse and display flying text with a string passed to it.
This commit is contained in:
@@ -38,10 +38,10 @@ int ActionLayer::removeFromGame(ActionElement * e)
|
||||
AbilityFactory af(observer);
|
||||
|
||||
MTGAbility * a = dynamic_cast<MTGAbility*>(e);
|
||||
|
||||
if (a != NULL)
|
||||
{
|
||||
AManaProducer * manaObject = dynamic_cast<AManaProducer*>(af.getCoreAbility(a));
|
||||
MTGAbility * toCheck = af.getCoreAbility(a);
|
||||
AManaProducer * manaObject = dynamic_cast<AManaProducer*>(toCheck);
|
||||
if(manaObject)
|
||||
{
|
||||
for (size_t i = 0; i < manaObjects.size(); i++)
|
||||
@@ -53,7 +53,6 @@ int ActionLayer::removeFromGame(ActionElement * e)
|
||||
}
|
||||
mObjects.erase(mObjects.begin() + i);
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
bool ActionLayer::moveToGarbage(ActionElement * e)
|
||||
@@ -71,7 +70,7 @@ void ActionLayer::cleanGarbage()
|
||||
{
|
||||
for (size_t i = 0; i < garbage.size(); ++i)
|
||||
{
|
||||
delete (garbage[i]);
|
||||
SAFE_DELETE(garbage[i]);
|
||||
}
|
||||
garbage.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user