mirror of
https://github.com/correl/mage.git
synced 2025-04-10 17:00:08 -09:00
Fix 'chosen' spelling (#9021)
This commit is contained in:
parent
74a16d179f
commit
9084180937
26 changed files with 103 additions and 103 deletions
Mage.Client/src/main/java/mage/client/game
Mage.Common/src/main/java/mage/view
Mage.Sets/src/mage/cards
a
b
e
f
l
m
s
t
v
w
Mage/src/main/java/mage
abilities
condition/common
effects/common
game
target
|
@ -1381,11 +1381,11 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
needZone = (Zone) lastGameData.options.get("targetZone");
|
needZone = (Zone) lastGameData.options.get("targetZone");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<UUID> needChoosen;
|
List<UUID> needChosen;
|
||||||
if (lastGameData.options != null && lastGameData.options.containsKey("chosen")) {
|
if (lastGameData.options != null && lastGameData.options.containsKey("chosen")) {
|
||||||
needChoosen = (List<UUID>) lastGameData.options.get("chosen");
|
needChosen = (List<UUID>) lastGameData.options.get("chosen");
|
||||||
} else {
|
} else {
|
||||||
needChoosen = new ArrayList<>();
|
needChosen = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<UUID> needSelectable;
|
Set<UUID> needSelectable;
|
||||||
|
@ -1402,7 +1402,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
needPlayable = new PlayableObjectsList();
|
needPlayable = new PlayableObjectsList();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needChoosen.isEmpty() && needSelectable.isEmpty() && needPlayable.isEmpty()) {
|
if (needChosen.isEmpty() && needSelectable.isEmpty() && needPlayable.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1412,7 +1412,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
if (needSelectable.contains(card.getId())) {
|
if (needSelectable.contains(card.getId())) {
|
||||||
card.setChoosable(true);
|
card.setChoosable(true);
|
||||||
}
|
}
|
||||||
if (needChoosen.contains(card.getId())) {
|
if (needChosen.contains(card.getId())) {
|
||||||
card.setSelected(true);
|
card.setSelected(true);
|
||||||
}
|
}
|
||||||
if (needPlayable.containsObject(card.getId())) {
|
if (needPlayable.containsObject(card.getId())) {
|
||||||
|
@ -1427,7 +1427,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
if (needSelectable.contains(card.getKey())) {
|
if (needSelectable.contains(card.getKey())) {
|
||||||
card.getValue().setChoosable(true);
|
card.getValue().setChoosable(true);
|
||||||
}
|
}
|
||||||
if (needChoosen.contains(card.getKey())) {
|
if (needChosen.contains(card.getKey())) {
|
||||||
card.getValue().setSelected(true);
|
card.getValue().setSelected(true);
|
||||||
}
|
}
|
||||||
// users can activate abilities of the spell on the stack (example: Lightning Storm);
|
// users can activate abilities of the spell on the stack (example: Lightning Storm);
|
||||||
|
@ -1444,7 +1444,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
if (needSelectable.contains(perm.getKey())) {
|
if (needSelectable.contains(perm.getKey())) {
|
||||||
perm.getValue().setChoosable(true);
|
perm.getValue().setChoosable(true);
|
||||||
}
|
}
|
||||||
if (needChoosen.contains(perm.getKey())) {
|
if (needChosen.contains(perm.getKey())) {
|
||||||
perm.getValue().setSelected(true);
|
perm.getValue().setSelected(true);
|
||||||
}
|
}
|
||||||
if (needPlayable.containsObject(perm.getKey())) {
|
if (needPlayable.containsObject(perm.getKey())) {
|
||||||
|
@ -1461,7 +1461,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
if (needSelectable.contains(card.getKey())) {
|
if (needSelectable.contains(card.getKey())) {
|
||||||
card.getValue().setChoosable(true);
|
card.getValue().setChoosable(true);
|
||||||
}
|
}
|
||||||
if (needChoosen.contains(card.getKey())) {
|
if (needChosen.contains(card.getKey())) {
|
||||||
card.getValue().setSelected(true);
|
card.getValue().setSelected(true);
|
||||||
}
|
}
|
||||||
if (needPlayable.containsObject(card.getKey())) {
|
if (needPlayable.containsObject(card.getKey())) {
|
||||||
|
@ -1478,7 +1478,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
if (needSelectable.contains(card.getKey())) {
|
if (needSelectable.contains(card.getKey())) {
|
||||||
card.getValue().setChoosable(true);
|
card.getValue().setChoosable(true);
|
||||||
}
|
}
|
||||||
if (needChoosen.contains(card.getKey())) {
|
if (needChosen.contains(card.getKey())) {
|
||||||
card.getValue().setSelected(true);
|
card.getValue().setSelected(true);
|
||||||
}
|
}
|
||||||
if (needPlayable.containsObject(card.getKey())) {
|
if (needPlayable.containsObject(card.getKey())) {
|
||||||
|
@ -1488,7 +1488,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// sideboards (old windows all the time, e.g. unattached from game data)
|
// sideboards (old windows all the time, e.g. unattached from game data)
|
||||||
prepareSelectableWindows(sideboardWindows.values(), needSelectable, needChoosen, needPlayable);
|
prepareSelectableWindows(sideboardWindows.values(), needSelectable, needChosen, needPlayable);
|
||||||
|
|
||||||
// exile
|
// exile
|
||||||
if (needZone == Zone.EXILED || needZone == Zone.ALL) {
|
if (needZone == Zone.EXILED || needZone == Zone.ALL) {
|
||||||
|
@ -1498,7 +1498,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
if (needSelectable.contains(card.getId())) {
|
if (needSelectable.contains(card.getId())) {
|
||||||
card.setChoosable(true);
|
card.setChoosable(true);
|
||||||
}
|
}
|
||||||
if (needChoosen.contains(card.getId())) {
|
if (needChosen.contains(card.getId())) {
|
||||||
card.setSelected(true);
|
card.setSelected(true);
|
||||||
}
|
}
|
||||||
if (needPlayable.containsObject(card.getId())) {
|
if (needPlayable.containsObject(card.getId())) {
|
||||||
|
@ -1513,7 +1513,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
if (needSelectable.contains(card.getKey())) {
|
if (needSelectable.contains(card.getKey())) {
|
||||||
card.getValue().setChoosable(true);
|
card.getValue().setChoosable(true);
|
||||||
}
|
}
|
||||||
if (needChoosen.contains(card.getKey())) {
|
if (needChosen.contains(card.getKey())) {
|
||||||
card.getValue().setSelected(true);
|
card.getValue().setSelected(true);
|
||||||
}
|
}
|
||||||
if (needPlayable.containsObject(card.getKey())) {
|
if (needPlayable.containsObject(card.getKey())) {
|
||||||
|
@ -1530,7 +1530,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
if (needSelectable.contains(com.getId())) {
|
if (needSelectable.contains(com.getId())) {
|
||||||
com.setChoosable(true);
|
com.setChoosable(true);
|
||||||
}
|
}
|
||||||
if (needChoosen.contains(com.getId())) {
|
if (needChosen.contains(com.getId())) {
|
||||||
com.setSelected(true);
|
com.setSelected(true);
|
||||||
}
|
}
|
||||||
if (needPlayable.containsObject(com.getId())) {
|
if (needPlayable.containsObject(com.getId())) {
|
||||||
|
@ -1546,7 +1546,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
if (needSelectable.contains(card.getKey())) {
|
if (needSelectable.contains(card.getKey())) {
|
||||||
card.getValue().setChoosable(true);
|
card.getValue().setChoosable(true);
|
||||||
}
|
}
|
||||||
if (needChoosen.contains(card.getKey())) {
|
if (needChosen.contains(card.getKey())) {
|
||||||
card.getValue().setSelected(true);
|
card.getValue().setSelected(true);
|
||||||
}
|
}
|
||||||
if (needPlayable.containsObject(card.getKey())) {
|
if (needPlayable.containsObject(card.getKey())) {
|
||||||
|
@ -1561,7 +1561,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
if (needSelectable.contains(card.getKey())) {
|
if (needSelectable.contains(card.getKey())) {
|
||||||
card.getValue().setChoosable(true);
|
card.getValue().setChoosable(true);
|
||||||
}
|
}
|
||||||
if (needChoosen.contains(card.getKey())) {
|
if (needChosen.contains(card.getKey())) {
|
||||||
card.getValue().setSelected(true);
|
card.getValue().setSelected(true);
|
||||||
}
|
}
|
||||||
if (needPlayable.containsObject(card.getKey())) {
|
if (needPlayable.containsObject(card.getKey())) {
|
||||||
|
@ -1570,7 +1570,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// revealed (old windows)
|
// revealed (old windows)
|
||||||
prepareSelectableWindows(revealed.values(), needSelectable, needChoosen, needPlayable);
|
prepareSelectableWindows(revealed.values(), needSelectable, needChosen, needPlayable);
|
||||||
|
|
||||||
// looked at (current cards)
|
// looked at (current cards)
|
||||||
for (LookedAtView look : lastGameData.game.getLookedAt()) {
|
for (LookedAtView look : lastGameData.game.getLookedAt()) {
|
||||||
|
@ -1581,13 +1581,13 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// looked at (old windows)
|
// looked at (old windows)
|
||||||
prepareSelectableWindows(lookedAt.values(), needSelectable, needChoosen, needPlayable);
|
prepareSelectableWindows(lookedAt.values(), needSelectable, needChosen, needPlayable);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void prepareSelectableWindows(
|
private void prepareSelectableWindows(
|
||||||
Collection<CardInfoWindowDialog> windows,
|
Collection<CardInfoWindowDialog> windows,
|
||||||
Set<UUID> needSelectable,
|
Set<UUID> needSelectable,
|
||||||
List<UUID> needChoosen,
|
List<UUID> needChosen,
|
||||||
PlayableObjectsList needPlayable
|
PlayableObjectsList needPlayable
|
||||||
) {
|
) {
|
||||||
// lookAt or reveals windows clean up on next priority, so users can see dialogs, but xmage can't restore it
|
// lookAt or reveals windows clean up on next priority, so users can see dialogs, but xmage can't restore it
|
||||||
|
@ -1596,7 +1596,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
||||||
for (MageCard mageCard : window.getMageCardsForUpdate().values()) {
|
for (MageCard mageCard : window.getMageCardsForUpdate().values()) {
|
||||||
CardView cardView = mageCard.getOriginal();
|
CardView cardView = mageCard.getOriginal();
|
||||||
cardView.setChoosable(needSelectable.contains(cardView.getId()));
|
cardView.setChoosable(needSelectable.contains(cardView.getId()));
|
||||||
cardView.setSelected(needChoosen.contains(cardView.getId()));
|
cardView.setSelected(needChosen.contains(cardView.getId()));
|
||||||
if (needPlayable.containsObject(cardView.getId())) {
|
if (needPlayable.containsObject(cardView.getId())) {
|
||||||
cardView.setPlayableStats(needPlayable.getStats(cardView.getId()));
|
cardView.setPlayableStats(needPlayable.getStats(cardView.getId()));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -556,7 +556,7 @@ public class CardView extends SimpleCardView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// show for modal spell, which mode was choosen
|
// show for modal spell, which mode was chosen
|
||||||
if (spell.getSpellAbility().isModal()) {
|
if (spell.getSpellAbility().isModal()) {
|
||||||
for (UUID modeId : spell.getSpellAbility().getModes().getSelectedModes()) {
|
for (UUID modeId : spell.getSpellAbility().getModes().getSelectedModes()) {
|
||||||
Mode mode = spell.getSpellAbility().getModes().get(modeId);
|
Mode mode = spell.getSpellAbility().getModes().get(modeId);
|
||||||
|
|
|
@ -122,7 +122,7 @@ public class StackAbilityView extends CardView {
|
||||||
getRules().add("<i>Related objects: " + names + "</i>");
|
getRules().add("<i>Related objects: " + names + "</i>");
|
||||||
}
|
}
|
||||||
|
|
||||||
// show for modal ability, which mode was choosen
|
// show for modal ability, which mode was chosen
|
||||||
if (ability.isModal()) {
|
if (ability.isModal()) {
|
||||||
Modes modes = ability.getModes();
|
Modes modes = ability.getModes();
|
||||||
for (UUID modeId : modes.getSelectedModes()) {
|
for (UUID modeId : modes.getSelectedModes()) {
|
||||||
|
|
|
@ -105,7 +105,7 @@ class AetherspoutsEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TargetCard target = new TargetCard(Zone.BATTLEFIELD, new FilterCard("order to put on the top of library (last choosen will be the top most)"));
|
TargetCard target = new TargetCard(Zone.BATTLEFIELD, new FilterCard("order to put on the top of library (last chosen will be the top most)"));
|
||||||
while (cards.size() > 1) {
|
while (cards.size() > 1) {
|
||||||
if (!player.canRespond()) {
|
if (!player.canRespond()) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -145,7 +145,7 @@ class AetherspoutsEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
target = new TargetCard(Zone.BATTLEFIELD, new FilterCard("order to put on bottom of library (last choosen will be bottommost card)"));
|
target = new TargetCard(Zone.BATTLEFIELD, new FilterCard("order to put on bottom of library (last chosen will be bottommost card)"));
|
||||||
while (player.canRespond() && cards.size() > 1) {
|
while (player.canRespond() && cards.size() > 1) {
|
||||||
player.choose(Outcome.Neutral, cards, target, game);
|
player.choose(Outcome.Neutral, cards, target, game);
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ class AlhammarretHighArbiterEffect extends OneShotEffect {
|
||||||
controller.chooseTarget(Outcome.Benefit, revealedCards, target, source, game);
|
controller.chooseTarget(Outcome.Benefit, revealedCards, target, source, game);
|
||||||
Card card = game.getCard(target.getFirstTarget());
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
game.informPlayers("The choosen card name is [" + GameLog.getColoredObjectName(card) + ']');
|
game.informPlayers("The chosen card name is [" + GameLog.getColoredObjectName(card) + ']');
|
||||||
Permanent sourcePermanent = game.getPermanentEntering(source.getSourceId());
|
Permanent sourcePermanent = game.getPermanentEntering(source.getSourceId());
|
||||||
if (sourcePermanent == null) {
|
if (sourcePermanent == null) {
|
||||||
sourcePermanent = game.getPermanentEntering(source.getSourceId());
|
sourcePermanent = game.getPermanentEntering(source.getSourceId());
|
||||||
|
|
|
@ -120,9 +120,9 @@ class ArchangelOfStrifeWarEffect extends BoostAllEffect {
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
UUID controllerId = permanent.getControllerId();
|
UUID controllerId = permanent.getControllerId();
|
||||||
|
|
||||||
String choosenMode = (String) game.getState().getValue(controllerId + "_" + source.getSourceId() + "_modeChoice");
|
String chosenMode = (String) game.getState().getValue(controllerId + "_" + source.getSourceId() + "_modeChoice");
|
||||||
|
|
||||||
return creaturefilter.match(permanent, game) && choosenMode != null && choosenMode.equals("war");
|
return creaturefilter.match(permanent, game) && chosenMode != null && chosenMode.equals("war");
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -151,9 +151,9 @@ class ArchangelOfStrifePeaceEffect extends BoostAllEffect {
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
UUID controllerId = permanent.getControllerId();
|
UUID controllerId = permanent.getControllerId();
|
||||||
|
|
||||||
String choosenMode = (String) game.getState().getValue(controllerId + "_" + source.getSourceId() + "_modeChoice");
|
String chosenMode = (String) game.getState().getValue(controllerId + "_" + source.getSourceId() + "_modeChoice");
|
||||||
|
|
||||||
return creaturefilter.match(permanent, game) && choosenMode != null && choosenMode.equals("peace");
|
return creaturefilter.match(permanent, game) && chosenMode != null && chosenMode.equals("peace");
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -81,23 +81,23 @@ class BloodOathEffect extends OneShotEffect {
|
||||||
choiceImpl.setChoices(choice);
|
choiceImpl.setChoices(choice);
|
||||||
if (player.choose(Outcome.Neutral, choiceImpl, game)) {
|
if (player.choose(Outcome.Neutral, choiceImpl, game)) {
|
||||||
CardType type = null;
|
CardType type = null;
|
||||||
String choosenType = choiceImpl.getChoice();
|
String chosenType = choiceImpl.getChoice();
|
||||||
|
|
||||||
if (choosenType.equals(CardType.ARTIFACT.toString())) {
|
if (chosenType.equals(CardType.ARTIFACT.toString())) {
|
||||||
type = CardType.ARTIFACT;
|
type = CardType.ARTIFACT;
|
||||||
} else if (choosenType.equals(CardType.LAND.toString())) {
|
} else if (chosenType.equals(CardType.LAND.toString())) {
|
||||||
type = CardType.LAND;
|
type = CardType.LAND;
|
||||||
} else if (choosenType.equals(CardType.CREATURE.toString())) {
|
} else if (chosenType.equals(CardType.CREATURE.toString())) {
|
||||||
type = CardType.CREATURE;
|
type = CardType.CREATURE;
|
||||||
} else if (choosenType.equals(CardType.ENCHANTMENT.toString())) {
|
} else if (chosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||||
type = CardType.ENCHANTMENT;
|
type = CardType.ENCHANTMENT;
|
||||||
} else if (choosenType.equals(CardType.INSTANT.toString())) {
|
} else if (chosenType.equals(CardType.INSTANT.toString())) {
|
||||||
type = CardType.INSTANT;
|
type = CardType.INSTANT;
|
||||||
} else if (choosenType.equals(CardType.SORCERY.toString())) {
|
} else if (chosenType.equals(CardType.SORCERY.toString())) {
|
||||||
type = CardType.SORCERY;
|
type = CardType.SORCERY;
|
||||||
} else if (choosenType.equals(CardType.PLANESWALKER.toString())) {
|
} else if (chosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||||
type = CardType.PLANESWALKER;
|
type = CardType.PLANESWALKER;
|
||||||
} else if (choosenType.equals(CardType.TRIBAL.toString())) {
|
} else if (chosenType.equals(CardType.TRIBAL.toString())) {
|
||||||
type = CardType.TRIBAL;
|
type = CardType.TRIBAL;
|
||||||
}
|
}
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
|
|
|
@ -41,7 +41,7 @@ public final class EntropicSpecter extends CardImpl {
|
||||||
|
|
||||||
// Entropic Specter's power and toughness are each equal to the number of cards in the chosen player's hand.
|
// Entropic Specter's power and toughness are each equal to the number of cards in the chosen player's hand.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL,
|
this.addAbility(new SimpleStaticAbility(Zone.ALL,
|
||||||
// back to the graveyard or if the choosen player left the gane it's again a 0/0
|
// back to the graveyard or if the chosen player left the gane it's again a 0/0
|
||||||
new SetPowerToughnessSourceEffect(CardsInTargetPlayerHandCount.instance, Duration.WhileOnBattlefield, SubLayer.CharacteristicDefining_7a)));
|
new SetPowerToughnessSourceEffect(CardsInTargetPlayerHandCount.instance, Duration.WhileOnBattlefield, SubLayer.CharacteristicDefining_7a)));
|
||||||
|
|
||||||
// Whenever Entropic Specter deals damage to a player, that player discards a card.
|
// Whenever Entropic Specter deals damage to a player, that player discards a card.
|
||||||
|
|
|
@ -84,23 +84,23 @@ class FertileImaginationEffect extends OneShotEffect {
|
||||||
choiceImpl.setChoices(choice);
|
choiceImpl.setChoices(choice);
|
||||||
if (player.choose(Outcome.Neutral, choiceImpl, game)) {
|
if (player.choose(Outcome.Neutral, choiceImpl, game)) {
|
||||||
CardType type = null;
|
CardType type = null;
|
||||||
String choosenType = choiceImpl.getChoice();
|
String chosenType = choiceImpl.getChoice();
|
||||||
|
|
||||||
if (choosenType.equals(CardType.ARTIFACT.toString())) {
|
if (chosenType.equals(CardType.ARTIFACT.toString())) {
|
||||||
type = CardType.ARTIFACT;
|
type = CardType.ARTIFACT;
|
||||||
} else if (choosenType.equals(CardType.LAND.toString())) {
|
} else if (chosenType.equals(CardType.LAND.toString())) {
|
||||||
type = CardType.LAND;
|
type = CardType.LAND;
|
||||||
} else if (choosenType.equals(CardType.CREATURE.toString())) {
|
} else if (chosenType.equals(CardType.CREATURE.toString())) {
|
||||||
type = CardType.CREATURE;
|
type = CardType.CREATURE;
|
||||||
} else if (choosenType.equals(CardType.ENCHANTMENT.toString())) {
|
} else if (chosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||||
type = CardType.ENCHANTMENT;
|
type = CardType.ENCHANTMENT;
|
||||||
} else if (choosenType.equals(CardType.INSTANT.toString())) {
|
} else if (chosenType.equals(CardType.INSTANT.toString())) {
|
||||||
type = CardType.INSTANT;
|
type = CardType.INSTANT;
|
||||||
} else if (choosenType.equals(CardType.SORCERY.toString())) {
|
} else if (chosenType.equals(CardType.SORCERY.toString())) {
|
||||||
type = CardType.SORCERY;
|
type = CardType.SORCERY;
|
||||||
} else if (choosenType.equals(CardType.PLANESWALKER.toString())) {
|
} else if (chosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||||
type = CardType.PLANESWALKER;
|
type = CardType.PLANESWALKER;
|
||||||
} else if (choosenType.equals(CardType.TRIBAL.toString())) {
|
} else if (chosenType.equals(CardType.TRIBAL.toString())) {
|
||||||
type = CardType.TRIBAL;
|
type = CardType.TRIBAL;
|
||||||
}
|
}
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
|
|
|
@ -75,11 +75,11 @@ class LavabrinkVenturerEffect extends GainAbilitySourceEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
String choosenMode = (String) game.getState().getValue(source.getSourceId() + "_modeChoice");
|
String chosenMode = (String) game.getState().getValue(source.getSourceId() + "_modeChoice");
|
||||||
if (choosenMode == null) {
|
if (chosenMode == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
switch (choosenMode) {
|
switch (chosenMode) {
|
||||||
case "Odd":
|
case "Odd":
|
||||||
this.ability = new ProtectionAbility(oddFilter);
|
this.ability = new ProtectionAbility(oddFilter);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -102,7 +102,7 @@ class LilianaWakerOfTheDeadDiscardEffect extends OneShotEffect {
|
||||||
cards.addAll(target.getTargets());
|
cards.addAll(target.getTargets());
|
||||||
cardsToDiscard.put(playerId, cards);
|
cardsToDiscard.put(playerId, cards);
|
||||||
}
|
}
|
||||||
// discard all choosen cards
|
// discard all chosen cards
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
|
|
|
@ -97,7 +97,7 @@ class MindSwordsEffect extends OneShotEffect {
|
||||||
cards.addAll(target.getTargets());
|
cards.addAll(target.getTargets());
|
||||||
cardsToExile.put(playerId, cards);
|
cardsToExile.put(playerId, cards);
|
||||||
}
|
}
|
||||||
// Exile all choosen cards
|
// Exile all chosen cards
|
||||||
for (UUID playerId : game.getOpponents(source.getControllerId())) {
|
for (UUID playerId : game.getOpponents(source.getControllerId())) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
|
|
|
@ -96,7 +96,7 @@ class TargetTwoNonLandCardsWithSameNameInHand extends TargetCardInHand {
|
||||||
Cards cardsToCheck = new CardsImpl();
|
Cards cardsToCheck = new CardsImpl();
|
||||||
cardsToCheck.addAll(possibleTargets);
|
cardsToCheck.addAll(possibleTargets);
|
||||||
if (targets.size() == 1) {
|
if (targets.size() == 1) {
|
||||||
// first target is laready choosen, now only targets with the same name are selectable
|
// first target is laready chosen, now only targets with the same name are selectable
|
||||||
for (Map.Entry<UUID, Integer> entry : targets.entrySet()) {
|
for (Map.Entry<UUID, Integer> entry : targets.entrySet()) {
|
||||||
Card chosenCard = cardsToCheck.get(entry.getKey(), game);
|
Card chosenCard = cardsToCheck.get(entry.getKey(), game);
|
||||||
if (chosenCard != null) {
|
if (chosenCard != null) {
|
||||||
|
|
|
@ -80,13 +80,13 @@ class StorageMatrixRestrictionEffect extends RestrictionEffect {
|
||||||
choiceImpl.setChoices(choice);
|
choiceImpl.setChoices(choice);
|
||||||
Player player = game.getPlayer(game.getActivePlayerId());
|
Player player = game.getPlayer(game.getActivePlayerId());
|
||||||
if (player != null && player.choose(outcome, choiceImpl, game)) {
|
if (player != null && player.choose(outcome, choiceImpl, game)) {
|
||||||
String choosenType = choiceImpl.getChoice();
|
String chosenType = choiceImpl.getChoice();
|
||||||
if (choosenType != null) {
|
if (chosenType != null) {
|
||||||
game.informPlayers(storageMatrix.getLogName() + ": " + player.getLogName() + " chose to untap " + choosenType);
|
game.informPlayers(storageMatrix.getLogName() + ": " + player.getLogName() + " chose to untap " + chosenType);
|
||||||
|
|
||||||
if (choosenType.equals(CardType.ARTIFACT.toString())) {
|
if (chosenType.equals(CardType.ARTIFACT.toString())) {
|
||||||
type = CardType.ARTIFACT;
|
type = CardType.ARTIFACT;
|
||||||
} else if (choosenType.equals(CardType.LAND.toString())) {
|
} else if (chosenType.equals(CardType.LAND.toString())) {
|
||||||
type = CardType.LAND;
|
type = CardType.LAND;
|
||||||
} else {
|
} else {
|
||||||
type = CardType.CREATURE;
|
type = CardType.CREATURE;
|
||||||
|
|
|
@ -76,7 +76,7 @@ class StrongarmTacticsEffect extends OneShotEffect {
|
||||||
cardsToDiscard.put(playerId, cards);
|
cardsToDiscard.put(playerId, cards);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// discard all choosen cards
|
// discard all chosen cards
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
|
|
|
@ -63,21 +63,21 @@ class StrongholdGambitEffect extends OneShotEffect {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
MageObject sourceObject = game.getObject(source);
|
MageObject sourceObject = game.getObject(source);
|
||||||
if (controller != null && sourceObject != null) {
|
if (controller != null && sourceObject != null) {
|
||||||
Map<UUID, UUID> choosenCard = new LinkedHashMap<>();
|
Map<UUID, UUID> chosenCards = new LinkedHashMap<>();
|
||||||
for (UUID playerId : game.getState().getPlayerList(controller.getId())) {
|
for (UUID playerId : game.getState().getPlayerList(controller.getId())) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null && !player.getHand().isEmpty()) {
|
if (player != null && !player.getHand().isEmpty()) {
|
||||||
TargetCardInHand target = new TargetCardInHand();
|
TargetCardInHand target = new TargetCardInHand();
|
||||||
if (player.choose(Outcome.Benefit, target, source, game)) {
|
if (player.choose(Outcome.Benefit, target, source, game)) {
|
||||||
choosenCard.put(playerId, target.getFirstTarget());
|
chosenCards.put(playerId, target.getFirstTarget());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int lowestCMC = Integer.MAX_VALUE;
|
int lowestCMC = Integer.MAX_VALUE;
|
||||||
for (UUID playerId : game.getState().getPlayerList(controller.getId())) {
|
for (UUID playerId : game.getState().getPlayerList(controller.getId())) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null && choosenCard.containsKey(playerId)) {
|
if (player != null && chosenCards.containsKey(playerId)) {
|
||||||
Card card = game.getCard(choosenCard.get(playerId));
|
Card card = game.getCard(chosenCards.get(playerId));
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
Cards cardsToReveal = new CardsImpl(card);
|
Cards cardsToReveal = new CardsImpl(card);
|
||||||
player.revealCards(sourceObject.getIdName() + " (" + player.getName() + ')', cardsToReveal, game);
|
player.revealCards(sourceObject.getIdName() + " (" + player.getName() + ')', cardsToReveal, game);
|
||||||
|
@ -92,8 +92,8 @@ class StrongholdGambitEffect extends OneShotEffect {
|
||||||
Cards creaturesToBattlefield = new CardsImpl();
|
Cards creaturesToBattlefield = new CardsImpl();
|
||||||
for (UUID playerId : game.getState().getPlayerList(controller.getId())) {
|
for (UUID playerId : game.getState().getPlayerList(controller.getId())) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null && choosenCard.containsKey(playerId)) {
|
if (player != null && chosenCards.containsKey(playerId)) {
|
||||||
Card card = game.getCard(choosenCard.get(playerId));
|
Card card = game.getCard(chosenCards.get(playerId));
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
if (card.isCreature(game)
|
if (card.isCreature(game)
|
||||||
&& lowestCMC == card.getManaValue()) {
|
&& lowestCMC == card.getManaValue()) {
|
||||||
|
|
|
@ -86,10 +86,10 @@ class TeferisRealmEffect extends OneShotEffect {
|
||||||
if (!player.choose(outcome, choiceImpl, game)) {
|
if (!player.choose(outcome, choiceImpl, game)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
String choosenType = choiceImpl.getChoice();
|
String chosenType = choiceImpl.getChoice();
|
||||||
FilterPermanent filter = new FilterPermanent();
|
FilterPermanent filter = new FilterPermanent();
|
||||||
filter.add(TokenPredicate.FALSE);
|
filter.add(TokenPredicate.FALSE);
|
||||||
switch (choosenType) {
|
switch (chosenType) {
|
||||||
case ARTIFACT:
|
case ARTIFACT:
|
||||||
filter.add(CardType.ARTIFACT.getPredicate());
|
filter.add(CardType.ARTIFACT.getPredicate());
|
||||||
break;
|
break;
|
||||||
|
@ -106,7 +106,7 @@ class TeferisRealmEffect extends OneShotEffect {
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
game.informPlayers(player.getLogName() + " chooses " + choosenType + "s to phase out");
|
game.informPlayers(player.getLogName() + " chooses " + chosenType + "s to phase out");
|
||||||
List<UUID> permIds = new ArrayList<>();
|
List<UUID> permIds = new ArrayList<>();
|
||||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, controller.getId(), game)) {
|
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, controller.getId(), game)) {
|
||||||
permIds.add(permanent.getId());
|
permIds.add(permanent.getId());
|
||||||
|
|
|
@ -65,7 +65,7 @@ class TragicArroganceffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
Set<Permanent> choosenPermanent = new HashSet<>();
|
Set<Permanent> chosenPermanents = new HashSet<>();
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
|
@ -89,7 +89,7 @@ class TragicArroganceffect extends OneShotEffect {
|
||||||
controller.chooseTarget(Outcome.Benefit, target1, source, game);
|
controller.chooseTarget(Outcome.Benefit, target1, source, game);
|
||||||
Permanent artifact = game.getPermanent(target1.getFirstTarget());
|
Permanent artifact = game.getPermanent(target1.getFirstTarget());
|
||||||
if (artifact != null) {
|
if (artifact != null) {
|
||||||
choosenPermanent.add(artifact);
|
chosenPermanents.add(artifact);
|
||||||
}
|
}
|
||||||
target1.clearChosen();
|
target1.clearChosen();
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ class TragicArroganceffect extends OneShotEffect {
|
||||||
controller.chooseTarget(Outcome.Benefit, target2, source, game);
|
controller.chooseTarget(Outcome.Benefit, target2, source, game);
|
||||||
Permanent creature = game.getPermanent(target2.getFirstTarget());
|
Permanent creature = game.getPermanent(target2.getFirstTarget());
|
||||||
if (creature != null) {
|
if (creature != null) {
|
||||||
choosenPermanent.add(creature);
|
chosenPermanents.add(creature);
|
||||||
}
|
}
|
||||||
target2.clearChosen();
|
target2.clearChosen();
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ class TragicArroganceffect extends OneShotEffect {
|
||||||
controller.chooseTarget(Outcome.Benefit, target3, source, game);
|
controller.chooseTarget(Outcome.Benefit, target3, source, game);
|
||||||
Permanent enchantment = game.getPermanent(target3.getFirstTarget());
|
Permanent enchantment = game.getPermanent(target3.getFirstTarget());
|
||||||
if (enchantment != null) {
|
if (enchantment != null) {
|
||||||
choosenPermanent.add(enchantment);
|
chosenPermanents.add(enchantment);
|
||||||
}
|
}
|
||||||
target3.clearChosen();
|
target3.clearChosen();
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ class TragicArroganceffect extends OneShotEffect {
|
||||||
controller.chooseTarget(Outcome.Benefit, target4, source, game);
|
controller.chooseTarget(Outcome.Benefit, target4, source, game);
|
||||||
Permanent planeswalker = game.getPermanent(target4.getFirstTarget());
|
Permanent planeswalker = game.getPermanent(target4.getFirstTarget());
|
||||||
if (planeswalker != null) {
|
if (planeswalker != null) {
|
||||||
choosenPermanent.add(planeswalker);
|
chosenPermanents.add(planeswalker);
|
||||||
}
|
}
|
||||||
target4.clearChosen();
|
target4.clearChosen();
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ class TragicArroganceffect extends OneShotEffect {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENTS_NON_LAND, playerId, game)) {
|
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENTS_NON_LAND, playerId, game)) {
|
||||||
if (!choosenPermanent.contains(permanent)) {
|
if (!chosenPermanents.contains(permanent)) {
|
||||||
permanent.sacrifice(source, game);
|
permanent.sacrifice(source, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,26 +84,26 @@ class VigeanIntuitionEffect extends OneShotEffect {
|
||||||
Choice choiceImpl = new ChoiceImpl();
|
Choice choiceImpl = new ChoiceImpl();
|
||||||
choiceImpl.setChoices(choice);
|
choiceImpl.setChoices(choice);
|
||||||
if (player.choose(Outcome.Neutral, choiceImpl, game)) {
|
if (player.choose(Outcome.Neutral, choiceImpl, game)) {
|
||||||
String choosenType = choiceImpl.getChoice();
|
String chosenType = choiceImpl.getChoice();
|
||||||
if (choosenType == null || choosenType.isEmpty()) {
|
if (chosenType == null || chosenType.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
CardType type = null;
|
CardType type = null;
|
||||||
if (choosenType.equals(CardType.ARTIFACT.toString())) {
|
if (chosenType.equals(CardType.ARTIFACT.toString())) {
|
||||||
type = CardType.ARTIFACT;
|
type = CardType.ARTIFACT;
|
||||||
} else if (choosenType.equals(CardType.LAND.toString())) {
|
} else if (chosenType.equals(CardType.LAND.toString())) {
|
||||||
type = CardType.LAND;
|
type = CardType.LAND;
|
||||||
} else if (choosenType.equals(CardType.CREATURE.toString())) {
|
} else if (chosenType.equals(CardType.CREATURE.toString())) {
|
||||||
type = CardType.CREATURE;
|
type = CardType.CREATURE;
|
||||||
} else if (choosenType.equals(CardType.ENCHANTMENT.toString())) {
|
} else if (chosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||||
type = CardType.ENCHANTMENT;
|
type = CardType.ENCHANTMENT;
|
||||||
} else if (choosenType.equals(CardType.INSTANT.toString())) {
|
} else if (chosenType.equals(CardType.INSTANT.toString())) {
|
||||||
type = CardType.INSTANT;
|
type = CardType.INSTANT;
|
||||||
} else if (choosenType.equals(CardType.SORCERY.toString())) {
|
} else if (chosenType.equals(CardType.SORCERY.toString())) {
|
||||||
type = CardType.SORCERY;
|
type = CardType.SORCERY;
|
||||||
} else if (choosenType.equals(CardType.PLANESWALKER.toString())) {
|
} else if (chosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||||
type = CardType.PLANESWALKER;
|
type = CardType.PLANESWALKER;
|
||||||
} else if (choosenType.equals(CardType.TRIBAL.toString())) {
|
} else if (chosenType.equals(CardType.TRIBAL.toString())) {
|
||||||
type = CardType.TRIBAL;
|
type = CardType.TRIBAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,22 +91,22 @@ class WorldQuellerEffect extends OneShotEffect {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
CardType type = null;
|
CardType type = null;
|
||||||
String choosenType = choiceImpl.getChoice();
|
String chosenType = choiceImpl.getChoice();
|
||||||
if (choosenType.equals(CardType.ARTIFACT.toString())) {
|
if (chosenType.equals(CardType.ARTIFACT.toString())) {
|
||||||
type = CardType.ARTIFACT;
|
type = CardType.ARTIFACT;
|
||||||
} else if (choosenType.equals(CardType.LAND.toString())) {
|
} else if (chosenType.equals(CardType.LAND.toString())) {
|
||||||
type = CardType.LAND;
|
type = CardType.LAND;
|
||||||
} else if (choosenType.equals(CardType.CREATURE.toString())) {
|
} else if (chosenType.equals(CardType.CREATURE.toString())) {
|
||||||
type = CardType.CREATURE;
|
type = CardType.CREATURE;
|
||||||
} else if (choosenType.equals(CardType.ENCHANTMENT.toString())) {
|
} else if (chosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||||
type = CardType.ENCHANTMENT;
|
type = CardType.ENCHANTMENT;
|
||||||
} else if (choosenType.equals(CardType.INSTANT.toString())) {
|
} else if (chosenType.equals(CardType.INSTANT.toString())) {
|
||||||
type = CardType.INSTANT;
|
type = CardType.INSTANT;
|
||||||
} else if (choosenType.equals(CardType.SORCERY.toString())) {
|
} else if (chosenType.equals(CardType.SORCERY.toString())) {
|
||||||
type = CardType.SORCERY;
|
type = CardType.SORCERY;
|
||||||
} else if (choosenType.equals(CardType.PLANESWALKER.toString())) {
|
} else if (chosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||||
type = CardType.PLANESWALKER;
|
type = CardType.PLANESWALKER;
|
||||||
} else if (choosenType.equals(CardType.TRIBAL.toString())) {
|
} else if (chosenType.equals(CardType.TRIBAL.toString())) {
|
||||||
type = CardType.TRIBAL;
|
type = CardType.TRIBAL;
|
||||||
}
|
}
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class ModeChoiceSourceCondition implements Condition {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
String choosenMode = (String) game.getState().getValue(source.getSourceId() + "_modeChoice");
|
String chosenMode = (String) game.getState().getValue(source.getSourceId() + "_modeChoice");
|
||||||
return choosenMode != null && choosenMode.equals(mode);
|
return chosenMode != null && chosenMode.equals(mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class GainProtectionFromColorSourceEffect extends GainAbilitySourceEffect
|
||||||
ChoiceColor colorChoice = new ChoiceColor(true);
|
ChoiceColor colorChoice = new ChoiceColor(true);
|
||||||
colorChoice.setMessage("Choose color for protection ability");
|
colorChoice.setMessage("Choose color for protection ability");
|
||||||
if (controller.choose(outcome, colorChoice, game)) {
|
if (controller.choose(outcome, colorChoice, game)) {
|
||||||
game.informPlayers("Choosen color: " + colorChoice.getColor());
|
game.informPlayers("Chosen color: " + colorChoice.getColor());
|
||||||
protectionFilter.add(new ColorPredicate(colorChoice.getColor()));
|
protectionFilter.add(new ColorPredicate(colorChoice.getColor()));
|
||||||
protectionFilter.setMessage(colorChoice.getChoice());
|
protectionFilter.setMessage(colorChoice.getChoice());
|
||||||
((ProtectionAbility) ability).setFilter(protectionFilter);
|
((ProtectionAbility) ability).setFilter(protectionFilter);
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class DiscardEachPlayerEffect extends OneShotEffect {
|
||||||
if (randomDiscard) {
|
if (randomDiscard) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// discard all choosen cards
|
// discard all chosen cards
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
|
|
|
@ -2043,7 +2043,7 @@ public abstract class GameImpl implements Game {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the waiting triggered abilities (if there are any) to the stack in
|
* Sets the waiting triggered abilities (if there are any) to the stack in
|
||||||
* the choosen order by player
|
* the chosen order by player
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -130,7 +130,7 @@ public interface Target extends Serializable {
|
||||||
|
|
||||||
Target copy();
|
Target copy();
|
||||||
|
|
||||||
// some targets are choosen from players that are not the controller of the ability (e.g. Pandemonium)
|
// some targets are chosen from players that are not the controller of the ability (e.g. Pandemonium)
|
||||||
void setTargetController(UUID playerId);
|
void setTargetController(UUID playerId);
|
||||||
|
|
||||||
UUID getTargetController();
|
UUID getTargetController();
|
||||||
|
|
|
@ -44,7 +44,7 @@ public abstract class TargetPermanentOrPlayerAmount extends TargetAmount {
|
||||||
@Override
|
@Override
|
||||||
public boolean canTarget(UUID objectId, Game game) {
|
public boolean canTarget(UUID objectId, Game game) {
|
||||||
|
|
||||||
// max targets limit reached (only selected can be choosen again)
|
// max targets limit reached (only selected can be chosen again)
|
||||||
if (getMaxNumberOfTargets() > 0 && getTargets().size() >= getMaxNumberOfTargets()) {
|
if (getMaxNumberOfTargets() > 0 && getTargets().size() >= getMaxNumberOfTargets()) {
|
||||||
return getTargets().contains(objectId);
|
return getTargets().contains(objectId);
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ public abstract class TargetPermanentOrPlayerAmount extends TargetAmount {
|
||||||
@Override
|
@Override
|
||||||
public boolean canTarget(UUID objectId, Ability source, Game game) {
|
public boolean canTarget(UUID objectId, Ability source, Game game) {
|
||||||
|
|
||||||
// max targets limit reached (only selected can be choosen again)
|
// max targets limit reached (only selected can be chosen again)
|
||||||
if (getMaxNumberOfTargets() > 0 && getTargets().size() >= getMaxNumberOfTargets()) {
|
if (getMaxNumberOfTargets() > 0 && getTargets().size() >= getMaxNumberOfTargets()) {
|
||||||
return getTargets().contains(objectId);
|
return getTargets().contains(objectId);
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ public abstract class TargetPermanentOrPlayerAmount extends TargetAmount {
|
||||||
public Set<UUID> possibleTargets(UUID sourceControllerId, Ability source, Game game) {
|
public Set<UUID> possibleTargets(UUID sourceControllerId, Ability source, Game game) {
|
||||||
Set<UUID> possibleTargets = new HashSet<>();
|
Set<UUID> possibleTargets = new HashSet<>();
|
||||||
|
|
||||||
// max targets limit reached (only selected can be choosen again)
|
// max targets limit reached (only selected can be chosen again)
|
||||||
if (getMaxNumberOfTargets() > 0 && getTargets().size() >= getMaxNumberOfTargets()) {
|
if (getMaxNumberOfTargets() > 0 && getTargets().size() >= getMaxNumberOfTargets()) {
|
||||||
possibleTargets.addAll(getTargets());
|
possibleTargets.addAll(getTargets());
|
||||||
return possibleTargets;
|
return possibleTargets;
|
||||||
|
@ -181,7 +181,7 @@ public abstract class TargetPermanentOrPlayerAmount extends TargetAmount {
|
||||||
public Set<UUID> possibleTargets(UUID sourceControllerId, Game game) {
|
public Set<UUID> possibleTargets(UUID sourceControllerId, Game game) {
|
||||||
Set<UUID> possibleTargets = new HashSet<>();
|
Set<UUID> possibleTargets = new HashSet<>();
|
||||||
|
|
||||||
// max targets limit reached (only selected can be choosen again)
|
// max targets limit reached (only selected can be chosen again)
|
||||||
if (getMaxNumberOfTargets() > 0 && getTargets().size() >= getMaxNumberOfTargets()) {
|
if (getMaxNumberOfTargets() > 0 && getTargets().size() >= getMaxNumberOfTargets()) {
|
||||||
possibleTargets.addAll(getTargets());
|
possibleTargets.addAll(getTargets());
|
||||||
return possibleTargets;
|
return possibleTargets;
|
||||||
|
|
Loading…
Add table
Reference in a new issue