"Faramir's Company"

This commit is contained in:
marcins78@gmail.com
2012-03-07 11:29:00 +00:00
parent 8a945b8a52
commit 52999077f2

View File

@@ -0,0 +1,57 @@
package com.gempukku.lotro.cards.set18.gondor;
import com.gempukku.lotro.cards.AbstractFollower;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Side;
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.RequiredTriggerAction;
import com.gempukku.lotro.logic.effects.AddThreatsEffect;
import com.gempukku.lotro.logic.effects.HealCharactersEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Treachery & Deceit
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Follower
* Game Text: Aid - Add a threat. (At the start of the maneuver phase, you may add a threat to transfer this to
* a companion.) When you attach this card to a companion, spot a [GONDOR] possession to heal that companion.
*/
public class Card18_049 extends AbstractFollower {
public Card18_049() {
super(Side.FREE_PEOPLE, 1, 0, 0, 0, Culture.GONDOR, "Faramir's Company", true);
}
@Override
protected boolean canPayAidCost(LotroGame game, PhysicalCard self) {
return PlayConditions.canAddThreat(game, self, 1);
}
@Override
protected Effect getAidCost(LotroGame game, Action action, PhysicalCard self) {
return new AddThreatsEffect(self.getOwner(), self, 1);
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.transferredCard(game, effectResult, self, null, CardType.COMPANION)
&& PlayConditions.canSpot(game, Culture.GONDOR, CardType.POSSESSION)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new HealCharactersEffect(self, Filters.hasAttached(self)));
return Collections.singletonList(action);
}
return null;
}
}