Files
CalamityModPublic/Items/Weapons/Rogue/NightsGaze.cs
T

68 lines
2.3 KiB
C#

using CalamityMod.Projectiles.Rogue;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class NightsGaze : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Night's Gaze");
Tooltip.SetDefault("Throws a spear that shatters when it hits an enemy\n" +
"Stealth strikes cause the spear to summon homing stars as it flies\n" +
"Strike your foes with this spear of the night");
}
public override void SafeSetDefaults()
{
item.width = 80;
item.damage = 800;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 20;
item.useStyle = 1;
item.useTime = 20;
item.knockBack = 1f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.height = 80;
item.maxStack = 1;
item.value = Item.buyPrice(1, 40, 0, 0);
item.rare = 10;
item.shoot = ModContent.ProjectileType<NightsGazeProjectile>();
item.shootSpeed = 30f;
item.Calamity().postMoonLordRarity = 13;
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)
{
if (player.Calamity().StealthStrikeAvailable())
{
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
Main.projectile[p].Calamity().stealthStrike = true;
return false;
}
return true;
}
/*
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<RuinousSoul>(), 4);
recipe.AddIngredient(ModContent.ItemType<ExodiumClusterOre>(), 12);
recipe.AddIngredient(ItemID.DayBreak);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this, 1);
recipe.AddRecipe();
}
*/
}
}