Fixed some cards

replaced @lifed with @lifeof, had to hardcode conduit of ruin...
This commit is contained in:
Anthony Calosa
2016-08-16 12:17:53 +08:00
parent 559331cf82
commit 1eae3a032f
7 changed files with 55 additions and 21 deletions
+1
View File
@@ -1121,6 +1121,7 @@ void GameObserver::Affinity()
card->has(Constants::AFFINITYMOUNTAIN) ||
card->has(Constants::AFFINITYPLAINS) ||
card->has(Constants::AFFINITYSWAMP) ||
card->has(Constants::CONDUITED) ||
card->getIncreasedManaCost()->getConvertedCost() ||
card->getReducedManaCost()->getConvertedCost() ||
NewAffinityFound)
+10 -1
View File
@@ -1090,7 +1090,8 @@ ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * Cos
card->has(Constants::AFFINITYISLAND) ||
card->has(Constants::AFFINITYMOUNTAIN) ||
card->has(Constants::AFFINITYPLAINS) ||
card->has(Constants::AFFINITYSWAMP))
card->has(Constants::AFFINITYSWAMP) ||
card->has(Constants::CONDUITED))
{//start3
if (card->has(Constants::AFFINITYARTIFACTS))
{
@@ -1145,6 +1146,14 @@ ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * Cos
reduce = card->controller()->game->battlefield->countByCanTarget(tc);
SAFE_DELETE(tc);
}
else if (card->has(Constants::CONDUITED))
{//I had to hardcode this since it doesn't update with auto=this(creaturespells<1) lord(creature|mycastingzone) altercost(colorless,-2)
color = 0;
reduce = card->controller()->inPlay()->countByAlias(401847);
reduce *= 2;
if(card->controller()->game->stack->seenThisTurn("creature", Constants::CAST_ALL) > 0)
reduce = 0;
}
else
{
reduce = card->controller()->game->battlefield->countByType(type);
+2 -1
View File
@@ -170,7 +170,8 @@ const char* Constants::MTGBasicAbilities[] = {
"tempflashback",
"legendruleremove",
"canttransform",
"asflash"
"asflash",
"conduited"
};
map<string,int> Constants::MTGBasicAbilitiesMap;
+14
View File
@@ -643,6 +643,20 @@ size_t MTGGameZone::getIndex(MTGCardInstance * card)
return -1;
}
unsigned int MTGGameZone::countByAlias(int number)
{
if(!number)
return 0;
int result = 0;
for (int i = 0; i < (nb_cards); i++)
{
if (cards[i]->alias == number)
{
result++;
}
}
return result;
}
unsigned int MTGGameZone::countByType(const string &value)
{