Files
CalamityModPublic/Items/Weapons/Melee/EssenceFlayer.cs
T
Ozzatron eaa04280ba 1 - Properly separated all Cosmic Anvil and Draedon's Forge recipes.
2 - An extremely large number of recipe changes. Far too many to remember.
3 - Occult Stone and furniture are now made at the Ancient Manipulator.
4 - 1 Core of Calamity now requires 1 Ashes of Calamity.
5 - Renamed the Calamitous Altar to Altar of the Accursed.
6 - All Cosmilite tier items are made at the Cosmic Anvil.
7 - Standardized the costs of all late game (Cosmilite tier and beyond) items.
2021-09-12 20:07:50 -04:00

74 lines
2.6 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Melee
{
public class EssenceFlayer : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Essence Flayer");
Tooltip.SetDefault("Shoots an essence scythe that generates healing spirits on enemy kills");
}
public override void SetDefaults()
{
item.width = 100;
item.damage = 180;
item.melee = true;
item.useAnimation = 19;
item.useStyle = ItemUseStyleID.SwingThrow;
item.useTime = 19;
item.useTurn = true;
item.knockBack = 8f;
item.UseSound = SoundID.Item71;
item.autoReuse = true;
item.height = 78;
item.value = Item.buyPrice(1, 80, 0, 0);
item.rare = ItemRarityID.Red;
item.shoot = ModContent.ProjectileType<EssenceScythe>();
item.shootSpeed = 21f;
item.Calamity().customRarity = CalamityRarity.DarkBlue;
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/EssenceFlayerGlow"));
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 12);
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
recipe.SetResult(this);
recipe.AddRecipe();
}
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, 173);
}
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
}
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
}
}
}