Files
CalamityModPublic/Items/Weapons/Ranged/Shellshooter.cs
T
Andrew Marheine a32999cd47 1 - Nerfed Fate's Reveal explosion damage and buffed base damage a lot.
2 - Bows and guns now only convert their most basic ammo types to their special projectiles.
3 - Sped up Gamma Heart bullets again.
4 - Reduced the amount of projectiles created by Clockwork Bow, Alluvion, Deathwind, Dragon's Breath, Phangasm and Conference Call.
2021-02-07 01:46:44 -06:00

51 lines
1.7 KiB
C#

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("Converts wooden arrows into slow, powerful shells");
}
public override void SetDefaults()
{
item.damage = 30;
item.ranged = true;
item.width = 30;
item.height = 38;
item.useTime = 70;
item.useAnimation = 70;
item.useStyle = ItemUseStyleID.HoldingOut;
item.noMelee = true;
item.knockBack = 6f;
item.value = Item.buyPrice(0, 2, 0, 0);
item.rare = ItemRarityID.Green;
item.UseSound = SoundID.Item5;
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<Shell>();
item.shootSpeed = 1.5f;
item.useAmmo = AmmoID.Arrow;
}
// Terraria seems to really dislike high crit values in SetDefaults
public override void GetWeaponCrit(Player player, ref int crit) => crit += 15;
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 (type == ProjectileID.WoodenArrowFriendly)
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<Shell>(), damage, knockBack, player.whoAmI);
else
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI);
return false;
}
}
}