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/AstralDesertSurfaceBGStyle.cs b/Backgrounds/AstralDesertSurfaceBGStyle.cs
index 51d1c01ef7..181f0d7222 100644
--- a/Backgrounds/AstralDesertSurfaceBGStyle.cs
+++ b/Backgrounds/AstralDesertSurfaceBGStyle.cs
@@ -1,22 +1,23 @@
-using Terraria.ModLoader;
+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
{
- public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
-
- public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
-
- public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
- {
- b -= 75f;
- 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 CloseBGYOffset = 475;
+ 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)
@@ -33,5 +34,90 @@ namespace CalamityMod.Backgrounds
}
}
}
+
+ 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/AstralDesertSurfaceFar.png b/Backgrounds/AstralDesertSurfaceFar.png
index a2337a7d8f..e8b7a01e29 100644
Binary files a/Backgrounds/AstralDesertSurfaceFar.png and b/Backgrounds/AstralDesertSurfaceFar.png differ
diff --git a/Backgrounds/AstralSnowSurfaceBGStyle.cs b/Backgrounds/AstralSnowSurfaceBGStyle.cs
index 993decd710..239fc427b3 100644
--- a/Backgrounds/AstralSnowSurfaceBGStyle.cs
+++ b/Backgrounds/AstralSnowSurfaceBGStyle.cs
@@ -1,18 +1,25 @@
-using Terraria.ModLoader;
+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
{
- public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
-
- public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
-
- public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => 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;
+ 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)
@@ -29,5 +36,113 @@ namespace CalamityMod.Backgrounds
}
}
}
+
+ 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/AstralSnowSurfaceFar.png b/Backgrounds/AstralSnowSurfaceFar.png
deleted file mode 100644
index e1b3614aa8..0000000000
Binary files a/Backgrounds/AstralSnowSurfaceFar.png and /dev/null differ
diff --git a/Backgrounds/AstralSnowSurfaceMiddle.png b/Backgrounds/AstralSnowSurfaceMiddle.png
index fc7c678756..ff4e5fc236 100644
Binary files a/Backgrounds/AstralSnowSurfaceMiddle.png and b/Backgrounds/AstralSnowSurfaceMiddle.png differ
diff --git a/Backgrounds/AstralSurfaceBGStyle.cs b/Backgrounds/AstralSurfaceBGStyle.cs
index 8c8a7ee21c..c89092d701 100644
--- a/Backgrounds/AstralSurfaceBGStyle.cs
+++ b/Backgrounds/AstralSurfaceBGStyle.cs
@@ -1,22 +1,24 @@
-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
{
public class AstralSurfaceBGStyle : ModSurfaceBackgroundStyle
{
- public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
-
- public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
-
- public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
- {
- scale *= 0.75f;
- 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)
@@ -33,5 +35,120 @@ namespace CalamityMod.Backgrounds
}
}
}
+
+ 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:)
+ }
}
}
diff --git a/Backgrounds/AstralSurfaceClose.png b/Backgrounds/AstralSurfaceClose.png
index 6701b9a71c..166e8bc48d 100644
Binary files a/Backgrounds/AstralSurfaceClose.png and b/Backgrounds/AstralSurfaceClose.png differ
diff --git a/Skies/AstralSurfaceCloseGlow.png b/Backgrounds/AstralSurfaceCloseGlow.png
similarity index 100%
rename from Skies/AstralSurfaceCloseGlow.png
rename to Backgrounds/AstralSurfaceCloseGlow.png
diff --git a/Backgrounds/AstralSurfaceFar.png b/Backgrounds/AstralSurfaceFar.png
index 9285cefdae..6e90155b16 100644
Binary files a/Backgrounds/AstralSurfaceFar.png and b/Backgrounds/AstralSurfaceFar.png differ
diff --git a/Backgrounds/AstralSurfaceFogBGStyle.cs b/Backgrounds/AstralSurfaceFogBGStyle.cs
deleted file mode 100644
index aab1ea3fba..0000000000
--- a/Backgrounds/AstralSurfaceFogBGStyle.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using Terraria.ModLoader;
-
-namespace CalamityMod.Backgrounds
-{
- public class AstralSurfaceFogBGStyle : ModSurfaceBackgroundStyle
- {
- public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
-
- public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
-
- public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
- {
- scale *= 0.75f;
- return BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
- }
-
- 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)
- {
- fades[i] += transitionSpeed;
- if (fades[i] > 1f)
- fades[i] = 1f;
- }
- else
- {
- fades[i] -= transitionSpeed;
- if (fades[i] < 0f)
- fades[i] = 0f;
- }
- }
- }
- }
-}
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/Skies/AstralSurfaceFrontGlow.png b/Backgrounds/AstralSurfaceFrontGlow.png
similarity index 100%
rename from Skies/AstralSurfaceFrontGlow.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/AstralSurfaceMiddle.png b/Backgrounds/AstralSurfaceMiddle.png
index 89b568c3be..d3f984c001 100644
Binary files a/Backgrounds/AstralSurfaceMiddle.png and b/Backgrounds/AstralSurfaceMiddle.png differ
diff --git a/Skies/AstralSurfaceMiddleGlow.png b/Backgrounds/AstralSurfaceMiddleGlow.png
similarity index 100%
rename from Skies/AstralSurfaceMiddleGlow.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 7079491989..8911537bb3 100644
--- a/Backgrounds/SunkenSeaBGStyle.cs
+++ b/Backgrounds/SunkenSeaBGStyle.cs
@@ -10,4 +10,4 @@ namespace CalamityMod.Backgrounds
textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG" + i.ToString());
}
}
-}
\ No newline at end of file
+}
diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs
index 338820b1f8..3daca26a39 100644
--- a/Balancing/BalancingChangesManager.cs
+++ b/Balancing/BalancingChangesManager.cs
@@ -1,27 +1,28 @@
-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;
using CalamityMod.NPCs.ExoMechs.Artemis;
using CalamityMod.NPCs.OldDuke;
+using CalamityMod.NPCs.ProfanedGuardians;
using CalamityMod.NPCs.Providence;
using CalamityMod.NPCs.Ravager;
using CalamityMod.NPCs.SupremeCalamitas;
+using CalamityMod.NPCs.Yharon;
+using CalamityMod.Projectiles.DraedonsArsenal;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
+using CalamityMod.Projectiles.Summon.MirrorofKalandraMinions;
using CalamityMod.Projectiles.Typeless;
-using CalamityMod.Projectiles.DraedonsArsenal;
-using System.Collections.Generic;
-using System.Linq;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
-using CalamityMod.NPCs.ProfanedGuardians;
-using CalamityMod.NPCs.Yharon;
namespace CalamityMod.Balancing
{
@@ -61,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)),
@@ -75,6 +80,7 @@ namespace CalamityMod.Balancing
// Nerf Spectre Mask set bonus projectiles by 30%.
Do(new ProjectileSpecificRequirementBalancingRule(0.7f, SpectreMaskSetBonusFilter)),
+
};
NPCSpecificBalancingChanges = new List();
@@ -93,7 +99,7 @@ namespace CalamityMod.Balancing
// 50% resist to true melee.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(ResistTrueMelee(0.5f))));
- // 50% resist to Demon Scythes.
+ // 50% resist to Demon Scythe.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
#endregion
@@ -101,14 +107,11 @@ namespace CalamityMod.Balancing
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(ResistTrueMelee(0.5f))));
- // 50% resist to Demon Scythes.
+ // 50% resist to Demon Scythe.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
// 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
@@ -116,98 +119,164 @@ namespace CalamityMod.Balancing
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.PerforatorIDs, Do(ResistTrueMelee(0.5f))));
#endregion
+ #region Wall of Flesh
+ // 40% resist to Corro/Crimslime Staff.
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.WallofFleshEye, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType(), ProjectileType()))));
+ #endregion
+
#region Aquatic Scourge
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(ResistTrueMelee(0.5f))));
- // 50% resist to Dormant Brimseekers.
+ // 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!
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
+
+ // 50% resist to Dormant Brimseeker.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
+ // 50% resist to Mounted Scanner.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
+
// 40% resist to Cryophobia.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType()))));
+ // 40% resist to SHPC.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType()))));
+
// 30% resist to Meowthrower.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType()))));
+
+ // 25% resist to Snowstorm Staff.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType(), ProjectileType()))));
#endregion
#region The Destroyer
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(ResistTrueMelee(0.5f))));
- // 50% resist to Dormant Brimseekers.
+ // 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()))));
- // 40% resist to Cryophobia.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType()))));
+ // 45% resist to Mounted Scanner.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType()))));
// 40% resist to Meowthrower.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType()))));
- // 15% resist to Mineral Mortar's Projectile.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType()))));
+ // 25% resist to SHPC.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType()))));
- // 15% resist to Snowstorm Staff.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType()))));
+ // 25% resist to Snowstorm Staff.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType(), 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
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(ResistTrueMelee(0.5f))));
- // 40% resist to Flying Dragon.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileID.DD2SquireSonicBoom))));
+ // 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()))));
+ // 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
#region Empress of Light
+ // 25% resist to Abyss Blade's blade.
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.HallowBoss, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType()))));
+
// 20% resist to Plague Tainted SMG's drones.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.HallowBoss, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType()))));
#endregion
#region Lunatic Cultist
- // 25% resist to Resurrection Butterfly.
- NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.CultistBoss, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType(), ProjectileType()))));
+ // 50% resist to Aegis Blade's explosions.
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.CultistBoss, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
+
+ // 35% resist to Subduction Slicer's flame pillars.
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.CultistBoss, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType()))));
// 20% resist to Art Attack.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.CultistBoss, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType()))));
// 20% resist to Nightglow.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.CultistBoss, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FairyQueenMagicItemShot))));
+
+ // 20% resist to Resurrection Butterfly.
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.CultistBoss, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType()))));
#endregion
#region Astrum Deus
// 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 Aurora Blazer.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.3f, ProjectileType()))));
+ // 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))));
- // 25% resist to Resurrection Butterfly.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType(), 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
- // 90% resist to Mercurial Tides (True Biome Blade).
- NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.1f, ProjectileType(), ProjectileType(), ProjectileType()))));
+ // 20% resist to Mercurial Tides (True Biome Blade).
+ NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType(), ProjectileType()))));
- // 15% resist to Pestilent Defiler.
- NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.85f, 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
@@ -218,52 +287,54 @@ 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
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(ResistTrueMelee(0.5f))));
- // 50% resist to Dazzling Stabbers.
+ // 50% resist to Dazzling Stabber Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
- // 50% resist to Elemental Axes.
+ // 50% resist to Elemental Axe.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
// 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 Last Mourning.
- // 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
#region The Devourer of Gods
+ // 80% resist to Wave Pounder.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.2f, ProjectileType()))));
+
// 50% resist to Eidolic Wail.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
- // 40% resist to Wave Pounder.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType()))));
-
// 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()))));
@@ -295,17 +366,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 Enforcer projectiles.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType()))));
-
- // 15% resist to Murasama.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType()))));
#endregion
#region Exo Mechs: Artemis and Apollo
@@ -313,7 +381,7 @@ namespace CalamityMod.Balancing
// TODO -- NPC sets (mostly worm bosses) should probably be their own holding class.
int[] exoTwins = new int[] { NPCType(), NPCType() };
- // 10% resist to Eclipse's Fall stealth strike.
+ // 10% resist to Eclipse's Fall's mini spears.
NPCSpecificBalancingChanges.AddRange(Bundle(exoTwins, Do(new ProjectileResistBalancingRule(0.9f, ProjectileType()))));
#endregion
@@ -321,10 +389,13 @@ namespace CalamityMod.Balancing
// 65% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(ResistTrueMelee(0.35f))));
- // 65% resist to Enforcer projectiles.
+ // 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()))));
- // 65% resist to Final Dawn lunge.
+ // 65% resist to The Final Dawn's lunge.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType()))));
// 60% resist to Dynamic Pursuer.
@@ -333,37 +404,37 @@ namespace CalamityMod.Balancing
// 50% resist to Chicken Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType()))));
- // 50% resist to Tarragon Throwing Darts Thorns. (LOL)
+ // 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 Vehemence skulls.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType(), 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()))));
// 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 Prismatic Breaker's laser beam.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType()))));
- // 35% resist to Anomaly's Nanogun bomb explosions.
- NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType()))));
-
- // 30% resist to Eclipse Fall.
+ // 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 Dragon Scales and The Wand's tornadoes
+ // 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()))));
// 25% resist to the Spin Throw part of the Ark of the Cosmos' combo.
@@ -375,25 +446,34 @@ namespace CalamityMod.Balancing
// 25% resist to Gael's Greatsword's big skulls.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, BigGaelsSkullFilter))));
+ // 25% resist to Mirror of Kalandra's Paradoxica minion.
+ NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType()))));
+
// 25% resist to Zenith.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.FinalFractal))));
- // 20% resist to Blood Boiler fire.
+ // 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()))));
+ // 20% resist to Plasma Grenade and Dynamic Pursuer's explosions.
+ 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()))));
- // 15% resist to Final Dawn AoE sweep flames.
+ // 15% resist to The Final Dawn's AoE sweep flames.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType()))));
- // 15% resist to Godslayer Slugs.
+ // 15% resist to God Slayer Slugs.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType()))));
// 15% resist to Gruesome Eminence.
@@ -407,6 +487,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
@@ -418,6 +501,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)));
@@ -429,7 +515,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..dc64bb8899 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;
@@ -15,13 +16,21 @@
// Altered jump speed boost provided by Shiny Red Balloon via IL edit
// This is a const because it replaces a hardcoded value in vanilla
internal const float BalloonJumpSpeedBoost = 0.75f;
+ #endregion
- // Altered default damage deviation
- internal const int NewDefaultDamageVariationPercent = 5;
+ #region Immunity Frames
+ // Default immunity frame rules
+ internal const int VanillaDefaultIFrames = 40;
+ internal const int VanillaParryIFrames = 60;
+ internal const int VanillaDodgeIFrames = 80;
- // Sharpening Station grants this much armor penetration to melee weapons.
- internal const float SharpeningStationArmorPenetration = 5f;
+ // 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 +45,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 +83,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 +159,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 +194,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 aea59f5567..0000000000
--- a/BiomeManagers/AbovegroundAstralBiome.cs
+++ /dev/null
@@ -1,34 +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 ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find("CalamityMod/AstralSurfaceFogBGStyle");
- 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 d68e9ed700..0000000000
--- a/BiomeManagers/AbovegroundAstralBiomeSurface.cs
+++ /dev/null
@@ -1,41 +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;
- }
-
- public override void SpecialVisuals(Player player, bool isActive)
- {
- if (SkyManager.Instance["CalamityMod:AstralSurface"] != null && isActive != SkyManager.Instance["CalamityMod:AstralSurface"].IsActive())
- {
- if (isActive)
- {
- SkyManager.Instance.Activate("CalamityMod:AstralSurface");
- }
- else
- {
- SkyManager.Instance.Deactivate("CalamityMod:AstralSurface");
- }
- }
- }
-
- }
-}
diff --git a/BiomeManagers/AbovegroundAstralDesertBiome.cs b/BiomeManagers/AbovegroundAstralDesertBiome.cs
deleted file mode 100644
index a4941079c7..0000000000
--- a/BiomeManagers/AbovegroundAstralDesertBiome.cs
+++ /dev/null
@@ -1,42 +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/AstralDesertSurfaceBGStyle");
- 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;
- }
-
- public override void SpecialVisuals(Player player, bool isActive)
- {
- if (SkyManager.Instance["CalamityMod:AstralDesert"] != null && isActive != SkyManager.Instance["CalamityMod:AstralDesert"].IsActive())
- {
- if (isActive)
- {
- SkyManager.Instance.Activate("CalamityMod:AstralDesert");
- }
- else
- {
- SkyManager.Instance.Deactivate("CalamityMod:AstralDesert");
- }
- }
- }
- }
-}
diff --git a/BiomeManagers/AbovegroundAstralSnowBiome.cs b/BiomeManagers/AbovegroundAstralSnowBiome.cs
deleted file mode 100644
index 029513ce91..0000000000
--- a/BiomeManagers/AbovegroundAstralSnowBiome.cs
+++ /dev/null
@@ -1,41 +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/AstralSnowSurfaceBGStyle");
- 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;
- }
-
- public override void SpecialVisuals(Player player, bool isActive)
- {
- if (SkyManager.Instance["CalamityMod:AstralSnow"] != null && isActive != SkyManager.Instance["CalamityMod:AstralSnow"].IsActive())
- {
- if (isActive)
- {
- SkyManager.Instance.Activate("CalamityMod:AstralSnow");
- }
- else
- {
- SkyManager.Instance.Deactivate("CalamityMod:AstralSnow");
- }
- }
- }
-
- }
-}
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..264845baae
--- /dev/null
+++ b/BiomeManagers/AstralInfectionBiome.cs
@@ -0,0 +1,94 @@
+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 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 => 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 1d3078e3dd..394241a43b 100644
--- a/BiomeManagers/SunkenSeaBiome.cs
+++ b/BiomeManagers/SunkenSeaBiome.cs
@@ -14,7 +14,7 @@ namespace CalamityMod.BiomeManagers
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
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 0beee06514..93d68380d4 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;
@@ -26,6 +26,11 @@ namespace CalamityMod.Buffs
{
player.GetDamage() -= 0.1f;
}
+ else if (type == BuffID.Clairvoyance)
+ {
+ player.GetDamage() -= 0.02f;
+ player.GetCritChance() -= 2;
+ }
else if (type == BuffID.Panic)
{
player.moveSpeed -= 0.6f;
@@ -68,11 +73,22 @@ 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;
}
+
+ // Solar Flare DR is a full compensation, as the vanilla multiplicative DR is removed entirely.
+ else if (type >= BuffID.SolarShield1 && type <= BuffID.SolarShield3)
+ {
+ player.endurance += BalancingConstants.SolarFlareShieldDR;
+ }
+
else if (type == BuffID.Warmth)
{
player.buffImmune[ModContent.BuffType()] = true;
@@ -83,18 +99,6 @@ namespace CalamityMod.Buffs
{
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)
@@ -182,7 +186,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 = "";
@@ -195,7 +199,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.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/EidolonSnailBuff.png b/Buffs/Pets/EidolonSnailBuff.png
index 6cc347ab66..d237231cbd 100644
Binary files a/Buffs/Pets/EidolonSnailBuff.png and b/Buffs/Pets/EidolonSnailBuff.png differ
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/CirrusPinkCandleBuff.cs b/Buffs/Placeables/CirrusPinkCandleBuff.cs
index 93d389d70c..eaeb003cbc 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;
diff --git a/Buffs/Placeables/CirrusPurpleCandleBuff.cs b/Buffs/Placeables/CirrusPurpleCandleBuff.cs
index 7b41d4dcb4..1d50225a40 100644
--- a/Buffs/Placeables/CirrusPurpleCandleBuff.cs
+++ b/Buffs/Placeables/CirrusPurpleCandleBuff.cs
@@ -7,7 +7,7 @@ namespace CalamityMod.Buffs.Placeables
public class CirrusPurpleCandleBuff : ModBuff
{
public static float DefenseRatioBonus = 0.15f;
-
+
public override void SetStaticDefaults()
{
Main.buffNoTimeDisplay[Type] = true;
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/AbyssalDivingSuitBuff.cs b/Buffs/StatBuffs/AbyssalDivingSuitBuff.cs
index c385db4eec..92cab6a912 100644
--- a/Buffs/StatBuffs/AbyssalDivingSuitBuff.cs
+++ b/Buffs/StatBuffs/AbyssalDivingSuitBuff.cs
@@ -1,4 +1,4 @@
-using CalamityMod.CalPlayer;
+using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -20,7 +20,8 @@ namespace CalamityMod.Buffs.StatBuffs
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.abyssalDivingSuitPrevious)
{
- player.gills = true;
+ if (player.IsUnderwater())
+ player.gills = true;
modPlayer.abyssalDivingSuitPower = true;
modPlayer.depthCharm = true;
modPlayer.jellyfishNecklace = true;
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/PolarisBuff.cs b/Buffs/StatBuffs/Haste.cs
similarity index 61%
rename from Buffs/StatBuffs/PolarisBuff.cs
rename to Buffs/StatBuffs/Haste.cs
index 9ffe439cb5..e4fa6b578c 100644
--- a/Buffs/StatBuffs/PolarisBuff.cs
+++ b/Buffs/StatBuffs/Haste.cs
@@ -1,9 +1,9 @@
-using Terraria;
+using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
{
- public class PolarisBuff : ModBuff
+ public class Haste : ModBuff
{
public override void SetStaticDefaults()
{
@@ -15,7 +15,11 @@ namespace CalamityMod.Buffs.StatBuffs
public override void Update(Player player, ref int buffIndex)
{
- player.Calamity().polarisBoost = true;
+ // keep the buff active as long as the player's haste level is up
+ if (player.Calamity().hasteLevel > 0)
+ {
+ player.buffTime[buffIndex] = 60;
+ }
}
}
}
diff --git a/Buffs/StatBuffs/Haste.png b/Buffs/StatBuffs/Haste.png
new file mode 100644
index 0000000000..b0e7aebaac
Binary files /dev/null and b/Buffs/StatBuffs/Haste.png differ
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/PolarisBuff.png b/Buffs/StatBuffs/PolarisBuff.png
deleted file mode 100644
index fcad4dcc2e..0000000000
Binary files a/Buffs/StatBuffs/PolarisBuff.png and /dev/null differ
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 ecc06ca622..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.88f;
+ 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/FrozenLungs.png b/Buffs/StatDebuffs/FrozenLungs.png
index c44a4a4a0f..62fea4a1b6 100644
Binary files a/Buffs/StatDebuffs/FrozenLungs.png and b/Buffs/StatDebuffs/FrozenLungs.png differ
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 48d71f8a78..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/MiniatureEyeofCthulhu.png b/Buffs/Summon/MiniatureEyeofCthulhu.png
index 8085911d76..654ec5ca3d 100644
Binary files a/Buffs/Summon/MiniatureEyeofCthulhu.png and b/Buffs/Summon/MiniatureEyeofCthulhu.png differ
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 5dc5c9c044..e505c7e3b9 100644
--- a/CalPlayer/CalamityPlayer.cs
+++ b/CalPlayer/CalamityPlayer.cs
@@ -30,7 +30,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;
@@ -79,7 +78,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 +190,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;
@@ -203,7 +201,6 @@ namespace CalamityMod.CalPlayer
public int brimLoreInfernoTimer = 0;
public int tarraLifeAuraTimer = 0;
public int bloodflareHeartTimer = 300;
- public int polarisBoostCounter = 0;
public int dragonRageHits = 0;
public int dragonRageCooldown = 0;
public float modStealth = 1f;
@@ -230,6 +227,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;
@@ -310,7 +308,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;
@@ -359,6 +356,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);
@@ -436,7 +434,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;
@@ -497,7 +495,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;
@@ -524,6 +521,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;
@@ -580,10 +578,12 @@ namespace CalamityMod.CalPlayer
public bool chaliceOfTheBloodGod = false;
public double chaliceBleedoutBuffer = 0D;
public double chaliceDamagePointPartialProgress = 0D;
+ 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;
@@ -594,6 +594,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;
@@ -685,6 +687,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;
@@ -716,8 +719,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;
@@ -726,7 +729,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;
@@ -966,10 +968,8 @@ 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 polarisBoost = false;
- public bool polarisBoostTwo = false;
- public bool polarisBoostThree = false;
public bool bloodfinBoost = false;
public int bloodfinTimer = 30;
public bool hallowedRegen = false;
@@ -978,6 +978,8 @@ namespace CalamityMod.CalPlayer
public bool avertorBonus = false;
public bool divineBless = false;
public bool infiniteFlight = false;
+ public int hasteCounter = 0;
+ public int hasteLevel = 0;
#endregion
#region Minion
@@ -1082,14 +1084,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 => Player.InModBiome(ModContent.GetInstance());
public bool ZoneSulphur => Player.InModBiome(ModContent.GetInstance());
public bool ZoneAbyss => ZoneAbyssLayer1 || ZoneAbyssLayer2 || ZoneAbyssLayer3 || ZoneAbyssLayer4;
@@ -1177,11 +1177,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
@@ -1232,7 +1255,6 @@ namespace CalamityMod.CalPlayer
adrenalineBoostThree = false;
drawBossHPBar = true;
shouldDrawSmallText = true;
- healToFull = false;
newMerchantInventory = false;
newPainterInventory = false;
@@ -1285,7 +1307,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);
@@ -1316,6 +1337,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);
@@ -1375,7 +1397,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");
@@ -1406,6 +1427,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.
@@ -1654,6 +1676,7 @@ namespace CalamityMod.CalPlayer
transformer = false;
hideOfDeus = false;
dAmulet = false;
+ rampartOfDeities = false;
gShell = false;
lAmbergris = false;
tortShell = false;
@@ -1753,6 +1776,7 @@ namespace CalamityMod.CalPlayer
silvaWings = false;
corrosiveSpine = false;
RustyMedallionDroplets = false;
+ MiniSwarmers = false;
noStupidNaturalARSpawns = false;
rottenDogTooth = false;
angelicAlliance = false;
@@ -1791,6 +1815,7 @@ namespace CalamityMod.CalPlayer
anechoicPlating = false;
jellyfishNecklace = false;
fairyBoots = false;
+ flameWakerBoots = false;
hellfireTreads = false;
abyssalAmulet = false;
lumenousAmulet = false;
@@ -1822,7 +1847,7 @@ namespace CalamityMod.CalPlayer
victideSet = false;
victideSummoner = false;
- sulfurSet = false;
+ sulphurSet = false;
aeroSet = false;
@@ -1969,9 +1994,6 @@ namespace CalamityMod.CalPlayer
AbsorberRegen = false;
cFreeze = false;
tRegen = false;
- polarisBoost = false;
- polarisBoostTwo = false;
- polarisBoostThree = false;
bloodfinBoost = false;
divineBless = false;
@@ -2123,12 +2145,15 @@ namespace CalamityMod.CalPlayer
celestialDragons = false;
KalandraMirror = false;
StellarTorus = false;
+ LiliesOfFinalityBool = false;
+ /*
disableVoodooSpawns = false;
disablePerfCystSpawns = false;
disableHiveCystSpawns = false;
disableNaturalScourgeSpawns = false;
disableAnahitaSpawns = false;
+ */
abyssalDivingSuitPrevious = abyssalDivingSuit;
abyssalDivingSuit = abyssalDivingSuitHide = abyssalDivingSuitForce = abyssalDivingSuitPower = false;
@@ -2201,13 +2226,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
@@ -2285,11 +2310,9 @@ namespace CalamityMod.CalPlayer
silvaMageCooldown = 0;
bloodflareMageCooldown = 0;
tarraRangedCooldown = 0;
- tarraMageHealCooldown = 0;
hideOfDeusMeleeBoostTimer = 0;
externalAbyssLight = 0;
externalColdImmunity = externalHeatImmunity = false;
- polarisBoostCounter = 0;
dragonRageHits = 0;
dragonRageCooldown = 0;
spectralVeilImmunity = 0;
@@ -2408,7 +2431,7 @@ namespace CalamityMod.CalPlayer
soaring = false;
bounding = false;
shadow = false;
- nanomachinesLockoutTimer = 0;
+ adrenalinePauseTimer = 0;
photosynthesis = false;
astralInjection = false;
gravityNormalizer = false;
@@ -2457,10 +2480,8 @@ namespace CalamityMod.CalPlayer
pinkCandleHealFraction = 0D;
yellowCandle = false;
trippy = false;
+ trippyLevel = 1;
amidiasBlessing = false;
- polarisBoost = false;
- polarisBoostTwo = false;
- polarisBoostThree = false;
bloodfinBoost = false;
bloodfinTimer = 0;
healCounter = 300;
@@ -2469,6 +2490,8 @@ namespace CalamityMod.CalPlayer
healingPotionMultiplier = 1f;
avertorBonus = false;
divineBless = false;
+ hasteLevel = 0;
+ hasteCounter = 0;
#endregion
#region Armor Set Bonuses
@@ -2554,7 +2577,7 @@ namespace CalamityMod.CalPlayer
frostSet = false; //vanilla armor
victideSet = false;
aeroSet = false;
- sulfurSet = false;
+ sulphurSet = false;
statigelSet = false;
tarraSet = false;
tarraMelee = false;
@@ -2619,6 +2642,7 @@ namespace CalamityMod.CalPlayer
chaliceBleedoutBuffer = 0D;
chaliceDamagePointPartialProgress = 0D;
+ chaliceHitOriginalDamage = 0;
if (BossRushEvent.BossRushActive)
{
@@ -2741,6 +2765,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 &&
@@ -2792,12 +2818,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;
}
}
}
@@ -2865,7 +2891,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;
}
@@ -2875,7 +2901,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;
@@ -2916,7 +2942,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;
@@ -3040,10 +3066,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))
@@ -3061,17 +3088,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
@@ -3079,7 +3106,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)
{
@@ -3243,13 +3270,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;
@@ -3258,7 +3285,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++)
{
@@ -3294,6 +3321,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)
@@ -3586,17 +3616,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();
@@ -3608,7 +3648,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;
@@ -3618,11 +3658,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
@@ -3649,14 +3687,14 @@ 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) +
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
- ((deepDiver && Player.IsUnderwater()) ? 0.15f : 0f);
+ (hasteLevel * 0.05f);
float runSpeedMult = 1f +
(lunicCorpsLegs ? 0.1f : 0f) +
@@ -3664,13 +3702,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.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)
runAccMult *= 0.6f;
@@ -3718,8 +3756,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;
@@ -3787,9 +3824,9 @@ namespace CalamityMod.CalPlayer
#region Modify Mana Cost
public override void ModifyManaCost(Item item, ref float reduce, ref float mult)
{
- if (item.type == ItemID.SpaceGun && meteorSet)
+ if (CalamityLists.MagicGunIDs.Contains(item.type) && meteorSet)
{
- mult *= 0.5f;
+ mult *= 0.33f;
}
}
#endregion
@@ -3917,7 +3954,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;
}
}
@@ -3925,21 +3962,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);
}
}
}
@@ -4010,7 +4047,7 @@ namespace CalamityMod.CalPlayer
}
// Handle AI edge-cases. These are like overlapping projectiles and the projectile not spawning at all
- if (item.type == ModContent.ItemType())
+ if (item.type == ModContent.ItemType())
Main.projectile[p].ai[1] = 1f; //MUST BE 1 OTHERWISE CLONES GENERATE STEALTH AAAAAAAAAAA
if (item.type == ModContent.ItemType())
Main.projectile[p].ai[0] = -1f;
@@ -4046,9 +4083,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;
@@ -4058,6 +4095,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
@@ -4674,7 +4722,7 @@ namespace CalamityMod.CalPlayer
return rogueStealth >= rogueStealthMax * consumptionMult;
}
- internal void ConsumeStealthByAttacking()
+ public void ConsumeStealthByAttacking()
{
stealthStrikeThisFrame = true;
stealthAcceleration = 1f; // Reset acceleration when you attack
@@ -4716,14 +4764,14 @@ 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++)
{
if (spearsFired == 2)
break;
if (Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].friendly)
{
- bool attack = Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType();
+ bool attack = Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType();
if (attack)
{
int numSpears = profanedCrystalBuffs ? 12 : 6;
@@ -4813,8 +4861,15 @@ namespace CalamityMod.CalPlayer
if (CalamityConfig.Instance.SpeedrunTimer)
CalamityMod.SpeedrunTimer.Restart();
- // Set a random delay between 12 and 20 seconds. When this delay hits zero, the music mod and wiki reminder messages display
- if ((CalamityMod.Instance.musicMod is null && CalamityConfig.Instance.MusicModReminderMessage) || CalamityConfig.Instance.WikiStatusMessage)
+ //
+ // 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 || 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..302f69fc37 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
@@ -127,7 +127,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);
@@ -564,8 +566,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..d5326f5e54 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)
@@ -427,7 +423,7 @@ namespace CalamityMod.CalPlayer
ModContent.ItemType(),
ModContent.ItemType(),
ModContent.ItemType(),
- ModContent.ItemType(),
+ ModContent.ItemType(),
ModContent.ItemType(),
ModContent.ItemType(),
ModContent.ItemType(),
@@ -443,10 +439,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 +471,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 bffea92b00..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) +
@@ -190,9 +190,13 @@ namespace CalamityMod.CalPlayer
if (Main.rand.NextBool(chanceForBiomeCrate))
{
if (ZoneCalamity)
- itemDrop = ModContent.ItemType();
- else
- itemDrop = Main.hardMode ? ItemID.LavaCrateHard : ItemID.LavaCrate;
+ itemDrop = Main.hardMode ? ModContent.ItemType() : ModContent.ItemType();
+ else
+ itemDrop = Main.hardMode ? ItemID.LavaCrateHard : ItemID.LavaCrate;
+ }
+ if ((Main.rand.NextBool(chanceForRareItems) && enchantedPearl && fishingStation && Player.cratePotion) && ZoneCalamity)
+ {
+ itemDrop = ModContent.ItemType();
}
}
}
@@ -234,7 +238,7 @@ namespace CalamityMod.CalPlayer
}
if (ZoneSunkenSea)
{
- switch (Main.rand.Next(2))
+ switch (Main.rand.Next(3))
{
case 0:
rareItemList.Add(ModContent.ItemType());
@@ -242,6 +246,9 @@ namespace CalamityMod.CalPlayer
case 1:
rareItemList.Add(ModContent.ItemType());
break;
+ case 2:
+ rareItemList.Add(ModContent.ItemType());
+ break;
}
}
if (Player.ZoneSnow && Player.ZoneRockLayerHeight && (Player.ZoneCorrupt || Player.ZoneCrimson || Player.ZoneHallow))
@@ -267,9 +274,9 @@ namespace CalamityMod.CalPlayer
{
List biomeCrateList = new List();
- biomeCrateList.AddWithCondition(ModContent.ItemType(), ZoneAstral);
- biomeCrateList.AddWithCondition(ModContent.ItemType(), ZoneSunkenSea);
- biomeCrateList.AddWithCondition(ModContent.ItemType(), canSulphurFish);
+ biomeCrateList.AddWithCondition(Main.hardMode ? ModContent.ItemType