From fe722627bb003e1a5a8831f41d8b679a89ceea67 Mon Sep 17 00:00:00 2001 From: Mortis3 <53282720+DylanDoe21@users.noreply.github.com> Date: Fri, 10 Feb 2023 20:35:50 -0500 Subject: [PATCH] last major abyss generation changes Abyss Changes: -sulphur depths islands now start at the top of the abyss hole -abyss layer 2 islands are smaller, and more dense. chests no longer spawn in houses and there are more of them in layer 2 -layer 3 has a new block, also no longer has chests -chaotic puffer, devilfish, and giant squid now only spawn in layer 3 -toxicatfish now spawns in the sulphur depths -raised sulflounder spawn rate a bit -reaper sharks and eidolon wyrms now have much lower spawnrates in layer 3 -toxic minnows cannot spawn in layer 3 -sulphur depths water now uses a toned down version of the sulphur sea waters light color -added better bestiary names for each abyss layer -sulphur poisoning UI now shows up in the sulphur depths Other Changes: -a few crags generation polishings -added flipped versions of each giant crag lily for variety -fixed sulphur and viper vines not dying if no tiles were above them -probably a few other small things ive forgotten about --- BiomeManagers/AbyssLayer1Biome.cs | 15 +- BiomeManagers/AbyssLayer2Biome.cs | 6 +- BiomeManagers/AbyssLayer3Biome.cs | 6 +- BiomeManagers/AbyssLayer3Icon.png | Bin 477 -> 522 bytes BiomeManagers/AbyssLayer4Biome.cs | 2 +- BiomeManagers/AbyssLayer4Icon(alt).png | Bin 0 -> 477 bytes CalPlayer/CalamityPlayerLifeRegen.cs | 2 +- ILEditing/MechanicILChanges.cs | 14 +- NPCs/Abyss/ChaoticPuffer.cs | 6 +- NPCs/Abyss/DevilFish.cs | 4 +- NPCs/Abyss/DevilFishAlt.cs | 4 +- NPCs/Abyss/EidolonWyrmHead.cs | 2 +- NPCs/Abyss/GiantSquid.cs | 6 +- NPCs/Abyss/ReaperShark.cs | 4 +- NPCs/Abyss/ToxicMinnow.cs | 6 +- NPCs/SulphurousSea/Sulflounder.cs | 6 +- NPCs/SulphurousSea/Toxicatfish.cs | 10 +- .../AbyssAmbient/SulphurPireCoralThin.png | Bin 964 -> 0 bytes .../AbyssAmbient/SulphurPireCoralThinGlow.png | Bin 838 -> 0 bytes .../AbyssAmbient/SulphurTentacleCorals.cs | 20 +- .../AbyssAmbient/SulphurTentacleCorals.png | Bin 2183 -> 3486 bytes .../SulphurTentacleCoralsGlow.png | Bin 2000 -> 1515 bytes Tiles/Abyss/PyreMantle.cs | 4 +- Tiles/Abyss/PyreMantleMolten.cs | 4 +- Tiles/Abyss/SulphurousShale.cs | 10 +- Tiles/Abyss/SulphurousVines.cs | 13 + Tiles/Abyss/ViperVines.cs | 13 + Tiles/CalamityGlobalTile.cs | 2 +- Tiles/Crags/Lily/LavaLily4.cs | 63 ++ Tiles/Crags/Lily/LavaLily4.png | Bin 0 -> 1608 bytes Tiles/Crags/Lily/LavaLily4Glow.png | Bin 0 -> 591 bytes Tiles/Crags/Lily/LavaLily4Top.png | Bin 0 -> 5094 bytes Tiles/Crags/Lily/LavaLily4TopGlow.png | Bin 0 -> 3528 bytes Tiles/Crags/Lily/LavaLily5.cs | 63 ++ Tiles/Crags/Lily/LavaLily5.png | Bin 0 -> 1560 bytes Tiles/Crags/Lily/LavaLily5Glow.png | Bin 0 -> 579 bytes Tiles/Crags/Lily/LavaLily5Top.png | Bin 0 -> 6024 bytes Tiles/Crags/Lily/LavaLily5TopGlow.png | Bin 0 -> 4188 bytes Tiles/Crags/Lily/LavaLily6.cs | 63 ++ Tiles/Crags/Lily/LavaLily6.png | Bin 0 -> 1512 bytes Tiles/Crags/Lily/LavaLily6Glow.png | Bin 0 -> 534 bytes Tiles/Crags/Lily/LavaLily6Top.png | Bin 0 -> 5376 bytes Tiles/Crags/Lily/LavaLily6TopGlow.png | Bin 0 -> 3909 bytes Tiles/Crags/ScorchedRemains.cs | 1 - .../SulphurousWaterMeterUI.cs | 2 +- Utilities/TileFraming.cs | 3 + Utilities/WorldgenUtils.cs | 22 + Walls/BrimstoneSlabWall.cs | 5 + Walls/PyreMantleWall.cs | 31 + Walls/PyreMantleWall.png | Bin 0 -> 6825 bytes World/Abyss.cs | 640 +++++++++--------- World/AerialiteOreGen.cs | 6 +- World/BrimstoneCrag.cs | 26 +- World/MiscWorldgenRoutines.cs | 18 +- 54 files changed, 685 insertions(+), 417 deletions(-) create mode 100644 BiomeManagers/AbyssLayer4Icon(alt).png delete mode 100644 Tiles/Abyss/AbyssAmbient/SulphurPireCoralThin.png delete mode 100644 Tiles/Abyss/AbyssAmbient/SulphurPireCoralThinGlow.png create mode 100644 Tiles/Crags/Lily/LavaLily4.cs create mode 100644 Tiles/Crags/Lily/LavaLily4.png create mode 100644 Tiles/Crags/Lily/LavaLily4Glow.png create mode 100644 Tiles/Crags/Lily/LavaLily4Top.png create mode 100644 Tiles/Crags/Lily/LavaLily4TopGlow.png create mode 100644 Tiles/Crags/Lily/LavaLily5.cs create mode 100644 Tiles/Crags/Lily/LavaLily5.png create mode 100644 Tiles/Crags/Lily/LavaLily5Glow.png create mode 100644 Tiles/Crags/Lily/LavaLily5Top.png create mode 100644 Tiles/Crags/Lily/LavaLily5TopGlow.png create mode 100644 Tiles/Crags/Lily/LavaLily6.cs create mode 100644 Tiles/Crags/Lily/LavaLily6.png create mode 100644 Tiles/Crags/Lily/LavaLily6Glow.png create mode 100644 Tiles/Crags/Lily/LavaLily6Top.png create mode 100644 Tiles/Crags/Lily/LavaLily6TopGlow.png create mode 100644 Walls/PyreMantleWall.cs create mode 100644 Walls/PyreMantleWall.png diff --git a/BiomeManagers/AbyssLayer1Biome.cs b/BiomeManagers/AbyssLayer1Biome.cs index 34af82e2df..4b6ae7b4a0 100644 --- a/BiomeManagers/AbyssLayer1Biome.cs +++ b/BiomeManagers/AbyssLayer1Biome.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.World; +using CalamityMod.Systems; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -9,17 +10,16 @@ namespace CalamityMod.BiomeManagers { public class AbyssLayer1Biome : ModBiome { + //keep this here even though layer one now uses a tile check, cannot be bothered to move it for now public static bool MeetsBaseAbyssRequirement(Player player, out int playerYTileCoords) { Point point = player.Center.ToTileCoordinates(); int x = Main.maxTilesX; int y = Main.maxTilesY; int genLimit = x / 2; - int abyssChasmY = y - 250; int abyssChasmX = Abyss.AtLeftSideOfWorld ? genLimit - (genLimit - 135) + 35 : genLimit + (genLimit - 135) - 35; bool abyssPosX = false; - bool abyssPosY = point.Y >= (Main.rockLayer - Main.maxTilesY / 13) && point.Y <= Main.maxTilesY - 200; if (Abyss.AtLeftSideOfWorld) { if (point.X < abyssChasmX + 140) @@ -36,7 +36,7 @@ namespace CalamityMod.BiomeManagers if (WeakReferenceSupport.InAnySubworld()) return false; - return !player.lavaWet && !player.honeyWet && abyssPosY && abyssPosX; + return !player.lavaWet && !player.honeyWet && abyssPosX && playerYTileCoords <= Main.maxTilesY - 200; } //temporarily use sulphur for now @@ -65,9 +65,12 @@ namespace CalamityMod.BiomeManagers public override bool IsBiomeActive(Player player) { - return MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && - playerYTileCoords >= Main.rockLayer - Main.maxTilesY / 15 && - playerYTileCoords <= Main.rockLayer - 22; + Point point = player.Center.ToTileCoordinates(); + + int abyssStartHeight = (SulphurousSea.YStart + (int)Main.worldSurface) / 2 + 90; + + return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && point.Y >= abyssStartHeight && + !player.Calamity().ZoneAbyssLayer2 && !player.Calamity().ZoneAbyssLayer3 && !player.Calamity().ZoneAbyssLayer4; } } } diff --git a/BiomeManagers/AbyssLayer2Biome.cs b/BiomeManagers/AbyssLayer2Biome.cs index 1388f43a10..2121a7cc06 100644 --- a/BiomeManagers/AbyssLayer2Biome.cs +++ b/BiomeManagers/AbyssLayer2Biome.cs @@ -25,14 +25,14 @@ namespace CalamityMod.BiomeManagers public override void SetStaticDefaults() { - DisplayName.SetDefault("Upper Abyss"); + DisplayName.SetDefault("Murky Waters"); } public override bool IsBiomeActive(Player player) { return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && - playerYTileCoords > Main.rockLayer - 22 && - playerYTileCoords <= Main.rockLayer + Main.maxTilesY * 0.145; + playerYTileCoords > Main.rockLayer - 10 && + playerYTileCoords <= Main.rockLayer + Main.maxTilesY * 0.140; } } } diff --git a/BiomeManagers/AbyssLayer3Biome.cs b/BiomeManagers/AbyssLayer3Biome.cs index 57acbda920..aed13ed5ac 100644 --- a/BiomeManagers/AbyssLayer3Biome.cs +++ b/BiomeManagers/AbyssLayer3Biome.cs @@ -25,14 +25,14 @@ namespace CalamityMod.BiomeManagers public override void SetStaticDefaults() { - DisplayName.SetDefault("Lower Abyss"); + DisplayName.SetDefault("Thermal Vents"); } public override bool IsBiomeActive(Player player) { return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && - playerYTileCoords > Main.rockLayer + Main.maxTilesY * 0.145 && - playerYTileCoords <= Main.rockLayer + Main.maxTilesY * 0.262; + playerYTileCoords > Main.rockLayer + Main.maxTilesY * 0.140 && + playerYTileCoords <= Main.rockLayer + Main.maxTilesY * 0.270; } } } diff --git a/BiomeManagers/AbyssLayer3Icon.png b/BiomeManagers/AbyssLayer3Icon.png index 9469ac66000c80cadc7d483cf8c1339d2da2e67a..8986721ad5d00b5ba0b070b020a9aa8d3a72ff7b 100644 GIT binary patch delta 483 zcmV<90UZ9_1BwKYF@MBKL_t(YOU0HyPr^VL#@j>!tyE|U{*8plLS%OITlf{+{U$oN z`6ZlOjESR(F>yo^5`zO#Vv8cQ$biXvc}VYUkCvg=<>`CZ_IZDI@AXdC6kWO^UoEw9 z&EA>IlI?l@MBhyGP}nFlW6{XkDn$YthC%J!c9+!izwulo+<#Ky%#CehgXYqyI+S_A zEJ#Vw>6FWK`}puAC66V}+!%(9W`iRHi8~xdwpT5SYrna@Pe+`&F$@p)*qpw7PDyiC zp46_`q#zdwpF17u4<-SrJ8(r}uF4m4tlaqMV4E_lZB|Kp9|O|y^p|wF##cAiZ+_%a z|H*Nk^z!bNbbmHtBiHl#a$;r1R$-koYwoft1$nEUqxkH!iOe~@xN1{;e*Hp<+DJ^S z%ou+v;2>iVi0%6oR`s~B8W6kF3EloozT|VP%osy065?NtDn|Og@6+w*eL=+HU`#sG z*@|6CoVhUwie`yBVK{k{t5R`}5rYtkBSyctKmXgElw29dk>}>pqZU`$;UMlL61yLZ z_ODKkd0X(w3W zizUSsP)Ze1ahkbH~gb67rxDSrF% z6`1+;%O@1|Fh07^;XWQT7Nh6aFP}c6gaiv;3YdTId&E zr>wtRz*1a_I)7kVso5LiWN~|MKl4%xG}*V#G1sErwah z!^Mx1k0m7KQBo^RoswY(nECPP1gt(piFkZI9&n3sIe?c}5G(~twJ>$C)C-GCLOw-_ zXmrIOK6;Q3n8nx}hfNGA_2Ts$&NdgikLhMHl0_(~oG(}hAZJx Main.rockLayer + Main.maxTilesY * 0.262; + playerYTileCoords > Main.rockLayer + Main.maxTilesY * 0.270; } } } diff --git a/BiomeManagers/AbyssLayer4Icon(alt).png b/BiomeManagers/AbyssLayer4Icon(alt).png new file mode 100644 index 0000000000000000000000000000000000000000..9469ac66000c80cadc7d483cf8c1339d2da2e67a GIT binary patch literal 477 zcmV<30V4j1P)Px$mq|oHR7gu>WEdd8I6(F?P|ac$WxfB%p15=O5?-^1j>YIcgZWZkRT(AL9^SqS z=Hv1?$v&pJ#kefs;Nk-NgqxQKO!M&ZqWF}DPZ-Rb$|R}|7Q>v69;d9oT)WN~|MKl4%xG}*V#G1sErwah!^Mx1k0m7KQBo^R zoswY(nECPP1gt(piFkZI9&n3sIe?c}5G(~twJ>$C)C-GCLOw-_XmrIOK6;Q3n8nx} zhfNGA_2Ts$&NdgikLhMHl0_(~oLC1SXH{%^h-qaGn8hS`l6a-W_?URpNKgp?MXdfG T)!Og300000NkvXXu0mjf|03Eg literal 0 HcmV?d00001 diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 1fe99f6614..b3cea15892 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -179,7 +179,7 @@ namespace CalamityMod.CalPlayer } bool ASPoisoning = ASPoisonLevel > 0f; - if (ASPoisoning || (ZoneSulphur && !Player.creativeGodMode && Player.IsUnderwater() && !decayEffigy && !abyssalDivingSuit && !Player.lavaWet && !Player.honeyWet && !nearSafeZone)) + if (ASPoisoning || ((ZoneSulphur || Player.Calamity().ZoneAbyssLayer1) && !Player.creativeGodMode && Player.IsUnderwater() && !decayEffigy && !abyssalDivingSuit && !Player.lavaWet && !Player.honeyWet && !nearSafeZone)) { float increment = 1f / SulphSeaWaterSafetyTime; //No way to mitigate AS Poisoning diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index 0afda36f12..70f80a9b78 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -969,7 +969,8 @@ namespace CalamityMod.ILEditing orig(self, x, y, out outputColor); Tile tile = CalamityUtils.ParanoidTileRetrieval(x, y); - if (tile.LiquidAmount <= 0 || tile.HasTile || Main.waterStyle != ModContent.Find("CalamityMod/SulphuricWater").Slot) + if (tile.LiquidAmount <= 0 || tile.HasTile || (Main.waterStyle != ModContent.Find("CalamityMod/SulphuricWater").Slot && + Main.waterStyle != ModContent.Find("CalamityMod/SulphuricDepthsWater").Slot)) return; Tile above = CalamityUtils.ParanoidTileRetrieval(x, y - 1); @@ -981,7 +982,16 @@ namespace CalamityMod.ILEditing } if (tile.TileType != (ushort)ModContent.TileType()) - outputColor = Vector3.Lerp(outputColor, Color.LightSeaGreen.ToVector3(), 0.41f); + { + if (Main.waterStyle == ModContent.Find("CalamityMod/SulphuricWater").Slot) + { + outputColor = Vector3.Lerp(outputColor, Color.LightSeaGreen.ToVector3(), 0.41f); + } + if (Main.waterStyle == ModContent.Find("CalamityMod/SulphuricDepthsWater").Slot) + { + outputColor = Vector3.Lerp(outputColor, Color.MediumSeaGreen.ToVector3(), 0.18f); + } + } } #endregion Sulph Sea Water Visuals diff --git a/NPCs/Abyss/ChaoticPuffer.cs b/NPCs/Abyss/ChaoticPuffer.cs index 6d853aee16..c378537ac9 100644 --- a/NPCs/Abyss/ChaoticPuffer.cs +++ b/NPCs/Abyss/ChaoticPuffer.cs @@ -49,7 +49,7 @@ namespace CalamityMod.NPCs.Abyss NPC.Calamity().VulnerableToSickness = true; NPC.Calamity().VulnerableToElectricity = true; NPC.Calamity().VulnerableToWater = false; - SpawnModBiomes = new int[2] { ModContent.GetInstance().Type, ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; } public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) @@ -230,10 +230,6 @@ namespace CalamityMod.NPCs.Abyss public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.Player.Calamity().ZoneAbyssLayer2 && spawnInfo.Water) - { - return SpawnCondition.CaveJellyfish.Chance * 0.4f; - } if (spawnInfo.Player.Calamity().ZoneAbyssLayer3 && spawnInfo.Water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; diff --git a/NPCs/Abyss/DevilFish.cs b/NPCs/Abyss/DevilFish.cs index b3ad2b873d..fb92790826 100644 --- a/NPCs/Abyss/DevilFish.cs +++ b/NPCs/Abyss/DevilFish.cs @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.Abyss NPC.Calamity().VulnerableToSickness = true; NPC.Calamity().VulnerableToElectricity = true; NPC.Calamity().VulnerableToWater = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; } public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) @@ -300,7 +300,7 @@ namespace CalamityMod.NPCs.Abyss public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.Player.Calamity().ZoneAbyssLayer2 && spawnInfo.Water) + if (spawnInfo.Player.Calamity().ZoneAbyssLayer3 && spawnInfo.Water) { return SpawnCondition.CaveJellyfish.Chance * 0.3f; } diff --git a/NPCs/Abyss/DevilFishAlt.cs b/NPCs/Abyss/DevilFishAlt.cs index d1afae2ced..a3edb69bd7 100644 --- a/NPCs/Abyss/DevilFishAlt.cs +++ b/NPCs/Abyss/DevilFishAlt.cs @@ -54,7 +54,7 @@ namespace CalamityMod.NPCs.Abyss NPC.Calamity().VulnerableToSickness = true; NPC.Calamity().VulnerableToElectricity = true; NPC.Calamity().VulnerableToWater = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; } public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) @@ -296,7 +296,7 @@ namespace CalamityMod.NPCs.Abyss public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.Player.Calamity().ZoneAbyssLayer2 && spawnInfo.Water) + if (spawnInfo.Player.Calamity().ZoneAbyssLayer3 && spawnInfo.Water) { return SpawnCondition.CaveJellyfish.Chance * 0.3f; } diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 36514b12ff..e40cdcdb87 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -439,7 +439,7 @@ namespace CalamityMod.NPCs.Abyss if (spawnInfo.Player.Calamity().ZoneAbyssLayer3 && spawnInfo.Water && !NPC.AnyNPCs(ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType())) { - return SpawnCondition.CaveJellyfish.Chance * 0.3f; + return SpawnCondition.CaveJellyfish.Chance * 0.1f; } if (spawnInfo.Player.Calamity().ZoneAbyssLayer4 && spawnInfo.Water && !NPC.AnyNPCs(ModContent.NPCType())) { diff --git a/NPCs/Abyss/GiantSquid.cs b/NPCs/Abyss/GiantSquid.cs index 542e3cf6e2..419aa6224a 100644 --- a/NPCs/Abyss/GiantSquid.cs +++ b/NPCs/Abyss/GiantSquid.cs @@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.Abyss NPC.Calamity().VulnerableToSickness = true; NPC.Calamity().VulnerableToElectricity = true; NPC.Calamity().VulnerableToWater = false; - SpawnModBiomes = new int[2] { ModContent.GetInstance().Type, ModContent.GetInstance().Type }; + SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; } public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) @@ -224,10 +224,6 @@ namespace CalamityMod.NPCs.Abyss public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.Player.Calamity().ZoneAbyssLayer2 && spawnInfo.Water) - { - return SpawnCondition.CaveJellyfish.Chance * 0.6f; - } if (spawnInfo.Player.Calamity().ZoneAbyssLayer3 && spawnInfo.Water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; diff --git a/NPCs/Abyss/ReaperShark.cs b/NPCs/Abyss/ReaperShark.cs index 0d31d184d6..2e8a1c8296 100644 --- a/NPCs/Abyss/ReaperShark.cs +++ b/NPCs/Abyss/ReaperShark.cs @@ -656,9 +656,9 @@ namespace CalamityMod.NPCs.Abyss public override float SpawnChance(NPCSpawnInfo spawnInfo) { if (spawnInfo.Player.Calamity().ZoneAbyssLayer3 && spawnInfo.Water && !NPC.AnyNPCs(ModContent.NPCType()) && - !NPC.AnyNPCs(ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType())) + !NPC.AnyNPCs(ModContent.NPCType()) && !NPC.AnyNPCs(ModContent.NPCType())) { - return SpawnCondition.CaveJellyfish.Chance * 0.6f; + return SpawnCondition.CaveJellyfish.Chance * 0.1f; } if (spawnInfo.Player.Calamity().ZoneAbyssLayer4 && spawnInfo.Water && !NPC.AnyNPCs(ModContent.NPCType())) { diff --git a/NPCs/Abyss/ToxicMinnow.cs b/NPCs/Abyss/ToxicMinnow.cs index b8877a962f..40874b01a9 100644 --- a/NPCs/Abyss/ToxicMinnow.cs +++ b/NPCs/Abyss/ToxicMinnow.cs @@ -50,7 +50,7 @@ namespace CalamityMod.NPCs.Abyss NPC.Calamity().VulnerableToSickness = false; NPC.Calamity().VulnerableToElectricity = true; NPC.Calamity().VulnerableToWater = false; - SpawnModBiomes = new int[3] { ModContent.GetInstance().Type, ModContent.GetInstance().Type, ModContent.GetInstance().Type }; + SpawnModBiomes = new int[2] { ModContent.GetInstance().Type, ModContent.GetInstance().Type }; } public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) @@ -173,10 +173,6 @@ namespace CalamityMod.NPCs.Abyss { return SpawnCondition.CaveJellyfish.Chance * 0.9f; } - if (spawnInfo.Player.Calamity().ZoneAbyssLayer3 && spawnInfo.Water) - { - return SpawnCondition.CaveJellyfish.Chance * 0.6f; - } return 0f; } diff --git a/NPCs/SulphurousSea/Sulflounder.cs b/NPCs/SulphurousSea/Sulflounder.cs index 93e1ba87dc..4ebf538cb3 100644 --- a/NPCs/SulphurousSea/Sulflounder.cs +++ b/NPCs/SulphurousSea/Sulflounder.cs @@ -132,17 +132,13 @@ namespace CalamityMod.NPCs.SulphurousSea public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.PlayerSafe) - { - return 0f; - } if (spawnInfo.Player.Calamity().ZoneSulphur && spawnInfo.Water) { return 0.2f; } if (spawnInfo.Player.Calamity().ZoneAbyssLayer1 && spawnInfo.Water) { - return 0.35f; + return 0.45f; } return 0f; } diff --git a/NPCs/SulphurousSea/Toxicatfish.cs b/NPCs/SulphurousSea/Toxicatfish.cs index 83f0188e6a..f2a9bfd686 100644 --- a/NPCs/SulphurousSea/Toxicatfish.cs +++ b/NPCs/SulphurousSea/Toxicatfish.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.SulphurousSea NPC.Calamity().VulnerableToSickness = false; NPC.Calamity().VulnerableToElectricity = true; NPC.Calamity().VulnerableToWater = false; - SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; + SpawnModBiomes = new int[2] { ModContent.GetInstance().Type, ModContent.GetInstance().Type }; } public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) @@ -98,14 +98,14 @@ namespace CalamityMod.NPCs.SulphurousSea public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.PlayerSafe) - { - return 0f; - } if (spawnInfo.Player.Calamity().ZoneSulphur && spawnInfo.Water) { return 0.2f; } + if (spawnInfo.Player.Calamity().ZoneAbyssLayer1 && spawnInfo.Water) + { + return 0.35f; + } return 0f; } diff --git a/Tiles/Abyss/AbyssAmbient/SulphurPireCoralThin.png b/Tiles/Abyss/AbyssAmbient/SulphurPireCoralThin.png deleted file mode 100644 index f6e575424863c27fd1f670b3dd6a2b3ab41893f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 964 zcmV;#13UbQP)g$00009a7bBm000XT z000XT0n*)m`~Uz0TuDShRCwC$nn8*dK@5fa0v@UDkD7{%75Meb)4M{n_;E&-*5f zNAs|=6sSp{lwn92eyX6LZEUr2<_pwRP~U%FHSvXznt!UG%mW3OrfsZ=ffcC70+ls9 zJ3toCM|O-lP!Psp@7=4{O$F*wptgUnyV&rhL8;VN^V#+Q51ixq@$GimRiI{r;-#%X zsZ=Qt(X zf>MD&7-xH*uHUS?7}S@KZCIt$B3)ERq>i7W-W&{dLUV&1n8iB&RNmVyxR0^6@gWT&G zH~v!GP*1t_&-G0qOD;tz+oJve9xJ5VN_njQF|QjpsNbshXvuUt@p%7Wrl0WfE2 z9~M7u=oBb^g<(*}pKg0M+kYwro%X=p3=l{3Ij%sBfIhmdJ2>ZDEqNO zZS%@6ZW9zJ*l~`9+z+D#Dhmof;H8bgq9PuFQrD|j9Daq$rl5JiU3(C;r<0G3yK@FXlX~Fa6K1MC!i*^)G=-v zUw6CbO@d#FRVj!b7`HtIY7~?y&N#qw9pR%=et8^7kUP`sx4qepx8lkz}J1$Ft0XUv1Pxa2G}`vaoZnW2nFgaC=O5=QbnA_MK^kt zfn(}Fu4MyM4KTMqksTFhff@y+3`K1LJH{y-f#(4Ec!T}o;%idQO}(r?1!@*3=hJg% zhz&#yCp#8x=c56dqhBuKDLbk?h~g|zqo9-{$^biN_Hz4*WaxCmUyhnhh!e zECp&H(3G7^fl@`iKxIMku|(8RMvbOA2pqMm{L0#4e;yiVflB)G4;Qj*K!6fS2><{9 m4rN$LW=%~1DgXcg2mk;800000(o>TF0000g$00009a7bBm000XT z000XT0n*)m`~Uy~_(?=TRCwC$nlWk|K@dgv0y=_02!k^_R3tDyfWVOgX9^6;bpYuI z(g}=1AIHa0GTLqUV)nC7RXy9gUQ7iA+Mb!}syF>>YNoZCrfKy*+mDB{W-rsPX21V_ zYo_t&xcsaN)F4pgSVoRd6_ji}HqC9v@d7mz)YG5O&HO?c9Y0l2vl}Wf&DLYh99V%m z7O1S_(FwZw@yO52wm``=E`MJ?eri^r4h3rc_p~v0d}vT4eL9|P4|KylpXbNh)y4|c zXi&bi2^2|TsZ`zprTHZNMWD!^z!a!Mfyzoxjz>u)`&g$N6*bP9pTHETV}aVS^dnG< zq|ytD5|e4%{oP!CY3A48eZOjU@!`B#f$9ZC#g{-uOLde~65zMuQQ{6riF>>nFHoaF z&5HGw`BIIF-zcdND3Z$k&+BFm#EUQ( z0x1u6@Qq(*^6pj>JMO6Sp1*SI&n z= 72) + if (tile.TileFrameX <= 324) { float brightness = 0.7f; float declareThisHereToPreventRunningTheSameCalculationMultipleTimes = Main.GameUpdateCount * 0.0025f; @@ -59,6 +58,21 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient g *= brightness; b *= brightness; } + + if (tile.TileFrameX > 324) + { + float brightness = 0.7f; + float declareThisHereToPreventRunningTheSameCalculationMultipleTimes = Main.GameUpdateCount * 0.0025f; + brightness *= (float)MathF.Sin(-j / 2f + declareThisHereToPreventRunningTheSameCalculationMultipleTimes + i); + brightness *= (float)MathF.Sin(-i / 2f + declareThisHereToPreventRunningTheSameCalculationMultipleTimes + j); + brightness += 0.7f; + r = 230f / 500f; + g = 255f / 500f; + b = 0f; + r *= brightness; + g *= brightness; + b *= brightness; + } } } } diff --git a/Tiles/Abyss/AbyssAmbient/SulphurTentacleCorals.png b/Tiles/Abyss/AbyssAmbient/SulphurTentacleCorals.png index fdbdb38773043dd69eb38a5233b3190ca98c472c..aa5d0743b8a49b61719180bfa20206f24ea0f631 100644 GIT binary patch literal 3486 zcmV;P4Po+$P)Px?S4l)cRCr$PU2n)=Wf^{7s8-8A*eGk`%^{O9adX+!OayU+R7km8E~-Hh!9J+q zhdu;roBP&>VC_R7QDBJEbQV$}F%d#7UDl>(qam}Gt*q8CZM6y(KBtTP-Tm(0bw7W8 z?|a_gd+p1Qz2}_!JkNEWb6@xM-1qaG=_&ma0zyCt2mv9GfxvXexjIz{2mv7=1cbnp zh(m)w2nYcoAOx}y5OHL|rIUq#5D)@FK*XUjAOwVf5Lo00e0Jx#XWtCLy*pnU$qgco zMLuBEeIXzOgn)=cV?YQjVgw$3$Jv3%@#eozFUa6B`ilt?M4E!ok}6&ZgtZ?&C*~47FQzvsMp5c7%Ws$U{KH zA>w#r#E3ZZ-W#1Q1SSH3(kUDe$GQtnCL9i*T2>W-x1JJeZLhY!r8s+otS^cK>o00^ zEZ47EofO@s&tIFmy#ISoNO4Srhfyac5`j{OR_jPDn5`XsYkRf*EyY>Hp{c5gbUf zm6K?tIBvcA@}xMf{n!VkI2N``QR^220wRvsQxW`|b7@|5Z1m*w%5yxndMI6Hw2db*rR2dt>A`XU-jthYv zBM@D$U>zyCRI5BLo>`e9&re*pI+;BE`!ng6Rc+a+q^0j$lCJyV&yJ+umu8O@1*y6H zY*nVrhDdG|QftMLJGJEX2mRP^L-)M@_NPr%X zpmH5IBKt4yU(rSMsYlKX#gC?p2Zo;7RVldgN`yDyO9V4&+bN1*Qx zmiJ)z8GY|p)bWWphEIV-@nhph#G$DwHb!)O2m+;LqJ0H(T=o2|`x|w9AdX9Cx(N1? zm0eX8{zY>Ww*9$NL%6>5I`95i5szF6&in1Lu8Qo1*={c-n>&f($DW(bNqp=3-$<9- z@#(`UqAyh((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deQ{zOIJ*n!Ob4&j8H4yf)TIk|j z{vY${JNLYNq2E#v17w+G=gs2xPPpQk%t9{RPWsZ74OeWGAZrE}ODwxGE|VRY)wR^? zSbFTdu6P^iVJqP!$5ZYxc|!UWkxA+hCqz!liqN%vX};}wu7w7S8*@ceSKd77Uub}h zK_#`oWON6!ZdlS93^QqQfEY!@to|OtxFcHjy7*=g@JgX@XVP6Gqt>gNZ8e{ zG~H~H{wuUfBP@$OaB;b3I^+4HAE;>Mbl=%%KMVUQE-h(`RdGBQ8kE+5M&)=kmHn-ny-yUVKN#D;`v`VT3U$&H+!_pREVboS%gB#t_TY zm2?}J^`p%`M*}w_vM`N;lC)AuE7Q08;Z5u0%OqM|cqp3p=;Z^l#{YoTf<4=TL1A3Z z#`VkTvtzR;$VjO#mt-wYrf5E1ac?o@ssSOsOt;==suohVz5@xZaSDi9TV73Iblcbr z9k?@pD!+EdxB diff --git a/Tiles/Abyss/AbyssAmbient/SulphurTentacleCoralsGlow.png b/Tiles/Abyss/AbyssAmbient/SulphurTentacleCoralsGlow.png index c2f8290b23dd7318261cb88c5891d1a6cb0bdf76..2b64708f6886d80b5aa5703166d0bc83a0387844 100644 GIT binary patch literal 1515 zcmVPx)q)9|URCr$Poxf{TK@i99N(=uByO0!uy=Y;pLL?#tY=jgNNFQ@Cy$~z}8zCS{ z1hutL>;;R6VBw!2SXfv_c*n}+ahG?qGyC4`?k7zk*`1yF%-(+Y*Lyb}@dE(}KmY;| z5D*v(%2E^p5P$##ATUBW=mZde00bZ)B7ks+a8Vcn5P$##5DxkP1Rwx`$_d{30O6nyK%im*?=GC4nK|D2JI-=)SV|n;yJ8TG7kf_|S6_cS zYJPus`=$B4XyuV*r}CZ*{DZ(y1WFljONnEsez0u22*+*sXQDjrwMJ}U^=fj}(;v;%AGfG*`5+m1Fqsh`W1M>v)xML7sSz#V}wAjh6% zg!-w@60En-wDDRcaA@HOXA?JWUuiGS21W4_v8na3Qb|3(OI0D*%6yb>Dj&Q_r zqZR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PyreMantle : ModTile { public static readonly SoundStyle MineSound = new("CalamityMod/Sounds/Custom/VoidstoneMine", 3) { Volume = 0.4f }; + public override void SetStaticDefaults() { - Main.tileSolid[Type] = true; Main.tileBlockLight[Type] = true; Main.tileBrick[Type] = true; @@ -35,7 +35,7 @@ namespace CalamityMod.Tiles.Abyss public override bool CreateDust(int i, int j, ref int type) { - Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 180, 0f, 0f, 1, new Color(128, 128, 128), 1f); + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 162, 0f, 0f, 1, new Color(128, 128, 128), 1f); return false; } diff --git a/Tiles/Abyss/PyreMantleMolten.cs b/Tiles/Abyss/PyreMantleMolten.cs index 1fdf0b8b22..7684acc143 100644 --- a/Tiles/Abyss/PyreMantleMolten.cs +++ b/Tiles/Abyss/PyreMantleMolten.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Tiles.Abyss HitSound = MineSound; MineResist = 10f; MinPick = 180; - ItemDrop = ModContent.ItemType(); + ItemDrop = ModContent.ItemType(); AddMapEntry(new Color(113, 49, 16)); } @@ -39,7 +39,7 @@ namespace CalamityMod.Tiles.Abyss public override bool CreateDust(int i, int j, ref int type) { - Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 180, 0f, 0f, 1, new Color(128, 128, 128), 1f); + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 162, 0f, 0f, 1, new Color(128, 128, 128), 1f); return false; } diff --git a/Tiles/Abyss/SulphurousShale.cs b/Tiles/Abyss/SulphurousShale.cs index 6deb4dbfa3..5c5d16946b 100644 --- a/Tiles/Abyss/SulphurousShale.cs +++ b/Tiles/Abyss/SulphurousShale.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Tiles.Abyss if (WorldGen.InWorld(x, y)) { if (CalamityUtils.ParanoidTileRetrieval(x, y).HasTile && - CalamityUtils.ParanoidTileRetrieval(x, y).TileType == (ushort)ModContent.TileType()) + CalamityUtils.ParanoidTileRetrieval(x, y).TileType == (ushort)ModContent.TileType()) { nearbyVineCount++; } @@ -105,15 +105,15 @@ namespace CalamityMod.Tiles.Abyss Tile up = Main.tile[i, j - 1]; Tile up2 = Main.tile[i, j - 2]; - //place kelp - if (WorldGen.genRand.Next(8) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && up2.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock) + //place sulphur tentacle corals + if (WorldGen.genRand.Next(10) == 0 && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && up2.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock) { up.TileType = (ushort)ModContent.TileType(); up.HasTile = true; up.TileFrameY = 0; - //7 different frames, choose a random one - up.TileFrameX = (short)(WorldGen.genRand.Next(11) * 18); + //18 different frames, choose a random one + up.TileFrameX = (short)(WorldGen.genRand.Next(22) * 18); WorldGen.SquareTileFrame(i, j - 1, true); if (Main.netMode == NetmodeID.Server) diff --git a/Tiles/Abyss/SulphurousVines.cs b/Tiles/Abyss/SulphurousVines.cs index 8b0a01ff04..70c79e3dc8 100644 --- a/Tiles/Abyss/SulphurousVines.cs +++ b/Tiles/Abyss/SulphurousVines.cs @@ -35,6 +35,19 @@ namespace CalamityMod.Tiles.Abyss num = fail ? 1 : 3; } + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + Tile tileAbove = Framing.GetTileSafely(i, j - 1); + + if (!tileAbove.HasTile) + { + WorldGen.KillTile(i, j); + return true; + } + + return true; + } + public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem) { //GIVE VINE ROPE IF SPECIAL VINE BOOK diff --git a/Tiles/Abyss/ViperVines.cs b/Tiles/Abyss/ViperVines.cs index 31d0831016..ee623ff792 100644 --- a/Tiles/Abyss/ViperVines.cs +++ b/Tiles/Abyss/ViperVines.cs @@ -26,6 +26,19 @@ namespace CalamityMod.Tiles.Abyss num = fail ? 1 : 3; } + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + Tile tileAbove = Framing.GetTileSafely(i, j - 1); + + if (!tileAbove.HasTile) + { + WorldGen.KillTile(i, j); + return true; + } + + return true; + } + public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem) { //GIVE VINE ROPE IF SPECIAL VINE BOOK diff --git a/Tiles/CalamityGlobalTile.cs b/Tiles/CalamityGlobalTile.cs index c3b229d13c..61d9b5f01c 100644 --- a/Tiles/CalamityGlobalTile.cs +++ b/Tiles/CalamityGlobalTile.cs @@ -50,8 +50,8 @@ namespace CalamityMod.Tiles (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), - (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), + (ushort)ModContent.TileType(), }; public static List GrowthTiles = new List() diff --git a/Tiles/Crags/Lily/LavaLily4.cs b/Tiles/Crags/Lily/LavaLily4.cs new file mode 100644 index 0000000000..656b9ee373 --- /dev/null +++ b/Tiles/Crags/Lily/LavaLily4.cs @@ -0,0 +1,63 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; +using Terraria.DataStructures; +using Terraria.Enums; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Tiles.Crags.Lily +{ + public class LavaLily4 : ModTile + { + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileSolid[Type] = false; + TileObjectData.newTile.Width = 5; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(3, 2); + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; + TileObjectData.newTile.StyleWrapLimit = 36; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.DrawYOffset = 3; + TileObjectData.addTile(Type); + AddMapEntry(new Color(153, 100, 176)); + DustType = -1; //idk what dust to put here + } + + internal static void DrawLilyTop(int i, int j, Texture2D tex, Rectangle? source, Vector2? offset = null, Vector2? origin = null, bool Glow = false) + { + Tile tile = Main.tile[i, j]; + Vector2 drawPos = new Vector2(i, j).ToWorldCoordinates() - Main.screenPosition + (offset ?? new Vector2(0, -2)); + Color color = Lighting.GetColor(i, j); + + Main.spriteBatch.Draw(tex, drawPos, source, Glow ? Color.White : color, 0, origin ?? source.Value.Size() / 3f, 1f, SpriteEffects.None, 0f); + } + + public static Vector2 TileOffset => Lighting.LegacyEngine.Mode > 1 ? Vector2.Zero : Vector2.One * 12; + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + //draw the glowmask on the lily base + Tile tile = Framing.GetTileSafely(i, j); + Texture2D tex = ModContent.Request("CalamityMod/Tiles/Crags/Lily/LavaLily4Glow").Value; + Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange); + + spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White); + + Texture2D lilyTex = ModContent.Request("CalamityMod/Tiles/Crags/Lily/LavaLily4Top").Value; + Texture2D glowTex = ModContent.Request("CalamityMod/Tiles/Crags/Lily/LavaLily4TopGlow").Value; + + //draw in the middle of the tile so it doesnt draw more than once + if (Framing.GetTileSafely(i, j).TileFrameX == 36 && Framing.GetTileSafely(i, j).TileFrameY == 18) + { + DrawLilyTop(i, j, lilyTex, new Rectangle(0, 0, 178, 184), TileOffset.ToWorldCoordinates(), new Vector2(96, 191), false); + DrawLilyTop(i, j, glowTex, new Rectangle(0, 0, 178, 184), TileOffset.ToWorldCoordinates(), new Vector2(96, 191), true); + } + } + } +} \ No newline at end of file diff --git a/Tiles/Crags/Lily/LavaLily4.png b/Tiles/Crags/Lily/LavaLily4.png new file mode 100644 index 0000000000000000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GM zUuQ&0H05EdFYUCSpTUv7>5kXzXVRWIo=+lN*9=3e=vt1hyr|HOU3xkACHm1( zXt$xJ>_YRE)ipHrHuR&Rv5>$2aNY*T+JD{u{F43+r87gXkjpMYWQSJ4lgL(E4Uwt` z?@d$GThSRa&n+N23hlg))P)Wa6z`X&KtaL%(yF?$bN>hRq*#$SVZhS>0000C@ literal 0 HcmV?d00001 diff --git a/Tiles/Crags/Lily/LavaLily4Glow.png b/Tiles/Crags/Lily/LavaLily4Glow.png new file mode 100644 index 0000000000000000000000000000000000000000..0d76ccdea095760a0ceaf7fbba5e192674c88d7f GIT binary patch literal 591 zcmV-V0Px%2T4RhRCr$Pn=wiRF%*Vp@EoECPz15@0)nNDm5qfLuoWx>E5QS3A&95&0yZLu z9zgLRD`fU9CbGuK@c&6>{%w|JCV4O4`{(5)nQa?=C$Gmstoka{efrE6qHNRR&|(D=xW342sC)1 zLIcfSfyL&wTni_-q6HdUN0+uxi76d@ou+8kq=N>Q+CLn$IfmL5OC317oj{X_!$6b# zuf~i(lR`Bb&{pM?Iu{7E6#YK};oe2AJ(QTY)hk+{V32nkMta*Lv>fS=?+=L*EQ?x*16q4)TP?*v5@0F%#f$kq1wMZa9Q*?rF dqiXUEXpAyOVh}kf00000NkvXXu0mjf000uO2j>6) literal 0 HcmV?d00001 diff --git a/Tiles/Crags/Lily/LavaLily4Top.png b/Tiles/Crags/Lily/LavaLily4Top.png new file mode 100644 index 0000000000000000000000000000000000000000..328eba3368dd334e48b522d5bf0f65c83ddc074a GIT binary patch literal 5094 zcmZu#c_7no{8yB#Tyunt)pCT8dlMS6L=(P_F-OQP%#|x&lTeNkhKv#_GMTyM$hSI>xAf3kPWE2LE!P+VDsdtLZg4#_4twi z?mSUxVaZ7G8$50T^5wEw@>gWRH$=|MmnVz5r{=kG&|f^_D98r$SLMFGR>3feymXmC z!VcHBSV?6Hy=Fjn2%!%m9vl=xL#R_N4YS8f8}CD$cL)Q=GwSU-dEBu_PbxZcdviBt ztiP8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+}?r-{9j4wH_Z_9!&=15DwLN zUI`=Dt6+v8SiJ>Sjd|e)uF?UHFU4y|Zr_VCtB*KDx5xI0GOk=zAjT7H` zbdxUq%fbw6FCcgYyT;5}C51YW4gF+C%Qfp{tA;Q>t}P`R-Vsi(a``~fE*|7sFCfZ9 zk&9&WFF0c2=GE1MFb|#Jp@^ZPSA+Iyvmc9W@QfBDc#ra3p9P|6>V+m7H)*v}{8wXd zCU;QY_ckiXHp<22t^61LAy#d7=d~bBbs8JulWzWRf(!^R9$lYdj_a1m=uDG30Q(ul s*Dzf>dDPt@JOVTm4^NplB0mi}HcJwyHy9w+xgDG7b)+%T&=t$}Kh)9kJpcdz literal 0 HcmV?d00001 diff --git a/Tiles/Crags/Lily/LavaLily4TopGlow.png b/Tiles/Crags/Lily/LavaLily4TopGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..38b92d206412d67f77d3efce0e8ca7aa562793a1 GIT binary patch literal 3528 zcmZ`+dpwi<``;{Ek*OSd}-}n1{U7y4Cx$eZ%_CzIx zT?!BgM9Joa^%>Bz!K-029J~{^*C9azC7&T$K`OXf-$2k!8*9sR*S*A9jzu0sjjrXo zZBKl{j~;rQzh!0bp$GXZJ~3BnA1C$SSwST{yLsUDgs*R{WwoB|vuK%K!Nq&k&~LY( zcEM@~mO7;qW+pJVesF+;iQJjoA9 z{TP$!$^4EfmCMkfT%M19E=EMwPRwGLZl#sMwwDz^Cj8-Y3}eMz8b}5@LE%po+A^y- zFR(E$uFO1yMX8O}2te8}7Y?IzUk`~l0nEQnZiNAf?KbuB&xlADjCgdEUc{n^-%fv$ zQFCI{#niyITJwubswxbs!oP~mQOl}x!f#z3X%`zq-Oc;gj~b&>^_Nvg-f1(aLInUX z-#ehqP)V4{SKUEmt)x?jQ{KC{^WNLHSXQu#*2+R?EWO`Qx(WdUN+4=*f9I>tD3APa zZ<|W~{+Kcr%ZXkK{PI#0Q{F@rb|>l*B47e*Z79wWoA>j>GFn*^Roivf5XXql(rYf% zMCl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v@t$>*Ff+3ynz z*7&lxiS?#GvPMrc8L;Wbj*Q00H^OIzS?GHV+KBRg!fas%<$-pZ^kgXn+78MJ=GY}lJHdAFQ*1AS+4%|HXYG@UdF6A@A}d#^Y9)I7uSV+-6^+)W-Ikt za};KZ*^vU9KJ|PSTU8eCyq4+I&n|Iyc9p%_Ug(U}a#Nel%+jsIbZc`wGL*ndZ;F?tH_bKp!M&b&{1NHI47xnom%mi~ z<|24xDTCV=j_@n+tI^FAG)%ngUd_+MKCLho36FO%Mbav4F_ANZBXV@*=q0xH9e`gB9?gj()G%mwjEY}TkcZ{;h^<11o26sObuFx^g( zboV??dg4#Zji)yB5A!d#1-wd`c1)^ElA{H|VDzB8Qd408QHS)UwVx994!9O#I%`toH3M-#@$iD$%;o!~y literal 0 HcmV?d00001 diff --git a/Tiles/Crags/Lily/LavaLily5.cs b/Tiles/Crags/Lily/LavaLily5.cs new file mode 100644 index 0000000000..2a0457980a --- /dev/null +++ b/Tiles/Crags/Lily/LavaLily5.cs @@ -0,0 +1,63 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; +using Terraria.DataStructures; +using Terraria.Enums; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Tiles.Crags.Lily +{ + public class LavaLily5 : ModTile + { + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileSolid[Type] = false; + TileObjectData.newTile.Width = 5; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(3, 2); + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; + TileObjectData.newTile.StyleWrapLimit = 36; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.DrawYOffset = 3; + TileObjectData.addTile(Type); + AddMapEntry(new Color(153, 100, 176)); + DustType = -1; //idk what dust to put here + } + + internal static void DrawLilyTop(int i, int j, Texture2D tex, Rectangle? source, Vector2? offset = null, Vector2? origin = null, bool Glow = false) + { + Tile tile = Main.tile[i, j]; + Vector2 drawPos = new Vector2(i, j).ToWorldCoordinates() - Main.screenPosition + (offset ?? new Vector2(0, -2)); + Color color = Lighting.GetColor(i, j); + + Main.spriteBatch.Draw(tex, drawPos, source, Glow ? Color.White : color, 0, origin ?? source.Value.Size() / 3f, 1f, SpriteEffects.None, 0f); + } + + public static Vector2 TileOffset => Lighting.LegacyEngine.Mode > 1 ? Vector2.Zero : Vector2.One * 12; + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + //draw the glowmask on the lily base + Tile tile = Framing.GetTileSafely(i, j); + Texture2D tex = ModContent.Request("CalamityMod/Tiles/Crags/Lily/LavaLily5Glow").Value; + Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange); + + spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White); + + Texture2D lilyTex = ModContent.Request("CalamityMod/Tiles/Crags/Lily/LavaLily5Top").Value; + Texture2D glowTex = ModContent.Request("CalamityMod/Tiles/Crags/Lily/LavaLily5TopGlow").Value; + + //draw in the middle of the tile so it doesnt draw more than once + if (Framing.GetTileSafely(i, j).TileFrameX == 36 && Framing.GetTileSafely(i, j).TileFrameY == 18) + { + DrawLilyTop(i, j, lilyTex, new Rectangle(0, 0, 192, 206), TileOffset.ToWorldCoordinates(), new Vector2(114, 209), false); + DrawLilyTop(i, j, glowTex, new Rectangle(0, 0, 192, 206), TileOffset.ToWorldCoordinates(), new Vector2(114, 209), true); + } + } + } +} \ No newline at end of file diff --git a/Tiles/Crags/Lily/LavaLily5.png b/Tiles/Crags/Lily/LavaLily5.png new file mode 100644 index 0000000000000000000000000000000000000000..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Iu}E<_Ev}<9y=|kSoJ3V%xX8+@huD~pJbckl8YLbr*eI4P}Ezfz5v!A&y z<9VX?a7{M*KMtRfpTiSF9%0(@^vKjRR!C>0=~a2XM#;NEx2x};{aHi@p_gJj7XK>*GWd z7JybgmS;y29fWrODF7A|^`Ih!j;bJ>pPvGeGsF2+AFf7${{R*Awt^cA^@;!h002ov KPDHLkV1fWOHVEVZ literal 0 HcmV?d00001 diff --git a/Tiles/Crags/Lily/LavaLily5Glow.png b/Tiles/Crags/Lily/LavaLily5Glow.png new file mode 100644 index 0000000000000000000000000000000000000000..b51e6b0b1b11efff90c5e00da6fa9d65099012a3 GIT binary patch literal 579 zcmV-J0=)f+P)Px${YgYYRCr$P*)dAQKokbx}(t`?Hq)%}%F)^1&d@GM@=L!yrlW=u5VGaxiVQPE==w7f2BwxZRjCDpId zgdQ~?^);_P(Y26I20C7oy=`O&ZFEVfp(P=5T%~tfMn14HgoaUeH%f+11b zZE)>e5k(roVhjCy?vzvRE0ywffBZbBQ` z4~8D=`2HpOchLOwA^cVAnoa1j5)<`x2W@oT=3@wLMD7kce%LAw^ZQS((a2B`8mXDk zYbrZMcS}e784x-lm55T*&J%GgLwdMR^s+7gkdrO>o@$^=A|YlI8lkA@L1+aMqJ+>0 zMMV!nE07Q+ghnVTdJtNHgeW02LQ&C!&`Zo;o R1Lpt$002ovPDHLkV1iL1`Ktf` literal 0 HcmV?d00001 diff --git a/Tiles/Crags/Lily/LavaLily5Top.png b/Tiles/Crags/Lily/LavaLily5Top.png new file mode 100644 index 0000000000000000000000000000000000000000..d78dfda67b36c0f1df4caa88961d9b5e5ac6dcc3 GIT binary patch literal 6024 zcmYLNWmr_<)_o@!hLTcJU}z8!7(sd%kP;*WC6tmJML=4m1`r7;kq#LU6p#`@Nudq+9NI@Ao|4k8{qy{XToG^{%t_jxf;Eq@iS^1OU)n*HSYieVa&64-!Fo<3?zF zNFRuYp{6P*>AAQB0JG|KHI-YBE!Ql3qb$`g5LHE=Yr0kOP+q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=Nm(fOM8IX9){S0G(1H$M8zjeFnbt@P|K@ zuWl9U-MRG^p!W*G+atX2_KVlWv(i=ltkC)n@f&vzblgzY;(_Le8{}OWbQtB$%j+$4tf<@s$4)O3qGu^<^>Lz?XENwsH*;D>FB`4Idzy93*Zru hOnbS%v;?)ubtg;XdY7Ah4TlIYF)}kOJx-1S_#gUub1DD; literal 0 HcmV?d00001 diff --git a/Tiles/Crags/Lily/LavaLily6.cs b/Tiles/Crags/Lily/LavaLily6.cs new file mode 100644 index 0000000000..916f4bdd13 --- /dev/null +++ b/Tiles/Crags/Lily/LavaLily6.cs @@ -0,0 +1,63 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; +using Terraria.DataStructures; +using Terraria.Enums; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Tiles.Crags.Lily +{ + public class LavaLily6 : ModTile + { + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileSolid[Type] = false; + TileObjectData.newTile.Width = 5; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(3, 2); + TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 }; + TileObjectData.newTile.StyleWrapLimit = 36; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.DrawYOffset = 3; + TileObjectData.addTile(Type); + AddMapEntry(new Color(153, 100, 176)); + DustType = -1; //idk what dust to put here + } + + internal static void DrawLilyTop(int i, int j, Texture2D tex, Rectangle? source, Vector2? offset = null, Vector2? origin = null, bool Glow = false) + { + Tile tile = Main.tile[i, j]; + Vector2 drawPos = new Vector2(i, j).ToWorldCoordinates() - Main.screenPosition + (offset ?? new Vector2(0, -2)); + Color color = Lighting.GetColor(i, j); + + Main.spriteBatch.Draw(tex, drawPos, source, Glow ? Color.White : color, 0, origin ?? source.Value.Size() / 3f, 1f, SpriteEffects.None, 0f); + } + + public static Vector2 TileOffset => Lighting.LegacyEngine.Mode > 1 ? Vector2.Zero : Vector2.One * 12; + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + //draw the glowmask on the lily base + Tile tile = Framing.GetTileSafely(i, j); + Texture2D tex = ModContent.Request("CalamityMod/Tiles/Crags/Lily/LavaLily6Glow").Value; + Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange); + + spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White); + + Texture2D lilyTex = ModContent.Request("CalamityMod/Tiles/Crags/Lily/LavaLily6Top").Value; + Texture2D glowTex = ModContent.Request("CalamityMod/Tiles/Crags/Lily/LavaLily6TopGlow").Value; + + //draw in the middle of the tile so it doesnt draw more than once + if (Framing.GetTileSafely(i, j).TileFrameX == 36 && Framing.GetTileSafely(i, j).TileFrameY == 18) + { + DrawLilyTop(i, j, lilyTex, new Rectangle(0, 0, 178, 198), TileOffset.ToWorldCoordinates(), new Vector2(96, 199), false); + DrawLilyTop(i, j, glowTex, new Rectangle(0, 0, 178, 198), TileOffset.ToWorldCoordinates(), new Vector2(96, 199), true); + } + } + } +} \ No newline at end of file diff --git a/Tiles/Crags/Lily/LavaLily6.png b/Tiles/Crags/Lily/LavaLily6.png new file mode 100644 index 0000000000000000000000000000000000000000..8c3eda7fea19a2e45f2f2c4cb50339e0b879a39f GIT binary patch literal 1512 zcmVP)Px)p-DtRRCr$Pn{Q~>&-Ftp( z*K^;T{m#zs{P~{GdG2$bbMDX~;gg60LlbEwG%}=Ugq}COzW3kxJa)EO#-yJIdai@e z3C+Nu7aDTW3!Eh)rzX0u+Q^ICZlS_h#$tE^2%TgUH~&4p;XF=}{;)uT(DKUmL! zXvc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foOap%qHY#lg^Els-zH1|j{rXhk9{8`k0`=h5tkU}HfN?$bFOf_!GBP(4!{2YeL`V{v-e)9&8fEuiC3>vo%_m6;^mpniw=YQmIWJ~7j`o{w2 ze>~)8YeHA|sp+xMp{+ti_O6G`{Z*QmLb(=B?V0I0_-iilSM}mL_fiyVL$?ZzsKA$;b{O$*r5hj8H5{a?PSH z04*??G)trDnjXF13rB6Ful8C=*3{1Pn_K$V_~dM{O>?uheZ13k4%Ip7nI!vK1sfzx*+S#WjwYmTf4}WJO$4 zHe*4&oq=kA42&VDt9q?tJ{Q|4#f-o4rW3(pyYjX~Lv=q_-)uj6#$HL|lrL-$9|4RK z$g~NvJNU?`WrrAqJz^OP89X(1@5;qz{qC~LhMd$Gx-i+aszS%r3E3@zP?^>zA}{J{ ze>vymCY~pANf{PoLOAxV6+~oedX4R+hhy;X+ZO)a@Vr5|^FwMXC&dylD=R`!KeVRCu8z0Fb$_v~Am4kj_1dQ_mvV2C5+mNQRl>e z=Y)}t%OdQ`BJ9ciu^e>#t*Qw}cwbD)>Q_?x`)$fjY*Mg&unB96yTsGgpXtGi*$ruj z!!oS6`Tm=olUR9ZE2r%F-L0z$ATFC%Ae+vQ0tfF{ooOUnuXgqlkJquoyAj1@apha= z`JnT+tgU>|>s}LA98l=qXeRsy&fp2`4q#_!zd|&)kGkULE-2NoWNr71+{g6NxCHG! zdDi!jzK9QPsgFlCC}iYegJ6r)WB|y^5p?!%%l+@Cne>PW=3BBW2G{-wuCncNZkxB} Rkgqf;9>EN?F`Ca}{s$)GYQX>i literal 0 HcmV?d00001 diff --git a/Tiles/Crags/Lily/LavaLily6TopGlow.png b/Tiles/Crags/Lily/LavaLily6TopGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..e7cacb0baf977516218934a5e4d4d1f7fb7c88c6 GIT binary patch literal 3909 zcmYLMdpy(o|NqQf%Jr0*FicD2+LyviEVmU!DYx8mtlW*wojE&|{2=9uv0jNyqcL0#zJ8yUPYJ%T#i9bUPt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E-x~7{|3?0S;pN%g5gXimv7En-7B5&sydxQ{d;0!!l&j&*O0}RXDdOU zN|Z&v*$Jpw3?)|zG1{~?d?NaKbf|xRpuV%t#)+}8)5a=d`eV^3EBtHEgIeG9H4=!$ zGQE+43lO%a_9!j%u~y4tHRmbjDF`}W=;;dZ<2J|xrd?^0V%Yqi5K%T9o( zx;_)24aWI-1(|>nKP`Y3M)NFjH@iWI+OOugqirArr7p&RFD=7J6!cIOzZ-<{j|@2- zs}l(_VkFsi9m5R_J^h9`HvrA7GHcLs1;~o~oyJ?G0a5+_!hj-1EI#MiG4BSDS2-6W zGDJVBUB^MwT9McT8|w7*f8Aw%U81N@YfZZ1eN 0f && modPlayer.ZoneSulphur) + if (modPlayer.SulphWaterUIOpacity > 0f && (modPlayer.ZoneSulphur || player.Calamity().ZoneAbyssLayer1)) DrawWaterBar(spriteBatch, modPlayer, screenPos); else { diff --git a/Utilities/TileFraming.cs b/Utilities/TileFraming.cs index a7499120c9..6cec98ca77 100644 --- a/Utilities/TileFraming.cs +++ b/Utilities/TileFraming.cs @@ -1,4 +1,5 @@ using CalamityMod.Tiles.Abyss; +using CalamityMod.Tiles.Abyss.AbyssAmbient; using CalamityMod.Tiles.Astral; using CalamityMod.Tiles.AstralDesert; using CalamityMod.Tiles.AstralSnow; @@ -62,6 +63,8 @@ namespace CalamityMod PlantCheckAgainst[ModContent.TileType()] = new int[1] { ModContent.TileType() }; PlantCheckAgainst[ModContent.TileType()] = new int[1] { ModContent.TileType() }; PlantCheckAgainst[ModContent.TileType()] = new int[1] { ModContent.TileType() }; + PlantCheckAgainst[ModContent.TileType()] = new int[1] { ModContent.TileType() }; + PlantCheckAgainst[ModContent.TileType()] = new int[2] { ModContent.TileType(), ModContent.TileType() }; VineToGrass = new Dictionary { diff --git a/Utilities/WorldgenUtils.cs b/Utilities/WorldgenUtils.cs index 5c1fbcdbf8..215a38a0c4 100644 --- a/Utilities/WorldgenUtils.cs +++ b/Utilities/WorldgenUtils.cs @@ -41,6 +41,28 @@ namespace CalamityMod } } + public static void GrowVines(int VineX, int VineY, int numVines, ushort vineType, bool finished = false) + { + for (int Y = VineY; Y <= VineY + numVines && !finished; Y++) + { + Tile tileBelow = Framing.GetTileSafely(VineX, Y + 1); + + if ((!tileBelow.HasTile || tileBelow.TileType == TileID.Cobweb) && WorldGen.InWorld(VineX, Y)) + { + WorldGen.PlaceTile(VineX, Y, vineType); + } + else + { + finished = true; + } + + if (numVines <= 1) + { + finished = true; + } + } + } + /// /// Settles all liquids in the world. /// diff --git a/Walls/BrimstoneSlabWall.cs b/Walls/BrimstoneSlabWall.cs index 086a7b8d03..844705176b 100644 --- a/Walls/BrimstoneSlabWall.cs +++ b/Walls/BrimstoneSlabWall.cs @@ -21,6 +21,11 @@ namespace CalamityMod.Walls return false; } + public override bool CanExplode(int i, int j) + { + return false; + } + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) diff --git a/Walls/PyreMantleWall.cs b/Walls/PyreMantleWall.cs new file mode 100644 index 0000000000..151de556ec --- /dev/null +++ b/Walls/PyreMantleWall.cs @@ -0,0 +1,31 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Walls +{ + public class PyreMantleWall : ModWall + { + public override void SetStaticDefaults() + { + DustType = 33; + AddMapEntry(new Color(6, 10, 54)); + } + + public override void RandomUpdate(int i, int j) + { + if (Main.tile[i, j].LiquidAmount <= 0 && j < Main.maxTilesY - 205) + { + Main.tile[i, j].LiquidAmount = 255; + Main.tile[i, j].Get().LiquidType = LiquidID.Water; + } + } + + public override void KillWall(int i, int j, ref bool fail) => fail = true; + + public override bool CanExplode(int i, int j) => false; + + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; + } +} diff --git a/Walls/PyreMantleWall.png b/Walls/PyreMantleWall.png new file mode 100644 index 0000000000000000000000000000000000000000..722445225294dab790f711da86fd6c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lWed0Fy^SW`E% zty;t8s=-Do%WGq|eD*C*fcvz!K!kZ<(bygr2*@%gq?&&XEcyUrpG|g>9Y;7JvQIUr zmLo5QPs4AuYBylgMBoH(JJYg{IYwVM9suv1Q--T({uO%RIhYJNNYFTgQfhL&fbp6e zTbz_ysEO|KPjCg&c70T;EWus+!jO1nl;g1HwC1@t*hy*f&>3a!B7WgH%S%9tl5YKH zU0e|WC1))HG;OSMDmH8X=dSmNtk|N5cxkfG+H3mtuyWLmmLWvLXX;DX^}GWXLR=7} z)!}w`7eyIc<@}M);udzaH6=OO71fhQgm#YtH}|-Gt+OCVtLQe#ZcfkST1J8ykJtPE=0XsLm{ooTT9_#w?XQ;TO!mWYbMJQ9qy`4=ArV2e^ifEHg z;HD(~3pfKxzBb5ym9zT+PwXk)*n_u6OS{N-#>?x%EAEVZd|}x7jHNm9>OAT-+&|tx zK>nk7RM*UPRMOsJosP5%8}dnzp5~@p0CM=s`od}*@Hx{m$l19azxfKP=v}iXF!bcM zgmDlfawnNEQfTvZFB(>6|AtNeep;6KQS7hD%Bm3tK^y<2e9I>B|@@azyQ==?$2~>fg^!4|LQKMv!ld z;hOmB=2&73Rm~b7h(yS!t3?FrsSp6Lt+s?7Y(F~O+q{J%Wk+cc87qnDB$=S_k z$g#Hf42DA`Rx}PT*}*K`V^-&~!Piv|A~Pp^RGi)HZK9H%B(XwvZUy?^)(4B#n^}NLEWAoXI-{3#HtS)x}xA5uR>1E&_CbiI$N6s8SE&~DX6@mBK>y_7k P*Dgm~JPy@61zq?*t0^m` literal 0 HcmV?d00001 diff --git a/World/Abyss.cs b/World/Abyss.cs index ddb1382e58..bdb9d47b33 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -11,6 +11,7 @@ using CalamityMod.Tiles.Abyss.AbyssAmbient; using CalamityMod.Tiles.FurnitureVoid; using CalamityMod.Tiles.Ores; using CalamityMod.Walls; +using CalamityMod.DataStructures; using Microsoft.Xna.Framework; using System; using System.Linq; @@ -19,6 +20,9 @@ using Terraria; using Terraria.ID; using Terraria.IO; using Terraria.ModLoader; +using Terraria.GameContent.Generation; +using Terraria.DataStructures; +using Terraria.WorldBuilding; namespace CalamityMod.World { @@ -64,56 +68,61 @@ namespace CalamityMod.World tile.LiquidAmount = 255; } - bool canConvert = tile.HasTile && tile.TileType < TileID.Count && tile.TileType != TileID.DyePlants && tile.TileType != TileID.Trees && - tile.TileType != TileID.PalmTree && tile.TileType != TileID.Sand && tile.TileType != TileID.Containers && tile.TileType != TileID.Coral && - tile.TileType != TileID.BeachPiles && tile.TileType != ModContent.TileType(); + bool canConvert = tile.HasTile && tile.TileType < TileID.Count && tile.TileType != ModContent.TileType(); + //normally i would organize each layer of blocks by the order of how they are placed in the abyss + //but i cannot be bothered, and when i do it, it keeps messing up or making certain parts like transitions not gen right + //i have at least left comments so people reading will know what does what if (abyssIndex2 > (rockLayer - Main.maxTilesY / 15) - WorldGen.genRand.Next(30)) { - //dithering on the edge of the abyss + //dithering on the edge of the abyss, checks for the exposed edge depending on worldside if ((AtLeftSideOfWorld && abyssIndex > abyssChasmX + 145) || (!AtLeftSideOfWorld && abyssIndex < abyssChasmX - 145)) { if (WorldGen.genRand.NextBool(2)) { WorldGen.KillTile(abyssIndex, abyssIndex2); - if (abyssIndex2 > (rockLayer + y * 0.262)) + //layer 4 + if (abyssIndex2 > (rockLayer + y * 0.275)) { - WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); + WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType()); } - else if (abyssIndex2 > (rockLayer + y * 0.140) && WorldGen.genRand.NextBool(3)) + //layer 3-4 dithering transition + else if (abyssIndex2 > (rockLayer + y * 0.270) && WorldGen.genRand.NextBool(2)) { - WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); + WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType()); } + //layer 3 else if (abyssIndex2 > (rockLayer + y * 0.145)) { - if (WorldGen.genRand.NextBool(3)) - { - WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); - } - else - { - WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); - } + WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType()); } - else if (abyssIndex2 >= rockLayer - 20 && abyssIndex2 <= rockLayer - 10) + //layer 2-3 dithering transition + else if (abyssIndex2 > (rockLayer + y * 0.140) && WorldGen.genRand.NextBool(2)) + { + WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType()); + } + //layer 1-2 dithering transition + else if (abyssIndex2 >= rockLayer - 10 && abyssIndex2 <= rockLayer) { if (WorldGen.genRand.NextBool(2)) { - WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); + WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType()); } else { - WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); + WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType()); } } - else if (abyssIndex2 <= rockLayer - 20) + //layer 1 + else if (abyssIndex2 <= rockLayer - 10) { - WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); + WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType()); } + //layer 2 (default block for the abyss) else { - WorldGen.PlaceTile(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); + WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType()); } } } @@ -121,49 +130,51 @@ namespace CalamityMod.World { if (canConvert) { - if (abyssIndex2 > (rockLayer + y * 0.262)) + //layer 4 + if (abyssIndex2 > (rockLayer + y * 0.275)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } - else if (abyssIndex2 > (rockLayer + y * 0.142) && WorldGen.genRand.NextBool(3)) + //layer 3-4 dithering transition + else if (abyssIndex2 > (rockLayer + y * 0.270) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } + //layer 3 else if (abyssIndex2 > (rockLayer + y * 0.145)) { - if (WorldGen.genRand.NextBool(3)) - { - tile.TileType = (ushort)ModContent.TileType(); - } - else - { - tile.TileType = (ushort)ModContent.TileType(); - } - - tile.WallType = (ushort)ModContent.WallType(); + tile.TileType = (ushort)ModContent.TileType(); + tile.WallType = (ushort)ModContent.WallType(); } - else if (abyssIndex2 >= rockLayer - 20 && abyssIndex2 <= rockLayer) + //layer 2-3 dithering transition + else if (abyssIndex2 > (rockLayer + y * 0.140) && WorldGen.genRand.NextBool(2)) + { + tile.TileType = (ushort)ModContent.TileType(); + tile.WallType = (ushort)ModContent.WallType(); + } + //layer 1-2 dithering transition + else if (abyssIndex2 >= rockLayer - 10 && abyssIndex2 <= rockLayer) { if (WorldGen.genRand.NextBool(2)) { - WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType()); tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } else { - WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType()); tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } } - else if (abyssIndex2 <= rockLayer - 20) + //layer 1 + else if (abyssIndex2 <= rockLayer - 10) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } + //layer 2 (default block for the abyss) else { tile.TileType = (ushort)ModContent.TileType(); @@ -173,49 +184,52 @@ namespace CalamityMod.World else if (!tile.HasTile) { tile.Get().HasTile = true; - if (abyssIndex2 > (rockLayer + y * 0.262)) + + //layer 4 + if (abyssIndex2 > (rockLayer + y * 0.275)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } - else if (abyssIndex2 > (rockLayer + y * 0.142) && WorldGen.genRand.NextBool(3)) + //layer 3-4 dithering transition + else if (abyssIndex2 > (rockLayer + y * 0.270) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } + //layer 3 else if (abyssIndex2 > (rockLayer + y * 0.145)) { - if (WorldGen.genRand.NextBool(3)) - { - tile.TileType = (ushort)ModContent.TileType(); - } - else - { - tile.TileType = (ushort)ModContent.TileType(); - } - - tile.WallType = (ushort)ModContent.WallType(); + tile.TileType = (ushort)ModContent.TileType(); + tile.WallType = (ushort)ModContent.WallType(); } - else if (abyssIndex2 >= rockLayer - 20 && abyssIndex2 <= rockLayer) + //layer 2-3 dithering transition + else if (abyssIndex2 > (rockLayer + y * 0.140) && WorldGen.genRand.NextBool(2)) + { + tile.TileType = (ushort)ModContent.TileType(); + tile.WallType = (ushort)ModContent.WallType(); + } + //layer 1-2 dithering transition + else if (abyssIndex2 >= rockLayer - 10 && abyssIndex2 <= rockLayer) { if (WorldGen.genRand.NextBool(2)) { - WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType()); tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } else { - WorldGen.PlaceTile(abyssIndex, abyssIndex2, ModContent.TileType()); tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } } - else if (abyssIndex2 <= rockLayer - 20) + //layer 1 + else if (abyssIndex2 <= rockLayer - 10) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } + //layer 2 (default block for the abyss) else { tile.TileType = (ushort)ModContent.TileType(); @@ -227,7 +241,7 @@ namespace CalamityMod.World } } - //just place three craters next to each other to make it wider + //just place three craters next to each other to make it wider, genuinely could not understand the ChasmGenerator generation code MiscWorldgenRoutines.ChasmGenerator(abyssChasmX + 25, (int)WorldGen.worldSurfaceLow, AbyssChasmBottom, true); MiscWorldgenRoutines.ChasmGenerator(abyssChasmX, (int)WorldGen.worldSurfaceLow + 65, AbyssChasmBottom, true); MiscWorldgenRoutines.ChasmGenerator(abyssChasmX - 25, (int)WorldGen.worldSurfaceLow, AbyssChasmBottom, true); @@ -246,10 +260,9 @@ namespace CalamityMod.World //place eidolon snail fossil int realFossilY = 0; bool placedFossil = false; - - //place islands to hide the fossil (funny) - AbyssIsland(abyssChasmX + 55, AbyssChasmBottom + 25, 55, 75, 55, 75, false, true, true, false); - AbyssIsland(abyssChasmX - 55, AbyssChasmBottom + 25, 55, 75, 55, 75, false, true, true, false); + + AbyssIsland(abyssChasmX + 50, AbyssChasmBottom + 25, 65, 75, 65, 75, ModContent.TileType(), false, true, false); + AbyssIsland(abyssChasmX - 50, AbyssChasmBottom + 25, 65, 75, 65, 75, ModContent.TileType(), false, true, false); while (!placedFossil) { @@ -290,78 +303,103 @@ namespace CalamityMod.World } //place a single abyss island under the terminus shrine - AbyssIsland(abyssChasmX, AbyssChasmBottom + 5, 65, 75, 40, 45, false, false, true, false); + AbyssIsland(abyssChasmX, AbyssChasmBottom + 5, 65, 75, 40, 45, ModContent.TileType(), false, true, false); //place terminus shrine UndergroundShrines.SpecialHut((ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.WallType(), UndergroundShrines.UndergroundShrineType.Abyss, abyssChasmX, AbyssChasmBottom); //place islands in the sulphuric depths layer - for (int sulphurIslandY = (rockLayer - Main.maxTilesY / 15) - 5; sulphurIslandY <= rockLayer - 15; sulphurIslandY++) + //start placing islands at the world surface so the abyss hole isnt completely empty + int abyssStartHeight = (SulphurousSea.YStart + (int)Main.worldSurface) / 2 + 90; + for (int sulphurIslandY = abyssStartHeight; sulphurIslandY <= rockLayer - 15; sulphurIslandY++) { - if (WorldGen.genRand.NextBool(2)) + int islandLocationX = abyssChasmX; + int islandLocationOffset = WorldGen.genRand.Next(15, 22); + int randomPositon = WorldGen.genRand.Next(35, 80); + int randomIsland = WorldGen.genRand.Next(4); + switch (randomIsland) { - int randomIsland = WorldGen.genRand.Next(3); - switch (randomIsland) - { - case 0: - AbyssIsland(abyssChasmX - WorldGen.genRand.Next(-40, 40), sulphurIslandY, 55, 75, 35, 45, false, false, false, true); - break; - case 1: - AbyssIsland(abyssChasmX + WorldGen.genRand.Next(55, 78), sulphurIslandY, 55, 75, 35, 45, false, false, false, true); - AbyssIsland(abyssChasmX - WorldGen.genRand.Next(10, 20), sulphurIslandY, 55, 75, 35, 45, false, false, false, true); - break; - case 2: - AbyssIsland(abyssChasmX - WorldGen.genRand.Next(55, 78), sulphurIslandY, 55, 75, 35, 45, false, false, false, true); - AbyssIsland(abyssChasmX + WorldGen.genRand.Next(10, 20), sulphurIslandY, 55, 75, 35, 45, false, false, false, true); - break; - } - - //increase y value so islands cant be spammed on top of each other - sulphurIslandY += 15; + case 0: + //3 islands, middle one with chest + AbyssIsland(islandLocationX - randomPositon - 10, sulphurIslandY + 15, 60, 65, 45, 55, ModContent.TileType(), false, false, false); + AbyssIsland(islandLocationX, sulphurIslandY, 60, 65, 45, 55, ModContent.TileType(), false, false, false); + AbyssIsland(islandLocationX + randomPositon + 10, sulphurIslandY + 15, 60, 65, 45, 55, ModContent.TileType(), false, false, false); + break; + case 1: + //3 islands, left, middle one with chest, and right + AbyssIsland(islandLocationX - randomPositon, sulphurIslandY + 10, 60, 85, 30, 35, ModContent.TileType(), false, false, false); + AbyssIsland(islandLocationX, sulphurIslandY + 15, 60, 85, 30, 35, ModContent.TileType(), false, false, false); + AbyssIsland(islandLocationX + randomPositon, sulphurIslandY, 60, 85, 30, 35, ModContent.TileType(), false, false, false); + islandLocationX += 30; + break; + case 2: + //1 island, right only + AbyssIsland(islandLocationX - randomPositon, sulphurIslandY + 10, 55, 65, 30, 35, ModContent.TileType(), false, false, false); + islandLocationX -= 30; + break; + case 3: + //1 island, right only + AbyssIsland(islandLocationX + randomPositon, sulphurIslandY + 15, 60, 85, 30, 55, ModContent.TileType(), false, false, false); + islandLocationX += 25; + break; + case 4: + //2 islands, left and right + AbyssIsland(islandLocationX - randomPositon, sulphurIslandY, 60, 75, 30, 40, ModContent.TileType(), false, false, false); + AbyssIsland(islandLocationX + randomPositon, sulphurIslandY + 5, 60, 75, 30, 40, ModContent.TileType(), false, false, false); + islandLocationX -= 25; + break; } + + //increase y value so islands cant be spammed on top of each other + sulphurIslandY += islandLocationOffset; } - //normal abyss islands - int islandLocationOffset = 30; + //islands for layer 2 int islandLocationY = rockLayer; for (int islands = 0; islands < maxAbyssIslands; islands++) { int islandLocationX = abyssChasmX; - int randomIsland = WorldGen.genRand.Next(5); //0 1 2 3 4 - bool hasVoidstone = islandLocationY > (rockLayer + y * 0.143); + int islandLocationOffset = WorldGen.genRand.Next(18, 25); + int randomPositon = WorldGen.genRand.Next(45, 80); AbyssIslandPositions[TotalPlacedIslandsSoFar].Y = islandLocationY; - int randomPositon = WorldGen.genRand.Next(38, 65); + + int randomIsland = WorldGen.genRand.Next(5); switch (randomIsland) { case 0: - AbyssIsland(islandLocationX, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone, false); - AbyssIsland(islandLocationX + randomPositon, islandLocationY + 15, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone, false); - AbyssIsland(islandLocationX - randomPositon, islandLocationY + 15, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone, false); + //3 islands, middle one with chest + AbyssIsland(islandLocationX - randomPositon - 10, islandLocationY + 15, 60, 65, 30, 35, ModContent.TileType(), false, true, false); + AbyssIsland(islandLocationX, islandLocationY, 60, 65, 30, 35, ModContent.TileType(), true, true, true); + AbyssIsland(islandLocationX + randomPositon + 10, islandLocationY + 15, 60, 65, 30, 35, ModContent.TileType(), false, true, false); break; case 1: - AbyssIsland(islandLocationX + randomPositon, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone, false); - AbyssIsland(islandLocationX, islandLocationY + 15, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone, false); - AbyssIsland(islandLocationX - randomPositon, islandLocationY + 10, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone, false); + //3 islands, left, middle one with chest, and right + AbyssIsland(islandLocationX - randomPositon, islandLocationY + 10, 60, 65, 30, 35, ModContent.TileType(), false, true, true); + AbyssIsland(islandLocationX, islandLocationY + 15, 60, 65, 30, 35, ModContent.TileType(), true, true, false); + AbyssIsland(islandLocationX + randomPositon, islandLocationY, 60, 65, 30, 35, ModContent.TileType(), false, true, false); islandLocationX += 30; break; case 2: - AbyssIsland(islandLocationX - randomPositon, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone, false); - AbyssIsland(islandLocationX + randomPositon, islandLocationY + 10, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone, false); - AbyssIsland(islandLocationX, islandLocationY + 15, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone, false); + //3 islands, none with chest + AbyssIsland(islandLocationX - randomPositon - 20, islandLocationY, 55, 65, 30, 35, ModContent.TileType(), false, true, true); + AbyssIsland(islandLocationX + 15, islandLocationY + 15, 55, 65, 30, 35, ModContent.TileType(), false, true, false); + AbyssIsland(islandLocationX + randomPositon + 20, islandLocationY + 10, 55, 65, 30, 35, ModContent.TileType(), false, true, false); islandLocationX -= 30; break; case 3: - AbyssIsland(islandLocationX + randomPositon, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone, false); - AbyssIsland(islandLocationX - 5, islandLocationY + 5, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone, false); - AbyssIsland(islandLocationX - randomPositon, islandLocationY + 15, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone, false); + //3 islands, left, middle, and right one with chest + AbyssIsland(islandLocationX - randomPositon, islandLocationY + 15, 60, 65, 30, 45, ModContent.TileType(), false, true, false); + AbyssIsland(islandLocationX - 15, islandLocationY + 5, 60, 65, 30, 45, ModContent.TileType(), false, true, false); + AbyssIsland(islandLocationX + randomPositon, islandLocationY, 60, 65, 30, 45, ModContent.TileType(), true, true, true); islandLocationX += 25; break; case 4: - AbyssIsland(islandLocationX - randomPositon, islandLocationY, 60, 66, 30, 36, true, false, hasVoidstone, false); - AbyssIsland(islandLocationX + 5, islandLocationY + 15, 60, 66, 30, 36, false, plantyMushSide, hasVoidstone, false); - AbyssIsland(islandLocationX + randomPositon, islandLocationY + 5, 60, 66, 30, 36, false, !plantyMushSide, hasVoidstone, false); + //3 islands, left one with chest, middle, and right + AbyssIsland(islandLocationX - randomPositon, islandLocationY, 60, 75, 30, 40, ModContent.TileType(), true, true, false); + AbyssIsland(islandLocationX, islandLocationY + 15, 60, 75, 30, 40, ModContent.TileType(), false, true, false); + AbyssIsland(islandLocationX + randomPositon, islandLocationY + 5, 60, 75, 30, 40, ModContent.TileType(), false, true, false); islandLocationX -= 25; break; } @@ -370,12 +408,66 @@ namespace CalamityMod.World TotalPlacedIslandsSoFar++; islandLocationY += islandLocationOffset; - if (islandLocationY >= AbyssChasmBottom - 50) + + //do not place anymore islands when the third layer is reached + if (islandLocationY >= (rockLayer + y * 0.145) - 10) + { break; + } + } + + //islands for layer 3 + for (int thermalIslandY = (int)(rockLayer + y * 0.145); thermalIslandY <= (int)(rockLayer + y * 0.270); thermalIslandY++) + { + int islandLocationX = abyssChasmX; + int islandLocationOffset = WorldGen.genRand.Next(18, 30); + int randomPositon = WorldGen.genRand.Next(45, 80); + bool hasScoria = WorldGen.genRand.NextBool(2); //50% chance to place scoria in each island instead of planty mush + + int randomIsland = WorldGen.genRand.Next(4); + switch (randomIsland) + { + case 0: + //3 islands, left, middle, and right + AbyssIsland(islandLocationX - randomPositon - 10, thermalIslandY + 15, 60, 65, 45, 55, ModContent.TileType(), false, true, false); + AbyssIsland(islandLocationX, thermalIslandY, 60, 65, 45, 55, ModContent.TileType(), false, true, true); + AbyssIsland(islandLocationX + randomPositon + 10, thermalIslandY + 15, 60, 65, 45, 55, ModContent.TileType(), false, true, false); + islandLocationX -= 30; + break; + case 1: + //3 islands, left, middle (slightly lower), and right + AbyssIsland(islandLocationX - randomPositon, thermalIslandY + 10, 60, 85, 30, 35, ModContent.TileType(), false, true, true); + AbyssIsland(islandLocationX, thermalIslandY + 15, 60, 85, 30, 35, ModContent.TileType(), false, true, false); + AbyssIsland(islandLocationX + randomPositon, thermalIslandY, 60, 85, 30, 35, ModContent.TileType(), false, true, false); + islandLocationX += 30; + break; + case 2: + //3 islands, left, middle (slightly left), and right + AbyssIsland(islandLocationX - randomPositon - 20, thermalIslandY, 55, 65, 30, 35, ModContent.TileType(), false, true, true); + AbyssIsland(islandLocationX - 20, thermalIslandY + 15, 55, 65, 30, 35, ModContent.TileType(), false, true, false); + AbyssIsland(islandLocationX + randomPositon + 20, thermalIslandY + 10, 55, 65, 30, 35, ModContent.TileType(), false, true, false); + islandLocationX -= 25; + break; + case 3: + //3 islands, left, middle (slightly right), and right + AbyssIsland(islandLocationX - randomPositon, thermalIslandY + 15, 60, 85, 30, 55, ModContent.TileType(), false, true, false); + AbyssIsland(islandLocationX + 20, thermalIslandY + 5, 60, 85, 30, 55, ModContent.TileType(), false, true, false); + AbyssIsland(islandLocationX + randomPositon, thermalIslandY, 60, 85, 30, 55, ModContent.TileType(), false, true, true); + islandLocationX += 25; + break; + } + + thermalIslandY += islandLocationOffset; + + //do not place anymore islands when the fourth layer is reached + if (thermalIslandY >= (rockLayer + y * 0.270) - 10) + { + break; + } } //place some islands lining the walls in layer 4 - for (int voidIslandY = (int)(rockLayer + y * 0.262); voidIslandY <= AbyssChasmBottom - 20; voidIslandY++) + for (int voidIslandY = (int)(rockLayer + y * 0.275); voidIslandY <= AbyssChasmBottom - 20; voidIslandY++) { if (WorldGen.genRand.NextBool(8)) { @@ -383,14 +475,17 @@ namespace CalamityMod.World switch (randomIsland) { case 0: - AbyssIsland(abyssChasmX + WorldGen.genRand.Next(60, 78), voidIslandY, 65, 85, 35, 45, false, true, true, false); + //1 island, to the left + AbyssIsland(abyssChasmX - WorldGen.genRand.Next(65, 78), voidIslandY, 65, 85, 35, 45, ModContent.TileType(), false, true, false); break; case 1: - AbyssIsland(abyssChasmX - WorldGen.genRand.Next(60, 78), voidIslandY, 65, 85, 35, 45, false, true, true, false); + //1 island, to the right + AbyssIsland(abyssChasmX + WorldGen.genRand.Next(65, 78), voidIslandY, 65, 85, 35, 45, ModContent.TileType(), false, true, false); break; case 2: - AbyssIsland(abyssChasmX + WorldGen.genRand.Next(60, 78), voidIslandY, 65, 85, 35, 45, false, true, true, false); - AbyssIsland(abyssChasmX - WorldGen.genRand.Next(60, 78), voidIslandY, 65, 85, 35, 45, false, true, true, false); + //2 islands, left and right + AbyssIsland(abyssChasmX - WorldGen.genRand.Next(65, 78), voidIslandY, 65, 85, 35, 45, ModContent.TileType(), false, true, false); + AbyssIsland(abyssChasmX + WorldGen.genRand.Next(65, 78), voidIslandY, 65, 85, 35, 45, ModContent.TileType(), false, true, false); break; } @@ -399,21 +494,15 @@ namespace CalamityMod.World } } + //place chests in each location saved from before AbyssItemArray = CalamityUtils.ShuffleArray(AbyssItemArray); for (int abyssHouse = 0; abyssHouse < TotalPlacedIslandsSoFar; abyssHouse++) //11 15 19 { - bool hasVoidstone = AbyssIslandPositions[abyssHouse].Y + 5 > (rockLayer + y * 0.143); + bool isInLayer2 = AbyssIslandPositions[abyssHouse].Y < (rockLayer + y * 0.145); if (abyssHouse != 20) { - //place an island below the houses - //place the island first so it doesnt destroy the house or chest - AbyssIsland(AbyssIslandPositions[abyssHouse].X, AbyssIslandPositions[abyssHouse].Y + 15, 55, 75, 35, 45, false, true, hasVoidstone, false); - - AbyssIslandHouse(AbyssIslandPositions[abyssHouse].X, - AbyssIslandPositions[abyssHouse].Y, - AbyssItemArray[abyssHouse > 9 ? (abyssHouse - 10) : abyssHouse], //10 choices 0 to 9 - hasVoidstone); + AbyssChest(AbyssIslandPositions[abyssHouse].X, AbyssIslandPositions[abyssHouse].Y, AbyssItemArray[abyssHouse > 9 ? (abyssHouse - 10) : abyssHouse]); } } @@ -428,9 +517,9 @@ namespace CalamityMod.World Tile tileLeft = Main.tile[abyssIndex - 1, abyssIndex2]; Tile tileRight = Main.tile[abyssIndex + 1, abyssIndex2]; - if (tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || - tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || - tile.TileType == ModContent.TileType()) + if (tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || + tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || + tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType()) { //slope tiles Tile.SmoothSlope(abyssIndex, abyssIndex2, true); @@ -442,8 +531,7 @@ namespace CalamityMod.World } } - if (!tile.HasTile && (tile.WallType == ModContent.WallType() || tile.WallType == ModContent.WallType() || - tile.WallType == ModContent.WallType())) + if (!tile.HasTile && tile.WallType > 0) { //fill up any air pockets with water tile.LiquidType = LiquidID.Water; @@ -463,6 +551,8 @@ namespace CalamityMod.World { for (int abyssIndex2 = 0; abyssIndex2 < abyssChasmY; abyssIndex2++) { + Tile tileToGrowVineOn = Main.tile[abyssIndex, abyssIndex2]; + if (!Main.tile[abyssIndex, abyssIndex2].HasTile) { Tile tile = Main.tile[abyssIndex, abyssIndex2 + 1]; @@ -472,7 +562,7 @@ namespace CalamityMod.World { //giant kelp, more often in upper layers if ((WorldGen.genRand.NextBool(18) && tile.TileType == ModContent.TileType()) || - (WorldGen.genRand.NextBool(35) && tile.TileType == ModContent.TileType())) + (WorldGen.genRand.NextBool(15) && tile.TileType == ModContent.TileType())) { ushort[] Kelps = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -492,11 +582,13 @@ namespace CalamityMod.World //sulphur shale stuff if (tile.TileType == ModContent.TileType()) { + //tube coral if (WorldGen.genRand.NextBool(25)) { WorldGen.PlaceObject(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); } + //shale rock piles if (WorldGen.genRand.NextBool(18)) { ushort[] ShalePiles = new ushort[] { (ushort)ModContent.TileType(), @@ -505,6 +597,7 @@ namespace CalamityMod.World WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(ShalePiles)); } + //pire corals if (WorldGen.genRand.NextBool(15)) { ushort[] PireCorals = new ushort[] { (ushort)ModContent.TileType(), @@ -513,6 +606,7 @@ namespace CalamityMod.World WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(PireCorals)); } + //sulphur fossils if (WorldGen.genRand.NextBool(10)) { ushort[] SulphuricFossils = new ushort[] { (ushort)ModContent.TileType(), @@ -521,6 +615,7 @@ namespace CalamityMod.World WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(SulphuricFossils)); } + //ribs if (WorldGen.genRand.NextBool(10)) { ushort[] Ribs = new ushort[] { (ushort)ModContent.TileType(), @@ -536,7 +631,7 @@ namespace CalamityMod.World if (abyssIndex2 >= (int)(rockLayer + y * 0.262) && WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1)) { //bulb trees on voidstone - if (WorldGen.genRand.NextBool(6) && tile.TileType == ModContent.TileType()) + if (WorldGen.genRand.NextBool(8) && tile.TileType == ModContent.TileType()) { ushort[] BulbTrees = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -546,7 +641,8 @@ namespace CalamityMod.World } //pots - if ((tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType()) && abyssIndex2 > rockLayer) + if ((tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || + tile.TileType == ModContent.TileType()) && abyssIndex2 > rockLayer) { if (WorldGen.genRand.NextBool(5)) { @@ -554,6 +650,7 @@ namespace CalamityMod.World CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true); } } + //sulphur pots else if (tile.TileType == ModContent.TileType() && abyssIndex2 < (int)Main.worldSurface) { @@ -564,12 +661,37 @@ namespace CalamityMod.World } } } + + //esentially what this does is grow one vine on the bottom of a tile, then use the util to keep placing the vine until it decides to stop + if (tileToGrowVineOn.TileType == ModContent.TileType() && !Main.tile[abyssIndex, abyssIndex2 + 1].HasTile) + { + if (WorldGen.genRand.Next(2) == 0) + { + WorldGen.PlaceTile(abyssIndex, abyssIndex2 + 1, (ushort)ModContent.TileType()); + } + } + if (tileToGrowVineOn.TileType == ModContent.TileType()) + { + CalamityUtils.GrowVines(abyssIndex, abyssIndex2, WorldGen.genRand.Next(1, 4), (ushort)ModContent.TileType()); + } + + //same as above but for sulphur vines + if (tileToGrowVineOn.TileType == ModContent.TileType() && !Main.tile[abyssIndex, abyssIndex2 + 1].HasTile) + { + if (WorldGen.genRand.Next(5) == 0) + { + WorldGen.PlaceTile(abyssIndex, abyssIndex2 + 1, (ushort)ModContent.TileType()); + } + } + if (tileToGrowVineOn.TileType == ModContent.TileType()) + { + CalamityUtils.GrowVines(abyssIndex, abyssIndex2, WorldGen.genRand.Next(1, 4), (ushort)ModContent.TileType()); + } } } } - #region Houses - public static void AbyssIsland(int i, int j, int sizeMin, int sizeMax, int sizeMin2, int sizeMax2, bool hasChest, bool hasPlantyMush, bool isVoid, bool isShale) + public static void AbyssIsland(int i, int j, int sizeMin, int sizeMax, int sizeMin2, int sizeMax2, int tileType, bool hasChest, bool hasClumps, bool hasScoria) { float islandWidth = WorldGen.genRand.Next(sizeMin, sizeMax); //100 150 float smallIslandWidth = (float)WorldGen.genRand.Next(sizeMin, sizeMax) / (float)5; //20 30 @@ -640,14 +762,7 @@ namespace CalamityMod.World } Main.tile[k, l].Get().HasTile = true; - if (!isShale) - { - Main.tile[k, l].TileType = (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType()); - } - else - { - Main.tile[k, l].TileType = (ushort)ModContent.TileType(); - } + Main.tile[k, l].TileType = (ushort)tileType; CalamityUtils.SafeSquareTileFrame(k, l, true); } @@ -684,12 +799,28 @@ namespace CalamityMod.World } num14 += WorldGen.genRand.Next(-3, 4); num15 = WorldGen.genRand.Next(4, 8); - int num16 = isVoid ? ModContent.TileType() : ModContent.TileType(); + int num16 = tileType; - if (WorldGen.genRand.NextBool(4)) + //chance to place clumps of whatever defined block + if (hasClumps && WorldGen.genRand.NextBool(3)) { - num16 = hasChest ? ModContent.TileType() : ModContent.TileType(); + //if the tile isnt pyre mantle place scoria or planty mush + if (tileType != ModContent.TileType()) + { + //if scoria is enabled, then place it, otherwise place planty mush clumps + num16 = hasScoria ? ModContent.TileType() : ModContent.TileType(); + } + //if the tile is pyre mantle then always place scoria + else + { + //goofy ahh checking + //essentially places molten blocks if scoria is enabled + //if scoria is not enabled, then it places planty mush with a 1 in 5 chance, and otherwise place actual scoria + //very backwards logic of having scoria not place when enabled but it makes it place more often so whatever + num16 = hasScoria ? ModContent.TileType() : WorldGen.genRand.Next(5) == 0 ? ModContent.TileType() : ModContent.TileType(); + } } + for (int n = m - num15; n <= m + num15; n++) { for (int num17 = num14 - num15; num17 <= num14 + num15; num17++) @@ -702,14 +833,7 @@ namespace CalamityMod.World { Main.tile[n, num17].Get().HasTile = true; - if (!isShale) - { - Main.tile[n, num17].TileType = (ushort)num16; - } - else - { - Main.tile[n, num17].TileType = (ushort)ModContent.TileType(); - } + Main.tile[n, num17].TileType = (ushort)num16; CalamityUtils.SafeSquareTileFrame(n, num17, true); } @@ -717,39 +841,7 @@ namespace CalamityMod.World } } } - if (hasPlantyMush) - { - int p = islandPositionX; - int num150; - for (p += WorldGen.genRand.Next(5); p < islandPositionXAgain; p += WorldGen.genRand.Next(num150, (int)(num150 * 1.5))) - { - int num14 = islandPositionY; - while (!Main.tile[p, num14].HasTile) - { - num14--; - } - num14 += WorldGen.genRand.Next(-3, 4); //-3 4 - num150 = 1; //4 8 - int num16 = ModContent.TileType(); - for (int n = p - num150; n <= p + num150; n++) - { - for (int num17 = num14 - num150; num17 <= num14 + num150; num17++) - { - if (num17 > islandPositionYAgain) - { - float arg_409_0 = Math.Abs(n - p); - float num18 = (Math.Abs(num17 - num14) * 2); - if (Math.Sqrt((double)(arg_409_0 * arg_409_0 + num18 * num18)) < (num150 + WorldGen.genRand.Next(2))) - { - Main.tile[n, num17].Get().HasTile = true; - Main.tile[n, num17].TileType = (ushort)num16; - CalamityUtils.SafeSquareTileFrame(n, num17, true); - } - } - } - } - } - } + int sizeMinSmall2 = sizeMin2 / 8; int sizeMaxSmall2 = sizeMax2 / 8; islandWidth = WorldGen.genRand.Next(sizeMin2, sizeMax2); @@ -803,7 +895,7 @@ namespace CalamityMod.World { num24 += WorldGen.genRand.Next(0, 4); int num25 = WorldGen.genRand.Next(2, 5); - int num26 = isVoid ? ModContent.TileType() : ModContent.TileType(); + int num26 = tileType; for (int num27 = num23 - num25; num27 <= num23 + num25; num27++) { for (int num28 = num24 - num25; num28 <= num24 + num25; num28++) @@ -823,172 +915,49 @@ namespace CalamityMod.World num23 += WorldGen.genRand.Next(num25, (int)(num25 * 1.5)); } } - - //Place backwall - for (int backwallX = islandPositionX - 20; backwallX <= islandPositionXAgain + 20; backwallX++) - { - for (int backwallJ = islandPositionYAgain - 20; backwallJ <= islandPositionY + 20; backwallJ++) - { - //Check to see if the tile is surrounded by other tiles to place a wall - bool AmISurroundedByTiles = true; - for (int i2 = backwallX - 1; i2 <= backwallX + 1; i2++) - { - for (int j2 = backwallJ - 1; j2 <= backwallJ + 1; j2++) - { - if (!Main.tile[i2, j2].HasTile) - { - AmISurroundedByTiles = false; - } - } - } - if (AmISurroundedByTiles) - { - Main.tile[backwallX, backwallJ].WallType = (ushort)(isVoid ? ModContent.WallType() : ModContent.WallType()); - WorldGen.SquareWallFrame(backwallX, backwallJ, true); - } - } - } - for (int num34 = islandPositionX; num34 <= islandPositionXAgain; num34++) - { - int num35 = islandPositionYAgain - 10; - while (!Main.tile[num34, num35 + 1].HasTile) - { - num35++; - } - if (num35 < islandPositionY && Main.tile[num34, num35 + 1].TileType == (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType())) - { - if (WorldGen.genRand.NextBool(10)) - { - int num36 = WorldGen.genRand.Next(1, 3); - for (int num37 = num34 - num36; num37 <= num34 + num36; num37++) - { - if (Main.tile[num37, num35].TileType == (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType())) - { - Main.tile[num37, num35].Get().HasTile = false; - Main.tile[num37, num35].LiquidAmount = 255; - Main.tile[num37, num35].Get().LiquidType = LiquidID.Water; - CalamityUtils.SafeSquareTileFrame(num34, num35, true); - } - if (Main.tile[num37, num35 + 1].TileType == (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType())) - { - Main.tile[num37, num35 + 1].Get().HasTile = false; - Main.tile[num37, num35 + 1].LiquidAmount = 255; - Main.tile[num37, num35 + 1].Get().LiquidType = LiquidID.Water; - CalamityUtils.SafeSquareTileFrame(num34, num35 + 1, true); - } - if (num37 > num34 - num36 && num37 < num34 + 2 && Main.tile[num37, num35 + 2].TileType == (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType())) - { - Main.tile[num37, num35 + 2].Get().HasTile = false; - Main.tile[num37, num35 + 2].LiquidAmount = 255; - Main.tile[num37, num35 + 2].Get().LiquidType = LiquidID.Water; - CalamityUtils.SafeSquareTileFrame(num34, num35 + 2, true); - } - } - } - if (WorldGen.genRand.NextBool(5)) - { - Main.tile[num34, num35].LiquidAmount = 255; - } - Main.tile[num34, num35].Get().LiquidType = LiquidID.Water; - CalamityUtils.SafeSquareTileFrame(num34, num35, true); - } - } } - public static void AbyssIslandHouse(int i, int j, int itemChoice, bool isVoid) + public static void AbyssChest(int i, int j, int itemChoice) { - ushort type = (ushort)(isVoid ? ModContent.TileType() : ModContent.TileType()); //tile - ushort wall = (ushort)(isVoid ? ModContent.WallType() : ModContent.WallType()); //wall - Vector2 vector = new Vector2((float)i, (float)j); - int num = 1; - if (WorldGen.genRand.NextBool(2)) + //place an island + //always place abyss gravel because chests will never place outside of layer 2 for now + AbyssIsland(i, j + 2, 55, 75, 35, 45, ModContent.TileType(), false, true, false); + + //clear decently big circular area where the chest will be + for (int clearX = i - 2; clearX <= i + 2; clearX++) { - num = -1; - } - int num2 = WorldGen.genRand.Next(5, 9); - int num3 = 3; - vector.X = (float)(i + (num2 + 2) * num); - for (int k = j - 15; k < j + 30; k++) - { - if (Main.tile[(int)vector.X, k].HasTile) + for (int clearY = j - 8; clearY <= j - 1; clearY++) { - vector.Y = (float)(k - 1); - break; - } - } - vector.X = (float)i; - int num4 = (int)(vector.X - (float)num2 - 1f); - int num5 = (int)(vector.X + (float)num2 + 1f); - int num6 = (int)(vector.Y - (float)num3 - 1f); - int num7 = (int)(vector.Y + 2f); - if (num4 < 0) - { - num4 = 0; - } - if (num5 > Main.maxTilesX) - { - num5 = Main.maxTilesX; - } - if (num6 < 0) - { - num6 = 0; - } - if (num7 > Main.maxTilesY) - { - num7 = Main.maxTilesY; - } - for (int l = num4; l <= num5; l++) - { - for (int m = num6 - 1; m < num7 + 1; m++) - { - if (m != num6 - 1 || (l != num4 && l != num5)) + //clear area for the chest to place + ShapeData circle = new ShapeData(); + GenAction blotchMod = new Modifiers.Blotches(2, 0.4); + + int radius = (int)(WorldGen.genRand.Next(3, 5) * WorldGen.genRand.NextFloat(0.74f, 0.82f)); + + WorldUtils.Gen(new Point(clearX, clearY), new Shapes.Circle(radius), Actions.Chain(new GenAction[] { - Main.tile[l, m].Get().HasTile = true; - Main.tile[l, m].TileType = type; - Main.tile[l, m].WallType = wall; - Main.tile[l, m].Get().IsHalfBlock = false; - Main.tile[l, m].Get().Slope = SlopeType.Solid; - } - } - } - num4 = (int)(vector.X - (float)num2); - num5 = (int)(vector.X + (float)num2); - num6 = (int)(vector.Y - (float)num3); - num7 = (int)(vector.Y + 1f); - if (num4 < 0) - { - num4 = 0; - } - if (num5 > Main.maxTilesX) - { - num5 = Main.maxTilesX; - } - if (num6 < 0) - { - num6 = 0; - } - if (num7 > Main.maxTilesY) - { - num7 = Main.maxTilesY; - } - for (int n = num4; n <= num5; n++) - { - for (int num8 = num6; num8 < num7; num8++) - { - if ((num8 != num6 || (n != num4 && n != num5)) && Main.tile[n, num8].WallType == wall) + blotchMod.Output(circle) + })); + + WorldUtils.Gen(new Point(clearX, clearY), new ModShapes.All(circle), Actions.Chain(new GenAction[] { - Main.tile[n, num8].Get().HasTile = false; - } + new Actions.ClearTile() + })); } } - int num9 = i + (num2 + 1) * num; - int num10 = (int)vector.Y; - for (int num11 = num9 - 2; num11 <= num9 + 2; num11++) + + //place cluster where chest will spawn + WorldGen.TileRunner(i, j + 4, 8, 5, ModContent.TileType(), true, 0, 0, false, true); + + //clear another small square exactly around where the chest will be so it has a flat area to place on + for (int clearX = i - 7; clearX <= i + 7; clearX++) { - Main.tile[num11, num10].Get().HasTile = false; - Main.tile[num11, num10 - 1].Get().HasTile = false; - Main.tile[num11, num10 - 2].Get().HasTile = false; + for (int clearY = j - 1; clearY <= j + 5; clearY++) + { + WorldGen.PlaceTile(clearX, clearY, ModContent.TileType()); + } } + switch (itemChoice) { case 0: @@ -1025,8 +994,9 @@ namespace CalamityMod.World itemChoice = ItemID.NeptunesShell; break; //fallback case. Should never happen naturally } - WorldGen.AddBuriedChest(i, num10 - 3, itemChoice, false, 4); //chest + + //place the chest itself + WorldGen.AddBuriedChest(i, j - 1, itemChoice, false, 4); } - #endregion } } diff --git a/World/AerialiteOreGen.cs b/World/AerialiteOreGen.cs index 8d5b5ce2bc..00530dd0a5 100644 --- a/World/AerialiteOreGen.cs +++ b/World/AerialiteOreGen.cs @@ -33,10 +33,10 @@ namespace CalamityMod.World ShapeData biggerCircle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(2, 0.4); - int outerRadius = (int)(WorldGen.genRand.Next(3, 5) * WorldGen.genRand.NextFloat(0.74f, 0.82f)); + int radius = (int)(WorldGen.genRand.Next(3, 5) * WorldGen.genRand.NextFloat(0.74f, 0.82f)); //big cloud circle - WorldUtils.Gen(new Point(x, y), new Shapes.Circle(outerRadius + 3), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(x, y), new Shapes.Circle(radius + 1), Actions.Chain(new GenAction[] { blotchMod.Output(biggerCircle) })); @@ -48,7 +48,7 @@ namespace CalamityMod.World })); //circle of ore - WorldUtils.Gen(new Point(x, y), new Shapes.Circle(outerRadius), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(x, y), new Shapes.Circle(radius), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); diff --git a/World/BrimstoneCrag.cs b/World/BrimstoneCrag.cs index 86f1ca7b38..c45210bef2 100644 --- a/World/BrimstoneCrag.cs +++ b/World/BrimstoneCrag.cs @@ -94,15 +94,6 @@ namespace CalamityMod.World } } - //scorched remains patches - for (int x = biomeStart + 30; x <= biomeEdge - 30; x++) - { - if (WorldGen.genRand.Next(145) == 0) - { - ScorchedGrassPatches(new Point(x, Main.maxTilesY - 135)); - } - } - //place ceiling of slag across the top of the biome for (int x = biomeStart; x <= biomeEdge; x++) { @@ -220,6 +211,15 @@ namespace CalamityMod.World } } + //scorched remains patches + for (int x = biomeStart + 30; x <= biomeEdge - 30; x++) + { + if (WorldGen.genRand.Next(145) == 0) + { + ScorchedGrassPatches(new Point(x, Main.maxTilesY - 135)); + } + } + //place clumps of charred ore for (int x = biomeStart; x <= biomeEdge; x++) { @@ -370,7 +370,9 @@ namespace CalamityMod.World if (WorldGen.genRand.Next(3) == 0) { ushort[] Lillies = new ushort[] { (ushort)ModContent.TileType(), - (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; + (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), + (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), + (ushort)ModContent.TileType() }; WorldGen.PlaceObject(x, y - 1, WorldGen.genRand.Next(Lillies)); } @@ -388,7 +390,7 @@ namespace CalamityMod.World if (tile.TileType == ModContent.TileType()) { //grow spine tree - if (WorldGen.genRand.Next(12) == 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock) + if (WorldGen.genRand.Next(8) == 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock) { PlaceTree(x, y - 1, ModContent.TileType()); } @@ -471,7 +473,7 @@ namespace CalamityMod.World float angle = MathHelper.Pi * 0.15f; float otherAngle = MathHelper.PiOver2 - angle; - int distanceInTiles = WorldGen.genRand.Next(20, 50); + int distanceInTiles = WorldGen.genRand.Next(30, 45); float distance = distanceInTiles * 16f; float constant = distance * 2f / (float)Math.Sin(angle); diff --git a/World/MiscWorldgenRoutines.cs b/World/MiscWorldgenRoutines.cs index 0d90b261cf..2afeea88ab 100644 --- a/World/MiscWorldgenRoutines.cs +++ b/World/MiscWorldgenRoutines.cs @@ -252,8 +252,17 @@ namespace CalamityMod.World num3 += WorldGen.genRand.Next(2); num3 -= WorldGen.genRand.Next(2); float smallHoleLimit = 790f; //small + if (Main.maxTilesY > 1500) - { smallHoleLimit = 1360f; if (Main.maxTilesY > 2100) { smallHoleLimit = 1950f; } } + { + smallHoleLimit = 1360f; + + if (Main.maxTilesY > 2100) + { + smallHoleLimit = 1950f; + } + } + if (ocean && num > smallHoleLimit) { if (num3 < 7.0) //min width @@ -291,7 +300,7 @@ namespace CalamityMod.World if (Main.maxTilesY > 2100) { if (((double)vector.Y > Abyss.AbyssChasmBottom && num > 0f && ocean) || - (vector.Y >= Main.maxTilesY && num > 0f && !ocean)) + (vector.Y >= Main.maxTilesY && num > 0f && !ocean)) { num = 0f; } @@ -299,7 +308,7 @@ namespace CalamityMod.World else if (Main.maxTilesY > 1500) { if (((double)vector.Y > Abyss.AbyssChasmBottom && num > 0f && ocean) || - (vector.Y > Main.maxTilesY && num > 0f && !ocean)) + (vector.Y > Main.maxTilesY && num > 0f && !ocean)) { num = 0f; } @@ -307,11 +316,12 @@ namespace CalamityMod.World else { if (((double)vector.Y > Abyss.AbyssChasmBottom && num > 0f && ocean) || - (vector.Y > Main.maxTilesY && num > 0f && !ocean)) + (vector.Y > Main.maxTilesY && num > 0f && !ocean)) { num = 0f; } } + num -= 1f; int num4; int num5;