Files
CalamityModPublic/Items/Weapons/DraedonsArsenal/WavePounder.cs
T

71 lines
2.6 KiB
C#

using CalamityMod.CustomRecipes;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Projectiles.DraedonsArsenal;
using CalamityMod.Rarities;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Weapons.DraedonsArsenal
{
public class WavePounder : RogueWeapon, ILocalizedModType
{
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
public override void SetDefaults()
{
CalamityGlobalItem modItem = Item.Calamity();
Item.damage = 75;
Item.DamageType = RogueDamageClass.Instance;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.width = 26;
Item.height = 44;
Item.useTime = 56;
Item.useAnimation = 56;
Item.autoReuse = true;
Item.useStyle = ItemUseStyleID.Swing;
Item.knockBack = 0f;
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
Item.rare = ModContent.RarityType<Turquoise>();
Item.UseSound = SoundID.Item1;
Item.shootSpeed = 16f;
Item.shoot = ModContent.ProjectileType<WavePounderProjectile>();
modItem.UsesCharge = true;
modItem.MaxCharge = 190f;
modItem.ChargePerUse = 0.5f;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);
if (proj.WithinBounds(Main.maxProjectiles))
Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable();
return false;
}
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 4);
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<MysteriousCircuitry>(12).
AddIngredient<DubiousPlating>(18).
AddIngredient<UelibloomBar>(8).
AddIngredient(ItemID.LunarBar, 4).
AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(4, out Func<bool> condition), condition).
AddTile(TileID.LunarCraftingStation).
Register();
}
}
}