Files
CalamityModPublic/Items/Weapons/Magic/GrandStaffoftheNebulaMage.cs
T
Altixal a27adb15d4 logo resprite + fixes, schmixes, etcetera
grand staff of nebula hage rarity fix
some dragonlens compat fixing
2023-07-26 10:05:50 +07:00

58 lines
2.0 KiB
C#

using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Magic
{
public class GrandStaffoftheNebulaMage : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Magic";
public override void SetDefaults()
{
Item.damage = 510;
Item.DamageType = DamageClass.Magic;
Item.mana = 30;
Item.width = 120;
Item.height = 124;
Item.useTime = 30;
Item.useAnimation = 30;
Item.useStyle = ItemUseStyleID.Shoot;
Item.UseSound = null;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.channel = true;
Item.knockBack = 6f;
Item.value = CalamityGlobalItem.Rarity14BuyPrice;
Item.rare = ModContent.RarityType<DarkBlue>();
Item.Calamity().donorItem = true;
Item.shoot = ModContent.ProjectileType<GrandStaffoftheNebulaMage_Held>();
Item.shootSpeed = 3f;
}
public override void OnConsumeMana(Player player, int manaConsumed) => player.statMana += manaConsumed;
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
return false;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.NebulaArcanum).
AddIngredient(ItemID.NebulaBlaze).
AddIngredient<CosmiliteBar>(8).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}