1 - Rev changes enemy AIs now.
2 - Death changes some enemies to be harder than current Death. 3 - Added buff for Trinket of Chi team regen.
This commit is contained in:
1 parent
60ff7b44a1
commit
2d1d2b352b
41 files changed
+444
-217
No files matched your search
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
@@ -13,7 +13,6 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class ChiRegenBuff : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Chi");
|
||||
Description.SetDefault("Life regen increased");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 551 B |
@@ -35,7 +35,10 @@ namespace CalamityMod.Items.Accessories
|
||||
if (player.whoAmI != Main.myPlayer && player.miscCounter % 10 == 0)
|
||||
{
|
||||
if (Main.LocalPlayer.team == player.team && player.team != 0)
|
||||
{
|
||||
Main.LocalPlayer.AddBuff(ModContent.BuffType<ChiRegenBuff>(), 20, true);
|
||||
Main.LocalPlayer.lifeRegen += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace CalamityMod.NPCs.Abyss
|
||||
if (NPC.velocity.X > -num263 && NPC.velocity.X < num263 && NPC.velocity.Y > -num263 && NPC.velocity.Y < num263)
|
||||
{
|
||||
NPC.TargetClosest(true);
|
||||
float num264 = CalamityWorld.death ? 12f : 8f;
|
||||
float num264 = CalamityWorld.death ? 12f : CalamityWorld.revenge ? 10f : 8f;
|
||||
Vector2 vector31 = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
|
||||
float num265 = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2) - vector31.X;
|
||||
float num266 = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2) - vector31.Y;
|
||||
|
||||
@@ -151,9 +151,9 @@ namespace CalamityMod.NPCs.Abyss
|
||||
if (flag14)
|
||||
{
|
||||
NPC.TargetClosest(true);
|
||||
NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * (CalamityWorld.death ? 0.5f : 0.25f) * speedBoost;
|
||||
NPC.velocity.Y = NPC.velocity.Y + (float)NPC.directionY * (CalamityWorld.death ? 0.3f : 0.15f) * speedBoost;
|
||||
float velocity = CalamityWorld.death ? 12f : 6f;
|
||||
NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * (CalamityWorld.death ? 0.5f : CalamityWorld.revenge ? 0.375f : 0.25f) * speedBoost;
|
||||
NPC.velocity.Y = NPC.velocity.Y + (float)NPC.directionY * (CalamityWorld.death ? 0.3f : CalamityWorld.revenge ? 0.225f : 0.15f) * speedBoost;
|
||||
float velocity = CalamityWorld.death ? 12f : CalamityWorld.revenge ? 9f : 6f;
|
||||
if (NPC.velocity.X > velocity * speedBoost)
|
||||
{
|
||||
NPC.velocity.X = velocity * speedBoost;
|
||||
|
||||
@@ -147,9 +147,9 @@ namespace CalamityMod.NPCs.Abyss
|
||||
if (flag14)
|
||||
{
|
||||
NPC.TargetClosest(true);
|
||||
NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * (CalamityWorld.death ? 0.5f : 0.25f) * speedBoost;
|
||||
NPC.velocity.Y = NPC.velocity.Y + (float)NPC.directionY * (CalamityWorld.death ? 0.3f : 0.15f) * speedBoost;
|
||||
float velocity = CalamityWorld.death ? 12f : 6f;
|
||||
NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * (CalamityWorld.death ? 0.5f : CalamityWorld.revenge ? 0.375f : 0.25f) * speedBoost;
|
||||
NPC.velocity.Y = NPC.velocity.Y + (float)NPC.directionY * (CalamityWorld.death ? 0.3f : CalamityWorld.revenge ? 0.225f : 0.15f) * speedBoost;
|
||||
float velocity = CalamityWorld.death ? 12f : CalamityWorld.revenge ? 9f : 6f;
|
||||
if (NPC.velocity.X > velocity * speedBoost)
|
||||
{
|
||||
NPC.velocity.X = velocity * speedBoost;
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace CalamityMod.NPCs.Abyss
|
||||
if (NPC.velocity.X > -num263 && NPC.velocity.X < num263 && NPC.velocity.Y > -num263 && NPC.velocity.Y < num263)
|
||||
{
|
||||
NPC.TargetClosest(true);
|
||||
float num264 = CalamityWorld.death ? 24f : 16f;
|
||||
float num264 = CalamityWorld.death ? 24f : CalamityWorld.revenge ? 20f : 16f;
|
||||
Vector2 vector31 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f);
|
||||
float num265 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - vector31.X;
|
||||
float num266 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - vector31.Y;
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace CalamityMod.NPCs.Abyss
|
||||
{
|
||||
++screamTimer;
|
||||
|
||||
int screamLimit = CalamityWorld.death ? 120 : 180;
|
||||
int screamLimit = CalamityWorld.death ? 60 : CalamityWorld.revenge ? 120 : 180;
|
||||
if (screamTimer >= screamLimit)
|
||||
{
|
||||
if (screamTimer == screamLimit)
|
||||
@@ -253,7 +253,7 @@ namespace CalamityMod.NPCs.Abyss
|
||||
NPC.frameCounter = 0.0;
|
||||
NPC.frame.Y = NPC.frame.Y + frameHeight;
|
||||
}
|
||||
if (screamTimer <= (CalamityWorld.death ? 120 : 180))
|
||||
if (screamTimer <= (CalamityWorld.death ? 60 : CalamityWorld.revenge ? 120 : 180))
|
||||
{
|
||||
if (NPC.frame.Y > frameHeight * 5)
|
||||
{
|
||||
|
||||
@@ -71,8 +71,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
{
|
||||
NPC.TargetClosest(true);
|
||||
}
|
||||
float num = CalamityWorld.death ? 7.5f : 5f;
|
||||
float num2 = CalamityWorld.death ? 0.075f : 0.05f;
|
||||
float num = CalamityWorld.death ? 8f : CalamityWorld.revenge ? 6.5f : 5f;
|
||||
float num2 = CalamityWorld.death ? 0.08f : CalamityWorld.revenge ? 0.065f : 0.05f;
|
||||
Vector2 vector = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f);
|
||||
float num4 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2);
|
||||
float num5 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2);
|
||||
@@ -146,7 +146,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
NPC.velocity.Y = NPC.velocity.Y - num2;
|
||||
}
|
||||
NPC.localAI[0] += 1f;
|
||||
if (NPC.justHit && !CalamityWorld.death)
|
||||
if (NPC.justHit && !CalamityWorld.revenge)
|
||||
{
|
||||
NPC.localAI[0] = 0f;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
CalamityGlobalNPC.DoSpiderWallAI(NPC, ModContent.NPCType<AstralachneaGround>(), (CalamityWorld.death ? 3.6f : 2.4f), (CalamityWorld.death ? 0.15f : 0.1f));
|
||||
CalamityGlobalNPC.DoSpiderWallAI(NPC, ModContent.NPCType<AstralachneaGround>(), (CalamityWorld.death ? 3.6f : CalamityWorld.revenge ? 3f : 2.4f), (CalamityWorld.death ? 0.15f : CalamityWorld.revenge ? 0.125f : 0.1f));
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
|
||||
@@ -141,9 +141,14 @@ namespace CalamityMod.NPCs.Astral
|
||||
NPC.knockBackResist = 0.04f;
|
||||
NPC.lifeMax = 1600;
|
||||
}
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
target_walkAcceleration = 0.16f;
|
||||
target_walkMaxSpeed = 2.4f;
|
||||
}
|
||||
if (CalamityWorld.death)
|
||||
{
|
||||
target_walkAcceleration = 0.18f;
|
||||
target_walkAcceleration = 0.2f;
|
||||
target_walkMaxSpeed = 3.2f;
|
||||
}
|
||||
NPC.Calamity().VulnerableToHeat = true;
|
||||
|
||||
@@ -115,13 +115,13 @@ namespace CalamityMod.NPCs.Astral
|
||||
vector.Normalize();
|
||||
Vector2 spawnPoint = NPC.Center + vector * 42f;
|
||||
|
||||
if (NPC.ai[1] >= (CalamityWorld.death ? 120f : 160f))
|
||||
if (NPC.ai[1] >= (CalamityWorld.death ? 80f : CalamityWorld.revenge ? 120f : 160f))
|
||||
{
|
||||
NPC.ai[1] = 0f;
|
||||
|
||||
int n = NPC.NewNPC(NPC.GetSource_FromAI(), (int)spawnPoint.X, (int)spawnPoint.Y, ModContent.NPCType<AstralSeekerSpit>());
|
||||
Main.npc[n].Center = spawnPoint;
|
||||
Main.npc[n].velocity = vector * (CalamityWorld.death ? 12f : 10f);
|
||||
Main.npc[n].velocity = vector * (CalamityWorld.death ? 12f : CalamityWorld.revenge ? 11f : 10f);
|
||||
}
|
||||
else if (NPC.ai[1] >= 140f) //oozin dust at the "mouth"
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
CalamityGlobalNPC.DoVultureAI(NPC, (CalamityWorld.death ? 0.225f : 0.15f), (CalamityWorld.death ? 5.25f : 3.5f), 32, 50, 150, 150);
|
||||
CalamityGlobalNPC.DoVultureAI(NPC, (CalamityWorld.death ? 0.25f : CalamityWorld.revenge ? 0.2f : 0.15f), (CalamityWorld.death ? 5.5f : CalamityWorld.revenge ? 4.5f : 3.5f), 32, 50, 150, 150);
|
||||
|
||||
//usually done in framing but I put it here because it makes more sense to.
|
||||
NPC.rotation = NPC.velocity.X * 0.1f;
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
public override void AI()
|
||||
{
|
||||
NPC.ai[0]++;
|
||||
if (NPC.ai[0] > (CalamityWorld.death ? 120f : 180f))
|
||||
if (NPC.ai[0] > (CalamityWorld.death ? 60f : CalamityWorld.revenge ? 120f : 180f))
|
||||
{
|
||||
if (Main.rand.NextBool(100) && NPC.CountNPCS(ModContent.NPCType<Hiveling>()) < 10)
|
||||
{
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
}
|
||||
else
|
||||
{
|
||||
CalamityGlobalNPC.DoFlyingAI(NPC, (CalamityWorld.death ? 4.5f : 3f), (CalamityWorld.death ? 0.075f : 0.05f), 200f);
|
||||
CalamityGlobalNPC.DoFlyingAI(NPC, (CalamityWorld.death ? 5f : CalamityWorld.revenge ? 4f : 3f), (CalamityWorld.death ? 0.08f : CalamityWorld.revenge ? 0.065f : 0.05f), 200f);
|
||||
Player myTarget = Main.player[NPC.target];
|
||||
Vector2 toTarget = myTarget.Center - NPC.Center;
|
||||
if (!myTarget.dead && myTarget.active)
|
||||
|
||||
@@ -81,8 +81,8 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
if (NPC.ai[0] == 0f)
|
||||
{
|
||||
float acceleration = CalamityWorld.death ? 0.07f : 0.045f;
|
||||
float maxSpeed = CalamityWorld.death ? 10.5f : 6.8f;
|
||||
float acceleration = CalamityWorld.death ? 0.075f : CalamityWorld.revenge ? 0.06f : 0.045f;
|
||||
float maxSpeed = CalamityWorld.death ? 10.8f : CalamityWorld.revenge ? 8.8f : 6.8f;
|
||||
if (NPC.Center.X > target.Center.X)
|
||||
{
|
||||
NPC.velocity.X -= acceleration;
|
||||
@@ -103,7 +103,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
//if need to jump
|
||||
if (NPC.velocity.Y == 0f && (HoleBelow() || (NPC.collideX && NPC.position.X == NPC.oldPosition.X)))
|
||||
{
|
||||
NPC.velocity.Y = CalamityWorld.death ? -7f : -5f;
|
||||
NPC.velocity.Y = CalamityWorld.death ? -8f : CalamityWorld.revenge ? -6.5f : -5f;
|
||||
}
|
||||
|
||||
//check if we can shoot at target.
|
||||
@@ -111,7 +111,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
if (vector.Length() < 480f && Collision.CanHit(NPC.position, NPC.width, NPC.height, target.position, target.width, target.height))
|
||||
{
|
||||
NPC.ai[1] += 1f;
|
||||
if (NPC.ai[1] >= (CalamityWorld.death ? 60f : 120f))
|
||||
if (NPC.ai[1] >= (CalamityWorld.death ? 60f : CalamityWorld.revenge ? 90f : 120f))
|
||||
{
|
||||
//fire projectile
|
||||
NPC.ai[0] = 1f;
|
||||
|
||||
+8
-3
@@ -70,9 +70,14 @@ namespace CalamityMod.NPCs.Astral
|
||||
NPC.knockBackResist = 0.4f;
|
||||
NPC.lifeMax = 350;
|
||||
}
|
||||
if (CalamityWorld.death)
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
travelAcceleration = 0.3f;
|
||||
targetTime = 90f;
|
||||
}
|
||||
if (CalamityWorld.death)
|
||||
{
|
||||
travelAcceleration = 0.4f;
|
||||
targetTime = 60f;
|
||||
}
|
||||
NPC.Calamity().VulnerableToHeat = true;
|
||||
@@ -130,7 +135,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
Player target = Main.player[NPC.target];
|
||||
if (NPC.ai[3] >= 0)
|
||||
{
|
||||
CalamityGlobalNPC.DoFlyingAI(NPC, (CalamityWorld.death ? 8.25f : 5.5f), (CalamityWorld.death ? 0.0525f : 0.035f), 400f, 150, false);
|
||||
CalamityGlobalNPC.DoFlyingAI(NPC, (CalamityWorld.death ? 8.5f : CalamityWorld.revenge ? 7f : 5.5f), (CalamityWorld.death ? 0.055f : CalamityWorld.revenge ? 0.045f : 0.035f), 400f, 150, false);
|
||||
|
||||
if (Collision.CanHit(NPC.position, NPC.width, NPC.height, target.position, target.width, target.height))
|
||||
{
|
||||
@@ -144,7 +149,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
Vector2 between = target.Center - NPC.Center;
|
||||
|
||||
//after locking target for x amount of time and being far enough away
|
||||
int random = CalamityWorld.death ? 90 : 180;
|
||||
int random = CalamityWorld.death ? 90 : CalamityWorld.revenge ? 135 : 180;
|
||||
if (between.Length() > 150 && NPC.ai[3] >= targetTime && Main.rand.NextBool(random))
|
||||
{
|
||||
//set ai mode to target and travel
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace CalamityMod.NPCs.Astral
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
CalamityGlobalNPC.DoFlyingAI(NPC, (CalamityWorld.death ? 8.7f : 5.8f), (CalamityWorld.death ? 0.045f : 0.03f), 350f);
|
||||
CalamityGlobalNPC.DoFlyingAI(NPC, (CalamityWorld.death ? 9.8f : CalamityWorld.revenge ? 7.8f : 5.8f), (CalamityWorld.death ? 0.05f : CalamityWorld.revenge ? 0.04f : 0.03f), 350f);
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
+8
-8
@@ -6877,8 +6877,8 @@ namespace CalamityMod.NPCs
|
||||
#region Unicorn AI
|
||||
public static void UnicornAI(NPC npc, Mod mod, bool spin, float bounciness, float speedDetect, float speedAdditive, float bouncy1 = -8.5f, float bouncy2 = -7.5f, float bouncy3 = -7f, float bouncy4 = -6f, float bouncy5 = -8f)
|
||||
{
|
||||
bool DogPhase1 = npc.type == ModContent.NPCType<Rimehound>() && npc.life > npc.lifeMax * (CalamityWorld.death ? 0.9 : 0.5);
|
||||
bool DogPhase2 = npc.type == ModContent.NPCType<Rimehound>() && npc.life <= npc.lifeMax * (CalamityWorld.death ? 0.9 : 0.5);
|
||||
bool DogPhase1 = npc.type == ModContent.NPCType<Rimehound>() && npc.life > npc.lifeMax * (CalamityWorld.death ? 0.9 : CalamityWorld.revenge ? 0.7 : 0.5);
|
||||
bool DogPhase2 = npc.type == ModContent.NPCType<Rimehound>() && npc.life <= npc.lifeMax * (CalamityWorld.death ? 0.9 : CalamityWorld.revenge ? 0.7 : 0.5);
|
||||
int num = 30;
|
||||
bool flag2 = false;
|
||||
bool flag3 = false;
|
||||
@@ -7250,18 +7250,18 @@ namespace CalamityMod.NPCs
|
||||
// Swim toward the player
|
||||
else
|
||||
{
|
||||
npc.velocity.X = npc.velocity.X + (float)npc.direction * (CalamityWorld.death ? 2f * xSpeed : xSpeed);
|
||||
npc.velocity.Y = npc.velocity.Y + (float)npc.directionY * (CalamityWorld.death ? 2f * ySpeed : ySpeed);
|
||||
npc.velocity.X = npc.velocity.X + (float)npc.direction * (CalamityWorld.death ? 2f * xSpeed : CalamityWorld.revenge ? 1.5f * xSpeed : xSpeed);
|
||||
npc.velocity.Y = npc.velocity.Y + (float)npc.directionY * (CalamityWorld.death ? 2f * ySpeed : CalamityWorld.revenge ? 1.5f * ySpeed : ySpeed);
|
||||
}
|
||||
float velocityCapX = CalamityWorld.death && passiveness != 3 ? 2f * speedLimitX : speedLimitX;
|
||||
float velocityCapY = CalamityWorld.death && passiveness != 3 ? 2f * speedLimitY : speedLimitY;
|
||||
float velocityCapX = CalamityWorld.death && passiveness != 3 ? 2f * speedLimitX : CalamityWorld.revenge ? 1.5f * speedLimitX : speedLimitX;
|
||||
float velocityCapY = CalamityWorld.death && passiveness != 3 ? 2f * speedLimitY : CalamityWorld.revenge ? 1.5f * speedLimitY : speedLimitY;
|
||||
npc.velocity.X = MathHelper.Clamp(npc.velocity.X, -velocityCapX, velocityCapX);
|
||||
npc.velocity.Y = MathHelper.Clamp(npc.velocity.Y, -velocityCapY, velocityCapY);
|
||||
|
||||
// Laserfish shoot the player
|
||||
if (npc.type == ModContent.NPCType<Laserfish>())
|
||||
{
|
||||
npc.localAI[0] += (CalamityWorld.death ? 2f : 1f);
|
||||
npc.localAI[0] += (CalamityWorld.death ? 2f : CalamityWorld.revenge ? 1.5f : 1f);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && npc.localAI[0] >= 120f)
|
||||
{
|
||||
npc.localAI[0] = 0f;
|
||||
@@ -7287,7 +7287,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
if ((target.Center - npc.Center).Length() < 350f)
|
||||
{
|
||||
npc.localAI[0] += (CalamityWorld.death ? 3f : 1f);
|
||||
npc.localAI[0] += (CalamityWorld.death ? 3f : CalamityWorld.revenge ? 2f : 1f);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && npc.localAI[0] >= 180f)
|
||||
{
|
||||
npc.localAI[0] = 0f;
|
||||
|
||||
+271
-128
File diff suppressed because it is too large.
Load diff
+51
-10
@@ -2995,7 +2995,7 @@ namespace CalamityMod.NPCs
|
||||
else if (npc.type == NPCID.Retinazer)
|
||||
return TwinsAI.TrueMeleeRetinazerPhase2AI(npc);
|
||||
|
||||
if (CalamityWorld.death)
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
switch (npc.aiStyle)
|
||||
{
|
||||
@@ -3032,10 +3032,12 @@ namespace CalamityMod.NPCs
|
||||
case NPCID.SlimeRibbonRed:
|
||||
case NPCID.SlimeSpiked:
|
||||
case NPCID.SandSlime:
|
||||
case NPCID.GoldenSlime:
|
||||
return SlimeAI.BuffedSlimeAI(npc, Mod);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.DemonEye:
|
||||
if (npc.type == NPCType<CalamityEye>())
|
||||
{
|
||||
@@ -3062,6 +3064,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Fighter:
|
||||
if (npc.type == NPCType<Stormlion>() ||
|
||||
npc.type == NPCType<AstralachneaGround>() || npc.type == NPCType<CultistAssassin>())
|
||||
@@ -3081,6 +3084,7 @@ namespace CalamityMod.NPCs
|
||||
case NPCID.ArmedZombieTwiggy:
|
||||
case NPCID.ArmedZombieCenx:
|
||||
case NPCID.Skeleton:
|
||||
case NPCID.SporeSkeleton:
|
||||
case NPCID.AngryBones:
|
||||
case NPCID.UndeadMiner:
|
||||
case NPCID.CorruptBunny:
|
||||
@@ -3214,7 +3218,9 @@ namespace CalamityMod.NPCs
|
||||
case NPCID.Salamander7:
|
||||
case NPCID.Salamander8:
|
||||
case NPCID.Salamander9:
|
||||
case NPCID.GiantWalkingAntlion:
|
||||
case NPCID.WalkingAntlion:
|
||||
case NPCID.LarvaeAntlion:
|
||||
case NPCID.DesertGhoul:
|
||||
case NPCID.DesertGhoulCorruption:
|
||||
case NPCID.DesertGhoulCrimson:
|
||||
@@ -3256,6 +3262,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Flying:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3269,6 +3276,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedFlyingAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Worm:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3287,28 +3295,35 @@ namespace CalamityMod.NPCs
|
||||
case NPCID.WyvernBody2:
|
||||
case NPCID.WyvernBody3:
|
||||
case NPCID.WyvernTail:
|
||||
case NPCID.DiggerHead:
|
||||
case NPCID.DiggerBody:
|
||||
case NPCID.DiggerTail:
|
||||
case NPCID.SeekerHead:
|
||||
case NPCID.SeekerBody:
|
||||
case NPCID.SeekerTail:
|
||||
case NPCID.LeechHead:
|
||||
case NPCID.LeechBody:
|
||||
case NPCID.LeechTail:
|
||||
case NPCID.TombCrawlerHead:
|
||||
case NPCID.TombCrawlerBody:
|
||||
case NPCID.TombCrawlerTail:
|
||||
case NPCID.DuneSplicerHead:
|
||||
case NPCID.DuneSplicerBody:
|
||||
case NPCID.DuneSplicerTail:
|
||||
case NPCID.StardustWormHead:
|
||||
case NPCID.SolarCrawltipedeHead:
|
||||
case NPCID.SolarCrawltipedeBody:
|
||||
case NPCID.SolarCrawltipedeTail:
|
||||
return CalamityGlobalAI.BuffedWormAI(npc, Mod);
|
||||
|
||||
// Death Mode splitting worms.
|
||||
case NPCID.DiggerHead:
|
||||
case NPCID.DiggerBody:
|
||||
case NPCID.DiggerTail:
|
||||
case NPCID.SeekerHead:
|
||||
case NPCID.SeekerBody:
|
||||
case NPCID.SeekerTail:
|
||||
case NPCID.DuneSplicerHead:
|
||||
case NPCID.DuneSplicerBody:
|
||||
case NPCID.DuneSplicerTail:
|
||||
if (CalamityWorld.death)
|
||||
return CalamityGlobalAI.BuffedWormAI(npc, Mod);
|
||||
else
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Caster:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3327,6 +3342,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedCasterAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.ManEater:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3339,6 +3355,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedPlantAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Bat:
|
||||
if (npc.type == NPCType<StellarCulex>() || npc.type == NPCType<Melter>() || npc.type == NPCType<AeroSlime>())
|
||||
{
|
||||
@@ -3363,10 +3380,12 @@ namespace CalamityMod.NPCs
|
||||
case NPCID.RedDevil:
|
||||
case NPCID.FlyingSnake:
|
||||
case NPCID.VampireBat:
|
||||
case NPCID.SporeBat:
|
||||
return CalamityGlobalAI.BuffedBatAI(npc, Mod);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Piranha:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3380,6 +3399,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedSwimmingAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Jellyfish:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3392,6 +3412,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedJellyfishAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Antlion:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3399,6 +3420,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedAntlionAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.SpikeBall:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3406,6 +3428,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedSpikeBallAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.BlazingWheel:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3413,6 +3436,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedBlazingWheelAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.HoveringFighter:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3429,6 +3453,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedHoveringAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.EnchantedSword:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3438,14 +3463,17 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedFlyingWeaponAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Mimic:
|
||||
switch (npc.type)
|
||||
{
|
||||
case NPCID.Mimic:
|
||||
case NPCID.PresentMimic:
|
||||
case NPCID.IceMimic:
|
||||
return CalamityGlobalAI.BuffedMimicAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Unicorn:
|
||||
if (npc.type == NPCType<Rotdog>())
|
||||
{
|
||||
@@ -3466,6 +3494,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.GiantTortoise:
|
||||
if (npc.type == NPCType<Plagueshell>())
|
||||
{
|
||||
@@ -3484,6 +3513,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Spider:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3495,6 +3525,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedSpiderAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Herpling:
|
||||
if (npc.type == NPCType<Aries>())
|
||||
{
|
||||
@@ -3510,14 +3541,17 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.FlyingFish:
|
||||
switch (npc.type)
|
||||
{
|
||||
case NPCID.FlyingFish:
|
||||
case NPCID.GiantFlyingAntlion:
|
||||
case NPCID.FlyingAntlion:
|
||||
return CalamityGlobalAI.BuffedFlyingFishAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.AngryNimbus:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3525,6 +3559,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedAngryNimbusAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Spore:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3533,6 +3568,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedSporeAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.TeslaTurret:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3540,6 +3576,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedTeslaTurretAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.Corite:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3548,6 +3585,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedCoriteAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.MartianProbe:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3555,6 +3593,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedMartianProbeAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.MothronEgg:
|
||||
switch (npc.type)
|
||||
{
|
||||
@@ -3562,6 +3601,7 @@ namespace CalamityMod.NPCs
|
||||
return CalamityGlobalAI.BuffedMothronEggAI(npc, Mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCAIStyleID.GraniteElemental:
|
||||
if (npc.type == NPCType<CosmicElemental>())
|
||||
{
|
||||
@@ -3576,6 +3616,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.NPCs.Crags
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
CalamityAI.UnicornAI(NPC, Mod, true, CalamityWorld.death ? 6f : 4f, 5f, 0.2f);
|
||||
CalamityAI.UnicornAI(NPC, Mod, true, CalamityWorld.death ? 8f : CalamityWorld.revenge ? 6f : 4f, 5f, 0.2f);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
CalamityAI.UnicornAI(NPC, Mod, true, CalamityWorld.death ? 6f : 4f, 5f, 0.2f);
|
||||
CalamityAI.UnicornAI(NPC, Mod, true, CalamityWorld.death ? 8f : CalamityWorld.revenge ? 6f : 4f, 5f, 0.2f);
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
CalamityAI.UnicornAI(NPC, Mod, false, CalamityWorld.death ? 6f : 4f, 5f, CalamityWorld.death ? 0.15f : 0.1f);
|
||||
CalamityAI.UnicornAI(NPC, Mod, false, CalamityWorld.death ? 8f : CalamityWorld.revenge ? 6f : 4f, 5f, CalamityWorld.death ? 0.2f : CalamityWorld.revenge ? 0.15f : 0.1f);
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
|
||||
@@ -126,13 +126,10 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
NPC.velocity.X = 0f;
|
||||
return;
|
||||
}
|
||||
float num65 = CalamityWorld.death ? 3f : 1f;
|
||||
float num66 = CalamityWorld.death ? 0.28f : 0.08f;
|
||||
if (!CalamityWorld.death)
|
||||
{
|
||||
num65 += (1f - (float)NPC.life / (float)NPC.lifeMax) * 2f;
|
||||
num66 += (1f - (float)NPC.life / (float)NPC.lifeMax) * 0.2f;
|
||||
}
|
||||
float num65 = CalamityWorld.death ? 3f : CalamityWorld.revenge ? 2f : 1f;
|
||||
float num66 = CalamityWorld.death ? 0.28f : CalamityWorld.revenge ? 0.18f : 0.08f;
|
||||
num65 += (1f - (float)NPC.life / (float)NPC.lifeMax) * 2f;
|
||||
num66 += (1f - (float)NPC.life / (float)NPC.lifeMax) * 0.2f;
|
||||
if (NPC.velocity.X < -num65 || NPC.velocity.X > num65)
|
||||
{
|
||||
if (NPC.velocity.Y == 0f)
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
NPC.TargetClosest(true);
|
||||
NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * 0.2f;
|
||||
NPC.velocity.Y = NPC.velocity.Y + (float)NPC.directionY * 0.2f;
|
||||
float velocityMax = CalamityWorld.death ? 16f : 12f;
|
||||
float velocityMax = CalamityWorld.death ? 16f : CalamityWorld.revenge ? 14f : 12f;
|
||||
if (NPC.velocity.X > velocityMax)
|
||||
{
|
||||
NPC.velocity.X = velocityMax;
|
||||
@@ -139,7 +139,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
NPC.velocity.Y = -velocityMax;
|
||||
}
|
||||
NPC.localAI[0] += 1f;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && NPC.localAI[0] >= (CalamityWorld.death ? 60f : 90f))
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && NPC.localAI[0] >= (CalamityWorld.death ? 50f : CalamityWorld.revenge ? 70f : 90f))
|
||||
{
|
||||
NPC.localAI[0] = 0f;
|
||||
if (Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height))
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
num78 = 2.5f - num79;
|
||||
}
|
||||
num78 *= (CalamityWorld.death ? 1.2f : 0.8f);
|
||||
num78 *= (CalamityWorld.death ? 1.2f : CalamityWorld.revenge ? 1f : 0.8f);
|
||||
if (NPC.velocity.X < -num78 || NPC.velocity.X > num78)
|
||||
{
|
||||
if (NPC.velocity.Y == 0f)
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
}
|
||||
if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) < 400f)
|
||||
{
|
||||
num65 += (CalamityWorld.death ? 6f : 4f) - ((Main.player[NPC.target].Center - NPC.Center).Length() * 0.01f);
|
||||
num65 += (CalamityWorld.death ? 8f : CalamityWorld.revenge ? 6f : 4f) - ((Main.player[NPC.target].Center - NPC.Center).Length() * 0.01f);
|
||||
}
|
||||
if (NPC.velocity.X < -num65 || NPC.velocity.X > num65)
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
float speed = CalamityWorld.death ? 22f : 17f;
|
||||
float speed = CalamityWorld.death ? 22f : CalamityWorld.revenge ? 19.5f : 17f;
|
||||
CalamityAI.DungeonSpiritAI(NPC, Mod, speed, -MathHelper.PiOver2);
|
||||
int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 0, default, 1f);
|
||||
Dust dust = Main.dust[num822];
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
float speed = (CalamityWorld.death || BossRushEvent.BossRushActive) ? 16f : 12f;
|
||||
float speed = (CalamityWorld.death || BossRushEvent.BossRushActive) ? 16f : CalamityWorld.revenge ? 14f : 12f;
|
||||
CalamityAI.DungeonSpiritAI(NPC, Mod, speed, -MathHelper.PiOver2);
|
||||
int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 0, default, 1f);
|
||||
Dust dust = Main.dust[num822];
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
float speed = CalamityWorld.death ? 18f : 13.5f;
|
||||
float speed = CalamityWorld.death ? 18f : CalamityWorld.revenge ? 15.75f : 13.5f;
|
||||
CalamityAI.DungeonSpiritAI(NPC, Mod, speed, -MathHelper.PiOver2);
|
||||
int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 0, default, 1f);
|
||||
Dust dust = Main.dust[num822];
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
float speed = CalamityWorld.death ? 20f : 15f;
|
||||
float speed = CalamityWorld.death ? 20f : CalamityWorld.revenge ? 17.5f : 15f;
|
||||
CalamityAI.DungeonSpiritAI(NPC, Mod, speed, -MathHelper.PiOver2);
|
||||
int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Phantoplasm, 0f, 0f, 0, default, 1f);
|
||||
Dust dust = Main.dust[num822];
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
SoundEngine.PlaySound(GrowlSound, NPC.position);
|
||||
}
|
||||
bool phase2 = (double)NPC.life <= (double)NPC.lifeMax * (CalamityWorld.death ? 0.9 : 0.5);
|
||||
bool phase2 = (double)NPC.life <= (double)NPC.lifeMax * (CalamityWorld.death ? 0.9 : CalamityWorld.revenge ? 0.7 : 0.5);
|
||||
if (phase2)
|
||||
{
|
||||
if (!reset)
|
||||
@@ -99,10 +99,10 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
NPC.ai[1] += 1f;
|
||||
}
|
||||
CalamityAI.UnicornAI(NPC, Mod, true, CalamityWorld.death ? 6f : 4f, 5f, 0.2f);
|
||||
CalamityAI.UnicornAI(NPC, Mod, true, CalamityWorld.death ? 8f : CalamityWorld.revenge ? 6f : 4f, 5f, 0.2f);
|
||||
return;
|
||||
}
|
||||
CalamityAI.UnicornAI(NPC, Mod, false, CalamityWorld.death ? 6f : 4f, 6f, CalamityWorld.death ? 0.1f : 0.07f);
|
||||
CalamityAI.UnicornAI(NPC, Mod, false, CalamityWorld.death ? 8f : CalamityWorld.revenge ? 6f : 4f, 6f, CalamityWorld.death ? 0.1f : CalamityWorld.revenge ? 0.085f : 0.07f);
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
|
||||
@@ -83,9 +83,13 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
num321 = 12;
|
||||
}
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
num321 /= 2;
|
||||
}
|
||||
if (CalamityWorld.death)
|
||||
{
|
||||
num321 /= 4;
|
||||
num321 /= 2;
|
||||
}
|
||||
if (NPC.ai[2] < (float)num321)
|
||||
{
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && !Charging && NPC.Distance(player.Center) < ChargeRadiusMax * 0.667f)
|
||||
{
|
||||
// Spawn some off-screen enemies to act as threats if the player enters the field.
|
||||
int enemiesToSpawn = CalamityWorld.death ? 2 : 1;
|
||||
int enemiesToSpawn = CalamityWorld.death ? 3 : CalamityWorld.revenge ? 2 : 1;
|
||||
for (int i = 0; i < enemiesToSpawn; i++)
|
||||
{
|
||||
int tries = 0;
|
||||
|
||||
@@ -69,12 +69,17 @@ namespace CalamityMod.NPCs.PlagueEnemies
|
||||
{
|
||||
NPC.TargetClosest(true);
|
||||
}
|
||||
float num = 6f; //2
|
||||
float num = 6f;
|
||||
float num2 = 0.05f;
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
num *= 1.25f;
|
||||
num2 *= 1.25f;
|
||||
}
|
||||
if (CalamityWorld.death)
|
||||
{
|
||||
num *= 1.5f;
|
||||
num2 *= 1.5f;
|
||||
num *= 1.25f;
|
||||
num2 *= 1.25f;
|
||||
}
|
||||
Vector2 vector = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f);
|
||||
float num4 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2);
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
{
|
||||
num78 = 2.25f - num79;
|
||||
}
|
||||
num78 *= (CalamityWorld.death ? 1.2f : 0.8f);
|
||||
num78 *= (CalamityWorld.death ? 1.2f : CalamityWorld.revenge ? 1f : 0.8f);
|
||||
if (NPC.velocity.X < -num78 || NPC.velocity.X > num78)
|
||||
{
|
||||
if (NPC.velocity.Y == 0f)
|
||||
|
||||
@@ -131,10 +131,10 @@ namespace CalamityMod.NPCs.SulphurousSea
|
||||
if (flag14)
|
||||
{
|
||||
NPC.TargetClosest(true);
|
||||
NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * (CalamityWorld.death ? 0.6f : 0.3f);
|
||||
NPC.velocity.Y = NPC.velocity.Y + (float)NPC.directionY * (CalamityWorld.death ? 0.2f : 0.1f);
|
||||
float velocityX = CalamityWorld.death ? 20f : 10f;
|
||||
float velocityY = CalamityWorld.death ? 10f : 5f;
|
||||
NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * (CalamityWorld.death ? 0.6f : CalamityWorld.revenge ? 0.45f : 0.3f);
|
||||
NPC.velocity.Y = NPC.velocity.Y + (float)NPC.directionY * (CalamityWorld.death ? 0.2f : CalamityWorld.revenge ? 0.15f : 0.1f);
|
||||
float velocityX = CalamityWorld.death ? 20f : CalamityWorld.revenge ? 15f : 10f;
|
||||
float velocityY = CalamityWorld.death ? 10f : CalamityWorld.revenge ? 7.5f : 5f;
|
||||
if (NPC.velocity.X > velocityX)
|
||||
{
|
||||
NPC.velocity.X = velocityX;
|
||||
|
||||
@@ -5,6 +5,7 @@ using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
using CalamityMod.World;
|
||||
|
||||
namespace CalamityMod.NPCs.VanillaNPCOverrides.RegularEnemies
|
||||
{
|
||||
@@ -173,7 +174,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.RegularEnemies
|
||||
else if (fadeThroughWallsFlag == 0f)
|
||||
fadeThroughWallsTimer++;
|
||||
|
||||
if (fadeThroughWallsTimer >= FadeThroughWallsDelay)
|
||||
if (fadeThroughWallsTimer >= (CalamityWorld.death ? FadeThroughWallsDelay / 2 : FadeThroughWallsDelay))
|
||||
{
|
||||
fadeThroughWallsFlag = 1f;
|
||||
fadeThroughWallsTimer = 0f;
|
||||
@@ -190,6 +191,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.RegularEnemies
|
||||
npc.alpha = 200;
|
||||
npc.noTileCollide = true;
|
||||
}
|
||||
|
||||
npc.rotation = npc.velocity.Y * 0.1f * npc.direction;
|
||||
npc.TargetClosest(true);
|
||||
|
||||
@@ -202,7 +204,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.RegularEnemies
|
||||
// Emit light for some reason.
|
||||
Lighting.AddLight((int)npc.Center.X / 16, (int)npc.Center.Y / 16, 0.3f, 0.2f, 0.1f);
|
||||
|
||||
DemonEyeBatMovement(npc, 8f, 3.5f, 0.12f, 0.12f, 0.25f, 0.06f, 0.07f, 0.2f);
|
||||
DemonEyeBatMovement(npc, CalamityWorld.death ? 10f : 8f, CalamityWorld.death ? 5f : 3.5f, 0.12f, 0.12f, 0.25f, 0.06f, 0.07f, 0.2f);
|
||||
if (Main.rand.NextBool(40))
|
||||
{
|
||||
Vector2 dustSpawnTopLeft = new Vector2(npc.position.X, npc.position.Y + npc.height * 0.25f);
|
||||
@@ -215,14 +217,14 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.RegularEnemies
|
||||
{
|
||||
// Move faster when close to dying.
|
||||
if (npc.life < npc.lifeMax * 0.5)
|
||||
DemonEyeBatMovement(npc, 8f, 6f, 0.12f, 0.12f, 0.07f, 0.12f, 0.12f, 0.07f);
|
||||
DemonEyeBatMovement(npc, CalamityWorld.death ? 10f : 8f, CalamityWorld.death ? 8f : 6f, 0.12f, 0.12f, 0.07f, 0.12f, 0.12f, 0.07f);
|
||||
else
|
||||
DemonEyeBatMovement(npc, 6f, 2.5f, 0.12f, 0.12f, 0.07f, 0.06f, 0.07f, 0.05f);
|
||||
DemonEyeBatMovement(npc, CalamityWorld.death ? 8f : 6f, CalamityWorld.death ? 4f : 2.5f, 0.12f, 0.12f, 0.07f, 0.06f, 0.07f, 0.05f);
|
||||
}
|
||||
else
|
||||
{
|
||||
float maxSpeedX = 6f;
|
||||
float maxSpeedY = 2.5f;
|
||||
float maxSpeedX = CalamityWorld.death ? 8f : 6f;
|
||||
float maxSpeedY = CalamityWorld.death ? 4f : 2.5f;
|
||||
maxSpeedX *= 1f + (1f - npc.scale);
|
||||
maxSpeedY *= 1f + (1f - npc.scale);
|
||||
DemonEyeBatMovement(npc, maxSpeedX, maxSpeedY, 0.08f, 0.08f, 0.03f, 0.02f, 0.03f, 0.015f);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.NPCs.AcidRain;
|
||||
using CalamityMod.NPCs.Crags;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
@@ -186,14 +187,18 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.RegularEnemies
|
||||
spikeShootVelocity *= Main.rand.NextVector2Square(0.75f, 1.25f);
|
||||
spikeShootVelocity.Normalize();
|
||||
spikeShootVelocity *= Main.rand.NextFloat(3.5f, 4.5f) * projectileShootSpeedFactor;
|
||||
Projectile.NewProjectile(source, npc.Center, spikeShootVelocity, projectileShootType, 9, 0f, Main.myPlayer, 0f, 0f);
|
||||
int proj = Projectile.NewProjectile(source, npc.Center, spikeShootVelocity, projectileShootType, 9, 0f, Main.myPlayer, 0f, 0f);
|
||||
if (CalamityWorld.death)
|
||||
Main.projectile[proj].extraUpdates += 1;
|
||||
projectileShootCountdown = 30f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector2 velocity = npc.SafeDirectionTo(Main.player[npc.target].Center - Vector2.UnitY * Main.rand.NextFloat(200f)) * projectileShootSpeedFactor * 6f;
|
||||
Projectile.NewProjectile(source, npc.Center, velocity, projectileShootType, 9, 0f, Main.myPlayer, 0f, 0f);
|
||||
int proj = Projectile.NewProjectile(source, npc.Center, velocity, projectileShootType, 9, 0f, Main.myPlayer, 0f, 0f);
|
||||
if (CalamityWorld.death)
|
||||
Main.projectile[proj].extraUpdates += 1;
|
||||
projectileShootCountdown = 50f;
|
||||
}
|
||||
}
|
||||
@@ -238,9 +243,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.RegularEnemies
|
||||
npc.velocity.X = 0f;
|
||||
|
||||
// Slimes jump more quickly overall when the slime rain event is ongoing.
|
||||
jumpDelay += Main.slimeRain ? 4f : 3f;
|
||||
jumpDelay += (Main.slimeRain ? 4f : 3f) * (CalamityWorld.death ? 2f : 1f);
|
||||
|
||||
if (npc.type == NPCID.HoppinJack)
|
||||
if (npc.type == NPCID.HoppinJack || npc.type == NPCID.GoldenSlime)
|
||||
jumpDelay += 10f;
|
||||
|
||||
if (isLavaSlime)
|
||||
|
||||
Reference in new issue
Block a user