Files
CalamityModPublic/Items/Weapons/Melee/TerrorBlade.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

48 lines
1.7 KiB
C#

using CalamityMod.Projectiles.Melee;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class TerrorBlade : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
internal const float TerrorBlastMultiplier = 0.3f;
public override void SetDefaults()
{
Item.width = 88;
Item.height = 80;
Item.damage = 560;
Item.DamageType = DamageClass.Melee;
Item.useAnimation = 18;
Item.useTime = 18;
Item.useTurn = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 8.5f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<TerrorBeam>();
Item.shootSpeed = 20f;
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
Item.rare = ModContent.RarityType<PureGreen>();
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/TerrorBladeGlow").Value);
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.RedTorch);
}
}
}