From 08e8bd60c12ba22f0e16cc17a3de54e08935948e Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 4 Mar 2026 16:32:44 -0500 Subject: [PATCH 01/58] Add name Jerry Atric to Tax Collector --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 30f02069d7..ed1082e5bc 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -281,6 +281,7 @@ namespace CalamityMod.NPCs "Emmett", "Bagman", // <@!701831892990820383> (supportcrispy) "Old Man Scrooge", // <@!1392141158255427655> (vortexgaming18) + "Jerry Atric", // <@!181545975901454337> (halleyvetica) ]; private static readonly string[] TravelingMerchantNames = [ From bd7a5021591a382d59bfa0d7fd8f28084051e980 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 5 Mar 2026 12:22:10 -0500 Subject: [PATCH 02/58] Add Bone Cold Steve Austin to Skeleton Merchant --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index ed1082e5bc..35fb073d41 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -247,6 +247,7 @@ namespace CalamityMod.NPCs "Papyrus Undertale", // <@!262663471189983242> (nycro) "Mr. Bones", // <@!359215912856977408> (jaybones.) "Freakbob", // <@!377863128140087296> (jevilamv) + "Bone Cold Steve Austin", // <@!282704860992897024> (raendrag_of_rovan) ]; private static readonly string[] SteampunkerNames = [ From 00c26a8d26ae780f65621cbe1d9bcb18c80dea03 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 5 Mar 2026 12:23:07 -0500 Subject: [PATCH 03/58] Add Tikoh to Nurse --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 35fb073d41..3bfe4d871d 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -200,6 +200,7 @@ namespace CalamityMod.NPCs "Fanny", // <@!799749125720637460> (zombiewolf511) "Mausi", // <@!194156349347594241> (sadouken) "Fiona", // <@!475216964168450048> (thatgayguy69) + "Tikoh", // <@!618149904224616458> (r.fractal) ]; private static readonly string[] PainterNames = [ From 5f803060e8e137d02a80353c2c5cc32c2bdb7666 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 6 Mar 2026 13:46:12 -0500 Subject: [PATCH 04/58] Replace Hamis the Stylist with Summer the Zoologist --- NPCs/CalamityGlobalTownNPC.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 3bfe4d871d..04cbd65cd9 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -267,7 +267,6 @@ namespace CalamityMod.NPCs "Faith", // <@!509050283871961123> (toasty1007) "Xsiana", // <@!625780237489143839> (lokistic) "Lain", // <@!655201622863118337> (literallyadeerfr) - "Hamis", // <@!608455754093035521> (haefer) "Brio Scarlet", // <@!358576903701004289> (brio_scarlet) "Vanessa", // <@!638901548591611945> (mediocreking) ]; @@ -333,6 +332,7 @@ namespace CalamityMod.NPCs "Gwenhwyvar", // <@!291342874497515531> (diamondnife) "Daxie", // <@!465438861103988737> (daxie626) "Zora", // <@!752687500656640030> (oxytoxy365) + "Summer", // <@!608455754093035521> (haefer) ]; // Town Slimes private static readonly string[] ClumsySlimeNames = null; From 9f9de8e2649c00ead922224b208001cec307deef Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 7 Mar 2026 11:56:09 -0500 Subject: [PATCH 05/58] Add Reyloth Grey to Wizard --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 04cbd65cd9..852819744e 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -322,6 +322,7 @@ namespace CalamityMod.NPCs "Mike Cyclops", // <@!702327497475227741> (seichoseicho) "Derin", // <@!466703979695308820> (god_15) "Umbara", // <@!450062421294579712> (umbaraeclipse) + "Reyloth Grey", // <@!255043013116428298> (pantyslack) ]; private static readonly string[] ZoologistNames = [ From 19c19942624720226d52560381602c1a7e50aeb8 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 8 Mar 2026 11:59:18 -0400 Subject: [PATCH 06/58] Add Them Bones to Skeleton Merchant --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 852819744e..44c06bdf20 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -249,6 +249,7 @@ namespace CalamityMod.NPCs "Mr. Bones", // <@!359215912856977408> (jaybones.) "Freakbob", // <@!377863128140087296> (jevilamv) "Bone Cold Steve Austin", // <@!282704860992897024> (raendrag_of_rovan) + "Them Bones", // <@!322208584534589450> (dogvtf) ]; private static readonly string[] SteampunkerNames = [ From 88c59f2a5fbdb4926be8f55dc81260e9c96ffcab Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 9 Mar 2026 20:18:17 -0400 Subject: [PATCH 07/58] Add Quest Boy to Angler --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 44c06bdf20..01b7d37082 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -96,6 +96,7 @@ namespace CalamityMod.NPCs "Johnny Test", // <@!589966747977777197> (konorango) "Bling Bling Boy", // <@!522970788203069442> (phallguy) "RICE", // <@!400107830889152524> (rice_xd.) + "Quest Boy", // <@!770103186093637663> (justanothersoldiermain) ]; private static readonly string[] ArmsDealerNames = [ From 4fcb5aee79af94d9c807f3bf1d694bd271933d18 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 10 Mar 2026 16:47:46 -0400 Subject: [PATCH 08/58] Add Zera to Steampunker --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 01b7d37082..b288a77832 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -262,6 +262,7 @@ namespace CalamityMod.NPCs "Kreutz", // <@!553445849149997056> (red_r_kreutz) "Cathlyn", // <@!156672312425316352> (xaqult) "Eunice", // <@!358376627400605699> (srmg267) + "Zera", // <@!543914166969172106> (zer0_0_0_0) ]; private static readonly string[] StylistNames = [ From 388b2c7870003cc6fd875e41c611d5cbf2aa3472 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 10 Mar 2026 21:36:35 -0400 Subject: [PATCH 09/58] Add Deep-Vein Thrombonesis to Skeleton Merchant --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index b288a77832..f27e85c775 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -251,6 +251,7 @@ namespace CalamityMod.NPCs "Freakbob", // <@!377863128140087296> (jevilamv) "Bone Cold Steve Austin", // <@!282704860992897024> (raendrag_of_rovan) "Them Bones", // <@!322208584534589450> (dogvtf) + "Deep-Vein Thrombonesis", // <@!557473830457704458> (thessyll) ]; private static readonly string[] SteampunkerNames = [ From 6246b61f4ba4ac5f0b79f710bc0ddb5e8a1476f6 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 13 Mar 2026 17:09:54 -0400 Subject: [PATCH 10/58] Add Which Doctor to Witch Doctor (yes, really) --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index f27e85c775..53f1147bca 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -312,6 +312,7 @@ namespace CalamityMod.NPCs "Amnesia Wapers", // <@!326821498323075073> (retardedadvicefromaretard) "Tequila", // <@!889175547744239677> (thecrispistofnuggets) "Bee Movie Script", // <@!407949998173454341> (literally_jesuschrist) + "Which Doctor", // <@!746103484017016832> (sepulchre0001) ]; private static readonly string[] WizardNames = [ From 241cd4c4c68fba9b3c78e5ab38db3a5df7e314e4 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 13 Mar 2026 22:29:00 -0400 Subject: [PATCH 11/58] Add Potential Man to Goblin Tinkerer --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 53f1147bca..ab12161dc3 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -156,6 +156,7 @@ namespace CalamityMod.NPCs "Bars Boldia", // <@!332989575708540939> (careless_imp) "Basel Raiden John Clive Fantasy 16", // <@!529392083136413696> (raiden_ii) "Gobby, Destroyer of Wallets", // <@!429024941296582658> (bwlstorm) + "Potential Man", // <@!320787277007552512> (veruze) ]; private static readonly string[] GolferNames = null; private static readonly string[] GuideNames = From 07b7a3e8cf240adf3bf06c652664a18e062d9f42 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 13 Mar 2026 23:21:36 -0400 Subject: [PATCH 12/58] Add Rocco to Town Dog (Husky) --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index ab12161dc3..bd8db78a98 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -394,6 +394,7 @@ namespace CalamityMod.NPCs [ "Yoshi", // <@!541127291426832384> (gregthespinarak) "Franklin", // <@!338315261352476682> (tyeski) + "Rocco", // <@!682411821067796480> (little_one777) ]; private const int TownCatSiameseVanillaNames = 12; From dd2c677feef7c80e122c7b96d7551bc7f695b2d9 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 20 Mar 2026 13:40:53 -0400 Subject: [PATCH 13/58] Add Melanie to Stylist --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index bd8db78a98..900a28df93 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -274,6 +274,7 @@ namespace CalamityMod.NPCs "Lain", // <@!655201622863118337> (literallyadeerfr) "Brio Scarlet", // <@!358576903701004289> (brio_scarlet) "Vanessa", // <@!638901548591611945> (mediocreking) + "Melanie", // <@!356115964800139267> (schwarzerhumor) ]; private static readonly string[] TavernkeepNames = [ From 51f23a406174fc47087bbedb39bcc2feb4acd501 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 21 Mar 2026 00:49:27 -0400 Subject: [PATCH 14/58] Add Shmizzle Dizzle to Party Girl --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 900a28df93..41f556e6ee 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -214,6 +214,7 @@ namespace CalamityMod.NPCs "Arin", // <@!268169458302976012> (kiyotu) "Typhäne", // <@!222064016107896832> (typhane.) "Charlotte Linlin", // <@!563406464522125323> (vixcalibur) + "Shmizzle Dizzle", // <@!1070551501283528724> (shmizzledizzle) ]; private static readonly string[] PirateNames = [ From 4949233d20b0e08fc12b394eee4152bc485cb77f Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 21 Mar 2026 15:35:36 -0400 Subject: [PATCH 15/58] Add Kreska to Town Cat --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 41f556e6ee..e0c004de90 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -413,6 +413,7 @@ namespace CalamityMod.NPCs "Lucerne", // <@!271954788676141066> (lord_lucerne) "Milo", // <@!401849201597874179> (maskedmilo) "Octo", // <@!796112889353994281> (octolinggrimm) + "Kreska", // <@!130037366852157440> (nuclearnecro) ]; private static readonly string[] TownCatSiameseNames = [ From 1f714af86b7877705a1a7dbd4adabd17fbe1cca5 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 21 Mar 2026 18:06:09 -0400 Subject: [PATCH 16/58] Add Foxy to Zoologist (yes, really) --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index e0c004de90..2e60089ceb 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -342,6 +342,7 @@ namespace CalamityMod.NPCs "Daxie", // <@!465438861103988737> (daxie626) "Zora", // <@!752687500656640030> (oxytoxy365) "Summer", // <@!608455754093035521> (haefer) + "Foxy", // <@!602954046332207164> (squid_san) ]; // Town Slimes private static readonly string[] ClumsySlimeNames = null; From fb1611bcbc1a88ebc5048c23b3148595350e7487 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 23 Mar 2026 21:45:57 -0400 Subject: [PATCH 17/58] Add Yuhru to Bandit --- NPCs/TownNPCs/Bandit.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/TownNPCs/Bandit.cs b/NPCs/TownNPCs/Bandit.cs index 8f4766b4cc..0462cfc3a2 100644 --- a/NPCs/TownNPCs/Bandit.cs +++ b/NPCs/TownNPCs/Bandit.cs @@ -121,6 +121,7 @@ namespace CalamityMod.NPCs.TownNPCs "Ariallis", // <@!518231218806980609> (ariallis) "Shade", // <@!613133259563466755> (shade__storm) "Orion", // <@!119164557657636865> (canacx) + "Yuhru", // <@!194276252452913154> (yuhru_) // Original names this.GetLocalizedValue("Name.Laura"), From 3dc38efb2a07b55e4dbc36f121ccc0e054bcdc19 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 30 Mar 2026 16:32:11 -0400 Subject: [PATCH 18/58] Add ImaShoe to Guide --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 2e60089ceb..aa01b9c42c 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -180,6 +180,7 @@ namespace CalamityMod.NPCs "Wamy", // Fab added this name with no Discord ID. May be a donor who has no Discord account. "Baggute", // <@!535140564174110720> (thebaggutegamer) "Jacob Bryson", // <@!879794107218817026> (.melongun) + "ImaShoe", // <@!926957605056819261> (imashoe.) ]; private static readonly string[] MechanicNames = [ From dcec20425f130cc3da00cf3b0dc8c8cc341c4ba7 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 31 Mar 2026 14:09:12 -0400 Subject: [PATCH 19/58] Add Vivienne to Nurse --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index aa01b9c42c..7f3337d83c 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -204,6 +204,7 @@ namespace CalamityMod.NPCs "Mausi", // <@!194156349347594241> (sadouken) "Fiona", // <@!475216964168450048> (thatgayguy69) "Tikoh", // <@!618149904224616458> (r.fractal) + "Vivienne", // <@!1043188879185952848> (thanat.oshi) ]; private static readonly string[] PainterNames = [ From 82de8274562be647f435572f24d74d3b15927dcf Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 6 Apr 2026 13:15:18 -0400 Subject: [PATCH 20/58] Add Koral to Traveling Merchant --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 7f3337d83c..fbb20a2fa5 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -301,6 +301,7 @@ namespace CalamityMod.NPCs "Postman Hiss", // <@!454638106122125312> (karinthefairy) "Cosmoec", // <@!793660591449309204> (cosmoecark) "Junorism", // <@!740625002596008036> (hewhoshallnotbebaned) + "Koral", // <@!1354908256681590845> (koral12244_) ]; private static readonly string[] TruffleNames = [ From f3cd51144c341a5281f95a9fd3ffdd46c2f70bb2 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 7 Apr 2026 13:53:25 -0400 Subject: [PATCH 21/58] Add Melody to all Town Dogs --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index fbb20a2fa5..110c2e5985 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -376,6 +376,7 @@ namespace CalamityMod.NPCs "Ozymandias", // <@!146333264871686145> (ozzatron) "Miss Throws a Lot", // <@!799345607847182400> (oakhamsam) "Brikwilla", // <@!543803736909414438> (lavendercobra) + "Melody", // <@!1030635650963214446> (weisslerren) ]; private static readonly string[] TownDogLabradorNames = [ From f7aa2e88aab6b957749dae541e18e3654c8319fe Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 7 Apr 2026 17:33:56 -0400 Subject: [PATCH 22/58] Add Donny G to Goblin Tinkerer --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 110c2e5985..ebb39fece5 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -157,6 +157,7 @@ namespace CalamityMod.NPCs "Basel Raiden John Clive Fantasy 16", // <@!529392083136413696> (raiden_ii) "Gobby, Destroyer of Wallets", // <@!429024941296582658> (bwlstorm) "Potential Man", // <@!320787277007552512> (veruze) + "Donny G", // <@!308736236523225088> (donnyg66) ]; private static readonly string[] GolferNames = null; private static readonly string[] GuideNames = From 44992d31d85cff13075a92a39f8b8bcce393e77c Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 10 Apr 2026 18:58:15 -0400 Subject: [PATCH 23/58] Swap Dorkyy for Clothier with Mack for Town Dog Pitbull --- NPCs/CalamityGlobalTownNPC.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index ebb39fece5..92742fdee4 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -116,7 +116,6 @@ namespace CalamityMod.NPCs "Storm Havik", // <@!1013452363178197072> (fishnotduck) "Magorfis Splunt the Greater Finklejim", // <@!147490809334333440> (eidolbyssus) "Perrin", // <@!253764551139393537> (easyperrin) - "Dorkyy", // <@!427765391662514185> (dorkblaze01) ]; private static readonly string[] CyborgNames = [ @@ -388,6 +387,7 @@ namespace CalamityMod.NPCs private static readonly string[] TownDogPitBullNames = [ "Splinter", // <@!320320801213775873> (kaimonick) + "Mack", // <@!427765391662514185> (dorkblaze01) ]; private static readonly string[] TownDogBeagleNames = [ From 065f19c0cb4f55f249236cbcc256818b69427fa4 Mon Sep 17 00:00:00 2001 From: Big E Date: Wed, 22 Apr 2026 11:00:48 -0400 Subject: [PATCH 24/58] + Salesman Start --- NPCs/TownNPCs/ShadySalesman.cs | 314 +++++++++++++++++++++++++++++++++ 1 file changed, 314 insertions(+) create mode 100644 NPCs/TownNPCs/ShadySalesman.cs diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs new file mode 100644 index 0000000000..0f71ddf93b --- /dev/null +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -0,0 +1,314 @@ +using System; +using System.Collections.Generic; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Potions.Food; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Prefixes; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Chat; +using Terraria.GameContent.Bestiary; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.NPCs.TownNPCs +{ + public class ShadySalesman : ModNPC + { + public override string Texture => "CalamityMod/NPCs/NormalNPCs/Piggy"; + + public override void SetStaticDefaults() + { + Main.npcFrameCount[Type] = 5; + NPCID.Sets.ShimmerTownTransform[Type] = false; + NPCID.Sets.NoTownNPCHappiness[Type] = true; + NPCID.Sets.NPCBestiaryDrawModifiers drawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers() + { + Velocity = 1f // Draws the NPC in the bestiary as if its walking +1 tiles in the x direction + }; + NPCID.Sets.NPCBestiaryDrawOffset.Add(NPC.type, drawModifiers); + } + + public override void SetDefaults() + { + NPC.townNPC = true; + NPC.friendly = true; + NPC.lavaImmune = false; + NPC.width = 26; + NPC.height = 26; + NPC.aiStyle = NPCAIStyleID.Passive; + NPC.damage = 10; + NPC.defense = 15; + NPC.lifeMax = 2000; + NPC.HitSound = SoundID.NPCHit1; + NPC.DeathSound = SoundID.NPCDeath1; + NPC.knockBackResist = 0.99f; + NPC.Calamity().VulnerableToCold = true; + NPC.Calamity().VulnerableToHeat = true; + NPC.Calamity().VulnerableToSickness = true; + } + + public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) + { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Desert, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.ShadySalesman") + }); + } + + public override List SetNPCNameList() => new List() + { + "Herbert" + }; + + public override bool PreAI() + { + if (Main.dayTime && !IsNpcOnscreen(NPC.Center)) + { + if (Main.netMode == NetmodeID.SinglePlayer) + Main.NewText(Language.GetTextValue("LegacyMisc.35", NPC.FullName), 50, 125, 255); + else + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("LegacyMisc.35", NPC.GetFullNetName()), new Color(50, 125, 255)); + NPC.active = false; + NPC.netSkip = -1; + return false; + } + + return true; + } + + public override void AI() + { + NPC.homeless = true; + } + + private static bool IsNpcOnscreen(Vector2 center) + { + int w = NPC.sWidth + NPC.safeRangeX * 2; + int h = NPC.sHeight + NPC.safeRangeY * 2; + Rectangle npcScreenRect = new Rectangle((int)center.X - w / 2, (int)center.Y - h / 2, w, h); + foreach (Player player in Main.ActivePlayers) + if (player.getRect().Intersects(npcScreenRect)) + return true; + return false; + } + + public override string GetChat() + { + return "Ooooo, you want my wares dontcha? Yeah, yeah you do."; + } + + public override void OnChatButtonClicked(bool firstButton, ref string shopName) + { + if (firstButton) + { + shopName = "Shop"; + } + else + { + Main.npcChatText = "A donation? How generous!"; + } + } + + public override void AddShops() + { + + NPCShop shop = new(Type); + shop.Add() + .Add(ItemID.Bacon) + .Add(Condition.DownedMechBossAll) + .Add(CalamityConditions.DownedCalamitasClone) + .Register(); + } + + public override void FindFrame(int frameHeight) + { + if (NPC.velocity.Y == 0f) + { + if (!NPC.IsABestiaryIconDummy) + { + if (NPC.direction == 1) + { + NPC.spriteDirection = -1; + } + if (NPC.direction == -1) + { + NPC.spriteDirection = 1; + } + + if (NPC.velocity.X == 0f) + { + NPC.frame.Y = 0; + NPC.frameCounter = 0.0; + return; + } + } + NPC.frameCounter += NPC.IsABestiaryIconDummy ? 0.6f : Math.Abs(NPC.velocity.X) * 0.25f; + NPC.frameCounter += 1.0; + if (NPC.frameCounter > 12.0) + { + NPC.frame.Y = NPC.frame.Y + frameHeight; + NPC.frameCounter = 0.0; + } + if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[Type] - 1) + { + NPC.frame.Y = frameHeight; + } + } + else + { + NPC.frameCounter = 0.0; + NPC.frame.Y = frameHeight * 2; + } + } + + //Pulled and modified from Vanilla, originally is used to spawn the Travelling Merchant + internal static void SpawnTravelNPC(int npcToSpawnNextTo) + { + int bestX = Main.npc[npcToSpawnNextTo].homeTileX; + int bestY = Main.npc[npcToSpawnNextTo].homeTileY; + int minValue = bestX; + int num3 = bestX; + int num4 = bestY; + int num5 = bestX; + while (num5 > bestX - 10 && (WorldGen.SolidTile(num5, num4) || Main.tileSolidTop[Main.tile[num5, num4].TileType]) && (!Main.tile[num5, num4 - 1].IsTileSolid() || !Main.tileSolid[Main.tile[num5, num4 - 1].TileType] || Main.tileSolidTop[Main.tile[num5, num4 - 1].TileType]) && (!Main.tile[num5, num4 - 2].IsTileSolid() || !Main.tileSolid[Main.tile[num5, num4 - 2].TileType] || Main.tileSolidTop[Main.tile[num5, num4 - 2].TileType]) && (!Main.tile[num5, num4 - 3].IsTileSolid() || !Main.tileSolid[Main.tile[num5, num4 - 3].TileType] || Main.tileSolidTop[Main.tile[num5, num4 - 3].TileType])) + { + minValue = num5; + num5--; + } + for (int k = bestX; k < bestX + 10 && (WorldGen.SolidTile(k, num4) || Main.tileSolidTop[Main.tile[k, num4].TileType]) && (!Main.tile[k, num4 - 1].IsTileSolid() || !Main.tileSolid[Main.tile[k, num4 - 1].TileType] || Main.tileSolidTop[Main.tile[k, num4 - 1].TileType]) && (!Main.tile[k, num4 - 2].IsTileSolid() || !Main.tileSolid[Main.tile[k, num4 - 2].TileType] || Main.tileSolidTop[Main.tile[k, num4 - 2].TileType]) && (!Main.tile[k, num4 - 3].IsTileSolid() || !Main.tileSolid[Main.tile[k, num4 - 3].TileType] || Main.tileSolidTop[Main.tile[k, num4 - 3].TileType]); k++) + { + num3 = k; + } + for (int l = 0; l < 30; l++) + { + int num6 = Main.rand.Next(minValue, num3 + 1); + if (l < 20) + { + if (num6 < bestX - 1 || num6 > bestX + 1) + { + bestX = num6; + break; + } + } + else if (num6 != bestX) + { + bestX = num6; + break; + } + } + int num7 = bestX; + int num8 = bestY; + bool flag = false; + if (!flag && !((double)num8 > Main.worldSurface)) + { + for (int m = 20; m < 500; m++) + { + for (int n = 0; n < 2; n++) + { + num7 = ((n != 0) ? (bestX - m * 2) : (bestX + m * 2)); + if (num7 > 10 && num7 < Main.maxTilesX - 10) + { + int num9 = bestY - m; + double num10 = bestY + m; + if (num9 < 10) + { + num9 = 10; + } + if (num10 > Main.worldSurface) + { + num10 = Main.worldSurface; + } + for (int num11 = num9; (double)num11 < num10; num11++) + { + num8 = num11; + if (!Main.tile[num7, num8].IsTileSolid() || !Main.tileSolid[Main.tile[num7, num8].TileType]) + { + continue; + } + if (Main.tile[num7, num8 - 3].LiquidType != LiquidID.Water || Main.tile[num7, num8 - 2].LiquidType != LiquidID.Water || Main.tile[num7, num8 - 1].LiquidType != LiquidID.Water || Collision.SolidTiles(num7 - 1, num7 + 1, num8 - 3, num8 - 1)) + { + break; + } + flag = true; + Rectangle value = new Rectangle(num7 * 16 + 8 - NPC.sWidth / 2 - NPC.safeRangeX, num8 * 16 + 8 - NPC.sHeight / 2 - NPC.safeRangeY, NPC.sWidth + NPC.safeRangeX * 2, NPC.sHeight + NPC.safeRangeY * 2); + for (int num12 = 0; num12 < 255; num12++) + { + if (Main.player[num12].active && new Rectangle((int)Main.player[num12].position.X, (int)Main.player[num12].position.Y, Main.player[num12].width, Main.player[num12].height).Intersects(value)) + { + flag = false; + break; + } + } + break; + } + } + if (flag) + { + break; + } + } + if (flag) + { + break; + } + } + } + int myIndex = NPC.NewNPC(NPC.GetSpawnSourceForTownSpawn(), num7 * 16, num8 * 16, ModContent.NPCType(), 1); + Main.npc[myIndex].homeTileX = bestX; + Main.npc[myIndex].homeTileY = bestY; + Main.npc[myIndex].homeless = true; + if (num7 < bestX) + { + Main.npc[myIndex].direction = 1; + } + else if (num7 > bestX) + { + Main.npc[myIndex].direction = -1; + } + Main.npc[myIndex].netUpdate = true; + string fullName = Main.npc[myIndex].FullName; + if (Main.netMode == NetmodeID.SinglePlayer) + { + Main.NewText(Language.GetTextValue("Announcement.HasArrived", fullName), 50, 125); + } + else if (Main.netMode == NetmodeID.Server) + { + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasArrived", Main.npc[myIndex].GetFullNetName()), new Color(50, 125, 255)); + } + } + } + + public class ShadySalesmanSpawnSystem : ModSystem + { + public override void PreUpdateWorld() + { + if (Main.eclipse || Main.dayTime || (Main.invasionType > 0 && Main.invasionDelay == 0 && Main.invasionSize > 0)) + { + return; + } + for (int i = 0; i < 200; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + { + return; + } + } + + List townNPCs = []; + for (int j = 0; j < 200; j++) + { + if (Main.npc[j].active && Main.npc[j].townNPC && Main.npc[j].type != NPCID.OldMan && !Main.npc[j].homeless) + { + townNPCs.Add(j); + } + } + if (townNPCs.Count == 0) + return; + + ShadySalesman.SpawnTravelNPC(townNPCs[Main.rand.Next(townNPCs.Count)]); + } + } +} From 3355fdcdc1c276d6e04c033f5552b4c132a0c00b Mon Sep 17 00:00:00 2001 From: Big E Date: Wed, 22 Apr 2026 12:48:57 -0400 Subject: [PATCH 25/58] + Proper Spawning + Buttons --- .../en-US/Mods.CalamityMod.NPCs.hjson | 1 + NPCs/TownNPCs/ShadySalesman.cs | 33 +++++++++++++------ 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index ac7691f508..17d46244ea 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -567,3 +567,4 @@ Shoreskipper.DisplayName: Shoreskipper BrainIllusion.DisplayName: Brain Illusion FalseBrain.DisplayName: False Brain BloodBomb.DisplayName: Blood Bomb +ShadySalesman.DisplayName: Shady Salesman diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 0f71ddf93b..051006cecc 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -100,6 +100,12 @@ namespace CalamityMod.NPCs.TownNPCs return "Ooooo, you want my wares dontcha? Yeah, yeah you do."; } + public override void SetChatButtons(ref string button, ref string button2) + { + button = Language.GetTextValue("LegacyInterface.28"); + //button2 = this.GetLocalizedValue("RefundButton"); ; + } + public override void OnChatButtonClicked(bool firstButton, ref string shopName) { if (firstButton) @@ -283,32 +289,39 @@ namespace CalamityMod.NPCs.TownNPCs public class ShadySalesmanSpawnSystem : ModSystem { + private static bool CanSpawnTonight = true; + public override void PreUpdateWorld() { - if (Main.eclipse || Main.dayTime || (Main.invasionType > 0 && Main.invasionDelay == 0 && Main.invasionSize > 0)) + if(Main.dayTime) { + CanSpawnTonight = true; return; } + + if (Main.eclipse || (Main.invasionType > 0 && Main.invasionDelay == 0 && Main.invasionSize > 0)) + return; + for (int i = 0; i < 200; i++) - { if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { return; - } - } List townNPCs = []; for (int j = 0; j < 200; j++) - { if (Main.npc[j].active && Main.npc[j].townNPC && Main.npc[j].type != NPCID.OldMan && !Main.npc[j].homeless) - { townNPCs.Add(j); - } - } - if (townNPCs.Count == 0) + + if (townNPCs.Count <= 1) return; + if(!Main.rand.NextBool(4)) + { + CanSpawnTonight = false; + return; + } + ShadySalesman.SpawnTravelNPC(townNPCs[Main.rand.Next(townNPCs.Count)]); + CanSpawnTonight = false; } } } From f3658cef43debf1de9218707aed5e5ddf25fa7a6 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 22 Apr 2026 15:38:04 -0400 Subject: [PATCH 26/58] Add Hunk to Cyborg --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 92742fdee4..90d053cd34 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -122,6 +122,7 @@ namespace CalamityMod.NPCs "Sylux", // <@!331812782183809025> (gonkachino) "Nemesis", // <@!1104036024063107082> (yashimayamanata) "Univerze", // <@!1256376346536448150> (unizumi02) + "Hunk", // <@!447597886260248578> (bagel_san) ]; private static readonly string[] DemolitionistNames = [ From 908e303570ffc1143a948ce7d8406b9fbd01afb4 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 22 Apr 2026 15:39:17 -0400 Subject: [PATCH 27/58] Add Rise Kujikawa to Diva Slime --- NPCs/CalamityGlobalTownNPC.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 90d053cd34..f681bbea6d 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -351,7 +351,10 @@ namespace CalamityMod.NPCs // Town Slimes private static readonly string[] ClumsySlimeNames = null; private static readonly string[] CoolSlimeNames = null; - private static readonly string[] DivaSlimeNames = null; + private static readonly string[] DivaSlimeNames = + [ + "Rise Kujikawa", // <@!630100236689342475> (roald27) + ]; private static readonly string[] ElderSlimeNames = null; private static readonly string[] MysticSlimeNames = null; private static readonly string[] NerdySlimeNames = From 6fcbea4fc11c692533a7b78f5781e87671e0b785 Mon Sep 17 00:00:00 2001 From: Big E Date: Fri, 24 Apr 2026 13:56:26 -0400 Subject: [PATCH 28/58] + Town Piggy Obtainment and Shady Salesman transforming --- ...ods.CalamityMod.Items.Weapons.Summon.hjson | 35 ++-------- NPCs/TownNPCs/ShadySalesman.cs | 66 ++++++++++++++----- 2 files changed, 55 insertions(+), 46 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index ff140ef3a8..a3f4cfa7b6 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -223,10 +223,7 @@ CosmicViperEngine: { Cosmilamp: { DisplayName: Cosmilamp - Tooltip: - ''' - Summons a cosmic lantern above your head to fight for you - ''' + Tooltip: Summons a cosmic lantern above your head to fight for you } CrimslimeStaff: { @@ -352,10 +349,7 @@ EndoHydraStaff: { EntropysVigil: { DisplayName: Entropy's Vigil - Tooltip: - ''' - Summons a mini Calamitas Clone and her brothers to protect you - ''' + Tooltip: Summons a mini Calamitas Clone and her brothers to protect you } EtherealSubjugator: { @@ -394,10 +388,7 @@ FleshOfInfidelity: { FlowersOfMortality: { DisplayName: Flowers of Mortality - Tooltip: - ''' - Summons five rainbow flowers over your head that inflict [cbuff:CalamityMod/ElementalMix] - ''' + Tooltip: Summons five rainbow flowers over your head that inflict [cbuff:CalamityMod/ElementalMix] } ForgottenApexWand: { @@ -695,10 +686,7 @@ SeashineHilt: { ShellfishStaff: { DisplayName: Shellfish Staff - Tooltip: - ''' - Summons a shellfish to latch onto enemies and inflict [cbuff:CalamityMod/ShellfishClaps] - ''' + Tooltip: Summons a shellfish to latch onto enemies and inflict [cbuff:CalamityMod/ShellfishClaps] } Sirius: { @@ -901,18 +889,12 @@ VoidEaterMarionette: { WarloksMoonFist: { DisplayName: Warloks' Moon Fist - Tooltip: - ''' - Summons a celestial fist to punch enemies for you - ''' + Tooltip: Summons a celestial fist to punch enemies for you } WitherBlossomsStaff: { DisplayName: Wither Blossoms Staff - Tooltip: - ''' - Summons four decaying [cbuff:CalamityMod/Plague] flowers over your head - ''' + Tooltip: Summons four decaying [cbuff:CalamityMod/Plague] flowers over your head } WulfrumController: { @@ -929,8 +911,5 @@ WulfrumController: { YharonsKindleStaff: { DisplayName: Yharon's Kindle Staff - Tooltip: - ''' - Summons a fiery draconid to fight for you - ''' + Tooltip: Summons a fiery draconid to fight for you } diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 051006cecc..b11767f6c0 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -1,9 +1,12 @@ using System; using System.Collections.Generic; using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables; using CalamityMod.Items.Potions.Food; +using CalamityMod.Items.SummonItems.TownPets; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Prefixes; +using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; using Terraria.Chat; @@ -17,6 +20,7 @@ namespace CalamityMod.NPCs.TownNPCs public class ShadySalesman : ModNPC { public override string Texture => "CalamityMod/NPCs/NormalNPCs/Piggy"; + public override string HeadTexture => "CalamityMod/NPCs/TownNPCs/TownPiggy_Head"; public override void SetStaticDefaults() { @@ -58,10 +62,7 @@ namespace CalamityMod.NPCs.TownNPCs }); } - public override List SetNPCNameList() => new List() - { - "Herbert" - }; + public override List SetNPCNameList() => ModContent.GetInstance().SetNPCNameList(); public override bool PreAI() { @@ -71,8 +72,18 @@ namespace CalamityMod.NPCs.TownNPCs Main.NewText(Language.GetTextValue("LegacyMisc.35", NPC.FullName), 50, 125, 255); else ChatHelper.BroadcastChatMessage(NetworkText.FromKey("LegacyMisc.35", NPC.GetFullNetName()), new Color(50, 125, 255)); - NPC.active = false; - NPC.netSkip = -1; + + if (CalamityWorld.unlockedTownPig) + { + string name = NPC.GivenName; + NPC.Transform(ModContent.NPCType()); + NPC.GivenName = name; + } + else + { + NPC.active = false; + NPC.netSkip = -1; + } return false; } @@ -103,7 +114,7 @@ namespace CalamityMod.NPCs.TownNPCs public override void SetChatButtons(ref string button, ref string button2) { button = Language.GetTextValue("LegacyInterface.28"); - //button2 = this.GetLocalizedValue("RefundButton"); ; + button2 = "Donation";// this.GetLocalizedValue("RefundButton"); ; } public override void OnChatButtonClicked(bool firstButton, ref string shopName) @@ -122,10 +133,8 @@ namespace CalamityMod.NPCs.TownNPCs { NPCShop shop = new(Type); - shop.Add() - .Add(ItemID.Bacon) - .Add(Condition.DownedMechBossAll) - .Add(CalamityConditions.DownedCalamitasClone) + shop.Add() + .Add() .Register(); } @@ -299,7 +308,7 @@ namespace CalamityMod.NPCs.TownNPCs return; } - if (Main.eclipse || (Main.invasionType > 0 && Main.invasionDelay == 0 && Main.invasionSize > 0)) + if (!CanSpawnTonight || Main.eclipse || (Main.invasionType > 0 && Main.invasionDelay == 0 && Main.invasionSize > 0)) return; for (int i = 0; i < 200; i++) @@ -307,12 +316,15 @@ namespace CalamityMod.NPCs.TownNPCs return; List townNPCs = []; - for (int j = 0; j < 200; j++) - if (Main.npc[j].active && Main.npc[j].townNPC && Main.npc[j].type != NPCID.OldMan && !Main.npc[j].homeless) - townNPCs.Add(j); + if (!NPC.AnyNPCs(ModContent.NPCType())) + { + for (int j = 0; j < 200; j++) + if (Main.npc[j].active && Main.npc[j].townNPC && Main.npc[j].type != NPCID.OldMan && !Main.npc[j].homeless) + townNPCs.Add(j); - if (townNPCs.Count <= 1) - return; + if (townNPCs.Count <= 1) + return; + } if(!Main.rand.NextBool(4)) { @@ -320,7 +332,25 @@ namespace CalamityMod.NPCs.TownNPCs return; } - ShadySalesman.SpawnTravelNPC(townNPCs[Main.rand.Next(townNPCs.Count)]); + int petPig = NPC.FindFirstNPC(ModContent.NPCType()); + if (petPig == -1) + ShadySalesman.SpawnTravelNPC(townNPCs[Main.rand.Next(townNPCs.Count)]); + else + { + string name = Main.npc[petPig].GivenName; + Main.npc[petPig].Transform(ModContent.NPCType()); + Main.npc[petPig].GivenName = name; + + string fullName = Main.npc[petPig].FullName; + if (Main.netMode == NetmodeID.SinglePlayer) + { + Main.NewText(Language.GetTextValue("Announcement.HasArrived", fullName), 50, 125); + } + else if (Main.netMode == NetmodeID.Server) + { + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasArrived", Main.npc[petPig].GetFullNetName()), new Color(50, 125, 255)); + } + } CanSpawnTonight = false; } } From 419a553a0d6e4bc9831937ed4e97ad83bbf5eb68 Mon Sep 17 00:00:00 2001 From: Big E Date: Sun, 26 Apr 2026 20:31:43 -0400 Subject: [PATCH 29/58] + New items just dropped --- NPCs/TownNPCs/ShadySalesman.cs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index b11767f6c0..e083af1a4e 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -2,8 +2,13 @@ using System.Collections.Generic; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; +using CalamityMod.Items.Placeables.Furniture; +using CalamityMod.Items.Potions; +using CalamityMod.Items.Potions.Alcohol; using CalamityMod.Items.Potions.Food; using CalamityMod.Items.SummonItems.TownPets; +using CalamityMod.Items.Tools; +using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Prefixes; using CalamityMod.World; @@ -134,7 +139,30 @@ namespace CalamityMod.NPCs.TownNPCs NPCShop shop = new(Type); shop.Add() + //.Add() Has PR + .Add() + .Add() + .Add() + .Add() + .Add() + .Add() + .Add() + //.Add() ??? + //.Add() Has PR + //.Add() Has PR + //.Add() ??? .Add() + .Add() + //.Add() Needs assets? + .Add() + .Add() + //.Add() Probably Scrapped? + //.Add() Probably Scrapped? + //.Add() Has PR + //.Add() Has Branch + //.Add() ??? + .Add(Condition.DownedGolem) + .Register(); } From 8c2e71f6b115a0d2a8b5b062fe55d9556889c390 Mon Sep 17 00:00:00 2001 From: Big E Date: Sun, 26 Apr 2026 20:32:44 -0400 Subject: [PATCH 30/58] + Removed fakers --- NPCs/TownNPCs/ShadySalesman.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index e083af1a4e..833d389c83 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -147,20 +147,16 @@ namespace CalamityMod.NPCs.TownNPCs .Add() .Add() .Add() - //.Add() ??? + //.Add() WIP //.Add() Has PR //.Add() Has PR - //.Add() ??? .Add() .Add() - //.Add() Needs assets? + //.Add() WIP .Add() .Add() - //.Add() Probably Scrapped? - //.Add() Probably Scrapped? //.Add() Has PR - //.Add() Has Branch - //.Add() ??? + //.Add() WIP .Add(Condition.DownedGolem) .Register(); From e46fc64c421780afec8822e4186a51923c003068 Mon Sep 17 00:00:00 2001 From: Big E Date: Tue, 5 May 2026 20:46:19 -0400 Subject: [PATCH 31/58] + Salesman Sprite --- NPCs/TownNPCs/ShadySalesman.cs | 37 ++++++++++----------------- NPCs/TownNPCs/ShadySalesman.png | Bin 0 -> 4974 bytes NPCs/TownNPCs/ShadySalesman_Head.png | Bin 0 -> 726 bytes 3 files changed, 14 insertions(+), 23 deletions(-) create mode 100644 NPCs/TownNPCs/ShadySalesman.png create mode 100644 NPCs/TownNPCs/ShadySalesman_Head.png diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 833d389c83..1af948c38e 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Fishing; +using CalamityMod.Items.Fishing.FishingRods; using CalamityMod.Items.Placeables; using CalamityMod.Items.Placeables.Furniture; using CalamityMod.Items.Potions; @@ -10,7 +11,6 @@ using CalamityMod.Items.SummonItems.TownPets; using CalamityMod.Items.Tools; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.Prefixes; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -22,14 +22,12 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.TownNPCs { + [AutoloadHead] public class ShadySalesman : ModNPC { - public override string Texture => "CalamityMod/NPCs/NormalNPCs/Piggy"; - public override string HeadTexture => "CalamityMod/NPCs/TownNPCs/TownPiggy_Head"; - public override void SetStaticDefaults() { - Main.npcFrameCount[Type] = 5; + Main.npcFrameCount[Type] = 9; NPCID.Sets.ShimmerTownTransform[Type] = false; NPCID.Sets.NoTownNPCHappiness[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers drawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers() @@ -44,8 +42,8 @@ namespace CalamityMod.NPCs.TownNPCs NPC.townNPC = true; NPC.friendly = true; NPC.lavaImmune = false; - NPC.width = 26; - NPC.height = 26; + NPC.width = 48; + NPC.height = 64; NPC.aiStyle = NPCAIStyleID.Passive; NPC.damage = 10; NPC.defense = 15; @@ -139,7 +137,7 @@ namespace CalamityMod.NPCs.TownNPCs NPCShop shop = new(Type); shop.Add() - //.Add() Has PR + .Add() .Add() .Add() .Add() @@ -147,16 +145,15 @@ namespace CalamityMod.NPCs.TownNPCs .Add() .Add() .Add() - //.Add() WIP - //.Add() Has PR - //.Add() Has PR + .Add() + .Add() + .Add() .Add() .Add() - //.Add() WIP + //.Add() .Add() .Add() - //.Add() Has PR - //.Add() WIP + .Add(Condition.Hardmode) .Add(Condition.DownedGolem) .Register(); @@ -169,13 +166,9 @@ namespace CalamityMod.NPCs.TownNPCs if (!NPC.IsABestiaryIconDummy) { if (NPC.direction == 1) - { NPC.spriteDirection = -1; - } - if (NPC.direction == -1) - { + else if (NPC.direction == -1) NPC.spriteDirection = 1; - } if (NPC.velocity.X == 0f) { @@ -192,14 +185,12 @@ namespace CalamityMod.NPCs.TownNPCs NPC.frameCounter = 0.0; } if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[Type] - 1) - { NPC.frame.Y = frameHeight; - } } else { NPC.frameCounter = 0.0; - NPC.frame.Y = frameHeight * 2; + NPC.frame.Y = 0; } } diff --git a/NPCs/TownNPCs/ShadySalesman.png b/NPCs/TownNPCs/ShadySalesman.png new file mode 100644 index 0000000000000000000000000000000000000000..841aaf1b746cc8263f583ffb01e7a3c00ee587a2 GIT binary patch literal 4974 zcmai2dpwhW-&djxCDNTj$;tIgN!Z<`CJK z=1fse<$T#BG+`rbQ^Iq(pZj^9`@iR}>vQee_qFf!`Mgixr63(`Bq2v3LPA24cDB|i z@TxB)v}=8zC|HT8^b)|!t_YM3T&SW~{yTWHC&7^;{FSA$_+6ov6R}Y14oplBpgERnnj>Vrykx* zA_(mouzp}GHoOm-(2@A87In!x_)a!e$HR(%vAq5qLcMJdZ_28TI@#q`{M4oY20}?wPwuGGeDeIJo z8`tU;=W$AwAUv%&mXx}ff(hQ6ygaH<26s>yYD}Q`$F7bPlRhDaN9=4fvfhmRAT>5k z{Y2UYCM&BZ(b;dX2qt!Wovj%Y9YfaeKp#|J-Y{2^_I#tR`0DfHQKLbXvguU=ty>bj zb;R^s`+|V698Gr1aK5!ZUxI5&&DGr|BEQ4teBilhma8OYt2oqpiLkHmSl@RNEqc_z zHU0jqQ@irVJ2p1un2RYTuey@oEqT1;U@ww=x5kdci<6t}OBrGglZL9{b8iON$2kfL z%>AbGYe=gMzYFJ<=1x&N^t9GuWlg^H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_(q9d573Z7|^00000NkvXX Iu0mjf07p+wHvj+t literal 0 HcmV?d00001 From 7fde2c0d19226b29eb5a682281762d3bd6295040 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 16 May 2026 16:22:51 -0400 Subject: [PATCH 32/58] New sheet --- NPCs/TownNPCs/ShadySalesman.cs | 26 +++++++++++++++++--------- NPCs/TownNPCs/ShadySalesman.png | Bin 4974 -> 6032 bytes 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 1af948c38e..d916ff1e45 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using CalamityMod.Items.Accessories; using CalamityMod.Items.Fishing; using CalamityMod.Items.Fishing.FishingRods; using CalamityMod.Items.Placeables; @@ -27,7 +28,14 @@ namespace CalamityMod.NPCs.TownNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[Type] = 9; + Main.npcFrameCount[Type] = 10; + NPCID.Sets.AttackFrameCount[Type] = 1; + NPCID.Sets.DangerDetectRange[Type] = 700; + NPCID.Sets.AttackType[Type] = 1; + NPCID.Sets.AttackTime[Type] = 30; + NPCID.Sets.AttackAverageChance[Type] = 10; + NPCID.Sets.HatOffsetY[Type] = 18; + NPCID.Sets.ShimmerTownTransform[Type] = false; NPCID.Sets.NoTownNPCHappiness[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers drawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers() @@ -139,18 +147,18 @@ namespace CalamityMod.NPCs.TownNPCs shop.Add() .Add() .Add() - .Add() - .Add() - .Add() - .Add() - .Add() + .Add(Condition.DownedGoblinArmy) + .Add(Condition.DownedGoblinArmy) + .Add(Condition.DownedGoblinArmy) + .Add(Condition.DownedGoblinArmy) + .Add(Condition.DownedGoblinArmy) .Add() .Add() .Add() .Add() .Add() .Add() - //.Add() + .Add() .Add() .Add() .Add(Condition.Hardmode) @@ -166,9 +174,9 @@ namespace CalamityMod.NPCs.TownNPCs if (!NPC.IsABestiaryIconDummy) { if (NPC.direction == 1) - NPC.spriteDirection = -1; - else if (NPC.direction == -1) NPC.spriteDirection = 1; + else if (NPC.direction == -1) + NPC.spriteDirection = -1; if (NPC.velocity.X == 0f) { diff --git a/NPCs/TownNPCs/ShadySalesman.png b/NPCs/TownNPCs/ShadySalesman.png index 841aaf1b746cc8263f583ffb01e7a3c00ee587a2..58ae6b72526ca8ab1c2ddca99f5af9528e257eb5 100644 GIT binary patch literal 6032 zcmaiYc{r5c`~Ra|g|f8>y|Y!wPLZV$V~vU!OLk$%I?Nb^2t^sG2$ii!vM*ys)}bsR zGiA((p$T~=>w~d;pRVikzOK*p`+cwL``0pmyxs)Z5H{^R=r0N_Cw z8(71wIsoiY+_wkr^~OD$h8wP6Yop7+`@R$K!x0mN!KLfrFXnP^4;+RgI>pI`ycSJP zB5qm-wmzn|tmd~QRXkF(;@+Qe^;Avku2XiW0|y0<8(PH%`j{dFx@nEygf6QJU)2Z_ zJ@#qvdTdc=?T#BQC5C?9A6lH}D_7l^3L6z$r|)-y;_L`dR+AQ+fkk_UL4COB?RV^+ zobSsQgZs3h(Xj}HACoEn*f}eP{l4)O`0=fxZNS%Sd)gfC|H_PevlJPevKgdc&_ceK5=wk6Pe=GT2`+kqm?68Jr-6y zo*I^Gtqd3eF;p#0%;ptA4W+2`Jmi-hfcF@-WFkr&+>*MQIjX=2=LZx6TbBo-iu+Fh zfLX38lOJ$c9a9-t)O@>EC3AfPSB1QS$kvJC1^%!(D~8;{8cMyd`d;bT(Ha}4pn*k# z)9MA_R=Za=0PJOa+nph$;nN!Veg22hSc)lg4SzR^E}`7VU$X@{+I6VMVp{1WP%~h%xCmT-Y%d=Tz5b4Cq-kVZ7cum z7O}(BOx*UH>=x76#5#xLoVK#vEuO{&yog*p5B#XeA4DiM%pnVSM9-h@HqW|n_|2oy zREv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BT0|V4m`RISo4D;JOlPA7;8~7k z@~^nBG>b0ta#{k#q@W*>+Dkf@@#$$97Zz&J3KDom?EAqgbK!pIoRY*lKRf_s)Dds|52v*fZOJR zt1kURA Date: Sat, 16 May 2026 23:37:48 -0400 Subject: [PATCH 33/58] salesman shoot logic attempt --- NPCs/TownNPCs/ShadySalesman.cs | 35 ++++++++++ Projectiles/Typeless/ShadySalesmanGunshot.cs | 73 ++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 Projectiles/Typeless/ShadySalesmanGunshot.cs diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index d916ff1e45..9067019abc 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -12,10 +12,13 @@ using CalamityMod.Items.SummonItems.TownPets; using CalamityMod.Items.Tools; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Projectiles.Typeless; using CalamityMod.World; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Chat; +using Terraria.GameContent; using Terraria.GameContent.Bestiary; using Terraria.ID; using Terraria.Localization; @@ -317,6 +320,38 @@ namespace CalamityMod.NPCs.TownNPCs ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasArrived", Main.npc[myIndex].GetFullNetName()), new Color(50, 125, 255)); } } + + public override void TownNPCAttackStrength(ref int damage, ref float knockback) + { + damage = 25; + knockback = 3f; + } + + public override void TownNPCAttackProj(ref int projType, ref int attackDelay) + { + projType = ModContent.ProjectileType(); + attackDelay = 1; + } + + public override void TownNPCAttackProjSpeed(ref float multiplier, ref float gravityCorrection, ref float randomOffset) + { + multiplier = 8f; + gravityCorrection = 0f; + randomOffset = 0f; + } + + public override void TownNPCAttackCooldown(ref int cooldown, ref int randExtraCooldown) + { + cooldown = 75; + randExtraCooldown = 10; + } + + public override void DrawTownAttackGun(ref Texture2D item, ref Rectangle itemFrame, ref float scale, ref int horizontalHoldoutOffset) + { + item = TextureAssets.Item[ModContent.ItemType()].Value; + itemFrame = new Rectangle(0, 0, item.Width, item.Height); + horizontalHoldoutOffset = -21; + } } public class ShadySalesmanSpawnSystem : ModSystem diff --git a/Projectiles/Typeless/ShadySalesmanGunshot.cs b/Projectiles/Typeless/ShadySalesmanGunshot.cs new file mode 100644 index 0000000000..7ab01d97b1 --- /dev/null +++ b/Projectiles/Typeless/ShadySalesmanGunshot.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using CalamityMod.Items.Accessories; +using CalamityMod.Items.Fishing; +using CalamityMod.Items.Fishing.FishingRods; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class ShadySalesmanGunshot : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public override void SetDefaults() + { + Projectile.width = 4; + Projectile.height = 4; + Projectile.friendly = true; + Projectile.hostile = false; + Projectile.penetrate = 1; + Projectile.timeLeft = 600; + Projectile.tileCollide = true; + Projectile.ignoreWater = true; + Projectile.extraUpdates = 1; + Projectile.DamageType = DamageClass.Ranged; + Projectile.extraUpdates = 8; + } + + public override void AI() + { + Lighting.AddLight(Projectile.Center, Color.Khaki.ToVector3() * 0.2f); + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + SpawnImpactEffects(target.Center); + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + SpawnImpactEffects(Projectile.Center); + return true; + } + + public void SpawnImpactEffects(Vector2 hitPoint) + { + Vector2 velocity = Projectile.velocity.SafeNormalize(Vector2.UnitX); + + Particle bloom = new CustomSpark(hitPoint, Vector2.Zero, "CalamityMod/Particles/BrightFlash", false, 6, 0.35f, Color.Khaki, Vector2.One, true, true, glowOpacity: 0.5f, colorFadeSpeed: 10); + GeneralParticleHandler.SpawnParticle(bloom, true); + + for (int i = 0; i < 4; i++) + { + Vector2 dustVel = velocity.RotatedByRandom(0.35f) * Main.rand.NextFloat(2f, 7f); + + Dust dust = Dust.NewDustPerfect(hitPoint, DustID.Smoke, dustVel, 120, default, Main.rand.NextFloat(0.8f, 1.1f)); + dust.noGravity = true; + } + + for (int i = 0; i < 3; i++) + { + Vector2 sparkVel = velocity.RotatedByRandom(0.22f) * Main.rand.NextFloat(3f, 8f); + + Particle spark = new CustomSpark(hitPoint, sparkVel, "CalamityMod/Particles/FadeLine", false, Main.rand.Next(12, 18), 0.22f, Color.LightGray, new Vector2(0.45f, 1f), true, shrinkSpeed: 0.45f, colorFadeSpeed: 10); + GeneralParticleHandler.SpawnParticle(spark, true); + } + } + } +} From ae3a23329a06f2154c7feebf8ba05d28da508006 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Sat, 16 May 2026 22:27:25 -0700 Subject: [PATCH 34/58] use attacking frame --- NPCs/TownNPCs/ShadySalesman.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 9067019abc..79d9ddbb89 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -172,7 +172,12 @@ namespace CalamityMod.NPCs.TownNPCs public override void FindFrame(int frameHeight) { - if (NPC.velocity.Y == 0f) + if (NPC.ai[0] == 12f) + { + NPC.frameCounter = 0; + NPC.frame.Y = frameHeight * 9; + } + else if (NPC.velocity.Y == 0f) { if (!NPC.IsABestiaryIconDummy) { From 6f35ec5fbb2f07b69d21fd1e2a1ff1eae1b615cc Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 17 May 2026 18:49:07 -0400 Subject: [PATCH 35/58] Add self-defense --- NPCs/TownNPCs/ShadySalesman.cs | 29 +++++++++++++---- Projectiles/Typeless/ShadySalesmanGunshot.cs | 34 ++++++++++++++++---- 2 files changed, 50 insertions(+), 13 deletions(-) diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 79d9ddbb89..c3471f1d9d 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Threading; using CalamityMod.Items.Accessories; using CalamityMod.Items.Fishing; using CalamityMod.Items.Fishing.FishingRods; @@ -12,6 +13,7 @@ using CalamityMod.Items.SummonItems.TownPets; using CalamityMod.Items.Tools; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Particles; using CalamityMod.Projectiles.Typeless; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -172,11 +174,14 @@ namespace CalamityMod.NPCs.TownNPCs public override void FindFrame(int frameHeight) { - if (NPC.ai[0] == 12f) + if (NPC.ai[0] == 12f) // Attacking { + NPC.spriteDirection = NPC.direction; + NPC.frameCounter = 0; NPC.frame.Y = frameHeight * 9; } + else if (NPC.velocity.Y == 0f) { if (!NPC.IsABestiaryIconDummy) @@ -203,6 +208,7 @@ namespace CalamityMod.NPCs.TownNPCs if (NPC.frame.Y / frameHeight >= Main.npcFrameCount[Type] - 1) NPC.frame.Y = frameHeight; } + else { NPC.frameCounter = 0.0; @@ -328,8 +334,8 @@ namespace CalamityMod.NPCs.TownNPCs public override void TownNPCAttackStrength(ref int damage, ref float knockback) { - damage = 25; - knockback = 3f; + damage = 10; + knockback = 1f; } public override void TownNPCAttackProj(ref int projType, ref int attackDelay) @@ -351,14 +357,23 @@ namespace CalamityMod.NPCs.TownNPCs randExtraCooldown = 10; } - public override void DrawTownAttackGun(ref Texture2D item, ref Rectangle itemFrame, ref float scale, ref int horizontalHoldoutOffset) + public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - item = TextureAssets.Item[ModContent.ItemType()].Value; - itemFrame = new Rectangle(0, 0, item.Width, item.Height); - horizontalHoldoutOffset = -21; + // Manually draw gun frame when attacking + if (NPC.ai[0] == 12f && !NPC.IsABestiaryIconDummy) + { + Texture2D gunTex = TextureAssets.Item[ModContent.ItemType()].Value; + int holdoutOffset = -21; + Vector2 origin = NPC.spriteDirection == -1 ? new Vector2(gunTex.Width + holdoutOffset, gunTex.Height / 2f) : new Vector2(-holdoutOffset, gunTex.Height / 2f); + Vector2 drawPos = NPC.Center - screenPos + new Vector2(0f, 8f); + float rotation = NPC.ai[2] * ((float)Math.PI / 2f) * NPC.spriteDirection; + + spriteBatch.Draw(gunTex, drawPos, null, drawColor, rotation, origin, NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); + } } } + public class ShadySalesmanSpawnSystem : ModSystem { private static bool CanSpawnTonight = true; diff --git a/Projectiles/Typeless/ShadySalesmanGunshot.cs b/Projectiles/Typeless/ShadySalesmanGunshot.cs index 7ab01d97b1..f6ef1e6a09 100644 --- a/Projectiles/Typeless/ShadySalesmanGunshot.cs +++ b/Projectiles/Typeless/ShadySalesmanGunshot.cs @@ -3,31 +3,35 @@ using System.Collections.Generic; using CalamityMod.Items.Accessories; using CalamityMod.Items.Fishing; using CalamityMod.Items.Fishing.FishingRods; +using CalamityMod.NPCs.TownNPCs; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Typeless { - public class ShadySalesmanGunshot : ModProjectile + public class ShadySalesmanGunshot : ModProjectile, ILocalizedModType { public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public override void SetDefaults() { - Projectile.width = 4; - Projectile.height = 4; + Projectile.width = 12; + Projectile.height = 12; Projectile.friendly = true; Projectile.hostile = false; - Projectile.penetrate = 1; + Projectile.penetrate = 3; Projectile.timeLeft = 600; Projectile.tileCollide = true; Projectile.ignoreWater = true; - Projectile.extraUpdates = 1; + Projectile.extraUpdates = 10; Projectile.DamageType = DamageClass.Ranged; - Projectile.extraUpdates = 8; + Projectile.localNPCHitCooldown = -1; + Projectile.usesLocalNPCImmunity = true; + } public override void AI() @@ -35,6 +39,24 @@ namespace CalamityMod.Projectiles.Typeless Lighting.AddLight(Projectile.Center, Color.Khaki.ToVector3() * 0.2f); } + public override void OnSpawn(IEntitySource source) + { + // Shift the projectile up to about the center of the salesman and override its speed + if (source is EntitySource_Parent parentSource && parentSource.Entity is NPC npc && npc.type == ModContent.NPCType()) + { + Projectile.position.Y -= 4f; + + float rotation = npc.ai[2]; + Vector2 barrelDirection = rotation.ToRotationVector2(); + + if (npc.spriteDirection == -1) + barrelDirection.X *= -1; + + float speed = Projectile.velocity.Length(); + Projectile.velocity = barrelDirection * speed; + } + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { SpawnImpactEffects(target.Center); From 47f245032bf4a7171b34541524e1b766131a3739 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 17 May 2026 20:10:25 -0400 Subject: [PATCH 36/58] Cleanup --- ...ods.CalamityMod.Projectiles.Typeless.hjson | 7 +- NPCs/TownNPCs/ShadySalesman.cs | 107 +++++++++++++++--- Projectiles/Typeless/ShadySalesmanGunshot.cs | 1 + 3 files changed, 99 insertions(+), 16 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index cbe6fca08b..20226df370 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -41,6 +41,7 @@ CursorProj.DisplayName: Aestheticus Crystal CursorProjSplit.DisplayName: Aestheticus Crystal CyanLabSeeker.DisplayName: Seeking Mechanism DarkIce.DisplayName: Dark Ice +DebuffSpreadEffect.DisplayName: Debuff Spread Effect DeepseaBlaze.DisplayName: Deepsea Blaze DevourerofCodsBobber.DisplayName: Devourer of Cods Bobber DiamondOfTheDeepProjectile.DisplayName: Abyss Spirit @@ -135,6 +136,7 @@ SerpentsBiteHook.DisplayName: Serpent's Bite ShadeNimbus.DisplayName: Shade Nimbus ShadeNimbusRain.DisplayName: Shade Rain ShadeNimbusSpawner.DisplayName: Dank Creeper +ShadySalesmanGunshot.DisplayName: Elephant-Killing Round SkyFlareFriendly.DisplayName: Flare SlimeStream.DisplayName: Slime Stream SlurperBobber.DisplayName: Slurper Bobber @@ -145,6 +147,7 @@ StarStruckWaterBottle.DisplayName: Bottle StepStoolBonusFX.DisplayName: Step Stool Bonus StickyFeatherAero.DisplayName: Feather StomperSlam.DisplayName: Stomper Slam +StratusBlackHole.DisplayName: Stratus Singularity SuicideBomberDemon.DisplayName: Demon SulphuricAcidBubbleFriendly.DisplayName: Acid Bubble SulphurousSandBallGun.DisplayName: Sulphurous Sand Ball @@ -177,6 +180,4 @@ WulfrumHook.DisplayName: Wulfrum Slingshot WulfrumLureSignal.DisplayName: Signal YellowLabSeeker.DisplayName: Seeking Mechanism XykDeathAnim.DisplayName: Xyk Death Animation -XykWings.DisplayName: Xyk Wings -StratusBlackHole.DisplayName: Stratus Singularity -DebuffSpreadEffect.DisplayName: Debuff Spread Effect +XykWings.DisplayName: Xyk Wings \ No newline at end of file diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index c3471f1d9d..247dd8600a 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -1,24 +1,31 @@ using System; using System.Collections.Generic; using System.Threading; +using CalamityMod.Dusts; using CalamityMod.Items.Accessories; using CalamityMod.Items.Fishing; using CalamityMod.Items.Fishing.FishingRods; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Items.Placeables.Furniture; +using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.Potions.Alcohol; using CalamityMod.Items.Potions.Food; using CalamityMod.Items.SummonItems.TownPets; using CalamityMod.Items.Tools; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.Particles; using CalamityMod.Projectiles.Typeless; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Audio; using Terraria.Chat; using Terraria.GameContent; using Terraria.GameContent.Bestiary; @@ -31,6 +38,8 @@ namespace CalamityMod.NPCs.TownNPCs [AutoloadHead] public class ShadySalesman : ModNPC { + public bool hasFiredShotThisAttack = false; + public int attackFrameTimer = 0; public override void SetStaticDefaults() { Main.npcFrameCount[Type] = 10; @@ -43,6 +52,7 @@ namespace CalamityMod.NPCs.TownNPCs NPCID.Sets.ShimmerTownTransform[Type] = false; NPCID.Sets.NoTownNPCHappiness[Type] = true; + NPCID.Sets.IsTownChild[Type] = true; NPCID.Sets.NPCBestiaryDrawModifiers drawModifiers = new NPCID.Sets.NPCBestiaryDrawModifiers() { Velocity = 1f // Draws the NPC in the bestiary as if its walking +1 tiles in the x direction @@ -60,7 +70,7 @@ namespace CalamityMod.NPCs.TownNPCs NPC.aiStyle = NPCAIStyleID.Passive; NPC.damage = 10; NPC.defense = 15; - NPC.lifeMax = 2000; + NPC.lifeMax = 250; NPC.HitSound = SoundID.NPCHit1; NPC.DeathSound = SoundID.NPCDeath1; NPC.knockBackResist = 0.99f; @@ -109,6 +119,46 @@ namespace CalamityMod.NPCs.TownNPCs public override void AI() { NPC.homeless = true; + + if (NPC.ai[0] == 12f) // Attacking + { + attackFrameTimer++; + + if (attackFrameTimer >= 3 && !hasFiredShotThisAttack) // Delay effects spawning by 2 frames to give the NPC time to turn around after being set to attack + { + Texture2D gunTex = TextureAssets.Item[ModContent.ItemType()].Value; + int holdoutOffset = -21; + + Vector2 gunDrawPos = NPC.Center + new Vector2(0f, 8f); + float rotation = NPC.ai[2] * ((float)Math.PI / 2f) * NPC.spriteDirection; + + // Match the pos calculations from PostDraw + Vector2 origin = NPC.spriteDirection == -1 ? new Vector2(gunTex.Width + holdoutOffset, gunTex.Height / 2f) : new Vector2(-holdoutOffset, gunTex.Height / 2f); + Vector2 muzzleLocal = NPC.spriteDirection == -1 ? new Vector2(0f, 6f) : new Vector2(gunTex.Width, 6f); + Vector2 muzzlePos = gunDrawPos + (muzzleLocal - origin).RotatedBy(rotation); + Vector2 barrelDirection = new Vector2(NPC.spriteDirection, 0f).RotatedBy(rotation); + + // Spawn effects + Particle bloom = new CustomSpark(muzzlePos, Vector2.Zero, "CalamityMod/Particles/BrightFlash", false, 5, 0.18f, Color.Khaki, Vector2.One, true, true, glowOpacity: 0.45f, colorFadeSpeed: 8); + GeneralParticleHandler.SpawnParticle(bloom, true); + + for (int i = 0; i < 8; i++) + { + Vector2 vel = barrelDirection.RotatedByRandom(0.18f) * Main.rand.NextFloat(3f, 7f); + + Particle spark = new CustomSpark(muzzlePos, vel, "CalamityMod/Particles/FadeLine", false, Main.rand.Next(10, 18), 0.18f, new Color(255, 230, 140), new Vector2(0.5f, 1f), true, shrinkSpeed: 0.4f, colorFadeSpeed: 10); + GeneralParticleHandler.SpawnParticle(spark, true); + } + SoundEngine.PlaySound(ElephantKiller.Shot with { Volume = 0.9f, PitchVariance = 0.15f, MaxInstances = 3 }, NPC.Center); + + hasFiredShotThisAttack = true; + } + } + else + { + hasFiredShotThisAttack = false; + attackFrameTimer = 0; // Reset the frame counter when not attacking + } } private static bool IsNpcOnscreen(Vector2 center) @@ -166,7 +216,6 @@ namespace CalamityMod.NPCs.TownNPCs .Add() .Add() .Add() - .Add(Condition.Hardmode) .Add(Condition.DownedGolem) .Register(); @@ -216,6 +265,21 @@ namespace CalamityMod.NPCs.TownNPCs } } + public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) + { + // Manually draw gun frame when attacking + if (NPC.ai[0] == 12f && !NPC.IsABestiaryIconDummy) + { + Texture2D gunTex = TextureAssets.Item[ModContent.ItemType()].Value; + int holdoutOffset = -21; + Vector2 origin = NPC.spriteDirection == -1 ? new Vector2(gunTex.Width + holdoutOffset, gunTex.Height / 2f) : new Vector2(-holdoutOffset, gunTex.Height / 2f); + Vector2 drawPos = NPC.Center - screenPos + new Vector2(0f, 8f); + float rotation = NPC.ai[2] * ((float)Math.PI / 2f) * NPC.spriteDirection; + + spriteBatch.Draw(gunTex, drawPos, null, drawColor, rotation, origin, NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); + } + } + //Pulled and modified from Vanilla, originally is used to spawn the Travelling Merchant internal static void SpawnTravelNPC(int npcToSpawnNextTo) { @@ -357,20 +421,37 @@ namespace CalamityMod.NPCs.TownNPCs randExtraCooldown = 10; } - public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) + // Spawn the effects used for Tinkerer's Voucher failing when below 1 life + public override void HitEffect(NPC.HitInfo hit) { - // Manually draw gun frame when attacking - if (NPC.ai[0] == 12f && !NPC.IsABestiaryIconDummy) + if (NPC.life <= 0) { - Texture2D gunTex = TextureAssets.Item[ModContent.ItemType()].Value; - int holdoutOffset = -21; - Vector2 origin = NPC.spriteDirection == -1 ? new Vector2(gunTex.Width + holdoutOffset, gunTex.Height / 2f) : new Vector2(-holdoutOffset, gunTex.Height / 2f); - Vector2 drawPos = NPC.Center - screenPos + new Vector2(0f, 8f); - float rotation = NPC.ai[2] * ((float)Math.PI / 2f) * NPC.spriteDirection; + for (int d = 0; d < 10; d++) + { + for (int smokeCount = 0; smokeCount < 3; smokeCount++) + { + Vector2 velocity = Main.rand.NextVector2CircularEdge(1f, 1f) * Main.rand.NextFloat(3f, 12f); + Color smokeStart = Main.rand.NextBool() ? Color.Gray : Color.LightGray; + Color smokeEnd = Color.DimGray; + float smokeSize = Main.rand.NextFloat(0.9f, 2f); - spriteBatch.Draw(gunTex, drawPos, null, drawColor, rotation, origin, NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); + Particle smoke = new SmallSmokeParticle(NPC.Center, velocity, smokeStart, smokeEnd, smokeSize, Main.rand.Next(90, 140)); + GeneralParticleHandler.SpawnParticle(smoke); + } + + Particle skull = new DesertProwlerSkullParticle(NPC.Center, new Vector2(2.5f, 2.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1f), Main.rand.NextBool() ? Color.LightGray : Color.Silver, Color.Gray, Main.rand.NextFloat(0.15f, 0.5f), Main.rand.Next(100, 190)); + GeneralParticleHandler.SpawnParticle(skull); + } + SoundEngine.PlaySound(SoundID.NPCDeath6, NPC.Center); } } + + public override void ModifyNPCLoot(NPCLoot npcLoot) + { + var hardmode = npcLoot.DefineConditionalDropSet(DropHelper.Hardmode()); + hardmode.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, ModContent.ItemType())); + + } } @@ -380,7 +461,7 @@ namespace CalamityMod.NPCs.TownNPCs public override void PreUpdateWorld() { - if(Main.dayTime) + if (Main.dayTime) { CanSpawnTonight = true; return; @@ -404,7 +485,7 @@ namespace CalamityMod.NPCs.TownNPCs return; } - if(!Main.rand.NextBool(4)) + if (!Main.rand.NextBool(4)) { CanSpawnTonight = false; return; diff --git a/Projectiles/Typeless/ShadySalesmanGunshot.cs b/Projectiles/Typeless/ShadySalesmanGunshot.cs index f6ef1e6a09..8336febbe3 100644 --- a/Projectiles/Typeless/ShadySalesmanGunshot.cs +++ b/Projectiles/Typeless/ShadySalesmanGunshot.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Projectiles.Typeless public class ShadySalesmanGunshot : ModProjectile, ILocalizedModType { public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public new string LocalizationCategory => "Projectiles.Typeless"; public override void SetDefaults() { From b30f113043c5528ae4b2f6b60d4a468283e0a39d Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Tue, 19 May 2026 01:09:59 -0400 Subject: [PATCH 37/58] barebones syncing --- NPCs/TownNPCs/ShadySalesman.cs | 46 ++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 247dd8600a..68702b9edb 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -90,27 +90,41 @@ namespace CalamityMod.NPCs.TownNPCs public override List SetNPCNameList() => ModContent.GetInstance().SetNPCNameList(); + public override void SendExtraAI(System.IO.BinaryWriter writer) + { + writer.Write(hasFiredShotThisAttack); + writer.Write(attackFrameTimer); + } + public override void ReceiveExtraAI(System.IO.BinaryReader reader) + { + hasFiredShotThisAttack = reader.ReadBoolean(); + attackFrameTimer = reader.ReadInt32(); + } + public override bool PreAI() { if (Main.dayTime && !IsNpcOnscreen(NPC.Center)) { - if (Main.netMode == NetmodeID.SinglePlayer) - Main.NewText(Language.GetTextValue("LegacyMisc.35", NPC.FullName), 50, 125, 255); - else - ChatHelper.BroadcastChatMessage(NetworkText.FromKey("LegacyMisc.35", NPC.GetFullNetName()), new Color(50, 125, 255)); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + if (Main.netMode == NetmodeID.SinglePlayer) + Main.NewText(Language.GetTextValue("LegacyMisc.35", NPC.FullName), 50, 125, 255); + else + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("LegacyMisc.35", NPC.GetFullNetName()), new Color(50, 125, 255)); - if (CalamityWorld.unlockedTownPig) - { - string name = NPC.GivenName; - NPC.Transform(ModContent.NPCType()); - NPC.GivenName = name; - } - else - { - NPC.active = false; - NPC.netSkip = -1; - } - return false; + if (CalamityWorld.unlockedTownPig) + { + string name = NPC.GivenName; + NPC.Transform(ModContent.NPCType()); + NPC.GivenName = name; + } + else + { + NPC.active = false; + NPC.netSkip = -1; + } + return false; + } } return true; From 5254c2d8abdd4de7888e2f04afc6f4a10c1390ae Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Tue, 19 May 2026 02:05:54 -0400 Subject: [PATCH 38/58] Fixed mp bugs, cleanup --- NPCs/TownNPCs/ShadySalesman.cs | 68 ++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 68702b9edb..24f65ea78b 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -29,9 +29,11 @@ using Terraria.Audio; using Terraria.Chat; using Terraria.GameContent; using Terraria.GameContent.Bestiary; +using Terraria.GameContent.Events; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; +using Terraria.Utilities; namespace CalamityMod.NPCs.TownNPCs { @@ -90,6 +92,8 @@ namespace CalamityMod.NPCs.TownNPCs public override List SetNPCNameList() => ModContent.GetInstance().SetNPCNameList(); + public override void PartyHatPosition(ref Vector2 position, ref SpriteEffects spriteEffects) => position.X -= 4f * NPC.direction; + public override void SendExtraAI(System.IO.BinaryWriter writer) { writer.Write(hasFiredShotThisAttack); @@ -138,40 +142,44 @@ namespace CalamityMod.NPCs.TownNPCs { attackFrameTimer++; - if (attackFrameTimer >= 3 && !hasFiredShotThisAttack) // Delay effects spawning by 2 frames to give the NPC time to turn around after being set to attack + if (attackFrameTimer >= 3 && !hasFiredShotThisAttack) { - Texture2D gunTex = TextureAssets.Item[ModContent.ItemType()].Value; - int holdoutOffset = -21; - - Vector2 gunDrawPos = NPC.Center + new Vector2(0f, 8f); - float rotation = NPC.ai[2] * ((float)Math.PI / 2f) * NPC.spriteDirection; - - // Match the pos calculations from PostDraw - Vector2 origin = NPC.spriteDirection == -1 ? new Vector2(gunTex.Width + holdoutOffset, gunTex.Height / 2f) : new Vector2(-holdoutOffset, gunTex.Height / 2f); - Vector2 muzzleLocal = NPC.spriteDirection == -1 ? new Vector2(0f, 6f) : new Vector2(gunTex.Width, 6f); - Vector2 muzzlePos = gunDrawPos + (muzzleLocal - origin).RotatedBy(rotation); - Vector2 barrelDirection = new Vector2(NPC.spriteDirection, 0f).RotatedBy(rotation); - - // Spawn effects - Particle bloom = new CustomSpark(muzzlePos, Vector2.Zero, "CalamityMod/Particles/BrightFlash", false, 5, 0.18f, Color.Khaki, Vector2.One, true, true, glowOpacity: 0.45f, colorFadeSpeed: 8); - GeneralParticleHandler.SpawnParticle(bloom, true); - - for (int i = 0; i < 8; i++) + if (Main.netMode != NetmodeID.Server) { - Vector2 vel = barrelDirection.RotatedByRandom(0.18f) * Main.rand.NextFloat(3f, 7f); + Texture2D gunTex = TextureAssets.Item[ModContent.ItemType()].Value; + int holdoutOffset = -21; - Particle spark = new CustomSpark(muzzlePos, vel, "CalamityMod/Particles/FadeLine", false, Main.rand.Next(10, 18), 0.18f, new Color(255, 230, 140), new Vector2(0.5f, 1f), true, shrinkSpeed: 0.4f, colorFadeSpeed: 10); - GeneralParticleHandler.SpawnParticle(spark, true); + Vector2 gunDrawPos = NPC.Center + new Vector2(0f, 8f); + float rotation = NPC.ai[2] * ((float)Math.PI / 2f) * NPC.spriteDirection; + + Vector2 origin = NPC.spriteDirection == -1 ? new Vector2(gunTex.Width + holdoutOffset, gunTex.Height / 2f) : new Vector2(-holdoutOffset, gunTex.Height / 2f); + Vector2 muzzleLocal = NPC.spriteDirection == -1 ? new Vector2(0f, 6f) : new Vector2(gunTex.Width, 6f); + Vector2 muzzlePos = gunDrawPos + (muzzleLocal - origin).RotatedBy(rotation); + Vector2 barrelDirection = new Vector2(NPC.spriteDirection, 0f).RotatedBy(rotation); + + Particle bloom = new CustomSpark(muzzlePos, Vector2.Zero, "CalamityMod/Particles/BrightFlash", false, 5, 0.18f, Color.Khaki, Vector2.One, true, true, glowOpacity: 0.45f, colorFadeSpeed: 8); + GeneralParticleHandler.SpawnParticle(bloom, true); + + for (int i = 0; i < 8; i++) + { + Vector2 vel = barrelDirection.RotatedByRandom(0.18f) * Main.rand.NextFloat(3f, 7f); + Particle spark = new CustomSpark(muzzlePos, vel, "CalamityMod/Particles/FadeLine", false, Main.rand.Next(10, 18), 0.18f, new Color(255, 230, 140), new Vector2(0.5f, 1f), true, shrinkSpeed: 0.4f, colorFadeSpeed: 10); + GeneralParticleHandler.SpawnParticle(spark, true); + } + SoundEngine.PlaySound(ElephantKiller.Shot with { Volume = 0.9f, PitchVariance = 0.15f, MaxInstances = 3 }, NPC.Center); } - SoundEngine.PlaySound(ElephantKiller.Shot with { Volume = 0.9f, PitchVariance = 0.15f, MaxInstances = 3 }, NPC.Center); - hasFiredShotThisAttack = true; - } + NPC.netUpdate = true; + } } else { - hasFiredShotThisAttack = false; - attackFrameTimer = 0; // Reset the frame counter when not attacking + if (hasFiredShotThisAttack) + { + hasFiredShotThisAttack = false; + NPC.netUpdate = true; // Syncs state exit + } + attackFrameTimer = 0; } } @@ -188,13 +196,13 @@ namespace CalamityMod.NPCs.TownNPCs public override string GetChat() { - return "Ooooo, you want my wares dontcha? Yeah, yeah you do."; + + return "dialogue"; } public override void SetChatButtons(ref string button, ref string button2) { button = Language.GetTextValue("LegacyInterface.28"); - button2 = "Donation";// this.GetLocalizedValue("RefundButton"); ; } public override void OnChatButtonClicked(bool firstButton, ref string shopName) @@ -203,10 +211,6 @@ namespace CalamityMod.NPCs.TownNPCs { shopName = "Shop"; } - else - { - Main.npcChatText = "A donation? How generous!"; - } } public override void AddShops() From 9cd0c1dba014ca93f7f8350deca98a016ca33c8d Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Tue, 19 May 2026 15:50:25 -0400 Subject: [PATCH 39/58] Add dialogue --- .../en-US/Mods.CalamityMod.NPCs.hjson | 39 +++++++++++--- NPCs/TownNPCs/ShadySalesman.cs | 52 ++++++++++++++++++- 2 files changed, 82 insertions(+), 9 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 40b4ff4541..9b6f27093b 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -313,6 +313,13 @@ SupremeCataclysm.DisplayName: Cataclysm SupremeCatastrophe.DisplayName: Catastrophe Yharon.DisplayName: Yharon, Dragon of Rebirth YharonPhase2: Yharon, Resplendent Phoenix +DraconicSwarmer.DisplayName: Draconic Swarmer +Dragonfolly.DisplayName: Dragonfolly +Shoreskipper.DisplayName: Shoreskipper +BrainIllusion.DisplayName: Brain Illusion +FalseBrain.DisplayName: False Brain +BloodBomb.DisplayName: Blood Bomb + // Town NPCs, Pets, etc AndroombaFriendly.DisplayName: Androomba Pal @@ -573,6 +580,30 @@ SeaKing: { } } +ShadySalesman: { + DisplayName: Shady Salesman + Census.SpawnCondition: Defeat a Horrible Hog + + Chat: { + Normal1: Have you ever wondered why coins are shiny? Simple! It’s to match my partner’s dazzling products! + Normal2: Have you ever had a dream? If you have the cash, I can sell you several! + Normal3: Whatever you are thinking, I have the perfect thing for you, at a genuinely excessive discount! + Normal4: Is your life rapidly shrinking? Want to know this world’s marvels before your time comes? Are the local merchants only showing you worthless hogwash?! Worry not, Hoggart and I have just the solution! Hogwash sold separately. + Normal5: There’s a saying that goes “the grass is greener on the other side.” It’s absolute balderdash!! For 5 platinum coins, you can buy our Greener Paint and make your life the greenest! + Normal6: They say keeping an Angel Statue nearby is more dangerous than a loaded gun. That’s why I own multiple guns - in case some hooligan tries to sell me an Angel Statue! + Rain: People always say “rain, rain, go away! Come back another day!”, but everyone knows it would be better if it came back never! To solve this, I intend to invest in Hoggart’s Dome Program, we just need 500 platinum coins to get it off the ground! + WindyDay: Aren’t you tired of your house being blown away by any shoddy gust of wind? Well, I have the solution to your problem! With my state-of-the-art industrial super glue (for only 5 gold coins a pack), you too may survive the attack of invaders with outstanding lung capacity! + Desert: Exhausted from this oven-like heat? Yearning for something to help you cool down? Check out our revolutionary new product: water! It comes in all flavors of flavorless! Any bottle shape is available, from round to triangular! Feel the chill of molten ice as it enters your guts! It even has healing properties! Sip our free sample for the low price of 50 gold! + Tundra: Did you ever hear the tragedy of Kevin Bacon the Wise? I thought not, It’s not a story the Elumphants would tell you. Kevin Bacon was a Ham Lord of the Hogs, so powerful and so wise he could use his Hogtusk to influence metal to create gold… Unfortunately, he taught his apprentice everything he knew, then his apprentice out-cashed and deposed him. Ironic. He could save others from debt, but not himself. + Graveyard: Does that zombie look like a happy customer? No!! It’s full of maggots!! It has no life savings!! While you still do, hurry up and spend yours on a funky edition, happiness-smelling Maggot Repellent! + BloodMoon1: These shambling deadheads are the worst! How am I supposed to rip people off when they’re all either dead, broke or fighting for their lives?! + BloodMoon2: Like my partner always says, price makes the prize! Hire our Moon Doom Cannon, and enjoy a whole year without the meatsack invasion! Fund the construction of the Eclipse variant and get a deluxe model with a neat robotic decal! All for 5000 platinum coins! + BloodMoon3: Violence is at every corner tonight, huh? Remember these words, son: make deals, not war! + Hardmode: Those pesky merchants still want to sell you full-price, low quality copper tools?! Bird droppings!! Barter with me, and you’ll receive Palladium at HOG-WILD prizes! + MoonLordDefeated: I’ve been told this land is ruled by three gnomes in a suit of armor. That’s impossible! Gnomes are the most deplorable customers I’ve dealt with. They can’t handle a spoon without snapping it in half!! It’s always the halflings... + } +} + TownPiggy: { DisplayName: Town Piggy Census.SpawnCondition: Use The Housing Contract @@ -605,11 +636,3 @@ TownPiggy: { 2: Snort! } } - -DraconicSwarmer.DisplayName: Draconic Swarmer -Dragonfolly.DisplayName: Dragonfolly -Shoreskipper.DisplayName: Shoreskipper -BrainIllusion.DisplayName: Brain Illusion -FalseBrain.DisplayName: False Brain -BloodBomb.DisplayName: Blood Bomb -ShadySalesman.DisplayName: Shady Salesman diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 24f65ea78b..3933ae5f44 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -196,8 +196,58 @@ namespace CalamityMod.NPCs.TownNPCs public override string GetChat() { + WeightedRandom dialogue = new WeightedRandom(); - return "dialogue"; + dialogue.Add(this.GetLocalizedValue("Chat.Normal1")); + dialogue.Add(this.GetLocalizedValue("Chat.Normal2")); + dialogue.Add(this.GetLocalizedValue("Chat.Normal3")); + dialogue.Add(this.GetLocalizedValue("Chat.Normal4")); + dialogue.Add(this.GetLocalizedValue("Chat.Normal5")); + dialogue.Add(this.GetLocalizedValue("Chat.Normal6")); + + if (Main.raining) + { + dialogue.Add(this.GetLocalizedValue("Chat.Rain")); + } + + if (Main._shouldUseWindyDayMusic) + { + dialogue.Add(this.GetLocalizedValue("Chat.WindyDay")); + } + + if (Main.LocalPlayer.ZoneDesert) + { + dialogue.Add(this.GetLocalizedValue("Chat.Desert")); + } + + if (Main.LocalPlayer.ZoneSnow) + { + dialogue.Add(this.GetLocalizedValue("Chat.Tundra")); + } + + if (Main.LocalPlayer.ZoneGraveyard) + { + dialogue.Add(this.GetLocalizedValue("Chat.Graveyard")); + } + + if (Main.bloodMoon) + { + dialogue.Add(this.GetLocalizedValue("Chat.BloodMoon1")); + dialogue.Add(this.GetLocalizedValue("Chat.BloodMoon2")); + dialogue.Add(this.GetLocalizedValue("Chat.BloodMoon3")); + } + + if (Main.hardMode) + { + dialogue.Add(this.GetLocalizedValue("Chat.Hardmode")); + } + + if (NPC.downedMoonlord) + { + dialogue.Add(this.GetLocalizedValue("Chat.MoonLordDefeated")); + } + + return dialogue; } public override void SetChatButtons(ref string button, ref string button2) From 2fd36377a41593fc8268fc6a76ded7df53d93a48 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Tue, 19 May 2026 23:15:57 -0400 Subject: [PATCH 40/58] draw offset fix, shop reorg --- NPCs/TownNPCs/ShadySalesman.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 3933ae5f44..99fe2370e2 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -265,16 +265,10 @@ namespace CalamityMod.NPCs.TownNPCs public override void AddShops() { - NPCShop shop = new(Type); shop.Add() .Add() .Add() - .Add(Condition.DownedGoblinArmy) - .Add(Condition.DownedGoblinArmy) - .Add(Condition.DownedGoblinArmy) - .Add(Condition.DownedGoblinArmy) - .Add(Condition.DownedGoblinArmy) .Add() .Add() .Add() @@ -284,6 +278,11 @@ namespace CalamityMod.NPCs.TownNPCs .Add() .Add() .Add() + .Add(Condition.DownedGoblinArmy) + .Add(Condition.DownedGoblinArmy) + .Add(Condition.DownedGoblinArmy) + .Add(Condition.DownedGoblinArmy) + .Add(Condition.DownedGoblinArmy) .Add(Condition.DownedGolem) .Register(); @@ -291,6 +290,8 @@ namespace CalamityMod.NPCs.TownNPCs public override void FindFrame(int frameHeight) { + NPC.gfxOffY = -2f; + if (NPC.ai[0] == 12f) // Attacking { NPC.spriteDirection = NPC.direction; @@ -339,7 +340,7 @@ namespace CalamityMod.NPCs.TownNPCs if (NPC.ai[0] == 12f && !NPC.IsABestiaryIconDummy) { Texture2D gunTex = TextureAssets.Item[ModContent.ItemType()].Value; - int holdoutOffset = -21; + int holdoutOffset = -2; Vector2 origin = NPC.spriteDirection == -1 ? new Vector2(gunTex.Width + holdoutOffset, gunTex.Height / 2f) : new Vector2(-holdoutOffset, gunTex.Height / 2f); Vector2 drawPos = NPC.Center - screenPos + new Vector2(0f, 8f); float rotation = NPC.ai[2] * ((float)Math.PI / 2f) * NPC.spriteDirection; From e207c4c5f5665bc4ecdde02c390b113e8546aca1 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 27 May 2026 17:55:42 -0400 Subject: [PATCH 41/58] add shrine items to shop --- CalPlayer/CalamityPlayerMiscEffects.cs | 47 ++++++++++++++++++ CustomRecipes/RecipeUnlockHandler.cs | 49 +++++++++++++++++++ Items/Accessories/FrozenCube.cs | 12 +++++ Items/Accessories/FungalSymbiote.cs | 10 ++++ Items/Accessories/GladiatorsLocket.cs | 9 ++++ Items/Accessories/LuxorsGift.cs | 9 ++++ Items/Accessories/TrinketofChi.cs | 10 ++++ Items/Accessories/UnstableGraniteCore.cs | 10 ++++ .../Placeables/Furniture/CorruptionEffigy.cs | 12 ++++- Items/Placeables/Furniture/CrimsonEffigy.cs | 12 ++++- NPCs/TownNPCs/ShadySalesman.cs | 11 ++++- 11 files changed, 188 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index d928a64c18..4fa6822831 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -4986,6 +4986,53 @@ namespace CalamityMod.CalPlayer RecipeUnlockHandler.HasFoundIceSchematic = true; shouldSync = true; } + + if (Main.mouseItem.type == ModContent.ItemType() && !RecipeUnlockHandler.HasFoundLuxorsGift) + { + RecipeUnlockHandler.HasFoundLuxorsGift = true; + shouldSync = true; + } + + if (Main.mouseItem.type == ModContent.ItemType() && !RecipeUnlockHandler.HasFoundFungalSymbiote) + { + RecipeUnlockHandler.HasFoundFungalSymbiote = true; + shouldSync = true; + } + + if (Main.mouseItem.type == ModContent.ItemType() && !RecipeUnlockHandler.HasFoundTrinketOfChi) + { + RecipeUnlockHandler.HasFoundTrinketOfChi = true; + shouldSync = true; + } + + if (Main.mouseItem.type == ModContent.ItemType() && !RecipeUnlockHandler.HasFoundFrozenCube) + { + RecipeUnlockHandler.HasFoundFrozenCube = true; + shouldSync = true; + } + + if (Main.mouseItem.type == ModContent.ItemType() && !RecipeUnlockHandler.HasFoundGladiatorsLocket) + { + RecipeUnlockHandler.HasFoundGladiatorsLocket = true; + shouldSync = true; + } + if (Main.mouseItem.type == ModContent.ItemType() && !RecipeUnlockHandler.HasFoundUnstableGraniteCore) + { + RecipeUnlockHandler.HasFoundUnstableGraniteCore = true; + shouldSync = true; + } + + if (Main.mouseItem.type == ModContent.ItemType() && !RecipeUnlockHandler.HasFoundCrimsonEffigy) + { + RecipeUnlockHandler.HasFoundCrimsonEffigy = true; + shouldSync = true; + } + + if (Main.mouseItem.type == ModContent.ItemType() && !RecipeUnlockHandler.HasFoundCorruptionEffigy) + { + RecipeUnlockHandler.HasFoundCorruptionEffigy = true; + shouldSync = true; + } } if (shouldSync) diff --git a/CustomRecipes/RecipeUnlockHandler.cs b/CustomRecipes/RecipeUnlockHandler.cs index 2d2d263f2c..6945b303d4 100644 --- a/CustomRecipes/RecipeUnlockHandler.cs +++ b/CustomRecipes/RecipeUnlockHandler.cs @@ -18,6 +18,16 @@ namespace CalamityMod.CustomRecipes public static bool HasFoundHellSchematic = false; public static bool HasFoundIceSchematic = false; + public static bool HasFoundLuxorsGift = false; + public static bool HasFoundFungalSymbiote = false; + public static bool HasFoundTrinketOfChi = false; + public static bool HasFoundFrozenCube = false; + public static bool HasFoundGladiatorsLocket = false; + public static bool HasFoundUnstableGraniteCore = false; + public static bool HasFoundCrimsonEffigy = false; + public static bool HasFoundCorruptionEffigy = false; + + public static void Save(List boolTagContainer) { boolTagContainer.AddWithCondition("HasUnlockedT1ArsenalRecipes", HasUnlockedT1ArsenalRecipes); @@ -31,6 +41,15 @@ namespace CalamityMod.CustomRecipes boolTagContainer.AddWithCondition("HasFoundJungleSchematic", HasFoundJungleSchematic); boolTagContainer.AddWithCondition("HasFoundHellSchematic", HasFoundHellSchematic); boolTagContainer.AddWithCondition("HasFoundIceSchematic", HasFoundIceSchematic); + + boolTagContainer.AddWithCondition("HasFoundLuxorsGift", HasFoundLuxorsGift); + boolTagContainer.AddWithCondition("HasFoundFungalSymbiote", HasFoundFungalSymbiote); + boolTagContainer.AddWithCondition("HasFoundTrinketOfChi", HasFoundTrinketOfChi); + boolTagContainer.AddWithCondition("HasFoundFrozenCube", HasFoundFrozenCube); + boolTagContainer.AddWithCondition("HasFoundGladiatorsLocket", HasFoundGladiatorsLocket); + boolTagContainer.AddWithCondition("HasFoundUnstableGraniteCore", HasFoundUnstableGraniteCore); + boolTagContainer.AddWithCondition("HasFoundCrimsonEffigy", HasFoundCrimsonEffigy); + boolTagContainer.AddWithCondition("HasFoundCorruptionEffigy", HasFoundCorruptionEffigy); } public static void Load(IList boolTagContainer) @@ -46,6 +65,16 @@ namespace CalamityMod.CustomRecipes HasFoundJungleSchematic = boolTagContainer.Contains("HasFoundJungleSchematic"); HasFoundHellSchematic = boolTagContainer.Contains("HasFoundHellSchematic"); HasFoundIceSchematic = boolTagContainer.Contains("HasFoundIceSchematic"); + + HasFoundLuxorsGift = boolTagContainer.Contains("HasFoundLuxorsGift"); + HasFoundFungalSymbiote = boolTagContainer.Contains("HasFoundFungalSymbiote"); + HasFoundTrinketOfChi = boolTagContainer.Contains("HasFoundTrinketOfChi"); + HasFoundFrozenCube = boolTagContainer.Contains("HasFoundFrozenCube"); + HasFoundGladiatorsLocket = boolTagContainer.Contains("HasFoundGladiatorsLocket"); + HasFoundUnstableGraniteCore = boolTagContainer.Contains("HasFoundUnstableGraniteCore"); + HasFoundCrimsonEffigy = boolTagContainer.Contains("HasFoundCrimsonEffigy"); + HasFoundCorruptionEffigy = boolTagContainer.Contains("HasFoundCorruptionEffigy"); + } public static void SendData(BinaryWriter writer) @@ -63,9 +92,19 @@ namespace CalamityMod.CustomRecipes BitsByte flags2 = new BitsByte(); flags2[0] = HasFoundHellSchematic; flags2[1] = HasFoundIceSchematic; + flags2[2] = HasFoundLuxorsGift; + flags2[3] = HasFoundFungalSymbiote; + flags2[4] = HasFoundTrinketOfChi; + flags2[5] = HasFoundGladiatorsLocket; + flags2[6] = HasFoundUnstableGraniteCore; + flags2[7] = HasFoundCrimsonEffigy; + + BitsByte flags3 = new BitsByte(); + flags3[0] = HasFoundCorruptionEffigy; writer.Write(flags); writer.Write(flags2); + writer.Write(flags3); } public static void ReceiveData(BinaryReader reader) @@ -83,6 +122,16 @@ namespace CalamityMod.CustomRecipes BitsByte flags2 = reader.ReadByte(); HasFoundHellSchematic = flags2[0]; HasFoundIceSchematic = flags2[1]; + HasFoundLuxorsGift = flags2[2]; + HasFoundFungalSymbiote = flags2[3]; + HasFoundTrinketOfChi = flags2[4]; + HasFoundGladiatorsLocket = flags2[5]; + HasFoundUnstableGraniteCore = flags2[6]; + HasFoundCrimsonEffigy = flags2[7]; + + BitsByte flags3 = reader.ReadByte(); + HasFoundCorruptionEffigy = flags3[0]; + } } } diff --git a/Items/Accessories/FrozenCube.cs b/Items/Accessories/FrozenCube.cs index 6cd386972d..58765d3548 100644 --- a/Items/Accessories/FrozenCube.cs +++ b/Items/Accessories/FrozenCube.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.CalPlayer; +using CalamityMod.CustomRecipes; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; @@ -35,6 +36,16 @@ namespace CalamityMod.Items.Accessories Item.rare = ItemRarityID.Orange; Item.accessory = true; } + + public override void UpdateInventory(Player player) + { + if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundFrozenCube) + { + RecipeUnlockHandler.HasFoundFrozenCube = true; + CalamityNetcode.SyncWorld(); + } + } + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); @@ -48,6 +59,7 @@ namespace CalamityMod.Items.Accessories Projectile.NewProjectileDirect(player.GetSource_FromThis(), player.Center, Vector2.Zero, projectile, damage, 0f, player.whoAmI); } } + public override void ModifyTooltips(List list) { if (Main.LocalPlayer != null) diff --git a/Items/Accessories/FungalSymbiote.cs b/Items/Accessories/FungalSymbiote.cs index 8f020a1998..2620cdc165 100644 --- a/Items/Accessories/FungalSymbiote.cs +++ b/Items/Accessories/FungalSymbiote.cs @@ -1,4 +1,5 @@ using CalamityMod.CalPlayer; +using CalamityMod.CustomRecipes; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -17,6 +18,15 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } + public override void UpdateInventory(Player player) + { + if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundFungalSymbiote) + { + RecipeUnlockHandler.HasFoundFungalSymbiote = true; + CalamityNetcode.SyncWorld(); + } + } + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); diff --git a/Items/Accessories/GladiatorsLocket.cs b/Items/Accessories/GladiatorsLocket.cs index 104e8933bc..53f1648981 100644 --- a/Items/Accessories/GladiatorsLocket.cs +++ b/Items/Accessories/GladiatorsLocket.cs @@ -1,4 +1,5 @@ using System; +using CalamityMod.CustomRecipes; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -16,6 +17,14 @@ namespace CalamityMod.Items.Accessories Item.rare = ItemRarityID.Orange; Item.accessory = true; } + public override void UpdateInventory(Player player) + { + if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundGladiatorsLocket) + { + RecipeUnlockHandler.HasFoundGladiatorsLocket = true; + CalamityNetcode.SyncWorld(); + } + } public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/LuxorsGift.cs b/Items/Accessories/LuxorsGift.cs index d051683737..ad27354113 100644 --- a/Items/Accessories/LuxorsGift.cs +++ b/Items/Accessories/LuxorsGift.cs @@ -1,4 +1,5 @@ using CalamityMod.CalPlayer; +using CalamityMod.CustomRecipes; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; @@ -35,6 +36,14 @@ namespace CalamityMod.Items.Accessories Item.rare = ItemRarityID.Orange; Item.accessory = true; } + public override void UpdateInventory(Player player) + { + if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundLuxorsGift) + { + RecipeUnlockHandler.HasFoundLuxorsGift = true; + CalamityNetcode.SyncWorld(); + } + } public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/TrinketofChi.cs b/Items/Accessories/TrinketofChi.cs index 5222c8b13a..f3c5c0ff09 100644 --- a/Items/Accessories/TrinketofChi.cs +++ b/Items/Accessories/TrinketofChi.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.StatBuffs; using CalamityMod.CalPlayer; +using CalamityMod.CustomRecipes; using Terraria; using Terraria.ID; using Terraria.Localization; @@ -25,6 +26,15 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } + public override void UpdateInventory(Player player) + { + if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundTrinketOfChi) + { + RecipeUnlockHandler.HasFoundTrinketOfChi = true; + CalamityNetcode.SyncWorld(); + } + } + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); diff --git a/Items/Accessories/UnstableGraniteCore.cs b/Items/Accessories/UnstableGraniteCore.cs index 178ce5ca83..863255e771 100644 --- a/Items/Accessories/UnstableGraniteCore.cs +++ b/Items/Accessories/UnstableGraniteCore.cs @@ -1,4 +1,5 @@ using CalamityMod.CalPlayer; +using CalamityMod.CustomRecipes; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -25,6 +26,15 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } + public override void UpdateInventory(Player player) + { + if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundUnstableGraniteCore) + { + RecipeUnlockHandler.HasFoundUnstableGraniteCore = true; + CalamityNetcode.SyncWorld(); + } + } + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); diff --git a/Items/Placeables/Furniture/CorruptionEffigy.cs b/Items/Placeables/Furniture/CorruptionEffigy.cs index a8a1a05932..1bb305a0d3 100644 --- a/Items/Placeables/Furniture/CorruptionEffigy.cs +++ b/Items/Placeables/Furniture/CorruptionEffigy.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.CustomRecipes; +using Terraria; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -21,6 +22,15 @@ namespace CalamityMod.Items.Placeables.Furniture Item.rare = ItemRarityID.Orange; } + public override void UpdateInventory(Player player) + { + if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundCorruptionEffigy) + { + RecipeUnlockHandler.HasFoundCorruptionEffigy = true; + CalamityNetcode.SyncWorld(); + } + } + public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Placeables/Furniture/CrimsonEffigy.cs b/Items/Placeables/Furniture/CrimsonEffigy.cs index 1662948a74..e5e94ae501 100644 --- a/Items/Placeables/Furniture/CrimsonEffigy.cs +++ b/Items/Placeables/Furniture/CrimsonEffigy.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.CustomRecipes; +using Terraria; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -21,6 +22,15 @@ namespace CalamityMod.Items.Placeables.Furniture Item.rare = ItemRarityID.Orange; } + public override void UpdateInventory(Player player) + { + if (Main.netMode != NetmodeID.MultiplayerClient && !RecipeUnlockHandler.HasFoundCrimsonEffigy) + { + RecipeUnlockHandler.HasFoundCrimsonEffigy = true; + CalamityNetcode.SyncWorld(); + } + } + public override void AddRecipes() { CreateRecipe(). diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 99fe2370e2..569296d0d5 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Threading; +using CalamityMod.CustomRecipes; using CalamityMod.Dusts; using CalamityMod.Items.Accessories; using CalamityMod.Items.Fishing; @@ -284,7 +285,15 @@ namespace CalamityMod.NPCs.TownNPCs .Add(Condition.DownedGoblinArmy) .Add(Condition.DownedGoblinArmy) .Add(Condition.DownedGolem) - + .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundLuxorsGift", () => RecipeUnlockHandler.HasFoundLuxorsGift)) + .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundFungalSymbiote", () => RecipeUnlockHandler.HasFoundFungalSymbiote)) + .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundTrinketOfChi", () => RecipeUnlockHandler.HasFoundTrinketOfChi)) + .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundFrozenCube", () => RecipeUnlockHandler.HasFoundFrozenCube)) + .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundGladiatorsLocket", () => RecipeUnlockHandler.HasFoundGladiatorsLocket)) + .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundUnstableGraniteCore", () => RecipeUnlockHandler.HasFoundUnstableGraniteCore)) + .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundCrimsonEffigy", () => RecipeUnlockHandler.HasFoundCrimsonEffigy)) + .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundCorruptionEffigy", () => RecipeUnlockHandler.HasFoundCorruptionEffigy)) + .Register(); } From 2cdcc2cf6bb7ce86fb85a17a26271bb40e6b5bd1 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 27 May 2026 18:55:48 -0400 Subject: [PATCH 42/58] fix shop listings and item prices --- Items/Accessories/FishStocks.cs | 4 ++-- Items/Placeables/Furniture/GluttonyBlender.cs | 4 ++-- Items/Placeables/Furniture/TheMonument.cs | 2 +- Items/Potions/Alcohol/BaconOil.cs | 2 +- Items/Potions/Food/TheSandwich.cs | 2 +- Items/Potions/TheConcoction.cs | 2 +- NPCs/TownNPCs/ShadySalesman.cs | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Items/Accessories/FishStocks.cs b/Items/Accessories/FishStocks.cs index a5fab55a28..80066d8354 100644 --- a/Items/Accessories/FishStocks.cs +++ b/Items/Accessories/FishStocks.cs @@ -14,10 +14,10 @@ namespace CalamityMod.Items.Accessories { Item.width = 30; Item.height = 38; - Item.value = CalamityGlobalItem.RarityBlueBuyPrice; + Item.value = Item.sellPrice(gold: 1); Item.rare = ItemRarityID.Blue; Item.accessory = true; - } + public override void UpdateAccessory(Player player, bool hideVisual) { player.Calamity().fishStocks = true; diff --git a/Items/Placeables/Furniture/GluttonyBlender.cs b/Items/Placeables/Furniture/GluttonyBlender.cs index f4355809c8..f02730dbab 100644 --- a/Items/Placeables/Furniture/GluttonyBlender.cs +++ b/Items/Placeables/Furniture/GluttonyBlender.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Placeables.Furniture { Item.DefaultToPlaceableTile(ModContent.TileType()); Item.rare = ItemRarityID.Orange; - Item.value = Item.buyPrice(gold: 5); + Item.value = Item.sellPrice(gold: 2); } } @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Placeables.Furniture public override void SetDefaults() { Item.DefaultToFood(32, 30, BuffID.WellFed3, CalamityUtils.MinutesToFrames(30)); - Item.value = Item.sellPrice(gold: 1); + Item.value = Item.sellPrice(gold: 2); Item.rare = ItemRarityID.Orange; } } diff --git a/Items/Placeables/Furniture/TheMonument.cs b/Items/Placeables/Furniture/TheMonument.cs index 4f57836dea..9d503effcc 100644 --- a/Items/Placeables/Furniture/TheMonument.cs +++ b/Items/Placeables/Furniture/TheMonument.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Placeables.Furniture Item.width = 40; Item.height = 50; Item.rare = ItemRarityID.Pink; - Item.value = Item.buyPrice(gold: 5); + Item.value = Item.sellPrice(gold: 5); } public override void Load() diff --git a/Items/Potions/Alcohol/BaconOil.cs b/Items/Potions/Alcohol/BaconOil.cs index d3b20577ee..54a518776d 100644 --- a/Items/Potions/Alcohol/BaconOil.cs +++ b/Items/Potions/Alcohol/BaconOil.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetDefaults() { Item.DefaultToFood(20, 32, ModContent.BuffType(), CalamityUtils.MinutesToFrames(6), true); - Item.value = Item.sellPrice(silver: 2); + Item.value = Item.sellPrice(silver: 6); Item.rare = ItemRarityID.Blue; } diff --git a/Items/Potions/Food/TheSandwich.cs b/Items/Potions/Food/TheSandwich.cs index f99710a8c7..1a35ab12f9 100644 --- a/Items/Potions/Food/TheSandwich.cs +++ b/Items/Potions/Food/TheSandwich.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Potions.Food public override void SetDefaults() { Item.DefaultToFood(70, 48, ModContent.BuffType(), CalamityUtils.MinutesToFrames(10)); - Item.value = Item.sellPrice(silver: 20); + Item.value = Item.sellPrice(silver: 4); Item.rare = ItemRarityID.Blue; } public override void UseAnimation(Player player) diff --git a/Items/Potions/TheConcoction.cs b/Items/Potions/TheConcoction.cs index 0c9ebf0c0c..c35ed90bbd 100644 --- a/Items/Potions/TheConcoction.cs +++ b/Items/Potions/TheConcoction.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Potions public override void SetDefaults() { Item.DefaultToHealingPotion(50, 56, 500); - Item.value = Item.sellPrice(silver: 60); + Item.value = Item.sellPrice(silver: 20); Item.rare = ItemRarityID.Green; } diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 569296d0d5..19f524257c 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -270,7 +270,6 @@ namespace CalamityMod.NPCs.TownNPCs shop.Add() .Add() .Add() - .Add() .Add() .Add() .Add() @@ -279,9 +278,10 @@ namespace CalamityMod.NPCs.TownNPCs .Add() .Add() .Add() + .Add() .Add(Condition.DownedGoblinArmy) .Add(Condition.DownedGoblinArmy) - .Add(Condition.DownedGoblinArmy) + .Add(Condition.DownedGoblinArmy) .Add(Condition.DownedGoblinArmy) .Add(Condition.DownedGoblinArmy) .Add(Condition.DownedGolem) From 4782fd7fd06bde2a82570cfe0ee8143b0c4d5ab7 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 27 May 2026 18:56:02 -0400 Subject: [PATCH 43/58] fail --- Items/Accessories/FishStocks.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Items/Accessories/FishStocks.cs b/Items/Accessories/FishStocks.cs index 80066d8354..43d03d33c2 100644 --- a/Items/Accessories/FishStocks.cs +++ b/Items/Accessories/FishStocks.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Items.Accessories Item.value = Item.sellPrice(gold: 1); Item.rare = ItemRarityID.Blue; Item.accessory = true; + } public override void UpdateAccessory(Player player, bool hideVisual) { From d7904da9fc232cd3bbb86fa8367b9c1ee594c54f Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 27 May 2026 20:01:08 -0400 Subject: [PATCH 44/58] fix formatting, one sell price change --- Items/Placeables/Furniture/TheMonument.cs | 2 +- .../en-US/Mods.CalamityMod.Condition.hjson | 8 ++++++++ NPCs/TownNPCs/ShadySalesman.cs | 16 ++++++++-------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Items/Placeables/Furniture/TheMonument.cs b/Items/Placeables/Furniture/TheMonument.cs index 9d503effcc..c6b9e41b2f 100644 --- a/Items/Placeables/Furniture/TheMonument.cs +++ b/Items/Placeables/Furniture/TheMonument.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Placeables.Furniture Item.width = 40; Item.height = 50; Item.rare = ItemRarityID.Pink; - Item.value = Item.sellPrice(gold: 5); + Item.value = Item.sellPrice(gold: 20); } public override void Load() diff --git a/Localization/en-US/Mods.CalamityMod.Condition.hjson b/Localization/en-US/Mods.CalamityMod.Condition.hjson index b757a152d4..92ea380b28 100644 --- a/Localization/en-US/Mods.CalamityMod.Condition.hjson +++ b/Localization/en-US/Mods.CalamityMod.Condition.hjson @@ -62,3 +62,11 @@ InSulph: In the Sulphurous Sea InSunken: In the Sunken Sea InRev: In Revengeance Mode InRevOrMM: In Revengeance Mode or in Master Mode +HasFoundCorruptionEffigy: After obtaining Corruption Effigy +HasFoundCrimsonEffigy: After obtaining Crimson Effigy +HasFoundUnstableGraniteCore: After obtaining Unstable Granite Core +HasFoundGladiatorsLocket: After obtaining Gladiator's Locket +HasFoundFrozenCube: After obtaining Frozen Cube +HasFoundTrinketOfChi: After obtaining Trinket of Chi +HasFoundFungalSymbiote: After obtaining Fungal Symbiote +HasFoundLuxorsGift: After obtaining Luxor's Gift diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 19f524257c..5a819f535b 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -285,14 +285,14 @@ namespace CalamityMod.NPCs.TownNPCs .Add(Condition.DownedGoblinArmy) .Add(Condition.DownedGoblinArmy) .Add(Condition.DownedGolem) - .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundLuxorsGift", () => RecipeUnlockHandler.HasFoundLuxorsGift)) - .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundFungalSymbiote", () => RecipeUnlockHandler.HasFoundFungalSymbiote)) - .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundTrinketOfChi", () => RecipeUnlockHandler.HasFoundTrinketOfChi)) - .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundFrozenCube", () => RecipeUnlockHandler.HasFoundFrozenCube)) - .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundGladiatorsLocket", () => RecipeUnlockHandler.HasFoundGladiatorsLocket)) - .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundUnstableGraniteCore", () => RecipeUnlockHandler.HasFoundUnstableGraniteCore)) - .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundCrimsonEffigy", () => RecipeUnlockHandler.HasFoundCrimsonEffigy)) - .Add(new Condition("Mods.CalamityMod.Conditions.HasFoundCorruptionEffigy", () => RecipeUnlockHandler.HasFoundCorruptionEffigy)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundLuxorsGift"), () => RecipeUnlockHandler.HasFoundLuxorsGift)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundFungalSymbiote"), () => RecipeUnlockHandler.HasFoundFungalSymbiote)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundTrinketOfChi"), () => RecipeUnlockHandler.HasFoundTrinketOfChi)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundFrozenCube"), () => RecipeUnlockHandler.HasFoundFrozenCube)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundGladiatorsLocket"), () => RecipeUnlockHandler.HasFoundGladiatorsLocket)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundUnstableGraniteCore"), () => RecipeUnlockHandler.HasFoundUnstableGraniteCore)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundCrimsonEffigy"), () => RecipeUnlockHandler.HasFoundCrimsonEffigy)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundCorruptionEffigy"), () => RecipeUnlockHandler.HasFoundCorruptionEffigy)) .Register(); } From e5b9040f13909d92bbb6592bbf1bec41bfadf125 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 28 May 2026 20:15:58 -0400 Subject: [PATCH 45/58] part of shop changes --- NPCs/TownNPCs/ShadySalesman.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 5a819f535b..13d4265dae 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -28,6 +28,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.Chat; +using Terraria.Enums; using Terraria.GameContent; using Terraria.GameContent.Bestiary; using Terraria.GameContent.Events; @@ -285,14 +286,14 @@ namespace CalamityMod.NPCs.TownNPCs .Add(Condition.DownedGoblinArmy) .Add(Condition.DownedGoblinArmy) .Add(Condition.DownedGolem) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundLuxorsGift"), () => RecipeUnlockHandler.HasFoundLuxorsGift)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundFungalSymbiote"), () => RecipeUnlockHandler.HasFoundFungalSymbiote)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundTrinketOfChi"), () => RecipeUnlockHandler.HasFoundTrinketOfChi)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundFrozenCube"), () => RecipeUnlockHandler.HasFoundFrozenCube)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundGladiatorsLocket"), () => RecipeUnlockHandler.HasFoundGladiatorsLocket)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundUnstableGraniteCore"), () => RecipeUnlockHandler.HasFoundUnstableGraniteCore)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundCrimsonEffigy"), () => RecipeUnlockHandler.HasFoundCrimsonEffigy)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundCorruptionEffigy"), () => RecipeUnlockHandler.HasFoundCorruptionEffigy)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundLuxorsGift"), () => RecipeUnlockHandler.HasFoundLuxorsGift && Main.moonPhase == 0)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundFungalSymbiote"), () => RecipeUnlockHandler.HasFoundFungalSymbiote && Main.moonPhase == 1)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundTrinketOfChi"), () => RecipeUnlockHandler.HasFoundTrinketOfChi && Main.moonPhase == 2)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundFrozenCube"), () => RecipeUnlockHandler.HasFoundFrozenCube && Main.moonPhase == 3)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundGladiatorsLocket"), () => RecipeUnlockHandler.HasFoundGladiatorsLocket && Main.moonPhase == 4)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundUnstableGraniteCore"), () => RecipeUnlockHandler.HasFoundUnstableGraniteCore && Main.moonPhase == 5)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundCrimsonEffigy"), () => RecipeUnlockHandler.HasFoundCrimsonEffigy && Main.moonPhase == 6)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundCorruptionEffigy"), () => RecipeUnlockHandler.HasFoundCorruptionEffigy && Main.moonPhase == 7)) .Register(); } From 5341bcd36d3187f32132063feffcbeaa4689934b Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 28 May 2026 22:00:32 -0400 Subject: [PATCH 46/58] Reordering, more time-locked options --- NPCs/TownNPCs/ShadySalesman.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 13d4265dae..3151618551 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -268,24 +268,22 @@ namespace CalamityMod.NPCs.TownNPCs public override void AddShops() { NPCShop shop = new(Type); - shop.Add() - .Add() - .Add() + shop.Add() .Add() + .Add() + .Add() + .Add() + .Add(Condition.DownedGoblinArmy) + .Add(Condition.DownedGoblinArmy, Condition.MoonPhases04) + .Add(Condition.DownedGoblinArmy, Condition.MoonPhases15) + .Add(Condition.DownedGoblinArmy, Condition.MoonPhases26) + .Add(Condition.DownedGoblinArmy, Condition.MoonPhases37) .Add() .Add() .Add() .Add() .Add() - .Add() - .Add() .Add() - .Add(Condition.DownedGoblinArmy) - .Add(Condition.DownedGoblinArmy) - .Add(Condition.DownedGoblinArmy) - .Add(Condition.DownedGoblinArmy) - .Add(Condition.DownedGoblinArmy) - .Add(Condition.DownedGolem) .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundLuxorsGift"), () => RecipeUnlockHandler.HasFoundLuxorsGift && Main.moonPhase == 0)) .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundFungalSymbiote"), () => RecipeUnlockHandler.HasFoundFungalSymbiote && Main.moonPhase == 1)) .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundTrinketOfChi"), () => RecipeUnlockHandler.HasFoundTrinketOfChi && Main.moonPhase == 2)) @@ -294,6 +292,8 @@ namespace CalamityMod.NPCs.TownNPCs .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundUnstableGraniteCore"), () => RecipeUnlockHandler.HasFoundUnstableGraniteCore && Main.moonPhase == 5)) .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundCrimsonEffigy"), () => RecipeUnlockHandler.HasFoundCrimsonEffigy && Main.moonPhase == 6)) .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundCorruptionEffigy"), () => RecipeUnlockHandler.HasFoundCorruptionEffigy && Main.moonPhase == 7)) + .Add(Condition.Hardmode) + .Add(Condition.DownedGolem) .Register(); } From a737ff6d5bf002d158f45e06cc6c6df8d4e3b150 Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Sat, 30 May 2026 15:41:52 -0500 Subject: [PATCH 47/58] Sales Pitch Text System --- ChatTags/SmallTextHandler.cs | 53 +++++++++ NPCs/TownNPCs/ShadySalesman.cs | 139 +++++++++++++++++++++--- Systems/Collections/CalamityItemSets.cs | 17 ++- 3 files changed, 195 insertions(+), 14 deletions(-) create mode 100644 ChatTags/SmallTextHandler.cs diff --git a/ChatTags/SmallTextHandler.cs b/ChatTags/SmallTextHandler.cs new file mode 100644 index 0000000000..44dfcb367c --- /dev/null +++ b/ChatTags/SmallTextHandler.cs @@ -0,0 +1,53 @@ +using System; +using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.Rarities; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using Terraria; +using Terraria.GameContent; +using Terraria.UI.Chat; + +namespace CalamityMod.ChatTags +{ + public sealed class SmallTextHandler : AbstractTagHandler + { + protected override string[] TagNames { get; } = ["scale"]; + public override TextSnippet Parse(string text, Color baseColor = new(), string options = null) + { + if (float.TryParse(options, out float result)) + return new SmallTextSnippet(text, baseColor,result); + + return new SmallTextSnippet(text, baseColor); + } + } + public sealed class SmallTextSnippet(string text) : TextSnippet + { + public SmallTextSnippet( string text, Color color, float scale = 0.5f) : this(text) + { + textColor = color; + Scale = scale; + } + + Color textColor = Color.White; + public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1) + { + color = textColor; + + size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * Scale); + + if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0) && Color != Color.Transparent) + { + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, text, position, color, 0, Vector2.Zero, new Vector2(scale)); + } + return true; + } + public override float GetStringLength(DynamicSpriteFont font) + { + float size = font.MeasureString(text).X; + return size * Scale; + } + } +} diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 3151618551..697a0aa1cd 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -1,40 +1,35 @@ using System; using System.Collections.Generic; -using System.Threading; +using System.Collections.ObjectModel; +using CalamityMod.ChatTags; using CalamityMod.CustomRecipes; -using CalamityMod.Dusts; using CalamityMod.Items.Accessories; using CalamityMod.Items.Fishing; using CalamityMod.Items.Fishing.FishingRods; -using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Items.Placeables.Furniture; -using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.Potions.Alcohol; using CalamityMod.Items.Potions.Food; using CalamityMod.Items.SummonItems.TownPets; using CalamityMod.Items.Tools; -using CalamityMod.Items.Weapons.Magic; -using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.Items.Weapons.Summon; using CalamityMod.Particles; using CalamityMod.Projectiles.Typeless; +using CalamityMod.Systems.Collections; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.Chat; -using Terraria.Enums; using Terraria.GameContent; using Terraria.GameContent.Bestiary; -using Terraria.GameContent.Events; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; +using Terraria.UI.Chat; using Terraria.Utilities; namespace CalamityMod.NPCs.TownNPCs @@ -130,7 +125,7 @@ namespace CalamityMod.NPCs.TownNPCs NPC.netSkip = -1; } return false; - } + } } return true; @@ -172,7 +167,7 @@ namespace CalamityMod.NPCs.TownNPCs } hasFiredShotThisAttack = true; NPC.netUpdate = true; - } + } } else { @@ -531,8 +526,18 @@ namespace CalamityMod.NPCs.TownNPCs hardmode.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, ModContent.ItemType())); } - } + public override void ModifyActiveShop(string shopName, Item[] items) + { + ShadySalesmanShopTooltips.addSalesPitch = true; + } + + public override void ResetEffects() + { + if (Main.npcShop < 1) //ModifyActiveShop only runs once when shop opens, so we only reset this if no shop is open + ShadySalesmanShopTooltips.addSalesPitch = false; + } + } public class ShadySalesmanSpawnSystem : ModSystem { @@ -548,7 +553,7 @@ namespace CalamityMod.NPCs.TownNPCs if (!CanSpawnTonight || Main.eclipse || (Main.invasionType > 0 && Main.invasionDelay == 0 && Main.invasionSize > 0)) return; - + for (int i = 0; i < 200; i++) if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) return; @@ -592,4 +597,112 @@ namespace CalamityMod.NPCs.TownNPCs CanSpawnTonight = false; } } + + public class ShadySalesmanShopTooltips : GlobalItem + { + /// + /// Scale for the "fine print" of the shop. + /// + public static float SmallTextSize => 0.66f; + /// + /// Tooltip Line names that should be left alone instead of becoming fine print + /// All exempted tooltip lines are moved above the fine print section + /// + static List ExemptFromSmall => [ + "ItemName", + "SalesPitch", + "Price", + "SpecialPrice", + "JourneyResearch", + ]; + public override void Load() + { + On_ChatManager.DrawColorCodedStringShadow_SpriteBatch_DynamicSpriteFont_TextSnippetArray_Vector2_Color_float_Vector2_Vector2_float_float += HideDefaultShadowForSmallText; + } + + // Doze May 30 2026 + // Terraria forces drawing the shadow effects for all tooltip texts. + // This system forces the shadows to be transparent for SmallTextSnippets as it draws the shadows manually + private void HideDefaultShadowForSmallText(On_ChatManager.orig_DrawColorCodedStringShadow_SpriteBatch_DynamicSpriteFont_TextSnippetArray_Vector2_Color_float_Vector2_Vector2_float_float orig, SpriteBatch spriteBatch, ReLogic.Graphics.DynamicSpriteFont font, TextSnippet[] snippets, Vector2 position, Color baseColor, float rotation, Vector2 origin, Vector2 baseScale, float maxWidth, float spread) + { + List colorsToRestore = []; + foreach (var item in snippets) + { + if (item is SmallTextSnippet s) + { + colorsToRestore.Add(s.Color); + s.Color = Color.Transparent; + } + } + orig(spriteBatch, font, snippets, position, baseColor, rotation, origin, baseScale, maxWidth, spread); + if (colorsToRestore.Count > 0) + foreach (var item in snippets) + { + if (item is SmallTextSnippet s) + { + s.Color = colorsToRestore[0]; + colorsToRestore.RemoveAt(0); + } + } + } + + public static bool addSalesPitch = false; //Used to track if the shop should show the pitches + + public override void ModifyTooltips(Item item, List tooltips) + { + if (!addSalesPitch || !CalamityItemSets.HasSalesmanText[item.type]) + return; + tooltips.Insert(1, new TooltipLine(Mod, "SalesPitch", item.ModItem?.GetLocalizedValue("SalesPitch") ?? "Error: Sales Pitches not supported for vanilla items") // While vanilla item support COULD be added, salesman won't need sales pitches for vanilla items ever and so this is fine. + { + }); + + int placetoMove = -1; + + for (var i = 0; i < tooltips.Count; i++) + { + var line = tooltips[i]; + if (!ExemptFromSmall.Contains(line.Name)) + { + if (placetoMove < 0) + placetoMove = i; + TextSnippet[] snippets = ChatManager.ParseMessage(line.Text, Color.White).ToArray(); + ChatManager.ConvertNormalSnippets(snippets); + + string lineText = ""; + for (int i2 = 0; i2 < snippets.Length; i2++) + { + lineText += snippets[i2].Text; + } + + if (string.IsNullOrWhiteSpace(lineText)) + //Sometimes the game tries to draw entirely empty lines with no size. + //This would cause no issue except for it still applies the Y offset those lines + //So, we just force hide those lines entirely here + line.Hide(); + else + line.Text = $"[scale/{SmallTextSize}:{lineText}]"; + + } + else if (placetoMove > 0) + { + tooltips.RemoveAt(i); + tooltips.Insert(placetoMove, line); + placetoMove++; + } + + } + } + + public override bool PreDrawTooltipLine(Item item, DrawableTooltipLine line, ref int yOffset) + { + //Applies the Y offset to lines that are small to ensure they line up properly visually. + //Without this, they'd stay spaced the same as normal text... + //although the tooltip background would still size as if they're stacked closer like this does. Thanks vanilla code jank. + if (line.Text.StartsWith($"[scale/{SmallTextSize}:")) + { + yOffset = -(int)(FontAssets.MouseText.Value.MeasureString(" ") * (1 - SmallTextSize)).Y - 1; + } + return base.PreDrawTooltipLine(item, line, ref yOffset); + } + } } diff --git a/Systems/Collections/CalamityItemSets.cs b/Systems/Collections/CalamityItemSets.cs index 529e6a3d9c..57e8d38d0e 100644 --- a/Systems/Collections/CalamityItemSets.cs +++ b/Systems/Collections/CalamityItemSets.cs @@ -1,4 +1,11 @@ -using CalamityMod.Items.Fishing.FishingRods; +using CalamityMod.Items.Accessories; +using CalamityMod.Items.Fishing; +using CalamityMod.Items.Fishing.FishingRods; +using CalamityMod.Items.Placeables; +using CalamityMod.Items.Placeables.Furniture; +using CalamityMod.Items.Potions; +using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.Items.Potions.Food; using CalamityMod.Items.Tools; using CalamityMod.Items.Weapons.DraedonsArsenal; using CalamityMod.Items.Weapons.Magic; @@ -134,5 +141,13 @@ namespace CalamityMod.Systems.Collections public static bool[] RogueSpikyBall = Factory.CreateNamedSet("RogueSpikyBall") .Description("Labels this item as a rogue spiky ball, only exists for objective classification.") .RegisterBoolSet(ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType()); + + /// + /// Marks that this item has Shady Salesman text and the actual tooltip should draw small below it. Does not support Vanilla items + /// + public static bool[] HasSalesmanText = Factory.CreateNamedSet("HasSalesmanText") + .Description("Marks that this item has Shady Salesman text and the actual tooltip should draw small below it. Does not support Vanilla items") + .RegisterBoolSet(ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), + ItemType(), ItemType(), ItemType(), ItemType(), ItemType()); } } From b675d11076b9bde49ba822c1ba26162ce9111766 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 1 Jun 2026 23:59:54 -0400 Subject: [PATCH 48/58] New dialogue --- .../Mods.CalamityMod.Items.Accessories.hjson | 5 +++ .../Mods.CalamityMod.Items.Fishing.hjson | 10 +++++ .../Mods.CalamityMod.Items.Placeables.hjson | 15 ++++++++ .../Mods.CalamityMod.Items.Potions.hjson | 20 ++++++++++ .../en-US/Mods.CalamityMod.Items.Tools.hjson | 30 +++++++++++++++ ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 7 +++- .../en-US/Mods.CalamityMod.NPCs.hjson | 5 ++- ...ods.CalamityMod.Projectiles.Typeless.hjson | 2 +- NPCs/TownNPCs/ShadySalesman.cs | 38 ++++++++++++------- 9 files changed, 114 insertions(+), 18 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 98e8cdbd16..db2b24335e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -800,6 +800,11 @@ FishStocks: { +0.55 luck 1.5x coin drops ''' + SalesPitch: + ''' + ‘Fishing is hard, but you know what’s easy? Economy! With this little gadget made by my partner Hoggart, you can make the process just as easy!’ + ‘Pull the line when it’s up, don’t when it’s down! It’s as simple as that!’ + ''' } FlameLickedShell: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson index 98400df192..771b6456ec 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson @@ -379,6 +379,11 @@ TrustyOldRod: { This ol' thing has never failed to pull in a big haul Who knows what it will reel in next! ''' + SalesPitch: + ''' + ‘Me and Hoggart have worked together with the best fishermen in the world to bring you the most effective rod on the market!’ + ‘With state of the art technology, you can fish anything! Don’t let a single creature elude your hook anymore!’ + ''' } VerstaltiteFishingRod: { @@ -407,6 +412,11 @@ RageBait: { The absolute best bait on the market! And for so cheap too... Even comes with free Sonar Potion effect! ''' + SalesPitch: + ''' + ‘Do you want to know a secret? Fishing takes so long because the fish are dumb! They’ll always swim right by your hook!’ + ‘But with this bait right here? No longer! It’ll make your hook the only thing they can think of. You’ll be swimming in fishes in the blink of an eye!’ + ''' } GrandMarquisBait: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index 4f4d3f9c8d..bfdc208b7a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -805,6 +805,11 @@ GluttonyBlender: { A strange industrial contraption which appears to process food Has the potential to turn food into something more nutritious... maybe ''' + SalesPitch: + ''' + ‘A state of the art machine, created by my partner Hoggart! You can put anything on it, and it’ll make a nutritious delicacy for you to snack on!’ + ‘I myself can attest for its quality, I use it to make my breakfast, lunch and dinner!’ + ''' } LanternCenter: { @@ -1011,6 +1016,11 @@ TheMonument: { A monument celebrating the accomplishments of capitalism Funded by the taxes of nearby Town NPCs, though they may not be too happy about that ''' + SalesPitch: + ''' + ‘Don’t you think your town is a bit too boring? Don’t you wish you could get more money out of your troubles? Well, I’ve got you the perfect two-in-one deal!’ + ‘This statue I made myself is so marvelous that it’ll singlehandedly raise the price of housing around here! Just sit back, and enjoy the sight and the money!’ + ''' } ThermalTorch: { @@ -4722,4 +4732,9 @@ MossyStone: { GreedPot: { DisplayName: Urn of Avarice Tooltip: Offer your treasures to the Urn, and your avarice may at last be satiated + SalesPitch: + ''' + ‘Say, you use all kinds of ores for your stuff, but finding precious minerals isn’t easy, is it? Well, I got the solution for you!’ + ‘Just throw any ore you got on this urn and they’ll turn into even rarer ones! No more looking for tungsten for hours on end!’ + ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson index 3fdbf10098..ae2d24e8f0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson @@ -161,6 +161,11 @@ TheConcoction: { DisplayName: The Concoction EasterEggText: Removes 500 life Tooltip: "" + SalesPitch: + ''' + ‘Aren’t you tired of how unreliable your healing potions are? What if you’re in the middle of a zombie horde and sick to the core of those things?!’ + ‘With my concoction, you won’t have to worry about that! Just a sip of this bad boy and you’ll be good as new, ready to take on the world!’ + ''' } ZenPotion: { @@ -187,6 +192,11 @@ BaconOil: { Counts as 3 alcohols for {$Buffs.AlcoholPoisoning.DisplayName} When combined with drinking Bacon Oil straight, mobility becomes zanier ''' + SalesPitch: + ''' + ‘Monks go on and on about forgoing attachment. I don’t think this is what they meant. It’s better!’ + ‘Don’t mind the accident disclaimer: get yourself some of this slippery fat oil, and not a bit of this world will be able to hold you down!’ + ''' } BloodyMary: { @@ -494,6 +504,11 @@ TheElixir: { Functions as a Potion of Return Occasionally sends you... [c/AA23C4:somewhere else] ''' + SalesPitch: + ''' + ‘Return potions are nifty and all, but they taste like bogus! But with my special formula, it'll magically taste like your favorite food!’ + ‘Besides, you ain’t finding them for much cheaper around these parts. Trust me, you’re practically stealing me!’ + ''' } Vodka: { @@ -614,4 +629,9 @@ TheSandwich: { Alcohol effects will not expire while under the effects of The Sandwich 'Might actually taste good if it was the only thing you'd ever eaten...' ''' + SalesPitch: + ''' + ‘...You want to buy my lunch?’ + ‘Well, no matter! But it won’t be cheap! This sandwich is made with the best the market can offer, so get your wallet out!’ + ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index c80e1430d7..468421479c 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -23,6 +23,11 @@ AggressiveVoucher: { Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] ''' + SalesPitch: + ''' + ‘That goblin over there, he’s just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ + ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It’ll be like a new item!” + ''' } AntiCystOintment: { @@ -160,6 +165,11 @@ CombatVoucher: { Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge This effect only applies when reforging weapons ''' + SalesPitch: + ''' + ‘That goblin over there, he’s just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ + ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It’ll be like a new item!” + ''' } Cosmolight: { @@ -236,6 +246,11 @@ HurriedVoucher: { Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] ''' + SalesPitch: + ''' + ‘That goblin over there, he’s just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ + ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It’ll be like a new item!” + ''' } InfernaCutter: { @@ -311,6 +326,11 @@ OddVoucher: { Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] ''' + SalesPitch: + ''' + ‘That goblin over there, he’s just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ + ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It’ll be like a new item!” + ''' } ReefclawHamaxe: { @@ -414,6 +434,11 @@ TheGift: { Effect will last for 24 hours [c/F54278:'There's no return policy, better be responsible'] ''' + SalesPitch: + ''' + ‘Buying gifts to people is hard, and you gotta make sure your people are happy, so how about we kill two birds with one stone?’ + ‘Hand this nifty box to someone and it’ll suddenly contain the perfect gift for the person you handed it to!' + ''' } TorrentialTear: { @@ -436,6 +461,11 @@ UnbreakableVoucher: { Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] ''' + SalesPitch: + ''' + ‘That goblin over there, he’s just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ + ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It’ll be like a new item!” + ''' } VoodooDemonVoodooDoll: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index aac6009be7..f5e1c46fb4 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -849,8 +849,11 @@ OmniGun: { The second shot is a burst of 10 standard bullets The third shot is a devastating point blank spread The fourth shot is a dangerous but powerful grenade which destroys everything, including you - 'What kind of gun is it?' - 'Yes' + ''' + SalesPitch: + ''' + ‘Why carry four different guns when you can carry just one? That’s what I used to ask myself!’ + ‘With this thing-a-beauty, even a bumbling moron can become invincible - and for the right price, it can be yours!’ ''' } diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 9b6f27093b..57481ddf3b 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -319,7 +319,6 @@ Shoreskipper.DisplayName: Shoreskipper BrainIllusion.DisplayName: Brain Illusion FalseBrain.DisplayName: False Brain BloodBomb.DisplayName: Blood Bomb - // Town NPCs, Pets, etc AndroombaFriendly.DisplayName: Androomba Pal @@ -591,6 +590,10 @@ ShadySalesman: { Normal4: Is your life rapidly shrinking? Want to know this world’s marvels before your time comes? Are the local merchants only showing you worthless hogwash?! Worry not, Hoggart and I have just the solution! Hogwash sold separately. Normal5: There’s a saying that goes “the grass is greener on the other side.” It’s absolute balderdash!! For 5 platinum coins, you can buy our Greener Paint and make your life the greenest! Normal6: They say keeping an Angel Statue nearby is more dangerous than a loaded gun. That’s why I own multiple guns - in case some hooligan tries to sell me an Angel Statue! + TownPigPresent1: You’re searching for the lil’ Piggy? Don’t worry, chum! Hoggart and I gave it a Camo-Projector 2000 so it could disappear into the night. This way, not a single rotbrain will lay their nasty half-fingers on it, huehe! + TownPigPresent2: Rumors are runnin’ around that I’m inexplicably two Pigg’ins stacked on top of each other. What shameless slander! Don’t they know that, if that were true, I’d charge twice the price? Hahaha! + TownPigPresent3: You better take real good care of that piglet. Your sight gotta be good for something other than eyeballing my discounts! Otherwise, who knows what will happen to the swine stock market... + TownPigPresent4: Where the Piggy went? Could’ve sworn I saw it chasing down a four-legged carrot. Now’s your chance to chase Fortune and Glory, pal, by buying these MARVELOUS wares! Rain: People always say “rain, rain, go away! Come back another day!”, but everyone knows it would be better if it came back never! To solve this, I intend to invest in Hoggart’s Dome Program, we just need 500 platinum coins to get it off the ground! WindyDay: Aren’t you tired of your house being blown away by any shoddy gust of wind? Well, I have the solution to your problem! With my state-of-the-art industrial super glue (for only 5 gold coins a pack), you too may survive the attack of invaders with outstanding lung capacity! Desert: Exhausted from this oven-like heat? Yearning for something to help you cool down? Check out our revolutionary new product: water! It comes in all flavors of flavorless! Any bottle shape is available, from round to triangular! Feel the chill of molten ice as it enters your guts! It even has healing properties! Sip our free sample for the low price of 50 gold! diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index 20226df370..05be553677 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -180,4 +180,4 @@ WulfrumHook.DisplayName: Wulfrum Slingshot WulfrumLureSignal.DisplayName: Signal YellowLabSeeker.DisplayName: Seeking Mechanism XykDeathAnim.DisplayName: Xyk Death Animation -XykWings.DisplayName: Xyk Wings \ No newline at end of file +XykWings.DisplayName: Xyk Wings diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 697a0aa1cd..4198017679 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -1,36 +1,36 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using CalamityMod.ChatTags; -using CalamityMod.CustomRecipes; using CalamityMod.Items.Accessories; -using CalamityMod.Items.Fishing; -using CalamityMod.Items.Fishing.FishingRods; -using CalamityMod.Items.Placeables; using CalamityMod.Items.Placeables.Furniture; using CalamityMod.Items.Potions; using CalamityMod.Items.Potions.Alcohol; -using CalamityMod.Items.Potions.Food; -using CalamityMod.Items.SummonItems.TownPets; -using CalamityMod.Items.Tools; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.Particles; -using CalamityMod.Projectiles.Typeless; using CalamityMod.Systems.Collections; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; -using Terraria.Audio; -using Terraria.Chat; using Terraria.GameContent; -using Terraria.GameContent.Bestiary; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; +using CalamityMod.ChatTags; +using CalamityMod.CustomRecipes; +using CalamityMod.Items.Fishing; +using CalamityMod.Items.Fishing.FishingRods; +using CalamityMod.Items.Placeables; +using CalamityMod.Items.Potions.Food; +using CalamityMod.Items.SummonItems.TownPets; +using CalamityMod.Items.Tools; +using CalamityMod.Particles; +using CalamityMod.Projectiles.Typeless; +using Terraria.Audio; +using Terraria.Chat; +using Terraria.GameContent.Bestiary; using Terraria.UI.Chat; using Terraria.Utilities; +using static Terraria.ModLoader.ModContent; namespace CalamityMod.NPCs.TownNPCs { @@ -193,6 +193,8 @@ namespace CalamityMod.NPCs.TownNPCs public override string GetChat() { + int piggyIndex = NPC.FindFirstNPC(ModContent.NPCType()); + WeightedRandom dialogue = new WeightedRandom(); dialogue.Add(this.GetLocalizedValue("Chat.Normal1")); @@ -202,6 +204,14 @@ namespace CalamityMod.NPCs.TownNPCs dialogue.Add(this.GetLocalizedValue("Chat.Normal5")); dialogue.Add(this.GetLocalizedValue("Chat.Normal6")); + if (piggyIndex != -1) + { + dialogue.Add(this.GetLocalizedValue("Chat.TownPigPresent1")); + dialogue.Add(this.GetLocalizedValue("Chat.TownPigPresent2")); + dialogue.Add(this.GetLocalizedValue("Chat.TownPigPresent3")); + dialogue.Add(this.GetLocalizedValue("Chat.TownPigPresent4")); + } + if (Main.raining) { dialogue.Add(this.GetLocalizedValue("Chat.Rain")); From 0f74c6249f8b4b247202398120daf6f729c44d8e Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Tue, 2 Jun 2026 00:24:39 -0400 Subject: [PATCH 49/58] fixed concoction tooltip --- Items/Potions/TheConcoction.cs | 52 ++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/Items/Potions/TheConcoction.cs b/Items/Potions/TheConcoction.cs index c35ed90bbd..2c96484063 100644 --- a/Items/Potions/TheConcoction.cs +++ b/Items/Potions/TheConcoction.cs @@ -14,8 +14,6 @@ namespace CalamityMod.Items.Potions { public class TheConcoction : ModItem, ILocalizedModType { - private static int hoverTimer = 0; - private static bool wasHovering = false; public new string LocalizationCategory => "Items.Potions"; public override void SetStaticDefaults() @@ -39,30 +37,21 @@ namespace CalamityMod.Items.Potions public override void OnConsumeItem(Player player) { - TheConcoctionPlayer cocPlayer = player.GetModPlayer(); - cocPlayer.swinesWrathCounter = 1200; // Creates a 10 second delay before the buff is visible (triggers at 600) + TheConcoctionPlayer concoctionPlayer = player.GetModPlayer(); + concoctionPlayer.swinesWrathCounter = 1200; // Creates a 10 second delay before the buff is visible (triggers at 600) } - - public override void UpdateInventory(Player player) - { - wasHovering = Main.HoverItem?.type == Type; - } - - // Display different text for the first 10 frames of hovering over the item's tooltip. public override void ModifyTooltips(List tooltips) { - bool isHovering = Main.HoverItem?.type == Type; + TheConcoctionPlayer concoctionPlayer = Main.LocalPlayer.GetModPlayer(); - if (isHovering && !wasHovering) - hoverTimer = 0; - if (isHovering) - hoverTimer++; - - if (hoverTimer <= 10 && hoverTimer > 0) + if (concoctionPlayer.hoverTimer <= 10 && concoctionPlayer.hoverTimer > 0) { TooltipLine healLine = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "HealLife"); - healLine?.Text = this.GetLocalization("EasterEggText").Value; + if (healLine != null) + { + healLine.Text = this.GetLocalization("EasterEggText").Value; + } } } } @@ -70,20 +59,39 @@ namespace CalamityMod.Items.Potions public class TheConcoctionPlayer : ModPlayer { public int swinesWrathCounter = -1; - + + public int hoverTimer = 0; + public bool wasHovering = false; + public override void PostUpdate() { if (swinesWrathCounter > 0) { swinesWrathCounter--; - if (swinesWrathCounter <= 600 && !Player.HasBuff()) // When there is 10 seconds left + if (swinesWrathCounter <= 600 && !Player.HasBuff()) { Player.AddBuff(ModContent.BuffType(), 600); - SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Item/SwinesWrathProc"), Player.Center); } } + + if (Main.myPlayer == Player.whoAmI) + { + // Check if hover over the right item + bool isHovering = Main.HoverItem?.type == ModContent.ItemType(); + + if (isHovering && !wasHovering) + hoverTimer = 0; + + if (isHovering) + hoverTimer++; + else + hoverTimer = 0; + + // Save the state for the next frame + wasHovering = isHovering; + } } } } From 95d6f9c4d4598c365f02f7810a25c6b4701d993c Mon Sep 17 00:00:00 2001 From: Critaquil Date: Tue, 2 Jun 2026 20:50:01 -0400 Subject: [PATCH 50/58] Shop Adjustments - made elixir and concoction rotate, and made bacon oil and sandwich rotate - moved monument to hardmode - shuffled around what moon phases the shrine items are sold on so "counterparts" are sold on opposite moon phases (and then symbiote and trinket are there too) --- NPCs/TownNPCs/ShadySalesman.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 4198017679..4116160797 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -273,10 +273,10 @@ namespace CalamityMod.NPCs.TownNPCs public override void AddShops() { NPCShop shop = new(Type); - shop.Add() - .Add() - .Add() - .Add() + shop.Add(Condition.MoonPhasesEven) + .Add(Condition.MoonPhasesOdd) + .Add(Condition.MoonPhasesHalf0) + .Add(Condition.MoonPhasesHalf1) .Add() .Add(Condition.DownedGoblinArmy) .Add(Condition.DownedGoblinArmy, Condition.MoonPhases04) @@ -286,17 +286,17 @@ namespace CalamityMod.NPCs.TownNPCs .Add() .Add() .Add() - .Add() .Add() .Add() - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundLuxorsGift"), () => RecipeUnlockHandler.HasFoundLuxorsGift && Main.moonPhase == 0)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundFungalSymbiote"), () => RecipeUnlockHandler.HasFoundFungalSymbiote && Main.moonPhase == 1)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundTrinketOfChi"), () => RecipeUnlockHandler.HasFoundTrinketOfChi && Main.moonPhase == 2)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundFrozenCube"), () => RecipeUnlockHandler.HasFoundFrozenCube && Main.moonPhase == 3)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundGladiatorsLocket"), () => RecipeUnlockHandler.HasFoundGladiatorsLocket && Main.moonPhase == 4)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundUnstableGraniteCore"), () => RecipeUnlockHandler.HasFoundUnstableGraniteCore && Main.moonPhase == 5)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundCrimsonEffigy"), () => RecipeUnlockHandler.HasFoundCrimsonEffigy && Main.moonPhase == 6)) - .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundCorruptionEffigy"), () => RecipeUnlockHandler.HasFoundCorruptionEffigy && Main.moonPhase == 7)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundGladiatorsLocket"), () => RecipeUnlockHandler.HasFoundGladiatorsLocket && Main.moonPhase == 0)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundLuxorsGift"), () => RecipeUnlockHandler.HasFoundLuxorsGift && Main.moonPhase == 1)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundCrimsonEffigy"), () => RecipeUnlockHandler.HasFoundCrimsonEffigy && Main.moonPhase == 2)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundFungalSymbiote"), () => RecipeUnlockHandler.HasFoundFungalSymbiote && Main.moonPhase == 3)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundUnstableGraniteCore"), () => RecipeUnlockHandler.HasFoundUnstableGraniteCore && Main.moonPhase == 4)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundFrozenCube"), () => RecipeUnlockHandler.HasFoundFrozenCube && Main.moonPhase == 5)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundCorruptionEffigy"), () => RecipeUnlockHandler.HasFoundCorruptionEffigy && Main.moonPhase == 6)) + .Add(new Condition(CalamityUtils.GetText("Condition.HasFoundTrinketOfChi"), () => RecipeUnlockHandler.HasFoundTrinketOfChi && Main.moonPhase == 7)) + .Add(Condition.Hardmode) .Add(Condition.Hardmode) .Add(Condition.DownedGolem) From a778f330e08dc218321619cc9fe655dcb70a25f8 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 2 Jun 2026 21:22:55 -0400 Subject: [PATCH 51/58] Add Spud McGee to Clothier --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index f681bbea6d..0ac165cc61 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -116,6 +116,7 @@ namespace CalamityMod.NPCs "Storm Havik", // <@!1013452363178197072> (fishnotduck) "Magorfis Splunt the Greater Finklejim", // <@!147490809334333440> (eidolbyssus) "Perrin", // <@!253764551139393537> (easyperrin) + "Spud McGee", // <@!727111000658018326> (starchman) ]; private static readonly string[] CyborgNames = [ From 96ffa03f27297d79550e8fff55e8e8365e42ba1f Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Tue, 2 Jun 2026 23:33:26 -0400 Subject: [PATCH 52/58] Grammar fixes and edits --- .../en-US/Mods.CalamityMod.Items.Fishing.hjson | 10 +++------- Localization/en-US/Mods.CalamityMod.Items.Tools.hjson | 5 ++--- NPCs/TownNPCs/ShadySalesman.cs | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson index 771b6456ec..ae709b0b18 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson @@ -374,11 +374,7 @@ TheDevourerofCods: { TrustyOldRod: { DisplayName: Trusty Old Rod - Tooltip: - ''' - This ol' thing has never failed to pull in a big haul - Who knows what it will reel in next! - ''' + Tooltip: Allows for especially..."exotic" hauls SalesPitch: ''' ‘Me and Hoggart have worked together with the best fishermen in the world to bring you the most effective rod on the market!’ @@ -409,8 +405,8 @@ RageBait: { DisplayName: Rage Bait Tooltip: ''' - The absolute best bait on the market! And for so cheap too... - Even comes with free Sonar Potion effect! + Detects hooked fish + Profoundly unreliable ''' SalesPitch: ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index 468421479c..6a1937f06f 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -429,14 +429,13 @@ TheGift: { DisplayName: The Gift Tooltip: ''' - Drop this fine gift on one of your Town NPCs as a token of appreciation + Drop this gift on one of your Town NPCs as a token of appreciation May make them either love you or hate you, you'll never know until they open it! Effect will last for 24 hours - [c/F54278:'There's no return policy, better be responsible'] ''' SalesPitch: ''' - ‘Buying gifts to people is hard, and you gotta make sure your people are happy, so how about we kill two birds with one stone?’ + ‘Buying gifts for people is hard, and you gotta make sure your people are happy, so how about we kill two birds with one stone?’ ‘Hand this nifty box to someone and it’ll suddenly contain the perfect gift for the person you handed it to!' ''' } diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index 4116160797..e8d7cd0ff0 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -613,7 +613,7 @@ namespace CalamityMod.NPCs.TownNPCs /// /// Scale for the "fine print" of the shop. /// - public static float SmallTextSize => 0.66f; + public static float SmallTextSize => 0.8f; /// /// Tooltip Line names that should be left alone instead of becoming fine print /// All exempted tooltip lines are moved above the fine print section From d7a497c56ffa82d5f6c673dc2dd3676231b72a63 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 3 Jun 2026 02:13:49 -0400 Subject: [PATCH 53/58] fish stocks formatting fix --- NPCs/TownNPCs/ShadySalesman.cs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index e8d7cd0ff0..b3a90121fa 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -690,7 +690,28 @@ namespace CalamityMod.NPCs.TownNPCs //So, we just force hide those lines entirely here line.Hide(); else - line.Text = $"[scale/{SmallTextSize}:{lineText}]"; + { + string[] lines = lineText.Split('\n'); + tooltips.RemoveAt(i); + + for (int k = 0; k < lines.Length; k++) + { + if (string.IsNullOrWhiteSpace(lines[k])) + continue; + + // Create a distinct TooltipLine for each line of text + TooltipLine newLine = new TooltipLine(Mod, $"{line.Name}_{k}", $"[scale/{SmallTextSize}:{lines[k]}]") + { + OverrideColor = line.OverrideColor + }; + + // Insert it back into the list at the current position + tooltips.Insert(i, newLine); + i++; + } + + i--; + } } else if (placetoMove > 0) From 5177de07fd5179ea0a953dc5d7f431d4134c411a Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 3 Jun 2026 11:37:47 -0400 Subject: [PATCH 54/58] Add Phantom to Traveling Merchant --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 0ac165cc61..37cbb28cc2 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -304,6 +304,7 @@ namespace CalamityMod.NPCs "Cosmoec", // <@!793660591449309204> (cosmoecark) "Junorism", // <@!740625002596008036> (hewhoshallnotbebaned) "Koral", // <@!1354908256681590845> (koral12244_) + "Phantom", // <@!1360706992506667241> (phantomz980) ]; private static readonly string[] TruffleNames = [ From 543c9d5fd88c3372b04e22b30837296de3add1df Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 4 Jun 2026 22:06:38 -0400 Subject: [PATCH 55/58] Fixed Divine Meat typo --- Localization/en-US/Mods.CalamityMod.Items.Potions.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson index 9a4185f25d..6785f87a2c 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson @@ -566,7 +566,7 @@ DivineMeat: { Tooltip: ''' {$CommonItemTooltip.MinorStats} - Not consumabale + {$Common.NotConsumable} 'A blessed strip of pork that never seems to be entirely consumed...' ''' } From f95143139b07b975225bc9f77c39cb4ca0a059f4 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 4 Jun 2026 22:52:29 -0400 Subject: [PATCH 56/58] Updated spawn condition --- CalamityConditions.cs | 61 ++++++++++--------- .../en-US/Mods.CalamityMod.Condition.hjson | 1 + .../en-US/Mods.CalamityMod.NPCs.hjson | 7 --- ModSupport/ModCalls.cs | 6 ++ ModSupport/WeakReferenceSupport.cs | 1 + NPCs/NormalNPCs/HorribleHog/HorribleHog.cs | 10 +++ NPCs/TownNPCs/ShadySalesman.cs | 3 + .../ProgressionAndEvent/DownedBossSystem.cs | 16 +++++ Systems/World/MiscWorldStateSystem.cs | 2 + Utilities/DropHelper.cs | 1 + 10 files changed, 71 insertions(+), 37 deletions(-) diff --git a/CalamityConditions.cs b/CalamityConditions.cs index 8fdfb0d11e..84cd4b16b3 100644 --- a/CalamityConditions.cs +++ b/CalamityConditions.cs @@ -33,36 +33,37 @@ namespace CalamityMod // Calamity Boss Flag conditions // - public static readonly Condition DownedDesertScourge = Create("Drops.DownedDS", () => DownedBossSystem.downedDesertScourge); - public static readonly Condition DownedCrabulon = Create("Drops.DownedCrabulon", () => DownedBossSystem.downedCrabulon); - public static readonly Condition DownedHiveMind = Create("Drops.DownedHM", () => DownedBossSystem.downedHiveMind); - public static readonly Condition DownedPerforator = Create("Drops.DownedPerfs", () => DownedBossSystem.downedPerforator); - public static readonly Condition DownedSlimeGod = Create("Drops.DownedSG", () => DownedBossSystem.downedSlimeGod); - public static readonly Condition DownedCryogen = Create("Drops.DownedCryo", () => DownedBossSystem.downedCryogen); - public static readonly Condition DownedAquaticScourge = Create("Drops.DownedAS", () => DownedBossSystem.downedAquaticScourge); - public static readonly Condition DownedBrimstoneElemental = Create("Drops.DownedBrim", () => DownedBossSystem.downedBrimstoneElemental); - public static readonly Condition DownedCalamitasClone = Create("Drops.DownedCal", () => DownedBossSystem.downedCalamitasClone); - public static readonly Condition DownedLeviathan = Create("Drops.DownedLevi", () => DownedBossSystem.downedLeviathan); - public static readonly Condition DownedAstrumAureus = Create("Drops.DownedAureus", () => DownedBossSystem.downedAstrumAureus); - public static readonly Condition DownedPlaguebringer = Create("Drops.DownedPBG", () => DownedBossSystem.downedPlaguebringer); - public static readonly Condition DownedRavager = Create("Drops.DownedRav", () => DownedBossSystem.downedRavager); - public static readonly Condition DownedAstrumDeus = Create("Drops.DownedAD", () => DownedBossSystem.downedAstrumDeus); - public static readonly Condition DownedGuardians = Create("Drops.DownedGuard", () => DownedBossSystem.downedGuardians); - public static readonly Condition DownedBumblebird = Create("Drops.DownedBirb", () => DownedBossSystem.downedDragonfolly); - public static readonly Condition DownedProvidence = Create("Drops.DownedProv", () => DownedBossSystem.downedProvidence); - public static readonly Condition DownedSignus = Create("Drops.DownedSig", () => DownedBossSystem.downedSignus); - public static readonly Condition DownedStormWeaver = Create("Drops.DownedSW", () => DownedBossSystem.downedStormWeaver); - public static readonly Condition DownedCeaselessVoid = Create("Drops.DownedCV", () => DownedBossSystem.downedCeaselessVoid); - public static readonly Condition DownedPolterghast = Create("Drops.DownedPolter", () => DownedBossSystem.downedPolterghast); - public static readonly Condition DownedOldDuke = Create("Drops.DownedOD", () => DownedBossSystem.downedBoomerDuke); - public static readonly Condition DownedDevourerOfGods = Create("Drops.DownedDoG", () => DownedBossSystem.downedDoG); - public static readonly Condition DownedYharon = Create("Drops.DownedYharon", () => DownedBossSystem.downedYharon); - public static readonly Condition DownedExoMechs = Create("Drops.DownedExos", () => DownedBossSystem.downedExoMechs); - public static readonly Condition DownedSupremeCalamitas = Create("Drops.DownedSCal", () => DownedBossSystem.downedCalamitas); - public static readonly Condition DownedPrimordialWyrm = Create("Drops.DownedAEW", () => DownedBossSystem.downedPrimordialWyrm); - public static readonly Condition DownedClam = Create("Drops.DownedClam", () => DownedBossSystem.downedCLAM); - public static readonly Condition DownedBuffedClam = Create("Drops.DownedClamHM", () => DownedBossSystem.downedCLAMHardMode); - public static readonly Condition DownedGreatSandShark = Create("Drops.DownedGSS", () => DownedBossSystem.downedGSS); + public static readonly Condition DownedDesertScourge = Create("Drops.DownedDS", () => DownedBossSystem.downedDesertScourge); + public static readonly Condition DownedCrabulon = Create("Drops.DownedCrabulon", () => DownedBossSystem.downedCrabulon); + public static readonly Condition DownedHiveMind = Create("Drops.DownedHM", () => DownedBossSystem.downedHiveMind); + public static readonly Condition DownedPerforator = Create("Drops.DownedPerfs", () => DownedBossSystem.downedPerforator); + public static readonly Condition DownedSlimeGod = Create("Drops.DownedSG", () => DownedBossSystem.downedSlimeGod); + public static readonly Condition DownedCryogen = Create("Drops.DownedCryo", () => DownedBossSystem.downedCryogen); + public static readonly Condition DownedAquaticScourge = Create("Drops.DownedAS", () => DownedBossSystem.downedAquaticScourge); + public static readonly Condition DownedBrimstoneElemental = Create("Drops.DownedBrim", () => DownedBossSystem.downedBrimstoneElemental); + public static readonly Condition DownedCalamitasClone = Create("Drops.DownedCal", () => DownedBossSystem.downedCalamitasClone); + public static readonly Condition DownedLeviathan = Create("Drops.DownedLevi", () => DownedBossSystem.downedLeviathan); + public static readonly Condition DownedAstrumAureus = Create("Drops.DownedAureus", () => DownedBossSystem.downedAstrumAureus); + public static readonly Condition DownedPlaguebringer = Create("Drops.DownedPBG", () => DownedBossSystem.downedPlaguebringer); + public static readonly Condition DownedRavager = Create("Drops.DownedRav", () => DownedBossSystem.downedRavager); + public static readonly Condition DownedAstrumDeus = Create("Drops.DownedAD", () => DownedBossSystem.downedAstrumDeus); + public static readonly Condition DownedGuardians = Create("Drops.DownedGuard", () => DownedBossSystem.downedGuardians); + public static readonly Condition DownedBumblebird = Create("Drops.DownedBirb", () => DownedBossSystem.downedDragonfolly); + public static readonly Condition DownedProvidence = Create("Drops.DownedProv", () => DownedBossSystem.downedProvidence); + public static readonly Condition DownedSignus = Create("Drops.DownedSig", () => DownedBossSystem.downedSignus); + public static readonly Condition DownedStormWeaver = Create("Drops.DownedSW", () => DownedBossSystem.downedStormWeaver); + public static readonly Condition DownedCeaselessVoid = Create("Drops.DownedCV", () => DownedBossSystem.downedCeaselessVoid); + public static readonly Condition DownedPolterghast = Create("Drops.DownedPolter", () => DownedBossSystem.downedPolterghast); + public static readonly Condition DownedOldDuke = Create("Drops.DownedOD", () => DownedBossSystem.downedBoomerDuke); + public static readonly Condition DownedDevourerOfGods = Create("Drops.DownedDoG", () => DownedBossSystem.downedDoG); + public static readonly Condition DownedYharon = Create("Drops.DownedYharon", () => DownedBossSystem.downedYharon); + public static readonly Condition DownedExoMechs = Create("Drops.DownedExos", () => DownedBossSystem.downedExoMechs); + public static readonly Condition DownedSupremeCalamitas = Create("Drops.DownedSCal", () => DownedBossSystem.downedCalamitas); + public static readonly Condition DownedPrimordialWyrm = Create("Drops.DownedAEW", () => DownedBossSystem.downedPrimordialWyrm); + public static readonly Condition DownedHorribleHog = Create("Drops.DownedHorribleHog", () => DownedBossSystem.downedHorribleHog); + public static readonly Condition DownedClam = Create("Drops.DownedClam", () => DownedBossSystem.downedCLAM); + public static readonly Condition DownedBuffedClam = Create("Drops.DownedClamHM", () => DownedBossSystem.downedCLAMHardMode); + public static readonly Condition DownedGreatSandShark = Create("Drops.DownedGSS", () => DownedBossSystem.downedGSS); // Mixed public static readonly Condition DownedHiveMindOrPerforator = Create("Drops.DownedHMOrPerfs",() => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator); diff --git a/Localization/en-US/Mods.CalamityMod.Condition.hjson b/Localization/en-US/Mods.CalamityMod.Condition.hjson index 92ea380b28..d6bef60d40 100644 --- a/Localization/en-US/Mods.CalamityMod.Condition.hjson +++ b/Localization/en-US/Mods.CalamityMod.Condition.hjson @@ -33,6 +33,7 @@ Drops: { DownedExos: After defeating the Exo Mechs DownedSCal: After defeating Calamitas DownedAEW: After defeating the Primordial Wyrm + DownedHorribleHog: After defeating the Horrible Hog DownedClam: After defeating the Giant Clam DownedClamHM: After defeating the Giant Clam in Hardmode DownedGSS: After defeating the Great Sand Shark diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 7a982a9f72..005b79e55c 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -321,7 +321,6 @@ Shoreskipper.DisplayName: Shoreskipper BrainIllusion.DisplayName: Brain Illusion FalseBrain.DisplayName: False Brain BloodBomb.DisplayName: Blood Bomb -// Town NPCs, Pets, etc AndroombaFriendly.DisplayName: Androomba Pal Archmage: { @@ -642,10 +641,4 @@ TownPiggy: { } } -DraconicSwarmer.DisplayName: Draconic Swarmer -Dragonfolly.DisplayName: Dragonfolly -Shoreskipper.DisplayName: Shoreskipper -BrainIllusion.DisplayName: Brain Illusion -FalseBrain.DisplayName: False Brain -BloodBomb.DisplayName: Blood Bomb HorribleHog.DisplayName: Horrible Hog diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index d38e623dd8..4addae66e0 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -49,6 +49,12 @@ namespace CalamityMod case "desert scourge": return DownedBossSystem.downedDesertScourge; + case "horriblehog": + case "horrible hog": + case "thehorriblehog": + case "the horrible hog": + return DownedBossSystem.downedHorribleHog; + case "clam": case "giantclam": case "giant clam": diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 8a5b7692f8..6aec151c76 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -70,6 +70,7 @@ namespace CalamityMod internal class Downed { public static readonly Func DownedDesertScourge = () => DownedBossSystem.downedDesertScourge; + public static readonly Func DownedHorribleHog = () => DownedBossSystem.downedHorribleHog; public static readonly Func DownedGiantClam = () => DownedBossSystem.downedCLAM; public static readonly Func DownedCrabulon = () => DownedBossSystem.downedCrabulon; public static readonly Func DownedHiveMind = () => DownedBossSystem.downedHiveMind; diff --git a/NPCs/NormalNPCs/HorribleHog/HorribleHog.cs b/NPCs/NormalNPCs/HorribleHog/HorribleHog.cs index 032ce920f8..97a974c22e 100644 --- a/NPCs/NormalNPCs/HorribleHog/HorribleHog.cs +++ b/NPCs/NormalNPCs/HorribleHog/HorribleHog.cs @@ -10,6 +10,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Tools; +using CalamityMod.NPCs.TownNPCs; using CalamityMod.Particles; using CalamityMod.Projectiles.Enemy; using CalamityMod.Utilities.Daybreak; @@ -821,6 +822,15 @@ namespace CalamityMod.NPCs.NormalNPCs.HorribleHog } } + public override void OnKill() + { + CalamityGlobalNPC.SetNewBossJustDowned(NPC); + + // Mark Horrible Hog as dead + DownedBossSystem.downedHorribleHog = true; + CalamityNetcode.SyncWorld(); + } + public override void ModifyNPCLoot(NPCLoot npcLoot) { //Always drops Disgusting Meat, 50% chance to drop Money Trough, 25%/33% chance to drop Laudanum diff --git a/NPCs/TownNPCs/ShadySalesman.cs b/NPCs/TownNPCs/ShadySalesman.cs index b3a90121fa..a1c342374c 100644 --- a/NPCs/TownNPCs/ShadySalesman.cs +++ b/NPCs/TownNPCs/ShadySalesman.cs @@ -555,6 +555,9 @@ namespace CalamityMod.NPCs.TownNPCs public override void PreUpdateWorld() { + if (!DownedBossSystem.downedHorribleHog) // Cannot spawn before Horrible Hog has been killed. + return; + if (Main.dayTime) { CanSpawnTonight = true; diff --git a/Systems/ProgressionAndEvent/DownedBossSystem.cs b/Systems/ProgressionAndEvent/DownedBossSystem.cs index 656e5d0534..c7aa1f0091 100644 --- a/Systems/ProgressionAndEvent/DownedBossSystem.cs +++ b/Systems/ProgressionAndEvent/DownedBossSystem.cs @@ -45,6 +45,7 @@ namespace CalamityMod // Minibosses internal static bool _downedGSS = false; + internal static bool _downedHorribleHog = false; internal static bool _downedCLAM = false; internal static bool _downedCLAMHardMode = false; internal static bool _downedCragmawMire = false; @@ -381,6 +382,17 @@ namespace CalamityMod NPC.SetEventFlagCleared(ref _downedPrimordialWyrm, -1); } } + public static bool downedHorribleHog + { + get => _downedHorribleHog; + set + { + if (!value) + _downedHorribleHog = false; + else + NPC.SetEventFlagCleared(ref _downedHorribleHog, -1); + } + } public static bool downedCLAM { get => _downedCLAM; @@ -548,6 +560,7 @@ namespace CalamityMod downedSecondSentinels = false; + downedHorribleHog = false; downedCLAM = false; downedEoCAcidRain = false; @@ -644,6 +657,8 @@ namespace CalamityMod downed.Add("adultEidolonWyrm"); // Minibosses and events + if (downedHorribleHog) + downed.Add("horribleHog"); if (downedCLAM) downed.Add("clam"); if (downedEoCAcidRain) @@ -711,6 +726,7 @@ namespace CalamityMod downedCalamitas = downed.Contains("supremeCalamitas"); downedPrimordialWyrm = downed.Contains("adultEidolonWyrm"); + downedHorribleHog = downed.Contains("horribleHog"); downedCLAM = downed.Contains("clam"); downedEoCAcidRain = downed.Contains("eocRain"); diff --git a/Systems/World/MiscWorldStateSystem.cs b/Systems/World/MiscWorldStateSystem.cs index 4bf79cb76b..e0b0d26647 100644 --- a/Systems/World/MiscWorldStateSystem.cs +++ b/Systems/World/MiscWorldStateSystem.cs @@ -301,6 +301,7 @@ namespace CalamityMod flags12[3] = downedBossRush; flags12[4] = DraedonMechdusa; flags12[5] = unlockedTownPig; + flags12[5] = downedHorribleHog; writer.Write(flags); writer.Write(flags2); @@ -456,6 +457,7 @@ namespace CalamityMod downedBossRush = flags12[3]; DraedonMechdusa = flags12[4]; unlockedTownPig = flags12[5]; + downedHorribleHog = flags12[5]; RecipeUnlockHandler.ReceiveData(reader); diff --git a/Utilities/DropHelper.cs b/Utilities/DropHelper.cs index 7cdf498d1f..ee239e25e2 100644 --- a/Utilities/DropHelper.cs +++ b/Utilities/DropHelper.cs @@ -888,6 +888,7 @@ namespace CalamityMod public static IItemDropRuleCondition PostExos(bool ui = true) => CalamityConditions.DownedExoMechs.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostSCal(bool ui = true) => CalamityConditions.DownedSupremeCalamitas.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostAEW(bool ui = true) => CalamityConditions.DownedPrimordialWyrm.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); + public static IItemDropRuleCondition PostHorribleHog(bool ui = true) => CalamityConditions.DownedHorribleHog.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostClam(bool ui = true) => CalamityConditions.DownedClam.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostClamHM(bool ui = true) => CalamityConditions.DownedBuffedClam.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); public static IItemDropRuleCondition PostGSS(bool ui = true) => CalamityConditions.DownedGreatSandShark.ToDropCondition(ui ? ShowItemDropInUI.Always : ShowItemDropInUI.Never); From 7cb54721518d2887b7c7f86c3fbace1720ff6db4 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 4 Jun 2026 23:52:27 -0400 Subject: [PATCH 57/58] Requested changes --- Items/Accessories/FishStocks.cs | 2 +- Items/Fishing/RageBait.cs | 2 +- Items/Placeables/Furniture/TheMonument.cs | 2 +- Items/Potions/Alcohol/BaconOil.cs | 2 +- Items/Potions/Food/TheSandwich.cs | 2 +- Items/Potions/TheConcoction.cs | 2 +- Items/Potions/TheElixir.cs | 2 +- .../Mods.CalamityMod.Items.Accessories.hjson | 4 +-- .../Mods.CalamityMod.Items.Fishing.hjson | 6 ++-- .../Mods.CalamityMod.Items.Placeables.hjson | 10 +++---- .../Mods.CalamityMod.Items.Potions.hjson | 8 +++--- .../en-US/Mods.CalamityMod.Items.Tools.hjson | 20 ++++++------- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- .../en-US/Mods.CalamityMod.NPCs.hjson | 28 +++++++++---------- 14 files changed, 46 insertions(+), 46 deletions(-) diff --git a/Items/Accessories/FishStocks.cs b/Items/Accessories/FishStocks.cs index 43d03d33c2..b52e514860 100644 --- a/Items/Accessories/FishStocks.cs +++ b/Items/Accessories/FishStocks.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories { Item.width = 30; Item.height = 38; - Item.value = Item.sellPrice(gold: 1); + Item.value = Item.buyPrice(gold: 5); Item.rare = ItemRarityID.Blue; Item.accessory = true; } diff --git a/Items/Fishing/RageBait.cs b/Items/Fishing/RageBait.cs index 43c2ac8f62..81677a3457 100644 --- a/Items/Fishing/RageBait.cs +++ b/Items/Fishing/RageBait.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Fishing Item.height = 12; Item.maxStack = Item.CommonMaxStack; Item.rare = ItemRarityID.Blue; - Item.value = Item.sellPrice(copper: 1); + Item.value = Item.buyPrice(copper: 5); Item.bait = 100; Item.consumable = true; } diff --git a/Items/Placeables/Furniture/TheMonument.cs b/Items/Placeables/Furniture/TheMonument.cs index c6b9e41b2f..436a103393 100644 --- a/Items/Placeables/Furniture/TheMonument.cs +++ b/Items/Placeables/Furniture/TheMonument.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Placeables.Furniture Item.width = 40; Item.height = 50; Item.rare = ItemRarityID.Pink; - Item.value = Item.sellPrice(gold: 20); + Item.value = Item.buyPrice(platinum: 1); } public override void Load() diff --git a/Items/Potions/Alcohol/BaconOil.cs b/Items/Potions/Alcohol/BaconOil.cs index 54a518776d..bbbf75baa1 100644 --- a/Items/Potions/Alcohol/BaconOil.cs +++ b/Items/Potions/Alcohol/BaconOil.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetDefaults() { Item.DefaultToFood(20, 32, ModContent.BuffType(), CalamityUtils.MinutesToFrames(6), true); - Item.value = Item.sellPrice(silver: 6); + Item.value = Item.buyPrice(silver: 30); Item.rare = ItemRarityID.Blue; } diff --git a/Items/Potions/Food/TheSandwich.cs b/Items/Potions/Food/TheSandwich.cs index 1a35ab12f9..a966b37bd2 100644 --- a/Items/Potions/Food/TheSandwich.cs +++ b/Items/Potions/Food/TheSandwich.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Potions.Food public override void SetDefaults() { Item.DefaultToFood(70, 48, ModContent.BuffType(), CalamityUtils.MinutesToFrames(10)); - Item.value = Item.sellPrice(silver: 4); + Item.value = Item.buyPrice(silver: 20); Item.rare = ItemRarityID.Blue; } public override void UseAnimation(Player player) diff --git a/Items/Potions/TheConcoction.cs b/Items/Potions/TheConcoction.cs index 2c96484063..6744a353bc 100644 --- a/Items/Potions/TheConcoction.cs +++ b/Items/Potions/TheConcoction.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Potions public override void SetDefaults() { Item.DefaultToHealingPotion(50, 56, 500); - Item.value = Item.sellPrice(silver: 20); + Item.value = Item.buyPrice(gold: 1); Item.rare = ItemRarityID.Green; } diff --git a/Items/Potions/TheElixir.cs b/Items/Potions/TheElixir.cs index eae462625c..2be8294284 100644 --- a/Items/Potions/TheElixir.cs +++ b/Items/Potions/TheElixir.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Potions public override void SetDefaults() { - Item.value = Item.sellPrice(silver: 2); + Item.value = Item.buyPrice(silver: 10); Item.rare = ItemRarityID.Blue; Item.DefaultToFood(28, 51, 0, 0, true); } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index db2b24335e..8f77dda091 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -802,8 +802,8 @@ FishStocks: { ''' SalesPitch: ''' - ‘Fishing is hard, but you know what’s easy? Economy! With this little gadget made by my partner Hoggart, you can make the process just as easy!’ - ‘Pull the line when it’s up, don’t when it’s down! It’s as simple as that!’ + ‘Fishing is hard, but you know what's easy? Economy! With this little gadget made by my partner Hoggart, you can make the process just as easy!’ + ‘Pull the line when it's up, don't when it's down! It's as simple as that!’ ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson index 5cf14d913d..9ab84d4219 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson @@ -383,7 +383,7 @@ TrustyOldRod: { SalesPitch: ''' ‘Me and Hoggart have worked together with the best fishermen in the world to bring you the most effective rod on the market!’ - ‘With state of the art technology, you can fish anything! Don’t let a single creature elude your hook anymore!’ + ‘With state-of-the-art technology, you can fish anything! Don't let a single creature elude your hook anymore!’ ''' } @@ -415,8 +415,8 @@ RageBait: { ''' SalesPitch: ''' - ‘Do you want to know a secret? Fishing takes so long because the fish are dumb! They’ll always swim right by your hook!’ - ‘But with this bait right here? No longer! It’ll make your hook the only thing they can think of. You’ll be swimming in fishes in the blink of an eye!’ + ‘Do you want to know a secret? Fishing takes so long because the fish are dumb! They'll always swim right by your hook!’ + ‘But with this bait right here? No longer! It'll make your hook the only thing they can think of. You'll be swimming in fishes in the blink of an eye!’ ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index 9ab3d08f0a..9bb678f749 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -807,7 +807,7 @@ GluttonyBlender: { ''' SalesPitch: ''' - ‘A state of the art machine, created by my partner Hoggart! You can put anything on it, and it’ll make a nutritious delicacy for you to snack on!’ + ‘A state of the art machine, created by my partner Hoggart! You can put anything in it, and it'll make a nutritious delicacy for you to snack on!’ ‘I myself can attest for its quality, I use it to make my breakfast, lunch and dinner!’ ''' } @@ -1018,8 +1018,8 @@ TheMonument: { ''' SalesPitch: ''' - ‘Don’t you think your town is a bit too boring? Don’t you wish you could get more money out of your troubles? Well, I’ve got you the perfect two-in-one deal!’ - ‘This statue I made myself is so marvelous that it’ll singlehandedly raise the price of housing around here! Just sit back, and enjoy the sight and the money!’ + ‘Don't you think your town is a bit too boring? Don't you wish you could get more money out of your troubles? Well, I've got you the perfect two-in-one deal!’ + ‘This statue I made myself is so marvelous that it'll singlehandedly raise the price of housing around here! Just sit back, and enjoy the sight and the money!’ ''' } @@ -4734,8 +4734,8 @@ GreedPot: { Tooltip: Offer your treasures to the Urn, and your avarice may at last be satiated SalesPitch: ''' - ‘Say, you use all kinds of ores for your stuff, but finding precious minerals isn’t easy, is it? Well, I got the solution for you!’ - ‘Just throw any ore you got on this urn and they’ll turn into even rarer ones! No more looking for tungsten for hours on end!’ + ‘Say, you use all kinds of ores for your stuff, but finding precious minerals isn't easy, is it? Well, I got the solution for you!’ + ‘Just throw any ore you got in this urn and they'll turn into even rarer ones! No more looking for tungsten for hours on end!’ ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson index 4190889740..20866ae3e2 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson @@ -163,7 +163,7 @@ TheConcoction: { Tooltip: "" SalesPitch: ''' - ‘Aren’t you tired of how unreliable your healing potions are? What if you’re in the middle of a zombie horde and sick to the core of those things?!’ + ‘Aren't you tired of how unreliable your healing potions are? What if you're in the middle of a zombie horde and sick to the core of those things?!’ ‘With my concoction, you won’t have to worry about that! Just a sip of this bad boy and you’ll be good as new, ready to take on the world!’ ''' } @@ -194,8 +194,8 @@ BaconOil: { ''' SalesPitch: ''' - ‘Monks go on and on about forgoing attachment. I don’t think this is what they meant. It’s better!’ - ‘Don’t mind the accident disclaimer: get yourself some of this slippery fat oil, and not a bit of this world will be able to hold you down!’ + ‘Monks go on and on about forgoing attachment. I don't think this is what they meant. It's better!’ + ‘Don't mind the accident disclaimer: get yourself some of this slippery fat oil, and not a bit of this world will be able to hold you down!’ ''' } @@ -642,6 +642,6 @@ TheSandwich: { SalesPitch: ''' ‘...You want to buy my lunch?’ - ‘Well, no matter! But it won’t be cheap! This sandwich is made with the best the market can offer, so get your wallet out!’ + ‘Well, no matter! But it won’t be cheap! This sandwich is made with the best the market can offer, so ready your wallet!’ ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index a779375bf1..951e63c972 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -25,8 +25,8 @@ AggressiveVoucher: { ''' SalesPitch: ''' - ‘That goblin over there, he’s just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ - ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It’ll be like a new item!” + ‘That goblin over there, he's just scamming you for your money, you know? But don't worry, me and Hoggart have a solution for that!’ + ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” ''' } @@ -167,7 +167,7 @@ CombatVoucher: { ''' SalesPitch: ''' - ‘That goblin over there, he’s just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ + ‘That goblin over there, he's just scamming you for your money, you know? But don't worry, me and Hoggart have a solution for that!’ ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It’ll be like a new item!” ''' } @@ -248,8 +248,8 @@ HurriedVoucher: { ''' SalesPitch: ''' - ‘That goblin over there, he’s just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ - ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It’ll be like a new item!” + ‘That goblin over there, he's just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ + ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” ''' } @@ -328,8 +328,8 @@ OddVoucher: { ''' SalesPitch: ''' - ‘That goblin over there, he’s just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ - ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It’ll be like a new item!” + ‘That goblin over there, he's just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ + ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” ''' } @@ -436,7 +436,7 @@ TheGift: { SalesPitch: ''' ‘Buying gifts for people is hard, and you gotta make sure your people are happy, so how about we kill two birds with one stone?’ - ‘Hand this nifty box to someone and it’ll suddenly contain the perfect gift for the person you handed it to!' + ‘Hand this nifty box to someone and it'll suddenly contain the perfect gift for the person you handed it to!' ''' } @@ -462,8 +462,8 @@ UnbreakableVoucher: { ''' SalesPitch: ''' - ‘That goblin over there, he’s just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ - ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It’ll be like a new item!” + ‘That goblin over there, he's just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ + ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index b796cadafa..f1b96f3770 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -854,7 +854,7 @@ OmniGun: { ''' SalesPitch: ''' - ‘Why carry four different guns when you can carry just one? That’s what I used to ask myself!’ + ‘Why carry four different guns when you can carry just one? That's what I used to ask myself!’ ‘With this thing-a-beauty, even a bumbling moron can become invincible - and for the right price, it can be yours!’ ''' } diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 005b79e55c..ccd90f2199 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -585,26 +585,26 @@ ShadySalesman: { Census.SpawnCondition: Defeat a Horrible Hog Chat: { - Normal1: Have you ever wondered why coins are shiny? Simple! It’s to match my partner’s dazzling products! + Normal1: Have you ever wondered why coins are shiny? Simple! It’s to match my partner's dazzling products! Normal2: Have you ever had a dream? If you have the cash, I can sell you several! Normal3: Whatever you are thinking, I have the perfect thing for you, at a genuinely excessive discount! - Normal4: Is your life rapidly shrinking? Want to know this world’s marvels before your time comes? Are the local merchants only showing you worthless hogwash?! Worry not, Hoggart and I have just the solution! Hogwash sold separately. - Normal5: There’s a saying that goes “the grass is greener on the other side.” It’s absolute balderdash!! For 5 platinum coins, you can buy our Greener Paint and make your life the greenest! - Normal6: They say keeping an Angel Statue nearby is more dangerous than a loaded gun. That’s why I own multiple guns - in case some hooligan tries to sell me an Angel Statue! - TownPigPresent1: You’re searching for the lil’ Piggy? Don’t worry, chum! Hoggart and I gave it a Camo-Projector 2000 so it could disappear into the night. This way, not a single rotbrain will lay their nasty half-fingers on it, huehe! - TownPigPresent2: Rumors are runnin’ around that I’m inexplicably two Pigg’ins stacked on top of each other. What shameless slander! Don’t they know that, if that were true, I’d charge twice the price? Hahaha! + Normal4: Is your life rapidly shrinking? Want to know this world's marvels before your time comes? Are the local merchants only showing you worthless hogwash?! Worry not, Hoggart and I have just the solution! Hogwash sold separately. + Normal5: There's a saying that goes “the grass is greener on the other side.” It's absolute balderdash!! For 5 platinum coins, you can buy our Greener Paint and make your life the greenest! + Normal6: They say keeping an Angel Statue nearby is more dangerous than a loaded gun. That's why I own multiple guns - in case some hooligan tries to sell me an Angel Statue! + TownPigPresent1: You're searching for the lil' Piggy? Don't worry, chum! Hoggart and I gave it a Camo-Projector 2000 so it could disappear into the night. This way, not a single rotbrain will lay their nasty half-fingers on it, huehe! + TownPigPresent2: Rumors are runnin' around that I'm inexplicably two Pigg'ins stacked on top of each other. What shameless slander! Don't they know that, if that were true, I'd charge twice the price? Hahaha! TownPigPresent3: You better take real good care of that piglet. Your sight gotta be good for something other than eyeballing my discounts! Otherwise, who knows what will happen to the swine stock market... - TownPigPresent4: Where the Piggy went? Could’ve sworn I saw it chasing down a four-legged carrot. Now’s your chance to chase Fortune and Glory, pal, by buying these MARVELOUS wares! - Rain: People always say “rain, rain, go away! Come back another day!”, but everyone knows it would be better if it came back never! To solve this, I intend to invest in Hoggart’s Dome Program, we just need 500 platinum coins to get it off the ground! - WindyDay: Aren’t you tired of your house being blown away by any shoddy gust of wind? Well, I have the solution to your problem! With my state-of-the-art industrial super glue (for only 5 gold coins a pack), you too may survive the attack of invaders with outstanding lung capacity! + TownPigPresent4: Where the Piggy went? Could've sworn I saw it chasing down a four-legged carrot. Now's your chance to chase Fortune and Glory, pal, by buying these MARVELOUS wares! + Rain: People always say “rain, rain, go away! Come back another day!”, but everyone knows it would be better if it came back never! To solve this, I intend to invest in Hoggart's Dome Program, we just need 500 platinum coins to get it off the ground! + WindyDay: Aren't you tired of your house being blown away by any shoddy gust of wind? Well, I have the solution to your problem! With my state-of-the-art industrial super glue (for only 5 gold coins a pack), you too may survive the attack of invaders with outstanding lung capacity! Desert: Exhausted from this oven-like heat? Yearning for something to help you cool down? Check out our revolutionary new product: water! It comes in all flavors of flavorless! Any bottle shape is available, from round to triangular! Feel the chill of molten ice as it enters your guts! It even has healing properties! Sip our free sample for the low price of 50 gold! - Tundra: Did you ever hear the tragedy of Kevin Bacon the Wise? I thought not, It’s not a story the Elumphants would tell you. Kevin Bacon was a Ham Lord of the Hogs, so powerful and so wise he could use his Hogtusk to influence metal to create gold… Unfortunately, he taught his apprentice everything he knew, then his apprentice out-cashed and deposed him. Ironic. He could save others from debt, but not himself. + Tundra: Did you ever hear the tragedy of Kevin Bacon the Wise? I thought not, It’s not a story the Elumphants would tell you. Kevin Bacon was a Ham Lord of the Hogs, so powerful and so wise he could use his Hogtusk to influence metal to create gold... Unfortunately, he taught his apprentice everything he knew, then his apprentice out-cashed and deposed him. Ironic. He could save others from debt, but not himself. Graveyard: Does that zombie look like a happy customer? No!! It’s full of maggots!! It has no life savings!! While you still do, hurry up and spend yours on a funky edition, happiness-smelling Maggot Repellent! - BloodMoon1: These shambling deadheads are the worst! How am I supposed to rip people off when they’re all either dead, broke or fighting for their lives?! + BloodMoon1: These shambling deadheads are the worst! How am I supposed to rip people off when they're all either dead, broke or fighting for their lives?! BloodMoon2: Like my partner always says, price makes the prize! Hire our Moon Doom Cannon, and enjoy a whole year without the meatsack invasion! Fund the construction of the Eclipse variant and get a deluxe model with a neat robotic decal! All for 5000 platinum coins! - BloodMoon3: Violence is at every corner tonight, huh? Remember these words, son: make deals, not war! - Hardmode: Those pesky merchants still want to sell you full-price, low quality copper tools?! Bird droppings!! Barter with me, and you’ll receive Palladium at HOG-WILD prizes! - MoonLordDefeated: I’ve been told this land is ruled by three gnomes in a suit of armor. That’s impossible! Gnomes are the most deplorable customers I’ve dealt with. They can’t handle a spoon without snapping it in half!! It’s always the halflings... + BloodMoon3: Violence is at every corner tonight, huh? Remember these words, buddy: make deals, not war! + Hardmode: Those pesky merchants still want to sell you full-price, low quality copper tools?! Bird droppings!! Barter with me, and you'll receive Palladium at HOG-WILD prizes! + MoonLordDefeated: I've been told this land is ruled by three gnomes in a suit of armor. That's impossible! Gnomes are the most deplorable customers I've dealt with. They can't handle a spoon without snapping it in half!! It’s always the halflings... } } From ad6cdca5c8bd74e93511087a3b55f5a4af9c6d1d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 5 Jun 2026 00:01:21 -0400 Subject: [PATCH 58/58] Replaced the rest of the apostrophes and quotation marks --- .../Mods.CalamityMod.Items.Accessories.hjson | 4 ++-- .../Mods.CalamityMod.Items.Fishing.hjson | 8 +++---- .../Mods.CalamityMod.Items.Placeables.hjson | 12 +++++----- .../Mods.CalamityMod.Items.Potions.hjson | 16 ++++++------- .../en-US/Mods.CalamityMod.Items.Tools.hjson | 24 +++++++++---------- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 4 ++-- .../en-US/Mods.CalamityMod.NPCs.hjson | 12 +++++----- 7 files changed, 40 insertions(+), 40 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 8f77dda091..694c009a03 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -802,8 +802,8 @@ FishStocks: { ''' SalesPitch: ''' - ‘Fishing is hard, but you know what's easy? Economy! With this little gadget made by my partner Hoggart, you can make the process just as easy!’ - ‘Pull the line when it's up, don't when it's down! It's as simple as that!’ + 'Fishing is hard, but you know what's easy? Economy! With this little gadget made by my partner Hoggart, you can make the process just as easy!' + 'Pull the line when it's up, don't when it's down! It's as simple as that!' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson index 9ab84d4219..d1a31d96ef 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson @@ -382,8 +382,8 @@ TrustyOldRod: { Tooltip: Allows for especially..."exotic" hauls SalesPitch: ''' - ‘Me and Hoggart have worked together with the best fishermen in the world to bring you the most effective rod on the market!’ - ‘With state-of-the-art technology, you can fish anything! Don't let a single creature elude your hook anymore!’ + 'Me and Hoggart have worked together with the best fishermen in the world to bring you the most effective rod on the market!' + 'With state-of-the-art technology, you can fish anything! Don't let a single creature elude your hook anymore!' ''' } @@ -415,8 +415,8 @@ RageBait: { ''' SalesPitch: ''' - ‘Do you want to know a secret? Fishing takes so long because the fish are dumb! They'll always swim right by your hook!’ - ‘But with this bait right here? No longer! It'll make your hook the only thing they can think of. You'll be swimming in fishes in the blink of an eye!’ + 'Do you want to know a secret? Fishing takes so long because the fish are dumb! They'll always swim right by your hook!' + 'But with this bait right here? No longer! It'll make your hook the only thing they can think of. You'll be swimming in fishes in the blink of an eye!' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index 9bb678f749..bde9601a37 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -807,8 +807,8 @@ GluttonyBlender: { ''' SalesPitch: ''' - ‘A state of the art machine, created by my partner Hoggart! You can put anything in it, and it'll make a nutritious delicacy for you to snack on!’ - ‘I myself can attest for its quality, I use it to make my breakfast, lunch and dinner!’ + 'A state of the art machine, created by my partner Hoggart! You can put anything in it, and it'll make a nutritious delicacy for you to snack on!' + 'I myself can attest for its quality, I use it to make my breakfast, lunch and dinner!' ''' } @@ -1018,8 +1018,8 @@ TheMonument: { ''' SalesPitch: ''' - ‘Don't you think your town is a bit too boring? Don't you wish you could get more money out of your troubles? Well, I've got you the perfect two-in-one deal!’ - ‘This statue I made myself is so marvelous that it'll singlehandedly raise the price of housing around here! Just sit back, and enjoy the sight and the money!’ + 'Don't you think your town is a bit too boring? Don't you wish you could get more money out of your troubles? Well, I've got you the perfect two-in-one deal!' + 'This statue I made myself is so marvelous that it'll singlehandedly raise the price of housing around here! Just sit back, and enjoy the sight and the money!' ''' } @@ -4734,8 +4734,8 @@ GreedPot: { Tooltip: Offer your treasures to the Urn, and your avarice may at last be satiated SalesPitch: ''' - ‘Say, you use all kinds of ores for your stuff, but finding precious minerals isn't easy, is it? Well, I got the solution for you!’ - ‘Just throw any ore you got in this urn and they'll turn into even rarer ones! No more looking for tungsten for hours on end!’ + 'Say, you use all kinds of ores for your stuff, but finding precious minerals isn't easy, is it? Well, I got the solution for you!' + 'Just throw any ore you got in this urn and they'll turn into even rarer ones! No more looking for tungsten for hours on end!' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson index 20866ae3e2..8b3ccffef0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson @@ -163,8 +163,8 @@ TheConcoction: { Tooltip: "" SalesPitch: ''' - ‘Aren't you tired of how unreliable your healing potions are? What if you're in the middle of a zombie horde and sick to the core of those things?!’ - ‘With my concoction, you won’t have to worry about that! Just a sip of this bad boy and you’ll be good as new, ready to take on the world!’ + 'Aren't you tired of how unreliable your healing potions are? What if you're in the middle of a zombie horde and sick to the core of those things?!' + 'With my concoction, you won't have to worry about that! Just a sip of this bad boy and you'll be good as new, ready to take on the world!' ''' } @@ -194,8 +194,8 @@ BaconOil: { ''' SalesPitch: ''' - ‘Monks go on and on about forgoing attachment. I don't think this is what they meant. It's better!’ - ‘Don't mind the accident disclaimer: get yourself some of this slippery fat oil, and not a bit of this world will be able to hold you down!’ + 'Monks go on and on about forgoing attachment. I don't think this is what they meant. It's better!' + 'Don't mind the accident disclaimer: get yourself some of this slippery fat oil, and not a bit of this world will be able to hold you down!' ''' } @@ -506,8 +506,8 @@ TheElixir: { ''' SalesPitch: ''' - ‘Return potions are nifty and all, but they taste like bogus! But with my special formula, it'll magically taste like your favorite food!’ - ‘Besides, you ain’t finding them for much cheaper around these parts. Trust me, you’re practically stealing me!’ + 'Return potions are nifty and all, but they taste like bogus! But with my special formula, it'll magically taste like your favorite food!' + 'Besides, you ain't finding them for much cheaper around these parts. Trust me, you're practically stealing me!' ''' } @@ -641,7 +641,7 @@ TheSandwich: { ''' SalesPitch: ''' - ‘...You want to buy my lunch?’ - ‘Well, no matter! But it won’t be cheap! This sandwich is made with the best the market can offer, so ready your wallet!’ + '...You want to buy my lunch?' + 'Well, no matter! But it won't be cheap! This sandwich is made with the best the market can offer, so ready your wallet!' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index 951e63c972..589bc10f15 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -25,8 +25,8 @@ AggressiveVoucher: { ''' SalesPitch: ''' - ‘That goblin over there, he's just scamming you for your money, you know? But don't worry, me and Hoggart have a solution for that!’ - ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” + 'That goblin over there, he's just scamming you for your money, you know? But don't worry, me and Hoggart have a solution for that!' + 'Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” ''' } @@ -167,8 +167,8 @@ CombatVoucher: { ''' SalesPitch: ''' - ‘That goblin over there, he's just scamming you for your money, you know? But don't worry, me and Hoggart have a solution for that!’ - ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It’ll be like a new item!” + 'That goblin over there, he's just scamming you for your money, you know? But don't worry, me and Hoggart have a solution for that!' + 'Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” ''' } @@ -248,8 +248,8 @@ HurriedVoucher: { ''' SalesPitch: ''' - ‘That goblin over there, he's just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ - ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” + 'That goblin over there, he's just scamming you for your money, you know? But don't worry, me and Hoggart have a solution for that!' + 'Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” ''' } @@ -328,8 +328,8 @@ OddVoucher: { ''' SalesPitch: ''' - ‘That goblin over there, he's just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ - ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” + 'That goblin over there, he's just scamming you for your money, you know? But don't worry, me and Hoggart have a solution for that!' + 'Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” ''' } @@ -435,8 +435,8 @@ TheGift: { ''' SalesPitch: ''' - ‘Buying gifts for people is hard, and you gotta make sure your people are happy, so how about we kill two birds with one stone?’ - ‘Hand this nifty box to someone and it'll suddenly contain the perfect gift for the person you handed it to!' + 'Buying gifts for people is hard, and you gotta make sure your people are happy, so how about we kill two birds with one stone?' + 'Hand this nifty box to someone and it'll suddenly contain the perfect gift for the person you handed it to!' ''' } @@ -462,8 +462,8 @@ UnbreakableVoucher: { ''' SalesPitch: ''' - ‘That goblin over there, he's just scamming you for your money, you know? But don’t worry, me and Hoggart have a solution for that!’ - ‘Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” + 'That goblin over there, he's just scamming you for your money, you know? But don't worry, me and Hoggart have a solution for that!' + 'Just give him this and watch as he hammers your gear like he was struck with divine inspiration! It'll be like a new item!” ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index f1b96f3770..cab3d6655c 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -854,8 +854,8 @@ OmniGun: { ''' SalesPitch: ''' - ‘Why carry four different guns when you can carry just one? That's what I used to ask myself!’ - ‘With this thing-a-beauty, even a bumbling moron can become invincible - and for the right price, it can be yours!’ + 'Why carry four different guns when you can carry just one? That's what I used to ask myself!' + 'With this thing-a-beauty, even a bumbling moron can become invincible - and for the right price, it can be yours!' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index ccd90f2199..d52af03a77 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -585,26 +585,26 @@ ShadySalesman: { Census.SpawnCondition: Defeat a Horrible Hog Chat: { - Normal1: Have you ever wondered why coins are shiny? Simple! It’s to match my partner's dazzling products! + Normal1: Have you ever wondered why coins are shiny? Simple! It's to match my partner's dazzling products! Normal2: Have you ever had a dream? If you have the cash, I can sell you several! Normal3: Whatever you are thinking, I have the perfect thing for you, at a genuinely excessive discount! Normal4: Is your life rapidly shrinking? Want to know this world's marvels before your time comes? Are the local merchants only showing you worthless hogwash?! Worry not, Hoggart and I have just the solution! Hogwash sold separately. - Normal5: There's a saying that goes “the grass is greener on the other side.” It's absolute balderdash!! For 5 platinum coins, you can buy our Greener Paint and make your life the greenest! + Normal5: There's a saying that goes "the grass is greener on the other side." It's absolute balderdash!! For 5 platinum coins, you can buy our Greener Paint and make your life the greenest! Normal6: They say keeping an Angel Statue nearby is more dangerous than a loaded gun. That's why I own multiple guns - in case some hooligan tries to sell me an Angel Statue! TownPigPresent1: You're searching for the lil' Piggy? Don't worry, chum! Hoggart and I gave it a Camo-Projector 2000 so it could disappear into the night. This way, not a single rotbrain will lay their nasty half-fingers on it, huehe! TownPigPresent2: Rumors are runnin' around that I'm inexplicably two Pigg'ins stacked on top of each other. What shameless slander! Don't they know that, if that were true, I'd charge twice the price? Hahaha! TownPigPresent3: You better take real good care of that piglet. Your sight gotta be good for something other than eyeballing my discounts! Otherwise, who knows what will happen to the swine stock market... TownPigPresent4: Where the Piggy went? Could've sworn I saw it chasing down a four-legged carrot. Now's your chance to chase Fortune and Glory, pal, by buying these MARVELOUS wares! - Rain: People always say “rain, rain, go away! Come back another day!”, but everyone knows it would be better if it came back never! To solve this, I intend to invest in Hoggart's Dome Program, we just need 500 platinum coins to get it off the ground! + Rain: People always say "rain, rain, go away! Come back another day!", but everyone knows it would be better if it came back never! To solve this, I intend to invest in Hoggart's Dome Program, we just need 500 platinum coins to get it off the ground! WindyDay: Aren't you tired of your house being blown away by any shoddy gust of wind? Well, I have the solution to your problem! With my state-of-the-art industrial super glue (for only 5 gold coins a pack), you too may survive the attack of invaders with outstanding lung capacity! Desert: Exhausted from this oven-like heat? Yearning for something to help you cool down? Check out our revolutionary new product: water! It comes in all flavors of flavorless! Any bottle shape is available, from round to triangular! Feel the chill of molten ice as it enters your guts! It even has healing properties! Sip our free sample for the low price of 50 gold! - Tundra: Did you ever hear the tragedy of Kevin Bacon the Wise? I thought not, It’s not a story the Elumphants would tell you. Kevin Bacon was a Ham Lord of the Hogs, so powerful and so wise he could use his Hogtusk to influence metal to create gold... Unfortunately, he taught his apprentice everything he knew, then his apprentice out-cashed and deposed him. Ironic. He could save others from debt, but not himself. - Graveyard: Does that zombie look like a happy customer? No!! It’s full of maggots!! It has no life savings!! While you still do, hurry up and spend yours on a funky edition, happiness-smelling Maggot Repellent! + Tundra: Did you ever hear the tragedy of Kevin Bacon the Wise? I thought not, It's not a story the Elumphants would tell you. Kevin Bacon was a Ham Lord of the Hogs, so powerful and so wise he could use his Hogtusk to influence metal to create gold... Unfortunately, he taught his apprentice everything he knew, then his apprentice out-cashed and deposed him. Ironic. He could save others from debt, but not himself. + Graveyard: Does that zombie look like a happy customer? No!! It's full of maggots!! It has no life savings!! While you still do, hurry up and spend yours on a funky edition, happiness-smelling Maggot Repellent! BloodMoon1: These shambling deadheads are the worst! How am I supposed to rip people off when they're all either dead, broke or fighting for their lives?! BloodMoon2: Like my partner always says, price makes the prize! Hire our Moon Doom Cannon, and enjoy a whole year without the meatsack invasion! Fund the construction of the Eclipse variant and get a deluxe model with a neat robotic decal! All for 5000 platinum coins! BloodMoon3: Violence is at every corner tonight, huh? Remember these words, buddy: make deals, not war! Hardmode: Those pesky merchants still want to sell you full-price, low quality copper tools?! Bird droppings!! Barter with me, and you'll receive Palladium at HOG-WILD prizes! - MoonLordDefeated: I've been told this land is ruled by three gnomes in a suit of armor. That's impossible! Gnomes are the most deplorable customers I've dealt with. They can't handle a spoon without snapping it in half!! It’s always the halflings... + MoonLordDefeated: I've been told this land is ruled by three gnomes in a suit of armor. That's impossible! Gnomes are the most deplorable customers I've dealt with. They can't handle a spoon without snapping it in half!! It's always the halflings... } }