notany attribute
anytypeofmana makes manacost colorless... wip
This commit is contained in:
@@ -68,12 +68,6 @@ mana={4}{G}
|
|||||||
type=Sorcery
|
type=Sorcery
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Oath of Nissa
|
|
||||||
text=When Oath of Nissa enters the battlefield, look at the top three cards of your library. You may reveal a creature, land, or planeswalker card from among them and put it into your hand. Put the rest on the bottom of your library in any order. -- You may spend mana as though it were mana of any color to cast planeswalker spells.
|
|
||||||
mana={G}
|
|
||||||
type=Legendary Enchantment
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
name=Reality Smasher
|
name=Reality Smasher
|
||||||
text=({C} represents colorless mana.) -- Trample, haste -- Whenever Reality Smasher becomes the target of a spell an opponent controls, counter that spell unless its controller discards a card.
|
text=({C} represents colorless mana.) -- Trample, haste -- Whenever Reality Smasher becomes the target of a spell an opponent controls, counter that spell unless its controller discards a card.
|
||||||
mana={4}{C}
|
mana={4}{C}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -266,6 +266,7 @@ public:
|
|||||||
int myconvertedcost;
|
int myconvertedcost;
|
||||||
ManaCost * computeNewCost(MTGCardInstance * card,ManaCost * oldCost, ManaCost * refCost,bool noTrinisphere = false);
|
ManaCost * computeNewCost(MTGCardInstance * card,ManaCost * oldCost, ManaCost * refCost,bool noTrinisphere = false);
|
||||||
int countTrini;
|
int countTrini;
|
||||||
|
bool anymanareplacement;
|
||||||
vector<MTGCardInstance*>imprintedCards;
|
vector<MTGCardInstance*>imprintedCards;
|
||||||
int attackCost;
|
int attackCost;
|
||||||
int attackCostBackup;
|
int attackCostBackup;
|
||||||
|
|||||||
@@ -264,7 +264,8 @@ class Constants
|
|||||||
OPPNOMAXHAND = 142,
|
OPPNOMAXHAND = 142,
|
||||||
CANTCREW = 143,
|
CANTCREW = 143,
|
||||||
HIDDENFACE = 144,
|
HIDDENFACE = 144,
|
||||||
NB_BASIC_ABILITIES = 145,
|
ANYTYPEOFMANA = 145,
|
||||||
|
NB_BASIC_ABILITIES = 146,
|
||||||
|
|
||||||
RARITY_S = 'S', //Special Rarity
|
RARITY_S = 'S', //Special Rarity
|
||||||
RARITY_M = 'M', //Mythics
|
RARITY_M = 'M', //Mythics
|
||||||
|
|||||||
@@ -388,7 +388,14 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Counters
|
//Counters
|
||||||
if (anyCounter)
|
if (anyCounter == -1)
|
||||||
|
{
|
||||||
|
if (card->counters->mCount)
|
||||||
|
{
|
||||||
|
match = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (anyCounter)
|
||||||
{
|
{
|
||||||
if (!(card->counters->mCount))
|
if (!(card->counters->mCount))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1119,6 +1119,26 @@ void GameObserver::Affinity()
|
|||||||
///we handle trisnisphere seperately because its a desaster.
|
///we handle trisnisphere seperately because its a desaster.
|
||||||
if(card->getManaCost())//make sure we check, abiliy$!/token dont have a mancost object.
|
if(card->getManaCost())//make sure we check, abiliy$!/token dont have a mancost object.
|
||||||
{
|
{
|
||||||
|
//change cost to colorless for anytypeofmana ability
|
||||||
|
if(card->has(Constants::ANYTYPEOFMANA))
|
||||||
|
{
|
||||||
|
card->anymanareplacement = true;
|
||||||
|
int convertedC = card->getManaCost()->getConvertedCost();
|
||||||
|
card->getManaCost()->changeCostTo( NEW ManaCost(ManaCost::parseManaCost("{0}", NULL, card)) );
|
||||||
|
for (int jj = 0; jj < convertedC; jj++)
|
||||||
|
{
|
||||||
|
card->getManaCost()->add(Constants::MTG_COLOR_ARTIFACT, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (card->anymanareplacement)
|
||||||
|
{
|
||||||
|
card->getManaCost()->changeCostTo( card->model->data->getManaCost() );
|
||||||
|
card->anymanareplacement = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (card->has(Constants::TRINISPHERE))
|
if (card->has(Constants::TRINISPHERE))
|
||||||
{
|
{
|
||||||
for (int jj = card->getManaCost()->getConvertedCost(); jj < 3; jj++)
|
for (int jj = card->getManaCost()->getConvertedCost(); jj < 3; jj++)
|
||||||
|
|||||||
@@ -241,6 +241,7 @@ void MTGCardInstance::initMTGCI()
|
|||||||
miracle = false;
|
miracle = false;
|
||||||
hasCopiedToken = false;
|
hasCopiedToken = false;
|
||||||
countTrini = 0;
|
countTrini = 0;
|
||||||
|
anymanareplacement = false;
|
||||||
imprintedCards.clear();
|
imprintedCards.clear();
|
||||||
attackCost = 0;
|
attackCost = 0;
|
||||||
attackCostBackup = 0;
|
attackCostBackup = 0;
|
||||||
|
|||||||
@@ -175,7 +175,8 @@ const char* Constants::MTGBasicAbilities[] = {
|
|||||||
"canblocktapped",
|
"canblocktapped",
|
||||||
"oppnomaxhand",
|
"oppnomaxhand",
|
||||||
"cantcrew",
|
"cantcrew",
|
||||||
"hiddenface"//test for facedown
|
"hiddenface",//test for facedown
|
||||||
|
"anytypeofmana"
|
||||||
};
|
};
|
||||||
|
|
||||||
map<string,int> Constants::MTGBasicAbilitiesMap;
|
map<string,int> Constants::MTGBasicAbilitiesMap;
|
||||||
|
|||||||
@@ -746,6 +746,10 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
|||||||
{
|
{
|
||||||
cd->anyCounter = 1;
|
cd->anyCounter = 1;
|
||||||
}
|
}
|
||||||
|
else if (attribute.find("{notany}") != string::npos)
|
||||||
|
{
|
||||||
|
cd->anyCounter = -1;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
size_t start = attribute.find("{");
|
size_t start = attribute.find("{");
|
||||||
|
|||||||
Reference in New Issue
Block a user