2 - Exactly nine pre-Yharon weapons use each of NF, EE and DSF. 3 - Weapon upgrades which didn't require Cosmilite now take 8 bars. 4 - Costs in NF, EE and DSF standardized, except Ice Barrage, which takes double EE.
66 lines
2.5 KiB
C#
66 lines
2.5 KiB
C#
using CalamityMod.Items.Materials;
|
|
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 ThePack : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("The Pack");
|
|
Tooltip.SetDefault("Fires large homing rockets that explode into more homing mini rockets when in proximity to an enemy");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.damage = 1000;
|
|
item.ranged = true;
|
|
item.width = 96;
|
|
item.height = 40;
|
|
item.useTime = 52;
|
|
item.useAnimation = 52;
|
|
item.useStyle = ItemUseStyleID.HoldingOut;
|
|
item.noMelee = true;
|
|
item.knockBack = 7.5f;
|
|
item.UseSound = SoundID.Item11;
|
|
item.autoReuse = true;
|
|
item.shootSpeed = 24f;
|
|
item.shoot = ModContent.ProjectileType<ThePackMissile>();
|
|
item.useAmmo = AmmoID.Rocket;
|
|
|
|
item.value = CalamityGlobalItem.Rarity14BuyPrice;
|
|
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
|
item.Calamity().donorItem = true;
|
|
}
|
|
|
|
// Terraria seems to really dislike high crit values in SetDefaults
|
|
public override void GetWeaponCrit(Player player, ref int crit) => crit += 8;
|
|
|
|
public override Vector2? HoldoutOffset() => new Vector2(-40, 0);
|
|
|
|
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
|
{
|
|
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<ThePackMissile>(), damage, knockBack, player.whoAmI);
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<Scorpion>());
|
|
recipe.AddIngredient(ItemID.MarbleBlock, 50);
|
|
recipe.AddIngredient(ModContent.ItemType<ArmoredShell>(), 4);
|
|
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 8);
|
|
recipe.AddIngredient(ModContent.ItemType<EndothermicEnergy>(), 20);
|
|
recipe.AddTile(ModContent.TileType<CosmicAnvil>());
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|