public void FinishBattle() { StallingRoundNumber = 0; var darkenessLoot = DarkestDungeonManager.Data.LootDatabase.DarknessLoot["battle"]; for (int i = darkenessLoot.Count - 1; i >= 0; i--) { if (darkenessLoot[i].DarknessLevel == RaidSceneManager.TorchMeter.CurrentRange.Min) { if (RandomSolver.CheckSuccess(darkenessLoot[i].Chance)) { for (int j = 0; j < darkenessLoot[i].Codes.Count; j++) { BattleLoot.Add(new LootDefinition() { Code = darkenessLoot[i].Codes[j], Count = 1 }); } } break; } } for (int i = 0; i < HeroParty.Units.Count; i++) { var hero = (Hero)HeroParty.Units[i].Character; if (hero.HeroClass.ExtraBattleLoot != null) { BattleLoot.Add(hero.HeroClass.ExtraBattleLoot); } } HeroFormation.RectTransform.SetParent(Rect.parent, false); RaidSceneManager.DungeonCamera.target = HeroFormation.ranks.RectTransform; MonsterFormation.overlay.ResetOverlay(); MonsterParty.DeleteFormation(); MonsterFormation.gameObject.SetActive(false); ResetIds(); backdrop.Deactivate(); Round.OrderedUnits.Clear(); RaidSceneManager.TorchMeter.ClearModifier(); if (SharedHealth.IsActive) { SharedHealth.Reset(); } }