Files
CalamityModPublic/Items/Weapons/Magic/Wingman.cs
T

47 lines
1.5 KiB
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Magic
{
public class Wingman : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Wingman");
Tooltip.SetDefault("Fires a concentrated laser beam");
}
public override void SetDefaults()
{
item.damage = 49;
item.magic = true;
item.mana = 12;
item.width = 42;
item.height = 22;
item.useTime = 15;
item.useAnimation = 15;
item.useStyle = ItemUseStyleID.HoldingOut;
item.noMelee = true;
item.knockBack = 3f;
item.value = Item.buyPrice(0, 80, 0, 0);
item.rare = ItemRarityID.Yellow;
item.UseSound = SoundID.Item33;
item.autoReuse = true;
item.shootSpeed = 25f;
item.shoot = ProjectileID.LaserMachinegunLaser;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int beamAmt = 3;
for (int index = 0; index < beamAmt; ++index)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
}
return false;
}
}
}