mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 12:19:59 -08:00
* Grindstone - Fixed a bug causing target player to lose game by grindstone effect itself.
This commit is contained in:
parent
15389b24d8
commit
7529d6f207
3 changed files with 90 additions and 18 deletions
|
|
@ -52,11 +52,6 @@ public class Progenitus extends CardImpl {
|
|||
this.subtype.add("Hydra");
|
||||
this.subtype.add("Avatar");
|
||||
|
||||
this.color.setRed(true);
|
||||
this.color.setBlue(true);
|
||||
this.color.setGreen(true);
|
||||
this.color.setBlack(true);
|
||||
this.color.setWhite(true);
|
||||
this.power = new MageInt(10);
|
||||
this.toughness = new MageInt(10);
|
||||
|
||||
|
|
|
|||
|
|
@ -106,17 +106,23 @@ class GrindstoneEffect extends OneShotEffect {
|
|||
return true;
|
||||
}
|
||||
colorShared = false;
|
||||
Card card1 = targetPlayer.getLibrary().removeFromTop(game);
|
||||
if (card1 != null) {
|
||||
targetPlayer.moveCardToGraveyardWithInfo(card1, source.getSourceId(), game, Zone.LIBRARY);
|
||||
Card card2 = targetPlayer.getLibrary().removeFromTop(game);
|
||||
if (card2 != null) {
|
||||
targetPlayer.moveCardToGraveyardWithInfo(card2, source.getSourceId(), game, Zone.LIBRARY);
|
||||
Card card1 = null;
|
||||
Card card2 = null;
|
||||
if (targetPlayer.getLibrary().size() > 0) {
|
||||
card1 = targetPlayer.getLibrary().removeFromTop(game);
|
||||
if (targetPlayer.getLibrary().size() > 0) {
|
||||
card2 = targetPlayer.getLibrary().removeFromTop(game);
|
||||
if (card1.getColor().hasColor() && card2.getColor().hasColor()) {
|
||||
colorShared = card1.getColor().shares(card2.getColor());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (card1 != null) {
|
||||
targetPlayer.moveCardToGraveyardWithInfo(card1, source.getSourceId(), game, Zone.LIBRARY);
|
||||
}
|
||||
if (card2 != null) {
|
||||
targetPlayer.moveCardToGraveyardWithInfo(card2, source.getSourceId(), game, Zone.LIBRARY);
|
||||
}
|
||||
} while (colorShared && targetPlayer.isInGame());
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue