public void ChaosResizeEnemy(AIActor aiActor, bool delayed = false) { // AIActor targetAIActor = aiActor.gameObject.GetComponent<AIActor>(); if (!ChaosConsole.randomEnemySizeEnabled) { return; } if (string.IsNullOrEmpty(aiActor.EnemyGuid)) { return; } if (aiActor.name.ToLower().StartsWith("glitched") | aiActor.name.ToLower().EndsWith("(clone)(clone)")) { return; } if (ChaosLists.BannedEnemyGUIDList.Contains(aiActor.EnemyGuid)) { return; } if (!ChaosConsole.randomEnemySizeEnabled) { return; } if (aiActor.GetComponentInParent <BossStatueController>() != null) { return; } try { if (aiActor.transform.position.GetAbsoluteRoom().GetRoomName().ToLower().StartsWith("doublebeholsterroom01")) { return; } } catch (System.Exception) { return; } int currentFloor = GameManager.Instance.CurrentFloor; // Vector2 currentCorpseScale = new Vector2(1, 1); if (currentFloor == -1) { ChaosConsole.RandomResizedEnemies = 0.45f; } else { if (currentFloor > 2 && currentFloor < 5) { ChaosConsole.RandomResizedEnemies = 0.45f; } else { if (currentFloor > 4 && currentFloor < 6) { ChaosConsole.RandomResizedEnemies = 0.47f; } else { if (currentFloor > 5) { ChaosConsole.RandomResizedEnemies = 0.6f; } } } } if (Random.value >= ChaosConsole.RandomResizedEnemies) { return; } if (Random.value <= ChaosConsole.RandomSizeChooser) { // Make them tiny bois :P // Don't make cursed bois tiny. It can be a bit much to get hurt by tiny bois that are cursed. :P if (aiActor.IsBlackPhantom) { aiActor.StartCoroutine(ResizeEnemy(aiActor, new Vector2(1.5f, 1.5f), false, true, delayed)); } else { aiActor.StartCoroutine(ResizeEnemy(aiActor, new Vector2(0.5f, 0.5f), false, false, delayed)); // targetAIActor.CollisionKnockbackStrength /= 2f; } } else { // Make them big bois :P aiActor.StartCoroutine(ResizeEnemy(aiActor, new Vector2(1.5f, 1.5f), false, delayed)); // targetAIActor.CollisionKnockbackStrength *= 1.5f; } aiActor.placeableWidth += 2; aiActor.placeableHeight += 2; return; }