Rotdog (& banner) resprites + Gores
No files matched your search
|
After Width: | Height: | Size: 664 B |
|
After Width: | Height: | Size: 604 B |
|
After Width: | Height: | Size: 352 B |
|
After Width: | Height: | Size: 566 B |
|
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 467 B |
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 65 KiB |