fix can produce mana
limited for land...
This commit is contained in:
@@ -204,12 +204,6 @@ type=Enchantment
|
|||||||
subtype=Aura
|
subtype=Aura
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Squandered Resources
|
|
||||||
text=Sacrifice a land: Add to your mana pool one mana of any type the sacrificed land could produce.
|
|
||||||
mana={B}{G}
|
|
||||||
type=Enchantment
|
|
||||||
[/card]
|
|
||||||
[card]
|
|
||||||
name=Talruum Piper
|
name=Talruum Piper
|
||||||
text=All creatures with flying able to block Talruum Piper do so.
|
text=All creatures with flying able to block Talruum Piper do so.
|
||||||
mana={4}{R}
|
mana={4}{R}
|
||||||
|
|||||||
@@ -351,6 +351,18 @@ power=2
|
|||||||
toughness=1
|
toughness=1
|
||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
|
name=Squandered Resources
|
||||||
|
auto=this(variable{plandg}>0) {S(land[manag]|mybattlefield)}:Add{G}
|
||||||
|
auto=this(variable{plandu}>0) {S(land[manau]|mybattlefield)}:Add{U}
|
||||||
|
auto=this(variable{plandr}>0) {S(land[manar]|mybattlefield)}:Add{R}
|
||||||
|
auto=this(variable{plandb}>0) {S(land[manab]|mybattlefield)}:Add{B}
|
||||||
|
auto=this(variable{plandw}>0) {S(land[manaw]|mybattlefield)}:Add{W}
|
||||||
|
auto=this(variable{plandc}>0) {S(land[manac]|mybattlefield)}:Add{C}
|
||||||
|
text=Sacrifice a land: Add to your mana pool one mana of any type the sacrificed land could produce.
|
||||||
|
mana={B}{G}
|
||||||
|
type=Enchantment
|
||||||
|
[/card]
|
||||||
|
[card]
|
||||||
name=Staggershock
|
name=Staggershock
|
||||||
target=creature,player
|
target=creature,player
|
||||||
auto=damage:2
|
auto=damage:2
|
||||||
|
|||||||
@@ -1080,17 +1080,17 @@ public:
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
for (int i = 0; i < player->game->battlefield->nb_cards; i++)
|
for (int i = 0; i < player->game->battlefield->nb_cards; i++)
|
||||||
{
|
{
|
||||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceC && (color == Constants::MTG_COLOR_ARTIFACT || color == Constants::MTG_COLOR_WASTE))
|
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceC && (color == Constants::MTG_COLOR_ARTIFACT || color == Constants::MTG_COLOR_WASTE))
|
||||||
count += 1;
|
count += 1;
|
||||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceG && color == Constants::MTG_COLOR_GREEN)
|
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceG && color == Constants::MTG_COLOR_GREEN)
|
||||||
count += 1;
|
count += 1;
|
||||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceU && color == Constants::MTG_COLOR_BLUE)
|
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceU && color == Constants::MTG_COLOR_BLUE)
|
||||||
count += 1;
|
count += 1;
|
||||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceR && color == Constants::MTG_COLOR_RED)
|
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceR && color == Constants::MTG_COLOR_RED)
|
||||||
count += 1;
|
count += 1;
|
||||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceB && color == Constants::MTG_COLOR_BLACK)
|
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceB && color == Constants::MTG_COLOR_BLACK)
|
||||||
count += 1;
|
count += 1;
|
||||||
if(((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceW && color == Constants::MTG_COLOR_WHITE)
|
if(((MTGCardInstance *)player->game->battlefield->cards[i])->isLand() && ((MTGCardInstance *)player->game->battlefield->cards[i])->canproduceW && color == Constants::MTG_COLOR_WHITE)
|
||||||
count += 1;
|
count += 1;
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
|
|||||||
@@ -67,6 +67,12 @@ class CardDescriptor: public MTGCardInstance
|
|||||||
int CDdamager;
|
int CDdamager;
|
||||||
int CDgeared;
|
int CDgeared;
|
||||||
int CDblocked;
|
int CDblocked;
|
||||||
|
int CDcanProduceC;
|
||||||
|
int CDcanProduceG;
|
||||||
|
int CDcanProduceU;
|
||||||
|
int CDcanProduceR;
|
||||||
|
int CDcanProduceB;
|
||||||
|
int CDcanProduceW;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -26,6 +26,12 @@ CardDescriptor::CardDescriptor()
|
|||||||
CDdamager = 0;
|
CDdamager = 0;
|
||||||
CDgeared = 0;
|
CDgeared = 0;
|
||||||
CDblocked = 0;
|
CDblocked = 0;
|
||||||
|
CDcanProduceC = 0;
|
||||||
|
CDcanProduceG = 0;
|
||||||
|
CDcanProduceU = 0;
|
||||||
|
CDcanProduceR = 0;
|
||||||
|
CDcanProduceB = 0;
|
||||||
|
CDcanProduceW = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CardDescriptor::init()
|
int CardDescriptor::init()
|
||||||
@@ -239,6 +245,36 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card)
|
|||||||
match = NULL;
|
match = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((CDcanProduceC == -1 && card->canproduceC == 1) || (CDcanProduceC == 1 && card->canproduceC == 0))
|
||||||
|
{
|
||||||
|
match = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((CDcanProduceG == -1 && card->canproduceG == 1) || (CDcanProduceG == 1 && card->canproduceG == 0))
|
||||||
|
{
|
||||||
|
match = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((CDcanProduceU == -1 && card->canproduceU == 1) || (CDcanProduceU == 1 && card->canproduceU == 0))
|
||||||
|
{
|
||||||
|
match = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((CDcanProduceR == -1 && card->canproduceR == 1) || (CDcanProduceR == 1 && card->canproduceR == 0))
|
||||||
|
{
|
||||||
|
match = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((CDcanProduceB == -1 && card->canproduceB == 1) || (CDcanProduceB == 1 && card->canproduceB == 0))
|
||||||
|
{
|
||||||
|
match = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((CDcanProduceW == -1 && card->canproduceW == 1) || (CDcanProduceW == 1 && card->canproduceW == 0))
|
||||||
|
{
|
||||||
|
match = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if ((isMultiColored == -1 && card->isMultiColored) || (isMultiColored == 1 && !card->isMultiColored))
|
if ((isMultiColored == -1 && card->isMultiColored) || (isMultiColored == 1 && !card->isMultiColored))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -557,6 +557,73 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
|||||||
cd->CDdamager = 1;
|
cd->CDdamager = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//can produce mana
|
||||||
|
else if (attribute.find("manac") != string::npos)
|
||||||
|
{
|
||||||
|
if (minus)
|
||||||
|
{
|
||||||
|
cd->CDcanProduceC = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cd->CDcanProduceC = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (attribute.find("manag") != string::npos)
|
||||||
|
{
|
||||||
|
if (minus)
|
||||||
|
{
|
||||||
|
cd->CDcanProduceG = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cd->CDcanProduceG = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (attribute.find("manau") != string::npos)
|
||||||
|
{
|
||||||
|
if (minus)
|
||||||
|
{
|
||||||
|
cd->CDcanProduceU = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cd->CDcanProduceU = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (attribute.find("manar") != string::npos)
|
||||||
|
{
|
||||||
|
if (minus)
|
||||||
|
{
|
||||||
|
cd->CDcanProduceR = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cd->CDcanProduceR = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (attribute.find("manab") != string::npos)
|
||||||
|
{
|
||||||
|
if (minus)
|
||||||
|
{
|
||||||
|
cd->CDcanProduceB = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cd->CDcanProduceB = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (attribute.find("manaw") != string::npos)
|
||||||
|
{
|
||||||
|
if (minus)
|
||||||
|
{
|
||||||
|
cd->CDcanProduceW = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cd->CDcanProduceW = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (attribute.find("multicolor") != string::npos)
|
else if (attribute.find("multicolor") != string::npos)
|
||||||
{
|
{
|
||||||
//card is multicolored?
|
//card is multicolored?
|
||||||
|
|||||||
Reference in New Issue
Block a user