56 lines
1.9 KiB
C#
56 lines
1.9 KiB
C#
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Projectiles.Ranged;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Ranged
|
|
{
|
|
public class ElementalBlaster : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Elemental Blaster");
|
|
Tooltip.SetDefault("Does not consume ammo\n" +
|
|
"Fires a storm of rainbow blasts");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 50;
|
|
item.ranged = true;
|
|
item.width = 104;
|
|
item.height = 42;
|
|
item.useTime = 2;
|
|
item.useAnimation = 6;
|
|
item.useStyle = ItemUseStyleID.HoldingOut;
|
|
item.noMelee = true;
|
|
item.knockBack = 1.75f;
|
|
item.value = CalamityGlobalItem.Rarity11BuyPrice;
|
|
item.rare = ItemRarityID.Purple;
|
|
item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaBolt");
|
|
item.autoReuse = true;
|
|
item.shoot = ModContent.ProjectileType<RainbowBlast>();
|
|
item.shootSpeed = 18f;
|
|
}
|
|
|
|
public override Vector2? HoldoutOffset()
|
|
{
|
|
return new Vector2(-15, 0);
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<SpectralstormCannon>());
|
|
recipe.AddIngredient(ModContent.ItemType<ClockGatlignum>());
|
|
recipe.AddIngredient(ModContent.ItemType<PaintballBlaster>());
|
|
recipe.AddIngredient(ModContent.ItemType<GalacticaSingularity>(), 5);
|
|
recipe.AddIngredient(ItemID.LunarBar, 5);
|
|
recipe.AddTile(TileID.LunarCraftingStation);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|