"Friends of Old"
This commit is contained in:
@@ -6,16 +6,22 @@ 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.actions.CostToEffectAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardsEffect;
|
||||
import com.gempukku.lotro.logic.effects.HealCharacterEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
|
||||
public class ChooseAndHealCharacterEffect extends ChooseActiveCardEffect {
|
||||
import java.util.Collection;
|
||||
|
||||
public class ChooseAndHealCharactersEffect extends ChooseActiveCardsEffect {
|
||||
private CostToEffectAction _action;
|
||||
private String _playerId;
|
||||
|
||||
public ChooseAndHealCharacterEffect(CostToEffectAction action, String playerId, Filter... filters) {
|
||||
super(playerId, "Choose character to heal", Filters.and(
|
||||
public ChooseAndHealCharactersEffect(CostToEffectAction action, String playerId, Filter... filters) {
|
||||
this(action, playerId, 1, 1, filters);
|
||||
}
|
||||
|
||||
public ChooseAndHealCharactersEffect(CostToEffectAction action, String playerId, int minimum, int maximum, Filter... filters) {
|
||||
super(playerId, "Choose character(s) to heal", minimum, maximum, Filters.and(
|
||||
filters, new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||
@@ -28,13 +34,13 @@ public class ChooseAndHealCharacterEffect extends ChooseActiveCardEffect {
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Choose character to heal";
|
||||
return "Choose character(s) to heal";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void cardSelected(PhysicalCard character) {
|
||||
protected void cardsSelected(Collection<PhysicalCard> cards) {
|
||||
if (_action.getActionSource() != null)
|
||||
_action.appendEffect(new CardAffectsCardEffect(_action.getActionSource(), character));
|
||||
_action.appendEffect(new HealCharacterEffect(_playerId, character));
|
||||
_action.appendEffect(new CardAffectsCardEffect(_action.getActionSource(), cards));
|
||||
_action.appendEffect(new HealCharacterEffect(_playerId, Filters.in(cards)));
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.elven;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractAlly;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
@@ -35,7 +35,7 @@ public class Card1_034 extends AbstractAlly {
|
||||
&& PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self, Keyword.FELLOWSHIP);
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.culture(Culture.ELVEN), Filters.type(CardType.ALLY)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.culture(Culture.ELVEN), Filters.type(CardType.ALLY)));
|
||||
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.costs.ChoiceCost;
|
||||
import com.gempukku.lotro.cards.costs.ChooseAndExertCharactersCost;
|
||||
import com.gempukku.lotro.cards.effects.AddTwilightEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
@@ -56,7 +56,7 @@ public class Card1_059 extends AbstractPermanent {
|
||||
super.cardsSelected(dwarf, success);
|
||||
if (success) {
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.race(Race.ELF)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.race(Race.ELF)));
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -73,7 +73,7 @@ public class Card1_059 extends AbstractPermanent {
|
||||
super.cardsSelected(elf, success);
|
||||
if (success) {
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.race(Race.DWARF)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.race(Race.DWARF)));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.costs.DiscardCardsFromPlayCost;
|
||||
import com.gempukku.lotro.cards.effects.CardAffectsCardEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filter;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
@@ -49,7 +49,7 @@ public class Card1_094 extends AbstractAttachableFPPossession {
|
||||
|
||||
List<ChooseableEffect> possibleEffects = new LinkedList<ChooseableEffect>();
|
||||
possibleEffects.add(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.type(CardType.COMPANION)) {
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.type(CardType.COMPANION)) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Heal a companion";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.gempukku.lotro.cards.set1.gondor;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractCompanion;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
@@ -35,7 +35,7 @@ public class Card1_365 extends AbstractCompanion {
|
||||
if (effectResult.getType() == EffectResult.Type.START_OF_TURN) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.type(CardType.COMPANION), Filters.signet(Signet.ARAGORN), Filters.not(Filters.sameCard(self))));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.type(CardType.COMPANION), Filters.signet(Signet.ARAGORN), Filters.not(Filters.sameCard(self))));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.isengard;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
@@ -37,7 +37,7 @@ public class Card1_144 extends AbstractPermanent {
|
||||
final ActivateCardAction action = new ActivateCardAction(self, Keyword.RESPONSE);
|
||||
action.appendCost(new RemoveTwilightEffect(1));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.race(Race.URUK_HAI), Filters.in(skirmishResult.getWinners())));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.race(Race.URUK_HAI), Filters.in(skirmishResult.getWinners())));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.isengard;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractMinion;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
@@ -40,7 +40,7 @@ public class Card1_152 extends AbstractMinion {
|
||||
final ActivateCardAction action = new ActivateCardAction(self, Keyword.MANEUVER);
|
||||
action.appendCost(new RemoveTwilightEffect(2));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.race(Race.URUK_HAI)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.race(Race.URUK_HAI)));
|
||||
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.gempukku.lotro.cards.set1.shire;
|
||||
import com.gempukku.lotro.cards.AbstractAlly;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.costs.ExertCharactersCost;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
@@ -41,7 +41,7 @@ public class Card1_288 extends AbstractAlly {
|
||||
action.appendCost(
|
||||
new ExertCharactersCost(self, self));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.or(Filters.name("Merry"), Filters.name("Pippin"))));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.or(Filters.name("Merry"), Filters.name("Pippin"))));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.gempukku.lotro.cards.set1.shire;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractCompanion;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
@@ -40,7 +40,7 @@ public class Card1_289 extends AbstractCompanion {
|
||||
if (effectResult.getType() == EffectResult.Type.START_OF_TURN) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.type(CardType.ALLY), Filters.race(Race.HOBBIT)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.type(CardType.ALLY), Filters.race(Race.HOBBIT)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.gempukku.lotro.cards.set1.shire;
|
||||
import com.gempukku.lotro.cards.AbstractAlly;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.costs.ExertCharactersCost;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
@@ -41,7 +41,7 @@ public class Card1_291 extends AbstractAlly {
|
||||
action.appendCost(
|
||||
new ExertCharactersCost(self, self));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.or(Filters.name("Frodo"), Filters.name("Sam"))));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.or(Filters.name("Frodo"), Filters.name("Sam"))));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.gempukku.lotro.cards.set1.shire;
|
||||
import com.gempukku.lotro.cards.AbstractAlly;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.costs.ExertCharactersCost;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
@@ -42,7 +42,7 @@ public class Card1_297 extends AbstractAlly {
|
||||
action.appendCost(
|
||||
new ExertCharactersCost(self, self));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.type(CardType.ALLY), Filters.race(Race.HOBBIT), Filters.not(Filters.sameCard(self)), Filters.siteNumber(1)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.type(CardType.ALLY), Filters.race(Race.HOBBIT), Filters.not(Filters.sameCard(self)), Filters.siteNumber(1)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.gempukku.lotro.cards.set1.shire;
|
||||
import com.gempukku.lotro.cards.AbstractCompanion;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.cards.effects.RemoveBurdenEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
@@ -45,7 +45,7 @@ public class Card1_307 extends AbstractCompanion {
|
||||
List<ChooseableEffect> possibleEffects = new LinkedList<ChooseableEffect>();
|
||||
possibleEffects.add(new RemoveBurdenEffect(self.getOwner()));
|
||||
possibleEffects.add(
|
||||
new ChooseAndHealCharacterEffect(action, self.getOwner(), Filters.type(CardType.COMPANION)));
|
||||
new ChooseAndHealCharactersEffect(action, self.getOwner(), Filters.type(CardType.COMPANION)));
|
||||
action.appendEffect(new ChoiceEffect(action, self.getOwner(), possibleEffects));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.shire;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
@@ -28,7 +28,7 @@ public class Card1_315 extends AbstractEvent {
|
||||
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.race(Race.HOBBIT)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.race(Race.HOBBIT)));
|
||||
return action;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.costs.ChoiceCost;
|
||||
import com.gempukku.lotro.cards.costs.ChooseAndDiscardCardsFromPlayCost;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndDiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
@@ -51,7 +51,7 @@ public class Card1_343 extends AbstractSite {
|
||||
action.appendCost(
|
||||
new ChoiceCost(action, playerId, possibleCosts));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.owner(playerId), Filters.type(CardType.COMPANION)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.owner(playerId), Filters.type(CardType.COMPANION)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.gempukku.lotro.cards.set1.site;
|
||||
import com.gempukku.lotro.cards.AbstractSite;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndDiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
@@ -38,7 +38,7 @@ public class Card1_358 extends AbstractSite {
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromHandEffect(action, playerId, 1, 1, Filters.culture(Culture.GONDOR)));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.type(CardType.COMPANION), Filters.culture(Culture.GONDOR)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.type(CardType.COMPANION), Filters.culture(Culture.GONDOR)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set1.wraith;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
@@ -34,7 +34,7 @@ public class Card1_220 extends AbstractPermanent {
|
||||
final ActivateCardAction action = new ActivateCardAction(self, (game.getGameState().getCurrentPhase() == Phase.MANEUVER) ? Keyword.MANEUVER : Keyword.SKIRMISH);
|
||||
action.appendCost(new RemoveTwilightEffect(3));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.race(Race.NAZGUL)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.race(Race.NAZGUL)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set2.moria;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractMinion;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
@@ -36,7 +36,7 @@ public class Card2_063 extends AbstractMinion {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.culture(Culture.MORIA), Filters.type(CardType.MINION)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.culture(Culture.MORIA), Filters.type(CardType.MINION)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.gempukku.lotro.cards.set3.dwarven;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
@@ -31,7 +31,7 @@ public class Card3_003 extends AbstractPermanent {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.culture(Culture.DWARVEN), Filters.keyword(Keyword.TALE)))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.race(Race.DWARF), Filters.type(CardType.COMPANION)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.race(Race.DWARF), Filters.type(CardType.COMPANION)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.gempukku.lotro.cards.set3.dwarven;
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.costs.ChooseAndExertCharactersCost;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
@@ -35,7 +35,7 @@ public class Card3_004 extends AbstractPermanent {
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.race(Race.DWARF), Filters.type(CardType.ALLY)));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.race(Race.DWARF), Filters.type(CardType.COMPANION)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.race(Race.DWARF), Filters.type(CardType.COMPANION)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.gempukku.lotro.cards.set3.elven;
|
||||
import com.gempukku.lotro.cards.AbstractAlly;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.costs.ExertCharactersCost;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharacterEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
@@ -64,7 +64,7 @@ public class Card3_013 extends AbstractAlly {
|
||||
action.appendCost(
|
||||
new ExertCharactersCost(self, self));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharacterEffect(action, playerId, Filters.type(CardType.COMPANION)));
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.type(CardType.COMPANION)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.gempukku.lotro.cards.set3.elven;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChooseOpponentEffect;
|
||||
import com.gempukku.lotro.cards.effects.RevealRandomCardsFromHandEffect;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
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 java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Realms of Elf-lords
|
||||
* Side: Free
|
||||
* Culture: Elven
|
||||
* Twilight Cost: 1
|
||||
* Type: Event
|
||||
* Game Text: Fellowship: Reveal a card at random from an opponent's hand. Heal X [ELVEN] allies, where X is
|
||||
* the twilight cost of the card revealed.
|
||||
*/
|
||||
public class Card3_016 extends AbstractEvent {
|
||||
public Card3_016() {
|
||||
super(Side.FREE_PEOPLE, Culture.ELVEN, "Friends of Old", Phase.FELLOWSHIP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTwilightCost() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseOpponentEffect(playerId) {
|
||||
@Override
|
||||
protected void opponentChosen(String opponentId) {
|
||||
action.insertEffect(
|
||||
new RevealRandomCardsFromHandEffect(opponentId, 1) {
|
||||
@Override
|
||||
protected void cardsRevealed(List<PhysicalCard> revealedCards) {
|
||||
if (revealedCards.size() > 0) {
|
||||
PhysicalCard revealedCard = revealedCards.get(0);
|
||||
int twilightCost = revealedCard.getBlueprint().getTwilightCost();
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, twilightCost, twilightCost, Filters.culture(Culture.ELVEN), Filters.type(CardType.ALLY)));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user