Files
CalamityModPublic/Items/Pets/LittleLight.cs
T
2023-05-28 06:14:26 +07:00

32 lines
966 B
C#

using CalamityMod.Buffs.Pets;
using CalamityMod.Projectiles.Pets;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Pets
{
public class LittleLight : ModItem
{
public override void SetDefaults()
{
Item.CloneDefaults(ItemID.WispinaBottle);
Item.UseSound = SoundID.Item83;
Item.shoot = ModContent.ProjectileType<LittleLightProj>();
Item.buffType = ModContent.BuffType<LittleLightBuff>();
Item.value = Item.sellPrice(gold: 15);
Item.rare = ModContent.RarityType<PureGreen>();
Item.Calamity().donorItem = true;
}
public override void UseStyle(Player player, Rectangle heldItemFrame)
{
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
player.AddBuff(Item.buffType, 3600, true);
}
}
}