Fix damage typing for melee weapons. Fixed recursion bug. Cleaned up variables.
This commit is contained in:
@@ -18,6 +18,7 @@ public class CarbonSword : ModItem
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 74;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.crit = 8;
|
||||
Item.width = 54;
|
||||
Item.height = 68;
|
||||
@@ -48,11 +49,11 @@ public class CarbonSword : ModItem
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RyuuDust2>());
|
||||
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.RyuuDust2>());
|
||||
Main.dust[dust].scale = 1f;
|
||||
Main.dust[dust].velocity.Y = 0f;
|
||||
Main.dust[dust].velocity.X = 0.5f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,16 +64,16 @@ public class CarbonSword : ModItem
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<ShimadaSword>());
|
||||
val.AddRecipeGroup("FabusMod:OrichalcumBar", 10);
|
||||
val.AddTile(TileID.DemonAltar);
|
||||
val.Register();
|
||||
Recipe recipe1 = CreateRecipe();
|
||||
recipe1.AddIngredient(ModContent.ItemType<ShimadaSword>());
|
||||
recipe1.AddRecipeGroup("FabusMod:OrichalcumBar", 10);
|
||||
recipe1.AddTile(TileID.DemonAltar);
|
||||
recipe1.Register();
|
||||
|
||||
Recipe val2 = CreateRecipe();
|
||||
val2.AddIngredient(ModContent.ItemType<CarbonSwordNihon>());
|
||||
val2.AddIngredient(ItemID.BlueDye, 1);
|
||||
val2.AddTile(TileID.DyeVat);
|
||||
val2.Register();
|
||||
Recipe recipe2 = CreateRecipe();
|
||||
recipe2.AddIngredient(ModContent.ItemType<CarbonSwordNihon>());
|
||||
recipe2.AddIngredient(ItemID.BlueDye, 1);
|
||||
recipe2.AddTile(TileID.DyeVat);
|
||||
recipe2.Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ public class DemonsFury : ModItem
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 80;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.crit = 8;
|
||||
Item.width = 63;
|
||||
Item.height = 76;
|
||||
@@ -41,11 +42,11 @@ public class DemonsFury : ModItem
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RyuuDust3>());
|
||||
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.RyuuDust3>());
|
||||
Main.dust[dust].scale = 1f;
|
||||
Main.dust[dust].velocity.Y = 0f;
|
||||
Main.dust[dust].velocity.X = 0.5f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,17 +84,17 @@ public class DemonsFury : ModItem
|
||||
}
|
||||
Item.UseSound = SoundID.Item1;
|
||||
}
|
||||
return CanUseItem(player);
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddRecipeGroup("FabusMod:CarbonSword", 1);
|
||||
val.AddRecipeGroup("FabusMod:AdamantiteBar", 10);
|
||||
val.AddIngredient(ItemID.SoulofNight, 8);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
|
||||
val.AddTile(TileID.DemonAltar);
|
||||
val.Register();
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddRecipeGroup("FabusMod:CarbonSword", 1);
|
||||
recipe.AddRecipeGroup("FabusMod:AdamantiteBar", 10);
|
||||
recipe.AddIngredient(ItemID.SoulofNight, 8);
|
||||
recipe.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
|
||||
recipe.AddTile(TileID.DemonAltar);
|
||||
recipe.Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ public class GoldenFury : ModItem
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 100;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.crit = 8;
|
||||
Item.width = 63;
|
||||
Item.height = 76;
|
||||
@@ -83,16 +84,16 @@ public class GoldenFury : ModItem
|
||||
}
|
||||
Item.UseSound = SoundID.Item1;
|
||||
}
|
||||
return this.CanUseItem(player);
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<DemonsFury>());
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 10);
|
||||
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
|
||||
val.AddTile(TileID.DemonAltar);
|
||||
val.Register();
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddIngredient(ModContent.ItemType<DemonsFury>());
|
||||
recipe.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 10);
|
||||
recipe.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.SoulofWisdom>(), 4);
|
||||
recipe.AddTile(TileID.DemonAltar);
|
||||
recipe.Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ public class ShimadaSword : ModItem
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 18;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.crit = 8;
|
||||
Item.width = 54;
|
||||
Item.height = 68;
|
||||
@@ -33,11 +34,11 @@ public class ShimadaSword : ModItem
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RyuuDust>());
|
||||
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.RyuuDust>());
|
||||
Main.dust[dust].scale = 1f;
|
||||
Main.dust[dust].velocity.Y = 0f;
|
||||
Main.dust[dust].velocity.X = 0.5f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,11 +49,11 @@ public class ShimadaSword : ModItem
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<StonePlatedKatana>());
|
||||
val.AddRecipeGroup("FabusMod:LightsBane");
|
||||
val.AddIngredient(ItemID.Emerald, 10);
|
||||
val.AddTile(TileID.Anvils);
|
||||
val.Register();
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddIngredient(ModContent.ItemType<StonePlatedKatana>());
|
||||
recipe.AddRecipeGroup("FabusMod:LightsBane");
|
||||
recipe.AddIngredient(ItemID.Emerald, 10);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ public class StonePlatedKatana : ModItem
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 8;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.crit = 8;
|
||||
Item.width = 56;
|
||||
Item.height = 66;
|
||||
@@ -29,10 +30,10 @@ public class StonePlatedKatana : ModItem
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<Items.WeaponParts.UntreatedSwordParts>());
|
||||
val.AddIngredient(ItemID.StoneBlock, 12);
|
||||
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.ReinforcedWorkBench>());
|
||||
val.Register();
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddIngredient(ModContent.ItemType<Items.WeaponParts.UntreatedSwordParts>());
|
||||
recipe.AddIngredient(ItemID.StoneBlock, 12);
|
||||
recipe.AddTile(ModContent.TileType<global::FabusMod.Tiles.ReinforcedWorkBench>());
|
||||
recipe.Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ public class TheRainbowsHonor : ModItem
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.damage = 195;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.crit = 8;
|
||||
Item.width = 56;
|
||||
Item.height = 76;
|
||||
@@ -41,21 +42,23 @@ public class TheRainbowsHonor : ModItem
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default(Color), 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 num2 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default(Color), 1f);
|
||||
Main.dust[num2].scale = 1f;
|
||||
Main.dust[num2].velocity.Y = 0f;
|
||||
Main.dust[num2].velocity.X = 0.5f;
|
||||
Main.dust[num2].noGravity = true;
|
||||
int num3 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default(Color), 1f);
|
||||
Main.dust[num3].scale = 1f;
|
||||
Main.dust[num3].velocity.Y = 0f;
|
||||
Main.dust[num3].velocity.X = 0.5f;
|
||||
Main.dust[num3].noGravity = true;
|
||||
int dust1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default(Color), 1f);
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Main.dust[dust1].velocity.Y = 0f;
|
||||
Main.dust[dust1].velocity.X = 0.5f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default(Color), 1f);
|
||||
Main.dust[dust2].scale = 1f;
|
||||
Main.dust[dust2].velocity.Y = 0f;
|
||||
Main.dust[dust2].velocity.X = 0.5f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default(Color), 1f);
|
||||
Main.dust[dust3].scale = 1f;
|
||||
Main.dust[dust3].velocity.Y = 0f;
|
||||
Main.dust[dust3].velocity.X = 0.5f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,15 +96,15 @@ public class TheRainbowsHonor : ModItem
|
||||
}
|
||||
Item.UseSound = SoundID.Item1;
|
||||
}
|
||||
return this.CanUseItem(player);
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe val = CreateRecipe();
|
||||
val.AddIngredient(ModContent.ItemType<GoldenFury>());
|
||||
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 10);
|
||||
val.AddTile(null, "RainbowStation");
|
||||
val.Register();
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddIngredient(ModContent.ItemType<GoldenFury>());
|
||||
recipe.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 10);
|
||||
recipe.AddTile(null, "RainbowStation");
|
||||
recipe.Register();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user