Cleaned up recipe code for all magic weapons. Renamed certain staffs to match in-game name.
This commit is contained in:
@@ -10,9 +10,8 @@ public class GoldenStaff : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Golden Staff");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots four oval-shaped magic projectiles twice in quick succession \nHas a high critical hit chance");
|
||||
Item.staff[Item.type] = true;
|
||||
Item.staff[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -38,23 +37,23 @@ public class GoldenStaff : ModItem
|
||||
Item.shootSpeed = 40f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
int numberProjectiles = 4;
|
||||
for (int i = 0; i < numberProjectiles; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f));
|
||||
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback);
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(10f));
|
||||
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddIngredient(ModContent.ItemType<NatureStaff>());
|
||||
recipe.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ModContent.ItemType<NatureStaff>())
|
||||
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 6)
|
||||
.AddTile(TileID.MythrilAnvil)
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ public class NatureStaff : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Nature Staff");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots three oval-shaped magic projectiles twice in quick succession \nHas a 25% chance of inflicting the [c/0E3517:Poisoned] debuff for 3 seconds \nHas a high critical hit chance");
|
||||
Item.staff[Item.type] = true;
|
||||
}
|
||||
@@ -38,24 +37,24 @@ public class NatureStaff : ModItem
|
||||
Item.shootSpeed = 40f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
int numberProjectiles = 3;
|
||||
for (int i = 0; i < numberProjectiles; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f));
|
||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(10f));
|
||||
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddRecipeGroup("FabusMod:SorcerousHellstaff");
|
||||
recipe.AddIngredient(ItemID.HallowedBar, 6);
|
||||
recipe.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.NatureToken>());
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.Register();
|
||||
CreateRecipe()
|
||||
.AddRecipeGroup("FabusMod:SorcerousHellstaff")
|
||||
.AddIngredient(ItemID.HallowedBar, 6)
|
||||
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.NatureToken>())
|
||||
.AddTile(TileID.MythrilAnvil)
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,10 +36,10 @@ public class PiercingStaff : ModItem
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddIngredient(ItemID.WandofSparking, 1);
|
||||
recipe.AddRecipeGroup("IronBar", 3);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ItemID.WandofSparking)
|
||||
.AddRecipeGroup("IronBar", 3)
|
||||
.AddTile(TileID.Anvils)
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
||||
+13
-13
@@ -4,7 +4,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Magic.Staffs;
|
||||
|
||||
public class SorcerousHellstaff : ModItem
|
||||
public class SorcerersHellstaff : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -38,18 +38,18 @@ public class SorcerousHellstaff : ModItem
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe recipe1 = CreateRecipe();
|
||||
recipe1.AddIngredient(ModContent.ItemType<SorcerousStaff>());
|
||||
recipe1.AddIngredient(ItemID.HellstoneBar, 6);
|
||||
recipe1.AddIngredient(ItemID.Obsidian, 4);
|
||||
recipe1.AddTile(TileID.Anvils);
|
||||
recipe1.Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ModContent.ItemType<SorcerersStaff>())
|
||||
.AddIngredient(ItemID.HellstoneBar, 6)
|
||||
.AddIngredient(ItemID.Obsidian, 4)
|
||||
.AddTile(TileID.Anvils)
|
||||
.Register();
|
||||
|
||||
Recipe recipe2 = CreateRecipe();
|
||||
recipe2.AddIngredient(ModContent.ItemType<SorcerousHellstaffWhite>());
|
||||
recipe2.AddIngredient(ItemID.BlueDye);
|
||||
recipe2.AddIngredient(ItemID.RedDye);
|
||||
recipe2.AddTile(TileID.DyeVat);
|
||||
recipe2.Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ModContent.ItemType<SorcerersHellstaffWhite>())
|
||||
.AddIngredient(ItemID.BlueDye)
|
||||
.AddIngredient(ItemID.RedDye)
|
||||
.AddTile(TileID.DyeVat)
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 748 B After Width: | Height: | Size: 748 B |
+6
-6
@@ -4,7 +4,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Magic.Staffs;
|
||||
|
||||
public class SorcerousHellstaffWhite : ModItem
|
||||
public class SorcerersHellstaffWhite : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -38,10 +38,10 @@ public class SorcerousHellstaffWhite : ModItem
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddIngredient(ModContent.ItemType<SorcerousHellstaff>());
|
||||
recipe.AddIngredient(ItemID.PinkandSilverDye, 1);
|
||||
recipe.AddTile(TileID.DyeVat);
|
||||
recipe.Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ModContent.ItemType<SorcerersHellstaff>())
|
||||
.AddIngredient(ItemID.PinkandSilverDye, 1)
|
||||
.AddTile(TileID.DyeVat)
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 741 B After Width: | Height: | Size: 741 B |
+7
-7
@@ -4,7 +4,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace FabusMod.Items.Weapons.Magic.Staffs;
|
||||
|
||||
public class SorcerousStaff : ModItem
|
||||
public class SorcerersStaff : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -38,11 +38,11 @@ public class SorcerousStaff : ModItem
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddRecipeGroup("FabusMod:GoldBar", 8);
|
||||
recipe.AddIngredient(ItemID.Sapphire, 6);
|
||||
recipe.AddIngredient(ItemID.Emerald, 4);
|
||||
recipe.AddTile(TileID.Anvils);
|
||||
recipe.Register();
|
||||
CreateRecipe()
|
||||
.AddRecipeGroup("FabusMod:GoldBar", 8)
|
||||
.AddIngredient(ItemID.Sapphire, 6)
|
||||
.AddIngredient(ItemID.Emerald, 4)
|
||||
.AddTile(TileID.Anvils)
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 629 B After Width: | Height: | Size: 629 B |
@@ -41,18 +41,18 @@ public class TheWhisperingIceDonator : ModItem
|
||||
int numberProjectiles = 3;
|
||||
for (int i = 0; i < numberProjectiles; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(5f));
|
||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(5f));
|
||||
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddIngredient(ItemID.FrostCore, 2);
|
||||
recipe.AddRecipeGroup("FabusMod:AdamantiteBar", 6);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ItemID.FrostCore, 2)
|
||||
.AddRecipeGroup("FabusMod:AdamantiteBar", 6)
|
||||
.AddTile(TileID.MythrilAnvil)
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ public class Tranquility : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Tranquility");
|
||||
Tooltip.SetDefault("[c/B6FF00:Autoshoots] \nShoots six oval-shaped rainbow projectiles three times in quick succession \nHas a high critical hit chance");
|
||||
Item.staff[Item.type] = true;
|
||||
}
|
||||
@@ -43,18 +42,18 @@ public class Tranquility : ModItem
|
||||
int numberProjectiles = 6;
|
||||
for (int i = 0; i < numberProjectiles; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(new Vector2(velocity.X, velocity.Y), (double)MathHelper.ToRadians(10f));
|
||||
Projectile.NewProjectile(source, position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockback, player.whoAmI, 0f, 0f);
|
||||
Vector2 perturbedSpeed = Utils.RotatedByRandom(velocity, (double)MathHelper.ToRadians(10f));
|
||||
Projectile.NewProjectile(source, position, perturbedSpeed, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
Recipe recipe = CreateRecipe();
|
||||
recipe.AddIngredient(ModContent.ItemType<GoldenStaff>());
|
||||
recipe.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 6);
|
||||
recipe.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>());
|
||||
recipe.Register();
|
||||
CreateRecipe()
|
||||
.AddIngredient(ModContent.ItemType<GoldenStaff>())
|
||||
.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 6)
|
||||
.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>())
|
||||
.Register();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user