Exemplo n.º 1
0
 public HeartstringsItemRecipe(HeartstringsItem myitem) : base(myitem.mod)
 {
     this.AddTile(TileID.TinkerersWorkbench);
     this.AddIngredient(ItemID.BeeWax, 20);
     this.AddRecipeGroup("ModHelpers:EvilBiomeLightPets", 1);
     this.AddIngredient(ItemID.RainbowString, 1);
     this.SetResult(myitem);
 }
        ////////////////

        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.º 3
0
        ////////////////

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