Couple of fixes.

This commit is contained in:
marcins78@gmail.com
2011-09-02 12:44:14 +00:00
parent 07700109cb
commit 7691b61974
7 changed files with 22 additions and 15 deletions

View File

@@ -16,8 +16,6 @@ public class StrengthModifier extends AbstractModifier {
@Override
public int getStrength(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, int result) {
if (affectsCard(gameState, modifiersQuerying, physicalCard))
return result + _modifier;
return result;
return result + _modifier;
}
}

View File

@@ -16,8 +16,6 @@ public class VitalityModifier extends AbstractModifier {
@Override
public int getVitality(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, int result) {
if (affectsCard(gameState, modifiersQuerying, physicalCard))
return result + _modifier;
return result;
return result + _modifier;
}
}

View File

@@ -3,6 +3,8 @@ package com.gempukku.lotro.cards.set1.dwarven;
import com.gempukku.lotro.cards.AbstractAlly;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
import com.gempukku.lotro.cards.effects.PutCardFromDiscardOnBottomOfDeckEffect;
import com.gempukku.lotro.cards.effects.ShuffleDeckEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
@@ -43,7 +45,7 @@ public class Card1_017 extends AbstractAlly {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Grimir to shuffle a DWARVEN event from your discard pile into draw deck");
final CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Grimir to shuffle a DWARVEN event from your discard pile into draw deck");
action.addCost(new ExertCharacterEffect(self));
List<PhysicalCard> discardedDwarvenEvents = Filters.filter(game.getGameState().getDiscard(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.DWARVEN), Filters.type(CardType.EVENT));
@@ -52,8 +54,9 @@ public class Card1_017 extends AbstractAlly {
new ChooseArbitraryCardsEffect(playerId, "Choose card to shuffle into draw deck", discardedDwarvenEvents, 1, 1) {
@Override
protected void cardsSelected(List<PhysicalCard> selectedCards) {
game.getGameState().putCardOnBottomOfDeck(selectedCards.get(0));
game.getGameState().shuffleDeck(playerId);
action.addEffect(
new PutCardFromDiscardOnBottomOfDeckEffect(selectedCards.get(0)));
action.addEffect(new ShuffleDeckEffect(playerId));
}
}
);

View File

@@ -54,7 +54,7 @@ public class Card1_031 extends AbstractAttachableFPPossession {
return new AbstractModifier(self, "Strength +2, if at Plains another +2", Filters.attachedTo(self)) {
@Override
public int getStrength(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard, int result) {
return modifiersQuerying.hasKeyword(gameState, gameState.getCurrentSite(), Keyword.PLAINS) ? 4 : 2;
return result + (modifiersQuerying.hasKeyword(gameState, gameState.getCurrentSite(), Keyword.PLAINS) ? 4 : 2);
}
};
}

View File

@@ -45,7 +45,7 @@ public class LotroGameMediator {
if (card == null)
return null;
sb.append("Affecting card:");
sb.append("<b>Affecting card:</b>");
List<Modifier> modifiers = _lotroGame.getModifiersQuerying().getModifiersAffecting(_lotroGame.getGameState(), card);
for (Modifier modifier : modifiers) {
PhysicalCard source = modifier.getSource();
@@ -59,8 +59,11 @@ public class LotroGameMediator {
CardType type = card.getBlueprint().getCardType();
if (type == CardType.COMPANION || type == CardType.ALLY || type == CardType.MINION) {
sb.append("<b>Effective stats:</b>");
sb.append("<br><b>Strength:</b> " + _lotroGame.getModifiersQuerying().getStrength(_lotroGame.getGameState(), card));
sb.append("<br><b>Vitality:</b> " + _lotroGame.getModifiersQuerying().getVitality(_lotroGame.getGameState(), card));
if (type == CardType.MINION)
sb.append("<br><b>Twilight cost:</b> " + _lotroGame.getModifiersQuerying().getTwilightCost(_lotroGame.getGameState(), card));
}
return sb.toString();

View File

@@ -56,6 +56,14 @@ public class LotroServer {
for (int i = 3; i < 58; i++)
lotroDeck.addCard("1_" + i);
for (int i = 0; i < 3; i++) {
lotroDeck.addCard("1_14");
lotroDeck.addCard("1_15");
lotroDeck.addCard("1_17");
lotroDeck.addCard("1_31");
lotroDeck.addCard("1_33");
}
// Sites
lotroDeck.addSite("1_326");
lotroDeck.addSite("1_331");

View File

@@ -314,10 +314,7 @@ var GempLotrUI = Class.extend({
},
processError: function (xhr, ajaxOptions, thrownError) {
alert("There was a problem during communication with server:");
alert(xhr);
alert(ajaxOptions);
alert(thrownError);
alert("There was a problem during communication with server");
},
addTokens: function(element) {