This commit is contained in:
marcins78@gmail.com
2011-11-11 14:27:19 +00:00
parent 9e5473cd32
commit cfff993113

View File

@@ -0,0 +1,46 @@
package com.gempukku.lotro.cards.set8.dwarven;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.GameState;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
import com.gempukku.lotro.logic.modifiers.evaluator.Evaluator;
/**
* Set: Siege of Gondor
* Side: Free
* Culture: Dwarven
* Twilight Cost: 0
* Type: Event • Skirmish
* Game Text: Spot a Dwarf who is damage +X to make him strength +X.
*/
public class Card8_006 extends AbstractEvent {
public Card8_006() {
super(Side.FREE_PEOPLE, 0, Culture.DWARVEN, "Honed", Phase.SKIRMISH);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier, ignoreRoamingPenalty)
&& PlayConditions.canSpot(game, Race.DWARF, Keyword.DAMAGE);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId,
new Evaluator() {
@Override
public int evaluateExpression(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard cardAffected) {
return modifiersQuerying.getKeywordCount(gameState, cardAffected, Keyword.DAMAGE);
}
}, Race.DWARF, Keyword.DAMAGE));
return action;
}
}