added the rest of slime god stuff and scal trophy
No files matched your search
|
Before Width: | Height: | Size: 413 B After Width: | Height: | Size: 524 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 509 B |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 815 B After Width: | Height: | Size: 922 B |
|
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 754 B |
|
Before Width: | Height: | Size: 841 B After Width: | Height: | Size: 922 B |
|
Before Width: | Height: | Size: 888 B After Width: | Height: | Size: 809 B |
|
Before Width: | Height: | Size: 542 B After Width: | Height: | Size: 513 B |
|
Before Width: | Height: | Size: 542 B After Width: | Height: | Size: 540 B |
|
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 481 B |
|
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 529 B |
@@ -15,7 +15,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Crimson Slime Spawn");
|
||||
Main.npcFrameCount[npc.type] = 2;
|
||||
Main.npcFrameCount[npc.type] = 5;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -31,7 +31,6 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.lifeMax = 12000;
|
||||
}
|
||||
npc.knockBackResist = 0f;
|
||||
animationType = NPCID.CorruptSlime;
|
||||
npc.alpha = 55;
|
||||
npc.lavaImmune = false;
|
||||
npc.noGravity = false;
|
||||
@@ -41,6 +40,35 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
npc.DeathSound = SoundID.NPCDeath1;
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
{
|
||||
int frameY = 1;
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
if (!Main.NPCLoaded[npc.type] || Main.npcTexture[npc.type] is null)
|
||||
return;
|
||||
frameY = Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type];
|
||||
}
|
||||
int aiState = 0;
|
||||
if (npc.aiAction == 0)
|
||||
aiState = npc.velocity.Y >= 0f ? (npc.velocity.Y <= 0f ? (npc.velocity.X == 0f ? 0 : 1) : 3) : 2;
|
||||
else if (npc.aiAction == 1)
|
||||
aiState = 4;
|
||||
|
||||
npc.frameCounter++;
|
||||
if (aiState > 0)
|
||||
npc.frameCounter++;
|
||||
if (aiState == 4)
|
||||
npc.frameCounter++;
|
||||
if (npc.frameCounter >= 8f)
|
||||
{
|
||||
npc.frame.Y += frameY;
|
||||
npc.frameCounter = 0f;
|
||||
}
|
||||
if (npc.frame.Y >= frameY * Main.npcFrameCount[npc.type])
|
||||
npc.frame.Y = 0;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (spikeTimer > 0f)
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 570 B After Width: | Height: | Size: 646 B |
|
Before Width: | Height: | Size: 453 B After Width: | Height: | Size: 697 B |
|
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 298 B |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |