Revised Imprint
This commit is contained in:
@@ -565,6 +565,27 @@ int AAImprint::resolve()
|
||||
|
||||
source->imprintedCards.push_back(_target);
|
||||
|
||||
if (source->imprintedCards.size())
|
||||
{
|
||||
for(size_t i = 0; i < source->imprintedCards.size(); i++)
|
||||
{
|
||||
if (source->imprintedCards[i]->hasColor(Constants::MTG_COLOR_GREEN))
|
||||
source->imprintG += 1;
|
||||
if (source->imprintedCards[i]->hasColor(Constants::MTG_COLOR_BLUE))
|
||||
source->imprintU += 1;
|
||||
if (source->imprintedCards[i]->hasColor(Constants::MTG_COLOR_RED))
|
||||
source->imprintR += 1;
|
||||
if (source->imprintedCards[i]->hasColor(Constants::MTG_COLOR_BLACK))
|
||||
source->imprintB += 1;
|
||||
if (source->imprintedCards[i]->hasColor(Constants::MTG_COLOR_WHITE))
|
||||
source->imprintW += 1;
|
||||
if (source->imprintedCards[i]->getName().size())
|
||||
{
|
||||
source->currentimprintName = source->imprintedCards[i]->getName();
|
||||
source->imprintedNames.push_back(source->imprintedCards[i]->getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -693,37 +693,15 @@ void GameObserver::gameStateBasedEffects()
|
||||
for(size_t ic = 0; ic < card->imprintedCards.size(); ic++)
|
||||
{
|
||||
if(!isInExile(card->imprintedCards[ic]))
|
||||
card->imprintedCards.erase(card->imprintedCards.begin() + ic);
|
||||
}
|
||||
}
|
||||
//reset imprints
|
||||
if(isInPlay(card))
|
||||
{
|
||||
card->imprintG = 0;
|
||||
card->imprintU = 0;
|
||||
card->imprintR = 0;
|
||||
card->imprintB = 0;
|
||||
card->imprintW = 0;
|
||||
card->currentimprintName = "";
|
||||
if (card->imprintedCards.size())
|
||||
{
|
||||
for(size_t i = 0; i < card->imprintedCards.size(); i++)
|
||||
{
|
||||
if (card->imprintedCards[i]->hasColor(Constants::MTG_COLOR_GREEN))
|
||||
card->imprintG += 1;
|
||||
if (card->imprintedCards[i]->hasColor(Constants::MTG_COLOR_BLUE))
|
||||
card->imprintU += 1;
|
||||
if (card->imprintedCards[i]->hasColor(Constants::MTG_COLOR_RED))
|
||||
card->imprintR += 1;
|
||||
if (card->imprintedCards[i]->hasColor(Constants::MTG_COLOR_BLACK))
|
||||
card->imprintB += 1;
|
||||
if (card->imprintedCards[i]->hasColor(Constants::MTG_COLOR_WHITE))
|
||||
card->imprintW += 1;
|
||||
if (card->imprintedCards[i]->getName().size())
|
||||
{
|
||||
card->currentimprintName = card->imprintedCards[i]->getName();
|
||||
card->imprintedNames.push_back(card->imprintedCards[i]->getName());
|
||||
}
|
||||
card->imprintG = 0;
|
||||
card->imprintU = 0;
|
||||
card->imprintR = 0;
|
||||
card->imprintB = 0;
|
||||
card->imprintW = 0;
|
||||
card->currentimprintName = "";
|
||||
card->imprintedNames.clear();
|
||||
card->imprintedCards.erase(card->imprintedCards.begin() + ic);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user