Merge branch '1.4.4' into Dialogue-Display-UI
No files matched your search
@@ -56,6 +56,55 @@ namespace CalamityMod.Backgrounds
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>())))
|
||||
{
|
||||
int drawLimitX = Main.screenWidth / 16;
|
||||
int drawLimitY = Main.screenHeight / 16;
|
||||
Point drawPoint = (Main.screenPosition / 16).ToPoint();
|
||||
for (int i = 0; i < drawLimitX; i++)
|
||||
{
|
||||
for (int j = 0; j < drawLimitY; j++)
|
||||
{
|
||||
Point pos = drawPoint + new Point(i, j);
|
||||
if (!Main.tile[pos.X, pos.Y].HasTile &&
|
||||
Main.tile[pos.X, pos.Y].WallType == 0 &&
|
||||
Main.tile[pos.X, pos.Y].LiquidAmount == 0)
|
||||
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.PolypForestBiome>())))
|
||||
{
|
||||
int drawLimitX = Main.screenWidth / 16;
|
||||
int drawLimitY = Main.screenHeight / 16;
|
||||
Point drawPoint = (Main.screenPosition / 16).ToPoint();
|
||||
for (int i = 0; i < drawLimitX; i++)
|
||||
{
|
||||
for (int j = 0; j < drawLimitY; j++)
|
||||
{
|
||||
Point pos = drawPoint + new Point(i, j);
|
||||
if (!Main.tile[pos.X, pos.Y].HasTile &&
|
||||
Main.tile[pos.X, pos.Y].WallType == 0)
|
||||
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.RadiantReefsBiome>())))
|
||||
{
|
||||
int drawLimitX = Main.screenWidth / 16;
|
||||
int drawLimitY = Main.screenHeight / 16;
|
||||
Point drawPoint = (Main.screenPosition / 16).ToPoint();
|
||||
for (int i = 0; i < drawLimitX; i++)
|
||||
{
|
||||
for (int j = 0; j < drawLimitY; j++)
|
||||
{
|
||||
Point pos = drawPoint + new Point(i, j);
|
||||
if (!Main.tile[pos.X, pos.Y].HasTile &&
|
||||
Main.tile[pos.X, pos.Y].WallType == 0)
|
||||
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawToTarget(On_Main.orig_CheckMonoliths orig)
|
||||
@@ -73,6 +122,7 @@ namespace CalamityMod.Backgrounds
|
||||
// Leaving this here for other programmers, in case I don't get to doing this myself.
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, null, CalamityUtils.BackgroundMatrix);
|
||||
|
||||
DrawShoresBG();
|
||||
DrawBurrowsBG();
|
||||
|
||||
Main.spriteBatch.End();
|
||||
@@ -97,6 +147,7 @@ namespace CalamityMod.Backgrounds
|
||||
// rendering code if that setting is on.
|
||||
if (Main.WaveQuality > 0 || !CalamityClientConfig.Instance.SunkenSeaBackgroundDistortion)
|
||||
{
|
||||
DrawShoresBG();
|
||||
DrawBurrowsBG();
|
||||
}
|
||||
else
|
||||
@@ -123,14 +174,103 @@ namespace CalamityMod.Backgrounds
|
||||
}
|
||||
|
||||
public static float Transparency;
|
||||
|
||||
public static float TransitionSpeed => 0.02f;
|
||||
|
||||
private static void DrawShoresBG()
|
||||
{
|
||||
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>()))
|
||||
{
|
||||
Transparency += 1f;
|
||||
|
||||
if (Transparency > 1f)
|
||||
Transparency = 1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make transparency immediately go down so it doesnt look weird, since vanilla underground backgrounds dont have the fade-in effect this background has.
|
||||
Transparency -= 1f;
|
||||
|
||||
if (Transparency < 0f)
|
||||
Transparency = 0f;
|
||||
}
|
||||
|
||||
// Don't bother running any of the background drawing if the transparency is zero (meaning the background isnt actually active).
|
||||
// Also do not run any of the background drawing if you have the vanilla background config option turned off.
|
||||
if (Transparency > 0f && Main.BackgroundEnabled)
|
||||
{
|
||||
Vector2 vector = Main.screenPosition + new Vector2((Main.screenWidth >> 1), (Main.screenHeight >> 1));
|
||||
float num = (Main.GameViewMatrix.Zoom.Y - 1f) * 0.5f * 200f;
|
||||
float Scale = 1.5f;
|
||||
float playerDrawPosition = ((Main.LocalPlayer.Center.Y / 16f) - 90) * 16f;
|
||||
|
||||
for (int Layers = 4; Layers >= 0; Layers--)
|
||||
{
|
||||
// Get each background texture.
|
||||
Texture2D BGTexture = ModContent.Request<Texture2D>("CalamityMod/Backgrounds/SunkenSeaShoresBG" + Layers).Value;
|
||||
|
||||
Vector2 vector2 = new Vector2(BGTexture.Width, BGTexture.Height) * 0.5f;
|
||||
float num2 = (Layers * 2 + 3f);
|
||||
Vector2 vector3 = new Vector2(1f / num2);
|
||||
Rectangle rectangle = new Rectangle(0, 0, BGTexture.Width, BGTexture.Height);
|
||||
Vector2 zero = Vector2.Zero;
|
||||
|
||||
switch (Layers)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
zero.Y += 200f;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
zero.Y += 0f;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
zero.Y += 0f;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
zero.Y += 0f;
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
zero.Y += 0f;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
vector2 *= Scale;
|
||||
|
||||
zero.Y -= num;
|
||||
float LoopWidth = Scale * rectangle.Width;
|
||||
float LoopHeight = Scale * rectangle.Height;
|
||||
int LoopX = (int)((vector.X * vector3.X - vector2.X + zero.X - (Main.screenWidth >> 1)) / LoopWidth);
|
||||
int LoopY = (int)((vector.Y * vector3.Y - vector2.Y + zero.Y - (Main.screenWidth >> 1)) / LoopWidth);
|
||||
|
||||
for (int i = LoopY - 2; i < LoopY + 4 + (int)(Main.screenWidth / LoopHeight); i++)
|
||||
{
|
||||
for (int j = LoopX - 2; j < LoopX + 4 + (int)(Main.screenWidth / LoopWidth); j++)
|
||||
{
|
||||
Vector2 drawPosition = (new Vector2(j * Scale * (rectangle.Width / vector3.X), playerDrawPosition) + vector2 - vector) * vector3 + vector - Main.screenPosition - vector2 + zero;
|
||||
|
||||
var frame = rectangle;
|
||||
var color = Color.White * Transparency;
|
||||
|
||||
Main.spriteBatch.Draw(BGTexture, drawPosition, frame, color, 0f, Vector2.Zero, Scale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private static void DrawBurrowsBG()
|
||||
{
|
||||
if (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.GleamingBurrowsBiome>()))
|
||||
{
|
||||
Transparency += TransitionSpeed;
|
||||
Transparency += 1f;
|
||||
|
||||
if (Transparency > 1f)
|
||||
Transparency = 1f;
|
||||
|
||||
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
@@ -27,7 +27,6 @@ namespace CalamityMod.Balancing
|
||||
{
|
||||
public sealed class BalancingChangesManager : ModSystem
|
||||
{
|
||||
internal static List<IBalancingRule[]> UniversalBalancingChanges = null;
|
||||
internal static List<NPCBalancingChange> NPCSpecificBalancingChanges = null;
|
||||
|
||||
// Balancing changes in this method are sorted based on place in progression, NPC name (from A-Z), and strength of resistance in ascending order, in that level of priority.
|
||||
@@ -37,6 +36,7 @@ namespace CalamityMod.Balancing
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
// Dirty shorthand for true melee resists, because they're super common and other class resists aren't.
|
||||
// If you add/change a true melee resist here, be sure to add/change the resist in CalamityGlobalNPC ModifyHitByItem as well.
|
||||
IBalancingRule ResistTrueMelee(float f) => new ClassResistBalancingRule(f, TrueMeleeDamageClass.Instance);
|
||||
|
||||
// Declare specific filters.
|
||||
@@ -46,50 +46,12 @@ namespace CalamityMod.Balancing
|
||||
bool DragonRageFilter(Projectile p) =>
|
||||
p.type == ProjectileType<DragonRageStaff>() || p.type == ProjectileType<DragonRageFireball>() || (p.type == ProjectileType<FuckYou>() && p.CountsAsClass<MeleeDamageClass>());
|
||||
|
||||
// bool MonkStaffT3Filter(Projectile p) =>
|
||||
// p.type == ProjectileID.MonkStaffT3_AltShot || (p.type == ProjectileID.Electrosphere && Main.player[p.owner].ActiveItem().type == ItemID.MonkStaffT3);
|
||||
|
||||
bool MushroomSpearFilter(Projectile p) =>
|
||||
p.type == ProjectileID.Mushroom && Main.player[p.owner].ActiveItem().type == ItemID.MushroomSpear;
|
||||
|
||||
bool OrichalcumPetalFilter(Projectile p) =>
|
||||
p.type == ProjectileID.FlowerPetal && Main.player[p.owner].onHitPetal;
|
||||
|
||||
bool SpectreMaskSetBonusFilter(Projectile p) =>
|
||||
p.type == ProjectileID.SpectreWrath && Main.player[p.owner].ghostHurt;
|
||||
|
||||
bool AotCThrowCombo(Projectile p) =>
|
||||
p.type == ProjectileType<ArkoftheCosmosSwungBlade>() && (p.ai[0] == 2 || p.ai[0] == 3);
|
||||
|
||||
bool HiveBeeFilter(Projectile p) =>
|
||||
p.type == ProjectileType<BasicPlagueBee>() && Main.player[p.owner].ActiveItem().type == ItemType<TheHive>();
|
||||
|
||||
UniversalBalancingChanges = new List<IBalancingRule[]>()
|
||||
{
|
||||
// Nerf Crystal bullet shards by 45%
|
||||
// Currently crystal bullet projectiles deal 50% of the bullet's damage which is absurd in vanilla, this nerfs them to 27.5%
|
||||
Do(new ProjectileResistBalancingRule(0.55f, ProjectileID.CrystalShard)),
|
||||
|
||||
// Nerf Luminite Arrow trails by 50%.
|
||||
Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.MoonlordArrowTrail)),
|
||||
|
||||
// Nerf Seedler seeds by 25%.
|
||||
Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.SeedlerNut, ProjectileID.SeedlerThorn)),
|
||||
|
||||
// Nerf Cursed Dart flames by 50%.
|
||||
Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CursedDartFlame)),
|
||||
|
||||
// Nerf Mushroom Spear projectiles by 50%.
|
||||
Do(new ProjectileSpecificRequirementBalancingRule(0.5f, MushroomSpearFilter)),
|
||||
|
||||
// Nerf Orichalcum armor set bonus petals by 25%.
|
||||
Do(new ProjectileSpecificRequirementBalancingRule(0.75f, OrichalcumPetalFilter)),
|
||||
|
||||
// Nerf Spectre Mask set bonus projectiles by 50%.
|
||||
Do(new ProjectileSpecificRequirementBalancingRule(0.5f, SpectreMaskSetBonusFilter)),
|
||||
|
||||
};
|
||||
|
||||
NPCSpecificBalancingChanges = new List<NPCBalancingChange>();
|
||||
|
||||
#region Crabulon
|
||||
@@ -175,8 +137,11 @@ namespace CalamityMod.Balancing
|
||||
#endregion
|
||||
|
||||
#region Astrum Aureus
|
||||
// 30% resist to The Ballista's greatarrows.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<BallistaGreatArrow>()))));
|
||||
// 25% resist to true melee.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), ResistTrueMelee(0.75f)));
|
||||
|
||||
// 25% resist to The Ballista's greatarrows.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<BallistaGreatArrow>()))));
|
||||
#endregion
|
||||
|
||||
#region Duke Fishron
|
||||
@@ -202,21 +167,18 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Aegis Blade's explosions because the true melee resist ain't enough.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
|
||||
|
||||
// 50% resist to Icicle Arrows.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<IcicleArrowProj>()))));
|
||||
// 40% resist to Icicle Arrows.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<IcicleArrowProj>()))));
|
||||
|
||||
// 35% resist to Flying Dragon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
|
||||
|
||||
// 30% resist to Aurora Blazer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
|
||||
|
||||
// 30% resist to Flak Kraken.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
|
||||
|
||||
// 25% resist to Lucrecia.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<DNA>()))));
|
||||
|
||||
// 20% resist to Aurora Blazer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AuroraFire>()))));
|
||||
|
||||
// 20% resist to The Hive.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>(), ProjectileType<HiveMissile>()))));
|
||||
#endregion
|
||||
@@ -245,27 +207,27 @@ namespace CalamityMod.Balancing
|
||||
// 70% resist to Stardust Dragon Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
|
||||
|
||||
// 55% resist to Flak Kraken.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType<FlakKrakenProjectile>()))));
|
||||
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 50% resist to Atlantis (Atlantis gaming!).
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AtlantisSpear>()))));
|
||||
|
||||
// 50% resist to Aurora Blazer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AuroraFire>()))));
|
||||
|
||||
// 35% resist to Aerial Bane.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
|
||||
|
||||
// 35% resist to Ballistic Poison Bomb's clouds.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<BallisticPoisonCloud>()))));
|
||||
|
||||
// 35% resist to Icicle Arrows.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
|
||||
|
||||
// 30% resist to Aurora Blazer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
|
||||
|
||||
// 30% resist to Flak Kraken.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
|
||||
|
||||
// 20% resist to Ballistic Poison Bomb's clouds.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BallisticPoisonCloud>()))));
|
||||
|
||||
// 20% resist to Cluster Rocket fragments.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
|
||||
#endregion
|
||||
@@ -511,23 +473,12 @@ namespace CalamityMod.Balancing
|
||||
|
||||
public override void Unload()
|
||||
{
|
||||
UniversalBalancingChanges = null;
|
||||
NPCSpecificBalancingChanges = null;
|
||||
}
|
||||
|
||||
public static void ApplyFromProjectile(NPC npc, ref NPC.HitModifiers modifiers, Projectile proj)
|
||||
{
|
||||
// Apply universal balancing rules.
|
||||
foreach (IBalancingRule[] balancingRules in UniversalBalancingChanges)
|
||||
{
|
||||
foreach (IBalancingRule balancingRule in balancingRules)
|
||||
{
|
||||
if (balancingRule.AppliesTo(npc, modifiers, proj))
|
||||
balancingRule.ApplyBalancingChange(npc, ref modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
// As well as rules specific to NPCs.
|
||||
// Apply NPC-specific balancing rules.
|
||||
foreach (NPCBalancingChange balanceChange in NPCSpecificBalancingChanges)
|
||||
{
|
||||
if (npc.type != balanceChange.NPCType)
|
||||
|
||||
@@ -117,54 +117,22 @@
|
||||
#endregion
|
||||
|
||||
#region Life Steal
|
||||
// Life steal cap
|
||||
// Life steal cap (Maximum HP healed per instance of lifesteal)
|
||||
internal static readonly int LifeStealCap = 100;
|
||||
|
||||
// Life steal accessories require a more strict cooldown due to their ease of use and global application
|
||||
internal static readonly float LifeStealAccessoryCooldownMultiplier = 3f;
|
||||
|
||||
// Life steal cooldown multipliers used for armor set bonuses
|
||||
internal static readonly float LifeStealSetBonusCooldownMultiplier = 2f;
|
||||
internal static readonly float LifeStealReaverTankCooldownMultiplier = 4f;
|
||||
|
||||
// The range was buffed in vanilla from 1200 to 3000 in 1.4.4, and I agree with that decision
|
||||
internal static readonly float LifeStealRange = 3000f;
|
||||
|
||||
// Life steal caps (aka, how much life steal the player is allowed before it goes on cooldown)
|
||||
internal static readonly float LifeStealCap_Classic = 60f;
|
||||
internal static readonly float LifeStealCap_Expert = 50f;
|
||||
internal static readonly float LifeStealCap_Revengeance = 40f;
|
||||
internal static readonly float LifeStealCap_Death = 30f;
|
||||
|
||||
// Master nerfs the life steal cap by 10, resulting in 40 in non-Rev Master, 30 in Rev Master, and 20 in Death Master
|
||||
internal static readonly float LifeStealCapReduction_Master = 10f;
|
||||
// Base life steal caps from vanilla (aka, how much life steal the player is allowed before it goes on cooldown)
|
||||
internal static readonly float LifeStealCap_Classic = 80f;
|
||||
internal static readonly float LifeStealCap_Expert = 70f;
|
||||
|
||||
// The base life steal cooldowns from vanilla
|
||||
internal static readonly float LifeStealRecoveryRate_Classic = 0.6f;
|
||||
internal static readonly float LifeStealRecoveryRate_Expert = 0.5f;
|
||||
|
||||
// The calculations below show the time (in frames) for 10 life steal cooldown to recover in each difficulty
|
||||
// Classic: 10 / 0.2 = 50
|
||||
// Expert: 10 / 0.15 = 66.667
|
||||
// Revengeance: 10 / 0.125 = 80
|
||||
// Death: 10 / 0.1 = 100
|
||||
// Master: 10 / 0.1 = 100
|
||||
// Revengeance Master: 10 / 0.075 = 133.333
|
||||
// Death Master: 10 / 0.05 = 200
|
||||
// Nerfs the life steal recovery rate in Classic from 0.6/s to 0.2/s
|
||||
// Nerfs the life steal recovery rate in Classic from 0.6 to 0.2 (36 HP/s to 12 HP/s)
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.4f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Expert from 0.5/s to 0.15/s
|
||||
// Nerfs the life steal recovery rate in Expert from 0.5 to 0.15 (30 HP/s to 9 HP/s)
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.35f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Revengeance from 0.5/s to 0.125/s
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Revengeance = 0.375f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Death from 0.5/s to 0.1/s
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Death = 0.4f;
|
||||
|
||||
// Nerfs the life steal recovery rate in Master by 0.05/s, resulting in 0.1/s in non-Rev Master, 0.075/s in Rev Master, and 0.05/s in Death Master
|
||||
internal static readonly float LifeStealRecoveryRateReduction_Master = 0.05f;
|
||||
#endregion
|
||||
|
||||
#region Rogue Base Stats
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -17,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().cinnamonRoll = true;
|
||||
player.Calamity().HeatDebuffMultiplier += 0.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,8 @@ namespace CalamityMod.Buffs.Alcohol
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().evergreenGin = true;
|
||||
player.Calamity().SicknessDebuffMultiplier += 0.25f;
|
||||
player.Calamity().WaterDebuffMultiplier += 0.25f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ namespace CalamityMod.Buffs.Alcohol
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().fireball = true;
|
||||
player.Calamity().HeatDebuffMultiplier += 0.25f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,10 +36,6 @@ namespace CalamityMod.Buffs
|
||||
{
|
||||
player.arrowDamage *= 0.955f;
|
||||
}
|
||||
else if (type == BuffID.Ironskin)
|
||||
{
|
||||
player.statDefense += CalamityUtils.GetScalingDefense(-1) - 8;
|
||||
}
|
||||
else if (type == BuffID.MagicPower)
|
||||
{
|
||||
player.GetDamage<MagicDamageClass>() -= 0.1f;
|
||||
@@ -93,10 +89,6 @@ namespace CalamityMod.Buffs
|
||||
{
|
||||
player.Calamity().shine = true;
|
||||
}
|
||||
else if (type == BuffID.IceBarrier)
|
||||
{
|
||||
player.endurance -= 0.1f;
|
||||
}
|
||||
|
||||
// Beetle Shell DR is a full compensation, as the vanilla multiplicative DR is removed entirely.
|
||||
else if (type >= BuffID.BeetleEndurance1 && type <= BuffID.BeetleEndurance3 && player.beetleDefense)
|
||||
@@ -157,19 +149,13 @@ namespace CalamityMod.Buffs
|
||||
|
||||
if (type == BuffID.Webbed)
|
||||
{
|
||||
if (npc.Calamity().webbed < npc.buffTime[buffIndex])
|
||||
npc.Calamity().webbed = npc.buffTime[buffIndex];
|
||||
npc.Calamity().webbed = true;
|
||||
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().webbed;
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
}
|
||||
if (type == BuffID.Electrified)
|
||||
{
|
||||
if (npc.Calamity().electrified < npc.buffTime[buffIndex])
|
||||
npc.Calamity().electrified = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().electrified = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,10 +200,6 @@ namespace CalamityMod.Buffs
|
||||
tip = tip.Replace("25", "15");
|
||||
break;
|
||||
|
||||
case BuffID.Ironskin:
|
||||
tip = tip.Replace("8", CalamityUtils.GetScalingDefense(-1).ToString());
|
||||
break;
|
||||
|
||||
case BuffID.LeafCrystal:
|
||||
tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.LeafCrystal");
|
||||
break;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class AstralInfectionDebuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 75,
|
||||
SicknessDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().astralInfection < npc.buffTime[buffIndex])
|
||||
npc.Calamity().astralInfection = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().astralInfection = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class AuricRebuke : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData(DebuffData.DebuffBehavior.Electric)
|
||||
{
|
||||
EnemyLostRegen = 200,
|
||||
ElectricDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().auricRebuke < npc.buffTime[buffIndex])
|
||||
npc.Calamity().auricRebuke = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().auricRebuke = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -6,12 +7,24 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class BanishingFire : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 4000, //This is the minimum DoT. Banishing Fire scales with max HP
|
||||
HeatDebuffScaling = 1, //Unused in the method, but kept so other things can know this is a heat debuff
|
||||
NPCLifeRegenMethod = BanishingFireNPCLifeRegen
|
||||
};
|
||||
public static void BanishingFireNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
int baseBanishingFireDoTValue = (int)npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo((npc.lifeMax >= 1000000 ? npc.lifeMax / 500 : debuffData.EnemyLostRegen));
|
||||
npc.Calamity().ApplyDPSDebuff(baseBanishingFireDoTValue, baseBanishingFireDoTValue / 5, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -21,10 +34,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().banishingFire < npc.buffTime[buffIndex])
|
||||
npc.Calamity().banishingFire = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().banishingFire = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class BrainRot : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 40,
|
||||
SicknessDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().brainRot < npc.buffTime[buffIndex])
|
||||
npc.Calamity().brainRot = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().brainRot = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class BrimstoneFlames : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 60,
|
||||
HeatDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().bFlames = true;
|
||||
player.Calamity().brimstoneFlames = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().bFlames < npc.buffTime[buffIndex])
|
||||
npc.Calamity().bFlames = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().brimstoneFlames = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class BurningBlood : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 40,
|
||||
SicknessDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().bBlood = true;
|
||||
player.Calamity().burningBlood = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().bBlood < npc.buffTime[buffIndex])
|
||||
npc.Calamity().bBlood = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().burningBlood = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class CrushDepth : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 100,
|
||||
WaterDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().cDepth = true;
|
||||
player.Calamity().crushDepth = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().cDepth < npc.buffTime[buffIndex])
|
||||
npc.Calamity().cDepth = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().crushDepth = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Terraria;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
@@ -16,6 +18,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = DebuffData.Daybroken;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
@@ -12,6 +13,17 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class DemonicFlames : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 60, //Unused in the method, this is the amount of DoT from Forbidden Oathblade demon flames
|
||||
HeatDebuffScaling = 1, //Unused in the method, but kept so other things can know this is a heat debuff
|
||||
NPCLifeRegenMethod = DemonFlamesNPCLifeRegen
|
||||
};
|
||||
public static void DemonFlamesNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
int baseDemonicFlamesDoTValue = (int)Math.Max(npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo(npc.Calamity().demonicFlamesBonusDamage), npc.Calamity().demonicFlamesBonusDamage);
|
||||
npc.Calamity().ApplyDPSDebuff(baseDemonicFlamesDoTValue, baseDemonicFlamesDoTValue / 15, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
@@ -27,10 +39,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().demonicFlames < npc.buffTime[buffIndex])
|
||||
npc.Calamity().demonicFlames = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().demonicFlames = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class Dragonfire : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 960,
|
||||
HeatDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().dragonFire < npc.buffTime[buffIndex])
|
||||
npc.Calamity().dragonFire = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().dragonFire = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -10,12 +11,17 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class ElementalMix : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 400
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -25,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().elementalMix < npc.buffTime[buffIndex])
|
||||
npc.Calamity().elementalMix = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().elementalMix = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class GodSlayerInferno : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 500,
|
||||
HeatDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().gsInferno = true;
|
||||
player.Calamity().godSlayerInferno = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().gsInferno < npc.buffTime[buffIndex])
|
||||
npc.Calamity().gsInferno = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().godSlayerInferno = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class HadopelagicPressure : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 400,
|
||||
WaterDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().hPressure = true;
|
||||
player.Calamity().hadopelagicPressure = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().hPressure < npc.buffTime[buffIndex])
|
||||
npc.Calamity().hPressure = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().hadopelagicPressure = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Particles;
|
||||
using System;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -10,12 +11,17 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class HeavyBleeding : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 80
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -25,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().heavybleeding < npc.buffTime[buffIndex])
|
||||
npc.Calamity().heavybleeding = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().heavyBleeding = true;
|
||||
}
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class HolyFlames : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 300,
|
||||
HeatDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().hFlames = true;
|
||||
player.Calamity().holyFlames = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().hFlames < npc.buffTime[buffIndex])
|
||||
npc.Calamity().hFlames = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().holyFlames = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -6,17 +7,24 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class HolyInferno : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 10000, //this is never applied to enemies
|
||||
HeatDebuffScaling = 1,
|
||||
GearCanModifyDebuff = false
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().hInferno = true;
|
||||
player.Calamity().holyInferno = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Particles;
|
||||
using System;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -10,12 +11,17 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class Laceration : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 400
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -25,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().laceration < npc.buffTime[buffIndex])
|
||||
npc.Calamity().laceration = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().laceration = true;
|
||||
}
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class ManaBurn : ModBuff
|
||||
{
|
||||
//as of now, this doesn't use the custom debuff system due to the debuff being a front for the actual effects in the Chaos Stone rework
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,12 +10,17 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class MiracleBlight : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 3000
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -24,10 +30,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().miracleBlight < npc.buffTime[buffIndex])
|
||||
npc.Calamity().miracleBlight = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().miracleBlight = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class Nightwither : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 200,
|
||||
ColdDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().nightwither < npc.buffTime[buffIndex])
|
||||
npc.Calamity().nightwither = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().nightwither = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class Plague : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 100,
|
||||
SicknessDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().pFlames = true;
|
||||
player.Calamity().plague = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().pFlames < npc.buffTime[buffIndex])
|
||||
npc.Calamity().pFlames = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().plague = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.DataStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -8,25 +9,28 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class RiptideDebuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 30,
|
||||
WaterDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().rTide = true;
|
||||
player.Calamity().riptide = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().rTide < npc.buffTime[buffIndex])
|
||||
npc.Calamity().rTide = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().riptide = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
using Terraria;
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class SagePoison : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 50, //This is the base DoT before the scaling formula. Not used in the method, here for referece.
|
||||
SicknessDebuffScaling = 1, //Unused in the method, but kept so other things can know this is a sickness debuff
|
||||
NPCLifeRegenMethod = SagePoisonPower
|
||||
};
|
||||
public static void SagePoisonPower(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
// npc.Calamity().sagePoisonDamage = 50 * (float)(Math.Pow(totalSageSpirits, 0.73D) + Math.Pow(totalSageSpirits, 1.1D)) * 0.5f
|
||||
// See SageNeedle.cs for details
|
||||
int baseSagePoisonDoTValue = (int)npc.Calamity().ActiveSicknessDebuffMultiplier.ApplyTo(npc.Calamity().sagePoisonDamage);
|
||||
npc.Calamity().ApplyDPSDebuff(baseSagePoisonDoTValue, baseSagePoisonDoTValue / 5, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
@@ -13,10 +27,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
}
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().sagePoisonTime < npc.buffTime[buffIndex])
|
||||
npc.Calamity().sagePoisonTime = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().sagePoison = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
@@ -6,17 +7,23 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
[LegacyName("CragsLava")]
|
||||
public class SearingLava : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 1000, //Never infliced on enemies, token value. Really high bc this hurts a lot on players
|
||||
HeatDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().cragsLava = true;
|
||||
player.Calamity().searingLava = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using CalamityMod.DataStructures;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -17,6 +18,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = DebuffData.Shadowflame;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
@@ -1,23 +1,57 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class ShellfishClaps : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 150, //Damage per shellfish
|
||||
NPCLifeRegenMethod = ShellfishStacking
|
||||
};
|
||||
public static void ShellfishStacking(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
int projectileCount = 0;
|
||||
int owner = 255;
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (p.type == ModContent.ProjectileType<Shellfish>() &&
|
||||
p.ai[0] == 1f && p.ai[1] == npc.whoAmI)
|
||||
{
|
||||
owner = p.owner;
|
||||
projectileCount++;
|
||||
if (projectileCount >= 5)
|
||||
{
|
||||
projectileCount = 5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item heldItem = Main.player[owner].ActiveItem();
|
||||
int totalDamage = (int)Main.player[owner].GetTotalDamage<SummonDamageClass>().ApplyTo(debuffData.EnemyLostRegen);
|
||||
|
||||
if (CalamityUtils.ShouldTriggerSummonPenalty(Main.player[owner], heldItem))
|
||||
totalDamage = (int)(totalDamage * BalancingConstants.SummonerCrossClassNerf);
|
||||
|
||||
int totalDisplayedDamage = totalDamage / 5;
|
||||
npc.Calamity().ApplyDPSDebuff(projectileCount * totalDamage, projectileCount * totalDisplayedDamage, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().shellfishVore < npc.buffTime[buffIndex])
|
||||
npc.Calamity().shellfishVore = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().shellfishStaffDebuff = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,8 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class Shred : ModBuff
|
||||
{
|
||||
//This is not ported to the custom debuff system yet due to the complexities of it.
|
||||
//I didn't want to break it! It will be done in a future PR
|
||||
internal const int StackFalloffFrames = 320;
|
||||
|
||||
// This deals 600 DPS per stack, is boosted by ranged stats and can supercrit.
|
||||
|
||||
@@ -1,23 +1,47 @@
|
||||
using Terraria;
|
||||
using CalamityMod.Balancing;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class SnapClamDebuff : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 15, //Damage per shellfish
|
||||
NPCLifeRegenMethod = ShellfishStacking
|
||||
};
|
||||
public static void ShellfishStacking(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
|
||||
int projectileCount = 0;
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (p.ai[0] == 1f && p.ai[1] == npc.whoAmI)
|
||||
{
|
||||
if (p.type == ModContent.ProjectileType<SnapClamProj>())
|
||||
projectileCount += 2;
|
||||
if (p.type == ModContent.ProjectileType<SnapClamStealth>())
|
||||
projectileCount++;
|
||||
}
|
||||
}
|
||||
|
||||
npc.Calamity().ApplyDPSDebuff((int)(projectileCount * debuffData.EnemyLostRegen), projectileCount * 3, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().clamDebuff < npc.buffTime[buffIndex])
|
||||
npc.Calamity().clamDebuff = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().snapClamDebuff = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class StaticDischarge : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData(DebuffData.DebuffBehavior.Electric)
|
||||
{
|
||||
EnemyLostRegen = 5,
|
||||
ElectricDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().staticDischarge < npc.buffTime[buffIndex])
|
||||
npc.Calamity().staticDischarge = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().staticDischarge = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class SulphuricPoisoning : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 240,
|
||||
SicknessDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
|
||||
// Acid Venom immunity is granted automatically if you are immune to Sulphuric Poisoning.
|
||||
BuffID.Sets.GrantImmunityWith[BuffID.Venom].Add(Type);
|
||||
@@ -33,10 +40,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().sulphurPoison < npc.buffTime[buffIndex])
|
||||
npc.Calamity().sulphurPoison = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().sulphurPoison = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Systems.Collections;
|
||||
@@ -12,11 +13,13 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class TrueVulnerabilityHex : ModBuff
|
||||
{
|
||||
// The visual number displayed in ticks as the enemy takes damage.
|
||||
public const int TickNumber = 666;
|
||||
|
||||
// The exact amount True Vulnerability Hex reduces NPC life regen by.
|
||||
public const int DPS = TickNumber * 6; // -3996 life regen, 1998 DPS
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 3996, //6x the tick size
|
||||
SicknessDebuffScaling = 1,
|
||||
MinimumDamageTickSize = 666, //Vhex should always have ticks of 666
|
||||
MultiplierDamageTickSize = 0
|
||||
};
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -25,6 +28,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex) => player.Calamity().trueVHex = true;
|
||||
@@ -32,21 +36,14 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
CalamityGlobalNPC cgn = npc.Calamity();
|
||||
if (cgn.trueVulnerabilityHex < npc.buffTime[buffIndex])
|
||||
{
|
||||
cgn.trueVulnerabilityHex = npc.buffTime[buffIndex];
|
||||
// Set the remaining time of the fire drawer to be exactly right.
|
||||
if (cgn.VulnerabilityHexFireDrawer != null)
|
||||
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + cgn.trueVulnerabilityHex;
|
||||
}
|
||||
|
||||
// Apply immunity timer.
|
||||
//If this isn't here the drawcode gives an index out of bounds
|
||||
if (npc.buffTime[buffIndex] > 1)
|
||||
cgn.trueVulnerabilityHex = true;
|
||||
if (cgn.VulnerabilityHexFireDrawer != null)
|
||||
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + npc.buffTime[buffIndex];
|
||||
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && cgn.debuffResistanceTimer <= 0)
|
||||
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + cgn.trueVulnerabilityHex;
|
||||
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
|
||||
// Destroy the vanilla buff, we don't use it.
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Systems.Collections;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -10,12 +11,19 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class Vaporfied : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 30,
|
||||
MinimumDamageTickSize = 6,
|
||||
MultiplierDamageTickSize = 0
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -25,12 +33,9 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().vaporfied < npc.buffTime[buffIndex])
|
||||
npc.Calamity().vaporfied = npc.buffTime[buffIndex];
|
||||
npc.Calamity().vaporfied = true;
|
||||
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().vaporfied;
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin +npc.buffTime[buffIndex];
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class VermillionFlux : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData(DebuffData.DebuffBehavior.Electric)
|
||||
{
|
||||
EnemyLostRegen = 100,
|
||||
ElectricDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().vermillionFlux < npc.buffTime[buffIndex])
|
||||
npc.Calamity().vermillionFlux = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().vermillionFlux = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class Voidfrost : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 200,
|
||||
ColdDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().voidfrost < npc.buffTime[buffIndex])
|
||||
npc.Calamity().voidfrost = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().voidfrost = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Systems.Collections;
|
||||
@@ -12,11 +13,13 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class VulnerabilityHex : ModBuff
|
||||
{
|
||||
// The visual number displayed in ticks as the enemy takes damage.
|
||||
public const int TickNumber = 666;
|
||||
|
||||
// The exact amount Vulnerability Hex reduces NPC life regen by.
|
||||
public const int DPS = TickNumber * 4; // -2664 life regen, 1332 DPS
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 2664, //4x tick size
|
||||
HeatDebuffScaling = 1,
|
||||
MinimumDamageTickSize = 666,
|
||||
MultiplierDamageTickSize = 0
|
||||
};
|
||||
|
||||
public const int CalamityDuration = 60;
|
||||
public const int AflameDuration = 120;
|
||||
@@ -28,6 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex) => player.Calamity().vHex = true;
|
||||
@@ -35,21 +39,17 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
CalamityGlobalNPC cgn = npc.Calamity();
|
||||
if (cgn.vulnerabilityHex < npc.buffTime[buffIndex])
|
||||
{
|
||||
cgn.vulnerabilityHex = npc.buffTime[buffIndex];
|
||||
// Set the remaining time of the fire drawer to be exactly right.
|
||||
if (cgn.VulnerabilityHexFireDrawer != null)
|
||||
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + cgn.vulnerabilityHex;
|
||||
}
|
||||
|
||||
//If this isn't here the drawcode gives an index out of bounds
|
||||
if (npc.buffTime[buffIndex] > 1)
|
||||
cgn.vulnerabilityHex = true;
|
||||
// Set the remaining time of the fire drawer to be exactly right.
|
||||
if (cgn.VulnerabilityHexFireDrawer != null)
|
||||
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + npc.buffTime[buffIndex];
|
||||
|
||||
// Apply immunity timer.
|
||||
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && cgn.debuffResistanceTimer <= 0)
|
||||
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + cgn.vulnerabilityHex;
|
||||
|
||||
// Destroy the vanilla buff, we don't use it.
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + +npc.buffTime[buffIndex];
|
||||
}
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
{
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
using Terraria;
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public class WeakBrimstoneFlames : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 10, //This is never infliced on enemies, this is just a token value
|
||||
HeatDebuffScaling = 1,
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex) => player.Calamity().weakBrimstoneFlames = true;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Accessories.Vanity;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -18,11 +19,7 @@ namespace CalamityMod.Buffs
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (modPlayer.snowmanPrevious)
|
||||
{
|
||||
modPlayer.snowmanPower = true;
|
||||
}
|
||||
else
|
||||
if (player.Transformation().Type != ModContent.ItemType<Popo>())
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Accessories.Vanity;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -17,11 +18,8 @@ namespace CalamityMod.Buffs
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (modPlayer.snowmanPrevious)
|
||||
{
|
||||
modPlayer.snowmanPower = true;
|
||||
if (player.Transformation().Type == ModContent.ItemType<Popo>())
|
||||
modPlayer.snowmanNoseless = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
|
||||
|
Before Width: | Height: | Size: 531 B After Width: | Height: | Size: 573 B |
@@ -26,7 +26,6 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
player.maxFallSpeed = 9f;
|
||||
player.gills = true;
|
||||
}
|
||||
modPlayer.abyssalDivingSuitPower = true;
|
||||
modPlayer.depthCharm = true;
|
||||
modPlayer.jellyfishNecklace = true;
|
||||
modPlayer.anechoicPlating = true;
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().adrenalineModeActive = true;
|
||||
player.Calamity().AdrenalineTrail = true;
|
||||
}
|
||||
|
||||
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare)
|
||||
|
||||
@@ -20,14 +20,13 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (modPlayer.aquaticHeartPrevious)
|
||||
{
|
||||
modPlayer.aquaticHeartPower = true;
|
||||
player.ignoreWater = NPC.downedBoss3;
|
||||
player.accFlipper = true;
|
||||
if (player.breath <= player.breathMax + 2 && !modPlayer.ZoneAbyss && NPC.downedBoss3)
|
||||
{
|
||||
player.breath = player.breathMax + 3;
|
||||
}
|
||||
if (Main.myPlayer == player.whoAmI && player.wet && NPC.downedBoss3)
|
||||
if (Main.myPlayer == player.whoAmI && player.Calamity().countsAsAnyWet && NPC.downedBoss3)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<AquaticHeartWaterSpeed>(), 360);
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class BrutalCarnage : ModBuff
|
||||
{
|
||||
public static float MeleeDamageBoost = 0.2f;
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(MeleeDamageBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().brutalCarnage = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 625 B |
@@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class Mushy : ModBuff
|
||||
{
|
||||
public static int DefenseBoost = 8;
|
||||
public static int DefenseBoost = 5;
|
||||
public static int RegenBoost = 2;
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(DefenseBoost, RegenBoost.ToRegenPerSecond());
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class SpiritDefense : ModBuff
|
||||
{
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(SpiritGlyph.DefenseBoost, SpiritGlyph.DamageReductionBoost.ToPercent());
|
||||
public override LocalizedText Description => base.Description.WithFormatArgs(SpiritGlyph.DefenseBoost);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -20,7 +20,6 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.statDefense += SpiritGlyph.DefenseBoost;
|
||||
player.endurance += SpiritGlyph.DamageReductionBoost; // TODO -- is this applied too late to be affected by the DR softcap?
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -8,19 +9,24 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
{
|
||||
public class AbsorberAffliction : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 400,
|
||||
SicknessDebuffScaling = 1,
|
||||
MultiplierDamageTickSize = 1 / 20f
|
||||
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().absorberAffliction < npc.buffTime[buffIndex])
|
||||
npc.Calamity().absorberAffliction = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().absorberAffliction = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
|
||||
@@ -22,15 +22,12 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().aCrunch < npc.buffTime[buffIndex])
|
||||
npc.Calamity().aCrunch = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().armorCrunch = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().aCrunch = true;
|
||||
player.Calamity().armorCrunch = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,10 +22,7 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().crumble < npc.buffTime[buffIndex])
|
||||
npc.Calamity().crumble = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().crumble = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
@@ -25,12 +25,9 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().eutrophication < npc.buffTime[buffIndex])
|
||||
npc.Calamity().eutrophication = npc.buffTime[buffIndex];
|
||||
npc.Calamity().eutrophication = true;
|
||||
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().eutrophication;
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
}
|
||||
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().iCantBreathe = true;
|
||||
player.Calamity().frozenLungs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,12 +18,9 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().tesla < npc.buffTime[buffIndex])
|
||||
npc.Calamity().tesla = npc.buffTime[buffIndex];
|
||||
npc.Calamity().galvanicCorrosion = true;
|
||||
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().tesla;
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
@@ -20,10 +20,9 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().gState < npc.buffTime[buffIndex])
|
||||
npc.Calamity().gState = npc.buffTime[buffIndex];
|
||||
npc.Calamity().glacialState = true;
|
||||
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().gState;
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Terraria;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -6,6 +8,44 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
{
|
||||
public class Irradiated : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 20, //Base irradiated DOT. This is changed with some application sources.
|
||||
NPCLifeRegenMethod = IrradiatedNPCLifeRegen
|
||||
};
|
||||
public static void IrradiatedNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
var cnpc = npc.Calamity();
|
||||
int projectileCount = 0;
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (p.type == ModContent.ProjectileType<WaterLeechProj>() &&
|
||||
p.ai[0] == 1f && p.ai[1] == npc.whoAmI)
|
||||
{
|
||||
projectileCount++;
|
||||
}
|
||||
}
|
||||
int baseIrradiatedDoTValue = (int)(cnpc.scionsCurioEffected ? (int)(debuffData.EnemyLostRegen * 1.5f) : debuffData.EnemyLostRegen);
|
||||
if (cnpc.scionsCurioEffected)
|
||||
{
|
||||
for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++)
|
||||
{
|
||||
Player player = Main.player[playerIndex];
|
||||
if (player.active)
|
||||
{
|
||||
float playerRangedDamage = player.GetTotalDamage(DamageClass.Ranged).ApplyTo(baseIrradiatedDoTValue * (1 + player.GetTotalCritChance(DamageClass.Ranged) * 0.01f));
|
||||
if (playerRangedDamage > baseIrradiatedDoTValue && player.Calamity().scionsCurio)
|
||||
{
|
||||
baseIrradiatedDoTValue = (int)playerRangedDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (projectileCount > 0)
|
||||
cnpc.ApplyDPSDebuff(projectileCount * baseIrradiatedDoTValue, projectileCount * 4, ref npc.lifeRegen, ref damage);
|
||||
else
|
||||
cnpc.ApplyDPSDebuff(baseIrradiatedDoTValue, baseIrradiatedDoTValue / 20, ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = true;
|
||||
@@ -13,6 +53,7 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
|
||||
BuffID.Sets.LongerExpertDebuff[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
@@ -22,10 +63,7 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().irradiated < npc.buffTime[buffIndex])
|
||||
npc.Calamity().irradiated = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().irradiated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Terraria;
|
||||
using CalamityMod.DataStructures;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatDebuffs
|
||||
@@ -16,10 +17,7 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().marked < npc.buffTime[buffIndex])
|
||||
npc.Calamity().marked = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().markedForDeath = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,10 +16,7 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().pearlAura < npc.buffTime[buffIndex])
|
||||
npc.Calamity().pearlAura = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().pearlAura = true;
|
||||
}
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
|
||||
@@ -16,10 +16,7 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
}
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().relicOfResilienceWeakness < npc.buffTime[buffIndex])
|
||||
npc.Calamity().relicOfResilienceWeakness = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().relicOfResilienceWeakness = true;
|
||||
}
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
{
|
||||
|
||||
@@ -16,12 +16,9 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().tSad < npc.buffTime[buffIndex])
|
||||
npc.Calamity().tSad = npc.buffTime[buffIndex];
|
||||
npc.Calamity().temporalSadness = true;
|
||||
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().tSad;
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,12 +18,9 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().timeSlow < npc.buffTime[buffIndex])
|
||||
npc.Calamity().timeSlow = npc.buffTime[buffIndex];
|
||||
npc.Calamity().timeDistortion = true;
|
||||
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().timeSlow;
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,15 +16,12 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().wDeath = true;
|
||||
player.Calamity().whisperingDeath = true;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().wDeath < npc.buffTime[buffIndex])
|
||||
npc.Calamity().wDeath = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().whisperingDeath = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,10 +20,7 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
if (npc.Calamity().wither < npc.buffTime[buffIndex])
|
||||
npc.Calamity().wither = npc.buffTime[buffIndex];
|
||||
npc.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
npc.Calamity().wither = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class BrimstoneWaifu : BaseSummonBuff
|
||||
public class BrimstoneElemental : BaseSummonBuff
|
||||
{
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<BrimstoneElementalMinion>();
|
||||
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.bWaifu;
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.brimEleBuff;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 467 B After Width: | Height: | Size: 467 B |
@@ -3,10 +3,10 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class CloudyWaifu : BaseSummonBuff
|
||||
public class CloudElemental : BaseSummonBuff
|
||||
{
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<CloudElementalMinion>();
|
||||
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.cWaifu;
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.cloudEleBuff;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 488 B |
@@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
if (!modPlayer.allWaifus)
|
||||
if (!modPlayer.allElementals)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
|
||||
@@ -3,10 +3,10 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class SandyHealingWaifu : BaseSummonBuff
|
||||
public class RareSandElemental : BaseSummonBuff
|
||||
{
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<SandElementalHealer>();
|
||||
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.dWaifu;
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.rareSandEleBuff;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 601 B |
@@ -3,10 +3,10 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class SandyWaifu : BaseSummonBuff
|
||||
public class SandElemental : BaseSummonBuff
|
||||
{
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<SandElementalMinion>();
|
||||
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.sWaifu;
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.sandEleBuff;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 642 B After Width: | Height: | Size: 642 B |
@@ -3,10 +3,10 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class WaterWaifu : BaseSummonBuff
|
||||
public class WaterElemental : BaseSummonBuff
|
||||
{
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<WaterElementalMinion>();
|
||||
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.slWaifu;
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.waterEleBuff;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 636 B |
@@ -21,6 +21,7 @@ using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.Brimflame;
|
||||
using CalamityMod.Items.Armor.Daedalus;
|
||||
using CalamityMod.Items.Armor.Demonshade;
|
||||
using CalamityMod.Items.Armor.DesertProwler;
|
||||
using CalamityMod.Items.Armor.Empyrean;
|
||||
using CalamityMod.Items.Armor.LunicCorps;
|
||||
using CalamityMod.Items.Armor.OmegaBlue;
|
||||
@@ -28,7 +29,9 @@ using CalamityMod.Items.Armor.PlagueReaper;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.SnowRuffian;
|
||||
using CalamityMod.Items.Armor.Victide;
|
||||
using CalamityMod.Items.Armor.Wulfrum;
|
||||
using CalamityMod.Items.Dyes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Mounts.Minecarts;
|
||||
using CalamityMod.Items.PermanentBoosters;
|
||||
@@ -103,10 +106,6 @@ namespace CalamityMod.CalPlayer
|
||||
public static int chaosStateDuration = 900;
|
||||
/// <summary> Constant variable used for how long Chaos State is inflicted by Normality Relocator while a boss is alive. </summary>
|
||||
public static int chaosStateDuration_NR = 1200;
|
||||
/// <summary> Used by Sky Stabber and Gods' Paranoia to delete spiky balls when using right-click. </summary>
|
||||
public bool killSpikyBalls = false;
|
||||
public float KameiTrailXScale = 0.1f;
|
||||
public int KameiBladeUseDelay = 0;
|
||||
/// <summary> Stores the positions of the player within the previous 4 frames. Used for drawing trail effects. </summary>
|
||||
public Vector2[] OldPositions = new Vector2[4];
|
||||
public double contactDamageReduction = 0D;
|
||||
@@ -175,6 +174,15 @@ namespace CalamityMod.CalPlayer
|
||||
public int momentumCapacitorTime = 0;
|
||||
/// <summary> A multiplier on the player's movement speed applied while using Momentum Capacitor. </summary>
|
||||
public float momentumCapacitorBoost = 0f;
|
||||
|
||||
public bool countsAsAnyWet => (Player.armor[0].type == ItemID.FishBowl || Player.wetCount > 0 || Player.wet || Player.honeyWet || Player.lavaWet);
|
||||
|
||||
public StatModifier TypelessDebuffMultiplier = new();
|
||||
public StatModifier HeatDebuffMultiplier = new();
|
||||
public StatModifier ColdDebuffMultiplier = new();
|
||||
public StatModifier SicknessDebuffMultiplier = new();
|
||||
public StatModifier WaterDebuffMultiplier = new();
|
||||
public StatModifier ElectricDebuffMultiplier = new();
|
||||
#endregion
|
||||
|
||||
#region Speedrun Timer
|
||||
@@ -299,10 +307,13 @@ namespace CalamityMod.CalPlayer
|
||||
public bool despoilerNerf = false;
|
||||
/// <summary> Variable used to trigger Molten Amputator's stealth effect on right-click. </summary>
|
||||
public int amputatorBuff = 0;
|
||||
/// <summary> Variable used to track the fuel of Pristine Fury right click </summary>
|
||||
public int furyFuelMax = 1800;
|
||||
/// <summary> Variables used to track the fuel of Pristine Fury right click </summary>
|
||||
public int furyFuel = 1800;
|
||||
public const int FuryFuelMax = 1800;
|
||||
public float furyRefuelTimer = 0;
|
||||
/// <summary> Variable used to track if Auger can do a big slash </summary>
|
||||
public bool buffedAuger = false;
|
||||
|
||||
public int rOfResilienceCooldown = 0;
|
||||
public int rOfResilienceEffect = 0;
|
||||
public int rOfResilienceOrbitOffset = 0;
|
||||
@@ -334,10 +345,10 @@ namespace CalamityMod.CalPlayer
|
||||
public int dragonRageHits = 0;
|
||||
/// <summary> Cooldown variable for Dragon Rage's fireball spawning to prevent spamming projectiles when hitting multiple enemies simultaneously. </summary>
|
||||
public int dragonRageCooldown = 0;
|
||||
public float aquaticBoostMax = 10000f;
|
||||
public const float AquaticBoostMax = 10000f;
|
||||
/// <summary>
|
||||
/// Counter variable which controls Aquatic Emblem's stat boosts while underwater.<br/>
|
||||
/// This counter starts at <see cref="aquaticBoostMax"/>, and is decremented by 2 for every frame the player remains underwater, reaching maximum boosts when it hits 0.
|
||||
/// This counter starts at <see cref="AquaticBoostMax"/>, and is decremented by 2 for every frame the player remains underwater, reaching maximum boosts when it hits 0.
|
||||
/// </summary>
|
||||
public float aquaticBoost = 0f;
|
||||
public int galileoCooldown = 0;
|
||||
@@ -403,7 +414,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
public static readonly SoundStyle RogueStealthSound = new("CalamityMod/Sounds/Custom/RogueStealth");
|
||||
public static readonly SoundStyle DefenseDamageSound = new("CalamityMod/Sounds/Custom/DefenseDamage");
|
||||
public static readonly SoundStyle BloodCritSound = new("CalamityMod/Sounds/Custom/BloodPactCrit");
|
||||
|
||||
public static readonly SoundStyle IjiDeathSound = new("CalamityMod/Sounds/Custom/IjiDies");
|
||||
public static readonly SoundStyle DrownSound = new("CalamityMod/Sounds/Custom/AbyssDrown");
|
||||
@@ -456,7 +466,7 @@ namespace CalamityMod.CalPlayer
|
||||
/// This is obtained from a formula derived from the player's current stealth, the weapon's use time, and the player's stealth generation boosts.
|
||||
/// </summary>
|
||||
public float stealthDamage = 0f;
|
||||
/// <summary> An additional damage multiplier applied to rogue stealth strikes. Used by Filthy Glove and its upgrades, and Rotten Dogtooth. </summary>
|
||||
/// <summary> An additional damage multiplier applied to rogue stealth strikes. Used by Filthy Glove, Rotten Dogtooth and their upgrades. </summary>
|
||||
public double bonusStealthDamage = 0;
|
||||
public float rogueVelocity = 1f;
|
||||
#endregion
|
||||
@@ -557,7 +567,6 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
public bool adrenalineModeActive = false;
|
||||
public bool AdrenalineTrail = false;
|
||||
/// <summary> The player's current Adrenaline level. Expressed as a percentage of maximum Adrenaline. </summary>
|
||||
public float adrenaline = 0f;
|
||||
public float adrenalineMax = 100f; // 0 to 100% by default
|
||||
@@ -717,8 +726,8 @@ namespace CalamityMod.CalPlayer
|
||||
public bool gladiatorSword = false;
|
||||
public int gladiatorTimer = 0;
|
||||
public bool unstableGraniteCore = false;
|
||||
public bool regenator = false;
|
||||
public float regenatorDamage = 0;
|
||||
public bool regenerator = false;
|
||||
public float regeneratorDamage = 0;
|
||||
public bool theBee = false;
|
||||
public bool arcFlashRing = false;
|
||||
public bool arcFlashRingVisual = false;
|
||||
@@ -764,8 +773,6 @@ namespace CalamityMod.CalPlayer
|
||||
public int ascendantInsigniaBuffTime = 0;
|
||||
public int ascendantInsigniaCooldown = 0;
|
||||
public bool ascendantTrail = false;
|
||||
public bool frozenWingsCold = false;
|
||||
public bool flameWingsHeat = false;
|
||||
/// <summary> Used to toggle dust spawned while swinging, through accessory visibility. </summary>
|
||||
public bool magmaStoneVisuals = true;
|
||||
public bool eGauntlet = false;
|
||||
@@ -780,10 +787,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool eTalisman = false;
|
||||
public bool lastDashWasTabi = false;
|
||||
public bool statisNinjaBelt = false;
|
||||
/// <summary> Used to keep track of how many dashes in the same direction you make to prevent dashing away from bosses forever at max efficency. </summary>
|
||||
public int statisPenaltyTimer = 0;
|
||||
public int statisAnticheese = 0;
|
||||
public int statisTimerMax => (int)(Utils.Remap(statisAnticheese, 1, 6, 120, 50, true));
|
||||
public bool voidSashVisuals = true;
|
||||
public bool statisVoidSash = false;
|
||||
public bool nucleogenesis = false;
|
||||
@@ -874,7 +877,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool shatteredCommunity = false;
|
||||
public bool fleshTotem = false;
|
||||
public bool bloodPact = false;
|
||||
public bool bloodPactBoost = false;
|
||||
public bool bloodflareCore = false;
|
||||
public int bloodflareCoreRemainingHealOverTime = 0;
|
||||
|
||||
@@ -926,15 +928,14 @@ namespace CalamityMod.CalPlayer
|
||||
public bool spiritOrigin = false;
|
||||
public bool spiritOriginVanity = false;
|
||||
public int spiritOriginCritBoost = 0;
|
||||
/// <summary>
|
||||
/// The amount of bonus crit damage the player has.
|
||||
/// At 0f, the player has regular crit damage. At 1f, the player has +100% crit damage.
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// The amount of bonus crit damage the player has.
|
||||
/// At 0f, the player has regular crit damage. At 1f, the player has +100% crit damage.
|
||||
/// </summary>
|
||||
public float critDamage = 0;
|
||||
public bool darkSunRing = false;
|
||||
public bool crawCarapace = false;
|
||||
public bool baroclaw = false;
|
||||
public bool HasIncreasedDashFirstFrame = false;
|
||||
public bool IsFirstDashFrame = true;
|
||||
public int fallingBootVelCheckTimer = 0;
|
||||
public bool voidOfCalamity = false;
|
||||
@@ -978,16 +979,16 @@ namespace CalamityMod.CalPlayer
|
||||
public bool jellyChargedBattery = false;
|
||||
/// <summary> General cooldown for accessories which spawn projectiles on minion hits. </summary>
|
||||
public float summonProjCooldown;
|
||||
public bool sandWaifu = false;
|
||||
public bool sandWaifuVanity = false;
|
||||
public bool sandBoobWaifu = false;
|
||||
public bool sandBoobWaifuVanity = false;
|
||||
public bool cloudWaifu = false;
|
||||
public bool cloudWaifuVanity = false;
|
||||
public bool brimstoneWaifu = false;
|
||||
public bool brimstoneWaifuVanity = false;
|
||||
public bool sirenWaifu = false;
|
||||
public bool sirenWaifuVanity = false;
|
||||
public bool sandElemental = false;
|
||||
public bool sandElementalVanity = false;
|
||||
public bool rareSandElemental = false;
|
||||
public bool rareSandElementalVanity = false;
|
||||
public bool cloudElemental = false;
|
||||
public bool cloudElementalVanity = false;
|
||||
public bool brimElemental = false;
|
||||
public bool brimElementalVanity = false;
|
||||
public bool waterElemental = false;
|
||||
public bool waterElementalVanity = false;
|
||||
public bool fungalClump = false;
|
||||
public bool fungalClumpVanity = false;
|
||||
public bool howlsHeart = false;
|
||||
@@ -1062,6 +1063,8 @@ namespace CalamityMod.CalPlayer
|
||||
/// <summary> Calamity's Silver armor set bonus; taking over 20 damage heals 10 health if the player avoids damage for 2 seconds. </summary>
|
||||
public bool silverMedkit = false;
|
||||
public int silverMedkitTimer = 0;
|
||||
/// <summary> Calamity's Tungsten armor set bonus; makes grappling hooks fly and retract faster. </summary>
|
||||
public bool tungstenArmorHookBoost = false;
|
||||
/// <summary> Calamity's Gold armor set bonus; makes enemies drop Gold Coins. </summary>
|
||||
public bool goldArmorGoldDrops = false;
|
||||
/// <summary> Calamity's Mining armor set bonus; gives a chance for extra items to drop when mining ores. </summary>
|
||||
@@ -1144,8 +1147,6 @@ namespace CalamityMod.CalPlayer
|
||||
public int titanCooldown = 0;
|
||||
public bool umbraphileSet = false;
|
||||
public bool reaverSpeed = false;
|
||||
public bool reaverRegen = false;
|
||||
public int reaverRegenCooldown = 0;
|
||||
public bool reaverDefense = false;
|
||||
public bool reaverExplore = false;
|
||||
public bool fathomSwarmer = false;
|
||||
@@ -1181,8 +1182,8 @@ namespace CalamityMod.CalPlayer
|
||||
public bool silvaSummon = false;
|
||||
public bool hasSilvaEffect = false;
|
||||
/// <summary> Constant variable representing the duration of Silva armor's revive, in frames. </summary>
|
||||
public const int silvaReviveDuration = 300;
|
||||
public int silvaCountdown = silvaReviveDuration;
|
||||
public const int SilvaReviveDuration = 300;
|
||||
public int silvaCountdown = SilvaReviveDuration;
|
||||
public bool auricSet = false;
|
||||
public bool omegaBlueChestplate = false;
|
||||
public bool omegaBlueSet = false;
|
||||
@@ -1245,25 +1246,25 @@ namespace CalamityMod.CalPlayer
|
||||
public bool alcoholPoisoning = false;
|
||||
public bool shadowflame = false;
|
||||
public bool daybroken = false;
|
||||
public bool wDeath = false;
|
||||
public bool whisperingDeath = false;
|
||||
public bool dragonFire = false;
|
||||
public bool vermillionFlux = false;
|
||||
public bool auricRebuke = false;
|
||||
public bool staticDischarge = false;
|
||||
public bool miracleBlight = false;
|
||||
public bool aCrunch = false;
|
||||
public bool armorCrunch = false;
|
||||
public bool crumble = false;
|
||||
public bool irradiated = false;
|
||||
public bool bFlames = false;
|
||||
public bool brimstoneFlames = false;
|
||||
public bool weakBrimstoneFlames = false;
|
||||
public bool demonicFlames = false;
|
||||
public bool gsInferno = false;
|
||||
public bool godSlayerInferno = false;
|
||||
public bool astralInfection = false;
|
||||
/// <summary> Plague debuff. </summary>
|
||||
public bool pFlames = false;
|
||||
public bool hFlames = false;
|
||||
public bool hInferno = false;
|
||||
public bool bBlood = false;
|
||||
public bool plague = false;
|
||||
public bool holyFlames = false;
|
||||
public bool holyInferno = false;
|
||||
public bool burningBlood = false;
|
||||
public bool brainRot = false;
|
||||
public bool heavybleeding = false;
|
||||
public bool laceration = false;
|
||||
@@ -1274,9 +1275,9 @@ namespace CalamityMod.CalPlayer
|
||||
public bool trueVHex = false;
|
||||
public bool DoGExtremeGravity = false;
|
||||
public bool warped = false;
|
||||
public bool cDepth = false;
|
||||
public bool rTide = false;
|
||||
public bool hPressure = false;
|
||||
public bool crushDepth = false;
|
||||
public bool riptide = false;
|
||||
public bool hadopelagicPressure = false;
|
||||
public bool fishAlert = false;
|
||||
public bool clamity = false;
|
||||
public bool NOU = false;
|
||||
@@ -1286,9 +1287,9 @@ namespace CalamityMod.CalPlayer
|
||||
public bool voidfrost = false;
|
||||
public bool eutrophication = false;
|
||||
/// <summary> Frozen Lungs debuff. </summary>
|
||||
public bool iCantBreathe = false;
|
||||
public bool frozenLungs = false;
|
||||
/// <summary> Searing Lava debuff. </summary>
|
||||
public bool cragsLava = false;
|
||||
public bool searingLava = false;
|
||||
public bool vaporfied = false;
|
||||
public bool banishingFire = false;
|
||||
public bool wither = false;
|
||||
@@ -1319,7 +1320,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool xWrath = false;
|
||||
public bool graxDefense = false;
|
||||
public bool encased = false;
|
||||
public bool brutalCarnage = false;
|
||||
public bool omniscience = false;
|
||||
public bool zerg = false;
|
||||
public bool zen = false;
|
||||
@@ -1446,21 +1446,21 @@ namespace CalamityMod.CalPlayer
|
||||
/// <summary> Enchanted Conch. </summary>
|
||||
public bool hCrab = false;
|
||||
/// <summary> Heart of the Elements. </summary>
|
||||
public bool allWaifus = false;
|
||||
public bool allElementals = false;
|
||||
/// <summary> Hearts of the Elements; however, the minions will not attack. </summary>
|
||||
public bool allWaifusVanity = false;
|
||||
public bool allElementalsVanity = false;
|
||||
/// <summary> Silva armor's Silva Crystal. </summary>
|
||||
public bool sCrystal = false;
|
||||
/// <summary> Elemental in a Bottle. </summary>
|
||||
public bool sWaifu = false;
|
||||
public bool sandEleBuff = false;
|
||||
/// <summary> Rare Elemental in a Bottle. </summary>
|
||||
public bool dWaifu = false;
|
||||
public bool rareSandEleBuff = false;
|
||||
/// <summary> Eye of the Storm. </summary>
|
||||
public bool cWaifu = false;
|
||||
public bool cloudEleBuff = false;
|
||||
/// <summary> Rose Stone. </summary>
|
||||
public bool bWaifu = false;
|
||||
public bool brimEleBuff = false;
|
||||
/// <summary> Pearl of Enthrallment. </summary>
|
||||
public bool slWaifu = false;
|
||||
public bool waterEleBuff = false;
|
||||
public bool fClump = false;
|
||||
/// <summary> Demonshade armor's Red Devil. </summary>
|
||||
public bool rDevil = false;
|
||||
@@ -1577,33 +1577,19 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region Transformation
|
||||
public bool abyssalDivingSuitPrevious;
|
||||
public bool abyssalDivingSuit;
|
||||
public bool abyssalDivingSuitHide;
|
||||
public bool abyssalDivingSuitForce;
|
||||
public bool abyssalDivingSuitPower;
|
||||
public bool abyssalDivingSuitPrevious;
|
||||
public bool profanedCrystal;
|
||||
public int profanedCrystalStatePrevious;
|
||||
public bool profanedCrystalPrevious;
|
||||
public int profanedCrystalAnim;
|
||||
public bool profanedCrystalForce;
|
||||
public bool profanedCrystalBuffs;
|
||||
public bool profanedCrystalHide;
|
||||
public KeyValuePair<int, int> profanedCrystalWingCounter = new KeyValuePair<int, int>(0, 10);
|
||||
public KeyValuePair<int, int> profanedCrystalAnimCounter = new KeyValuePair<int, int>(0, 10);
|
||||
|
||||
public int pscState;
|
||||
public Color pscLerpColor = Color.White;
|
||||
public bool aquaticHeartPrevious;
|
||||
public bool aquaticHeart;
|
||||
public bool aquaticHeartHide;
|
||||
public bool aquaticHeartForce;
|
||||
public bool aquaticHeartPower;
|
||||
public bool snowmanPrevious;
|
||||
public bool snowman;
|
||||
public bool snowmanHide;
|
||||
public bool snowmanForce;
|
||||
public bool snowmanNoseless;
|
||||
public bool snowmanPower;
|
||||
public bool meldTransformationPrevious;
|
||||
public bool meldTransformation;
|
||||
public bool meldTransformationForce;
|
||||
@@ -1612,8 +1598,6 @@ namespace CalamityMod.CalPlayer
|
||||
public bool omegaBlueTransformation;
|
||||
public bool omegaBlueTransformationForce;
|
||||
public bool omegaBlueTransformationPower;
|
||||
public bool ghostBracelet;
|
||||
public bool punchCard;
|
||||
#endregion
|
||||
|
||||
#region Calamitas Enchant Effects
|
||||
@@ -1998,10 +1982,9 @@ namespace CalamityMod.CalPlayer
|
||||
public override void ResetEffects()
|
||||
{
|
||||
if (fleshKnuckles)
|
||||
Player.statLifeMax2 += 45;
|
||||
Player.statLifeMax2 += 25;
|
||||
|
||||
int percentMaxLifeIncrease = 0;
|
||||
|
||||
// Blood Pact and Chalice of the Blood God stack their HP bonuses if you want to equip both
|
||||
if (bloodPact)
|
||||
percentMaxLifeIncrease += 25;
|
||||
@@ -2171,7 +2154,7 @@ namespace CalamityMod.CalPlayer
|
||||
trinketOfChi = false;
|
||||
gladiatorSword = false;
|
||||
unstableGraniteCore = false;
|
||||
regenator = false;
|
||||
regenerator = false;
|
||||
deepDiver = false;
|
||||
theBee = false;
|
||||
arcFlashRing = false;
|
||||
@@ -2232,8 +2215,6 @@ namespace CalamityMod.CalPlayer
|
||||
cryogenSoul = false;
|
||||
ascendantInsignia = false;
|
||||
ascendantTrail = false;
|
||||
frozenWingsCold = false;
|
||||
flameWingsHeat = false;
|
||||
magmaStoneVisuals = true;
|
||||
eGauntlet = false;
|
||||
eGauntletVisuals = true;
|
||||
@@ -2346,7 +2327,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
avertorBonus = false;
|
||||
|
||||
reaverRegen = false;
|
||||
reaverSpeed = false;
|
||||
reaverDefense = false;
|
||||
reaverExplore = false;
|
||||
@@ -2378,6 +2358,7 @@ namespace CalamityMod.CalPlayer
|
||||
forbiddenCirclet = false;
|
||||
|
||||
silverMedkit = false;
|
||||
tungstenArmorHookBoost = false;
|
||||
goldArmorGoldDrops = false;
|
||||
|
||||
miningSet = false;
|
||||
@@ -2460,26 +2441,26 @@ namespace CalamityMod.CalPlayer
|
||||
alcoholPoisoning = false;
|
||||
shadowflame = false;
|
||||
daybroken = false;
|
||||
wDeath = false;
|
||||
whisperingDeath = false;
|
||||
dragonFire = false;
|
||||
vermillionFlux = false;
|
||||
auricRebuke = false;
|
||||
staticDischarge = false;
|
||||
miracleBlight = false;
|
||||
aCrunch = false;
|
||||
armorCrunch = false;
|
||||
crumble = false;
|
||||
irradiated = false;
|
||||
bFlames = false;
|
||||
brimstoneFlames = false;
|
||||
witheredDebuff = false;
|
||||
absorberAffliction = false;
|
||||
weakBrimstoneFlames = false;
|
||||
demonicFlames = false;
|
||||
gsInferno = false;
|
||||
godSlayerInferno = false;
|
||||
astralInfection = false;
|
||||
pFlames = false;
|
||||
hFlames = false;
|
||||
hInferno = false;
|
||||
bBlood = false;
|
||||
plague = false;
|
||||
holyFlames = false;
|
||||
holyInferno = false;
|
||||
burningBlood = false;
|
||||
brainRot = false;
|
||||
heavybleeding = false;
|
||||
laceration = false;
|
||||
@@ -2489,9 +2470,9 @@ namespace CalamityMod.CalPlayer
|
||||
trueVHex = false;
|
||||
DoGExtremeGravity = false;
|
||||
warped = false;
|
||||
cDepth = false;
|
||||
rTide = false;
|
||||
hPressure = false;
|
||||
crushDepth = false;
|
||||
riptide = false;
|
||||
hadopelagicPressure = false;
|
||||
fishAlert = false;
|
||||
clamity = false;
|
||||
NOU = false;
|
||||
@@ -2501,13 +2482,20 @@ namespace CalamityMod.CalPlayer
|
||||
nightwither = false;
|
||||
voidfrost = false;
|
||||
eutrophication = false;
|
||||
iCantBreathe = false;
|
||||
cragsLava = false;
|
||||
frozenLungs = false;
|
||||
searingLava = false;
|
||||
vaporfied = false;
|
||||
banishingFire = false;
|
||||
wither = false;
|
||||
ManaBurn = false;
|
||||
|
||||
TypelessDebuffMultiplier = new();
|
||||
HeatDebuffMultiplier = new();
|
||||
ColdDebuffMultiplier = new();
|
||||
SicknessDebuffMultiplier = new();
|
||||
WaterDebuffMultiplier = new();
|
||||
ElectricDebuffMultiplier = new();
|
||||
|
||||
trinketOfChiBuff = false;
|
||||
sandsWindBuff = false;
|
||||
aeolianEarthBuff = false;
|
||||
@@ -2518,7 +2506,6 @@ namespace CalamityMod.CalPlayer
|
||||
xWrath = false;
|
||||
graxDefense = false;
|
||||
encased = false;
|
||||
brutalCarnage = false;
|
||||
omniscience = false;
|
||||
zerg = false;
|
||||
zen = false;
|
||||
@@ -2552,8 +2539,6 @@ namespace CalamityMod.CalPlayer
|
||||
bloodfinBoost = false;
|
||||
divineBless = false;
|
||||
|
||||
killSpikyBalls = false;
|
||||
|
||||
vodka = false;
|
||||
redWine = false;
|
||||
grapeBeer = false;
|
||||
@@ -2612,11 +2597,11 @@ namespace CalamityMod.CalPlayer
|
||||
pGuy = false;
|
||||
cEnergy = false;
|
||||
pSoulGuardians = false;
|
||||
sWaifu = false;
|
||||
dWaifu = false;
|
||||
cWaifu = false;
|
||||
bWaifu = false;
|
||||
slWaifu = false;
|
||||
sandEleBuff = false;
|
||||
rareSandEleBuff = false;
|
||||
cloudEleBuff = false;
|
||||
brimEleBuff = false;
|
||||
waterEleBuff = false;
|
||||
fClump = false;
|
||||
rDevil = false;
|
||||
aValkyrie = false;
|
||||
@@ -2630,18 +2615,18 @@ namespace CalamityMod.CalPlayer
|
||||
rOrb = false;
|
||||
dCrystal = false;
|
||||
MutatedTruffleBool = false;
|
||||
sandWaifu = false;
|
||||
sandWaifuVanity = false;
|
||||
sandBoobWaifu = false;
|
||||
sandBoobWaifuVanity = false;
|
||||
cloudWaifu = false;
|
||||
cloudWaifuVanity = false;
|
||||
brimstoneWaifu = false;
|
||||
brimstoneWaifuVanity = false;
|
||||
sirenWaifu = false;
|
||||
sirenWaifuVanity = false;
|
||||
allWaifus = false;
|
||||
allWaifusVanity = false;
|
||||
sandElemental = false;
|
||||
sandElementalVanity = false;
|
||||
rareSandElemental = false;
|
||||
rareSandElementalVanity = false;
|
||||
cloudElemental = false;
|
||||
cloudElementalVanity = false;
|
||||
brimElemental = false;
|
||||
brimElementalVanity = false;
|
||||
waterElemental = false;
|
||||
waterElementalVanity = false;
|
||||
allElementals = false;
|
||||
allElementalsVanity = false;
|
||||
fungalClump = false;
|
||||
fungalClumpVanity = false;
|
||||
howlsHeart = false;
|
||||
@@ -2724,32 +2709,24 @@ namespace CalamityMod.CalPlayer
|
||||
*/
|
||||
|
||||
abyssalDivingSuitPrevious = abyssalDivingSuit;
|
||||
abyssalDivingSuit = abyssalDivingSuitHide = abyssalDivingSuitForce = abyssalDivingSuitPower = false;
|
||||
abyssalDivingSuit = false;
|
||||
|
||||
aquaticHeartPrevious = aquaticHeart;
|
||||
aquaticHeart = aquaticHeartHide = aquaticHeartForce = aquaticHeartPower = false;
|
||||
aquaticHeart = false;
|
||||
|
||||
profanedCrystalStatePrevious = pscState;
|
||||
profanedCrystalPrevious = profanedCrystal;
|
||||
profanedCrystal = profanedCrystalBuffs = profanedCrystalForce = profanedCrystalHide = false;
|
||||
profanedCrystal = profanedCrystalBuffs = false;
|
||||
pscState = 0;
|
||||
pscLerpColor = Color.White;
|
||||
|
||||
snowmanPrevious = snowman;
|
||||
snowman = snowmanHide = snowmanForce = snowmanPower = false;
|
||||
|
||||
meldTransformationPrevious = meldTransformation;
|
||||
meldTransformation = meldTransformationForce = meldTransformationPower = false;
|
||||
|
||||
omegaBlueTransformationPrevious = omegaBlueTransformation;
|
||||
omegaBlueTransformation = omegaBlueTransformationForce = omegaBlueTransformationPower = false;
|
||||
|
||||
ghostBracelet = false;
|
||||
punchCard = false;
|
||||
|
||||
rageModeActive = false;
|
||||
adrenalineModeActive = false;
|
||||
AdrenalineTrail = false;
|
||||
RageDuration = BalancingConstants.DefaultRageDuration;
|
||||
RageDamageBoost = BalancingConstants.DefaultRageDamageBoost;
|
||||
|
||||
@@ -2795,14 +2772,12 @@ namespace CalamityMod.CalPlayer
|
||||
public override void ModifyScreenPosition()
|
||||
{
|
||||
// CIT 08FEB2025: Photosensitivity config also disables screenshake
|
||||
if (CalamityClientConfig.Instance.ScreenshakePower == 0 || CalamityClientConfig.Instance.Photosensitivity)
|
||||
return;
|
||||
bool allowScreenshake = CalamityClientConfig.Instance.ScreenshakePower > 0 && !CalamityClientConfig.Instance.Photosensitivity;
|
||||
|
||||
if (GeneralScreenShakePower > 0f)
|
||||
{
|
||||
if (GeneralScreenShakePower > 0f && allowScreenshake)
|
||||
Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower, GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower);
|
||||
GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityClientConfig.Instance.ScreenshakePower);
|
||||
}
|
||||
|
||||
GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityClientConfig.Instance.ScreenshakePower);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -2912,11 +2887,9 @@ namespace CalamityMod.CalPlayer
|
||||
jetPackDirection = 0;
|
||||
andromedaCripple = 0;
|
||||
theBeeCooldown = 0;
|
||||
killSpikyBalls = false;
|
||||
scuttlerCooldown = 0;
|
||||
rogueCrownCooldown = 0;
|
||||
wingProjectileCooldown = 0;
|
||||
statisPenaltyTimer = -1;
|
||||
hallowedRuneCooldown = 0;
|
||||
sulphurBubbleCooldown = 0;
|
||||
ladHearts = 0;
|
||||
@@ -2927,26 +2900,26 @@ namespace CalamityMod.CalPlayer
|
||||
alcoholPoisoning = false;
|
||||
shadowflame = false;
|
||||
daybroken = false;
|
||||
wDeath = false;
|
||||
whisperingDeath = false;
|
||||
dragonFire = false;
|
||||
vermillionFlux = false;
|
||||
auricRebuke = false;
|
||||
staticDischarge = false;
|
||||
miracleBlight = false;
|
||||
aCrunch = false;
|
||||
armorCrunch = false;
|
||||
crumble = false;
|
||||
irradiated = false;
|
||||
bFlames = false;
|
||||
brimstoneFlames = false;
|
||||
witheredDebuff = false;
|
||||
absorberAffliction = false;
|
||||
weakBrimstoneFlames = false;
|
||||
demonicFlames = false;
|
||||
gsInferno = false;
|
||||
godSlayerInferno = false;
|
||||
astralInfection = false;
|
||||
pFlames = false;
|
||||
hFlames = false;
|
||||
hInferno = false;
|
||||
bBlood = false;
|
||||
plague = false;
|
||||
holyFlames = false;
|
||||
holyInferno = false;
|
||||
burningBlood = false;
|
||||
brainRot = false;
|
||||
heavybleeding = false;
|
||||
laceration = false;
|
||||
@@ -2956,9 +2929,9 @@ namespace CalamityMod.CalPlayer
|
||||
trueVHex = false;
|
||||
DoGExtremeGravity = false;
|
||||
warped = false;
|
||||
cDepth = false;
|
||||
rTide = false;
|
||||
hPressure = false;
|
||||
crushDepth = false;
|
||||
riptide = false;
|
||||
hadopelagicPressure = false;
|
||||
fishAlert = false;
|
||||
clamity = false;
|
||||
NOU = false;
|
||||
@@ -2968,13 +2941,19 @@ namespace CalamityMod.CalPlayer
|
||||
nightwither = false;
|
||||
voidfrost = false;
|
||||
eutrophication = false;
|
||||
iCantBreathe = false;
|
||||
cragsLava = false;
|
||||
frozenLungs = false;
|
||||
searingLava = false;
|
||||
vaporfied = false;
|
||||
banishingFire = false;
|
||||
wither = false;
|
||||
PurityHealSlowdownFrames = 0;
|
||||
ImmobilityDebuffImmunityTimer = 0;
|
||||
TypelessDebuffMultiplier = new();
|
||||
HeatDebuffMultiplier = new();
|
||||
ColdDebuffMultiplier = new();
|
||||
SicknessDebuffMultiplier = new();
|
||||
WaterDebuffMultiplier = new();
|
||||
ElectricDebuffMultiplier = new();
|
||||
#endregion
|
||||
|
||||
#region Rogue
|
||||
@@ -3019,7 +2998,6 @@ namespace CalamityMod.CalPlayer
|
||||
xWrath = false;
|
||||
graxDefense = false;
|
||||
encased = false;
|
||||
brutalCarnage = false;
|
||||
omniscience = false;
|
||||
zerg = false;
|
||||
zen = false;
|
||||
@@ -3096,6 +3074,7 @@ namespace CalamityMod.CalPlayer
|
||||
#region Armor Set Bonuses
|
||||
silverMedkit = false;
|
||||
silverMedkitTimer = 0;
|
||||
tungstenArmorHookBoost = false;
|
||||
goldArmorGoldDrops = false;
|
||||
miningSet = false;
|
||||
miningSetCooldown = 0;
|
||||
@@ -3112,7 +3091,7 @@ namespace CalamityMod.CalPlayer
|
||||
silvaMage = false;
|
||||
silvaSummon = false;
|
||||
hasSilvaEffect = false;
|
||||
silvaCountdown = silvaReviveDuration;
|
||||
silvaCountdown = SilvaReviveDuration;
|
||||
auricSet = false;
|
||||
GemTechSet = false;
|
||||
CobaltSet = false;
|
||||
@@ -3137,8 +3116,6 @@ namespace CalamityMod.CalPlayer
|
||||
lunicCorpsSet = false;
|
||||
lunicCorpsLegs = false;
|
||||
reaverSpeed = false;
|
||||
reaverRegen = false;
|
||||
reaverRegenCooldown = 0;
|
||||
reaverDefense = false;
|
||||
reaverExplore = false;
|
||||
shadeRegen = false;
|
||||
@@ -3231,8 +3208,6 @@ namespace CalamityMod.CalPlayer
|
||||
CurrentlyViewedHologramText = string.Empty;
|
||||
#endregion
|
||||
|
||||
KameiBladeUseDelay = 0;
|
||||
AdrenalineTrail = false;
|
||||
ascendantTrail = false;
|
||||
evilSmasherBoost = 0;
|
||||
burningSeaBurnOut = 0;
|
||||
@@ -3546,19 +3521,16 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
PlayerLoader.ArmorSetBonusActivated(Player);
|
||||
|
||||
if (CalamityClientConfig.Instance.CalamityArmorSetBonusDoubleTap)
|
||||
// Activate vanilla set bonuses
|
||||
if (Player.setVortex && !Player.mount.Active)
|
||||
Player.vortexStealthActive = !Player.vortexStealthActive;
|
||||
|
||||
if (Player.setForbidden)
|
||||
{
|
||||
// Activate vanilla set bonuses
|
||||
if (Player.setVortex && !Player.mount.Active)
|
||||
Player.vortexStealthActive = !Player.vortexStealthActive;
|
||||
Player.MinionRestTargetAim();
|
||||
|
||||
if (Player.setForbidden)
|
||||
{
|
||||
Player.MinionRestTargetAim();
|
||||
|
||||
if (!Player.setForbiddenCooldownLocked)
|
||||
Player.CommandForbiddenStorm();
|
||||
}
|
||||
if (!Player.setForbiddenCooldownLocked)
|
||||
Player.CommandForbiddenStorm();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3771,10 +3743,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
public override void ArmorSetBonusActivated()
|
||||
{
|
||||
// Don't trigger set bonuses if the config is disabled and the double-tap hotkey was triggered
|
||||
if (!(CalamityKeybinds.ArmorSetBonusHotKey.JustPressed || CalamityClientConfig.Instance.CalamityArmorSetBonusDoubleTap))
|
||||
return;
|
||||
|
||||
// TODO -- It would be nice if triggerable set bonuses used interfaces instead of having to go through this large if chain.
|
||||
if (brimflameSet && !Player.HasCooldown(BrimflameFrenzy.ID))
|
||||
{
|
||||
@@ -3782,14 +3750,13 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (brimflameFrenzy)
|
||||
{
|
||||
brimflameFrenzy = false;
|
||||
Player.ClearBuff(BuffType<BrimflameFrenzyBuff>());
|
||||
Player.AddCooldown(BrimflameFrenzy.ID, BrimflameCowl.FrenzyCooldown);
|
||||
}
|
||||
else
|
||||
{
|
||||
brimflameFrenzy = true;
|
||||
Player.AddBuff(BuffType<BrimflameFrenzyBuff>(), 10 * 60, true);
|
||||
SoundEngine.PlaySound(BrimflameScowl.ActivationSound, Player.Center);
|
||||
Player.AddBuff(BuffType<BrimflameFrenzyBuff>(), BrimflameCowl.FrenzyDuration, true);
|
||||
SoundEngine.PlaySound(BrimflameCowl.ActivationSound, Player.Center);
|
||||
for (int i = 0; i < 36; i++)
|
||||
{
|
||||
Dust brimDust = Dust.NewDustDirect(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
|
||||
@@ -3943,6 +3910,30 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (prismaticSet && !Player.HasCooldown(PrismaticLaser.ID) && prismaticLasers <= 0)
|
||||
prismaticLasers = CalamityUtils.SecondsToFrames(35f);
|
||||
if (WulfrumHat.HasArmorSet(Player))
|
||||
{
|
||||
//Only activate if no cooldown & available scrap.
|
||||
if (cooldowns.TryGetValue(WulfrumBastion.ID, out CooldownInstance cd))
|
||||
{
|
||||
// Quick dismount if activated again
|
||||
if (cd.timeLeft > WulfrumHat.BastionCooldown && cd.timeLeft < WulfrumHat.BastionCooldown + WulfrumHat.BastionTime - 60 * 3)
|
||||
{
|
||||
cd.timeLeft = WulfrumHat.BastionCooldown + 1;
|
||||
SyncCooldownDictionary(false);
|
||||
}
|
||||
}
|
||||
|
||||
else if (Player.HasItem(ItemType<WulfrumMetalScrap>()))
|
||||
{
|
||||
Player.ConsumeItem(ItemType<WulfrumMetalScrap>());
|
||||
//I Thiiiinnnk there's no need to add mp syncing packets since cooldowns get auto synced right
|
||||
Player.AddCooldown(WulfrumBastion.ID, WulfrumHat.BastionCooldown + WulfrumHat.BastionTime);
|
||||
//Though do I need to sync that or is the player inventory auto synced?
|
||||
WulfrumHat.DummyCannon.SetDefaults(ItemType<WulfrumFusionCannon>());
|
||||
}
|
||||
}
|
||||
if (DesertProwlerHat.HasArmorSet(Player) && !Player.HasCooldown(SandsmokeBomb.ID))
|
||||
Player.AddCooldown(SandsmokeBomb.ID, DesertProwlerHat.SmokeCooldown + DesertProwlerHat.SmokeDuration);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -4052,6 +4043,11 @@ namespace CalamityMod.CalPlayer
|
||||
// Putting this in GlobalItem will run multiple times for each slot, which this system already does, creating a slew of problems.
|
||||
VanillaArmorChangeManager.ApplyPotentialEffectsTo(Player);
|
||||
|
||||
// Nerf to the proc rate of Spectre Mask's set bonus souls
|
||||
// Vanilla subtracts 6.6666665 from this counter per frame, this reduces it to 4
|
||||
if (Player.ghostDmg > 0)
|
||||
Player.ghostDmg += 2.6666665f;
|
||||
|
||||
// If the config is enabled, vastly increase the player's base tile and wall placement speeds
|
||||
// This stacks with the Brick Layer and Portable Cement Mixer
|
||||
if (CalamityServerConfig.Instance.FasterTilePlacement)
|
||||
@@ -4082,7 +4078,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (timePotionSick == 1 && Player.whoAmI == Main.myPlayer && absorber)
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ProjectileType<AbsorberAura>(), 0, 0, Player.whoAmI);
|
||||
|
||||
if (snowman)
|
||||
if (Player.Transformation().Type == ModContent.ItemType<Popo>())
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer && !snowmanNoseless)
|
||||
Player.AddBuff(BuffType<PopoBuff>(), 60, true);
|
||||
@@ -4358,15 +4354,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
float baseRecoveryRate = Main.expertMode ? BalancingConstants.LifeStealRecoveryRate_Expert : BalancingConstants.LifeStealRecoveryRate_Classic;
|
||||
|
||||
float lifeStealRecoveryRateReduction =
|
||||
CalamityWorld.death ? BalancingConstants.LifeStealRecoveryRateReduction_Death :
|
||||
CalamityWorld.revenge ? BalancingConstants.LifeStealRecoveryRateReduction_Revengeance :
|
||||
Main.expertMode ? BalancingConstants.LifeStealRecoveryRateReduction_Expert :
|
||||
BalancingConstants.LifeStealRecoveryRateReduction_Classic;
|
||||
|
||||
if (Main.masterMode)
|
||||
lifeStealRecoveryRateReduction += BalancingConstants.LifeStealRecoveryRateReduction_Master;
|
||||
float lifeStealRecoveryRateReduction = Main.expertMode ? BalancingConstants.LifeStealRecoveryRateReduction_Expert : BalancingConstants.LifeStealRecoveryRateReduction_Classic;
|
||||
|
||||
float lifeStealRecoveryRate = baseRecoveryRate - lifeStealRecoveryRateReduction;
|
||||
if (Player.lifeSteal < -lifeStealRecoveryRate)
|
||||
@@ -4891,37 +4879,6 @@ namespace CalamityMod.CalPlayer
|
||||
&& Player.armor[1].type == ModContent.ItemType<SnowRuffianChestplate>()
|
||||
&& Player.armor[2].type == ModContent.ItemType<SnowRuffianGreaves>())
|
||||
snowRuffianSet = true;
|
||||
|
||||
// Accessories
|
||||
for (int i = 3; i < 8; i++)
|
||||
{
|
||||
Item vanity = Player.armor[i];
|
||||
|
||||
if (vanity.type == ModContent.ItemType<AbandonedWulfrumHelmet>())
|
||||
Player.GetModPlayer<WulfrumTransformationPlayer>().transformationActive = true;
|
||||
if (vanity.type == ModContent.ItemType<AbyssalDivingSuit>())
|
||||
abyssalDivingSuitForce = true;
|
||||
if (vanity.type == ModContent.ItemType<AquaticHeart>())
|
||||
aquaticHeartForce = true;
|
||||
if (vanity.type == ModContent.ItemType<GhostBracelet>())
|
||||
ghostBracelet = true;
|
||||
if (vanity.type == ModContent.ItemType<HapuFruit>())
|
||||
Player.GetModPlayer<HapuFruitPlayer>().vanityEquipped = true;
|
||||
if (vanity.type == ModContent.ItemType<OracleHeadphones>())
|
||||
Player.GetModPlayer<OracleHeadphonesPlayer>().vanityEquipped = true;
|
||||
if (vanity.type == ModContent.ItemType<Popo>())
|
||||
snowmanForce = true;
|
||||
if (vanity.type == ModContent.ItemType<ProfanedSoulCrystal>())
|
||||
profanedCrystalForce = true;
|
||||
if (vanity.type == ModContent.ItemType<PunchCard>())
|
||||
punchCard = true;
|
||||
if (vanity.type == ModContent.ItemType<SharkyPlush>())
|
||||
Player.GetModPlayer<SharkyPlushPlayer>().vanityEquipped = true;
|
||||
if (vanity.type == ModContent.ItemType<XyksBlessingBlue>())
|
||||
Player.GetModPlayer<XyksBlessingBluePlayer>().vanityEquipped = true;
|
||||
if (vanity.type == ModContent.ItemType<XyksBlessingOrange>())
|
||||
Player.GetModPlayer<XyksBlessingOrangePlayer>().vanityEquipped = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.Calamity().andromedaState == AndromedaPlayerState.LargeRobot ||
|
||||
@@ -4929,58 +4886,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "HeadlessEquipTexture", EquipType.Head); // To make the head invisible on the map. The map was having a hissy fit because of hitbox changes.
|
||||
}
|
||||
else if ((profanedCrystal || profanedCrystalForce) && !profanedCrystalHide)
|
||||
{
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, Main.dayTime ? "ProfanedSoulCrystal" : "PscNightLegs", EquipType.Legs);
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "ProfanedSoulCrystal", EquipType.Body);
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, Main.dayTime ? "ProfanedSoulCrystal" : "PscNightHead", EquipType.Head);
|
||||
Player.wings = EquipLoader.GetEquipSlot(Mod, Main.dayTime ? "ProfanedSoulCrystal" : "PscNightWings", EquipType.Wings);
|
||||
Player.face = -1;
|
||||
|
||||
bool enrage = pscState >= (int)ProfanedSoulCrystal.ProfanedSoulCrystalState.Enraged;
|
||||
|
||||
if (profanedCrystalWingCounter.Value == 0)
|
||||
{
|
||||
int key = profanedCrystalWingCounter.Key;
|
||||
profanedCrystalWingCounter = new KeyValuePair<int, int>(key == 3 ? 0 : key + 1, enrage ? 5 : 8);
|
||||
}
|
||||
|
||||
Player.wingFrame = profanedCrystalWingCounter.Key;
|
||||
profanedCrystalWingCounter = new KeyValuePair<int, int>(profanedCrystalWingCounter.Key, profanedCrystalWingCounter.Value - 1);
|
||||
Player.armorEffectDrawOutlines = true;
|
||||
if (profanedCrystalBuffs)
|
||||
{
|
||||
Player.armorEffectDrawShadow = true;
|
||||
if (enrage)
|
||||
{
|
||||
Player.armorEffectDrawOutlinesForbidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((snowmanPower || snowmanForce) && !snowmanHide)
|
||||
{
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, "Popo", EquipType.Legs);
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "Popo", EquipType.Body);
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, snowmanNoseless ? "PopoNoseless" : "Popo", EquipType.Head);
|
||||
Player.face = -1;
|
||||
}
|
||||
else if (AresExoskeleton.ArmExists(Player))
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "AresExoskeleton", EquipType.Body);
|
||||
|
||||
else if ((abyssalDivingSuitPower || abyssalDivingSuitForce) && !abyssalDivingSuitHide)
|
||||
{
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Legs);
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Body);
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Head);
|
||||
Player.face = -1;
|
||||
}
|
||||
else if ((aquaticHeartPower || aquaticHeartForce) && !aquaticHeartHide)
|
||||
{
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Legs);
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Body);
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Head);
|
||||
Player.face = -1;
|
||||
}
|
||||
else if (meldTransformationPower || meldTransformationForce)
|
||||
{
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, "MeldTransformation", EquipType.Legs);
|
||||
@@ -4995,26 +4902,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (hasOmegaBlueCooldown && cd.timeLeft > 1500)
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "OmegaBlueTransformation", EquipType.Head);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (profanedCrystalWingCounter.Key != 1)
|
||||
profanedCrystalWingCounter = new KeyValuePair<int, int>(1, 7);
|
||||
if (profanedCrystalAnimCounter.Key != 0)
|
||||
profanedCrystalAnimCounter = new KeyValuePair<int, int>(0, 10);
|
||||
}
|
||||
|
||||
if (ghostBracelet)
|
||||
{
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Legs);
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Body);
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Head);
|
||||
}
|
||||
if (punchCard)
|
||||
{
|
||||
Player.legs = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Legs);
|
||||
Player.body = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Body);
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Head);
|
||||
}
|
||||
|
||||
if (snowRuffianSet)
|
||||
{
|
||||
@@ -5024,7 +4912,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (!Player.mount.Active)
|
||||
{
|
||||
Player.velocity.Y *= 0.9f;
|
||||
Player.velocity.Y *= SnowRuffianMask.GlideFallSpeedMult;
|
||||
Player.wingFrame = 3;
|
||||
}
|
||||
Player.noFallDmg = true;
|
||||
@@ -5612,60 +5500,6 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsValidTransitionFrame(AnimationType currentAnim, AnimationType newAnim, int frame, int counter) //this exists so it doesn't loop through the entire walk/idle anim just to find one frame for switching.
|
||||
{
|
||||
bool result = newAnim != AnimationType.Jump && currentAnim != AnimationType.Jump;
|
||||
if (currentAnim == AnimationType.Walk && newAnim == AnimationType.Idle)
|
||||
{
|
||||
result = counter <= 0 && (frame == 11 || frame == 15 || frame == 19);
|
||||
}
|
||||
else if (currentAnim == AnimationType.Idle && newAnim == AnimationType.Walk)
|
||||
{
|
||||
result = counter <= 0 && (frame == 2 || frame == 6);
|
||||
}
|
||||
return currentAnim != newAnim && result; //swapping to jumps should be instant, no need to check the counter here
|
||||
}
|
||||
|
||||
private int HandlePSCAnimationFrames(AnimationType newType)
|
||||
{
|
||||
int key = profanedCrystalAnimCounter.Key; //0-based indexing
|
||||
int value = profanedCrystalAnimCounter.Value - 1;
|
||||
AnimationType currentType = key < 8 ? AnimationType.Idle : key == 8 ? AnimationType.Jump : AnimationType.Walk;
|
||||
|
||||
bool isInvalidTransFrame = !IsValidTransitionFrame(currentType, newType, key, value); //to make the transition between walk and idle frames less jarring and smoother
|
||||
AnimationType type = isInvalidTransFrame ? newType : currentType;
|
||||
int frameCount = type == AnimationType.Walk || (!profanedCrystalForce && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 7 : 10;
|
||||
int lowerRange = type == AnimationType.Idle ? 0 : type == AnimationType.Jump ? 8 : 9;
|
||||
int upperRange = type == AnimationType.Idle ? 7 : type == AnimationType.Jump ? 8 : 22;
|
||||
if (value <= 0 || !isInvalidTransFrame)
|
||||
{
|
||||
value = frameCount;
|
||||
if (key >= lowerRange && key < upperRange)
|
||||
key++;
|
||||
else
|
||||
key = lowerRange;
|
||||
}
|
||||
profanedCrystalAnimCounter = new KeyValuePair<int, int>(key, value);
|
||||
return profanedCrystalAnimCounter.Key;
|
||||
}
|
||||
|
||||
public override void PostUpdate() //needs to be here else it doesn't work properly, otherwise i'd have stuck it with the wing anim stuffs
|
||||
{
|
||||
bool validEquipSlot = Player.legs == EquipLoader.GetEquipSlot(Mod, "ProfanedSoulCrystal", EquipType.Legs) ||
|
||||
Player.legs == EquipLoader.GetEquipSlot(Mod, "PscNightLegs", EquipType.Legs);
|
||||
if (!profanedCrystalHide && (profanedCrystal || profanedCrystalForce) && validEquipSlot)
|
||||
{
|
||||
bool usingCarpet = Player.carpetTime > 0 && Player.controlJump; //doesn't make sense for carpet to use jump frame since you have solid ground
|
||||
AnimationType animType = AnimationType.Walk;
|
||||
if ((Player.sliding || Player.velocity.Y != 0 || Player.mount.Active || (Player.grappling[0] != -1 || !Player.CheckSolidGround()) || Player.GoingDownWithGrapple) && !usingCarpet)
|
||||
animType = AnimationType.Jump;
|
||||
else if (Player.velocity.X == 0 || usingCarpet)
|
||||
animType = AnimationType.Idle;
|
||||
int frame = HandlePSCAnimationFrames(animType);
|
||||
Player.legFrame.Y = Player.legFrame.Height * frame;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Misc Stuff
|
||||
|
||||
@@ -199,10 +199,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (calamityPlayer.auricRebuke && drawInfo.shadow == 0f)
|
||||
AuricRebuke.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.bBlood && drawInfo.shadow == 0f)
|
||||
if (calamityPlayer.burningBlood && drawInfo.shadow == 0f)
|
||||
BurningBlood.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.bFlames && drawInfo.shadow == 0f)
|
||||
if (calamityPlayer.brimstoneFlames && drawInfo.shadow == 0f)
|
||||
{
|
||||
bool resistsBrimstoneFlames = abaddon; // Looks weaker if you have Abaddon equipped
|
||||
BrimstoneFlames.DrawEffects(drawInfo, resistsBrimstoneFlames);
|
||||
@@ -211,7 +211,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (calamityPlayer.brainRot && drawInfo.shadow == 0f)
|
||||
BrainRot.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.cDepth && drawInfo.shadow == 0f)
|
||||
if (calamityPlayer.crushDepth && drawInfo.shadow == 0f)
|
||||
CrushDepth.DrawEffects(drawInfo);
|
||||
|
||||
// Daybroken's visual effects are reduced if the player resists it
|
||||
@@ -230,17 +230,17 @@ namespace CalamityMod.CalPlayer
|
||||
if (calamityPlayer.eutrophication && drawInfo.shadow == 0f)
|
||||
Eutrophication.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.gsInferno && drawInfo.shadow == 0f)
|
||||
if (calamityPlayer.godSlayerInferno && drawInfo.shadow == 0f)
|
||||
GodSlayerInferno.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.heavybleeding && drawInfo.shadow == 0f)
|
||||
HeavyBleeding.DrawEffects(drawInfo);
|
||||
|
||||
// Holy Flames, Holy Inferno and Banishing Fire share the same visual effects
|
||||
if (drawInfo.shadow == 0f && (calamityPlayer.hFlames || calamityPlayer.hInferno || calamityPlayer.banishingFire))
|
||||
if (drawInfo.shadow == 0f && (calamityPlayer.holyFlames || calamityPlayer.holyInferno || calamityPlayer.banishingFire))
|
||||
HolyFlames.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.hPressure && drawInfo.shadow == 0f)
|
||||
if (calamityPlayer.hadopelagicPressure && drawInfo.shadow == 0f)
|
||||
HadopelagicPressure.DrawEffects(drawInfo);
|
||||
|
||||
// Icarus' Folly has visual effects but they are mutually exclusive with all Holy Flames variations to prevent visual clutter
|
||||
@@ -260,10 +260,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (calamityPlayer.nightwither && drawInfo.shadow == 0f) // Looks weaker if you have Moon Stone equipped
|
||||
Nightwither.DrawEffects(drawInfo, reducedNightwitherDamage);
|
||||
|
||||
if (calamityPlayer.pFlames && drawInfo.shadow == 0f)
|
||||
if (calamityPlayer.plague && drawInfo.shadow == 0f)
|
||||
Plague.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.rTide && drawInfo.shadow == 0f)
|
||||
if (calamityPlayer.riptide && drawInfo.shadow == 0f)
|
||||
RiptideDebuff.DrawEffects(drawInfo);
|
||||
|
||||
if (calamityPlayer.shadowflame && drawInfo.shadow == 0f)
|
||||
@@ -442,52 +442,6 @@ namespace CalamityMod.CalPlayer
|
||||
Player drawPlayer = drawInfo.drawPlayer;
|
||||
Item item = drawPlayer.ActiveItem();
|
||||
|
||||
// Vanity accessory effects, allows them to draw while the game is paused
|
||||
if (drawPlayer.Calamity().ghostBracelet)
|
||||
{
|
||||
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Legs);
|
||||
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Body);
|
||||
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Head);
|
||||
}
|
||||
else if ((drawPlayer.Calamity().snowmanPower || drawPlayer.Calamity().snowmanForce) && !drawPlayer.Calamity().snowmanHide)
|
||||
{
|
||||
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "Popo", EquipType.Legs);
|
||||
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "Popo", EquipType.Body);
|
||||
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, snowmanNoseless ? "PopoNoseless" : "Popo", EquipType.Head);
|
||||
drawPlayer.face = -1;
|
||||
}
|
||||
else if (drawPlayer.Calamity().punchCard)
|
||||
{
|
||||
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Legs);
|
||||
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Body);
|
||||
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Head);
|
||||
}
|
||||
else if ((drawPlayer.Calamity().abyssalDivingSuitPower || drawPlayer.Calamity().abyssalDivingSuitForce) && !drawPlayer.Calamity().abyssalDivingSuitHide)
|
||||
{
|
||||
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Legs);
|
||||
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Body);
|
||||
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Head);
|
||||
drawPlayer.face = -1;
|
||||
}
|
||||
else if ((drawPlayer.Calamity().aquaticHeartPower || drawPlayer.Calamity().aquaticHeartForce) && !drawPlayer.Calamity().aquaticHeartHide)
|
||||
{
|
||||
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Legs);
|
||||
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Body);
|
||||
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Head);
|
||||
drawPlayer.face = -1;
|
||||
}
|
||||
// Need to set all of these so that certain vanity pieces like Capricorn Tail don't screw it up
|
||||
if (drawPlayer.Calamity().ghostBracelet || ((drawPlayer.Calamity().snowmanPower || drawPlayer.Calamity().snowmanForce) && !drawPlayer.Calamity().snowmanHide) ||
|
||||
drawPlayer.Calamity().punchCard || ((drawPlayer.Calamity().abyssalDivingSuitPower || drawPlayer.Calamity().abyssalDivingSuitForce) && !drawPlayer.Calamity().abyssalDivingSuitHide) ||
|
||||
((drawPlayer.Calamity().aquaticHeartPower || drawPlayer.Calamity().aquaticHeartForce) && !drawPlayer.Calamity().aquaticHeartHide))
|
||||
{
|
||||
drawInfo.legsGlowMask = -1;
|
||||
drawInfo.legsOffset = Vector2.Zero;
|
||||
drawInfo.bodyGlowMask = -1;
|
||||
drawInfo.headGlowMask = -1;
|
||||
drawInfo.helmetOffset = Vector2.Zero;
|
||||
}
|
||||
|
||||
if (!drawPlayer.frozen &&
|
||||
(item.IsAir || item.type > ItemID.None) &&
|
||||
!drawPlayer.dead &&
|
||||
|
||||
@@ -370,7 +370,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (ZoneAbyss || ZoneSulphur)
|
||||
canSulphurFish = true;
|
||||
|
||||
Item item = Player.ActiveItem();
|
||||
Item item = Player.HeldItem;
|
||||
if (!canSulphurFish || item.fishingPole <= 0 || item.holdStyle != 1)
|
||||
fishingLevel = -1;
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ using CalamityMod.Items.Armor.Aerospec;
|
||||
using CalamityMod.Items.Armor.Demonshade;
|
||||
using CalamityMod.Items.Armor.LunicCorps;
|
||||
using CalamityMod.Items.Armor.Silva;
|
||||
using CalamityMod.Items.Armor.Sulphurous;
|
||||
using CalamityMod.Items.Armor.Wulfrum;
|
||||
using CalamityMod.Items.Mounts;
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
@@ -31,6 +32,7 @@ using CalamityMod.NPCs.Other;
|
||||
using CalamityMod.NPCs.ProfanedGuardians;
|
||||
using CalamityMod.NPCs.Providence;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
@@ -244,7 +246,7 @@ namespace CalamityMod.CalPlayer
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType<XykDeathAnim>(), Main.zenithWorld ? Main.rand.Next(5000, 50000 + 1) : 0, 0, Player.whoAmI);
|
||||
}
|
||||
|
||||
if (hInferno)
|
||||
if (holyInferno)
|
||||
{
|
||||
foreach (NPC n in Main.ActiveNPCs)
|
||||
{
|
||||
@@ -292,10 +294,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (silvaSet && silvaCountdown > 0)
|
||||
{
|
||||
if (silvaCountdown == silvaReviveDuration && !hasSilvaEffect)
|
||||
if (silvaCountdown == SilvaReviveDuration && !hasSilvaEffect)
|
||||
{
|
||||
SoundEngine.PlaySound(SilvaHeadSummon.ActivationSound, Player.Center);
|
||||
Player.AddBuff(ModContent.BuffType<SilvaRevival>(), silvaReviveDuration);
|
||||
Player.AddBuff(ModContent.BuffType<SilvaRevival>(), SilvaReviveDuration);
|
||||
}
|
||||
|
||||
hasSilvaEffect = true;
|
||||
@@ -377,7 +379,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.SearingLava" + Main.rand.Next(1, 2 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
if (gsInferno)
|
||||
if (godSlayerInferno)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.GodSlayerInferno" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
@@ -408,11 +410,11 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.MiracleBlight" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
if (hInferno)
|
||||
if (holyInferno)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.HolyInferno").ToNetworkText(Player.name));
|
||||
}
|
||||
if (hFlames || banishingFire)
|
||||
if (holyFlames || banishingFire)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.HolyFlames" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
@@ -424,7 +426,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Daybroken").ToNetworkText(Player.name));
|
||||
}
|
||||
if (bBlood)
|
||||
if (burningBlood)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.BurningBlood" + Main.rand.Next(1, 2 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
@@ -444,23 +446,23 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.ElementalMix" + Main.rand.Next(1, 2 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
if (cDepth)
|
||||
if (crushDepth)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.CrushDepth" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
if (rTide)
|
||||
if (riptide)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Riptide" + Main.rand.Next(1, 2 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
if (hPressure)
|
||||
if (hadopelagicPressure)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.HadopelagicPressure" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
if (bFlames || weakBrimstoneFlames || demonicFlames)
|
||||
if (brimstoneFlames || weakBrimstoneFlames || demonicFlames)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.BrimstoneFlames" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
if (pFlames)
|
||||
if (plague)
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Plague" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
|
||||
}
|
||||
@@ -485,7 +487,7 @@ namespace CalamityMod.CalPlayer
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Withered").ToNetworkText(Player.name));
|
||||
}
|
||||
}
|
||||
if (profanedCrystalBuffs && !profanedCrystalHide)
|
||||
if (profanedCrystalBuffs && Player.Transformation().Type == ModContent.ItemType<ProfanedSoulCrystal>())
|
||||
{
|
||||
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.ProfanedSoulCrystal").ToNetworkText(Player.name));
|
||||
}
|
||||
@@ -635,11 +637,6 @@ namespace CalamityMod.CalPlayer
|
||||
modifiers.ScalingBonusDamage += Screwdriver.PiercingDamageBuff;
|
||||
}
|
||||
|
||||
// Calamity buffs Inferno Fork by 20%. This is multiplicative because it's supposed to be a buff to the weapon's base damage.
|
||||
// However, because the weapon is coded like spaghetti, you have to multiply the explosion's damage too.
|
||||
if (proj.type == ProjectileID.InfernoFriendlyBlast)
|
||||
modifiers.SourceDamage *= 1.2f;
|
||||
|
||||
if (Player.Calamity().scionsCurio && proj.CountsAsClass<RangedDamageClass>())
|
||||
target.Calamity().scionsCurioEffected = true;
|
||||
|
||||
@@ -723,7 +720,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Enemies deal less contact damage while sick, due to being weakened.
|
||||
if (npc.poisoned)
|
||||
{
|
||||
float damageReductionFromPoison = (float)((npc.Calamity().irradiated > 0 ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
|
||||
float damageReductionFromPoison = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
|
||||
if (npc.Calamity().VulnerableToSickness.HasValue)
|
||||
{
|
||||
if (npc.Calamity().VulnerableToSickness.Value)
|
||||
@@ -738,7 +735,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (npc.venom)
|
||||
{
|
||||
float damageReductionFromVenom = (float)((npc.Calamity().irradiated > 0 ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
|
||||
float damageReductionFromVenom = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
|
||||
if (npc.Calamity().VulnerableToSickness.HasValue)
|
||||
{
|
||||
if (npc.Calamity().VulnerableToSickness.Value)
|
||||
@@ -751,9 +748,9 @@ namespace CalamityMod.CalPlayer
|
||||
modifiers.SourceDamage *= damageReductionFromVenom;
|
||||
}
|
||||
|
||||
if (npc.Calamity().astralInfection > 0)
|
||||
if (npc.Calamity().astralInfection)
|
||||
{
|
||||
float damageReductionFromAstralInfection = (float)((npc.Calamity().irradiated > 0 ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
|
||||
float damageReductionFromAstralInfection = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
|
||||
if (npc.Calamity().VulnerableToSickness.HasValue)
|
||||
{
|
||||
if (npc.Calamity().VulnerableToSickness.Value)
|
||||
@@ -766,9 +763,9 @@ namespace CalamityMod.CalPlayer
|
||||
modifiers.SourceDamage *= damageReductionFromAstralInfection;
|
||||
}
|
||||
|
||||
if (npc.Calamity().pFlames > 0)
|
||||
if (npc.Calamity().plague)
|
||||
{
|
||||
float damageReductionFromPlague = (float)((npc.Calamity().irradiated > 0 ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
|
||||
float damageReductionFromPlague = (float)((npc.Calamity().irradiated? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
|
||||
if (npc.Calamity().VulnerableToSickness.HasValue)
|
||||
{
|
||||
if (npc.Calamity().VulnerableToSickness.Value)
|
||||
@@ -781,9 +778,9 @@ namespace CalamityMod.CalPlayer
|
||||
modifiers.SourceDamage *= damageReductionFromPlague;
|
||||
}
|
||||
|
||||
if (npc.Calamity().wDeath > 0)
|
||||
if (npc.Calamity().whisperingDeath)
|
||||
{
|
||||
float damageReductionFromWhisperingDeath = (float)((npc.Calamity().irradiated > 0 ? npc.Calamity().irradiatedContactBoost : 1) * 0.1f);
|
||||
float damageReductionFromWhisperingDeath = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.1f);
|
||||
if (npc.Calamity().VulnerableToSickness.HasValue)
|
||||
{
|
||||
if (npc.Calamity().VulnerableToSickness.Value)
|
||||
@@ -814,7 +811,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (bloodflareMelee && bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID))
|
||||
contactDamageReduction += 0.5;
|
||||
|
||||
if (npc.Calamity().tSad > 0)
|
||||
if (npc.Calamity().temporalSadness)
|
||||
contactDamageReduction += 0.5;
|
||||
|
||||
if (eskimoSet)
|
||||
@@ -879,7 +876,7 @@ namespace CalamityMod.CalPlayer
|
||||
// 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50%
|
||||
if (contactDamageReduction > 0D)
|
||||
{
|
||||
if (aCrunch)
|
||||
if (armorCrunch)
|
||||
contactDamageReduction *= (double)ArmorCrunch.MultiplicativeDamageReductionPlayer;
|
||||
if (crumble)
|
||||
contactDamageReduction *= (double)Crumbling.MultiplicativeDamageReductionPlayer;
|
||||
@@ -987,30 +984,23 @@ namespace CalamityMod.CalPlayer
|
||||
// Reduce damage from vanilla traps
|
||||
|
||||
// Explosives
|
||||
// 350 in normal, 450 in expert
|
||||
// 350 damage
|
||||
if (proj.type == ProjectileID.Explosives)
|
||||
modifiers.SourceDamage *= (Main.expertMode ? 0.225f : 0.35f);
|
||||
modifiers.SourceDamage *= 0.7f;
|
||||
|
||||
// Rolling Cacti
|
||||
// 45 in normal, 65 in expert for cactus
|
||||
// 30 in normal, 36 in expert for spikes
|
||||
// 42 in normal, 84 in expert for cactus
|
||||
// 36 in normal, 72 in expert for spikes
|
||||
else if (proj.type == ProjectileID.RollingCactus || proj.type == ProjectileID.RollingCactusSpike)
|
||||
modifiers.SourceDamage *= (Main.expertMode ? 0.3f : 0.5f);
|
||||
modifiers.SourceDamage *= 0.6f;
|
||||
|
||||
// Normal Boulders and Temple traps
|
||||
if (Main.expertMode)
|
||||
// Boulders
|
||||
if (Main.expertMode && !areThereAnyDamnBosses)
|
||||
{
|
||||
// 140 in normal, 182 in expert, 273 in master
|
||||
if (proj.type == ProjectileID.Boulder || proj.type == ProjectileID.MiniBoulder)
|
||||
modifiers.SourceDamage *= 0.65f;
|
||||
|
||||
// 80 in normal, 100 in expert, 150 in master
|
||||
else if (proj.type == ProjectileID.SpikyBallTrap || proj.type == ProjectileID.FlamethrowerTrap || proj.type == ProjectileID.FlamesTrap || proj.type == ProjectileID.PoisonDartTrap)
|
||||
modifiers.SourceDamage *= 0.625f;
|
||||
|
||||
// 120 in normal, 144 in expert, 216 in master
|
||||
else if (proj.type == ProjectileID.SpearTrap)
|
||||
modifiers.SourceDamage *= 0.6f;
|
||||
// 140 in normal, 210 in expert, 315 in master for boulder
|
||||
// 104 in normal, 156 in expert, 234 in master for mini boulder
|
||||
if (proj.type == ProjectileID.Boulder || proj.type == ProjectileID.MiniBoulder || proj.type == ProjectileID.BouncyBoulder || proj.type == ProjectileID.LifeCrystalBoulder)
|
||||
modifiers.SourceDamage *= 0.75f;
|
||||
}
|
||||
|
||||
bool isFallingBlock = (proj.type == ProjectileID.SandBallFalling) || (proj.type == ProjectileID.SiltBall) || (proj.type == ProjectileID.AshBallFalling) ||
|
||||
@@ -1027,7 +1017,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.Calamity().trapProtection && isReducedTrap)
|
||||
modifiers.SourceDamage *= 0.35f;
|
||||
|
||||
// Reduce damage dealt by rainbow trails depending on how faded they are.
|
||||
// Reduce damage dealt by rainbow trails
|
||||
if (proj.type == ProjectileID.HallowBossLastingRainbow)
|
||||
{
|
||||
// Find the oldPos of the projectile that is intersecting the player hitbox.
|
||||
@@ -1042,11 +1032,10 @@ namespace CalamityMod.CalPlayer
|
||||
hitbox.X = (int)trailHitbox.X;
|
||||
hitbox.Y = (int)trailHitbox.Y;
|
||||
|
||||
// Adjust damage based on what part of the trail intersected the player hitbox.
|
||||
if (hitbox.Intersects(Player.Hitbox))
|
||||
{
|
||||
if (k > startOfDamageFalloff)
|
||||
modifiers.SourceDamage *= MathHelper.Lerp(0.4f, 1f, 1f - (k - startOfDamageFalloff) / (float)(trailLength - startOfDamageFalloff));
|
||||
modifiers.SourceDamage *= EmpressofLightAI.EverlastingRainbowTrailDamageMult;
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -1146,7 +1135,7 @@ namespace CalamityMod.CalPlayer
|
||||
// 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50%
|
||||
if (projectileDamageReduction > 0D)
|
||||
{
|
||||
if (aCrunch)
|
||||
if (armorCrunch)
|
||||
projectileDamageReduction *= (double)ArmorCrunch.MultiplicativeDamageReductionPlayer;
|
||||
if (crumble)
|
||||
projectileDamageReduction *= (double)Crumbling.MultiplicativeDamageReductionPlayer;
|
||||
@@ -1312,7 +1301,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Main.npc[proj.Calamity().ParentNPCIndex].active)
|
||||
{
|
||||
if (sulphurSet)
|
||||
Main.npc[proj.Calamity().ParentNPCIndex].AddBuff(BuffID.Poisoned, 60);
|
||||
Main.npc[proj.Calamity().ParentNPCIndex].AddBuff(BuffID.Poisoned, SulphurousHelmet.SetBonusPoisonDuration);
|
||||
if (ilSpark)
|
||||
Main.npc[proj.Calamity().ParentNPCIndex].Calamity().shocked = 120;
|
||||
}
|
||||
@@ -1375,90 +1364,10 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player.AddBuff(BuffID.BrokenArmor, 600);
|
||||
}
|
||||
else if (proj.type == ProjectileID.DeathLaser || proj.type == ProjectileID.RocketSkeleton || proj.type == ProjectileID.BombSkeletronPrime)
|
||||
{
|
||||
Player.AddBuff(BuffID.OnFire, 180);
|
||||
}
|
||||
else if (proj.type == ProjectileID.Skull)
|
||||
{
|
||||
Player.AddBuff(BuffID.Weak, 180);
|
||||
}
|
||||
else if (proj.type == ProjectileID.CursedFlameHostile || proj.type == ProjectileID.EyeFire)
|
||||
{
|
||||
// Guaranteed Cursed Inferno for 1 second (vanilla also has a 68.75% chance of Cursed Inferno for 2 to 3 seconds)
|
||||
Player.AddBuff(BuffID.CursedInferno, 60);
|
||||
}
|
||||
else if (proj.type == ProjectileID.DesertDjinnCurse)
|
||||
{
|
||||
Player.AddBuff(BuffID.Cursed, 180);
|
||||
}
|
||||
else if (proj.type == ProjectileID.Stinger || proj.type == ProjectileID.QueenBeeStinger)
|
||||
{
|
||||
// 66.6% chance of Poison for 5 seconds, 2 guaranteed seconds of Poison otherwise (vanilla also has a 33.3% chance of Poison for 10 seconds)
|
||||
if (Main.rand.Next(3) > 0)
|
||||
Player.AddBuff(BuffID.Poisoned, 300);
|
||||
else
|
||||
Player.AddBuff(BuffID.Poisoned, 120);
|
||||
}
|
||||
else if (proj.type == ProjectileID.PoisonSeedPlantera)
|
||||
{
|
||||
// 75% chance of Poison for 3 to 5 seconds, guaranteed Poison for 2 seconds (vanilla also has a 50% chance of Poison for 3 to 7 seconds)
|
||||
if (Main.rand.Next(4) > 0)
|
||||
Player.AddBuff(BuffID.Poisoned, Main.rand.Next(180, 301));
|
||||
else
|
||||
Player.AddBuff(BuffID.Poisoned, 120);
|
||||
}
|
||||
else if (proj.type == ProjectileID.ThornBall)
|
||||
{
|
||||
Player.AddBuff(BuffID.Poisoned, 420);
|
||||
}
|
||||
else if (proj.type == ProjectileID.CultistBossFireBall)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Daybroken>(), 180);
|
||||
}
|
||||
else if (proj.type == ProjectileID.CultistBossIceMist)
|
||||
{
|
||||
if (!Player.frozen)
|
||||
Player.AddBuff(BuffID.Frozen, 60);
|
||||
|
||||
Player.AddBuff(BuffID.Chilled, 180);
|
||||
}
|
||||
else if (proj.type == ProjectileID.CultistBossLightningOrbArc)
|
||||
{
|
||||
Player.AddBuff(BuffID.Electrified, 180);
|
||||
}
|
||||
else if (proj.type == ProjectileID.AncientDoomProjectile)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Shadowflame>(), 120);
|
||||
}
|
||||
else if (proj.type == ProjectileID.CultistBossFireBallClone)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Shadowflame>(), 180);
|
||||
}
|
||||
else if (proj.type == ProjectileID.PhantasmalBolt || proj.type == ProjectileID.PhantasmalEye)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Nightwither>(), 120);
|
||||
}
|
||||
else if (proj.type == ProjectileID.PhantasmalSphere)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Nightwither>(), 210);
|
||||
}
|
||||
else if (proj.type == ProjectileID.PhantasmalDeathray)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Nightwither>(), 300);
|
||||
}
|
||||
else if ((proj.type == ProjectileID.FairyQueenLance || proj.type == ProjectileID.HallowBossRainbowStreak || proj.type == ProjectileID.HallowBossSplitShotCore) && NPC.ShouldEmpressBeEnraged())
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Daybroken>(), 120);
|
||||
}
|
||||
else if (proj.type == ProjectileID.HallowBossLastingRainbow && NPC.ShouldEmpressBeEnraged())
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Daybroken>(), 210);
|
||||
}
|
||||
else if (proj.type == ProjectileID.FairyQueenSunDance && NPC.ShouldEmpressBeEnraged())
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Daybroken>(), 300);
|
||||
}
|
||||
else if (proj.type == ProjectileID.BloodNautilusShot)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<BurningBlood>(), 240);
|
||||
@@ -1471,6 +1380,47 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<MiracleBlight>(), 600);
|
||||
}
|
||||
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
if (proj.type == ProjectileID.CursedFlameHostile || proj.type == ProjectileID.EyeFire)
|
||||
{
|
||||
// Guaranteed Cursed Inferno for 1 second (vanilla also has a 68.75% chance of Cursed Inferno for 2 to 3 seconds)
|
||||
Player.AddBuff(BuffID.CursedInferno, 60);
|
||||
}
|
||||
else if (proj.type == ProjectileID.ThornBall)
|
||||
{
|
||||
Player.AddBuff(BuffID.Venom, 120);
|
||||
}
|
||||
else if (proj.type == ProjectileID.CultistBossFireBall)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Daybroken>(), 180);
|
||||
}
|
||||
else if (proj.type == ProjectileID.CultistBossIceMist && proj.ai[1] == 1f) // Main ice mists only; no shards
|
||||
{
|
||||
Player.AddBuff(BuffID.Chilled, 180);
|
||||
}
|
||||
else if (proj.type == ProjectileID.CultistBossLightningOrbArc)
|
||||
{
|
||||
Player.AddBuff(BuffID.Electrified, 180);
|
||||
}
|
||||
else if (proj.type == ProjectileID.CultistBossFireBallClone)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Shadowflame>(), 240);
|
||||
}
|
||||
else if (proj.type == ProjectileID.PhantasmalBolt || proj.type == ProjectileID.PhantasmalEye)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Nightwither>(), 120);
|
||||
}
|
||||
else if (proj.type == ProjectileID.PhantasmalSphere)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Nightwither>(), 180);
|
||||
}
|
||||
else if (proj.type == ProjectileID.PhantasmalDeathray)
|
||||
{
|
||||
Player.AddBuff(ModContent.BuffType<Nightwither>(), 240);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// As these reflects do not cancel damage, they need to be in OnHit rather than ModifyHit
|
||||
@@ -1750,11 +1700,17 @@ namespace CalamityMod.CalPlayer
|
||||
// Handles energy shields and Boss Rush, in that order
|
||||
modifiers.ModifyHurtInfo += ModifyHurtInfo_Calamity;
|
||||
|
||||
// TODO -- At some point it'd be nice to have a "TransformationPlayer" that has all the transformation sfx and visuals so their priorities can be more easily managed.
|
||||
#region Custom Hurt Sounds
|
||||
if (hurtSoundTimer == 0)
|
||||
{
|
||||
if (roverDrive && RoverDriveShieldDurability > 0)
|
||||
if(Player.Transformation().Type != -1 && Player.Transformation().currentTransformation.HurtSound(Player) != null)
|
||||
{
|
||||
var hurtSound = Player.Transformation().currentTransformation.HurtSound(Player).Value;
|
||||
modifiers.DisableSound();
|
||||
SoundEngine.PlaySound(hurtSound.sound, Player.Center);
|
||||
hurtSoundTimer = hurtSound.delay;
|
||||
}
|
||||
else if (roverDrive && RoverDriveShieldDurability > 0)
|
||||
{
|
||||
modifiers.DisableSound();
|
||||
SoundEngine.PlaySound(RoverDrive.ShieldHurtSound, Player.Center);
|
||||
@@ -1772,42 +1728,12 @@ namespace CalamityMod.CalPlayer
|
||||
SoundEngine.PlaySound(TheSponge.ShieldHurtSound, Player.Center);
|
||||
hurtSoundTimer = 20;
|
||||
}
|
||||
else if (((pSoulArtifact && !profanedCrystal) || profanedCrystalBuffs) && pSoulShieldDurability > 0)
|
||||
{
|
||||
modifiers.DisableSound();
|
||||
SoundEngine.PlaySound(ProfanedGuardianDefender.ShieldDeathSound);
|
||||
hurtSoundTimer = 20;
|
||||
}
|
||||
else if ((profanedCrystal || profanedCrystalForce) && !profanedCrystalHide)
|
||||
{
|
||||
modifiers.DisableSound();
|
||||
SoundEngine.PlaySound(Providence.HurtSound, Player.Center);
|
||||
hurtSoundTimer = 20;
|
||||
}
|
||||
else if ((abyssalDivingSuitPower || abyssalDivingSuitForce) && !abyssalDivingSuitHide)
|
||||
{
|
||||
modifiers.DisableSound();
|
||||
SoundEngine.PlaySound(SoundID.NPCHit4, Player.Center); //metal hit noise
|
||||
hurtSoundTimer = 10;
|
||||
}
|
||||
else if ((aquaticHeartPower || aquaticHeartForce) && !aquaticHeartHide)
|
||||
{
|
||||
modifiers.DisableSound();
|
||||
SoundEngine.PlaySound(SoundID.FemaleHit, Player.Center); //female hit noise
|
||||
hurtSoundTimer = 10;
|
||||
}
|
||||
else if (titanHeartSet)
|
||||
{
|
||||
modifiers.DisableSound();
|
||||
SoundEngine.PlaySound(NPCs.Astral.Atlas.HurtSound, Player.Center);
|
||||
hurtSoundTimer = 10;
|
||||
}
|
||||
else if (Player.GetModPlayer<WulfrumTransformationPlayer>().transformationActive)
|
||||
{
|
||||
modifiers.DisableSound();
|
||||
SoundEngine.PlaySound(SoundID.NPCHit4, Player.Center);
|
||||
hurtSoundTimer = 10;
|
||||
}
|
||||
else if (Player.GetModPlayer<WulfrumArmorPlayer>().wulfrumSet && (Player.name.ToLower() == "wagstaff" || Player.name.ToLower() == "john wulfrum"))
|
||||
{
|
||||
modifiers.DisableSound();
|
||||
@@ -2304,8 +2230,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (RageEnabled)
|
||||
rageCombatFrames = BalancingConstants.RageCombatDelayTime;
|
||||
|
||||
// Regenator has been CANCLED on TWITTER.COM!!!! (Just keeping this here since it's a neat effect and I'll probably yoink it for something else later)
|
||||
if (regenator && false)
|
||||
// Regenerator has been CANCLED on TWITTER.COM!!!! (Just keeping this here since it's a neat effect and I'll probably yoink it for something else later)
|
||||
if (regenerator && false)
|
||||
{
|
||||
// Projectile damage and count is based on source damage of the hit
|
||||
float hitPower = (hurtInfo.SourceDamage / (Player.statLifeMax2 * 0.5f));
|
||||
@@ -2622,13 +2548,13 @@ namespace CalamityMod.CalPlayer
|
||||
if (!canTriggerHitEffects)
|
||||
return;
|
||||
|
||||
if (aeroSet && hurtInfo.Damage > 25)
|
||||
if (aeroSet && hurtInfo.Damage > AerospecBreastplate.SetBonusHurtDamageThreshold)
|
||||
{
|
||||
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
|
||||
var source = Player.GetSource_OnHurt(hurtInfo.DamageSource, AerospecBreastplate.FeatherEntitySourceContext);
|
||||
for (int n = 0; n < 4; n++)
|
||||
{
|
||||
int featherDamage = (int)Player.GetBestClassDamage().ApplyTo(30);
|
||||
int featherDamage = (int)Player.GetBestClassDamage().ApplyTo(AerospecBreastplate.SetBonusFeatherDamage);
|
||||
|
||||
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 20f, ModContent.ProjectileType<StickyFeatherAero>(), featherDamage, 1f, Player.whoAmI);
|
||||
}
|
||||
@@ -2702,15 +2628,20 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (inkBomb && !abyssalMirror && !eclipseMirror)
|
||||
{
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<Items.Accessories.InkBomb>()));
|
||||
if (Player.whoAmI == Main.myPlayer && !Player.HasCooldown(Cooldowns.InkBomb.ID))
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Player.AddCooldown(Cooldowns.InkBomb.ID, CalamityUtils.SecondsToFrames(20));
|
||||
rogueStealth += 0.5f;
|
||||
if (!Player.HasCooldown(Cooldowns.InkBomb.ID))
|
||||
{
|
||||
Player.AddCooldown(Cooldowns.InkBomb.ID, CalamityUtils.SecondsToFrames(20));
|
||||
rogueStealth += 0.5f;
|
||||
SoundEngine.PlaySound(SoundID.NPCDeath28 with { Volume = 2f }, Player.Center);
|
||||
}
|
||||
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<Items.Accessories.InkBomb>()));
|
||||
SoundEngine.PlaySound(SoundID.Item1, Player.Center);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item61, Player.Center);
|
||||
int ink = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, Main.rand.NextFloat(-3f, 3f), Main.rand.NextFloat(-0f, -4f), ModContent.ProjectileType<InkBombProjectile>(), 0, 0, Player.whoAmI);
|
||||
int ink = Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * 2f, ModContent.ProjectileType<InkBombProjectile>(), 0, 0, Player.whoAmI);
|
||||
if (ink.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[ink].DamageType = DamageClass.Generic;
|
||||
}
|
||||
@@ -2742,7 +2673,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
for (int i = 0; i < 16; i++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
Vector2 circleVel = (MathHelper.TwoPi * i / 16f).ToRotationVector2() * Main.rand.NextFloat(5f, 8f);
|
||||
int shard = Projectile.NewProjectile(source, Player.Center, circleVel, ProjectileID.CrystalShard, sDamage, 1f, Player.whoAmI);
|
||||
|
||||
@@ -97,46 +97,46 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
// Whispering Death sets positive regen to zero but doesn't actually deal any damage
|
||||
ApplyDoTDebuff(wDeath, 0, laudanum);
|
||||
ApplyDoTDebuff(whisperingDeath, 0, laudanum);
|
||||
|
||||
ApplyDoTDebuff(irradiated, 4, purity);
|
||||
int sulphurDoT = 6 - (sulphurSet ? 2 : 0) - (sulphurskin ? 2 : 0) - (corrosiveSpine ? 2 : 0);
|
||||
ApplyDoTDebuff(sulphurPoison, sulphurDoT, purity);
|
||||
ApplyDoTDebuff(rTide, 6, purity);
|
||||
ApplyDoTDebuff(riptide, 6, purity);
|
||||
ApplyDoTDebuff(weakBrimstoneFlames, 7);
|
||||
ApplyDoTDebuff(bBlood, 8, purity);
|
||||
ApplyDoTDebuff(burningBlood, 8, purity);
|
||||
ApplyDoTDebuff(brainRot, 8, purity);
|
||||
ApplyDoTDebuff(heavybleeding, 16, purity);
|
||||
ApplyDoTDebuff(laceration, 24, purity);
|
||||
ApplyDoTDebuff(vaporfied, 8, purity);
|
||||
int staticDoT = ((Player.controlLeft || Player.controlRight) ? 12 : 3) / (eleResist ? 2 : 1);
|
||||
ApplyDoTDebuff(staticDischarge, staticDoT, purity);
|
||||
ApplyDoTDebuff(bFlames, abaddon ? 10 : 20, purity);
|
||||
ApplyDoTDebuff(demonicFlames, 33, purity); // Never inflicted on the player
|
||||
ApplyDoTDebuff(daybroken, reducedDaybrokenDamage ? 15 : 30, purity);
|
||||
ApplyDoTDebuff(nightwither, reducedNightwitherDamage ? 15 : 30, purity);
|
||||
ApplyDoTDebuff(hFlames, 24, purity);
|
||||
ApplyDoTDebuff(voidfrost, 30, purity);
|
||||
ApplyDoTDebuff(vHex, 24);
|
||||
ApplyDoTDebuff(trueVHex, 36);
|
||||
ApplyDoTDebuff(cDepth, 15, purity);
|
||||
ApplyDoTDebuff(astralInfection, 18, infectedJewel || hideOfDeus || purity);
|
||||
ApplyDoTDebuff(hPressure, 30, purity);
|
||||
ApplyDoTDebuff(pFlames, alchFlask ? 12 : 24, purity);
|
||||
ApplyDoTDebuff(cragsLava, 30); // Being literally submerged in crags lava should do more than brimstone flames
|
||||
ApplyDoTDebuff(heavybleeding, 16, purity);
|
||||
ApplyDoTDebuff(crushDepth, 18, purity);
|
||||
ApplyDoTDebuff(astralInfection, 24, infectedJewel || hideOfDeus || purity);
|
||||
ApplyDoTDebuff(shadowflame, 30, purity);
|
||||
ApplyDoTDebuff(elementalMix, 50, purity); // Never inflicted on the player
|
||||
ApplyDoTDebuff(banishingFire, 60); // Never inflicted on the player
|
||||
ApplyDoTDebuff(brimstoneFlames, abaddon ? 15 : 30, purity);
|
||||
ApplyDoTDebuff(plague, alchFlask ? 15 : 30, purity);
|
||||
ApplyDoTDebuff(vHex, 30); // Has other effects
|
||||
ApplyDoTDebuff(searingLava, 30);
|
||||
ApplyDoTDebuff(demonicFlames, 33, purity); // Never inflicted on the player
|
||||
ApplyDoTDebuff(laceration, 36, purity);
|
||||
ApplyDoTDebuff(daybroken, reducedDaybrokenDamage ? 20 : 40, purity);
|
||||
ApplyDoTDebuff(nightwither, reducedNightwitherDamage ? 20 : 40, purity);
|
||||
ApplyDoTDebuff(holyFlames, 40, purity);
|
||||
ApplyDoTDebuff(voidfrost, 40, purity);
|
||||
ApplyDoTDebuff(hadopelagicPressure, 40, purity);
|
||||
|
||||
// Profaned Soul Crystal turns you into Providence, a God, and you take more damage from God Slayer Inferno
|
||||
ApplyDoTDebuff(gsInferno, profanedCrystalBuffs ? 45 : 35);
|
||||
ApplyDoTDebuff(godSlayerInferno, profanedCrystalBuffs ? 50 : 40);
|
||||
int fluxDoT = ((Player.controlLeft || Player.controlRight) ? 50 : 10) / (eleResist ? 2 : 1);
|
||||
ApplyDoTDebuff(vermillionFlux, fluxDoT);
|
||||
int dragonfireDoT = ((Player.name == "JFL" || Player.name == "MrJFL") ? 240 : 40) / (dynamoStemCells ? 2 : 1);
|
||||
ApplyDoTDebuff(elementalMix, 50, purity); // Never inflicted on the player
|
||||
ApplyDoTDebuff(trueVHex, 50);
|
||||
int dragonfireDoT = ((Player.name == "JFL" || Player.name == "MrJFL") ? 200 : 50) / (dynamoStemCells ? 2 : 1);
|
||||
ApplyDoTDebuff(dragonFire, dragonfireDoT);
|
||||
int rebukeDoT = ((Player.controlLeft || Player.controlRight) ? 75 : 15) / (eleResist ? 2 : 1);
|
||||
ApplyDoTDebuff(miracleBlight, 60);
|
||||
ApplyDoTDebuff(banishingFire, 60); // Never inflicted on the player
|
||||
int rebukeDoT = ((Player.controlLeft || Player.controlRight) ? 80 : 16) / (eleResist ? 2 : 1);
|
||||
ApplyDoTDebuff(auricRebuke, rebukeDoT);
|
||||
ApplyDoTDebuff(miracleBlight, 50);
|
||||
|
||||
// Slowly increase the sulphuric water poisoning effect. Once it's high enough, the player takes damage and the meter resets.
|
||||
bool nearSafeZone = false;
|
||||
@@ -381,8 +381,8 @@ namespace CalamityMod.CalPlayer
|
||||
// Permafrost's Concoction increases life regen while afflicted with a fire debuff
|
||||
if (permafrostsConcoction && Player.buffType.Any(FireDebuffsList.Includes))
|
||||
{
|
||||
if (Player.lifeRegenTime < 1800)
|
||||
Player.lifeRegenTime = 1800;
|
||||
if (Player.lifeRegenTime < 900)
|
||||
Player.lifeRegenTime = 900;
|
||||
|
||||
Player.lifeRegen += 6;
|
||||
}
|
||||
@@ -419,10 +419,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.miscCounter % healFrameCadence == healFrameCadence - 1)
|
||||
Player.Heal(1);
|
||||
|
||||
if (Player.lifeRegenTime < 1800)
|
||||
Player.lifeRegenTime = 1800;
|
||||
if (Player.lifeRegenTime < 900)
|
||||
Player.lifeRegenTime = 900;
|
||||
|
||||
intendedPurityDefense = 20 + (currentDebuffs - 1) * 8;
|
||||
intendedPurityDefense = 15 + (currentDebuffs - 1) * 5;
|
||||
if (jewelBonusDefense < intendedPurityDefense)
|
||||
jewelBonusDefense = intendedPurityDefense;
|
||||
|
||||
@@ -461,10 +461,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (currentDebuffs > 0)
|
||||
{
|
||||
Player.lifeRegen += 4;
|
||||
if (Player.lifeRegenTime < 1800)
|
||||
Player.lifeRegenTime = 1800;
|
||||
if (Player.lifeRegenTime < 900)
|
||||
Player.lifeRegenTime = 900;
|
||||
|
||||
intendedJewelDefense = 16 + (currentDebuffs - 1) * 5;
|
||||
intendedJewelDefense = 12 + (currentDebuffs - 1) * 4;
|
||||
if (jewelBonusDefense < intendedJewelDefense)
|
||||
jewelBonusDefense = intendedJewelDefense;
|
||||
}
|
||||
@@ -487,8 +487,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.buffType.Any(DebuffsList.List.Contains))
|
||||
{
|
||||
Player.lifeRegen += 3;
|
||||
if (Player.lifeRegenTime < 1800)
|
||||
Player.lifeRegenTime = 1800;
|
||||
if (Player.lifeRegenTime < 900)
|
||||
Player.lifeRegenTime = 900;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -525,7 +525,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegenCount = 0;
|
||||
}
|
||||
|
||||
if (hInferno)
|
||||
if (holyInferno)
|
||||
{
|
||||
Player.nebulaLevelLife = 0;
|
||||
|
||||
@@ -625,6 +625,9 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegen += Main.eclipse ? 2 : 4;
|
||||
}
|
||||
|
||||
if (silvaSet)
|
||||
Player.lifeRegen += 6;
|
||||
|
||||
if (phantomicHeartRegen <= 720 && phantomicHeartRegen >= 600)
|
||||
{
|
||||
Player.lifeRegen += PhantomicArtifact.RegenBoost;
|
||||
@@ -673,8 +676,8 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player.lifeRegen += 7;
|
||||
|
||||
if (Player.lifeRegenTime < 1800)
|
||||
Player.lifeRegenTime = 1800;
|
||||
if (Player.lifeRegenTime < 900)
|
||||
Player.lifeRegenTime = 900;
|
||||
|
||||
Player.lifeRegenTime += 4;
|
||||
}
|
||||
@@ -693,14 +696,6 @@ namespace CalamityMod.CalPlayer
|
||||
else
|
||||
pinkCandleHealFraction = 0D;
|
||||
|
||||
if (reaverRegen && reaverRegenCooldown >= 60)
|
||||
{
|
||||
reaverRegenCooldown = 0;
|
||||
|
||||
if (Player.statLife != Player.statLifeMax2 && !noLifeRegen)
|
||||
Player.HealPlayer(1, HealTextType.None);
|
||||
}
|
||||
|
||||
if (BloomStoneRegen)
|
||||
{
|
||||
float dayTimeCompletion = !Main.dayTime ? 1f : (float)(Main.time / Main.dayLength);
|
||||
@@ -753,9 +748,9 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (turboRegenPower > 0)
|
||||
{
|
||||
// After a brief delay determined by your form of standing still regen, min-cap life regen time at 1800 / 3600.
|
||||
if (Player.lifeRegenTime > regenTimeNeededForTurboRegen && Player.lifeRegenTime < 1800f)
|
||||
Player.lifeRegenTime = 1800f;
|
||||
// After a brief delay determined by your form of standing still regen, min-cap life regen time at 900 / 3600.
|
||||
if (Player.lifeRegenTime > regenTimeNeededForTurboRegen && Player.lifeRegenTime < 900f)
|
||||
Player.lifeRegenTime = 900f;
|
||||
|
||||
Player.lifeRegen += turboRegenPower;
|
||||
Player.lifeRegenTime += turboRegenPower;
|
||||
@@ -766,7 +761,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (regenator) // Gives special regen of it's own, but disables all regular life regen
|
||||
if (regenerator) // Gives special regen of it's own, but disables all regular life regen
|
||||
{
|
||||
if (Player.miscCounter % 7 == 0 && Player.statLife < (int)(Player.statLifeMax2 * 0.5f))
|
||||
Player.HealPlayer(1, HealTextType.None);
|
||||
@@ -777,7 +772,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.lifeRegenTime += 10;
|
||||
}
|
||||
else
|
||||
regenatorDamage = 0;
|
||||
regeneratorDamage = 0;
|
||||
|
||||
if (toxicHeart) // Since it needs to know your life regen, it must be placed here
|
||||
{
|
||||
@@ -832,8 +827,8 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
// Regenator trades all positive regen for damage, and caps your health gain at 50%
|
||||
if (regenator)
|
||||
// Regenerator trades all positive regen for damage, and caps your health gain at 50%
|
||||
if (regenerator)
|
||||
{
|
||||
int finalRegen = Player.lifeRegen + (int)Math.Round(regen * (Player.statLifeMax2 / 400f * 0.85f + 0.15f));
|
||||
finalRegen = (int)Math.Max(finalRegen, 0);
|
||||
@@ -843,8 +838,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.palladiumRegen)
|
||||
finalRegen += 4;
|
||||
|
||||
regenatorDamage = (finalRegen * 1.75f) * 0.01f;
|
||||
Player.GetDamage<GenericDamageClass>() += regenatorDamage;
|
||||
regeneratorDamage = (finalRegen * 1.75f) * 0.01f;
|
||||
Player.GetDamage<GenericDamageClass>() += regeneratorDamage;
|
||||
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
|
||||
@@ -17,6 +17,7 @@ using CalamityMod.ExtraTextures;
|
||||
using CalamityMod.Items;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Ammo;
|
||||
using CalamityMod.Items.Armor.Aerospec;
|
||||
using CalamityMod.Items.Armor.Bloodflare;
|
||||
using CalamityMod.Items.Armor.Brimflame;
|
||||
using CalamityMod.Items.Armor.DesertProwler;
|
||||
@@ -201,12 +202,12 @@ namespace CalamityMod.CalPlayer
|
||||
rage = 0f;
|
||||
}
|
||||
|
||||
if (furyFuel < furyFuelMax && furyRefuelTimer >= 0)
|
||||
if (furyFuel < FuryFuelMax && furyRefuelTimer >= 0)
|
||||
{
|
||||
furyFuel += (int)furyRefuelTimer;
|
||||
furyRefuelTimer = MathHelper.Lerp(furyRefuelTimer, 25, 0.01f);
|
||||
if (furyFuel > furyFuelMax)
|
||||
furyFuel = furyFuelMax;
|
||||
if (furyFuel > FuryFuelMax)
|
||||
furyFuel = FuryFuelMax;
|
||||
}
|
||||
else if (furyRefuelTimer < 0)
|
||||
furyRefuelTimer++;
|
||||
@@ -221,11 +222,6 @@ namespace CalamityMod.CalPlayer
|
||||
// Apply stealth damage to rogue.
|
||||
Player.GetDamage<RogueDamageClass>() += stealthDamage;
|
||||
|
||||
//Slow the player down after any other speed modifiers might have been applied.
|
||||
//Todo - Move this back to the wulfrum set class whenever statmodifiers are implemented for stats other than damage
|
||||
if (WulfrumHat.PowerModeEngaged(Player, out _))
|
||||
Player.moveSpeed *= 0.8f;
|
||||
|
||||
if ((XykVisualsBlue || XykVisualsOrange))
|
||||
{
|
||||
bool Orange = XykVisualsOrange;
|
||||
@@ -294,12 +290,16 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (dashStart)
|
||||
{
|
||||
Player.velocity.X *= 3.5f;
|
||||
Player.velocity.X *= 2f;
|
||||
lastDashWasTabi = true;
|
||||
}
|
||||
if (Player.dashDelay == -1)
|
||||
{
|
||||
Player.velocity.X *= 0.9f;
|
||||
Player.velocity.X *= 0.95f;
|
||||
if (Player.timeSinceLastDashStarted > 12)
|
||||
{
|
||||
Player.velocity.X *= 0.75f;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((devilsDevastationKillMode || exaltedKillMode) && !Player.mount.Active)
|
||||
@@ -479,13 +479,17 @@ namespace CalamityMod.CalPlayer
|
||||
IsFirstDashFrame = false;
|
||||
else
|
||||
IsFirstDashFrame = true;
|
||||
|
||||
|
||||
// THIS MUST BE NEAR THE END OF PostUpdateMiscEffects SO ALL OTHER RUN SPEED IS DONE FIRST. DO NOT PUT ANY RUN SPEED AFTER THIS
|
||||
|
||||
|
||||
// Multiplies movement speed by 1.5x so that you don't feel like a snail in the early game.
|
||||
// This applies to movement speed boosts as well as base speed to ensure they are actually worth their listed value compared to base speed
|
||||
//
|
||||
// Disabled while Overhaul is enabled, because Overhaul does very similar things to make movement more snappy
|
||||
if (ExternalMods.overhaul is null && CalamityServerConfig.Instance.FasterBaseSpeed)
|
||||
// 22JUN2025: Ozzatron: Disabled while Remnants is enabled, because Remnants has its own move speed reworks.
|
||||
|
||||
bool ignoreSpeedConfig = ExternalMods.overhaul is not null || ExternalMods.remnants is not null;
|
||||
if (!ignoreSpeedConfig && CalamityServerConfig.Instance.FasterBaseSpeed)
|
||||
Player.moveSpeed *= BalancingConstants.DefaultMoveSpeedBoost;
|
||||
|
||||
// This is used to increase horizontal velocity based on the player's movement speed stat.
|
||||
@@ -506,8 +510,8 @@ namespace CalamityMod.CalPlayer
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
int hasBuff = Player.buffType[l];
|
||||
if (Player.buffTime[l] > 360 && hasBuff == BuffID.ShadowDodge)
|
||||
Player.buffTime[l] = 360;
|
||||
if (Player.buffTime[l] > 600 && hasBuff == BuffID.ShadowDodge)
|
||||
Player.buffTime[l] = 600;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -910,8 +914,11 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (target.Calamity().cursorFocus >= CalamityGlobalNPC.cursorFocusMax)
|
||||
{
|
||||
target.Calamity().trueVulnerabilityHex = target.Calamity().vulnerabilityHex >= 300 ? target.Calamity().vulnerabilityHex : 300;
|
||||
target.Calamity().vulnerabilityHex = 0;
|
||||
int vHexDuration = 0;
|
||||
if (target.HasBuff<VulnerabilityHex>())
|
||||
vHexDuration = target.buffTime[target.FindBuffIndex(ModContent.BuffType<VulnerabilityHex>())];
|
||||
target.AddBuff(ModContent.BuffType<TrueVulnerabilityHex>(),vHexDuration <= 300 ? vHexDuration : 300);
|
||||
target.RequestBuffRemoval(ModContent.BuffType<VulnerabilityHex>());
|
||||
SoundEngine.PlaySound(new("CalamityMod/Sounds/Custom/WeaponEnchant"), target.Center);
|
||||
|
||||
for (int i = 0; i < 18; i++)
|
||||
@@ -943,8 +950,12 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Incinerate the target with either Vulnerability Hex or True Vulnerability Hex, depending on current cursor focus.
|
||||
// This adds 8 to the buff duration, which results in a net increase of 3 frames every time damage is dealt, due to damage occurring every 5 frames.
|
||||
int buffToInflict = target.Calamity().trueVulnerabilityHex > 0 ? ModContent.BuffType<TrueVulnerabilityHex>() : ModContent.BuffType<VulnerabilityHex>();
|
||||
target.AddBuff(buffToInflict, target.Calamity().trueVulnerabilityHex > 0 ? target.Calamity().trueVulnerabilityHex + 8 : target.Calamity().vulnerabilityHex < VulnerabilityHex.CalamityDuration ? VulnerabilityHex.CalamityDuration : target.Calamity().vulnerabilityHex + 8);
|
||||
int buffToInflict = target.Calamity().trueVulnerabilityHex? ModContent.BuffType<TrueVulnerabilityHex>() : ModContent.BuffType<VulnerabilityHex>();
|
||||
if (!target.HasBuff(buffToInflict))
|
||||
target.AddBuff(buffToInflict, 52);
|
||||
target.buffTime[target.FindBuffIndex(buffToInflict)] += 8;
|
||||
if (target.buffTime[target.FindBuffIndex(buffToInflict)] < VulnerabilityHex.CalamityDuration)
|
||||
target.buffTime[target.FindBuffIndex(buffToInflict)] = VulnerabilityHex.CalamityDuration;
|
||||
|
||||
// Make some fancy dust to indicate damage is being done.
|
||||
for (int j = 0; j < 12; j++)
|
||||
@@ -1117,34 +1128,11 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
// Life Steal nerf in difficulties above Expert
|
||||
// Reduces the max possible life steal before the cooldown occurs (this mostly just nerfs how much life steal the player can get in bursts)
|
||||
// Master Mode nerfs this by an additional 10
|
||||
float lifeStealCap =
|
||||
CalamityWorld.death ? BalancingConstants.LifeStealCap_Death :
|
||||
CalamityWorld.revenge ? BalancingConstants.LifeStealCap_Revengeance :
|
||||
Main.expertMode ? BalancingConstants.LifeStealCap_Expert :
|
||||
BalancingConstants.LifeStealCap_Classic;
|
||||
|
||||
if (Main.masterMode)
|
||||
lifeStealCap -= BalancingConstants.LifeStealCapReduction_Master;
|
||||
|
||||
if (Player.lifeSteal > lifeStealCap)
|
||||
Player.lifeSteal = lifeStealCap;
|
||||
|
||||
// Normal Mode life steal recovery rate is 0.2/s
|
||||
// Expert Mode life steal recovery rate is 0.15/s
|
||||
// Revengeance Mode life steal recovery rate is 0.125/s
|
||||
// Death Mode life steal recovery rate is 0.1/s
|
||||
// Master Mode life steal recovery rate is nerfed by an additional 0.05/s
|
||||
float lifeStealRecoveryRateReduction =
|
||||
CalamityWorld.death ? BalancingConstants.LifeStealRecoveryRateReduction_Death :
|
||||
CalamityWorld.revenge ? BalancingConstants.LifeStealRecoveryRateReduction_Revengeance :
|
||||
Main.expertMode ? BalancingConstants.LifeStealRecoveryRateReduction_Expert :
|
||||
BalancingConstants.LifeStealRecoveryRateReduction_Classic;
|
||||
|
||||
if (Main.masterMode)
|
||||
lifeStealRecoveryRateReduction += BalancingConstants.LifeStealRecoveryRateReduction_Master;
|
||||
// Reduce the rate of recovery of the Lifesteal variable
|
||||
// Classic Mode: 36 HP/s to 12 HP/s
|
||||
// Expert Mode: 30 HP/s to 9 HP/s
|
||||
float lifeStealRecoveryRateReduction = Main.expertMode ? BalancingConstants.LifeStealRecoveryRateReduction_Expert : BalancingConstants.LifeStealRecoveryRateReduction_Classic;
|
||||
float lifeStealCap = Main.expertMode ? BalancingConstants.LifeStealCap_Expert : BalancingConstants.LifeStealCap_Classic;
|
||||
|
||||
if (Player.lifeSteal < lifeStealCap)
|
||||
Player.lifeSteal -= lifeStealRecoveryRateReduction;
|
||||
@@ -1175,7 +1163,7 @@ namespace CalamityMod.CalPlayer
|
||||
ProvidenceBurnEffectDrawer.ParticleSpawnRate = int.MaxValue;
|
||||
|
||||
// If the player has holy inferno, cause the player to ignite into flames.
|
||||
if (hInferno)
|
||||
if (holyInferno)
|
||||
ProvidenceBurnEffectDrawer.ParticleSpawnRate = 1;
|
||||
|
||||
// Otherwise, if the intensity is too weak, but still present, cause the player to release holy cinders.
|
||||
@@ -1196,11 +1184,11 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
ProvidenceBurnEffectDrawer.Update();
|
||||
|
||||
if (hInferno && holyInfernoFadeIntensity < 1f)
|
||||
if (holyInferno && holyInfernoFadeIntensity < 1f)
|
||||
{
|
||||
holyInfernoFadeIntensity = MathHelper.Clamp(holyInfernoFadeIntensity + 0.015f, 0f, 1f);
|
||||
}
|
||||
else if (!hInferno && holyInfernoFadeIntensity > 0f)
|
||||
else if (!holyInferno && holyInfernoFadeIntensity > 0f)
|
||||
{
|
||||
holyInfernoFadeIntensity = MathHelper.Clamp(holyInfernoFadeIntensity - 0.01f, 0f, 1f);
|
||||
}
|
||||
@@ -1222,7 +1210,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.AddBuff(ModContent.BuffType<FrozenLungs>(), 2, false);
|
||||
}
|
||||
}
|
||||
if (iCantBreathe)
|
||||
if (frozenLungs)
|
||||
{
|
||||
if (Player.breath > 0 && Player.miscCounter % 2 == 0)
|
||||
Player.breath--;
|
||||
@@ -1312,18 +1300,16 @@ namespace CalamityMod.CalPlayer
|
||||
if (!Player.wet)
|
||||
{
|
||||
if (aeroSet)
|
||||
Player.maxFallSpeed = 15f;
|
||||
Player.maxFallSpeed = AerospecBreastplate.SetBonusFallSpeed;
|
||||
if (Player.PortalPhysicsEnabled)
|
||||
Player.maxFallSpeed = 20f;
|
||||
}
|
||||
|
||||
if (Player.controlDown && !Player.controlJump && ironBoots)
|
||||
if (Player.controlDown && !Player.controlJump && (ironBoots || gSabaton) && !gSabatonFalling)
|
||||
{
|
||||
Player.maxFallSpeed = 23f; // This is slightly faster than slimy saddle (so it can be viable)
|
||||
Player.maxFallSpeed *= 2; //This ties Slimy Saddle. It is made viable by also allowing the player to move horizontal, unlike Saddle, and curbing existing vertical speed very fast
|
||||
if (Player.gravDir == 1 ? Player.velocity.Y <= 0 : Player.velocity.Y >= 0)
|
||||
Player.velocity.Y *= 0.7f;
|
||||
else if (Player.gravDir == 1 ? Player.velocity.Y < Player.maxFallSpeed : Player.velocity.Y > Player.maxFallSpeed)
|
||||
Player.velocity.Y = MathHelper.Lerp(Player.velocity.Y, Player.maxFallSpeed, 0.1f);
|
||||
}
|
||||
|
||||
if (LungingDown)
|
||||
@@ -1344,10 +1330,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (holdingDown && Player.ControlsEnabled() && notInLiquid && notOnRope && notGrappling && airborne && !Player.Calamity().gSabatonFalling) //Player cannot further increase their ridiculous gravity during a Gravistar Slam
|
||||
{
|
||||
Player.velocity.Y += Player.gravity * Player.gravDir * (BalancingConstants.HoldingDownGravityMultiplier - 1f);
|
||||
if (Player.Calamity().gSabaton && !Player.gravControl2)
|
||||
{
|
||||
Player.maxFallSpeed *= 1.5f;
|
||||
}
|
||||
if (Player.velocity.Y * Player.gravDir > Player.maxFallSpeed)
|
||||
Player.velocity.Y = Player.maxFallSpeed * Player.gravDir;
|
||||
}
|
||||
@@ -1549,11 +1531,9 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// The fire boots debuff boosts
|
||||
if (hellfireTreads)
|
||||
bootLevel = 2;
|
||||
HeatDebuffMultiplier += 0.5f;
|
||||
else if (flameWakerBoots)
|
||||
bootLevel = 1;
|
||||
else
|
||||
bootLevel = 0;
|
||||
HeatDebuffMultiplier += 0.25f;
|
||||
|
||||
if (rOfResilienceEffect > 0)
|
||||
rOfResilienceEffect--;
|
||||
@@ -1825,7 +1805,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (dOfTheDeepDefenseBuffTimer > 0)
|
||||
{
|
||||
int maxDefense = 15;
|
||||
int maxDefense = 10;
|
||||
int givenDefense = (int)Utils.Remap(dOfTheDeepDefenseBuffTimer, 0, dOfTheDeepDefenseBuffMax * 0.5f, 0, maxDefense);
|
||||
Player.statDefense += givenDefense;
|
||||
dOfTheDeepDefenseBuffTimer--;
|
||||
@@ -2054,8 +2034,6 @@ namespace CalamityMod.CalPlayer
|
||||
phantomicHeartRegen--;
|
||||
if (phantomicBulwarkCooldown > 0)
|
||||
phantomicBulwarkCooldown--;
|
||||
if (KameiBladeUseDelay > 0)
|
||||
KameiBladeUseDelay--;
|
||||
if (galileoCooldown > 0)
|
||||
galileoCooldown--;
|
||||
if (gladiatorTimer > 0)
|
||||
@@ -2157,13 +2135,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (vortexBoosterStealthDelay == 1 && Player.setVortex)
|
||||
Player.vortexStealthActive = true;
|
||||
}
|
||||
if (statisPenaltyTimer > 0)
|
||||
statisPenaltyTimer--;
|
||||
if (statisPenaltyTimer == 0 && statisAnticheese > 0)
|
||||
{
|
||||
statisAnticheese--;
|
||||
statisPenaltyTimer = statisTimerMax;
|
||||
}
|
||||
if (hallowedRuneCooldown > 0)
|
||||
hallowedRuneCooldown--;
|
||||
if (sulphurBubbleCooldown > 0)
|
||||
@@ -2228,10 +2199,6 @@ namespace CalamityMod.CalPlayer
|
||||
canFireGodSlayerRangedProjectile = true;
|
||||
canFireBloodflareRangedProjectile = true;
|
||||
}
|
||||
if (reaverRegenCooldown < 60 && reaverRegen)
|
||||
reaverRegenCooldown++;
|
||||
else
|
||||
reaverRegenCooldown = 0;
|
||||
if (auralisAurora > 0)
|
||||
auralisAurora--;
|
||||
if (auralisAuroraCooldown > 0)
|
||||
@@ -2522,6 +2489,17 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (brimflameFrenzy)
|
||||
{
|
||||
Player.GetDamage<MagicDamageClass>() += BrimflameCowl.FrenzyMagicDamageBoost;
|
||||
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
if (Player.buffTime[l] <= 2 && Player.buffType[l] == ModContent.BuffType<BrimflameFrenzyBuff>() && Player.whoAmI == Main.myPlayer)
|
||||
Player.AddCooldown(BrimflameFrenzy.ID, BrimflameCowl.FrenzyCooldown);
|
||||
}
|
||||
}
|
||||
|
||||
// Raider Talisman bonus
|
||||
if (raiderTalisman && !vampiricTalisman && !StealthStrikeAvailable() && raiderCritLifespan > 0f)
|
||||
Player.GetCritChance<ThrowingDamageClass>() += RaidersTalisman.RaiderBonus;
|
||||
@@ -2541,7 +2519,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.isNearFairy())
|
||||
{
|
||||
Player.lifeRegen += 4;
|
||||
Player.statDefense += 10;
|
||||
Player.statDefense += 6;
|
||||
Player.moveSpeed += 0.1f;
|
||||
}
|
||||
}
|
||||
@@ -2565,7 +2543,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (affliction || afflicted)
|
||||
{
|
||||
Player.endurance += 0.07f;
|
||||
Player.statDefense += 13;
|
||||
Player.statDefense += 9;
|
||||
Player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
}
|
||||
|
||||
@@ -2605,7 +2583,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Permafrost's Concoction bonuses/debuffs
|
||||
if (permafrostsConcoction)
|
||||
{
|
||||
Player.manaCost *= 0.85f;
|
||||
Player.manaCost -= 0.15f;
|
||||
Player.statManaMax2 += 50;
|
||||
}
|
||||
|
||||
@@ -2734,23 +2712,19 @@ namespace CalamityMod.CalPlayer
|
||||
// Plagued Fuel Pack and Blunder Booster effects
|
||||
if (jetPackDash > 0 && Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
int velocityAmt = blunderBooster ? 35 : 25;
|
||||
int velocityMult = jetPackDash > 1 ? velocityAmt : 5;
|
||||
Player.velocity = new Vector2(jetPackDirection, -1) * velocityMult;
|
||||
int velocityMult = (int)((blunderBooster ? 35 : 25) * Utils.GetLerpValue(-4, 5, jetPackDash, true));
|
||||
Player.velocity = new Vector2(jetPackDirection, -1f) * velocityMult;
|
||||
|
||||
if (blunderBooster)
|
||||
{
|
||||
int lightningCount = Main.rand.Next(5, 7);
|
||||
int lightningCount = 4;
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<BlunderBooster>()));
|
||||
for (int i = 0; i < lightningCount; i++)
|
||||
{
|
||||
Vector2 lightningVel = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1));
|
||||
lightningVel.Normalize();
|
||||
lightningVel *= Main.rand.NextFloat(1f, 2f);
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(30);
|
||||
Vector2 lightningVel = Player.velocity.SafeNormalize(Vector2.UnitX).RotatedByRandom(0.3f) * Main.rand.NextFloat(7f, 10f);
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(35);
|
||||
|
||||
int projectile = Projectile.NewProjectile(source, Player.Center, lightningVel, ModContent.ProjectileType<BlunderBoosterLightning>(), damage, 0, Player.whoAmI, Main.rand.Next(2), 0f);
|
||||
Main.projectile[projectile].timeLeft = Main.rand.Next(180, 240);
|
||||
if (projectile.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[projectile].DamageType = DamageClass.Generic;
|
||||
}
|
||||
@@ -2765,17 +2739,14 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
else if (plaguedFuelPack)
|
||||
{
|
||||
int numClouds = Main.rand.Next(8, 10);
|
||||
int numClouds = 3;
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<PlaguedFuelPack>()));
|
||||
for (int i = 0; i < numClouds; i++)
|
||||
{
|
||||
Vector2 cloudVelocity = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1));
|
||||
cloudVelocity.Normalize();
|
||||
cloudVelocity *= Main.rand.NextFloat(0f, 1f);
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(20);
|
||||
Vector2 cloudVelocity = Player.velocity.SafeNormalize(Vector2.UnitX).RotatedByRandom(0.3f) * Main.rand.NextFloat(5f, 7f);
|
||||
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(30);
|
||||
|
||||
int projectile = Projectile.NewProjectile(source, Player.Center, cloudVelocity, ModContent.ProjectileType<PlaguedFuelPackCloud>(), damage, 0, Player.whoAmI, 0, 0);
|
||||
Main.projectile[projectile].timeLeft = Main.rand.Next(180, 240);
|
||||
if (projectile.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[projectile].DamageType = DamageClass.Generic;
|
||||
}
|
||||
@@ -2802,7 +2773,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
brimflameFrenzy = false;
|
||||
Player.ClearBuff(ModContent.BuffType<BrimflameFrenzyBuff>());
|
||||
Player.AddCooldown(BrimflameFrenzy.ID, BrimflameScowl.CooldownLength);
|
||||
Player.AddCooldown(BrimflameFrenzy.ID, BrimflameCowl.FrenzyCooldown);
|
||||
}
|
||||
if (!bloodflareMelee && bloodflareFrenzy)
|
||||
{
|
||||
@@ -3008,7 +2979,7 @@ namespace CalamityMod.CalPlayer
|
||||
abyssBreathLossRateStat = (float)tick;
|
||||
|
||||
float resistanceSlowdownFactor = 1f;
|
||||
if (hPressure)
|
||||
if (hadopelagicPressure)
|
||||
resistanceSlowdownFactor -= abyssalDivingSuit ? 0.2f : 0.5f;
|
||||
|
||||
// Reduce breath over ticks (frames)
|
||||
@@ -3021,14 +2992,14 @@ namespace CalamityMod.CalPlayer
|
||||
// Reduce breath
|
||||
if (Player.breath > 0)
|
||||
{
|
||||
Player.breath -= (int)(cDepth && !depthCharm ? breathLoss + 1D : breathLoss);
|
||||
Player.breath -= (int)(crushDepth && !depthCharm ? breathLoss + 1D : breathLoss);
|
||||
}
|
||||
}
|
||||
|
||||
// If breath is greater than 0 and player has gills or is merfolk, balance out the effects by reducing breath
|
||||
if (Player.breath > 0)
|
||||
{
|
||||
if (Player.gills || Player.merman)
|
||||
if (Player.gills || Player.merman || Player.accMerman)
|
||||
Player.breath -= 3;
|
||||
}
|
||||
|
||||
@@ -3162,7 +3133,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Aquatic Emblem bonus
|
||||
if (aquaticEmblem)
|
||||
{
|
||||
if (Player.IsUnderwater() && Player.wet && !Player.lavaWet && !Player.honeyWet &&
|
||||
if (countsAsAnyWet && !Player.lavaWet && !Player.honeyWet &&
|
||||
!Player.mount.Active)
|
||||
{
|
||||
if (aquaticBoost > 0f)
|
||||
@@ -3179,17 +3150,17 @@ namespace CalamityMod.CalPlayer
|
||||
else
|
||||
{
|
||||
aquaticBoost += 2f;
|
||||
if (aquaticBoost > aquaticBoostMax)
|
||||
aquaticBoost = aquaticBoostMax;
|
||||
if (aquaticBoost > AquaticBoostMax)
|
||||
aquaticBoost = AquaticBoostMax;
|
||||
if (Player.mount.Active)
|
||||
aquaticBoost = aquaticBoostMax;
|
||||
aquaticBoost = AquaticBoostMax;
|
||||
}
|
||||
|
||||
Player.statDefense += (int)((1f - aquaticBoost * 0.0001f) * 50f);
|
||||
Player.statDefense += (int)((1f - aquaticBoost * 0.0001f) * 20f);
|
||||
Player.moveSpeed -= (1f - aquaticBoost * 0.0001f) * 0.1f;
|
||||
}
|
||||
else
|
||||
aquaticBoost = aquaticBoostMax;
|
||||
aquaticBoost = AquaticBoostMax;
|
||||
|
||||
if (Player.ActiveItem().type == ModContent.ItemType<Auralis>() && Player.StandingStill(0.1f))
|
||||
{
|
||||
@@ -3362,11 +3333,6 @@ namespace CalamityMod.CalPlayer
|
||||
Player.GetDamage<GenericDamageClass>() += Grax.DamageBoost;
|
||||
}
|
||||
|
||||
if (brutalCarnage)
|
||||
{
|
||||
Player.GetDamage<MeleeDamageClass>() += BrutalCarnage.MeleeDamageBoost;
|
||||
}
|
||||
|
||||
// Trinket of Chi bonus
|
||||
if (trinketOfChi)
|
||||
{
|
||||
@@ -3384,7 +3350,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.GetDamage<GenericDamageClass>() += 0.12f;
|
||||
Player.GetKnockback<SummonDamageClass>() += 1.2f;
|
||||
if (Main.eclipse || !Main.dayTime)
|
||||
Player.statDefense += Main.eclipse ? 10 : 20;
|
||||
Player.statDefense += Main.eclipse ? 8 : 16;
|
||||
}
|
||||
|
||||
if (AbsorberRegen)
|
||||
@@ -3431,7 +3397,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (tortShellPostHit > 0)
|
||||
{
|
||||
Player.statDefense -= 8;
|
||||
Player.statDefense -= 6;
|
||||
tortShellPostHit--;
|
||||
}
|
||||
else
|
||||
@@ -3549,7 +3515,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (starBeamRye)
|
||||
{
|
||||
Player.GetDamage<MagicDamageClass>() += StarBeamRye.MagicDamageBoost;
|
||||
Player.manaCost *= (1f - StarBeamRye.ManaCostReduction);
|
||||
Player.manaCost -= StarBeamRye.ManaCostReduction;
|
||||
Player.statManaMax2 += StarBeamRye.MaxManaBoost;
|
||||
}
|
||||
|
||||
@@ -3687,24 +3653,12 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (tarraSet)
|
||||
{
|
||||
if (!tarraMelee)
|
||||
Player.calmed = true;
|
||||
Player.lifeMagnet = true;
|
||||
}
|
||||
|
||||
if (wDeath && !laudanum && !purity)
|
||||
if (whisperingDeath && !laudanum && !purity)
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.2f;
|
||||
|
||||
if (astralInfection && !(infectedJewel || hideOfDeus || purity))
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.1f;
|
||||
|
||||
if (pFlames && !purity)
|
||||
{
|
||||
Player.GetDamage<GenericDamageClass>() -= 0.1f;
|
||||
}
|
||||
|
||||
if (aCrunch && !laudanum && !purity)
|
||||
if (armorCrunch && !laudanum && !purity)
|
||||
{
|
||||
Player.statDefense -= ArmorCrunch.DefenseReduction;
|
||||
Player.endurance *= ArmorCrunch.MultiplicativeDamageReductionPlayer;
|
||||
@@ -3766,11 +3720,17 @@ namespace CalamityMod.CalPlayer
|
||||
Player.GetDamage<MeleeDamageClass>() += 0.1f;
|
||||
}
|
||||
|
||||
// While making the rogue update verify if we should allow these to stack again - Shade
|
||||
if (filthyGlove)
|
||||
{
|
||||
bonusStealthDamage += nanotech ? 0.05f : 0.08f;
|
||||
}
|
||||
|
||||
if (rottenDogTooth && !nanotech)
|
||||
{
|
||||
bonusStealthDamage += 0.08f;
|
||||
}
|
||||
|
||||
if (sandsWindBuff)
|
||||
{
|
||||
Player.GetDamage<GenericDamageClass>() += PrimordialEarth.BuffDamageBoost;
|
||||
@@ -3796,7 +3756,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.statLife > (int)(Player.statLifeMax2 * 0.5))
|
||||
Player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5))
|
||||
Player.statDefense += 20;
|
||||
Player.statDefense += 15;
|
||||
}
|
||||
|
||||
if (vexation)
|
||||
@@ -4017,7 +3977,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (eArtifact)
|
||||
{
|
||||
Player.manaCost *= 0.75f;
|
||||
Player.manaCost -= 0.25f;
|
||||
Player.maxMinions++;
|
||||
}
|
||||
|
||||
@@ -4423,7 +4383,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Also gives acceleration, which is done in PostUpdateRunSpeeds
|
||||
break;
|
||||
case BuffID.Ichor:
|
||||
Player.statDefense += 40; // +25 net defense
|
||||
Player.statDefense += 20; // +10 net defense
|
||||
break;
|
||||
case BuffID.Bleeding:
|
||||
Player.bleed = false;
|
||||
@@ -4441,7 +4401,7 @@ namespace CalamityMod.CalPlayer
|
||||
case BuffID.Weak:
|
||||
Player.GetDamage<MeleeDamageClass>() += 0.051f; // Cancel melee damage nerf, add 10% all damage
|
||||
Player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
Player.statDefense += 14; // +10 net defense
|
||||
Player.statDefense += 10; // +6 net defense
|
||||
Player.moveSpeed += 0.25f; // +15% net move speed
|
||||
break;
|
||||
case BuffID.Slow:
|
||||
@@ -4450,7 +4410,7 @@ namespace CalamityMod.CalPlayer
|
||||
break;
|
||||
case BuffID.Confused:
|
||||
Player.confused = false;
|
||||
Player.statDefense += 50;
|
||||
Player.statDefense += 15;
|
||||
break;
|
||||
case BuffID.Cursed:
|
||||
Player.cursed = false;
|
||||
@@ -4868,7 +4828,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (DesertProwlerHat.ShroudedInSmoke(Player, out _))
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.75);
|
||||
Player.statDefense -= (int)(Player.statDefense * DesertProwlerHat.SmokeDefenseMult);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -8,7 +8,10 @@ using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Cooldowns;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor.Astral;
|
||||
using CalamityMod.Items.Armor.Reaver;
|
||||
using CalamityMod.Items.Armor.SnowRuffian;
|
||||
using CalamityMod.Items.Armor.Sulphurous;
|
||||
using CalamityMod.Items.Fishing.AstralCatches;
|
||||
using CalamityMod.Items.VanillaArmorChanges;
|
||||
using CalamityMod.NPCs;
|
||||
@@ -138,7 +141,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
ItemLifesteal(target, item, damageDone);
|
||||
ItemOnHit(item, damageDone, target.Center, hit.Crit, target.IsAnEnemy(false, true), targetIsDummy);
|
||||
NPCDebuffs(target, item.CountsAsClass<MeleeDamageClass>(), item.CountsAsClass<RangedDamageClass>(), item.CountsAsClass<MagicDamageClass>(), item.CountsAsClass<SummonDamageClass>(), item.CountsAsClass<ThrowingDamageClass>(), item.CountsAsClass<SummonMeleeSpeedDamageClass>());
|
||||
NPCDebuffs(target, item.CountsAsClass<MeleeDamageClass>(), item.CountsAsClass<RangedDamageClass>(), item.CountsAsClass<MagicDamageClass>(), item.CountsAsClass<SummonDamageClass>(), item.CountsAsClass<ThrowingDamageClass>(), item.CountsAsClass<SummonMeleeSpeedDamageClass>(), hit.Crit);
|
||||
|
||||
// Ursa Sergeant slash cooldown is reset on kill
|
||||
if (ursaSergeant && target.life <= 0 && target.realLife == -1)
|
||||
@@ -193,13 +196,14 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Arc Flash Ring lightning strike (Remember to change the one for projectile hits if applicable when you change this one!)
|
||||
// This one has a lot less limits than the projectile one, but that's because vanilla broadsword code is limiting (wow so surprising)
|
||||
if (arcFlashRing && (Main.rand.Next(0, 100) < 6))
|
||||
bool spawnChance = (Main.rand.Next(0, 100) < 6);
|
||||
if (arcFlashRing && spawnChance)
|
||||
{
|
||||
var source = item.GetSource_FromThis();
|
||||
int damage = (int)((hit.Damage * 4f) * (hit.Crit ? 0.5f : 1)); // 400% damage (uneffected by crits)
|
||||
Vector2 position = target.Center + new Vector2(0, -750);
|
||||
int damage = (int)(((hit.Damage * 4f) * (hit.Crit ? 0.5f : 1)) / (Player.Calamity().adrenalineModeActive ? Player.Calamity().GetAdrenalineDamage() + 1 : 1)); // 400% damage (uneffected by crits and adrenaline)
|
||||
|
||||
Projectile.NewProjectile(source, position, new Vector2(0, 10), ProjectileType<FlashBolt>(), damage, 0f, Player.whoAmI, target.whoAmI);
|
||||
Projectile bolt = Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ProjectileType<FlashBolt>(), damage, 0f, Player.whoAmI, target.whoAmI);
|
||||
bolt.DamageType = hit.DamageType;
|
||||
}
|
||||
|
||||
// Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies).
|
||||
@@ -233,25 +237,12 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (witheringWeaponEnchant)
|
||||
witheringDamageDone += (int)(damageDone * (hit.Crit ? 2D : 1D));
|
||||
|
||||
cgn.IncreasedColdEffects_EskimoSet = eskimoSet;
|
||||
cgn.IncreasedColdEffects_CryoStone = CryoStone;
|
||||
|
||||
cgn.IncreasedElectricityEffects_Unused = false;
|
||||
|
||||
cgn.IncreasedHeatEffects_Fireball = fireball;
|
||||
cgn.IncreasedHeatEffects_CinnamonRoll = cinnamonRoll;
|
||||
cgn.IncreasedHeatEffects_FireBoots = bootLevel;
|
||||
|
||||
cgn.IncreasedSicknessEffects_ToxicHeart = toxicHeart;
|
||||
|
||||
cgn.IncreasedWaterEffects_Amulet1 = sSpiritAmulet;
|
||||
cgn.IncreasedWaterEffects_Amulet2 = dOfTheDeep;
|
||||
|
||||
cgn.IncreasedSicknessAndWaterEffects_EvergreenGin = evergreenGin;
|
||||
cgn.IncreasedSicknessAndWaterEffects_CorrosiveSpine = corrosiveSpine;
|
||||
|
||||
cgn.IncreasedDebuffEffects_Amalgam = amalgam;
|
||||
cgn.TypelessDebuffMultiplier = TypelessDebuffMultiplier;
|
||||
cgn.HeatDebuffMultiplier = HeatDebuffMultiplier;
|
||||
cgn.ColdDebuffMultiplier = ColdDebuffMultiplier;
|
||||
cgn.SicknessDebuffMultiplier = SicknessDebuffMultiplier;
|
||||
cgn.WaterDebuffMultiplier = WaterDebuffMultiplier;
|
||||
cgn.ElectricDebuffMultiplier = ElectricDebuffMultiplier;
|
||||
|
||||
switch (proj.type)
|
||||
{
|
||||
@@ -396,22 +387,20 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
CalamityGlobalProjectile globalProj = proj.Calamity();
|
||||
// Arc Flash Ring lightning strike (Remember to change the one for item hits if applicable when you change this one!)
|
||||
// Minions ignore the chance penalty on penetration
|
||||
bool spawnChance = (Main.rand.Next(0, 100) < MathHelper.Clamp(6 - proj.numHits, (proj.minion ? 6 : 1), 6));
|
||||
if (arcFlashRing && spawnChance && proj.type != ProjectileType<FlashBolt>() && globalProj.spawnArcFlash)
|
||||
bool spawnChance = (Main.rand.Next(0, 100) < 6);
|
||||
if (arcFlashRing && spawnChance && proj.type != ProjectileType<FlashBolt>())
|
||||
{
|
||||
proj.active = true; // Okay so if a projectile manually kills itself on hit, it totally breaks the bolts. to prevent this we set them to active
|
||||
|
||||
var source = proj.GetSource_FromThis();
|
||||
int damage = (int)((hit.Damage * 4f) * (hit.Crit ? 0.5f : 1)); // 400% damage (uneffected by crits)
|
||||
Vector2 position = target.Center + new Vector2(0, -750);
|
||||
int damage = (int)(((hit.Damage * 4f) * (hit.Crit ? 0.5f : 1)) / (Player.Calamity().adrenalineModeActive ? Player.Calamity().GetAdrenalineDamage() + 1 : 1)); // 400% damage (uneffected by crits and adrenaline)
|
||||
|
||||
Projectile bolt = Projectile.NewProjectileDirect(source, position, new Vector2(0, 10), ProjectileType<FlashBolt>(), damage, 0f, Player.whoAmI, target.whoAmI);
|
||||
Projectile bolt = Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ProjectileType<FlashBolt>(), damage, 0f, Player.whoAmI, target.whoAmI, (globalProj.showArcFlash ? 0 : 1));
|
||||
bolt.DamageType = hit.DamageType;
|
||||
|
||||
globalProj.spawnArcFlash = false;
|
||||
// This is really only used for long lasting projectiles and contact damage minions
|
||||
globalProj.arcFlashCooldown = 90;
|
||||
globalProj.showArcFlash = false;
|
||||
// This is really only used for piercing and long lasting projectiles so they dont flood the screen with bolts
|
||||
globalProj.arcFlashCooldown = 30;
|
||||
}
|
||||
|
||||
if (!proj.npcProj && !proj.trap && proj.friendly)
|
||||
@@ -574,11 +563,7 @@ namespace CalamityMod.CalPlayer
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
}
|
||||
|
||||
int heal = (int)Math.Round(hit.Damage * 0.035);
|
||||
if (Main.LocalPlayer.lifeSteal <= 0f || heal <= 0 || target.lifeMax <= 5)
|
||||
return;
|
||||
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Main.player[proj.owner], heal, ProjectileType<AltTransfusionTrail>(), BalancingConstants.LifeStealRange);
|
||||
Main.player[proj.owner].SpawnLifeStealProjectile(target, proj, ProjectileType<AltTransfusionTrail>(), (int)Math.Round(hit.Damage * 0.035));
|
||||
}
|
||||
|
||||
if ((cgp.betterLifeBullet1 || cgp.betterLifeBullet2) && proj.numHits == 0)
|
||||
@@ -594,13 +579,9 @@ namespace CalamityMod.CalPlayer
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
}
|
||||
|
||||
int heal = (int)Math.Round(hit.Damage * 0.01);
|
||||
if (Main.LocalPlayer.lifeSteal <= 0f || heal <= 0 || target.lifeMax <= 5)
|
||||
return;
|
||||
|
||||
for (int i = 0; i <= 2; i++)
|
||||
{
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Main.player[proj.owner], heal, ProjectileType<AltTransfusionTrail>(), BalancingConstants.LifeStealRange);
|
||||
Main.player[proj.owner].SpawnLifeStealProjectile(target, proj, ProjectileType<AltTransfusionTrail>(), (int)Math.Round(hit.Damage * 0.01), 0.75f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -608,7 +589,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
ProjLifesteal(target, proj, damageDone, hit.Crit);
|
||||
ProjOnHit(proj, target.Center, hit.Crit, target.IsAnEnemy(false), targetIsDummy);
|
||||
NPCDebuffs(target, proj.CountsAsClass<MeleeDamageClass>(), proj.CountsAsClass<RangedDamageClass>(), proj.CountsAsClass<MagicDamageClass>(), proj.CountsAsClass<SummonDamageClass>(), proj.CountsAsClass<ThrowingDamageClass>(), proj.CountsAsClass<SummonMeleeSpeedDamageClass>(), true, proj.noEnchantments);
|
||||
NPCDebuffs(target, proj.CountsAsClass<MeleeDamageClass>(), proj.CountsAsClass<RangedDamageClass>(), proj.CountsAsClass<MagicDamageClass>(), proj.CountsAsClass<SummonDamageClass>(), proj.CountsAsClass<ThrowingDamageClass>(), proj.CountsAsClass<SummonMeleeSpeedDamageClass>(), hit.Crit, true, proj.noEnchantments);
|
||||
|
||||
// Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies).
|
||||
if (targetIsDummy)
|
||||
@@ -627,9 +608,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (!item.CountsAsClass<MeleeDamageClass>() && Player.meleeEnchant == 7)
|
||||
Projectile.NewProjectile(source, position, Player.velocity, ProjectileID.ConfettiMelee, 0, 0f, Player.whoAmI);
|
||||
|
||||
if (reaverDefense)
|
||||
Player.lifeRegenTime += 1;
|
||||
|
||||
if (npcCheck)
|
||||
{
|
||||
if (item.CountsAsClass<MeleeDamageClass>() && hideOfDeus && hideOfDeusTimer == 0)
|
||||
@@ -642,7 +620,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (astralStarRain && crit && astralStarRainCooldown <= 0)
|
||||
{
|
||||
astralStarRainCooldown = 60;
|
||||
astralStarRainCooldown = AstralHelm.StarRainCooldown;
|
||||
for (int n = 0; n < 3; n++)
|
||||
{
|
||||
int projectileType = Utils.SelectRandom(Main.rand, new int[]
|
||||
@@ -653,7 +631,7 @@ namespace CalamityMod.CalPlayer
|
||||
ProjectileID.StarCannonStar
|
||||
});
|
||||
|
||||
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(120);
|
||||
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(AstralHelm.StarDamage);
|
||||
|
||||
Projectile star = CalamityUtils.ProjectileRain(source, position, 400f, 100f, 500f, 800f, 12f, projectileType, astralStarDamage, 5f, Player.whoAmI);
|
||||
if (star.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
@@ -708,14 +686,11 @@ namespace CalamityMod.CalPlayer
|
||||
if (theBee && lifeAndShieldCondition)
|
||||
SoundEngine.PlaySound(SoundID.Item110, proj.Center);
|
||||
|
||||
if (reaverDefense)
|
||||
Player.lifeRegenTime += 1;
|
||||
|
||||
if (npcCheck)
|
||||
{
|
||||
if (astralStarRain && crit && astralStarRainCooldown <= 0)
|
||||
{
|
||||
astralStarRainCooldown = 60;
|
||||
astralStarRainCooldown = AstralHelm.StarRainCooldown;
|
||||
for (int n = 0; n < 3; n++)
|
||||
{
|
||||
int projectileType = Utils.SelectRandom(Main.rand, new int[]
|
||||
@@ -726,7 +701,7 @@ namespace CalamityMod.CalPlayer
|
||||
ProjectileID.StarCannonStar
|
||||
});
|
||||
|
||||
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(120);
|
||||
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(AstralHelm.StarDamage);
|
||||
|
||||
Projectile star = CalamityUtils.ProjectileRain(source, position, 400f, 100f, 500f, 800f, 25f, projectileType, astralStarDamage, 5f, Player.whoAmI);
|
||||
if (star.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
@@ -1161,6 +1136,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (raiderTalisman && modProj.stealthStrike)
|
||||
{
|
||||
raiderCritLifespan = CalamityUtils.SecondsToFrames(RaidersTalisman.RaiderCooldown);
|
||||
// TO DO: Add nanotech here
|
||||
Player.AddCooldown(RaiderBoost.ID, raiderCritLifespan, true, vampiricTalisman ? "Bloodfeast" : "default");
|
||||
if (raiderSoundCooldown <= 0)
|
||||
{
|
||||
@@ -1201,7 +1177,7 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region Debuffs
|
||||
public void NPCDebuffs(NPC target, bool melee, bool ranged, bool magic, bool summon, bool rogue, bool whip, bool proj = false, bool noFlask = false)
|
||||
public void NPCDebuffs(NPC target, bool melee, bool ranged, bool magic, bool summon, bool rogue, bool whip, bool crit, bool proj = false, bool noFlask = false)
|
||||
{
|
||||
if (melee && !noFlask) // Prevents Deep Sea Dumbell from snagging true melee debuff memes
|
||||
{
|
||||
@@ -1307,8 +1283,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (omegaBlueChestplate)
|
||||
target.AddBuff(BuffType<HadopelagicPressure>(), 180);
|
||||
if (sulphurSet)
|
||||
target.AddBuff(BuffID.Poisoned, 60);
|
||||
if (ilSpark && Player.IsUnderwater())
|
||||
target.AddBuff(BuffID.Poisoned, SulphurousHelmet.SetBonusPoisonDuration);
|
||||
if (ilSpark && Player.Calamity().countsAsAnyWet)
|
||||
{
|
||||
int duration = 60;
|
||||
target.AddBuff(BuffType<StaticDischarge>(), duration);
|
||||
@@ -1323,7 +1299,11 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (vexation)
|
||||
{
|
||||
target.AddBuff(BuffID.Venom, 120, false);
|
||||
target.AddBuff(BuffID.Venom, 120, false);
|
||||
}
|
||||
if (snowRuffianSet && ranged && crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Frostburn, SnowRuffianMask.SetBonusFrostburnDuration, false);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -1332,148 +1312,56 @@ namespace CalamityMod.CalPlayer
|
||||
public void ProjLifesteal(NPC target, Projectile proj, int damage, bool crit)
|
||||
{
|
||||
CalamityGlobalProjectile modProj = proj.Calamity();
|
||||
|
||||
if (bloodflareSet && !target.IsAnEnemy(false) && !Player.moonLeech && target.lifeMax > 5)
|
||||
if (target.IsAnEnemy(false))
|
||||
{
|
||||
if ((target.life < target.lifeMax * 0.5) && bloodflareHeartTimer <= 0)
|
||||
if (bloodflareSet && !Player.moonLeech)
|
||||
{
|
||||
bloodflareHeartTimer = 300;
|
||||
Item.NewItem(target.GetSource_Loot(), target.Hitbox, ItemID.Heart);
|
||||
}
|
||||
}
|
||||
|
||||
if (gladiatorSword && target.IsAnEnemy(false) && target.life <= 0 && target.Calamity().gladiatorOnKill && target.lifeMax > 5)
|
||||
{
|
||||
float healPower = 10 * Utils.GetLerpValue(300, 0, gladiatorTimer, true);
|
||||
target.Calamity().gladiatorOnKill = false;
|
||||
if (healPower >= 1)
|
||||
{
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), target.Center, target.velocity * 0.5f, ProjectileType<GladiatorHealOrb>(), 0, 0, -1, (int)healPower);
|
||||
gladiatorTimer = 300;
|
||||
}
|
||||
}
|
||||
|
||||
if (Main.LocalPlayer.lifeSteal > 0f && !Player.moonLeech && target.lifeMax > 5)
|
||||
{
|
||||
// Increases the degree to which Spectre Healing set contributes to the lifesteal cap
|
||||
if (Player.ghostHeal && proj.CountsAsClass<MagicDamageClass>())
|
||||
{
|
||||
// This doesn't use Math.Round because it doesn't in vanilla
|
||||
float cooldownMult = 0.2f;
|
||||
cooldownMult -= proj.numHits * 0.05f;
|
||||
if (cooldownMult < 0f)
|
||||
cooldownMult = 0f;
|
||||
|
||||
float cooldown = damage * cooldownMult;
|
||||
Main.LocalPlayer.lifeSteal -= cooldown;
|
||||
}
|
||||
|
||||
if (vampiricTalisman && proj.CountsAsClass<RogueDamageClass>() && crit)
|
||||
{
|
||||
int heal = (int)Math.Round(damage * (Main.zenithWorld ? 0.01 : 0.008));
|
||||
if (proj.Calamity().stealthStrike)
|
||||
if ((target.life < target.lifeMax * 0.5) && bloodflareHeartTimer <= 0)
|
||||
{
|
||||
heal /= 2; //stealth strikes heal half due to generally dealing far more dmg
|
||||
|
||||
if (Main.zenithWorld)
|
||||
heal *= -2; // IT YEARNS FOR MORE BLOOD
|
||||
bloodflareHeartTimer = 300;
|
||||
Item.NewItem(target.GetSource_Loot(), target.Hitbox, ItemID.Heart);
|
||||
}
|
||||
if (heal > BalancingConstants.LifeStealCap)
|
||||
heal = BalancingConstants.LifeStealCap;
|
||||
|
||||
// Heals more if the ability is active
|
||||
if (CalamityGlobalProjectile.CanSpawnLifeStealProjectile((raiderCritLifespan > 0) ? 1.5f : 1f, heal))
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, heal, ProjectileID.VampireHeal, BalancingConstants.LifeStealRange, BalancingConstants.LifeStealAccessoryCooldownMultiplier);
|
||||
}
|
||||
|
||||
if (bloodyGlove && proj.CountsAsClass<RogueDamageClass>() && modProj.stealthStrike)
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, 2, ProjectileID.VampireHeal, BalancingConstants.LifeStealRange, BalancingConstants.LifeStealAccessoryCooldownMultiplier);
|
||||
|
||||
if (target.IsAnEnemy(false))
|
||||
if (gladiatorSword && target.life <= 0 && target.Calamity().gladiatorOnKill)
|
||||
{
|
||||
if (bloodflareThrowing && proj.CountsAsClass<ThrowingDamageClass>() && crit)
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, 2, ProjectileID.VampireHeal, BalancingConstants.LifeStealRange, BalancingConstants.LifeStealSetBonusCooldownMultiplier);
|
||||
|
||||
if (bloodflareMelee && proj.IsTrueMelee())
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, 2, ProjectileID.VampireHeal, BalancingConstants.LifeStealRange, BalancingConstants.LifeStealSetBonusCooldownMultiplier);
|
||||
float healPower = 10 * Utils.GetLerpValue(300, 0, gladiatorTimer, true);
|
||||
target.Calamity().gladiatorOnKill = false;
|
||||
if (healPower >= 1)
|
||||
{
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), target.Center, target.velocity * 0.5f, ProjectileType<GladiatorHealOrb>(), 0, 0, -1, (int)healPower);
|
||||
gladiatorTimer = 300;
|
||||
}
|
||||
}
|
||||
|
||||
if (vampiricTalisman && proj.CountsAsClass<RogueDamageClass>() && crit && proj.numHits <1)
|
||||
{
|
||||
int heal = (int)Math.Round(damage * 0.008);
|
||||
if (heal > 2)
|
||||
heal = 2;
|
||||
|
||||
Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, heal, (raiderCritLifespan > 0 && !proj.Calamity().stealthStrike) ? 1.3f : 1.6f);
|
||||
}
|
||||
|
||||
if (bloodyGlove && proj.CountsAsClass<RogueDamageClass>() && modProj.stealthStrike && proj.numHits < 1)
|
||||
//Nanotech has the same heal as Electrician's glove
|
||||
Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, electricianGlove ? 10 : 5, 2f);
|
||||
|
||||
if (bloodflareThrowing && proj.CountsAsClass<ThrowingDamageClass>() && crit)
|
||||
Projectile.NewProjectile(proj.GetSource_OnHit(target), proj.Center, proj.velocity.SafeNormalize(Vector2.Zero) * Math.Min(((proj.velocity.Length() * proj.MaxUpdates) / 4f), 4f) * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType<BloodstoneHealOrb>(), 4, 0f, proj.owner);
|
||||
|
||||
if (proj.CountsAsClass<MagicDamageClass>() && Player.ActiveItem().CountsAsClass<MagicDamageClass>())
|
||||
{
|
||||
if (manaOverloader)
|
||||
{
|
||||
double healMult = 0.1;
|
||||
healMult -= proj.numHits * healMult * 0.25;
|
||||
int heal = (int)Math.Round(damage * healMult);
|
||||
if (heal > BalancingConstants.LifeStealCap)
|
||||
heal = BalancingConstants.LifeStealCap;
|
||||
|
||||
if (CalamityGlobalProjectile.CanSpawnLifeStealProjectile(healMult, heal))
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, heal, ProjectileType<ManaPolarizerHealOrb>(), BalancingConstants.LifeStealRange, BalancingConstants.LifeStealAccessoryCooldownMultiplier);
|
||||
double healMult = 0.1D - proj.numHits * 0.025D;
|
||||
Player.SpawnLifeStealProjectile(target, proj, ProjectileType<ManaPolarizerHealOrb>(), (int)Math.Round(damage * healMult), 1.5f);
|
||||
}
|
||||
}
|
||||
|
||||
if (silvaSet)
|
||||
{
|
||||
double healMult = 0.1;
|
||||
healMult -= proj.numHits * healMult * 0.5;
|
||||
int heal = (int)Math.Round(damage * healMult);
|
||||
if (heal > BalancingConstants.LifeStealCap)
|
||||
heal = BalancingConstants.LifeStealCap;
|
||||
|
||||
if (CalamityGlobalProjectile.CanSpawnLifeStealProjectile(healMult, heal))
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, heal, ProjectileType<SilvaOrb>(), BalancingConstants.LifeStealRange, BalancingConstants.LifeStealSetBonusCooldownMultiplier);
|
||||
}
|
||||
else if (proj.CountsAsClass<MagicDamageClass>() && Player.ActiveItem().CountsAsClass<MagicDamageClass>())
|
||||
{
|
||||
if (tarraMage)
|
||||
if (ataxiaMage)
|
||||
{
|
||||
double healMult = 0.1;
|
||||
healMult -= proj.numHits * healMult * 0.5;
|
||||
int heal = (int)Math.Round(damage * healMult);
|
||||
if (heal > BalancingConstants.LifeStealCap)
|
||||
heal = BalancingConstants.LifeStealCap;
|
||||
|
||||
if (CalamityGlobalProjectile.CanSpawnLifeStealProjectile(healMult, heal))
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, heal, ProjectileType<ReaverHealOrb>(), BalancingConstants.LifeStealRange, BalancingConstants.LifeStealSetBonusCooldownMultiplier);
|
||||
}
|
||||
else if (ataxiaMage)
|
||||
{
|
||||
double healMult = 0.1;
|
||||
healMult -= proj.numHits * healMult * 0.5;
|
||||
int heal = (int)Math.Round(damage * healMult);
|
||||
if (heal > BalancingConstants.LifeStealCap)
|
||||
heal = BalancingConstants.LifeStealCap;
|
||||
|
||||
if (CalamityGlobalProjectile.CanSpawnLifeStealProjectile(healMult, heal))
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, heal, ProjectileType<HydrothermicHealOrb>(), BalancingConstants.LifeStealRange, BalancingConstants.LifeStealSetBonusCooldownMultiplier);
|
||||
}
|
||||
}
|
||||
|
||||
if (reaverDefense)
|
||||
{
|
||||
double healMult = 0.1;
|
||||
healMult -= proj.numHits * healMult * 0.5;
|
||||
int heal = (int)Math.Round(damage * healMult);
|
||||
if (heal > BalancingConstants.LifeStealCap)
|
||||
heal = BalancingConstants.LifeStealCap;
|
||||
|
||||
if (CalamityGlobalProjectile.CanSpawnLifeStealProjectile(healMult, heal))
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, heal, ProjectileType<ReaverHealOrb>(), BalancingConstants.LifeStealRange, BalancingConstants.LifeStealReaverTankCooldownMultiplier);
|
||||
}
|
||||
|
||||
if (proj.CountsAsClass<ThrowingDamageClass>())
|
||||
{
|
||||
if (xerocSet && xerocDmg <= 0 && Player.ownedProjectileCounts[ProjectileType<EmpyreanEmber>()] < 3 && Player.ownedProjectileCounts[ProjectileType<EmpyreanBlast>()] < 3)
|
||||
{
|
||||
double healMult = 0.1;
|
||||
healMult -= proj.numHits * healMult * 0.5;
|
||||
int heal = (int)Math.Round(damage * healMult);
|
||||
if (heal > BalancingConstants.LifeStealCap)
|
||||
heal = BalancingConstants.LifeStealCap;
|
||||
|
||||
if (CalamityGlobalProjectile.CanSpawnLifeStealProjectile(healMult, heal))
|
||||
CalamityGlobalProjectile.SpawnLifeStealProjectile(proj, Player, heal, ProjectileType<EmpyreanHealOrb>(), BalancingConstants.LifeStealRange, BalancingConstants.LifeStealSetBonusCooldownMultiplier);
|
||||
double healMult = 0.1D - proj.numHits * 0.05D;
|
||||
Player.SpawnLifeStealProjectile(target, proj, ProjectileType<HydrothermicHealOrb>(), (int)Math.Round(damage * healMult), 1.25f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1481,89 +1369,25 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
public void ItemLifesteal(NPC target, Item item, int damage)
|
||||
{
|
||||
if (bloodflareSet && target.IsAnEnemy(false) && target.lifeMax > 5)
|
||||
if (target.IsAnEnemy(false))
|
||||
{
|
||||
if ((target.life < target.lifeMax * 0.5) && bloodflareHeartTimer <= 0)
|
||||
if (bloodflareSet)
|
||||
{
|
||||
bloodflareHeartTimer = 300;
|
||||
Item.NewItem(target.GetSource_Loot(), target.Hitbox, ItemID.Heart);
|
||||
}
|
||||
}
|
||||
|
||||
if (bloodflareMelee && item.CountsAsClass<MeleeDamageClass>() && target.lifeMax > 5)
|
||||
{
|
||||
if (target.IsAnEnemy(false) && Main.LocalPlayer.lifeSteal > 0f && !Player.moonLeech)
|
||||
{
|
||||
int heal = 4;
|
||||
if (!Main.LocalPlayer.moonLeech)
|
||||
if ((target.life < target.lifeMax * 0.5) && bloodflareHeartTimer <= 0)
|
||||
{
|
||||
Main.LocalPlayer.lifeSteal -= heal * BalancingConstants.LifeStealSetBonusCooldownMultiplier;
|
||||
|
||||
float lowestHealthCheck = 0f;
|
||||
int healTarget = Player.whoAmI;
|
||||
foreach (Player otherPlayer in Main.ActivePlayers)
|
||||
{
|
||||
if (!otherPlayer.dead && ((!Player.hostile && !otherPlayer.hostile) || Player.team == otherPlayer.team))
|
||||
{
|
||||
float playerDist = Vector2.Distance(target.Center, otherPlayer.Center);
|
||||
if (playerDist < BalancingConstants.LifeStealRange && (otherPlayer.statLifeMax2 - otherPlayer.statLife) > lowestHealthCheck)
|
||||
{
|
||||
lowestHealthCheck = otherPlayer.statLifeMax2 - otherPlayer.statLife;
|
||||
healTarget = otherPlayer.whoAmI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
|
||||
var source = Player.GetSource_FromThis(ReaverHeadTank.HealOrbEntitySourceContext);
|
||||
Projectile.NewProjectile(source, target.Center, Vector2.Zero, ProjectileID.VampireHeal, 0, 0f, Player.whoAmI, healTarget, heal);
|
||||
bloodflareHeartTimer = 300;
|
||||
Item.NewItem(target.GetSource_Loot(), target.Hitbox, ItemID.Heart);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gladiatorSword && target.IsAnEnemy(false) && target.life <= 0 && target.Calamity().gladiatorOnKill && target.lifeMax > 5)
|
||||
{
|
||||
float healPower = 10 * Utils.GetLerpValue(300, 0, gladiatorTimer, true);
|
||||
target.Calamity().gladiatorOnKill = false;
|
||||
if (healPower >= 1)
|
||||
if (gladiatorSword && target.life <= 0 && target.Calamity().gladiatorOnKill)
|
||||
{
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), target.Center, target.velocity * 0.5f, ProjectileType<GladiatorHealOrb>(), 0, 0, -1, (int)healPower);
|
||||
gladiatorTimer = 300;
|
||||
}
|
||||
}
|
||||
|
||||
if (reaverDefense)
|
||||
{
|
||||
if (Main.LocalPlayer.lifeSteal > 0f && !Player.moonLeech && target.lifeMax > 5)
|
||||
{
|
||||
double healMult = 0.1;
|
||||
int heal = (int)Math.Round(damage * healMult);
|
||||
if (heal > BalancingConstants.LifeStealCap)
|
||||
heal = BalancingConstants.LifeStealCap;
|
||||
|
||||
if (heal > 0 && !Main.LocalPlayer.moonLeech)
|
||||
float healPower = 10 * Utils.GetLerpValue(300, 0, gladiatorTimer, true);
|
||||
target.Calamity().gladiatorOnKill = false;
|
||||
if (healPower >= 1)
|
||||
{
|
||||
Main.LocalPlayer.lifeSteal -= heal * BalancingConstants.LifeStealReaverTankCooldownMultiplier;
|
||||
|
||||
float lowestHealthCheck = 0f;
|
||||
int healTarget = Player.whoAmI;
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
{
|
||||
Player otherPlayer = Main.player[i];
|
||||
if (otherPlayer.active && !otherPlayer.dead && ((!Player.hostile && !otherPlayer.hostile) || Player.team == otherPlayer.team))
|
||||
{
|
||||
float playerDist = Vector2.Distance(target.Center, otherPlayer.Center);
|
||||
if (playerDist < BalancingConstants.LifeStealRange && (otherPlayer.statLifeMax2 - otherPlayer.statLife) > lowestHealthCheck)
|
||||
{
|
||||
lowestHealthCheck = otherPlayer.statLifeMax2 - otherPlayer.statLife;
|
||||
healTarget = otherPlayer.whoAmI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
|
||||
var source = Player.GetSource_FromThis(ReaverHeadTank.HealOrbEntitySourceContext);
|
||||
Projectile.NewProjectile(source, target.Center, Vector2.Zero, ProjectileType<ReaverHealOrb>(), 0, 0f, Player.whoAmI, healTarget, heal);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), target.Center, target.velocity * 0.5f, ProjectileType<GladiatorHealOrb>(), 0, 0, -1, (int)healPower);
|
||||
gladiatorTimer = 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,8 +61,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
|
||||
// Constantly update the player's velocity direction.
|
||||
Vector2 dashVel = Main.MouseWorld - player.Center;
|
||||
dashVel = dashVel.SafeNormalize(Vector2.UnitX) * CalculateDashSpeed(player);
|
||||
player.velocity = dashVel;
|
||||
player.velocity = player.velocity.ToRotation().AngleTowards(dashVel.ToRotation(), 0.175f).ToRotationVector2() * CalculateDashSpeed(player);
|
||||
|
||||
// Fall way, way, faster than usual.
|
||||
player.maxFallSpeed = 50f;
|
||||
|
||||
@@ -15,24 +15,11 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
public override DashCollisionType CollisionType => DashCollisionType.NoCollision;
|
||||
public override bool IsOmnidirectional => false;
|
||||
public int Time = 0;
|
||||
public int lastDashDir = 0;
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => (55f * player.moveSpeed);
|
||||
public override float CalculateDashSpeed(Player player) => (48f);
|
||||
|
||||
public override void OnDashEffects(Player player)
|
||||
{
|
||||
if (Math.Sign(player.velocity.X) == lastDashDir && lastDashDir != 0)
|
||||
{
|
||||
player.Calamity().statisPenaltyTimer = player.Calamity().statisTimerMax;
|
||||
if (player.Calamity().statisAnticheese < 6)
|
||||
player.Calamity().statisAnticheese++;
|
||||
}
|
||||
else
|
||||
player.Calamity().statisAnticheese = 0;
|
||||
if (player.Calamity().statisAnticheese > 1)
|
||||
player.velocity.X *= Utils.Remap(player.Calamity().statisAnticheese, 1, 6, 0.9f, 0.3f, true);
|
||||
lastDashDir = Math.Sign(player.velocity.X);
|
||||
lastDashDir = Math.Sign(player.velocity.X);
|
||||
|
||||
Time = 0;
|
||||
for (int i = 0; i < 15; i++)
|
||||
@@ -78,7 +65,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
{
|
||||
player.velocity.X = -140;
|
||||
}
|
||||
if (Time > 6)
|
||||
if (Time > 8)
|
||||
player.velocity.X *= 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,23 +24,11 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
public int Time = 0;
|
||||
public Vector2 aimVel;
|
||||
public bool strongVisuals = true;
|
||||
public int lastDashDir = 0;
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => (70f * player.moveSpeed);
|
||||
public override float CalculateDashSpeed(Player player) => (64f);
|
||||
|
||||
public override void OnDashEffects(Player player)
|
||||
{
|
||||
if (Math.Sign(player.velocity.X) == lastDashDir && lastDashDir != 0)
|
||||
{
|
||||
player.Calamity().statisPenaltyTimer = player.Calamity().statisTimerMax;
|
||||
if (player.Calamity().statisAnticheese < 6)
|
||||
player.Calamity().statisAnticheese++;
|
||||
}
|
||||
else
|
||||
player.Calamity().statisAnticheese = 0;
|
||||
if (player.Calamity().statisAnticheese > 1)
|
||||
player.velocity.X *= Utils.Remap(player.Calamity().statisAnticheese, 1, 6, 0.9f, 0.3f, true);
|
||||
lastDashDir = Math.Sign(player.velocity.X);
|
||||
|
||||
strongVisuals = player.Calamity().voidSashVisuals;
|
||||
Time = 0;
|
||||
@@ -52,7 +40,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
SoundEngine.PlaySound(sound with { Volume = 0.7f, Pitch = Main.rand.NextFloat(-0.15f, 0.15f) }, player.Center);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
Vector2 intenededVel = (MathHelper.TwoPi * i / 40f).ToRotationVector2() * 5.5f;
|
||||
Vector2 intenededVel = (MathHelper.TwoPi * i / 40f).ToRotationVector2() * 3f;
|
||||
Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
|
||||
Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
|
||||
|
||||
@@ -61,8 +49,8 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
}
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
Vector2 intenededVel = (MathHelper.TwoPi * i / 30f).ToRotationVector2() * 5.5f;
|
||||
Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
|
||||
Vector2 intenededVel = (MathHelper.TwoPi * i / 30f).ToRotationVector2() * 3f;
|
||||
Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2f).RotatedBy(player.velocity.ToRotation());
|
||||
Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
|
||||
|
||||
Color dustColor = Main.rand.NextBool(3) ? Color.Indigo : Color.DarkOrchid;
|
||||
@@ -109,7 +97,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
SignusMetaball.SpawnParticle(fxPlace, fxVelocity * Main.rand.NextFloat(5, 8), 50f * Main.rand.NextFloat(0.7f, 1f), 8, new Vector2(0.8f, 1.2f), 0.18f, 0);
|
||||
}
|
||||
}
|
||||
player.velocity.X *= 0.912f;
|
||||
player.velocity.X *= 0.95f;
|
||||
if (player.velocity.X > 140)
|
||||
{
|
||||
player.velocity.X = 140;
|
||||
@@ -118,7 +106,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
{
|
||||
player.velocity.X = -140;
|
||||
}
|
||||
if (Time > 8)
|
||||
if (Time > 10)
|
||||
player.velocity.X *= 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,10 +60,14 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
{
|
||||
for (int j = TopRange; j <= BottomRange; j++)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
if (!tile.HasTile || !TileID.Sets.IsAContainer[tile.TileType] || TileID.Sets.BasicDresser[tile.TileType])
|
||||
continue;
|
||||
|
||||
int PotentialChest = Chest.FindChestByGuessing(i, j);
|
||||
if (PotentialChest != -1 && !TileID.Sets.BasicDresser[Main.tile[i, j].TileType])
|
||||
if (PotentialChest != -1)
|
||||
{
|
||||
// Adjust position ot the center of the chest
|
||||
// Adjust position to the center of the chest
|
||||
Chest chest = Main.chest[PotentialChest];
|
||||
Vector2 chestCenter = new Vector2(chest.x + 1, chest.y + 1) * 16f;
|
||||
float distance = Vector2.Distance(chestCenter, drawPlayer.MountedCenter);
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace CalamityMod
|
||||
|
||||
public static readonly Condition PlayerHasRogueArmor = Create("HasRogueArmor", () => Main.LocalPlayer.Calamity().rogueStealthMax > 0f && Main.LocalPlayer.Calamity().wearingRogueArmor);
|
||||
public static readonly Condition PlayerHasWings = Create("HasWings", () => Main.LocalPlayer.wingTimeMax > 0);
|
||||
public static readonly Condition PlayerAlcoholPoisoned = Create("AlcoholPoison", () => Main.LocalPlayer.Calamity().alcoholPoisoning);
|
||||
|
||||
//
|
||||
// Calamity Event Flag conditions
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.ComponentModel;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.UI;
|
||||
using CalamityMod.UI.DraedonsArsenal;
|
||||
using CalamityMod.UI.Rippers;
|
||||
@@ -27,36 +28,6 @@ namespace CalamityMod
|
||||
ParticleLimit = (int)Utils.Clamp(ParticleLimit, MinParticleLimit, MaxParticleLimit);
|
||||
}
|
||||
|
||||
internal static void SaveConfig()
|
||||
{
|
||||
// There is no current way to manually save a mod configuration file in tModLoader.
|
||||
// The method which saves mod config files is private in ConfigManager, so reflection is used to invoke it.
|
||||
try
|
||||
{
|
||||
MethodInfo saveMethodInfo = typeof(ConfigManager).GetMethod("Save", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
if (saveMethodInfo is not null)
|
||||
saveMethodInfo.Invoke(null, [Instance]);
|
||||
else
|
||||
CalamityMod.Instance.Logger.Error("TML ConfigManager.Save reflection failed. Method signature has changed. Notify Calamity Devs if you see this in your log.");
|
||||
}
|
||||
catch
|
||||
{
|
||||
CalamityMod.Instance.Logger.Error("An error occurred while manually saving Calamity mod configuration. This may be due to a complex mod conflict. It is safe to ignore this error.");
|
||||
}
|
||||
}
|
||||
|
||||
#region Multi-Threading Settings
|
||||
[Header("Multithreading")]
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 2f)]
|
||||
[DefaultValue(0f)]
|
||||
[Increment(1f)]
|
||||
[DrawTicks]
|
||||
public float SunkenSeaMultiThreading { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Graphics Changes
|
||||
[Header("Graphics")]
|
||||
|
||||
@@ -299,8 +270,10 @@ namespace CalamityMod
|
||||
public bool FasterFallHotkey { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(true)]
|
||||
public bool CalamityArmorSetBonusDoubleTap { get; set; }
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[DrawTicks]
|
||||
[DefaultValue(SetBonusDoubleTapOptions.Auto)]
|
||||
public SetBonusDoubleTapOptions SetBonusDoubleTap { get; set; }
|
||||
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(false)]
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod
|
||||
public override void Load()
|
||||
{
|
||||
// Initialize the EnemyStats struct as early as it is safe to do so
|
||||
NPCStats.Load();
|
||||
NPCStats.LoadDebuffs();
|
||||
|
||||
// Initialize Calamity Balance, since it is tightly coupled with the remaining systems
|
||||
CalamityGlobalItem.LoadTweaks();
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod
|
||||
#region Unload
|
||||
public override void Unload()
|
||||
{
|
||||
NPCStats.Unload();
|
||||
NPCStats.UnloadDebuffs();
|
||||
CalamityGlobalItem.UnloadTweaks();
|
||||
CalamityGlobalProjectile.UnloadTweaks();
|
||||
|
||||
|
||||
@@ -508,11 +508,7 @@ namespace CalamityMod.DataStructures
|
||||
{
|
||||
if (Procced)
|
||||
{
|
||||
if (!player.moonLeech)
|
||||
{
|
||||
player.HealPlayer(OmegaBiomeBlade.SuperPogoAttunement_PassiveLifeSteal);
|
||||
}
|
||||
|
||||
player.DoLifestealDirect(null, OmegaBiomeBlade.SuperPogoAttunement_PassiveLifeSteal);
|
||||
Procced = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,410 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Security.Cryptography;
|
||||
using CalamityMod.NPCs;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.DataStructures
|
||||
{
|
||||
[ReinitializeDuringResizeArrays]
|
||||
public static class BuffDatasets
|
||||
{
|
||||
public static DebuffData[] DebuffDataset = BuffID.Sets.Factory.CreateNamedSet("DebuffData")
|
||||
.Description("Stores DebuffData for a particular debuff")
|
||||
.RegisterCustomSet<DebuffData>(null,
|
||||
BuffID.OnFire, DebuffData.OnFire,
|
||||
BuffID.OnFire3, DebuffData.Hellfire,
|
||||
BuffID.CursedInferno, DebuffData.CursedInferno,
|
||||
BuffID.ShadowFlame, DebuffData.Shadowflame,
|
||||
BuffID.Daybreak, DebuffData.Daybroken,
|
||||
BuffID.Frostburn, DebuffData.Frostburn,
|
||||
BuffID.Frostburn2, DebuffData.Frostbite,
|
||||
BuffID.Poisoned, DebuffData.Poisoned,
|
||||
BuffID.Venom, DebuffData.AcidVenom,
|
||||
BuffID.Electrified, DebuffData.Electrified
|
||||
);
|
||||
}
|
||||
public class DebuffData
|
||||
{
|
||||
/// <summary>
|
||||
/// Determines the behavior of the debuff.
|
||||
/// </summary>
|
||||
public enum DebuffBehavior
|
||||
{
|
||||
Default,
|
||||
Electric
|
||||
}
|
||||
#region DebuffData data
|
||||
/// <summary>
|
||||
/// UNIMPLEMENTED. WILL BE DONE IN A FUTURE PR
|
||||
/// Amount of life regen lost by a player under this debuff
|
||||
/// For debuffs with unique scaling, this should usually be the "base" amount.
|
||||
/// Defaults to 0
|
||||
/// </summary>
|
||||
public float PlayerLostRegen = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Amount of life regen lost by an enemy under this debuff.
|
||||
/// For debuffs with unique scaling, this should usually be the "base" amount.
|
||||
/// Defaults to 0
|
||||
/// </summary>
|
||||
public float EnemyLostRegen = 0;
|
||||
|
||||
/// <summary>
|
||||
/// This is used to cancel Vanilla DoT damage on enemies and allow using Calamity's own instead.
|
||||
/// </summary>
|
||||
public int EnemyVanillaRegenToCancelOut = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The minimum size of damage ticks from this debuff on an enemy.
|
||||
/// Ticks can be larger than this due to MultiplierDamageTickSize
|
||||
/// Defaults to 1
|
||||
/// </summary>
|
||||
public int MinimumDamageTickSize = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The size of damage ticks from this debuff on an enemy
|
||||
/// This is based on the applied regen of the debuff, and will cause the tick to scale with amplifiers
|
||||
/// Ticks can be larger than this due to MinimumDamageTickSize
|
||||
/// Defaults to 0.25f
|
||||
/// </summary>
|
||||
public float MultiplierDamageTickSize = 0.25f;
|
||||
|
||||
/// <summary>
|
||||
/// How much this benefits from heat debuff amplifiers.
|
||||
/// Default is 0, which means it does not benefit.
|
||||
/// </summary>
|
||||
public float HeatDebuffScaling = 0;
|
||||
/// <summary>
|
||||
/// How much this benefits from sickness debuff amplifiers.
|
||||
/// Default is 0, which means it does not benefit.
|
||||
/// </summary>
|
||||
public float SicknessDebuffScaling = 0;
|
||||
/// <summary>
|
||||
/// How much this benefits from cold debuff amplifiers.
|
||||
/// Default is 0, which means it does not benefit.
|
||||
/// </summary>
|
||||
public float ColdDebuffScaling = 0;
|
||||
/// <summary>
|
||||
/// How much this benefits from water debuff amplifiers.
|
||||
/// Default is 0, which means it does not benefit.
|
||||
/// </summary>
|
||||
public float WaterDebuffScaling = 0;
|
||||
/// <summary>
|
||||
/// How much this benefits from electric debuff amplifiers.
|
||||
/// Default is 0, which means it does not benefit.
|
||||
/// </summary>
|
||||
public float ElectricDebuffScaling = 0;
|
||||
|
||||
/// <summary>
|
||||
/// UNIMPLEMENTED. WILL BE DONE IN A FUTURE PR
|
||||
/// Whether or not this debuff should draw above inflicted NPCs.
|
||||
/// Defaults to TRUE
|
||||
/// </summary>
|
||||
public bool DrawAboveNPC = true;
|
||||
|
||||
/// <summary>
|
||||
/// UNIMPLEMENTED. WILL BE DONE IN A FUTURE PR
|
||||
/// Whether or not gear can modify the debuff effects such as duration or damage on the player.
|
||||
/// </summary>
|
||||
public bool GearCanModifyDebuff = true;
|
||||
|
||||
/// <summary>
|
||||
/// UNIMPLEMENTED. WILL BE DONE IN A FUTURE PR
|
||||
/// How much alcohol this counts as.
|
||||
/// Default is 0, most alcohol is 1, and Everclear is 2
|
||||
/// </summary>
|
||||
public float AlcoholLevel = 0f;
|
||||
|
||||
/// <summary>
|
||||
/// UNIMPLEMENTED. WILL BE DONE IN A FUTURE PR
|
||||
/// The UpdatePlayerLifeRegen code to run. Defaults to just applying DoT
|
||||
/// </summary>
|
||||
public UpdatePlayerLifeRegen PlayerUpdateMethod;
|
||||
|
||||
/// <summary>
|
||||
/// The UpdateNPCLifeRegen code to run. Defaults to just applying DoT
|
||||
/// Parameters of the method should be (NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
/// </summary>
|
||||
public UpdateNPCLifeRegen NPCLifeRegenMethod;
|
||||
|
||||
public DebuffData()
|
||||
{
|
||||
PlayerUpdateMethod = DefaultUpdateOnPlayer;
|
||||
NPCLifeRegenMethod = BaseUpdateNPCLifeRegen;
|
||||
}
|
||||
/// <summary>
|
||||
/// Allows using DebuffBehavior to determine preset behavior
|
||||
/// "electric" causes debuffs to scale 4x when moving
|
||||
/// Uses default behavior if no known key is inputed
|
||||
/// </summary>
|
||||
/// <param name="behavior">This determines the type of behavior of the debuff</param>
|
||||
public DebuffData(DebuffBehavior behavior)
|
||||
{
|
||||
|
||||
PlayerUpdateMethod = DefaultUpdateOnPlayer;
|
||||
if (behavior == DebuffBehavior.Electric)
|
||||
NPCLifeRegenMethod = ElectricDebuffNPCLifeRegen;
|
||||
else
|
||||
NPCLifeRegenMethod = BaseUpdateNPCLifeRegen;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UNIMPLEMENTED. WILL BE IN A FUTURE PR
|
||||
/// This is the code that should be run when updating the buff on a player.
|
||||
/// Use for DoT damage. Other effects should be in the ModBuff class, or wherever appropriate.
|
||||
/// </summary>
|
||||
/// <param name="player"></param>
|
||||
public delegate void UpdatePlayerLifeRegen(Player player, int buffType, ref int buffIndex, ref int damage);
|
||||
|
||||
/// <summary>
|
||||
/// This is the code that should be run when updating life regen on NPC
|
||||
/// Use for DoT damage. Other effects should be in the ModBuff class, or wherever appropriate.
|
||||
/// </summary>
|
||||
/// <param name="npc"></param>
|
||||
public delegate void UpdateNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage);
|
||||
|
||||
/// <summary>
|
||||
/// Applies a scaling amount to a StatModifer
|
||||
/// </summary>
|
||||
/// <param name="Modifer"></param>
|
||||
/// <param name="scaling"></param>
|
||||
/// <returns></returns>
|
||||
public static StatModifier ApplyScalingToStatModifer(StatModifier Modifer, float scaling)
|
||||
{
|
||||
StatModifier output = new();
|
||||
output += (Modifer.Additive-1) * scaling;
|
||||
output *= 1 + (Modifer.Multiplicative-1) * scaling;
|
||||
output.Base = Modifer.Base * scaling;
|
||||
output.Flat = Modifer.Flat * scaling;
|
||||
return output;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UNIMPLEMENTED. WILL BE IN A FUTURE PR
|
||||
/// The default debuff DoT functionality on a player
|
||||
/// </summary>
|
||||
public void DefaultUpdateOnPlayer(Player player, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The default debuff DoT functionality on enemies.
|
||||
/// </summary>
|
||||
public void BaseUpdateNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
var cnpc = npc.Calamity();
|
||||
float totalDPS = EnemyLostRegen;
|
||||
StatModifier totalScaling =
|
||||
HeatDebuffScaling + ColdDebuffScaling + SicknessDebuffScaling + WaterDebuffScaling + ElectricDebuffScaling != 0
|
||||
?
|
||||
ApplyScalingToStatModifer(cnpc.ActiveHeatDebuffMultiplier, HeatDebuffScaling)
|
||||
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveColdDebuffMultiplier, ColdDebuffScaling)
|
||||
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveSicknessDebuffMultiplier, SicknessDebuffScaling)
|
||||
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveWaterDebuffMultiplier, WaterDebuffScaling)
|
||||
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveElectricDebuffMultiplier, ElectricDebuffScaling)
|
||||
))))
|
||||
:
|
||||
cnpc.ActiveTypelessDebuffMultiplier;
|
||||
totalDPS = totalScaling.ApplyTo(totalDPS);
|
||||
var totalDPSAdjusted = totalDPS-EnemyVanillaRegenToCancelOut;
|
||||
npc.Calamity().ApplyDPSDebuff((int)(totalDPSAdjusted), (int)Math.Max(totalDPS*MultiplierDamageTickSize,MinimumDamageTickSize), ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
/// <summary>
|
||||
/// DoT functionality that takes into account Electric debuff's 4x DPS when moving
|
||||
/// </summary>
|
||||
/// <param name="npc"></param>
|
||||
/// <param name="buffType"></param>
|
||||
/// <param name="buffIndex"></param>
|
||||
/// <param name="damage"></param>
|
||||
public void ElectricDebuffNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
var cnpc = npc.Calamity();
|
||||
float totalDPS = EnemyLostRegen;
|
||||
StatModifier totalScaling =
|
||||
HeatDebuffScaling + ColdDebuffScaling + SicknessDebuffScaling + WaterDebuffScaling + ElectricDebuffScaling != 0
|
||||
?
|
||||
ApplyScalingToStatModifer(cnpc.ActiveHeatDebuffMultiplier, HeatDebuffScaling)
|
||||
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveColdDebuffMultiplier, ColdDebuffScaling)
|
||||
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveSicknessDebuffMultiplier, SicknessDebuffScaling)
|
||||
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveWaterDebuffMultiplier, WaterDebuffScaling)
|
||||
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveElectricDebuffMultiplier, ElectricDebuffScaling)
|
||||
))))
|
||||
:
|
||||
cnpc.ActiveTypelessDebuffMultiplier;
|
||||
totalDPS = totalScaling.ApplyTo(totalDPS);
|
||||
totalDPS *= (npc.velocity.X == 0 ? 1 : 4);
|
||||
totalDPS -= EnemyVanillaRegenToCancelOut * (npc.velocity.X == 0 ? 1 : 5); //Vanilla Electrified is 5x when moving, not 4x
|
||||
npc.Calamity().ApplyDPSDebuff((int)(totalDPS), (int)Math.Max(totalDPS * MultiplierDamageTickSize, MinimumDamageTickSize), ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
#region Special Regen Functions
|
||||
/// <summary>
|
||||
/// 18OCT2023: Ozzatron: im not gonna sugarcoat it
|
||||
/// vanilla debuff damage from Daybreak impales scales linearly up to 8 for 800 DPS
|
||||
/// instead of allowing this entire 800 DPS to be multiplied by heat weakness + heat DoT bonuses,
|
||||
/// each Daybreak spear beyond the first is only affected 25% as much by weaknesses or resistances.
|
||||
/// This also stops Daybreak's DPS from being utterly shafted by heat resistance.
|
||||
/// As no other weapon can stack Daybroken, this has no effect on other weapons (they count as "1 Daybreak spear")
|
||||
/// </summary>
|
||||
/// <param name="npc"></param>
|
||||
/// <param name="buffType"></param>
|
||||
/// <param name="buffIndex"></param>
|
||||
/// <param name="damage"></param>
|
||||
public static void DaybrokenRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
var cnpc = npc.Calamity();
|
||||
int numImpaledSpears = 0;
|
||||
for (int k = 0; k < Main.maxProjectiles; k++)
|
||||
{
|
||||
if (Main.projectile[k].active && Main.projectile[k].type == ProjectileID.Daybreak && Main.projectile[k].ai[0] == 1f && Main.projectile[k].ai[1] == npc.whoAmI)
|
||||
numImpaledSpears++;
|
||||
}
|
||||
|
||||
// If there are no Daybreak impaled spears, Daybroken has 1x potency (it was applied some other way)
|
||||
float daybrokenMultiplier = numImpaledSpears <= 1 ? 1f : (1f + 0.25f * (numImpaledSpears - 1));
|
||||
int adjustedSpears = Math.Max(1, numImpaledSpears);
|
||||
int baseDaybreakDoTValue = (int)(npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo(Daybroken.EnemyLostRegen * adjustedSpears) + npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo(Daybroken.EnemyLostRegen * 0.25f * (adjustedSpears - 1)));
|
||||
var totalDPSAdjusted = baseDaybreakDoTValue - Daybroken.EnemyVanillaRegenToCancelOut*numImpaledSpears;
|
||||
if (numImpaledSpears == 0)
|
||||
{
|
||||
totalDPSAdjusted -= Daybroken.EnemyVanillaRegenToCancelOut;
|
||||
}
|
||||
npc.Calamity().ApplyDPSDebuff((int)(totalDPSAdjusted), (int)Math.Max(baseDaybreakDoTValue * Daybroken.MultiplierDamageTickSize, Daybroken.MinimumDamageTickSize), ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
/// <summary>
|
||||
/// Apply Oiled DoT.
|
||||
/// </summary>
|
||||
public static void OiledNPCMethod(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
var cnpc = npc.Calamity();
|
||||
double totalDPS = ApplyScalingToStatModifer(cnpc.ActiveHeatDebuffMultiplier,Oiled.HeatDebuffScaling).ApplyTo(Oiled.EnemyLostRegen);
|
||||
if (totalDPS <= 0)
|
||||
return;
|
||||
npc.Calamity().ApplyDPSDebuff((int)(totalDPS), damage+(int)Math.Max(totalDPS * Oiled.MultiplierDamageTickSize, Oiled.MinimumDamageTickSize), ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
/// <summary>
|
||||
/// Has Dryad's Bane scale with Calamity's town NPC buffs
|
||||
/// </summary>
|
||||
public static void DryadsBaneNPCMethod(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
// Buffs match 1:1 with Town NPC buffs
|
||||
// See CalamityGlobalTownNPC: BuffTownNPC
|
||||
float buffedDryadsBaneMult = 0f +
|
||||
(NPC.downedMoonlord ? 0.6f : 0f) +
|
||||
(DownedBossSystem.downedProvidence ? 0.2f : 0f) +
|
||||
(DownedBossSystem.downedPolterghast ? 0.2f : 0f) +
|
||||
(DownedBossSystem.downedDoG ? 0.2f : 0f) +
|
||||
(DownedBossSystem.downedYharon ? 0.2f : 0f) +
|
||||
(DownedBossSystem.downedExoMechs ? 0.6f : 0f) +
|
||||
(DownedBossSystem.downedCalamitas ? 0.6f : 0f);
|
||||
if (Main.expertMode)
|
||||
buffedDryadsBaneMult *= Main.GameModeInfo.TownNPCDamageMultiplier;
|
||||
int buffedDryadsBaneDoTValue = 2 * (int)(4 * buffedDryadsBaneMult);
|
||||
npc.lifeRegen -= buffedDryadsBaneDoTValue;
|
||||
|
||||
// Scales damage tick if greater than the vanilla amount
|
||||
float vanillaDryadsBaneMult = 1f +
|
||||
(NPC.downedBoss1 ? 0.1f : 0f) +
|
||||
(NPC.downedBoss2 ? 0.1f : 0f) +
|
||||
(NPC.downedBoss3 ? 0.1f : 0f) +
|
||||
(NPC.downedQueenBee ? 0.1f : 0f) +
|
||||
(Main.hardMode ? 0.4f : 0f) +
|
||||
(NPC.downedMechBoss1 ? 0.15f : 0f) +
|
||||
(NPC.downedMechBoss1 ? 0.15f : 0f) +
|
||||
(NPC.downedMechBoss1 ? 0.15f : 0f) +
|
||||
(NPC.downedPlantBoss ? 0.15f : 0f) +
|
||||
(NPC.downedGolemBoss ? 0.15f : 0f) +
|
||||
(NPC.downedAncientCultist ? 0.15f : 0f);
|
||||
if (Main.expertMode)
|
||||
vanillaDryadsBaneMult *= Main.GameModeInfo.TownNPCDamageMultiplier;
|
||||
int totalDryadsBaneDoTValue = 2 * (int)(4 * vanillaDryadsBaneMult) + buffedDryadsBaneDoTValue;
|
||||
if (damage < totalDryadsBaneDoTValue / 6)
|
||||
damage = totalDryadsBaneDoTValue / 6;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Vanilla debuff stats
|
||||
public static DebuffData OnFire = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 12,
|
||||
EnemyVanillaRegenToCancelOut = 12,
|
||||
HeatDebuffScaling = 1
|
||||
};
|
||||
public static DebuffData Hellfire = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 30,
|
||||
EnemyVanillaRegenToCancelOut = 30,
|
||||
HeatDebuffScaling = 1
|
||||
};
|
||||
public static DebuffData CursedInferno = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 48,
|
||||
EnemyVanillaRegenToCancelOut = 48,
|
||||
HeatDebuffScaling = 1
|
||||
};
|
||||
public static DebuffData Shadowflame = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 60,
|
||||
EnemyVanillaRegenToCancelOut = 60,
|
||||
HeatDebuffScaling = 1
|
||||
};
|
||||
public static DebuffData Daybroken = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 200,
|
||||
EnemyVanillaRegenToCancelOut = 200,
|
||||
HeatDebuffScaling = 1,
|
||||
NPCLifeRegenMethod = DaybrokenRegen
|
||||
};
|
||||
public static DebuffData Frostburn = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 16,
|
||||
EnemyVanillaRegenToCancelOut = 16,
|
||||
ColdDebuffScaling = 1
|
||||
};
|
||||
public static DebuffData Frostbite = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 50,
|
||||
EnemyVanillaRegenToCancelOut = 50,
|
||||
ColdDebuffScaling = 1
|
||||
};
|
||||
public static DebuffData Poisoned = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 12,
|
||||
EnemyVanillaRegenToCancelOut = 12,
|
||||
SicknessDebuffScaling = 1
|
||||
};
|
||||
public static DebuffData AcidVenom = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 60,
|
||||
EnemyVanillaRegenToCancelOut = 60,
|
||||
SicknessDebuffScaling = 1
|
||||
};
|
||||
public static DebuffData Electrified = new DebuffData(DebuffBehavior.Electric)
|
||||
{
|
||||
EnemyLostRegen = 21,
|
||||
EnemyVanillaRegenToCancelOut = 8,
|
||||
ElectricDebuffScaling = 1
|
||||
};
|
||||
public static DebuffData Oiled = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 50, //This is how much DPS Oiled does when applied alongside a valid debuff
|
||||
EnemyVanillaRegenToCancelOut = 50,
|
||||
HeatDebuffScaling = 2, //Oiled scales twice as hard with heat debuff scaling to reward debuff builds who use such a rare and difficult to apply debuff.
|
||||
NPCLifeRegenMethod = OiledNPCMethod
|
||||
};
|
||||
public static DebuffData DryadsBane = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 8, //This is not used in the method, serves as a token amount for anything that may need to interface in the future.
|
||||
NPCLifeRegenMethod = DryadsBaneNPCMethod
|
||||
};
|
||||
#endregion
|
||||
}
|
||||
}
|
||||