39 lines
1.2 KiB
C#
39 lines
1.2 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 RadiatingCrystal : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
SacrificeTotal = 1;
|
|
DisplayName.SetDefault("Radiating Crystal");
|
|
Tooltip.SetDefault("The crystal contains traces of holothurin\n" +
|
|
"Summons a radiator light pet\n" +
|
|
"Provides a small amount of light in the abyss");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.CloneDefaults(ItemID.WispinaBottle);
|
|
Item.shoot = ModContent.ProjectileType<RadiatorPet>();
|
|
Item.buffType = ModContent.BuffType<RadiatorBuff>();
|
|
Item.value = Item.sellPrice(silver: 20);
|
|
Item.rare = ItemRarityID.Orange;
|
|
}
|
|
|
|
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
|
{
|
|
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
|
|
{
|
|
player.AddBuff(Item.buffType, 3600, true);
|
|
}
|
|
}
|
|
}
|
|
}
|