3 Elven cards

This commit is contained in:
marcin.sciesinski
2019-07-20 08:40:17 -07:00
parent 11d5e1f4b1
commit a96225813a
3 changed files with 169 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
package com.gempukku.lotro.cards.set40.elven;
import com.gempukku.lotro.cards.AbstractAlly;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.SelfExertEffect;
import com.gempukku.lotro.common.*;
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.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.results.RevealCardFromTopOfDeckResult;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* Title: *Golradir, Homely House Advisor
* Set: Second Edition
* Side: Free
* Culture: Elven
* Twilight Cost: 2
* Type: Ally - Elf - Rivendell
* Strength: 4
* Vitality: 3
* Card Number: 1C48
* Game Text: To play, spot an Elf.
* Each time you reveal an [ELVEN] card from the top of your draw deck, you may exert Golradir to make an Orc strength -2 until the regroup phase.
*/
public class Card40_048 extends AbstractAlly {
public Card40_048() {
super(2, Block.SECOND_ED, 0, 4, 3, Race.ELF, Culture.ELVEN, "Golradir", "Homely House Advisor", true);
addKeyword(Keyword.RIVENDELL);
}
@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, Race.ELF);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (TriggerConditions.revealedCardsFromTopOfDeck(effectResult, playerId)
&& PlayConditions.canSelfExert(self, game)) {
RevealCardFromTopOfDeckResult revealedResult = (RevealCardFromTopOfDeckResult) effectResult;
Collection<PhysicalCard> revealedCards = revealedResult.getRevealedCards();
int countOfElven = getElvenCount(revealedCards);
if (countOfElven > 0) {
List<OptionalTriggerAction> actions = new ArrayList<OptionalTriggerAction>(countOfElven);
for (int i = 0; i < countOfElven; i++) {
final OptionalTriggerAction action = new OptionalTriggerAction("golradir-" + i, self);
action.appendCost(
new SelfExertEffect(action, self));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose an Orc", Race.ORC) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new StrengthModifier(self, card, -2), Phase.REGROUP));
}
});
actions.add(action);
}
return actions;
}
}
return null;
}
private int getElvenCount(Collection<PhysicalCard> revealedCards) {
int countOfElven = 0;
for (PhysicalCard revealedCard : revealedCards) {
if (revealedCard.getBlueprint().getCulture() == Culture.ELVEN)
countOfElven++;
}
return countOfElven;
}
}

View File

@@ -0,0 +1,44 @@
package com.gempukku.lotro.cards.set40.elven;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
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.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import java.util.Arrays;
import java.util.List;
/**
* Title: *Gwemegil, Elf-forged Blade
* Set: Second Edition
* Side: Free
* Culture: Elven
* Twilight Cost: 2
* Type: Possession - Hand Weapon
* Strength: +2
* Card Number: 1R49
* Game Text: Bearer must be an Elf.
* If bearer is Arwen, she is damage +1.
* While skirmishing a Nazgul, bearer is strength +2.
*/
public class Card40_049 extends AbstractAttachableFPPossession{
public Card40_049() {
super(2, 2, 0, Culture.ELVEN, PossessionClass.HAND_WEAPON, "Gwemegil", "Elf-forged Blade", true);
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Race.ELF;
}
@Override
protected List<? extends Modifier> getNonBasicStatsModifiers(PhysicalCard self) {
KeywordModifier modifier1 = new KeywordModifier(self, Filters.and(Filters.name("Arwen"), Filters.hasAttached(self)), Keyword.DAMAGE, 1);
StrengthModifier modifier2 = new StrengthModifier(self, Filters.and(Filters.hasAttached(self), Filters.inSkirmishAgainst(Race.NAZGUL)), 2);
return Arrays.asList(modifier1, modifier2);
}
}

View File

@@ -0,0 +1,41 @@
package com.gempukku.lotro.cards.set40.elven;
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.ChooseAndAddUntilEOPStrengthBonusEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
/**
* Title: Legacy of Elbereth
* Set: Second Edition
* Side: Free
* Culture: Elven
* Twilight Cost: 1
* Type: Event - Skirmish
* Card Number: 1C50
* Game Text: Spot 3 Elves to make a minion skirmishing an Elf strength -3.
*/
public class Card40_050 extends AbstractEvent{
public Card40_050() {
super(Side.FREE_PEOPLE, 1, Culture.ELVEN, "Legacy of Elbereth", Phase.SKIRMISH);
}
@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, 3, Race.ELF);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(
action,self, playerId, -3, CardType.MINION, Filters.inSkirmishAgainst(Race.ELF)));
return action;
}
}