69 lines
2.2 KiB
C#
69 lines
2.2 KiB
C#
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Items.Weapons.Rogue;
|
|
using CalamityMod.Projectiles.Ranged;
|
|
using CalamityMod.Rarities;
|
|
using CalamityMod.Tiles.Furniture.CraftingStations;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons.Ranged
|
|
{
|
|
public class AcesHigh : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 48;
|
|
Item.height = 30;
|
|
Item.damage = 325;
|
|
Item.DamageType = DamageClass.Ranged;
|
|
Item.useTime = 3;
|
|
Item.useAnimation = 12;
|
|
Item.reuseDelay = 8;
|
|
Item.useLimitPerAnimation = 4;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.noMelee = true;
|
|
Item.knockBack = 6f;
|
|
|
|
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
|
Item.rare = ModContent.RarityType<Violet>();
|
|
Item.Calamity().donorItem = true;
|
|
|
|
Item.UseSound = SoundID.Item36;
|
|
Item.autoReuse = true;
|
|
Item.shootSpeed = 24f;
|
|
Item.shoot = ModContent.ProjectileType<CardHeart>();
|
|
Item.useAmmo = AmmoID.Bullet;
|
|
}
|
|
|
|
public override Vector2? HoldoutOffset()
|
|
{
|
|
return new Vector2(-5, 0);
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient(ItemID.Revolver).
|
|
AddIngredient<ClaretCannon>().
|
|
AddIngredient<FantasyTalisman>(52).
|
|
AddIngredient<AuricBar>(5).
|
|
AddTile<CosmicAnvil>().
|
|
Register();
|
|
}
|
|
|
|
public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback)
|
|
{
|
|
type = Utils.SelectRandom(Main.rand, new int[]
|
|
{
|
|
ModContent.ProjectileType<CardHeart>(),
|
|
ModContent.ProjectileType<CardSpade>(),
|
|
ModContent.ProjectileType<CardDiamond>(),
|
|
ModContent.ProjectileType<CardClub>()
|
|
});
|
|
}
|
|
}
|
|
}
|