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 CarnageRay : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Carnage Ray");
|
|
Tooltip.SetDefault("Fires a blood ray\n" +
|
|
"The farther along the ray hit enemies are, the more damage they take");
|
|
Item.staff[item.type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 24;
|
|
item.magic = true;
|
|
item.mana = 10;
|
|
item.width = 46;
|
|
item.height = 46;
|
|
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<BloodRay>();
|
|
item.shootSpeed = 6f;
|
|
}
|
|
|
|
public override Vector2? HoldoutOrigin()
|
|
{
|
|
return new Vector2(12, 12);
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ItemID.CrimsonRod);
|
|
recipe.AddIngredient(ItemID.MagicMissile);
|
|
recipe.AddIngredient(ItemID.WandofSparking);
|
|
recipe.AddIngredient(ItemID.AmberStaff);
|
|
recipe.AddIngredient(ModContent.ItemType<BloodSample>(), 15);
|
|
recipe.AddIngredient(ModContent.ItemType<PurifiedGel>(), 10);
|
|
recipe.AddTile(TileID.DemonAltar);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|