Files
CalamityModPublic/Items/Weapons/Summon/ShellfishStaff.cs
T

47 lines
1.5 KiB
C#

using CalamityMod.Projectiles.Summon;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Summon
{
public class ShellfishStaff : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Shellfish Staff");
Tooltip.SetDefault("Summons a shellfish to fight for you\n" +
"Takes up 2 minion slots");
}
public override void SetDefaults()
{
item.damage = 70;
item.mana = 10;
item.width = 50;
item.height = 50;
item.useTime = item.useAnimation = 25;
item.useStyle = ItemUseStyleID.SwingThrow;
item.noMelee = true;
item.knockBack = 2f;
item.value = Item.buyPrice(0, 36, 0, 0);
item.rare = 5;
item.UseSound = SoundID.Item44;
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<Shellfish>();
item.shootSpeed = 10f;
item.summon = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.altFunctionUse != 2)
{
Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI);
}
return false;
}
}
}