corrected some logic with computenewcost.

there is a bug im working on with newaffinity and cards that contain targetchoosers with CD tcs. 

experimental change also added with lords. im making the abilities grants by lord forcedalive until the lord is removed from game.
some instances of forcedalive in master primitives did not contain abilities which resolved, meaning they would contenue even though the source had left play.
This commit is contained in:
zethfoxster
2016-07-09 00:11:21 -04:00
parent 242c7b623f
commit ee91e0698d
3 changed files with 20 additions and 2 deletions
+15
View File
@@ -970,6 +970,14 @@ ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * Cos
string type = "";
ManaCost * original = NEW ManaCost();
original->copy(Data);
Cost->copy(original);
if (Cost->extraCosts)
{
for (unsigned int i = 0; i < Cost->extraCosts->costs.size(); i++)
{
Cost->extraCosts->costs[i]->setSource(card);
}
}
if (card->getIncreasedManaCost()->getConvertedCost() || card->getReducedManaCost()->getConvertedCost())
{//start1
if (card->getIncreasedManaCost()->getConvertedCost())
@@ -1076,6 +1084,13 @@ ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * Cos
Cost->extraCosts->costs[i]->setSource(card);
}
}
if (Cost->extraCosts)
{
for (unsigned int i = 0; i < Cost->extraCosts->costs.size(); i++)
{
Cost->extraCosts->costs[i]->setSource(card);
}
}
int reduce = 0;
if (card->has(Constants::AFFINITYGREENCREATURES))
{