Fix damage typing for melee weapons. Fixed recursion bug. Cleaned up variables.

This commit is contained in:
Big Duckie
2022-07-05 13:01:34 -06:00
parent 776678b4c3
commit b206463290
15 changed files with 191 additions and 173 deletions
@@ -18,6 +18,7 @@ public class CarbonSwordNihon : ModItem
public override void SetDefaults()
{
Item.damage = 74;
Item.DamageType = DamageClass.Melee;
Item.crit = 8;
Item.width = 54;
Item.height = 68;
@@ -53,20 +54,20 @@ public class CarbonSwordNihon : ModItem
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.NightsAxeSparkle>());
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.NightsAxeSparkle>());
Main.dust[dust].scale = 1f;
Main.dust[dust].velocity.Y = 0f;
Main.dust[dust].velocity.X = 0.5f;
Main.dust[dust].noGravity = true;
}
}
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<CarbonSword>());
val.AddIngredient(ItemID.SilverDye, 1);
val.AddTile(TileID.DyeVat);
val.Register();
Recipe recipe = CreateRecipe();
recipe.AddIngredient(ModContent.ItemType<CarbonSword>());
recipe.AddIngredient(ItemID.SilverDye, 1);
recipe.AddTile(TileID.DyeVat);
recipe.Register();
}
}