Note: Does not include item rarities, and appears to shown nonexistant using directive movement in the commit. This does not really affect anything, however.
63 lines
2.0 KiB
C#
63 lines
2.0 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 TerraRay : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Terra Ray");
|
|
Tooltip.SetDefault("Casts an energy ray that splits if enemies are near it");
|
|
Item.staff[item.type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 50;
|
|
item.magic = true;
|
|
item.mana = 10;
|
|
item.width = 54;
|
|
item.height = 54;
|
|
item.useTime = 24;
|
|
item.useAnimation = 24;
|
|
item.useStyle = ItemUseStyleID.HoldingOut;
|
|
item.noMelee = true;
|
|
item.knockBack = 4f;
|
|
item.value = Item.buyPrice(0, 80, 0, 0);
|
|
item.rare = 8;
|
|
item.UseSound = SoundID.Item60;
|
|
item.autoReuse = true;
|
|
item.shoot = ModContent.ProjectileType<TerraBeam>();
|
|
item.shootSpeed = 6f;
|
|
}
|
|
|
|
public override Vector2? HoldoutOrigin()
|
|
{
|
|
return new Vector2(15, 15);
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<NightsRay>());
|
|
recipe.AddIngredient(ModContent.ItemType<ValkyrieRay>());
|
|
recipe.AddIngredient(ModContent.ItemType<LivingShard>(), 7);
|
|
recipe.AddTile(TileID.MythrilAnvil);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<CarnageRay>());
|
|
recipe.AddIngredient(ModContent.ItemType<ValkyrieRay>());
|
|
recipe.AddIngredient(ModContent.ItemType<LivingShard>(), 7);
|
|
recipe.AddTile(TileID.MythrilAnvil);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|