mirror of
https://github.com/correl/mage.git
synced 2025-03-07 20:53:18 -10:00
Displaying "Done" button instead of "Cancel" for "target up to" effects
This commit is contained in:
parent
4a3dfed92f
commit
5d19c9cfee
5 changed files with 6 additions and 1 deletions
|
@ -35,6 +35,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.sun.corba.se.spi.monitoring.StatisticMonitoredAttribute;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.RangeOfInfluence;
|
||||
import mage.Constants.TargetController;
|
||||
|
@ -88,10 +89,12 @@ public class HumanPlayer extends PlayerImpl<HumanPlayer> {
|
|||
|
||||
protected static FilterCreatureForCombat filter = new FilterCreatureForCombat();
|
||||
protected static Choice replacementEffectChoice = new ChoiceImpl(true);
|
||||
private static Map<String, Serializable> staticOptions = new HashMap<String, Serializable>();
|
||||
|
||||
static {
|
||||
filter.setTargetController(TargetController.YOU);
|
||||
replacementEffectChoice.setMessage("Choose replacement effect");
|
||||
staticOptions.put("UI.right.btn.text", "Done");
|
||||
}
|
||||
protected transient TargetCreaturePermanent targetCombat = new TargetCreaturePermanent(filter);
|
||||
|
||||
|
@ -229,7 +232,9 @@ public class HumanPlayer extends PlayerImpl<HumanPlayer> {
|
|||
public boolean chooseTarget(Outcome outcome, Target target, Ability source, Game game) {
|
||||
game.getState().setPriorityPlayerId(getId());
|
||||
while (!abort) {
|
||||
game.fireSelectTargetEvent(playerId, target.getMessage(), target.possibleTargets(source==null?null:source.getId(), playerId, game), target.isRequired(), null);
|
||||
game.fireSelectTargetEvent(playerId, target.getMessage(),
|
||||
target.possibleTargets(source==null?null:source.getId(), playerId, game),
|
||||
target.isRequired(), target.getNumberOfTargets() != target.getMaxNumberOfTargets() ? staticOptions : null);
|
||||
waitForResponse();
|
||||
if (response.getUUID() != null) {
|
||||
if (target instanceof TargetPermanent) {
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue