"Isengard Scimitar"
This commit is contained in:
@@ -0,0 +1,55 @@
|
|||||||
|
package com.gempukku.lotro.cards.set5.isengard;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractAttachable;
|
||||||
|
import com.gempukku.lotro.cards.PlayConditions;
|
||||||
|
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
|
||||||
|
import com.gempukku.lotro.common.*;
|
||||||
|
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.AddTwilightEffect;
|
||||||
|
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||||
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set: Battle of Helm's Deep
|
||||||
|
* Side: Shadow
|
||||||
|
* Culture: Isengard
|
||||||
|
* Twilight Cost: 0
|
||||||
|
* Type: Possession • Hand Weapon
|
||||||
|
* Strength: +2
|
||||||
|
* Game Text: Bearer must be an [ISENGARD] Orc. When you play this weapon, you may add (1) for each site you control.
|
||||||
|
*/
|
||||||
|
public class Card5_054 extends AbstractAttachable {
|
||||||
|
public Card5_054() {
|
||||||
|
super(Side.SHADOW, CardType.POSSESSION, 0, Culture.ISENGARD, PossessionClass.HAND_WEAPON, "Isengard Scimitar");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
|
return Filters.and(Culture.ISENGARD, Race.ORC);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) {
|
||||||
|
return Collections.singletonList(
|
||||||
|
new StrengthModifier(self, Filters.hasAttached(self), 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||||
|
if (PlayConditions.played(game, effectResult, self)
|
||||||
|
&& Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.siteControlled(playerId)) > 0) {
|
||||||
|
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||||
|
action.appendEffect(
|
||||||
|
new AddTwilightEffect(self, Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.siteControlled(playerId))));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -471,6 +471,8 @@ public class Filters {
|
|||||||
private static Filter changeToFilter(Filterable filter) {
|
private static Filter changeToFilter(Filterable filter) {
|
||||||
if (filter instanceof Filter)
|
if (filter instanceof Filter)
|
||||||
return (Filter) filter;
|
return (Filter) filter;
|
||||||
|
else if (filter instanceof PhysicalCard)
|
||||||
|
return Filters.sameCard((PhysicalCard) filter);
|
||||||
else if (filter instanceof CardType)
|
else if (filter instanceof CardType)
|
||||||
return Filters.type((CardType) filter);
|
return Filters.type((CardType) filter);
|
||||||
else if (filter instanceof Culture)
|
else if (filter instanceof Culture)
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
package com.gempukku.lotro.game;
|
package com.gempukku.lotro.game;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.common.Filterable;
|
||||||
import com.gempukku.lotro.common.Zone;
|
import com.gempukku.lotro.common.Zone;
|
||||||
|
|
||||||
public interface PhysicalCard {
|
public interface PhysicalCard extends Filterable {
|
||||||
public Zone getZone();
|
public Zone getZone();
|
||||||
|
|
||||||
public String getBlueprintId();
|
public String getBlueprintId();
|
||||||
|
|||||||
Reference in New Issue
Block a user