Files
CalamityModPublic/Items/Weapons/Ranged/Phangasm.cs
T

60 lines
2.1 KiB
C#

using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Ranged;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Ranged
{
public class Phangasm : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Phangasm");
Tooltip.SetDefault("Fires a spread of arrows and emits phantom arrows on enemy hits");
}
public override void SetDefaults()
{
item.damage = 86;
item.width = 20;
item.height = 12;
item.useTime = 12;
item.useAnimation = 12;
item.useStyle = 5;
item.knockBack = 3f;
item.value = Item.buyPrice(1, 80, 0, 0);
item.rare = 10;
item.UseSound = SoundID.Item5;
item.noMelee = true;
item.noUseGraphic = true;
item.ranged = true;
item.channel = true;
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<PhangasmBow>();
item.shootSpeed = 20f;
item.useAmmo = 40;
item.Calamity().postMoonLordRarity = 14;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<PhangasmBow>(), damage, knockBack, player.whoAmI, 0f, 0f);
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Phantasm);
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 5);
recipe.AddIngredient(ModContent.ItemType<Phantoplasm>(), 5);
recipe.AddTile(ModContent.TileType<DraedonsForge>());
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}