Files
CalamityModPublic/Items/Weapons/Ranged/AcesHigh.cs
T
Altixal 52b7e8d29f clockwork use limit + balancing heck
removed child safety check on the dialogue that is no longer suggestive
2023-07-15 01:03:56 +07:00

73 lines
2.4 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.DataStructures;
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.damage = 325;
Item.DamageType = DamageClass.Ranged;
Item.width = 48;
Item.height = 30;
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.Rarity15BuyPrice;
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 bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int card = Utils.SelectRandom(Main.rand, new int[]
{
ModContent.ProjectileType<CardHeart>(),
ModContent.ProjectileType<CardSpade>(),
ModContent.ProjectileType<CardDiamond>(),
ModContent.ProjectileType<CardClub>()
});
Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, card, damage, knockback, player.whoAmI, 0f, 0f);
return false;
}
}
}