Rotdog (& banner) resprites + Gores

This commit is contained in:
Altixal committed 2024-02-17 00:30:02 +07:00
1 parent 4b1d9d5598
commit 397e6dfc96
8 files changed
+43 -5

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

After

Width:  |  Height:  |  Size: 467 B

+43 -5
View File
@@ -1,5 +1,6 @@
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Placeables.Banners;
using System;
using Terraria;
using Terraria.GameContent.Bestiary;
using Terraria.ID;
@@ -23,7 +24,6 @@ namespace CalamityMod.NPCs.NormalNPCs
NPC.defense = 4;
NPC.lifeMax = 60;
NPC.knockBackResist = 0.3f;
AnimationType = NPCID.Hellhound;
AIType = NPCID.Wolf;
NPC.value = Item.buyPrice(0, 0, 2, 0);
NPC.HitSound = SoundID.NPCHit1;
@@ -49,17 +49,48 @@ namespace CalamityMod.NPCs.NormalNPCs
{
if (NPC.IsABestiaryIconDummy)
{
NPC.frameCounter += 1.0;
if (NPC.frameCounter > 6.0)
NPC.frameCounter++;
if (NPC.frameCounter > 5)
{
NPC.frameCounter = 0.0;
NPC.frameCounter = 0;
NPC.frame.Y += frameHeight;
}
if (NPC.frame.Y > frameHeight * 10)
if (NPC.frame.Y > frameHeight * 7)
{
NPC.frame.Y = frameHeight;
}
}
else
{
NPC.spriteDirection = NPC.direction;
if (NPC.velocity.Y < 0f) // jump
{
NPC.frame.Y = frameHeight * 8;
NPC.frameCounter = 0.0;
}
else if (NPC.velocity.Y > 0f) // fall
{
NPC.frame.Y = frameHeight * 9;
NPC.frameCounter = 0.0;
}
else
{
NPC.frameCounter += Math.Abs(NPC.velocity.X) * 0.4f;
if (NPC.frameCounter > 4)
{
NPC.frameCounter = 0;
NPC.frame.Y += frameHeight;
if (NPC.frame.Y < frameHeight)
{
NPC.frame.Y = frameHeight;
}
if (NPC.frame.Y > frameHeight * 7)
{
NPC.frame.Y = frameHeight;
}
}
}
}
}
public override float SpawnChance(NPCSpawnInfo spawnInfo)
@@ -89,6 +120,13 @@ namespace CalamityMod.NPCs.NormalNPCs
{
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f, 0, default, 1f);
}
if (Main.netMode != NetmodeID.Server)
{
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("Rotdog1").Type, 1f);
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("Rotdog2").Type, 1f);
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("Rotdog3").Type, 1f);
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find<ModGore>("Rotdog4").Type, 1f);
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 65 KiB