"Gandalf's Staff"

This commit is contained in:
marcins78@gmail.com
2011-10-07 11:00:20 +00:00
parent 1c792afd78
commit 9f93b001c6

View File

@@ -0,0 +1,50 @@
package com.gempukku.lotro.cards.set4.gandalf;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.filters.Filter;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.GameState;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.modifiers.Condition;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
import java.util.Collections;
import java.util.List;
/**
* Set: The Two Towers
* Side: Free
* Culture: Gandalf
* Twilight Cost: 2
* Type: Artifact
* Vitality: +1
* Game Text: Bearer must be Gandalf. While you can spot 2 twilight tokens, Gandalf is damage +2.
*/
public class Card4_091 extends AbstractAttachableFPPossession {
public Card4_091() {
super(2, 0, 1, Culture.GANDALF, CardType.ARTIFACT, Keyword.STAFF, "Gandalf's Staff", true);
}
@Override
protected Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.name("Gandalf");
}
@Override
protected List<? extends Modifier> getNonBasicStatsModifiers(PhysicalCard self) {
return Collections.singletonList(
new KeywordModifier(self, Filters.name("Gandalf"),
new Condition() {
@Override
public boolean isFullfilled(GameState gameState, ModifiersQuerying modifiersQuerying) {
return gameState.getTwilightPool() >= 2;
}
}, Keyword.DAMAGE, 2));
}
}