Files
CalamityModPublic/Items/Weapons/Ranged/Starfleet.cs
T
mountaindrew10 dc1a9a7e3d 1 - Added Starmageddon.
2 - Fixed several enemies not scaling their HP with difficulty.
2023-07-13 12:18:14 -05:00

61 lines
2.1 KiB
C#

using Terraria.DataStructures;
using CalamityMod.Projectiles.Ranged;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Ranged
{
public class Starfleet : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Ranged";
public override void SetDefaults()
{
Item.damage = 68;
Item.DamageType = DamageClass.Ranged;
Item.width = 76;
Item.height = 36;
Item.useTime = 55;
Item.useAnimation = 55;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 15f;
Item.value = CalamityGlobalItem.Rarity10BuyPrice;
Item.rare = ItemRarityID.Red;
Item.UseSound = SoundID.Item92;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<PlasmaBlast>();
Item.shootSpeed = 12f;
Item.useAmmo = AmmoID.FallenStar;
}
public override Vector2? HoldoutOffset()
{
return new Vector2(-8, -11);
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
for (int index = 0; index < 5; ++index)
{
float SpeedX = velocity.X + Main.rand.Next(-40, 41) * 0.05f;
float SpeedY = velocity.Y + Main.rand.Next(-40, 41) * 0.05f;
Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI);
}
return false;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.SuperStarCannon).
AddIngredient<AquashardShotgun>().
AddIngredient(ItemID.LunarBar, 5).
AddIngredient(ItemID.FragmentStardust, 6).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}