Added C21, STA and STX (still in progress) sets, improved Android downloader, added/fixed primitives, added a keyword to get if a card has "X" in its cost, fixed a crash while targeting a spell on stack, added a new option "nolegend" to clone keyword in order to create a token without legendary type and rule, improved "hascnt" keyword with "anycnt" option to count all counters on a card, added a new keyword "hasstorecard" to get if a card has a stored card or not(e.g. fizzlers), added a new keyword "pgmanainstantsorcery" to count the mana value of all instants and sorceries in player graveyard, added a new keyword "currentphase" to get the current game phase.
This commit is contained in:
@@ -1684,7 +1684,6 @@ int GameObserver::isInPlay(MTGCardInstance * card)
|
||||
}
|
||||
int GameObserver::isInGrave(MTGCardInstance * card)
|
||||
{
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * graveyard = players[i]->game->graveyard;
|
||||
@@ -1695,7 +1694,6 @@ int GameObserver::isInGrave(MTGCardInstance * card)
|
||||
}
|
||||
int GameObserver::isInExile(MTGCardInstance * card)
|
||||
{
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * exile = players[i]->game->exile;
|
||||
@@ -1706,7 +1704,6 @@ int GameObserver::isInExile(MTGCardInstance * card)
|
||||
}
|
||||
int GameObserver::isInCommandZone(MTGCardInstance * card)
|
||||
{
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * commandzone = players[i]->game->commandzone;
|
||||
@@ -1717,7 +1714,6 @@ int GameObserver::isInCommandZone(MTGCardInstance * card)
|
||||
}
|
||||
int GameObserver::isInHand(MTGCardInstance * card)
|
||||
{
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * hand = players[i]->game->hand;
|
||||
@@ -1728,7 +1724,6 @@ int GameObserver::isInHand(MTGCardInstance * card)
|
||||
}
|
||||
int GameObserver::isInLibrary(MTGCardInstance * card)
|
||||
{
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * library = players[i]->game->library;
|
||||
@@ -1737,6 +1732,16 @@ int GameObserver::isInLibrary(MTGCardInstance * card)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int GameObserver::isInStack(MTGCardInstance * card)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * stack = players[i]->game->stack;
|
||||
if (players[i]->game->isInZone(card, stack))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
void GameObserver::cleanupPhase()
|
||||
{
|
||||
currentPlayer->cleanupPhase();
|
||||
|
||||
Reference in New Issue
Block a user