mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
* Expropriate - Fixed a strange problem that the prompt text of the select permanent selection to get the control of the permanent was not shown. Still not clear what the exact reason was but using a player list to save the voters seemed to cause the problem.
This commit is contained in:
parent
06ed2f5927
commit
1dc8f37d20
5 changed files with 64 additions and 29 deletions
|
|
@ -6,7 +6,6 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.players.Players;
|
||||
|
||||
/**
|
||||
* @author JRHerlehy
|
||||
|
|
@ -14,8 +13,6 @@ import mage.players.Players;
|
|||
public abstract class CouncilsDilemmaVoteEffect extends OneShotEffect {
|
||||
|
||||
protected int voteOneCount = 0, voteTwoCount = 0;
|
||||
protected final Players choiceOneVoters = new Players();
|
||||
protected final Players choiceTwoVoters = new Players();
|
||||
|
||||
public CouncilsDilemmaVoteEffect(Outcome outcome) {
|
||||
super(outcome);
|
||||
|
|
@ -33,11 +30,9 @@ public abstract class CouncilsDilemmaVoteEffect extends OneShotEffect {
|
|||
"Choose " + choiceOne + " or " + choiceTwo + "?",
|
||||
source.getRule(), choiceOne, choiceTwo, source, game)) {
|
||||
voteOneCount++;
|
||||
choiceOneVoters.addPlayer(player);
|
||||
game.informPlayers(player.getName() + " has voted for " + choiceOne);
|
||||
} else {
|
||||
voteTwoCount++;
|
||||
choiceTwoVoters.addPlayer(player);
|
||||
game.informPlayers(player.getName() + " has voted for " + choiceTwo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
package mage.game.events;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -30,7 +28,7 @@ public abstract class EventDispatcher<E extends ExternalEvent> implements Serial
|
|||
listener.event(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void removeAllListener() {
|
||||
listeners.clear();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue