added restriction keyword "morbid" it has very specific rules that can not be done with current support...it can be used anywhere existing restrictions can be used....

example card..
[card]
name=Morkrut Banshee
auto=if morbid then choice target(creature) -4/-4 ueot
power=4
toughness=4
mana={3}{b}{b}
[/card]
This commit is contained in:
omegablast2002@yahoo.com
2011-09-12 20:15:51 +00:00
parent 3c7a6abbeb
commit 23f056f39c

View File

@@ -226,6 +226,29 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card,Player * player
return 0;
}
}
check = restriction[i].find("morbid");
if(check != string::npos)
{
bool isMorbid = false;
for(int cp = 0;cp < 2;cp++)
{
Player * checkCurrent = game->players[cp];
MTGGameZone * grave = checkCurrent->game->graveyard;
for(unsigned int gy = 0;gy < grave->cardsSeenThisTurn.size();gy++)
{
MTGCardInstance * checkCard = grave->cardsSeenThisTurn[gy];
if(checkCard->isCreature())
{
isMorbid = true;
break;
}
}
if(isMorbid)
break;
}
if(!isMorbid)
return 0;
}
check = restriction[i].find("one of a kind");
if(check != string::npos)
{