Functions for working with traits.
Currently only the player can have traits.
local Trait = ELONA.require("core.Trait")
level (trait_id) | Obtains the player's level in a trait. |
min (trait_id) | Obtains the minimum possible level of a trait. |
max (trait_id) | Obtains the maximum possible level of a trait. |
set (trait_id, level) | Sets the level of a trait, bounded within its min and max. |
modify (trait_id, delta) | Modifies the level of a trait, bounded within its min and max. |
Obtains the player's level in a trait.
It may be negative if the trait is harmful.
Parameters:Obtains the minimum possible level of a trait.
Parameters:
Obtains the maximum possible level of a trait.
Parameters:
Sets the level of a trait, bounded within its min and max.
Parameters:
Modifies the level of a trait, bounded within its min and max.
Parameters: