Merge Fab's latest changes into Ozz's local

This commit is contained in:
Ozzatron committed 2020-09-21 20:14:13 -04:00
commit 7e3504cfd8
12 files changed
+617 -566

No files matched your search

+528 -468
View File
File diff suppressed because it is too large. Load diff
+16 -7
View File
@@ -920,7 +920,7 @@ namespace CalamityMod.NPCs
case NPCID.PrimeCannon:
case NPCID.PrimeSaw:
case NPCID.PrimeLaser:
npc.lifeMax = (int)(npc.lifeMax * 1.05);
npc.lifeMax = (int)(npc.lifeMax * 0.8);
break;
case NPCID.Retinazer:
@@ -995,17 +995,22 @@ namespace CalamityMod.NPCs
{
npc.lifeMax = (int)(npc.lifeMax * 1.05);
}
else if (npc.type == NPCID.SkeletronHead)
else if (npc.type == NPCID.SkeletronHead) // 8800 in expert, 6600 in rev, 4400 in death
{
if (!CalamityWorld.death)
npc.lifeMax = (int)(npc.lifeMax * 1.25);
if (CalamityWorld.death)
npc.lifeMax = (int)(npc.lifeMax * 0.5);
else
npc.lifeMax = (int)(npc.lifeMax * 0.75);
npc.npcSlots = 12f;
}
else if (npc.type == NPCID.SkeletronHand)
else if (npc.type == NPCID.SkeletronHand) // 3120 in expert, 11232 in rev, 18720 in death
{
npc.lifeMax = (int)(npc.lifeMax * 0.75);
}
if (CalamityWorld.death)
npc.lifeMax = (int)(npc.lifeMax * 0.75);
else
npc.lifeMax = (int)(npc.lifeMax * 0.9);
}
else if (npc.type == NPCID.QueenBee)
{
npc.lifeMax = (int)(npc.lifeMax * 1.15);
@@ -1057,6 +1062,10 @@ namespace CalamityMod.NPCs
npc.lifeMax = (int)(npc.lifeMax * 1.45);
npc.npcSlots = 12f;
}
else if (npc.type <= NPCID.PrimeLaser && npc.type >= NPCID.PrimeCannon)
{
npc.lifeMax = (int)(npc.lifeMax * 0.65);
}
else if (npc.type == NPCID.Retinazer)
{
npc.lifeMax = (int)(npc.lifeMax * 1.25);
+22 -19
View File
@@ -596,6 +596,8 @@ namespace CalamityMod.NPCs.Ravager
if ((npc.position.X < targetVector.X + offset && npc.position.X + npc.width > targetVector.X + player.width + offset && (inRange || npc.ai[0] != 2f)) || npc.ai[1] > 0f || npc.Calamity().newAI[3] >= 180f)
{
npc.damage = npc.defDamage;
if (npc.ai[0] == 2f)
{
float stopBeforeFallTime = 30f;
@@ -641,33 +643,34 @@ namespace CalamityMod.NPCs.Ravager
float velocityMult = 1.8f;
float velocityXChange = 0.2f + Math.Abs(npc.Center.X - player.Center.X) * 0.001f;
float velocityXBoost = death ? 4f : 4f * (1f - lifeRatio);
float velocityX = 8f + velocityXBoost + Math.Abs(npc.Center.X - player.Center.X) * 0.001f;
if (npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive))
velocityX += 3f;
if (!rightClawActive || death)
velocityX += 1f;
if (!leftClawActive || death)
velocityX += 1f;
if (!headActive || death)
velocityX += 1f;
if (!rightLegActive || death)
velocityX += 1f;
if (!leftLegActive || death)
velocityX += 1f;
if (npc.ai[0] == 2f)
{
npc.damage = 0;
velocityXChange *= velocityMult;
velocityX *= velocityMult;
}
if (npc.direction < 0)
npc.velocity.X -= velocityXChange;
else if (npc.direction > 0)
npc.velocity.X += velocityXChange;
float velocityXBoost = death ? 4f : 4f * (1f - lifeRatio);
float velocityX = 8f + velocityXBoost + Math.Abs(npc.Center.X - player.Center.X) * 0.001f;
if (npc.Calamity().enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && BossRushEvent.BossRushActive))
velocityX += 3f;
if (!rightClawActive || death)
velocityX += 1f;
if (!leftClawActive || death)
velocityX += 1f;
if (!headActive || death)
velocityX += 1f;
if (!rightLegActive || death)
velocityX += 1f;
if (!leftLegActive || death)
velocityX += 1f;
if (npc.ai[0] == 2f)
velocityX *= velocityMult;
if (npc.velocity.X < -velocityX)
npc.velocity.X = -velocityX;
if (npc.velocity.X > velocityX)
+12 -20
View File
@@ -75,24 +75,23 @@ namespace CalamityMod.NPCs.Ravager
{
bool provy = CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
Player player = Main.player[npc.target];
if (CalamityGlobalNPC.scavenger < 0 || !Main.npc[CalamityGlobalNPC.scavenger].active)
{
npc.active = false;
npc.netUpdate = true;
return;
}
if (npc.timeLeft < 1800)
{
npc.timeLeft = 1800;
}
float speed = 21f;
Vector2 center = new Vector2(npc.Center.X, npc.Center.Y);
float centerX = Main.npc[CalamityGlobalNPC.scavenger].Center.X - center.X;
float centerY = Main.npc[CalamityGlobalNPC.scavenger].Center.Y - center.Y;
float centerX = Main.npc[CalamityGlobalNPC.scavenger].Center.X - npc.Center.X;
float centerY = Main.npc[CalamityGlobalNPC.scavenger].Center.Y - npc.Center.Y;
centerY -= 20f;
centerX += 1f;
float totalSpeed = (float)Math.Sqrt((double)(centerX * centerX + centerY * centerY));
float totalSpeed = (float)Math.Sqrt(centerX * centerX + centerY * centerY);
if (totalSpeed < 20f)
{
npc.rotation = 0f;
@@ -106,34 +105,27 @@ namespace CalamityMod.NPCs.Ravager
npc.velocity.Y = centerY * totalSpeed;
npc.rotation = npc.velocity.X * 0.1f;
}
if (npc.alpha > 0)
{
npc.alpha -= 10;
if (npc.alpha < 0)
{
npc.alpha = 0;
}
npc.ai[1] = 30f;
}
npc.ai[1] += 1f;
if (npc.ai[1] >= 450f)
if (npc.ai[1] >= 480f)
{
Main.PlaySound(SoundID.Item62, npc.position);
npc.TargetClosest(true);
npc.ai[1] = 0f;
Vector2 shootFromVector = new Vector2(npc.Center.X, npc.Center.Y - 20f);
float nukeSpeed = 1f;
float playerDistanceX = player.position.X + (float)player.width * 0.5f - shootFromVector.X;
float playerDistanceY = player.position.Y + (float)player.height * 0.5f - shootFromVector.Y;
float totalPlayerDistance = (float)Math.Sqrt((double)(playerDistanceX * playerDistanceX + playerDistanceY * playerDistanceY));
totalPlayerDistance = nukeSpeed / totalPlayerDistance;
playerDistanceX *= totalPlayerDistance;
playerDistanceY *= totalPlayerDistance;
int type = ModContent.ProjectileType<ScavengerNuke>();
int damage = npc.GetProjectileDamage(type);
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int nuke = Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, playerDistanceX, playerDistanceY, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
Vector2 shootFromVector = new Vector2(npc.Center.X, npc.Center.Y - 20f);
Vector2 velocity = new Vector2(0f, -15f);
int nuke = Projectile.NewProjectile(shootFromVector, velocity, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, npc.target + 1, 0f);
Main.projectile[nuke].velocity.Y = -15f;
}
}
+6 -4
View File
@@ -102,12 +102,14 @@ namespace CalamityMod.NPCs.Ravager
{
npc.ai[0] += 1f;
npc.ai[1] = 0f;
Main.PlaySound(SoundID.Item62, npc.position);
int type = ModContent.ProjectileType<ScavengerNuke>();
int damage = npc.GetProjectileDamage(type);
if (Main.netMode != NetmodeID.MultiplayerClient)
Projectile.NewProjectile(npc.Center, Vector2.Zero, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f);
{
Main.PlaySound(SoundID.Item33, npc.position);
int type = ModContent.ProjectileType<ScavengerLaser>();
int damage = npc.GetProjectileDamage(type);
Projectile.NewProjectile(npc.Center, Vector2.Normalize(player.Center - npc.Center) * 6f, type, damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, -1f);
}
}
else
{
-1
View File
@@ -2,7 +2,6 @@ using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Events;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
+11 -13
View File
@@ -195,17 +195,6 @@ namespace CalamityMod.NPCs.Yharon
if (npc.timeLeft < 5)
{
/*string key = "Mods.CalamityMod.DargonBossText2";
Color messageColor = Color.Orange;
if (Main.netMode == NetmodeID.SinglePlayer)
{
Main.NewText(Language.GetTextValue(key), messageColor);
}
else if (Main.netMode == NetmodeID.Server)
{
NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor);
}*/
startSecondAI = false;
npc.boss = false;
@@ -332,26 +321,35 @@ namespace CalamityMod.NPCs.Yharon
chargeSpeed *= velocityMult;
}
// Phase timers and velocities
int flareBombPhaseTimer = 60;
int flareBombSpawnDivisor = 3;
float flareBombPhaseAcceleration = 0.8f;
float flareBombPhaseVelocity = 12f;
int fireTornadoPhaseTimer = 90;
int newPhaseTimer = 180;
int flareDustPhaseTimer = 300;
int flareDustPhaseTimer2 = 150;
float spinTime = flareDustPhaseTimer / 2;
int flareDustSpawnDivisor = 30;
int flareDustSpawnDivisor2 = 5;
int flareDustSpawnDivisor3 = 12;
float spinPhaseVelocity = 25f;
float spinPhaseRotation = MathHelper.TwoPi * 3 / spinTime;
float increasedIdleTimeAfterBulletHell = -120f;
float teleportPhaseTimer = 30f;
Vector2 vectorCenter = npc.Center;
int spawnPhaseTimer = 75;
Vector2 vectorCenter = npc.Center;
// Target
if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead || !Main.player[npc.target].active)
{
+1 -1
View File
@@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Boss
if (projectile.ai[1] == -1f)
{
if (projectile.velocity.Length() < 16f)
if (projectile.velocity.Length() < 18f)
projectile.velocity *= 1.05f;
else
projectile.tileCollide = true;
+14 -29
View File
@@ -30,11 +30,10 @@ namespace CalamityMod.Projectiles.Boss
public override void AI()
{
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
projectile.ai[1] += 1f;
if (projectile.ai[1] > 420)
{
if (projectile.timeLeft < 180)
projectile.tileCollide = true;
}
projectile.frameCounter++;
if (projectile.frameCounter > 18)
{
@@ -42,51 +41,37 @@ namespace CalamityMod.Projectiles.Boss
projectile.frameCounter = 0;
}
if (projectile.frame > 4)
{
projectile.frame = 0;
}
projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2;
float inertia = revenge ? 90f : 110f;
float scaleFactor12 = revenge ? 16f : 12f;
float num954 = 40f;
if (projectile.alpha > 0)
{
projectile.alpha -= 10;
}
if (projectile.alpha < 0)
{
projectile.alpha = 0;
}
projectile.frameCounter++;
if (projectile.frameCounter > 4)
{
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame > 3)
{
projectile.frame = 0;
}
Lighting.AddLight(projectile.Center, 1f, 0.7f, 0f);
int num959 = (int)projectile.ai[0];
if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead)
{
if (projectile.Distance(Main.player[num959].Center) > num954)
if (projectile.Distance(Main.player[num959].Center) > 320f)
{
Vector2 vector102 = projectile.DirectionTo(Main.player[num959].Center);
if (vector102.HasNaNs())
{
vector102 = Vector2.UnitY;
}
projectile.velocity = (projectile.velocity * (inertia - 1f) + vector102 * scaleFactor12) / inertia;
}
}
else
{
if (projectile.timeLeft > 30)
{
projectile.timeLeft = 30;
}
if (projectile.ai[0] != -1f)
{
projectile.ai[0] = -1f;
@@ -100,8 +85,8 @@ namespace CalamityMod.Projectiles.Boss
Main.PlaySound(SoundID.Item14, projectile.position);
projectile.position = projectile.Center;
projectile.width = projectile.height = 160;
projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
projectile.position.X = projectile.position.X - (projectile.width / 2);
projectile.position.Y = projectile.position.Y - (projectile.height / 2);
projectile.Damage();
for (int num621 = 0; num621 < 30; num621++)
{
@@ -110,7 +95,7 @@ namespace CalamityMod.Projectiles.Boss
if (Main.rand.NextBool(2))
{
Main.dust[num622].scale = 0.5f;
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
}
}
for (int num623 = 0; num623 < 40; num623++)
+1 -1
View File
@@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Boss
if (num625 < Main.maxPlayers)
{
Vector2 value16 = Main.player[num625].Center - projectile.Center;
projectile.velocity = Vector2.Normalize(value16) * 20f;
projectile.velocity = Vector2.Normalize(value16) * 22f;
}
}
}
+5 -2
View File
@@ -549,7 +549,9 @@ namespace CalamityMod.Projectiles
projectile.Kill();
return false;
}
if (projectile.velocity.Length() < 24f)
float velocityLimit = (CalamityWorld.death || BossRushEvent.BossRushActive) ? 28f : 24f;
if (projectile.velocity.Length() < velocityLimit)
projectile.velocity *= 1.01f;
}
if (projectile.alpha < 40)
@@ -564,7 +566,8 @@ namespace CalamityMod.Projectiles
// Moon Lord big eye spheres
else if (projectile.type == ProjectileID.PhantasmalSphere && Main.npc[(int)projectile.ai[1]].type == NPCID.MoonLordHand)
{
if (projectile.velocity.Length() < 12f)
float velocityLimit = (CalamityWorld.death || BossRushEvent.BossRushActive) ? 14f : 12f;
if (projectile.velocity.Length() < velocityLimit)
projectile.velocity *= 1.0075f;
return true;
+1 -1
View File
@@ -629,7 +629,7 @@ namespace CalamityMod
{ new Tuple<int, int>(NPCID.CultistBoss, ProjectileID.CultistBossFireBall), new int[] { 60, 80, 160, 180, 240 } }, // 80 in non-rev master mode
{ new Tuple<int, int>(NPCID.CultistBoss, ProjectileID.CultistBossIceMist), new int[] { 70, 100, 172, 188, 258 } }, // 100 in non-rev master mode
{ new Tuple<int, int>(NPCID.CultistBoss, ProjectileID.CultistBossLightningOrb), new int[] { 90, 120, 208, 224, 312 } }, // 120 in non-rev master mode
{ new Tuple<int, int>(NPCID.CultistBoss, ProjectileID.CultistBossFireBallClone), new int[] { 36, 72, 144, 164, 216 } }, // 72 in non-rev master mode
{ new Tuple<int, int>(NPCID.CultistBossClone, ProjectileID.CultistBossFireBallClone), new int[] { 36, 72, 144, 164, 216 } }, // 72 in non-rev master mode
{ new Tuple<int, int>(NPCID.AncientDoom, ProjectileID.AncientDoomProjectile), new int[] { 60, 180, 200, 220, 300 } }, // 402 in non-rev master mode
{ new Tuple<int, int>(ModContent.NPCType<AstrumDeusBodySpectral>(), ModContent.ProjectileType<AstralShot2>()), new int[] { 90, 152, 176, 188, 264 } },