mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Fixed Anowon, the Ruin Sage
This commit is contained in:
parent
6316580aa7
commit
f5164fa526
2 changed files with 5 additions and 3 deletions
|
@ -77,7 +77,7 @@ public class SacrificeAllEffect extends OneShotEffect<SacrificeAllEffect> {
|
|||
for (Player player: game.getPlayers().values()) {
|
||||
int numTargets = Math.min(amount, game.getBattlefield().countAll(filter, player.getId()));
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(numTargets, numTargets, filter, false);
|
||||
if (target.canChoose(source.getControllerId(), game)) {
|
||||
if (target.canChoose(player.getId(), game)) {
|
||||
while (!target.isChosen()) {
|
||||
player.choose(Outcome.Sacrifice, target, game);
|
||||
}
|
||||
|
|
|
@ -136,8 +136,10 @@ public class TargetPermanent<T extends TargetPermanent<T>> extends TargetObject<
|
|||
@Override
|
||||
public boolean canChoose(UUID sourceControllerId, Game game) {
|
||||
int remainingTargets = this.minNumberOfTargets - targets.size();
|
||||
if (remainingTargets == 0)
|
||||
return true;
|
||||
if (remainingTargets == 0) {
|
||||
// if we return true, then AnowonTheRuinSage will hang for AI when no targets in play
|
||||
return false;
|
||||
}
|
||||
int count = 0;
|
||||
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, sourceControllerId, game)) {
|
||||
if (!targets.containsKey(permanent.getId())) {
|
||||
|
|
Loading…
Reference in a new issue