"Foul Tentacle"

This commit is contained in:
marcins78@gmail.com
2011-09-28 21:50:52 +00:00
parent 26b7e5dcf2
commit 866b44416f
3 changed files with 70 additions and 2 deletions

View File

@@ -0,0 +1,68 @@
package com.gempukku.lotro.cards.set2.moria;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.ChooseAndPlayCardFromDeckEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
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.OptionalTriggerAction;
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Mines of Moria
* Side: Shadow
* Culture: Moria
* Twilight Cost: 2
* Type: Minion • Creature
* Strength: 4
* Vitality: 1
* Site: 4
* Game Text: Tentacle. When you play this minion, you may play a tentacle from your draw deck. This minion may not
* bear possessions and is discarded if not at a marsh.
*/
public class Card2_058 extends AbstractMinion {
public Card2_058() {
super(2, 4, 1, 4, Race.CREATURE, Culture.MORIA, "Foul Tentacle");
addKeyword(Keyword.TENTACLE);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new ChooseAndPlayCardFromDeckEffect(playerId, Filters.keyword(Keyword.TENTACLE)));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
List<RequiredTriggerAction> actions = new LinkedList<RequiredTriggerAction>();
if (Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.type(CardType.POSSESSION), Filters.attachedTo(Filters.sameCard(self)))) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new DiscardCardsFromPlayEffect(self, Filters.and(Filters.type(CardType.POSSESSION), Filters.attachedTo(Filters.sameCard(self)))));
actions.add(action);
}
if (!game.getModifiersQuerying().hasKeyword(game.getGameState(), game.getGameState().getCurrentSite(), Keyword.MARSH)) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new DiscardCardsFromPlayEffect(self, self));
actions.add(action);
}
return actions;
}
}

View File

@@ -9,7 +9,7 @@ public enum Keyword {
ROAMING("Roaming", true),
WEATHER("Weather"), TALE("Tale"), SPELL("Spell"), SEARCH("Search"), STEALTH("Stealth"),
WEATHER("Weather"), TALE("Tale"), SPELL("Spell"), SEARCH("Search"), STEALTH("Stealth"), TENTACLE("Tentacle"),
RIVER("River"), PLAINS("Plains"), UNDERGROUND("Underground"), SANCTUARY("Sanctuary"), FOREST("Forest"), MARSH("Marsh"), MOUNTAIN("Mountain"),

View File

@@ -1,7 +1,7 @@
package com.gempukku.lotro.common;
public enum Race {
BALROG("Balrog"),
BALROG("Balrog"), CREATURE("Creature"),
ELF("Elf"), HOBBIT("Hobbit"), DWARF("Dwarf"), MAN("Man"), WIZARD("Wizard"),
URUK_HAI("Uruk-Hai"), NAZGUL("Nazgul"), ORC("Orc"), TROLL("Troll");