Files
CalamityModPublic/Items/Weapons/Ranged/Starmada.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

69 lines
2.5 KiB
C#

using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables.Ores;
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
{
[LegacyName("StarfleetMK2")]
public class Starmada : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.Ranged";
public override void SetDefaults()
{
Item.width = 122;
Item.height = 50;
Item.damage = 135;
Item.knockBack = 15f;
Item.shootSpeed = 16f;
Item.useStyle = ItemUseStyleID.Shoot;
Item.useAnimation = Item.useTime = 27;
Item.UseSound = SoundID.Item92;
Item.shoot = ModContent.ProjectileType<StarfleetMK2Gun>();
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.DamageType = DamageClass.Ranged;
Item.channel = true;
Item.useTurn = false;
Item.useAmmo = AmmoID.FallenStar;
Item.autoReuse = true;
Item.rare = ModContent.RarityType<DarkBlue>();
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
// Spawning the holdout cannot consume ammo
public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextBool(3) && player.ownedProjectileCounts[Item.shoot] > 0;
public override Vector2? HoldoutOffset()
{
return new Vector2(-10, 0);
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType<StarfleetMK2Gun>(), 0, 0f, player.whoAmI);
return false;
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<Starfleet>().
AddIngredient<StarSputter>().
AddIngredient<CosmiliteBar>(8).
AddIngredient<DarksunFragment>(8).
AddIngredient<ExodiumCluster>(15).
AddTile<CosmicAnvil>().
Register();
}
}
}