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
+12 -11
View File
@@ -18,6 +18,7 @@ public class GoldenDagger : ModItem
public override void SetDefaults()
{
Item.damage = 95;
Item.DamageType = DamageClass.Melee;
Item.width = 40;
Item.height = 40;
Item.useTime = 12;
@@ -36,11 +37,11 @@ public class GoldenDagger : ModItem
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.MeatDust>(), 0f, 0f, 0, default, 1f);
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.MeatDust>());
Main.dust[dust].scale = 1f;
Main.dust[dust].velocity.Y = 0f;
Main.dust[dust].velocity.X = 0.5f;
Main.dust[dust].noGravity = true;
}
}
@@ -74,11 +75,11 @@ public class GoldenDagger : ModItem
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ModContent.ItemType<OniDagger>());
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6);
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
val.AddTile(TileID.AdamantiteForge);
val.Register();
Recipe recipe = CreateRecipe();
recipe.AddIngredient(ModContent.ItemType<OniDagger>());
recipe.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6);
recipe.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
recipe.AddTile(TileID.AdamantiteForge);
recipe.Register();
}
}