protected void FixedUpdate() { ActiveDungeon activeDungeon = GameLogic.Binder.GameState.ActiveDungeon; if (((activeDungeon != null) && (activeDungeon.ActiveRoom != null)) && ((!activeDungeon.ActiveRoom.MainBossSummoned && !activeDungeon.ActiveRoom.CompletionTriggered) && (!activeDungeon.isTutorialDungeon() && (activeDungeon.CurrentGameplayState == GameplayState.ACTION)))) { Player player = GameLogic.Binder.GameState.Player; bool flag = true; for (int i = 0; i < activeDungeon.ActiveRoom.ActiveCharacters.Count; i++) { CharacterInstance instance = activeDungeon.ActiveRoom.ActiveCharacters[i]; if (!instance.IsPlayerCharacter && !instance.IsDead) { flag = false; break; } } if (flag) { int num3; int num2 = activeDungeon.ActiveRoom.getNextCharacterSpawnpointIndex(this.m_prevMobSpawnpointIndex); if (activeDungeon.hasDungeonModifier(DungeonModifierType.HordeMaxSize)) { num3 = App.Binder.ConfigMeta.FRENZY_MOB_SPAWNCOUNT_PER_SPAWNPOINT_MAX; } else if (GameLogic.Binder.FrenzySystem.isFrenzyActive()) { num3 = Mathf.FloorToInt(Mathf.Lerp((float)App.Binder.ConfigMeta.FRENZY_MOB_SPAWNCOUNT_PER_SPAWNPOINT_MIN, (float)App.Binder.ConfigMeta.FRENZY_MOB_SPAWNCOUNT_PER_SPAWNPOINT_MAX, player.ActiveCharacter.getSpurtBuffStrength())); } else { num3 = Mathf.FloorToInt(Mathf.Lerp((float)ConfigGameplay.MOB_SPAWNCOUNT_PER_SPAWNPOINT_MIN_RANGE.getRandom(), (float)ConfigGameplay.MOB_SPAWNCOUNT_PER_SPAWNPOINT_MAX_RANGE.getRandom(), player.ActiveCharacter.getSpurtBuffStrength())); } int num4 = player.getRemainingMinionKillsUntilFloorCompletion(activeDungeon.Floor, activeDungeon.isTutorialDungeon(), player.getLastBossEncounterFailed(false)); if (!activeDungeon.isBossFloor() && (num4 < num3)) { num3 = num4; } this.spawnRoomMinionHordeAtSpawnpoint(activeDungeon.ActiveRoom, activeDungeon.ActiveRoom.CharacterSpawnpoints[num2], num3, null); this.m_prevMobSpawnpointIndex = num2; } if (this.m_pendingWildBossSpawn) { this.trySummonWildBoss(); } } }