added 2 new restrictions for use in triggers and abilities
ownerscontrol opponentscontrol ownerscontrol returns 1 if the owner has the card in thier battlefield. 0 otherwise. vice versa. this should make it easier to add cards which should be treated differently depending on who controls them.
This commit is contained in:
@@ -332,6 +332,18 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
|
|||||||
if(!isMorbid)
|
if(!isMorbid)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
check = restriction[i].find("ownerscontrol");
|
||||||
|
if(check != string::npos)
|
||||||
|
{
|
||||||
|
if(card->currentZone != card->owner->game->battlefield)
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
check = restriction[i].find("opponentscontrol");
|
||||||
|
if(check != string::npos)
|
||||||
|
{
|
||||||
|
if(card->currentZone == card->owner->game->battlefield)
|
||||||
|
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