From 6a3031f8902431fd8f6b4cf8f1040c0dfb166762 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 2 Aug 2024 09:42:38 +0700 Subject: [PATCH 01/16] dark spark turns brighter (faster!) --- Projectiles/Magic/DarkSparkBeam.cs | 148 +++++++++++------------------ 1 file changed, 56 insertions(+), 92 deletions(-) diff --git a/Projectiles/Magic/DarkSparkBeam.cs b/Projectiles/Magic/DarkSparkBeam.cs index 99543487e8..32a30db723 100644 --- a/Projectiles/Magic/DarkSparkBeam.cs +++ b/Projectiles/Magic/DarkSparkBeam.cs @@ -58,82 +58,46 @@ namespace CalamityMod.Projectiles.Magic float laserNormalize; Vector2 projDirection = Vector2.Zero; float laserTimer; - float y; + float yOffset; float laserRotationSpeed; float scaleFactor6; - Color color = new Color(1, 1, 1, 127); + Color color = GetBeamColor((int)projectile2.ai[0], (int)Projectile.ai[0]); Projectile.Opacity = 1f; - if (projectile2.ai[0] < 720f) + if (projectile2.ai[0] < 360f) { - laserTimer = projectile2.ai[0] / 1440f; - y = 6f + projectile2.ai[0] / 720f * 7f; - if (projectile2.ai[0] > 360f) - { - int colorValue = (int)((0.01f + ((projectile2.ai[0] - 360f) / 360f * 2.55f)) * 100f); - color = new Color(colorValue, colorValue, colorValue, 127); - } - - if (projectile2.ai[0] < 480f) + laserTimer = projectile2.ai[0] / 720f; + yOffset = 6f + projectile2.ai[0] / 360f * 7f; + if (projectile2.ai[0] < 240f) laserRotationSpeed = 1.75f; else - laserRotationSpeed = 3f + 5f * ((projectile2.ai[0] - 480f) / 240f); - - scaleFactor6 = -2f - projectile2.ai[0] / 720f * 5f; + laserRotationSpeed = 3f + 5f * ((projectile2.ai[0] - 240f) / 120f); + scaleFactor6 = -2f - projectile2.ai[0] / 360f * 5f; } else { - float colorLimit = projectile2.ai[0] - 720f; - if (colorLimit > 255f) - colorLimit = 255f; - - switch ((int)Projectile.ai[0]) //R O Y G B I V - { - case 0: - color = new Color(255, 255 - (int)colorLimit, 255 - (int)colorLimit, 127); - break; - case 1: - color = new Color(255, 255 - (int)(colorLimit * 0.3529412f), 255 - (int)colorLimit, 127); - break; - case 2: - color = new Color(255, 255, 255 - (int)colorLimit, 127); - break; - case 3: - color = new Color(255 - (int)colorLimit, 255 - (int)(colorLimit * 0.5f), 255 - (int)colorLimit, 127); - break; - case 4: - color = new Color(255 - (int)colorLimit, 255 - (int)colorLimit, 255, 127); - break; - case 5: - color = new Color(255 - (int)(colorLimit * 0.7058824f), 255 - (int)colorLimit, 255 - (int)(colorLimit * 0.4901961), 127); - break; - case 6: - color = new Color(255 - (int)(colorLimit * 0.0666667f), 255 - (int)(colorLimit * 0.4901961), 255 - (int)(colorLimit * 0.0666667f), 127); - break; - } - laserTimer = 0.5f; laserRotationSpeed = 10.875f; - y = 13f; + yOffset = 13f; scaleFactor6 = -7f; } float laserDirection = (projectile2.ai[0] + laserPosition * laserRotationSpeed) / (laserRotationSpeed * 6f) * MathHelper.TwoPi; laserNormalize = Vector2.UnitY.RotatedBy(laserDirection).Y * (MathHelper.Pi / 6) * laserTimer * 0.33f; - projDirection = (Vector2.UnitY.RotatedBy(laserDirection) * new Vector2(4f, y)).RotatedBy(projectile2.velocity.ToRotation()); + projDirection = (Vector2.UnitY.RotatedBy(laserDirection) * new Vector2(4f, yOffset)).RotatedBy(projectile2.velocity.ToRotation()); Projectile.position = projectile2.Center + aimDirection * 16f - Projectile.Size / 2f + new Vector2(0f, -Main.projectile[(int)Projectile.ai[1]].gfxOffY); Projectile.position += projectile2.velocity.ToRotation().ToRotationVector2() * scaleFactor6; Projectile.position += projDirection; Projectile.velocity = Vector2.Normalize(projectile2.velocity).RotatedBy(laserNormalize); Projectile.scale = 1.5f * (1.5f - laserTimer); - // Takes 360 frames to reach normal damage - float amount = projectile2.ai[0] / 1200f; + // Takes 180 frames to reach normal damage + float amount = projectile2.ai[0] / 600f; if (amount > 1f) amount = 1f; Projectile.damage = (int)(projectile2.damage * MathHelper.Lerp(0.25f, 2.2f, amount)); - if (projectile2.ai[0] >= 720f) + if (projectile2.ai[0] >= 360f) chargeUpCenter = new Vector2?(projectile2.Center); if (!Collision.CanHitLine(Main.player[Projectile.owner].Center, 0, 0, projectile2.Center, 0, 0)) @@ -212,55 +176,15 @@ namespace CalamityMod.Projectiles.Magic Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; float drawArea = Projectile.localAI[1]; Projectile projectile2 = Main.projectile[(int)Projectile.ai[1]]; - Color color = new Color(1, 1, 1, 127); - if (projectile2.ai[0] < 720f) - { - if (projectile2.ai[0] > 360f) - { - int colorValue = (int)((0.01f + ((projectile2.ai[0] - 360f) / 360f * 2.55f)) * 100f); - color = new Color(colorValue, colorValue, colorValue, 127); - } - } - else - { - float colorLimit = projectile2.ai[0] - 720f; - if (colorLimit > 255f) - { - colorLimit = 255f; - } - switch ((int)Projectile.ai[0]) //R O Y G B I V - { - case 0: - color = new Color(255, 255 - (int)colorLimit, 255 - (int)colorLimit, 127); - break; - case 1: - color = new Color(255, 255 - (int)(colorLimit * 0.3529412f), 255 - (int)colorLimit, 127); - break; - case 2: - color = new Color(255, 255, 255 - (int)colorLimit, 127); - break; - case 3: - color = new Color(255 - (int)colorLimit, 255 - (int)(colorLimit * 0.5f), 255 - (int)colorLimit, 127); - break; - case 4: - color = new Color(255 - (int)colorLimit, 255 - (int)colorLimit, 255, 127); - break; - case 5: - color = new Color(255 - (int)(colorLimit * 0.7058824f), 255 - (int)colorLimit, 255 - (int)(colorLimit * 0.4901961), 127); - break; - case 6: - color = new Color(255 - (int)(colorLimit * 0.0666667f), 255 - (int)(colorLimit * 0.4901961), 255 - (int)(colorLimit * 0.0666667f), 127); - break; - } - } + Color color = GetBeamColor((int)projectile2.ai[0], (int)Projectile.ai[0]); - Color value25 = color; + Vector2 drawStart = Projectile.Center.Floor(); drawStart += Projectile.velocity * Projectile.scale * 10.5f; drawArea -= Projectile.scale * 14.5f * Projectile.scale; Vector2 drawScale = new Vector2(Projectile.scale); DelegateMethods.f_1 = 1f; - DelegateMethods.c_1 = value25 * 0.75f * Projectile.Opacity; + DelegateMethods.c_1 = color * 0.75f * Projectile.Opacity; Vector2 projPos = Projectile.oldPos[0]; projPos = new Vector2(Projectile.width, Projectile.height) / 2f + Vector2.UnitY * Projectile.gfxOffY - Main.screenPosition; Utils.DrawLaser(Main.spriteBatch, tex, drawStart - Main.screenPosition, drawStart + Projectile.velocity * drawArea - Main.screenPosition, drawScale, new Utils.LaserLineFraming(DelegateMethods.RainbowLaserDraw)); @@ -269,6 +193,46 @@ namespace CalamityMod.Projectiles.Magic return false; } + public Color GetBeamColor(int timer, int type) + { + Color color = Color.Black; + if (timer < 360f) + { + float brightness = MathHelper.Clamp(timer / 180f, 0f, 1f); + color = Color.Lerp(Color.Black, Color.White, brightness); + } + else + { + float hue = 0f; + switch (type) + { + case 1: // 30 (Orange) + hue = 1f / 12f; + break; + case 2: // 60 (Yellow) + hue = 1f / 6f; + break; + case 3: // 120 (Green) + hue = 1f / 3f; + break; + case 4: // 210 (Blue) + hue = 7f / 12f; + break; + case 5: // 270 (Purple) + hue = 3f / 4f; + break; + case 0: // 0 (Red) + default: + hue = 0f; + break; + } + float lightness = 1f - (MathHelper.Clamp((timer - 360f) / 240f, 0f, 1f) * 0.4f); + color = Main.hslToRgb(hue, 1f, lightness); + } + color.A = 127; + return color; + } + public override void CutTiles() { DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; From 00b55d026b95be3d2b6e2831b030ef46d18fcdff Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 2 Aug 2024 20:47:24 +0700 Subject: [PATCH 02/16] GFB prov colour syncing this stopped working for whatever reason also negative healing hell is back as intended profaned guardians is a mess rn but hope that can be dealt with later --- NPCs/CalamityGlobalNPC.cs | 2 +- .../ProfanedGuardianCommander.cs | 7 +- .../ProfanedGuardianDefender.cs | 4 +- .../ProfanedGuardianHealer.cs | 4 +- NPCs/Providence/ProvSpawnDefense.cs | 7 +- NPCs/Providence/ProvSpawnHealer.cs | 7 +- NPCs/Providence/ProvSpawnOffense.cs | 7 +- NPCs/Providence/Providence.cs | 370 ++++++++---------- Projectiles/Boss/HolyAura.cs | 6 +- Projectiles/Boss/HolyBlast.cs | 55 +-- Projectiles/Boss/HolyBomb.cs | 53 +-- Projectiles/Boss/HolyBurnOrb.cs | 49 +-- Projectiles/Boss/HolyFire.cs | 46 +-- Projectiles/Boss/HolyFire2.cs | 46 +-- Projectiles/Boss/HolyFlare.cs | 50 +-- Projectiles/Boss/HolySpear.cs | 170 +++----- Projectiles/Boss/MoltenBlast.cs | 49 +-- Projectiles/Boss/MoltenBlob.cs | 44 +-- Projectiles/Boss/ProfanedSpear.cs | 22 +- Projectiles/Boss/ProvidenceCrystal.cs | 6 +- Projectiles/Boss/ProvidenceCrystalShard.cs | 29 +- Projectiles/Boss/ProvidenceHolyRay.cs | 47 +-- Projectiles/Boss/SwirlingFire.cs | 21 +- Projectiles/Summon/MiniGuardianAttack.cs | 3 +- Projectiles/Summon/MiniGuardianDefense.cs | 4 +- Projectiles/Summon/MiniGuardianHealer.cs | 4 +- Projectiles/Summon/MiniGuardianHolyRay.cs | 6 +- Projectiles/Summon/MiniGuardianStars.cs | 6 +- .../Summon/ProfanedSoulCrystalProjectiles.cs | 91 ++--- 29 files changed, 386 insertions(+), 829 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index cde04bd8a6..69f60401d7 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -5954,7 +5954,7 @@ namespace CalamityMod.NPCs modifiers.ScalingBonusDamage += (empowered ? 0.4f : 0.2f) * TagDamageMult; if (Main.netMode != NetmodeID.Server) { - var color = ProvUtils.GetProjectileColor((int)(Main.dayTime ? Providence.Providence.BossMode.Day : Providence.Providence.BossMode.Night), 0); + var color = ProvUtils.GetDayNightColor(!Main.dayTime, 0); float power = Math.Min(npc.height / 100f, 3f); var position = new Vector2(Main.rand.NextFloat(npc.Left.X, npc.Right.X), Main.rand.NextFloat(npc.Top.Y, npc.Bottom.Y)); var particle = new FlameParticle(position, 50, 0.25f, power, color * (Main.dayTime ? 1f : 1.25f), color * (Main.dayTime ? 1.25f : 1f)); diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs index a0ec072864..e190c43eef 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs @@ -1073,12 +1073,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians } } - Providence.Providence.BossMode mode = Providence.Providence.BossMode.Day; - if (!Main.dayTime) mode = Providence.Providence.BossMode.Night; + NPC.DrawBackglow(ProvUtils.GetDayNightColor(0, true), 4f, spriteEffects, NPC.frame, Main.screenPosition, texture2D15); - NPC.DrawBackglow(ProvUtils.GetProjectileColor((int)mode, 0, true), 4f, spriteEffects, NPC.frame, Main.screenPosition, texture2D15); - - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, ProvUtils.GetProjectileColor((int)mode, 0), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, ProvUtils.GetDayNightColor(0), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } // Draw laser effects diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs b/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs index c5829443b7..b7df246a38 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs @@ -796,9 +796,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians Providence.Providence.BossMode mode = Providence.Providence.BossMode.Day; if (!Main.dayTime) mode = Providence.Providence.BossMode.Night; - NPC.DrawBackglow(ProvUtils.GetProjectileColor((int)mode, 0, true), 4f, spriteEffects, NPC.frame, Main.screenPosition, texture2D15); + NPC.DrawBackglow(ProvUtils.GetDayNightColor(0, true), 4f, spriteEffects, NPC.frame, Main.screenPosition, texture2D15); - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, ProvUtils.GetProjectileColor((int)mode, 0), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, ProvUtils.GetDayNightColor(0), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } // Draw laser effects diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs b/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs index 2f5ac58127..9414e06ee0 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs @@ -514,9 +514,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians Providence.Providence.BossMode mode = Providence.Providence.BossMode.Day; if (!Main.dayTime) mode = Providence.Providence.BossMode.Night; - NPC.DrawBackglow(ProvUtils.GetProjectileColor((int)mode, 0, true), 4f, spriteEffects, NPC.frame, Main.screenPosition, texture2D15); + NPC.DrawBackglow(ProvUtils.GetDayNightColor(0, true), 4f, spriteEffects, NPC.frame, Main.screenPosition, texture2D15); - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, ProvUtils.GetProjectileColor((int)mode, 0), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, ProvUtils.GetDayNightColor(0), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); spriteBatch.Draw(texture2D16, drawLocation, NPC.frame, overrideColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } diff --git a/NPCs/Providence/ProvSpawnDefense.cs b/NPCs/Providence/ProvSpawnDefense.cs index 06fe1f97b8..87c76906fb 100644 --- a/NPCs/Providence/ProvSpawnDefense.cs +++ b/NPCs/Providence/ProvSpawnDefense.cs @@ -156,12 +156,9 @@ namespace CalamityMod.NPCs.Providence } } - Providence.BossMode mode = Providence.BossMode.Day; - if (!Main.dayTime) mode = Providence.BossMode.Night; + NPC.DrawBackglow(ProvUtils.GetDayNightColor(0, true), 4f, spriteEffects, NPC.frame, Main.screenPosition, texture2D15); - NPC.DrawBackglow(ProvUtils.GetProjectileColor((int)mode, 0, true), 4f, spriteEffects, NPC.frame, Main.screenPosition, texture2D15); - - spriteBatch.Draw(texture2D15, vector43, NPC.frame, ProvUtils.GetProjectileColor((int)mode, 0), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, vector43, NPC.frame, ProvUtils.GetDayNightColor(0), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/Providence/ProvSpawnHealer.cs b/NPCs/Providence/ProvSpawnHealer.cs index 898929f843..624647f339 100644 --- a/NPCs/Providence/ProvSpawnHealer.cs +++ b/NPCs/Providence/ProvSpawnHealer.cs @@ -163,12 +163,9 @@ namespace CalamityMod.NPCs.Providence } } - Providence.BossMode mode = Providence.BossMode.Day; - if (!Main.dayTime) mode = Providence.BossMode.Night; + NPC.DrawBackglow(ProvUtils.GetDayNightColor(0, true), 4f, spriteEffects, NPC.frame, Main.screenPosition, texture2D15); - NPC.DrawBackglow(ProvUtils.GetProjectileColor((int)mode, 0, true), 4f, spriteEffects, NPC.frame, Main.screenPosition, texture2D15); - - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, ProvUtils.GetProjectileColor((int)mode, 0), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, ProvUtils.GetDayNightColor(0), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); spriteBatch.Draw(texture2D16, drawLocation, NPC.frame, violetLerp, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); diff --git a/NPCs/Providence/ProvSpawnOffense.cs b/NPCs/Providence/ProvSpawnOffense.cs index f12f5713c4..2441f94f06 100644 --- a/NPCs/Providence/ProvSpawnOffense.cs +++ b/NPCs/Providence/ProvSpawnOffense.cs @@ -158,12 +158,9 @@ namespace CalamityMod.NPCs.Providence } } - Providence.BossMode mode = Providence.BossMode.Day; - if (!Main.dayTime) mode = Providence.BossMode.Night; + NPC.DrawBackglow(ProvUtils.GetDayNightColor(0, true), 4f, spriteEffects, NPC.frame, Main.screenPosition, texture2D15); - NPC.DrawBackglow(ProvUtils.GetProjectileColor((int)mode, 0, true), 4f, spriteEffects, NPC.frame, Main.screenPosition, texture2D15); - - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, ProvUtils.GetProjectileColor((int)mode, 0), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, ProvUtils.GetDayNightColor(0), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index bfb37e96d4..567ad13fc1 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -78,16 +78,9 @@ namespace CalamityMod.NPCs.Providence { Night = -1, Day = 0, - Red = 1, - Orange = 2, - Yellow = 3, - Green = 4, - Blue = 5, - Violet = 6 + Rainbow = 1, } - public int colorShiftTimer = -1; - Color HighFireColor = new Color(255, 191, 73); Color LowFireColor = new Color(116, 45, 23); @@ -298,7 +291,6 @@ namespace CalamityMod.NPCs.Providence writer.Write(text); writer.Write(useDefenseFrames); writer.Write(biomeType); - writer.Write(colorShiftTimer); writer.Write(phaseChange); writer.Write(frameUsed); writer.Write(healTimer); @@ -324,7 +316,6 @@ namespace CalamityMod.NPCs.Providence text = reader.ReadBoolean(); useDefenseFrames = reader.ReadBoolean(); biomeType = reader.ReadInt32(); - colorShiftTimer = reader.ReadInt32(); phaseChange = reader.ReadInt32(); frameUsed = reader.ReadInt32(); healTimer = reader.ReadInt32(); @@ -354,9 +345,6 @@ namespace CalamityMod.NPCs.Providence public override void AI() { - // Local helper variable to get the current boss mode without having to use the magic number version - int currentMode = (int)NPC.localAI[1]; - // Set the border drawing to true if it isn't set to true // Can happen when another mod sets to false for a difficulty and that difficulty is then toggled off. shouldDrawInfernoBorder = true; @@ -384,25 +372,9 @@ namespace CalamityMod.NPCs.Providence bool bossRush = BossRushEvent.BossRushActive; bool getFuckedAI = Main.zenithWorld; - int timeToShift = 30; //Switches color every half-second if (getFuckedAI) - { - colorShiftTimer++; - - if (colorShiftTimer == -1) //Initiate - { - NPC.localAI[1] = (float)BossMode.Red; - colorShiftTimer = 0; - } - else if (colorShiftTimer >= timeToShift) - { - NPC.localAI[1]++; - if (NPC.localAI[1] > (float)BossMode.Violet) - NPC.localAI[1] = (float)BossMode.Red; - colorShiftTimer = 0; - } - } - else if ((!Main.dayTime && !Main.remixWorld) || bossRush) // Normal Night time activity + NPC.localAI[1] = (float)BossMode.Rainbow; + else if (!ProvUtils.DayAI()) // Normal Night time activity NPC.localAI[1] = (float)BossMode.Night; else NPC.localAI[1] = (float)BossMode.Day; @@ -453,7 +425,9 @@ namespace CalamityMod.NPCs.Providence // Increase all projectile damage at night, but reduce to 0 for Zenith int projectileDamageMult = 1; - if (nightAI) + if (getFuckedAI) + projectileDamageMult = 0; + else if (nightAI) projectileDamageMult = 2; NPC.Calamity().CurrentlyEnraged = !bossRush && nightAI; @@ -469,7 +443,7 @@ namespace CalamityMod.NPCs.Providence int holyStarDamage = NPC.GetProjectileDamage(ModContent.ProjectileType()) * projectileDamageMult; // Change dust type at night - int dustType = ProvUtils.GetDustID(NPC.localAI[1]); + int dustType = ProvUtils.GetDustID(); // Phase times float phaseTime = nightAI ? (240f - 60f * (1f - lifeRatio)) : 300f; @@ -511,9 +485,9 @@ namespace CalamityMod.NPCs.Providence float burnIntensity = CalculateBurnIntensity(attackDelayAfterCocoon); // Color determination - Color hiColor = ProvUtils.GetProjectileColor(currentMode, 0); - Color medColor = ProvUtils.GetProjectileColor(currentMode, 255); - Color loColor = ProvUtils.GetProjectileColor(currentMode, 255, true); + Color hiColor = ProvUtils.GetProjectileColor(0); + Color medColor = ProvUtils.GetProjectileColor(255); + Color loColor = ProvUtils.GetProjectileColor(255, true); if (!player.dead && player.active && !player.creativeGodMode && !Dying) { @@ -857,10 +831,7 @@ namespace CalamityMod.NPCs.Providence { // Slowly drift down when spawning if (spawnAnimation) - { - colorShiftTimer++; // Also double the shift speed in the mean time :) NPC.velocity = Vector2.Zero; - } else { // Slows down while firing Holy Rays. It would've not slowed down for the Zenith seed but apparently it was too fast (shockers). @@ -1133,8 +1104,8 @@ namespace CalamityMod.NPCs.Providence } CalamityUtils.AddScreenshakeAt(NPC.Center, 10, 2000); - Color hColor = ProvUtils.GetProjectileColor((int)NPC.localAI[1], 255, false); - Color lColor = ProvUtils.GetProjectileColor((int)NPC.localAI[1], 0, true); + Color hColor = ProvUtils.GetProjectileColor(255, false); + Color lColor = ProvUtils.GetProjectileColor(0, true); for (int i = 0; i < 30; i++) { @@ -1852,8 +1823,8 @@ namespace CalamityMod.NPCs.Providence { CalamityUtils.AddScreenshakeAt(NPC.Center, 5, 2000); - Color hiColor = ProvUtils.GetProjectileColor((int)NPC.localAI[1], 255, false); - Color loColor = ProvUtils.GetProjectileColor((int)NPC.localAI[1], 0, true); + Color hiColor = ProvUtils.GetProjectileColor( 255, false); + Color loColor = ProvUtils.GetProjectileColor(0, true); for (int i = 0; i < 30; i++) { @@ -1958,7 +1929,7 @@ namespace CalamityMod.NPCs.Providence float shorterDistanceFade = Utils.GetLerpValue(0f, 120f, aiTimer, true); // Distance does not get shorter if in GFB / Guardians are alive - if (!guardianAlive && NPC.localAI[1] < (float)BossMode.Red) + if (!guardianAlive && NPC.localAI[1] < (float)BossMode.Rainbow) { maxDistance = baseDistance; if (AIState == (int)Phase.FlameCocoon || AIState == (int)Phase.SpearCocoon) @@ -2025,8 +1996,8 @@ namespace CalamityMod.NPCs.Providence { CalamityUtils.AddScreenshakeAt(NPC.Center, 10, 2000); - Color hiColor = ProvUtils.GetProjectileColor((int)NPC.localAI[1], 255, false); - Color loColor = ProvUtils.GetProjectileColor((int)NPC.localAI[1], 0, true); + Color hiColor = ProvUtils.GetProjectileColor(255, false); + Color loColor = ProvUtils.GetProjectileColor(0, true); for (int i = 0; i < 30; i++) { @@ -2187,7 +2158,7 @@ namespace CalamityMod.NPCs.Providence { int frameY = (int)(NPC.Calamity().newAI[3] / 4) % 4; float sc1 = MathHelper.Lerp(1, 0, sc); - Main.EntitySpriteDraw(orbTex.Value, NPC.Center - Main.screenPosition + new Vector2(Main.rand.NextFloat(MathHelper.Lerp(0f, 10f, sc)), 0).RotatedByRandom(MathHelper.TwoPi), orbTex.Frame(), ProvUtils.GetProjectileColor((int)NPC.localAI[1], 0, false).MultiplyRGBA(new Color(sc * 45f, sc * 11f, sc * 22f, 0f)), 0f, orbTex.Frame().Center(), (sc * 4.4f) + (float)(Math.Cos((float)NPC.Calamity().newAI[3] / 10) * sc), SpriteEffects.None); + Main.EntitySpriteDraw(orbTex.Value, NPC.Center - Main.screenPosition + new Vector2(Main.rand.NextFloat(MathHelper.Lerp(0f, 10f, sc)), 0).RotatedByRandom(MathHelper.TwoPi), orbTex.Frame(), ProvUtils.GetProjectileColor(0, false).MultiplyRGBA(new Color(sc * 45f, sc * 11f, sc * 22f, 0f)), 0f, orbTex.Frame().Center(), (sc * 4.4f) + (float)(Math.Cos((float)NPC.Calamity().newAI[3] / 10) * sc), SpriteEffects.None); } } @@ -2269,41 +2240,43 @@ namespace CalamityMod.NPCs.Providence // Draw the glowmask textures + their afterimages // These are the colors at their strongest point. It'll shift towards white by the brightness value used earlier. - Color WingColor = ProvUtils.GetProjectileColor((int)NPC.localAI[1], 0); // Default to day + Color WingColor = ProvUtils.GetProjectileColor(0); // Default to day Color CrystalColor = Color.Violet; - switch (NPC.localAI[1]) + + if (NPC.localAI[1] == (float)BossMode.Rainbow) { - case (float)BossMode.Red: - WingColor = Color.Red; - CrystalColor = Color.BlueViolet; - break; - - case (float)BossMode.Orange: - WingColor = Color.Orange; - CrystalColor = Color.HotPink; - break; - - case (float)BossMode.Yellow: // Same as day - break; - - case (float)BossMode.Green: - WingColor = Color.Green; - CrystalColor = Color.Gold; - break; - - case (float)BossMode.Blue: // Same as night - case (float)BossMode.Night: - WingColor = Color.Cyan; - CrystalColor = Color.BlueViolet; - break; - - case (float)BossMode.Violet: + if (Main.GlobalTimeWrappedHourly % 6f >= 5f) // Violet + { WingColor = Color.Magenta; CrystalColor = Color.GreenYellow; - break; - - default: - break; + } + else if (Main.GlobalTimeWrappedHourly % 6f >= 4f) // Blue + { + WingColor = Color.Cyan; + CrystalColor = Color.BlueViolet; + } + else if (Main.GlobalTimeWrappedHourly % 6f >= 3f) // Green + { + WingColor = Color.Green; + CrystalColor = Color.Gold; + } + else if (Main.GlobalTimeWrappedHourly % 6f >= 2f) // Yellow + CrystalColor = Color.Violet; + else if (Main.GlobalTimeWrappedHourly % 6f >= 1f) // Orange + { + WingColor = Color.Orange; + CrystalColor = Color.HotPink; + } + else // Red + { + WingColor = Color.Red; + CrystalColor = Color.BlueViolet; + } + } + else if (NPC.localAI[1] == (float)BossMode.Night) + { + WingColor = Color.Cyan; + CrystalColor = Color.BlueViolet; } Color BaseWingColor = Color.Lerp(WingColor, BaseColor, Brightness) * NPC.Opacity; @@ -2314,13 +2287,13 @@ namespace CalamityMod.NPCs.Providence BaseCrystalColor = colorOverride.Value; } - Color GlowWingColor = ProvUtils.GetProjectileColor((int)NPC.localAI[1], NPC.GetAlpha(drawColor), true); + Color GlowWingColor = ProvUtils.GetProjectileColor(NPC.GetAlpha(drawColor), true); if (CalamityConfig.Instance.Afterimages) { for (int j = 1; j < maxAfterimages; j++) { - Color AfterimageWingColor = ProvUtils.GetProjectileColor((int)NPC.localAI[1], 0, true); + Color AfterimageWingColor = ProvUtils.GetProjectileColor(0, true); AfterimageWingColor = Color.Lerp(AfterimageWingColor, BaseColor, Brightness); AfterimageWingColor = NPC.GetAlpha(AfterimageWingColor); AfterimageWingColor *= (maxAfterimages - j) / 15f; @@ -2487,7 +2460,7 @@ namespace CalamityMod.NPCs.Providence public override Color? GetAlpha(Color drawColor) { - return ProvUtils.GetProjectileColor((int)NPC.localAI[1], drawColor) * NPC.Opacity; + return ProvUtils.GetProjectileColor(drawColor) * NPC.Opacity; } public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) @@ -2514,7 +2487,7 @@ namespace CalamityMod.NPCs.Providence int pr = (int)(progress * 30f); - Color col = ProvUtils.GetProjectileColor((int)NPC.localAI[1], Color.DarkGray, true); + Color col = ProvUtils.GetProjectileColor(Color.DarkGray, true); col.A = 255; Main.EntitySpriteDraw(tex, NPC.Center + vec + new Vector2(0, 310) - Main.screenPosition + new Vector2(Main.rand.Next(-pr, pr) * 2, outset), new Rectangle(0, i * 2, tex.Width, 2), Color.Lerp(col, Color.White, progress * 2f).MultiplyRGBA(new Color(255, 255, 255, MathHelper.Lerp(progress, 1f, 0.2f) * 2f)), 0f, tex.Size() / 2f, 1f, SpriteEffects.None); @@ -2700,7 +2673,7 @@ namespace CalamityMod.NPCs.Providence SoundEngine.PlaySound(HurtSound, NPC.Center); } - int dustType = ProvUtils.GetDustID(NPC.localAI[1]); + int dustType = ProvUtils.GetDustID(); for (int k = 0; k < 15; k++) { int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, dustType, hit.HitDirection, -1f, 0, default, 1f); @@ -2853,11 +2826,26 @@ namespace CalamityMod.NPCs.Providence // These will be used for almost every single one of her projectiles, so it's useful to have. public static class ProvUtils { - public static Color GetProjectileColor(int Mode, Color givenLightColor, bool Outline = false) + public static bool DayAI() => (Main.IsItDay() || Main.remixWorld) && !Main.zenithWorld && !BossRushEvent.BossRushActive; + + // Simplified to day/night only. For PSC and Profaned Guardians + public static Color GetDayNightColor(int Alpha, bool Outline = false) => GetDayNightColor(!Main.IsItDay() && !Main.remixWorld, Alpha, Outline); + public static Color GetDayNightColor(bool Night, int Alpha, bool Outline = false) + { + Color FinalColor = new Color(255, Outline ? 0 : 155, Outline ? 0 : 25, Alpha); // Default to day + + if (Night) + FinalColor = new Color(100, Outline ? 250 : 200, Outline ? 200 : 250, Alpha); + + return FinalColor; + } + + public static Color GetProjectileColor(Color givenLightColor, bool Outline = false) { int alpha = 0; - if (!Outline && Mode == (int)Providence.BossMode.Yellow) + // Custom set alpha for GFB Yellow Mode + if (!Outline && Main.zenithWorld && Main.GlobalTimeWrappedHourly % 6f >= 2f && Main.GlobalTimeWrappedHourly % 6f < 3f) { float colorBrightness = (givenLightColor.R + givenLightColor.G + givenLightColor.B / 3) / 255f; alpha = (int)MathHelper.Lerp(0f, 155f, colorBrightness); @@ -2868,35 +2856,24 @@ namespace CalamityMod.NPCs.Providence } Color FinalColor = new Color(255, Outline ? 0 : 255, Outline ? 0 : 255, alpha); // Default to day - switch (Mode) + + if (Main.zenithWorld) { - case (int)Providence.BossMode.Red: - FinalColor = new Color(250, 100, Outline ? 200 : 100, alpha); - break; - - case (int)Providence.BossMode.Orange: - FinalColor = new Color(250, 150, Outline ? 150 : 100, alpha); - break; - - case (int)Providence.BossMode.Yellow: // Same as day - break; - - case (int)Providence.BossMode.Green: - FinalColor = new Color(Outline ? 200 : 100, 250, 100, alpha); - break; - - case (int)Providence.BossMode.Blue: // Same as night - case (int)Providence.BossMode.Night: - FinalColor = new Color(100, Outline ? 250 : 200, Outline ? 200 : 250, alpha); - break; - - case (int)Providence.BossMode.Violet: + if (Main.GlobalTimeWrappedHourly % 6f >= 5f) // Violet FinalColor = new Color(Outline ? 100 : 150, Outline ? 150 : 100, 250, alpha); - break; - - default: - break; + else if (Main.GlobalTimeWrappedHourly % 6f >= 4f) // Blue + FinalColor = new Color(100, Outline ? 250 : 200, Outline ? 200 : 250, alpha); + else if (Main.GlobalTimeWrappedHourly % 6f >= 3f) // Green + FinalColor = new Color(Outline ? 200 : 100, 250, 100, alpha); + else if (Main.GlobalTimeWrappedHourly % 6f >= 2f) // Yellow + FinalColor = new Color(255, Outline ? 0 : 255, Outline ? 0 : 255, alpha); + else if (Main.GlobalTimeWrappedHourly % 6f >= 1f) // Orange + FinalColor = new Color(250, 150, Outline ? 150 : 100, alpha); + else // Red + FinalColor = new Color(250, 100, Outline ? 200 : 100, alpha); } + else if (!DayAI()) + FinalColor = new Color(100, Outline ? 250 : 200, Outline ? 200 : 250, alpha); if (Outline) FinalColor *= 0.1f; @@ -2904,38 +2881,27 @@ namespace CalamityMod.NPCs.Providence return FinalColor; } - public static Color GetProjectileColor(int Mode, int Alpha, bool Outline = false) + public static Color GetProjectileColor(int Alpha, bool Outline = false) { Color FinalColor = new Color(255, Outline ? 0 : 155, Outline ? 0 : 25, Alpha); // Default to day - switch (Mode) + + if (Main.zenithWorld) { - case (int)Providence.BossMode.Red: - FinalColor = new Color(250, 100, Outline ? 200 : 100, Alpha); - break; - - case (int)Providence.BossMode.Orange: - FinalColor = new Color(250, 150, Outline ? 150 : 100, Alpha); - break; - - case (int)Providence.BossMode.Yellow: // Same as day - break; - - case (int)Providence.BossMode.Green: - FinalColor = new Color(Outline ? 200 : 100, 250, 100, Alpha); - break; - - case (int)Providence.BossMode.Blue: // Same as night - case (int)Providence.BossMode.Night: - FinalColor = new Color(100, Outline ? 250 : 200, Outline ? 200 : 250, Alpha); - break; - - case (int)Providence.BossMode.Violet: + if (Main.GlobalTimeWrappedHourly % 6f >= 5f) // Violet FinalColor = new Color(Outline ? 100 : 150, Outline ? 150 : 100, 250, Alpha); - break; - - default: - break; + else if (Main.GlobalTimeWrappedHourly % 6f >= 4f) // Blue + FinalColor = new Color(100, Outline ? 250 : 200, Outline ? 200 : 250, Alpha); + else if (Main.GlobalTimeWrappedHourly % 6f >= 3f) // Green + FinalColor = new Color(Outline ? 200 : 100, 250, 100, Alpha); + else if (Main.GlobalTimeWrappedHourly % 6f >= 2f) // Yellow + FinalColor = new Color(255, Outline ? 0 : 155, Outline ? 0 : 25, Alpha); + else if (Main.GlobalTimeWrappedHourly % 6f >= 1f) // Orange + FinalColor = new Color(250, 150, Outline ? 150 : 100, Alpha); + else // Red + FinalColor = new Color(250, 100, Outline ? 200 : 100, Alpha); } + else if (!DayAI()) + FinalColor = new Color(100, Outline ? 250 : 200, Outline ? 200 : 250, Alpha); if (Outline) FinalColor *= 0.1f; @@ -2943,88 +2909,92 @@ namespace CalamityMod.NPCs.Providence return FinalColor; } - public static int GetDustID(float Mode) + // Assign the night bool to turn it into a binary day/night state without accounting for GFB + public static int GetDustID(bool? Night = null) { int DustType = (int)CalamityDusts.ProfanedFire; // Default to day - switch (Mode) + + if (Night.HasValue) { - case (float)Providence.BossMode.Red: - DustType = DustID.RedTorch; - break; - - case (float)Providence.BossMode.Orange: - DustType = DustID.OrangeTorch; - break; - - case (float)Providence.BossMode.Yellow: // Same as day - break; - - case (float)Providence.BossMode.Green: - DustType = DustID.GreenTorch; - break; - - case (float)Providence.BossMode.Blue: // Same as night - case (float)Providence.BossMode.Night: + if (Night.Value) DustType = (int)CalamityDusts.Nightwither; - break; - - case (float)Providence.BossMode.Violet: - DustType = DustID.PurpleTorch; - break; - - default: - break; } + else if (Main.zenithWorld) + { + if (Main.GlobalTimeWrappedHourly % 6f >= 5f) // Violet + DustType = DustID.PurpleTorch; + else if (Main.GlobalTimeWrappedHourly % 6f >= 4f) // Blue + DustType = (int)CalamityDusts.Nightwither; + else if (Main.GlobalTimeWrappedHourly % 6f >= 3f) // Green + DustType = DustID.GreenTorch; + else if (Main.GlobalTimeWrappedHourly % 6f >= 2f) // Yellow + DustType = (int)CalamityDusts.ProfanedFire; + else if (Main.GlobalTimeWrappedHourly % 6f >= 1f) // Orange + DustType = DustID.OrangeTorch; + else // Red + DustType = DustID.RedTorch; + } + else if (!DayAI()) + DustType = (int)CalamityDusts.Nightwither; + return DustType; } + // Shortcut function for applying Burden Breaker-like negative healing to GFB Providence + public static void ApplyGFBDamage(Projectile proj, int BaseDuration, int NegativeHealValue) + { + int index = Player.FindClosest(proj.position, proj.width, proj.height); + Player player = Main.player[index]; + if (player is null) + return; + if (proj.Colliding(proj.Hitbox, player.Hitbox)) + ApplyDebuffs(player, BaseDuration, NegativeHealValue); + } + // Include debuffs inflicted by Providence's projectiles for all her forms // In the GFB seed, also includes negative healing - public static void ApplyHitEffects(Player Target, int Mode, int BaseDuration, int NegativeHealValue) + public static void ApplyDebuffs(Player Target, int BaseDuration, int NegativeHealValue = 0) { - int BuffType = ModContent.BuffType(); // Default to day - float Multiplier = 1f; // Used to counterbalance Cursed Inferno and Shadowflame + int BuffType = ModContent.BuffType(); // Default to non-GFB - // Day and Night Providence inflicts 16-80 damage of debuffs depending on attacks - // GFB Providence inflicts 24-120 damage (+50%) for half the colors, 26-130 (+62.5%) for another half - switch (Mode) + // All debuffs are adjusted to be 50% more powerful in GFB + float Multiplier = 1f; + if (Main.zenithWorld) { - case (int)Providence.BossMode.Red: - BuffType = ModContent.BuffType(); - break; - - case (int)Providence.BossMode.Orange: - BuffType = ModContent.BuffType(); - Multiplier = 0.5f; - break; - - case (int)Providence.BossMode.Yellow: // Same as day - break; - - case (int)Providence.BossMode.Green: - BuffType = BuffID.CursedInferno; - Multiplier = 0.75f; - break; - - case (int)Providence.BossMode.Blue: // Night Providence no longer inflicts a different debuff, but Blue GFB Providence does - BuffType = ModContent.BuffType(); - break; - case (int)Providence.BossMode.Night: //Same as Day, will inflict Holy Flames - break; - case (int)Providence.BossMode.Violet: + if (Main.GlobalTimeWrappedHourly % 6f >= 5f) // Violet + { BuffType = ModContent.BuffType(); - Multiplier = 0.60f; - break; - - default: - break; + Multiplier = 2f; + } + else if (Main.GlobalTimeWrappedHourly % 6f >= 4f) // Blue + { + BuffType = ModContent.BuffType(); + Multiplier = 1.5f; + } + else if (Main.GlobalTimeWrappedHourly % 6f >= 3f) // Green + { + BuffType = BuffID.CursedInferno; + Multiplier = 2.5f; + } + else if (Main.GlobalTimeWrappedHourly % 6f >= 2f) // Yellow + { + BuffType = ModContent.BuffType(); + Multiplier = 1.5f; + } + else if (Main.GlobalTimeWrappedHourly % 6f >= 1f) // Orange + BuffType = ModContent.BuffType(); + else // Red + { + BuffType = ModContent.BuffType(); + Multiplier = 2f; + } } Target.AddBuff(BuffType, (int)(BaseDuration * Multiplier)); // A. Specifically inflicts Vaporfied in quirky RGB Mode because it's a colorful debuff // B. Apply the negative healing - if (Mode >= (int)Providence.BossMode.Red) + if (Main.zenithWorld) { // Obligatory offensive guardian boosting negative heals if (CalamityGlobalNPC.holyBossAttacker != -1) diff --git a/Projectiles/Boss/HolyAura.cs b/Projectiles/Boss/HolyAura.cs index 398c4be829..0837b1a5ea 100644 --- a/Projectiles/Boss/HolyAura.cs +++ b/Projectiles/Boss/HolyAura.cs @@ -71,14 +71,12 @@ namespace CalamityMod.Projectiles.Boss float a = (float)Math.Sin(amount2 / 20) + 1; - int mode = (int)Providence.BossMode.Yellow; - - Color color = Color.Lerp(ProvUtils.GetProjectileColor(mode, 0, true), ProvUtils.GetProjectileColor(mode, 0, false), a); + Color color = Color.Lerp(ProvUtils.GetProjectileColor(0, true), ProvUtils.GetProjectileColor(0, false), a); bool underworld = Projectile.ai[0] == 2f; if (!Main.zenithWorld) { - if (Main.IsItDay()) + if (Main.IsItDay() || Main.remixWorld) { color.R = 255; if (underworld) diff --git a/Projectiles/Boss/HolyBlast.cs b/Projectiles/Boss/HolyBlast.cs index 7ce92c1236..3dde54ea10 100644 --- a/Projectiles/Boss/HolyBlast.cs +++ b/Projectiles/Boss/HolyBlast.cs @@ -64,6 +64,8 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + ProvUtils.ApplyGFBDamage(Projectile, 320, 20); + Lighting.AddLight(Projectile.Center, 0.9f, 0.7f, 0f); if (Projectile.timeLeft > TimeLeft - AccelerationTime) @@ -72,26 +74,6 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.Hitbox.Intersects(new Rectangle((int)Projectile.ai[0], (int)Projectile.ai[1], Player.defaultWidth, Player.defaultHeight))) Projectile.tileCollide = true; - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - // Day mode by default but syncs with the boss - if (CalamityGlobalNPC.holyBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.holyBoss].active) - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - } - else if (CalamityGlobalNPC.doughnutBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].active) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].Calamity().CurrentlyEnraged) - Projectile.maxPenetrate = (int)Providence.BossMode.Night; - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - } - } - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - Projectile.frameCounter++; if (Projectile.frameCounter > 6) { @@ -105,15 +87,15 @@ namespace CalamityMod.Projectiles.Boss { for (int i = 0; i < 13; i++) { - GeneralParticleHandler.SpawnParticle(new PointParticle(Projectile.Center, Projectile.velocity.RotatedBy(MathHelper.ToRadians(Main.rand.NextFloat(-30f, 30f))) * Main.rand.NextFloat(2.4f, 4.2f), false, 15, Main.rand.NextFloat(3f, 6f), ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255, false))); - GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center, Projectile.velocity.RotatedBy(MathHelper.ToRadians(Main.rand.NextFloat(-50f, 50f))) * Main.rand.NextFloat(2.4f, 4.2f), false, 15, Main.rand.NextFloat(2f, 5f), ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255, false))); + GeneralParticleHandler.SpawnParticle(new PointParticle(Projectile.Center, Projectile.velocity.RotatedBy(MathHelper.ToRadians(Main.rand.NextFloat(-30f, 30f))) * Main.rand.NextFloat(2.4f, 4.2f), false, 15, Main.rand.NextFloat(3f, 6f), ProvUtils.GetProjectileColor(255, false))); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center, Projectile.velocity.RotatedBy(MathHelper.ToRadians(Main.rand.NextFloat(-50f, 50f))) * Main.rand.NextFloat(2.4f, 4.2f), false, 15, Main.rand.NextFloat(2f, 5f), ProvUtils.GetProjectileColor(255, false))); } started = true; } if (Projectile.localAI[0] == 0f) { - int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); + int dustType = ProvUtils.GetDustID(); for (int i = 0; i < 10; i++) { int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); @@ -131,7 +113,7 @@ namespace CalamityMod.Projectiles.Boss if (Math.Abs(Projectile.velocity.X) > 0.2) Projectile.spriteDirection = -Projectile.direction; - GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(50), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.6f, false, 20, Main.rand.NextFloat(1f, 2f), ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255))); + GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(50), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.6f, false, 20, Main.rand.NextFloat(1f, 2f), ProvUtils.GetProjectileColor(255))); GeneralParticleHandler.SpawnParticle(new MediumMistParticle(Projectile.Center + new Vector2(40, 0).RotatedBy(Vector2.Zero.AngleTo(-Projectile.velocity)) + new Vector2(Main.rand.NextFloat(20), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.6f, Color.LightSlateGray, Color.DarkSlateGray, Main.rand.NextFloat(1f, 3f), 150f)); if (Projectile.velocity.X < 0f) @@ -142,16 +124,16 @@ namespace CalamityMod.Projectiles.Boss public override Color? GetAlpha(Color lightColor) { - return ProvUtils.GetProjectileColor(Projectile.maxPenetrate, lightColor); + return ProvUtils.GetProjectileColor(lightColor); } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBlastNight").Value; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBlastNight").Value; int framing = texture.Height / Main.projFrames[Projectile.type]; int y6 = framing * Projectile.frame; Vector2 sc = Vector2.One; - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, lightColor, true), 4f, sc, texture); + Projectile.DrawBackglow(ProvUtils.GetProjectileColor(lightColor, true), 4f, sc, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), sc, SpriteEffects.None, 0); return false; @@ -159,8 +141,8 @@ namespace CalamityMod.Projectiles.Boss public override void OnKill(int timeLeft) { - Color hiColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255, false); - Color loColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0, true); + Color hiColor = ProvUtils.GetProjectileColor(255, false); + Color loColor = ProvUtils.GetProjectileColor(0, true); for (int i = 0; i < 30; i++) { @@ -177,7 +159,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.owner == Main.myPlayer) { - int totalProjectiles = (Projectile.maxPenetrate != (int)Providence.BossMode.Day) ? 8 : 6; + int totalProjectiles = !ProvUtils.DayAI() ? 8 : 6; if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) totalProjectiles *= 2; @@ -196,7 +178,7 @@ namespace CalamityMod.Projectiles.Boss SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact, Projectile.Center); - int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); + int dustType = ProvUtils.GetDustID(); for (int j = 0; j < 4; j++) { int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 2f); @@ -213,20 +195,13 @@ namespace CalamityMod.Projectiles.Boss } } - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - //In GFB, "real damage" is replaced with negative healing - if (Projectile.maxPenetrate >= (int)Providence.BossMode.Red) - modifiers.SourceDamage *= 0f; - } - public override void OnHitPlayer(Player target, Player.HurtInfo info) { // If the player is dodging, don't apply debuffs - if ((info.Damage <= 0 && Projectile.maxPenetrate < (int)Providence.BossMode.Red) || target.creativeGodMode) + if (info.Damage <= 0 || target.creativeGodMode) return; - ProvUtils.ApplyHitEffects(target, Projectile.maxPenetrate, 320, 20); + ProvUtils.ApplyDebuffs(target, 320); } } } diff --git a/Projectiles/Boss/HolyBomb.cs b/Projectiles/Boss/HolyBomb.cs index 9a0afc1f4d..228eb43f73 100644 --- a/Projectiles/Boss/HolyBomb.cs +++ b/Projectiles/Boss/HolyBomb.cs @@ -37,37 +37,11 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + ProvUtils.ApplyGFBDamage(Projectile, 160, 20); + Lighting.AddLight(Projectile.Center, 0.45f, 0.35f, 0f); - /* - * Day mode by default but syncs with the boss - * Uses maxPenetrate because it's kinda pointless for a boss projectile - * and it's convenient to copypaste without having to do adjustments - * If someone really feels like making a proper int for this purpose they can do it themselves - Iris - */ - - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - - if (CalamityGlobalNPC.holyBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.holyBoss].active) - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - } - else if (CalamityGlobalNPC.doughnutBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].active) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].Calamity().CurrentlyEnraged) - Projectile.maxPenetrate = (int)Providence.BossMode.Night; - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - } - } - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - SquishAnimation += 0.06f; - SquishAnimation = MathHelper.Clamp(SquishAnimation, 0f, 1f); Projectile.ai[0] += 1f; @@ -80,7 +54,7 @@ namespace CalamityMod.Projectiles.Boss { Vector2 center = Projectile.Center + new Vector2(0, -15); - GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(center, new Vector2(Main.rand.NextFloat(-10f, 10f), Main.rand.NextFloat(-4f, 2f)), false, 30, Main.rand.NextFloat(1f, 2.5f), ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255))); + GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(center, new Vector2(Main.rand.NextFloat(-10f, 10f), Main.rand.NextFloat(-4f, 2f)), false, 30, Main.rand.NextFloat(1f, 2.5f), ProvUtils.GetProjectileColor(255))); } float velocityY = -2f; @@ -111,25 +85,25 @@ namespace CalamityMod.Projectiles.Boss public override Color? GetAlpha(Color lightColor) { - return ProvUtils.GetProjectileColor(Projectile.maxPenetrate, lightColor); + return ProvUtils.GetProjectileColor(lightColor); } public override bool PreDraw(ref Color lightColor) { float squish = CalamityUtils.SineBumpEasing(SquishAnimation, 1) * 0.25f; - Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBombNight").Value; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBombNight").Value; int framing = texture.Height / Main.projFrames[Projectile.type]; int y6 = framing * Projectile.frame; - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, lightColor, true), 4f, new Vector2(Projectile.scale + squish, Projectile.scale - squish), texture, offset: new Vector2(0, (-22 * (1 - squish)))); + Projectile.DrawBackglow(ProvUtils.GetProjectileColor(lightColor, true), 4f, new Vector2(Projectile.scale + squish, Projectile.scale - squish), texture, offset: new Vector2(0, (-22 * (1 - squish)))); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, (framing / 2f) + 22), new Vector2(Projectile.scale + squish, Projectile.scale - squish), SpriteEffects.None, 0); return false; } public override void OnKill(int timeLeft) { - Color hiColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255, false); - Color loColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0, true); + Color hiColor = ProvUtils.GetProjectileColor(255, false); + Color loColor = ProvUtils.GetProjectileColor(0, true); for (int i = 0; i < 25; i++) { @@ -149,20 +123,13 @@ namespace CalamityMod.Projectiles.Boss SoundEngine.PlaySound(SoundID.Item100.WithPitchOffset(0.4f), Projectile.Center); } - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - //In GFB, "real damage" is replaced with negative healing - if (Projectile.maxPenetrate >= (int)Providence.BossMode.Red) - modifiers.SourceDamage *= 0f; - } - public override void OnHitPlayer(Player target, Player.HurtInfo info) { // If the player is dodging, don't apply debuffs - if ((info.Damage <= 0 && Projectile.maxPenetrate < (int)Providence.BossMode.Red) || target.creativeGodMode) + if (info.Damage <= 0 || target.creativeGodMode) return; - ProvUtils.ApplyHitEffects(target, Projectile.maxPenetrate, 160, 20); + ProvUtils.ApplyDebuffs(target, 160); } } } diff --git a/Projectiles/Boss/HolyBurnOrb.cs b/Projectiles/Boss/HolyBurnOrb.cs index 4a926f2b67..c8a9dcbb94 100644 --- a/Projectiles/Boss/HolyBurnOrb.cs +++ b/Projectiles/Boss/HolyBurnOrb.cs @@ -35,40 +35,18 @@ namespace CalamityMod.Projectiles.Boss Projectile.Calamity().DealsDefenseDamage = true; } - public override void OnSpawn(IEntitySource source) - { - - } - public override void AI() { - Lighting.AddLight(Projectile.Center, 0.45f, 0.35f, 0f); + ProvUtils.ApplyGFBDamage(Projectile, 120, 50); - // Day mode by default but syncs with the boss - if (CalamityGlobalNPC.holyBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.holyBoss].active) - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - } - else if (CalamityGlobalNPC.doughnutBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].active) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].Calamity().CurrentlyEnraged) - Projectile.maxPenetrate = (int)Providence.BossMode.Night; - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - } - } - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; + Lighting.AddLight(Projectile.Center, 0.45f, 0.35f, 0f); if (Projectile.ai[0] == 0f && BossRushEvent.BossRushActive) Projectile.velocity *= 1.25f; if (!started) { - Color cl = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255); + Color cl = ProvUtils.GetProjectileColor(255); GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, cl, "CalamityMod/Particles/BlastCone", new Vector2(Main.rand.NextFloat(4f, 7f), 1.5f), Vector2.Zero.AngleTo(Projectile.velocity), 1f, 0f, 30)); started = true; } @@ -98,7 +76,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.localAI[1] += (Projectile.velocity.Length() / 20); - Color col = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255); + Color col = ProvUtils.GetProjectileColor(255); float vel = MathHelper.Clamp(Projectile.velocity.Length() / 5, 0, 1.5f); @@ -113,8 +91,8 @@ namespace CalamityMod.Projectiles.Boss Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); - Color baseColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255, true) * 4; - Color baseColor2 = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255); + Color baseColor = ProvUtils.GetProjectileColor(255, true) * 4; + Color baseColor2 = ProvUtils.GetProjectileColor(255); baseColor.A = 0; baseColor *= lerpMult; baseColor2 *= lerpMult; @@ -147,7 +125,7 @@ namespace CalamityMod.Projectiles.Boss { SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); Projectile.ExpandHitboxBy(50); - int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); + int dustType = ProvUtils.GetDustID(); for (int d = 0; d < 5; d++) { int holy = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); @@ -170,22 +148,15 @@ namespace CalamityMod.Projectiles.Boss } } - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - //In GFB, "real damage" is replaced with negative healing - if (Projectile.maxPenetrate >= (int)Providence.BossMode.Red) - modifiers.SourceDamage *= 0f; - - Projectile.Kill(); - } + public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) => Projectile.Kill(); public override void OnHitPlayer(Player target, Player.HurtInfo info) { // If the player is dodging, don't apply debuffs - if ((info.Damage <= 0 && Projectile.maxPenetrate < (int)Providence.BossMode.Red) || target.creativeGodMode) + if (info.Damage <= 0 || target.creativeGodMode) return; - ProvUtils.ApplyHitEffects(target, Projectile.maxPenetrate, 120, 50); + ProvUtils.ApplyDebuffs(target, 120); } } } diff --git a/Projectiles/Boss/HolyFire.cs b/Projectiles/Boss/HolyFire.cs index 662997d9e1..c04e53c84b 100644 --- a/Projectiles/Boss/HolyFire.cs +++ b/Projectiles/Boss/HolyFire.cs @@ -35,36 +35,17 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + ProvUtils.ApplyGFBDamage(Projectile, 80, 20); + Lighting.AddLight(Projectile.Center, 0.3f, 0.225f, 0f); - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - - // Day mode by default but syncs with the boss - if (CalamityGlobalNPC.holyBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.holyBoss].active) - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - } - else if (CalamityGlobalNPC.doughnutBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].active) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].Calamity().CurrentlyEnraged) - Projectile.maxPenetrate = (int)Providence.BossMode.Night; - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - } - } - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - if (Projectile.ai[1] == 0f) { Projectile.ai[1] = 1f; SoundEngine.PlaySound(SoundID.Item20, Projectile.Center); } - Projectile.alpha -= (Projectile.maxPenetrate != (int)Providence.BossMode.Day) ? 10 : 5; + Projectile.alpha -= !ProvUtils.DayAI() ? 10 : 5; if (Projectile.alpha <= 0) Projectile.Kill(); @@ -80,24 +61,24 @@ namespace CalamityMod.Projectiles.Boss public override Color? GetAlpha(Color lightColor) { - return ProvUtils.GetProjectileColor(Projectile.maxPenetrate, lightColor); + return ProvUtils.GetProjectileColor(lightColor); } public override bool PreDraw(ref Color lightColor) { Projectile.scale = 1.5f; - Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFireNight").Value; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFireNight").Value; int framing = texture.Height / Main.projFrames[Projectile.type]; int y6 = framing * Projectile.frame; - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, lightColor, true), 4f, new Vector2(Projectile.scale)); + Projectile.DrawBackglow(ProvUtils.GetProjectileColor(lightColor, true), 4f, new Vector2(Projectile.scale)); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } public override void OnKill(int timeLeft) { - Color hiColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255, false); - Color loColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0, true); + Color hiColor = ProvUtils.GetProjectileColor(255, false); + Color loColor = ProvUtils.GetProjectileColor(0, true); for (int i = 0; i < 25; i++) { @@ -148,20 +129,13 @@ namespace CalamityMod.Projectiles.Boss SoundEngine.PlaySound(SoundID.Item100.WithPitchOffset(0.4f), Projectile.Center); } - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - //In GFB, "real damage" is replaced with negative healing - if (Projectile.maxPenetrate >= (int)Providence.BossMode.Red) - modifiers.SourceDamage *= 0f; - } - public override void OnHitPlayer(Player target, Player.HurtInfo info) { // If the player is dodging, don't apply debuffs - if ((info.Damage <= 0 && Projectile.maxPenetrate < (int)Providence.BossMode.Red) || target.creativeGodMode) + if (info.Damage <= 0 || target.creativeGodMode) return; - ProvUtils.ApplyHitEffects(target, Projectile.maxPenetrate, 80, 20); + ProvUtils.ApplyDebuffs(target, 80); } } } diff --git a/Projectiles/Boss/HolyFire2.cs b/Projectiles/Boss/HolyFire2.cs index dfed3decab..f85df4fe56 100644 --- a/Projectiles/Boss/HolyFire2.cs +++ b/Projectiles/Boss/HolyFire2.cs @@ -35,29 +35,10 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + ProvUtils.ApplyGFBDamage(Projectile, 80, 10); + Lighting.AddLight(Projectile.Center, 0.3f, 0.225f, 0f); - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - - // Day mode by default but syncs with the boss - if (CalamityGlobalNPC.holyBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.holyBoss].active) - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - } - else if (CalamityGlobalNPC.doughnutBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].active) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].Calamity().CurrentlyEnraged) - Projectile.maxPenetrate = (int)Providence.BossMode.Night; - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - } - } - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - Projectile.frameCounter++; if (Projectile.frameCounter > 6) { @@ -82,7 +63,7 @@ namespace CalamityMod.Projectiles.Boss Vector2 playerDirection = Main.player[playerTracker].Center - Projectile.Center; playerDirection.Normalize(); playerDirection *= projVelocityMult; - float inertia = (Projectile.maxPenetrate != (int)Providence.BossMode.Day) ? 20f : 25f; + float inertia = !ProvUtils.DayAI() ? 20f : 25f; Projectile.velocity = (Projectile.velocity * (inertia - 1f) + playerDirection) / inertia; Projectile.velocity.Normalize(); Projectile.velocity *= projVelocityMult; @@ -90,7 +71,7 @@ namespace CalamityMod.Projectiles.Boss float vel = Math.Clamp(((Math.Abs(Projectile.velocity.X) + Math.Abs(Projectile.velocity.Y)) / 2), 0f, 1f); - GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(15), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.2f, false, 10, Main.rand.NextFloat(0.8f, 1.2f), ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255))); + GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(15), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.2f, false, 10, Main.rand.NextFloat(0.8f, 1.2f), ProvUtils.GetProjectileColor(255))); if (Main.rand.NextBool()) { @@ -102,15 +83,15 @@ namespace CalamityMod.Projectiles.Boss public override Color? GetAlpha(Color lightColor) { - return ProvUtils.GetProjectileColor(Projectile.maxPenetrate, lightColor); + return ProvUtils.GetProjectileColor(lightColor); } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFire2Night").Value; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFire2Night").Value; int framing = texture.Height / Main.projFrames[Projectile.type]; int y6 = framing * Projectile.frame; - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, lightColor, true), 4f, texture); + Projectile.DrawBackglow(ProvUtils.GetProjectileColor(lightColor, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } @@ -124,7 +105,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.height = 40; Projectile.position.X = Projectile.position.X - (Projectile.width / 2); Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2); - int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); + int dustType = ProvUtils.GetDustID(); for (int i = 0; i < 5; i++) { int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); @@ -144,20 +125,13 @@ namespace CalamityMod.Projectiles.Boss } } - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - //In GFB, "real damage" is replaced with negative healing - if (Projectile.maxPenetrate >= (int)Providence.BossMode.Red) - modifiers.SourceDamage *= 0f; - } - public override void OnHitPlayer(Player target, Player.HurtInfo info) { // If the player is dodging, don't apply debuffs - if ((info.Damage <= 0 && Projectile.maxPenetrate < (int)Providence.BossMode.Red) || target.creativeGodMode) + if (info.Damage <= 0 || target.creativeGodMode) return; - ProvUtils.ApplyHitEffects(target, Projectile.maxPenetrate, 80, 10); + ProvUtils.ApplyDebuffs(target, 80); } } } diff --git a/Projectiles/Boss/HolyFlare.cs b/Projectiles/Boss/HolyFlare.cs index c05e489fbb..72817641c2 100644 --- a/Projectiles/Boss/HolyFlare.cs +++ b/Projectiles/Boss/HolyFlare.cs @@ -36,29 +36,10 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + ProvUtils.ApplyGFBDamage(Projectile, 120, 20); + Lighting.AddLight(Projectile.Center, 0.35f, 0.275f, 0f); - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - - // Day mode by default but syncs with the boss - if (CalamityGlobalNPC.holyBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.holyBoss].active) - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - } - else if (CalamityGlobalNPC.doughnutBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].active) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].Calamity().CurrentlyEnraged) - Projectile.maxPenetrate = (int)Providence.BossMode.Night; - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - } - } - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - Player player = Main.player[Projectile.owner]; Projectile.frameCounter++; @@ -75,7 +56,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.velocity.Y > velocityYCap) Projectile.velocity.Y = velocityYCap; - float velocityX = Projectile.maxPenetrate != (int)Providence.BossMode.Day ? 0.025f : 0.02f; + float velocityX = !ProvUtils.DayAI() ? 0.025f : 0.02f; if (Projectile.position.X + Projectile.width < player.position.X) { if (Projectile.velocity.X < 0f) @@ -89,13 +70,13 @@ namespace CalamityMod.Projectiles.Boss Projectile.velocity.X -= velocityX; } - float velocityXCap = Projectile.maxPenetrate != (int)Providence.BossMode.Day ? 10f : 8f; + float velocityXCap = !ProvUtils.DayAI() ? 10f : 8f; if (Projectile.velocity.X > velocityXCap || Projectile.velocity.X < -velocityXCap) Projectile.velocity.X *= 0.97f; float vel = Math.Clamp(((Math.Abs(Projectile.velocity.X) + Math.Abs(Projectile.velocity.Y)) / 2), 0f, 1f); - GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(15), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.5f, false, 10, Main.rand.NextFloat(0.8f, 1.2f), ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255))); + GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(15), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.5f, false, 10, Main.rand.NextFloat(0.8f, 1.2f), ProvUtils.GetProjectileColor(255))); if (Main.rand.NextBool()) { @@ -107,23 +88,23 @@ namespace CalamityMod.Projectiles.Boss public override Color? GetAlpha(Color lightColor) { - return ProvUtils.GetProjectileColor(Projectile.maxPenetrate, lightColor); + return ProvUtils.GetProjectileColor(lightColor); } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = Projectile.maxPenetrate == (int)Providence.BossMode.Day ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFlareNight").Value; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFlareNight").Value; int framing = texture.Height / Main.projFrames[Projectile.type]; int y6 = framing * Projectile.frame; - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, lightColor, true), 4f, texture); + Projectile.DrawBackglow(ProvUtils.GetProjectileColor(lightColor, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } public override void OnKill(int timeLeft) { - Color hiColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255, false); - Color loColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0, true); + Color hiColor = ProvUtils.GetProjectileColor(255, false); + Color loColor = ProvUtils.GetProjectileColor(0, true); for (int i = 0; i < 25; i++) { @@ -142,20 +123,13 @@ namespace CalamityMod.Projectiles.Boss SoundEngine.PlaySound(SoundID.Item100.WithPitchOffset(0.4f), Projectile.Center); } - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - //In GFB, "real damage" is replaced with negative healing - if (Projectile.maxPenetrate >= (int)Providence.BossMode.Red) - modifiers.SourceDamage *= 0f; - } - public override void OnHitPlayer(Player target, Player.HurtInfo info) { // If the player is dodging, don't apply debuffs - if ((info.Damage <= 0 && Projectile.maxPenetrate < (int)Providence.BossMode.Red) || target.creativeGodMode) + if (info.Damage <= 0 || target.creativeGodMode) return; - ProvUtils.ApplyHitEffects(target, Projectile.maxPenetrate, 120, 20); + ProvUtils.ApplyDebuffs(target, 120); } } } diff --git a/Projectiles/Boss/HolySpear.cs b/Projectiles/Boss/HolySpear.cs index df12252236..2cd2e6925c 100644 --- a/Projectiles/Boss/HolySpear.cs +++ b/Projectiles/Boss/HolySpear.cs @@ -55,26 +55,9 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - Lighting.AddLight(Projectile.Center, 0.45f * Projectile.Opacity, 0.35f * Projectile.Opacity, 0f); + ProvUtils.ApplyGFBDamage(Projectile, 120, 20); - // Day mode by default but syncs with the boss - if (CalamityGlobalNPC.holyBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.holyBoss].active) - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - } - else if (CalamityGlobalNPC.doughnutBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].active) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].Calamity().CurrentlyEnraged) - Projectile.maxPenetrate = (int)Providence.BossMode.Night; - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - } - } - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; + Lighting.AddLight(Projectile.Center, 0.45f * Projectile.Opacity, 0.35f * Projectile.Opacity, 0f); if (Projectile.localAI[0] == 0f) { @@ -86,14 +69,14 @@ namespace CalamityMod.Projectiles.Boss bool commanderSpear = Projectile.ai[0] == -1f; bool enragedCommanderSpear = Projectile.ai[0] == -2f; - float timeGateValue = (Projectile.maxPenetrate != (int)Providence.BossMode.Day) ? 420f : ((commanderSpear || enragedCommanderSpear) ? 360f : 540f); + float timeGateValue = !ProvUtils.DayAI() ? 420f : ((commanderSpear || enragedCommanderSpear) ? 360f : 540f); if (Projectile.ai[0] <= 0f) { Projectile.ai[1] += 1f; - float slowGateValue = (Projectile.maxPenetrate != (int)Providence.BossMode.Day) ? 60f : ((commanderSpear || enragedCommanderSpear) ? 30f : 90f); + float slowGateValue = !ProvUtils.DayAI() ? 60f : ((commanderSpear || enragedCommanderSpear) ? 30f : 90f); float fastGateValue = 30f; - float minVelocity = (Projectile.maxPenetrate != (int)Providence.BossMode.Day) ? 4f : (enragedCommanderSpear ? 6f : commanderSpear ? 4.5f : 3f); + float minVelocity = !ProvUtils.DayAI() ? 4f : (enragedCommanderSpear ? 6f : commanderSpear ? 4.5f : 3f); float maxVelocity = minVelocity * 4f; float extremeVelocity = maxVelocity * 2f; float deceleration = 0.95f; @@ -122,8 +105,8 @@ namespace CalamityMod.Projectiles.Boss } else { - float frequency = (Projectile.maxPenetrate != (int)Providence.BossMode.Day) ? 0.2f : 0.1f; - float amplitude = (Projectile.maxPenetrate != (int)Providence.BossMode.Day) ? 4f : 2f; + float frequency = !ProvUtils.DayAI() ? 0.2f : 0.1f; + float amplitude = !ProvUtils.DayAI() ? 4f : 2f; Projectile.ai[1] += frequency; @@ -145,49 +128,27 @@ namespace CalamityMod.Projectiles.Boss Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; bool aimedSpear = Projectile.ai[0] > 0f; - int red = 255; - int green = 255; - int blue = 0; - switch (Projectile.maxPenetrate) - { - case (int)Providence.BossMode.Red: - red = 255; - green = aimedSpear ? 0 : 125; - blue = aimedSpear ? 0 : 255; - break; - case (int)Providence.BossMode.Orange: - red = 255; - green = 125; - blue = aimedSpear ? 0 : 175; - break; - case (int)Providence.BossMode.Yellow: //Same as day - case (int)Providence.BossMode.Day: - red = 255; - green = aimedSpear ? 255 : 125; - blue = aimedSpear ? 25 : 125; - break; - case (int)Providence.BossMode.Green: - red = 0; - green = 255; - blue = aimedSpear ? 0 : 175; - break; - case (int)Providence.BossMode.Blue: //Same as night - case (int)Providence.BossMode.Night: - red = aimedSpear ? 100 : 175; - green = aimedSpear ? 255 : 175; - blue = 255; - break; - case (int)Providence.BossMode.Violet: - red = aimedSpear ? 125 : 255; - green = aimedSpear ? 0 : 255; - blue = 125; - break; - default: - break; - } - Color baseColor = new Color(red, green, blue, 0); + Color baseColor = new Color(255, aimedSpear ? 255 : 125, aimedSpear ? 25 : 125); // Default to day - GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(20), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity, false, 15, Main.rand.NextFloat(0.5f, 1.5f) * MathHelper.Clamp(Projectile.velocity.Length() / 15, 0f, 2f), aimedSpear ? baseColor : ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255, false))); + if (Main.zenithWorld) + { + if (Main.GlobalTimeWrappedHourly % 6f >= 5f) // Violet + baseColor = new Color(aimedSpear ? 125 : 255, aimedSpear ? 0 : 255, 125); + else if (Main.GlobalTimeWrappedHourly % 6f >= 4f) // Blue + baseColor = new Color(aimedSpear ? 100 : 175, aimedSpear ? 255 : 175, 255); + else if (Main.GlobalTimeWrappedHourly % 6f >= 3f) // Green + baseColor = new Color(0, 255, aimedSpear ? 0 : 175); + else if (Main.GlobalTimeWrappedHourly % 6f >= 2f) // Yellow + baseColor = new Color(255, aimedSpear ? 255 : 125, aimedSpear ? 25 : 125); + else if (Main.GlobalTimeWrappedHourly % 6f >= 1f) // Orange + baseColor = new Color(255, 125, aimedSpear ? 0 : 175); + else // Red + baseColor = new Color(255, aimedSpear ? 0 : 125, aimedSpear ? 0 : 255); + } + else if (!ProvUtils.DayAI()) + baseColor = new Color(aimedSpear ? 100 : 175, aimedSpear ? 255 : 175, 255); + + GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(20), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity, false, 15, Main.rand.NextFloat(0.5f, 1.5f) * MathHelper.Clamp(Projectile.velocity.Length() / 15, 0f, 2f), aimedSpear ? baseColor : ProvUtils.GetProjectileColor(255, false))); } public override bool PreDraw(ref Color lightColor) @@ -195,53 +156,31 @@ namespace CalamityMod.Projectiles.Boss Texture2D drawTexture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; bool aimedSpear = Projectile.ai[0] > 0f; - int red = 255; - int green = 255; - int blue = 0; - switch (Projectile.maxPenetrate) - { - case (int)Providence.BossMode.Red: - red = 255; - green = aimedSpear ? 0 : 125; - blue = aimedSpear ? 0 : 255; - break; - case (int)Providence.BossMode.Orange: - red = 255; - green = 125; - blue = aimedSpear ? 0 : 175; - break; - case (int)Providence.BossMode.Yellow: //Same as day - case (int)Providence.BossMode.Day: - red = 255; - green = aimedSpear ? 255 : 125; - blue = aimedSpear ? 0 : 125; - break; - case (int)Providence.BossMode.Green: - red = 0; - green = 255; - blue = aimedSpear ? 0 : 175; - break; - case (int)Providence.BossMode.Blue: //Same as night - case (int)Providence.BossMode.Night: - red = aimedSpear ? 100 : 175; - green = aimedSpear ? 255 : 175; - blue = 255; - break; - case (int)Providence.BossMode.Violet: - red = aimedSpear ? 125 : 255; - green = aimedSpear ? 0 : 255; - blue = 125; - break; - default: - break; - } - Color baseColor = new Color(red, green, blue, 0); + Color baseColor = new Color(255, aimedSpear ? 255 : 125, aimedSpear ? 25 : 125); // Default to day Color baseColor2 = new Color(15, 35, 50, 0); + if (Main.zenithWorld) + { + if (Main.GlobalTimeWrappedHourly % 6f >= 5f) // Violet + baseColor = new Color(aimedSpear ? 125 : 255, aimedSpear ? 0 : 255, 125); + else if (Main.GlobalTimeWrappedHourly % 6f >= 4f) // Blue + baseColor = new Color(aimedSpear ? 100 : 175, aimedSpear ? 255 : 175, 255); + else if (Main.GlobalTimeWrappedHourly % 6f >= 3f) // Green + baseColor = new Color(0, 255, aimedSpear ? 0 : 175); + else if (Main.GlobalTimeWrappedHourly % 6f >= 2f) // Yellow + baseColor = new Color(255, aimedSpear ? 255 : 125, aimedSpear ? 25 : 125); + else if (Main.GlobalTimeWrappedHourly % 6f >= 1f) // Orange + baseColor = new Color(255, 125, aimedSpear ? 0 : 175); + else // Red + baseColor = new Color(255, aimedSpear ? 0 : 125, aimedSpear ? 0 : 255); + } + else if (!ProvUtils.DayAI()) + baseColor = new Color(aimedSpear ? 100 : 175, aimedSpear ? 255 : 175, 255); + if (!aimedSpear) { - baseColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0); - baseColor2 = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0, true); + baseColor = ProvUtils.GetProjectileColor(0); + baseColor2 = ProvUtils.GetProjectileColor(0, true); } Vector2 projDirection = Main.screenPosition - new Vector2(0f, Projectile.gfxOffY); @@ -274,25 +213,18 @@ namespace CalamityMod.Projectiles.Boss return false; } - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - //In GFB, "real damage" is replaced with negative healing - if (Projectile.maxPenetrate >= (int)Providence.BossMode.Red) - modifiers.SourceDamage *= 0f; - } - public override void OnHitPlayer(Player target, Player.HurtInfo info) { // If the player is dodging, don't apply debuffs - if ((info.Damage <= 0 && Projectile.maxPenetrate < (int)Providence.BossMode.Red) || target.creativeGodMode) + if (info.Damage <= 0 || target.creativeGodMode) return; - ProvUtils.ApplyHitEffects(target, Projectile.maxPenetrate, 120, 20); + ProvUtils.ApplyDebuffs(target, 120); } public override Color? GetAlpha(Color lightColor) { - return ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0, false); + return ProvUtils.GetProjectileColor(0, false); } } } diff --git a/Projectiles/Boss/MoltenBlast.cs b/Projectiles/Boss/MoltenBlast.cs index bf3ea364de..ef0569297f 100644 --- a/Projectiles/Boss/MoltenBlast.cs +++ b/Projectiles/Boss/MoltenBlast.cs @@ -53,6 +53,8 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + ProvUtils.ApplyGFBDamage(Projectile, 160, 20); + Lighting.AddLight(Projectile.Center, 0.45f, 0.35f, 0f); if (Projectile.timeLeft > TimeLeft - AccelerationTime) @@ -61,26 +63,6 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.Hitbox.Intersects(new Rectangle((int)Projectile.ai[0], (int)Projectile.ai[1], Player.defaultWidth, Player.defaultHeight))) Projectile.tileCollide = true; - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - // Day mode by default but syncs with the boss - if (CalamityGlobalNPC.holyBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.holyBoss].active) - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - } - else if (CalamityGlobalNPC.doughnutBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].active) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].Calamity().CurrentlyEnraged) - Projectile.maxPenetrate = (int)Providence.BossMode.Night; - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - } - } - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - Projectile.frameCounter++; if (Projectile.frameCounter > 6) { @@ -90,7 +72,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.frame > 3) Projectile.frame = 0; - int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); + int dustType = ProvUtils.GetDustID(); if (Projectile.localAI[1] == 0f) { for (int d = 0; d < 10; d++) @@ -130,7 +112,7 @@ namespace CalamityMod.Projectiles.Boss float vel = Math.Clamp(((Math.Abs(Projectile.velocity.X) + Math.Abs(Projectile.velocity.Y)) / 2), 0f, 1f); - GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(15), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.5f, false, 10, Main.rand.NextFloat(0.8f, 1.2f), ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255))); + GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(15), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.5f, false, 10, Main.rand.NextFloat(0.8f, 1.2f), ProvUtils.GetProjectileColor(255))); if (Main.rand.NextBool()) { @@ -140,23 +122,23 @@ namespace CalamityMod.Projectiles.Boss public override Color? GetAlpha(Color lightColor) { - return ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0); + return ProvUtils.GetProjectileColor(0); } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/MoltenBlastNight").Value; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/MoltenBlastNight").Value; int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; int y6 = framing * Projectile.frame; - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, Projectile.alpha, true), 4f, texture); + Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } public override void OnKill(int timeLeft) { - Color hiColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255, false); - Color loColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0, true); + Color hiColor = ProvUtils.GetProjectileColor(255, false); + Color loColor = ProvUtils.GetProjectileColor(0, true); for (int i = 0; i < 25; i++) { @@ -171,7 +153,7 @@ namespace CalamityMod.Projectiles.Boss } GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, hiColor, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.02f, 0.045f, 5)); - int blobAmt = (Projectile.maxPenetrate != (int)Providence.BossMode.Day) ? 9 : 6; + int blobAmt = !ProvUtils.DayAI() ? 9 : 6; if (Projectile.owner == Main.myPlayer) { Vector2 additionalBlobVelocity = new Vector2(Projectile.velocity.X * 0.1f, Projectile.velocity.Y); @@ -189,20 +171,13 @@ namespace CalamityMod.Projectiles.Boss public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 18f, targetHitbox); - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - //In GFB, "real damage" is replaced with negative healing - if (Projectile.maxPenetrate >= (int)Providence.BossMode.Red) - modifiers.SourceDamage *= 0f; - } - public override void OnHitPlayer(Player target, Player.HurtInfo info) { // If the player is dodging, don't apply debuffs - if ((info.Damage <= 0 && Projectile.maxPenetrate < (int)Providence.BossMode.Red) || target.creativeGodMode) + if (info.Damage <= 0 || target.creativeGodMode) return; - ProvUtils.ApplyHitEffects(target, Projectile.maxPenetrate, 160, 20); + ProvUtils.ApplyDebuffs(target, 160); } } } diff --git a/Projectiles/Boss/MoltenBlob.cs b/Projectiles/Boss/MoltenBlob.cs index e6c1d5ced5..6e1562fccd 100644 --- a/Projectiles/Boss/MoltenBlob.cs +++ b/Projectiles/Boss/MoltenBlob.cs @@ -37,30 +37,11 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + ProvUtils.ApplyGFBDamage(Projectile, 80, 10); + Lighting.AddLight(Projectile.Center, 0.3f, 0.225f, 0f); - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - // Day mode by default but syncs with the boss - if (CalamityGlobalNPC.holyBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.holyBoss].active) - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - } - else if (CalamityGlobalNPC.doughnutBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].active) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].Calamity().CurrentlyEnraged) - Projectile.maxPenetrate = (int)Providence.BossMode.Night; - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - } - } - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - Landing += 0.1f; - Landing = MathHelper.Clamp(Landing, 0f, 1f); colliding = Projectile.velocity.Y == 0f; @@ -115,12 +96,12 @@ namespace CalamityMod.Projectiles.Boss public override Color? GetAlpha(Color lightColor) { - return ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0); + return ProvUtils.GetProjectileColor(0); } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/MoltenBlobNight").Value; + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/MoltenBlobNight").Value; int framing = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value.Height / Main.projFrames[Projectile.type]; int y6 = framing * (1 + Projectile.frame); float squish = CalamityUtils.SineBumpEasing(Landing, 1) * 0.5f; @@ -132,15 +113,15 @@ namespace CalamityMod.Projectiles.Boss Projectile.rotation = Vector2.Zero.AngleTo(Projectile.velocity) + MathHelper.PiOver2; } Vector2 vec = new Vector2(0, framing * squish); - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, Projectile.alpha, true), 4f, new Vector2(1 + squish, 1 - squish), texture, offset: vec); + Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.alpha, true), 4f, new Vector2(1 + squish, 1 - squish), texture, offset: vec); Main.spriteBatch.Draw(texture, Projectile.Center + vec - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), new Vector2(1 + squish, 1 - squish), SpriteEffects.None, 0); return false; } public override void OnKill(int timeLeft) { - Color hiColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255, false); - Color loColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0, true); + Color hiColor = ProvUtils.GetProjectileColor(255, false); + Color loColor = ProvUtils.GetProjectileColor(0, true); for (int i = 0; i < 25; i++) { @@ -156,20 +137,13 @@ namespace CalamityMod.Projectiles.Boss GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, hiColor, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.002f, 0.015f, 5)); } - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - //In GFB, "real damage" is replaced with negative healing - if (Projectile.maxPenetrate >= (int)Providence.BossMode.Red) - modifiers.SourceDamage *= 0f; - } - public override void OnHitPlayer(Player target, Player.HurtInfo info) { // If the player is dodging, don't apply debuffs - if ((info.Damage <= 0 && Projectile.maxPenetrate < (int)Providence.BossMode.Red) || target.creativeGodMode) + if (info.Damage <= 0 || target.creativeGodMode) return; - ProvUtils.ApplyHitEffects(target, Projectile.maxPenetrate, 80, 10); + ProvUtils.ApplyDebuffs(target, 80); } } } diff --git a/Projectiles/Boss/ProfanedSpear.cs b/Projectiles/Boss/ProfanedSpear.cs index c38db134b0..ecaaa25008 100644 --- a/Projectiles/Boss/ProfanedSpear.cs +++ b/Projectiles/Boss/ProfanedSpear.cs @@ -37,18 +37,6 @@ namespace CalamityMod.Projectiles.Boss { Lighting.AddLight(Projectile.Center, 0.45f, 0.35f, 0f); - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - if (CalamityGlobalNPC.doughnutBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].active) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].Calamity().CurrentlyEnraged) - Projectile.maxPenetrate = (int)Providence.BossMode.Night; - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - } - } - if (Projectile.timeLeft < 510) Projectile.tileCollide = true; @@ -73,13 +61,13 @@ namespace CalamityMod.Projectiles.Boss public override Color? GetAlpha(Color lightColor) { - return ProvUtils.GetProjectileColor(Projectile.maxPenetrate, Projectile.alpha); + return ProvUtils.GetDayNightColor(Projectile.alpha); } public override bool PreDraw(ref Color lightColor) { - Texture2D texture = (Projectile.maxPenetrate == (int)Providence.BossMode.Day) ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/ProfanedSpearNight").Value; - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(Projectile.maxPenetrate, Projectile.alpha, true), 4f, texture); + Texture2D texture = ProvUtils.DayAI() ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/ProfanedSpearNight").Value; + Projectile.DrawBackglow(ProvUtils.GetDayNightColor(Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), Projectile.scale, SpriteEffects.None, 0); CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); return false; @@ -87,8 +75,8 @@ namespace CalamityMod.Projectiles.Boss public override void OnKill(int timeLeft) { - Color hiColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255, false); - Color loColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0, true); + Color hiColor = ProvUtils.GetDayNightColor(255, false); + Color loColor = ProvUtils.GetDayNightColor(0, true); for (int i = 0; i < 25; i++) { diff --git a/Projectiles/Boss/ProvidenceCrystal.cs b/Projectiles/Boss/ProvidenceCrystal.cs index 8718275f05..a90cc4a6a7 100644 --- a/Projectiles/Boss/ProvidenceCrystal.cs +++ b/Projectiles/Boss/ProvidenceCrystal.cs @@ -91,8 +91,6 @@ namespace CalamityMod.Projectiles.Boss Player proviTarget = Main.player[Main.npc[CalamityGlobalNPC.holyBoss].target]; - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - Projectile.position.X = proviTarget.Center.X - (Projectile.width / 2); Projectile.position.Y = proviTarget.Center.Y - (Projectile.height / 2) + proviTarget.gfxOffY - 360f; if (proviTarget.gravDir == -1f) @@ -113,7 +111,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.alpha == 0 && Main.rand.NextBool(15)) { - Color BaseColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0); + Color BaseColor = ProvUtils.GetProjectileColor(0); float Brightness = 0.8f; Color DustColor = Color.Lerp(BaseColor, Color.White, Brightness); Dust crystalDust = Main.dust[Dust.NewDust(Projectile.Top, 0, 0, DustID.RainbowMk2, 0f, 0f, 100, DustColor, 1f)]; @@ -132,7 +130,7 @@ namespace CalamityMod.Projectiles.Boss // At day, fires every 300 frames but lasts 1500-3600 frames. // At night, fires every 30 framges but lasts 210 frames. // In GFB, fires at night rate for the first 210 frames, then at day rate for the next 1500. - bool dayAI = Projectile.maxPenetrate == (int)Providence.BossMode.Day || (Projectile.maxPenetrate >= (int)Providence.BossMode.Red && Projectile.timeLeft < 1500); + bool dayAI = ProvUtils.DayAI() || (Main.zenithWorld && Projectile.timeLeft < 1500); if (Projectile.localAI[0] >= (dayAI ? 300f : 30f)) { diff --git a/Projectiles/Boss/ProvidenceCrystalShard.cs b/Projectiles/Boss/ProvidenceCrystalShard.cs index 65f14061af..bfc1e781c0 100644 --- a/Projectiles/Boss/ProvidenceCrystalShard.cs +++ b/Projectiles/Boss/ProvidenceCrystalShard.cs @@ -51,23 +51,16 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + ProvUtils.ApplyGFBDamage(Projectile, 0, 10); + bool healerGuardianAlive = true; if (CalamityGlobalNPC.doughnutBossHealer < 0 || !Main.npc[CalamityGlobalNPC.doughnutBossHealer].active) healerGuardianAlive = false; Lighting.AddLight(Projectile.Center, 0.3f * Projectile.Opacity, 0.3f * Projectile.Opacity, 0.3f * Projectile.Opacity); - // Day mode by default but syncs with the boss - if (CalamityGlobalNPC.holyBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.holyBoss].active) - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - } - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - // Night AI or Guardian Healer - if (Projectile.maxPenetrate != (int)Providence.BossMode.Day || healerGuardianAlive) + if (!ProvUtils.DayAI() || healerGuardianAlive) Projectile.extraUpdates = 1; if (Projectile.timeLeft < 300) @@ -232,21 +225,5 @@ namespace CalamityMod.Projectiles.Boss } public override Color? GetAlpha(Color lightColor) => new Color(255 * Projectile.Opacity, 255 * Projectile.Opacity, 255 * Projectile.Opacity, 255 * Projectile.Opacity); - - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - // In GFB, "real damage" is replaced with negative healing - if (Projectile.maxPenetrate >= (int)Providence.BossMode.Red) - modifiers.SourceDamage *= 0f; - } - - public override void OnHitPlayer(Player target, Player.HurtInfo info) - { - // If the player is dodging, don't apply debuffs - if ((info.Damage <= 0 && Projectile.maxPenetrate < (int)Providence.BossMode.Red) || target.creativeGodMode) - return; - - ProvUtils.ApplyHitEffects(target, Projectile.maxPenetrate, 0, 10); - } } } diff --git a/Projectiles/Boss/ProvidenceHolyRay.cs b/Projectiles/Boss/ProvidenceHolyRay.cs index 49a1594ac9..72a56060bf 100644 --- a/Projectiles/Boss/ProvidenceHolyRay.cs +++ b/Projectiles/Boss/ProvidenceHolyRay.cs @@ -58,26 +58,7 @@ namespace CalamityMod.Projectiles.Boss { ExtraWidth = Projectile.ai[2]; - // Day mode by default but syncs with the boss - if (CalamityGlobalNPC.holyBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.holyBoss].active) - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - } - else if (CalamityGlobalNPC.doughnutBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].active) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].Calamity().CurrentlyEnraged) - Projectile.maxPenetrate = (int)Providence.BossMode.Night; - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - } - } - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - - bool scissorLasers = CalamityWorld.revenge || (Projectile.maxPenetrate != (int)Providence.BossMode.Day); + bool scissorLasers = CalamityWorld.revenge || !ProvUtils.DayAI(); Vector2? vector78 = null; if (Projectile.velocity.HasNaNs() || Projectile.velocity == Vector2.Zero) @@ -103,6 +84,9 @@ namespace CalamityMod.Projectiles.Boss return; } + if (projScale == 1f) + ProvUtils.ApplyGFBDamage(Projectile, 400, 20); + Projectile.scale = (float)Math.Sin(Projectile.localAI[0] * MathHelper.Pi / (scissorLasers ? 100f : 180f)) * 10f * projScale; if (Projectile.scale > projScale) Projectile.scale = projScale; @@ -131,7 +115,7 @@ namespace CalamityMod.Projectiles.Boss if (!Collision.CanHitLine(Main.npc[(int)Projectile.ai[1]].Center, 1, 1, Main.player[Main.npc[(int)Projectile.ai[1]].target].Center, 1, 1)) rayLength = 2400f; - int dustType = ProvUtils.GetDustID(Projectile.maxPenetrate); + int dustType = ProvUtils.GetDustID(); Projectile.localAI[1] = MathHelper.Lerp(Projectile.localAI[1], rayLength, 0.5f); // Length of laser, linear interpolation Vector2 dustRotation = Projectile.Center + Projectile.velocity * (Projectile.localAI[1] - 14f); for (int j = 0; j < 2; j++) @@ -158,13 +142,13 @@ namespace CalamityMod.Projectiles.Boss for (float i = 0; i < Projectile.localAI[1]; i += Main.rand.NextFloat(15, 30)) { - GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(30 * ExtraWidth), 0).RotatedBy(Main.rand.NextFloat(MathHelper.TwoPi)) + (Projectile.velocity * i), Projectile.velocity * 5, false, 5, Main.rand.NextFloat(0.5f, 1.5f), ProvUtils.GetProjectileColor((int)Projectile.maxPenetrate, 255), false)); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(30 * ExtraWidth), 0).RotatedBy(Main.rand.NextFloat(MathHelper.TwoPi)) + (Projectile.velocity * i), Projectile.velocity * 5, false, 5, Main.rand.NextFloat(0.5f, 1.5f), ProvUtils.GetProjectileColor(255), false)); } } public override Color? GetAlpha(Color lightColor) { - return ProvUtils.GetProjectileColor(Projectile.maxPenetrate, lightColor); + return ProvUtils.GetProjectileColor(lightColor); } public override bool PreDraw(ref Color lightColor) @@ -174,7 +158,7 @@ namespace CalamityMod.Projectiles.Boss Vector2 scale = new Vector2(Projectile.scale * ExtraWidth, Projectile.scale); - bool dayTime = Projectile.maxPenetrate == (int)Providence.BossMode.Day; + bool dayTime = ProvUtils.DayAI(); Texture2D texture2D19 = dayTime ? ModContent.Request(Texture, AssetRequestMode.ImmediateLoad).Value : ModContent.Request("CalamityMod/Projectiles/Boss/ProvidenceHolyRayNight", AssetRequestMode.ImmediateLoad).Value; Texture2D texture2D20 = dayTime ? ModContent.Request("CalamityMod/ExtraTextures/Lasers/ProvidenceHolyRayMid", AssetRequestMode.ImmediateLoad).Value : @@ -183,7 +167,7 @@ namespace CalamityMod.Projectiles.Boss ModContent.Request("CalamityMod/ExtraTextures/Lasers/ProvidenceHolyRayEndNight", AssetRequestMode.ImmediateLoad).Value; float rayDrawLength = Projectile.localAI[1]; //length of laser - Color baseColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, lightColor); + Color baseColor = ProvUtils.GetProjectileColor(lightColor); Vector2 vector = Projectile.Center - Main.screenPosition; Rectangle? sourceRectangle2 = null; Main.spriteBatch.Draw(texture2D19, vector, sourceRectangle2, baseColor, Projectile.rotation, texture2D19.Size() / 2f, scale, SpriteEffects.None, 0); @@ -196,7 +180,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.localAI[2]++; - Color glowColor = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 0); + Color glowColor = ProvUtils.GetProjectileColor(0); Main.EntitySpriteDraw(GlowBallTexture, Projectile.Center - Main.screenPosition, GlowBallTexture.Frame(), glowColor, 0f, GlowBallTexture.Frame().Center(), Projectile.scale / 1.5f * ExtraWidth, SpriteEffects.None); Main.EntitySpriteDraw(GlowRingTexture, Projectile.Center - Main.screenPosition, GlowRingTexture.Frame(), glowColor, 0f, GlowRingTexture.Frame().Center(), Projectile.scale / MathHelper.Lerp(1.5f, 1f, (float)Math.Sin(Projectile.localAI[2] / 20f) * 0.5f) * ExtraWidth, SpriteEffects.None); @@ -250,20 +234,13 @@ namespace CalamityMod.Projectiles.Boss return false; } - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - // In GFB, "real damage" is replaced with negative healing - if (Projectile.maxPenetrate >= (int)Providence.BossMode.Red) - modifiers.SourceDamage *= 0f; - } - public override void OnHitPlayer(Player target, Player.HurtInfo info) { // If the player is dodging, don't apply debuffs - if ((info.Damage <= 0 && Projectile.maxPenetrate < (int)Providence.BossMode.Red) || target.creativeGodMode) + if (info.Damage <= 0 || target.creativeGodMode) return; - ProvUtils.ApplyHitEffects(target, Projectile.maxPenetrate, 400, 20); + ProvUtils.ApplyDebuffs(target, 400); } public override bool CanHitPlayer(Player target) => Projectile.scale >= 0.5f; diff --git a/Projectiles/Boss/SwirlingFire.cs b/Projectiles/Boss/SwirlingFire.cs index 42758283fe..f5554e4fb8 100644 --- a/Projectiles/Boss/SwirlingFire.cs +++ b/Projectiles/Boss/SwirlingFire.cs @@ -30,26 +30,7 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - - if (CalamityGlobalNPC.holyBoss != -1) - { - Projectile.maxPenetrate = (int)Main.npc[CalamityGlobalNPC.holyBoss].localAI[1]; - } - - if (CalamityGlobalNPC.doughnutBoss != -1) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].active) - { - if (Main.npc[CalamityGlobalNPC.doughnutBoss].Calamity().CurrentlyEnraged) - Projectile.maxPenetrate = (int)Providence.BossMode.Night; - else - Projectile.maxPenetrate = (int)Providence.BossMode.Day; - } - } - - Color c = ProvUtils.GetProjectileColor(Projectile.maxPenetrate, 255); + Color c = ProvUtils.GetProjectileColor(255); GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center, Projectile.velocity / 2f, false, 10, 0.5f * Projectile.ai[2], c)); GeneralParticleHandler.SpawnParticle(new MediumMistParticle(Projectile.Center, Vector2.Zero, Color.LightSlateGray, Color.DarkSlateGray, 0.5f * Projectile.ai[2], 150, Main.rand.NextFloat(-0.01f, 0.01f))); diff --git a/Projectiles/Summon/MiniGuardianAttack.cs b/Projectiles/Summon/MiniGuardianAttack.cs index 26db5b6ad2..7618a2ec74 100644 --- a/Projectiles/Summon/MiniGuardianAttack.cs +++ b/Projectiles/Summon/MiniGuardianAttack.cs @@ -323,9 +323,8 @@ namespace CalamityMod.Projectiles.Summon if (shouldDrawDust) { - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); var shouldAdjust = !Main.dayTime && buffedAi; - int dustId = ProvUtils.GetDustID(pscState); + int dustId = ProvUtils.GetDustID(!Main.dayTime); for (int i = 0; i < 6; i++) { Dust dust = Dust.NewDustPerfect(Projectile.Center + (Projectile.Size / 2f).RotatedBy(Projectile.rotation), dustId); diff --git a/Projectiles/Summon/MiniGuardianDefense.cs b/Projectiles/Summon/MiniGuardianDefense.cs index 7f05149aa0..ff490d34a0 100644 --- a/Projectiles/Summon/MiniGuardianDefense.cs +++ b/Projectiles/Summon/MiniGuardianDefense.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 dustPos = new Vector2(Owner.Center.X + Main.rand.NextFloat(-10, 10), Owner.Center.Y + Main.rand.NextFloat(-10, 10)); Vector2 velocity = (Owner.Center - dustPos).SafeNormalize(Vector2.Zero); velocity *= (Main.dayTime || !SpawnedFromPSC) ? 3f : 6.9f; - var dust = Dust.NewDustPerfect(Owner.Center, ProvUtils.GetDustID((float)((Main.dayTime || !SpawnedFromPSC) ? Providence.BossMode.Day : Providence.BossMode.Night)), velocity, 0, default(Color), 2f); + var dust = Dust.NewDustPerfect(Owner.Center, ProvUtils.GetDustID(!Main.dayTime && SpawnedFromPSC), velocity, 0, default(Color), 2f); if (!Main.dayTime && SpawnedFromPSC) dust.noGravity = true; } @@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Summon if (!Main.rand.NextBool(3)) continue; - Dust dust = Dust.NewDustDirect(Owner.position, Owner.width, Owner.height, ProvUtils.GetDustID((float)((Main.dayTime || !SpawnedFromPSC) ? Providence.BossMode.Day : Providence.BossMode.Night))); + Dust dust = Dust.NewDustDirect(Owner.position, Owner.width, Owner.height, ProvUtils.GetDustID(!Main.dayTime && SpawnedFromPSC)); dust.velocity = Main.rand.NextVector2Circular(3.5f, 3.5f); dust.velocity.Y -= Main.rand.NextFloat(1f, 3f); dust.scale = Main.rand.NextFloat(1.15f, 1.45f); diff --git a/Projectiles/Summon/MiniGuardianHealer.cs b/Projectiles/Summon/MiniGuardianHealer.cs index bd791dc12e..4db64bdb9b 100644 --- a/Projectiles/Summon/MiniGuardianHealer.cs +++ b/Projectiles/Summon/MiniGuardianHealer.cs @@ -314,9 +314,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 spawnPosition = player.Center + Main.rand.NextVector2Unit() * outwardness * Main.rand.NextFloat(0.75f, 1.1f); Vector2 dustVelocity = (player.Center - spawnPosition) * 0.085f + owner.velocity; - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - - Dust dust = Dust.NewDustPerfect(spawnPosition, ProvUtils.GetDustID(pscState)); + Dust dust = Dust.NewDustPerfect(spawnPosition, ProvUtils.GetDustID(!Main.dayTime)); dust.velocity = dustVelocity; dust.scale = dustScale * Main.rand.NextFloat(0.75f, 1.15f); dust.color = Color.Lerp(Color.LightCoral, Color.White, Projectile.ai[2] / 120 * Main.rand.NextFloat(0.65f, 1f)); diff --git a/Projectiles/Summon/MiniGuardianHolyRay.cs b/Projectiles/Summon/MiniGuardianHolyRay.cs index c2fa1521ab..a5c7f9dd29 100644 --- a/Projectiles/Summon/MiniGuardianHolyRay.cs +++ b/Projectiles/Summon/MiniGuardianHolyRay.cs @@ -107,8 +107,7 @@ namespace CalamityMod.Projectiles.Summon // Fire laser through walls at max length num807 = 2400f; - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - int dustType = ProvUtils.GetDustID(pscState); + int dustType = ProvUtils.GetDustID(!Main.dayTime); float amount = 0.5f; Projectile.localAI[1] = MathHelper.Lerp(Projectile.localAI[1], num807, amount); // Length of laser, linear interpolation Vector2 vector79 = Projectile.Center + Projectile.velocity * (Projectile.localAI[1] - 14f); @@ -149,8 +148,7 @@ namespace CalamityMod.Projectiles.Summon ModContent.Request("CalamityMod/ExtraTextures/Lasers/ProvidenceHolyRayEndNight", AssetRequestMode.ImmediateLoad).Value; float num223 = Projectile.localAI[1]; //length of laser - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - Color color44 = ProvUtils.GetProjectileColor(pscState, 0) * 0.9f; + Color color44 = ProvUtils.GetDayNightColor(!Main.dayTime, 0) * 0.9f; Vector2 vector = Projectile.Center - Main.screenPosition; Rectangle? sourceRectangle2 = null; Main.spriteBatch.Draw(texture2D19, vector, sourceRectangle2, color44, Projectile.rotation, texture2D19.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); diff --git a/Projectiles/Summon/MiniGuardianStars.cs b/Projectiles/Summon/MiniGuardianStars.cs index 2d2092bd96..94fec64eb7 100644 --- a/Projectiles/Summon/MiniGuardianStars.cs +++ b/Projectiles/Summon/MiniGuardianStars.cs @@ -87,8 +87,7 @@ namespace CalamityMod.Projectiles.Summon { SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); Projectile.ExpandHitboxBy(50); - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - int dustType = ProvUtils.GetDustID(pscState); + int dustType = ProvUtils.GetDustID(!Main.dayTime); for (int d = 0; d < 5; d++) { int holy = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); @@ -118,9 +117,6 @@ namespace CalamityMod.Projectiles.Summon public override void OnHitPlayer(Player target, Player.HurtInfo info) { - if ((info.Damage <= 0 && Projectile.maxPenetrate < (int)Providence.BossMode.Red) || target.creativeGodMode) - return; - Projectile.Kill(); } } diff --git a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs index 5b17d39ef2..3d7c55e6ed 100644 --- a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs +++ b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Summon public override void AI() { int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - int dustID = ProvUtils.GetDustID(pscState); + int dustID = ProvUtils.GetDustID(!Main.dayTime); int num469 = Dust.NewDust(Projectile.Center, Projectile.width, Projectile.height, dustID, 0f, 0f, 100, default, 1f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; @@ -137,8 +137,7 @@ namespace CalamityMod.Projectiles.Summon public override Color? GetAlpha(Color lightColor) { - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - return ProvUtils.GetProjectileColor(pscState, Projectile.alpha); + return ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha); } public override bool PreDraw(ref Color lightColor) @@ -146,8 +145,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBlastNight").Value; int num214 = texture.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(pscState, Projectile.alpha, true), 4f, texture); + Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } @@ -180,8 +178,7 @@ namespace CalamityMod.Projectiles.Summon Split(false, false); } SoundEngine.PlaySound(SoundID.Item20, Projectile.position); - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - int dustID = ProvUtils.GetDustID(pscState); + int dustID = ProvUtils.GetDustID(!Main.dayTime); for (int num193 = 0; num193 < 6; num193++) { Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, 0f, 0f, 50, default, 1.5f); @@ -251,7 +248,7 @@ namespace CalamityMod.Projectiles.Summon } if (Projectile.timeLeft > 550) Projectile.velocity *= 0.95f; - int num469 = Dust.NewDust(Projectile.Center, Projectile.width, Projectile.height, ProvUtils.GetDustID((float)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night)), 0f, 0f, 100, default, Main.dayTime ? 1f : 0.75f); + int num469 = Dust.NewDust(Projectile.Center, Projectile.width, Projectile.height, ProvUtils.GetDustID(!Main.dayTime), 0f, 0f, 100, default, Main.dayTime ? 1f : 0.75f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; @@ -329,17 +326,15 @@ namespace CalamityMod.Projectiles.Summon public override Color? GetAlpha(Color lightColor) { - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - return ProvUtils.GetProjectileColor(pscState, Projectile.alpha); + return ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha); } public override bool PreDraw(ref Color lightColor) { - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFire2Night").Value; int num214 = texture.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(pscState, Projectile.alpha, true), 4f, texture); + Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } @@ -380,8 +375,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.width = Projectile.height = 200; Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2); Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - int dust = ProvUtils.GetDustID(pscState); + int dust = ProvUtils.GetDustID(!Main.dayTime); for (int num621 = 0; num621 < 4; num621++) { int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); @@ -507,9 +501,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(pscState, Projectile.alpha, true), 4f, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], ProvUtils.GetProjectileColor(pscState, Projectile.alpha), 1); + Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha), 1); return false; } @@ -524,8 +517,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.width = Projectile.height = 200; Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2); Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - int dust = ProvUtils.GetDustID(pscState); + int dust = ProvUtils.GetDustID(!Main.dayTime); for (int num621 = 0; num621 < 4; num621++) { int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); @@ -736,8 +728,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.velocity *= boomerSwarm ? 1.03f : 1.02f; - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - int dust = ProvUtils.GetDustID(pscState); + int dust = ProvUtils.GetDustID(!Main.dayTime); int num469 = Dust.NewDust(Projectile.Center, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, 1f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; @@ -747,8 +738,7 @@ namespace CalamityMod.Projectiles.Summon public override Color? GetAlpha(Color lightColor) { - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - return ProvUtils.GetProjectileColor(pscState, Projectile.alpha); + return ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha); } public override bool PreDraw(ref Color lightColor) @@ -756,8 +746,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Summon/ProfanedCrystalRangedHugesNight").Value; int num214 = texture.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(pscState, Projectile.alpha, true), 4f, texture); + Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } @@ -792,8 +781,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.width = Projectile.height = 200; Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2); Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - int dust = ProvUtils.GetDustID(pscState); + int dust = ProvUtils.GetDustID(!Main.dayTime); for (int num621 = 0; num621 < 4; num621++) { int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); @@ -922,8 +910,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.height = 50; Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2); Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - int dust = ProvUtils.GetDustID(pscState); + int dust = ProvUtils.GetDustID(!Main.dayTime); for (int num621 = 0; num621 < 10; num621++) { int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, 0f, 0f, 100, default, Main.dayTime ? 2f : 0.5f); @@ -956,16 +943,14 @@ namespace CalamityMod.Projectiles.Summon public override Color? GetAlpha(Color lightColor) { - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - return ProvUtils.GetProjectileColor(pscState, Projectile.alpha); + return ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha); } public override bool PreDraw(ref Color lightColor) { Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; int num214 = texture.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(pscState, Projectile.alpha, true), 4f, texture); + Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } @@ -1507,9 +1492,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 spawnPosition = Projectile.Center + Main.rand.NextVector2Unit() * outwardness * Main.rand.NextFloat(0.75f, 1.1f); Vector2 dustVelocity = (Projectile.Center - spawnPosition) * 0.085f + owner.velocity; - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - - Dust dust = Dust.NewDustPerfect(spawnPosition, ProvUtils.GetDustID(pscState)); + Dust dust = Dust.NewDustPerfect(spawnPosition, ProvUtils.GetDustID(!Main.dayTime)); dust.velocity = dustVelocity; dust.scale = dustScale * Main.rand.NextFloat(0.75f, 1.15f); dust.noGravity = true; @@ -1567,7 +1550,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 dustPos = new Vector2(Owner.Center.X + Main.rand.NextFloat(-10, 10), Owner.Center.Y + Main.rand.NextFloat(-10, 10)); Vector2 velocity = (Owner.Center - dustPos).SafeNormalize(Vector2.Zero); velocity *= Main.dayTime ? 3f : 6.9f; - var dust = Dust.NewDustPerfect(Owner.Center, ProvUtils.GetDustID((float)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night)), velocity, 0, default(Color), 2f); + var dust = Dust.NewDustPerfect(Owner.Center, ProvUtils.GetDustID(!Main.dayTime), velocity, 0, default(Color), 2f); if (!Main.dayTime) dust.noGravity = true; } @@ -1795,8 +1778,7 @@ namespace CalamityMod.Projectiles.Summon //Ensure that psa's spears are not coloured by night var psc = Projectile.ai[0] > 0f; - int pscState = (int)((!Main.dayTime && psc) ? Providence.BossMode.Night : Providence.BossMode.Day); - int num469 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ProvUtils.GetDustID(pscState), 0f, 0f, 100, default, !Main.dayTime && psc ? 0.5f : 1f); + int num469 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ProvUtils.GetDustID(!Main.dayTime && psc), 0f, 0f, 100, default, !Main.dayTime && psc ? 0.5f : 1f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; handleAI(psc && Projectile.ai[1] > 0f); @@ -1813,9 +1795,8 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { var psc = Projectile.ai[0] > 0f; - int pscState = (int)((!Main.dayTime && psc) ? Providence.BossMode.Night : Providence.BossMode.Day); - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(pscState, Projectile.alpha, true), 4f, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], ProvUtils.GetProjectileColor(pscState, Projectile.alpha), 1); + Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime && psc, Projectile.alpha, true), 4f, Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], ProvUtils.GetDayNightColor(!Main.dayTime && psc, Projectile.alpha), 1); return false; } @@ -1830,9 +1811,8 @@ namespace CalamityMod.Projectiles.Summon Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2); Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); var psc = Projectile.ai[0] > 0f; - var shouldAdjust = !Main.dayTime && psc; - int pscState = (int)(shouldAdjust ? Providence.BossMode.Night : Providence.BossMode.Day); - int dustID = ProvUtils.GetDustID(pscState); + bool shouldAdjust = !Main.dayTime && psc; + int dustID = ProvUtils.GetDustID(shouldAdjust); for (int num621 = 0; num621 < 4; num621++) { int num622 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, 0f, 0f, 100, default, !Main.dayTime && psc ? 0.5f : 2f); @@ -1927,16 +1907,14 @@ namespace CalamityMod.Projectiles.Summon Projectile.damage = (int)Owner.GetTotalDamage().ApplyTo(Projectile.originalDamage); Projectile.damage = Owner.ApplyArmorAccDamageBonusesTo(Projectile.damage); - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - int num469 = Dust.NewDust(Projectile.Center, Projectile.width, Projectile.height, ProvUtils.GetDustID(pscState), 0f, 0f, 100, default, 1f); + int num469 = Dust.NewDust(Projectile.Center, Projectile.width, Projectile.height, ProvUtils.GetDustID(!Main.dayTime), 0f, 0f, 100, default, 1f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; } public override Color? GetAlpha(Color lightColor) { - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - return ProvUtils.GetProjectileColor(pscState, Projectile.alpha); + return ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha); } public override bool PreDraw(ref Color lightColor) @@ -1944,8 +1922,7 @@ namespace CalamityMod.Projectiles.Summon Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyBlastNight").Value; int num214 = texture.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(pscState, Projectile.alpha, true), 4f, texture); + Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } @@ -1980,8 +1957,7 @@ namespace CalamityMod.Projectiles.Summon Split(); } SoundEngine.PlaySound(HolyBlast.ImpactSound, Projectile.Center); - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - int dustID = ProvUtils.GetDustID(pscState); + int dustID = ProvUtils.GetDustID(!Main.dayTime); for (int num193 = 0; num193 < 6; num193++) { Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustID, 0f, 0f, 50, default, Main.dayTime ? 1.5f : 0.5f); @@ -2077,17 +2053,15 @@ namespace CalamityMod.Projectiles.Summon public override Color? GetAlpha(Color lightColor) { - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - return ProvUtils.GetProjectileColor(pscState, Projectile.alpha); + return ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha); } public override bool PreDraw(ref Color lightColor) { - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); Texture2D texture = Main.dayTime ? Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFire2Night").Value; int num214 = texture.Height / Main.projFrames[Projectile.type]; int y6 = num214 * Projectile.frame; - Projectile.DrawBackglow(ProvUtils.GetProjectileColor(pscState, Projectile.alpha, true), 4f, texture); + Projectile.DrawBackglow(ProvUtils.GetDayNightColor(!Main.dayTime, Projectile.alpha, true), 4f, texture); Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, num214)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, num214 / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } @@ -2102,8 +2076,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2); Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); - int pscState = (int)(Main.dayTime ? Providence.BossMode.Day : Providence.BossMode.Night); - int dust = ProvUtils.GetDustID(pscState); + int dust = ProvUtils.GetDustID(!Main.dayTime); for (int num621 = 0; num621 < 4; num621++) { From d5a7ea57c15e38e00c777c921d1f320265bf96b3 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 2 Aug 2024 12:49:38 -0400 Subject: [PATCH 03/16] Ashen Stalactite resprite --- Items/Weapons/Rogue/AshenStalactite.cs | 2 +- Items/Weapons/Rogue/AshenStalactite.png | Bin 567 -> 935 bytes Projectiles/Rogue/AshenStalactiteDebris.png | Bin 231 -> 240 bytes Projectiles/Rogue/AshenStalagmiteProj.png | Bin 671 -> 603 bytes 4 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/AshenStalactite.cs b/Items/Weapons/Rogue/AshenStalactite.cs index 50d0e9b31b..38d580285a 100644 --- a/Items/Weapons/Rogue/AshenStalactite.cs +++ b/Items/Weapons/Rogue/AshenStalactite.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 36; - Item.height = 34; + Item.height = 36; Item.damage = 37; Item.noMelee = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Rogue/AshenStalactite.png b/Items/Weapons/Rogue/AshenStalactite.png index aafd03c7af72b746ef673322541f5bd0c8807ca8..7eda8b46b2d9d93d86bdf546733fe6ebb6aeca4b 100644 GIT binary patch delta 926 zcmV;P17ZBP1g8g(7k?xO1^@s6;Q*MJ00001b5ch_0Itp)=>Px&VM#$9L{$va_9X)zZzWV-82lIl0%{Rcr5Ev18{S!hBobO)S$R{3{?XB! zuE+c5`|WD10k!EAsF}@x!+qzo@WIY4;DvqPgKg`w5lJL;rvk-9Vyh@E0h!6EENou0 z0=!mm9&9>z0e>`Ar6M>!Jca}kD!knQTk69x&0y0(|cKl}6MlXO|A zroIb7FWR=Y;VO|wSJdVO{A|zXpz@(*xi^8(Vq{`V9-)S!K;Y!kFuA?7suk>deLeW< z!=pLZkbe^`Hz4!%H{XVJp{sX&*A1#GmqjozK6OhMN*KpQ^>f>AwdNrr8 z-MQ+DEhZIL*+};Z(0Ar6=p8)0;0&&I^TjNAgnyo^Sq;id3InMPPl39Tez3CrY4GKt zUqN3kr(%1*eJg0M2#UU=bN_#_ul2iU2^C(v9Ojr)e+4CVp)))m3ttO;>5vmGYs1W( zPVWfoKZmb{cYoLm-hQ&}P#1|3z7hePv1k2~bvj6}907*qoM6N<$f~U>J AbN~PV delta 555 zcmV+`0@VGd2e$-}7k?rM1^@s6H(7gy00006VoOIv0RI600RN!9r;`8x0nSN8K~z}7 z-PgTO!ay9x@ox>JP!Xb%f`}3lU34&UG;wiu;BVA_z{OSL*x5S< zG!zQ`wu~C>gofTBArdi70H%|k%=NX?QATtpV<(LNDWr;+VXv08r+O1$G9CwDv#<`p zB53fza%{*=D0c0a$Ut4nkz zVwwiPNvSl@4QVG7*rAtKZ{HC+vDzImwbkjJN=+F6m4C|pmu^Tqp^pxU?!;r`0J#3F zQg>t#v6>!Sx8ryAyQ;Jo3JDo28tEt#B$7^g=NWMd5VP*P(N73}sz1NH(kfGS?j(^! zY}|m)lj3bvKIsiBS_%Q}&)6|5Dv8vd>OUf)y^xX5W}89RMj@g`JE3<$p|}Bc3y_!q t000tnMI=~sMOaBjI!|(GWo~p~bZKvH05ODE?C$^o002ovPDHLkV1m>@`(^+D diff --git a/Projectiles/Rogue/AshenStalactiteDebris.png b/Projectiles/Rogue/AshenStalactiteDebris.png index c19bebc35fbbf75585eb7090ca30d4851ed49ad9..8afd326680c397e3eef29c1f2d9c35cd6a4deb34 100644 GIT binary patch literal 240 zcmVPx#s!2paR49?Hk*x~CU=)U*PjsMVMOYYy8BAhu7!3{#-hg;>y94nGmP`XdVVDH} zl6ztR)&yLUI!7b|G{t0re(5qe_mR|kUH`7`x+C+ZLhC>H=1SH@HfxH zO2(hz%w!ie!AI|YGCjC>Ga+H22t)1vG$F^HYYbCd`3`(7D;LPgRXQl`9~8;uaQW5) d_8zqw2Kz9T;%TMJzX2V~;OXk;vd$@?2>@_8R>=SW diff --git a/Projectiles/Rogue/AshenStalagmiteProj.png b/Projectiles/Rogue/AshenStalagmiteProj.png index 2f1751aaa4dd8277ebc8be280a23b2d1ad12e52e..4f22b80bf91ec0af0e8be65fbe651eea7c036823 100644 GIT binary patch literal 603 zcmV-h0;K(kP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0q{vgK~z{r?U&0d zgi#!Zzri4sFk@UYW0cEAWZYIFS&U@mwqYeJJEi;s7Iw6~AOsWsdDseEJn^4%2rQx!yotXfRvmP8a>?z7;7 zju9WMmXhi(7_!2WV@;Kq2fXv}UzgNQL87*j+ABy{a;`cP^RSWuFP`{e&(6`W6xD7) zr_F|fX&+CR2YWiM@K1~CuOKNcaH6EunvS`ntpz5L zDyiRsJd4T637F-QR~P5-=H4Ov(~|lvNaR}`ybr+gnUsriUy^V|^t`)oyU zW4*ZD@?Mnpp>YfHHVO{5D@hG8!qUC|~Gh-QKRW4>$k-002ovPDHLkV1mId9Gd_D literal 671 zcmV;Q0$}}#P)Px%SxH1eR9J=8m%&aGQ51&1sRONmG)96*s?Z=N%0gq@XktuUyWj=%;ot?jkS#7u zbZ5c>Othq68Z<-_YawH7dr9#oARYU>*S z%*|bM0Csmj1NoD)mYDmk-2tHEdB()0N(F%DFM{jp%9;-$IVmr4))I57T{1IMWgzJ_ zk&{+e)`0x;oVCPUMOrErfuz^oz1ad_@x~+&<~!xNygX+uvD0XKd2M$3it&KR$$Ro# zsaSLX-fwUJmyKCV?6g+O8zXKo^y~N-2#Li>NtY*s@zU5R0JrAnjpyU*4=VeKN%2TU zN@{l_7rAH4j{$gDd+nz^PsGPrWG%5oG}X{UshzFz*vC)b0l5F@4v-|N(>mh14#0<< zolG0EmRQ1L5yffx5R#JOq$Hiz;%Kmp{)s_Pr?tfTo)|@1o)`z9P`Hp<5#+V2*B1e( zzkLOS9dOoeWO#{5w-*)w=y;wFuyix%*WwkS-GhY4>77GM?5tC1NPSv)V!Z2>10OSea`M{&XdNB_y}f2Fv4K4%MZO7AD}$s{ zs0yIGw^?ua0Am+R4)m@F))M=xUMZ?x-N?*Tkm-MPg8r;^cx2?i&3eOFr_pR0d$E>S zW{;gABjPV#TgIe3C67hEPg57Ome@agY*6*Uz002ovPDHLk FV1kR1K@b1{ From e9eebcafb74a3d5ab4e73ab1e784276c655e9480 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 2 Aug 2024 13:38:15 -0400 Subject: [PATCH 04/16] Elysian and Asgardian Aegis, and Fearmonger armor now grant immunity to the Calamity Daybroken instead of the vanilla one --- Items/Accessories/AsgardianAegis.cs | 2 +- Items/Accessories/ElysianAegis.cs | 2 +- Items/Armor/Fearmonger/FearmongerGreathelm.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Accessories/AsgardianAegis.cs b/Items/Accessories/AsgardianAegis.cs index 7a80aadb2a..384231f977 100644 --- a/Items/Accessories/AsgardianAegis.cs +++ b/Items/Accessories/AsgardianAegis.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Items.Accessories // Additional debuff immunities (Everything from Elysian Aegis + thematic counterparts) player.buffImmune[BuffID.CursedInferno] = true; player.buffImmune[BuffID.ShadowFlame] = true; - player.buffImmune[BuffID.Daybreak] = true; + player.buffImmune[ModContent.BuffType()] = true; player.buffImmune[ModContent.BuffType()] = true; player.buffImmune[ModContent.BuffType()] = true; player.buffImmune[ModContent.BuffType()] = true; diff --git a/Items/Accessories/ElysianAegis.cs b/Items/Accessories/ElysianAegis.cs index 549733c0b9..61c6dbf9cc 100644 --- a/Items/Accessories/ElysianAegis.cs +++ b/Items/Accessories/ElysianAegis.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Accessories player.buffImmune[BuffID.CursedInferno] = true; player.buffImmune[BuffID.ShadowFlame] = true; player.buffImmune[ModContent.BuffType()] = true; - player.buffImmune[BuffID.Daybreak] = true; + player.buffImmune[ModContent.BuffType()] = true; player.buffImmune[ModContent.BuffType()] = true; } } diff --git a/Items/Armor/Fearmonger/FearmongerGreathelm.cs b/Items/Armor/Fearmonger/FearmongerGreathelm.cs index ec7d8b167f..594b9b5626 100644 --- a/Items/Armor/Fearmonger/FearmongerGreathelm.cs +++ b/Items/Armor/Fearmonger/FearmongerGreathelm.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Items.Armor.Fearmonger BuffID.Frostburn, BuffID.CursedInferno, BuffID.ShadowFlame, //doesn't do anything - BuffID.Daybreak, //doesn't do anything + ModContent.BuffType(), BuffID.Burning, ModContent.BuffType(), ModContent.BuffType(), From b3da6b12720811561d0b5062d7f227765cead7a7 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 2 Aug 2024 13:47:21 -0400 Subject: [PATCH 05/16] Amidias' Spark sparks and Giant Pearl shards are boosted by Old Fashioned --- NPCs/CalamityGlobalNPC.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 69f60401d7..f3371ba6e6 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -5376,7 +5376,7 @@ namespace CalamityMod.NPCs { SoundEngine.PlaySound(SoundID.Item49, Main.LocalPlayer.Center); Vector2 shardVel = Vector2.UnitX.RotatedByRandom(MathHelper.Pi) * 7.5f; - int damage = 20; + int damage = Main.LocalPlayer.ApplyArmorAccDamageBonusesTo(20); Projectile.NewProjectile(npc.GetSource_FromThis(), Main.LocalPlayer.Center, shardVel, ProjectileType(), damage, 5f, Main.myPlayer); } } @@ -5392,6 +5392,7 @@ namespace CalamityMod.NPCs if (player.miscCounter % frequency == 0) { int sDamage = strongerShock ? 50 : 10; + sDamage = player.ApplyArmorAccDamageBonusesTo(sDamage); Vector2 velocity = Vector2.UnitX.RotatedByRandom(MathHelper.Pi) * 5f; Projectile spark = Projectile.NewProjectileDirect(npc.GetSource_FromThis(), npc.Center, velocity, ProjectileType(), sDamage, 0f, player.whoAmI, 0f, 1f); spark.timeLeft = 120; From b36c8a5f144fce466a169066694f985e850330a5 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 2 Aug 2024 18:25:57 -0400 Subject: [PATCH 06/16] Gruesome Eminence and Rancor no longer self-damage Removed Rancor Burn, turning the variable into an "ashesOnDeath" variable that also causes other visual effects --- Buffs/DamageOverTime/RancorBurn.cs | 25 ---------------- Buffs/DamageOverTime/RancorBurn.png | Bin 358 -> 0 bytes ...Mods.CalamityMod.Items.Weapons.Magic.hjson | 7 ++--- NPCs/CalamityGlobalNPC.cs | 27 +++++++++++++----- Projectiles/Magic/RancorArm.cs | 21 ++++---------- Projectiles/Magic/RancorFog.cs | 2 +- Projectiles/Magic/RancorLargeCinder.cs | 7 ----- Projectiles/Magic/RancorLaserbeam.cs | 7 ++--- Projectiles/Magic/SmallSpirit.cs | 4 --- Projectiles/Magic/SpiritCongregation.cs | 21 -------------- 10 files changed, 31 insertions(+), 90 deletions(-) delete mode 100644 Buffs/DamageOverTime/RancorBurn.cs delete mode 100644 Buffs/DamageOverTime/RancorBurn.png diff --git a/Buffs/DamageOverTime/RancorBurn.cs b/Buffs/DamageOverTime/RancorBurn.cs deleted file mode 100644 index cab69f7bf8..0000000000 --- a/Buffs/DamageOverTime/RancorBurn.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Buffs.DamageOverTime -{ - public class RancorBurn : ModBuff - { - public override void SetStaticDefaults() - { - Main.debuff[Type] = true; - Main.buffNoSave[Type] = true; - Main.buffNoTimeDisplay[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; - } - - public override void Update(NPC npc, ref int buffIndex) - { - if (npc.Calamity().RancorBurnTime < npc.buffTime[buffIndex]) - npc.Calamity().RancorBurnTime = npc.buffTime[buffIndex]; - npc.DelBuff(buffIndex); - buffIndex--; - } - } -} diff --git a/Buffs/DamageOverTime/RancorBurn.png b/Buffs/DamageOverTime/RancorBurn.png deleted file mode 100644 index f7e99e7e26cef18d2148c3ad51b16ff887c861f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 358 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCijS1AIbUfwZrso2`cJS`)X&{{Bw#u8CrnX@O}P5(Zrg20+=4$WzHcin}Dp zFZe$kFnIYhegX<}7I;J!GcfQS24TkI`72U@g4;b^978Ppmrf4kJFLLtoY-Qp~Z5+Ujlf?)i8>gi9dl+U}XVXP$~|I4QCF466+r ze=1|hYBBa3hMO4@Gd7fem&-aU`#|`U*ad;vMoHRx*6Z~hFg_wCx9G&&u#d$JZPJb| zQ>L?aG_PIodq&+Z3#O=^rItBN=QtbYvl^svF!+47IndHkyehC)#DxFEB}e8L^Vsh& me(S!Z-aMW8-=E#rs~GJL@TRtRzS{!y0)wZkpUXO@geCxKg@lv< diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index ac617a0f5e..c01c75ba6c 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -391,9 +391,8 @@ GruesomeEminence: { DisplayName: Gruesome Eminence Tooltip: ''' - Summons a gaseous conglomeration of spirits near the cursor - At first, the spirits will fly wildly. This can hurt enemies and players - However, over time they will begin to accumulate to create a single, controllable monstrosity + Summons a gaseous conglomeration of spirits near the cursor that fly around wildly + Over time, the spirits accumulate to create a single, controllable monstrosity [c/C61B40:'The spirits of the amalgam could never pass on to their desired afterlife,] [c/C61B40:Tainted and melded by rage as they were.'] ''' @@ -682,7 +681,7 @@ Rancor: { Tooltip: ''' Casts a magic circle that charges energy and eventually releases a powerful laser burst of controlled maleficent magic - The laser causes arms and searing lava to appear on surfaces it touches which harm both you and enemies + The laser causes arms and searing lava to appear on surfaces it touches [c/C61B40:'Forgiveness can only heal so much,] [c/C61B40:If the recipient has not yet forgiven themselves.'] ''' diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index f3371ba6e6..70d09800df 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -5,12 +5,12 @@ using System.Reflection; using CalamityMod.Balancing; using CalamityMod.Buffs; using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.Placeables; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Buffs.Summon.Whips; using CalamityMod.CalPlayer; using CalamityMod.Events; +using CalamityMod.Graphics.Metaballs; using CalamityMod.Graphics.Renderers.CalamityRenderers; using CalamityMod.Items.Accessories; using CalamityMod.Items.Tools; @@ -299,7 +299,7 @@ namespace CalamityMod.NPCs public int vulnerabilityHex = 0; public int banishingFire = 0; public int wither = 0; - public int RancorBurnTime = 0; + public int ashesOnDeath = 0; // whoAmI Variables public static int[] bobbitWormBottom = new int[5]; @@ -523,7 +523,7 @@ namespace CalamityMod.NPCs myClone.vulnerabilityHex = vulnerabilityHex; myClone.banishingFire = banishingFire; myClone.wither = wither; - myClone.RancorBurnTime = RancorBurnTime; + myClone.ashesOnDeath = ashesOnDeath; // This gets set up as needed. myClone.VulnerabilityHexFireDrawer = null; @@ -5291,8 +5291,8 @@ namespace CalamityMod.NPCs banishingFire--; if (wither > 0) wither--; - if (RancorBurnTime > 0) - RancorBurnTime--; + if (ashesOnDeath > 0) + ashesOnDeath--; if (cobaltNerfTimer > 0) cobaltNerfTimer--; @@ -6020,7 +6020,7 @@ namespace CalamityMod.NPCs #region Hit Effect public override void HitEffect(NPC npc, NPC.HitInfo hit) { - if (npc.life <= 0 && npc.Organic() && RancorBurnTime > 0) + if (npc.life <= 0 && npc.Organic() && ashesOnDeath > 0) DeathAshParticle.CreateAshesFromNPC(npc); // Cultist shield flicker @@ -6594,6 +6594,20 @@ namespace CalamityMod.NPCs if (absorberAffliction > 0) AbsorberAffliction.DrawEffects(npc, ref drawColor); + // Rancor's burn effect + if (ashesOnDeath > 0) + { + if (Main.rand.NextBool(4)) + { + Projectile.NewProjectile(npc.GetSource_FromThis(), npc.Center, Main.rand.NextVector2Circular(2.75f, 6.5f), ProjectileType(), 0, 0f, Main.myPlayer, 0f, 0.475f); + } + if (Main.rand.NextBool(6)) + { + Vector2 randomPosition = new(npc.position.X + Main.rand.NextFloat(-10f, npc.width + 10f), npc.position.Y + Main.rand.NextFloat(-10f, npc.height + 10f)); + RancorLavaMetaball.SpawnParticle(randomPosition, Main.rand.NextFloat(30f, 37f)); + } + } + if (astralInfection > 0) AstralInfectionDebuff.DrawEffects(npc, ref drawColor); @@ -6858,7 +6872,6 @@ namespace CalamityMod.NPCs ("CalamityMod/Buffs/DamageOverTime/MiracleBlight", NPC => NPC.Calamity().miracleBlight > 0), ("CalamityMod/Buffs/DamageOverTime/Nightwither", NPC => NPC.Calamity().nightwither > 0), ("CalamityMod/Buffs/DamageOverTime/Plague", NPC => NPC.Calamity().pFlames > 0), - ("CalamityMod/Buffs/DamageOverTime/RancorBurn", NPC => NPC.Calamity().RancorBurnTime > 0), ("CalamityMod/Buffs/DamageOverTime/RiptideDebuff", NPC => NPC.Calamity().rTide > 0), ("CalamityMod/Buffs/DamageOverTime/SagePoison", NPC => NPC.Calamity().sagePoisonTime > 0), ("CalamityMod/Buffs/DamageOverTime/ShellfishClaps", NPC => NPC.Calamity().shellfishVore > 0), diff --git a/Projectiles/Magic/RancorArm.cs b/Projectiles/Magic/RancorArm.cs index e9247e6092..2f3c7a281c 100644 --- a/Projectiles/Magic/RancorArm.cs +++ b/Projectiles/Magic/RancorArm.cs @@ -1,9 +1,10 @@ -using System; -using System.Collections.Generic; -using System.IO; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.IO; using Terraria; using Terraria.Audio; using Terraria.ID; @@ -28,7 +29,6 @@ namespace CalamityMod.Projectiles.Magic { Projectile.width = Projectile.height = 4; Projectile.friendly = true; - Projectile.hostile = true; Projectile.penetrate = -1; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Magic // Decide a frame to use and adjust the hitbox based on it. if (Projectile.localAI[0] == 0f) { - // Play a wraith death sound by default, play a generic flame sound when spawned by gfb Orthoceras + // Play a wraith death sound by default, play a generic flame sound when spawned by GFB Orthoceras SoundStyle sound = Time == 0 ? SoundID.NPCDeath52 : SoundID.Item20; SoundEngine.PlaySound(sound, Projectile.Center); @@ -135,17 +135,6 @@ namespace CalamityMod.Projectiles.Magic behindNPCsAndTiles.Add(index); } - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - if (Projectile.friendly) - { - modifiers.SourceDamage *= 0f; - if (Main.masterMode) modifiers.SourceDamage.Flat += 450f; - else if (Main.expertMode) modifiers.SourceDamage.Flat += 375f; - else modifiers.SourceDamage.Flat += 300f; - } - } - public override bool PreDraw(ref Color lightColor) { Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; diff --git a/Projectiles/Magic/RancorFog.cs b/Projectiles/Magic/RancorFog.cs index cc971a645e..caa7e8cfb2 100644 --- a/Projectiles/Magic/RancorFog.cs +++ b/Projectiles/Magic/RancorFog.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Magic // Decide scale and initial rotation on the first frame this projectile exists. if (Projectile.localAI[0] == 0f) { - Projectile.scale = Main.rand.NextFloat(1f, 1.7f); + Projectile.scale = Main.rand.NextFloat(1f, 1.7f) * Projectile.ai[1]; Projectile.rotation = Main.rand.NextFloat(MathHelper.TwoPi); Projectile.localAI[0] = 1f; } diff --git a/Projectiles/Magic/RancorLargeCinder.cs b/Projectiles/Magic/RancorLargeCinder.cs index 45e9a59036..a27ef75db1 100644 --- a/Projectiles/Magic/RancorLargeCinder.cs +++ b/Projectiles/Magic/RancorLargeCinder.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles.Magic Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; Projectile.friendly = true; - Projectile.hostile = true; Projectile.timeLeft = 300; Projectile.ignoreWater = true; } @@ -49,12 +48,6 @@ namespace CalamityMod.Projectiles.Magic Time++; } - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - modifiers.SourceDamage *= 0f; - modifiers.SourceDamage.Flat += Main.rand.Next(80, 90); - } - public override Color? GetAlpha(Color lightColor) => Color.White * Projectile.Opacity; } } diff --git a/Projectiles/Magic/RancorLaserbeam.cs b/Projectiles/Magic/RancorLaserbeam.cs index b2d907be0d..195f7e0446 100644 --- a/Projectiles/Magic/RancorLaserbeam.cs +++ b/Projectiles/Magic/RancorLaserbeam.cs @@ -129,7 +129,7 @@ namespace CalamityMod.Projectiles.Magic public void CreateTileHitEffects() { Vector2 endOfLaser = Projectile.Center + Projectile.velocity * (LaserLength - Main.rand.NextFloat(12f, 72f)); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), endOfLaser, Main.rand.NextVector2Circular(4f, 8f), ModContent.ProjectileType(), 0, 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), endOfLaser, Main.rand.NextVector2Circular(4f, 8f), ModContent.ProjectileType(), 0, 0f, Projectile.owner, 0f, 1f); if (Main.rand.NextBool()) { @@ -182,10 +182,7 @@ namespace CalamityMod.Projectiles.Magic overWiresUI.Add(index); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 150); - } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.Calamity().ashesOnDeath = 10; public override bool ShouldUpdatePosition() => false; } diff --git a/Projectiles/Magic/SmallSpirit.cs b/Projectiles/Magic/SmallSpirit.cs index ef1d961c19..495e8611b2 100644 --- a/Projectiles/Magic/SmallSpirit.cs +++ b/Projectiles/Magic/SmallSpirit.cs @@ -61,12 +61,8 @@ namespace CalamityMod.Projectiles.Magic float flySpeed = 8f; float flyInertia = 54f; - Projectile.hostile = true; - Projectile.friendly = false; if (ProjectileOwner != null && (ProjectileOwner.ModProjectile().CurrentPower > 0.97f || Projectile.timeLeft < 95)) { - Projectile.hostile = false; - radius += 36f; target = ProjectileOwner; diff --git a/Projectiles/Magic/SpiritCongregation.cs b/Projectiles/Magic/SpiritCongregation.cs index 71f1e234be..2af7ed9e9d 100644 --- a/Projectiles/Magic/SpiritCongregation.cs +++ b/Projectiles/Magic/SpiritCongregation.cs @@ -140,11 +140,6 @@ namespace CalamityMod.Projectiles.Magic HoverOffset = Vector2.Zero; } - // Previously, Gruesome Eminence stopped being able to hurt you when fully charged. - // This has been changed so that its threat is everpresent. - Projectile.hostile = Time > 75f; - // Projectile.hostile = !tame && Time > 75f; - // Explode into a burst of spirit dust and gas clouds when a bigger face appears. if (!WasStrongBefore && CurrentPower > LargeMouthPowerLowerBound) { @@ -304,22 +299,6 @@ namespace CalamityMod.Projectiles.Magic DrawHead(backTexture, 1.04f); } - // Damage scales up over time as it grows. - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - float damageFactor = 0.25f + 0.75f * CurrentPower; - int fullPowerDamage; - if (Main.masterMode) - fullPowerDamage = 540; - else if (Main.expertMode) - fullPowerDamage = 450; - else - fullPowerDamage = 360; - - modifiers.SourceDamage *= 0f; - modifiers.SourceDamage.Flat += (int)(damageFactor * fullPowerDamage); - } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { for (int i = 0; i < Projectile.oldPos.Length; i++) From 0272ce049cbee1ba7716af3af9a022f64a809f8d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 2 Aug 2024 18:34:14 -0400 Subject: [PATCH 07/16] Removed Rancor Burn localization --- Localization/en-US/Mods.CalamityMod.Buffs.hjson | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index f37881d4da..546fec1f08 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -622,11 +622,6 @@ Zerg: { Description: Spawn rates are greatly boosted } -RancorBurn: { - DisplayName: Rancor Burn - Description: Burning -} - AbyssalDivingSuitBuff: { DisplayName: Abyssal Diving Suit Description: You are made of metal From f478854cd780fffb97967ddd600e3be2281455ab Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 23 Jul 2024 19:50:38 -0700 Subject: [PATCH 08/16] Venusian Trident and Shadowbolt Staff --- Balancing/BalancingChangesManager.cs | 3 - Items/Weapons/Magic/ShadowboltStaff.cs | 12 +- Items/Weapons/Magic/VenusianTrident.cs | 10 +- ...Mods.CalamityMod.Items.Weapons.Magic.hjson | 2 +- Projectiles/Magic/ShadowPlatform.png | Bin 0 -> 3189 bytes Projectiles/Magic/Shadowbolt.cs | 256 +++++++++++++++--- Projectiles/Magic/VenusianBolt.cs | 89 ++++-- Projectiles/Magic/VenusianExplosion.cs | 55 +--- Projectiles/Magic/VenusianFlame.cs | 15 +- Sounds/Item/ShadowboltReflect.ogg | Bin 0 -> 28617 bytes Sounds/Item/ShadowboltWallHit.ogg | Bin 0 -> 10352 bytes 11 files changed, 317 insertions(+), 125 deletions(-) create mode 100644 Projectiles/Magic/ShadowPlatform.png create mode 100644 Sounds/Item/ShadowboltReflect.ogg create mode 100644 Sounds/Item/ShadowboltWallHit.ogg diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index b3053e247c..a5a3331c8a 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -338,9 +338,6 @@ namespace CalamityMod.Balancing // 50% resist to Eidolic Wail. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType())))); - // 35% resist to Venusian Trident's explosions. - NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType(), ProjectileType())))); - // 25% resist to Corinth Prime's Grenades. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType())))); diff --git a/Items/Weapons/Magic/ShadowboltStaff.cs b/Items/Weapons/Magic/ShadowboltStaff.cs index 593ac52488..0cd4425a84 100644 --- a/Items/Weapons/Magic/ShadowboltStaff.cs +++ b/Items/Weapons/Magic/ShadowboltStaff.cs @@ -20,19 +20,19 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 58; Item.height = 56; - Item.damage = 280; + Item.damage = 190; Item.DamageType = DamageClass.Magic; - Item.mana = 20; - Item.useTime = 14; - Item.useAnimation = 14; + Item.mana = 10; + Item.useTime = 12; + Item.useAnimation = 12; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.knockBack = 8f; + Item.knockBack = 5f; Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; Item.UseSound = SoundID.Item72; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 6f; + Item.shootSpeed = 5f; Item.rare = ModContent.RarityType(); } diff --git a/Items/Weapons/Magic/VenusianTrident.cs b/Items/Weapons/Magic/VenusianTrident.cs index 275e0f2306..f4c89dbcc5 100644 --- a/Items/Weapons/Magic/VenusianTrident.cs +++ b/Items/Weapons/Magic/VenusianTrident.cs @@ -21,11 +21,11 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 70; Item.height = 68; - Item.damage = 256; + Item.damage = 2156; Item.DamageType = DamageClass.Magic; - Item.mana = 20; - Item.useTime = 25; - Item.useAnimation = 25; + Item.mana = 40; + Item.useTime = 65; + Item.useAnimation = 65; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 9f; @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.UseSound = SoundID.Item45; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 19f; + Item.shootSpeed = 13f; Item.rare = ModContent.RarityType(); } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index c01c75ba6c..6965df6705 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -750,7 +750,7 @@ ShaderainStaff: { ShadowboltStaff: { DisplayName: Shadowbolt Staff - Tooltip: The more tiles and enemies the beam bounces off of or travels through the more damage the beam does + Tooltip: Fires a shadow beam that creates a platform to redirect itself back at enemies for increased damage } ShiftingSands: { diff --git a/Projectiles/Magic/ShadowPlatform.png b/Projectiles/Magic/ShadowPlatform.png new file mode 100644 index 0000000000000000000000000000000000000000..1cf9fd563a839a9b6c3b85852dd78c175a82315c GIT binary patch literal 3189 zcmb`J`8U*$_s3sjU$bOOLdu@9h16IFGoq~7GmLF4V;w^=O=Dz$`~FQ(E|=$#gMe z_}(s;m|Bzel5sp6DO|sO=zvF|O-f-`kCBH|pLU*qe5gZzFCWM@IA)JKY?4SDR2L#xak-KtJF$sciX_aME##<0CK-XJhIU z97gKcq|Zet0Xx*DF=Y-KQR!8?qh>2=Ud)m>O!QlYl0sKspUPr@b>|%ZB=2-(OLcFU z8rQLMBE>P4mE6oz#IihBMd6T}^;RZV;RL-k3R z8fQ~I({N13=hJJ;GgYmwbK=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>Q4l(Ai zd$1JPpuH;UCe^hP6X3IBZwUWB`zmrMdT2!1-qwCXI-BiAk&%~^x)IVK?QCw9 z7cl#*mDKw%Bjfqi*aN*byY){)C_SGA)W(b($!GK9{f_lHFYzMr6mbzlo5ImXg`=X? zjK~e<$)oPF?sMzS>%TT?s|Jxvi2*A+^*ba7(3c6>W!?_n516li8f}p_HeaGD3~Jrq zes3xb{IEEE>9MATq~#3JzZ^OBuG)99@$>Qeu`XjKNA-}*=? zRUO5J#FP=+03jiM;V1jyKdG2|2U*J+U25Yy5hEN&6H-1M8zzrYM@9x_U!m?6OTVON z%%>do9egwePeTr>CsxvxD&4>Larg0MJE)~%Q2Sw>hbycx{GD}(FCzAF^&#&iYu}wF z%@oR}f^RskqgTL~j@j=k?}M%GJ0R@WYEj`04gIAbHYDHYO#CfBnq>55Q1>01UKX@h z4+;K;Ty8a{W~BNa{;b139^YuW-M#tq(u)hipSv4xhu)w}cOThMmqffnqOsQhpsS_} zh{CTF&9&p7>dxQ*x1sRrP1tfWBchD7)Z}uq<5a&TeTZBjtU?Cg9?q{w_m^Dke{kpG zlkDvec$#$&Jokk(5rz>-gm1+mpydHz6%GLEX#l|Qmsw|e=PbeO2ekrqJP7TA^cA)6_4RIfHyZ{3AUq7BZ4r{WF>(1ttCo=dcEV#$A)0vE zs9#snA$Wrp*no$h2i*(51fmm!ALy@EA#@nN-{>9`+o@+g?wF zC9MRd&+q1{WEdy8sASY+v!XYU#n`5ttK*wgUy+>~7M7Mt^8uf)a;-Y)v=H!UoniD8 zUM30?x;>ct9os$okb8Av&?KTo6c(V7Govx@xO{|-eDu;pJ`bK{Vrf~EtFf^4r&Q>V yc%Japv)N9a76RGHL&q#0HyrwXaG#_9)zd^$NvuilL=G+ literal 0 HcmV?d00001 diff --git a/Projectiles/Magic/Shadowbolt.cs b/Projectiles/Magic/Shadowbolt.cs index 333ed9a895..15ec56342b 100644 --- a/Projectiles/Magic/Shadowbolt.cs +++ b/Projectiles/Magic/Shadowbolt.cs @@ -1,7 +1,13 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using rail; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using System; +using ReLogic.Content; +using Terraria.Audio; namespace CalamityMod.Projectiles.Magic { @@ -9,65 +15,231 @@ namespace CalamityMod.Projectiles.Magic { public new string LocalizationCategory => "Projectiles.Magic"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - + public int time = 0; + public float platFade = 0; + public float platRot = 0; + public bool spawnPlat = false; + public bool hasSetPlatSpawn = false; + public bool hasReboundOffPlat = false; + public bool reflecting = false; + public int reflectionTimer = 50; + public Vector2 platPosCenter; + public Vector2 platPosWall; + public NPC chosenTarget; + public Vector2 targetCenter; + public override void SetStaticDefaults() + { + ProjectileID.Sets.DrawScreenCheckFluff[Projectile.type] = 10000; + } public override void SetDefaults() { - Projectile.width = 4; - Projectile.height = 4; + Projectile.width = 30; + Projectile.height = 30; Projectile.friendly = true; Projectile.DamageType = DamageClass.Magic; Projectile.ignoreWater = true; - Projectile.penetrate = 6; - Projectile.extraUpdates = 100; - Projectile.timeLeft = 300; + Projectile.tileCollide = false; + Projectile.penetrate = -1; + Projectile.extraUpdates = 10; + Projectile.timeLeft = 2400; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + Projectile.localNPCHitCooldown = -1; } - - public override bool OnTileCollide(Vector2 oldVelocity) + public override void AI() { - Projectile.damage = (int)(Projectile.damage * 1.15); - Projectile.penetrate--; - if (Projectile.penetrate <= 0) + Player Owner = Main.player[Projectile.owner]; + float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); + + + if (!spawnPlat && !hasReboundOffPlat && targetCenter != Vector2.Zero) + platFade = MathHelper.Lerp(platFade, 1, 0.008f); + if (hasReboundOffPlat) { - Projectile.Kill(); + platFade -= 0.0007f; + } + + BeamMainVisuals(Owner, targetDist); + + if (reflecting) + { + if (reflectionTimer > 15) + platPosCenter += (targetCenter - platPosCenter).SafeNormalize(Vector2.UnitX) * -2.7f * Utils.GetLerpValue(15, 40, reflectionTimer, true); + else + platPosCenter += (targetCenter - platPosCenter).SafeNormalize(Vector2.UnitX) * 9f * Utils.GetLerpValue(10, 0, reflectionTimer, true); + + Projectile.extraUpdates = 0; + Projectile.velocity = Vector2.Zero; + Projectile.Center = platPosWall; + reflectionTimer--; + if (reflectionTimer <= 0) + { + SoundStyle bounce = new("CalamityMod/Sounds/Item/ShadowboltReflect"); + SoundEngine.PlaySound(bounce with { Volume = 0.6f, Pitch = 0f }, platPosWall); + for (int i = 0; i < Main.maxNPCs; i++) + Projectile.localNPCImmunity[i] = 0; + Projectile.velocity = (targetCenter - platPosCenter).SafeNormalize(Vector2.UnitX) * 5; + reflecting = false; + hasReboundOffPlat = true; + time = 10; + Projectile.extraUpdates = 100; + } + } + + if (spawnPlat) + { + chosenTarget = Projectile.Center.ClosestNPCAt(2000); + + if (chosenTarget == null) + targetCenter = Owner.Calamity().mouseWorld; + else + targetCenter = chosenTarget.Center; + + platPosCenter = Projectile.Center + Projectile.velocity * Main.rand.Next(70, 120 + 1); + platRot = (targetCenter - platPosCenter).SafeNormalize(Vector2.UnitX).ToRotation(); + platPosWall = platPosCenter + new Vector2(0, 8).RotatedBy(platRot); + spawnPlat = false; + } + if (!spawnPlat && reflecting && targetCenter != Vector2.Zero) + { + if (chosenTarget == null) + targetCenter = Owner.Calamity().mouseWorld; + else + targetCenter = chosenTarget.Center; + + platRot = platRot.AngleLerp((targetCenter - platPosCenter).SafeNormalize(Vector2.UnitX).ToRotation(), 0.2f); + platPosWall = platPosCenter + new Vector2(0, -30).RotatedBy(platRot + MathHelper.ToRadians(90f)); + } + if (!spawnPlat && !hasReboundOffPlat && targetCenter != Vector2.Zero) + { + float beamDist = Vector2.Distance(platPosWall, Projectile.Center); + if (beamDist <= 25 && !reflecting) + { + Particle blastRing = new CustomPulse(platPosWall, Vector2.Zero, Color.Purple, "CalamityMod/Particles/SmallBloomRing", Vector2.One, Main.rand.NextFloat(-10, 10), 0.1f, 1.55f, 20, true); + GeneralParticleHandler.SpawnParticle(blastRing); + + SoundStyle wall = new("CalamityMod/Sounds/Item/ShadowboltWallHit"); + SoundEngine.PlaySound(wall with { Volume = 0.5f, Pitch = 0f }, platPosWall); + reflecting = true; + Projectile.extraUpdates = 0; + } + } + + if (!hasReboundOffPlat && Projectile.numHits == 0 && !hasSetPlatSpawn && (Collision.SolidCollision(Projectile.Center, 20, 20) || time > 90)) + { + hasSetPlatSpawn = true; + spawnPlat = true; + } + time++; + } + private void BeamMainVisuals(Player Owner, float targetDist) + { + if (reflecting) + { + for (int i = 0; i < 2; i++) + { + Dust chargefull = Dust.NewDustPerfect(Projectile.Center, 267); + chargefull.velocity = new Vector2(3, 3).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 0.8f); + chargefull.scale = Main.rand.NextFloat(0.35f, 0.8f); + chargefull.noGravity = true; + chargefull.color = Color.Lerp(Color.White, Main.rand.NextBool(4) ? Color.Indigo : Color.Purple, 0.7f); + } } else { - if (Projectile.velocity.X != oldVelocity.X) + if (time == 14) { - Projectile.velocity.X = -oldVelocity.X; + for (int i = 0; i < 2; i++) + { + Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Indigo, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.3f, 0.75f, 12, true); + GeneralParticleHandler.SpawnParticle(blastRing); + Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.2f, 0.55f, 12, true); + GeneralParticleHandler.SpawnParticle(blastRing2); + } + for (int i = 0; i < 6; i++) + { + Dust chargefull = Dust.NewDustPerfect(Projectile.Center, 278); + chargefull.velocity = Projectile.velocity.RotatedByRandom(0.25f) * Main.rand.NextFloat(0.6f, 2f); + chargefull.scale = Main.rand.NextFloat(0.65f, 0.9f); + chargefull.noGravity = true; + chargefull.color = Color.Lerp(Color.White, Main.rand.NextBool(4) ? Color.Indigo : Color.Purple, 0.7f); + } } - if (Projectile.velocity.Y != oldVelocity.Y) + if (targetDist < 1400) { - Projectile.velocity.Y = -oldVelocity.Y; + if (time > 30 && Main.rand.NextBool(15)) + { + Particle spark = new LineParticle(Projectile.Center, Projectile.velocity * Main.rand.NextFloat(-1, 1), false, 50, 1.9f, Color.Lerp(Color.Indigo, Color.Purple, Main.rand.NextFloat(0, 1))); + GeneralParticleHandler.SpawnParticle(spark); + } + if (time > 22 && time % 3 == 0) + { + Particle spark = new GlowSparkParticle(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 10, -Projectile.velocity * 0.1f, false, 18, 0.05f * (hasReboundOffPlat ? 1.1f : 0.5f), Color.Lerp(Color.Indigo, Color.Orchid, 0.25f), new Vector2(0.7f, 1f), true, false, 0.3f); + GeneralParticleHandler.SpawnParticle(spark); + } + if (time > 30 && Main.rand.NextBool(12)) + { + Dust chargefull = Dust.NewDustPerfect(Projectile.Center, 267); + chargefull.velocity = Projectile.velocity * Main.rand.NextFloat(-2, 2); + chargefull.scale = Main.rand.NextFloat(0.95f, 1.4f); + chargefull.noGravity = true; + chargefull.color = Color.Lerp(Color.White, Main.rand.NextBool(4) ? Color.Indigo : Color.Purple, 0.7f); + } } } + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + float minMult = 0.25f; + int hitsToMinMult = 7; + float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); + modifiers.SourceDamage *= (hasReboundOffPlat ? 2.5f : 1) * damageMult; + + if (!hasReboundOffPlat && Projectile.numHits == 0 && !hasSetPlatSpawn) + { + spawnPlat = true; + hasSetPlatSpawn = true; + } + //if (!hasReboundOffPlat) + //Projectile.extraUpdates = 10; + } + public override bool? CanDamage() => reflecting ? false : null; + public override bool PreDraw(ref Color lightColor) + { + if (targetCenter != Vector2.Zero && platFade > 0) + { + Texture2D pTexture = ModContent.Request("CalamityMod/Projectiles/Magic/ShadowPlatform").Value; + + for (int i = 0; i < 5; i++) + { + Color auraColor = Color.Lerp(Color.Indigo, Color.Purple, Utils.GetLerpValue(0, 5, i)) with { A = 0 } * 0.55f * platFade; + Vector2 rotationalDrawOffset = (MathHelper.TwoPi * i / 7f + Main.GlobalTimeWrappedHourly * 30f).ToRotationVector2(); + rotationalDrawOffset *= MathHelper.Lerp(3f, 5.25f, (float)Math.Cos(Main.GlobalTimeWrappedHourly * 6f) * 0.5f + 0.5f); + Main.EntitySpriteDraw(pTexture, platPosCenter - Main.screenPosition + rotationalDrawOffset, null, auraColor, platRot + MathHelper.ToRadians(90f), pTexture.Size() * 0.5f, new Vector2(1, 0.7f), SpriteEffects.None); + } + + for (int i = 0; i < 4; i++) + Main.EntitySpriteDraw(pTexture, platPosCenter - Main.screenPosition, null, Color.Purple with { A = 0 } * platFade, platRot + MathHelper.ToRadians(90f), pTexture.Size() * 0.5f, new Vector2(1, 0.7f), SpriteEffects.None); + Main.EntitySpriteDraw(pTexture, platPosCenter - Main.screenPosition, null, Color.White with { A = 0 } * platFade * 0.6f, platRot + MathHelper.ToRadians(90f), pTexture.Size() * 0.5f, new Vector2(1, 0.7f) * 0.93f, SpriteEffects.None); + } + + if (!reflecting && time >= 22 && !hasReboundOffPlat) + { + Asset tex = ModContent.Request("CalamityMod/Particles/GlowSpark"); + for (int i = 0; i < 5; i++) + { + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 15, null, Color.White with { A = 0 } * 0.7f, Projectile.velocity.ToRotation() + MathHelper.ToRadians(90f), tex.Size() * 0.5f, new Vector2(0.4f, 1f) * (i * 0.3f) * 0.05f * (hasReboundOffPlat ? 1.1f : 0.5f), SpriteEffects.None); + } + } + + if (reflecting) + { + Texture2D rechargeTexture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + + float randSize = Main.rand.NextFloat(0.8f, 1.2f); + Main.EntitySpriteDraw(rechargeTexture, platPosWall - Main.screenPosition, null, Color.Purple with { A = 0 }, Projectile.rotation, rechargeTexture.Size() * 0.5f, 0.65f * Utils.GetLerpValue(-25, 20, reflectionTimer, true) * randSize, SpriteEffects.None, 0); + Main.EntitySpriteDraw(rechargeTexture, platPosWall - Main.screenPosition, null, Color.White with { A = 0 }, Projectile.rotation, rechargeTexture.Size() * 0.5f, 0.45f * Utils.GetLerpValue(-25, 20, reflectionTimer, true) * randSize, SpriteEffects.None, 0); + } return false; } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - if (Projectile.numHits > 0) - Projectile.damage = (int)(Projectile.damage * 1.15); - } - - public override void AI() - { - Projectile.localAI[0] += 1f; - if (Projectile.localAI[0] > 9f) - { - for (int i = 0; i < 4; i++) - { - Vector2 projPos = Projectile.position; - projPos -= Projectile.velocity * ((float)i * 0.25f); - Projectile.alpha = 255; - int shadowDust = Dust.NewDust(projPos, 1, 1, DustID.ShadowbeamStaff, 0f, 0f, 0, default, 1f); - Main.dust[shadowDust].position = projPos; - Main.dust[shadowDust].scale = (float)Main.rand.Next(70, 110) * 0.013f; - Main.dust[shadowDust].velocity *= 0.2f; - } - } - } } } diff --git a/Projectiles/Magic/VenusianBolt.cs b/Projectiles/Magic/VenusianBolt.cs index 55c7c4f354..35754fc148 100644 --- a/Projectiles/Magic/VenusianBolt.cs +++ b/Projectiles/Magic/VenusianBolt.cs @@ -1,4 +1,5 @@ using System; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -15,38 +16,62 @@ namespace CalamityMod.Projectiles.Magic ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; ProjectileID.Sets.TrailingMode[Projectile.type] = 0; } - + public int time = 0; + public bool explode = true; public override void SetDefaults() { Projectile.width = 20; Projectile.height = 20; Projectile.friendly = true; Projectile.penetrate = 1; - Projectile.extraUpdates = 1; + Projectile.ignoreWater = true; + Projectile.extraUpdates = 7; Projectile.timeLeft = 600; Projectile.DamageType = DamageClass.Magic; } public override void AI() { + Player Owner = Main.player[Projectile.owner]; + float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(45); Lighting.AddLight(Projectile.Center, 0.25f, 0.2f, 0f); - if (Projectile.wet && !Projectile.lavaWet) - { - Projectile.Kill(); - } + + if (Projectile.timeLeft == 1) + explode = false; if (Projectile.localAI[0] == 0f) { SoundEngine.PlaySound(SoundID.Item73, Projectile.Center); Projectile.localAI[0] += 1f; } - for (int i = 0; i < 3; i++) + if (time == 5) { - int venusDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Pixie, 0f, 0f, 100, default, 1.2f); - Main.dust[venusDust].noGravity = true; - Main.dust[venusDust].velocity *= 0.5f; - Main.dust[venusDust].velocity += Projectile.velocity * 0.1f; + for (int i = 0; i < 12; i++) + { + Dust chargefull = Dust.NewDustPerfect(Projectile.Center, 278); + chargefull.velocity = Projectile.velocity.RotatedByRandom(0.25f) * Main.rand.NextFloat(0.1f, 1); + chargefull.scale = Main.rand.NextFloat(0.45f, 0.8f); + chargefull.noGravity = true; + chargefull.color = Color.Lerp(Color.White, Main.rand.NextBool(4) ? Color.Orange : Color.Coral, 0.7f); + } } + if (targetDist < 1400) + { + if (time > 8 && time % 3 == 0) + { + SparkParticle spark = new SparkParticle(Projectile.Center + Main.rand.NextVector2Circular(15, 15) - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 10, -Projectile.velocity * Main.rand.NextFloat(0.2f, 0.8f), false, 35, 0.8f, Color.Lerp(Color.OrangeRed, Color.Coral, Main.rand.NextFloat(0, 1))); + GeneralParticleHandler.SpawnParticle(spark); + } + if (time > 6 && time % 2 == 0) + { + for (int i = 0; i < 2; i++) + { + Particle spark = new GlowSparkParticle(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 10, -Projectile.velocity, false, 8, 0.08f * (i == 0 ? 0.5f : 1), Color.Lerp(Color.Orange, Color.Coral, 0.25f) * 0.5f, new Vector2(0.3f, 1f), false, false, 0.8f); + GeneralParticleHandler.SpawnParticle(spark); + } + } + } + time++; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) @@ -56,16 +81,33 @@ namespace CalamityMod.Projectiles.Magic public override void OnKill(int timeLeft) { - if (Projectile.owner == Main.myPlayer) + Player Owner = Main.player[Projectile.owner]; + if (Projectile.owner == Main.myPlayer && explode) { - int explosionDamage = Projectile.damage; + Owner.Calamity().GeneralScreenShakePower = 3.5f; + SoundEngine.PlaySound(SoundID.DD2_ExplosiveTrapExplode with { Volume = 1f, Pitch = -0.5f }, Projectile.Center); + SoundEngine.PlaySound(SoundID.Item74 with { Volume = 0.7f, Pitch = 1f }, Projectile.Center); + for (int i = 0; i < 6; i++) + { + Particle explosion = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Lerp(Color.Red, Color.Coral, Utils.GetLerpValue(-2, 6, i, true)), i == 5 ? "CalamityMod/Particles/FlameExplosion" : "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(-5, 5), 0f, 0.1f + 0.03f * i, (int)(30 - i * 1.3f)); + GeneralParticleHandler.SpawnParticle(explosion); + } + for (int i = 0; i < 2; i++) + { + Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.OrangeRed, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 1f, 3f, 25, true); + GeneralParticleHandler.SpawnParticle(blastRing); + Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.5f, 1.5f, 25, true); + GeneralParticleHandler.SpawnParticle(blastRing2); + } + + int explosionDamage = Projectile.damage / 4; float explosionKB = 6f; Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), explosionDamage, explosionKB, Projectile.owner); - int cinderDamage = (int)(Projectile.damage * 0.20); + int cinderDamage = (int)(Projectile.damage * 0.01); float cinderKB = 0f; - Vector2 cinderPos = Projectile.oldPosition + 0.5f * Projectile.Size; - int numCinders = Main.rand.Next(7, 10); + Vector2 cinderPos = Projectile.Center; + int numCinders = 10; for (int i = 0; i < numCinders; i++) { Vector2 cinderVel = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); @@ -75,15 +117,24 @@ namespace CalamityMod.Projectiles.Magic } cinderVel.Normalize(); cinderVel *= Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), cinderPos, cinderVel, ModContent.ProjectileType(), cinderDamage, cinderKB, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), cinderPos, cinderVel + new Vector2(0, -3), ModContent.ProjectileType(), cinderDamage, cinderKB, Projectile.owner); + } + + for (int i = 0; i < 20; i++) + { + Dust chargefull = Dust.NewDustPerfect(Projectile.Center, 278); + chargefull.velocity = new Vector2(9, 9).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 2f); + chargefull.scale = Main.rand.NextFloat(0.65f, 1.25f); + chargefull.noGravity = true; + chargefull.color = Color.Lerp(Color.White, Main.rand.NextBool(4) ? Color.Orange : Color.Coral, 0.7f); } } } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); - return false; + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White, 1); + return true; } } } diff --git a/Projectiles/Magic/VenusianExplosion.cs b/Projectiles/Magic/VenusianExplosion.cs index 199f6ca856..6fdb7c87b8 100644 --- a/Projectiles/Magic/VenusianExplosion.cs +++ b/Projectiles/Magic/VenusianExplosion.cs @@ -14,65 +14,34 @@ namespace CalamityMod.Projectiles.Magic public override void SetDefaults() { - Projectile.width = 250; - Projectile.height = 250; + Projectile.width = 400; + Projectile.height = 400; Projectile.friendly = true; Projectile.ignoreWater = false; Projectile.tileCollide = false; Projectile.penetrate = -1; - Projectile.timeLeft = 120; + Projectile.timeLeft = 2; Projectile.DamageType = DamageClass.Magic; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 17; + Projectile.localNPCHitCooldown = -1; } public override void AI() { Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.75f / 255f, (255 - Projectile.alpha) * 0.5f / 255f, (255 - Projectile.alpha) * 0.01f / 255f); - if (Projectile.localAI[0] == 0f) - { - SoundEngine.PlaySound(SoundID.Item74, Projectile.Center); - Projectile.localAI[0] += 1f; - } - float projTimer = 25f; - if (Projectile.ai[0] > 180f) - { - projTimer -= (Projectile.ai[0] - 180f) / 2f; - } - if (projTimer <= 0f) - { - projTimer = 0f; - Projectile.Kill(); - } - projTimer *= 0.7f; - Projectile.ai[0] += 4f; - int timerCounter = 0; - while ((float)timerCounter < projTimer) - { - float rando1 = (float)Main.rand.Next(-30, 31); - float rando2 = (float)Main.rand.Next(-30, 31); - float rando3 = (float)Main.rand.Next(9, 27); - float randoAdjuster = (float)Math.Sqrt((double)(rando1 * rando1 + rando2 * rando2)); - randoAdjuster = rando3 / randoAdjuster; - rando1 *= randoAdjuster; - rando2 *= randoAdjuster; - int venusDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Pixie, 0f, 0f, 100, default, 2.5f); - Dust dust = Main.dust[venusDust]; - dust.noGravity = true; - dust.position.X = Projectile.Center.X; - dust.position.Y = Projectile.Center.Y; - dust.position.X += (float)Main.rand.Next(-10, 11); - dust.position.Y += (float)Main.rand.Next(-10, 11); - dust.velocity.X = rando1; - dust.velocity.Y = rando2; - timerCounter++; - } - return; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(BuffID.Daybreak, 300); } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (Projectile.numHits > 0) + Projectile.damage = (int)(Projectile.damage * 0.88f); + if (Projectile.damage < 1) + Projectile.damage = 1; + } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * 0.5f * Projectile.scale, targetHitbox); } } diff --git a/Projectiles/Magic/VenusianFlame.cs b/Projectiles/Magic/VenusianFlame.cs index a30274e76a..9d06d4ffea 100644 --- a/Projectiles/Magic/VenusianFlame.cs +++ b/Projectiles/Magic/VenusianFlame.cs @@ -23,10 +23,11 @@ namespace CalamityMod.Projectiles.Magic Projectile.height = 14; Projectile.friendly = true; Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = 3; + Projectile.penetrate = -1; + Projectile.extraUpdates = 1; Projectile.timeLeft = 120; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + Projectile.localNPCHitCooldown = -1; } public override void AI() @@ -105,7 +106,7 @@ namespace CalamityMod.Projectiles.Magic } //Dust - if (Main.rand.NextBool(4)) + if (Main.rand.NextBool(6)) { int venusDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Pixie, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[venusDust]; @@ -114,16 +115,18 @@ namespace CalamityMod.Projectiles.Magic dust.scale += (float)Main.rand.Next(50) * 0.01f; dust.noGravity = true; dust.velocity.Y -= 2f; + dust.velocity += Projectile.velocity * 0.5f; } - if (Main.rand.NextBool(10)) + if (Main.rand.NextBool(14)) { - int venusDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Pixie, 0f, 0f, 100, default, 1f); + int venusDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 278, 0f, 0f, 0, default, Main.rand.NextFloat(0.3f, 0.5f)); Dust dust2 = Main.dust[venusDust2]; dust2.position.X -= 2f; dust2.position.Y += 2f; - dust2.scale += 0.3f + (float)Main.rand.Next(50) * 0.01f; dust2.noGravity = true; dust2.velocity *= 0.1f; + dust2.velocity += Projectile.velocity * 0.5f; + dust2.color = Color.Lerp(Color.White, Main.rand.NextBool(4) ? Color.Orange : Color.Coral, 0.7f); } } diff --git a/Sounds/Item/ShadowboltReflect.ogg b/Sounds/Item/ShadowboltReflect.ogg new file mode 100644 index 0000000000000000000000000000000000000000..a2d84277bef302bcbd2eb076e1c742aac0a88939 GIT binary patch literal 28617 zcmce-dt6f4`aixwAVf4!Ff?rd(Eu+ariGRrKp;dVKrpmy@S0*5E$Md7oDU)@BAS|( zI@Sn^B5G-Ana#`*MY}hemuhBeOsC0grm3dR%(;A~-?rwQ&*k@eeZRlIe(SYatY__Y z+3Q*F=ULBw*4kTl?Meio!0+MWzV``Bso)A^4dmdy{pq;}mb0MT?%#_nI=xE_Lbfi~ z{C8Nc2?41O4xBrLEq(hx1I6imOW|MvMQ(mh$kzS4h`V#slisyYj3tJJhJ}W12n{Dv zrCFKkjNHAuh`hZAbNBDtyC-XJA#J%!4EU49%Hny^qJ0O`h}`|T*@a$U9$PAlO_W6^ z>L7`AY@5v8m{yzm&O|-ZP$yVUjfIvs)Rm7BGK`Gze?`RbOgsR<01ef-s`dL=)$Pb# zgtb-sTOxBs%nsrTgJdq!dE`w%#@_b+_Po8fY5qvpWH`t{fF&T6;H1k@x}H=@0HZRW z{Z~mH&HGVwYl{{Yc9mEhANI8ExG3tWwY4g0iP}HGaS86fBaCOvBxRiW9Fh8`1Ggie zH2)qszZ(Y;d=?JED-**(E;p~IwKwbsn|ePiBA@|>32dps#rEND^!ePHq-=c^B=Lxt zT*ph4CCI^`PTh7e>+V7I-Gd(|Ho^}9WF?_}fe6E4qkOoifkJxq~`tE^*yC5r;Ir4uF zMepze4uo_n`-Dn^Tvwg;jx8FnS%L`}gMQx=SU_+3j@UHO^z*Gqx2DG}ow!e??B%jg z)?Vst_~hLT?!N7{0L~@tdgEA2<3!Ve+p*{-%lp(3_fJ;zblw5;yq+|>jeDhm<#O*d zt?0b30P7}CG<|QqgacFMb)T#qxFmbu-tVyJ+}V8F9{C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XHKufC`JFI#0Vy$RkLb=^qm|9b74Xx|GKpRGXsIg*BFzx8vj;HPUs zVzWQa%IpR+;VVD0rpyX|-z4)Q<_v5rTvhZ;+3h|I1c`6Y>N0JUu6|u=q2kRi6<)cK zcm3iIuH;!irj1jYJR6F$GwZ}y_v8zvx4(84Me*hdT$|(Q< literal 0 HcmV?d00001 From 0f9bb1184886039f6d169372c0c02ccbaf2011bf Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 24 Jul 2024 01:52:37 -0700 Subject: [PATCH 09/16] Phantasmal Fury --- Items/Weapons/Magic/PhantasmalFury.cs | 35 +++++-- Projectiles/Magic/PhantasmalFuryProj.cs | 122 +++++++++++++++++------- Projectiles/Magic/Phantom.cs | 111 +++++++++++++++++++-- Projectiles/Magic/Shadowbolt.cs | 6 +- Sounds/Item/PhantasmalFuryShoot.ogg | Bin 0 -> 21669 bytes 5 files changed, 219 insertions(+), 55 deletions(-) create mode 100644 Sounds/Item/PhantasmalFuryShoot.ogg diff --git a/Items/Weapons/Magic/PhantasmalFury.cs b/Items/Weapons/Magic/PhantasmalFury.cs index f50734ad0f..fe93d842ff 100644 --- a/Items/Weapons/Magic/PhantasmalFury.cs +++ b/Items/Weapons/Magic/PhantasmalFury.cs @@ -3,6 +3,8 @@ using CalamityMod.Projectiles.Magic; using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -20,23 +22,40 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 62; Item.height = 60; - Item.damage = 260; + Item.damage = 115; Item.DamageType = DamageClass.Magic; - Item.mana = 20; - Item.useTime = 20; - Item.useAnimation = 20; + Item.mana = 60; + Item.useTime = 3; + Item.useAnimation = 45; + Item.reuseDelay = 75; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.knockBack = 7.5f; + Item.knockBack = 20f; Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; - Item.UseSound = SoundID.Item43; + Item.UseSound = new SoundStyle("CalamityMod/Sounds/Item/PhantasmalFuryShoot") with { Volume = 0.6f, PitchVariance = 0.15f }; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 12f; + Item.shootSpeed = 6f; Item.rare = ModContent.RarityType(); } - + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Projectile.NewProjectileDirect(source, position + velocity * 13, velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.8f, 1.1f), ModContent.ProjectileType(), damage, 0, player.whoAmI, 0f, 0f); + for (int i = 0; i < 2; i++) + { + Projectile.NewProjectileDirect(source, position + velocity * 13, velocity.RotatedByRandom(0.4f), ModContent.ProjectileType(), damage / 2, 0, player.whoAmI, 0f, 0f); + } + for (int i = 0; i < 2; i++) + { + Dust chargefull = Dust.NewDustPerfect(position + velocity * 13, 267); + chargefull.velocity = velocity.RotatedByRandom(0.25f) * Main.rand.NextFloat(1f, 4); + chargefull.scale = Main.rand.NextFloat(0.5f, 0.9f); + chargefull.noGravity = true; + chargefull.color = Color.Lerp(Color.White, Color.Aqua, 0.3f); + } + return false; + } public override void AddRecipes() { CreateRecipe(). diff --git a/Projectiles/Magic/PhantasmalFuryProj.cs b/Projectiles/Magic/PhantasmalFuryProj.cs index 806fdadff5..b143d621a9 100644 --- a/Projectiles/Magic/PhantasmalFuryProj.cs +++ b/Projectiles/Magic/PhantasmalFuryProj.cs @@ -1,5 +1,7 @@ using System; +using System.Threading.Channels; using Microsoft.Xna.Framework; +using Steamworks; using Terraria; using Terraria.Audio; using Terraria.ID; @@ -9,11 +11,14 @@ namespace CalamityMod.Projectiles.Magic public class PhantasmalFuryProj : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; + public int time = 0; + public float dustRotation = 0; + public bool launched = false; public override void SetStaticDefaults() { Main.projFrames[Projectile.type] = 4; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 6; + ProjectileID.Sets.TrailingMode[Projectile.type] = 2; } public override void SetDefaults() @@ -22,13 +27,19 @@ namespace CalamityMod.Projectiles.Magic Projectile.height = 16; Projectile.friendly = true; Projectile.ignoreWater = true; - Projectile.penetrate = 1; - Projectile.timeLeft = 120; + Projectile.tileCollide = false; + Projectile.penetrate = -1; + Projectile.extraUpdates = 5; + Projectile.timeLeft = 900; Projectile.DamageType = DamageClass.Magic; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 20 * Projectile.extraUpdates; + Projectile.ArmorPenetration = 15; } public override void AI() { + Player Owner = Main.player[Projectile.owner]; Projectile.frameCounter++; if (Projectile.frameCounter > 4) { @@ -38,51 +49,94 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.frame >= Main.projFrames[Projectile.type]) Projectile.frame = 0; - if (Projectile.timeLeft % 10 == 0) - { - if (Projectile.owner == Main.myPlayer) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); - } - if (Projectile.timeLeft < 100) - { - CalamityUtils.HomeInOnNPC(Projectile, true, 300f, 10f, 20f); - } + dustRotation += 0.12f; + Lighting.AddLight(Projectile.Center, Color.White.ToVector3() * 0.5f); - Lighting.AddLight(Projectile.Center, 0.25f, 0.25f, 0.25f); - - for (int i = 0; i < 3; i++) - { - int spectre = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 2f); - Main.dust[spectre].noGravity = true; - Main.dust[spectre].velocity *= 0.5f; - Main.dust[spectre].velocity += Projectile.velocity * 0.1f; - } + // 175, 100 ALPHA Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt(); Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == 1 ? 0f : MathHelper.Pi); + + if (time >= 500) + { + if (time == 500) + { + Projectile.penetrate = 1; + launched = true; + } + + NPC target = Projectile.Center.ClosestNPCAt(700); + if (target != null && target.CanBeChasedBy(Projectile)) + { + Vector2 moveTotarget = (target.Center - Projectile.Center).SafeNormalize(Vector2.UnitX); + if (Projectile.velocity.Length() < 6) + Projectile.velocity += moveTotarget * 0.45f; + else + Projectile.velocity *= 0.9f; + } + + if (time < 550 && target == null) + { + if (Projectile.velocity.Length() < 6) + Projectile.velocity += (Owner.Calamity().mouseWorld - Projectile.Center).SafeNormalize(Vector2.UnitX) * 0.35f; + else + Projectile.velocity *= 0.9f; + } + } + else if (time > 15) + { + Vector2 circle = Owner.Center + new Vector2(0, -30).RotatedBy(time * 0.05f); + Vector2 moveToEnemy = (circle - Projectile.Center).SafeNormalize(Vector2.UnitX); + if (Projectile.velocity.Length() < 8) + Projectile.velocity += moveToEnemy * Main.rand.NextFloat(0.2f, 0.4f); + else + Projectile.velocity *= 0.85f; + } + + if (time > 5) + { + Vector2 dustPos = Projectile.Center + (MathHelper.Pi + dustRotation + MathHelper.PiOver2).ToRotationVector2() * 10f * Projectile.scale; + Dust dust = Dust.NewDustPerfect(dustPos, 175, (MathHelper.Pi + dustRotation * Math.Sign(Projectile.velocity.Length())).ToRotationVector2() * 2); + dust.noGravity = false; + dust.scale = Main.rand.NextFloat(0.75f, 1.2f); + dust.alpha = Main.rand.Next(100, 170 + 1); + dust.velocity = dust.velocity.RotatedByRandom(0f); + } + time++; + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + modifiers.SourceDamage *= (launched ? 1f : 0.05f); + + Player Owner = Main.player[Projectile.owner]; + if (target.CanBeMoved(true)) + { + // Custom knockback + Vector2 launchVel = (Owner.Center - target.Center).SafeNormalize(Vector2.UnitY) * -10 * (launched ? 0.5f : 2); + target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); + } } public override void OnKill(int timeLeft) { - SoundEngine.PlaySound(SoundID.Item43, Projectile.Center); - for (int j = 0; j <= 10; j++) + //SoundEngine.PlaySound(SoundID.Item43, Projectile.Center); + for (int i = 0; i <= 3; i++) { - Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 1f); - } - if (Projectile.owner == Main.myPlayer) - { - for (int i = 0; i < 8; i++) - { - Vector2 velocity = (MathHelper.TwoPi * i / 8f).ToRotationVector2() * 3f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); - } + Dust dust = Dust.NewDustPerfect(Projectile.Center, 175, (Projectile.velocity * 6).RotatedByRandom(0.4f) * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(1.2f, 1.8f)); + dust.noGravity = true; + Dust chargefull = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(4) ? 278 : 267); + chargefull.velocity = Projectile.velocity.RotatedByRandom(0.25f) * Main.rand.NextFloat(1f, 4); + chargefull.scale = Main.rand.NextFloat(0.5f, 0.9f); + chargefull.noGravity = true; + chargefull.color = Color.Lerp(Color.White, Color.Aqua, 0.3f); } } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White, 1); + return false; } } diff --git a/Projectiles/Magic/Phantom.cs b/Projectiles/Magic/Phantom.cs index 16f456274e..b8223463ac 100644 --- a/Projectiles/Magic/Phantom.cs +++ b/Projectiles/Magic/Phantom.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -8,31 +9,121 @@ namespace CalamityMod.Projectiles.Magic public class Phantom : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; + public float sizeVariance = 2; + public int time = 0; + public int spinDir = 100; + public int waveOften = 40; + public float scaleVariance = 1; + + public bool launched = false; public override void SetDefaults() { Projectile.width = 8; Projectile.height = 8; Projectile.friendly = true; - Projectile.extraUpdates = 1; - Projectile.penetrate = 2; + Projectile.extraUpdates = 5; + Projectile.penetrate = -1; Projectile.ignoreWater = true; - Projectile.timeLeft = 120; + Projectile.tileCollide = false; + Projectile.timeLeft = 900; Projectile.DamageType = DamageClass.Magic; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 20 * Projectile.extraUpdates; + Projectile.ArmorPenetration = 30; } public override void AI() { - Projectile.rotation += 0.01f; + Player Owner = Main.player[Projectile.owner]; + float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); - Lighting.AddLight(Projectile.Center, 0.2f, 0.2f, 0.2f); + Projectile.rotation += Main.rand.NextFloat(0.02f, 0.09f); - for (int i = 0; i < 2; i++) + if (spinDir == 100) { - int spectre = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.SpectreStaff, 0f, 0f, 100, default, 1f); - Main.dust[spectre].noGravity = true; + spinDir = Main.rand.NextBool() ? 1 : -1; + waveOften = Main.rand.Next(10, 40 + 1); + Projectile.scale = Main.rand.NextFloat(0.95f, 1.1f); } - CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 300f, 12f, 20f); + Lighting.AddLight(Projectile.Center, Color.White.ToVector3() * 0.3f); + + if (time % 2 == 0 && time > 3 && targetDist < 1400) + { + Particle spark = new GlowSparkParticle(Projectile.Center + Projectile.velocity * Main.rand.NextFloat(-1, 1), -Projectile.velocity * 0.3f, false, 4, 0.025f, Color.Lerp(Color.White, Color.Aqua, 0.3f) * 0.6f, new Vector2(1, 0.3f), true, false, 2); + GeneralParticleHandler.SpawnParticle(spark); + } + + if (time >= 500) + { + if (time == 500) + { + Projectile.penetrate = 1; + Projectile.velocity = (Owner.Calamity().mouseWorld - Projectile.Center).SafeNormalize(Vector2.UnitX) * 6; + launched = true; + } + + float badDist = Vector2.Distance(Owner.Calamity().mouseWorld, Projectile.Center); + if (badDist < 30) + { + time = 600; + } + + NPC target = Projectile.Center.ClosestNPCAt(550); + + if (target != null) + { + Vector2 moveToEnemy = (target.Center - Projectile.Center).SafeNormalize(Vector2.UnitX); + if (Projectile.velocity.Length() < 6) + Projectile.velocity += moveToEnemy * 0.3f; + else + Projectile.velocity *= 0.85f; + } + + if (time < 550 && target == null) + { + if (Projectile.velocity.Length() < 6) + Projectile.velocity += (Owner.Calamity().mouseWorld - Projectile.Center).SafeNormalize(Vector2.UnitX) * 0.35f; + else + Projectile.velocity *= 0.9f; + } + + if (time % waveOften == 0) + spinDir *= -1; + + Projectile.velocity = Projectile.velocity.RotatedBy(Main.rand.NextFloat(0.01f, 0.02f) * spinDir); + } + else if (time > 15) + { + Vector2 circle = Owner.Center + new Vector2(0, -30).RotatedBy(time * 0.05f); + Vector2 moveToEnemy = (circle - Projectile.Center).SafeNormalize(Vector2.UnitX); + if (Projectile.velocity.Length() < 8) + Projectile.velocity += moveToEnemy * Main.rand.NextFloat(0.2f, 0.4f); + else + Projectile.velocity *= 0.85f; + } + + time++; + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + modifiers.SourceDamage *= (launched ? 1f : 0.05f); + + Player Owner = Main.player[Projectile.owner]; + if (target.CanBeMoved(true)) + { + // Custom knockback + Vector2 launchVel = (Owner.Center - target.Center).SafeNormalize(Vector2.UnitY) * -10 * (launched ? 0.5f : 2); + target.velocity = launchVel * (target.knockBackResist == 0 ? 0.5f : 1f); + } + } + public override void OnKill(int timeLeft) + { + for (int i = 0; i <= 2; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, 175, (Projectile.velocity * 3).RotatedByRandom(0.6f) * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.8f, 1.3f)); + dust.noGravity = true; + } } } } diff --git a/Projectiles/Magic/Shadowbolt.cs b/Projectiles/Magic/Shadowbolt.cs index 15ec56342b..39192a3d4e 100644 --- a/Projectiles/Magic/Shadowbolt.cs +++ b/Projectiles/Magic/Shadowbolt.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Magic } } - if (spawnPlat) + if (spawnPlat && hasSetPlatSpawn) { chosenTarget = Projectile.Center.ClosestNPCAt(2000); @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Magic targetCenter = chosenTarget.Center; platPosCenter = Projectile.Center + Projectile.velocity * Main.rand.Next(70, 120 + 1); - platRot = (targetCenter - platPosCenter).SafeNormalize(Vector2.UnitX).ToRotation(); + platRot = (Projectile.Center - platPosCenter).SafeNormalize(Vector2.UnitX).ToRotation(); platPosWall = platPosCenter + new Vector2(0, 8).RotatedBy(platRot); spawnPlat = false; } @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Magic else targetCenter = chosenTarget.Center; - platRot = platRot.AngleLerp((targetCenter - platPosCenter).SafeNormalize(Vector2.UnitX).ToRotation(), 0.2f); + platRot = platRot.AngleLerp((targetCenter - platPosCenter).SafeNormalize(Vector2.UnitX).ToRotation(), 0.1f); platPosWall = platPosCenter + new Vector2(0, -30).RotatedBy(platRot + MathHelper.ToRadians(90f)); } if (!spawnPlat && !hasReboundOffPlat && targetCenter != Vector2.Zero) diff --git a/Sounds/Item/PhantasmalFuryShoot.ogg b/Sounds/Item/PhantasmalFuryShoot.ogg new file mode 100644 index 0000000000000000000000000000000000000000..27b47390c11434f3dd56f04731bc4ebcf4a4adcf GIT binary patch literal 21669 zcmc$_cU+T6_c$655fCx-P$dw0KoSB=Kva4XigXBqD`^m#kOW*{*H?NAk%SrutU%~R z2t|R_73mOAdK1@1FT1XaySlsHp!j27T?ht@;(XLFm#E=KrK4Od&xl7|P&C*?<1O zrK)3J$sh#1{^aOT<4cqfjR-Q%_X}|iv1`TcE-57CggpR31!Ms=94Eu0Nt?`vhDKvCFg^HX8xq zoq7n_wqr?8@_Y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wTOoE&)r{`s z4k5EI?6aA!E-;7Bx(}z!!Z`(Siy8RI%?2u$#a1OHRrv-@~yZ6wS z`{E3(`aED@P*743LIshkd`m9(%o@2e4q{dE8ySw9U2;9P+Zg80@5|(%r5|0U=jp5) zZf+L&o?n*3Kj%SHd~#J9s#CpMSwY#wDgpoN_vNT^_41L=T!>DP?f@$Wz~q&Zm)`<{7s_cjTr*MkR^Fl^!5|E{CL!QCPCi>fO|UxE7k#6 zAGsSi=AJ8smrtE?5q{q_Fa2hq2e@|G#c>2qcu--Zn%q~+zmn0eN%s_eYT zS-dG*`Ecmte`xlMXtNI<$!B)l&zX6YQxQp0|H(%!?VhU9Khy($Gd+FkjcP_!#tfOf Xf<1_5^8%&mLZU3p{l{D`XF>iSXE&~D literal 0 HcmV?d00001 From f51b085f34d9a9d36daffd8bb4e458ccabea441b Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 24 Jul 2024 15:26:16 -0700 Subject: [PATCH 10/16] phantasmal fury tooltip --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 6965df6705..4e2b2e3f22 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -595,7 +595,7 @@ ParasiticSceptor: { PhantasmalFury: { DisplayName: Phantasmal Fury - Tooltip: Casts a phantasmal bolt that explodes into more bolts + Tooltip: Casts a vortex of homing souls around you that repels enemies and will fly towards your cursor after a few seconds } PhoenixFlameBarrage: { From 0f0ac0ee76531a687ebfa83a480391e7aef8f3e7 Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 30 Jul 2024 17:33:08 -0700 Subject: [PATCH 11/16] Fixed hit cooldown code --- Projectiles/Magic/PhantasmalFuryProj.cs | 2 +- Projectiles/Magic/Phantom.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Projectiles/Magic/PhantasmalFuryProj.cs b/Projectiles/Magic/PhantasmalFuryProj.cs index b143d621a9..54d192a1ef 100644 --- a/Projectiles/Magic/PhantasmalFuryProj.cs +++ b/Projectiles/Magic/PhantasmalFuryProj.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.timeLeft = 900; Projectile.DamageType = DamageClass.Magic; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 20 * Projectile.extraUpdates; + Projectile.localNPCHitCooldown = 16 * Projectile.MaxUpdates; Projectile.ArmorPenetration = 15; } diff --git a/Projectiles/Magic/Phantom.cs b/Projectiles/Magic/Phantom.cs index b8223463ac..36b8d0bab3 100644 --- a/Projectiles/Magic/Phantom.cs +++ b/Projectiles/Magic/Phantom.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.timeLeft = 900; Projectile.DamageType = DamageClass.Magic; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 20 * Projectile.extraUpdates; + Projectile.localNPCHitCooldown = 16 * Projectile.MaxUpdates; Projectile.ArmorPenetration = 30; } From 4442ea0517718d6e33cd50a9aa95fa8cd9c9d9da Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Wed, 31 Jul 2024 00:44:04 -0700 Subject: [PATCH 12/16] auric land mines gen in notraps/gfb --- Localization/en-US/Mods.CalamityMod.UI.hjson | 1 + Systems/WorldgenManagementSystem.cs | 10 ++++++ World/MiscWorldgenRoutines.cs | 33 ++++++++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index b52c15e978..4511d4cfa3 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -616,6 +616,7 @@ DraedonFacility: Other minor research projects Abyss: Disposing of Silva's remains SulphurSea2: Irradiating one of the oceans Roxcalibur: I wanna rock +AuricLandMines: Setting god killing traps // Hold Shift tooltip default HoldShiftTooltipExtensionIndicator: Hold "Left Shift" for more HoldShiftTooltipReplacementIndicator: Hold "Left Shift" for details diff --git a/Systems/WorldgenManagementSystem.cs b/Systems/WorldgenManagementSystem.cs index d7c58193c9..72124efd39 100644 --- a/Systems/WorldgenManagementSystem.cs +++ b/Systems/WorldgenManagementSystem.cs @@ -306,6 +306,16 @@ namespace CalamityMod.Systems progress.Message = Language.GetOrRegister("Mods.CalamityMod.UI.Roxcalibur").Value; MiscWorldgenRoutines.PlaceRoxShrine(); })); + + // No Traps/GFB Auric Land Mines + if (Main.noTrapsWorld) + { + tasks.Insert(++currentFinalIndex, new PassLegacy("Auric Land Mines", (progress, config) => + { + progress.Message = Language.GetOrRegister("Mods.CalamityMod.UI.AuricLandMines").Value; + MiscWorldgenRoutines.GenerateAuricLandMines(); + })); + } } } diff --git a/World/MiscWorldgenRoutines.cs b/World/MiscWorldgenRoutines.cs index f413f99e1e..ddf4982220 100644 --- a/World/MiscWorldgenRoutines.cs +++ b/World/MiscWorldgenRoutines.cs @@ -10,6 +10,7 @@ using CalamityMod.Tiles.Abyss; using CalamityMod.Tiles.Astral; using CalamityMod.Tiles.Crags; using CalamityMod.Tiles.FurnitureAncient; +using CalamityMod.Tiles.FurnitureAuric; using CalamityMod.Tiles.Ores; using CalamityMod.Walls; using Microsoft.Xna.Framework; @@ -489,5 +490,37 @@ namespace CalamityMod.World } } #endregion + + #region Auric Land Mines + public static void GenerateAuricLandMines() + { + int landMineID = ModContent.TileType(); + int landMineChance = Main.zenithWorld ? 150 : 300; + float maxDepth = Main.maxTilesY * (Main.zenithWorld ? 0.75f : 0.5f); // depth increased in gfb due to the evil columns that extend further downward + for (int x = 0; x < Main.maxTilesX; x++) + { + for (int y = 0; y < maxDepth; y++) + { + Tile t = CalamityUtils.ParanoidTileRetrieval(x, y); + Tile above = CalamityUtils.ParanoidTileRetrieval(x, y - 1); + if (t != null) + { + if (above != null) + { + // Yharim killed the gods with auric land mines obviously + if ((t.TileType == TileID.Ebonstone || t.TileType == TileID.Crimstone) && !above.HasTile) + { + if (WorldGen.genRand.NextBool(landMineChance)) + { + WorldGen.SlopeTile(x, y); + WorldGen.PlaceTile(x, y - 1, landMineID); + } + } + } + } + } + } + } + #endregion } } From 4dfc0413f280f107139802a0c1b846dda3916d29 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 2 Aug 2024 22:05:16 -0400 Subject: [PATCH 13/16] Metastatis now attacks its hearts instead of you --- ...ods.CalamityMod.Items.Weapons.Summon.hjson | 7 +- NPCs/Other/ExhumedHeart.cs | 2 - Projectiles/Summon/BrimstoneDartMinion.cs | 8 ++ Projectiles/Summon/SepulcherMinion.cs | 85 +++++++++++-------- 4 files changed, 60 insertions(+), 42 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index d0a381c6fa..50131e4b99 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -519,9 +519,10 @@ Metastasis: { Tooltip: ''' Summons a Sepulcher to fight for you - While the Sepulcher is active brimstone hearts will begin to appear and orbit you - It will attempt to attack you more and more frequently depending on how many hearts are present - It takes up 4 minion slots and it can only be summoned once + While the Sepulcher is active, brimstone hearts will begin to appear and orbit you + When too many hearts are present, it will interrupt attacking to attack the hearts instead + This happens more frequently depending on how many hearts are present + Requires 4 minion slots to use and can only be summoned once [c/C61B40:A contemplated possible future of the cosmic serpent,] [c/C61B40:A gruesome warning for those blinded by the hunger for power.] ''' diff --git a/NPCs/Other/ExhumedHeart.cs b/NPCs/Other/ExhumedHeart.cs index 3816d66fed..d92df384c7 100644 --- a/NPCs/Other/ExhumedHeart.cs +++ b/NPCs/Other/ExhumedHeart.cs @@ -45,8 +45,6 @@ namespace CalamityMod.NPCs.Other NPC.Calamity().VulnerableToWater = true; } - public override void ApplyDifficultyAndPlayerScaling(int numPlayers, float balance, float bossAdjustment) => NPC.lifeMax = 50000; - public override void AI() { NPC.Opacity = Utils.GetLerpValue(0f, 25f, Time, true); diff --git a/Projectiles/Summon/BrimstoneDartMinion.cs b/Projectiles/Summon/BrimstoneDartMinion.cs index ea5ddd301c..60f7c8aee1 100644 --- a/Projectiles/Summon/BrimstoneDartMinion.cs +++ b/Projectiles/Summon/BrimstoneDartMinion.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.NPCs.Other; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -42,6 +43,13 @@ namespace CalamityMod.Projectiles.Summon Lighting.AddLight(Projectile.Center, 0.75f, 0f, 0f); } + public override bool? CanHitNPC(NPC target) + { + if (target.type == ModContent.NPCType()) + return false; + return null; + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Summon/SepulcherMinion.cs b/Projectiles/Summon/SepulcherMinion.cs index 93860c3ce5..971d9601d8 100644 --- a/Projectiles/Summon/SepulcherMinion.cs +++ b/Projectiles/Summon/SepulcherMinion.cs @@ -75,12 +75,12 @@ namespace CalamityMod.Projectiles.Summon HoverNearOwner, AttackEnemy_Charge, AttackEnemy_ReleaseDartBurst, - AttackOwner + AttackHearts } public int IdleTimer; public int AttackTimer; - public int PlayerAttackCountdown; + public int HeartAttackCountdown; public SepulcherSegment[] Segments = new SepulcherSegment[24]; public List Arms = new List(); public Player Owner => Main.player[Projectile.owner]; @@ -138,7 +138,7 @@ namespace CalamityMod.Projectiles.Summon Initialize(); writer.Write(IdleTimer); - writer.Write(PlayerAttackCountdown); + writer.Write(HeartAttackCountdown); writer.Write(Arms.Count); for (int i = 0; i < Arms.Count; i++) { @@ -158,7 +158,7 @@ namespace CalamityMod.Projectiles.Summon Initialize(); IdleTimer = reader.ReadInt32(); - PlayerAttackCountdown = reader.ReadInt32(); + HeartAttackCountdown = reader.ReadInt32(); int armCount = reader.ReadInt32(); Arms.Clear(); for (int i = 0; i < armCount; i++) @@ -183,7 +183,7 @@ namespace CalamityMod.Projectiles.Summon NPC potentialTarget = AttemptToFindTarget(1450f); // Enter the attack state if a valid enemy is found and go back to hovering otherwise. - // This will be overriden if attacking the owner. + // This will be overriden if attacking its hearts. if (CurrentAIState != AIState.AttackEnemy_ReleaseDartBurst && CurrentAIState != AIState.AttackEnemy_Charge) { if (potentialTarget != null) @@ -195,23 +195,19 @@ namespace CalamityMod.Projectiles.Summon AttackTimer = 0; } - // Reset the AI to player attack mode if the countdown is going on. - if (PlayerAttackCountdown > 0) + // Reset the AI to heart attack mode if the countdown is going on. + if (HeartAttackCountdown > 0) { - if (CurrentAIState != AIState.AttackOwner) - CurrentAIState = AIState.AttackOwner; + if (CurrentAIState != AIState.AttackHearts) + CurrentAIState = AIState.AttackHearts; - PlayerAttackCountdown--; + HeartAttackCountdown--; // If it's finished, go back to idle owner hover movement. - if (PlayerAttackCountdown <= 0) + if (HeartAttackCountdown <= 0) CurrentAIState = AIState.HoverNearOwner; } - - // Determine whether the projectile can attack its owner based on the attakc countdown. - Projectile.hostile = PlayerAttackCountdown > 0; - switch (CurrentAIState) { case AIState.HoverNearOwner: @@ -225,8 +221,8 @@ namespace CalamityMod.Projectiles.Summon AttackEnemyByCharging(potentialTarget); AttackTimer++; break; - case AIState.AttackOwner: - AttackOwner(); + case AIState.AttackHearts: + AttackHearts(); break; } @@ -248,7 +244,7 @@ namespace CalamityMod.Projectiles.Summon chanceToBecomeAngry = Utils.GetLerpValue(2f, 6f, heartsAttachedToOwner, true); if (Main.rand.NextFloat() < chanceToBecomeAngry) { - PlayerAttackCountdown = 300; + HeartAttackCountdown = 300; Projectile.netUpdate = true; } else if (Main.netMode != NetmodeID.MultiplayerClient) @@ -349,7 +345,7 @@ namespace CalamityMod.Projectiles.Summon float rotationalVelocityFactor = Utils.GetLerpValue(0f, 6f, Projectile.velocity.Length(), true); if (CurrentAIState == AIState.AttackEnemy_Charge) rotationalVelocityFactor *= 0.85f; - if (CurrentAIState == AIState.AttackOwner) + if (CurrentAIState == AIState.AttackHearts) rotationalVelocityFactor *= 1.2f; if (Arms[i].ReelingBack) @@ -455,14 +451,39 @@ namespace CalamityMod.Projectiles.Summon } } - public void AttackOwner() + public void AttackHearts() { // Attempt to angle towards the owner. float newSpeed = MathHelper.Lerp(Projectile.velocity.Length(), 21f, 0.025f); - if (!Projectile.WithinRange(Owner.Center, 370f)) + // Find the closest heart to the minion. + float npcDistCompare = 960f; + int index = -1; + foreach (NPC n in Main.ActiveNPCs) { - Vector2 idealVelocity = Projectile.SafeDirectionTo(Owner.Center) * newSpeed; + if (!n.CanBeChasedBy(Projectile, false) || n.type != ModContent.NPCType()) + continue; + + float currentNPCDist = Vector2.Distance(n.Center, Projectile.Center); + if (currentNPCDist < npcDistCompare) + { + npcDistCompare = currentNPCDist; + index = n.whoAmI; + } + } + + // If there are no Hearts left, immediately go back to being passive. + if (index == -1) + { + HeartAttackCountdown = 0; + CurrentAIState = AIState.HoverNearOwner; + return; + } + // Otherwise, move towards the targeted heart. + NPC targetHeart = Main.npc[index]; + if (!Projectile.WithinRange(targetHeart.Center, 185f)) + { + Vector2 idealVelocity = Projectile.SafeDirectionTo(targetHeart.Center) * newSpeed; Projectile.velocity = Projectile.velocity.MoveTowards(idealVelocity, 2f); float idealAimDirection = idealVelocity.ToRotation(); @@ -470,15 +491,15 @@ namespace CalamityMod.Projectiles.Summon } else if (Projectile.velocity.Length() < 36f) { - Projectile.velocity *= 1.03f; + Projectile.velocity *= 1.066f; if (JawSnapTimer <= 0f) { // Open the mouth of the jaw if close but not super close to the owner. - if (Projectile.WithinRange(Owner.Center, 300f)) + if (Projectile.WithinRange(targetHeart.Center, 150f)) JawRotation = JawRotation.AngleLerp(0.87f, 0.12f); // If really close, snap. - if (Projectile.WithinRange(Owner.Center, 180f)) + if (Projectile.WithinRange(targetHeart.Center, 90f)) { SoundEngine.PlaySound(SoundID.DD2_SkeletonHurt, Projectile.Center); JawSnapTimer = 45f; @@ -526,7 +547,7 @@ namespace CalamityMod.Projectiles.Summon public override bool PreDraw(ref Color lightColor) { - float angerFactor = Utils.GetLerpValue(300f, 280f, PlayerAttackCountdown, true) * Utils.GetLerpValue(0f, 30f, PlayerAttackCountdown, true); + float angerFactor = Utils.GetLerpValue(300f, 280f, HeartAttackCountdown, true) * Utils.GetLerpValue(0f, 30f, HeartAttackCountdown, true); float afterimageOutwardness = MathHelper.Lerp(6f, 8f, (float)Math.Cos(Main.GlobalTimeWrappedHourly * 2.3f) * 0.5f + 0.5f) * angerFactor; Color backAfterimageColor = Color.Red * angerFactor; backAfterimageColor.A = 0; @@ -671,21 +692,11 @@ namespace CalamityMod.Projectiles.Summon #endregion - #region Damage Stuff - public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) - { - modifiers.SourceDamage *= 0f; - if (Main.masterMode) modifiers.SourceDamage.Flat += 450f; - else if (Main.expertMode) modifiers.SourceDamage.Flat += 375f; - else modifiers.SourceDamage.Flat += 300f; - } - public override bool? CanHitNPC(NPC target) { if (target.type == ModContent.NPCType()) - return false; + return HeartAttackCountdown > 0; return null; } - #endregion } } From 5fbef67ecd3ec49bf3febe3169bfe52905c53a34 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Fri, 2 Aug 2024 20:16:43 -0700 Subject: [PATCH 14/16] prowler fixes + gold shoal coin --- NPCs/SunkenSea/LostShoal.cs | 17 +++++++++++++++++ NPCs/SunkenSea/SandProwler.cs | 12 +++++++++--- NPCs/SunkenSea/SandProwlerNested.cs | 29 ++++++++++++++--------------- 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/NPCs/SunkenSea/LostShoal.cs b/NPCs/SunkenSea/LostShoal.cs index b28c7f8f58..3f2cfc9766 100644 --- a/NPCs/SunkenSea/LostShoal.cs +++ b/NPCs/SunkenSea/LostShoal.cs @@ -87,6 +87,7 @@ namespace CalamityMod.NPCs.SunkenSea if (Main.rand.NextBool(50)) { Variant = (int)ShoalColor.Gold; + NPC.catchItem = ItemID.GoldCoin; } RandomOpacityOffset = Main.rand.NextFloat(MathHelper.TwoPi); @@ -342,6 +343,22 @@ namespace CalamityMod.NPCs.SunkenSea } } + public override void OnCaughtBy(Player player, Item item, bool failed) + { + // Gold shoals drop Gold Coins instead of ash when caught + // The shoal drops 1 coin by default while the extra coins are spawned here in a spread + if (!failed) + { + if (Variant == (int)ShoalColor.Gold) + { + for (int i = 0; i < Main.rand.Next(0, 5); i++) + { + Item.NewItem(NPC.GetSource_CatchEntity(NPC), NPC.getRect(), ItemID.GoldCoin); + } + } + } + } + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; diff --git a/NPCs/SunkenSea/SandProwler.cs b/NPCs/SunkenSea/SandProwler.cs index de2b390b52..38c002c8d3 100644 --- a/NPCs/SunkenSea/SandProwler.cs +++ b/NPCs/SunkenSea/SandProwler.cs @@ -16,7 +16,7 @@ namespace CalamityMod.NPCs.SunkenSea { public class SandProwler : ModNPC { - public const int maxLength = 9; + public const int maxLength = 14; public float speed = 3f; public float turnSpeed = 0.0625f; bool TailSpawned = false; @@ -50,7 +50,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { - NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(0) + NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() { CustomTexturePath = "CalamityMod/ExtraTextures/Bestiary/SeaSerpent_Bestiary", PortraitPositionXOverride = 40, @@ -549,12 +549,18 @@ namespace CalamityMod.NPCs.SunkenSea return 0f; } + public override bool CheckActive() { return IsHead; } - public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType(), 4); + public override void ModifyNPCLoot(NPCLoot npcLoot) => DefineSandProwlerLoot(npcLoot); + + public static void DefineSandProwlerLoot(NPCLoot npcLoot) + { + npcLoot.Add(ModContent.ItemType(), 4); + } public override void HitEffect(NPC.HitInfo hit) { diff --git a/NPCs/SunkenSea/SandProwlerNested.cs b/NPCs/SunkenSea/SandProwlerNested.cs index e33c3c3b3e..12ae5ed946 100644 --- a/NPCs/SunkenSea/SandProwlerNested.cs +++ b/NPCs/SunkenSea/SandProwlerNested.cs @@ -16,6 +16,7 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.ModLoader.Utilities; using Terraria.GameContent.Bestiary; +using CalamityMod.NPCs.Crags; namespace CalamityMod.NPCs.SunkenSea { @@ -54,16 +55,7 @@ namespace CalamityMod.NPCs.SunkenSea public override void SetStaticDefaults() { - NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() - { - CustomTexturePath = "CalamityMod/ExtraTextures/Bestiary/SeaSerpent_Bestiary", - PortraitPositionXOverride = 40, - PortraitPositionYOverride = 20 - }; - value.Position.Y += 20; - value.Position.X += 40; - NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; - + this.HideFromBestiary(); NPCID.Sets.TrailingMode[NPC.type] = 0; NPCID.Sets.TrailCacheLength[NPC.type] = 60; NPCID.Sets.UsesNewTargetting[NPC.type] = true; @@ -274,7 +266,7 @@ namespace CalamityMod.NPCs.SunkenSea if (SnapTimer > 0f) { int snapTime = PeekingOut ? 45 : 32; - float idealSpeed = PeekingOut ? 1.75f : 8f; + float idealSpeed = PeekingOut ? 1.75f : 10f; float newSpeed = MathHelper.Lerp(NPC.velocity.Length(), idealSpeed, 0.08f); NPC.velocity = CurrentSnapDirection.ToRotationVector2() * newSpeed; @@ -461,10 +453,7 @@ namespace CalamityMod.NPCs.SunkenSea return 0f; } - public override void ModifyNPCLoot(NPCLoot npcLoot) - { - npcLoot.Add(ModContent.ItemType(), 4); - } + public override void ModifyNPCLoot(NPCLoot npcLoot) => SandProwler.DefineSandProwlerLoot(npcLoot); public override void HitEffect(NPC.HitInfo hit) { @@ -481,5 +470,15 @@ namespace CalamityMod.NPCs.SunkenSea Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("SeaSerpentGore1").Type, NPC.scale); } } + public override void OnKill() + { + // Increase the kill count of Sand Prowlers for the Bestiary + if (NPC.GetWereThereAnyInteractions()) + { + NPC nPC = new NPC(); + nPC.SetDefaults(ModContent.NPCType()); + Main.BestiaryTracker.Kills.RegisterKill(nPC); + } + } } } From b66306c477a16cca040015e4750901bbdbf0f551 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Fri, 2 Aug 2024 23:53:01 -0400 Subject: [PATCH 15/16] Small Venusian Trident cinder buff --- Projectiles/Magic/VenusianBolt.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Magic/VenusianBolt.cs b/Projectiles/Magic/VenusianBolt.cs index 35754fc148..0b377eb749 100644 --- a/Projectiles/Magic/VenusianBolt.cs +++ b/Projectiles/Magic/VenusianBolt.cs @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Magic float explosionKB = 6f; Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), explosionDamage, explosionKB, Projectile.owner); - int cinderDamage = (int)(Projectile.damage * 0.01); + int cinderDamage = (int)(Projectile.damage * 0.02); float cinderKB = 0f; Vector2 cinderPos = Projectile.Center; int numCinders = 10; From 0f178ee4f4a600a1ea13693294a77e314dca39ae Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 3 Aug 2024 16:20:00 +0700 Subject: [PATCH 16/16] rusty chest loot cost less scales --- Items/Accessories/RustyMedallion.cs | 2 +- Items/BrokenWaterFilter.cs | 2 +- Items/Placeables/Furniture/EffigyOfDecay.cs | 2 +- Items/Weapons/Summon/RustyBeaconPrototype.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Accessories/RustyMedallion.cs b/Items/Accessories/RustyMedallion.cs index 4f7c014cc6..52d7328429 100644 --- a/Items/Accessories/RustyMedallion.cs +++ b/Items/Accessories/RustyMedallion.cs @@ -34,8 +34,8 @@ namespace CalamityMod.Items.Accessories public override void AddRecipes() { CreateRecipe(). - AddIngredient(20). AddRecipeGroup("AnySilverBar", 10). + AddIngredient(3). AddTile(TileID.Anvils). Register(); } diff --git a/Items/BrokenWaterFilter.cs b/Items/BrokenWaterFilter.cs index c4fe0204bc..d9bd11290a 100644 --- a/Items/BrokenWaterFilter.cs +++ b/Items/BrokenWaterFilter.cs @@ -95,8 +95,8 @@ namespace CalamityMod.Items public override void AddRecipes() { CreateRecipe(). - AddIngredient(20). AddRecipeGroup("IronBar", 10). + AddIngredient(). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Placeables/Furniture/EffigyOfDecay.cs b/Items/Placeables/Furniture/EffigyOfDecay.cs index 662a70a79b..98e581a6a0 100644 --- a/Items/Placeables/Furniture/EffigyOfDecay.cs +++ b/Items/Placeables/Furniture/EffigyOfDecay.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Items.Placeables.Furniture public override void AddRecipes() { CreateRecipe(). - AddIngredient(20). AddIngredient(10). + AddIngredient(2). AddTile(TileID.Anvils). Register(); } diff --git a/Items/Weapons/Summon/RustyBeaconPrototype.cs b/Items/Weapons/Summon/RustyBeaconPrototype.cs index e17e158a74..c275a75dde 100644 --- a/Items/Weapons/Summon/RustyBeaconPrototype.cs +++ b/Items/Weapons/Summon/RustyBeaconPrototype.cs @@ -48,8 +48,8 @@ namespace CalamityMod.Items.Weapons.Summon public override void AddRecipes() { CreateRecipe(). - AddIngredient(20). AddRecipeGroup("AnySilverBar", 10). + AddIngredient(3). AddTile(TileID.Anvils). Register(); }