Fair contact damage for Tortoise AI enemies.

This commit is contained in:
mountaindrew10 committed 2024-03-02 00:17:23 -06:00
1 parent 5e98de6ba9
commit b41af331ec
3 files changed
+32 -1

No files matched your search

+15
View File
@@ -4722,6 +4722,7 @@ namespace CalamityMod.NPCs
#region AI
public override void AI(NPC npc)
{
// Fair contact damage
switch (npc.type)
{
case NPCID.BlueSlime:
@@ -4758,6 +4759,20 @@ namespace CalamityMod.NPCs
npc.damage = (npc.velocity.Y == 0f || npc.velocity.Length() < 3f) ? 0 : npc.defDamage;
break;
case NPCID.GiantShelly:
case NPCID.GiantShelly2:
npc.damage = npc.ai[0] == 3f ? (int)(npc.defDamage * 1.35) : 0;
break;
case NPCID.GiantTortoise:
case NPCID.IceTortoise:
npc.damage = npc.ai[0] == 3f ? (int)(npc.defDamage * 1.8) : 0;
break;
case NPCID.SolarSroller:
npc.damage = npc.ai[0] == 6f ? (int)(npc.defDamage * 1.4) : 0;
break;
default:
break;
}
+5
View File
@@ -54,6 +54,11 @@ namespace CalamityMod.NPCs.PlagueEnemies
});
}
public override void AI()
{
NPC.damage = NPC.ai[0] == 3f ? (int)(NPC.defDamage * 1.8) : 0;
}
public override void HitEffect(NPC.HitInfo hit)
{
for (int k = 0; k < 5; k++)
@@ -8177,7 +8177,9 @@ PrepareToShoot:
}
npc.defense = npc.defDefense;
npc.damage = npc.defDamage;
// Avoid cheap bullshit
npc.damage = 0;
if (npc.type == NPCID.GiantShelly || npc.type == NPCID.GiantShelly2)
{
@@ -8319,6 +8321,9 @@ PrepareToShoot:
}
else if (npc.ai[0] == 1f)
{
// Avoid cheap bullshit
npc.damage = 0;
npc.velocity.X = npc.velocity.X * 0.5f;
if (npc.type == NPCID.GiantShelly || npc.type == NPCID.GiantShelly2)
@@ -8451,6 +8456,9 @@ PrepareToShoot:
if (npc.ai[0] == 4f)
{
// Avoid cheap bullshit
npc.damage = 0;
if (npc.wet && npc.directionY < 0)
{
npc.velocity.Y = npc.velocity.Y - 0.45f;
@@ -8602,6 +8610,9 @@ PrepareToShoot:
if (npc.ai[0] == 5f)
{
// Avoid cheap bullshit
npc.damage = 0;
npc.rotation = 0f;
npc.velocity.X = 0f;