Merge branch '1.4.4' into Forbidden-Tome-Line
No files matched your search
@@ -1,22 +1,23 @@
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralDesertSurfaceBGStyle : ModSurfaceBackgroundStyle
|
||||
{
|
||||
public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
|
||||
public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
|
||||
{
|
||||
b -= 75f;
|
||||
return BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
}
|
||||
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
readonly int CloseBGYOffset = 475;
|
||||
readonly int MiddleBGYOffset = 475;
|
||||
|
||||
public override void ModifyFarFades(float[] fades, float transitionSpeed)
|
||||
{
|
||||
// This just fades in the background and fades out other backgrounds.
|
||||
for (int i = 0; i < fades.Length; i++)
|
||||
{
|
||||
if (i == Slot)
|
||||
@@ -33,5 +34,90 @@ namespace CalamityMod.Backgrounds
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceHorizon");
|
||||
|
||||
public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralDesertSurfaceFar");
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Skies/AstralDesertSurfaceMiddle");
|
||||
|
||||
public override bool PreDrawCloseBackground(SpriteBatch spriteBatch)
|
||||
{
|
||||
//Please see AstralSurfaceBGStyle for comments, code is pretty much identical here
|
||||
float screenOff = (float)screenOffField.GetValue(Main.instance);
|
||||
float scAdj = (float)scAdjField.GetValue(Main.instance);
|
||||
Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null);
|
||||
Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A);
|
||||
bool canBGDraw = false;
|
||||
if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
|
||||
canBGDraw = true;
|
||||
if (Main.mapFullscreen)
|
||||
canBGDraw = false;
|
||||
int offset = 30;
|
||||
if (Main.gameMenu)
|
||||
offset = 0;
|
||||
if (WorldGen.drunkWorldGen)
|
||||
offset = -180;
|
||||
float surfacePosition = (float)Main.worldSurface;
|
||||
if (surfacePosition == 0f)
|
||||
surfacePosition = 1f;
|
||||
float screenPosition = Main.screenPosition.Y + (float)(Main.screenHeight / 2) - 600f;
|
||||
double backgroundTopMagicNumber = (0f - screenPosition + screenOff / 2f) / (surfacePosition * 16f);
|
||||
float bgGlobalScaleMultiplier = 2f;
|
||||
int pushBGTopHack;
|
||||
int offset2 = -180;
|
||||
int menuOffset = 0;
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
menuOffset -= offset2;
|
||||
}
|
||||
pushBGTopHack = menuOffset;
|
||||
pushBGTopHack += offset;
|
||||
pushBGTopHack += offset2;
|
||||
if (canBGDraw)
|
||||
{
|
||||
var bgScale = 1.25f;
|
||||
var bgParallax = 0.4;
|
||||
var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
var bgWidthScaled = (int)((float)CalamityMod.AstralDesertSurfaceMiddle.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax);
|
||||
var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
bgTopY = 320 + pushBGTopHack;
|
||||
|
||||
var bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralDesertSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralDesertSurfaceMiddle.Width, CalamityMod.AstralDesertSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
bgScale = 1.31f;
|
||||
bgParallax = 0.43;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)((float)CalamityMod.AstralDesertSurfaceClose.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
bgTopY = 400 + pushBGTopHack;
|
||||
bgStartX -= 80;
|
||||
}
|
||||
|
||||
bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralDesertSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralDesertSurfaceClose.Width, CalamityMod.AstralDesertSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 23 KiB |
@@ -1,18 +1,25 @@
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.GameContent.UI.States;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralSnowSurfaceBGStyle : ModSurfaceBackgroundStyle
|
||||
{
|
||||
public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
|
||||
public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
readonly int FrontBGYOffset = 275;
|
||||
readonly int CloseBGYOffset = 175;
|
||||
readonly int MiddleBGYOffset = 475;
|
||||
|
||||
public override void ModifyFarFades(float[] fades, float transitionSpeed)
|
||||
{
|
||||
// This just fades in the background and fades out other backgrounds.
|
||||
for (int i = 0; i < fades.Length; i++)
|
||||
{
|
||||
if (i == Slot)
|
||||
@@ -29,5 +36,113 @@ namespace CalamityMod.Backgrounds
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceHorizon");
|
||||
|
||||
public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceFar");
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Skies/AstralSnowSurfaceMiddle");
|
||||
|
||||
public override bool PreDrawCloseBackground(SpriteBatch spriteBatch)
|
||||
{
|
||||
//Please see AstralSurfaceBGStyle for comments, code is pretty much identical here
|
||||
float screenOff = (float)screenOffField.GetValue(Main.instance);
|
||||
float scAdj = (float)scAdjField.GetValue(Main.instance);
|
||||
Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null);
|
||||
Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A);
|
||||
bool canBGDraw = false;
|
||||
if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
|
||||
canBGDraw = true;
|
||||
if (Main.mapFullscreen)
|
||||
canBGDraw = false;
|
||||
int offset = 30;
|
||||
if (Main.gameMenu)
|
||||
offset = 0;
|
||||
if (WorldGen.drunkWorldGen)
|
||||
offset = -180;
|
||||
float surfacePosition = (float)Main.worldSurface;
|
||||
if (surfacePosition == 0f)
|
||||
surfacePosition = 1f;
|
||||
float screenPosition = Main.screenPosition.Y + (float)(Main.screenHeight / 2) - 600f;
|
||||
double backgroundTopMagicNumber = (0f - screenPosition + screenOff / 2f) / (surfacePosition * 16f);
|
||||
float bgGlobalScaleMultiplier = 2f;
|
||||
int pushBGTopHack;
|
||||
int offset2 = -180;
|
||||
int menuOffset = 0;
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
menuOffset -= offset2;
|
||||
}
|
||||
pushBGTopHack = menuOffset;
|
||||
pushBGTopHack += offset;
|
||||
pushBGTopHack += offset2;
|
||||
if (canBGDraw)
|
||||
{
|
||||
var bgScale = 1.25f;
|
||||
var bgParallax = 0.4;
|
||||
var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
var bgWidthScaled = (int)((float)CalamityMod.AstralSnowSurfaceMiddle.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax);
|
||||
var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
bgTopY = 320 + pushBGTopHack;
|
||||
|
||||
var bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSnowSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSnowSurfaceMiddle.Width, CalamityMod.AstralSnowSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
bgScale = 1.31f;
|
||||
bgParallax = 0.43;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceClose.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
bgTopY = 400 + pushBGTopHack;
|
||||
bgStartX -= 80;
|
||||
}
|
||||
|
||||
bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceClose.Width, CalamityMod.AstralSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceCloseGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceCloseGlow.Width, CalamityMod.AstralSurfaceCloseGlow.Height), new Color(Color.White.R * 0.7f, Color.White.G * 0.7f, Color.White.B * 0.7f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
bgScale = 1.34f;
|
||||
bgParallax = 0.49;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 2100.0 + 2000.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)(CalamityMod.AstralSurfaceFront.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
bgTopY = 480 + pushBGTopHack;
|
||||
bgStartX -= 120;
|
||||
}
|
||||
|
||||
bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFront, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFront.Width, CalamityMod.AstralSurfaceFront.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFrontGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFrontGlow.Width, CalamityMod.AstralSurfaceFrontGlow.Height), new Color(Color.White.R * 0.9f, Color.White.G * 0.9f, Color.White.B * 0.9f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 8.5 KiB |
@@ -1,22 +1,24 @@
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralSurfaceBGStyle : ModSurfaceBackgroundStyle
|
||||
{
|
||||
public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
|
||||
public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
|
||||
{
|
||||
scale *= 0.75f;
|
||||
return BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
}
|
||||
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
readonly int FrontBGYOffset = 275; //Offsets for the height positioning. Make these 0 for backgrounds that want to be the same as treeline backgrounds (backgrounds that have the front 3 layers as trees)
|
||||
readonly int CloseBGYOffset = 175;
|
||||
readonly int MiddleBGYOffset = 475;
|
||||
|
||||
public override void ModifyFarFades(float[] fades, float transitionSpeed)
|
||||
{
|
||||
// This just fades in the background and fades out other backgrounds.
|
||||
for (int i = 0; i < fades.Length; i++)
|
||||
{
|
||||
if (i == Slot)
|
||||
@@ -33,5 +35,120 @@ namespace CalamityMod.Backgrounds
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceHorizon"); //5th layer (Horizon)
|
||||
|
||||
public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceFar"); //4th layer (Far)
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Skies/AstralSurfaceMiddle"); //Fallback texture, not nessesarily needed since predraw returns false
|
||||
|
||||
public override bool PreDrawCloseBackground(SpriteBatch spriteBatch) //Taken from vanilla to draw the front 3 layers, edited to fit tmod and astral background needs
|
||||
{
|
||||
float screenOff = (float)screenOffField.GetValue(Main.instance);
|
||||
float scAdj = (float)scAdjField.GetValue(Main.instance);
|
||||
Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null);
|
||||
Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A); //Astral Biome Coloration with the alpha as the background fade
|
||||
bool canBGDraw = false;
|
||||
if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
|
||||
canBGDraw = true;
|
||||
if (Main.mapFullscreen)
|
||||
canBGDraw = false;
|
||||
int offset = 30;
|
||||
if (Main.gameMenu)
|
||||
offset = 0;
|
||||
if (WorldGen.drunkWorldGen)
|
||||
offset = -180;
|
||||
float surfacePosition = (float)Main.worldSurface;
|
||||
if (surfacePosition == 0f)
|
||||
surfacePosition = 1f;
|
||||
float screenPosition = Main.screenPosition.Y + (float)(Main.screenHeight / 2) - 600f;
|
||||
double backgroundTopMagicNumber = (0f - screenPosition + screenOff / 2f) / (surfacePosition * 16f);
|
||||
float bgGlobalScaleMultiplier = 2f;
|
||||
int pushBGTopHack;
|
||||
int offset2 = -180;
|
||||
int menuOffset = 0;
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
menuOffset -= offset2;
|
||||
}
|
||||
pushBGTopHack = menuOffset;
|
||||
pushBGTopHack += offset;
|
||||
pushBGTopHack += offset2; //Offsets to the background placement
|
||||
if (canBGDraw) //If the background can draw (player is not in a remix world or is not in a map). This can probably be removed since backgrounds already go through these checks
|
||||
{
|
||||
//3rd layer (Middle)
|
||||
var bgScale = 1.25f; //Scale of the furthest of the closest background layers (3rd layer)
|
||||
var bgParallax = 0.4; //The parallax of the background layer
|
||||
var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack; //the Y position of the background
|
||||
bgScale *= bgGlobalScaleMultiplier; //Scale of the background
|
||||
var bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceMiddle.Width * bgScale); //The Width of the bg texture scaled to the correct size
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax);
|
||||
var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2)); //The starting position of the background layer
|
||||
if (Main.gameMenu)
|
||||
bgTopY = 320 + pushBGTopHack; //increases the height in the main menu
|
||||
|
||||
var bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
//Draw the texture and its glowmask to each loop of the texture
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceMiddle.Width, CalamityMod.AstralSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceMiddleGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceMiddleGlow.Width, CalamityMod.AstralSurfaceMiddleGlow.Height), new Color(Color.White.R * 0.5f, Color.White.G * 0.5f, Color.White.B * 0.5f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
//2nd layer (Close)
|
||||
//Repeat of above with slight changes to variables
|
||||
bgScale = 1.31f;
|
||||
bgParallax = 0.43;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceClose.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
bgTopY = 400 + pushBGTopHack;
|
||||
bgStartX -= 80; //the initial postion of where the background starts in the main menu is pushed back to not be directly ontop, mostly for tree bgs that use the same treeline texture but faded
|
||||
}
|
||||
|
||||
bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceClose.Width, CalamityMod.AstralSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceCloseGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceCloseGlow.Width, CalamityMod.AstralSurfaceCloseGlow.Height), new Color(Color.White.R * 0.7f, Color.White.G * 0.7f, Color.White.B * 0.7f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
//1st layer (Front)
|
||||
//Repeat of above with slight changes to variables
|
||||
bgScale = 1.34f;
|
||||
bgParallax = 0.49;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 2100.0 + 2000.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)(CalamityMod.AstralSurfaceFront.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
bgTopY = 480 + pushBGTopHack;
|
||||
bgStartX -= 120;
|
||||
}
|
||||
|
||||
bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFront, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFront.Width, CalamityMod.AstralSurfaceFront.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFrontGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFrontGlow.Width, CalamityMod.AstralSurfaceFrontGlow.Height), new Color(Color.White.R * 0.9f, Color.White.G * 0.9f, Color.White.B * 0.9f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false; //Stop the drawing of the base close background texture (note: does NOT stop the drawing of the Middle and Far textures because tmodloader is slight stupid :blushing:)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 23 KiB |
@@ -1,37 +0,0 @@
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralSurfaceFogBGStyle : ModSurfaceBackgroundStyle
|
||||
{
|
||||
public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
|
||||
public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
|
||||
{
|
||||
scale *= 0.75f;
|
||||
return BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
}
|
||||
|
||||
public override void ModifyFarFades(float[] fades, float transitionSpeed)
|
||||
{
|
||||
// This just fades in the background and fades out other backgrounds.
|
||||
for (int i = 0; i < fades.Length; i++)
|
||||
{
|
||||
if (i == Slot)
|
||||
{
|
||||
fades[i] += transitionSpeed;
|
||||
if (fades[i] > 1f)
|
||||
fades[i] = 1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
fades[i] -= transitionSpeed;
|
||||
if (fades[i] < 0f)
|
||||
fades[i] = 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
@@ -1,4 +1,5 @@
|
||||
using Terraria.ModLoader;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
@@ -6,8 +7,8 @@ namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public override void FillTextureArray(int[] textureSlots)
|
||||
{
|
||||
for (int i = 0; i <= 3; i++)
|
||||
textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralUG" + i.ToString());
|
||||
for (int i = 0; i <= 4; i++)
|
||||
textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot(i == 4 ? "CalamityMod/Backgrounds/AstralUG" + i.ToString() + "_" + Main.hellBackStyle : "CalamityMod/Backgrounds/AstralUG" + i.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -321,10 +321,6 @@ namespace CalamityMod.Balancing
|
||||
#endregion
|
||||
|
||||
#region Old Duke
|
||||
// 60% resist to The Last Mourning's projectiles.
|
||||
// This will technically catch pumpkins from The Horseman's Blade but that shouldn't really matter.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<OldDuke>(), new ProjectileResistBalancingRule(0.4f, ProjectileType<MourningSkull>(), ProjectileID.FlamingJack)));
|
||||
|
||||
// 20% resist to Time Bolt.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<OldDuke>(), new ProjectileResistBalancingRule(0.8f, ProjectileType<TimeBoltKnife>())));
|
||||
#endregion
|
||||
@@ -414,6 +410,9 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Tarragon Throwing Dart's thorns. (LOL)
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TarraThornRight>()))));
|
||||
|
||||
// 50% resist to Omicron's beam.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<OmicronBeam>()))));
|
||||
|
||||
// 50% resist to Vehemence's skulls.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<VehemenceSkull>()))));
|
||||
|
||||
|
||||
@@ -16,6 +16,17 @@
|
||||
// Altered jump speed boost provided by Shiny Red Balloon via IL edit
|
||||
// This is a const because it replaces a hardcoded value in vanilla
|
||||
internal const float BalloonJumpSpeedBoost = 0.75f;
|
||||
|
||||
// Altered movement stats provided by Shadow Armor via IL edit
|
||||
// This item is modified to not stack with Magiluminescence if on the ground. If in the air, it still functions.
|
||||
internal static readonly float ShadowArmorRunAccelerationMultiplier = 1.25f; // Vanilla and Magi = 1.75f
|
||||
internal static readonly float ShadowArmorMaxRunSpeedMultiplier = 1.05f; // Vanilla and Magi = 1.15f
|
||||
internal static readonly float ShadowArmorAccRunSpeedMultiplier = 1.05f; // Vanilla and Magi = 1.15f
|
||||
internal static readonly float ShadowArmorRunSlowdownMultiplier = 1.5f; // Vanilla and Magi = 1.75f
|
||||
|
||||
// Altered run acceleration multiplier provided by Soaring Insignia via IL edit
|
||||
// This is a const because it replaces a hardcoded value in vanilla
|
||||
internal const float SoaringInsigniaRunAccelerationMultiplier = 1.1f; // Vanilla = 1.75f
|
||||
#endregion
|
||||
|
||||
#region Immunity Frames
|
||||
@@ -218,7 +229,7 @@
|
||||
internal static readonly float AdrenalineDRPerBooster = 0.05f; // +5% per booster
|
||||
|
||||
internal static readonly int AdrenalinePauseAfterDamage = CalamityUtils.SecondsToFrames(1);
|
||||
internal static readonly float MinimumAdrenalineLoss = 0.1f; // No matter how small a hit, you will always lose at least 10% current Adrenaline
|
||||
internal static readonly float MinimumAdrenalineLoss = 0.25f; // No matter how small a hit, you will always lose at least 25% current Adrenaline
|
||||
internal static readonly float AdrenalineFalloffTinyHitHealthRatio = 0.05f; // Hits for 5% max HP or less result in less Adrenaline loss
|
||||
|
||||
internal static readonly float TrueMeleeRipperReductionFactor = 0.5f; // True melee benefits less from rippers to prevent excessive melting.
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class AbovegroundAstralBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AstralWater");
|
||||
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/AstralSurfaceFogBGStyle");
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/AstralUndergroundBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AstralTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbovegroundAstralBiomeIcon";
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950;
|
||||
}
|
||||
|
||||
public override void SpecialVisuals(Player player, bool isActive)
|
||||
{
|
||||
player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class AbovegroundAstralBiomeSurface : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AstralWater");
|
||||
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/AstralSurfaceBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AstralTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && !player.ZoneSnow && !player.ZoneDesert;
|
||||
}
|
||||
|
||||
public override void SpecialVisuals(Player player, bool isActive)
|
||||
{
|
||||
if (SkyManager.Instance["CalamityMod:AstralSurface"] != null && isActive != SkyManager.Instance["CalamityMod:AstralSurface"].IsActive())
|
||||
{
|
||||
if (isActive)
|
||||
{
|
||||
SkyManager.Instance.Activate("CalamityMod:AstralSurface");
|
||||
}
|
||||
else
|
||||
{
|
||||
SkyManager.Instance.Deactivate("CalamityMod:AstralSurface");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.Events;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class AbovegroundAstralDesertBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AstralWater");
|
||||
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/AstralDesertSurfaceBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AstralTorch>();
|
||||
public override SceneEffectPriority Priority => Sandstorm.Happening && !(Main.slimeRain || Main.eclipse) ? SceneEffectPriority.Environment : SceneEffectPriority.BiomeHigh;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralDesertIcon";
|
||||
// Could use its own unique background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && player.ZoneDesert && !player.ZoneSnow;
|
||||
}
|
||||
|
||||
public override void SpecialVisuals(Player player, bool isActive)
|
||||
{
|
||||
if (SkyManager.Instance["CalamityMod:AstralDesert"] != null && isActive != SkyManager.Instance["CalamityMod:AstralDesert"].IsActive())
|
||||
{
|
||||
if (isActive)
|
||||
{
|
||||
SkyManager.Instance.Activate("CalamityMod:AstralDesert");
|
||||
}
|
||||
else
|
||||
{
|
||||
SkyManager.Instance.Deactivate("CalamityMod:AstralDesert");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class AbovegroundAstralSnowBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AstralWater");
|
||||
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/AstralSnowSurfaceBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AstralTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && player.ZoneSnow;
|
||||
}
|
||||
|
||||
public override void SpecialVisuals(Player player, bool isActive)
|
||||
{
|
||||
if (SkyManager.Instance["CalamityMod:AstralSnow"] != null && isActive != SkyManager.Instance["CalamityMod:AstralSnow"].IsActive())
|
||||
{
|
||||
if (isActive)
|
||||
{
|
||||
SkyManager.Instance.Activate("CalamityMod:AstralSnow");
|
||||
}
|
||||
else
|
||||
{
|
||||
SkyManager.Instance.Deactivate("CalamityMod:AstralSnow");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.Events;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class AstralInfectionBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AstralWater");
|
||||
|
||||
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Main.LocalPlayer.ZoneSnow) //Snow
|
||||
{
|
||||
return ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/AstralSnowSurfaceBGStyle");
|
||||
}
|
||||
else if (Main.LocalPlayer.ZoneDesert && !Main.LocalPlayer.ZoneSnow) //Desert
|
||||
{
|
||||
return ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/AstralDesertSurfaceBGStyle");
|
||||
}
|
||||
else //surface
|
||||
{
|
||||
return ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/AstralSurfaceBGStyle");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Main.LocalPlayer.ZoneSnow)
|
||||
{
|
||||
return ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/AstralUndergroundBGStyle"); // Could use its own unique background
|
||||
}
|
||||
return ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/AstralUndergroundBGStyle");
|
||||
}
|
||||
}
|
||||
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<AstralTorch>();
|
||||
|
||||
public override SceneEffectPriority Priority
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Main.LocalPlayer.ZoneDesert && Sandstorm.Happening && !(Main.LocalPlayer.ZoneSnow || Main.slimeRain || Main.eclipse))
|
||||
{
|
||||
return SceneEffectPriority.Environment;
|
||||
}
|
||||
else
|
||||
{
|
||||
return SceneEffectPriority.BiomeHigh;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbovegroundAstralBiomeIcon";
|
||||
|
||||
public override string BackgroundPath
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Main.LocalPlayer.ZoneDesert && !Main.LocalPlayer.ZoneSnow)
|
||||
{
|
||||
//desert
|
||||
return "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; // Could use its own unique background
|
||||
}
|
||||
else if (Main.LocalPlayer.ZoneDirtLayerHeight || Main.LocalPlayer.ZoneRockLayerHeight || Main.LocalPlayer.ZoneUnderworldHeight)
|
||||
{
|
||||
//underground
|
||||
return "CalamityMod/Backgrounds/MapBackgrounds/AstralBG"; // Could use its own unique background
|
||||
}
|
||||
else
|
||||
{
|
||||
return "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
}
|
||||
}
|
||||
}
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
|
||||
public override int Music
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Main.LocalPlayer.ZoneDirtLayerHeight || Main.LocalPlayer.ZoneRockLayerHeight || Main.LocalPlayer.ZoneUnderworldHeight)
|
||||
{
|
||||
return CalamityMod.Instance.GetMusicFromMusicMod("AstralInfectionUnderground") ?? MusicID.Space;
|
||||
}
|
||||
return CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950;
|
||||
}
|
||||
|
||||
public override void SpecialVisuals(Player player, bool isActive)
|
||||
{
|
||||
player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive);
|
||||
if (Main.LocalPlayer.ZoneDirtLayerHeight || Main.LocalPlayer.ZoneRockLayerHeight || Main.LocalPlayer.ZoneUnderworldHeight)
|
||||
{
|
||||
player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive); //underground
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers.BestiaryCategories
|
||||
{
|
||||
public class AstralCaveDesert : ModBiome //Unused, currently
|
||||
{
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralCaveDesertIcon";
|
||||
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers.BestiaryCategories
|
||||
{
|
||||
public class AstralDesert : ModBiome
|
||||
{
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralDesertIcon";
|
||||
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers.BestiaryCategories
|
||||
{
|
||||
public class AstralIce : ModBiome //Unused, currently
|
||||
{
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AstralIceIcon";
|
||||
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers.BestiaryCategories
|
||||
{
|
||||
public class AstralUnderground : ModBiome
|
||||
{
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/UndergroundAstralIcon";
|
||||
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class UndergroundAstralBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AstralWater");
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/AstralUndergroundBGStyle");
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/UndergroundAstralIcon";
|
||||
// Could use its own unique background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
|
||||
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfectionUnderground") ?? MusicID.Space;
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight);
|
||||
}
|
||||
|
||||
public override void SpecialVisuals(Player player, bool isActive)
|
||||
{
|
||||
player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive);
|
||||
}
|
||||
|
||||
// Just slightly above the above-ground astral biomes.
|
||||
public override float GetWeight(Player player) => 0.51f;
|
||||
}
|
||||
}
|
||||
@@ -190,6 +190,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int PHAThammer = 0;
|
||||
public int StellarHammer = 0;
|
||||
public int GalaxyHammer = 0;
|
||||
public int NorfleetCounter = 0;
|
||||
public int hideOfDeusMeleeBoostTimer = 0;
|
||||
public int alcoholPoisonLevel = 0;
|
||||
public int modStealthTimer;
|
||||
@@ -574,10 +575,13 @@ namespace CalamityMod.CalPlayer
|
||||
public bool bloodPactBoost = false;
|
||||
public bool bloodflareCore = false;
|
||||
public int bloodflareCoreRemainingHealOverTime = 0;
|
||||
|
||||
public bool chaliceOfTheBloodGod = false;
|
||||
public double chaliceBleedoutBuffer = 0D;
|
||||
public double chaliceDamagePointPartialProgress = 0D;
|
||||
public int chaliceBleedoutToApplyOnHurt = 0;
|
||||
public int chaliceHitOriginalDamage = 0;
|
||||
|
||||
public bool elementalHeart = false;
|
||||
public bool crownJewel = false;
|
||||
public bool infectedJewel = false;
|
||||
@@ -593,6 +597,8 @@ namespace CalamityMod.CalPlayer
|
||||
public bool anechoicPlating = false;
|
||||
public bool jellyfishNecklace = false;
|
||||
public bool fairyBoots = false;
|
||||
public bool flameWakerBoots = false;
|
||||
public int bootLevel = 0; //Used to prevent Flame Waker and Hellfire Treads stacking
|
||||
public bool hellfireTreads = false;
|
||||
public bool abyssalAmulet = false;
|
||||
public bool lumenousAmulet = false;
|
||||
@@ -1087,10 +1093,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
#region Biome
|
||||
public bool ZoneCalamity => Player.InModBiome(ModContent.GetInstance<BrimstoneCragsBiome>());
|
||||
public bool ZoneAstral => (Player.InModBiome(ModContent.GetInstance<AbovegroundAstralBiome>()) ||
|
||||
Player.InModBiome(ModContent.GetInstance<AbovegroundAstralSnowBiome>()) ||
|
||||
Player.InModBiome(ModContent.GetInstance<AbovegroundAstralDesertBiome>()) ||
|
||||
Player.InModBiome(ModContent.GetInstance<UndergroundAstralBiome>())) && !ZoneAbyss;
|
||||
public bool ZoneAstral => Player.InModBiome(ModContent.GetInstance<BiomeManagers.AstralInfectionBiome>()) && !ZoneAbyss;
|
||||
public bool ZoneSunkenSea => Player.InModBiome(ModContent.GetInstance<SunkenSeaBiome>());
|
||||
public bool ZoneSulphur => Player.InModBiome(ModContent.GetInstance<SulphurousSeaBiome>());
|
||||
public bool ZoneAbyss => ZoneAbyssLayer1 || ZoneAbyssLayer2 || ZoneAbyssLayer3 || ZoneAbyssLayer4;
|
||||
@@ -1722,6 +1725,7 @@ namespace CalamityMod.CalPlayer
|
||||
bloodPact = false;
|
||||
bloodflareCore = false;
|
||||
chaliceOfTheBloodGod = false;
|
||||
chaliceBleedoutToApplyOnHurt = 0; // Resets every frame so it doesn't improperly carry over between hits
|
||||
elementalHeart = false;
|
||||
crownJewel = false;
|
||||
infectedJewel = false;
|
||||
@@ -1816,6 +1820,7 @@ namespace CalamityMod.CalPlayer
|
||||
anechoicPlating = false;
|
||||
jellyfishNecklace = false;
|
||||
fairyBoots = false;
|
||||
flameWakerBoots = false;
|
||||
hellfireTreads = false;
|
||||
abyssalAmulet = false;
|
||||
lumenousAmulet = false;
|
||||
@@ -2148,11 +2153,13 @@ namespace CalamityMod.CalPlayer
|
||||
StellarTorus = false;
|
||||
LiliesOfFinalityBool = false;
|
||||
|
||||
/*
|
||||
disableVoodooSpawns = false;
|
||||
disablePerfCystSpawns = false;
|
||||
disableHiveCystSpawns = false;
|
||||
disableNaturalScourgeSpawns = false;
|
||||
disableAnahitaSpawns = false;
|
||||
*/
|
||||
|
||||
abyssalDivingSuitPrevious = abyssalDivingSuit;
|
||||
abyssalDivingSuit = abyssalDivingSuitHide = abyssalDivingSuitForce = abyssalDivingSuitPower = false;
|
||||
@@ -2975,10 +2982,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
for (int l = 0; l < Main.maxNPCs; l++)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
NPC npc = Main.npc[l];
|
||||
if (npc.active && !npc.friendly && !npc.dontTakeDamage && Vector2.Distance(Player.Center, npc.Center) <= 3000f)
|
||||
if (!npc.friendly && !npc.dontTakeDamage && Vector2.Distance(Player.Center, npc.Center) <= 3000f)
|
||||
npc.AddBuff(ModContent.BuffType<Enraged>(), 600, false);
|
||||
}
|
||||
}
|
||||
@@ -4765,22 +4771,22 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
int spearsFired = 0;
|
||||
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (spearsFired == 2)
|
||||
break;
|
||||
if (Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].friendly)
|
||||
if (p.owner == Player.whoAmI && p.friendly)
|
||||
{
|
||||
bool attack = Main.projectile[i].owner == Player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType<MiniGuardianAttack>();
|
||||
bool attack = p.type == ModContent.ProjectileType<MiniGuardianAttack>();
|
||||
if (attack)
|
||||
{
|
||||
int numSpears = profanedCrystalBuffs ? 12 : 6;
|
||||
int dam = (int)(Main.projectile[i].originalDamage * (profanedCrystalBuffs ? 1f : 0.25f));
|
||||
int dam = (int)(p.originalDamage * (profanedCrystalBuffs ? 1f : 0.25f));
|
||||
|
||||
for (int x = 0; x < numSpears; x++)
|
||||
{
|
||||
float angle = MathHelper.TwoPi / numSpears * x;
|
||||
int proj = Projectile.NewProjectile(source, Main.projectile[i].Center, angle.ToRotationVector2().RotatedBy(Math.Atan(-45f)) * 8f, ModContent.ProjectileType<MiniGuardianSpear>(), dam, 0f, Player.whoAmI, pscState, 0f);
|
||||
int proj = Projectile.NewProjectile(source, p.Center, angle.ToRotationVector2().RotatedBy(Math.Atan(-45f)) * 8f, ModContent.ProjectileType<MiniGuardianSpear>(), dam, 0f, Player.whoAmI, pscState, 0f);
|
||||
Main.projectile[proj].originalDamage = dam;
|
||||
}
|
||||
spearsFired++;
|
||||
@@ -4869,7 +4875,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Set a random delay between 12 and 20 seconds. When this delay hits zero, startup messages display
|
||||
bool plushieMessage = true;
|
||||
if (plushieMessage || (CalamityMod.Instance.musicMod is null && CalamityConfig.Instance.MusicModReminderMessage) || CalamityConfig.Instance.WikiStatusMessage)
|
||||
if (plushieMessage || CalamityConfig.Instance.WikiStatusMessage)
|
||||
{
|
||||
startMessageDisplayDelay = Main.rand.Next(CalamityUtils.SecondsToFrames(12), CalamityUtils.SecondsToFrames(20) + 1);
|
||||
}
|
||||
|
||||
@@ -72,15 +72,13 @@ namespace CalamityMod.CalPlayer
|
||||
if (HasCustomDash && Player.dashDelay < 0)
|
||||
{
|
||||
Rectangle hitArea = new Rectangle((int)(Player.position.X + Player.velocity.X * 0.5 - 4f), (int)(Player.position.Y + Player.velocity.Y * 0.5 - 4), Player.width + 8, Player.height + 8);
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
foreach (NPC n in Main.ActiveNPCs)
|
||||
{
|
||||
NPC n = Main.npc[i];
|
||||
|
||||
// Ignore critters with the Guide to Critter Companionship
|
||||
if (Player.dontHurtCritters && NPCID.Sets.CountsAsCritter[n.type])
|
||||
continue;
|
||||
|
||||
if (n.active && !n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0)
|
||||
if (!n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0)
|
||||
{
|
||||
if (hitArea.Intersects(n.getRect()) && (n.noTileCollide || Player.CanHit(n)))
|
||||
{
|
||||
@@ -543,15 +541,13 @@ namespace CalamityMod.CalPlayer
|
||||
public int DoMountDashDamage(Rectangle myRect, float Damage, float Knockback, int NPCImmuneTime, int PlayerImmuneTime)
|
||||
{
|
||||
int totalHurtNPCs = 0;
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
foreach (NPC n in Main.ActiveNPCs)
|
||||
{
|
||||
NPC n = Main.npc[i];
|
||||
|
||||
// Ignore critters with the Guide to Critter Companionship
|
||||
if (Player.dontHurtCritters && NPCID.Sets.CountsAsCritter[n.type])
|
||||
continue;
|
||||
|
||||
if (n.active && !n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0)
|
||||
if (!n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0)
|
||||
{
|
||||
Rectangle npcHitbox = n.getRect();
|
||||
if (myRect.Intersects(npcHitbox) && (n.noTileCollide || Collision.CanHit(Player.position, Player.width, Player.height, n.position, n.width, n.height)))
|
||||
|
||||
@@ -471,8 +471,14 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
SpriteEffects spriteEffects = Player.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
|
||||
|
||||
int xOffset = 9;
|
||||
// Photoviscerator's tank is extended a bit more out
|
||||
if (thingToDraw == ModContent.Request<Texture2D>("CalamityMod/CalPlayer/DrawLayers/Backpack_Photoviscerator").Value)
|
||||
{
|
||||
xOffset = 16;
|
||||
}
|
||||
DrawData howDoIDrawThings = new DrawData(thingToDraw,
|
||||
new Vector2((int)(drawPlayer.position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (9 * drawPlayer.direction)) - 4f * drawPlayer.direction, (int)(drawPlayer.position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) + 2f * drawPlayer.gravDir - 8f * drawPlayer.gravDir)),
|
||||
new Vector2((int)(drawPlayer.position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (xOffset * drawPlayer.direction)) - 4f * drawPlayer.direction, (int)(drawPlayer.position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) + 2f * drawPlayer.gravDir - 8f * drawPlayer.gravDir + drawPlayer.gfxOffY)),
|
||||
new Rectangle(0, 0, thingToDraw.Width, thingToDraw.Height),
|
||||
drawInfo.colorArmorBody,
|
||||
drawPlayer.bodyRotation,
|
||||
|
||||
@@ -250,10 +250,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (hInferno)
|
||||
{
|
||||
for (int x = 0; x < Main.maxNPCs; x++)
|
||||
foreach (NPC n in Main.ActiveNPCs)
|
||||
{
|
||||
if (Main.npc[x].active && Main.npc[x].type == ModContent.NPCType<Providence>())
|
||||
Main.npc[x].active = false;
|
||||
if (n.type == ModContent.NPCType<Providence>())
|
||||
n.active = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -490,6 +490,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (Main.zenithWorld)
|
||||
SoundEngine.PlaySound(LeonDeathNoiseRE4_ForGFB, Player.Center);
|
||||
|
||||
if (NorfleetCounter >= 3 && NorfleetCounter < 1000)
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Norfleet").Format(Player.name));
|
||||
NorfleetCounter = 0;
|
||||
|
||||
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>()))
|
||||
{
|
||||
if (sCalDeathCount < 51)
|
||||
@@ -1469,15 +1473,13 @@ namespace CalamityMod.CalPlayer
|
||||
// This also strikes the NPCs as a side effect
|
||||
if (gSabatonFalling)
|
||||
{
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
foreach (NPC n in Main.ActiveNPCs)
|
||||
{
|
||||
NPC n = Main.npc[i];
|
||||
|
||||
// Ignore critters with the Guide to Critter Companionship
|
||||
if (Player.dontHurtCritters && NPCID.Sets.CountsAsCritter[n.type])
|
||||
continue;
|
||||
|
||||
if (n.active && !n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0)
|
||||
if (!n.dontTakeDamage && !n.friendly && n.Calamity().dashImmunityTime[Player.whoAmI] <= 0)
|
||||
{
|
||||
Rectangle npcHitbox = n.getRect();
|
||||
if ((Player.getRect()).Intersects(npcHitbox) && (n.noTileCollide || Collision.CanHit(Player.position, Player.width, Player.height, n.position, n.width, n.height)))
|
||||
@@ -1507,7 +1509,12 @@ namespace CalamityMod.CalPlayer
|
||||
// The dodges will only trigger if the player has taken greater than or equal to 5% of their max HP in damage
|
||||
double dodgeDamageGateValuePercent = 0.05;
|
||||
int dodgeDamageGateValue = (int)Math.Round(Player.statLifeMax2 * dodgeDamageGateValuePercent);
|
||||
if (!Player.HasCooldown(GlobalDodge.ID) && info.Damage >= dodgeDamageGateValue)
|
||||
|
||||
// 14MAY2024: Ozzatron: Chalice of the Blood God now works with dodges
|
||||
int actualDamageTaken = chaliceOfTheBloodGod ? chaliceHitOriginalDamage : info.Damage;
|
||||
bool sufficientDamageForDodging = actualDamageTaken >= dodgeDamageGateValue;
|
||||
|
||||
if (!Player.HasCooldown(GlobalDodge.ID) && sufficientDamageForDodging)
|
||||
{
|
||||
double maxCooldownDurationDamagePercent = 0.5;
|
||||
int maxCooldownDurationDamageValue = (int)Math.Round(Player.statLifeMax2 * (maxCooldownDurationDamagePercent - dodgeDamageGateValuePercent));
|
||||
@@ -1516,7 +1523,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (maxCooldownDurationDamageValue <= 0)
|
||||
maxCooldownDurationDamageValue = 1;
|
||||
|
||||
float cooldownDurationScalar = MathHelper.Clamp((info.Damage - dodgeDamageGateValue) / (float)maxCooldownDurationDamageValue, 0f, 1f);
|
||||
float cooldownDurationScalar = MathHelper.Clamp((actualDamageTaken - dodgeDamageGateValue) / (float)maxCooldownDurationDamageValue, 0f, 1f);
|
||||
|
||||
// Re-implementation of vanilla item Black Belt as a consumable dodge
|
||||
if (Player.whoAmI == Main.myPlayer && Player.blackBelt)
|
||||
@@ -1621,7 +1628,7 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(SoundID.NPCHit4, Player.Center); //metal hit noise
|
||||
hurtSoundTimer = 10;
|
||||
}
|
||||
else if ((aquaticHeartPower || aquaticHeartForce) && !aquaticHeartHide)
|
||||
else if (((aquaticHeartPower || aquaticHeartForce) && !aquaticHeartHide) || Player.GetModPlayer<CrystalHeartVodkaPlayer>().vanityEquipped)
|
||||
{
|
||||
modifiers.DisableSound();
|
||||
SoundEngine.PlaySound(SoundID.FemaleHit, Player.Center); //female hit noise
|
||||
@@ -1967,22 +1974,14 @@ namespace CalamityMod.CalPlayer
|
||||
//
|
||||
// Chalice of the Blood God does nothing to a hit that was just fully blocked by shields.
|
||||
// Otherwise, it reduces the damage of any hit to 5, which allows for full iframes.
|
||||
// It then applies the full hit (minus that 5 damage) to its own bleedout buffer.
|
||||
// It then applies the full hit (minus that 5 damage) to its own bleedout buffer in OnHurt (see below).
|
||||
// Hits for less than 5 damage are ignored entirely and allowed to strike the player as normal.
|
||||
if (chaliceOfTheBloodGod && !shieldsFullyAbsorbedHit && info.Damage > ChaliceOfTheBloodGod.MinAllowedDamage)
|
||||
{
|
||||
int bleedoutToApply = info.Damage - ChaliceOfTheBloodGod.MinAllowedDamage;
|
||||
chaliceBleedoutBuffer += bleedoutToApply;
|
||||
chaliceBleedoutToApplyOnHurt = info.Damage - ChaliceOfTheBloodGod.MinAllowedDamage;
|
||||
|
||||
chaliceHitOriginalDamage = info.Damage;
|
||||
info.Damage = ChaliceOfTheBloodGod.MinAllowedDamage;
|
||||
|
||||
// Defense damage is applied here.
|
||||
DealDefenseDamage(info, bleedoutToApply);
|
||||
|
||||
// Display text indicating that damage was transferred to bleedout.
|
||||
string text = $"({-bleedoutToApply})";
|
||||
Rectangle location = new Rectangle((int)Player.position.X + 4, (int)Player.position.Y - 3, Player.width - 4, Player.height - 4);
|
||||
CombatText.NewText(location, ChaliceOfTheBloodGod.BleedoutBufferDamageTextColor, Language.GetTextValue(text), dot: true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -2004,7 +2003,7 @@ namespace CalamityMod.CalPlayer
|
||||
// This function will be ignored if the player is wearing Chalice, as it handles its defense damage elsewhere.
|
||||
bool hitCanApplyDefenseDamage = nextHitDealsDefenseDamage || bloodflareCore;
|
||||
|
||||
if (hitCanApplyDefenseDamage && !chaliceOfTheBloodGod && !hasIFrames && !Player.creativeGodMode)
|
||||
if (hitCanApplyDefenseDamage && !hasIFrames && !Player.creativeGodMode)
|
||||
{
|
||||
double halfDefense = Player.statDefense / 2.0;
|
||||
int netMitigation = hurtInfo.SourceDamage - hurtInfo.Damage;
|
||||
@@ -2035,6 +2034,12 @@ namespace CalamityMod.CalPlayer
|
||||
Dust.CloneDust(d).velocity = dustVel.RotatedBy(MathHelper.Pi * 1.5f);
|
||||
}
|
||||
}
|
||||
|
||||
// Chalice of the Blood God has to compensate for the "mitigation" provided by its bleedout buffer
|
||||
else if (chaliceOfTheBloodGod)
|
||||
DealDefenseDamage(hurtInfo, chaliceBleedoutToApplyOnHurt);
|
||||
|
||||
// Otherwise, just deal regular defense damage.
|
||||
else
|
||||
DealDefenseDamage(hurtInfo);
|
||||
}
|
||||
@@ -2042,6 +2047,24 @@ namespace CalamityMod.CalPlayer
|
||||
nextHitDealsDefenseDamage = false;
|
||||
#endregion
|
||||
|
||||
#region Chalice of the Blood God Bleed Application
|
||||
// This is handled in OnHurt so that Chalice hits can still be dodged based on their appropriate normal damage
|
||||
// Defense damage based on the "total lethality of the hit" is applied immediately prior to this
|
||||
//
|
||||
// 1 - Actually apply bleedout to the player based on the damage they would have taken
|
||||
// 2 - Display an indicator of how much damage was dealt as bleedout instead of regular damage
|
||||
if (chaliceOfTheBloodGod)
|
||||
{
|
||||
int bleedoutToApply = chaliceBleedoutToApplyOnHurt;
|
||||
chaliceBleedoutBuffer += bleedoutToApply;
|
||||
|
||||
// Display text indicating that damage was transferred to bleedout.
|
||||
string text = $"({-bleedoutToApply})";
|
||||
Rectangle location = new Rectangle((int)Player.position.X + 4, (int)Player.position.Y - 3, Player.width - 4, Player.height - 4);
|
||||
CombatText.NewText(location, ChaliceOfTheBloodGod.BleedoutBufferDamageTextColor, Language.GetTextValue(text), dot: true);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Shattered Community Rage Gain
|
||||
// Shattered Community makes the player gain rage based on the amount of damage taken.
|
||||
// Also set the Rage gain cooldown to prevent bizarre abuse cases.
|
||||
@@ -2265,10 +2288,9 @@ namespace CalamityMod.CalPlayer
|
||||
if (fBarrier || (aquaticHeart && NPC.downedBoss3))
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item27, Player.Center);
|
||||
for (int m = 0; m < Main.maxNPCs; m++)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
NPC npc = Main.npc[m];
|
||||
if (!npc.active || npc.friendly || npc.dontTakeDamage)
|
||||
if (npc.friendly || npc.dontTakeDamage)
|
||||
continue;
|
||||
|
||||
float npcDist = (npc.Center - Player.Center).Length();
|
||||
@@ -2292,10 +2314,9 @@ namespace CalamityMod.CalPlayer
|
||||
// and also doesn't have random chance (why does Brain of Confusion not guarantee confusion on hit)
|
||||
if (aBrain || amalgam)
|
||||
{
|
||||
for (int m = 0; m < Main.maxNPCs; m++)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
NPC npc = Main.npc[m];
|
||||
if (!npc.active || npc.friendly || npc.dontTakeDamage)
|
||||
if (npc.friendly || npc.dontTakeDamage)
|
||||
continue;
|
||||
|
||||
float npcDist = (npc.Center - Player.Center).Length();
|
||||
@@ -2330,11 +2351,11 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<DrataliornusBow>()] != 0)
|
||||
{
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach(Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType<DrataliornusBow>() && Main.projectile[i].owner == Player.whoAmI)
|
||||
if (p.type == ModContent.ProjectileType<DrataliornusBow>() && p.owner == Player.whoAmI)
|
||||
{
|
||||
Main.projectile[i].Kill();
|
||||
p.Kill();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2760,9 +2781,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Under typical circumstances, defense damage scales with "net mitigation", aka how much damage the player DIDN'T take.
|
||||
// Thematically, this means it scales with how much damage the player's defense took instead of them.
|
||||
|
||||
CalamityPlayer modPlayer = Player.Calamity();
|
||||
|
||||
// Chalice of the Blood God makes you take much less direct damage than you should, which would catastrophically inflate defense damage.
|
||||
//
|
||||
// Subtract the bleedout applied on this hit from the net mitigation.
|
||||
// This prevents Chalice from making the player take much more defense damage than intended.
|
||||
int netMitigation = hurtInfo.SourceDamage - (hurtInfo.Damage + bleedoutApplied);
|
||||
@@ -2808,6 +2828,10 @@ namespace CalamityMod.CalPlayer
|
||||
// Actually applies defense damage. Cannot be called externally.
|
||||
private void ApplyDefenseDamageInternal(int defenseDamage, bool showVisuals = true)
|
||||
{
|
||||
// If zero defense damage is being dealt, don't waste your time or display a grey 0.
|
||||
if (defenseDamage <= 0)
|
||||
return;
|
||||
|
||||
// Can be dynamically reduced by Adamantite set bonus and maybe other future effects.
|
||||
int defenseDamageTaken = defenseDamage;
|
||||
|
||||
|
||||
@@ -452,10 +452,9 @@ namespace CalamityMod.CalPlayer
|
||||
float enemyDistance = maxProxRageDistance + 1f;
|
||||
float bossDistance = maxProxRageDistance + 1f;
|
||||
|
||||
for (int i = 0; i < Main.maxNPCs; ++i)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
NPC npc = Main.npc[i];
|
||||
if (npc is null || npc.type == NPCID.None || !npc.IsAnEnemy() || !npc.Calamity().ProvidesProximityRage)
|
||||
if (npc.type == NPCID.None || !npc.IsAnEnemy() || !npc.Calamity().ProvidesProximityRage)
|
||||
continue;
|
||||
|
||||
// Take the longer of the two directions for the NPC's hitbox to be generous.
|
||||
@@ -719,10 +718,9 @@ namespace CalamityMod.CalPlayer
|
||||
sigilDamage = Player.ApplyArmorAccDamageBonusesTo(sigilDamage);
|
||||
|
||||
bool brightenedSigil = false;
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
foreach (NPC target in Main.ActiveNPCs)
|
||||
{
|
||||
NPC target = Main.npc[i];
|
||||
if (!target.active || !target.Hitbox.Intersects(sigilHitbox) || target.immortal || target.dontTakeDamage || target.townNPC || NPCID.Sets.ActsLikeTownNPC[target.type] || NPCID.Sets.CountsAsCritter[target.type])
|
||||
if (!target.Hitbox.Intersects(sigilHitbox) || target.immortal || target.dontTakeDamage || target.townNPC || NPCID.Sets.ActsLikeTownNPC[target.type] || NPCID.Sets.CountsAsCritter[target.type])
|
||||
continue;
|
||||
|
||||
// Brighten the sigil because it is dealing damage. This can only happen once per hit event.
|
||||
@@ -734,7 +732,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Create a direct strike to hit this specific NPC.
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<Calamity>()));
|
||||
Projectile sigilStrike = Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), sigilDamage, 0f, Player.whoAmI, i);
|
||||
Projectile sigilStrike = Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), sigilDamage, 0f, Player.whoAmI, target.whoAmI);
|
||||
|
||||
// Enable crits by setting the sigil's damage class to be whatever the player's strongest damage class is.
|
||||
sigilStrike.DamageType = Player.GetBestClass();
|
||||
@@ -863,24 +861,23 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
int bullseyeType = ModContent.ProjectileType<SpiritOriginBullseye>();
|
||||
List<int> alreadyTargetedNPCs = new List<int>();
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (Main.projectile[i].type != bullseyeType || !Main.projectile[i].active || Main.projectile[i].owner != Player.whoAmI)
|
||||
if (p.type != bullseyeType || p.owner != Player.whoAmI)
|
||||
continue;
|
||||
|
||||
alreadyTargetedNPCs.Add((int)Main.projectile[i].ai[0]);
|
||||
alreadyTargetedNPCs.Add((int)p.ai[0]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
foreach (NPC target in Main.ActiveNPCs)
|
||||
{
|
||||
NPC target = Main.npc[i];
|
||||
if (!target.active || target.friendly || target.lifeMax < 5 || alreadyTargetedNPCs.Contains(i) || target.realLife >= 0 ||
|
||||
if (target.friendly || target.lifeMax < 5 || alreadyTargetedNPCs.Contains(target.whoAmI) || target.realLife >= 0 ||
|
||||
target.dontTakeDamage || target.immortal || target.townNPC || NPCID.Sets.ActsLikeTownNPC[target.type] || NPCID.Sets.CountsAsCritter[target.type])
|
||||
continue;
|
||||
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<DaawnlightSpiritOrigin>()));
|
||||
if (Main.myPlayer == Player.whoAmI && Main.npc[i].WithinRange(Player.Center, 2000f))
|
||||
Projectile.NewProjectile(source, Main.npc[i].Center, Vector2.Zero, bullseyeType, 0, 0f, Player.whoAmI, i);
|
||||
if (Main.myPlayer == Player.whoAmI && target.WithinRange(Player.Center, 2000f))
|
||||
Projectile.NewProjectile(source, target.Center, Vector2.Zero, bullseyeType, 0, 0f, Player.whoAmI, target.whoAmI);
|
||||
if (spiritOriginBullseyeShootCountdown <= 0)
|
||||
spiritOriginBullseyeShootCountdown = 45;
|
||||
}
|
||||
@@ -1142,10 +1139,9 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<OmegaBlueTentacle>()] < 6 && Main.myPlayer == Player.whoAmI)
|
||||
{
|
||||
bool[] tentaclesPresent = new bool[6];
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile projectile in Main.ActiveProjectiles)
|
||||
{
|
||||
Projectile projectile = Main.projectile[i];
|
||||
if (projectile.active && projectile.type == ModContent.ProjectileType<OmegaBlueTentacle>() && projectile.owner == Main.myPlayer && projectile.ai[1] >= 0f && projectile.ai[1] < 6f)
|
||||
if (projectile.type == ModContent.ProjectileType<OmegaBlueTentacle>() && projectile.owner == Main.myPlayer && projectile.ai[1] >= 0f && projectile.ai[1] < 6f)
|
||||
tentaclesPresent[(int)projectile.ai[1]] = true;
|
||||
}
|
||||
|
||||
@@ -1250,14 +1246,13 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
float maxDistance = 300f;
|
||||
int target = -1;
|
||||
for (int npcIndex = 0; npcIndex < Main.maxNPCs; npcIndex++)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
NPC npc = Main.npc[npcIndex];
|
||||
float targetDist = Vector2.Distance(npc.Center, Player.Center);
|
||||
if (targetDist < maxDistance && npc.Calamity().arcZapCooldown == 0 && npc.CanBeChasedBy())
|
||||
{
|
||||
maxDistance = targetDist;
|
||||
target = npcIndex;
|
||||
target = npc.whoAmI;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1853,10 +1848,9 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
for (int l = 0; l < Main.maxNPCs; l++)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
NPC npc = Main.npc[l];
|
||||
if (!npc.active || npc.friendly || npc.damage <= 0 || npc.dontTakeDamage)
|
||||
if (npc.friendly || npc.damage <= 0 || npc.dontTakeDamage)
|
||||
continue;
|
||||
|
||||
if (!npc.buffImmune[buffType] && Vector2.Distance(Player.Center, npc.Center) <= freezeDist)
|
||||
@@ -1902,10 +1896,9 @@ namespace CalamityMod.CalPlayer
|
||||
// Ceaseless Hunger Potion buff
|
||||
if (ceaselessHunger)
|
||||
{
|
||||
for (int j = 0; j < Main.maxItems; j++)
|
||||
foreach (Item item in Main.ActiveItems)
|
||||
{
|
||||
Item item = Main.item[j];
|
||||
if (item.active && item.noGrabDelay == 0 && item.playerIndexTheItemIsReservedFor == Player.whoAmI)
|
||||
if (item.noGrabDelay == 0 && item.playerIndexTheItemIsReservedFor == Player.whoAmI)
|
||||
{
|
||||
item.beingGrabbed = true;
|
||||
if (Player.Center.X > item.Center.X)
|
||||
@@ -2783,10 +2776,9 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && !areThereAnyDamnBosses)
|
||||
{
|
||||
for (int m = 0; m < Main.maxNPCs; m++)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
NPC npc = Main.npc[m];
|
||||
if (!npc.active || npc.friendly || npc.dontTakeDamage)
|
||||
if (npc.friendly || npc.dontTakeDamage)
|
||||
continue;
|
||||
float distance = (npc.Center - Player.Center).Length();
|
||||
if (distance < 120f)
|
||||
@@ -3146,14 +3138,13 @@ namespace CalamityMod.CalPlayer
|
||||
var source = Player.GetSource_FromThis(TarragonHeadSummon.LifeAuraEntitySourceContext);
|
||||
float range = 300f;
|
||||
|
||||
for (int i = 0; i < Main.maxNPCs; ++i)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
NPC npc = Main.npc[i];
|
||||
if (!npc.active || npc.friendly || npc.dontTakeDamage)
|
||||
if (npc.friendly || npc.dontTakeDamage)
|
||||
continue;
|
||||
|
||||
if (Vector2.Distance(Player.Center, npc.Center) <= range)
|
||||
Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<TarragonAura>(), damage, 0f, Player.whoAmI, i);
|
||||
Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<TarragonAura>(), damage, 0f, Player.whoAmI, npc.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3174,14 +3165,13 @@ namespace CalamityMod.CalPlayer
|
||||
var source = Player.GetSource_ItemUse(Player.ActiveItem());
|
||||
float range = 200f;
|
||||
|
||||
for (int i = 0; i < Main.maxNPCs; ++i)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
NPC npc = Main.npc[i];
|
||||
if (!npc.active || npc.friendly || npc.damage <= 0 || npc.dontTakeDamage)
|
||||
if (npc.friendly || npc.damage <= 0 || npc.dontTakeDamage)
|
||||
continue;
|
||||
|
||||
if (Vector2.Distance(Player.Center, npc.Center) <= range)
|
||||
Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, Player.whoAmI, i);
|
||||
Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, Player.whoAmI, npc.whoAmI);
|
||||
|
||||
// Occasionally spawn cute sparks so it looks like an electrical aura
|
||||
if (Main.rand.NextBool(10))
|
||||
@@ -3217,17 +3207,16 @@ namespace CalamityMod.CalPlayer
|
||||
var source = Player.GetSource_FromThis(HydrothermicArmor.InfernoPotionEntitySourceContext);
|
||||
float range = 300f;
|
||||
|
||||
for (int i = 0; i < Main.maxNPCs; ++i)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
NPC npc = Main.npc[i];
|
||||
if (!npc.active || npc.friendly || npc.damage <= 0 || npc.dontTakeDamage)
|
||||
if (npc.friendly || npc.damage <= 0 || npc.dontTakeDamage)
|
||||
continue;
|
||||
|
||||
if (Vector2.Distance(Player.Center, npc.Center) <= range)
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
if (brimLoreInfernoTimer == 0)
|
||||
Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, Player.whoAmI, i);
|
||||
Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), damage, 0f, Player.whoAmI, npc.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3387,11 +3376,11 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType<BlunderBoosterAura>() && Main.projectile[i].owner == Player.whoAmI)
|
||||
if (p.type == ModContent.ProjectileType<BlunderBoosterAura>() && p.owner == Player.whoAmI)
|
||||
{
|
||||
Main.projectile[i].Kill();
|
||||
p.Kill();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3444,12 +3433,12 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
int auraType = ModContent.ProjectileType<TeslaAura>();
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (Main.projectile[i].type != auraType || !Main.projectile[i].active || Main.projectile[i].owner != Player.whoAmI)
|
||||
if (p.type != auraType || p.owner != Player.whoAmI)
|
||||
continue;
|
||||
|
||||
Main.projectile[i].Kill();
|
||||
p.Kill();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3467,12 +3456,12 @@ namespace CalamityMod.CalPlayer
|
||||
else if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
int shieldType = ModContent.ProjectileType<CryonicShield>();
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (Main.projectile[i].type != shieldType || !Main.projectile[i].active || Main.projectile[i].owner != Player.whoAmI)
|
||||
if (p.type != shieldType || p.owner != Player.whoAmI)
|
||||
continue;
|
||||
|
||||
Main.projectile[i].Kill();
|
||||
p.Kill();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3958,62 +3947,51 @@ namespace CalamityMod.CalPlayer
|
||||
// Defense damage does not heal during iframes, and has a delay after they end before it starts recovering.
|
||||
if (totalDefenseDamage > 0)
|
||||
{
|
||||
// If a Full Cleanse is in effect, then cleanse all defense damage and don't do anything else.
|
||||
if (CleansingEffect == 1)
|
||||
{
|
||||
totalDefenseDamage = 0;
|
||||
defenseDamageRecoveryFrames = 0;
|
||||
totalDefenseDamageRecoveryFrames = DefenseDamageBaseRecoveryTime;
|
||||
defenseDamageDelayFrames = 0;
|
||||
CleansingEffect = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Defense damage is capped at your maximum defense, except in GFB.
|
||||
if (!Main.getGoodWorld && totalDefenseDamage > Player.statDefense)
|
||||
totalDefenseDamage = Player.statDefense;
|
||||
// Defense damage is capped at your maximum defense, except in GFB.
|
||||
if (!Main.getGoodWorld && totalDefenseDamage > Player.statDefense)
|
||||
totalDefenseDamage = Player.statDefense;
|
||||
|
||||
// You cannot begin recovering from defense damage until your iframes wear off.
|
||||
if (!Player.HasIFrames())
|
||||
// You cannot begin recovering from defense damage until your iframes wear off.
|
||||
if (!Player.HasIFrames())
|
||||
{
|
||||
// Delay before defense damage recovery can start. While this delay is ticking down, defense damage doesn't recover at all.
|
||||
if (defenseDamageDelayFrames > 0)
|
||||
--defenseDamageDelayFrames;
|
||||
|
||||
// Once the delay is up, defense damage recovery actually occurs.
|
||||
else if (defenseDamageDelayFrames <= 0)
|
||||
{
|
||||
// Delay before defense damage recovery can start. While this delay is ticking down, defense damage doesn't recover at all.
|
||||
if (defenseDamageDelayFrames > 0)
|
||||
--defenseDamageDelayFrames;
|
||||
// Make one frame's worth of progress towards recovery.
|
||||
--defenseDamageRecoveryFrames;
|
||||
|
||||
// Once the delay is up, defense damage recovery actually occurs.
|
||||
else if (defenseDamageDelayFrames <= 0)
|
||||
// If completely recovered, reset defense damage to nothing.
|
||||
if (defenseDamageRecoveryFrames <= 0)
|
||||
{
|
||||
// Make one frame's worth of progress towards recovery.
|
||||
--defenseDamageRecoveryFrames;
|
||||
|
||||
// If completely recovered, reset defense damage to nothing.
|
||||
if (defenseDamageRecoveryFrames <= 0)
|
||||
{
|
||||
totalDefenseDamage = 0;
|
||||
defenseDamageRecoveryFrames = 0;
|
||||
totalDefenseDamageRecoveryFrames = DefenseDamageBaseRecoveryTime;
|
||||
defenseDamageDelayFrames = 0;
|
||||
}
|
||||
totalDefenseDamage = 0;
|
||||
defenseDamageRecoveryFrames = 0;
|
||||
totalDefenseDamageRecoveryFrames = DefenseDamageBaseRecoveryTime;
|
||||
defenseDamageDelayFrames = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Get current amount of defense damage to apply this frame.
|
||||
int currentDefenseDamage = CurrentDefenseDamage;
|
||||
|
||||
// Apply DR Damage.
|
||||
//
|
||||
// DR Damage is applied at exactly the same ratio as defense damage;
|
||||
// if you lose half your defense to defense damage, you also lose half your DR.
|
||||
// This is applied first because the math would be wrong if the player's defense was already reduced by defense damage.
|
||||
if (Player.statDefense > 0 && Player.endurance > 0f)
|
||||
{
|
||||
float drDamageRatio = currentDefenseDamage / (float)Player.statDefense;
|
||||
Player.endurance *= 1f - drDamageRatio;
|
||||
}
|
||||
|
||||
// Apply defense damage
|
||||
Player.statDefense -= currentDefenseDamage;
|
||||
}
|
||||
|
||||
// Get current amount of defense damage to apply this frame.
|
||||
int currentDefenseDamage = CurrentDefenseDamage;
|
||||
|
||||
// Apply DR Damage.
|
||||
//
|
||||
// DR Damage is applied at exactly the same ratio as defense damage;
|
||||
// if you lose half your defense to defense damage, you also lose half your DR.
|
||||
// This is applied first because the math would be wrong if the player's defense was already reduced by defense damage.
|
||||
if (Player.statDefense > 0 && Player.endurance > 0f)
|
||||
{
|
||||
float drDamageRatio = currentDefenseDamage / (float)Player.statDefense;
|
||||
Player.endurance *= 1f - drDamageRatio;
|
||||
}
|
||||
|
||||
// Apply defense damage
|
||||
Player.statDefense -= currentDefenseDamage;
|
||||
|
||||
}
|
||||
|
||||
// Defense can never be reduced below zero, no matter what
|
||||
@@ -4171,11 +4149,6 @@ namespace CalamityMod.CalPlayer
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.WikiStatus2");
|
||||
}
|
||||
|
||||
if (CalamityMod.Instance.musicMod is null && CalamityConfig.Instance.MusicModReminderMessage)
|
||||
{
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.MusicModReminder");
|
||||
}
|
||||
|
||||
// 04JAN2024: Ozzatron: Plushie message always appears.
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.GimmeSwagPlushieCampaign");
|
||||
}
|
||||
@@ -4239,10 +4212,9 @@ namespace CalamityMod.CalPlayer
|
||||
if (Main.myPlayer != Player.whoAmI)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
NPC npc = Main.npc[i];
|
||||
if (npc is null || !npc.active || npc.type != ModContent.NPCType<AndroombaFriendly>())
|
||||
if (npc.type != ModContent.NPCType<AndroombaFriendly>())
|
||||
continue;
|
||||
|
||||
bool holdingsol = ((Player.HeldItem.type >= ItemID.GreenSolution && Player.HeldItem.type <= ItemID.RedSolution) || (Player.HeldItem.type >= ItemID.SandSolution && Player.HeldItem.type <= ItemID.DirtSolution) || Player.HeldItem.type == ModContent.ItemType<AstralSolution>());
|
||||
@@ -4338,7 +4310,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, i);
|
||||
NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, npc.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
target.Calamity().IncreasedHeatEffects_Fireball = fireball;
|
||||
target.Calamity().IncreasedHeatEffects_CinnamonRoll = cinnamonRoll;
|
||||
target.Calamity().IncreasedHeatEffects_FlameWakerBoots = flameWakerBoots;
|
||||
target.Calamity().IncreasedHeatEffects_HellfireTreads = hellfireTreads;
|
||||
|
||||
target.Calamity().IncreasedSicknessEffects_ToxicHeart = toxicHeart;
|
||||
@@ -86,8 +87,7 @@ namespace CalamityMod.CalPlayer
|
||||
switch (item.type)
|
||||
{
|
||||
case ItemID.CobaltSword:
|
||||
target.Calamity().miscDefenseLoss = (int)(target.defense * 0.25);
|
||||
target.Calamity().isNerfedByCobalt = true;
|
||||
target.Calamity().cobaltNerfTimer = CalamityGlobalNPC.cobaltAndMythrilNerfTime;
|
||||
break;
|
||||
|
||||
case ItemID.PalladiumSword:
|
||||
@@ -97,8 +97,7 @@ namespace CalamityMod.CalPlayer
|
||||
break;
|
||||
|
||||
case ItemID.MythrilSword:
|
||||
target.damage = (int)(target.defDamage * 0.9);
|
||||
target.Calamity().isNerfedByMythril = true;
|
||||
target.Calamity().mythrilNerfTimer = CalamityGlobalNPC.cobaltAndMythrilNerfTime;
|
||||
break;
|
||||
|
||||
case ItemID.OrichalcumSword:
|
||||
@@ -155,6 +154,9 @@ namespace CalamityMod.CalPlayer
|
||||
break;
|
||||
}
|
||||
|
||||
if (flameWakerBoots)
|
||||
target.AddBuff(BuffID.OnFire, 120);
|
||||
|
||||
if (hellfireTreads)
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
@@ -217,8 +219,7 @@ namespace CalamityMod.CalPlayer
|
||||
switch (proj.type)
|
||||
{
|
||||
case ProjectileID.CobaltNaginata:
|
||||
target.Calamity().miscDefenseLoss = (int)(target.defense * 0.25);
|
||||
target.Calamity().isNerfedByCobalt = true;
|
||||
target.Calamity().cobaltNerfTimer = CalamityGlobalNPC.cobaltAndMythrilNerfTime;
|
||||
break;
|
||||
|
||||
case ProjectileID.PalladiumPike:
|
||||
@@ -228,8 +229,7 @@ namespace CalamityMod.CalPlayer
|
||||
break;
|
||||
|
||||
case ProjectileID.MythrilHalberd:
|
||||
target.damage = (int)(target.defDamage * 0.9);
|
||||
target.Calamity().isNerfedByMythril = true;
|
||||
target.Calamity().mythrilNerfTimer = CalamityGlobalNPC.cobaltAndMythrilNerfTime;
|
||||
break;
|
||||
|
||||
case ProjectileID.OrichalcumHalberd:
|
||||
@@ -305,6 +305,9 @@ namespace CalamityMod.CalPlayer
|
||||
break;
|
||||
}
|
||||
|
||||
if (flameWakerBoots)
|
||||
target.AddBuff(BuffID.OnFire, 120);
|
||||
|
||||
if ((proj.arrow && Player.hasMoltenQuiver) || hellfireTreads)
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
@@ -1448,16 +1451,15 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
float lowestHealthCheck = 0f;
|
||||
int healTarget = Player.whoAmI;
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player otherPlayer in Main.ActivePlayers)
|
||||
{
|
||||
Player otherPlayer = Main.player[i];
|
||||
if (otherPlayer.active && !otherPlayer.dead && ((!Player.hostile && !otherPlayer.hostile) || Player.team == otherPlayer.team))
|
||||
if (!otherPlayer.dead && ((!Player.hostile && !otherPlayer.hostile) || Player.team == otherPlayer.team))
|
||||
{
|
||||
float playerDist = Vector2.Distance(target.Center, otherPlayer.Center);
|
||||
if (playerDist < BalancingConstants.LifeStealRange && (otherPlayer.statLifeMax2 - otherPlayer.statLife) > lowestHealthCheck)
|
||||
{
|
||||
lowestHealthCheck = otherPlayer.statLifeMax2 - otherPlayer.statLife;
|
||||
healTarget = i;
|
||||
healTarget = otherPlayer.whoAmI;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1499,7 +1501,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (playerDist < BalancingConstants.LifeStealRange && (otherPlayer.statLifeMax2 - otherPlayer.statLife) > lowestHealthCheck)
|
||||
{
|
||||
lowestHealthCheck = otherPlayer.statLifeMax2 - otherPlayer.statLife;
|
||||
healTarget = i;
|
||||
healTarget = otherPlayer.whoAmI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,11 +34,11 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
|
||||
int robot = -1;
|
||||
int andromedaMechID = ModContent.ProjectileType<GiantIbanRobotOfDoom>();
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == andromedaMechID && Main.projectile[i].owner == drawPlayer.whoAmI)
|
||||
if (p.type == andromedaMechID && p.owner == drawPlayer.whoAmI)
|
||||
{
|
||||
robot = i;
|
||||
robot = p.whoAmI;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 672 B After Width: | Height: | Size: 1.0 KiB |
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Items.SummonItems;
|
||||
using CalamityMod.Items.Weapons.DraedonsArsenal;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
@@ -47,6 +48,8 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Ranged/AuroraBlazerGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<CleansingBlaze>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Ranged/CleansingBlazeGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<CosmicImmaterializer>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Summon/CosmicImmaterializerGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<DeathhailStaff>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/DeathhailStaffGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<Deathwind>())
|
||||
@@ -77,6 +80,8 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Summon/PlantationStaffGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<PrismaticBreaker>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/PrismaticBreakerGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<PulseRifle>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/DraedonsArsenal/PulseRifleGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<SoulPiercer>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/SoulPiercerGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<SubsumingVortex>())
|
||||
@@ -87,6 +92,8 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/TheEnforcerGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<VernalBolter>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Ranged/VernalBolterGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<VividClarity>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/VividClarityGlow").Value;
|
||||
|
||||
if (glowMask == default)
|
||||
return;
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
|
||||
namespace CalamityMod
|
||||
{
|
||||
public static class CalamityConditions
|
||||
{
|
||||
private static Condition Create(string key, Func<bool> predicate)
|
||||
{
|
||||
return new Condition(
|
||||
Language.GetText($"Mods.CalamityMod.Condition.{key}"),
|
||||
predicate
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Config based conditions
|
||||
//
|
||||
|
||||
public static readonly Condition PotionSellingConfig = Create("PotionConfig", () => CalamityConfig.Instance.PotionSelling);
|
||||
|
||||
//
|
||||
// Player conditions
|
||||
//
|
||||
|
||||
public static readonly Condition PlayerHasRogueArmor = Create("HasRogueArmor", () => Main.LocalPlayer.Calamity().rogueStealthMax > 0f && Main.LocalPlayer.Calamity().wearingRogueArmor);
|
||||
public static readonly Condition PlayerHasWings = Create("HasWings", () => Main.LocalPlayer.wingTimeMax > 0);
|
||||
public static readonly Condition PlayerAlcoholPoisoned = Create("AlcoholPoison", () => Main.LocalPlayer.Calamity().alcoholPoisoning);
|
||||
|
||||
//
|
||||
// NPC conditions
|
||||
//
|
||||
|
||||
/// <summary>Don't use this. It's always `true`.</summary>
|
||||
public static readonly Condition TrasherTextCondition = Create("Drops.TrasherKill", () => true);
|
||||
|
||||
//
|
||||
// Calamity Event Flag conditions
|
||||
//
|
||||
|
||||
public static readonly Condition DownedAcidRainT1 = Create("Drops.DownedT1AR", () => DownedBossSystem.downedEoCAcidRain);
|
||||
public static readonly Condition DownedAcidRainT2 = Create("Drops.DownedT2AR", () => DownedBossSystem.downedAquaticScourgeAcidRain);
|
||||
|
||||
//
|
||||
// Calamity Boss Flag conditions
|
||||
//
|
||||
|
||||
public static readonly Condition DownedDesertScourge = Create("Drops.DownedDS", () => DownedBossSystem.downedDesertScourge);
|
||||
public static readonly Condition DownedCrabulon = Create("Drops.DownedCrabulon", () => DownedBossSystem.downedDesertScourge);
|
||||
public static readonly Condition DownedHiveMind = Create("Drops.DownedHM", () => DownedBossSystem.downedHiveMind);
|
||||
public static readonly Condition DownedPerforator = Create("Drops.DownedPerfs", () => DownedBossSystem.downedPerforator);
|
||||
public static readonly Condition DownedSlimeGod = Create("Drops.DownedSG", () => DownedBossSystem.downedSlimeGod);
|
||||
public static readonly Condition DownedCryogen = Create("Drops.DownedCryo", () => DownedBossSystem.downedCryogen);
|
||||
public static readonly Condition DownedAquaticScourge = Create("Drops.DownedAS", () => DownedBossSystem.downedAquaticScourge);
|
||||
public static readonly Condition DownedBrimstoneElemental = Create("Drops.DownedBrim", () => DownedBossSystem.downedBrimstoneElemental);
|
||||
public static readonly Condition DownedCalamitasClone = Create("Drops.DownedCal", () => DownedBossSystem.downedCalamitasClone);
|
||||
public static readonly Condition DownedLeviathan = Create("Drops.DownedLebi", () => DownedBossSystem.downedLeviathan);
|
||||
public static readonly Condition DownedAstrumAureus = Create("Drops.DownedAureus", () => DownedBossSystem.downedAstrumAureus);
|
||||
public static readonly Condition DownedPlaguebringer = Create("Drops.DownedPBG", () => DownedBossSystem.downedPlaguebringer);
|
||||
public static readonly Condition DownedRavager = Create("Drops.DownedRav", () => DownedBossSystem.downedRavager);
|
||||
public static readonly Condition DownedAstrumDeus = Create("Drops.DownedAD", () => DownedBossSystem.downedAstrumDeus);
|
||||
public static readonly Condition DownedGuardians = Create("Drops.DownedGuard", () => DownedBossSystem.downedGuardians);
|
||||
public static readonly Condition DownedBumblebird = Create("Drops.DownedBirb", () => DownedBossSystem.downedDragonfolly);
|
||||
public static readonly Condition DownedProvidence = Create("Drops.DownedProv", () => DownedBossSystem.downedProvidence);
|
||||
public static readonly Condition DownedSignus = Create("Drops.DownedSig", () => DownedBossSystem.downedSignus);
|
||||
public static readonly Condition DownedStormWeaver = Create("Drops.DownedSW", () => DownedBossSystem.downedStormWeaver);
|
||||
public static readonly Condition DownedCeaselessVoid = Create("Drops.DownedCV", () => DownedBossSystem.downedCeaselessVoid);
|
||||
public static readonly Condition DownedPolterghast = Create("Drops.DownedPolter", () => DownedBossSystem.downedPolterghast);
|
||||
public static readonly Condition DownedOldDuke = Create("Drops.DownedOD", () => DownedBossSystem.downedBoomerDuke);
|
||||
public static readonly Condition DownedDevourerOfGods = Create("Drops.DownedDoG", () => DownedBossSystem.downedDoG);
|
||||
public static readonly Condition DownedYharon = Create("Drops.DownedYharon", () => DownedBossSystem.downedYharon);
|
||||
public static readonly Condition DownedExoMechs = Create("Drops.DownedExos", () => DownedBossSystem.downedExoMechs);
|
||||
public static readonly Condition DownedSupremeCalamitas = Create("Drops.DownedSCal", () => DownedBossSystem.downedCalamitas);
|
||||
public static readonly Condition DownedPrimordialWyrm = Create("Drops.DownedAEW", () => DownedBossSystem.downedPrimordialWyrm);
|
||||
public static readonly Condition DownedClam = Create("Drops.DownedClam", () => DownedBossSystem.downedCLAM);
|
||||
public static readonly Condition DownedBuffedClam = Create("Drops.DownedClamHM", () => DownedBossSystem.downedCLAMHardMode);
|
||||
public static readonly Condition DownedGreatSandShark = Create("Drops.DownedGSS", () => DownedBossSystem.downedGSS);
|
||||
|
||||
// Mixed
|
||||
public static readonly Condition DownedHiveMindOrPerforator = Create("Drops.DownedHMOrPerfs",() => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator);
|
||||
public static readonly Condition DownedCalamitasCloneOrPlantera = Create("Drops.DownedCalPlant", () => DownedBossSystem.downedCalamitasClone || Condition.DownedPlantera.IsMet());
|
||||
|
||||
// Vanilla
|
||||
public static readonly Condition DownedBetsy = Create("Drops.DownedBetsy", () => DownedBossSystem.downedBetsy);
|
||||
|
||||
//
|
||||
// Calamity Biome conditions
|
||||
//
|
||||
|
||||
public static readonly Condition InAstral = Create("InAstral", () => Main.LocalPlayer.Calamity().ZoneAstral);
|
||||
public static readonly Condition InCrag = Create("InCrag", () => Main.LocalPlayer.Calamity().ZoneCalamity);
|
||||
public static readonly Condition InSulph = Create("InSulph", () => Main.LocalPlayer.Calamity().ZoneSulphur);
|
||||
public static readonly Condition InSunken = Create("InSunken", () => Main.LocalPlayer.Calamity().ZoneSunkenSea);
|
||||
|
||||
//
|
||||
// World based conditions
|
||||
//
|
||||
|
||||
public static readonly Condition InRevengeanceMode = Create("InRev", () => CalamityWorld.revenge);
|
||||
public static readonly Condition InRevengeanceModeNotMasterMode = Create("InRev", () => !Main.masterMode && CalamityWorld.revenge);
|
||||
public static readonly Condition InRevengeanceModeOrMasterMode = Create("InRevOrMM", () => Main.masterMode || CalamityWorld.revenge);
|
||||
}
|
||||
}
|
||||
@@ -66,10 +66,6 @@ namespace CalamityMod
|
||||
#region UI Changes
|
||||
[Header("UI")]
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool MusicModReminderMessage { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool WikiStatusMessage { get; set; }
|
||||
|
||||
@@ -92,13 +92,10 @@ namespace CalamityMod
|
||||
public static Texture2D AstralSurfaceCloseGlow;
|
||||
public static Texture2D AstralSurfaceMiddle;
|
||||
public static Texture2D AstralSurfaceMiddleGlow;
|
||||
public static Texture2D AstralSurfaceFar;
|
||||
public static Texture2D AstralSurfaceHorizon;
|
||||
|
||||
// Astral Desert Sky/BG
|
||||
public static Texture2D AstralDesertSurfaceClose;
|
||||
public static Texture2D AstralDesertSurfaceMiddle;
|
||||
public static Texture2D AstralDesertSurfaceFar;
|
||||
|
||||
// Astral Snow Sky/BG
|
||||
public static Texture2D AstralSnowSurfaceMiddle;
|
||||
@@ -278,22 +275,19 @@ namespace CalamityMod
|
||||
{
|
||||
// Astral Sky/BG
|
||||
AstralSky = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralSky", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceFront = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralSurfaceFront", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceFrontGlow = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralSurfaceFrontGlow", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceClose = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralSurfaceClose", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceCloseGlow = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralSurfaceCloseGlow", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceMiddle = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralSurfaceMiddle", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceMiddleGlow = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralSurfaceMiddleGlow", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceFar = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralSurfaceFar", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceHorizon = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralSurfaceHorizon", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceFront = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/AstralSurfaceFront", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceFrontGlow = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/AstralSurfaceFrontGlow", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceClose = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/AstralSurfaceClose", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceCloseGlow = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/AstralSurfaceCloseGlow", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceMiddle = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/AstralSurfaceMiddle", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralSurfaceMiddleGlow = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/AstralSurfaceMiddleGlow", AssetRequestMode.ImmediateLoad).Value;
|
||||
|
||||
// Astral Desert Sky/BG
|
||||
AstralDesertSurfaceClose = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralDesertSurfaceClose", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralDesertSurfaceMiddle = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralDesertSurfaceMiddle", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralDesertSurfaceFar = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralDesertSurfaceFar", AssetRequestMode.ImmediateLoad).Value;
|
||||
//Astral Desert Sky/BG
|
||||
AstralDesertSurfaceClose = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/AstralDesertSurfaceClose", AssetRequestMode.ImmediateLoad).Value;
|
||||
AstralDesertSurfaceMiddle = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/AstralDesertSurfaceMiddle", AssetRequestMode.ImmediateLoad).Value;
|
||||
|
||||
// Astral Snow Sky/BG
|
||||
AstralSnowSurfaceMiddle = ModContent.Request<Texture2D>("CalamityMod/Skies/AstralSnowSurfaceMiddle", AssetRequestMode.ImmediateLoad).Value;
|
||||
//Astral Snow Sky/BG
|
||||
AstralSnowSurfaceMiddle = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/AstralSnowSurfaceMiddle", AssetRequestMode.ImmediateLoad).Value;
|
||||
|
||||
// Sulpher Sea Sky/BG
|
||||
SulphurSeaSky = ModContent.Request<Texture2D>("CalamityMod/Skies/SulphurSeaSky", AssetRequestMode.ImmediateLoad).Value;
|
||||
@@ -352,10 +346,6 @@ namespace CalamityMod
|
||||
SkyManager.Instance["CalamityMod:BrimstoneCrag"] = new BrimstoneCragSky();
|
||||
|
||||
SkyManager.Instance["CalamityMod:Astral"] = new AstralSky();
|
||||
SkyManager.Instance["CalamityMod:AstralSurface"] = new AstralSkySurface();
|
||||
SkyManager.Instance["CalamityMod:AstralDesert"] = new AstralSkyDesert();
|
||||
SkyManager.Instance["CalamityMod:AstralSnow"] = new AstralSkySnow();
|
||||
SkyManager.Instance["CalamityMod:MonolithAstral"] = new AstralMonolithSky();
|
||||
SkyManager.Instance["CalamityMod:SulphurSea"] = new SulphurSeaSky();
|
||||
SkyManager.Instance["CalamityMod:Cryogen"] = new CryogenSky();
|
||||
SkyManager.Instance["CalamityMod:StormWeaverFlash"] = new StormWeaverFlashSky();
|
||||
|
||||
@@ -294,16 +294,16 @@ namespace CalamityMod
|
||||
|
||||
EnemyStats.ContactDamageValues = new SortedDictionary<int, int[]>
|
||||
{
|
||||
{ NPCID.KingSlime, new int[] { 40, 64, 80, 96, 120 } },
|
||||
{ ModContent.NPCType<KingSlimeJewel3>(), new int[] { 30, 44, 60, 76, 90 } },
|
||||
{ NPCID.KingSlime, new int[] { 40, 64, 80, 96, 144 } },
|
||||
{ ModContent.NPCType<KingSlimeJewel3>(), new int[] { 30, 44, 60, 76, 114 } },
|
||||
|
||||
{ ModContent.NPCType<DesertScourgeHead>(), new int[] { 45, 66, 88, 110, 132 } },
|
||||
{ ModContent.NPCType<DesertScourgeHead>(), new int[] { 45, 66, 88, 110, 165 } },
|
||||
{ ModContent.NPCType<DesertScourgeBody>(), new int[] { 24, 32, 40, 48, 72 } },
|
||||
{ ModContent.NPCType<DesertScourgeTail>(), new int[] { 18, 24, 30, 36, 54 } },
|
||||
{ ModContent.NPCType<DesertNuisanceHead>(), new int[] { 30, 44, 60, 76, 90 } },
|
||||
{ ModContent.NPCType<DesertNuisanceHead>(), new int[] { 30, 44, 60, 76, 114 } },
|
||||
{ ModContent.NPCType<DesertNuisanceBody>(), new int[] { 21, 28, 32, 36, 63 } },
|
||||
{ ModContent.NPCType<DesertNuisanceTail>(), new int[] { 12, 16, 20, 24, 36 } },
|
||||
{ ModContent.NPCType<DesertNuisanceHeadYoung>(), new int[] { 30, 44, 60, 76, 90 } },
|
||||
{ ModContent.NPCType<DesertNuisanceHeadYoung>(), new int[] { 30, 44, 60, 76, 114 } },
|
||||
{ ModContent.NPCType<DesertNuisanceBodyYoung>(), new int[] { 21, 28, 32, 36, 63 } },
|
||||
{ ModContent.NPCType<DesertNuisanceTailYoung>(), new int[] { 12, 16, 20, 24, 36 } },
|
||||
|
||||
@@ -312,73 +312,73 @@ namespace CalamityMod
|
||||
30, // 45 in phase 2
|
||||
40, // 48 in phase 2, 56 in phase 3
|
||||
50, // 60 in phase 2, 70 in phase 3
|
||||
72 } }, // Vanilla: 108 in phase 2; Rev+: 86 in phase 2, 101 in phase 3
|
||||
75 } }, // Vanilla: 113 in phase 2; Rev+: 90 in phase 2, 105 in phase 3
|
||||
{ NPCID.ServantofCthulhu, new int[] { 18, 24, 30, 36, 54 } },
|
||||
{ ModContent.NPCType<BloodlettingServant>(), new int[] { 20, 26, 34, 42, 60 } }, // In phase 2: 26, 34, 44, 55, 78
|
||||
{ ModContent.NPCType<BloodlettingServant>(), new int[] { 20, 26, 34, 42, 63 } }, // In phase 2: 26, 34, 44, 55, 82
|
||||
|
||||
{ ModContent.NPCType<Crabulon>(), new int[] { 40, 64, 80, 96, 120 } },
|
||||
{ ModContent.NPCType<CrabShroom>(), new int[] { 25, 50, 62, 74, 75 } },
|
||||
{ ModContent.NPCType<Crabulon>(), new int[] { 40, 64, 80, 96, 144 } },
|
||||
{ ModContent.NPCType<CrabShroom>(), new int[] { 25, 50, 62, 74, 111 } },
|
||||
|
||||
{ NPCID.EaterofWorldsHead, new int[] { 38, 55, 77, 99, 132 } },
|
||||
{ NPCID.EaterofWorldsHead, new int[] { 38, 55, 77, 99, 165 } },
|
||||
{ NPCID.EaterofWorldsBody, new int[] { 18, 24, 32, 40, 60 } },
|
||||
{ NPCID.EaterofWorldsTail, new int[] { 12, 16, 24, 32, 36 } },
|
||||
{ NPCID.EaterofWorldsTail, new int[] { 12, 16, 24, 32, 48 } },
|
||||
{ NPCID.VileSpitEaterOfWorlds, new int[] { -1, 64, 64, 64, 96 } },
|
||||
|
||||
{ NPCID.BrainofCthulhu, new int[] { 36, 54, 81, 108, 135 } },
|
||||
{ NPCID.Creeper, new int[] { 24, 36, 66, 96, 120 } },
|
||||
{ NPCID.BrainofCthulhu, new int[] { 36, 54, 81, 108, 162 } },
|
||||
{ NPCID.Creeper, new int[] { 24, 36, 66, 96, 144 } },
|
||||
|
||||
{ ModContent.NPCType<HiveMind>(), new int[] { 42, 63, 81, 99, 135 } },
|
||||
{ ModContent.NPCType<DankCreeper>(), new int[] { 30, 50, 62, 74, 90 } },
|
||||
{ ModContent.NPCType<HiveMind>(), new int[] { 42, 63, 81, 99, 162 } },
|
||||
{ ModContent.NPCType<DankCreeper>(), new int[] { 30, 50, 62, 74, 111 } },
|
||||
|
||||
{ ModContent.NPCType<PerforatorHive>(), new int[] { 36, 54, 63, 72, 108 } },
|
||||
{ ModContent.NPCType<PerforatorHeadLarge>(), new int[] { 54, 90, 108, 126, 162 } },
|
||||
{ ModContent.NPCType<PerforatorBodyLarge>(), new int[] { 28, 48, 56, 64, 84 } },
|
||||
{ ModContent.NPCType<PerforatorTailLarge>(), new int[] { 22, 36, 42, 48, 66 } },
|
||||
{ ModContent.NPCType<PerforatorHeadMedium>(), new int[] { 42, 70, 84, 98, 126 } },
|
||||
{ ModContent.NPCType<PerforatorBodyMedium>(), new int[] { 24, 42, 50, 58, 72 } },
|
||||
{ ModContent.NPCType<PerforatorTailMedium>(), new int[] { 18, 28, 34, 40, 54 } },
|
||||
{ ModContent.NPCType<PerforatorHeadSmall>(), new int[] { 36, 60, 72, 84, 108 } },
|
||||
{ ModContent.NPCType<PerforatorBodySmall>(), new int[] { 20, 36, 42, 48, 60 } },
|
||||
{ ModContent.NPCType<PerforatorTailSmall>(), new int[] { 14, 20, 26, 32, 42 } },
|
||||
{ ModContent.NPCType<PerforatorHeadLarge>(), new int[] { 54, 90, 108, 126, 189 } },
|
||||
{ ModContent.NPCType<PerforatorBodyLarge>(), new int[] { 28, 48, 56, 64, 96 } },
|
||||
{ ModContent.NPCType<PerforatorTailLarge>(), new int[] { 22, 36, 42, 48, 72 } },
|
||||
{ ModContent.NPCType<PerforatorHeadMedium>(), new int[] { 42, 70, 84, 98, 147 } },
|
||||
{ ModContent.NPCType<PerforatorBodyMedium>(), new int[] { 24, 42, 50, 58, 87 } },
|
||||
{ ModContent.NPCType<PerforatorTailMedium>(), new int[] { 18, 28, 34, 40, 60 } },
|
||||
{ ModContent.NPCType<PerforatorHeadSmall>(), new int[] { 36, 60, 72, 84, 126 } },
|
||||
{ ModContent.NPCType<PerforatorBodySmall>(), new int[] { 20, 36, 42, 48, 72 } },
|
||||
{ ModContent.NPCType<PerforatorTailSmall>(), new int[] { 14, 20, 26, 32, 48 } },
|
||||
|
||||
{ NPCID.QueenBee, new int[] { 36, 54, 81, 108, 135 } },
|
||||
{ NPCID.Bee, new int[] { 20, 24, 48, 72, 90 } },
|
||||
{ NPCID.BeeSmall, new int[] { 15, 18, 36, 54, 72 } },
|
||||
{ NPCID.QueenBee, new int[] { 36, 54, 81, 108, 162 } },
|
||||
{ NPCID.Bee, new int[] { 20, 24, 48, 72, 108 } },
|
||||
{ NPCID.BeeSmall, new int[] { 15, 18, 36, 54, 81 } },
|
||||
|
||||
{ NPCID.SkeletronHead, new int[] {
|
||||
42, // 55 while spinning
|
||||
77, // 100 while spinning
|
||||
88, // 114 while spinning
|
||||
99, // 128 while spinning
|
||||
132 } }, // 171 while spinning
|
||||
{ NPCID.SkeletronHand, new int[] { 32, 44, 77, 110, 132 } },
|
||||
165 } }, // 215 while spinning
|
||||
{ NPCID.SkeletronHand, new int[] { 32, 44, 77, 110, 165 } },
|
||||
|
||||
{ NPCID.Deerclops, new int[] { 20, 40, 50, 60, 81 } },
|
||||
{ NPCID.Deerclops, new int[] { 20, 40, 50, 60, 90 } },
|
||||
|
||||
{ ModContent.NPCType<SlimeGodCore>(), new int[] { 48, 80, 96, 112, 144 } },
|
||||
{ ModContent.NPCType<EbonianPaladin>(), new int[] { 54, 90, 108, 126, 162 } },
|
||||
{ ModContent.NPCType<SplitEbonianPaladin>(), new int[] { 48, 80, 96, 112, 144 } },
|
||||
{ ModContent.NPCType<CrimulanPaladin>(), new int[] { 60, 100, 120, 140, 180 } },
|
||||
{ ModContent.NPCType<SplitCrimulanPaladin>(), new int[] { 54, 90, 108, 126, 162 } },
|
||||
{ ModContent.NPCType<CorruptSlimeSpawn>(), new int[] { 36, 60, 72, 84, 108 } },
|
||||
{ ModContent.NPCType<CorruptSlimeSpawn2>(), new int[] { 24, 40, 48, 56, 72 } },
|
||||
{ ModContent.NPCType<CrimsonSlimeSpawn>(), new int[] { 42, 70, 84, 98, 126 } },
|
||||
{ ModContent.NPCType<CrimsonSlimeSpawn2>(), new int[] { 30, 50, 60, 70, 90 } },
|
||||
{ ModContent.NPCType<SlimeGodCore>(), new int[] { 48, 80, 96, 112, 168 } },
|
||||
{ ModContent.NPCType<EbonianPaladin>(), new int[] { 54, 90, 108, 126, 189 } },
|
||||
{ ModContent.NPCType<SplitEbonianPaladin>(), new int[] { 48, 80, 96, 112, 168 } },
|
||||
{ ModContent.NPCType<CrimulanPaladin>(), new int[] { 60, 100, 120, 140, 210 } },
|
||||
{ ModContent.NPCType<SplitCrimulanPaladin>(), new int[] { 54, 90, 108, 126, 189 } },
|
||||
{ ModContent.NPCType<CorruptSlimeSpawn>(), new int[] { 36, 60, 72, 84, 126 } },
|
||||
{ ModContent.NPCType<CorruptSlimeSpawn2>(), new int[] { 24, 40, 48, 56, 84 } },
|
||||
{ ModContent.NPCType<CrimsonSlimeSpawn>(), new int[] { 42, 70, 84, 98, 147 } },
|
||||
{ ModContent.NPCType<CrimsonSlimeSpawn2>(), new int[] { 30, 50, 60, 70, 105 } },
|
||||
|
||||
{ NPCID.WallofFlesh, new int[] { 100, 150, 180, 210, 270 } },
|
||||
{ NPCID.WallofFleshEye, new int[] { 100, 150, 180, 210, 270 } },
|
||||
{ NPCID.WallofFlesh, new int[] { 100, 150, 180, 210, 315 } },
|
||||
{ NPCID.WallofFleshEye, new int[] { 100, 150, 180, 210, 315 } },
|
||||
{ NPCID.TheHungry, new int[] {
|
||||
30, // Ranges from 30 to 75 depending on WoF life
|
||||
60, // Ranges from 60 to 150 depending on WoF life
|
||||
60, // Ranges from 60 to 150 depending on WoF life
|
||||
60, // Ranges from 60 to 150 depending on WoF life
|
||||
90 } }, // Ranges from 90 to 225 depending on WoF life
|
||||
{ NPCID.TheHungryII, new int[] { 30, 60, 74, 88, 108 } },
|
||||
{ NPCID.LeechHead, new int[] { 26, 52, 62, 72, 90 } },
|
||||
{ NPCID.LeechBody, new int[] { 22, 44, 52, 60, 78 } },
|
||||
{ NPCID.LeechTail, new int[] { 18, 36, 42, 48, 66 } },
|
||||
{ NPCID.TheHungryII, new int[] { 30, 60, 74, 88, 132 } },
|
||||
{ NPCID.LeechHead, new int[] { 26, 52, 62, 72, 108 } },
|
||||
{ NPCID.LeechBody, new int[] { 22, 44, 52, 60, 90 } },
|
||||
{ NPCID.LeechTail, new int[] { 18, 36, 42, 48, 72 } },
|
||||
|
||||
{ NPCID.QueenSlimeBoss, new int[] { 80, 120, 150, 180, 240 } },
|
||||
{ NPCID.QueenSlimeBoss, new int[] { 80, 120, 150, 180, 270 } },
|
||||
{ NPCID.QueenSlimeMinionBlue, new int[] { 60, 80, 100, 120, 180 } },
|
||||
{ NPCID.QueenSlimeMinionPink, new int[] { 60, 80, 100, 120, 180 } },
|
||||
{ NPCID.QueenSlimeMinionPurple, new int[] { 70, 100, 120, 140, 210 } },
|
||||
@@ -400,15 +400,15 @@ namespace CalamityMod
|
||||
153 } }, // 229 in phase 2
|
||||
|
||||
{ ModContent.NPCType<AquaticScourgeHead>(), new int[] { 110, 176, 187, 198, 330 } },
|
||||
{ ModContent.NPCType<AquaticScourgeBody>(), new int[] { 75, 112, 136, 160, 216 } },
|
||||
{ ModContent.NPCType<AquaticScourgeBody>(), new int[] { 75, 112, 136, 160, 240 } },
|
||||
{ ModContent.NPCType<AquaticScourgeBodyAlt>(), new int[] { 70, 104, 112, 120, 192 } },
|
||||
{ ModContent.NPCType<AquaticScourgeTail>(), new int[] { 65, 96, 104, 112, 168 } },
|
||||
|
||||
{ NPCID.TheDestroyer, new int[] { 140, 280, 300, 320, 420 } },
|
||||
{ NPCID.TheDestroyer, new int[] { 140, 280, 300, 320, 480 } },
|
||||
{ NPCID.TheDestroyerBody, new int[] { 70, 102, 136, 170, 255 } },
|
||||
{ NPCID.TheDestroyerTail, new int[] { 45, 68, 102, 136, 204 } },
|
||||
|
||||
{ ModContent.NPCType<BrimstoneElemental>(), new int[] { 75, 112, 136, 160, 216 } },
|
||||
{ ModContent.NPCType<BrimstoneElemental>(), new int[] { 75, 112, 136, 160, 240 } },
|
||||
|
||||
{ NPCID.SkeletronPrime, new int[] {
|
||||
50, // 100 while spinning
|
||||
@@ -427,7 +427,7 @@ namespace CalamityMod
|
||||
{ NPCID.PrimeCannon, new int[] { 30, 51, 68, 85, 102 } },
|
||||
{ NPCID.PrimeLaser, new int[] { 30, 51, 68, 85, 102 } },
|
||||
|
||||
{ ModContent.NPCType<CalamitasClone>(), new int[] { 95, 144, 168, 192, 276 } },
|
||||
{ ModContent.NPCType<CalamitasClone>(), new int[] { 95, 144, 168, 192, 288 } },
|
||||
{ ModContent.NPCType<Cataclysm>(), new int[] { 80, 120, 138, 156, 240 } },
|
||||
{ ModContent.NPCType<Catastrophe>(), new int[] { 85, 130, 150, 170, 255 } },
|
||||
|
||||
@@ -436,7 +436,7 @@ namespace CalamityMod
|
||||
100, // 140 in phase 2
|
||||
138, // 193 in phase 2
|
||||
176, // 246 in phase 2
|
||||
207 } }, // 290 in phase 2
|
||||
276 } }, // 386 in phase 2
|
||||
{ NPCID.PlanterasTentacle, new int[] { 90, 138, 161, 184, 276 } },
|
||||
{ ModContent.NPCType<PlanterasFreeTentacle>(), new int[] { 90, 138, 161, 184, 276 } },
|
||||
{ NPCID.Spore, new int[] { 90, 140, 160, 180, 270 } },
|
||||
@@ -445,7 +445,7 @@ namespace CalamityMod
|
||||
110, // 165 during charge
|
||||
143, // 215 during charge
|
||||
176, // 264 during charge
|
||||
231 } }, // 347 during charge
|
||||
264 } }, // 396 during charge
|
||||
|
||||
{ ModContent.NPCType<Leviathan>(), new int[] { 140, 216, 240, 264, 414 } },
|
||||
{ ModContent.NPCType<Anahita>(), new int[] {
|
||||
@@ -453,37 +453,37 @@ namespace CalamityMod
|
||||
112, // 168 during charge
|
||||
136, // 204 during charge
|
||||
160, // 240 during charge
|
||||
216 } }, // 324 during charge
|
||||
240 } }, // 360 during charge
|
||||
{ ModContent.NPCType<AnahitasIceShield>(), new int[] { 70, 110, 126, 142, 210 } },
|
||||
{ NPCID.DetonatingBubble, new int[] { 100, 150, 180, 210, 270 } },
|
||||
{ NPCID.DetonatingBubble, new int[] { 100, 150, 180, 210, 315 } },
|
||||
{ ModContent.NPCType<AquaticAberration>(), new int[] { 90, 140, 160, 180, 270 } },
|
||||
|
||||
{ ModContent.NPCType<AstrumAureus>(), new int[] { 145, 220, 242, 264, 429 } },
|
||||
{ ModContent.NPCType<AureusSpawn>(), new int[] { 75, 112, 128, 144, 225 } },
|
||||
|
||||
{ NPCID.Golem, new int[] { 95, 144, 176, 208, 264 } },
|
||||
{ NPCID.GolemHead, new int[] { 85, 128, 144, 160, 228 } },
|
||||
{ NPCID.GolemFistLeft, new int[] { 75, 112, 144, 176, 240 } },
|
||||
{ NPCID.GolemFistRight, new int[] { 75, 112, 144, 176, 240 } },
|
||||
{ NPCID.Golem, new int[] { 95, 144, 176, 208, 312 } },
|
||||
{ NPCID.GolemHead, new int[] { 85, 128, 144, 160, 240 } },
|
||||
{ NPCID.GolemFistLeft, new int[] { 75, 112, 144, 176, 264 } },
|
||||
{ NPCID.GolemFistRight, new int[] { 75, 112, 144, 176, 264 } },
|
||||
|
||||
{ ModContent.NPCType<PlaguebringerGoliath>(), new int[] { 120, 180, 216, 252, 351 } },
|
||||
{ ModContent.NPCType<PlaguebringerGoliath>(), new int[] { 120, 180, 216, 252, 378 } },
|
||||
{ ModContent.NPCType<PlagueHomingMissile>(), new int[] { 120, 180, 210, 240, 360 } },
|
||||
{ ModContent.NPCType<PlagueMine>(), new int[] { 130, 200, 240, 280, 390 } },
|
||||
{ ModContent.NPCType<PlagueMine>(), new int[] { 130, 200, 240, 280, 420 } },
|
||||
|
||||
{ NPCID.DukeFishron, new int[] {
|
||||
100, // 120 in phase 2
|
||||
140, // 202 in phase 2, 185 in phase 3
|
||||
168, // 242 in phase 2, 222 in phase 3
|
||||
196, // 282 in phase 2, 259 in phase 3
|
||||
252 } }, // 363 in phase 2, 333 in phase 3
|
||||
{ NPCID.Sharkron, new int[] { 100, 150, 180, 210, 270 } },
|
||||
{ NPCID.Sharkron2, new int[] { 120, 180, 210, 240, 315 } },
|
||||
294 } }, // 423 in phase 2, 388 in phase 3
|
||||
{ NPCID.Sharkron, new int[] { 100, 150, 180, 210, 315 } },
|
||||
{ NPCID.Sharkron2, new int[] { 120, 180, 210, 240, 360 } },
|
||||
|
||||
{ ModContent.NPCType<RavagerBody>(), new int[] { 130, 192, 224, 256, 384 } },
|
||||
{ ModContent.NPCType<RavagerClawLeft>(), new int[] { 105, 160, 180, 200, 315 } },
|
||||
{ ModContent.NPCType<RavagerClawRight>(), new int[] { 105, 160, 180, 200, 315 } },
|
||||
{ ModContent.NPCType<RockPillar>(), new int[] { 130, 192, 224, 256, 390 } },
|
||||
{ ModContent.NPCType<FlamePillar>(), new int[] { 105, 160, 192, 224, 315 } },
|
||||
{ ModContent.NPCType<FlamePillar>(), new int[] { 105, 160, 192, 224, 336 } },
|
||||
|
||||
{ NPCID.CultistDragonHead, new int[] { 120, 180, 210, 240, 360 } },
|
||||
{ NPCID.CultistDragonBody1, new int[] { 60, 90, 105, 120, 180 } },
|
||||
@@ -495,8 +495,8 @@ namespace CalamityMod
|
||||
{ NPCID.AncientLight, new int[] { 120, 180, 210, 240, 360 } },
|
||||
|
||||
{ ModContent.NPCType<AstrumDeusHead>(), new int[] { 160, 240, 268, 296, 480 } },
|
||||
{ ModContent.NPCType<AstrumDeusBody>(), new int[] { 105, 160, 192, 224, 312 } },
|
||||
{ ModContent.NPCType<AstrumDeusTail>(), new int[] { 85, 128, 160, 192, 252 } },
|
||||
{ ModContent.NPCType<AstrumDeusBody>(), new int[] { 105, 160, 192, 224, 336 } },
|
||||
{ ModContent.NPCType<AstrumDeusTail>(), new int[] { 85, 128, 160, 192, 288 } },
|
||||
|
||||
{ ModContent.NPCType<ProfanedGuardianCommander>(), new int[] { 150, 224, 256, 288, 444 } },
|
||||
{ ModContent.NPCType<ProfanedGuardianDefender>(), new int[] { 160, 240, 264, 288, 405 } },
|
||||
@@ -566,181 +566,181 @@ namespace CalamityMod
|
||||
{ new Tuple<int, int>(ModContent.NPCType<DesertScourgeHead>(), ModContent.ProjectileType<DesertScourgeSpit>()), new int[] { 26, 36, 44, 52, 84 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<DesertNuisanceHeadYoung>(), ModContent.ProjectileType<DesertScourgeSpit>()), new int[] { 26, 36, 44, 52, 84 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.EyeofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 26, 44, 60, 76, 108 } },
|
||||
{ new Tuple<int, int>(NPCID.EyeofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 26, 44, 60, 76, 114 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BloodlettingServant>(), ProjectileID.BloodShot), new int[] { 26, 36, 44, 52, 84 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Crabulon>(), ModContent.ProjectileType<MushBomb>()), new int[] { 32, 48, 60, 72, 96 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Crabulon>(), ModContent.ProjectileType<MushBombFall>()), new int[] { 32, 48, 60, 72, 96 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Crabulon>(), ModContent.ProjectileType<MushBomb>()), new int[] { 32, 48, 60, 72, 108 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Crabulon>(), ModContent.ProjectileType<MushBombFall>()), new int[] { 32, 48, 60, 72, 108 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.EaterofWorldsHead, ProjectileID.CursedFlameHostile), new int[] { 26, 44, 60, 76, 108 } },
|
||||
{ new Tuple<int, int>(NPCID.EaterofWorldsHead, ProjectileID.CursedFlameHostile), new int[] { 26, 44, 60, 76, 114 } },
|
||||
{ new Tuple<int, int>(NPCID.EaterofWorldsHead, ModContent.ProjectileType<ShadowflameFireball>()), new int[] { 26, 36, 44, 52, 84 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.BrainofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 36, 56, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(NPCID.BrainofCthulhu, ProjectileID.BloodShot), new int[] { 26, 44, 60, 76, 108 } },
|
||||
{ new Tuple<int, int>(NPCID.Creeper, ProjectileID.BloodShot), new int[] { 26, 44, 60, 76, 108 } },
|
||||
{ new Tuple<int, int>(NPCID.BrainofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 36, 56, 68, 80, 120 } },
|
||||
{ new Tuple<int, int>(NPCID.BrainofCthulhu, ProjectileID.BloodShot), new int[] { 26, 44, 60, 76, 114 } },
|
||||
{ new Tuple<int, int>(NPCID.Creeper, ProjectileID.BloodShot), new int[] { 26, 44, 60, 76, 114 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<HiveMind>(), ModContent.ProjectileType<ShadeNimbusHostile>()), new int[] { 36, 56, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<DankCreeper>(), ModContent.ProjectileType<ShadeNimbusHostile>()), new int[] { 36, 56, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<DarkHeart>(), ModContent.ProjectileType<ShaderainHostile>()), new int[] { 36, 56, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<HiveBlob>(), ModContent.ProjectileType<VileClot>()), new int[] { 30, 48, 60, 72, 96 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<HiveBlob2>(), ModContent.ProjectileType<VileClot>()), new int[] { 30, 48, 60, 72, 96 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<HiveMind>(), ModContent.ProjectileType<ShadeNimbusHostile>()), new int[] { 36, 56, 68, 80, 120 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<DankCreeper>(), ModContent.ProjectileType<ShadeNimbusHostile>()), new int[] { 36, 56, 68, 80, 120 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<DarkHeart>(), ModContent.ProjectileType<ShaderainHostile>()), new int[] { 36, 56, 68, 80, 120 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<HiveBlob>(), ModContent.ProjectileType<VileClot>()), new int[] { 30, 48, 60, 72, 108 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<HiveBlob2>(), ModContent.ProjectileType<VileClot>()), new int[] { 30, 48, 60, 72, 108 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorHive>(), ModContent.ProjectileType<BloodGeyser>()), new int[] { 36, 56, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorHive>(), ModContent.ProjectileType<IchorShot>()), new int[] { 36, 56, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorHive>(), ModContent.ProjectileType<IchorBlob>()), new int[] { 36, 56, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorHeadMedium>(), ModContent.ProjectileType<IchorBlob>()), new int[] { 36, 56, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorBodyMedium>(), ModContent.ProjectileType<IchorBlob>()), new int[] { 36, 56, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorTailMedium>(), ModContent.ProjectileType<IchorBlob>()), new int[] { 36, 56, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorHive>(), ModContent.ProjectileType<BloodGeyser>()), new int[] { 36, 56, 68, 80, 120 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorHive>(), ModContent.ProjectileType<IchorShot>()), new int[] { 36, 56, 68, 80, 120 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorHive>(), ModContent.ProjectileType<IchorBlob>()), new int[] { 36, 56, 68, 80, 120 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorHeadMedium>(), ModContent.ProjectileType<IchorBlob>()), new int[] { 36, 56, 68, 80, 120 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorBodyMedium>(), ModContent.ProjectileType<IchorBlob>()), new int[] { 36, 56, 68, 80, 120 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorTailMedium>(), ModContent.ProjectileType<IchorBlob>()), new int[] { 36, 56, 68, 80, 120 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PerforatorHeadLarge>(), ModContent.ProjectileType<DoGDeath>()), new int[] { 22, 36, 44, 52, 84 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.QueenBee, ProjectileID.QueenBeeStinger), new int[] { 22, 44, 64, 84, 120 } },
|
||||
{ new Tuple<int, int>(NPCID.QueenBee, ProjectileID.QueenBeeStinger), new int[] { 22, 44, 64, 84, 126 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.SkeletronHead, ProjectileID.Skull), new int[] { 46, 72, 84, 96, 138 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronHead, ProjectileID.Shadowflames), new int[] { 36, 72, 88, 104, 150 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronHand, ProjectileID.Skull), new int[] { 36, 56, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronHead, ProjectileID.Skull), new int[] { 46, 72, 84, 96, 144 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronHead, ProjectileID.Shadowflames), new int[] { 36, 72, 88, 104, 156 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronHand, ProjectileID.Skull), new int[] { 36, 56, 68, 80, 120 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.Deerclops, ProjectileID.DeerclopsIceSpike), new int[] { 26, 52, 76, 100, 138 } },
|
||||
{ new Tuple<int, int>(NPCID.Deerclops, ProjectileID.DeerclopsRangedProjectile), new int[] { 36, 72, 88, 104, 150 } },
|
||||
{ new Tuple<int, int>(NPCID.Deerclops, ProjectileID.InsanityShadowHostile), new int[] { 20, 40, 60, 80, 114 } },
|
||||
{ new Tuple<int, int>(NPCID.Deerclops, ProjectileID.DeerclopsIceSpike), new int[] { 26, 52, 76, 100, 150 } },
|
||||
{ new Tuple<int, int>(NPCID.Deerclops, ProjectileID.DeerclopsRangedProjectile), new int[] { 36, 72, 88, 104, 156 } },
|
||||
{ new Tuple<int, int>(NPCID.Deerclops, ProjectileID.InsanityShadowHostile), new int[] { 20, 40, 60, 80, 120 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SlimeGodCore>(), ModContent.ProjectileType<UnstableEbonianGlob>()), new int[] { 42, 68, 84, 100, 138 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SlimeGodCore>(), ModContent.ProjectileType<UnstableCrimulanGlob>()), new int[] { 38, 60, 76, 92, 126 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<EbonianPaladin>(), ModContent.ProjectileType<UnstableEbonianGlob>()), new int[] { 42, 68, 84, 100, 138 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CrimulanPaladin>(), ModContent.ProjectileType<UnstableCrimulanGlob>()), new int[] { 38, 60, 76, 92, 126 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SplitEbonianPaladin>(), ModContent.ProjectileType<UnstableEbonianGlob>()), new int[] { 38, 60, 76, 92, 126 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SplitCrimulanPaladin>(), ModContent.ProjectileType<UnstableCrimulanGlob>()), new int[] { 34, 52, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CorruptSlimeSpawn>(), ModContent.ProjectileType<ShadeNimbusHostile>()), new int[] { 36, 56, 68, 80, 114 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CrimsonSlimeSpawn2>(), ModContent.ProjectileType<CrimsonSpike>()), new int[] { 24, 48, 60, 72, 96 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SlimeGodCore>(), ModContent.ProjectileType<UnstableEbonianGlob>()), new int[] { 42, 68, 84, 100, 150 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SlimeGodCore>(), ModContent.ProjectileType<UnstableCrimulanGlob>()), new int[] { 38, 60, 76, 92, 138 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<EbonianPaladin>(), ModContent.ProjectileType<UnstableEbonianGlob>()), new int[] { 42, 68, 84, 100, 150 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CrimulanPaladin>(), ModContent.ProjectileType<UnstableCrimulanGlob>()), new int[] { 38, 60, 76, 92, 138 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SplitEbonianPaladin>(), ModContent.ProjectileType<UnstableEbonianGlob>()), new int[] { 38, 60, 76, 92, 138 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SplitCrimulanPaladin>(), ModContent.ProjectileType<UnstableCrimulanGlob>()), new int[] { 34, 52, 68, 80, 120 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CorruptSlimeSpawn>(), ModContent.ProjectileType<ShadeNimbusHostile>()), new int[] { 36, 56, 68, 80, 120 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CrimsonSlimeSpawn2>(), ModContent.ProjectileType<CrimsonSpike>()), new int[] { 24, 48, 60, 72, 108 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.WallofFleshEye, ProjectileID.EyeLaser), new int[] { 36, 72, 88, 104, 150 } },
|
||||
{ new Tuple<int, int>(NPCID.WallofFlesh, ProjectileID.DemonSickle), new int[] { 52, 92, 112, 132, 168 } },
|
||||
{ new Tuple<int, int>(NPCID.WallofFlesh, ProjectileID.Fireball), new int[] { 36, 72, 88, 104, 150 } },
|
||||
{ new Tuple<int, int>(NPCID.WallofFleshEye, ProjectileID.EyeLaser), new int[] { 36, 72, 88, 104, 156 } },
|
||||
{ new Tuple<int, int>(NPCID.WallofFlesh, ProjectileID.DemonSickle), new int[] { 52, 92, 112, 132, 198 } },
|
||||
{ new Tuple<int, int>(NPCID.WallofFlesh, ProjectileID.Fireball), new int[] { 36, 72, 88, 104, 156 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeGelAttack), new int[] { 60, 120, 136, 152, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeSmash), new int[] { 80, 160, 188, 216, 270 } },
|
||||
{ new Tuple<int, int>(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeMinionBlueSpike), new int[] { 52, 92, 112, 132, 168 } },
|
||||
{ new Tuple<int, int>(NPCID.QueenSlimeMinionBlue, ProjectileID.QueenSlimeMinionBlueSpike), new int[] { 52, 92, 112, 132, 168 } },
|
||||
{ new Tuple<int, int>(NPCID.QueenSlimeMinionPink, ProjectileID.QueenSlimeMinionPinkBall), new int[] { 52, 92, 112, 132, 168 } },
|
||||
{ new Tuple<int, int>(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeGelAttack), new int[] { 60, 120, 136, 152, 228 } },
|
||||
{ new Tuple<int, int>(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeSmash), new int[] { 80, 160, 188, 216, 324 } },
|
||||
{ new Tuple<int, int>(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeMinionBlueSpike), new int[] { 52, 92, 112, 132, 198 } },
|
||||
{ new Tuple<int, int>(NPCID.QueenSlimeMinionBlue, ProjectileID.QueenSlimeMinionBlueSpike), new int[] { 52, 92, 112, 132, 198 } },
|
||||
{ new Tuple<int, int>(NPCID.QueenSlimeMinionPink, ProjectileID.QueenSlimeMinionPinkBall), new int[] { 52, 92, 112, 132, 198 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Cryogen>(), ModContent.ProjectileType<IceBlast>()), new int[] { 52, 92, 112, 132, 168 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Cryogen>(), ModContent.ProjectileType<IceBomb>()), new int[] { 70, 120, 136, 152, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Cryogen>(), ModContent.ProjectileType<IceRain>()), new int[] { 60, 100, 120, 140, 180 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CryogenShield>(), ModContent.ProjectileType<IceBlast>()), new int[] { 52, 92, 112, 132, 168 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Cryogen>(), ModContent.ProjectileType<IceBlast>()), new int[] { 52, 92, 112, 132, 198 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Cryogen>(), ModContent.ProjectileType<IceBomb>()), new int[] { 70, 120, 136, 152, 228 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Cryogen>(), ModContent.ProjectileType<IceRain>()), new int[] { 60, 100, 120, 140, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CryogenShield>(), ModContent.ProjectileType<IceBlast>()), new int[] { 52, 92, 112, 132, 198 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.Retinazer, ProjectileID.EyeLaser), new int[] { 40, 92, 116, 140, 174 } },
|
||||
{ new Tuple<int, int>(NPCID.Retinazer, ProjectileID.EyeLaser), new int[] { 40, 92, 116, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.Retinazer, ProjectileID.DeathLaser), new int[] {
|
||||
50, // 38 in rapid fire
|
||||
108, // 81 in rapid fire
|
||||
132, // 99 in rapid fire
|
||||
156, // 117 in rapid fire
|
||||
186 } }, // 139 in rapid fire
|
||||
{ new Tuple<int, int>(NPCID.Retinazer, ModContent.ProjectileType<ScavengerLaser>()), new int[] { 70, 120, 136, 152, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.Spazmatism, ProjectileID.CursedFlameHostile), new int[] { 50, 100, 120, 140, 180 } },
|
||||
{ new Tuple<int, int>(NPCID.Spazmatism, ProjectileID.EyeFire), new int[] { 60, 120, 148, 176, 222 } },
|
||||
{ new Tuple<int, int>(NPCID.Spazmatism, ModContent.ProjectileType<Shadowflamethrower>()), new int[] { 70, 120, 148, 176, 222 } },
|
||||
{ new Tuple<int, int>(NPCID.Spazmatism, ModContent.ProjectileType<ShadowflameFireball>()), new int[] { 60, 100, 128, 156, 192 } },
|
||||
234 } }, // 176 in rapid fire
|
||||
{ new Tuple<int, int>(NPCID.Retinazer, ModContent.ProjectileType<ScavengerLaser>()), new int[] { 70, 120, 136, 152, 228 } },
|
||||
{ new Tuple<int, int>(NPCID.Spazmatism, ProjectileID.CursedFlameHostile), new int[] { 50, 100, 120, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.Spazmatism, ProjectileID.EyeFire), new int[] { 60, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.Spazmatism, ModContent.ProjectileType<Shadowflamethrower>()), new int[] { 70, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.Spazmatism, ModContent.ProjectileType<ShadowflameFireball>()), new int[] { 60, 100, 128, 156, 234 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AquaticScourgeHead>(), ModContent.ProjectileType<SulphuricAcidMist>()), new int[] { 60, 100, 120, 140, 180 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AquaticScourgeHead>(), ModContent.ProjectileType<SandPoisonCloud>()), new int[] { 70, 120, 136, 152, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AquaticScourgeHead>(), ModContent.ProjectileType<ToxicCloud>()), new int[] { 80, 140, 160, 180, 240 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AquaticScourgeBody>(), ModContent.ProjectileType<SandTooth>()), new int[] { 66, 112, 128, 144, 198 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AquaticScourgeHead>(), ModContent.ProjectileType<SulphuricAcidMist>()), new int[] { 60, 100, 120, 140, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AquaticScourgeHead>(), ModContent.ProjectileType<SandPoisonCloud>()), new int[] { 70, 120, 136, 152, 228 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AquaticScourgeHead>(), ModContent.ProjectileType<ToxicCloud>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AquaticScourgeBody>(), ModContent.ProjectileType<SandTooth>()), new int[] { 66, 112, 128, 144, 216 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.TheDestroyer, ProjectileID.DeathLaser), new int[] { 44, 96, 116, 136, 174 } },
|
||||
{ new Tuple<int, int>(NPCID.TheDestroyer, ModContent.ProjectileType<DestroyerCursedLaser>()), new int[] { 46, 108, 128, 148, 192 } },
|
||||
{ new Tuple<int, int>(NPCID.TheDestroyer, ModContent.ProjectileType<DestroyerElectricLaser>()), new int[] { 48, 116, 136, 156, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.TheDestroyerBody, ProjectileID.DeathLaser), new int[] { 44, 96, 116, 136, 174 } },
|
||||
{ new Tuple<int, int>(NPCID.TheDestroyerBody, ModContent.ProjectileType<DestroyerCursedLaser>()), new int[] { 46, 108, 128, 148, 192 } },
|
||||
{ new Tuple<int, int>(NPCID.TheDestroyerBody, ModContent.ProjectileType<DestroyerElectricLaser>()), new int[] { 48, 116, 136, 156, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.Probe, ProjectileID.PinkLaser), new int[] { 50, 88, 100, 112, 162 } },
|
||||
{ new Tuple<int, int>(NPCID.TheDestroyer, ProjectileID.DeathLaser), new int[] { 44, 96, 116, 136, 204 } },
|
||||
{ new Tuple<int, int>(NPCID.TheDestroyer, ModContent.ProjectileType<DestroyerCursedLaser>()), new int[] { 46, 108, 128, 148, 222 } },
|
||||
{ new Tuple<int, int>(NPCID.TheDestroyer, ModContent.ProjectileType<DestroyerElectricLaser>()), new int[] { 48, 116, 136, 156, 234 } },
|
||||
{ new Tuple<int, int>(NPCID.TheDestroyerBody, ProjectileID.DeathLaser), new int[] { 44, 96, 116, 136, 204 } },
|
||||
{ new Tuple<int, int>(NPCID.TheDestroyerBody, ModContent.ProjectileType<DestroyerCursedLaser>()), new int[] { 46, 108, 128, 148, 222 } },
|
||||
{ new Tuple<int, int>(NPCID.TheDestroyerBody, ModContent.ProjectileType<DestroyerElectricLaser>()), new int[] { 48, 116, 136, 156, 234 } },
|
||||
{ new Tuple<int, int>(NPCID.Probe, ProjectileID.PinkLaser), new int[] { 50, 88, 100, 112, 168 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneHellfireball>()), new int[] { 80, 140, 160, 180, 240 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 70, 112, 128, 144, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneHellblast>()), new int[] { 80, 140, 160, 180, 240 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneRay>()), new int[] { 120, 200, 240, 280, 360 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Brimling>(), ModContent.ProjectileType<BrimstoneHellfireball>()), new int[] { 80, 140, 160, 180, 240 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Brimling>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 70, 112, 128, 144, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneHellfireball>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 70, 112, 128, 144, 216 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneHellblast>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneRay>()), new int[] { 120, 200, 240, 280, 420 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Brimling>(), ModContent.ProjectileType<BrimstoneHellfireball>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Brimling>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 70, 112, 128, 144, 216 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.Skull), new int[] { 50, 108, 124, 140, 186 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 186 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 222 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.Skull), new int[] { 50, 108, 124, 140, 186 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 180, 200, 240 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.FrostBeam), new int[] { 50, 108, 124, 140, 186 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeCannon, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 222 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeCannon, ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 0, 0, 240 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeLaser, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 186 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 180, 200, 300 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.FrostBeam), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeCannon, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeCannon, ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 0, 0, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeLaser, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CalamitasClone>(), ModContent.ProjectileType<BrimstoneHellblast>()), new int[] { 80, 140, 160, 180, 240 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CalamitasClone>(), ModContent.ProjectileType<BrimstoneHellfireball>()), new int[] { 80, 140, 160, 180, 240 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CalamitasClone>(), ModContent.ProjectileType<BrimstoneHellblast2>()), new int[] { 80, 140, 160, 180, 240 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CalamitasClone>(), ModContent.ProjectileType<SCalBrimstoneFireblast>()), new int[] { 80, 140, 160, 180, 240 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CalamitasClone>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 70, 112, 128, 144, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Cataclysm>(), ModContent.ProjectileType<BrimstoneFire>()), new int[] { 80, 140, 160, 180, 240 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Catastrophe>(), ModContent.ProjectileType<BrimstoneBall>()), new int[] { 70, 112, 128, 144, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SoulSeeker>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 70, 112, 128, 144, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CalamitasClone>(), ModContent.ProjectileType<BrimstoneHellblast>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CalamitasClone>(), ModContent.ProjectileType<BrimstoneHellfireball>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CalamitasClone>(), ModContent.ProjectileType<BrimstoneHellblast2>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CalamitasClone>(), ModContent.ProjectileType<SCalBrimstoneFireblast>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<CalamitasClone>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 70, 112, 128, 144, 216 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Cataclysm>(), ModContent.ProjectileType<BrimstoneFire>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Catastrophe>(), ModContent.ProjectileType<BrimstoneBall>()), new int[] { 70, 112, 128, 144, 216 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SoulSeeker>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 70, 112, 128, 144, 216 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ProjectileID.SeedPlantera), new int[] { 52, 96, 128, 160, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ProjectileID.PoisonSeedPlantera), new int[] { 62, 116, 144, 172, 222 } },
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ProjectileID.ThornBall), new int[] { 72, 132, 160, 188, 240 } },
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ModContent.ProjectileType<SporeGasPlantera>()), new int[] { 80, 140, 160, 180, 240 } },
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ModContent.ProjectileType<HomingGasBulb>()), new int[] { 80, 140, 160, 180, 240 } },
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ProjectileID.SeedPlantera), new int[] { 52, 96, 128, 160, 240 } },
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ProjectileID.PoisonSeedPlantera), new int[] { 62, 116, 144, 172, 258 } },
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ProjectileID.ThornBall), new int[] { 72, 132, 160, 188, 282 } },
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ModContent.ProjectileType<SporeGasPlantera>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(NPCID.Plantera, ModContent.ProjectileType<HomingGasBulb>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.HallowBoss, ProjectileID.HallowBossRainbowStreak), new int[] { 100, 152, 172, 192, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.HallowBoss, ProjectileID.FairyQueenSunDance), new int[] { 120, 180, 204, 228, 360 } },
|
||||
{ new Tuple<int, int>(NPCID.HallowBoss, ProjectileID.HallowBossLastingRainbow), new int[] { 100, 152, 172, 192, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.HallowBoss, ProjectileID.FairyQueenLance), new int[] { 130, 196, 216, 236, 390 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Leviathan>(), ModContent.ProjectileType<LeviathanBomb>()), new int[] { 100, 172, 208, 244, 300 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Anahita>(), ModContent.ProjectileType<WaterSpear>()), new int[] { 80, 140, 160, 180, 240 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Anahita>(), ModContent.ProjectileType<FrostMist>()), new int[] { 84, 148, 172, 196, 252 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Anahita>(), ModContent.ProjectileType<SirenSong>()), new int[] { 88, 156, 184, 212, 264 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Leviathan>(), ModContent.ProjectileType<LeviathanBomb>()), new int[] { 100, 172, 208, 244, 366 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Anahita>(), ModContent.ProjectileType<WaterSpear>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Anahita>(), ModContent.ProjectileType<FrostMist>()), new int[] { 84, 148, 172, 196, 294 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Anahita>(), ModContent.ProjectileType<SirenSong>()), new int[] { 88, 156, 184, 212, 318 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AstrumAureus>(), ModContent.ProjectileType<AstralLaser>()), new int[] { 88, 156, 184, 212, 264 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AstrumAureus>(), ModContent.ProjectileType<AstralFlame>()), new int[] { 100, 172, 208, 244, 300 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AureusSpawn>(), ModContent.ProjectileType<AstralLaser>()), new int[] { 88, 156, 184, 212, 264 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AstrumAureus>(), ModContent.ProjectileType<AstralLaser>()), new int[] { 88, 156, 184, 212, 318 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AstrumAureus>(), ModContent.ProjectileType<AstralFlame>()), new int[] { 100, 172, 208, 244, 366 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AureusSpawn>(), ModContent.ProjectileType<AstralLaser>()), new int[] { 88, 156, 184, 212, 318 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.Golem, ProjectileID.Fireball), new int[] { 72, 132, 160, 188, 234 } },
|
||||
{ new Tuple<int, int>(NPCID.Golem, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 246 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHead, ProjectileID.Fireball), new int[] { 60, 120, 160, 200, 240 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHead, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 246 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemFistLeft, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemFistRight, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHeadFree, ProjectileID.Fireball), new int[] { 60, 120, 160, 200, 240 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHeadFree, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 246 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHeadFree, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.Golem, ProjectileID.Fireball), new int[] { 72, 132, 160, 188, 282 } },
|
||||
{ new Tuple<int, int>(NPCID.Golem, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 306 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHead, ProjectileID.Fireball), new int[] { 60, 120, 160, 200, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHead, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 306 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemFistLeft, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 318 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemFistRight, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 318 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHeadFree, ProjectileID.Fireball), new int[] { 60, 120, 160, 200, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHeadFree, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 306 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHeadFree, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 318 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PlaguebringerGoliath>(), ModContent.ProjectileType<PlagueStingerGoliath>()), new int[] { 88, 156, 184, 212, 264 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PlaguebringerGoliath>(), ModContent.ProjectileType<PlagueStingerGoliathV2>()), new int[] { 88, 156, 184, 212, 264 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PlaguebringerGoliath>(), ModContent.ProjectileType<HiveBombGoliath>()), new int[] { 120, 192, 220, 248, 360 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PlaguebringerGoliath>(), ModContent.ProjectileType<PlagueStingerGoliath>()), new int[] { 88, 156, 184, 212, 318 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PlaguebringerGoliath>(), ModContent.ProjectileType<PlagueStingerGoliathV2>()), new int[] { 88, 156, 184, 212, 318 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<PlaguebringerGoliath>(), ModContent.ProjectileType<HiveBombGoliath>()), new int[] { 120, 192, 220, 248, 372 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.DukeFishron, ProjectileID.Sharknado), new int[] { 80, 100, 150, 200, 240 } },
|
||||
{ new Tuple<int, int>(NPCID.DukeFishron, ProjectileID.Sharknado), new int[] { 80, 100, 150, 200, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.DukeFishron, ProjectileID.Cthulunado), new int[] { 160, 200, 232, 264, 480 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<RavagerBody>(), ModContent.ProjectileType<RavagerBlaster>()), new int[] { 120, 180, 208, 236, 360 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<RavagerHead>(), ModContent.ProjectileType<ScavengerNuke>()), new int[] { 120, 180, 208, 236, 360 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<RavagerHead2>(), ModContent.ProjectileType<ScavengerLaser>()), new int[] { 90, 144, 172, 200, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<RavagerHead2>(), ModContent.ProjectileType<ScavengerLaser>()), new int[] { 90, 144, 172, 200, 300 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<RavagerHead2>(), ModContent.ProjectileType<ScavengerNuke>()), new int[] { 120, 180, 208, 236, 360 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<FlamePillar>(), ModContent.ProjectileType<RavagerFlame>()), new int[] { 90, 144, 172, 200, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<FlamePillar>(), ModContent.ProjectileType<RavagerFlame>()), new int[] { 90, 144, 172, 200, 300 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.CultistBoss, ProjectileID.CultistBossFireBall), new int[] { 88, 156, 184, 212, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.CultistBoss, ProjectileID.CultistBossFireBall), new int[] { 88, 156, 184, 212, 318 } },
|
||||
{ new Tuple<int, int>(NPCID.CultistBoss, ProjectileID.CultistBossIceMist), new int[] { 120, 180, 208, 236, 360 } },
|
||||
{ new Tuple<int, int>(NPCID.CultistBoss, ProjectileID.CultistBossLightningOrb), new int[] { 120, 192, 220, 248, 360 } },
|
||||
{ new Tuple<int, int>(NPCID.CultistBossClone, ProjectileID.CultistBossFireBallClone), new int[] { 90, 144, 172, 200, 270 } },
|
||||
{ new Tuple<int, int>(NPCID.AncientDoom, ProjectileID.AncientDoomProjectile), new int[] { 88, 156, 184, 212, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.CultistBoss, ProjectileID.CultistBossLightningOrb), new int[] { 120, 192, 220, 248, 372 } },
|
||||
{ new Tuple<int, int>(NPCID.CultistBossClone, ProjectileID.CultistBossFireBallClone), new int[] { 90, 144, 172, 200, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.AncientDoom, ProjectileID.AncientDoomProjectile), new int[] { 88, 156, 184, 212, 318 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AstrumDeusBody>(), ModContent.ProjectileType<AstralShot2>()), new int[] { 90, 152, 176, 200, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AstrumDeusBody>(), ModContent.ProjectileType<AstralShot2>()), new int[] { 90, 152, 176, 200, 300 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AstrumDeusBody>(), ModContent.ProjectileType<DeusMine>()), new int[] { 120, 180, 208, 236, 360 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AstrumDeusBody>(), ModContent.ProjectileType<AstralGodRay>()), new int[] { 100, 172, 192, 212, 300 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AstrumDeusBody>(), ModContent.ProjectileType<AstralGodRay>()), new int[] { 100, 172, 192, 212, 318 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.MoonLordHead, ProjectileID.PhantasmalDeathray), new int[] { 200, 300, 380, 460, 600 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordHead, ProjectileID.PhantasmalBolt), new int[] { 90, 120, 160, 200, 270 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordHand, ProjectileID.PhantasmalEye), new int[] { 90, 120, 160, 200, 270 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordHand, ProjectileID.PhantasmalSphere), new int[] { 120, 160, 220, 280, 360 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordHand, ProjectileID.PhantasmalBolt), new int[] { 90, 120, 160, 200, 270 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalBolt), new int[] { 100, 140, 180, 220, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalEye), new int[] { 100, 140, 180, 220, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordHead, ProjectileID.PhantasmalDeathray), new int[] { 200, 300, 380, 460, 690 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordHead, ProjectileID.PhantasmalBolt), new int[] { 90, 120, 160, 200, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordHand, ProjectileID.PhantasmalEye), new int[] { 90, 120, 160, 200, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordHand, ProjectileID.PhantasmalSphere), new int[] { 120, 160, 220, 280, 420 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordHand, ProjectileID.PhantasmalBolt), new int[] { 90, 120, 160, 200, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalBolt), new int[] { 100, 140, 180, 220, 330 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalEye), new int[] { 100, 140, 180, 220, 330 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalSphere), new int[] { 132, 176, 220, 264, 396 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalDeathray), new int[] { 150, 200, 260, 320, 450 } },
|
||||
{ new Tuple<int, int>(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalDeathray), new int[] { 150, 200, 260, 320, 480 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<ProfanedGuardianCommander>(), ModContent.ProjectileType<ProfanedSpear>()), new int[] { 140, 220, 244, 268, 420 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<ProfanedGuardianCommander>(), ModContent.ProjectileType<HolySpear>()), new int[] { 140, 220, 244, 268, 420 } },
|
||||
|
||||
@@ -65,10 +65,10 @@ namespace CalamityMod.Events
|
||||
{
|
||||
get
|
||||
{
|
||||
for (int i = 0; i < Main.npc.Length; i++)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
if (Main.npc[i].active && (PossibleMinibossesAS.Select(miniboss => miniboss.Key).Contains(Main.npc[i].type) ||
|
||||
PossibleMinibossesPolter.Select(miniboss => miniboss.Key).Contains(Main.npc[i].type)))
|
||||
if ((PossibleMinibossesAS.Select(miniboss => miniboss.Key).Contains(npc.type) ||
|
||||
PossibleMinibossesPolter.Select(miniboss => miniboss.Key).Contains(npc.type)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -107,14 +107,8 @@ namespace CalamityMod.Events
|
||||
{
|
||||
get
|
||||
{
|
||||
int playerCount = 0;
|
||||
for (int i = 0; i < Main.player.Length; i++)
|
||||
{
|
||||
if (Main.player[i].active)
|
||||
{
|
||||
playerCount++;
|
||||
}
|
||||
}
|
||||
int playerCount = Main.CurrentFrameFlags.ActivePlayersCount;
|
||||
|
||||
if (DownedBossSystem.downedPolterghast)
|
||||
return (int)(Math.Log(playerCount + Math.E - 1) * 170f);
|
||||
else if (DownedBossSystem.downedAquaticScourge)
|
||||
@@ -189,12 +183,7 @@ namespace CalamityMod.Events
|
||||
if (AcidRainEventIsOngoing || (!NPC.downedBoss1 && !Main.hardMode && !DownedBossSystem.downedAquaticScourge) || BossRushEvent.BossRushActive)
|
||||
return;
|
||||
|
||||
int playerCount = 0;
|
||||
for (int i = 0; i < Main.player.Length; i++)
|
||||
{
|
||||
if (Main.player[i].active)
|
||||
playerCount++;
|
||||
}
|
||||
int playerCount = Main.CurrentFrameFlags.ActivePlayersCount;
|
||||
|
||||
if (playerCount > 0)
|
||||
{
|
||||
@@ -243,12 +232,8 @@ namespace CalamityMod.Events
|
||||
if (!HasStartedAcidicDownpour)
|
||||
{
|
||||
int sulphSeaWidth = SulphurousSea.BiomeWidth;
|
||||
for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
Player player = Main.player[playerIndex];
|
||||
if (!player.active)
|
||||
continue;
|
||||
|
||||
// An artificial biome can be made, and therefore, the event could be started by an artificial biome.
|
||||
// While fighting the event in an artificial biome is not bad, having it be started by a patch of Sulphurous Sand
|
||||
// would definitely be strange.
|
||||
@@ -387,11 +372,9 @@ namespace CalamityMod.Events
|
||||
if ((int)Main.time == (int)(Main.nightLength - 1f) && !Main.dayTime && Main.rand.NextBool(increasedEventChance ? 3 : 300))
|
||||
{
|
||||
bool shouldNotStartEvent = false;
|
||||
for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
if (!Main.player[playerIndex].active)
|
||||
continue;
|
||||
if (Main.player[playerIndex].Calamity().noStupidNaturalARSpawns)
|
||||
if (player.Calamity().noStupidNaturalARSpawns)
|
||||
{
|
||||
shouldNotStartEvent = true;
|
||||
break;
|
||||
@@ -407,9 +390,9 @@ namespace CalamityMod.Events
|
||||
// Attempt to force an Acid Rain immediately after the EoC is dead when someone wanders to the sea.
|
||||
if (NPC.downedBoss1 && !DownedBossSystem.downedEoCAcidRain && !HasBeenForceStartedByEoCDefeat)
|
||||
{
|
||||
for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
if (Main.player[playerIndex].active && Main.player[playerIndex].Calamity().ZoneSulphur)
|
||||
if (player.Calamity().ZoneSulphur)
|
||||
{
|
||||
HasBeenForceStartedByEoCDefeat = true;
|
||||
TryStartEvent();
|
||||
|
||||
@@ -320,14 +320,10 @@ namespace CalamityMod.Events
|
||||
|
||||
new Boss(ModContent.NPCType<CeaselessVoid>(), spawnContext: type =>
|
||||
{
|
||||
for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++)
|
||||
foreach (Player p in Main.ActivePlayers)
|
||||
{
|
||||
Player p = Main.player[playerIndex];
|
||||
if (p is not null && p.active)
|
||||
{
|
||||
if (p.FindBuffIndex(ModContent.BuffType<IcarusFolly>()) > -1)
|
||||
p.ClearBuff(ModContent.BuffType<IcarusFolly>());
|
||||
}
|
||||
if (p.FindBuffIndex(ModContent.BuffType<IcarusFolly>()) > -1)
|
||||
p.ClearBuff(ModContent.BuffType<IcarusFolly>());
|
||||
}
|
||||
|
||||
Player player = Main.player[ClosestPlayerToWorldCenter];
|
||||
@@ -415,19 +411,15 @@ namespace CalamityMod.Events
|
||||
BossRushDialogueSystem.StartDialogue(BossRushDialoguePhase.TierOneComplete);
|
||||
|
||||
// Teleport players to where they came from
|
||||
for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++)
|
||||
foreach (Player p in Main.ActivePlayers)
|
||||
{
|
||||
Player p = Main.player[playerIndex];
|
||||
if (p is not null && p.active)
|
||||
if (p.Calamity().BossRushReturnPosition.HasValue)
|
||||
{
|
||||
if (p.Calamity().BossRushReturnPosition.HasValue)
|
||||
{
|
||||
CalamityPlayer.ModTeleport(p, p.Calamity().BossRushReturnPosition.Value, false, TeleportationStyleID.TeleportationPotion);
|
||||
p.Calamity().BossRushReturnPosition = null;
|
||||
}
|
||||
CalamityPlayer.ModTeleport(p, p.Calamity().BossRushReturnPosition.Value, false, TeleportationStyleID.TeleportationPotion);
|
||||
p.Calamity().BossRushReturnPosition = null;
|
||||
SoundEngine.PlaySound(TeleportSound with { Volume = 1.6f }, p.Center);
|
||||
}
|
||||
p.Calamity().BossRushReturnPosition = null;
|
||||
SoundEngine.PlaySound(TeleportSound with { Volume = 1.6f }, p.Center);
|
||||
}
|
||||
},
|
||||
// Plantera: End of Tier 2
|
||||
@@ -489,6 +481,10 @@ namespace CalamityMod.Events
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!BossRushActive)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
int tier = CurrentTier;
|
||||
if (CalamityMod.Instance.musicMod != null)
|
||||
{
|
||||
@@ -589,7 +585,7 @@ namespace CalamityMod.Events
|
||||
|
||||
// Increase cooldown post-Moon Lord.
|
||||
if (BossRushStage >= Bosses.FindIndex(boss => boss.EntityID == NPCID.MoonLordCore))
|
||||
BossRushSpawnCountdown += 300;
|
||||
BossRushSpawnCountdown += 180;
|
||||
|
||||
// Override the spawn countdown if specified.
|
||||
if (BossRushStage < Bosses.Count - 1 && Bosses[BossRushStage + 1].SpecialSpawnCountdown != -1)
|
||||
@@ -624,13 +620,9 @@ namespace CalamityMod.Events
|
||||
public static void End()
|
||||
{
|
||||
// Reset BossRushReturnPosition
|
||||
for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++)
|
||||
foreach (Player p in Main.ActivePlayers)
|
||||
{
|
||||
Player p = Main.player[playerIndex];
|
||||
if (p is not null && p.active)
|
||||
{
|
||||
p.Calamity().BossRushReturnPosition = null;
|
||||
}
|
||||
p.Calamity().BossRushReturnPosition = null;
|
||||
}
|
||||
|
||||
if (Main.netMode == NetmodeID.SinglePlayer)
|
||||
@@ -731,18 +723,14 @@ namespace CalamityMod.Events
|
||||
CalamityUtils.KillAllHostileProjectiles();
|
||||
HostileProjectileKillCounter = 3;
|
||||
|
||||
for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++)
|
||||
foreach (Player p in Main.ActivePlayers)
|
||||
{
|
||||
Player p = Main.player[playerIndex];
|
||||
if (p is not null && p.active)
|
||||
{
|
||||
p.Calamity().BossRushReturnPosition = p.Center;
|
||||
Vector2? underworld = CalamityPlayer.GetUnderworldPosition(p);
|
||||
if (!underworld.HasValue)
|
||||
break;
|
||||
CalamityPlayer.ModTeleport(p, underworld.Value, false, TeleportationStyleID.TeleportationPotion);
|
||||
SoundEngine.PlaySound(TeleportSound with { Volume = 1.6f }, p.Center);
|
||||
}
|
||||
p.Calamity().BossRushReturnPosition = p.Center;
|
||||
Vector2? underworld = CalamityPlayer.GetUnderworldPosition(p);
|
||||
if (!underworld.HasValue)
|
||||
break;
|
||||
CalamityPlayer.ModTeleport(p, underworld.Value, false, TeleportationStyleID.TeleportationPotion);
|
||||
SoundEngine.PlaySound(TeleportSound with { Volume = 1.6f }, p.Center);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -790,12 +778,12 @@ namespace CalamityMod.Events
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player p in Main.ActivePlayers)
|
||||
{
|
||||
if (!Main.player[i].active || Main.player[i].dead)
|
||||
if (p.dead)
|
||||
continue;
|
||||
|
||||
int animation = Projectile.NewProjectile(new EntitySource_WorldEvent(), Main.player[i].Center, Vector2.Zero, ModContent.ProjectileType<BossRushTierAnimation>(), 0, 0f, i);
|
||||
int animation = Projectile.NewProjectile(new EntitySource_WorldEvent(), p.Center, Vector2.Zero, ModContent.ProjectileType<BossRushTierAnimation>(), 0, 0f, p.whoAmI);
|
||||
if (Main.projectile.IndexInRange(animation))
|
||||
Main.projectile[animation].ai[0] = tier;
|
||||
}
|
||||
|
||||
@@ -136,8 +136,12 @@ namespace CalamityMod.Graphics.Metaballs
|
||||
}
|
||||
|
||||
// Draw gruesome eminence ghost heads.
|
||||
foreach (Projectile eminence in CalamityUtils.AllProjectilesByID(ModContent.ProjectileType<SpiritCongregation>()))
|
||||
eminence.ModProjectile<SpiritCongregation>().DrawHeadForMetaball();
|
||||
int eminenceType = ModContent.ProjectileType<SpiritCongregation>();
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (p.type == eminenceType)
|
||||
p.ModProjectile<SpiritCongregation>().DrawHeadForMetaball();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -65,12 +65,10 @@ namespace CalamityMod.Graphics.Primitives
|
||||
var afterProjectiles = new List<IPixelatedPrimitiveRenderer>();
|
||||
|
||||
// Check every active projectile.
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile projectile in Main.ActiveProjectiles)
|
||||
{
|
||||
var projectile = Main.projectile[i];
|
||||
|
||||
// If the projectile is active, a mod projectile, and uses the interface, add it to the list of primitives to draw this frame.
|
||||
if (projectile.active && projectile.ModProjectile != null && projectile.ModProjectile is IPixelatedPrimitiveRenderer pixelPrimitiveProjectile)
|
||||
if (projectile.ModProjectile != null && projectile.ModProjectile is IPixelatedPrimitiveRenderer pixelPrimitiveProjectile)
|
||||
{
|
||||
var listToUse = pixelPrimitiveProjectile.LayerToRenderTo switch
|
||||
{
|
||||
@@ -84,12 +82,10 @@ namespace CalamityMod.Graphics.Primitives
|
||||
}
|
||||
|
||||
// Check every active NPC.
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
var npc = Main.npc[i];
|
||||
|
||||
// If the NPC is active, a mod NPC, and uses the interface, add it to the list of primitives to draw this frame.
|
||||
if (npc.active && npc.ModNPC != null && npc.ModNPC is IPixelatedPrimitiveRenderer pixelPrimitiveNPC)
|
||||
if (npc.ModNPC != null && npc.ModNPC is IPixelatedPrimitiveRenderer pixelPrimitiveNPC)
|
||||
{
|
||||
var listToUse = pixelPrimitiveNPC.LayerToRenderTo switch
|
||||
{
|
||||
|
||||
@@ -89,14 +89,12 @@ namespace CalamityMod.Graphics.Renderers.CalamityRenderers
|
||||
ActuallyDoPreDraw = true;
|
||||
|
||||
// Draw every npc to a single target that should have the miracle blight visual.
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
// Extra check to ensure that index errors will not occur. If not in range, something has gone wrong and the loop should terminate.
|
||||
if (!Main.npc.IndexInRange(i))
|
||||
if (!Main.npc.IndexInRange(npc.whoAmI))
|
||||
break;
|
||||
|
||||
NPC npc = Main.npc[i];
|
||||
|
||||
if (ValidToDraw(npc))
|
||||
Main.instance.DrawNPC(npc.whoAmI, npc.behindTiles);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
#endregion
|
||||
|
||||
#region Soaring Insignia Changes
|
||||
#region Remove Soaring Insignia Infinite Flight
|
||||
private static void RemoveSoaringInsigniaInfiniteWingTime(ILContext il)
|
||||
{
|
||||
// Prevent the infinite flight effect.
|
||||
@@ -42,34 +42,6 @@ namespace CalamityMod.ILEditing
|
||||
cursor.Emit(OpCodes.Ldc_I4_0);
|
||||
cursor.Emit(OpCodes.And);
|
||||
}
|
||||
|
||||
private static void NerfSoaringInsigniaRunAcceleration(ILContext il)
|
||||
{
|
||||
// Nerf the run acceleration boost from 1.75x to 1.1x.
|
||||
var cursor = new ILCursor(il);
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld<Player>("empressBrooch")))
|
||||
{
|
||||
LogFailure("Soaring Insignia Mobility Nerf", "Could not locate the Soaring Insignia bool.");
|
||||
return;
|
||||
}
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(1.75f)))
|
||||
{
|
||||
LogFailure("Soaring Insignia Mobility Nerf", "Could not locate the Soaring Insignia run acceleration multiplier.");
|
||||
return;
|
||||
}
|
||||
cursor.Next.Operand = 1.1f;
|
||||
|
||||
// Prevent the rocket boots infinite flight effect.
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld<Player>("empressBrooch")))
|
||||
{
|
||||
LogFailure("Soaring Insignia Mobility Nerf", "Could not locate the Soaring Insignia bool.");
|
||||
return;
|
||||
}
|
||||
|
||||
// AND with 0 (false) so that the Soaring Insignia is never considered equipped and thus infinite rocket boots never triggers.
|
||||
cursor.Emit(OpCodes.Ldc_I4_0);
|
||||
cursor.Emit(OpCodes.And);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Jump Height Changes
|
||||
@@ -258,6 +230,78 @@ namespace CalamityMod.ILEditing
|
||||
cursor.Emit(OpCodes.Ldc_R4, iceSkateTopSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
private static void NerfOverpoweredRunAccelerationSources(ILContext il)
|
||||
{
|
||||
// First: Soaring Insignia. Find the check for whether it's equipped for run speeds.
|
||||
var cursor = new ILCursor(il);
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld<Player>("empressBrooch")))
|
||||
{
|
||||
LogFailure("Run Acceleration Nerfs", "Could not locate the Soaring Insignia bool.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(1.75f)))
|
||||
{
|
||||
LogFailure("Run Acceleration Nerfs", "Could not locate the Soaring Insignia run acceleration multiplier.");
|
||||
return;
|
||||
}
|
||||
cursor.Next.Operand = BalancingConstants.SoaringInsigniaRunAccelerationMultiplier;
|
||||
|
||||
// Second: Magiluminescence. Find the check for whether it's equipped for run speeds.
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld<Player>("hasMagiluminescence")))
|
||||
{
|
||||
LogFailure("Run Acceleration Nerfs", "Could not locate the Magiluminescence bool.");
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Don't actually do anything. Magiluminescence is not intended to be nerfed by Calamity.
|
||||
//
|
||||
|
||||
// Third: Shadow Armor. Find the check for whether it's equipped for run speeds.
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld<Player>("shadowArmor")))
|
||||
{
|
||||
LogFailure("Run Acceleration Nerfs", "Could not locate the Shadow Armor bool.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Load the player onto the stack as an argument to the following delegate.
|
||||
// Emit a delegate which consumes the Shadow Armor bool, performs Calamity effects, then always returns false.
|
||||
// Returning false ensures vanilla Shadow Armor code never runs.
|
||||
cursor.Emit(OpCodes.Ldarg_0);
|
||||
|
||||
cursor.EmitDelegate((bool shadowArmor, Player p) => {
|
||||
// If you don't even have Shadow Armor equipped, do nothing.
|
||||
if (!shadowArmor)
|
||||
return 0;
|
||||
|
||||
// Shadow Armor does not stack with Magiluminescence if you are on the ground.
|
||||
if (p.hasMagiluminescence && p.velocity.Y == 0)
|
||||
return 0;
|
||||
|
||||
// Shadow Armor grants reduced movement bonuses if in the air, or on the ground WITHOUT Magiluminescence.
|
||||
p.runAcceleration *= BalancingConstants.ShadowArmorRunAccelerationMultiplier;
|
||||
p.maxRunSpeed *= BalancingConstants.ShadowArmorMaxRunSpeedMultiplier;
|
||||
p.accRunSpeed *= BalancingConstants.ShadowArmorAccRunSpeedMultiplier;
|
||||
p.runSlowdown *= BalancingConstants.ShadowArmorRunSlowdownMultiplier;
|
||||
|
||||
// Vanilla Shadow Armor behavior should still always be skipped.
|
||||
return 0;
|
||||
});
|
||||
|
||||
|
||||
// Finally: Back to Soaring Insignia. Prevent the rocket boots infinite flight effect, since it's in the same function.
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld<Player>("empressBrooch")))
|
||||
{
|
||||
LogFailure("Run Acceleration Nerfs", "Could not locate the Soaring Insignia bool.");
|
||||
return;
|
||||
}
|
||||
|
||||
// AND with 0 (false) so that the Soaring Insignia is never considered equipped and thus infinite rocket boots never triggers.
|
||||
cursor.Emit(OpCodes.Ldc_I4_0);
|
||||
cursor.Emit(OpCodes.And);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Life Regen Changes
|
||||
|
||||
@@ -13,6 +13,7 @@ using Terraria.GameContent.Liquid;
|
||||
using Terraria.GameContent.UI.Elements;
|
||||
using Terraria.GameContent.UI.States;
|
||||
using Terraria.Graphics.Light;
|
||||
using Terraria.Map;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.ILEditing
|
||||
@@ -106,7 +107,7 @@ namespace CalamityMod.ILEditing
|
||||
IL_Player.UpdateJumpHeight += FixJumpHeightBoosts;
|
||||
IL_Player.Update += BaseJumpHeightAdjustment;
|
||||
IL_Player.Update += RunSpeedAdjustments;
|
||||
IL_Player.Update += NerfSoaringInsigniaRunAcceleration;
|
||||
IL_Player.Update += NerfOverpoweredRunAccelerationSources; // Soaring Insignia, Magiluminescence, and Shadow Armor
|
||||
IL_Player.WingMovement += RemoveSoaringInsigniaInfiniteWingTime;
|
||||
|
||||
// Life regen balance
|
||||
@@ -160,6 +161,9 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
// Fix vanilla not accounting for multiple bobbers when fishing with truffle worm
|
||||
IL_Player.ItemCheck_CheckFishingBobbers += FixTruffleWormFishing;
|
||||
|
||||
// Allow specified walls to be visible through water on the map
|
||||
IL_MapHelper.CreateMapTile += UseVisibleThroughWaterMapTile;
|
||||
|
||||
//Additional detours that are in their own item files given they are only relevant to these specific items:
|
||||
//Rover drive detours on Player.DrawInfernoRings to draw its shield
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace CalamityMod.ILEditing
|
||||
SoundEngine.PlaySound(SoundID.DoorClosed, new Vector2(doorX * 16, doorY * 16));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private static Texture2D SelectLavaTexture(Texture2D initialTexture, LiquidTileType type)
|
||||
{
|
||||
// Use the initial texture if it isn't lava.
|
||||
|
||||
@@ -736,22 +736,16 @@ namespace CalamityMod.ILEditing
|
||||
Main.spriteBatch.SetBlendState(BlendState.Additive);
|
||||
|
||||
// Draw Projectiles.
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (!Main.projectile[i].active)
|
||||
continue;
|
||||
|
||||
if (Main.projectile[i].ModProjectile is IAdditiveDrawer d)
|
||||
if (p.ModProjectile is IAdditiveDrawer d)
|
||||
d.AdditiveDraw(Main.spriteBatch);
|
||||
}
|
||||
|
||||
// Draw NPCs.
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
foreach (NPC n in Main.ActiveNPCs)
|
||||
{
|
||||
if (!Main.npc[i].active)
|
||||
continue;
|
||||
|
||||
if (Main.npc[i].ModNPC is IAdditiveDrawer d)
|
||||
if (n.ModNPC is IAdditiveDrawer d)
|
||||
d.AdditiveDraw(Main.spriteBatch);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,12 +7,14 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.TreasureBags.MiscGrabBags;
|
||||
using CalamityMod.NPCs.AcidRain;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using CalamityMod.Walls;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Mono.Cecil.Cil;
|
||||
using MonoMod.Cil;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Map;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.ILEditing
|
||||
@@ -269,7 +271,7 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
// Sync the color changes.
|
||||
if (colorWasChanged)
|
||||
NetMessage.SendData(MessageID.ItemTweaker, -1, -1, null, itemID, 1f);
|
||||
NetMessage.SendData(MessageID.ItemTweaker, -1, -1, null, itemIndex, 1f);
|
||||
}
|
||||
#endregion Color Blighted Gel
|
||||
|
||||
@@ -898,5 +900,62 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Render Special Map Colors
|
||||
private static void UseVisibleThroughWaterMapTile(ILContext il)
|
||||
{
|
||||
var c = new ILCursor(il);
|
||||
|
||||
if (!c.TryGotoNext(x => x.MatchCall<Tilemap>("get_Item")))
|
||||
{
|
||||
LogFailure("Use VisibleThroughWater Map Tile", "Could not locate call to Terraria.Map.TileMap::get_Item.");
|
||||
return;
|
||||
}
|
||||
|
||||
int tileIndex = -1;
|
||||
if (!c.TryGotoNext(x => x.MatchStloc(out tileIndex)) || tileIndex == -1)
|
||||
{
|
||||
LogFailure("Use VisibleThroughWater Map Tile", "Could not determine the local variable index tile is pushed to.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!c.TryGotoNext(x => x.MatchCall<Tile>("liquidType")))
|
||||
{
|
||||
LogFailure("Use VisibleThroughWater Map Tile", "Could not locate call to Terraria.Tile::liquidType.");
|
||||
return;
|
||||
}
|
||||
|
||||
int liquidTypeIndex = -1;
|
||||
if (!c.TryGotoNext(x => x.MatchStloc(out liquidTypeIndex)) || liquidTypeIndex == -1)
|
||||
{
|
||||
LogFailure("Use VisibleThroughWater Map Tile", "Could not determine the local variable index liquidType is pushed to.");
|
||||
return;
|
||||
}
|
||||
|
||||
int relativeMapTypeIndex = -1;
|
||||
if (!c.TryGotoNext(MoveType.After, x => x.MatchStloc(out relativeMapTypeIndex)) || relativeMapTypeIndex == -1)
|
||||
{
|
||||
LogFailure("Use VisibleThroughWater Map Tile", "Could not determine the local variable index of the relative map type.");
|
||||
return;
|
||||
}
|
||||
|
||||
c.Emit(OpCodes.Ldloc_0);
|
||||
c.Emit(OpCodes.Ldloc, relativeMapTypeIndex);
|
||||
c.Emit(OpCodes.Ldloc, liquidTypeIndex);
|
||||
c.EmitDelegate(
|
||||
(Tile tile, int relativeMapType, int liquidType) =>
|
||||
{
|
||||
if (liquidType != LiquidID.Water)
|
||||
return relativeMapType;
|
||||
|
||||
if (WallLoader.GetWall(tile.WallType) is IVisibleThroughWater visibleThroughWater)
|
||||
return visibleThroughWater.WaterMapEntry;
|
||||
|
||||
return relativeMapType;
|
||||
}
|
||||
);
|
||||
c.Emit(OpCodes.Stloc, relativeMapTypeIndex);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Accessories
|
||||
// Regular crits are intentionally weak, especially because they rarely happen (your crit chance gets murdered).
|
||||
// Bullseyes should be doing all the work.
|
||||
private const float OriginBullseyeCritRatio = 3.5f; // Bullseye crits deal x3.5 damage instead of x2.
|
||||
private const float RicoshotBullseyeCritRatio = 2.4f; // If you use Ricoshot mechanics to "force" a bullseye, you get less of a reward.
|
||||
private const float ForcedCritBullseyeCritRatio = 2.4f; // If your projectile is forced to crit, you get less of a reward.
|
||||
|
||||
private const float StoredCritConversionRatio = 0.01f; // Add +1% more damage to crits for every 1% critical chance the player would have had.
|
||||
private const float MinUseTimeForSlowBonus = 11f;
|
||||
@@ -39,8 +39,8 @@ namespace CalamityMod.Items.Accessories
|
||||
if (hitBullseye)
|
||||
{
|
||||
// Bullseye crits are weaker if the projectile was already a forced crit.
|
||||
// This currently only occurs due to ULTRAKILL-style ricoshots.
|
||||
baseCritMult = wasForcedCrit ? RicoshotBullseyeCritRatio : OriginBullseyeCritRatio;
|
||||
// This is currently implemented for ULTRAKILL-style ricoshots and for Heavenly Gale's lightning.
|
||||
baseCritMult = wasForcedCrit ? ForcedCritBullseyeCritRatio : OriginBullseyeCritRatio;
|
||||
}
|
||||
|
||||
// Factor in the critical strike chance the player isn't getting to use.
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CreateRecipe().
|
||||
AddIngredient<CrownJewel>().
|
||||
AddIngredient<AureusCell>(10).
|
||||
AddIngredient<Stardust>(25).
|
||||
AddIngredient<StarblightSoot>(25).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@ namespace CalamityMod.Items.Accessories
|
||||
if (Main.rand.NextBool(15))
|
||||
{
|
||||
int numProj = 0;
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType<NebulaStar>())
|
||||
if (p.owner == player.whoAmI && p.type == ModContent.ProjectileType<NebulaStar>())
|
||||
{
|
||||
numProj++;
|
||||
}
|
||||
|
||||
@@ -38,10 +38,9 @@ namespace CalamityMod.Items.Accessories
|
||||
get
|
||||
{
|
||||
bool result = false;
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
if (player is null || !player.active || player.outOfRange || player.dead)
|
||||
if (player.outOfRange || player.dead)
|
||||
continue;
|
||||
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
@@ -118,10 +117,9 @@ namespace CalamityMod.Items.Accessories
|
||||
// Visibility is not net synced, for example.
|
||||
bool alreadyDrawnShieldForPlayer = false;
|
||||
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
if (player is null || !player.active || player.outOfRange || player.dead)
|
||||
if (player.outOfRange || player.dead)
|
||||
continue;
|
||||
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
@@ -135,6 +133,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
// Scale the shield is drawn at.
|
||||
// The "i" parameter is to make different player's shields not be perfectly synced.
|
||||
int i = player.whoAmI;
|
||||
float scale = 0.15f + 0.03f * (0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f + i * 0.2f));
|
||||
|
||||
if (!alreadyDrawnShieldForPlayer)
|
||||
|
||||
@@ -42,10 +42,9 @@ namespace CalamityMod.Items.Accessories
|
||||
get
|
||||
{
|
||||
bool result = false;
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
if (player is null || !player.active || player.outOfRange || player.dead)
|
||||
if (player.outOfRange || player.dead)
|
||||
continue;
|
||||
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
@@ -10,8 +10,8 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("AstralArcanum")]
|
||||
public class Purity : ModItem, ILocalizedModType
|
||||
[LegacyName("AstralArcanum", "Purity")]
|
||||
public class Radiance : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetStaticDefaults()
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
@@ -38,11 +38,10 @@ namespace CalamityMod.Items.Accessories
|
||||
get
|
||||
{
|
||||
bool result = false;
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
if (player is null || !player.active || player.outOfRange || player.dead)
|
||||
continue;
|
||||
if (player.outOfRange || player.dead)
|
||||
continue;
|
||||
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
@@ -112,10 +111,9 @@ namespace CalamityMod.Items.Accessories
|
||||
// Visibility is not net synced, for example.
|
||||
bool alreadyDrawnShieldForPlayer = false;
|
||||
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
if (player is null || !player.active || player.outOfRange || player.dead)
|
||||
if (player.outOfRange || player.dead)
|
||||
continue;
|
||||
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
@@ -127,7 +125,7 @@ namespace CalamityMod.Items.Accessories
|
||||
continue;
|
||||
|
||||
// The shield very gently grows and shrinks
|
||||
float scale = 0.15f + 0.03f * (0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f + i * 0.2f));
|
||||
float scale = 0.15f + 0.03f * (0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f + player.whoAmI * 0.2f));
|
||||
|
||||
if (!alreadyDrawnShieldForPlayer)
|
||||
{
|
||||
|
||||
@@ -58,13 +58,12 @@ namespace CalamityMod.Items.Accessories
|
||||
if (auraCounter == 9)
|
||||
{
|
||||
auraCounter = 0;
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
NPC npc = Main.npc[i];
|
||||
if (npc.IsAnEnemy() && !npc.dontTakeDamage && Vector2.Distance(player.Center, npc.Center) <= range)
|
||||
{
|
||||
int campingFireDamage = (int)player.GetBestClassDamage().ApplyTo(Main.rand.Next(20, 41));
|
||||
Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), campingFireDamage, 0f, player.whoAmI, i);
|
||||
Projectile.NewProjectileDirect(source, npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), campingFireDamage, 0f, player.whoAmI, npc.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,10 +47,9 @@ namespace CalamityMod.Items.Accessories
|
||||
get
|
||||
{
|
||||
bool result = false;
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
if (player is null || !player.active || player.outOfRange || player.dead)
|
||||
if (player.outOfRange || player.dead)
|
||||
continue;
|
||||
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
@@ -178,10 +177,9 @@ namespace CalamityMod.Items.Accessories
|
||||
// Visibility is not net synced, for example.
|
||||
bool alreadyDrawnShieldForPlayer = false;
|
||||
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
if (player is null || !player.active || player.outOfRange || player.dead)
|
||||
if (player.outOfRange || player.dead)
|
||||
continue;
|
||||
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
@@ -194,6 +192,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
// Scale the shield is drawn at. The Sponge shield gently grows and shrinks; it should be largely imperceptible.
|
||||
// The "i" parameter is to make different player's shields not be perfectly synced.
|
||||
int i = player.whoAmI;
|
||||
float baseScale = 0.155f;
|
||||
float maxExtraScale = 0.025f;
|
||||
float extraScalePulseInterpolant = MathF.Pow(4f, MathF.Sin(Main.GlobalTimeWrappedHourly * 0.791f + i) - 1);
|
||||
|
||||
@@ -40,9 +40,8 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
if (random == 0)
|
||||
{
|
||||
for (int l = 0; l < Main.maxNPCs; l++)
|
||||
foreach (NPC nPC in Main.ActiveNPCs)
|
||||
{
|
||||
NPC nPC = Main.npc[l];
|
||||
if (nPC.IsAnEnemy() && !nPC.dontTakeDamage && !nPC.buffImmune[plagueDebuff] && Vector2.Distance(player.Center, nPC.Center) <= 300f)
|
||||
{
|
||||
if (nPC.FindBuffIndex(plagueDebuff) == -1)
|
||||
@@ -53,7 +52,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectileDirect(source, nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), auraDamage, 0f, player.whoAmI, l);
|
||||
Projectile.NewProjectileDirect(source, nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), auraDamage, 0f, player.whoAmI, nPC.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,26 +49,24 @@ namespace CalamityMod.Items.Accessories
|
||||
float bonus = 0f;
|
||||
|
||||
int closestNPC = -1;
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
foreach (NPC nPC in Main.ActiveNPCs)
|
||||
{
|
||||
NPC nPC = Main.npc[i];
|
||||
if (nPC.IsAnEnemy() && !nPC.dontTakeDamage)
|
||||
{
|
||||
closestNPC = i;
|
||||
closestNPC = nPC.whoAmI;
|
||||
break;
|
||||
}
|
||||
}
|
||||
float distance = -1f;
|
||||
for (int j = 0; j < Main.maxNPCs; j++)
|
||||
foreach (NPC nPC in Main.ActiveNPCs)
|
||||
{
|
||||
NPC nPC = Main.npc[j];
|
||||
if (nPC.IsAnEnemy() && !nPC.dontTakeDamage)
|
||||
{
|
||||
float distance2 = Math.Abs(nPC.position.X + (float)(nPC.width / 2) - (player.position.X + (float)(player.width / 2))) + Math.Abs(nPC.position.Y + (float)(nPC.height / 2) - (player.position.Y + (float)(player.height / 2)));
|
||||
if (distance == -1f || distance2 < distance)
|
||||
{
|
||||
distance = distance2;
|
||||
closestNPC = j;
|
||||
closestNPC = nPC.whoAmI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,10 +361,9 @@ namespace CalamityMod.Items.Accessories
|
||||
if (bestGrapplePos != Point.Zero)
|
||||
{
|
||||
//Clear any hooks that might have been flying before then.
|
||||
for (int i = 0; i < Main.maxProjectiles; ++i)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (!p.active || p.owner != Player.whoAmI || p.type != ProjectileType<WulfrumHook>())
|
||||
if (p.owner != Player.whoAmI || p.type != ProjectileType<WulfrumHook>())
|
||||
continue;
|
||||
|
||||
if (p.ModProjectile is WulfrumHook)
|
||||
@@ -412,10 +411,9 @@ namespace CalamityMod.Items.Accessories
|
||||
if (triggersSet.Grapple && Player.releaseHook)
|
||||
{
|
||||
//Clear any previous non-wulfrum hooks / Any hooks that just got shot (should already be handled by the global proj
|
||||
for (int i = 0; i < Main.maxProjectiles; ++i)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (!p.active || p.owner != Player.whoAmI || p.aiStyle != 7 || p.type == ProjectileType<WulfrumHook>())
|
||||
if (p.owner != Player.whoAmI || p.aiStyle != 7 || p.type == ProjectileType<WulfrumHook>())
|
||||
continue;
|
||||
|
||||
p.Kill();
|
||||
@@ -443,10 +441,9 @@ namespace CalamityMod.Items.Accessories
|
||||
//Jumping out of the hook
|
||||
if (triggersSet.Jump && Player.releaseJump)
|
||||
{
|
||||
for (int i = 0; i < Main.maxProjectiles; ++i)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (!p.active || p.owner != Player.whoAmI || p.type != ProjectileType<WulfrumHook>())
|
||||
if (p.owner != Player.whoAmI || p.type != ProjectileType<WulfrumHook>())
|
||||
continue;
|
||||
|
||||
//Only clear hooks that are attached to stuff
|
||||
|
||||
@@ -26,9 +26,9 @@ namespace CalamityMod.Items
|
||||
{
|
||||
int offset = player.direction == 1 ? 5 : -Item.width - 5;
|
||||
Rectangle itemRect = new Rectangle((int)player.Center.X + offset, (int)player.position.Y - 10, Item.width, Item.height);
|
||||
foreach (NPC npc in Main.npc)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
if (npc.active && npc != null && !npc.dontTakeDamage && npc.type != ModContent.NPCType<THELORDE>())
|
||||
if (!npc.dontTakeDamage && npc.type != ModContent.NPCType<THELORDE>())
|
||||
{
|
||||
if (itemRect.Intersects(npc.getRect()))
|
||||
{
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
|
||||
namespace CalamityMod.Items
|
||||
{
|
||||
public class AntiCystOintment : ModItem, ILocalizedModType
|
||||
{
|
||||
public static bool state = false;
|
||||
public new string LocalizationCategory => "Items.Misc";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -20,12 +25,71 @@ namespace CalamityMod.Items
|
||||
itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention;
|
||||
}
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
if (Item.favorited)
|
||||
if (player.Calamity().disablePerfCystSpawns == true)
|
||||
player.Calamity().disablePerfCystSpawns = false;
|
||||
else
|
||||
player.Calamity().disablePerfCystSpawns = true;
|
||||
Item.NetStateChanged();
|
||||
state = player.Calamity().disablePerfCystSpawns;
|
||||
|
||||
bool favorited = Item.favorited;
|
||||
Item.SetDefaults(ModContent.ItemType<AntiCystOintment>());
|
||||
Item.stack++;
|
||||
Item.favorited = favorited;
|
||||
}
|
||||
|
||||
/*
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiCystOintment").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiCystOintment").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiCystOintment").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiCystOintment").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
string text;
|
||||
if (state == true)
|
||||
text = GetTextValue("Items.Misc.SpawnBlockersOn");
|
||||
else
|
||||
text = GetTextValue("Items.Misc.SpawnBlockersOff");
|
||||
tooltips.FindAndReplace("[STATE]", text);
|
||||
}
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
|
||||
namespace CalamityMod.Items
|
||||
{
|
||||
public class AntiTumorOintment : ModItem, ILocalizedModType
|
||||
{
|
||||
public static bool state = false;
|
||||
public new string LocalizationCategory => "Items.Misc";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -20,10 +25,69 @@ namespace CalamityMod.Items
|
||||
itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention;
|
||||
}
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
if (Item.favorited)
|
||||
if (player.Calamity().disableHiveCystSpawns == true)
|
||||
player.Calamity().disableHiveCystSpawns = false;
|
||||
else
|
||||
player.Calamity().disableHiveCystSpawns = true;
|
||||
Item.NetStateChanged();
|
||||
state = player.Calamity().disableHiveCystSpawns;
|
||||
|
||||
bool favorited = Item.favorited;
|
||||
Item.SetDefaults(ModContent.ItemType<AntiTumorOintment>());
|
||||
Item.stack++;
|
||||
Item.favorited = favorited;
|
||||
}
|
||||
/*
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiTumorOintment").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiTumorOintment").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiTumorOintment").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/AntiTumorOintment").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
string text;
|
||||
if (state == true)
|
||||
text = GetTextValue("Items.Misc.SpawnBlockersOn");
|
||||
else
|
||||
text = GetTextValue("Items.Misc.SpawnBlockersOff");
|
||||
tooltips.FindAndReplace("[STATE]", text);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -42,10 +42,9 @@ namespace CalamityMod.Items.Armor.LunicCorps
|
||||
get
|
||||
{
|
||||
bool result = false;
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
if (player is null || !player.active || player.outOfRange || player.dead)
|
||||
if (player.outOfRange || player.dead)
|
||||
continue;
|
||||
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
@@ -116,10 +115,9 @@ namespace CalamityMod.Items.Armor.LunicCorps
|
||||
// Visibility is not net synced, for example.
|
||||
bool alreadyDrawnShieldForPlayer = false;
|
||||
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
if (player is null || !player.active || player.outOfRange || player.dead)
|
||||
if (player.outOfRange || player.dead)
|
||||
continue;
|
||||
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
@@ -130,6 +128,7 @@ namespace CalamityMod.Items.Armor.LunicCorps
|
||||
|
||||
// Scale the shield is drawn at. The Lunic Corps shield sticks very close to the body to mimic Halo and occasionally pulses.
|
||||
// The "i" parameter is to make different player's shields not be perfectly synced.
|
||||
int i = player.whoAmI;
|
||||
float baseScale = 0.11f;
|
||||
float maxExtraScale = 0.013f;
|
||||
float extraScalePulseInterpolant = MathF.Pow(12f, MathF.Sin(Main.GlobalTimeWrappedHourly * 1.6f + i) - 1);
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
|
||||
namespace CalamityMod.Items
|
||||
{
|
||||
public class BleachBall : ModItem, ILocalizedModType
|
||||
{
|
||||
public static bool state = false;
|
||||
public new string LocalizationCategory => "Items.Misc";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -21,10 +26,70 @@ namespace CalamityMod.Items
|
||||
itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention;
|
||||
}
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
if (Item.favorited)
|
||||
if (player.Calamity().disableNaturalScourgeSpawns == true)
|
||||
player.Calamity().disableNaturalScourgeSpawns = false;
|
||||
else
|
||||
player.Calamity().disableNaturalScourgeSpawns = true;
|
||||
Item.NetStateChanged();
|
||||
state = player.Calamity().disableNaturalScourgeSpawns;
|
||||
|
||||
bool favorited = Item.favorited;
|
||||
Item.SetDefaults(ModContent.ItemType<BleachBall>());
|
||||
Item.stack++;
|
||||
Item.favorited = favorited;
|
||||
}
|
||||
|
||||
/*
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BleachBall").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BleachBall").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BleachBall").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BleachBall").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
string text;
|
||||
if (state == true)
|
||||
text = GetTextValue("Items.Misc.SpawnBlockersOn");
|
||||
else
|
||||
text = GetTextValue("Items.Misc.SpawnBlockersOff");
|
||||
tooltips.FindAndReplace("[STATE]", text);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -2,11 +2,16 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
|
||||
namespace CalamityMod.Items
|
||||
{
|
||||
public class BrokenWaterFilter : ModItem, ILocalizedModType
|
||||
{
|
||||
public static bool state = false;
|
||||
public new string LocalizationCategory => "Items.Misc";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -21,10 +26,70 @@ namespace CalamityMod.Items
|
||||
itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention;
|
||||
}
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
if (Item.favorited)
|
||||
if (player.Calamity().noStupidNaturalARSpawns == true)
|
||||
player.Calamity().noStupidNaturalARSpawns = false;
|
||||
else
|
||||
player.Calamity().noStupidNaturalARSpawns = true;
|
||||
Item.NetStateChanged();
|
||||
state = player.Calamity().noStupidNaturalARSpawns;
|
||||
|
||||
bool favorited = Item.favorited;
|
||||
Item.SetDefaults(ModContent.ItemType<BrokenWaterFilter>());
|
||||
Item.stack++;
|
||||
Item.favorited = favorited;
|
||||
}
|
||||
|
||||
/*
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BrokenWaterFilter").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BrokenWaterFilter").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BrokenWaterFilter").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/BrokenWaterFilter").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
string text;
|
||||
if (state == true)
|
||||
text = GetTextValue("Items.Misc.SpawnBlockersOn");
|
||||
else
|
||||
text = GetTextValue("Items.Misc.SpawnBlockersOff");
|
||||
tooltips.FindAndReplace("[STATE]", text);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -160,6 +160,10 @@ namespace CalamityMod.Items
|
||||
if (item.type == ItemID.PearlwoodBow || item.type == ItemID.PearlwoodHammer || item.type == ItemID.PearlwoodSword)
|
||||
item.rare = ItemRarityID.LightRed;
|
||||
|
||||
//Flame Waker Boots are no longer just vanity and therefore lose the vanity tooltip.
|
||||
if (item.type == ItemID.FlameWakerBoots)
|
||||
item.vanity = false;
|
||||
|
||||
// Volatile Gelatin is pre-mech post-WoF so it should use the pink rarity.
|
||||
if (item.type == ItemID.VolatileGelatin)
|
||||
item.rare = ItemRarityID.Pink;
|
||||
@@ -509,11 +513,11 @@ namespace CalamityMod.Items
|
||||
}
|
||||
if (item.type == ItemID.PearlwoodBow)
|
||||
{
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (Main.projectile[i].active && (Main.projectile[i].type == ModContent.ProjectileType<RainbowFront>() || Main.projectile[i].type == ModContent.ProjectileType<RainbowTrail>()) && Main.projectile[i].owner == player.whoAmI)
|
||||
if ((p.type == ModContent.ProjectileType<RainbowFront>() || p.type == ModContent.ProjectileType<RainbowTrail>()) && p.owner == player.whoAmI)
|
||||
{
|
||||
Main.projectile[i].Kill();
|
||||
p.Kill();
|
||||
}
|
||||
}
|
||||
for (int i = -8; i <= 8; i += 8)
|
||||
@@ -674,9 +678,9 @@ namespace CalamityMod.Items
|
||||
if (player.ActiveItem().type == ModContent.ItemType<IgneousExaltation>())
|
||||
{
|
||||
bool hasBlades = false;
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType<IgneousBlade>() && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].localAI[1] == 0f)
|
||||
if (p.type == ModContent.ProjectileType<IgneousBlade>() && p.owner == player.whoAmI && p.localAI[1] == 0f)
|
||||
{
|
||||
hasBlades = true;
|
||||
break;
|
||||
@@ -684,22 +688,22 @@ namespace CalamityMod.Items
|
||||
}
|
||||
if (hasBlades)
|
||||
{
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (Main.projectile[i].ModProjectile is IgneousBlade)
|
||||
if (p.ModProjectile is IgneousBlade)
|
||||
{
|
||||
if (Main.projectile[i].ModProjectile<IgneousBlade>().Firing)
|
||||
if (p.ModProjectile<IgneousBlade>().Firing)
|
||||
continue;
|
||||
}
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType<IgneousBlade>() && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].localAI[1] == 0f)
|
||||
if (p.type == ModContent.ProjectileType<IgneousBlade>() && p.owner == player.whoAmI && p.localAI[1] == 0f)
|
||||
{
|
||||
Main.projectile[i].rotation = MathHelper.PiOver2 + MathHelper.PiOver4;
|
||||
Main.projectile[i].velocity = Main.projectile[i].SafeDirectionTo(Main.MouseWorld, Vector2.UnitY) * 22f;
|
||||
Main.projectile[i].rotation += Main.projectile[i].velocity.ToRotation();
|
||||
Main.projectile[i].ai[0] = 180f;
|
||||
Main.projectile[i].ModProjectile<IgneousBlade>().Firing = true;
|
||||
Main.projectile[i].tileCollide = true;
|
||||
Main.projectile[i].netUpdate = true;
|
||||
p.rotation = MathHelper.PiOver2 + MathHelper.PiOver4;
|
||||
p.velocity = p.SafeDirectionTo(Main.MouseWorld, Vector2.UnitY) * 22f;
|
||||
p.rotation += p.velocity.ToRotation();
|
||||
p.ai[0] = 180f;
|
||||
p.ModProjectile<IgneousBlade>().Firing = true;
|
||||
p.tileCollide = true;
|
||||
p.netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -707,13 +711,13 @@ namespace CalamityMod.Items
|
||||
}
|
||||
if (player.ActiveItem().type == ModContent.ItemType<VoidConcentrationStaff>() && player.ownedProjectileCounts[ModContent.ProjectileType<VoidConcentrationBlackhole>()] == 0)
|
||||
{
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (Main.projectile[i].ModProjectile is VoidConcentrationAura)
|
||||
if (p.ModProjectile is VoidConcentrationAura)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI)
|
||||
if (p.owner == player.whoAmI)
|
||||
{
|
||||
Main.projectile[i].ModProjectile<VoidConcentrationAura>().HandleRightClick();
|
||||
p.ModProjectile<VoidConcentrationAura>().HandleRightClick();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -724,18 +728,18 @@ namespace CalamityMod.Items
|
||||
{
|
||||
bool canContinue = true;
|
||||
int count = 0;
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType<GlacialEmbracePointyThing>() && Main.projectile[i].owner == player.whoAmI)
|
||||
if (p.type == ModContent.ProjectileType<GlacialEmbracePointyThing>() && p.owner == player.whoAmI)
|
||||
{
|
||||
if (Main.projectile[i].ai[1] > 1f)
|
||||
if (p.ai[1] > 1f)
|
||||
{
|
||||
canContinue = false;
|
||||
break;
|
||||
}
|
||||
else if (Main.projectile[i].ai[1] == 0f)
|
||||
else if (p.ai[1] == 0f)
|
||||
{
|
||||
if (((GlacialEmbracePointyThing)Main.projectile[i].ModProjectile).circlingPlayer)
|
||||
if (((GlacialEmbracePointyThing)p.ModProjectile).circlingPlayer)
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@@ -1179,9 +1183,18 @@ namespace CalamityMod.Items
|
||||
if (item.type == ItemID.AnkhShield)
|
||||
player.buffImmune[BuffID.WindPushed] = true;
|
||||
|
||||
if (item.type == ItemID.FlameWakerBoots)
|
||||
{
|
||||
modPlayer.flameWakerBoots = true;
|
||||
if (modPlayer.bootLevel < 1)
|
||||
modPlayer.bootLevel = 1;
|
||||
}
|
||||
|
||||
if (item.type == ItemID.HellfireTreads)
|
||||
{
|
||||
modPlayer.hellfireTreads = true;
|
||||
if (modPlayer.bootLevel < 2)
|
||||
modPlayer.bootLevel = 2;
|
||||
player.buffImmune[BuffID.OnFire] = true;
|
||||
}
|
||||
|
||||
@@ -1443,7 +1456,7 @@ namespace CalamityMod.Items
|
||||
player.AddBuff(BuffID.DryadsWard, 5, true); // Dryad's Blessing
|
||||
}
|
||||
}
|
||||
else if (item.type == ItemID.FestiveWings) // Drop powerful homing christmas tree bulbs while in flight
|
||||
else if (item.type == ItemID.FestiveWings) // Drop homing christmas tree bulbs while in flight
|
||||
{
|
||||
player.noFallDmg = true;
|
||||
player.statLifeMax2 += 40;
|
||||
@@ -1452,13 +1465,13 @@ namespace CalamityMod.Items
|
||||
var source = player.GetSource_Accessory(item);
|
||||
if (player.controlJump && player.jump == 0 && player.velocity.Y != 0f && !player.mount.Active && !player.mount.Cart)
|
||||
{
|
||||
int ornamentDamage = (int)player.GetBestClassDamage().ApplyTo(100);
|
||||
int ornamentDamage = (int)player.GetBestClassDamage().ApplyTo(50);
|
||||
int p = Projectile.NewProjectile(source, player.Center, Vector2.UnitY * 2f, ProjectileID.OrnamentFriendly, ornamentDamage, 5f, player.whoAmI);
|
||||
if (p.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[p].DamageType = DamageClass.Generic;
|
||||
Main.projectile[p].Calamity().lineColor = 1;
|
||||
modPlayer.icicleCooldown = 10;
|
||||
modPlayer.icicleCooldown = 15;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ namespace CalamityMod.Items
|
||||
// There are no item sets for tombstones wtf
|
||||
if (item.type == ItemID.Tombstone || item.type == ItemID.GraveMarker || item.type == ItemID.CrossGraveMarker || item.type == ItemID.Headstone || item.type == ItemID.Gravestone || item.type == ItemID.Obelisk
|
||||
|| item.type == ItemID.RichGravestone1 || item.type == ItemID.RichGravestone2 || item.type == ItemID.RichGravestone3 || item.type == ItemID.RichGravestone4 || item.type == ItemID.RichGravestone5)
|
||||
EditTooltipByName("Material", (line) => line.Text += "\n20 of any tombstone turns the surrounding area into a graveyard"
|
||||
EditTooltipByName("Material", (line) => line.Text += "\n13 of any tombstone turns the surrounding area into a graveyard"
|
||||
+ "\nGraveyards have various new item sales and recipes");
|
||||
|
||||
// Eternity Crystal notifies the player that they can accelerate the invasion
|
||||
@@ -429,7 +429,7 @@ namespace CalamityMod.Items
|
||||
|
||||
// Cobalt
|
||||
if (item.type == ItemID.CobaltSword || item.type == ItemID.CobaltNaginata)
|
||||
EditTooltipByName("Knockback", (line) => line.Text += "\nPermanently decreases enemy defense by 25% on hit");
|
||||
EditTooltipByName("Knockback", (line) => line.Text += "\nDecreases enemy defense by 25% on hit\nThis effect lasts for 10 seconds");
|
||||
|
||||
// Palladium
|
||||
if (item.type == ItemID.PalladiumSword || item.type == ItemID.PalladiumPike)
|
||||
@@ -437,7 +437,7 @@ namespace CalamityMod.Items
|
||||
|
||||
// Mythril
|
||||
if (item.type == ItemID.MythrilSword || item.type == ItemID.MythrilHalberd)
|
||||
EditTooltipByName("Knockback", (line) => line.Text += "\nPermanently decreases enemy contact damage by 10% on hit");
|
||||
EditTooltipByName("Knockback", (line) => line.Text += "\nDecreases enemy contact damage by 10% on hit\nThis effect lasts for 10 seconds");
|
||||
|
||||
// Orichalcum
|
||||
if (item.type == ItemID.OrichalcumSword || item.type == ItemID.OrichalcumHalberd)
|
||||
@@ -583,11 +583,19 @@ namespace CalamityMod.Items
|
||||
"Drinking more than 3 different alcohols might not end well with your liver");
|
||||
}
|
||||
|
||||
//Flame Waker Boots buff.
|
||||
if (item.type == ItemID.FlameWakerBoots)
|
||||
{
|
||||
EditTooltipByNum(0, (line) => line.Text = "Multiplies all fire-based debuff damage by 1.25\n" +
|
||||
"All attacks light enemies on fire\n" +
|
||||
"'Never get cold feet again'\n");
|
||||
}
|
||||
|
||||
// Hellfire Treads buff.
|
||||
if (item.type == ItemID.HellfireTreads)
|
||||
{
|
||||
EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("fire blocks", "the Burning and On Fire! debuffs"));
|
||||
EditTooltipByNum(2, (line) => line.Text += "\nMultiplies all fire-based debuff damage by 1.5\n" +
|
||||
EditTooltipByNum(2, (line) => line.Text += "\nMultiplies all fire-based debuff damage by 1.5, does not stack with downgrades\n" +
|
||||
"All attacks inflict Hellfire");
|
||||
}
|
||||
|
||||
@@ -820,7 +828,7 @@ namespace CalamityMod.Items
|
||||
if (item.type == ItemID.PlatinumHelmet)
|
||||
AddTooltip("6% increased damage");
|
||||
if (item.type == ItemID.PlatinumChainmail)
|
||||
AddTooltip("5% increased critical strike chance");
|
||||
AddTooltip("3% increased critical strike chance");
|
||||
if (item.type == ItemID.PlatinumGreaves)
|
||||
AddTooltip("10% increased movement speed");
|
||||
|
||||
@@ -833,17 +841,14 @@ namespace CalamityMod.Items
|
||||
if (item.type == ItemID.JunglePants || item.type == ItemID.AncientCobaltLeggings)
|
||||
EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("6%", "3%"));
|
||||
|
||||
// Shadow
|
||||
if (item.type == ItemID.ShadowHelmet || item.type == ItemID.AncientShadowHelmet || item.type == ItemID.ShadowScalemail || item.type == ItemID.AncientShadowScalemail || item.type == ItemID.ShadowGreaves || item.type == ItemID.AncientShadowGreaves)
|
||||
EditTooltipByNum(0, (line) => line.Text = "5% increased damage and 7% increased jump speed");
|
||||
|
||||
// Crimson
|
||||
if (item.type == ItemID.CrimsonHelmet || item.type == ItemID.CrimsonScalemail || item.type == ItemID.CrimsonGreaves)
|
||||
{
|
||||
EditTooltipByNum(0, (line) =>
|
||||
{
|
||||
string newTooltip = line.Text.Replace("3%", "5%");
|
||||
newTooltip += "\n+0.5 HP/s life regen";
|
||||
string newTooltip = line.Text.Replace("3%", "6%");
|
||||
// Chest piece has 2 regen instead of 1
|
||||
newTooltip += item.type == ItemID.CrimsonScalemail ? "\n+1 HP/s life regen" : "\n+0.5 HP/s life regen";
|
||||
line.Text = newTooltip;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -601,6 +601,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.SpicyPepper, Do(Value(Item.sellPrice(copper: 40))) },
|
||||
{ ItemID.Starfruit, Do(Value(Item.sellPrice(copper: 40))) },
|
||||
{ ItemID.PortableStool, Do(Value(Item.sellPrice(copper: 20))) }, // Step Stool
|
||||
{ ItemID.UncumberingStone, Do(Worthless) },
|
||||
{ ItemID.ViciousMushroom, Do(Worthless) },
|
||||
{ ItemID.VileMushroom, Do(Worthless) },
|
||||
#endregion
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace CalamityMod.Items.Dyes
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
|
||||
//Light red is 12 gold, and this is purchased with 10 gold, this would make it sell for 6 gold, still far more expensive than vanilla dyes
|
||||
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice/2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Dyes
|
||||
{
|
||||
[LegacyName("PhantoplasmDye")]
|
||||
[LegacyName("PhantoplasmDye", "PolterplasmDye")]
|
||||
public class NecroplasmicDye : BaseDye
|
||||
{
|
||||
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(Mod.Assets.Request<Effect>("Effects/Dyes/NecroplasmicDyeShader"), "DyePass").
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Fishing.AstralCatches
|
||||
var postAstrumDeus = itemLoot.DefineConditionalDropSet(() => DownedBossSystem.downedAstrumDeus);
|
||||
|
||||
// Materials
|
||||
itemLoot.Add(ModContent.ItemType<Stardust>(), 1, 5, 10);
|
||||
itemLoot.Add(ModContent.ItemType<StarblightSoot>(), 1, 5, 10);
|
||||
itemLoot.Add(ItemID.FallenStar, 1, 5, 10);
|
||||
itemLoot.Add(ItemID.Meteorite, 5, 10, 20);
|
||||
itemLoot.Add(ItemID.MeteoriteBar, 10, 1, 3);
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.Materials
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<Stardust>(3).
|
||||
AddIngredient<StarblightSoot>(3).
|
||||
AddIngredient<AstralOre>(2).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Materials
|
||||
{
|
||||
CreateRecipe(3).
|
||||
AddIngredient<MeldBlob>(6).
|
||||
AddIngredient<Stardust>(3).
|
||||
AddIngredient<StarblightSoot>(3).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Materials
|
||||
{
|
||||
[LegacyName("Phantoplasm")]
|
||||
[LegacyName("Phantoplasm", "Polterplasm")]
|
||||
public class Necroplasm : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Materials";
|
||||
|
||||
@@ -4,7 +4,8 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Materials
|
||||
{
|
||||
public class Stardust : ModItem, ILocalizedModType
|
||||
[LegacyName("Stardust")]
|
||||
public class StarblightSoot : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Materials";
|
||||
public override void SetStaticDefaults()
|
||||
|
Before Width: | Height: | Size: 376 B After Width: | Height: | Size: 376 B |
@@ -44,9 +44,9 @@ namespace CalamityMod.Items.Materials
|
||||
|
||||
bool closePlayer = false;
|
||||
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player player in Main.ActivePlayers)
|
||||
{
|
||||
if ((Main.player[i].Center - Item.Center).Length() < 1200 && Main.player[i].GetModPlayer<WulfrumBatteryPlayer>().battery)
|
||||
if ((player.Center - Item.Center).Length() < 1200 && player.GetModPlayer<WulfrumBatteryPlayer>().battery)
|
||||
{
|
||||
closePlayer = true;
|
||||
break;
|
||||
|
||||
@@ -71,12 +71,12 @@ namespace CalamityMod.Items.Mounts
|
||||
|
||||
public override void SetMount(Player player, ref bool skipDust)
|
||||
{
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
foreach (NPC npc in Main.ActiveNPCs)
|
||||
{
|
||||
if (Main.npc[i].type == ModContent.NPCType<FAP>())
|
||||
if (npc.type == ModContent.NPCType<FAP>())
|
||||
{
|
||||
Main.npc[i].active = false;
|
||||
Main.npc[i].netUpdate = true;
|
||||
npc.active = false;
|
||||
npc.netUpdate = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -85,12 +85,8 @@ namespace CalamityMod.Items.Mounts
|
||||
public override void Dismount(Player player, ref bool skipDust)
|
||||
{
|
||||
bool anyPlayerOnFabMount = false;
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
foreach (Player player2 in Main.ActivePlayers)
|
||||
{
|
||||
Player player2 = Main.player[i];
|
||||
if (!player2.active)
|
||||
continue;
|
||||
|
||||
// The player that is dismounting is technically not on the mount anymore.
|
||||
if (player2.Calamity().fab && player2.whoAmI != player.whoAmI)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Items.PermanentBoosters
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.MeteoriteBar, 10).
|
||||
AddIngredient(ItemID.FallenStar, 10).
|
||||
AddIngredient<Stardust>(50).
|
||||
AddIngredient<StarblightSoot>(50).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -31,8 +31,12 @@ namespace CalamityMod.Items.Pets
|
||||
Item.Calamity().devItem = true;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) => false;
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
|
||||
{
|
||||
player.AddBuff(Item.buffType, 3600, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,7 +82,7 @@ namespace CalamityMod.Items.Placeables
|
||||
}
|
||||
else if (val < 68.03f)
|
||||
{
|
||||
resultType = ModContent.ItemType<Stardust>();
|
||||
resultType = ModContent.ItemType<StarblightSoot>();
|
||||
resultStack = Main.rand.Next(1, 11);
|
||||
}
|
||||
else if (val < 69.03f)
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Placeables.Furniture
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<AureusCell>(5).
|
||||
AddIngredient<Stardust>(20).
|
||||
AddIngredient<StarblightSoot>(20).
|
||||
AddIngredient<AstralStone>(30).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Items.Placeables.Furniture
|
||||
{
|
||||
CreateRecipe(3).
|
||||
AddIngredient(ItemID.Torch, 3).
|
||||
AddIngredient<Stardust>().
|
||||
AddIngredient<StarblightSoot>().
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,8 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
"CosmaticMango",
|
||||
"CrabBar",
|
||||
"Dia",
|
||||
"Done",
|
||||
"DylanDoe21",
|
||||
"enamoured",
|
||||
"Fluffi",
|
||||
"HaguriHat",
|
||||
"Heart Plus Up!",
|
||||
@@ -121,10 +122,10 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
"Demik",
|
||||
"DM Dokuro",
|
||||
"Dominic Karma",
|
||||
"Done",
|
||||
"Doog",
|
||||
"drh",
|
||||
"dwshin",
|
||||
"DylanDoe21",
|
||||
"Earth",
|
||||
"EchoDuck",
|
||||
"Ein",
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace CalamityMod.Items.Placeables
|
||||
}
|
||||
else if (val < 58.03f)
|
||||
{
|
||||
resultType = ModContent.ItemType<Stardust>();
|
||||
resultType = ModContent.ItemType<StarblightSoot>();
|
||||
resultStack = Main.rand.Next(1, 21);
|
||||
}
|
||||
else if (val < 61.03f)
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Items.Potions
|
||||
{
|
||||
CreateRecipe(15).
|
||||
AddIngredient(ItemID.BottledWater, 15).
|
||||
AddIngredient<Stardust>(4).
|
||||
AddIngredient<StarblightSoot>(4).
|
||||
AddIngredient<AureusCell>().
|
||||
AddTile(TileID.AlchemyTable).
|
||||
AddConsumeItemCallback(Recipe.ConsumptionRules.Alchemy).
|
||||
|
||||
@@ -38,7 +38,6 @@ namespace CalamityMod.Items.Potions
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Condition evil2Dead = new(CalamityUtils.GetText("Condition.DownedEvil2Boss"), () => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator);
|
||||
CreateRecipe(5).
|
||||
AddIngredient(ItemID.BottledWater).
|
||||
AddIngredient<AerialiteOre>(2).
|
||||
@@ -46,7 +45,7 @@ namespace CalamityMod.Items.Potions
|
||||
AddIngredient<PearlShard>().
|
||||
AddIngredient<StormlionMandible>().
|
||||
AddTile(TileID.Bottles).
|
||||
AddDecraftCondition(evil2Dead).
|
||||
AddDecraftCondition(CalamityConditions.DownedHiveMindOrPerforator).
|
||||
Register();
|
||||
|
||||
CreateRecipe().
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
|
||||
namespace CalamityMod.Items
|
||||
{
|
||||
public class SirenproofEarMuffs : ModItem, ILocalizedModType
|
||||
{
|
||||
public static bool state = false;
|
||||
public new string LocalizationCategory => "Items.Misc";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -21,10 +26,70 @@ namespace CalamityMod.Items
|
||||
itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.SpawnPrevention;
|
||||
}
|
||||
|
||||
public override void UpdateInventory(Player player)
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
if (Item.favorited)
|
||||
if (player.Calamity().disableAnahitaSpawns == true)
|
||||
player.Calamity().disableAnahitaSpawns = false;
|
||||
else
|
||||
player.Calamity().disableAnahitaSpawns = true;
|
||||
Item.NetStateChanged();
|
||||
state = player.Calamity().disableAnahitaSpawns;
|
||||
|
||||
bool favorited = Item.favorited;
|
||||
Item.SetDefaults(ModContent.ItemType<SirenproofEarMuffs>());
|
||||
Item.stack++;
|
||||
Item.favorited = favorited;
|
||||
}
|
||||
|
||||
/*
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/SirenproofEarMuffs").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/SirenproofEarMuffs").Value;
|
||||
spriteBatch.Draw(texture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
if (state)
|
||||
{
|
||||
//Replace with enabled texture
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/SirenproofEarMuffs").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Items/SirenproofEarMuffs").Value;
|
||||
spriteBatch.Draw(texture, Item.position - Main.screenPosition, null, lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
string text;
|
||||
if (state == true)
|
||||
text = GetTextValue("Items.Misc.SpawnBlockersOn");
|
||||
else
|
||||
text = GetTextValue("Items.Misc.SpawnBlockersOff");
|
||||
tooltips.FindAndReplace("[STATE]", text);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<Stardust>(30).
|
||||
AddIngredient<StarblightSoot>(30).
|
||||
AddIngredient(ItemID.FallenStar, 20).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
|
||||
@@ -50,14 +50,13 @@ namespace CalamityMod.Items.SummonItems
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Condition downedPerfs = new(CalamityUtils.GetText("Condition.DownedPerfs"), () => DownedBossSystem.downedPerforator);
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.CrimtaneBar, 3).
|
||||
AddIngredient<BloodSample>(7).
|
||||
AddIngredient(ItemID.Vertebrae, 13).
|
||||
AddTile(TileID.DemonAltar).
|
||||
AddDecraftCondition(downedPerfs).
|
||||
Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ItemID.CrimtaneBar, 3)
|
||||
.AddIngredient<BloodSample>(7)
|
||||
.AddIngredient(ItemID.Vertebrae, 13)
|
||||
.AddTile(TileID.DemonAltar)
|
||||
.AddDecraftCondition(CalamityConditions.DownedPerforator)
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<Stardust>(25).
|
||||
AddIngredient<StarblightSoot>(25).
|
||||
AddIngredient<AureusCell>(8).
|
||||
AddIngredient<AstralBar>(4).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
|
||||