-
Notifications
You must be signed in to change notification settings - Fork 0
Designer: Designing Abilities
To but it shortly, Abilities are "moves" that CombatEntities can use during combat. An Ability deals 0 or more damage, consumes an arbitrary number of Resources, and applies an arbitrary number of CombatEffects to its target.
| Field Name | Field Type | Description | Value Restrictions |
|---|---|---|---|
| name | str | The name of the Ability. This is the lookup ID for the Ability |
No two Abilities may share a name |
| description | str | A flavorful description of what the Ability does |
None |
| on_use | str | A message that is printed during combat when the Ability is used |
None |
| target_mode | str | The desired targeting mode for the Ability
|
See here for more on TargetMode
|
| damage | int | How much the Ability should decrement the primary resource of the target(s) |
Must be >=0 |
| Field Name | Field Type | Description | Value Restrictions |
|---|---|---|---|
| effects | dict | A JSON object mapping lists of CombatEffects to a CombatPhase
|
See here for structure info |
| requirements | list | A list of Requirements. Each Requirement must be met for the Ability to be used |
See here for more on Requirements |
| costs | dict | A JSON object mapping Resource names to costs |
Each cost may be a float or an int. For more on Ability costs, see here |
| tags | list | A set of arbitrary tags used to determine the "type" of the Ability. | Any str is valid |
Like some other JSON strings, Abilities offer some special formatting cues for on_use. A "static" on_use value might look like:
"on_use": "A move was used"
You can insert a {wielder} shortcut and TXEngine will automatically replace that with the name of whatever CombatEntity used the Ability!
"on_use": "{wielder} used an Ability!"
CombatEffects print a statement when they trigger. You can reference the name of the CombatEffect's target in its trigger_message with the shortcut {target}.
For example:
"trigger_message": "{target} restored stamina."
"trigger_message": "{target} was burned and lost health!"