mirror of
https://github.com/correl/mage.git
synced 2024-11-22 03:00:11 +00:00
fixed priority bug
This commit is contained in:
parent
f194288c0b
commit
aa8bae1399
3 changed files with 7 additions and 5 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue