From b9ee58a20e192aed32bb4fad55f535cde808f379 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Thu, 30 Jan 2020 16:32:50 -0500 Subject: [PATCH] buffed permafrost's concoction --- Buffs/StatBuffs/Encased.cs | 11 +---------- CalPlayer/CalamityPlayer.cs | 9 ++++++++- CalPlayer/CalamityPlayerMiscEffects.cs | 22 ++++++++++++++++++++++ Items/Accessories/PermafrostsConcoction.cs | 5 ++--- 4 files changed, 33 insertions(+), 14 deletions(-) diff --git a/Buffs/StatBuffs/Encased.cs b/Buffs/StatBuffs/Encased.cs index 48ede4bef7..3cb9a9afab 100644 --- a/Buffs/StatBuffs/Encased.cs +++ b/Buffs/StatBuffs/Encased.cs @@ -18,16 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.statDefense += 30; - player.endurance += 0.3f; - player.frozen = true; - player.velocity.X = 0f; - player.velocity.Y = -0.4f; //should negate gravity - - int d = Dust.NewDust(player.position, player.width, player.height, 88); - Main.dust[d].noGravity = true; - Main.dust[d].velocity *= 2f; - + player.Calamity().encased = true; if (player.buffTime[buffIndex] == 2) { Main.PlaySound(SoundID.Item27, player.position); diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index e6b3f526ad..73fc491e63 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -562,6 +562,7 @@ namespace CalamityMod.CalPlayer public bool xRage = false; public bool xWrath = false; public bool graxDefense = false; + public bool encased = false; public bool sMeleeBoost = false; public bool tFury = false; public bool cadence = false; @@ -1334,6 +1335,7 @@ namespace CalamityMod.CalPlayer xRage = false; xWrath = false; graxDefense = false; + encased = false; sMeleeBoost = false; tFury = false; cadence = false; @@ -1600,6 +1602,7 @@ namespace CalamityMod.CalPlayer xRage = false; xWrath = false; graxDefense = false; + encased = false; sMeleeBoost = false; tFury = false; cadence = false; @@ -3187,7 +3190,7 @@ namespace CalamityMod.CalPlayer if (permafrostsConcoction && player.FindBuffIndex(ModContent.BuffType()) == -1) { player.AddBuff(ModContent.BuffType(), 10800); - player.AddBuff(ModContent.BuffType(), 300); + player.AddBuff(ModContent.BuffType(), 180); player.statLife = player.statLifeMax2 * 3 / 10; Main.PlaySound(SoundID.Item92, player.position); for (int i = 0; i < 60; i++) @@ -5846,6 +5849,10 @@ namespace CalamityMod.CalPlayer { damage = (int)((double)damage * 0.85); } + if (encased) + { + damage = (int)((double)damage * 0.7); + } if (CalamityWorld.revenge) { if (!CalamityWorld.downedBossAny) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 4159479848..ea3d3d2322 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1016,6 +1016,28 @@ namespace CalamityMod.CalPlayer if (modPlayer.blazingCore) player.endurance += 0.1f; + //Permafrost's Concoction bonuses/debuffs + if (modPlayer.permafrostsConcoction) + { + player.statManaMax2 += 50; + player.manaCost *= 0.85f; + } + if (modPlayer.encased) + { + player.statDefense += 30; + player.frozen = true; + player.velocity.X = 0f; + player.velocity.Y = -0.4f; //should negate gravity + + int d = Dust.NewDust(player.position, player.width, player.height, 88); + Main.dust[d].noGravity = true; + Main.dust[d].velocity *= 2f; + + player.buffImmune[BuffID.Frozen] = true; + player.buffImmune[BuffID.Chilled] = true; + player.buffImmune[ModContent.BuffType()] = true; + } + // Cosmic Discharge Cosmic Freeze buff, gives surrounding enemies the Glacial State debuff if (modPlayer.cFreeze) { diff --git a/Items/Accessories/PermafrostsConcoction.cs b/Items/Accessories/PermafrostsConcoction.cs index ac7f72bb23..05db6c03ec 100644 --- a/Items/Accessories/PermafrostsConcoction.cs +++ b/Items/Accessories/PermafrostsConcoction.cs @@ -8,11 +8,11 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Permafrost's Concoction"); - Tooltip.SetDefault(@"Increases maximum mana by 50 + Tooltip.SetDefault(@"Increases maximum mana by 50 and reduces mana cost by 15% Increases life regen as life decreases Increases life regen when afflicted with Poison, On Fire, or Brimstone Flames You will survive fatal damage and revive with 30% life on a 3 minute cooldown -You are encased in an ice barrier for 5 seconds when revived"); +You are encased in an ice barrier for 3 seconds when revived"); } public override void SetDefaults() @@ -26,7 +26,6 @@ You are encased in an ice barrier for 5 seconds when revived"); public override void UpdateAccessory(Player player, bool hideVisual) { - player.statManaMax2 += 50; player.Calamity().permafrostsConcoction = true; } }