Erwan
- fix a bug with nyxathid
This commit is contained in:
@@ -0,0 +1,36 @@
|
|||||||
|
#text=As Nyxathid comes into play, choose an opponent. Nyxathid gets -1/-1 for each card in the chosen player's hand.
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:186616
|
||||||
|
[PLAYER2]
|
||||||
|
hand:179434
|
||||||
|
library:185140
|
||||||
|
[DO]
|
||||||
|
eot
|
||||||
|
eot
|
||||||
|
next
|
||||||
|
#upkeep
|
||||||
|
next
|
||||||
|
#draw
|
||||||
|
next
|
||||||
|
#main
|
||||||
|
next
|
||||||
|
#combat begin
|
||||||
|
next
|
||||||
|
#attackers
|
||||||
|
186616
|
||||||
|
next
|
||||||
|
#blockers
|
||||||
|
next
|
||||||
|
#damage
|
||||||
|
next
|
||||||
|
#combat end
|
||||||
|
[ASSERT]
|
||||||
|
COMBATEND
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:186616
|
||||||
|
[PLAYER2]
|
||||||
|
hand:179434,185140
|
||||||
|
life:15
|
||||||
|
[END]
|
||||||
@@ -63,6 +63,7 @@ living_lands.txt
|
|||||||
lord_of_the_pit.txt
|
lord_of_the_pit.txt
|
||||||
lord_of_the_pit2.txt
|
lord_of_the_pit2.txt
|
||||||
nantuko_husk.txt
|
nantuko_husk.txt
|
||||||
|
Nyxathid.txt
|
||||||
orcish_lumberjack.txt
|
orcish_lumberjack.txt
|
||||||
paralysis.txt
|
paralysis.txt
|
||||||
paralysis2.txt
|
paralysis2.txt
|
||||||
|
|||||||
@@ -354,8 +354,12 @@ void MTGLibrary::shuffleTopToBottom(int nbcards){
|
|||||||
}
|
}
|
||||||
|
|
||||||
MTGGameZone * MTGGameZone::stringToZone(string zoneName, MTGCardInstance * source,MTGCardInstance * target){
|
MTGGameZone * MTGGameZone::stringToZone(string zoneName, MTGCardInstance * source,MTGCardInstance * target){
|
||||||
Player * p = source->controller();
|
Player *p, *p2;
|
||||||
Player * p2 = target->controller();
|
GameObserver * g = GameObserver::GetInstance();
|
||||||
|
if (!source) p = g->currentlyActing();
|
||||||
|
else p = source->controller();
|
||||||
|
if (!target) p2 = p;
|
||||||
|
else p2 = target->controller();
|
||||||
if(zoneName.compare("mygraveyard") == 0)return p->game->graveyard;
|
if(zoneName.compare("mygraveyard") == 0)return p->game->graveyard;
|
||||||
if(zoneName.compare("opponentgraveyard") == 0) return p->opponent()->game->graveyard;
|
if(zoneName.compare("opponentgraveyard") == 0) return p->opponent()->game->graveyard;
|
||||||
if(zoneName.compare("targetownergraveyard") == 0) return target->owner->game->graveyard;
|
if(zoneName.compare("targetownergraveyard") == 0) return target->owner->game->graveyard;
|
||||||
|
|||||||
@@ -42,29 +42,20 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
|||||||
zoneName = s2;
|
zoneName = s2;
|
||||||
s2 = "";
|
s2 = "";
|
||||||
}
|
}
|
||||||
|
zones[nbzones] = game->currentlyActing()->game->inPlay;
|
||||||
|
|
||||||
//Graveyards
|
//Graveyards
|
||||||
if (zoneName.compare("mygraveyard") == 0){
|
if(zoneName.compare("graveyard") == 0){
|
||||||
zones[nbzones] = game->currentlyActing()->game->graveyard;
|
|
||||||
}else if(zoneName.compare("opponentgraveyard") == 0){
|
|
||||||
zones[nbzones] = game->currentlyActing()->opponent()->game->graveyard;
|
|
||||||
}else if(zoneName.compare("graveyard") == 0){
|
|
||||||
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{
|
|
||||||
|
|
||||||
//inPlay
|
|
||||||
if (zoneName.compare("myinplay") == 0){
|
|
||||||
zones[nbzones] = game->currentlyActing()->game->inPlay;
|
|
||||||
}else if(zoneName.compare("opponentinplay") == 0){
|
|
||||||
zones[nbzones] = game->currentlyActing()->opponent()->game->inPlay;
|
|
||||||
}else if(zoneName.compare("inplay") == 0){
|
}else if(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;
|
||||||
}else{
|
}else{
|
||||||
zones[nbzones] = game->currentlyActing()->game->inPlay;
|
MTGGameZone * zone = MTGGameZone::stringToZone(zoneName, card,card);
|
||||||
}
|
if (zone) zones[nbzones] = zone;
|
||||||
}
|
}
|
||||||
nbzones++;
|
nbzones++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user