Finished GlobalNPC cleanup. Replaced netmode = x checks with NetmodeID.X checks. Replaced Next(X) == 0 with NextBool(X).
58 lines
1.8 KiB
C#
58 lines
1.8 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Weapons
|
|
{
|
|
public class TrueBiomeBlade : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("True Biome Blade");
|
|
Tooltip.SetDefault("Fires different projectiles based on what biome you're in");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 54;
|
|
item.damage = 160;
|
|
item.melee = true;
|
|
item.useAnimation = 21;
|
|
item.useTime = 21;
|
|
item.useTurn = true;
|
|
item.useStyle = 1;
|
|
item.knockBack = 7.5f;
|
|
item.UseSound = SoundID.Item1;
|
|
item.autoReuse = true;
|
|
item.height = 54;
|
|
item.value = Item.buyPrice(0, 80, 0, 0);
|
|
item.rare = 8;
|
|
item.shoot = mod.ProjectileType("TrueBiomeOrb");
|
|
item.shootSpeed = 12f;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(null, "BiomeBlade");
|
|
recipe.AddIngredient(null, "LivingShard", 5);
|
|
recipe.AddIngredient(ItemID.Ectoplasm, 5);
|
|
recipe.AddIngredient(null, "DepthCells", 10);
|
|
recipe.AddIngredient(null, "Lumenite", 10);
|
|
recipe.AddIngredient(null, "Tenebris", 5);
|
|
recipe.AddTile(TileID.MythrilAnvil);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
|
|
public override void MeleeEffects(Player player, Rectangle hitbox)
|
|
{
|
|
if (Main.rand.NextBool(5))
|
|
{
|
|
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 0);
|
|
}
|
|
}
|
|
}
|
|
}
|