mirror of
https://github.com/correl/mage.git
synced 2025-03-07 20:53:18 -10:00
Fixed weird replacement effects showing from otehr games (#643).
This commit is contained in:
parent
a3bc452795
commit
009f2a85fd
1 changed files with 5 additions and 6 deletions
|
@ -102,19 +102,17 @@ public class HumanPlayer extends PlayerImpl {
|
|||
protected static FilterCreatureForCombat filterCreatureForCombat = new FilterCreatureForCombat();
|
||||
protected static FilterAttackingCreature filterAttack = new FilterAttackingCreature();
|
||||
protected static FilterBlockingCreature filterBlock = new FilterBlockingCreature();
|
||||
protected static final Choice replacementEffectChoice = new ChoiceImpl(true);
|
||||
protected final Choice replacementEffectChoice;
|
||||
|
||||
private static final Logger log = Logger.getLogger(HumanPlayer.class);
|
||||
|
||||
static {
|
||||
replacementEffectChoice.setMessage("Choose replacement effect to resolve first");
|
||||
}
|
||||
|
||||
protected HashSet<String> autoSelectReplacementEffects = new HashSet<>();
|
||||
protected ManaCost currentlyUnpaidMana;
|
||||
|
||||
public HumanPlayer(String name, RangeOfInfluence range, int skill) {
|
||||
super(name, range);
|
||||
replacementEffectChoice = new ChoiceImpl(true);
|
||||
replacementEffectChoice.setMessage("Choose replacement effect to resolve first");
|
||||
human = true;
|
||||
}
|
||||
|
||||
|
@ -122,6 +120,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
super(player);
|
||||
this.autoSelectReplacementEffects.addAll(autoSelectReplacementEffects);
|
||||
this.currentlyUnpaidMana = player.currentlyUnpaidMana;
|
||||
this.replacementEffectChoice = player.replacementEffectChoice;
|
||||
}
|
||||
|
||||
protected void waitForResponse(Game game) {
|
||||
|
@ -515,7 +514,7 @@ public class HumanPlayer extends PlayerImpl {
|
|||
public boolean chooseTargetAmount(Outcome outcome, TargetAmount target, Ability source, Game game) {
|
||||
updateGameStatePriority("chooseTargetAmount", game);
|
||||
while (!abort) {
|
||||
game.fireSelectTargetEvent(playerId, addSecondLineWithObjectName(target.getMessage() + "\n Amount remaining:" + target.getAmountRemaining(), source.getSourceId(), game),
|
||||
game.fireSelectTargetEvent(playerId, addSecondLineWithObjectName(target.getMessage() + "\n Amount remaining:" + target.getAmountRemaining(), source == null ? null : source.getSourceId(), game),
|
||||
target.possibleTargets(source == null ? null : source.getSourceId(), playerId, game),
|
||||
target.isRequired(source),
|
||||
getOptions(target, null));
|
||||
|
|
Loading…
Add table
Reference in a new issue