From ca324bec31dbf71d93c64f5fa2ad2eede5afdd9b Mon Sep 17 00:00:00 2001 From: honeyMead <70470522+honeyMead@users.noreply.github.com> Date: Tue, 4 Nov 2025 17:02:19 +0100 Subject: [PATCH 1/2] reset chosen loot in chaos room to avoid showing previous gods --- game/scripts/loot/LootRoomDuplicated.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/game/scripts/loot/LootRoomDuplicated.lua b/game/scripts/loot/LootRoomDuplicated.lua index 81ff0a6..925662c 100644 --- a/game/scripts/loot/LootRoomDuplicated.lua +++ b/game/scripts/loot/LootRoomDuplicated.lua @@ -215,6 +215,9 @@ function LootRoomDuplicated.SpawnRoomReward(baseFun, eventSource, args) end for playerId, hero in CoopPlayers.PlayersIterator() do + if RunEx.IsSecretRoom(room) then + LootRoomDuplicated.ChosenPlayerLoot[playerId] = nil + end local lootParams = LootRoomDuplicated.ChosenPlayerLoot[playerId] or {} if not hero.IsDead then room.ChangeReward = lootParams.rewardType From 8316f2a8678446e7e57abb9701adeb4691c22c75 Mon Sep 17 00:00:00 2001 From: honeyMead <70470522+honeyMead@users.noreply.github.com> Date: Tue, 18 Nov 2025 17:16:43 +0100 Subject: [PATCH 2/2] clear ChosenPlayerLoot after spawning --- game/scripts/loot/LootRoomDuplicated.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/game/scripts/loot/LootRoomDuplicated.lua b/game/scripts/loot/LootRoomDuplicated.lua index 925662c..17e99c2 100644 --- a/game/scripts/loot/LootRoomDuplicated.lua +++ b/game/scripts/loot/LootRoomDuplicated.lua @@ -215,9 +215,6 @@ function LootRoomDuplicated.SpawnRoomReward(baseFun, eventSource, args) end for playerId, hero in CoopPlayers.PlayersIterator() do - if RunEx.IsSecretRoom(room) then - LootRoomDuplicated.ChosenPlayerLoot[playerId] = nil - end local lootParams = LootRoomDuplicated.ChosenPlayerLoot[playerId] or {} if not hero.IsDead then room.ChangeReward = lootParams.rewardType @@ -226,6 +223,7 @@ function LootRoomDuplicated.SpawnRoomReward(baseFun, eventSource, args) HeroContext.RunWithHeroContextAwait(hero, baseFun, eventSource, args) end end + LootRoomDuplicated.ChosenPlayerLoot = {} end ---@param heroesCount number