Erwan
- Magic 2010 - inplay becomes Battlefield. Wagic is still compatible with both, but try to use "battlefield" from now on. For example moveTo(battlefield) instead of moveTo(inPlay) - Magic 2010 - "Removed from game" becomes "Exile". Wagic is still compatible with both, but try to use "exile" from now on. For example moveTo(exile) instead of moveTo(removedFromGame) - Magic 2010 - "End of turn" step becomes "end" step. Wagic is still compatible with both, but try to use "end" from now on. for example: "@next end" rather than "@next endofturn" (not sure this is more clear than before, but at least it's consistent with the rules)
This commit is contained in:
@@ -83,8 +83,11 @@ class MTGPlayerCards {
|
|||||||
MTGGraveyard * graveyard;
|
MTGGraveyard * graveyard;
|
||||||
MTGHand * hand;
|
MTGHand * hand;
|
||||||
MTGInPlay * inPlay;
|
MTGInPlay * inPlay;
|
||||||
|
MTGInPlay * battlefield; //alias to inPlay
|
||||||
|
|
||||||
MTGStack * stack;
|
MTGStack * stack;
|
||||||
MTGRemovedFromGame * removedFromGame;
|
MTGRemovedFromGame * removedFromGame;
|
||||||
|
MTGRemovedFromGame * exile; //alias to removedFromZone
|
||||||
MTGGameZone * garbage;
|
MTGGameZone * garbage;
|
||||||
|
|
||||||
MTGAllCards * collection;
|
MTGAllCards * collection;
|
||||||
|
|||||||
@@ -571,7 +571,6 @@ AIPlayer * AIPlayerFactory::createAIPlayer(MTGAllCards * collection, MTGPlayerCa
|
|||||||
sprintf(debuf,"Deck File: %s", deckFile);
|
sprintf(debuf,"Deck File: %s", deckFile);
|
||||||
OutputDebugString(debuf);
|
OutputDebugString(debuf);
|
||||||
#endif
|
#endif
|
||||||
int deck_cards_ids[100];
|
|
||||||
MTGDeck * tempDeck = NEW MTGDeck(deckFile, NULL, collection);
|
MTGDeck * tempDeck = NEW MTGDeck(deckFile, NULL, collection);
|
||||||
MTGPlayerCards * deck = NEW MTGPlayerCards(collection,tempDeck);
|
MTGPlayerCards * deck = NEW MTGPlayerCards(collection,tempDeck);
|
||||||
delete tempDeck;
|
delete tempDeck;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const char* Constants::MTGPhaseNames[] =
|
|||||||
"Combat damage",
|
"Combat damage",
|
||||||
"Combat ends",
|
"Combat ends",
|
||||||
"Main phase 2",
|
"Main phase 2",
|
||||||
"End of turn",
|
"End",
|
||||||
"Cleanup",
|
"Cleanup",
|
||||||
"---"
|
"---"
|
||||||
};
|
};
|
||||||
@@ -81,7 +81,7 @@ const char* Constants::MTGPhaseCodeNames[] =
|
|||||||
"combatdamage",
|
"combatdamage",
|
||||||
"combatends",
|
"combatends",
|
||||||
"secondmain",
|
"secondmain",
|
||||||
"endofturn",
|
"end",
|
||||||
"cleanup",
|
"cleanup",
|
||||||
"beforenextturn"
|
"beforenextturn"
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -81,8 +81,11 @@ void MTGPlayerCards::init(){
|
|||||||
graveyard = NEW MTGGraveyard();
|
graveyard = NEW MTGGraveyard();
|
||||||
hand = NEW MTGHand();
|
hand = NEW MTGHand();
|
||||||
inPlay = NEW MTGInPlay();
|
inPlay = NEW MTGInPlay();
|
||||||
|
battlefield=inPlay;
|
||||||
|
|
||||||
stack = NEW MTGStack();
|
stack = NEW MTGStack();
|
||||||
removedFromGame = NEW MTGRemovedFromGame();
|
removedFromGame = NEW MTGRemovedFromGame();
|
||||||
|
exile = removedFromGame;
|
||||||
garbage = NEW MTGGameZone();
|
garbage = NEW MTGGameZone();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,6 +415,13 @@ MTGGameZone * MTGGameZone::stringToZone(string zoneName, MTGCardInstance * sourc
|
|||||||
if(zoneName.compare("ownerinplay") == 0) return target->owner->game->inPlay;
|
if(zoneName.compare("ownerinplay") == 0) return target->owner->game->inPlay;
|
||||||
if(zoneName.compare("inplay") == 0) return p->game->inPlay;
|
if(zoneName.compare("inplay") == 0) return p->game->inPlay;
|
||||||
|
|
||||||
|
if(zoneName.compare("mybattlefield") == 0)return p->game->inPlay;
|
||||||
|
if(zoneName.compare("opponentbattlefield") == 0) return p->opponent()->game->inPlay;
|
||||||
|
if(zoneName.compare("targetownerbattlefield") == 0) return target->owner->game->inPlay;
|
||||||
|
if(zoneName.compare("targetcontrollerbattlefield") == 0) return p2->game->inPlay;
|
||||||
|
if(zoneName.compare("ownerbattlefield") == 0) return target->owner->game->inPlay;
|
||||||
|
if(zoneName.compare("battlefield") == 0) return p->game->inPlay;
|
||||||
|
|
||||||
if(zoneName.compare("myhand") == 0)return p->game->hand;
|
if(zoneName.compare("myhand") == 0)return p->game->hand;
|
||||||
if(zoneName.compare("opponenthand") == 0) return p->opponent()->game->hand;
|
if(zoneName.compare("opponenthand") == 0) return p->opponent()->game->hand;
|
||||||
if(zoneName.compare("targetcontrollerhand") == 0) return p2->game->hand;
|
if(zoneName.compare("targetcontrollerhand") == 0) return p2->game->hand;
|
||||||
@@ -426,6 +436,13 @@ MTGGameZone * MTGGameZone::stringToZone(string zoneName, MTGCardInstance * sourc
|
|||||||
if(zoneName.compare("ownerremovedfromgame") == 0) return target->owner->game->removedFromGame;
|
if(zoneName.compare("ownerremovedfromgame") == 0) return target->owner->game->removedFromGame;
|
||||||
if(zoneName.compare("removedfromgame") == 0) return target->owner->game->removedFromGame;
|
if(zoneName.compare("removedfromgame") == 0) return target->owner->game->removedFromGame;
|
||||||
|
|
||||||
|
if(zoneName.compare("myexile") == 0)return p->game->removedFromGame;
|
||||||
|
if(zoneName.compare("opponentexile") == 0) return p->opponent()->game->removedFromGame;
|
||||||
|
if(zoneName.compare("targetcontrollerexile") == 0) return p2->game->removedFromGame;
|
||||||
|
if(zoneName.compare("targetownerexile") == 0) return target->owner->game->removedFromGame;
|
||||||
|
if(zoneName.compare("ownerexile") == 0) return target->owner->game->removedFromGame;
|
||||||
|
if(zoneName.compare("exile") == 0) return target->owner->game->removedFromGame;
|
||||||
|
|
||||||
if(zoneName.compare("mylibrary") == 0)return p->game->library;
|
if(zoneName.compare("mylibrary") == 0)return p->game->library;
|
||||||
if(zoneName.compare("opponentlibrary") == 0) return p->opponent()->game->library;
|
if(zoneName.compare("opponentlibrary") == 0) return p->opponent()->game->library;
|
||||||
if(zoneName.compare("targetownerlibrary") == 0) return target->owner->game->library;
|
if(zoneName.compare("targetownerlibrary") == 0) return target->owner->game->library;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
|||||||
zones[nbzones] = game->players[0]->game->graveyard;
|
zones[nbzones] = game->players[0]->game->graveyard;
|
||||||
nbzones++;
|
nbzones++;
|
||||||
zones[nbzones] = game->players[1]->game->graveyard;
|
zones[nbzones] = game->players[1]->game->graveyard;
|
||||||
}else if(zoneName.compare("inplay") == 0){
|
}else if(zoneName.compare("battlefield") == 0 || zoneName.compare("inplay") == 0){
|
||||||
zones[nbzones] = game->players[0]->game->inPlay;
|
zones[nbzones] = game->players[0]->game->inPlay;
|
||||||
nbzones++;
|
nbzones++;
|
||||||
zones[nbzones] = game->players[1]->game->inPlay;
|
zones[nbzones] = game->players[1]->game->inPlay;
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ void TestSuiteState::parsePlayerState(int playerId, string s, TestSuite * suite)
|
|||||||
area = 1;
|
area = 1;
|
||||||
}else if(areaS.compare("hand") == 0){
|
}else if(areaS.compare("hand") == 0){
|
||||||
area = 2;
|
area = 2;
|
||||||
}else if(areaS.compare("inplay") == 0 ){
|
}else if(areaS.compare("inplay") == 0 || areaS.compare("battlefield") == 0 ){
|
||||||
area = 3;
|
area = 3;
|
||||||
}else if(areaS.compare("life") == 0){
|
}else if(areaS.compare("life") == 0){
|
||||||
playerData[playerId].life = atoi((s.substr(limiter+1)).c_str());
|
playerData[playerId].life = atoi((s.substr(limiter+1)).c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user