mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Update ReplacementMill
This commit is contained in:
@@ -1670,8 +1670,8 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
// Replacement effects
|
// Replacement effects
|
||||||
final Map<AbilityKey, Object> repRunParams = AbilityKey.mapFromAffected(this);
|
final Map<AbilityKey, Object> repRunParams = AbilityKey.mapFromAffected(this);
|
||||||
repRunParams.put(AbilityKey.Number, n);
|
repRunParams.put(AbilityKey.Number, n);
|
||||||
repRunParams.put(AbilityKey.Destination, destination);
|
|
||||||
|
|
||||||
|
if (destination == ZoneType.Graveyard && !bottom) {
|
||||||
switch (getGame().getReplacementHandler().run(ReplacementType.Mill, repRunParams)) {
|
switch (getGame().getReplacementHandler().run(ReplacementType.Mill, repRunParams)) {
|
||||||
case NotReplaced:
|
case NotReplaced:
|
||||||
break;
|
break;
|
||||||
@@ -1686,6 +1686,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
default:
|
default:
|
||||||
return milled;
|
return milled;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final int max = Math.min(n, lib.size());
|
final int max = Math.min(n, lib.size());
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ package forge.game.replacement;
|
|||||||
import forge.game.ability.AbilityKey;
|
import forge.game.ability.AbilityKey;
|
||||||
import forge.game.card.Card;
|
import forge.game.card.Card;
|
||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
import forge.game.zone.ZoneType;
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,9 +44,6 @@ public class ReplaceMill extends ReplacementEffect {
|
|||||||
@Override
|
@Override
|
||||||
public boolean canReplace(Map<AbilityKey, Object> runParams) {
|
public boolean canReplace(Map<AbilityKey, Object> runParams) {
|
||||||
|
|
||||||
if (ZoneType.Graveyard != ((ZoneType) runParams.get(AbilityKey.Destination))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (hasParam("ValidPlayer")) {
|
if (hasParam("ValidPlayer")) {
|
||||||
if (!matchesValid(runParams.get(AbilityKey.Affected), getParam("ValidPlayer").split(","), getHostCard())) {
|
if (!matchesValid(runParams.get(AbilityKey.Affected), getParam("ValidPlayer").split(","), getHostCard())) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user