Migrated Elven cards in set 5 to hjson

This commit is contained in:
MarcinSc
2024-04-21 23:28:51 +07:00
parent b75e975092
commit 5342feff9b
8 changed files with 108 additions and 346 deletions

View File

@@ -1,45 +0,0 @@
package com.gempukku.lotro.cards.set5.elven;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
import com.gempukku.lotro.logic.modifiers.CantTakeMoreThanXWoundsModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Battle of Helm's Deep
* Side: Free
* Culture: Elven
* Twilight Cost: 2
* Type: Companion • Elf
* Strength: 5
* Vitality: 3
* Resistance: 6
* Game Text: To play, spot an Elf. While skirmishing a wounded minion, Balglin takes no more than 1 wound during
* each skirmish phase.
*/
public class Card5_010 extends AbstractCompanion {
public Card5_010() {
super(2, 5, 3, 6, Culture.ELVEN, Race.ELF, null, "Balglin", "Elven Warrior", true);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Race.ELF);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new CantTakeMoreThanXWoundsModifier(self, Phase.SKIRMISH, 1, self, Filters.inSkirmishAgainst(CardType.MINION, Filters.wounded)));
}
}

View File

@@ -1,41 +0,0 @@
package com.gempukku.lotro.cards.set5.elven;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.modifiers.ArcheryTotalModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Battle of Helm's Deep
* Side: Free
* Culture: Elven
* Twilight Cost: 2
* Type: Event
* Game Text: Archery: Exert 3 Elf companions to make the fellowship archery total +2.
*/
public class Card5_011 extends AbstractEvent {
public Card5_011() {
super(Side.FREE_PEOPLE, 2, Culture.ELVEN, "Break the Charge", Phase.ARCHERY);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canExert(self, game, 1, 3, Race.ELF, CardType.COMPANION);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 3, 3, Race.ELF, CardType.COMPANION));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 2)));
return action;
}
}

View File

@@ -1,50 +0,0 @@
package com.gempukku.lotro.cards.set5.elven;
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
import com.gempukku.lotro.logic.timing.PlayConditions;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.PossessionClass;
import com.gempukku.lotro.filters.Filter;
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.HealCharactersEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Battle of Helm's Deep
* Side: Free
* Culture: Elven
* Twilight Cost: 1
* Type: Possession • Hand Weapon
* Strength: +1
* Game Text: Bearer must be Legolas. Each time the fellowship moves, you may spot a wounded minion to heal Legolas.
*/
public class Card5_012 extends AbstractAttachableFPPossession {
public Card5_012() {
super(1, 1, 0, Culture.ELVEN, PossessionClass.HAND_WEAPON, "Legolas' Sword", null, true);
}
@Override
public Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.legolas;
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.moves(game, effectResult)
&& PlayConditions.canSpot(game, CardType.MINION, Filters.wounded)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new HealCharactersEffect(self, self.getOwner(), self.getAttachedTo()));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,60 +0,0 @@
package com.gempukku.lotro.cards.set5.elven;
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.cardtype.AbstractCompanion;
import com.gempukku.lotro.logic.modifiers.Condition;
import com.gempukku.lotro.logic.modifiers.DoesNotAddToArcheryTotalModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.TwilightCostModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Battle of Helm's Deep
* Side: Free
* Culture: Elven
* Twilight Cost: 2
* Type: Companion • Elf
* Strength: 6
* Vitality: 3
* Resistance: 6
* Game Text: To play, spot an Elf. While Taurnil bears a ranged weapon, the twilight cost of each Shadow possession
* is +2, and he does not add to the fellowship archery total.
*/
public class Card5_013 extends AbstractCompanion {
public Card5_013() {
super(2, 6, 3, 6, Culture.ELVEN, Race.ELF, null, "Taurnil", "Sharp-eyed Bowman", true);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Race.ELF);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, final PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<>();
modifiers.add(
new TwilightCostModifier(self, Filters.and(Side.SHADOW, CardType.POSSESSION),
new Condition() {
@Override
public boolean isFullfilled(LotroGame game) {
return Filters.countActive(game, self, Filters.hasAttached(PossessionClass.RANGED_WEAPON)) > 0;
}
}, 2));
modifiers.add(
new DoesNotAddToArcheryTotalModifier(self, self,
new Condition() {
@Override
public boolean isFullfilled(LotroGame game) {
return Filters.countActive(game, self, Filters.hasAttached(PossessionClass.RANGED_WEAPON)) > 0;
}
}));
return modifiers;
}
}

View File

@@ -1,44 +0,0 @@
package com.gempukku.lotro.cards.set5.elven;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
import com.gempukku.lotro.logic.effects.LiberateASiteEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Battle of Helm's Deep
* Side: Free
* Culture: Elven
* Twilight Cost: 2
* Type: Event
* Game Text: Regroup: Spot 3 Elf companions to heal a companion and liberate a site.
*/
public class Card5_014 extends AbstractEvent {
public Card5_014() {
super(Side.FREE_PEOPLE, 2, Culture.ELVEN, "That Is No Orc Horn", Phase.REGROUP);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, 3, Race.ELF, CardType.COMPANION);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseAndHealCharactersEffect(action, playerId, 1, 1, CardType.COMPANION) {
@Override
public String getText(LotroGame game) {
return "Heal a companion";
}
});
action.appendEffect(
new LiberateASiteEffect(self, playerId, null));
return action;
}
}

View File

@@ -1,44 +0,0 @@
package com.gempukku.lotro.cards.set5.elven;
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.cardtype.AbstractCompanion;
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Battle of Helm's Deep
* Side: Free
* Culture: Elven
* Twilight Cost: 2
* Type: Companion • Elf
* Strength: 6
* Vitality: 3
* Resistance: 6
* Signet: Theoden
* Game Text: Archer. Each time Legolas wins a skirmish, you may heal a Dwarf companion or another Elf companion.
*/
public class Card5_121 extends AbstractCompanion {
public Card5_121() {
super(2, 6, 3, 6, Culture.ELVEN, Race.ELF, Signet.THEODEN, "Legolas", "Archer of Mirkwood", true);
addKeyword(Keyword.ARCHER);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, self)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new ChooseAndHealCharactersEffect(action, playerId, 1, 1, CardType.COMPANION, Filters.not(self), Filters.or(Race.DWARF, Race.ELF)));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -26,17 +26,28 @@
strength: 5 strength: 5
vitality: 3 vitality: 3
resistance: 6 resistance: 6
/*requires: {
}
effects: [ effects: [
{ {
type: toPlay
} requires: {
{ type: canSpot
filter: elf
} }
]*/ }
{
type: modifier
modifier: {
type: cantTakeMoreWoundsThan
filter: self
requires: {
type: canSpot
filter: self,inSkirmishAgainst(wounded,minion)
}
amount: 1
phase: skirmish
}
}
]
gametext: To play, spot an Elf.<br>While skirmishing a wounded minion, Balglin takes no more than 1 wound during each skirmish phase. gametext: To play, spot an Elf.<br>While skirmishing a wounded minion, Balglin takes no more than 1 wound during each skirmish phase.
lore: He is a strong fighter. He asks for no quarter and gives none. lore: He is a strong fighter. He asks for no quarter and gives none.
promotext: "" promotext: ""
@@ -70,20 +81,21 @@
twilight: 2 twilight: 2
type: Event type: Event
keywords: Archery keywords: Archery
/*requires: {
}
effects: { effects: {
type: event type: event
cost: { cost: {
type: exert
filter: choose(elf,companion)
count: 3
}, },
effect: [ effect: [
{ {
type: modifyArcheryTotal
side: free people
amount: 2
} }
] ]
}*/ }
gametext: <b>Archery:</b> Exert 3 Elf companions to make the fellowship archery total +2. gametext: <b>Archery:</b> Exert 3 Elf companions to make the fellowship archery total +2.
lore: A storm of white arrows answered the attacking hand of Isengard. lore: A storm of white arrows answered the attacking hand of Isengard.
promotext: "" promotext: ""
@@ -118,18 +130,24 @@
type: Possession type: Possession
strength: 1 strength: 1
itemclass: Hand weapon itemclass: Hand weapon
#target: title(Legolas) target: title(Legolas)
/*requires: {
}
effects: [ effects: [
{ {
type: trigger
} optional: true
{ trigger: {
type: moves
} }
]*/ requires: {
type: canSpot
filter: wounded,minion
}
effect: {
type: heal
filter: bearer
}
}
]
gametext: Bearer must be Legolas.<br>Each time the fellowship moves, you may spot a wounded minion to heal Legolas. gametext: Bearer must be Legolas.<br>Each time the fellowship moves, you may spot a wounded minion to heal Legolas.
lore: Legolas wielded a longsword to strike from horseback. lore: Legolas wielded a longsword to strike from horseback.
promotext: "" promotext: ""
@@ -167,17 +185,38 @@
strength: 6 strength: 6
vitality: 3 vitality: 3
resistance: 6 resistance: 6
/*requires: {
}
effects: [ effects: [
{ {
type: toPlay
} requires: {
{ type: canSpot
filter: elf
} }
]*/ }
{
type: modifier
modifier: {
type: modifyCost
requires: {
type: canSpot
filter: self,hasAttached(ranged weapon)
}
filter: side(shadow),possession
amount: 2
}
}
{
type: modifier
modifier: {
type: doesNotAddToArcheryTotal
filter: self
requires: {
type: canSpot
filter: self,hasAttached(ranged weapon)
}
}
}
]
gametext: To play, spot an Elf.<br>While Taurnil bears a ranged weapon, the twilight cost of each Shadow possession is +2, and he does not add to the fellowship archery total. gametext: To play, spot an Elf.<br>While Taurnil bears a ranged weapon, the twilight cost of each Shadow possession is +2, and he does not add to the fellowship archery total.
lore: Taurnil's careful aim can disarm his enemies at long range. lore: Taurnil's careful aim can disarm his enemies at long range.
promotext: "" promotext: ""
@@ -211,20 +250,23 @@
twilight: 2 twilight: 2
type: Event type: Event
keywords: Regroup keywords: Regroup
/*requires: {
}
effects: { effects: {
type: event type: event
cost: { requires: {
type: canSpot
}, filter: elf,companion
count: 3
}
effect: [ effect: [
{ {
type: heal
filter: choose(companion)
}
{
type: liberateSite
} }
] ]
}*/ }
gametext: <b>Regroup:</b> Spot 3 Elf companions to heal a companion and liberate a site. gametext: <b>Regroup:</b> Spot 3 Elf companions to heal a companion and liberate a site.
lore: Anxious defenders cheered the welcome sound of Elvish trumpets. lore: Anxious defenders cheered the welcome sound of Elvish trumpets.
promotext: "" promotext: ""
@@ -264,17 +306,20 @@
signet: Theoden signet: Theoden
resistance: 6 resistance: 6
keywords: Archer keywords: Archer
/*requires: {
}
effects: [ effects: [
{ {
type: trigger
} optional: true
{ trigger: {
type: winsSkirmish
} filter: self
]*/ }
effect: {
type: heal
filter: choose(another,or(dwarf,elf),companion)
}
}
]
gametext: <b>Archer</b>.<br>Each time Legolas wins a skirmish, you may heal a Dwarf companion or another Elf companion. gametext: <b>Archer</b>.<br>Each time Legolas wins a skirmish, you may heal a Dwarf companion or another Elf companion.
lore: ...even more would I give for a hundred good archers of Mirkwood. We shall need them.' lore: ...even more would I give for a hundred good archers of Mirkwood. We shall need them.'
promotext: "" promotext: ""
@@ -308,20 +353,21 @@
twilight: 2 twilight: 2
type: Event type: Event
keywords: Archery keywords: Archery
/*requires: {
}
effects: { effects: {
type: event type: event
cost: { cost: {
type: exert
filter: choose(elf,companion)
count: 3
}, },
effect: [ effect: [
{ {
type: modifyArcheryTotal
side: free people
amount: 2
} }
] ]
}*/ }
gametext: <b>Archery:</b> Exert 3 Elf companions to make the fellowship archery total +2. gametext: <b>Archery:</b> Exert 3 Elf companions to make the fellowship archery total +2.
lore: A wall of Elven arrows met the attackers before they reached the Hornburg itself. lore: A wall of Elven arrows met the attackers before they reached the Hornburg itself.
promotext: "" promotext: ""

View File

@@ -27,7 +27,7 @@ public class EffectAppenderFactory {
effectAppenderProducers.put("cancelevent", new CancelEvent()); effectAppenderProducers.put("cancelevent", new CancelEvent());
effectAppenderProducers.put("cancelskirmish", new CancelSkirmish()); effectAppenderProducers.put("cancelskirmish", new CancelSkirmish());
effectAppenderProducers.put("cancelskirmishbetween", new CancelSkirmishBetween()); effectAppenderProducers.put("cancelskirmishbetween", new CancelSkirmishBetween());
effectAppenderProducers.put("canplaynextaction", new CanPlayNextAction()); effectAppenderProducers.put("cancelspecialability", new CancelSpecialAbility());
effectAppenderProducers.put("canplaynextaction", new CanPlayNextAction()); effectAppenderProducers.put("canplaynextaction", new CanPlayNextAction());
effectAppenderProducers.put("choice", new Choice()); effectAppenderProducers.put("choice", new Choice());
effectAppenderProducers.put("chooseactivecards", new ChooseActiveCards()); effectAppenderProducers.put("chooseactivecards", new ChooseActiveCards());