From bba5549405ec6943208fd16546c8bb1a8bfca4e6 Mon Sep 17 00:00:00 2001 From: FyloZ Date: Wed, 10 Jun 2020 21:10:37 -0400 Subject: [PATCH] Added Veil of Vengeance --- Content/DecimationPlayer.cs | 4 +- Content/Items/Accessories/VeilOfVengeance.cs | 56 ++++++++++++++++++ Content/Items/Accessories/VeilOfVengeance.png | Bin 0 -> 519 bytes Content/Items/Accessories/WaspNecklace.cs | 3 +- 4 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 Content/Items/Accessories/VeilOfVengeance.cs create mode 100644 Content/Items/Accessories/VeilOfVengeance.png 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 0000000000000000000000000000000000000000..7b0b2b1ea97dd6e06d6e624de5d0e170c22327f6 GIT binary patch literal 519 zcmV+i0{H!jP)m5y3Tb8$y1_1bkHHR0Zu14xhbA8c(}Fws!Ss9gk6_v^ z*B(sIt=bHx_gs<%(~mwvMwxW¥ludSkUBt`Gj1uIZ|Ng}rb$8Er zp!l$D7b}?0NOz0a{zDSkk(V#Q^n>5OaV8XeUb5ih0~@5m$A@Ab+($IG2<8Ht&!53A zSi{0X6(6CS$4EDeVBrn3@aSPkzJR4VV&jUCet3ivQiwNAGcYg^(vOj{U>audLrQ>v z7ccO}8L{dI&LUV4DX_AF^TUE3NJ&sp%Y#yO!FS$&W zEHSi)LEMBMC+KmOxbQo9B?H|oLXRW#MDfq;HCPF(l|!iBB07#}W)ZAVtq~9ayS(MY z2QWQ9o)b*N;sjlu?9!WV7Qx~Q=2DnX(fR1=h%W1322#r+03+aoCNfS|@Bjb+07*qo JM6N<$f&hA->LUOE literal 0 HcmV?d00001 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()