From 598ceccce1c0961d252bb35afafaff97672b1ca0 Mon Sep 17 00:00:00 2001 From: Dominic Date: Sat, 10 Apr 2021 14:06:50 -0500 Subject: [PATCH] Added a martian madness summoning item --- .../Invasion/MartianDistressBeacon.cs | 38 ++++++++++++++++++ .../Invasion/MartianDistressBeacon.png | Bin 0 -> 985 bytes NPCs/CalamityGlobalTownNPC.cs | 2 + 3 files changed, 40 insertions(+) create mode 100644 Items/SummonItems/Invasion/MartianDistressBeacon.cs create mode 100644 Items/SummonItems/Invasion/MartianDistressBeacon.png diff --git a/Items/SummonItems/Invasion/MartianDistressBeacon.cs b/Items/SummonItems/Invasion/MartianDistressBeacon.cs new file mode 100644 index 0000000000..244d951c4c --- /dev/null +++ b/Items/SummonItems/Invasion/MartianDistressBeacon.cs @@ -0,0 +1,38 @@ +using CalamityMod.Events; +using CalamityMod.Items.Materials; +using CalamityMod.World; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.SummonItems.Invasion +{ + public class MartianDistressBeacon : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Martian Distress Beacon"); + Tooltip.SetDefault("Summons the Martian Madness"); + } + + public override void SetDefaults() + { + item.width = 30; + item.height = 60; + item.maxStack = 99; + item.rare = ItemRarityID.Yellow; + item.useAnimation = 45; + item.useTime = 45; + item.useStyle = ItemUseStyleID.HoldingUp; + item.consumable = true; + } + + public override bool CanUseItem(Player player) => Main.invasionType == InvasionID.None; + + public override bool UseItem(Player player) + { + Main.StartInvasion(InvasionID.MartianMadness); + return true; + } + } +} diff --git a/Items/SummonItems/Invasion/MartianDistressBeacon.png b/Items/SummonItems/Invasion/MartianDistressBeacon.png new file mode 100644 index 0000000000000000000000000000000000000000..32afb9a520d69aed56680343a65bb10f412e2c44 GIT binary patch literal 985 zcmV;~119{5P)Px&lSxEDR9J=0nQv%KVI0Rl$IQKkZi~4ljMg$^tj$DNlrTlgUMUnsdpTKYNqZqL zY*7@=3z3pyFX-uRb+y(4z(aAj9_%Im){JufUQ z1Rx%dD@R@J?d^b<#ABDNFaSC#%&1%pmG+UkTEHUrj#z#;kvr+!r6;!Mby8hI?)^NL`4tG5RchMw90Q=g?^^<(x3?Ft zyxqKU5nz!^TU1qDn{r_9iABL+5U@xkYQ-BN4`-Y8x~j4Qu-=4RfAz9mdG6eKxk}qV z#7@$^?Cvykw2%ffLQ4Ox&Q<`XWX}PHz5)LbOI4BF>!zGpc>qM7KLe~cpzHRHvr5~4 z#CnyHjI_FZi*jDP6iHNzw?e8%z4y6VBsm*UabX9K=j-ZW?|TXg3e+17^VUEhVD7z= zUfXzVJBELWi;IiRV`&)xEl-G-DHK296^%wtxv?dEO#r}?GOdty;n=Lcn9e7eE>D%;a%|A4Hm!}E6B z_z4EU_kn)E55!Kp#KE2Xp@YECc`I`BR!IG`=E~1Eb8I{wPr%TsA``TtbxhyC|!&xn5mIg(%^1Tmxa00000NkvXX Hu0mjf!rkTU literal 0 HcmV?d00001 diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index e0031ee9c4..12927d26fb 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -7,6 +7,7 @@ using CalamityMod.Items.Placeables.Furniture.Fountains; using CalamityMod.Items.Placeables.Walls; using CalamityMod.Items.Potions; using CalamityMod.Items.SummonItems; +using CalamityMod.Items.SummonItems.Invasion; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; @@ -1217,6 +1218,7 @@ namespace CalamityMod.NPCs if (type == NPCID.Cyborg) { SetShopItem(ref shop, ref nextSlot, ItemID.RocketLauncher, NPC.downedGolemBoss, Item.buyPrice(0, 25)); + SetShopItem(ref shop, ref nextSlot, ItemType(), NPC.downedGolemBoss, Item.buyPrice(0, 50)); SetShopItem(ref shop, ref nextSlot, ItemType(), CalamityWorld.downedPolterghast); }