45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
using CalamityMod.Projectiles.Magic;
|
|
using CalamityMod.Rarities;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Magic
|
|
{
|
|
public class Heresy : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Magic";
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 6));
|
|
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.damage = 960;
|
|
Item.DamageType = DamageClass.Magic;
|
|
Item.mana = 15;
|
|
Item.width = 38;
|
|
Item.height = 40;
|
|
Item.useTime = Item.useAnimation = 120;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.noMelee = true;
|
|
Item.UseSound = SoundID.DD2_EtherianPortalDryadTouch;
|
|
Item.knockBack = 0f;
|
|
|
|
Item.value = CalamityGlobalItem.Rarity15BuyPrice;
|
|
Item.rare = ModContent.RarityType<Violet>();
|
|
|
|
Item.autoReuse = true;
|
|
Item.noUseGraphic = true;
|
|
Item.shoot = ModContent.ProjectileType<HeresyProj>();
|
|
Item.channel = true;
|
|
Item.shootSpeed = 0f;
|
|
}
|
|
|
|
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
|
}
|
|
}
|