1 - Fixed Deus sync.

2 - Adjusted Deus spawn resist to work in all modes.
This commit is contained in:
Andrew Marheine committed 2020-06-22 20:58:47 -05:00
1 parent fccbf3d9a6
commit 0317ddc49a
2 files changed
+7 -6

No files matched your search

+3
View File
@@ -2872,6 +2872,7 @@ namespace CalamityMod.NPCs
{
var netMessage = mod.GetPacket();
netMessage.Write((byte)CalamityModMessageType.SyncCalamityNPCAIArray);
netMessage.Write((byte)npc2);
netMessage.Write(Main.npc[npc2].Calamity().newAI[0]);
netMessage.Write(Main.npc[npc2].Calamity().newAI[1]);
netMessage.Write(Main.npc[npc2].Calamity().newAI[2]);
@@ -2889,6 +2890,7 @@ namespace CalamityMod.NPCs
{
var netMessage = mod.GetPacket();
netMessage.Write((byte)CalamityModMessageType.SyncCalamityNPCAIArray);
netMessage.Write((byte)npc3);
netMessage.Write(Main.npc[npc3].Calamity().newAI[0]);
netMessage.Write(Main.npc[npc3].Calamity().newAI[1]);
netMessage.Write(Main.npc[npc3].Calamity().newAI[2]);
@@ -3002,6 +3004,7 @@ namespace CalamityMod.NPCs
{
var netMessage = mod.GetPacket();
netMessage.Write((byte)CalamityModMessageType.SyncCalamityNPCAIArray);
netMessage.Write((byte)lol);
netMessage.Write(Main.npc[lol].Calamity().newAI[0]);
netMessage.Write(Main.npc[lol].Calamity().newAI[1]);
netMessage.Write(Main.npc[lol].Calamity().newAI[2]);
+4 -6
View File
@@ -1417,14 +1417,12 @@ namespace CalamityMod.NPCs
public override bool StrikeNPC(NPC npc, ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit)
{
// Damage reduction on spawn
if (CalamityWorld.revenge || CalamityWorld.bossRushActive)
bool destroyerResist = DestroyerIDs.Contains(npc.type) && (CalamityWorld.revenge || CalamityWorld.bossRushActive);
if (destroyerResist || AstrumDeusIDs.Contains(npc.type))
{
if (DestroyerIDs.Contains(npc.type) || AstrumDeusIDs.Contains(npc.type))
if (newAI[1] < 480f || (newAI[2] > 0f && DestroyerIDs.Contains(npc.type)))
{
if (newAI[1] < 480f || (newAI[2] > 0f && DestroyerIDs.Contains(npc.type)))
{
damage *= 0.01;
}
damage *= 0.01;
}
}