61 lines
2.0 KiB
C#
61 lines
2.0 KiB
C#
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Items.Placeables;
|
|
using CalamityMod.Projectiles.Summon;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Summon
|
|
{
|
|
public class DreadmineStaff : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Dreadmine Staff");
|
|
Tooltip.SetDefault("Summons a dreadmine turret to fight for you");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 60;
|
|
item.mana = 10;
|
|
item.width = 44;
|
|
item.height = 44;
|
|
item.useTime = 36;
|
|
item.useAnimation = 36;
|
|
item.useStyle = 1;
|
|
item.noMelee = true;
|
|
item.knockBack = 4.5f;
|
|
item.value = Item.buyPrice(0, 60, 0, 0);
|
|
item.rare = 7;
|
|
item.UseSound = SoundID.Item113;
|
|
item.autoReuse = true;
|
|
item.shoot = ModContent.ProjectileType<DreadmineTurret>();
|
|
item.shootSpeed = 10f;
|
|
item.summon = true;
|
|
item.sentry = true;
|
|
}
|
|
|
|
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
|
{
|
|
position = Main.MouseWorld;
|
|
speedX = 0;
|
|
speedY = 0;
|
|
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI);
|
|
player.UpdateMaxTurrets();
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<DepthCells>(), 10);
|
|
recipe.AddIngredient(ModContent.ItemType<Lumenite>(), 30);
|
|
recipe.AddIngredient(ModContent.ItemType<Tenebris>(), 10);
|
|
recipe.AddTile(TileID.MythrilAnvil);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|