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