Summoning

This commit is contained in:
dingo
2026-02-01 10:00:38 -05:00
parent 0e8a8c8061
commit 95c165ac07
4 changed files with 19 additions and 6 deletions
+3 -3
View File
@@ -204,7 +204,7 @@ public sealed partial class DungeonHandler
}
}
var simulation = new DungeonSimulation(layout, tier, _mobDefinitions, bracketMin, null, _mobSpriteConfigs);
var simulation = new DungeonSimulation(layout, tier, _mobDefinitions, bracketMin, _abilityDefinitions, _mobSpriteConfigs);
var instance = new DungeonInstance
{
@@ -497,7 +497,7 @@ public sealed partial class DungeonHandler
try
{
var layout = DungeonGenerator.Generate(persisted.Seed, persisted.Tier);
var simulation = new DungeonSimulation(layout, persisted.Tier, _mobDefinitions, persisted.LevelBracketMin, null, _mobSpriteConfigs);
var simulation = new DungeonSimulation(layout, persisted.Tier, _mobDefinitions, persisted.LevelBracketMin, _abilityDefinitions, _mobSpriteConfigs);
// NOTE: We intentionally do NOT restore mob state here.
// When a dungeon is restored (all players left), ALL mobs respawn fresh.
@@ -571,7 +571,7 @@ public sealed partial class DungeonHandler
// Using DungeonGenerator.Generate() would create a V1 layout which has different
// room geometry than V2/V3, causing mobs to spawn in wrong positions.
var layout = instance.Simulation.Layout;
var freshSimulation = new DungeonSimulation(layout, instance.Tier, _mobDefinitions, instance.LevelBracketMin, null, _mobSpriteConfigs);
var freshSimulation = new DungeonSimulation(layout, instance.Tier, _mobDefinitions, instance.LevelBracketMin, _abilityDefinitions, _mobSpriteConfigs);
// Clear and rebuild mobs, keeping those with loot
instance.Simulation.Mobs.Clear();