Files
CalamityModPublic/Items/Weapons/Rogue/Wrathwing.cs
T
2023-05-28 06:14:26 +07:00

44 lines
1.6 KiB
C#

using CalamityMod.Projectiles.Rogue;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
[LegacyName("ProfanedTrident")]
public class Wrathwing : RogueWeapon
{
public override void SetDefaults()
{
Item.width = 152;
Item.height = 148;
Item.damage = 592;
Item.knockBack = 5f;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = Item.useAnimation = 13;
Item.autoReuse = true;
Item.UseSound = SoundID.Item1;
Item.value = CalamityGlobalItem.Rarity15BuyPrice;
Item.rare = ModContent.RarityType<Violet>();
Item.shoot = ModContent.ProjectileType<WrathwingSpear>();
Item.shootSpeed = 28f;
Item.DamageType = RogueDamageClass.Instance;
}
public override float StealthDamageMultiplier => 0.85f;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int proj = Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI);
if (proj.WithinBounds(Main.maxProjectiles))
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
return false;
}
}
}