- 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:
wagic.the.homebrew@gmail.com
2009-06-17 13:11:45 +00:00
parent 43bc3f9137
commit 53b1b5e9ec
6 changed files with 24 additions and 5 deletions

View File

@@ -83,8 +83,11 @@ class MTGPlayerCards {
MTGGraveyard * graveyard;
MTGHand * hand;
MTGInPlay * inPlay;
MTGInPlay * battlefield; //alias to inPlay
MTGStack * stack;
MTGRemovedFromGame * removedFromGame;
MTGRemovedFromGame * exile; //alias to removedFromZone
MTGGameZone * garbage;
MTGAllCards * collection;

View File

@@ -571,7 +571,6 @@ AIPlayer * AIPlayerFactory::createAIPlayer(MTGAllCards * collection, MTGPlayerCa
sprintf(debuf,"Deck File: %s", deckFile);
OutputDebugString(debuf);
#endif
int deck_cards_ids[100];
MTGDeck * tempDeck = NEW MTGDeck(deckFile, NULL, collection);
MTGPlayerCards * deck = NEW MTGPlayerCards(collection,tempDeck);
delete tempDeck;

View File

@@ -63,7 +63,7 @@ const char* Constants::MTGPhaseNames[] =
"Combat damage",
"Combat ends",
"Main phase 2",
"End of turn",
"End",
"Cleanup",
"---"
};
@@ -81,7 +81,7 @@ const char* Constants::MTGPhaseCodeNames[] =
"combatdamage",
"combatends",
"secondmain",
"endofturn",
"end",
"cleanup",
"beforenextturn"
};

View File

@@ -81,8 +81,11 @@ void MTGPlayerCards::init(){
graveyard = NEW MTGGraveyard();
hand = NEW MTGHand();
inPlay = NEW MTGInPlay();
battlefield=inPlay;
stack = NEW MTGStack();
removedFromGame = NEW MTGRemovedFromGame();
exile = removedFromGame;
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("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("opponenthand") == 0) return p->opponent()->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("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("opponentlibrary") == 0) return p->opponent()->game->library;
if(zoneName.compare("targetownerlibrary") == 0) return target->owner->game->library;

View File

@@ -48,7 +48,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
zones[nbzones] = game->players[0]->game->graveyard;
nbzones++;
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;
nbzones++;
zones[nbzones] = game->players[1]->game->inPlay;

View File

@@ -175,7 +175,7 @@ void TestSuiteState::parsePlayerState(int playerId, string s, TestSuite * suite)
area = 1;
}else if(areaS.compare("hand") == 0){
area = 2;
}else if(areaS.compare("inplay") == 0 ){
}else if(areaS.compare("inplay") == 0 || areaS.compare("battlefield") == 0 ){
area = 3;
}else if(areaS.compare("life") == 0){
playerData[playerId].life = atoi((s.substr(limiter+1)).c_str());