using CalamityMod.Projectiles.Rogue; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Rogue { public class ProfanedTrident : RogueWeapon { public override void SetStaticDefaults() { DisplayName.SetDefault("Wrathwing"); Tooltip.SetDefault("Throws an agile, homing winged spear that constantly spits fire\n" + "Stealth strikes create an eruption of cinders on hit"); } public override void SafeSetDefaults() { item.width = 152; item.height = 148; item.damage = 592; item.knockBack = 5f; item.noMelee = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.SwingThrow; item.useTime = item.useAnimation = 13; item.autoReuse = true; item.UseSound = SoundID.Item1; item.value = CalamityGlobalItem.Rarity15BuyPrice; item.rare = ItemRarityID.Purple; item.Calamity().customRarity = CalamityRarity.Violet; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 28f; item.Calamity().rogue = true; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { if (player.Calamity().StealthStrikeAvailable()) damage = (int)(damage * 0.67f); int proj = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); return false; } } }