-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdifficulty.lua
83 lines (73 loc) · 3.29 KB
/
difficulty.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---@meta _
--- A `Difficulty` is a setting you can pick before starting a new game.
---
---@class Difficulty
---@field displayName string The difficulty's display name
---@field icon Sprite The icon sprite used by the difficulty
---@field scale number The scaling used by the difficulty, to get harder over time. *this is applied every minute*
---@field scaleOnline number Same as scale. *only for online use*
---@field description string The description of the difficulty. Displayed when hovered over on survivor selection screen
---@field enableMissileIndicators boolean whether missiles will have a drawn circle over their target
---@field forceHardElites boolean whether forces elites to spawn
---@field enableBlightedEnemies boolean whether blighted enemies will be able to spawn
---
---@overload fun(name: string): Difficulty
Difficulty = {}
--- Creates a new difficulty.
---
--- # Example
--- Create a new difficulty called `Drought`.
--- ```lua
--- local droughtDiff = Difficulty.new("Drought")
--- ```
---
---@param name string The name to give the difficulty within the current namespace
---@return Difficulty
function Difficulty.new(name) end
--- Executes a [namespace search](https://saturnyoshi.gitlab.io/RoRML-Docs/misc/contextSearch.html) to find an existing Item.
---
--- See the page on [namespace searching](https://saturnyoshi.gitlab.io/RoRML-Docs/misc/contextSearch.html#context-find) for more information.
---
---@param name string
---@param namespace? Namespace
---@return Difficulty
function Difficulty.find(name, namespace) end
--- Executes a [namespace search](https://saturnyoshi.gitlab.io/RoRML-Docs/misc/contextSearch.html) to find an existing Item.
---
--- See the page on [namespace searching](https://saturnyoshi.gitlab.io/RoRML-Docs/misc/contextSearch.html#context-find-all) for more information.
---
---@param namespace? Namespace
---@return Difficulty[]
function Difficulty.findAll(namespace) end
---@alias DifficultyScaleKind
---| 'hp' Used to scale actors' base HP over time
---| 'damage' Used to scale actors' base damage over time
---| 'cost' Used to increase chests and other interactables' cost over time
--- Returns one of the game's different stat multipliers described below.
--- These are used to increase difficulty as time goes on.
---
---@param kind? DifficultyScaleKind The stat to get the multiplier for
---@return number '' The multiplier used for the given stat
function Difficulty.getScaling(kind) end
--- Gets the currently active difficulty
---
---@return Difficulty '' The current difficulty
function Difficulty.getActive() end
--- Sets the game's current difficulty to the given one
---
--- # Example
--- Set the game's difficulty to `droughtDiff`.
--- ```lua
--- Difficulty.setActive(droughtDiff)
--- ```
---
---@param diff Difficulty The difficulty to set as active
function Difficulty.setActive(diff) end
--- See the page on [namespace searching](https://saturnyoshi.gitlab.io/RoRML-Docs/misc/contextSearch.html#context-name) for more information.
---
---@return string '' The name of the difficulty
function Difficulty:getName() end
--- See the page on [namespace searching](https://saturnyoshi.gitlab.io/RoRML-Docs/misc/contextSearch.html#context-origin) for more information.
---
---@return Namespace '' The namespace containing the difficulty
function Difficulty:getOrigin() end