Added a martian madness summoning item
This commit is contained in:
1 parent
a78b83f130
commit
598ceccce1
3 files changed
+40
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 985 B |
@@ -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<MartianDistressBeacon>(), NPC.downedGolemBoss, Item.buyPrice(0, 50));
|
||||
SetShopItem(ref shop, ref nextSlot, ItemType<LionHeart>(), CalamityWorld.downedPolterghast);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user