Files
CalamityModPublic/Items/Weapons/Magic/Teslastaff.cs
T
Ozzatron 22afdd3933 1 - Calamity sell prices increase much more sharply with rarity.
2 - (Example) Post DoG items are now 2 platinum instead of 1 platinum 40 gold.
3 - (Example) Dev items are now 2 platinum 80 gold instead of 2 platinum.
4 - Privated numeric rarity item values.
5 - All assigned item values use the rarity's names, e.g. RarityLightPurpleBuyPrice.
2024-04-17 21:20:17 -04:00

55 lines
1.8 KiB
C#

using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Rarities;
using CalamityMod.Sounds;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Magic
{
public class Teslastaff : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Magic";
public override void SetStaticDefaults()
{
Item.staff[Type] = true;
}
public override void SetDefaults()
{
Item.width = 38;
Item.height = 38;
Item.damage = 166;
Item.DamageType = DamageClass.Magic;
Item.mana = 10;
Item.useTime = 10;
Item.useAnimation = 10;
Item.useStyle = ItemUseStyleID.Shoot;
Item.UseSound = CommonCalamitySounds.LightningSound with { Pitch = 1.1f };
Item.noMelee = true;
Item.channel = true;
Item.knockBack = 0f;
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType<Turquoise>();
Item.Calamity().donorItem = true;
Item.shoot = ModContent.ProjectileType<Teslabeam>();
Item.shootSpeed = 30f;
Item.reuseDelay = 60;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.ThunderStaff).
AddRecipeGroup("AnyCopperBar", 20).
AddIngredient<ArmoredShell>(2).
AddIngredient<CoreofSunlight>(6).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}