From 2c19c2e2897471aa14298b9149f9266888cb06bd Mon Sep 17 00:00:00 2001 From: MarcinSc Date: Sat, 20 Apr 2024 17:19:29 +0700 Subject: [PATCH] Migrated Rohan cards in set 4 to hjson --- .../official/set04}/set04-Rohan.hjson | 1067 +++++++++++------ .../field/effect/EffectAppenderFactory.java | 5 +- ...{PreventBurden.java => PreventEffect.java} | 9 +- .../effect/appender/PreventTwilight.java | 34 - .../field/effect/filter/FilterFactory.java | 2 + .../trigger/AboutToTakeControlOfSite.java | 34 + .../effect/trigger/TriggerCheckerFactory.java | 3 +- 7 files changed, 741 insertions(+), 413 deletions(-) rename gemp-lotr/gemp-lotr-cards/src/main/resources/{card-stubs => cards/official/set04}/set04-Rohan.hjson (64%) rename gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/{PreventBurden.java => PreventEffect.java} (77%) delete mode 100644 gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/PreventTwilight.java create mode 100644 gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/AboutToTakeControlOfSite.java diff --git a/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set04-Rohan.hjson b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set04/set04-Rohan.hjson similarity index 64% rename from gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set04-Rohan.hjson rename to gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set04/set04-Rohan.hjson index 562d6366f..a9e90c278 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/resources/card-stubs/set04-Rohan.hjson +++ b/gemp-lotr/gemp-lotr-cards/src/main/resources/cards/official/set04/set04-Rohan.hjson @@ -22,21 +22,29 @@ culture: Rohan twilight: 1 type: Ally - allyHome: towers,3,towers,6 + allyHome: two towers,3,6 race: Man strength: 3 vitality: 2 - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: activated + phase: archery + cost: { + type: exert + filter: self + } + requires: { + type: canSpot + filter: villager + } + effect: { + type: modifyArcheryTotal + side: free + amount: 1 + } + } + ] gametext: Archery: Exert Aldor and spot a villager to make the fellowship archery total +1. lore: Fighting to defend his people, Aldor found courage to replace his youth. promotext: "" @@ -70,18 +78,43 @@ twilight: 1 type: Possession itemclass: Mount - #target: a Man, Elf, or Wizard - /*requires: { - - } + target: or(man,elf,wizard) effects: [ - { - - } - { - - } - ]*/ + { + type: toPlay + requires: { + type: canSpot + filter: culture(rohan),man + } + } + { + type: trigger + optional: true + trigger: { + type: played + filter: self + } + effect: { + type: heal + filter: bearer + } + } + { + type: trigger + trigger: { + type: startOfPhase + phase: skirmish + } + requires: { + type: canSpot + filter: bearer,inSkirmish + } + effect: { + type: exert + filter: all(minion,inSkirmishAgainst(bearer)) + } + } + ] gametext: To play, spot a [rohan] Man. Bearer must be a Man, Elf, or Wizard. When you play Brego, you may heal bearer.
At the start of each skirmish involving bearer, each minion skirmishing bearer must exert. lore: Brego was named for the second King of Rohan. promotext: "" @@ -119,17 +152,27 @@ strength: 6 vitality: 3 resistance: 6 - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: activatedTrigger + trigger: { + type: aboutToTakeControlOfSite + } + cost: [ + { + type: exert + filter: self + } + { + type: exert + filter: choose(villager) + } + ] + effect: { + type: preventEffect + } + } + ] gametext: Response: If your opponent is about to take control of a site, exert Ceorl and a villager to prevent this. lore: We were driven back yesterday over the Isen with great loss; many perished at the crossing.' promotext: "" @@ -166,17 +209,24 @@ strength: 6 vitality: 3 resistance: 6 - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: modifyOwnCost + requires: { + type: phase + phase: play starting fellowship + } + amount: -1 + } + { + type: modifier + modifier: { + type: modifyStrength + filter: self,inSkirmishAgainst(wounded,minion) + amount: 2 + } + } + ] gametext: When this companion is in your starting fellowship, his twilight cost is -1.
While skirmishing a wounded minion, this companion is strength +2. lore: After him they rode: a long line of mail-clad men, swift, shining, fell and fair to look upon. promotext: "" @@ -215,17 +265,27 @@ vitality: 3 signet: Aragorn resistance: 6 - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: modifyOwnCost + requires: { + type: canSpot + filter: culture(rohan),man + } + amount: -1 + } + { + type: trigger + optional: true + trigger: { + type: startOfTurn + } + effect: { + type: heal + filter: choose(culture(rohan),ally) + } + } + ] gametext: While you can spot a [rohan] Man, Éomer's twilight cost is -1.
At the start of each turn, you may heal a [rohan] ally. lore: Now indeed there is hope of victory!' promotext: "" @@ -264,17 +324,28 @@ vitality: 3 signet: Theoden resistance: 6 - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: modifyOwnCost + requires: { + type: canSpot + filter: culture(rohan),man + } + amount: -1 + } + { + type: modifier + modifier: { + type: modifyStrength + filter: self + amount: { + type: forEachWound + multiplier: 2 + filter: minion,inSkirmishAgainst(self) + } + } + } + ] gametext: While you can spot a [rohan] Man, Éomer's twilight cost is -1.
Éomer is strength +2 for each wound on each minion he is skirmishing. lore: Then one rode forward, a tall man, taller than the rest; from his helm as a crest a white horsetail flowed. promotext: "" @@ -309,18 +380,18 @@ type: Possession strength: 2 itemclass: Hand weapon - #target: a [rohan] Man - /*requires: { - - } + target: culture(rohan),man effects: [ - { - - } - { - - } - ]*/ + { + type: modifier + modifier: { + type: addKeyword + filter: bearer,name(Éomer),mounted + keyword: damage + amount: 2 + } + } + ] gametext: Bearer must be a [rohan] Man.
If bearer is Éomer and he is mounted, Éomer is damage +2. lore: He advanced until the point of his spear was within a foot of Aragorn's breast. promotext: "" @@ -358,17 +429,19 @@ strength: 6 vitality: 3 resistance: 6 - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: trigger + trigger: { + type: movesTo + filter: plains + } + effect: { + type: exert + filter: all(minion) + } + } + ] gametext: Each time the fellowship moves to a plains site, each minion must exert. lore: Time is pressing.... We must hasten south, lord.' promotext: "" @@ -408,17 +481,29 @@ signet: Theoden resistance: 6 keywords: Valiant - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: activatedTrigger + trigger: { + type: aboutToTakeWound + filter: unbound,companion + } + cost: [ + { + type: exert + filter: self + } + { + type: addTwilight + amount: 1 + } + ] + effect: { + type: preventWound + filter: choose(unbound,companion) + } + } + ] gametext: Valiant.
Response: If an unbound companion is about to take a wound, exert Éowyn and add (1) to prevent that wound. lore: Thus Aragorn... beheld Éowyn... and thought her fair, fair and cold, like a morning of pale spring that is not yet come to womanhood. promotext: "" @@ -458,17 +543,34 @@ signet: Aragorn resistance: 6 keywords: Valiant - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: activatedTrigger + trigger: { + type: aboutToTakeWound + filter: self + } + requires: [ + { + type: phase + phase: skirmish + } + { + type: canSpot + filter: self,exhausted + } + ] + cost: { + type: discardFromHand + forced: false + count: 2 + } + effect: { + type: preventWound + filter: self + } + } + ] gametext: Valiant.
Response: If Éowyn is exhausted and about to take a wound in a skirmish, discard 2 cards from hand to prevent that wound. lore: Slender and tall she was... but strong she seemed and stern as steel, a daughter of kings. promotext: "" @@ -503,18 +605,22 @@ type: Possession strength: 3 itemclass: Hand weapon - #target: title(Éowyn) - /*requires: { - - } + target: title(Éowyn) effects: [ - { - - } - { - - } - ]*/ + { + type: modifier + modifier: { + type: addKeyword + filter: bearer + requires: { + type: canSpot + filter: villager + } + keyword: damage + amount: 1 + } + } + ] gametext: Bearer must be Éowyn.
While you can spot a villager, Éowyn is damage +1. lore: ...the sword was set upright before her, and her hands were laid upon the hilt. promotext: "" @@ -548,20 +654,24 @@ twilight: 1 type: Event keywords: Skirmish - /*requires: { - - } effects: { type: event - cost: { - - }, effect: [ { - + type: modifyStrength + filter: choose(culture(rohan),man) + amount: { + type: condition + condition: { + type: canSpot + filter: villager + } + true: 3 + false: 2 + } } ] - }*/ + } gametext: Skirmish: Make a [rohan] Man strength +2 (or +3 if you spot a villager). lore: Bar the gates, set a watch on the surrounds, and get the women and children to the caves.' promotext: "" @@ -595,18 +705,33 @@ twilight: 2 type: Possession itemclass: Mount - #target: a [rohan] Man - /*requires: { - - } + target: culture(rohan),man effects: [ - { - - } - { - - } - ]*/ + { + type: modifier + modifier: { + type: addKeyword + filter: bearer,name(Éomer) + keyword: defender + amount: 1 + } + } + { + type: trigger + trigger: { + type: startOfPhase + phase: skirmish + } + requires: { + type: canSpot + filter: bearer,inSkirmish + } + effect: { + type: exert + filter: all(minion,inSkirmishAgainst(bearer)) + } + } + ] gametext: Bearer must be a [rohan] Man.
If bearer is Éomer, he is defender +1.
At the start of each skirmish involving bearer, each minion skirmishing bearer must exert. lore: Riders of his éored claimed that Éomer's horse had no equal, save Shadowfax. promotext: "" @@ -640,20 +765,22 @@ twilight: 1 type: Event keywords: Maneuver - /*requires: { - - } effects: { type: event cost: { - + type: exert + filter: choose(name(Théoden)) }, effect: [ { - + type: addKeyword + filter: choose(companion,signet(Théoden)) + keyword: defender + amount: 1 + until: regroup } ] - }*/ + } gametext: Maneuver: Exert Théoden to make a companion who has the Théoden signet defender +1 until the regroup phase. lore: Behind them from the Deep came the stern cries of men issuing from the caves, driving forth the enemy.' promotext: "" @@ -687,17 +814,40 @@ twilight: 2 type: Condition keywords: Support Area - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: trigger + optional: true + trigger: { + type: winsSkirmish + filter: culture(rohan),man + } + effect: { + type: addTokens + culture: rohan + filter: self + } + } + { + type: activated + phase: regroup + effect: [ + { + type: discard + filter: choose(side(shadow),condition) + count: { + type: forEachToken + filter: self + culture: rohan + } + } + { + type: discard + filter: self + } + ] + } + ] gametext: Plays to your support area.
Each time a [rohan] Man wins a skirmish, you may place a [rohan] token on this card.
Regroup: Discard a Shadow condition for each [rohan] token here. Discard this condition. lore: ...it was the spirit of your people that held it strong.' promotext: "" @@ -731,22 +881,39 @@ culture: Rohan twilight: 1 type: Ally - allyHome: towers,4 + allyHome: two towers,4 race: Man strength: 4 vitality: 2 keywords: Villager - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: trigger + trigger: { + type: constantlyCheck + requires: { + type: canSpot + filter: site,controlledByOtherPlayer,siteNumber(4),siteBlock(two towers) + } + } + effect: { + type: discard + filter: self + } + } + { + type: activated + phase: fellowship + cost: { + type: exert + filter: self + } + effect: { + type: heal + filter: choose(culture(rohan),man) + } + } + ] gametext: Villager.
Discard Guma if an opponent controls his home site.
Fellowship: Exert Guma to heal a [rohan] Man. lore: Foodstores swelled as refugees like Guma brought provisions to the Hornburg. promotext: "" @@ -780,18 +947,17 @@ twilight: 1 type: Possession itemclass: Armor - #target: a Man - /*requires: { - - } + target: man effects: [ - { - - } - { - - } - ]*/ + { + type: modifier + modifier: { + type: cantBeOverwhelmedMultiplier + filter: bearer + multiplier: 3 + } + } + ] gametext: Bearer must be a Man.
Bearer may not be overwhelmed unless his or her strength is tripled. lore: What Man of an earlier age wore this chain? Was his end worth a song? promotext: "" @@ -825,20 +991,32 @@ twilight: 2 type: Event keywords: Regroup - /*requires: { - - } effects: { type: event - cost: { - - }, + requires: { + type: canSpot + filter: mounted,culture(rohan),man + count: 2 + } effect: [ { - + type: choice + texts: [ + Liberate a site + Draw 3 cards + ] + effects: [ + { + type: liberateSite + } + { + type: drawCards + count: 3 + } + ] } ] - }*/ + } gametext: Regroup: Spot 2 mounted [rohan] Men to liberate a site or draw 3 cards. lore: And with that shout the king came. His horse was white as snow, golden was his shield, and his spear was long. promotext: "" @@ -874,18 +1052,18 @@ strength: 2 vitality: 1 itemclass: Hand weapon - #target: title(Théoden) - /*requires: { - - } + target: title(Théoden) effects: [ - { - - } - { - - } - ]*/ + { + type: modifier + modifier: { + type: addKeyword + filter: bearer + keyword: damage + amount: 1 + } + } + ] gametext: Bearer must be Théoden.
He is damage +1. lore: Here, lord, is Herugrim, your ancient blade....' promotext: "" @@ -919,22 +1097,40 @@ culture: Rohan twilight: 1 type: Ally - allyHome: towers,4 + allyHome: two towers,4 race: Man strength: 4 vitality: 2 keywords: Villager - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: trigger + trigger: { + type: constantlyCheck + requires: { + type: canSpot + filter: site,controlledByOtherPlayer,siteNumber(4),siteBlock(two towers) + } + } + effect: { + type: discard + filter: self + } + } + { + type: activated + phase: skirmish + cost: { + type: exert + filter: self + } + effect: { + type: modifyStrength + filter: choose(culture(rohan),man) + amount: 2 + } + } + ] gametext: Villager.
Discard Hlafwine if an opponent controls his home site.
Skirmish: Exert Hlafwine to make a [rohan] Man strength +2. lore: Too old to fight, Hlafwine prepared meals for the defenders. promotext: "" @@ -968,20 +1164,26 @@ twilight: 1 type: Event keywords: Skirmish - /*requires: { - - } effects: { type: event - cost: { - - }, effect: [ + { + type: chooseHowManyToSpot + filter: culture(rohan),man + text: Choose how many ROHAN man to spot + memorize: spotCount + } { - + type: modifyStrength + filter: choose(unbound,companion) + amount: { + type: fromMemory + memory: spotCount + limit: 3 + } } ] - }*/ + } gametext: Skirmish: Make an unbound companion strength +1 for each [rohan] Man you spot (limit +3). lore: A time may come when there will be a need for valour without renown....' promotext: "" @@ -1015,18 +1217,31 @@ twilight: 2 type: Possession itemclass: Mount - #target: a Man, Elf, or Wizard - /*requires: { - - } + target: or(man,elf,wizard) effects: [ - { - - } - { - - } - ]*/ + { + type: toPlay + requires: { + type: canSpot + filter: culture(rohan),man + } + } + { + type: trigger + trigger: { + type: startOfPhase + phase: skirmish + } + requires: { + type: canSpot + filter: bearer,inSkirmish + } + effect: { + type: exert + filter: all(minion,inSkirmishAgainst(bearer)) + } + } + ] gametext: To play, spot a [rohan] Man. Bearer must be a Man, Elf, or Wizard.
At the start of each skirmish involving bearer, each minion skirmishing bearer must exert. lore: Very swift were the horses of Rohan. promotext: "" @@ -1060,18 +1275,25 @@ twilight: 2 type: Possession itemclass: Armor - #target: a [rohan] Man - /*requires: { - - } + target: culture(rohan),man effects: [ - { - - } - { - - } - ]*/ + { + type: modifier + modifier: { + type: cantTakeMoreWoundsThan + filter: bearer + amount: 1 + phase: skirmish + } + } + { + type: modifier + modifier: { + type: cantTakeWounds + filter: bearer,name(Théoden),not(inSkirmish) + } + } + ] gametext: Bearer must be a [rohan] Man.
Bearer takes no more than 1 wound during each skirmish phase. If bearer is Théoden, he may not take wounds except during a skirmish involving him. lore: Now men came bearing raiment of war from the king's hoard.... promotext: "" @@ -1105,22 +1327,40 @@ culture: Rohan twilight: 1 type: Ally - allyHome: towers,4 + allyHome: two towers,4 race: Man strength: 4 vitality: 2 keywords: Villager - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: trigger + trigger: { + type: constantlyCheck + requires: { + type: canSpot + filter: site,controlledByOtherPlayer,siteNumber(4),siteBlock(two towers) + } + } + effect: { + type: discard + filter: self + } + } + { + type: activated + phase: skirmish + cost: { + type: exert + filter: self + } + effect: { + type: modifyStrength + filter: choose(mounted,companion) + amount: 2 + } + } + ] gametext: Villager.
Discard Léod if an opponent controls his home site.
Skirmish: Exert Léod to make a mounted companion strength +2. lore: Humble Léod was a rancher before he became a soldier at Helm's Deep. promotext: "" @@ -1157,17 +1397,24 @@ strength: 5 vitality: 3 resistance: 6 - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: activated + phase: skirmish + requires: { + type: canSpot + filter: self,mounted + } + cost: { + type: exert + filter: self + } + effect: { + type: exert + filter: choose(minion,inSkirmishAgainst(unbound,companion)) + } + } + ] gametext: Skirmish: If this companion is mounted, exert him to exert a minion skirmishing an unbound companion. lore: They are proud and wilful, but they are true-hearted, generous in thought and deed....' promotext: "" @@ -1201,18 +1448,24 @@ twilight: 1 type: Possession itemclass: Mount - #target: a [rohan] Man - /*requires: { - - } + target: culture(rohan),man effects: [ - { - - } - { - - } - ]*/ + { + type: trigger + trigger: { + type: startOfPhase + phase: skirmish + } + requires: { + type: canSpot + filter: bearer,inSkirmish + } + effect: { + type: exert + filter: all(minion,inSkirmishAgainst(bearer)) + } + } + ] gametext: Bearer must be a [rohan] Man.
At the start of each skirmish involving bearer, each minion skirmishing bearer must exert. lore: Their horses were of great stature, strong and clean-limbed; their grey coats glistened, their long tails flowed in the wind.... promotext: "" @@ -1247,18 +1500,18 @@ type: Possession strength: 2 itemclass: Hand weapon - #target: a [rohan] Man - /*requires: { - - } + target: culture(rohan),man effects: [ - { - - } - { - - } - ]*/ + { + type: modifier + modifier: { + type: addKeyword + filter: bearer,mounted + keyword: damage + amount: 1 + } + } + ] gametext: Bearer must be a [rohan] Man.
If bearer is mounted, bearer is damage +1. lore: Shafts of the sun flared above the eastern hills and glimmered on their spears. promotext: "" @@ -1292,20 +1545,29 @@ twilight: 1 type: Event keywords: Fellowship - /*requires: { - - } effects: { type: event - cost: { - + requires: { + type: or + requires: [ + { + type: canSpot + filter: culture(rohan),man + count: 2 + } + { + type: canSpot + filter: valiant,culture(rohan),man + } + ] }, effect: [ { - + type: playCardFromDrawDeck + filter: choose(culture(rohan),or(character,possession)) } ] - }*/ + } gametext: Fellowship: Spot 2 [rohan] Men (or 1 valiant [rohan] Man) to play a [rohan] character or [rohan] possession from your draw deck. lore: How fair are the bright eyes in the grass! Evermind they are called... for they blossom in all seasons of the year, and grow where dead men rest.' promotext: "" @@ -1339,17 +1601,26 @@ twilight: 0 type: Condition keywords: Support Area - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: activated + phase: fellowship + cost: [ + { + type: addTwilight + amount: 2 + } + { + type: putCardsFromHandOnBottomOfDeck + filter: choose(villager) + } + ] + effect: { + type: heal + filter: choose(ally) + } + } + ] gametext: Plays to your support area.
Fellowship: Add (2) and place a villager from hand beneath your draw deck to heal a [rohan] ally. lore: This is all we could save, my Lady.' promotext: "" @@ -1384,18 +1655,18 @@ type: Possession strength: 2 itemclass: Hand weapon - #target: a [rohan] Man - /*requires: { - - } + target: culture(rohan),man effects: [ - { - - } - { - - } - ]*/ + { + type: modifier + modifier: { + type: addKeyword + filter: bearer,inSkirmishAgainst(urukHai) + keyword: damage + amount: 1 + } + } + ] gametext: Bearer must be a [rohan] Man.
While bearer is skirmishing an Uruk-hai, bearer is damage +1. lore: This is a good sword, Haleth, son of Háma... there is always hope.' promotext: "" @@ -1434,17 +1705,23 @@ vitality: 2 signet: Aragorn resistance: 6 - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: activated + phase: regroup + requires: { + type: canSpot + filter: culture(rohan),ally + } + cost: { + type: exert + filter: self + } + effect: { + type: liberateSite + } + } + ] gametext: Regroup: Spot a [rohan] ally and exert Théoden to liberate a site. lore: I myself will go to war, to fall in the front of the battle, if it must be.' promotext: "" @@ -1478,17 +1755,25 @@ twilight: 1 type: Condition keywords: Support Area - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: trigger + optional: true + trigger: { + type: played + filter: roaming,minion + memorize: playedMinion + } + requires: { + type: canSpot + filter: villager + } + effect: { + type: exert + filter: memory(playedMinion) + } + } + ] gametext: Plays to your support area.
Each time your opponent plays a roaming minion, you may spot a villager to exert that minion. lore: Where is the hand on the harpstring, and the red fire glowing? / Where is the spring and the harvest and the tall corn growing?' promotext: "" @@ -1522,17 +1807,20 @@ twilight: 1 type: Condition keywords: Support Area - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: activated + phase: fellowship + cost: { + type: exert + filter: choose(culture(rohan),man) + } + effect: { + type: playCardFromDiscard + filter: choose(hand weapon) + } + } + ] gametext: Plays to your support area.
Fellowship: Exert a [rohan] Man to play a hand weapon from your discard pile. lore: And to you my other guests I will offer such things as may be found in my armoury.' promotext: "" @@ -1566,22 +1854,39 @@ culture: Rohan twilight: 1 type: Ally - allyHome: towers,4 + allyHome: two towers,4 race: Man strength: 4 vitality: 2 keywords: Villager - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: trigger + trigger: { + type: constantlyCheck + requires: { + type: canSpot + filter: site,controlledByOtherPlayer,siteNumber(4),siteBlock(two towers) + } + } + effect: { + type: discard + filter: self + } + } + { + type: activated + phase: fellowship + cost: { + type: exert + filter: self + } + effect: { + type: heal + filter: choose(mounted,companion) + } + } + ] gametext: Villager.
Discard Weland if an opponent controls his home site.
Fellowship: Exert Weland to heal a mounted companion. lore: A tender of horses, Weland found much work at Helm's Deep. promotext: "" @@ -1615,17 +1920,20 @@ twilight: 1 type: Condition keywords: Support Area - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: trigger + optional: true + trigger: { + type: startOfPhase + phase: fellowship + } + effect: { + type: heal + filter: choose(villager) + } + } + ] gametext: Plays to your support area.
At the start of each fellowship phase, you may heal a villager. lore: Behind us in the caves of the Deep are... old and young, children and women. But great store of food, and many beasts and their fodder, have also been gathered there.' promotext: "" @@ -1659,20 +1967,31 @@ twilight: 1 type: Event keywords: Skirmish - /*requires: { - - } effects: { type: event - cost: { - - }, effect: [ { - + type: modifyStrength + filter: choose(culture(rohan),man) + amount: 2 + memorize: chosenMan + } + { + type: conditional + requires: { + type: memoryMatches + memory: chosenMan + filter: mounted + } + effect: { + type: addKeyword + filter: memory(chosenMan) + keyword: damage + amount: 2 + } } ] - }*/ + } gametext: Skirmish: Make a [rohan] Man strength +2 (and damage +2 if mounted). lore: The Orcs are destroyed. We slaughtered them during the night.' promotext: "" @@ -1711,17 +2030,23 @@ vitality: 2 signet: Theoden resistance: 6 - /*requires: { - - } effects: [ - { - - } - { - - } - ]*/ + { + type: activated + phase: fellowship + cost: { + type: play + filter: choose(culture(rohan),possession) + on: culture(rohan),companion + memorize: playedCard + } + effect: { + type: heal + filter: choose(hasAttached(memory(playedCard))) + } + limitPerTurn: 1 + } + ] gametext: Fellowship: Play a [rohan] possession on a [rohan] companion to heal that companion (limit once per turn). lore: Every man and strong lad able to bear arms, all who have horses, let them be ready in the saddle at the gate ere the second hour from noon!' promotext: "" diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/EffectAppenderFactory.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/EffectAppenderFactory.java index 42b3306cf..bf66d9d51 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/EffectAppenderFactory.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/EffectAppenderFactory.java @@ -102,11 +102,12 @@ public class EffectAppenderFactory { effectAppenderProducers.put("playsite", new PlaySite()); effectAppenderProducers.put("preventable", new PreventableAppenderProducer()); effectAppenderProducers.put("preventallwounds", new PreventAllWounds()); - effectAppenderProducers.put("preventburden", new PreventBurden()); + effectAppenderProducers.put("preventburden", new PreventEffect()); effectAppenderProducers.put("preventdiscard", new PreventCardEffectAppender()); + effectAppenderProducers.put("preventeffect", new PreventEffect()); effectAppenderProducers.put("preventexert", new PreventExert()); effectAppenderProducers.put("preventheal", new PreventCardEffectAppender()); - effectAppenderProducers.put("preventtwilight", new PreventTwilight()); + effectAppenderProducers.put("preventtwilight", new PreventEffect()); effectAppenderProducers.put("preventwound", new PreventWound()); effectAppenderProducers.put("putcardsfromdeckintohand", new PutCardsFromDeckIntoHand()); effectAppenderProducers.put("putcardsfromdeckontopofdeck", new PutCardsFromDeckOnTopOfDeck()); diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/PreventBurden.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/PreventEffect.java similarity index 77% rename from gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/PreventBurden.java rename to gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/PreventEffect.java index 60b67dc19..580fff3b7 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/PreventBurden.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/PreventEffect.java @@ -7,12 +7,11 @@ import com.gempukku.lotro.cards.build.field.FieldUtils; import com.gempukku.lotro.cards.build.field.effect.EffectAppender; import com.gempukku.lotro.cards.build.field.effect.EffectAppenderProducer; import com.gempukku.lotro.logic.actions.CostToEffectAction; -import com.gempukku.lotro.logic.effects.AddBurdenEffect; -import com.gempukku.lotro.logic.effects.PreventEffect; import com.gempukku.lotro.logic.timing.Effect; +import com.gempukku.lotro.logic.timing.Preventable; import org.json.simple.JSONObject; -public class PreventBurden implements EffectAppenderProducer { +public class PreventEffect implements EffectAppenderProducer { @Override public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException { FieldUtils.validateAllowedFields(effectObject); @@ -23,8 +22,8 @@ public class PreventBurden implements EffectAppenderProducer { new DelayedAppender() { @Override protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) { - AddBurdenEffect addBurdenEffect = (AddBurdenEffect) actionContext.getEffect(); - return new PreventEffect(addBurdenEffect); + Preventable preventable = (Preventable) actionContext.getEffect(); + return new com.gempukku.lotro.logic.effects.PreventEffect(preventable); } }); diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/PreventTwilight.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/PreventTwilight.java deleted file mode 100644 index 5f8d7ee25..000000000 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/PreventTwilight.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.gempukku.lotro.cards.build.field.effect.appender; - -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.field.FieldUtils; -import com.gempukku.lotro.cards.build.field.effect.EffectAppender; -import com.gempukku.lotro.cards.build.field.effect.EffectAppenderProducer; -import com.gempukku.lotro.logic.actions.CostToEffectAction; -import com.gempukku.lotro.logic.effects.AddTwilightEffect; -import com.gempukku.lotro.logic.effects.PreventEffect; -import com.gempukku.lotro.logic.timing.Effect; -import org.json.simple.JSONObject; - -public class PreventTwilight implements EffectAppenderProducer { - @Override - public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException { - FieldUtils.validateAllowedFields(effectObject); - - MultiEffectAppender result = new MultiEffectAppender(); - - result.addEffectAppender( - new DelayedAppender() { - @Override - protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) { - AddTwilightEffect addTwilightEffect = (AddTwilightEffect) actionContext.getEffect(); - return new PreventEffect(addTwilightEffect); - } - }); - - return result; - } - -} diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/filter/FilterFactory.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/filter/FilterFactory.java index 135b3c488..1f560f93e 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/filter/FilterFactory.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/filter/FilterFactory.java @@ -42,6 +42,8 @@ public class FilterFactory { simpleFilters.put("bearer", (actionContext -> Filters.hasAttached(actionContext.getSource()))); simpleFilters.put("character", (actionContext) -> Filters.character); simpleFilters.put("canexert", (actionContext -> Filters.canExert(actionContext.getSource()))); + simpleFilters.put("controlledbyotherplayer", + (actionContext -> Filters.siteControlledByOtherPlayer(actionContext.getPerformingPlayer()))); simpleFilters.put("controlledsite", (actionContext -> Filters.siteControlled(actionContext.getPerformingPlayer()))); simpleFilters.put("currentsite", diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/AboutToTakeControlOfSite.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/AboutToTakeControlOfSite.java new file mode 100644 index 000000000..d834543f3 --- /dev/null +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/AboutToTakeControlOfSite.java @@ -0,0 +1,34 @@ +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.FilterableSource; +import com.gempukku.lotro.cards.build.InvalidCardDefinitionException; +import com.gempukku.lotro.cards.build.field.FieldUtils; +import com.gempukku.lotro.common.Filterable; +import com.gempukku.lotro.logic.timing.TriggerConditions; +import org.json.simple.JSONObject; + +public class AboutToTakeControlOfSite implements TriggerCheckerProducer { + @Override + public TriggerChecker getTriggerChecker(JSONObject value, CardGenerationEnvironment environment) throws InvalidCardDefinitionException { + FieldUtils.validateAllowedFields(value, "filter"); + + String filter = FieldUtils.getString(value.get("filter"), "filter", "any"); + + final FilterableSource sourceFilter = environment.getFilterFactory().generateFilter(filter, environment); + + return new TriggerChecker() { + @Override + public boolean accepts(ActionContext actionContext) { + final Filterable source = sourceFilter.getFilterable(actionContext); + return TriggerConditions.isTakingControlOfSite(actionContext.getEffect(), actionContext.getGame(), source); + } + + @Override + public boolean isBefore() { + return true; + } + }; + } +} diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/TriggerCheckerFactory.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/TriggerCheckerFactory.java index 174225e87..909cbaaa9 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/TriggerCheckerFactory.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/trigger/TriggerCheckerFactory.java @@ -13,12 +13,13 @@ public class TriggerCheckerFactory { public TriggerCheckerFactory() { triggerCheckers.put("abouttoaddburden", new AboutToAddBurden()); - triggerCheckers.put("abouttoaddtwilight", new AboutToAddBurden()); + triggerCheckers.put("abouttoaddtwilight", new AboutToAddTwilight()); triggerCheckers.put("abouttobekilled", new AboutToBeKilled()); triggerCheckers.put("abouttodiscard", new AboutToDiscardFromPlay()); triggerCheckers.put("abouttoexert", new AboutToExert()); triggerCheckers.put("abouttoheal", new AboutToHeal()); triggerCheckers.put("abouttomoveto", new AboutToMoveTo()); + triggerCheckers.put("abouttotakecontrolofsite", new AboutToTakeControlOfSite()); triggerCheckers.put("abouttotakewound", new AboutToTakeWound()); triggerCheckers.put("addsburden", new AddsBurden()); triggerCheckers.put("addsthreat", new AddsThreat());