Fix Cost Increaser, Cost Reducer
Should fix most of them. TODO: Trinisphere and Morph...
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user