mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fixed a bug that could lead to endless loops if cards where moved from library to graveyard.
This commit is contained in:
parent
df83621acf
commit
5af6b6ca7a
2 changed files with 8 additions and 3 deletions
|
@ -101,10 +101,15 @@ class CorpsejackMenaceReplacementEffect extends ReplacementEffectImpl {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ADD_COUNTERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.ADD_COUNTER && event.getData().equals(CounterType.P1P1.getName())) {
|
||||
if (event.getData().equals(CounterType.P1P1.getName())) {
|
||||
Permanent target = game.getPermanent(event.getTargetId());
|
||||
if (target != null && target.getControllerId().equals(source.getControllerId())
|
||||
&& target.getCardType().contains(CardType.CREATURE)) {
|
||||
|
|
|
@ -2786,7 +2786,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
cards.add(card);
|
||||
}
|
||||
}
|
||||
allCards.removeAll(cards);
|
||||
allCards.removeAll(cards.getCards(game));
|
||||
// move cards ot graveyard in order the owner decides
|
||||
if (cards.size() != 0) {
|
||||
TargetCard target = new TargetCard(fromZone, new FilterCard("card to put on the top of your graveyard (last one chosen will be topmost)"));
|
||||
|
|
Loading…
Reference in a new issue