Files
CalamityModPublic/Items/Weapons/Rogue/Whitewater.cs
T
XykandCameron Ewell be65d52de6 Levi-Ana Weapons Reworks (#924)
* Leviathan Teeth
* Brackish Flask  -> Whitewater
* Greentide
* Laceration and small adjustments
* added Laceration to some teeth projectiles and gave leviathan teeth a tooltip because I forgor earlier
* Atlantis Visual Update
* Made Levi Amber dash to use new enemy knockback
* New Whitewater sprite
* Whitewater Sprite
* also made atlantis sound a bit better
* Fix issues in Leviathan weapon tooltips

---------

Co-authored-by: Cameron Ewell <spazeglitch@gmail.com>
2024-09-13 17:50:30 -04:00

56 lines
2.0 KiB
C#

using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
[LegacyName("BrackishFlask")]
public class Whitewater : RogueWeapon
{
public bool splitDirection = false;
public override void SetDefaults()
{
Item.width = 36;
Item.height = 40;
Item.damage = 97;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.useAnimation = 42;
Item.useStyle = ItemUseStyleID.Swing;
Item.useTime = 42;
Item.knockBack = 6.5f;
Item.UseSound = SoundID.Item106 with { Volume = 0.7f };
Item.autoReuse = true;
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.rare = ItemRarityID.Lime;
Item.shoot = ModContent.ProjectileType<WhitewaterProj>();
Item.shootSpeed = 6f;
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)
{
if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (stealth.WithinBounds(Main.maxProjectiles))
{
Main.projectile[stealth].Calamity().stealthStrike = true;
}
}
else
{
int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
Main.projectile[proj].ai[1] = splitDirection ? 1 : -1;
splitDirection = !splitDirection;
}
return false;
}
}
}