From fa8acf7d0715cf9de053aa1c9ec00113088aa17e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 19 Jul 2020 15:11:12 -0400 Subject: [PATCH] added a buff for blood pact --- Buffs/StatBuffs/BloodyBoost.cs | 25 +++++++++++++++++++++++++ Buffs/StatBuffs/BloodyBoost.png | Bin 0 -> 607 bytes CalPlayer/CalamityPlayer.cs | 9 +++++---- CalPlayer/CalamityPlayerLifeRegen.cs | 2 +- CalPlayer/CalamityPlayerMiscEffects.cs | 4 +--- 5 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 Buffs/StatBuffs/BloodyBoost.cs create mode 100644 Buffs/StatBuffs/BloodyBoost.png 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 0000000000000000000000000000000000000000..020e7e63c109931d055a3cd24af1280ae6a78222 GIT binary patch literal 607 zcmV-l0-*hgP)1vrG8kXoP{u- zZSNDelh=}9Y+_I_-rV^^xZ{+LuVp+q++EQx|9B()h3u)|P<>EvI&3K8sGkY zV-90N{FpQDDmbBf-u9FtjN7AtyZ1UZ_ReLX`(ca{AdDEtW*%(T!L~;MGJ3jxmu9HD zP7nqtVKOG}H|ETXKWL8vk=}kuDiMtcwv7#tq~P7bnV=ujxX0UZrX~}f9^x~)_dItm zEqfGT&$o8>RgM}TUY^BX-CWkWE7;zFi?U6{7G{)xxUtC-*EQOq?3@C76!4_^%~%?V zi3KB+F!z`c{D?~zuNbO`_9`$R>G5O?BN(CtPW0nPKlAu0VUGgbbWbhnCM07RtQ-{} zC1{=k2Ju4)=4ohY6&Kc7(*gD<00VBq{G)moq;u*i<~&a)$8i-*t?vph&Lsu8M_|sm zhq))%hMLf=h+tyA6XHo#6Y^Gs0XJWmn^OAzklN>F_qiCf=Nnez5A#fO`sHYG#bhDIxPjRGs@& tR^0=pO&tCp>tI)10r^7J+5FG1<4@{9y$I64e2)MC002ovPDHLkV1j@yAn*VH literal 0 HcmV?d00001 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;