Fix CDAACTIVE & transformed card colors
cdaactive has its own computation, so exclude it on flip/transform cards ability
This commit is contained in:
@@ -1126,27 +1126,27 @@ AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card,
|
||||
}
|
||||
}
|
||||
|
||||
for (vector<MTGCardInstance*>::iterator it = found.begin(); it != found.end(); it++)
|
||||
{
|
||||
MTGCardInstance * cardFirst = *it;
|
||||
if (cardFirst->isLand())
|
||||
continue;
|
||||
for (vector<MTGCardInstance*>::iterator it = found.begin(); it != found.end(); it++)
|
||||
{
|
||||
MTGCardInstance * cardFirst = *it;
|
||||
if (cardFirst->isLand())
|
||||
continue;
|
||||
for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i)
|
||||
{
|
||||
if (cardFirst->hasColor(i))
|
||||
{
|
||||
for (vector<MTGCardInstance*>::iterator secondit = found.begin(); secondit != found.end(); secondit++)
|
||||
{
|
||||
MTGCardInstance * cardSecond = *secondit;
|
||||
if (cardSecond->isLand())
|
||||
continue;
|
||||
if (cardSecond->hasColor(i) && cardFirst != cardSecond)
|
||||
{
|
||||
repeating = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
if (cardFirst->hasColor(i))
|
||||
{
|
||||
for (vector<MTGCardInstance*>::iterator secondit = found.begin(); secondit != found.end(); secondit++)
|
||||
{
|
||||
MTGCardInstance * cardSecond = *secondit;
|
||||
if (cardSecond->isLand())
|
||||
continue;
|
||||
if (cardSecond->hasColor(i) && cardFirst != cardSecond)
|
||||
{
|
||||
repeating = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
do
|
||||
@@ -1183,18 +1183,18 @@ AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card,
|
||||
}
|
||||
}
|
||||
|
||||
for (vector<MTGCardInstance*>::iterator it = found.begin(); it != found.end(); it++)
|
||||
{
|
||||
MTGCardInstance * cardFirst = *it;
|
||||
for (vector<MTGCardInstance*>::iterator secondit = found.begin(); secondit != found.end(); secondit++)
|
||||
{
|
||||
MTGCardInstance * cardSecond = *secondit;
|
||||
if (cardSecond->name == cardFirst->name && cardFirst != cardSecond)
|
||||
{
|
||||
repeating = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (vector<MTGCardInstance*>::iterator it = found.begin(); it != found.end(); it++)
|
||||
{
|
||||
MTGCardInstance * cardFirst = *it;
|
||||
for (vector<MTGCardInstance*>::iterator secondit = found.begin(); secondit != found.end(); secondit++)
|
||||
{
|
||||
MTGCardInstance * cardSecond = *secondit;
|
||||
if (cardSecond->name == cardFirst->name && cardFirst != cardSecond)
|
||||
{
|
||||
repeating = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
do
|
||||
@@ -3224,11 +3224,14 @@ int AAFlip::resolve()
|
||||
{
|
||||
toughMod =_target->toughness - _target->origtoughness;
|
||||
}
|
||||
if(!_target->isCDA)
|
||||
{
|
||||
_target->power = powerlessThanOriginal?myFlip->power - powerMod:myFlip->power + powerMod;
|
||||
_target->life = toughLessThanOriginal?myFlip->toughness - toughMod:myFlip->toughness + toughMod;
|
||||
_target->toughness = toughLessThanOriginal?myFlip->toughness - toughMod:myFlip->toughness + toughMod;
|
||||
_target->origpower = myFlip->origpower;
|
||||
_target->origtoughness = myFlip->origtoughness;
|
||||
}
|
||||
SAFE_DELETE(myFlip);
|
||||
_target->mPropertiesChangedSinceLastUpdate = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user