From eabfa511798aa1edfbddb651d459c04883ff8167 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Sun, 12 Apr 2020 03:13:32 -0500 Subject: [PATCH] Sulph Sea Reformation 2.0 (Also see description) Changed IL Editing changes to not use a constant index set, fixed the mechworm UUID implementation, added a wulfrum droid summon projectile clone, and added some items/chests alongside the new worldgen changes. --- Buffs/Placeables/EffigyOfDecayBuff.cs | 24 + Buffs/Placeables/EffigyOfDecayBuff.png | Bin 0 -> 606 bytes Buffs/Summon/RustyDroneBuff.cs | 36 + Buffs/Summon/RustyDroneBuff.png | Bin 0 -> 610 bytes CalPlayer/CalamityPlayer.cs | 22 + CalPlayer/CalamityPlayerMiscEffects.cs | 7 + Gores/SulphSeaGen/SulphurousRockGore1.png | Bin 0 -> 247 bytes Gores/SulphSeaGen/SulphurousRockGore2.png | Bin 0 -> 216 bytes Gores/SulphSeaGen/SulphurousRockGore3.png | Bin 0 -> 215 bytes ILEditing/ILChanges.cs | 19 +- Items/Accessories/RustyMedallion.cs | 30 + Items/Accessories/RustyMedallion.png | Bin 0 -> 545 bytes Items/BrokenWaterFilter.cs | 31 + Items/BrokenWaterFilter.png | Bin 0 -> 497 bytes Items/Placeables/Furniture/EffigyOfDecay.cs | 33 + Items/Placeables/Furniture/EffigyOfDecay.png | Bin 0 -> 540 bytes Items/Placeables/Furniture/RustyChest.cs | 37 + Items/Placeables/Furniture/RustyChest.png | Bin 0 -> 490 bytes .../Placeables/HardenedSulphurousSandstone.cs | 36 + .../HardenedSulphurousSandstone.png | Bin 0 -> 257 bytes .../Walls/HardenedSulphurousSandstoneWall.cs | 36 + .../Walls/HardenedSulphurousSandstoneWall.png | Bin 0 -> 423 bytes Items/RustyLockpick.cs | 30 + Items/RustyLockpick.png | Bin 0 -> 383 bytes Items/Weapons/Summon/RustyBeaconPrototype.cs | 45 + Items/Weapons/Summon/RustyBeaconPrototype.png | Bin 0 -> 513 bytes Items/Weapons/Summon/StaffoftheMechworm.cs | 100 +- NPCs/Abyss/MicrobialCluster.cs | 90 ++ NPCs/Abyss/MicrobialCluster.png | Bin 0 -> 144 bytes Projectiles/Ranged/ToxicannonDrop.cs | 1 - Projectiles/Summon/MechwormBody.cs | 2 +- Projectiles/Summon/MechwormBody2.cs | 2 +- Projectiles/Summon/RustShrapnel.cs | 80 ++ Projectiles/Summon/RustShrapnel.png | Bin 0 -> 417 bytes Projectiles/Summon/RustyDrone.cs | 150 +++ Projectiles/Summon/RustyDrone.png | Bin 0 -> 1845 bytes .../Summon/RustyDroneTargetIndicator.cs | 94 ++ .../Summon/RustyDroneTargetIndicator.png | Bin 0 -> 711 bytes .../Summon/TacticalPlagueEngineSummon.cs | 5 +- Projectiles/Summon/WulfrumBoltMinion.cs | 58 + Projectiles/Summon/WulfrumBoltMinion.png | Bin 0 -> 136 bytes Projectiles/Summon/WulfrumDroid.cs | 6 +- .../Typeless/BrokenWaterFilterSpewer.cs | 45 + .../Typeless/BrokenWaterFilterSpewer.png | Bin 0 -> 497 bytes Tiles/Abyss/HardenedSulphurousSandstone.cs | 101 ++ Tiles/Abyss/HardenedSulphurousSandstone.png | Bin 0 -> 21060 bytes Tiles/Abyss/RustyChestLocked.cs | 124 ++ Tiles/Abyss/RustyChestLocked.png | Bin 0 -> 1539 bytes Tiles/Abyss/RustyChestLocked_Highlight.png | Bin 0 -> 845 bytes .../Abyss/Stalactite/SulphurousStalacmite1.cs | 45 + .../Stalactite/SulphurousStalacmite1.png | Bin 0 -> 428 bytes .../Abyss/Stalactite/SulphurousStalacmite2.cs | 45 + .../Stalactite/SulphurousStalacmite2.png | Bin 0 -> 400 bytes .../Abyss/Stalactite/SulphurousStalacmite3.cs | 46 + .../Stalactite/SulphurousStalacmite3.png | Bin 0 -> 518 bytes .../Abyss/Stalactite/SulphurousStalacmite4.cs | 46 + .../Stalactite/SulphurousStalacmite4.png | Bin 0 -> 577 bytes .../Abyss/Stalactite/SulphurousStalacmite5.cs | 47 + .../Stalactite/SulphurousStalacmite5.png | Bin 0 -> 555 bytes .../Abyss/Stalactite/SulphurousStalacmite6.cs | 47 + .../Stalactite/SulphurousStalacmite6.png | Bin 0 -> 700 bytes .../Abyss/Stalactite/SulphurousStalactite1.cs | 45 + .../Stalactite/SulphurousStalactite1.png | Bin 0 -> 448 bytes .../Abyss/Stalactite/SulphurousStalactite2.cs | 45 + .../Stalactite/SulphurousStalactite2.png | Bin 0 -> 439 bytes .../Abyss/Stalactite/SulphurousStalactite3.cs | 46 + .../Stalactite/SulphurousStalactite3.png | Bin 0 -> 552 bytes .../Abyss/Stalactite/SulphurousStalactite4.cs | 46 + .../Stalactite/SulphurousStalactite4.png | Bin 0 -> 582 bytes .../Abyss/Stalactite/SulphurousStalactite5.cs | 47 + .../Stalactite/SulphurousStalactite5.png | Bin 0 -> 583 bytes .../Abyss/Stalactite/SulphurousStalactite6.cs | 46 + .../Stalactite/SulphurousStalactite6.png | Bin 0 -> 698 bytes Tiles/Abyss/SteamGeyser.cs | 2 +- Tiles/Abyss/SulphuricFossil1.cs | 31 + Tiles/Abyss/SulphuricFossil1.png | Bin 0 -> 915 bytes Tiles/Abyss/SulphuricFossil2.cs | 31 + Tiles/Abyss/SulphuricFossil2.png | Bin 0 -> 1072 bytes Tiles/Abyss/SulphuricFossil3.cs | 31 + Tiles/Abyss/SulphuricFossil3.png | Bin 0 -> 935 bytes Tiles/Abyss/SulphurousColumn.cs | 57 + Tiles/Abyss/SulphurousColumn.png | Bin 0 -> 2181 bytes Tiles/Abyss/SulphurousRib1.cs | 47 + Tiles/Abyss/SulphurousRib1.png | Bin 0 -> 451 bytes Tiles/Abyss/SulphurousRib2.cs | 46 + Tiles/Abyss/SulphurousRib2.png | Bin 0 -> 437 bytes Tiles/Abyss/SulphurousRib3.cs | 45 + Tiles/Abyss/SulphurousRib3.png | Bin 0 -> 358 bytes Tiles/Abyss/SulphurousRib4.cs | 46 + Tiles/Abyss/SulphurousRib4.png | Bin 0 -> 354 bytes Tiles/Abyss/SulphurousRib5.cs | 44 + Tiles/Abyss/SulphurousRib5.png | Bin 0 -> 232 bytes Tiles/Abyss/SulphurousSand.cs | 63 + Tiles/Abyss/SulphurousSandstone.cs | 68 +- Tiles/Abyss/SulphurousVines.cs | 96 ++ Tiles/Abyss/SulphurousVines.png | Bin 0 -> 2641 bytes Tiles/Furniture/EffigyOfDecayPlaceable.cs | 39 + Tiles/Furniture/EffigyOfDecayPlaceable.png | Bin 0 -> 1353 bytes Walls/HardenedSulphurousSandstoneWall.cs | 22 + Walls/HardenedSulphurousSandstoneWall.png | Bin 0 -> 10455 bytes World/Abyss.cs | 1066 ++++++++++------- World/CalamityWorld.cs | 27 +- World/WorldGenerationMethods.cs | 22 +- 103 files changed, 3021 insertions(+), 557 deletions(-) create mode 100644 Buffs/Placeables/EffigyOfDecayBuff.cs create mode 100644 Buffs/Placeables/EffigyOfDecayBuff.png create mode 100644 Buffs/Summon/RustyDroneBuff.cs create mode 100644 Buffs/Summon/RustyDroneBuff.png create mode 100644 Gores/SulphSeaGen/SulphurousRockGore1.png create mode 100644 Gores/SulphSeaGen/SulphurousRockGore2.png create mode 100644 Gores/SulphSeaGen/SulphurousRockGore3.png create mode 100644 Items/Accessories/RustyMedallion.cs create mode 100644 Items/Accessories/RustyMedallion.png create mode 100644 Items/BrokenWaterFilter.cs create mode 100644 Items/BrokenWaterFilter.png create mode 100644 Items/Placeables/Furniture/EffigyOfDecay.cs create mode 100644 Items/Placeables/Furniture/EffigyOfDecay.png create mode 100644 Items/Placeables/Furniture/RustyChest.cs create mode 100644 Items/Placeables/Furniture/RustyChest.png create mode 100644 Items/Placeables/HardenedSulphurousSandstone.cs create mode 100644 Items/Placeables/HardenedSulphurousSandstone.png create mode 100644 Items/Placeables/Walls/HardenedSulphurousSandstoneWall.cs create mode 100644 Items/Placeables/Walls/HardenedSulphurousSandstoneWall.png create mode 100644 Items/RustyLockpick.cs create mode 100644 Items/RustyLockpick.png create mode 100644 Items/Weapons/Summon/RustyBeaconPrototype.cs create mode 100644 Items/Weapons/Summon/RustyBeaconPrototype.png create mode 100644 NPCs/Abyss/MicrobialCluster.cs create mode 100644 NPCs/Abyss/MicrobialCluster.png create mode 100644 Projectiles/Summon/RustShrapnel.cs create mode 100644 Projectiles/Summon/RustShrapnel.png create mode 100644 Projectiles/Summon/RustyDrone.cs create mode 100644 Projectiles/Summon/RustyDrone.png create mode 100644 Projectiles/Summon/RustyDroneTargetIndicator.cs create mode 100644 Projectiles/Summon/RustyDroneTargetIndicator.png create mode 100644 Projectiles/Summon/WulfrumBoltMinion.cs create mode 100644 Projectiles/Summon/WulfrumBoltMinion.png create mode 100644 Projectiles/Typeless/BrokenWaterFilterSpewer.cs create mode 100644 Projectiles/Typeless/BrokenWaterFilterSpewer.png create mode 100644 Tiles/Abyss/HardenedSulphurousSandstone.cs create mode 100644 Tiles/Abyss/HardenedSulphurousSandstone.png create mode 100644 Tiles/Abyss/RustyChestLocked.cs create mode 100644 Tiles/Abyss/RustyChestLocked.png create mode 100644 Tiles/Abyss/RustyChestLocked_Highlight.png create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalacmite1.cs create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalacmite1.png create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalacmite2.cs create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalacmite2.png create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalacmite3.cs create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalacmite3.png create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalacmite4.cs create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalacmite4.png create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalacmite5.cs create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalacmite5.png create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalacmite6.cs create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalacmite6.png create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalactite1.cs create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalactite1.png create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalactite2.cs create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalactite2.png create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalactite3.cs create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalactite3.png create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalactite4.cs create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalactite4.png create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalactite5.cs create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalactite5.png create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalactite6.cs create mode 100644 Tiles/Abyss/Stalactite/SulphurousStalactite6.png create mode 100644 Tiles/Abyss/SulphuricFossil1.cs create mode 100644 Tiles/Abyss/SulphuricFossil1.png create mode 100644 Tiles/Abyss/SulphuricFossil2.cs create mode 100644 Tiles/Abyss/SulphuricFossil2.png create mode 100644 Tiles/Abyss/SulphuricFossil3.cs create mode 100644 Tiles/Abyss/SulphuricFossil3.png create mode 100644 Tiles/Abyss/SulphurousColumn.cs create mode 100644 Tiles/Abyss/SulphurousColumn.png create mode 100644 Tiles/Abyss/SulphurousRib1.cs create mode 100644 Tiles/Abyss/SulphurousRib1.png create mode 100644 Tiles/Abyss/SulphurousRib2.cs create mode 100644 Tiles/Abyss/SulphurousRib2.png create mode 100644 Tiles/Abyss/SulphurousRib3.cs create mode 100644 Tiles/Abyss/SulphurousRib3.png create mode 100644 Tiles/Abyss/SulphurousRib4.cs create mode 100644 Tiles/Abyss/SulphurousRib4.png create mode 100644 Tiles/Abyss/SulphurousRib5.cs create mode 100644 Tiles/Abyss/SulphurousRib5.png create mode 100644 Tiles/Abyss/SulphurousVines.cs create mode 100644 Tiles/Abyss/SulphurousVines.png create mode 100644 Tiles/Furniture/EffigyOfDecayPlaceable.cs create mode 100644 Tiles/Furniture/EffigyOfDecayPlaceable.png create mode 100644 Walls/HardenedSulphurousSandstoneWall.cs create mode 100644 Walls/HardenedSulphurousSandstoneWall.png diff --git a/Buffs/Placeables/EffigyOfDecayBuff.cs b/Buffs/Placeables/EffigyOfDecayBuff.cs new file mode 100644 index 0000000000..0965076425 --- /dev/null +++ b/Buffs/Placeables/EffigyOfDecayBuff.cs @@ -0,0 +1,24 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Placeables +{ + public class EffigyOfDecayBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Effigy of Decay"); + Description.SetDefault("The sulphuric waters empower you"); + Main.buffNoTimeDisplay[Type] = true; + Main.debuff[Type] = false; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = true; + longerExpertDebuff = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().decayEffigy = true; + } + } +} diff --git a/Buffs/Placeables/EffigyOfDecayBuff.png b/Buffs/Placeables/EffigyOfDecayBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..232c16125271c8448c3403d266d80a05bcd0d96b GIT binary patch literal 606 zcmV-k0-^nhP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0rN>jK~z{r)tAdF zL{S{a&&Z=}G%TbUc_fR;f{Yq0St!cFqx=KIN)`rXZNtWr@gI0BEJ(yoDF%y)@*E9~ zSq#}I)C~7~&v%%UX|9wxK6U$?raSkZ-}gN3y*BYlLK;+;SISl@SK*Ls{Tkdm2hA*E z^a7O!VsS&Fuf7^~l{;W^625~&!<+D2cMVL2Rxf1hdw70h3G`vJc6}1C{bLSgl+|O@il-ADW5m9ACn5UoEUp0$nYw zhLSLWrQ_5Deu}%yE?XwHseM?R1pcf8Ri$gmZydof8~; zkECdf?~C3(U%SUA_+x{SqJt5wqvq*;aNI zU?xFM&(~$kWOjKEwz^vMSq1(x^Sgiy)|r)a4iJv1`a5?_&V_XApXj#_@XLsAwfxfI szF;*8qON};Q+!RLRsaA107*qoM6N<$f?T`}zW@LL literal 0 HcmV?d00001 diff --git a/Buffs/Summon/RustyDroneBuff.cs b/Buffs/Summon/RustyDroneBuff.cs new file mode 100644 index 0000000000..d9d8b6c342 --- /dev/null +++ b/Buffs/Summon/RustyDroneBuff.cs @@ -0,0 +1,36 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Summon; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Summon +{ + public class RustyDroneBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Rusty Drone"); + Description.SetDefault("A pitifully fragile drone is observing you"); + Main.buffNoTimeDisplay[Type] = true; + Main.buffNoSave[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.Calamity(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) + { + modPlayer.rustyDrone = true; + } + if (!modPlayer.rustyDrone) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/RustyDroneBuff.png b/Buffs/Summon/RustyDroneBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..cd1d218f2f2359e2251caacaf5555eaa34e9e348 GIT binary patch literal 610 zcmV-o0-gPdP)Px%97#k$R9J=0mpw>ZQ5c4wl!`-JP(*EUh)Ojeu@GDWDoC+HK@i%wg=Q&EB3-gM z>eQj)B03f~qaX-{R;;uY?;i93@m^b+r%RK`A?Rk`KrM#ABmc;P`MCfaak!02YQD9UHJRivWCxgo}2x zy>|gXU3nP*li!yC0|-2n7jf)WcIQ^+v17S#i*nvnui|3~ON*OBK*ril%{7$(SQ+w9 z2}O1BFSrN#@4t?^(bA0ynF`?zpb1K}#Q;=%=O35h3xetG{SR zTgRu4`Q{L?I~Iv^8T+I73oYI{y{@Had#>*E0p<{}tB`XcWuFr=7kWp$-78jm)zdrz zZqD5#XNO4c6ZU*iJEA!RygHY175xbSQc>kh?h&Fw_lcTkdVA&&5JyLGwIg~R^Fk6L wmlR(W_fEhU?5F@B{p+lxf5!oT(2T$1YbJTKNf1Ma(EtDd07*qoM6N<$f? GammaCanisters = new List(); + public bool rustyDrone = false; #endregion #region Biome @@ -1475,6 +1478,7 @@ namespace CalamityMod.CalPlayer camper = false; silvaWings = false; corrosiveSpine = false; + rustyMedal = false; daedalusReflect = false; daedalusSplit = false; @@ -1611,6 +1615,7 @@ namespace CalamityMod.CalPlayer trinketOfChiBuff = false; corrEffigy = false; crimEffigy = false; + decayEffigy = false; rRage = false; xRage = false; xWrath = false; @@ -1779,6 +1784,7 @@ namespace CalamityMod.CalPlayer brimseeker = false; necrosteocytesDudes = false; gammaHead = false; + rustyDrone = false; abyssalDivingSuitPrevious = abyssalDivingSuit; abyssalDivingSuit = abyssalDivingSuitHide = abyssalDivingSuitForce = abyssalDivingSuitPower = false; @@ -6188,6 +6194,22 @@ namespace CalamityMod.CalPlayer } } + if (rustyMedal) + { + if (item.ranged) + { + if (Main.rand.NextBool(8)) + { + for (int i = 0; i < 3; i++) + { + Vector2 startingPosition = Main.MouseWorld - Vector2.UnitY.RotatedByRandom(0.4f) * 1250f; + Vector2 directionToMouse = (startingPosition - Main.MouseWorld).SafeNormalize(Vector2.UnitY).RotatedByRandom(0.1f); + Projectile.NewProjectile(startingPosition, directionToMouse * 12f, ModContent.ProjectileType(), (int)(damage * 0.3f), 0f, player.whoAmI); + } + } + } + } + return true; } #endregion diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 2bad61ffc0..80e9e8c0a4 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2241,6 +2241,13 @@ namespace CalamityMod.CalPlayer } } + // Effigy of Decay effects + if (modPlayer.decayEffigy) + { + player.buffImmune[ModContent.BuffType()] = true; + player.gills = true; + } + if (modPlayer.astralInjection) { if (player.statMana < player.statManaMax2) diff --git a/Gores/SulphSeaGen/SulphurousRockGore1.png b/Gores/SulphSeaGen/SulphurousRockGore1.png new file mode 100644 index 0000000000000000000000000000000000000000..479431268b972400e06e3adfef2fada286aa123f GIT binary patch literal 247 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xa#^NA%Cx&(BWL^R}8$DedLo_C? zon*+}6d=;NU;5$WPL4|nicKuKyt;q?{B!VL9qcTS$SdTcvFpZyM*W@x*XQcBSO3&| zE*E)>lVRUA2Aflx7KX1YVp*`_)xI+=6HPcj1r)4c4P4PIRv)loucoD5j2`E) z!+{U^zbr0e=&e7pp5wHV+_AV!($-#WZ&(GZv?CfIP z!D`2Fe%Hn|97{zQ)^B4y@X-5Cz^SuOY-DA(zGT$U&Rx!XM3a5uiW^KRT1*O`^xAum z{ynJKKG$J(-Oc~X2d(c|KDX>`eYtGYr33w%xm^3oSr-`2ZMCndVkq6Mb<)_cF%9TA N22WQ%mvv4FO#qznQSbl& literal 0 HcmV?d00001 diff --git a/ILEditing/ILChanges.cs b/ILEditing/ILChanges.cs index 9eea624895..7be1dd64fb 100644 --- a/ILEditing/ILChanges.cs +++ b/ILEditing/ILChanges.cs @@ -1,14 +1,6 @@ -using CalamityMod.Events; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using MonoMod.Cil; +using MonoMod.Cil; using System; -using System.Reflection; using Terraria; -using Terraria.Localization; -using Terraria.ModLoader; -using static Mono.Cecil.Cil.OpCodes; namespace CalamityMod.ILEditing { @@ -21,10 +13,13 @@ namespace CalamityMod.ILEditing { IL.Terraria.WorldGen.MakeDungeon += (il) => { - var cursor = new ILCursor(il) + var cursor = new ILCursor(il); + if (!cursor.TryGotoNext(i => i.MatchStsfld("Terraria.WorldGen", "dMaxY"))) { - Index = 45 - }; + CalamityMod.instance.Logger.Warn("Dungeon movement editing code failed."); + return; + } + cursor.Index++; cursor.EmitDelegate(() => { WorldGen.dungeonX += (WorldGen.dungeonX < Main.maxTilesX / 2).ToDirectionInt() * 450; diff --git a/Items/Accessories/RustyMedallion.cs b/Items/Accessories/RustyMedallion.cs new file mode 100644 index 0000000000..3abfaba7c3 --- /dev/null +++ b/Items/Accessories/RustyMedallion.cs @@ -0,0 +1,30 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class RustyMedallion : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rusty Medallion"); + Tooltip.SetDefault("Causes most ranged weapons to sometimes release acid droplets from the sky"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 32; + item.rare = 1; + item.value = CalamityGlobalItem.Rarity1BuyPrice; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.rustyMedal = true; + } + } +} diff --git a/Items/Accessories/RustyMedallion.png b/Items/Accessories/RustyMedallion.png new file mode 100644 index 0000000000000000000000000000000000000000..398cd2132d7b57eb84eb3f5e26f81c2c12d9c893 GIT binary patch literal 545 zcmV++0^a?JP)Px$+et)0R7i=n)Xz&4aTv$(*O+aYXlzE7bZDgzYJj-rNCa0ZiiDKZRosH?U|-9Dbct$NZ}r^zyt8lV1Z!@1i z1u**ZQOZO?W-mB#q%uDr=4X;ypR66|>^K&{+_%~EiDH>9oymjox6`00(-^>d`A-Nv z$1i|4A78{CN`H>}ul2+nxi48z{IL{5u00#`C&|($nw?(-Ki3X|E9blF{_ynGJJ8z-`N7jki>RM!!aJotJM3>}`p=A1=Z zUR#nXQEk^$cPW`Ms>S^$oiY2pt8=wCwuk6YwiSF|T8@#OyR%l8Bwwgp$mz*Sjnlu7 j{~}8&NfMTSrAzb|#RZa#JZ_=c00000NkvXXu0mjffSUQ# literal 0 HcmV?d00001 diff --git a/Items/BrokenWaterFilter.cs b/Items/BrokenWaterFilter.cs new file mode 100644 index 0000000000..edaca008a4 --- /dev/null +++ b/Items/BrokenWaterFilter.cs @@ -0,0 +1,31 @@ +using CalamityMod.Projectiles.Typeless; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items +{ + public class BrokenWaterFilter : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Broken Water Filter"); + Tooltip.SetDefault("Releases a bunch of caustic tears\n" + + "More tears are released in the water"); + } + + public override void SetDefaults() + { + item.width = 14; + item.height = 28; + item.maxStack = 999; + item.consumable = true; + item.rare = 1; + item.value = CalamityGlobalItem.Rarity1BuyPrice; + item.useStyle = ItemUseStyleID.SwingThrow; + item.useAnimation = item.useTime = 25; + item.noUseGraphic = true; + item.shootSpeed = 7f; + item.UseSound = SoundID.Item1; + item.shoot = ModContent.ProjectileType(); + } + } +} diff --git a/Items/BrokenWaterFilter.png b/Items/BrokenWaterFilter.png new file mode 100644 index 0000000000000000000000000000000000000000..6b1604e24cc266a4620634755818cb34e3a070a9 GIT binary patch literal 497 zcmVPx$t4TybR7i=<)jw-fQ5eVZ&lOv(HrBMZ{<#JTwG~7K#UUUr;^yF>BEA7ZaBvU@ z--OV`$yZ>P4&vZg2L~w#Qi!%j2q98UO53RTr(TEjrrwZXMVjWf+;cg<=bZE9dCqf! zu_L2k_19_y2L@9Ce5kHOFf`B?KxOHxKlQHo-bS=-L$3eO_PO$>2rivH0cMM(2ri#L z2BxO-QBzFtFB@z+L2&eN7R)bHBe-)l*U~sOoo~d@O*x29e)HUE@TL3>jOS8d@@a1( zARNvn{{Kd@`8hbWF9hY~S|SH8X8XbQ3s({W6OZqM?3tbb3Nt^@o@Db0g5H66++6SA z!R?2jR4IVH*CxTETZ1_meZ`@1FheP#higVIxZ8|~F zc4CceJX7yUZ;JVrB+p;XfK%xTcs5tBrgY!VEhcCf)<`lV8Bkm(MvyyxQTAqh00000NkvXXu0mjf_7dTD literal 0 HcmV?d00001 diff --git a/Items/Placeables/Furniture/EffigyOfDecay.cs b/Items/Placeables/Furniture/EffigyOfDecay.cs new file mode 100644 index 0000000000..cd1290e38f --- /dev/null +++ b/Items/Placeables/Furniture/EffigyOfDecay.cs @@ -0,0 +1,33 @@ +using CalamityMod.Tiles.Furniture; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.Furniture +{ + public class EffigyOfDecay : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Effigy of Decay"); + Tooltip.SetDefault("When placed down nearby players have their damage can breath underwater\n" + + "This effect does not work in the abyss\n" + + "Nearby players are also immune to the sulphuric poisoning"); + } + + public override void SetDefaults() + { + item.width = 22; + item.height = 32; + item.maxStack = 99; + item.useTurn = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useTime = 10; + item.useStyle = 1; + item.consumable = true; + item.value = Item.buyPrice(0, 9, 0, 0); + item.rare = 3; + item.createTile = ModContent.TileType(); + } + } +} diff --git a/Items/Placeables/Furniture/EffigyOfDecay.png b/Items/Placeables/Furniture/EffigyOfDecay.png new file mode 100644 index 0000000000000000000000000000000000000000..6448e3e42d29d68e6256af9acfcd817c53114804 GIT binary patch literal 540 zcmV+%0^|LOP)Px$)=5M`R7i=vmQ61MK^Vt>gLYYzl6c9cf<&4$B9S;q#LbPwx9~~ChwvR7owy1I z!a;h`XcK9uq)O>VUs#9PsZQ-yLZ<)Ayk_<{&ph*=74wN%T4h^N0NiTLLze)^7D{xI zS9<}Vr{k=DsIT>70B*GgKq}z?kiN@@!nHOAt%v}qFanq)uDnaa!G0OrFw%PC6M$%6 zF95a12LN-EaR9P~lG=gj4)NnlMI%u*aQGi}Uryr0d0Bo)-YHj1hO|MX{RBoFPb`uq8n9Rqx+2O|;-@V$&+Q|d_ zxl1t)$O>(u%3sHlFV0aW2f+BSEdYwIt~S3bF9`6Rzv||}gEnqYTe6aoMRFzqz^5n6 z)2jo(B=K*tRc`0p7d7JT^&|ji=^^dqP%kVz7P`vPKNv;1TCwJgj5dfCr(wC1iIS(K(); + } + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.Chest); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Placeables/Furniture/RustyChest.png b/Items/Placeables/Furniture/RustyChest.png new file mode 100644 index 0000000000000000000000000000000000000000..f35a85e23384532533aea08c3b5c3e5650efec31 GIT binary patch literal 490 zcmVPx$q)9|UR7i=?g4%gO5EGyuED=Rs)pA80gv019Ic0N%|VV3Gr)owBl)%EH(?skMFH zc?YCooz1NyWj&e8DrjsvbIy4g;t_cZ>G_C2MNN@KV+D**;LU^&Bi0Pd?#0l>=qjFPZ-QhLw* zVeJ4ucfUaP#!$awfe8*+iA<#Ok!;!mDA(!$1pae$!9)gtf%Fgn)%sJU6XrOe^Hb$t g3WqqM({Tsh09`qa>d6KD{{R3007*qoM6N<$f)qO31ONa4 literal 0 HcmV?d00001 diff --git a/Items/Placeables/HardenedSulphurousSandstone.cs b/Items/Placeables/HardenedSulphurousSandstone.cs new file mode 100644 index 0000000000..dc8de7a63c --- /dev/null +++ b/Items/Placeables/HardenedSulphurousSandstone.cs @@ -0,0 +1,36 @@ +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables +{ + public class HardenedSulphurousSandstone : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hardened Sulphurous Sandstone"); + } + + public override void SetDefaults() + { + item.createTile = ModContent.TileType(); + item.useStyle = ItemUseStyleID.SwingThrow; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.width = 16; + item.height = 16; + item.maxStack = 999; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddTile(18); + recipe.AddIngredient(ModContent.ItemType(), 4); + recipe.SetResult(this); + recipe.AddRecipe(); + base.AddRecipes(); + } + } +} diff --git a/Items/Placeables/HardenedSulphurousSandstone.png b/Items/Placeables/HardenedSulphurousSandstone.png new file mode 100644 index 0000000000000000000000000000000000000000..9f1150114bde5572734a10da3ab41ee399e77739 GIT binary patch literal 257 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|c6+)whFJ8j zoxG8|$w8!j|7stBtP4j4W;tc7Jhouz(*N>OQBhixqVyD#NyhH2)iMa4T@BoAbzFh1aUv!3_%U0#Nn8IS+-c6nP`TCO}* zl@PtNv2M1phVZ#+2AS{uS&MIMakN}$wzI{u*~6A`f;2zFc}wQ`E3YU16Yoly`Qzux z*TO0cuOp;){hdBDR$y}h&jC~4`dh~qN^>x%Zh3g0EnmjWJU>I^HppuXp00i_>zopr E0N>SQZ2$lO literal 0 HcmV?d00001 diff --git a/Items/Placeables/Walls/HardenedSulphurousSandstoneWall.cs b/Items/Placeables/Walls/HardenedSulphurousSandstoneWall.cs new file mode 100644 index 0000000000..7fab425008 --- /dev/null +++ b/Items/Placeables/Walls/HardenedSulphurousSandstoneWall.cs @@ -0,0 +1,36 @@ +using Terraria.ModLoader; +using WallTiles = CalamityMod.Walls; +namespace CalamityMod.Items.Placeables.Walls +{ + public class HardenedSulphurousSandstoneWall : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Hardened Sulphurous Sandstone Wall"); + } + + public override void SetDefaults() + { + item.createWall = ModContent.WallType(); + item.useStyle = 1; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.width = 16; + item.height = 16; + item.maxStack = 999; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddTile(18); + recipe.AddIngredient(ModContent.ItemType()); + recipe.SetResult(this, 4); + recipe.AddRecipe(); + base.AddRecipes(); + } + } +} diff --git a/Items/Placeables/Walls/HardenedSulphurousSandstoneWall.png b/Items/Placeables/Walls/HardenedSulphurousSandstoneWall.png new file mode 100644 index 0000000000000000000000000000000000000000..011ec604f4035d9c1eb979fd608305e6910959b2 GIT binary patch literal 423 zcmV;Y0a*TtP)Px$VM#bAa6$8wb`T$+}^j&y>O3W}s9U>@5Ad!To zgL8@ODs(CCw^--1lly%4`K(6w696{HqUHjIai{>Q+AKR3m9;(&V+C+3Pu9MhOCS9U zC>7}%;AJ+p9J}fafDUc}Sgdo)|1^C7;7|+!Sm!ItpAI4gJ{d?v60sm029}*~>@#-Z zGQK*4pwHn(UhXRZ#%XNL|HkP0IY{nCKv&nZ@f?68+5_F0PUd#xpWCx#3zKEG1v=ea zKL=sh{G%|#bZ`J5JDU1FH1pZgjKa*#g!-5egwK|5haUKUGy=L{r{%}_YTs5 z7dWy=AsX6E}C3PUs(), 15); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/RustyLockpick.png b/Items/RustyLockpick.png new file mode 100644 index 0000000000000000000000000000000000000000..428130670976701b49c3a639a8fe24008b57ef8b GIT binary patch literal 383 zcmV-_0f7FAP)Px$IY~r8R5*>ble6%&HNxFnJti_NUen&4$Oe>Zc^&&Rn5CTM+S2Y{aMsd4elB;!vK@sE17 z27sKM2Ov;Y1#o;Y0O0)MCK)js|0v`o0A4Gs?P#w8!0A~NfYrJy(jkgm830T904%s$ zqsW_KxV>+ah!}NM69ENqvbzaD=^)h{g1JUnxqD=$%sO4 zO5U;n@P|WVHy@rmQEn>4s76iNU#=MmjW431e-pnM9ckl8`|rlzDw`3ZH&6ip&ATE1 z8i4S@Fh;)r|+fGiaSfY%MLB)vImxz3aEj+3;~o8#1tQCH)VmGI)d dj(LZPiJ!JkSw?dqqYVH6002ovPDHLkV1kjZpB(@I literal 0 HcmV?d00001 diff --git a/Items/Weapons/Summon/RustyBeaconPrototype.cs b/Items/Weapons/Summon/RustyBeaconPrototype.cs new file mode 100644 index 0000000000..6a53511774 --- /dev/null +++ b/Items/Weapons/Summon/RustyBeaconPrototype.cs @@ -0,0 +1,45 @@ +using CalamityMod.Projectiles.Summon; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Summon +{ + public class RustyBeaconPrototype : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rusty Beacon Prototype"); + Tooltip.SetDefault("Summons a long-abandoned drone to support you\n" + + "Clicking on an enemy gives them a tiny prick, causing them to become aggravated\n" + + "The drone hovers above nearby enemies and gives them various debuffs"); + } + + public override void SetDefaults() + { + item.mana = 10; + item.width = 28; + item.height = 20; + item.useTime = item.useAnimation = 35; + item.useStyle = 4; + item.noMelee = true; + item.knockBack = 0.5f; + item.value = CalamityGlobalItem.Rarity1BuyPrice; + item.rare = 1; + item.UseSound = SoundID.Item15; // Phaseblade sound effect + item.autoReuse = true; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 10f; + item.summon = true; + } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.altFunctionUse != 2) + { + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI, 0f, 1f); + } + return false; + } + } +} diff --git a/Items/Weapons/Summon/RustyBeaconPrototype.png b/Items/Weapons/Summon/RustyBeaconPrototype.png new file mode 100644 index 0000000000000000000000000000000000000000..13625d6aacf8b7ca7178bb9142264387012c41f1 GIT binary patch literal 513 zcmV+c0{;DpP)Px$yGcYrR7i=%)<0`hK@-vpD@Rg-M~EwZGDqK04-6bXnRVrLPs5gSXvQWUF{ z`2ZGH@hc=&+KF8-g%S%9L5Kmd*hrGi#?_b<&*C|3-ew~TX7@C2?p)^0Iq#mi^Mc<9 zT|IG_XoAsVe}E6=)dWTcdIPNg*aC%PN5InO<;=Q{W-t4nIJ95l&ZY58JTt$T?4FPD zNU;D$Cx!wP`_F?{Z|BfX1rhlZIn_HJNtwBQF1##!W zp7cC?-B`=y8yPmvH|ATXAfh|p9iaNXnqgjEeS^I&S*d(!dILtZ?i}nw=BBDM9t^O( zvk5A-t-so!b-if6zlx)|^oFYa+)0z$8~?Pyfh+h0_#J~7q`HHS00000NkvXXu0mjf DVvFv# literal 0 HcmV?d00001 diff --git a/Items/Weapons/Summon/StaffoftheMechworm.cs b/Items/Weapons/Summon/StaffoftheMechworm.cs index f2b7a04d87..291d3d519d 100644 --- a/Items/Weapons/Summon/StaffoftheMechworm.cs +++ b/Items/Weapons/Summon/StaffoftheMechworm.cs @@ -65,46 +65,19 @@ namespace CalamityMod.Items.Weapons.Summon maxMinionScale = 10; } damage = (int)(damage * ((player.minionDamage * 5 / 3) + (player.minionDamage * 0.46f * (maxMinionScale - 1)))); - int owner = player.whoAmI; - float num72 = item.shootSpeed; - player.itemTime = item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - Vector2 value = Vector2.UnitX.RotatedBy((double)player.fullRotation, default); - Vector2 vector3 = Main.MouseWorld - vector2; - float velX = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float velY = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (player.gravDir == -1f) - { - velY = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; - } - float dist = (float)Math.Sqrt((double)(velX * velX + velY * velY)); - if ((float.IsNaN(velX) && float.IsNaN(velY)) || (velX == 0f && velY == 0f)) - { - velX = (float)player.direction; - velY = 0f; - dist = num72; - } - else - { - dist = num72 / dist; - } - velX *= dist; - velY *= dist; int head = -1; int tail = -1; - int typeHead = ModContent.ProjectileType(); - int typeTail = ModContent.ProjectileType(); - for (int i = 0; i < Main.maxProjectiles; i++) + for (int num187 = 0; num187 < Main.projectile.Length; num187++) { - if (Main.projectile[i].active && Main.projectile[i].owner == owner) + if (Main.projectile[num187].active && Main.projectile[num187].owner == Main.myPlayer) { - if (head == -1 && Main.projectile[i].type == typeHead) + if (head == -1 && Main.projectile[num187].type == ModContent.ProjectileType()) { - head = i; + head = num187; } - else if (tail == -1 && Main.projectile[i].type == typeTail) + if (tail == -1 && Main.projectile[num187].type == ModContent.ProjectileType()) { - tail = i; + tail = num187; } if (head != -1 && tail != -1) { @@ -114,53 +87,30 @@ namespace CalamityMod.Items.Weapons.Summon } if (head == -1 && tail == -1) { - float num77 = Vector2.Dot(value, vector3); - if (num77 > 0f) - { - player.ChangeDir(1); - } - else - { - player.ChangeDir(-1); - } - velX = 0f; - velY = 0f; - vector2.X = (float)Main.mouseX + Main.screenPosition.X; - vector2.Y = (float)Main.mouseY + Main.screenPosition.Y; - int curr = Projectile.NewProjectile(vector2.X, vector2.Y, velX, velY, ModContent.ProjectileType(), damage, knockBack, owner); + speedX = 0f; + speedY = 0f; + position.X = (float)Main.mouseX + Main.screenPosition.X; + position.Y = (float)Main.mouseY + Main.screenPosition.Y; + int curr = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f); + curr = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, curr, 0f); int head2 = curr; - - int prev = curr; - curr = Projectile.NewProjectile(vector2.X, vector2.Y, velX, velY, ModContent.ProjectileType(), damage, knockBack, owner, (float)prev); - Main.projectile[curr].identity = head2; - - prev = curr; - curr = Projectile.NewProjectile(vector2.X, vector2.Y, velX, velY, ModContent.ProjectileType(), damage, knockBack, owner, (float)prev); - Main.projectile[prev].localAI[1] = (float)curr; - Main.projectile[prev].netUpdate = true; - Main.projectile[curr].identity = head2; - - prev = curr; - curr = Projectile.NewProjectile(vector2.X, vector2.Y, velX, velY, ModContent.ProjectileType(), damage, knockBack, owner, (float)prev); - Main.projectile[prev].localAI[1] = (float)curr; - Main.projectile[prev].netUpdate = true; + curr = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, curr, 0f); + Main.projectile[head2].localAI[1] = curr; + head2 = curr; + curr = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, curr, 0f); + Main.projectile[head2].localAI[1] = curr; } else if (head != -1 && tail != -1) { - float uuid = (float)Projectile.GetByUUID(Main.myPlayer, Main.projectile[tail].ai[0]); - int body = Projectile.NewProjectile(vector2.X, vector2.Y, velX, velY, ModContent.ProjectileType(), damage, knockBack, owner, uuid); - int back = Projectile.NewProjectile(vector2.X, vector2.Y, velX, velY, ModContent.ProjectileType(), damage, knockBack, owner, (float)body); - - Main.projectile[body].localAI[1] = (float)back; - Main.projectile[body].ai[1] = 1f; + int body = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, Projectile.GetByUUID(Main.myPlayer, Main.projectile[tail].ai[0]), 0f); + int body2 = body; + body = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, body, 0f); + Main.projectile[body2].localAI[1] = body; + Main.projectile[body2].netUpdate = true; + Main.projectile[body2].ai[1] = 1f; + Main.projectile[body].localAI[1] = tail; Main.projectile[body].netUpdate = true; - Main.projectile[body].identity = head; - - Main.projectile[back].localAI[1] = (float)tail; - Main.projectile[back].netUpdate = true; - Main.projectile[back].ai[1] = 1f; - Main.projectile[body].identity = head; - + Main.projectile[body].ai[1] = 1f; Main.projectile[tail].ai[0] = Main.projectile[body].projUUID; Main.projectile[tail].netUpdate = true; Main.projectile[tail].ai[1] = 1f; diff --git a/NPCs/Abyss/MicrobialCluster.cs b/NPCs/Abyss/MicrobialCluster.cs new file mode 100644 index 0000000000..3441e843dd --- /dev/null +++ b/NPCs/Abyss/MicrobialCluster.cs @@ -0,0 +1,90 @@ +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Dusts; +using CalamityMod.Projectiles.Enemy; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Banners; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.NPCs.Abyss +{ + public class MicrobialCluster : ModNPC + { + public const int ChargeRate = 120; + public const int SlowdownTime = 45; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Microbial Cluster"); + } + + public override void SetDefaults() + { + npc.noGravity = true; + npc.damage = 0; + npc.width = 24; + npc.height = 24; + npc.lifeMax = 5; + npc.aiStyle = aiType = -1; + for (int k = 0; k < npc.buffImmune.Length; k++) + { + npc.buffImmune[k] = true; + } + npc.noTileCollide = false; + npc.noGravity = true; + npc.HitSound = SoundID.NPCHit1; + npc.DeathSound = SoundID.NPCDeath1; + npc.dontTakeDamageFromHostiles = true; + npc.knockBackResist = 0f; + } + public override void AI() + { + if (npc.collideX || npc.collideY) + { + npc.velocity *= -1f; + npc.netUpdate = true; + } + DelegateMethods.v3_1 = Color.GreenYellow.ToVector3() * 2f; + Utils.PlotTileLine(npc.Center, npc.Center + npc.velocity * 10f, 8f, new Utils.PerLinePoint(DelegateMethods.CastLightOpen)); + npc.ai[0]++; + if (npc.ai[0] % SlowdownTime > SlowdownTime - SlowdownTime) + { + npc.velocity *= 0.98f; + } + if (npc.ai[0] % SlowdownTime == SlowdownTime - 1) + { + npc.velocity = npc.velocity.SafeNormalize(-Vector2.UnitY).RotatedByRandom(MathHelper.PiOver4) * 4f; + } + if (npc.ai[0] % 32f == 31f) + { + Dust dust = Dust.NewDustPerfect(npc.Center, (int)CalamityDusts.SulfurousSeaAcid); + dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(1f, 2f); + dust.noGravity = true; + dust.scale = 1.6f; + } + } + + public override float SpawnChance(NPCSpawnInfo spawnInfo) => spawnInfo.player.InSulphur() && spawnInfo.water ? 0.4f : 0f; + + public override void NPCLoot() + { + } + + public override void HitEffect(int hitDirection, double damage) + { + if (npc.life <= 0) + { + for (int k = 0; k < 6; k++) + { + Dust dust = Dust.NewDustPerfect(npc.Center, (int)CalamityDusts.SulfurousSeaAcid); + dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(1f, 2f); + dust.scale = 1.2f; + } + } + } + } +} diff --git a/NPCs/Abyss/MicrobialCluster.png b/NPCs/Abyss/MicrobialCluster.png new file mode 100644 index 0000000000000000000000000000000000000000..f5bfef9b911697e77dc15d1436b5dd829819a5ae GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucK~+x|#}JL+WC@lAL9b*6)ks!@vn*;K8F+*f jtfoHwanOWOSVDrqV+x~aJ*UA+paup{S3j3^P6(), 180); + projectile.Kill(); + } + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 180); + projectile.Kill(); + } + public override void Kill(int timeLeft) + { + for (int i = 0; i < 15; i++) + { + Dust dust = Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, (int)CalamityDusts.SulfurousSeaAcid); + dust.velocity = Vector2.One.RotatedBy(i / 15f * MathHelper.TwoPi) * 3f * (float)Math.Cos(i / 15f * MathHelper.TwoPi); + dust.scale = 2.5f; + dust.noGravity = true; + } + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } +} diff --git a/Projectiles/Summon/RustShrapnel.png b/Projectiles/Summon/RustShrapnel.png new file mode 100644 index 0000000000000000000000000000000000000000..7e787acdea5709c22be469715ce978b017752f6e GIT binary patch literal 417 zcmV;S0bc%zP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0X9iQK~zXfWBmXB zKLaU%2}%J!)|wOFXJCJ&~`w}JL)3Ec)QMJp5mnA>51WE(DMU2AU%{|X$fW; zdcL4IKfpDBQYQ$5Oax(2DUM!}g8=D%fW 0) + { + projectile.alpha = (int)MathHelper.Lerp(projectile.alpha, 0f, 0.02f); + projectile.velocity = Vector2.UnitY * 10f; + } + if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) + { + int trueDamage = (int)(projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue * + player.MinionDamage()); + projectile.damage = trueDamage; + } + projectile.frameCounter++; + if (projectile.frameCounter > 8) + { + projectile.frame++; + projectile.frameCounter = 0; + } + bool isCorrectProjectile = projectile.type == ModContent.ProjectileType(); + player.AddBuff(ModContent.BuffType(), 3600); + if (isCorrectProjectile) + { + if (player.dead) + { + modPlayer.rustyDrone = false; + } + if (modPlayer.rustyDrone) + { + projectile.timeLeft = 2; + } + } + NPC potentialTarget = projectile.Center.MinionHoming(DistanceToCheck, player); + if (potentialTarget == null) + { + if (projectile.Distance(player.Center) > 120f) + { + projectile.velocity = (projectile.velocity * PlayerHomingInertia + projectile.DirectionTo(player.Top) * PlayerHomingSpeed) / (PlayerHomingInertia + 1); + } + if (projectile.frame >= 8) + { + projectile.frame = 0; + } + } + else + { + // A bit above the target, and always on the opposite side of the target's sprite direction. + Vector2 destination = potentialTarget.Top + Vector2.UnitX * -potentialTarget.spriteDirection * Main.rand.NextFloat(50f, 75f) - Vector2.UnitY * 42f; + projectile.velocity = (projectile.velocity * NPCHomingInertia + projectile.DirectionTo(destination) * NPCHomingSpeed) / (NPCHomingInertia + 1); + if (projectile.frame < 8) + { + projectile.frame = 8; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 8; + } + if (projectile.Distance(destination) < 55f) + { + if (projectile.ai[0]++ % AttackRate == AttackRate - 1) + { + if (projectile.owner == Main.myPlayer) + { + Projectile.NewProjectile(potentialTarget.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, projectile.owner, projectile.whoAmI, potentialTarget.whoAmI); + } + } + } + } + projectile.spriteDirection = (projectile.velocity.X > 0).ToDirectionInt(); + projectile.rotation = projectile.velocity.X * 0.05f; + projectile.ai[1]++; + if (projectile.ai[1] >= 360f) + { + Utils.PoofOfSmoke(projectile.Center); + for (int i = 0; i < 4; i++) + { + Projectile.NewProjectile(projectile.Center, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * 8f, ModContent.ProjectileType(), + (int)(ExplosionShrapnelBaseDamage * player.MinionDamage()), 2f, projectile.owner); + } + projectile.Kill(); + } + } + + public override bool CanDamage() => projectile.localAI[0] == 0f; // Only do damage from the initial 1 damage prick, and never again. This is a support summon. + } +} diff --git a/Projectiles/Summon/RustyDrone.png b/Projectiles/Summon/RustyDrone.png new file mode 100644 index 0000000000000000000000000000000000000000..9682cc8684e6ee3fbec5f245150613b50c35c10a GIT binary patch literal 1845 zcmeAS@N?(olHy`uVBq!ia0vp^Dhv#a863<&7KialP9Vit9OUlAuvTtl!YKFB_}1P^-w8#_TDKVXybAyE zKNqNM6pV(z@CyM&lbo%p7vP zB#&plvg+6_?I%3@h-=Y>ee&*inC3hv*dwSalRQ>D~k7{{7-#ST5ymZpFC#91t4W1}CPn;IdxnknFX{JZpur*7ys)q=QHH8m1JsqRc0Pg*`z z4!X3Ali6#d*CVD55u4IU$4ZxMb55Sv_e5AQX+ten=krs*cyu~6C3=-kMYZSswzU(#>{v1R z%td8($*wK`s@4j5bJ`T;cm^pgeR0r#QtlUzRUHp2l^#C)KmXIpy= Main.projectile.Length || projectile.ai[1] < 0 || projectile.ai[1] >= Main.npc.Length) + { + projectile.Kill(); + return; + } + if (Main.projectile[(int)projectile.ai[0]].type != ModContent.ProjectileType() || + !Main.projectile[(int)projectile.ai[0]].active) + { + projectile.Kill(); + } + if (!Main.npc[(int)projectile.ai[1]].active) + { + projectile.Kill(); + } + projectile.Center = Vector2.Lerp(projectile.Center, Main.npc[(int)projectile.ai[1]].Center + DeltaPositionRelativetoTarget * Outwardness, 3f / TurnRate); + if (projectile.localAI[0] == 0f) + { + DeltaPositionRelativetoTarget = Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi); + projectile.localAI[0] = 1f; + } + projectile.localAI[1]++; + if (projectile.localAI[1] % TurnRate == TurnRate - 1f) + { + Outwardness *= 0.6f; + DeltaPositionRelativetoTarget = DeltaPositionRelativetoTarget.RotatedByRandom(MathHelper.PiOver4); + projectile.scale = 1.5f; + projectile.netUpdate = true; + } + if (projectile.scale > 1f && Outwardness > 4f) + { + projectile.scale = MathHelper.Lerp(projectile.scale, 1f, 0.025f); + } + else if (Outwardness <= 4f) + { + Outwardness *= 0.935f; + if (projectile.timeLeft > 40) + { + projectile.timeLeft = 40; + Main.npc[(int)projectile.ai[1]].AddBuff(BuffID.Poisoned, BuffTime); + Main.npc[(int)projectile.ai[1]].AddBuff(ModContent.BuffType(), BuffTime); + } + projectile.alpha = (int)MathHelper.Lerp(projectile.alpha, 255f, 1f / 40f); + projectile.scale += 0.05f; + } + } + } +} diff --git a/Projectiles/Summon/RustyDroneTargetIndicator.png b/Projectiles/Summon/RustyDroneTargetIndicator.png new file mode 100644 index 0000000000000000000000000000000000000000..a0b103cdd0b6162fb619dfc247cbfde8b683f118 GIT binary patch literal 711 zcmV;&0yzDNP)Px%fk{L`R9J=Wm_ch3K@`V-vzw;UMhuN^H3cy!G2p2Og;=~4kAl4^9{mI&iUH4J zphfx#Jc{005KrRG2JE3HAqFKP*xG1H#a3v$oAEIF5@#_fgd7&hyJX*+H#3?4y!ZZZ zSJ9`G*RBE(d~Ip~cPgU*O4G0VTF>eCj|^JWVGfITp8>F+dka8oya|B5@C|^G+@uCL zsBbC&_5LIP&Ta;PWPJvJJ5O%)+$a8sEHrKyhiVo8cj=-A*qxoX{6;V30oZ$2v+Uz< z?gJ3atttRrSO?&q_u`-X#TSt%61uRi{~ix2;heME0JvUS0|bq2WB-&k_9E6iRn7K9 zCVq%Wb_8>)KnICL`MTJx69rqp0B|Rc>QGmqZWfNjmS0*Hy9(_L@Q%! zYp16!{tG3Og_3Q1v-1X-#(B#>Hi#%;QN8a2(E9$_s5O^O9B7xKqGahBjM=z)4QDR8}JiNAM`3ai`6{GuZP3nm0ac@5d zVuVP$vPzG6B false; } } diff --git a/Projectiles/Summon/WulfrumBoltMinion.cs b/Projectiles/Summon/WulfrumBoltMinion.cs new file mode 100644 index 0000000000..3ace303fb9 --- /dev/null +++ b/Projectiles/Summon/WulfrumBoltMinion.cs @@ -0,0 +1,58 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class WulfrumBoltMinion : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bolt"); + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 8; + projectile.height = 8; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.penetrate = 1; + projectile.extraUpdates = 1; + projectile.minionSlots = 0f; + projectile.minion = true; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, 0f, (255 - projectile.alpha) * 0.1f / 255f, 0f); + for (int num151 = 0; num151 < 3; num151++) + { + int num154 = 14; + int num155 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width - num154 * 2, projectile.height - num154 * 2, 61, 0f, 0f, 100, default, 3f); + Main.dust[num155].noGravity = true; + Main.dust[num155].noLight = true; + Main.dust[num155].velocity *= 0.1f; + Main.dust[num155].velocity += projectile.velocity * 0.5f; + } + if (Main.rand.NextBool(8)) + { + int num156 = 16; + int num157 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width - num156 * 2, projectile.height - num156 * 2, 61, 0f, 0f, 100, default, 2.25f); + Main.dust[num157].velocity *= 0.25f; + Main.dust[num157].noLight = true; + Main.dust[num157].velocity += projectile.velocity * 0.5f; + return; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + } +} diff --git a/Projectiles/Summon/WulfrumBoltMinion.png b/Projectiles/Summon/WulfrumBoltMinion.png new file mode 100644 index 0000000000000000000000000000000000000000..0056fc1e2479e11bd6391fc4ccd1fe54fa0d671f GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqY)RhkE)4%caKYZ?lYt_f1s;*b z3=DjSL74G){)!Z!AbW|YuPgflb|yv^-kZzH%z;9po-U3d5|@+z{QqyyY(), projectile.damage, 0.0f, Main.myPlayer, 0.0f, 0.0f); - Main.projectile[bolt].Calamity().forceMinion = true; + int bolt = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vec2.X, vec2.Y, ModContent.ProjectileType(), projectile.damage, 0.0f, Main.myPlayer, 0.0f, 0.0f); Main.projectile[bolt].netUpdate = true; - Main.projectile[bolt].penetrate = 1; - Main.projectile[bolt].extraUpdates = 1; - ProjectileID.Sets.MinionShot[Main.projectile[bolt].type] = true; projectile.netUpdate = true; } diff --git a/Projectiles/Typeless/BrokenWaterFilterSpewer.cs b/Projectiles/Typeless/BrokenWaterFilterSpewer.cs new file mode 100644 index 0000000000..6ea1e653dd --- /dev/null +++ b/Projectiles/Typeless/BrokenWaterFilterSpewer.cs @@ -0,0 +1,45 @@ +using CalamityMod.Dusts; +using CalamityMod.Items.SummonItems.Invasion; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class BrokenWaterFilterSpewer : ModProjectile + { + public const int TimeLeft = 180; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Star"); + } + + public override void SetDefaults() + { + projectile.width = 24; + projectile.height = 24; + projectile.friendly = true; + projectile.timeLeft = TimeLeft; + projectile.penetrate = 1; + projectile.tileCollide = false; + } + + public override void AI() + { + projectile.velocity *= 0.98f; + int totalTearCount = projectile.wet ? 5 : 3; + totalTearCount++; + if (projectile.ai[0]++ >= TimeLeft / totalTearCount) + { + Item.NewItem(projectile.Center, ModContent.ItemType()); + projectile.ai[0] = 0; + } + projectile.rotation = projectile.rotation.AngleTowards(MathHelper.PiOver4, 0.04f); + Dust dust = Dust.NewDustPerfect(projectile.Center, (int)CalamityDusts.SulfurousSeaAcid); + dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(1.5f, 3f); + dust.noGravity = true; + dust.scale = 1.3f; + } + public override bool CanDamage() => false; + } +} diff --git a/Projectiles/Typeless/BrokenWaterFilterSpewer.png b/Projectiles/Typeless/BrokenWaterFilterSpewer.png new file mode 100644 index 0000000000000000000000000000000000000000..6b1604e24cc266a4620634755818cb34e3a070a9 GIT binary patch literal 497 zcmVPx$t4TybR7i=<)jw-fQ5eVZ&lOv(HrBMZ{<#JTwG~7K#UUUr;^yF>BEA7ZaBvU@ z--OV`$yZ>P4&vZg2L~w#Qi!%j2q98UO53RTr(TEjrrwZXMVjWf+;cg<=bZE9dCqf! zu_L2k_19_y2L@9Ce5kHOFf`B?KxOHxKlQHo-bS=-L$3eO_PO$>2rivH0cMM(2ri#L z2BxO-QBzFtFB@z+L2&eN7R)bHBe-)l*U~sOoo~d@O*x29e)HUE@TL3>jOS8d@@a1( zARNvn{{Kd@`8hbWF9hY~S|SH8X8XbQ3s({W6OZqM?3tbb3Nt^@o@Db0g5H66++6SA z!R?2jR4IVH*CxTETZ1_meZ`@1FheP#higVIxZ8|~F zc4CceJX7yUZ;JVrB+p;XfK%xTcs5tBrgY!VEhcCf)<`lV8Bkm(MvyyxQTAqh00000NkvXXu0mjf_7dTD literal 0 HcmV?d00001 diff --git a/Tiles/Abyss/HardenedSulphurousSandstone.cs b/Tiles/Abyss/HardenedSulphurousSandstone.cs new file mode 100644 index 0000000000..d8a786d4c1 --- /dev/null +++ b/Tiles/Abyss/HardenedSulphurousSandstone.cs @@ -0,0 +1,101 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.Abyss +{ + public class HardenedSulphurousSandstone : ModTile + { + public override void SetDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithAbyss(Type); + + dustType = 32; + drop = ModContent.ItemType(); + AddMapEntry(new Color(76, 58, 59)); + mineResist = 1f; + minPick = 55; + soundType = 0; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem) + { + if (CalamityUtils.ParanoidTileRetrieval(i, j + 1).active() && + CalamityUtils.ParanoidTileRetrieval(i, j + 1).type == (ushort)ModContent.TileType()) + { + WorldGen.KillTile(i, j + 1); + } + } + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + return false; + } + public override void RandomUpdate(int i, int j) + { + int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); + int nearbyVineCount = 0; + for (int x = i - 15; x <= i + 15; x++) + { + for (int y = j - 15; y <= j + 15; y++) + { + if (WorldGen.InWorld(x, y)) + { + if (CalamityUtils.ParanoidTileRetrieval(x, y).active() && + CalamityUtils.ParanoidTileRetrieval(x, y).type == (ushort)ModContent.TileType()) + { + nearbyVineCount++; + } + } + } + } + if (Main.tile[i, j + 1] != null && nearbyVineCount < 5) + { + if (!Main.tile[i, j + 1].active() && Main.tile[i, j + 1].type != (ushort)ModContent.TileType()) + { + if (Main.tile[i, j + 1].liquid == 255 && + !Main.tile[i, j + 1].lava()) + { + bool flag13 = false; + for (int num52 = num8; num52 > num8 - 10; num52--) + { + if (Main.tile[i, num52].bottomSlope()) + { + flag13 = false; + break; + } + if (Main.tile[i, num52].active() && !Main.tile[i, num52].bottomSlope()) + { + flag13 = true; + break; + } + } + if (flag13) + { + int num53 = i; + int num54 = j + 1; + Main.tile[num53, num54].type = (ushort)ModContent.TileType(); + Main.tile[num53, num54].active(true); + WorldGen.SquareTileFrame(num53, num54, true); + if (Main.netMode == 2) + { + NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None); + } + } + } + Main.tile[i, j].slope(0); + Main.tile[i, j].halfBrick(false); + } + } + } + } +} diff --git a/Tiles/Abyss/HardenedSulphurousSandstone.png b/Tiles/Abyss/HardenedSulphurousSandstone.png new file mode 100644 index 0000000000000000000000000000000000000000..e77142812586de2c19f3eb80bf2e0629c97eb8ef GIT binary patch literal 21060 zcmYgYbyU;s`vwtEdZH4-Xb|ZVfiVz~5ClQ#6r@X5$TcK+)$cLsD66Q_Yczda^vQIke7a% z{MJW=f1f1SY_YQP&@YwvR6sb!DkHLQ=oatb$jWN# zsTLwHKU3!?FE4L^q!A?-CzW7jop%bx2aLUU9mclk?@q zwkMQC*q zsQ3W)#U&@VSo639jPC(7%9mO5`XQ}t&R<`RIPVu%hxs*qm&r6U}^77SL=x$&^`Lf1(2!?ScS9;~5Ft(qU zo%n{viV?xN0D~zv$_xehf9;5;MI^@|7|yEKB^Ud3FHP zQnA#srxP+0&E(&?>}0aeb-kWkMi~6E;bPUc1o#Z73pcqfFJF+Es4EcwU&m|pEPY4? zaA##QS_%ujszZMly! zlPeD$e*VYKPiIDbJM<>e{6UY0$n@dnl^FPH!F;Jr_q}h(?)wbjGa25fYetu+I2HGY3p0fMa14e;UWn1ZNo;xPDmTnz*5mW1$?5>Z7(h% z-t3r7=Qra6g_-?VzqCJ|z^>LVWJVwN``$53y%G2XktGUzZxaS$Mu==$OV`@LiThAz zblUYB`lD8dP3T2Unf|85+^VYx7{g*)19}e~(ZH@pw2Z9**`vkgzLR?XDDNC18A1(z zmdaL6deeo94)w^$iNbky|fT*QRyT%-x>v6?8Q4Fo1EhJ zlF32?tkKO?u^G&W8`9sf6dhmRc zWoU4W4XmEBb$cC_NZL$tzPYs&3oqC1dN)LHN)X%M?UO+hb?z z@L3KMuc)m_mcOg4ynH5q+ri1wdyo$KQ#>~g>>)gGzd8Ki z%OU}jKDqCId(gj zG)IDXhPom3wrdDjf(z%86LpOP&UjPM{p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;GIm`6wfW8Du~7@b{TVRhPku9~ zQ8%A%Ytr0Dr0hu$#4{(=6*Cbq8UO11iGMBiu~bT2zS!}Bq>C5)Vc$AuR|Brin0esm z+?DIi+0Ti`#L3=Jz<0<%Rb=E;#6CM$6FWlSuZ8+v2!Y-uklj+_;yUiAo%p%x$FH9tR~meSZsd`k(8I{&5MVfuPzt_#zJzK8k!rF>N!UJ4{W?Q`Tzg` literal 0 HcmV?d00001 diff --git a/Tiles/Abyss/RustyChestLocked.cs b/Tiles/Abyss/RustyChestLocked.cs new file mode 100644 index 0000000000..9391ea2eb8 --- /dev/null +++ b/Tiles/Abyss/RustyChestLocked.cs @@ -0,0 +1,124 @@ +using CalamityMod.Dusts; +using CalamityMod.Items; +using CalamityMod.Items.Placeables.Furniture; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.Abyss +{ + public class RustyChestLocked : ModTile + { + public override void SetDefaults() + { + this.SetUpChest(); + ModTranslation name = CreateMapEntryName("chestRusty"); + name.SetDefault("Rusty Chest"); + AddMapEntry(new Color(57, 48, 83), name, MapChestName); + dustType = ModContent.DustType(); + disableSmartCursor = true; + adjTiles = new int[] { TileID.Containers }; + chest = "Rusty Chest"; + chestDrop = ModContent.ItemType(); + } + + public override bool HasSmartInteract() => true; + + public override bool IsLockedChest(int i, int j) => Main.tile[i, j].frameX / 36 == 1; + + public override bool UnlockChest(int i, int j, ref short frameXAdjustment, ref int dustType, ref bool manual) + { + Player closest = Main.player[Player.FindClosest(new Vector2(i, j) * 16f, 1, 1)]; + if (!closest.InventoryHas(ModContent.ItemType())) + return false; + + for (int k = 0; k < closest.inventory.Length; k++) + { + if (closest.inventory[k].type == ModContent.ItemType()) + { + if (ItemLoader.ConsumeItem(closest.inventory[k], closest)) + { + closest.inventory[k].stack--; + } + if (closest.inventory[k].stack <= 0) + { + closest.inventory[k] = new Item(); + } + break; + } + } + + dustType = this.dustType; + + return true; + } + + public string MapChestName(string name, int i, int j) + { + // Bounds check + if (i < 0 || i >= Main.maxTilesX || j < 0 || j >= Main.maxTilesY) + return name; + + // Tile null check + Tile tile = Main.tile[i, j]; + if (tile is null) + return name; + + int left = i; + int top = j; + if (tile.frameX % 36 != 0) + left--; + if (tile.frameY != 0) + top--; + + int chest = Chest.FindChest(left, top); + return name + (Main.chest[chest].name != "" ? ": " + Main.chest[chest].name : ""); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = 1; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 32, 32, chestDrop); + Chest.DestroyChest(i, j); + } + + public override bool NewRightClick(int i, int j) + { + Tile tile = Main.tile[i, j]; + + int left = i; + int top = j; + + if (tile.frameX % 36 != 0) + { + left--; + } + if (tile.frameY != 0) + { + top--; + } + return CalamityUtils.LockedChestRightClick(IsLockedChest(left, top), left, top, i, j); + } + + public override void MouseOver(int i, int j) + { + if (IsLockedChest(i, j)) + CalamityUtils.ChestMouseOver("Rusty Chest", i, j); + else + CalamityUtils.ChestMouseOver("Rusty Chest", i, j); + } + + public override void MouseOverFar(int i, int j) + { + if (IsLockedChest(i, j)) + CalamityUtils.ChestMouseFar("Rusty Chest", i, j); + else + CalamityUtils.ChestMouseFar("Rusty Chest", i, j); + } + } +} diff --git a/Tiles/Abyss/RustyChestLocked.png b/Tiles/Abyss/RustyChestLocked.png new file mode 100644 index 0000000000000000000000000000000000000000..e88cc3af08cae44425ffbcd12207ba60254c3e63 GIT binary patch literal 1539 zcmZ8hdpOf;9RCe-m~2Ql<eYjLJ_ z*-RkTa%w)@l51_DAuVUknQoMchs_liN%)AGZ3ecL1T99K0Mm0sTG!*)vqZF&I6arQ zc00xwkD=*xMV}?rKfPL5Sg2Aw92O{YH2GY1nKgQ~o6qD_wsl9l7JgPmx7kH)t4`_X z&fe2g+hSycxy%=drAM#08o%BvZyGU@1&^{8jq^3$@j6!FJ6CPPjqH~aT6T8lb6qY1XMQ?%Kh-r=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9JaAJcK!kW~sVU)7fE54-+6nZ41CeXVrqgH9xhKXl!;MXIOe z$~8b{KQhg@>gBq1YIgL))T`%!0>{cfM}|-BDr#M1BX4`(bk=!3rgxsq)*Lr9V)4rrrJuc|%JpOXlTSW-{5jL6=8JZ(D!aY?(vP1XUN@=x{a3m7cJ%d272kjQ zNwpv2V_Li3@%MMRWgic|tCLD*x3#??{dRB7q`dj8Wda$p7oJ|6{^k3}->bh&fBM_~ z{9IL_;F=}x@7(g#K5;$&erW8R3|5)D`wETs{yW?LT|F+|$}e8~#R`-4vMf^n&pucA zy(-40?(N^G*uDDqw>LX{omUdSqWRiczO0iC4Un+76Ub5~@F9GiX+^}p7MEPbHo0kSPk1e5&{Qipu^+fHCyyF7Jl{ijDJ0A-A%^@8z;qu zrzRhtYV~o;`Qv;{&HsCo*60A^_UArX7PkA2uhZDKrhp<8+#;>lBa&&a6AydQ*VkK(9a*Gwqz|`bnDdCwI4QRJ>S^u z@ObynHLJZ`cRB^m>!0^t>TEhYgTe~DWM4f DO(J%R literal 0 HcmV?d00001 diff --git a/Tiles/Abyss/Stalactite/SulphurousStalacmite1.cs b/Tiles/Abyss/Stalactite/SulphurousStalacmite1.cs new file mode 100644 index 0000000000..062ba57029 --- /dev/null +++ b/Tiles/Abyss/Stalactite/SulphurousStalacmite1.cs @@ -0,0 +1,45 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Abyss.Stalactite +{ + public class SulphurousStalacmite1 : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.WaterDeath = false; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Stalacmite"); + AddMapEntry(new Color(57, 48, 83), name); + dustType = (int)CalamityDusts.SulfurousSeaAcid; + + base.SetDefaults(); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 2; + } + } +} diff --git a/Tiles/Abyss/Stalactite/SulphurousStalacmite1.png b/Tiles/Abyss/Stalactite/SulphurousStalacmite1.png new file mode 100644 index 0000000000000000000000000000000000000000..a7340e66a7135204ce6981a04f5b6b781439b986 GIT binary patch literal 428 zcmV;d0aN~oP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0YOPbK~zXfy_C;O z0znvtXU$)`h^{SSR)PdwmgrIkZxML&Z|&eQf-W5jx^xPHf|6t%pL}Y zwPy5zhnE?~na^)_*I^0=?GCcx?;>+sEl%kcVywNszobaXiTpR(3KDQ~*xtjS==oS1 zeU>r4eYijxSCF~E`Pnv1PUfVTPFa5iS*(A9_qQ3;VXp$Zf3lFTz*Vu|gP(cK$!2iE z$Smwv@K@|_;8y~Nthy0=8Rg-AV+O^t6yplg9d+MhM}6sA8`N!;grQtG)x0&E0}ZP;;Si1rFVS0C(FzJ;FdD zpG1|x%@fkR2UV}mNFDSJkkjZJs#xg({(CpPx#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0VPR9K~zXf#gxHo z!Y~xZn_?~G;8q->lfu|#AWYbH*+FmK{Y(8HcH3#77mp&8ZVK}xh%&aU?=w$kBo|HQ z4?e!64Sg^9LIb4~bS$CvqdETv1n*x60cUR08$H@*l1=q!%fD=aTC~RG?+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stalactite/SulphurousStalacmite5.cs b/Tiles/Abyss/Stalactite/SulphurousStalacmite5.cs new file mode 100644 index 0000000000..a5b9195e2b --- /dev/null +++ b/Tiles/Abyss/Stalactite/SulphurousStalacmite5.cs @@ -0,0 +1,47 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Abyss.Stalactite +{ + public class SulphurousStalacmite5 : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 4; + TileObjectData.newTile.Origin = new Point16(0, 3); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.WaterDeath = false; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Stalacmite"); + AddMapEntry(new Color(57, 48, 83), name); + dustType = (int)CalamityDusts.SulfurousSeaAcid; + + base.SetDefaults(); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 2; + } + } +} diff --git a/Tiles/Abyss/Stalactite/SulphurousStalacmite5.png b/Tiles/Abyss/Stalactite/SulphurousStalacmite5.png new file mode 100644 index 0000000000000000000000000000000000000000..532fd83e592b3186da5666406df39e18a8ef6862 GIT binary patch literal 555 zcmV+`0@VG9P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0l-N_K~z{r?Uc(- z!ax{>ixDt@h-f6lK#0+eQNscfFOQ%*-@q5}$=tbf>t$g`(1j}(m{?Q{u~b4V6~@k) znI@E!Tc>Q~OHR%VG&86F{2gV665wuga(Ki?yhfJSVXGfWAKmyPu!2ze*1V2G=E4m%H)>Tp+&&POO~?6`%GY zzXtj3E?m>uUx_%|y!^!W@~;NXRu!^#B2!Vp!H@z zZg@@*2!xg}*i5g&v#B^d6^p{7p&-2a`3=|G>NG?VdDksCf0SnqU#B&1Li9H=C5WOJI t-mN43J4WYexOJp|3EXg=j>iOw@&_H1yM*jnZBzgN002ovPDHLkV1lOS=Slzo literal 0 HcmV?d00001 diff --git a/Tiles/Abyss/Stalactite/SulphurousStalacmite6.cs b/Tiles/Abyss/Stalactite/SulphurousStalacmite6.cs new file mode 100644 index 0000000000..44e7679268 --- /dev/null +++ b/Tiles/Abyss/Stalactite/SulphurousStalacmite6.cs @@ -0,0 +1,47 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Abyss.Stalactite +{ + public class SulphurousStalacmite6 : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 4; + TileObjectData.newTile.Origin = new Point16(0, 3); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.WaterDeath = false; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Stalacmite"); + AddMapEntry(new Color(57, 48, 83), name); + dustType = (int)CalamityDusts.SulfurousSeaAcid; + + base.SetDefaults(); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 2; + } + } +} diff --git a/Tiles/Abyss/Stalactite/SulphurousStalacmite6.png b/Tiles/Abyss/Stalactite/SulphurousStalacmite6.png new file mode 100644 index 0000000000000000000000000000000000000000..2155c8ef4ed348a1f3f2f7a2df90ea8103649c7e GIT binary patch literal 700 zcmV;t0z>_YP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0#QjsK~z{r-Iq^K z6G0fpr=p8pp%@nfg(4MFO&U!kaNy6u7`^GuiwDns1HXcw!XpQbaxjsTN28of)Ocwy zq|`Q*k{17vLTkvl@3S)-oU+;CzS{%8<(!&R7L7KVl zKtb>)(B!TzK&jLKbZ>D9GT}?G-`aspp1=4cNvhicV}iDuz|~g$1GHXPgTmlT&~jHN z9hb-n{NKXVL>7K~aSXoKgo#V(LHOq{yYScV-@!Hf30!c`pFEyJXZcwb?t*LC6LdYn zxj`GEbK}st*@FbPZeD;&TPaCW!#=&MK@jmxP^q?{Fit`Z64sC)9muoLapBuSsaBPw z5ocDAH08}U6h!0%3EDrAxi|&SO(s3h{QEv^sN=G{ZNc>y3ttV&+Z&R!*GxlKrUhi5 zZbRM&=obD79Q!*IggmH2^d2GgZVNhD?MG3P)Nl+5#{17eCPCxz z)gUuzK^i;V51GW5Kw~B`iJZVck!B}G;UkU>&tD#f_a(hGzSX>Mq{dJ0-%FuXheuD~ z4Cl~j{Ho#UdbBiyzQ(NltG5N!^1hi^YJipJ^LH>XpZE4^(o}EiH(!fz7oG(E1YzfZ z`6N0+NrPx#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0aZyvK~zXfy_CUA z!!Q`dlg@Q)6xvxgtkXFZFGDwidUXwDI z!;ZB6;Po}7!-MBf_{n__Zs4i`x1APlhCv@m z4)=F4R;VOTcIh=*oPNK@H`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Ew(e!J;F?XP}1Van(+cz%q6L6A?E@)Ju=_TOg zYGKF<@dPvM?vq9l46LdoeQF?{!0E6nq$Sq-Br9A_KSUkKyO0o15cGKz$m3Q?bnp4y z9|!RS{GDp8FKAMP6By^ZypV!#XQJ?C%L|W&=HU6F9e($C4(Ev1KzD=t+M_!M)BOoPD!n z$1}M?|36cDCl39_ogD1J8_jPd@Od40=Ir{0YzTR$z+pQ>9P`|a`~;ICxPYSk0;(6H Uf24Chga7~l07*qoM6N<$f|#QQ%m4rY literal 0 HcmV?d00001 diff --git a/Tiles/Abyss/Stalactite/SulphurousStalactite5.cs b/Tiles/Abyss/Stalactite/SulphurousStalactite5.cs new file mode 100644 index 0000000000..26b4eb84fb --- /dev/null +++ b/Tiles/Abyss/Stalactite/SulphurousStalactite5.cs @@ -0,0 +1,47 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Abyss.Stalactite +{ + public class SulphurousStalactite5 : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 4; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.AnchorTop = new AnchorData(AnchorType.SolidTile | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.WaterDeath = false; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Stalactite"); + AddMapEntry(new Color(57, 48, 83), name); + dustType = (int)CalamityDusts.SulfurousSeaAcid; + + base.SetDefaults(); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 2; + } + } +} diff --git a/Tiles/Abyss/Stalactite/SulphurousStalactite5.png b/Tiles/Abyss/Stalactite/SulphurousStalactite5.png new file mode 100644 index 0000000000000000000000000000000000000000..be82d5b48f77282d89a1aa77b90a328a5449dfdb GIT binary patch literal 583 zcmV-N0=WH&P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0o+MMK~z{r?UYYT z0znwYce7MfHe*Ax(j|G(VzF99GzvvT zaR)3av(Y$PDR?JR+Y3nebMwArat5Lae(U@(c6ukAcfffsPe7qyTqR;(_t61Ib?MM! zE(`VFftCNTLAyD?an8Z?j2r5NumjsXSX&7p)+@BS76>95Yz%zV=$m<$K1G!8zyuTN z@L(Cq$wjjdxR+PvICl!>30S0YTmd9`_j3EAku+ySz|XPeR=y?4UUh))V`PiN!i% zp-3+UHH-%(ouRdyp9f~822pBPx#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0#8XqK~z{r-IhU5 z6G0e;cdWLw!2nsLl$KHo45amQ-43~z4 zpwti{UDATvQe(<|@9ek1shbJzEC-+D?Yp~~%=hlMv(ptKJ<@k1%Zs}|75v5^oPa8xuSylqD++rF7(Iyz`w70E{(`o5PaqTa5^!avS{a5+#7;1< z5=~Wk1-c_yL2j=HO@9)K!rwoIm}aX3#qWVTUd4geK0q&?KfH%?Ch9Ge*y#a11sv3- z)&1w)9Q@YJad;}LYU~}TRq3_5@cOqV++G67A3d1Ae;v*=zV_hOdtjV^Ds%O}kz4}3 zvc3`-`w8@Yfr+}FTn}{kZJijc2vTr4fdr;~L8M%0XKxp}ydFf6+yteWG-M)nf^a`5 z-I#?}XR^vmE}Zd>ls67ls*TU@;P!gZINa%zI(`9~pL3wx)gB}(L&5M6dkM-D1ws1J z+;m8c>1o7I(C@VzQc858i(;<_|4MQb6y?7%$;AKM17>y2gUb1~AO)90F7Fn89{UjO z1H2ayu@i*%G&@~^KYlO;@AxpMTu@&sU$)dY(uYqU;f(zR66`uJUo7I}^_zXT1Y@ly z2q(y-$DoU1FTs$kPRhGAsJgHOnXs53BNIsJJbQXakb=_z>?P3Iu5Uo?_6bDKUta@6 z>;&PxE!}+ruN2kS>G6?=6*)OIiZQR=u8<92F9GwYwhZt69zue2s*5pen+YWtm_SyB g82wx)W&+1K1EVVF2!4X8kpKVy07*qoM6N<$f^!fy0ssI2 literal 0 HcmV?d00001 diff --git a/Tiles/Abyss/SteamGeyser.cs b/Tiles/Abyss/SteamGeyser.cs index 315b0de6e4..3275265a58 100644 --- a/Tiles/Abyss/SteamGeyser.cs +++ b/Tiles/Abyss/SteamGeyser.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Tiles.Abyss Main.tileFrameImportant[Type] = true; Main.tileNoAttach[Type] = true; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); - TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.DrawYOffset = 4; TileObjectData.addTile(Type); ModTranslation name = CreateMapEntryName(); name.SetDefault("Geyser"); diff --git a/Tiles/Abyss/SulphuricFossil1.cs b/Tiles/Abyss/SulphuricFossil1.cs new file mode 100644 index 0000000000..cef3f99cc3 --- /dev/null +++ b/Tiles/Abyss/SulphuricFossil1.cs @@ -0,0 +1,31 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Abyss +{ + public class SulphuricFossil1 : ModTile + { + public override void SetDefaults() + { + Main.tileLighted[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileLavaDeath[Type] = true; + Main.tileWaterDeath[Type] = false; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Fossil"); + AddMapEntry(new Color(113, 90, 71), name); + dustType = (int)CalamityDusts.SulfurousSeaAcid; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/Abyss/SulphuricFossil1.png b/Tiles/Abyss/SulphuricFossil1.png new file mode 100644 index 0000000000000000000000000000000000000000..719f621c0b65480666f6966a87fae90d02c2fb42 GIT binary patch literal 915 zcmV;E18n?>P)Px&O-V#SR9J=Wm`zU;Q51%sDQ$UK{i5x-ICH2oPK!no&7|*UnCU(D((~N++%tu) zy6UQ{uDbenG7fyg@PPhl{ro%`j~M{D;jw^Gmj6h>znwsdB>H;gJ`e$* zuvGxy`o;4A+?juEd4$6O?-KtJ`f1NQq1nZ?Hd#G{7*NTsIfq~~w$?(vH$F#zgK8J}*G z;YXjA0k|=f1|YNO{5&;2rR(duzx)4q%6Ei}fy6ifjbjUn8;r~SR=EPS2-ln9K{G5sQe$HPl!^@iEK9D9y2Lk) zG5`;r&3F7l{v%|B2Q2ut`lu#`g~0IOl;;GI(6#|k-ilU z0QaB1cRW`zs<0`!JuxO8#lA+r)BwmV#@yA=Q@$g#SLKSOf(4G=3xKN^&UT!jSSlL; z@o2kjJs@XXqHgwqb+NQ8@d&zf%g2htdj{@8T z;t@HYR`Q!2J?3z5@&lP7M0vSx%U-lkyFiFk#Vzga&Vc}nh+h89k!H}j>LC_ z4DF_qajEaQ;lTF<}QcMkjNIEUPxacBHPW(#PMs+SuEKrqtdc@B-(UA{_tL|xyv zgo66slPh`;&`hheb5Pal(sPCF_ahyz)loD2)~-_O1tq2)3IqkTo6PC)m}9+<%ih09 zsC-9g&qMm=sOOPNJ)jwT_;LYgk*e$lq{rIKJG`fIcM$o~F~@y6B^lrPW*Gqe3B$3z z5^i%oCn9xIWp_6j_ta2)nszV05B^R p3tH7r<@SyeQ&LOWWdnRj=m$QXEdH^9BJ}_O002ovPDHLkV1jZKzGnac literal 0 HcmV?d00001 diff --git a/Tiles/Abyss/SulphuricFossil2.cs b/Tiles/Abyss/SulphuricFossil2.cs new file mode 100644 index 0000000000..1dfc116c73 --- /dev/null +++ b/Tiles/Abyss/SulphuricFossil2.cs @@ -0,0 +1,31 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Abyss +{ + public class SulphuricFossil2 : ModTile + { + public override void SetDefaults() + { + Main.tileLighted[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileLavaDeath[Type] = true; + Main.tileWaterDeath[Type] = false; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Fossil"); + AddMapEntry(new Color(113, 90, 71), name); + dustType = (int)CalamityDusts.SulfurousSeaAcid; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/Abyss/SulphuricFossil2.png b/Tiles/Abyss/SulphuricFossil2.png new file mode 100644 index 0000000000000000000000000000000000000000..9d08d9f024c9da793972f94388cdf34ca5b924d1 GIT binary patch literal 1072 zcmV-01kd}4P)Px&>PbXFR9J=Wm`iUPRTRg6FLq+Dc`CC_)H60gJ9G zbxA)4EZB6xCn!QlAQnZ6sw!<3AgT&QY7;_AQ#p^u&cpIJiS1!==GffZ85@)!)G7as z<(YfWy}G|S=lo|JcBr>s{TP6eLrnnY7ZN_ePm+)N&VA&f0;P#!bce-?_68}on z|4_ZV6-dc^^4?Z(WiJ5tCpQ4NTORO(8_sU68K(aU{aq=Ub06&k;OmIt;+n!$i&CNZIK*tbQgMzfl6ZlZqXoC#sxHrkm0|JpfdTo5uAoZ{7t+$WJ|q3fCaiHT zo_-C0s}ny0FjhDZKws8e_u`cg0J!woEdX9ba%QD^2mm)(3Egk(2sutl-cOF_#d8g0 zrOGv$&EQuEEUvBrkRKc{0_;gAjsMABfv(_ENjWpOM;`gohV+@OdLIA_m2ChnoRKnj z>a9Hhlvf)@-21{ZGFF@LXR;bI7QIe=L_A zfJ!aAI%@8ygQymT%+-lsfOZaLl3NbI(o)$-O7(^ZhUDzOXuI}jyvqH>832$;nYp6m zULKXI(~V4&#tK2TYU){YDW#LbYw_7)K8db{wc= zGyI1wFn&?dINyPm7jt3Gp;ADxucz3wYo72 zvPx&VM#~*V|R~_85NS=Z5h= zxc=uI&wV~S1i)&?ogfG0eAfVMS!oBLkmwnJ9XkcU;}`z{aAEOW=t9=3AEsLPB*c!y z%TI(kz0e5eQgs0Kd#4-#s~rbmd1)`uLA@a{xf*W(u-Ymqljd8$`Ah}?tJCo_ePEaT z2%^i7VtsSN0l0l5<9XiR>Ur+7Wyz6jrX!yvxu+F8kutNicou+4wKnsj!w`Lj4#R4z z1i;43!EQ190!*nwv|P0l2h$9Dti;DN401 zu^)7Xp7CE=Qtc|6YXF>Im_PbehakEPjXSlsqic10qo3@0zTY1RLw{eCasNJg?f~So z^9H~ki~vZ?O&7aal|^(J@?+sx)&M+s`@w-R0}tMMBXgyE8i3l+24H#V764BwE3VQI zyMM0zG3y$qQWlY8XyUKcJ$#{f0)YL#^qtgP0)WpQQ3$z|D1<~ps$jb(In~@1YT~g0 z04K7d33KTr06kk6ty_|lniGEQ*B{9ESj@Qo`yP8gBFE67N@2bEB`}9nlWo+S2B2ZP%Ao@cnPdTgp_2w6Zn^-}dUl|LxVyLCe-fF! zQ2J}8h3LF7BQYL1qnZ3fpCQG@_Lc+Vz5*Wu?e@B&AXKwy&M5p^?*7wP0Gurr3_vpB zjp@6O4F_iLThV1m_i#Qd5w+Uhqi3Ui27o2^n4^(iJSpSm;^DFJpHOSf9nXC_Axr7n z1J84vr|2pd?O&4+U4|4^yXDKBaO`#@hvtt-XV;w3sy7JjrgQ_nmcRmJBYo&e>rq~F)#1^8lV3U^b^h002ov JPDHLkV1iXyuy_Cf literal 0 HcmV?d00001 diff --git a/Tiles/Abyss/SulphurousColumn.cs b/Tiles/Abyss/SulphurousColumn.cs new file mode 100644 index 0000000000..6e8482262b --- /dev/null +++ b/Tiles/Abyss/SulphurousColumn.cs @@ -0,0 +1,57 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Abyss +{ + public class SulphurousColumn : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileSolid[Type] = false; + Main.tileSolidTop[Type] = true; + TileObjectData.newTile.Width = 2; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(1, 2); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.WaterDeath = false; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + AddMapEntry(new Color(150, 100, 50), name); + name.SetDefault("Column"); + dustType = (int)CalamityDusts.SulfurousSeaAcid; + + base.SetDefaults(); + } + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + for (int k = 0; k < WorldGen.genRand.Next(3, 4 + 1); k++) + { + Gore.NewGore(new Vector2(i, j) * 16f, + Vector2.One.RotatedByRandom(MathHelper.TwoPi) * WorldGen.genRand.NextFloat(1.4f, 3.2f), + mod.GetGoreSlot($"Gores/SulphSeaGen/SulphurousRockGore{WorldGen.genRand.Next(3) + 1}")); + } + } + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 2; + } + } +} diff --git a/Tiles/Abyss/SulphurousColumn.png b/Tiles/Abyss/SulphurousColumn.png new file mode 100644 index 0000000000000000000000000000000000000000..7ae5f91a238d056a6730e24c609751f1342699d9 GIT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0K(5$FKPU zX0}vTQSdyRn(bK8iZUay%Y2^x`XTrJN>L?2;VvX?pAef2z+=M*?pu@57Dqw7<9vf$ zm0qoKD}7W^6zwyVy&N*vr}-E&J&CohsE_B}ug$0$5z}>*qDq29QO#gG(8my(4#!_a88xjO+U`K9oPycS{y^J#FFc~sfupYSx$01<@e1N9>N8nw6KxgE z@ktcz%w5*9`}*`ZF|$!Asw8kKN@EV=&dgrgi&iW@6-D1Kil~tljUeCUNQH0s^t-gK zC|A#f+&?i6yA<8J-r04nIF+JGf~036Y?2bj(|jc`b68oIQ#;qkIX#!Mv>pYQJ(@4z z=d?CRNn0Z4r`f@o7gtx5tbhYO+aB|~*)CRAu%2IUt9mB>XGnaM_Lc(2^;*u){OO^q z9sv`*ycXB-`A(QrdUF}--l|DD^8`T zl3?WuFEeI3vl-*sAIL1RWX{{((_Dk4k4&=E=KR9A1ojO2yRzBf=P6tvHpUN&?^2Ab zqCZ!MEQ8;!=f4)f7=E;U87oWv9YOx=p22z!E4)%vN#LjV2gTs3U`pR1A$=9Y746Ar zODZikX>84x$#-OnzSY5S_4To`_`0oi-?FDDq{1sjl?49+!-rGe){J+q00000NkvXX Hu0mjfqYz2A literal 0 HcmV?d00001 diff --git a/Tiles/Abyss/SulphurousRib1.cs b/Tiles/Abyss/SulphurousRib1.cs new file mode 100644 index 0000000000..9e254f7762 --- /dev/null +++ b/Tiles/Abyss/SulphurousRib1.cs @@ -0,0 +1,47 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Abyss +{ + public class SulphurousRib1 : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 4; + TileObjectData.newTile.Origin = new Point16(0, 3); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.WaterDeath = false; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Ribs"); + AddMapEntry(new Color(57, 48, 83), name); + dustType = (int)CalamityDusts.SulfurousSeaAcid; + + base.SetDefaults(); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 2; + } + } +} diff --git a/Tiles/Abyss/SulphurousRib1.png b/Tiles/Abyss/SulphurousRib1.png new file mode 100644 index 0000000000000000000000000000000000000000..04d827a0a1eddf27502ef5d2c33bede29aef6fa9 GIT binary patch literal 451 zcmV;!0X+VRP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ940a!^yK~z{r?UXS~ z13?glcP&zgAacbO5=cU-tAsSM*I(f8w6xMbDN=}pt3(fuKvErojasbCa4+EImfdrA zJ&ArW3>(PIo0-Q+rIhgDpw8b$*4fJW+0_@Rv-@lQZ+r#lJk4JDJ|f zKJZr1J=@#r_g}qzaL&sW=b!fhb*7-srtU;|1vES6cOl*mT=6a-aev+aw)=xU*uj5+ z-+%NLvrzy5002ovPDHLkV1jkk$1eZ? literal 0 HcmV?d00001 diff --git a/Tiles/Abyss/SulphurousRib2.cs b/Tiles/Abyss/SulphurousRib2.cs new file mode 100644 index 0000000000..453c193cda --- /dev/null +++ b/Tiles/Abyss/SulphurousRib2.cs @@ -0,0 +1,46 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Abyss +{ + public class SulphurousRib2 : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(0, 2); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.WaterDeath = false; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Ribs"); + AddMapEntry(new Color(57, 48, 83), name); + dustType = (int)CalamityDusts.SulfurousSeaAcid; + + base.SetDefaults(); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 2; + } + } +} diff --git a/Tiles/Abyss/SulphurousRib2.png b/Tiles/Abyss/SulphurousRib2.png new file mode 100644 index 0000000000000000000000000000000000000000..039a4282507e2287d210a78a0c1fc0bbfb0f4906 GIT binary patch literal 437 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoS!3HFo&+TvoQjEnx?oJHr&dIz4a#+$GeSv}- z`?>!lvI6;>1s;*b3=Dh+K$tP>S|=w^gO{g^V~B@$a*BdbgcQsFcB6w2eza~)*z1!Z z$J(%fJHaeEqn7crf6QaX%OS;#e#}!+ME^B!nD-!>P2d=7hB%wTZO1LEyO?Iwzuapu zqwS|G+X{I$gZ<4pZ8!V)1MGP&{N4Ba9J4{~`;W|P9=h%|X!sfH9X5-xrIYnaKWk=L zn1PyDz?-H<_76K;`~NSuuWx>t-9Nu6bJkL3H#f7o4QKDEStT$=@SL%#lJoih|Eu8Y zvjz@-OBg;`pZR};;nnVj5Qkc3hmU;S)kzFT^%|BlyB0cbVBon^|5MKAvc7Bww{)}N z%7$MX9kdqQXaL$$lCbb8lUT*iZ#pyD7@b}wN*rNoV_dS#qbrtyKk~~Bi^5#~8EsF4 zVm3Pdc3`>5vsqSp!CY>KI(NOL2{i!`2M=+xWIShzsB$Rhv|4b3Rl<_T*7g9yx)`s8 c+!7KDA7mdKI;Vst00z0H?f?J) literal 0 HcmV?d00001 diff --git a/Tiles/Abyss/SulphurousRib3.cs b/Tiles/Abyss/SulphurousRib3.cs new file mode 100644 index 0000000000..2f1e4d3514 --- /dev/null +++ b/Tiles/Abyss/SulphurousRib3.cs @@ -0,0 +1,45 @@ +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Abyss +{ + public class SulphurousRib3 : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.Table | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.WaterDeath = false; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Ribs"); + AddMapEntry(new Color(57, 48, 83), name); + dustType = (int)CalamityDusts.SulfurousSeaAcid; + + base.SetDefaults(); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 2; + } + } +} diff --git a/Tiles/Abyss/SulphurousRib3.png b/Tiles/Abyss/SulphurousRib3.png new file mode 100644 index 0000000000000000000000000000000000000000..08d87b3f8cf90e0940bafaa2e0cc205e9f5ee7f0 GIT binary patch literal 358 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<9!3HG593zhdDaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheoCO|{#S9F5`$3q|f;CtLDEQmc#WBRgJ2|C+$-DW%{{S@!nf)8Y^xF9i z95XjDwsGrh+1Kz>eci`~OeejCH&`urF9_FgAM@J8_1{rKtA}xgIGX{(=Ch%$jAz;# z@0QCoysYk*U+`jKtb_pf3VAkz11FC0^L3kKI~&wLIPBmZCe`Dp*SwRDCF6b5a{Kyb zLp_I$+-!0JKJ53@tP<>aa%_uPeg6OdD!69)BLjsOOs<8F2J%zb93I?yygcF8zti6n zX4UCAux}}5Jd?()D{k=r>Fv!4QfbO(TtkW(9hn`>4(1$Y1G?!&U3;VO^=}QCUv4a@ z(^;^aA!lvI6;>1s;*b3=DkxL735kHCP2G_}$aRF~q|=d5a0hzw-?&een^eIZ}mKXDl$e z$?%Sed#!##qww{L111~w7T#eEnAJG3SN_c;lWb>$`fC?IC;a-qzP}>Y$y)pXgW~jn z^Q;C8#hu$b`DXAlN1u;jy!=9M;SJWsYzdvL5(;K!8f6C$G&k}$E6(6cU=R~KtiaPY zf$_SWJ!^7_L$&yWO_FRc#M!>b?_&q@H*&Md37qNedeoF)cjo_#npek}PNWHJyHLcq zZFbCpMLQV(USia9sAeu$>L4M(mdN1WxnWAX+;{bLZy7Id5aD1B@$R&UW!NmqcHuL_ t)vR>4n7a1H>G|iKA_W{$#SIJ?7?d96#wC8>M-+7#M$5GNxNKTuNcCkXZ0rmMw0dEqCfdCaqRRW@ZMq Xe&sg9{T^CChcI}$`njxgN@xNAg{Mfw literal 0 HcmV?d00001 diff --git a/Tiles/Abyss/SulphurousSand.cs b/Tiles/Abyss/SulphurousSand.cs index b95c2cafa2..5e3b428401 100644 --- a/Tiles/Abyss/SulphurousSand.cs +++ b/Tiles/Abyss/SulphurousSand.cs @@ -114,6 +114,14 @@ namespace CalamityMod.Tiles.Abyss } } + public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem) + { + if (CalamityUtils.ParanoidTileRetrieval(i, j + 1).active() && + CalamityUtils.ParanoidTileRetrieval(i, j + 1).type == (ushort)ModContent.TileType()) + { + WorldGen.KillTile(i, j + 1); + } + } public override void RandomUpdate(int i, int j) { int tileLocationY = j - 1; @@ -184,6 +192,61 @@ namespace CalamityMod.Tiles.Abyss } } } + + int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); + int nearbyVineCount = 0; + for (int x = i - 15; x <= i + 15; x++) + { + for (int y = j - 15; y <= j + 15; y++) + { + if (WorldGen.InWorld(x, y)) + { + if (CalamityUtils.ParanoidTileRetrieval(x, y).active() && + CalamityUtils.ParanoidTileRetrieval(x, y).type == (ushort)ModContent.TileType()) + { + nearbyVineCount++; + } + } + } + } + if (Main.tile[i, j + 1] != null && nearbyVineCount < 5) + { + if (!Main.tile[i, j + 1].active() && Main.tile[i, j + 1].type != (ushort)ModContent.TileType()) + { + if (Main.tile[i, j + 1].liquid == 255 && + !Main.tile[i, j + 1].lava()) + { + bool flag13 = false; + for (int num52 = num8; num52 > num8 - 10; num52--) + { + if (Main.tile[i, num52].bottomSlope()) + { + flag13 = false; + break; + } + if (Main.tile[i, num52].active() && !Main.tile[i, num52].bottomSlope()) + { + flag13 = true; + break; + } + } + if (flag13) + { + int num53 = i; + int num54 = j + 1; + Main.tile[num53, num54].type = (ushort)ModContent.TileType(); + Main.tile[num53, num54].active(true); + WorldGen.SquareTileFrame(num53, num54, true); + if (Main.netMode == 2) + { + NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None); + } + } + Main.tile[i, j].slope(0); + Main.tile[i, j].halfBrick(false); + } + } + } } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) diff --git a/Tiles/Abyss/SulphurousSandstone.cs b/Tiles/Abyss/SulphurousSandstone.cs index 9c5856c996..b56db9b99b 100644 --- a/Tiles/Abyss/SulphurousSandstone.cs +++ b/Tiles/Abyss/SulphurousSandstone.cs @@ -1,6 +1,6 @@ - using Microsoft.Xna.Framework; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Tiles.Abyss @@ -27,11 +27,75 @@ namespace CalamityMod.Tiles.Abyss { num = fail ? 1 : 3; } - + public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem) + { + if (CalamityUtils.ParanoidTileRetrieval(i, j + 1).active() && + CalamityUtils.ParanoidTileRetrieval(i, j + 1).type == (ushort)ModContent.TileType()) + { + WorldGen.KillTile(i, j + 1); + } + } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } + public override void RandomUpdate(int i, int j) + { + int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); + int nearbyVineCount = 0; + for (int x = i - 15; x <= i + 15; x++) + { + for (int y = j - 15; y <= j + 15; y++) + { + if (WorldGen.InWorld(x, y)) + { + if (CalamityUtils.ParanoidTileRetrieval(x, y).active() && + CalamityUtils.ParanoidTileRetrieval(x, y).type == (ushort)ModContent.TileType()) + { + nearbyVineCount++; + } + } + } + } + if (Main.tile[i, j + 1] != null && nearbyVineCount < 5) + { + if (!Main.tile[i, j + 1].active() && Main.tile[i, j + 1].type != (ushort)ModContent.TileType()) + { + if (Main.tile[i, j + 1].liquid == 255 && + !Main.tile[i, j + 1].lava()) + { + bool flag13 = false; + for (int num52 = num8; num52 > num8 - 10; num52--) + { + if (Main.tile[i, num52].bottomSlope()) + { + flag13 = false; + break; + } + if (Main.tile[i, num52].active() && !Main.tile[i, num52].bottomSlope()) + { + flag13 = true; + break; + } + } + if (flag13) + { + int num53 = i; + int num54 = j + 1; + Main.tile[num53, num54].type = (ushort)ModContent.TileType(); + Main.tile[num53, num54].active(true); + WorldGen.SquareTileFrame(num53, num54, true); + if (Main.netMode == 2) + { + NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None); + } + } + Main.tile[i, j].slope(0); + Main.tile[i, j].halfBrick(false); + } + } + } + } } } diff --git a/Tiles/Abyss/SulphurousVines.cs b/Tiles/Abyss/SulphurousVines.cs new file mode 100644 index 0000000000..45143f8b54 --- /dev/null +++ b/Tiles/Abyss/SulphurousVines.cs @@ -0,0 +1,96 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.Abyss +{ + public class SulphurousVines : ModTile + { + public override void SetDefaults() + { + Main.tileCut[Type] = true; + Main.tileBlockLight[Type] = true; + Main.tileLavaDeath[Type] = true; + Main.tileNoFail[Type] = true; + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Sulphurous Vines"); + AddMapEntry(new Color(0, 50, 0), name); + soundType = 6; + dustType = 2; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem) + { + //GIVE VINE ROPE IF SPECIAL VINE BOOK + if (WorldGen.genRand.Next(2) == 0 && Main.player[(int)Player.FindClosest(new Vector2((float)(i * 16), (float)(j * 16)), 16, 16)].cordage) + { + Item.NewItem(new Vector2(i * 16 + 8f, j * 16 + 8f), ItemID.VineRope); + } + if (Main.tile[i, j + 1] != null) + { + if (Main.tile[i, j + 1].active()) + { + if (Main.tile[i, j + 1].type == ModContent.TileType()) + { + WorldGen.KillTile(i, j + 1, false, false, false); + if (!Main.tile[i, j + 1].active() && Main.netMode != NetmodeID.SinglePlayer) + { + NetMessage.SendData(17, -1, -1, null, 0, (float)i, (float)j + 1, 0f, 0, 0, 0); + } + } + } + } + } + + public override void RandomUpdate(int i, int j) + { + if (Main.tile[i, j + 1] != null) + { + if (!Main.tile[i, j + 1].active() && Main.tile[i, j + 1].type != (ushort)ModContent.TileType()) + { + if (Main.tile[i, j + 1].liquid >= 128 && !Main.tile[i, j + 1].lava()) + { + bool flag13 = false; + for (int num52 = j; num52 > j - 10; j--) + { + if (Main.tile[i, num52].bottomSlope()) + { + flag13 = false; + break; + } + if (Main.tile[i, num52].active() && !Main.tile[i, num52].bottomSlope()) + { + flag13 = true; + break; + } + } + if (flag13) + { + int num53 = i; + int num54 = j + 1; + Main.tile[num53, num54].type = (ushort)ModContent.TileType(); + Main.tile[num53, num54].frameX = (short)(WorldGen.genRand.Next(8) * 18); + Main.tile[num53, num54].frameY = (short)(4 * 18); + Main.tile[num53, num54 - 1].frameX = (short)(WorldGen.genRand.Next(12) * 18); + Main.tile[num53, num54 - 1].frameY = (short)(WorldGen.genRand.Next(4) * 18); + Main.tile[num53, num54].active(true); + WorldGen.SquareTileFrame(num53, num54, true); + WorldGen.SquareTileFrame(num53, num54 - 1, true); + if (Main.netMode == NetmodeID.Server) + { + NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None); + NetMessage.SendTileSquare(-1, num53, num54 - 1, 3, TileChangeType.None); + } + } + } + } + } + } + } +} diff --git a/Tiles/Abyss/SulphurousVines.png b/Tiles/Abyss/SulphurousVines.png new file mode 100644 index 0000000000000000000000000000000000000000..e9881e2b1979bca269951c0c370876fc266dc49e GIT binary patch literal 2641 zcmeHI`&-fn7ymkQqBNBjuVQK!G7a0bO-sDwWk{O6<|RN(K+QxeeJ4Vi#WwRsX3RG6 z3KpA|^5vqEE=}`!@dEND&LzrBo0n+<&1G85+kDyIv3;KBbIxu(HS&QF$D^Ik30A=*nsoef+08hc`U zP0_*a$qWkRmtS&mlNkX4KRn-h0ZUXa86=X8DOPLTu#c*zhg$F?RTda#w?3*1dQOr& z4G!^Aknwq=@p1yjuA?xaTAMqTcNb1AXh6qnzv4SyIAcxo3a{b>U1_xs#YBxk+;AXs zGiqF+RS5U+CKv_WVcni3>RWD~-F`)0bNw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?2RJ9CtSpUNf% z-Kceph83}95S34C6x+pnid>&U&Zt*>>ZI{axsWO<^pPBa2@#lc~atR}d z@*{Qal|7ZD??S$7RX*BDC}rtY=p_IDQI_p#q7}AgSTGy4ZR@DVCG|;k$OdC?*?k#! f11nwl=jJBV^H7J-oRup3>(PgWL}0|h2{--^$s!;4 literal 0 HcmV?d00001 diff --git a/Tiles/Furniture/EffigyOfDecayPlaceable.cs b/Tiles/Furniture/EffigyOfDecayPlaceable.cs new file mode 100644 index 0000000000..a4a98487c7 --- /dev/null +++ b/Tiles/Furniture/EffigyOfDecayPlaceable.cs @@ -0,0 +1,39 @@ +using CalamityMod.Buffs.Placeables; +using CalamityMod.Items.Placeables.Furniture; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Furniture +{ + public class EffigyOfDecayPlaceable : ModTile + { + public override void SetDefaults() + { + Main.tileLighted[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileLavaDeath[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x4); + TileObjectData.newTile.Width = 2; + TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Effigy of Decay"); + AddMapEntry(new Color(113, 90, 71), name); + } + + public override void NearbyEffects(int i, int j, bool closer) + { + Player player = Main.LocalPlayer; + if (player is null) + return; + if (!player.dead && player.active) + player.AddBuff(ModContent.BuffType(), 20); + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 48, 32, ModContent.ItemType()); + } + } +} diff --git a/Tiles/Furniture/EffigyOfDecayPlaceable.png b/Tiles/Furniture/EffigyOfDecayPlaceable.png new file mode 100644 index 0000000000000000000000000000000000000000..61db8a5d837902dd1f6770bbe30509b3814ad94a GIT binary patch literal 1353 zcmV-P1-AN$P)00001b5ch_0Itp) z=>Px)14%?dRA_0hpYa1coHepItCc zTq|up(HpUch`w0AU-kgrefdS>1SOG6ryYQLtMx=~#2zBESr>rHe#0105}9PeAn~Z# zqA?gHuUi9bB2w9JgvN%d+35n0#WxIJa+7ffpn(vxhsd}SQt>!2bY9gsLK+*n%nSha zW)*;Eit>JAtEz+?u#w1a^ArGcnFqkoS=UON#f0W`>iM?- z*xLOm^n3OZQK^3@k&rnjI4e8;(Rk)T660hI5od0G1pqgh0w9}~EXijCRz4+vIPS>t z=@A^=wwzX9Nlb4vge+;r&qO7PmcIX5W@ z`|1(Bqe@*q2$Iof`|$^#0B~jTQ{w{tm{fS1ogOgEn#-3~0chUu0MW6bvWAFr>;pfG zvT1R`{Z`i?^ZuJ38s}gC`6~xtJ{t@55seYe9{o*y5-R(N;QNY_Q0cSQ&+}8W4nXao zVyqCAOwd0#u|!gFv6y!6a3q;R-gN-nR3g+_qq4l;D=(du>OLNm{z<|=mK#j~?$r(eNF@Yrzb~P3T_Ot&fpW z-GET1R3FiPO1XYujB9M@_|==YJb-Ce7D&|-LnLI50ivB!<$1Ew)7S`hp7i^Tc6a1; z>?5Lznr(wp0`qxyRw5__xkey+*q3e zpxvo5O7;+m$`)0yV-(cV8R?b1uq4j9xFps8-8*KMq>`g!&K@HABA6}ekilNsm)HLU zhA}Wbl?33aQ{nxShm|!%2K|v~H)RZD)ACPsk54PKVmj6W4C`{3Nz2@(dxO>xaq`o0M^Q1NWTJ?qQ?8!{Sr6dSJ7#Qr_k9I` zm1W5q?L_N}u{f2nZ@=b|b|W?VRev{RO}p21jkR(V$)J>sHAMaa65kU+QW}J=00000 LNkvXXu0mjf>K27L literal 0 HcmV?d00001 diff --git a/Walls/HardenedSulphurousSandstoneWall.cs b/Walls/HardenedSulphurousSandstoneWall.cs new file mode 100644 index 0000000000..fef8c39c6d --- /dev/null +++ b/Walls/HardenedSulphurousSandstoneWall.cs @@ -0,0 +1,22 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Walls +{ + public class HardenedSulphurousSandstoneWall : ModWall + { + public override void SetDefaults() + { + Main.wallHouse[Type] = true; + dustType = 32; + drop = ModContent.ItemType(); + AddMapEntry(new Color(62, 50, 39)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Walls/HardenedSulphurousSandstoneWall.png b/Walls/HardenedSulphurousSandstoneWall.png new file mode 100644 index 0000000000000000000000000000000000000000..e87f30c45d396c70c8749f18719aca1bb201883b GIT binary patch literal 10455 zcmY*fcU)3^+qbl|acgGfodXLi+g57MBc+%vrE+DiN=qK8NH~nj)!bUMMvA@opg5}u_#rUx zlky2QOep}o#`)N=k4i9iC+k6K|BxWRrC>rxBfLu9VkEWuMG$@MFK2_eBt#phIS7 z9w?M@*A5PUsyf>h8YJr1ow99^kB&-nu(lw%F<7VSrfRxlEgc&3gE7M@daQ^qvxN*f z*#uJ8g0%}*7CX<|BrBWjuoJgYxR%Y%P*--^lSlbE7XpR;T$%G@j*hJAoZqv)u37FZ zOotwcC-OJnaVVV$G?j;*_Rb9)=oc%=0|ZNIK2s*pK-HZ^rr9OfPSJTdoUd;Ky@zGM zT=dgF#tHmxHKEHi104KnL-^fR2p2I`OK?GZ#PS=6WXERzg%PB z76h4gFH!403;&VPAhbS5b!u21uy5GzjoBv>ge0Jp@R#=k*x=bSaJY0$x}9tSE*ry| z@^vz+tdtpsIq4}TAUyU&EjQ^TR=5o>|G4L`thk{X8Qz%<`1U#Pu;ouMhsPtbJ;QpU zE}0Tsx&8FeV@su02nXgT0Vi}}lqcFQn^3J}y;L{-SbLI0YDH2)|IXYB&Uj7KNcHz* zBx8?mOJ=&DKh^=~S6ObMaFR21>xM!1;+M1xcn;>v3EL}?(aFCTmUA->ZTRFra_+Z} z@+I!=`-yJH12Ym;0`wF83g^o0DLe4!7rD}Pl(I#ox;-1ROtD9UEQ1=HVE*Y$)a1Ls zbmDI=mGK%v^@O3lHQtpra9S+k@SIJvB2rghEsA*6co1m|ymP}@ac!$4(E-JlR9TO5 z;2{wVDqy-j8vHQfn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4>cFK_>13-42PU>c7fMTAhy+Q09X# z%|NdE+;NV4VXr4f+?=t}FGokng4E2Css4IOZ|nYY<5c>gS(d^<(B1^VINs5TlZvyIa}Id0*my!M}#IREk$T;x@2 zTuGhGgmMheTMS>VF8KAyj{dBn_Ly+9j0)En-D$-e<6o70Tjm_Ex^U~(K2JJld$&Mw z%*!lJ<|=i!&*GCc`2&~|Wp5MwoSkNF^ zUSo~1Bx8bt8@ zHo@n%LvLuQny)ReG@Di{x?b!#m0hS@QI039aGed91{-B{qe;2dqW`_6M`%W~MOtyR zve@UWjA*zXF5)N`pK(_o1dRNHDo6Aw6<5hqk=1)IRff7)r}xx`6WsE_M@;xzH6bsUG|DWB!RST}9=x39_Se z-ckY?2zYz$Cev@Yy2rqWmN2w z+>J4Uf}!%adXA|hB90T<$F=+--nm?p%@t;=E_CuP8TaER!3ZSWI_*|gAUO0~2zJm? z1eO1Rk5eJ#41c2LW&b7{*j(g%MmkfkK+ZN6G(X5>(EM=GG?XFd;pM2ohJK<~$_BH6 zxs@AZhg-J`BRzIwMU-4ij5`cJYFG90lV6!s7A46n<*NSrHI4SN!a$&11tTB3 zVwZIXwDFU)JKxJ2muP*rw6p3b*klmUtNR+4F!Sh9%t|ZaHW4YF4nDqjVSFZ&f@Hq! zW9HLOi^SThm!^vXi#%Xt>{gctqdnq&*cTPE1isSJ@ DetermineYStart(); + public static int YStart = 0; + public static readonly List SulphSeaTiles = new List() + { + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType() + }; public static void PlaceSulphurSea() { CalamityWorld.abyssSide = Main.dungeonX < Main.maxTilesX / 2; - - PlaceCavernBlock(BlockDepth); - PlaceScenery(180); - PlaceWaterCaverns(); - - // A copy of old sulf sea code that replaced all sand with sulph sea/abyss gravel. - // Made by Fabsol. - ReplaceRemainingSand(); - PlaceMiscTiles(90); - SmoothenSea(); - KillRemainingGrass(); + DetermineYStart(); + CreateStartingBlock(); + ChiselOutSea(); + CreateWater(); + GenerateHardenedSandstone(); + PlaceVentsAndFossils(); + SmoothenTheEntireSea(); } - public static int DetermineYStart() + + public static void FinishGeneratingSulphurSea() + { + PlaceStalactites(); + PlaceColumns(); + PlaceRustyChests(); + PlaceTrees(); + } + + #region Perlin Noise + public static float NoiseFunction(int seed) + { + seed = (seed << 13) ^ seed; + return 1.0f - ((seed * (seed * seed * 15731) + 1376312589) & 0x7fffffff) / 1073741824.0f; + } + public static float PerlinNoise2D(float x, float y, int octave, int seed) + { + float frequency = (float)Math.Pow(2, octave); + float xFrequency = x * frequency; + float yFrequency = y * frequency; + int flooredXFrequency = (int)xFrequency; + int flooredYFrequency = (int)yFrequency; + float fractionXFrequency = xFrequency - flooredXFrequency; + float fractionYFrequency = yFrequency - flooredYFrequency; + + float noise1 = NoiseFunction(flooredXFrequency + flooredYFrequency * 54 + seed); + float noise2 = NoiseFunction(flooredXFrequency + 1 + flooredYFrequency * 54 + seed); + float noise3 = NoiseFunction(flooredXFrequency + (1 + flooredYFrequency) * 54 + seed); + float noise4 = NoiseFunction(flooredXFrequency + 1 + (1 + flooredYFrequency) * 54 + seed); + + float lerpStart = MathHelper.Lerp(noise1, noise2, fractionXFrequency); + float lerpEnd = MathHelper.Lerp(noise3, noise4, fractionXFrequency); + return MathHelper.Lerp(lerpStart, lerpEnd, fractionYFrequency); + } + #endregion + + #region Generating Initial Block + public static void CreateStartingBlock() + { + float randomValue1 = WorldGen.genRand.NextFloat(-0.4f, 0.4f); + while (Math.Abs(randomValue1) < 0.22f) + { + randomValue1 = WorldGen.genRand.NextFloat(-0.4f, 0.4f); + } + float randomValue2 = WorldGen.genRand.NextFloat(-0.2f, 0.2f); + while (Math.Abs(randomValue2) < 0.07f) + { + randomValue2 = WorldGen.genRand.NextFloat(-0.2f, 0.2f); + } + for (int x = 1; x < BiomeWidth; x++) + { + float xRatio = x / (float)BiomeWidth; + for (int y = YStart; y <= YStart + BlockDepth; y++) + { + int trueX = CalamityWorld.abyssSide ? x : Main.maxTilesX - x; + float yRatio = (y - YStart) / (float)BlockDepth; + float xAngleWrap = x / (float)BiomeWidth * MathHelper.TwoPi - MathHelper.Pi; + bool generateSand = yRatio < SandstoneYMinimum(xAngleWrap, randomValue1, randomValue2); + if (WorldGen.InWorld(trueX, y)) + { + if (y - YStart < BlockDepth - (int)(BlockDepth * 0.35f) + (int)(Math.Sin(xRatio * MathHelper.Pi) * (int)(BlockDepth * 0.35f))) + { + Main.tile[trueX, y] = new Tile() + { + type = generateSand ? (ushort)ModContent.TileType() : (ushort)ModContent.TileType(), + wall = generateSand ? (ushort)ModContent.WallType() : (ushort)ModContent.WallType() + }; + Main.tile[trueX, y].active(true); + } + } + } + } + } + public static float SandstoneYMinimum(float xAsAngle, float randomValue1, float randomValue2) + { + float sineSquaredRandom1 = randomValue1 * (float)Math.Cos(xAsAngle * randomValue1) * (float)Math.Cos(xAsAngle * randomValue1); + float sineSquaredRandom2 = randomValue1 * (float)Math.Sin(xAsAngle * randomValue1) * (float)Math.Sin(xAsAngle * randomValue1); + float sineSquaredRandom3 = randomValue2 * (float)Math.Sin(xAsAngle * randomValue2); + float sineSquaredRandom4 = (float)Math.Sin(randomValue1 / randomValue2 * xAsAngle) * (float)Math.Cos(randomValue1 * MathHelper.Pi); + return 0.25f * Math.Abs(sineSquaredRandom1 + 0.5f * sineSquaredRandom2 + sineSquaredRandom3 - sineSquaredRandom4) + 0.25f; + } + #endregion + + #region Generating Beach Waters + public static void ChiselOutSea() + { + int seaStartX = CalamityWorld.abyssSide ? 0 : Main.maxTilesX; + int seaEndX = CalamityWorld.abyssSide ? BiomeWidth : Main.maxTilesX - BiomeWidth; + int xCounter = 80; + float depth = 1f; + int yTop = 0; + while (!Main.tile[seaEndX - 1, yTop].active()) + { + yTop++; + } + yTop += WorldGen.genRand.Next(1, 5); + for (int x = seaEndX - 1; x != seaStartX; x += (CalamityWorld.abyssSide ? -1 : 1)) + { + xCounter++; + if (xCounter < BiomeWidth * 0.05) + { + depth += WorldGen.genRand.Next(10, 20) * 0.2f; + } + else if (xCounter < BiomeWidth * 0.08) + { + depth += WorldGen.genRand.Next(10, 20) * 0.15f; + } + else if (xCounter < BiomeWidth * 0.1) + { + depth += WorldGen.genRand.Next(10, 20) * 0.1f; + } + else if (xCounter < BiomeWidth * 0.15) + { + depth += WorldGen.genRand.Next(10, 20) * 0.07f; + } + else if (xCounter < BiomeWidth * 0.2) + { + depth += WorldGen.genRand.Next(10, 20) * 0.05f; + } + else if (xCounter < BiomeWidth * 0.25) + { + depth += WorldGen.genRand.Next(10, 20) * 0.04f; + } + else if (xCounter < BiomeWidth * 0.325) + { + depth += WorldGen.genRand.Next(10, 20) * 0.03f; + } + else if (xCounter < BiomeWidth * 0.375) + { + depth += WorldGen.genRand.Next(10, 20) * 0.02f; + } + else if (xCounter < BiomeWidth * 0.45) + { + depth += WorldGen.genRand.Next(10, 20) * 0.01f; + } + else if (xCounter < BiomeWidth * 0.6) + { + depth += WorldGen.genRand.Next(10, 20) * 0.005f; + } + else if (xCounter < BiomeWidth * 0.75) + { + depth += WorldGen.genRand.Next(10, 20) * 0.001f; + } + int depthAdditive = WorldGen.genRand.Next(15, 20); + int y = 0; + while (y < yTop + depth + depthAdditive) + { + if (y < yTop + depth * 0.75f - 3f) + { + Main.tile[x, y].active(false); + if (y > yTop) + { + Main.tile[x, y].liquid = 255; + } + else if (y == yTop) + { + Main.tile[x, y].liquid = 127; + } + } + else if (y > yTop && + (Main.tile[x, y].type == (ushort)ModContent.TileType() || + Main.tile[x, y].type == (ushort)ModContent.TileType())) + { + Main.tile[x, y].active(true); + } + Main.tile[x, y].wall = 0; + y++; + } + } + } + #endregion + + #region Generating Water + public const int PerlinIterations = 1; + public const int PerlinOctaves = 4; + public const int PerlinXEdgeClamp = 20; + public const float PerlinYDelta = 40; + public const float PerlinNoiseMax = 0.05f; + public const float PerlinThreshold = 0.1f; // Be careful with this number + public static void CreateWater() + { + int[] seeds = new int[PerlinIterations]; + for (int i = 0; i < seeds.Length; i++) + { + seeds[i] = WorldGen.genRand.Next(); + } + for (int x = 1; x < BiomeWidth; x++) + { + float xRatio = x / (float)BiomeWidth; + for (int y = YStart; y <= YStart + BlockDepth; y++) + { + float yRatio = (y - YStart) / (float)BlockDepth; + int trueX = CalamityWorld.abyssSide ? x : Main.maxTilesX - x; + if (y - YStart < BlockDepth - (int)(BlockDepth * 0.35f) + (int)(Math.Sin(xRatio * MathHelper.Pi) * (int)(BlockDepth * 0.35f)) - PerlinYDelta) + { + if (x < PerlinXEdgeClamp || x > BiomeWidth - PerlinXEdgeClamp) + continue; + float perlinAverage = 0f; + for (int k = 0; k < seeds.Length; k++) + { + perlinAverage += PerlinNoise2D(xRatio, yRatio, PerlinOctaves, seeds[k]) / PerlinIterations; + } + if (perlinAverage > PerlinThreshold * WorldGen.genRand.NextFloat(1f - PerlinNoiseMax, 1f + PerlinNoiseMax)) + { + ushort oldWall = Main.tile[trueX, y].wall; + Main.tile[trueX, y] = new Tile() + { + wall = oldWall, + liquid = 255 + }; + } + } + } + } + } + #endregion + + #region Generating Edge Sandstone + public const int EdgeCheckMinX = 6; + public const int EdgeCheckMaxX = 8; + public const int EdgeCheckMinY = 4; + public const int EdgeCheckMaxY = 6; + public const int MinimumEdgeScore = 4; + public const int SpotWidth = 4; + public static void GenerateHardenedSandstone() + { + for (int x = 1; x < BiomeWidth; x++) + { + for (int y = YStart; y <= YStart + BlockDepth; y++) + { + int trueX = CalamityWorld.abyssSide ? x : Main.maxTilesX - x; + int edgeScore = GetEdgeScore(trueX, y); + + if (edgeScore >= MinimumEdgeScore) + { + for (int dx = -SpotWidth / 2; dx <= SpotWidth; dx++) + { + for (int dy = -SpotWidth / 2; dy <= SpotWidth / 2; dy++) + { + if (WorldGen.InWorld(trueX + dx, y + dy)) + { + if (CalamityUtils.ParanoidTileRetrieval(trueX + dx, y + dy).type != (ushort)ModContent.TileType() && + SulphSeaTiles.Contains(CalamityUtils.ParanoidTileRetrieval(trueX + dx, y + dy).type)) + { + Main.tile[trueX + dx, y + dy].type = (ushort)ModContent.TileType(); + } + } + } + } + } + else if (WorldGen.genRand.NextBool(10)) + { + for (int i = 0; i < 20; i++) + { + TileLoader.RandomUpdate(trueX, y, Main.tile[trueX, y].type); + } + } + } + } + } + public static int GetEdgeScore(int x, int y) + { + int edgeScore = 0; + for (int dx = x - WorldGen.genRand.Next(EdgeCheckMinX, EdgeCheckMaxX + 1); dx <= x + WorldGen.genRand.Next(EdgeCheckMinX, EdgeCheckMaxX + 1); dx++) + { + if (dx == x) + continue; + if (CalamityUtils.ParanoidTileRetrieval(dx, y).liquid == 255) + edgeScore++; + } + for (int dy = y - WorldGen.genRand.Next(EdgeCheckMinY, EdgeCheckMaxY + 1); dy <= y + WorldGen.genRand.Next(EdgeCheckMinY, EdgeCheckMaxY + 1); dy++) + { + if (dy == y) + continue; + if (CalamityUtils.ParanoidTileRetrieval(x, dy).liquid == 255) + edgeScore++; + } + return edgeScore; + } + #endregion + + #region Smoothening Everything + public static void SmoothenTheEntireSea() + { + for (int x = 2; x < BiomeWidth - 2; x++) + { + int trueX = x; + if (!CalamityWorld.abyssSide) + trueX = Main.maxTilesX - x; + for (int y = YStart; y <= YStart + BlockDepth; y++) + { + Tile.SmoothSlope(trueX, y); + } + } + } + #endregion + + #region Generating Scenery + public const int ColumnMinDistanceX = 8; + public const int ColumnMinHeight = 10; + public const int ColumnMaxHeight = 27; + public const int StalactitePairMinDistance = 6; + public const int StalactitePairMaxDistance = 44; + public static void PlaceVentsAndFossils() + { + for (int x = 1; x < BiomeWidth; x++) + { + int trueX = CalamityWorld.abyssSide ? x : Main.maxTilesX - x; + for (int y = YStart; y <= YStart + BlockDepth; y++) + { + // Generate vents in the top 45% + if (y - YStart < BlockDepth * 0.45f) + { + if (WorldGen.SolidTile(trueX, y + 1) && WorldGen.genRand.NextBool(20)) + { + PlaceMiscTile(trueX, y, 1, 2, (ushort)ModContent.TileType()); + } + } + // And fossils in the bottom 55% + else + { + if (WorldGen.SolidTile(trueX, y + 1)) + { + // Generate ribs such that they're all nearby + if (WorldGen.genRand.NextBool(25)) + { + ushort type = (ushort)Utils.SelectRandom(WorldGen.genRand, + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType(), + ModContent.TileType()); + int height; + if (type == ModContent.TileType() || type == ModContent.TileType()) + { + height = 3; + } + else if (type == ModContent.TileType()) + { + height = 2; + } + else if (type == ModContent.TileType()) + { + height = 4; + } + else + { + height = 1; + } + PlaceMiscTile(trueX, y, 1, height, type); + } + else if (WorldGen.genRand.NextBool(16)) + { + PlaceMiscTile(trueX, y, 3, 2, (ushort)Utils.SelectRandom(WorldGen.genRand, ModContent.TileType(), ModContent.TileType(), ModContent.TileType())); + } + } + } + } + } + } + public static void PlaceColumns() + { + int previousX = 0; + int style; + for (int x = 1; x < BiomeWidth; x++) + { + int trueX = CalamityWorld.abyssSide ? x : Main.maxTilesX - x; + for (int y = YStart; y <= YStart + BlockDepth; y++) + { + if (y - YStart > BlockDepth * 0.5f) + { + if (WorldGen.SolidTile(trueX, y + 1) && + WorldGen.SolidTile(trueX + 1, y + 1) && + SulphSeaTiles.Contains(CalamityUtils.ParanoidTileRetrieval(trueX, y + 1).type) && + WorldGen.genRand.NextBool(3) && + Math.Abs(trueX - previousX) >= ColumnMinDistanceX) + { + int top = y; + int height = 0; + while (!(WorldGen.SolidTile(trueX - 1, top) && WorldGen.SolidTile(trueX, top) && WorldGen.SolidTile(trueX + 1, top))) + { + top--; + height++; + if (height > ColumnMaxHeight + 1) + break; + } + if (height <= ColumnMaxHeight && height >= ColumnMinHeight) + { + for (int dy = 0; dy < height; dy++) + { + style = WorldGen.genRand.Next(3); + short yFrame = 18; + if (dy == 0) + yFrame = 36; + if (dy == height - 1) + yFrame = 0; + if (Main.tile[trueX, y - dy] == null) + Main.tile[trueX, y - dy] = new Tile(); + ushort oldWall = Main.tile[trueX, y - dy].wall; + Main.tile[trueX, y - dy] = new Tile + { + type = (ushort)ModContent.TileType(), + frameX = (short)(style * 36), + frameY = yFrame, + liquid = 255, + wall = oldWall + }; + Main.tile[trueX, y - dy].active(true); + + if (Main.tile[trueX + 1, y - dy] == null) + Main.tile[trueX + 1, y - dy] = new Tile(); + + oldWall = Main.tile[trueX + 1, y - dy].wall; + Main.tile[trueX + 1, y - dy] = new Tile + { + type = (ushort)ModContent.TileType(), + frameX = (short)(style * 36 + 18), + frameY = yFrame, + liquid = 255, + wall = oldWall + }; + Main.tile[trueX + 1, y - dy].active(true); + } + previousX = trueX; + } + } + } + } + } + } + public static void PlaceStalactites() + { + int heightFromType(int type) + { + if (type <= 2) + return 2; + else if (type <= 4) + return 3; + else + return 4; + }; + for (int x = 1; x < BiomeWidth; x++) + { + int trueX = CalamityWorld.abyssSide ? x : Main.maxTilesX - x; + for (int y = YStart; y <= YStart + BlockDepth; y++) + { + if (y - YStart > BlockDepth * 0.25f) + { + if (WorldGen.SolidTile(trueX, y - 1) && WorldGen.genRand.NextBool(10)) + { + int dy = 1; + while (!CalamityUtils.ParanoidTileRetrieval(trueX, y + dy).active()) + { + dy++; + if (dy > StalactitePairMaxDistance) + break; + } + if (dy <= StalactitePairMaxDistance && dy >= StalactitePairMinDistance) + { + int type = WorldGen.genRand.Next(6); + type++; + int height = heightFromType(type); + PlaceStalactite(trueX, y, height, (ushort)CalamityMod.instance.TileType($"SulphurousStalactite{type}")); + if (WorldGen.SolidTile(trueX, y + dy + 1)) + { + PlaceStalacmite(trueX, y + dy, height, (ushort)CalamityMod.instance.TileType($"SulphurousStalacmite{type}")); + } + + // Reset the slope/half brick variables for the tiles below/above the pairs, so that it doesn't look like there's an + // imaginary gap between the stalactite and tile it's attached to. + Main.tile[trueX, y - 1].slope(0); + Main.tile[trueX, y - 1].halfBrick(false); + + Main.tile[trueX, y + dy + 1].slope(0); + Main.tile[trueX, y + dy + 1].halfBrick(false); + } + } + } + } + } + } + public static void PlaceMiscTile(int x, int y, int width, int height, ushort type, int style = 0) + { + try + { + bool canGenerate = true; + for (int i = x; i < x + width; i++) + { + for (int j = y - (int)Math.Ceiling(height / 2.0); j < y + (int)Math.Ceiling(height / 2.0); j++) + { + if (Main.tile[i, j] == null) + { + Main.tile[i, j] = new Tile(); + } + if (Main.tile[i, j].active()) + { + canGenerate = false; + } + } + if (Main.tile[i, y + 1] == null) + { + Main.tile[i, y + 1] = new Tile(); + } + if (!Main.tile[i, y + 1].nactive() || Main.tile[i, y + 1].halfBrick() || Main.tile[i, y + 1].slope() != 0 || !Main.tileSolid[Main.tile[i, y + 1].type]) + { + canGenerate = false; + } + } + if (canGenerate) + { + WorldGen.PlaceTile(x, y, type, style: style); + } + } + catch + { + return; // This should only ever happen from an index error, and there's really no point in continuing if that happens + } + } + public static void PlaceStalactite(int x, int y, int height, ushort type) + { + for (int dy = 0; dy < height; dy++) + { + ushort oldWall = Main.tile[x, y + dy].wall; + Main.tile[x, y + dy] = new Tile + { + wall = oldWall, + type = type, + frameY = (short)(dy * 18) + }; + Main.tile[x, y + dy].active(true); + } + } + public static void PlaceStalacmite(int x, int y, int height, ushort type) + { + for (int dy = height - 1; dy >= 0; dy--) + { + ushort oldWall = Main.tile[x, y + dy].wall; + Main.tile[x, y - dy] = new Tile + { + type = type, + frameY = (short)(height * 18 - dy * 18), + wall = oldWall + }; + Main.tile[x, y - dy].active(true); + } + } + #endregion + + #region Generating Chests + public const int CheckCutoffDistance = 45; + public static void PlaceRustyChests() + { + // Ambiguity bullshit. + int[] ItemTypes = { ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() }; + + for (int i = 0; i < ItemTypes.Length; ++i) + { + Chest chest = null; + int attempts = 0; + + while (chest == null && attempts < 2500) + { + attempts++; + int x = WorldGen.genRand.Next(CheckCutoffDistance, BiomeWidth - CheckCutoffDistance); + if (!CalamityWorld.abyssSide) + { + x = Main.maxTilesX - x; + } + int y = WorldGen.genRand.Next(YStart + CheckCutoffDistance, YStart + BlockDepth - CheckCutoffDistance); + if (WorldGen.InWorld(x, y)) + { + if (!CalamityUtils.ParanoidTileRetrieval(x, y).active() && + SulphSeaTiles.Contains(CalamityUtils.ParanoidTileRetrieval(x, y + 1).type)) + { + chest = WorldGenerationMethods.AddChestWithLoot(x, y, (ushort)ModContent.TileType(), tileStyle: 1); + } + } + } + + // If a chest was placed, force its first item to be the unique item. + if (chest != null) + { + chest.item[0].SetDefaults(ItemTypes[i]); + chest.item[0].Prefix(-1); + } + } + } + #endregion + + #region Misc Functions + public static void DetermineYStart() { int maxHeight = int.MaxValue; for (int i = 0; i < 15; i++) @@ -84,428 +680,13 @@ namespace CalamityMod.World while (!Main.tile[xCheck, YStart].active()) { YStart++; - if (YStart > (int)Main.rockLayer - YDescent - 5) + if (YStart > Main.rockLayer - 40) break; } if (maxHeight > YStart) maxHeight = YStart; } - return maxHeight; - } - public static void PlaceCavernBlock(int blockDepth) - { - for (int x = 0; x < BiomeWidth; x++) - { - for (int y = 15; y < blockDepth; y++) - { - int trueX = x; - if (!CalamityWorld.abyssSide) - { - trueX = Main.maxTilesX - x; - } - int trueDepth = blockDepth - 36 + (int)(Math.Sin(MathHelper.Pi * x / BiomeWidth) * 36); - if (WorldGen.InWorld(trueX, y + YStart)) - { - if (CalamityUtils.ParanoidTileRetrieval(trueX, y + YStart).liquid == 0 && - y < trueDepth) - { - ushort type = (ushort)ModContent.TileType(); - if (y > trueDepth * 0.35 && y < trueDepth * 0.4 && Main.rand.NextBool(4)) - { - type = (ushort)ModContent.TileType(); - } - else if (y >= trueDepth * 0.4) - { - type = (ushort)ModContent.TileType(); - } - if ((Main.tile[trueX, y + YStart].active() && Main.tile[trueX, y + YStart].type != TileID.Trees && Main.tile[trueX, y + YStart].type != TileID.PalmTree) || - y > trueDepth * (0.26 + WorldGen.genRand.NextFloat(-0.02f, 0.02f))) - { - Main.tile[trueX, y + YStart].type = type; - Main.tile[trueX, y + YStart].slope(0); - Main.tile[trueX, y + YStart].active(true); - Main.tile[trueX, y + YStart].wall = Main.tile[trueX, y + YStart].type == (ushort)ModContent.TileType() ? - (ushort)ModContent.WallType() : (ushort)ModContent.WallType(); - } - } - } - } - } - } - public static void PlaceWaterCaverns() - { - // This is used in other vanilla worldgen. However, it does not affect any worldgen after this. - // This is basically the point where TileRunner stops spawning water. - WorldGen.waterLine = 1; - int xStart = CalamityWorld.abyssSide ? BiomeWidth / 2 : - Main.maxTilesX - BiomeWidth / 2; - for (int c = 0; c < 8; c++) - { - Vector2 startingPosition = new Vector2(xStart + WorldGen.genRand.Next(-25, 25 + 1), YStart + WorldGen.genRand.Next(20)); - while (!CalamityUtils.ParanoidTileRetrieval((int)startingPosition.X, (int)startingPosition.Y).active()) - { - startingPosition.Y++; - } - float xDirection = WorldGen.genRand.NextFloat() * 0.2f - 0.2f; - float yDirection = 1f - xDirection; - if (c == 0) - { - xDirection = WorldGen.genRand.NextFloat(1f, 2f); - yDirection = 2f; - } - if (WorldGen.genRand.NextBool(2)) - { - xDirection *= -1; - } - if (WorldGen.genRand.NextBool(2)) - { - yDirection *= -1; - } - for (int i = 0; i < 11; i++) - { - startingPosition = WorldGen.digTunnel(startingPosition.X, startingPosition.Y, xDirection, yDirection, WorldGen.genRand.Next(6, 20), WorldGen.genRand.Next(4, 9), false); - xDirection += WorldGen.genRand.NextFloat(-0.5f, 0.5f); - yDirection += WorldGen.genRand.NextFloat(-0.2f, 0.2f); - xDirection = MathHelper.Clamp(xDirection, -4f, 4f); - yDirection = MathHelper.Clamp(yDirection, -1f, 3f); - float xdirection2 = WorldGen.genRand.NextFloat(-0.4f, 0.4f); - float ydirection2 = WorldGen.genRand.NextFloat(-0.2f, 0.2f); - if (WorldGen.genRand.NextBool(2)) - { - xdirection2 *= -1; - } - if (WorldGen.genRand.NextBool(2)) - { - ydirection2 *= -1; - } - Vector2 tunnelVector = WorldGen.digTunnel(startingPosition.X, startingPosition.Y, xdirection2, ydirection2, WorldGen.genRand.Next(30, 50), WorldGen.genRand.Next(5, 10 + 1), false); - - // The -2 parameter causes the tile-runner to generate liquids. Water above the lavaLine and lava below. - WorldGen.TileRunner((int)tunnelVector.X, (int)tunnelVector.Y, WorldGen.genRand.Next(24, 32 + 1), WorldGen.genRand.Next(19, 24 + 1), -2, false, 0f, 0f, false, true); - } - } - } - public static void PlaceScenery(int downwardCheck) - { - // Vents - for (int x = 0; x < BiomeWidth; x++) - { - int trueX = x; - if (!CalamityWorld.abyssSide) - { - trueX = Main.maxTilesX - x; - } - for (int y = YStart - 30; y < YStart + downwardCheck; y++) - { - if (WorldGen.genRand.NextBool(9)) - { - if (CalamityUtils.TileSelectionSolid(trueX, y, 2, -2)) - break; - WorldGen.PlaceTile(trueX, y, ModContent.TileType()); - } - } - } - - // Rock pillars in the water - for (int c = 1; c <= 5; c++) - { - int xStart = 0; - switch (c) - { - case 1: - xStart = 40; - break; - case 2: - xStart = 60; - break; - case 3: - xStart = 90; - break; - case 4: - xStart = 140; - break; - case 5: - xStart = 200; - break; - } - if (!CalamityWorld.abyssSide) - { - xStart = Main.maxTilesX - xStart; - } - // Adjust Y positioning a bit - int dy = -40; - while (!CalamityUtils.ParanoidTileRetrieval(xStart, YStart + dy).active() || - (CalamityUtils.ParanoidTileRetrieval(xStart, YStart + dy).type != (ushort)ModContent.TileType() && - CalamityUtils.ParanoidTileRetrieval(xStart, YStart + dy).type != (ushort)ModContent.TileType())) - { - if (WorldGen.InWorld(xStart, YStart + dy + 1)) - { - if (Main.tile[xStart, YStart + dy + 1] == null) - Main.tile[xStart, YStart + dy + 1] = new Tile(); - } - else - { - dy++; - continue; - } - dy++; - if (YStart + dy > Main.rockLayer - 30) - break; - } - int ascent = WorldGen.genRand.Next(4 * c, 8 * c + 3) + 7; - - int widthTop = WorldGen.genRand.Next(2, 4 + 1); - int widthBottomAdditive = WorldGen.genRand.Next(13, 20 + 1); - float root = WorldGen.genRand.NextFloat(1.6f, 3.2f); - for (int y = YStart - ascent; y <= YStart + 6; y++) - { - // The root is used to give a less linear scale - float yRatio = (float)Math.Pow(1f - (-(y - YStart) / (float)ascent), 1f / root); - int width = widthTop + (int)(widthBottomAdditive * yRatio); - for (int x = xStart - width / 2; x <= xStart + width / 2; x++) - { - Main.tile[x, y + dy].type = (ushort)ModContent.TileType(); - Main.tile[x, y + dy].slope(0); - Main.tile[x, y + dy].active(true); - } - } - } - } - public static void ReplaceRemainingSand() - { - List tilesToReplace = new List() - { - TileID.Dirt, - TileID.Mud, - TileID.Grass, - TileID.CorruptGrass, - TileID.FleshGrass, - TileID.Ebonsand, - TileID.Ebonstone, - TileID.Crimstone, - TileID.Crimsand, - TileID.Sand, - TileID.Stone, - TileID.Copper, - TileID.Tin, - TileID.Iron, - TileID.Lead, - TileID.Tungsten, - TileID.Silver - }; - List wallsToReplace = new List() - { - WallID.Stone, - WallID.Grass, - WallID.GrassUnsafe, - WallID.CorruptGrassUnsafe, - WallID.CrimsonGrassUnsafe, - WallID.CrimstoneUnsafe, - WallID.EbonstoneUnsafe, - WallID.MudUnsafe - }; - int x = Main.maxTilesX; - int y = Main.maxTilesY; - int genLimit = x / 2; - - if (WorldGen.dungeonX < genLimit) - CalamityWorld.abyssSide = true; - - int abyssChasmX = CalamityWorld.abyssSide ? genLimit - (genLimit - 135) : genLimit + (genLimit - 135); //2100 - 1965 = 135 : 2100 + 1965 = 4065 - - if (CalamityWorld.abyssSide) - { - for (int abyssIndexSand = 0; abyssIndexSand < abyssChasmX + BiomeWidth; abyssIndexSand++) - { - for (int abyssIndexSand2 = 0; abyssIndexSand2 < (int)Main.rockLayer - WorldGen.genRand.Next(115, 122 + 1); abyssIndexSand2++) - { - Tile tile = Framing.GetTileSafely(abyssIndexSand, abyssIndexSand2); - if (abyssIndexSand > abyssChasmX + BiomeWidth) - { - if (tile.active() && - tilesToReplace.Contains(tile.type) && - WorldGen.genRand.Next(4) == 0) - { - tile.type = (ushort)ModContent.TileType(); - } - else if (tile.active() && - tile.type == TileID.Trees) - { - tile.active(false); - } - } - else if (abyssIndexSand > abyssChasmX + BiomeWidth - 15) - { - if (tile.active() && - tilesToReplace.Contains(tile.type) && - WorldGen.genRand.Next(2) == 0) - { - tile.type = (ushort)ModContent.TileType(); - } - else if (tile.active() && - tile.type == TileID.Trees) - { - tile.active(false); - } - } - else - { - if (tile.active() && - tilesToReplace.Contains(tile.type)) - { - tile.type = (ushort)ModContent.TileType(); - } - else if (tile.active() && - tile.type == TileID.Trees) - { - tile.active(false); - } - } - if (wallsToReplace.Contains(tile.wall)) - { - Main.tile[abyssIndexSand, abyssIndexSand2].wall = Main.tile[abyssIndexSand, abyssIndexSand2].type == (ushort)ModContent.TileType() ? - (ushort)ModContent.WallType() : (ushort)ModContent.WallType(); - } - } - } - } - else - { - for (int abyssIndexSand = abyssChasmX - BiomeWidth; abyssIndexSand < x; abyssIndexSand++) - { - for (int abyssIndexSand2 = 0; abyssIndexSand2 < (int)Main.rockLayer - WorldGen.genRand.Next(115, 122 + 1); abyssIndexSand2++) - { - Tile tile = Framing.GetTileSafely(abyssIndexSand, abyssIndexSand2); - if (abyssIndexSand < abyssChasmX - BiomeWidth) - { - if (tile.active() && - tilesToReplace.Contains(tile.type) && - WorldGen.genRand.Next(4) == 0) - { - tile.type = (ushort)ModContent.TileType(); - } - else if (tile.active() && - tile.type == TileID.Trees) - { - tile.active(false); - } - } - else if (abyssIndexSand < abyssChasmX - BiomeWidth + 15) - { - if (tile.active() && - tilesToReplace.Contains(tile.type) && - WorldGen.genRand.Next(2) == 0) - { - tile.type = (ushort)ModContent.TileType(); - } - else if (tile.active() && - tile.type == TileID.Trees) - { - tile.active(false); - } - } - else - { - if (tile.active() && - tilesToReplace.Contains(tile.type)) - { - tile.type = (ushort)ModContent.TileType(); - } - else if (tile.active() && - tile.type == TileID.Trees) - { - tile.active(false); - } - } - if (wallsToReplace.Contains(tile.wall)) - { - Main.tile[abyssIndexSand, abyssIndexSand2].wall = Main.tile[abyssIndexSand, abyssIndexSand2].type == (ushort)ModContent.TileType() ? - (ushort)ModContent.WallType() : (ushort)ModContent.WallType(); - } - } - } - } - } - // This should not have been required - public static void KillRemainingGrass() - { - List ToKill = new List() - { - TileID.Dirt, - TileID.Grass, - TileID.Mud, - }; - for (int x = 0; x < BiomeWidth; x++) - { - int trueX = x; - if (!CalamityWorld.abyssSide) - { - trueX = Main.maxTilesX - x; - } - for (int y = YStart - 300; y < YStart + 300; y++) - { - if (!WorldGen.InWorld(trueX, y)) - continue; - if (ToKill.Contains(CalamityUtils.ParanoidTileRetrieval(trueX, y).type) && CalamityUtils.ParanoidTileRetrieval(trueX, y).active()) - { - // During the check in ParanoidTileRetrieval, the tile is replaced with an instance if it is null. - // As a result, null checks are not required here. - Main.tile[trueX, y] = new Tile(); - WorldGen.KillTile(trueX, y - 1); - } - } - } - } - public static void PlaceMiscTiles(int maximumDepth) - { - // Kelp - for (int x = 0; x < BiomeWidth; x++) - { - int trueX = x; - if (!CalamityWorld.abyssSide) - { - trueX = Main.maxTilesX - x; - } - for (int y = YStart + 20; y < YStart + 20 + maximumDepth; y++) - { - if (WorldGen.genRand.NextBool(24)) - { - if (CalamityUtils.TileSelectionSolid(trueX, y, 1, 2) && - (CalamityUtils.ParanoidTileRetrieval(trueX, y).type == ModContent.TileType() || - CalamityUtils.ParanoidTileRetrieval(trueX, y).type == ModContent.TileType())) - break; - WorldGen.PlaceTile(trueX, y, TileID.DyePlants, style:5); - } - } - } - } - public static void SmoothenSea() - { - for (int x = 1; x < Main.maxTilesX - 1; x++) - { - int trueX = x; - if (!CalamityWorld.abyssSide) - { - trueX = Main.maxTilesX - x; - } - for (int y = 1; y < Main.maxTilesY * 0.5; y++) - { - if (Framing.GetTileSafely(trueX, y).type == (ushort)ModContent.TileType() || - Framing.GetTileSafely(trueX, y).type == (ushort)ModContent.TileType()) - { - Main.tile[trueX, y].slope(0); - Main.tile[trueX, y].halfBrick(false); - try - { - Tile.SmoothSlope(trueX, y); - } - catch - { - continue; - } - } - } - } + YStart = maxHeight; } public static void PlaceTrees() { @@ -531,7 +712,7 @@ namespace CalamityMod.World { lastTreeX = trueX; } - if (!success && + if (!success && Main.tile[trueX, y - 1].type == ModContent.TileType() && Main.tile[trueX, y - 2].type == ModContent.TileType()) { @@ -545,7 +726,7 @@ namespace CalamityMod.World public static bool GrowSaplingImmediately(int i, int j) { int trueStartingPositionY = j; - while (TileLoader.IsSapling((int)Main.tile[i, trueStartingPositionY].type)) + while (TileLoader.IsSapling(Main.tile[i, trueStartingPositionY].type)) { trueStartingPositionY++; } @@ -604,10 +785,12 @@ namespace CalamityMod.World WorldGen.RangeFrame(i - 2, trueStartingPositionY - treeHeight - 1, i + 2, trueStartingPositionY + 1); if (Main.netMode == NetmodeID.Server) { - NetMessage.SendTileSquare(-1, i, (int)((double)trueStartingPositionY - (double)treeHeight * 0.5), treeHeight + 1, TileChangeType.None); + NetMessage.SendTileSquare(-1, i, (int)(trueStartingPositionY - treeHeight * 0.5), treeHeight + 1, TileChangeType.None); } return true; } + #endregion + public static void PlaceAbyss() { int x = Main.maxTilesX; @@ -948,7 +1131,6 @@ namespace CalamityMod.World } } } - PlaceTrees(); } } } diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index ec98aa3a12..8572d347e5 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -742,7 +742,7 @@ namespace CalamityMod.World calamityTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; sunkenSeaTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; abyssTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; - sulphurTiles = tileCounts[ModContent.TileType()]; + sulphurTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; #region Astral Stuff int astralDesertTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; @@ -864,6 +864,16 @@ namespace CalamityMod.World })); #endregion + int SulphurIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Micro Biomes")); + if (SulphurIndex != -1) + { + tasks.Insert(SulphurIndex + 1, new PassLegacy("Sulphur", delegate (GenerationProgress progress) + { + progress.Message = "Sulphur Sea"; + Abyss.PlaceSulphurSea(); + })); + } + tasks.Insert(FinalIndex + 2, new PassLegacy("SpecialShrines", delegate (GenerationProgress progress) { progress.Message = "Special Shrines"; @@ -876,18 +886,13 @@ namespace CalamityMod.World Abyss.PlaceAbyss(); })); - // Moved to prevent the sulf sea caverns from being swallowed by the abyss opening - int SulphurIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Micro Biomes")); - if (SulphurIndex != -1) + tasks.Insert(FinalIndex + 4, new PassLegacy("Sulphur2", delegate (GenerationProgress progress) { - tasks.Insert(SulphurIndex + 1, new PassLegacy("Sulphur", delegate (GenerationProgress progress) - { - progress.Message = "Sulphur Sea"; - Abyss.PlaceSulphurSea(); - })); - } + progress.Message = "Finishing Sulphur Sea"; + Abyss.FinishGeneratingSulphurSea(); + })); - tasks.Insert(FinalIndex + 4, new PassLegacy("IWannaRock", delegate (GenerationProgress progress) + tasks.Insert(FinalIndex + 5, new PassLegacy("IWannaRock", delegate (GenerationProgress progress) { progress.Message = "I Wanna Rock"; WorldGenerationMethods.PlaceRoxShrine(); diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index 90b073535a..6cf3b5a228 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -75,7 +75,7 @@ namespace CalamityMod.World } } - private static Chest AddChestWithLoot(int i, int j, ushort type = TileID.Containers, uint startingSlot = 1, int tileStyle = 0) + internal static Chest AddChestWithLoot(int i, int j, ushort type = TileID.Containers, uint startingSlot = 1, int tileStyle = 0) { int chestIndex = -1; @@ -100,7 +100,7 @@ namespace CalamityMod.World return chest; } - private static void PlaceLootInChest(ref Chest chest, ushort type, uint startingSlot) + internal static void PlaceLootInChest(ref Chest chest, ushort type, uint startingSlot) { uint itemIndex = startingSlot; @@ -139,7 +139,25 @@ namespace CalamityMod.World } PutItemInChest(ref chest, ItemID.GoldCoin, goldCoins); } + else if (type == ModContent.TileType()) + { + // 15-29 torches (in accordence with vanilla) + PutItemInChest(ref chest, ItemID.Torch, 15, 29); + // 50% chance of 1 or 2 of the following potions + int[] potions = new int[] + { + ModContent.ItemType(), ItemID.WaterWalkingPotion, ItemID.ShinePotion, ItemID.GillsPotion, ItemID.FlipperPotion + }; + PutItemInChest(ref chest, WorldGen.genRand.Next(potions), 1, 2, WorldGen.genRand.NextBool()); + PutItemInChest(ref chest, WorldGen.genRand.Next(potions), 1, 2, WorldGen.genRand.NextBool()); + + // 33% chance of flippers + PutItemInChest(ref chest, ItemID.Flipper, condition: WorldGen.genRand.NextBool(3)); + + // Typical coins + PutItemInChest(ref chest, ItemID.GoldCoin, 2, 4); + } // Default loot else {