Fix Planeswalker Rule & ABlink

This commit is contained in:
Anthony Calosa
2015-10-15 12:23:32 +08:00
parent a207936231
commit 851bd88de6
2 changed files with 15 additions and 8 deletions

View File

@@ -5271,7 +5271,7 @@ void ABlink::returnCardIntoPlay(MTGCardInstance* _target) {
return; return;
} }
MTGGameZone * inplay = spell->source->owner->game->inPlay; /*MTGGameZone * inplay = spell->source->owner->game->inPlay;
spell->source->target = NULL; spell->source->target = NULL;
for (int i = game->getRandomGenerator()->random()%inplay->nb_cards;;i = game->getRandomGenerator()->random()%inplay->nb_cards) for (int i = game->getRandomGenerator()->random()%inplay->nb_cards;;i = game->getRandomGenerator()->random()%inplay->nb_cards)
{ {
@@ -5285,7 +5285,16 @@ void ABlink::returnCardIntoPlay(MTGCardInstance* _target) {
this->forceDestroy = 1; this->forceDestroy = 1;
return; return;
} }
} }*/
//replaced with castcard(putinplay)
MTGAbility *a = NEW AACastCard(game, game->mLayers->actionLayer()->getMaxId(), Blinker, Blinker,false,false,false,"","Return to Play",false,true);
a->oneShot = false;
a->canBeInterrupted = false;
a->addToGame();
SAFE_DELETE(spell);
SAFE_DELETE(tc);
this->forceDestroy = 1;
return;
} }
spell->source->power = spell->source->origpower; spell->source->power = spell->source->origpower;
spell->source->toughness = spell->source->origtoughness; spell->source->toughness = spell->source->origtoughness;

View File

@@ -2529,7 +2529,7 @@ int MTGLegendRule::added(MTGCardInstance * card)
b->oneShot = true; b->oneShot = true;
MTGAbility * b1 = b; MTGAbility * b1 = b;
selection.push_back(b1); selection.push_back(b1);
MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Choose Legend"); MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Legendary Rule");
menuChoice->addToGame(); menuChoice->addToGame();
} }
return 1; return 1;
@@ -2593,20 +2593,18 @@ int MTGPlaneWalkerRule::added(MTGCardInstance * card)
MultiAbility * multi = NEW MultiAbility(game,game->mLayers->actionLayer()->getMaxId(), card, card, NULL); MultiAbility * multi = NEW MultiAbility(game,game->mLayers->actionLayer()->getMaxId(), card, card, NULL);
for(unsigned int i = 0;i < oldCards.size();i++) for(unsigned int i = 0;i < oldCards.size();i++)
{ {
AABuryCard *a = NEW AABuryCard(game, game->mLayers->actionLayer()->getMaxId(), card, oldCards[i]); AAMover *a = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), card, oldCards[i],"ownergraveyard","Keep New");
a->menu = "Keep New";
a->oneShot = true; a->oneShot = true;
multi->Add(a); multi->Add(a);
} }
multi->oneShot = 1; multi->oneShot = 1;
MTGAbility * a1 = multi; MTGAbility * a1 = multi;
selection.push_back(a1); selection.push_back(a1);
AABuryCard *b = NEW AABuryCard(game, game->mLayers->actionLayer()->getMaxId(), card, card); AAMover *b = NEW AAMover(game, game->mLayers->actionLayer()->getMaxId(), card, card,"ownergraveyard","Keep Old");
b->menu = "Keep Old";
b->oneShot = true; b->oneShot = true;
MTGAbility * b1 = b; MTGAbility * b1 = b;
selection.push_back(b1); selection.push_back(b1);
MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Choose Planeswalker"); MTGAbility * menuChoice = NEW MenuAbility(game, game->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Planeswalker Rule");
menuChoice->addToGame(); menuChoice->addToGame();
} }
return 1; return 1;