quick Fix for zerodead
This commit is contained in:
@@ -405,24 +405,21 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
|
|||||||
if(check != string::npos)//returns true if zero
|
if(check != string::npos)//returns true if zero
|
||||||
{
|
{
|
||||||
bool hasDeadCreature = false;
|
bool hasDeadCreature = false;
|
||||||
for(int cp = 0;cp < 2;cp++)
|
Player * checkCurrent = card->controller();
|
||||||
|
MTGGameZone * grave = checkCurrent->game->graveyard;
|
||||||
|
for(unsigned int gy = 0;gy < grave->cardsSeenThisTurn.size();gy++)
|
||||||
{
|
{
|
||||||
Player * checkCurrent = observer->players[cp];
|
MTGCardInstance * checkCard = grave->cardsSeenThisTurn[gy];
|
||||||
MTGGameZone * grave = checkCurrent->game->graveyard;
|
if(checkCard->isCreature() &&
|
||||||
for(unsigned int gy = 0;gy < grave->cardsSeenThisTurn.size();gy++)
|
((checkCard->previousZone == checkCurrent->game->battlefield))//died from your battlefield
|
||||||
|
)
|
||||||
{
|
{
|
||||||
MTGCardInstance * checkCard = grave->cardsSeenThisTurn[gy];
|
hasDeadCreature = true;
|
||||||
if(checkCard->isCreature() &&
|
break;
|
||||||
((checkCard->previousZone == checkCurrent->game->battlefield))//died from your battlefield
|
|
||||||
)
|
|
||||||
{
|
|
||||||
hasDeadCreature = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(hasDeadCreature)
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
if(hasDeadCreature)
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
//Ensnaring Bridge
|
//Ensnaring Bridge
|
||||||
check = restriction[i].find("powermorethanopponenthand");
|
check = restriction[i].find("powermorethanopponenthand");
|
||||||
|
|||||||
Reference in New Issue
Block a user