Transform Trigger, Turnlimit for TrCardAddedtoZone

Cleaned primitives, and fix SOI cards (remove workarounds) todo(recheck
BFZ and OGW)
This commit is contained in:
Anthony Calosa
2016-08-10 01:54:24 +08:00
parent ab49ea07e8
commit 151905c5f3
12 changed files with 481 additions and 336 deletions
+24
View File
@@ -666,6 +666,30 @@ void ManaCost::copy(ManaCost * _manaCost)
xColor = _manaCost->xColor;
}
void ManaCost::changeCostTo(ManaCost * _manaCost)
{
if (!_manaCost)
return;
cost.erase(cost.begin() ,cost.end());
for (int i = 0; i <= Constants::NB_Colors; i++)
{
cost.push_back(_manaCost->getCost(i));
}
hybrids = _manaCost->hybrids;
SAFE_DELETE(extraCosts);
if (_manaCost->extraCosts)
{
extraCosts = _manaCost->extraCosts->clone();
}
xColor = _manaCost->xColor;
}
int ManaCost::getCost(int color)
{
if (cost.size() <= (size_t)color)