mirror of
https://github.com/correl/mage.git
synced 2024-11-21 19:18:40 +00:00
Fix 'chosen' spelling (#9021)
This commit is contained in:
parent
74a16d179f
commit
9084180937
26 changed files with 103 additions and 103 deletions
|
@ -1381,11 +1381,11 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
needZone = (Zone) lastGameData.options.get("targetZone");
|
||||
}
|
||||
|
||||
List<UUID> needChoosen;
|
||||
List<UUID> needChosen;
|
||||
if (lastGameData.options != null && lastGameData.options.containsKey("chosen")) {
|
||||
needChoosen = (List<UUID>) lastGameData.options.get("chosen");
|
||||
needChosen = (List<UUID>) lastGameData.options.get("chosen");
|
||||
} else {
|
||||
needChoosen = new ArrayList<>();
|
||||
needChosen = new ArrayList<>();
|
||||
}
|
||||
|
||||
Set<UUID> needSelectable;
|
||||
|
@ -1402,7 +1402,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
needPlayable = new PlayableObjectsList();
|
||||
}
|
||||
|
||||
if (needChoosen.isEmpty() && needSelectable.isEmpty() && needPlayable.isEmpty()) {
|
||||
if (needChosen.isEmpty() && needSelectable.isEmpty() && needPlayable.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1412,7 +1412,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
if (needSelectable.contains(card.getId())) {
|
||||
card.setChoosable(true);
|
||||
}
|
||||
if (needChoosen.contains(card.getId())) {
|
||||
if (needChosen.contains(card.getId())) {
|
||||
card.setSelected(true);
|
||||
}
|
||||
if (needPlayable.containsObject(card.getId())) {
|
||||
|
@ -1427,7 +1427,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
if (needSelectable.contains(card.getKey())) {
|
||||
card.getValue().setChoosable(true);
|
||||
}
|
||||
if (needChoosen.contains(card.getKey())) {
|
||||
if (needChosen.contains(card.getKey())) {
|
||||
card.getValue().setSelected(true);
|
||||
}
|
||||
// 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())) {
|
||||
perm.getValue().setChoosable(true);
|
||||
}
|
||||
if (needChoosen.contains(perm.getKey())) {
|
||||
if (needChosen.contains(perm.getKey())) {
|
||||
perm.getValue().setSelected(true);
|
||||
}
|
||||
if (needPlayable.containsObject(perm.getKey())) {
|
||||
|
@ -1461,7 +1461,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
if (needSelectable.contains(card.getKey())) {
|
||||
card.getValue().setChoosable(true);
|
||||
}
|
||||
if (needChoosen.contains(card.getKey())) {
|
||||
if (needChosen.contains(card.getKey())) {
|
||||
card.getValue().setSelected(true);
|
||||
}
|
||||
if (needPlayable.containsObject(card.getKey())) {
|
||||
|
@ -1478,7 +1478,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
if (needSelectable.contains(card.getKey())) {
|
||||
card.getValue().setChoosable(true);
|
||||
}
|
||||
if (needChoosen.contains(card.getKey())) {
|
||||
if (needChosen.contains(card.getKey())) {
|
||||
card.getValue().setSelected(true);
|
||||
}
|
||||
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)
|
||||
prepareSelectableWindows(sideboardWindows.values(), needSelectable, needChoosen, needPlayable);
|
||||
prepareSelectableWindows(sideboardWindows.values(), needSelectable, needChosen, needPlayable);
|
||||
|
||||
// exile
|
||||
if (needZone == Zone.EXILED || needZone == Zone.ALL) {
|
||||
|
@ -1498,7 +1498,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
if (needSelectable.contains(card.getId())) {
|
||||
card.setChoosable(true);
|
||||
}
|
||||
if (needChoosen.contains(card.getId())) {
|
||||
if (needChosen.contains(card.getId())) {
|
||||
card.setSelected(true);
|
||||
}
|
||||
if (needPlayable.containsObject(card.getId())) {
|
||||
|
@ -1513,7 +1513,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
if (needSelectable.contains(card.getKey())) {
|
||||
card.getValue().setChoosable(true);
|
||||
}
|
||||
if (needChoosen.contains(card.getKey())) {
|
||||
if (needChosen.contains(card.getKey())) {
|
||||
card.getValue().setSelected(true);
|
||||
}
|
||||
if (needPlayable.containsObject(card.getKey())) {
|
||||
|
@ -1530,7 +1530,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
if (needSelectable.contains(com.getId())) {
|
||||
com.setChoosable(true);
|
||||
}
|
||||
if (needChoosen.contains(com.getId())) {
|
||||
if (needChosen.contains(com.getId())) {
|
||||
com.setSelected(true);
|
||||
}
|
||||
if (needPlayable.containsObject(com.getId())) {
|
||||
|
@ -1546,7 +1546,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
if (needSelectable.contains(card.getKey())) {
|
||||
card.getValue().setChoosable(true);
|
||||
}
|
||||
if (needChoosen.contains(card.getKey())) {
|
||||
if (needChosen.contains(card.getKey())) {
|
||||
card.getValue().setSelected(true);
|
||||
}
|
||||
if (needPlayable.containsObject(card.getKey())) {
|
||||
|
@ -1561,7 +1561,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
if (needSelectable.contains(card.getKey())) {
|
||||
card.getValue().setChoosable(true);
|
||||
}
|
||||
if (needChoosen.contains(card.getKey())) {
|
||||
if (needChosen.contains(card.getKey())) {
|
||||
card.getValue().setSelected(true);
|
||||
}
|
||||
if (needPlayable.containsObject(card.getKey())) {
|
||||
|
@ -1570,7 +1570,7 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
}
|
||||
}
|
||||
// revealed (old windows)
|
||||
prepareSelectableWindows(revealed.values(), needSelectable, needChoosen, needPlayable);
|
||||
prepareSelectableWindows(revealed.values(), needSelectable, needChosen, needPlayable);
|
||||
|
||||
// looked at (current cards)
|
||||
for (LookedAtView look : lastGameData.game.getLookedAt()) {
|
||||
|
@ -1581,13 +1581,13 @@ public final class GamePanel extends javax.swing.JPanel {
|
|||
}
|
||||
}
|
||||
// looked at (old windows)
|
||||
prepareSelectableWindows(lookedAt.values(), needSelectable, needChoosen, needPlayable);
|
||||
prepareSelectableWindows(lookedAt.values(), needSelectable, needChosen, needPlayable);
|
||||
}
|
||||
|
||||
private void prepareSelectableWindows(
|
||||
Collection<CardInfoWindowDialog> windows,
|
||||
Set<UUID> needSelectable,
|
||||
List<UUID> needChoosen,
|
||||
List<UUID> needChosen,
|
||||
PlayableObjectsList needPlayable
|
||||
) {
|
||||
// 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()) {
|
||||
CardView cardView = mageCard.getOriginal();
|
||||
cardView.setChoosable(needSelectable.contains(cardView.getId()));
|
||||
cardView.setSelected(needChoosen.contains(cardView.getId()));
|
||||
cardView.setSelected(needChosen.contains(cardView.getId()));
|
||||
if (needPlayable.containsObject(cardView.getId())) {
|
||||
cardView.setPlayableStats(needPlayable.getStats(cardView.getId()));
|
||||
} 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()) {
|
||||
for (UUID modeId : spell.getSpellAbility().getModes().getSelectedModes()) {
|
||||
Mode mode = spell.getSpellAbility().getModes().get(modeId);
|
||||
|
|
|
@ -122,7 +122,7 @@ public class StackAbilityView extends CardView {
|
|||
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()) {
|
||||
Modes modes = ability.getModes();
|
||||
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) {
|
||||
if (!player.canRespond()) {
|
||||
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) {
|
||||
player.choose(Outcome.Neutral, cards, target, game);
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ class AlhammarretHighArbiterEffect extends OneShotEffect {
|
|||
controller.chooseTarget(Outcome.Benefit, revealedCards, target, source, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
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());
|
||||
if (sourcePermanent == null) {
|
||||
sourcePermanent = game.getPermanentEntering(source.getSourceId());
|
||||
|
|
|
@ -120,9 +120,9 @@ class ArchangelOfStrifeWarEffect extends BoostAllEffect {
|
|||
if (permanent != null) {
|
||||
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;
|
||||
|
@ -151,9 +151,9 @@ class ArchangelOfStrifePeaceEffect extends BoostAllEffect {
|
|||
if (permanent != null) {
|
||||
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;
|
||||
|
|
|
@ -81,23 +81,23 @@ class BloodOathEffect extends OneShotEffect {
|
|||
choiceImpl.setChoices(choice);
|
||||
if (player.choose(Outcome.Neutral, choiceImpl, game)) {
|
||||
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;
|
||||
} else if (choosenType.equals(CardType.LAND.toString())) {
|
||||
} else if (chosenType.equals(CardType.LAND.toString())) {
|
||||
type = CardType.LAND;
|
||||
} else if (choosenType.equals(CardType.CREATURE.toString())) {
|
||||
} else if (chosenType.equals(CardType.CREATURE.toString())) {
|
||||
type = CardType.CREATURE;
|
||||
} else if (choosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||
} else if (chosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||
type = CardType.ENCHANTMENT;
|
||||
} else if (choosenType.equals(CardType.INSTANT.toString())) {
|
||||
} else if (chosenType.equals(CardType.INSTANT.toString())) {
|
||||
type = CardType.INSTANT;
|
||||
} else if (choosenType.equals(CardType.SORCERY.toString())) {
|
||||
} else if (chosenType.equals(CardType.SORCERY.toString())) {
|
||||
type = CardType.SORCERY;
|
||||
} else if (choosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||
} else if (chosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||
type = CardType.PLANESWALKER;
|
||||
} else if (choosenType.equals(CardType.TRIBAL.toString())) {
|
||||
} else if (chosenType.equals(CardType.TRIBAL.toString())) {
|
||||
type = CardType.TRIBAL;
|
||||
}
|
||||
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.
|
||||
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)));
|
||||
|
||||
// Whenever Entropic Specter deals damage to a player, that player discards a card.
|
||||
|
|
|
@ -84,23 +84,23 @@ class FertileImaginationEffect extends OneShotEffect {
|
|||
choiceImpl.setChoices(choice);
|
||||
if (player.choose(Outcome.Neutral, choiceImpl, game)) {
|
||||
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;
|
||||
} else if (choosenType.equals(CardType.LAND.toString())) {
|
||||
} else if (chosenType.equals(CardType.LAND.toString())) {
|
||||
type = CardType.LAND;
|
||||
} else if (choosenType.equals(CardType.CREATURE.toString())) {
|
||||
} else if (chosenType.equals(CardType.CREATURE.toString())) {
|
||||
type = CardType.CREATURE;
|
||||
} else if (choosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||
} else if (chosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||
type = CardType.ENCHANTMENT;
|
||||
} else if (choosenType.equals(CardType.INSTANT.toString())) {
|
||||
} else if (chosenType.equals(CardType.INSTANT.toString())) {
|
||||
type = CardType.INSTANT;
|
||||
} else if (choosenType.equals(CardType.SORCERY.toString())) {
|
||||
} else if (chosenType.equals(CardType.SORCERY.toString())) {
|
||||
type = CardType.SORCERY;
|
||||
} else if (choosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||
} else if (chosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||
type = CardType.PLANESWALKER;
|
||||
} else if (choosenType.equals(CardType.TRIBAL.toString())) {
|
||||
} else if (chosenType.equals(CardType.TRIBAL.toString())) {
|
||||
type = CardType.TRIBAL;
|
||||
}
|
||||
if (type != null) {
|
||||
|
|
|
@ -75,11 +75,11 @@ class LavabrinkVenturerEffect extends GainAbilitySourceEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
String choosenMode = (String) game.getState().getValue(source.getSourceId() + "_modeChoice");
|
||||
if (choosenMode == null) {
|
||||
String chosenMode = (String) game.getState().getValue(source.getSourceId() + "_modeChoice");
|
||||
if (chosenMode == null) {
|
||||
return false;
|
||||
}
|
||||
switch (choosenMode) {
|
||||
switch (chosenMode) {
|
||||
case "Odd":
|
||||
this.ability = new ProtectionAbility(oddFilter);
|
||||
break;
|
||||
|
|
|
@ -102,7 +102,7 @@ class LilianaWakerOfTheDeadDiscardEffect extends OneShotEffect {
|
|||
cards.addAll(target.getTargets());
|
||||
cardsToDiscard.put(playerId, cards);
|
||||
}
|
||||
// discard all choosen cards
|
||||
// discard all chosen cards
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player == null) {
|
||||
|
|
|
@ -97,7 +97,7 @@ class MindSwordsEffect extends OneShotEffect {
|
|||
cards.addAll(target.getTargets());
|
||||
cardsToExile.put(playerId, cards);
|
||||
}
|
||||
// Exile all choosen cards
|
||||
// Exile all chosen cards
|
||||
for (UUID playerId : game.getOpponents(source.getControllerId())) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player == null) {
|
||||
|
|
|
@ -96,7 +96,7 @@ class TargetTwoNonLandCardsWithSameNameInHand extends TargetCardInHand {
|
|||
Cards cardsToCheck = new CardsImpl();
|
||||
cardsToCheck.addAll(possibleTargets);
|
||||
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()) {
|
||||
Card chosenCard = cardsToCheck.get(entry.getKey(), game);
|
||||
if (chosenCard != null) {
|
||||
|
|
|
@ -80,13 +80,13 @@ class StorageMatrixRestrictionEffect extends RestrictionEffect {
|
|||
choiceImpl.setChoices(choice);
|
||||
Player player = game.getPlayer(game.getActivePlayerId());
|
||||
if (player != null && player.choose(outcome, choiceImpl, game)) {
|
||||
String choosenType = choiceImpl.getChoice();
|
||||
if (choosenType != null) {
|
||||
game.informPlayers(storageMatrix.getLogName() + ": " + player.getLogName() + " chose to untap " + choosenType);
|
||||
String chosenType = choiceImpl.getChoice();
|
||||
if (chosenType != null) {
|
||||
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;
|
||||
} else if (choosenType.equals(CardType.LAND.toString())) {
|
||||
} else if (chosenType.equals(CardType.LAND.toString())) {
|
||||
type = CardType.LAND;
|
||||
} else {
|
||||
type = CardType.CREATURE;
|
||||
|
|
|
@ -76,7 +76,7 @@ class StrongarmTacticsEffect extends OneShotEffect {
|
|||
cardsToDiscard.put(playerId, cards);
|
||||
}
|
||||
}
|
||||
// discard all choosen cards
|
||||
// discard all chosen cards
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
|
|
|
@ -63,21 +63,21 @@ class StrongholdGambitEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source);
|
||||
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())) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null && !player.getHand().isEmpty()) {
|
||||
TargetCardInHand target = new TargetCardInHand();
|
||||
if (player.choose(Outcome.Benefit, target, source, game)) {
|
||||
choosenCard.put(playerId, target.getFirstTarget());
|
||||
chosenCards.put(playerId, target.getFirstTarget());
|
||||
}
|
||||
}
|
||||
}
|
||||
int lowestCMC = Integer.MAX_VALUE;
|
||||
for (UUID playerId : game.getState().getPlayerList(controller.getId())) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null && choosenCard.containsKey(playerId)) {
|
||||
Card card = game.getCard(choosenCard.get(playerId));
|
||||
if (player != null && chosenCards.containsKey(playerId)) {
|
||||
Card card = game.getCard(chosenCards.get(playerId));
|
||||
if (card != null) {
|
||||
Cards cardsToReveal = new CardsImpl(card);
|
||||
player.revealCards(sourceObject.getIdName() + " (" + player.getName() + ')', cardsToReveal, game);
|
||||
|
@ -92,8 +92,8 @@ class StrongholdGambitEffect extends OneShotEffect {
|
|||
Cards creaturesToBattlefield = new CardsImpl();
|
||||
for (UUID playerId : game.getState().getPlayerList(controller.getId())) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null && choosenCard.containsKey(playerId)) {
|
||||
Card card = game.getCard(choosenCard.get(playerId));
|
||||
if (player != null && chosenCards.containsKey(playerId)) {
|
||||
Card card = game.getCard(chosenCards.get(playerId));
|
||||
if (card != null) {
|
||||
if (card.isCreature(game)
|
||||
&& lowestCMC == card.getManaValue()) {
|
||||
|
|
|
@ -86,10 +86,10 @@ class TeferisRealmEffect extends OneShotEffect {
|
|||
if (!player.choose(outcome, choiceImpl, game)) {
|
||||
return false;
|
||||
}
|
||||
String choosenType = choiceImpl.getChoice();
|
||||
String chosenType = choiceImpl.getChoice();
|
||||
FilterPermanent filter = new FilterPermanent();
|
||||
filter.add(TokenPredicate.FALSE);
|
||||
switch (choosenType) {
|
||||
switch (chosenType) {
|
||||
case ARTIFACT:
|
||||
filter.add(CardType.ARTIFACT.getPredicate());
|
||||
break;
|
||||
|
@ -106,7 +106,7 @@ class TeferisRealmEffect extends OneShotEffect {
|
|||
default:
|
||||
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<>();
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, controller.getId(), game)) {
|
||||
permIds.add(permanent.getId());
|
||||
|
|
|
@ -65,7 +65,7 @@ class TragicArroganceffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Set<Permanent> choosenPermanent = new HashSet<>();
|
||||
Set<Permanent> chosenPermanents = new HashSet<>();
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
|
@ -89,7 +89,7 @@ class TragicArroganceffect extends OneShotEffect {
|
|||
controller.chooseTarget(Outcome.Benefit, target1, source, game);
|
||||
Permanent artifact = game.getPermanent(target1.getFirstTarget());
|
||||
if (artifact != null) {
|
||||
choosenPermanent.add(artifact);
|
||||
chosenPermanents.add(artifact);
|
||||
}
|
||||
target1.clearChosen();
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ class TragicArroganceffect extends OneShotEffect {
|
|||
controller.chooseTarget(Outcome.Benefit, target2, source, game);
|
||||
Permanent creature = game.getPermanent(target2.getFirstTarget());
|
||||
if (creature != null) {
|
||||
choosenPermanent.add(creature);
|
||||
chosenPermanents.add(creature);
|
||||
}
|
||||
target2.clearChosen();
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ class TragicArroganceffect extends OneShotEffect {
|
|||
controller.chooseTarget(Outcome.Benefit, target3, source, game);
|
||||
Permanent enchantment = game.getPermanent(target3.getFirstTarget());
|
||||
if (enchantment != null) {
|
||||
choosenPermanent.add(enchantment);
|
||||
chosenPermanents.add(enchantment);
|
||||
}
|
||||
target3.clearChosen();
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ class TragicArroganceffect extends OneShotEffect {
|
|||
controller.chooseTarget(Outcome.Benefit, target4, source, game);
|
||||
Permanent planeswalker = game.getPermanent(target4.getFirstTarget());
|
||||
if (planeswalker != null) {
|
||||
choosenPermanent.add(planeswalker);
|
||||
chosenPermanents.add(planeswalker);
|
||||
}
|
||||
target4.clearChosen();
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ class TragicArroganceffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,26 +84,26 @@ class VigeanIntuitionEffect extends OneShotEffect {
|
|||
Choice choiceImpl = new ChoiceImpl();
|
||||
choiceImpl.setChoices(choice);
|
||||
if (player.choose(Outcome.Neutral, choiceImpl, game)) {
|
||||
String choosenType = choiceImpl.getChoice();
|
||||
if (choosenType == null || choosenType.isEmpty()) {
|
||||
String chosenType = choiceImpl.getChoice();
|
||||
if (chosenType == null || chosenType.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
CardType type = null;
|
||||
if (choosenType.equals(CardType.ARTIFACT.toString())) {
|
||||
if (chosenType.equals(CardType.ARTIFACT.toString())) {
|
||||
type = CardType.ARTIFACT;
|
||||
} else if (choosenType.equals(CardType.LAND.toString())) {
|
||||
} else if (chosenType.equals(CardType.LAND.toString())) {
|
||||
type = CardType.LAND;
|
||||
} else if (choosenType.equals(CardType.CREATURE.toString())) {
|
||||
} else if (chosenType.equals(CardType.CREATURE.toString())) {
|
||||
type = CardType.CREATURE;
|
||||
} else if (choosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||
} else if (chosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||
type = CardType.ENCHANTMENT;
|
||||
} else if (choosenType.equals(CardType.INSTANT.toString())) {
|
||||
} else if (chosenType.equals(CardType.INSTANT.toString())) {
|
||||
type = CardType.INSTANT;
|
||||
} else if (choosenType.equals(CardType.SORCERY.toString())) {
|
||||
} else if (chosenType.equals(CardType.SORCERY.toString())) {
|
||||
type = CardType.SORCERY;
|
||||
} else if (choosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||
} else if (chosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||
type = CardType.PLANESWALKER;
|
||||
} else if (choosenType.equals(CardType.TRIBAL.toString())) {
|
||||
} else if (chosenType.equals(CardType.TRIBAL.toString())) {
|
||||
type = CardType.TRIBAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -91,22 +91,22 @@ class WorldQuellerEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
CardType type = null;
|
||||
String choosenType = choiceImpl.getChoice();
|
||||
if (choosenType.equals(CardType.ARTIFACT.toString())) {
|
||||
String chosenType = choiceImpl.getChoice();
|
||||
if (chosenType.equals(CardType.ARTIFACT.toString())) {
|
||||
type = CardType.ARTIFACT;
|
||||
} else if (choosenType.equals(CardType.LAND.toString())) {
|
||||
} else if (chosenType.equals(CardType.LAND.toString())) {
|
||||
type = CardType.LAND;
|
||||
} else if (choosenType.equals(CardType.CREATURE.toString())) {
|
||||
} else if (chosenType.equals(CardType.CREATURE.toString())) {
|
||||
type = CardType.CREATURE;
|
||||
} else if (choosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||
} else if (chosenType.equals(CardType.ENCHANTMENT.toString())) {
|
||||
type = CardType.ENCHANTMENT;
|
||||
} else if (choosenType.equals(CardType.INSTANT.toString())) {
|
||||
} else if (chosenType.equals(CardType.INSTANT.toString())) {
|
||||
type = CardType.INSTANT;
|
||||
} else if (choosenType.equals(CardType.SORCERY.toString())) {
|
||||
} else if (chosenType.equals(CardType.SORCERY.toString())) {
|
||||
type = CardType.SORCERY;
|
||||
} else if (choosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||
} else if (chosenType.equals(CardType.PLANESWALKER.toString())) {
|
||||
type = CardType.PLANESWALKER;
|
||||
} else if (choosenType.equals(CardType.TRIBAL.toString())) {
|
||||
} else if (chosenType.equals(CardType.TRIBAL.toString())) {
|
||||
type = CardType.TRIBAL;
|
||||
}
|
||||
if (type != null) {
|
||||
|
|
|
@ -20,7 +20,7 @@ public class ModeChoiceSourceCondition implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
String choosenMode = (String) game.getState().getValue(source.getSourceId() + "_modeChoice");
|
||||
return choosenMode != null && choosenMode.equals(mode);
|
||||
String chosenMode = (String) game.getState().getValue(source.getSourceId() + "_modeChoice");
|
||||
return chosenMode != null && chosenMode.equals(mode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public class GainProtectionFromColorSourceEffect extends GainAbilitySourceEffect
|
|||
ChoiceColor colorChoice = new ChoiceColor(true);
|
||||
colorChoice.setMessage("Choose color for protection ability");
|
||||
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.setMessage(colorChoice.getChoice());
|
||||
((ProtectionAbility) ability).setFilter(protectionFilter);
|
||||
|
|
|
@ -102,7 +102,7 @@ public class DiscardEachPlayerEffect extends OneShotEffect {
|
|||
if (randomDiscard) {
|
||||
return true;
|
||||
}
|
||||
// discard all choosen cards
|
||||
// discard all chosen cards
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
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
|
||||
* the choosen order by player
|
||||
* the chosen order by player
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -130,7 +130,7 @@ public interface Target extends Serializable {
|
|||
|
||||
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);
|
||||
|
||||
UUID getTargetController();
|
||||
|
|
|
@ -44,7 +44,7 @@ public abstract class TargetPermanentOrPlayerAmount extends TargetAmount {
|
|||
@Override
|
||||
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()) {
|
||||
return getTargets().contains(objectId);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public abstract class TargetPermanentOrPlayerAmount extends TargetAmount {
|
|||
@Override
|
||||
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()) {
|
||||
return getTargets().contains(objectId);
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ public abstract class TargetPermanentOrPlayerAmount extends TargetAmount {
|
|||
public Set<UUID> possibleTargets(UUID sourceControllerId, Ability source, Game game) {
|
||||
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()) {
|
||||
possibleTargets.addAll(getTargets());
|
||||
return possibleTargets;
|
||||
|
@ -181,7 +181,7 @@ public abstract class TargetPermanentOrPlayerAmount extends TargetAmount {
|
|||
public Set<UUID> possibleTargets(UUID sourceControllerId, Game game) {
|
||||
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()) {
|
||||
possibleTargets.addAll(getTargets());
|
||||
return possibleTargets;
|
||||
|
|
Loading…
Reference in a new issue