Files
CalamityModPublic/Items/Accessories/Regenator.cs
T
Ozzatron 8ee241531b 1 - Blood Pact simplified to +25% HP, +25% from healing potions. This makes it generally usable and a clear upgrade into CotBG.
2 - Removed Bloody Boost buff because Blood Pact no longer has crits.
3 - Chalice of the Blood God now (also) gives +25% HP and +25% from healing potions. Its bleedout buffer is not programmed yet.
4 - (missing from previous commit) Removed Flesh Totem from CotBG. This item is likely to be removed entirely.
5 - (missing from previous commit) Chalice of the Blood God uses Bloodstone instead of Cosmilite for thematics.
2023-11-19 16:02:20 -05:00

40 lines
1.2 KiB
C#

using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
namespace CalamityMod.Items.Accessories
{
public class Regenator : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public override void SetDefaults()
{
Item.width = 34;
Item.height = 56;
Item.value = CalamityGlobalItem.Rarity7BuyPrice;
Item.rare = ItemRarityID.Lime;
Item.defense = 10;
Item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.regenator = true;
//Hard-lock the player's health to 50%.
//No lifesteal, no regen, no healing pots
if (player.statLife >= (int)(player.statLifeMax2 * 0.5f))
{
player.statLife = (int)(player.statLifeMax2 * 0.5f);
player.moonLeech = true;
modPlayer.healingPotionMultiplier = 0;
if (player.lifeRegenCount > 0)
player.lifeRegenCount = 0;
}
}
}
}