From 25dc7636ffa72d6a49c1cd4bf849a5775f9d809a Mon Sep 17 00:00:00 2001 From: Dominic Date: Tue, 14 Jun 2022 18:34:14 -0500 Subject: [PATCH 1/5] Fix Bandit tanking the economy with refund money --- NPCs/TownNPCs/THIEF.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/NPCs/TownNPCs/THIEF.cs b/NPCs/TownNPCs/THIEF.cs index e4c6953bd6..b045188088 100644 --- a/NPCs/TownNPCs/THIEF.cs +++ b/NPCs/TownNPCs/THIEF.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.TownNPCs { // Patron names "Xplizzy", // <@!98826096237109248> Whitegiraffe#6342 - "Freakish", // <@!750363283520749598> Freakish#0001 + "Freakish", // <@!750363283520749598> Freakish#0001 // Original names "Laura", "Mie", "Bonnie", @@ -68,8 +68,8 @@ namespace CalamityMod.NPCs.TownNPCs bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A kleptomaniac who is a bit of a coward when it comes to face-to-face fights. She’s rather good at getting herself both into and out of dicey situations.") + // Will move to localization whenever that is cleaned up. + new FlavorTextBestiaryInfoElement("A kleptomaniac who is a bit of a coward when it comes to face-to-face fights. She’s rather good at getting herself both into and out of dicey situations.") }); } @@ -95,7 +95,7 @@ namespace CalamityMod.NPCs.TownNPCs return CalamityWorld.spawnedBandit; } - public override List SetNPCNameList() => PossibleNames; + public override List SetNPCNameList() => PossibleNames; public override string GetChat() { @@ -207,13 +207,13 @@ namespace CalamityMod.NPCs.TownNPCs CalamityWorld.Reforges = 0; int[] coinCounts = Utils.CoinsSplit(CalamityWorld.MoneyStolenByBandit); if (coinCounts[0] > 0) - Item.NewItem(NPC.GetSource_Loot(), NPC.Hitbox, ItemID.PlatinumCoin, coinCounts[0]); + Item.NewItem(NPC.GetSource_Loot(), NPC.Hitbox, ItemID.CopperCoin, coinCounts[0]); if (coinCounts[1] > 0) - Item.NewItem(NPC.GetSource_Loot(), NPC.Hitbox, ItemID.GoldCoin, coinCounts[1]); + Item.NewItem(NPC.GetSource_Loot(), NPC.Hitbox, ItemID.SilverCoin, coinCounts[1]); if (coinCounts[2] > 0) - Item.NewItem(NPC.GetSource_Loot(), NPC.Hitbox, ItemID.SilverCoin, coinCounts[2]); + Item.NewItem(NPC.GetSource_Loot(), NPC.Hitbox, ItemID.GoldCoin, coinCounts[2]); if (coinCounts[3] > 0) - Item.NewItem(NPC.GetSource_Loot(), NPC.Hitbox, ItemID.CopperCoin, coinCounts[3]); + Item.NewItem(NPC.GetSource_Loot(), NPC.Hitbox, ItemID.PlatinumCoin, coinCounts[3]); CalamityWorld.MoneyStolenByBandit = 0; NPC goblinFucker = Main.npc[goblinIndex]; From 69640c56cfe331e652a81a0375956d1b36d83627 Mon Sep 17 00:00:00 2001 From: Dominic Date: Tue, 14 Jun 2022 18:35:57 -0500 Subject: [PATCH 2/5] Fix shovel interactions with some Cal tiles --- Tiles/Astral/AstralDirt.cs | 1 + Tiles/AstralDesert/AstralSand.cs | 1 + Tiles/SunkenSea/EutrophicSand.cs | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Tiles/Astral/AstralDirt.cs b/Tiles/Astral/AstralDirt.cs index 4052b2fd8a..2b6924b20f 100644 --- a/Tiles/Astral/AstralDirt.cs +++ b/Tiles/Astral/AstralDirt.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Tiles.Astral AddMapEntry(new Color(65, 56, 83)); TileID.Sets.ChecksForMerge[Type] = true; + TileID.Sets.CanBeDugByShovel[Type] = true; TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; } diff --git a/Tiles/AstralDesert/AstralSand.cs b/Tiles/AstralDesert/AstralSand.cs index 5f2f0d9087..05c5dcbd81 100644 --- a/Tiles/AstralDesert/AstralSand.cs +++ b/Tiles/AstralDesert/AstralSand.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Tiles.AstralDesert AddMapEntry(new Color(187, 220, 237)); TileID.Sets.TouchDamageSands[Type] = 15; + TileID.Sets.CanBeDugByShovel[Type] = true; TileID.Sets.Conversion.Sand[Type] = true; TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true; TileID.Sets.Falling[Type] = true; diff --git a/Tiles/SunkenSea/EutrophicSand.cs b/Tiles/SunkenSea/EutrophicSand.cs index 95fc20c210..137ec91434 100644 --- a/Tiles/SunkenSea/EutrophicSand.cs +++ b/Tiles/SunkenSea/EutrophicSand.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -16,6 +16,8 @@ namespace CalamityMod.Tiles.SunkenSea CalamityUtils.MergeWithDesert(Type); TileID.Sets.ChecksForMerge[Type] = true; + TileID.Sets.CanBeDugByShovel[Type] = true; + DustType = 108; ItemDrop = ModContent.ItemType(); ModTranslation name = CreateMapEntryName(); From 0a9f7759a62342c5eea38bc14c8ddb8d2af93e0b Mon Sep 17 00:00:00 2001 From: Dominic Date: Tue, 14 Jun 2022 18:41:44 -0500 Subject: [PATCH 3/5] Fix bloodworms spawning pre-ML --- NPCs/AcidRain/BloodwormNormal.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/AcidRain/BloodwormNormal.cs b/NPCs/AcidRain/BloodwormNormal.cs index d60e0dd102..f8cdd80779 100644 --- a/NPCs/AcidRain/BloodwormNormal.cs +++ b/NPCs/AcidRain/BloodwormNormal.cs @@ -113,7 +113,7 @@ namespace CalamityMod.NPCs.AcidRain public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (!spawnInfo.Player.Calamity().ZoneSulphur || AcidRainEvent.AcidRainEventIsOngoing) + if (!spawnInfo.Player.Calamity().ZoneSulphur || AcidRainEvent.AcidRainEventIsOngoing || !NPC.downedMoonlord) return 0f; // Increase bloodworm spawn rate relative to the number of existing bloodworms, parabolic multiplier ranging from 5x spawn rate with 0 blood worms to 1x with 5 or more From a6828d324b7dba36afbba45db546584c6fd26d1e Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Wed, 15 Jun 2022 01:47:27 +0200 Subject: [PATCH 4/5] Coral spout blinks --- Projectiles/Magic/CoralSpoutHoldout.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Projectiles/Magic/CoralSpoutHoldout.cs b/Projectiles/Magic/CoralSpoutHoldout.cs index b0475028b6..bc9bf3b141 100644 --- a/Projectiles/Magic/CoralSpoutHoldout.cs +++ b/Projectiles/Magic/CoralSpoutHoldout.cs @@ -85,13 +85,18 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { float angle = (Owner.Calamity().mouseWorld - Owner.MountedCenter).ToRotation(); + float blinkage = 0; + if (Charge >= MaxCharge * 1.5f) + { + blinkage = (float)Math.Sin(MathHelper.Clamp((Charge - MaxCharge * 1.5f) / 15f, 0, 1) * MathHelper.PiOver2 + MathHelper.PiOver2); + } Effect effect = Filters.Scene["SpreadTelegraph"].GetShader().Shader; effect.Parameters["centerOpacity"].SetValue(0.7f); effect.Parameters["mainOpacity"].SetValue((float)Math.Sqrt(ChargeProgress)); effect.Parameters["halfSpreadAngle"].SetValue(Spread / 2f); - effect.Parameters["edgeColor"].SetValue(Color.DeepSkyBlue.ToVector3()); - effect.Parameters["centerColor"].SetValue(Color.DodgerBlue.ToVector3()); + effect.Parameters["edgeColor"].SetValue(Color.Lerp(Color.DeepSkyBlue, Color.Coral, blinkage ).ToVector3()); + effect.Parameters["centerColor"].SetValue(Color.Lerp(Color.DodgerBlue, Color.Coral, blinkage).ToVector3()); effect.Parameters["edgeBlendLenght"].SetValue(0.07f); effect.Parameters["edgeBlendStrength"].SetValue(8f); From 05b9ebc3ca55d5890c6e1b7993cd9f3ce98b2ee0 Mon Sep 17 00:00:00 2001 From: Dominic Date: Tue, 14 Jun 2022 18:48:16 -0500 Subject: [PATCH 5/5] Fix Cosmic Elemental drops --- NPCs/NormalNPCs/CosmicElemental.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NPCs/NormalNPCs/CosmicElemental.cs b/NPCs/NormalNPCs/CosmicElemental.cs index 18530ba8c8..e2551f55e1 100644 --- a/NPCs/NormalNPCs/CosmicElemental.cs +++ b/NPCs/NormalNPCs/CosmicElemental.cs @@ -115,10 +115,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(ItemDropRule.Common(ItemID.BoneSword, 20).OnFailedRoll( - ItemDropRule.Common(ItemID.Starfury, 50)).OnFailedRoll( - ItemDropRule.Common(ItemID.EnchantedSword, 50)).OnFailedRoll( - ItemDropRule.Common(ItemID.Terragrim, 100))); + npcLoot.Add(ItemID.BoneSword, 20); + npcLoot.Add(ItemID.Starfury, 50); + npcLoot.Add(ItemID.EnchantedSword, 50); + npcLoot.Add(ItemID.Terragrim, 100); } } }