* Banisher Priest - Fixed that the return from exile effect was added to the list of triggered abilities the player has to choose the order for.

This commit is contained in:
LevelX2 2014-04-22 15:13:58 +02:00
parent e0ce6df6b3
commit 35b1e776d2

View file

@ -1202,11 +1202,23 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
if (abilities.isEmpty()) { if (abilities.isEmpty()) {
break; break;
} }
// triggered abilities that don't use the stack have to be executed first (e.g. Banisher Priest Return exiled creature
for (Iterator<TriggeredAbility> it = abilities.iterator(); it.hasNext();) {
TriggeredAbility triggeredAbility = it.next();
if (!triggeredAbility.isUsesStack()) {
state.removeTriggeredAbility(triggeredAbility);
played |= player.triggerAbility(triggeredAbility, this);
it.remove();
}
}
if (abilities.isEmpty()) {
break;
}
if (abilities.size() == 1) { if (abilities.size() == 1) {
state.removeTriggeredAbility(abilities.get(0)); state.removeTriggeredAbility(abilities.get(0));
played |= player.triggerAbility(abilities.get(0), this); played |= player.triggerAbility(abilities.get(0), this);
} }
else { else {
TriggeredAbility ability = player.chooseTriggeredAbility(abilities, this); TriggeredAbility ability = player.chooseTriggeredAbility(abilities, this);
if (ability != null) { if (ability != null) {
state.removeTriggeredAbility(ability); state.removeTriggeredAbility(ability);