Editing GEMP/Tech Doc/Effect Types

From LOTR-TCG Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 2: Line 2:


The definitions for json hooks are located within '''/gemp-lotr-logic/'''src/main/java/com/gempukku/lotro/cards/build/field/'''EffectFieldProcessor.java'''
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.
__TOC__




==activated==
==activated==
Standard special abilities, usually indicated by bold text such as '''Skirmish:'''. See {{Card|Gimli, Son of Gloin}}.
Standard special abilities, usually indicated by bold text such as '''Skirmish:'''.  


''Parameters'':  
''Parameters'':  
* '''phase'''
* phase
** '''Required.'''  
** '''Required.'''  
** Array of one or more [[GEMP/Tech Doc/Phases|Phase]] strings representing which phase(s) the ability can be activated in.
** Array of one or more [[GEMP/Tech Doc/Phases|Phase]] strings
* '''condition'''
* condition
** ''Optional.''  
** ''Optional.''  
** Array of one or more [[GEMP/Tech Doc/Conditions|Condition]] definitions further restricting when the ability can be used ("Spot an Elf to...").
** Array of one or more [[GEMP/Tech Doc/Conditions|Condition]] definitions.
* '''cost'''
* cost
** '''Required''', ''unless '''effect''' is defined.''  
** ''Optional, if '''effect''' is defined.''  
** Array of one or more [[GEMP/Tech Doc/Costs|Cost]] definitions.
** Array of one or more [[GEMP/Tech Doc/Costs|Cost]] definitions.
* '''effect'''
* effect
** '''Required''', ''unless '''cost''' is defined.''  
** ''Optional, if '''cost''' is defined.''  
** Array of one or more [[GEMP/Tech Doc/Effects|Effect]] definitions.
** Array of one or more [[GEMP/Tech Doc/Effects|Effect]] definitions.
* '''limitPerPhase'''
* limitPerPhase
** ''Optional.''   
** ''Optional.''   
** Integer. Defaults to 0 (meaning no limit).  
** Integer. Defaults to 0 (meaning no limit).  
** Limits how many times per phase the action can be invoked.
** Limits how many times per phase the action can be invoked.
* '''limitPerTurn'''
* limitPerTurn
** ''Optional.''   
** ''Optional.''   
** Integer. Defaults to 0 (meaning no limit).   
** Integer. Defaults to 0 (meaning no limit).   
** Limits how many times per turn the action can be invoked.
** Limits how many times per turn the action can be invoked.
* '''text'''
* text
** ''Optional.''   
** ''Optional.''   
** String. Defaults to "".   
** String. Defaults to "".   
Line 69: Line 65:


==activatedindiscard==
==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.  See {{Card|Ordnance Grunt}}.
''Parameters'':
* '''phase'''
** '''Required.'''
** Array of one or more [[GEMP/Tech Doc/Phases|Phase]] strings representing which phase(s) the ability can be activated in.
* '''condition'''
** ''Optional.''
** Array of one or more [[GEMP/Tech Doc/Conditions|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 [[GEMP/Tech Doc/Costs|Cost]] definitions.
* '''effect'''
** '''Required''', ''unless '''cost''' is defined.''
** Array of one or more [[GEMP/Tech Doc/Effects|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 {{Card|Gollum, Dark as Darkness}} 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.
<syntaxhighlight lang="json" line>
"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."
}
</syntaxhighlight>
==activatedtrigger==
==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, but not always.  See {{Card|The Pale Blade}}.
''Parameters'':
* '''trigger'''
** '''Required.'''
** Array of one or more [[GEMP/Tech Doc/Trigger|Trigger]] definitions
* '''condition'''
** ''Optional.''
** Array of one or more [[GEMP/Tech Doc/Conditions|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 [[GEMP/Tech Doc/Costs|Cost]] definitions.
* '''effect'''
** '''Required''', ''unless '''cost''' is defined.''
** Array of one or more [[GEMP/Tech Doc/Effects|Effect]] definitions.
<syntaxhighlight lang="json" line>
"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)"
    }
  ],
}
</syntaxhighlight>
==aidcost==
==aidcost==
Used exclusively by Followers with the Aid keyword to store the cost of transferring that Follower to a Companion during the Maneuver phase.  See {{Card|Celebring, Elven-smith}}.
''Parameters'':
* '''cost'''
** '''Required'''
** Array of one or more [[GEMP/Tech Doc/Costs|Cost]] definitions that must be paid for the Follower to be transferred.
<syntaxhighlight lang="json" line>
"effects": {
  "type": "aidcost",
  "cost": [
    {
      "type": "exert",
      "filter": "choose(companion)"
    }
  ],
}
</syntaxhighlight>
==copycard==
==copycard==
Used when one card is copying the game text of another, such as {{Card|Silinde}}.
''Parameters'':
* '''filter'''
** '''Required'''
** String of a [[GEMP/Tech Doc/Filters|Filter]] definition for the card to copy.
<syntaxhighlight lang="json" line>
"effects": {
  "type": "copycard",
  "filter": "your,site,siteNumber(3),siteBlock(fellowship)"
}
</syntaxhighlight>
==discardedfromplaytrigger==
==discardedfromplaytrigger==
Used if a card is to self-trigger based on itself being discarded.  This also triggers upon being killed, if the card in question is a minion (allies and companions of course go to the Dead Pile, and do not trigger this).  If your card needs to trigger based on another card being discarded, make a standard trigger with a type of "discarded" or "aboutToDiscard".  See {{Card|Orc Footman}}.
''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 [[GEMP/Tech Doc/Conditions|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 [[GEMP/Tech Doc/Costs|Cost]] definitions.
* '''effect'''
** '''Required''', ''unless '''cost''' is defined.''
** Array of one or more [[GEMP/Tech Doc/Effects|Effect]] definitions.
<syntaxhighlight lang="json" line>
"effects": {
  "type": "discardedfromplaytrigger",
  "optional": true,
  "condition": [
    {
      "type": "canSpot",
      "filter": "elf",
      "count": 1
    }
  ],
  "cost": [
    {
      "type": "exert",
      "filter": "choose(minion)"
    }
  ],
  "effect": [
    {
      "type": "wound",
      "filter": "choose(culture(elven),ally)"
    }
  ],
}
</syntaxhighlight>
==discount==
==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.'''
** [[GEMP/Tech Doc/Value|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 [[GEMP/Tech Doc/Filters|Filter]] definition for which types of card may be discarded from hand to discount the card.  Defaults to "any".
<syntaxhighlight lang="json" line>
"effects": {
  "type": "discount",
  "amount": {
    "type": "forEachInHand",
    "filter": "culture(moria),goblin"
  },
  "discount": {
    "type": "discardFromHand",
    "filter": "culture(moria),goblin"
  }
}
</syntaxhighlight>
==event==
==event==
Used if the card in question is an event, and so should have this effect triggered immediately upon playing.  See {{Card|Defiance}}.
''Parameters'':
* '''cost'''
** '''Required''', ''unless '''effect''' is defined.''
** Array of one or more [[GEMP/Tech Doc/Costs|Cost]] definitions.
* '''effect'''
** '''Required''', ''unless '''cost''' is defined.''
** Array of one or more [[GEMP/Tech Doc/Effects|Effect]] definitions.
* '''requiresRanger'''
** ''Optional.''
** Boolean value that indicates whether this event spots or exerts a ranger. This is used to allow {{Card|Orc Scout}}, {{Card|Uruk Scout}}, and {{Card|Wraith of Harad}} to function.  Default "false".
<syntaxhighlight lang="json" line>
"effects": {
  "type": "event",
  "cost": [
    {
      "type": "exert",
      "filter": "ranger"
    }
  ],
  "effect": [
    {
      "type": "wound",
      "filter": "choose(minion)"
    }
  ],
  "requiresRanger": true
}
</syntaxhighlight>
==extracost==
==extracost==
Used in any situation where a card has a "To play" clause that does not involve passively spotting (in such cases, add a CanSpot condition to the top level of the card itself instead). See {{Card|Wizard Storm}}
''Parameters'':
* '''cost'''
** '''Required'''
** Array of one or more [[GEMP/Tech Doc/Costs|Cost]] definitions.
<syntaxhighlight lang="json" line>
"effects": {
  "type": "extracost",
  "cost": [
    {
      "type": "exert",
      "filter": "ranger"
    }
  ]
}
</syntaxhighlight>
==extrapossessionclass==
==extrapossessionclass==
Used for implementing "this possession may be borne in addition to 1 other hand weapon". See {{Card|Hand Axe}}
''Parameters'':
* '''attachedTo'''
** ''Optional''
** String of a [[GEMP/Tech Doc/Filters|Filter]] definition for which types of bearer can hold the extra item; if the bearer does not meet this filter then it must be the only item of that class held by the bearer.  Defaults to "any".
<syntaxhighlight lang="json" line>
"effects": {
  "type": "extrapossessionclass",
  "attachedTo": "any"
}
</syntaxhighlight>
==inhandtrigger==
==inhandtrigger==
Used if the card is not a response event and yet needs to be able to react to triggers in play as if it were one.  See {{Card|The Witch-king, Black Lord}}.
''Parameters'':
* '''trigger'''
** '''Required.'''
** Array of one or more [[GEMP/Tech Doc/Trigger|Trigger]] definitions that this card will react to while in hand.
* '''condition'''
** ''Optional.''
** Array of one or more [[GEMP/Tech Doc/Conditions|Condition]] definitions that must be met for this effect to trigger.
* '''cost'''
** '''Required''', ''unless '''effect''' is defined.''
** Array of one or more [[GEMP/Tech Doc/Costs|Cost]] definitions that must be fulfilled for the rest of the effect to be used.
* '''effect'''
** '''Required''', ''unless '''cost''' is defined.''
** Array of one or more [[GEMP/Tech Doc/Effects|Effect]] definitions.
<syntaxhighlight lang="json" line>
"effects": {
  "type": "inhandtrigger",
  "trigger": {
    "type": "winsSkirmish",
    "filter": "nazgul",
    "against": "hobbit",
    "memorize": "winner",
    "memorizeInvolving": "theHobbit"
  },
  "condition": [
    {
      "type": "canSpot",
      "filter": "elf",
      "count": 1
    }
  ],
  "cost": [
    {
      "type": "exert",
      "filter": "memory(winner)"
    }
  ],
  "effect": [
    {
      "type": "wound",
      "filter": "choose(culture(elven),ally)"
    }
  ],
}
</syntaxhighlight>
==killedtrigger==
==killedtrigger==
Used if a card is to self-trigger based on itself being killed.  If your card needs to trigger based on another card being discarded, make a standard trigger with a type of "killed" or "aboutToBeKilled".  See {{Card|Freca}}.
''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 [[GEMP/Tech Doc/Conditions|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 [[GEMP/Tech Doc/Costs|Cost]] definitions.
* '''effect'''
** '''Required''', ''unless '''cost''' is defined.''
** Array of one or more [[GEMP/Tech Doc/Effects|Effect]] definitions.
<syntaxhighlight lang="json" line>
"effects": {
  "type": "killedtrigger",
  "optional": true,
  "condition": [
    {
      "type": "canSpot",
      "filter": "elf",
      "count": 1
    }
  ],
  "cost": [
    {
      "type": "exert",
      "filter": "choose(minion)"
    }
  ],
  "effect": [
    {
      "type": "wound",
      "filter": "choose(culture(elven),ally)"
    }
  ],
}
</syntaxhighlight>
==modifier==
==modifier==
==modifyowncost==
==modifyowncost==
Line 476: Line 80:
==responseevent==
==responseevent==
==trigger==
==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. See {{Card|The Witch-king, Lord of the Nazgul}}.
''Parameters'':
* '''trigger'''
** '''Required.'''
** Array of one or more [[GEMP/Tech Doc/Trigger|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 [[GEMP/Tech Doc/Conditions|Condition]] definitions.
* '''cost'''
** '''Required''', ''unless '''effect''' is defined.''
** Array of one or more [[GEMP/Tech Doc/Costs|Cost]] definitions.
* '''effect'''
** '''Required''', ''unless '''cost''' is defined.''
** Array of one or more [[GEMP/Tech Doc/Effects|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.
<syntaxhighlight lang="json" line>
"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?"
}
</syntaxhighlight>
Please note that all contributions to the LOTR-TCG Wiki may be edited, altered, or removed by other contributors. Your writing is liable to be edited mercilessly, so be sure to back up any major claims with links if possible.

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)