Major events update
GameState:doneEvent is updated to allow incrementing the used count (which is returned), and it is automatically called for events that are placed or assigned to a level, allowing event code to check the count correctly.
GameState:startEvents() updated:
The zone events file supports some new fields:
unique = true prevents triggering of events that have previously been triggered (anywhere in the game)
level_range = a range of allowed levels the event is allowed to spawn on (complements the forbid field)
special = an optional function(lev) that can determine if the event should spawn or not (The logic is updated to be consistent with other "special" functions used in filters, etc.)
Fixed a bug in passing event_id to event functions (metatables).
Added documentation and output to the relevant GameState functions.
Fixed issues with major events that involve a change of zone (sub-vault, rat-lich, damp-cave, old-battle-field, drake-cave, naga-portal, fearscape-portal):
.no_worldport is set to that of the parent zone.
Actor levels are 5% to 15% higher than the parent zone and game difficulty adjustments are not compounded.
Object material levels match the parent zone.
Auto explore and minimap settings are updated.
This makes these events "safe" to add anywhere in the game and at higher difficulties, and they are added as standard to the I.D. (with appropriate level restrictions).
Fixed a bug in game:changeLevelReal that was causing the player to incorrectly be placed at level start when params.auto_level_stair was set. (Affected the old-battle-field event and some other stairs)
Other event changes:
The player can choose to ignore the naga-portal and fearscape-portal by hitting escape at the pop-up.
The cultists event uniqueness is fixed (unique across the game) and it can only spawn from level 15+ in the I.D.
Fixed a bug in the sub-vault event that was preventing the stairs from crumbling as intended.
Updated the sludgenest and noxious-caldera events for the wilderness and the conclave-vault event for the halfling ruins. (No game play change; the special field is removed as it's not needed.)