Added restriction "during my turn", "during opponent turn".

Added variable "controllerturn", "opponentturn" -> returns integer value if its your turn then 1 if not then 0.

ex. use

restriction=during my turn
otherrestriction=during opponent turn
auto=this(variable{controllerturn}) lord(creature|mybattlefield) 8/0
auto=this(variable{opponentturn}) lord(creature|mybattlefield) 0/8
This commit is contained in:
anthonycalosa@gmail.com
2013-01-18 04:41:24 +00:00
parent fda7166752
commit e67084afb9
2 changed files with 24 additions and 0 deletions
+12
View File
@@ -356,6 +356,18 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
if(cPhase < MTG_PHASE_COMBATBEGIN ||cPhase > MTG_PHASE_COMBATEND )
return 0;
}
check = restriction[i].find("during my turn");
if(check != string::npos)
{
if(player != observer->currentPlayer)
return 0;
}
check = restriction[i].find("during opponent turn");
if(check != string::npos)
{
if(player == observer->currentPlayer)
return 0;
}
check = restriction[i].find("control snow land");
if(check != string::npos)
{