"Brace of Coneys"
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
package com.gempukku.lotro.cards.set4.shire;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.RemoveBurdenEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
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.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Two Towers
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession
|
||||
* Game Text: Bearer must be a Ring-bound Hobbit. Fellowship: Discard this possession to remove a burden.
|
||||
*/
|
||||
public class Card4_298 extends AbstractAttachableFPPossession {
|
||||
public Card4_298() {
|
||||
super(1, 0, 0, Culture.SHIRE, null, "Brace of Coneys");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.and(Race.HOBBIT, Keyword.RING_BOUND);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new DiscardCardsFromPlayEffect(self, self));
|
||||
action.appendEffect(
|
||||
new RemoveBurdenEffect(self));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.gempukku.lotro.logic.timing.rules;
|
||||
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersLogic;
|
||||
|
||||
public class FrodoAndSamRule {
|
||||
private ModifiersLogic _modifiersLogic;
|
||||
|
||||
public FrodoAndSamRule(ModifiersLogic modifiersLogic) {
|
||||
_modifiersLogic = modifiersLogic;
|
||||
}
|
||||
|
||||
public void applyRule() {
|
||||
_modifiersLogic.addAlwaysOnModifier(
|
||||
new KeywordModifier(null, Filters.or(Filters.name("Frodo"), Filters.name("Sam")), Keyword.RING_BOUND));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user