36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
using CalamityMod.Buffs.Pets;
|
|
using CalamityMod.Projectiles.Pets;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Pets
|
|
{
|
|
public class StrangeOrb : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
SacrificeTotal = 1;
|
|
DisplayName.SetDefault("Strange Orb");
|
|
Tooltip.SetDefault("Summons a miniature Ocean Spirit light pet\n" +
|
|
"Provides a large amount of light while underwater");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.CloneDefaults(ItemID.WispinaBottle);
|
|
Item.shoot = ModContent.ProjectileType<OceanSpirit>();
|
|
Item.buffType = ModContent.BuffType<OceanSpiritBuff>();
|
|
}
|
|
|
|
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
|
{
|
|
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
|
|
{
|
|
player.AddBuff(Item.buffType, 3600, true);
|
|
}
|
|
}
|
|
}
|
|
}
|