MANUAL MERGE: 2.0.2.001 TO RELEASE BRANCH

This commit is contained in:
Ozzatron committed 2023-02-20 22:13:10 -05:00
commit b8e26080d7
3367 files changed
+50851 -23017

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
using Terraria.ModLoader;
namespace CalamityMod.Backgrounds
{
public class PissSeaSurfaceBGStyle : ModSurfaceBackgroundStyle
{
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
{
b -= 250f;
return BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/PissSeaSurfaceClose");
}
public override void ModifyFarFades(float[] fades, float transitionSpeed)
{
//This just fades in the background and fades out other backgrounds.
for (int i = 0; i < fades.Length; i++)
{
if (i == Slot)
{
fades[i] += transitionSpeed;
if (fades[i] > 1f)
{
fades[i] = 1f;
}
}
else
{
fades[i] -= transitionSpeed;
if (fades[i] < 0f)
{
fades[i] = 0f;
}
}
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

+2 -2
View File
@@ -6,8 +6,8 @@ namespace CalamityMod.Backgrounds
{
public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b)
{
b -= 250f;
return BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SulphurSeaSurfaceClose");
b -= 100f;
return BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel");
}
public override void ModifyFarFades(float[] fades, float transitionSpeed)
Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

+13
View File
@@ -0,0 +1,13 @@
using Terraria.ModLoader;
namespace CalamityMod.Backgrounds
{
public class SunkenSeaBGStyle : ModUndergroundBackgroundStyle
{
public override void FillTextureArray(int[] textureSlots)
{
for (int i = 0; i <= 3; i++)
textureSlots[i] = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG" + i.ToString());
}
}
}
+11 -6
View File
@@ -19,6 +19,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
using CalamityMod.NPCs.ProfanedGuardians;
namespace CalamityMod.Balancing
{
@@ -207,12 +208,13 @@ namespace CalamityMod.Balancing
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Providence>(), new ProjectileResistBalancingRule(0.2f, ProjectileType<HellsSunProj>())));
#endregion
#region Ceaseless Void / Dark Energies
#region Ceaseless Void / Dark Energies / Profaned Rocks
// 50% resist to true melee.
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new TrueMeleeResistBalancingRule(0.5f)));
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<ProfanedRocks>(), new TrueMeleeResistBalancingRule(0.5f)));
#endregion Ceaseless Void / Dark Energies
#endregion Ceaseless Void / Dark Energies / Profaned Rocks
#region Storm Weaver
@@ -274,6 +276,9 @@ namespace CalamityMod.Balancing
// 15% resist to Enforcer projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.AresIDs, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<EssenceFlame2>()))));
//55% resist to Dynamic Pursuer
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
#endregion Ares
#region Artemis and Apollo
@@ -290,8 +295,8 @@ namespace CalamityMod.Balancing
#region Thanatos
// 85% resist to Dynamic Pursuer (the whole thing lol).
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.15f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
// 50% resist to Dynamic Pursuer (the whole thing lol).
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
// 65% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new TrueMeleeResistBalancingRule(0.35f))));
@@ -314,8 +319,8 @@ namespace CalamityMod.Balancing
// 40% resist to Rancor.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<RancorLaserbeam>()))));
// 40% resist to Wrathwing stealth strike.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<WrathwingCinder>()))));
// 50% resist to Wrathwing stealth strike.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<WrathwingCinder>()))));
// 40% resist to Yharim's Crystal.
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityLists.ThanatosIDs, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<YharimsCrystalBeam>()))));
+2 -2
View File
@@ -9,12 +9,13 @@ namespace CalamityMod.BiomeManagers
{
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AstralWater");
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/AstralSurfaceBGStyle");
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/AstralUndergroundBGStyle");
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbovegroundAstralBiomeIcon";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("Astral") ?? MusicID.Space;
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
public override void SetStaticDefaults()
{
@@ -30,6 +31,5 @@ namespace CalamityMod.BiomeManagers
{
player.ManageSpecialBiomeVisuals("CalamityMod:Astral", isActive);
}
}
}
@@ -14,7 +14,7 @@ namespace CalamityMod.BiomeManagers
// Could use its own unique background
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("Astral") ?? MusicID.Space;
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
public override void SetStaticDefaults()
{
+2 -2
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.BiomeManagers
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("Astral") ?? MusicID.Space;
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfection") ?? MusicID.Space;
public override void SetStaticDefaults()
{
@@ -21,7 +21,7 @@ namespace CalamityMod.BiomeManagers
public override bool IsBiomeActive(Player player)
{
return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && !player.ZoneDesert && player.ZoneSnow;
return !player.ZoneDungeon && BiomeTileCounterSystem.AstralTiles > 950 && player.ZoneSnow;
}
public override void SpecialVisuals(Player player, bool isActive)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 B

+21 -16
View File
@@ -1,5 +1,6 @@
using CalamityMod.CalPlayer;
using CalamityMod.World;
using CalamityMod.Systems;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
@@ -9,25 +10,24 @@ namespace CalamityMod.BiomeManagers
{
public class AbyssLayer1Biome : ModBiome
{
//keep this here even though layer one now uses a tile check, cannot be bothered to move it for now
public static bool MeetsBaseAbyssRequirement(Player player, out int playerYTileCoords)
{
Point point = player.Center.ToTileCoordinates();
int x = Main.maxTilesX;
int y = Main.maxTilesY;
int genLimit = x / 2;
int abyssChasmY = y - 250;
int abyssChasmX = Abyss.AtLeftSideOfWorld ? genLimit - (genLimit - 135) : genLimit + (genLimit - 135);
int abyssChasmX = Abyss.AtLeftSideOfWorld ? genLimit - (genLimit - 135) + 35 : genLimit + (genLimit - 135) - 35;
bool abyssPosX = false;
bool abyssPosY = point.Y <= abyssChasmY;
if (Abyss.AtLeftSideOfWorld)
{
if (point.X < abyssChasmX + 80)
if (point.X < abyssChasmX + 140)
abyssPosX = true;
}
else
{
if (point.X > abyssChasmX - 80)
if (point.X > abyssChasmX - 140)
abyssPosX = true;
}
@@ -36,16 +36,15 @@ namespace CalamityMod.BiomeManagers
if (WeakReferenceSupport.InAnySubworld())
return false;
return point.Y > SulphurousSea.YStart + SulphurousSea.BlockDepth - 78 &&
!player.lavaWet &&
!player.honeyWet &&
abyssPosY &&
abyssPosX;
int abyssStartHeight = (SulphurousSea.YStart + (int)Main.worldSurface) / 2 + 90;
return !player.lavaWet && !player.honeyWet && abyssPosX && playerYTileCoords >= abyssStartHeight && playerYTileCoords <= Main.maxTilesY - 200;
}
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AbyssWater");
//temporarily use sulphur for now
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricDepthsWater");
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssIcon";
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer1Icon";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
@@ -55,19 +54,25 @@ namespace CalamityMod.BiomeManagers
{
if (CalamityPlayer.areThereAnyDamnBosses)
return Main.curMusic;
return CalamityMod.Instance.GetMusicFromMusicMod("Abyss1") ?? MusicID.Hell;
return !Main.dayTime
? CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaNight") ?? MusicID.Desert // Nighttime
: CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaDay") ?? MusicID.Desert; // Daytime
}
}
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Abyss: First Layer");
DisplayName.SetDefault("Sulphuric Depths");
}
public override bool IsBiomeActive(Player player)
{
return MeetsBaseAbyssRequirement(player, out int playerYTileCoords) &&
playerYTileCoords <= (Main.rockLayer + Main.maxTilesY * 0.03);
Point point = player.Center.ToTileCoordinates();
int abyssStartHeight = (SulphurousSea.YStart + (int)Main.worldSurface) / 2 + 90;
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && point.Y >= abyssStartHeight &&
BiomeTileCounterSystem.Layer1Tiles >= 200 && !player.Calamity().ZoneAbyssLayer2 && !player.Calamity().ZoneAbyssLayer3 && !player.Calamity().ZoneAbyssLayer4;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

+7 -7
View File
@@ -1,4 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Systems;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,26 +14,25 @@ namespace CalamityMod.BiomeManagers
{
if (CalamityPlayer.areThereAnyDamnBosses)
return Main.curMusic;
return CalamityMod.Instance.GetMusicFromMusicMod("Abyss1") ?? MusicID.Hell;
return CalamityMod.Instance.GetMusicFromMusicMod("AbyssLayer2") ?? MusicID.Hell;
}
}
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AbyssWater");
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/UpperAbyssWater");
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssIcon";
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer2Icon";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Abyss: Second Layer");
DisplayName.SetDefault("Murky Waters");
}
public override bool IsBiomeActive(Player player)
{
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) &&
playerYTileCoords > (Main.rockLayer + Main.maxTilesY * 0.03) &&
playerYTileCoords <= (Main.rockLayer + Main.maxTilesY * 0.14);
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && BiomeTileCounterSystem.Layer2Tiles >= 200 &&
playerYTileCoords > Main.rockLayer - 10 && playerYTileCoords <= Main.rockLayer + Main.maxTilesY * 0.143;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

+7 -7
View File
@@ -1,4 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Systems;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,26 +14,25 @@ namespace CalamityMod.BiomeManagers
{
if (CalamityPlayer.areThereAnyDamnBosses)
return Main.curMusic;
return CalamityMod.Instance.GetMusicFromMusicMod("Abyss2") ?? MusicID.Hell;
return CalamityMod.Instance.GetMusicFromMusicMod("AbyssLayer3") ?? MusicID.Hell;
}
}
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AbyssWater");
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/MiddleAbyssWater");
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssIcon";
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer3Icon";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer23";
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Abyss: Third Layer");
DisplayName.SetDefault("Thermal Vents");
}
public override bool IsBiomeActive(Player player)
{
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) &&
playerYTileCoords > (Main.rockLayer + Main.maxTilesY * 0.14) &&
playerYTileCoords <= (Main.rockLayer + Main.maxTilesY * 0.26);
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && BiomeTileCounterSystem.Layer3Tiles >= 200 &&
playerYTileCoords > Main.rockLayer + Main.maxTilesY * 0.143 && playerYTileCoords <= Main.rockLayer + Main.maxTilesY * 0.268;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

+7 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Systems;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -13,25 +14,25 @@ namespace CalamityMod.BiomeManagers
{
if (CalamityPlayer.areThereAnyDamnBosses)
return Main.curMusic;
return CalamityMod.Instance.GetMusicFromMusicMod("Abyss3") ?? MusicID.Hell;
return CalamityMod.Instance.GetMusicFromMusicMod("AbyssLayer4") ?? MusicID.Hell;
}
}
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/AbyssWater");
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/VoidWater");
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssIcon";
public override string BestiaryIcon => "CalamityMod/BiomeManagers/AbyssLayer4Icon";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer4";
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer4";
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Abyss: Fourth Layer");
DisplayName.SetDefault("The Void");
}
public override bool IsBiomeActive(Player player)
{
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) &&
playerYTileCoords > Main.rockLayer + Main.maxTilesY * 0.26;
return AbyssLayer1Biome.MeetsBaseAbyssRequirement(player, out int playerYTileCoords) && BiomeTileCounterSystem.Layer4Tiles >= 200 &&
playerYTileCoords > Main.rockLayer + Main.maxTilesY * 0.268;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

+2 -2
View File
@@ -7,7 +7,7 @@ namespace CalamityMod.BiomeManagers
{
public class BrimstoneCragsBiome : ModBiome
{
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("Crag") ?? MusicID.Eerie;
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("BrimstoneCrags") ?? MusicID.Eerie;
public override SceneEffectPriority Priority => SceneEffectPriority.Environment;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/BrimstoneCragsIcon";
@@ -20,7 +20,7 @@ namespace CalamityMod.BiomeManagers
public override bool IsBiomeActive(Player player)
{
return BiomeTileCounterSystem.BrimstoneCragTiles > 100;
return BiomeTileCounterSystem.BrimstoneCragTiles > 100 && player.ZoneUnderworldHeight;
}
}
}
+37 -10
View File
@@ -1,9 +1,11 @@
using CalamityMod.CalPlayer;
using System.Security.Policy;
using CalamityMod.CalPlayer;
using CalamityMod.Events;
using CalamityMod.Systems;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.ID;
using Terraria.ModLoader;
@@ -11,8 +13,8 @@ namespace CalamityMod.BiomeManagers
{
public class SulphurousSeaBiome : ModBiome
{
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricWater");
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/SulphurSeaSurfaceBGStyle");
public override ModWaterStyle WaterStyle => CalamityWorld.getFixedBoi ? ModContent.Find<ModWaterStyle>("CalamityMod/PissWater") : ModContent.Find<ModWaterStyle>("CalamityMod/SulphuricWater");
public override ModSurfaceBackgroundStyle SurfaceBackgroundStyle => CalamityWorld.getFixedBoi ?ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/PissSeaSurfaceBGStyle") : ModContent.Find<ModSurfaceBackgroundStyle>("CalamityMod/SulphurSeaSurfaceBGStyle");
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SulphurousSeaIcon";
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/SulphurBG";
@@ -31,14 +33,17 @@ namespace CalamityMod.BiomeManagers
if (acidRain)
{
music = DownedBossSystem.downedPolterghast
? CalamityMod.Instance.GetMusicFromMusicMod("AcidRain2") ?? MusicID.Monsoon // Acid Rain Tier 3
: CalamityMod.Instance.GetMusicFromMusicMod("AcidRain1") ?? MusicID.OldOnesArmy; // Acid Rain Tier 1 + 2
? CalamityMod.Instance.GetMusicFromMusicMod("AcidRainTier3") ?? MusicID.Monsoon // Acid Rain Tier 3
: CalamityMod.Instance.GetMusicFromMusicMod("AcidRainTier1") ?? MusicID.OldOnesArmy; // Acid Rain Tier 1 + 2
}
// Regular Sulphur Sea theme, when Acid Rain is not occurring
// Regular Sulphur Sea themes, when Acid Rain is not occurring
else
music = CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSea") ?? MusicID.Desert;
music = !Main.dayTime
? CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaNight") ?? MusicID.Desert // Nighttime
: CalamityMod.Instance.GetMusicFromMusicMod("SulphurousSeaDay") ?? MusicID.Desert; // Daytime
}
return music;
}
}
@@ -52,17 +57,39 @@ namespace CalamityMod.BiomeManagers
{
Point point = player.Center.ToTileCoordinates();
bool sulphurPosX = false;
if (Abyss.AtLeftSideOfWorld)
{
if (point.X < 380)
if (point.X < 435)
{
sulphurPosX = true;
}
}
else
{
if (point.X > Main.maxTilesX - 380)
if (point.X > Main.maxTilesX - 435)
{
sulphurPosX = true;
}
}
return (BiomeTileCounterSystem.SulphurTiles >= 300 || (point.Y < (Main.rockLayer - Main.maxTilesY / 13) && sulphurPosX)) && !player.Calamity().ZoneAbyss;
}
public override void SpecialVisuals(Player player, bool isActive)
{
string biomeName = "CalamityMod:SulphurSea";
if (SkyManager.Instance[biomeName] != null && isActive != SkyManager.Instance[biomeName].IsActive())
{
if (isActive)
{
SkyManager.Instance.Activate(biomeName);
}
else
{
SkyManager.Instance.Deactivate(biomeName);
}
}
return (BiomeTileCounterSystem.SulphurTiles >= 300 || (player.ZoneOverworldHeight && sulphurPosX)) && !player.Calamity().ZoneAbyss;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 B

After

Width:  |  Height:  |  Size: 375 B

+2 -1
View File
@@ -8,7 +8,8 @@ namespace CalamityMod.BiomeManagers
public class SunkenSeaBiome : ModBiome
{
public override ModWaterStyle WaterStyle => ModContent.Find<ModWaterStyle>("CalamityMod/SunkenSeaWater");
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.Temple;
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight;
public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh;
public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon";
// Placeholder until we get a dedicated Sunken Sea background
+1 -1
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.BiomeManagers
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AstralBG";
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralUnderground") ?? MusicID.Space;
public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("AstralInfectionUnderground") ?? MusicID.Space;
public override void SetStaticDefaults()
{
+1 -3
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Alcohol
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Bloody Mary");
Description.SetDefault("Damage, critical strike chance, movement speed, and melee speed boosted during a Blood Moon, life regen and defense reduced");
Description.SetDefault("Damage and movement speed boosted during a Blood Moon, life regen and defense reduced");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
@@ -19,8 +19,6 @@ namespace CalamityMod.Buffs.Alcohol
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().bloodyMary = true;
if (Main.bloodMoon)
player.GetAttackSpeed<MeleeDamageClass>() += 0.15f;
}
}
}
+2 -2
View File
@@ -1,4 +1,4 @@
using Terraria;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Alcohol
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Grape Beer");
Description.SetDefault("Defense and movement speed reduced");
Description.SetDefault("Defense reduced");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Alcohol
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Tequila");
Description.SetDefault("Damage, critical strike chance, damage reduction, defense, and knockback boosted during daytime, life regen reduced");
Description.SetDefault("Critical strike chance, defense, and knockback boosted during daytime, life regen reduced");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Alcohol
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Tequila Sunrise");
Description.SetDefault("Damage, critical strike chance, damage reduction, defense, and knockback boosted during daytime, life regen reduced");
Description.SetDefault("Critical strike chance, defense, and knockback boosted during daytime, life regen reduced");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
+8 -8
View File
@@ -16,9 +16,9 @@ namespace CalamityMod.Buffs
{
player.arrowDamage *= 0.875f;
}
else if (type == BuffID.Endurance)
else if (type == BuffID.Ironskin)
{
player.endurance -= 0.05f;
player.statDefense += CalamityUtils.GetScalingDefense(-1) - 8;
}
else if (type == BuffID.MagicPower)
{
@@ -103,8 +103,8 @@ namespace CalamityMod.Buffs
// Vanilla buffs
switch (type)
{
case BuffID.Endurance:
tip = "5% reduced damage";
case BuffID.Ironskin:
tip = "Increase defense by " + CalamityUtils.GetScalingDefense(-1);
break;
case BuffID.MagicPower:
@@ -123,6 +123,10 @@ namespace CalamityMod.Buffs
tip = "10% increased movement speed and 20% increased mining speed";
break;
case BuffID.LeafCrystal:
tip = "Emits powerful life pulses at nearby enemies";
break;
case BuffID.NebulaUpDmg1:
tip = "7.5% increased damage";
break;
@@ -185,10 +189,6 @@ namespace CalamityMod.Buffs
tip += ". Grants immunity to Chilled, Frozen and Glacial State";
break;
case BuffID.Daybreak:
tip = "Incinerated by solar rays";
break;
case BuffID.WellFed:
tip = "Minor improvements to all stats";
break;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

After

Width:  |  Height:  |  Size: 510 B

-1
View File
@@ -19,7 +19,6 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().bBlood = true;
player.GetAttackSpeed<MeleeDamageClass>() += 0.025f;
}
public override void Update(NPC npc, ref int buffIndex)
-25
View File
@@ -1,25 +0,0 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
{
public class DemonFlames : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Demon Flames");
Description.SetDefault("Another burning debuff");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().dFlames < npc.buffTime[buffIndex])
npc.Calamity().dFlames = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 B

+32
View File
@@ -0,0 +1,32 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
{
public class MiracleBlight : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Miracle Blight");
Description.SetDefault("Exotic resonance shreds your corporeal form");
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().miracleBlight = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().miracleBlight < npc.buffTime[buffIndex])
npc.Calamity().miracleBlight = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.Mounts
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Brimrose Mount");
Description.SetDefault("The seat is toasty. That is all");
Description.SetDefault("The seat is toasty. That is all");
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
}
+30
View File
@@ -0,0 +1,30 @@
using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Pets
{
public class EidolonSnailBuff : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Escargidolon Snail");
Description.SetDefault("What a silly little prehistoric snail");
Main.buffNoTimeDisplay[Type] = true;
Main.vanityPet[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.buffTime[buffIndex] = 18000;
player.Calamity().eidolonSnailPet = true;
bool PetProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType<EidolonSnail>()] <= 0;
if (PetProjectileNotSpawned && player.whoAmI == Main.myPlayer)
{
Projectile.NewProjectile(player.GetSource_Buff(buffIndex), player.Center, Vector2.Zero, ModContent.ProjectileType<EidolonSnail>(), 0, 0f, player.whoAmI);
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

+27
View File
@@ -0,0 +1,27 @@
using CalamityMod.Projectiles.Pets;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Pets
{
public class GoldieBuff : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Goldie");
Description.SetDefault("All that glitters is gold");
Main.buffNoTimeDisplay[Type] = true;
Main.lightPet[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.buffTime[buffIndex] = 18000;
player.Calamity().thiefsDime = true;
bool PetProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType<GoldiePet>()] <= 0;
if (PetProjectileNotSpawned && player.whoAmI == Main.myPlayer)
Projectile.NewProjectile(player.GetSource_Buff(buffIndex), player.Center, Vector2.Zero, ModContent.ProjectileType<GoldiePet>(), 0, 0f, player.whoAmI, 50f, 0f);
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 644 B

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 B

After

Width:  |  Height:  |  Size: 524 B

-22
View File
@@ -1,22 +0,0 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class CadancesGrace : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Cadance's Grace");
Description.SetDefault("Your heart is pure");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().cadence = true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 560 B

-22
View File
@@ -1,22 +0,0 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class DraconicSurgeBuff : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Draconic Surge");
Description.SetDefault("The power of a dragon courses through your veins");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().draconicSurge = true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

-22
View File
@@ -1,22 +0,0 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class HolyWrathBuff : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Holy Wrath");
Description.SetDefault("Increased damage and all attacks inflict holy fire");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().holyWrath = true;
}
}
}
-22
View File
@@ -1,22 +0,0 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class PenumbraBuff : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Penumbra");
Description.SetDefault("Stealth regenerates 10% faster while moving and 15% faster while standing still");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().penumbra = true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

-22
View File
@@ -1,22 +0,0 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class ProfanedRageBuff : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Profaned Rage");
Description.SetDefault("Increased critical strike chance");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().profanedRage = true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 378 B

-22
View File
@@ -1,22 +0,0 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class TitanScale : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Titan Scale");
Description.SetDefault("You feel tanky");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().tScale = true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

-22
View File
@@ -1,22 +0,0 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class TriumphBuff : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Triumph");
Description.SetDefault("Enemy contact damage is reduced, the lower their health the greater the reduction");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().triumph = true;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 B

@@ -4,7 +4,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class AbyssalWeapon : ModBuff
public class WeaponImbueBrimstone : ModBuff
{
public override void SetStaticDefaults()
{
@@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.Potions
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().aWeapon = true;
player.Calamity().flaskBrimstone = true;
// A very large number to indicate it's a modded Flask
player.meleeEnchant = CalamityGlobalBuff.ModdedFlaskEnchant;
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 436 B

After

Width:  |  Height:  |  Size: 436 B

@@ -4,7 +4,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class ArmorCrumbling : ModBuff
public class WeaponImbueCrumbling : ModBuff
{
public override void SetStaticDefaults()
{
@@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.Potions
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().armorCrumbling = true;
player.Calamity().flaskCrumbling = true;
// A very large number to indicate it's a modded Flask
player.meleeEnchant = CalamityGlobalBuff.ModdedFlaskEnchant;
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 605 B

After

Width:  |  Height:  |  Size: 605 B

+28
View File
@@ -0,0 +1,28 @@
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class WeaponImbueHolyFlames : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Weapon Imbue: Holy Flames");
Description.SetDefault("Melee, Whip, and Rogue attacks ignite enemies with holy flames");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
Main.meleeBuff[Type] = true;
Main.persistentBuff[Type] = true;
BuffID.Sets.IsAFlaskBuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().flaskHoly = true;
// A very large number to indicate it's a modded Flask
player.meleeEnchant = CalamityGlobalBuff.ModdedFlaskEnchant;
}
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 352 B

-23
View File
@@ -1,23 +0,0 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
{
public class YharimPower : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Yharim's Power");
Description.SetDefault("You feel like you can break the world in two... with your bare hands!");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().yPower = true;
player.GetAttackSpeed<MeleeDamageClass>() += 0.075f;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 689 B

+1 -2
View File
@@ -1,4 +1,4 @@
using Terraria;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
@@ -13,7 +13,6 @@ namespace CalamityMod.Buffs.StatBuffs
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

After

Width:  |  Height:  |  Size: 483 B

+2 -2
View File
@@ -1,4 +1,4 @@
using Terraria;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.StatBuffs
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Chi");
Description.SetDefault("Your next attack is boosted and you are more resilient");
Description.SetDefault("You are more resilient");
Main.buffNoTimeDisplay[Type] = true;
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
+23
View File
@@ -0,0 +1,23 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
{
public class ChiRegenBuff : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Chi");
Description.SetDefault("Life regen increased");
Main.buffNoTimeDisplay[Type] = true;
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().chiRegen = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

+2 -2
View File
@@ -1,4 +1,4 @@
using Terraria;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
@@ -21,7 +21,7 @@ namespace CalamityMod.Buffs.StatBuffs
player.Calamity().encased = true;
if (player.buffTime[buffIndex] == 2)
{
SoundEngine.PlaySound(SoundID.Item27, player.position);
SoundEngine.PlaySound(SoundID.Item27, player.Center);
player.GiveIFrames(90, true);
}
}
-1
View File
@@ -9,7 +9,6 @@ namespace CalamityMod.Buffs.StatBuffs
{
DisplayName.SetDefault("Mushy");
Description.SetDefault("Increased defense and life regen");
Main.buffNoTimeDisplay[Type] = true;
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
+1 -1
View File
@@ -3,7 +3,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
{
class PhantomicEmpowerment : ModBuff
public class PhantomicEmpowerment : ModBuff
{
public override void SetStaticDefaults()
{
+1 -1
View File
@@ -4,7 +4,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
{
class PhantomicRegen : ModBuff
public class PhantomicRegen : ModBuff
{
public override void SetStaticDefaults()
{
+1 -1
View File
@@ -3,7 +3,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
{
class PhantomicShield : ModBuff
public class PhantomicShield : ModBuff
{
public override void SetStaticDefaults()
{
+1 -1
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.StatBuffs
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Polaris Boost");
Description.SetDefault("The Northern Star empowers your weapon");
Description.SetDefault("The Northern Star empowers your life regeneration");
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
+1 -1
View File
@@ -39,7 +39,7 @@ namespace CalamityMod.Buffs.StatBuffs
(enrage ? "\nYour weakened life force fuels your desperate attacks" : "");
}
}
else if (DownedBossSystem.downedSCal && DownedBossSystem.downedExoMechs)
else if (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs)
{
tip = "Your profaned soul is constrained by your insufficient summoning powers";
}
@@ -5,7 +5,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatDebuffs
{
public class TeslaFreeze : ModBuff
public class GalvanicCorrosion : ModBuff
{
public override void SetStaticDefaults()
{
@@ -29,7 +29,7 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().teslaFreeze = true;
player.Calamity().galvanicCorrosion = true;
}
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 580 B

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 B

After

Width:  |  Height:  |  Size: 611 B

+2 -2
View File
@@ -1,4 +1,4 @@
using Terraria;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Whispering Death");
Description.SetDefault("Death approaches; movement speed, attack power and life regen reduced");
Description.SetDefault("Death approaches; attack power and life regen reduced");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
+3 -7
View File
@@ -1,4 +1,4 @@
using CalamityMod.CalPlayer;
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
@@ -20,18 +20,14 @@ namespace CalamityMod.Buffs.Summon
{
CalamityPlayer modPlayer = player.Calamity();
if (player.ownedProjectileCounts[ModContent.ProjectileType<AquaticStarMinion>()] > 0)
{
modPlayer.aStar = true;
}
if (!modPlayer.aStar)
modPlayer.aquaticStar = true;
if (!modPlayer.aquaticStar)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
+3 -7
View File
@@ -1,4 +1,4 @@
using CalamityMod.CalPlayer;
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
@@ -20,18 +20,14 @@ namespace CalamityMod.Buffs.Summon
{
CalamityPlayer modPlayer = player.Calamity();
if (player.ownedProjectileCounts[ModContent.ProjectileType<AstralProbeSummon>()] > 0)
{
modPlayer.aProbe = true;
}
if (!modPlayer.aProbe)
modPlayer.astralProbe = true;
if (!modPlayer.astralProbe)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
+3 -3
View File
@@ -1,4 +1,4 @@
using CalamityMod.CalPlayer;
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
@@ -21,9 +21,9 @@ namespace CalamityMod.Buffs.Summon
CalamityPlayer modPlayer = player.Calamity();
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrittleStarMinion>()] > 0)
{
modPlayer.bStar = true;
modPlayer.brittleStar = true;
}
if (!modPlayer.bStar)
if (!modPlayer.brittleStar)
{
player.DelBuff(buffIndex);
buffIndex--;
-37
View File
@@ -1,37 +0,0 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Typeless;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class GladiatorSwords : ModBuff
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Gladiator Swords");
Description.SetDefault("The gladiator swords will protect you");
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
//Main.persistentBuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
CalamityPlayer modPlayer = player.Calamity();
if (player.ownedProjectileCounts[ModContent.ProjectileType<GladiatorSword>()] > 0)
{
modPlayer.glSword = true;
}
if (!modPlayer.glSword)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

+1 -1
View File
@@ -1,5 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Summon.Umbrella;
using Terraria;
using Terraria.ModLoader;
+1 -1
View File
@@ -34,7 +34,7 @@ namespace CalamityMod.Buffs.Summon
Player player = Main.player[Main.myPlayer];
bool offense = player.Calamity().gOffense;
bool defense = player.Calamity().gDefense;
if (player.Calamity().profanedCrystal && (!player.Calamity().profanedCrystalBuffs && (!DownedBossSystem.downedSCal || !DownedBossSystem.downedExoMechs)))
if (player.Calamity().profanedCrystal && (!player.Calamity().profanedCrystalBuffs && (!DownedBossSystem.downedCalamitas || !DownedBossSystem.downedExoMechs)))
{
tip = "The Profaned Babs will accompany you!";
}
+2 -6
View File
@@ -19,18 +19,14 @@ namespace CalamityMod.Buffs.Summon
{
CalamityPlayer modPlayer = player.Calamity();
if (player.ownedProjectileCounts[ModContent.ProjectileType<SarosAura>()] > 0)
{
modPlayer.radiantResolution = true;
}
if (!modPlayer.radiantResolution)
modPlayer.saros = true;
if (!modPlayer.saros)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
{
player.buffTime[buffIndex] = 18000;
}
}
}
}
+1 -1
View File
@@ -5,7 +5,7 @@ using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
class VoidConcentrationBuff : ModBuff
public class VoidConcentrationBuff : ModBuff
{
public override void SetStaticDefaults()
{
File diff suppressed because it is too large. Load diff
+20 -8
View File
@@ -116,11 +116,11 @@ namespace CalamityMod.CalPlayer
{
VerticalGodslayerDashTimer++;
if (VerticalGodslayerDashTimer >= 25)
{
{
Player.dashDelay = dashDelayToApply;
// Stop the player from going flying
Player.velocity *= 0.2f;
}
// Stop the player from going flying
Player.velocity *= 0.2f;
}
}
if (HasCustomDash)
@@ -206,9 +206,21 @@ namespace CalamityMod.CalPlayer
direction = DashDirection.Directionless;
bool justDashed = false;
if (Player.controlRight && Player.releaseRight)
// If the manual hotkey is bound, standard Terraria dashes cannot be triggered by double tapping.
bool manualHotkeyBound = CalamityKeybinds.DashHotkey.GetAssignedKeys().Count > 0;
bool pressedManualHotkey = CalamityKeybinds.DashHotkey.JustPressed;
bool vanillaRightDashInput = Player.controlRight && Player.releaseRight && !manualHotkeyBound;
bool manualRightDashInput = pressedManualHotkey && Player.direction == 1;
bool executeRightDash = vanillaRightDashInput || manualRightDashInput;
bool vanillaLeftDashInput = Player.controlLeft && Player.releaseLeft && !manualHotkeyBound;
bool manualLeftDashInput = pressedManualHotkey && Player.direction == -1;
bool executeLeftDash = vanillaLeftDashInput || manualLeftDashInput;
if (executeRightDash)
{
if (dashTimeMod > 0)
if (dashTimeMod > 0 || pressedManualHotkey)
{
direction = DashDirection.Right;
justDashed = true;
@@ -217,9 +229,9 @@ namespace CalamityMod.CalPlayer
else
dashTimeMod = 15;
}
else if (Player.controlLeft && Player.releaseLeft)
else if (executeLeftDash)
{
if (dashTimeMod < 0)
if (dashTimeMod < 0 || pressedManualHotkey)
{
direction = DashDirection.Left;
justDashed = true;
+12 -2
View File
@@ -11,8 +11,6 @@ using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Armor.Wulfrum;
namespace CalamityMod.CalPlayer
{
@@ -396,6 +394,18 @@ namespace CalamityMod.CalPlayer
drawInfo.DustCache.Add(dust);
}
}
if (calamityPlayer.miracleBlight)
{
// Violent dust fountain
for (int i = 0; i < 2; ++i)
{
Vector2 dustCorner = Player.position - 2f * Vector2.One;
Vector2 dustVel = Player.velocity + new Vector2(0f, Main.rand.NextFloat(-15f, -12f));
int d = Dust.NewDust(dustCorner, Player.width + 4, Player.height + 4, (int)CalamityDusts.MiracleBlight, dustVel.X, dustVel.Y);
Main.dust[d].noGravity = true;
drawInfo.DustCache.Add(d);
}
}
if (calamityPlayer.pFlames)
{
if (Main.rand.NextBool(4) && drawInfo.shadow == 0f)
+4 -4
View File
@@ -271,7 +271,7 @@ namespace CalamityMod.CalPlayer
biomeCrateList.AddWithCondition<int>(ModContent.ItemType<AstralCrate>(), ZoneAstral);
biomeCrateList.AddWithCondition<int>(ModContent.ItemType<SunkenCrate>(), ZoneSunkenSea);
biomeCrateList.AddWithCondition<int>(ModContent.ItemType<AbyssalCrate>(), canSulphurFish);
biomeCrateList.AddWithCondition<int>(ModContent.ItemType<SulphurousCrate>(), canSulphurFish);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.CorruptFishingCrateHard : ItemID.CorruptFishingCrate, Player.ZoneCorrupt);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.CrimsonFishingCrateHard : ItemID.CrimsonFishingCrate, Player.ZoneCrimson);
biomeCrateList.AddWithCondition<int>(Main.hardMode ? ItemID.HallowedFishingCrateHard : ItemID.HallowedFishingCrate, Player.ZoneHallow);
@@ -319,7 +319,7 @@ namespace CalamityMod.CalPlayer
}
if (canSulphurFish)
{
itemDrop = ModContent.ItemType<AbyssalCrate>();
itemDrop = ModContent.ItemType<SulphurousCrate>();
}
}
return;
@@ -438,7 +438,7 @@ namespace CalamityMod.CalPlayer
}
}
if (Player.FindBuffIndex(BuffID.Gills) > -1 && DownedBossSystem.downedCalamitas && (attempt.legendary || (attempt.veryrare && Main.rand.NextBool())))
if (Player.FindBuffIndex(BuffID.Gills) > -1 && DownedBossSystem.downedCalamitasClone && (attempt.legendary || (attempt.veryrare && Main.rand.NextBool())))
{
itemDrop = ModContent.ItemType<Floodtide>();
}
@@ -581,7 +581,7 @@ namespace CalamityMod.CalPlayer
ModContent.ItemType<BrimstoneFish>(),
ModContent.ItemType<Shadowfish>()
};
uncommonCatches.AddWithCondition<int>(ModContent.ItemType<ChaoticFish>(), Main.hardMode);
uncommonCatches.AddWithCondition<int>(ModContent.ItemType<Havocfish>(), Main.hardMode);
itemDrop = uncommonCatches[Main.rand.Next(uncommonCatches.Count)];
}
else
+60 -38
View File
@@ -3,6 +3,7 @@ using CalamityMod.Buffs.Alcohol;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Cooldowns;
using CalamityMod.Events;
using CalamityMod.NPCs;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.World;
using Microsoft.Xna.Framework;
@@ -167,12 +168,26 @@ namespace CalamityMod.CalPlayer
if (Vector2.Distance(Player.Center.ToTileCoordinates().ToVector2(), closestSafeZone.ToVector2()) < SulphuricWaterSafeZoneSystem.NearbySafeTiles[closestSafeZone] * 17f)
nearSafeZone = true;
}
if (ZoneSulphur && Player.IsUnderwater() && !decayEffigy && !abyssalDivingSuit && !Player.lavaWet && !Player.honeyWet && !nearSafeZone)
float ASPoisonLevel = 0f;
if (CalamityGlobalNPC.aquaticScourge >= 0 && CalamityWorld.getFixedBoi)
{
NPC AS = Main.npc[CalamityGlobalNPC.aquaticScourge];
//if the player is 50 blocks or more away from the head
if (AS.life < AS.lifeMax) //Only poison when damaged
ASPoisonLevel = Utils.GetLerpValue(800f, 1600f, Vector2.Distance(Player.Center, AS.Center), true);
}
bool ASPoisoning = ASPoisonLevel > 0f;
if (ASPoisoning || ((ZoneSulphur || Player.Calamity().ZoneAbyssLayer1) && !Player.creativeGodMode && Player.IsUnderwater() && !decayEffigy && !abyssalDivingSuit && !Player.lavaWet && !Player.honeyWet && !nearSafeZone))
{
float increment = 1f / SulphSeaWaterSafetyTime;
if (sulphurskin)
//No way to mitigate AS Poisoning
if (ASPoisoning)
increment *= 4f + (8f * ASPoisonLevel);
if (sulphurskin && !ASPoisoning)
increment *= 0.5f;
if (sulfurSet)
if (sulfurSet && !ASPoisoning)
increment *= 0.5f;
SulphWaterPoisoningLevel = MathHelper.Clamp(SulphWaterPoisoningLevel + increment, 0f, 1f);
@@ -256,6 +271,15 @@ namespace CalamityMod.CalPlayer
lifeRegenLost += 36;
}
if (miracleBlight)
{
if (Player.lifeRegen > 0)
Player.lifeRegen = 0;
Player.lifeRegenTime = 0;
lifeRegenLost += 40;
}
if (cDepth)
{
if (Player.statDefense > 0)
@@ -321,7 +345,7 @@ namespace CalamityMod.CalPlayer
if (bloodyMary)
{
alcoholPoisonLevel++;
lifeRegenLost += 2;
lifeRegenLost += 4;
}
if (tequila)
{
@@ -331,7 +355,7 @@ namespace CalamityMod.CalPlayer
if (tequilaSunrise)
{
alcoholPoisonLevel++;
lifeRegenLost += 1;
lifeRegenLost += 2;
}
if (screwdriver)
{
@@ -354,12 +378,12 @@ namespace CalamityMod.CalPlayer
if (starBeamRye)
{
alcoholPoisonLevel++;
lifeRegenLost += 1;
lifeRegenLost += 2;
}
if (moscowMule)
{
alcoholPoisonLevel++;
lifeRegenLost += 2;
lifeRegenLost += 4;
}
if (whiteWine)
{
@@ -376,10 +400,7 @@ namespace CalamityMod.CalPlayer
alcoholPoisonLevel++;
}
if (cirrusDress)
alcoholPoisonLevel = 0;
if (alcoholPoisonLevel > 3)
if (alcoholPoisonLevel > (cirrusDress ? 5 : 3))
{
Player.nebulaLevelLife = 0;
@@ -475,6 +496,18 @@ namespace CalamityMod.CalPlayer
}
}
// Permafrost's Concoction increases life regen while afflicted with a fire debuff
if (permafrostsConcoction)
{
if (Player.onFire || Player.onFire2 || Player.onFire3 || Player.burned || shadowflame || weakBrimstoneFlames || bFlames || cragsLava || gsInferno || hFlames || banishingFire || dragonFire)
{
if (Player.lifeRegenTime < 1800)
Player.lifeRegenTime = 1800;
Player.lifeRegen += 6;
}
}
if (celestialJewel || astralArcanum)
{
bool lesserEffect = false;
@@ -608,11 +641,8 @@ namespace CalamityMod.CalPlayer
if (aChicken)
Player.lifeRegen += 1;
if (cadence)
Player.lifeRegen += 5;
if (mushy)
Player.lifeRegen += 1;
Player.lifeRegen += 2;
if (permafrostsConcoction)
{
@@ -622,9 +652,6 @@ namespace CalamityMod.CalPlayer
Player.lifeRegen++;
if (Player.statLife < actualMaxLife / 10)
Player.lifeRegen += 2;
if (Player.poisoned || Player.onFire || bFlames)
Player.lifeRegen += 4;
}
if (tRegen)
@@ -639,6 +666,9 @@ namespace CalamityMod.CalPlayer
if (affliction || afflicted)
Player.lifeRegen += 1;
if (trinketOfChi || chiRegen)
Player.lifeRegen += 2;
if (absorber)
{
if (Player.StandingStill() && Player.itemAnimation == 0)
@@ -680,7 +710,7 @@ namespace CalamityMod.CalPlayer
Player.lifeRegenTime += 1;
}
if (projRefRareLifeRegenCounter > 0)
if (evolutionLifeRegenCounter > 0)
{
Player.lifeRegenTime += 2;
Player.lifeRegen += 2;
@@ -689,7 +719,7 @@ namespace CalamityMod.CalPlayer
if (darkSunRing)
{
if (Main.eclipse || Main.dayTime)
Player.lifeRegen += 3;
Player.lifeRegen += Main.eclipse ? 2 : 4;
}
if (phantomicHeartRegen <= 720 && phantomicHeartRegen >= 600)
@@ -729,7 +759,7 @@ namespace CalamityMod.CalPlayer
if (regenator)
{
Player.lifeRegenTime += 6;
Player.lifeRegenTime += 3;
Player.lifeRegen += 12;
}
if (handWarmer && eskimoSet)
@@ -890,13 +920,16 @@ namespace CalamityMod.CalPlayer
}
}
// The Camper regen boost activates while moving so it can stack with Shiny Stone like effects
if (camper && Player.statLife < actualMaxLife && !Player.StandingStill())
// The Camper counteracts the regen loss while moving horizontally
if (camper && (Player.velocity.X != 0 && Player.grappling[0] <= 0))
{
float camperRegenMult = areThereAnyDamnBosses ? 1.25f : 2f;
int camperRegenCount = areThereAnyDamnBosses ? 1 : 4;
Player.lifeRegen = (int)(Player.lifeRegen * camperRegenMult);
Player.lifeRegenCount += camperRegenCount;
// Vanilla base regen rate which gets boosted when resting
// The first 6 boosts increment every 300 frames, up to 6 at 1800
// Then, the last 3 boosts increment every 600 frames, up to 9 at 3600 which is the cap
int baseRegenRate = Math.Clamp(Player.lifeRegenTime / 300, 0, 6) + Math.Clamp((Player.lifeRegenTime - 1800) / 600, 0, 3);
// Normally 1.25 while resting and 0.5 while not
Player.lifeRegen += (int)(baseRegenRate * 0.75f);
if (Main.rand.Next(30000) < Player.lifeRegenTime || Main.rand.NextBool(2))
{
int regen = Dust.NewDust(Player.position, Player.width, Player.height, 12, 0f, 0f, 200, Color.OrangeRed, 1f);
@@ -949,17 +982,6 @@ namespace CalamityMod.CalPlayer
}
}
}
if (BossRushEvent.BossRushActive && CalamityConfig.Instance.BossRushRegenCurse)
{
if (Player.lifeRegen > 0)
Player.lifeRegen = 0;
Player.lifeRegenTime = 0;
if (Player.lifeRegenCount > 0)
Player.lifeRegenCount = 0;
}
}
#endregion
}
+141 -195
View File
@@ -46,6 +46,7 @@ using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Tiles.Ores;
using CalamityMod.UI;
using CalamityMod.World;
using Microsoft.Xna.Framework;
@@ -62,6 +63,7 @@ using Terraria.ID;
using Terraria.ModLoader;
using ProvidenceBoss = CalamityMod.NPCs.Providence.Providence;
using CalamityMod.Items.Armor.Wulfrum;
using CalamityMod.Tiles.Abyss.AbyssAmbient;
namespace CalamityMod.CalPlayer
{
@@ -75,7 +77,7 @@ namespace CalamityMod.CalPlayer
// Give the player a 24% jump speed boost while wings are equipped, otherwise grant 4% more jump speed so that players can jump 7 tiles high
if (Player.wingsLogic > 0)
Player.jumpSpeedBoost += 1.2f;
else if (CalamityConfig.Instance.HigherJumpHeight)
else if (CalamityConfig.Instance.FasterJumpSpeed)
Player.jumpSpeedBoost += 0.2f;
// Decrease the counter on Fearmonger set turbo regeneration
@@ -91,6 +93,9 @@ namespace CalamityMod.CalPlayer
}
OldPositions[0] = Player.position;
// Tile effects for touching tiles
HandleTileEffects();
// Hurt the nearest NPC to the mouse if using the burning mouse.
if (blazingCursorDamage || blazingCursorVisuals)
HandleBlazingMouseEffects();
@@ -404,7 +409,6 @@ namespace CalamityMod.CalPlayer
#region Adrenaline
// This is how much Adrenaline will be changed by this frame.
float adrenalineDiff = 0;
bool SCalAlive = NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>());
bool wofAndNotHell = Main.wofNPCIndex >= 0 && Player.position.Y < (float)((Main.maxTilesY - 200) * 16);
// If Adrenaline Mode is currently active, you smoothly lose all adrenaline over the duration.
@@ -452,10 +456,6 @@ namespace CalamityMod.CalPlayer
// Stress Pills make Adrenaline charge 20% faster (meaning it takes 83.333% standard time to charge it).
if (stressPills)
adrenalineDiff *= 1.2f;
// In the SCal fight, adrenaline charges 33% slower (meaning it takes 50% longer to fully charge it).
if (SCalAlive)
adrenalineDiff *= 0.67f;
}
@@ -489,6 +489,61 @@ namespace CalamityMod.CalPlayer
#endregion
#region Misc Effects
private void HandleTileEffects()
{
int astralOreID = ModContent.TileType<AstralOre>();
int auricOreID = ModContent.TileType<AuricOre>();
int scoriaOreID = ModContent.TileType<ScoriaOre>();
int abyssKelpID = ModContent.TileType<AbyssKelp>();
int auricRejectionDamage = 300;
float auricRejectionKB = Player.noKnockback ? 20f : 40f;
foreach (Point touchedTile in Collision.GetEntityEdgeTiles(Player))
{
Tile tile = Main.tile[touchedTile];
if (!tile.HasTile || !tile.HasUnactuatedTile)
continue;
if (tile.TileType == abyssKelpID)
{
if (Player.velocity.Length() == 0)
{ return; }
Dust dust;
dust = Main.dust[Dust.NewDust(Player.Center, 16, 16, 304, 0.23255825f, 10f, 0, new Color(117, 55, 15), 1.5116279f)];
dust.noGravity = true;
dust.noLight = true;
dust.fadeIn = 2.5813954f;
}
// Ores below here
// Astral Ore inflicts Astral Infection briefly on contact
if (tile.TileType == astralOreID)
Player.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 2);
// You will need to set each resistant item here for burning as it gets bypassed for somereason
if (tile.TileType == scoriaOreID && !Player.fireWalk)
Player.AddBuff(BuffID.Burning, 2);
// Auric Ore causes an Auric Rejection unless you are wearing Auric Armor
// Auric Rejection causes an electrical explosion that yeets the player a considerable distance
else if (tile.TileType == auricOreID && !auricSet)
{
// Cut grappling hooks so the player is surely thrown
Player.RemoveAllGrapplingHooks();
// Force Auric Ore to animate with its crackling electricity
AuricOre.Animate = true;
var yeetVec = Vector2.Normalize(Player.Center - touchedTile.ToWorldCoordinates());
Player.velocity += yeetVec * auricRejectionKB;
Player.Hurt(PlayerDeathReason.ByCustomReason(Player.name + " was not worthy"), auricRejectionDamage, 0);
Player.AddBuff(BuffID.Electrified, 300);
SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Custom/ExoMechs/TeslaShoot1"));
}
}
}
private void HandleBlazingMouseEffects()
{
// The sigil's brightness slowly fades away every frame if not incinerating anything.
@@ -521,7 +576,10 @@ namespace CalamityMod.CalPlayer
// Create a direct strike to hit this specific NPC.
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<Calamity>()));
Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), sigilDamage, 0f, Player.whoAmI, i);
Projectile sigilStrike = Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), sigilDamage, 0f, Player.whoAmI, i);
// Enable crits by setting the sigil's damage class to be whatever the player's strongest damage class is.
sigilStrike.DamageType = Player.GetBestClass();
// Incinerate the target with Vulnerability Hex.
target.AddBuff(ModContent.BuffType<VulnerabilityHex>(), VulnerabilityHex.CalamityDuration);
@@ -725,7 +783,7 @@ namespace CalamityMod.CalPlayer
if (providenceBurnIntensity > 0.45f)
ProvidenceBurnEffectDrawer.ParticleSpawnRate = 1;
// Otherwise, if the intensity is too weak, but still presernt, cause the player to release holy cinders.
// Otherwise, if the intensity is too weak, but still present, cause the player to release holy cinders.
else if (providenceBurnIntensity > 0f)
{
int cinderCount = (int)MathHelper.Lerp(1f, 4f, Utils.GetLerpValue(0f, 0.45f, providenceBurnIntensity, true));
@@ -745,7 +803,7 @@ namespace CalamityMod.CalPlayer
ProvidenceBurnEffectDrawer.Update();
// Transformer immunity to Electrified
if (aSparkRare)
if (transformer)
Player.buffImmune[BuffID.Electrified] = true;
// Reduce breath meter while in icy water instead of chilling
@@ -939,7 +997,7 @@ namespace CalamityMod.CalPlayer
Player.GetCritChance<GenericDamageClass>() += critUp;
}
bool canProvideBuffs = profanedCrystalBuffs || (!profanedCrystal && pArtifact) || (profanedCrystal && DownedBossSystem.downedSCal && DownedBossSystem.downedExoMechs);
bool canProvideBuffs = profanedCrystalBuffs || (!profanedCrystal && pArtifact) || (profanedCrystal && DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs);
bool attack = Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] > 0;
// Guardian bonuses if not burnt out
@@ -979,6 +1037,36 @@ namespace CalamityMod.CalPlayer
}
}
if (unstableGraniteCore)
{
zapActivity += 1;
if (zapActivity <= 300 && zapActivity % 30 == 0)
{
for (int arcProjCount = 0; arcProjCount < 3; arcProjCount++)
{
float maxDistance = 300f;
int target = -1;
for (int npcIndex = 0; npcIndex < Main.maxNPCs; npcIndex++)
{
NPC npc = Main.npc[npcIndex];
float targetDist = Vector2.Distance(npc.Center, Player.Center);
if (targetDist < maxDistance && npc.Calamity().arcZapCooldown == 0 && npc.CanBeChasedBy())
{
maxDistance = targetDist;
target = npcIndex;
}
}
if (target > 0)
{
unstableSelectedTarget = Main.npc[target];
unstableSelectedTarget.Calamity().arcZapCooldown = 18;
Projectile.NewProjectile(Player.GetSource_FromThis(), new Vector2(Player.Center.X, Player.Center.Y - 20f), new Vector2(0f, -2f), ModContent.ProjectileType<ArcZap>(), 18, 0f, Player.whoAmI, target, 3f);
target = -1;
}
}
}
else if (zapActivity > 600) { zapActivity = 0; }
}
// You always get the max minions, even during the effect of the burnout debuff
if (attack && canProvideBuffs)
Player.maxMinions++;
@@ -1106,14 +1194,12 @@ namespace CalamityMod.CalPlayer
xerocDmg -= 2f;
if (xerocDmg < 0f)
xerocDmg = 0f;
if (aBulwarkRareMeleeBoostTimer > 0)
aBulwarkRareMeleeBoostTimer--;
if (bossRushImmunityFrameCurseTimer > 0)
bossRushImmunityFrameCurseTimer--;
if (hideOfDeusMeleeBoostTimer > 0)
hideOfDeusMeleeBoostTimer--;
if (gaelRageAttackCooldown > 0)
gaelRageAttackCooldown--;
if (projRefRareLifeRegenCounter > 0)
projRefRareLifeRegenCounter--;
if (evolutionLifeRegenCounter > 0)
evolutionLifeRegenCounter--;
if (hurtSoundTimer > 0)
hurtSoundTimer--;
if (icicleCooldown > 0)
@@ -1130,18 +1216,14 @@ namespace CalamityMod.CalPlayer
tornadoCooldown--;
if (ladHearts > 0)
ladHearts--;
if (titanBoost > 0)
titanBoost--;
if (prismaticLasers > 0)
prismaticLasers--;
if (dogTextCooldown > 0)
dogTextCooldown--;
if (titanCooldown > 0)
titanCooldown--;
if (fungalSymbioteTimer > 0)
fungalSymbioteTimer--;
if (aBulwarkRareTimer > 0)
aBulwarkRareTimer--;
if (hideOfDeusTimer > 0)
hideOfDeusTimer--;
if (hellbornBoost > 0)
hellbornBoost--;
if (persecutedEnchantSummonTimer < 1800)
@@ -1176,15 +1258,6 @@ namespace CalamityMod.CalPlayer
reaverRegenCooldown++;
else
reaverRegenCooldown = 0;
if (roverDrive)
{
if (roverDriveTimer < CalamityUtils.SecondsToFrames(30f))
roverDriveTimer++;
if (roverDriveTimer >= CalamityUtils.SecondsToFrames(30f))
roverDriveTimer = 0;
}
else
roverDriveTimer = 616; // Doesn't reset to zero to prevent exploits
if (auralisAurora > 0)
auralisAurora--;
if (auralisAuroraCooldown > 0)
@@ -1388,13 +1461,6 @@ namespace CalamityMod.CalPlayer
if (avertorBonus)
Player.GetDamage<GenericDamageClass>() += 0.1f;
if (roverDriveTimer < 616)
{
Player.statDefense += 15;
if (roverDriveTimer > 606)
Player.statDefense -= roverDriveTimer - 606; //so it scales down when the shield dies
}
// Fairy Boots bonus
if (fairyBoots)
{
@@ -2006,8 +2072,6 @@ namespace CalamityMod.CalPlayer
// New textures
if (Main.netMode != NetmodeID.Server && Player.whoAmI == Main.myPlayer)
{
Asset<Texture2D> sulphSeaRain = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaReplacements/RainSulphSea");
Asset<Texture2D> rainOriginal = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaReplacements/RainOriginal");
Asset<Texture2D> cometShard = ModContent.Request<Texture2D>("CalamityMod/UI/HealthManaTextures/ManaCometShard");
Asset<Texture2D> etherealCore = ModContent.Request<Texture2D>("CalamityMod/UI/HealthManaTextures/ManaEtherealCore");
Asset<Texture2D> phantomHeart = ModContent.Request<Texture2D>("CalamityMod/UI/HealthManaTextures/ManaPhantomHeart");
@@ -2035,13 +2099,6 @@ namespace CalamityMod.CalPlayer
break;
}
if (Main.bloodMoon)
TextureAssets.Rain = rainOriginal;
else if (Main.raining && ZoneSulphur)
TextureAssets.Rain = sulphSeaRain;
else
TextureAssets.Rain = rainOriginal;
if (auricSet)
TextureAssets.FlyingCarpet = carpetAuric;
else
@@ -2056,29 +2113,6 @@ namespace CalamityMod.CalPlayer
// Rogue Stealth
UpdateRogueStealth();
// Trinket of Chi bonus
if (trinketOfChi)
{
if (trinketOfChiBuff)
{
Player.GetDamage<GenericDamageClass>() += 0.5f;
if (Player.itemAnimation > 0)
chiBuffTimer = 0;
}
if (Player.StandingStill(0.1f) && !Player.mount.Active)
{
if (chiBuffTimer < 60)
chiBuffTimer++;
else
Player.AddBuff(ModContent.BuffType<ChiBuff>(), 6);
}
else
chiBuffTimer--;
}
else
chiBuffTimer = 0;
// Aquatic Emblem bonus
if (aquaticEmblem)
{
@@ -2311,25 +2345,11 @@ namespace CalamityMod.CalPlayer
if (astralInjection)
{
if (Player.statMana < Player.statManaMax2)
Player.statMana += 3;
Player.statMana += 2;
if (Player.statMana > Player.statManaMax2)
Player.statMana = Player.statManaMax2;
}
if (holyWrath)
{
if (Player.FindBuffIndex(BuffID.Wrath) > -1)
Player.ClearBuff(BuffID.Wrath);
Player.GetDamage<GenericDamageClass>() += 0.12f;
}
if (profanedRage)
{
if (Player.FindBuffIndex(BuffID.Rage) > -1)
Player.ClearBuff(BuffID.Rage);
Player.GetCritChance<GenericDamageClass>() += ProfanedRagePotion.CritBoost;
}
if (irradiated)
Player.statDefense -= 10;
@@ -2358,30 +2378,16 @@ namespace CalamityMod.CalPlayer
Player.GetCritChance<MeleeDamageClass>() += 10;
}
if (yPower)
// Trinket of Chi bonus
if (trinketOfChi)
{
Player.endurance += 0.04f;
Player.statDefense += 10;
Player.pickSpeed -= 0.1f;
Player.GetDamage<GenericDamageClass>() += 0.05f;
Player.GetCritChance<GenericDamageClass>() += YharimsStimulants.CritBoost;
Player.GetKnockback<SummonDamageClass>() += 1f;
Player.moveSpeed += 0.075f;
}
if (tScale)
{
Player.endurance += 0.05f;
Player.statDefense += 5;
Player.kbBuff = true;
if (titanBoost > 0)
{
Player.statDefense += 20;
Player.endurance += 0.05f;
}
if (chiBuffTimer < TrinketofChi.ChiBuffTimerMax)
chiBuffTimer++;
else
Player.AddBuff(ModContent.BuffType<ChiBuff>(), 6);
}
else
titanBoost = 0;
chiBuffTimer = 0;
if (darkSunRing)
{
@@ -2390,7 +2396,7 @@ namespace CalamityMod.CalPlayer
Player.GetKnockback<SummonDamageClass>() += 1.2f;
Player.pickSpeed -= 0.15f;
if (Main.eclipse || !Main.dayTime)
Player.statDefense += 15;
Player.statDefense += Main.eclipse ? 10 : 20;
}
if (eGauntlet)
@@ -2428,9 +2434,6 @@ namespace CalamityMod.CalPlayer
Player.GetCritChance<GenericDamageClass>() += Vodka.CritBoost;
}
if (grapeBeer)
Player.moveSpeed -= 0.05f;
if (moonshine)
{
Player.statDefense += 10;
@@ -2453,8 +2456,7 @@ namespace CalamityMod.CalPlayer
{
if (Main.bloodMoon)
{
Player.GetDamage<GenericDamageClass>() += 0.15f;
Player.GetCritChance<GenericDamageClass>() += BloodyMary.CritBoost;
Player.GetDamage<GenericDamageClass>() += 0.1f;
Player.moveSpeed += 0.1f;
}
}
@@ -2464,9 +2466,7 @@ namespace CalamityMod.CalPlayer
if (Main.dayTime)
{
Player.statDefense += 5;
Player.GetDamage<GenericDamageClass>() += 0.03f;
Player.GetCritChance<GenericDamageClass>() += Tequila.CritBoost;
Player.endurance += 0.03f;
}
}
@@ -2475,9 +2475,7 @@ namespace CalamityMod.CalPlayer
if (Main.dayTime)
{
Player.statDefense += 10;
Player.GetDamage<GenericDamageClass>() += 0.07f;
Player.GetCritChance<GenericDamageClass>() += TequilaSunrise.CritBoost;
Player.endurance += 0.03f;
}
}
@@ -2503,7 +2501,7 @@ namespace CalamityMod.CalPlayer
}
if (whiteWine)
Player.GetDamage<MagicDamageClass>() += 0.1f;
Player.GetDamage<MagicDamageClass>() += 0.08f;
// Adjustment to the Tipsy debuff
if (Player.tipsy)
@@ -2568,7 +2566,6 @@ namespace CalamityMod.CalPlayer
(soaring ? 0.1 : 0D) +
(prismaticGreaves ? 0.1 : 0D) +
(plagueReaper ? 0.05 : 0D) +
(draconicSurge ? 0.2 : 0D) +
(Player.empressBrooch ? 0.25 : 0D);
if (harpyRing)
@@ -2577,15 +2574,6 @@ namespace CalamityMod.CalPlayer
if (blueCandle)
Player.moveSpeed += 0.1f;
// If the player has the Draconic Elixir cooldown, prevent Draconic Surge from being set as true by any means.
// This can be caused by other mod interference, e.g. by Luiafk.
if (Player.HasCooldown(Cooldowns.DraconicElixir.ID))
{
draconicSurge = false;
if (Player.FindBuffIndex(ModContent.BuffType<DraconicSurgeBuff>()) > -1)
Player.ClearBuff(ModContent.BuffType<DraconicSurgeBuff>());
}
// TODO -- crit is a float now, and knockback can be boosted for all classes
if (community)
{
@@ -2621,8 +2609,7 @@ namespace CalamityMod.CalPlayer
if (vHex)
{
Player.blind = true;
Player.statDefense -= 10;
Player.moveSpeed -= 0.1f;
Player.statDefense -= 20;
if (Player.wingTimeMax < 0)
Player.wingTimeMax = 0;
@@ -2660,7 +2647,7 @@ namespace CalamityMod.CalPlayer
}
if (mushy)
Player.statDefense += 5;
Player.statDefense += 6;
if (omniscience)
{
@@ -2682,57 +2669,16 @@ namespace CalamityMod.CalPlayer
Player.lifeMagnet = true;
}
if (cadence)
{
if (Player.FindBuffIndex(BuffID.Regeneration) > -1)
Player.ClearBuff(BuffID.Regeneration);
if (Player.FindBuffIndex(BuffID.Lifeforce) > -1)
Player.ClearBuff(BuffID.Lifeforce);
Player.lifeMagnet = true;
}
if (Player.poisoned)
Player.moveSpeed -= 0.1f;
if (Player.venom)
Player.moveSpeed -= 0.15f;
if (wDeath)
{
Player.GetDamage<GenericDamageClass>() -= 0.2f;
Player.moveSpeed -= 0.1f;
}
if (dragonFire)
Player.moveSpeed -= 0.15f;
if (hInferno)
Player.moveSpeed -= 0.25f;
if (gsInferno)
Player.moveSpeed -= 0.15f;
Player.GetDamage<GenericDamageClass>() -= 0.25f;
if (astralInfection)
{
Player.GetDamage<GenericDamageClass>() -= 0.1f;
Player.moveSpeed -= 0.15f;
}
Player.GetDamage<GenericDamageClass>() -= 0.15f;
if (pFlames)
{
Player.blind = true;
Player.GetDamage<GenericDamageClass>() -= 0.1f;
Player.moveSpeed -= 0.15f;
}
if (bBlood)
{
Player.blind = true;
Player.statDefense -= 3;
Player.moveSpeed += 0.1f;
Player.GetDamage<MeleeDamageClass>() += 0.05f;
Player.GetDamage<RangedDamageClass>() -= 0.1f;
Player.GetDamage<MagicDamageClass>() -= 0.1f;
Player.GetDamage<GenericDamageClass>() -= 0.15f;
}
if (aCrunch && !laudanum)
@@ -2765,7 +2711,7 @@ namespace CalamityMod.CalPlayer
if (eFreeze || eutrophication)
Player.velocity = Vector2.Zero;
if (vaporfied || teslaFreeze)
if (vaporfied || galvanicCorrosion)
Player.velocity *= 0.98f;
if (molluskSet)
@@ -3079,11 +3025,11 @@ namespace CalamityMod.CalPlayer
if (eArtifact)
{
Player.manaCost *= 0.85f;
Player.maxMinions += 2;
Player.manaCost *= 0.75f;
Player.maxMinions++;
}
if (gArtifact && Player.FindBuffIndex(ModContent.BuffType<FieryDraconidBuff>()) != -1)
if (auricSArtifact && Player.FindBuffIndex(ModContent.BuffType<FieryDraconidBuff>()) != -1)
Player.maxMinions += Player.ownedProjectileCounts[ModContent.ProjectileType<FieryDraconid>()];
if (pArtifact)
@@ -3099,23 +3045,23 @@ namespace CalamityMod.CalPlayer
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianHealer>()] < guardianAmt)
Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -6f, ModContent.ProjectileType<MiniGuardianHealer>(), 0, 0f, Main.myPlayer, 0f, 0f);
gDefense = true;
gDefense = true;
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] < guardianAmt)
{
int guardian = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -3f, ModContent.ProjectileType<MiniGuardianDefense>(), 1, 1f, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(guardian))
Main.projectile[guardian].originalDamage = 1;
}
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianDefense>()] < guardianAmt)
{
int guardian = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -3f, ModContent.ProjectileType<MiniGuardianDefense>(), 1, 1f, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(guardian))
Main.projectile[guardian].originalDamage = 1;
}
gOffense = true;
gOffense = true;
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] < guardianAmt)
{
int guardian = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -1f, ModContent.ProjectileType<MiniGuardianAttack>(), 1, 1f, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(guardian))
Main.projectile[guardian].originalDamage = 1;
}
if (Player.ownedProjectileCounts[ModContent.ProjectileType<MiniGuardianAttack>()] < guardianAmt)
{
int guardian = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, 0f, -1f, ModContent.ProjectileType<MiniGuardianAttack>(), 1, 1f, Main.myPlayer, 0f, 0f);
if (Main.projectile.IndexInRange(guardian))
Main.projectile[guardian].originalDamage = 1;
}
}
}
@@ -3292,7 +3238,7 @@ namespace CalamityMod.CalPlayer
}
}
if (CryoStone)
if (CryoStone || CryoStoneVanity)
{
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<CryoStone>()));
int damage = (int)Player.GetBestClassDamage().ApplyTo(70);
@@ -3634,8 +3580,8 @@ namespace CalamityMod.CalPlayer
ref int lostDef = ref bloodflareCoreLostDefense;
if (lostDef > 0)
{
// Defense regeneration occurs every four frames while defense is missing
if (Player.miscCounter % 4 == 0)
// Defense regeneration occurs every six frames while defense is missing
if (Player.miscCounter % 6 == 0)
{
--lostDef;
if (bloodflareCore)
+97 -155
View File
@@ -62,12 +62,17 @@ namespace CalamityMod.CalPlayer
if (flamingItemEnchant)
target.AddBuff(BuffType<VulnerabilityHex>(), VulnerabilityHex.AflameDuration);
target.Calamity().IncreasedColdEffects_EskimoSet = eskimoSet;
target.Calamity().IncreasedColdEffects_CryoStone = CryoStone;
target.Calamity().IncreasedElectricityEffects_Transformer = transformer;
target.Calamity().IncreasedHeatEffects_Fireball = fireball;
target.Calamity().IncreasedHeatEffects_CinnamonRoll = cinnamonRoll;
target.Calamity().IncreasedHeatEffects_HellfireTreads = hellfireTreads;
target.Calamity().IncreasedColdEffects_EskimoSet = eskimoSet;
target.Calamity().IncreasedSicknessEffects_ToxicHeart = toxicHeart;
target.Calamity().IncreasedSicknessAndWaterEffects_EvergreenGin = evergreenGin;
@@ -122,11 +127,6 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType<WhisperingDeath>(), 120);
break;
case ItemID.Excalibur:
case ItemID.TrueExcalibur:
target.AddBuff(BuffType<HolyFlames>(), 120);
break;
case ItemID.FieryGreatsword:
case ItemID.MoltenPickaxe:
case ItemID.MoltenHamaxe:
@@ -141,7 +141,6 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffID.Poisoned, 240);
break;
case ItemID.LightsBane:
case ItemID.NightsEdge:
target.AddBuff(BuffID.ShadowFlame, 120);
break;
@@ -151,10 +150,6 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffID.ShadowFlame, 120);
break;
case ItemID.BloodButcherer:
target.AddBuff(BuffType<BurningBlood>(), 60);
break;
case ItemID.IceSickle:
case ItemID.Frostbrand:
target.AddBuff(BuffID.Frostburn, 300);
@@ -211,11 +206,16 @@ namespace CalamityMod.CalPlayer
if (witheringWeaponEnchant)
witheringDamageDone += (int)(damage * (crit ? 2D : 1D));
cgn.IncreasedColdEffects_EskimoSet = eskimoSet;
cgn.IncreasedColdEffects_CryoStone = CryoStone;
cgn.IncreasedElectricityEffects_Transformer = transformer;
cgn.IncreasedHeatEffects_Fireball = fireball;
cgn.IncreasedHeatEffects_CinnamonRoll = cinnamonRoll;
cgn.IncreasedHeatEffects_HellfireTreads = hellfireTreads;
cgn.IncreasedColdEffects_EskimoSet = eskimoSet;
cgn.IncreasedSicknessEffects_ToxicHeart = toxicHeart;
cgn.IncreasedSicknessAndWaterEffects_EvergreenGin = evergreenGin;
@@ -254,21 +254,8 @@ namespace CalamityMod.CalPlayer
Player.HealEffect(2);
break;
case ProjectileID.TheRottedFork:
case ProjectileID.TheMeatball:
case ProjectileID.CrimsonYoyo:
case ProjectileID.BloodCloudRaining:
case ProjectileID.BloodRain:
target.AddBuff(BuffType<BurningBlood>(), 60);
break;
case ProjectileID.BallOHurt:
case ProjectileID.CorruptYoyo:
target.AddBuff(BuffID.ShadowFlame, 60);
break;
case ProjectileID.ObsidianSwordfish:
target.AddBuff(BuffID.OnFire, 180);
target.AddBuff(BuffID.OnFire3, 180);
break;
case ProjectileID.Flamelash:
@@ -298,12 +285,7 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType<WhisperingDeath>(), 60);
break;
case ProjectileID.LightBeam:
case ProjectileID.Gungnir:
case ProjectileID.PaladinsHammerFriendly:
target.AddBuff(BuffType<HolyFlames>(), 120);
break;
// TODO -- REMOVE IN 1.4.4 LABOR OF LOVE PORT
case ProjectileID.DarkLance:
target.AddBuff(BuffID.ShadowFlame, 120);
break;
@@ -349,7 +331,6 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffID.Frostburn, 120);
break;
case ProjectileID.SnowBallFriendly:
case ProjectileID.IceBolt:
case ProjectileID.FrostDaggerfish:
case ProjectileID.FrostburnArrow:
@@ -437,11 +418,6 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType<WhisperingDeath>(), 120);
break;
case ItemID.Excalibur:
case ItemID.TrueExcalibur:
target.AddBuff(BuffType<HolyFlames>(), 120);
break;
case ItemID.FieryGreatsword:
case ItemID.MoltenPickaxe:
case ItemID.MoltenHamaxe:
@@ -456,7 +432,6 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffID.Poisoned, 240);
break;
case ItemID.LightsBane:
case ItemID.NightsEdge:
target.AddBuff(BuffType<Shadowflame>(), 120);
break;
@@ -466,10 +441,6 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType<Shadowflame>(), 120);
break;
case ItemID.BloodButcherer:
target.AddBuff(BuffType<BurningBlood>(), 60);
break;
case ItemID.IceSickle:
case ItemID.Frostbrand:
target.AddBuff(BuffID.Frostburn, 300);
@@ -508,12 +479,8 @@ namespace CalamityMod.CalPlayer
Player.HealEffect(2);
break;
case ProjectileID.TheRottedFork:
target.AddBuff(BuffType<BurningBlood>(), 60);
break;
case ProjectileID.ObsidianSwordfish:
target.AddBuff(BuffID.OnFire, 180);
target.AddBuff(BuffID.OnFire3, 180);
break;
case ProjectileID.Flamelash:
@@ -543,12 +510,7 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType<WhisperingDeath>(), 60);
break;
case ProjectileID.LightBeam:
case ProjectileID.Gungnir:
case ProjectileID.PaladinsHammerFriendly:
target.AddBuff(BuffType<HolyFlames>(), 120);
break;
// TODO -- REMOVE IN 1.4.4 LABOR OF LOVE PORT
case ProjectileID.DarkLance:
target.AddBuff(BuffType<Shadowflame>(), 120);
break;
@@ -594,7 +556,6 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffID.Frostburn, 120);
break;
case ProjectileID.SnowBallFriendly:
case ProjectileID.IceBoomerang:
case ProjectileID.IceBolt:
case ProjectileID.FrostDaggerfish:
@@ -632,22 +593,13 @@ namespace CalamityMod.CalPlayer
if (npcCheck)
{
if (item.CountsAsClass<MeleeDamageClass>() && aBulwarkRare && aBulwarkRareTimer == 0)
if (item.CountsAsClass<MeleeDamageClass>() && hideOfDeus && hideOfDeusTimer == 0)
{
aBulwarkRareTimer = 10;
hideOfDeusTimer = 10;
int bulwarkStarDamage = (int)Player.GetTotalDamage<MeleeDamageClass>().ApplyTo(320);
for (int n = 0; n < 3; n++)
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileType<AstralStar>(), bulwarkStarDamage, 5f, Player.whoAmI);
}
if (unstableGraniteCore && crit && Player.ownedProjectileCounts[ProjectileType<UnstableSpark>()] < 5)
{
for (int s = 0; s < 3; s++)
{
Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f);
int graniteSparkDamage = (int)Player.GetBestClassDamage().ApplyTo(15);
Projectile.NewProjectile(source, position, velocity, ProjectileType<UnstableSpark>(), graniteSparkDamage, 0f, Player.whoAmI);
}
}
if (astralStarRain && crit && astralStarRainCooldown <= 0)
{
astralStarRainCooldown = 60;
@@ -656,7 +608,8 @@ namespace CalamityMod.CalPlayer
int projectileType = Utils.SelectRandom(Main.rand, new int[]
{
ProjectileType<AstralStar>(),
ProjectileID.HallowStar,
ProjectileID.BeeCloakStar,
ProjectileID.StarCloakStar,
ProjectileType<FallenStarProj>()
});
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(120);
@@ -669,7 +622,6 @@ namespace CalamityMod.CalPlayer
if (item.CountsAsClass<MeleeDamageClass>())
{
titanBoost = 600;
if (npcCheck)
{
if (ataxiaGeyser && Player.ownedProjectileCounts[ProjectileType<ChaoticGeyser>()] < 3)
@@ -726,17 +678,6 @@ namespace CalamityMod.CalPlayer
if (npcCheck)
{
if (unstableGraniteCore && crit && Player.ownedProjectileCounts[ProjectileType<UnstableSpark>()] < 5 && proj.type != ProjectileType<UnstableSpark>())
{
for (int s = 0; s < 3; s++)
{
Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f);
int graniteSparkDamage = (int)Player.GetBestClassDamage().ApplyTo(15);
Projectile.NewProjectile(source, position, velocity, ProjectileType<UnstableSpark>(), graniteSparkDamage, 0f, Player.whoAmI);
Player.ownedProjectileCounts[ProjectileType<UnstableSpark>()]++;
}
}
if (astralStarRain && crit && astralStarRainCooldown <= 0)
{
astralStarRainCooldown = 60;
@@ -745,7 +686,8 @@ namespace CalamityMod.CalPlayer
int projectileType = Utils.SelectRandom(Main.rand, new int[]
{
ProjectileType<AstralStar>(),
ProjectileID.HallowStar,
ProjectileID.BeeCloakStar,
ProjectileID.StarCloakStar,
ProjectileType<FallenStarProj>()
});
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(120);
@@ -776,7 +718,6 @@ namespace CalamityMod.CalPlayer
if (proj.IsTrueMelee())
{
titanBoost = 600;
if (soaring)
{
double useTimeMultiplier = 0.85 + (heldItem.useTime * heldItem.useAnimation / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost
@@ -791,9 +732,9 @@ namespace CalamityMod.CalPlayer
if (Player.wingTime > Player.wingTimeMax)
Player.wingTime = Player.wingTimeMax;
}
if (aBulwarkRare && aBulwarkRareTimer == 0)
if (hideOfDeus && hideOfDeusTimer == 0)
{
aBulwarkRareTimer = 10;
hideOfDeusTimer = 10;
int bulwarkStarDamage = (int)Player.GetTotalDamage<MeleeDamageClass>().ApplyTo(320);
for (int n = 0; n < 3; n++)
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileType<AstralStar>(), bulwarkStarDamage, 5f, Player.whoAmI);
@@ -890,7 +831,7 @@ namespace CalamityMod.CalPlayer
if (silvaMage && silvaMageCooldown <= 0 && (proj.penetrate == 1 || proj.timeLeft <= 5))
{
silvaMageCooldown = 300;
SoundEngine.PlaySound(SoundID.Zombie103 , proj.position); //So scuffed, just because zombie sounds werent ported normally
SoundEngine.PlaySound(SoundID.Zombie103 , proj.Center); //So scuffed, just because zombie sounds werent ported normally
// Silva Mage Blasts: 800 + 60%, softcap on the whole combined thing starts at 1400
int silvaBurstDamage = CalamityUtils.DamageSoftCap(800.0 + 0.6 * proj.damage, 1400);
Projectile.NewProjectile(source, proj.Center, Vector2.Zero, ProjectileType<SilvaBurst>(), silvaBurstDamage, 8f, Player.whoAmI);
@@ -1070,13 +1011,14 @@ namespace CalamityMod.CalPlayer
break;
}
}
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(300);
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(180);
int projectileIndex = Projectile.NewProjectile(spawnSource, projTileX * 16 + 8, projTileY * 16 - 24, 0f, 0f, ProjectileType<InfernadoFriendly>(), damage, 15f, Main.myPlayer, 16f, 16f);
if (projectileIndex.WithinBounds(Main.maxProjectiles))
{
Main.projectile[projectileIndex].DamageType = DamageClass.Generic;
Main.projectile[projectileIndex].netUpdate = true;
Main.projectile[projectileIndex].localNPCHitCooldown = 10;
Main.projectile[projectileIndex].usesIDStaticNPCImmunity = true;
Main.projectile[projectileIndex].idStaticNPCHitCooldown = 30;
}
}
@@ -1226,7 +1168,7 @@ namespace CalamityMod.CalPlayer
if (type != -1)
{
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(30);
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(24);
float speed = Main.rand.NextFloat(5f, 11f);
int cloud = Projectile.NewProjectile(spawnSource, position, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * speed, type, damage, proj.knockBack, Player.whoAmI);
if (cloud.WithinBounds(Main.maxProjectiles))
@@ -1270,8 +1212,8 @@ namespace CalamityMod.CalPlayer
for (int s = 0; s < 3; s++)
{
Vector2 velocity = CalamityUtils.RandomVelocity(50f, 30f, 60f);
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(10);
int spark = Projectile.NewProjectile(spawnSource, position, velocity, ProjectileType<Spark>(), damage, 0f, Player.whoAmI);
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(9);
int spark = Projectile.NewProjectile(spawnSource, position, velocity, ProjectileType<EGloveSpark>(), damage, 0f, Player.whoAmI);
if (spark.WithinBounds(Main.maxProjectiles))
{
Main.projectile[spark].DamageType = DamageClass.Generic;
@@ -1288,16 +1230,13 @@ namespace CalamityMod.CalPlayer
#region Debuffs
public void NPCDebuffs(NPC target, bool melee, bool ranged, bool magic, bool summon, bool rogue, bool whip, bool proj)
{
if (melee) //prevents Deep Sea Dumbell from snagging true melee debuff memes
if (melee) // Prevents Deep Sea Dumbell from snagging true melee debuff memes
{
if (eGauntlet)
{
int duration = 300;
target.AddBuff(BuffID.OnFire, duration, false);
target.AddBuff(BuffID.Frostburn, duration, false);
target.AddBuff(BuffType<HolyFlames>(), duration, false);
CalamityUtils.Inflict246DebuffsNPC(target, BuffID.OnFire3);
}
if (cryogenSoul || frostFlare)
if (cryogenSoul)
{
CalamityUtils.Inflict246DebuffsNPC(target, BuffID.Frostburn);
}
@@ -1312,13 +1251,17 @@ namespace CalamityMod.CalPlayer
}
if (melee || rogue || whip)
{
if (armorCrumbling)
if (flaskCrumbling)
{
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<ArmorCrunch>());
}
if (aWeapon)
if (flaskBrimstone)
{
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<BrimstoneFlames>());
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<BrimstoneFlames>(), 4f);
}
if (flaskHoly)
{
target.AddBuff(BuffType<HolyFlames>(), 180, false);
}
}
if (rogue)
@@ -1397,6 +1340,10 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType<Irradiated>(), 180);
}
}
if (voidOfExtinction)
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<BrimstoneFlames>());
if (frostFlare)
CalamityUtils.Inflict246DebuffsNPC(target, BuffID.Frostburn2);
if (omegaBlueChestplate)
target.AddBuff(BuffType<CrushDepth>(), 180);
if (sulfurSet)
@@ -1405,25 +1352,16 @@ namespace CalamityMod.CalPlayer
{
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<CrushDepth>());
}
if (dsSetBonus)
{
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<DemonFlames>());
}
if (alchFlask)
{
CalamityUtils.Inflict246DebuffsNPC(target, BuffType<Plague>());
}
if (holyWrath)
{
target.AddBuff(BuffType<HolyFlames>(), 180, false);
}
if (vexation)
{
if ((Player.armor[0].type == ItemType<ReaverHeadTank>() || Player.armor[0].type == ItemType<ReaverHeadExplore>() ||
Player.armor[0].type == ItemType<ReaverHeadMobility>()) && Player.armor[1].type == ItemType<ReaverScaleMail>() &&
Player.armor[2].type == ItemType<ReaverCuisses>())
{
target.AddBuff(BuffID.CursedInferno, 90, false);
target.AddBuff(BuffID.Venom, 120, false);
}
}
@@ -1434,36 +1372,30 @@ namespace CalamityMod.CalPlayer
if (melee)
{
if (eGauntlet)
{
int duration = 300;
target.AddBuff(BuffID.OnFire, duration, false);
target.AddBuff(BuffID.Frostburn, duration, false);
target.AddBuff(BuffType<HolyFlames>(), duration, false);
}
if (cryogenSoul || frostFlare)
{
CalamityUtils.Inflict246DebuffsPvp(target, BuffID.OnFire3);
if (cryogenSoul)
CalamityUtils.Inflict246DebuffsPvp(target, BuffID.Frostburn);
}
if (yInsignia)
{
CalamityUtils.Inflict246DebuffsPvp(target, BuffType<HolyFlames>());
}
if (ataxiaFire)
{
CalamityUtils.Inflict246DebuffsPvp(target, BuffID.OnFire, 4f);
}
}
if (melee || rogue || whip)
{
if (armorCrumbling)
{
if (flaskCrumbling)
CalamityUtils.Inflict246DebuffsPvp(target, BuffType<ArmorCrunch>());
}
if (aWeapon)
{
CalamityUtils.Inflict246DebuffsPvp(target, BuffType<BrimstoneFlames>());
}
if (flaskBrimstone)
CalamityUtils.Inflict246DebuffsPvp(target, BuffType<BrimstoneFlames>(), 4f);
if (flaskHoly)
target.AddBuff(BuffType<HolyFlames>(), 180, false);
}
if (rogue)
{
switch (Player.meleeEnchant)
@@ -1487,44 +1419,34 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false);
break;
}
if (titanHeartMask)
{
target.AddBuff(BuffType<AstralInfectionDebuff>(), 120);
}
if (corrosiveSpine)
{
target.AddBuff(BuffID.Poisoned, 240);
}
target.AddBuff(BuffID.Venom, 240);
}
if (summon)
{
if (pArtifact && !profanedCrystal)
{
target.AddBuff(BuffType<HolyFlames>(), 300);
}
if (profanedCrystalBuffs)
{
target.AddBuff(Main.dayTime ? BuffType<HolyFlames>() : BuffType<Nightwither>(), 600);
}
if (holyMinions)
{
target.AddBuff(BuffType<HolyFlames>(), 180);
}
if (shadowMinions)
{
target.AddBuff(BuffID.ShadowFlame, 180);
}
if (voltaicJelly)
{
//100% chance for Star Tainted Generator or Nucleogenesis
//20% chance for Voltaic Jelly
// 100% chance for Star Tainted Generator or Nucleogenesis
// 20% chance for Voltaic Jelly
if (Main.rand.NextBool(starTaintedGenerator ? 1 : 5))
{
target.AddBuff(BuffID.Electrified, 60);
}
}
if (starTaintedGenerator)
@@ -1533,29 +1455,31 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType<Irradiated>(), 180);
}
}
if (voidOfExtinction)
CalamityUtils.Inflict246DebuffsPvp(target, BuffType<BrimstoneFlames>());
if (frostFlare)
CalamityUtils.Inflict246DebuffsPvp(target, BuffID.Frostburn2);
if (omegaBlueChestplate)
target.AddBuff(BuffType<CrushDepth>(), 180);
if (sulfurSet)
target.AddBuff(BuffID.Poisoned, 120);
if (alchFlask)
{
CalamityUtils.Inflict246DebuffsPvp(target, BuffType<Plague>());
}
if (abyssalAmulet)
{
CalamityUtils.Inflict246DebuffsPvp(target, BuffType<CrushDepth>());
}
if (holyWrath)
{
target.AddBuff(BuffType<HolyFlames>(), 180, false);
}
if (vexation)
{
if ((Player.armor[0].type == ItemType<ReaverHeadTank>() || Player.armor[0].type == ItemType<ReaverHeadExplore>() ||
Player.armor[0].type == ItemType<ReaverHeadMobility>()) && Player.armor[1].type == ItemType<ReaverScaleMail>() &&
Player.armor[2].type == ItemType<ReaverCuisses>())
{
target.AddBuff(BuffID.CursedInferno, 90, false);
target.AddBuff(BuffID.Venom, 120, false);
}
}
@@ -1604,10 +1528,16 @@ namespace CalamityMod.CalPlayer
}
}
if (gladiatorSword && !target.SpawnedFromStatue && target.life <= 0 && !target.CountsAsACritter && !target.dontCountMe && target.aiStyle != 9 && target.Calamity().gladiatorOnKill)
{
target.Calamity().gladiatorOnKill = false;
Projectile.NewProjectile(Player.GetSource_FromThis(), target.Center.X, target.Center.Y, target.velocity.X / 2, target.velocity.Y / 2, ModContent.ProjectileType<GladiatorHealOrb>(), 0, 0f);
}
if (Main.player[Main.myPlayer].lifeSteal > 0f && target.canGhostHeal && !Player.moonLeech)
{
// Increases the degree to which Spectre Healing set contributes to the lifesteal cap
if (Player.ghostHeal)
if (Player.ghostHeal && proj.CountsAsClass<MagicDamageClass>())
{
float cooldownMult = 0.2f;
cooldownMult -= proj.numHits * 0.05f;
@@ -1628,17 +1558,23 @@ namespace CalamityMod.CalPlayer
Main.player[Main.myPlayer].lifeSteal -= cooldown;
}
if (vampiricTalisman && proj.CountsAsClass<ThrowingDamageClass>() && crit)
if (vampiricTalisman && proj.CountsAsClass<RogueDamageClass>() && crit)
{
float heal = MathHelper.Clamp(damage * 0.011f, 0f, 5f);
if ((int)heal > 0)
{
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, heal, ProjectileID.VampireHeal, 1200f, 3f);
float cooldown = heal * 2f;
Main.player[Main.myPlayer].lifeSteal -= cooldown;
}
}
if (bloodyGlove && proj.CountsAsClass<RogueDamageClass>() && modProj.stealthStrike)
{
float cooldown = 20;
Player.statLife += 2;
Player.HealEffect(2);
Main.player[Main.myPlayer].lifeSteal -= cooldown;
}
if ((target.damage > 5 || target.boss) && !target.SpawnedFromStatue)
@@ -1838,6 +1774,12 @@ namespace CalamityMod.CalPlayer
}
}
if (gladiatorSword && !target.SpawnedFromStatue && target.life <= 0 && !target.CountsAsACritter && !target.dontCountMe && target.aiStyle != 9 && target.Calamity().gladiatorOnKill)
{
target.Calamity().gladiatorOnKill = false;
Projectile.NewProjectile(Player.GetSource_FromThis(), target.Center.X, target.Center.Y, target.velocity.X / 2, target.velocity.Y / 2, ModContent.ProjectileType<GladiatorHealOrb>(), 0, 0f);
}
if (reaverDefense)
{
if (Main.player[Main.myPlayer].lifeSteal > 0f && target.canGhostHeal && !Player.moonLeech)
-2
View File
@@ -82,9 +82,7 @@ namespace CalamityMod.CalPlayer.Dashes
hitContext.Damage = (int)player.GetTotalDamage<MeleeDamageClass>().ApplyTo(300f);
int supremeExplosionDamage = (int)player.GetBestClassDamage().ApplyTo(135);
int holyEruptionDamage = (int)player.GetBestClassDamage().ApplyTo(90);
Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<HolyExplosionSupreme>(), supremeExplosionDamage, 20f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<HolyEruption>(), holyEruptionDamage, 5f, Main.myPlayer, 0f, 0f);
npc.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
}
}
+2
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Enums;
using CalamityMod.Items.Accessories;
using CalamityMod.Projectiles.Typeless;
@@ -72,6 +73,7 @@ namespace CalamityMod.CalPlayer.Dashes
int holyExplosionDamage = (int)player.GetBestClassDamage().ApplyTo(60);
Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<HolyExplosion>(), holyExplosionDamage, 15f, Main.myPlayer, 0f, 0f);
npc.AddBuff(ModContent.BuffType<HolyFlames>(), 180);
}
}
}
+2 -2
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Enums;
using CalamityMod.Items.Accessories;
using CalamityMod.Projectiles.Typeless;
@@ -74,9 +75,8 @@ namespace CalamityMod.CalPlayer.Dashes
hitContext.Damage = (int)player.GetTotalDamage<MeleeDamageClass>().ApplyTo(250f);
int supremeExplosionDamage = (int)player.GetBestClassDamage().ApplyTo(120);
int holyEruptionDamage = (int)player.GetBestClassDamage().ApplyTo(80);
Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<HolyExplosionSupreme>(), supremeExplosionDamage, 15f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<HolyEruption>(), holyEruptionDamage, 5f, Main.myPlayer, 0f, 0f);
npc.AddBuff(ModContent.BuffType<HolyFlames>(), 300);
}
}
}
Loaded 100 of 3367 files, more files were not shown because too many files have changed in this diff. Show more