MERGE: Dylan's half-baked Sunken Sea branch
No files matched your search
@@ -0,0 +1,64 @@
|
||||
# Maintenance notes:
|
||||
# - change dotnet-version to 8.0.x once tML updates (keep doing this so long as tML updates .NET),
|
||||
# - if/when we un-ignore the .csproj, get rid of creating one in this script.
|
||||
|
||||
name: .NET Linter
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "*"
|
||||
pull_request:
|
||||
branches:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
- name: Restore dependencies
|
||||
run: |
|
||||
touch CalamityMod.csproj
|
||||
echo '<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\tModLoader.targets" />
|
||||
<PropertyGroup>
|
||||
<AssemblyName>CalamityMod</AssemblyName>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="tModLoader.CodeAssist" Version="0.1.5" />
|
||||
</ItemGroup>
|
||||
</Project>' > CalamityMod.csproj
|
||||
|
||||
dotnet restore
|
||||
|
||||
- name: Pull TML
|
||||
run: |
|
||||
cd ..
|
||||
mkdir ./tmod
|
||||
touch tModLoader.targets
|
||||
|
||||
echo '<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project=".\tmod\tMLMod.targets" />
|
||||
</Project>' > tModLoader.targets
|
||||
|
||||
cd ./tmod
|
||||
wget https://github.com/tModLoader/tModLoader/releases/latest/download/tModLoader.zip
|
||||
unzip tModLoader.zip
|
||||
cd ..
|
||||
cd ./CalamityMod
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
dotnet format style CalamityMod.csproj --verify-no-changes
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 23 KiB |
@@ -0,0 +1,123 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralDesertSurfaceBGStyle : ModSurfaceBackgroundStyle
|
||||
{
|
||||
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
readonly int CloseBGYOffset = 475;
|
||||
readonly int MiddleBGYOffset = 475;
|
||||
|
||||
public override void ModifyFarFades(float[] fades, float transitionSpeed)
|
||||
{
|
||||
for (int i = 0; i < fades.Length; i++)
|
||||
{
|
||||
if (i == Slot)
|
||||
{
|
||||
fades[i] += transitionSpeed;
|
||||
if (fades[i] > 1f)
|
||||
fades[i] = 1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
fades[i] -= transitionSpeed;
|
||||
if (fades[i] < 0f)
|
||||
fades[i] = 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceHorizon");
|
||||
|
||||
public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralDesertSurfaceFar");
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Skies/AstralDesertSurfaceMiddle");
|
||||
|
||||
public override bool PreDrawCloseBackground(SpriteBatch spriteBatch)
|
||||
{
|
||||
//Please see AstralSurfaceBGStyle for comments, code is pretty much identical here
|
||||
float screenOff = (float)screenOffField.GetValue(Main.instance);
|
||||
float scAdj = (float)scAdjField.GetValue(Main.instance);
|
||||
Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null);
|
||||
Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A);
|
||||
bool canBGDraw = false;
|
||||
if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
|
||||
canBGDraw = true;
|
||||
if (Main.mapFullscreen)
|
||||
canBGDraw = false;
|
||||
int offset = 30;
|
||||
if (Main.gameMenu)
|
||||
offset = 0;
|
||||
if (WorldGen.drunkWorldGen)
|
||||
offset = -180;
|
||||
float surfacePosition = (float)Main.worldSurface;
|
||||
if (surfacePosition == 0f)
|
||||
surfacePosition = 1f;
|
||||
float screenPosition = Main.screenPosition.Y + (float)(Main.screenHeight / 2) - 600f;
|
||||
double backgroundTopMagicNumber = (0f - screenPosition + screenOff / 2f) / (surfacePosition * 16f);
|
||||
float bgGlobalScaleMultiplier = 2f;
|
||||
int pushBGTopHack;
|
||||
int offset2 = -180;
|
||||
int menuOffset = 0;
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
menuOffset -= offset2;
|
||||
}
|
||||
pushBGTopHack = menuOffset;
|
||||
pushBGTopHack += offset;
|
||||
pushBGTopHack += offset2;
|
||||
if (canBGDraw)
|
||||
{
|
||||
var bgScale = 1.25f;
|
||||
var bgParallax = 0.4;
|
||||
var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
var bgWidthScaled = (int)((float)CalamityMod.AstralDesertSurfaceMiddle.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax);
|
||||
var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
bgTopY = 320 + pushBGTopHack;
|
||||
|
||||
var bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralDesertSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralDesertSurfaceMiddle.Width, CalamityMod.AstralDesertSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
bgScale = 1.31f;
|
||||
bgParallax = 0.43;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)((float)CalamityMod.AstralDesertSurfaceClose.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
bgTopY = 400 + pushBGTopHack;
|
||||
bgStartX -= 80;
|
||||
}
|
||||
|
||||
bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralDesertSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralDesertSurfaceClose.Width, CalamityMod.AstralDesertSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
@@ -0,0 +1,148 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.GameContent.UI.States;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class AstralSnowSurfaceBGStyle : ModSurfaceBackgroundStyle
|
||||
{
|
||||
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
readonly int FrontBGYOffset = 275;
|
||||
readonly int CloseBGYOffset = 175;
|
||||
readonly int MiddleBGYOffset = 475;
|
||||
|
||||
public override void ModifyFarFades(float[] fades, float transitionSpeed)
|
||||
{
|
||||
for (int i = 0; i < fades.Length; i++)
|
||||
{
|
||||
if (i == Slot)
|
||||
{
|
||||
fades[i] += transitionSpeed;
|
||||
if (fades[i] > 1f)
|
||||
fades[i] = 1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
fades[i] -= transitionSpeed;
|
||||
if (fades[i] < 0f)
|
||||
fades[i] = 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceHorizon");
|
||||
|
||||
public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceFar");
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Skies/AstralSnowSurfaceMiddle");
|
||||
|
||||
public override bool PreDrawCloseBackground(SpriteBatch spriteBatch)
|
||||
{
|
||||
//Please see AstralSurfaceBGStyle for comments, code is pretty much identical here
|
||||
float screenOff = (float)screenOffField.GetValue(Main.instance);
|
||||
float scAdj = (float)scAdjField.GetValue(Main.instance);
|
||||
Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null);
|
||||
Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A);
|
||||
bool canBGDraw = false;
|
||||
if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
|
||||
canBGDraw = true;
|
||||
if (Main.mapFullscreen)
|
||||
canBGDraw = false;
|
||||
int offset = 30;
|
||||
if (Main.gameMenu)
|
||||
offset = 0;
|
||||
if (WorldGen.drunkWorldGen)
|
||||
offset = -180;
|
||||
float surfacePosition = (float)Main.worldSurface;
|
||||
if (surfacePosition == 0f)
|
||||
surfacePosition = 1f;
|
||||
float screenPosition = Main.screenPosition.Y + (float)(Main.screenHeight / 2) - 600f;
|
||||
double backgroundTopMagicNumber = (0f - screenPosition + screenOff / 2f) / (surfacePosition * 16f);
|
||||
float bgGlobalScaleMultiplier = 2f;
|
||||
int pushBGTopHack;
|
||||
int offset2 = -180;
|
||||
int menuOffset = 0;
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
menuOffset -= offset2;
|
||||
}
|
||||
pushBGTopHack = menuOffset;
|
||||
pushBGTopHack += offset;
|
||||
pushBGTopHack += offset2;
|
||||
if (canBGDraw)
|
||||
{
|
||||
var bgScale = 1.25f;
|
||||
var bgParallax = 0.4;
|
||||
var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
var bgWidthScaled = (int)((float)CalamityMod.AstralSnowSurfaceMiddle.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax);
|
||||
var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
bgTopY = 320 + pushBGTopHack;
|
||||
|
||||
var bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSnowSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSnowSurfaceMiddle.Width, CalamityMod.AstralSnowSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
bgScale = 1.31f;
|
||||
bgParallax = 0.43;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceClose.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
bgTopY = 400 + pushBGTopHack;
|
||||
bgStartX -= 80;
|
||||
}
|
||||
|
||||
bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceClose.Width, CalamityMod.AstralSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceCloseGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceCloseGlow.Width, CalamityMod.AstralSurfaceCloseGlow.Height), new Color(Color.White.R * 0.7f, Color.White.G * 0.7f, Color.White.B * 0.7f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
bgScale = 1.34f;
|
||||
bgParallax = 0.49;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 2100.0 + 2000.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)(CalamityMod.AstralSurfaceFront.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
bgTopY = 480 + pushBGTopHack;
|
||||
bgStartX -= 120;
|
||||
}
|
||||
|
||||
bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFront, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFront.Width, CalamityMod.AstralSurfaceFront.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFrontGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFrontGlow.Width, CalamityMod.AstralSurfaceFrontGlow.Height), new Color(Color.White.R * 0.9f, Color.White.G * 0.9f, Color.White.B * 0.9f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
@@ -1,19 +1,25 @@
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Reflection;
|
||||
using System;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
//this is just a blank background, so each custom background will draw over it
|
||||
public class AstralSurfaceBGStyle : ModSurfaceBackgroundStyle
|
||||
{
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
|
||||
{
|
||||
b -= 100f;
|
||||
return BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
}
|
||||
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo scAdjField = typeof(Main).GetField("scAdj", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
internal static readonly FieldInfo COSBMAplhaField = typeof(Main).GetField("ColorOfSurfaceBackgroundsModified", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
readonly int FrontBGYOffset = 275; //Offsets for the height positioning. Make these 0 for backgrounds that want to be the same as treeline backgrounds (backgrounds that have the front 3 layers as trees)
|
||||
readonly int CloseBGYOffset = 175;
|
||||
readonly int MiddleBGYOffset = 475;
|
||||
|
||||
public override void ModifyFarFades(float[] fades, float transitionSpeed)
|
||||
{
|
||||
//This just fades in the background and fades out other backgrounds.
|
||||
for (int i = 0; i < fades.Length; i++)
|
||||
{
|
||||
if (i == Slot)
|
||||
@@ -30,9 +36,123 @@ namespace CalamityMod.Backgrounds
|
||||
if (fades[i] < 0f)
|
||||
{
|
||||
fades[i] = 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int ChooseFarTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceHorizon"); //5th layer (Horizon)
|
||||
|
||||
public override int ChooseMiddleTexture() => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/AstralSurfaceFar"); //4th layer (Far)
|
||||
|
||||
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) => BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Skies/AstralSurfaceMiddle"); //Fallback texture, not nessesarily needed since predraw returns false
|
||||
|
||||
public override bool PreDrawCloseBackground(SpriteBatch spriteBatch) //Taken from vanilla to draw the front 3 layers, edited to fit tmod and astral background needs
|
||||
{
|
||||
float screenOff = (float)screenOffField.GetValue(Main.instance);
|
||||
float scAdj = (float)scAdjField.GetValue(Main.instance);
|
||||
Color COSBMAplha = (Color)COSBMAplhaField.GetValue(null);
|
||||
Color ColorOfSurfaceBackgroundsModified = new Color(63, 51, 90, COSBMAplha.A); //Astral Biome Coloration with the alpha as the background fade
|
||||
bool canBGDraw = false;
|
||||
if ((!Main.remixWorld || (Main.gameMenu && !WorldGen.remixWorldGen)) && (!WorldGen.remixWorldGen || !WorldGen.drunkWorldGen))
|
||||
canBGDraw = true;
|
||||
if (Main.mapFullscreen)
|
||||
canBGDraw = false;
|
||||
int offset = 30;
|
||||
if (Main.gameMenu)
|
||||
offset = 0;
|
||||
if (WorldGen.drunkWorldGen)
|
||||
offset = -180;
|
||||
float surfacePosition = (float)Main.worldSurface;
|
||||
if (surfacePosition == 0f)
|
||||
surfacePosition = 1f;
|
||||
float screenPosition = Main.screenPosition.Y + (float)(Main.screenHeight / 2) - 600f;
|
||||
double backgroundTopMagicNumber = (0f - screenPosition + screenOff / 2f) / (surfacePosition * 16f);
|
||||
float bgGlobalScaleMultiplier = 2f;
|
||||
int pushBGTopHack;
|
||||
int offset2 = -180;
|
||||
int menuOffset = 0;
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
menuOffset -= offset2;
|
||||
}
|
||||
pushBGTopHack = menuOffset;
|
||||
pushBGTopHack += offset;
|
||||
pushBGTopHack += offset2; //Offsets to the background placement
|
||||
if (canBGDraw) //If the background can draw (player is not in a remix world or is not in a map). This can probably be removed since backgrounds already go through these checks
|
||||
{
|
||||
//3rd layer (Middle)
|
||||
var bgScale = 1.25f; //Scale of the furthest of the closest background layers (3rd layer)
|
||||
var bgParallax = 0.4; //The parallax of the background layer
|
||||
var bgTopY = (int)(backgroundTopMagicNumber * 1800.0 + 1500.0) + (int)scAdj + pushBGTopHack; //the Y position of the background
|
||||
bgScale *= bgGlobalScaleMultiplier; //Scale of the background
|
||||
var bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceMiddle.Width * bgScale); //The Width of the bg texture scaled to the correct size
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1.2f / (float)bgParallax);
|
||||
var bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2)); //The starting position of the background layer
|
||||
if (Main.gameMenu)
|
||||
bgTopY = 320 + pushBGTopHack; //increases the height in the main menu
|
||||
|
||||
var bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
//Draw the texture and its glowmask to each loop of the texture
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceMiddle, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceMiddle.Width, CalamityMod.AstralSurfaceMiddle.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceMiddleGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + MiddleBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceMiddleGlow.Width, CalamityMod.AstralSurfaceMiddleGlow.Height), new Color(Color.White.R * 0.5f, Color.White.G * 0.5f, Color.White.B * 0.5f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
//2nd layer (Close)
|
||||
//Repeat of above with slight changes to variables
|
||||
bgScale = 1.31f;
|
||||
bgParallax = 0.43;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 1950.0 + 1750.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)((float)CalamityMod.AstralSurfaceClose.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
bgTopY = 400 + pushBGTopHack;
|
||||
bgStartX -= 80; //the initial postion of where the background starts in the main menu is pushed back to not be directly ontop, mostly for tree bgs that use the same treeline texture but faded
|
||||
}
|
||||
|
||||
bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceClose, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceClose.Width, CalamityMod.AstralSurfaceClose.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceCloseGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + CloseBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceCloseGlow.Width, CalamityMod.AstralSurfaceCloseGlow.Height), new Color(Color.White.R * 0.7f, Color.White.G * 0.7f, Color.White.B * 0.7f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
//1st layer (Front)
|
||||
//Repeat of above with slight changes to variables
|
||||
bgScale = 1.34f;
|
||||
bgParallax = 0.49;
|
||||
bgTopY = (int)(backgroundTopMagicNumber * 2100.0 + 2000.0) + (int)scAdj + pushBGTopHack;
|
||||
bgScale *= bgGlobalScaleMultiplier;
|
||||
bgWidthScaled = (int)(CalamityMod.AstralSurfaceFront.Width * bgScale);
|
||||
SkyManager.Instance.DrawToDepth(Main.spriteBatch, 1f / (float)bgParallax);
|
||||
bgStartX = (int)(0.0 - Math.IEEERemainder((double)Main.screenPosition.X * bgParallax, bgWidthScaled) - (double)(bgWidthScaled / 2));
|
||||
if (Main.gameMenu)
|
||||
{
|
||||
bgTopY = 480 + pushBGTopHack;
|
||||
bgStartX -= 120;
|
||||
}
|
||||
|
||||
bgLoops = Main.screenWidth / bgWidthScaled + 2;
|
||||
if ((double)Main.screenPosition.Y < Main.worldSurface * 16.0 + 16.0)
|
||||
{
|
||||
for (int i = 0; i < bgLoops; i++)
|
||||
{
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFront, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFront.Width, CalamityMod.AstralSurfaceFront.Height), ColorOfSurfaceBackgroundsModified, 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(CalamityMod.AstralSurfaceFrontGlow, new Vector2(bgStartX + bgWidthScaled * i, bgTopY + FrontBGYOffset), new Rectangle(0, 0, CalamityMod.AstralSurfaceFrontGlow.Width, CalamityMod.AstralSurfaceFrontGlow.Height), new Color(Color.White.R * 0.9f, Color.White.G * 0.9f, Color.White.B * 0.9f, COSBMAplha.A), 0f, default(Vector2), bgScale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false; //Stop the drawing of the base close background texture (note: does NOT stop the drawing of the Middle and Far textures because tmodloader is slight stupid :blushing:)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
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: 20 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,4 +14,4 @@ namespace CalamityMod.Backgrounds
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using CalamityMod.NPCs.AstrumAureus;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.NPCs.AstrumAureus;
|
||||
using CalamityMod.NPCs.CeaselessVoid;
|
||||
using CalamityMod.NPCs.Crabulon;
|
||||
using CalamityMod.NPCs.ExoMechs.Apollo;
|
||||
@@ -17,8 +19,6 @@ using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Summon.MirrorofKalandraMinions;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -62,6 +62,10 @@ namespace CalamityMod.Balancing
|
||||
|
||||
UniversalBalancingChanges = new List<IBalancingRule[]>()
|
||||
{
|
||||
// Nerf Crystal bullet shards by 45%
|
||||
// Currently crystal bullet projectiles deal 50% of the bullet's damage which is absurd in vanilla, this nerfs them to 27.5%
|
||||
Do(new ProjectileResistBalancingRule(0.55f, ProjectileID.CrystalShard)),
|
||||
|
||||
// Nerf Luminite Arrow trails by 50%.
|
||||
Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.MoonlordArrowTrail)),
|
||||
|
||||
@@ -76,6 +80,7 @@ namespace CalamityMod.Balancing
|
||||
|
||||
// Nerf Spectre Mask set bonus projectiles by 30%.
|
||||
Do(new ProjectileSpecificRequirementBalancingRule(0.7f, SpectreMaskSetBonusFilter)),
|
||||
|
||||
};
|
||||
|
||||
NPCSpecificBalancingChanges = new List<NPCBalancingChange>();
|
||||
@@ -107,9 +112,6 @@ namespace CalamityMod.Balancing
|
||||
|
||||
// 40% resist to Sky Glaze.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<StickyFeather>()))));
|
||||
|
||||
// 30% resist to Jester Arrows.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.EaterofWorldsIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileID.JestersArrow))));
|
||||
#endregion
|
||||
|
||||
#region The Perforators
|
||||
@@ -127,7 +129,7 @@ namespace CalamityMod.Balancing
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 50% resist to Adamantite Throwing Axe's lightning.
|
||||
// Twisting Thunder and Gael's greatsword use this projectile too, but they are far beyond progression, so who cares!
|
||||
// Twisting Thunder and Gael's Greatsword use this projectile too, but they are far beyond progression, so who cares!
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AquaticScourgeIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
|
||||
|
||||
// 50% resist to Dormant Brimseeker.
|
||||
@@ -153,13 +155,19 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 50% resist to Dormant Brimseeker.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
|
||||
|
||||
// 50% resist to Adamantite Throwing Axe's lightning.
|
||||
// See Aquatic Scourge comment.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
|
||||
|
||||
// 50% resist to Aftershock's rocks.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AftershockRock>()))));
|
||||
|
||||
// 50% resist to Avalanche's Ice Bombs and shards.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<IceBombFriendly>(), ProjectileType<FrostShardFriendly>()))));
|
||||
|
||||
// 50% resist to Dormant Brimseeker.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
|
||||
|
||||
// 45% resist to Mounted Scanner.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<MountedScannerLaser>()))));
|
||||
|
||||
@@ -171,14 +179,11 @@ namespace CalamityMod.Balancing
|
||||
|
||||
// 25% resist to Snowstorm Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
|
||||
|
||||
// 15% resist to Mineral Mortar's projectile.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DestroyerIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<MineralMortarProjectile>()))));
|
||||
#endregion
|
||||
|
||||
#region Astrum Aureus
|
||||
// 35% resist to The Ballista's greatarrows.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<BallistaGreatArrow>()))));
|
||||
// 30% resist to The Ballista's greatarrows.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<BallistaGreatArrow>()))));
|
||||
#endregion
|
||||
|
||||
#region Ravager
|
||||
@@ -188,14 +193,29 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Aegis Blade's explosions because the true melee resist ain't enough.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
|
||||
|
||||
// 40% resist to Flying Dragon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileID.DD2SquireSonicBoom))));
|
||||
// 50% resist to Icicle Arrows.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<IcicleArrowProj>()))));
|
||||
|
||||
// 35% resist to Flying Dragon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
|
||||
|
||||
// 30% resist to Aurora Blazer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
|
||||
|
||||
// 30% resist to Flak Kraken.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
|
||||
|
||||
// 25% resist to Lucrecia.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<DNA>()))));
|
||||
|
||||
// 20% resist to The Hive.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.RavagerIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>(), ProjectileType<HiveMissile>()))));
|
||||
#endregion
|
||||
|
||||
#region Duke Fishron
|
||||
// 20% vulnerability to The Hive's bees.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.DukeFishron, Do(new ProjectileResistBalancingRule(1.2f, ProjectileType<BasicPlagueBee>()))));
|
||||
|
||||
// 35% vulnerability to Resurrection Butterfly.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.DukeFishron, Do(new ProjectileResistBalancingRule(1.35f, ProjectileType<SakuraBullet>(), ProjectileType<PurpleButterfly>()))));
|
||||
#endregion
|
||||
@@ -229,22 +249,37 @@ namespace CalamityMod.Balancing
|
||||
// 75% resist to Plaguenades.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
|
||||
|
||||
// 70% resist to the Stardust Dragon.
|
||||
// 70% resist to Stardust Dragon Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
|
||||
|
||||
// 70% resist to Charged Blaster Cannon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.ChargedBlasterLaser))));
|
||||
|
||||
// 60% resist to Aurora Blazer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<AuroraFire>()))));
|
||||
|
||||
// 55% resist to Flak Kraken.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType<FlakKrakenProjectile>()))));
|
||||
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 20% resist to Resurrection Butterfly.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<SakuraBullet>(), ProjectileType<PurpleButterfly>()))));
|
||||
// 35% resist to Ballistic Poison Bomb's clouds.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<BallisticPoisonCloud>()))));
|
||||
|
||||
// 35% resist to Icicle Arrows.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
|
||||
|
||||
// 20% resist to Cluster Fragments.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
|
||||
#endregion
|
||||
|
||||
#region Moon Lord
|
||||
// 20% resist to Mercurial Tides (True Biome Blade).
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<MercurialTides>(), ProjectileType<MercurialTidesMonolith>(), ProjectileType<MercurialTidesBlast>()))));
|
||||
|
||||
// 20% resist to The Hive's nuke.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>()))));
|
||||
#endregion
|
||||
|
||||
#region Profaned Guardians
|
||||
@@ -255,11 +290,17 @@ namespace CalamityMod.Balancing
|
||||
#region Providence
|
||||
// 80% resist to Hell's Sun.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Providence>(), new ProjectileResistBalancingRule(0.2f, ProjectileType<HellsSunProj>())));
|
||||
|
||||
// 35% resist to Elemental Lance. This thing desperately needs a rework.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Providence>(), new ProjectileResistBalancingRule(0.65f, ProjectileType<SpatialSpear>(), ProjectileType<SpatialSpear2>(), ProjectileType<SpatialSpear3>(), ProjectileType<SpatialSpear4>())));
|
||||
#endregion
|
||||
|
||||
#region Ceaseless Void: Dark Energies
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), ResistTrueMelee(0.5f)));
|
||||
|
||||
// 40% resist to Stellar Torus Staff.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<StellarTorusBeam>())));
|
||||
#endregion
|
||||
|
||||
#region Storm Weaver
|
||||
@@ -275,18 +316,14 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Pristine Fury's alt fire.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<PristineSecondary>()))));
|
||||
|
||||
// 50% resist to Tactician's Trump Card explosions.
|
||||
// 50% resist to Tactician's Trump Card's explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TacticiansElectricBoom>()))));
|
||||
|
||||
// 25% resist to Molten Amputator blobs.
|
||||
// 25% resist to Molten Amputator's blobs.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.StormWeaverIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<MoltenBlobThrown>()))));
|
||||
#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
|
||||
@@ -300,7 +337,7 @@ namespace CalamityMod.Balancing
|
||||
|
||||
// 35% resist to Venusian Trident's explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<VenusianBolt>(), ProjectileType<VenusianExplosion>()))));
|
||||
|
||||
|
||||
// 20% resist to Valediction's typhoons; will catch Nuclear Fury as well but that doesn't matter.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.DevourerOfGodsIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NuclearFuryProjectile>()))));
|
||||
|
||||
@@ -332,14 +369,14 @@ namespace CalamityMod.Balancing
|
||||
// 20% resist to Eclipse's Fall.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<EclipsesSmol>(), ProjectileType<EclipsesFallMain>()))));
|
||||
|
||||
// 20% resist to Rancor.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<RancorLaserbeam>()))));
|
||||
|
||||
// 20% resist to Yharim's Crystal.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<YharimsCrystalBeam>()))));
|
||||
|
||||
// 20% resist to Zenith.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FinalFractal))));
|
||||
|
||||
// 15% resist to The Enforcer's projectiles.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<EssenceFlame2>()))));
|
||||
#endregion
|
||||
|
||||
#region Exo Mechs: Artemis and Apollo
|
||||
@@ -355,6 +392,9 @@ namespace CalamityMod.Balancing
|
||||
// 65% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(ResistTrueMelee(0.35f))));
|
||||
|
||||
// 65% resist to Stellar Torus Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<StellarTorusBeam>()))));
|
||||
|
||||
// 65% resist to The Enforcer's projectiles.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<EssenceFlame2>()))));
|
||||
|
||||
@@ -367,39 +407,36 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Chicken Cannon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ChickenExplosion>()))));
|
||||
|
||||
// 50% resist to Rancor.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<RancorLaserbeam>()))));
|
||||
|
||||
// 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>(), ProjectileType<PrismaticBeam>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<VehemenceSkull>()))));
|
||||
|
||||
// 50% resist to Yharim's Crystal.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<YharimsCrystalBeam>()))));
|
||||
|
||||
// 45% resist to Wrathwing stealth strike's fireballs.
|
||||
// 45% resist to Wrathwing's stealth strike fireballs.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<WrathwingCinder>()))));
|
||||
|
||||
// 40% resist to Rancor.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<RancorLaserbeam>()))));
|
||||
|
||||
// 35% resist to The Anomaly's Nanogun bomb explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<AnomalysNanogunMPFBBoom>()))));
|
||||
|
||||
// 35% resist to Ultima.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<UltimaRay>()))));
|
||||
// 35% resist to Prismatic Breaker's laser beam.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<PrismaticBeam>()))));
|
||||
|
||||
// 30% resist to Eclipse's Fall.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<EclipsesFallMain>()))));
|
||||
|
||||
// 30% resist to Prismatic Breaker's laser beam.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<PrismaticBeam>()))));
|
||||
|
||||
// 30% resist to Pulse Rifle.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<PulseRifleShot>()))));
|
||||
|
||||
// 30% resist to Sirius.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<SiriusExplosion>()))));
|
||||
|
||||
// 30% resist to Ultima's rays.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<UltimaRay>()))));
|
||||
|
||||
// 30% resist to Dragon Scales and The Wand's tornadoes.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<InfernadoFriendly>(), ProjectileType<DragonScalesInfernado>()))));
|
||||
|
||||
@@ -418,14 +455,20 @@ namespace CalamityMod.Balancing
|
||||
// 25% resist to Zenith.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.FinalFractal))));
|
||||
|
||||
// 20% resist to The Anomaly's Nanogun's bomb explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AnomalysNanogunMPFBBoom>()))));
|
||||
|
||||
// 20% resist to Ariane's aura (Lilies of Finality).
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<LiliesOfFinalityAoE>()))));
|
||||
|
||||
// 20% resist to Blood Boiler.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BloodBoilerFire>()))));
|
||||
|
||||
// 20% resist to Eradicator beams.
|
||||
// 20% resist to Eradicator's beams.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NebulaShot>()))));
|
||||
|
||||
// 20% resist to Plasma Grenade and Dynamic Pursuer's explosions.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<PlasmaGrenadeProjectile>(),ProjectileType<PlasmaGrenadeSmallExplosion>(), ProjectileType<MassivePlasmaExplosion>()))));
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<PlasmaGrenadeProjectile>(), ProjectileType<PlasmaGrenadeSmallExplosion>(), ProjectileType<MassivePlasmaExplosion>()))));
|
||||
|
||||
// 20% resist to Voltaic Climax / Void Vortex hitscan beams.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<ClimaxBeam>()))));
|
||||
@@ -447,6 +490,9 @@ namespace CalamityMod.Balancing
|
||||
// 30% resist to Surge Driver's alt click comets.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<BrimstoneHeart>(), new ProjectileResistBalancingRule(0.7f, ProjectileType<PrismComet>())));
|
||||
|
||||
// 30% resist to Supernova
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<BrimstoneHeart>(), new ProjectileResistBalancingRule(0.7f, ProjectileType<SupernovaBoom>(), ProjectileType<SupernovaStealthBoom>())));
|
||||
|
||||
// 20% resist to Executioner's Blade stealth strikes.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<BrimstoneHeart>(), new ProjectileResistBalancingRule(0.8f, ProjectileType<ExecutionersBladeStealthProj>())));
|
||||
#endregion
|
||||
@@ -458,6 +504,9 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Subsuming Vortex.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.5f, ProjectileType<ExoVortex>(), ProjectileType<ExoVortex2>(), ProjectileType<EnormousConsumingVortex>())));
|
||||
|
||||
// 40% resist to Supernova
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<SupernovaBoom>(), ProjectileType<SupernovaStealthBoom>())));
|
||||
|
||||
// 30% resist to Zenith.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.7f, ProjectileID.FinalFractal)));
|
||||
|
||||
@@ -469,7 +518,7 @@ namespace CalamityMod.Balancing
|
||||
|
||||
// 10% resist to Executioner's Blade stealth strikes.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.9f, ProjectileType<ExecutionersBladeStealthProj>())));
|
||||
|
||||
|
||||
// 10% resist to Surge Driver's alt click comets.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<SoulSeekerSupreme>(), new ProjectileResistBalancingRule(0.9f, ProjectileType<PrismComet>())));
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
{
|
||||
public static class BalancingConstants
|
||||
{
|
||||
#region Movement
|
||||
// When the relevant config is enabled: Gives the player a substantial +50% move speed boost at all times
|
||||
internal static readonly float DefaultMoveSpeedBoost = 0.5f;
|
||||
|
||||
@@ -16,12 +17,37 @@
|
||||
// This is a const because it replaces a hardcoded value in vanilla
|
||||
internal const float BalloonJumpSpeedBoost = 0.75f;
|
||||
|
||||
// Altered default damage deviation
|
||||
internal const int NewDefaultDamageVariationPercent = 5;
|
||||
// Default jump speed boost provided by Frog Leg and tinker combinations in vanilla
|
||||
internal const float VanillaFrogLegJumpSpeedBoost = 1.6f;
|
||||
|
||||
// Sharpening Station grants this much armor penetration to melee weapons.
|
||||
internal const float SharpeningStationArmorPenetration = 5f;
|
||||
// Altered jump speed boost provided by Amphibian Boots via global item UpdateAccessory
|
||||
internal static readonly float AmphibianBootsJumpSpeedBoost = 1f;
|
||||
|
||||
// Altered movement stats provided by Shadow Armor via IL edit
|
||||
// This item is modified to not stack with Magiluminescence if on the ground. If in the air, it still functions.
|
||||
internal static readonly float ShadowArmorRunAccelerationMultiplier = 1.25f; // Vanilla and Magi = 1.75f
|
||||
internal static readonly float ShadowArmorMaxRunSpeedMultiplier = 1.05f; // Vanilla and Magi = 1.15f
|
||||
internal static readonly float ShadowArmorAccRunSpeedMultiplier = 1.05f; // Vanilla and Magi = 1.15f
|
||||
internal static readonly float ShadowArmorRunSlowdownMultiplier = 1.5f; // Vanilla and Magi = 1.75f
|
||||
|
||||
// Altered run acceleration multiplier provided by Soaring Insignia via IL edit
|
||||
// This is a const because it replaces a hardcoded value in vanilla
|
||||
internal const float SoaringInsigniaRunAccelerationMultiplier = 1.1f; // Vanilla = 1.75f
|
||||
#endregion
|
||||
|
||||
#region Immunity Frames
|
||||
// Default immunity frame rules
|
||||
internal const int VanillaDefaultIFrames = 40;
|
||||
internal const int VanillaParryIFrames = 60;
|
||||
internal const int VanillaDodgeIFrames = 80;
|
||||
|
||||
// In vanilla, the Cross Necklace grants +40 iframes to all hits except for in PvP (where it does nothing)
|
||||
// and Brand of the Inferno (where it only gives +30 instead).
|
||||
internal const int CrossNecklaceIFrameBoost = 40;
|
||||
internal const int CrossNecklaceIFrameBoost_Parry = 30;
|
||||
#endregion
|
||||
|
||||
#region Dashes and Dodges
|
||||
// Dash cooldowns (in frames)
|
||||
internal const int UniversalDashCooldown = 30;
|
||||
internal const int UniversalShieldSlamCooldown = 30;
|
||||
@@ -36,14 +62,35 @@
|
||||
|
||||
// Dodge cooldowns (in frames)
|
||||
// TODO -- Some of these could be moved to the respective item files
|
||||
internal static readonly int BeltDodgeCooldown = 5400;
|
||||
internal static readonly int BrainDodgeCooldown = 5400;
|
||||
internal static readonly int AmalgamDodgeCooldown = 5400;
|
||||
internal static readonly int MirrorDodgeCooldown = 5400;
|
||||
internal static readonly int DaedalusReflectCooldown = 5400;
|
||||
internal static readonly int EvolutionReflectCooldown = 5400;
|
||||
internal static readonly int BeltDodgeCooldownMin = 900;
|
||||
internal static readonly int BeltDodgeCooldownMax = 5400;
|
||||
internal static readonly int BrainDodgeCooldownMin = 900;
|
||||
internal static readonly int BrainDodgeCooldownMax = 5400;
|
||||
internal static readonly int AmalgamDodgeCooldownMin = 900;
|
||||
internal static readonly int AmalgamDodgeCooldownMax = 5400;
|
||||
internal static readonly int MirrorDodgeCooldownMin = 900;
|
||||
internal static readonly int MirrorDodgeCooldownMax = 5400;
|
||||
internal static readonly int DaedalusReflectCooldownMin = 900;
|
||||
internal static readonly int DaedalusReflectCooldownMax = 5400;
|
||||
internal static readonly int EvolutionReflectCooldownMin = 900;
|
||||
internal static readonly int EvolutionReflectCooldownMax = 5400;
|
||||
#endregion
|
||||
|
||||
// Internal vanilla item damage variables
|
||||
#region Damage
|
||||
// Altered default damage deviation
|
||||
internal const int NewDefaultDamageVariationPercent = 5;
|
||||
|
||||
// Summoner cross class nerf
|
||||
internal static readonly float SummonerCrossClassNerf = 0.75f;
|
||||
|
||||
// Summon damage bonuses counting less towards "scales with your best class"
|
||||
internal static readonly float SummonAllClassScalingFactor = 0.75f;
|
||||
|
||||
// Minimum and maximum allowed attack speed ratios when using Calamity Global Item Tweaks
|
||||
internal static readonly float MinimumAllowedAttackSpeed = 0.25f;
|
||||
internal static readonly float MaximumAllowedAttackSpeed = 10f;
|
||||
|
||||
// Internal vanilla whip damage variables
|
||||
internal static readonly float LeatherWhipTagDamageMultiplier = 1.08f;
|
||||
internal static readonly float SnapthornTagDamageMultiplier = 1.04f;
|
||||
internal static readonly float SpinalTapTagDamageMultiplier = 1.08f;
|
||||
@@ -53,10 +100,72 @@
|
||||
internal static readonly float MorningStarTagDamageMultiplier = 1.11f;
|
||||
internal static readonly float KaleidoscopeTagDamageMultiplier = 1.12f;
|
||||
|
||||
// Summoner cross class nerf
|
||||
internal static readonly float SummonerCrossClassNerf = 0.75f;
|
||||
// Sharpening Station grants this much armor penetration to melee weapons.
|
||||
internal const float SharpeningStationArmorPenetration = 5f;
|
||||
|
||||
// Rogue stealth
|
||||
// Beetle Scale Mail stats
|
||||
internal static readonly float BeetleScaleMailMeleeDamagePerBeetle = 0.1f;
|
||||
internal static readonly float BeetleScaleMailMeleeSpeedPerBeetle = 0.05f;
|
||||
|
||||
// Nebula Armor Damage Booster
|
||||
internal static readonly float NebulaDamagePerBooster = 0.075f; // 0.15f in vanilla
|
||||
|
||||
// Nebula Armor Mana Booster
|
||||
// nothing here yet
|
||||
#endregion
|
||||
|
||||
#region Life Steal
|
||||
// Life steal cap
|
||||
internal static readonly int LifeStealCap = 100;
|
||||
|
||||
// Life steal accessories require a more strict cooldown due to their ease of use and global application
|
||||
internal static readonly float LifeStealAccessoryCooldownMultiplier = 3f;
|
||||
|
||||
// Life steal cooldown multipliers used for armor set bonuses
|
||||
internal static readonly float LifeStealSetBonusCooldownMultiplier = 2f;
|
||||
internal static readonly float LifeStealReaverTankCooldownMultiplier = 4f;
|
||||
|
||||
// The range was buffed in vanilla from 1200 to 3000 in 1.4.4, and I agree with that decision
|
||||
internal static readonly float LifeStealRange = 3000f;
|
||||
|
||||
// Life steal caps (aka, how much life steal the player is allowed before it goes on cooldown)
|
||||
internal static readonly float LifeStealCap_Classic = 60f;
|
||||
internal static readonly float LifeStealCap_Expert = 50f;
|
||||
internal static readonly float LifeStealCap_Revengeance = 40f;
|
||||
internal static readonly float LifeStealCap_Death = 30f;
|
||||
|
||||
// Master nerfs the life steal cap by 10, resulting in 40 in non-Rev Master, 30 in Rev Master, and 20 in Death Master
|
||||
internal static readonly float LifeStealCapReduction_Master = 10f;
|
||||
|
||||
// The base life steal cooldowns from vanilla
|
||||
internal static readonly float LifeStealRecoveryRate_Classic = 0.6f;
|
||||
internal static readonly float LifeStealRecoveryRate_Expert = 0.5f;
|
||||
|
||||
// The calculations below show the time (in frames) for 10 life steal cooldown to recover in each difficulty
|
||||
// Classic: 10 / 0.2 = 50
|
||||
// Expert: 10 / 0.15 = 66.667
|
||||
// Revengeance: 10 / 0.125 = 80
|
||||
// Death: 10 / 0.1 = 100
|
||||
// Master: 10 / 0.1 = 100
|
||||
// Revengeance Master: 10 / 0.075 = 133.333
|
||||
// Death Master: 10 / 0.05 = 200
|
||||
// Nerfs the life steal recovery rate in Classic from 0.6/s to 0.2/s
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.4f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Expert from 0.5/s to 0.15/s
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.35f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Revengeance from 0.5/s to 0.125/s
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Revengeance = 0.375f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Death from 0.5/s to 0.1/s
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Death = 0.4f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Master by 0.05/s, resulting in 0.1/s in non-Rev Master, 0.075/s in Rev Master, and 0.05/s in Death Master
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Master = 0.05f;
|
||||
#endregion
|
||||
|
||||
#region Rogue Base Stats
|
||||
// If stealth is too weak, increase this number. If stealth is too strong, decrease this number.
|
||||
// This value is intentionally not readonly.
|
||||
public static double UniversalStealthStrikeDamageFactor = 0.42;
|
||||
@@ -67,37 +176,32 @@
|
||||
|
||||
internal static readonly float BaseStealthGenTime = 4f; // 4 seconds
|
||||
internal static readonly float MovingStealthGenRatio = 0.5f;
|
||||
#endregion
|
||||
|
||||
// Rage
|
||||
internal static readonly int DefaultRageDuration = CalamityUtils.SecondsToFrames(9); // Rage lasts 9 seconds by default.
|
||||
internal static readonly int RageDurationPerBooster = CalamityUtils.SecondsToFrames(1); // Each booster is +1 second: 10, 11, 12.
|
||||
internal static readonly int RageCombatDelayTime = CalamityUtils.SecondsToFrames(10);
|
||||
internal static readonly int RageFadeTime = CalamityUtils.SecondsToFrames(30);
|
||||
internal static readonly float DefaultRageDamageBoost = 0.35f; // +35%
|
||||
#region Defense, Health and Mana (Armor set stuff)
|
||||
// Beetle Shell's multiplicative DR is removed by Calamity. In compensation, you get this much regular DR per beetle.
|
||||
internal static readonly float BeetleShellDRPerBeetle = 0.1f;
|
||||
|
||||
// Proximity Rage
|
||||
// These variables should be used in general to classify "enemies" vs "non-enemies" as well.
|
||||
// See NPCUtils.IsAnEnemy
|
||||
internal const int TinyHealthThreshold = 5;
|
||||
internal const int TinyDamageThreshold = 5;
|
||||
// If an enemy has more health than this, they are considered an enemy even if they have 0 contact damage
|
||||
internal const int NoContactDamageHealthThreshold = 3000;
|
||||
internal const int UnreasonableHealthThreshold = 25000000; // 25 million
|
||||
// Solar Flare Armor's multiplicative DR is removed by Calamity. In compensation, you get this much DR from having at least one solar shield up.
|
||||
internal static readonly float SolarFlareShieldDR = 0.25f;
|
||||
|
||||
// Adrenaline
|
||||
internal static readonly float AdrenalineDamageBoost = 2f; // +200%
|
||||
internal static readonly float AdrenalineDamagePerBooster = 0.15f; // +15%
|
||||
internal static readonly float FullAdrenalineDR = 0.5f; // 50%
|
||||
internal static readonly float AdrenalineDRPerBooster = 0.05f; // +5% per booster
|
||||
// Nebula Armor Life Regen
|
||||
internal static readonly int NebulaLifeRegenPerBooster = 4; // 6 in vanilla
|
||||
|
||||
// Summon damage bonuses counting less towards "scales with your best class"
|
||||
internal static readonly float SummonAllClassScalingFactor = 0.75f;
|
||||
// Nebula Armor Mana Regen
|
||||
// This value works differently than you might expect. Raising it actually nerfs the mana regeneration of Nebula Armor
|
||||
// Every frame, Terraria adds 1 to a counter for each Mana Booster the player has.
|
||||
// If this counter reaches the below threshold, that player gains 1 mana.
|
||||
// By default, it's 6, which has the following effects:
|
||||
// 1 booster = +1 mana every 6 frames = +10 mana per second
|
||||
// 2 boosters = +1 mana every 3 frames = +20 mana per second
|
||||
// 3 boosters = +1 mana every 2 frames = +30 mana per second
|
||||
//
|
||||
// Calamity just halves this, that's probably good enough.
|
||||
internal static readonly int NebulaManaRegenFrameCounterThreshold = 12; // 6 in vanilla
|
||||
#endregion
|
||||
|
||||
// Minimum and maximum allowed attack speed ratios when using Calamity Global Item Tweaks
|
||||
internal static readonly float MinimumAllowedAttackSpeed = 0.25f;
|
||||
internal static readonly float MaximumAllowedAttackSpeed = 10f;
|
||||
|
||||
// Defense Damage
|
||||
#region Defense Damage
|
||||
internal const double DefaultDefenseDamageRatio = 0.3333;
|
||||
|
||||
// Defense damage floor: PHM | HM | PML
|
||||
@@ -107,15 +211,46 @@
|
||||
// Death Mode: 5 | 12 | 24
|
||||
// Boss Rush: 25
|
||||
internal static readonly int DefenseDamageFloor_NormalPHM = 3;
|
||||
internal static readonly int DefenseDamageFloor_NormalHM = 8;
|
||||
internal static readonly int DefenseDamageFloor_NormalHM = 8;
|
||||
internal static readonly int DefenseDamageFloor_NormalPML = 16;
|
||||
internal static readonly int DefenseDamageFloor_RevPHM = 4;
|
||||
internal static readonly int DefenseDamageFloor_RevHM = 10;
|
||||
internal static readonly int DefenseDamageFloor_RevPML = 20;
|
||||
internal static readonly int DefenseDamageFloor_DeathPHM = 5;
|
||||
internal static readonly int DefenseDamageFloor_DeathHM = 12;
|
||||
internal static readonly int DefenseDamageFloor_DeathPML = 24;
|
||||
internal static readonly int DefenseDamageFloor_BossRush = 25;
|
||||
internal static readonly int DefenseDamageFloor_RevPHM = 4;
|
||||
internal static readonly int DefenseDamageFloor_RevHM = 10;
|
||||
internal static readonly int DefenseDamageFloor_RevPML = 20;
|
||||
internal static readonly int DefenseDamageFloor_DeathPHM = 5;
|
||||
internal static readonly int DefenseDamageFloor_DeathHM = 12;
|
||||
internal static readonly int DefenseDamageFloor_DeathPML = 24;
|
||||
internal static readonly int DefenseDamageFloor_BossRush = 25;
|
||||
#endregion
|
||||
|
||||
#region Rage and Adrenaline (Rippers)
|
||||
internal static readonly int DefaultRageDuration = CalamityUtils.SecondsToFrames(9); // Rage lasts 9 seconds by default.
|
||||
internal static readonly int RageDurationPerBooster = CalamityUtils.SecondsToFrames(1); // Each booster is +1 second: 10, 11, 12.
|
||||
internal static readonly int RageCombatDelayTime = CalamityUtils.SecondsToFrames(10);
|
||||
internal static readonly int RageFadeTime = CalamityUtils.SecondsToFrames(30);
|
||||
internal static readonly float DefaultRageDamageBoost = 0.35f; // +35%
|
||||
|
||||
internal static readonly float AdrenalineDamageBoost = 1.5f; // +150%
|
||||
internal static readonly float AdrenalineDamagePerBooster = 0.2f; // +20%
|
||||
internal static readonly float FullAdrenalineDR = 0.5f; // 50%
|
||||
internal static readonly float AdrenalineDRPerBooster = 0.05f; // +5% per booster
|
||||
|
||||
internal static readonly int AdrenalinePauseAfterDamage = CalamityUtils.SecondsToFrames(1);
|
||||
internal static readonly float MinimumAdrenalineLoss = 0.25f; // No matter how small a hit, you will always lose at least 25% current Adrenaline
|
||||
internal static readonly float AdrenalineFalloffTinyHitHealthRatio = 0.05f; // Hits for 5% max HP or less result in less Adrenaline loss
|
||||
|
||||
internal static readonly float TrueMeleeRipperReductionFactor = 0.5f; // True melee benefits less from rippers to prevent excessive melting.
|
||||
#endregion
|
||||
|
||||
// TODO -- NPC classification is not done consistently with predictable thresholds.
|
||||
// These variables should be used in general to classify "enemies" vs "non-enemies" as well.
|
||||
// See NPCUtils.IsAnEnemy
|
||||
#region NPC Classification
|
||||
internal const int TinyHealthThreshold = 5;
|
||||
internal const int TinyDamageThreshold = 5;
|
||||
// If an enemy has more health than this, they are considered an enemy even if they have 0 contact damage
|
||||
internal const int NoContactDamageHealthThreshold = 3000;
|
||||
internal const int UnreasonableHealthThreshold = 25000000; // 25 million
|
||||
#endregion
|
||||
|
||||
// TODO -- Add all balance related constants here that don't belong in other files.
|
||||
// Review all constants and static readonlys in the entire mod to find things to add.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace CalamityMod.Balancing
|
||||
namespace CalamityMod.Balancing
|
||||
{
|
||||
public struct NPCBalancingChange
|
||||
{
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class AbovegroundAstralBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AstralWater");
|
||||
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,25 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class AbovegroundAstralBiomeSurface : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class AbovegroundAstralDesertBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<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 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.Graphics.Effects;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class AbovegroundAstralSnowBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Placeables.FurnitureAbyss;
|
||||
using CalamityMod.World;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.BiomeManagers
|
||||
if (Main.remixWorld)
|
||||
return !player.lavaWet && !player.honeyWet && abyssPosX && playerYTileCoords < abyssStartHeight;
|
||||
|
||||
return !player.lavaWet && !player.honeyWet && abyssPosX && playerYTileCoords >= abyssStartHeight && playerYTileCoords <= Main.maxTilesY - 200;
|
||||
return !player.lavaWet && !player.honeyWet && abyssPosX && playerYTileCoords >= abyssStartHeight && playerYTileCoords <= Main.UnderworldLayer;
|
||||
}
|
||||
|
||||
// Temporarily use sulphur for now
|
||||
|
||||
@@ -32,10 +32,10 @@ namespace CalamityMod.BiomeManagers
|
||||
if (Main.remixWorld)
|
||||
{
|
||||
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && BiomeTileCounterSystem.Layer2Tiles >= 200 &&
|
||||
playerYTileCoords <= SulphurousSea.YStart - (int)((Main.maxTilesY - 200) * 0.2f) && playerYTileCoords > SulphurousSea.YStart - (int)((Main.maxTilesY - 200) * 0.4f);
|
||||
playerYTileCoords <= SulphurousSea.YStart - (int)(Main.UnderworldLayer * 0.2f) && playerYTileCoords > SulphurousSea.YStart - (int)(Main.UnderworldLayer * 0.4f);
|
||||
}
|
||||
|
||||
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords2) && BiomeTileCounterSystem.Layer2Tiles >= 200 &&
|
||||
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords2) && BiomeTileCounterSystem.Layer2Tiles >= 200 &&
|
||||
playerYTileCoords2 > Main.rockLayer - 10 && playerYTileCoords2 <= Main.rockLayer + Main.maxTilesY * 0.143;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.BiomeManagers
|
||||
if (Main.remixWorld)
|
||||
{
|
||||
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && BiomeTileCounterSystem.Layer3Tiles >= 200 &&
|
||||
playerYTileCoords <= SulphurousSea.YStart - (int)((Main.maxTilesY - 200) * 0.4f) && playerYTileCoords > SulphurousSea.YStart - (int)((Main.maxTilesY - 200) * 0.6f);
|
||||
playerYTileCoords <= SulphurousSea.YStart - (int)(Main.UnderworldLayer * 0.4f) && playerYTileCoords > SulphurousSea.YStart - (int)(Main.UnderworldLayer * 0.6f);
|
||||
}
|
||||
|
||||
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords2) && BiomeTileCounterSystem.Layer3Tiles >= 200 &&
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.BiomeManagers
|
||||
if (Main.remixWorld)
|
||||
{
|
||||
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && BiomeTileCounterSystem.Layer4Tiles >= 200 &&
|
||||
playerYTileCoords <= SulphurousSea.YStart - (int)((Main.maxTilesY - 200) * 0.6f);
|
||||
playerYTileCoords <= SulphurousSea.YStart - (int)(Main.UnderworldLayer * 0.6f);
|
||||
}
|
||||
|
||||
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords2) && BiomeTileCounterSystem.Layer4Tiles >= 200 &&
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace CalamityMod.BiomeManagers
|
||||
public class ArsenalLabBiome : ModBiome
|
||||
{
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/LaboratoryIcon";
|
||||
// Could use its own unique background if someone even bothers
|
||||
// Could use its own unique background if someone even bothers
|
||||
public override string BackgroundPath => "Terraria/Images/MapBG32";
|
||||
|
||||
//Does this even need proper detection, this file solely exists for a few critter entries and the detection code is done elsewhere
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.BiomeManagers
|
||||
public class SulphurousSeaBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => Main.zenithWorld ? ModContent.Find<ModWaterStyle>("CalamityMod/PissWater") : ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricWater");
|
||||
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => Main.zenithWorld ?ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/PissSeaSurfaceBGStyle") : ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/SulphurSeaSurfaceBGStyle");
|
||||
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => Main.zenithWorld ? ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/PissSeaSurfaceBGStyle") : ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/SulphurSeaSurfaceBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<SulphurousTorch>();
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SulphurousSeaIcon";
|
||||
@@ -45,7 +45,7 @@ namespace CalamityMod.BiomeManagers
|
||||
? CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaNight") ?? MusicID.Desert // Nighttime
|
||||
: CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaDay") ?? MusicID.Desert; // Daytime
|
||||
}
|
||||
|
||||
|
||||
return music;
|
||||
}
|
||||
}
|
||||
@@ -69,13 +69,13 @@ namespace CalamityMod.BiomeManagers
|
||||
sulphurPosX = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (Main.remixWorld)
|
||||
return (BiomeTileCounterSystem.SulphurTiles >= 300 || (point.Y > SulphurousSea.YStart && point.Y < Main.maxTilesY - 200 && sulphurPosX && !WeakReferenceSupport.InAnySubworld())) && !player.Calamity().ZoneAbyss;
|
||||
return (BiomeTileCounterSystem.SulphurTiles >= 300 || (point.Y > SulphurousSea.YStart && point.Y < Main.UnderworldLayer && sulphurPosX && !WeakReferenceSupport.InAnySubworld())) && !player.Calamity().ZoneAbyss;
|
||||
|
||||
return (BiomeTileCounterSystem.SulphurTiles >= 300 || (point.Y < (Main.rockLayer - Main.maxTilesY / 13) && sulphurPosX && !WeakReferenceSupport.InAnySubworld())) && !player.Calamity().ZoneAbyss;
|
||||
}
|
||||
|
||||
|
||||
public override void SpecialVisuals(Player player, bool isActive)
|
||||
{
|
||||
string biomeName = "CalamityMod:SulphurSea";
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.BiomeManagers
|
||||
}
|
||||
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Alcohol
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.NPCs;
|
||||
using System.Text;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
@@ -73,33 +73,25 @@ namespace CalamityMod.Buffs
|
||||
{
|
||||
player.endurance -= 0.1f;
|
||||
}
|
||||
else if (type >= BuffID.NebulaUpDmg1 && type <= BuffID.NebulaUpDmg3)
|
||||
|
||||
// Beetle Shell DR is a full compensation, as the vanilla multiplicative DR is removed entirely.
|
||||
else if (type >= BuffID.BeetleEndurance1 && type <= BuffID.BeetleEndurance3 && player.beetleDefense)
|
||||
{
|
||||
float nebulaDamage = 0.075f * player.nebulaLevelDamage; // 15% to 45% changed to 7.5% to 22.5%
|
||||
player.GetDamage<GenericDamageClass>() -= nebulaDamage;
|
||||
int orbsToGrant = player.beetleOrbs < 0 ? 0 : player.beetleOrbs;
|
||||
if (orbsToGrant > 3)
|
||||
orbsToGrant = 3;
|
||||
player.endurance += BalancingConstants.BeetleShellDRPerBeetle * orbsToGrant;
|
||||
}
|
||||
else if (type == BuffID.Warmth)
|
||||
|
||||
// Solar Flare DR is a full compensation, as the vanilla multiplicative DR is removed entirely.
|
||||
else if (type >= BuffID.SolarShield1 && type <= BuffID.SolarShield3)
|
||||
{
|
||||
player.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
player.buffImmune[BuffID.Frozen] = true;
|
||||
player.buffImmune[BuffID.Chilled] = true;
|
||||
player.endurance += BalancingConstants.SolarFlareShieldDR;
|
||||
}
|
||||
else if (type == BuffID.Rabies)
|
||||
{
|
||||
player.GetDamage<GenericDamageClass>() -= 0.2f;
|
||||
}
|
||||
else if (type == BuffID.BeetleMight1)
|
||||
{
|
||||
player.GetAttackSpeed<MeleeDamageClass>() -= 0.05f;
|
||||
}
|
||||
else if (type == BuffID.BeetleMight2)
|
||||
{
|
||||
player.GetAttackSpeed<MeleeDamageClass>() -= 0.1f;
|
||||
}
|
||||
else if (type == BuffID.BeetleMight3)
|
||||
{
|
||||
player.GetAttackSpeed<MeleeDamageClass>() -= 0.15f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Update(int type, NPC npc, ref int buffIndex)
|
||||
@@ -187,7 +179,7 @@ namespace CalamityMod.Buffs
|
||||
case BuffID.Mining:
|
||||
tip = tip.Replace("25", "15");
|
||||
break;
|
||||
|
||||
|
||||
case BuffID.MonsterBanner: //Vanilla's wording is unclear and nondescript
|
||||
var tooltipLines = tip.Split("\n");
|
||||
var result = "";
|
||||
@@ -200,7 +192,7 @@ namespace CalamityMod.Buffs
|
||||
}
|
||||
tip = result;
|
||||
break;
|
||||
|
||||
|
||||
case BuffID.NebulaUpDmg1:
|
||||
tip = tip.Replace("15", "7.5");
|
||||
break;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 621 B After Width: | Height: | Size: 763 B |
|
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 633 B |
|
Before Width: | Height: | Size: 632 B After Width: | Height: | Size: 564 B |
@@ -68,9 +68,9 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
};
|
||||
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
Vector2 speed = new Vector2(Main.rand.NextFloat(-3f, 3f), Main.rand.NextFloat(-2.5f, -8.3f));
|
||||
|
||||
|
||||
GeneralParticleHandler.SpawnParticle(new TechyHoloysquareParticle(npcSize, speed, Main.rand.NextFloat(1.2f, 3.1f), effectcolor, Main.rand.Next(8, 14)));
|
||||
|
||||
|
||||
int dustType = Main.rand.NextBool() ? 66 : 247;
|
||||
Dust dust = Dust.NewDustPerfect(npcSize, dustType);
|
||||
dust.scale = (dustType == 66 ? 1.4f : 1.2f);
|
||||
|
||||
|
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 759 B |
@@ -45,7 +45,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
Vector2 dustCorner = Player.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = Player.velocity + new Vector2(0f, Main.rand.NextFloat(-5f, -1f));
|
||||
int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, 87, dustVel.X, dustVel.Y);
|
||||
int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, DustID.GemTopaz, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = hasDebuffResistance ? Main.rand.NextFloat(0.3f, 0.5f) : Main.rand.NextFloat(0.7f, 1.2f);
|
||||
Main.dust[d].alpha = 235;
|
||||
@@ -66,7 +66,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
Vector2 dustCorner = npc.position - 2f * Vector2.One;
|
||||
Vector2 dustVel = npc.velocity + new Vector2(0f, Main.rand.NextFloat(-5f, -1f));
|
||||
int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, 87, dustVel.X, dustVel.Y);
|
||||
int d = Dust.NewDust(dustCorner, npc.width + 4, npc.height + 4, DustID.GemTopaz, dustVel.X, dustVel.Y);
|
||||
Main.dust[d].noGravity = true;
|
||||
Main.dust[d].scale = Main.rand.NextFloat(0.7f, 1.2f);
|
||||
Main.dust[d].alpha = 235;
|
||||
|
||||
|
Before Width: | Height: | Size: 519 B After Width: | Height: | Size: 669 B |
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -44,10 +44,10 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot, 278, CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f));
|
||||
Dust dust = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot, 66, CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(0.7f, 0.85f);
|
||||
dust.color = sparkColor * 0.45f;
|
||||
dust.color = sparkColor;
|
||||
}
|
||||
|
||||
float numberOfDusts = 1f;
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
float rot = MathHelper.ToRadians(i * rotFactor);
|
||||
Vector2 velOffset = CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f);
|
||||
velOffset *= Main.rand.NextFloat(2, 13);
|
||||
SquishyLightParticle exoEnergy = new(Player.Center + Player.velocity * 3 + velOffset * 1.5f, -velOffset * 0.25f, 0.3f, sparkColor, 8);
|
||||
Particle exoEnergy = new GlowSparkParticle(Player.Center + Player.velocity * 3 + velOffset * 1.5f, -velOffset * 0.25f, false, 4, 0.008f, sparkColor, new Vector2(0.6f, 1.2f));
|
||||
GeneralParticleHandler.SpawnParticle(exoEnergy);
|
||||
}
|
||||
}
|
||||
@@ -73,26 +73,24 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
_ => Color.LawnGreen,
|
||||
};
|
||||
|
||||
if (Main.rand.NextBool(3))
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Dust dust = Dust.NewDustPerfect(npcSize, 278, CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f));
|
||||
Dust dust = Dust.NewDustPerfect(npcSize, 66, CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f));
|
||||
dust.noGravity = true;
|
||||
dust.scale = Main.rand.NextFloat(0.7f, 0.85f) + (0.0000007f * npc.width * npc.height);
|
||||
dust.color = sparkColor * 0.45f;
|
||||
dust.color = sparkColor;
|
||||
}
|
||||
|
||||
float numberOfDusts = 1f;
|
||||
float rotFactor = 360f / numberOfDusts;
|
||||
if (Main.rand.NextBool())
|
||||
|
||||
float rotFactor = 360f;
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
for (int i = 0; i < numberOfDusts; i++)
|
||||
{
|
||||
float rot = MathHelper.ToRadians(i * rotFactor);
|
||||
Vector2 velOffset = CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f);
|
||||
velOffset *= Main.rand.NextFloat(1, 9) + (0.0002f * npc.width * npc.height);
|
||||
SquishyLightParticle exoEnergy = new(npc.Center + npc.velocity * 3 + velOffset * 1.5f, -velOffset * 0.25f, 0.3f, sparkColor, 8);
|
||||
GeneralParticleHandler.SpawnParticle(exoEnergy);
|
||||
}
|
||||
float rot = MathHelper.ToRadians(rotFactor);
|
||||
Vector2 velOffset = CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f);
|
||||
velOffset *= Main.rand.NextFloat(5, 9) + (0.0002f * npc.width * npc.height);
|
||||
|
||||
Particle exoEnergy = new GlowSparkParticle(npc.Center + npc.velocity * 3 + velOffset * 1.5f, -velOffset * 0.25f, false, 4, 0.008f, sparkColor, new Vector2(0.6f, 1.2f));
|
||||
GeneralParticleHandler.SpawnParticle(exoEnergy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,15 +36,18 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
float numberOfDusts = 2f;
|
||||
float rotFactor = 360f / numberOfDusts;
|
||||
int particleAmt = Player.Calamity().alchFlask ? 1 : 2;
|
||||
int dustSpawnAmt = Player.Calamity().alchFlask ? 4 : 7;
|
||||
if (Player.miscCounter % 4 == 0)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
for (int i = 0; i < particleAmt; i++)
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, new Vector2(1, 1), 0, Main.rand.NextFloat(0.07f, 0.18f), 0f, 35);
|
||||
float pulseScale = Main.rand.NextFloat(Player.Calamity().alchFlask ? 0.04f : 0.07f, Player.Calamity().alchFlask ? 0.12f : 0.18f);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, Vector2.One, 0, pulseScale, 0f, 20);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 7; i++)
|
||||
for (int i = 0; i < dustSpawnAmt; i++)
|
||||
{
|
||||
int DustID = Main.rand.NextBool(30) ? 220 : 89;
|
||||
float rot = MathHelper.ToRadians(i * rotFactor);
|
||||
@@ -62,7 +65,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, new Vector2(1, 1), 0, Main.rand.NextFloat(0.07f, 0.18f) + (0.0000007f * npc.width * npc.height), 0f, 35);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, new Vector2(1, 1), 0, Main.rand.NextFloat(0.07f, 0.18f) + (0.0000007f * npc.width * npc.height), 0f, 15);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
|
||||
|
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 720 B |
@@ -35,7 +35,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.NextBool(7))
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 165, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.FungiHit, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].velocity *= 1.2f;
|
||||
Main.dust[dust].velocity.Y += 0.8f;
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
if (Main.rand.Next(7) < 3)
|
||||
{
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, 165, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1f);
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, DustID.FungiHit, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1f);
|
||||
Main.dust[dust].noGravity = false;
|
||||
Main.dust[dust].velocity *= 1.2f;
|
||||
Main.dust[dust].velocity.Y += 0.5f;
|
||||
|
||||
|
Before Width: | Height: | Size: 751 B After Width: | Height: | Size: 596 B |
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.Next(5) < 4)
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 27, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.1f);
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.Shadowflame, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 1.1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
if (Main.rand.Next(5) < 4)
|
||||
{
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, 298, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 0.6f);
|
||||
int dust = Dust.NewDust(drawInfo.Position - new Vector2(2f), Player.width + 4, Player.height + 4, DustID.JungleTorch, Player.velocity.X * 0.4f, Player.velocity.Y * 0.4f, 100, default, 0.6f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
@@ -68,7 +68,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, 298, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.2f + +(0.000003f * npc.width * npc.height));
|
||||
int dust = Dust.NewDust(npc.position - new Vector2(2f), npc.width + 4, npc.height + 4, DustID.JungleTorch, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default, 1.2f + +(0.000003f * npc.width * npc.height));
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 0.75f;
|
||||
Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 0.75f;
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Particles;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using ReLogic.Utilities;
|
||||
using CalamityMod.Dusts;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
@@ -46,5 +51,22 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
{
|
||||
Player Player = drawInfo.drawPlayer;
|
||||
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
VoidSparkParticle spark2 = new VoidSparkParticle(Player.Calamity().RandomDebuffVisualSpot, new Vector2(0, Main.rand.NextFloat(-6f, -10f)), false, Main.rand.Next(18, 27), Main.rand.NextFloat(0.015f, 0.045f), Main.rand.NextBool() ? Color.Red : Color.Lerp(Color.Red, Color.Magenta, 0.65f));
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
}
|
||||
|
||||
Dust dust = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot, Main.rand.NextBool() ? 261 :(int)CalamityDusts.Brimstone);
|
||||
dust.scale = Main.rand.NextFloat(0.4f, 0.5f);
|
||||
dust.velocity = new Vector2(0, Main.rand.NextFloat(-0.5f, -2.5f)).RotatedByRandom(0.6f);
|
||||
if (dust.type == 261)
|
||||
dust.color = Color.Lerp(Color.Red, Color.Magenta, 0.65f);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 572 B After Width: | Height: | Size: 741 B |
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Buffs.Mounts
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Mounts
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Mounts
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Armor.MarniteArchitect;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Items.Armor.MarniteArchitect;
|
||||
|
||||
namespace CalamityMod.Buffs.Mounts
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||