rare critter variant consistency and such

This commit is contained in:
GinYuH committed 2025-04-11 21:15:28 -07:00
1 parent d727dbd05c
commit c2a1674d28
19 files changed
+217 -18

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
using CalamityMod.NPCs.SunkenSea;
using CalamityMod.Packets;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Critters
{
public class ProbesnoutGoldItem : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Misc";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
}
public override void SetDefaults()
{
Item.DefaultToCapturedCritter(ModContent.NPCType<ProbesnoutGold>());
Item.value = Item.sellPrice(gold: 10);
Item.rare = ItemRarityID.Green;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

+24
View File
@@ -0,0 +1,24 @@
using CalamityMod.NPCs.SunkenSea;
using CalamityMod.Packets;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Critters
{
public class ProbesnoutItem : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Misc";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
}
public override void SetDefaults()
{
Item.DefaultToCapturedCritter(ModContent.NPCType<Probesnout>());
Item.value = Item.sellPrice(silver: 10);
Item.rare = ItemRarityID.Green;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

@@ -1,11 +1,11 @@
// Critters
AlphaSeaMinnowItem: {
DisplayName: Alpha Sea Minnow
DisplayName: "{$NPCs.AlphaSeaMinnow.DisplayName}"
Tooltip: ""
}
AlphaSeaMinnowGoldItem: {
DisplayName: Gold Alpha Sea Minnow
DisplayName: "{$NPCs.AlphaSeaMinnowGold.DisplayName}"
Tooltip: ""
}
@@ -34,7 +34,7 @@ BabyGhostBellItem: {
}
BabyGhostBellGoldItem: {
DisplayName: Gold Baby Ghost Bell
DisplayName: "{$NPCs.GoldBabyGhostBell}"
Tooltip: ""
}
@@ -44,7 +44,7 @@ BabyGhostBellGreenItem: {
}
BabyGhostBellRadiantItem: {
DisplayName: Radiant Baby Ghost Bell
DisplayName: "{$NPCs.RadiantBabyGhostBell}"
Tooltip: ""
}
@@ -84,7 +84,7 @@ PearlpodItem: {
}
PearlpodGoldItem: {
DisplayName: Gold Pearlpod
DisplayName: "{$NPCs.PearlpodGold.DisplayName}"
Tooltip: ""
}
@@ -94,7 +94,7 @@ PearlpodPinkItem: {
}
PolypPanaseaGoldItem: {
DisplayName: Gold Polyp Panasea
DisplayName: "{$NPCs.GoldPolypPanasea}"
Tooltip: ""
}
@@ -114,7 +114,7 @@ PolypPanaseaPurpleItem: {
}
PolypPanaseaRadiantItem: {
DisplayName: Radiant Polyp Panasea
DisplayName: "{$NPCs.RadiantPolypPanasea}"
Tooltip: ""
}
@@ -134,7 +134,7 @@ PrismaticGuppyBlueItem: {
}
PrismaticGuppyGoldItem: {
DisplayName: Gold Prismatic Guppy
DisplayName: "{$NPCs.GoldPrismaticGuppy}"
Tooltip: ""
}
@@ -149,7 +149,17 @@ PrismaticGuppyPinkItem: {
}
PrismaticGuppyRadiantItem: {
DisplayName: Radiant Prismatic Guppy
DisplayName: "{$NPCs.RadiantPrismaticGuppy}"
Tooltip: ""
}
ProbesnoutGoldItem: {
DisplayName: "{$NPCs.ProbesnoutGold.DisplayName}"
Tooltip: ""
}
ProbesnoutItem: {
DisplayName: "{$NPCs.Probesnout.DisplayName}"
Tooltip: ""
}
@@ -164,7 +174,12 @@ SeaMinnowItem: {
}
SeaMinnowGoldItem: {
DisplayName: Gold Sea Minnow
DisplayName: "{$NPCs.SeaMinnowGold.DisplayName}"
Tooltip: ""
}
SearslugItem: {
DisplayName: "{$NPCs.Searslug.DisplayName}"
Tooltip: ""
}
@@ -189,7 +204,7 @@ SlugbunPolypItem: {
}
SlugbunRadiantItem: {
DisplayName: Radiant Slugbun
DisplayName: "{$NPCs.RadiantSlugbun}"
Tooltip: ""
}
@@ -491,8 +506,3 @@ SuperDummy: {
Right click to kill all super dummies
'''
}
SearslugItem: {
DisplayName: Searslug Item
Tooltip: ""
}
@@ -278,6 +278,9 @@ GhostBell.DisplayName: Ghost Bell
GiantClam.DisplayName: Giant Clam
Clamitas: Clamitas
SupremeClamitas: Supreme Clamitas
GoldBabyGhostBell: Gold Baby Ghost Bell
GoldPolypPanasea: Gold Polyp Panasea
GoldPrismaticGuppy: Gold Prismatic Guppy
HauntedChum.DisplayName: Haunted Chum
Jellyghoul.DisplayName: Jellyghoul
KelpieSeadragon.DisplayName: Kelpie Seadragon
@@ -292,8 +295,13 @@ PolypPanasea.DisplayName: Polyp Panasea
Polyperil.DisplayName: Polyperil
PrismBack.DisplayName: Prism-Back
Probesnout.DisplayName: Probesnout
ProbesnoutGold.DisplayName: Probesnout Gold
ProbesnoutGold.DisplayName: Gold Probesnout
PrismaticGuppy.DisplayName: Prismatic Guppy
RadiantBabyGhostBell: Radiant Baby Ghost Bell
RadiantPolypPanasea: Radiant Polyp Panasea
RadiantPolyperil: Radiant Polyperil
RadiantPrismaticGuppy: Radiant Prismatic Guppy
RadiantSlugbun: Radiant Slugbun
SandProwler.DisplayName: Sand Prowler
SandProwlerNested.DisplayName: Sand Prowler
SeaFloaty.DisplayName: Sea Floaty
+1
View File
@@ -274,6 +274,7 @@ namespace CalamityMod.NPCs.SunkenSea
base.SetDefaults();
NPC.rarity = 3;
NPC.catchItem = ModContent.ItemType<AlphaSeaMinnowGoldItem>();
NPC.value = 100000;
}
public override float SpawnChance(NPCSpawnInfo spawnInfo)
+18
View File
@@ -140,12 +140,14 @@ namespace CalamityMod.NPCs.SunkenSea
{
NPC.catchItem = ModContent.ItemType<BabyGhostBellRadiantItem>();
NPC.rarity = 3;
NPC.value = 100000;
}
break;
case (int)JellyColor.Gold:
{
NPC.catchItem = ModContent.ItemType<BabyGhostBellGoldItem>();
NPC.rarity = 3;
NPC.value = 100000;
}
break;
case (int)JellyColor.Voltaic:
@@ -236,7 +238,23 @@ namespace CalamityMod.NPCs.SunkenSea
if (Variant == (int)JellyColor.Gold)
{
NPC.ProduceGoldCritterDust();
}
if (Variant == (int)JellyColor.Radiant || Variant == (int)JellyColor.Gold)
{
NPC.rarity = 3;
NPC.value = 100000;
}
}
public override void ModifyTypeName(ref string typeName)
{
if (Variant == (int)JellyColor.Radiant)
{
typeName = CalamityUtils.GetTextValue("NPCs.RadiantBabyGhostBell");
}
if (Variant == (int)JellyColor.Gold)
{
typeName = CalamityUtils.GetTextValue("NPCs.GoldBabyGhostBell");
}
}
+1
View File
@@ -87,6 +87,7 @@ namespace CalamityMod.NPCs.SunkenSea
{
Variant = (int)ShoalColor.Gold;
NPC.catchItem = ItemID.GoldCoin;
NPC.value = 10000;
}
RandomOpacityOffset = Main.rand.NextFloat(MathHelper.TwoPi);
+1 -1
View File
@@ -423,7 +423,7 @@ namespace CalamityMod.NPCs.SunkenSea
public override void SetDefaults()
{
base.SetDefaults();
NPC.value = Item.buyPrice(0, 0, 5, 0);
NPC.value = 120000;
NPC.catchItem = ItemType;
SpawnModBiomes = new int[1] { ModContent.GetInstance<SunkenSeaBiome>().Type };
NPC.rarity = 3;
+16
View File
@@ -227,7 +227,11 @@ namespace CalamityMod.NPCs.SunkenSea
if (Variant == (int)FishColor.Gold)
{
NPC.ProduceGoldCritterDust();
}
if (Variant == (int)FishColor.Gold || Variant == (int)FishColor.Radiant)
{
NPC.rarity = 3;
NPC.value = 100000;
}
}
@@ -379,6 +383,18 @@ namespace CalamityMod.NPCs.SunkenSea
}
}
public override void ModifyTypeName(ref string typeName)
{
if (Variant == (int)FishColor.Radiant)
{
typeName = CalamityUtils.GetTextValue("NPCs.RadiantPolypPanasea");
}
if (Variant == (int)FishColor.Gold)
{
typeName = CalamityUtils.GetTextValue("NPCs.GoldPolypPanasea");
}
}
public override void FindFrame(int frameHeight)
{
if (!NPC.wet && !NPC.IsABestiaryIconDummy)
+12
View File
@@ -85,7 +85,11 @@ namespace CalamityMod.NPCs.SunkenSea
Color = Main.rand.Next(0, 3);
// 1 in 30 chance to be Radiant
if (Main.rand.NextBool(30))
{
Color = 3;
NPC.rarity = 3;
NPC.value = 100000;
}
// Spawn tentacles
int dist = 80;
@@ -135,6 +139,14 @@ namespace CalamityMod.NPCs.SunkenSea
}
}
public override void ModifyTypeName(ref string typeName)
{
if (Color == 3)
{
typeName = CalamityUtils.GetTextValue("NPCs.RadiantPolyperil");
}
}
public override bool CanBeHitByNPC(NPC attacker)
{
return PredatorIDs.Contains(attacker.type);
+13
View File
@@ -216,6 +216,19 @@ namespace CalamityMod.NPCs.SunkenSea
}
}
public override void ModifyTypeName(ref string typeName)
{
NPC parent = Main.npc[(int)ParentIndex];
if (parent == null || !parent.active || parent.life < 0 || parent.type != ModContent.NPCType<Polyperil>())
{
return;
}
if (parent.ai[1] == 3)
{
typeName = CalamityUtils.GetTextValue("NPCs.RadiantPolyperil");
}
}
public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor)
{
NPC parent = Main.npc[(int)ParentIndex];
+17
View File
@@ -17,6 +17,7 @@ using Terraria.GameContent.Bestiary;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ModLoader.Utilities;
using static Terraria.GameContent.Animations.IL_Actions.NPCs;
namespace CalamityMod.NPCs.SunkenSea
{
@@ -222,6 +223,7 @@ namespace CalamityMod.NPCs.SunkenSea
{
CurrentColor = Main.rand.Next(3, 5);
NPC.rarity = 3;
NPC.value = 100000;
}
// Decide item..........................
switch (CurrentColor)
@@ -443,11 +445,13 @@ namespace CalamityMod.NPCs.SunkenSea
if (CurrentColor == (int)FishColor.Gold)
{
NPC.rarity = 3;
NPC.value = 100000;
NPC.ProduceGoldCritterDust();
}
if (CurrentColor == (int)FishColor.Radiant)
{
NPC.rarity = 3;
NPC.value = 100000;
}
}
@@ -473,6 +477,19 @@ namespace CalamityMod.NPCs.SunkenSea
}
}
}
public override void ModifyTypeName(ref string typeName)
{
if (CurrentColor == (int)FishColor.Radiant)
{
typeName = CalamityUtils.GetTextValue("NPCs.RadiantPrismaticGuppy");
}
if (CurrentColor == (int)FishColor.Gold)
{
typeName = CalamityUtils.GetTextValue("NPCs.GoldPrismaticGuppy");
}
}
public override float SpawnChance(NPCSpawnInfo spawnInfo)
{
if (spawnInfo.Water && !spawnInfo.Player.Calamity().clamity)
+4
View File
@@ -5,6 +5,7 @@ using System.Linq;
using System.Threading;
using System.Xml.XPath;
using CalamityMod.Enums;
using CalamityMod.Items.Critters;
using CalamityMod.Items.Placeables.Banners;
using CalamityMod.Tiles;
using Microsoft.Xna.Framework;
@@ -415,6 +416,7 @@ namespace CalamityMod.NPCs.SunkenSea
NPC.HitSound = SoundID.NPCHit1;
NPC.DeathSound = SoundID.NPCDeath1;
NPC.value = Item.buyPrice(0, 0, 5, 0);
NPC.catchItem = ModContent.ItemType<ProbesnoutItem>();
NPC.Calamity().VulnerableToHeat = false;
NPC.Calamity().VulnerableToSickness = true;
@@ -463,6 +465,8 @@ namespace CalamityMod.NPCs.SunkenSea
{
base.SetDefaults();
NPC.rarity = 3;
NPC.catchItem = ItemType<ProbesnoutGoldItem>();
NPC.value = 100000;
}
public override void HitEffect(NPC.HitInfo hit)
+1
View File
@@ -328,6 +328,7 @@ namespace CalamityMod.NPCs.SunkenSea
base.SetDefaults();
NPC.catchItem = (short)ModContent.ItemType<SeaMinnowItem>();
NPC.rarity = 3;
NPC.value = 100000;
}
public override void HitEffect(NPC.HitInfo hit)
+14
View File
@@ -135,6 +135,7 @@ namespace CalamityMod.NPCs.SunkenSea
{
CurrentSkin = (int)SlugSkin.Radiant;
NPC.rarity = 3;
NPC.value = 100000;
}
// Decide item..........................
switch (CurrentSkin)
@@ -191,6 +192,11 @@ namespace CalamityMod.NPCs.SunkenSea
}
}
}
if (CurrentSkin == (int)SlugSkin.Radiant)
{
NPC.rarity = 3;
NPC.value = 100000;
}
}
public override void FindFrame(int frameHeight)
@@ -207,6 +213,14 @@ namespace CalamityMod.NPCs.SunkenSea
}
}
public override void ModifyTypeName(ref string typeName)
{
if (CurrentSkin == (int)SlugSkin.Radiant)
{
typeName = CalamityUtils.GetTextValue("NPCs.RadiantSlugbun");
}
}
public override bool CanBeHitByNPC(NPC attacker) => PredatorIDs.Contains(attacker.type);
public override float SpawnChance(NPCSpawnInfo spawnInfo)
Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

+36
View File
@@ -1280,6 +1280,42 @@ namespace CalamityMod.Systems
r.Register();
r.DisableDecraft();
r = Recipe.Create(ItemID.GoldenDelight);
r.AddIngredient<BabyGhostBellGoldItem>();
r.AddTile(TileID.CookingPots);
r.Register();
r.DisableDecraft();
r = Recipe.Create(ItemID.GoldenDelight);
r.AddIngredient<ProbesnoutGoldItem>();
r.AddTile(TileID.CookingPots);
r.Register();
r.DisableDecraft();
r = Recipe.Create(ItemID.GoldenDelight);
r.AddIngredient<PolypPanaseaGoldItem>();
r.AddTile(TileID.CookingPots);
r.Register();
r.DisableDecraft();
r = Recipe.Create(ItemID.GoldenDelight);
r.AddIngredient<PearlpodGoldItem>();
r.AddTile(TileID.CookingPots);
r.Register();
r.DisableDecraft();
r = Recipe.Create(ItemID.GoldenDelight);
r.AddIngredient<SeaMinnowGoldItem>();
r.AddTile(TileID.CookingPots);
r.Register();
r.DisableDecraft();
r = Recipe.Create(ItemID.GoldenDelight);
r.AddIngredient<AlphaSeaMinnowGoldItem>();
r.AddTile(TileID.CookingPots);
r.Register();
r.DisableDecraft();
r = Recipe.Create(ItemID.Bacon);
r.AddIngredient<PiggyItem>();
r.AddTile(TileID.Hellforge);