"Ranger of Ithilien"

This commit is contained in:
marcins78@gmail.com
2011-10-08 21:03:25 +00:00
parent 5b1bbe831e
commit 11e89ab5e3
6 changed files with 66 additions and 2 deletions

View File

@@ -77,4 +77,9 @@ public abstract class AbstractCompanion extends AbstractPermanent {
public int getResistance() {
return 6;
}
@Override
public int getCompanionStartingFellowshipModifier() {
return 0;
}
}

View File

@@ -120,6 +120,11 @@ public abstract class AbstractLotroCardBlueprint implements LotroCardBlueprint {
throw new UnsupportedOperationException("This method should not be called on this card");
}
@Override
public int getCompanionStartingFellowshipModifier() {
throw new UnsupportedOperationException("This method should not be called on this card");
}
@Override
public Block getSiteBlock() {
throw new UnsupportedOperationException("This method should not be called on this card");

View File

@@ -0,0 +1,51 @@
package com.gempukku.lotro.cards.set4.gondor;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.logic.modifiers.Modifier;
import java.util.Collections;
import java.util.List;
/**
* Set: The Two Towers
* Side: Free
* Culture: Gondor
* Twilight Cost: 3
* Type: Companion • Man
* Strength: 6
* Vitality: 3
* Resistance: 6
* Game Text: Ring-bound. Ranger. When this companion is in your starting fellowship, his twilight cost is -1.
* While skirmishing a roaming minion, this companion is strength +2.
*/
public class Card4_130 extends AbstractCompanion {
public Card4_130() {
super(3, 6, 3, Culture.GONDOR, Race.MAN, null, "Ranger of Ithilien");
addKeyword(Keyword.RING_BOUND);
addKeyword(Keyword.RANGER);
}
@Override
public int getCompanionStartingFellowshipModifier() {
return -1;
}
@Override
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
return Collections.singletonList(
new StrengthModifier(self,
Filters.and(
Filters.sameCard(self),
Filters.inSkirmishAgainst(
Filters.and(
Filters.type(CardType.MINION),
Filters.keyword(Keyword.ROAMING)))), 2));
}
}

View File

@@ -1,2 +1,3 @@
4_2,1_2
4_62,1_41
4_62,1_41
4_129,1_110

View File

@@ -32,6 +32,8 @@ public interface LotroCardBlueprint {
public int getTwilightCost();
public int getCompanionStartingFellowshipModifier();
public int getStrength();
public int getVitality();

View File

@@ -45,7 +45,7 @@ public class PlayerPlaysStartingFellowshipGameProcess implements GameProcess {
new Filter() {
@Override
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
int twilightCost = modifiersQuerying.getTwilightCost(gameState, physicalCard);
int twilightCost = modifiersQuerying.getTwilightCost(gameState, physicalCard) + physicalCard.getBlueprint().getCompanionStartingFellowshipModifier();
return gameState.getTwilightPool() + twilightCost <= 4
&& physicalCard.getBlueprint().checkPlayRequirements(playerId, _game, physicalCard, 0);
}