2 - Many jump speed bonuses rebalanced. 3 - Absorber and Sponge give 4 regen while standing still instead of 2. 4 - Grand Gelatin, Life Jelly and Mana Jelly give 4 regen while standing still instead of 2. 5 - Heart of the Elements is a pure summon accessory. 6 - I have no idea what to do with Cryo, Chaos and Bloom Stone.
36 lines
992 B
C#
36 lines
992 B
C#
using System;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
using Terraria.ID;
|
|
|
|
namespace CalamityMod.Items.Accessories
|
|
{
|
|
public class LifeJelly : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Life Jelly");
|
|
Tooltip.SetDefault("+20 max life\n" +
|
|
"Standing still boosts life regen");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 20;
|
|
item.height = 24;
|
|
item.value = CalamityGlobalItem.Rarity1BuyPrice;
|
|
item.rare = ItemRarityID.Blue;
|
|
item.accessory = true;
|
|
}
|
|
|
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
|
{
|
|
player.statLifeMax2 += 20;
|
|
if ((double)Math.Abs(player.velocity.X) < 0.05 && (double)Math.Abs(player.velocity.Y) < 0.05 && player.itemAnimation == 0)
|
|
{
|
|
player.lifeRegen += 4;
|
|
}
|
|
}
|
|
}
|
|
}
|