"Despair"
This commit is contained in:
@@ -6,20 +6,14 @@ import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.results.RemoveBurdenResult;
|
||||
|
||||
public class RemoveBurdenEffect extends AbstractEffect {
|
||||
private String _playerId;
|
||||
|
||||
public RemoveBurdenEffect(String playerId) {
|
||||
_playerId = playerId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayEffect(LotroGame game) {
|
||||
return game.getGameState().getBurdens(_playerId) > 0;
|
||||
return game.getGameState().getBurdens() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectResult getRespondableResult() {
|
||||
return new RemoveBurdenResult(_playerId);
|
||||
return new RemoveBurdenResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -29,6 +23,6 @@ public class RemoveBurdenEffect extends AbstractEffect {
|
||||
|
||||
@Override
|
||||
public void playEffect(LotroGame game) {
|
||||
game.getGameState().removeBurdens(_playerId, 1);
|
||||
game.getGameState().removeBurdens(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class Card1_078 extends AbstractEvent {
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
int bonus = (game.getGameState().getBurdens(playerId) <= 4) ? 4 : 2;
|
||||
int bonus = (game.getGameState().getBurdens() <= 4) ? 4 : 2;
|
||||
action.addEffect(
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new StrengthModifier(self, Filters.name("Gandalf"), bonus), Phase.SKIRMISH));
|
||||
|
||||
@@ -68,7 +68,7 @@ public class Card1_120 extends AbstractLotroCardBlueprint {
|
||||
final String fpPlayer = gameState.getCurrentPlayerId();
|
||||
action.addEffect(
|
||||
new PlayoutDecisionEffect(game.getUserFeedback(), playerId,
|
||||
new ArbitraryCardsSelectionDecision(1, "Choose card to discard", GameUtils.getRandomCards(gameState.getHand(fpPlayer), gameState.getBurdens(fpPlayer)), 0, 1) {
|
||||
new ArbitraryCardsSelectionDecision(1, "Choose card to discard", GameUtils.getRandomCards(gameState.getHand(fpPlayer), gameState.getBurdens()), 0, 1) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
List<PhysicalCard> cards = getSelectedCardsByResponse(result);
|
||||
|
||||
@@ -63,7 +63,7 @@ public class Card1_142 extends AbstractLotroCardBlueprint {
|
||||
@Override
|
||||
public int getMoveLimit(GameState gameState, ModifiersQuerying modifiersQuerying, int result) {
|
||||
String currentPlayerId = gameState.getCurrentPlayerId();
|
||||
if (gameState.getBurdens(currentPlayerId) >= 5
|
||||
if (gameState.getBurdens() >= 5
|
||||
|| !PlayConditions.canExert(gameState, modifiersQuerying, gameState.getRingBearer(currentPlayerId)))
|
||||
return result - 1;
|
||||
return result;
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.gempukku.lotro.cards.set1.sauron;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Shadow
|
||||
* Culture: Sauron
|
||||
* Twilight Cost: 2
|
||||
* Type: Event
|
||||
* Game Text: Maneuver: If the total number of burdens and companions in the dead pile is at least 12, spot
|
||||
* a [SAURON] Orc to corrupt the Ring-bearer.
|
||||
*/
|
||||
public class Card1_243 extends AbstractEvent {
|
||||
public Card1_243() {
|
||||
super(Side.SHADOW, Culture.SAURON, "Despair", Phase.MANEUVER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.SAURON), Filters.keyword(Keyword.ORC))
|
||||
&& (game.getGameState().getBurdens() + Filters.filter(game.getGameState().getDeadPile(game.getGameState().getCurrentPlayerId()), game.getGameState(), game.getModifiersQuerying(), Filters.type(CardType.COMPANION)).size()) >= 12;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.addEffect(
|
||||
new UnrespondableEffect() {
|
||||
@Override
|
||||
public void playEffect(LotroGame game) {
|
||||
game.getGameState().setLoserPlayerId(game.getGameState().getCurrentPlayerId());
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTwilightCost() {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ public class Card1_362 extends AbstractSite {
|
||||
List<Action> actions = new LinkedList<Action>();
|
||||
|
||||
String fpPlayerId = game.getGameState().getCurrentPlayerId();
|
||||
final int burdens = game.getGameState().getBurdens(fpPlayerId);
|
||||
final int burdens = game.getGameState().getBurdens();
|
||||
|
||||
String[] opponents = GameUtils.getOpponents(game, fpPlayerId);
|
||||
for (String opponent : opponents) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Card1_210 extends AbstractEvent {
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
|
||||
&& game.getGameState().getBurdens(game.getGameState().getCurrentPlayerId()) >= 3;
|
||||
&& game.getGameState().getBurdens() >= 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,7 +46,7 @@ public class Card1_210 extends AbstractEvent {
|
||||
new ChooseActiveCardEffect(playerId, "Choose a Nazgul", Filters.keyword(Keyword.NAZGUL)) {
|
||||
@Override
|
||||
protected void cardSelected(PhysicalCard nazgul) {
|
||||
int burdens = game.getGameState().getBurdens(game.getGameState().getCurrentPlayerId());
|
||||
int burdens = game.getGameState().getBurdens();
|
||||
|
||||
List<Modifier> modifiers = new LinkedList<Modifier>();
|
||||
modifiers.add(new StrengthModifier(null, null, (burdens >= 6) ? 3 : 1));
|
||||
|
||||
@@ -44,14 +44,14 @@ public class Card1_218 extends AbstractAttachable {
|
||||
|
||||
@Override
|
||||
public int getKeywordCount(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, Keyword keyword, int result) {
|
||||
if (keyword == Keyword.DAMAGE && gameState.getBurdens(gameState.getCurrentPlayerId()) >= 3)
|
||||
if (keyword == Keyword.DAMAGE && gameState.getBurdens() >= 3)
|
||||
return result + 1;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasKeyword(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, Keyword keyword, boolean result) {
|
||||
if (keyword == Keyword.DAMAGE && gameState.getBurdens(gameState.getCurrentPlayerId()) >= 3)
|
||||
if (keyword == Keyword.DAMAGE && gameState.getBurdens() >= 3)
|
||||
return true;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class Card1_227 extends AbstractEvent {
|
||||
new ChooseActiveCardEffect(playerId, "Choose a Nazgul", Filters.keyword(Keyword.NAZGUL)) {
|
||||
@Override
|
||||
protected void cardSelected(PhysicalCard nazgul) {
|
||||
int bonus = (game.getGameState().getBurdens(game.getGameState().getCurrentPlayerId()) >= 5) ? 4 : 2;
|
||||
int bonus = (game.getGameState().getBurdens() >= 5) ? 4 : 2;
|
||||
action.addEffect(
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new StrengthModifier(self, Filters.sameCard(nazgul), bonus), Phase.SKIRMISH));
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Card1_231 extends AbstractMinion {
|
||||
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)
|
||||
&& (
|
||||
Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.type(CardType.COMPANION)) >= 6
|
||||
|| game.getGameState().getBurdens(game.getGameState().getCurrentPlayerId()) >= 5)) {
|
||||
|| game.getGameState().getBurdens() >= 5)) {
|
||||
final DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, Keyword.MANEUVER, "Exert Ulaire Enquea to wound a companion (except the Ring-bearer).");
|
||||
action.addCost(
|
||||
new ExertCharacterEffect(self));
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Card1_236 extends AbstractMinion {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, final LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.ASSIGNMENT, self, 0)
|
||||
&& game.getGameState().getBurdens(game.getGameState().getCurrentPlayerId()) >= 4) {
|
||||
&& game.getGameState().getBurdens() >= 4) {
|
||||
DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, Keyword.ASSIGNMENT, "Assign a companion (except the Ring-bearer) to skirmish Ulaire Toldea.");
|
||||
if (Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.sameCard(self), Filters.notAssigned())) {
|
||||
action.addEffect(
|
||||
|
||||
@@ -438,12 +438,12 @@ public class GameState {
|
||||
addTokens(_ringBearers.get(playerId), Token.BURDEN, Math.max(0, burdens));
|
||||
}
|
||||
|
||||
public int getBurdens(String playerId) {
|
||||
return getTokenCount(_ringBearers.get(playerId), Token.BURDEN);
|
||||
public int getBurdens() {
|
||||
return getTokenCount(_ringBearers.get(getCurrentPlayerId()), Token.BURDEN);
|
||||
}
|
||||
|
||||
public void removeBurdens(String playerId, int burdens) {
|
||||
removeTokens(_ringBearers.get(playerId), Token.BURDEN, Math.max(0, burdens));
|
||||
public void removeBurdens(int burdens) {
|
||||
removeTokens(_ringBearers.get(getCurrentPlayerId()), Token.BURDEN, Math.max(0, burdens));
|
||||
}
|
||||
|
||||
public void addWound(PhysicalCard card) {
|
||||
|
||||
@@ -3,14 +3,7 @@ package com.gempukku.lotro.logic.timing.results;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
public class RemoveBurdenResult extends EffectResult {
|
||||
private String _playerId;
|
||||
|
||||
public RemoveBurdenResult(String playerId) {
|
||||
public RemoveBurdenResult() {
|
||||
super(EffectResult.Type.REMOVE_BURDEN);
|
||||
_playerId = playerId;
|
||||
}
|
||||
|
||||
public String getPlayerId() {
|
||||
return _playerId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class LoseConditionsRule {
|
||||
}
|
||||
PhysicalCard ringBearer = Filters.findFirstActive(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.RING_BEARER));
|
||||
int ringBearerResistance = ringBearer.getBlueprint().getResistance();
|
||||
if (game.getGameState().getBurdens(game.getGameState().getCurrentPlayerId()) >= ringBearerResistance) {
|
||||
if (game.getGameState().getBurdens() >= ringBearerResistance) {
|
||||
DefaultCostToEffectAction action = new DefaultCostToEffectAction(null, null, "Losing the game due to Ring-Bearer corruption");
|
||||
action.addEffect(
|
||||
new UnrespondableEffect() {
|
||||
|
||||
Reference in New Issue
Block a user