This commit is contained in:
termigator1359 committed 2019-10-16 21:16:49 -04:00
commit 2ca951fd02
19 files changed
+142 -75

No files matched your search

+1 -2
View File
@@ -7214,8 +7214,7 @@ namespace CalamityMod.CalPlayer
if (CalamityWorld.revenge)
{
customDamage = true;
double defenseMult = Main.hardMode ? 0.75 : 0.5;
double newDamage = (double)damage - ((double)player.statDefense * defenseMult);
double newDamage = (double)damage - ((double)player.statDefense * 0.75);
double newDamageLimit = 5.0 + (Main.hardMode ? 5.0 : 0.0) + (NPC.downedPlantBoss ? 5.0 : 0.0) + (NPC.downedMoonlord ? 5.0 : 0.0); //5, 10, 15, 20
if (newDamage < newDamageLimit)
{
-1
View File
@@ -30,7 +30,6 @@ namespace CalamityMod.Items.DifficultyItems
"Increases Nurse healing price.\n" +
"Allows certain enemies to inflict the Horror and Marked debuffs.\n" +
"Before you have killed your first boss you take 20% less damage from everything.\n" +
"Changes the Expert Mode 75% defense back to the Normal Mode 50% defense for the duration of prehardmode.\n" +
"Changes ALL boss AIs and some enemy AIs in vanilla and the Calamity Mod.\n" +
"DO NOT USE IF A BOSS IS ALIVE!\n" +
"Can be toggled on and off.");
+1 -1
View File
@@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.AbyssNPCs
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
npc.LifeMaxNERD(73000, 85000, 100000, 20000000, 21000000);
npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
for (int k = 0; k < npc.buffImmune.Length; k++)
+1 -1
View File
@@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.AbyssNPCs
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
npc.LifeMaxNERD(73000, 85000, 100000, 20000000, 21000000);
npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
for (int k = 0; k < npc.buffImmune.Length; k++)
+1 -1
View File
@@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.AbyssNPCs
npc.Calamity().RevPlusDR(0.1f);
npc.aiStyle = -1;
aiType = -1;
npc.LifeMaxNERD(73000, 85000, 100000, 20000000, 21000000);
npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
for (int k = 0; k < npc.buffImmune.Length; k++)
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.AbyssNPCs
aiType = -1;
npc.knockBackResist = 0f;
npc.alpha = 255;
npc.LifeMaxNERD(73000, 85000, 100000, 20000000, 21000000);
npc.LifeMaxNERD(73000, 85000, 100000, 10000000, 11000000);
double HPBoost = Config.BossHealthPercentageBoost * 0.01;
npc.lifeMax += (int)(npc.lifeMax * HPBoost);
for (int k = 0; k < npc.buffImmune.Length; k++)
+2 -2
View File
@@ -109,7 +109,7 @@ namespace CalamityMod.NPCs.AstrumDeus
npc.alpha = 0;
}
}
if (Main.netMode != NetmodeID.MultiplayerClient)
/*if (Main.netMode != NetmodeID.MultiplayerClient)
{
int shootTime = 4;
if ((double)npc.life <= (double)npc.lifeMax * 0.3 || CalamityWorld.bossRushActive)
@@ -147,7 +147,7 @@ namespace CalamityMod.NPCs.AstrumDeus
npc.netUpdate = true;
}
}
}
}*/
}
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
+8 -6
View File
@@ -16,8 +16,8 @@ namespace CalamityMod.NPCs.AstrumDeus
private const int maxLength = 5;
private int addOrbiter = 0;
private int addOrbiter2 = 0;
private float speed = 0.15f;
private float turnSpeed = 0.1f;
private float speed = 0.12f;
private float turnSpeed = 0.08f;
private bool tailSpawned = false;
private bool secondStage = false;
private bool thirdStage = false;
@@ -179,15 +179,17 @@ namespace CalamityMod.NPCs.AstrumDeus
npc.TargetClosest(true);
}
npc.velocity.Length();
float speedMult = expertMode ? 1.8f : 1.6f;
float speedAdd = expertMode ? 0.06f : 0.045f;
float turnSpeedAdd = expertMode ? 0.04f : 0.03f;
if (CalamityWorld.death || CalamityWorld.bossRushActive)
{
speedMult = (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 3f : 2.5f;
speedAdd *= 1.25f;
turnSpeedAdd *= 1.25f;
}
float life = (float)npc.life;
float totalLife = (float)npc.lifeMax;
float newSpeed = speed * (speedMult - (life / totalLife));
float newTurnSpeed = turnSpeed * (speedMult - (life / totalLife));
float newSpeed = speed + speedAdd * (1f - (life / totalLife));
float newTurnSpeed = turnSpeed + turnSpeedAdd * (1f - (life / totalLife));
if (npc.alpha != 0)
{
for (int num934 = 0; num934 < 2; num934++)
+5 -7
View File
@@ -99,8 +99,10 @@ namespace CalamityMod.NPCs.BrimstoneWaifu
bool revenge = CalamityWorld.revenge || CalamityWorld.bossRushActive;
bool calamity = modPlayer.ZoneCalamity;
// Percent life remaining
float lifeRatio = (float)npc.life / (float)npc.lifeMax;
npc.defense = npc.defDefense;
// Percent life remaining
float lifeRatio = (float)npc.life / (float)npc.lifeMax;
Vector2 center = new Vector2(npc.Center.X, npc.Center.Y);
Vector2 vectorCenter = npc.Center;
@@ -156,7 +158,6 @@ namespace CalamityMod.NPCs.BrimstoneWaifu
if (npc.ai[0] == 0f)
{
npc.defense = provy ? 120 : 20;
npc.chaseable = true;
if (Main.netMode != NetmodeID.MultiplayerClient)
{
@@ -202,7 +203,6 @@ namespace CalamityMod.NPCs.BrimstoneWaifu
}
else if (npc.ai[0] == 1f)
{
npc.defense = provy ? 120 : 20;
npc.chaseable = true;
Vector2 position = new Vector2(npc.ai[1] * 16f - (float)(npc.width / 2), npc.ai[2] * 16f - (float)(npc.height / 2));
for (int m = 0; m < 5; m++)
@@ -235,7 +235,6 @@ namespace CalamityMod.NPCs.BrimstoneWaifu
npc.alpha -= 50;
if (npc.alpha <= 0)
{
npc.defense = provy ? 120 : 20;
npc.chaseable = true;
npc.ai[3] += 1f;
npc.alpha = 0;
@@ -255,7 +254,6 @@ namespace CalamityMod.NPCs.BrimstoneWaifu
}
else if (npc.ai[0] == 3f)
{
npc.defense = provy ? 120 : 20;
npc.chaseable = true;
npc.rotation = npc.velocity.X * 0.04f;
npc.spriteDirection = (npc.direction > 0) ? 1 : -1;
@@ -393,7 +391,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu
if (CalamityWorld.death || !calamity)
npc.localAI[0] += 1f;
if (npc.localAI[0] >= 140f)
if (npc.localAI[0] >= 120f)
{
npc.localAI[0] = 0f;
+12 -2
View File
@@ -157,7 +157,12 @@ namespace CalamityMod.NPCs.Calamitas
{
float num823 = expertMode ? 9.5f : 8f;
float num824 = expertMode ? 0.175f : 0.15f;
if (CalamityWorld.bossRushActive)
if (provy)
{
num823 *= 1.25f;
num824 *= 1.25f;
}
if (CalamityWorld.bossRushActive)
{
num823 *= 1.5f;
num824 *= 1.5f;
@@ -241,7 +246,12 @@ namespace CalamityMod.NPCs.Calamitas
float num832 = expertMode ? 9.5f : 8f;
float num833 = expertMode ? 0.25f : 0.2f;
if (CalamityWorld.bossRushActive)
if (provy)
{
num832 *= 1.25f;
num833 *= 1.25f;
}
if (CalamityWorld.bossRushActive)
{
num832 *= 1.5f;
num833 *= 1.5f;
+12 -3
View File
@@ -181,7 +181,12 @@ namespace CalamityMod.NPCs.Calamitas
{
float num861 = 5f;
float num862 = 0.1f;
if (CalamityWorld.bossRushActive)
if (provy)
{
num861 *= 1.25f;
num862 *= 1.25f;
}
if (CalamityWorld.bossRushActive)
{
num861 *= 1.5f;
num862 *= 1.5f;
@@ -196,7 +201,7 @@ namespace CalamityMod.NPCs.Calamitas
float num864 = player.position.X + (float)(player.width / 2) + (float)(num863 * (CalamityWorld.bossRushActive ? 270 : 180)) - vector86.X;
float num865 = player.position.Y + (float)(player.height / 2) - vector86.Y;
float num866 = (float)Math.Sqrt((double)(num864 * num864 + num865 * num865));
if (expertMode)
if (expertMode || provy)
{
if (num866 > 300f)
{
@@ -328,7 +333,11 @@ namespace CalamityMod.NPCs.Calamitas
{
num870 += 4f;
}
if (CalamityWorld.bossRushActive)
if (provy)
{
num870 *= 1.15f;
}
if (CalamityWorld.bossRushActive)
{
num870 *= 1.25f;
}
+12 -3
View File
@@ -181,7 +181,12 @@ namespace CalamityMod.NPCs.Calamitas
{
float num861 = 4.5f;
float num862 = 0.2f;
if (CalamityWorld.bossRushActive)
if (provy)
{
num861 *= 1.25f;
num862 *= 1.25f;
}
if (CalamityWorld.bossRushActive)
{
num861 *= 1.5f;
num862 *= 1.5f;
@@ -197,7 +202,7 @@ namespace CalamityMod.NPCs.Calamitas
float num864 = player.position.X + (float)(player.width / 2) + (float)(num863 * (CalamityWorld.bossRushActive ? 270 : 180)) - vector86.X;
float num865 = player.position.Y + (float)(player.height / 2) - vector86.Y;
float num866 = (float)Math.Sqrt((double)(num864 * num864 + num865 * num865));
if (expertMode)
if (expertMode || provy)
{
if (num866 > 300f)
{
@@ -329,7 +334,11 @@ namespace CalamityMod.NPCs.Calamitas
{
num870 += 4f;
}
if (CalamityWorld.bossRushActive)
if (provy)
{
num870 *= 1.15f;
}
if (CalamityWorld.bossRushActive)
{
num870 *= 1.25f;
}
+12 -2
View File
@@ -254,7 +254,12 @@ namespace CalamityMod.NPCs.Calamitas
{
float num823 = expertMode ? 10f : 8.5f;
float num824 = expertMode ? 0.18f : 0.155f;
if (CalamityWorld.bossRushActive)
if (provy)
{
num823 *= 1.25f;
num824 *= 1.25f;
}
if (CalamityWorld.bossRushActive)
{
num823 *= 1.5f;
num824 *= 1.5f;
@@ -347,7 +352,12 @@ namespace CalamityMod.NPCs.Calamitas
float num832 = expertMode ? 10f : 8.5f;
float num833 = expertMode ? 0.255f : 0.205f;
if (CalamityWorld.bossRushActive)
if (provy)
{
num832 *= 1.25f;
num833 *= 1.25f;
}
if (CalamityWorld.bossRushActive)
{
num832 *= 1.5f;
num833 *= 1.5f;
+17 -19
View File
@@ -3159,7 +3159,7 @@ namespace CalamityMod.NPCs
}
// Teleport dust
for (int m = 0; m < 60; m++)
for (int m = 0; m < 30; m++)
{
int num39 = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 200, default, 3f);
Main.dust[num39].noGravity = true;
@@ -3212,12 +3212,11 @@ namespace CalamityMod.NPCs
if (calamityGlobalNPC.newAI[2] != 0f && calamityGlobalNPC.newAI[3] != 0f)
{
for (int m = 0; m < 10; m++)
for (int m = 0; m < 5; m++)
{
Vector2 position = new Vector2(calamityGlobalNPC.newAI[2], calamityGlobalNPC.newAI[3]);
int num39 = Dust.NewDust(position, npc.width, npc.height, 27, 0f, 0f, 200, default, 1f);
int num39 = Dust.NewDust(position, npc.width, npc.height, 27, 0f, 0f, 200, default, 2f);
Main.dust[num39].noGravity = true;
Main.dust[num39].velocity.X = Main.dust[num39].velocity.X * 2f;
}
}
@@ -3232,14 +3231,13 @@ namespace CalamityMod.NPCs
{
int dust = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 200, default, 1.5f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 2f;
}
// Teleport
if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[3] >= 420f)
{
// Teleport dust
for (int m = 0; m < 60; m++)
for (int m = 0; m < 30; m++)
{
int num39 = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 200, default, 3f);
Main.dust[num39].noGravity = true;
@@ -3396,26 +3394,26 @@ namespace CalamityMod.NPCs
if (enraged || configBossRushBoost)
num176 += 3f;
if (num175 > 150f || CalamityWorld.death || CalamityWorld.bossRushActive)
if (num175 > 150f)
num176 *= 1.05f;
if (num175 > 200f)
num176 *= 1.1f;
num176 *= 1.05f;
if (num175 > 250f)
num176 *= 1.1f;
num176 *= 1.05f;
if (num175 > 300f)
num176 *= 1.1f;
num176 *= 1.05f;
if (num175 > 350f)
num176 *= 1.15f;
num176 *= 1.1f;
if (num175 > 400f)
num176 *= 1.15f;
num176 *= 1.1f;
if (num175 > 450f)
num176 *= 1.15f;
num176 *= 1.1f;
if (num175 > 500f)
num176 *= 1.2f;
num176 *= 1.1f;
if (num175 > 550f)
num176 *= 1.2f;
num176 *= 1.1f;
if (num175 > 600f)
num176 *= 1.2f;
num176 *= 1.1f;
num175 = num176 / num175;
npc.velocity.X = num173 * num175;
@@ -3531,7 +3529,7 @@ namespace CalamityMod.NPCs
else
{
npc.ai[3] += 1f;
if (npc.ai[3] >= 120f)
if (npc.ai[3] >= 200f)
{
npc.ai[2] += 1f;
npc.ai[3] = 0f;
@@ -12321,7 +12319,7 @@ namespace CalamityMod.NPCs
if ((num1207 == num1208 - 14f || num1207 == num1208 - 7f || num1207 == num1208) && Main.netMode != NetmodeID.MultiplayerClient)
{
Vector2 vector203 = Utils.Vector2FromElipse(npc.localAI[0].ToRotationVector2(), value19 * npc.localAI[1]);
float velocity = CalamityWorld.bossRushActive ? 12f : 9f;
float velocity = CalamityWorld.bossRushActive ? 9f : 6.75f;
Vector2 vector204 = Vector2.Normalize(v4) * velocity;
Projectile.NewProjectile(npc.Center.X + vector203.X, npc.Center.Y + vector203.Y, vector204.X, vector204.Y, ProjectileID.PhantasmalBolt, 40, 0f, Main.myPlayer, 0f, 0f);
}
@@ -12639,7 +12637,7 @@ namespace CalamityMod.NPCs
if ((num1178 == num1179 - 14f || num1178 == num1179 - 7f || num1178 == num1179) && Main.netMode != NetmodeID.MultiplayerClient)
{
Vector2 vector181 = Utils.Vector2FromElipse(npc.localAI[0].ToRotationVector2(), vector165 * npc.localAI[1]);
float velocity = CalamityWorld.bossRushActive ? 12f : 9f;
float velocity = CalamityWorld.bossRushActive ? 9f : 6.75f;
Vector2 vector182 = Vector2.Normalize(v) * velocity;
Projectile.NewProjectile(npc.Center.X + vector181.X, npc.Center.Y + vector181.Y, vector182.X, vector182.Y, ProjectileID.PhantasmalBolt, 40, 0f, Main.myPlayer, 0f, 0f);
}
+3 -3
View File
@@ -145,9 +145,9 @@ namespace CalamityMod.NPCs
{ NPCID.GolemFistLeft, 250000 },
{ NPCID.GolemFistRight, 250000 },
{ NPCID.EaterofWorldsHead, 150000 }, // 30 seconds
{ NPCID.EaterofWorldsBody, 225000 },
{ NPCID.EaterofWorldsTail, 300000 },
{ NPCID.EaterofWorldsHead, 2500000 }, // 30 seconds
{ NPCID.EaterofWorldsBody, 2500000 },
{ NPCID.EaterofWorldsTail, 2500000 },
// Tier 2
{ NPCID.TheDestroyer, 2500000 }, // 30 seconds + immunity timer at start
+2 -1
View File
@@ -447,7 +447,8 @@ namespace CalamityMod.NPCs.Leviathan
if (isNotOcean)
num1074 *= 2;
Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, 0f, 0f);
float ai0 = ((!leviAlive && num1075 == mod.ProjectileType("FrostMist")) ? 1f : 0f);
Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, ai0, 0f);
}
}
+1 -1
View File
@@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss
projectile.alpha = 100;
projectile.penetrate = -1;
projectile.tileCollide = false;
projectile.timeLeft = 1200;
projectile.timeLeft = 1020;
}
public override void SendExtraAI(BinaryWriter writer)
+19 -16
View File
@@ -105,22 +105,25 @@ namespace CalamityMod.Projectiles.Boss
projectile.localAI[0] = 0f;
}
}
int num103 = (int)Player.FindClosest(projectile.Center, 1, 1);
projectile.ai[1] += 1f;
if (projectile.ai[1] < 110f && projectile.ai[1] > 30f)
{
float scaleFactor2 = projectile.velocity.Length();
Vector2 vector11 = Main.player[num103].Center - projectile.Center;
vector11.Normalize();
vector11 *= scaleFactor2;
projectile.velocity = (projectile.velocity * 24f + vector11) / 25f;
projectile.velocity.Normalize();
projectile.velocity *= scaleFactor2;
}
if (projectile.velocity.Length() < 12f)
{
projectile.velocity *= 1.02f;
}
if (projectile.ai[0] == 1f)
{
int num103 = (int)Player.FindClosest(projectile.Center, 1, 1);
projectile.ai[1] += 1f;
if (projectile.ai[1] < 110f && projectile.ai[1] > 30f)
{
float scaleFactor2 = projectile.velocity.Length();
Vector2 vector11 = Main.player[num103].Center - projectile.Center;
vector11.Normalize();
vector11 *= scaleFactor2;
projectile.velocity = (projectile.velocity * 24f + vector11) / 25f;
projectile.velocity.Normalize();
projectile.velocity *= scaleFactor2;
}
if (projectile.velocity.Length() < 12f)
{
projectile.velocity *= 1.02f;
}
}
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
Lighting.AddLight(projectile.Center, 0f, (255 - projectile.alpha) * 0.35f / 255f, (255 - projectile.alpha) * 0.35f / 255f);
}
+32 -3
View File
@@ -734,29 +734,40 @@ namespace CalamityMod.World
#region PostUpdate
public override void PostUpdate()
{
// Sunken Sea Location...duh
SunkenSeaLocation = new Rectangle(WorldGen.UndergroundDesertLocation.Left, WorldGen.UndergroundDesertLocation.Bottom,
WorldGen.UndergroundDesertLocation.Width, WorldGen.UndergroundDesertLocation.Height / 2);
// Player variable, always finds the closest player relative to the center of the map
int closestPlayer = (int)Player.FindClosest(new Vector2((float)(Main.maxTilesX / 2), (float)Main.worldSurface / 2f) * 16f, 0, 0);
// Force boss rush to off
if (!deactivateStupidFuckingBullshit)
{
deactivateStupidFuckingBullshit = true;
bossRushActive = false;
CalamityMod.UpdateServerBoolean();
}
// Boss Rush shit
if (bossRushActive)
{
// Prevent Moon Lord from spawning naturally
if (NPC.MoonLordCountdown > 0)
{
NPC.MoonLordCountdown = 0;
}
// Do boss rush countdown and shit if no boss is alive
if (!CalamityPlayer.areThereAnyDamnBosses)
{
// Stage text
if (bossRushSpawnCountdown > 0)
{
bossRushSpawnCountdown--;
if (bossRushSpawnCountdown == 180)
{
// After Fishron is dead
if (bossRushStage == 28)
{
string key = "Mods.CalamityMod.BossRushTierThreeEndText2";
@@ -770,6 +781,8 @@ namespace CalamityMod.World
NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor);
}
}
// After Providence is dead
else if (bossRushStage == 36)
{
string key = "Mods.CalamityMod.BossRushTierFourEndText2";
@@ -785,30 +798,42 @@ namespace CalamityMod.World
}
}
}
// Cooldown and boss spawn
if (bossRushSpawnCountdown <= 0)
{
// Cooldown before next boss spawns
bossRushSpawnCountdown = 60;
if (bossRushStage > 27)
// Increase cooldown post-Fishron
if (bossRushStage >= 27)
{
bossRushSpawnCountdown += 300;
}
// Change cooldown based on stage
switch (bossRushStage)
{
// When Destroyer or Cultist dies, increase time to show text
case 9:
bossRushSpawnCountdown = 240;
break;
case 18:
bossRushSpawnCountdown = 300;
break;
// When Signus dies, increase time to give players a moment to get in a good spot for Ravager
case 25:
bossRushSpawnCountdown = 360;
break;
// When Calamitas Clone dies, increase time to give players a moment to relax
case 32:
bossRushSpawnCountdown = 420;
break;
default:
break;
}
// Post-Wall of Flesh teleport back to spawn
if (bossRushStage == 13)
{
for (int playerIndex = 0; playerIndex < 255; playerIndex++)
@@ -820,6 +845,8 @@ namespace CalamityMod.World
}
}
}
// Remove Providence debuff for next boss fight
else if (bossRushStage == 36)
{
for (int playerIndex = 0; playerIndex < 255; playerIndex++)
@@ -834,6 +861,8 @@ namespace CalamityMod.World
}
}
}
// Spawn bosses
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Main.PlaySound(SoundID.Roar, Main.player[closestPlayer].position, 0);