Files
CalamityModPublic/Items/Weapons/Magic/HeliumFlash.cs
T
Altixal a321ece97b Material culling & recipe changes 2024
- Removed Demonic Bone Ash
- Removed Murky Paste
- Removed Trapper Bulb

Most of these are recipe ordering hell (again)
- Moved Shadowspec Bar to the top of most materials
- Moved Cosmilite Bar to the top of most materials (under SSpec)
- Moved complementary ASE type to pair below Bars
- Swap recipe order of Soul Artifacts
- Enforced certain material pairing orders
- Added missing materials for certain sets
2024-09-05 23:19:37 +07:00

71 lines
2.9 KiB
C#

using CalamityMod.Items.Materials;
using CalamityMod.Projectiles.Magic;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.Magic
{
public class HeliumFlash : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Magic";
internal const float ExplosionDamageMultiplier = 1.4f;
public static readonly SoundStyle Charge = new("CalamityMod/Sounds/Item/HeliumFlashCharge");
public static readonly SoundStyle ChargeLoop = new("CalamityMod/Sounds/Item/HeliumFlashFullChargeLoop");
internal static readonly int ChargeLoopSoundFrames = 120;
public static readonly SoundStyle ChargeFire = new("CalamityMod/Sounds/Item/HeliumFlashFire") { Volume = 1f };
public static int AftershotCooldownFrames = 17;
public static int FullChargeFrames = 88;
public override void SetDefaults()
{
Item.width = 112;
Item.height = 112;
Item.DamageType = DamageClass.Magic;
Item.damage = 5000;
Item.knockBack = 9.5f;
Item.mana = 80;
Item.useAnimation = Item.useTime = AftershotCooldownFrames;
Item.autoReuse = true;
Item.noMelee = true;
Item.channel = true;
Item.noUseGraphic = true;
Item.useStyle = ItemUseStyleID.Shoot;
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
Item.rare = ModContent.RarityType<Violet>();
Item.shoot = ModContent.ProjectileType<HeliumFlashHoldout>();
Item.shootSpeed = 15f;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
public override void HoldItem(Player player) => player.Calamity().mouseRotationListener = true;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Vector2 spawnPosition = player.RotatedRelativePoint(player.MountedCenter, true);
Projectile.NewProjectileDirect(source, spawnPosition, player.Calamity().mouseWorld - spawnPosition, ModContent.ProjectileType<HeliumFlashHoldout>(), damage, knockback, player.whoAmI);
return false;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<VenusianTrident>().
AddIngredient<ForbiddenSun>().
AddIngredient<AuricBar>(5).
AddIngredient(ItemID.FragmentSolar, 10).
AddIngredient(ItemID.FragmentNebula, 5).
AddTile<CosmicAnvil>().
Register();
}
}
}