Files
CalamityModPublic/Items/Weapons/Rogue/Equanimity.cs
T
Altixal 801dd089e6 cleaning up the balancing backlog: part 2
- added meld blobs to deus loot
- removed dye stuff from fruit upgrades
- remove the ability for rogue crap to ground drop except wulfrum knives
- doubled urchin stinger drops in return
2023-02-19 19:26:46 -05:00

65 lines
2.4 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 Equanimity : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Equanimity");
Tooltip.SetDefault("Throws a dark/light boomerang that confuses enemies\n" +
"The boomerang will create light shards upon hitting enemies when thrown out, and will fire homing dark shards when returning\n" +
"Stealth strikes cause the boomerang to create both dark and light shards whenever one type would be created");
SacrificeTotal = 1;
}
public override void SetDefaults()
{
Item.width = 40;
Item.damage = 40;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.useAnimation = Item.useTime = 36;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 1f;
Item.UseSound = SoundID.Item1;
Item.autoReuse = true;
Item.height = 36;
Item.maxStack = 1;
Item.value = CalamityGlobalItem.Rarity4BuyPrice;
Item.rare = ItemRarityID.LightRed;
Item.shoot = ModContent.ProjectileType<EquanimityProj>();
Item.shootSpeed = 30f;
Item.DamageType = RogueDamageClass.Instance;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (player.Calamity().StealthStrikeAvailable())
{
int p = Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI, 0f, 1f);
if (p.WithinBounds(Main.maxProjectiles))
Main.projectile[p].Calamity().stealthStrike = true;
return false;
}
return true;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient(ItemID.Flamarang).
AddIngredient(ItemID.IceBoomerang).
AddIngredient(ItemID.DarkShard).
AddIngredient(ItemID.LightShard).
AddTile(TileID.Anvils).
Register();
}
}
}