44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using CalamityMod.Projectiles.Ranged;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Ranged
|
|
{
|
|
public class ChickenCannon : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Chicken Cannon");
|
|
Tooltip.SetDefault("Fires chicken rockets");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 12;
|
|
item.ranged = true;
|
|
item.width = 76;
|
|
item.height = 24;
|
|
item.useTime = 13;
|
|
item.useAnimation = 13;
|
|
item.useStyle = 5;
|
|
item.noMelee = true;
|
|
item.knockBack = 8.5f;
|
|
item.value = Item.buyPrice(1, 80, 0, 0);
|
|
item.rare = 10;
|
|
item.UseSound = SoundID.Item11;
|
|
item.autoReuse = true;
|
|
item.shootSpeed = 24f;
|
|
item.shoot = ModContent.ProjectileType<Chicken>();
|
|
item.useAmmo = 771;
|
|
item.Calamity().postMoonLordRarity = 14;
|
|
}
|
|
|
|
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
|
{
|
|
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<Chicken>(), damage, knockBack, player.whoAmI, 0f, 0f);
|
|
return false;
|
|
}
|
|
}
|
|
}
|