From f2c374b0ba54438ca4243711864415970440da8f Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Mon, 6 Feb 2012 15:41:43 +0000 Subject: [PATCH] "Sam" --- .../lotro/cards/set15/shire/Card15_153.java | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/shire/Card15_153.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/shire/Card15_153.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/shire/Card15_153.java new file mode 100644 index 000000000..b112f4a75 --- /dev/null +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/set15/shire/Card15_153.java @@ -0,0 +1,70 @@ +package com.gempukku.lotro.cards.set15.shire; + +import com.gempukku.lotro.cards.AbstractCompanion; +import com.gempukku.lotro.cards.PlayConditions; +import com.gempukku.lotro.cards.TriggerConditions; +import com.gempukku.lotro.cards.effects.MakeRingBearerEffect; +import com.gempukku.lotro.cards.effects.SelfExertEffect; +import com.gempukku.lotro.cards.modifiers.ResistanceModifier; +import com.gempukku.lotro.common.*; +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.OptionalTriggerAction; +import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect; +import com.gempukku.lotro.logic.modifiers.Modifier; +import com.gempukku.lotro.logic.timing.EffectResult; + +import java.util.Collections; +import java.util.List; + +/** + * Set: The Hunters + * Side: Free + * Culture: Shire + * Twilight Cost: 2 + * Type: Companion • Hobbit + * Strength: 3 + * Vitality: 4 + * Resistance: 9 + * Game Text: Ring-bound. While Sam bears the One Ring, he is resistance -4. Maneuver: If Sam is bearing a follower, + * exert him to heal another Hobbit. Response: If Frodo is killed, make Sam the Ring-bearer. + */ +public class Card15_153 extends AbstractCompanion { + public Card15_153() { + super(2, 3, 4, 9, Culture.SHIRE, Race.HOBBIT, null, "Sam", true); + addKeyword(Keyword.RING_BOUND); + } + + @Override + public Modifier getAlwaysOnModifier(PhysicalCard self) { + return new ResistanceModifier(self, Filters.and(self, Filters.hasAttached(CardType.THE_ONE_RING)), -4); + } + + @Override + protected List getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) { + if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self) + && PlayConditions.canSpot(game, self, Filters.hasAttached(CardType.FOLLOWER)) + && PlayConditions.canSelfExert(self, game)) { + ActivateCardAction action = new ActivateCardAction(self); + action.appendCost( + new SelfExertEffect(self)); + action.appendEffect( + new ChooseAndHealCharactersEffect(action, playerId, Filters.not(self), Race.HOBBIT)); + return Collections.singletonList(action); + } + return null; + } + + @Override + public List getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) { + if (TriggerConditions.forEachKilled(game, effectResult, Filters.frodo, Filters.ringBearer)) { + OptionalTriggerAction action = new OptionalTriggerAction(self); + action.appendEffect(new MakeRingBearerEffect(self)); + return Collections.singletonList(action); + } + + return null; + } +}