- If an effect calls for selecting a variable number of cards, and the number is 0, game should no longer stop working.
This commit is contained in:
@@ -11,6 +11,7 @@ import com.gempukku.lotro.logic.timing.AbstractEffect;
|
|||||||
import com.gempukku.lotro.logic.timing.Effect;
|
import com.gempukku.lotro.logic.timing.Effect;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public abstract class ChooseActiveCardsEffect extends AbstractEffect {
|
public abstract class ChooseActiveCardsEffect extends AbstractEffect {
|
||||||
@@ -73,7 +74,9 @@ public abstract class ChooseActiveCardsEffect extends AbstractEffect {
|
|||||||
if (matchingCards.size() < minimum)
|
if (matchingCards.size() < minimum)
|
||||||
minimum = matchingCards.size();
|
minimum = matchingCards.size();
|
||||||
|
|
||||||
if (_shortcut && matchingCards.size() == minimum) {
|
if (_shortcut && maximum == 0) {
|
||||||
|
cardsSelected(game, Collections.<PhysicalCard>emptySet());
|
||||||
|
} if (_shortcut && matchingCards.size() == minimum) {
|
||||||
if (_source != null && matchingCards.size() > 0)
|
if (_source != null && matchingCards.size() > 0)
|
||||||
game.getGameState().cardAffectsCard(_playerId, _source, matchingCards);
|
game.getGameState().cardAffectsCard(_playerId, _source, matchingCards);
|
||||||
cardsSelected(game, matchingCards);
|
cardsSelected(game, matchingCards);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.gempukku.lotro.logic.timing.Action;
|
|||||||
import com.gempukku.lotro.logic.timing.Effect;
|
import com.gempukku.lotro.logic.timing.Effect;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class ChooseAndDiscardCardsFromHandEffect extends AbstractSubActionEffect {
|
public class ChooseAndDiscardCardsFromHandEffect extends AbstractSubActionEffect {
|
||||||
@@ -79,7 +80,9 @@ public class ChooseAndDiscardCardsFromHandEffect extends AbstractSubActionEffect
|
|||||||
int maximum = Math.min(_maximum.evaluateExpression(game.getGameState(), game.getModifiersQuerying(), null), hand.size());
|
int maximum = Math.min(_maximum.evaluateExpression(game.getGameState(), game.getModifiersQuerying(), null), hand.size());
|
||||||
|
|
||||||
int minimum = _minimum.evaluateExpression(game.getGameState(), game.getModifiersQuerying(), null);
|
int minimum = _minimum.evaluateExpression(game.getGameState(), game.getModifiersQuerying(), null);
|
||||||
if (hand.size() <= minimum) {
|
if (maximum == 0) {
|
||||||
|
cardsBeingDiscardedCallback(Collections.<PhysicalCard>emptySet());
|
||||||
|
} else if (hand.size() <= minimum) {
|
||||||
SubAction subAction = new SubAction(_action);
|
SubAction subAction = new SubAction(_action);
|
||||||
subAction.appendEffect(new DiscardCardsFromHandEffect(_action.getActionSource(), _playerId, hand, _forced));
|
subAction.appendEffect(new DiscardCardsFromHandEffect(_action.getActionSource(), _playerId, hand, _forced));
|
||||||
processSubAction(game, subAction);
|
processSubAction(game, subAction);
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
<pre style="font-size:80%">
|
<pre style="font-size:80%">
|
||||||
|
<b>13 Dec. 2012</b>
|
||||||
|
- If an effect calls for selecting a variable number of cards, and the number is 0, game should no longer stop working.
|
||||||
|
|
||||||
<b>12 Dec. 2012</b>
|
<b>12 Dec. 2012</b>
|
||||||
- "Strength of Spirit" no longer cancels an effect if the exertion was a cost.
|
- "Strength of Spirit" no longer cancels an effect if the exertion was a cost.
|
||||||
- "Orc Insurgent" now allows a choice of number of FP cultures over 2 you wish to spot.
|
- "Orc Insurgent" now allows a choice of number of FP cultures over 2 you wish to spot.
|
||||||
|
|||||||
Reference in New Issue
Block a user