Fix Cost Increaser, Cost Reducer

Should fix most of them.  TODO: Trinisphere and Morph...
This commit is contained in:
Anthony Calosa
2016-06-03 22:32:10 +08:00
parent 4e12de1629
commit ce8e117b0b
6 changed files with 173 additions and 207 deletions
+11 -12
View File
@@ -919,23 +919,22 @@ JQuadPtr MTGCardInstance::getIcon()
return WResourceManager::Instance()->RetrieveCard(this, CACHE_THUMB);
}
ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * oldCost)
ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * newCost, ManaCost * refCost)
{
if(card->isLand())
return oldCost;
if(!card)
return oldCost;
//use forcedalive//
//pay zero costs//
//kicker???...//
//morph cost todo//
return NULL;
if(card->getIncreasedManaCost()->getConvertedCost())
newCost->add(card->getIncreasedManaCost());
if(card->getReducedManaCost()->getConvertedCost())
newCost->remove(card->getReducedManaCost());
if(refCost->extraCosts)
newCost->extraCosts = refCost->extraCosts;
//trinisphere must be here below//
if(card->has(Constants::TRINISPHERE))
for(int jj = oldCost->getConvertedCost(); jj < 3; jj++)
oldCost->add(Constants::MTG_COLOR_ARTIFACT, 1);
for(int jj = newCost->getConvertedCost(); jj < 3; jj++)
newCost->add(Constants::MTG_COLOR_ARTIFACT, 1);
return oldCost;
return newCost;
}
MTGCardInstance * MTGCardInstance::getNextPartner()