mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
- Fixed #8832
This commit is contained in:
parent
d2ac4c3b3d
commit
d97e9791ed
1 changed files with 4 additions and 5 deletions
|
@ -15,7 +15,6 @@ import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
|
||||||
import mage.target.common.TargetOpponent;
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -71,6 +70,7 @@ enum LordXanderTheCollectorEffectType {
|
||||||
}
|
}
|
||||||
|
|
||||||
class LordXanderTheCollectorEffect extends OneShotEffect {
|
class LordXanderTheCollectorEffect extends OneShotEffect {
|
||||||
|
|
||||||
private final LordXanderTheCollectorEffectType effectType;
|
private final LordXanderTheCollectorEffectType effectType;
|
||||||
|
|
||||||
LordXanderTheCollectorEffect(LordXanderTheCollectorEffectType LordXanderTheCollectorEffectType) {
|
LordXanderTheCollectorEffect(LordXanderTheCollectorEffectType LordXanderTheCollectorEffectType) {
|
||||||
|
@ -111,17 +111,16 @@ class LordXanderTheCollectorEffect extends OneShotEffect {
|
||||||
player.millCards(count / 2, source, game);
|
player.millCards(count / 2, source, game);
|
||||||
return true;
|
return true;
|
||||||
case SACRIFICE:
|
case SACRIFICE:
|
||||||
count = game.getBattlefield().count(
|
count = game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_CONTROLLED_PERMANENT_NON_LAND, player.getId(), game).size();
|
||||||
StaticFilters.FILTER_CONTROLLED_PERMANENT_NON_LAND, player.getId(), source, game
|
|
||||||
);
|
|
||||||
if (count < 2) {
|
if (count < 2) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
TargetPermanent target = new TargetControlledPermanent(
|
TargetPermanent target = new TargetPermanent(
|
||||||
count / 2, StaticFilters.FILTER_CONTROLLED_PERMANENT_NON_LAND
|
count / 2, StaticFilters.FILTER_CONTROLLED_PERMANENT_NON_LAND
|
||||||
);
|
);
|
||||||
target.setNotTarget(true);
|
target.setNotTarget(true);
|
||||||
target.withChooseHint("sacrifice");
|
target.withChooseHint("sacrifice");
|
||||||
|
target.setRequired(true);
|
||||||
player.choose(outcome, target, source, game);
|
player.choose(outcome, target, source, game);
|
||||||
for (UUID permanentId : target.getTargets()) {
|
for (UUID permanentId : target.getTargets()) {
|
||||||
Permanent permanent = game.getPermanent(permanentId);
|
Permanent permanent = game.getPermanent(permanentId);
|
||||||
|
|
Loading…
Reference in a new issue