final assets

This commit is contained in:
GinYuH committed 2026-04-22 21:08:58 -07:00
1 parent e57ec144e9
commit 480bef6856
9 files changed
+42 -18

No files matched your search

@@ -11,10 +11,9 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.SummonItems.TownPets
{
public class PiggyLicense : ModItem, ILocalizedModType
public class TheHousingContract : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.SummonItems";
public override string Texture => "Terraria/Images/Item_" + ItemID.LicenseBunny;
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 5;
Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

@@ -154,6 +154,7 @@ Archmage: One of the world's foremost experts on magical theory, he is renowned
Bandit: The bandit may have a bad habit of looting battlefields and taking what isn't theirs, but their actions are mostly motivated by their hatred of the obscenely rich who haven't truly earned the wealth they possess. Their methods are somewhat shady, but can always be relied upon to get a job done.
BrimstoneWitch: Recruited to Yharim's forces late into the war, her magic overflows with such power that she is largely incapable of casting normal spells. Yet despite her great power, Calamitas prefers not to use it, as it takes a heavy toll on her psyche.
SeaKing: The seventeenth ruler of the constitutional monarchy of Ilmeris since the tribes of the Ilmeran Sea unified, under the Electric Goddess, Otonilou, and the elusive God of the Seas. Alas, one cannot be a ruler without subjects, and while he remains respected by those who opposed Godseeker Yharim, his kingdom is no more.
TownPiggy: Oink
//Boss Minions
Brimling: Extensions of the Brimstone Elemental herself, and part of her very being. Both she and her Brimlings are of a single mind, so she naturally cares for them just as she cares for herself. When heavily wounded, they withdraw into a cocoon to protect themselves from further harm.
SoulSeeker: The Clone's attempt at wielding the souls of the damned as weapons, these retain slightly more autonomy than their Azafurian brethren. And yet given the striking resemblance the bear to the Clone's shell, it's arguable that they might be further from Calamitas' current soul seekers than those found in Azafure's ruins.
@@ -212,11 +212,6 @@ OverloadedSludge: {
'''
}
PiggyLicense: {
DisplayName: Piggy License
Tooltip: Use to adopt a piggy for your town
}
Portabulb: {
DisplayName: Portabulb
Tooltip:
@@ -294,6 +289,11 @@ Terminus: {
Tooltip: Hold <left> to start or end the Boss Rush
}
TheHousingContract: {
DisplayName: The Housing Contract
Tooltip: Use to adopt a piggy for your town
}
YharonEgg: {
DisplayName: Blessed Phoenix Egg
Tooltip:
@@ -562,8 +562,8 @@ SeaKing: {
}
TownPiggy: {
DisplayName: Piggy
Census.SpawnCondition: Use a Piggy License
DisplayName: Town Piggy
Census.SpawnCondition: Use The Housing Contract
Name: {
Oolong: Oolong
@@ -584,7 +584,7 @@ TownPiggy: {
Curly: Curly
Techno: Techno
JohnPork: John Pork
Piglet: Piglet
Piglet: Piglet
}
Chat: {
+31 -7
View File
@@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.TownNPCs
{
public override void SetStaticDefaults()
{
Main.npcFrameCount[Type] = 8;
Main.npcFrameCount[Type] = 13;
NPCID.Sets.ExtraFramesCount[Type] = 0;
NPCID.Sets.AttackFrameCount[Type] = 0;
NPCID.Sets.DangerDetectRange[Type] = 250;
@@ -51,6 +51,7 @@ namespace CalamityMod.NPCs.TownNPCs
NPC.width = 20;
NPC.height = 20;
NPC.aiStyle = NPCAIStyleID.Passive;
AIType = NPCID.TownBunny;
NPC.damage = 0;
NPC.defense = 0;
NPC.lifeMax = 50;
@@ -59,7 +60,6 @@ namespace CalamityMod.NPCs.TownNPCs
NPC.knockBackResist = 0.5f;
NPC.housingCategory = 1;
DrawOffsetY = -4;
//AnimationType = NPCID.TownBunny;
}
public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
{
@@ -113,8 +113,34 @@ namespace CalamityMod.NPCs.TownNPCs
public override void FindFrame(int frameHeight)
{
if (NPC.velocity.X == 0)
// Sleep animation
if (NPC.ai[0] >= 20f && NPC.ai[0] <= 22f)
{
if (NPC.velocity.Y == 0)
{
if (NPC.ai[1] > 30f && (NPC.frame.Y < frameHeight * 8))
{
NPC.frame.Y = frameHeight * 8;
}
if (NPC.frame.Y > 0)
{
NPC.frameCounter++;
}
if (NPC.frameCounter > 6)
{
NPC.frameCounter = 0;
NPC.frame.Y += frameHeight;
}
if (NPC.frame.Y > 12 * frameHeight)
{
NPC.frame.Y = frameHeight * 8;
}
}
}
else if (NPC.velocity.X == 0)
{
NPC.frame.Y = 0;
}
else
{
if (NPC.velocity.Y == 0)
@@ -122,14 +148,12 @@ namespace CalamityMod.NPCs.TownNPCs
if (NPC.frameCounter++ % 6 == 0)
{
NPC.frame.Y += frameHeight;
if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type])
{
NPC.frame.Y = frameHeight;
}
}
}
if (NPC.frame.Y < frameHeight)
NPC.frame.Y = frameHeight;
if (NPC.frame.Y > frameHeight * 7)
NPC.frame.Y = frameHeight;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 B

After

Width:  |  Height:  |  Size: 426 B

+1 -1
View File
@@ -15,6 +15,6 @@ namespace CalamityMod.Packets
packet.Send(toClient, ignoreClient);
}
public override void HandlePacket(BinaryReader packet, int sender) => PiggyLicense.SpawnPiggy();
public override void HandlePacket(BinaryReader packet, int sender) => TheHousingContract.SpawnPiggy();
}
}