Module LevelSequence¶
local LevelSequence = require "necro.game.level.LevelSequence"
Classes¶
LevelSequence¶
| Type | Field | Description |
|---|---|---|
| LevelGenerator.Options | options |
Common options that apply to each level in this sequence |
| LevelGenerator.Options[] | sequence |
Per-level options that are merged into the common options when generating |
Event.LevelSequenceUpdate¶
| Type | Field | Description |
|---|---|---|
| LevelGenerator.Options | options |
Output: common options that apply to each level in this sequence |
| LevelGenerator.Options[] | sequence |
Output: list of generation parameters to use for each level in this run |
| GameSession.Mode.Data | mode |
Game session mode data |
| GameSession.Mode | modeID |
Game session mode ID |
| RunState | runState |
Current state of the run at the time the sequence is generated |
| integer | offset |
The number of levels that have already been completed prior to this level sequence (default 0) |
| table | rng |
RNG channel, initialized by the dungeon seed and sequence offset |
| PlayableCharacter.ID | characterBitmask |
Bitmask of active playable character IDs / generation traits |
Enumerations¶
LevelSequence.Zone¶
| Key | Value | Description |
|---|---|---|
LevelSequence.Zone.ZONE_1 |
1 | |
LevelSequence.Zone.ZONE_2 |
2 | |
LevelSequence.Zone.ZONE_3 |
3 | |
LevelSequence.Zone.ZONE_4 |
4 | |
LevelSequence.Zone.ZONE_5 |
5 |
Functions¶
LevelSequence.getZoneCount()¶
LevelSequence.getDefaultZoneList()¶
LevelSequence.getLength()¶
LevelSequence.getLoopID()¶
LevelSequence.generate(args): LevelSequence¶
Initializes/updates the level sequence based on the specified parameters.
Parameters
| Type | Name | Description |
|---|---|---|
| Event.LevelSequenceUpdate | args | Parameters using which to generate the level sequence |
LevelSequence.reset()¶
Fully clears the current level sequence
LevelSequence.update(args)¶
Initializes and uploads the level sequence based on the specified parameters.
Parameters
| Type | Name | Description |
|---|---|---|
| Event.LevelSequenceUpdate | args | Parameters using which to generate the level sequence |
LevelSequence.get(index): LevelGenerator.Options¶
Retrieves the level sequence entry at the specified index
Parameters
| Type | Name | Description |
|---|---|---|
| integer | index | Level number to get the generation parameters for |