Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into NanoblackReaperRework

This commit is contained in:
Dreitone committed 2026-02-05 15:37:21 -06:00
commit 23ede90c8a
7879 files changed
+188291 -147916

No files matched your search

+1 -1
View File
@@ -1 +1 @@
patreon: Fabsol
patreon: CalamityMod
+1
View File
@@ -305,3 +305,4 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk
*.slnx
+9 -13
View File
@@ -1,19 +1,15 @@
using Microsoft.Xna.Framework.Graphics;
using System.Reflection;
using System;
using Terraria.Graphics.Effects;
using Terraria;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
using System;
using CalamityMod.Skies;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.ModLoader;
namespace CalamityMod.Backgrounds
{
public class AstralDesertSurfaceBGStyle : ModSurfaceBackgroundStyle
{
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
readonly int CloseBGYOffset = 475;
readonly int MiddleBGYOffset = 475;
@@ -45,9 +41,9 @@ namespace CalamityMod.Backgrounds
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);
float screenOff = Main.instance.screenOff;
float scAdj = Main.instance.scAdj;
Color COSBMAplha = Main.ColorOfSurfaceBackgroundsModified;
Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A);
bool canBGDraw = false;
if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
+9 -14
View File
@@ -1,20 +1,15 @@
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;
using System;
using CalamityMod.Skies;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.ModLoader;
namespace CalamityMod.Backgrounds
{
public class AstralSnowSurfaceBGStyle : ModSurfaceBackgroundStyle
{
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
readonly int FrontBGYOffset = 275;
readonly int CloseBGYOffset = 175;
readonly int MiddleBGYOffset = 475;
@@ -47,9 +42,9 @@ namespace CalamityMod.Backgrounds
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);
float screenOff = Main.instance.screenOff;
float scAdj = Main.instance.scAdj;
Color COSBMAplha = Main.ColorOfSurfaceBackgroundsModified;
Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A);
bool canBGDraw = false;
if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
+9 -13
View File
@@ -1,20 +1,16 @@
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using System.Reflection;
using System;
using Terraria.Graphics.Effects;
using Terraria;
using Terraria.ModLoader;
using System;
using CalamityMod.Skies;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.ModLoader;
namespace CalamityMod.Backgrounds
{
//this is just a blank background, so each custom background will draw over it
public class AstralSurfaceBGStyle : ModSurfaceBackgroundStyle
{
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
readonly int FrontBGYOffset = 275; //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;
@@ -50,9 +46,9 @@ namespace CalamityMod.Backgrounds
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);
float screenOff = Main.instance.screenOff;
float scAdj = Main.instance.scAdj;
Color COSBMAplha = Main.ColorOfSurfaceBackgroundsModified;
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))
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

+34 -8
View File
@@ -10,23 +10,49 @@ namespace CalamityMod.Backgrounds
private int SSBG2;
private int SSBG3;
private int BGBG0;
private int BGBG1;
private int BGBG2;
private int BGBG3;
public override void SetStaticDefaults()
{
if (Main.dedServ)
return;
SSBG0 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG0");
SSBG1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG1");
SSBG2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG2");
SSBG3 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG3");
SSBG0 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
SSBG1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
SSBG2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
SSBG3 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
BGBG0 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
BGBG1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BasaltGullyBG");
BGBG2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
BGBG3 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BasaltGullyBG");
}
public override void FillTextureArray(int[] textureSlots)
{
textureSlots[0] = SSBG0;
textureSlots[1] = SSBG1;
textureSlots[2] = SSBG2;
textureSlots[3] = SSBG3;
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.RadiantReefsBiome>()) ||
Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.PolypForestBiome>()) ||
Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>()) ||
Main.LocalPlayer.InModBiome<BiomeManagers.GleamingBurrowsBiome>())
{
textureSlots[0] = SSBG0;
textureSlots[1] = SSBG1;
textureSlots[2] = SSBG2;
textureSlots[3] = SSBG3;
}
if (!Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.RadiantReefsBiome>()) &&
!Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.PolypForestBiome>()) &&
!Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>()) &&
!Main.LocalPlayer.InModBiome<BiomeManagers.GleamingBurrowsBiome>())
{
textureSlots[0] = BGBG0;
textureSlots[1] = BGBG1;
textureSlots[2] = BGBG2;
textureSlots[3] = BGBG3;
}
}
}
}
+253 -33
View File
@@ -1,15 +1,22 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Graphics;
using CalamityMod.Systems.Graphic;
using CalamityMod.Utilities.Daybreak.Buffers;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using ReLogic.Content;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Backgrounds
{
public class SunkenSeaBurrowsBG : ModSystem
{
private static RenderTargetLease WaterDistortionTarget;
private static bool CurrentlyRendering { get; set; }
public override void Load()
{
if (Main.dedServ)
@@ -17,7 +24,15 @@ namespace CalamityMod.Backgrounds
return;
}
GeneralDrawLayerSystem.OnPrepareDraw += DrawToTarget;
On_Main.DrawBackgroundBlackFill += On_Main_DrawBackgroundBlackFill;
Main.QueueMainThreadAction(() => WaterDistortionTarget = ScreenspaceTargetPool.Shared.Rent(Main.instance.GraphicsDevice));
}
public override void Unload()
{
GeneralDrawLayerSystem.OnPrepareDraw -= DrawToTarget;
}
/// <summary>
@@ -33,72 +48,277 @@ namespace CalamityMod.Backgrounds
{
if (!Main.dedServ && Main.LocalPlayer.InModBiome<BiomeManagers.GleamingBurrowsBiome>())
{
for (int i = 0; i < Main.screenWidth / 16; i++)
int drawLimitX = Main.screenWidth / 16;
int drawLimitY = Main.screenHeight / 16;
Point drawPoint = (Main.screenPosition / 16).ToPoint();
for (int i = 0; i < drawLimitX; i++)
{
for (int j = 0; j < Main.screenWidth / 16; j++)
for (int j = 0; j < drawLimitY; j++)
{
Point pos = (Main.screenPosition / 16).ToPoint() + new Point(i, j);
if (Main.tile[pos.X, pos.Y].Slope != SlopeType.Solid)
{
Point pos = drawPoint + new Point(i, j);
if (!Main.tile[pos.X, pos.Y].HasTile &&
Main.tile[pos.X, pos.Y].WallType == WallID.None)
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.1f);
}
}
}
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>())))
{
int drawLimitX = Main.screenWidth / 16;
int drawLimitY = Main.screenHeight / 16;
Point drawPoint = (Main.screenPosition / 16).ToPoint();
for (int i = 0; i < drawLimitX; i++)
{
for (int j = 0; j < drawLimitY; j++)
{
Point pos = drawPoint + new Point(i, j);
if (!Main.tile[pos.X, pos.Y].HasTile &&
Main.tile[pos.X, pos.Y].WallType == WallID.None &&
Main.tile[pos.X, pos.Y].LiquidAmount == 0)
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.2f);
}
}
}
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.PolypForestBiome>())))
{
int drawLimitX = Main.screenWidth / 16;
int drawLimitY = Main.screenHeight / 16;
Point drawPoint = (Main.screenPosition / 16).ToPoint();
for (int i = 0; i < drawLimitX; i++)
{
for (int j = 0; j < drawLimitY; j++)
{
Point pos = drawPoint + new Point(i, j);
if (!Main.tile[pos.X, pos.Y].HasTile &&
Main.tile[pos.X, pos.Y].WallType == WallID.None)
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.2f);
}
}
}
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.RadiantReefsBiome>())))
{
int drawLimitX = Main.screenWidth / 16;
int drawLimitY = Main.screenHeight / 16;
Point drawPoint = (Main.screenPosition / 16).ToPoint();
for (int i = 0; i < drawLimitX; i++)
{
for (int j = 0; j < drawLimitY; j++)
{
Point pos = drawPoint + new Point(i, j);
if (!Main.tile[pos.X, pos.Y].HasTile &&
Main.tile[pos.X, pos.Y].WallType == WallID.None)
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.2f);
}
}
}
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.BasaltGullyBiome>())))
{
int drawLimitX = Main.screenWidth / 16;
int drawLimitY = Main.screenHeight / 16;
Point drawPoint = (Main.screenPosition / 16).ToPoint();
for (int i = 0; i < drawLimitX; i++)
{
for (int j = 0; j < drawLimitY; j++)
{
Point pos = drawPoint + new Point(i, j);
if (pos.Y >= Main.maxTilesY - 450)
{
if (!Main.tile[pos.X, pos.Y].HasTile &&
Main.tile[pos.X, pos.Y].WallType == WallID.None)
Lighting.AddLight(pos.X, pos.Y, TorchID.Red, 0.6f);
}
}
}
}
}
private void DrawToTarget()
{
if (Main.gameMenu)
{
return;
}
CurrentlyRendering = true;
using (WaterDistortionTarget.Scope(clearColor: Color.Transparent))
{
// 13MAY2025: fryzahh: Note that when other Sunken Sea backgrounds are implemented they should use this same system.
// Leaving this here for other programmers, in case I don't get to doing this myself.
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, null, CalamityUtils.BackgroundMatrix);
DrawShoresBG();
DrawBurrowsBG();
Main.spriteBatch.End();
}
CurrentlyRendering = false;
}
private void On_Main_DrawBackgroundBlackFill(On_Main.orig_DrawBackgroundBlackFill orig, Main self)
{
if (Main.gameMenu || Main.screenPosition.Y + Main.screenHeight < ((int)Main.worldSurface) * 16f)
{
orig(self);
return;
}
orig(self);
DrawBurrowsBG();
}
public static float Transparency;
public static float TransitionSpeed => 0.02f;
private static void DrawBurrowsBG()
{
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.GleamingBurrowsBiome>()))
// This won't render if the Wave Quality setting isn't turned off unfortunately, so don't bother running any of the shader
// rendering code if that setting is on.
if (Main.WaveQuality > 0 || !CalamityClientConfig.Instance.SunkenSeaBackgroundDistortion)
{
Transparency += TransitionSpeed;
if (Transparency > 1f)
{
Transparency = 1f;
}
DrawShoresBG();
DrawBurrowsBG();
}
else
{
//make transparency immediately go down so it doesnt look weird, since vanilla underground backgrounds dont have the fade-in effect this background has
MiscShaderData distortionShader = GameShaders.Misc["CalamityMod:BasicTextureDistortion"];
Asset<Texture2D> distortionTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GreyscaleGradients/Swirls");
// Apply a distortion shader to the Sunken Sea backgrounds to give them an underwater ripple-like effect.
Main.spriteBatch.End();
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, distortionShader.Shader, CalamityUtils.BackgroundMatrix);
const float distortionXSpeed = -0.012f;
const float distortionYSpeed = 0.02f;
const float noiseScale = 0.075f;
const float noiseStrength = 0.035f;
Vector2 timeOffset = new Vector2(distortionXSpeed, distortionYSpeed) * Main.GlobalTimeWrappedHourly * noiseScale;
Vector2 noiseScaleStrength = new Vector2(noiseScale, noiseStrength);
distortionShader.Shader.Parameters["timeOffset"].SetValue(timeOffset);
distortionShader.Shader.Parameters["noiseScaleStrength"].SetValue(noiseScaleStrength);
distortionShader.SetShaderTexture(distortionTexture);
Main.spriteBatch.Draw(WaterDistortionTarget.Target, new Rectangle(16, 16, Main.screenWidth, Main.screenHeight), Color.White);
}
}
public static float Transparency;
public static float TransitionSpeed => 0.02f;
private static void DrawShoresBG()
{
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>()))
{
Transparency += 1f;
if (Transparency > 1f)
Transparency = 1f;
}
else
{
// Make transparency immediately go down so it doesnt look weird, since vanilla underground backgrounds dont have the fade-in effect this background has.
Transparency -= 1f;
if (Transparency < 0f)
{
Transparency = 0f;
}
}
//dont bother running any of the background drawing if the transparency is zero (meaning the background isnt actually active)
//also do not run any of the background drawing if you have the vanilla background config option turned off
// Don't bother running any of the background drawing if the transparency is zero (meaning the background isnt actually active).
// Also do not run any of the background drawing if you have the vanilla background config option turned off.
if (Transparency > 0f && Main.BackgroundEnabled)
{
Vector2 vector = Main.screenPosition + new Vector2((Main.screenWidth >> 1), (Main.screenHeight >> 1));
float num = (Main.GameViewMatrix.Zoom.Y - 1f) * 0.5f * 200f;
float Scale = 1.5f;
float playerDrawPosition = ((Main.LocalPlayer.Center.Y / 16f) - 90) * 16f;
for (int Layers = 4; Layers >= 0; Layers--)
{
//get each background texture
// Get each background texture.
Texture2D BGTexture = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/SunkenSeaShoresBG" + Layers).Value;
Vector2 vector2 = new Vector2(BGTexture.Width, BGTexture.Height) * 0.5f;
float num2 = (Layers * 2 + 3f);
Vector2 vector3 = new Vector2(1f / num2);
Rectangle rectangle = new Rectangle(0, 0, BGTexture.Width, BGTexture.Height);
Vector2 zero = Vector2.Zero;
switch (Layers)
{
case 0:
{
zero.Y += 200f;
break;
}
case 1:
{
zero.Y += 0f;
break;
}
case 2:
{
zero.Y += 0f;
break;
}
case 3:
{
zero.Y += 0f;
break;
}
case 4:
{
zero.Y += 0f;
break;
}
}
vector2 *= Scale;
zero.Y -= num;
float LoopWidth = Scale * rectangle.Width;
float LoopHeight = Scale * rectangle.Height;
int LoopX = (int)((vector.X * vector3.X - vector2.X + zero.X - (Main.screenWidth >> 1)) / LoopWidth);
int LoopY = (int)((vector.Y * vector3.Y - vector2.Y + zero.Y - (Main.screenWidth >> 1)) / LoopWidth);
for (int i = LoopY - 2; i < LoopY + 4 + (int)(Main.screenWidth / LoopHeight); i++)
{
for (int j = LoopX - 2; j < LoopX + 4 + (int)(Main.screenWidth / LoopWidth); j++)
{
Vector2 drawPosition = (new Vector2(j * Scale * (rectangle.Width / vector3.X), playerDrawPosition) + vector2 - vector) * vector3 + vector - Main.screenPosition - vector2 + zero;
var frame = rectangle;
var color = Color.White * Transparency;
Main.spriteBatch.Draw(BGTexture, drawPosition, frame, color, 0f, Vector2.Zero, Scale, SpriteEffects.None, 0f);
}
}
}
}
}
private static void DrawBurrowsBG()
{
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.GleamingBurrowsBiome>()))
{
Transparency += 1f;
if (Transparency > 1f)
Transparency = 1f;
}
else
{
// Make transparency immediately go down so it doesnt look weird, since vanilla underground backgrounds dont have the fade-in effect this background has.
Transparency -= 1f;
if (Transparency < 0f)
Transparency = 0f;
}
// Don't bother running any of the background drawing if the transparency is zero (meaning the background isnt actually active).
// Also do not run any of the background drawing if you have the vanilla background config option turned off.
if (Transparency > 0f && Main.BackgroundEnabled)
{
Vector2 vector = Main.screenPosition + new Vector2((Main.screenWidth >> 1), (Main.screenHeight >> 1));
float num = (Main.GameViewMatrix.Zoom.Y - 1f) * 0.5f * 200f;
float Scale = 1.5f;
float playerDrawPosition = ((Main.LocalPlayer.Center.Y / 16f) - 90) * 16f;
for (int Layers = 4; Layers >= 0; Layers--)
{
// Get each background texture.
Texture2D BGTexture = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/SunkenSeaBurrowsBG" + Layers).Value;
Vector2 vector2 = new Vector2(BGTexture.Width, BGTexture.Height) * 0.5f;
@@ -148,7 +368,7 @@ namespace CalamityMod.Backgrounds
{
for (int j = LoopX - 2; j < LoopX + 4 + (int)(Main.screenWidth / LoopWidth); j++)
{
Vector2 drawPosition = (new Vector2(j * Scale * (rectangle.Width / vector3.X), ((Main.LocalPlayer.Center.Y / 16f) - 90) * 16f) + vector2 - vector) * vector3 + vector - Main.screenPosition - vector2 + zero;
Vector2 drawPosition = (new Vector2(j * Scale * (rectangle.Width / vector3.X), playerDrawPosition) + vector2 - vector) * vector3 + vector - Main.screenPosition - vector2 + zero;
var frame = rectangle;
var color = Color.White * Transparency;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

+117 -216
View File
@@ -27,16 +27,16 @@ namespace CalamityMod.Balancing
{
public sealed class BalancingChangesManager : ModSystem
{
internal static List<IBalancingRule[]> UniversalBalancingChanges = null;
internal static List<NPCBalancingChange> NPCSpecificBalancingChanges = null;
// Balancing changes in this method are sorted based on place in progression, NPC name (from A-Z), and strength of resistance in ascending order, in that level of priority.
// For ease of change, changes that are not exclusive to one specific weapon are not bundled into one line if they share the same resistance factor.
// To give an example of this, Thanatos having a 50% resist to Chicken Cannon and Prismatic Breaker should be two distinct lines with a 0.5x factor instead of hamfisting them all
// into one single resist that may have to be split later.
// To give an example of this, Thanatos having a 50% resist to Chicken Cannon and Rancor should be two distinct lines with a 0.5x factor instead of hamfisting them all into
// one single resist that may have to be split later.
public override void SetStaticDefaults()
{
// Dirty shorthand for true melee resists, because they're super common and other class resists aren't.
// If you add/change a true melee resist here, be sure to add/change the resist in CalamityGlobalNPC ModifyHitByItem as well.
IBalancingRule ResistTrueMelee(float f) => new ClassResistBalancingRule(f, TrueMeleeDamageClass.Instance);
// Declare specific filters.
@@ -46,84 +46,41 @@ namespace CalamityMod.Balancing
bool DragonRageFilter(Projectile p) =>
p.type == ProjectileType<DragonRageStaff>() || p.type == ProjectileType<DragonRageFireball>() || (p.type == ProjectileType<FuckYou>() && p.CountsAsClass<MeleeDamageClass>());
// bool MonkStaffT3Filter(Projectile p) =>
// p.type == ProjectileID.MonkStaffT3_AltShot || (p.type == ProjectileID.Electrosphere && Main.player[p.owner].ActiveItem().type == ItemID.MonkStaffT3);
bool MushroomSpearFilter(Projectile p) =>
p.type == ProjectileID.Mushroom && Main.player[p.owner].ActiveItem().type == ItemID.MushroomSpear;
bool OrichalcumPetalFilter(Projectile p) =>
p.type == ProjectileID.FlowerPetal && Main.player[p.owner].onHitPetal;
bool SpectreMaskSetBonusFilter(Projectile p) =>
p.type == ProjectileID.SpectreWrath && Main.player[p.owner].ghostHurt;
bool AotCThrowCombo(Projectile p) =>
p.type == ProjectileType<ArkoftheCosmosSwungBlade>() && (p.ai[0] == 2 || p.ai[0] == 3);
bool HiveBeeFilter(Projectile p) =>
p.type == ProjectileType<BasicPlagueBee>() && Main.player[p.owner].ActiveItem().type == ItemType<TheHive>();
UniversalBalancingChanges = new List<IBalancingRule[]>()
{
// 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)),
// Nerf Seedler seeds by 25%.
Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.SeedlerNut, ProjectileID.SeedlerThorn)),
// Nerf Cursed Dart flames by 50%.
Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CursedDartFlame)),
// Nerf Mushroom Spear projectiles by 50%.
Do(new ProjectileSpecificRequirementBalancingRule(0.5f, MushroomSpearFilter)),
// Nerf Orichalcum armor set bonus petals by 25%.
Do(new ProjectileSpecificRequirementBalancingRule(0.75f, OrichalcumPetalFilter)),
// Nerf Spectre Mask set bonus projectiles by 50%.
Do(new ProjectileSpecificRequirementBalancingRule(0.5f, SpectreMaskSetBonusFilter)),
};
p.type == ProjectileType<BasicPlagueBee>() && Main.player[p.owner].HeldItem.type == ItemType<TheHive>();
NPCSpecificBalancingChanges = new List<NPCBalancingChange>();
#region Desert Scourge
// 25% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(DesertScourgeIDList.List, Do(ResistTrueMelee(0.8f))));
#endregion
#region Crabulon
// 25% resist to true melee.
// 20% resist to true melee.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Crabulon>(), ResistTrueMelee(0.8f)));
#endregion
#region Brain of Cthulhu: Creepers
// 50% resist to true melee.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(ResistTrueMelee(0.5f))));
// 50% resist to Demon Scythe.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
#endregion
#region Eater of Worlds
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(ResistTrueMelee(0.5f))));
// 50% resist to Demon Scythe.
NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
// 40% resist to Sky Glaze.
NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<StickyFeather>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<StickyFeather>()))));
// 25% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(ResistTrueMelee(0.75f))));
#endregion
#region Brain of Cthulhu: Creepers
// 50% resist to Demon Scythe.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
// 25% resist to true melee.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(ResistTrueMelee(0.75f))));
#endregion
#region The Perforators
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(PerforatorWormIDList.List, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Perforators, Do(ResistTrueMelee(0.5f))));
#endregion
#region Wall of Flesh
@@ -133,61 +90,58 @@ namespace CalamityMod.Balancing
#region Aquatic Scourge
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(ResistTrueMelee(0.5f))));
// 50% resist to Adamantite Throwing Axe's lightning.
// Twisting Thunder and Gael's Greatsword use this projectile too, but they are far beyond progression, so who cares!
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
// 50% resist to Dormant Brimseeker.
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
// 50% resist to Mounted Scanner.
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<MountedScannerLaser>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<MountedScannerLaser>()))));
// 40% resist to Cryophobia.
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CryoBlast>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CryoBlast>()))));
// 30% resist to Meowthrower.
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
// 25% resist to Snowstorm Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
#endregion
#region The Destroyer
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(ResistTrueMelee(0.5f))));
// 50% resist to Adamantite Throwing Axe's lightning.
// See Aquatic Scourge comment.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
// 50% resist to Aftershock's rocks.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AftershockRock>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
// 50% resist to Dormant Brimseeker.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
// 45% resist to Mounted Scanner.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<MountedScannerLaser>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<MountedScannerLaser>()))));
// 30% resist to Meowthrower.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
// 25% resist to Avalanche's Ice Bombs and shards.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<IceBombFriendly>(), ProjectileType<FrostShardFriendly>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<IceBombFriendly>(), ProjectileType<FrostShardFriendly>()))));
// 25% resist to Snowstorm Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
#endregion
#region Astrum Aureus
// 30% resist to The Ballista's greatarrows.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<BallistaGreatArrow>()))));
// 25% resist to true melee.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), ResistTrueMelee(0.75f)));
// 30% resist to Whitewater.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<WhitewaterProj>(), ProjectileType<WhitewaterAura>(), ProjectileType<WhitewaterSpear>()))));
// 25% resist to The Ballista's greatarrows.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<BallistaGreatArrow>()))));
#endregion
#region Duke Fishron
@@ -208,31 +162,22 @@ namespace CalamityMod.Balancing
#region Ravager
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(ResistTrueMelee(0.5f))));
// 50% resist to Aegis Blade's explosions because the true melee resist ain't enough.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
// 50% resist to Icicle Arrows.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<IcicleArrowProj>()))));
// 50% resist to Whitewater.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<WhitewaterAura>(), ProjectileType<WhitewaterProj>(), ProjectileType<WhitewaterSpear>()))));
// 40% resist to Icicle Arrows.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<IcicleArrowProj>()))));
// 35% resist to Flying Dragon.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
// 30% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
// 30% resist to Flak Kraken.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
// 25% resist to Lucrecia.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<DNA>()))));
// 20% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AuroraFire>()))));
// 20% resist to The Hive.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>(), ProjectileType<HiveMissile>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>(), ProjectileType<HiveMissile>()))));
#endregion
#region Lunatic Cultist
@@ -251,37 +196,37 @@ namespace CalamityMod.Balancing
#region Astrum Deus
// 75% resist to Plaguenades.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
// 70% resist to Charged Blaster Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.ChargedBlasterLaser))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
// 70% resist to Stardust Dragon Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
// 55% resist to Flak Kraken.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType<FlakKrakenProjectile>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(ResistTrueMelee(0.5f))));
// 50% resist to Charged Blaster Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.ChargedBlasterLaser))));
// 50% resist to Atlantis (Atlantis gaming!).
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AtlantisSpear>()))));
// 50% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AuroraFire>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AtlantisSpear>()))));
// 35% resist to Aerial Bane.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
// 35% resist to Ballistic Poison Bomb's clouds.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<BallisticPoisonCloud>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
// 35% resist to Icicle Arrows.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
// 30% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
// 30% resist to Flak Kraken.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
// 20% resist to Ballistic Poison Bomb's clouds.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BallisticPoisonCloud>()))));
// 20% resist to Cluster Rocket fragments.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
#endregion
#region Moon Lord
@@ -306,34 +251,37 @@ namespace CalamityMod.Balancing
// 50% resist to Galactus Blade.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.5f, ProjectileType<GalacticaComet>())));
// 40% resist to Pristine Fury's alt fire.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<PristineSecondary>())));
// 40% resist to Stellar Torus Staff.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<StellarTorusBeam>())));
#endregion
#region Storm Weaver
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(ResistTrueMelee(0.5f))));
// 50% resist to Dazzling Stabber Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DazzlingStabber>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DazzlingStabber>()))));
// 50% resist to Last Prism.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.LastPrismLaser))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.LastPrismLaser))));
// 50% resist to Legion of Celestia.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<CelestialAxeMinion>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<CelestialAxeMinion>()))));
// 50% resist to Pristine Fury's alt fire.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<PristineSecondary>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<PristineSecondary>()))));
// 50% resist to Tactician's Trump Card's explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TacticiansElectricBoom>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TacticiansElectricBoom>()))));
// 40% resist to Devil's Sunrise's slashes.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<DevilsSunriseProj>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<DevilsSunriseProj>()))));
// 35% resist to Event Horizon.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<EventHorizonStar>(), ProjectileType<EventHorizonBlackhole>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<EventHorizonStar>(), ProjectileType<EventHorizonBlackhole>()))));
#endregion
#region Old Duke
@@ -343,22 +291,19 @@ namespace CalamityMod.Balancing
#region The Devourer of Gods
// 65% resist to Wave Pounder.
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<WavePounderBoom>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<WavePounderBoom>()))));
// 35% resist to Sulphuric Acid Cannon's explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<SulphuricAcidCannonExplosion>()))));
// 35% resist to Venusian Trident.
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<VenusianBolt>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<SulphuricAcidCannonExplosion>()))));
// 25% resist to Corinth Prime's grenades.
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<CorinthPrimeAirburst>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<CorinthPrimeAirburst>()))));
// 20% resist to Valediction's typhoons; will catch Nuclear Fury as well but that doesn't matter.
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NuclearFuryProjectile>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NuclearFuryProjectile>()))));
// 15% vulnerability to Time Bolt stealth strikes.
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new StealthStrikeBalancingRule(1.15f, ProjectileType<TimeBoltKnife>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new StealthStrikeBalancingRule(1.15f, ProjectileType<TimeBoltKnife>()))));
#endregion The Devourer of Gods
#region Yharon
@@ -370,32 +315,29 @@ namespace CalamityMod.Balancing
#endregion
#region Exo Mechs: Ares
// 35% resist to Devil's Devastation's slash.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<DevilsDevastationHoldout>()))));
// 30% resist to Dynamic Pursuer.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
// 25% resist to Aetherflux Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PhasedGodRay>()))));
// 25% resist to Prismatic Breaker's deathray.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PrismaticRay>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PhasedGodRay>()))));
// 20% resist to the Spin Throw part of the Ark of the Cosmos' combo.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, AotCThrowCombo))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, AotCThrowCombo))));
// 20% resist to Dragon Rage projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, DragonRageFilter))));
// 20% resist to Eclipse's Fall.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<EclipsesSmol>(), ProjectileType<EclipsesFallMain>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, DragonRageFilter))));
// 20% resist to Rancor.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<RancorLaserbeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<RancorLaserbeam>()))));
// 20% resist to Yharim's Crystal.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<YharimsCrystalBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<YharimsCrystalBeam>()))));
// 20% resist to Zenith.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FinalFractal))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FinalFractal))));
#endregion
#region Exo Mechs: Artemis and Apollo
@@ -407,97 +349,70 @@ namespace CalamityMod.Balancing
#region Exo Mechs: Thanatos
// 65% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(ResistTrueMelee(0.35f))));
// 65% resist to The Enforcer's projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<EssenceFlame2>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(ResistTrueMelee(0.35f))));
// 65% resist to The Final Dawn's lunge.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<FinalDawnThrow2>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<FinalDawnThrow2>()))));
// 65% resist to Stellar Torus Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<StellarTorusBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<StellarTorusBeam>()))));
// 60% resist to Dynamic Pursuer.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
// 50% resist to Chicken Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ChickenExplosion>()))));
// 50% resist to Omicron's beam.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<OmicronBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ChickenExplosion>()))));
// 50% resist to Rancor.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<RancorLaserbeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<RancorLaserbeam>()))));
// 50% resist to Vehemence's skulls.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<VehemenceSkull>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<VehemenceSkull>()))));
// 50% resist to Yharim's Crystal.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<YharimsCrystalBeam>()))));
// 45% resist to Prismatic Breaker's deathray.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<PrismaticRay>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<YharimsCrystalBeam>()))));
// 45% resist to Wrathwing's stealth strike fireballs.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<WrathwingCinder>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<WrathwingCinder>()))));
// 30% resist to Eclipse's Fall.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<EclipsesFallMain>()))));
// 40% resist to Omicron's beam.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<OmicronBeam>()))));
// 30% resist to Sirius.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<SiriusExplosion>()))));
// 30% resist to Ultima's rays.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<UltimaRay>()))));
// 35% resist to Prismatic Breaker's deathray.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<PrismaticRay>()))));
// 30% resist to Dragon Scales and The Wand's tornadoes.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<InfernadoFriendly>(), ProjectileType<DragonScalesInfernado>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<InfernadoFriendly>(), ProjectileType<DragonScalesInfernado>()))));
// 25% resist to the Spin Throw part of the Ark of the Cosmos' combo.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, AotCThrowCombo))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, AotCThrowCombo))));
// 25% resist to Dragon Rage projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, DragonRageFilter))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, DragonRageFilter))));
// 25% resist to Gael's Greatsword's big skulls.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, BigGaelsSkullFilter))));
// 25% resist to Mirror of Kalandra's Paradoxica minion.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Paradoxica>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, BigGaelsSkullFilter))));
// 25% resist to Zenith.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.FinalFractal))));
// 20% resist to The Anomaly's Nanogun's bomb explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AnomalysNanogunMPFBBoom>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.FinalFractal))));
// 20% resist to Ariane's aura (Lilies of Finality).
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<LiliesOfFinalityAoE>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<LiliesOfFinalityAoE>()))));
// 20% resist to Eradicator's beams.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NebulaShot>()))));
// 20% resist to Plasma Grenade and Dynamic Pursuer's explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<PlasmaGrenadeProjectile>(), ProjectileType<PlasmaGrenadeSmallExplosion>(), ProjectileType<MassivePlasmaExplosion>()))));
// 20% resist to Mirror of Kalandra's Paradoxica minion.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<Paradoxica>()))));
// 20% resist to Voltaic Climax / Void Vortex hitscan beams.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<ClimaxBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<ClimaxBeam>()))));
// 15% resist to The Final Dawn's AoE sweep flames.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<FinalDawnFlame>()))));
// 15% resist to Dragon's Breath's beam of fire.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<DragonsBreathBurst>()))));
// 15% resist to God Slayer Slugs.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<GodSlayerSlugProj>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<FinalDawnFlame>()))));
// 15% resist to Gruesome Eminence.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<SpiritCongregation>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<SpiritCongregation>()))));
// 15% resist to Luminite Bullets.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileID.MoonlordBullet))));
// 15% resist to Ultima's rays.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<UltimaRay>()))));
#endregion
#region Supreme Calamitas: Brimstone Hearts
@@ -509,9 +424,6 @@ namespace CalamityMod.Balancing
// 30% resist to Surge Driver's alt click comets.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<BrimstoneHeart>(), new ProjectileResistBalancingRule(0.7f, ProjectileType<PrismComet>())));
// 20% resist to Executioner's Blade stealth strikes.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<BrimstoneHeart>(), new ProjectileResistBalancingRule(0.8f, ProjectileType<ExecutionersBladeStealthProj>())));
#endregion
#region Supreme Calamitas: Soul Seekers
@@ -534,23 +446,12 @@ namespace CalamityMod.Balancing
public override void Unload()
{
UniversalBalancingChanges = null;
NPCSpecificBalancingChanges = null;
}
public static void ApplyFromProjectile(NPC npc, ref NPC.HitModifiers modifiers, Projectile proj)
{
// Apply universal balancing rules.
foreach (IBalancingRule[] balancingRules in UniversalBalancingChanges)
{
foreach (IBalancingRule balancingRule in balancingRules)
{
if (balancingRule.AppliesTo(npc, modifiers, proj))
balancingRule.ApplyBalancingChange(npc, ref modifiers);
}
}
// As well as rules specific to NPCs.
// Apply NPC-specific balancing rules.
foreach (NPCBalancingChange balanceChange in NPCSpecificBalancingChanges)
{
if (npc.type != balanceChange.NPCType)
+26 -41
View File
@@ -21,7 +21,8 @@
internal const float VanillaFrogLegJumpSpeedBoost = 1.6f;
// Altered jump speed boost provided by Amphibian Boots via global item UpdateAccessory
internal static readonly float AmphibianBootsJumpSpeedBoost = 1f;
//doze 23apr2025 - Undid nerf, it's now the same as frog leg. If it's a problem, maybe retier it?
internal static readonly float AmphibianBootsJumpSpeedBoost = 1.6f;
// Altered movement stats provided by Shadow Armor via IL edit
// This item is modified to not stack with Magiluminescence if on the ground. If in the air, it still functions.
@@ -50,6 +51,7 @@
#region Dashes and Dodges
// Dash cooldowns (in frames)
internal const int UniversalDashCooldown = 30;
internal const int UniversalSashDashCooldown = 30;
internal const int UniversalShieldSlamCooldown = 30;
internal const int UniversalShieldBonkCooldown = 30;
internal const int OnShieldBonkCooldown = 30;
@@ -70,8 +72,6 @@
internal static readonly int AmalgamDodgeCooldownMax = 5400;
internal static readonly int MirrorDodgeCooldownMin = 1200;
internal static readonly int MirrorDodgeCooldownMax = 5400;
internal static readonly int DaedalusReflectCooldownMin = 1200;
internal static readonly int DaedalusReflectCooldownMax = 5400;
internal static readonly int EvolutionReflectCooldownMin = 1200;
internal static readonly int EvolutionReflectCooldownMax = 5400;
#endregion
@@ -115,54 +115,22 @@
#endregion
#region Life Steal
// Life steal cap
// Life steal cap (Maximum HP healed per instance of lifesteal)
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;
// Base life steal caps from vanilla (aka, how much life steal the player is allowed before it goes on cooldown)
internal static readonly float LifeStealCap_Classic = 80f;
internal static readonly float LifeStealCap_Expert = 70f;
// 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
// Nerfs the life steal recovery rate in Classic from 0.6 to 0.2 (36 HP/s to 12 HP/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
// Nerfs the life steal recovery rate in Expert from 0.5 to 0.15 (30 HP/s to 9 HP/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
@@ -241,6 +209,16 @@
internal static readonly float TrueMeleeRipperReductionFactor = 0.5f; // True melee benefits less from rippers to prevent excessive melting.
#endregion
#region Pierce Resistance
// Both of the below variables only apply when an NPC has universal pierce resistance enabled via attribute.
// Projectiles may be marked as exempt from this pierce resistance by using an attribute.
/// <summary> Constant variable used to determine the percentage a projectile's damage is reduced by pierce resist on each hit. </summary>
public const float PierceResistHarshness = 0.12f;
/// <summary> Constant variable used to determine the maximum percentage a projectile's damage can be reduced by pierce resist. </summary>
public const float PierceResistCap = 0.8f;
#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
@@ -252,6 +230,13 @@
internal const int UnreasonableHealthThreshold = 25000000; // 25 million
#endregion
#region Multiplayer Boss Health Scaling Overrides
// These values are used to replace the vanilla 1.35f and 1.9166666666666666f for the 2-player and 3-player cases, respectively.
// Editing them via reflection or otherwise will apply to newly spawned bosses during gameplay.
public static float ExpertHealthScalingOverride_2Players = 1.75f;
public static float ExpertHealthScalingOverride_3Players = 2.25f;
#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.
}
+1 -2
View File
@@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Linq;
using Terraria;
using Terraria.ModLoader;
+2 -2
View File
@@ -1,5 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Placeables.FurnitureAbyss;
using CalamityMod.Items.Placeables.Furniture;
using CalamityMod.Systems;
using CalamityMod.Waters;
using CalamityMod.World;
@@ -48,7 +48,7 @@ namespace CalamityMod.BiomeManagers
// Temporarily use sulphur for now
public override ModWaterStyle WaterStyle => SulphuricDepthsWater.Instance;
public override int BiomeTorchItemType => ModContent.ItemType<AbyssTorch>();
public override int BiomeTorchItemType => ModContent.ItemType<CausticTorch>();
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer1Icon";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
+2 -2
View File
@@ -1,5 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Placeables.FurnitureAbyss;
using CalamityMod.Items.Placeables.Furniture;
using CalamityMod.Systems;
using CalamityMod.Waters;
using CalamityMod.World;
@@ -22,7 +22,7 @@ namespace CalamityMod.BiomeManagers
}
public override ModWaterStyle WaterStyle => UpperAbyssWater.Instance;
public override int BiomeTorchItemType => ModContent.ItemType<AbyssTorch>();
public override int BiomeTorchItemType => ModContent.ItemType<KelpTorch>();
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer2Icon";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
+8 -3
View File
@@ -1,5 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Placeables.FurnitureAbyss;
using CalamityMod.Items.Placeables.Furniture;
using CalamityMod.Systems;
using CalamityMod.Waters;
using CalamityMod.World;
@@ -17,12 +17,17 @@ namespace CalamityMod.BiomeManagers
{
if (CalamityPlayer.areThereAnyDamnBosses)
return Main.curMusic;
return CalamityMod.Instance.GetMusicFromMusicMod("AbyssLayer3") ?? MusicID.Hell;
int? musicSlot = CalamityClientConfig.Instance.AbyssLayer3Alt ?
CalamityMod.Instance.GetMusicFromMusicMod("AbyssLayer3Alt") :
CalamityMod.Instance.GetMusicFromMusicMod("AbyssLayer3");
return musicSlot ?? MusicID.Hell;
}
}
public override ModWaterStyle WaterStyle => MiddleAbyssWater.Instance;
public override int BiomeTorchItemType => ModContent.ItemType<AbyssTorch>();
public override int BiomeTorchItemType => ModContent.ItemType<ThermalTorch>();
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer3Icon";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
+2 -2
View File
@@ -1,5 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Placeables.FurnitureAbyss;
using CalamityMod.Items.Placeables.Furniture;
using CalamityMod.Systems;
using CalamityMod.Waters;
using CalamityMod.World;
@@ -22,7 +22,7 @@ namespace CalamityMod.BiomeManagers
}
public override ModWaterStyle WaterStyle => VoidWater.Instance;
public override int BiomeTorchItemType => ModContent.ItemType<AbyssTorch>();
public override int BiomeTorchItemType => ModContent.ItemType<VoidTorch>();
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer4Icon";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer4";
+25 -1
View File
@@ -1,9 +1,33 @@
using Terraria.ModLoader;
using CalamityMod.Systems;
using CalamityMod.Waters;
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Items.Placeables.Furniture;
namespace CalamityMod.BiomeManagers
{
public class BasaltGullyBiome : ModBiome
{
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
// Placeholder until we get a dedicated Basalt Gully background
public override string BackgroundPath => "Terraria/Images/MapBG3";
public override string MapBackground => "Terraria/Images/MapBG3";
public override bool IsBiomeActive(Player player)
{
bool MoreThanShores = BiomeTileCounterSystem.SunkenSeaBasaltTiles > BiomeTileCounterSystem.SunkenSeaShoresTiles;
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaBasaltTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaBasaltTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaBasaltTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles;
bool MoreThanUnderground = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.UndergroundTiles;
return BiomeTileCounterSystem.SunkenSeaBasaltTiles > 2500 && (MoreThanShores || MoreThanReefs || MoreThanPolyp || MoreThanBurrows);
}
}
}
@@ -1,6 +1,5 @@
//using CalamityMod.Systems;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.BiomeManagers
@@ -7,5 +7,6 @@ namespace CalamityMod.BiomeManagers.BestiaryCategories
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralCaveDesertIcon";
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
}
}
@@ -7,5 +7,6 @@ namespace CalamityMod.BiomeManagers.BestiaryCategories
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralDesertIcon";
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
}
}
@@ -7,5 +7,6 @@ namespace CalamityMod.BiomeManagers.BestiaryCategories
public override string BestiaryIcon => "CalamityMod/BiomeManagers/UndergroundAstralIcon";
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
}
}
+1 -1
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.BiomeManagers
public override bool IsBiomeActive(Player player)
{
return BiomeTileCounterSystem.BrimstoneCragTiles > 100 && player.ZoneUnderworldHeight;
return BiomeTileCounterSystem.BrimstoneCragTiles > 500 && player.ZoneUnderworldHeight;
}
}
}
+31
View File
@@ -0,0 +1,31 @@
using CalamityMod.Items.Placeables.Furniture;
using CalamityMod.Systems;
using CalamityMod.Waters;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.BiomeManagers
{
public class ClamDenBiome : ModBiome
{
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
// 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";
// todo make this condition different than the normal burrows
public override bool IsBiomeActive(Player player)
{
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 1000 && MoreThanReefs && MoreThanPolyp;
}
}
}
-19
View File
@@ -1,19 +0,0 @@
using CalamityMod.Systems;
using CalamityMod.Waters;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.BiomeManagers
{
public class FloralParadiseBiome : ModBiome
{
public override ModWaterStyle WaterStyle => FloralParadiseWater.Instance;
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/FloralParadiseBGStyle");
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
public override bool IsBiomeActive(Player player)
{
return BiomeTileCounterSystem.FloralParadiseTiles >= 300;
}
}
}
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.BiomeManagers
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 1000 && MoreThanReefs && MoreThanPolyp;
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 3000 && MoreThanReefs && MoreThanPolyp;
}
}
}
+1 -1
View File
@@ -24,7 +24,7 @@ namespace CalamityMod.BiomeManagers
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaPolypTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaPolypTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles;
return BiomeTileCounterSystem.SunkenSeaPolypTiles > 1000 && MoreThanReefs && MoreThanBurrows;
return BiomeTileCounterSystem.SunkenSeaPolypTiles > 200 && MoreThanReefs && MoreThanBurrows;
}
}
}
+4 -2
View File
@@ -21,10 +21,12 @@ namespace CalamityMod.BiomeManagers
public override bool IsBiomeActive(Player player)
{
bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles;
bool MoreThanShores = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaShoresTiles;
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles;
bool MoreThanBasalt = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaBasaltTiles;
return BiomeTileCounterSystem.SunkenSeaReefsTiles > 1000 && MoreThanBurrows && MoreThanPolyp;
return ((BiomeTileCounterSystem.SunkenSeaReefsTiles > 2000) && MoreThanBasalt && MoreThanBurrows && MoreThanPolyp && MoreThanShores);
}
}
}
+10 -6
View File
@@ -1,5 +1,4 @@
using System.Security.Policy;
using CalamityMod.CalPlayer;
using CalamityMod.CalPlayer;
using CalamityMod.Events;
using CalamityMod.Items.Placeables.Furniture;
using CalamityMod.Systems;
@@ -64,27 +63,32 @@ namespace CalamityMod.BiomeManagers
public override bool IsBiomeActive(Player player)
{
Point point = player.Center.ToTileCoordinates();
return BiomeTileCounterSystem.SulphurTiles >= 300 || IsInBiomePosition(point) && !player.Calamity().ZoneAbyss;
}
public static bool IsInBiomePosition(Point tilePos)
{
bool sulphurPosX = false;
if (Abyss.AtLeftSideOfWorld)
{
if (point.X < 435)
if (tilePos.X < 435)
{
sulphurPosX = true;
}
}
else
{
if (point.X > Main.maxTilesX - 435)
if (tilePos.X > Main.maxTilesX - 435)
{
sulphurPosX = true;
}
}
if (Main.remixWorld)
return (BiomeTileCounterSystem.SulphurTiles >= 300 || (point.Y > SulphurousSea.YStart && point.Y < Main.UnderworldLayer && sulphurPosX && !WeakReferenceSupport.InAnySubworld())) && !player.Calamity().ZoneAbyss;
return tilePos.Y > SulphurousSea.YStart && tilePos.Y < Main.UnderworldLayer && sulphurPosX && !WeakReferenceSupport.InAnySubworld();
return (BiomeTileCounterSystem.SulphurTiles >= 300 || (point.Y < (Main.rockLayer - Main.maxTilesY / 13) && sulphurPosX && !WeakReferenceSupport.InAnySubworld())) && !player.Calamity().ZoneAbyss;
return tilePos.Y < (Main.rockLayer - Main.maxTilesY / 13) && sulphurPosX && !WeakReferenceSupport.InAnySubworld();
}
public override void SpecialVisuals(Player player, bool isActive)
-4
View File
@@ -1,12 +1,8 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Graphics.Light;
using Microsoft.Xna.Framework;
using System;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using CalamityMod.Items.Placeables.Furniture;
using CalamityMod.Systems;
namespace CalamityMod.BiomeManagers
+3 -2
View File
@@ -21,10 +21,11 @@ namespace CalamityMod.BiomeManagers
public override bool IsBiomeActive(Player player)
{
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
bool MoreThanBasalt = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.SunkenSeaBasaltTiles;
bool MoreThanUnderground = BiomeTileCounterSystem.SunkenSeaShoresTiles > BiomeTileCounterSystem.UndergroundTiles;
return BiomeTileCounterSystem.SunkenSeaShoresTiles > 1000 && MoreThanPolyp && MoreThanReefs;
return (BiomeTileCounterSystem.SunkenSeaShoresTiles > 1200) && MoreThanReefs && MoreThanBasalt && MoreThanUnderground;
}
}
}
-1
View File
@@ -1,5 +1,4 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 646 B

+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 B

After

Width:  |  Height:  |  Size: 674 B

+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 651 B

-22
View File
@@ -1,22 +0,0 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class CirrusVodkaBuff : ModBuff
{
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().cirrusVodka = true;
}
}
}
+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 B

After

Width:  |  Height:  |  Size: 736 B

+9 -2
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,12 +12,18 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().evergreenGin = true;
var cplayer = player.Calamity();
cplayer.evergreenGin = true;
cplayer.SicknessDebuffMultiplier += EvergreenGin.DebuffBoost;
cplayer.WaterDebuffMultiplier += EvergreenGin.DebuffBoost;
cplayer.ElectricDebuffMultiplier -= EvergreenGin.DebuffLoss;
cplayer.HeatDebuffMultiplier -= EvergreenGin.DebuffLoss;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 668 B

+7 -2
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,12 +12,16 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().fireball = true;
var cplayer = player.Calamity();
cplayer.fireball = true;
cplayer.HeatDebuffMultiplier += Fireball.DebuffBoost;
cplayer.SicknessDebuffMultiplier -= Fireball.DebuffLoss;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 670 B

+6 -2
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,12 +12,15 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().grapeBeer = true;
var cplayer = player.Calamity();
cplayer.grapeBeer = true;
cplayer.critDamage -= GrapeBeer.CritLoss * 0.01f;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 661 B

After

Width:  |  Height:  |  Size: 640 B

+26
View File
@@ -0,0 +1,26 @@
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class ManhattanBuff : ModBuff
{
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
var cplayer = player.Calamity();
cplayer.ColdDebuffMultiplier += Manhattan.DebuffBoost;
cplayer.WaterDebuffMultiplier -= Manhattan.DebuffLoss;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

+11 -2
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,12 +12,20 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().margarita = true;
var cplayer = player.Calamity();
cplayer.margarita = true;
cplayer.HeatDebuffMultiplier -= Margarita.DebuffLoss;
cplayer.SicknessDebuffMultiplier -= Margarita.DebuffLoss;
cplayer.ColdDebuffMultiplier -= Margarita.DebuffLoss;
cplayer.WaterDebuffMultiplier -= Margarita.DebuffLoss;
cplayer.ElectricDebuffMultiplier -= Margarita.DebuffLoss;
cplayer.TypelessDebuffMultiplier -= Margarita.DebuffLoss;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 B

After

Width:  |  Height:  |  Size: 729 B

+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 702 B

After

Width:  |  Height:  |  Size: 648 B

+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 812 B

After

Width:  |  Height:  |  Size: 743 B

+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 691 B

After

Width:  |  Height:  |  Size: 649 B

+23
View File
@@ -0,0 +1,23 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class PurpleHazeBuff : ModBuff
{
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().purpleHaze = true;
}
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 500 B

+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 664 B

After

Width:  |  Height:  |  Size: 688 B

+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 739 B

After

Width:  |  Height:  |  Size: 720 B

+7 -1
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,12 +12,17 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().screwdriver = true;
player.blockRange += 5;
player.tileSpeed += 1;
player.wallSpeed += 1;
player.GetDamage(DamageClass.Generic) *= 0.75f;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 687 B

After

Width:  |  Height:  |  Size: 656 B

+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 B

After

Width:  |  Height:  |  Size: 716 B

+7 -2
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,12 +12,16 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().tequila = true;
var cplayer = player.Calamity();
cplayer.tequila = true;
cplayer.ElectricDebuffMultiplier += Tequila.DebuffBoost;
cplayer.ColdDebuffMultiplier -= Tequila.DebuffLoss;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 686 B

After

Width:  |  Height:  |  Size: 670 B

+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 741 B

After

Width:  |  Height:  |  Size: 700 B

+1 -5
View File
@@ -1,14 +1,10 @@
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.Localization;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Alcohol
{
public class Trippy : ModBuff
{
public override LocalizedText Description => base.Description.WithFormatArgs(OddMushroom.DamageBoost.ToPercent());
public override void SetStaticDefaults()
{
Main.debuff[Type] = false;
+11 -2
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.Items.Potions.Alcohol;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,12 +12,20 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().vodka = true;
var cplayer = player.Calamity();
cplayer.vodka = true;
cplayer.TypelessDebuffMultiplier += Vodka.DebuffBoost;
cplayer.HeatDebuffMultiplier -= Vodka.DebuffLoss;
cplayer.ColdDebuffMultiplier -= Vodka.DebuffLoss;
cplayer.SicknessDebuffMultiplier -= Vodka.DebuffLoss;
cplayer.WaterDebuffMultiplier -= Vodka.DebuffLoss;
cplayer.ElectricDebuffMultiplier -= Vodka.DebuffLoss;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 B

After

Width:  |  Height:  |  Size: 706 B

+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 752 B

+1
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Buffs.Alcohol
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.persistentBuff[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 B

After

Width:  |  Height:  |  Size: 698 B

+65 -46
View File
@@ -14,14 +14,28 @@ namespace CalamityMod.Buffs
public override void Update(int type, Player player, ref int buffIndex)
{
// Globally remove summon tag buff stacking
// Other mods need to add to this list because we genuinely don't have any way to tell this
if (CalamityBuffSets.IsSummonTagBuff[type] && buffIndex > 0)
{
for (int i = buffIndex; i >= 0; i--)
{
if (player.buffTime[i] > 0)
{
int buffID = player.buffType[i];
if (CalamityBuffSets.IsSummonTagBuff[buffID] && buffID != type)
{
player.DelBuff(i);
break;
}
}
}
}
if (type == BuffID.Archery)
{
player.arrowDamage *= 0.955f;
}
else if (type == BuffID.Ironskin)
{
player.statDefense += CalamityUtils.GetScalingDefense(-1) - 8;
}
else if (type == BuffID.MagicPower)
{
player.GetDamage<MagicDamageClass>() -= 0.1f;
@@ -31,10 +45,6 @@ namespace CalamityMod.Buffs
player.GetDamage<MagicDamageClass>() -= 0.02f;
player.GetCritChance<MagicDamageClass>() -= 2;
}
else if (type == BuffID.Panic)
{
player.moveSpeed -= 0.6f;
}
else if (type == BuffID.SugarRush)
{
player.moveSpeed -= 0.1f;
@@ -52,7 +62,8 @@ namespace CalamityMod.Buffs
{
player.statDefense += 4;
player.GetCritChance<MeleeDamageClass>() -= 2;
player.GetAttackSpeed<MeleeDamageClass>() -= 0.1f;
player.GetAttackSpeed<MeleeDamageClass>() -= 0.2f;
player.GetDamage<MeleeDamageClass>() -= 0.1f;
}
else if (type == BuffID.WellFed)
{
@@ -79,9 +90,13 @@ namespace CalamityMod.Buffs
{
player.Calamity().shine = true;
}
else if (type == BuffID.IceBarrier)
// Star in a Bottle provides Mana Regeneration Potion effect and cancels out the usual effect if you don't have it
else if (type == BuffID.StarInBottle && !player.manaRegenBuff)
{
player.endurance -= 0.1f;
player.manaRegenBuff = true;
player.manaRegenDelayBonus -= 0.5f;
player.manaRegenBonus -= 10;
}
// Beetle Shell DR is a full compensation, as the vanilla multiplicative DR is removed entirely.
@@ -101,6 +116,19 @@ namespace CalamityMod.Buffs
else if (type == BuffID.Rabies)
{
player.GetDamage<GenericDamageClass>() -= 0.2f;
// Reimplementation of random debuff infliction; now occurs on a consistent timer and with a different debuff list
if (player.buffTime[buffIndex] % 600 == 300)
{
int debuffType = Main.rand.Next(4) switch
{
0 => BuffID.Weak,
1 => BuffID.Bleeding,
2 => BuffID.Darkness,
_ => BuffID.BrokenArmor,
};
player.AddBuff(debuffType, Main.rand.Next(90, 211));
}
}
else if (type == BuffID.Werewolf)
{
@@ -110,30 +138,33 @@ namespace CalamityMod.Buffs
public override void Update(int type, NPC npc, ref int buffIndex)
{
// Globally remove summon tag debuff stacking, unless allowed in the SummonTag
// Other mods need to add to this list because otherwise we can't tell which IsATag buff is actually for whips
if (CalamityBuffSets.SummonTagDebuff.TryGetValue(type, out var tag1) && !tag1.AllowsWhipStacking && buffIndex > 0)
{
for (int i = buffIndex; i >= 0; i--)
{
if (npc.buffTime[i] > 0)
{
int buffID = npc.buffType[i];
if (CalamityBuffSets.SummonTagDebuff.TryGetValue(buffID, out var tag2) && !tag2.AllowsWhipStacking && buffID != type)
{
npc.DelBuff(i);
break;
}
}
}
}
if (type == BuffID.Webbed)
{
if (npc.Calamity().webbed < npc.buffTime[buffIndex])
npc.Calamity().webbed = npc.buffTime[buffIndex];
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().webbed;
npc.DelBuff(buffIndex);
buffIndex--;
}
else if (type == BuffID.Slow)
{
if (npc.Calamity().slowed < npc.buffTime[buffIndex])
npc.Calamity().slowed = npc.buffTime[buffIndex];
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().slowed;
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().webbed = true;
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
}
if (type == BuffID.Electrified)
{
if (npc.Calamity().electrified < npc.buffTime[buffIndex])
npc.Calamity().electrified = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().electrified = true;
}
}
@@ -174,18 +205,6 @@ namespace CalamityMod.Buffs
tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.ChaosState");
break;
case BuffID.IceBarrier:
tip = tip.Replace("25", "15");
break;
case BuffID.Ironskin:
tip = tip.Replace("8", CalamityUtils.GetScalingDefense(-1).ToString());
break;
case BuffID.LeafCrystal:
tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.LeafCrystal");
break;
case BuffID.MagicPower:
tip = tip.Replace("20", "10");
break;
@@ -219,6 +238,10 @@ namespace CalamityMod.Buffs
tip = tip.Replace("45", "22.5");
break;
case BuffID.Rabies:
tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.Rabies");
break;
case BuffID.SugarRush:
tip = tip.Replace("20", "10");
break;
@@ -227,10 +250,6 @@ namespace CalamityMod.Buffs
tip = tip.Replace("25", "15");
break;
case BuffID.Warmth:
tip += "\n" + CalamityUtils.GetTextValue("Vanilla.BuffDescription.WarmthExtra");
break;
case BuffID.WeaponImbueConfetti:
tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.WeaponImbueConfetti");
break;
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class AstralInfectionDebuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 75,
SicknessDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().astralInfection < npc.buffTime[buffIndex])
npc.Calamity().astralInfection = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().astralInfection = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+13 -9
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class AuricRebuke : ModBuff
{
public static DebuffData debuffData = new DebuffData(DebuffData.DebuffBehavior.Electric)
{
EnemyLostRegen = 200,
ElectricDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().auricRebuke < npc.buffTime[buffIndex])
npc.Calamity().auricRebuke = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().auricRebuke = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
@@ -47,12 +51,12 @@ namespace CalamityMod.Buffs.DamageOverTime
GeneralParticleHandler.SpawnParticle(spark);
}
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, 278, new Vector2(1.5f, 1.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), 0, default, Main.rand.NextFloat(0.1f, 0.6f));
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, DustID.FireworksRGB, new Vector2(1.5f, 1.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), 0, default, Main.rand.NextFloat(0.1f, 0.6f));
dust.color = Color.Lerp(Color.Cyan, Color.Lavender, Main.rand.NextFloat(0, 0.6f));
if (Main.rand.NextBool(6))
{
Dust dust2 = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, 278, new Vector2(4.5f, 4.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), 0, default, Main.rand.NextFloat(0.8f, 0.95f));
Dust dust2 = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, DustID.FireworksRGB, new Vector2(4.5f, 4.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), 0, default, Main.rand.NextFloat(0.8f, 0.95f));
dust2.color = Main.rand.NextBool(4) ? Color.Lavender : Color.Cyan;
}
}
@@ -73,12 +77,12 @@ namespace CalamityMod.Buffs.DamageOverTime
if (Main.rand.NextBool())
{
Dust dust = Dust.NewDustPerfect(npcSize, 278, new Vector2(1.5f, 1.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), 0, default, Main.rand.NextFloat(0.1f, 0.6f));
Dust dust = Dust.NewDustPerfect(npcSize, DustID.FireworksRGB, new Vector2(1.5f, 1.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), 0, default, Main.rand.NextFloat(0.1f, 0.6f));
dust.color = Color.Lerp(Color.Cyan, Color.Lavender, Main.rand.NextFloat(0, 0.6f));
}
if (Main.rand.NextBool(10))
{
Dust dust2 = Dust.NewDustPerfect(npcSize, 278, new Vector2(4.5f, 4.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), 0, default, Main.rand.NextFloat(0.8f, 0.95f));
Dust dust2 = Dust.NewDustPerfect(npcSize, DustID.FireworksRGB, new Vector2(4.5f, 4.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.7f), 0, default, Main.rand.NextFloat(0.8f, 0.95f));
dust2.color = Main.rand.NextBool(4) ? Color.Lavender : Color.Cyan;
}
}
+15 -5
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -6,12 +7,24 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class BanishingFire : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 4000, //This is the minimum DoT. Banishing Fire scales with max HP
HeatDebuffScaling = 1, //Unused in the method, but kept so other things can know this is a heat debuff
NPCLifeRegenMethod = BanishingFireNPCLifeRegen
};
public static void BanishingFireNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
int baseBanishingFireDoTValue = (int)npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo((npc.lifeMax >= 1000000 ? npc.lifeMax / 500 : debuffData.EnemyLostRegen));
npc.Calamity().ApplyDPSDebuff(baseBanishingFireDoTValue, baseBanishingFireDoTValue / 5, ref npc.lifeRegen, ref damage);
}
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -21,10 +34,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().banishingFire < npc.buffTime[buffIndex])
npc.Calamity().banishingFire = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().banishingFire = true;
}
}
}
+9 -6
View File
@@ -1,4 +1,4 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +9,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class BrainRot : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 40,
SicknessDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +30,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().brainRot < npc.buffTime[buffIndex])
npc.Calamity().brainRot = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().brainRot = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
@@ -45,7 +48,7 @@ namespace CalamityMod.Buffs.DamageOverTime
}
if (Main.rand.NextBool(4))
{
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, 18);
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, DustID.CorruptGibs);
dust.noGravity = true;
dust.velocity = Vector2.Zero;
dust.alpha = 90;
+10 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Dusts;
using CalamityMod.DataStructures;
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class BrimstoneFlames : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 60,
HeatDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().bFlames = true;
player.Calamity().brimstoneFlames = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().bFlames < npc.buffTime[buffIndex])
npc.Calamity().bFlames = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().brimstoneFlames = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
+11 -7
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class BurningBlood : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 40,
SicknessDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().bBlood = true;
player.Calamity().burningBlood = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().bBlood < npc.buffTime[buffIndex])
npc.Calamity().bBlood = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().burningBlood = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
@@ -54,7 +58,7 @@ namespace CalamityMod.Buffs.DamageOverTime
{
float rot = MathHelper.ToRadians(i * 280);
Vector2 offset = new Vector2(0.1f, 0).RotatedBy(rot * Main.rand.NextFloat(0.08f, 0.05f));
Dust dust2 = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot + offset, 5);
Dust dust2 = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot + offset, DustID.Blood);
dust2.scale = Main.rand.NextFloat(0.6f, 0.7f);
}
}
+10 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class CrushDepth : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 100,
WaterDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().cDepth = true;
player.Calamity().crushDepth = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().cDepth < npc.buffTime[buffIndex])
npc.Calamity().cDepth = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().crushDepth = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+6 -4
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.Localization;
@@ -16,6 +17,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = DebuffData.Daybroken;
}
public override void Update(Player player, ref int buffIndex)
@@ -23,13 +25,13 @@ namespace CalamityMod.Buffs.DamageOverTime
player.Calamity().daybroken = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo, bool reducedEffects)
internal static void DrawEffects(PlayerDrawSet drawInfo)
{
Player Player = drawInfo.drawPlayer;
if (Main.rand.Next(reducedEffects ? 8 : 4) < 3)
if (Main.rand.Next(4) < 3)
{
Dust solarDust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.OrangeTorch, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, reducedEffects ? 175 : 100, default, reducedEffects ? 2f : 3f);
Dust solarDust = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.OrangeTorch, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 3f);
solarDust.noGravity = true;
solarDust.velocity *= 2.8f;
solarDust.velocity.Y -= 0.5f;
+16 -6
View File
@@ -1,7 +1,7 @@
using System;
using CalamityMod.DataStructures;
using CalamityMod.Dusts;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -12,12 +12,25 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class DemonicFlames : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 60, //Unused in the method, this is the amount of DoT from Forbidden Oathblade demon flames
HeatDebuffScaling = 1, //Unused in the method, but kept so other things can know this is a heat debuff
NPCLifeRegenMethod = DemonFlamesNPCLifeRegen
};
public static void DemonFlamesNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
int baseDemonicFlamesDoTValue = (int)Math.Max(npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo(npc.Calamity().demonicFlamesBonusDamage), npc.Calamity().demonicFlamesBonusDamage);
npc.Calamity().ApplyDPSDebuff(baseDemonicFlamesDoTValue, baseDemonicFlamesDoTValue / 15, ref npc.lifeRegen, ref damage);
}
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -27,10 +40,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().demonicFlames < npc.buffTime[buffIndex])
npc.Calamity().demonicFlames = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().demonicFlames = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
@@ -68,7 +78,7 @@ namespace CalamityMod.Buffs.DamageOverTime
for (int i = 0; i < 2; i++)
{
Vector2 sparkVel = new Vector2(Main.rand.NextFloat(-npc.width / 6, npc.width / 6), Main.rand.NextFloat(-npc.height / 20, -npc.height / 17));
Particle sparks = new VelChangingSpark(npc.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), npc.height / 2) + sparkVel * 0.5f, sparkVel + npc.velocity, new Vector2(-sparkVel.X * 0.5f, sparkVel.Y * 2) * 3.5f, "CalamityMod/Particles/SmallBloom", Main.rand.Next(13, 20 + 1), Main.rand.NextFloat(0.1f, 0.25f) * MathHelper.Lerp(Math.Max(npc.height, npc.width) / 120, 0.5f, 0.7f), (Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet) * 0.75f, new Vector2(0.7f, 1), true, false, 0, false, 0.3f, 0.055f);
Particle sparks = new VelChangingSpark(npc.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), npc.height / 2) + sparkVel * 0.5f, sparkVel + npc.velocity, new Vector2(-sparkVel.X * 0.5f, sparkVel.Y * 2) * 3.5f, "CalamityMod/Particles/SmallBloom", Main.rand.Next(13, 20 + 1), Main.rand.NextFloat(0.1f, 0.25f) * MathHelper.Lerp(Math.Max(npc.height, npc.width) / 120, 0.5f, 0.7f), (Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet) * 0.75f, new Vector2(0.7f, 1), true, false, 0, false, 0.3f, 0.055f);
GeneralParticleHandler.SpawnParticle(sparks);
}
}
+9 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class Dragonfire : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 960,
HeatDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().dragonFire < npc.buffTime[buffIndex])
npc.Calamity().dragonFire = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().dragonFire = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+7 -5
View File
@@ -1,4 +1,4 @@
using CalamityMod.Dusts;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
@@ -10,12 +10,17 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class ElementalMix : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 400
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -25,10 +30,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().elementalMix < npc.buffTime[buffIndex])
npc.Calamity().elementalMix = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().elementalMix = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+10 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class GodSlayerInferno : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 500,
HeatDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().gsInferno = true;
player.Calamity().godSlayerInferno = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().gsInferno < npc.buffTime[buffIndex])
npc.Calamity().gsInferno = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().godSlayerInferno = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+10 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class HadopelagicPressure : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 400,
WaterDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().hPressure = true;
player.Calamity().hadopelagicPressure = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().hPressure < npc.buffTime[buffIndex])
npc.Calamity().hPressure = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().hadopelagicPressure = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+10 -8
View File
@@ -1,6 +1,6 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -10,12 +10,17 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class HeavyBleeding : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 80
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -25,10 +30,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().heavybleeding < npc.buffTime[buffIndex])
npc.Calamity().heavybleeding = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().heavyBleeding = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
{
@@ -38,7 +40,7 @@ namespace CalamityMod.Buffs.DamageOverTime
if (Main.rand.NextBool(3))
{
Vector2 randVel = new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 1f);
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, 5, randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.6f, 0.9f));
Dust dust = Dust.NewDustPerfect(modPlayer.RandomDebuffVisualSpot, DustID.Blood, randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.6f, 0.9f));
dust.noGravity = false;
Particle spark = new AltSparkParticle(modPlayer.RandomDebuffVisualSpot, randVel + new Vector2(0, -4), true, 12, Main.rand.NextFloat(0.25f, 0.6f), Color.DarkRed * 0.5f);
GeneralParticleHandler.SpawnParticle(spark);
@@ -61,7 +63,7 @@ namespace CalamityMod.Buffs.DamageOverTime
}
else
{
Dust dust = Dust.NewDustPerfect(npcSize, 5, randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.2f, 0.6f));
Dust dust = Dust.NewDustPerfect(npcSize, DustID.Blood, randVel * Main.rand.NextFloat(0.1f, 0.8f), 100, default, Main.rand.NextFloat(0.2f, 0.6f));
dust.noGravity = false;
}
if (Main.rand.NextBool(8))
Loaded 100 of 7879 files, more files were not shown because too many files have changed in this diff. Show more