diff --git a/Buffs/Pets/EidolonSnailBuff.cs b/Buffs/Pets/EidolonSnailBuff.cs index 6627cd3394..f95d4b056e 100644 --- a/Buffs/Pets/EidolonSnailBuff.cs +++ b/Buffs/Pets/EidolonSnailBuff.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Pets { public override void SetStaticDefaults() { - DisplayName.SetDefault("Escargdolon Snail"); + DisplayName.SetDefault("Escargidolon Snail"); Description.SetDefault("It's like an Eidolon Wyrm... but a snail!"); Main.buffNoTimeDisplay[Type] = true; Main.vanityPet[Type] = true; diff --git a/CalamityMod.cs b/CalamityMod.cs index 274765ee5c..009595c898 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -279,7 +279,7 @@ namespace CalamityMod Filters.Scene["CalamityMod:MonolithAccursed"] = new Filter(new MonolithScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.65f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:MonolithAccursed"] = new MonolithSky(); - Filters.Scene["CalamityMod:BrimstoneCrag"] = new Filter(new MonolithScreenShaderData("FilterMiniTower").UseColor(0f, 0f, 0f).UseOpacity(0f), EffectPriority.VeryHigh); + Filters.Scene["CalamityMod:BrimstoneCrag"] = new Filter(new MonolithScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.65f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:BrimstoneCrag"] = new BrimstoneCragSky(); SkyManager.Instance["CalamityMod:Astral"] = new AstralSky(); diff --git a/Items/Pets/AbyssShell.cs b/Items/Pets/AbyssShell.cs index ca3d17f9d2..c974080e26 100644 --- a/Items/Pets/AbyssShell.cs +++ b/Items/Pets/AbyssShell.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Pets SacrificeTotal = 1; DisplayName.SetDefault("Abyss Shell Fossil"); Tooltip.SetDefault("A prehistoric shell, once belonging to a goofy aquatic creature" - + "\nSummons a pet Escargdolon Snail"); + + "\nSummons an Escargidolon Snail"); } public override void SetDefaults() diff --git a/Items/Placeables/SacrificialBlossomSeeds.cs b/Items/Placeables/CinderBlossomSeeds.cs similarity index 84% rename from Items/Placeables/SacrificialBlossomSeeds.cs rename to Items/Placeables/CinderBlossomSeeds.cs index 75cf3134eb..9f7cdbee89 100644 --- a/Items/Placeables/SacrificialBlossomSeeds.cs +++ b/Items/Placeables/CinderBlossomSeeds.cs @@ -4,12 +4,12 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Placeables { - public class SacrificialBlossomSeeds : ModItem + public class CinderBlossomSeeds : ModItem { public override void SetStaticDefaults() { - DisplayName.SetDefault("Sacrificial Blossom Seeds"); - Tooltip.SetDefault("Places sacrificial blossom grass on scorched remains"); + DisplayName.SetDefault("Cinder Blossom Seeds"); + Tooltip.SetDefault("Places cinder blossom grass on scorched remains"); } public override void SetDefaults() diff --git a/Items/Placeables/SacrificialBlossomSeeds.png b/Items/Placeables/CinderBlossomSeeds.png similarity index 100% rename from Items/Placeables/SacrificialBlossomSeeds.png rename to Items/Placeables/CinderBlossomSeeds.png diff --git a/Projectiles/Pets/EidolonSnail.cs b/Projectiles/Pets/EidolonSnail.cs index 23b10e94bc..48f90c88f4 100644 --- a/Projectiles/Pets/EidolonSnail.cs +++ b/Projectiles/Pets/EidolonSnail.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { - DisplayName.SetDefault("Escargdolon Snail"); + DisplayName.SetDefault("Escargidolon Snail"); Main.projFrames[Projectile.type] = 6; Main.projPet[Projectile.type] = true; } diff --git a/Schematics/CragBridge.csch b/Schematics/CragBridge.csch new file mode 100644 index 0000000000..45ff119b44 Binary files /dev/null and b/Schematics/CragBridge.csch differ diff --git a/Schematics/SchematicManager.cs b/Schematics/SchematicManager.cs index fb4db262ff..15ac636e86 100644 --- a/Schematics/SchematicManager.cs +++ b/Schematics/SchematicManager.cs @@ -36,6 +36,9 @@ namespace CalamityMod.Schematics internal const string AstralBeaconKey = "Astral Beacon"; internal const string AstralBeaconFilename = "Schematics/AstralBeacon.csch"; + + internal const string CragBridgeKey = "Crags Bridge"; + internal const string CragBridgeFilename = "Schematics/CragBridge.csch"; internal static Dictionary TileMaps; internal static Dictionary PilePlacementMaps; @@ -59,6 +62,9 @@ namespace CalamityMod.Schematics // Astral world gen structures [AstralBeaconKey] = CalamitySchematicIO.LoadSchematic(AstralBeaconFilename), + //crag bridge + [CragBridgeKey] = CalamitySchematicIO.LoadSchematic(CragBridgeFilename), + // Sulphurous Sea scrap world gen structures ["Sulphurous Scrap 1"] = CalamitySchematicIO.LoadSchematic("Schematics/SulphurousScrap1.csch").ShaveOffEdge(), ["Sulphurous Scrap 2"] = CalamitySchematicIO.LoadSchematic("Schematics/SulphurousScrap2.csch").ShaveOffEdge(), diff --git a/World/AstralBiome.cs b/World/AstralBiome.cs index abe5393a44..cec8b64b71 100644 --- a/World/AstralBiome.cs +++ b/World/AstralBiome.cs @@ -453,9 +453,9 @@ namespace CalamityMod.World WorldGen.gen = true; // Add the average height of a tree to the Y position to offset trees usually messing with the calculation. // Then also add 10 blocks because these things seem to always like to appear standing on the floor. - int finalVerticalOffset = 18; + //int finalVerticalOffset = 18; bool _ = true; - SchematicManager.PlaceSchematic>(SchematicManager.AstralBeaconKey, new Point(i, (int)height + finalVerticalOffset), SchematicAnchor.Center, ref _); + SchematicManager.PlaceSchematic>(SchematicManager.AstralBeaconKey, new Point(i, (int)height), SchematicAnchor.TopCenter, ref _); WorldGen.gen = false; } } diff --git a/World/BrimstoneCrag.cs b/World/BrimstoneCrag.cs index c93b4c87f7..d0dfd6ce96 100644 --- a/World/BrimstoneCrag.cs +++ b/World/BrimstoneCrag.cs @@ -1,3 +1,5 @@ +using CalamityMod.Schematics; +using static CalamityMod.Schematics.SchematicManager; using CalamityMod.Tiles.Crags; using CalamityMod.Tiles.Ores; using CalamityMod.Walls; @@ -10,24 +12,27 @@ using Terraria.WorldBuilding; using Terraria.GameContent.Generation; using Microsoft.Xna.Framework; using System; +using System.Linq; using System.Collections.Generic; namespace CalamityMod.World { public class BrimstoneCrag { + //the 25 is there to offset it from the edge of the world so no "out of bounds" crashing occurs static int StartX = WorldGen.dungeonX < Main.maxTilesX / 2 ? 25 : (Main.maxTilesX - (Main.maxTilesX / 6)) - 25; static int lavaLakePlaceDelay = 0; static int lavaLakeBigPlaceDelay = 0; - //basic terrain (also sorry for the excessive amount of loops lmao) - private static void CragsTerrain() + //basic terrain (sorry for the excessive amount of loops lmao) + private static void CragTerrain() { - //set these before genning just to be safe + StartX = WorldGen.dungeonX < Main.maxTilesX / 2 ? 25 : (Main.maxTilesX - (Main.maxTilesX / 6)) - 25; + int biomeStart = StartX; - int biomeMiddle = (biomeStart + (Main.maxTilesX / 6)) / 2; int biomeEdge = biomeStart + (Main.maxTilesX / 6); + int biomeMiddle = (biomeStart + biomeEdge) / 2; //clear all blocks and lava in the area for (int x = biomeStart; x <= biomeEdge; x++) @@ -51,7 +56,6 @@ namespace CalamityMod.World } //place clusters of slag around the edges of the main square to create a more interesting shape - //this is done after placing the lava lake so it keeps its shape but still has unique terrain for (int x = biomeStart; x <= biomeEdge; x++) { for (int y = Main.maxTilesY - 110; y <= Main.maxTilesY - 5; y++) @@ -71,30 +75,17 @@ namespace CalamityMod.World } } - //oh also place clumps of scorched remains on the terrain too + /* + //TODO: make a better way of generating patches of grass for (int x = biomeStart; x <= biomeEdge; x++) { - for (int y = Main.maxTilesY - 110; y <= Main.maxTilesY - 5; y++) + if (WorldGen.genRand.Next(150) == 0) { - Tile tile = Main.tile[x, y]; - Tile tileUp = Main.tile[x, y - 1]; - Tile tileDown = Main.tile[x, y + 1]; - Tile tileLeft = Main.tile[x - 1, y]; - Tile tileRight = Main.tile[x + 1, y]; - - if (tile.TileType == ModContent.TileType() && (tileUp.TileType != ModContent.TileType() || - tileDown.TileType != ModContent.TileType() || tileLeft.TileType != ModContent.TileType() || - tileRight.TileType != ModContent.TileType())) - { - if (WorldGen.genRand.Next(12) == 0) - { - NaturalCircle(x - 10, y + 12, WorldGen.genRand.Next(15, 32), ModContent.TileType()); - NaturalCircle(x, y + 12, WorldGen.genRand.Next(15, 32), ModContent.TileType()); - NaturalCircle(x + 10, y + 12, WorldGen.genRand.Next(15, 32), ModContent.TileType()); - } - } + WorldGen.TileRunner(x - 20, Main.maxTilesY - 120, WorldGen.genRand.Next(8, 22), + WorldGen.genRand.Next(8, 22), ModContent.TileType(), false, 0f, 0f, false, true); } } + */ //place ceiling across the top of the biome for (int x = biomeStart - 20; x <= biomeEdge + 20; x++) @@ -120,7 +111,7 @@ namespace CalamityMod.World Tile tileLeft = Main.tile[x - 1, y]; Tile tileRight = Main.tile[x + 1, y]; - //place tiles under random slag tiles that are sticking out and look weird + //place tiles under slag tiles that are sticking out and look weird if (tile.TileType == ModContent.TileType() && !tileDown.HasTile) { WorldGen.PlaceTile(x, y + 1, (ushort)ModContent.TileType()); @@ -157,13 +148,14 @@ namespace CalamityMod.World } //surface lava lakes and pits + //the reason theres three different runners being used is so that a shallow lava pit is placed above each lava pit if (lavaLakeBigPlaceDelay == 0) { - LavaTileRunner runner1 = new LavaTileRunner(new Vector2(x, Main.maxTilesY - 110), new Vector2(0, 5), new Point16(-150, 150), + LavaTileRunner runner1 = new LavaTileRunner(new Vector2(x - 10, Main.maxTilesY - 110), new Vector2(0, 5), new Point16(-150, 150), new Point16(250, 500), 15f, WorldGen.genRand.Next(200, 300), 0, true, true); runner1.Start(); - LavaTileRunner runner2 = new LavaTileRunner(new Vector2(x, Main.maxTilesY - 110), new Vector2(0, 5), new Point16(-150, 150), + LavaTileRunner runner2 = new LavaTileRunner(new Vector2(x + 10, Main.maxTilesY - 110), new Vector2(0, 5), new Point16(-150, 150), new Point16(250, 500), 15f, WorldGen.genRand.Next(200, 300), 0, true, true); runner2.Start(); @@ -175,15 +167,15 @@ namespace CalamityMod.World } } - //place underground lava veins + //place random blotches of lava underground for (int x = biomeStart; x <= biomeEdge; x++) { - for (int y = Main.maxTilesY - 90; y <= Main.maxTilesY - 20; y++) + for (int y = Main.maxTilesY - 100; y <= Main.maxTilesY - 20; y++) { - if (WorldGen.genRand.Next(750) == 0) + if (WorldGen.genRand.Next(1200) == 0) { - LavaTileRunner runner = new LavaTileRunner(new Vector2(x, y), new Vector2(-5, 5), new Point16(-1000, 1000), - new Point16(-100, 100), 15f, WorldGen.genRand.Next(12, 25), 0, true, true); + LavaTileRunner runner = new LavaTileRunner(new Vector2(x, y), new Vector2(0, 5), new Point16(-20000, 20000), + new Point16(-12, 12), 15f, WorldGen.genRand.Next(12, 25), 0, true, true); runner.Start(); } } @@ -230,10 +222,26 @@ namespace CalamityMod.World if (tile.TileType == ModContent.TileType() && (tileUp.LiquidAmount > 0 || tileDown.LiquidAmount > 0 || tileLeft.LiquidAmount > 0 || tileRight.LiquidAmount > 0)) { - WorldGen.TileRunner(x + WorldGen.genRand.Next(-45, 45), y + WorldGen.genRand.Next(-45, 45), + WorldGen.TileRunner(x + WorldGen.genRand.Next(-22, 22), y + WorldGen.genRand.Next(-22, 22), WorldGen.genRand.Next(8, 22), WorldGen.genRand.Next(8, 22), ModContent.TileType(), false, 0f, 0f, false, true); } } + + bool place = true; + SchematicManager.PlaceSchematic>(SchematicManager.CragBridgeKey, new Point(biomeMiddle, Main.maxTilesY - 100), SchematicAnchor.Center, ref place); + + for (int x = biomeStart; x <= biomeEdge; x++) + { + for (int y = Main.maxTilesY - 200; y <= Main.maxTilesY - 5; y++) + { + Tile tile = Main.tile[x, y]; + if (tile.LiquidAmount > 0) + { + tile.LiquidType = LiquidID.Lava; + tile.LiquidAmount = 255; + } + } + } } //place a circular clump of tiles @@ -250,10 +258,7 @@ namespace CalamityMod.World { Tile tile = Framing.GetTileSafely(x, y); - //if (tile.TileType != ModContent.TileType()) - //{ - WorldGen.KillTile(x, y); - //} + WorldGen.KillTile(x, y); WorldGen.PlaceTile(x, y, tileType); tile.Slope = 0; } @@ -265,7 +270,7 @@ namespace CalamityMod.World public static void GenCrags() { - CragsTerrain(); + CragTerrain(); } } } \ No newline at end of file