1 - Nerfed Crimson Crusher Blade damage reduction from 10 to 5.

2 - Reduced Mantis Claws melee speed.
3 - DoG laser wall positions changed.
4 - Ravager aims phase 2 stomps more ahead of the player.
5 - Signus Mine telegraphs.
6 - Deus phase 2 multiplayer fix.
7 - Destroyer sped up during flight phase.
8 - Yharon flare circles spread out less prior to homing in.
9 - Necromancer shadowbeams have shorter range.
10 - Ragged Caster souls no longer go through tiles.
11 - Nebula Floater lasers are slower.
12 - Projectile vanilla crit bug fix.
This commit is contained in:
Andrew Marheine committed 2020-06-21 21:10:24 -05:00
1 parent bb146546d7
commit 8461fddd95
10 files changed
+150 -89

No files matched your search

+1 -1
View File
@@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Melee
target.AddBuff(BuffID.Ichor, 120);
if (target.damage > 0 && crit && !CalamityPlayer.areThereAnyDamnBosses)
{
target.damage = target.defDamage - 10;
target.damage = target.defDamage - 5;
if (target.damage < 1)
target.damage = 1;
}
+2 -2
View File
@@ -19,9 +19,9 @@ namespace CalamityMod.Items.Weapons.Melee
item.width = 26;
item.damage = 120;
item.melee = true;
item.useAnimation = 6;
item.useAnimation = 8;
item.useStyle = ItemUseStyleID.SwingThrow;
item.useTime = 6;
item.useTime = 8;
item.useTurn = true;
item.knockBack = 7f;
item.UseSound = SoundID.Item1;
+8
View File
@@ -2993,6 +2993,14 @@ namespace CalamityMod.NPCs
Main.npc[lol].realLife = npc.whoAmI;
Main.npc[lol].Calamity().newAI[0] = calamityGlobalNPC.newAI[0];
Main.npc[lol].Calamity().newAI[3] = calamityGlobalNPC.newAI[3];
if (Main.netMode == NetmodeID.Server)
{
var netMessage = mod.GetPacket();
netMessage.Write((byte)CalamityModMessageType.SyncCalamityNPCAIArray);
netMessage.Write(Main.npc[lol].Calamity().newAI[0]);
netMessage.Write(Main.npc[lol].Calamity().newAI[3]);
netMessage.Send();
}
Main.npc[lol].ai[2] = npc.whoAmI;
Main.npc[lol].ai[1] = Previous;
Main.npc[Previous].ai[0] = lol;
+6 -4
View File
@@ -4490,11 +4490,13 @@ namespace CalamityMod.NPCs
if (npc.type == NPCID.TheDestroyerBody && Vector2.Distance(player.Center, npc.Center) > 80f && !flyAtTarget)
{
// Laser rate of fire
int shootTime = 2 + (int)Math.Ceiling(((enraged || configBossRushBoost) ? 5D : 2D) * (1f - lifeRatio));
int shootTime = 4 + (death ? 2 : (int)Math.Ceiling(2f * (1f - lifeRatio)));
if (CalamityWorld.bossRushActive)
shootTime += 1;
if (enraged || configBossRushBoost)
shootTime += 2;
calamityGlobalNPC.newAI[0] += Main.rand.Next(shootTime);
calamityGlobalNPC.newAI[0] += Main.rand.Next(shootTime);
int randomCount = death ? Main.rand.Next(1470, 27300) : Main.rand.Next(1330, 24700);
if (calamityGlobalNPC.newAI[0] >= randomCount)
@@ -4696,7 +4698,7 @@ namespace CalamityMod.NPCs
if (flyAtTarget)
{
float speedMultiplier = phase5 ? 1.5f : phase4 ? 1.3f : 1.2f;
float speedMultiplier = phase5 ? 2f : phase4 ? 1.7f : 1.5f;
speed *= speedMultiplier;
}
@@ -12714,7 +12716,7 @@ namespace CalamityMod.NPCs
if (flag86 && WorldGen.SolidTile(point5.X, point5.Y))
flag86 = false;
float num1163 = (float)Main.rand.Next(6, 19);
float num1163 = Main.rand.Next(6, 19);
float num1164 = MathHelper.TwoPi / num1163;
float num1165 = MathHelper.TwoPi * Main.rand.NextFloat();
float scaleFactor8 = 1f + Main.rand.NextFloat() * 2f;
+11 -12
View File
@@ -129,9 +129,9 @@ namespace CalamityMod.NPCs.DevourerofGods
bool expertMode = Main.expertMode || CalamityWorld.bossRushActive;
bool revenge = CalamityWorld.revenge || CalamityWorld.bossRushActive;
bool death = CalamityWorld.death || CalamityWorld.bossRushActive;
bool speedBoost = lifeRatio < 0.6 || (death && lifeRatio < 0.9);
bool speedBoost2 = lifeRatio < 0.2;
bool breathFireMore = lifeRatio < 0.15 || death;
bool speedBoost = lifeRatio < 0.75f || (death && lifeRatio < 0.9f);
bool speedBoost2 = lifeRatio < 0.3f;
bool breathFireMore = lifeRatio < 0.15f || death;
// Light
Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f);
@@ -306,9 +306,8 @@ namespace CalamityMod.NPCs.DevourerofGods
{
calamityGlobalNPC.newAI[1] += 1f;
float speed = 10.5f;
float spawnOffsetX = 1900f;
float spawnOffsetY = 1000f;
float speed = 12f;
float spawnOffset = 1500f;
float divisor = 120f;
if (calamityGlobalNPC.newAI[1] % divisor == 0f)
@@ -320,8 +319,8 @@ namespace CalamityMod.NPCs.DevourerofGods
// Side walls
for (int x = 0; x < totalShots; x++)
{
Projectile.NewProjectile(player.position.X + spawnOffsetX, targetPosY + shotSpacing[0], -speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.position.X - spawnOffsetX, targetPosY + shotSpacing[0], speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing[0], -speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing[0], speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
shotSpacing[0] -= spacingVar;
}
@@ -329,8 +328,8 @@ namespace CalamityMod.NPCs.DevourerofGods
{
for (int x = 0; x < 10; x++)
{
Projectile.NewProjectile(player.position.X + spawnOffsetX, targetPosY + shotSpacing[3], -speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.position.X - spawnOffsetX, targetPosY + shotSpacing[3], speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.position.X + spawnOffset, targetPosY + shotSpacing[3], -speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.position.X - spawnOffset, targetPosY + shotSpacing[3], speed, 0f, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
shotSpacing[3] -= Main.rand.NextBool(2) ? 180 : 200;
}
shotSpacing[3] = 1050;
@@ -340,7 +339,7 @@ namespace CalamityMod.NPCs.DevourerofGods
// Lower wall
for (int x = 0; x < totalShots; x++)
{
Projectile.NewProjectile(player.position.X + shotSpacing[1], player.position.Y + spawnOffsetY, 0f, -speed, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.position.X + shotSpacing[1], player.position.Y + spawnOffset, 0f, -speed, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
shotSpacing[1] -= spacingVar;
}
shotSpacing[1] = 1050;
@@ -348,7 +347,7 @@ namespace CalamityMod.NPCs.DevourerofGods
// Upper wall
for (int x = 0; x < totalShots; x++)
{
Projectile.NewProjectile(player.position.X + shotSpacing[2], player.position.Y - spawnOffsetY, 0f, speed, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.position.X + shotSpacing[2], player.position.Y - spawnOffset, 0f, speed, ModContent.ProjectileType<DoGDeath>(), projectileDamage, 0f, Main.myPlayer, 0f, 0f);
shotSpacing[2] -= spacingVar;
}
shotSpacing[2] = 1050;
+1 -1
View File
@@ -577,7 +577,7 @@ namespace CalamityMod.NPCs.Ravager
}
}
float maxOffset = death ? 160f : 160f * (1f - lifeRatio);
float maxOffset = 160f + (death ? 160f : 160f * (1f - lifeRatio));
float offset = npc.ai[0] == 2f ? maxOffset * npc.Calamity().newAI[2] : 0f;
// Set offset to 0 if the target stops moving
+60 -50
View File
@@ -28,6 +28,7 @@ namespace CalamityMod.NPCs.Signus
npc.knockBackResist = 0f;
npc.noGravity = true;
npc.noTileCollide = true;
npc.dontTakeDamage = true;
npc.HitSound = SoundID.NPCHit53;
npc.DeathSound = SoundID.NPCDeath44;
}
@@ -51,50 +52,58 @@ namespace CalamityMod.NPCs.Signus
return;
}
Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.7f, 0.2f, 1.1f);
Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0.7f, 0.2f, 1.1f);
npc.rotation = npc.velocity.X * 0.04f;
if (npc.ai[1] == 0f)
{
npc.scale -= 0.02f;
npc.alpha += 30;
if (npc.alpha >= 250)
{
npc.alpha = 255;
npc.ai[1] = 1f;
}
}
else if (npc.ai[1] == 1f)
{
npc.scale += 0.02f;
npc.alpha -= 30;
if (npc.alpha <= 0)
{
npc.alpha = 0;
npc.ai[1] = 0f;
}
}
npc.TargetClosest(true);
Player player = Main.player[npc.target];
Vector2 vector = player.Center - npc.Center;
if (vector.Length() < 90f || npc.ai[3] >= 300f)
Vector2 vector = player.Center - npc.Center;
npc.ai[2] = vector.Length();
npc.ai[3] += 1f;
if (npc.ai[2] < 90f || npc.ai[3] >= 300f || npc.Calamity().newAI[0] > 0f)
{
npc.dontTakeDamage = false;
CheckDead();
npc.life = 0;
return;
npc.Calamity().newAI[0] += 1f;
npc.velocity *= 0.98f;
npc.dontTakeDamage = false;
npc.scale = MathHelper.Lerp(1f, 3f, npc.Calamity().newAI[0] / 85f);
if (npc.Calamity().newAI[0] >= 85f)
{
CheckDead();
npc.life = 0;
}
return;
}
npc.ai[3] += 1f;
npc.dontTakeDamage = npc.ai[3] >= 240f ? false : true;
if (npc.ai[3] >= 180f)
{
npc.velocity *= 0.985f;
return;
}
float num1372 = 14f;
Vector2 vector167 = new Vector2(npc.Center.X + (float)(npc.direction * 20), npc.Center.Y + 6f);
float num1373 = player.position.X + (float)player.width * 0.5f - vector167.X;
if (npc.ai[1] == 0f)
{
npc.scale -= 0.02f;
npc.alpha += 30;
if (npc.alpha >= 250)
{
npc.alpha = 255;
npc.ai[1] = 1f;
}
}
else if (npc.ai[1] == 1f)
{
npc.scale += 0.02f;
npc.alpha -= 30;
if (npc.alpha <= 0)
{
npc.alpha = 0;
npc.ai[1] = 0f;
}
}
float num1372 = 14f;
Vector2 vector167 = new Vector2(npc.Center.X + (npc.direction * 20), npc.Center.Y + 6f);
float num1373 = player.position.X + player.width * 0.5f - vector167.X;
float num1374 = player.Center.Y - vector167.Y;
float num1375 = (float)Math.Sqrt((double)(num1373 * num1373 + num1374 * num1374));
float num1375 = (float)Math.Sqrt(num1373 * num1373 + num1374 * num1374);
float num1376 = num1372 / num1375;
num1373 *= num1376;
num1374 *= num1376;
@@ -115,6 +124,7 @@ namespace CalamityMod.NPCs.Signus
}
return;
}
npc.velocity.X = (npc.velocity.X * 50f + num1373) / 51f;
npc.velocity.Y = (npc.velocity.Y * 50f + num1374) / 51f;
if (num1375 < 350f)
@@ -141,7 +151,7 @@ namespace CalamityMod.NPCs.Signus
spriteEffects = SpriteEffects.FlipHorizontally;
Texture2D texture2D15 = Main.npcTexture[npc.type];
Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / 2));
Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2);
Color color36 = Color.White;
float amount9 = 0.5f;
int num153 = 5;
@@ -153,16 +163,16 @@ namespace CalamityMod.NPCs.Signus
Color color38 = lightColor;
color38 = Color.Lerp(color38, color36, amount9);
color38 = npc.GetAlpha(color38);
color38 *= (float)(num153 - num155) / 15f;
Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition;
vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f;
color38 *= (num153 - num155) / 15f;
Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition;
vector41 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f;
vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY);
spriteBatch.Draw(texture2D15, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f);
}
}
Vector2 vector43 = npc.Center - Main.screenPosition;
vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * npc.scale / 2f;
vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f;
vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY);
spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f);
@@ -172,24 +182,24 @@ namespace CalamityMod.NPCs.Signus
public override bool CheckDead()
{
Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 14);
npc.position.X = npc.position.X + (float)(npc.width / 2);
npc.position.Y = npc.position.Y + (float)(npc.height / 2);
npc.position.X = npc.position.X + (npc.width / 2);
npc.position.Y = npc.position.Y + (npc.height / 2);
npc.damage = 300;
npc.width = npc.height = 256;
npc.position.X = npc.position.X - (float)(npc.width / 2);
npc.position.Y = npc.position.Y - (float)(npc.height / 2);
for (int num621 = 0; num621 < 15; num621++)
npc.position.X = npc.position.X - (npc.width / 2);
npc.position.Y = npc.position.Y - (npc.height / 2);
for (int num621 = 0; num621 < 10; num621++)
{
int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 2f);
Main.dust[num622].velocity *= 3f;
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;
}
Main.dust[num622].noGravity = true;
}
for (int num623 = 0; num623 < 30; num623++)
for (int num623 = 0; num623 < 20; num623++)
{
int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.PurpleCosmolite, 0f, 0f, 100, default, 3f);
Main.dust[num624].noGravity = true;
+2 -3
View File
@@ -1,7 +1,6 @@
using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.IO;
using Terraria;
using Terraria.ModLoader;
@@ -73,7 +72,7 @@ namespace CalamityMod.Projectiles.Boss
OldVelocity = Vector2.Zero;
projectile.netUpdate = true;
}
projectile.rotation = projectile.velocity.ToRotation() + 1.57f;
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2;
}
// Otherwise, be sure to save the velocity the projectile started with. It will be set again when the telegraph is over.
else if (OldVelocity == Vector2.Zero)
@@ -81,7 +80,7 @@ namespace CalamityMod.Projectiles.Boss
OldVelocity = projectile.velocity;
projectile.velocity = Vector2.Zero;
projectile.netUpdate = true;
projectile.rotation = OldVelocity.ToRotation() + 1.57f;
projectile.rotation = OldVelocity.ToRotation() + MathHelper.PiOver2;
}
TelegraphDelay++;
}
+11 -11
View File
@@ -45,16 +45,6 @@ namespace CalamityMod.Projectiles.Boss
Lighting.AddLight(projectile.Center, 0.5f, 0.25f, 0f);
float num953 = revenge ? 110f : 100f;
float scaleFactor12 = revenge ? 50f : 40f;
if (projectile.ai[1] == 1f)
{
num953 *= 0.7f;
scaleFactor12 *= 0.7f;
}
float num954 = 40f;
if (projectile.timeLeft > 30 && projectile.alpha > 0)
{
projectile.alpha -= 25;
@@ -68,9 +58,19 @@ namespace CalamityMod.Projectiles.Boss
projectile.alpha = 0;
}
if (projectile.timeLeft > 120 && projectile.ai[1] == 1f)
if (projectile.timeLeft > 135 && projectile.ai[1] == 1f)
return;
float num953 = revenge ? 110f : 100f;
float num954 = 40f;
float scaleFactor12 = revenge ? 50f : 40f;
if (projectile.ai[1] == 1f)
{
num953 *= 0.7f;
scaleFactor12 *= 0.7f;
}
int num959 = (int)projectile.ai[0];
if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead)
{
+48 -5
View File
@@ -52,9 +52,10 @@ namespace CalamityMod.Projectiles
public float spawnedPlayerMinionDamageValue = 1f;
public int spawnedPlayerMinionProjectileDamageValue = 0;
public int defDamage = 0;
public int defCrit = 0;
// Rogue Stuff
public bool stealthStrike = false; //Update all existing rogue weapons with this
// Rogue Stuff
public bool stealthStrike = false; //Update all existing rogue weapons with this
public bool momentumCapacitatorBoost = false; //Constant acceleration
// Iron Heart
@@ -76,6 +77,18 @@ namespace CalamityMod.Projectiles
switch (projectile.type)
{
case ProjectileID.ShadowBeamHostile:
projectile.timeLeft = 60;
break;
case ProjectileID.LostSoulHostile:
projectile.tileCollide = true;
break;
case ProjectileID.NebulaLaser:
projectile.extraUpdates = 1;
break;
case ProjectileID.StarWrath:
projectile.penetrate = projectile.maxPenetrate = 1;
break;
@@ -988,7 +1001,23 @@ namespace CalamityMod.Projectiles
#region PostAI
public override void PostAI(Projectile projectile)
{
int x = (int)(projectile.Center.X / 16f);
Player player = Main.player[projectile.owner];
CalamityPlayer modPlayer = player.Calamity();
// Set crit here to avoid issues with projectiles that change class types in PreAI and AI
if (defCrit == 0 && !projectile.npcProj && !projectile.trap)
{
if (projectile.melee)
defCrit = player.meleeCrit;
else if (projectile.ranged)
defCrit = player.rangedCrit;
else if (projectile.magic)
defCrit = player.magicCrit;
else if (rogue)
defCrit = modPlayer.throwingCrit;
}
int x = (int)(projectile.Center.X / 16f);
int y = (int)(projectile.Center.Y / 16f);
for (int i = x - 1; i <= x + 1; i++)
{
@@ -1022,8 +1051,22 @@ namespace CalamityMod.Projectiles
Player player = Main.player[projectile.owner];
CalamityPlayer modPlayer = player.Calamity();
if (projectile.owner == Main.myPlayer && !projectile.npcProj && !projectile.trap && rogue && stealthStrike && modPlayer.stealthStrikeAlwaysCrits)
crit = true;
if (projectile.owner == Main.myPlayer && !projectile.npcProj && !projectile.trap)
{
int critChance = (int)MathHelper.Clamp(1, 100, 100 - defCrit);
crit = Main.rand.NextBool(critChance + 1);
if ((uint)(projectile.type - ProjectileID.DD2LightningAuraT1) <= 2u)
{
if (player.setMonkT3)
crit = Main.rand.NextBool(4);
else if (player.setMonkT2)
crit = Main.rand.NextBool(6);
}
if (rogue && stealthStrike && modPlayer.stealthStrikeAlwaysCrits)
crit = true;
}
}
#endregion