added a buff for blood pact

This commit is contained in:
termigator1359 committed 2020-07-19 15:11:12 -04:00
1 parent 52656224e2
commit fa8acf7d07
5 files changed
+32 -8

No files matched your search

+25
View File
@@ -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;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

+5 -4
View File
@@ -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<BloodyBoost>(), 600);
damageMult += 1.25;
}
+1 -1
View File
@@ -694,7 +694,7 @@ namespace CalamityMod.CalPlayer
{
player.lifeRegen += 2;
}
if (modPlayer.bloodPactBuffTimer > 0)
if (modPlayer.bloodPactBoost)
{
player.lifeRegen += 2;
}
+1 -3
View File
@@ -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;