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

61 lines
2.1 KiB
C#

using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Rogue;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Rogue
{
public class StarofDestruction : RogueWeapon
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Star of Destruction");
Tooltip.SetDefault("Fires a huge destructive mine that explodes into destruction bolts\n" +
"Amount of bolts scales with enemies hit, up to 16\n" +
"Stealth strikes always explode into the max amount of bolts");
}
public override void SafeSetDefaults()
{
item.width = 86;
item.damage = 175;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 38;
item.useStyle = 1;
item.useTime = 38;
item.knockBack = 10f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.height = 86;
item.value = Item.buyPrice(0, 95, 0, 0);
item.rare = 9;
item.shoot = ModContent.ProjectileType<DestructionStar>();
item.shootSpeed = 5f;
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()) //setting the stealth strike
{
int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 1f);
Main.projectile[stealth].Calamity().stealthStrike = true;
return false;
}
return true;
}
/*public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MeldiateBar>(), 16);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}*/
}
}