"Old Tobby"

This commit is contained in:
marcins78@gmail.com
2011-09-05 01:24:31 +00:00
parent 6ed9cceed3
commit af509edc8e

View File

@@ -0,0 +1,56 @@
package com.gempukku.lotro.cards.set1.shire;
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
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.CostToEffectAction;
import com.gempukku.lotro.logic.effects.DrawCardEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Fellowship of the Ring
* Side: Free
* Culture: Shire
* Twilight Cost: 1
* Type: Possession
* Game Text: Pipeweed. Plays to your support area. When you play this possession, you may draw a card.
*/
public class Card1_305 extends AbstractLotroCardBlueprint {
public Card1_305() {
super(Side.FREE_PEOPLE, CardType.POSSESSION, Culture.SHIRE, "Old Tobby");
addKeyword(Keyword.PIPEWEED);
}
@Override
public int getTwilightCost() {
return 1;
}
@Override
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canPlayFPCardDuringPhase(game, Phase.FELLOWSHIP, self)) {
PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends Action> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
CostToEffectAction action = new CostToEffectAction(self, null, "Draw a card");
action.addEffect(
new DrawCardEffect(playerId));
return Collections.singletonList(action);
}
return null;
}
}