mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 05:52:06 -08:00
* Split Second - Fixed a bug that if more than one split second card was in the game, the zone of the owning card ould not be retrieved correctly.
This commit is contained in:
parent
fd51fc8216
commit
d22153362f
14 changed files with 35 additions and 40 deletions
|
|
@ -78,9 +78,9 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect<PutLibraryInt
|
|||
// putting cards to grave shouldn't end the game, so getting minimun available
|
||||
int cardsCount = Math.min(amount.calculate(game, source), player.getLibrary().size());
|
||||
for (int i = 0; i < cardsCount; i++) {
|
||||
Card card = player.getLibrary().removeFromTop(game);
|
||||
Card card = player.getLibrary().getFromTop(game);
|
||||
if (card != null) {
|
||||
card.moveToZone(Zone.GRAVEYARD, source.getId(), game, false);
|
||||
player.moveCardToGraveyardWithInfo(card, source.getId(), game, Zone.LIBRARY);
|
||||
}
|
||||
else {
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -17,14 +17,9 @@ import mage.game.events.GameEvent;
|
|||
* As long as this spell is on the stack, players can't cast other spells or activate abilities that aren't mana abilities.
|
||||
*/
|
||||
|
||||
public class SplitSecondAbility extends SimpleStaticAbility implements MageSingleton {
|
||||
private static final SplitSecondAbility ability = new SplitSecondAbility();
|
||||
public class SplitSecondAbility extends SimpleStaticAbility {
|
||||
|
||||
public static SplitSecondAbility getInstance() {
|
||||
return ability;
|
||||
}
|
||||
|
||||
private SplitSecondAbility() {
|
||||
public SplitSecondAbility() {
|
||||
super(Zone.STACK, new SplitSecondEffect());
|
||||
this.setRuleAtTheTop(true);
|
||||
}
|
||||
|
|
@ -34,9 +29,13 @@ public class SplitSecondAbility extends SimpleStaticAbility implements MageSingl
|
|||
return "Split second <i>(As long as this spell is on the stack, players can't cast spells or activate abilities that aren't mana abilities.)</i>";
|
||||
}
|
||||
|
||||
public SplitSecondAbility(SplitSecondAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleStaticAbility copy() {
|
||||
return ability;
|
||||
return new SplitSecondAbility(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue