diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/rohan/Card4_271.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/rohan/Card4_271.java index 6e72cae54..b31d89409 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/rohan/Card4_271.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set4/rohan/Card4_271.java @@ -4,10 +4,7 @@ import com.gempukku.lotro.cards.AbstractCompanion; import com.gempukku.lotro.cards.PlayConditions; import com.gempukku.lotro.cards.effects.PreventCardEffect; import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromHandEffect; -import com.gempukku.lotro.common.Culture; -import com.gempukku.lotro.common.Keyword; -import com.gempukku.lotro.common.Race; -import com.gempukku.lotro.common.Signet; +import com.gempukku.lotro.common.*; import com.gempukku.lotro.filters.Filters; import com.gempukku.lotro.game.PhysicalCard; import com.gempukku.lotro.game.state.LotroGame; @@ -40,6 +37,7 @@ public class Card4_271 extends AbstractCompanion { @Override public List getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) { if (PlayConditions.isGettingWounded(effect, game, Filters.sameCard(self)) + && game.getGameState().getCurrentPhase() == Phase.SKIRMISH && Filters.exhausted.accepts(game.getGameState(), game.getModifiersQuerying(), self) && game.getGameState().getHand(playerId).size() >= 2) { ActivateCardAction action = new ActivateCardAction(self); diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/game/state/GameState.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/game/state/GameState.java index 897b7ffea..110a8d148 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/game/state/GameState.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/game/state/GameState.java @@ -725,7 +725,7 @@ public class GameState { return _fierceSkirmishes; } - private boolean isCardInPlayActive(PhysicalCard card) { + public boolean isCardInPlayActive(PhysicalCard card) { Side side = card.getBlueprint().getSide(); // Either it's not attached or attached to active card // AND is a site or fp/ring of current player or shadow of any other player diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/LotroGameMediator.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/LotroGameMediator.java index e22a5091b..31103fe32 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/LotroGameMediator.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/game/LotroGameMediator.java @@ -2,6 +2,7 @@ package com.gempukku.lotro.game; import com.gempukku.lotro.common.Keyword; import com.gempukku.lotro.common.Phase; +import com.gempukku.lotro.common.Zone; import com.gempukku.lotro.game.state.GameEvent; import com.gempukku.lotro.game.state.GatheringParticipantCommunicationChannel; import com.gempukku.lotro.logic.decisions.AwaitingDecision; @@ -66,58 +67,61 @@ public class LotroGameMediator { public String produceCardInfo(String participantId, int cardId) { _readLock.lock(); try { - StringBuilder sb = new StringBuilder(); - PhysicalCard card = _lotroGame.getGameState().findCardById(cardId); - if (card == null) + if (card == null || card.getZone() == null) return null; - sb.append("Affecting card:"); - Collection modifiers = _lotroGame.getModifiersQuerying().getModifiersAffecting(_lotroGame.getGameState(), card); - for (Modifier modifier : modifiers) { - PhysicalCard source = modifier.getSource(); - if (source != null) - sb.append("
" + source.getBlueprint().getName() + ": " + modifier.getText(_lotroGame.getGameState(), _lotroGame.getModifiersQuerying(), card)); - else - sb.append("
System: " + modifier.getText(_lotroGame.getGameState(), _lotroGame.getModifiersQuerying(), card)); - } - if (modifiers.size() == 0) - sb.append("
nothing"); + if (card.getZone().isInPlay() || card.getZone() == Zone.HAND) { + StringBuilder sb = new StringBuilder(); - sb.append("

Effective stats:"); - try { - int twilightCost = _lotroGame.getModifiersQuerying().getTwilightCost(_lotroGame.getGameState(), card); - sb.append("
Twilight cost: " + twilightCost); - } catch (UnsupportedOperationException exp) { - } - try { - int strength = _lotroGame.getModifiersQuerying().getStrength(_lotroGame.getGameState(), card); - sb.append("
Strength: " + strength); - } catch (UnsupportedOperationException exp) { - } - try { - int vitality = _lotroGame.getModifiersQuerying().getVitality(_lotroGame.getGameState(), card); - sb.append("
Vitality: " + vitality); - } catch (UnsupportedOperationException exp) { - } + sb.append("Affecting card:"); + Collection modifiers = _lotroGame.getModifiersQuerying().getModifiersAffecting(_lotroGame.getGameState(), card); + for (Modifier modifier : modifiers) { + PhysicalCard source = modifier.getSource(); + if (source != null) + sb.append("
" + source.getBlueprint().getName() + ": " + modifier.getText(_lotroGame.getGameState(), _lotroGame.getModifiersQuerying(), card)); + else + sb.append("
System: " + modifier.getText(_lotroGame.getGameState(), _lotroGame.getModifiersQuerying(), card)); + } + if (modifiers.size() == 0) + sb.append("
nothing"); - StringBuilder keywords = new StringBuilder(); - for (Keyword keyword : Keyword.values()) { - if (keyword.isInfoDisplayable()) { - if (keyword.isMultiples()) { - int count = _lotroGame.getModifiersQuerying().getKeywordCount(_lotroGame.getGameState(), card, keyword); - if (count > 0) - keywords.append(keyword.getHumanReadable() + " +" + count + ", "); - } else { - if (_lotroGame.getModifiersQuerying().hasKeyword(_lotroGame.getGameState(), card, keyword)) - keywords.append(keyword.getHumanReadable() + ", "); + sb.append("

Effective stats:"); + try { + int twilightCost = _lotroGame.getModifiersQuerying().getTwilightCost(_lotroGame.getGameState(), card); + sb.append("
Twilight cost: " + twilightCost); + } catch (UnsupportedOperationException exp) { + } + try { + int strength = _lotroGame.getModifiersQuerying().getStrength(_lotroGame.getGameState(), card); + sb.append("
Strength: " + strength); + } catch (UnsupportedOperationException exp) { + } + try { + int vitality = _lotroGame.getModifiersQuerying().getVitality(_lotroGame.getGameState(), card); + sb.append("
Vitality: " + vitality); + } catch (UnsupportedOperationException exp) { + } + + StringBuilder keywords = new StringBuilder(); + for (Keyword keyword : Keyword.values()) { + if (keyword.isInfoDisplayable()) { + if (keyword.isMultiples()) { + int count = _lotroGame.getModifiersQuerying().getKeywordCount(_lotroGame.getGameState(), card, keyword); + if (count > 0) + keywords.append(keyword.getHumanReadable() + " +" + count + ", "); + } else { + if (_lotroGame.getModifiersQuerying().hasKeyword(_lotroGame.getGameState(), card, keyword)) + keywords.append(keyword.getHumanReadable() + ", "); + } } } + if (keywords.length() > 0) + sb.append("
Keywords: " + keywords.substring(0, keywords.length() - 2)); + return sb.toString(); + } else { + return null; } - if (keywords.length() > 0) - sb.append("
Keywords: " + keywords.substring(0, keywords.length() - 2)); - - return sb.toString(); } finally { _readLock.unlock(); } diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html b/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html index 0dc2039d0..0cdda705a 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html @@ -12,6 +12,7 @@ a site. - Liberating a site should no longer freeze the game. - Added animations for activating a card and removing a card form play. - "Theoden" and "Gamling" play possessions from hand using their ability, rather than from discard. +- "Eowyn" can prevent a wound by discarding two cards only during a skirmish now. 23 Oct. 2011 - "Hornburg Causeway" now adds +2 to archery for each unbound companion over 3, instead of +1.