non-balancing changes -- - did the thing with helium flash dust drawing - fix nasty cholla stealth strike not scaling with stealth damage - gave additional tooltip to some items - fixed urchin mace getting pierce resisted - fixed sludge splotch having flat damage stealth strikes - also just cleaned up sludge splotch code in general lmao - cleaned up hardened honeycomb code - changed shinobi blade's stealth strike effect
55 lines
2.1 KiB
C#
55 lines
2.1 KiB
C#
using Terraria.DataStructures;
|
|
using CalamityMod.Projectiles.Ranged;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Ranged
|
|
{
|
|
public class Shellshooter : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Shellshooter");
|
|
Tooltip.SetDefault("Fires slow but powerful arrows\n" +
|
|
"Converts wooden arrows into heavy piercing seashells");
|
|
SacrificeTotal = 1;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.damage = 40;
|
|
Item.DamageType = DamageClass.Ranged;
|
|
Item.width = 30;
|
|
Item.height = 38;
|
|
Item.useTime = 70;
|
|
Item.useAnimation = 70;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.noMelee = true;
|
|
Item.knockBack = 6f;
|
|
Item.value = CalamityGlobalItem.Rarity2BuyPrice;
|
|
Item.rare = ItemRarityID.Green;
|
|
Item.UseSound = SoundID.Item5;
|
|
Item.autoReuse = true;
|
|
Item.shoot = ModContent.ProjectileType<Shell>();
|
|
Item.shootSpeed = 2.5f;
|
|
Item.useAmmo = AmmoID.Arrow;
|
|
Item.Calamity().canFirePointBlankShots = true;
|
|
}
|
|
|
|
// Terraria seems to really dislike high crit values in SetDefaults
|
|
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15;
|
|
|
|
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
|
{
|
|
if (CalamityUtils.CheckWoodenAmmo(type, player))
|
|
Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, ModContent.ProjectileType<Shell>(), damage, knockback, player.whoAmI);
|
|
else
|
|
Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI);
|
|
|
|
return false;
|
|
}
|
|
}
|
|
}
|