"Denethor"

This commit is contained in:
marcins78@gmail.com
2012-03-07 10:56:40 +00:00
parent 8590bc83f9
commit ec3234ee25

View File

@@ -0,0 +1,74 @@
package com.gempukku.lotro.cards.set18.gondor;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.AddBurdenEffect;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Treachery & Deceit
* Side: Free
* Culture: Gondor
* Twilight Cost: 2
* Type: Companion • Man
* Strength: 8
* Vitality: 3
* Resistance: 5
* Game Text: Each time the fellowship moves from a site, add a burden. Skirmish: Exert another [GONDOR] Man to make him
* of her strength +1 and damage +1.
*/
public class Card18_042 extends AbstractCompanion {
public Card18_042() {
super(2, 8, 3, 5, Culture.GONDOR, Race.MAN, null, "Denethor", true);
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.movesFrom(game, effectResult, Filters.any)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new AddBurdenEffect(self, 1));
return Collections.singletonList(action);
}
return null;
}
@Override
protected List<ActivateCardAction> getExtraInPlayPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canExert(self, game, Filters.not(self), Culture.GONDOR, Race.MAN)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.not(self), Culture.GONDOR, Race.MAN) {
@Override
protected void forEachCardExertedCallback(PhysicalCard character) {
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, character, 1), Phase.SKIRMISH));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new KeywordModifier(self, character, Keyword.DAMAGE, 1), Phase.SKIRMISH));
}
});
return Collections.singletonList(action);
}
return null;
}
}