Rev+ Legendary Hive Mind.

This commit is contained in:
mountaindrew10 committed 2023-04-12 12:28:02 -05:00
1 parent 17e05cc79c
commit 62d42a9e24
6 files changed
+32 -14

No files matched your search

+3
View File
@@ -35,6 +35,9 @@ namespace CalamityMod.NPCs.HiveMind
if (Main.getGoodWorld)
NPC.lifeMax *= 4;
if ((CalamityWorld.LegendaryMode && CalamityWorld.revenge))
NPC.reflectsProjectiles = true;
NPC.aiStyle = -1;
AIType = -1;
NPC.knockBackResist = BossRushEvent.BossRushActive ? 0f : 0.3f;
+6 -5
View File
@@ -71,8 +71,8 @@ namespace CalamityMod.NPCs.HiveMind
{
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
NPC.TargetClosest();
float num1164 = revenge ? 4.5f : 4f;
float num1165 = revenge ? 0.8f : 0.75f;
float num1164 = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 8f : revenge ? 4.5f : 4f;
float num1165 = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 1f : revenge ? 0.8f : 0.75f;
if (BossRushEvent.BossRushActive)
{
num1164 *= 2f;
@@ -81,9 +81,9 @@ namespace CalamityMod.NPCs.HiveMind
Vector2 vector133 = new Vector2(NPC.Center.X, NPC.Center.Y);
float num1166 = Main.player[NPC.target].Center.X - vector133.X;
float num1167 = Main.player[NPC.target].Center.Y - vector133.Y - 400f;
float num1167 = Main.player[NPC.target].Center.Y - vector133.Y - ((CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 500f : 400f);
float num1168 = (float)Math.Sqrt(num1166 * num1166 + num1167 * num1167);
if (num1168 < 20f)
if (num1168 < ((CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 10f : 20f))
{
num1166 = NPC.velocity.X;
num1167 = NPC.velocity.Y;
@@ -136,7 +136,8 @@ namespace CalamityMod.NPCs.HiveMind
int num1170 = (int)(NPC.position.Y + NPC.height + 4f);
int type = ModContent.ProjectileType<ShaderainHostile>();
int damage = NPC.GetProjectileDamage(type);
Projectile.NewProjectile(NPC.GetSource_FromAI(), num1169, num1170, 0f, 4f, type, damage, 0f, Main.myPlayer, 0f, 0f);
float randomXVelocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? Main.rand.NextFloat() * 5f : 0f;
Projectile.NewProjectile(NPC.GetSource_FromAI(), num1169, num1170, randomXVelocity, 4f, type, damage, 0f, Main.myPlayer);
}
}
}
+9 -3
View File
@@ -173,9 +173,15 @@ namespace CalamityMod.NPCs.HiveMind
num944 = num941 / num944;
num942 *= num944;
num943 *= num944;
int type = ModContent.ProjectileType<VileClot>();
int damage = NPC.GetProjectileDamage(type);
Projectile.NewProjectile(NPC.GetSource_FromAI(), vector104.X, vector104.Y, num942, num943, type, damage, 0f, Main.myPlayer, 0f, 0f);
int type = (CalamityWorld.LegendaryMode && CalamityWorld.revenge && Main.rand.NextBool(5)) ? ProjectileID.CursedFlameHostile : ModContent.ProjectileType<VileClot>();
int damage = type == ProjectileID.CursedFlameHostile ? 30 : NPC.GetProjectileDamage(type);
Vector2 projectileVelocity = new Vector2(num942, num943);
if (type == ProjectileID.CursedFlameHostile)
{
Vector2 v = Main.player[NPC.target].Center - NPC.Center - Main.player[NPC.target].velocity * 20f;
projectileVelocity = v.SafeNormalize(Vector2.UnitY) * num941;
}
Projectile.NewProjectile(NPC.GetSource_FromAI(), vector104, projectileVelocity, type, damage, 0f, Main.myPlayer);
NPC.netUpdate = true;
}
}
+9 -3
View File
@@ -156,9 +156,15 @@ namespace CalamityMod.NPCs.HiveMind
num944 = num941 / num944;
num942 *= num944;
num943 *= num944;
int type = ModContent.ProjectileType<VileClot>();
int damage = NPC.GetProjectileDamage(type);
Projectile.NewProjectile(NPC.GetSource_FromAI(), vector104.X, vector104.Y, num942, num943, type, damage, 0f, Main.myPlayer, 0f, 0f);
int type = (CalamityWorld.LegendaryMode && CalamityWorld.revenge && Main.rand.NextBool(5)) ? ProjectileID.CursedFlameHostile : ModContent.ProjectileType<VileClot>();
int damage = type == ProjectileID.CursedFlameHostile ? 30 : NPC.GetProjectileDamage(type);
Vector2 projectileVelocity = new Vector2(num942, num943);
if (type == ProjectileID.CursedFlameHostile)
{
Vector2 v = Main.player[NPC.target].Center - NPC.Center - Main.player[NPC.target].velocity * 20f;
projectileVelocity = v.SafeNormalize(Vector2.UnitY) * num941;
}
Projectile.NewProjectile(NPC.GetSource_FromAI(), vector104, projectileVelocity, type, damage, 0f, Main.myPlayer);
NPC.netUpdate = true;
}
}
+3 -1
View File
@@ -971,7 +971,9 @@ namespace CalamityMod.NPCs.HiveMind
{
int type = ModContent.ProjectileType<ShadeNimbusHostile>();
int damage = NPC.GetProjectileDamage(type);
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.position.X + Main.rand.Next(NPC.width), NPC.position.Y + Main.rand.Next(NPC.height), 0, 0, type, damage, 0, Main.myPlayer, 11, 0);
Vector2 cloudSpawnPos = new Vector2(NPC.position.X + Main.rand.Next(NPC.width), NPC.position.Y + Main.rand.Next(NPC.height));
Vector2 randomVelocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? Main.rand.NextVector2CircularEdge(4f, 4f) : Vector2.Zero;
Projectile.NewProjectile(NPC.GetSource_FromAI(), cloudSpawnPos, randomVelocity, type, damage, 0, Main.myPlayer, 11f);
}
if (NPC.ai[0] == 10)
+2 -2
View File
@@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.HiveMind
NPC.width = 30; //324
NPC.height = 30; //216
NPC.defense = 0;
NPC.lifeMax = 1000;
NPC.lifeMax = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 10 : 1000;
NPC.knockBackResist = 0f;
NPC.chaseable = false;
NPC.HitSound = SoundID.NPCHit1;
@@ -129,7 +129,7 @@ namespace CalamityMod.NPCs.HiveMind
{
Dust.NewDust(NPC.position, NPC.width, NPC.height, 14, hitDirection, -1f, 0, default, 1f);
}
if (Main.netMode != NetmodeID.MultiplayerClient && NPC.CountNPCS(ModContent.NPCType<HiveMind>()) < 1)
if (Main.netMode != NetmodeID.MultiplayerClient && (!NPC.AnyNPCs(ModContent.NPCType<HiveMind>()) || (CalamityWorld.LegendaryMode && CalamityWorld.revenge)))
{
Vector2 spawnAt = NPC.Bottom;
NPC.NewNPC(NPC.GetSource_Death(), (int)spawnAt.X, (int)spawnAt.Y, ModContent.NPCType<HiveMind>());