diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
commit | 6352e8e3196f78388b6c771073f9e03eaa612673 (patch) | |
tree | e23772f79a7fbc41bc9108951e9e136857484bf4 /doc/lua/statuseffect.md | |
parent | 6741a057e5639280d85d0f88ba26f000baa58f61 (diff) |
everything everywhere
all at once
Diffstat (limited to 'doc/lua/statuseffect.md')
-rw-r--r-- | doc/lua/statuseffect.md | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/doc/lua/statuseffect.md b/doc/lua/statuseffect.md new file mode 100644 index 0000000..930bed2 --- /dev/null +++ b/doc/lua/statuseffect.md @@ -0,0 +1,69 @@ +# effect + +The `effect` table relates to functions specifically for status effects. + +--- + +#### `float` effect.duration() + +Returns the remaining duration of the status effect. + +--- + +#### `void` effect.modifyDuration(`float` duration) + +Adds the specified duration to the current remaining duration. + +--- + +#### `void` effect.expire() + +Immediately expire the effect, setting the duration to 0. + +--- + +#### `EntityId` effect.sourceEntity() + +Returns the source entity id of the status effect, if any. + +--- + +#### `void` effect.setParentDirectives(`String` directives) + +Sets image processing directives for the entity the status effect is active on. + +--- + +#### `Json` effect.getParameter(`String` name, `Json` def) + +Returns the value associated with the parameter name in the effect configuration. If no value is set, returns the default specified. + +--- + +#### `StatModifierGroupId` effect.addStatModifierGroup(`List<StatModifier>` modifiers) + +Adds a new stat modifier group and returns the ID created for the group. Stat modifier groups will stay active until the effect expires. + +Stat modifiers are of the format: + +```lua +{ + stat = "health", + + amount = 50 + --OR baseMultiplier = 1.5 + --OR effectiveMultiplier = 1.5 +} +``` + +--- + +#### `void` effect.setStatModifierGroup(`StatModifierGroupId`, groupId, `List<StatModifier>` modifiers) + +Replaces the list of stat modifiers in a group with the specified modifiers. + +--- + +#### `void` effect.removeStatModifierGroup(`StatModifierGroupId` groupId) + +Removes the specified stat modifier group. |