Migrated Sauron in set 2 to hjson

This commit is contained in:
MarcinSc
2024-04-10 14:00:17 +07:00
parent d8a93d55e1
commit a031cc287e
3 changed files with 317 additions and 0 deletions

View File

@@ -0,0 +1,276 @@
{
2_87: {
side: shadow
culture: Sauron
title: The Eye of Sauron
type: event
keyword: Shadow
twilight: 1
effects: {
type: event
cost: [
{
type: exert
filter: choose(culture(sauron),orc)
}
{
type: chooseHowManyBurdensToSpot
memorize: spottedBurdens
}
]
effect: {
type: drawCards
count: {
type: fromMemory
memory: spottedBurdens
limit: 5
}
}
}
}
2_88: {
side: shadow
culture: Sauron
title: Memory of Many Things
type: event
keyword: Maneuver
twilight: 2
effects: {
type: event
cost: {
type: exert
filter: choose(culture(sauron),orc)
}
effect: {
type: choice
texts: [
Discard an ally
Discard 2 ELVEN allies
]
effects:
[
{
type: discard
filter: choose(ally)
}
{
type: discard
filter: choose(culture(elven),ally)
count: 2
}
]
}
}
}
2_89: {
side: shadow
site: 6
race: Orc
strength: 6
culture: Sauron
vitality: 2
title: Orc Scout
type: minion
keyword: Tracker
twilight: 2
effects: [
{
type: modifier
modifier: {
type: modifyRoamingPenalty
filter: culture(sauron),minion
amount: -1
}
}
{
type: activatedTrigger
trigger: {
type: played
filter: event
exertsRanger: true
}
cost: {
type: choice
texts: [
Exert this minion
Discard this minion
]
effects: [
{
type: exert
filter: self
}
{
type: discard
filter: self
}
]
}
effect: {
type: cancelEvent
}
}
]
}
2_90: {
side: shadow
site: 6
race: Orc
strength: 8
culture: Sauron
vitality: 3
title: Orc Taskmaster
type: minion
twilight: 3
effects: {
type: activated
phase: shadow
cost: {
type: exert
filter: self
}
effect: {
type: addTwilight
amount: 1
}
}
}
2_91: {
side: shadow
culture: Sauron
title: Southern Spies
type: event
keyword: Response
twilight: 0
effects: {
type: responseEvent
trigger: {
type: putsOnRing
}
requires: {
type: canSpot
filter: culture(sauron),minion
}
effect: {
type: discardFromHand
hand: fp
player: you
forced: true
filter: all(any)
count: 1000
}
}
}
2_92: {
side: shadow
culture: Sauron
title: Spies of Mordor
type: condition
keyword:
[
Support Area
Search
]
twilight: 1
requires: {
type: canSpot
filter: culture(sauron),orc
}
effects: {
type: trigger
optional: true
trigger: {
type: moves
}
requires: {
type: phase
phase: regroup
}
effect: {
type: drawCards
count: {
type: condition
condition: {
type: canSpot
filter: culture(sauron),tracker
}
true: 2
false: 1
}
}
}
}
2_93: {
side: shadow
site: 6
race: Orc
strength: 11
culture: Sauron
vitality: 3
title: *Tower Assassin
type: minion
twilight: 4
effects: {
type: activated
phase: maneuver
cost: {
type: exert
filter: self
}
effect: {
type: wound
filter: choose(ally)
}
}
}
2_94: {
side: shadow
culture: Sauron
title: Verily I Come
type: condition
twilight: 0
target: ringBearer
effects: [
{
type: extraCost
cost: {
type: exert
filter: choose(culture(sauron),orc)
}
}
{
type: trigger
trigger: {
type: playerDrawsCard
player: fp
}
requires: {
type: phase
phase: fellowship
}
effect: {
type: addBurdens
amount: 1
}
}
]
}
2_95: {
itemclass: Hand Weapon
side: shadow
strength: 2
culture: Sauron
title: Vile Blade
type: possession
twilight: 1
target: culture(sauron),orc
effects: {
type: modifier
modifier: {
type: modifyStrength
filter: bearer,inSkirmishAgainst(or(man,elf))
amount: 2
}
}
}
}

View File

@@ -0,0 +1,40 @@
package com.gempukku.lotro.cards.build.field.effect.trigger;
import com.gempukku.lotro.cards.build.ActionContext;
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
import com.gempukku.lotro.cards.build.InvalidCardDefinitionException;
import com.gempukku.lotro.cards.build.PlayerSource;
import com.gempukku.lotro.cards.build.field.FieldUtils;
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.PlayerResolver;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.results.DrawCardOrPutIntoHandResult;
import org.json.simple.JSONObject;
public class PlayerDrawsCard implements TriggerCheckerProducer {
@Override
public TriggerChecker getTriggerChecker(JSONObject value, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
FieldUtils.validateAllowedFields(value, "player");
final String player = FieldUtils.getString(value.get("player"), "player");
PlayerSource playerSource = PlayerResolver.resolvePlayer(player, environment);
return new TriggerChecker() {
@Override
public boolean accepts(ActionContext actionContext) {
String playerId = playerSource.getPlayer(actionContext);
EffectResult effectResult = actionContext.getEffectResult();
if (effectResult.getType() == EffectResult.Type.DRAW_CARD_OR_PUT_INTO_HAND) {
DrawCardOrPutIntoHandResult drawResult = (DrawCardOrPutIntoHandResult) effectResult;
return drawResult.getPlayerId().equals(playerId);
}
return false;
}
@Override
public boolean isBefore() {
return false;
}
};
}
}

View File

@@ -45,6 +45,7 @@ public class TriggerCheckerFactory {
triggerCheckers.put("movesto", new MovesTo());
triggerCheckers.put("played", new PlayedTriggerCheckerProducer());
triggerCheckers.put("playedfromstacked", new PlayedFromStacked());
triggerCheckers.put("playerdrawscard", new PlayerDrawsCard());
triggerCheckers.put("putsonring", new PutsOnRing());
triggerCheckers.put("reconciles", new Reconciles());
triggerCheckers.put("removedfromplay", new RemovedFromPlay());