Files
CalamityModPublic/Items/Pets/PlagueCaller.cs
T

30 lines
894 B
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 PlagueCaller : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Pets";
public override void SetDefaults()
{
Item.CloneDefaults(ItemID.ZephyrFish);
Item.shoot = ModContent.ProjectileType<PlaguebringerBab>();
Item.buffType = ModContent.BuffType<PlaguebringerBabBuff>();
Item.rare = ItemRarityID.Lime;
}
public override void UseStyle(Player player, Rectangle heldItemFrame)
{
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
{
player.AddBuff(Item.buffType, 3600, true);
}
}
}
}