diff --git a/Content/DecimationPlayer.cs b/Content/DecimationPlayer.cs index 1321765..cf03da9 100644 --- a/Content/DecimationPlayer.cs +++ b/Content/DecimationPlayer.cs @@ -346,7 +346,7 @@ namespace Decimation.Content if (AmuletSlotItem.type == ModContent.ItemType() && Main.rand.NextBool(25)) CrystalAmuletEffect(); - if (this.HasEquippedAccessory(ModContent.ItemType())) + if (this.HasEquippedAccessory(ModContent.ItemType()) || this.HasEquippedAccessory(ModContent.ItemType())) { player.AddBuff(BuffID.Panic, 300); SpawnWaspNecklaceWasps(); @@ -394,7 +394,7 @@ namespace Decimation.Content if (AmuletSlotItem.type == ModContent.ItemType() && Main.rand.NextBool(25)) CrystalAmuletEffect(); - if (this.HasEquippedAccessory(ModContent.ItemType())) + if (this.HasEquippedAccessory(ModContent.ItemType()) || this.HasEquippedAccessory(ModContent.ItemType())) { player.AddBuff(BuffID.Panic, 300); SpawnWaspNecklaceWasps(); diff --git a/Content/Items/Accessories/VeilOfVengeance.cs b/Content/Items/Accessories/VeilOfVengeance.cs new file mode 100644 index 0000000..a0ea5e4 --- /dev/null +++ b/Content/Items/Accessories/VeilOfVengeance.cs @@ -0,0 +1,56 @@ +using Decimation.Lib.Items; +using Decimation.Lib.Util; +using Decimation.Lib.Util.Builder; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace Decimation.Content.Items.Accessories +{ + public class VeilOfVengeance : DecimationAccessory + { + protected override string ItemName => "Veil of Vengeance"; + + protected override string ItemTooltip => "Increases length of invincibility after taking damage\n" + + "Causes stars to fall after taking damage\n" + + "Releases wasps and increase movement speed after taking damage\n" + + "Attackers have 20% chances to be poisoned"; + + protected override void InitAccessory() + { + item.width = 26; + item.height = 32; + item.value = Item.buyPrice(gold: 19, silver: 70); + item.rare = Rarity.LightPurple.GetRarityValue(); + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.longInvince = true; + player.starCloak = true; + + base.UpdateAccessory(player, hideVisual); + } + + protected override ModRecipe GetRecipe() + { + return new RecipeBuilder(this) + .WithIngredient(ModContent.ItemType()) + .WithIngredient(ItemID.StarVeil) + .WithIngredient(ItemID.SoulofMight, 20) + .WithStation(TileID.TinkerersWorkbench) + .Build(); + } + } + + internal class VeilofVengeancePoisonEffect : GlobalNPC + { + public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit) + { + if (target.HasEquippedAccessory(ModContent.ItemType()) && Main.rand.NextBool(5)) + npc.AddBuff(BuffID.Poisoned, 300); + + base.OnHitPlayer(npc, target, damage, crit); + } + } +} \ No newline at end of file diff --git a/Content/Items/Accessories/VeilOfVengeance.png b/Content/Items/Accessories/VeilOfVengeance.png new file mode 100644 index 0000000..7b0b2b1 Binary files /dev/null and b/Content/Items/Accessories/VeilOfVengeance.png differ diff --git a/Content/Items/Accessories/WaspNecklace.cs b/Content/Items/Accessories/WaspNecklace.cs index 97c685e..c210642 100644 --- a/Content/Items/Accessories/WaspNecklace.cs +++ b/Content/Items/Accessories/WaspNecklace.cs @@ -11,8 +11,7 @@ namespace Decimation.Content.Items.Accessories { protected override string ItemName => "Wasp Necklace"; - protected override string ItemTooltip => "Releases wasps after taking damage\n" + - "Increases movement speed after taking damage\n" + + protected override string ItemTooltip => "Releases wasps and increase movement speed after taking damage\n" + "Attackers have 20% chances to be poisoned"; protected override void InitAccessory()