Files
CalamityModPublic/Items/Weapons/Rogue/TheFinalDawn.cs
T
tomat 67bceff6e7 Initial dotnet format pass.
This commit formats the entire codebase according to `dotnet format` and its limited understanding of our provided `.editorconfig`.
2024-02-28 21:49:50 -08:00

46 lines
1.7 KiB
C#

using CalamityMod.Projectiles.Rogue;
using CalamityMod.Rarities;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Items.Weapons.Rogue
{
[LegacyName("FinalDawn")]
public class TheFinalDawn : RogueWeapon
{
public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/FinalDawnSlash");
public override void SetDefaults()
{
Item.width = 78;
Item.height = 66;
Item.damage = 2500;
Item.DamageType = RogueDamageClass.Instance;
Item.noMelee = true;
Item.useTime = Item.useAnimation = 15;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 4;
Item.value = CalamityGlobalItem.Rarity15BuyPrice;
Item.rare = ModContent.RarityType<Violet>();
Item.Calamity().donorItem = true;
Item.autoReuse = false;
Item.shoot = ProjectileType<FinalDawnProjectile>();
Item.shootSpeed = 1f;
Item.useTurn = false;
Item.channel = true;
Item.noUseGraphic = true;
}
public override float StealthDamageMultiplier => 0.6f;
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] +
player.ownedProjectileCounts[ProjectileType<FinalDawnFireSlash>()] +
player.ownedProjectileCounts[ProjectileType<FinalDawnHorizontalSlash>()] +
player.ownedProjectileCounts[ProjectileType<FinalDawnThrow>()] +
player.ownedProjectileCounts[ProjectileType<FinalDawnThrow2>()] <= 0;
}
}