51 lines
1.8 KiB
C#
51 lines
1.8 KiB
C#
using CalamityMod.Projectiles.Summon;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
using Terraria.ID;
|
|
|
|
namespace CalamityMod.Items.Weapons.Summon
|
|
{
|
|
public class AngryChickenStaff : ModItem
|
|
{
|
|
public const int Damage = 340;
|
|
public const float ReboundRamDamageFactor = 2f;
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Yharon's Kindle Staff");
|
|
Tooltip.SetDefault("Summons a fiery draconid to fight for you\n" +
|
|
"Requires 5 minion slots to use");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = Damage;
|
|
item.mana = 10;
|
|
item.useStyle = ItemUseStyleID.SwingThrow;
|
|
item.width = 80;
|
|
item.height = 74;
|
|
item.useTime = item.useAnimation = 10;
|
|
item.noMelee = true;
|
|
item.knockBack = 7f;
|
|
item.value = CalamityGlobalItem.Rarity15BuyPrice;
|
|
item.rare = ItemRarityID.Purple;
|
|
item.Calamity().customRarity = CalamityRarity.Violet;
|
|
item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/FlareSound");
|
|
item.autoReuse = true;
|
|
item.shoot = ModContent.ProjectileType<SonOfYharon>();
|
|
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)
|
|
{
|
|
position = Main.MouseWorld;
|
|
Projectile.NewProjectile(position, Vector2.Zero, type, damage, knockBack, player.whoAmI);
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|