From 6d030c1894636e8bb7347503f432b1924d27f312 Mon Sep 17 00:00:00 2001 From: Nestorboy <35258953+Nestorboy@users.noreply.github.com> Date: Sat, 28 Sep 2024 22:43:14 +0200 Subject: [PATCH 1/6] Made aurora ice chunks radii deterministic --- Content/WorldGeneration/PermafrostGen.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content/WorldGeneration/PermafrostGen.cs b/Content/WorldGeneration/PermafrostGen.cs index 47f68029a..b76d3b337 100644 --- a/Content/WorldGeneration/PermafrostGen.cs +++ b/Content/WorldGeneration/PermafrostGen.cs @@ -258,7 +258,7 @@ bool TryToGenerateArena(out int xPosition) /// Where to place the ore, in tile coordinates private void PlaceOre(Point16 center) { - int radius = Main.rand.Next(2, 5); + int radius = WorldGen.genRand.Next(2, 5); int frameStartX = radius == 4 ? 5 : radius == 3 ? 2 : 0; int frameStartY = radius == 4 ? 0 : radius == 3 ? 1 : 2; From f4dab24bb1b639f22875fc4be75606109e59d386 Mon Sep 17 00:00:00 2001 From: Nestorboy <35258953+Nestorboy@users.noreply.github.com> Date: Sat, 28 Sep 2024 23:20:43 +0200 Subject: [PATCH 2/6] Made squid arena location deterministic --- Content/WorldGeneration/PermafrostGen.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content/WorldGeneration/PermafrostGen.cs b/Content/WorldGeneration/PermafrostGen.cs index fe0adfd98..09424c571 100644 --- a/Content/WorldGeneration/PermafrostGen.cs +++ b/Content/WorldGeneration/PermafrostGen.cs @@ -98,7 +98,7 @@ bool TryToGenerateArena(out int xPosition) randomIndices[i] = i; } - randomIndices = Helper.RandomizeList(randomIndices.ToList()).ToArray(); + randomIndices = Helper.RandomizeList(randomIndices.ToList(), WorldGen.genRand).ToArray(); for (int i = 0; i < spotsToCheck; i++) { From 9398b4cd46d361138ae2548dbd468cb840d259bf Mon Sep 17 00:00:00 2001 From: Nestorboy <35258953+Nestorboy@users.noreply.github.com> Date: Sun, 29 Sep 2024 16:40:20 +0200 Subject: [PATCH 3/6] Added variable for arenaHeight --- Content/WorldGeneration/PermafrostGen.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content/WorldGeneration/PermafrostGen.cs b/Content/WorldGeneration/PermafrostGen.cs index 09424c571..2342175a2 100644 --- a/Content/WorldGeneration/PermafrostGen.cs +++ b/Content/WorldGeneration/PermafrostGen.cs @@ -86,6 +86,7 @@ bool TryToGenerateArena(out int xPosition) { int arenaWidth = 109; int stepSpacing = 20; + int arenaHeight = 180; int stepsToLeft = (centerX - iceLeft) / stepSpacing; int stepsToRight = (iceRight - centerX) / stepSpacing; int startX = centerX - stepsToLeft * stepSpacing; @@ -108,7 +109,7 @@ bool TryToGenerateArena(out int xPosition) bool invalidLocation = false; for (int x1 = 0; x1 < arenaWidth; x1++) { - for (int y1 = 0; y1 < 180; y1++) + for (int y1 = 0; y1 < arenaHeight; y1++) { Tile tile = Framing.GetTileSafely(xPos - 40 + x1, centerY + 100 + y1); From ba6f4918418e004f6b6953761d10f3d367cebb6f Mon Sep 17 00:00:00 2001 From: Nestorboy <35258953+Nestorboy@users.noreply.github.com> Date: Mon, 30 Sep 2024 01:18:21 +0200 Subject: [PATCH 4/6] Made CoughDrops only proc if time is display --- Content/Items/Misc/Accessories.CoughDrops.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content/Items/Misc/Accessories.CoughDrops.cs b/Content/Items/Misc/Accessories.CoughDrops.cs index 2d5f81051..3c1a1df3f 100644 --- a/Content/Items/Misc/Accessories.CoughDrops.cs +++ b/Content/Items/Misc/Accessories.CoughDrops.cs @@ -1,5 +1,6 @@ using StarlightRiver.Content.Buffs; using StarlightRiver.Content.Items.BaseTypes; +using Terraria.ID; namespace StarlightRiver.Content.Items.Misc { @@ -21,7 +22,8 @@ public override void Unload() private void DelBuff(On_Player.orig_DelBuff orig, Player self, int buffId) { - if (Main.debuff[self.buffType[buffId]] && Equipped(self)) + int buffType = self.buffType[buffId]; + if (Main.debuff[buffType] && !Main.buffNoTimeDisplay[buffType] && Equipped(self)) self.AddBuff(ModContent.BuffType(), 180); orig(self, buffId); From f5a86aaba6786c17a1e4ff2fde20d7d4d4f8766a Mon Sep 17 00:00:00 2001 From: Nestorboy <35258953+Nestorboy@users.noreply.github.com> Date: Mon, 30 Sep 2024 01:19:33 +0200 Subject: [PATCH 5/6] Made CoughDrops only proc if nurse can remove debuff --- Content/Items/Misc/Accessories.CoughDrops.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content/Items/Misc/Accessories.CoughDrops.cs b/Content/Items/Misc/Accessories.CoughDrops.cs index 3c1a1df3f..cb07512b7 100644 --- a/Content/Items/Misc/Accessories.CoughDrops.cs +++ b/Content/Items/Misc/Accessories.CoughDrops.cs @@ -23,7 +23,7 @@ public override void Unload() private void DelBuff(On_Player.orig_DelBuff orig, Player self, int buffId) { int buffType = self.buffType[buffId]; - if (Main.debuff[buffType] && !Main.buffNoTimeDisplay[buffType] && Equipped(self)) + if (Main.debuff[buffType] && !Main.buffNoTimeDisplay[buffType] && !BuffID.Sets.NurseCannotRemoveDebuff[buffType] && Equipped(self)) self.AddBuff(ModContent.BuffType(), 180); orig(self, buffId); From c22c20a68c0fb4e25effe54b4240b403f889f6c5 Mon Sep 17 00:00:00 2001 From: Nestorboy <35258953+Nestorboy@users.noreply.github.com> Date: Mon, 30 Sep 2024 02:16:35 +0200 Subject: [PATCH 6/6] Reintroduce damage buff to CoughDrops buff --- Content/Buffs/CoughDropsBuff.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Content/Buffs/CoughDropsBuff.cs b/Content/Buffs/CoughDropsBuff.cs index cb809a63b..f761df5c1 100644 --- a/Content/Buffs/CoughDropsBuff.cs +++ b/Content/Buffs/CoughDropsBuff.cs @@ -9,6 +9,7 @@ public CoughDropsBuff() : base("Cough Drops", "Your speed and damage are boosted public override void Update(Player Player, ref int buffIndex) { Player.maxRunSpeed += 2; + Player.GetDamage(DamageClass.Generic) += 0.15f; } } } \ No newline at end of file