Merge branch 'master' into fixes-and-balancing

This commit is contained in:
termigator1359 committed 2020-06-29 23:49:13 -04:00
commit d820a2f88d
10 files changed
+64 -68

No files matched your search

+3 -4
View File
@@ -5811,7 +5811,7 @@ namespace CalamityMod.CalPlayer
}
else
{
float amount = npc.velocity.Length() / (npc.Calamity().maxVelocity * 0.4f);
float amount = npc.velocity.Length() / (npc.Calamity().maxVelocity * 0.5f);
if (amount > 1f)
amount = 1f;
@@ -5904,7 +5904,7 @@ namespace CalamityMod.CalPlayer
if (DRStat > 0)
contactDamageReduction *= 1f - (DRStat * 0.01f);
contactDamageReduction = 1D - (1D / (1D + contactDamageReduction));
contactDamageReduction = 1D / (1D + contactDamageReduction);
damage = (int)(damage * contactDamageReduction);
}
@@ -6133,7 +6133,7 @@ namespace CalamityMod.CalPlayer
if (DRStat > 0)
projectileDamageReduction *= 1f - (DRStat * 0.01f);
projectileDamageReduction = 1D - (1D / (1D + projectileDamageReduction));
projectileDamageReduction = 1D / (1D + projectileDamageReduction);
damage = (int)(damage * projectileDamageReduction);
}
@@ -9285,7 +9285,6 @@ namespace CalamityMod.CalPlayer
#endregion
#region Drawing
public static readonly PlayerLayer MiscEffectsBack = new PlayerLayer("CalamityMod", "MiscEffectsBack", PlayerLayer.MiscEffectsBack, delegate (PlayerDrawInfo drawInfo)
{
if (drawInfo.shadow != 0f)
+2 -2
View File
@@ -132,8 +132,8 @@ namespace CalamityMod
// Boss velocity scaling data structure
public static SortedDictionary<int, float> bossVelocityDamageScaleValues;
public const float velocityScaleMin = 0.6f;
public const float bitingEnemeyVelocityScale = 0.9f;
public const float velocityScaleMin = 0.5f;
public const float bitingEnemeyVelocityScale = 0.8f;
// Lists
public static IList<string> donatorList;
+4 -4
View File
@@ -3516,7 +3516,7 @@ namespace CalamityMod.NPCs
tileEnrageMult += (800 - nearbyActiveTiles) * 0.001f; // Ranges from 1f to 1.8f
// Increase projectile fire rate based on number of nearby active tiles
float projectileFireRateMultiplier = MathHelper.Lerp(1f, 2f, 1f - ((tileEnrageMult - 1f) / 0.8f));
float projectileFireRateMultiplier = MathHelper.Lerp(1f, 4f, 1f - ((tileEnrageMult - 1f) / 0.8f));
// Increase damage of projectiles and contact damage based on number of nearby active tiles
int damageIncrease = 0;
@@ -3534,7 +3534,7 @@ namespace CalamityMod.NPCs
num474 *= 1.25f;
npc.ai[0] += 1f;
if (npc.ai[0] >= 60f * projectileFireRateMultiplier)
if (npc.ai[0] >= 45f * projectileFireRateMultiplier)
{
npc.ai[0] = 0f;
@@ -3586,7 +3586,7 @@ namespace CalamityMod.NPCs
if (calamityGlobalNPC.enraged > 0 || (CalamityConfig.Instance.BossRushXerocCurse && CalamityWorld.bossRushActive))
calamityGlobalNPC.newAI[1] += 2f;
if (calamityGlobalNPC.newAI[1] >= 900f * projectileFireRateMultiplier)
if (calamityGlobalNPC.newAI[1] >= 600f * projectileFireRateMultiplier)
{
calamityGlobalNPC.newAI[1] = 0f;
int damage = (expertMode ? CalamityUtils.GetMasterModeProjectileDamage(50, 1.5) : 60) + damageIncrease;
@@ -3603,7 +3603,7 @@ namespace CalamityMod.NPCs
int num946 = ModContent.ProjectileType<DoGBeamPortal>();
vector104.X += num942 * 5f;
vector104.Y += num943 * 5f;
int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, num946, damage, 0f, Main.myPlayer, 0f, 0f);
int num947 = Projectile.NewProjectile(vector104.X, vector104.Y, num942, num943, num946, damage, 0f, Main.myPlayer, tileEnrageMult, 0f);
Main.projectile[num947].timeLeft = 300;
npc.netUpdate = true;
}
+3 -3
View File
@@ -218,9 +218,9 @@ namespace CalamityMod.NPCs
{ NPCID.GolemFistLeft, 250000 },
{ NPCID.GolemFistRight, 250000 },
{ NPCID.EaterofWorldsHead, 2500000 }, // 30 seconds
{ NPCID.EaterofWorldsBody, 2500000 },
{ NPCID.EaterofWorldsTail, 2500000 },
{ NPCID.EaterofWorldsHead, 15000000 }, // 30 seconds
{ NPCID.EaterofWorldsBody, 15000000 },
{ NPCID.EaterofWorldsTail, 15000000 },
// Tier 2
{ NPCID.TheDestroyer, 2500000 }, // 30 seconds + immunity timer at start
+8 -2
View File
@@ -214,6 +214,7 @@ namespace CalamityMod.NPCs.Providence
// Phase times
float phaseTime = nightTime ? 240f : 300f;
float crystalPhaseTime = nightTime ? 60f : 120f;
int nightCrystalTime = 210;
float attackDelayAfterCocoon = 90f;
// Phases
@@ -1190,9 +1191,14 @@ namespace CalamityMod.NPCs.Providence
if (npc.ai[1] >= crystalPhaseTime)
{
if (npc.ai[1] == crystalPhaseTime && Main.netMode != NetmodeID.MultiplayerClient)
Projectile.NewProjectile(player.Center.X, player.Center.Y - 360f, 0f, 0f, ModContent.ProjectileType<ProvidenceCrystal>(), crystalDamage, 0f, player.whoAmI, 0f, 0f);
{
int proj = Projectile.NewProjectile(player.Center.X, player.Center.Y - 360f, 0f, 0f, ModContent.ProjectileType<ProvidenceCrystal>(), crystalDamage, 0f, player.whoAmI, 0f, 0f);
if (npc.ai[1] >= crystalPhaseTime + 210f || !nightTime)
if (nightTime)
Main.projectile[proj].timeLeft = nightCrystalTime;
}
if (npc.ai[1] >= crystalPhaseTime + nightCrystalTime || !nightTime)
npc.ai[0] = -1f;
}
}
+2 -2
View File
@@ -561,10 +561,10 @@ namespace CalamityMod.NPCs.Ravager
float amount = death ? 1f : 1f - lifeRatio;
Vector2 targetVector = player.position;
float aimY = targetVector.Y - 320f;
if (npc.ai[0] == 2f && npc.ai[1] == 0f)
{
float aimY = targetVector.Y - 320f;
if (npc.Top.Y > aimY)
{
if (npc.velocity.Y > 0f)
@@ -584,7 +584,7 @@ namespace CalamityMod.NPCs.Ravager
if (Math.Abs(player.velocity.X) < 0.5f)
npc.Calamity().newAI[2] = 0f;
if ((npc.position.X < targetVector.X + offset && npc.position.X + npc.width > targetVector.X + player.width + offset) || npc.ai[1] > 0f)
if ((npc.position.X < targetVector.X + offset && npc.position.X + npc.width > targetVector.X + player.width + offset && (npc.Top.Y <= aimY || npc.ai[0] != 2f)) || npc.ai[1] > 0f)
{
if (npc.ai[0] == 2f)
{
+31 -34
View File
@@ -56,43 +56,40 @@ namespace CalamityMod.Projectiles.Boss
if (beamTimer <= 0)
{
Main.PlaySound(SoundID.Item33, (int)projectile.position.X, (int)projectile.position.Y);
float spread = 30f * 0.0174f;
double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2;
double deltaAngle = spread / 8f;
double offsetAngle;
int i;
if (projectile.owner == Main.myPlayer)
{
for (i = 0; i < 4; i++)
{
float speed = 4f;
int seeProjFileforDmg = 0;
if (CalamityWorld.death)
{
speed = 7f;
}
else if (CalamityWorld.revenge)
{
speed = 6f;
}
else if (Main.expertMode)
{
speed = 5f;
}
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * speed), (float)(Math.Cos(offsetAngle) * speed), ModContent.ProjectileType<DoGBeam>(), seeProjFileforDmg, projectile.knockBack, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * speed), (float)(-Math.Cos(offsetAngle) * speed), ModContent.ProjectileType<DoGBeam>(), seeProjFileforDmg, projectile.knockBack, projectile.owner, 0f, 0f);
}
}
if (projectile.owner == Main.myPlayer)
{
float speed = 3f;
int seeProjFileforDmg = 0;
if (CalamityWorld.death)
{
speed = 5f;
}
else if (CalamityWorld.revenge)
{
speed = 4.5f;
}
else if (Main.expertMode)
{
speed = 4f;
}
speed *= projectile.ai[0];
int totalProjectiles = 8;
float radians = MathHelper.TwoPi / totalProjectiles;
for (int i = 0; i < totalProjectiles; i++)
{
Vector2 vector255 = new Vector2(0f, -speed).RotatedBy(radians * i);
Projectile.NewProjectile(projectile.Center, vector255, ModContent.ProjectileType<DoGBeam>(), seeProjFileforDmg, 0f, projectile.owner, 0f, 0f);
}
}
beamTimer = 180;
}
int num103 = (int)Player.FindClosest(projectile.Center, 1, 1);
int num103 = Player.FindClosest(projectile.Center, 1, 1);
float scaleFactor2 = projectile.velocity.Length();
Vector2 vector11 = Main.player[num103].Center - projectile.Center;
if (Vector2.Distance(Main.player[num103].Center, projectile.Center) > 2000f)
{
projectile.position.X = (float)(Main.player[num103].Center.X / 16) * 16f - (float)(projectile.width / 2);
projectile.position.Y = (float)(Main.player[num103].Center.Y / 16) * 16f - (float)(projectile.height / 2) - 250f;
projectile.position.X = Main.player[num103].Center.X / 16 * 16f - (projectile.width / 2);
projectile.position.Y = Main.player[num103].Center.Y / 16 * 16f - (projectile.height / 2) - 250f;
projectile.ai[1] = 0f;
beamTimer = 90;
}
@@ -112,7 +109,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 < 60; num623++)
@@ -142,8 +139,8 @@ namespace CalamityMod.Projectiles.Boss
if (projectile.timeLeft < 85)
{
byte b2 = (byte)(projectile.timeLeft * 3);
byte a2 = (byte)(100f * ((float)b2 / 255f));
return new Color((int)b2, (int)b2, (int)b2, (int)a2);
byte a2 = (byte)(100f * (b2 / 255f));
return new Color(b2, b2, b2, a2);
}
return new Color(255, 255, 255, 100);
}
+5 -7
View File
@@ -45,13 +45,11 @@ namespace CalamityMod.Projectiles.Boss
if (projectile.velocity.Length() < 16f)
projectile.velocity *= 1.01f;
int num487 = Player.FindClosest(projectile.position, projectile.width, projectile.height);
Vector2 vector36 = new Vector2(projectile.position.X + projectile.width * 0.5f, projectile.position.Y + projectile.height * 0.5f);
float num489 = Main.player[num487].Center.X - vector36.X;
float num490 = Main.player[num487].Center.Y - vector36.Y;
float num491 = (float)Math.Sqrt(num489 * num489 + num490 * num490);
projectile.ai[1] = Player.FindClosest(projectile.position, projectile.width, projectile.height);
int num487 = (int)projectile.ai[1];
float num491 = Vector2.Distance(Main.player[num487].Center, projectile.Center);
if (num491 < 50f && projectile.position.X < Main.player[num487].position.X + Main.player[num487].width && projectile.position.X + projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + Main.player[num487].height && projectile.position.Y + projectile.height > Main.player[num487].position.Y)
if (num491 < 50f && !Main.player[num487].dead && projectile.position.X < Main.player[num487].position.X + Main.player[num487].width && projectile.position.X + projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + Main.player[num487].height && projectile.position.Y + projectile.height > Main.player[num487].position.Y)
{
int num492 = expertMode ? -150 : -100;
if (CalamityWorld.death || CalamityWorld.bossRushActive)
@@ -69,7 +67,7 @@ namespace CalamityMod.Projectiles.Boss
{
Main.player[num487].KillMe(PlayerDeathReason.ByCustomReason(Main.player[Main.myPlayer].name + " burst into sinless ash."), 1000.0, 0, false);
}
NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, num487, num492, 0f, 0f, 0, 0, 0);
NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, num487, num492);
projectile.Kill();
}
}
+6 -7
View File
@@ -41,12 +41,11 @@ namespace CalamityMod.Projectiles.Boss
if (projectile.velocity.Length() < 16f)
projectile.velocity *= 1.01f;
int num487 = Player.FindClosest(projectile.position, projectile.width, projectile.height);
Vector2 vector36 = new Vector2(projectile.position.X + projectile.width * 0.5f, projectile.position.Y + projectile.height * 0.5f);
float num489 = Main.player[num487].Center.X - vector36.X;
float num490 = Main.player[num487].Center.Y - vector36.Y;
float num491 = (float)Math.Sqrt(num489 * num489 + num490 * num490);
if (num491 < 50f && projectile.position.X < Main.player[num487].position.X + Main.player[num487].width && projectile.position.X + projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + Main.player[num487].height && projectile.position.Y + projectile.height > Main.player[num487].position.Y)
projectile.ai[1] = Player.FindClosest(projectile.position, projectile.width, projectile.height);
int num487 = (int)projectile.ai[1];
float num491 = Vector2.Distance(Main.player[num487].Center, projectile.Center);
if (num491 < 50f && !Main.player[num487].dead && projectile.position.X < Main.player[num487].position.X + Main.player[num487].width && projectile.position.X + projectile.width > Main.player[num487].position.X && projectile.position.Y < Main.player[num487].position.Y + Main.player[num487].height && projectile.position.Y + projectile.height > Main.player[num487].position.Y)
{
int num492 = expertMode ? 50 : 35;
Main.player[num487].HealEffect(num492, false);
@@ -55,7 +54,7 @@ namespace CalamityMod.Projectiles.Boss
{
Main.player[num487].statLife = Main.player[num487].statLifeMax2;
}
NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, num487, num492, 0f, 0f, 0, 0, 0);
NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, num487, num492);
projectile.Kill();
}
}
-3
View File
@@ -48,9 +48,6 @@ namespace CalamityMod.Projectiles.Boss
return;
}
if (!Main.dayTime)
projectile.timeLeft -= CalamityWorld.death ? 9 : 16;
projectile.position.X = Main.player[projectile.owner].Center.X - (projectile.width / 2);
projectile.position.Y = Main.player[projectile.owner].Center.Y - (projectile.height / 2) + Main.player[projectile.owner].gfxOffY - 360f;
if (Main.player[projectile.owner].gravDir == -1f)