Merge pull request #648 from PlayersCouncil/bug/ketura-bugs
The Good, The Bad, and the Bugly
This commit is contained in:
@@ -921,7 +921,7 @@ var PCCards = {
|
||||
// Saved From the Fire (8R20) [Errata]
|
||||
'58_20' : 'https://i.lotrtcgpc.net/errata/LOTR-EN08E020.1_card.jpg',
|
||||
// Aragorn, Estel (V1R19) [Errata]
|
||||
//'101_19' : 'https://i.lotrtcgpc.net/sets/vset1/LOTR-ENV1E019.2_card.jpg',
|
||||
'101_19' : 'https://i.lotrtcgpc.net/sets/vset1/LOTR-ENV1E019.2_card.jpg',
|
||||
// Elendil, The Tall (9R+32) [Errata]
|
||||
'59_32' : 'https://i.lotrtcgpc.net/errata/LOTR-EN09E032.1_card.jpg',
|
||||
// Sapling of the White Tree (9R35) [Errata]
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
text: Choose card to reveal and put beneath your deck
|
||||
}
|
||||
{
|
||||
type: revealCards
|
||||
type: RevealCardsFromDiscard
|
||||
select: memory(chosenCard)
|
||||
}
|
||||
{
|
||||
|
||||
@@ -861,6 +861,7 @@
|
||||
effect: {
|
||||
type: exert
|
||||
select: choose(ringBound,companion)
|
||||
times: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -363,6 +363,7 @@
|
||||
type: discardStackedCards
|
||||
on: self
|
||||
count: 2
|
||||
memorize: discardedCards
|
||||
}
|
||||
{
|
||||
type: removeTwilight
|
||||
@@ -372,7 +373,7 @@
|
||||
effect: {
|
||||
type: playCardFromDiscard
|
||||
removedTwilight: 1
|
||||
select: choose(culture(isengard),orc)
|
||||
select: choose(culture(isengard),orc,not(memory(discardedCards)))
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
memory: topCards
|
||||
}
|
||||
{
|
||||
type: RevealCards
|
||||
type: RevealCardsFromDrawDeck
|
||||
select: memory(topCards)
|
||||
count: memory(cardCount)
|
||||
}
|
||||
|
||||
@@ -162,7 +162,9 @@ public class EffectAppenderFactory {
|
||||
effectAppenderProducers.put("resetwhileinzonedata", new ResetWhileInZoneData());
|
||||
effectAppenderProducers.put("returntohand", new ReturnToHand());
|
||||
effectAppenderProducers.put("revealbottomcardsofdrawdeck", new RevealBottomCardsOfDrawDeck());
|
||||
effectAppenderProducers.put("revealcards", new RevealCards());
|
||||
effectAppenderProducers.put("revealcards", new RevealCardsFromPlay());
|
||||
effectAppenderProducers.put("revealcardsfromdiscard", new RevealCardsFromDiscard());
|
||||
effectAppenderProducers.put("revealcardsfromdrawdeck", new RevealCardsFromDrawDeck());
|
||||
effectAppenderProducers.put("revealcardsfromadventuredeck", new RevealCardsFromAdventureDeck());
|
||||
effectAppenderProducers.put("revealcardsfromhand", new RevealCardsFromHand());
|
||||
effectAppenderProducers.put("revealhand", new RevealHand());
|
||||
|
||||
@@ -50,6 +50,13 @@ public class ExchangeCardsInHandWithCardsInDeadPile implements EffectAppenderPro
|
||||
return new AbstractEffect() {
|
||||
@Override
|
||||
protected FullEffectResult playEffectReturningResult(LotroGame game) {
|
||||
|
||||
int hand = countHand.getEvaluator(actionContext).evaluateExpression(game, null);
|
||||
if(handCards.size() < hand) {
|
||||
game.getGameState().sendMessage(performingPlayer + " did not have " + hand + " card in hand to exchange.");
|
||||
return new FullEffectResult(false);
|
||||
}
|
||||
|
||||
Set<PhysicalCard> cardsToRemove = new HashSet<>();
|
||||
cardsToRemove.addAll(handCards);
|
||||
cardsToRemove.addAll(deadPileCards);
|
||||
@@ -66,7 +73,8 @@ public class ExchangeCardsInHandWithCardsInDeadPile implements EffectAppenderPro
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(LotroGame game) {
|
||||
return true;
|
||||
int hand = countHand.getEvaluator(actionContext).evaluateExpression(game, null);
|
||||
return handCards.size() >= hand;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -48,6 +48,12 @@ public class ExchangeCardsInHandWithCardsInDiscard implements EffectAppenderProd
|
||||
return new AbstractEffect() {
|
||||
@Override
|
||||
protected FullEffectResult playEffectReturningResult(LotroGame game) {
|
||||
int hand = countHand.getEvaluator(actionContext).evaluateExpression(game, null);
|
||||
if(handCards.size() < hand) {
|
||||
game.getGameState().sendMessage(performingPlayer + " did not have " + hand + " card in hand to exchange.");
|
||||
return new FullEffectResult(false);
|
||||
}
|
||||
|
||||
Set<PhysicalCard> cardsToRemove = new HashSet<>();
|
||||
cardsToRemove.addAll(handCards);
|
||||
cardsToRemove.addAll(discardCards);
|
||||
@@ -64,7 +70,8 @@ public class ExchangeCardsInHandWithCardsInDiscard implements EffectAppenderProd
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(LotroGame game) {
|
||||
return true;
|
||||
int hand = countHand.getEvaluator(actionContext).evaluateExpression(game, null);
|
||||
return handCards.size() >= hand;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -53,6 +53,12 @@ public class ExchangeCardsInHandWithCardsStacked implements EffectAppenderProduc
|
||||
return new AbstractEffect() {
|
||||
@Override
|
||||
protected FullEffectResult playEffectReturningResult(LotroGame game) {
|
||||
int hand = countHand.getEvaluator(actionContext).evaluateExpression(game, null);
|
||||
if(handCards.size() < hand) {
|
||||
game.getGameState().sendMessage(performingPlayer + " did not have " + hand + " card in hand to exchange.");
|
||||
return new FullEffectResult(false);
|
||||
}
|
||||
|
||||
Set<PhysicalCard> cardsToRemove = new HashSet<>();
|
||||
cardsToRemove.addAll(handCards);
|
||||
cardsToRemove.addAll(stackedCards);
|
||||
@@ -69,7 +75,8 @@ public class ExchangeCardsInHandWithCardsStacked implements EffectAppenderProduc
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(LotroGame game) {
|
||||
return true;
|
||||
int hand = countHand.getEvaluator(actionContext).evaluateExpression(game, null);
|
||||
return handCards.size() >= hand;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.gempukku.lotro.cards.build.field.effect.appender;
|
||||
|
||||
import com.gempukku.lotro.cards.build.ActionContext;
|
||||
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
|
||||
import com.gempukku.lotro.cards.build.InvalidCardDefinitionException;
|
||||
import com.gempukku.lotro.cards.build.ValueSource;
|
||||
import com.gempukku.lotro.cards.build.field.FieldUtils;
|
||||
import com.gempukku.lotro.cards.build.field.effect.EffectAppender;
|
||||
import com.gempukku.lotro.cards.build.field.effect.EffectAppenderProducer;
|
||||
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.CardResolver;
|
||||
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.ValueResolver;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||
import com.gempukku.lotro.logic.effects.RevealCardEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class RevealCardsFromDiscard implements EffectAppenderProducer {
|
||||
@Override
|
||||
public EffectAppender createEffectAppender(boolean cost, JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
FieldUtils.validateAllowedFields(effectObject, "count", "select", "memorize");
|
||||
|
||||
final String select = FieldUtils.getString(effectObject.get("select"), "select", "choose(any)");
|
||||
final String memorize = FieldUtils.getString(effectObject.get("memorize"), "memorize", "_temp");
|
||||
|
||||
final ValueSource countSource = ValueResolver.resolveEvaluator(effectObject.get("count"), 1, environment);
|
||||
|
||||
MultiEffectAppender result = new MultiEffectAppender();
|
||||
|
||||
result.addEffectAppender(
|
||||
CardResolver.resolveCardsInDiscard(select, countSource, memorize, "you", "Choose cards to reveal", environment));
|
||||
result.addEffectAppender(
|
||||
new DelayedAppender() {
|
||||
@Override
|
||||
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||
final Collection<? extends PhysicalCard> cardsToReveal = actionContext.getCardsFromMemory(memorize);
|
||||
return new RevealCardEffect(actionContext.getSource(), cardsToReveal);
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.gempukku.lotro.cards.build.field.effect.appender;
|
||||
|
||||
import com.gempukku.lotro.cards.build.ActionContext;
|
||||
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
|
||||
import com.gempukku.lotro.cards.build.InvalidCardDefinitionException;
|
||||
import com.gempukku.lotro.cards.build.ValueSource;
|
||||
import com.gempukku.lotro.cards.build.field.FieldUtils;
|
||||
import com.gempukku.lotro.cards.build.field.effect.EffectAppender;
|
||||
import com.gempukku.lotro.cards.build.field.effect.EffectAppenderProducer;
|
||||
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.CardResolver;
|
||||
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.ValueResolver;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||
import com.gempukku.lotro.logic.effects.RevealCardEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class RevealCardsFromDrawDeck implements EffectAppenderProducer {
|
||||
@Override
|
||||
public EffectAppender createEffectAppender(boolean cost, JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
FieldUtils.validateAllowedFields(effectObject, "count", "select", "memorize");
|
||||
|
||||
final String select = FieldUtils.getString(effectObject.get("select"), "select", "choose(any)");
|
||||
final String memorize = FieldUtils.getString(effectObject.get("memorize"), "memorize", "_temp");
|
||||
|
||||
final ValueSource countSource = ValueResolver.resolveEvaluator(effectObject.get("count"), 1, environment);
|
||||
|
||||
MultiEffectAppender result = new MultiEffectAppender();
|
||||
|
||||
result.addEffectAppender(
|
||||
CardResolver.resolveCardsInDeck(select, null, countSource, memorize, "you", "you",false, "Choose cards to reveal", environment));
|
||||
result.addEffectAppender(
|
||||
new DelayedAppender() {
|
||||
@Override
|
||||
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||
final Collection<? extends PhysicalCard> cardsToReveal = actionContext.getCardsFromMemory(memorize);
|
||||
return new RevealCardEffect(actionContext.getSource(), cardsToReveal);
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,7 +17,7 @@ import org.json.simple.JSONObject;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class RevealCards implements EffectAppenderProducer {
|
||||
public class RevealCardsFromPlay implements EffectAppenderProducer {
|
||||
@Override
|
||||
public EffectAppender createEffectAppender(boolean cost, JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
FieldUtils.validateAllowedFields(effectObject, "count", "select", "memorize");
|
||||
@@ -46,8 +46,8 @@ public class ScheduledTournamentQueue extends AbstractTournamentQueue implements
|
||||
if (now.isAfter(_startTime)) {
|
||||
if (_players.size() >= _tournamentInfo.Parameters().minimumPlayers) {
|
||||
startTournament();
|
||||
} else {
|
||||
_tournamentService.recordScheduledTournamentStarted(_tournamentInfo.Parameters().tournamentId);
|
||||
} else {
|
||||
leaveAllPlayers();
|
||||
}
|
||||
return true; //destroy the queue now that the tournament has started
|
||||
|
||||
Reference in New Issue
Block a user