Files
CalamityModPublic/Items/Weapons/Ranged/AcesHigh.cs
T
Ozzatron eaa04280ba 1 - Properly separated all Cosmic Anvil and Draedon's Forge recipes.
2 - An extremely large number of recipe changes. Far too many to remember.
3 - Occult Stone and furniture are now made at the Ancient Manipulator.
4 - 1 Core of Calamity now requires 1 Ashes of Calamity.
5 - Renamed the Calamitous Altar to Altar of the Accursed.
6 - All Cosmilite tier items are made at the Cosmic Anvil.
7 - Standardized the costs of all late game (Cosmilite tier and beyond) items.
2021-09-12 20:07:50 -04:00

78 lines
2.7 KiB
C#

using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Rogue;
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 AcesHigh : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Ace's High");
Tooltip.SetDefault("Fires a string of cards with varying effects based on card type\n" +
"Hearts grant lifesteal. Spades pierce and ignore immunity frames.\n" +
"Diamonds explode. Clubs split into three.");
}
public override void SetDefaults()
{
item.damage = 325;
item.ranged = true;
item.width = 48;
item.height = 30;
item.useTime = 3;
item.reuseDelay = 8;
item.useAnimation = 12;
item.useStyle = ItemUseStyleID.HoldingOut;
item.noMelee = true;
item.knockBack = 6f;
item.value = CalamityGlobalItem.Rarity15BuyPrice;
item.Calamity().customRarity = CalamityRarity.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()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Revolver);
recipe.AddIngredient(ModContent.ItemType<ClaretCannon>());
recipe.AddIngredient(ModContent.ItemType<FantasyTalisman>(), 52);
recipe.AddIngredient(ModContent.ItemType<AuricBar>(), 5);
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
recipe.SetResult(this);
recipe.AddRecipe();
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int card = Utils.SelectRandom(Main.rand, new int[]
{
ModContent.ProjectileType<CardHeart>(),
ModContent.ProjectileType<CardSpade>(),
ModContent.ProjectileType<CardDiamond>(),
ModContent.ProjectileType<CardClub>()
});
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, card, damage, knockBack, player.whoAmI, 0f, 0f);
return false;
}
}
}