41 lines
1.2 KiB
C#
41 lines
1.2 KiB
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 CosmicPlushie : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Pets";
|
|
public override void SetDefaults()
|
|
{
|
|
Item.damage = 0;
|
|
Item.useStyle = ItemUseStyleID.Swing;
|
|
Item.useAnimation = 20;
|
|
Item.useTime = 20;
|
|
Item.noMelee = true;
|
|
Item.width = 28;
|
|
Item.height = 36;
|
|
Item.shoot = ModContent.ProjectileType<ChibiiDoggo>();
|
|
Item.buffType = ModContent.BuffType<ChibiiDoGBuff>();
|
|
Item.UseSound = SoundID.Meowmere;
|
|
|
|
Item.value = Item.sellPrice(gold: 7);
|
|
Item.rare = ModContent.RarityType<DarkBlue>();
|
|
Item.Calamity().devItem = true;
|
|
}
|
|
|
|
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
|
{
|
|
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
|
|
{
|
|
player.AddBuff(Item.buffType, 15, true);
|
|
}
|
|
}
|
|
}
|
|
}
|