diff --git a/Buffs/StatBuffs/BloodyBoost.cs b/Buffs/StatBuffs/BloodyBoost.cs new file mode 100644 index 0000000000..b9dbc83448 --- /dev/null +++ b/Buffs/StatBuffs/BloodyBoost.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.StatBuffs +{ + public class BloodyBoost : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Bloody Boost"); + Description.SetDefault("Increased offensive and defensive stats\n" + + "Healing potions grant more health"); + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = false; + longerExpertDebuff = false; + canBeCleared = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().bloodPactBoost = true; + } + } +} diff --git a/Buffs/StatBuffs/BloodyBoost.png b/Buffs/StatBuffs/BloodyBoost.png new file mode 100644 index 0000000000..020e7e63c1 Binary files /dev/null and b/Buffs/StatBuffs/BloodyBoost.png differ diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index c0c8d8de80..f8f2b5637f 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -491,7 +491,7 @@ namespace CalamityMod.CalPlayer public bool fleshTotem = false; public bool fleshTotemCooldown = false; public bool bloodPact = false; - public int bloodPactBuffTimer = 0; + public bool bloodPactBoost = false; public bool bloodflareCore = false; public bool coreOfTheBloodGod = false; public bool elementalHeart = false; @@ -1822,6 +1822,7 @@ namespace CalamityMod.CalPlayer polarisBoostTwo = false; polarisBoostThree = false; bloodfinBoost = false; + bloodPactBoost = false; killSpikyBalls = false; @@ -2025,7 +2026,6 @@ namespace CalamityMod.CalPlayer sulphurBubbleCooldown = 0; ladHearts = 0; prismaticLasers = 0; - bloodPactBuffTimer = 0; alcoholPoisoning = false; shadowflame = false; @@ -2204,6 +2204,7 @@ namespace CalamityMod.CalPlayer revivify = false; healCounter = 300; danceOfLightCharge = 0; + bloodPactBoost = false; #endregion #region Armorbonuses @@ -4192,7 +4193,7 @@ namespace CalamityMod.CalPlayer #region Get Heal Life public override void GetHealLife(Item item, bool quickHeal, ref int healValue) { - if (bloodPactBuffTimer > 0) + if (bloodPactBoost) healValue = (int)(healValue * 1.5); if (CalamityWorld.ironHeart) healValue = 0; @@ -7365,7 +7366,7 @@ namespace CalamityMod.CalPlayer if (bloodPact && Main.rand.NextBool(4)) { - bloodPactBuffTimer = 600; + player.AddBuff(ModContent.BuffType(), 600); damageMult += 1.25; } diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 3df4ecdc25..51b45ca9eb 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -694,7 +694,7 @@ namespace CalamityMod.CalPlayer { player.lifeRegen += 2; } - if (modPlayer.bloodPactBuffTimer > 0) + if (modPlayer.bloodPactBoost) { player.lifeRegen += 2; } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 18c997ece1..365b7cba41 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -988,8 +988,6 @@ namespace CalamityMod.CalPlayer modPlayer.dogTextCooldown--; if (modPlayer.titanCooldown > 0) modPlayer.titanCooldown--; - if (modPlayer.bloodPactBuffTimer > 0) - modPlayer.bloodPactBuffTimer--; // Silva invincibility effects if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet) @@ -2512,7 +2510,7 @@ namespace CalamityMod.CalPlayer player.magicQuiver = true; } - if (modPlayer.bloodPactBuffTimer > 0) + if (modPlayer.bloodPactBoost) { player.allDamage += 0.05f; player.statDefense += 20;