55 lines
1.6 KiB
C#
55 lines
1.6 KiB
C#
using CalamityMod.Projectiles.Magic;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using Microsoft.Xna.Framework;
|
|
|
|
namespace CalamityMod.Items.Weapons.Magic
|
|
{
|
|
public class ManaRose : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Mana Rose");
|
|
Tooltip.SetDefault("Casts a mana flower that explodes into petals");
|
|
Item.staff[item.type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 20;
|
|
item.magic = true;
|
|
item.mana = 8;
|
|
item.width = 38;
|
|
item.height = 38;
|
|
item.useTime = 38;
|
|
item.useAnimation = 38;
|
|
item.useStyle = ItemUseStyleID.HoldingOut;
|
|
item.noMelee = true;
|
|
item.knockBack = 3.25f;
|
|
item.value = Item.buyPrice(0, 2, 0, 0);
|
|
item.rare = ItemRarityID.Green;
|
|
item.UseSound = SoundID.Item109;
|
|
item.autoReuse = true;
|
|
item.shoot = ModContent.ProjectileType<ManaBolt>();
|
|
item.shootSpeed = 10f;
|
|
}
|
|
|
|
public override Vector2? HoldoutOrigin()
|
|
{
|
|
return new Vector2(10, 10);
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ItemID.NaturesGift);
|
|
recipe.AddIngredient(ItemID.JungleRose);
|
|
recipe.AddIngredient(ItemID.Moonglow, 5);
|
|
recipe.AddTile(TileID.Anvils);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|