Files
CalamityModPublic/Items/Weapons/Magic/Lazhar.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

51 lines
1.7 KiB
C#

using CalamityMod.Projectiles.Magic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Magic
{
public class Lazhar : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Magic";
public override void SetDefaults()
{
Item.width = 42;
Item.height = 20;
Item.damage = 76;
Item.DamageType = DamageClass.Magic;
Item.mana = 4;
Item.useTime = 7;
Item.useAnimation = 7;
Item.useStyle = ItemUseStyleID.Shoot;
Item.noMelee = true;
Item.knockBack = 5f;
Item.value = CalamityGlobalItem.RarityRedBuyPrice;
Item.rare = ItemRarityID.Red;
Item.UseSound = SoundID.Item12;
Item.autoReuse = true;
Item.shootSpeed = 15f;
Item.shoot = ModContent.ProjectileType<LazharSolarBeam>();
}
public override Vector2? HoldoutOffset() => new Vector2(-5, 0);
public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback)
{
velocity.X += (float)Main.rand.Next(-15, 16) * 0.05f;
velocity.Y += (float)Main.rand.Next(-15, 16) * 0.05f;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.SpaceGun).
AddIngredient(ItemID.HeatRay).
AddIngredient(ItemID.FragmentSolar, 6).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}