From 915f9571f967c1eb836d7618ccb64dc729d03cf5 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Mon, 16 Sep 2019 17:31:52 -0500 Subject: [PATCH] Fuck --- CalPlayer/CalamityPlayerLifeRegen.cs | 7 - CalamityMod.cs | 12 +- Gores/Bandit/Bandit.png | Bin 0 -> 359 bytes Gores/Bandit/Bandit2.png | Bin 0 -> 237 bytes Gores/Bandit/Bandit3.png | Bin 0 -> 231 bytes Gores/Bandit/Bandit4.png | Bin 0 -> 283 bytes Items/Weapons/ElementalEruption.cs | 2 +- Items/Weapons/Genisis.cs | 2 +- Items/Weapons/SpatialLance.cs | 2 +- Items/Weapons/TrueForbiddenOathblade.cs | 2 +- NPCs/AstrumDeus/AstrumDeusBody.cs | 2 +- NPCs/AstrumDeus/AstrumDeusBodySpectral.cs | 2 +- NPCs/AstrumDeus/AstrumDeusHead.cs | 2 +- NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs | 2 +- NPCs/AstrumDeus/AstrumDeusTail.cs | 2 +- NPCs/AstrumDeus/AstrumDeusTailSpectral.cs | 2 +- NPCs/CalamityGlobalAI.cs | 1143 +++++++++++++++-- NPCs/CalamityGlobalNPC.cs | 25 +- NPCs/Providence/Providence.cs | 4 +- NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs | 13 +- NPCs/TownNPCs/Bandit.png | Bin 0 -> 3905 bytes NPCs/TownNPCs/BanditAlt.png | Bin 0 -> 3675 bytes NPCs/TownNPCs/Bandit_NPC_Head.png | Bin 0 -> 386 bytes Projectiles/Ranged/SulphuricAcidCannon2.cs | 4 +- 24 files changed, 1084 insertions(+), 144 deletions(-) create mode 100644 Gores/Bandit/Bandit.png create mode 100644 Gores/Bandit/Bandit2.png create mode 100644 Gores/Bandit/Bandit3.png create mode 100644 Gores/Bandit/Bandit4.png create mode 100644 NPCs/TownNPCs/Bandit.png create mode 100644 NPCs/TownNPCs/BanditAlt.png create mode 100644 NPCs/TownNPCs/Bandit_NPC_Head.png diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index edda3672dc..8c538faa13 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -373,8 +373,6 @@ namespace CalamityMod.CalPlayer if (modPlayer.eGravity) { - player.velocity.X *= 0.99f; - if (player.wingTimeMax < 0) player.wingTimeMax = 0; @@ -386,8 +384,6 @@ namespace CalamityMod.CalPlayer if (modPlayer.eGrav) { - player.velocity.X *= 0.99f; - if (player.wingTimeMax < 0) player.wingTimeMax = 0; @@ -397,9 +393,6 @@ namespace CalamityMod.CalPlayer player.wingTimeMax = 200; } - if (modPlayer.warped) - player.velocity.X *= 0.99f; - if (modPlayer.molluskSet) player.velocity.X *= 0.985f; diff --git a/CalamityMod.cs b/CalamityMod.cs index 9b6b21b332..7816a03db1 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1082,11 +1082,11 @@ namespace CalamityMod NPCID.QueenBee, NPCID.FlyingSnake, NPCID.Golem, + NPCID.GolemHead, NPCID.GolemFistLeft, NPCID.GolemFistRight, NPCID.Reaper, NPCID.Plantera, - NPCID.PlanterasHook, NPCID.PlanterasTentacle, NPCID.BrainofCthulhu, NPCID.Creeper, @@ -1104,6 +1104,9 @@ namespace CalamityMod NPCID.StardustWormHead, NPCID.SolarCrawltipedeHead, NPCID.CultistDragonHead, + NPCID.AncientCultistSquidhead, + NPCID.AncientLight, + NPCID.AncientDoom, NPCID.Butcher, NPCID.Psycho, NPCID.DeadlySphere, @@ -1222,6 +1225,8 @@ namespace CalamityMod ProjectileID.CultistBossIceMist, ProjectileID.CultistBossLightningOrbArc, ProjectileID.CultistBossFireBall, + ProjectileID.CultistBossFireBallClone, + ProjectileID.AncientDoomProjectile, ProjectileID.NebulaBolt, ProjectileID.NebulaSphere, ProjectileID.NebulaLaser, @@ -1297,7 +1302,9 @@ namespace CalamityMod NPCID.CultistDragonBody3, NPCID.CultistDragonBody4, NPCID.CultistDragonTail, - NPCID.Sharkron, + NPCID.AncientCultistSquidhead, + NPCID.AncientLight, + NPCID.Sharkron, NPCID.Sharkron2, NPCID.PlanterasTentacle, NPCID.Spore, @@ -1310,6 +1317,7 @@ namespace CalamityMod NPCID.EaterofWorldsBody, NPCID.EaterofWorldsTail, NPCID.GolemHead, + NPCID.GolemHeadFree, NPCID.GolemFistRight, NPCID.GolemFistLeft, NPCID.MoonLordCore diff --git a/Gores/Bandit/Bandit.png b/Gores/Bandit/Bandit.png new file mode 100644 index 0000000000000000000000000000000000000000..8880ed158058f720b67e980faf53d5acd55efb96 GIT binary patch literal 359 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8gx!3HG%?c?-%RP@Bt z#WBRg`{+bNz9t6&*PShMP3QLZcAAOJIXELi=zK!z%GR~%8#bHYs^C5UK-FOP%;l#y za7&2)Iq5wk_1j+op}7|e0bYqoFFIQEr%(GkmuGsCtX=G}il4r7RP=v+d4D_h_(unze;GVo{an^LB{Ts5 DlHHFt literal 0 HcmV?d00001 diff --git a/Gores/Bandit/Bandit2.png b/Gores/Bandit/Bandit2.png new file mode 100644 index 0000000000000000000000000000000000000000..c51cfbffea65417a62e504183482a90da9da44c9 GIT binary patch literal 237 zcmeAS@N?(olHy`uVBq!ia0vp^96&6@!3HGLoaUDSDVB6cUq=Rpjs4tz5?O(K&H|6f zVg?4jgCNYfV`BDOprB-lYeY$Kep*R+Vo@qXL1JcJiC$i6iGqoqfu5nU33GH6P*Ikr zi(`mJaIypYTDQdijuNMivPf`!+a2+rJyApaT)Vc)3I?`+>gqu545mCoKZ7=}$qN>& zyC>b_8O|WQAf_?DO;tj8y@Q9xJA01lWouZIXFHf0v~^Bir=YTgAE>CIZ(&}#!h(iI aMuv3z{fceTIbA?o89ZJ6T-G@yGywobPDmyI literal 0 HcmV?d00001 diff --git a/Gores/Bandit/Bandit3.png b/Gores/Bandit/Bandit3.png new file mode 100644 index 0000000000000000000000000000000000000000..e9ca9f2a53dd756f53bd6afbfbb1af0bd0c1ca74 GIT binary patch literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^Ahr+(8<0%e?(YqxSkfJR9T^xl_H+M9WCij$3p^r= z85sBuf-vKbiP>*~f|4b!5hcO-X(i=}MX3x0iJ5sNdU>fO3MP66dWOa(%+XaqMJb*x zjv*Ss$p=`YdJp|;Hki^a{UBt={iDC^Ih=PEG%RdPY5hNWa-cyQql)&Ivm0CvIyn_3 z@PxWGIprCi`>zla{+{<(bD*M+g31zp*2(Jxj%mD&=x(}tmHFU|n${MBiCjNn{1`ISV`@iy0XB4ude`@%$AjKtah8*NBqf{Irtt#G+J&g2c?c61}|C5(N`I z13g1y6XxhDprUS17sn6_|E&`@ayA%jMG3gw<=O&bCN4QDirC zJCYz5GjY%S-yM&1U8j1=FXQX?UuE$1yTXj=VV8Tqwmx9p-yOS<`%&TzlQV}U7w%|f zoFDQra?Z2PEe{`Vc_+Rj|5wmqrG&d;Wv;A6C-O6edM< ZF&~tVoRN2lQ3dEM22WQ%mvv4FO#lI;W= 25) + if (ai3 >= 390) emitDust = true; - else if (ai3 >= 10) + else if (ai3 >= 330) { - if (Main.rand.Next(ai3 + 1) >= 10) + if (Main.rand.Next(310, ai3 + 1) >= 325) emitDust = true; } if (emitDust) @@ -3130,7 +3133,7 @@ namespace CalamityMod.NPCs } // Teleport - if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[3] >= 30f) + if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[3] >= 420f) { Vector2 value53 = npc.Center + new Vector2((float)(npc.direction * 20), 6f); Vector2 vector251 = Main.player[npc.target].Center - value53; @@ -3772,16 +3775,17 @@ namespace CalamityMod.NPCs distanceFromTarget = targetPosition - npcPosition; float halfAverageScreenWidth = 960f; - float distanceBeforeSlowingDown = 320f; + float enrageDistance = halfAverageScreenWidth + 120f; + float distanceBeforeSlowingDown = 400f; float timeBeforeEnrage = CalamityWorld.death ? 420f : 600f; float speedMult = 1f; if (calamityGlobalNPC.newAI[0] < timeBeforeEnrage) { - if (distanceFromTarget > halfAverageScreenWidth || + if (distanceFromTarget > enrageDistance || !Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - speedMult += (distanceFromTarget - halfAverageScreenWidth) * 0.001f; + speedMult += (distanceFromTarget - enrageDistance) * 0.001f; calamityGlobalNPC.newAI[0] += 1f; // Enrage after 10 seconds of target being off screen @@ -6564,7 +6568,7 @@ namespace CalamityMod.NPCs Vector2 velocity = new Vector2(-1f * (float)Main.rand.NextDouble() * 3f, 1f); velocity = velocity.RotatedBy((Main.rand.NextDouble() - 0.5) * 0.78539818525314331, default); velocity *= 5f; - int damage = Main.expertMode ? 27 : 35; + int damage = 27; float delayBeforeHoming = 45f; Projectile.NewProjectile(npc.Center.X + Main.rand.Next(npc.width / 2), npc.Center.Y + 4f, velocity.X, velocity.Y, ProjectileID.SaucerMissile, damage, 0f, Main.myPlayer, 0f, delayBeforeHoming); } @@ -7790,7 +7794,7 @@ namespace CalamityMod.NPCs { if (Main.tile[x, y] != null) { - if (Main.tile[x, y].active() && Main.tileSolid[Main.tile[x, y].type] && !Main.tileSolidTop[Main.tile[x, y].type] && !TileID.Sets.Platforms[Main.tile[x, y].type]) + if (Main.tile[x, y].nactive() && Main.tileSolid[Main.tile[x, y].type] && !Main.tileSolidTop[Main.tile[x, y].type] && !TileID.Sets.Platforms[Main.tile[x, y].type]) insideTiles = true; } } @@ -7828,7 +7832,7 @@ namespace CalamityMod.NPCs { if (Main.tile[x, y] != null) { - if (Main.tile[x, y].active() && !Main.tile[x, y].actuator() && Main.tileSolid[Main.tile[x, y].type] && !Main.tileSolidTop[Main.tile[x, y].type] && !TileID.Sets.Platforms[Main.tile[x, y].type]) + if (Main.tile[x, y].nactive() && Main.tileSolid[Main.tile[x, y].type] && !Main.tileSolidTop[Main.tile[x, y].type] && !TileID.Sets.Platforms[Main.tile[x, y].type]) nearbyActiveTiles++; } } @@ -10366,6 +10370,1028 @@ namespace CalamityMod.NPCs } #endregion + #region Buffed Cultist AI + public static bool BuffedCultistAI(NPC npc, bool enraged, Mod mod) + { + CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + + // Chant sound + if (npc.ai[0] != -1f && Main.rand.NextBool(1000)) + { + Main.PlaySound(29, (int)npc.position.X, (int)npc.position.Y, Main.rand.Next(88, 92), 1f, 0f); + } + + // Percent life remaining + float lifeRatio = (float)npc.life / (float)npc.lifeMax; + + // Phases + bool phase2 = lifeRatio < 0.8f; + bool phase3 = lifeRatio < 0.6f; + bool phase4 = lifeRatio < 0.4f; + bool phase5 = lifeRatio < 0.2f; + + // Variables + bool isCultist = npc.type == NPCID.CultistBoss; + bool dontTakeDamage = false; + bool chaseable = true; + + int iceMistDamage = 35; + int fireballDamage = isCultist ? 30 : 25; + int lightningDamage = 45; + + int iceMistFireRate = 90 - + (phase2 ? 10 : 0) - + (phase3 ? 10 : 0) - + (phase4 ? 10 : 0) - + (phase5 ? 10 : 0); + + float iceMistSpeed = CalamityWorld.death ? 6.5f : 6f; + + int fireballFireRate = 12 - + (phase2 ? 2 : 0) - + (phase3 ? 2 : 0) - + (phase4 ? 2 : 0) - + (phase5 ? 2 : 0); + + float fireballSpeed = CalamityWorld.death ? 7.5f : 7f; + + int lightningOrbFireRate = 40 - + (phase2 ? 5 : 0) - + (phase3 ? 5 : 0) - + (phase4 ? 5 : 0) - + (phase5 ? 5 : 0); + + int ancientLightSpawnRate = 30 - + (phase3 ? 10 : 0) - + (phase5 ? 10 : 0); + + int idleTime = 40 - + (phase2 ? 5 : 0) - + (phase3 ? 5 : 0) - + (phase4 ? 5 : 0) - + (phase5 ? 5 : 0); + + float timeToFinishRitual = 420f - + (phase2 ? 120f : 0f) - + (phase3 ? 90f : 0f) - + (phase4 ? 30f : 0f) - + (phase5 ? 15f : 0f); + + // Cultist clone AI + if (!isCultist) + { + if (npc.ai[3] < 0f || !Main.npc[(int)npc.ai[3]].active || Main.npc[(int)npc.ai[3]].type != NPCID.CultistBoss) + { + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.active = false; + return false; + } + npc.ai[0] = Main.npc[(int)npc.ai[3]].ai[0]; + npc.ai[1] = Main.npc[(int)npc.ai[3]].ai[1]; + dontTakeDamage = true; + chaseable = false; + } + + // Stop spawning ritual if hit + else if (npc.ai[0] == 5f && npc.ai[1] >= 120f && npc.ai[1] < timeToFinishRitual && npc.justHit) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[3] += 1f; + npc.velocity = Vector2.Zero; + npc.netUpdate = true; + Main.projectile[(int)npc.ai[2]].ai[1] = -1f; + Main.projectile[(int)npc.ai[2]].netUpdate = true; + } + + // Center and target + Vector2 center = npc.Center; + Player player = Main.player[npc.target]; + if (npc.target < 0 || npc.target == 255 || player.dead || !player.active) + { + npc.TargetClosest(false); + player = Main.player[npc.target]; + npc.netUpdate = true; + } + + // Despawn + if (player.dead || Vector2.Distance(player.Center, center) > 5600f) + { + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.active = false; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NetMessage.SendData(28, -1, -1, null, npc.whoAmI, -1f, 0f, 0f, 0, 0, 0); + } + new List().Add(npc.whoAmI); + for (int j = 0; j < 200; j++) + { + if (Main.npc[j].active && Main.npc[j].type == 440 && Main.npc[j].ai[3] == (float)npc.whoAmI) + { + Main.npc[j].life = 0; + Main.npc[j].HitEffect(0, 10.0); + Main.npc[j].active = false; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NetMessage.SendData(28, -1, -1, null, npc.whoAmI, -1f, 0f, 0f, 0, 0, 0); + } + } + } + } + + // Clones set to Cultist phase + float clonePhase = npc.ai[3]; + + // Spawn and play sound + if (npc.localAI[0] == 0f) + { + Main.PlaySound(29, (int)npc.position.X, (int)npc.position.Y, 89, 1f, 0f); + npc.localAI[0] = 1f; + npc.alpha = 255; + npc.rotation = 0f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + npc.ai[0] = -1f; + npc.netUpdate = true; + } + } + + // Appear and do weird ritual shit with tablet + if (npc.ai[0] == -1f) + { + npc.alpha -= 5; + if (npc.alpha < 0) + { + npc.alpha = 0; + } + npc.ai[1] += 1f; + if (npc.ai[1] >= timeToFinishRitual) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.netUpdate = true; + } + else if (npc.ai[1] > 360f) + { + npc.velocity *= 0.95f; + if (npc.localAI[2] != 13f) + { + Main.PlaySound(29, (int)npc.position.X, (int)npc.position.Y, 105, 1f, 0f); + } + npc.localAI[2] = 13f; + } + else if (npc.ai[1] > 300f) + { + npc.velocity = -Vector2.UnitY; + npc.localAI[2] = 10f; + } + else if (npc.ai[1] > 120f) + { + npc.localAI[2] = 1f; + } + else + { + npc.localAI[2] = 0f; + } + dontTakeDamage = true; + chaseable = false; + } + + // Phase switch + if (npc.ai[0] == 0f) + { + if (npc.ai[1] == 0f) + { + npc.TargetClosest(false); + } + npc.localAI[2] = 10f; + int num14 = Math.Sign(player.Center.X - center.X); + if (num14 != 0) + { + npc.direction = (npc.spriteDirection = num14); + } + npc.ai[1] += 1f; + if (npc.ai[1] >= (float)idleTime & isCultist) + { + int num15 = 0; + if (phase2) + { + switch ((int)npc.ai[3]) + { + case 0: + num15 = 0; + break; + case 1: + num15 = 1; + break; + case 2: + num15 = 0; + break; + case 3: + num15 = 5; + break; + case 4: + num15 = 0; + break; + case 5: + num15 = 3; + break; + case 6: + num15 = 0; + break; + case 7: + num15 = 5; + break; + case 8: + num15 = 0; + break; + case 9: + num15 = 2; + break; + case 10: + num15 = 0; + break; + case 11: + num15 = 3; + break; + case 12: + num15 = 0; + break; + case 13: + num15 = 4; + npc.ai[3] = -1f; + break; + default: + npc.ai[3] = -1f; + break; + } + } + else + { + switch ((int)npc.ai[3]) + { + case 0: + num15 = 0; + break; + case 1: + num15 = 1; + break; + case 2: + num15 = 0; + break; + case 3: + num15 = 2; + break; + case 4: + num15 = 0; + break; + case 5: + num15 = 3; + break; + case 6: + num15 = 0; + break; + case 7: + num15 = 1; + break; + case 8: + num15 = 0; + break; + case 9: + num15 = 2; + break; + case 10: + num15 = 0; + break; + case 11: + num15 = 4; + npc.ai[3] = -1f; + break; + default: + npc.ai[3] = -1f; + break; + } + } + + int maxValue = 6 - + (phase3 ? 2 : 0) - + (phase4 ? 1 : 0); + + // Spawn Ancient Dooms + if (phase2 && Main.rand.NextBool(maxValue) && num15 != 0 && num15 != 4 && num15 != 5 && NPC.CountNPCS(NPCID.AncientDoom) < 10) + { + num15 = 6; + } + + // Move above target, also moves clones + if (num15 == 0) + { + // Set a location to move to + float num16 = (float)Math.Ceiling((double)((player.Center + new Vector2(0f, -100f) - center).Length() / 50f)); + if (num16 == 0f) + { + num16 = 1f; + } + + // Add self and clones to list + List list2 = new List(); + int num17 = 0; + list2.Add(npc.whoAmI); + for (int k = 0; k < 200; k++) + { + if (Main.npc[k].active && Main.npc[k].type == NPCID.CultistBossClone && Main.npc[k].ai[3] == (float)npc.whoAmI) + { + list2.Add(k); + } + } + + // Move self and clones to location + bool flag5 = list2.Count % 2 == 0; + foreach (int current2 in list2) + { + NPC nPC2 = Main.npc[current2]; + Vector2 center2 = nPC2.Center; + float num18 = (float)((num17 + flag5.ToInt() + 1) / 2) * 6.28318548f * 0.4f / (float)list2.Count; + if (num17 % 2 == 1) + { + num18 *= -1f; + } + if (list2.Count == 1) + { + num18 = 0f; + } + Vector2 value = new Vector2(0f, -1f).RotatedBy((double)num18, default(Vector2)) * new Vector2(150f, 200f); + Vector2 value2 = player.Center + value - center2; + nPC2.ai[0] = 1f; + nPC2.ai[1] = num16; + nPC2.velocity = (value2 / num16) * 2f; + if (npc.whoAmI >= nPC2.whoAmI) + { + nPC2.position -= nPC2.velocity; + } + nPC2.netUpdate = true; + num17++; + } + } + + // Set AI phase + if (num15 == 1) + { + npc.ai[0] = 3f; + npc.ai[1] = 0f; + } + else if (num15 == 2) + { + npc.ai[0] = 2f; + npc.ai[1] = 0f; + } + else if (num15 == 3) + { + npc.ai[0] = 4f; + npc.ai[1] = 0f; + } + else if (num15 == 4) + { + npc.ai[0] = 5f; + npc.ai[1] = 0f; + } + if (num15 == 5) + { + npc.ai[0] = 7f; + npc.ai[1] = 0f; + } + if (num15 == 6) + { + npc.ai[0] = 8f; + npc.ai[1] = 0f; + } + npc.netUpdate = true; + } + } + + // Movement, then switch to a different attack + else if (npc.ai[0] == 1f) + { + dontTakeDamage = true; + npc.localAI[2] = 10f; + if (npc.ai[1] % 2f != 0f && npc.ai[1] != 1f) + { + npc.position -= npc.velocity; + } + npc.ai[1] -= 1f; + if (npc.ai[1] <= 0f) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[3] += 1f; + npc.velocity = Vector2.Zero; + npc.netUpdate = true; + } + } + + // Ice Mist + else if (npc.ai[0] == 2f) + { + npc.localAI[2] = 11f; + Vector2 vec = Vector2.Normalize(player.Center - center); + if (vec.HasNaNs()) + { + vec = new Vector2((float)npc.direction, 0f); + } + if ((npc.ai[1] >= 4f & isCultist) && (int)(npc.ai[1] - 4f) % iceMistFireRate == 0) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + List list3 = new List(); + for (int l = 0; l < 200; l++) + { + if (Main.npc[l].active && Main.npc[l].type == NPCID.CultistBossClone && Main.npc[l].ai[3] == (float)npc.whoAmI) + { + list3.Add(l); + } + } + foreach (int current3 in list3) + { + NPC nPC3 = Main.npc[current3]; + Vector2 center3 = nPC3.Center; + int num19 = Math.Sign(player.Center.X - center3.X); + if (num19 != 0) + { + nPC3.direction = (nPC3.spriteDirection = num19); + } + vec = Vector2.Normalize(player.Center - center3 + player.velocity * 20f); + if (vec.HasNaNs()) + { + vec = new Vector2((float)npc.direction, 0f); + } + Vector2 vector = center3 + new Vector2((float)(npc.direction * 30), 12f); + Vector2 vector2 = vec * (fireballSpeed + (float)Main.rand.NextDouble() * 4f); + vector2 = vector2.RotatedByRandom(0.52359879016876221); + Projectile.NewProjectile(vector.X, vector.Y, vector2.X, vector2.Y, ProjectileID.CultistBossFireBallClone, fireballDamage, 0f, Main.myPlayer, 0f, 0f); + } + } + if (Main.netMode != NetmodeID.MultiplayerClient) + { + vec = Vector2.Normalize(player.Center - center + player.velocity * 20f); + if (vec.HasNaNs()) + { + vec = new Vector2((float)npc.direction, 0f); + } + Vector2 vector3 = npc.Center + new Vector2((float)(npc.direction * 30), 12f); + Vector2 vector4 = vec * iceMistSpeed; + Projectile.NewProjectile(vector3.X, vector3.Y, vector4.X, vector4.Y, ProjectileID.CultistBossIceMist, iceMistDamage, 0f, Main.myPlayer, 0f, 1f); + } + } + npc.ai[1] += 1f; + if (npc.ai[1] >= (float)(4 + iceMistFireRate)) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[3] += 1f; + npc.velocity = Vector2.Zero; + npc.netUpdate = true; + } + } + + // Fireballs + else if (npc.ai[0] == 3f) + { + npc.localAI[2] = 11f; + Vector2 vec2 = Vector2.Normalize(player.Center - center); + if (vec2.HasNaNs()) + { + vec2 = new Vector2((float)npc.direction, 0f); + } + if ((npc.ai[1] >= 4f & isCultist) && (int)(npc.ai[1] - 4f) % fireballFireRate == 0) + { + if ((int)(npc.ai[1] - 4f) / fireballFireRate == 2) + { + List list4 = new List(); + for (int num20 = 0; num20 < 200; num20++) + { + if (Main.npc[num20].active && Main.npc[num20].type == NPCID.CultistBossClone && Main.npc[num20].ai[3] == (float)npc.whoAmI) + { + list4.Add(num20); + } + } + if (Main.netMode != NetmodeID.MultiplayerClient) + { + foreach (int current4 in list4) + { + NPC nPC4 = Main.npc[current4]; + Vector2 center4 = nPC4.Center; + int num21 = Math.Sign(player.Center.X - center4.X); + if (num21 != 0) + { + nPC4.direction = (nPC4.spriteDirection = num21); + } + vec2 = Vector2.Normalize(player.Center - center4 + player.velocity * 20f); + if (vec2.HasNaNs()) + { + vec2 = new Vector2((float)npc.direction, 0f); + } + Vector2 vector5 = center4 + new Vector2((float)(npc.direction * 30), 12f); + Vector2 vector6 = vec2 * (fireballSpeed + (float)Main.rand.NextDouble() * 4f); + vector6 = vector6.RotatedByRandom(0.52359879016876221); + Projectile.NewProjectile(vector5.X, vector5.Y, vector6.X, vector6.Y, ProjectileID.CultistBossFireBallClone, fireballDamage, 0f, Main.myPlayer, 0f, 0f); + } + } + } + int num23 = Math.Sign(player.Center.X - center.X); + if (num23 != 0) + { + npc.direction = (npc.spriteDirection = num23); + } + if (Main.netMode != NetmodeID.MultiplayerClient) + { + vec2 = Vector2.Normalize(player.Center - center + player.velocity * 20f); + if (vec2.HasNaNs()) + { + vec2 = new Vector2((float)npc.direction, 0f); + } + Vector2 vector7 = npc.Center + new Vector2((float)(npc.direction * 30), 12f); + Vector2 vector8 = vec2 * (fireballSpeed + (float)Main.rand.NextDouble() * 4f); + vector8 = vector8.RotatedByRandom(0.52359879016876221); + Projectile.NewProjectile(vector7.X, vector7.Y, vector8.X, vector8.Y, ProjectileID.CultistBossFireBall, fireballDamage, 0f, Main.myPlayer, 0f, 0f); + } + } + npc.ai[1] += 1f; + if (npc.ai[1] >= (float)(4 + fireballFireRate * 4)) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[3] += 1f; + npc.velocity = Vector2.Zero; + npc.netUpdate = true; + } + } + + // Lightning Orb + else if (npc.ai[0] == 4f) + { + if (isCultist) + { + npc.localAI[2] = 12f; + } + else + { + npc.localAI[2] = 11f; + } + if ((npc.ai[1] == 20f & isCultist) && Main.netMode != NetmodeID.MultiplayerClient) + { + List list5 = new List(); + for (int num25 = 0; num25 < 200; num25++) + { + if (Main.npc[num25].active && Main.npc[num25].type == NPCID.CultistBossClone && Main.npc[num25].ai[3] == (float)npc.whoAmI) + { + list5.Add(num25); + } + } + foreach (int current5 in list5) + { + NPC nPC5 = Main.npc[current5]; + Vector2 center5 = nPC5.Center; + int num26 = Math.Sign(player.Center.X - center5.X); + if (num26 != 0) + { + nPC5.direction = (nPC5.spriteDirection = num26); + } + Vector2 vec3 = Vector2.Normalize(player.Center - center5 + player.velocity * 20f); + if (vec3.HasNaNs()) + { + vec3 = new Vector2((float)npc.direction, 0f); + } + Vector2 vector9 = center5 + new Vector2((float)(npc.direction * 30), 12f); + Vector2 vector10 = vec3 * (fireballSpeed + (float)Main.rand.NextDouble() * 4f); + vector10 = vector10.RotatedByRandom(0.52359879016876221); + Projectile.NewProjectile(vector9.X, vector9.Y, vector10.X, vector10.Y, ProjectileID.CultistBossFireBallClone, fireballDamage, 0f, Main.myPlayer, 0f, 0f); + } + Projectile.NewProjectile(npc.Center.X, npc.Center.Y - 100f, 0f, 0f, ProjectileID.CultistBossLightningOrb, lightningDamage, 0f, Main.myPlayer, 0f, 0f); + } + npc.ai[1] += 1f; + if (npc.ai[1] >= (float)(20 + lightningOrbFireRate)) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[3] += 1f; + npc.velocity = Vector2.Zero; + npc.netUpdate = true; + } + } + + // Spawn Clones, and Dragon or Cthulhu head + else if (npc.ai[0] == 5f) + { + npc.localAI[2] = 10f; + if (Vector2.Normalize(player.Center - center).HasNaNs()) + { + new Vector2((float)npc.direction, 0f); + } + if (npc.ai[1] >= 0f && npc.ai[1] < 30f) + { + dontTakeDamage = true; + chaseable = false; + float num28 = (npc.ai[1] - 0f) / 30f; + npc.alpha = (int)(num28 * 255f); + } + else if (npc.ai[1] >= 30f && npc.ai[1] < 90f) + { + if ((npc.ai[1] == 30f && Main.netMode != NetmodeID.MultiplayerClient) & isCultist) + { + npc.localAI[1] += 1f; + Vector2 spinningpoint = new Vector2(180f, 0f); + List list6 = new List(); + for (int num29 = 0; num29 < 200; num29++) + { + if (Main.npc[num29].active && Main.npc[num29].type == NPCID.CultistBossClone && Main.npc[num29].ai[3] == (float)npc.whoAmI) + { + list6.Add(num29); + } + } + int num30 = 6 - list6.Count; + if (num30 > 2) + { + num30 = 2; + } + int num31 = list6.Count + num30 + 1; + float[] array = new float[num31]; + for (int num32 = 0; num32 < array.Length; num32++) + { + array[num32] = Vector2.Distance(npc.Center + spinningpoint.RotatedBy((double)((float)num32 * 6.28318548f / (float)num31 - 1.57079637f), default(Vector2)), player.Center); + } + int num33 = 0; + for (int num34 = 1; num34 < array.Length; num34++) + { + if (array[num33] > array[num34]) + { + num33 = num34; + } + } + if (num33 < num31 / 2) + { + num33 += num31 / 2; + } + else + { + num33 -= num31 / 2; + } + int num35 = num30; + for (int num36 = 0; num36 < array.Length; num36++) + { + if (num33 != num36) + { + Vector2 vector11 = npc.Center + spinningpoint.RotatedBy((double)((float)num36 * 6.28318548f / (float)num31 - 1.57079637f), default(Vector2)); + if (num35-- > 0) + { + int num37 = NPC.NewNPC((int)vector11.X, (int)vector11.Y + npc.height / 2, NPCID.CultistBossClone, npc.whoAmI, 0f, 0f, 0f, 0f, 255); + Main.npc[num37].ai[3] = (float)npc.whoAmI; + Main.npc[num37].netUpdate = true; + Main.npc[num37].localAI[1] = npc.localAI[1]; + } + else + { + int num38 = list6[-num35 - 1]; + Main.npc[num38].Center = vector11; + NetMessage.SendData(23, -1, -1, null, num38, 0f, 0f, 0f, 0, 0, 0); + } + } + } + npc.ai[2] = (float)Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ProjectileID.CultistRitual, 0, 0f, Main.myPlayer, 0f, (float)npc.whoAmI); + npc.Center += spinningpoint.RotatedBy((double)((float)num33 * 6.28318548f / (float)num31 - 1.57079637f), default(Vector2)); + npc.netUpdate = true; + list6.Clear(); + } + dontTakeDamage = true; + chaseable = false; + npc.alpha = 255; + if (isCultist) + { + Vector2 vector12 = Main.projectile[(int)npc.ai[2]].Center; + vector12 -= npc.Center; + if (vector12 == Vector2.Zero) + { + vector12 = -Vector2.UnitY; + } + vector12.Normalize(); + if (Math.Abs(vector12.Y) < 0.77f) + { + npc.localAI[2] = 11f; + } + else if (vector12.Y < 0f) + { + npc.localAI[2] = 12f; + } + else + { + npc.localAI[2] = 10f; + } + int num39 = Math.Sign(vector12.X); + if (num39 != 0) + { + npc.direction = (npc.spriteDirection = num39); + } + } + else + { + Vector2 vector13 = Main.projectile[(int)Main.npc[(int)npc.ai[3]].ai[2]].Center; + vector13 -= npc.Center; + if (vector13 == Vector2.Zero) + { + vector13 = -Vector2.UnitY; + } + vector13.Normalize(); + if (Math.Abs(vector13.Y) < 0.77f) + { + npc.localAI[2] = 11f; + } + else if (vector13.Y < 0f) + { + npc.localAI[2] = 12f; + } + else + { + npc.localAI[2] = 10f; + } + int num40 = Math.Sign(vector13.X); + if (num40 != 0) + { + npc.direction = (npc.spriteDirection = num40); + } + } + } + else if (npc.ai[1] >= 90f && npc.ai[1] < 120f) + { + dontTakeDamage = true; + chaseable = false; + float num41 = (npc.ai[1] - 90f) / 30f; + npc.alpha = 255 - (int)(num41 * 255f); + } + else if (npc.ai[1] >= 120f && npc.ai[1] < timeToFinishRitual) + { + chaseable = false; + npc.alpha = 0; + if (isCultist) + { + Vector2 vector14 = Main.projectile[(int)npc.ai[2]].Center; + vector14 -= npc.Center; + if (vector14 == Vector2.Zero) + { + vector14 = -Vector2.UnitY; + } + vector14.Normalize(); + if (Math.Abs(vector14.Y) < 0.77f) + { + npc.localAI[2] = 11f; + } + else if (vector14.Y < 0f) + { + npc.localAI[2] = 12f; + } + else + { + npc.localAI[2] = 10f; + } + int num42 = Math.Sign(vector14.X); + if (num42 != 0) + { + npc.direction = (npc.spriteDirection = num42); + } + } + else + { + Vector2 vector15 = Main.projectile[(int)Main.npc[(int)npc.ai[3]].ai[2]].Center; + vector15 -= npc.Center; + if (vector15 == Vector2.Zero) + { + vector15 = -Vector2.UnitY; + } + vector15.Normalize(); + if (Math.Abs(vector15.Y) < 0.77f) + { + npc.localAI[2] = 11f; + } + else if (vector15.Y < 0f) + { + npc.localAI[2] = 12f; + } + else + { + npc.localAI[2] = 10f; + } + int num43 = Math.Sign(vector15.X); + if (num43 != 0) + { + npc.direction = (npc.spriteDirection = num43); + } + } + } + npc.ai[1] += 1f; + if (npc.ai[1] >= timeToFinishRitual) + { + chaseable = false; + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[3] += 1f; + npc.velocity = Vector2.Zero; + npc.netUpdate = true; + } + } + + // Pause + else if (npc.ai[0] == 6f) + { + npc.localAI[2] = 13f; + npc.ai[1] += 1f; + if (npc.ai[1] >= (float)(idleTime * 3)) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[3] += 1f; + npc.velocity = Vector2.Zero; + npc.netUpdate = true; + } + } + + // Ancient Light + else if (npc.ai[0] == 7f) + { + npc.localAI[2] = 11f; + Vector2 vec4 = Vector2.Normalize(player.Center - center); + if (vec4.HasNaNs()) + { + vec4 = new Vector2((float)npc.direction, 0f); + } + if ((npc.ai[1] >= 4f & isCultist) && (int)(npc.ai[1] - 4f) % ancientLightSpawnRate == 0) + { + if ((int)(npc.ai[1] - 4f) / ancientLightSpawnRate == 2) + { + List list7 = new List(); + for (int num44 = 0; num44 < 200; num44++) + { + if (Main.npc[num44].active && Main.npc[num44].type == NPCID.CultistBossClone && Main.npc[num44].ai[3] == (float)npc.whoAmI) + { + list7.Add(num44); + } + } + foreach (int current6 in list7) + { + NPC nPC6 = Main.npc[current6]; + Vector2 center6 = nPC6.Center; + int num45 = Math.Sign(player.Center.X - center6.X); + if (num45 != 0) + { + nPC6.direction = (nPC6.spriteDirection = num45); + } + if (Main.netMode != NetmodeID.MultiplayerClient) + { + vec4 = Vector2.Normalize(player.Center - center6 + player.velocity * 20f); + if (vec4.HasNaNs()) + { + vec4 = new Vector2((float)npc.direction, 0f); + } + Vector2 vector16 = center6 + new Vector2((float)(npc.direction * 30), 12f); + int num46 = 0; + while ((float)num46 < 5f) + { + Vector2 vector17 = vec4 * (fireballSpeed + (float)Main.rand.NextDouble() * 4f); + vector17 = vector17.RotatedByRandom(1.2566370964050293); + Projectile.NewProjectile(vector16.X, vector16.Y, vector17.X, vector17.Y, ProjectileID.CultistBossFireBallClone, fireballDamage, 0f, Main.myPlayer, 0f, 0f); + num46++; + } + } + } + } + int num47 = Math.Sign(player.Center.X - center.X); + if (num47 != 0) + { + npc.direction = (npc.spriteDirection = num47); + } + if (Main.netMode != NetmodeID.MultiplayerClient) + { + vec4 = Vector2.Normalize(player.Center - center + player.velocity * 20f); + if (vec4.HasNaNs()) + { + vec4 = new Vector2((float)npc.direction, 0f); + } + Vector2 vector18 = npc.Center + new Vector2((float)(npc.direction * 30), 12f); + float scaleFactor = CalamityWorld.death ? 11f : 10f; + float num48 = 0.251327425f; + int num49 = 0; + while ((float)num49 < 5f) + { + Vector2 vector19 = vec4 * scaleFactor; + vector19 = vector19.RotatedBy((double)(num48 * (float)num49 - (1.2566371f - num48) / 2f), default(Vector2)); + float ai = (Main.rand.NextFloat() - 0.5f) * 0.3f * 6.28318548f / 60f; + int num50 = NPC.NewNPC((int)vector18.X, (int)vector18.Y + 7, NPCID.AncientLight, 0, 0f, ai, vector19.X, vector19.Y, 255); + Main.npc[num50].velocity = vector19; + num49++; + } + } + } + npc.ai[1] += 1f; + if (npc.ai[1] >= (float)(4 + ancientLightSpawnRate * 2)) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[3] += 1f; + npc.velocity = Vector2.Zero; + npc.netUpdate = true; + } + } + + // Ancient Doom + else if (npc.ai[0] == 8f) + { + npc.localAI[2] = 13f; + if ((npc.ai[1] >= 4f & isCultist) && (int)(npc.ai[1] - 4f) % 20 == 0) + { + List list8 = new List(); + for (int num51 = 0; num51 < 200; num51++) + { + if (Main.npc[num51].active && Main.npc[num51].type == NPCID.CultistBossClone && Main.npc[num51].ai[3] == (float)npc.whoAmI) + { + list8.Add(num51); + } + } + int num52 = list8.Count + 1; + if (num52 > 3) + { + num52 = 3; + } + int num53 = Math.Sign(player.Center.X - center.X); + if (num53 != 0) + { + npc.direction = (npc.spriteDirection = num53); + } + if (Main.netMode != NetmodeID.MultiplayerClient) + { + for (int num54 = 0; num54 < num52; num54++) + { + Point point = npc.Center.ToTileCoordinates(); + Point point2 = Main.player[npc.target].Center.ToTileCoordinates(); + Vector2 vector20 = Main.player[npc.target].Center - npc.Center; + int num55 = 20; + int num56 = 3; + int num57 = 7; + int num58 = 2; + int num59 = 0; + bool flag6 = false; + if (vector20.Length() > 2800f) + { + flag6 = true; + } + while (!flag6 && num59 < 100) + { + num59++; + int num60 = Main.rand.Next(point2.X - num55, point2.X + num55 + 1); + int num61 = Main.rand.Next(point2.Y - num55, point2.Y + num55 + 1); + if ((num61 < point2.Y - num57 || num61 > point2.Y + num57 || num60 < point2.X - num57 || num60 > point2.X + num57) && (num61 < point.Y - num56 || num61 > point.Y + num56 || num60 < point.X - num56 || num60 > point.X + num56) && !Main.tile[num60, num61].nactive()) + { + bool flag7 = true; + if (flag7 && Collision.SolidTiles(num60 - num58, num60 + num58, num61 - num58, num61 + num58)) + { + flag7 = false; + } + if (flag7) + { + NPC.NewNPC(num60 * 16 + 8, num61 * 16 + 8, NPCID.AncientDoom, 0, (float)npc.whoAmI, 0f, 0f, 0f, 255); + break; + } + } + } + } + } + } + npc.ai[1] += 1f; + if (npc.ai[1] >= 64f) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[3] += 1f; + npc.velocity = Vector2.Zero; + npc.netUpdate = true; + } + } + + // Set Clones to Cultist phase + if (!isCultist) + { + npc.ai[3] = clonePhase; + } + + // Take damage or not + npc.dontTakeDamage = dontTakeDamage; + npc.chaseable = chaseable; + + if (ModLoader.GetMod("FargowiltasSouls") != null) + ModLoader.GetMod("FargowiltasSouls").Call("FargoSoulsAI", npc.whoAmI); + + return false; + } + #endregion + #region Buffed Mothron AI public static bool BuffedMothronAI(NPC npc) { @@ -11517,95 +12543,6 @@ namespace CalamityMod.NPCs } #endregion - #region Revengeance Cultist AI - public static void RevengeanceCultistAI(NPC npc, bool configBossRushBoost, Mod mod, bool enraged) - { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); - - // Force enraged vulnerability - if (npc.buffImmune[mod.BuffType("Enraged")]) - npc.buffImmune[mod.BuffType("Enraged")] = false; - - if ((double)npc.life <= (double)npc.lifeMax * 0.5 || enraged || configBossRushBoost) - { - // Spawn Eidolists - if (!NPC.AnyNPCs(mod.NPCType("Eidolist"))) - { - if (calamityGlobalNPC.newAI[0] < 120f) - calamityGlobalNPC.newAI[0] += 1f; - - if (calamityGlobalNPC.newAI[0] >= 120f) - { - calamityGlobalNPC.newAI[0] = 0f; - npc.netUpdate = true; - - if (Main.netMode != NetmodeID.MultiplayerClient) - NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("Eidolist"), 0, 0f, 0f, 0f, 0f, 255); - - calamityGlobalNPC.newAI[0] = -360f; - } - } - } - else - { - // Fire projectiles from the sky - if (calamityGlobalNPC.CultCountdown == 0) - { - if (CalamityWorld.death || CalamityWorld.bossRushActive) - calamityGlobalNPC.CultCountdown = 75; - else if ((double)npc.life <= (double)npc.lifeMax * 0.5) - calamityGlobalNPC.CultCountdown = 150; - else - calamityGlobalNPC.CultCountdown = 200; - } - if (calamityGlobalNPC.CultCountdown > 0) - { - calamityGlobalNPC.CultCountdown--; - if (calamityGlobalNPC.CultCountdown == 0) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Player player2 = Main.player[npc.target]; - int speed2 = 8; - float spawnX = Main.rand.Next(1000) - 500 + player2.Center.X; - float spawnY = -1000 + player2.Center.Y; - Vector2 baseSpawn = new Vector2(spawnX, spawnY); - Vector2 baseVelocity = player2.Center - baseSpawn; - baseVelocity.Normalize(); - baseVelocity = baseVelocity * speed2; - int damage = 25; //100 - for (int i = 0; i < calamityGlobalNPC.CultProjectiles; i++) - { - Vector2 spawn2 = baseSpawn; - spawn2.X = spawn2.X + i * 30 - (calamityGlobalNPC.CultProjectiles * 15); - Vector2 velocity = baseVelocity; - velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-calamityGlobalNPC.CultAngleSpread / 2 + (calamityGlobalNPC.CultAngleSpread * i / (float)calamityGlobalNPC.CultProjectiles))); - velocity.X = velocity.X + 3 * Main.rand.NextFloat() - 1.5f; - int projectileType = Main.rand.Next(3); - switch (projectileType) - { - case 0: - projectileType = ProjectileID.CultistBossFireBall; - break; - case 1: - projectileType = ProjectileID.FrostWave; - break; - case 2: - projectileType = ProjectileID.AncientDoomProjectile; - break; - default: - break; - } - int projectileI = Projectile.NewProjectile(spawn2.X, spawn2.Y, velocity.X, velocity.Y, projectileType, damage, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[projectileI].tileCollide = false; - } - } - } - } - } - } - #endregion - #region Revengeance Dungeon Guardian AI public static void RevengeanceDungeonGuardianAI(NPC npc, bool configBossRushBoost, bool enraged) { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 5a18972d11..97cf264142 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -683,11 +683,11 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.GolemHead) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 3.0) : (int)(npc.lifeMax * 2.0); + npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.0) : (int)(npc.lifeMax * 1.5); } else if (npc.type == NPCID.GolemHeadFree) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.25) : (int)(npc.lifeMax * 1.1); + npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.5) : (int)(npc.lifeMax * 1.25); npc.dontTakeDamage = false; } else if (npc.type == NPCID.Plantera) @@ -695,7 +695,11 @@ namespace CalamityMod.NPCs npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 3.4) : (int)(npc.lifeMax * 2.3); npc.npcSlots = 32f; } - else if (npc.type == NPCID.WallofFlesh || npc.type == NPCID.WallofFleshEye) + else if (npc.type == NPCID.PlanterasHook) + { + npc.damage = (npc.defDamage = 0); + } + else if (npc.type == NPCID.WallofFlesh || npc.type == NPCID.WallofFleshEye) { npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.6) : (int)(npc.lifeMax * 1.9); @@ -724,7 +728,7 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.BrainofCthulhu) { - npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 1.9) : (int)(npc.lifeMax * 1.4); + npc.lifeMax = CalamityWorld.death ? (int)(npc.lifeMax * 2.1) : (int)(npc.lifeMax * 1.6); npc.npcSlots = 12f; } else if (npc.type == NPCID.Creeper) @@ -1439,7 +1443,7 @@ namespace CalamityMod.NPCs { if (npc.type == NPCID.BrainofCthulhu) { - if ((float)npc.life / (float)npc.lifeMax < (CalamityWorld.death ? 0.25f : 0.15f)) + if ((float)npc.life / (float)npc.lifeMax < (CalamityWorld.death ? 0.33f : 0.2f)) index = -1; } @@ -1592,7 +1596,11 @@ namespace CalamityMod.NPCs break; - default: + case NPCID.CultistBoss: + case NPCID.CultistBossClone: + return CalamityGlobalAI.BuffedCultistAI(npc, enraged, mod); + + default: break; } } @@ -2154,10 +2162,6 @@ namespace CalamityMod.NPCs CalamityGlobalAI.RevengeanceMoonLordHandAI(npc, mod); break; - case NPCID.CultistBoss: - CalamityGlobalAI.RevengeanceCultistAI(npc, configBossRushBoost, mod, enraged); - break; - case NPCID.DungeonGuardian: CalamityGlobalAI.RevengeanceDungeonGuardianAI(npc, configBossRushBoost, enraged); break; @@ -2220,7 +2224,6 @@ namespace CalamityMod.NPCs break; case NPCID.GolemHead: - case NPCID.GolemHeadFree: case NPCID.GolemFistRight: case NPCID.GolemFistLeft: target.AddBuff(mod.BuffType("ArmorCrunch"), 180); diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 7b7cc44a9a..9956aaff7b 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -352,7 +352,7 @@ namespace CalamityMod.NPCs.Providence flightPath = 0; // Velocity and acceleration - bool increaseSpeed = calamityGlobalNPC.newAI[0] > 180f; + bool increaseSpeed = calamityGlobalNPC.newAI[0] > 150f; float acceleration = (expertMode ? 1.1f : 1.05f) + (0.2f * (1f - lifeRatio)); float velocity = (expertMode ? 16f : 15f) + (4f * (1f - lifeRatio)); if (CalamityWorld.bossRushActive) @@ -367,7 +367,7 @@ namespace CalamityMod.NPCs.Providence } else if (increaseSpeed) { - velocity += (calamityGlobalNPC.newAI[0] - 180f) * 0.04f; + velocity += (calamityGlobalNPC.newAI[0] - 150f) * 0.04f; if (velocity > 30f) velocity = 30f; } diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs b/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs index 6bb0f7e7fd..f76c575be8 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs @@ -268,14 +268,13 @@ namespace CalamityMod.NPCs.TheDevourerofGods // Laser walls if (!speedBoost2 && (laserWallPhase == 1 || calamityGlobalNPC.enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive))) { - laserShoot += 3; - if (laserShoot >= 2400) - laserShoot = 0; + laserShoot += 1; - float speed = (CalamityWorld.bossRushActive ? 4.5f : 4f); + float speed = 4f; + int divisor = CalamityWorld.bossRushActive ? 90 : (CalamityWorld.death ? 105 : 120); // Walls from the sides - if (laserShoot % (CalamityWorld.bossRushActive ? 240 : (CalamityWorld.death ? 270 : 300)) == 0) //300 600 900 1200 1500 1800 2100 2400 + if (laserShoot % divisor == 0) { Main.PlaySound(2, (int)Main.player[npc.target].position.X, (int)Main.player[npc.target].position.Y, 12); @@ -302,7 +301,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods } // Wall from below - if (laserShoot % (CalamityWorld.bossRushActive ? 360 : (CalamityWorld.death ? 405 : 450)) == 0) //480 960 1440 1920 2400 + if (laserShoot % divisor == 0) { for (int x = 0; x < totalShots; x++) { @@ -313,7 +312,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods } // Wall from above - if (laserShoot % (CalamityWorld.bossRushActive ? 480 : (CalamityWorld.death ? 540 : 600)) == 0) //600 1200 1800 2400 + if (laserShoot % divisor == 0) { if (lifeRatio < 0.4f && CalamityWorld.revenge) { diff --git a/NPCs/TownNPCs/Bandit.png b/NPCs/TownNPCs/Bandit.png new file mode 100644 index 0000000000000000000000000000000000000000..343ae8de5e03488acb61fe44e5ab2e0b9ca6d72a GIT binary patch literal 3905 zcmeHK_g7Qd7EVZm&}#?^L)?2s5F(L4xoqyVJ%0tGD+BGEX@&^%_rIA^o6j%1QT% zIC^ukPkkZtX)SN0>H6%Qmg(s=V8MUJKM4Gi(ySO2TFw!_)g&+nHSUF^m> zI_|BlmSjJ&Qn>Zt^Y<5ZnxlVdd%5e`#y5XovAJU3psn&?a=bw<%9?Fvq~3XL>{RP> z%`6iWO9d^pYZ3`Sjw*C#;qelHTw%}rSygV)2-q^3|xUqN>LV!;Q6J&31&sskEi-}=?&jtHl!VUB^pr<143h$*}P?10A&hCOn4K_x6THyFo&zSnYn*cw!BhM=| zkoiH~W{{58P?^p|ni^wf6N2d_{*y-_d@-~~cpUbJx`tyJS^4UNGnm8!93u9}%r2Dn zQ|V!*>w&h?sp5p+ z=Tkey@U*9KwOimGZbVrpgdx4E={Ea*K%W#mge9rc!bJi8)e_z*doLyL1VS>$)@a%F z^@;it+lEr_<6MLIE~)(sRoc1)lyS$Ed%Ooj3ijY#A{V(InSeAJB_@*%mM{fM{317= zdizm=#wAiJx>${G#oWVPM4g@`s6D(x8Hj>^v4-sI%e{i=j>mN4p;zi}O%(=WsLc2kD0ocG1iR4F{yOFlcc zHli^x@bxUc8}YfX3%6CV7x@S$50Rm{~gBcMgW1LkG<>e4cps z40xO=UC5Z)M>DSr_cA%0ju!QGIW;vpMt+IGq+_q4`!nUC1-UvCkdxgJ#GN!7u$uCi z&Efgsc8njlx5n9|*y?2-P#|s2u}bMemj#1P=6${$^(8TLriip+w{0<;Z(b(Iq|gx1k7c=lc` z@{Jy6Sm#rqCzn$CX*$b64JMHAo?a}+=;A4}hG4ZxMB`LNBB70zuktga#vkA@5Dz$( z&&E4tF2Dq;ZL0ijLQ}z96v1kIiL&QKU@fLVxa?gAv8wQ_x9x6wa0HW5qpV;JYI4HqT9Y~C16ExW0(dTG&72V z6U-BL|1?RLeDU`-Sefib%nOZV3fc__4Dc^7K|6n#j;QV)Vw(!=?HgLepOl4u7axOD z(!CYCn2w0aF;4VV?>g z$<;nmQBe-i+=ED{$FHkO)VnE`z|BE&;bw|R4pCHkhS9+8bR)0fwW zMk;BFk>$wVEL%!eJ#JsSB*UVQlhjuW{;;fsZHkP)bPcn8w=GsngJE3SWX+P}ZrR>> z22;JNtj^Su_?(Z*8O--nrb{fj7Awh9V}y|CG&TB@JQ-AIyrwwkM3umagMr%*KJ5#orfz*$&d0FH|0jy@Rq{a%Y?;N&rc z!|I5gV~5j@0O%53*GV8y5<{J`0j8>Ac*v+SaS;3pu2D^W+fTUbE?vn&iG%29k{*5` zfrh0RR%u}+mCCvF%1|nN{`WAdG>#7K;Pb84TL*t?I?8)FiTwJDu-H@p)cddCv5lfx zSZf5C>D0AX$OK-B6O43Lem}@C=Nz_;7Tv&*R54lCq8?3624=ZQW~2FGplDIfN~k+f zU#hi+*K@W?%aQ@1Z<*;r-FetD_#CQ1)~`d6B;6+Xf0a80^y(ph8p9(O5DbPnWJR6ofdOxxdBQPgYMnEo1{Cd@~ literal 0 HcmV?d00001 diff --git a/NPCs/TownNPCs/BanditAlt.png b/NPCs/TownNPCs/BanditAlt.png new file mode 100644 index 0000000000000000000000000000000000000000..d458ec794c9db23ed1da46f26d01c55c194c755d GIT binary patch literal 3675 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 literal 0 HcmV?d00001 diff --git a/NPCs/TownNPCs/Bandit_NPC_Head.png b/NPCs/TownNPCs/Bandit_NPC_Head.png new file mode 100644 index 0000000000000000000000000000000000000000..83256387387548da085b0243c42446a60f932c58 GIT binary patch literal 386 zcmeAS@N?(olHy`uVBq!ia0vp^5YP2Yz$Q*JkCnjLfy zn8R^r`@vf(8Y(-LK0EA;>nc@