Migrated Moria cards in set 12 to hjson

This commit is contained in:
MarcinSc
2024-05-19 18:32:22 +07:00
parent 53affc71f0
commit ab7421962c
3 changed files with 63 additions and 119 deletions

View File

@@ -1,47 +0,0 @@
package com.gempukku.lotro.cards.set12.moria;
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.game.state.LotroGame;
import com.gempukku.lotro.logic.cardtype.AbstractMinion;
import com.gempukku.lotro.logic.modifiers.CantExertWithCardModifier;
import com.gempukku.lotro.logic.modifiers.CantTakeWoundsModifier;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.condition.LocationCondition;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Black Rider
* Side: Shadow
* Culture: Moria
* Twilight Cost: 12
* Type: Minion • Balrog
* Strength: 17
* Vitality: 5
* Site: 4
* Game Text: Damage +1. While The Balrog is at an underground site, it is fierce and cannot take wounds or be exerted.
*/
public class Card12_079 extends AbstractMinion {
public Card12_079() {
super(12, 17, 5, 4, Race.BALROG, Culture.MORIA, "The Balrog", "The Terror of Khazad-dûm", true);
addKeyword(Keyword.DAMAGE, 1);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<>();
modifiers.add(
new KeywordModifier(self, self, new LocationCondition(Keyword.UNDERGROUND), Keyword.FIERCE, 1));
modifiers.add(
new CantTakeWoundsModifier(self, new LocationCondition(Keyword.UNDERGROUND), self));
modifiers.add(
new CantExertWithCardModifier(self, self, new LocationCondition(Keyword.UNDERGROUND), Filters.any));
return modifiers;
}
}

View File

@@ -1,71 +0,0 @@
package com.gempukku.lotro.cards.set12.moria;
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.RequiredTriggerAction;
import com.gempukku.lotro.logic.cardtype.AbstractAttachable;
import com.gempukku.lotro.logic.effects.DiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.RevealHandEffect;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Black Rider
* Side: Shadow
* Culture: Moria
* Twilight Cost: 1
* Type: Artifact • Hand Weapon
* Strength: +1
* Game Text: Bearer must be The Balrog. It is fierce. When you play this artifact, the Free Peoples player reveals his
* or her hand and discards all Free Peoples cards from hand that have a twilight cost of 1 or less.
*/
public class Card12_080 extends AbstractAttachable {
public Card12_080() {
super(Side.SHADOW, CardType.ARTIFACT, 1, Culture.MORIA, PossessionClass.HAND_WEAPON, "Whip of Many Thongs", "Weapon of Flame and Shadow", true);
}
@Override
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.balrog;
}
@Override
public int getStrength() {
return 1;
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<>();
modifiers.add(
new KeywordModifier(self, Filters.hasAttached(self), Keyword.FIERCE));
return modifiers;
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(final LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)) {
final RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new RevealHandEffect(self, self.getOwner(), game.getGameState().getCurrentPlayerId()) {
@Override
protected void cardsRevealed(Collection<? extends PhysicalCard> cards) {
final Collection<PhysicalCard> cardsToDiscard = Filters.filter(game.getGameState().getHand(game.getGameState().getCurrentPlayerId()), game, Side.FREE_PEOPLE, Filters.or(Filters.printedTwilightCost(1), Filters.printedTwilightCost(0)));
action.appendEffect(
new DiscardCardsFromHandEffect(self, game.getGameState().getCurrentPlayerId(), cardsToDiscard, true));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -28,6 +28,40 @@
site: 4
keywords: Damage+1
effects: [
{
type: modifier
modifier: {
type: addKeyword
requires: {
type: location
filter: underground
}
filter: self
keyword: fierce
}
}
{
type: modifier
modifier: {
type: cantTakeWounds
requires: {
type: location
filter: underground
}
filter: self
}
}
{
type: modifier
modifier: {
type: cantBeExerted
requires: {
type: location
filter: underground
}
filter: self
}
}
]
gametext: <b>Damage +1</b>.<br>While The Balrog is at an underground site, it is <b>fierce</b> and cannot take wounds or be exerted.
lore: The fire in it seemed to die, but the darkness grew.
@@ -64,8 +98,36 @@
type: Artifact
strength: 1
itemclass: Hand weapon
#target: The Balrog
target: title(The Balrog)
effects: [
{
type: modifier
modifier: {
type: addKeyword
filter: bearer
keyword: fierce
}
}
{
type: trigger
trigger: {
type: played
filter: self
}
effect: [
{
type: revealHand
hand: free people
memorize: revealedCards
}
{
type: discardFromHand
forced: true
hand: free people
filter: all(memory(revealedCards),side(free people),maxTwilight(1))
}
]
}
]
gametext: Bearer must be The Balrog.<br>It is <b>fierce</b>.<br>When you play this artifact, the Free Peoples player reveals his or her hand and discards all Free Peoples cards from hand that have a twilight cost of 1 or less.
lore: ...it swung its whip, and the thongs lashed....