Merge branch '1.4.4' into Forbidden-Tome-Line
No files matched your search
@@ -8,6 +8,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
//this is just a blank background, so each custom background will draw over it
|
||||
public class AstralSurfaceBGStyle : ModSurfaceBackgroundStyle
|
||||
{
|
||||
internal static readonly FieldInfo screenOffField = typeof(Main).GetField("screenOff", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
@@ -25,13 +26,17 @@ namespace CalamityMod.Backgrounds
|
||||
{
|
||||
fades[i] += transitionSpeed;
|
||||
if (fades[i] > 1f)
|
||||
{
|
||||
fades[i] = 1f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fades[i] -= transitionSpeed;
|
||||
if (fades[i] < 0f)
|
||||
{
|
||||
fades[i] = 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
public class FloralParadiseBGStyle : ModUndergroundBackgroundStyle
|
||||
{
|
||||
public override void FillTextureArray(int[] textureSlots)
|
||||
{
|
||||
// Corresponds to underground jungle backgrounds. Something custom could probably be made, but for what it is it works sufficiently for the minibiome.
|
||||
for (int i = 0; i <= 3; i++)
|
||||
textureSlots[i] = i + 153;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria.ModLoader;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
@@ -7,7 +8,10 @@ namespace CalamityMod.Backgrounds
|
||||
public override void FillTextureArray(int[] textureSlots)
|
||||
{
|
||||
for (int i = 0; i <= 3; i++)
|
||||
textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG" + i.ToString());
|
||||
{
|
||||
textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
|
||||
//textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG" + i.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
|
||||
namespace CalamityMod.Backgrounds
|
||||
{
|
||||
internal static class SunkenSeaBurrowsBG
|
||||
{
|
||||
public static void Load()
|
||||
{
|
||||
if (Main.dedServ)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
On_Main.DrawBackgroundBlackFill += DrawBurrowsBG;
|
||||
}
|
||||
|
||||
public static float Transparency;
|
||||
|
||||
public static float TransitionSpeed => 0.02f;
|
||||
|
||||
private static void DrawBurrowsBG(On_Main.orig_DrawBackgroundBlackFill orig, Main self)
|
||||
{
|
||||
if (Main.gameMenu || Main.screenPosition.Y + Main.screenHeight < ((int)Main.worldSurface) * 16f)
|
||||
{
|
||||
orig(self);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
orig(self);
|
||||
|
||||
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.SunkenSeaBurrowsBiome>()))
|
||||
{
|
||||
Transparency += TransitionSpeed;
|
||||
|
||||
if (Transparency > 1f)
|
||||
{
|
||||
Transparency = 1f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//make transparency immediately go down so it doesnt look weird, since vanilla underground backgrounds dont have the fade-in effect this background has
|
||||
Transparency -= 1f;
|
||||
|
||||
if (Transparency < 0f)
|
||||
{
|
||||
Transparency = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
//dont bother running any of the background drawing if the transparency is zero (meaning the background isnt actually active)
|
||||
//also do not run any of the background drawing if you have the vanilla background config option turned off
|
||||
if (Transparency > 0f && Main.BackgroundEnabled)
|
||||
{
|
||||
Vector2 vector = Main.screenPosition + new Vector2((Main.screenWidth >> 1), (Main.screenHeight >> 1));
|
||||
float num = (Main.GameViewMatrix.Zoom.Y - 1f) * 0.5f * 200f;
|
||||
float Scale = 1.5f;
|
||||
|
||||
for (int Layers = 4; Layers >= 0; Layers--)
|
||||
{
|
||||
//get each background texture
|
||||
Texture2D BGTexture = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/SunkenSeaBurrowsBG" + Layers).Value;
|
||||
|
||||
Vector2 vector2 = new Vector2(BGTexture.Width, BGTexture.Height) * 0.5f;
|
||||
float num2 = (Layers * 2 + 3f);
|
||||
Vector2 vector3 = new Vector2(1f / num2);
|
||||
Rectangle rectangle = new Rectangle(0, 0, BGTexture.Width, BGTexture.Height);
|
||||
Vector2 zero = Vector2.Zero;
|
||||
|
||||
switch (Layers)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
zero.Y += 800f;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
zero.Y += 200f;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
zero.Y += 450f;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
zero.Y += 45f;
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
zero.Y += 45f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
vector2 *= Scale;
|
||||
|
||||
zero.Y -= num;
|
||||
float LoopWidth = Scale * rectangle.Width;
|
||||
//float LoopHeight = Scale * rectangle.Height;
|
||||
int LoopX = (int)((vector.X * vector3.X - vector2.X + zero.X - (Main.screenWidth >> 1)) / LoopWidth);
|
||||
//int LoopY = (int)((vector.Y * vector3.Y - vector2.Y + zero.Y - (Main.screenWidth >> 1)) / LoopWidth);
|
||||
|
||||
//for (int i = LoopY - 2; i < LoopY + 4 + (int)(Main.screenWidth / LoopHeight); i++)
|
||||
//{
|
||||
for (int j = LoopX - 2; j < LoopX + 4 + (int)(Main.screenWidth / LoopWidth); j++)
|
||||
{
|
||||
Vector2 drawPosition = (new Vector2(j * Scale * (rectangle.Width / vector3.X), ((Main.LocalPlayer.Center.Y / 16f) - 90) * 16f) + vector2 - vector) * vector3 + vector - Main.screenPosition - vector2 + zero;
|
||||
|
||||
var frame = rectangle;
|
||||
var color = Color.MediumTurquoise * Transparency;
|
||||
|
||||
Main.spriteBatch.Draw(BGTexture, drawPosition, frame, color, 0f, Vector2.Zero, Scale, SpriteEffects.None, 0f);
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
@@ -264,6 +264,9 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AstrumDeusIDs, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 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>()))));
|
||||
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
// This is a const because it replaces a hardcoded value in vanilla
|
||||
internal const float BalloonJumpSpeedBoost = 0.75f;
|
||||
|
||||
// Default jump speed boost provided by Frog Leg and tinker combinations in vanilla
|
||||
internal const float VanillaFrogLegJumpSpeedBoost = 1.6f;
|
||||
|
||||
// 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
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class FloralParadiseBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/FloralParadiseWater");
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/FloralParadiseBGStyle");
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return BiomeTileCounterSystem.FloralParadiseTiles >= 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,65 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Graphics.Light;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Mono.Cecil.Cil;
|
||||
using MonoMod.Cil;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
//this is just a global sunken sea biome to check if you are in any of the existing biomes
|
||||
public class SunkenSeaBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/SunkenSeaWater");
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
//apply the drawblack edits here since all sunken sea biomes will have custom backgrounds
|
||||
IL_Main.DrawBlack += ChangeBlackThreshold;
|
||||
On_Main.DrawBlack += ForceDrawBlack;
|
||||
}
|
||||
|
||||
private void ForceDrawBlack(On_Main.orig_DrawBlack orig, Main self, bool force)
|
||||
{
|
||||
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.SunkenSeaBiome>()) && Main.BackgroundEnabled)
|
||||
{
|
||||
orig(self, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
orig(self, force);
|
||||
}
|
||||
}
|
||||
|
||||
private float NewThreshold(float orig)
|
||||
{
|
||||
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.SunkenSeaBiome>()) && Main.BackgroundEnabled)
|
||||
{
|
||||
return 0.1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
return orig;
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangeBlackThreshold(ILContext il)
|
||||
{
|
||||
if (Main.BackgroundEnabled)
|
||||
{
|
||||
var c = new ILCursor(il);
|
||||
c.TryGotoNext(n => n.MatchLdloc(6), n => n.MatchStloc(13)); //beginning of the loop, local 11 is a looping variable
|
||||
c.Index++; //this is kinda goofy since I dont think you could actually ever write c# to compile to the resulting IL from emitting here.
|
||||
c.Emit(OpCodes.Ldloc, 3); //pass the original value so we can set that instead if we dont want to change the threshold
|
||||
c.EmitDelegate<Func<float, float>>(NewThreshold); //check if were in the biome to set, else set the original value
|
||||
c.Emit(OpCodes.Stloc, 3); //num2 in vanilla, controls minimum threshold to turn a tile black
|
||||
}
|
||||
}
|
||||
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
@@ -20,7 +67,8 @@ namespace CalamityMod.BiomeManagers
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return BiomeTileCounterSystem.SunkenSeaTiles > 150;
|
||||
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 500 || BiomeTileCounterSystem.SunkenSeaPolypTiles > 500 ||
|
||||
BiomeTileCounterSystem.SunkenSeaReefsTiles > 500 || BiomeTileCounterSystem.SunkenSeaShoresTiles > 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class SunkenSeaBurrowsBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/SunkenSeaBurrowsWater");
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
|
||||
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
|
||||
|
||||
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 500 && MoreThanReefs && MoreThanPolyp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class SunkenSeaPolypBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/SunkenSeaPolypWater");
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaPolypTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
|
||||
bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaPolypTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles;
|
||||
|
||||
return BiomeTileCounterSystem.SunkenSeaPolypTiles > 500 && MoreThanReefs && MoreThanBurrows;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class SunkenSeaReefsBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/SunkenSeaReefsWater");
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles;
|
||||
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaReefsTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
|
||||
|
||||
return BiomeTileCounterSystem.SunkenSeaReefsTiles > 500 && MoreThanBurrows && MoreThanPolyp;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using CalamityMod.Systems;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.BiomeManagers
|
||||
{
|
||||
public class SunkenSeaShoresBiome : ModBiome
|
||||
{
|
||||
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/SunkenSeaShoresWater");
|
||||
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
|
||||
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
|
||||
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
|
||||
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
|
||||
// Placeholder until we get a dedicated Sunken Sea background
|
||||
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
|
||||
|
||||
public override bool IsBiomeActive(Player player)
|
||||
{
|
||||
return BiomeTileCounterSystem.SunkenSeaShoresTiles > 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,13 +88,6 @@ namespace CalamityMod.Buffs
|
||||
{
|
||||
player.endurance += BalancingConstants.SolarFlareShieldDR;
|
||||
}
|
||||
|
||||
else if (type == BuffID.Warmth)
|
||||
{
|
||||
player.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
player.buffImmune[BuffID.Frozen] = true;
|
||||
player.buffImmune[BuffID.Chilled] = true;
|
||||
}
|
||||
else if (type == BuffID.Rabies)
|
||||
{
|
||||
player.GetDamage<GenericDamageClass>() -= 0.2f;
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class Laceration : ModBuff
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().laceration = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().laceration < npc.buffTime[buffIndex])
|
||||
npc.Calamity().laceration = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
for (int b = 0; b < 2; b++)
|
||||
{
|
||||
Vector2 bloodVel = Main.rand.NextVector2CircularEdge(1f, 1f);
|
||||
bloodVel.SafeNormalize(Vector2.Zero);
|
||||
bloodVel *= Main.rand.NextFloat(4f, 7f);
|
||||
|
||||
Particle bloody = new BloodParticle(npc.Center, bloodVel, 40, 0.75f, new Color(192, 0, 0));
|
||||
GeneralParticleHandler.SpawnParticle(bloody);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 702 B |
@@ -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++)
|
||||
|
||||
@@ -6,17 +6,29 @@ namespace CalamityMod.Buffs.Placeables
|
||||
{
|
||||
public class CirrusBlueCandleBuff : ModBuff
|
||||
{
|
||||
public static float MoveSpeedBoost = 0.1f;
|
||||
public static double WingTimeBoost = 0.1D;
|
||||
public static float AccelerationBoost = 0.1f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.debuff[Type] = true;
|
||||
// These settings are standard for a "opt-in eternal" buff, which has the following properties:
|
||||
// - Is not removed on death
|
||||
// - Saves with the player / is not removed on logout
|
||||
// - Does not display its time
|
||||
// - Never reduces its duration
|
||||
// - Can be manually canceled
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.persistentBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
BuffID.Sets.TimeLeftDoesNotDecrease[Type] = true;
|
||||
}
|
||||
|
||||
// Implementation is partially performed elsewhere using the blueCandle bool.
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.moveSpeed += MoveSpeedBoost;
|
||||
player.Calamity().blueCandle = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,18 +6,24 @@ namespace CalamityMod.Buffs.Placeables
|
||||
{
|
||||
public class CirrusPinkCandleBuff : ModBuff
|
||||
{
|
||||
public static double PercentHealthPerSecond = 0.004D;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.debuff[Type] = true;
|
||||
// These settings are standard for a "opt-in eternal" buff, which has the following properties:
|
||||
// - Is not removed on death
|
||||
// - Saves with the player / is not removed on logout
|
||||
// - Does not display its time
|
||||
// - Never reduces its duration
|
||||
// - Can be manually canceled
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.persistentBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
BuffID.Sets.TimeLeftDoesNotDecrease[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().pinkCandle = true;
|
||||
}
|
||||
// Implementation is performed elsewhere using the pinkCandle bool.
|
||||
public override void Update(Player player, ref int buffIndex) => player.Calamity().pinkCandle = true;
|
||||
}
|
||||
}
|
||||
@@ -6,15 +6,21 @@ namespace CalamityMod.Buffs.Placeables
|
||||
{
|
||||
public class CirrusPurpleCandleBuff : ModBuff
|
||||
{
|
||||
public static float DefenseRatioBonus = 0.15f;
|
||||
public static float DefenseRatioBonus = 0.1f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.debuff[Type] = true;
|
||||
// These settings are standard for a "opt-in eternal" buff, which has the following properties:
|
||||
// - Is not removed on death
|
||||
// - Saves with the player / is not removed on logout
|
||||
// - Does not display its time
|
||||
// - Never reduces its duration
|
||||
// - Can be manually canceled
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.persistentBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
BuffID.Sets.TimeLeftDoesNotDecrease[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
@@ -1,24 +1,37 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.NPC;
|
||||
|
||||
namespace CalamityMod.Buffs.Placeables
|
||||
{
|
||||
public class CirrusYellowCandleBuff : ModBuff
|
||||
{
|
||||
public static float ExtraChipDamageRatio = 0.07f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.debuff[Type] = true;
|
||||
// These settings are standard for a "opt-in eternal" buff, which has the following properties:
|
||||
// - Is not removed on death
|
||||
// - Saves with the player / is not removed on logout
|
||||
// - Does not display its time
|
||||
// - Never reduces its duration
|
||||
// - Can be manually canceled
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.persistentBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = false;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
|
||||
// Spite (the +5% final damage effect of Yellow Candle) is a tag buff. Nothing is immune to it.
|
||||
// They may however be unaffected by it (including only temporarily) if they have incredibly high DR.
|
||||
BuffID.Sets.IsATagBuff[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
BuffID.Sets.TimeLeftDoesNotDecrease[Type] = true;
|
||||
}
|
||||
|
||||
// Implementation is performed elsewhere using the yellowCandle bool.
|
||||
public override void Update(Player player, ref int buffIndex) => player.Calamity().yellowCandle = true;
|
||||
|
||||
// Yellow Candle is implemented as a dirty modifier.
|
||||
internal static void ModifyHitInfo_Spite(ref HitInfo info)
|
||||
{
|
||||
int damageBoost = (int)(info.SourceDamage * ExtraChipDamageRatio);
|
||||
info.Damage += damageBoost;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.BiomeManagers;
|
||||
using CalamityMod.Buffs;
|
||||
using CalamityMod.Buffs.Placeables;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
@@ -30,6 +31,7 @@ using CalamityMod.Items.TreasureBags.MiscGrabBags;
|
||||
using CalamityMod.Items.VanillaArmorChanges;
|
||||
using CalamityMod.Items.Weapons.DraedonsArsenal;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.NPCs;
|
||||
@@ -53,6 +55,7 @@ using Terraria.Graphics.Shaders;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.Utilities.Terraria.Utilities;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
@@ -507,6 +510,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool ascendantTrail = false;
|
||||
public bool eGauntlet = false;
|
||||
public int gloveLevel = 0; // Used to prevent glove stacking
|
||||
public bool alreadyHasFrogLeg = false; // Used to prevent Frog Leg tinker stacking
|
||||
public bool eTalisman = false;
|
||||
public int statisTimer = 0;
|
||||
public bool nucleogenesis = false;
|
||||
@@ -531,6 +535,8 @@ namespace CalamityMod.CalPlayer
|
||||
public bool honeyDewHalveDebuffs = false;
|
||||
public bool livingDewHalveDebuffs = false;
|
||||
public int jewelBonusDefense = 0;
|
||||
public float pulseCounter = 0; // Toxic Heart
|
||||
public float pulseRate = 1; // Toxic Heart
|
||||
public bool aAmpoule = false;
|
||||
public bool rOoze = false;
|
||||
public bool JustWasDebuffed = false;
|
||||
@@ -792,6 +798,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool astralStarRain = false;
|
||||
public int astralStarRainCooldown = 0;
|
||||
public int AbaddonCooldown = 0;
|
||||
public int AlchFlaskCooldown = 0;
|
||||
public bool plagueReaper = false;
|
||||
public bool plaguebringerPatronSet = false;
|
||||
public bool plaguebringerCarapace = false;
|
||||
@@ -876,6 +883,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool gState = false;
|
||||
public bool bBlood = false;
|
||||
public bool brainRot = false;
|
||||
public bool laceration = false;
|
||||
public bool elementalMix = false;
|
||||
public bool icarusFolly = false;
|
||||
public bool weakPetrification = false;
|
||||
@@ -898,6 +906,9 @@ namespace CalamityMod.CalPlayer
|
||||
public bool wither = false;
|
||||
public bool ManaBurn = false;
|
||||
|
||||
public int ImmobilityDebuffImmunityTimer = 0;
|
||||
public const int ImmobilityDebuffImmunityTimerMax = 300;
|
||||
|
||||
public const int SulphSeaWaterSafetyTime = 720;
|
||||
public const int SulphSeaWaterRecoveryTime = 150;
|
||||
#endregion
|
||||
@@ -1095,13 +1106,21 @@ namespace CalamityMod.CalPlayer
|
||||
#region Biome
|
||||
public bool ZoneCalamity => Player.InModBiome(ModContent.GetInstance<BrimstoneCragsBiome>());
|
||||
public bool ZoneAstral => Player.InModBiome(ModContent.GetInstance<BiomeManagers.AstralInfectionBiome>()) && !ZoneAbyss;
|
||||
public bool ZoneSunkenSea => Player.InModBiome(ModContent.GetInstance<SunkenSeaBiome>());
|
||||
public bool ZoneSunkenSea => ZoneSunkenBurrows || ZoneSunkenSeaReefs || ZoneSunkenSeaPolyp || ZoneSunkenSeaShores;
|
||||
public bool ZoneSunkenBurrows => Player.InModBiome(ModContent.GetInstance<SunkenSeaBurrowsBiome>());
|
||||
public bool ZoneSunkenSeaReefs => Player.InModBiome(ModContent.GetInstance<SunkenSeaReefsBiome>());
|
||||
public bool ZoneSunkenSeaPolyp => Player.InModBiome(ModContent.GetInstance<SunkenSeaPolypBiome>());
|
||||
public bool ZoneSunkenSeaShores => Player.InModBiome(ModContent.GetInstance<SunkenSeaShoresBiome>());
|
||||
public bool ZoneSulphur => Player.InModBiome(ModContent.GetInstance<SulphurousSeaBiome>());
|
||||
public bool ZoneAbyss => ZoneAbyssLayer1 || ZoneAbyssLayer2 || ZoneAbyssLayer3 || ZoneAbyssLayer4;
|
||||
public bool ZoneAbyssLayer1 => Player.InModBiome(ModContent.GetInstance<AbyssLayer1Biome>());
|
||||
public bool ZoneAbyssLayer2 => Player.InModBiome(ModContent.GetInstance<AbyssLayer2Biome>());
|
||||
public bool ZoneAbyssLayer3 => Player.InModBiome(ModContent.GetInstance<AbyssLayer3Biome>());
|
||||
public bool ZoneAbyssLayer4 => Player.InModBiome(ModContent.GetInstance<AbyssLayer4Biome>());
|
||||
public bool ZoneFloralParadise => Player.InModBiome(ModContent.GetInstance<FloralParadiseBiome>());
|
||||
|
||||
public bool InAnyCalamityBiome => ZoneAbyss || ZoneCalamity || ZoneFloralParadise || ZoneSulphur || ZoneSunkenSea || ZoneAstral;
|
||||
|
||||
public bool abyssDeath = false;
|
||||
public int abyssBreathCD;
|
||||
public float caveDarkness = 0f;
|
||||
@@ -1705,6 +1724,7 @@ namespace CalamityMod.CalPlayer
|
||||
ascendantTrail = false;
|
||||
eGauntlet = false;
|
||||
gloveLevel = 0;
|
||||
alreadyHasFrogLeg = false;
|
||||
eTalisman = false;
|
||||
nucleogenesis = false;
|
||||
nuclearFuelRod = false;
|
||||
@@ -1783,7 +1803,6 @@ namespace CalamityMod.CalPlayer
|
||||
corrosiveSpine = false;
|
||||
RustyMedallionDroplets = false;
|
||||
MiniSwarmers = false;
|
||||
noStupidNaturalARSpawns = false;
|
||||
rottenDogTooth = false;
|
||||
angelicAlliance = false;
|
||||
BloomStoneRegen = false;
|
||||
@@ -1937,6 +1956,7 @@ namespace CalamityMod.CalPlayer
|
||||
gState = false;
|
||||
bBlood = false;
|
||||
brainRot = false;
|
||||
laceration = false;
|
||||
elementalMix = false;
|
||||
icarusFolly = false;
|
||||
vHex = false;
|
||||
@@ -2155,7 +2175,8 @@ namespace CalamityMod.CalPlayer
|
||||
StellarTorus = false;
|
||||
LiliesOfFinalityBool = false;
|
||||
|
||||
/*
|
||||
/* Spawn blockers from back when they used to work by being favorited and not a toggleable item
|
||||
noStupidNaturalARSpawns = false
|
||||
disableVoodooSpawns = false;
|
||||
disablePerfCystSpawns = false;
|
||||
disableHiveCystSpawns = false;
|
||||
@@ -2315,6 +2336,7 @@ namespace CalamityMod.CalPlayer
|
||||
gSabatonTempJumpSpeed = 0;
|
||||
astralStarRainCooldown = 0;
|
||||
AbaddonCooldown = 0;
|
||||
AlchFlaskCooldown = 0;
|
||||
silvaMageCooldown = 0;
|
||||
bloodflareMageCooldown = 0;
|
||||
tarraRangedCooldown = 0;
|
||||
@@ -2360,6 +2382,7 @@ namespace CalamityMod.CalPlayer
|
||||
gState = false;
|
||||
bBlood = false;
|
||||
brainRot = false;
|
||||
laceration = false;
|
||||
elementalMix = false;
|
||||
icarusFolly = false;
|
||||
vHex = false;
|
||||
@@ -2381,6 +2404,7 @@ namespace CalamityMod.CalPlayer
|
||||
banishingFire = false;
|
||||
wither = false;
|
||||
PurityHealSlowdownFrames = 0;
|
||||
ImmobilityDebuffImmunityTimer = 0;
|
||||
#endregion
|
||||
|
||||
#region Rogue
|
||||
@@ -2703,6 +2727,15 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.dead)
|
||||
return;
|
||||
|
||||
if (ascendantInsignia && Main.myPlayer == Player.whoAmI && CalamityKeybinds.AscendantInsigniaHotKey.JustPressed && ascendantInsigniaCooldown <= 0)
|
||||
{
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<AscendantInsignia>()));
|
||||
Projectile.NewProjectileDirect(source, Player.Center - Vector2.UnitY * 45f, Vector2.Zero, ModContent.ProjectileType<AscendantAura>(), 0, 0f);
|
||||
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Item/AscendantActivate"));
|
||||
ascendantInsigniaCooldown = 2400;
|
||||
ascendantInsigniaBuffTime = 240; //4 seconds
|
||||
}
|
||||
|
||||
//Only increment hotkey holdtime if not on ground, not mounted, not on rope, not hooked, not tongued, otherwise reset hold time to zero
|
||||
if (CalamityKeybinds.GravistarSabatonHotkey.Current && gSabaton && Main.myPlayer == Player.whoAmI && (Player.velocity.Y != Player.oldVelocity.Y) && !Player.pulley && !Player.mount.Active && Player.grappling[0] == -1 && !Player.tongued)
|
||||
{
|
||||
@@ -2738,6 +2771,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player.Teleport(teleportLocation, 4, 0);
|
||||
NetMessage.SendData(MessageID.TeleportEntity, -1, -1, null, 0, (float)Player.whoAmI, teleportLocation.X, teleportLocation.Y, 1, 0, 0);
|
||||
SoundEngine.PlaySound(NormalityRelocator.TeleportSound, Player.Center);
|
||||
|
||||
int duration = areThereAnyDamnBosses ? chaosStateDuration_NR : 360;
|
||||
Player.AddBuff(BuffID.ChaosState, duration, true);
|
||||
@@ -3075,16 +3109,16 @@ namespace CalamityMod.CalPlayer
|
||||
//Right click dash on Speed Blaster
|
||||
if (sBlasterDashActivated == true)
|
||||
{
|
||||
if ((Player.controlUp || Player.controlDown || Player.controlLeft || Player.controlRight) && !Player.pulley && Player.grappling[0] == -1 && !Player.tongued && !Player.mount.Active && Player.HasCooldown(Cooldowns.SpeedBlasterBoost.ID) && Player.dashDelay == 0)
|
||||
if ((Player.controlUp || Player.controlDown || Player.controlLeft || Player.controlRight) && !Player.pulley && Player.grappling[0] == -1 && !Player.tongued && !Player.mount.Active && (Player.HasCooldown(SpeedBlasterBoost.ID) || Player.HasCooldown(SuperradiantSawBoost.ID)) && Player.dashDelay == 0)
|
||||
{
|
||||
SpeedBlasterDashStarted = true;
|
||||
}
|
||||
sBlasterDashActivated = false;
|
||||
}
|
||||
|
||||
if (Player.Calamity().SpeedBlasterDashStarted || (Player.dashDelay != 0 && Player.Calamity().LastUsedDashID == SpeedBlasterDash.ID))
|
||||
if (Player.Calamity().SpeedBlasterDashStarted || (Player.dashDelay != 0 && (Player.Calamity().LastUsedDashID == SuperradiantSawDash.ID || Player.Calamity().LastUsedDashID == SpeedBlasterDash.ID)))
|
||||
{
|
||||
Player.Calamity().DeferredDashID = SpeedBlasterDash.ID;
|
||||
Player.Calamity().DeferredDashID = Player.ActiveItem().type == ModContent.ItemType<SuperradiantSlaughterer>() ? SuperradiantSawDash.ID : SpeedBlasterDash.ID;
|
||||
Player.dash = 0;
|
||||
}
|
||||
|
||||
@@ -3701,7 +3735,7 @@ namespace CalamityMod.CalPlayer
|
||||
(kamiBoost ? KamiBuff.RunAccelerationBoost : 0f) +
|
||||
(CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) +
|
||||
(silvaSet ? 0.05f : 0f) +
|
||||
(blueCandle ? 0.05f : 0f) +
|
||||
(blueCandle ? CirrusBlueCandleBuff.AccelerationBoost : 0f) +
|
||||
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
|
||||
(hasteLevel * 0.05f);
|
||||
|
||||
@@ -4280,20 +4314,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (weakPetrification)
|
||||
WeakPetrification();
|
||||
|
||||
// Disable vanilla dashes during god slayer dash
|
||||
if (godSlayerDashHotKeyPressed)
|
||||
{
|
||||
// Set the player to have no registered vanilla dashes.
|
||||
Player.dashType = 0;
|
||||
|
||||
// Prevent the possibility of Shield of Cthulhu invulnerability exploits.
|
||||
Player.eocHit = -1;
|
||||
if (Player.eocDash != 0)
|
||||
Player.eocDash = 0;
|
||||
}
|
||||
|
||||
// Disable vanilla dashes during god slayer dash
|
||||
if (SpeedBlasterDashStarted)
|
||||
// Disable vanilla dashes during God Slayer or Speed Blaster dashes
|
||||
if (godSlayerDashHotKeyPressed || SpeedBlasterDashStarted)
|
||||
{
|
||||
// Set the player to have no registered vanilla dashes.
|
||||
Player.dashType = 0;
|
||||
@@ -4399,13 +4421,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.blockExtraJumps = true;
|
||||
|
||||
Player.rocketBoots = 0;
|
||||
Player.jumpBoost = false;
|
||||
Player.slowFall = false;
|
||||
Player.gravControl = false;
|
||||
Player.gravControl2 = false;
|
||||
Player.jumpSpeedBoost = 0f;
|
||||
Player.wingTimeMax = (int)(Player.wingTimeMax * 0.5);
|
||||
Player.balloon = -1;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -4870,15 +4886,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (CalamityConfig.Instance.SpeedrunTimer)
|
||||
CalamityMod.SpeedrunTimer.Restart();
|
||||
|
||||
//
|
||||
// 04JAN2024: Ozzatron: Added a temporary message for the Gimme Swag plushie campaign.
|
||||
// This message should not exist indefinitely. It is being pushed as a silent public update just for itself.
|
||||
// As this message always displays and is not configurable, the previous rules about startup messages have been replaced with always-true.
|
||||
//
|
||||
|
||||
// Set a random delay between 12 and 20 seconds. When this delay hits zero, startup messages display
|
||||
bool plushieMessage = true;
|
||||
if (plushieMessage || CalamityConfig.Instance.WikiStatusMessage)
|
||||
if (CalamityConfig.Instance.WikiStatusMessage)
|
||||
{
|
||||
startMessageDisplayDelay = Main.rand.Next(CalamityUtils.SecondsToFrames(12), CalamityUtils.SecondsToFrames(20) + 1);
|
||||
}
|
||||
|
||||
@@ -13,8 +13,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
public partial class CalamityPlayer : ModPlayer
|
||||
{
|
||||
public int VerticalGodslayerDashTimer;
|
||||
public int VerticalSpeedBlasterDashTimer;
|
||||
public int VerticalOmnidashTimer;
|
||||
|
||||
private string dashID; //private backing variable
|
||||
|
||||
@@ -104,16 +103,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.dashDelay > 0) //Speed Blaster
|
||||
{
|
||||
VerticalSpeedBlasterDashTimer = 0;
|
||||
LastUsedDashID = string.Empty;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Player.dashDelay > 0)
|
||||
{
|
||||
VerticalGodslayerDashTimer = 0;
|
||||
VerticalOmnidashTimer = 0;
|
||||
LastUsedDashID = string.Empty;
|
||||
return;
|
||||
}
|
||||
@@ -137,21 +129,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Handle mid-dash effects.
|
||||
UsedDash.MidDashEffects(Player, ref dashSpeed, ref dashSpeedDecelerationFactor, ref runSpeedDecelerationFactor);
|
||||
if (UsedDash.IsOmnidirectional && VerticalGodslayerDashTimer < 25)
|
||||
if (UsedDash.IsOmnidirectional && VerticalOmnidashTimer < 25)
|
||||
{
|
||||
VerticalGodslayerDashTimer++;
|
||||
if (VerticalGodslayerDashTimer >= 25)
|
||||
{
|
||||
Player.dashDelay = dashDelayToApply;
|
||||
// Stop the player from going flying
|
||||
Player.velocity *= 0.2f;
|
||||
}
|
||||
}
|
||||
|
||||
if (UsedDash.IsOmnidirectional && VerticalSpeedBlasterDashTimer < 25)
|
||||
{
|
||||
VerticalSpeedBlasterDashTimer++;
|
||||
if (VerticalSpeedBlasterDashTimer >= 25)
|
||||
VerticalOmnidashTimer++;
|
||||
if (VerticalOmnidashTimer >= 25)
|
||||
{
|
||||
Player.dashDelay = dashDelayToApply;
|
||||
// Stop the player from going flying
|
||||
|
||||
@@ -330,6 +330,24 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
// Prideful Hunter's Planar Ripper movement speed boost
|
||||
if (calamityPlayer.planarSpeedBoost > 0 && drawInfo.shadow == 0f)
|
||||
{
|
||||
int spawnChance = (int)(13 - (calamityPlayer.planarSpeedBoost / 2));
|
||||
if (Main.rand.NextBool(spawnChance))
|
||||
{
|
||||
Vector2 sparkVelocity = -(Vector2.UnitY * Main.rand.NextFloat(2.5f, 5f)).RotatedByRandom(MathHelper.Pi / 10);
|
||||
Vector2 sparkPos = new Vector2(Player.position.X + Main.rand.NextFloat(-8f, 40f), Player.position.Y + Main.rand.NextFloat(-8f, 56f));
|
||||
Particle movementSpark = new AltLineParticle(sparkPos, sparkVelocity, false, 20, Main.rand.NextFloat(0.375f, 0.5f), new Color(130, 255, 255));
|
||||
GeneralParticleHandler.SpawnParticle(movementSpark);
|
||||
|
||||
sparkVelocity = -(Vector2.UnitY * Main.rand.NextFloat(3f, 5.5f)).RotatedByRandom(MathHelper.Pi / 6);
|
||||
sparkPos = new Vector2(Player.position.X + Main.rand.NextFloat(-8f, 40f), Player.position.Y + Main.rand.NextFloat(-8f, 56f));
|
||||
Particle addSparks = new CustomPulse(sparkPos, sparkVelocity, new Color(180, 255, 255), "CalamityMod/Particles/ElectricSpark", Vector2.One, 0f, 0.5f, 0.65f, 20);
|
||||
GeneralParticleHandler.SpawnParticle(addSparks);
|
||||
}
|
||||
}
|
||||
|
||||
// Some extraneous and probably undocumented visual effect caused by the heart lad pet thing
|
||||
if ((calamityPlayer.ladHearts > 0) && !Player.loveStruck && Main.netMode != NetmodeID.Server && drawInfo.shadow == 0f)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Linq;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Buffs.Cooldowns;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.Placeables;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
@@ -37,6 +38,7 @@ using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.UI;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Mono.Cecil;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.Chat;
|
||||
@@ -436,6 +438,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.BrainRot" + Main.rand.Next(1, 3 + 1)).Format(Player.name));
|
||||
}
|
||||
if (laceration)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Laceration" + Main.rand.Next(1, 3 + 1)).Format(Player.name));
|
||||
}
|
||||
if (elementalMix)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.ElementalMix" + Main.rand.Next(1, 2 + 1)).Format(Player.name));
|
||||
@@ -523,6 +529,14 @@ namespace CalamityMod.CalPlayer
|
||||
// Apply all Calamity multipliers as a sum total to TML New Damage in a single step
|
||||
modifiers.SourceDamage *= totalDamageMult;
|
||||
|
||||
// 01JUN2024: Ozzatron: apply Yellow Candle "chip damage" as a dirty modifier
|
||||
// The registration of the dirty modifier is conditional to ensure it doesn't apply to "near invincible" targets
|
||||
//
|
||||
// FinalDamage cannot be used for the intended effect because there is no way to access the actual damage of the hit
|
||||
CalamityGlobalNPC cgn = target.Calamity();
|
||||
if (yellowCandle && cgn.DR < 0.99f && target.takenDamageMultiplier > 0.05f)
|
||||
modifiers.ModifyHitInfo += CirrusYellowCandleBuff.ModifyHitInfo_Spite;
|
||||
|
||||
// Excalibur and True Excalibur deal +100% damage to targets above 75% HP.
|
||||
if (item.type == ItemID.Excalibur || item.type == ItemID.TrueExcalibur)
|
||||
{
|
||||
@@ -589,6 +603,14 @@ namespace CalamityMod.CalPlayer
|
||||
// Apply all Calamity multipliers as a sum total to TML New Damage in a single step
|
||||
modifiers.SourceDamage *= totalDamageMult;
|
||||
|
||||
// 01JUN2024: Ozzatron: apply Yellow Candle "chip damage" as a dirty modifier
|
||||
// The registration of the dirty modifier is conditional to ensure it doesn't apply to "near invincible" targets
|
||||
//
|
||||
// FinalDamage cannot be used for the intended effect because there is no way to access the actual damage of the hit
|
||||
CalamityGlobalNPC cgn = target.Calamity();
|
||||
if (yellowCandle && cgn.DR < 0.99f && target.takenDamageMultiplier > 0.05f)
|
||||
modifiers.ModifyHitInfo += CirrusYellowCandleBuff.ModifyHitInfo_Spite;
|
||||
|
||||
// Stealth strike damage multipliers are applied here.
|
||||
// TODO -- stealth should be its own damage class and this should be applied as player StealthDamage *= XYZ
|
||||
if (proj.Calamity().stealthStrike && proj.CountsAsClass<RogueDamageClass>())
|
||||
@@ -1172,6 +1194,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (crawCarapace)
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<Crumbling>(), 900);
|
||||
int onHitDamage = Player.CalcIntDamage<GenericDamageClass>(40);
|
||||
Player.ApplyDamageToNPC(npc, onHitDamage, 0f, 0, false);
|
||||
SoundEngine.PlaySound(SoundID.NPCHit33 with { Volume = 0.5f }, Player.Center);
|
||||
}
|
||||
|
||||
@@ -1179,6 +1203,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<ArmorCrunch>(), 900);
|
||||
npc.AddBuff(ModContent.BuffType<CrushDepth>(), 900);
|
||||
int onHitDamage = Player.CalcIntDamage<GenericDamageClass>(250);
|
||||
Player.ApplyDamageToNPC(npc, onHitDamage, 0f, 0, false);
|
||||
SoundEngine.PlaySound(BaroclawHit, Player.Center);
|
||||
Vector2 bloodSpawnPosition = Player.Center + Main.rand.NextVector2Circular(Player.width, Player.height) * 0.04f;
|
||||
Vector2 splatterDirection = (Player.Center - bloodSpawnPosition).SafeNormalize(Vector2.UnitY);
|
||||
@@ -1198,6 +1224,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (absorber)
|
||||
{
|
||||
npc.AddBuff(ModContent.BuffType<AbsorberAffliction>(), 900);
|
||||
int onHitDamage = Player.CalcIntDamage<GenericDamageClass>(350);
|
||||
Player.ApplyDamageToNPC(npc, onHitDamage, 0f, 0, false);
|
||||
SoundEngine.PlaySound(AbsorberHit, Player.Center);
|
||||
Vector2 bloodSpawnPosition = Player.Center + Main.rand.NextVector2Circular(Player.width, Player.height) * 0.04f;
|
||||
Vector2 splatterDirection = (Player.Center - bloodSpawnPosition).SafeNormalize(Vector2.UnitY);
|
||||
@@ -1213,6 +1241,22 @@ namespace CalamityMod.CalPlayer
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
}
|
||||
|
||||
if (alchFlask)
|
||||
{
|
||||
for (int i = 0; i < 9; i++)
|
||||
{
|
||||
int seekerDamage = (int)Player.GetBestClassDamage().ApplyTo(15);
|
||||
seekerDamage = Player.ApplyArmorAccDamageBonusesTo(seekerDamage);
|
||||
|
||||
Projectile bee = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1.2f), ModContent.ProjectileType<BasicPlagueBee>(), seekerDamage, 0f, Player.whoAmI, -20, 30, 2);
|
||||
bee.ArmorPenetration = 35;
|
||||
bee.penetrate = 6;
|
||||
bee.extraUpdates = 2;
|
||||
bee.timeLeft = 600;
|
||||
}
|
||||
Player.AddBuff(BuffID.Honey, 900);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitByProjectile(Projectile proj, Player.HurtInfo hurtInfo)
|
||||
@@ -1233,13 +1277,13 @@ namespace CalamityMod.CalPlayer
|
||||
if (Main.player[proj.owner] is null)
|
||||
{
|
||||
if (!Main.npc[proj.owner].friendly)
|
||||
Main.npc[proj.owner].AddBuff(BuffID.Poisoned, 120);
|
||||
Main.npc[proj.owner].AddBuff(BuffID.Poisoned, 60);
|
||||
}
|
||||
else
|
||||
{
|
||||
Player p = Main.player[proj.owner];
|
||||
if (p.hostile && Player.hostile && (Player.team != p.team || p.team == 0))
|
||||
p.AddBuff(BuffID.Poisoned, 120);
|
||||
p.AddBuff(BuffID.Poisoned, 60);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1300,10 +1344,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player.AddBuff(BuffID.BrokenArmor, 600);
|
||||
}
|
||||
else if (proj.type == ProjectileID.FrostBeam && !Player.frozen && !gState)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
}
|
||||
else if (proj.type == ProjectileID.DeathLaser || proj.type == ProjectileID.RocketSkeleton || proj.type == ProjectileID.BombSkeletronPrime)
|
||||
{
|
||||
Player.AddBuff(BuffID.OnFire, 180);
|
||||
@@ -1339,7 +1379,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
else if (proj.type == ProjectileID.CultistBossIceMist)
|
||||
{
|
||||
Player.AddBuff(BuffID.Frozen, 60);
|
||||
if (!Player.frozen)
|
||||
Player.AddBuff(BuffID.Frozen, 60);
|
||||
|
||||
Player.AddBuff(BuffID.Chilled, 180);
|
||||
}
|
||||
else if (proj.type == ProjectileID.CultistBossLightningOrbArc)
|
||||
@@ -1672,7 +1714,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (blazingCoreParry > 0) //check for active parry
|
||||
{
|
||||
if (blazingCoreParry >= 18) //only the first 12 frames (0.2 seconds) counts for a valid parry
|
||||
if (blazingCoreParry >= 12) //only the first 18 frames (0.3 seconds) counts for a valid parry
|
||||
{
|
||||
if (!Player.HasCooldown(ParryCooldown.ID))
|
||||
{
|
||||
@@ -1696,7 +1738,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
else if (flameLickedShellParry > 0)
|
||||
{
|
||||
if (flameLickedShellParry >= 18)
|
||||
if (flameLickedShellParry >= 12)
|
||||
{
|
||||
if (!Player.HasCooldown(ParryCooldown.ID))
|
||||
{
|
||||
|
||||
@@ -2,17 +2,21 @@
|
||||
using System.Linq;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.Placeables;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Utilities.Terraria.Utilities;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
@@ -21,9 +25,6 @@ namespace CalamityMod.CalPlayer
|
||||
#region Update Bad Life Regen
|
||||
public override void UpdateBadLifeRegen()
|
||||
{
|
||||
if (Player.ownedProjectileCounts[ModContent.ProjectileType<BloodBoilerFire>()] > 0)
|
||||
noLifeRegen = true;
|
||||
|
||||
// Universal +25% increase to DoT debuff damage in Death Mode
|
||||
float deathNegativeRegenBonus = 0.25f;
|
||||
float calamityDebuffMultiplier = 1f + (CalamityWorld.death ? deathNegativeRegenBonus : 0f);
|
||||
@@ -98,6 +99,7 @@ namespace CalamityMod.CalPlayer
|
||||
ApplyDoTDebuff(weakBrimstoneFlames, 7);
|
||||
ApplyDoTDebuff(bBlood, 8, purity);
|
||||
ApplyDoTDebuff(brainRot, 8, purity);
|
||||
ApplyDoTDebuff(laceration, 12, purity);
|
||||
ApplyDoTDebuff(elementalMix, 50, purity);
|
||||
ApplyDoTDebuff(vaporfied, 8, purity);
|
||||
ApplyDoTDebuff(bFlames, abaddon ? 10 : 30, purity);
|
||||
@@ -106,7 +108,7 @@ namespace CalamityMod.CalPlayer
|
||||
ApplyDoTDebuff(vHex, 35);
|
||||
ApplyDoTDebuff(cDepth, 18, purity);
|
||||
ApplyDoTDebuff(astralInfection, 24, infectedJewel || purity);
|
||||
ApplyDoTDebuff(pFlames, 30, purity);
|
||||
ApplyDoTDebuff(pFlames, alchFlask ? 10 : 30, purity);
|
||||
ApplyDoTDebuff(cragsLava, 30);
|
||||
ApplyDoTDebuff(shadowflame, 30, purity);
|
||||
// Profaned Soul Crystal turns you into Providence, a God, and you take more damage from God Slayer Inferno
|
||||
@@ -422,8 +424,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (rOoze || aAmpoule || purity)
|
||||
{
|
||||
float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / Player.statLifeMax2;
|
||||
//Ambrosial Ampule and ooze give between 2 and 6 hp/s, Purity gives between 3 and 7 hp/s
|
||||
float lifeRegenToGive = MathHelper.Lerp(purity ? 6f : 4f, purity ? 14f : 12f, missingLifeRatio);
|
||||
//Ambrosial Ampule and ooze give between 2 and 6 hp/s
|
||||
float lifeRegenToGive = MathHelper.Lerp(4f, 12f, missingLifeRatio);
|
||||
Player.lifeRegen += (int)lifeRegenToGive;
|
||||
}
|
||||
|
||||
@@ -585,13 +587,6 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO -- Why is this here?
|
||||
if (weakPetrification)
|
||||
{
|
||||
if (Player.mount.Active)
|
||||
Player.mount.Dismount(Player);
|
||||
}
|
||||
#endregion
|
||||
|
||||
// Chalice of the Blood God bleedout
|
||||
@@ -742,7 +737,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (pinkCandle && !noLifeRegen)
|
||||
{
|
||||
// Every frame, add up 1/60th of the healing value (0.4% max HP per second)
|
||||
pinkCandleHealFraction += Player.statLifeMax2 * 0.004 / 60;
|
||||
pinkCandleHealFraction += Player.statLifeMax2 * CirrusPinkCandleBuff.PercentHealthPerSecond / 60;
|
||||
|
||||
if (pinkCandleHealFraction >= 1D)
|
||||
{
|
||||
@@ -885,6 +880,26 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (toxicHeart) // Since it needs to know your life regen, it must be placed here
|
||||
{
|
||||
int auraDamage = (int)Player.GetBestClassDamage().ApplyTo(200);
|
||||
auraDamage = Player.ApplyArmorAccDamageBonusesTo(auraDamage);
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<ToxicHeart>()));
|
||||
pulseRate = Utils.Remap(Player.lifeRegen, -30, 10, 20, 1, true);
|
||||
if (pulseCounter >= 420)
|
||||
{
|
||||
Projectile.NewProjectileDirect(source, Player.Center, Vector2.Zero, ModContent.ProjectileType<PlaguePulse>(), auraDamage, 0f, Player.whoAmI, 0, 0, 0);
|
||||
pulseCounter = 0;
|
||||
float soundVolume = Utils.Remap(Player.lifeRegen, -30, 10, 1f, 0.3f, true);
|
||||
SoundStyle heartbeat = new("CalamityMod/Sounds/Item/Heartbeat");
|
||||
SoundEngine.PlaySound(heartbeat with { Volume = soundVolume, PitchVariance = 0.2f }, Player.Center);
|
||||
}
|
||||
else
|
||||
{
|
||||
pulseCounter += MathHelper.Clamp(pulseRate, 1, 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.Placeables;
|
||||
using CalamityMod.Buffs.Potions;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
@@ -144,6 +145,9 @@ namespace CalamityMod.CalPlayer
|
||||
// Check if schematics are present on the mouse, for the sake of registering their recipes.
|
||||
CheckIfMouseItemIsSchematic();
|
||||
|
||||
// Do environmental effects.
|
||||
DoEnvironmentalEffects();
|
||||
|
||||
// Handle Androomba's Right Click function
|
||||
AndroombaRightClick();
|
||||
|
||||
@@ -310,9 +314,9 @@ namespace CalamityMod.CalPlayer
|
||||
SparkParticle spark2 = new SparkParticle(Player.Center + Player.velocity.RotatedBy(-2f * Player.direction) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed);
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
|
||||
if (Player.miscCounter % 5 == 0 && Player.velocity != Vector2.Zero) //every other frame spawn the hitbox
|
||||
if (Player.miscCounter % 6 == 0 && Player.velocity != Vector2.Zero)
|
||||
{
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(175));
|
||||
int damage = Player.ApplyArmorAccDamageBonusesTo(Player.GetBestClassDamage().ApplyTo(170));
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<PauldronDash>(), damage, 10f, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
@@ -1337,6 +1341,22 @@ namespace CalamityMod.CalPlayer
|
||||
if (expiredCooldowns.Count > 0)
|
||||
SyncCooldownRemoval(Main.netMode == NetmodeID.Server, expiredCooldowns);
|
||||
|
||||
// Grant the player 5 seconds of immunity to immobilizing debuffs after an immobilizing debuff wears off.
|
||||
if (Player.stoned || Player.frozen || Player.webbed || gState)
|
||||
{
|
||||
ImmobilityDebuffImmunityTimer = ImmobilityDebuffImmunityTimerMax;
|
||||
}
|
||||
else if (ImmobilityDebuffImmunityTimer > 0)
|
||||
{
|
||||
ImmobilityDebuffImmunityTimer--;
|
||||
Player.buffImmune[BuffID.Stoned] = true;
|
||||
Player.buffImmune[BuffID.Frozen] = true;
|
||||
Player.buffImmune[BuffID.Webbed] = true;
|
||||
Player.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
}
|
||||
|
||||
if (ascendantInsigniaCooldown > 0 && ascendantInsigniaBuffTime <= 0)
|
||||
ascendantInsigniaCooldown--;
|
||||
if (DragonsBreathAudioCooldown > 0)
|
||||
DragonsBreathAudioCooldown--;
|
||||
if (DragonsBreathAudioCooldown2 > 0)
|
||||
@@ -1373,6 +1393,8 @@ namespace CalamityMod.CalPlayer
|
||||
astralStarRainCooldown--;
|
||||
if (AbaddonCooldown > 0)
|
||||
AbaddonCooldown--;
|
||||
if (AlchFlaskCooldown > 0)
|
||||
AlchFlaskCooldown--;
|
||||
if (tarraRangedCooldown > 0)
|
||||
tarraRangedCooldown--;
|
||||
if (bloodflareMageCooldown > 0)
|
||||
@@ -2012,6 +2034,13 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// This section of code ensures set bonuses and accessories with cooldowns go on cooldown immediately if the armor or accessory is removed.
|
||||
if (!ascendantInsignia && ascendantInsigniaBuffTime > 0)
|
||||
{
|
||||
ascendantInsigniaBuffTime = 0;
|
||||
ascendantInsigniaCooldown = 2400;
|
||||
Player.AddCooldown(AscendEffect.ID, 2400);
|
||||
}
|
||||
|
||||
if (!brimflameSet && brimflameFrenzy)
|
||||
{
|
||||
brimflameFrenzy = false;
|
||||
@@ -2069,6 +2098,31 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Biome Effects
|
||||
public void DrawPollenInFloralParadise()
|
||||
{
|
||||
if (!ZoneFloralParadise || !Main.rand.NextBool(7) || Main.netMode == NetmodeID.Server)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
Vector2 dustSpawnPosition = Player.Center + Main.rand.NextVector2Square(-360f, 360f);
|
||||
dustSpawnPosition.Y += 200f;
|
||||
Tile tile = CalamityUtils.ParanoidTileRetrieval((int)(dustSpawnPosition.X / 16f), (int)(dustSpawnPosition.Y / 16f));
|
||||
if (WorldGen.SolidTile(tile) || tile.LiquidAmount > 0)
|
||||
continue;
|
||||
|
||||
Dust pollen = Dust.NewDustPerfect(dustSpawnPosition, 261);
|
||||
pollen.velocity = Main.rand.NextVector2Circular(0.4f, 0.4f);
|
||||
pollen.scale = Main.rand.NextFloat(0.8f, 1f);
|
||||
pollen.fadeIn = 2f;
|
||||
pollen.color = Color.YellowGreen;
|
||||
pollen.noGravity = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endregion Biome Effects
|
||||
|
||||
#region Abyss Effects
|
||||
private void AbyssEffects()
|
||||
{
|
||||
@@ -2519,6 +2573,21 @@ namespace CalamityMod.CalPlayer
|
||||
if (AdamantiteSet)
|
||||
Player.statDefense += AdamantiteSetDefenseBoost;
|
||||
|
||||
// Warmth makes Chilled, Frozen, and Glacial State tick down 3x as fast
|
||||
if (Player.HasBuff(BuffID.Warmth))
|
||||
{
|
||||
for (int b = 0; b < Player.MaxBuffs; b++)
|
||||
{
|
||||
if (Player.buffType[b] == BuffID.Chilled || Player.buffType[b] == BuffID.Frozen || Player.buffType[b] == ModContent.BuffType<GlacialState>())
|
||||
{
|
||||
if (Player.buffTime[b] > 3)
|
||||
{
|
||||
Player.buffTime[b] -= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (astralInjection)
|
||||
{
|
||||
if (Player.statMana < Player.statManaMax2)
|
||||
@@ -2581,10 +2650,13 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (crawCarapace)
|
||||
Player.GetDamage<GenericDamageClass>() += 0.05f;
|
||||
Player.GetDamage<GenericDamageClass>() += 0.07f;
|
||||
|
||||
if (baroclaw)
|
||||
{
|
||||
Player.endurance += 0.05f;
|
||||
Player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
}
|
||||
|
||||
if (aeroStone && !Player.slowFall && Player.wingTime < Player.wingTimeMax)
|
||||
{
|
||||
@@ -2819,16 +2891,13 @@ namespace CalamityMod.CalPlayer
|
||||
(harpyRing ? 0.2 : 0D) +
|
||||
(reaverSpeed ? 0.1 : 0D) +
|
||||
(angelTreads ? 0.1 : 0D) +
|
||||
(blueCandle ? 0.1 : 0D) +
|
||||
(blueCandle ? CirrusBlueCandleBuff.WingTimeBoost : 0D) +
|
||||
(soaring ? 0.1 : 0D) +
|
||||
(prismaticGreaves ? 0.1 : 0D) +
|
||||
(plagueReaper ? 0.05 : 0D) +
|
||||
(ascendantInsignia ? 0.05 : 0D) + // Added to soaring insignia's flight to get 30%
|
||||
(Player.empressBrooch ? 0.25 : 0D);
|
||||
|
||||
if (blueCandle)
|
||||
Player.moveSpeed += 0.1f;
|
||||
|
||||
if (community)
|
||||
{
|
||||
float baseBoost = TheCommunity.CalculatePower();
|
||||
@@ -2915,15 +2984,14 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (wDeath && !purity)
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.25f;
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.2f;
|
||||
|
||||
if (astralInfection && !(infectedJewel || purity))
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.15f;
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.1f;
|
||||
|
||||
if (pFlames && !purity)
|
||||
{
|
||||
Player.blind = true;
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.15f;
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.1f;
|
||||
}
|
||||
|
||||
if (aCrunch && !laudanum && !purity)
|
||||
@@ -3083,27 +3151,13 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (ascendantInsignia)
|
||||
if (ascendantInsignia && ascendantInsigniaBuffTime > 0)
|
||||
{
|
||||
if (CalamityKeybinds.AscendantInsigniaHotKey.JustPressed && ascendantInsigniaCooldown <= 0)
|
||||
{
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<AscendantInsignia>()));
|
||||
Projectile.NewProjectileDirect(source, Player.Center - Vector2.UnitY * 45f, Vector2.Zero, ModContent.ProjectileType<AscendantAura>(), 0, 0f);
|
||||
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Item/AscendantActivate"));
|
||||
ascendantInsigniaCooldown = 2400;
|
||||
ascendantInsigniaBuffTime = 240; //4 seconds
|
||||
}
|
||||
|
||||
if (ascendantInsigniaCooldown > 0 && ascendantInsigniaBuffTime <= 0)
|
||||
ascendantInsigniaCooldown--;
|
||||
ascendantTrail = true;
|
||||
infiniteFlight = true;
|
||||
if (ascendantInsigniaBuffTime == 1)
|
||||
Player.AddCooldown(AscendEffect.ID, 2400);
|
||||
if (ascendantInsigniaBuffTime > 0)
|
||||
{
|
||||
ascendantTrail = true;
|
||||
infiniteFlight = true;
|
||||
ascendantInsigniaBuffTime--;
|
||||
}
|
||||
ascendantInsigniaBuffTime--;
|
||||
}
|
||||
|
||||
if (abyssalDivingSuit && !Player.IsUnderwater())
|
||||
@@ -4153,9 +4207,6 @@ namespace CalamityMod.CalPlayer
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.WikiStatus1");
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.WikiStatus2");
|
||||
}
|
||||
|
||||
// 04JAN2024: Ozzatron: Plushie message always appears.
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Misc.GimmeSwagPlushieCampaign");
|
||||
}
|
||||
|
||||
--startMessageDisplayDelay;
|
||||
|
||||
@@ -595,14 +595,17 @@ namespace CalamityMod.CalPlayer
|
||||
if (!proj.CountsAsClass<MeleeDamageClass>() && !proj.CountsAsClass<SummonMeleeSpeedDamageClass>() && Player.meleeEnchant == 7)
|
||||
Projectile.NewProjectile(source, position, proj.velocity, ProjectileID.ConfettiMelee, 0, 0f, proj.owner);
|
||||
|
||||
if (alchFlask && Player.ownedProjectileCounts[ProjectileType<PlagueSeeker>()] < 3 && hasClass)
|
||||
if (alchFlask && AlchFlaskCooldown == 0 && proj.type != ModContent.ProjectileType<BasicPlagueBee>())
|
||||
{
|
||||
int seekerDamage = (int)Player.GetBestClassDamage().ApplyTo(30);
|
||||
int seekerDamage = (int)Player.GetBestClassDamage().ApplyTo(10);
|
||||
seekerDamage = Player.ApplyArmorAccDamageBonusesTo(seekerDamage);
|
||||
Vector2 seekerVelocity = new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1.2f);
|
||||
|
||||
Projectile projectile = CalamityUtils.SpawnOrb(proj, seekerDamage, ProjectileType<PlagueSeeker>(), 400f, 12f);
|
||||
if (projectile.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[projectile.whoAmI].DamageType = DamageClass.Generic;
|
||||
Projectile bee = Projectile.NewProjectileDirect(source, position, seekerVelocity, ModContent.ProjectileType<BasicPlagueBee>(), seekerDamage, 0f, Player.whoAmI, -20, 30, 2);
|
||||
bee.ArmorPenetration = 20;
|
||||
bee.penetrate = 2;
|
||||
bee.extraUpdates = 1;
|
||||
AlchFlaskCooldown = 7;
|
||||
}
|
||||
|
||||
bool lifeAndShieldCondition = Player.statLife >= Player.statLifeMax2 && (!HasAnyEnergyShield || TotalEnergyShielding >= TotalMaxShieldDurability);
|
||||
@@ -1237,9 +1240,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (divineBless)
|
||||
target.AddBuff(BuffType<BanishingFire>(), 60);
|
||||
|
||||
if (holyMinions)
|
||||
target.AddBuff(BuffType<HolyFlames>(), 180);
|
||||
|
||||
if (shadowMinions)
|
||||
target.AddBuff(BuffID.ShadowFlame, 180);
|
||||
|
||||
@@ -1266,7 +1266,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (omegaBlueChestplate)
|
||||
target.AddBuff(BuffType<CrushDepth>(), 180);
|
||||
if (sulphurSet)
|
||||
target.AddBuff(BuffID.Poisoned, 120);
|
||||
target.AddBuff(BuffID.Poisoned, 60);
|
||||
if (abyssalAmulet)
|
||||
{
|
||||
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<RiptideDebuff>());
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.CalPlayer.Dashes
|
||||
{
|
||||
@@ -12,8 +16,6 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
|
||||
public override bool IsOmnidirectional => true;
|
||||
|
||||
public bool dustOnce = true;
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => 30f;
|
||||
|
||||
public override void OnDashEffects(Player player)
|
||||
@@ -23,6 +25,15 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
|
||||
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
|
||||
{
|
||||
Dust trail = Dust.NewDustPerfect(player.Center + Main.rand.NextVector2Unit() * 12f, DustID.RainbowTorch, -player.velocity * 0.2f, 150, Color.Aqua, 1.2f);
|
||||
trail.noGravity = true;
|
||||
|
||||
Vector2 sparkVel = player.velocity.SafeNormalize(Vector2.UnitY) * Main.rand.NextFloat(-3f, -6f);
|
||||
Color sparkColor = SpeedBlasterShot.GetColor(Main.rand.Next(5));
|
||||
float scale = Main.rand.NextFloat(1f, 1.6f); // Bloom effect is double the spark's size
|
||||
Particle spark = new CritSpark(player.Center + Main.rand.NextVector2Unit() * 12f, sparkVel, Color.White, sparkColor, scale, 15, 0.5f, scale * 2f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
|
||||
// Fall way, way, faster than usual.
|
||||
player.maxFallSpeed = 50f;
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
|
||||
namespace CalamityMod.CalPlayer.Dashes
|
||||
{
|
||||
public class SuperradiantSawDash : PlayerDashEffect
|
||||
{
|
||||
public static new string ID => "Superradiant Slaughterer";
|
||||
public override DashCollisionType CollisionType => DashCollisionType.NoCollision;
|
||||
|
||||
public override bool IsOmnidirectional => true;
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => 36f;
|
||||
|
||||
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
|
||||
{
|
||||
Dust trail = Dust.NewDustPerfect(player.Center + Main.rand.NextVector2Unit() * 12f, DustID.RainbowTorch, -player.velocity * 0.2f, 150, Color.Lime, 1.2f);
|
||||
trail.noGravity = true;
|
||||
|
||||
Vector2 sparkVel = player.velocity.SafeNormalize(Vector2.UnitY) * Main.rand.NextFloat(-3f, -6f);
|
||||
Color sparkColor = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.25f);
|
||||
float scale = Main.rand.NextFloat(1.2f, 2f); // Bloom effect is double the spark's size
|
||||
Particle spark = new CritSpark(player.Center + Main.rand.NextVector2Unit() * 12f, sparkVel, Color.White, sparkColor, scale, 24, 0.5f, scale * 2f);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
|
||||
// Fall way, way, faster than usual.
|
||||
player.maxFallSpeed = 50f;
|
||||
|
||||
// Dash at a much, much faster speed than the default value.
|
||||
dashSpeed = 24f;
|
||||
runSpeedDecelerationFactor = 0.8f;
|
||||
|
||||
// Cooldown for dash.
|
||||
player.Calamity().SpeedBlasterDashStarted = false;
|
||||
player.Calamity().sBlasterDashActivated = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using CalamityMod.Projectiles.Environment;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
public partial class CalamityPlayer : ModPlayer
|
||||
{
|
||||
public void DoEnvironmentalEffects()
|
||||
{
|
||||
CreateLilyglowInFloralParadise();
|
||||
}
|
||||
|
||||
public void CreateLilyglowInFloralParadise()
|
||||
{
|
||||
// Don't do anything if the player is not in the floral paradise of if this code is called by anyone other than the player.
|
||||
if (!ZoneFloralParadise || Main.myPlayer != Player.whoAmI)
|
||||
return;
|
||||
|
||||
if (!Main.rand.NextBool(12))
|
||||
return;
|
||||
|
||||
for (int tries = 0; tries < 50; tries++)
|
||||
{
|
||||
Vector2 potentialSpawnPosition = Player.Center + Main.rand.NextVector2Unit() * Main.rand.NextFloat(200f, 800f);
|
||||
if (Collision.SolidCollision(potentialSpawnPosition, 1, 1))
|
||||
continue;
|
||||
|
||||
Vector2 spawnVelocity = -Vector2.UnitY.RotatedByRandom(0.82f) * Main.rand.NextFloat(0.5f, 1.35f);
|
||||
Projectile.NewProjectile(new EntitySource_WorldEvent(), potentialSpawnPosition, spawnVelocity, ModContent.ProjectileType<Lilyglow>(), 0, 0f, Player.whoAmI);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -175,6 +175,27 @@ namespace CalamityMod
|
||||
public float FlightBarPosY { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Music Events
|
||||
[Header("MusicEvents")]
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool Interlude1 { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool Interlude2 { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool Interlude3 { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool DevourerofGodsEulogy { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region General Gameplay Changes
|
||||
[Header("Gameplay")]
|
||||
|
||||
|
||||
@@ -842,8 +842,9 @@ namespace CalamityMod
|
||||
ProjectileType<DaemonsFlameBow>(),
|
||||
ProjectileType<DrataliornusBow>(),
|
||||
ProjectileType<FlakKrakenHoldout>(),
|
||||
ProjectileType<ButcherGun>(),
|
||||
ProjectileType<BuzzkillHoldout>(),
|
||||
ProjectileType<StarfleetMK2Gun>(),
|
||||
ProjectileType<SuperradiantSlaughtererHoldout>(),
|
||||
ProjectileType<NorfleetCannon>(),
|
||||
ProjectileType<FlurrystormCannonShooting>(),
|
||||
ProjectileType<ChickenCannonHeld>(),
|
||||
@@ -901,9 +902,9 @@ namespace CalamityMod
|
||||
enemyImmunityList = new List<int>()
|
||||
{
|
||||
NPCID.KingSlime,
|
||||
NPCType<KingSlimeJewel>(),
|
||||
NPCType<KingSlimeJewel2>(),
|
||||
NPCType<KingSlimeJewel3>(),
|
||||
NPCType<KingSlimeJewelRuby>(),
|
||||
NPCType<KingSlimeJewelSapphire>(),
|
||||
NPCType<KingSlimeJewelEmerald>(),
|
||||
NPCID.EaterofWorldsHead,
|
||||
NPCID.EaterofWorldsBody,
|
||||
NPCID.EaterofWorldsTail,
|
||||
@@ -1943,6 +1944,7 @@ namespace CalamityMod
|
||||
ProjectileType<PrismaticBeam>(),
|
||||
ProjectileType<RancorLaserbeam>(),
|
||||
ProjectileType<ReaperProjectile>(),
|
||||
ProjectileType<RespiteblockHoldout>(),
|
||||
ProjectileType<SacrificeProjectile>(),
|
||||
ProjectileType<SnapClamProj>(),
|
||||
ProjectileType<SnapClamStealth>(),
|
||||
@@ -2428,9 +2430,9 @@ namespace CalamityMod
|
||||
{ NPCID.UmbrellaSlime, 5400 },
|
||||
{ NPCID.RainbowSlime, 30000 },
|
||||
{ NPCID.Pinky, 15000 },
|
||||
{ NPCType<KingSlimeJewel>(), 21000 },
|
||||
{ NPCType<KingSlimeJewel2>(), 18000 },
|
||||
{ NPCType<KingSlimeJewel3>(), 24000 },
|
||||
{ NPCType<KingSlimeJewelRuby>(), 21000 },
|
||||
{ NPCType<KingSlimeJewelSapphire>(), 18000 },
|
||||
{ NPCType<KingSlimeJewelEmerald>(), 24000 },
|
||||
|
||||
{ NPCID.EyeofCthulhu, 450000 }, // 30 seconds
|
||||
{ NPCID.ServantofCthulhu, 6000 },
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace CalamityMod
|
||||
// Astral Snow Sky/BG
|
||||
public static Texture2D AstralSnowSurfaceMiddle;
|
||||
|
||||
// Sulpher Sea Sky/BG
|
||||
// Sulphur Sea Sky/BG
|
||||
public static Texture2D SulphurSeaSky;
|
||||
public static Texture2D SulphurSeaSkyFront;
|
||||
public static Texture2D SulphurSeaSurface;
|
||||
@@ -132,8 +132,10 @@ namespace CalamityMod
|
||||
internal static CalamityMod Instance;
|
||||
|
||||
// TODO -- Mod references should be contained in a ModSystem (example name "ModLoadedChecker")
|
||||
internal Mod musicMod = null; // This is Calamity's official music mod, CalamityModMusic
|
||||
internal bool MusicAvailable => !(musicMod is null);
|
||||
|
||||
// This is Calamity's official music mod, CalamityModMusic. It is now a hard dependency.
|
||||
internal Mod musicMod = null;
|
||||
internal bool MusicAvailable => musicMod is not null;
|
||||
|
||||
// Please keep this in alphabetical order so it's easy to read
|
||||
internal Mod ancientsAwakened = null;
|
||||
@@ -246,29 +248,6 @@ namespace CalamityMod
|
||||
BalancingChangesManager.Load();
|
||||
BaseIdleHoldoutProjectile.LoadAll();
|
||||
PlayerDashManager.Load();
|
||||
|
||||
/*
|
||||
//keep this disabled for now, hell bg system isnt used and there is a better way to load it
|
||||
//hell background loading
|
||||
HellBGManager.Load();
|
||||
|
||||
//load stuff for hell background
|
||||
loadCache = new List<HellBGLoad>();
|
||||
|
||||
foreach (Type type in Code.GetTypes())
|
||||
{
|
||||
if (!type.IsAbstract && type.GetInterfaces().Contains(typeof(HellBGLoad)))
|
||||
{
|
||||
var instance = Activator.CreateInstance(type);
|
||||
loadCache.Add(instance as HellBGLoad);
|
||||
}
|
||||
}
|
||||
|
||||
for (int k = 0; k < loadCache.Count; k++)
|
||||
{
|
||||
loadCache[k].Load();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
private void LoadClient()
|
||||
@@ -483,21 +462,6 @@ namespace CalamityMod
|
||||
|
||||
carpetOriginal = null;
|
||||
|
||||
/*
|
||||
//unload hell background stuff
|
||||
HellBGManager.Unload();
|
||||
|
||||
if (loadCache != null)
|
||||
{
|
||||
foreach (var loadable in loadCache)
|
||||
{
|
||||
loadable.Unload();
|
||||
}
|
||||
}
|
||||
|
||||
loadCache = null;
|
||||
*/
|
||||
|
||||
Instance = null;
|
||||
base.Unload();
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using CalamityMod.NPCs.Providence;
|
||||
using CalamityMod.NPCs.TownNPCs;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.TileEntities;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -300,6 +301,17 @@ namespace CalamityMod
|
||||
SyncCalamityWorldDifficulties(sender);
|
||||
break;
|
||||
|
||||
//
|
||||
// Music event syncs
|
||||
//
|
||||
case CalamityModMessageType.MusicEventSyncRequest:
|
||||
MusicEventSystem.FulfillSyncRequest(whoAmI);
|
||||
break;
|
||||
|
||||
case CalamityModMessageType.MusicEventSyncResponse:
|
||||
MusicEventSystem.ReceiveSyncResponse(reader);
|
||||
break;
|
||||
|
||||
//
|
||||
// Default case: with no idea how long the packet is, we can't safely read data.
|
||||
// Throw an exception now instead of allowing the network stream to corrupt.
|
||||
@@ -421,6 +433,10 @@ namespace CalamityMod
|
||||
MousePositionSync,
|
||||
|
||||
// World state sync
|
||||
SyncDifficulties
|
||||
SyncDifficulties,
|
||||
|
||||
// Music events
|
||||
MusicEventSyncRequest,
|
||||
MusicEventSyncResponse
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
public class SuperradiantSawBoost : CooldownHandler
|
||||
{
|
||||
public static new string ID => "SuperradiantSawBoost";
|
||||
public override bool ShouldDisplay => true;
|
||||
public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}");
|
||||
public override string Texture => "CalamityMod/Cooldowns/SuperradiantSawBoost";
|
||||
public override Color OutlineColor => new Color(207, 207, 207);
|
||||
public override Color CooldownStartColor => new Color(122, 240, 58);
|
||||
public override Color CooldownEndColor => new Color(32, 186, 171);
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 443 B |
|
After Width: | Height: | Size: 213 B |
|
After Width: | Height: | Size: 175 B |
@@ -0,0 +1,27 @@
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod
|
||||
{
|
||||
public class MeleeRangedHybridDamageClass : DamageClass
|
||||
{
|
||||
internal static MeleeRangedHybridDamageClass Instance;
|
||||
|
||||
internal static readonly StatInheritanceData FiftyPercentBoost = new(0.5f, 0.5f, 0.5f, 0.5f, 0.5f);
|
||||
|
||||
public override void Load() => Instance = this;
|
||||
public override void Unload() => Instance = null;
|
||||
|
||||
public override StatInheritanceData GetModifierInheritance(DamageClass damageClass)
|
||||
{
|
||||
if (damageClass == Melee || damageClass == Ranged)
|
||||
return FiftyPercentBoost;
|
||||
if (damageClass == Generic)
|
||||
return StatInheritanceData.Full;
|
||||
|
||||
return StatInheritanceData.None;
|
||||
}
|
||||
|
||||
// Inherits from both melee and ranged
|
||||
public override bool GetEffectInheritance(DamageClass damageClass) => damageClass == Melee || damageClass == Ranged;
|
||||
}
|
||||
}
|
||||
@@ -295,7 +295,7 @@ namespace CalamityMod
|
||||
EnemyStats.ContactDamageValues = new SortedDictionary<int, int[]>
|
||||
{
|
||||
{ NPCID.KingSlime, new int[] { 40, 64, 80, 96, 144 } },
|
||||
{ ModContent.NPCType<KingSlimeJewel3>(), new int[] { 30, 44, 60, 76, 114 } },
|
||||
{ ModContent.NPCType<KingSlimeJewelEmerald>(), new int[] { 30, 44, 60, 76, 114 } },
|
||||
|
||||
{ ModContent.NPCType<DesertScourgeHead>(), new int[] { 45, 66, 88, 110, 165 } },
|
||||
{ ModContent.NPCType<DesertScourgeBody>(), new int[] { 24, 32, 40, 48, 72 } },
|
||||
@@ -561,7 +561,7 @@ namespace CalamityMod
|
||||
|
||||
EnemyStats.ProjectileDamageValues = new SortedDictionary<Tuple<int, int>, int[]>
|
||||
{
|
||||
{ new Tuple<int, int>(ModContent.NPCType<KingSlimeJewel>(), ModContent.ProjectileType<JewelProjectile>()), new int[] { 26, 36, 44, 52, 84 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<KingSlimeJewelRuby>(), ModContent.ProjectileType<JewelProjectile>()), new int[] { 26, 36, 44, 52, 84 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<DesertScourgeHead>(), ModContent.ProjectileType<DesertScourgeSpit>()), new int[] { 26, 36, 44, 52, 84 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<DesertNuisanceHeadYoung>(), ModContent.ProjectileType<DesertScourgeSpit>()), new int[] { 26, 36, 44, 52, 84 } },
|
||||
@@ -656,7 +656,7 @@ namespace CalamityMod
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneHellfireball>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 70, 112, 128, 144, 216 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneHellblast>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneRay>()), new int[] { 120, 200, 240, 280, 420 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<BrimstoneElemental>(), ModContent.ProjectileType<BrimstoneRay>()), new int[] { 120, 200, 240, 280, 420 } }, // Split shots: 72, 120, 144, 168, 252
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Brimling>(), ModContent.ProjectileType<BrimstoneHellfireball>()), new int[] { 80, 140, 160, 180, 270 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Brimling>(), ModContent.ProjectileType<BrimstoneBarrage>()), new int[] { 70, 112, 128, 144, 216 } },
|
||||
|
||||
|
||||
@@ -126,6 +126,12 @@ namespace CalamityMod.Effects
|
||||
// Used by Devourer of Gods. Renders the portal that he escapes through at the end of phase 1.
|
||||
internal static Effect DoGPortalShader;
|
||||
|
||||
// Used to render all-encompassing fog in the Floral Paradise biome.
|
||||
internal static Effect FogShader;
|
||||
|
||||
// Used to render background water features in the Floral Paradise biome.
|
||||
internal static Effect WaterfallShader;
|
||||
|
||||
// Metaballs. See the MetaballManager class for comments on how this system works.
|
||||
// These shaders are leveraged to render the results of the metaball simulation to the screen.
|
||||
// The "Base" shader draws the particles themselves.
|
||||
@@ -351,6 +357,12 @@ namespace CalamityMod.Effects
|
||||
DoGPortalShader = LoadShader("ScreenShaders/DoGPortalShader");
|
||||
RegisterMiscShader(DoGPortalShader, "ScreenPass", "DoGPortal");
|
||||
|
||||
FogShader = LoadShader("ScreenShaders/Fog");
|
||||
RegisterMiscShader(FogShader, "DyePass", "Fog");
|
||||
|
||||
WaterfallShader = LoadShader("WaterfallShader");
|
||||
RegisterMiscShader(WaterfallShader, "TrailPass", "Waterfall");
|
||||
|
||||
// These two shaders are often (but not always) used together.
|
||||
MetaballEdgeShader = LoadShader("Metaballs/MetaballEdgeShader");
|
||||
RegisterMiscShader(MetaballEdgeShader, "ParticlePass", "MetaballEdge");
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
float fogMovementSpeed;
|
||||
float4 uShaderSpecificData;
|
||||
|
||||
float Random(float2 coords)
|
||||
{
|
||||
return frac(sin(dot(coords, float2(49, 81)) * 100) * 100);
|
||||
}
|
||||
float PerlinNoise(float2 coords)
|
||||
{
|
||||
float2 integerPart = floor(coords);
|
||||
float2 fractionalPart = frac(coords);
|
||||
float a = Random(integerPart);
|
||||
float b = Random(integerPart + float2(1, 0));
|
||||
float c = Random(integerPart + float2(0, 1));
|
||||
float d = Random(integerPart + float2(1, 1));
|
||||
float2 cubic = fractionalPart * fractionalPart * (3 - fractionalPart * 2);
|
||||
return lerp(a, b, cubic.x) + (c - a) * cubic.y * (1 - cubic.x) + (d - b) * cubic.x * cubic.y;
|
||||
}
|
||||
|
||||
float ScaledNoise(float2 coords)
|
||||
{
|
||||
float result = 0;
|
||||
float2 coordsCopy = coords;
|
||||
float scale = 0.5;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
result += PerlinNoise(coordsCopy) * scale;
|
||||
coordsCopy *= 2;
|
||||
scale *= 0.5;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float motion = ScaledNoise(coords * uSaturation * 12 + float2(uTime * fogMovementSpeed * -0.23, uTime * fogMovementSpeed * 0.64));
|
||||
float2 motion2D = motion;
|
||||
float3 noise = ScaledNoise(coords * uSaturation * 15 + motion2D + float2(0, uTime * 0.78));
|
||||
return lerp(float4(noise, 1), float4(uColor, 1), 0.67) * uOpacity * 0.2;
|
||||
}
|
||||
technique Technique1
|
||||
{
|
||||
pass DyePass
|
||||
{
|
||||
PixelShader = compile ps_3_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
sampler uImage0 : register(s0);
|
||||
sampler uImage1 : register(s1);
|
||||
sampler uImage2 : register(s2);
|
||||
float3 uColor;
|
||||
float3 uSecondaryColor;
|
||||
float uOpacity;
|
||||
float uSaturation;
|
||||
float uRotation;
|
||||
float uTime;
|
||||
float4 uSourceRect;
|
||||
float2 uWorldPosition;
|
||||
float uDirection;
|
||||
float3 uLightSource;
|
||||
float2 uImageSize0;
|
||||
float2 uImageSize1;
|
||||
matrix uWorldViewProjection;
|
||||
float4 uShaderSpecificData;
|
||||
|
||||
struct VertexShaderInput
|
||||
{
|
||||
float4 Position : POSITION0;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VertexShaderOutput
|
||||
{
|
||||
float4 Position : SV_POSITION;
|
||||
float4 Color : COLOR0;
|
||||
float2 TextureCoordinates : TEXCOORD0;
|
||||
};
|
||||
|
||||
VertexShaderOutput VertexShaderFunction(in VertexShaderInput input)
|
||||
{
|
||||
VertexShaderOutput output = (VertexShaderOutput)0;
|
||||
float4 pos = mul(input.Position, uWorldViewProjection);
|
||||
output.Position = pos;
|
||||
|
||||
output.Color = input.Color;
|
||||
output.TextureCoordinates = input.TextureCoordinates;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
// The X coordinate is the trail completion, the Y coordinate is the same as any other.
|
||||
// This is simply how the primitive TextCoord is layed out in the C# code.
|
||||
// Inputted images go into uImage1 sampler, in case you have a noise map or something similar.
|
||||
float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
|
||||
{
|
||||
float4 color = input.Color;
|
||||
float2 coords = input.TextureCoordinates;
|
||||
float2 pixellatedCoords = round(coords * 20) / 20;
|
||||
float4 noiseColor = tex2D(uImage1, float2(pixellatedCoords.x - uTime * 1.3, pixellatedCoords.y) * float2(0.5, 1));
|
||||
float4 noiseColor2 = tex2D(uImage1, float2(pixellatedCoords.x - uTime * 1.1, pixellatedCoords.y + uTime * 0.44) * float2(0.5, 1));
|
||||
float4 baseColor = lerp(noiseColor, noiseColor2, sin(uTime * 5.1 + coords.x * 3.4) * 0.5 + 0.5);
|
||||
baseColor = pow(baseColor, 2);
|
||||
return lerp(color * 0.4, 1, baseColor.r) * uOpacity;
|
||||
}
|
||||
|
||||
technique Technique1
|
||||
{
|
||||
pass TrailPass
|
||||
{
|
||||
VertexShader = compile vs_2_0 VertexShaderFunction();
|
||||
PixelShader = compile ps_2_0 PixelShaderFunction();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace CalamityMod.Enums
|
||||
{
|
||||
public enum NPCTargetType
|
||||
{
|
||||
Anyone = 0,
|
||||
PreferSame = 1,
|
||||
ForceSwitch = 2,
|
||||
}
|
||||
}
|
||||
@@ -150,14 +150,12 @@ namespace CalamityMod.Events
|
||||
DownedBossSystem.startedBossRushAtLeastOnce = true;
|
||||
},
|
||||
permittedNPCs: new int[] { NPCID.BlueSlime, NPCID.YellowSlime, NPCID.PurpleSlime, NPCID.RedSlime, NPCID.GreenSlime, NPCID.RedSlime,
|
||||
NPCID.IceSlime, NPCID.UmbrellaSlime, NPCID.Pinky, NPCID.SlimeSpiked, NPCID.RainbowSlime, ModContent.NPCType<KingSlimeJewel>(),
|
||||
ModContent.NPCType<KingSlimeJewel2>(), ModContent.NPCType<KingSlimeJewel3>() }),
|
||||
NPCID.IceSlime, NPCID.UmbrellaSlime, NPCID.Pinky, NPCID.SlimeSpiked, NPCID.RainbowSlime, ModContent.NPCType<KingSlimeJewelRuby>(),
|
||||
ModContent.NPCType<KingSlimeJewelSapphire>(), ModContent.NPCType<KingSlimeJewelEmerald>() }),
|
||||
|
||||
new Boss(ModContent.NPCType<DesertScourgeHead>(), spawnContext: type =>
|
||||
{
|
||||
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, ModContent.NPCType<DesertScourgeHead>());
|
||||
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, ModContent.NPCType<DesertNuisanceHead>());
|
||||
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, ModContent.NPCType<DesertNuisanceHeadYoung>());
|
||||
}, permittedNPCs: new int[] { ModContent.NPCType<DesertScourgeBody>(), ModContent.NPCType<DesertScourgeTail>(), ModContent.NPCType<DesertNuisanceHead>(),
|
||||
ModContent.NPCType<DesertNuisanceBody>(), ModContent.NPCType<DesertNuisanceTail>(), ModContent.NPCType<DesertNuisanceHeadYoung>(),
|
||||
ModContent.NPCType<DesertNuisanceBodyYoung>(), ModContent.NPCType<DesertNuisanceTailYoung>() }),
|
||||
|
||||
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 348 B |
|
After Width: | Height: | Size: 455 B |
|
After Width: | Height: | Size: 591 B |
@@ -3,6 +3,7 @@ using System.Reflection;
|
||||
using CalamityMod.Graphics.Renderers.CalamityRenderers;
|
||||
using CalamityMod.Tiles.DraedonStructures;
|
||||
using CalamityMod.Tiles.FurnitureExo;
|
||||
using CalamityMod.Walls;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
@@ -39,6 +40,7 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
// Graphics
|
||||
IL_Main.DoDraw += AdditiveDrawing;
|
||||
IL_Main.DoDraw += DrawFloralParadiseFog;
|
||||
On_Main.DrawGore += DrawForegroundStuff;
|
||||
On_Main.DrawCursor += UseCoolFireCursorEffect;
|
||||
On_Main.SortDrawCacheWorms += DrawFusableParticles;
|
||||
@@ -171,6 +173,14 @@ namespace CalamityMod.ILEditing
|
||||
//HeldOnlyItem detours Player.dropItemCheck, ItemSlot.Draw (Sb, itemarray, int, int, vector2, color) and ItemSlot.LeftClick_ItemArray to make its stuff work
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads things which need to be instantiated later in the load order.
|
||||
/// </summary>
|
||||
public override void AddRecipes()
|
||||
{
|
||||
WallVisibleThroughWater.InitializeWaterMapEntryLookups();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unloads all IL Editing changes in the mod.
|
||||
/// </summary>
|
||||
|
||||
@@ -22,6 +22,7 @@ using CalamityMod.Projectiles;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Systems;
|
||||
using CalamityMod.Tiles.Abyss;
|
||||
using CalamityMod.Waterfalls;
|
||||
using CalamityMod.Waters;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
@@ -724,6 +725,42 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Fog Effect in Floral Paradise
|
||||
private static void DrawFloralParadiseFog(ILContext il)
|
||||
{
|
||||
ILCursor cursor = new ILCursor(il);
|
||||
|
||||
cursor.GotoNext(MoveType.Before, i => i.MatchCallOrCallvirt<Main>("DrawInfernoRings"));
|
||||
cursor.EmitDelegate<Action>(() =>
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server && BiomeTileCounterSystem.FloralParadiseTiles > 0)
|
||||
DrawFog(Utils.GetLerpValue(0f, 250f, BiomeTileCounterSystem.FloralParadiseTiles, true));
|
||||
});
|
||||
}
|
||||
|
||||
private static void DrawFog(float intensity)
|
||||
{
|
||||
Main.spriteBatch.EnterShaderRegion();
|
||||
WaterfallRenderer.DrawWaterfalls();
|
||||
|
||||
Texture2D fogTexture = ModContent.Request<Texture2D>("Terraria/Images/Misc/Perlin").Value;
|
||||
Vector2 scale = new Vector2(Main.screenWidth, Main.screenHeight) / fogTexture.Size();
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
|
||||
GameShaders.Misc["CalamityMod:Fog"].UseOpacity(intensity * 0.74f);
|
||||
GameShaders.Misc["CalamityMod:Fog"].UseColor(Color.Lerp(Color.Lime, Color.Black, 0.85f));
|
||||
GameShaders.Misc["CalamityMod:Fog"].UseSaturation(1.67f);
|
||||
GameShaders.Misc["CalamityMod:Fog"].Shader.Parameters["fogMovementSpeed"].SetValue(1.75f);
|
||||
GameShaders.Misc["CalamityMod:Fog"].Apply();
|
||||
|
||||
Main.spriteBatch.Draw(fogTexture, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f);
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin();
|
||||
}
|
||||
#endregion Fog Effect in Floral Paradise
|
||||
|
||||
#region Custom Draw Layers
|
||||
private static void AdditiveDrawing(ILContext il)
|
||||
{
|
||||
@@ -864,7 +901,11 @@ namespace CalamityMod.ILEditing
|
||||
cursor.Emit(OpCodes.Ldloc, 4);
|
||||
|
||||
// Caching these values can save a LOT of overhead at runtime.
|
||||
ModWaterStyle sunkenSeaWater = ModContent.GetInstance<SunkenSeaWater>();
|
||||
ModWaterStyle basaltWater = ModContent.GetInstance<BasaltGullyWater>();
|
||||
ModWaterStyle burrowsWater = ModContent.GetInstance<SunkenSeaBurrowsWater>();
|
||||
ModWaterStyle polypWater = ModContent.GetInstance<SunkenSeaPolypWater>();
|
||||
ModWaterStyle reefsWater = ModContent.GetInstance<SunkenSeaReefsWater>();
|
||||
ModWaterStyle shoresWater = ModContent.GetInstance<SunkenSeaShoresWater>();
|
||||
ModWaterStyle sulphuricWater = ModContent.GetInstance<SulphuricWater>();
|
||||
ModWaterStyle sulphuricDepthsWater = ModContent.GetInstance<SulphuricDepthsWater>();
|
||||
ModWaterStyle upperAbyssWater = ModContent.GetInstance<UpperAbyssWater>();
|
||||
@@ -878,8 +919,11 @@ namespace CalamityMod.ILEditing
|
||||
{
|
||||
initialColor = SelectLavaQuadColor(initialTexture, ref initialColor, liquidType == 1);
|
||||
}
|
||||
|
||||
if (liquidType == sunkenSeaWater.Slot ||
|
||||
if (liquidType == burrowsWater.Slot ||
|
||||
liquidType == basaltWater.Slot ||
|
||||
liquidType == polypWater.Slot ||
|
||||
liquidType == shoresWater.Slot ||
|
||||
liquidType == reefsWater.Slot ||
|
||||
liquidType == sulphuricWater.Slot ||
|
||||
liquidType == sulphuricDepthsWater.Slot ||
|
||||
liquidType == upperAbyssWater.Slot ||
|
||||
@@ -1000,13 +1044,13 @@ namespace CalamityMod.ILEditing
|
||||
return;
|
||||
|
||||
Tile tile = CalamityUtils.ParanoidTileRetrieval(x, y);
|
||||
if (tile.LiquidAmount <= 0 || tile.HasTile || (Main.waterStyle != SulphuricWater.Type &&
|
||||
Main.waterStyle != SulphuricDepthsWater.Type && Main.waterStyle != SunkenSeaWater.Type))
|
||||
if (tile.LiquidAmount <= 0 || tile.HasTile || tile.Get<LiquidData>().LiquidType != LiquidID.Water || (Main.waterStyle != SulphuricWater.Type &&
|
||||
Main.waterStyle != SulphuricDepthsWater.Type && Main.waterStyle != SunkenSeaBurrowsWater.Type && Main.waterStyle != SunkenSeaPolypWater.Type &&
|
||||
Main.waterStyle != SunkenSeaReefsWater.Type && Main.waterStyle != SunkenSeaShoresWater.Type && Main.waterStyle != BasaltGullyWater.Type))
|
||||
return;
|
||||
|
||||
Tile above = CalamityUtils.ParanoidTileRetrieval(x, y - 1);
|
||||
if (!Main.gamePaused && !above.HasTile && above.LiquidAmount <= 0 && Main.rand.NextBool(9) &&
|
||||
Main.waterStyle == SulphuricWater.Type)
|
||||
if (!Main.gamePaused && !above.HasTile && above.LiquidAmount <= 0 && Main.rand.NextBool(9) && Main.waterStyle == SulphuricWater.Type)
|
||||
{
|
||||
MediumMistParticle acidFoam = new(new(x * 16f + Main.rand.NextFloat(16f), y * 16f + 8f), -Vector2.UnitY.RotatedByRandom(0.67f) * Main.rand.NextFloat(1f, 2.4f), Color.LightSeaGreen, Color.White, 0.16f, 128f, 0.02f);
|
||||
GeneralParticleHandler.SpawnParticle(acidFoam);
|
||||
@@ -1073,8 +1117,34 @@ namespace CalamityMod.ILEditing
|
||||
if (Main.waterStyle == SulphuricDepthsWater.Type)
|
||||
outputColor = Vector3.Lerp(outputColor, Color.MediumSeaGreen.ToVector3(), 0.18f);
|
||||
|
||||
if (Main.waterStyle == SunkenSeaWater.Type)
|
||||
if (Main.waterStyle == SunkenSeaBurrowsWater.Type || Main.waterStyle == SunkenSeaPolypWater.Type || Main.waterStyle == SunkenSeaReefsWater.Type ||
|
||||
Main.waterStyle == SunkenSeaShoresWater.Type || Main.waterStyle == BasaltGullyWater.Type)
|
||||
{
|
||||
//default to white
|
||||
Color waterGlowColor = Color.White;
|
||||
|
||||
//set the glow colors for each sunken sea biome water style
|
||||
if (Main.waterStyle == SunkenSeaShoresWater.Type)
|
||||
{
|
||||
waterGlowColor = new Color(233, 170, 184);
|
||||
}
|
||||
if (Main.waterStyle == SunkenSeaPolypWater.Type)
|
||||
{
|
||||
waterGlowColor = new Color(213, 185, 178);
|
||||
}
|
||||
if (Main.waterStyle == SunkenSeaReefsWater.Type)
|
||||
{
|
||||
waterGlowColor = new Color(140, 222, 239);
|
||||
}
|
||||
if (Main.waterStyle == SunkenSeaBurrowsWater.Type)
|
||||
{
|
||||
waterGlowColor = new Color(76, 211, 231);
|
||||
}
|
||||
if (Main.waterStyle == BasaltGullyWater.Type)
|
||||
{
|
||||
waterGlowColor = new Color(144, 174, 200);
|
||||
}
|
||||
|
||||
float brightness = MathHelper.Clamp(0.07f, 0f, 0.07f);
|
||||
float waveScale1 = Main.GameUpdateCount * 0.028f;
|
||||
float waveScale2 = Main.GameUpdateCount * 0.1f;
|
||||
@@ -1094,7 +1164,7 @@ namespace CalamityMod.ILEditing
|
||||
float wave5angle = 0.55f + 0.45f * (float)Math.Sin(MathHelper.ToRadians(wave5));
|
||||
float wave6angle = 0.55f + 0.45f * (float)Math.Sin(MathHelper.ToRadians(wave6));
|
||||
float bigwaveangle = 0.55f + 0.80f * (float)Math.Sin(MathHelper.ToRadians(bigwave));
|
||||
outputColor = Vector3.Lerp(outputColor, Color.DeepSkyBlue.ToVector3(), 0.07f + wave1angle + wave2angle + wave3angle + wave4angle + wave5angle + wave6angle + bigwaveangle);
|
||||
outputColor = Vector3.Lerp(outputColor, Color.DarkSlateGray.ToVector3(), 0.07f + wave1angle + wave2angle + wave3angle + wave4angle + wave5angle + wave6angle + bigwaveangle);
|
||||
outputColor *= brightness;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Items.Fishing;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.TreasureBags.MiscGrabBags;
|
||||
@@ -13,14 +12,20 @@ using Mono.Cecil.Cil;
|
||||
using MonoMod.Cil;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Drawing;
|
||||
using Terraria.ID;
|
||||
using Terraria.Map;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.ILEditing
|
||||
{
|
||||
public partial class ILChanges
|
||||
{
|
||||
public static WindGrid Windgrid
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
#region Decrease Sandstorm Wind Speed Requirement
|
||||
private static void DecreaseSandstormWindSpeedRequirement(ILContext il)
|
||||
{
|
||||
@@ -957,5 +962,17 @@ namespace CalamityMod.ILEditing
|
||||
c.Emit(OpCodes.Stloc, relativeMapTypeIndex);
|
||||
}
|
||||
#endregion
|
||||
|
||||
// 02JUN2024: Ozzatron: The below code is being kept in its initial state for historic value.
|
||||
#region Store The Stupid Fucking Private Wind Map In Public Property
|
||||
private static void StoreWindGrid(On_TileDrawing.orig_Update orig, TileDrawing self)
|
||||
{
|
||||
orig(self);
|
||||
|
||||
// FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK
|
||||
if (Windgrid is null)
|
||||
Windgrid = typeof(TileDrawing).GetField("_windGrid", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(self) as WindGrid;
|
||||
}
|
||||
#endregion Store The Stupid Fucking Private Wind Map In Public Property
|
||||
}
|
||||
}
|
||||
@@ -23,15 +23,15 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.alchFlask = true;
|
||||
player.buffImmune[ModContent.BuffType<Plague>()] = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.BottledWater).
|
||||
AddIngredient(ItemID.BeeWax, 5).
|
||||
AddIngredient<PlagueCellCanister>(10).
|
||||
AddIngredient(ItemID.HoneyComb).
|
||||
AddIngredient(ItemID.BeeWax, 8).
|
||||
AddIngredient<PlagueCellCanister>(15).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
player.statLifeMax2 += 70;
|
||||
player.statLifeMax2 += 50;
|
||||
|
||||
// bool left in for abyss light purposes and life regen effects
|
||||
modPlayer.aAmpoule = true;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.width = 60;
|
||||
Item.height = 54;
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.defense = 20;
|
||||
Item.defense = 12;
|
||||
Item.accessory = true;
|
||||
Item.rare = ModContent.RarityType<DarkBlue>();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.height = 44;
|
||||
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
|
||||
Item.rare = ItemRarityID.Lime;
|
||||
Item.defense = 12; // we buff Ankh Shield to 12
|
||||
Item.defense = 8; // we buff Ankh Shield to 8
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace CalamityMod.Items.Accessories
|
||||
for (int i = 0; i < chains; i++)
|
||||
{
|
||||
int projectileType = ModContent.ProjectileType<BlazingStarThatDoesNotHeal>();
|
||||
int dmgAmt = 90;
|
||||
int dmgAmt = 250;
|
||||
if (!empowered && Main.rand.NextBool(5))
|
||||
{
|
||||
projectileType = ModContent.ProjectileType<BlazingStarHeal>();
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.height = 42;
|
||||
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
|
||||
Item.rare = ModContent.RarityType<Turquoise>();
|
||||
Item.defense = 16;
|
||||
Item.defense = 10;
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Accessories
|
||||
int totalProjectiles = 6;
|
||||
float offsetAngle = (float)Math.PI * radialOffset;
|
||||
int type = ModContent.ProjectileType<FlameLickedHellblast>();
|
||||
int damage = (int)player.GetBestClassDamage().ApplyTo(60);
|
||||
int damage = (int)player.GetBestClassDamage().ApplyTo(200);
|
||||
damage = player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
@@ -72,7 +72,7 @@ namespace CalamityMod.Items.Accessories
|
||||
totalProjectiles = 12;
|
||||
float radians2 = MathHelper.TwoPi / totalProjectiles;
|
||||
type = ModContent.ProjectileType<FlameLickedBarrage>();
|
||||
damage = (int)player.GetBestClassDamage().ApplyTo(20);
|
||||
damage = (int)player.GetBestClassDamage().ApplyTo(70);
|
||||
damage = player.ApplyArmorAccDamageBonusesTo(damage);
|
||||
|
||||
double angleA = radians2 * 0.5;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public static int RecoverTime = 120;
|
||||
public static int RecoverTime = 90;
|
||||
public static int DashFatigueIncrease = 240;
|
||||
public static int MaxFatigue = 1200; // This is also the time that it takes the player to recover from the loss of all stamina.
|
||||
|
||||
@@ -128,8 +128,9 @@ namespace CalamityMod.Items.Accessories
|
||||
RecoverTimer--;
|
||||
|
||||
// If the player has recovered, start decreasing the fatigue.
|
||||
bool PressingMoveKeys = Player.controlLeft || Player.controlRight || Player.controlDown || Player.controlJump;
|
||||
if (Fatigue > 0 && RecoverTimer <= 0)
|
||||
Fatigue -= Player.StandingStill() ? 2 : 1;
|
||||
Fatigue -= PressingMoveKeys ? 3 : 5;
|
||||
|
||||
// The fatigue cannot go higher than the max.
|
||||
if (Fatigue >= OldDukeScales.MaxFatigue)
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.height = 32;
|
||||
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.defense = 8;
|
||||
Item.defense = 4; // This has a ram dash, it should give a bit less defense due to how good it is
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class PlagueHive : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 42;
|
||||
Item.height = 48;
|
||||
Item.value = CalamityGlobalItem.RarityRedBuyPrice;
|
||||
Item.rare = ItemRarityID.Red;
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<AlchemicalFlask>().
|
||||
AddIngredient(ItemID.HoneyComb).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.uberBees = true;
|
||||
modPlayer.alchFlask = true;
|
||||
player.buffImmune[ModContent.BuffType<Plague>()] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 825 B |
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
player.statLifeMax2 += 100;
|
||||
player.statLifeMax2 += 70;
|
||||
|
||||
// Abyss light, debuff near-immunity, life regen effects, and massively enhances debuff halving
|
||||
modPlayer.purity = true;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.width = 64;
|
||||
Item.height = 62;
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
Item.defense = 18;
|
||||
Item.defense = 12;
|
||||
Item.accessory = true;
|
||||
Item.rare = ModContent.RarityType<Violet>();
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.height = 56;
|
||||
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
|
||||
Item.rare = ItemRarityID.Lime;
|
||||
Item.defense = 10;
|
||||
Item.defense = 4; // This should have less defense due to the regen it provides
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
|
||||
Item.rare = ItemRarityID.Yellow;
|
||||
Item.Calamity().donorItem = true;
|
||||
Item.defense = 12;
|
||||
Item.defense = 6;
|
||||
Item.accessory = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace CalamityMod.Items.Accessories
|
||||
string stats3 = "\n" + this.GetLocalization("GenericStats").Format(
|
||||
player.GetCurrentDefense(false),
|
||||
TwoPlaces(100f * player.endurance),
|
||||
player.lifeRegen, // Normally we'd divide this by 2 in Expert without Well Fed, but we disable that shit
|
||||
OnePlace((float)player.lifeRegen / 2f), // Divided by 2 to show HP/s, because vanilla! Also normally we'd divide this by 2 in Expert without Well Fed, but we disable that shit
|
||||
Sign(moveSpeedBoost) + TwoPlaces(100f * moveSpeedBoost),
|
||||
TwoPlaces(20f * player.GetJumpBoost()));
|
||||
// Show wing stats only if over 0 flight time
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.holyMinions = true;
|
||||
player.GetKnockback<SummonDamageClass>() += 2.5f;
|
||||
player.GetDamage<SummonDamageClass>() += 0.1f;
|
||||
player.GetDamage<SummonDamageClass>() += 0.12f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.shadowMinions = true;
|
||||
modPlayer.holyMinions = true;
|
||||
player.GetKnockback<SummonDamageClass>() += 2.75f;
|
||||
player.GetDamage<SummonDamageClass>() += 0.1f;
|
||||
player.GetDamage<SummonDamageClass>() += 0.12f;
|
||||
player.buffImmune[ModContent.BuffType<Shadowflame>()] = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 24;
|
||||
Item.defense = 15;
|
||||
Item.defense = 10;
|
||||
Item.value = CalamityGlobalItem.RarityRedBuyPrice;
|
||||
Item.rare = ItemRarityID.Red;
|
||||
Item.accessory = true;
|
||||
|
||||
@@ -5,6 +5,7 @@ using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
@@ -12,6 +13,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public class ToxicHeart : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public float pulseCounter = 0;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 28;
|
||||
@@ -25,44 +27,6 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.toxicHeart = true;
|
||||
player.buffImmune[ModContent.BuffType<Plague>()] = true;
|
||||
int plagueCounter = 0;
|
||||
Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0.05f, 1f, 0.1f);
|
||||
int plagueDebuff = ModContent.BuffType<Plague>();
|
||||
bool shouldInflictPlague = plagueCounter % 60 == 0;
|
||||
|
||||
int auraDamage = (int)player.GetBestClassDamage().ApplyTo(50);
|
||||
auraDamage = player.ApplyArmorAccDamageBonusesTo(auraDamage);
|
||||
|
||||
int random = Main.rand.Next(10);
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (random == 0)
|
||||
{
|
||||
foreach (NPC nPC in Main.ActiveNPCs)
|
||||
{
|
||||
if (nPC.IsAnEnemy() && !nPC.dontTakeDamage && !nPC.buffImmune[plagueDebuff] && Vector2.Distance(player.Center, nPC.Center) <= 300f)
|
||||
{
|
||||
if (nPC.FindBuffIndex(plagueDebuff) == -1)
|
||||
{
|
||||
nPC.AddBuff(plagueDebuff, 120, false);
|
||||
}
|
||||
if (shouldInflictPlague)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectileDirect(source, nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), auraDamage, 0f, player.whoAmI, nPC.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
plagueCounter++;
|
||||
if (plagueCounter >= 180)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 22;
|
||||
Item.defense = 30;
|
||||
Item.defense = 15; // Why did this give 30 defense? This thing really needs a rework lol
|
||||
Item.accessory = true;
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
Item.rare = ModContent.RarityType<Violet>();
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Ammo
|
||||
{
|
||||
Item.width = 8;
|
||||
Item.height = 8;
|
||||
Item.damage = 8;
|
||||
Item.damage = 10;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Ammo
|
||||
public class HolyFireBullet : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Ammo";
|
||||
internal const float ExplosionMultiplier = 0.33f;
|
||||
internal const float ExplosionMultiplier = 0.275f;
|
||||
public static readonly SoundStyle Explosion = new("CalamityMod/Sounds/Item/HolyFireBulletExplosion") { PitchVariance = 0.2f, Volume = 0.6f };
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Ammo
|
||||
{
|
||||
Item.width = 22;
|
||||
Item.height = 22;
|
||||
Item.damage = 22;
|
||||
Item.damage = 20;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Ammo
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Ammo";
|
||||
|
||||
public static int SplitBulletBonusDamage = 10;
|
||||
public static int SplitBulletBonusDamage = 16;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Ammo
|
||||
{
|
||||
Item.width = 8;
|
||||
Item.height = 8;
|
||||
Item.damage = 7;
|
||||
Item.damage = 11;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.maxStack = 9999;
|
||||
Item.consumable = true;
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace CalamityMod.Items.Armor.Sulphurous
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.08f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 5;
|
||||
player.GetDamage<ThrowingDamageClass>() += 0.06f;
|
||||
player.GetCritChance<ThrowingDamageClass>() += 4;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Armor.Sulphurous
|
||||
var modPlayer = player.Calamity();
|
||||
modPlayer.sulphurSet = true;
|
||||
player.GetJumpState<SulphurJump>().Enable();
|
||||
modPlayer.rogueStealthMax += 0.7f;
|
||||
modPlayer.rogueStealthMax += 0.65f;
|
||||
modPlayer.wearingRogueArmor = true;
|
||||
player.ignoreWater = true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.Buffs.StatBuffs;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.CalPlayer;
|
||||
@@ -437,8 +438,8 @@ namespace CalamityMod.Items
|
||||
modPlayer.canFireAtaxiaRogueProjectile = false;
|
||||
int flareID = ModContent.ProjectileType<HydrothermicFlareRogue>();
|
||||
|
||||
// Ataxia Rogue Flares: 6 x 50%, soft cap starts at 90 base damage
|
||||
int flareDamage = CalamityUtils.DamageSoftCap(damage * 0.5, 90);
|
||||
// Hydrothermic Rogue Flares: 6 x (50 + 15%), soft cap starts at 90 base damage
|
||||
int flareDamage = CalamityUtils.DamageSoftCap(50 + damage * 0.15, 90);
|
||||
flareDamage = player.ApplyArmorAccDamageBonusesTo(flareDamage);
|
||||
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
@@ -1237,6 +1238,35 @@ namespace CalamityMod.Items
|
||||
player.GetDamage<MeleeDamageClass>() += 0.02f;
|
||||
}
|
||||
|
||||
// The Frog Leg line is prevented from stacking.
|
||||
// Additionally, Amphibian boots are directly nerfed so they aren't the best in slot boots at all times.
|
||||
//
|
||||
// 21MAY2024: Ozzatron: Disabled this code. Frog Leg is allowed to stack. Amphibian Boots specific nerf is applied below.
|
||||
/*
|
||||
switch (item.type)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
case ItemID.AmphibianBoots:
|
||||
if (modPlayer.alreadyHasFrogLeg)
|
||||
player.jumpSpeedBoost -= BalancingConstants.VanillaFrogLegJumpSpeedBoost;
|
||||
else
|
||||
player.jumpSpeedBoost += BalancingConstants.AmphibianBootsJumpSpeedBoost - BalancingConstants.VanillaFrogLegJumpSpeedBoost;
|
||||
modPlayer.alreadyHasFrogLeg = true;
|
||||
break;
|
||||
case ItemID.FrogLeg:
|
||||
case ItemID.FrogFlipper:
|
||||
case ItemID.FrogGear:
|
||||
case ItemID.FrogWebbing:
|
||||
if (modPlayer.alreadyHasFrogLeg)
|
||||
player.jumpSpeedBoost -= BalancingConstants.VanillaFrogLegJumpSpeedBoost;
|
||||
modPlayer.alreadyHasFrogLeg = true;
|
||||
break;
|
||||
}
|
||||
*/
|
||||
if (item.type == ItemID.AmphibianBoots)
|
||||
player.jumpSpeedBoost += BalancingConstants.AmphibianBootsJumpSpeedBoost - BalancingConstants.VanillaFrogLegJumpSpeedBoost;
|
||||
|
||||
// Feral Claws line melee speed adjustments and nonstacking
|
||||
// First removes all their melee speed so it can be given based on which you wear without stacking
|
||||
if (item.type == ItemID.FeralClaws)
|
||||
|
||||
@@ -16,6 +16,7 @@ using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
@@ -29,7 +30,26 @@ namespace CalamityMod.Items
|
||||
#region Main ModifyTooltips Function
|
||||
public override void ModifyTooltips(Item item, List<TooltipLine> tooltips)
|
||||
{
|
||||
// Apply rarity coloration to the item's name.
|
||||
// Get the first index, last index and total count of standard vanilla tooltip lines.
|
||||
// The first index and count are used to delete all vanilla tooltips when holding SHIFT, if requested.
|
||||
// The last index is used to insert various extra tooltip lines in the right position.
|
||||
//
|
||||
// This code used to be in the HoldShiftTooltip utility, but is needed to correctly place other tooltips.
|
||||
int firstTooltipIndex = -1;
|
||||
int lastTooltipIndex = -1;
|
||||
int standardTooltipCount = 0;
|
||||
for (int i = 0; i < tooltips.Count; i++)
|
||||
{
|
||||
if (tooltips[i].Name.StartsWith("Tooltip"))
|
||||
{
|
||||
if (firstTooltipIndex == -1)
|
||||
firstTooltipIndex = i;
|
||||
lastTooltipIndex = i;
|
||||
standardTooltipCount++;
|
||||
}
|
||||
}
|
||||
|
||||
// Apply custom rarity coloration to the item's name if applicable.
|
||||
TooltipLine nameLine = tooltips.FirstOrDefault(x => x.Name == "ItemName" && x.Mod == "Terraria");
|
||||
if (nameLine != null)
|
||||
ApplyRarityColor(item, nameLine);
|
||||
@@ -40,20 +60,21 @@ namespace CalamityMod.Items
|
||||
// Adds "Does extra damage to enemies shot at point-blank range" to weapons capable of it.
|
||||
if (canFirePointBlankShots)
|
||||
{
|
||||
TooltipLine line = new TooltipLine(Mod, "PointBlankShot", "Does extra damage to enemies shot at point-blank range");
|
||||
tooltips.Add(line);
|
||||
var lineText = CalamityUtils.GetText("Misc.PointBlank");
|
||||
TooltipLine line = new TooltipLine(Mod, "CalamityMod:PointBlankTooltip", lineText.Value);
|
||||
tooltips.Insert(++lastTooltipIndex, line);
|
||||
}
|
||||
|
||||
// If an item has an enchantment, show its prefix in the first tooltip line and append its description to the
|
||||
// tooltip list.
|
||||
// If an item has an enchantment, show its prefix in the first tooltip line and append its description to the tooltip list.
|
||||
EnchantmentTooltips(item, tooltips);
|
||||
|
||||
// Replace rogue with rouge in gfb
|
||||
// In GFB, replace all instances of "rogue" with "rouge".
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
tooltips.FindAndReplace("Rogue", "Rouge");
|
||||
tooltips.FindAndReplace("rogue", "rouge");
|
||||
}
|
||||
|
||||
// Everything below this line can only apply to modded items. If the item is vanilla, stop here for efficiency.
|
||||
if (item.type < ItemID.Count)
|
||||
return;
|
||||
@@ -65,27 +86,68 @@ namespace CalamityMod.Items
|
||||
// Convert current charge ratio into a percentage.
|
||||
float displayedPercent = ChargeRatio * 100f;
|
||||
TooltipLine line = new TooltipLine(Mod, "CalamityCharge", $"Current Charge: {displayedPercent:N1}%");
|
||||
tooltips.Add(line);
|
||||
tooltips.Insert(++lastTooltipIndex, line);
|
||||
}
|
||||
|
||||
// Generic support for any and all Hold SHIFT tooltips.
|
||||
// For more information, see IHoldShiftTooltipItem.
|
||||
if (item.ModItem is IHoldShiftTooltipItem holdShiftItem)
|
||||
{
|
||||
string dynamicKey = $"{Mod.Name}:{item.ModItem.Name}_HoldShift";
|
||||
string lineText = item.ModItem.GetLocalizedValue(holdShiftItem.TooltipExtensionKey);
|
||||
var line = new TooltipLine(Mod, dynamicKey, lineText);
|
||||
if (holdShiftItem.TooltipExtensionColor is not null)
|
||||
line.OverrideColor = holdShiftItem.TooltipExtensionColor;
|
||||
TooltipLine[] lines = { line };
|
||||
|
||||
//
|
||||
// Original code lifted from Iban's extended armor tooltips.
|
||||
//
|
||||
bool holdingShift = Main.keyState.IsKeyDown(Keys.LeftShift);
|
||||
|
||||
// If holding SHIFT, actually display the extended tooltip.
|
||||
if (holdingShift && firstTooltipIndex != -1)
|
||||
{
|
||||
// If asked to, remove all standard tooltip lines. This moves the last tooltip index.
|
||||
if (holdShiftItem.HidesNormalTooltip)
|
||||
{
|
||||
tooltips.RemoveRange(firstTooltipIndex, standardTooltipCount);
|
||||
lastTooltipIndex -= standardTooltipCount;
|
||||
}
|
||||
|
||||
// Append every "Hold SHIFT" tooltip at the end of standard tooltips.
|
||||
tooltips.InsertRange(++lastTooltipIndex, lines);
|
||||
}
|
||||
|
||||
// If not holding SHIFT, display the extension indicator if appropriate.
|
||||
if (!holdingShift && holdShiftItem.ShowExtensionIndicator)
|
||||
{
|
||||
LocalizedText indicatorText = CalamityUtils.GetText(holdShiftItem.ExtensionIndicatorKey);
|
||||
var indicator = new TooltipLine(Mod, IHoldShiftTooltipItem.ExtensionIndicatorTooltipID, indicatorText.Value);
|
||||
if (holdShiftItem.ExtensionIndicatorColor is not null)
|
||||
indicator.OverrideColor = holdShiftItem.ExtensionIndicatorColor;
|
||||
tooltips.Insert(++lastTooltipIndex, indicator);
|
||||
}
|
||||
}
|
||||
|
||||
// Adds "Donor Item" and "Developer Item" to donor items and developer items respectively.
|
||||
if (donorItem)
|
||||
{
|
||||
TooltipLine line = new TooltipLine(Mod, "CalamityDonor", CalamityUtils.ColorMessage("- Donor Item -", CalamityUtils.DonatorItemColor));
|
||||
tooltips.Add(line);
|
||||
}
|
||||
// This is intentionally at the bottom, below everything else.
|
||||
if (devItem)
|
||||
{
|
||||
TooltipLine line = new TooltipLine(Mod, "CalamityDev", CalamityUtils.ColorMessage("- Developer Item -", CalamityUtils.DevItemColor));
|
||||
tooltips.Add(line);
|
||||
}
|
||||
else if (donorItem)
|
||||
{
|
||||
TooltipLine line = new TooltipLine(Mod, "CalamityDonor", CalamityUtils.ColorMessage("- Donor Item -", CalamityUtils.DonatorItemColor));
|
||||
tooltips.Add(line);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Rarity Coloration
|
||||
private void ApplyRarityColor(Item item, TooltipLine nameLine)
|
||||
private static void ApplyRarityColor(Item item, TooltipLine nameLine)
|
||||
{
|
||||
#region Uniquely Colored Items
|
||||
if (item.type == ModContent.ItemType<LiliesOfFinality>())
|
||||
nameLine.OverrideColor = Color.Lerp(Color.Red, Color.White, (float)Math.Sin(Main.GlobalTimeWrappedHourly) / 2f + 0.5f);
|
||||
if (item.type == ModContent.ItemType<HeartoftheElements>() || item.type == ModContent.ItemType<TheCommunity>() || item.type == ModContent.ItemType<IridescentExcalibur>())
|
||||
@@ -192,7 +254,6 @@ namespace CalamityMod.Items
|
||||
nameLine.OverrideColor = Color.Lerp(currentColor, nextColor, Main.GlobalTimeWrappedHourly % 2f > 1f ? 1f : Main.GlobalTimeWrappedHourly % 1f);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -262,6 +323,10 @@ namespace CalamityMod.Items
|
||||
if (item.type == ModContent.ItemType<LiliesOfFinality>())
|
||||
EditTooltipByName("Damage", (line) => line.Text = LiliesOfFinality.TheNumber + " summon damage");
|
||||
|
||||
// Apparently 612 is a homestuck reference
|
||||
if (item.type == ModContent.ItemType<Respiteblock>())
|
||||
EditTooltipByName("AxePower", (line) => line.Text = line.Text.Replace("610%", "612%"));
|
||||
|
||||
// Master Mode items also drop in Revengeance
|
||||
// Only affects vanilla and Calamity items
|
||||
if (item.master && (item.type < ItemID.Count || item.ModItem?.Mod is CalamityMod))
|
||||
@@ -292,10 +357,44 @@ namespace CalamityMod.Items
|
||||
EditTooltipByNum(0, (line) => line.Text += "\nDemon Altars now drop Souls of Night instead of generating ores when destroyed" +
|
||||
"\nHardmode ores now generate after defeating Mechanical Bosses for the first time");
|
||||
|
||||
// Warmth Potion provides debuff immunities
|
||||
// Exact life regen descriptions
|
||||
bool isCampfire = item.type == ItemID.Campfire || item.type == ItemID.CursedCampfire || item.type == ItemID.DemonCampfire || item.type == ItemID.FrozenCampfire || item.type == ItemID.IchorCampfire || item.type == ItemID.RainbowCampfire || item.type == ItemID.UltraBrightCampfire || item.type == ItemID.BoneCampfire || item.type == ItemID.DesertCampfire || item.type == ItemID.CoralCampfire || item.type == ItemID.CorruptCampfire || item.type == ItemID.CrimsonCampfire || item.type == ItemID.HallowedCampfire || item.type == ItemID.JungleCampfire || item.type == ItemID.MushroomCampfire || item.type == ItemID.ShimmerCampfire;
|
||||
if (isCampfire)
|
||||
EditTooltipByNum(0, (line) => line.Text = "Life regen is increased by 0.5 HP/s when near a campfire");
|
||||
|
||||
if (item.type == ItemID.HeartLantern)
|
||||
EditTooltipByNum(0, (line) => line.Text = "Grants +1 HP/s life regeneration when placed nearby");
|
||||
|
||||
if (item.type == ItemID.BottledHoney)
|
||||
EditTooltipByNum(0, (line) => line.Text = "Grants +1 HP/s life regen for a short time" +
|
||||
"\nGrants an additional +1 HP/s life regen while inflicted with a damaging debuff");
|
||||
|
||||
if (item.type == ItemID.ShinyStone)
|
||||
EditTooltipByNum(0, (line) => line.Text = "Grants +2 HP/s life regen and accelerates natural life regen when not moving");
|
||||
|
||||
if (item.type == ItemID.BandofRegeneration)
|
||||
EditTooltipByNum(0, (line) => line.Text = "Grants +1 HP/s life regeneration");
|
||||
|
||||
if (item.type == ItemID.CharmofMyths)
|
||||
EditTooltipByNum(0, (line) => line.Text = "Grants +1 HP/s life regeneration and reduces the cooldown of healing potions by 25%");
|
||||
|
||||
if (item.type == ItemID.RegenerationPotion)
|
||||
EditTooltipByNum(0, (line) => line.Text = "Provides +2 HP/s life regeneration");
|
||||
|
||||
if (item.type == ItemID.SoulDrain)
|
||||
EditTooltipByNum(0, (line) => line.Text += "\nThis grants +1.5 HP/s life regen and accelerates natural life regen" +
|
||||
"\nLife drain stacks based on the number of enemies being hit");
|
||||
|
||||
if (item.type == ItemID.HamBat)
|
||||
EditTooltipByNum(1, (line) => line.Text = "Defeating enemies temporarily grants +3 HP/s life regen");
|
||||
|
||||
if (item.type == ItemID.AegisCrystal)
|
||||
EditTooltipByNum(0, (line) => line.Text = "Permanently boosts natural life regeneration");
|
||||
|
||||
// Warmth Potion reduces debuff durations
|
||||
if (item.type == ItemID.WarmthPotion)
|
||||
{
|
||||
string immunityLine = "\nGrants immunity to Chilled, Frozen and Glacial State";
|
||||
string immunityLine = "\nGreatly reduces the duration of Chilled, Frozen, and Glacial State";
|
||||
EditTooltipByNum(0, (line) => line.Text += immunityLine);
|
||||
}
|
||||
|
||||
@@ -588,7 +687,7 @@ namespace CalamityMod.Items
|
||||
{
|
||||
EditTooltipByNum(0, (line) => line.Text = "Multiplies all fire-based debuff damage by 1.25\n" +
|
||||
"All attacks light enemies on fire\n" +
|
||||
"'Never get cold feet again'\n");
|
||||
"'Never get cold feet again'");
|
||||
}
|
||||
|
||||
// Hellfire Treads buff.
|
||||
@@ -889,6 +988,8 @@ namespace CalamityMod.Items
|
||||
// Solar Flare
|
||||
if (item.type == ItemID.SolarFlareHelmet)
|
||||
EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("26%", "20%"));
|
||||
if (item.type == ItemID.SolarFlareHelmet || item.type == ItemID.SolarFlareBreastplate || item.type == ItemID.SolarFlareLeggings)
|
||||
EditTooltipByNum(1, (line) => line.Text = "Grants +1 HP/s life regeneration");
|
||||
|
||||
// Vortex
|
||||
if (item.type == ItemID.VortexHelmet)
|
||||
@@ -900,8 +1001,10 @@ namespace CalamityMod.Items
|
||||
|
||||
// DD2 armor tooltip edits
|
||||
#region DD2 Armor
|
||||
// Reduce DD2 armor piece bonuses because they're overpowered
|
||||
// Reduce DD2 armor piece bonuses because they're overpowered, and clarify life regen boosts
|
||||
// Squire armor
|
||||
if (item.type == ItemID.SquireGreatHelm)
|
||||
EditTooltipByNum(0, (line) => line.Text = "Increases your max number of sentries by 1 and grants +2 HP/s life regen");
|
||||
if (item.type == ItemID.SquirePlating)
|
||||
EditTooltipByNum(0, (line) => line.Text = "10% increased minion and melee damage");
|
||||
if (item.type == ItemID.SquireGreaves)
|
||||
@@ -931,7 +1034,7 @@ namespace CalamityMod.Items
|
||||
|
||||
// Valhalla Knight armor
|
||||
if (item.type == ItemID.SquireAltShirt)
|
||||
EditTooltipByNum(0, (line) => line.Text = "30% increased minion damage and increased life regeneration");
|
||||
EditTooltipByNum(0, (line) => line.Text = "30% increased minion damage and grants +4 HP/s life regen");
|
||||
if (item.type == ItemID.SquireAltPants)
|
||||
EditTooltipByNum(0, (line) => line.Text = "10% increased minion damage and melee critical strike chance");
|
||||
|
||||
|
||||
@@ -45,8 +45,9 @@ namespace CalamityMod.Items
|
||||
{ ItemID.Bananarang, Do(DamageExact(76), UseExact(14)) },
|
||||
{ ItemID.BatScepter, Do(DamageExact(56)) },
|
||||
{ ItemID.BeamSword, Do(UseMeleeSpeed, DamageExact(142), UseAnimationExact(45), ShootSpeedExact(23f), KnockbackExact(8)) },
|
||||
{ ItemID.BeeGun, Do(DamageExact(10), ManaExact(4)) },
|
||||
{ ItemID.BeesKnees, Do(PointBlank, DamageExact(18), UseExact(38)) },
|
||||
{ ItemID.BeeGun, Do(DamageExact(13), ManaExact(4)) },
|
||||
{ ItemID.BeeKeeper, Do((UseTurn),DamageExact(32)) },
|
||||
{ ItemID.BeesKnees, Do(PointBlank, DamageExact(24), UseExact(38)) },
|
||||
{ ItemID.Bladetongue, Do(UseTurn, UseRatio(0.8f), DamageExact(120)) },
|
||||
{ ItemID.BlizzardStaff, Do(DamageExact(41), ManaExact(7)) },
|
||||
{ ItemID.BloodyMachete, Do(AutoReuse, DamageExact(24)) },
|
||||
@@ -127,7 +128,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.HellwingBow, Do(PointBlank, DamageExact(16)) },
|
||||
{ ItemID.HighVelocityBullet, Do(DamageExact(13)) },
|
||||
{ ItemID.HiveFive, Do(AutoReuse, DamageExact(26)) },
|
||||
{ ItemID.HornetStaff, Do(AutoReuse, DamageExact(13), UseExact(30)) },
|
||||
{ ItemID.HornetStaff, Do(AutoReuse, DamageExact(18), UseExact(30)) },
|
||||
{ ItemID.IceBlade, Do(UseMeleeSpeed) },
|
||||
{ ItemID.IceBoomerang, Do(UseExact(25), ShootSpeedExact(9)) },
|
||||
{ ItemID.IceRod, Do(UseExact(6), DamageExact(30), ShootSpeedExact(20)) },
|
||||
@@ -162,6 +163,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.MonkStaffT1, Do(TrueMeleeNoSpeed, DamageExact(83)) }, // Sleepy Octopod
|
||||
{ ItemID.MonkStaffT2, Do(AutoReuse, TrueMelee, DamageExact(90)) }, // Ghastly Glaive
|
||||
{ ItemID.MonkStaffT3, Do(DamageExact(225)) }, // Sky Dragon's Fury
|
||||
{ ItemID.MoonlordBullet, Do(DamageExact(19)) }, // Luminite Bullet
|
||||
{ ItemID.MoonlordTurretStaff, Do(DamageExact(50), UseExact(15)) }, //Lunar Portal Staff
|
||||
{ ItemID.Muramasa, Do(CritDelta(+20)) },
|
||||
{ ItemID.MushroomSpear, Do(AutoReuse, TrueMelee, UseRatio(0.8f), DamageExact(100)) },
|
||||
@@ -184,7 +186,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.PalladiumSword, Do(UseTurn, DamageExact(100)) },
|
||||
{ ItemID.PearlwoodBow, Do(AutoReuse, PointBlank, DamageExact(20), UseDelta(+8), ShootSpeedDelta(+3.4f), KnockbackDelta(+1f)) },
|
||||
{ ItemID.PearlwoodSword, Do(UseTurn, DamageExact(45)) },
|
||||
{ ItemID.PewMaticHorn, Do(DamageExact(24)) },
|
||||
{ ItemID.PewMaticHorn, Do(DamageExact(25), ShootSpeedExact(15)) },
|
||||
{ ItemID.Phantasm, Do(PointBlank, DamageExact(48)) },
|
||||
{ ItemID.PhoenixBlaster, Do(AutoReuse, PointBlank, UseExact(18)) },
|
||||
{ ItemID.PiranhaGun, Do(DamageExact(48)) },
|
||||
@@ -211,13 +213,12 @@ namespace CalamityMod.Items
|
||||
{ ItemID.RocketLauncher, Do(DamageExact(70)) },
|
||||
{ ItemID.Sandgun, Do(PointBlank, DamageExact(22), UseExact(20)) },
|
||||
{ ItemID.SapphireStaff, Do(DamageExact(25)) },
|
||||
{ ItemID.SDMG, Do(PointBlank, DamageExact(80)) },
|
||||
{ ItemID.Seedler, Do(UseMeleeSpeed, DamageExact(74), ShootSpeedDelta(+4f)) },
|
||||
{ ItemID.ShadowbeamStaff, Do(DamageExact(100)) },
|
||||
{ ItemID.ShadowFlameBow, Do(PointBlank, DamageExact(55)) },
|
||||
{ ItemID.ShadowFlameHexDoll, Do(DamageExact(40), ShootSpeedExact(30)) },
|
||||
{ ItemID.ShadowFlameKnife, Do(DamageExact(70)) },
|
||||
{ ItemID.SharpTears, Do(DamageExact(49)) },
|
||||
{ ItemID.SharpTears, Do(DamageExact(49)) }, // Blood Thorn
|
||||
{ ItemID.Shotgun, Do(PointBlank, DamageExact(36), AutoReuse) },
|
||||
{ ItemID.Shroomerang, Do(ShootSpeedExact(11)) },
|
||||
{ ItemID.SilverBullet, Do(DamageExact(8)) },
|
||||
@@ -225,6 +226,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.SkyFracture, Do(DamageExact(54), ShootSpeedExact(30f)) },
|
||||
{ ItemID.SlapHand, Do(UseTurn, DamageExact(120)) },
|
||||
{ ItemID.Smolstar, Do(DamageExact(9), AutoReuse, UseExact(25)) }, // Blade Staff
|
||||
{ ItemID.SniperRifle, Do(PointBlank, DamageExact(215)) },
|
||||
{ ItemID.SolarEruption, Do(DamageExact(157)) },
|
||||
{ ItemID.SoulDrain, Do(DamageExact(38)) }, // Life Drain
|
||||
{ ItemID.SpaceGun, Do(DamageExact(25)) },
|
||||
@@ -238,7 +240,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.StylistKilLaKillScissorsIWish, Do(AutoReuse, UseTurn, DamageExact(18)) }, // Stylish Scissors
|
||||
{ ItemID.Stynger, Do(DamageExact(75)) },
|
||||
{ ItemID.Swordfish, Do(AutoReuse, TrueMelee, DamageExact(24)) },
|
||||
{ ItemID.TacticalShotgun, Do(PointBlank, DamageExact(34)) },
|
||||
{ ItemID.TacticalShotgun, Do(PointBlank, DamageExact(41)) },
|
||||
{ ItemID.TaxCollectorsStickOfDoom, Do(AutoReuse, UseTurn, UseRatio(0.8f), DamageExact(70)) }, // Classy Cane
|
||||
{ ItemID.TendonBow, Do(PointBlank, DamageExact(17), AutoReuse) },
|
||||
{ ItemID.TerraBlade, Do(DamageExact(122)) },
|
||||
@@ -267,6 +269,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.VampireKnives, Do(DamageExact(38)) },
|
||||
{ ItemID.ValkyrieYoyo, Do(AutoReuse, DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats
|
||||
{ ItemID.VenomStaff, Do(DamageExact(55)) },
|
||||
{ ItemID.VenusMagnum, Do(PointBlank, DamageExact(65)) },
|
||||
{ ItemID.WaspGun, Do(UseExact(11), DamageExact(58)) },
|
||||
{ ItemID.WaterBolt, Do(DamageExact(23)) },
|
||||
{ ItemID.WhitePhaseblade, Do(AutoReuse, UseTurn, DamageExact(32)) },
|
||||
@@ -282,31 +285,31 @@ namespace CalamityMod.Items
|
||||
#region CATEGORY 2: Defense Balancing
|
||||
{ ItemID.AncientHallowedGreaves, Do(DefenseDelta(+2)) },
|
||||
{ ItemID.AncientHallowedPlateMail, Do(DefenseDelta(+3)) },
|
||||
{ ItemID.AnkhShield, Do(DefenseDelta(+8)) },
|
||||
{ ItemID.CobaltShield, Do(DefenseDelta(+3)) },
|
||||
{ ItemID.AnkhShield, Do(DefenseDelta(+4)) }, // 8 total
|
||||
{ ItemID.CobaltShield, Do(DefenseDelta(+3)) }, // 4 total
|
||||
{ ItemID.EoCShield, Do(DefenseDelta(+1)) }, // Shield of Cthulhu
|
||||
{ ItemID.FrozenShield, Do(DefenseDelta(+7)) },
|
||||
{ ItemID.FrozenShield, Do(DefenseDelta(+4)) }, // 10 total (plus the Frozen Turtle Shell DR effect)
|
||||
{ ItemID.FrozenTurtleShell, Do(DefenseExact(6)) },
|
||||
{ ItemID.HallowedGreaves, Do(DefenseDelta(+2)) },
|
||||
{ ItemID.HallowedPlateMail, Do(DefenseDelta(+3)) },
|
||||
{ ItemID.HeroShield, Do(DefenseDelta(+10)) },
|
||||
{ ItemID.HeroShield, Do(DefenseDelta(+5)) }, // 15 total (plus increased max life)
|
||||
{ ItemID.LavaSkull, Do(DefenseExact(4)) }, // Magma Skull
|
||||
{ ItemID.MoltenSkullRose, Do(DefenseExact(8)) },
|
||||
{ ItemID.ObsidianShield, Do(DefenseDelta(+5)) },
|
||||
{ ItemID.ObsidianSkull, Do(DefenseDelta(+1)) },
|
||||
{ ItemID.ObsidianShield, Do(DefenseDelta(+4)) }, // 6 total
|
||||
{ ItemID.ObsidianSkull, Do(DefenseDelta(+1)) }, // 2 total
|
||||
{ ItemID.ObsidianSkullRose, Do(DefenseExact(4)) },
|
||||
{ ItemID.OrichalcumBreastplate, Do(DefenseDelta(+3)) },
|
||||
{ ItemID.OrichalcumHeadgear, Do(DefenseDelta(+2)) },
|
||||
{ ItemID.OrichalcumHelmet, Do(DefenseDelta(+3)) },
|
||||
{ ItemID.OrichalcumLeggings, Do(DefenseDelta(+4)) },
|
||||
{ ItemID.OrichalcumMask, Do(DefenseDelta(+3)) },
|
||||
{ ItemID.PaladinsShield, Do(DefenseDelta(+3)) },
|
||||
{ ItemID.PaladinsShield, Do(DefenseDelta(+2)) }, // 8 total
|
||||
{ ItemID.PalladiumBreastplate, Do(DefenseDelta(+3)) },
|
||||
{ ItemID.PalladiumHeadgear, Do(DefenseDelta(+2)) },
|
||||
{ ItemID.PalladiumHelmet, Do(DefenseDelta(+3)) },
|
||||
{ ItemID.PalladiumMask, Do(DefenseDelta(+1)) },
|
||||
{ ItemID.PalladiumLeggings, Do(DefenseDelta(+3)) },
|
||||
{ ItemID.Shackle, Do(DefenseDelta(+2)) },
|
||||
{ ItemID.Shackle, Do(DefenseDelta(+2)) }, // 3 total
|
||||
#endregion
|
||||
|
||||
#region CATEGORY 3: Tool Balancing
|
||||
@@ -454,15 +457,14 @@ namespace CalamityMod.Items
|
||||
{ ItemID.PulseBow, pointBlank },
|
||||
{ ItemID.Revolver, Do(PointBlank, AutoReuse) },
|
||||
{ ItemID.RichMahoganyBow, pointBlank },
|
||||
{ ItemID.SDMG, pointBlank },
|
||||
{ ItemID.ShadewoodBow, pointBlank },
|
||||
{ ItemID.SilverBow, pointBlank },
|
||||
{ ItemID.SniperRifle, pointBlank },
|
||||
{ ItemID.SnowballCannon, pointBlank },
|
||||
{ ItemID.StakeLauncher, pointBlank },
|
||||
{ ItemID.TinBow, pointBlank },
|
||||
{ ItemID.TungstenBow, pointBlank },
|
||||
{ ItemID.Uzi, pointBlank },
|
||||
{ ItemID.VenusMagnum, pointBlank },
|
||||
{ ItemID.VortexBeater, pointBlank },
|
||||
{ ItemID.WoodenBow, pointBlank },
|
||||
#endregion
|
||||
@@ -510,7 +512,6 @@ namespace CalamityMod.Items
|
||||
#region CATEGORY 7: Other Quality of Life (AutoReuse / UseTurn)
|
||||
{ ItemID.Amarok, autoReuse },
|
||||
{ ItemID.BatBat, autoReuse },
|
||||
{ ItemID.BeeKeeper, Do(UseTurn) },
|
||||
{ ItemID.BladeofGrass, Do(AutoReuse, UseTurn) },
|
||||
{ ItemID.BloodButcherer, Do(AutoReuse, UseTurn) },
|
||||
{ ItemID.BoneSword, Do(AutoReuse, UseTurn) },
|
||||
|
||||
|
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 431 B |
@@ -13,7 +13,8 @@ namespace CalamityMod.Items.Fishing
|
||||
Item.ResearchUnlockCount = 10;
|
||||
ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true;
|
||||
// For some reason Life/Mana boosting items are in this set (along with Magic Mirror+)
|
||||
ItemID.Sets.SortingPriorityBossSpawns[Type] = 19; // Mana Crystal
|
||||
ItemID.Sets.SortingPriorityBossSpawns[Type] = 21; // Mana Crystal
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ArcaneCrystal;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
// Materials
|
||||
itemLoot.Add(ModContent.ItemType<Navystone>(), 1, 10, 30);
|
||||
itemLoot.Add(ModContent.ItemType<EutrophicSand>(), 1, 10, 30);
|
||||
itemLoot.Add(ModContent.ItemType<Driftwood>(), 1, 30, 60);
|
||||
postDesertScourge.Add(ModContent.ItemType<PrismShard>(), 1, 5, 10);
|
||||
postDesertScourge.Add(ModContent.ItemType<SeaPrism>(), 5, 2, 5);
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
// Materials
|
||||
itemLoot.Add(ModContent.ItemType<Navystone>(), 1, 10, 30);
|
||||
itemLoot.Add(ModContent.ItemType<EutrophicSand>(), 1, 10, 30);
|
||||
itemLoot.Add(ModContent.ItemType<Driftwood>(), 1, 30, 60);
|
||||
postDesertScourge.Add(ModContent.ItemType<PrismShard>(), 1, 5, 10);
|
||||
postDesertScourge.Add(ModContent.ItemType<SeaPrism>(), 5, 2, 5);
|
||||
postHardmodeClam.Add(ModContent.ItemType<MolluskHusk>(), new Fraction(12, 100), 2, 5);
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace CalamityMod.Items
|
||||
{
|
||||
// This interface is used on items where you can hold Left SHIFT for an expanded tooltip.
|
||||
// All actual implementation of this behavior is done in CalamityGlobalItemTooltip.
|
||||
public interface IHoldShiftTooltipItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Internal ID for the TooltipLine which contains Calamity items' "Hold SHIFT" extension indicators.
|
||||
/// </summary>
|
||||
internal const string ExtensionIndicatorTooltipID = "CalamityMod:HoldShiftExtensionIndicator";
|
||||
|
||||
/// <summary>
|
||||
/// The lang/localization key of the default tooltip extension indicator message.
|
||||
/// </summary>
|
||||
public const string DefaultExtensionIndicatorKey = "UI.HoldShiftTooltipExtensionIndicator";
|
||||
|
||||
/// <summary>
|
||||
/// The default color of the default tooltip extension indicator message.
|
||||
/// </summary>
|
||||
public static readonly Color DefaultExtensionIndicatorColor = new Color(184, 184, 184); // #B8B8B8
|
||||
|
||||
/// <summary>
|
||||
/// The default lang/localization key which is queried to show an item's tooltip extension.
|
||||
/// </summary>
|
||||
public const string DefaultTooltipExtensionKey = "HoldShiftTooltip";
|
||||
|
||||
/// <summary>
|
||||
/// Whether holding Left SHIFT for the tooltip extension hides the normal tooltip. Typically this is false.
|
||||
/// </summary>
|
||||
public virtual bool HidesNormalTooltip => false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the "Hold SHIFT for more" extension indicator appears by default. Should essentially always be true.<br />
|
||||
/// You can set this to false for "secret" flavor or easter egg tooltips, like the one on Midas Prime.
|
||||
/// </summary>
|
||||
public virtual bool ShowExtensionIndicator => true;
|
||||
|
||||
/// <summary>
|
||||
/// The lang/localization key of this item's tooltip extension indicator message.
|
||||
/// </summary>
|
||||
public virtual string ExtensionIndicatorKey => DefaultExtensionIndicatorKey;
|
||||
|
||||
/// <summary>
|
||||
/// The color of this item's tooltip extension indicator message. If set to <b>null</b>, the indicator will not be colored.
|
||||
/// </summary>
|
||||
public virtual Color? ExtensionIndicatorColor => DefaultExtensionIndicatorColor;
|
||||
|
||||
/// <summary>
|
||||
/// The lang/localization key which this item uses for its tooltip extension.
|
||||
/// </summary>
|
||||
public virtual string TooltipExtensionKey => DefaultTooltipExtensionKey;
|
||||
|
||||
/// <summary>
|
||||
/// The color of this item's tooltip extension. If set to <b>null</b>, the tooltip extension will not be colored.
|
||||
/// </summary>
|
||||
public virtual Color? TooltipExtensionColor => null;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.LoreItems
|
||||
{
|
||||
public abstract class LoreItem : ModItem, ILocalizedModType
|
||||
public abstract class LoreItem : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Lore";
|
||||
|
||||
// All lore items initially have a short tooltip which indicates there is more to be read.
|
||||
public override LocalizedText Tooltip => CalamityUtils.GetText($"{LocalizationCategory}.ShortTooltip");
|
||||
// When holding SHIFT on a lore item, the default tooltip is removed entirely.
|
||||
public bool HidesNormalTooltip => true;
|
||||
|
||||
// By default, lore text appears in white, but this can be changed.
|
||||
public virtual Color? LoreColor => null;
|
||||
// Lore items have a flavorful extension indicator tooltip.
|
||||
public string ExtensionIndicatorKey => $"{LocalizationCategory}.ShortTooltip";
|
||||
|
||||
// Each line of the extension indicator tooltip is manually colored, so don't provide an override color.
|
||||
public Color? ExtensionIndicatorColor => null;
|
||||
|
||||
// The localization key for all lore items' full lore content is just "Lore".
|
||||
public string TooltipExtensionKey => "Lore";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -30,14 +34,5 @@ namespace CalamityMod.Items.LoreItems
|
||||
{
|
||||
itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.LoreItems;
|
||||
}
|
||||
|
||||
// All lore items use the same code for holding SHIFT to extend tooltips.
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
TooltipLine fullLore = new(Mod, "CalamityMod:Lore", this.GetLocalizedValue("Lore"));
|
||||
if (LoreColor.HasValue)
|
||||
fullLore.OverrideColor = LoreColor.Value;
|
||||
CalamityUtils.HoldShiftTooltip(tooltips, new TooltipLine[] { fullLore }, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Items.Placeables.Plates;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -12,6 +13,7 @@ namespace CalamityMod.Items
|
||||
public class NormalityRelocator : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Misc";
|
||||
public static readonly SoundStyle TeleportSound = new("CalamityMod/Sounds/Item/NormalityRelocator", 3);
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 7));
|
||||
|
||||
@@ -20,11 +20,9 @@ namespace CalamityMod.Items.Pets
|
||||
Item.useTime = 20;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.noMelee = true;
|
||||
|
||||
Item.value = Item.sellPrice(platinum: 1);
|
||||
Item.rare = ItemRarityID.Cyan;
|
||||
Item.Calamity().devItem = true;
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<EidolonSnail>();
|
||||
Item.buffType = ModContent.BuffType<EidolonSnailBuff>();
|
||||
Item.UseSound = SoundID.Item2;
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
using CalamityMod.Tiles.FloralParadise;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables
|
||||
{
|
||||
public class AlgalSlateItem : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.createTile = ModContent.TileType<AlgalSlate>();
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTurn = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.autoReuse = true;
|
||||
Item.consumable = true;
|
||||
Item.width = 16;
|
||||
Item.height = 16;
|
||||
Item.maxStack = 999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 270 B |
@@ -0,0 +1,28 @@
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables
|
||||
{
|
||||
public class Basalt : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 12;
|
||||
Item.height = 12;
|
||||
Item.maxStack = 9999;
|
||||
Item.useTurn = true;
|
||||
Item.autoReuse = true;
|
||||
Item.useAnimation = 15;
|
||||
Item.useTime = 10;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.consumable = true;
|
||||
Item.createTile = ModContent.TileType<Tiles.SunkenSea.Basalt>();
|
||||
}
|
||||
}
|
||||
}
|
||||