From ae5241ff7c486c3a3653ba99fdfe725dd198868d Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:26:03 +0200 Subject: [PATCH] update doc, also not sure why i had to make the change in the `parse_source.py` but it was giving me a weird error --- docs/game_data/spel2.lua | 203 +++++++++++++++++++++++-------- docs/parse_source.py | 4 +- docs/src/includes/_enums.md | 38 ++++++ docs/src/includes/_types.md | 230 +++++++++++++++++++++++++++++++++--- 4 files changed, 408 insertions(+), 67 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index f9f06777c..869dcc6d4 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -2034,51 +2034,6 @@ do ---@field local_player_slot integer ---@field get_code fun(self): string @Gets the string equivalent of the code ----@class LogicList - ---@field olmec_cutscene LogicOlmecCutscene - ---@field tiamat_cutscene LogicTiamatCutscene - ---@field magmaman_spawn LogicMagmamanSpawn - ---@field diceshop LogicDiceShop - ----@class Logic - ---@field logic_index integer - ----@class LogicOlmecCutscene : Logic - ---@field olmec Entity - ---@field player Entity - ---@field cinematic_anchor Entity - ---@field timer integer - ----@class LogicTiamatCutscene : Logic - ---@field tiamat Entity - ---@field player Entity - ---@field cinematic_anchor Entity - ---@field timer integer - ----@class MagmamanSpawnPosition - ---@field x integer - ---@field y integer - ---@field timer integer - ----@class LogicVolcana : Logic - ---@field magmaman_positions custom_Array - ----@class LogicDiceShop : Logic - ---@field bet_machine integer - ---@field die1 integer - ---@field die2 integer - ---@field die_1_value integer - ---@field die_2_value integer - ---@field prize_dispenser integer - ---@field prize integer - ---@field forcefield integer - ---@field bet_active boolean - ---@field forcefield_deactivated boolean - ---@field boss_angry boolean - ---@field result_announcement_timer integer - ---@field won_prizes_count integer - ---@field balance integer - ---@class RoomOwnersInfo ---@field owned_items custom_map @key/index is the uid of an item ---@field owned_rooms RoomOwnerDetails[] @@ -5922,6 +5877,152 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field player_create_giblets boolean[] @size: MAX_PLAYERS ---@field next_sidepanel_slidein_timer number +---@class LogicList + ---@field tutorial LogicTutorial @Handles dropping of the torch and rope in intro routine (first time play) + ---@field ouroboros LogicOuroboros + ---@field basecamp_speedrun LogicBasecampSpeedrun @Keep track of time, player position passing official + ---@field ghost_trigger Logic @It's absence is the only reason why ghost doesn't spawn at boss levels or CO + ---@field ghost_toast_trigger LogicGhostToast + ---@field tun_aggro Logic @Spawns tun at the door at 30s mark + ---@field diceshop LogicDiceShop + ---@field tun_pre_challenge LogicTunPreChallenge + ---@field tun_moon_challenge LogicMoonChallenge + ---@field tun_star_challenge LogicStarChallenge + ---@field tun_sun_challenge LogicSunChallenge + ---@field magmaman_spawn LogicMagmamanSpawn + ---@field water_bubbles LogicUnderwaterBubbles @Only the bubbles that spawn from the floor
Even without it, entities moving in water still spawn bubbles + ---@field olmec_cutscene LogicOlmecCutscene + ---@field tiamat_cutscene LogicTiamatCutscene + ---@field apep_spawner LogicApepTrigger @Works only if the level has at least one room ROOM_TEMPLATE.APEP, and it still spawns apep at hardcoded positions + ---@field city_of_gold_ankh_sacrifice LogicCOGAnkhSacrifice @All it does is it runs transition to Duat after time delay (sets the state next theme etc. and state.items for proper player respawn) + ---@field duat_bosses_spawner Logic + ---@field bubbler LogicTiamatBubbles @Spawn rising bubbles at Tiamat (position hardcoded) + ---@field tusk_pleasure_palace LogicTuskPleasurePalace @Triggers aggro on everyone when non-high roller enters door + ---@field discovery_info Logic @black market, vlad, wet fur discovery, logic shows the toast + ---@field black_market Logic @Changes the camera bounds when you reach black market + ---@field jellyfish_trigger Logic + ---@field arena_1 LogicArena1 @Handles create spawns and more, is cleared as soon as the winner is decided (on last player alive) + ---@field arena_2 Logic + ---@field arena_3 Logic @Handles time end death + ---@field arena_alien_blast LogicArenaAlienBlast + ---@field arena_loose_bombs LogicArenaLooseBombs + ---@field start_logic any @[&lua](LogicList&l + +---@class Logic + ---@field logic_index LOGIC + +---@class LogicTutorial : Logic + ---@field pet_tutorial Entity + ---@field timer integer + +---@class LogicOuroboros : Logic + ---@field sound SoundMeta + ---@field timer integer + +---@class LogicBasecampSpeedrun : Logic + ---@field administrator integer @entity uid of the character that keeps the time + ---@field crate integer @entity uid. you must break this crate for the run to be valid, otherwise you're cheating + +---@class LogicGhostToast : Logic + ---@field toast_timer integer @ default 90 + +---@class LogicDiceShop : Logic + ---@field boss_uid integer + ---@field boss_type ENT_TYPE + ---@field bet_machine integer @entity uid + ---@field die1 integer @entity uid + ---@field die2 integer @entity uid + ---@field die_1_value integer + ---@field die_2_value integer + ---@field prize_dispenser integer @entity uid + ---@field prize integer @entity uid + ---@field forcefield integer @entity uid + ---@field bet_active boolean + ---@field forcefield_deactivated boolean + ---@field result_announcement_timer integer @the time the boss waits after your second die throw to announce the results + ---@field won_prizes_count integer + ---@field balance integer @cash balance of all the games + +---@class LogicTunPreChallenge : Logic + ---@field tun_uid integer + +---@class LogicChallenge : Logic + ---@field floor_challenge_entrance_uid integer + ---@field floor_challenge_waitroom_uid integer + ---@field challenge_active boolean + ---@field forcefield_countdown integer + +---@class LogicMoonChallenge : LogicChallenge + ---@field mattock_uid integer @entity uid + +---@class LogicStarChallenge : LogicChallenge + ---@field torches Entity[] + ---@field start_countdown integer + +---@class LogicSunChallenge : LogicChallenge + ---@field start_countdown integer + +---@class LogicMagmamanSpawn : Logic + ---@field magmaman_positions custom_Array +local LogicMagmamanSpawn = nil +---@param x integer +---@param y integer +---@return nil +function LogicMagmamanSpawn:add_spawn(x, y) end +---@param ms MagmamanSpawnPosition +---@return nil +function LogicMagmamanSpawn:add_spawn(ms) end +---@param x integer +---@param y integer +---@return nil +function LogicMagmamanSpawn:remove_spawn(x, y) end +---@param ms MagmamanSpawnPosition +---@return nil +function LogicMagmamanSpawn:remove_spawn(ms) end + +---@class LogicUnderwaterBubbles : Logic + +---@class LogicOlmecCutscene : Logic + ---@field fx_olmecpart_large Entity + ---@field olmec Entity + ---@field player Entity + ---@field cinematic_anchor Entity + ---@field timer integer + +---@class LogicTiamatCutscene : Logic + ---@field tiamat Entity + ---@field player Entity + ---@field cinematic_anchor Entity + ---@field timer integer + +---@class LogicApepTrigger : Logic + ---@field spawn_cooldown integer + ---@field cooling_down boolean + ---@field apep_journal_entry_logged boolean + +---@class LogicCOGAnkhSacrifice : Logic + ---@field timer integer + +---@class LogicTiamatBubbles : Logic + ---@field bubble_spawn_timer integer + +---@class LogicTuskPleasurePalace : Logic + ---@field locked_door integer + +---@class LogicArena1 : Logic + ---@field crate_spawn_timer integer + +---@class LogicArenaAlienBlast : Logic + ---@field timer integer + +---@class LogicArenaLooseBombs : Logic + ---@field timer integer + +---@class MagmamanSpawnPosition + ---@field x integer + ---@field y integer + ---@field timer integer + end --## Static class functions @@ -5960,12 +6061,6 @@ function Color:fuchsia() end function Color:purple() end --## Constructors - -MagmamanSpawnPosition = nil ----@param x_ integer ----@param y_ integer ----@return MagmamanSpawnPosition -function MagmamanSpawnPosition:new(x_, y_) end ---Create a new color - defaults to black ---@return Color function Color:new() end @@ -6084,6 +6179,12 @@ function Quad:new(_bottom_left_x, _bottom_left_y, _bottom_right_x, _bottom_right ---@return Quad function Quad:new(aabb) end +MagmamanSpawnPosition = nil +---@param x_ integer +---@param y_ integer +---@return MagmamanSpawnPosition +function MagmamanSpawnPosition:new(x_, y_) end + --## Enums diff --git a/docs/parse_source.py b/docs/parse_source.py index 8f00d989e..dbd0cec7c 100644 --- a/docs/parse_source.py +++ b/docs/parse_source.py @@ -104,6 +104,7 @@ "../src/game_api/script/usertypes/screen_arena_lua.cpp", "../src/game_api/script/usertypes/socket_lua.cpp", "../src/game_api/script/usertypes/steam_lua.cpp", + "../src/game_api/script/usertypes/logic_lua.cpp", ] vtable_api_files = [ "../src/game_api/script/usertypes/vtables_lua.cpp", @@ -891,7 +892,8 @@ def run_parse(): if not var: continue var = var.split(",") - vars.append({"name": var[0], "type": var[1]}) + if(len(var) > 1): + vars.append({"name": var[0], "type": var[1]}) enums.append({"name": name, "vars": vars}) data = open(file, "r").read() data = data.replace("\n", " ") diff --git a/docs/src/includes/_enums.md b/docs/src/includes/_enums.md index 0853597b3..a478b00a1 100644 --- a/docs/src/includes/_enums.md +++ b/docs/src/includes/_enums.md @@ -642,6 +642,44 @@ Name | Data | Description [COARSE_LAVA](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LIQUID_POOL.COARSE_LAVA) | 4 | [STAGNANT_LAVA](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LIQUID_POOL.STAGNANT_LAVA) | 5 | +## LOGIC + + +> Search script examples for [LOGIC](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC) + + + +Name | Data | Description +---- | ---- | ----------- +[TUTORIAL](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.TUTORIAL) | LOGIC::TUTORIAL | +[OUROBOROS](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.OUROBOROS) | LOGIC::OUROBOROS | +[SPEEDRUN](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.SPEEDRUN) | LOGIC::SPEEDRUN | +[GHOST](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.GHOST) | LOGIC::GHOST | +[GHOST_TOAST](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.GHOST_TOAST) | LOGIC::GHOST_TOAST | +[TUN_AGGRO](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.TUN_AGGRO) | LOGIC::TUN_AGGRO | +[DICESHOP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.DICESHOP) | LOGIC::DICESHOP | +[PRE_CHALLENGE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.PRE_CHALLENGE) | LOGIC::PRE_CHALLENGE | +[MOON_CHALLENGE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.MOON_CHALLENGE) | LOGIC::MOON_CHALLENGE | +[STAR_CHALLENGE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.STAR_CHALLENGE) | LOGIC::STAR_CHALLENGE | +[SUN_CHALLENGE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.SUN_CHALLENGE) | LOGIC::SUN_CHALLENGE | +[MAGMAN_SPAWN](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.MAGMAN_SPAWN) | LOGIC::MAGMAN_SPAWN | +[WATER_BUBBLES](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.WATER_BUBBLES) | LOGIC::WATER_BUBBLES | +[OLMEC_CUTSCENE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.OLMEC_CUTSCENE) | LOGIC::OLMEC_CUTSCENE | +[TIAMAT_CUTSCENE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.TIAMAT_CUTSCENE) | LOGIC::TIAMAT_CUTSCENE | +[APEP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.APEP) | LOGIC::APEP | +[COG_SACRIFICE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.COG_SACRIFICE) | LOGIC::COG_SACRIFICE | +[DUAT_BOSSES](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.DUAT_BOSSES) | LOGIC::DUAT_BOSSES | +[BUBBLER](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.BUBBLER) | LOGIC::BUBBLER | +[PLEASURE_PALACE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.PLEASURE_PALACE) | LOGIC::PLEASURE_PALACE | +[DISCOVERY_INFO](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.DISCOVERY_INFO) | LOGIC::DISCOVERY_INFO | +[BLACK_MARKET](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.BLACK_MARKET) | LOGIC::BLACK_MARKET | +[JELLYFISH](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.JELLYFISH) | LOGIC::JELLYFISH | +[ARENA_1](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.ARENA_1) | LOGIC::ARENA_1 | +[ARENA_2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.ARENA_2) | LOGIC::ARENA_2 | +[ARENA_3](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.ARENA_3) | LOGIC::ARENA_3 | +[ARENA_ALIEN_BLAST](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.ARENA_ALIEN_BLAST) | LOGIC::ARENA_ALIEN_BLAST | +[ARENA_LOOSE_BOMBS](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=LOGIC.ARENA_LOOSE_BOMBS) | LOGIC::ARENA_LOOSE_BOMBS | + ## MASK diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index e62cc7f36..b2fa9fccc 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -152,6 +152,36 @@ bool | [final_ghost](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=fi int | [breath_cooldown](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=breath_cooldown) | bool | [punish_ball](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=punish_ball) | +### LogicArena1 + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +int | [crate_spawn_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=crate_spawn_timer) | + +### LogicArenaAlienBlast + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +int | [timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=timer) | + +### LogicArenaLooseBombs + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +int | [timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=timer) | + ## Callback context types @@ -709,7 +739,7 @@ nil | [set_quad(Quad quad)](https://github.com/spelunky-fyi/overlunky/search?l=L ### MagmamanSpawnPosition -Used in [LogicList](#LogicList) +Used in [LogicMagmamanSpawn](#LogicMagmamanSpawn) Type | Name | Description ---- | ---- | ----------- @@ -1293,7 +1323,53 @@ Used in [LogicList](#LogicList) Type | Name | Description ---- | ---- | ----------- -int | [logic_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=logic_index) | +[LOGIC](#LOGIC) | [logic_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=logic_index) | + +### LogicApepTrigger + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +int | [spawn_cooldown](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=spawn_cooldown) | +bool | [cooling_down](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=cooling_down) | +bool | [apep_journal_entry_logged](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=apep_journal_entry_logged) | + +### LogicBasecampSpeedrun + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +int | [administrator](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=administrator) | entity uid of the character that keeps the time +int | [crate](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=crate) | entity uid. you must break this crate for the run to be valid, otherwise you're cheating + +### LogicCOGAnkhSacrifice + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +int | [timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=timer) | + +### LogicChallenge + +Used in [LogicMoonChallenge](#LogicMoonChallenge), [LogicStarChallenge](#LogicStarChallenge), [LogicSunChallenge](#LogicSunChallenge) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +int | [floor_challenge_entrance_uid](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=floor_challenge_entrance_uid) | +int | [floor_challenge_waitroom_uid](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=floor_challenge_waitroom_uid) | +bool | [challenge_active](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=challenge_active) | +int | [forcefield_countdown](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=forcefield_countdown) | ### LogicDiceShop @@ -1303,20 +1379,31 @@ Derived from [Logic](#Logic) Type | Name | Description ---- | ---- | ----------- -int | [bet_machine](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bet_machine) | -int | [die1](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=die1) | -int | [die2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=die2) | +int | [boss_uid](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=boss_uid) | +[ENT_TYPE](#ENT_TYPE) | [boss_type](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=boss_type) | +int | [bet_machine](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bet_machine) | entity uid +int | [die1](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=die1) | entity uid +int | [die2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=die2) | entity uid int | [die_1_value](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=die_1_value) | int | [die_2_value](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=die_2_value) | -int | [prize_dispenser](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=prize_dispenser) | -int | [prize](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=prize) | -int | [forcefield](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=forcefield) | +int | [prize_dispenser](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=prize_dispenser) | entity uid +int | [prize](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=prize) | entity uid +int | [forcefield](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=forcefield) | entity uid bool | [bet_active](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bet_active) | bool | [forcefield_deactivated](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=forcefield_deactivated) | -bool | [boss_angry](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=boss_angry) | -int | [result_announcement_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=result_announcement_timer) | +int | [result_announcement_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=result_announcement_timer) | the time the boss waits after your second die throw to announce the results int | [won_prizes_count](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=won_prizes_count) | -int | [balance](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=balance) | +int | [balance](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=balance) | cash balance of all the games + +### LogicGhostToast + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +int | [toast_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=toast_timer) | default 90 ### LogicList @@ -1324,10 +1411,59 @@ Used in [StateMemory](#StateMemory) Type | Name | Description ---- | ---- | ----------- +[LogicTutorial](#LogicTutorial) | [tutorial](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tutorial) | Handles dropping of the torch and rope in intro routine (first time play) +[LogicOuroboros](#LogicOuroboros) | [ouroboros](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ouroboros) | +[LogicBasecampSpeedrun](#LogicBasecampSpeedrun) | [basecamp_speedrun](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=basecamp_speedrun) | Keep track of time, player position passing official +[Logic](#Logic) | [ghost_trigger](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ghost_trigger) | It's absence is the only reason why ghost doesn't spawn at boss levels or CO +[LogicGhostToast](#LogicGhostToast) | [ghost_toast_trigger](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ghost_toast_trigger) | +[Logic](#Logic) | [tun_aggro](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tun_aggro) | Spawns tun at the door at 30s mark +[LogicDiceShop](#LogicDiceShop) | [diceshop](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=diceshop) | +[LogicTunPreChallenge](#LogicTunPreChallenge) | [tun_pre_challenge](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tun_pre_challenge) | +[LogicMoonChallenge](#LogicMoonChallenge) | [tun_moon_challenge](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tun_moon_challenge) | +[LogicStarChallenge](#LogicStarChallenge) | [tun_star_challenge](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tun_star_challenge) | +[LogicSunChallenge](#LogicSunChallenge) | [tun_sun_challenge](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tun_sun_challenge) | +[LogicMagmamanSpawn](#LogicMagmamanSpawn) | [magmaman_spawn](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=magmaman_spawn) | +[LogicUnderwaterBubbles](#LogicUnderwaterBubbles) | [water_bubbles](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=water_bubbles) | Only the bubbles that spawn from the floor
Even without it, entities moving in water still spawn bubbles [LogicOlmecCutscene](#LogicOlmecCutscene) | [olmec_cutscene](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=olmec_cutscene) | [LogicTiamatCutscene](#LogicTiamatCutscene) | [tiamat_cutscene](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tiamat_cutscene) | -LogicMagmamanSpawn | [magmaman_spawn](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=magmaman_spawn) | -[LogicDiceShop](#LogicDiceShop) | [diceshop](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=diceshop) | +[LogicApepTrigger](#LogicApepTrigger) | [apep_spawner](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=apep_spawner) | Works only if the level has at least one room [ROOM_TEMPLATE](#ROOM_TEMPLATE).APEP, and it still spawns apep at hardcoded positions +[LogicCOGAnkhSacrifice](#LogicCOGAnkhSacrifice) | [city_of_gold_ankh_sacrifice](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=city_of_gold_ankh_sacrifice) | All it does is it runs transition to Duat after time delay (sets the state next theme etc. and state.items for proper player respawn) +[Logic](#Logic) | [duat_bosses_spawner](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=duat_bosses_spawner) | +[LogicTiamatBubbles](#LogicTiamatBubbles) | [bubbler](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bubbler) | Spawn rising bubbles at [Tiamat](#Tiamat) (position hardcoded) +[LogicTuskPleasurePalace](#LogicTuskPleasurePalace) | [tusk_pleasure_palace](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tusk_pleasure_palace) | Triggers aggro on everyone when non-high roller enters door +[Logic](#Logic) | [discovery_info](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=discovery_info) | black market, vlad, wet fur discovery, logic shows the toast +[Logic](#Logic) | [black_market](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=black_market) | Changes the camera bounds when you reach black market +[Logic](#Logic) | [jellyfish_trigger](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=jellyfish_trigger) | +[LogicArena1](#LogicArena1) | [arena_1](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=arena_1) | Handles create spawns and more, is cleared as soon as the winner is decided (on last player alive) +[Logic](#Logic) | [arena_2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=arena_2) | +[Logic](#Logic) | [arena_3](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=arena_3) | Handles time end death +[LogicArenaAlienBlast](#LogicArenaAlienBlast) | [arena_alien_blast](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=arena_alien_blast) | +[LogicArenaLooseBombs](#LogicArenaLooseBombs) | [arena_loose_bombs](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=arena_loose_bombs) | + | [start_logic](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_logic) | + +### LogicMagmamanSpawn + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +custom_array<[MagmamanSpawnPosition](#MagmamanSpawnPosition)> | [magmaman_positions](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=magmaman_positions) | +nil | [add_spawn(int x, int y)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=add_spawn) | +nil | [add_spawn(MagmamanSpawnPosition ms)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=add_spawn) | +nil | [remove_spawn(int x, int y)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=remove_spawn) | +nil | [remove_spawn(MagmamanSpawnPosition ms)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=remove_spawn) | + +### LogicMoonChallenge + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) [LogicChallenge](#LogicChallenge) + + +Type | Name | Description +---- | ---- | ----------- +int | [mattock_uid](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=mattock_uid) | entity uid ### LogicOlmecCutscene @@ -1337,11 +1473,54 @@ Derived from [Logic](#Logic) Type | Name | Description ---- | ---- | ----------- +[Entity](#Entity) | [fx_olmecpart_large](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=fx_olmecpart_large) | [Entity](#Entity) | [olmec](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=olmec) | [Entity](#Entity) | [player](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player) | [Entity](#Entity) | [cinematic_anchor](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=cinematic_anchor) | int | [timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=timer) | +### LogicOuroboros + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +[SoundMeta](#SoundMeta) | [sound](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sound) | +int | [timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=timer) | + +### LogicStarChallenge + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) [LogicChallenge](#LogicChallenge) + + +Type | Name | Description +---- | ---- | ----------- +array<[Entity](#Entity)> | [torches](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=torches) | +int | [start_countdown](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_countdown) | + +### LogicSunChallenge + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) [LogicChallenge](#LogicChallenge) + + +Type | Name | Description +---- | ---- | ----------- +int | [start_countdown](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_countdown) | + +### LogicTiamatBubbles + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +int | [bubble_spawn_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bubble_spawn_timer) | + ### LogicTiamatCutscene Used in [LogicList](#LogicList) @@ -1355,14 +1534,35 @@ Type | Name | Description [Entity](#Entity) | [cinematic_anchor](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=cinematic_anchor) | int | [timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=timer) | -### LogicVolcana +### LogicTuskPleasurePalace +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +int | [locked_door](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=locked_door) | + +### LogicTutorial + +Used in [LogicList](#LogicList) +Derived from [Logic](#Logic) + + +Type | Name | Description +---- | ---- | ----------- +[Entity](#Entity) | [pet_tutorial](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=pet_tutorial) | +int | [timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=timer) | + +### LogicUnderwaterBubbles + +Used in [LogicList](#LogicList) Derived from [Logic](#Logic) Type | Name | Description ---- | ---- | ----------- -custom_array<[MagmamanSpawnPosition](#MagmamanSpawnPosition)> | [magmaman_positions](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=magmaman_positions) | ## Online types