GEMP/Tech Doc/Effect Types

From LOTR-TCG Wiki
< GEMP‎ | Tech Doc
Revision as of 08:18, 25 December 2021 by Teltura (talk | contribs) (adding toc)

GEMP > Tech Doc > Effect Types

In the LotR-TCG, actions are made up of "activities", which manifest as either costs or effects.

The definitions for json hooks are located within /gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/EffectFieldProcessor.java

Such activities are the top-level definition of any type of card game text. Every card (that has non-keyword game text) will contain one or more of the following definitions within its costs and/or effects fields.


activated

Standard special abilities, usually indicated by bold text such as Skirmish:.

Parameters:

  • phase
    • Required.
    • Array of one or more Phase strings representing which phase(s) the ability can be activated in.
  • condition
    • Optional.
    • Array of one or more Condition definitions further restricting when the ability can be used ("Spot an Elf to...").
  • cost
    • Required, unless effect is defined.
    • Array of one or more Cost definitions.
  • effect
    • Required, unless cost is defined.
    • Array of one or more Effect definitions.
  • limitPerPhase
    • Optional.
    • Integer. Defaults to 0 (meaning no limit).
    • Limits how many times per phase the action can be invoked.
  • limitPerTurn
    • Optional.
    • Integer. Defaults to 0 (meaning no limit).
    • Limits how many times per turn the action can be invoked.
  • text
    • Optional.
    • String. Defaults to "".
    • This is only used in situations where a card has multiple actions in the same phase (such as the Gollum, Dark as Darkness (9R+28) Shadow and Regroup actions). The user will be prompted with a choice for each one to select, and the text here will be in the prompt.


"effects": {
  "type": "activated",
  "phase": ["fellowship"],
  "condition": [
    {
      "type": "canSpot",
      "filter": "elf",
      "count": 1
    }
  ],
  "cost": [
    {
      "type": "exert",
      "filter": "self"
    }
  ],
  "effect": [
    {
      "type": "heal",
      "filter": "choose(culture(elven),ally)"
    }
  ],
  "limitPerPhase": 1,
  "limitPerTurn": 2,
  "text": "Spot an elf and exert this to heal an [elven] ally."
}


activatedindiscard

Same as activated above, except the ability is available while the card is in the discard pile. Typically this effect is used to play the card itself, but this is only a convention.

Parameters:

  • phase
    • Required.
    • Array of one or more Phase strings representing which phase(s) the ability can be activated in.
  • condition
    • Optional.
    • Array of one or more Condition definitions further restricting when the ability can be used ("Spot an Elf to...").
  • cost
    • Required, unless effect is defined.
    • Array of one or more Cost definitions.
  • effect
    • Required, unless cost is defined.
    • Array of one or more Effect definitions.
  • limitPerPhase
    • Optional.
    • Integer. Defaults to 0 (meaning no limit).
    • Limits how many times per phase the action can be invoked.
  • limitPerTurn
    • Optional.
    • Integer. Defaults to 0 (meaning no limit).
    • Limits how many times per turn the action can be invoked.
  • text
    • Optional.
    • String. Defaults to "".
    • This is only used in situations where a card has multiple actions in the same phase (such as the Gollum, Dark as Darkness (9R+28) Shadow and Regroup actions). The user will be prompted with a choice for each one to select, and the text here will be in the prompt.


"effects": {
  "type": "activatedindiscard",
  "phase": ["fellowship"],
  "condition": [
    {
      "type": "canSpot",
      "filter": "elf",
      "count": 1
    }
  ],
  "cost": [
    {
      "type": "exert",
      "filter": "self"
    }
  ],
  "effect": [
    {
      "type": "heal",
      "filter": "choose(culture(elven),ally)"
    }
  ],
  "limitPerPhase": 1,
  "limitPerTurn": 2,
  "text": "Spot an elf and exert this to heal an [elven] ally."
}

activatedtrigger

Used to represent Response actions where the timing is based on a trigger, yet the player has to choose to manually activate it as many times as they like as a response. Typically this will often result in something similar to a "Each time" trigger, especially if the effect self-discards or otherwise restricts itself to one activation.

Parameters:

  • trigger
    • Required.
    • Array of one or more Trigger definitions
  • condition
    • Optional.
    • Array of one or more Condition definitions restricting when the response ability can be used ("Spot an Elf to...").
  • cost
    • Required, unless effect is defined.
    • Array of one or more Cost definitions.
  • effect
    • Required, unless cost is defined.
    • Array of one or more Effect definitions.


"effects": {
  "type": "trigger",
  "trigger": {
    "type": "winsSkirmish",
    "filter": "nazgul",
    "against": "hobbit",
    "memorize": "winner",
    "memorizeInvolving": "theHobbit"
  },
  "optional": true,
  "condition": [
    {
      "type": "canSpot",
      "filter": "elf",
      "count": 1
    }
  ],
  "cost": [
    {
      "type": "exert",
      "filter": "memory(winner)"
    }
  ],
  "effect": [
    {
      "type": "wound",
      "filter": "choose(culture(elven),ally)"
    }
  ],
}

aidcost

Used exclusively by Followers with the Aid keyword to store the cost of transferring that Follower to a Companion during the Maneuver phase.

Parameters:

  • cost
    • Required
    • Array of one or more Cost definitions that must be paid for the Follower to be transferred.


"effects": {
  "type": "aidcost",
  "cost": [
    {
      "type": "exert",
      "filter": "choose(companion)"
    }
  ],
}

copycard

Used when one card is copying the game text of another, such as Silinde, Elf of Mirkwood (1U60) .

Parameters:

  • filter
    • Required
    • String of a Filter definition for the card to copy.


"effects": {
  "type": "copycard",
  "filter": "your,site,siteNumber(3),siteBlock(fellowship)"
}

discardedfromplaytrigger

Used if a card is to self-trigger based on itself being discarded. If your card needs to trigger based on another card being discarded, make a standard trigger with a type of "discarded" or "aboutToDiscard".

Parameters:

  • optional
    • Optional.
    • Boolean true/false value indicating whether the player is allowed to decline (usually represented in game text as "you may"). If false, the action is mandatory and cannot be passed. Default: false.
  • condition
    • Optional.
    • Array of one or more Condition definitions restricting when the response ability can be used ("Spot an Elf to...").
  • cost
    • Required, unless effect is defined.
    • Array of one or more Cost definitions.
  • effect
    • Required, unless cost is defined.
    • Array of one or more Effect definitions.


"effects": {
  "type": "discardedfromplaytrigger",
  "optional": true,
  "condition": [
    {
      "type": "canSpot",
      "filter": "elf",
      "count": 1
    }
  ],
  "cost": [
    {
      "type": "exert",
      "filter": "memory(winner)"
    }
  ],
  "effect": [
    {
      "type": "wound",
      "filter": "choose(culture(elven),ally)"
    }
  ],
}

discount

A mostly-disused effect type that was developed for the aborted Second Edition cards. The effect defines a one-time discount which is performed based on actions taken, similar to Toil but with broader effects. This effect type is designed in such a way that multiple kinds of discount actions might be defined, but only one was ever completed.

Parameters:

  • amount
    • Required.
    • Value definition that defines the maximum discount that might be applied (if the card's cost - the maximum discount is greater than the current twilight pool, the card of course cannot be played).
  • discount
    • Required.
    • String switch used to define different types of discounts. Must be one of the following values:
      • discardFromHand (case-sensitive).
  • filter
    • Required for discardFromHand discount types.
    • String of a Filter definition for which types of card may be discarded from hand to discount the card. Defaults to "any".


"effects": {
  "type": "discount",
  "amount": {
    "type": "forEachInHand",
    "filter": "culture(moria),goblin"
  },
  "discount": {
    "type": "discardFromHand",
    "filter": "culture(moria),goblin"
  }
}

event

extracost

extrapossessionclass

inhandtrigger

killedtrigger

modifier

modifyowncost

playedinotherphase

responseevent

trigger

Used to represent arbitrary triggers, usually game text in the form of "When" or "Each Time". These actions respond to specific types of game effects, and so their timing is quite variable.

Parameters:

  • trigger
    • Required.
    • Array of one or more Trigger definitions
  • optional
    • Optional.
    • Boolean true/false value indicating whether the player is allowed to decline (usually represented in game text as "you may"). If false, the action is mandatory and cannot be passed. Default: false.
  • condition
    • Optional.
    • Array of one or more Condition definitions.
  • cost
    • Required, unless effect is defined.
    • Array of one or more Cost definitions.
  • effect
    • Required, unless cost is defined.
    • Array of one or more Effect definitions.
  • text
    • Optional.
    • String. Defaults to "".
    • This is only used in situations where a card has multiple triggers keying off of the same stimulus. The user will be prompted with a choice for which one to select, and the text here will be in the prompt.


"effects": {
  "type": "trigger",
  "trigger": {
    "type": "winsSkirmish",
    "filter": "nazgul",
    "against": "hobbit",
    "memorize": "winner",
    "memorizeInvolving": "theHobbit"
  },
  "optional": true,
  "condition": [
    {
      "type": "canSpot",
      "filter": "elf",
      "count": 1
    }
  ],
  "cost": [
    {
      "type": "exert",
      "filter": "memory(winner)"
    }
  ],
  "effect": [
    {
      "type": "wound",
      "filter": "choose(culture(elven),ally)"
    }
  ],
  "text": "Exert the winning Nazgul to wound an [elven] ally?"
}