Finished Moria culture for The Short Rest

This commit is contained in:
PhallenCassidy
2016-10-20 12:08:40 -04:00
committed by GitHub
parent c166727029
commit 696d394fb1
6 changed files with 388 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
package com.gempukku.lotro.cards.set22.moria;
import com.gempukku.lotro.cards.AbstractAttachable;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
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.DrawCardsEffect;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Fellowship of the Ring
* Side: Shadow
* Culture: Moria
* Twilight Cost: 0
* Type: Possession • Hand Weapon
* Strength: +2
* Game Text: To play, spot a [MORIA] card. Bearer must be an Orc. When you play this possession,
* you may draw a card.
*/
public class Card22_31 extends AbstractAttachable {
public Card22_31() {
super(Side.SHADOW, CardType.POSSESSION, 0, Culture.MORIA, PossessionClass.HAND_WEAPON, "Goblin Scimitar");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
&& PlayConditions.canSpot(game, 1, Culture.MORIA);
}
@Override
public Modifier getAlwaysOnModifier(LotroGame game, PhysicalCard self) {
return new StrengthModifier(self, Filters.hasAttached(self), 2);
}
@Override
protected Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Race.ORC;
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(new DrawCardsEffect(action, playerId, 1));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -0,0 +1,55 @@
package com.gempukku.lotro.cards.set22.moria;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.PutCardFromDiscardOnBottomOfDeckEffect;
import com.gempukku.lotro.common.Culture;
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.effects.ChooseArbitraryCardsEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* Set: The Short Rest
* Side: Shadow
* Culture: Moria
* Twilight Cost: 1
* Type: Minion • Orc
* Strength: 5
* Vitality: 1
* Site: 4
* Game Text: When you play this minion, you may place an Orc (or two Orcs at an underground site)
* from your discard pile beneath your draw deck.
*/
public class Card22_32 extends AbstractMinion {
public Card22_32() {
super(1, 5, 1, 4, Race.ORC, Culture.MORIA, "Goblin Sneak");
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)) {
final OptionalTriggerAction action = new OptionalTriggerAction(self);
int checkUnderground = game.getModifiersQuerying().hasKeyword(game.getGameState(), game.getGameState().getCurrentSite(), Keyword.UNDERGROUND) ? 2 : 1;
action.appendEffect(
new ChooseArbitraryCardsEffect(playerId, "Choose Orc (or two if at an underground site)", game.getGameState().getDiscard(playerId), Race.ORC, checkUnderground, checkUnderground) {
@Override
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> selectedCards) {
for (PhysicalCard selectedCard : selectedCards) {
action.appendEffect(
new PutCardFromDiscardOnBottomOfDeckEffect(selectedCard));
}
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -0,0 +1,55 @@
package com.gempukku.lotro.cards.set22.moria;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
/**
* Set: The Short Rest
* Side: Shadow
* Culture: Moria
* Twilight Cost: 1
* Type: Event
* Game Text: You may exert The Great Goblin twice to play this event from your discard pile. Exert 2 Orcs
* to discard a possession or artifact borne by a [DWARVEN] companion.
*/
public class Card22_34 extends AbstractEvent {
public Card22_34() {
super(Side.SHADOW, 1, Culture.MORIA, "Goblin Song", Phase.MANEUVER);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
&& PlayConditions.canExert(game, 1, 2, Race.ORC);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 2, 2, Race.ORC));
action.appendEffect(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Filters.or(CardType.POSSESSION, CardType.ARTIFACT), Filters.attachedTo(Filters.and(CardType.COMPANION, Race.DWARF))));
return action;
}
@Override
public List<? extends Action> getPhaseActionsFromDiscard(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.isPhase(game, Phase.SKIRMISH)
&& PlayConditions.canExert(self, game, 2, Filters.name("The Great Goblin"))
&& PlayConditions.canPlayFromDiscard(playerId, game, self)) {
final PlayEventAction playCardAction = getPlayCardAction(playerId, game, self, 0, false);
playCardAction.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Filters.name("The Great Goblin")));
return Collections.singletonList(playCardAction);
}
return null;
}
}

View File

@@ -0,0 +1,78 @@
package com.gempukku.lotro.cards.set22.moria;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.StackCardFromPlayEffect;
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.ActivateCardAction;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.ChooseArbitraryCardsEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* Set: The Short Rest
* Side: Shadow
* Culture: Moria
* Twilight Cost: 1
* Type: Condition
* Game Text: To play, spot a [MORIA] card. Response: If your Orc wins a skirmish, discard cards and wounds on
* that Orc and stack that Orc on this condition. Shadow: Play an Orc stacked here as if played from hand.
*/
public class Card1_183 extends AbstractPermanent {
public Card1_183() {
super(Side.SHADOW, 1, CardType.CONDITION, Culture.MORIA, Zone.SUPPORT, "Goblin Swarms");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
&& PlayConditions.canSpot(game, 1, Culture.MORIA);
}
@Override
public List<? extends Action> getExtraPhaseActions(final String playerId, final LotroGame game, PhysicalCard self) {
List<PhysicalCard> stackedCards = game.getGameState().getStackedCards(self);
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 0)
&& Filters.filter(stackedCards, game.getGameState(), game.getModifiersQuerying(), Filters.playable(game)).size() > 0) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendEffect(
new ChooseArbitraryCardsEffect(playerId, "Choose an Orc to play", stackedCards, Filters.playable(game), 1, 1) {
@Override
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> stackedOrcs) {
if (stackedOrcs.size() > 0) {
PhysicalCard stackedOrc = stackedOrcs.iterator().next();
game.getActionsEnvironment().addActionToStack(stackedOrc.getBlueprint().getPlayCardAction(playerId, game, stackedOrc, 0, false));
}
}
});
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, Race.ORC))
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Race.ORC, Filters.inSkirmish)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose an Orc", Race.ORC, Filters.inSkirmish) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard skirmishOrc) {
action.appendEffect(new StackCardFromPlayEffect(skirmishOrc, self));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -0,0 +1,73 @@
package com.gempukku.lotro.cards.set22.moria;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.PreventCardEffect;
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
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.ActivateCardAction;
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* Set: The Short Rest
* Side: Shadow
* Culture: Moria
* Twilight Cost: 0
* Type: Condition
* Game Text: To play, spot a [MORIA] card. Each time you play a weapon, add (1). Response: If an Orc is
* about to take a wound, discard this condition to prevent that wound.
*/
public class Card22_35 extends AbstractPermanent {
public Card22_35() {
super(Side.SHADOW, 0, CardType.CONDITION, Culture.MORIA, Zone.SUPPORT, "Great Goblin's Power");
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
&& PlayConditions.canSpot(game, 1, Culture.MORIA);
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, Filters.and(Filters.owner(self.getOwner()), Filters.weapon))) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(new AddTwilightEffect(self, 1));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, final Effect effect, final PhysicalCard self) {
if (TriggerConditions.isGettingWounded(effect, game, Race.ORC)) {
final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect;
final Collection<PhysicalCard> cardsToBeWounded = woundEffect.getAffectedCardsMinusPrevented(game);
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfDiscardEffect(self));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose an Orc", Race.ORC, Filters.in(cardsToBeWounded)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard woundedOrc) {
action.appendEffect(
new PreventCardEffect(woundEffect, woundedOrc));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -0,0 +1,67 @@
package com.gempukku.lotro.cards.set22.moria;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.RevealAndChooseCardsFromOpponentHandEffect;
import com.gempukku.lotro.cards.effects.SelfExertEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseOpponentEffect;
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.ActivateCardAction;
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.effects.DiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Short Rest
* Side: Shadow
* Culture: Moria
* Twilight Cost: 4
* Type: Minion • Orc
* Strength: 10
* Vitality: 3
* Site: 4
* Game Text: Fierce. Maneuver: Exert The Great Goblin twice to reveal the Free Peoples player's hand. Choose and
* discard a revealed [DWARVEN] event.
*/
public class Card22_36 extends AbstractMinion {
public Card22_36() {
super(4, 10, 3, 4, Race.ORC, Culture.MORIA, "The Great Goblin", "Chieftain of the Misty Mountains", true);
addKeyword(Keyword.FIERCE);
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.MANEUVER, self, 0)
&& PlayConditions.canExert(self, 2, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfExertEffect(action, self));
action.appendCost(
new SelfExertEffect(action, self));
action.appendEffect(
new ChooseOpponentEffect(playerId) {
@Override
protected void opponentChosen(final String opponentId) {
action.appendEffect(
new RevealAndChooseCardsFromOpponentHandEffect(action, playerId, opponentId, self, "Choose a DWARVEN event", Filters.and(Culture.DWARVEN, CardType.EVENT), 0, 1) {
@Override
protected void cardsSelected(List<PhysicalCard> selectedCards) {
if (selectedCards.size() > 0) {
action.appendEffect(new DiscardCardsFromHandEffect(self, opponentId, selectedCards, true));
}
}
});
}
});
return Collections.singletonList(action);
}
return null;
}
}