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:
@@ -226,6 +226,29 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card,Player * player
|
|||||||
return 0;
|
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");
|
check = restriction[i].find("one of a kind");
|
||||||
if(check != string::npos)
|
if(check != string::npos)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user