Skip to content

Commit

Permalink
Merge branch 'clarify-activeeffects' into 'master'
Browse files Browse the repository at this point in the history
Update activeeffects docs

See merge request OpenMW/openmw!4340
  • Loading branch information
psi29a committed Aug 26, 2024
2 parents 50465a3 + e9b4efd commit 070a72e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions files/lua_api/openmw/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
-- print('No Telekinesis effect')
-- end
-- @usage -- Check for a specific effect targeting a specific attribute.
-- local effect = Actor.activeEffects(self):getEffect(core.magic.EFFECT_TYPE.FortifyAttribute, core.ATTRIBUTE.Luck)
-- local effect = Actor.activeEffects(self):getEffect(core.magic.EFFECT_TYPE.FortifyAttribute, 'luck')
-- if effect.magnitude ~= 0 then
-- print(effect.id..', attribute='..tostring(effect.affectedAttribute)..', skill='..tostring(effect.affectedSkill)..', magnitude='..tostring(effect.magnitude))
-- else
Expand All @@ -244,17 +244,18 @@
-- @param #string effectId effect ID
-- @param #string extraParam Optional skill or attribute ID

---
-- Permanently modifies the magnitude of an active effect to be exactly equal to the provided value. This adds the effect to the list of active effects if not already active.
--- (Note that using this function will override and conflict with all other sources of this effect, you probably want to use @{#ActorActiveEffects.modify} instead, this function is provided for mwscript parity only)
-- Permanently modifies the magnitude of an active effect to be exactly equal to the provided value.
-- Note that although the modification is permanent, the magnitude will not stay equal to the value if any active spells with this effects are added/removed.
-- Also see the notes on @{#ActorActiveEffects.modify}
-- @function [parent=#ActorActiveEffects] set
-- @param self
-- @param #number value
-- @param #string effectId effect ID
-- @param #string extraParam Optional skill or attribute ID

---
-- Permanently modifies the magnitude of an active effect by increasing it by the provided value. This adds the effect to the list of active effects if not already active.
-- Permanently modifies the magnitude of an active effect by modifying it by the provided value. Note that some active effect values, such as fortify attribute effects, have no practical effect of their own, and must be paired with explicitly modifying the target stat to have any effect.
-- @function [parent=#ActorActiveEffects] modify
-- @param self
-- @param #number value
Expand Down

0 comments on commit 070a72e

Please sign in to comment.