48 lines
1.8 KiB
C#
48 lines
1.8 KiB
C#
using Terraria.DataStructures;
|
|
using CalamityMod.Projectiles.Rogue;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Rogue
|
|
{
|
|
public class ScourgeoftheSeas : RogueWeapon
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Item.damage = 56;
|
|
Item.knockBack = 3.5f;
|
|
Item.useAnimation = Item.useTime = 24;
|
|
Item.autoReuse = true;
|
|
Item.DamageType = RogueDamageClass.Instance;
|
|
Item.shootSpeed = 10f;
|
|
Item.shoot = ModContent.ProjectileType<ScourgeoftheSeasProjectile>();
|
|
|
|
Item.width = 64;
|
|
Item.height = 66;
|
|
Item.noMelee = true;
|
|
Item.noUseGraphic = true;
|
|
Item.useStyle = ItemUseStyleID.Swing;
|
|
Item.UseSound = SoundID.Item1;
|
|
Item.rare = ItemRarityID.Pink;
|
|
Item.value = CalamityGlobalItem.Rarity5BuyPrice;
|
|
}
|
|
|
|
public override float StealthDamageMultiplier => 1.4f;
|
|
public override float StealthVelocityMultiplier => 1.2f;
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
|
|
{
|
|
int stealth = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<ScourgeoftheSeasProjectile>(), damage, knockback, player.whoAmI, 0f, 1f);
|
|
if (stealth.WithinBounds(Main.maxProjectiles))
|
|
Main.projectile[stealth].Calamity().stealthStrike = true;
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
}
|