////////////////

        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            var  mymod     = (InjuryMod)this.mod;
            var  modplayer = TmlHelpers.SafelyGetModPlayer <InjuryPlayer>(player);
            var  itemInfo  = this.item.GetGlobalItem <BandOfLifeItemInfo>();
            bool canHeal   = player.statLifeMax < 500;

            HeartstringsItem.ApplyHeartstringEffect(player);

            if (modplayer.Logic.HiddenHarmBuffer == 0 && itemInfo.HealBuffer < 5f)
            {
                itemInfo.HealBuffer += mymod.Config.BandOfAfterlifeInjuryHealPerSecond;
            }

            if (itemInfo.HealBuffer >= 5f && canHeal)
            {
                player.statLifeMax  += 5;
                itemInfo.HealBuffer -= 5f;

                Main.PlaySound(SoundID.Item4, player.position);
            }
        }
Exemplo n.º 2
0
        ////////////////

        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            HeartstringsItem.ApplyHeartstringEffect(player);
        }