55 lines
1.7 KiB
C#
55 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using CalamityMod.Items;
|
|
|
|
namespace CalamityMod.Items.Weapons
|
|
{
|
|
public class CursedCapper : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Cursed Capper");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 24;
|
|
item.ranged = true;
|
|
item.width = 44;
|
|
item.height = 32;
|
|
item.useTime = 10;
|
|
item.useAnimation = 10;
|
|
item.useStyle = 5;
|
|
item.noMelee = true;
|
|
item.knockBack = 2.25f;
|
|
item.value = Item.buyPrice(0, 36, 0, 0);
|
|
item.rare = 5;
|
|
item.UseSound = SoundID.Item41;
|
|
item.autoReuse = true;
|
|
item.shootSpeed = 14f;
|
|
item.shoot = mod.ProjectileType("CursedRound");
|
|
item.useAmmo = 97;
|
|
}
|
|
|
|
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)
|
|
{
|
|
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("CursedRound"), damage, knockBack, player.whoAmI, 0.0f, 0.0f);
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ItemID.PhoenixBlaster);
|
|
recipe.AddIngredient(ItemID.CursedFlame, 10);
|
|
recipe.AddTile(TileID.MythrilAnvil);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
} |