Also fixed a few other bugs like with Web Balls, Jaws of Oblivion, Dune Hopper, Cobalt Kunai, Frostcrush Valari, Plaguenades, and Time Bolt
48 lines
1.7 KiB
C#
48 lines
1.7 KiB
C#
using CalamityMod.Projectiles.Rogue;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Rogue
|
|
{
|
|
public class ProfanedTrident : RogueWeapon
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Infernal Spear");
|
|
Tooltip.SetDefault("Throws a homing spear that explodes on enemy hits\n" +
|
|
"Stealth strikes summon fireballs as they fly before exploding into a fiery fountain");
|
|
}
|
|
|
|
public override void SafeSetDefaults()
|
|
{
|
|
item.width = 72;
|
|
item.damage = 1000;
|
|
item.noMelee = true;
|
|
item.noUseGraphic = true;
|
|
item.useAnimation = 13;
|
|
item.useStyle = ItemUseStyleID.SwingThrow;
|
|
item.useTime = 13;
|
|
item.knockBack = 8f;
|
|
item.UseSound = SoundID.Item1;
|
|
item.autoReuse = true;
|
|
item.height = 72;
|
|
item.value = CalamityGlobalItem.Rarity15BuyPrice;
|
|
item.rare = ItemRarityID.Purple;
|
|
item.Calamity().customRarity = CalamityRarity.Violet;
|
|
item.shoot = ModContent.ProjectileType<InfernalSpearProjectile>();
|
|
item.shootSpeed = 28f;
|
|
item.Calamity().rogue = true;
|
|
}
|
|
|
|
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
|
{
|
|
int proj = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI);
|
|
if (proj.WithinBounds(Main.maxProjectiles))
|
|
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
|
|
return false;
|
|
}
|
|
}
|
|
}
|