Removing UserFeedback from PlayoutDecisionEffect
This commit is contained in:
@@ -35,7 +35,7 @@ public class PreventSubAction extends SubAction {
|
||||
_playerPreventionCost = _preventionCost.createPreventionCostForPlayer(PreventSubAction.this, nextPlayer);
|
||||
if (_playerPreventionCost.isPlayableInFull(game)) {
|
||||
appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), nextPlayer,
|
||||
new PlayoutDecisionEffect(nextPlayer,
|
||||
new MultipleChoiceAwaitingDecision(1, "Would you like to - " + _playerPreventionCost.getText(game) + " to prevent - " + _effectToExecute.getText(game), new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Card1_018 extends AbstractOldEvent {
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.DWARF));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Choose player", GameUtils.getAllPlayers(game)) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, final String chosenPlayerId) {
|
||||
|
||||
@@ -71,7 +71,7 @@ public class Card1_022 extends AbstractOldEvent {
|
||||
_lastCard = card;
|
||||
}
|
||||
if (card != null && _count < 5) {
|
||||
_action.appendEffect(new PlayoutDecisionEffect(game.getUserFeedback(), _player,
|
||||
_action.appendEffect(new PlayoutDecisionEffect(_player,
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you want to put " + _lastCard.getBlueprint().getName() + " in your hand?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Card1_055 extends AbstractPermanent {
|
||||
PhysicalCard galadriel = Filters.findFirstActive(game.getGameState(), game.getModifiersQuerying(), Filters.galadriel);
|
||||
action.appendCost(new ExertCharactersEffect(self, galadriel));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Choose opponent with at least 7 cards in hand", opponentsHavingAtLeast7Cards(game, playerId)) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, final String chosenOpponent) {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class Card1_074 extends AbstractAttachableFPPossession {
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Keyword.PIPEWEED, CardType.POSSESSION));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose number of pipes you wish to spot", game, PossessionClass.PIPE, Integer.MAX_VALUE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Card1_091 extends AbstractAttachableFPPossession {
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Keyword.PIPEWEED, CardType.POSSESSION));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose number of pipes you wish to spot", game, PossessionClass.PIPE, Integer.MAX_VALUE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -67,7 +67,7 @@ public class Card1_120 extends AbstractPermanent {
|
||||
protected void cardsRevealed(List<PhysicalCard> revealedCards) {
|
||||
if (revealedCards.size() > 0)
|
||||
action.insertEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ArbitraryCardsSelectionDecision(1, "Choose card to discard", revealedCards, 0, 1) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class Card1_145 extends AbstractMinion {
|
||||
|
||||
action.appendCost(new RemoveTwilightEffect(2));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose number of minions you wish to spot", game, Filters.and(Race.URUK_HAI, Filters.not(Filters.sameCard(self))), Integer.MAX_VALUE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -51,7 +51,7 @@ public class Card1_189 extends AbstractResponseOldEvent {
|
||||
&& checkPlayRequirements(playerId, game, self, 0, false)) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose how many MORIA minions you wish to spot", game, Filters.and(Culture.MORIA, CardType.MINION), Integer.MAX_VALUE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Card1_285 extends AbstractAttachableFPPossession {
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Keyword.PIPEWEED, CardType.POSSESSION));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose number of pipes you wish to spot", game, PossessionClass.PIPE, Integer.MAX_VALUE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -43,7 +43,7 @@ public class Card1_292 extends AbstractAttachableFPPossession {
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Keyword.PIPEWEED, CardType.POSSESSION));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose number of pipes you wish to spot", game, PossessionClass.PIPE, Integer.MAX_VALUE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Card1_294 extends AbstractOldEvent {
|
||||
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "Choose how many twilight to add", 0) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -33,7 +33,7 @@ public class Card1_215 extends AbstractOldEvent {
|
||||
public PlayEventAction getPlayCardAction(final String playerId, final LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose how many Nazgul you want to spot", game, Race.NAZGUL, Integer.MAX_VALUE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Card10_016 extends AbstractEvent {
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.owner(playerId), Race.WIZARD));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "Choose a number", 0) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -61,7 +61,7 @@ public class Card10_060 extends AbstractAttachable {
|
||||
@Override
|
||||
protected void cardSelected(LotroGame game, final PhysicalCard card) {
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you want to put " + GameUtils.getCardLink(card) + " on top of deck instead?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -43,7 +43,7 @@ public class Card2_020 extends AbstractOldEvent {
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.ELF, CardType.ALLY));
|
||||
if (Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Race.ORC))
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you wish to spot an Orc?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class Card2_053 extends AbstractAttachable {
|
||||
&& game.getGameState().getCurrentPhase() == Phase.MANEUVER) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), game.getGameState().getCurrentPlayerId(),
|
||||
new PlayoutDecisionEffect(game.getGameState().getCurrentPlayerId(),
|
||||
new MultipleChoiceAwaitingDecision(1, "Would you like to skip Archery phase?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -48,7 +48,7 @@ public class Card2_109 extends AbstractOldEvent {
|
||||
protected void cardSelected(final LotroGame game, final PhysicalCard bearer) {
|
||||
int vitality = game.getModifiersQuerying().getVitality(game.getGameState(), bearer);
|
||||
action.insertCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "Choose how many times to exert", 1, vitality - 1) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
@@ -58,7 +58,7 @@ public class Card2_109 extends AbstractOldEvent {
|
||||
new ExertCharactersEffect(self, bearer));
|
||||
}
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Choose action to perform", new String[]{"Wound " + exertionCount + " Orcs", "Wound " + exertionCount + " Uruk-hai"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -56,7 +56,7 @@ public class Card3_033 extends AbstractOldEvent {
|
||||
if (revealedCards.size() > 0) {
|
||||
final PhysicalCard revealedCard = revealedCards.iterator().next();
|
||||
action.insertEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you wish to discard " + revealedCard.getBlueprint().getName(), new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class Card3_107 extends AbstractAttachableFPPossession {
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Keyword.PIPEWEED, CardType.POSSESSION));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose number of pipes you wish to spot", game, PossessionClass.PIPE, Integer.MAX_VALUE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -34,7 +34,7 @@ public class Card4_058 extends AbstractOldEvent {
|
||||
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose number of Elf companions you wish to spot", game, Filters.and(Race.ELF, CardType.COMPANION), Integer.MAX_VALUE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -65,7 +65,7 @@ public class Card4_128 extends AbstractOldEvent {
|
||||
if (TriggerConditions.losesSkirmish(game, effectResults, Filters.sameCard(minion))) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(lotroGame.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Would you like to wound " + minion.getBlueprint().getName(), new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Card4_166 extends AbstractPermanent {
|
||||
final List<String> allPlayers = game.getGameState().getPlayerOrder().getAllPlayers();
|
||||
final String[] players = allPlayers.toArray(new String[allPlayers.size()]);
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Choose player to reveal top card", players) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String deckId) {
|
||||
@@ -57,7 +57,7 @@ public class Card4_166 extends AbstractPermanent {
|
||||
if (cards.size() > 0) {
|
||||
final PhysicalCard card = cards.get(0);
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you want to put " + card.getBlueprint().getName() + " on bottom of deck?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Card4_299 extends AbstractPermanent {
|
||||
&& game.getGameState().getCurrentSiteNumber() == 1 && game.getGameState().getCurrentSiteBlock() == Block.TWO_TOWERS) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), self.getOwner(),
|
||||
new PlayoutDecisionEffect(self.getOwner(),
|
||||
new IntegerAwaitingDecision(1, "How many burdens do you wish to remove?", 0, 2) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Card5_001 extends AbstractMinion {
|
||||
&& game.getGameState().getHand(game.getGameState().getCurrentPlayerId()).size() >= 2) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), game.getGameState().getCurrentPlayerId(),
|
||||
new PlayoutDecisionEffect(game.getGameState().getCurrentPlayerId(),
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you want to discard 2 cards from hand to discard this minion?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Card5_002 extends AbstractMinion {
|
||||
&& game.getGameState().getHand(game.getGameState().getCurrentPlayerId()).size() >= 2) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), game.getGameState().getCurrentPlayerId(),
|
||||
new PlayoutDecisionEffect(game.getGameState().getCurrentPlayerId(),
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you want to discard 2 cards from hand to discard this minion?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -50,7 +50,7 @@ public class Card5_004 extends AbstractMinion {
|
||||
&& game.getGameState().getHand(game.getGameState().getCurrentPlayerId()).size() >= 4) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), game.getGameState().getCurrentPlayerId(),
|
||||
new PlayoutDecisionEffect(game.getGameState().getCurrentPlayerId(),
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you want to discard 4 cards from hand to discard this minion?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -30,7 +30,7 @@ public class Card5_048 extends AbstractEvent {
|
||||
public PlayEventAction getPlayCardAction(final String playerId, final LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose number of Uruk-hai you wish to spot?", game, Race.URUK_HAI, Integer.MAX_VALUE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -58,7 +58,7 @@ public class Card6_011 extends AbstractEvent {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
List<Effect> possibleEffects = new LinkedList<Effect>();
|
||||
possibleEffects.add(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Where to put \"Toss Me\"?", new String[]{"Top of deck", "Bottom of deck"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
@@ -84,7 +84,7 @@ public class Card6_011 extends AbstractEvent {
|
||||
@Override
|
||||
protected void cardsSelected(LotroGame game, final Collection<PhysicalCard> selectedCards) {
|
||||
action.insertEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Where to put selected card?", new String[]{"Top of deck", "Bottom of deck"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -64,7 +64,7 @@ public class Card6_015 extends AbstractAlly {
|
||||
for (final PhysicalCard card : cards)
|
||||
if (card.getBlueprint().getCulture() == Culture.ELVEN) {
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "do you want to take " + GameUtils.getCardLink(card) + " into hand and heal an Elf companion?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Card6_017 extends AbstractPermanent {
|
||||
new AddTwilightEffect(self, 1));
|
||||
if (game.getGameState().getDeck(playerId).size() > 0)
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ArbitraryCardsSelectionDecision(1, "Choose a card to discard from deck", Collections.singleton(game.getGameState().getDeck(playerId).get(0)), 0, 1) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Card6_019 extends AbstractEvent {
|
||||
protected void cardsRevealed(List<PhysicalCard> cards) {
|
||||
for (final PhysicalCard card : cards) {
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Choose what do you want to do with " + GameUtils.getCardLink(card), new String[]{"Discard it", "Return to top of deck", "Take into hand"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Card6_020 extends AbstractEvent {
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, 0, 2, CardType.COMPANION, cardCulture));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you wish to discard " + GameUtils.getCardLink(card), new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class Card6_096 extends AbstractEvent {
|
||||
new MoveLimitModifier(self, 2)));
|
||||
for (final String opponentId : GameUtils.getOpponents(game, playerId)) {
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), opponentId,
|
||||
new PlayoutDecisionEffect(opponentId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you want to draw 6 cards?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -52,21 +52,21 @@ public class Card6_101 extends AbstractMinion {
|
||||
possibleCultures.add(culture.getHumanReadable());
|
||||
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), game.getGameState().getCurrentPlayerId(),
|
||||
new PlayoutDecisionEffect(game.getGameState().getCurrentPlayerId(),
|
||||
new MultipleChoiceAwaitingDecision(1, "Name first spared culture", possibleCultures.toArray(new String[possibleCultures.size()])) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
possibleCultures.add(result);
|
||||
final Culture firstCulture = Culture.findCultureByHumanReadable(result);
|
||||
action.insertEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), game.getGameState().getCurrentPlayerId(),
|
||||
new PlayoutDecisionEffect(game.getGameState().getCurrentPlayerId(),
|
||||
new MultipleChoiceAwaitingDecision(1, "Name second spared culture", possibleCultures.toArray(new String[possibleCultures.size()])) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
possibleCultures.add(result);
|
||||
final Culture secondCulture = Culture.findCultureByHumanReadable(result);
|
||||
action.insertEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), game.getGameState().getCurrentPlayerId(),
|
||||
new PlayoutDecisionEffect(game.getGameState().getCurrentPlayerId(),
|
||||
new MultipleChoiceAwaitingDecision(1, "Name third spared culture", possibleCultures.toArray(new String[possibleCultures.size()])) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Card7_011 extends AbstractEvent {
|
||||
new StrengthModifier(self, card, 2), Phase.SKIRMISH);
|
||||
if (PlayConditions.canExert(self, game, card)) {
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you want to exert that Dwarf to draw 2 cards?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Card7_029 extends AbstractEvent {
|
||||
action.appendEffect(
|
||||
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 2, Race.ELF));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you want to place this even on top of your draw deck?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -32,7 +32,7 @@ public class Card7_030 extends AbstractEvent {
|
||||
action.appendEffect(
|
||||
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 2, Race.ELF));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you want to shuffle your draw deck?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Card7_050 extends AbstractEvent {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
int vitality = game.getModifiersQuerying().getVitality(game.getGameState(), Filters.findFirstActive(game.getGameState(), game.getModifiersQuerying(), Filters.gandalf));
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "Choose how many times you wish to exert Gandalf", 0, vitality - 1) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Card7_067 extends AbstractPermanent {
|
||||
final PlayPermanentAction playCardAction = super.getPlayCardAction(playerId, game, self, twilightModifier, ignoreRoamingPenalty);
|
||||
int maxThreats = Math.min(9, Filters.countActive(game.getGameState(), game.getModifiersQuerying(), CardType.COMPANION) - game.getGameState().getThreats());
|
||||
playCardAction.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "Choose how many threats to add", 0, maxThreats) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class Card7_283 extends AbstractPermanent {
|
||||
final PlayPermanentAction permanentAction = super.getPlayCardAction(playerId, game, self, twilightModifier, ignoreRoamingPenalty);
|
||||
int maxThreats = Math.min(3, Filters.countActive(game.getGameState(), game.getModifiersQuerying(), CardType.COMPANION) - game.getGameState().getThreats());
|
||||
permanentAction.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "Choose how many threats to add", 0, maxThreats) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Card7_321 extends AbstractCompanion {
|
||||
action.appendCost(
|
||||
new ReturnCardsToHandEffect(self, self));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "How many ROHAN possessions do you wish to play from your discard pile?", 0, 2) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Card7_331 extends AbstractSite {
|
||||
while ((nextPlayerId = drawOrder.getNextPlayer()) != null) {
|
||||
final String drawingPlayerId = nextPlayerId;
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), drawingPlayerId,
|
||||
new PlayoutDecisionEffect(drawingPlayerId,
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you wish to draw a card?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Card7_181 extends AbstractPermanent {
|
||||
final PlayPermanentAction permanentAction = super.getPlayCardAction(playerId, game, self, twilightModifier, ignoreRoamingPenalty);
|
||||
int maxThreats = Math.min(3, Filters.countActive(game.getGameState(), game.getModifiersQuerying(), CardType.COMPANION) - game.getGameState().getThreats());
|
||||
permanentAction.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "Choose how many threats to add", 0, maxThreats) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -69,7 +69,7 @@ public class Card7_197 extends AbstractMinion {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
final int count = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Race.NAZGUL);
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), game.getGameState().getCurrentPlayerId(),
|
||||
new PlayoutDecisionEffect(game.getGameState().getCurrentPlayerId(),
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you wish to exert " + count + " companions to be able to assign this minion?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class Card7_200 extends AbstractMinion {
|
||||
&& PlayConditions.canSpot(game, Race.NAZGUL)) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), game.getGameState().getCurrentPlayerId(),
|
||||
new PlayoutDecisionEffect(game.getGameState().getCurrentPlayerId(),
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you wish to exert a companion to be able to assign this minion?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class Card7_201 extends AbstractMinion {
|
||||
&& PlayConditions.canSpot(game, Race.NAZGUL)) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), game.getGameState().getCurrentPlayerId(),
|
||||
new PlayoutDecisionEffect(game.getGameState().getCurrentPlayerId(),
|
||||
new MultipleChoiceAwaitingDecision(1, "Do you wish to exert a companion to be able to assign this minion?", new String[]{"Yes", "No"}) {
|
||||
@Override
|
||||
protected void validDecisionMade(int index, String result) {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class Card8_009 extends AbstractEvent {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
int archeryTotal = RuleUtils.calculateFellowshipArcheryTotal(game);
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "Choose X (reduce fellowship archery total)", 0, archeryTotal) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Card8_012 extends AbstractEvent {
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.ELF, CardType.COMPANION));
|
||||
int archeryTotal = RuleUtils.calculateFellowshipArcheryTotal(game);
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "Choose X (reduce fellowship archery total)", 0, archeryTotal) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class Card8_050 extends AbstractPermanent {
|
||||
if (PlayConditions.canPlayFromDiscard(playerId, game, -tokens, Keyword.CORSAIR)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "How many tokens you wish to remove?", 0, tokens) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -66,7 +66,7 @@ public class Card8_066 extends AbstractEvent {
|
||||
spotDecision.setDefaultValue(count);
|
||||
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId, spotDecision));
|
||||
new PlayoutDecisionEffect(playerId, spotDecision));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class Card8_103 extends AbstractPermanent {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.REGROUP, self, 0)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new IntegerAwaitingDecision(1, "How many SAURON tokens you wish to remove?", 0, game.getGameState().getTokenCount(self, Token.SAURON)) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.gempukku.lotro.logic.effects;
|
||||
|
||||
import com.gempukku.lotro.communication.UserFeedback;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.decisions.AwaitingDecision;
|
||||
import com.gempukku.lotro.logic.timing.AbstractSuccessfulEffect;
|
||||
@@ -10,12 +9,10 @@ import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import java.util.Collection;
|
||||
|
||||
public class PlayoutDecisionEffect extends AbstractSuccessfulEffect {
|
||||
private UserFeedback _userFeedback;
|
||||
private String _playerId;
|
||||
private AwaitingDecision _decision;
|
||||
|
||||
public PlayoutDecisionEffect(UserFeedback userFeedback, String playerId, AwaitingDecision decision) {
|
||||
_userFeedback = userFeedback;
|
||||
public PlayoutDecisionEffect(String playerId, AwaitingDecision decision) {
|
||||
_playerId = playerId;
|
||||
_decision = decision;
|
||||
}
|
||||
@@ -32,7 +29,7 @@ public class PlayoutDecisionEffect extends AbstractSuccessfulEffect {
|
||||
|
||||
@Override
|
||||
public Collection<? extends EffectResult> playEffect(LotroGame game) {
|
||||
_userFeedback.sendAwaitingDecision(_playerId, _decision);
|
||||
game.getUserFeedback().sendAwaitingDecision(_playerId, _decision);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class PlayerReconcilesAction implements Action {
|
||||
GameState gameState = _game.getGameState();
|
||||
final Set<? extends PhysicalCard> cardsInHand = new HashSet<PhysicalCard>(gameState.getHand(_playerId));
|
||||
if (cardsInHand.size() > 8) {
|
||||
_effectQueue.add(new PlayoutDecisionEffect(_game.getUserFeedback(), _playerId,
|
||||
_effectQueue.add(new PlayoutDecisionEffect(_playerId,
|
||||
new CardsSelectionDecision(1, "Choose cards to discard down to 8", cardsInHand, cardsInHand.size() - 8, cardsInHand.size() - 8) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
@@ -78,7 +78,7 @@ public class PlayerReconcilesAction implements Action {
|
||||
}
|
||||
}));
|
||||
} else if (cardsInHand.size() > 0) {
|
||||
_effectQueue.add(new PlayoutDecisionEffect(_game.getUserFeedback(), _playerId,
|
||||
_effectQueue.add(new PlayoutDecisionEffect(_playerId,
|
||||
new CardsSelectionDecision(1, "Reconcile - choose card to discard or press DONE", cardsInHand, 0, 1) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
|
||||
Reference in New Issue
Block a user