Merge branch 'master' into biome-blade-unshits-itself

This commit is contained in:
IbanPlay committed 2022-01-10 15:46:55 +01:00
commit 6c0ffc2c51
7 files changed
+43 -31

No files matched your search

+25 -17
View File
@@ -1243,7 +1243,7 @@ namespace CalamityMod.NPCs
// Phases
bool phase3 = lifeRatio < 0.7f;
bool phase4 = lifeRatio < 0.35f;
bool phase5 = npc.life / (float)npc.lifeMax < 0.1f && revenge;
bool phase5 = npc.life / (float)npc.lifeMax <= 0.1f && revenge;
// Don't take damage during bullet hells
npc.dontTakeDamage = calamityGlobalNPC.newAI[2] > 0f;
@@ -1609,13 +1609,25 @@ namespace CalamityMod.NPCs
else
{
npc.ai[0] = 0f;
npc.ai[1] = 0f;
npc.ai[2] = 0f;
npc.ai[3] = 0f;
npc.localAI[1] = 0f;
calamityGlobalNPC.newAI[2] = 0f;
calamityGlobalNPC.newAI[3] = 0f;
npc.alpha = 0;
// Prevent bullshit charge hits when second bullet hell ends.
if (phase5)
{
npc.ai[1] = 4f;
npc.ai[2] = -105f;
npc.TargetClosest();
}
else
{
npc.ai[1] = 0f;
npc.ai[2] = 0f;
}
npc.netUpdate = true;
for (int x = 0; x < Main.maxProjectiles; x++)
@@ -2756,16 +2768,8 @@ namespace CalamityMod.NPCs
// Start up
if (npc.ai[0] == 0f)
{
// If hit or after two seconds start Idle phase
npc.ai[1] += 1f;
if (npc.justHit || npc.ai[1] >= 120f || malice)
{
// Set AI to next phase (Idle) and reset other AI
npc.ai[0] = 1f;
npc.ai[1] = 0f;
npc.netUpdate = true;
}
npc.ai[0] = 1f;
npc.netUpdate = true;
CustomGravity();
}
@@ -2782,11 +2786,12 @@ namespace CalamityMod.NPCs
npc.ai[1] += 1f;
if (npc.ai[1] >= 120f || malice)
{
// Increase defense
// Increase defense and damage
npc.defense = npc.defDefense;
npc.damage = npc.defDamage;
// Stop colliding with tiles
npc.noTileCollide = true;
npc.noTileCollide = true;
// Set AI to next phase (Walk) and reset other AI
npc.TargetClosest();
@@ -3093,8 +3098,11 @@ namespace CalamityMod.NPCs
// Teleport
else if (npc.ai[0] == 5f)
{
// Slow down
npc.velocity.X *= 0.9f;
// Don't deal damage
npc.damage = 0;
// Slow down
npc.velocity.X *= 0.9f;
// Spawn slimes and start teleport
if (Main.netMode != NetmodeID.MultiplayerClient)
+3 -3
View File
@@ -1,5 +1,4 @@
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.CalPlayer;
using System;
using System.IO;
using Microsoft.Xna.Framework;
@@ -282,10 +281,11 @@ namespace CalamityMod.NPCs.OldDuke
{
spawnedProjectiles = true;
int spawnX = npc.width / 2;
int damage = Main.expertMode ? 55 : 70;
int type = ModContent.ProjectileType<OldDukeGore>();
int damage = npc.GetProjectileDamage(type);
for (int i = 0; i < 2; i++)
Projectile.NewProjectile(npc.Center.X + Main.rand.Next(-spawnX, spawnX), npc.Center.Y,
Main.rand.Next(-3, 4), Main.rand.Next(-12, -6), ModContent.ProjectileType<OldDukeGore>(), damage, 0f, Main.myPlayer, 0f, 0f);
Main.rand.Next(-3, 4), Main.rand.Next(-12, -6), type, damage, 0f, Main.myPlayer);
}
return true;
+7 -3
View File
@@ -241,15 +241,19 @@ namespace CalamityMod.NPCs.OldDuke
spawnedProjectiles = true;
int totalProjectiles = 4;
float radians = MathHelper.TwoPi / totalProjectiles;
int damage = Main.expertMode ? 55 : 70;
int type = ModContent.ProjectileType<SandToothOldDuke>();
int damage = npc.GetProjectileDamage(type);
for (int k = 0; k < totalProjectiles; k++)
{
float velocity = (CalamityWorld.malice || BossRushEvent.BossRushActive) ? Main.rand.Next(6, 10) : Main.rand.Next(7, 11);
Vector2 vector255 = new Vector2(0f, -velocity).RotatedBy(radians * k);
int proj = Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType<SandToothOldDuke>(), damage, 0f, Main.myPlayer, 0f, 0f);
int proj = Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer);
Main.projectile[proj].timeLeft = 360;
}
Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType<SandPoisonCloudOldDuke>(), damage, 0f, Main.myPlayer, 0f, 0f);
type = ModContent.ProjectileType<SandPoisonCloudOldDuke>();
damage = npc.GetProjectileDamage(type);
Projectile.NewProjectile(npc.Center, Vector2.Zero, type, damage, 0f, Main.myPlayer);
}
return true;
+1 -1
View File
@@ -96,7 +96,7 @@ namespace CalamityMod.NPCs.Polterghast
int type = ModContent.ProjectileType<PhantomMine>();
int damage = npc.GetProjectileDamage(type);
float maxVelocity = 8f * tileEnrageMult;
float acceleration = 1.05f + (tileEnrageMult - 1f) * 0.1f;
float acceleration = 1.15f + (tileEnrageMult - 1f) * 0.15f;
Projectile.NewProjectile(npc.Center, direction, type, damage, 1f, npc.target, maxVelocity, acceleration);
}
npc.ai[2] = 0f;
+2 -2
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Ravager
npc.height = 80;
npc.defense = 40;
npc.DR_NERD(0.15f);
npc.lifeMax = 23000;
npc.lifeMax = 16352;
npc.knockBackResist = 0f;
aiType = -1;
npc.noGravity = true;
@@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.Ravager
}
if (BossRushEvent.BossRushActive)
{
npc.lifeMax = 31500;
npc.lifeMax = 22500;
}
double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
+1 -1
View File
@@ -235,7 +235,7 @@ namespace CalamityMod
ratio += (float)Math.Sin(segmentProgress * MathHelper.Pi / 2f) * segment.displacement;
break;
case EasingType.SineInOut:
ratio += (-(float)Math.Cos((segmentProgress * MathHelper.Pi) - 1) / 2f) * segment.displacement;
ratio += (-((float)Math.Cos(segmentProgress * MathHelper.Pi) - 1) / 2f) * segment.displacement;
break;
case EasingType.SineBump:
ratio += ((float)Math.Sin(segmentProgress * MathHelper.Pi)) * segment.displacement;
+4 -4
View File
@@ -742,11 +742,11 @@ namespace CalamityMod
{ new Tuple<int, int>(ModContent.NPCType<PhantomFuckYou>(), ModContent.ProjectileType<PhantomMine>()), new int[] { 150, 260, 288, 304, 432 } },
{ new Tuple<int, int>(ModContent.NPCType<PhantomSpiritL>(), ModContent.ProjectileType<PhantomGhostShot>()), new int[] { 130, 212, 236, 248, 354 } },
{ new Tuple<int, int>(ModContent.NPCType<OldDuke>(), ModContent.ProjectileType<OldDukeGore>()), new int[] { 140, 220, 244, 256, 366 } },
{ new Tuple<int, int>(ModContent.NPCType<OldDuke>(), ModContent.ProjectileType<OldDukeGore>()), new int[] { 150, 240, 264, 276, 390 } },
{ new Tuple<int, int>(ModContent.NPCType<OldDuke>(), ModContent.ProjectileType<OldDukeVortex>()), new int[] { 280, 400, 440, 464, 660 } },
{ new Tuple<int, int>(ModContent.NPCType<OldDukeToothBall>(), ModContent.ProjectileType<SandToothOldDuke>()), new int[] { 140, 220, 264, 292, 396 } },
{ new Tuple<int, int>(ModContent.NPCType<OldDukeToothBall>(), ModContent.ProjectileType<SandPoisonCloudOldDuke>()), new int[] { 140, 220, 252, 272, 378 } },
{ new Tuple<int, int>(ModContent.NPCType<OldDukeSharkron>(), ModContent.ProjectileType<OldDukeGore>()), new int[] { 140, 220, 244, 256, 366 } },
{ new Tuple<int, int>(ModContent.NPCType<OldDukeToothBall>(), ModContent.ProjectileType<SandToothOldDuke>()), new int[] { 150, 240, 264, 276, 390 } },
{ new Tuple<int, int>(ModContent.NPCType<OldDukeToothBall>(), ModContent.ProjectileType<SandPoisonCloudOldDuke>()), new int[] { 180, 288, 316, 332, 468 } },
{ new Tuple<int, int>(ModContent.NPCType<OldDukeSharkron>(), ModContent.ProjectileType<OldDukeGore>()), new int[] { 150, 240, 264, 276, 390 } },
{ new Tuple<int, int>(ModContent.NPCType<DevourerofGodsHead>(), ModContent.ProjectileType<DoGDeath>()), new int[] { 160, 276, 304, 320, 456 } },
{ new Tuple<int, int>(ModContent.NPCType<DevourerofGodsHead>(), ModContent.ProjectileType<DoGFire>()), new int[] { 180, 300, 332, 348, 498 } },