"Pallando"
This commit is contained in:
@@ -1,24 +1,58 @@
|
||||
package com.gempukku.lotro.cards;
|
||||
|
||||
import com.gempukku.lotro.cards.effects.TransferPermanentEffect;
|
||||
import com.gempukku.lotro.cards.modifiers.ResistanceModifier;
|
||||
import com.gempukku.lotro.cards.modifiers.VitalityModifier;
|
||||
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.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class AbstractFollower extends AbstractPermanent {
|
||||
public AbstractFollower(Side side, int twilightCost, Culture culture, String name) {
|
||||
this(side, twilightCost, culture, name, false);
|
||||
private int _strength;
|
||||
private int _vitality;
|
||||
private int _resistance;
|
||||
|
||||
public AbstractFollower(Side side, int twilightCost, int strength, int vitality, int resistance, Culture culture, String name) {
|
||||
this(side, twilightCost, strength, vitality, resistance, culture, name, false);
|
||||
}
|
||||
|
||||
public AbstractFollower(Side side, int twilightCost, Culture culture, String name, boolean unique) {
|
||||
public AbstractFollower(Side side, int twilightCost, int strength, int vitality, int resistance, Culture culture, String name, boolean unique) {
|
||||
super(side, twilightCost, CardType.FOLLOWER, culture, Zone.SUPPORT, name, unique);
|
||||
_strength = strength;
|
||||
_vitality = vitality;
|
||||
_resistance = resistance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) {
|
||||
List<Modifier> modifiers = new LinkedList<Modifier>();
|
||||
if (_strength != 0)
|
||||
modifiers.add(new StrengthModifier(self, Filters.hasAttached(self), _strength));
|
||||
if (_vitality != 0)
|
||||
modifiers.add(new VitalityModifier(self, Filters.hasAttached(self), _vitality));
|
||||
if (_resistance != 0)
|
||||
modifiers.add(new ResistanceModifier(self, Filters.hasAttached(self), _resistance));
|
||||
|
||||
List<? extends Modifier> extraModifiers = getNonBasicStatsModifiers(self);
|
||||
if (extraModifiers != null)
|
||||
modifiers.addAll(extraModifiers);
|
||||
|
||||
return modifiers;
|
||||
}
|
||||
|
||||
protected List<? extends Modifier> getNonBasicStatsModifiers(PhysicalCard self) {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected abstract boolean canPayAidCost(LotroGame game, PhysicalCard self);
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.gempukku.lotro.cards.set13.gandalf;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractFollower;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
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.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Bloodlines
|
||||
* Side: Free
|
||||
* Culture: Gandalf
|
||||
* Twilight Cost: 2
|
||||
* Type: Follower
|
||||
* Strength: +1
|
||||
* Game Text: Aid - (2). Each time you transfer this to a companion, except a [GANDALF] companion, exert bearer twice.
|
||||
* Each time bearer wins a skirmish, you may discard a condition from play.
|
||||
*/
|
||||
public class Card13_037 extends AbstractFollower {
|
||||
public Card13_037() {
|
||||
super(Side.FREE_PEOPLE, 2, 1, 0, 0, Culture.GANDALF, "Pallando", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canPayAidCost(LotroGame game, PhysicalCard self) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Effect getAidCost(LotroGame game, PhysicalCard self) {
|
||||
return new AddTwilightEffect(self, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.transferredCard(game, effectResult, self, null, Filters.and(CardType.COMPANION, Filters.not(Culture.GANDALF)))) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ExertCharactersEffect(self, self.getAttachedTo()));
|
||||
action.appendEffect(
|
||||
new ExertCharactersEffect(self, self.getAttachedTo()));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<OptionalTriggerAction> getExtraOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.winsSkirmish(game, effectResult, Filters.hasAttached(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.CONDITION));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user