diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 5995089836..3482524556 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -280,7 +280,7 @@ namespace CalamityMod.CalPlayer } // If Revengeance Mode is not active, then set rippers to zero - else if(player.whoAmI == Main.myPlayer) + else if (player.whoAmI == Main.myPlayer) { modPlayer.rage = 0; modPlayer.adrenaline = 0; @@ -578,7 +578,7 @@ namespace CalamityMod.CalPlayer Vector2 velocity = new Vector2(windVelocity * 0.2f, 3f * Main.rand.NextFloat()); if (player.miscCounter % divisor == 0 && Main.rand.NextBool(3)) - Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), 20, 0f, player.whoAmI, 1f, 0f); + Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), 20, 0f, player.whoAmI, 2f, 0f); } } else diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 0c95a6bc4c..830a1f5fed 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -167,12 +167,9 @@ namespace CalamityMod.NPCs.Cryogen npc.rotation = npc.velocity.X * 0.1f; } - if (!Main.raining && !CalamityWorld.bossRushActive) - { - CalamityUtils.StartRain(); - } + CalamityMod.StopRain(); - if (!player.active || player.dead) + if (!player.active || player.dead) { npc.TargetClosest(false); player = Main.player[npc.target]; diff --git a/NPCs/Cryogen/CryogenIce.cs b/NPCs/Cryogen/CryogenIce.cs index 8064b30814..95e383fc06 100644 --- a/NPCs/Cryogen/CryogenIce.cs +++ b/NPCs/Cryogen/CryogenIce.cs @@ -37,12 +37,12 @@ namespace CalamityMod.NPCs.Cryogen public override void AI() { - npc.alpha -= 3; + npc.alpha -= 3; if (npc.alpha < 0) - { npc.alpha = 0; - } + npc.rotation += 0.15f; + if (npc.type == ModContent.NPCType()) { int num989 = (int)npc.ai[0]; @@ -52,7 +52,7 @@ namespace CalamityMod.NPCs.Cryogen npc.position = Main.npc[num989].Center; npc.position.X = npc.position.X - (float)(npc.width / 2); npc.position.Y = npc.position.Y - (float)(npc.height / 2); - npc.gfxOffY = Main.npc[num989].gfxOffY; + npc.gfxOffY = Main.npc[num989].gfxOffY + 14; return; } npc.life = 0; diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index c703b8ec88..13b1eed45c 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -610,7 +610,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } if (bulletHellCounter2 % 240 == 0) //fireblasts from above { - Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 1f, 0f); + Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } bulletHellCounter += 1; if (bulletHellCounter > (enraged ? 9 : 11)) @@ -679,7 +679,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } if (bulletHellCounter2 % 240 == 0) //fireblasts from above { - Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 1f, 0f); + Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } if (bulletHellCounter2 % 225 == 0) //giant homing fireballs { @@ -753,7 +753,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } if (bulletHellCounter2 % 360 == 0) //fireblasts from above { - Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 1f, 0f); + Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); } if (bulletHellCounter2 % 30 == 0) //projectiles that move in wave pattern { @@ -2241,7 +2241,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) { - return !CalamityUtils.AntiButcher(npc, ref damage, 0.1f); + return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f); } public override bool CheckActive() diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index b079d4f534..83849aeff2 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -3072,7 +3072,7 @@ namespace CalamityMod.NPCs.Yharon #region StrikeNPC public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) { - if (CalamityUtils.AntiButcher(npc, ref damage, 0.1f)) + if (CalamityUtils.AntiButcher(npc, ref damage, 0.5f)) return false; // Safeguard to prevent damage which would allow skipping phase 2. diff --git a/Projectiles/Boss/BrimstoneFireblast.cs b/Projectiles/Boss/BrimstoneFireblast.cs index 67e19569ed..245f83dfb9 100644 --- a/Projectiles/Boss/BrimstoneFireblast.cs +++ b/Projectiles/Boss/BrimstoneFireblast.cs @@ -21,7 +21,6 @@ namespace CalamityMod.Projectiles.Boss projectile.height = 50; projectile.hostile = true; projectile.ignoreWater = true; - projectile.tileCollide = false; projectile.penetrate = 1; projectile.alpha = 120; cooldownSlot = 1; @@ -29,10 +28,6 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - if (projectile.ai[0] == 1f) - { - projectile.tileCollide = true; - } projectile.frameCounter++; if (projectile.frameCounter > 4) { @@ -48,7 +43,7 @@ namespace CalamityMod.Projectiles.Boss { projectile.Kill(); } - Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.9f / 255f, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0f / 255f); + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.9f / 255f, 0f, 0f); projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; if (projectile.ai[1] == 0f) { diff --git a/Projectiles/Boss/BrimstoneMonster.cs b/Projectiles/Boss/BrimstoneMonster.cs index b157c40f23..690c378bff 100644 --- a/Projectiles/Boss/BrimstoneMonster.cs +++ b/Projectiles/Boss/BrimstoneMonster.cs @@ -134,24 +134,24 @@ namespace CalamityMod.Projectiles.Boss } // Fly away from other brimstone monsters - float num1247 = 0.5f; - for (int num1248 = 0; num1248 < Main.maxProjectiles; num1248++) + float velocity = 0.1f; + for (int i = 0; i < Main.maxProjectiles; i++) { - if (Main.projectile[num1248].active) + if (Main.projectile[i].active) { - if (num1248 != projectile.whoAmI && Main.projectile[num1248].type == projectile.type) + if (i != projectile.whoAmI && Main.projectile[i].type == projectile.type) { - if (Vector2.Distance(projectile.Center, Main.projectile[num1248].Center) < 320f) + if (Vector2.Distance(projectile.Center, Main.projectile[i].Center) < 320f) { - if (projectile.position.X < Main.projectile[num1248].position.X) - projectile.velocity.X -= num1247; + if (projectile.position.X < Main.projectile[i].position.X) + projectile.velocity.X -= velocity; else - projectile.velocity.X += num1247; + projectile.velocity.X += velocity; - if (projectile.position.Y < Main.projectile[num1248].position.Y) - projectile.velocity.Y -= num1247; + if (projectile.position.Y < Main.projectile[i].position.Y) + projectile.velocity.Y -= velocity; else - projectile.velocity.Y += num1247; + projectile.velocity.Y += velocity; } } } diff --git a/Projectiles/Boss/IceRain.cs b/Projectiles/Boss/IceRain.cs index 62a760667e..1d66e1582c 100644 --- a/Projectiles/Boss/IceRain.cs +++ b/Projectiles/Boss/IceRain.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using System; using System.IO; using Terraria; using Terraria.ID; @@ -15,7 +16,6 @@ namespace CalamityMod.Projectiles.Boss public override void SetDefaults() { - projectile.aiStyle = 1; projectile.width = 12; projectile.height = 12; projectile.hostile = true; @@ -35,10 +35,25 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { Lighting.AddLight((int)((projectile.position.X + (float)(projectile.width / 2)) / 16f), (int)((projectile.position.Y + (float)(projectile.height / 2)) / 16f), 0.01f, 0.25f, 0.25f); - if (projectile.ai[0] == 0f) - projectile.velocity.Y = projectile.velocity.Y + 0.2f; - if (projectile.localAI[0] == 0f || projectile.localAI[0] == 2f) + if (projectile.ai[0] != 2f) + projectile.aiStyle = 1; + + if (projectile.ai[0] == 0f) + { + projectile.velocity.Y += 0.2f; + } + else if (projectile.ai[0] == 2f) + { + projectile.velocity.Y += 0.1f; + + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + + if (projectile.velocity.Y > 6f) + projectile.velocity.Y = 6f; + } + + if (projectile.localAI[0] == 0f) { projectile.scale += 0.01f; projectile.alpha -= 50; @@ -48,13 +63,13 @@ namespace CalamityMod.Projectiles.Boss projectile.alpha = 0; } } - else if (projectile.localAI[0] == 1f) + else { projectile.scale -= 0.01f; projectile.alpha += 50; if (projectile.alpha >= 255) { - projectile.localAI[0] = 2f; + projectile.localAI[0] = 0f; projectile.alpha = 255; } } @@ -68,7 +83,6 @@ namespace CalamityMod.Projectiles.Boss public override void Kill(int timeLeft) { Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 27, 0.25f); - //Main.PlaySound(SoundID.Item27, projectile.position); for (int num373 = 0; num373 < 3; num373++) { int num374 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 76, 0f, 0f, 0, default, 1f); diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 089664b141..e1bb089af7 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1043,7 +1043,7 @@ namespace CalamityMod.Projectiles if (player.ghostHeal) { float num = 0.1f; - num -= projectile.numHits * 0.05f; + num -= projectile.numHits * 0.025f; if (num < 0f) num = 0f; @@ -1122,7 +1122,7 @@ namespace CalamityMod.Projectiles if (!CanSpawnLifeStealProjectile(projectile, healMult, heal)) goto OTHEREFFECTS; - Main.player[Main.myPlayer].lifeSteal -= heal * 3f; + Main.player[Main.myPlayer].lifeSteal -= heal * 6f; int healAmount = (int)heal; player.statLife += healAmount; player.HealEffect(healAmount); diff --git a/Projectiles/Environment/LightningMark.cs b/Projectiles/Environment/LightningMark.cs index c1e4a22a78..b3971032e5 100644 --- a/Projectiles/Environment/LightningMark.cs +++ b/Projectiles/Environment/LightningMark.cs @@ -85,6 +85,12 @@ namespace CalamityMod.Projectiles.Environment projectile.velocity.Y = 16f; } + public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough) + { + fallThrough = false; + return true; + } + public override bool OnTileCollide(Vector2 oldVelocity) { return false;