From 48bc9baacb1433a94d7a9a708d2499d4a9e5a851 Mon Sep 17 00:00:00 2001 From: FyloZ Date: Sat, 6 Jun 2020 15:20:01 -0400 Subject: [PATCH] Buffed Vampiric Shiv to now shoot a Tooth and to be a regular sword. Fixed a typo in the Fire Amulet tooltip. --- Content/Items/Amulets/FireAmulet.cs | 4 +-- .../Items/Weapons/Bloodshot/VampiricShiv.cs | 27 ++++++++++++++++--- Content/Items/Weapons/VampiricEdge.cs | 2 +- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/Content/Items/Amulets/FireAmulet.cs b/Content/Items/Amulets/FireAmulet.cs index 3403dd6..845f465 100644 --- a/Content/Items/Amulets/FireAmulet.cs +++ b/Content/Items/Amulets/FireAmulet.cs @@ -53,9 +53,9 @@ namespace Decimation.Content.Items.Amulets .AddEffect("+3% melee damages") .AddEffect("+3% melee critical strike chances") .AddEffect("+7 seconds of immunity to lava") - .AddEffect("+4% chances to inflict \"Slimed!\" debuff to ennemies on strikes") + .AddEffect("+4% chances to inflict \"Singed\" debuff to ennemies on strikes") .AddSynergy("Grants an additional 5 seconds of effect to lava immunity accessories") - .AddSynergy("Fire melee weapons inflicts \"Slimed!\" to ennemies on strikes") + .AddSynergy("Fire melee weapons inflicts \"Singed\" to ennemies on strikes") .AddSynergy("The Fiery Greatsword shoots fireballs"); } } diff --git a/Content/Items/Weapons/Bloodshot/VampiricShiv.cs b/Content/Items/Weapons/Bloodshot/VampiricShiv.cs index 5feca32..805aead 100644 --- a/Content/Items/Weapons/Bloodshot/VampiricShiv.cs +++ b/Content/Items/Weapons/Bloodshot/VampiricShiv.cs @@ -1,28 +1,49 @@ using Decimation.Lib.Items; using Decimation.Lib.Util; +using Microsoft.Xna.Framework; using Terraria; namespace Decimation.Content.Items.Weapons.Bloodshot { internal class VampiricShiv : DecimationWeapon { + private readonly int shootDelay = 72; + private int _timeToShoot = 72; + protected override string ItemName => "Vampiric Shiv"; protected override string ItemTooltip => "Heal 10% of damages inflicted"; protected override int Damages => 12; + protected override string Projectile => "Tooth"; protected override void InitWeapon() { item.width = 20; item.height = 20; item.crit = 4; - item.useStyle = 3; - item.useTime = 12; - item.useAnimation = 12; + // item.useStyle = 3; + item.useTime = 20; + item.useAnimation = 20; + item.shootSpeed = 5f; item.rare = Rarity.Green.GetRarityValue(); item.knockBack = 5; item.value = Item.buyPrice(0, 2); } + public override void UpdateInventory(Player player) + { + if (_timeToShoot > 0) _timeToShoot--; + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, + ref int type, ref int damage, ref float knockBack) + { + if (_timeToShoot > 0) return false; + + _timeToShoot = shootDelay; + + return base.Shoot(player, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack); + } + public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) { int lifeSteal = (int) (damage * 0.1f); diff --git a/Content/Items/Weapons/VampiricEdge.cs b/Content/Items/Weapons/VampiricEdge.cs index f2627c5..45bf207 100644 --- a/Content/Items/Weapons/VampiricEdge.cs +++ b/Content/Items/Weapons/VampiricEdge.cs @@ -27,7 +27,7 @@ namespace Decimation.Content.Items.Weapons item.useTime = 20; item.useAnimation = 20; item.shootSpeed = 5f; - this.item.value = Item.buyPrice(0, 3); + item.value = Item.buyPrice(0, 3); item.rare = Rarity.Green.GetRarityValue(); item.autoReuse = true; }