fixed priority bug

This commit is contained in:
BetaSteward 2010-05-07 04:00:11 +00:00
parent f194288c0b
commit aa8bae1399
3 changed files with 7 additions and 5 deletions

View file

@ -42,7 +42,6 @@ import mage.abilities.costs.mana.VariableManaCost;
import mage.abilities.effects.ReplacementEffect;
import mage.cards.Card;
import mage.cards.Cards;
import mage.cards.decks.Deck;
import mage.choices.Choice;
import mage.counters.Counters;
import mage.game.events.GameEvent;
@ -73,7 +72,7 @@ public interface Player extends MageItem {
public Cards getHand();
public boolean isPassed();
public boolean isEmptyDraw();
public void resetPriority();
public void resetPassed();
public boolean hasLost();
public boolean hasWon();
public boolean hasLeft();

View file

@ -388,6 +388,9 @@ public abstract class PlayerImpl implements Player, Serializable {
result = playAbility((ActivatedAbility)ability.copy(), game);
}
//if player has taken an action then reset all player passed flags
if (result)
game.getPlayers().resetPassed();
return result;
}
@ -586,7 +589,7 @@ public abstract class PlayerImpl implements Player, Serializable {
}
@Override
public void resetPriority() {
public void resetPassed() {
passed = false;
}

View file

@ -41,9 +41,9 @@ public class Players extends LinkedHashMap<UUID, Player> {
this.put(player.getId(), player);
}
public void resetPriority() {
public void resetPassed() {
for (Player player: this.values()) {
player.resetPriority();
player.resetPassed();
}
}
}