mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Support for Starving Revenant (#4172)
This commit is contained in:
@@ -391,6 +391,9 @@ public class DigEffect extends SpellAbilityEffect {
|
||||
}
|
||||
if (destZone1.equals(ZoneType.Battlefield)) {
|
||||
moveParams.put(AbilityKey.SimultaneousETB, movedCards);
|
||||
if (sa.hasParam("GainControl")) {
|
||||
c.setController(player, game.getNextTimestamp());
|
||||
}
|
||||
if (sa.hasParam("WithCounter")) {
|
||||
final int numCtr = AbilityUtils.calculateAmount(host,
|
||||
sa.getParamOrDefault("WithCounterNum", "1"), sa);
|
||||
|
||||
@@ -1160,7 +1160,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
return;
|
||||
}
|
||||
|
||||
final CardCollection topN = new CardCollection(this.getCardsIn(ZoneType.Library, num));
|
||||
final CardCollection topN = getTopXCardsFromLibrary(num);
|
||||
|
||||
if (topN.isEmpty()) {
|
||||
return;
|
||||
@@ -1188,6 +1188,9 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
getGame().getAction().moveToLibrary(c, cause, params);
|
||||
numToTop++;
|
||||
}
|
||||
if (cause.hasParam("RememberKept")) {
|
||||
cause.getHostCard().addRemembered(toTop);
|
||||
}
|
||||
}
|
||||
|
||||
getGame().fireEvent(new GameEventSurveil(this, numToTop, numToGrave));
|
||||
@@ -1653,19 +1656,18 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
}
|
||||
}
|
||||
|
||||
CardCollectionView milledView = getCardsIn(ZoneType.Library);
|
||||
Iterable<Card> milledView = getCardsIn(ZoneType.Library);
|
||||
// 614.13c
|
||||
if (sa.getRootAbility().getReplacingObject(AbilityKey.SimultaneousETB) != null) {
|
||||
Iterables.removeAll(milledView, (CardCollection) sa.getRootAbility().getReplacingObject(AbilityKey.SimultaneousETB));
|
||||
milledView = Iterables.filter(milledView, c -> !((CardCollection) sa.getRootAbility().getReplacingObject(AbilityKey.SimultaneousETB)).contains(c));
|
||||
}
|
||||
CardCollection milled = new CardCollection(Iterables.limit(milledView, n));
|
||||
milledView = milled;
|
||||
CardCollectionView milled = new CardCollection(Iterables.limit(milledView, n));
|
||||
|
||||
if (destination == ZoneType.Graveyard) {
|
||||
milledView = GameActionUtil.orderCardsByTheirOwners(game, milledView, ZoneType.Graveyard, sa);
|
||||
milled = GameActionUtil.orderCardsByTheirOwners(game, milled, ZoneType.Graveyard, sa);
|
||||
}
|
||||
|
||||
for (Card m : milledView) {
|
||||
for (Card m : milled) {
|
||||
final ZoneType origin = m.getZone().getZoneType();
|
||||
final Card d = game.getAction().moveTo(destination, m, sa, params);
|
||||
if (d.getZone().is(destination)) {
|
||||
|
||||
Reference in New Issue
Block a user