diff --git a/gemp-lotr/gemp-lotr-common/src/main/java/com/gempukku/lotro/common/Keyword.java b/gemp-lotr/gemp-lotr-common/src/main/java/com/gempukku/lotro/common/Keyword.java index 207c01a6e..a8fb28150 100644 --- a/gemp-lotr/gemp-lotr-common/src/main/java/com/gempukku/lotro/common/Keyword.java +++ b/gemp-lotr/gemp-lotr-common/src/main/java/com/gempukku/lotro/common/Keyword.java @@ -5,26 +5,46 @@ public enum Keyword { SKIRMISH("Skirmish"), FELLOWSHIP("Fellowship"), RESPONSE("Response"), MANEUVER("Maneuver"), ARCHERY("Archery"), SHADOW("Shadow"), ASSIGNMENT("Assignment"), REGROUP("Regroup"), - RING_BOUND("Ring-Bound"), RING_BEARER("Ring-Bearer"), + RING_BOUND("Ring-Bound", true), RING_BEARER("Ring-Bearer", true), - ROAMING("Roaming"), + ROAMING("Roaming", true), WEATHER("Weather"), TALE("Tale"), SPELL("Spell"), SEARCH("Search"), STEALTH("Stealth"), RIVER("River"), PLAINS("Plains"), UNDERGROUND("Underground"), SANCTUARY("Sanctuary"), FOREST("Forest"), MARSH("Marsh"), MOUNTAIN("Mountain"), - DAMAGE("Damage"), DEFENDER("Defender"), FIERCE("Fierce"), ARCHER("Archer"), RANGER("Ranger"), TRACKER("Tracker"), + DAMAGE("Damage", true, true), DEFENDER("Defender", true, true), FIERCE("Fierce", true), ARCHER("Archer", true), RANGER("Ranger", true), TRACKER("Tracker", true), HAND_WEAPON("Hand Weapon"), ARMOR("Armor"), HELM("Helm"), MOUNT("Mount"), RANGED_WEAPON("Ranged Weapon"), CLOAK("Cloak"), PIPE("Pipe"), PIPEWEED("Pipeweed"), SHIELD("Shield"); private String _humanReadable; + private boolean _infoDisplayable; + private boolean _multiples; private Keyword(String humanReadable) { + this(humanReadable, false); + } + + private Keyword(String humanReadable, boolean infoDisplayable) { + this(humanReadable, infoDisplayable, false); + } + + private Keyword(String humanReadable, boolean infoDisplayable, boolean multiples) { _humanReadable = humanReadable; + _infoDisplayable = infoDisplayable; + _multiples = multiples; } public String getHumanReadable() { return _humanReadable; } + + public boolean isInfoDisplayable() { + return _infoDisplayable; + } + + public boolean isMultiples() { + return _multiples; + } } 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 582bbe55c..d6abe1120 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 @@ -1,6 +1,6 @@ package com.gempukku.lotro.game; -import com.gempukku.lotro.common.CardType; +import com.gempukku.lotro.common.Keyword; import com.gempukku.lotro.common.Phase; import com.gempukku.lotro.game.formats.LotroFormat; import com.gempukku.lotro.game.state.GameState; @@ -80,14 +80,38 @@ public class LotroGameMediator { if (modifiers.size() == 0) sb.append("
nothing"); - CardType type = card.getBlueprint().getCardType(); - if (type == CardType.COMPANION || type == CardType.ALLY || type == CardType.MINION) { - sb.append("

Effective stats:"); - sb.append("
Strength: " + _lotroGame.getModifiersQuerying().getStrength(_lotroGame.getGameState(), card)); - sb.append("
Vitality: " + _lotroGame.getModifiersQuerying().getVitality(_lotroGame.getGameState(), card)); - if (type == CardType.MINION) - sb.append("
Twilight cost: " + _lotroGame.getModifiersQuerying().getTwilightCost(_lotroGame.getGameState(), card)); + 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(); } finally {