Clean up accessory code.

This commit is contained in:
Big Duckie
2022-07-05 16:17:11 -06:00
parent eb2cb27e79
commit 3cb03f994a
11 changed files with 111 additions and 118 deletions
+7 -7
View File
@@ -25,16 +25,16 @@ public class HallowedBand : ModItem
public override void UpdateAccessory(Player player, bool hideVisual) public override void UpdateAccessory(Player player, bool hideVisual)
{ {
player.GetDamage(DamageClass.Generic) += 0.08f; player.GetDamage(DamageClass.Generic) += 0.08f;
player.buffImmune[24] = true; player.buffImmune[BuffID.OnFire] = true;
} }
public override void AddRecipes() public override void AddRecipes()
{ {
Recipe recipe = CreateRecipe(); CreateRecipe()
recipe.AddIngredient(ModContent.ItemType<HellfireBand>()); .AddIngredient(ModContent.ItemType<HellfireBand>())
recipe.AddIngredient(ItemID.HallowedBar, 3); .AddIngredient(ItemID.HallowedBar, 3)
recipe.AddIngredient(ItemID.Ruby, 2); .AddIngredient(ItemID.Ruby, 2)
recipe.AddTile(TileID.Anvils); .AddTile(TileID.Anvils)
recipe.Register(); .Register();
} }
} }
+17 -18
View File
@@ -9,7 +9,6 @@ public class HarmonyScarf : ModItem
{ {
public override void SetStaticDefaults() public override void SetStaticDefaults()
{ {
DisplayName.SetDefault("Harmony Scarf");
Tooltip.SetDefault("Increases Max HP and Mana by 60\n20% increased all damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs \n'This would be a nice gift for a partner!'"); Tooltip.SetDefault("Increases Max HP and Mana by 60\n20% increased all damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs \n'This would be a nice gift for a partner!'");
} }
@@ -28,26 +27,26 @@ public class HarmonyScarf : ModItem
player.statManaMax2 += 60; player.statManaMax2 += 60;
player.statLifeMax2 += 60; player.statLifeMax2 += 60;
player.GetDamage(DamageClass.Generic) += 0.2f; player.GetDamage(DamageClass.Generic) += 0.2f;
player.buffImmune[24] = true; player.buffImmune[BuffID.OnFire] = true;
player.buffImmune[164] = true; player.buffImmune[BuffID.Obstructed] = true;
player.buffImmune[163] = true; player.buffImmune[BuffID.VortexDebuff] = true;
} }
public override void AddRecipes() public override void AddRecipes()
{ {
Recipe recipe = CreateRecipe(); CreateRecipe()
recipe.AddIngredient(ModContent.ItemType<LunaticBand>()); .AddIngredient(ModContent.ItemType<LunaticBand>())
recipe.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.NatureToken>()); .AddIngredient(ModContent.ItemType<Items.CraftingIngredients.NatureToken>())
recipe.AddIngredient(ItemID.LeafWand, 1); .AddIngredient(ItemID.LeafWand)
recipe.AddIngredient(ItemID.Emerald, 8); .AddIngredient(ItemID.Emerald, 8)
recipe.AddIngredient(ItemID.SoulofLight, 15); .AddIngredient(ItemID.SoulofLight, 15)
recipe.AddIngredient(ItemID.SoulofNight, 15); .AddIngredient(ItemID.SoulofNight, 15)
recipe.AddIngredient(ItemID.SoulofSight, 15); .AddIngredient(ItemID.SoulofSight, 15)
recipe.AddIngredient(ItemID.SoulofFright, 15); .AddIngredient(ItemID.SoulofFright, 15)
recipe.AddIngredient(ItemID.SoulofMight, 15); .AddIngredient(ItemID.SoulofMight, 15)
recipe.AddIngredient(ItemID.LunarBar, 8); .AddIngredient(ItemID.LunarBar, 8)
recipe.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 8); .AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 8)
recipe.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>()); .AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>())
recipe.Register(); .Register();
} }
} }
+18 -18
View File
@@ -28,27 +28,27 @@ public class HarmonyScarfUpgraded : ModItem
player.statManaMax2 += 120; player.statManaMax2 += 120;
player.statLifeMax2 += 120; player.statLifeMax2 += 120;
player.GetDamage(DamageClass.Generic) += 0.3f; player.GetDamage(DamageClass.Generic) += 0.3f;
player.buffImmune[24] = true; player.buffImmune[BuffID.OnFire] = true;
player.buffImmune[164] = true; player.buffImmune[BuffID.Obstructed] = true;
player.buffImmune[163] = true; player.buffImmune[BuffID.VortexDebuff] = true;
} }
public override void AddRecipes() public override void AddRecipes()
{ {
Recipe val = CreateRecipe(); CreateRecipe()
val.AddIngredient(ModContent.ItemType<HarmonyScarf>()); .AddIngredient(ModContent.ItemType<HarmonyScarf>())
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.RainbowToken>()); .AddIngredient(ModContent.ItemType<Items.CraftingIngredients.RainbowToken>())
val.AddIngredient(ItemID.Sapphire, 15); .AddIngredient(ItemID.Sapphire, 15)
val.AddIngredient(ItemID.Ruby, 15); .AddIngredient(ItemID.Ruby, 15)
val.AddIngredient(ItemID.Amethyst, 15); .AddIngredient(ItemID.Amethyst, 15)
val.AddIngredient(ItemID.SoulofLight, 30); .AddIngredient(ItemID.SoulofLight, 30)
val.AddIngredient(ItemID.SoulofNight, 30); .AddIngredient(ItemID.SoulofNight, 30)
val.AddIngredient(ItemID.SoulofSight, 30); .AddIngredient(ItemID.SoulofSight, 30)
val.AddIngredient(ItemID.SoulofFright, 30); .AddIngredient(ItemID.SoulofFright, 30)
val.AddIngredient(ItemID.SoulofMight, 30); .AddIngredient(ItemID.SoulofMight, 30)
val.AddIngredient(ItemID.LunarBar, 20); .AddIngredient(ItemID.LunarBar, 20)
val.AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 20); .AddIngredient(ModContent.ItemType<Bars.RainbowChunk>(), 20)
val.AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>()); .AddTile(ModContent.TileType<global::FabusMod.Tiles.RainbowStation>())
val.Register(); .Register();
} }
} }
+6 -7
View File
@@ -9,7 +9,6 @@ public class HellfireBand : ModItem
{ {
public override void SetStaticDefaults() public override void SetStaticDefaults()
{ {
DisplayName.SetDefault("Hellfire Band");
Tooltip.SetDefault("4% increased all damage \nGrants immunity to the [c/FF4E00:On Fire!] debuff"); Tooltip.SetDefault("4% increased all damage \nGrants immunity to the [c/FF4E00:On Fire!] debuff");
} }
@@ -26,15 +25,15 @@ public class HellfireBand : ModItem
public override void UpdateAccessory(Player player, bool hideVisual) public override void UpdateAccessory(Player player, bool hideVisual)
{ {
player.GetDamage(DamageClass.Generic) += 0.04f; player.GetDamage(DamageClass.Generic) += 0.04f;
player.buffImmune[24] = true; player.buffImmune[BuffID.OnFire] = true;
} }
public override void AddRecipes() public override void AddRecipes()
{ {
Recipe val = CreateRecipe(); CreateRecipe()
val.AddIngredient(ModContent.ItemType<IronBand>()); .AddIngredient(ModContent.ItemType<IronBand>())
val.AddIngredient(ItemID.HellstoneBar, 3); .AddIngredient(ItemID.HellstoneBar, 3)
val.AddTile(TileID.Anvils); .AddTile(TileID.Anvils)
val.Register(); .Register();
} }
} }
+5 -6
View File
@@ -9,7 +9,6 @@ public class IronBand : ModItem
{ {
public override void SetStaticDefaults() public override void SetStaticDefaults()
{ {
DisplayName.SetDefault("Iron Band");
} }
public override void SetDefaults() public override void SetDefaults()
@@ -24,10 +23,10 @@ public class IronBand : ModItem
public override void AddRecipes() public override void AddRecipes()
{ {
Recipe val = CreateRecipe(); CreateRecipe()
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.BrokenBand>()); .AddIngredient(ModContent.ItemType<Items.CraftingIngredients.BrokenBand>())
val.AddRecipeGroup("IronBar", 3); .AddRecipeGroup("IronBar", 3)
val.AddTile(TileID.Anvils); .AddTile(TileID.Anvils)
val.Register(); .Register();
} }
} }
+21 -21
View File
@@ -27,34 +27,34 @@ public class LunaticBand : ModItem
{ {
player.GetDamage(DamageClass.Generic) += 0.14f; player.GetDamage(DamageClass.Generic) += 0.14f;
player.buffImmune[BuffID.OnFire] = true; player.buffImmune[BuffID.OnFire] = true;
player.buffImmune[BuffID.VortexDebuff] = true;
player.buffImmune[BuffID.Obstructed] = true; player.buffImmune[BuffID.Obstructed] = true;
player.buffImmune[BuffID.VortexDebuff] = true;
} }
public override void AddRecipes() public override void AddRecipes()
{ {
Recipe val = CreateRecipe(); CreateRecipe()
val.AddIngredient(ModContent.ItemType<SolarBand>()); .AddIngredient(ModContent.ItemType<SolarBand>())
val.AddIngredient(ItemID.LunarBar, 8); .AddIngredient(ItemID.LunarBar, 8)
val.AddTile(TileID.LunarCraftingStation); .AddTile(TileID.LunarCraftingStation)
val.Register(); .Register();
Recipe val2 = CreateRecipe(); CreateRecipe()
val2.AddIngredient(ModContent.ItemType<VortexBand>()); .AddIngredient(ModContent.ItemType<VortexBand>())
val2.AddIngredient(ItemID.LunarBar, 8); .AddIngredient(ItemID.LunarBar, 8)
val2.AddTile(TileID.LunarCraftingStation); .AddTile(TileID.LunarCraftingStation)
val2.Register(); .Register();
Recipe val3 = CreateRecipe(); CreateRecipe()
val3.AddIngredient(ModContent.ItemType<StardustBand>()); .AddIngredient(ModContent.ItemType<StardustBand>())
val3.AddIngredient(ItemID.LunarBar, 8); .AddIngredient(ItemID.LunarBar, 8)
val3.AddTile(TileID.LunarCraftingStation); .AddTile(TileID.LunarCraftingStation)
val3.Register(); .Register();
Recipe val4 = CreateRecipe(); CreateRecipe()
val4.AddIngredient(ModContent.ItemType<NebulaBand>()); .AddIngredient(ModContent.ItemType<NebulaBand>())
val4.AddIngredient(ItemID.LunarBar, 8); .AddIngredient(ItemID.LunarBar, 8)
val4.AddTile(TileID.LunarCraftingStation); .AddTile(TileID.LunarCraftingStation)
val4.Register(); .Register();
} }
} }
+8 -9
View File
@@ -9,7 +9,6 @@ public class NebulaBand : ModItem
{ {
public override void SetStaticDefaults() public override void SetStaticDefaults()
{ {
DisplayName.SetDefault("Nebula Band");
Tooltip.SetDefault("12% increased magic damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs"); Tooltip.SetDefault("12% increased magic damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs");
} }
@@ -26,17 +25,17 @@ public class NebulaBand : ModItem
public override void UpdateAccessory(Player player, bool hideVisual) public override void UpdateAccessory(Player player, bool hideVisual)
{ {
player.GetDamage(DamageClass.Magic) += 0.12f; player.GetDamage(DamageClass.Magic) += 0.12f;
player.buffImmune[24] = true; player.buffImmune[BuffID.OnFire] = true;
player.buffImmune[164] = true; player.buffImmune[BuffID.Obstructed] = true;
player.buffImmune[163] = true; player.buffImmune[BuffID.VortexDebuff] = true;
} }
public override void AddRecipes() public override void AddRecipes()
{ {
Recipe val = CreateRecipe(); CreateRecipe()
val.AddIngredient(ModContent.ItemType<HallowedBand>()); .AddIngredient(ModContent.ItemType<HallowedBand>())
val.AddIngredient(ItemID.FragmentNebula, 6); .AddIngredient(ItemID.FragmentNebula, 6)
val.AddTile(TileID.LunarCraftingStation); .AddTile(TileID.LunarCraftingStation)
val.Register(); .Register();
} }
} }
+8 -9
View File
@@ -9,7 +9,6 @@ public class SolarBand : ModItem
{ {
public override void SetStaticDefaults() public override void SetStaticDefaults()
{ {
DisplayName.SetDefault("Solar Band");
Tooltip.SetDefault("12% increased melee and throwing damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs"); Tooltip.SetDefault("12% increased melee and throwing damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs");
} }
@@ -27,17 +26,17 @@ public class SolarBand : ModItem
{ {
player.GetDamage(DamageClass.Melee) += 0.12f; player.GetDamage(DamageClass.Melee) += 0.12f;
player.GetDamage(DamageClass.Throwing) += 0.12f; player.GetDamage(DamageClass.Throwing) += 0.12f;
player.buffImmune[24] = true; player.buffImmune[BuffID.OnFire] = true;
player.buffImmune[164] = true; player.buffImmune[BuffID.Obstructed] = true;
player.buffImmune[163] = true; player.buffImmune[BuffID.VortexDebuff] = true;
} }
public override void AddRecipes() public override void AddRecipes()
{ {
Recipe val = CreateRecipe(); CreateRecipe()
val.AddIngredient(ModContent.ItemType<HallowedBand>()); .AddIngredient(ModContent.ItemType<HallowedBand>())
val.AddIngredient(ItemID.FragmentSolar, 6); .AddIngredient(ItemID.FragmentSolar, 6)
val.AddTile(TileID.LunarCraftingStation); .AddTile(TileID.LunarCraftingStation)
val.Register(); .Register();
} }
} }
+8 -9
View File
@@ -9,7 +9,6 @@ public class StardustBand : ModItem
{ {
public override void SetStaticDefaults() public override void SetStaticDefaults()
{ {
DisplayName.SetDefault("Stardust Band");
Tooltip.SetDefault("12% increased minion damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs"); Tooltip.SetDefault("12% increased minion damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs");
} }
@@ -26,17 +25,17 @@ public class StardustBand : ModItem
public override void UpdateAccessory(Player player, bool hideVisual) public override void UpdateAccessory(Player player, bool hideVisual)
{ {
player.GetDamage(DamageClass.Summon) += 0.12f; player.GetDamage(DamageClass.Summon) += 0.12f;
player.buffImmune[24] = true; player.buffImmune[BuffID.OnFire] = true;
player.buffImmune[164] = true; player.buffImmune[BuffID.Obstructed] = true;
player.buffImmune[163] = true; player.buffImmune[BuffID.VortexDebuff] = true;
} }
public override void AddRecipes() public override void AddRecipes()
{ {
Recipe val = CreateRecipe(); CreateRecipe()
val.AddIngredient(ModContent.ItemType<HallowedBand>()); .AddIngredient(ModContent.ItemType<HallowedBand>())
val.AddIngredient(ItemID.FragmentStardust, 6); .AddIngredient(ItemID.FragmentStardust, 6)
val.AddTile(TileID.LunarCraftingStation); .AddTile(TileID.LunarCraftingStation)
val.Register(); .Register();
} }
} }
+5 -5
View File
@@ -43,10 +43,10 @@ public class ValkyrieWings : ModItem
public override void AddRecipes() public override void AddRecipes()
{ {
Recipe val = CreateRecipe(); CreateRecipe()
val.AddIngredient(ItemID.HallowedBar, 10); .AddIngredient(ItemID.HallowedBar, 10)
val.AddIngredient(ItemID.SoulofFlight, 20); .AddIngredient(ItemID.SoulofFlight, 20)
val.AddTile(TileID.MythrilAnvil); .AddTile(TileID.MythrilAnvil)
val.Register(); .Register();
} }
} }
+8 -9
View File
@@ -9,7 +9,6 @@ public class VortexBand : ModItem
{ {
public override void SetStaticDefaults() public override void SetStaticDefaults()
{ {
DisplayName.SetDefault("Vortex Band");
Tooltip.SetDefault("12% increased ranged damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs"); Tooltip.SetDefault("12% increased ranged damage \nGrants immunity to the [c/FF4E00:On Fire!], [c/A84DFD:Distorted], and [c/9362B3:Obstructed] debuffs");
} }
@@ -26,17 +25,17 @@ public class VortexBand : ModItem
public override void UpdateAccessory(Player player, bool hideVisual) public override void UpdateAccessory(Player player, bool hideVisual)
{ {
player.GetDamage(DamageClass.Ranged) += 0.12f; player.GetDamage(DamageClass.Ranged) += 0.12f;
player.buffImmune[24] = true; player.buffImmune[BuffID.OnFire] = true;
player.buffImmune[164] = true; player.buffImmune[BuffID.Obstructed] = true;
player.buffImmune[163] = true; player.buffImmune[BuffID.VortexDebuff] = true;
} }
public override void AddRecipes() public override void AddRecipes()
{ {
Recipe val = CreateRecipe(); CreateRecipe()
val.AddIngredient(ModContent.ItemType<HallowedBand>()); .AddIngredient(ModContent.ItemType<HallowedBand>())
val.AddIngredient(ItemID.FragmentVortex, 6); .AddIngredient(ItemID.FragmentVortex, 6)
val.AddTile(TileID.LunarCraftingStation); .AddTile(TileID.LunarCraftingStation)
val.Register(); .Register();
} }
} }