From ed2724c38fb2440fea0f9728f3aa66892c9384c9 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Tue, 25 Jan 2022 15:13:55 -0600 Subject: [PATCH 01/27] 1 - Disabled lava slime IL edit because it's fucking up the game. 2 - Astrum Deus projectile edits. --- ILEditing/ILChangesLoading.cs | 4 ++-- NPCs/CalamityAI.cs | 6 +++--- Projectiles/Boss/AstralGodRay.cs | 8 ++++---- Projectiles/Boss/AstralShot2.cs | 5 +++-- Projectiles/Boss/DeusMine.cs | 23 +++++++++-------------- 5 files changed, 21 insertions(+), 25 deletions(-) diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index d164469225..3e28c128e2 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -86,7 +86,7 @@ namespace CalamityMod.ILEditing IL.Terraria.Item.Prefix += RelaxPrefixRequirements; On.Terraria.NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns; IL.Terraria.NPC.SpawnNPC += MakeVoodooDemonDollWork; - IL.Terraria.NPC.VanillaHitEffect += RemoveLavaDropsFromExpertLavaSlimes; + //IL.Terraria.NPC.VanillaHitEffect += RemoveLavaDropsFromExpertLavaSlimes; IL.Terraria.Main.UpdateTime += BloodMoonsRequire200MaxLife; // Fix vanilla bugs exposed by Calamity mechanics @@ -159,7 +159,7 @@ namespace CalamityMod.ILEditing IL.Terraria.Item.Prefix -= RelaxPrefixRequirements; On.Terraria.NPC.SlimeRainSpawns -= PreventBossSlimeRainSpawns; IL.Terraria.NPC.SpawnNPC -= MakeVoodooDemonDollWork; - IL.Terraria.NPC.VanillaHitEffect -= RemoveLavaDropsFromExpertLavaSlimes; + //IL.Terraria.NPC.VanillaHitEffect -= RemoveLavaDropsFromExpertLavaSlimes; IL.Terraria.Main.UpdateTime -= BloodMoonsRequire200MaxLife; // Fix vanilla bugs exposed by Calamity mechanics diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index fd73a177e9..a259fecf4a 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -3892,7 +3892,7 @@ namespace CalamityMod.NPCs npc.TargetClosest(); if (Vector2.Distance(player.Center, npc.Center) > 80f) { - Main.PlaySound(SoundID.Item12, npc.Center); + Main.PlaySound(phase2 ? SoundID.Item91 : SoundID.Item12, npc.Center); float num941 = (death ? 16f : revenge ? 14f : 13f) + enrageScale * 4f; Vector2 vector104 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + (npc.height / 2)); float num942 = player.position.X + player.width * 0.5f - vector104.X; @@ -3916,7 +3916,7 @@ namespace CalamityMod.NPCs for (int i = -1; i <= 1; i += 2) { Vector2 laserStartPos = vector104 + i * perp + Main.rand.NextVector2CircularEdge(6f, 6f); - Projectile godRay = Projectile.NewProjectileDirect(laserStartPos, laserVelocity * 0.25f, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); + Projectile godRay = Projectile.NewProjectileDirect(laserStartPos, laserVelocity * 0.8f, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); // Tell this Phased God Ray exactly which way it should be waving. godRay.localAI[1] = i * 0.5f; @@ -3926,7 +3926,7 @@ namespace CalamityMod.NPCs { Projectile.NewProjectile(vector104, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); if (doubleLasersAndSplittingMines && npc.ai[0] % 4f == 0f) - Projectile.NewProjectile(vector104, laserVelocity * 0.75f, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); + Projectile.NewProjectile(vector104, laserVelocity * 0.8f, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); } } } diff --git a/Projectiles/Boss/AstralGodRay.cs b/Projectiles/Boss/AstralGodRay.cs index 74c78ac6f5..d9ef0b693f 100644 --- a/Projectiles/Boss/AstralGodRay.cs +++ b/Projectiles/Boss/AstralGodRay.cs @@ -36,8 +36,8 @@ namespace CalamityMod.Projectiles.Boss projectile.hostile = true; projectile.alpha = 255; projectile.penetrate = -1; - projectile.MaxUpdates = 3; - projectile.timeLeft = 2400; + projectile.MaxUpdates = 1; + projectile.timeLeft = 1200; projectile.tileCollide = false; projectile.ignoreWater = true; projectile.Calamity().affectedByMaliceModeVelocityMultiplier = true; @@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.Boss public override Color? GetAlpha(Color lightColor) { if (WaveFrameState < 0f) - return new Color(255, 200, 0, projectile.alpha); + return new Color(255, 100, 0, projectile.alpha); return new Color(0, 255, 200, projectile.alpha); } @@ -128,7 +128,7 @@ namespace CalamityMod.Projectiles.Boss Vector2 dustVel = projectile.velocity / 4f; for (int i = 0; i < dustAmt; ++i) { - Dust d = Dust.NewDustDirect(dustPos, 0, 0, dustID, 0f, 0f, Scale: 2.5f); + Dust d = Dust.NewDustDirect(dustPos, 0, 0, dustID, 0f, 0f, Scale: 1.5f); d.velocity += dustVel; d.velocity *= Main.rand.NextFloat(0.4f, 1f); d.noGravity = true; diff --git a/Projectiles/Boss/AstralShot2.cs b/Projectiles/Boss/AstralShot2.cs index 432887d3e0..eb8e47dd2b 100644 --- a/Projectiles/Boss/AstralShot2.cs +++ b/Projectiles/Boss/AstralShot2.cs @@ -37,11 +37,12 @@ namespace CalamityMod.Projectiles.Boss { if (projectile.ai[0] == 1f) { + projectile.extraUpdates = 2; bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; - float maxVelocity = malice ? 15f : 12f; + float maxVelocity = malice ? 3.75f : 3f; if (projectile.velocity.Length() < maxVelocity) { - projectile.velocity *= malice ? 1.075f : 1.05f; + projectile.velocity *= malice ? 1.02f : 1.015f; if (projectile.velocity.Length() > maxVelocity) { projectile.velocity.Normalize(); diff --git a/Projectiles/Boss/DeusMine.cs b/Projectiles/Boss/DeusMine.cs index e4c20dc1a8..a883a514a2 100644 --- a/Projectiles/Boss/DeusMine.cs +++ b/Projectiles/Boss/DeusMine.cs @@ -11,6 +11,9 @@ namespace CalamityMod.Projectiles.Boss { public class DeusMine : ModProjectile { + private const int MaxTimeLeft = 600; + private const int FadeTime = 85; + public override void SetStaticDefaults() { DisplayName.SetDefault("Astral Mine"); @@ -25,7 +28,7 @@ namespace CalamityMod.Projectiles.Boss projectile.alpha = 100; projectile.penetrate = -1; projectile.tileCollide = false; - projectile.timeLeft = 900; + projectile.timeLeft = MaxTimeLeft; } public override void SendExtraAI(BinaryWriter writer) @@ -50,29 +53,21 @@ namespace CalamityMod.Projectiles.Boss } // Deal no damage if fading out and not set to explode - // Grow in size if set to explode - if (projectile.timeLeft < 85) + if (projectile.timeLeft < FadeTime) { if (projectile.ai[0] == 0f) - { projectile.damage = 0; - } - else - { - projectile.scale += 1f / 85f; - projectile.width = projectile.height = (int)(30f * projectile.scale); - } } } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(projectile.Center, 12f, targetHitbox); - public override bool CanHitPlayer(Player target) => projectile.timeLeft <= 815 && (projectile.timeLeft >= 85 || projectile.ai[0] == 1f); + public override bool CanHitPlayer(Player target) => projectile.timeLeft <= MaxTimeLeft - FadeTime && (projectile.timeLeft >= FadeTime || projectile.ai[0] == 1f); public override Color? GetAlpha(Color lightColor) { // Fade in - if (projectile.timeLeft > 815) + if (projectile.timeLeft > MaxTimeLeft - FadeTime) { projectile.localAI[1] += 1f; byte b2 = (byte)(((int)projectile.localAI[1]) * 3); @@ -82,7 +77,7 @@ namespace CalamityMod.Projectiles.Boss // Fade out if not set to explode // Glow more red over time if set to explode - if (projectile.timeLeft < 85) + if (projectile.timeLeft < FadeTime) { byte b2 = (byte)(projectile.timeLeft * 3); if (projectile.ai[0] == 0f) @@ -148,7 +143,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - if (projectile.timeLeft > 815 || (projectile.timeLeft < 85 && projectile.ai[0] == 0f)) + if (projectile.timeLeft > MaxTimeLeft - FadeTime || (projectile.timeLeft < FadeTime && projectile.ai[0] == 0f)) return; target.AddBuff(ModContent.BuffType(), 180); From 52a7e996a7240ca747624bf576cbe2d5dccf53d6 Mon Sep 17 00:00:00 2001 From: Dominic Date: Mon, 24 Jan 2022 17:56:10 -0600 Subject: [PATCH 02/27] Added on-hit visuals for Violence --- Particles/Blood.png | Bin 0 -> 10588 bytes Particles/Blood2.png | Bin 0 -> 34121 bytes Particles/BloodParticle.cs | 46 +++++++++++ Particles/BloodParticle2.cs | 44 ++++++++++ Particles/ImpactParticle.cs | 40 ++++++++++ Particles/SparkParticle.cs | 48 +++++++++++ Projectiles/Melee/ViolenceThrownProjectile.cs | 75 +++++++++++++++++- 7 files changed, 252 insertions(+), 1 deletion(-) create mode 100644 Particles/Blood.png create mode 100644 Particles/Blood2.png create mode 100644 Particles/BloodParticle.cs create mode 100644 Particles/BloodParticle2.cs create mode 100644 Particles/ImpactParticle.cs create mode 100644 Particles/SparkParticle.cs diff --git a/Particles/Blood.png b/Particles/Blood.png new file mode 100644 index 0000000000000000000000000000000000000000..d123f8dc428b5ae990f201ab02c565682885051a GIT binary patch literal 10588 zcmZ`f_d6Th_c3FuqH3$Q)TR`P6)i=L+Iy9XJt{^~vHHGMT3RDUjMUy+?De)9JBYnI zVuxB$iShOM1HM0;d(L^Dd+u}YJ>$9ep7Y+=NQaq$hXDWpFze}RnO@_NYZ#!Ty&l!v zIXSKo1AqG+J-lA&z*|w_O|*zI0JEEQQdPH zi5DLASaieb=cK6mIV-#HD~Jro;b{H|fI%Q$!)CWM@#3-{j=tTxPo;=*k|AE*BCpz! zhWoo0Cr{R7*!D*A4glg0`_2m!FScExeCjotZkIVp5+gBy1%U_Tu6`{-OQMB4?^>KA z!*8U@F#q^!%UrD_F++*UGHbwM|9sVr3G9Z7q4{|=zk4NpOA8t?6XVkpF??K2)t%MI z3(>ywIx4)rr+IGGZnsua#3ib8jtt=}rjUBvC;1FdRk0W4=h<7C;dJ*e=dOxJ+%}lL ztn8dO@#1Sgc)tSC~1Lnm79L@_H=t$Cdz%VVe)d zr>v614KA3}g-T+~PB;m}MIL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awjonTiX6O{3z%z&n`RrZ)k9(GfWkg!{UK$l1kX+*D ztlLy=@UM z+kiMYlV7k1U3`{`%jX>uL*3xv&)`P3j=qy*SlTV$0&DR8%Q)U~*B{WRamoFf!kWqg zONO$;;G12?9>sQ!3G@$ot(8=wLq?kos0#Qv{*)=qTh><7`Et`vO)>__h$Lx~6LIV&d)j~ws`EP9ty=(vKpVf*y8*m6f3^}ebCg$t|R%e427hSJQ$xoPrOO7w)PN0 z;Igl?Z6`2Rco0~tmSyLo{vpXpehu1j)}xM{3{=siU`*2uI&!sh2uO4$X95avN@r62 zUA*X8`Xdv2JDg$M@-lzRw^;MvG4rQs0CAT^lkWT0Z$lct?Ve6Z^=;kPlH`o+ZKjT6 zFlGZLg-CrxYf3ec*_mZ+*fo0uM{njhQqG}b-9a>O2dPSpcvC1Dy35d#!*RB6Lrxdr zg45R%o_&j@x%U7N3N(<&>5naQP_kHv6KjxaBftMMv0Z$v%;S4*h^1&~Oa?K>%WjcK zzpKOecfHS6Bvc>&cFFZR4(f%xTzwYg*lN|N(DX0Jg>T8G!XXSC`r?@o+B7j4aF-oo z<|#;?TXNK|XsRo=i;dzArRH{xm92pCuuLjz#ZHZmz*SqS`EufU!9vGoaSY9)omc<9 zU-3hz(zbb9&IB?SU72C8rtla|b+5AHl-^iRPeQmDgZ5qB0=B6YH2x&~d@@no;*a6R3vTzEJ3N|>-yhUx&3Fo_q1*Nt0vtG7{U z{+UKw{U47O?&34{$!EcX(YcuF9(?}HF##v6H zN-V}?qkvk0*@4S1n#CDR==>b6K1lcvKn<@bMC0rZrJ)R)kG@>1PzT)BkHTT~?$xK5 zl52U&GUR*hD+27SA) z;iu}2)p4G=QZIIO6GXl#yj#kb1N(?g#sg-dJZ0?q043Z-zV3 f{r#PK#fm9#_-CEQ;q!GzBtTEwNUP?tbL{^CVID7{ literal 0 HcmV?d00001 diff --git a/Particles/Blood2.png b/Particles/Blood2.png new file mode 100644 index 0000000000000000000000000000000000000000..be02000dfc37b334828f276f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( zW}w>vMc?NfzVSw;-bb_J=@nSIr7z*}i^wmU<(cmUKV9*SPkeTxkO)Ibre;OH$n}vB z_}gg+miPz(bE;^({x$#YMcb{w0}@+zE8k=FzL%3T2xps(9TtEIT6|!`@gZ3)TR|P! z-8q^+UJmV;Ez(_A`C{r5Q;M5ya6RK=t0T9 z;Rab|e)*>n^)$9W?$>_AK_x^_vikac+Y;^DyRxg$9FLP`u1QNY^1^||l&gl=CK5uu zo9NZBQ_otAS##J(dx7pa7{bi_cRF0{3UYiNe6nUD_H_EravBiO)kfj@jP=}*tUE(U zRO0X=wIa0ph9uwHuH|EFVGPqr@*(>*5762)3bER!KoM2{lUE$x- z-?|U|lVBbe?0V3Y)Sp1E0~AZO$--QcCEF?DggF&_mH%VsJhHrBG1~^%|M&g>?-=~Q hO`L6>=$zZ%Ga1Z|y`y@wNQ4D^)Lv>U*C<*?{2y~QDyIMd literal 0 HcmV?d00001 diff --git a/Particles/BloodParticle.cs b/Particles/BloodParticle.cs new file mode 100644 index 0000000000..8a8fe242de --- /dev/null +++ b/Particles/BloodParticle.cs @@ -0,0 +1,46 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class BloodParticle : Particle + { + public Color InitialColor; + public override bool SetLifetime => true; + public override bool UseCustomDraw => true; + public override bool UseAdditiveBlend => true; + + public override string Texture => "CalamityMod/Particles/Blood"; + + public BloodParticle(Vector2 relativePosition, Vector2 velocity, int lifetime, float scale, Color color) + { + Position = relativePosition; + Velocity = velocity; + Scale = scale; + Lifetime = lifetime; + Color = InitialColor = color; + } + + public override void Update() + { + Scale *= 0.98f; + Velocity.X *= 0.97f; + Velocity.Y = MathHelper.Clamp(Velocity.Y + 0.9f, -22f, 22f); + Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)); + Rotation = Velocity.ToRotation() + MathHelper.PiOver2; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + float verticalStretch = Utils.InverseLerp(0f, 24f, Math.Abs(Velocity.Y), true) * 0.84f; + float brightness = (float)Math.Pow(Lighting.Brightness((int)(Position.X / 16f), (int)(Position.Y / 16f)), 0.15); + Vector2 scale = new Vector2(1f, verticalStretch + 1f) * Scale * 0.1f; + Texture2D texture = ModContent.GetTexture(Texture); + + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color * brightness, Rotation, texture.Size() * 0.5f, scale, 0, 0f); + } + } +} diff --git a/Particles/BloodParticle2.cs b/Particles/BloodParticle2.cs new file mode 100644 index 0000000000..500fdd6c7c --- /dev/null +++ b/Particles/BloodParticle2.cs @@ -0,0 +1,44 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class BloodParticle2 : Particle + { + public Color InitialColor; + public override bool SetLifetime => true; + public override bool UseCustomDraw => true; + public override bool UseAdditiveBlend => true; + + public override string Texture => "CalamityMod/Particles/Blood2"; + + public BloodParticle2(Vector2 relativePosition, Vector2 velocity, int lifetime, float scale, Color color) + { + Position = relativePosition; + Velocity = velocity; + Scale = scale; + Lifetime = lifetime; + Color = InitialColor = color; + } + + public override void Update() + { + Velocity *= 0.98f; + Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 4D)); + Rotation = Velocity.ToRotation(); + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + float brightness = (float)Math.Pow(Lighting.Brightness((int)(Position.X / 16f), (int)(Position.Y / 16f)), 0.15); + Texture2D texture = ModContent.GetTexture(Texture); + Rectangle frame = texture.Frame(1, 3, 0, (int)(LifetimeCompletion * 3f)); + Vector2 origin = frame.Size() * 0.5f; + + spriteBatch.Draw(texture, Position - Main.screenPosition, frame, Color * brightness, Rotation, origin, Scale, 0, 0f); + } + } +} diff --git a/Particles/ImpactParticle.cs b/Particles/ImpactParticle.cs new file mode 100644 index 0000000000..43728049c4 --- /dev/null +++ b/Particles/ImpactParticle.cs @@ -0,0 +1,40 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class ImpactParticle : Particle + { + public float AngularVelocity; + public override bool SetLifetime => true; + public override bool UseCustomDraw => true; + public override bool UseAdditiveBlend => true; + + public override string Texture => "CalamityMod/Projectiles/StarProj"; + + public ImpactParticle(Vector2 relativePosition, float angularVelocity, int lifetime, float scale, Color color) + { + Position = relativePosition; + Scale = scale; + AngularVelocity = angularVelocity; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + Lifetime = lifetime; + Color = color; + } + + public override void Update() => Rotation += AngularVelocity; + + public override void CustomDraw(SpriteBatch spriteBatch) + { + float scaleFactor = CalamityUtils.Convert01To010(LifetimeCompletion) * 1.3f; + Vector2 scale = new Vector2(0.3f, 1f) * scaleFactor; + Texture2D texture = ModContent.GetTexture(Texture); + + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, 0f, texture.Size() * 0.5f, scale, 0, 0f); + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, Rotation, texture.Size() * 0.5f, scale, 0, 0f); + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, -Rotation, texture.Size() * 0.5f, scale, 0, 0f); + } + } +} diff --git a/Particles/SparkParticle.cs b/Particles/SparkParticle.cs new file mode 100644 index 0000000000..280c905c45 --- /dev/null +++ b/Particles/SparkParticle.cs @@ -0,0 +1,48 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class SparkParticle : Particle + { + public Color InitialColor; + public override bool SetLifetime => true; + public override bool UseCustomDraw => true; + public override bool UseAdditiveBlend => true; + + public override string Texture => "CalamityMod/Projectiles/StarProj"; + + public SparkParticle(Vector2 relativePosition, Vector2 velocity, int lifetime, float scale, Color color) + { + Position = relativePosition; + Velocity = velocity; + Scale = scale; + Lifetime = lifetime; + Color = InitialColor = color; + } + + public override void Update() + { + Scale *= 0.95f; + Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)); + Velocity *= 0.95f; + if (Velocity.Length() < 12f) + { + Velocity.X *= 0.94f; + Velocity.Y += 0.25f; + } + Rotation = Velocity.ToRotation() + MathHelper.PiOver2; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Vector2 scale = new Vector2(0.35f, 1.6f) * Scale; + Texture2D texture = ModContent.GetTexture(Texture); + + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, Rotation, texture.Size() * 0.5f, scale, 0, 0f); + } + } +} diff --git a/Projectiles/Melee/ViolenceThrownProjectile.cs b/Projectiles/Melee/ViolenceThrownProjectile.cs index 0315288d26..1be6b26875 100644 --- a/Projectiles/Melee/ViolenceThrownProjectile.cs +++ b/Projectiles/Melee/ViolenceThrownProjectile.cs @@ -1,3 +1,4 @@ +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -44,7 +45,7 @@ namespace CalamityMod.Projectiles.Melee if (Owner.channel) { HomeTowardsMouse(); - projectile.rotation += 0.35f / projectile.MaxUpdates; + projectile.rotation += 0.45f / projectile.MaxUpdates; } else { @@ -97,6 +98,78 @@ namespace CalamityMod.Projectiles.Melee Owner.itemAnimation = 2; } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Main.netMode != NetmodeID.Server) + { + // Play a splatter and impact sound. + Main.PlaySound(SoundID.DD2_CrystalCartImpact, projectile.Center); + + float damageInterpolant = Utils.InverseLerp(950f, 2000f, damage, true); + float impactAngularVelocity = MathHelper.Lerp(0.08f, 0.2f, damageInterpolant); + float impactParticleScale = MathHelper.Lerp(0.6f, 1f, damageInterpolant); + impactAngularVelocity *= Main.rand.NextBool().ToDirectionInt() * Main.rand.NextFloat(0.75f, 1.25f); + + Color impactColor = Color.Lerp(Color.Silver, Color.Gold, Main.rand.NextFloat(0.5f)); + Vector2 impactPoint = Vector2.Lerp(projectile.Center, target.Center, 0.65f); + Vector2 bloodSpawnPosition = target.Center + Main.rand.NextVector2Circular(target.width, target.height) * 0.04f; + Vector2 splatterDirection = (projectile.Center - bloodSpawnPosition).SafeNormalize(Vector2.UnitY); + + // Emit blood if the target is organic. + if (target.Organic()) + { + Main.PlaySound(SoundID.NPCHit18, projectile.Center); + for (int i = 0; i < 6; i++) + { + int bloodLifetime = Main.rand.Next(22, 36); + float bloodScale = Main.rand.NextFloat(0.6f, 0.8f); + Color bloodColor = Color.Lerp(Color.Red, Color.DarkRed, Main.rand.NextFloat()); + bloodColor = Color.Lerp(bloodColor, new Color(51, 22, 94), Main.rand.NextFloat(0.65f)); + + if (Main.rand.NextBool(20)) + bloodScale *= 2f; + + Vector2 bloodVelocity = splatterDirection.RotatedByRandom(0.81f) * Main.rand.NextFloat(11f, 23f); + bloodVelocity.Y -= 12f; + BloodParticle blood = new BloodParticle(bloodSpawnPosition, bloodVelocity, bloodLifetime, bloodScale, bloodColor); + GeneralParticleHandler.SpawnParticle(blood); + } + for (int i = 0; i < 3; i++) + { + float bloodScale = Main.rand.NextFloat(0.2f, 0.33f); + Color bloodColor = Color.Lerp(Color.Red, Color.DarkRed, Main.rand.NextFloat(0.5f, 1f)); + Vector2 bloodVelocity = splatterDirection.RotatedByRandom(0.9f) * Main.rand.NextFloat(9f, 14.5f); + BloodParticle2 blood = new BloodParticle2(bloodSpawnPosition, bloodVelocity, 20, bloodScale, bloodColor); + GeneralParticleHandler.SpawnParticle(blood); + } + } + + // Emit sparks if the target is not organic. + else + { + for (int i = 0; i < 6; i++) + { + int sparkLifetime = Main.rand.Next(22, 36); + float sparkScale = Main.rand.NextFloat(0.8f, 1f) + damageInterpolant * 0.85f; + Color sparkColor = Color.Lerp(Color.Silver, Color.Gold, Main.rand.NextFloat(0.7f)); + sparkColor = Color.Lerp(sparkColor, Color.Orange, Main.rand.NextFloat()); + + if (Main.rand.NextBool(10)) + sparkScale *= 2f; + + Vector2 sparkVelocity = splatterDirection.RotatedByRandom(0.6f) * Main.rand.NextFloat(12f, 25f); + sparkVelocity.Y -= 6f; + SparkParticle spark = new SparkParticle(impactPoint, sparkVelocity, sparkLifetime, sparkScale, sparkColor); + GeneralParticleHandler.SpawnParticle(spark); + } + } + + // And create an impact point particle. + ImpactParticle impactParticle = new ImpactParticle(impactPoint, impactAngularVelocity, 20, impactParticleScale, impactColor); + GeneralParticleHandler.SpawnParticle(impactParticle); + } + } + internal float PrimitiveWidthFunction(float completionRatio) { float tipWidthFactor = MathHelper.SmoothStep(0f, 1f, Utils.InverseLerp(0.01f, 0.04f, completionRatio)); From 070700853bf00f338b4eb1e3aaeb171d645dabe0 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 26 Jan 2022 05:54:45 -0600 Subject: [PATCH 03/27] 1 - Deus laser change. --- NPCs/CalamityAI.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index a259fecf4a..2bbcd4a65a 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -3910,13 +3910,13 @@ namespace CalamityMod.NPCs if (phase2) { // Waving beams need to start offset so they cross each other neatly. - float waveSideOffset = Main.rand.NextFloat(18f, 28f); + float waveSideOffset = Main.rand.NextFloat(9f, 14f); Vector2 perp = shootDirection.RotatedBy(-MathHelper.PiOver2) * waveSideOffset; for (int i = -1; i <= 1; i += 2) { Vector2 laserStartPos = vector104 + i * perp + Main.rand.NextVector2CircularEdge(6f, 6f); - Projectile godRay = Projectile.NewProjectileDirect(laserStartPos, laserVelocity * 0.8f, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); + Projectile godRay = Projectile.NewProjectileDirect(laserStartPos, laserVelocity * 0.9f, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); // Tell this Phased God Ray exactly which way it should be waving. godRay.localAI[1] = i * 0.5f; @@ -3926,7 +3926,7 @@ namespace CalamityMod.NPCs { Projectile.NewProjectile(vector104, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); if (doubleLasersAndSplittingMines && npc.ai[0] % 4f == 0f) - Projectile.NewProjectile(vector104, laserVelocity * 0.8f, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); + Projectile.NewProjectile(vector104, laserVelocity * 0.9f, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); } } } From fc71a804e7c897606b8b6ac9a123486319f12e0e Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 25 Jan 2022 17:12:48 -0600 Subject: [PATCH 04/27] Made Charred Idol craftable at a mythril anvil --- Items/SummonItems/CharredIdol.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Items/SummonItems/CharredIdol.cs b/Items/SummonItems/CharredIdol.cs index 5b71c87e1a..ed3d132efa 100644 --- a/Items/SummonItems/CharredIdol.cs +++ b/Items/SummonItems/CharredIdol.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Items.SummonItems { DisplayName.SetDefault("Charred Idol"); Tooltip.SetDefault("Use at your own risk\n" + - "Summons the Brimstone Elemental when used in the brimstone crags\n" + - "Not consumable"); + "Summons the Brimstone Elemental when used in the brimstone crags\n" + + "Not consumable"); } public override void SetDefaults() @@ -38,12 +38,12 @@ namespace CalamityMod.Items.SummonItems public override bool UseItem(Player player) { Main.PlaySound(SoundID.Roar, player.position, 0); - if (Main.netMode != NetmodeID.MultiplayerClient) - NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); - else - NetMessage.SendData(MessageID.SpawnBoss, -1, -1, null, player.whoAmI, ModContent.NPCType()); + if (Main.netMode != NetmodeID.MultiplayerClient) + NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); + else + NetMessage.SendData(MessageID.SpawnBoss, -1, -1, null, player.whoAmI, ModContent.NPCType()); - return true; + return true; } public override void AddRecipes() @@ -51,8 +51,8 @@ namespace CalamityMod.Items.SummonItems ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.SoulofNight, 5); recipe.AddIngredient(ModContent.ItemType(), 7); - recipe.AddIngredient(ModContent.ItemType(), 2); - recipe.AddTile(TileID.AdamantiteForge); + recipe.AddIngredient(ModContent.ItemType(), 2); + recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); } From 585211cbcd6b7ceff0a0a4928ded53bce2019aab Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 25 Jan 2022 17:13:49 -0600 Subject: [PATCH 05/27] Renamed Unstable Prism --- Items/Accessories/UnstablePrism.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Accessories/UnstablePrism.cs b/Items/Accessories/UnstablePrism.cs index 9b250daf51..00bb5af62e 100644 --- a/Items/Accessories/UnstablePrism.cs +++ b/Items/Accessories/UnstablePrism.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories { public override void SetStaticDefaults() { - DisplayName.SetDefault("Unstable Prism"); + DisplayName.SetDefault("Unstable Granite Core"); Tooltip.SetDefault("Three sparks are released on critical hits"); Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(7, 5)); } From 1d0b406abcec76b7cbd63bbb0cfefc4433940135 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 25 Jan 2022 17:25:30 -0600 Subject: [PATCH 06/27] Reduced Yharon's invincibility time --- NPCs/Yharon/Yharon.cs | 2393 +++++++++++++++++++++-------------------- 1 file changed, 1197 insertions(+), 1196 deletions(-) diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 69bc14a8ee..6350d1e357 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -35,9 +35,9 @@ namespace CalamityMod.NPCs.Yharon public class Yharon : ModNPC { private Rectangle safeBox = default; - private Vector2 flareDustBulletHellSpawn = default; + private Vector2 flareDustBulletHellSpawn = default; - private bool enraged = false; + private bool enraged = false; private bool protectionBoost = false; private bool moveCloser = false; private bool useTornado = true; @@ -46,26 +46,27 @@ namespace CalamityMod.NPCs.Yharon private bool startSecondAI = false; private bool spawnArena = false; private int invincibilityCounter = 0; - private int fastChargeTelegraphTime = 120; + private int fastChargeTelegraphTime = 120; - private const float ai2GateValue = 0.55f; + private const float ai2GateValue = 0.55f; + public const int Phase2InvincibilityTime = 300; - public static float normalDR = 0.22f; + public static float normalDR = 0.22f; public static float EnragedDR = 0.9f; public override void SetStaticDefaults() { DisplayName.SetDefault("Jungle Dragon, Yharon"); Main.npcFrameCount[npc.type] = 7; - NPCID.Sets.TrailingMode[npc.type] = 1; - } + NPCID.Sets.TrailingMode[npc.type] = 1; + } public override void SetDefaults() { - npc.Calamity().canBreakPlayerDefense = true; + npc.Calamity().canBreakPlayerDefense = true; npc.npcSlots = 50f; - npc.GetNPCDamage(); - npc.width = 200; + npc.GetNPCDamage(); + npc.width = 200; npc.height = 200; npc.defense = 90; npc.LifeMaxNERB(1085000, 1300000, 370000); @@ -76,7 +77,7 @@ namespace CalamityMod.NPCs.Yharon aiType = -1; npc.value = Item.buyPrice(1, 0, 0, 0); npc.boss = true; - npc.DR_NERD(normalDR); + npc.DR_NERD(normalDR); npc.noGravity = true; npc.noTileCollide = true; @@ -87,10 +88,10 @@ namespace CalamityMod.NPCs.Yharon npc.HitSound = SoundID.NPCHit56; npc.DeathSound = SoundID.NPCDeath60; bossBag = ModContent.ItemType(); - npc.Calamity().VulnerableToHeat = false; - npc.Calamity().VulnerableToCold = true; - npc.Calamity().VulnerableToSickness = true; - } + npc.Calamity().VulnerableToHeat = false; + npc.Calamity().VulnerableToCold = true; + npc.Calamity().VulnerableToSickness = true; + } public override void SendExtraAI(BinaryWriter writer) { @@ -105,17 +106,17 @@ namespace CalamityMod.NPCs.Yharon writer.Write(secondPhasePhase); writer.Write(teleportLocation); writer.Write(invincibilityCounter); - writer.Write(fastChargeTelegraphTime); - writer.WriteVector2(flareDustBulletHellSpawn); + writer.Write(fastChargeTelegraphTime); + writer.WriteVector2(flareDustBulletHellSpawn); writer.Write(safeBox.X); writer.Write(safeBox.Y); writer.Write(safeBox.Width); writer.Write(safeBox.Height); - writer.Write(npc.localAI[0]); - writer.Write(npc.localAI[1]); - writer.Write(npc.localAI[2]); - writer.Write(npc.localAI[3]); - } + writer.Write(npc.localAI[0]); + writer.Write(npc.localAI[1]); + writer.Write(npc.localAI[2]); + writer.Write(npc.localAI[3]); + } public override void ReceiveExtraAI(BinaryReader reader) { @@ -129,59 +130,59 @@ namespace CalamityMod.NPCs.Yharon secondPhasePhase = reader.ReadInt32(); teleportLocation = reader.ReadInt32(); invincibilityCounter = reader.ReadInt32(); - fastChargeTelegraphTime = reader.ReadInt32(); - flareDustBulletHellSpawn = reader.ReadVector2(); - safeBox.X = reader.ReadInt32(); + fastChargeTelegraphTime = reader.ReadInt32(); + flareDustBulletHellSpawn = reader.ReadVector2(); + safeBox.X = reader.ReadInt32(); safeBox.Y = reader.ReadInt32(); safeBox.Width = reader.ReadInt32(); safeBox.Height = reader.ReadInt32(); - npc.localAI[0] = reader.ReadSingle(); - npc.localAI[1] = reader.ReadSingle(); - npc.localAI[2] = reader.ReadSingle(); - npc.localAI[3] = reader.ReadSingle(); - } + npc.localAI[0] = reader.ReadSingle(); + npc.localAI[1] = reader.ReadSingle(); + npc.localAI[2] = reader.ReadSingle(); + npc.localAI[3] = reader.ReadSingle(); + } public override void AI() { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - // Percent life remaining - float lifeRatio = npc.life / (float)npc.lifeMax; + // Percent life remaining + float lifeRatio = npc.life / (float)npc.lifeMax; - // Stop rain - CalamityMod.StopRain(); + // Stop rain + CalamityMod.StopRain(); - // Variables - bool enraged2 = calamityGlobalNPC.enraged > 0; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged2; - bool expertMode = Main.expertMode || malice; - bool revenge = CalamityWorld.revenge || malice; - bool death = CalamityWorld.death || malice; + // Variables + bool enraged2 = calamityGlobalNPC.enraged > 0; + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged2; + bool expertMode = Main.expertMode || malice; + bool revenge = CalamityWorld.revenge || malice; + bool death = CalamityWorld.death || malice; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } + if (revenge) + { + // Increase aggression if player is taking a long time to kill the boss + if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) + lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; + } - float pie = (float)Math.PI; + float pie = (float)Math.PI; - Vector2 vectorCenter = npc.Center; + Vector2 vectorCenter = npc.Center; - // Start phase 2 or not - if (startSecondAI) + // Start phase 2 or not + if (startSecondAI) { Yharon_AI2(expertMode, revenge, death, malice, pie, lifeRatio, vectorCenter, calamityGlobalNPC); return; } - // Phase booleans - float phase2GateValue = revenge ? 0.9f : expertMode ? 0.85f : 0.75f; - bool phase2Check = death || lifeRatio <= phase2GateValue; + // Phase booleans + float phase2GateValue = revenge ? 0.9f : expertMode ? 0.85f : 0.75f; + bool phase2Check = death || lifeRatio <= phase2GateValue; bool phase3Check = lifeRatio <= (death ? 0.8f : revenge ? 0.75f : expertMode ? 0.7f : 0.625f); bool phase4Check = lifeRatio <= ai2GateValue; - bool phase1Change = npc.ai[0] > -1f; + bool phase1Change = npc.ai[0] > -1f; bool phase2Change = npc.ai[0] > 5f; bool phase3Change = npc.ai[0] > 12f; @@ -190,40 +191,40 @@ namespace CalamityMod.NPCs.Yharon float acceleration = expertMode ? 0.75f : 0.7f; float velocity = expertMode ? 12f : 11f; - // Damage immunity - if (phase3Change) - npc.dontTakeDamage = phase4Check; - else if (phase2Change) - npc.dontTakeDamage = phase3Check; - else if (phase1Change) - npc.dontTakeDamage = phase2Check; + // Damage immunity + if (phase3Change) + npc.dontTakeDamage = phase4Check; + else if (phase2Change) + npc.dontTakeDamage = phase3Check; + else if (phase1Change) + npc.dontTakeDamage = phase2Check; - if (phase3Change) + if (phase3Change) { - acceleration = expertMode ? 0.85f : 0.8f; - velocity = expertMode ? 14f : 13f; - phaseSwitchTimer = expertMode ? 25 : 28; - fastChargeTelegraphTime = 100; + acceleration = expertMode ? 0.85f : 0.8f; + velocity = expertMode ? 14f : 13f; + phaseSwitchTimer = expertMode ? 25 : 28; + fastChargeTelegraphTime = 100; } else if (phase2Change) { - acceleration = expertMode ? 0.8f : 0.75f; - velocity = expertMode ? 13f : 12f; - phaseSwitchTimer = expertMode ? 32 : 36; - fastChargeTelegraphTime = 110; + acceleration = expertMode ? 0.8f : 0.75f; + velocity = expertMode ? 13f : 12f; + phaseSwitchTimer = expertMode ? 32 : 36; + fastChargeTelegraphTime = 110; } else - phaseSwitchTimer = 25; + phaseSwitchTimer = 25; - // Timers and velocity for charging - float reduceSpeedChargeDistance = 540f; + // Timers and velocity for charging + float reduceSpeedChargeDistance = 540f; int chargeTime = expertMode ? 40 : 45; float chargeSpeed = expertMode ? 28f : 26f; - float fastChargeVelocityMultiplier = malice ? 2f : 1.5f; - bool playFastChargeRoarSound = npc.localAI[1] == fastChargeTelegraphTime * 0.5f; - bool doFastCharge = npc.localAI[1] > fastChargeTelegraphTime; + float fastChargeVelocityMultiplier = malice ? 2f : 1.5f; + bool playFastChargeRoarSound = npc.localAI[1] == fastChargeTelegraphTime * 0.5f; + bool doFastCharge = npc.localAI[1] > fastChargeTelegraphTime; - if (phase3Change) + if (phase3Change) { chargeTime = 35; chargeSpeed = 30f; @@ -236,18 +237,18 @@ namespace CalamityMod.NPCs.Yharon chargeSpeed = 28.5f; } - if (revenge) - { - int chargeTimeDecrease = malice ? 6 : death ? 4 : 2; - float velocityMult = malice ? 1.15f : death ? 1.1f : 1.05f; - phaseSwitchTimer -= chargeTimeDecrease; - acceleration *= velocityMult; - velocity *= velocityMult; - chargeTime -= chargeTimeDecrease; - chargeSpeed *= velocityMult; - } + if (revenge) + { + int chargeTimeDecrease = malice ? 6 : death ? 4 : 2; + float velocityMult = malice ? 1.15f : death ? 1.1f : 1.05f; + phaseSwitchTimer -= chargeTimeDecrease; + acceleration *= velocityMult; + velocity *= velocityMult; + chargeTime -= chargeTimeDecrease; + chargeSpeed *= velocityMult; + } - float reduceSpeedFlareBombDistance = 570f; + float reduceSpeedFlareBombDistance = 570f; int flareBombPhaseTimer = malice ? 30 : death ? 40 : 60; int flareBombSpawnDivisor = flareBombPhaseTimer / 20; float flareBombPhaseAcceleration = malice ? 1f : death ? 0.92f : 0.8f; @@ -257,74 +258,74 @@ namespace CalamityMod.NPCs.Yharon int newPhaseTimer = 180; - float flareDustPhaseScalar = death ? 48f : 60f; - phase2GateValue -= ai2GateValue; // 0.35, 70% HP = 0.7 - 0.55 = 0.15, 0.35 - 0.15 = 0.2 / 0.35 = 0.57, 60% HP = 0.6 - 0.55 = 0.05, 0.35 - 0.05 = 0.3 / 0.35 = 0.85, 80% HP = 0.8 - 0.55 = 0.25, 0.35 - 0.25 = 0.1 / 0.35 = 0.28 - int flareDustPhaseTimerReduction = revenge ? (int)(flareDustPhaseScalar * ((phase2GateValue - (lifeRatio - ai2GateValue)) / phase2GateValue)) : 0; - int flareDustPhaseTimer = (malice ? 210 : death ? 240 : 300) - flareDustPhaseTimerReduction; - int flareDustPhaseTimer2 = (malice ? 105 : death ? 120 : 150) - (flareDustPhaseTimerReduction / 2); + float flareDustPhaseScalar = death ? 48f : 60f; + phase2GateValue -= ai2GateValue; // 0.35, 70% HP = 0.7 - 0.55 = 0.15, 0.35 - 0.15 = 0.2 / 0.35 = 0.57, 60% HP = 0.6 - 0.55 = 0.05, 0.35 - 0.05 = 0.3 / 0.35 = 0.85, 80% HP = 0.8 - 0.55 = 0.25, 0.35 - 0.25 = 0.1 / 0.35 = 0.28 + int flareDustPhaseTimerReduction = revenge ? (int)(flareDustPhaseScalar * ((phase2GateValue - (lifeRatio - ai2GateValue)) / phase2GateValue)) : 0; + int flareDustPhaseTimer = (malice ? 210 : death ? 240 : 300) - flareDustPhaseTimerReduction; + int flareDustPhaseTimer2 = (malice ? 105 : death ? 120 : 150) - (flareDustPhaseTimerReduction / 2); - float spinTime = flareDustPhaseTimer / 2; + float spinTime = flareDustPhaseTimer / 2; - int flareDustSpawnDivisor = flareDustPhaseTimer / 10; - int flareDustSpawnDivisor2 = flareDustPhaseTimer2 / 30; - int flareDustSpawnDivisor3 = flareDustPhaseTimer / 25; + int flareDustSpawnDivisor = flareDustPhaseTimer / 10; + int flareDustSpawnDivisor2 = flareDustPhaseTimer2 / 30; + int flareDustSpawnDivisor3 = flareDustPhaseTimer / 25; - float spinPhaseVelocity = 25f; + float spinPhaseVelocity = 25f; float spinPhaseRotation = MathHelper.TwoPi * 3 / spinTime; - float increasedIdleTimeAfterBulletHell = -120f; + float increasedIdleTimeAfterBulletHell = -120f; - float teleportPhaseTimer = 30f; + float teleportPhaseTimer = 30f; - int spawnPhaseTimer = 75; + int spawnPhaseTimer = 75; - // Target - if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) + // Target + if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) { npc.TargetClosest(); npc.netUpdate = true; } - // Despawn safety, make sure to target another player if the current player target is too far away - if (Vector2.Distance(Main.player[npc.target].Center, vectorCenter) > CalamityGlobalNPC.CatchUpDistance200Tiles) - npc.TargetClosest(); + // Despawn safety, make sure to target another player if the current player target is too far away + if (Vector2.Distance(Main.player[npc.target].Center, vectorCenter) > CalamityGlobalNPC.CatchUpDistance200Tiles) + npc.TargetClosest(); - Player player = Main.player[npc.target]; + Player player = Main.player[npc.target]; - // Despawn - if (player.dead || !player.active) + // Despawn + if (player.dead || !player.active) { - npc.TargetClosest(); - player = Main.player[npc.target]; - if (player.dead || !player.active) - { - npc.velocity.Y -= 0.4f; + npc.TargetClosest(); + player = Main.player[npc.target]; + if (player.dead || !player.active) + { + npc.velocity.Y -= 0.4f; - if (npc.timeLeft > 60) - npc.timeLeft = 60; + if (npc.timeLeft > 60) + npc.timeLeft = 60; - if (npc.ai[0] > 12f) - npc.ai[0] = 13f; - else if (npc.ai[0] > 5f) - npc.ai[0] = 6f; - else - npc.ai[0] = 0f; + if (npc.ai[0] > 12f) + npc.ai[0] = 13f; + else if (npc.ai[0] > 5f) + npc.ai[0] = 6f; + else + npc.ai[0] = 0f; - npc.ai[2] = 0f; - } + npc.ai[2] = 0f; + } } else if (npc.timeLeft < 1800) npc.timeLeft = 1800; - int xPos = 60 * npc.direction; - Vector2 vector = Vector2.Normalize(player.Center - vectorCenter) * (npc.width + 20) / 2f + vectorCenter; - Vector2 fromMouth = new Vector2((int)vector.X + xPos, (int)vector.Y - 15); + int xPos = 60 * npc.direction; + Vector2 vector = Vector2.Normalize(player.Center - vectorCenter) * (npc.width + 20) / 2f + vectorCenter; + Vector2 fromMouth = new Vector2((int)vector.X + xPos, (int)vector.Y - 15); - // Create the arena, but not as a multiplayer client. - // In single player, the arena gets created and never gets synced because it's single player. - // In multiplayer, only the server/host creates the arena, and everyone else receives it on the next frame via SendExtraAI. - // Everyone however sets spawnArena to true to confirm that the fight has started. - if (!spawnArena) + // Create the arena, but not as a multiplayer client. + // In single player, the arena gets created and never gets synced because it's single player. + // In multiplayer, only the server/host creates the arena, and everyone else receives it on the next frame via SendExtraAI. + // Everyone however sets spawnArena to true to confirm that the fight has started. + if (!spawnArena) { spawnArena = true; enraged = false; @@ -348,7 +349,7 @@ namespace CalamityMod.NPCs.Yharon npc.Calamity().CurrentlyEnraged = enraged || enraged2; if (enraged) { - phaseSwitchTimer = 15; + phaseSwitchTimer = 15; protectionBoost = true; npc.damage = npc.defDamage * 5; chargeSpeed += 25f; @@ -360,13 +361,13 @@ namespace CalamityMod.NPCs.Yharon } } - // Set DR based on protection boost (aka enrage) - bool chargeTelegraph = (npc.ai[0] == 0f || npc.ai[0] == 6f || npc.ai[0] == 13f) && npc.localAI[1] > 0f; - bool bulletHell = npc.ai[0] == 8f || npc.ai[0] == 15f; - calamityGlobalNPC.DR = protectionBoost ? EnragedDR : normalDR; + // Set DR based on protection boost (aka enrage) + bool chargeTelegraph = (npc.ai[0] == 0f || npc.ai[0] == 6f || npc.ai[0] == 13f) && npc.localAI[1] > 0f; + bool bulletHell = npc.ai[0] == 8f || npc.ai[0] == 15f; + calamityGlobalNPC.DR = protectionBoost ? EnragedDR : normalDR; - if (bulletHell) - npc.damage = 0; + if (bulletHell) + npc.damage = 0; // Trigger spawn effects if (npc.localAI[0] == 0f) @@ -394,16 +395,16 @@ namespace CalamityMod.NPCs.Yharon float npcRotationSpeed = 0.04f; if (npc.ai[0] == 1f || npc.ai[0] == 5f || npc.ai[0] == 7f || npc.ai[0] == 8f || npc.ai[0] == 11f || npc.ai[0] == 12f || - npc.ai[0] == 14f || npc.ai[0] == 15f || npc.ai[0] == 18f || npc.ai[0] == 19f) + npc.ai[0] == 14f || npc.ai[0] == 15f || npc.ai[0] == 18f || npc.ai[0] == 19f) npcRotationSpeed = 0f; if (npc.ai[0] == 3f || npc.ai[0] == 4f || npc.ai[0] == 9f || npc.ai[0] == 16f) npcRotationSpeed = 0.01f; - if (npcRotationSpeed != 0f) - npc.rotation = npc.rotation.AngleTowards(npcRotation, npcRotationSpeed); + if (npcRotationSpeed != 0f) + npc.rotation = npc.rotation.AngleTowards(npcRotation, npcRotationSpeed); - // Alpha effects - if (npc.ai[0] != -1f && ((npc.ai[0] != 6f && npc.ai[0] != 13f) || npc.ai[2] <= phaseSwitchTimer)) + // Alpha effects + if (npc.ai[0] != -1f && ((npc.ai[0] != 6f && npc.ai[0] != 13f) || npc.ai[2] <= phaseSwitchTimer)) { bool colliding = Collision.SolidCollision(npc.position, npc.width, npc.height); @@ -476,20 +477,20 @@ namespace CalamityMod.NPCs.Yharon } #region Phase1 - // Phase switch + // Phase switch else if (npc.ai[0] == 0f && !player.dead) { if (npc.ai[1] == 0f) npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); - Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); - Vector2 distanceFromDestination = destination - vectorCenter; + Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); + Vector2 distanceFromDestination = destination - vectorCenter; Vector2 desiredVelocity = Vector2.Normalize(distanceFromDestination - npc.velocity) * velocity; - if (Vector2.Distance(vectorCenter, destination) > reduceSpeedChargeDistance) - npc.SimpleFlyMovement(desiredVelocity, acceleration); - else - npc.velocity *= 0.98f; + if (Vector2.Distance(vectorCenter, destination) > reduceSpeedChargeDistance) + npc.SimpleFlyMovement(desiredVelocity, acceleration); + else + npc.velocity *= 0.98f; int num1471 = Math.Sign(player.Center.X - vectorCenter.X); if (num1471 != 0) @@ -571,41 +572,41 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 5) { - if (playFastChargeRoarSound) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); + if (playFastChargeRoarSound) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - if (doFastCharge) - { - npc.ai[0] = 5f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.localAI[1] = 0f; + if (doFastCharge) + { + npc.ai[0] = 5f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.localAI[1] = 0f; - npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * chargeSpeed * fastChargeVelocityMultiplier; - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); + npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * chargeSpeed * fastChargeVelocityMultiplier; + npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); - if (num1471 != 0) - { - npc.direction = num1471; + if (num1471 != 0) + { + npc.direction = num1471; - if (npc.spriteDirection == 1) - npc.rotation += pie; + if (npc.spriteDirection == 1) + npc.rotation += pie; - npc.spriteDirection = -npc.direction; - } - } - else - npc.localAI[1] += 1f; + npc.spriteDirection = -npc.direction; + } + } + else + npc.localAI[1] += 1f; } npc.netUpdate = true; } } - // Charge + // Charge else if (npc.ai[0] == 1f) { - ChargeDust(7, pie); + ChargeDust(7, pie); npc.ai[2] += 1f; if (npc.ai[2] >= chargeTime) @@ -614,25 +615,25 @@ namespace CalamityMod.NPCs.Yharon npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] += 2f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } - // Fireball breath + // Fireball breath else if (npc.ai[0] == 2f) { if (npc.ai[1] == 0f) - npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); + npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); - Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); - Vector2 value17 = destination - vectorCenter; - Vector2 vector170 = Vector2.Normalize(value17 - npc.velocity) * flareBombPhaseVelocity; + Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); + Vector2 value17 = destination - vectorCenter; + Vector2 vector170 = Vector2.Normalize(value17 - npc.velocity) * flareBombPhaseVelocity; - if (Vector2.Distance(vectorCenter, destination) > reduceSpeedFlareBombDistance) - npc.SimpleFlyMovement(vector170, flareBombPhaseAcceleration); - else - npc.velocity *= 0.98f; + if (Vector2.Distance(vectorCenter, destination) > reduceSpeedFlareBombDistance) + npc.SimpleFlyMovement(vector170, flareBombPhaseAcceleration); + else + npc.velocity *= 0.98f; if (npc.ai[2] == 0f) Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); @@ -641,9 +642,9 @@ namespace CalamityMod.NPCs.Yharon { if (Main.netMode != NetmodeID.MultiplayerClient) { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(fromMouth, Vector2.Zero, type, damage, 0f, Main.myPlayer, npc.target, 1f); + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(fromMouth, Vector2.Zero, type, damage, 0f, Main.myPlayer, npc.target, 1f); } } @@ -664,12 +665,12 @@ namespace CalamityMod.NPCs.Yharon npc.ai[0] = 0f; npc.ai[1] = 0f; npc.ai[2] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } - // Fire tornadoes + // Fire tornadoes else if (npc.ai[0] == 3f) { npc.velocity *= 0.98f; @@ -690,12 +691,12 @@ namespace CalamityMod.NPCs.Yharon npc.ai[0] = 0f; npc.ai[1] = 0f; npc.ai[2] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } - // Enter new phase + // Enter new phase else if (npc.ai[0] == 4f) { npc.velocity *= 0.9f; @@ -711,16 +712,16 @@ namespace CalamityMod.NPCs.Yharon npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] = 0f; - npc.localAI[1] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.localAI[1] = 0f; + npc.TargetClosest(); + npc.netUpdate = true; } } - // Fast charge + // Fast charge else if (npc.ai[0] == 5f) { - ChargeDust(14, pie); + ChargeDust(14, pie); npc.ai[2] += 1f; if (npc.ai[2] >= chargeTime) @@ -729,27 +730,27 @@ namespace CalamityMod.NPCs.Yharon npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] += 2f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } #endregion #region Phase2 - // Phase switch + // Phase switch else if (npc.ai[0] == 6f && !player.dead) { if (npc.ai[1] == 0f) - npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); + npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); - Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); - Vector2 distanceFromDestination = destination - vectorCenter; - Vector2 desiredVelocity = Vector2.Normalize(distanceFromDestination - npc.velocity) * velocity; + Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); + Vector2 distanceFromDestination = destination - vectorCenter; + Vector2 desiredVelocity = Vector2.Normalize(distanceFromDestination - npc.velocity) * velocity; - if (Vector2.Distance(vectorCenter, destination) > reduceSpeedChargeDistance) - npc.SimpleFlyMovement(desiredVelocity, acceleration); - else - npc.velocity *= 0.98f; + if (Vector2.Distance(vectorCenter, destination) > reduceSpeedChargeDistance) + npc.SimpleFlyMovement(desiredVelocity, acceleration); + else + npc.velocity *= 0.98f; int num1477 = Math.Sign(player.Center.X - vectorCenter.X); if (num1477 != 0) @@ -816,28 +817,28 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 2) { - Vector2 npcCenter = vectorCenter; + Vector2 npcCenter = vectorCenter; - if (npc.alpha < 255) - { - npc.alpha += 17; - if (npc.alpha > 255) - npc.alpha = 255; - } + if (npc.alpha < 255) + { + npc.alpha += 17; + if (npc.alpha > 255) + npc.alpha = 255; + } - if (npc.ai[2] == phaseSwitchTimer + 15f) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); + if (npc.ai[2] == phaseSwitchTimer + 15f) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); - if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[2] == phaseSwitchTimer + 15f) - { - Vector2 center = player.Center + new Vector2(0f, -540f); - npcCenter = npc.Center = center; - } + if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[2] == phaseSwitchTimer + 15f) + { + Vector2 center = player.Center + new Vector2(0f, -540f); + npcCenter = npc.Center = center; + } - if (npc.ai[2] < phaseSwitchTimer + teleportPhaseTimer) - return; + if (npc.ai[2] < phaseSwitchTimer + teleportPhaseTimer) + return; - npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * spinPhaseVelocity; + npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * spinPhaseVelocity; npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); if (num1477 != 0) @@ -853,8 +854,8 @@ namespace CalamityMod.NPCs.Yharon npc.ai[0] = 8f; npc.ai[1] = 0f; npc.ai[2] = 0f; - npc.ai[3] = 1f; - } + npc.ai[3] = 1f; + } else if (aiState == 3) { npc.ai[0] = 9f; @@ -869,31 +870,31 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 5) { - if (playFastChargeRoarSound) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); + if (playFastChargeRoarSound) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - if (doFastCharge) - { - npc.ai[0] = 11f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.localAI[1] = 0f; + if (doFastCharge) + { + npc.ai[0] = 11f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.localAI[1] = 0f; - npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * chargeSpeed * fastChargeVelocityMultiplier; - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); + npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * chargeSpeed * fastChargeVelocityMultiplier; + npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); - if (num1477 != 0) - { - npc.direction = num1477; + if (num1477 != 0) + { + npc.direction = num1477; - if (npc.spriteDirection == 1) - npc.rotation += pie; + if (npc.spriteDirection == 1) + npc.rotation += pie; - npc.spriteDirection = -npc.direction; - } - } - else - npc.localAI[1] += 1f; + npc.spriteDirection = -npc.direction; + } + } + else + npc.localAI[1] += 1f; } else if (aiState == 6) { @@ -919,10 +920,10 @@ namespace CalamityMod.NPCs.Yharon } } - // Charge + // Charge else if (npc.ai[0] == 7f) { - ChargeDust(7, pie); + ChargeDust(7, pie); npc.ai[2] += 1f; if (npc.ai[2] >= chargeTime) @@ -931,51 +932,51 @@ namespace CalamityMod.NPCs.Yharon npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] += 2f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } - // Flare Dust bullet hell + // Flare Dust bullet hell else if (npc.ai[0] == 8f) { - if (npc.ai[2] == 0f) - { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - flareDustBulletHellSpawn = vectorCenter + npc.velocity.RotatedBy(MathHelper.PiOver2 * -npc.direction) * spinTime / (MathHelper.TwoPi * 3f); - } - - npc.ai[2] += 1f; - - if (npc.ai[2] % flareDustSpawnDivisor == 0f) + if (npc.ai[2] == 0f) { - if (Main.netMode != NetmodeID.MultiplayerClient) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); + flareDustBulletHellSpawn = vectorCenter + npc.velocity.RotatedBy(MathHelper.PiOver2 * -npc.direction) * spinTime / (MathHelper.TwoPi * 3f); + } + + npc.ai[2] += 1f; + + if (npc.ai[2] % flareDustSpawnDivisor == 0f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) { - int ringReduction = (int)MathHelper.Lerp(0f, 14f, npc.ai[2] / flareDustPhaseTimer); - int totalProjectiles = 38 - ringReduction; // 36 for first ring, 22 for last ring - DoFlareDustBulletHell(0, flareDustSpawnDivisor, npc.GetProjectileDamage(ModContent.ProjectileType()), totalProjectiles, 0f, 0f, false); + int ringReduction = (int)MathHelper.Lerp(0f, 14f, npc.ai[2] / flareDustPhaseTimer); + int totalProjectiles = 38 - ringReduction; // 36 for first ring, 22 for last ring + DoFlareDustBulletHell(0, flareDustSpawnDivisor, npc.GetProjectileDamage(ModContent.ProjectileType()), totalProjectiles, 0f, 0f, false); - // Fire a flame towards every player, with a limit of 5 - if (expertMode) - { - List targets = new List(); - for (int p = 0; p < Main.maxPlayers; p++) - { - if (Main.player[p].active && !Main.player[p].dead) - targets.Add(p); + // Fire a flame towards every player, with a limit of 5 + if (expertMode) + { + List targets = new List(); + for (int p = 0; p < Main.maxPlayers; p++) + { + if (Main.player[p].active && !Main.player[p].dead) + targets.Add(p); - if (targets.Count > 4) - break; - } - foreach (int t in targets) - { - Vector2 velocity2 = Vector2.Normalize(Main.player[t].Center + Main.player[t].velocity * 40f - flareDustBulletHellSpawn) * 8f; - int type = ModContent.ProjectileType(); - int proj = Projectile.NewProjectile(flareDustBulletHellSpawn, velocity2, type, npc.GetProjectileDamage(ModContent.ProjectileType()), 0f, Main.myPlayer, 2f, 0f); - Main.projectile[proj].extraUpdates += 1; - } - } - } + if (targets.Count > 4) + break; + } + foreach (int t in targets) + { + Vector2 velocity2 = Vector2.Normalize(Main.player[t].Center + Main.player[t].velocity * 40f - flareDustBulletHellSpawn) * 8f; + int type = ModContent.ProjectileType(); + int proj = Projectile.NewProjectile(flareDustBulletHellSpawn, velocity2, type, npc.GetProjectileDamage(ModContent.ProjectileType()), 0f, Main.myPlayer, 2f, 0f); + Main.projectile[proj].extraUpdates += 1; + } + } + } } npc.velocity = npc.velocity.RotatedBy(-(double)spinPhaseRotation * (float)npc.direction); @@ -983,15 +984,15 @@ namespace CalamityMod.NPCs.Yharon if (npc.ai[2] >= flareDustPhaseTimer) { - npc.ai[0] = 6f; + npc.ai[0] = 6f; npc.ai[1] = 0f; npc.ai[2] = increasedIdleTimeAfterBulletHell; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } - // Infernado + // Infernado else if (npc.ai[0] == 9f) { npc.velocity *= 0.98f; @@ -1009,12 +1010,12 @@ namespace CalamityMod.NPCs.Yharon npc.ai[0] = 6f; npc.ai[1] = 0f; npc.ai[2] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } - // Enter new phase + // Enter new phase else if (npc.ai[0] == 10f) { npc.velocity *= 0.9f; @@ -1030,47 +1031,47 @@ namespace CalamityMod.NPCs.Yharon npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] = 0f; - npc.localAI[1] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.localAI[1] = 0f; + npc.TargetClosest(); + npc.netUpdate = true; } } - // Fast charge + // Fast charge else if (npc.ai[0] == 11f) { - ChargeDust(14, pie); + ChargeDust(14, pie); - npc.ai[2] += 1f; + npc.ai[2] += 1f; if (npc.ai[2] >= chargeTime) { npc.ai[0] = 6f; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] += 2f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } - // Flare Dust that speeds up and whips around in a wave + // Flare Dust that speeds up and whips around in a wave else if (npc.ai[0] == 12f) { - if (npc.ai[2] == 0f) + if (npc.ai[2] == 0f) Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - npc.ai[2] += 1f; + npc.ai[2] += 1f; - if (npc.ai[2] % flareDustSpawnDivisor2 == 0f) + if (npc.ai[2] % flareDustSpawnDivisor2 == 0f) { if (Main.netMode != NetmodeID.MultiplayerClient) { - Vector2 projectileVelocity = player.Center - fromMouth; - projectileVelocity.Normalize(); - projectileVelocity *= 0.1f; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(fromMouth, projectileVelocity, type, damage, 0f, Main.myPlayer, 0f, 0f); + Vector2 projectileVelocity = player.Center - fromMouth; + projectileVelocity.Normalize(); + projectileVelocity *= 0.1f; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(fromMouth, projectileVelocity, type, damage, 0f, Main.myPlayer, 0f, 0f); } } @@ -1083,27 +1084,27 @@ namespace CalamityMod.NPCs.Yharon npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] += 2f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } #endregion #region Phase3 - // Phase switch + // Phase switch else if (npc.ai[0] == 13f && !player.dead) { if (npc.ai[1] == 0f) - npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); + npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); - Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); - Vector2 distanceFromDestination = destination - vectorCenter; - Vector2 desiredVelocity = Vector2.Normalize(distanceFromDestination - npc.velocity) * velocity; + Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); + Vector2 distanceFromDestination = destination - vectorCenter; + Vector2 desiredVelocity = Vector2.Normalize(distanceFromDestination - npc.velocity) * velocity; - if (Vector2.Distance(vectorCenter, destination) > reduceSpeedChargeDistance) - npc.SimpleFlyMovement(desiredVelocity, acceleration); - else - npc.velocity *= 0.98f; + if (Vector2.Distance(vectorCenter, destination) > reduceSpeedChargeDistance) + npc.SimpleFlyMovement(desiredVelocity, acceleration); + else + npc.velocity *= 0.98f; int num1477 = Math.Sign(player.Center.X - vectorCenter.X); if (num1477 != 0) @@ -1138,15 +1139,15 @@ namespace CalamityMod.NPCs.Yharon aiState = 3; break; case 6: - aiState = 6; + aiState = 6; break; case 7: npc.ai[3] = 1f; aiState = 7; break; - case 8: - aiState = 2; - break; + case 8: + aiState = 2; + break; } if (phase4Check) @@ -1173,28 +1174,28 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 2) { - Vector2 npcCenter = vectorCenter; + Vector2 npcCenter = vectorCenter; - if (npc.alpha < 255) - { - npc.alpha += 17; - if (npc.alpha > 255) - npc.alpha = 255; - } + if (npc.alpha < 255) + { + npc.alpha += 17; + if (npc.alpha > 255) + npc.alpha = 255; + } - if (npc.ai[2] == phaseSwitchTimer + 15f) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); + if (npc.ai[2] == phaseSwitchTimer + 15f) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); - if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[2] == phaseSwitchTimer + 15f) - { - Vector2 center = player.Center + new Vector2(0f, -540f); - npcCenter = npc.Center = center; - } + if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[2] == phaseSwitchTimer + 15f) + { + Vector2 center = player.Center + new Vector2(0f, -540f); + npcCenter = npc.Center = center; + } - if (npc.ai[2] < phaseSwitchTimer + teleportPhaseTimer) - return; + if (npc.ai[2] < phaseSwitchTimer + teleportPhaseTimer) + return; - npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * spinPhaseVelocity; + npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * spinPhaseVelocity; npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); if (num1477 != 0) @@ -1210,8 +1211,8 @@ namespace CalamityMod.NPCs.Yharon npc.ai[0] = 15f; npc.ai[1] = 0f; npc.ai[2] = 0f; - npc.ai[3] = 0f; - } + npc.ai[3] = 0f; + } else if (aiState == 3) { npc.ai[0] = 16f; @@ -1226,31 +1227,31 @@ namespace CalamityMod.NPCs.Yharon } else if (aiState == 5) { - if (playFastChargeRoarSound) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); + if (playFastChargeRoarSound) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - if (doFastCharge) - { - npc.ai[0] = 18f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.localAI[1] = 0f; + if (doFastCharge) + { + npc.ai[0] = 18f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.localAI[1] = 0f; - npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * chargeSpeed * fastChargeVelocityMultiplier; - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); + npc.velocity = Vector2.Normalize(player.Center - vectorCenter) * chargeSpeed * fastChargeVelocityMultiplier; + npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); - if (num1477 != 0) - { - npc.direction = num1477; + if (num1477 != 0) + { + npc.direction = num1477; - if (npc.spriteDirection == 1) - npc.rotation += pie; + if (npc.spriteDirection == 1) + npc.rotation += pie; - npc.spriteDirection = -npc.direction; - } - } - else - npc.localAI[1] += 1f; + npc.spriteDirection = -npc.direction; + } + } + else + npc.localAI[1] += 1f; } else if (aiState == 6) { @@ -1271,90 +1272,90 @@ namespace CalamityMod.NPCs.Yharon npc.ai[1] = 0f; npc.ai[2] = 0f; } - else if (aiState == 7) - { - npc.ai[0] = 20f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } + else if (aiState == 7) + { + npc.ai[0] = 20f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + } - npc.netUpdate = true; + npc.netUpdate = true; } } - // Charge + // Charge else if (npc.ai[0] == 14f) { - ChargeDust(7, pie); + ChargeDust(7, pie); - npc.ai[2] += 1f; + npc.ai[2] += 1f; if (npc.ai[2] >= chargeTime) { npc.ai[0] = 13f; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] += 2f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } - // Flare Dust bullet hell - else if (npc.ai[0] == 15f) + // Flare Dust bullet hell + else if (npc.ai[0] == 15f) { - if (npc.ai[2] == 0f) - { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - flareDustBulletHellSpawn = vectorCenter + npc.velocity.RotatedBy(MathHelper.PiOver2 * -npc.direction) * spinTime / (MathHelper.TwoPi * 3f); - } + if (npc.ai[2] == 0f) + { + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); + flareDustBulletHellSpawn = vectorCenter + npc.velocity.RotatedBy(MathHelper.PiOver2 * -npc.direction) * spinTime / (MathHelper.TwoPi * 3f); + } - npc.ai[2] += 1f; - if (npc.ai[2] % flareDustSpawnDivisor3 == 0f) - { - // Rotate spiral by 7.2 * (300 / 12) = +90 degrees and then back -90 degrees + npc.ai[2] += 1f; + if (npc.ai[2] % flareDustSpawnDivisor3 == 0f) + { + // Rotate spiral by 7.2 * (300 / 12) = +90 degrees and then back -90 degrees - if (Main.netMode != NetmodeID.MultiplayerClient) - { - DoFlareDustBulletHell(1, flareDustPhaseTimer, npc.GetProjectileDamage(ModContent.ProjectileType()), 8, 12f, 3.6f, false); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + DoFlareDustBulletHell(1, flareDustPhaseTimer, npc.GetProjectileDamage(ModContent.ProjectileType()), 8, 12f, 3.6f, false); - // Fire a flame towards every player, with a limit of 5 - if (expertMode && npc.ai[2] % (flareDustSpawnDivisor3 * 2) == 0f) - { - List targets = new List(); - for (int p = 0; p < Main.maxPlayers; p++) - { - if (Main.player[p].active && !Main.player[p].dead) - targets.Add(p); + // Fire a flame towards every player, with a limit of 5 + if (expertMode && npc.ai[2] % (flareDustSpawnDivisor3 * 2) == 0f) + { + List targets = new List(); + for (int p = 0; p < Main.maxPlayers; p++) + { + if (Main.player[p].active && !Main.player[p].dead) + targets.Add(p); - if (targets.Count > 4) - break; - } - foreach (int t in targets) - { - Vector2 velocity2 = Vector2.Normalize(Main.player[t].Center + Main.player[t].velocity * 40f - flareDustBulletHellSpawn) * 8f; - int type = ModContent.ProjectileType(); - int proj = Projectile.NewProjectile(flareDustBulletHellSpawn, velocity2, type, npc.GetProjectileDamage(ModContent.ProjectileType()), 0f, Main.myPlayer, 2f, 0f); - Main.projectile[proj].extraUpdates += 1; - } - } - } - } + if (targets.Count > 4) + break; + } + foreach (int t in targets) + { + Vector2 velocity2 = Vector2.Normalize(Main.player[t].Center + Main.player[t].velocity * 40f - flareDustBulletHellSpawn) * 8f; + int type = ModContent.ProjectileType(); + int proj = Projectile.NewProjectile(flareDustBulletHellSpawn, velocity2, type, npc.GetProjectileDamage(ModContent.ProjectileType()), 0f, Main.myPlayer, 2f, 0f); + Main.projectile[proj].extraUpdates += 1; + } + } + } + } - npc.velocity = npc.velocity.RotatedBy(-(double)spinPhaseRotation * (float)npc.direction); - npc.rotation -= spinPhaseRotation * npc.direction; + npc.velocity = npc.velocity.RotatedBy(-(double)spinPhaseRotation * (float)npc.direction); + npc.rotation -= spinPhaseRotation * npc.direction; - if (npc.ai[2] >= flareDustPhaseTimer) - { - npc.ai[0] = 13f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.localAI[2] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; - } + if (npc.ai[2] >= flareDustPhaseTimer) + { + npc.ai[0] = 13f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.localAI[2] = 0f; + npc.TargetClosest(); + npc.netUpdate = true; + } } - // Infernado + // Infernado else if (npc.ai[0] == 16f) { npc.velocity *= 0.98f; @@ -1373,147 +1374,147 @@ namespace CalamityMod.NPCs.Yharon npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] += 3f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } - // Enter new phase + // Enter new phase else if (npc.ai[0] == 17f) { - npc.velocity *= 0.9f; - npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); + npc.velocity *= 0.9f; + npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); - if (npc.ai[2] == newPhaseTimer - 60) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); + if (npc.ai[2] == newPhaseTimer - 60) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - npc.ai[2] += 1f; - if (npc.ai[2] >= newPhaseTimer) - { - startSecondAI = true; - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - npc.localAI[1] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; - } + npc.ai[2] += 1f; + if (npc.ai[2] >= newPhaseTimer) + { + startSecondAI = true; + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.ai[3] = 0f; + npc.localAI[1] = 0f; + npc.TargetClosest(); + npc.netUpdate = true; + } } - // Fast charge + // Fast charge else if (npc.ai[0] == 18f) { - ChargeDust(14, pie); + ChargeDust(14, pie); - npc.ai[2] += 1f; + npc.ai[2] += 1f; if (npc.ai[2] >= chargeTime) { npc.ai[0] = 13f; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] += 2f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } - // Fireball ring + // Fireball ring else if (npc.ai[0] == 19f) { - if (npc.ai[2] == 0f) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); + if (npc.ai[2] == 0f) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - npc.ai[2] += 1f; + npc.ai[2] += 1f; - if (npc.ai[2] % flareDustSpawnDivisor2 == 0f) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Vector2 projectileVelocity = player.Center - fromMouth; - projectileVelocity.Normalize(); - projectileVelocity *= 0.1f; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(fromMouth, projectileVelocity, type, damage, 0f, Main.myPlayer, 0f, 0f); - } - } + if (npc.ai[2] % flareDustSpawnDivisor2 == 0f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + Vector2 projectileVelocity = player.Center - fromMouth; + projectileVelocity.Normalize(); + projectileVelocity *= 0.1f; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(fromMouth, projectileVelocity, type, damage, 0f, Main.myPlayer, 0f, 0f); + } + } - npc.velocity = npc.velocity.RotatedBy(-(double)spinPhaseRotation * (float)npc.direction); - npc.rotation -= spinPhaseRotation * npc.direction; + npc.velocity = npc.velocity.RotatedBy(-(double)spinPhaseRotation * (float)npc.direction); + npc.rotation -= spinPhaseRotation * npc.direction; - if (npc.ai[2] >= flareDustPhaseTimer2 - 50) - { - npc.ai[0] = 13f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] += 1f; - npc.TargetClosest(); - npc.netUpdate = true; - } + if (npc.ai[2] >= flareDustPhaseTimer2 - 50) + { + npc.ai[0] = 13f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.ai[3] += 1f; + npc.TargetClosest(); + npc.netUpdate = true; + } } - // Fireball breath - else if (npc.ai[0] == 20f) - { - if (npc.ai[1] == 0f) - npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); + // Fireball breath + else if (npc.ai[0] == 20f) + { + if (npc.ai[1] == 0f) + npc.ai[1] = Math.Sign((vectorCenter - player.Center).X); - Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); - Vector2 value17 = destination - vectorCenter; - Vector2 vector170 = Vector2.Normalize(value17 - npc.velocity) * flareBombPhaseVelocity; + Vector2 destination = player.Center + new Vector2(npc.ai[1], 0); + Vector2 value17 = destination - vectorCenter; + Vector2 vector170 = Vector2.Normalize(value17 - npc.velocity) * flareBombPhaseVelocity; - if (Vector2.Distance(vectorCenter, destination) > reduceSpeedFlareBombDistance) - npc.SimpleFlyMovement(vector170, flareBombPhaseAcceleration); - else - npc.velocity *= 0.98f; + if (Vector2.Distance(vectorCenter, destination) > reduceSpeedFlareBombDistance) + npc.SimpleFlyMovement(vector170, flareBombPhaseAcceleration); + else + npc.velocity *= 0.98f; - if (npc.ai[2] == 0f) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); + if (npc.ai[2] == 0f) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - if (npc.ai[2] % flareBombSpawnDivisor == 0f) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(fromMouth, Vector2.Zero, type, damage, 0f, Main.myPlayer, npc.target, 1f); - } - } + if (npc.ai[2] % flareBombSpawnDivisor == 0f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(fromMouth, Vector2.Zero, type, damage, 0f, Main.myPlayer, npc.target, 1f); + } + } - int num1476 = Math.Sign(player.Center.X - vectorCenter.X); - if (num1476 != 0) - { - npc.direction = num1476; + int num1476 = Math.Sign(player.Center.X - vectorCenter.X); + if (num1476 != 0) + { + npc.direction = num1476; - if (npc.spriteDirection != -npc.direction) - npc.rotation += pie; + if (npc.spriteDirection != -npc.direction) + npc.rotation += pie; - npc.spriteDirection = -npc.direction; - } + npc.spriteDirection = -npc.direction; + } - npc.ai[2] += 1f; - if (npc.ai[2] >= flareBombPhaseTimer - 15) - { - npc.ai[0] = 13f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; - } - } - #endregion - } + npc.ai[2] += 1f; + if (npc.ai[2] >= flareBombPhaseTimer - 15) + { + npc.ai[0] = 13f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.TargetClosest(); + npc.netUpdate = true; + } + } + #endregion + } #region AI2 public void Yharon_AI2(bool expertMode, bool revenge, bool death, bool malice, float pie, float lifeRatio, Vector2 vectorCenter, CalamityGlobalNPC calamityGlobalNPC) { - float phase2GateValue = revenge ? 0.44f : expertMode ? 0.385f : 0.275f; - bool phase2 = death || lifeRatio <= phase2GateValue; - float phase3GateValue = death ? 0.358f : revenge ? 0.275f : expertMode ? 0.22f : 0.138f; - bool phase3 = lifeRatio <= phase3GateValue; - float phase4GateValue = death ? 0.165f : 0.11f; - bool phase4 = lifeRatio <= phase4GateValue && revenge; + float phase2GateValue = revenge ? 0.44f : expertMode ? 0.385f : 0.275f; + bool phase2 = death || lifeRatio <= phase2GateValue; + float phase3GateValue = death ? 0.358f : revenge ? 0.275f : expertMode ? 0.22f : 0.138f; + bool phase3 = lifeRatio <= phase3GateValue; + float phase4GateValue = death ? 0.165f : 0.11f; + bool phase4 = lifeRatio <= phase4GateValue && revenge; if (npc.ai[0] != 8f) { @@ -1535,142 +1536,142 @@ namespace CalamityMod.NPCs.Yharon CalamityUtils.DisplayLocalizedText(key, messageColor); } - if (invincibilityCounter < 900) - { - phase2 = phase3 = phase4 = false; - invincibilityCounter += 1; - } - else - { - // Damage immunity - switch (secondPhasePhase) - { - case 1: - npc.dontTakeDamage = phase2; - break; - case 2: - npc.dontTakeDamage = phase3; - break; - case 3: - npc.dontTakeDamage = phase4; - break; - case 4: - npc.dontTakeDamage = false; - break; - } + if (invincibilityCounter < Phase2InvincibilityTime) + { + phase2 = phase3 = phase4 = false; + invincibilityCounter += 1; + } + else + { + // Damage immunity + switch (secondPhasePhase) + { + case 1: + npc.dontTakeDamage = phase2; + break; + case 2: + npc.dontTakeDamage = phase3; + break; + case 3: + npc.dontTakeDamage = phase4; + break; + case 4: + npc.dontTakeDamage = false; + break; + } - if (!npc.dontTakeDamage) - npc.dontTakeDamage = npc.ai[0] == 9f; - } + if (!npc.dontTakeDamage) + npc.dontTakeDamage = npc.ai[0] == 9f; + } - // Acquire target and determine enrage state - if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead || !Main.player[npc.target].active) - { - npc.TargetClosest(); - npc.netUpdate = true; - } + // Acquire target and determine enrage state + if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead || !Main.player[npc.target].active) + { + npc.TargetClosest(); + npc.netUpdate = true; + } - // Despawn safety, make sure to target another player if the current player target is too far away - if (Vector2.Distance(Main.player[npc.target].Center, vectorCenter) > CalamityGlobalNPC.CatchUpDistance200Tiles) - npc.TargetClosest(); + // Despawn safety, make sure to target another player if the current player target is too far away + if (Vector2.Distance(Main.player[npc.target].Center, vectorCenter) > CalamityGlobalNPC.CatchUpDistance200Tiles) + npc.TargetClosest(); - Player targetData = Main.player[npc.target]; + Player targetData = Main.player[npc.target]; - // Despawn - bool targetDead = false; - if (targetData.dead || !targetData.active) - { - npc.TargetClosest(); - targetData = Main.player[npc.target]; - if (targetData.dead || !targetData.active) - { - targetDead = true; + // Despawn + bool targetDead = false; + if (targetData.dead || !targetData.active) + { + npc.TargetClosest(); + targetData = Main.player[npc.target]; + if (targetData.dead || !targetData.active) + { + targetDead = true; - npc.velocity.Y -= 0.4f; + npc.velocity.Y -= 0.4f; - if (npc.timeLeft > 60) - npc.timeLeft = 60; + if (npc.timeLeft > 60) + npc.timeLeft = 60; - npc.ai[0] = 1f; - npc.ai[1] = 0f; - } - } - else if (npc.timeLeft < 1800) - npc.timeLeft = 1800; + npc.ai[0] = 1f; + npc.ai[1] = 0f; + } + } + else if (npc.timeLeft < 1800) + npc.timeLeft = 1800; - enraged = !targetData.Hitbox.Intersects(safeBox); - if (enraged) - { - protectionBoost = true; - npc.damage = npc.defDamage * 5; - } - else - { - protectionBoost = false; - npc.damage = npc.defDamage; - } + enraged = !targetData.Hitbox.Intersects(safeBox); + if (enraged) + { + protectionBoost = true; + npc.damage = npc.defDamage * 5; + } + else + { + protectionBoost = false; + npc.damage = npc.defDamage; + } - // Set DR based on protection boost (aka enrage) - bool chargeTelegraph = npc.ai[0] < 2f && npc.localAI[1] > 0f; - bool bulletHell = npc.ai[0] == 5f; - calamityGlobalNPC.DR = protectionBoost ? EnragedDR : normalDR; + // Set DR based on protection boost (aka enrage) + bool chargeTelegraph = npc.ai[0] < 2f && npc.localAI[1] > 0f; + bool bulletHell = npc.ai[0] == 5f; + calamityGlobalNPC.DR = protectionBoost ? EnragedDR : normalDR; - if (bulletHell) - npc.damage = 0; + if (bulletHell) + npc.damage = 0; - float reduceSpeedChargeDistance = 500f; - float phaseSwitchTimer = malice ? 28f : expertMode ? 30f : 32f; - float acceleration = expertMode ? 0.92f : 0.9f; + float reduceSpeedChargeDistance = 500f; + float phaseSwitchTimer = malice ? 28f : expertMode ? 30f : 32f; + float acceleration = expertMode ? 0.92f : 0.9f; float velocity = expertMode ? 14.5f : 14f; - float chargeTime = expertMode ? 32f : 35f; + float chargeTime = expertMode ? 32f : 35f; float chargeSpeed = expertMode ? 32f : 30f; - float fastChargeVelocityMultiplier = malice ? 2f : 1.5f; - fastChargeTelegraphTime = protectionBoost ? 60 : (100 - secondPhasePhase * 10); - bool playFastChargeRoarSound = npc.localAI[1] == fastChargeTelegraphTime * 0.5f; - bool doFastChargeTelegraph = npc.localAI[1] <= fastChargeTelegraphTime; + float fastChargeVelocityMultiplier = malice ? 2f : 1.5f; + fastChargeTelegraphTime = protectionBoost ? 60 : (100 - secondPhasePhase * 10); + bool playFastChargeRoarSound = npc.localAI[1] == fastChargeTelegraphTime * 0.5f; + bool doFastChargeTelegraph = npc.localAI[1] <= fastChargeTelegraphTime; - float fireballBreathTimer = 60f; + float fireballBreathTimer = 60f; float fireballBreathPhaseTimer = fireballBreathTimer + 120f; - float fireballBreathPhaseVelocity = 22f; + float fireballBreathPhaseVelocity = 22f; float splittingFireballBreathTimer = 40f; float splittingFireballBreathPhaseVelocity = 22f; int splittingFireballBreathDivisor = 10; - int splittingFireballs = 10; + int splittingFireballs = 10; int splittingFireballBreathTimer2 = splittingFireballs * splittingFireballBreathDivisor; float splittingFireballBreathYVelocityTimer = 40f; float splittingFireballBreathPhaseTimer = splittingFireballBreathTimer + splittingFireballBreathTimer2 + splittingFireballBreathYVelocityTimer; - float flareDustPhaseScalar = secondPhasePhase == 4 ? (death ? 54f : 60f) : (death ? 67f : 80f); - int spinPhaseTimerReduction = revenge ? (secondPhasePhase == 4 ? (int)(flareDustPhaseScalar * ((phase4GateValue - lifeRatio) / phase4GateValue)) : (int)(flareDustPhaseScalar * (ai2GateValue - lifeRatio))) : 0; - int spinPhaseTimer = (secondPhasePhase == 4 ? (malice ? 150 : death ? 160 : 180) : (malice ? 180 : death ? 200 : 240)) - spinPhaseTimerReduction; - float spinTime = spinPhaseTimer / 2; - float spinRotation = MathHelper.TwoPi * 3 / spinTime; - float spinPhaseVelocity = 25f; - int flareDustSpawnDivisor = spinPhaseTimer / 10; - int flareDustSpawnDivisor2 = spinPhaseTimer / 20 + (secondPhasePhase == 4 ? spinPhaseTimer / 60 : 0); - float increasedIdleTimeAfterBulletHell = -120f; + float flareDustPhaseScalar = secondPhasePhase == 4 ? (death ? 54f : 60f) : (death ? 67f : 80f); + int spinPhaseTimerReduction = revenge ? (secondPhasePhase == 4 ? (int)(flareDustPhaseScalar * ((phase4GateValue - lifeRatio) / phase4GateValue)) : (int)(flareDustPhaseScalar * (ai2GateValue - lifeRatio))) : 0; + int spinPhaseTimer = (secondPhasePhase == 4 ? (malice ? 150 : death ? 160 : 180) : (malice ? 180 : death ? 200 : 240)) - spinPhaseTimerReduction; + float spinTime = spinPhaseTimer / 2; + float spinRotation = MathHelper.TwoPi * 3 / spinTime; + float spinPhaseVelocity = 25f; + int flareDustSpawnDivisor = spinPhaseTimer / 10; + int flareDustSpawnDivisor2 = spinPhaseTimer / 20 + (secondPhasePhase == 4 ? spinPhaseTimer / 60 : 0); + float increasedIdleTimeAfterBulletHell = -120f; - float flareSpawnDecelerationTimer = malice ? 60f : death ? 75f : 90f; - int flareSpawnPhaseTimerReduction = revenge ? (int)(flareSpawnDecelerationTimer * (ai2GateValue - lifeRatio)) : 0; - float flareSpawnPhaseTimer = (malice ? 120f : death ? 150f : 180f) - flareSpawnPhaseTimerReduction; + float flareSpawnDecelerationTimer = malice ? 60f : death ? 75f : 90f; + int flareSpawnPhaseTimerReduction = revenge ? (int)(flareSpawnDecelerationTimer * (ai2GateValue - lifeRatio)) : 0; + float flareSpawnPhaseTimer = (malice ? 120f : death ? 150f : 180f) - flareSpawnPhaseTimerReduction; - float teleportPhaseTimer = 45f; + float teleportPhaseTimer = 45f; - if (revenge) - { - float chargeTimeDecrease = malice ? 6f : death ? 4f : 2f; - float velocityMult = malice ? 1.15f : death ? 1.1f : 1.05f; - acceleration *= velocityMult; - velocity *= velocityMult; - chargeTime -= chargeTimeDecrease; - chargeSpeed *= velocityMult; - } + if (revenge) + { + float chargeTimeDecrease = malice ? 6f : death ? 4f : 2f; + float velocityMult = malice ? 1.15f : death ? 1.1f : 1.05f; + acceleration *= velocityMult; + velocity *= velocityMult; + chargeTime -= chargeTimeDecrease; + chargeSpeed *= velocityMult; + } if (npc.ai[0] == 0f) { - npc.ai[1] += 1f; + npc.ai[1] += 1f; if (npc.ai[1] >= 10f) { npc.ai[1] = 0f; @@ -1682,24 +1683,24 @@ namespace CalamityMod.NPCs.Yharon else if (npc.ai[0] == 1f) { if (npc.ai[2] == 0f) - npc.ai[2] = (vectorCenter.X < targetData.Center.X) ? 1 : -1; + npc.ai[2] = (vectorCenter.X < targetData.Center.X) ? 1 : -1; - Vector2 destination = targetData.Center + new Vector2(-npc.ai[2], 0f); - Vector2 desiredVelocity = npc.SafeDirectionTo(destination) * velocity; + Vector2 destination = targetData.Center + new Vector2(-npc.ai[2], 0f); + Vector2 desiredVelocity = npc.SafeDirectionTo(destination) * velocity; - if (!targetDead) - { - if (Vector2.Distance(vectorCenter, destination) > reduceSpeedChargeDistance) - npc.SimpleFlyMovement(desiredVelocity, acceleration); - else - npc.velocity *= 0.98f; - } + if (!targetDead) + { + if (Vector2.Distance(vectorCenter, destination) > reduceSpeedChargeDistance) + npc.SimpleFlyMovement(desiredVelocity, acceleration); + else + npc.velocity *= 0.98f; + } int num27 = (vectorCenter.X < targetData.Center.X) ? 1 : -1; npc.direction = npc.spriteDirection = num27; - npc.ai[1] += 1f; - if (npc.ai[1] >= phaseSwitchTimer) + npc.ai[1] += 1f; + if (npc.ai[1] >= phaseSwitchTimer) { int num28 = 1; if (phase4) @@ -1842,65 +1843,65 @@ namespace CalamityMod.NPCs.Yharon } } - if (num28 == 5 && npc.ai[1] < phaseSwitchTimer + teleportPhaseTimer) - { - float newRotation = npc.AngleTo(targetData.Center); - float amount = 0.04f; + if (num28 == 5 && npc.ai[1] < phaseSwitchTimer + teleportPhaseTimer) + { + float newRotation = npc.AngleTo(targetData.Center); + float amount = 0.04f; - if (npc.spriteDirection == -1) - newRotation += pie; + if (npc.spriteDirection == -1) + newRotation += pie; - if (amount != 0f) - npc.rotation = npc.rotation.AngleTowards(newRotation, amount); + if (amount != 0f) + npc.rotation = npc.rotation.AngleTowards(newRotation, amount); - Vector2 npcCenter = vectorCenter; + Vector2 npcCenter = vectorCenter; - if (npc.alpha < 255) - { - npc.alpha += 17; - if (npc.alpha > 255) - npc.alpha = 255; - } + if (npc.alpha < 255) + { + npc.alpha += 17; + if (npc.alpha > 255) + npc.alpha = 255; + } - float timeBeforeTeleport = teleportPhaseTimer - 15f; - if (npc.ai[1] == phaseSwitchTimer + timeBeforeTeleport) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); + float timeBeforeTeleport = teleportPhaseTimer - 15f; + if (npc.ai[1] == phaseSwitchTimer + timeBeforeTeleport) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); - if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[1] == phaseSwitchTimer + timeBeforeTeleport) - { - Vector2 center = targetData.Center + new Vector2(0f, -540f); - npcCenter = npc.Center = center; - } + if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[1] == phaseSwitchTimer + timeBeforeTeleport) + { + Vector2 center = targetData.Center + new Vector2(0f, -540f); + npcCenter = npc.Center = center; + } - return; - } + return; + } - if (num28 == 7 && doFastChargeTelegraph) - { - float newRotation = npc.AngleTo(targetData.Center); - float amount = 0.04f; + if (num28 == 7 && doFastChargeTelegraph) + { + float newRotation = npc.AngleTo(targetData.Center); + float amount = 0.04f; - if (npc.spriteDirection == -1) - newRotation += pie; + if (npc.spriteDirection == -1) + newRotation += pie; - if (amount != 0f) - npc.rotation = npc.rotation.AngleTowards(newRotation, amount); + if (amount != 0f) + npc.rotation = npc.rotation.AngleTowards(newRotation, amount); - if (playFastChargeRoarSound) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); + if (playFastChargeRoarSound) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - npc.localAI[1] += 1f; + npc.localAI[1] += 1f; - return; - } + return; + } npc.ai[0] = num28; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] += 1f; - npc.localAI[1] = 0f; + npc.localAI[1] = 0f; - switch (secondPhasePhase) + switch (secondPhasePhase) { case 1: if (phase2) @@ -1980,9 +1981,9 @@ namespace CalamityMod.NPCs.Yharon npc.rotation += pie; npc.velocity = vector3 * spinPhaseVelocity; - - npc.localAI[3] = Main.rand.Next(2); - + + npc.localAI[3] = Main.rand.Next(2); + break; } case 7: //fast charge @@ -2002,32 +2003,32 @@ namespace CalamityMod.NPCs.Yharon } } - // Charge + // Charge else if (npc.ai[0] == 2f) { if (npc.ai[1] == 1f) Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); - ChargeDust(7, pie); + ChargeDust(7, pie); - npc.ai[1] += 1f; - if (npc.ai[1] >= chargeTime) + npc.ai[1] += 1f; + if (npc.ai[1] >= chargeTime) { npc.ai[0] = 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; - npc.TargetClosest(); + npc.TargetClosest(); } } - // Fireball spit + // Fireball spit else if (npc.ai[0] == 3f) { int num29 = (vectorCenter.X < targetData.Center.X) ? 1 : -1; npc.ai[2] = num29; - npc.ai[1] += 1f; - if (npc.ai[1] < fireballBreathTimer) + npc.ai[1] += 1f; + if (npc.ai[1] < fireballBreathTimer) { Vector2 vector4 = targetData.Center + new Vector2(num29 * -750f, -300f); Vector2 value = npc.SafeDirectionTo(vector4) * 16f; @@ -2055,12 +2056,12 @@ namespace CalamityMod.NPCs.Yharon { float xOffset = 30f; Vector2 position = vectorCenter + new Vector2((110f + xOffset) * npc.direction, -20f).RotatedBy(npc.rotation); - Vector2 projectileVelocity = targetData.Center - position; - projectileVelocity.Normalize(); - projectileVelocity *= 0.1f; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(position, projectileVelocity, type, damage, 0f, Main.myPlayer, 1f, 0f); + Vector2 projectileVelocity = targetData.Center - position; + projectileVelocity.Normalize(); + projectileVelocity *= 0.1f; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(position, projectileVelocity, type, damage, 0f, Main.myPlayer, 1f, 0f); } if (Math.Abs(targetData.Center.X - vectorCenter.X) > 700f && Math.Abs(npc.velocity.X) < chargeSpeed) @@ -2072,11 +2073,11 @@ namespace CalamityMod.NPCs.Yharon npc.ai[0] = 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; - npc.TargetClosest(); - } + npc.TargetClosest(); + } } - // Splitting fireball breath + // Splitting fireball breath else if (npc.ai[0] == 4f) { int num31 = (vectorCenter.X < targetData.Center.X) ? 1 : -1; @@ -2119,9 +2120,9 @@ namespace CalamityMod.NPCs.Yharon Vector2 position = vectorCenter + new Vector2((110f + xOffset) * npc.direction, -20f).RotatedBy(npc.rotation); int num34 = (int)(npc.ai[1] - splittingFireballBreathTimer + 1f); - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - if (num34 <= splittingFireballBreathTimer2 && num34 % splittingFireballBreathDivisor == 0 && Main.netMode != NetmodeID.MultiplayerClient) + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + if (num34 <= splittingFireballBreathTimer2 && num34 % splittingFireballBreathDivisor == 0 && Main.netMode != NetmodeID.MultiplayerClient) Projectile.NewProjectile(position, npc.velocity, type, damage, 0f, Main.myPlayer, 0f, 0f); } @@ -2134,101 +2135,101 @@ namespace CalamityMod.NPCs.Yharon npc.ai[0] = 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; - npc.TargetClosest(); - } + npc.TargetClosest(); + } } - // Fireball spin + // Fireball spin else if (npc.ai[0] == 5f) { - npc.velocity = npc.velocity.RotatedBy(-(double)spinRotation * (float)npc.direction); + npc.velocity = npc.velocity.RotatedBy(-(double)spinRotation * (float)npc.direction); npc.rotation -= spinRotation * npc.direction; - if (npc.ai[1] == 1f) - { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); - flareDustBulletHellSpawn = npc.Center + npc.velocity.RotatedBy(MathHelper.PiOver2 * -npc.direction) * spinTime / (MathHelper.TwoPi * 3f); - } - - npc.ai[1] += 1f; - if (Main.netMode != NetmodeID.MultiplayerClient) + if (npc.ai[1] == 1f) { - if (secondPhasePhase >= 3) - { - // Rotate spiral by 9 * (240 / 12) = +90 degrees and then back -90 degrees + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoar"), (int)npc.position.X, (int)npc.position.Y); + flareDustBulletHellSpawn = npc.Center + npc.velocity.RotatedBy(MathHelper.PiOver2 * -npc.direction) * spinTime / (MathHelper.TwoPi * 3f); + } - // For phase 4: Rotate spiral by 18 * (240 / 16) = +135 degrees and then back -135 degrees + npc.ai[1] += 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + if (secondPhasePhase >= 3) + { + // Rotate spiral by 9 * (240 / 12) = +90 degrees and then back -90 degrees - if (npc.ai[1] % flareDustSpawnDivisor2 == 0f) - { - int totalProjectiles = secondPhasePhase == 4 ? 12 : 10; - float projectileVelocity = secondPhasePhase == 4 ? 16f : 12f; - float radialOffset = secondPhasePhase == 4 ? 2.8f : 3.2f; - if (npc.localAI[3] == 0f) - { - DoFlareDustBulletHell(1, spinPhaseTimer, npc.GetProjectileDamage(ModContent.ProjectileType()), totalProjectiles, projectileVelocity, radialOffset, true); - } - else - { - int ringReduction = (int)MathHelper.Lerp(0f, 12f, npc.ai[1] / spinPhaseTimer); - int totalProjectiles2 = 38 - ringReduction; // 36 for first ring, 24 for last ring - DoFlareDustBulletHell(0, flareDustSpawnDivisor2, npc.GetProjectileDamage(ModContent.ProjectileType()), totalProjectiles2, 0f, 0f, true); - } + // For phase 4: Rotate spiral by 18 * (240 / 16) = +135 degrees and then back -135 degrees - // Fire a flame towards every player, with a limit of 10 - if (expertMode && npc.ai[2] % (flareDustSpawnDivisor2 * 2) == 0f) - { - List targets = new List(); - for (int p = 0; p < Main.maxPlayers; p++) - { - if (Main.player[p].active && !Main.player[p].dead) - targets.Add(p); + if (npc.ai[1] % flareDustSpawnDivisor2 == 0f) + { + int totalProjectiles = secondPhasePhase == 4 ? 12 : 10; + float projectileVelocity = secondPhasePhase == 4 ? 16f : 12f; + float radialOffset = secondPhasePhase == 4 ? 2.8f : 3.2f; + if (npc.localAI[3] == 0f) + { + DoFlareDustBulletHell(1, spinPhaseTimer, npc.GetProjectileDamage(ModContent.ProjectileType()), totalProjectiles, projectileVelocity, radialOffset, true); + } + else + { + int ringReduction = (int)MathHelper.Lerp(0f, 12f, npc.ai[1] / spinPhaseTimer); + int totalProjectiles2 = 38 - ringReduction; // 36 for first ring, 24 for last ring + DoFlareDustBulletHell(0, flareDustSpawnDivisor2, npc.GetProjectileDamage(ModContent.ProjectileType()), totalProjectiles2, 0f, 0f, true); + } - if (targets.Count > 4) - break; - } - foreach (int t in targets) - { - Vector2 velocity2 = Vector2.Normalize(Main.player[t].Center + Main.player[t].velocity * 40f - flareDustBulletHellSpawn) * (projectileVelocity * 0.7f); - int type = ModContent.ProjectileType(); - int proj = Projectile.NewProjectile(flareDustBulletHellSpawn, velocity2, type, npc.GetProjectileDamage(ModContent.ProjectileType()), 0f, Main.myPlayer, 2f, 0f); - Main.projectile[proj].extraUpdates += 1; - } - } - } - } - else - { - if (npc.ai[1] % flareDustSpawnDivisor == 0f) - { - int ringReduction = (int)MathHelper.Lerp(0f, 12f, npc.ai[1] / spinPhaseTimer); - int totalProjectiles = 38 - ringReduction; // 36 for first ring, 24 for last ring - DoFlareDustBulletHell(0, flareDustSpawnDivisor, npc.GetProjectileDamage(ModContent.ProjectileType()), totalProjectiles, 0f, 0f, true); + // Fire a flame towards every player, with a limit of 10 + if (expertMode && npc.ai[2] % (flareDustSpawnDivisor2 * 2) == 0f) + { + List targets = new List(); + for (int p = 0; p < Main.maxPlayers; p++) + { + if (Main.player[p].active && !Main.player[p].dead) + targets.Add(p); - // Fire a flame towards every player, with a limit of 10 - if (expertMode) - { - List targets = new List(); - for (int p = 0; p < Main.maxPlayers; p++) - { - if (Main.player[p].active && !Main.player[p].dead) - targets.Add(p); + if (targets.Count > 4) + break; + } + foreach (int t in targets) + { + Vector2 velocity2 = Vector2.Normalize(Main.player[t].Center + Main.player[t].velocity * 40f - flareDustBulletHellSpawn) * (projectileVelocity * 0.7f); + int type = ModContent.ProjectileType(); + int proj = Projectile.NewProjectile(flareDustBulletHellSpawn, velocity2, type, npc.GetProjectileDamage(ModContent.ProjectileType()), 0f, Main.myPlayer, 2f, 0f); + Main.projectile[proj].extraUpdates += 1; + } + } + } + } + else + { + if (npc.ai[1] % flareDustSpawnDivisor == 0f) + { + int ringReduction = (int)MathHelper.Lerp(0f, 12f, npc.ai[1] / spinPhaseTimer); + int totalProjectiles = 38 - ringReduction; // 36 for first ring, 24 for last ring + DoFlareDustBulletHell(0, flareDustSpawnDivisor, npc.GetProjectileDamage(ModContent.ProjectileType()), totalProjectiles, 0f, 0f, true); - if (targets.Count > 4) - break; - } - foreach (int t in targets) - { - Vector2 velocity2 = Vector2.Normalize(Main.player[t].Center + Main.player[t].velocity * 40f - flareDustBulletHellSpawn) * 8f; - int type = ModContent.ProjectileType(); - int proj = Projectile.NewProjectile(flareDustBulletHellSpawn, velocity2, type, npc.GetProjectileDamage(ModContent.ProjectileType()), 0f, Main.myPlayer, 2f, 0f); - Main.projectile[proj].extraUpdates += 1; - } - } - } - } + // Fire a flame towards every player, with a limit of 10 + if (expertMode) + { + List targets = new List(); + for (int p = 0; p < Main.maxPlayers; p++) + { + if (Main.player[p].active && !Main.player[p].dead) + targets.Add(p); - if (npc.ai[1] == 210f && secondPhasePhase == 4 && useTornado) + if (targets.Count > 4) + break; + } + foreach (int t in targets) + { + Vector2 velocity2 = Vector2.Normalize(Main.player[t].Center + Main.player[t].velocity * 40f - flareDustBulletHellSpawn) * 8f; + int type = ModContent.ProjectileType(); + int proj = Projectile.NewProjectile(flareDustBulletHellSpawn, velocity2, type, npc.GetProjectileDamage(ModContent.ProjectileType()), 0f, Main.myPlayer, 2f, 0f); + Main.projectile[proj].extraUpdates += 1; + } + } + } + } + + if (npc.ai[1] == 210f && secondPhasePhase == 4 && useTornado) { useTornado = false; Projectile.NewProjectile(vectorCenter, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, npc.target + 1); @@ -2240,13 +2241,13 @@ namespace CalamityMod.NPCs.Yharon npc.ai[0] = 1f; npc.ai[1] = increasedIdleTimeAfterBulletHell; npc.ai[2] = 0f; - npc.localAI[2] = 0f; - npc.TargetClosest(); - npc.velocity /= 2f; + npc.localAI[2] = 0f; + npc.TargetClosest(); + npc.velocity /= 2f; } } - // Fire ring + // Fire ring else if (npc.ai[0] == 6f) { if (npc.ai[1] == 0f) @@ -2282,14 +2283,14 @@ namespace CalamityMod.NPCs.Yharon if (Main.netMode != NetmodeID.MultiplayerClient) { - if (npc.ai[1] == 20f || npc.ai[1] == 80f || npc.ai[1] == 140f) - { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); + if (npc.ai[1] == 20f || npc.ai[1] == 80f || npc.ai[1] == 140f) + { + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); - DoFireRing(expertMode ? 300 : 180, npc.GetProjectileDamage(ModContent.ProjectileType()), npc.target, 1f); + DoFireRing(expertMode ? 300 : 180, npc.GetProjectileDamage(ModContent.ProjectileType()), npc.target, 1f); - Vector2 vector7 = vectorCenter + (MathHelper.TwoPi * Main.rand.NextFloat()).ToRotationVector2() * new Vector2(2f, 1f) * 100f * (0.6f + Main.rand.NextFloat() * 0.4f); - } + Vector2 vector7 = vectorCenter + (MathHelper.TwoPi * Main.rand.NextFloat()).ToRotationVector2() * new Vector2(2f, 1f) * 100f * (0.6f + Main.rand.NextFloat() * 0.4f); + } } npc.ai[1] += 1f; @@ -2297,37 +2298,37 @@ namespace CalamityMod.NPCs.Yharon if (npc.ai[1] >= flareSpawnPhaseTimer) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); - if (Main.netMode != NetmodeID.MultiplayerClient) + if (Main.netMode != NetmodeID.MultiplayerClient) Projectile.NewProjectile(vectorCenter, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, npc.target + 1); npc.ai[0] = 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; - npc.TargetClosest(); - } + npc.TargetClosest(); + } } - // Fast charge + // Fast charge else if (npc.ai[0] == 7f) { if (npc.ai[1] == 1f) Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonRoarShort"), (int)npc.position.X, (int)npc.position.Y); - ChargeDust(14, pie); + ChargeDust(14, pie); - npc.ai[1] += 1f; - if (npc.ai[1] >= chargeTime) + npc.ai[1] += 1f; + if (npc.ai[1] >= chargeTime) { npc.ai[0] = 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; - npc.TargetClosest(); - } + npc.TargetClosest(); + } } - // Teleport + // Teleport else if (npc.ai[0] == 8f) { Vector2 npcCenter = vectorCenter; @@ -2361,12 +2362,12 @@ namespace CalamityMod.NPCs.Yharon npc.ai[0] = 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; - npc.localAI[1] = fastChargeTelegraphTime + 1f; - npc.netUpdate = true; + npc.localAI[1] = fastChargeTelegraphTime + 1f; + npc.netUpdate = true; } } - // Enter new phase + // Enter new phase else if (npc.ai[0] == 9f) { npc.velocity *= 0.9f; @@ -2410,8 +2411,8 @@ namespace CalamityMod.NPCs.Yharon npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; + npc.TargetClosest(); + npc.netUpdate = true; } } @@ -2465,363 +2466,363 @@ namespace CalamityMod.NPCs.Yharon if (num43 != 0f) npc.rotation = npc.rotation.AngleTowards(num42, num43); } - #endregion + #endregion - #region Charge Dust - private void ChargeDust(int dustAmt, float pie) - { - for (int num1474 = 0; num1474 < dustAmt; num1474++) - { - Vector2 vector171 = Vector2.Normalize(npc.velocity) * new Vector2((npc.width + 50) / 2f, npc.height) * 0.75f; - vector171 = vector171.RotatedBy((num1474 - (dustAmt / 2 - 1)) * (double)pie / (float)dustAmt) + npc.Center; - Vector2 value18 = ((float)(Main.rand.NextDouble() * pie) - MathHelper.PiOver2).ToRotationVector2() * Main.rand.Next(3, 8); - int num1475 = Dust.NewDust(vector171 + value18, 0, 0, 244, value18.X * 2f, value18.Y * 2f, 100, default, 1.4f); - Main.dust[num1475].noGravity = true; - Main.dust[num1475].noLight = true; - Main.dust[num1475].velocity /= 4f; - Main.dust[num1475].velocity -= npc.velocity; - } - } - #endregion - - #region Flare Dust Bullet Hell - private void DoFlareDustBulletHell(int attackType, int timer, int projectileDamage, int totalProjectiles, float projectileVelocity, float radialOffset, bool phase2) - { - Main.PlaySound(SoundID.Item20, flareDustBulletHellSpawn); - float aiVariableUsed = phase2 ? npc.ai[1] : npc.ai[2]; - switch (attackType) - { - case 0: - float offsetAngle = 360 / totalProjectiles; - int totalSpaces = totalProjectiles / 5; - int spaceStart = Main.rand.Next(totalProjectiles - totalSpaces); - float ai0 = aiVariableUsed % (timer * 2) == 0f ? 1f : 0f; - - int spacesMade = 0; - for (int i = 0; i < totalProjectiles; i++) - { - if (i >= spaceStart && spacesMade < totalSpaces) - spacesMade++; - else - Projectile.NewProjectile(flareDustBulletHellSpawn, Vector2.Zero, ModContent.ProjectileType(), projectileDamage, 0f, Main.myPlayer, ai0, i * offsetAngle); - } - break; - - case 1: - double radians = MathHelper.TwoPi / totalProjectiles; - Vector2 spinningPoint = Vector2.Normalize(new Vector2(-npc.localAI[2], -projectileVelocity)); - - for (int i = 0; i < totalProjectiles; i++) - { - Vector2 vector2 = spinningPoint.RotatedBy(radians * i) * projectileVelocity; - Projectile.NewProjectile(flareDustBulletHellSpawn, vector2, ModContent.ProjectileType(), projectileDamage, 0f, Main.myPlayer, 2f, 0f); - } - - float newRadialOffset = (int)aiVariableUsed / (timer / 4) % 2f == 0f ? radialOffset : -radialOffset; - npc.localAI[2] += newRadialOffset; - break; - - default: - break; - } - } - #endregion - - #region Fire Ring - public void DoFireRing(int timeLeft, int damage, float ai0, float ai1) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float velocity = ai1 == 0f ? 10f : 5f; - int totalProjectiles = 50; - float radians = MathHelper.TwoPi / totalProjectiles; - for (int i = 0; i < totalProjectiles; i++) - { - Vector2 vector255 = new Vector2(0f, -velocity).RotatedBy(radians * i); - int proj = Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, ai0, ai1); - Main.projectile[proj].timeLeft = timeLeft; - } - } - } - #endregion - - #region Drawing - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + #region Charge Dust + private void ChargeDust(int dustAmt, float pie) { - bool idlePhases = (!startSecondAI && (npc.ai[0] == 0f || npc.ai[0] == 6f || npc.ai[0] == 13f)) || (startSecondAI && (npc.ai[0] == 5f || npc.ai[0] < 2f)); + for (int num1474 = 0; num1474 < dustAmt; num1474++) + { + Vector2 vector171 = Vector2.Normalize(npc.velocity) * new Vector2((npc.width + 50) / 2f, npc.height) * 0.75f; + vector171 = vector171.RotatedBy((num1474 - (dustAmt / 2 - 1)) * (double)pie / (float)dustAmt) + npc.Center; + Vector2 value18 = ((float)(Main.rand.NextDouble() * pie) - MathHelper.PiOver2).ToRotationVector2() * Main.rand.Next(3, 8); + int num1475 = Dust.NewDust(vector171 + value18, 0, 0, 244, value18.X * 2f, value18.Y * 2f, 100, default, 1.4f); + Main.dust[num1475].noGravity = true; + Main.dust[num1475].noLight = true; + Main.dust[num1475].velocity /= 4f; + Main.dust[num1475].velocity -= npc.velocity; + } + } + #endregion - bool chargingOrSpawnPhases = (!startSecondAI && (npc.ai[0] == 1f || npc.ai[0] == 5f || npc.ai[0] == 7f || npc.ai[0] == 11f || npc.ai[0] == 14f || npc.ai[0] == 18f)) || - (startSecondAI && (npc.ai[0] == 6f || npc.ai[0] == 2f || npc.ai[0] == 7f)); + #region Flare Dust Bullet Hell + private void DoFlareDustBulletHell(int attackType, int timer, int projectileDamage, int totalProjectiles, float projectileVelocity, float radialOffset, bool phase2) + { + Main.PlaySound(SoundID.Item20, flareDustBulletHellSpawn); + float aiVariableUsed = phase2 ? npc.ai[1] : npc.ai[2]; + switch (attackType) + { + case 0: + float offsetAngle = 360 / totalProjectiles; + int totalSpaces = totalProjectiles / 5; + int spaceStart = Main.rand.Next(totalProjectiles - totalSpaces); + float ai0 = aiVariableUsed % (timer * 2) == 0f ? 1f : 0f; - bool projectileOrCirclePhases = (!startSecondAI && (npc.ai[0] == 2f || npc.ai[0] == 8f || npc.ai[0] == 12f || npc.ai[0] == 15f || npc.ai[0] == 19f || npc.ai[0] == 20f)) || - (startSecondAI && (npc.ai[0] == 4f || npc.ai[0] == 3f)); + int spacesMade = 0; + for (int i = 0; i < totalProjectiles; i++) + { + if (i >= spaceStart && spacesMade < totalSpaces) + spacesMade++; + else + Projectile.NewProjectile(flareDustBulletHellSpawn, Vector2.Zero, ModContent.ProjectileType(), projectileDamage, 0f, Main.myPlayer, ai0, i * offsetAngle); + } + break; - bool tornadoPhase = !startSecondAI && (npc.ai[0] == 3f || npc.ai[0] == 9f || npc.ai[0] == -1f || npc.ai[0] == 16f); + case 1: + double radians = MathHelper.TwoPi / totalProjectiles; + Vector2 spinningPoint = Vector2.Normalize(new Vector2(-npc.localAI[2], -projectileVelocity)); - bool newPhasePhase = (!startSecondAI && (npc.ai[0] == 4f || npc.ai[0] == 10f || npc.ai[0] == 17f)) || (startSecondAI && npc.ai[0] == 9f); + for (int i = 0; i < totalProjectiles; i++) + { + Vector2 vector2 = spinningPoint.RotatedBy(radians * i) * projectileVelocity; + Projectile.NewProjectile(flareDustBulletHellSpawn, vector2, ModContent.ProjectileType(), projectileDamage, 0f, Main.myPlayer, 2f, 0f); + } - bool pauseAfterTeleportPhase = startSecondAI && npc.ai[0] == 8f; + float newRadialOffset = (int)aiVariableUsed / (timer / 4) % 2f == 0f ? radialOffset : -radialOffset; + npc.localAI[2] += newRadialOffset; + break; - bool ai2 = startSecondAI; + default: + break; + } + } + #endregion - SpriteEffects spriteEffects = ai2 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - if (npc.spriteDirection == 1) - spriteEffects = ai2 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + #region Fire Ring + public void DoFireRing(int timeLeft, int damage, float ai0, float ai1) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float velocity = ai1 == 0f ? 10f : 5f; + int totalProjectiles = 50; + float radians = MathHelper.TwoPi / totalProjectiles; + for (int i = 0; i < totalProjectiles; i++) + { + Vector2 vector255 = new Vector2(0f, -velocity).RotatedBy(radians * i); + int proj = Projectile.NewProjectile(npc.Center, vector255, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, ai0, ai1); + Main.projectile[proj].timeLeft = timeLeft; + } + } + } + #endregion - Texture2D texture = Main.npcTexture[npc.type]; - Vector2 vector11 = new Vector2(texture.Width / 2, texture.Height / Main.npcFrameCount[npc.type] / 2); - Color color = lightColor; - Color invincibleColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, 0); - Color color36 = Color.White; + #region Drawing + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + bool idlePhases = (!startSecondAI && (npc.ai[0] == 0f || npc.ai[0] == 6f || npc.ai[0] == 13f)) || (startSecondAI && (npc.ai[0] == 5f || npc.ai[0] < 2f)); - float amount9 = 0f; - bool invincible = ai2 && invincibilityCounter < 900; - bool flag8 = npc.ai[0] > 5f; - bool flag9 = npc.ai[0] > 12f; - bool flag10 = startSecondAI; - int num150 = 120; - int num151 = 60; + bool chargingOrSpawnPhases = (!startSecondAI && (npc.ai[0] == 1f || npc.ai[0] == 5f || npc.ai[0] == 7f || npc.ai[0] == 11f || npc.ai[0] == 14f || npc.ai[0] == 18f)) || + (startSecondAI && (npc.ai[0] == 6f || npc.ai[0] == 2f || npc.ai[0] == 7f)); - if (flag10) - color = CalamityGlobalNPC.buffColor(color, 0.9f, 0.7f, 0.3f, 1f); - else if (flag9) - color = CalamityGlobalNPC.buffColor(color, 0.8f, 0.7f, 0.4f, 1f); - else if (flag8) - color = CalamityGlobalNPC.buffColor(color, 0.7f, 0.7f, 0.5f, 1f); - else if (npc.ai[0] == 4f && npc.ai[2] > num150) - { - float num152 = npc.ai[2] - num150; - num152 /= num151; - color = CalamityGlobalNPC.buffColor(color, 1f - 0.3f * num152, 1f - 0.3f * num152, 1f - 0.5f * num152, 1f); - } + bool projectileOrCirclePhases = (!startSecondAI && (npc.ai[0] == 2f || npc.ai[0] == 8f || npc.ai[0] == 12f || npc.ai[0] == 15f || npc.ai[0] == 19f || npc.ai[0] == 20f)) || + (startSecondAI && (npc.ai[0] == 4f || npc.ai[0] == 3f)); - int num153 = 10; - int num154 = 2; - if (npc.ai[0] == -1f) - num153 = 0; - if (idlePhases) - num153 = 7; + bool tornadoPhase = !startSecondAI && (npc.ai[0] == 3f || npc.ai[0] == 9f || npc.ai[0] == -1f || npc.ai[0] == 16f); - if (invincible) - color36 = invincibleColor; - else if (chargingOrSpawnPhases) - { - color36 = Color.Red; - amount9 = 0.5f; - } - else - color = lightColor; + bool newPhasePhase = (!startSecondAI && (npc.ai[0] == 4f || npc.ai[0] == 10f || npc.ai[0] == 17f)) || (startSecondAI && npc.ai[0] == 9f); - if (CalamityConfig.Instance.Afterimages) - { - for (int num155 = 1; num155 < num153; num155 += num154) - { - Color color38 = color; - color38 = Color.Lerp(color38, color36, amount9); - color38 = npc.GetAlpha(color38); - color38 *= (num153 - num155) / 15f; - Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; - vector41 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); - spriteBatch.Draw(texture, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); - } - } + bool pauseAfterTeleportPhase = startSecondAI && npc.ai[0] == 8f; - int num156 = 0; - float num157 = 0f; - float scaleFactor9 = 0f; + bool ai2 = startSecondAI; - if (npc.ai[0] == -1f) - num156 = 0; + SpriteEffects spriteEffects = ai2 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = ai2 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - if (tornadoPhase) - { - int num158 = 60; - int num159 = 30; - if (npc.ai[2] > num158) - { - num156 = 6; - num157 = 1f - (float)Math.Cos((npc.ai[2] - num158) / num159 * MathHelper.TwoPi); - num157 /= 3f; - scaleFactor9 = 40f; - } - } + Texture2D texture = Main.npcTexture[npc.type]; + Vector2 vector11 = new Vector2(texture.Width / 2, texture.Height / Main.npcFrameCount[npc.type] / 2); + Color color = lightColor; + Color invincibleColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, 0); + Color color36 = Color.White; - if (newPhasePhase && npc.ai[2] > num150) - { - num156 = 6; - num157 = 1f - (float)Math.Cos((npc.ai[2] - num150) / num151 * MathHelper.TwoPi); - num157 /= 3f; - scaleFactor9 = 60f; - } + float amount9 = 0f; + bool invincible = ai2 && invincibilityCounter < Phase2InvincibilityTime; + bool flag8 = npc.ai[0] > 5f; + bool flag9 = npc.ai[0] > 12f; + bool flag10 = startSecondAI; + int num150 = 120; + int num151 = 60; - if (pauseAfterTeleportPhase) - { - num156 = 6; - num157 = 1f - (float)Math.Cos(npc.ai[2] / 30f * MathHelper.TwoPi); - num157 /= 3f; - scaleFactor9 = 20f; - } + if (flag10) + color = CalamityGlobalNPC.buffColor(color, 0.9f, 0.7f, 0.3f, 1f); + else if (flag9) + color = CalamityGlobalNPC.buffColor(color, 0.8f, 0.7f, 0.4f, 1f); + else if (flag8) + color = CalamityGlobalNPC.buffColor(color, 0.7f, 0.7f, 0.5f, 1f); + else if (npc.ai[0] == 4f && npc.ai[2] > num150) + { + float num152 = npc.ai[2] - num150; + num152 /= num151; + color = CalamityGlobalNPC.buffColor(color, 1f - 0.3f * num152, 1f - 0.3f * num152, 1f - 0.5f * num152, 1f); + } - if (CalamityConfig.Instance.Afterimages) - { - for (int num160 = 0; num160 < num156; num160++) - { - Color color39 = lightColor; - color39 = Color.Lerp(color39, color36, amount9); - color39 = npc.GetAlpha(color39); - color39 *= 1f - num157; - Vector2 vector42 = npc.Center + (num160 / (float)num156 * MathHelper.TwoPi + npc.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; - vector42 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector42 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); - spriteBatch.Draw(texture, vector42, npc.frame, color39, npc.rotation, vector11, npc.scale, spriteEffects, 0f); - } - } + int num153 = 10; + int num154 = 2; + if (npc.ai[0] == -1f) + num153 = 0; + if (idlePhases) + num153 = 7; - Vector2 vector43 = npc.Center - Main.screenPosition; - vector43 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); - spriteBatch.Draw(texture, vector43, npc.frame, invincible ? invincibleColor : npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); + if (invincible) + color36 = invincibleColor; + else if (chargingOrSpawnPhases) + { + color36 = Color.Red; + amount9 = 0.5f; + } + else + color = lightColor; - if (flag8 || npc.ai[0] == 4f || startSecondAI) - { - texture = ModContent.GetTexture("CalamityMod/NPCs/Yharon/YharonGlowOrange"); - Color color40 = Color.Lerp(Color.White, invincible ? invincibleColor : Color.Orange, 0.5f); - color36 = invincible ? invincibleColor : Color.Orange; + if (CalamityConfig.Instance.Afterimages) + { + for (int num155 = 1; num155 < num153; num155 += num154) + { + Color color38 = color; + color38 = Color.Lerp(color38, color36, amount9); + color38 = npc.GetAlpha(color38); + color38 *= (num153 - num155) / 15f; + Vector2 vector41 = npc.oldPos[num155] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; + vector41 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + vector41 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); + spriteBatch.Draw(texture, vector41, npc.frame, color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + } + } - Texture2D texture2 = ModContent.GetTexture("CalamityMod/NPCs/Yharon/YharonGlowGreen"); - Color color43 = Color.Lerp(Color.White, invincible ? invincibleColor : Color.Chartreuse, 0.5f); - Color color44 = invincible ? invincibleColor : Color.Chartreuse; + int num156 = 0; + float num157 = 0f; + float scaleFactor9 = 0f; - Texture2D texture3 = ModContent.GetTexture("CalamityMod/NPCs/Yharon/YharonGlowPurple"); - Color color45 = Color.Lerp(Color.White, invincible ? invincibleColor : Color.BlueViolet, 0.5f); - Color color46 = invincible ? invincibleColor : Color.BlueViolet; + if (npc.ai[0] == -1f) + num156 = 0; - amount9 = 1f; - num157 = 0.5f; - scaleFactor9 = 10f; - num154 = 1; + if (tornadoPhase) + { + int num158 = 60; + int num159 = 30; + if (npc.ai[2] > num158) + { + num156 = 6; + num157 = 1f - (float)Math.Cos((npc.ai[2] - num158) / num159 * MathHelper.TwoPi); + num157 /= 3f; + scaleFactor9 = 40f; + } + } - if (newPhasePhase) - { - float num161 = npc.ai[2] - num150; - num161 /= num151; - color36 *= num161; - color40 *= num161; + if (newPhasePhase && npc.ai[2] > num150) + { + num156 = 6; + num157 = 1f - (float)Math.Cos((npc.ai[2] - num150) / num151 * MathHelper.TwoPi); + num157 /= 3f; + scaleFactor9 = 60f; + } - if (flag9 || npc.ai[0] == 10f || startSecondAI) - { - color43 *= num161; - color44 *= num161; - } + if (pauseAfterTeleportPhase) + { + num156 = 6; + num157 = 1f - (float)Math.Cos(npc.ai[2] / 30f * MathHelper.TwoPi); + num157 /= 3f; + scaleFactor9 = 20f; + } - if (flag10 || npc.ai[0] == 17f) - { - color45 *= num161; - color46 *= num161; - } - } + if (CalamityConfig.Instance.Afterimages) + { + for (int num160 = 0; num160 < num156; num160++) + { + Color color39 = lightColor; + color39 = Color.Lerp(color39, color36, amount9); + color39 = npc.GetAlpha(color39); + color39 *= 1f - num157; + Vector2 vector42 = npc.Center + (num160 / (float)num156 * MathHelper.TwoPi + npc.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; + vector42 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + vector42 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); + spriteBatch.Draw(texture, vector42, npc.frame, color39, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + } + } - if (pauseAfterTeleportPhase) - { - float num162 = npc.ai[2]; - num162 /= 30f; + Vector2 vector43 = npc.Center - Main.screenPosition; + vector43 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + vector43 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); + spriteBatch.Draw(texture, vector43, npc.frame, invincible ? invincibleColor : npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); - if (num162 > 0.5f) - num162 = 1f - num162; + if (flag8 || npc.ai[0] == 4f || startSecondAI) + { + texture = ModContent.GetTexture("CalamityMod/NPCs/Yharon/YharonGlowOrange"); + Color color40 = Color.Lerp(Color.White, invincible ? invincibleColor : Color.Orange, 0.5f); + color36 = invincible ? invincibleColor : Color.Orange; - num162 *= 2f; - num162 = 1f - num162; - color36 *= num162; - color40 *= num162; - color43 *= num162; - color44 *= num162; - color45 *= num162; - color46 *= num162; - } + Texture2D texture2 = ModContent.GetTexture("CalamityMod/NPCs/Yharon/YharonGlowGreen"); + Color color43 = Color.Lerp(Color.White, invincible ? invincibleColor : Color.Chartreuse, 0.5f); + Color color44 = invincible ? invincibleColor : Color.Chartreuse; - if (CalamityConfig.Instance.Afterimages) - { - for (int num163 = 1; num163 < num153; num163 += num154) - { - Color color41 = color40; - color41 = Color.Lerp(color41, color36, amount9); - color41 *= (num153 - num163) / 15f; - Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; - vector44 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); - spriteBatch.Draw(texture, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + Texture2D texture3 = ModContent.GetTexture("CalamityMod/NPCs/Yharon/YharonGlowPurple"); + Color color45 = Color.Lerp(Color.White, invincible ? invincibleColor : Color.BlueViolet, 0.5f); + Color color46 = invincible ? invincibleColor : Color.BlueViolet; - if (flag9 || npc.ai[0] == 10f || startSecondAI) - { - Color color47 = color43; - color47 = Color.Lerp(color47, color44, amount9); - color47 *= (num153 - num163) / 15f; - spriteBatch.Draw(texture2, vector44, npc.frame, color47, npc.rotation, vector11, npc.scale, spriteEffects, 0f); - } + amount9 = 1f; + num157 = 0.5f; + scaleFactor9 = 10f; + num154 = 1; - if (flag10 || npc.ai[0] == 17f) - { - Color color48 = color45; - color48 = Color.Lerp(color48, color46, amount9); - color48 *= (num153 - num163) / 15f; - spriteBatch.Draw(texture3, vector44, npc.frame, color48, npc.rotation, vector11, npc.scale, spriteEffects, 0f); - } - } + if (newPhasePhase) + { + float num161 = npc.ai[2] - num150; + num161 /= num151; + color36 *= num161; + color40 *= num161; - for (int num164 = 1; num164 < num156; num164++) - { - Color color42 = color40; - color42 = Color.Lerp(color42, color36, amount9); - color42 = npc.GetAlpha(color42); - color42 *= 1f - num157; - Vector2 vector45 = npc.Center + (num164 / (float)num156 * MathHelper.TwoPi + npc.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; - vector45 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; - vector45 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); - spriteBatch.Draw(texture, vector45, npc.frame, color42, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + if (flag9 || npc.ai[0] == 10f || startSecondAI) + { + color43 *= num161; + color44 *= num161; + } - if (flag9 || npc.ai[0] == 10f || startSecondAI) - { - Color color49 = color43; - color49 = Color.Lerp(color49, color44, amount9); - color49 = npc.GetAlpha(color49); - color49 *= 1f - num157; - spriteBatch.Draw(texture2, vector45, npc.frame, color49, npc.rotation, vector11, npc.scale, spriteEffects, 0f); - } + if (flag10 || npc.ai[0] == 17f) + { + color45 *= num161; + color46 *= num161; + } + } - if (flag10 || npc.ai[0] == 17f) - { - Color color50 = color45; - color50 = Color.Lerp(color50, color46, amount9); - color50 = npc.GetAlpha(color50); - color50 *= 1f - num157; - spriteBatch.Draw(texture3, vector45, npc.frame, color50, npc.rotation, vector11, npc.scale, spriteEffects, 0f); - } - } - } + if (pauseAfterTeleportPhase) + { + float num162 = npc.ai[2]; + num162 /= 30f; - spriteBatch.Draw(texture, vector43, npc.frame, color40, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + if (num162 > 0.5f) + num162 = 1f - num162; - if (flag9 || npc.ai[0] == 10f || startSecondAI) - spriteBatch.Draw(texture2, vector43, npc.frame, color43, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + num162 *= 2f; + num162 = 1f - num162; + color36 *= num162; + color40 *= num162; + color43 *= num162; + color44 *= num162; + color45 *= num162; + color46 *= num162; + } - if (flag10 || npc.ai[0] == 17f) - spriteBatch.Draw(texture3, vector43, npc.frame, color45, npc.rotation, vector11, npc.scale, spriteEffects, 0f); - } + if (CalamityConfig.Instance.Afterimages) + { + for (int num163 = 1; num163 < num153; num163 += num154) + { + Color color41 = color40; + color41 = Color.Lerp(color41, color36, amount9); + color41 *= (num153 - num163) / 15f; + Vector2 vector44 = npc.oldPos[num163] + new Vector2(npc.width, npc.height) / 2f - Main.screenPosition; + vector44 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + vector44 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); + spriteBatch.Draw(texture, vector44, npc.frame, color41, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + + if (flag9 || npc.ai[0] == 10f || startSecondAI) + { + Color color47 = color43; + color47 = Color.Lerp(color47, color44, amount9); + color47 *= (num153 - num163) / 15f; + spriteBatch.Draw(texture2, vector44, npc.frame, color47, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + } + + if (flag10 || npc.ai[0] == 17f) + { + Color color48 = color45; + color48 = Color.Lerp(color48, color46, amount9); + color48 *= (num153 - num163) / 15f; + spriteBatch.Draw(texture3, vector44, npc.frame, color48, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + } + } + + for (int num164 = 1; num164 < num156; num164++) + { + Color color42 = color40; + color42 = Color.Lerp(color42, color36, amount9); + color42 = npc.GetAlpha(color42); + color42 *= 1f - num157; + Vector2 vector45 = npc.Center + (num164 / (float)num156 * MathHelper.TwoPi + npc.rotation).ToRotationVector2() * scaleFactor9 * num157 - Main.screenPosition; + vector45 -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + vector45 += vector11 * npc.scale + new Vector2(0f, npc.gfxOffY); + spriteBatch.Draw(texture, vector45, npc.frame, color42, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + + if (flag9 || npc.ai[0] == 10f || startSecondAI) + { + Color color49 = color43; + color49 = Color.Lerp(color49, color44, amount9); + color49 = npc.GetAlpha(color49); + color49 *= 1f - num157; + spriteBatch.Draw(texture2, vector45, npc.frame, color49, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + } + + if (flag10 || npc.ai[0] == 17f) + { + Color color50 = color45; + color50 = Color.Lerp(color50, color46, amount9); + color50 = npc.GetAlpha(color50); + color50 *= 1f - num157; + spriteBatch.Draw(texture3, vector45, npc.frame, color50, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + } + } + } + + spriteBatch.Draw(texture, vector43, npc.frame, color40, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + + if (flag9 || npc.ai[0] == 10f || startSecondAI) + spriteBatch.Draw(texture2, vector43, npc.frame, color43, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + + if (flag10 || npc.ai[0] == 17f) + spriteBatch.Draw(texture3, vector43, npc.frame, color45, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + } return false; } - #endregion + #endregion - #region Loot - public override void NPCLoot() - { - CalamityGlobalNPC.SetNewShopVariable(new int[] { ModContent.NPCType() }, CalamityWorld.downedYharon); + #region Loot + public override void NPCLoot() + { + CalamityGlobalNPC.SetNewShopVariable(new int[] { ModContent.NPCType() }, CalamityWorld.downedYharon); - CalamityGlobalNPC.SetNewBossJustDowned(npc); + CalamityGlobalNPC.SetNewBossJustDowned(npc); - // Bags occur in either phase 1 or 2, as they don't contain phase 2 only drops - DropHelper.DropBags(npc); + // Bags occur in either phase 1 or 2, as they don't contain phase 2 only drops + DropHelper.DropBags(npc); // Normal drops: Everything that would otherwise be in the bag if (!Main.expertMode) @@ -2837,8 +2838,8 @@ namespace CalamityMod.NPCs.Yharon DropHelper.WeightStack(w), // Yharon Kindle Staff DropHelper.WeightStack(w), // Infernal Spear DropHelper.WeightStack(w), - DropHelper.WeightStack(w) - ); + DropHelper.WeightStack(w) + ); // Vanity DropHelper.DropItemChance(npc, ModContent.ItemType(), 7); @@ -2850,32 +2851,32 @@ namespace CalamityMod.NPCs.Yharon int soulFragMax = 22; DropHelper.DropItem(npc, ModContent.ItemType(), true, soulFragMin, soulFragMax); - // Equipment - DropHelper.DropItem(npc, ModContent.ItemType(), true); - DropHelper.DropItem(npc, ModContent.ItemType(), true); + // Equipment + DropHelper.DropItem(npc, ModContent.ItemType(), true); + DropHelper.DropItem(npc, ModContent.ItemType(), true); } // Vanity DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); - // Other - // DropHelper.DropItem(npc, ModContent.ItemType()); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedYharon); + // Other + // DropHelper.DropItem(npc, ModContent.ItemType()); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), true, !CalamityWorld.downedYharon); - // If Yharon has not been killed yet, notify players of Auric Ore - if (!CalamityWorld.downedYharon) - { - CalamityUtils.SpawnOre(ModContent.TileType(), 2E-05, 0.6f, 0.8f, 10, 20); + // If Yharon has not been killed yet, notify players of Auric Ore + if (!CalamityWorld.downedYharon) + { + CalamityUtils.SpawnOre(ModContent.TileType(), 2E-05, 0.6f, 0.8f, 10, 20); - string key = "Mods.CalamityMod.AuricOreText"; - Color messageColor = Color.Gold; - CalamityUtils.DisplayLocalizedText(key, messageColor); - } + string key = "Mods.CalamityMod.AuricOreText"; + Color messageColor = Color.Gold; + CalamityUtils.DisplayLocalizedText(key, messageColor); + } - // Mark Yharon as dead - CalamityWorld.downedYharon = true; - CalamityNetcode.SyncWorld(); - } + // Mark Yharon as dead + CalamityWorld.downedYharon = true; + CalamityNetcode.SyncWorld(); + } public override void BossLoot(ref string name, ref int potionType) { @@ -2883,16 +2884,16 @@ namespace CalamityMod.NPCs.Yharon } #endregion - #region On Hit Player - public override void OnHitPlayer(Player player, int damage, bool crit) - { - player.AddBuff(ModContent.BuffType(), 420, true); - } - #endregion + #region On Hit Player + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(ModContent.BuffType(), 420, true); + } + #endregion - #region Projectile Resists - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { + #region Projectile Resists + public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { if (projectile.type == ModContent.ProjectileType()) damage = (int)(damage * 0.85); if (projectile.type == ModContent.ProjectileType()) @@ -2900,10 +2901,10 @@ namespace CalamityMod.NPCs.Yharon if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) damage = (int)(damage * 0.95); } - #endregion + #endregion - #region HP Bar Cooldown Slot and Stats - public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + #region HP Bar Cooldown Slot and Stats + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) { scale = 2f; return null; @@ -2925,57 +2926,57 @@ namespace CalamityMod.NPCs.Yharon #region Find Frame public override void FindFrame(int frameHeight) { - bool idlePhases = (!startSecondAI && (npc.ai[0] == 0f || npc.ai[0] == 6f || npc.ai[0] == 13f)) || (startSecondAI && (npc.ai[0] == 5f || npc.ai[0] < 2f)); + bool idlePhases = (!startSecondAI && (npc.ai[0] == 0f || npc.ai[0] == 6f || npc.ai[0] == 13f)) || (startSecondAI && (npc.ai[0] == 5f || npc.ai[0] < 2f)); - bool chargingOrSpawnPhases = (!startSecondAI && (npc.ai[0] == 1f || npc.ai[0] == 5f || npc.ai[0] == 7f || npc.ai[0] == 11f || npc.ai[0] == 14f || npc.ai[0] == 18f)) || - (startSecondAI && (npc.ai[0] == 6f || npc.ai[0] == 2f || npc.ai[0] == 7f)); + bool chargingOrSpawnPhases = (!startSecondAI && (npc.ai[0] == 1f || npc.ai[0] == 5f || npc.ai[0] == 7f || npc.ai[0] == 11f || npc.ai[0] == 14f || npc.ai[0] == 18f)) || + (startSecondAI && (npc.ai[0] == 6f || npc.ai[0] == 2f || npc.ai[0] == 7f)); - bool projectileOrCirclePhases = (!startSecondAI && (npc.ai[0] == 2f || npc.ai[0] == 8f || npc.ai[0] == 12f || npc.ai[0] == 15f || npc.ai[0] == 19f || npc.ai[0] == 20f)) || - (startSecondAI && (npc.ai[0] == 4f || npc.ai[0] == 3f || npc.ai[0] == 8f)); + bool projectileOrCirclePhases = (!startSecondAI && (npc.ai[0] == 2f || npc.ai[0] == 8f || npc.ai[0] == 12f || npc.ai[0] == 15f || npc.ai[0] == 19f || npc.ai[0] == 20f)) || + (startSecondAI && (npc.ai[0] == 4f || npc.ai[0] == 3f || npc.ai[0] == 8f)); - bool tornadoPhase = !startSecondAI && (npc.ai[0] == 3f || npc.ai[0] == 9f || npc.ai[0] == -1f || npc.ai[0] == 16f); + bool tornadoPhase = !startSecondAI && (npc.ai[0] == 3f || npc.ai[0] == 9f || npc.ai[0] == -1f || npc.ai[0] == 16f); - bool newPhasePhase = (!startSecondAI && (npc.ai[0] == 4f || npc.ai[0] == 10f || npc.ai[0] == 17f)) || (startSecondAI && npc.ai[0] == 9f); + bool newPhasePhase = (!startSecondAI && (npc.ai[0] == 4f || npc.ai[0] == 10f || npc.ai[0] == 17f)) || (startSecondAI && npc.ai[0] == 9f); - bool chargeTelegraph = (!startSecondAI && (npc.ai[0] == 0f || npc.ai[0] == 6f || npc.ai[0] == 13f) && npc.localAI[1] > 0f) || - (startSecondAI && npc.ai[0] < 2f && npc.localAI[1] > 0f); + bool chargeTelegraph = (!startSecondAI && (npc.ai[0] == 0f || npc.ai[0] == 6f || npc.ai[0] == 13f) && npc.localAI[1] > 0f) || + (startSecondAI && npc.ai[0] < 2f && npc.localAI[1] > 0f); - if (chargeTelegraph) - { - // Percent life remaining - float lifeRatio = npc.life / (float)npc.lifeMax; + if (chargeTelegraph) + { + // Percent life remaining + float lifeRatio = npc.life / (float)npc.lifeMax; - if (CalamityWorld.revenge || CalamityWorld.malice || BossRushEvent.BossRushActive) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > npc.Calamity().killTimeRatio_IncreasedAggression) - lifeRatio = npc.Calamity().killTimeRatio_IncreasedAggression; - } + if (CalamityWorld.revenge || CalamityWorld.malice || BossRushEvent.BossRushActive) + { + // Increase aggression if player is taking a long time to kill the boss + if (lifeRatio > npc.Calamity().killTimeRatio_IncreasedAggression) + lifeRatio = npc.Calamity().killTimeRatio_IncreasedAggression; + } - bool doTelegraphFlightAnimation = npc.localAI[1] < fastChargeTelegraphTime * 0.5f || npc.localAI[1] > fastChargeTelegraphTime - (fastChargeTelegraphTime / 6f); - bool doTelegraphRoarAnimation = npc.localAI[1] > fastChargeTelegraphTime - fastChargeTelegraphTime * 0.4f && npc.localAI[1] < fastChargeTelegraphTime - fastChargeTelegraphTime * 0.2f; - bool phase4 = startSecondAI && lifeRatio <= ((CalamityWorld.death || BossRushEvent.BossRushActive || CalamityWorld.malice) ? 0.165f : 0.11f) && (CalamityWorld.revenge || BossRushEvent.BossRushActive || CalamityWorld.malice); - if (doTelegraphFlightAnimation) - { - npc.frameCounter += phase4 ? 2D : 1D; - if (npc.frameCounter > 5D) - { - npc.frameCounter = 0D; - npc.frame.Y += frameHeight; - } - if (npc.frame.Y >= frameHeight * 5) - npc.frame.Y = 0; - } - else - { - npc.frame.Y = frameHeight * 5; - if (doTelegraphRoarAnimation) - npc.frame.Y = frameHeight * 6; - } - return; - } + bool doTelegraphFlightAnimation = npc.localAI[1] < fastChargeTelegraphTime * 0.5f || npc.localAI[1] > fastChargeTelegraphTime - (fastChargeTelegraphTime / 6f); + bool doTelegraphRoarAnimation = npc.localAI[1] > fastChargeTelegraphTime - fastChargeTelegraphTime * 0.4f && npc.localAI[1] < fastChargeTelegraphTime - fastChargeTelegraphTime * 0.2f; + bool phase4 = startSecondAI && lifeRatio <= ((CalamityWorld.death || BossRushEvent.BossRushActive || CalamityWorld.malice) ? 0.165f : 0.11f) && (CalamityWorld.revenge || BossRushEvent.BossRushActive || CalamityWorld.malice); + if (doTelegraphFlightAnimation) + { + npc.frameCounter += phase4 ? 2D : 1D; + if (npc.frameCounter > 5D) + { + npc.frameCounter = 0D; + npc.frame.Y += frameHeight; + } + if (npc.frame.Y >= frameHeight * 5) + npc.frame.Y = 0; + } + else + { + npc.frame.Y = frameHeight * 5; + if (doTelegraphRoarAnimation) + npc.frame.Y = frameHeight * 6; + } + return; + } - if (idlePhases) + if (idlePhases) { int num84 = 5; if (!startSecondAI && (npc.ai[0] == 6f || npc.ai[0] == 13f)) From 3ace30c264b805735955e0bd81ddb80b5f46d4b0 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 25 Jan 2022 17:28:03 -0600 Subject: [PATCH 07/27] Removed Lead Core from Silva Armor's recipe --- Items/Armor/SilvaArmor.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Items/Armor/SilvaArmor.cs b/Items/Armor/SilvaArmor.cs index de9dd4cb95..27e04c2218 100644 --- a/Items/Armor/SilvaArmor.cs +++ b/Items/Armor/SilvaArmor.cs @@ -1,5 +1,3 @@ -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Tiles.Furniture.CraftingStations; @@ -16,8 +14,7 @@ namespace CalamityMod.Items.Armor { DisplayName.SetDefault("Silva Armor"); Tooltip.SetDefault("+80 max life\n" + - "12% increased damage and 8% increased critical strike chance\n" + - "Grants immunity to the irradiated debuff"); + "12% increased damage and 8% increased critical strike chance"); } public override void SetDefaults() @@ -35,13 +32,11 @@ namespace CalamityMod.Items.Armor player.statLifeMax2 += 80; player.allDamage += 0.12f; player.Calamity().AllCritBoost(8); - player.buffImmune[ModContent.BuffType()] = true; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 10); recipe.AddRecipeGroup("AnyGoldBar", 10); recipe.AddIngredient(ModContent.ItemType(), 12); From 36d08cc15ccac44c7237809982220f407f3481f5 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 25 Jan 2022 18:00:48 -0600 Subject: [PATCH 08/27] Artemis and Apollo share an HP bar --- NPCs/ExoMechs/Apollo/Apollo.cs | 4 +++- NPCs/ExoMechs/Artemis/Artemis.cs | 4 +++- UI/BossHealthBarManager.cs | 23 +++++++++++++++++++---- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index 17ca36db2f..9d0be10292 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -115,9 +115,11 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo // Primitive trail drawer for the ribbon things public PrimitiveTrail RibbonTrail = null; + public const string NameToDisplay = "XS-03 Apollo"; + public override void SetStaticDefaults() { - DisplayName.SetDefault("XS-03 Apollo"); + DisplayName.SetDefault(NameToDisplay); NPCID.Sets.TrailingMode[npc.type] = 3; NPCID.Sets.TrailCacheLength[npc.type] = 15; } diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index 4843c538a1..b4883b5053 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -127,9 +127,11 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // Primitive trail drawer for the ribbon things public PrimitiveTrail RibbonTrail = null; + public const string NameToDisplay = "XS-03 Artemis"; + public override void SetStaticDefaults() { - DisplayName.SetDefault("XS-01 Artemis"); + DisplayName.SetDefault(NameToDisplay); NPCID.Sets.TrailingMode[npc.type] = 3; NPCID.Sets.TrailCacheLength[npc.type] = 15; } diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index 6b5283214e..4c8e63b064 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -5,7 +5,9 @@ using CalamityMod.NPCs.Calamitas; using CalamityMod.NPCs.CeaselessVoid; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Apollo; using CalamityMod.NPCs.ExoMechs.Ares; +using CalamityMod.NPCs.ExoMechs.Artemis; using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.GreatSandShark; using CalamityMod.NPCs.NormalNPCs; @@ -370,9 +372,19 @@ namespace CalamityMod.UI return; // Do not attempt to create a new bar for an NPC that's already in the list of bars. - bool canAddBar = Main.npc[index].active && Main.npc[index].life > 0 && Bars.All(b => b.NPCIndex != index) && !Main.npc[index].Calamity().ShouldCloseHPBar; + NPC npc = Main.npc[index]; + bool canAddBar = npc.active && npc.life > 0 && Bars.All(b => b.NPCIndex != index) && !npc.Calamity().ShouldCloseHPBar; + + // SPECIAL CASE: Artemis and Apollo should be registered as one boss, as they share HP. + // Apollo is the only NPC to recieve a bar, with a special overriding name. + string overridingName = null; + if (npc.type == NPCType()) + canAddBar = false; + if (npc.type == NPCType()) + overridingName = $"{Artemis.NameToDisplay} and {Apollo.NameToDisplay}"; + if (canAddBar) - Bars.Add(new BossHPUI(index)); + Bars.Add(new BossHPUI(index, overridingName)); } public static void Draw(SpriteBatch sb) @@ -401,6 +413,7 @@ namespace CalamityMod.UI public long PreviousLife; public long HealthAtStartOfCombo; public long InitialMaxLife; + public string OverridingName = null; public NPC AssociatedNPC => Main.npc.IndexInRange(NPCIndex) ? Main.npc[NPCIndex] : null; public int NPCType => AssociatedNPC?.type ?? -1; public long CombinedNPCLife @@ -518,7 +531,7 @@ namespace CalamityMod.UI public static Color MainColor = new Color(229, 189, 62); public static Color MainBorderColour = new Color(197, 127, 46); - public BossHPUI(int index) + public BossHPUI(int index, string overridingName = null) { NPCIndex = index; @@ -532,6 +545,7 @@ namespace CalamityMod.UI IntendedNPCType = AssociatedNPC.type; PreviousLife = CombinedNPCLife; } + OverridingName = overridingName; } public void Update() @@ -607,7 +621,8 @@ namespace CalamityMod.UI CalamityUtils.DrawBorderStringEightWay(sb, HPBarFont, percentHealthText, new Vector2(x, y + 22 - textSize.Y), MainColor, MainBorderColour * 0.25f); // Draw a red back-glow of the text if the NPC is enraged. - string name = AssociatedNPC.FullName; + string name = OverridingName ?? AssociatedNPC.FullName; + Vector2 nameSize = Main.fontMouseText.MeasureString(name); if (EnrageTimer > 0) { From 547aee733aa24baee0105d04e825aa533d311a14 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 25 Jan 2022 18:32:01 -0600 Subject: [PATCH 09/27] Nerfed Exo Mechs/SCal damage values --- Utilities/NPCStats.cs | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Utilities/NPCStats.cs b/Utilities/NPCStats.cs index 3496afe2d4..01e84f69e1 100644 --- a/Utilities/NPCStats.cs +++ b/Utilities/NPCStats.cs @@ -756,37 +756,37 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 180, 300, 332, 348, 498 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 476, 696 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, // 25% increased damage in bullet hell 1 - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 450, 676, 712, 732, 1068 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 500, 752, 788, 808, 1182 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, // 25% increased damage in bullet hell 1 + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 569, 585, 854 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 601, 630, 646, 945 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 422, 444, 457, 667 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 422, 444, 457, 667 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 422, 444, 457, 667 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 422, 444, 457, 667 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 422, 444, 457, 667 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 500, 752, 788, 808, 1182 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 601, 630, 646, 945 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 450, 676, 712, 732, 1068 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 500, 752, 788, 808, 1182 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 569, 585, 854 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 601, 630, 646, 945 } }, { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossIceMist), new int[] { 400, 600, 632, 648, 948 } }, { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrbArc), new int[] { 500, 752, 788, 808, 1182 } }, From e17add5ed15b9516346c0968e756d7a6fe217abf Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 25 Jan 2022 18:33:48 -0600 Subject: [PATCH 10/27] Renamed Pitbulls --- CalamityLists.cs | 2 +- NPCs/CalamityGlobalAI.cs | 4 ++-- NPCs/CalamityGlobalNPC.cs | 2 +- NPCs/NormalNPCs/{Pitbull.cs => MutatedHound.cs} | 4 ++-- NPCs/NormalNPCs/{Pitbull.png => MutatedHound.png} | Bin Utilities/MiscUtils.cs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename NPCs/NormalNPCs/{Pitbull.cs => MutatedHound.cs} (96%) rename NPCs/NormalNPCs/{Pitbull.png => MutatedHound.png} (100%) diff --git a/CalamityLists.cs b/CalamityLists.cs index 03445ee35d..677f992882 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -772,7 +772,7 @@ namespace CalamityMod NPCType(), NPCType(), NPCType(), - NPCType(), + NPCType(), NPCType(), NPCType(), NPCType(), diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index abcb39188e..4effb3ff56 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -8102,7 +8102,7 @@ namespace CalamityMod.NPCs } } } - else if (npc.type == NPCID.Wolf || npc.type == NPCID.Hellhound || npc.type == ModContent.NPCType()) + else if (npc.type == NPCID.Wolf || npc.type == NPCID.Hellhound || npc.type == ModContent.NPCType()) { if (npc.velocity.Y == 0f && num4 < 100f && Math.Abs(npc.velocity.X) > 3f && ((npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) && npc.velocity.X > 0f) || (npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) && npc.velocity.X < 0f))) { @@ -8159,7 +8159,7 @@ namespace CalamityMod.NPCs float num7 = 0.1f; if (!flag && (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction < 0) || (npc.velocity.X >= 0f && npc.direction > 0))) { - if (npc.type == NPCID.Wolf || npc.type == ModContent.NPCType()) + if (npc.type == NPCID.Wolf || npc.type == ModContent.NPCType()) { if (npc.velocity.X > 0f && npc.direction < 0) { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 524edb45db..97a89c099e 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3387,7 +3387,7 @@ namespace CalamityMod.NPCs } break; case 26: - if (npc.type == NPCType()) + if (npc.type == NPCType()) { return CalamityGlobalAI.BuffedUnicornAI(npc, mod); } diff --git a/NPCs/NormalNPCs/Pitbull.cs b/NPCs/NormalNPCs/MutatedHound.cs similarity index 96% rename from NPCs/NormalNPCs/Pitbull.cs rename to NPCs/NormalNPCs/MutatedHound.cs index dcdf95dcaa..83079297c9 100644 --- a/NPCs/NormalNPCs/Pitbull.cs +++ b/NPCs/NormalNPCs/MutatedHound.cs @@ -6,11 +6,11 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.NPCs.NormalNPCs { - public class Pitbull : ModNPC + public class MutatedHound : ModNPC { public override void SetStaticDefaults() { - DisplayName.SetDefault("Pitbull"); + DisplayName.SetDefault("Mutated Hound"); Main.npcFrameCount[npc.type] = 10; } diff --git a/NPCs/NormalNPCs/Pitbull.png b/NPCs/NormalNPCs/MutatedHound.png similarity index 100% rename from NPCs/NormalNPCs/Pitbull.png rename to NPCs/NormalNPCs/MutatedHound.png diff --git a/Utilities/MiscUtils.cs b/Utilities/MiscUtils.cs index c84df23fda..6f41f0a748 100644 --- a/Utilities/MiscUtils.cs +++ b/Utilities/MiscUtils.cs @@ -882,7 +882,7 @@ namespace CalamityMod npc = ModContent.NPCType(); break; case 53: - npc = ModContent.NPCType(); + npc = ModContent.NPCType(); break; case 54: npc = ModContent.NPCType(); From 0ce9abf2dd4205b7237191f780d8b98c61267b1f Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 25 Jan 2022 18:35:44 -0600 Subject: [PATCH 11/27] Revert "Made Charred Idol craftable at a mythril anvil" This reverts commit d5cd7b804052b093dfcee28353d00f10a1a86c90. --- Items/SummonItems/CharredIdol.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Items/SummonItems/CharredIdol.cs b/Items/SummonItems/CharredIdol.cs index ed3d132efa..5b71c87e1a 100644 --- a/Items/SummonItems/CharredIdol.cs +++ b/Items/SummonItems/CharredIdol.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Items.SummonItems { DisplayName.SetDefault("Charred Idol"); Tooltip.SetDefault("Use at your own risk\n" + - "Summons the Brimstone Elemental when used in the brimstone crags\n" + - "Not consumable"); + "Summons the Brimstone Elemental when used in the brimstone crags\n" + + "Not consumable"); } public override void SetDefaults() @@ -38,12 +38,12 @@ namespace CalamityMod.Items.SummonItems public override bool UseItem(Player player) { Main.PlaySound(SoundID.Roar, player.position, 0); - if (Main.netMode != NetmodeID.MultiplayerClient) - NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); - else - NetMessage.SendData(MessageID.SpawnBoss, -1, -1, null, player.whoAmI, ModContent.NPCType()); + if (Main.netMode != NetmodeID.MultiplayerClient) + NPC.SpawnOnPlayer(player.whoAmI, ModContent.NPCType()); + else + NetMessage.SendData(MessageID.SpawnBoss, -1, -1, null, player.whoAmI, ModContent.NPCType()); - return true; + return true; } public override void AddRecipes() @@ -51,8 +51,8 @@ namespace CalamityMod.Items.SummonItems ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.SoulofNight, 5); recipe.AddIngredient(ModContent.ItemType(), 7); - recipe.AddIngredient(ModContent.ItemType(), 2); - recipe.AddTile(TileID.MythrilAnvil); + recipe.AddIngredient(ModContent.ItemType(), 2); + recipe.AddTile(TileID.AdamantiteForge); recipe.SetResult(this); recipe.AddRecipe(); } From 7690a23f88a895c108dd09f63990de942ecf47ae Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 25 Jan 2022 21:58:33 -0600 Subject: [PATCH 12/27] Revert "Nerfed Exo Mechs/SCal damage values" This reverts commit db1a37175c4b442237c463b2d1aa216f508c8464. --- Utilities/NPCStats.cs | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Utilities/NPCStats.cs b/Utilities/NPCStats.cs index 01e84f69e1..3496afe2d4 100644 --- a/Utilities/NPCStats.cs +++ b/Utilities/NPCStats.cs @@ -756,37 +756,37 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 180, 300, 332, 348, 498 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 476, 696 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, // 25% increased damage in bullet hell 1 - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 569, 585, 854 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 601, 630, 646, 945 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 422, 444, 457, 667 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 422, 444, 457, 667 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 422, 444, 457, 667 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 422, 444, 457, 667 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 422, 444, 457, 667 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, // 25% increased damage in bullet hell 1 + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 450, 676, 712, 732, 1068 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 500, 752, 788, 808, 1182 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 601, 630, 646, 945 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 500, 752, 788, 808, 1182 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 360, 540, 569, 585, 854 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 505, 518, 758 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 256, 384, 403, 425, 619 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 601, 630, 646, 945 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 450, 676, 712, 732, 1068 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 320, 480, 504, 532, 774 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 500, 752, 788, 808, 1182 } }, { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossIceMist), new int[] { 400, 600, 632, 648, 948 } }, { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrbArc), new int[] { 500, 752, 788, 808, 1182 } }, From 984c1105dd0a6745a60b21b5692da0de3890626a Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 25 Jan 2022 22:00:08 -0600 Subject: [PATCH 13/27] One, not three --- NPCs/ExoMechs/Artemis/Artemis.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index b4883b5053..0d833a2f24 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // Primitive trail drawer for the ribbon things public PrimitiveTrail RibbonTrail = null; - public const string NameToDisplay = "XS-03 Artemis"; + public const string NameToDisplay = "XS-01 Artemis"; public override void SetStaticDefaults() { From 048983a0500785b9b0252d182462ad1bfab03d0e Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 25 Jan 2022 22:07:42 -0600 Subject: [PATCH 14/27] Pitbull rename again --- CalamityLists.cs | 2 +- NPCs/CalamityGlobalAI.cs | 4 ++-- NPCs/CalamityGlobalNPC.cs | 2 +- NPCs/NormalNPCs/{MutatedHound.cs => Rotdog.cs} | 4 ++-- Utilities/MiscUtils.cs | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename NPCs/NormalNPCs/{MutatedHound.cs => Rotdog.cs} (96%) diff --git a/CalamityLists.cs b/CalamityLists.cs index 677f992882..095bd4b54c 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -772,7 +772,7 @@ namespace CalamityMod NPCType(), NPCType(), NPCType(), - NPCType(), + NPCType(), NPCType(), NPCType(), NPCType(), diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 4effb3ff56..ccc872673a 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -8102,7 +8102,7 @@ namespace CalamityMod.NPCs } } } - else if (npc.type == NPCID.Wolf || npc.type == NPCID.Hellhound || npc.type == ModContent.NPCType()) + else if (npc.type == NPCID.Wolf || npc.type == NPCID.Hellhound || npc.type == ModContent.NPCType()) { if (npc.velocity.Y == 0f && num4 < 100f && Math.Abs(npc.velocity.X) > 3f && ((npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) && npc.velocity.X > 0f) || (npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) && npc.velocity.X < 0f))) { @@ -8159,7 +8159,7 @@ namespace CalamityMod.NPCs float num7 = 0.1f; if (!flag && (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction < 0) || (npc.velocity.X >= 0f && npc.direction > 0))) { - if (npc.type == NPCID.Wolf || npc.type == ModContent.NPCType()) + if (npc.type == NPCID.Wolf || npc.type == ModContent.NPCType()) { if (npc.velocity.X > 0f && npc.direction < 0) { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 97a89c099e..f607100113 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3387,7 +3387,7 @@ namespace CalamityMod.NPCs } break; case 26: - if (npc.type == NPCType()) + if (npc.type == NPCType()) { return CalamityGlobalAI.BuffedUnicornAI(npc, mod); } diff --git a/NPCs/NormalNPCs/MutatedHound.cs b/NPCs/NormalNPCs/Rotdog.cs similarity index 96% rename from NPCs/NormalNPCs/MutatedHound.cs rename to NPCs/NormalNPCs/Rotdog.cs index 83079297c9..bcfd7d5592 100644 --- a/NPCs/NormalNPCs/MutatedHound.cs +++ b/NPCs/NormalNPCs/Rotdog.cs @@ -6,11 +6,11 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.NPCs.NormalNPCs { - public class MutatedHound : ModNPC + public class Rotdog : ModNPC { public override void SetStaticDefaults() { - DisplayName.SetDefault("Mutated Hound"); + DisplayName.SetDefault("Rotdog"); Main.npcFrameCount[npc.type] = 10; } diff --git a/Utilities/MiscUtils.cs b/Utilities/MiscUtils.cs index 6f41f0a748..6165a3bed8 100644 --- a/Utilities/MiscUtils.cs +++ b/Utilities/MiscUtils.cs @@ -882,7 +882,7 @@ namespace CalamityMod npc = ModContent.NPCType(); break; case 53: - npc = ModContent.NPCType(); + npc = ModContent.NPCType(); break; case 54: npc = ModContent.NPCType(); From a2ebe244df96638ff6cc1ec0faf95d4f28697e4a Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 26 Jan 2022 11:26:46 -0500 Subject: [PATCH 15/27] 1 - Yharon's kill time 4:15 --> 4:05 2 - Wrote human-readable kill times in comments next to the frame data --- CalamityMod.cs | 118 ++++++++++++++++++++++++++----------------------- 1 file changed, 63 insertions(+), 55 deletions(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index c8afc7179d..15345ed5d3 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -582,88 +582,96 @@ namespace CalamityMod #region Boss Kill Times private void SetupBossKillTimes() { - // 3600 = 1 minute - + // Kill times are measured exactly in frames. + // 60 frames = 1 second + // 3600 frames = 1 minute bossKillTimes = new SortedDictionary { - { NPCID.KingSlime, 3600 }, - { NPCID.EyeofCthulhu, 5400 }, - { NPCID.EaterofWorldsHead, 7200 }, + // + // VANILLA BOSSES + // + { NPCID.KingSlime, 3600 }, // 1:00 (60 seconds) + { NPCID.EyeofCthulhu, 5400 }, // 1:30 (90 seconds) + { NPCID.EaterofWorldsHead, 7200 }, // 2:00 (120 seconds) { NPCID.EaterofWorldsBody, 7200 }, { NPCID.EaterofWorldsTail, 7200 }, - { NPCID.BrainofCthulhu, 5400 }, - { NPCID.Creeper, 1800 }, - { NPCID.QueenBee, 7200 }, - { NPCID.SkeletronHead, 7200 }, - { NPCID.WallofFlesh, 7200 }, + { NPCID.BrainofCthulhu, 5400 }, // 1:30 (90 seconds) + { NPCID.Creeper, 1800 }, // 0:30 (30 seconds) + { NPCID.QueenBee, 7200 }, // 2:00 (120 seconds) + { NPCID.SkeletronHead, 7200 }, // 2:00 (120 seconds) + { NPCID.WallofFlesh, 7200 }, // 2:00 (120 seconds) { NPCID.WallofFleshEye, 7200 }, - { NPCID.Spazmatism, 10800 }, + { NPCID.Spazmatism, 10800 }, // 3:00 (180 seconds) { NPCID.Retinazer, 10800 }, - { NPCID.TheDestroyer, 10800 }, + { NPCID.TheDestroyer, 10800 }, // 3:00 (180 seconds) { NPCID.TheDestroyerBody, 10800 }, { NPCID.TheDestroyerTail, 10800 }, - { NPCID.SkeletronPrime, 10800 }, - { NPCID.Plantera, 10800 }, - { NPCID.Golem, 9000 }, - { NPCID.GolemHead, 3600 }, - { NPCID.DukeFishron, 9000 }, - { NPCID.CultistBoss, 9000 }, - { NPCID.MoonLordCore, 14400 }, - { NPCID.MoonLordHand, 7200 }, - { NPCID.MoonLordHead, 7200 }, - { ModContent.NPCType(), 3600 }, + { NPCID.SkeletronPrime, 10800 }, // 3:00 (180 seconds) + { NPCID.Plantera, 10800 }, // 3:00 (180 seconds) + { NPCID.Golem, 9000 }, // 2:30 (150 seconds) + { NPCID.GolemHead, 3600 }, // 1:00 (60 seconds) + { NPCID.DukeFishron, 9000 }, // 2:30 (150 seconds) + { NPCID.CultistBoss, 9000 }, // 2:30 (150 seconds) + { NPCID.MoonLordCore, 14400 }, // 4:00 (240 seconds) + { NPCID.MoonLordHand, 7200 }, // 2:00 (120 seconds) + { NPCID.MoonLordHead, 7200 }, // 2:00 (120 seconds) + + // + // CALAMITY BOSSES + // + { ModContent.NPCType(), 3600 }, // 1:00 (60 seconds) { ModContent.NPCType(), 3600 }, { ModContent.NPCType(), 3600 }, - { ModContent.NPCType(), 5400 }, - { ModContent.NPCType(), 7200 }, - { ModContent.NPCType(), 7200 }, - { ModContent.NPCType(), 10800 }, - { ModContent.NPCType(), 5400 }, - { ModContent.NPCType(), 5400 }, - { ModContent.NPCType(), 5400 }, - { ModContent.NPCType(), 5400 }, - { ModContent.NPCType(), 10800 }, - { ModContent.NPCType(), 7200 }, + { ModContent.NPCType(), 5400 }, // 1:30 (90 seconds) + { ModContent.NPCType(), 7200 }, // 2:00 (120 seconds) + { ModContent.NPCType(), 7200 }, // 2:00 (120 seconds) + { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) + { ModContent.NPCType(), 5400 }, // 1:30 (90 seconds) + { ModContent.NPCType(), 5400 }, // 1:30 (90 seconds) + { ModContent.NPCType(), 5400 }, // 1:30 (90 seconds) + { ModContent.NPCType(), 5400 }, // 1:30 (90 seconds) + { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) + { ModContent.NPCType(), 7200 }, // 2:00 (120 seconds) { ModContent.NPCType(), 7200 }, { ModContent.NPCType(), 7200 }, { ModContent.NPCType(), 7200 }, - { ModContent.NPCType(), 10800 }, - { ModContent.NPCType(), 14400 }, - { ModContent.NPCType(), 10800 }, + { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) + { ModContent.NPCType(), 14400 }, // 4:00 (240 seconds) + { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) { ModContent.NPCType(), 10800 }, - { ModContent.NPCType(), 10800 }, - { ModContent.NPCType(), 7200 }, + { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) + { ModContent.NPCType(), 7200 }, // 2:00 (120 seconds) { ModContent.NPCType(), 7200 }, { ModContent.NPCType(), 7200 }, - { ModContent.NPCType(), 10800 }, - { ModContent.NPCType(), 10800 }, - { ModContent.NPCType(), 5400 }, - { ModContent.NPCType(), 7200 }, - { ModContent.NPCType(), 14400 }, - { ModContent.NPCType(), 10800 }, - { ModContent.NPCType(), 1200 }, - { ModContent.NPCType(), 8100 }, + { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) + { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) + { ModContent.NPCType(), 5400 }, // 1:30 (90 seconds) + { ModContent.NPCType(), 7200 }, // 2:00 (120 seconds) + { ModContent.NPCType(), 14400 }, // 4:00 (240 seconds) + { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) + { ModContent.NPCType(), 1200 }, // 0:20 (20 seconds) + { ModContent.NPCType(), 8100 }, // 2:15 (135 seconds) { ModContent.NPCType(), 8100 }, { ModContent.NPCType(), 8100 }, - { ModContent.NPCType(), 7200 }, - { ModContent.NPCType(), 10800 }, - { ModContent.NPCType(), 10800 }, - { ModContent.NPCType(), 14400 }, + { ModContent.NPCType(), 7200 }, // 2:00 (120 seconds) + { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) + { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) + { ModContent.NPCType(), 14400 }, // 4:00 (240 seconds) { ModContent.NPCType(), 14400 }, { ModContent.NPCType(), 14400 }, - { ModContent.NPCType(), 15300 }, - { ModContent.NPCType(), 18000 }, - { ModContent.NPCType(), 21600 }, + { ModContent.NPCType(), 14700 }, // 4:05 (245 seconds) -- he spends 5 seconds invincible where you can't do anything + { ModContent.NPCType(), 18000 }, // 5:00 (300 seconds) + { ModContent.NPCType(), 21600 }, // 6:00 (360 seconds) { ModContent.NPCType(), 21600 }, - { ModContent.NPCType(), 21600 }, + { ModContent.NPCType(), 21600 }, // 6:00 (360 seconds) { ModContent.NPCType(), 21600 }, { ModContent.NPCType(), 21600 }, { ModContent.NPCType(), 21600 }, { ModContent.NPCType(), 21600 }, - { ModContent.NPCType(), 21600 }, + { ModContent.NPCType(), 21600 }, // 6:00 (360 seconds) { ModContent.NPCType(), 21600 }, { ModContent.NPCType(), 21600 }, { ModContent.NPCType(), 21600 }, - { ModContent.NPCType(), 18000 } + { ModContent.NPCType(), 18000 } // 5:00 (300 seconds) }; } #endregion From b31bd2c582f1db1a6450cc7402c09b9548af85b8 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 26 Jan 2022 11:46:53 -0500 Subject: [PATCH 16/27] Further documentation and slight corrections to kill times. --- CalamityMod.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/CalamityMod.cs b/CalamityMod.cs index 15345ed5d3..2fbc73563e 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -597,7 +597,7 @@ namespace CalamityMod { NPCID.BrainofCthulhu, 5400 }, // 1:30 (90 seconds) { NPCID.Creeper, 1800 }, // 0:30 (30 seconds) { NPCID.QueenBee, 7200 }, // 2:00 (120 seconds) - { NPCID.SkeletronHead, 7200 }, // 2:00 (120 seconds) + { NPCID.SkeletronHead, 9000 }, // 2:30 (150 seconds) { NPCID.WallofFlesh, 7200 }, // 2:00 (120 seconds) { NPCID.WallofFleshEye, 7200 }, { NPCID.Spazmatism, 10800 }, // 3:00 (180 seconds) @@ -624,11 +624,11 @@ namespace CalamityMod { ModContent.NPCType(), 5400 }, // 1:30 (90 seconds) { ModContent.NPCType(), 7200 }, // 2:00 (120 seconds) { ModContent.NPCType(), 7200 }, // 2:00 (120 seconds) - { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) - { ModContent.NPCType(), 5400 }, // 1:30 (90 seconds) - { ModContent.NPCType(), 5400 }, // 1:30 (90 seconds) - { ModContent.NPCType(), 5400 }, // 1:30 (90 seconds) - { ModContent.NPCType(), 5400 }, // 1:30 (90 seconds) + { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) -- total length of Slime God fight + { ModContent.NPCType(), 3600 }, // 1:00 (60 seconds) + { ModContent.NPCType(), 3600 }, // 1:00 (60 seconds) + { ModContent.NPCType(), 3600 }, // 1:00 (60 seconds) -- split slimes should spawn at 1:00 and die at around 2:00 + { ModContent.NPCType(), 3600 }, // 1:00 (60 seconds) { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) { ModContent.NPCType(), 7200 }, // 2:00 (120 seconds) { ModContent.NPCType(), 7200 }, @@ -636,10 +636,10 @@ namespace CalamityMod { ModContent.NPCType(), 7200 }, { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) { ModContent.NPCType(), 14400 }, // 4:00 (240 seconds) - { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) - { ModContent.NPCType(), 10800 }, + { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) + { ModContent.NPCType(), 10800 }, { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) - { ModContent.NPCType(), 7200 }, // 2:00 (120 seconds) + { ModContent.NPCType(), 7200 }, // 2:00 (120 seconds) -- first phase is 1:00 { ModContent.NPCType(), 7200 }, { ModContent.NPCType(), 7200 }, { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) @@ -656,10 +656,9 @@ namespace CalamityMod { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) { ModContent.NPCType(), 10800 }, // 3:00 (180 seconds) { ModContent.NPCType(), 14400 }, // 4:00 (240 seconds) - { ModContent.NPCType(), 14400 }, - { ModContent.NPCType(), 14400 }, + { ModContent.NPCType(), 14400 }, // NOTE: Sentinels Phase takes 1:00, so with that included it's 5:00 + { ModContent.NPCType(), 14400 }, // DoG Phase 1 is 1:30, DoG Phase 2 is 2:30 { ModContent.NPCType(), 14700 }, // 4:05 (245 seconds) -- he spends 5 seconds invincible where you can't do anything - { ModContent.NPCType(), 18000 }, // 5:00 (300 seconds) { ModContent.NPCType(), 21600 }, // 6:00 (360 seconds) { ModContent.NPCType(), 21600 }, { ModContent.NPCType(), 21600 }, // 6:00 (360 seconds) @@ -671,6 +670,7 @@ namespace CalamityMod { ModContent.NPCType(), 21600 }, { ModContent.NPCType(), 21600 }, { ModContent.NPCType(), 21600 }, + { ModContent.NPCType(), 18000 }, // 5:00 (300 seconds) { ModContent.NPCType(), 18000 } // 5:00 (300 seconds) }; } From 61f42bff37f5da203d10366f515858b53b0cd7e4 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 26 Jan 2022 11:49:27 -0500 Subject: [PATCH 17/27] fix Rotdog texture not being properly named --- NPCs/NormalNPCs/{MutatedHound.png => Rotdog.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename NPCs/NormalNPCs/{MutatedHound.png => Rotdog.png} (100%) diff --git a/NPCs/NormalNPCs/MutatedHound.png b/NPCs/NormalNPCs/Rotdog.png similarity index 100% rename from NPCs/NormalNPCs/MutatedHound.png rename to NPCs/NormalNPCs/Rotdog.png From 60b09b69615a8360f9cc4f92539d2c9f530b79e9 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 26 Jan 2022 10:56:07 -0600 Subject: [PATCH 18/27] 1 - Fixed some dust errors. 2 - Removed kill time ratio increased AI aggression. --- NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs | 7 -- NPCs/Bumblebirb/Bumblefuck.cs | 14 ---- NPCs/CalamityAI.cs | 70 ------------------- NPCs/CalamityGlobalNPC.cs | 10 --- NPCs/Crabulon/CrabulonIdle.cs | 7 -- NPCs/Cryogen/Cryogen.cs | 7 -- NPCs/DesertScourge/DesertScourgeHead.cs | 7 -- NPCs/DevourerofGods/DevourerofGodsHead.cs | 10 +-- NPCs/HiveMind/HiveMind.cs | 7 -- NPCs/Leviathan/AquaticAberration.cs | 7 -- NPCs/Leviathan/Leviathan.cs | 7 -- NPCs/Leviathan/Siren.cs | 7 -- NPCs/Perforator/PerforatorHeadLarge.cs | 7 -- NPCs/Perforator/PerforatorHeadMedium.cs | 7 -- NPCs/Perforator/PerforatorHeadSmall.cs | 7 -- NPCs/Perforator/PerforatorHive.cs | 7 -- .../PlaguebringerGoliath.cs | 7 -- NPCs/Polterghast/Polterghast.cs | 14 ---- NPCs/Polterghast/PolterghastHook.cs | 7 -- .../ProfanedGuardians/ProfanedGuardianBoss.cs | 7 -- NPCs/Providence/Providence.cs | 7 -- NPCs/Ravager/RavagerBody.cs | 7 -- NPCs/Signus/Signus.cs | 7 -- NPCs/SlimeGod/SlimeGod.cs | 7 -- NPCs/SlimeGod/SlimeGodCore.cs | 7 -- NPCs/SlimeGod/SlimeGodRun.cs | 7 -- NPCs/SlimeGod/SlimeGodRunSplit.cs | 7 -- NPCs/SlimeGod/SlimeGodSplit.cs | 7 -- NPCs/StormWeaver/StormWeaverHead.cs | 7 -- .../Bosses/BrainOfCthulhuAI.cs | 4 -- NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs | 12 +--- .../VanillaNPCOverrides/Bosses/DestroyerAI.cs | 6 +- .../Bosses/DukeFishronAI.cs | 6 +- .../Bosses/EaterOfWorldsAI.cs | 4 -- .../Bosses/EyeOfCthulhuAI.cs | 6 +- NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs | 10 +-- .../VanillaNPCOverrides/Bosses/KingSlimeAI.cs | 4 -- NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs | 4 -- NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs | 6 +- .../VanillaNPCOverrides/Bosses/SkeletronAI.cs | 4 -- .../Bosses/SkeletronPrimeAI.cs | 4 -- NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs | 8 --- .../Bosses/WallOfFleshAI.cs | 10 +-- .../Melee/BrokenBiomeBladeProjectiles.cs | 4 +- .../Melee/MendedBiomeBladeProjectiles.cs | 14 ++-- .../Melee/TrueBiomeBladeProjectiles.cs | 4 +- 46 files changed, 20 insertions(+), 376 deletions(-) diff --git a/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs b/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs index ebb4c5aaa8..1200b303cd 100644 --- a/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs +++ b/NPCs/AdultEidolonWyrm/EidolonWyrmHeadHuge.cs @@ -151,13 +151,6 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases bool phase2 = lifeRatio < 0.8f; bool phase3 = lifeRatio < 0.6f; diff --git a/NPCs/Bumblebirb/Bumblefuck.cs b/NPCs/Bumblebirb/Bumblefuck.cs index 859677eafc..88ba0ab8cf 100644 --- a/NPCs/Bumblebirb/Bumblefuck.cs +++ b/NPCs/Bumblebirb/Bumblefuck.cs @@ -107,13 +107,6 @@ namespace CalamityMod.NPCs.Bumblebirb // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases bool phase2 = lifeRatio < (revenge ? 0.75f : 0.5f) || death; bool phase3 = lifeRatio < (death ? 0.4f : revenge ? 0.25f : 0.1f); @@ -199,13 +192,6 @@ namespace CalamityMod.NPCs.Bumblebirb // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases bool phase2 = lifeRatio < (revenge ? 0.75f : 0.5f) || death; bool phase3 = lifeRatio < (death ? 0.4f : revenge ? 0.25f : 0.1f); diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 2bbcd4a65a..ce1a306c76 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -62,13 +62,6 @@ namespace CalamityMod.NPCs // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases bool phase2 = lifeRatio < 0.75f; bool phase3 = lifeRatio < 0.5f; @@ -703,13 +696,6 @@ namespace CalamityMod.NPCs bool revenge = CalamityWorld.revenge || malice; bool death = CalamityWorld.death || malice; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - bool phase2 = lifeRatio < 0.5f && revenge; bool phase3 = lifeRatio < 0.33f; @@ -1254,13 +1240,6 @@ namespace CalamityMod.NPCs // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases bool phase3 = lifeRatio < 0.7f; bool phase4 = lifeRatio < 0.35f; @@ -2046,13 +2025,6 @@ namespace CalamityMod.NPCs bool expertMode = Main.expertMode || malice; bool provy = CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Get a target if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) npc.TargetClosest(); @@ -2335,13 +2307,6 @@ namespace CalamityMod.NPCs bool expertMode = Main.expertMode || malice; bool provy = CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Get a target if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) npc.TargetClosest(); @@ -2623,13 +2588,6 @@ namespace CalamityMod.NPCs bool revenge = CalamityWorld.revenge || malice; bool death = CalamityWorld.death || malice; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - float shootTimer = 1f; if (expertMode) shootTimer += death ? (float)Math.Round(3f * (1f - lifeRatio)) : (float)Math.Round(2f * (1f - lifeRatio)); @@ -3316,13 +3274,6 @@ namespace CalamityMod.NPCs // Life float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases based on life percentage bool halfHealth = npc.life / (float)npc.lifeMax < 0.5f; bool doubleWormPhase = calamityGlobalNPC.newAI[0] != 0f; @@ -4013,13 +3964,6 @@ namespace CalamityMod.NPCs bool revenge = CalamityWorld.revenge || malice; bool death = CalamityWorld.death || malice; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases bool phase2 = lifeRatio <= 0.7; bool phase3 = lifeRatio <= 0.4; @@ -4675,13 +4619,6 @@ namespace CalamityMod.NPCs // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases bool phase2 = lifeRatio < (revenge ? 0.75f : 0.5f); bool phase3 = lifeRatio < (death ? 0.4f : revenge ? 0.25f : 0.1f) && expertMode; @@ -5496,13 +5433,6 @@ namespace CalamityMod.NPCs bool revenge = CalamityWorld.revenge || malice; bool death = CalamityWorld.death || malice; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - bool phase2 = lifeRatio <= (death ? 0.8f : revenge ? 0.7f : 0.5f); bool phase3 = lifeRatio <= (death ? 0.5f : (revenge ? 0.35f : 0.2f)) && expertMode; bool phase2AI = npc.ai[0] > 4f; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 524edb45db..3631781aef 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -168,8 +168,6 @@ namespace CalamityMod.NPCs internal const int maxAIMod = 4; public float[] newAI = new float[maxAIMod]; public int AITimer = 0; - public int AIIncreasedAggressionTimer = 0; - public float killTimeRatio_IncreasedAggression = 0f; // Town NPC Patreon public bool setNewName = true; @@ -2753,14 +2751,6 @@ namespace CalamityMod.NPCs { if (AITimer < KillTime) AITimer++; - - // Separate timer for aggression to avoid entering later phases too quickly - int aggressionTimerCap = (int)(KillTime * 1.5); - if (AIIncreasedAggressionTimer < aggressionTimerCap) - AIIncreasedAggressionTimer++; - - // Increases aggression over time if the fight is taking too long - killTimeRatio_IncreasedAggression = 1f - (AIIncreasedAggressionTimer / (float)aggressionTimerCap); } } diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index aa0c332e85..16e34216e3 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -90,13 +90,6 @@ namespace CalamityMod.NPCs.Crabulon // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases bool phase2 = lifeRatio < 0.66f && expertMode; bool phase3 = lifeRatio < 0.33f && expertMode; diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 684d48bd2e..2cb2a85991 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -140,13 +140,6 @@ namespace CalamityMod.NPCs.Cryogen // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases bool phase2 = lifeRatio < (revenge ? 0.85f : 0.8f); bool phase3 = lifeRatio < (revenge ? 0.7f : 0.6f); diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index 19acf6793f..d353516109 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -129,13 +129,6 @@ namespace CalamityMod.NPCs.DesertScourge // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - if (revenge || lifeRatio < (expertMode ? 0.75f : 0.5f)) npc.Calamity().newAI[0] += 1f; diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index a6b82e240f..57505549a5 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -272,13 +272,6 @@ namespace CalamityMod.NPCs.DevourerofGods // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phase 1 phases bool phase2 = lifeRatio < 0.9f; bool phase3 = lifeRatio < 0.68f; @@ -371,9 +364,8 @@ namespace CalamityMod.NPCs.DevourerofGods { Phase2Started = true; - // Timed DR and aggression + // Timed DR calamityGlobalNPC.AITimer = CalamityGlobalNPC.DoGPhase1KillTime; - calamityGlobalNPC.AIIncreasedAggressionTimer = CalamityGlobalNPC.DoGPhase1KillTime; // Reset important shit npc.ai[3] = 0f; diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 04e69f8c0d..b6a897835f 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -361,13 +361,6 @@ namespace CalamityMod.NPCs.HiveMind // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Enrage if ((!player.ZoneCorrupt || (npc.position.Y / 16f) < Main.worldSurface) && !BossRushEvent.BossRushActive) { diff --git a/NPCs/Leviathan/AquaticAberration.cs b/NPCs/Leviathan/AquaticAberration.cs index 306e81b406..e70a1e8a57 100644 --- a/NPCs/Leviathan/AquaticAberration.cs +++ b/NPCs/Leviathan/AquaticAberration.cs @@ -82,13 +82,6 @@ namespace CalamityMod.NPCs.Leviathan // Percent life remaining float lifeRatio = Main.npc[CalamityGlobalNPC.leviathan].life / (float)Main.npc[CalamityGlobalNPC.leviathan].lifeMax; - if (CalamityWorld.revenge || CalamityWorld.malice || BossRushEvent.BossRushActive || Main.npc[CalamityGlobalNPC.leviathan].Calamity().enraged > 0) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > Main.npc[CalamityGlobalNPC.leviathan].Calamity().killTimeRatio_IncreasedAggression) - lifeRatio = Main.npc[CalamityGlobalNPC.leviathan].Calamity().killTimeRatio_IncreasedAggression; - } - // Phases bool leviathanInPhase4 = lifeRatio < 0.2f; diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index b307847d36..1e6c54d8bb 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -112,13 +112,6 @@ namespace CalamityMod.NPCs.Leviathan // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases bool phase2 = lifeRatio < 0.7f && expertMode; bool phase3 = lifeRatio < 0.4f; diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index c3a9907d5b..b80a6fd9c9 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -150,13 +150,6 @@ namespace CalamityMod.NPCs.Leviathan float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - float bubbleVelocity = death ? 9f : revenge ? 7f : expertMode ? 6f : 5f; bubbleVelocity += 4f * enrageScale; if (!leviAlive) diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index 37b61286a4..da21a770a6 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -101,13 +101,6 @@ namespace CalamityMod.NPCs.Perforator // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - if (revenge || lifeRatio < (expertMode ? 0.75f : 0.5f)) npc.Calamity().newAI[0] += 1f; diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index b7fe06f677..c162f7aa4c 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -75,13 +75,6 @@ namespace CalamityMod.NPCs.Perforator // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - float speed = 8f; float turnSpeed = 0.06f; diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index 2b35d915a1..d137fa6e7e 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -97,13 +97,6 @@ namespace CalamityMod.NPCs.Perforator // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - float speed = 0.15f; float turnSpeed = 0.1f; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index c867e1efca..3893e47fd6 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -123,13 +123,6 @@ namespace CalamityMod.NPCs.Perforator // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases based on life percentage bool phase2 = lifeRatio < 0.7f; diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index c74c9ef2b0..5ea79a0fcf 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -122,13 +122,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases bool phase2 = lifeRatio < 0.75f; bool phase3 = lifeRatio < 0.5f; diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index e467a755e0..a3f5050262 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -151,13 +151,6 @@ namespace CalamityMod.NPCs.Polterghast bool revenge = CalamityWorld.revenge || malice; bool expertMode = Main.expertMode || malice; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Phases bool phase2 = lifeRatio < (death ? 0.9f : revenge ? 0.8f : expertMode ? 0.65f : 0.5f); bool phase3 = lifeRatio < (death ? 0.6f : revenge ? 0.5f : expertMode ? 0.35f : 0.2f); @@ -1108,13 +1101,6 @@ namespace CalamityMod.NPCs.Polterghast bool revenge = CalamityWorld.revenge || malice; bool death = CalamityWorld.death || malice; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > npc.Calamity().killTimeRatio_IncreasedAggression) - lifeRatio = npc.Calamity().killTimeRatio_IncreasedAggression; - } - bool phase2 = lifeRatio < (death ? 0.9f : revenge ? 0.8f : expertMode ? 0.65f : 0.5f); bool phase3 = lifeRatio < (death ? 0.6f : revenge ? 0.5f : expertMode ? 0.35f : 0.2f); diff --git a/NPCs/Polterghast/PolterghastHook.cs b/NPCs/Polterghast/PolterghastHook.cs index a4704b170e..0c4cd9d091 100644 --- a/NPCs/Polterghast/PolterghastHook.cs +++ b/NPCs/Polterghast/PolterghastHook.cs @@ -87,13 +87,6 @@ namespace CalamityMod.NPCs.Polterghast // Percent life remaining, Polter float lifeRatio = Main.npc[CalamityGlobalNPC.ghostBoss].life / (float)Main.npc[CalamityGlobalNPC.ghostBoss].lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().killTimeRatio_IncreasedAggression) - lifeRatio = Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().killTimeRatio_IncreasedAggression; - } - // Scale multiplier based on nearby active tiles float tileEnrageMult = Main.npc[CalamityGlobalNPC.ghostBoss].ai[3]; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs index 14ea39e2e5..d7c02e8add 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs @@ -100,13 +100,6 @@ namespace CalamityMod.NPCs.ProfanedGuardians // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - Vector2 vectorCenter = npc.Center; if (Main.netMode != NetmodeID.MultiplayerClient && npc.localAI[1] == 0f) { diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 489df2337f..5e5a01fefa 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -198,13 +198,6 @@ namespace CalamityMod.NPCs.Providence // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Play enrage animation if night starts if (nightTime && calamityGlobalNPC.newAI[3] == spawnAnimationTime) { diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 6bf7366949..54fa4167b9 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -108,13 +108,6 @@ namespace CalamityMod.NPCs.Ravager // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Large fire light Lighting.AddLight((int)(npc.Center.X - 110f) / 16, (int)(npc.Center.Y - 30f) / 16, 0f, 0.5f, 2f); Lighting.AddLight((int)(npc.Center.X + 110f) / 16, (int)(npc.Center.Y - 30f) / 16, 0f, 0.5f, 2f); diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index e0903c31ed..ecf9da45a3 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -106,13 +106,6 @@ namespace CalamityMod.NPCs.Signus double lifeRatio = npc.life / (double)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - lifeToAlpha = (int)(100.0 * (1.0 - lifeRatio)); int maxCharges = death ? 1 : revenge ? 2 : expertMode ? 3 : 4; int maxTeleports = (death && lifeRatio < 0.9) ? 1 : revenge ? 2 : expertMode ? 3 : 4; diff --git a/NPCs/SlimeGod/SlimeGod.cs b/NPCs/SlimeGod/SlimeGod.cs index a6a0d1c132..5fc7ebb4d5 100644 --- a/NPCs/SlimeGod/SlimeGod.cs +++ b/NPCs/SlimeGod/SlimeGod.cs @@ -73,13 +73,6 @@ namespace CalamityMod.NPCs.SlimeGod float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - npc.defense = npc.defDefense; npc.damage = npc.defDamage; if (npc.localAI[1] == 1f) diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 71c0405e08..9b0aa514c0 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -102,13 +102,6 @@ namespace CalamityMod.NPCs.SlimeGod // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - Vector2 vectorCenter = npc.Center; // Get a target diff --git a/NPCs/SlimeGod/SlimeGodRun.cs b/NPCs/SlimeGod/SlimeGodRun.cs index a4cbb412e8..e770963767 100644 --- a/NPCs/SlimeGod/SlimeGodRun.cs +++ b/NPCs/SlimeGod/SlimeGodRun.cs @@ -76,13 +76,6 @@ namespace CalamityMod.NPCs.SlimeGod float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - npc.defense = npc.defDefense; npc.damage = npc.defDamage; if (npc.localAI[1] == 1f) diff --git a/NPCs/SlimeGod/SlimeGodRunSplit.cs b/NPCs/SlimeGod/SlimeGodRunSplit.cs index 5dd7120aaa..6895f7dfaa 100644 --- a/NPCs/SlimeGod/SlimeGodRunSplit.cs +++ b/NPCs/SlimeGod/SlimeGodRunSplit.cs @@ -78,13 +78,6 @@ namespace CalamityMod.NPCs.SlimeGod float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - npc.defense = npc.defDefense; npc.damage = npc.defDamage; if (npc.localAI[1] == 1f) diff --git a/NPCs/SlimeGod/SlimeGodSplit.cs b/NPCs/SlimeGod/SlimeGodSplit.cs index 14a26ad244..d383ae0bef 100644 --- a/NPCs/SlimeGod/SlimeGodSplit.cs +++ b/NPCs/SlimeGod/SlimeGodSplit.cs @@ -78,13 +78,6 @@ namespace CalamityMod.NPCs.SlimeGod float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - npc.defense = npc.defDefense; npc.damage = npc.defDamage; if (npc.localAI[1] == 1f) diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index e3d4523559..bc0df78137 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -165,13 +165,6 @@ namespace CalamityMod.NPCs.StormWeaver float lifeRatio = npc.life / (float)npc.lifeMax; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - // Shed armor bool shedArmor = npc.life / (float)npc.lifeMax < 0.9f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCOverrides/Bosses/BrainOfCthulhuAI.cs index 27f9a9b213..18d40815a8 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/BrainOfCthulhuAI.cs @@ -103,10 +103,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - // Phases based on HP bool phase2 = lifeRatio < 0.85f; bool phase3 = lifeRatio < 0.7f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs index fb62a5b67d..f072dc7c6a 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/CultistAI.cs @@ -25,11 +25,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - + // Phases bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; bool death = CalamityWorld.death || malice; @@ -1074,11 +1070,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining for Cultist or Eidolon Wyrm float lifeRatio = Main.npc[(int)npc.ai[0]].life / (float)Main.npc[(int)npc.ai[0]].lifeMax; - - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > Main.npc[(int)npc.ai[0]].Calamity().killTimeRatio_IncreasedAggression) - lifeRatio = Main.npc[(int)npc.ai[0]].Calamity().killTimeRatio_IncreasedAggression; - + bool phase2 = lifeRatio < 0.7f; bool phase3 = lifeRatio < (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType() ? 0.6f : 0.55f); bool phase4 = lifeRatio < 0.4f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs index 08094e063c..d922150dd8 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs @@ -28,11 +28,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - + // Phases based on life percentage bool phase2 = lifeRatio < 0.85f; bool phase3 = lifeRatio < 0.7f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs index 83be5d64df..6a2f1572d7 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs @@ -20,11 +20,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - + // Variables bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; bool death = CalamityWorld.death || malice; diff --git a/NPCs/VanillaNPCOverrides/Bosses/EaterOfWorldsAI.cs b/NPCs/VanillaNPCOverrides/Bosses/EaterOfWorldsAI.cs index 1347c8db90..8f0869bbb2 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/EaterOfWorldsAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/EaterOfWorldsAI.cs @@ -58,10 +58,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent segments remaining, add two to total for head and tail float lifeRatio = segmentCount / (totalSegments + 2); - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - // 10 seconds of resistance to prevent spawn killing if (calamityGlobalNPC.newAI[1] < 600f && BossRushEvent.BossRushActive) calamityGlobalNPC.newAI[1] += 1f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs b/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs index 1e73b51166..c71094a480 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/EyeOfCthulhuAI.cs @@ -22,11 +22,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; bool death = CalamityWorld.death || malice; bool phase2 = lifeRatio < 0.75f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs b/NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs index 2625d7d4cd..aad5e8deb7 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/GolemAI.cs @@ -23,11 +23,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - + // Phases bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; bool death = CalamityWorld.death || malice; @@ -659,10 +655,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged; bool death = CalamityWorld.death || malice; diff --git a/NPCs/VanillaNPCOverrides/Bosses/KingSlimeAI.cs b/NPCs/VanillaNPCOverrides/Bosses/KingSlimeAI.cs index a415bc63e3..ac2b4156bb 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/KingSlimeAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/KingSlimeAI.cs @@ -41,10 +41,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - // Phases based on life percentage bool phase2 = lifeRatio < 0.75f; bool phase3 = lifeRatio < 0.5f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs index dce8e144f4..d674d71208 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs @@ -34,10 +34,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - // Phases based on HP bool phase1phase2 = lifeRatio < 0.75f; bool phase2 = lifeRatio <= 0.5f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs b/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs index 785c015456..ee87c2dc7a 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/QueenBeeAI.cs @@ -44,11 +44,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - + // Phases bool phase2 = lifeRatio < 0.75f; bool phase3 = lifeRatio < 0.5f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs b/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs index ef704ca774..d9b9a98724 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs @@ -26,10 +26,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - // Phases bool respawnHands = npc.life / (float)npc.lifeMax < 0.33f; bool phase2 = respawnHands || death; diff --git a/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs index 7f8857f4ae..b27165e220 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs @@ -35,10 +35,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - // Spawn arms if (npc.ai[0] == 0f && Main.netMode != NetmodeID.MultiplayerClient) { diff --git a/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs index 17ebe8849a..5d46138fe2 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/TwinsAI.cs @@ -352,10 +352,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - // Easier to send info to Spazmatism CalamityGlobalNPC.laserEye = npc.whoAmI; @@ -1054,10 +1050,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - // Easier to send info to Retinazer CalamityGlobalNPC.fireEye = npc.whoAmI; diff --git a/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs b/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs index ba580aa276..9c2e536bca 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/WallOfFleshAI.cs @@ -41,11 +41,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - + // Clamp life ratio to prevent bad velocity math. lifeRatio = MathHelper.Clamp(lifeRatio, 0f, 1f); @@ -496,10 +492,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Percent life remaining float lifeRatio = Main.npc[Main.wof].life / (float)Main.npc[Main.wof].lifeMax; - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - bool charging = Main.npc[Main.wof].ai[3] == 1f; // Set up enraged laser firing timer diff --git a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs index acf4babdb4..18e9f120a7 100644 --- a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Melee projectile.tileCollide = true; Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); - int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); + int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, 75, 0f, 0f, 100, default, 0.9f); Main.dust[dustParticle].noGravity = true; Main.dust[dustParticle].velocity *= 0.5f; Main.dust[dustParticle].velocity += projectile.velocity * 0.1f; @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i <= 15; i++) { Vector2 displace = (projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * (-0.5f + (i / 15f)) * 88f; - int dustParticle = Dust.NewDust(projectile.Center + displace, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 2f); + int dustParticle = Dust.NewDust(projectile.Center + displace, projectile.width, projectile.height, 75, 0f, 0f, 100, default, 2f); Main.dust[dustParticle].noGravity = true; Main.dust[dustParticle].velocity = projectile.oldVelocity; } diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 1f16cf2fb6..f24f5a4767 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Melee projectile.tileCollide = true; Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); - int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); + int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, 75, 0f, 0f, 100, default, 0.9f); Main.dust[dustParticle].noGravity = true; Main.dust[dustParticle].velocity *= 0.5f; Main.dust[dustParticle].velocity += projectile.velocity * 0.1f; @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i <= 15; i++) { Vector2 displace = (projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * (-0.5f + (i / 15f)) * 88f; - int dustParticle = Dust.NewDust(projectile.Center + displace, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 2f); + int dustParticle = Dust.NewDust(projectile.Center + displace, projectile.width, projectile.height, 75, 0f, 0f, 100, default, 2f); Main.dust[dustParticle].noGravity = true; Main.dust[dustParticle].velocity = projectile.oldVelocity; } @@ -137,7 +137,7 @@ namespace CalamityMod.Projectiles.Melee { Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); - int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); + int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, 75, 0f, 0f, 100, default, 0.9f); Main.dust[dustParticle].noGravity = true; Main.dust[dustParticle].velocity *= 0.5f; @@ -2429,7 +2429,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i <= 4; i++) { - Dust waterTrail = Main.dust[Dust.NewDust(projectile.Center + Main.rand.NextVector2Circular(10f, 10f), 23, 0, DustID.Water, -3.7f * Math.Sign(projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; + Dust waterTrail = Main.dust[Dust.NewDust(projectile.Center + Main.rand.NextVector2Circular(10f, 10f), 23, 0, 33, -3.7f * Math.Sign(projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; waterTrail.fadeIn = 3f; } @@ -2472,11 +2472,11 @@ namespace CalamityMod.Projectiles.Melee if (TimeSinceLanding > 10) { //Trailing water!! Dust spam!!! - Dust waterTrail = Main.dust[Dust.NewDust(projectile.Top + Vector2.UnitY * groundOffset, 23, 0, DustID.Water, -3.7f * Math.Sign(projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; + Dust waterTrail = Main.dust[Dust.NewDust(projectile.Top + Vector2.UnitY * groundOffset, 23, 0, 33, -3.7f * Math.Sign(projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; waterTrail.fadeIn = 3f; - waterTrail = Main.dust[Dust.NewDust(projectile.TopRight + Vector2.UnitY * groundOffset + Main.rand.NextVector2Circular(16f, 16f) + Vector2.UnitX * projectile.velocity.X * 4f, 23, 0, DustID.Water, -3.7f * Math.Sign(projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; + waterTrail = Main.dust[Dust.NewDust(projectile.TopRight + Vector2.UnitY * groundOffset + Main.rand.NextVector2Circular(16f, 16f) + Vector2.UnitX * projectile.velocity.X * 4f, 23, 0, 33, -3.7f * Math.Sign(projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; waterTrail.fadeIn = 3f; - waterTrail = Main.dust[Dust.NewDust(projectile.TopLeft + Vector2.UnitY * groundOffset + Main.rand.NextVector2Circular(16f, 16f) + Vector2.UnitX * projectile.velocity.X * 4f, 23, 0, DustID.Water, -3.7f * Math.Sign(projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; + waterTrail = Main.dust[Dust.NewDust(projectile.TopLeft + Vector2.UnitY * groundOffset + Main.rand.NextVector2Circular(16f, 16f) + Vector2.UnitX * projectile.velocity.X * 4f, 23, 0, 33, -3.7f * Math.Sign(projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; waterTrail.fadeIn = 3f; diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 0e49ef2967..201a5b0657 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -456,7 +456,7 @@ namespace CalamityMod.Projectiles.Melee } Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); - int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); + int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, 75, 0f, 0f, 100, default, 0.9f); Main.dust[dustParticle].noGravity = true; Main.dust[dustParticle].velocity *= 0.5f; Main.dust[dustParticle].velocity += projectile.velocity * 0.1f; @@ -488,7 +488,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i <= 15; i++) { Vector2 displace = (projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * (-0.5f + (i / 15f)) * 88f; - int dustParticle = Dust.NewDust(projectile.Center + displace, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 2f); + int dustParticle = Dust.NewDust(projectile.Center + displace, projectile.width, projectile.height, 75, 0f, 0f, 100, default, 2f); Main.dust[dustParticle].noGravity = true; Main.dust[dustParticle].velocity = projectile.oldVelocity; } From f38879da82ef725fa85afe5f7163b8314de9ccdb Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 26 Jan 2022 10:57:30 -0600 Subject: [PATCH 19/27] 1 - Yharon increased aggression over time removed. --- NPCs/Yharon/Yharon.cs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 6350d1e357..8a79997017 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -159,13 +159,6 @@ namespace CalamityMod.NPCs.Yharon bool revenge = CalamityWorld.revenge || malice; bool death = CalamityWorld.death || malice; - if (revenge) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) - lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; - } - float pie = (float)Math.PI; Vector2 vectorCenter = npc.Center; @@ -2946,13 +2939,6 @@ namespace CalamityMod.NPCs.Yharon // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; - if (CalamityWorld.revenge || CalamityWorld.malice || BossRushEvent.BossRushActive) - { - // Increase aggression if player is taking a long time to kill the boss - if (lifeRatio > npc.Calamity().killTimeRatio_IncreasedAggression) - lifeRatio = npc.Calamity().killTimeRatio_IncreasedAggression; - } - bool doTelegraphFlightAnimation = npc.localAI[1] < fastChargeTelegraphTime * 0.5f || npc.localAI[1] > fastChargeTelegraphTime - (fastChargeTelegraphTime / 6f); bool doTelegraphRoarAnimation = npc.localAI[1] > fastChargeTelegraphTime - fastChargeTelegraphTime * 0.4f && npc.localAI[1] < fastChargeTelegraphTime - fastChargeTelegraphTime * 0.2f; bool phase4 = startSecondAI && lifeRatio <= ((CalamityWorld.death || BossRushEvent.BossRushActive || CalamityWorld.malice) ? 0.165f : 0.11f) && (CalamityWorld.revenge || BossRushEvent.BossRushActive || CalamityWorld.malice); From 1d96a714fedb22f3851ca34d67960920d2c0fa92 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Sun, 16 Jan 2022 22:06:52 -0500 Subject: [PATCH 20/27] Statis' Ninja Belt is now post Moon Lord --- Items/Accessories/StatisNinjaBelt.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Accessories/StatisNinjaBelt.cs b/Items/Accessories/StatisNinjaBelt.cs index c8edefe659..9bc8cca68e 100644 --- a/Items/Accessories/StatisNinjaBelt.cs +++ b/Items/Accessories/StatisNinjaBelt.cs @@ -42,8 +42,8 @@ namespace CalamityMod.Items.Accessories recipe.AddIngredient(ItemID.MasterNinjaGear); recipe.AddIngredient(ItemID.FrogLeg); recipe.AddIngredient(ModContent.ItemType(), 50); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddTile(TileID.MythrilAnvil); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); } From 4a66034020b829c4f135ddbb14b50d88ac8efde8 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Sun, 16 Jan 2022 23:08:44 -0500 Subject: [PATCH 21/27] vanilla and modded dashes no longer interfere with each other --- Items/Accessories/AsgardianAegis.cs | 1 + Items/Accessories/AsgardsValor.cs | 1 + Items/Accessories/CounterScarf.cs | 1 + Items/Accessories/DeepDiver.cs | 1 + Items/Accessories/ElysianAegis.cs | 1 + Items/Accessories/EvasionScarf.cs | 1 + Items/Accessories/OrnateShield.cs | 1 + Items/Accessories/StatisBeltOfCurses.cs | 1 + Items/Accessories/StatisNinjaBelt.cs | 1 + Items/Armor/GodSlayerHelm.cs | 3 +++ Items/Armor/GodSlayerHelmet.cs | 3 +++ Items/Armor/GodSlayerMask.cs | 3 +++ Items/Armor/PlaguebringerVisor.cs | 1 + Items/CalamityGlobalItem.cs | 9 +++++++++ 14 files changed, 28 insertions(+) diff --git a/Items/Accessories/AsgardianAegis.cs b/Items/Accessories/AsgardianAegis.cs index 3e860b30b3..bdfe16a370 100644 --- a/Items/Accessories/AsgardianAegis.cs +++ b/Items/Accessories/AsgardianAegis.cs @@ -53,6 +53,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.dashMod = 4; + player.dash = 0; modPlayer.elysianAegis = true; modPlayer.abaddon = true; player.noKnockback = true; diff --git a/Items/Accessories/AsgardsValor.cs b/Items/Accessories/AsgardsValor.cs index a3825a44b7..50fbc170b1 100644 --- a/Items/Accessories/AsgardsValor.cs +++ b/Items/Accessories/AsgardsValor.cs @@ -35,6 +35,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.dashMod = 2; + player.dash = 0; player.noKnockback = true; player.fireWalk = true; modPlayer.abaddon = true; diff --git a/Items/Accessories/CounterScarf.cs b/Items/Accessories/CounterScarf.cs index 336e3c1d95..2e15b7e237 100644 --- a/Items/Accessories/CounterScarf.cs +++ b/Items/Accessories/CounterScarf.cs @@ -51,6 +51,7 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.Calamity(); modPlayer.dodgeScarf = true; modPlayer.dashMod = 1; + player.dash = 0; } } } diff --git a/Items/Accessories/DeepDiver.cs b/Items/Accessories/DeepDiver.cs index 4440b7a495..8def81b9b3 100644 --- a/Items/Accessories/DeepDiver.cs +++ b/Items/Accessories/DeepDiver.cs @@ -31,6 +31,7 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.Calamity(); modPlayer.deepDiver = true; modPlayer.dashMod = 5; + player.dash = 0; } } } diff --git a/Items/Accessories/ElysianAegis.cs b/Items/Accessories/ElysianAegis.cs index c3e28f477e..d8993a2715 100644 --- a/Items/Accessories/ElysianAegis.cs +++ b/Items/Accessories/ElysianAegis.cs @@ -51,6 +51,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.dashMod = 3; + player.dash = 0; modPlayer.elysianAegis = true; player.buffImmune[BuffID.OnFire] = true; player.buffImmune[ModContent.BuffType()] = true; diff --git a/Items/Accessories/EvasionScarf.cs b/Items/Accessories/EvasionScarf.cs index fc6a945870..f015bd41af 100644 --- a/Items/Accessories/EvasionScarf.cs +++ b/Items/Accessories/EvasionScarf.cs @@ -53,6 +53,7 @@ namespace CalamityMod.Items.Accessories modPlayer.dodgeScarf = true; modPlayer.evasionScarf = true; modPlayer.dashMod = 1; + player.dash = 0; } public override void AddRecipes() diff --git a/Items/Accessories/OrnateShield.cs b/Items/Accessories/OrnateShield.cs index 387377072d..eb1480708b 100644 --- a/Items/Accessories/OrnateShield.cs +++ b/Items/Accessories/OrnateShield.cs @@ -39,6 +39,7 @@ namespace CalamityMod.Items.Accessories player.statLifeMax2 += 20; } player.Calamity().dashMod = 6; + player.dash = 0; } public override void AddRecipes() diff --git a/Items/Accessories/StatisBeltOfCurses.cs b/Items/Accessories/StatisBeltOfCurses.cs index a786861756..8d3e560698 100644 --- a/Items/Accessories/StatisBeltOfCurses.cs +++ b/Items/Accessories/StatisBeltOfCurses.cs @@ -38,6 +38,7 @@ namespace CalamityMod.Items.Accessories player.noFallDmg = true; player.blackBelt = true; modPlayer.dashMod = 7; + player.dash = 0; player.spikedBoots = 2; } diff --git a/Items/Accessories/StatisNinjaBelt.cs b/Items/Accessories/StatisNinjaBelt.cs index 9bc8cca68e..8565a62f41 100644 --- a/Items/Accessories/StatisNinjaBelt.cs +++ b/Items/Accessories/StatisNinjaBelt.cs @@ -33,6 +33,7 @@ namespace CalamityMod.Items.Accessories player.extraFall += 35; player.blackBelt = true; player.dash = 1; + player.Calamity().dashMod = 0; player.spikedBoots = 2; } diff --git a/Items/Armor/GodSlayerHelm.cs b/Items/Armor/GodSlayerHelm.cs index c79aa12c05..59bf7108ee 100644 --- a/Items/Armor/GodSlayerHelm.cs +++ b/Items/Armor/GodSlayerHelm.cs @@ -53,7 +53,10 @@ namespace CalamityMod.Items.Armor player.aggro += 1000; if (modPlayer.godSlayerDashHotKeyPressed) + { modPlayer.dashMod = 9; + player.dash = 0; + } } public override void UpdateEquip(Player player) diff --git a/Items/Armor/GodSlayerHelmet.cs b/Items/Armor/GodSlayerHelmet.cs index 2409a4879a..9200d507da 100644 --- a/Items/Armor/GodSlayerHelmet.cs +++ b/Items/Armor/GodSlayerHelmet.cs @@ -48,7 +48,10 @@ namespace CalamityMod.Items.Armor "You fire a god killer shrapnel round while firing ranged weapons every 2.5 seconds"; if (modPlayer.godSlayerDashHotKeyPressed) + { modPlayer.dashMod = 9; + player.dash = 0; + } } public override void UpdateEquip(Player player) diff --git a/Items/Armor/GodSlayerMask.cs b/Items/Armor/GodSlayerMask.cs index 602007176d..3f6b7d852f 100644 --- a/Items/Armor/GodSlayerMask.cs +++ b/Items/Armor/GodSlayerMask.cs @@ -55,7 +55,10 @@ namespace CalamityMod.Items.Armor "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; if (modPlayer.godSlayerDashHotKeyPressed) + { modPlayer.dashMod = 9; + player.dash = 0; + } } public override void UpdateEquip(Player player) diff --git a/Items/Armor/PlaguebringerVisor.cs b/Items/Armor/PlaguebringerVisor.cs index 3df72a7624..d71d843f10 100644 --- a/Items/Armor/PlaguebringerVisor.cs +++ b/Items/Armor/PlaguebringerVisor.cs @@ -53,6 +53,7 @@ namespace CalamityMod.Items.Armor player.Calamity().plaguebringerPatronSet = true; player.Calamity().dashMod = 8; + player.dash = 0; player.maxMinions += 3; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index a013d48488..da66668749 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -998,6 +998,8 @@ namespace CalamityMod.Items return "HuntressTier3"; if (head.type == ItemID.ApprenticeAltHead && body.type == ItemID.ApprenticeAltShirt && legs.type == ItemID.ApprenticeAltPants) return "ApprenticeTier3"; + if (head.type == ItemID.SolarFlareHelmet && body.type == ItemID.SolarFlareBreastplate && legs.type == ItemID.SolarFlareLeggings) + return "SolarFlare"; return ""; } @@ -1130,6 +1132,10 @@ namespace CalamityMod.Items player.magicCrit += 15; player.setBonus += "\n10% increased minion damage and 15% increased magic critical strike chance"; } + else if (set == "SolarFlare") + { + modPlayer.dashMod = 0; + } } #endregion @@ -1532,6 +1538,9 @@ namespace CalamityMod.Items if (item.type == ItemID.HandWarmer) modPlayer.handWarmer = true; + if (item.type == ItemID.EoCShield || item.type == ItemID.Tabi || item.type == ItemID.MasterNinjaGear) + modPlayer.dashMod = 0; + // Hard / Guarding / Armored / Warding give 0.25% / 0.5% / 0.75% / 1% DR if (item.prefix == PrefixID.Hard) { From 558f25118cbfefd62ceca4097b46c7bab2836f16 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Mon, 17 Jan 2022 15:22:44 -0500 Subject: [PATCH 22/27] cleaned up Carnage code --- Items/Weapons/Melee/Carnage.cs | 92 ++++++++++------------------------ 1 file changed, 27 insertions(+), 65 deletions(-) diff --git a/Items/Weapons/Melee/Carnage.cs b/Items/Weapons/Melee/Carnage.cs index 3e28c919d1..6433c7a98d 100644 --- a/Items/Weapons/Melee/Carnage.cs +++ b/Items/Weapons/Melee/Carnage.cs @@ -42,84 +42,46 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { - if (target.life <= 0) - { - Main.PlaySound(SoundID.Item74, (int)target.position.X, (int)target.position.Y); - target.position.X += (float)(target.width / 2); - target.position.Y += (float)(target.height / 2); - target.position.X -= (float)(target.width / 2); - target.position.Y -= (float)(target.height / 2); - for (int num621 = 0; num621 < 15; num621++) - { - int num622 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; - if (Main.rand.NextBool(2)) - { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } - } - for (int num623 = 0; num623 < 25; num623++) - { - int num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; - } - int num251 = Main.rand.Next(4, 6); - for (int num252 = 0; num252 < num251; num252++) - { - Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - while (value15.X == 0f && value15.Y == 0f) - { - value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - } - value15.Normalize(); - value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(target.Center.X, target.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), knockback, player.whoAmI, 0f, 0f); - } - } + OnHitEffects(player, target.life <= 0, target.Center, target.width, target.height, knockback); } public override void OnHitPvp(Player player, Player target, int damage, bool crit) { - if (target.statLife <= 0) + OnHitEffects(player, target.statLife <= 0, target.Center, target.width, target.height, item.knockBack); + } + + private void OnHitEffects(Player player, bool health, Vector2 targetPos, int targetWidth, int targetHeight, float kBack) + { + if (health) { - Main.PlaySound(SoundID.Item74, (int)target.position.X, (int)target.position.Y); - target.position.X += (float)(target.width / 2); - target.position.Y += (float)(target.height / 2); - target.position.X -= (float)(target.width / 2); - target.position.Y -= (float)(target.height / 2); - for (int num621 = 0; num621 < 15; num621++) + Main.PlaySound(SoundID.Item74, targetPos); + targetPos.X += (float)(targetWidth / 2); + targetPos.Y += (float)(targetHeight / 2); + targetPos.X -= (float)(targetWidth / 2); + targetPos.Y -= (float)(targetHeight / 2); + for (int i = 0; i < 15; i++) { - int num622 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int idx = Dust.NewDust(targetPos, targetWidth, targetHeight, 5, 0f, 0f, 100, default, 2f); + Main.dust[idx].velocity *= 3f; if (Main.rand.NextBool(2)) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + Main.dust[idx].scale = 0.5f; + Main.dust[idx].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 25; num623++) + for (int i = 0; i < 25; i++) { - int num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + int idx = Dust.NewDust(targetPos, targetWidth, targetHeight, 5, 0f, 0f, 100, default, 3f); + Main.dust[idx].noGravity = true; + Main.dust[idx].velocity *= 5f; + idx = Dust.NewDust(targetPos, targetWidth, targetHeight, 5, 0f, 0f, 100, default, 2f); + Main.dust[idx].velocity *= 2f; } - int num251 = Main.rand.Next(4, 6); - for (int num252 = 0; num252 < num251; num252++) + int bloodAmt = Main.rand.Next(4, 6); + for (int i = 0; i < bloodAmt; i++) { - Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - while (value15.X == 0f && value15.Y == 0f) - { - value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - } - value15.Normalize(); - value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(target.Center.X, target.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), item.knockBack, player.whoAmI, 0f, 0f); + Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); + Projectile.NewProjectile(targetPos, velocity, ModContent.ProjectileType(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), kBack, player.whoAmI, 0f, 0f); } } } From e3472d607b458ee5cba957edb5b0da1795545f1b Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Mon, 17 Jan 2022 15:30:08 -0500 Subject: [PATCH 23/27] fixed terra ray shards not doing damage I lost a year of my lifespan trying to figure this out --- Projectiles/Magic/TerraBeam.cs | 5 ++--- Projectiles/Magic/TerraShard.cs | 5 +++-- Projectiles/Magic/TerraShard.png | Bin 135 -> 0 bytes 3 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 Projectiles/Magic/TerraShard.png diff --git a/Projectiles/Magic/TerraBeam.cs b/Projectiles/Magic/TerraBeam.cs index 6c3b4bbba7..744feb3203 100644 --- a/Projectiles/Magic/TerraBeam.cs +++ b/Projectiles/Magic/TerraBeam.cs @@ -76,7 +76,6 @@ namespace CalamityMod.Projectiles.Magic public override void DetermineScale() => projectile.scale = projectile.timeLeft / Lifetime * MaxScale; - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { DrawBeamWithColor(spriteBatch, Color.Lime * 1.1f, projectile.scale); @@ -96,7 +95,7 @@ namespace CalamityMod.Projectiles.Magic int totalShards = (int)MathHelper.Lerp(1, 4, MathHelper.Clamp(lengthFromStart / MaxLaserLength * 1.4f, 0f, 1f)); int shardType = ModContent.ProjectileType(); - int shardDamage = (int)(damage * 0.6); + int shardDamage = (int)(projectile.damage * 0.6); for (int i = 0; i < totalShards; i++) { int tries = 0; @@ -108,7 +107,7 @@ namespace CalamityMod.Projectiles.Magic } while (Collision.SolidCollision((target.Center + spawnOffset).ToTileCoordinates().ToVector2(), 4, 4) && tries < 10); - Projectile.NewProjectile(target.Center + spawnOffset, Main.rand.NextVector2CircularEdge(6f, 6f), shardType, shardDamage, knockback); + Projectile.NewProjectile(target.Center + spawnOffset, Main.rand.NextVector2CircularEdge(6f, 6f), shardType, shardDamage, projectile.knockBack, projectile.owner); } ShardCooldown = 3f; diff --git a/Projectiles/Magic/TerraShard.cs b/Projectiles/Magic/TerraShard.cs index cad86ae092..d5e639008b 100644 --- a/Projectiles/Magic/TerraShard.cs +++ b/Projectiles/Magic/TerraShard.cs @@ -5,6 +5,8 @@ namespace CalamityMod.Projectiles.Magic { public class TerraShard : ModProjectile { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override void SetStaticDefaults() { DisplayName.SetDefault("Shard"); @@ -15,7 +17,6 @@ namespace CalamityMod.Projectiles.Magic projectile.width = projectile.height = 20; projectile.friendly = true; projectile.timeLeft = 60; - projectile.penetrate = 1; projectile.magic = true; projectile.tileCollide = true; } @@ -29,7 +30,7 @@ namespace CalamityMod.Projectiles.Magic terraMagic.velocity *= 0.1f; } - CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 500f, 15f, 20f); + CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 500f, 15f, 20f); } } } diff --git a/Projectiles/Magic/TerraShard.png b/Projectiles/Magic/TerraShard.png deleted file mode 100644 index 15e877573779272f931ab67d818cf9f2b8911a17..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 135 zcmeAS@N?(olHy`uVBq!ia0vp^EFjFm1|(O0oL2{=*pj^6T^Rm@;DWu&Cj&(|3p^r= z85sBugD~Uq{1qucLG}_)Usv`AZ0utE^0#a@0p%D(JY5_^IIbuE`TyUZ*(f2&fw_g1 Y;aDFttLt^E7eILiPgg&ebxsLQ0Jwf72LJ#7 From 6152b19c08311e9e484c7122af2c4362eb50bb7e Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Mon, 17 Jan 2022 15:33:44 -0500 Subject: [PATCH 24/27] drop more seeds --- Items/TreasureBags/HiveMindBag.cs | 2 +- Items/TreasureBags/PerforatorBag.cs | 2 +- NPCs/HiveMind/HiveMind.cs | 2 +- NPCs/Perforator/PerforatorHive.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/TreasureBags/HiveMindBag.cs b/Items/TreasureBags/HiveMindBag.cs index 8ab63bed70..b14b3b14ba 100644 --- a/Items/TreasureBags/HiveMindBag.cs +++ b/Items/TreasureBags/HiveMindBag.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.TreasureBags DropHelper.DropItem(player, ItemID.DemoniteBar, 9, 14); DropHelper.DropItem(player, ItemID.RottenChunk, 10, 20); DropHelper.DropItemCondition(player, ItemID.CursedFlame, Main.hardMode, 15, 30); - DropHelper.DropItem(player, ItemID.CorruptSeeds, 2, 4); + DropHelper.DropItem(player, ItemID.CorruptSeeds, 10, 15); // Weapons float w = DropHelper.BagWeaponDropRateFloat; diff --git a/Items/TreasureBags/PerforatorBag.cs b/Items/TreasureBags/PerforatorBag.cs index fd7e50a36f..f8ef1b5ccd 100644 --- a/Items/TreasureBags/PerforatorBag.cs +++ b/Items/TreasureBags/PerforatorBag.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.TreasureBags DropHelper.DropItem(player, ItemID.CrimtaneBar, 9, 14); DropHelper.DropItem(player, ItemID.Vertebrae, 10, 20); DropHelper.DropItemCondition(player, ItemID.Ichor, Main.hardMode, 15, 30); - DropHelper.DropItem(player, ItemID.CrimsonSeeds, 2, 4); + DropHelper.DropItem(player, ItemID.CrimsonSeeds, 10, 15); // Weapons float w = DropHelper.BagWeaponDropRateFloat; diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index b6a897835f..a93dc527ee 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -1104,7 +1104,7 @@ namespace CalamityMod.NPCs.HiveMind DropHelper.DropItemSpray(npc, ItemID.RottenChunk, 9, 15, 3); if (Main.hardMode) DropHelper.DropItemSpray(npc, ItemID.CursedFlame, 10, 20, 2); - DropHelper.DropItem(npc, ItemID.CorruptSeeds, 2, 4); + DropHelper.DropItem(npc, ItemID.CorruptSeeds, 10, 15); // Weapons float w = DropHelper.NormalWeaponDropRateFloat; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 3893e47fd6..9c0fde1688 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -481,7 +481,7 @@ namespace CalamityMod.NPCs.Perforator DropHelper.DropItemSpray(npc, ItemID.Vertebrae, 3, 9); if (Main.hardMode) DropHelper.DropItemSpray(npc, ItemID.Ichor, 10, 20, 2); - DropHelper.DropItem(npc, ItemID.CrimsonSeeds, 2, 4); + DropHelper.DropItem(npc, ItemID.CrimsonSeeds, 10, 15); // Weapons float w = DropHelper.NormalWeaponDropRateFloat; From 65a72af2b13e166b6cb0cc26fd828ae3c565f2ff Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Mon, 17 Jan 2022 15:51:22 -0500 Subject: [PATCH 25/27] Fixed Fathom Swarmer Tail being black --- CalPlayer/CalamityPlayerDrawEffects.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index 3461b51f64..66439d5931 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -444,13 +444,14 @@ namespace CalamityMod.CalPlayer Rectangle frame = texture.Frame(1, 4, 0, modPlayer.tailFrame); if (modPlayer.fathomSwarmerTail) { + int dyeShader = drawPlayer.dye?[2].dye ?? 0; int frameSizeY = texture.Height / 4; int centerX = (int)(drawInfo.position.X + drawPlayer.width / 2f); int centerY = (int)(drawInfo.position.Y + drawPlayer.height / 2f); int drawX = (int)(drawInfo.position.X + drawPlayer.width / 2f - Main.screenPosition.X - (3 * drawPlayer.direction)); int drawY = (int)(drawInfo.position.Y + drawPlayer.height / 2f - Main.screenPosition.Y); - Color color = Lighting.GetColor(centerX, centerY); - DrawData tailDrawData = new DrawData(texture, new Vector2(drawX, drawY), frame, color, 0f, new Vector2(texture.Width / 2f, frameSizeY / 2f), 1f, drawInfo.spriteEffects, 0); + DrawData tailDrawData = new DrawData(texture, new Vector2(drawX, drawY), frame, drawInfo.pantsColor, 0f, new Vector2(texture.Width / 2f, frameSizeY / 2f), 1f, drawInfo.spriteEffects, 0); + tailDrawData.shader = dyeShader; Main.playerDrawData.Add(tailDrawData); } }); From 519fec75480d81eb26b5ed197a3ec34133056389 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Wed, 26 Jan 2022 12:53:16 -0500 Subject: [PATCH 26/27] Universal Genesis touchups --- Items/Weapons/Ranged/UniversalGenesis.cs | 6 +- Projectiles/Ranged/UniversalGenesisStar.cs | 73 +++++++++++++++------- 2 files changed, 52 insertions(+), 27 deletions(-) diff --git a/Items/Weapons/Ranged/UniversalGenesis.cs b/Items/Weapons/Ranged/UniversalGenesis.cs index 717afd4118..5c7a8a887f 100644 --- a/Items/Weapons/Ranged/UniversalGenesis.cs +++ b/Items/Weapons/Ranged/UniversalGenesis.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { DisplayName.SetDefault("Universal Genesis"); - Tooltip.SetDefault("Seeing the cosmos makes you realize how insignificant we are\n" + - "Fires a spread of bullets from the gun and a spread of stars above the cursor\n" + + Tooltip.SetDefault("Let the starry sky fall upon your enemies\n" + + "Fires a spread of bullets from the gun and a flurry of stars to rain down on the cursor\n" + "Converts musket balls into starcaller shots that summon additional stars on enemy hits\n" + "50% chance to not consume ammo"); } @@ -87,7 +87,7 @@ namespace CalamityMod.Items.Weapons.Ranged yDist *= travelDist; float xVel = xDist + Main.rand.NextFloat(-0.6f, 0.6f); float yVel = yDist + Main.rand.NextFloat(-0.6f, 0.6f); - int star = Projectile.NewProjectile(spawnPos.X, spawnPos.Y, xVel, yVel, ModContent.ProjectileType(), starDmg, knockBack, player.whoAmI, i); + int star = Projectile.NewProjectile(spawnPos.X, spawnPos.Y, xVel, yVel, ModContent.ProjectileType(), starDmg, knockBack, player.whoAmI, i, 1f); Main.projectile[star].extraUpdates = 2; Main.projectile[star].localNPCHitCooldown = 30; } diff --git a/Projectiles/Ranged/UniversalGenesisStar.cs b/Projectiles/Ranged/UniversalGenesisStar.cs index 1097f95980..b503ca24f0 100644 --- a/Projectiles/Ranged/UniversalGenesisStar.cs +++ b/Projectiles/Ranged/UniversalGenesisStar.cs @@ -40,16 +40,6 @@ namespace CalamityMod.Projectiles.Ranged Main.PlaySound(SoundID.Item9, projectile.position); } } - projectile.alpha -= 15; - int alphaMin = 150; - if (projectile.Center.Y >= projectile.ai[1]) - { - alphaMin = 0; - } - if (projectile.alpha < alphaMin) - { - projectile.alpha = alphaMin; - } projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * projectile.direction; if (Main.rand.NextBool(48)) { @@ -57,17 +47,13 @@ namespace CalamityMod.Projectiles.Ranged Main.gore[idx].velocity *= 0.66f; Main.gore[idx].velocity += projectile.velocity * 0.3f; } - if (projectile.ai[1] == 1f) + if (Main.rand.NextBool(10)) { - projectile.light = 0.9f; - if (Main.rand.NextBool(10)) - { - Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default, 1.2f); - } - if (Main.rand.NextBool(20)) - { - Gore.NewGore(projectile.position, new Vector2(projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f), Main.rand.Next(16, 18), 1f); - } + Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default, 1.2f); + } + if (Main.rand.NextBool(20)) + { + Gore.NewGore(projectile.position, new Vector2(projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f), Main.rand.Next(16, 18), 1f); } } @@ -86,11 +72,50 @@ namespace CalamityMod.Projectiles.Ranged return new Color(200, 200, 200, projectile.alpha); } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.ai[1] == 1f) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + Vector2 offsets = new Vector2(0f, projectile.gfxOffY) - Main.screenPosition; + Color alpha = projectile.GetAlpha(lightColor); + Rectangle spriteRec = new Microsoft.Xna.Framework.Rectangle(0, 0, tex.Width, tex.Height); + Vector2 spriteOrigin = spriteRec.Size() / 2f; + SpriteEffects spriteEffects = projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + + Texture2D aura = ModContent.GetTexture("CalamityMod/Projectiles/Ranged/FallenStarAura"); + Vector2 drawStart = projectile.Center + projectile.velocity; + Vector2 drawStart2 = projectile.Center - projectile.velocity * 0.5f; + Vector2 spinPoint = new Vector2(0f, -10f); + float time = Main.player[projectile.owner].miscCounter % 216000f / 60f; + Rectangle auraRec = aura.Frame(); + Color blue = Color.Blue * 0.2f; + Color white = Color.White * 0.5f; + white.A = 0; + blue.A = 0; + Vector2 auraOrigin = new Vector2(auraRec.Width / 2f, 10f); + + //Draw the aura + spriteBatch.Draw(aura, drawStart + offsets + spinPoint.RotatedBy(MathHelper.TwoPi * time), auraRec, blue, projectile.velocity.ToRotation() + MathHelper.PiOver2, auraOrigin, 1.5f, SpriteEffects.None, 0); + spriteBatch.Draw(aura, drawStart + offsets + spinPoint.RotatedBy(MathHelper.TwoPi * time + MathHelper.TwoPi / 3f), auraRec, blue, projectile.velocity.ToRotation() + MathHelper.PiOver2, auraOrigin, 1.1f, SpriteEffects.None, 0); + spriteBatch.Draw(aura, drawStart + offsets + spinPoint.RotatedBy(MathHelper.TwoPi * time + MathHelper.Pi * 4f / 3f), auraRec, blue, projectile.velocity.ToRotation() + MathHelper.PiOver2, auraOrigin, 1.3f, SpriteEffects.None, 0); + for (float d = 0f; d < 1f; d += 0.5f) + { + float scaleMult = time % 0.5f / 0.5f; + scaleMult = (scaleMult + d) % 1f; + float colorMult = scaleMult * 2f; + if (colorMult > 1f) + { + colorMult = 2f - colorMult; + } + spriteBatch.Draw(aura, drawStart2 + offsets, auraRec, white * colorMult, projectile.velocity.ToRotation() + MathHelper.PiOver2, auraOrigin, 0.3f + scaleMult * 0.5f, SpriteEffects.None, 0); + } + } + + //Draw the actual projectile CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); - return false; - } + return false; + } public override void Kill(int timeLeft) { From a42ae9db51677f385520150ad8e1bc9f8e7002ca Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 26 Jan 2022 12:08:33 -0600 Subject: [PATCH 27/27] 1 - Removed the now unnecessary tooltips from Revengeance and Death. --- Items/DifficultyItems/Malice.cs | 1 - Items/DifficultyItems/Revenge.cs | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Items/DifficultyItems/Malice.cs b/Items/DifficultyItems/Malice.cs index bf8bda03f7..c1c9d82ef7 100644 --- a/Items/DifficultyItems/Malice.cs +++ b/Items/DifficultyItems/Malice.cs @@ -31,7 +31,6 @@ namespace CalamityMod.Items.DifficultyItems "All boss minions no longer drop hearts.\n" + "Enrages all bosses and gives them new AI.\n" + "Bosses and their projectiles deal 35% more damage.\n" + - "Most bosses will enter later phases sooner if the fight has gone on for a long time.\n" + "Increases the velocity of most boss projectiles by 25%, this is increased to 35% during Boss Rush.\n" + "Boss reactive DR is always active outside of Boss Rush and is increased by 50%."); } diff --git a/Items/DifficultyItems/Revenge.cs b/Items/DifficultyItems/Revenge.cs index 5660709f9e..c438a251f0 100644 --- a/Items/DifficultyItems/Revenge.cs +++ b/Items/DifficultyItems/Revenge.cs @@ -34,8 +34,7 @@ namespace CalamityMod.Items.DifficultyItems // Boss lines "All boss minions no longer drop hearts.\n" + "Changes all boss AIs and some enemy AIs.\n" + - "Increases the health and damage of all bosses.\n" + - "Most bosses will enter later phases sooner if the fight has gone on for a long time."); + "Increases the health and damage of all bosses."); } public override void SetDefaults()