"The Nine Walkers" and adding companion race parameter
This commit is contained in:
@@ -17,18 +17,26 @@ public abstract class AbstractCompanion extends AbstractLotroCardBlueprint {
|
||||
private int _twilightCost;
|
||||
private int _strength;
|
||||
private int _vitality;
|
||||
private Keyword _race;
|
||||
private Signet _signet;
|
||||
|
||||
public AbstractCompanion(int twilightCost, int strength, int vitality, Culture culture, Signet signet, String name) {
|
||||
this(twilightCost, strength, vitality, culture, signet, name, false);
|
||||
public AbstractCompanion(int twilightCost, int strength, int vitality, Culture culture, Keyword race, Signet signet, String name) {
|
||||
this(twilightCost, strength, vitality, culture, race, signet, name, false);
|
||||
}
|
||||
|
||||
public AbstractCompanion(int twilightCost, int strength, int vitality, Culture culture, Signet signet, String name, boolean unique) {
|
||||
public AbstractCompanion(int twilightCost, int strength, int vitality, Culture culture, Keyword race, Signet signet, String name, boolean unique) {
|
||||
super(Side.FREE_PEOPLE, CardType.COMPANION, culture, name, unique);
|
||||
_twilightCost = twilightCost;
|
||||
_strength = strength;
|
||||
_vitality = vitality;
|
||||
_race = race;
|
||||
_signet = signet;
|
||||
if (race != null)
|
||||
addKeyword(race);
|
||||
}
|
||||
|
||||
public Keyword getRace() {
|
||||
return _race;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,8 +20,7 @@ import com.gempukku.lotro.game.state.LotroGame;
|
||||
*/
|
||||
public class Card1_007 extends AbstractCompanion {
|
||||
public Card1_007() {
|
||||
super(1, 4, 2, Culture.DWARVEN, null, "Dwarf Guard", false);
|
||||
addKeyword(Keyword.DWARF);
|
||||
super(1, 4, 2, Culture.DWARVEN, Keyword.DWARF, null, "Dwarf Guard", false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,8 +26,7 @@ import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
*/
|
||||
public class Card1_011 extends AbstractCompanion {
|
||||
public Card1_011() {
|
||||
super(2, 5, 3, Culture.DWARVEN, null, "Farin", true);
|
||||
addKeyword(Keyword.DWARF);
|
||||
super(2, 5, 3, Culture.DWARVEN, Keyword.DWARF, null, "Farin", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,8 +30,7 @@ import java.util.List;
|
||||
*/
|
||||
public class Card1_012 extends AbstractCompanion {
|
||||
public Card1_012() {
|
||||
super(2, 6, 3, Culture.DWARVEN, Signet.ARAGORN, "Gimli", true);
|
||||
addKeyword(Keyword.DWARF);
|
||||
super(2, 6, 3, Culture.DWARVEN, Keyword.DWARF, Signet.ARAGORN, "Gimli", true);
|
||||
addKeyword(Keyword.DAMAGE, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,7 @@ import java.util.List;
|
||||
*/
|
||||
public class Card1_013 extends AbstractCompanion {
|
||||
public Card1_013() {
|
||||
super(2, 6, 3, Culture.DWARVEN, Signet.GANDALF, "Gimli", true);
|
||||
addKeyword(Keyword.DWARF);
|
||||
super(2, 6, 3, Culture.DWARVEN, Keyword.DWARF, Signet.GANDALF, "Gimli", true);
|
||||
addKeyword(Keyword.DAMAGE, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,9 +27,8 @@ import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
*/
|
||||
public class Card1_030 extends AbstractCompanion {
|
||||
public Card1_030() {
|
||||
super(2, 6, 3, Culture.ELVEN, Signet.ARAGORN, "Arwen", true);
|
||||
super(2, 6, 3, Culture.ELVEN, Keyword.ELF, Signet.ARAGORN, "Arwen", true);
|
||||
addKeyword(Keyword.RANGER);
|
||||
addKeyword(Keyword.ELF);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,8 +25,7 @@ import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
*/
|
||||
public class Card1_048 extends AbstractCompanion {
|
||||
public Card1_048() {
|
||||
super(2, 5, 3, Culture.ELVEN, null, "Haldir", true);
|
||||
addKeyword(Keyword.ELF);
|
||||
super(2, 5, 3, Culture.ELVEN, Keyword.ELF, null, "Haldir", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,8 +31,7 @@ import java.util.List;
|
||||
*/
|
||||
public class Card1_050 extends AbstractCompanion {
|
||||
public Card1_050() {
|
||||
super(2, 6, 3, Culture.ELVEN, Signet.FRODO, "Legolas", true);
|
||||
addKeyword(Keyword.ELF);
|
||||
super(2, 6, 3, Culture.ELVEN, Keyword.ELF, Signet.FRODO, "Legolas", true);
|
||||
addKeyword(Keyword.ARCHER);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,8 +27,7 @@ import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
*/
|
||||
public class Card1_051 extends AbstractCompanion {
|
||||
public Card1_051() {
|
||||
super(2, 6, 3, Culture.ELVEN, Signet.GANDALF, "Legolas", true);
|
||||
addKeyword(Keyword.ELF);
|
||||
super(2, 6, 3, Culture.ELVEN, Keyword.ELF, Signet.GANDALF, "Legolas", true);
|
||||
addKeyword(Keyword.ARCHER);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,7 @@ import com.gempukku.lotro.game.state.LotroGame;
|
||||
*/
|
||||
public class Card1_053 extends AbstractCompanion {
|
||||
public Card1_053() {
|
||||
super(1, 4, 2, Culture.ELVEN, null, "Lorien Elf");
|
||||
addKeyword(Keyword.ELF);
|
||||
super(1, 4, 2, Culture.ELVEN, Keyword.ELF, null, "Lorien Elf");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,8 +28,7 @@ import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
*/
|
||||
public class Card1_072 extends AbstractCompanion {
|
||||
public Card1_072() {
|
||||
super(4, 6, 4, Culture.GANDALF, Signet.FRODO, "Gandalf", true);
|
||||
addKeyword(Keyword.WIZARD);
|
||||
super(4, 6, 4, Culture.GANDALF, Keyword.WIZARD, Signet.FRODO, "Gandalf", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.gempukku.lotro.cards.set1.gandalf;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractCompanion;
|
||||
import com.gempukku.lotro.cards.AbstractLotroCardBlueprint;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
|
||||
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.GameState;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
import com.gempukku.lotro.logic.modifiers.TwilightCostModifier;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 1
|
||||
* Type: Condition
|
||||
* Game Text: To play, spot Gandalf. Plays to your support area. Each time you play a companion whose race you cannot
|
||||
* spot, that companion's twilight cost is -2.
|
||||
*/
|
||||
public class Card1_079 extends AbstractLotroCardBlueprint {
|
||||
public Card1_079() {
|
||||
super(Side.FREE_PEOPLE, CardType.CONDITION, Culture.GANDALF, "The Nine Walkers");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name("Gandalf"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTwilightCost() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Action getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return new PlayPermanentAction(self, Zone.FREE_SUPPORT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
&& checkPlayRequirements(playerId, game, self))
|
||||
return Collections.singletonList(getPlayCardAction(playerId, game, self, 0));
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Modifier getAlwaysOnEffect(PhysicalCard self) {
|
||||
return new TwilightCostModifier(self,
|
||||
Filters.and(
|
||||
Filters.type(CardType.COMPANION),
|
||||
new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||
AbstractCompanion companion = (AbstractCompanion) physicalCard.getBlueprint();
|
||||
if (companion.getRace() != null) {
|
||||
return !Filters.canSpot(gameState, modifiersQuerying, Filters.keyword(companion.getRace()));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
), -2);
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.PutCardFromDiscardOnBottomOfDeckEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
@@ -39,7 +40,7 @@ public class Card1_122 extends AbstractResponseEvent {
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.keyword(Keyword.URUK_HAI), Filters.owner(playerId)))
|
||||
&& PlayConditions.canPlayShadowCardDuringPhase(game, null, self)) {
|
||||
&& PlayConditions.canPlayShadowCardDuringPhase(game, (Phase) null, self)) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
String playedCardName = ((PlayCardResult) effectResult).getPlayedCard().getBlueprint().getName();
|
||||
List<PhysicalCard> cardsInDiscardWithSameName = Filters.filter(game.getGameState().getDiscard(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.name(playedCardName));
|
||||
|
||||
@@ -31,8 +31,7 @@ import java.util.List;
|
||||
*/
|
||||
public class Card1_289 extends AbstractCompanion {
|
||||
public Card1_289() {
|
||||
super(0, 3, 4, Culture.SHIRE, Signet.GANDALF, "Frodo", true);
|
||||
addKeyword(Keyword.HOBBIT);
|
||||
super(0, 3, 4, Culture.SHIRE, Keyword.HOBBIT, Signet.GANDALF, "Frodo", true);
|
||||
addKeyword(Keyword.RING_BEARER);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ import java.util.List;
|
||||
*/
|
||||
public class Card1_290 extends AbstractCompanion {
|
||||
public Card1_290() {
|
||||
super(0, 3, 4, Culture.SHIRE, Signet.FRODO, "Frodo", true);
|
||||
addKeyword(Keyword.HOBBIT);
|
||||
super(0, 3, 4, Culture.SHIRE, Keyword.HOBBIT, Signet.FRODO, "Frodo", true);
|
||||
addKeyword(Keyword.RING_BEARER);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,7 @@ import java.util.List;
|
||||
*/
|
||||
public class Card1_302 extends AbstractCompanion {
|
||||
public Card1_302() {
|
||||
super(1, 3, 4, Culture.SHIRE, Signet.FRODO, "Merry", true);
|
||||
addKeyword(Keyword.HOBBIT);
|
||||
super(1, 3, 4, Culture.SHIRE, Keyword.HOBBIT, Signet.FRODO, "Merry", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,8 +23,7 @@ import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
*/
|
||||
public class Card1_303 extends AbstractCompanion {
|
||||
public Card1_303() {
|
||||
super(1, 3, 4, Culture.SHIRE, Signet.ARAGORN, "Merry", true);
|
||||
addKeyword(Keyword.HOBBIT);
|
||||
super(1, 3, 4, Culture.SHIRE, Keyword.HOBBIT, Signet.ARAGORN, "Merry", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,8 +23,7 @@ import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
*/
|
||||
public class Card1_306 extends AbstractCompanion {
|
||||
public Card1_306() {
|
||||
super(1, 3, 4, Culture.SHIRE, Signet.FRODO, "Pippin", true);
|
||||
addKeyword(Keyword.HOBBIT);
|
||||
super(1, 3, 4, Culture.SHIRE, Keyword.HOBBIT, Signet.FRODO, "Pippin", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,8 +36,7 @@ import java.util.List;
|
||||
*/
|
||||
public class Card1_307 extends AbstractCompanion {
|
||||
public Card1_307() {
|
||||
super(1, 3, 4, Culture.SHIRE, Signet.GANDALF, "Pippin", true);
|
||||
addKeyword(Keyword.HOBBIT);
|
||||
super(1, 3, 4, Culture.SHIRE, Keyword.HOBBIT, Signet.GANDALF, "Pippin", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -35,8 +35,7 @@ import java.util.List;
|
||||
*/
|
||||
public class Card1_310 extends AbstractCompanion {
|
||||
public Card1_310() {
|
||||
super(2, 3, 4, Culture.SHIRE, Signet.FRODO, "Sam", true);
|
||||
addKeyword(Keyword.HOBBIT);
|
||||
super(2, 3, 4, Culture.SHIRE, Keyword.HOBBIT, Signet.FRODO, "Sam", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,8 +34,7 @@ import java.util.List;
|
||||
*/
|
||||
public class Card1_311 extends AbstractCompanion {
|
||||
public Card1_311() {
|
||||
super(2, 3, 4, Culture.SHIRE, Signet.ARAGORN, "Sam", true);
|
||||
addKeyword(Keyword.HOBBIT);
|
||||
super(2, 3, 4, Culture.SHIRE, Keyword.HOBBIT, Signet.ARAGORN, "Sam", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user