- "Eowyn" can prevent a wound by discarding two cards only during a skirmish now.

This commit is contained in:
marcins78@gmail.com
2011-10-25 01:23:50 +00:00
parent 9e806e1c7f
commit 004874a3b5
4 changed files with 52 additions and 49 deletions

View File

@@ -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<? extends ActivateCardAction> 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);

View File

@@ -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

View File

@@ -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("<b>Affecting card:</b>");
Collection<Modifier> modifiers = _lotroGame.getModifiersQuerying().getModifiersAffecting(_lotroGame.getGameState(), card);
for (Modifier modifier : modifiers) {
PhysicalCard source = modifier.getSource();
if (source != null)
sb.append("<br><b>" + source.getBlueprint().getName() + ":</b> " + modifier.getText(_lotroGame.getGameState(), _lotroGame.getModifiersQuerying(), card));
else
sb.append("<br><b><i>System</i>:</b> " + modifier.getText(_lotroGame.getGameState(), _lotroGame.getModifiersQuerying(), card));
}
if (modifiers.size() == 0)
sb.append("<br><i>nothing</i>");
if (card.getZone().isInPlay() || card.getZone() == Zone.HAND) {
StringBuilder sb = new StringBuilder();
sb.append("<br><br><b>Effective stats:</b>");
try {
int twilightCost = _lotroGame.getModifiersQuerying().getTwilightCost(_lotroGame.getGameState(), card);
sb.append("<br><b>Twilight cost:</b> " + twilightCost);
} catch (UnsupportedOperationException exp) {
}
try {
int strength = _lotroGame.getModifiersQuerying().getStrength(_lotroGame.getGameState(), card);
sb.append("<br><b>Strength:</b> " + strength);
} catch (UnsupportedOperationException exp) {
}
try {
int vitality = _lotroGame.getModifiersQuerying().getVitality(_lotroGame.getGameState(), card);
sb.append("<br><b>Vitality:</b> " + vitality);
} catch (UnsupportedOperationException exp) {
}
sb.append("<b>Affecting card:</b>");
Collection<Modifier> modifiers = _lotroGame.getModifiersQuerying().getModifiersAffecting(_lotroGame.getGameState(), card);
for (Modifier modifier : modifiers) {
PhysicalCard source = modifier.getSource();
if (source != null)
sb.append("<br><b>" + source.getBlueprint().getName() + ":</b> " + modifier.getText(_lotroGame.getGameState(), _lotroGame.getModifiersQuerying(), card));
else
sb.append("<br><b><i>System</i>:</b> " + modifier.getText(_lotroGame.getGameState(), _lotroGame.getModifiersQuerying(), card));
}
if (modifiers.size() == 0)
sb.append("<br><i>nothing</i>");
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("<br><br><b>Effective stats:</b>");
try {
int twilightCost = _lotroGame.getModifiersQuerying().getTwilightCost(_lotroGame.getGameState(), card);
sb.append("<br><b>Twilight cost:</b> " + twilightCost);
} catch (UnsupportedOperationException exp) {
}
try {
int strength = _lotroGame.getModifiersQuerying().getStrength(_lotroGame.getGameState(), card);
sb.append("<br><b>Strength:</b> " + strength);
} catch (UnsupportedOperationException exp) {
}
try {
int vitality = _lotroGame.getModifiersQuerying().getVitality(_lotroGame.getGameState(), card);
sb.append("<br><b>Vitality:</b> " + 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("<br><b>Keywords:</b> " + keywords.substring(0, keywords.length() - 2));
return sb.toString();
} else {
return null;
}
if (keywords.length() > 0)
sb.append("<br><b>Keywords:</b> " + keywords.substring(0, keywords.length() - 2));
return sb.toString();
} finally {
_readLock.unlock();
}

View File

@@ -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.
<b>23 Oct. 2011</b>
- "Hornburg Causeway" now adds +2 to archery for each unbound companion over 3, instead of +1.