Show raw api
{
"functions": [
{
"name": "check",
"desc": "Return true if the modifier was added and false otherwise",
"params": [
{
"name": "id",
"desc": "modifier identifier",
"lua_type": "string"
}
],
"returns": [
{
"desc": "true if specified modifier is set",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 22,
"path": "../../res/data/script/lib/system/modifier.lua"
}
},
{
"name": "add",
"desc": "Add the given modifier",
"params": [
{
"name": "id",
"desc": "modifier identifier",
"lua_type": "string"
}
],
"returns": [
{
"desc": "true if the modifier was not added before",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 32,
"path": "../../res/data/script/lib/system/modifier.lua"
}
},
{
"name": "remove",
"desc": "Remove the given modifier",
"params": [
{
"name": "id",
"desc": "modifier identifier",
"lua_type": "string"
}
],
"returns": [
{
"desc": "true if an modifier was removed",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 42,
"path": "../../res/data/script/lib/system/modifier.lua"
}
},
{
"name": "clear",
"desc": "Clear all modifiers",
"params": [],
"returns": [],
"function_type": "static",
"source": {
"line": 50,
"path": "../../res/data/script/lib/system/modifier.lua"
}
}
],
"properties": [],
"types": [],
"name": "Modifier",
"desc": "The modifier interface\n\nThis is for special game modifiers that change specific mechanics.\n\n```lua\nModifier.add(\"FogOfWar\")\nif Modifier.check(\"FogOfWar\") then\n Modifier.remove(\"FogOfWar\")\nend\n```",
"source": {
"line": 14,
"path": "../../res/data/script/lib/system/modifier.lua"
}
}