"Legolas' Sword"

This commit is contained in:
marcins78@gmail.com
2011-10-17 12:35:06 +00:00
parent 3d6f8b884d
commit ee355e6eed

View File

@@ -0,0 +1,49 @@
package com.gempukku.lotro.cards.set5.elven;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.PossessionClass;
import com.gempukku.lotro.filters.Filter;
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.OptionalTriggerAction;
import com.gempukku.lotro.logic.effects.HealCharactersEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Battle of Helm's Deep
* Side: Free
* Culture: Elven
* Twilight Cost: 1
* Type: Possession • Hand Weapon
* Strength: +1
* Game Text: Bearer must be Legolas. Each time the fellowship moves, you may spot a wounded minion to heal Legolas.
*/
public class Card5_012 extends AbstractAttachableFPPossession {
public Card5_012() {
super(1, 1, 0, Culture.ELVEN, PossessionClass.HAND_WEAPON, "Legolas' Sword", true);
}
@Override
protected Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.name("Legolas");
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (effectResult.getType() == EffectResult.Type.WHEN_FELLOWSHIP_MOVES
&& PlayConditions.canSpot(game, CardType.MINION, Filters.wounded)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new HealCharactersEffect(playerId, self));
return Collections.singletonList(action);
}
return null;
}
}