diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 0000000000..21454a9af0
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,64 @@
+# Maintenance notes:
+# - change dotnet-version to 8.0.x once tML updates (keep doing this so long as tML updates .NET),
+# - if/when we un-ignore the .csproj, get rid of creating one in this script.
+
+name: .NET Linter
+
+on:
+ push:
+ branches:
+ - "*"
+ pull_request:
+ branches:
+ - "*"
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: 6.0.x
+
+ - name: Restore dependencies
+ run: |
+ touch CalamityMod.csproj
+ echo '
+
+
+
+ CalamityMod
+ net6.0
+ AnyCPU
+ latest
+
+
+
+
+ ' > CalamityMod.csproj
+
+ dotnet restore
+
+ - name: Pull TML
+ run: |
+ cd ..
+ mkdir ./tmod
+ touch tModLoader.targets
+
+ echo '
+
+ ' > tModLoader.targets
+
+ cd ./tmod
+ wget https://github.com/tModLoader/tModLoader/releases/latest/download/tModLoader.zip
+ unzip tModLoader.zip
+ cd ..
+ cd ./CalamityMod
+
+ - name: Lint
+ run: |
+ dotnet format style CalamityMod.csproj --verify-no-changes
diff --git a/Backgrounds/AstralDesertBG2.png b/Backgrounds/AstralDesertBG2.png
index a2337a7d8f..e8b7a01e29 100644
Binary files a/Backgrounds/AstralDesertBG2.png and b/Backgrounds/AstralDesertBG2.png differ
diff --git a/Backgrounds/AstralDesertSurfaceBGStyle.cs b/Backgrounds/AstralDesertSurfaceBGStyle.cs
new file mode 100644
index 0000000000..181f0d7222
--- /dev/null
+++ b/Backgrounds/AstralDesertSurfaceBGStyle.cs
@@ -0,0 +1,123 @@
+using Microsoft.Xna.Framework.Graphics;
+using System.Reflection;
+using System;
+using Terraria.Graphics.Effects;
+using Terraria;
+using Terraria.ModLoader;
+using Microsoft.Xna.Framework;
+
+namespace CalamityMod.Backgrounds
+{
+ public class AstralDesertSurfaceBGStyle : ModSurfaceBackgroundStyle
+ {
+ internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
+ internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
+ internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
+ readonly int CloseBGYOffset = 475;
+ readonly int MiddleBGYOffset = 475;
+
+ public override void ModifyFarFades(float[] fades, float transitionSpeed)
+ {
+ for (int i = 0; i < fades.Length; i++)
+ {
+ if (i == Slot)
+ {
+ fades[i] += transitionSpeed;
+ if (fades[i] > 1f)
+ fades[i] = 1f;
+ }
+ else
+ {
+ fades[i] -= transitionSpeed;
+ if (fades[i] < 0f)
+ fades[i] = 0f;
+ }
+ }
+ }
+
+ public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceHorizon");
+
+ public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralDesertSurfaceFar");
+
+ public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Skies/AstralDesertSurfaceMiddle");
+
+ public override bool PreDrawCloseBackground(SpriteBatch spriteBatch)
+ {
+ //Please see AstralSurfaceBGStyle for comments, code is pretty much identical here
+ float screenOff = (float)screenOffField.GetValue(Main.instance);
+ float scAdj = (float)scAdjField.GetValue(Main.instance);
+ Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null);
+ Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A);
+ bool canBGDraw = false;
+ if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
+ canBGDraw = true;
+ if (Main.mapFullscreen)
+ canBGDraw = false;
+ int offset = 30;
+ if (Main.gameMenu)
+ offset = 0;
+ if (WorldGen.drunkWorldGen)
+ offset = -180;
+ float surfacePosition = (float)Main.worldSurface;
+ if (surfacePosition == 0f)
+ surfacePosition = 1f;
+ float screenPosition = Main.screenPosition.Y + (float)(Main.screenHeight / 2) - 600f;
+ double backgroundTopMagicNumber = (0f - screenPosition + screenOff / 2f) / (surfacePosition * 16f);
+ float bgGlobalScaleMultiplier = 2f;
+ int pushBGTopHack;
+ int offset2 = -180;
+ int menuOffset = 0;
+ if (Main.gameMenu)
+ {
+ menuOffset -= offset2;
+ }
+ pushBGTopHack = menuOffset;
+ pushBGTopHack += offset;
+ pushBGTopHack += offset2;
+ if (canBGDraw)
+ {
+ var bgScale = 1.25f;
+ var bgParallax = 0.4;
+ var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack;
+ bgScale *= bgGlobalScaleMultiplier;
+ var bgWidthScaled = (int)((float)CalamityMod.AstralDesertSurfaceMiddle.Width * bgScale);
+ SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax);
+ var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
+ if (Main.gameMenu)
+ bgTopY = 320 + pushBGTopHack;
+
+ var bgLoops = Main.screenWidth / bgWidthScaled + 2;
+ if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
+ {
+ for (int i = 0; i < bgLoops; i++)
+ {
+ Main.spriteBatch.Draw(CalamityMod.AstralDesertSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralDesertSurfaceMiddle.Width, CalamityMod.AstralDesertSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ }
+ }
+
+ bgScale = 1.31f;
+ bgParallax = 0.43;
+ bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack;
+ bgScale *= bgGlobalScaleMultiplier;
+ bgWidthScaled = (int)((float)CalamityMod.AstralDesertSurfaceClose.Width * bgScale);
+ SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
+ bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
+ if (Main.gameMenu)
+ {
+ bgTopY = 400 + pushBGTopHack;
+ bgStartX -= 80;
+ }
+
+ bgLoops = Main.screenWidth / bgWidthScaled + 2;
+ if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
+ {
+ for (int i = 0; i < bgLoops; i++)
+ {
+ Main.spriteBatch.Draw(CalamityMod.AstralDesertSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralDesertSurfaceClose.Width, CalamityMod.AstralDesertSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ }
+ }
+ }
+ return false;
+ }
+ }
+}
diff --git a/Backgrounds/AstralSnowBG0.png b/Backgrounds/AstralSnowBG0.png
deleted file mode 100644
index d9db0020e9..0000000000
Binary files a/Backgrounds/AstralSnowBG0.png and /dev/null differ
diff --git a/Backgrounds/AstralSnowBG3.png b/Backgrounds/AstralSnowBG3.png
deleted file mode 100644
index de6901e9e4..0000000000
Binary files a/Backgrounds/AstralSnowBG3.png and /dev/null differ
diff --git a/Backgrounds/AstralSnowBG4.png b/Backgrounds/AstralSnowBG4.png
deleted file mode 100644
index 8f448fb3b4..0000000000
Binary files a/Backgrounds/AstralSnowBG4.png and /dev/null differ
diff --git a/Backgrounds/AstralSnowSurfaceBGStyle.cs b/Backgrounds/AstralSnowSurfaceBGStyle.cs
new file mode 100644
index 0000000000..239fc427b3
--- /dev/null
+++ b/Backgrounds/AstralSnowSurfaceBGStyle.cs
@@ -0,0 +1,148 @@
+using Microsoft.Xna.Framework.Graphics;
+using System.Reflection;
+using System;
+using Terraria.Graphics.Effects;
+using Terraria;
+using Terraria.ModLoader;
+using Microsoft.Xna.Framework;
+using Terraria.GameContent.UI.States;
+
+namespace CalamityMod.Backgrounds
+{
+ public class AstralSnowSurfaceBGStyle : ModSurfaceBackgroundStyle
+ {
+ internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
+ internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
+ internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
+ readonly int FrontBGYOffset = 275;
+ readonly int CloseBGYOffset = 175;
+ readonly int MiddleBGYOffset = 475;
+
+ public override void ModifyFarFades(float[] fades, float transitionSpeed)
+ {
+ for (int i = 0; i < fades.Length; i++)
+ {
+ if (i == Slot)
+ {
+ fades[i] += transitionSpeed;
+ if (fades[i] > 1f)
+ fades[i] = 1f;
+ }
+ else
+ {
+ fades[i] -= transitionSpeed;
+ if (fades[i] < 0f)
+ fades[i] = 0f;
+ }
+ }
+ }
+
+ public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceHorizon");
+
+ public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceFar");
+
+ public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Skies/AstralSnowSurfaceMiddle");
+
+ public override bool PreDrawCloseBackground(SpriteBatch spriteBatch)
+ {
+ //Please see AstralSurfaceBGStyle for comments, code is pretty much identical here
+ float screenOff = (float)screenOffField.GetValue(Main.instance);
+ float scAdj = (float)scAdjField.GetValue(Main.instance);
+ Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null);
+ Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A);
+ bool canBGDraw = false;
+ if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
+ canBGDraw = true;
+ if (Main.mapFullscreen)
+ canBGDraw = false;
+ int offset = 30;
+ if (Main.gameMenu)
+ offset = 0;
+ if (WorldGen.drunkWorldGen)
+ offset = -180;
+ float surfacePosition = (float)Main.worldSurface;
+ if (surfacePosition == 0f)
+ surfacePosition = 1f;
+ float screenPosition = Main.screenPosition.Y + (float)(Main.screenHeight / 2) - 600f;
+ double backgroundTopMagicNumber = (0f - screenPosition + screenOff / 2f) / (surfacePosition * 16f);
+ float bgGlobalScaleMultiplier = 2f;
+ int pushBGTopHack;
+ int offset2 = -180;
+ int menuOffset = 0;
+ if (Main.gameMenu)
+ {
+ menuOffset -= offset2;
+ }
+ pushBGTopHack = menuOffset;
+ pushBGTopHack += offset;
+ pushBGTopHack += offset2;
+ if (canBGDraw)
+ {
+ var bgScale = 1.25f;
+ var bgParallax = 0.4;
+ var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack;
+ bgScale *= bgGlobalScaleMultiplier;
+ var bgWidthScaled = (int)((float)CalamityMod.AstralSnowSurfaceMiddle.Width * bgScale);
+ SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax);
+ var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
+ if (Main.gameMenu)
+ bgTopY = 320 + pushBGTopHack;
+
+ var bgLoops = Main.screenWidth / bgWidthScaled + 2;
+ if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
+ {
+ for (int i = 0; i < bgLoops; i++)
+ {
+ Main.spriteBatch.Draw(CalamityMod.AstralSnowSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSnowSurfaceMiddle.Width, CalamityMod.AstralSnowSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ }
+ }
+
+ bgScale = 1.31f;
+ bgParallax = 0.43;
+ bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack;
+ bgScale *= bgGlobalScaleMultiplier;
+ bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceClose.Width * bgScale);
+ SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
+ bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
+ if (Main.gameMenu)
+ {
+ bgTopY = 400 + pushBGTopHack;
+ bgStartX -= 80;
+ }
+
+ bgLoops = Main.screenWidth / bgWidthScaled + 2;
+ if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
+ {
+ for (int i = 0; i < bgLoops; i++)
+ {
+ Main.spriteBatch.Draw(CalamityMod.AstralSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceClose.Width, CalamityMod.AstralSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ Main.spriteBatch.Draw(CalamityMod.AstralSurfaceCloseGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceCloseGlow.Width, CalamityMod.AstralSurfaceCloseGlow.Height), new Color(Color.White.R * 0.7f, Color.White.G * 0.7f, Color.White.B * 0.7f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ }
+ }
+ bgScale = 1.34f;
+ bgParallax = 0.49;
+ bgTopY = (int)(backgroundTopMagicNumber * 2100.0 + 2000.0) + (int)scAdj + pushBGTopHack;
+ bgScale *= bgGlobalScaleMultiplier;
+ bgWidthScaled = (int)(CalamityMod.AstralSurfaceFront.Width * bgScale);
+ SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
+ bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
+ if (Main.gameMenu)
+ {
+ bgTopY = 480 + pushBGTopHack;
+ bgStartX -= 120;
+ }
+
+ bgLoops = Main.screenWidth / bgWidthScaled + 2;
+ if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
+ {
+ for (int i = 0; i < bgLoops; i++)
+ {
+ Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFront, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFront.Width, CalamityMod.AstralSurfaceFront.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFrontGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFrontGlow.Width, CalamityMod.AstralSurfaceFrontGlow.Height), new Color(Color.White.R * 0.9f, Color.White.G * 0.9f, Color.White.B * 0.9f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ }
+ }
+ }
+ return false;
+ }
+ }
+}
diff --git a/Backgrounds/AstralSnowBG2.png b/Backgrounds/AstralSnowSurfaceMiddle.png
similarity index 100%
rename from Backgrounds/AstralSnowBG2.png
rename to Backgrounds/AstralSnowSurfaceMiddle.png
diff --git a/Backgrounds/AstralSurfaceBGStyle.cs b/Backgrounds/AstralSurfaceBGStyle.cs
index 69f57c1e67..8bb3cd6fd7 100644
--- a/Backgrounds/AstralSurfaceBGStyle.cs
+++ b/Backgrounds/AstralSurfaceBGStyle.cs
@@ -1,19 +1,25 @@
-using Terraria.ModLoader;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework;
+using System.Reflection;
+using System;
+using Terraria.Graphics.Effects;
+using Terraria;
+using Terraria.ModLoader;
namespace CalamityMod.Backgrounds
{
//this is just a blank background, so each custom background will draw over it
public class AstralSurfaceBGStyle : ModSurfaceBackgroundStyle
{
- public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
- {
- b -= 100f;
- return BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
- }
+ internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
+ internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
+ internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
+ readonly int FrontBGYOffset = 275; //Offsets for the height positioning. Make these 0 for backgrounds that want to be the same as treeline backgrounds (backgrounds that have the front 3 layers as trees)
+ readonly int CloseBGYOffset = 175;
+ readonly int MiddleBGYOffset = 475;
public override void ModifyFarFades(float[] fades, float transitionSpeed)
{
- //This just fades in the background and fades out other backgrounds.
for (int i = 0; i < fades.Length; i++)
{
if (i == Slot)
@@ -30,9 +36,123 @@ namespace CalamityMod.Backgrounds
if (fades[i] < 0f)
{
fades[i] = 0f;
- }
}
}
}
+
+ public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceHorizon"); //5th layer (Horizon)
+
+ public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceFar"); //4th layer (Far)
+
+ public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Skies/AstralSurfaceMiddle"); //Fallback texture, not nessesarily needed since predraw returns false
+
+ public override bool PreDrawCloseBackground(SpriteBatch spriteBatch) //Taken from vanilla to draw the front 3 layers, edited to fit tmod and astral background needs
+ {
+ float screenOff = (float)screenOffField.GetValue(Main.instance);
+ float scAdj = (float)scAdjField.GetValue(Main.instance);
+ Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null);
+ Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A); //Astral Biome Coloration with the alpha as the background fade
+ bool canBGDraw = false;
+ if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
+ canBGDraw = true;
+ if (Main.mapFullscreen)
+ canBGDraw = false;
+ int offset = 30;
+ if (Main.gameMenu)
+ offset = 0;
+ if (WorldGen.drunkWorldGen)
+ offset = -180;
+ float surfacePosition = (float)Main.worldSurface;
+ if (surfacePosition == 0f)
+ surfacePosition = 1f;
+ float screenPosition = Main.screenPosition.Y + (float)(Main.screenHeight / 2) - 600f;
+ double backgroundTopMagicNumber = (0f - screenPosition + screenOff / 2f) / (surfacePosition * 16f);
+ float bgGlobalScaleMultiplier = 2f;
+ int pushBGTopHack;
+ int offset2 = -180;
+ int menuOffset = 0;
+ if (Main.gameMenu)
+ {
+ menuOffset -= offset2;
+ }
+ pushBGTopHack = menuOffset;
+ pushBGTopHack += offset;
+ pushBGTopHack += offset2; //Offsets to the background placement
+ if (canBGDraw) //If the background can draw (player is not in a remix world or is not in a map). This can probably be removed since backgrounds already go through these checks
+ {
+ //3rd layer (Middle)
+ var bgScale = 1.25f; //Scale of the furthest of the closest background layers (3rd layer)
+ var bgParallax = 0.4; //The parallax of the background layer
+ var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack; //the Y position of the background
+ bgScale *= bgGlobalScaleMultiplier; //Scale of the background
+ var bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceMiddle.Width * bgScale); //The Width of the bg texture scaled to the correct size
+ SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax);
+ var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2)); //The starting position of the background layer
+ if (Main.gameMenu)
+ bgTopY = 320 + pushBGTopHack; //increases the height in the main menu
+
+ var bgLoops = Main.screenWidth / bgWidthScaled + 2;
+ if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
+ {
+ for (int i = 0; i < bgLoops; i++)
+ {
+ //Draw the texture and its glowmask to each loop of the texture
+ Main.spriteBatch.Draw(CalamityMod.AstralSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceMiddle.Width, CalamityMod.AstralSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ Main.spriteBatch.Draw(CalamityMod.AstralSurfaceMiddleGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceMiddleGlow.Width, CalamityMod.AstralSurfaceMiddleGlow.Height), new Color(Color.White.R * 0.5f, Color.White.G * 0.5f, Color.White.B * 0.5f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ }
+ }
+
+ //2nd layer (Close)
+ //Repeat of above with slight changes to variables
+ bgScale = 1.31f;
+ bgParallax = 0.43;
+ bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack;
+ bgScale *= bgGlobalScaleMultiplier;
+ bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceClose.Width * bgScale);
+ SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
+ bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
+ if (Main.gameMenu)
+ {
+ bgTopY = 400 + pushBGTopHack;
+ bgStartX -= 80; //the initial postion of where the background starts in the main menu is pushed back to not be directly ontop, mostly for tree bgs that use the same treeline texture but faded
+ }
+
+ bgLoops = Main.screenWidth / bgWidthScaled + 2;
+ if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
+ {
+ for (int i = 0; i < bgLoops; i++)
+ {
+ Main.spriteBatch.Draw(CalamityMod.AstralSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceClose.Width, CalamityMod.AstralSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ Main.spriteBatch.Draw(CalamityMod.AstralSurfaceCloseGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceCloseGlow.Width, CalamityMod.AstralSurfaceCloseGlow.Height), new Color(Color.White.R * 0.7f, Color.White.G * 0.7f, Color.White.B * 0.7f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ }
+ }
+
+ //1st layer (Front)
+ //Repeat of above with slight changes to variables
+ bgScale = 1.34f;
+ bgParallax = 0.49;
+ bgTopY = (int)(backgroundTopMagicNumber * 2100.0 + 2000.0) + (int)scAdj + pushBGTopHack;
+ bgScale *= bgGlobalScaleMultiplier;
+ bgWidthScaled = (int)(CalamityMod.AstralSurfaceFront.Width * bgScale);
+ SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
+ bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
+ if (Main.gameMenu)
+ {
+ bgTopY = 480 + pushBGTopHack;
+ bgStartX -= 120;
+ }
+
+ bgLoops = Main.screenWidth / bgWidthScaled + 2;
+ if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
+ {
+ for (int i = 0; i < bgLoops; i++)
+ {
+ Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFront, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFront.Width, CalamityMod.AstralSurfaceFront.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFrontGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFrontGlow.Width, CalamityMod.AstralSurfaceFrontGlow.Height), new Color(Color.White.R * 0.9f, Color.White.G * 0.9f, Color.White.B * 0.9f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
+ }
+ }
+ }
+ return false; //Stop the drawing of the base close background texture (note: does NOT stop the drawing of the Middle and Far textures because tmodloader is slight stupid :blushing:)
+ }
}
-}
\ No newline at end of file
+}
diff --git a/Backgrounds/AstralSnowBG1.png b/Backgrounds/AstralSurfaceClose.png
similarity index 100%
rename from Backgrounds/AstralSnowBG1.png
rename to Backgrounds/AstralSurfaceClose.png
diff --git a/Backgrounds/AstralSnowBG1_Glow.png b/Backgrounds/AstralSurfaceCloseGlow.png
similarity index 100%
rename from Backgrounds/AstralSnowBG1_Glow.png
rename to Backgrounds/AstralSurfaceCloseGlow.png
diff --git a/Backgrounds/AstralSurfaceFar.png b/Backgrounds/AstralSurfaceFar.png
new file mode 100644
index 0000000000..6e90155b16
Binary files /dev/null and b/Backgrounds/AstralSurfaceFar.png differ
diff --git a/Backgrounds/AstralSurfaceFront.png b/Backgrounds/AstralSurfaceFront.png
new file mode 100644
index 0000000000..5d603a737b
Binary files /dev/null and b/Backgrounds/AstralSurfaceFront.png differ
diff --git a/Backgrounds/AstralSnowBG0_Glow.png b/Backgrounds/AstralSurfaceFrontGlow.png
similarity index 100%
rename from Backgrounds/AstralSnowBG0_Glow.png
rename to Backgrounds/AstralSurfaceFrontGlow.png
diff --git a/Backgrounds/AstralSurfaceHorizon.png b/Backgrounds/AstralSurfaceHorizon.png
new file mode 100644
index 0000000000..fa58141a90
Binary files /dev/null and b/Backgrounds/AstralSurfaceHorizon.png differ
diff --git a/Backgrounds/AstralSurfaceBG2.png b/Backgrounds/AstralSurfaceMiddle.png
similarity index 100%
rename from Backgrounds/AstralSurfaceBG2.png
rename to Backgrounds/AstralSurfaceMiddle.png
diff --git a/Backgrounds/AstralSurfaceBG2_Glow.png b/Backgrounds/AstralSurfaceMiddleGlow.png
similarity index 100%
rename from Backgrounds/AstralSurfaceBG2_Glow.png
rename to Backgrounds/AstralSurfaceMiddleGlow.png
diff --git a/Backgrounds/AstralUG4_0.png b/Backgrounds/AstralUG4_0.png
new file mode 100644
index 0000000000..73f3bad550
Binary files /dev/null and b/Backgrounds/AstralUG4_0.png differ
diff --git a/Backgrounds/AstralUG4_1.png b/Backgrounds/AstralUG4_1.png
new file mode 100644
index 0000000000..bf9978ceeb
Binary files /dev/null and b/Backgrounds/AstralUG4_1.png differ
diff --git a/Backgrounds/AstralUG4_2.png b/Backgrounds/AstralUG4_2.png
new file mode 100644
index 0000000000..b36e95b213
Binary files /dev/null and b/Backgrounds/AstralUG4_2.png differ
diff --git a/Backgrounds/AstralUndergroundBGStyle.cs b/Backgrounds/AstralUndergroundBGStyle.cs
index 71f1ec2c50..f3c9455798 100644
--- a/Backgrounds/AstralUndergroundBGStyle.cs
+++ b/Backgrounds/AstralUndergroundBGStyle.cs
@@ -1,4 +1,5 @@
-using Terraria.ModLoader;
+using Terraria;
+using Terraria.ModLoader;
namespace CalamityMod.Backgrounds
{
@@ -6,8 +7,8 @@ namespace CalamityMod.Backgrounds
{
public override void FillTextureArray(int[] textureSlots)
{
- for (int i = 0; i <= 3; i++)
- textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralUG" + i.ToString());
+ for (int i = 0; i <= 4; i++)
+ textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot(i == 4 ? "CalamityMod/Backgrounds/AstralUG" + i.ToString() + "_" + Main.hellBackStyle : "CalamityMod/Backgrounds/AstralUG" + i.ToString());
}
}
}
diff --git a/Backgrounds/SunkenSeaBGStyle.cs b/Backgrounds/SunkenSeaBGStyle.cs
index a4a2b399c3..cfd743dd4f 100644
--- a/Backgrounds/SunkenSeaBGStyle.cs
+++ b/Backgrounds/SunkenSeaBGStyle.cs
@@ -14,4 +14,4 @@ namespace CalamityMod.Backgrounds
}
}
}
-}
\ No newline at end of file
+}
diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs
index 8701e6d028..c36cc58ade 100644
--- a/Balancing/BalancingChangesManager.cs
+++ b/Balancing/BalancingChangesManager.cs
@@ -1,4 +1,6 @@
-using CalamityMod.NPCs.AstrumAureus;
+using System.Collections.Generic;
+using System.Linq;
+using CalamityMod.NPCs.AstrumAureus;
using CalamityMod.NPCs.CeaselessVoid;
using CalamityMod.NPCs.Crabulon;
using CalamityMod.NPCs.ExoMechs.Apollo;
@@ -17,8 +19,6 @@ using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Summon.MirrorofKalandraMinions;
using CalamityMod.Projectiles.Typeless;
-using System.Collections.Generic;
-using System.Linq;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -62,6 +62,10 @@ namespace CalamityMod.Balancing
UniversalBalancingChanges = new List()
{
+ // Nerf Crystal bullet shards by 45%
+ // Currently crystal bullet projectiles deal 50% of the bullet's damage which is absurd in vanilla, this nerfs them to 27.5%
+ Do(new ProjectileResistBalancingRule(0.55f, ProjectileID.CrystalShard)),
+
// Nerf Luminite Arrow trails by 50%.
Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.MoonlordArrowTrail)),
@@ -76,6 +80,7 @@ namespace CalamityMod.Balancing
// Nerf Spectre Mask set bonus projectiles by 30%.
Do(new ProjectileSpecificRequirementBalancingRule(0.7f, SpectreMaskSetBonusFilter)),
+
};
NPCSpecificBalancingChanges = new List();
@@ -107,9 +112,6 @@ namespace CalamityMod.Balancing
// 40% resist to Sky Glaze.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType()))));
-
- // 30% resist to Jester Arrows.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileID.JestersArrow))));
#endregion
#region The Perforators
@@ -127,7 +129,7 @@ namespace CalamityMod.Balancing
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(ResistTrueMelee(0.5f))));
// 50% resist to Adamantite Throwing Axe's lightning.
- // Twisting Thunder and Gael's greatsword use this projectile too, but they are far beyond progression, so who cares!
+ // Twisting Thunder and Gael's Greatsword use this projectile too, but they are far beyond progression, so who cares!
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
// 50% resist to Dormant Brimseeker.
@@ -153,13 +155,19 @@ namespace CalamityMod.Balancing
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(ResistTrueMelee(0.5f))));
- // 50% resist to Dormant Brimseeker.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
-
// 50% resist to Adamantite Throwing Axe's lightning.
// See Aquatic Scourge comment.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
+ // 50% resist to Aftershock's rocks.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
+
+ // 50% resist to Avalanche's Ice Bombs and shards.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType(), ProjectileType()))));
+
+ // 50% resist to Dormant Brimseeker.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
+
// 45% resist to Mounted Scanner.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType()))));
@@ -171,14 +179,11 @@ namespace CalamityMod.Balancing
// 25% resist to Snowstorm Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType(), ProjectileType()))));
-
- // 15% resist to Mineral Mortar's projectile.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType()))));
#endregion
#region Astrum Aureus
- // 35% resist to The Ballista's greatarrows.
- NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), Do(new ProjectileResistBalancingRule(0.65f, ProjectileType()))));
+ // 30% resist to The Ballista's greatarrows.
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), Do(new ProjectileResistBalancingRule(0.7f, ProjectileType()))));
#endregion
#region Ravager
@@ -188,14 +193,29 @@ namespace CalamityMod.Balancing
// 50% resist to Aegis Blade's explosions because the true melee resist ain't enough.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
- // 40% resist to Flying Dragon.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileID.DD2SquireSonicBoom))));
+ // 50% resist to Icicle Arrows.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
+
+ // 35% resist to Flying Dragon.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
// 30% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType()))));
+
+ // 30% resist to Flak Kraken.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType()))));
+
+ // 25% resist to Lucrecia.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType()))));
+
+ // 20% resist to The Hive.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType()))));
#endregion
#region Duke Fishron
+ // 20% vulnerability to The Hive's bees.
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.DukeFishron, Do(new ProjectileResistBalancingRule(1.2f, ProjectileType()))));
+
// 35% vulnerability to Resurrection Butterfly.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.DukeFishron, Do(new ProjectileResistBalancingRule(1.35f, ProjectileType(), ProjectileType()))));
#endregion
@@ -229,22 +249,37 @@ namespace CalamityMod.Balancing
// 75% resist to Plaguenades.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType(), ProjectileType()))));
- // 70% resist to the Stardust Dragon.
+ // 70% resist to Stardust Dragon Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
+ // 70% resist to Charged Blaster Cannon.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.ChargedBlasterLaser))));
+
// 60% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType()))));
+ // 55% resist to Flak Kraken.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType()))));
+
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(ResistTrueMelee(0.5f))));
- // 20% resist to Resurrection Butterfly.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType()))));
+ // 35% resist to Ballistic Poison Bomb's clouds.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType()))));
+
+ // 35% resist to Icicle Arrows.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType()))));
+
+ // 20% resist to Cluster Fragments.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
#endregion
#region Moon Lord
// 20% resist to Mercurial Tides (True Biome Blade).
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType(), ProjectileType()))));
+
+ // 20% resist to The Hive's nuke.
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType()))));
#endregion
#region Profaned Guardians
@@ -255,11 +290,17 @@ namespace CalamityMod.Balancing
#region Providence
// 80% resist to Hell's Sun.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.2f, ProjectileType())));
+
+ // 35% resist to Elemental Lance. This thing desperately needs a rework.
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.65f, ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType())));
#endregion
#region Ceaseless Void: Dark Energies
// 50% resist to true melee.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), ResistTrueMelee(0.5f)));
+
+ // 40% resist to Stellar Torus Staff.
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.6f, ProjectileType())));
#endregion
#region Storm Weaver
@@ -275,18 +316,14 @@ namespace CalamityMod.Balancing
// 50% resist to Pristine Fury's alt fire.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
- // 50% resist to Tactician's Trump Card explosions.
+ // 50% resist to Tactician's Trump Card's explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
- // 25% resist to Molten Amputator blobs.
+ // 25% resist to Molten Amputator's blobs.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType()))));
#endregion
#region Old Duke
- // 60% resist to The Last Mourning's projectiles.
- // This will technically catch pumpkins from The Horseman's Blade but that shouldn't really matter.
- NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.4f, ProjectileType(), ProjectileID.FlamingJack)));
-
// 20% resist to Time Bolt.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.8f, ProjectileType())));
#endregion
@@ -300,7 +337,7 @@ namespace CalamityMod.Balancing
// 35% resist to Venusian Trident's explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType(), ProjectileType()))));
-
+
// 20% resist to Valediction's typhoons; will catch Nuclear Fury as well but that doesn't matter.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType()))));
@@ -332,14 +369,14 @@ namespace CalamityMod.Balancing
// 20% resist to Eclipse's Fall.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType()))));
+ // 20% resist to Rancor.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType()))));
+
// 20% resist to Yharim's Crystal.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType()))));
// 20% resist to Zenith.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FinalFractal))));
-
- // 15% resist to The Enforcer's projectiles.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType()))));
#endregion
#region Exo Mechs: Artemis and Apollo
@@ -355,6 +392,9 @@ namespace CalamityMod.Balancing
// 65% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(ResistTrueMelee(0.35f))));
+ // 65% resist to Stellar Torus Staff.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType()))));
+
// 65% resist to The Enforcer's projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType()))));
@@ -367,39 +407,36 @@ namespace CalamityMod.Balancing
// 50% resist to Chicken Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
+ // 50% resist to Rancor.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
+
// 50% resist to Tarragon Throwing Dart's thorns. (LOL)
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
+ // 50% resist to Omicron's beam.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
+
// 50% resist to Vehemence's skulls.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType(), ProjectileType()))));
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
// 50% resist to Yharim's Crystal.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
- // 45% resist to Wrathwing stealth strike's fireballs.
+ // 45% resist to Wrathwing's stealth strike fireballs.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType()))));
- // 40% resist to Rancor.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType()))));
-
- // 35% resist to The Anomaly's Nanogun bomb explosions.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType()))));
-
- // 35% resist to Ultima.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType()))));
+ // 35% resist to Prismatic Breaker's laser beam.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType()))));
// 30% resist to Eclipse's Fall.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType()))));
- // 30% resist to Prismatic Breaker's laser beam.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType()))));
-
- // 30% resist to Pulse Rifle.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType()))));
-
// 30% resist to Sirius.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType()))));
+ // 30% resist to Ultima's rays.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType()))));
+
// 30% resist to Dragon Scales and The Wand's tornadoes.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType(), ProjectileType()))));
@@ -418,14 +455,20 @@ namespace CalamityMod.Balancing
// 25% resist to Zenith.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.FinalFractal))));
+ // 20% resist to The Anomaly's Nanogun's bomb explosions.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType()))));
+
+ // 20% resist to Ariane's aura (Lilies of Finality).
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType()))));
+
// 20% resist to Blood Boiler.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType()))));
- // 20% resist to Eradicator beams.
+ // 20% resist to Eradicator's beams.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType()))));
// 20% resist to Plasma Grenade and Dynamic Pursuer's explosions.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType(),ProjectileType(), ProjectileType()))));
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType(), ProjectileType()))));
// 20% resist to Voltaic Climax / Void Vortex hitscan beams.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType()))));
@@ -447,6 +490,9 @@ namespace CalamityMod.Balancing
// 30% resist to Surge Driver's alt click comets.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.7f, ProjectileType())));
+ // 30% resist to Supernova
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.7f, ProjectileType(), ProjectileType())));
+
// 20% resist to Executioner's Blade stealth strikes.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.8f, ProjectileType())));
#endregion
@@ -458,6 +504,9 @@ namespace CalamityMod.Balancing
// 50% resist to Subsuming Vortex.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.5f, ProjectileType(), ProjectileType(), ProjectileType())));
+ // 40% resist to Supernova
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.6f, ProjectileType(), ProjectileType())));
+
// 30% resist to Zenith.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.7f, ProjectileID.FinalFractal)));
@@ -469,7 +518,7 @@ namespace CalamityMod.Balancing
// 10% resist to Executioner's Blade stealth strikes.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.9f, ProjectileType())));
-
+
// 10% resist to Surge Driver's alt click comets.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.9f, ProjectileType())));
diff --git a/Balancing/BalancingConstants.cs b/Balancing/BalancingConstants.cs
index f23d2281f1..4b931a4b1f 100644
--- a/Balancing/BalancingConstants.cs
+++ b/Balancing/BalancingConstants.cs
@@ -2,6 +2,7 @@
{
public static class BalancingConstants
{
+ #region Movement
// When the relevant config is enabled: Gives the player a substantial +50% move speed boost at all times
internal static readonly float DefaultMoveSpeedBoost = 0.5f;
@@ -16,12 +17,37 @@
// This is a const because it replaces a hardcoded value in vanilla
internal const float BalloonJumpSpeedBoost = 0.75f;
- // Altered default damage deviation
- internal const int NewDefaultDamageVariationPercent = 5;
+ // Default jump speed boost provided by Frog Leg and tinker combinations in vanilla
+ internal const float VanillaFrogLegJumpSpeedBoost = 1.6f;
- // Sharpening Station grants this much armor penetration to melee weapons.
- internal const float SharpeningStationArmorPenetration = 5f;
+ // Altered jump speed boost provided by Amphibian Boots via global item UpdateAccessory
+ internal static readonly float AmphibianBootsJumpSpeedBoost = 1f;
+ // Altered movement stats provided by Shadow Armor via IL edit
+ // This item is modified to not stack with Magiluminescence if on the ground. If in the air, it still functions.
+ internal static readonly float ShadowArmorRunAccelerationMultiplier = 1.25f; // Vanilla and Magi = 1.75f
+ internal static readonly float ShadowArmorMaxRunSpeedMultiplier = 1.05f; // Vanilla and Magi = 1.15f
+ internal static readonly float ShadowArmorAccRunSpeedMultiplier = 1.05f; // Vanilla and Magi = 1.15f
+ internal static readonly float ShadowArmorRunSlowdownMultiplier = 1.5f; // Vanilla and Magi = 1.75f
+
+ // Altered run acceleration multiplier provided by Soaring Insignia via IL edit
+ // This is a const because it replaces a hardcoded value in vanilla
+ internal const float SoaringInsigniaRunAccelerationMultiplier = 1.1f; // Vanilla = 1.75f
+ #endregion
+
+ #region Immunity Frames
+ // Default immunity frame rules
+ internal const int VanillaDefaultIFrames = 40;
+ internal const int VanillaParryIFrames = 60;
+ internal const int VanillaDodgeIFrames = 80;
+
+ // In vanilla, the Cross Necklace grants +40 iframes to all hits except for in PvP (where it does nothing)
+ // and Brand of the Inferno (where it only gives +30 instead).
+ internal const int CrossNecklaceIFrameBoost = 40;
+ internal const int CrossNecklaceIFrameBoost_Parry = 30;
+ #endregion
+
+ #region Dashes and Dodges
// Dash cooldowns (in frames)
internal const int UniversalDashCooldown = 30;
internal const int UniversalShieldSlamCooldown = 30;
@@ -36,14 +62,35 @@
// Dodge cooldowns (in frames)
// TODO -- Some of these could be moved to the respective item files
- internal static readonly int BeltDodgeCooldown = 5400;
- internal static readonly int BrainDodgeCooldown = 5400;
- internal static readonly int AmalgamDodgeCooldown = 5400;
- internal static readonly int MirrorDodgeCooldown = 5400;
- internal static readonly int DaedalusReflectCooldown = 5400;
- internal static readonly int EvolutionReflectCooldown = 5400;
+ internal static readonly int BeltDodgeCooldownMin = 900;
+ internal static readonly int BeltDodgeCooldownMax = 5400;
+ internal static readonly int BrainDodgeCooldownMin = 900;
+ internal static readonly int BrainDodgeCooldownMax = 5400;
+ internal static readonly int AmalgamDodgeCooldownMin = 900;
+ internal static readonly int AmalgamDodgeCooldownMax = 5400;
+ internal static readonly int MirrorDodgeCooldownMin = 900;
+ internal static readonly int MirrorDodgeCooldownMax = 5400;
+ internal static readonly int DaedalusReflectCooldownMin = 900;
+ internal static readonly int DaedalusReflectCooldownMax = 5400;
+ internal static readonly int EvolutionReflectCooldownMin = 900;
+ internal static readonly int EvolutionReflectCooldownMax = 5400;
+ #endregion
- // Internal vanilla item damage variables
+ #region Damage
+ // Altered default damage deviation
+ internal const int NewDefaultDamageVariationPercent = 5;
+
+ // Summoner cross class nerf
+ internal static readonly float SummonerCrossClassNerf = 0.75f;
+
+ // Summon damage bonuses counting less towards "scales with your best class"
+ internal static readonly float SummonAllClassScalingFactor = 0.75f;
+
+ // Minimum and maximum allowed attack speed ratios when using Calamity Global Item Tweaks
+ internal static readonly float MinimumAllowedAttackSpeed = 0.25f;
+ internal static readonly float MaximumAllowedAttackSpeed = 10f;
+
+ // Internal vanilla whip damage variables
internal static readonly float LeatherWhipTagDamageMultiplier = 1.08f;
internal static readonly float SnapthornTagDamageMultiplier = 1.04f;
internal static readonly float SpinalTapTagDamageMultiplier = 1.08f;
@@ -53,10 +100,72 @@
internal static readonly float MorningStarTagDamageMultiplier = 1.11f;
internal static readonly float KaleidoscopeTagDamageMultiplier = 1.12f;
- // Summoner cross class nerf
- internal static readonly float SummonerCrossClassNerf = 0.75f;
+ // Sharpening Station grants this much armor penetration to melee weapons.
+ internal const float SharpeningStationArmorPenetration = 5f;
- // Rogue stealth
+ // Beetle Scale Mail stats
+ internal static readonly float BeetleScaleMailMeleeDamagePerBeetle = 0.1f;
+ internal static readonly float BeetleScaleMailMeleeSpeedPerBeetle = 0.05f;
+
+ // Nebula Armor Damage Booster
+ internal static readonly float NebulaDamagePerBooster = 0.075f; // 0.15f in vanilla
+
+ // Nebula Armor Mana Booster
+ // nothing here yet
+ #endregion
+
+ #region Life Steal
+ // Life steal cap
+ internal static readonly int LifeStealCap = 100;
+
+ // Life steal accessories require a more strict cooldown due to their ease of use and global application
+ internal static readonly float LifeStealAccessoryCooldownMultiplier = 3f;
+
+ // Life steal cooldown multipliers used for armor set bonuses
+ internal static readonly float LifeStealSetBonusCooldownMultiplier = 2f;
+ internal static readonly float LifeStealReaverTankCooldownMultiplier = 4f;
+
+ // The range was buffed in vanilla from 1200 to 3000 in 1.4.4, and I agree with that decision
+ internal static readonly float LifeStealRange = 3000f;
+
+ // Life steal caps (aka, how much life steal the player is allowed before it goes on cooldown)
+ internal static readonly float LifeStealCap_Classic = 60f;
+ internal static readonly float LifeStealCap_Expert = 50f;
+ internal static readonly float LifeStealCap_Revengeance = 40f;
+ internal static readonly float LifeStealCap_Death = 30f;
+
+ // Master nerfs the life steal cap by 10, resulting in 40 in non-Rev Master, 30 in Rev Master, and 20 in Death Master
+ internal static readonly float LifeStealCapReduction_Master = 10f;
+
+ // The base life steal cooldowns from vanilla
+ internal static readonly float LifeStealRecoveryRate_Classic = 0.6f;
+ internal static readonly float LifeStealRecoveryRate_Expert = 0.5f;
+
+ // The calculations below show the time (in frames) for 10 life steal cooldown to recover in each difficulty
+ // Classic: 10 / 0.2 = 50
+ // Expert: 10 / 0.15 = 66.667
+ // Revengeance: 10 / 0.125 = 80
+ // Death: 10 / 0.1 = 100
+ // Master: 10 / 0.1 = 100
+ // Revengeance Master: 10 / 0.075 = 133.333
+ // Death Master: 10 / 0.05 = 200
+ // Nerfs the life steal recovery rate in Classic from 0.6/s to 0.2/s
+ internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.4f;
+
+ // Nerfs the life steal recovery rate in Expert from 0.5/s to 0.15/s
+ internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.35f;
+
+ // Nerfs the life steal recovery rate in Revengeance from 0.5/s to 0.125/s
+ internal static readonly float LifeStealRecoveryRateReduction_Revengeance = 0.375f;
+
+ // Nerfs the life steal recovery rate in Death from 0.5/s to 0.1/s
+ internal static readonly float LifeStealRecoveryRateReduction_Death = 0.4f;
+
+ // Nerfs the life steal recovery rate in Master by 0.05/s, resulting in 0.1/s in non-Rev Master, 0.075/s in Rev Master, and 0.05/s in Death Master
+ internal static readonly float LifeStealRecoveryRateReduction_Master = 0.05f;
+ #endregion
+
+ #region Rogue Base Stats
// If stealth is too weak, increase this number. If stealth is too strong, decrease this number.
// This value is intentionally not readonly.
public static double UniversalStealthStrikeDamageFactor = 0.42;
@@ -67,37 +176,32 @@
internal static readonly float BaseStealthGenTime = 4f; // 4 seconds
internal static readonly float MovingStealthGenRatio = 0.5f;
+ #endregion
- // Rage
- internal static readonly int DefaultRageDuration = CalamityUtils.SecondsToFrames(9); // Rage lasts 9 seconds by default.
- internal static readonly int RageDurationPerBooster = CalamityUtils.SecondsToFrames(1); // Each booster is +1 second: 10, 11, 12.
- internal static readonly int RageCombatDelayTime = CalamityUtils.SecondsToFrames(10);
- internal static readonly int RageFadeTime = CalamityUtils.SecondsToFrames(30);
- internal static readonly float DefaultRageDamageBoost = 0.35f; // +35%
+ #region Defense, Health and Mana (Armor set stuff)
+ // Beetle Shell's multiplicative DR is removed by Calamity. In compensation, you get this much regular DR per beetle.
+ internal static readonly float BeetleShellDRPerBeetle = 0.1f;
- // Proximity Rage
- // These variables should be used in general to classify "enemies" vs "non-enemies" as well.
- // See NPCUtils.IsAnEnemy
- internal const int TinyHealthThreshold = 5;
- internal const int TinyDamageThreshold = 5;
- // If an enemy has more health than this, they are considered an enemy even if they have 0 contact damage
- internal const int NoContactDamageHealthThreshold = 3000;
- internal const int UnreasonableHealthThreshold = 25000000; // 25 million
+ // Solar Flare Armor's multiplicative DR is removed by Calamity. In compensation, you get this much DR from having at least one solar shield up.
+ internal static readonly float SolarFlareShieldDR = 0.25f;
- // Adrenaline
- internal static readonly float AdrenalineDamageBoost = 2f; // +200%
- internal static readonly float AdrenalineDamagePerBooster = 0.15f; // +15%
- internal static readonly float FullAdrenalineDR = 0.5f; // 50%
- internal static readonly float AdrenalineDRPerBooster = 0.05f; // +5% per booster
+ // Nebula Armor Life Regen
+ internal static readonly int NebulaLifeRegenPerBooster = 4; // 6 in vanilla
- // Summon damage bonuses counting less towards "scales with your best class"
- internal static readonly float SummonAllClassScalingFactor = 0.75f;
+ // Nebula Armor Mana Regen
+ // This value works differently than you might expect. Raising it actually nerfs the mana regeneration of Nebula Armor
+ // Every frame, Terraria adds 1 to a counter for each Mana Booster the player has.
+ // If this counter reaches the below threshold, that player gains 1 mana.
+ // By default, it's 6, which has the following effects:
+ // 1 booster = +1 mana every 6 frames = +10 mana per second
+ // 2 boosters = +1 mana every 3 frames = +20 mana per second
+ // 3 boosters = +1 mana every 2 frames = +30 mana per second
+ //
+ // Calamity just halves this, that's probably good enough.
+ internal static readonly int NebulaManaRegenFrameCounterThreshold = 12; // 6 in vanilla
+ #endregion
- // Minimum and maximum allowed attack speed ratios when using Calamity Global Item Tweaks
- internal static readonly float MinimumAllowedAttackSpeed = 0.25f;
- internal static readonly float MaximumAllowedAttackSpeed = 10f;
-
- // Defense Damage
+ #region Defense Damage
internal const double DefaultDefenseDamageRatio = 0.3333;
// Defense damage floor: PHM | HM | PML
@@ -107,15 +211,46 @@
// Death Mode: 5 | 12 | 24
// Boss Rush: 25
internal static readonly int DefenseDamageFloor_NormalPHM = 3;
- internal static readonly int DefenseDamageFloor_NormalHM = 8;
+ internal static readonly int DefenseDamageFloor_NormalHM = 8;
internal static readonly int DefenseDamageFloor_NormalPML = 16;
- internal static readonly int DefenseDamageFloor_RevPHM = 4;
- internal static readonly int DefenseDamageFloor_RevHM = 10;
- internal static readonly int DefenseDamageFloor_RevPML = 20;
- internal static readonly int DefenseDamageFloor_DeathPHM = 5;
- internal static readonly int DefenseDamageFloor_DeathHM = 12;
- internal static readonly int DefenseDamageFloor_DeathPML = 24;
- internal static readonly int DefenseDamageFloor_BossRush = 25;
+ internal static readonly int DefenseDamageFloor_RevPHM = 4;
+ internal static readonly int DefenseDamageFloor_RevHM = 10;
+ internal static readonly int DefenseDamageFloor_RevPML = 20;
+ internal static readonly int DefenseDamageFloor_DeathPHM = 5;
+ internal static readonly int DefenseDamageFloor_DeathHM = 12;
+ internal static readonly int DefenseDamageFloor_DeathPML = 24;
+ internal static readonly int DefenseDamageFloor_BossRush = 25;
+ #endregion
+
+ #region Rage and Adrenaline (Rippers)
+ internal static readonly int DefaultRageDuration = CalamityUtils.SecondsToFrames(9); // Rage lasts 9 seconds by default.
+ internal static readonly int RageDurationPerBooster = CalamityUtils.SecondsToFrames(1); // Each booster is +1 second: 10, 11, 12.
+ internal static readonly int RageCombatDelayTime = CalamityUtils.SecondsToFrames(10);
+ internal static readonly int RageFadeTime = CalamityUtils.SecondsToFrames(30);
+ internal static readonly float DefaultRageDamageBoost = 0.35f; // +35%
+
+ internal static readonly float AdrenalineDamageBoost = 1.5f; // +150%
+ internal static readonly float AdrenalineDamagePerBooster = 0.2f; // +20%
+ internal static readonly float FullAdrenalineDR = 0.5f; // 50%
+ internal static readonly float AdrenalineDRPerBooster = 0.05f; // +5% per booster
+
+ internal static readonly int AdrenalinePauseAfterDamage = CalamityUtils.SecondsToFrames(1);
+ internal static readonly float MinimumAdrenalineLoss = 0.25f; // No matter how small a hit, you will always lose at least 25% current Adrenaline
+ internal static readonly float AdrenalineFalloffTinyHitHealthRatio = 0.05f; // Hits for 5% max HP or less result in less Adrenaline loss
+
+ internal static readonly float TrueMeleeRipperReductionFactor = 0.5f; // True melee benefits less from rippers to prevent excessive melting.
+ #endregion
+
+ // TODO -- NPC classification is not done consistently with predictable thresholds.
+ // These variables should be used in general to classify "enemies" vs "non-enemies" as well.
+ // See NPCUtils.IsAnEnemy
+ #region NPC Classification
+ internal const int TinyHealthThreshold = 5;
+ internal const int TinyDamageThreshold = 5;
+ // If an enemy has more health than this, they are considered an enemy even if they have 0 contact damage
+ internal const int NoContactDamageHealthThreshold = 3000;
+ internal const int UnreasonableHealthThreshold = 25000000; // 25 million
+ #endregion
// TODO -- Add all balance related constants here that don't belong in other files.
// Review all constants and static readonlys in the entire mod to find things to add.
diff --git a/Balancing/NPCBalancingChange.cs b/Balancing/NPCBalancingChange.cs
index 400e6c1a3d..f59f527a83 100644
--- a/Balancing/NPCBalancingChange.cs
+++ b/Balancing/NPCBalancingChange.cs
@@ -1,4 +1,4 @@
-namespace CalamityMod.Balancing
+namespace CalamityMod.Balancing
{
public struct NPCBalancingChange
{
diff --git a/BiomeManagers/AbovegroundAstralBiome.cs b/BiomeManagers/AbovegroundAstralBiome.cs
deleted file mode 100644
index 2f2231a077..0000000000
--- a/BiomeManagers/AbovegroundAstralBiome.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using CalamityMod.Items.Placeables.Furniture;
-using CalamityMod.Systems;
-using Terraria;
-using Terraria.Graphics.Effects;
-using Terraria.ID;
-using Terraria.ModLoader;
-
-namespace CalamityMod.BiomeManagers
-{
- public class AbovegroundAstralBiome : ModBiome
- {
- public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater");
- public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find("CalamityMod/AstralUndergroundBGStyle");
- public override int BiomeTorchItemType => ModContent.ItemType();
- public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
- public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbovegroundAstralBiomeIcon";
- public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
- public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
-
- public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
-
- public override bool IsBiomeActive(Player player)
- {
- return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950;
- }
-
- public override void SpecialVisuals(Player player, bool isActive)
- {
- player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive);
- }
- }
-}
diff --git a/BiomeManagers/AbovegroundAstralBiomeSurface.cs b/BiomeManagers/AbovegroundAstralBiomeSurface.cs
deleted file mode 100644
index e28e88c475..0000000000
--- a/BiomeManagers/AbovegroundAstralBiomeSurface.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using CalamityMod.Items.Placeables.Furniture;
-using CalamityMod.Systems;
-using Terraria;
-using Terraria.Graphics.Effects;
-using Terraria.ID;
-using Terraria.ModLoader;
-
-namespace CalamityMod.BiomeManagers
-{
- public class AbovegroundAstralBiomeSurface : ModBiome
- {
- public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater");
- public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find("CalamityMod/AstralSurfaceBGStyle");
- public override int BiomeTorchItemType => ModContent.ItemType();
- public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
- public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
-
- public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
-
- public override bool IsBiomeActive(Player player)
- {
- return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && !player.ZoneSnow && !player.ZoneDesert;
- }
- }
-}
diff --git a/BiomeManagers/AbovegroundAstralDesertBiome.cs b/BiomeManagers/AbovegroundAstralDesertBiome.cs
deleted file mode 100644
index 6f3106f34c..0000000000
--- a/BiomeManagers/AbovegroundAstralDesertBiome.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using CalamityMod.Items.Placeables.Furniture;
-using CalamityMod.Systems;
-using Terraria;
-using Terraria.Graphics.Effects;
-using Terraria.ID;
-using Terraria.ModLoader;
-
-namespace CalamityMod.BiomeManagers
-{
- public class AbovegroundAstralDesertBiome : ModBiome
- {
- public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater");
- public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find("CalamityMod/AstralSurfaceBGStyle");
- public override int BiomeTorchItemType => ModContent.ItemType();
- public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
- public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralDesertIcon";
- // Could use its own unique background
- public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
- public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
- public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
-
- public override bool IsBiomeActive(Player player)
- {
- return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && player.ZoneDesert && !player.ZoneSnow;
- }
- }
-}
diff --git a/BiomeManagers/AbovegroundAstralSnowBiome.cs b/BiomeManagers/AbovegroundAstralSnowBiome.cs
deleted file mode 100644
index 7551f035c7..0000000000
--- a/BiomeManagers/AbovegroundAstralSnowBiome.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using CalamityMod.Items.Placeables.Furniture;
-using CalamityMod.Systems;
-using Terraria;
-using Terraria.Graphics.Effects;
-using Terraria.ID;
-using Terraria.ModLoader;
-
-namespace CalamityMod.BiomeManagers
-{
- public class AbovegroundAstralSnowBiome : ModBiome
- {
- public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater");
- public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find("CalamityMod/AstralSurfaceBGStyle");
- public override int BiomeTorchItemType => ModContent.ItemType();
- public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
- public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
-
- public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
-
- public override bool IsBiomeActive(Player player)
- {
- return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && player.ZoneSnow;
- }
- }
-}
diff --git a/BiomeManagers/AbyssLayer1Biome.cs b/BiomeManagers/AbyssLayer1Biome.cs
index 0a682e224a..a3b73e8f4b 100644
--- a/BiomeManagers/AbyssLayer1Biome.cs
+++ b/BiomeManagers/AbyssLayer1Biome.cs
@@ -1,7 +1,7 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Placeables.FurnitureAbyss;
-using CalamityMod.World;
using CalamityMod.Systems;
+using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -42,7 +42,7 @@ namespace CalamityMod.BiomeManagers
if (Main.remixWorld)
return !player.lavaWet && !player.honeyWet && abyssPosX && playerYTileCoords < abyssStartHeight;
- return !player.lavaWet && !player.honeyWet && abyssPosX && playerYTileCoords >= abyssStartHeight && playerYTileCoords <= Main.maxTilesY - 200;
+ return !player.lavaWet && !player.honeyWet && abyssPosX && playerYTileCoords >= abyssStartHeight && playerYTileCoords <= Main.UnderworldLayer;
}
// Temporarily use sulphur for now
diff --git a/BiomeManagers/AbyssLayer2Biome.cs b/BiomeManagers/AbyssLayer2Biome.cs
index f4d123ec1c..cf20c66664 100644
--- a/BiomeManagers/AbyssLayer2Biome.cs
+++ b/BiomeManagers/AbyssLayer2Biome.cs
@@ -32,10 +32,10 @@ namespace CalamityMod.BiomeManagers
if (Main.remixWorld)
{
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && BiomeTileCounterSystem.Layer2Tiles >= 200 &&
- playerYTileCoords <= SulphurousSea.YStart - (int)((Main.maxTilesY - 200) * 0.2f) && playerYTileCoords > SulphurousSea.YStart - (int)((Main.maxTilesY - 200) * 0.4f);
+ playerYTileCoords <= SulphurousSea.YStart - (int)(Main.UnderworldLayer * 0.2f) && playerYTileCoords > SulphurousSea.YStart - (int)(Main.UnderworldLayer * 0.4f);
}
- return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords2) && BiomeTileCounterSystem.Layer2Tiles >= 200 &&
+ return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords2) && BiomeTileCounterSystem.Layer2Tiles >= 200 &&
playerYTileCoords2 > Main.rockLayer - 10 && playerYTileCoords2 <= Main.rockLayer + Main.maxTilesY * 0.143;
}
}
diff --git a/BiomeManagers/AbyssLayer3Biome.cs b/BiomeManagers/AbyssLayer3Biome.cs
index 536a17d861..5fa549ef5b 100644
--- a/BiomeManagers/AbyssLayer3Biome.cs
+++ b/BiomeManagers/AbyssLayer3Biome.cs
@@ -32,7 +32,7 @@ namespace CalamityMod.BiomeManagers
if (Main.remixWorld)
{
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && BiomeTileCounterSystem.Layer3Tiles >= 200 &&
- playerYTileCoords <= SulphurousSea.YStart - (int)((Main.maxTilesY - 200) * 0.4f) && playerYTileCoords > SulphurousSea.YStart - (int)((Main.maxTilesY - 200) * 0.6f);
+ playerYTileCoords <= SulphurousSea.YStart - (int)(Main.UnderworldLayer * 0.4f) && playerYTileCoords > SulphurousSea.YStart - (int)(Main.UnderworldLayer * 0.6f);
}
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords2) && BiomeTileCounterSystem.Layer3Tiles >= 200 &&
diff --git a/BiomeManagers/AbyssLayer4Biome.cs b/BiomeManagers/AbyssLayer4Biome.cs
index 3bc3bceff3..de29933f2d 100644
--- a/BiomeManagers/AbyssLayer4Biome.cs
+++ b/BiomeManagers/AbyssLayer4Biome.cs
@@ -32,7 +32,7 @@ namespace CalamityMod.BiomeManagers
if (Main.remixWorld)
{
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && BiomeTileCounterSystem.Layer4Tiles >= 200 &&
- playerYTileCoords <= SulphurousSea.YStart - (int)((Main.maxTilesY - 200) * 0.6f);
+ playerYTileCoords <= SulphurousSea.YStart - (int)(Main.UnderworldLayer * 0.6f);
}
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords2) && BiomeTileCounterSystem.Layer4Tiles >= 200 &&
diff --git a/BiomeManagers/ArsenalLabBiome.cs b/BiomeManagers/ArsenalLabBiome.cs
index 649978519a..f7d93fb0ee 100644
--- a/BiomeManagers/ArsenalLabBiome.cs
+++ b/BiomeManagers/ArsenalLabBiome.cs
@@ -5,7 +5,7 @@ namespace CalamityMod.BiomeManagers
public class ArsenalLabBiome : ModBiome
{
public override string BestiaryIcon => "CalamityMod/BiomeManagers/LaboratoryIcon";
- // Could use its own unique background if someone even bothers
+ // Could use its own unique background if someone even bothers
public override string BackgroundPath => "Terraria/Images/MapBG32";
//Does this even need proper detection, this file solely exists for a few critter entries and the detection code is done elsewhere
diff --git a/BiomeManagers/AstralInfectionBiome.cs b/BiomeManagers/AstralInfectionBiome.cs
new file mode 100644
index 0000000000..980d34e0da
--- /dev/null
+++ b/BiomeManagers/AstralInfectionBiome.cs
@@ -0,0 +1,112 @@
+using CalamityMod.Items.Placeables.Furniture;
+using CalamityMod.Systems;
+using Terraria;
+using Terraria.GameContent.Events;
+using Terraria.ID;
+using Terraria.ModLoader;
+
+namespace CalamityMod.BiomeManagers
+{
+ public class AstralInfectionBiome : ModBiome
+ {
+ public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater");
+
+ public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle
+ {
+ get
+ {
+ if (Main.LocalPlayer.ZoneSnow) //Snow
+ {
+ return ModContent.Find("CalamityMod/AstralSnowSurfaceBGStyle");
+ }
+ else if (Main.LocalPlayer.ZoneDesert && !Main.LocalPlayer.ZoneSnow) //Desert
+ {
+ return ModContent.Find("CalamityMod/AstralDesertSurfaceBGStyle");
+ }
+ else //surface
+ {
+ return ModContent.Find("CalamityMod/AstralSurfaceBGStyle");
+ }
+ }
+ }
+
+ public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle
+ {
+ get
+ {
+ if (Main.LocalPlayer.ZoneSnow)
+ {
+ return ModContent.Find("CalamityMod/AstralUndergroundBGStyle"); // Could use its own unique background
+ }
+ return ModContent.Find("CalamityMod/AstralUndergroundBGStyle");
+ }
+ }
+
+ public override int BiomeTorchItemType => ModContent.ItemType();
+
+ public override SceneEffectPriority Priority
+ {
+ get
+ {
+ if (Main.LocalPlayer.ZoneDesert && Sandstorm.Happening && !(Main.LocalPlayer.ZoneSnow || Main.slimeRain || Main.eclipse))
+ {
+ return SceneEffectPriority.Environment;
+ }
+ else
+ {
+ return SceneEffectPriority.BiomeHigh;
+ }
+ }
+ }
+
+ public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbovegroundAstralBiomeIcon";
+
+ public override string BackgroundPath
+ {
+ get
+ {
+ if (Main.LocalPlayer.ZoneDesert && !Main.LocalPlayer.ZoneSnow)
+ {
+ //desert
+ return "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; // Could use its own unique background
+ }
+ else if (Main.LocalPlayer.ZoneDirtLayerHeight || Main.LocalPlayer.ZoneRockLayerHeight || Main.LocalPlayer.ZoneUnderworldHeight)
+ {
+ //underground
+ return "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; // Could use its own unique background
+ }
+ else
+ {
+ return "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
+ }
+ }
+ }
+ public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
+
+ public override int Music
+ {
+ get
+ {
+ if (Main.LocalPlayer.ZoneDirtLayerHeight || Main.LocalPlayer.ZoneRockLayerHeight || Main.LocalPlayer.ZoneUnderworldHeight)
+ {
+ return CalamityMod.Instance.GetMusicFromMusicMod("AstralInfectionUnderground") ?? MusicID.Space;
+ }
+ return CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
+ }
+ }
+
+ public override bool IsBiomeActive(Player player)
+ {
+ return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950;
+ }
+
+ public override void SpecialVisuals(Player player, bool isActive)
+ {
+ player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive);
+ if (Main.LocalPlayer.ZoneDirtLayerHeight || Main.LocalPlayer.ZoneRockLayerHeight || Main.LocalPlayer.ZoneUnderworldHeight)
+ {
+ player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive); //underground
+ }
+ }
+ }
+}
diff --git a/BiomeManagers/AcidRainBiome.cs b/BiomeManagers/BestiaryCategories/AcidRainBiome.cs
similarity index 100%
rename from BiomeManagers/AcidRainBiome.cs
rename to BiomeManagers/BestiaryCategories/AcidRainBiome.cs
diff --git a/BiomeManagers/BestiaryCategories/AstralCaveDesert.cs b/BiomeManagers/BestiaryCategories/AstralCaveDesert.cs
new file mode 100644
index 0000000000..8f7d2a9a30
--- /dev/null
+++ b/BiomeManagers/BestiaryCategories/AstralCaveDesert.cs
@@ -0,0 +1,11 @@
+using Terraria.ModLoader;
+
+namespace CalamityMod.BiomeManagers.BestiaryCategories
+{
+ public class AstralCaveDesert : ModBiome //Unused, currently
+ {
+ public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralCaveDesertIcon";
+
+ public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
+ }
+}
diff --git a/BiomeManagers/BestiaryCategories/AstralDesert.cs b/BiomeManagers/BestiaryCategories/AstralDesert.cs
new file mode 100644
index 0000000000..29b0a3f907
--- /dev/null
+++ b/BiomeManagers/BestiaryCategories/AstralDesert.cs
@@ -0,0 +1,11 @@
+using Terraria.ModLoader;
+
+namespace CalamityMod.BiomeManagers.BestiaryCategories
+{
+ public class AstralDesert : ModBiome
+ {
+ public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralDesertIcon";
+
+ public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
+ }
+}
diff --git a/BiomeManagers/BestiaryCategories/AstralIce.cs b/BiomeManagers/BestiaryCategories/AstralIce.cs
new file mode 100644
index 0000000000..f478ae1ee9
--- /dev/null
+++ b/BiomeManagers/BestiaryCategories/AstralIce.cs
@@ -0,0 +1,11 @@
+using Terraria.ModLoader;
+
+namespace CalamityMod.BiomeManagers.BestiaryCategories
+{
+ public class AstralIce : ModBiome //Unused, currently
+ {
+ public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralIceIcon";
+
+ public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
+ }
+}
diff --git a/BiomeManagers/BestiaryCategories/AstralUnderground.cs b/BiomeManagers/BestiaryCategories/AstralUnderground.cs
new file mode 100644
index 0000000000..42d924fd5b
--- /dev/null
+++ b/BiomeManagers/BestiaryCategories/AstralUnderground.cs
@@ -0,0 +1,11 @@
+using Terraria.ModLoader;
+
+namespace CalamityMod.BiomeManagers.BestiaryCategories
+{
+ public class AstralUnderground : ModBiome
+ {
+ public override string BestiaryIcon => "CalamityMod/BiomeManagers/UndergroundAstralIcon";
+
+ public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
+ }
+}
diff --git a/BiomeManagers/SulphurousSeaBiome.cs b/BiomeManagers/SulphurousSeaBiome.cs
index ece1c0c2b6..fb170f3449 100644
--- a/BiomeManagers/SulphurousSeaBiome.cs
+++ b/BiomeManagers/SulphurousSeaBiome.cs
@@ -15,7 +15,7 @@ namespace CalamityMod.BiomeManagers
public class SulphurousSeaBiome : ModBiome
{
public override ModWaterStyle WaterStyle => Main.zenithWorld ? ModContent.Find("CalamityMod/PissWater") : ModContent.Find("CalamityMod/SulphuricWater");
- public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => Main.zenithWorld ?ModContent.Find("CalamityMod/PissSeaSurfaceBGStyle") : ModContent.Find("CalamityMod/SulphurSeaSurfaceBGStyle");
+ public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => Main.zenithWorld ? ModContent.Find("CalamityMod/PissSeaSurfaceBGStyle") : ModContent.Find("CalamityMod/SulphurSeaSurfaceBGStyle");
public override int BiomeTorchItemType => ModContent.ItemType();
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SulphurousSeaIcon";
@@ -45,7 +45,7 @@ namespace CalamityMod.BiomeManagers
? CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaNight") ?? MusicID.Desert // Nighttime
: CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaDay") ?? MusicID.Desert; // Daytime
}
-
+
return music;
}
}
@@ -69,13 +69,13 @@ namespace CalamityMod.BiomeManagers
sulphurPosX = true;
}
}
-
+
if (Main.remixWorld)
- return (BiomeTileCounterSystem.SulphurTiles >= 300 || (point.Y > SulphurousSea.YStart && point.Y < Main.maxTilesY - 200 && sulphurPosX && !WeakReferenceSupport.InAnySubworld())) && !player.Calamity().ZoneAbyss;
+ return (BiomeTileCounterSystem.SulphurTiles >= 300 || (point.Y > SulphurousSea.YStart && point.Y < Main.UnderworldLayer && sulphurPosX && !WeakReferenceSupport.InAnySubworld())) && !player.Calamity().ZoneAbyss;
return (BiomeTileCounterSystem.SulphurTiles >= 300 || (point.Y < (Main.rockLayer - Main.maxTilesY / 13) && sulphurPosX && !WeakReferenceSupport.InAnySubworld())) && !player.Calamity().ZoneAbyss;
}
-
+
public override void SpecialVisuals(Player player, bool isActive)
{
string biomeName = "CalamityMod:SulphurSea";
diff --git a/BiomeManagers/SunkenSeaBiome.cs b/BiomeManagers/SunkenSeaBiome.cs
index d1f135f472..eda95f35b0 100644
--- a/BiomeManagers/SunkenSeaBiome.cs
+++ b/BiomeManagers/SunkenSeaBiome.cs
@@ -61,7 +61,7 @@ namespace CalamityMod.BiomeManagers
}
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
- // Placeholder until we get a dedicated Sunken Sea background
+ // Placeholder until we get a dedicated Sunken Sea background
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
diff --git a/BiomeManagers/UndergroundAstralBiome.cs b/BiomeManagers/UndergroundAstralBiome.cs
deleted file mode 100644
index f3d0ac4197..0000000000
--- a/BiomeManagers/UndergroundAstralBiome.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using CalamityMod.Systems;
-using Terraria;
-using Terraria.ID;
-using Terraria.ModLoader;
-
-namespace CalamityMod.BiomeManagers
-{
- public class UndergroundAstralBiome : ModBiome
- {
- public override ModWaterStyle WaterStyle => ModContent.Find("CalamityMod/AstralWater");
- public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find("CalamityMod/AstralUndergroundBGStyle");
- public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
- public override string BestiaryIcon => "CalamityMod/BiomeManagers/UndergroundAstralIcon";
- // Could use its own unique background
- public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
- public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
-
- public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfectionUnderground") ?? MusicID.Space;
-
- public override bool IsBiomeActive(Player player)
- {
- return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight);
- }
-
- public override void SpecialVisuals(Player player, bool isActive)
- {
- player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive);
- }
-
- // Just slightly above the above-ground astral biomes.
- public override float GetWeight(Player player) => 0.51f;
- }
-}
diff --git a/Buffs/Alcohol/AlcoholPoisoning.cs b/Buffs/Alcohol/AlcoholPoisoning.cs
index 1cd54aafbf..d130aaf523 100644
--- a/Buffs/Alcohol/AlcoholPoisoning.cs
+++ b/Buffs/Alcohol/AlcoholPoisoning.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/CaribbeanRumBuff.cs b/Buffs/Alcohol/CaribbeanRumBuff.cs
index 6889e04475..f20c460c74 100644
--- a/Buffs/Alcohol/CaribbeanRumBuff.cs
+++ b/Buffs/Alcohol/CaribbeanRumBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/CinnamonRollBuff.cs b/Buffs/Alcohol/CinnamonRollBuff.cs
index 4d7afaa059..3d4daff7ea 100644
--- a/Buffs/Alcohol/CinnamonRollBuff.cs
+++ b/Buffs/Alcohol/CinnamonRollBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/EverclearBuff.cs b/Buffs/Alcohol/EverclearBuff.cs
index 15941b549c..eed852d449 100644
--- a/Buffs/Alcohol/EverclearBuff.cs
+++ b/Buffs/Alcohol/EverclearBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/FabsolVodkaBuff.cs b/Buffs/Alcohol/FabsolVodkaBuff.cs
index 9b4178915d..b74e8639c1 100644
--- a/Buffs/Alcohol/FabsolVodkaBuff.cs
+++ b/Buffs/Alcohol/FabsolVodkaBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/FireballBuff.cs b/Buffs/Alcohol/FireballBuff.cs
index 0ba5b1e676..aa2e9e9f96 100644
--- a/Buffs/Alcohol/FireballBuff.cs
+++ b/Buffs/Alcohol/FireballBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/MargaritaBuff.cs b/Buffs/Alcohol/MargaritaBuff.cs
index 03f843a8c3..fb43c678dc 100644
--- a/Buffs/Alcohol/MargaritaBuff.cs
+++ b/Buffs/Alcohol/MargaritaBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/MoonshineBuff.cs b/Buffs/Alcohol/MoonshineBuff.cs
index 47723c0ed2..d9ce511042 100644
--- a/Buffs/Alcohol/MoonshineBuff.cs
+++ b/Buffs/Alcohol/MoonshineBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/MoscowMuleBuff.cs b/Buffs/Alcohol/MoscowMuleBuff.cs
index 8c38f67a11..577fe35a1c 100644
--- a/Buffs/Alcohol/MoscowMuleBuff.cs
+++ b/Buffs/Alcohol/MoscowMuleBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/RedWineBuff.cs b/Buffs/Alcohol/RedWineBuff.cs
index 77ad1a63fb..bad080168d 100644
--- a/Buffs/Alcohol/RedWineBuff.cs
+++ b/Buffs/Alcohol/RedWineBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/RumBuff.cs b/Buffs/Alcohol/RumBuff.cs
index 8b446acddf..dac1bd0d2a 100644
--- a/Buffs/Alcohol/RumBuff.cs
+++ b/Buffs/Alcohol/RumBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/ScrewdriverBuff.cs b/Buffs/Alcohol/ScrewdriverBuff.cs
index 5c1f314079..1487717507 100644
--- a/Buffs/Alcohol/ScrewdriverBuff.cs
+++ b/Buffs/Alcohol/ScrewdriverBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/StarBeamRyeBuff.cs b/Buffs/Alcohol/StarBeamRyeBuff.cs
index 14a15bb41f..e8dde8ea60 100644
--- a/Buffs/Alcohol/StarBeamRyeBuff.cs
+++ b/Buffs/Alcohol/StarBeamRyeBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/TequilaBuff.cs b/Buffs/Alcohol/TequilaBuff.cs
index f49d1c7fa9..ac8b8cb4c0 100644
--- a/Buffs/Alcohol/TequilaBuff.cs
+++ b/Buffs/Alcohol/TequilaBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/TequilaSunriseBuff.cs b/Buffs/Alcohol/TequilaSunriseBuff.cs
index ec85e2e852..1fd115ce63 100644
--- a/Buffs/Alcohol/TequilaSunriseBuff.cs
+++ b/Buffs/Alcohol/TequilaSunriseBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/Trippy.cs b/Buffs/Alcohol/Trippy.cs
index 6c31ff9dad..e791bdd796 100644
--- a/Buffs/Alcohol/Trippy.cs
+++ b/Buffs/Alcohol/Trippy.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
diff --git a/Buffs/Alcohol/VodkaBuff.cs b/Buffs/Alcohol/VodkaBuff.cs
index 26f2140fdb..851c0cecca 100644
--- a/Buffs/Alcohol/VodkaBuff.cs
+++ b/Buffs/Alcohol/VodkaBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/WhiskeyBuff.cs b/Buffs/Alcohol/WhiskeyBuff.cs
index ea3c7bfa12..a496f75f18 100644
--- a/Buffs/Alcohol/WhiskeyBuff.cs
+++ b/Buffs/Alcohol/WhiskeyBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Alcohol/WhiteWineBuff.cs b/Buffs/Alcohol/WhiteWineBuff.cs
index 277a60405e..c4781b20ef 100644
--- a/Buffs/Alcohol/WhiteWineBuff.cs
+++ b/Buffs/Alcohol/WhiteWineBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs
index 18d1069634..a8239f952a 100644
--- a/Buffs/CalamityGlobalBuff.cs
+++ b/Buffs/CalamityGlobalBuff.cs
@@ -1,6 +1,6 @@
-using CalamityMod.Buffs.StatDebuffs;
+using CalamityMod.Balancing;
+using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.NPCs;
-using System.Text;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
@@ -73,33 +73,25 @@ namespace CalamityMod.Buffs
{
player.endurance -= 0.1f;
}
- else if (type >= BuffID.NebulaUpDmg1 && type <= BuffID.NebulaUpDmg3)
+
+ // Beetle Shell DR is a full compensation, as the vanilla multiplicative DR is removed entirely.
+ else if (type >= BuffID.BeetleEndurance1 && type <= BuffID.BeetleEndurance3 && player.beetleDefense)
{
- float nebulaDamage = 0.075f * player.nebulaLevelDamage; // 15% to 45% changed to 7.5% to 22.5%
- player.GetDamage() -= nebulaDamage;
+ int orbsToGrant = player.beetleOrbs < 0 ? 0 : player.beetleOrbs;
+ if (orbsToGrant > 3)
+ orbsToGrant = 3;
+ player.endurance += BalancingConstants.BeetleShellDRPerBeetle * orbsToGrant;
}
- else if (type == BuffID.Warmth)
+
+ // Solar Flare DR is a full compensation, as the vanilla multiplicative DR is removed entirely.
+ else if (type >= BuffID.SolarShield1 && type <= BuffID.SolarShield3)
{
- player.buffImmune[ModContent.BuffType()] = true;
- player.buffImmune[BuffID.Frozen] = true;
- player.buffImmune[BuffID.Chilled] = true;
+ player.endurance += BalancingConstants.SolarFlareShieldDR;
}
else if (type == BuffID.Rabies)
{
player.GetDamage() -= 0.2f;
}
- else if (type == BuffID.BeetleMight1)
- {
- player.GetAttackSpeed() -= 0.05f;
- }
- else if (type == BuffID.BeetleMight2)
- {
- player.GetAttackSpeed() -= 0.1f;
- }
- else if (type == BuffID.BeetleMight3)
- {
- player.GetAttackSpeed() -= 0.15f;
- }
}
public override void Update(int type, NPC npc, ref int buffIndex)
@@ -187,7 +179,7 @@ namespace CalamityMod.Buffs
case BuffID.Mining:
tip = tip.Replace("25", "15");
break;
-
+
case BuffID.MonsterBanner: //Vanilla's wording is unclear and nondescript
var tooltipLines = tip.Split("\n");
var result = "";
@@ -200,7 +192,7 @@ namespace CalamityMod.Buffs
}
tip = result;
break;
-
+
case BuffID.NebulaUpDmg1:
tip = tip.Replace("15", "7.5");
break;
diff --git a/Buffs/Cooldowns/Withered.cs b/Buffs/Cooldowns/Withered.cs
index f2974463d0..8bcf884976 100644
--- a/Buffs/Cooldowns/Withered.cs
+++ b/Buffs/Cooldowns/Withered.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/DamageOverTime/BanishingFire.cs b/Buffs/DamageOverTime/BanishingFire.cs
index dc79b2c678..0e01549c42 100644
--- a/Buffs/DamageOverTime/BanishingFire.cs
+++ b/Buffs/DamageOverTime/BanishingFire.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/DamageOverTime/BanishingFire.png b/Buffs/DamageOverTime/BanishingFire.png
index 27e513237a..2ee38df14e 100644
Binary files a/Buffs/DamageOverTime/BanishingFire.png and b/Buffs/DamageOverTime/BanishingFire.png differ
diff --git a/Buffs/DamageOverTime/BurningBlood.png b/Buffs/DamageOverTime/BurningBlood.png
index 908f334063..0c10087577 100644
Binary files a/Buffs/DamageOverTime/BurningBlood.png and b/Buffs/DamageOverTime/BurningBlood.png differ
diff --git a/Buffs/DamageOverTime/CrushDepth.png b/Buffs/DamageOverTime/CrushDepth.png
index 8a03a35601..2f8caad4f7 100644
Binary files a/Buffs/DamageOverTime/CrushDepth.png and b/Buffs/DamageOverTime/CrushDepth.png differ
diff --git a/Buffs/DamageOverTime/ElementalMix.cs b/Buffs/DamageOverTime/ElementalMix.cs
index d206bffc57..6f64dace2c 100644
--- a/Buffs/DamageOverTime/ElementalMix.cs
+++ b/Buffs/DamageOverTime/ElementalMix.cs
@@ -68,9 +68,9 @@ namespace CalamityMod.Buffs.DamageOverTime
};
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
Vector2 speed = new Vector2(Main.rand.NextFloat(-3f, 3f), Main.rand.NextFloat(-2.5f, -8.3f));
-
+
GeneralParticleHandler.SpawnParticle(new TechyHoloysquareParticle(npcSize, speed, Main.rand.NextFloat(1.2f, 3.1f), effectcolor, Main.rand.Next(8, 14)));
-
+
int dustType = Main.rand.NextBool() ? 66 : 247;
Dust dust = Dust.NewDustPerfect(npcSize, dustType);
dust.scale = (dustType == 66 ? 1.4f : 1.2f);
diff --git a/Buffs/DamageOverTime/GodSlayerInferno.png b/Buffs/DamageOverTime/GodSlayerInferno.png
index 640a264705..01a444251f 100644
Binary files a/Buffs/DamageOverTime/GodSlayerInferno.png and b/Buffs/DamageOverTime/GodSlayerInferno.png differ
diff --git a/Buffs/DamageOverTime/HolyFlames.cs b/Buffs/DamageOverTime/HolyFlames.cs
index daedd07c02..eb50771d81 100644
--- a/Buffs/DamageOverTime/HolyFlames.cs
+++ b/Buffs/DamageOverTime/HolyFlames.cs
@@ -45,7 +45,7 @@ namespace CalamityMod.Buffs.DamageOverTime
{
Vector2 dustCorner = Player.position - 2f * Vector2.One;
Vector2 dustVel = Player.velocity + new Vector2(0f, Main.rand.NextFloat(-5f, -1f));
- int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, 87, dustVel.X, dustVel.Y);
+ int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, DustID.GemTopaz, dustVel.X, dustVel.Y);
Main.dust[d].noGravity = true;
Main.dust[d].scale = hasDebuffResistance ? Main.rand.NextFloat(0.3f, 0.5f) : Main.rand.NextFloat(0.7f, 1.2f);
Main.dust[d].alpha = 235;
@@ -66,7 +66,7 @@ namespace CalamityMod.Buffs.DamageOverTime
{
Vector2 dustCorner = npc.position - 2f * Vector2.One;
Vector2 dustVel = npc.velocity + new Vector2(0f, Main.rand.NextFloat(-5f, -1f));
- int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, 87, dustVel.X, dustVel.Y);
+ int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, DustID.GemTopaz, dustVel.X, dustVel.Y);
Main.dust[d].noGravity = true;
Main.dust[d].scale = Main.rand.NextFloat(0.7f, 1.2f);
Main.dust[d].alpha = 235;
diff --git a/Buffs/DamageOverTime/HolyFlames.png b/Buffs/DamageOverTime/HolyFlames.png
index 81e6eb32ae..8202b95adc 100644
Binary files a/Buffs/DamageOverTime/HolyFlames.png and b/Buffs/DamageOverTime/HolyFlames.png differ
diff --git a/Buffs/DamageOverTime/HolyInferno.cs b/Buffs/DamageOverTime/HolyInferno.cs
index e3a37a900a..1cf1741ee8 100644
--- a/Buffs/DamageOverTime/HolyInferno.cs
+++ b/Buffs/DamageOverTime/HolyInferno.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/DamageOverTime/MiracleBlight.cs b/Buffs/DamageOverTime/MiracleBlight.cs
index 1fee9f02c9..df93272cbd 100644
--- a/Buffs/DamageOverTime/MiracleBlight.cs
+++ b/Buffs/DamageOverTime/MiracleBlight.cs
@@ -44,10 +44,10 @@ namespace CalamityMod.Buffs.DamageOverTime
if (Main.rand.NextBool(2))
{
- Dust dust = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot, 278, CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f));
+ Dust dust = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot, 66, CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f));
dust.noGravity = true;
dust.scale = Main.rand.NextFloat(0.7f, 0.85f);
- dust.color = sparkColor * 0.45f;
+ dust.color = sparkColor;
}
float numberOfDusts = 1f;
@@ -57,7 +57,7 @@ namespace CalamityMod.Buffs.DamageOverTime
float rot = MathHelper.ToRadians(i * rotFactor);
Vector2 velOffset = CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f);
velOffset *= Main.rand.NextFloat(2, 13);
- SquishyLightParticle exoEnergy = new(Player.Center + Player.velocity * 3 + velOffset * 1.5f, -velOffset * 0.25f, 0.3f, sparkColor, 8);
+ Particle exoEnergy = new GlowSparkParticle(Player.Center + Player.velocity * 3 + velOffset * 1.5f, -velOffset * 0.25f, false, 4, 0.008f, sparkColor, new Vector2(0.6f, 1.2f));
GeneralParticleHandler.SpawnParticle(exoEnergy);
}
}
@@ -73,26 +73,24 @@ namespace CalamityMod.Buffs.DamageOverTime
_ => Color.LawnGreen,
};
- if (Main.rand.NextBool(3))
+ if (Main.rand.NextBool(4))
{
- Dust dust = Dust.NewDustPerfect(npcSize, 278, CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f));
+ Dust dust = Dust.NewDustPerfect(npcSize, 66, CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f));
dust.noGravity = true;
dust.scale = Main.rand.NextFloat(0.7f, 0.85f) + (0.0000007f * npc.width * npc.height);
- dust.color = sparkColor * 0.45f;
+ dust.color = sparkColor;
}
- float numberOfDusts = 1f;
- float rotFactor = 360f / numberOfDusts;
- if (Main.rand.NextBool())
+
+ float rotFactor = 360f;
+ if (Main.rand.NextBool(3))
{
- for (int i = 0; i < numberOfDusts; i++)
- {
- float rot = MathHelper.ToRadians(i * rotFactor);
- Vector2 velOffset = CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f);
- velOffset *= Main.rand.NextFloat(1, 9) + (0.0002f * npc.width * npc.height);
- SquishyLightParticle exoEnergy = new(npc.Center + npc.velocity * 3 + velOffset * 1.5f, -velOffset * 0.25f, 0.3f, sparkColor, 8);
- GeneralParticleHandler.SpawnParticle(exoEnergy);
- }
+ float rot = MathHelper.ToRadians(rotFactor);
+ Vector2 velOffset = CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f);
+ velOffset *= Main.rand.NextFloat(5, 9) + (0.0002f * npc.width * npc.height);
+
+ Particle exoEnergy = new GlowSparkParticle(npc.Center + npc.velocity * 3 + velOffset * 1.5f, -velOffset * 0.25f, false, 4, 0.008f, sparkColor, new Vector2(0.6f, 1.2f));
+ GeneralParticleHandler.SpawnParticle(exoEnergy);
}
}
}
diff --git a/Buffs/DamageOverTime/Plague.cs b/Buffs/DamageOverTime/Plague.cs
index defe20c5b8..f776337e36 100644
--- a/Buffs/DamageOverTime/Plague.cs
+++ b/Buffs/DamageOverTime/Plague.cs
@@ -36,15 +36,18 @@ namespace CalamityMod.Buffs.DamageOverTime
float numberOfDusts = 2f;
float rotFactor = 360f / numberOfDusts;
+ int particleAmt = Player.Calamity().alchFlask ? 1 : 2;
+ int dustSpawnAmt = Player.Calamity().alchFlask ? 4 : 7;
if (Player.miscCounter % 4 == 0)
{
- for (int i = 0; i < 2; i++)
+ for (int i = 0; i < particleAmt; i++)
{
- DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, new Vector2(1, 1), 0, Main.rand.NextFloat(0.07f, 0.18f), 0f, 35);
+ float pulseScale = Main.rand.NextFloat(Player.Calamity().alchFlask ? 0.04f : 0.07f, Player.Calamity().alchFlask ? 0.12f : 0.18f);
+ DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, Vector2.One, 0, pulseScale, 0f, 20);
GeneralParticleHandler.SpawnParticle(pulse);
}
- for (int i = 0; i < 7; i++)
+ for (int i = 0; i < dustSpawnAmt; i++)
{
int DustID = Main.rand.NextBool(30) ? 220 : 89;
float rot = MathHelper.ToRadians(i * rotFactor);
@@ -62,7 +65,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
if (Main.rand.NextBool(3))
{
- DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, new Vector2(1, 1), 0, Main.rand.NextFloat(0.07f, 0.18f) + (0.0000007f * npc.width * npc.height), 0f, 35);
+ DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, new Vector2(1, 1), 0, Main.rand.NextFloat(0.07f, 0.18f) + (0.0000007f * npc.width * npc.height), 0f, 15);
GeneralParticleHandler.SpawnParticle(pulse);
for (int i = 0; i < 4; i++)
diff --git a/Buffs/DamageOverTime/Plague.png b/Buffs/DamageOverTime/Plague.png
index 16de187484..c9c78b18aa 100644
Binary files a/Buffs/DamageOverTime/Plague.png and b/Buffs/DamageOverTime/Plague.png differ
diff --git a/Buffs/DamageOverTime/RiptideDebuff.cs b/Buffs/DamageOverTime/RiptideDebuff.cs
index 8d6e12d4c7..0de09111d2 100644
--- a/Buffs/DamageOverTime/RiptideDebuff.cs
+++ b/Buffs/DamageOverTime/RiptideDebuff.cs
@@ -35,7 +35,7 @@ namespace CalamityMod.Buffs.DamageOverTime
if (Main.rand.NextBool(7))
{
- int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 165, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
+ int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.FungiHit, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
Main.dust[dust].noGravity = false;
Main.dust[dust].velocity *= 1.2f;
Main.dust[dust].velocity.Y += 0.8f;
@@ -47,7 +47,7 @@ namespace CalamityMod.Buffs.DamageOverTime
{
if (Main.rand.Next(7) < 3)
{
- int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, 165, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1f);
+ int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, DustID.FungiHit, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1f);
Main.dust[dust].noGravity = false;
Main.dust[dust].velocity *= 1.2f;
Main.dust[dust].velocity.Y += 0.5f;
diff --git a/Buffs/DamageOverTime/RiptideDebuff.png b/Buffs/DamageOverTime/RiptideDebuff.png
index e61eb2a105..b7397c5c44 100644
Binary files a/Buffs/DamageOverTime/RiptideDebuff.png and b/Buffs/DamageOverTime/RiptideDebuff.png differ
diff --git a/Buffs/DamageOverTime/SagePoison.cs b/Buffs/DamageOverTime/SagePoison.cs
index 73f881b617..623c95a1a5 100644
--- a/Buffs/DamageOverTime/SagePoison.cs
+++ b/Buffs/DamageOverTime/SagePoison.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
diff --git a/Buffs/DamageOverTime/Shadowflame.cs b/Buffs/DamageOverTime/Shadowflame.cs
index 312bc3f930..c67307c354 100644
--- a/Buffs/DamageOverTime/Shadowflame.cs
+++ b/Buffs/DamageOverTime/Shadowflame.cs
@@ -30,7 +30,7 @@ namespace CalamityMod.Buffs.DamageOverTime
if (Main.rand.Next(5) < 4)
{
- int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 27, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.1f);
+ int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Shadowflame, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.1f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0.75f;
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
diff --git a/Buffs/DamageOverTime/ShellfishClaps.cs b/Buffs/DamageOverTime/ShellfishClaps.cs
index df8d42e45f..697a8f241b 100644
--- a/Buffs/DamageOverTime/ShellfishClaps.cs
+++ b/Buffs/DamageOverTime/ShellfishClaps.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
diff --git a/Buffs/DamageOverTime/SulphuricPoisoning.cs b/Buffs/DamageOverTime/SulphuricPoisoning.cs
index 1e0943f932..ebf3b5af1d 100644
--- a/Buffs/DamageOverTime/SulphuricPoisoning.cs
+++ b/Buffs/DamageOverTime/SulphuricPoisoning.cs
@@ -45,7 +45,7 @@ namespace CalamityMod.Buffs.DamageOverTime
if (Main.rand.Next(5) < 4)
{
- int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 298, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 0.6f);
+ int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.JungleTorch, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 0.6f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0.75f;
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
@@ -68,7 +68,7 @@ namespace CalamityMod.Buffs.DamageOverTime
if (Main.rand.NextBool())
{
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
- int dust = Dust.NewDust(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, 298, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.2f + +(0.000003f * npc.width * npc.height));
+ int dust = Dust.NewDust(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, DustID.JungleTorch, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.2f + +(0.000003f * npc.width * npc.height));
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0.75f;
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
diff --git a/Buffs/DamageOverTime/VulnerabilityHex.cs b/Buffs/DamageOverTime/VulnerabilityHex.cs
index 0cf450b4db..6ea2f5c298 100644
--- a/Buffs/DamageOverTime/VulnerabilityHex.cs
+++ b/Buffs/DamageOverTime/VulnerabilityHex.cs
@@ -1,7 +1,12 @@
-using CalamityMod.NPCs;
+using CalamityMod.NPCs;
+using CalamityMod.Particles;
using Terraria;
+using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
+using Microsoft.Xna.Framework;
+using ReLogic.Utilities;
+using CalamityMod.Dusts;
namespace CalamityMod.Buffs.DamageOverTime
{
@@ -46,5 +51,22 @@ namespace CalamityMod.Buffs.DamageOverTime
npc.DelBuff(buffIndex);
buffIndex--;
}
+ internal static void DrawEffects(PlayerDrawSet drawInfo)
+ {
+ Player Player = drawInfo.drawPlayer;
+
+ if (Main.rand.NextBool())
+ {
+ VoidSparkParticle spark2 = new VoidSparkParticle(Player.Calamity().RandomDebuffVisualSpot, new Vector2(0, Main.rand.NextFloat(-6f, -10f)), false, Main.rand.Next(18, 27), Main.rand.NextFloat(0.015f, 0.045f), Main.rand.NextBool() ? Color.Red : Color.Lerp(Color.Red, Color.Magenta, 0.65f));
+ GeneralParticleHandler.SpawnParticle(spark2);
+ }
+
+ Dust dust = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot, Main.rand.NextBool() ? 261 :(int)CalamityDusts.Brimstone);
+ dust.scale = Main.rand.NextFloat(0.4f, 0.5f);
+ dust.velocity = new Vector2(0, Main.rand.NextFloat(-0.5f, -2.5f)).RotatedByRandom(0.6f);
+ if (dust.type == 261)
+ dust.color = Color.Lerp(Color.Red, Color.Magenta, 0.65f);
+
+ }
}
}
diff --git a/Buffs/DamageOverTime/VulnerabilityHex.png b/Buffs/DamageOverTime/VulnerabilityHex.png
index c547bc2e18..2793cfdc04 100644
Binary files a/Buffs/DamageOverTime/VulnerabilityHex.png and b/Buffs/DamageOverTime/VulnerabilityHex.png differ
diff --git a/Buffs/DamageOverTime/WeakBrimstoneFlames.cs b/Buffs/DamageOverTime/WeakBrimstoneFlames.cs
index 4a6614eed4..026531e132 100644
--- a/Buffs/DamageOverTime/WeakBrimstoneFlames.cs
+++ b/Buffs/DamageOverTime/WeakBrimstoneFlames.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
diff --git a/Buffs/Mounts/AlicornBuff.cs b/Buffs/Mounts/AlicornBuff.cs
index 9d1d24d1e4..34dad87b5a 100644
--- a/Buffs/Mounts/AlicornBuff.cs
+++ b/Buffs/Mounts/AlicornBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Items.Mounts;
+using CalamityMod.Items.Mounts;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Mounts
diff --git a/Buffs/Mounts/AndromedaBuff.cs b/Buffs/Mounts/AndromedaBuff.cs
index bf9f865570..e352ea4940 100644
--- a/Buffs/Mounts/AndromedaBuff.cs
+++ b/Buffs/Mounts/AndromedaBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Mounts
diff --git a/Buffs/Mounts/AndromedaSmallBuff.cs b/Buffs/Mounts/AndromedaSmallBuff.cs
index af2ed2e41e..d7b33799d2 100644
--- a/Buffs/Mounts/AndromedaSmallBuff.cs
+++ b/Buffs/Mounts/AndromedaSmallBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Mounts
diff --git a/Buffs/Mounts/BrimroseMount.cs b/Buffs/Mounts/BrimroseMount.cs
index e696caca98..787bc90c18 100644
--- a/Buffs/Mounts/BrimroseMount.cs
+++ b/Buffs/Mounts/BrimroseMount.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Items.Mounts;
+using CalamityMod.Items.Mounts;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Mounts/DraedonGamerChairBuff.cs b/Buffs/Mounts/DraedonGamerChairBuff.cs
index f6a0cafe86..6c23e863c0 100644
--- a/Buffs/Mounts/DraedonGamerChairBuff.cs
+++ b/Buffs/Mounts/DraedonGamerChairBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Items.Mounts;
+using CalamityMod.Items.Mounts;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Mounts/GazeOfCrysthamyrBuff.cs b/Buffs/Mounts/GazeOfCrysthamyrBuff.cs
index 9a613c5b22..41e85be969 100644
--- a/Buffs/Mounts/GazeOfCrysthamyrBuff.cs
+++ b/Buffs/Mounts/GazeOfCrysthamyrBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Items.Mounts;
+using CalamityMod.Items.Mounts;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Mounts/MarniteLiftBuff.cs b/Buffs/Mounts/MarniteLiftBuff.cs
index abd329f20d..9bb8b0917a 100644
--- a/Buffs/Mounts/MarniteLiftBuff.cs
+++ b/Buffs/Mounts/MarniteLiftBuff.cs
@@ -1,7 +1,7 @@
-using CalamityMod.Items.Mounts;
+using CalamityMod.Items.Armor.MarniteArchitect;
+using CalamityMod.Items.Mounts;
using Terraria;
using Terraria.ModLoader;
-using CalamityMod.Items.Armor.MarniteArchitect;
namespace CalamityMod.Buffs.Mounts
{
diff --git a/Buffs/Mounts/OnyxExcavatorBuff.cs b/Buffs/Mounts/OnyxExcavatorBuff.cs
index 4002ec02e6..fb2b2d0cd7 100644
--- a/Buffs/Mounts/OnyxExcavatorBuff.cs
+++ b/Buffs/Mounts/OnyxExcavatorBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Items.Mounts;
+using CalamityMod.Items.Mounts;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Mounts/SquishyBeanBuff.cs b/Buffs/Mounts/SquishyBeanBuff.cs
index 06fd60ea2a..51347665c5 100644
--- a/Buffs/Mounts/SquishyBeanBuff.cs
+++ b/Buffs/Mounts/SquishyBeanBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Items.Mounts;
+using CalamityMod.Items.Mounts;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/ArcherofLunamoon.cs b/Buffs/Pets/ArcherofLunamoon.cs
index 053255cfab..d030819e3c 100644
--- a/Buffs/Pets/ArcherofLunamoon.cs
+++ b/Buffs/Pets/ArcherofLunamoon.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/BloodBound.cs b/Buffs/Pets/BloodBound.cs
index 7ecaf77732..898fa327a0 100644
--- a/Buffs/Pets/BloodBound.cs
+++ b/Buffs/Pets/BloodBound.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/BrimlingBuff.cs b/Buffs/Pets/BrimlingBuff.cs
index 49f6276df7..c494fa44d9 100644
--- a/Buffs/Pets/BrimlingBuff.cs
+++ b/Buffs/Pets/BrimlingBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/ChibiiDoGBuff.cs b/Buffs/Pets/ChibiiDoGBuff.cs
index 290d40641f..9521145c2b 100644
--- a/Buffs/Pets/ChibiiDoGBuff.cs
+++ b/Buffs/Pets/ChibiiDoGBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/DannyDevito.cs b/Buffs/Pets/DannyDevito.cs
index f70e08dc31..58db4de5cd 100644
--- a/Buffs/Pets/DannyDevito.cs
+++ b/Buffs/Pets/DannyDevito.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/EidolonSnailBuff.cs b/Buffs/Pets/EidolonSnailBuff.cs
index 08f49bd8e0..6029ad0795 100644
--- a/Buffs/Pets/EidolonSnailBuff.cs
+++ b/Buffs/Pets/EidolonSnailBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/ElectricTroublemaker.cs b/Buffs/Pets/ElectricTroublemaker.cs
index 263a81f484..dc920e9c2f 100644
--- a/Buffs/Pets/ElectricTroublemaker.cs
+++ b/Buffs/Pets/ElectricTroublemaker.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/FlakHermitBuff.cs b/Buffs/Pets/FlakHermitBuff.cs
index 92fc8e2c26..08e6a6ca6a 100644
--- a/Buffs/Pets/FlakHermitBuff.cs
+++ b/Buffs/Pets/FlakHermitBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/FoxPetBuff.cs b/Buffs/Pets/FoxPetBuff.cs
index 09211e2fb7..34b8520912 100644
--- a/Buffs/Pets/FoxPetBuff.cs
+++ b/Buffs/Pets/FoxPetBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/FurtasticDuoBuff.cs b/Buffs/Pets/FurtasticDuoBuff.cs
index 84411bc7c9..806da56a53 100644
--- a/Buffs/Pets/FurtasticDuoBuff.cs
+++ b/Buffs/Pets/FurtasticDuoBuff.cs
@@ -1,6 +1,6 @@
+using System.Collections.Generic;
using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
-using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/GoldieBuff.cs b/Buffs/Pets/GoldieBuff.cs
index 01d28e19ac..c07dc13656 100644
--- a/Buffs/Pets/GoldieBuff.cs
+++ b/Buffs/Pets/GoldieBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/Kendra.cs b/Buffs/Pets/Kendra.cs
index e0fb0edf7b..ff7b55ff92 100644
--- a/Buffs/Pets/Kendra.cs
+++ b/Buffs/Pets/Kendra.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/LadBuff.cs b/Buffs/Pets/LadBuff.cs
index 9f8a2a68e1..58f41bd126 100644
--- a/Buffs/Pets/LadBuff.cs
+++ b/Buffs/Pets/LadBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/LeviBuff.cs b/Buffs/Pets/LeviBuff.cs
index 8d2d3c42e9..48f89cbe24 100644
--- a/Buffs/Pets/LeviBuff.cs
+++ b/Buffs/Pets/LeviBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/LittleLightBuff.cs b/Buffs/Pets/LittleLightBuff.cs
index be418a26e5..17bf5d0737 100644
--- a/Buffs/Pets/LittleLightBuff.cs
+++ b/Buffs/Pets/LittleLightBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/LordeBuff.cs b/Buffs/Pets/LordeBuff.cs
index 06a0bbc274..5320ede32b 100644
--- a/Buffs/Pets/LordeBuff.cs
+++ b/Buffs/Pets/LordeBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/MiniMindBuff.cs b/Buffs/Pets/MiniMindBuff.cs
index 3dab266aea..78ad2aad9d 100644
--- a/Buffs/Pets/MiniMindBuff.cs
+++ b/Buffs/Pets/MiniMindBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/OceanSpiritBuff.cs b/Buffs/Pets/OceanSpiritBuff.cs
index b7f3807e5b..2215cb2ba5 100644
--- a/Buffs/Pets/OceanSpiritBuff.cs
+++ b/Buffs/Pets/OceanSpiritBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/PineappleBuff.cs b/Buffs/Pets/PineappleBuff.cs
index 91ec7eb33d..ff78529513 100644
--- a/Buffs/Pets/PineappleBuff.cs
+++ b/Buffs/Pets/PineappleBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/PlaguebringerBabBuff.cs b/Buffs/Pets/PlaguebringerBabBuff.cs
index f4881c12a1..2d6224adab 100644
--- a/Buffs/Pets/PlaguebringerBabBuff.cs
+++ b/Buffs/Pets/PlaguebringerBabBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/RadiatorBuff.cs b/Buffs/Pets/RadiatorBuff.cs
index c7e4810f47..654f42e0c7 100644
--- a/Buffs/Pets/RadiatorBuff.cs
+++ b/Buffs/Pets/RadiatorBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/ReaverOrbBuff.cs b/Buffs/Pets/ReaverOrbBuff.cs
index a9f27d4f4e..3be4f5a02b 100644
--- a/Buffs/Pets/ReaverOrbBuff.cs
+++ b/Buffs/Pets/ReaverOrbBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Typeless;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/SparksBuff.cs b/Buffs/Pets/SparksBuff.cs
index bdd642fc05..d081130acd 100644
--- a/Buffs/Pets/SparksBuff.cs
+++ b/Buffs/Pets/SparksBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/ThirdSageBuff.cs b/Buffs/Pets/ThirdSageBuff.cs
index cc95682e72..f8aa396cbe 100644
--- a/Buffs/Pets/ThirdSageBuff.cs
+++ b/Buffs/Pets/ThirdSageBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Pets/YharonSonBuff.cs b/Buffs/Pets/YharonSonBuff.cs
index 1bf982ec08..06a3aa955c 100644
--- a/Buffs/Pets/YharonSonBuff.cs
+++ b/Buffs/Pets/YharonSonBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.Projectiles.Pets;
+using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Placeables/ChaosCandleBuff.cs b/Buffs/Placeables/ChaosCandleBuff.cs
index bbef38e859..08fb2df6fc 100644
--- a/Buffs/Placeables/ChaosCandleBuff.cs
+++ b/Buffs/Placeables/ChaosCandleBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Placeables/CirrusBlueCandleBuff.cs b/Buffs/Placeables/CirrusBlueCandleBuff.cs
index 5552456597..1080599c10 100644
--- a/Buffs/Placeables/CirrusBlueCandleBuff.cs
+++ b/Buffs/Placeables/CirrusBlueCandleBuff.cs
@@ -6,17 +6,29 @@ namespace CalamityMod.Buffs.Placeables
{
public class CirrusBlueCandleBuff : ModBuff
{
+ public static float MoveSpeedBoost = 0.1f;
+ public static double WingTimeBoost = 0.1D;
+ public static float AccelerationBoost = 0.1f;
+
public override void SetStaticDefaults()
{
- Main.buffNoTimeDisplay[Type] = true;
- Main.debuff[Type] = true;
+ // These settings are standard for a "opt-in eternal" buff, which has the following properties:
+ // - Is not removed on death
+ // - Saves with the player / is not removed on logout
+ // - Does not display its time
+ // - Never reduces its duration
+ // - Can be manually canceled
Main.pvpBuff[Type] = true;
+ Main.persistentBuff[Type] = true;
Main.buffNoSave[Type] = false;
- BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
+ Main.buffNoTimeDisplay[Type] = true;
+ BuffID.Sets.TimeLeftDoesNotDecrease[Type] = true;
}
+ // Implementation is partially performed elsewhere using the blueCandle bool.
public override void Update(Player player, ref int buffIndex)
{
+ player.moveSpeed += MoveSpeedBoost;
player.Calamity().blueCandle = true;
}
}
diff --git a/Buffs/Placeables/CirrusPinkCandleBuff.cs b/Buffs/Placeables/CirrusPinkCandleBuff.cs
index 93d389d70c..8cf6bc1437 100644
--- a/Buffs/Placeables/CirrusPinkCandleBuff.cs
+++ b/Buffs/Placeables/CirrusPinkCandleBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -6,18 +6,24 @@ namespace CalamityMod.Buffs.Placeables
{
public class CirrusPinkCandleBuff : ModBuff
{
+ public static double PercentHealthPerSecond = 0.004D;
+
public override void SetStaticDefaults()
{
- Main.buffNoTimeDisplay[Type] = true;
- Main.debuff[Type] = true;
+ // These settings are standard for a "opt-in eternal" buff, which has the following properties:
+ // - Is not removed on death
+ // - Saves with the player / is not removed on logout
+ // - Does not display its time
+ // - Never reduces its duration
+ // - Can be manually canceled
Main.pvpBuff[Type] = true;
+ Main.persistentBuff[Type] = true;
Main.buffNoSave[Type] = false;
- BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
+ Main.buffNoTimeDisplay[Type] = true;
+ BuffID.Sets.TimeLeftDoesNotDecrease[Type] = true;
}
- public override void Update(Player player, ref int buffIndex)
- {
- player.Calamity().pinkCandle = true;
- }
+ // Implementation is performed elsewhere using the pinkCandle bool.
+ public override void Update(Player player, ref int buffIndex) => player.Calamity().pinkCandle = true;
}
}
diff --git a/Buffs/Placeables/CirrusPurpleCandleBuff.cs b/Buffs/Placeables/CirrusPurpleCandleBuff.cs
index 7b41d4dcb4..3ad0e23b18 100644
--- a/Buffs/Placeables/CirrusPurpleCandleBuff.cs
+++ b/Buffs/Placeables/CirrusPurpleCandleBuff.cs
@@ -6,15 +6,21 @@ namespace CalamityMod.Buffs.Placeables
{
public class CirrusPurpleCandleBuff : ModBuff
{
- public static float DefenseRatioBonus = 0.15f;
-
+ public static float DefenseRatioBonus = 0.1f;
+
public override void SetStaticDefaults()
{
- Main.buffNoTimeDisplay[Type] = true;
- Main.debuff[Type] = true;
+ // These settings are standard for a "opt-in eternal" buff, which has the following properties:
+ // - Is not removed on death
+ // - Saves with the player / is not removed on logout
+ // - Does not display its time
+ // - Never reduces its duration
+ // - Can be manually canceled
Main.pvpBuff[Type] = true;
+ Main.persistentBuff[Type] = true;
Main.buffNoSave[Type] = false;
- BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
+ Main.buffNoTimeDisplay[Type] = true;
+ BuffID.Sets.TimeLeftDoesNotDecrease[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
diff --git a/Buffs/Placeables/CirrusYellowCandleBuff.cs b/Buffs/Placeables/CirrusYellowCandleBuff.cs
index 8ad664c83a..1b5f9a7f96 100644
--- a/Buffs/Placeables/CirrusYellowCandleBuff.cs
+++ b/Buffs/Placeables/CirrusYellowCandleBuff.cs
@@ -1,24 +1,37 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
+using static Terraria.NPC;
namespace CalamityMod.Buffs.Placeables
{
public class CirrusYellowCandleBuff : ModBuff
{
+ public static float ExtraChipDamageRatio = 0.07f;
+
public override void SetStaticDefaults()
{
- Main.buffNoTimeDisplay[Type] = true;
- Main.debuff[Type] = true;
+ // These settings are standard for a "opt-in eternal" buff, which has the following properties:
+ // - Is not removed on death
+ // - Saves with the player / is not removed on logout
+ // - Does not display its time
+ // - Never reduces its duration
+ // - Can be manually canceled
Main.pvpBuff[Type] = true;
+ Main.persistentBuff[Type] = true;
Main.buffNoSave[Type] = false;
- BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
-
- // Spite (the +5% final damage effect of Yellow Candle) is a tag buff. Nothing is immune to it.
- // They may however be unaffected by it (including only temporarily) if they have incredibly high DR.
- BuffID.Sets.IsATagBuff[Type] = true;
+ Main.buffNoTimeDisplay[Type] = true;
+ BuffID.Sets.TimeLeftDoesNotDecrease[Type] = true;
}
+ // Implementation is performed elsewhere using the yellowCandle bool.
public override void Update(Player player, ref int buffIndex) => player.Calamity().yellowCandle = true;
+
+ // Yellow Candle is implemented as a dirty modifier.
+ internal static void ModifyHitInfo_Spite(ref HitInfo info)
+ {
+ int damageBoost = (int)(info.SourceDamage * ExtraChipDamageRatio);
+ info.Damage += damageBoost;
+ }
}
}
diff --git a/Buffs/Placeables/CorruptionEffigyBuff.cs b/Buffs/Placeables/CorruptionEffigyBuff.cs
index 681aa3b727..e4d2e0a39f 100644
--- a/Buffs/Placeables/CorruptionEffigyBuff.cs
+++ b/Buffs/Placeables/CorruptionEffigyBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Placeables
diff --git a/Buffs/Placeables/CrimsonEffigyBuff.cs b/Buffs/Placeables/CrimsonEffigyBuff.cs
index c42b55817c..a26c9e3f4e 100644
--- a/Buffs/Placeables/CrimsonEffigyBuff.cs
+++ b/Buffs/Placeables/CrimsonEffigyBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Placeables
diff --git a/Buffs/Placeables/EffigyOfDecayBuff.cs b/Buffs/Placeables/EffigyOfDecayBuff.cs
index b82d6b9d71..516fbd554c 100644
--- a/Buffs/Placeables/EffigyOfDecayBuff.cs
+++ b/Buffs/Placeables/EffigyOfDecayBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Placeables
diff --git a/Buffs/Placeables/TranquilityCandleBuff.cs b/Buffs/Placeables/TranquilityCandleBuff.cs
index b825436a5e..481538bdfd 100644
--- a/Buffs/Placeables/TranquilityCandleBuff.cs
+++ b/Buffs/Placeables/TranquilityCandleBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/PopoBuff.cs b/Buffs/PopoBuff.cs
index 540a5bd24c..f5d8e36d54 100644
--- a/Buffs/PopoBuff.cs
+++ b/Buffs/PopoBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/PopoNoselessBuff.cs b/Buffs/PopoNoselessBuff.cs
index bdbec706fe..ed87c9db8d 100644
--- a/Buffs/PopoNoselessBuff.cs
+++ b/Buffs/PopoNoselessBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Potions/AstralInjectionBuff.cs b/Buffs/Potions/AstralInjectionBuff.cs
index 58f8669529..850dea5e0e 100644
--- a/Buffs/Potions/AstralInjectionBuff.cs
+++ b/Buffs/Potions/AstralInjectionBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/BaguetteBuff.cs b/Buffs/Potions/BaguetteBuff.cs
index 5c167f527f..878bca7213 100644
--- a/Buffs/Potions/BaguetteBuff.cs
+++ b/Buffs/Potions/BaguetteBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/BloodfinBoost.cs b/Buffs/Potions/BloodfinBoost.cs
index 5e8bef54f0..fb1070b016 100644
--- a/Buffs/Potions/BloodfinBoost.cs
+++ b/Buffs/Potions/BloodfinBoost.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/BoundingBuff.cs b/Buffs/Potions/BoundingBuff.cs
index ff03aa6304..4e400c5201 100644
--- a/Buffs/Potions/BoundingBuff.cs
+++ b/Buffs/Potions/BoundingBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/CalciumBuff.cs b/Buffs/Potions/CalciumBuff.cs
index 036bbbf871..0a55b80590 100644
--- a/Buffs/Potions/CalciumBuff.cs
+++ b/Buffs/Potions/CalciumBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/CeaselessHunger.cs b/Buffs/Potions/CeaselessHunger.cs
index f9ebdb134d..6d88f7b282 100644
--- a/Buffs/Potions/CeaselessHunger.cs
+++ b/Buffs/Potions/CeaselessHunger.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/GravityNormalizerBuff.cs b/Buffs/Potions/GravityNormalizerBuff.cs
index 3fb764bf53..d7c3944202 100644
--- a/Buffs/Potions/GravityNormalizerBuff.cs
+++ b/Buffs/Potions/GravityNormalizerBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/Omniscience.cs b/Buffs/Potions/Omniscience.cs
index d7c2cbcc9e..a659d3b09e 100644
--- a/Buffs/Potions/Omniscience.cs
+++ b/Buffs/Potions/Omniscience.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/PhotosynthesisBuff.cs b/Buffs/Potions/PhotosynthesisBuff.cs
index 5f4ab2eaba..202952cb86 100644
--- a/Buffs/Potions/PhotosynthesisBuff.cs
+++ b/Buffs/Potions/PhotosynthesisBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/Soaring.cs b/Buffs/Potions/Soaring.cs
index 43a3b9b853..bb5e481442 100644
--- a/Buffs/Potions/Soaring.cs
+++ b/Buffs/Potions/Soaring.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/SulphurskinBuff.cs b/Buffs/Potions/SulphurskinBuff.cs
index dea0a58c2e..b4c54fd728 100644
--- a/Buffs/Potions/SulphurskinBuff.cs
+++ b/Buffs/Potions/SulphurskinBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/TeslaBuff.cs b/Buffs/Potions/TeslaBuff.cs
index c2cf1e9778..e5a8fac63b 100644
--- a/Buffs/Potions/TeslaBuff.cs
+++ b/Buffs/Potions/TeslaBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/WeaponImbueCrumbling.cs b/Buffs/Potions/WeaponImbueCrumbling.cs
index af06afa89f..30eca383e3 100644
--- a/Buffs/Potions/WeaponImbueCrumbling.cs
+++ b/Buffs/Potions/WeaponImbueCrumbling.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Potions/WeaponImbueHolyFlames.cs b/Buffs/Potions/WeaponImbueHolyFlames.cs
index ee7a8e221c..b1f3edb733 100644
--- a/Buffs/Potions/WeaponImbueHolyFlames.cs
+++ b/Buffs/Potions/WeaponImbueHolyFlames.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Potions/Zen.cs b/Buffs/Potions/Zen.cs
index e0aa64166a..06534582e9 100644
--- a/Buffs/Potions/Zen.cs
+++ b/Buffs/Potions/Zen.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/Potions/Zerg.cs b/Buffs/Potions/Zerg.cs
index 241f6dbb18..494404d3f1 100644
--- a/Buffs/Potions/Zerg.cs
+++ b/Buffs/Potions/Zerg.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
diff --git a/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs b/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs
index 537e2fac7f..41164d0898 100644
--- a/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs
+++ b/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
diff --git a/Buffs/StatBuffs/AbyssalMadness.cs b/Buffs/StatBuffs/AbyssalMadness.cs
index f1370a9848..1851277c44 100644
--- a/Buffs/StatBuffs/AbyssalMadness.cs
+++ b/Buffs/StatBuffs/AbyssalMadness.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatBuffs/AdrenalineMode.png b/Buffs/StatBuffs/AdrenalineMode.png
index bedcc91f12..b4e6dd7722 100644
Binary files a/Buffs/StatBuffs/AdrenalineMode.png and b/Buffs/StatBuffs/AdrenalineMode.png differ
diff --git a/Buffs/StatBuffs/AvertorBonus.cs b/Buffs/StatBuffs/AvertorBonus.cs
index e49fc0e27c..9922849fcd 100644
--- a/Buffs/StatBuffs/AvertorBonus.cs
+++ b/Buffs/StatBuffs/AvertorBonus.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
diff --git a/Buffs/StatBuffs/BloodflareBloodFrenzy.cs b/Buffs/StatBuffs/BloodflareBloodFrenzy.cs
index 89bed17cde..05ecf22acc 100644
--- a/Buffs/StatBuffs/BloodflareBloodFrenzy.cs
+++ b/Buffs/StatBuffs/BloodflareBloodFrenzy.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatBuffs/BrimflameFrenzyBuff.cs b/Buffs/StatBuffs/BrimflameFrenzyBuff.cs
index 4280220e7e..abfddde155 100644
--- a/Buffs/StatBuffs/BrimflameFrenzyBuff.cs
+++ b/Buffs/StatBuffs/BrimflameFrenzyBuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
diff --git a/Buffs/StatBuffs/BrutalCarnage.cs b/Buffs/StatBuffs/BrutalCarnage.cs
index 8479469036..fc1c643160 100644
--- a/Buffs/StatBuffs/BrutalCarnage.cs
+++ b/Buffs/StatBuffs/BrutalCarnage.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
diff --git a/Buffs/StatBuffs/CoralSymbiosis.cs b/Buffs/StatBuffs/CoralSymbiosis.cs
index 49995df268..0a3e8851bf 100644
--- a/Buffs/StatBuffs/CoralSymbiosis.cs
+++ b/Buffs/StatBuffs/CoralSymbiosis.cs
@@ -1,6 +1,6 @@
-using Terraria;
+using CalamityMod.Items.Weapons.Magic;
+using Terraria;
using Terraria.ModLoader;
-using CalamityMod.Items.Weapons.Magic;
namespace CalamityMod.Buffs.StatBuffs
{
diff --git a/Buffs/StatBuffs/CosmicFreeze.cs b/Buffs/StatBuffs/CosmicFreeze.cs
index fe3a7fd275..5d8d0be350 100644
--- a/Buffs/StatBuffs/CosmicFreeze.cs
+++ b/Buffs/StatBuffs/CosmicFreeze.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
diff --git a/Buffs/StatBuffs/DivineBless.cs b/Buffs/StatBuffs/DivineBless.cs
index 255d5e3ed9..d54db228c5 100644
--- a/Buffs/StatBuffs/DivineBless.cs
+++ b/Buffs/StatBuffs/DivineBless.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatBuffs/DivineBless.png b/Buffs/StatBuffs/DivineBless.png
index 3d9c73ec00..80bdca5019 100644
Binary files a/Buffs/StatBuffs/DivineBless.png and b/Buffs/StatBuffs/DivineBless.png differ
diff --git a/Buffs/StatBuffs/EmpyreanRage.cs b/Buffs/StatBuffs/EmpyreanRage.cs
index 2440bb9bb9..9315409e24 100644
--- a/Buffs/StatBuffs/EmpyreanRage.cs
+++ b/Buffs/StatBuffs/EmpyreanRage.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
diff --git a/Buffs/StatBuffs/EmpyreanWrath.cs b/Buffs/StatBuffs/EmpyreanWrath.cs
index 99c8d49dde..f74123f6b9 100644
--- a/Buffs/StatBuffs/EmpyreanWrath.cs
+++ b/Buffs/StatBuffs/EmpyreanWrath.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
diff --git a/Buffs/StatBuffs/Encased.cs b/Buffs/StatBuffs/Encased.cs
index 25a9de731b..251d0489a8 100644
--- a/Buffs/StatBuffs/Encased.cs
+++ b/Buffs/StatBuffs/Encased.cs
@@ -1,4 +1,6 @@
-using Terraria;
+using CalamityMod.Balancing;
+using CalamityMod.Items.Accessories;
+using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
@@ -20,7 +22,10 @@ namespace CalamityMod.Buffs.StatBuffs
if (player.buffTime[buffIndex] == 2)
{
SoundEngine.PlaySound(SoundID.Item27, player.Center);
- player.GiveIFrames(90, true);
+
+ // 17APR2024: Ozzatron: Permafrost's Concoction gives true invulnerability to everything and is boosted by Cross Necklace.
+ int encasedIFrames = PermafrostsConcoction.EncasedIFrames + (player.longInvince ? BalancingConstants.CrossNecklaceIFrameBoost : 0);
+ player.GiveUniversalIFrames(encasedIFrames, true);
}
}
}
diff --git a/Buffs/StatBuffs/GraxBoost.cs b/Buffs/StatBuffs/GraxBoost.cs
index 6e43a78270..49814f6e22 100644
--- a/Buffs/StatBuffs/GraxBoost.cs
+++ b/Buffs/StatBuffs/GraxBoost.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
diff --git a/Buffs/StatBuffs/HallowedRunePower.cs b/Buffs/StatBuffs/HallowedRunePower.cs
index 8e18ca572f..227723e448 100644
--- a/Buffs/StatBuffs/HallowedRunePower.cs
+++ b/Buffs/StatBuffs/HallowedRunePower.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
diff --git a/Buffs/StatBuffs/HallowedRuneRegeneration.cs b/Buffs/StatBuffs/HallowedRuneRegeneration.cs
index 10c92c5cbc..eb42a16d7c 100644
--- a/Buffs/StatBuffs/HallowedRuneRegeneration.cs
+++ b/Buffs/StatBuffs/HallowedRuneRegeneration.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
diff --git a/Buffs/StatBuffs/KamiBuff.cs b/Buffs/StatBuffs/KamiBuff.cs
index 10cc0726e4..00520d718e 100644
--- a/Buffs/StatBuffs/KamiBuff.cs
+++ b/Buffs/StatBuffs/KamiBuff.cs
@@ -1,7 +1,7 @@
-using Terraria;
+using CalamityMod.Items.Weapons.Typeless;
+using Terraria;
using Terraria.Audio;
using Terraria.ModLoader;
-using CalamityMod.Items.Weapons.Typeless;
namespace CalamityMod.Buffs.StatBuffs
{
diff --git a/Buffs/StatBuffs/RageMode.png b/Buffs/StatBuffs/RageMode.png
index d9a80f785b..f4ce650e26 100644
Binary files a/Buffs/StatBuffs/RageMode.png and b/Buffs/StatBuffs/RageMode.png differ
diff --git a/Buffs/StatBuffs/SilvaRevival.cs b/Buffs/StatBuffs/SilvaRevival.cs
index a89e494f23..8743919bf0 100644
--- a/Buffs/StatBuffs/SilvaRevival.cs
+++ b/Buffs/StatBuffs/SilvaRevival.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatBuffs/SpiritPower.cs b/Buffs/StatBuffs/SpiritPower.cs
index 49b845fb8f..abc18fed2b 100644
--- a/Buffs/StatBuffs/SpiritPower.cs
+++ b/Buffs/StatBuffs/SpiritPower.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
diff --git a/Buffs/StatBuffs/SpiritRegen.cs b/Buffs/StatBuffs/SpiritRegen.cs
index 941c1abc30..748113d4c9 100644
--- a/Buffs/StatBuffs/SpiritRegen.cs
+++ b/Buffs/StatBuffs/SpiritRegen.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
diff --git a/Buffs/StatBuffs/TarraLifeRegen.cs b/Buffs/StatBuffs/TarraLifeRegen.cs
index e4306c77ab..c2e48518e0 100644
--- a/Buffs/StatBuffs/TarraLifeRegen.cs
+++ b/Buffs/StatBuffs/TarraLifeRegen.cs
@@ -1,6 +1,7 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
+using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
@@ -25,7 +26,7 @@ namespace CalamityMod.Buffs.StatBuffs
if (Main.rand.NextBool(10))
{
- int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 107, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
+ int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.TerraBlade, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0.75f;
Main.dust[dust].velocity.Y -= 0.35f;
diff --git a/Buffs/StatBuffs/TarragonCloak.cs b/Buffs/StatBuffs/TarragonCloak.cs
index 25a9a14eef..7c8b6be557 100644
--- a/Buffs/StatBuffs/TarragonCloak.cs
+++ b/Buffs/StatBuffs/TarragonCloak.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatBuffs/TarragonImmunity.cs b/Buffs/StatBuffs/TarragonImmunity.cs
index a69d8c6a86..134c46efbf 100644
--- a/Buffs/StatBuffs/TarragonImmunity.cs
+++ b/Buffs/StatBuffs/TarragonImmunity.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatDebuffs/AbsorberAffliction.png b/Buffs/StatDebuffs/AbsorberAffliction.png
index 6453bad23c..a62688efe0 100644
Binary files a/Buffs/StatDebuffs/AbsorberAffliction.png and b/Buffs/StatDebuffs/AbsorberAffliction.png differ
diff --git a/Buffs/StatDebuffs/AndromedaCripple.cs b/Buffs/StatDebuffs/AndromedaCripple.cs
index 214efa2fff..5340bb6979 100644
--- a/Buffs/StatDebuffs/AndromedaCripple.cs
+++ b/Buffs/StatDebuffs/AndromedaCripple.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatDebuffs/ArmorCrunch.cs b/Buffs/StatDebuffs/ArmorCrunch.cs
index 76bac57e11..d01829fdb0 100644
--- a/Buffs/StatDebuffs/ArmorCrunch.cs
+++ b/Buffs/StatDebuffs/ArmorCrunch.cs
@@ -7,9 +7,9 @@ namespace CalamityMod.Buffs.StatDebuffs
public class ArmorCrunch : ModBuff
{
public static int DefenseReduction = 15;
- public static float MultiplicativeDamageReductionPlayer = 0.33f;
- //20% dr reduction
- public static float MultiplicativeDamageReductionEnemy = 0.80f;
+ public static float MultiplicativeDamageReductionPlayer = 0.5f;
+ // 15% DR reduction
+ public static float MultiplicativeDamageReductionEnemy = 0.85f;
public override void SetStaticDefaults()
{
diff --git a/Buffs/StatDebuffs/Clamity.cs b/Buffs/StatDebuffs/Clamity.cs
index 983aaee923..7f65c36295 100644
--- a/Buffs/StatDebuffs/Clamity.cs
+++ b/Buffs/StatDebuffs/Clamity.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatDebuffs/Crumbling.cs b/Buffs/StatDebuffs/Crumbling.cs
index 684217e449..2173cf756b 100644
--- a/Buffs/StatDebuffs/Crumbling.cs
+++ b/Buffs/StatDebuffs/Crumbling.cs
@@ -7,9 +7,9 @@ namespace CalamityMod.Buffs.StatDebuffs
public class Crumbling : ModBuff
{
public static int DefenseReduction = 10;
- public static float MultiplicativeDamageReductionPlayer = 0.55f;
- //12% dr reduction
- public static float MultiplicativeDamageReductionEnemy = 0.9f;
+ public static float MultiplicativeDamageReductionPlayer = 0.7f;
+ // 8% DR reduction
+ public static float MultiplicativeDamageReductionEnemy = 0.92f;
public override void SetStaticDefaults()
{
diff --git a/Buffs/StatDebuffs/DoGExtremeGravity.png b/Buffs/StatDebuffs/DoGExtremeGravity.png
index 43a2f353d7..b9de9c3774 100644
Binary files a/Buffs/StatDebuffs/DoGExtremeGravity.png and b/Buffs/StatDebuffs/DoGExtremeGravity.png differ
diff --git a/Buffs/StatDebuffs/FishAlert.cs b/Buffs/StatDebuffs/FishAlert.cs
index 019a05d27d..8324217abf 100644
--- a/Buffs/StatDebuffs/FishAlert.cs
+++ b/Buffs/StatDebuffs/FishAlert.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatDebuffs/FrozenLungs.cs b/Buffs/StatDebuffs/FrozenLungs.cs
index 8793026e05..4a7e8fb6ca 100644
--- a/Buffs/StatDebuffs/FrozenLungs.cs
+++ b/Buffs/StatDebuffs/FrozenLungs.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatDebuffs
diff --git a/Buffs/StatDebuffs/GalvanicCorrosion.cs b/Buffs/StatDebuffs/GalvanicCorrosion.cs
index 067b246fdc..0d6639ee28 100644
--- a/Buffs/StatDebuffs/GalvanicCorrosion.cs
+++ b/Buffs/StatDebuffs/GalvanicCorrosion.cs
@@ -1,4 +1,4 @@
-using CalamityMod.NPCs;
+using CalamityMod.NPCs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatDebuffs/GalvanicCorrosion.png b/Buffs/StatDebuffs/GalvanicCorrosion.png
index 97136a54fe..aa5182d8fb 100644
Binary files a/Buffs/StatDebuffs/GalvanicCorrosion.png and b/Buffs/StatDebuffs/GalvanicCorrosion.png differ
diff --git a/Buffs/StatDebuffs/GlacialState.cs b/Buffs/StatDebuffs/GlacialState.cs
index 0e8a44b893..d1c0ed7639 100644
--- a/Buffs/StatDebuffs/GlacialState.cs
+++ b/Buffs/StatDebuffs/GlacialState.cs
@@ -38,7 +38,7 @@ namespace CalamityMod.Buffs.StatDebuffs
if (Main.rand.NextBool(4))
{
- Dust d = Dust.NewDustDirect(Player.Center - 10 * Vector2.One, 20, 20, 137);
+ Dust d = Dust.NewDustDirect(Player.Center - 10 * Vector2.One, 20, 20, DustID.IcyMerman);
d.noGravity = Main.rand.NextBool();
d.noLight = false;
d.velocity *= 0.2f;
diff --git a/Buffs/StatDebuffs/Irradiated.cs b/Buffs/StatDebuffs/Irradiated.cs
index e3402c5462..ca52ae932a 100644
--- a/Buffs/StatDebuffs/Irradiated.cs
+++ b/Buffs/StatDebuffs/Irradiated.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatDebuffs/Irradiated.png b/Buffs/StatDebuffs/Irradiated.png
index 60106814b8..0cc69ed972 100644
Binary files a/Buffs/StatDebuffs/Irradiated.png and b/Buffs/StatDebuffs/Irradiated.png differ
diff --git a/Buffs/StatDebuffs/KamiFlu.cs b/Buffs/StatDebuffs/KamiFlu.cs
index e0183a327f..859091d167 100644
--- a/Buffs/StatDebuffs/KamiFlu.cs
+++ b/Buffs/StatDebuffs/KamiFlu.cs
@@ -1,4 +1,4 @@
-using CalamityMod.NPCs;
+using CalamityMod.NPCs;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/StatDebuffs/NOU.cs b/Buffs/StatDebuffs/NOU.cs
index 3516443177..1682bb88c0 100644
--- a/Buffs/StatDebuffs/NOU.cs
+++ b/Buffs/StatDebuffs/NOU.cs
@@ -5,20 +5,20 @@ using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatDebuffs
{
- public class NOU : ModBuff
- {
- public override void SetStaticDefaults()
- {
+ public class NOU : ModBuff
+ {
+ public override void SetStaticDefaults()
+ {
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
- }
-
- public override void Update(Player player, ref int buffIndex)
- {
- player.Calamity().NOU = true;
- }
- }
+ }
+
+ public override void Update(Player player, ref int buffIndex)
+ {
+ player.Calamity().NOU = true;
+ }
+ }
}
diff --git a/Buffs/StatDebuffs/PearlAura.cs b/Buffs/StatDebuffs/PearlAura.cs
index 6ba8ccd2f8..b7b27ee3df 100644
--- a/Buffs/StatDebuffs/PearlAura.cs
+++ b/Buffs/StatDebuffs/PearlAura.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatDebuffs
diff --git a/Buffs/StatDebuffs/ProfanedWeakness.cs b/Buffs/StatDebuffs/ProfanedWeakness.cs
index f9a26c3229..4a2a558c3b 100644
--- a/Buffs/StatDebuffs/ProfanedWeakness.cs
+++ b/Buffs/StatDebuffs/ProfanedWeakness.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatDebuffs
diff --git a/Buffs/StatDebuffs/TemporalSadness.png b/Buffs/StatDebuffs/TemporalSadness.png
index 2997431ce1..d3109f21fe 100644
Binary files a/Buffs/StatDebuffs/TemporalSadness.png and b/Buffs/StatDebuffs/TemporalSadness.png differ
diff --git a/Buffs/StatDebuffs/Warped.cs b/Buffs/StatDebuffs/Warped.cs
index f44996b349..fe16e114cf 100644
--- a/Buffs/StatDebuffs/Warped.cs
+++ b/Buffs/StatDebuffs/Warped.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatDebuffs/Warped.png b/Buffs/StatDebuffs/Warped.png
index d17c7e236f..b2b033b09a 100644
Binary files a/Buffs/StatDebuffs/Warped.png and b/Buffs/StatDebuffs/Warped.png differ
diff --git a/Buffs/StatDebuffs/WeakPetrification.cs b/Buffs/StatDebuffs/WeakPetrification.cs
index 76726def20..03192ceed1 100644
--- a/Buffs/StatDebuffs/WeakPetrification.cs
+++ b/Buffs/StatDebuffs/WeakPetrification.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/StatDebuffs/WitherDebuff.cs b/Buffs/StatDebuffs/WitherDebuff.cs
index c59f4518e6..9a0a5a9e55 100644
--- a/Buffs/StatDebuffs/WitherDebuff.cs
+++ b/Buffs/StatDebuffs/WitherDebuff.cs
@@ -1,4 +1,4 @@
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/BelladonnaSpiritBuff.cs b/Buffs/Summon/BelladonnaSpiritBuff.cs
index 64789cef04..61ba9bfa29 100644
--- a/Buffs/Summon/BelladonnaSpiritBuff.cs
+++ b/Buffs/Summon/BelladonnaSpiritBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/BlackHawkBuff.cs b/Buffs/Summon/BlackHawkBuff.cs
index 4d69ef6a07..5ec4851c76 100644
--- a/Buffs/Summon/BlackHawkBuff.cs
+++ b/Buffs/Summon/BlackHawkBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/BrimstoneWaifu.cs b/Buffs/Summon/BrimstoneWaifu.cs
index c4cd69c4db..73e099a09a 100644
--- a/Buffs/Summon/BrimstoneWaifu.cs
+++ b/Buffs/Summon/BrimstoneWaifu.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/CausticStaffBuff.cs b/Buffs/Summon/CausticStaffBuff.cs
index 7df8d2add6..25a4672d32 100644
--- a/Buffs/Summon/CausticStaffBuff.cs
+++ b/Buffs/Summon/CausticStaffBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/CinderBlossomBuff.cs b/Buffs/Summon/CinderBlossomBuff.cs
index 71408b4f61..8133494739 100644
--- a/Buffs/Summon/CinderBlossomBuff.cs
+++ b/Buffs/Summon/CinderBlossomBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/CloudyWaifu.cs b/Buffs/Summon/CloudyWaifu.cs
index a1a4863ae9..0cb6162e05 100644
--- a/Buffs/Summon/CloudyWaifu.cs
+++ b/Buffs/Summon/CloudyWaifu.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/Corroslime.cs b/Buffs/Summon/Corroslime.cs
index 2c55b75da5..c8c15edb91 100644
--- a/Buffs/Summon/Corroslime.cs
+++ b/Buffs/Summon/Corroslime.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/CorvidHarbringerBuff.cs b/Buffs/Summon/CorvidHarbringerBuff.cs
index 6d108a4850..504458767f 100644
--- a/Buffs/Summon/CorvidHarbringerBuff.cs
+++ b/Buffs/Summon/CorvidHarbringerBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/CosmicEnergy.cs b/Buffs/Summon/CosmicEnergy.cs
index ff9d82c5f0..bd29028601 100644
--- a/Buffs/Summon/CosmicEnergy.cs
+++ b/Buffs/Summon/CosmicEnergy.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/CosmicViperEngineBuff.cs b/Buffs/Summon/CosmicViperEngineBuff.cs
index 2b5e78e712..836dc2da24 100644
--- a/Buffs/Summon/CosmicViperEngineBuff.cs
+++ b/Buffs/Summon/CosmicViperEngineBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/CosmilampBuff.cs b/Buffs/Summon/CosmilampBuff.cs
index d8dccbd28d..635914f27e 100644
--- a/Buffs/Summon/CosmilampBuff.cs
+++ b/Buffs/Summon/CosmilampBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/Crimslime.cs b/Buffs/Summon/Crimslime.cs
index 6916252d70..b6d36ff83e 100644
--- a/Buffs/Summon/Crimslime.cs
+++ b/Buffs/Summon/Crimslime.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/DaedalusGolemBuff.cs b/Buffs/Summon/DaedalusGolemBuff.cs
index b57a4c1918..ca584568e4 100644
--- a/Buffs/Summon/DaedalusGolemBuff.cs
+++ b/Buffs/Summon/DaedalusGolemBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/DankCreeperBuff.cs b/Buffs/Summon/DankCreeperBuff.cs
index 58f791d441..bac55737b5 100644
--- a/Buffs/Summon/DankCreeperBuff.cs
+++ b/Buffs/Summon/DankCreeperBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/DazzlingStabberBuff.cs b/Buffs/Summon/DazzlingStabberBuff.cs
index 571cab3aa1..a2a20e32df 100644
--- a/Buffs/Summon/DazzlingStabberBuff.cs
+++ b/Buffs/Summon/DazzlingStabberBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/ElementalAxeBuff.cs b/Buffs/Summon/ElementalAxeBuff.cs
index 53c28533c0..1454140e20 100644
--- a/Buffs/Summon/ElementalAxeBuff.cs
+++ b/Buffs/Summon/ElementalAxeBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/EndoCooperBuff.cs b/Buffs/Summon/EndoCooperBuff.cs
index 2db03538e7..325948b2b1 100644
--- a/Buffs/Summon/EndoCooperBuff.cs
+++ b/Buffs/Summon/EndoCooperBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/EndoHydraBuff.cs b/Buffs/Summon/EndoHydraBuff.cs
index 1ed17226df..0bb3a54736 100644
--- a/Buffs/Summon/EndoHydraBuff.cs
+++ b/Buffs/Summon/EndoHydraBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/EyeOfNightBuff.cs b/Buffs/Summon/EyeOfNightBuff.cs
index 0d008806c2..871b2d486f 100644
--- a/Buffs/Summon/EyeOfNightBuff.cs
+++ b/Buffs/Summon/EyeOfNightBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/FlowersOfMortalityBuff.cs b/Buffs/Summon/FlowersOfMortalityBuff.cs
index 25b5e97695..a89d37c19a 100644
--- a/Buffs/Summon/FlowersOfMortalityBuff.cs
+++ b/Buffs/Summon/FlowersOfMortalityBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/FrostBlossomBuff.cs b/Buffs/Summon/FrostBlossomBuff.cs
index be2b0adbad..8f21d5f3e8 100644
--- a/Buffs/Summon/FrostBlossomBuff.cs
+++ b/Buffs/Summon/FrostBlossomBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/FungalClumpBuff.cs b/Buffs/Summon/FungalClumpBuff.cs
index 24c9f1082a..c8a3a4549e 100644
--- a/Buffs/Summon/FungalClumpBuff.cs
+++ b/Buffs/Summon/FungalClumpBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Typeless;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/GlacialEmbraceBuff.cs b/Buffs/Summon/GlacialEmbraceBuff.cs
index 283c0cb8cb..f1502f9c41 100644
--- a/Buffs/Summon/GlacialEmbraceBuff.cs
+++ b/Buffs/Summon/GlacialEmbraceBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/HauntedDishesBuff.cs b/Buffs/Summon/HauntedDishesBuff.cs
index 671a679e28..d46bd34697 100644
--- a/Buffs/Summon/HauntedDishesBuff.cs
+++ b/Buffs/Summon/HauntedDishesBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/HermitCrab.cs b/Buffs/Summon/HermitCrab.cs
index 29b18f71d9..56b92d5bea 100644
--- a/Buffs/Summon/HermitCrab.cs
+++ b/Buffs/Summon/HermitCrab.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/HotE.cs b/Buffs/Summon/HotE.cs
index a32e13b2ed..99bd030f4d 100644
--- a/Buffs/Summon/HotE.cs
+++ b/Buffs/Summon/HotE.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
diff --git a/Buffs/Summon/HowlTrio.cs b/Buffs/Summon/HowlTrio.cs
index ef406b5193..262846cd50 100644
--- a/Buffs/Summon/HowlTrio.cs
+++ b/Buffs/Summon/HowlTrio.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/IceClasperBuff.cs b/Buffs/Summon/IceClasperBuff.cs
index d7c5d328a7..8c25f49849 100644
--- a/Buffs/Summon/IceClasperBuff.cs
+++ b/Buffs/Summon/IceClasperBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/IgneousExaltationBuff.cs b/Buffs/Summon/IgneousExaltationBuff.cs
index c5bc844922..3c12f97a0c 100644
--- a/Buffs/Summon/IgneousExaltationBuff.cs
+++ b/Buffs/Summon/IgneousExaltationBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/LiliesOfFinalityBuff.cs b/Buffs/Summon/LiliesOfFinalityBuff.cs
new file mode 100644
index 0000000000..77fe068705
--- /dev/null
+++ b/Buffs/Summon/LiliesOfFinalityBuff.cs
@@ -0,0 +1,31 @@
+using CalamityMod.CalPlayer;
+using CalamityMod.Projectiles.Summon;
+using Terraria;
+using Terraria.ModLoader;
+
+namespace CalamityMod.Buffs.Summon
+{
+ public class LiliesOfFinalityBuff : ModBuff
+ {
+ public override void SetStaticDefaults()
+ {
+ Main.buffNoTimeDisplay[Type] = true;
+ Main.buffNoSave[Type] = true;
+ }
+
+ public override void Update(Player player, ref int buffIndex)
+ {
+ CalamityPlayer modPlayer = player.Calamity();
+ if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0)
+ modPlayer.LiliesOfFinalityBool = true;
+
+ if (!modPlayer.LiliesOfFinalityBool)
+ {
+ player.DelBuff(buffIndex);
+ buffIndex--;
+ }
+ else
+ player.buffTime[buffIndex] = 18000;
+ }
+ }
+}
diff --git a/Buffs/Summon/LiliesOfFinalityBuff.png b/Buffs/Summon/LiliesOfFinalityBuff.png
new file mode 100644
index 0000000000..8099f3addf
Binary files /dev/null and b/Buffs/Summon/LiliesOfFinalityBuff.png differ
diff --git a/Buffs/Summon/MagicHatBuff.cs b/Buffs/Summon/MagicHatBuff.cs
index 764c20904f..c0533f5edd 100644
--- a/Buffs/Summon/MagicHatBuff.cs
+++ b/Buffs/Summon/MagicHatBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon.Umbrella;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/Mechworm.cs b/Buffs/Summon/Mechworm.cs
index f501330b53..8bfb0258da 100644
--- a/Buffs/Summon/Mechworm.cs
+++ b/Buffs/Summon/Mechworm.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/MidnightSunBuff.cs b/Buffs/Summon/MidnightSunBuff.cs
index 69b89c6824..60b6001716 100644
--- a/Buffs/Summon/MidnightSunBuff.cs
+++ b/Buffs/Summon/MidnightSunBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/MiniatureEyeofCthulhu.cs b/Buffs/Summon/MiniatureEyeofCthulhu.cs
index 4fe8ff53f2..26b7572d75 100644
--- a/Buffs/Summon/MiniatureEyeofCthulhu.cs
+++ b/Buffs/Summon/MiniatureEyeofCthulhu.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/MountedScannerBuff.cs b/Buffs/Summon/MountedScannerBuff.cs
index 384adb80ff..9331a145d5 100644
--- a/Buffs/Summon/MountedScannerBuff.cs
+++ b/Buffs/Summon/MountedScannerBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.DraedonsArsenal;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/PerditionBuff.cs b/Buffs/Summon/PerditionBuff.cs
index 93fee4039e..adbde7de97 100644
--- a/Buffs/Summon/PerditionBuff.cs
+++ b/Buffs/Summon/PerditionBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/Phantom.cs b/Buffs/Summon/Phantom.cs
index 207bf90424..3c81ee95a1 100644
--- a/Buffs/Summon/Phantom.cs
+++ b/Buffs/Summon/Phantom.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/ProfanedSoulGuardians.cs b/Buffs/Summon/ProfanedSoulGuardians.cs
index 06c742fc52..f2f6e8c700 100644
--- a/Buffs/Summon/ProfanedSoulGuardians.cs
+++ b/Buffs/Summon/ProfanedSoulGuardians.cs
@@ -1,10 +1,10 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
- public class ProfanedSoulGuardians : ModBuff
+ public class ProfanedSoulGuardians : ModBuff
{
public override void SetStaticDefaults()
{
diff --git a/Buffs/Summon/PuffWarriorBuff.cs b/Buffs/Summon/PuffWarriorBuff.cs
index de4215a5ba..9636a62808 100644
--- a/Buffs/Summon/PuffWarriorBuff.cs
+++ b/Buffs/Summon/PuffWarriorBuff.cs
@@ -11,7 +11,7 @@ namespace CalamityMod.Buffs.Summon
{
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
- }
+ }
public override void Update(Player player, ref int buffIndex)
{
diff --git a/Buffs/Summon/ResurrectionButterflyBuff.cs b/Buffs/Summon/ResurrectionButterflyBuff.cs
index 538b0288d9..96a073b840 100644
--- a/Buffs/Summon/ResurrectionButterflyBuff.cs
+++ b/Buffs/Summon/ResurrectionButterflyBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/SageSpiritBuff.cs b/Buffs/Summon/SageSpiritBuff.cs
index 3f780b7503..d015b77085 100644
--- a/Buffs/Summon/SageSpiritBuff.cs
+++ b/Buffs/Summon/SageSpiritBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/Sandnado.cs b/Buffs/Summon/Sandnado.cs
index db41c09f0b..1d9377bc51 100644
--- a/Buffs/Summon/Sandnado.cs
+++ b/Buffs/Summon/Sandnado.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/SandyHealingWaifu.cs b/Buffs/Summon/SandyHealingWaifu.cs
index 8c77bfccdd..810741be2a 100644
--- a/Buffs/Summon/SandyHealingWaifu.cs
+++ b/Buffs/Summon/SandyHealingWaifu.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/SandyWaifu.cs b/Buffs/Summon/SandyWaifu.cs
index b68a20b4ba..6fd6d1e31c 100644
--- a/Buffs/Summon/SandyWaifu.cs
+++ b/Buffs/Summon/SandyWaifu.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/SeaSnailBuff.cs b/Buffs/Summon/SeaSnailBuff.cs
index 79d5efbdd7..0068dd0252 100644
--- a/Buffs/Summon/SeaSnailBuff.cs
+++ b/Buffs/Summon/SeaSnailBuff.cs
@@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.Summon
{
CalamityPlayer modPlayer = player.Calamity();
-
+
if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0)
{
modPlayer.victideSnail = true;
diff --git a/Buffs/Summon/ShellfishBuff.cs b/Buffs/Summon/ShellfishBuff.cs
index 66aa820207..816d6898ec 100644
--- a/Buffs/Summon/ShellfishBuff.cs
+++ b/Buffs/Summon/ShellfishBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/SiriusBuff.cs b/Buffs/Summon/SiriusBuff.cs
index 99a2714334..8f4ebc9d7f 100644
--- a/Buffs/Summon/SiriusBuff.cs
+++ b/Buffs/Summon/SiriusBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/SolarSpirit.cs b/Buffs/Summon/SolarSpirit.cs
index d84273dc16..c7f813a3eb 100644
--- a/Buffs/Summon/SolarSpirit.cs
+++ b/Buffs/Summon/SolarSpirit.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/SoulSeekerBuff.cs b/Buffs/Summon/SoulSeekerBuff.cs
index 26827e137a..b4ffd374ba 100644
--- a/Buffs/Summon/SoulSeekerBuff.cs
+++ b/Buffs/Summon/SoulSeekerBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/StarSwallowerBuff.cs b/Buffs/Summon/StarSwallowerBuff.cs
index 799bf4f7e8..dc4183712e 100644
--- a/Buffs/Summon/StarSwallowerBuff.cs
+++ b/Buffs/Summon/StarSwallowerBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.DraedonsArsenal;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/TacticalPlagueEngineBuff.cs b/Buffs/Summon/TacticalPlagueEngineBuff.cs
index d7ffff36db..f4f6c8c00e 100644
--- a/Buffs/Summon/TacticalPlagueEngineBuff.cs
+++ b/Buffs/Summon/TacticalPlagueEngineBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/TundraFlameBlossomsBuff.cs b/Buffs/Summon/TundraFlameBlossomsBuff.cs
index 3618235ef3..d9494c1f34 100644
--- a/Buffs/Summon/TundraFlameBlossomsBuff.cs
+++ b/Buffs/Summon/TundraFlameBlossomsBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/VileFeederBuff.cs b/Buffs/Summon/VileFeederBuff.cs
index a96acab0d8..abfd558b11 100644
--- a/Buffs/Summon/VileFeederBuff.cs
+++ b/Buffs/Summon/VileFeederBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/ViridVanguardBuff.cs b/Buffs/Summon/ViridVanguardBuff.cs
index fcf7262700..8e26caefc8 100644
--- a/Buffs/Summon/ViridVanguardBuff.cs
+++ b/Buffs/Summon/ViridVanguardBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/WaterWaifu.cs b/Buffs/Summon/WaterWaifu.cs
index de681d9fca..49a08c65cd 100644
--- a/Buffs/Summon/WaterWaifu.cs
+++ b/Buffs/Summon/WaterWaifu.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/Whips/ProfanedCrystalWhipBuff.cs b/Buffs/Summon/Whips/ProfanedCrystalWhipBuff.cs
index ce02a61469..8d52209e5a 100644
--- a/Buffs/Summon/Whips/ProfanedCrystalWhipBuff.cs
+++ b/Buffs/Summon/Whips/ProfanedCrystalWhipBuff.cs
@@ -1,7 +1,7 @@
-using static CalamityMod.Items.Accessories.ProfanedSoulCrystal;
-using Terraria;
+using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
+using static CalamityMod.Items.Accessories.ProfanedSoulCrystal;
namespace CalamityMod.Buffs.Summon.Whips
{
@@ -31,7 +31,7 @@ namespace CalamityMod.Buffs.Summon.Whips
player.ClearBuff(Type);
return;
}
-
+
var whipBuffs = new int[]
{
BuffID.CoolWhipPlayerBuff, BuffID.ScytheWhipPlayerBuff, BuffID.SwordWhipPlayerBuff,
diff --git a/Buffs/Summon/Whips/ProfanedCrystalWhipDebuff.cs b/Buffs/Summon/Whips/ProfanedCrystalWhipDebuff.cs
index c4eb8cca5d..77d46fce81 100644
--- a/Buffs/Summon/Whips/ProfanedCrystalWhipDebuff.cs
+++ b/Buffs/Summon/Whips/ProfanedCrystalWhipDebuff.cs
@@ -24,13 +24,13 @@ namespace CalamityMod.Buffs.Summon.Whips
BuffID.ScytheWhipEnemyDebuff, BuffID.CoolWhipNPCDebuff, BuffID.MaceWhipNPCDebuff,
BuffID.RainbowWhipNPCDebuff, BuffID.SwordWhipNPCDebuff, BuffID.ThornWhipNPCDebuff
};
-
+
//kill whip stacking for psc purposes
// 29SEP2023: Ozzatron: this won't kill stacking with other mod whips. need a generalized system for this
for (int buff = 0; buff < NPC.maxBuffs; buff++)
{
int buffID = npc.buffType[buff];
- if(npc.buffTime[buff] > 0 && whipBuffs.Contains(buffID) && npc.buffType[buff] != Type)
+ if (npc.buffTime[buff] > 0 && whipBuffs.Contains(buffID) && npc.buffType[buff] != Type)
npc.RequestBuffRemoval(npc.buffType[buff]);
}
}
diff --git a/Buffs/Summon/WitherBlossomsBuff.cs b/Buffs/Summon/WitherBlossomsBuff.cs
index fd00d764f8..297bb0468a 100644
--- a/Buffs/Summon/WitherBlossomsBuff.cs
+++ b/Buffs/Summon/WitherBlossomsBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/Buffs/Summon/WulfrumDroidBuff.cs b/Buffs/Summon/WulfrumDroidBuff.cs
index d19c5c5102..feb60ab4a4 100644
--- a/Buffs/Summon/WulfrumDroidBuff.cs
+++ b/Buffs/Summon/WulfrumDroidBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs
index 077cc4273b..a6800c1a5f 100644
--- a/CalPlayer/CalamityPlayer.cs
+++ b/CalPlayer/CalamityPlayer.cs
@@ -4,6 +4,7 @@ using System.Linq;
using CalamityMod.Balancing;
using CalamityMod.BiomeManagers;
using CalamityMod.Buffs;
+using CalamityMod.Buffs.Placeables;
using CalamityMod.Buffs.StatBuffs;
using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.CalPlayer.Dashes;
@@ -30,7 +31,6 @@ using CalamityMod.Items.TreasureBags.MiscGrabBags;
using CalamityMod.Items.VanillaArmorChanges;
using CalamityMod.Items.Weapons.DraedonsArsenal;
using CalamityMod.Items.Weapons.Melee;
-using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.NPCs;
@@ -54,6 +54,7 @@ using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ModLoader.IO;
+using Terraria.Utilities.Terraria.Utilities;
namespace CalamityMod.CalPlayer
{
@@ -79,7 +80,6 @@ namespace CalamityMod.CalPlayer
public bool killSpikyBalls = false;
public float KameiTrailXScale = 0.1f;
public int KameiBladeUseDelay = 0;
- public int SpeedBlasterDashDelayCooldown = 0;
public Vector2[] OldPositions = new Vector2[4];
public double contactDamageReduction = 0D;
public double projectileDamageReduction = 0D;
@@ -192,8 +192,8 @@ namespace CalamityMod.CalPlayer
public int PHAThammer = 0;
public int StellarHammer = 0;
public int GalaxyHammer = 0;
+ public int NorfleetCounter = 0;
public int hideOfDeusMeleeBoostTimer = 0;
- public int nebulaManaNerfCounter = 0;
public int alcoholPoisonLevel = 0;
public int modStealthTimer;
public int dashTimeMod;
@@ -229,6 +229,7 @@ namespace CalamityMod.CalPlayer
public int spiritOriginBullseyeShootCountdown = 0;
public int spiritOriginConvertedCrit = 0;
public int RustyMedallionCooldown = 0;
+ public int MiniSwamerCooldown = 0;
public float SulphWaterPoisoningLevel;
public float holyInfernoFadeIntensity;
public NPC unstableSelectedTarget;
@@ -309,7 +310,6 @@ namespace CalamityMod.CalPlayer
#region Pet
public bool thirdSage = false;
- public bool thirdSageH = false;
public bool perfmini = false;
public bool akato = false;
public bool yharonPet = false;
@@ -358,6 +358,7 @@ namespace CalamityMod.CalPlayer
public bool AdrenalineTrail = false;
public float adrenaline = 0f;
public float adrenalineMax = 100f; // 0 to 100% by default
+ public int adrenalinePauseTimer = 0;
public int AdrenalineDuration = CalamityUtils.SecondsToFrames(5);
public int AdrenalineChargeTime = CalamityUtils.SecondsToFrames(30);
public int AdrenalineFadeTime = CalamityUtils.SecondsToFrames(2);
@@ -435,7 +436,7 @@ namespace CalamityMod.CalPlayer
// Lunic Corps shield comes from an armor set and its visibility is non optional
internal float lunicCorpsShieldPartialRechargeProgress = 0f;
internal bool playedLunicCorpsShieldSound = false;
-
+
//Profaned soul shield applies to psa and psc, with differing max hps for each
public int pSoulShieldDurability = 0;
public bool pSoulShieldVisible = false;
@@ -496,7 +497,6 @@ namespace CalamityMod.CalPlayer
public bool laudanum = false;
public bool heartOfDarkness = false;
public bool draedonsHeart = false;
- public int nanomachinesLockoutTimer = 0;
public bool vexation = false;
public bool dodgeScarf = false;
public bool evasionScarf = false;
@@ -509,6 +509,7 @@ namespace CalamityMod.CalPlayer
public bool ascendantTrail = false;
public bool eGauntlet = false;
public int gloveLevel = 0; // Used to prevent glove stacking
+ public bool alreadyHasFrogLeg = false; // Used to prevent Frog Leg tinker stacking
public bool eTalisman = false;
public int statisTimer = 0;
public bool nucleogenesis = false;
@@ -523,6 +524,7 @@ namespace CalamityMod.CalPlayer
public bool transformer = false;
public bool hideOfDeus = false;
public bool dAmulet = false;
+ public bool rampartOfDeities = false;
public bool gShell = false;
public bool lAmbergris = false;
public bool tortShell = false;
@@ -532,6 +534,8 @@ namespace CalamityMod.CalPlayer
public bool honeyDewHalveDebuffs = false;
public bool livingDewHalveDebuffs = false;
public int jewelBonusDefense = 0;
+ public float pulseCounter = 0; // Toxic Heart
+ public float pulseRate = 1; // Toxic Heart
public bool aAmpoule = false;
public bool rOoze = false;
public bool JustWasDebuffed = false;
@@ -576,13 +580,18 @@ namespace CalamityMod.CalPlayer
public bool bloodPactBoost = false;
public bool bloodflareCore = false;
public int bloodflareCoreRemainingHealOverTime = 0;
+
public bool chaliceOfTheBloodGod = false;
public double chaliceBleedoutBuffer = 0D;
public double chaliceDamagePointPartialProgress = 0D;
+ public int chaliceBleedoutToApplyOnHurt = 0;
+ public int chaliceHitOriginalDamage = 0;
+
public bool elementalHeart = false;
public bool crownJewel = false;
public bool infectedJewel = false;
public bool purity = false;
+ public bool eleResist = false;
public int PurityHealSlowdownFrames = 0;
public bool harpyRing = false;
public bool angelTreads = false;
@@ -593,6 +602,8 @@ namespace CalamityMod.CalPlayer
public bool anechoicPlating = false;
public bool jellyfishNecklace = false;
public bool fairyBoots = false;
+ public bool flameWakerBoots = false;
+ public int bootLevel = 0; //Used to prevent Flame Waker and Hellfire Treads stacking
public bool hellfireTreads = false;
public bool abyssalAmulet = false;
public bool lumenousAmulet = false;
@@ -684,6 +695,7 @@ namespace CalamityMod.CalPlayer
public bool silvaWings = false;
public int icicleCooldown = 0;
public bool RustyMedallionDroplets = false;
+ public bool MiniSwarmers = false;
public bool noStupidNaturalARSpawns = false;
public int voidFrameCounter = 0;
public int voidFrame = 0;
@@ -715,8 +727,8 @@ namespace CalamityMod.CalPlayer
public bool frostSet = false; //vanilla armor
public bool victideSet = false;
public bool victideSummoner = false;
- public bool sulfurSet = false;
- public bool sulfurJump = false;
+ public bool sulphurSet = false;
+ public bool sulphurJump = false;
public int sulphurBubbleCooldown = 0;
public bool aeroSet = false;
public bool statigelSet = false;
@@ -725,7 +737,6 @@ namespace CalamityMod.CalPlayer
public bool tarragonCloak = false;
public int tarraDefenseTime = 600;
public bool tarraMage = false;
- public int tarraMageHealCooldown = 0;
public int tarraCrits = 0;
public bool tarraRanged = false;
public int tarraRangedCooldown = 0;
@@ -786,6 +797,7 @@ namespace CalamityMod.CalPlayer
public bool astralStarRain = false;
public int astralStarRainCooldown = 0;
public int AbaddonCooldown = 0;
+ public int AlchFlaskCooldown = 0;
public bool plagueReaper = false;
public bool plaguebringerPatronSet = false;
public bool plaguebringerCarapace = false;
@@ -892,6 +904,9 @@ namespace CalamityMod.CalPlayer
public bool wither = false;
public bool ManaBurn = false;
+ public int ImmobilityDebuffImmunityTimer = 0;
+ public const int ImmobilityDebuffImmunityTimerMax = 300;
+
public const int SulphSeaWaterSafetyTime = 720;
public const int SulphSeaWaterRecoveryTime = 150;
#endregion
@@ -965,6 +980,7 @@ namespace CalamityMod.CalPlayer
public double pinkCandleHealFraction = 0D;
public bool yellowCandle = false;
public bool trippy = false;
+ public int trippyLevel = 1;
public bool amidiasBlessing = false;
public bool bloodfinBoost = false;
public int bloodfinTimer = 30;
@@ -1080,14 +1096,12 @@ namespace CalamityMod.CalPlayer
public bool celestialDragons = false;
public bool KalandraMirror = false;
public bool StellarTorus = false;
+ public bool LiliesOfFinalityBool = false;
#endregion
#region Biome
public bool ZoneCalamity => Player.InModBiome(ModContent.GetInstance());
- public bool ZoneAstral => (Player.InModBiome(ModContent.GetInstance()) ||
- Player.InModBiome(ModContent.GetInstance()) ||
- Player.InModBiome(ModContent.GetInstance()) ||
- Player.InModBiome(ModContent.GetInstance())) && !ZoneAbyss;
+ public bool ZoneAstral => Player.InModBiome(ModContent.GetInstance()) && !ZoneAbyss;
public bool ZoneSunkenSea => ZoneSunkenBurrows || ZoneSunkenSeaReefs || ZoneSunkenSeaPolyp || ZoneSunkenSeaShores;
public bool ZoneSunkenBurrows => Player.InModBiome(ModContent.GetInstance());
public bool ZoneSunkenSeaReefs => Player.InModBiome(ModContent.GetInstance());
@@ -1179,11 +1193,34 @@ namespace CalamityMod.CalPlayer
public Vector2 FireDrawerPosition;
public int monolithAccursedShader = 0;
+
+ public int monolithBossRushShader = 0;
+
+ public int monolithExoShader = 0;
+
+ public int monolithLeviathanShader = 0;
+
+ public int monolithPlagueShader = 0;
+
+ public int monolithCryogenShader = 0;
+
+ public int monolithAstralShader = 0;
+
+ public int monolithDevourerBShader = 0;
+
+ public int monolithDevourerPShader = 0;
+
+ public int monolithYharonShader = 0;
+
+ // This may seem like a scuffed setup, but a simple bool will have ordering issues when it comes to drawing.
+ // Until ModSceneMetrics gets implemented, this works for now.
+ public int BrimstoneLavaFountainCounter = 0;
#endregion Draw Effects
#region Draedon Summoning
public bool AbleToSelectExoMech = false;
public bool HasTalkedAtCodebreaker = false;
+ public bool HasCraftedDraedonsForge = false;
public List SeenDraedonDialogs = new();
#endregion Draedon Summoning
@@ -1234,7 +1271,6 @@ namespace CalamityMod.CalPlayer
adrenalineBoostThree = false;
drawBossHPBar = true;
shouldDrawSmallText = true;
- healToFull = false;
newMerchantInventory = false;
newPainterInventory = false;
@@ -1287,7 +1323,6 @@ namespace CalamityMod.CalPlayer
boost.AddWithCondition("adrenalineThree", adrenalineBoostThree);
boost.AddWithCondition("bossHPBar", drawBossHPBar);
boost.AddWithCondition("drawSmallText", shouldDrawSmallText);
- boost.AddWithCondition("fullHPRespawn", healToFull);
boost.AddWithCondition("newMerchantInventory", newMerchantInventory);
boost.AddWithCondition("newPainterInventory", newPainterInventory);
@@ -1318,6 +1353,7 @@ namespace CalamityMod.CalPlayer
boost.AddWithCondition("newCalamitasInventory", newCalamitasInventory);
boost.AddWithCondition("GivenBrimstoneLocus", GivenBrimstoneLocus);
boost.AddWithCondition("HasTalkedAtCodebreaker", HasTalkedAtCodebreaker);
+ boost.AddWithCondition("HasCraftedDraedonsForge", HasCraftedDraedonsForge);
// Calculate the new total time of all sessions at the instant of this player save.
TimeSpan newSessionTotal = previousSessionTotal.Add(CalamityMod.SpeedrunTimer.Elapsed);
@@ -1377,7 +1413,6 @@ namespace CalamityMod.CalPlayer
adrenalineBoostThree = boost.Contains("adrenalineThree");
drawBossHPBar = boost.Contains("bossHPBar");
shouldDrawSmallText = boost.Contains("drawSmallText");
- healToFull = boost.Contains("fullHPRespawn");
newMerchantInventory = boost.Contains("newMerchantInventory");
newPainterInventory = boost.Contains("newPainterInventory");
@@ -1408,6 +1443,7 @@ namespace CalamityMod.CalPlayer
newCalamitasInventory = boost.Contains("newCalamitasInventory");
GivenBrimstoneLocus = boost.Contains("GivenBrimstoneLocus");
HasTalkedAtCodebreaker = boost.Contains("HasTalkedAtCodebreaker");
+ HasCraftedDraedonsForge = boost.Contains("HasCraftedDraedonsForge");
// Load rage if it's there, which it will be for any players saved with 1.5.
// Older players have "stress" instead, which will be ignored. This is intentional.
@@ -1656,6 +1692,7 @@ namespace CalamityMod.CalPlayer
transformer = false;
hideOfDeus = false;
dAmulet = false;
+ rampartOfDeities = false;
gShell = false;
lAmbergris = false;
tortShell = false;
@@ -1679,6 +1716,7 @@ namespace CalamityMod.CalPlayer
ascendantTrail = false;
eGauntlet = false;
gloveLevel = 0;
+ alreadyHasFrogLeg = false;
eTalisman = false;
nucleogenesis = false;
nuclearFuelRod = false;
@@ -1700,6 +1738,7 @@ namespace CalamityMod.CalPlayer
bloodPact = false;
bloodflareCore = false;
chaliceOfTheBloodGod = false;
+ chaliceBleedoutToApplyOnHurt = 0; // Resets every frame so it doesn't improperly carry over between hits
elementalHeart = false;
crownJewel = false;
infectedJewel = false;
@@ -1755,7 +1794,7 @@ namespace CalamityMod.CalPlayer
silvaWings = false;
corrosiveSpine = false;
RustyMedallionDroplets = false;
- noStupidNaturalARSpawns = false;
+ MiniSwarmers = false;
rottenDogTooth = false;
angelicAlliance = false;
BloomStoneRegen = false;
@@ -1793,6 +1832,7 @@ namespace CalamityMod.CalPlayer
anechoicPlating = false;
jellyfishNecklace = false;
fairyBoots = false;
+ flameWakerBoots = false;
hellfireTreads = false;
abyssalAmulet = false;
lumenousAmulet = false;
@@ -1824,7 +1864,7 @@ namespace CalamityMod.CalPlayer
victideSet = false;
victideSummoner = false;
- sulfurSet = false;
+ sulphurSet = false;
aeroSet = false;
@@ -2122,12 +2162,16 @@ namespace CalamityMod.CalPlayer
celestialDragons = false;
KalandraMirror = false;
StellarTorus = false;
+ LiliesOfFinalityBool = false;
+ /* Spawn blockers from back when they used to work by being favorited and not a toggleable item
+ noStupidNaturalARSpawns = false
disableVoodooSpawns = false;
disablePerfCystSpawns = false;
disableHiveCystSpawns = false;
disableNaturalScourgeSpawns = false;
disableAnahitaSpawns = false;
+ */
abyssalDivingSuitPrevious = abyssalDivingSuit;
abyssalDivingSuit = abyssalDivingSuitHide = abyssalDivingSuitForce = abyssalDivingSuitPower = false;
@@ -2200,13 +2244,13 @@ namespace CalamityMod.CalPlayer
#region Screen Position Movements
public override void ModifyScreenPosition()
{
- if (!CalamityConfig.Instance.Screenshake)
+ if (CalamityConfig.Instance.ScreenshakePower == 0)
return;
if (GeneralScreenShakePower > 0f)
{
- Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower, GeneralScreenShakePower);
- GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f);
+ Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower * CalamityConfig.Instance.ScreenshakePower, GeneralScreenShakePower * CalamityConfig.Instance.ScreenshakePower);
+ GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityConfig.Instance.ScreenshakePower);
}
}
#endregion
@@ -2281,10 +2325,10 @@ namespace CalamityMod.CalPlayer
gSabatonTempJumpSpeed = 0;
astralStarRainCooldown = 0;
AbaddonCooldown = 0;
+ AlchFlaskCooldown = 0;
silvaMageCooldown = 0;
bloodflareMageCooldown = 0;
tarraRangedCooldown = 0;
- tarraMageHealCooldown = 0;
hideOfDeusMeleeBoostTimer = 0;
externalAbyssLight = 0;
externalColdImmunity = externalHeatImmunity = false;
@@ -2348,6 +2392,7 @@ namespace CalamityMod.CalPlayer
banishingFire = false;
wither = false;
PurityHealSlowdownFrames = 0;
+ ImmobilityDebuffImmunityTimer = 0;
#endregion
#region Rogue
@@ -2406,7 +2451,7 @@ namespace CalamityMod.CalPlayer
soaring = false;
bounding = false;
shadow = false;
- nanomachinesLockoutTimer = 0;
+ adrenalinePauseTimer = 0;
photosynthesis = false;
astralInjection = false;
gravityNormalizer = false;
@@ -2455,6 +2500,7 @@ namespace CalamityMod.CalPlayer
pinkCandleHealFraction = 0D;
yellowCandle = false;
trippy = false;
+ trippyLevel = 1;
amidiasBlessing = false;
bloodfinBoost = false;
bloodfinTimer = 0;
@@ -2551,7 +2597,7 @@ namespace CalamityMod.CalPlayer
frostSet = false; //vanilla armor
victideSet = false;
aeroSet = false;
- sulfurSet = false;
+ sulphurSet = false;
statigelSet = false;
tarraSet = false;
tarraMelee = false;
@@ -2616,6 +2662,7 @@ namespace CalamityMod.CalPlayer
chaliceBleedoutBuffer = 0D;
chaliceDamagePointPartialProgress = 0D;
+ chaliceHitOriginalDamage = 0;
if (BossRushEvent.BossRushActive)
{
@@ -2666,6 +2713,15 @@ namespace CalamityMod.CalPlayer
if (Player.dead)
return;
+ if (ascendantInsignia && Main.myPlayer == Player.whoAmI && CalamityKeybinds.AscendantInsigniaHotKey.JustPressed && ascendantInsigniaCooldown <= 0)
+ {
+ var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType()));
+ Projectile.NewProjectileDirect(source, Player.Center - Vector2.UnitY * 45f, Vector2.Zero, ModContent.ProjectileType(), 0, 0f);
+ SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Item/AscendantActivate"));
+ ascendantInsigniaCooldown = 2400;
+ ascendantInsigniaBuffTime = 240; //4 seconds
+ }
+
//Only increment hotkey holdtime if not on ground, not mounted, not on rope, not hooked, not tongued, otherwise reset hold time to zero
if (CalamityKeybinds.GravistarSabatonHotkey.Current && gSabaton && Main.myPlayer == Player.whoAmI && (Player.velocity.Y != Player.oldVelocity.Y) && !Player.pulley && !Player.mount.Active && Player.grappling[0] == -1 && !Player.tongued)
{
@@ -2738,6 +2794,8 @@ namespace CalamityMod.CalPlayer
Projectile.NewProjectile(source, new Vector2((int)(Player.Center.X + (Math.Sin(projIndex * start) * 300)), (int)(Player.Center.Y + (Math.Cos(projIndex * start) * 300))), Vector2.Zero, ModContent.ProjectileType(), damage, proj.knockBack / 10f, Player.whoAmI, Main.rand.Next(180), projIndex * start);
Player.statLife += 2;
Player.HealEffect(2);
+ if (Player.statLife > Player.statLifeMax2)
+ Player.statLife = Player.statLifeMax2;
}
}
if (CalamityKeybinds.SandCloakHotkey.JustPressed && sandCloak && Main.myPlayer == Player.whoAmI && rogueStealth >= rogueStealthMax * 0.1f &&
@@ -2789,12 +2847,12 @@ namespace CalamityMod.CalPlayer
Vector2 step = teleportOffset / numDust;
for (int i = 0; i < numDust; i++)
{
- int dustIndex = Dust.NewDust(Player.Center - (step * i), 1, 1, 21, step.X, step.Y);
+ int dustIndex = Dust.NewDust(Player.Center - (step * i), 1, 1, DustID.VilePowder, step.X, step.Y);
Main.dust[dustIndex].noGravity = true;
Main.dust[dustIndex].noLight = true;
}
- spectralVeilImmunity = 45;
+ spectralVeilImmunity = SpectralVeil.VeilIFrames;
}
}
}
@@ -2862,7 +2920,7 @@ namespace CalamityMod.CalPlayer
SoundEngine.PlaySound(BloodflareHeadRanged.ActivationSound, Player.Center);
for (int d = 0; d < 64; d++)
{
- int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f);
+ int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Necroplasm, 0f, 0f, 0, default, 1f);
Main.dust[dust].velocity *= 3f;
Main.dust[dust].scale *= 1.15f;
}
@@ -2872,7 +2930,7 @@ namespace CalamityMod.CalPlayer
Vector2 source = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f;
source = source.RotatedBy((double)((float)(d - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center;
Vector2 dustVel = source - Player.Center;
- int phanto = Dust.NewDust(source + dustVel, 0, 0, (int)CalamityDusts.Polterplasm, dustVel.X * 1.5f, dustVel.Y * 1.5f, 100, default, 1.4f);
+ int phanto = Dust.NewDust(source + dustVel, 0, 0, (int)CalamityDusts.Necroplasm, dustVel.X * 1.5f, dustVel.Y * 1.5f, 100, default, 1.4f);
Main.dust[phanto].noGravity = true;
Main.dust[phanto].noLight = true;
Main.dust[phanto].velocity = dustVel;
@@ -2913,7 +2971,7 @@ namespace CalamityMod.CalPlayer
SoundEngine.PlaySound(OmegaBlueHelmet.ActivationSound, Player.Center);
for (int i = 0; i < 66; i++)
{
- int d = Dust.NewDust(Player.position, Player.width, Player.height, 20, 0, 0, 100, Color.Transparent, 2.6f);
+ int d = Dust.NewDust(Player.position, Player.width, Player.height, DustID.PurificationPowder, 0, 0, 100, Color.Transparent, 2.6f);
Main.dust[d].noGravity = true;
Main.dust[d].noLight = true;
Main.dust[d].fadeIn = 1f;
@@ -2946,10 +3004,9 @@ namespace CalamityMod.CalPlayer
}
if (Main.netMode != NetmodeID.MultiplayerClient)
{
- for (int l = 0; l < Main.maxNPCs; l++)
+ foreach (NPC npc in Main.ActiveNPCs)
{
- NPC npc = Main.npc[l];
- if (npc.active && !npc.friendly && !npc.dontTakeDamage && Vector2.Distance(Player.Center, npc.Center) <= 3000f)
+ if (!npc.friendly && !npc.dontTakeDamage && Vector2.Distance(Player.Center, npc.Center) <= 3000f)
npc.AddBuff(ModContent.BuffType(), 600, false);
}
}
@@ -3037,10 +3094,11 @@ namespace CalamityMod.CalPlayer
//Right click dash on Speed Blaster
if (sBlasterDashActivated == true)
{
- if ((Player.controlUp || Player.controlDown || Player.controlLeft || Player.controlRight) && !Player.pulley && Player.grappling[0] == -1 && !Player.tongued && !Player.mount.Active && SpeedBlasterDashDelayCooldown == SpeedBlaster.DashCooldown && Player.dashDelay == 0)
+ if ((Player.controlUp || Player.controlDown || Player.controlLeft || Player.controlRight) && !Player.pulley && Player.grappling[0] == -1 && !Player.tongued && !Player.mount.Active && Player.HasCooldown(Cooldowns.SpeedBlasterBoost.ID) && Player.dashDelay == 0)
{
SpeedBlasterDashStarted = true;
}
+ sBlasterDashActivated = false;
}
if (Player.Calamity().SpeedBlasterDashStarted || (Player.dashDelay != 0 && Player.Calamity().LastUsedDashID == SpeedBlasterDash.ID))
@@ -3058,17 +3116,17 @@ namespace CalamityMod.CalPlayer
SoundEngine.PlaySound(SilvaHeadSummon.DispelSound, Player.Center);
for (int i = 0; i < 3; i++)
- Dust.NewDust(Player.position, 120, 120, 218, 0f, 0f, 100, default, 1.5f);
+ Dust.NewDust(Player.position, 120, 120, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1.5f);
for (int i = 0; i < 30; i++)
{
float angle = MathHelper.TwoPi * i / 30f;
- int dustIndex = Dust.NewDust(Player.position, 120, 120, 218, 0f, 0f, 0, default, 2f);
+ int dustIndex = Dust.NewDust(Player.position, 120, 120, DustID.Rain_BloodMoon, 0f, 0f, 0, default, 2f);
Main.dust[dustIndex].noGravity = true;
Main.dust[dustIndex].velocity *= 4f;
- dustIndex = Dust.NewDust(Player.position, 120, 120, 218, 0f, 0f, 100, default, 1f);
+ dustIndex = Dust.NewDust(Player.position, 120, 120, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1f);
Main.dust[dustIndex].velocity *= 2.25f;
Main.dust[dustIndex].noGravity = true;
- Dust.NewDust(Player.Center + angle.ToRotationVector2() * 160f, 0, 0, 218, 0f, 0f, 100, default, 1f);
+ Dust.NewDust(Player.Center + angle.ToRotationVector2() * 160f, 0, 0, DustID.Rain_BloodMoon, 0f, 0f, 100, default, 1f);
}
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
@@ -3076,7 +3134,7 @@ namespace CalamityMod.CalPlayer
float rageRatio = rage / rageMax;
float baseDamage = rageRatio * GaelsGreatsword.SkullsplosionDamageMultiplier * GaelsGreatsword.BaseDamage;
int damage = (int)Player.GetTotalDamage().ApplyTo(baseDamage);
- float skullCount = 20f;
+ float skullCount = 14f + (rageBoostOne ? 4f : 0f) + (rageBoostTwo ? 4f : 0f) + (rageBoostThree ? 4f : 0f);
float skullSpeed = 12f;
for (float i = 0; i < skullCount; i += 1f)
{
@@ -3240,13 +3298,13 @@ namespace CalamityMod.CalPlayer
// Make some dust
for (int index = 0; index < 100; ++index)
{
- Main.dust[Dust.NewDust(player.position, player.width, player.height, 164, player.velocity.X * 0.2f, player.velocity.Y * 0.2f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f;
+ Main.dust[Dust.NewDust(player.position, player.width, player.height, DustID.TeleportationPotion, player.velocity.X * 0.2f, player.velocity.Y * 0.2f, 150, Color.Cyan, 1.2f)].velocity *= 0.5f;
}
Rectangle rect = player.getRect();
int dustAmt = rect.Width * rect.Height / 5;
for (int k = 0; k < dustAmt; k++)
{
- int idx = Dust.NewDust(new Vector2(rect.X, rect.Y), rect.Width, rect.Height, 164);
+ int idx = Dust.NewDust(new Vector2(rect.X, rect.Y), rect.Width, rect.Height, DustID.TeleportationPotion);
Main.dust[idx].scale = Main.rand.NextFloat(0.2f, 0.7f);
if (k < 10)
Main.dust[idx].scale += 0.25f;
@@ -3255,7 +3313,7 @@ namespace CalamityMod.CalPlayer
}
for (int k = 0; k < 50; k++)
{
- int idx = Dust.NewDust(new Vector2(rect.X, rect.Y), rect.Width, rect.Height, 180);
+ int idx = Dust.NewDust(new Vector2(rect.X, rect.Y), rect.Width, rect.Height, DustID.DungeonSpirit);
Main.dust[idx].noGravity = true;
for (int i = 0; i < 5; i++)
{
@@ -3291,6 +3349,9 @@ namespace CalamityMod.CalPlayer
// TODO -- why is boss health bar code in Player.UpdateEquips and not a ModSystem
CalamityConfig.Instance.BossHealthBarExtraInfo = shouldDrawSmallText;
+ // Putting this in GlobalItem will run multiple times for each slot, which this system already does, creating a slew of problems.
+ VanillaArmorChangeManager.ApplyPotentialEffectsTo(Player);
+
// If the config is enabled, vastly increase the player's base tile and wall placement speeds
// This stacks with the Brick Layer and Portable Cement Mixer
if (CalamityConfig.Instance.FasterTilePlacement)
@@ -3583,17 +3644,27 @@ namespace CalamityMod.CalPlayer
}
}
- // Add a cooldown display for the vanilla lifesteal cooldown, which is active when negative
- if (Player.whoAmI == Main.myPlayer && Player.lifeSteal < 0f)
+ // Add a cooldown display for the vanilla lifesteal cooldown, which is active when negative.
+ if (Player.whoAmI == Main.myPlayer)
{
- float duration = Player.lifeSteal;
- float baseCooldown = Main.expertMode ? 0.5f : 0.6f;
- float lifeStealNerf = BossRushEvent.BossRushActive ? 0.3f : CalamityWorld.death ? 0.25f : CalamityWorld.revenge ? 0.2f : Main.expertMode ? 0.15f : 0.1f;
- duration /= baseCooldown - lifeStealNerf;
- duration *= -1f;
+ float baseRecoveryRate = Main.expertMode ? BalancingConstants.LifeStealRecoveryRate_Expert : BalancingConstants.LifeStealRecoveryRate_Classic;
- if (!Player.HasCooldown(LifeSteal.ID) || (cooldowns[LifeSteal.ID].duration < (int)duration))
- Player.AddCooldown(LifeSteal.ID, (int)duration);
+ float lifeStealRecoveryRateReduction =
+ CalamityWorld.death ? BalancingConstants.LifeStealRecoveryRateReduction_Death :
+ CalamityWorld.revenge ? BalancingConstants.LifeStealRecoveryRateReduction_Revengeance :
+ Main.expertMode ? BalancingConstants.LifeStealRecoveryRateReduction_Expert :
+ BalancingConstants.LifeStealRecoveryRateReduction_Classic;
+
+ if (Main.masterMode)
+ lifeStealRecoveryRateReduction += BalancingConstants.LifeStealRecoveryRateReduction_Master;
+
+ float lifeStealRecoveryRate = baseRecoveryRate - lifeStealRecoveryRateReduction;
+ if (Player.lifeSteal < -lifeStealRecoveryRate)
+ {
+ int duration = (int)Math.Ceiling(Math.Abs(Player.lifeSteal) / lifeStealRecoveryRate);
+ if (!Player.HasCooldown(LifeSteal.ID) || (cooldowns[LifeSteal.ID].duration < duration))
+ Player.AddCooldown(LifeSteal.ID, duration);
+ }
}
ForceVariousEffects();
@@ -3605,7 +3676,7 @@ namespace CalamityMod.CalPlayer
{
// True melee damage from various vanilla equipment placed here.
- // Titan Glove and ALL upgrades
+ // Titan Glove and ALL upgrades.
if (Player.kbGlove)
Player.GetDamage() += 0.1f;
@@ -3615,11 +3686,9 @@ namespace CalamityMod.CalPlayer
if (gSabatonTempJumpSpeed > 0)
{
gSabatonTempJumpSpeed--;
- //Only give temporary jump speed if Gravistar Sabaton is equipped, but still decrement the time so that you can't store it for later
+ // Only give temporary jump speed if Gravistar Sabaton is equipped, but still decrement the time so that you can't store it for later.
if (gSabaton && Player.whoAmI == Main.myPlayer)
- {
Player.jumpSpeedBoost += 2f;
- }
}
}
#endregion
@@ -3646,14 +3715,13 @@ namespace CalamityMod.CalPlayer
(stressPills ? 0.05f : 0f) +
((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) +
(aquaticHeartWaterBuff ? 0.15f : 0f) +
- ((frostFlare && Player.statLife < (int)(Player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
+ ((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 0.15f : 0f) +
(dragonScales ? 0.1f : 0f) +
(kamiBoost ? KamiBuff.RunAccelerationBoost : 0f) +
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
(silvaSet ? 0.05f : 0f) +
- (blueCandle ? 0.05f : 0f) +
+ (blueCandle ? CirrusBlueCandleBuff.AccelerationBoost : 0f) +
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
- ((deepDiver && Player.IsUnderwater()) ? 0.15f : 0f) +
(hasteLevel * 0.05f);
float runSpeedMult = 1f +
@@ -3662,13 +3730,12 @@ namespace CalamityMod.CalPlayer
(stressPills ? 0.05f : 0f) +
((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) +
(aquaticHeartWaterBuff ? 0.15f : 0f) +
- ((frostFlare && Player.statLife < (int)(Player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
+ ((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 0.15f : 0f) +
(dragonScales ? 0.1f : 0f) +
(kamiBoost ? KamiBuff.RunSpeedBoost : 0f) +
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
(silvaSet ? 0.05f : 0f) +
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
- ((deepDiver && Player.IsUnderwater()) ? 0.15f : 0f) +
(hasteLevel * 0.05f);
if ((Player.slippy || Player.slippy2) && Player.iceSkate)
@@ -3717,8 +3784,7 @@ namespace CalamityMod.CalPlayer
#region On Respawn
public override void OnRespawn()
{
- if (healToFull)
- thirdSageH = true;
+ healToFull = true;
// The player rotation can be off if the player dies at the right time when using Final Dawn.
Player.fullRotation = 0f;
@@ -3916,7 +3982,7 @@ namespace CalamityMod.CalPlayer
{
if (Main.rand.NextBool(3))
{
- int element = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 66, Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.25f);
+ int element = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.RainbowTorch, Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.25f);
Main.dust[element].noGravity = true;
}
}
@@ -3924,21 +3990,21 @@ namespace CalamityMod.CalPlayer
{
if (Main.rand.NextBool(3))
{
- Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 67, Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, default, 0.75f);
+ Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.IceRod, Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, default, 0.75f);
}
}
if (xerocSet)
{
if (Main.rand.NextBool(3))
{
- Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 58, Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, default, 1.25f);
+ Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.Enchanted_Pink, Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, default, 1.25f);
}
}
if (dsSetBonus)
{
if (Main.rand.NextBool(3))
{
- Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 27, Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, default, 2.5f);
+ Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.Shadowflame, Player.velocity.X * 0.2f + Player.direction * 3f, Player.velocity.Y * 0.2f, 100, default, 2.5f);
}
}
}
@@ -4045,9 +4111,9 @@ namespace CalamityMod.CalPlayer
int d = (int)Player.GetTotalDamage().ApplyTo(RustyMedallion.AcidDropBaseDamage);
d = Player.ApplyArmorAccDamageBonusesTo(d);
- Vector2 startingPosition = Main.MouseWorld - Vector2.UnitY.RotatedByRandom(0.4f) * 1250f;
- Vector2 directionToMouse = (Main.MouseWorld - startingPosition).SafeNormalize(Vector2.UnitY).RotatedByRandom(0.1f);
- int drop = Projectile.NewProjectile(source, startingPosition, directionToMouse * 15f, ModContent.ProjectileType(), d, 0f, Player.whoAmI);
+ Vector2 startingPosition = Main.MouseWorld - Vector2.UnitY.RotatedByRandom(0.3f) * 1250f;
+ Vector2 directionToMouse = (Main.MouseWorld - startingPosition).SafeNormalize(Vector2.UnitX);
+ int drop = Projectile.NewProjectile(source, startingPosition, directionToMouse * 15f, ModContent.ProjectileType(), d, 0f, Player.whoAmI, 3);
if (drop.WithinBounds(Main.maxProjectiles))
{
Main.projectile[drop].penetrate = 2;
@@ -4057,6 +4123,17 @@ namespace CalamityMod.CalPlayer
}
}
+ if (MiniSwarmers && MiniSwamerCooldown <= 0)
+ {
+ if (item.CountsAsClass() && !item.channel)
+ {
+ int newDamage = (int)(damage * (6 - 5 * (item.useTime >= 25 ? 1 : item.useTime / 25)));
+ newDamage = Player.ApplyArmorAccDamageBonusesTo(newDamage);
+ Projectile.NewProjectile(source, position, velocity * 1.25f, ModContent.ProjectileType(), newDamage, 2f, Player.whoAmI);
+
+ MiniSwamerCooldown = DynamoStemCells.MiniSwamerCooldown;
+ }
+ }
return true;
}
#endregion
@@ -4341,13 +4418,7 @@ namespace CalamityMod.CalPlayer
Player.blockExtraJumps = true;
Player.rocketBoots = 0;
- Player.jumpBoost = false;
- Player.slowFall = false;
- Player.gravControl = false;
- Player.gravControl2 = false;
- Player.jumpSpeedBoost = 0f;
Player.wingTimeMax = (int)(Player.wingTimeMax * 0.5);
- Player.balloon = -1;
}
#endregion
@@ -4673,7 +4744,7 @@ namespace CalamityMod.CalPlayer
return rogueStealth >= rogueStealthMax * consumptionMult;
}
- internal void ConsumeStealthByAttacking()
+ public void ConsumeStealthByAttacking()
{
stealthStrikeThisFrame = true;
stealthAcceleration = 1f; // Reset acceleration when you attack
@@ -4715,23 +4786,23 @@ namespace CalamityMod.CalPlayer
if (Player.whoAmI == Main.myPlayer && !endoCooper && randAmt > 0 && Main.rand.NextBool(randAmt) && chaseable)
{
int spearsFired = 0;
-
- for (int i = 0; i < Main.projectile.Length; i++)
+
+ foreach (Projectile p in Main.ActiveProjectiles)
{
if (spearsFired == 2)
break;
- if (Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].friendly)
+ if (p.owner == Player.whoAmI && p.friendly)
{
- bool attack = Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType();
+ bool attack = p.type == ModContent.ProjectileType();
if (attack)
{
int numSpears = profanedCrystalBuffs ? 12 : 6;
- int dam = (int)(Main.projectile[i].originalDamage * (profanedCrystalBuffs ? 1f : 0.25f));
+ int dam = (int)(p.originalDamage * (profanedCrystalBuffs ? 1f : 0.25f));
for (int x = 0; x < numSpears; x++)
{
float angle = MathHelper.TwoPi / numSpears * x;
- int proj = Projectile.NewProjectile(source, Main.projectile[i].Center, angle.ToRotationVector2().RotatedBy(Math.Atan(-45f)) * 8f, ModContent.ProjectileType(), dam, 0f, Player.whoAmI, pscState, 0f);
+ int proj = Projectile.NewProjectile(source, p.Center, angle.ToRotationVector2().RotatedBy(Math.Atan(-45f)) * 8f, ModContent.ProjectileType(), dam, 0f, Player.whoAmI, pscState, 0f);
Main.projectile[proj].originalDamage = dam;
}
spearsFired++;
@@ -4812,15 +4883,8 @@ namespace CalamityMod.CalPlayer
if (CalamityConfig.Instance.SpeedrunTimer)
CalamityMod.SpeedrunTimer.Restart();
- //
- // 04JAN2024: Ozzatron: Added a temporary message for the Gimme Swag plushie campaign.
- // This message should not exist indefinitely. It is being pushed as a silent public update just for itself.
- // As this message always displays and is not configurable, the previous rules about startup messages have been replaced with always-true.
- //
-
// Set a random delay between 12 and 20 seconds. When this delay hits zero, startup messages display
- bool plushieMessage = true;
- if (plushieMessage || (CalamityMod.Instance.musicMod is null && CalamityConfig.Instance.MusicModReminderMessage) || CalamityConfig.Instance.WikiStatusMessage)
+ if (CalamityConfig.Instance.WikiStatusMessage)
{
startMessageDisplayDelay = Main.rand.Next(CalamityUtils.SecondsToFrames(12), CalamityUtils.SecondsToFrames(20) + 1);
}
diff --git a/CalPlayer/CalamityPlayerDashEffects.cs b/CalPlayer/CalamityPlayerDashEffects.cs
index 0a5cce0e2e..279dff0a6d 100644
--- a/CalPlayer/CalamityPlayerDashEffects.cs
+++ b/CalPlayer/CalamityPlayerDashEffects.cs
@@ -1,10 +1,10 @@
-using CalamityMod.Balancing;
+using System;
+using CalamityMod.Balancing;
using CalamityMod.CalPlayer.Dashes;
using CalamityMod.EntitySources;
using CalamityMod.Enums;
using CalamityMod.Items.Mounts;
using Microsoft.Xna.Framework;
-using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -27,10 +27,10 @@ namespace CalamityMod.CalPlayer
set => dashID = value;
}
- public string DeferredDashID;
+ public string DeferredDashID;
public string LastUsedDashID;
-
+
public PlayerDashEffect UsedDash
{
get
@@ -72,15 +72,13 @@ namespace CalamityMod.CalPlayer
if (HasCustomDash && Player.dashDelay < 0)
{
Rectangle hitArea = new Rectangle((int)(Player.position.X + Player.velocity.X * 0.5 - 4f), (int)(Player.position.Y + Player.velocity.Y * 0.5 - 4), Player.width + 8, Player.height + 8);
- for (int i = 0; i < Main.maxNPCs; i++)
+ foreach (NPC n in Main.ActiveNPCs)
{
- NPC n = Main.npc[i];
-
// Ignore critters with the Guide to Critter Companionship
if (Player.dontHurtCritters && NPCID.Sets.CountsAsCritter[n.type])
continue;
- if (n.active && !n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0)
+ if (!n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0)
{
if (hitArea.Intersects(n.getRect()) && (n.noTileCollide || Player.CanHit(n)))
{
@@ -127,7 +125,9 @@ namespace CalamityMod.CalPlayer
dashDelayToApply = BalancingConstants.UniversalShieldSlamCooldown;
else if (UsedDash.CollisionType == DashCollisionType.ShieldBonk)
dashDelayToApply = BalancingConstants.UniversalShieldBonkCooldown;
-
+ if (DashID == "Deep Diver")
+ dashDelayToApply = 23;
+
float dashSpeed = 12f;
float dashSpeedDecelerationFactor = 0.985f;
float runSpeed = Math.Max(Player.accRunSpeed, Player.maxRunSpeed);
@@ -541,15 +541,13 @@ namespace CalamityMod.CalPlayer
public int DoMountDashDamage(Rectangle myRect, float Damage, float Knockback, int NPCImmuneTime, int PlayerImmuneTime)
{
int totalHurtNPCs = 0;
- for (int i = 0; i < Main.maxNPCs; i++)
+ foreach (NPC n in Main.ActiveNPCs)
{
- NPC n = Main.npc[i];
-
// Ignore critters with the Guide to Critter Companionship
if (Player.dontHurtCritters && NPCID.Sets.CountsAsCritter[n.type])
continue;
- if (n.active && !n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0)
+ if (!n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0)
{
Rectangle npcHitbox = n.getRect();
if (myRect.Intersects(npcHitbox) && (n.noTileCollide || Collision.CanHit(Player.position, Player.width, Player.height, n.position, n.width, n.height)))
@@ -564,8 +562,10 @@ namespace CalamityMod.CalPlayer
if (Player.whoAmI == Main.myPlayer)
Player.ApplyDamageToNPC(n, (int)Damage, Knockback, hitDirection, false);
+ // 17APR2024: Ozzatron: Dash iframes are not boosted by Cross Necklace at all and are fixed.
n.Calamity().dashImmunityTime[Player.whoAmI] = NPCImmuneTime;
- Player.GiveIFrames(PlayerImmuneTime, false);
+ Player.GiveUniversalIFrames(PlayerImmuneTime, false);
+
totalHurtNPCs++;
break;
}
diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs
index eaf39cd6f5..19d13db305 100644
--- a/CalPlayer/CalamityPlayerDrawEffects.cs
+++ b/CalPlayer/CalamityPlayerDrawEffects.cs
@@ -62,7 +62,7 @@ namespace CalamityMod.CalPlayer
Rectangle screenArea = new Rectangle((int)Main.screenPosition.X - 500, (int)Main.screenPosition.Y - 50, Main.screenWidth + 1000, Main.screenHeight + 100);
int dustDrawn = 0;
float maxShroomDust = Main.maxDustToDraw / 2;
- Color shroomColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, 0);
+ Color shroomColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Main.DiscoR);
for (int i = 0; i < Main.maxDustToDraw; i++)
{
Dust dust = Main.dust[i];
@@ -104,6 +104,10 @@ namespace CalamityMod.CalPlayer
}
}
}
+ else // This is such a stupid way to reset this but you can't just put it in ResetEffects
+ {
+ calamityPlayer.trippyLevel = 1;
+ }
// TODO -- rogue stealth visuals are an utter catastrophe and should be fully destroyed on next stealth rework
if (calamityPlayer.rogueStealth > 0f && calamityPlayer.rogueStealthMax > 0f && Player.townNPCs < 3f && CalamityConfig.Instance.StealthInvisibility)
@@ -127,7 +131,7 @@ namespace CalamityMod.CalPlayer
{
if (Main.rand.NextBool())
{
- int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 229, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
+ int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Vortex, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0.5f;
drawInfo.DustCache.Add(dust);
@@ -142,7 +146,7 @@ namespace CalamityMod.CalPlayer
{
if (Main.rand.NextBool())
{
- int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 246, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
+ int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.GoldCoin, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0.5f;
drawInfo.DustCache.Add(dust);
@@ -162,7 +166,7 @@ namespace CalamityMod.CalPlayer
{
if (Main.rand.NextBool())
{
- int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 27, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.5f);
+ int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Shadowflame, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.5f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0.5f;
drawInfo.DustCache.Add(dust);
@@ -176,25 +180,14 @@ namespace CalamityMod.CalPlayer
{
if (Player != null && !Player.dead)
{
- Lighting.AddLight((int)Player.Center.X / 16, (int)Player.Center.Y / 16, 31 / 235f, 170 / 235f, 222 / 235f);
- if (!Player.mount.Active)
- {
- if (Main.rand.NextBool(14))
- {
- int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 8, Player.height + 8, 206, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.5f);
- Main.dust[dust].noGravity = true;
- Main.dust[dust].velocity *= 1f;
- drawInfo.DustCache.Add(dust);
- }
- }
+ Lighting.AddLight(Player.Center, Color.Lerp(Color.Cyan, Color.White, 0.7f).ToVector3());
if (!Player.StandingStill() && !Player.mount.Active)
{
- if (Main.rand.NextBool(8))
+ if (Main.rand.NextBool())
{
- int de_dust2 = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, Main.rand.NextBool() ? 204 : 213, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.5f);
- Main.dust[de_dust2].noGravity = true;
- Main.dust[de_dust2].velocity *= 0.5f;
- drawInfo.DustCache.Add(de_dust2);
+ Vector2 velocity = -Player.velocity.SafeNormalize(Vector2.UnitY) * Main.rand.NextFloat(1, 3);
+ Particle nanoDust = new NanoParticle(drawInfo.Position + new Vector2(Main.rand.Next(Player.width + 1), Main.rand.Next(Player.height + 1)), velocity, (Main.rand.NextBool(3) ? Color.RoyalBlue : Color.Cyan) * 0.9f, Main.rand.NextFloat(0.2f, 0.7f), 9, false, true);
+ GeneralParticleHandler.SpawnParticle(nanoDust);
}
}
}
@@ -291,6 +284,9 @@ namespace CalamityMod.CalPlayer
if (calamityPlayer.vaporfied && drawInfo.shadow == 0f)
Vaporfied.DrawEffects(drawInfo);
+
+ if (calamityPlayer.vHex && drawInfo.shadow == 0f)
+ VulnerabilityHex.DrawEffects(drawInfo);
#endregion
if (calamityPlayer.PinkJellyRegen && drawInfo.shadow == 0f)
@@ -334,6 +330,24 @@ namespace CalamityMod.CalPlayer
}
}
+ // Prideful Hunter's Planar Ripper movement speed boost
+ if (calamityPlayer.planarSpeedBoost > 0 && drawInfo.shadow == 0f)
+ {
+ int spawnChance = (int)(13 - (calamityPlayer.planarSpeedBoost / 2));
+ if (Main.rand.NextBool(spawnChance))
+ {
+ Vector2 sparkVelocity = -(Vector2.UnitY * Main.rand.NextFloat(2.5f, 5f)).RotatedByRandom(MathHelper.Pi / 10);
+ Vector2 sparkPos = new Vector2(Player.position.X + Main.rand.NextFloat(-8f, 40f), Player.position.Y + Main.rand.NextFloat(-8f, 56f));
+ Particle movementSpark = new AltLineParticle(sparkPos, sparkVelocity, false, 20, Main.rand.NextFloat(0.375f, 0.5f), new Color(130, 255, 255));
+ GeneralParticleHandler.SpawnParticle(movementSpark);
+
+ sparkVelocity = -(Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f)).RotatedByRandom(MathHelper.Pi / 6);
+ sparkPos = new Vector2(Player.position.X + Main.rand.NextFloat(-8f, 40f), Player.position.Y + Main.rand.NextFloat(-8f, 56f));
+ Particle addSparks = new CustomPulse(sparkPos, sparkVelocity, new Color(180, 255, 255), "CalamityMod/Particles/ElectricSpark", Vector2.One, 0f, 0.5f, 0.65f, 20);
+ GeneralParticleHandler.SpawnParticle(addSparks);
+ }
+ }
+
// Some extraneous and probably undocumented visual effect caused by the heart lad pet thing
if ((calamityPlayer.ladHearts > 0) && !Player.loveStruck && Main.netMode != NetmodeID.Server && drawInfo.shadow == 0f)
{
@@ -427,7 +441,7 @@ namespace CalamityMod.CalPlayer
ModContent.ItemType(),
ModContent.ItemType(),
ModContent.ItemType(),
- ModContent.ItemType(),
+ ModContent.ItemType(),
ModContent.ItemType(),
ModContent.ItemType(),
ModContent.ItemType(),
@@ -443,10 +457,10 @@ namespace CalamityMod.CalPlayer
ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_HalleysInferno").Value,
ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_CleansingBlaze").Value,
ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_ElementalEruption").Value,
- ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_TheEmpyrean").Value,
+ ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_DeadSunsWind").Value,
ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_Meowthrower").Value,
ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_OverloadedBlaster").Value,
- ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_TerraFlameburster").Value,
+ ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_WildfireBloom").Value,
ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_Photoviscerator").Value,
ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_Shadethrower").Value,
ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_BloodBoiler").Value,
@@ -475,8 +489,14 @@ namespace CalamityMod.CalPlayer
SpriteEffects spriteEffects = Player.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
+ int xOffset = 9;
+ // Photoviscerator's tank is extended a bit more out
+ if (thingToDraw == ModContent.Request("CalamityMod/CalPlayer/DrawLayers/Backpack_Photoviscerator").Value)
+ {
+ xOffset = 16;
+ }
DrawData howDoIDrawThings = new DrawData(thingToDraw,
- new Vector2((int)(drawPlayer.position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (9 * drawPlayer.direction)) - 4f * drawPlayer.direction, (int)(drawPlayer.position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) + 2f * drawPlayer.gravDir - 8f * drawPlayer.gravDir)),
+ new Vector2((int)(drawPlayer.position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (xOffset * drawPlayer.direction)) - 4f * drawPlayer.direction, (int)(drawPlayer.position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) + 2f * drawPlayer.gravDir - 8f * drawPlayer.gravDir + drawPlayer.gfxOffY)),
new Rectangle(0, 0, thingToDraw.Width, thingToDraw.Height),
drawInfo.colorArmorBody,
drawPlayer.bodyRotation,
diff --git a/CalPlayer/CalamityPlayerFishing.cs b/CalPlayer/CalamityPlayerFishing.cs
index 142c8ddd3f..b43276306b 100644
--- a/CalPlayer/CalamityPlayerFishing.cs
+++ b/CalPlayer/CalamityPlayerFishing.cs
@@ -1,5 +1,7 @@
-using CalamityMod.Items.Accessories;
+using System.Collections.Generic;
+using System.Linq;
using CalamityMod.Events;
+using CalamityMod.Items.Accessories;
using CalamityMod.Items.Fishing;
using CalamityMod.Items.Fishing.AstralCatches;
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
@@ -15,8 +17,6 @@ using CalamityMod.NPCs;
using CalamityMod.NPCs.OldDuke;
using CalamityMod.World;
using Microsoft.Xna.Framework;
-using System.Collections.Generic;
-using System.Linq;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -38,11 +38,11 @@ namespace CalamityMod.CalPlayer
bool lava = attempt.inLava;
bool honey = attempt.inHoney;
- // If vanilla catches an enemy, just cancel
- if (npcSpawn > 0)
- return;
+ // If vanilla catches an enemy, just cancel
+ if (npcSpawn > 0)
+ return;
- // Set up for allowing fishing in the Sulphurous Sea
+ // Set up for allowing fishing in the Sulphurous Sea
Point point = Player.Center.ToTileCoordinates();
bool canSulphurFish = false;
if (Abyss.AtLeftSideOfWorld)
@@ -64,13 +64,13 @@ namespace CalamityMod.CalPlayer
CalamityGlobalNPC.OldDukeSpawn(Player.whoAmI, ModContent.NPCType(), bait);
}
- // Don't do anything if you can't fish in lava
- if (!attempt.CanFishInLava && lava)
- return;
+ // Don't do anything if you can't fish in lava
+ if (!attempt.CanFishInLava && lava)
+ return;
- // If you caught junk, then ignore all Calamity catches
- if (itemDrop == ItemID.OldShoe || itemDrop == ItemID.FishingSeaweed || itemDrop == ItemID.TinCan)
- return;
+ // If you caught junk, then ignore all Calamity catches
+ if (itemDrop == ItemID.OldShoe || itemDrop == ItemID.FishingSeaweed || itemDrop == ItemID.TinCan)
+ return;
// Handle our modded Quest Fish, You can catch these in any liquid... because I don't care if you can
if (ZoneSunkenSea && questFish == ModContent.ItemType() && attempt.uncommon)
@@ -99,7 +99,7 @@ namespace CalamityMod.CalPlayer
return;
}
- // Handle Alluring Bait's increased chance for Potion Material fish
+ // Handle Alluring Bait's increased chance for Potion Material fish
if (alluringBait)
{
int chanceForPotionFish = 1000 / power;
@@ -154,7 +154,7 @@ namespace CalamityMod.CalPlayer
}
}
- // Handle the increased chance of crates from Enchanted Pearl and the Supreme Fishing Station
+ // Handle the increased chance of crates from Enchanted Pearl and the Supreme Fishing Station
if (enchantedPearl || fishingStation)
{
int chanceForCrates = (enchantedPearl ? 10 : 0) +
@@ -191,8 +191,8 @@ namespace CalamityMod.CalPlayer
{
if (ZoneCalamity)
itemDrop = Main.hardMode ? ModContent.ItemType() : ModContent.ItemType();
- else
- itemDrop = Main.hardMode ? ItemID.LavaCrateHard : ItemID.LavaCrate;
+ else
+ itemDrop = Main.hardMode ? ItemID.LavaCrateHard : ItemID.LavaCrate;
}
if ((Main.rand.NextBool(chanceForRareItems) && enchantedPearl && fishingStation && Player.cratePotion) && ZoneCalamity)
{
@@ -309,59 +309,59 @@ namespace CalamityMod.CalPlayer
if (water)
{
- // Handle Calamity's crates, veryrare and legendary means it's a Golden Crate
- if (attempt.crate)
- {
- if (attempt.rare && !attempt.veryrare && !attempt.legendary)
- {
- if (ZoneAstral)
- {
- itemDrop = Main.hardMode ? ModContent.ItemType() : ModContent.ItemType();
- }
- if (ZoneSunkenSea)
- {
- itemDrop = Main.hardMode ? ModContent.ItemType() : ModContent.ItemType();
- }
- if (canSulphurFish)
- {
- itemDrop = Main.hardMode ? ModContent.ItemType() : ModContent.ItemType();
- }
- }
- return;
- }
+ // Handle Calamity's crates, veryrare and legendary means it's a Golden Crate
+ if (attempt.crate)
+ {
+ if (attempt.rare && !attempt.veryrare && !attempt.legendary)
+ {
+ if (ZoneAstral)
+ {
+ itemDrop = Main.hardMode ? ModContent.ItemType() : ModContent.ItemType();
+ }
+ if (ZoneSunkenSea)
+ {
+ itemDrop = Main.hardMode ? ModContent.ItemType() : ModContent.ItemType();
+ }
+ if (canSulphurFish)
+ {
+ itemDrop = Main.hardMode ? ModContent.ItemType() : ModContent.ItemType();
+ }
+ }
+ return;
+ }
- // Don't override the vanilla crates or any special vanilla fishing loot
- List keepCatchList = new List()
- {
- ItemID.WoodenCrate,
- ItemID.WoodenCrateHard,
- ItemID.IronCrate,
- ItemID.IronCrateHard,
- ItemID.GoldenCrate,
- ItemID.GoldenCrateHard,
- ItemID.FrogLeg,
- ItemID.BalloonPufferfish,
- ItemID.ZephyrFish,
- ItemID.CombatBook,
- ItemID.CorruptFishingCrate,
- ItemID.CorruptFishingCrateHard,
- ItemID.CrimsonFishingCrate,
- ItemID.CrimsonFishingCrateHard,
- ItemID.HallowedFishingCrate,
- ItemID.HallowedFishingCrateHard,
- ItemID.DungeonFishingCrate,
- ItemID.DungeonFishingCrateHard,
- ItemID.JungleFishingCrate,
- ItemID.JungleFishingCrateHard,
- ItemID.FloatingIslandFishingCrate,
- ItemID.FloatingIslandFishingCrateHard,
- ItemID.FrozenCrate,
- ItemID.FrozenCrateHard,
- ItemID.OasisCrate,
- ItemID.OasisCrateHard,
- ItemID.OceanCrate,
- ItemID.OceanCrateHard
- };
+ // Don't override the vanilla crates or any special vanilla fishing loot
+ List keepCatchList = new List()
+ {
+ ItemID.WoodenCrate,
+ ItemID.WoodenCrateHard,
+ ItemID.IronCrate,
+ ItemID.IronCrateHard,
+ ItemID.GoldenCrate,
+ ItemID.GoldenCrateHard,
+ ItemID.FrogLeg,
+ ItemID.BalloonPufferfish,
+ ItemID.ZephyrFish,
+ ItemID.CombatBook,
+ ItemID.CorruptFishingCrate,
+ ItemID.CorruptFishingCrateHard,
+ ItemID.CrimsonFishingCrate,
+ ItemID.CrimsonFishingCrateHard,
+ ItemID.HallowedFishingCrate,
+ ItemID.HallowedFishingCrateHard,
+ ItemID.DungeonFishingCrate,
+ ItemID.DungeonFishingCrateHard,
+ ItemID.JungleFishingCrate,
+ ItemID.JungleFishingCrateHard,
+ ItemID.FloatingIslandFishingCrate,
+ ItemID.FloatingIslandFishingCrateHard,
+ ItemID.FrozenCrate,
+ ItemID.FrozenCrateHard,
+ ItemID.OasisCrate,
+ ItemID.OasisCrateHard,
+ ItemID.OceanCrate,
+ ItemID.OceanCrateHard
+ };
if (keepCatchList.Contains(itemDrop))
{
return;
@@ -391,10 +391,10 @@ namespace CalamityMod.CalPlayer
}
}
- // Increased chance of Enchanted Starfish if you don't have maximum mana
+ // Increased chance of Enchanted Starfish if you don't have maximum mana
if (Player.ZoneOverworldHeight && !Main.dayTime)
{
- int chance = Player.statManaMax < 200 ? 5 : 20;
+ int chance = Player.statManaMax < 200 ? 5 : 20;
if (attempt.uncommon && Main.rand.NextBool(chance))
{
itemDrop = ModContent.ItemType();
@@ -433,17 +433,17 @@ namespace CalamityMod.CalPlayer
}
}
- // Lower chance of Spadefish in Hardmode
+ // Lower chance of Spadefish in Hardmode
if (Player.ZoneDirtLayerHeight)
{
- int chance = Main.hardMode ? 10 : 2;
+ int chance = Main.hardMode ? 10 : 2;
if (attempt.veryrare && Main.rand.NextBool(chance))
{
itemDrop = ModContent.ItemType();
}
}
- if (Player.FindBuffIndex(BuffID.Gills) > -1 && DownedBossSystem.downedCalamitasClone && (attempt.legendary || (attempt.veryrare && Main.rand.NextBool())))
+ if (Player.FindBuffIndex(BuffID.Gills) > -1 && DownedBossSystem.downedLeviathan && (attempt.legendary || (attempt.veryrare && Main.rand.NextBool())))
{
itemDrop = ModContent.ItemType();
}
@@ -458,27 +458,27 @@ namespace CalamityMod.CalPlayer
if (ZoneAstral) // Astral Infection, fishing in water
{
- if (attempt.legendary)
+ if (attempt.legendary)
{
- int legendaryCatch = Utils.SelectRandom(Main.rand, new int[]
- {
- ModContent.ItemType(),
- ModContent.ItemType(),
- ModContent.ItemType()
- });
+ int legendaryCatch = Utils.SelectRandom(Main.rand, new int[]
+ {
+ ModContent.ItemType(),
+ ModContent.ItemType(),
+ ModContent.ItemType()
+ });
itemDrop = legendaryCatch;
}
- else if (attempt.uncommon || attempt.rare || attempt.veryrare)
+ else if (attempt.uncommon || attempt.rare || attempt.veryrare)
{
- int uncommonCatch = Utils.SelectRandom(Main.rand, new int[]
- {
- ModContent.ItemType(),
- ModContent.ItemType(),
- ModContent.ItemType()
- });
+ int uncommonCatch = Utils.SelectRandom(Main.rand, new int[]
+ {
+ ModContent.ItemType(),
+ ModContent.ItemType(),
+ ModContent.ItemType()
+ });
itemDrop = uncommonCatch;
}
- else
+ else
{
itemDrop = ModContent.ItemType();
return;
@@ -487,32 +487,32 @@ namespace CalamityMod.CalPlayer
if (ZoneSunkenSea) // Sunken Sea, fishing in water
{
- if (attempt.legendary)
+ if (attempt.legendary)
{
- List legendaryCatches = new List()
- {
- ModContent.ItemType()
- };
+ List legendaryCatches = new List()
+ {
+ ModContent.ItemType()
+ };
legendaryCatches.AddWithCondition(ModContent.ItemType(), DownedBossSystem.downedDesertScourge);
legendaryCatches.AddWithCondition(ModContent.ItemType(), Main.hardMode);
- itemDrop = legendaryCatches[Main.rand.Next(legendaryCatches.Count)];
+ itemDrop = legendaryCatches[Main.rand.Next(legendaryCatches.Count)];
}
else if (attempt.veryrare)
{
itemDrop = ModContent.ItemType();
}
- else if (attempt.uncommon || attempt.rare)
+ else if (attempt.uncommon || attempt.rare)
{
itemDrop = ModContent.ItemType();
}
- else
+ else
{
itemDrop = ModContent.ItemType();
return;
}
}
- // There is no complete fishing pool here, so most of it is vanilla default
+ // There is no complete fishing pool here, so most of it is vanilla default
if (canSulphurFish) // Sulphurous Sea, fishing in water
{
if (attempt.legendary || (attempt.veryrare && Main.rand.NextBool()))
@@ -554,38 +554,38 @@ namespace CalamityMod.CalPlayer
{
if (ZoneCalamity) // Brimstone Crags, fishing in lava
{
- if (attempt.crate)
+ if (attempt.crate)
{
- itemDrop = Main.hardMode? ModContent.ItemType() : ModContent.ItemType();
+ itemDrop = Main.hardMode ? ModContent.ItemType() : ModContent.ItemType();
}
- else if (attempt.legendary)
+ else if (attempt.legendary)
{
- itemDrop = ModContent.ItemType();
- }
- // Increased chance of Dragoon Drizzlefish in Prehardmode
- else if (attempt.veryrare && !Main.hardMode)
- {
itemDrop = ModContent.ItemType();
- }
+ }
+ // Increased chance of Dragoon Drizzlefish in Prehardmode
+ else if (attempt.veryrare && !Main.hardMode)
+ {
+ itemDrop = ModContent.ItemType();
+ }
else if (attempt.veryrare)
{
itemDrop = ModContent.ItemType();
}
- else if ((attempt.rare || attempt.veryrare) && DownedBossSystem.downedProvidence && Main.rand.Next(3) >= 2)
- {
- itemDrop = ModContent.ItemType();
- }
- else if (attempt.uncommon || attempt.rare)
+ else if ((attempt.rare || attempt.veryrare) && DownedBossSystem.downedProvidence && Main.rand.Next(3) >= 2)
{
- List