Note: Does not include item rarities, and appears to shown nonexistant using directive movement in the commit. This does not really affect anything, however.
47 lines
1.4 KiB
C#
47 lines
1.4 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 = 8;
|
|
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;
|
|
}
|
|
}
|
|
}
|