From bfff75fd9f07257caca803f2b33d042f3967a8a7 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Tue, 1 Aug 2023 16:34:20 -0600 Subject: [PATCH] Gave Evil shrines a bit more leeway in generating as it seems like Crimson shrine sometimes fails to gen in some Cal spoiler screenshots --- World/UndergroundShrines.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/World/UndergroundShrines.cs b/World/UndergroundShrines.cs index 579c3b4198..b4e9bdca2d 100644 --- a/World/UndergroundShrines.cs +++ b/World/UndergroundShrines.cs @@ -76,7 +76,7 @@ namespace CalamityMod.World do { int placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.05f), (int)(Main.maxTilesX * 0.95f)); - int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.15f), (int)(Main.maxTilesY * 0.6f)); + int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.15f), (int)(Main.maxTilesY * 0.5f)); Point placementPoint = new Point(placementPositionX, placementPositionY); Vector2 schematicSize = new Vector2(TileMaps[mapKey].GetLength(0)/2, TileMaps[mapKey].GetLength(1)); //Fooling the system into thinking the shrine is smaller than it actually is so it fits into chasms @@ -105,7 +105,7 @@ namespace CalamityMod.World canGenerateInLocation = false; } } - if (!canGenerateInLocation || corruptStuffInArea < totalTiles * 0.5|| !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y)) || !inYourWalls) + if (!canGenerateInLocation || corruptStuffInArea < totalTiles * 0.4 || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y)) || !inYourWalls) { tries++; } @@ -149,8 +149,8 @@ namespace CalamityMod.World do { - int placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.1f), (int)(Main.maxTilesX * 0.9f)); - int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.1f), (int)(Main.maxTilesY * 0.6f)); + int placementPositionX = WorldGen.genRand.Next((int)(Main.maxTilesX * 0.05f), (int)(Main.maxTilesX * 0.95f)); + int placementPositionY = WorldGen.genRand.Next((int)(Main.maxTilesY * 0.15f), (int)(Main.maxTilesY * 0.5f)); Point placementPoint = new Point(placementPositionX, placementPositionY); Vector2 schematicSize = new Vector2(TileMaps[mapKey].GetLength(0), TileMaps[mapKey].GetLength(1)); @@ -181,7 +181,7 @@ namespace CalamityMod.World canGenerateInLocation = false; } } - if (!canGenerateInLocation || crimsonStuffInArea < totalTiles * 0.5f || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y)) || !inYourWalls) + if (!canGenerateInLocation || crimsonStuffInArea < totalTiles * 0.4f || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y)) || !inYourWalls) { tries++; }