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

61 lines
2.0 KiB
C#

using CalamityMod.Items.Placeables;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
[LegacyName("CausticEdge")]
public class TaintedBlade : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Melee";
public override void SetDefaults()
{
Item.width = 46;
Item.height = 46;
Item.damage = 60;
Item.DamageType = DamageClass.Melee;
Item.useTurn = true;
Item.useAnimation = 27;
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = 27;
Item.knockBack = 5f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.value = CalamityGlobalItem.RarityGreenBuyPrice;
Item.rare = ItemRarityID.Green;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.GreenFairy, 0f, 0f, 100, default, Main.rand.NextFloat(1.5f, 2f));
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 0f;
}
}
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Poisoned, 240);
}
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
{
target.AddBuff(BuffID.Poisoned, 240);
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<Acidwood>(10).
AddRecipeGroup("Boss2Material", 8).
AddIngredient(ItemID.Deathweed, 2).
AddTile(TileID.DemonAltar).
Register();
}
}
}