Astrum Deus main worm supports alt. body

Added the second body texture for the main Astrum Deus worm. Other Astrum Deus resprites are not in yet
This commit is contained in:
Ozzatron committed 2018-11-12 13:57:42 -06:00
1 parent 919e57c645
commit e6fbb1fce9
3 files changed
+15

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

+10
View File
@@ -137,6 +137,16 @@ namespace CalamityMod.NPCs.AstrumDeus
}
}
}
// exactly like minion worms: every other segment uses alternate texture
// localAI[3] is set to 1 for every other segment when they are spawned by the head
public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor)
{
Mod mod = ModLoader.GetMod("CalamityMod");
Texture2D texture = mod.GetTexture("NPCs/AstrumDeus/AstrumDeusBodyAltSpectral");
CalamityMod.DrawTexture(spriteBatch, (npc.localAI[3] == 1f ? texture : Main.npcTexture[npc.type]), 0, npc, drawColor);
return false;
}
public override Color? GetAlpha(Color drawColor)
{
@@ -125,6 +125,11 @@ namespace CalamityMod.NPCs.AstrumDeus
{
lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), mod.NPCType("AstrumDeusTailSpectral"), npc.whoAmI);
}
// exactly like minion worms: every other segment uses alternate texture
if (num36 % 2 == 0)
Main.npc[lol].localAI[3] = 1f;
Main.npc[lol].realLife = npc.whoAmI;
Main.npc[lol].ai[2] = (float)npc.whoAmI;
Main.npc[lol].ai[1] = (float)Previous;