60 lines
1.9 KiB
C#
60 lines
1.9 KiB
C#
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Projectiles.Magic;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using Microsoft.Xna.Framework;
|
|
|
|
namespace CalamityMod.Items.Weapons.Magic
|
|
{
|
|
public class NightsRay : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Night's Ray");
|
|
Tooltip.SetDefault("Fires a dark ray\n" +
|
|
"When hitting enemies, they are hit by several new beams from their sides");
|
|
Item.staff[item.type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 24;
|
|
item.magic = true;
|
|
item.mana = 10;
|
|
item.width = 50;
|
|
item.height = 50;
|
|
item.useTime = 20;
|
|
item.useAnimation = 20;
|
|
item.useStyle = ItemUseStyleID.HoldingOut;
|
|
item.noMelee = true;
|
|
item.knockBack = 3.25f;
|
|
item.value = Item.buyPrice(0, 12, 0, 0);
|
|
item.rare = ItemRarityID.LightRed;
|
|
item.UseSound = SoundID.Item72;
|
|
item.autoReuse = true;
|
|
item.shoot = ModContent.ProjectileType<NightsRayBeam>();
|
|
item.shootSpeed = 6f;
|
|
}
|
|
|
|
public override Vector2? HoldoutOrigin()
|
|
{
|
|
return new Vector2(15, 15);
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ItemID.Vilethorn);
|
|
recipe.AddIngredient(ItemID.MagicMissile);
|
|
recipe.AddIngredient(ItemID.WandofSparking);
|
|
recipe.AddIngredient(ItemID.AmberStaff);
|
|
recipe.AddIngredient(ModContent.ItemType<TrueShadowScale>(), 15);
|
|
recipe.AddIngredient(ModContent.ItemType<PurifiedGel>(), 10);
|
|
recipe.AddTile(TileID.DemonAltar);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|