diff --git a/BiomeManagers/AbyssLayer1Biome.cs b/BiomeManagers/AbyssLayer1Biome.cs index 5476df52bf..f71ab13944 100644 --- a/BiomeManagers/AbyssLayer1Biome.cs +++ b/BiomeManagers/AbyssLayer1Biome.cs @@ -60,7 +60,7 @@ namespace CalamityMod.BiomeManagers public override void SetStaticDefaults() { - DisplayName.SetDefault("First Layer of the Abyss"); + DisplayName.SetDefault("Abyss: First Layer"); } public override bool IsBiomeActive(Player player) diff --git a/BiomeManagers/AbyssLayer2Biome.cs b/BiomeManagers/AbyssLayer2Biome.cs index 5289f1ee79..e351d8c7f6 100644 --- a/BiomeManagers/AbyssLayer2Biome.cs +++ b/BiomeManagers/AbyssLayer2Biome.cs @@ -24,7 +24,7 @@ namespace CalamityMod.BiomeManagers public override void SetStaticDefaults() { - DisplayName.SetDefault("Second Layer of the Abyss"); + DisplayName.SetDefault("Abyss: Second Layer"); } public override bool IsBiomeActive(Player player) diff --git a/BiomeManagers/AbyssLayer3Biome.cs b/BiomeManagers/AbyssLayer3Biome.cs index ea6102210c..a47d3b5499 100644 --- a/BiomeManagers/AbyssLayer3Biome.cs +++ b/BiomeManagers/AbyssLayer3Biome.cs @@ -24,7 +24,7 @@ namespace CalamityMod.BiomeManagers public override void SetStaticDefaults() { - DisplayName.SetDefault("Third Layer of the Abyss"); + DisplayName.SetDefault("Abyss: Third Layer"); } public override bool IsBiomeActive(Player player) diff --git a/BiomeManagers/AbyssLayer4Biome.cs b/BiomeManagers/AbyssLayer4Biome.cs index 9ad562d309..fee96360a5 100644 --- a/BiomeManagers/AbyssLayer4Biome.cs +++ b/BiomeManagers/AbyssLayer4Biome.cs @@ -24,7 +24,7 @@ namespace CalamityMod.BiomeManagers public override void SetStaticDefaults() { - DisplayName.SetDefault("Fourth Layer of the Abyss"); + DisplayName.SetDefault("Abyss: Fourth Layer"); } public override bool IsBiomeActive(Player player) diff --git a/Enums/CalamityRarity.cs b/Enums/CalamityRarity.cs deleted file mode 100644 index a20ae26d07..0000000000 --- a/Enums/CalamityRarity.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace CalamityMod -{ - public enum CalamityRarity - { - NoEffect = 0, - Turquoise = CalamityUtils.TurquoiseRarityValue, - PureGreen = CalamityUtils.PureGreenRarityValue, - DarkBlue = CalamityUtils.DarkBlueRarityValue, - Violet = CalamityUtils.VioletRarityValue, - HotPink = CalamityUtils.HotPinkRarityValue, - Rainbow = CalamityUtils.RainbowRarityValue, - DraedonRust = CalamityUtils.DraedonRustRarityValue, - } -} diff --git a/Items/Accessories/Affliction.cs b/Items/Accessories/Affliction.cs index c2277c11a5..0dd2438f6d 100644 --- a/Items/Accessories/Affliction.cs +++ b/Items/Accessories/Affliction.cs @@ -1,10 +1,11 @@ using CalamityMod.Buffs.StatBuffs; using CalamityMod.CalPlayer; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; -using Terraria.ModLoader; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { @@ -24,8 +25,7 @@ namespace CalamityMod.Items.Accessories Item.height = 44; Item.accessory = true; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Accessories/AngelicAlliance.cs b/Items/Accessories/AngelicAlliance.cs index 966802e3bd..47905d6bb2 100644 --- a/Items/Accessories/AngelicAlliance.cs +++ b/Items/Accessories/AngelicAlliance.cs @@ -1,12 +1,13 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using System.Collections.Generic; +using System.Linq; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using System.Linq; -using Terraria.Audio; namespace CalamityMod.Items.Accessories { @@ -36,8 +37,7 @@ namespace CalamityMod.Items.Accessories Item.height = 92; Item.value = CalamityGlobalItem.RarityHotPinkBuyPrice; Item.accessory = true; - Item.rare = 10; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Accessories/AsgardianAegis.cs b/Items/Accessories/AsgardianAegis.cs index b1c867106a..b6dccbe1cc 100644 --- a/Items/Accessories/AsgardianAegis.cs +++ b/Items/Accessories/AsgardianAegis.cs @@ -1,13 +1,14 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer.Dashes; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using System.Collections.Generic; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Linq; -using CalamityMod.CalPlayer.Dashes; namespace CalamityMod.Items.Accessories { @@ -37,7 +38,7 @@ namespace CalamityMod.Items.Accessories Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 28; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void ModifyTooltips(List list) diff --git a/Items/Accessories/AstralArcanum.cs b/Items/Accessories/AstralArcanum.cs index d2db7b964d..3f3f08a757 100644 --- a/Items/Accessories/AstralArcanum.cs +++ b/Items/Accessories/AstralArcanum.cs @@ -1,11 +1,12 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using System.Collections.Generic; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Linq; namespace CalamityMod.Items.Accessories { @@ -28,8 +29,7 @@ namespace CalamityMod.Items.Accessories Item.height = 26; Item.accessory = true; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); } public override void ModifyTooltips(List list) diff --git a/Items/Accessories/BadgeofBravery.cs b/Items/Accessories/BadgeofBravery.cs index 84df0cf95d..42bf380016 100644 --- a/Items/Accessories/BadgeofBravery.cs +++ b/Items/Accessories/BadgeofBravery.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,10 +22,9 @@ namespace CalamityMod.Items.Accessories { Item.width = 30; Item.height = 30; - Item.rare = ItemRarityID.Purple; Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/BlazingCore.cs b/Items/Accessories/BlazingCore.cs index c9bb6c10c7..f8b4076880 100644 --- a/Items/Accessories/BlazingCore.cs +++ b/Items/Accessories/BlazingCore.cs @@ -1,7 +1,8 @@ using CalamityMod.CalPlayer; +using CalamityMod.Rarities; using Terraria; -using Terraria.ID; using Terraria.DataStructures; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -27,8 +28,7 @@ namespace CalamityMod.Items.Accessories Item.height = 46; Item.accessory = true; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/BloodflareCore.cs b/Items/Accessories/BloodflareCore.cs index cac19c3ce7..df99e9f8b9 100644 --- a/Items/Accessories/BloodflareCore.cs +++ b/Items/Accessories/BloodflareCore.cs @@ -1,4 +1,5 @@ using CalamityMod.CalPlayer; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -19,8 +20,7 @@ namespace CalamityMod.Items.Accessories Item.width = 26; Item.height = 26; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.accessory = true; } diff --git a/Items/Accessories/Calamity.cs b/Items/Accessories/Calamity.cs index 63147f3973..f2cd522540 100644 --- a/Items/Accessories/Calamity.cs +++ b/Items/Accessories/Calamity.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -30,8 +31,7 @@ namespace CalamityMod.Items.Accessories { Item.width = 44; Item.height = 108; - Item.Calamity().customRarity = CalamityRarity.Violet; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; Item.accessory = true; } diff --git a/Items/Accessories/CoreOfTheBloodGod.cs b/Items/Accessories/CoreOfTheBloodGod.cs index bd86d9671c..23361d6548 100644 --- a/Items/Accessories/CoreOfTheBloodGod.cs +++ b/Items/Accessories/CoreOfTheBloodGod.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.DataStructures; @@ -27,8 +28,7 @@ namespace CalamityMod.Items.Accessories Item.width = Item.height = 48; Item.accessory = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/CorrosiveSpine.cs b/Items/Accessories/CorrosiveSpine.cs index d5b34991d2..f0ca8d61e4 100644 --- a/Items/Accessories/CorrosiveSpine.cs +++ b/Items/Accessories/CorrosiveSpine.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories { Item.width = 18; Item.height = 46; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.defense = 4; Item.accessory = true; diff --git a/Items/Accessories/DarkSunRing.cs b/Items/Accessories/DarkSunRing.cs index 7d9fa3451f..3ddfefe845 100644 --- a/Items/Accessories/DarkSunRing.cs +++ b/Items/Accessories/DarkSunRing.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.DataStructures; @@ -30,11 +31,10 @@ namespace CalamityMod.Items.Accessories Item.width = 42; Item.height = 60; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; Item.defense = 10; Item.lifeRegen = 1; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/DimensionalSoulArtifact.cs b/Items/Accessories/DimensionalSoulArtifact.cs index 0ba2000eb6..0d0923bcb8 100644 --- a/Items/Accessories/DimensionalSoulArtifact.cs +++ b/Items/Accessories/DimensionalSoulArtifact.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Plates; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -24,8 +25,7 @@ namespace CalamityMod.Items.Accessories Item.width = 28; Item.height = 28; Item.accessory = true; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.Rarity14BuyPrice; } diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs index a9091aee36..a812f30962 100644 --- a/Items/Accessories/DraedonsHeart.cs +++ b/Items/Accessories/DraedonsHeart.cs @@ -1,8 +1,9 @@ -using System.Collections.Generic; -using System.Linq; -using CalamityMod.Balancing; +using CalamityMod.Balancing; using CalamityMod.CalPlayer; +using CalamityMod.Rarities; using CalamityMod.World; +using System.Collections.Generic; +using System.Linq; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -47,9 +48,8 @@ namespace CalamityMod.Items.Accessories Item.height = 68; Item.accessory = true; Item.defense = 48; - Item.rare = ItemRarityID.Red; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/DragonScales.cs b/Items/Accessories/DragonScales.cs index 2ed8feb5ce..305af709e8 100644 --- a/Items/Accessories/DragonScales.cs +++ b/Items/Accessories/DragonScales.cs @@ -1,8 +1,9 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.CalPlayer; +using CalamityMod.Rarities; using Terraria; -using Terraria.ModLoader; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { @@ -26,8 +27,7 @@ namespace CalamityMod.Items.Accessories Item.width = 32; Item.height = 34; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.accessory = true; } diff --git a/Items/Accessories/EclipseMirror.cs b/Items/Accessories/EclipseMirror.cs index 57330b9ee3..207f6be366 100644 --- a/Items/Accessories/EclipseMirror.cs +++ b/Items/Accessories/EclipseMirror.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -30,9 +31,8 @@ namespace CalamityMod.Items.Accessories { Item.width = 38; Item.height = 38; - Item.rare = ItemRarityID.Purple; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.accessory = true; } diff --git a/Items/Accessories/ElementalGauntlet.cs b/Items/Accessories/ElementalGauntlet.cs index f4e1f8bb0b..348c32addb 100644 --- a/Items/Accessories/ElementalGauntlet.cs +++ b/Items/Accessories/ElementalGauntlet.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Accessories Item.height = 38; Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/ElementalQuiver.cs b/Items/Accessories/ElementalQuiver.cs index 40e9a723a8..59fa9259fc 100644 --- a/Items/Accessories/ElementalQuiver.cs +++ b/Items/Accessories/ElementalQuiver.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Accessories Item.height = 32; Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/ElysianAegis.cs b/Items/Accessories/ElysianAegis.cs index ed570ab310..ca39d60a2d 100644 --- a/Items/Accessories/ElysianAegis.cs +++ b/Items/Accessories/ElysianAegis.cs @@ -1,11 +1,12 @@ -using CalamityMod.CalPlayer; -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer.Dashes; +using CalamityMod.Rarities; using System.Collections.Generic; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Linq; -using CalamityMod.CalPlayer.Dashes; namespace CalamityMod.Items.Accessories { @@ -32,8 +33,7 @@ namespace CalamityMod.Items.Accessories Item.width = 48; Item.height = 42; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.defense = 18; Item.accessory = true; } diff --git a/Items/Accessories/EtherealTalisman.cs b/Items/Accessories/EtherealTalisman.cs index fbe4656b95..3241748764 100644 --- a/Items/Accessories/EtherealTalisman.cs +++ b/Items/Accessories/EtherealTalisman.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Accessories Item.height = 32; Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/GodlySoulArtifact.cs b/Items/Accessories/GodlySoulArtifact.cs index 6a401398e9..869e56d333 100644 --- a/Items/Accessories/GodlySoulArtifact.cs +++ b/Items/Accessories/GodlySoulArtifact.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Plates; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -23,8 +24,7 @@ namespace CalamityMod.Items.Accessories Item.width = 28; Item.height = 28; Item.accessory = true; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.Rarity15BuyPrice; } diff --git a/Items/Accessories/HallowedRune.cs b/Items/Accessories/HallowedRune.cs index 96b62b5ab4..7ee5bac4fd 100644 --- a/Items/Accessories/HallowedRune.cs +++ b/Items/Accessories/HallowedRune.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories { Item.width = 26; Item.height = 26; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.accessory = true; } diff --git a/Items/Accessories/HeartoftheElements.cs b/Items/Accessories/HeartoftheElements.cs index cbe789631a..9042a5583e 100644 --- a/Items/Accessories/HeartoftheElements.cs +++ b/Items/Accessories/HeartoftheElements.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -28,9 +29,8 @@ namespace CalamityMod.Items.Accessories Item.width = 20; Item.height = 20; Item.value = CalamityGlobalItem.Rarity9BuyPrice; - Item.rare = ItemRarityID.Cyan; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.Rainbow; + Item.rare = ModContent.RarityType(); } public override bool CanEquipAccessory(Player player, int slot, bool modded) diff --git a/Items/Accessories/MagicLevelMeter.cs b/Items/Accessories/MagicLevelMeter.cs index 39f04106b1..1c542f155b 100644 --- a/Items/Accessories/MagicLevelMeter.cs +++ b/Items/Accessories/MagicLevelMeter.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Items.Accessories { Item.width = 26; Item.height = 26; - Item.value = Item.buyPrice(0, 6, 0, 0); - Item.rare = ItemRarityID.Blue; + Item.value = CalamityGlobalItem.Rarity3BuyPrice; + Item.rare = ItemRarityID.Orange; Item.accessory = true; } diff --git a/Items/Accessories/MeleeLevelMeter.cs b/Items/Accessories/MeleeLevelMeter.cs index aa0307bf2c..f05a33e53c 100644 --- a/Items/Accessories/MeleeLevelMeter.cs +++ b/Items/Accessories/MeleeLevelMeter.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Items.Accessories { Item.width = 26; Item.height = 26; - Item.value = Item.buyPrice(0, 6, 0, 0); - Item.rare = ItemRarityID.Blue; + Item.value = CalamityGlobalItem.Rarity3BuyPrice; + Item.rare = ItemRarityID.Orange; Item.accessory = true; } diff --git a/Items/Accessories/MutatedTruffle.cs b/Items/Accessories/MutatedTruffle.cs index a3d3307eb3..12c32f8655 100644 --- a/Items/Accessories/MutatedTruffle.cs +++ b/Items/Accessories/MutatedTruffle.cs @@ -1,10 +1,11 @@ using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; -using Terraria.ModLoader; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { @@ -23,8 +24,7 @@ namespace CalamityMod.Items.Accessories Item.width = 24; Item.height = 26; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); Item.accessory = true; } diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index 6dd3df1438..df5c44f88b 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using System.Collections.Generic; using Terraria; @@ -31,7 +32,7 @@ namespace CalamityMod.Items.Accessories Item.height = 46; Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void ModifyTooltips(List list) diff --git a/Items/Accessories/NebulousCore.cs b/Items/Accessories/NebulousCore.cs index 079c1a41fe..916ccc014b 100644 --- a/Items/Accessories/NebulousCore.cs +++ b/Items/Accessories/NebulousCore.cs @@ -1,9 +1,10 @@ using CalamityMod.CalPlayer; using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; -using Terraria.ModLoader; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { @@ -25,8 +26,7 @@ namespace CalamityMod.Items.Accessories Item.height = 14; Item.accessory = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Accessories/Nucleogenesis.cs b/Items/Accessories/Nucleogenesis.cs index 8784593dc0..765987db2e 100644 --- a/Items/Accessories/Nucleogenesis.cs +++ b/Items/Accessories/Nucleogenesis.cs @@ -2,6 +2,7 @@ using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Accessories Item.height = 32; Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/OccultSkullCrown.cs b/Items/Accessories/OccultSkullCrown.cs index 45f86082b7..1d468aa568 100644 --- a/Items/Accessories/OccultSkullCrown.cs +++ b/Items/Accessories/OccultSkullCrown.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -35,8 +36,7 @@ namespace CalamityMod.Items.Accessories Item.width = 82; Item.height = 62; Item.defense = 5; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.accessory = true; } diff --git a/Items/Accessories/OldDukeScales.cs b/Items/Accessories/OldDukeScales.cs index 24496581bc..0900d30fa2 100644 --- a/Items/Accessories/OldDukeScales.cs +++ b/Items/Accessories/OldDukeScales.cs @@ -1,4 +1,5 @@ using CalamityMod.CalPlayer; +using CalamityMod.Rarities; using Terraria; using Terraria.ModLoader; @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Accessories Item.height = 26; Item.accessory = true; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/PhantomicArtifact.cs b/Items/Accessories/PhantomicArtifact.cs index eef1f764a8..005f83ddec 100644 --- a/Items/Accessories/PhantomicArtifact.cs +++ b/Items/Accessories/PhantomicArtifact.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -27,8 +28,7 @@ namespace CalamityMod.Items.Accessories Item.width = 50; Item.height = 40; Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.accessory = true; } diff --git a/Items/Accessories/ProfanedSoulArtifact.cs b/Items/Accessories/ProfanedSoulArtifact.cs index 32ede2d1d7..8cfcace48e 100644 --- a/Items/Accessories/ProfanedSoulArtifact.cs +++ b/Items/Accessories/ProfanedSoulArtifact.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Plates; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -30,7 +31,7 @@ namespace CalamityMod.Items.Accessories Item.height = 40; Item.accessory = true; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Accessories/ProfanedSoulCrystal.cs b/Items/Accessories/ProfanedSoulCrystal.cs index 3c8f97d2de..c42540c4a2 100644 --- a/Items/Accessories/ProfanedSoulCrystal.cs +++ b/Items/Accessories/ProfanedSoulCrystal.cs @@ -1,16 +1,17 @@ -using CalamityMod.CalPlayer; +using CalamityMod.Buffs.StatBuffs; +using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System.Collections.Generic; +using System.Linq; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; -using System.Linq; -using CalamityMod.Buffs.StatBuffs; namespace CalamityMod.Items.Accessories { @@ -65,7 +66,7 @@ namespace CalamityMod.Items.Accessories Item.height = 50; Item.accessory = true; Item.value = CalamityGlobalItem.RarityHotPinkBuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Accessories/QuiverofNihility.cs b/Items/Accessories/QuiverofNihility.cs index a109806666..dbbc5154b5 100644 --- a/Items/Accessories/QuiverofNihility.cs +++ b/Items/Accessories/QuiverofNihility.cs @@ -1,10 +1,11 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; -using Terraria.ModLoader; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Accessories Item.width = 42; Item.height = 36; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.accessory = true; } diff --git a/Items/Accessories/RampartofDeities.cs b/Items/Accessories/RampartofDeities.cs index bfd1106607..766cf9c53f 100644 --- a/Items/Accessories/RampartofDeities.cs +++ b/Items/Accessories/RampartofDeities.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using System; using Terraria; @@ -30,7 +31,7 @@ namespace CalamityMod.Items.Accessories Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 18; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/RangedLevelMeter.cs b/Items/Accessories/RangedLevelMeter.cs index f02888fe21..08c3f75b09 100644 --- a/Items/Accessories/RangedLevelMeter.cs +++ b/Items/Accessories/RangedLevelMeter.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Items.Accessories { Item.width = 26; Item.height = 26; - Item.value = Item.buyPrice(0, 6, 0, 0); - Item.rare = ItemRarityID.Blue; + Item.value = CalamityGlobalItem.Rarity3BuyPrice; + Item.rare = ItemRarityID.Orange; Item.accessory = true; } diff --git a/Items/Accessories/ReaperToothNecklace.cs b/Items/Accessories/ReaperToothNecklace.cs index 3136229d9c..ee4f92850c 100644 --- a/Items/Accessories/ReaperToothNecklace.cs +++ b/Items/Accessories/ReaperToothNecklace.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Accessories Item.height = 50; Item.accessory = true; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/RogueLevelMeter.cs b/Items/Accessories/RogueLevelMeter.cs index 057bfa077c..b51e7b1355 100644 --- a/Items/Accessories/RogueLevelMeter.cs +++ b/Items/Accessories/RogueLevelMeter.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Items.Accessories { Item.width = 26; Item.height = 26; - Item.value = Item.buyPrice(0, 6, 0, 0); - Item.rare = ItemRarityID.Blue; + Item.value = CalamityGlobalItem.Rarity3BuyPrice; + Item.rare = ItemRarityID.Orange; Item.accessory = true; } diff --git a/Items/Accessories/ShatteredCommunity.cs b/Items/Accessories/ShatteredCommunity.cs index 928def8ab7..236285c32e 100644 --- a/Items/Accessories/ShatteredCommunity.cs +++ b/Items/Accessories/ShatteredCommunity.cs @@ -1,10 +1,11 @@ -using System.Collections.Generic; +using CalamityMod.CalPlayer; +using CalamityMod.Rarities; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; -using CalamityMod.CalPlayer; -using CalamityMod.World; -using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -57,8 +58,7 @@ namespace CalamityMod.Items.Accessories Item.height = 20; Item.accessory = true; Item.value = CalamityGlobalItem.RarityHotPinkBuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Accessories/SpectralVeil.cs b/Items/Accessories/SpectralVeil.cs index e80e23d6ad..f83ab1d297 100644 --- a/Items/Accessories/SpectralVeil.cs +++ b/Items/Accessories/SpectralVeil.cs @@ -1,8 +1,9 @@ -using System.Collections.Generic; +using CalamityMod.Rarities; +using System.Collections.Generic; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Linq; namespace CalamityMod.Items.Accessories { @@ -25,8 +26,7 @@ namespace CalamityMod.Items.Accessories Item.width = 30; Item.height = 38; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.accessory = true; } diff --git a/Items/Accessories/StatMeter.cs b/Items/Accessories/StatMeter.cs index 9eb14285b2..22a0ac5500 100644 --- a/Items/Accessories/StatMeter.cs +++ b/Items/Accessories/StatMeter.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.Accessories { Item.width = 26; Item.height = 26; - Item.value = Item.buyPrice(0, 6, 0, 0); - Item.rare = ItemRarityID.Blue; + Item.value = CalamityGlobalItem.Rarity3BuyPrice; + Item.rare = ItemRarityID.Orange; } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Accessories/StatisVoidSash.cs b/Items/Accessories/StatisVoidSash.cs index a3176b6894..6d408fe3e2 100644 --- a/Items/Accessories/StatisVoidSash.cs +++ b/Items/Accessories/StatisVoidSash.cs @@ -1,11 +1,12 @@ using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer.Dashes; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.DataStructures; -using Terraria.ModLoader; -using CalamityMod.CalPlayer.Dashes; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Accessories Item.height = 32; Item.accessory = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/SummonLevelMeter.cs b/Items/Accessories/SummonLevelMeter.cs index 224fc0a570..9851e4fa01 100644 --- a/Items/Accessories/SummonLevelMeter.cs +++ b/Items/Accessories/SummonLevelMeter.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Items.Accessories { Item.width = 26; Item.height = 26; - Item.value = Item.buyPrice(0, 6, 0, 0); - Item.rare = ItemRarityID.Blue; + Item.value = CalamityGlobalItem.Rarity3BuyPrice; + Item.rare = ItemRarityID.Orange; Item.accessory = true; } diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs index ea876ca9d8..7cfa78bfaf 100644 --- a/Items/Accessories/TheAmalgam.cs +++ b/Items/Accessories/TheAmalgam.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.DataStructures; @@ -32,8 +33,7 @@ namespace CalamityMod.Items.Accessories Item.height = 34; Item.accessory = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/TheCommunity.cs b/Items/Accessories/TheCommunity.cs index 54288e7eba..a3ea91fab6 100644 --- a/Items/Accessories/TheCommunity.cs +++ b/Items/Accessories/TheCommunity.cs @@ -1,11 +1,12 @@ -using System.Collections.Generic; -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using System.Linq; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Microsoft.Xna.Framework; -using System.Linq; namespace CalamityMod.Items.Accessories { @@ -29,9 +30,8 @@ namespace CalamityMod.Items.Accessories Item.width = 34; Item.height = 64; Item.value = CalamityGlobalItem.Rarity7BuyPrice; - Item.rare = ItemRarityID.Lime; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.Rainbow; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/TheEvolution.cs b/Items/Accessories/TheEvolution.cs index 92ca601188..be7b32e180 100644 --- a/Items/Accessories/TheEvolution.cs +++ b/Items/Accessories/TheEvolution.cs @@ -1,4 +1,5 @@ using CalamityMod.CalPlayer; +using CalamityMod.Rarities; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -26,8 +27,7 @@ namespace CalamityMod.Items.Accessories Item.width = 58; Item.height = 44; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); Item.accessory = true; } diff --git a/Items/Accessories/TheSponge.cs b/Items/Accessories/TheSponge.cs index 15b1f2c1aa..5f7172d754 100644 --- a/Items/Accessories/TheSponge.cs +++ b/Items/Accessories/TheSponge.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -40,7 +41,7 @@ namespace CalamityMod.Items.Accessories Item.height = 20; Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/ThiefsDime.cs b/Items/Accessories/ThiefsDime.cs index c18308de06..4dcbe6fcfe 100644 --- a/Items/Accessories/ThiefsDime.cs +++ b/Items/Accessories/ThiefsDime.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories { Item.width = 20; Item.height = 20; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.accessory = true; } diff --git a/Items/Accessories/VeneratedLocket.cs b/Items/Accessories/VeneratedLocket.cs index 8fd99d12f3..70a895df70 100644 --- a/Items/Accessories/VeneratedLocket.cs +++ b/Items/Accessories/VeneratedLocket.cs @@ -1,6 +1,7 @@ -using Terraria; -using Terraria.ModLoader; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Accessories Item.width = 34; Item.height = 36; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.accessory = true; } diff --git a/Items/Accessories/VoltaicJelly.cs b/Items/Accessories/VoltaicJelly.cs index 9916a493bc..50f4bd432b 100644 --- a/Items/Accessories/VoltaicJelly.cs +++ b/Items/Accessories/VoltaicJelly.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories { Item.width = 20; Item.height = 22; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.accessory = true; Item.rare = ItemRarityID.Green; } diff --git a/Items/Accessories/Wings/CelestialTracers.cs b/Items/Accessories/Wings/CelestialTracers.cs index b38cd3ed7d..4cc95f09f5 100644 --- a/Items/Accessories/Wings/CelestialTracers.cs +++ b/Items/Accessories/Wings/CelestialTracers.cs @@ -1,12 +1,13 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; -using Terraria.ID; -using Terraria.Graphics.Shaders; -using Terraria.ModLoader; using Terraria.DataStructures; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Accessories.Wings { @@ -38,7 +39,7 @@ namespace CalamityMod.Items.Accessories.Wings Item.height = 32; Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/Wings/DrewsWings.cs b/Items/Accessories/Wings/DrewsWings.cs index 976d59d34b..89eabbda78 100644 --- a/Items/Accessories/Wings/DrewsWings.cs +++ b/Items/Accessories/Wings/DrewsWings.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.Graphics.Shaders; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.Accessories.Wings Item.width = 22; Item.height = 20; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.accessory = true; } diff --git a/Items/Accessories/Wings/ElysianTracers.cs b/Items/Accessories/Wings/ElysianTracers.cs index 4215045b72..304469c9b5 100644 --- a/Items/Accessories/Wings/ElysianTracers.cs +++ b/Items/Accessories/Wings/ElysianTracers.cs @@ -1,10 +1,11 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; -using Terraria.ID; using Terraria.Graphics.Shaders; +using Terraria.ID; using Terraria.ModLoader; using Terraria.DataStructures; @@ -37,7 +38,7 @@ namespace CalamityMod.Items.Accessories.Wings Item.height = 32; Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/Wings/ElysianWings.cs b/Items/Accessories/Wings/ElysianWings.cs index 66dda29562..3743c75dda 100644 --- a/Items/Accessories/Wings/ElysianWings.cs +++ b/Items/Accessories/Wings/ElysianWings.cs @@ -1,4 +1,5 @@ using CalamityMod.CalPlayer; +using CalamityMod.Rarities; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -27,8 +28,7 @@ namespace CalamityMod.Items.Accessories.Wings Item.width = 36; Item.height = 32; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.accessory = true; } diff --git a/Items/Accessories/Wings/SilvaWings.cs b/Items/Accessories/Wings/SilvaWings.cs index 407965be72..c2e285894d 100644 --- a/Items/Accessories/Wings/SilvaWings.cs +++ b/Items/Accessories/Wings/SilvaWings.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Armor.Silva; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; @@ -31,9 +32,8 @@ namespace CalamityMod.Items.Accessories.Wings { Item.width = 22; Item.height = 20; - Item.rare = ItemRarityID.Purple; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.accessory = true; } diff --git a/Items/Accessories/Wings/TarragonWings.cs b/Items/Accessories/Wings/TarragonWings.cs index 628bd951ef..1953b549ca 100644 --- a/Items/Accessories/Wings/TarragonWings.cs +++ b/Items/Accessories/Wings/TarragonWings.cs @@ -1,6 +1,7 @@ using CalamityMod.Dusts; using CalamityMod.Items.Armor.Tarragon; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -30,9 +31,8 @@ namespace CalamityMod.Items.Accessories.Wings { Item.width = 22; Item.height = 20; - Item.rare = ItemRarityID.Purple; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.accessory = true; } diff --git a/Items/Accessories/WulfrumAcrobaticsPack.cs b/Items/Accessories/WulfrumAcrobaticsPack.cs index 52403a84a4..79739a2f68 100644 --- a/Items/Accessories/WulfrumAcrobaticsPack.cs +++ b/Items/Accessories/WulfrumAcrobaticsPack.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Accessories { Item.width = 20; Item.height = 22; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.accessory = true; Item.rare = ItemRarityID.Blue; } diff --git a/Items/Accessories/WulfrumBattery.cs b/Items/Accessories/WulfrumBattery.cs index e51f98ef56..4bd28a1464 100644 --- a/Items/Accessories/WulfrumBattery.cs +++ b/Items/Accessories/WulfrumBattery.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories { Item.width = 20; Item.height = 22; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.accessory = true; Item.rare = ItemRarityID.Blue; diff --git a/Items/Accessories/YharimsGift.cs b/Items/Accessories/YharimsGift.cs index 3afc5c4ed3..7029d6585e 100644 --- a/Items/Accessories/YharimsGift.cs +++ b/Items/Accessories/YharimsGift.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -28,8 +29,7 @@ namespace CalamityMod.Items.Accessories Item.height = 22; Item.accessory = true; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/YharimsInsignia.cs b/Items/Accessories/YharimsInsignia.cs index 8f9a9f76ed..7703adcab0 100644 --- a/Items/Accessories/YharimsInsignia.cs +++ b/Items/Accessories/YharimsInsignia.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -24,10 +25,9 @@ namespace CalamityMod.Items.Accessories { Item.width = 22; Item.height = 38; - Item.rare = ItemRarityID.Purple; Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.accessory = true; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Ammo/BloodRune.cs b/Items/Ammo/BloodRune.cs index 6d4ca62387..e24096da97 100644 --- a/Items/Ammo/BloodRune.cs +++ b/Items/Ammo/BloodRune.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Terraria; using Terraria.ModLoader; @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Ammo Item.consumable = true; Item.knockBack = 10f; Item.value = Item.buyPrice(gold: 1); - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 0f; diff --git a/Items/Ammo/BloodfireArrow.cs b/Items/Ammo/BloodfireArrow.cs index 6292c61ca2..72886ea6c0 100644 --- a/Items/Ammo/BloodfireArrow.cs +++ b/Items/Ammo/BloodfireArrow.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -25,8 +26,7 @@ namespace CalamityMod.Items.Ammo Item.consumable = true; Item.knockBack = 3.5f; Item.value = Item.sellPrice(copper: 24); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; Item.ammo = AmmoID.Arrow; diff --git a/Items/Ammo/BloodfireBullet.cs b/Items/Ammo/BloodfireBullet.cs index 0194e1af37..ad128e79d5 100644 --- a/Items/Ammo/BloodfireBullet.cs +++ b/Items/Ammo/BloodfireBullet.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -25,8 +26,7 @@ namespace CalamityMod.Items.Ammo Item.consumable = true; Item.knockBack = 4.5f; Item.value = Item.sellPrice(copper: 24); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 4.8f; Item.ammo = ItemID.MusketBall; diff --git a/Items/Ammo/GodSlayerSlug.cs b/Items/Ammo/GodSlayerSlug.cs index b2120a439b..199ab45947 100644 --- a/Items/Ammo/GodSlayerSlug.cs +++ b/Items/Ammo/GodSlayerSlug.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -28,8 +29,7 @@ namespace CalamityMod.Items.Ammo Item.consumable = true; Item.knockBack = 3f; Item.value = Item.sellPrice(copper: 28); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; Item.ammo = ItemID.MusketBall; diff --git a/Items/Ammo/MortarRound.cs b/Items/Ammo/MortarRound.cs index 1edc29fd95..ab9e2432d2 100644 --- a/Items/Ammo/MortarRound.cs +++ b/Items/Ammo/MortarRound.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -26,7 +27,7 @@ namespace CalamityMod.Items.Ammo Item.consumable = true; Item.knockBack = 7.5f; Item.value = Item.sellPrice(copper: 20); - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.ammo = AmmoID.Bullet; Item.shoot = ModContent.ProjectileType(); } diff --git a/Items/Ammo/RubberMortarRound.cs b/Items/Ammo/RubberMortarRound.cs index 15093dabea..5e7bb5d2a6 100644 --- a/Items/Ammo/RubberMortarRound.cs +++ b/Items/Ammo/RubberMortarRound.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -26,7 +27,7 @@ namespace CalamityMod.Items.Ammo Item.consumable = true; Item.knockBack = 7.5f; Item.value = Item.sellPrice(copper: 20); - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.ammo = AmmoID.Bullet; Item.shoot = ModContent.ProjectileType(); } diff --git a/Items/Ammo/VanquisherArrow.cs b/Items/Ammo/VanquisherArrow.cs index 612516465c..b2cde7ebce 100644 --- a/Items/Ammo/VanquisherArrow.cs +++ b/Items/Ammo/VanquisherArrow.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Ammo Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; Item.ammo = AmmoID.Arrow; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Armor/Aerospec/AerospecBreastplate.cs b/Items/Armor/Aerospec/AerospecBreastplate.cs index 88fe5f61d7..862d59bf9d 100644 --- a/Items/Armor/Aerospec/AerospecBreastplate.cs +++ b/Items/Armor/Aerospec/AerospecBreastplate.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor.Aerospec { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.defense = 7; } diff --git a/Items/Armor/Aerospec/AerospecHat.cs b/Items/Armor/Aerospec/AerospecHat.cs index 47c78e2456..d7bd845968 100644 --- a/Items/Armor/Aerospec/AerospecHat.cs +++ b/Items/Armor/Aerospec/AerospecHat.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.Aerospec { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 5, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.defense = 3; //15 } diff --git a/Items/Armor/Aerospec/AerospecHeadgear.cs b/Items/Armor/Aerospec/AerospecHeadgear.cs index be7d643357..e6b3d249d7 100644 --- a/Items/Armor/Aerospec/AerospecHeadgear.cs +++ b/Items/Armor/Aerospec/AerospecHeadgear.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor.Aerospec { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 5, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.defense = 4; //17 } diff --git a/Items/Armor/Aerospec/AerospecHelm.cs b/Items/Armor/Aerospec/AerospecHelm.cs index 55bd7fe9f1..bb931db546 100644 --- a/Items/Armor/Aerospec/AerospecHelm.cs +++ b/Items/Armor/Aerospec/AerospecHelm.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.Aerospec { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 5, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.defense = 7; //20 } diff --git a/Items/Armor/Aerospec/AerospecHelmet.cs b/Items/Armor/Aerospec/AerospecHelmet.cs index 2e096a1231..3f3cc0d646 100644 --- a/Items/Armor/Aerospec/AerospecHelmet.cs +++ b/Items/Armor/Aerospec/AerospecHelmet.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.Aerospec { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 5, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.defense = 2; //13 } diff --git a/Items/Armor/Aerospec/AerospecHood.cs b/Items/Armor/Aerospec/AerospecHood.cs index ff9116a1d5..903ea84e52 100644 --- a/Items/Armor/Aerospec/AerospecHood.cs +++ b/Items/Armor/Aerospec/AerospecHood.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.Aerospec { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 5, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.defense = 5; //18 } diff --git a/Items/Armor/Aerospec/AerospecLeggings.cs b/Items/Armor/Aerospec/AerospecLeggings.cs index 147506a48c..054fcd1760 100644 --- a/Items/Armor/Aerospec/AerospecLeggings.cs +++ b/Items/Armor/Aerospec/AerospecLeggings.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor.Aerospec { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 3, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.defense = 6; } diff --git a/Items/Armor/Astral/AstralBreastplate.cs b/Items/Armor/Astral/AstralBreastplate.cs index abfb8fcf09..c1ef0b823b 100644 --- a/Items/Armor/Astral/AstralBreastplate.cs +++ b/Items/Armor/Astral/AstralBreastplate.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.Astral { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 32, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.defense = 25; } diff --git a/Items/Armor/Astral/AstralHelm.cs b/Items/Armor/Astral/AstralHelm.cs index b1afd3efdf..6b9027c9ff 100644 --- a/Items/Armor/Astral/AstralHelm.cs +++ b/Items/Armor/Astral/AstralHelm.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.Astral { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 40, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.defense = 17; //63 } diff --git a/Items/Armor/Astral/AstralLeggings.cs b/Items/Armor/Astral/AstralLeggings.cs index 6386243624..619a4c0614 100644 --- a/Items/Armor/Astral/AstralLeggings.cs +++ b/Items/Armor/Astral/AstralLeggings.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.Astral { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 24, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.defense = 21; } diff --git a/Items/Armor/Auric/AuricTeslaBodyArmor.cs b/Items/Armor/Auric/AuricTeslaBodyArmor.cs index baff093e1c..7fa9e6fcc1 100644 --- a/Items/Armor/Auric/AuricTeslaBodyArmor.cs +++ b/Items/Armor/Auric/AuricTeslaBodyArmor.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; @@ -38,9 +39,9 @@ namespace CalamityMod.Items.Armor.Auric { Item.width = 38; Item.height = 34; - Item.value = Item.buyPrice(1, 44, 0, 0); + Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.defense = 48; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Auric/AuricTeslaCuisses.cs b/Items/Armor/Auric/AuricTeslaCuisses.cs index 3f6e73aca1..cea753b42d 100644 --- a/Items/Armor/Auric/AuricTeslaCuisses.cs +++ b/Items/Armor/Auric/AuricTeslaCuisses.cs @@ -3,6 +3,7 @@ using CalamityMod.Items.Armor.GodSlayer; using CalamityMod.Items.Armor.Silva; using CalamityMod.Items.Armor.Tarragon; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -26,9 +27,9 @@ namespace CalamityMod.Items.Armor.Auric { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(1, 8, 0, 0); + Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.defense = 44; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Auric/AuricTeslaHoodedFacemask.cs b/Items/Armor/Auric/AuricTeslaHoodedFacemask.cs index 5716c4b49c..38a21e90df 100644 --- a/Items/Armor/Auric/AuricTeslaHoodedFacemask.cs +++ b/Items/Armor/Auric/AuricTeslaHoodedFacemask.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; @@ -25,9 +26,9 @@ namespace CalamityMod.Items.Armor.Auric { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(1, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.defense = 40; //132 - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Auric/AuricTeslaPlumedHelm.cs b/Items/Armor/Auric/AuricTeslaPlumedHelm.cs index 0c98451418..106f0144f0 100644 --- a/Items/Armor/Auric/AuricTeslaPlumedHelm.cs +++ b/Items/Armor/Auric/AuricTeslaPlumedHelm.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; @@ -24,9 +25,9 @@ namespace CalamityMod.Items.Armor.Auric { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(1, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.defense = 34; //132 - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Auric/AuricTeslaRoyalHelm.cs b/Items/Armor/Auric/AuricTeslaRoyalHelm.cs index 0c9927a91d..b6c33a061e 100644 --- a/Items/Armor/Auric/AuricTeslaRoyalHelm.cs +++ b/Items/Armor/Auric/AuricTeslaRoyalHelm.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; @@ -26,9 +27,9 @@ namespace CalamityMod.Items.Armor.Auric { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(1, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.defense = 54; //132 - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Auric/AuricTeslaSpaceHelmet.cs b/Items/Armor/Auric/AuricTeslaSpaceHelmet.cs index 66964167f6..4a20f72592 100644 --- a/Items/Armor/Auric/AuricTeslaSpaceHelmet.cs +++ b/Items/Armor/Auric/AuricTeslaSpaceHelmet.cs @@ -6,6 +6,7 @@ using CalamityMod.Items.Armor.Silva; using CalamityMod.Items.Armor.Tarragon; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; @@ -26,9 +27,9 @@ namespace CalamityMod.Items.Armor.Auric { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(1, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.defense = 12; //132 - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs b/Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs index 7e0f17ba02..97a6d30993 100644 --- a/Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs +++ b/Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Armor.Bloodflare; using CalamityMod.Items.Armor.Silva; using CalamityMod.Items.Armor.Tarragon; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; @@ -24,9 +25,9 @@ namespace CalamityMod.Items.Armor.Auric { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(1, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.defense = 24; //132 - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Bloodflare/BloodflareBodyArmor.cs b/Items/Armor/Bloodflare/BloodflareBodyArmor.cs index d5444cef65..2f362f4701 100644 --- a/Items/Armor/Bloodflare/BloodflareBodyArmor.cs +++ b/Items/Armor/Bloodflare/BloodflareBodyArmor.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -20,9 +21,9 @@ namespace CalamityMod.Items.Armor.Bloodflare { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 48, 0, 0); + Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.defense = 35; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Bloodflare/BloodflareCuisses.cs b/Items/Armor/Bloodflare/BloodflareCuisses.cs index d3484f877e..3bab91f108 100644 --- a/Items/Armor/Bloodflare/BloodflareCuisses.cs +++ b/Items/Armor/Bloodflare/BloodflareCuisses.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -19,9 +20,9 @@ namespace CalamityMod.Items.Armor.Bloodflare { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.defense = 29; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Bloodflare/BloodflareHeadMagic.cs b/Items/Armor/Bloodflare/BloodflareHeadMagic.cs index ce1e720e96..d4814db344 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadMagic.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadMagic.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,9 +23,9 @@ namespace CalamityMod.Items.Armor.Bloodflare { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.defense = 22; //85 - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Bloodflare/BloodflareHeadMelee.cs b/Items/Armor/Bloodflare/BloodflareHeadMelee.cs index 82e4f87fab..8de74fdb5d 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadMelee.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadMelee.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,9 +23,9 @@ namespace CalamityMod.Items.Armor.Bloodflare { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.defense = 49; //85 - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Bloodflare/BloodflareHeadRanged.cs b/Items/Armor/Bloodflare/BloodflareHeadRanged.cs index 700ab532d4..47b243f925 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadRanged.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadRanged.cs @@ -1,9 +1,10 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Armor.Bloodflare { @@ -25,9 +26,9 @@ namespace CalamityMod.Items.Armor.Bloodflare { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.defense = 34; //85 - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs index f7a7991e5c..524feb0257 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,9 +23,9 @@ namespace CalamityMod.Items.Armor.Bloodflare { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.defense = 28; //85 - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Bloodflare/BloodflareHeadSummon.cs b/Items/Armor/Bloodflare/BloodflareHeadSummon.cs index 8521a2effc..34e02c5211 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadSummon.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadSummon.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,9 +23,9 @@ namespace CalamityMod.Items.Armor.Bloodflare { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.defense = 16; //85 - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Brimflame/BrimflameBoots.cs b/Items/Armor/Brimflame/BrimflameBoots.cs index e4d4ccbffa..342d268a7b 100644 --- a/Items/Armor/Brimflame/BrimflameBoots.cs +++ b/Items/Armor/Brimflame/BrimflameBoots.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.Brimflame { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 15; } diff --git a/Items/Armor/Brimflame/BrimflameRobes.cs b/Items/Armor/Brimflame/BrimflameRobes.cs index d4cca307d3..be9b03a493 100644 --- a/Items/Armor/Brimflame/BrimflameRobes.cs +++ b/Items/Armor/Brimflame/BrimflameRobes.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor.Brimflame { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 15; } diff --git a/Items/Armor/Brimflame/BrimflameScowl.cs b/Items/Armor/Brimflame/BrimflameScowl.cs index c4d1366b3c..023a2f0c71 100644 --- a/Items/Armor/Brimflame/BrimflameScowl.cs +++ b/Items/Armor/Brimflame/BrimflameScowl.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Armor.Brimflame { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 11; } diff --git a/Items/Armor/CirrusDress.cs b/Items/Armor/CirrusDress.cs index 2dad0edb28..3658b179d9 100644 --- a/Items/Armor/CirrusDress.cs +++ b/Items/Armor/CirrusDress.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -40,7 +41,7 @@ namespace CalamityMod.Items.Armor Item.width = 18; Item.height = 18; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.defense = 8; } diff --git a/Items/Armor/Daedalus/DaedalusBreastplate.cs b/Items/Armor/Daedalus/DaedalusBreastplate.cs index 4c7578ce1c..9e0d2b3f0d 100644 --- a/Items/Armor/Daedalus/DaedalusBreastplate.cs +++ b/Items/Armor/Daedalus/DaedalusBreastplate.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Armor.Daedalus { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 20, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.defense = 19; //41 } diff --git a/Items/Armor/Daedalus/DaedalusHeadMagic.cs b/Items/Armor/Daedalus/DaedalusHeadMagic.cs index 272d62fc23..1eaad669f9 100644 --- a/Items/Armor/Daedalus/DaedalusHeadMagic.cs +++ b/Items/Armor/Daedalus/DaedalusHeadMagic.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.Daedalus { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 25, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.defense = 5; //35 } diff --git a/Items/Armor/Daedalus/DaedalusHeadMelee.cs b/Items/Armor/Daedalus/DaedalusHeadMelee.cs index c2fb0c053d..72f5854a49 100644 --- a/Items/Armor/Daedalus/DaedalusHeadMelee.cs +++ b/Items/Armor/Daedalus/DaedalusHeadMelee.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.Daedalus { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 25, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.defense = 21; //51 } diff --git a/Items/Armor/Daedalus/DaedalusHeadRanged.cs b/Items/Armor/Daedalus/DaedalusHeadRanged.cs index b799e2c048..f29e8c3b2c 100644 --- a/Items/Armor/Daedalus/DaedalusHeadRanged.cs +++ b/Items/Armor/Daedalus/DaedalusHeadRanged.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.Daedalus { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 25, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.defense = 9; //39 } diff --git a/Items/Armor/Daedalus/DaedalusHeadRogue.cs b/Items/Armor/Daedalus/DaedalusHeadRogue.cs index ca730fb6a3..52aaab8064 100644 --- a/Items/Armor/Daedalus/DaedalusHeadRogue.cs +++ b/Items/Armor/Daedalus/DaedalusHeadRogue.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.Daedalus { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 25, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.defense = 7; //37 } diff --git a/Items/Armor/Daedalus/DaedalusHeadSummon.cs b/Items/Armor/Daedalus/DaedalusHeadSummon.cs index 1575da3fc0..64e9a0ab48 100644 --- a/Items/Armor/Daedalus/DaedalusHeadSummon.cs +++ b/Items/Armor/Daedalus/DaedalusHeadSummon.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor.Daedalus { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 25, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.defense = 3; //33 } diff --git a/Items/Armor/Daedalus/DaedalusLeggings.cs b/Items/Armor/Daedalus/DaedalusLeggings.cs index 07bd2b02c4..99045d726c 100644 --- a/Items/Armor/Daedalus/DaedalusLeggings.cs +++ b/Items/Armor/Daedalus/DaedalusLeggings.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.Daedalus { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 15, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.defense = 15; //41 } diff --git a/Items/Armor/Demonshade/DemonshadeBreastplate.cs b/Items/Armor/Demonshade/DemonshadeBreastplate.cs index 0f6c5940a1..0f3f9dbd74 100644 --- a/Items/Armor/Demonshade/DemonshadeBreastplate.cs +++ b/Items/Armor/Demonshade/DemonshadeBreastplate.cs @@ -1,9 +1,10 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; -using Terraria.ModLoader; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Demonshade { @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Armor.Demonshade Item.height = 18; Item.defense = 50; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Armor/Demonshade/DemonshadeGreaves.cs b/Items/Armor/Demonshade/DemonshadeGreaves.cs index ad8f1d57f1..5bfdc706f9 100644 --- a/Items/Armor/Demonshade/DemonshadeGreaves.cs +++ b/Items/Armor/Demonshade/DemonshadeGreaves.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Armor.Demonshade Item.defense = 50; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Armor/Demonshade/DemonshadeHelm.cs b/Items/Armor/Demonshade/DemonshadeHelm.cs index 97c2e9afcd..734bde4a84 100644 --- a/Items/Armor/Demonshade/DemonshadeHelm.cs +++ b/Items/Armor/Demonshade/DemonshadeHelm.cs @@ -2,12 +2,13 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ModLoader; using Terraria.DataStructures; -using Terraria.Audio; namespace CalamityMod.Items.Armor.Demonshade { @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Armor.Demonshade Item.height = 18; Item.defense = 50; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Armor/Empyrean/EmpyreanCloak.cs b/Items/Armor/Empyrean/EmpyreanCloak.cs index 85ddf261c0..908d4c23fa 100644 --- a/Items/Armor/Empyrean/EmpyreanCloak.cs +++ b/Items/Armor/Empyrean/EmpyreanCloak.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor.Empyrean { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 32, 0, 0); + Item.value = CalamityGlobalItem.Rarity10BuyPrice; Item.rare = ItemRarityID.Red; Item.defense = 27; } diff --git a/Items/Armor/Empyrean/EmpyreanCuisses.cs b/Items/Armor/Empyrean/EmpyreanCuisses.cs index fb40758062..1f433933f5 100644 --- a/Items/Armor/Empyrean/EmpyreanCuisses.cs +++ b/Items/Armor/Empyrean/EmpyreanCuisses.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor.Empyrean { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 24, 0, 0); + Item.value = CalamityGlobalItem.Rarity10BuyPrice; Item.rare = ItemRarityID.Red; Item.defense = 24; } diff --git a/Items/Armor/Empyrean/EmpyreanMask.cs b/Items/Armor/Empyrean/EmpyreanMask.cs index 88bcee5ce9..fe9be6cbad 100644 --- a/Items/Armor/Empyrean/EmpyreanMask.cs +++ b/Items/Armor/Empyrean/EmpyreanMask.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Armor.Empyrean { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 40, 0, 0); + Item.value = CalamityGlobalItem.Rarity10BuyPrice; Item.rare = ItemRarityID.Red; Item.defense = 20; //71 } diff --git a/Items/Armor/FathomSwarmer/FathomSwarmerBoots.cs b/Items/Armor/FathomSwarmer/FathomSwarmerBoots.cs index c8afee78ff..fd915b5a80 100644 --- a/Items/Armor/FathomSwarmer/FathomSwarmerBoots.cs +++ b/Items/Armor/FathomSwarmer/FathomSwarmerBoots.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.FathomSwarmer { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 18, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 15; } diff --git a/Items/Armor/FathomSwarmer/FathomSwarmerBreastplate.cs b/Items/Armor/FathomSwarmer/FathomSwarmerBreastplate.cs index c2fabd387b..0e428bfa3e 100644 --- a/Items/Armor/FathomSwarmer/FathomSwarmerBreastplate.cs +++ b/Items/Armor/FathomSwarmer/FathomSwarmerBreastplate.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Armor.FathomSwarmer { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 24, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 22; } diff --git a/Items/Armor/FathomSwarmer/FathomSwarmerVisage.cs b/Items/Armor/FathomSwarmer/FathomSwarmerVisage.cs index 3d7d23307f..783703bf07 100644 --- a/Items/Armor/FathomSwarmer/FathomSwarmerVisage.cs +++ b/Items/Armor/FathomSwarmer/FathomSwarmerVisage.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.FathomSwarmer { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 30, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 10; //47 +10 underwater } diff --git a/Items/Armor/Fearmonger/FearmongerGreathelm.cs b/Items/Armor/Fearmonger/FearmongerGreathelm.cs index 47a04ab9a1..3bddaafe79 100644 --- a/Items/Armor/Fearmonger/FearmongerGreathelm.cs +++ b/Items/Armor/Fearmonger/FearmongerGreathelm.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -24,9 +25,9 @@ namespace CalamityMod.Items.Armor.Fearmonger { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(gold: 75); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 38; // 132 total - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Fearmonger/FearmongerGreaves.cs b/Items/Armor/Fearmonger/FearmongerGreaves.cs index a9418146f3..6c1b22b1c8 100644 --- a/Items/Armor/Fearmonger/FearmongerGreaves.cs +++ b/Items/Armor/Fearmonger/FearmongerGreaves.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -23,9 +24,9 @@ namespace CalamityMod.Items.Armor.Fearmonger { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(gold: 45); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 44; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Fearmonger/FearmongerPlateMail.cs b/Items/Armor/Fearmonger/FearmongerPlateMail.cs index 20918822db..11646cb6f1 100644 --- a/Items/Armor/Fearmonger/FearmongerPlateMail.cs +++ b/Items/Armor/Fearmonger/FearmongerPlateMail.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -21,9 +22,9 @@ namespace CalamityMod.Items.Armor.Fearmonger { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(gold: 60); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 50; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/GemTech/GemTechBodyArmor.cs b/Items/Armor/GemTech/GemTechBodyArmor.cs index da557ab953..d4b651a79f 100644 --- a/Items/Armor/GemTech/GemTechBodyArmor.cs +++ b/Items/Armor/GemTech/GemTechBodyArmor.cs @@ -1,9 +1,10 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Collections.Generic; namespace CalamityMod.Items.Armor.GemTech { @@ -22,11 +23,10 @@ namespace CalamityMod.Items.Armor.GemTech Item.width = 48; Item.height = 32; Item.defense = 31; - Item.rare = ItemRarityID.Purple; // Exact worth of the armor piece's constituents. Item.value = Item.sellPrice(platinum: 9, gold: 79, silver: 80); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Armor/GemTech/GemTechHeadgear.cs b/Items/Armor/GemTech/GemTechHeadgear.cs index 9416cc9ffb..7d409e6073 100644 --- a/Items/Armor/GemTech/GemTechHeadgear.cs +++ b/Items/Armor/GemTech/GemTechHeadgear.cs @@ -1,13 +1,14 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Collections.Generic; -using System.Linq; using static Microsoft.Xna.Framework.Input.Keys; using static Terraria.ModLoader.ModContent; -using Microsoft.Xna.Framework; namespace CalamityMod.Items.Armor.GemTech { @@ -64,11 +65,10 @@ namespace CalamityMod.Items.Armor.GemTech Item.width = 40; Item.height = 32; Item.defense = 14; - Item.rare = ItemRarityID.Purple; // Exact worth of the armor piece's constituents. Item.value = Item.sellPrice(platinum: 6, gold: 14, silver: 88); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Armor/GemTech/GemTechSchynbaulds.cs b/Items/Armor/GemTech/GemTechSchynbaulds.cs index d37c4d5743..8720063370 100644 --- a/Items/Armor/GemTech/GemTechSchynbaulds.cs +++ b/Items/Armor/GemTech/GemTechSchynbaulds.cs @@ -1,9 +1,10 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Collections.Generic; namespace CalamityMod.Items.Armor.GemTech { @@ -22,11 +23,10 @@ namespace CalamityMod.Items.Armor.GemTech Item.width = 28; Item.height = 26; Item.defense = 24; - Item.rare = ItemRarityID.Purple; // Exact worth of the armor piece's constituents. Item.value = Item.sellPrice(platinum: 7, gold: 35, silver: 84); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Armor/GodSlayer/GodSlayerChestplate.cs b/Items/Armor/GodSlayer/GodSlayerChestplate.cs index 2b4fe554b1..71be545c19 100644 --- a/Items/Armor/GodSlayer/GodSlayerChestplate.cs +++ b/Items/Armor/GodSlayer/GodSlayerChestplate.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; @@ -24,9 +25,9 @@ namespace CalamityMod.Items.Armor.GodSlayer { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 41; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/GodSlayer/GodSlayerHeadMelee.cs b/Items/Armor/GodSlayer/GodSlayerHeadMelee.cs index 464800a131..2c8d5f14f9 100644 --- a/Items/Armor/GodSlayer/GodSlayerHeadMelee.cs +++ b/Items/Armor/GodSlayer/GodSlayerHeadMelee.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using CalamityMod.CalPlayer.Dashes; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; @@ -22,9 +23,9 @@ namespace CalamityMod.Items.Armor.GodSlayer { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 75, 0, 0); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 48; //96 - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/GodSlayer/GodSlayerHeadRanged.cs b/Items/Armor/GodSlayer/GodSlayerHeadRanged.cs index 11a80ab184..d3dede6140 100644 --- a/Items/Armor/GodSlayer/GodSlayerHeadRanged.cs +++ b/Items/Armor/GodSlayer/GodSlayerHeadRanged.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using CalamityMod.CalPlayer.Dashes; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; @@ -22,9 +23,9 @@ namespace CalamityMod.Items.Armor.GodSlayer { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 75, 0, 0); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 35; //96 - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/GodSlayer/GodSlayerHeadRogue.cs b/Items/Armor/GodSlayer/GodSlayerHeadRogue.cs index e7db213dfa..f12d9c2138 100644 --- a/Items/Armor/GodSlayer/GodSlayerHeadRogue.cs +++ b/Items/Armor/GodSlayer/GodSlayerHeadRogue.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using CalamityMod.CalPlayer.Dashes; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; @@ -22,9 +23,9 @@ namespace CalamityMod.Items.Armor.GodSlayer { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 75, 0, 0); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 29; //96 - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/GodSlayer/GodSlayerLeggings.cs b/Items/Armor/GodSlayer/GodSlayerLeggings.cs index 3ef5af5061..0970e02888 100644 --- a/Items/Armor/GodSlayer/GodSlayerLeggings.cs +++ b/Items/Armor/GodSlayer/GodSlayerLeggings.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ModLoader; @@ -20,9 +21,9 @@ namespace CalamityMod.Items.Armor.GodSlayer { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 45, 0, 0); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 35; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Hydrothermic/HydrothermicArmor.cs b/Items/Armor/Hydrothermic/HydrothermicArmor.cs index 9e4498b440..0054a0ec3c 100644 --- a/Items/Armor/Hydrothermic/HydrothermicArmor.cs +++ b/Items/Armor/Hydrothermic/HydrothermicArmor.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 24, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Yellow; Item.defense = 20; } diff --git a/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs b/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs index b2abc0f3b1..457e65b7a8 100644 --- a/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs +++ b/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 30, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Yellow; Item.defense = 9; //45 } diff --git a/Items/Armor/Hydrothermic/HydrothermicHeadMelee.cs b/Items/Armor/Hydrothermic/HydrothermicHeadMelee.cs index dbb8596f32..71583f3299 100644 --- a/Items/Armor/Hydrothermic/HydrothermicHeadMelee.cs +++ b/Items/Armor/Hydrothermic/HydrothermicHeadMelee.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 30, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Yellow; Item.defense = 33; //67 } diff --git a/Items/Armor/Hydrothermic/HydrothermicHeadRanged.cs b/Items/Armor/Hydrothermic/HydrothermicHeadRanged.cs index 9f323169e2..eb63f62997 100644 --- a/Items/Armor/Hydrothermic/HydrothermicHeadRanged.cs +++ b/Items/Armor/Hydrothermic/HydrothermicHeadRanged.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 30, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Yellow; Item.defense = 15; //53 } diff --git a/Items/Armor/Hydrothermic/HydrothermicHeadRogue.cs b/Items/Armor/Hydrothermic/HydrothermicHeadRogue.cs index ec1dd98e2c..79cbbf1ee8 100644 --- a/Items/Armor/Hydrothermic/HydrothermicHeadRogue.cs +++ b/Items/Armor/Hydrothermic/HydrothermicHeadRogue.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 30, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Yellow; Item.defense = 12; //49 } diff --git a/Items/Armor/Hydrothermic/HydrothermicHeadSummon.cs b/Items/Armor/Hydrothermic/HydrothermicHeadSummon.cs index 5f45754ef2..b7f5fecd5a 100644 --- a/Items/Armor/Hydrothermic/HydrothermicHeadSummon.cs +++ b/Items/Armor/Hydrothermic/HydrothermicHeadSummon.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 30, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Yellow; Item.defense = 6; //40 } diff --git a/Items/Armor/Hydrothermic/HydrothermicSubligar.cs b/Items/Armor/Hydrothermic/HydrothermicSubligar.cs index 6ec0ffa368..85144b6e88 100644 --- a/Items/Armor/Hydrothermic/HydrothermicSubligar.cs +++ b/Items/Armor/Hydrothermic/HydrothermicSubligar.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 18, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Yellow; Item.defense = 14; } diff --git a/Items/Armor/MarniteArchitect/MarniteArchitectSet.cs b/Items/Armor/MarniteArchitect/MarniteArchitectSet.cs index 551f027258..b526acf7f4 100644 --- a/Items/Armor/MarniteArchitect/MarniteArchitectSet.cs +++ b/Items/Armor/MarniteArchitect/MarniteArchitectSet.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Armor.MarniteArchitect { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 0, 75, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.defense = 0; } @@ -171,7 +171,7 @@ namespace CalamityMod.Items.Armor.MarniteArchitect { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 0, 75, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.defense = 1; } diff --git a/Items/Armor/Mollusk/MolluskShelleggings.cs b/Items/Armor/Mollusk/MolluskShelleggings.cs index ccdac0a86a..b287ebf08f 100644 --- a/Items/Armor/Mollusk/MolluskShelleggings.cs +++ b/Items/Armor/Mollusk/MolluskShelleggings.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor.Mollusk { Item.width = 22; Item.height = 18; - Item.value = Item.buyPrice(0, 15, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.defense = 15; } diff --git a/Items/Armor/Mollusk/MolluskShellmet.cs b/Items/Armor/Mollusk/MolluskShellmet.cs index 40d048aeec..670f8ed2bc 100644 --- a/Items/Armor/Mollusk/MolluskShellmet.cs +++ b/Items/Armor/Mollusk/MolluskShellmet.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Armor.Mollusk { Item.width = 22; Item.height = 22; - Item.value = Item.buyPrice(0, 25, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.defense = 18; } diff --git a/Items/Armor/Mollusk/MolluskShellplate.cs b/Items/Armor/Mollusk/MolluskShellplate.cs index 968a9b97b3..99b9319b2a 100644 --- a/Items/Armor/Mollusk/MolluskShellplate.cs +++ b/Items/Armor/Mollusk/MolluskShellplate.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor.Mollusk { Item.width = 30; Item.height = 22; - Item.value = Item.buyPrice(0, 20, 0, 0); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.defense = 22; } diff --git a/Items/Armor/OmegaBlue/OmegaBlueChestplate.cs b/Items/Armor/OmegaBlue/OmegaBlueChestplate.cs index cd1a1b953f..dc122f328c 100644 --- a/Items/Armor/OmegaBlue/OmegaBlueChestplate.cs +++ b/Items/Armor/OmegaBlue/OmegaBlueChestplate.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -31,10 +32,9 @@ No positive life regen"); { Item.width = 18; Item.height = 18; - Item.value = Item.sellPrice(0, 38, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.defense = 28; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/OmegaBlue/OmegaBlueHelmet.cs b/Items/Armor/OmegaBlue/OmegaBlueHelmet.cs index 45bdfbf923..ada6f5f3c5 100644 --- a/Items/Armor/OmegaBlue/OmegaBlueHelmet.cs +++ b/Items/Armor/OmegaBlue/OmegaBlueHelmet.cs @@ -1,12 +1,13 @@ -using CalamityMod.Items.Materials; +using CalamityMod.CalPlayer; +using CalamityMod.Cooldowns; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.CalPlayer; -using CalamityMod.Cooldowns; -using Terraria.Audio; namespace CalamityMod.Items.Armor.OmegaBlue { @@ -41,10 +42,9 @@ namespace CalamityMod.Items.Armor.OmegaBlue { Item.width = 18; Item.height = 18; - Item.value = Item.sellPrice(0, 35, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.defense = 19; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/OmegaBlue/OmegaBlueTentacles.cs b/Items/Armor/OmegaBlue/OmegaBlueTentacles.cs index d80df1b4b4..e6cce20158 100644 --- a/Items/Armor/OmegaBlue/OmegaBlueTentacles.cs +++ b/Items/Armor/OmegaBlue/OmegaBlueTentacles.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -29,10 +30,9 @@ namespace CalamityMod.Items.Armor.OmegaBlue { Item.width = 18; Item.height = 18; - Item.value = Item.sellPrice(0, 35, 25, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.defense = 22; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/PlagueReaper/PlagueReaperMask.cs b/Items/Armor/PlagueReaper/PlagueReaperMask.cs index 5f22ddae7f..c41831b7be 100644 --- a/Items/Armor/PlagueReaper/PlagueReaperMask.cs +++ b/Items/Armor/PlagueReaper/PlagueReaperMask.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Armor.PlagueReaper { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 30, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Yellow; Item.defense = 9; //35 } diff --git a/Items/Armor/PlagueReaper/PlagueReaperStriders.cs b/Items/Armor/PlagueReaper/PlagueReaperStriders.cs index 358a6cfa6e..079932aeea 100644 --- a/Items/Armor/PlagueReaper/PlagueReaperStriders.cs +++ b/Items/Armor/PlagueReaper/PlagueReaperStriders.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.PlagueReaper { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 18, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Yellow; Item.defense = 11; } diff --git a/Items/Armor/PlagueReaper/PlagueReaperVest.cs b/Items/Armor/PlagueReaper/PlagueReaperVest.cs index 43091ef590..49e58c40ba 100644 --- a/Items/Armor/PlagueReaper/PlagueReaperVest.cs +++ b/Items/Armor/PlagueReaper/PlagueReaperVest.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor.PlagueReaper { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 24, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Yellow; Item.defense = 14; } diff --git a/Items/Armor/Prismatic/PrismaticGreaves.cs b/Items/Armor/Prismatic/PrismaticGreaves.cs index ebefe26a88..d6635b3fa9 100644 --- a/Items/Armor/Prismatic/PrismaticGreaves.cs +++ b/Items/Armor/Prismatic/PrismaticGreaves.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Armor.Prismatic Item.defense = 21; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Armor/Prismatic/PrismaticHelmet.cs b/Items/Armor/Prismatic/PrismaticHelmet.cs index aca187f42d..ef2513fc2f 100644 --- a/Items/Armor/Prismatic/PrismaticHelmet.cs +++ b/Items/Armor/Prismatic/PrismaticHelmet.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -26,7 +27,7 @@ namespace CalamityMod.Items.Armor.Prismatic Item.defense = 18; //71 Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Armor/Prismatic/PrismaticRegalia.cs b/Items/Armor/Prismatic/PrismaticRegalia.cs index 8590a6cefa..607b141e7c 100644 --- a/Items/Armor/Prismatic/PrismaticRegalia.cs +++ b/Items/Armor/Prismatic/PrismaticRegalia.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -34,7 +35,7 @@ namespace CalamityMod.Items.Armor.Prismatic Item.defense = 33; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Armor/Reaver/ReaverCuisses.cs b/Items/Armor/Reaver/ReaverCuisses.cs index 39f1541723..710ad47677 100644 --- a/Items/Armor/Reaver/ReaverCuisses.cs +++ b/Items/Armor/Reaver/ReaverCuisses.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.Reaver { Item.width = 22; Item.height = 18; - Item.value = Item.buyPrice(0, 18, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 14; } diff --git a/Items/Armor/Reaver/ReaverHeadExplore.cs b/Items/Armor/Reaver/ReaverHeadExplore.cs index af9ece80af..aa7ecbd9f6 100644 --- a/Items/Armor/Reaver/ReaverHeadExplore.cs +++ b/Items/Armor/Reaver/ReaverHeadExplore.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Armor.Reaver { Item.width = 22; Item.height = 22; - Item.value = Item.buyPrice(0, 30, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 7; //40 } diff --git a/Items/Armor/Reaver/ReaverHeadMobility.cs b/Items/Armor/Reaver/ReaverHeadMobility.cs index 662843a257..11013739c3 100644 --- a/Items/Armor/Reaver/ReaverHeadMobility.cs +++ b/Items/Armor/Reaver/ReaverHeadMobility.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.Reaver { Item.width = 24; Item.height = 28; - Item.value = Item.buyPrice(0, 30, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 13; //46 } diff --git a/Items/Armor/Reaver/ReaverHeadTank.cs b/Items/Armor/Reaver/ReaverHeadTank.cs index fd5bda6333..85089d0736 100644 --- a/Items/Armor/Reaver/ReaverHeadTank.cs +++ b/Items/Armor/Reaver/ReaverHeadTank.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor.Reaver { Item.width = 28; Item.height = 30; - Item.value = Item.buyPrice(0, 30, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 30; //63 => 73 w/ set bonus (+5 w/ Reaver Rage) } diff --git a/Items/Armor/Reaver/ReaverScaleMail.cs b/Items/Armor/Reaver/ReaverScaleMail.cs index c9e9b4ae82..1bded1cc05 100644 --- a/Items/Armor/Reaver/ReaverScaleMail.cs +++ b/Items/Armor/Reaver/ReaverScaleMail.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor.Reaver { Item.width = 34; Item.height = 22; - Item.value = Item.buyPrice(0, 24, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 19; } diff --git a/Items/Armor/ShroomiteVisage.cs b/Items/Armor/ShroomiteVisage.cs index 45eb107714..799687b645 100644 --- a/Items/Armor/ShroomiteVisage.cs +++ b/Items/Armor/ShroomiteVisage.cs @@ -20,7 +20,8 @@ namespace CalamityMod.Items.Armor { Item.width = 24; Item.height = 20; - Item.value = Item.buyPrice(0, 30, 0, 0); + // Same price as the other Shroomite helms + Item.value = Item.buyPrice(0, 37, 50, 0); Item.rare = ItemRarityID.Yellow; Item.defense = 11; //62 } diff --git a/Items/Armor/Silva/SilvaArmor.cs b/Items/Armor/Silva/SilvaArmor.cs index 3604c3d714..b71944d6d5 100644 --- a/Items/Armor/Silva/SilvaArmor.cs +++ b/Items/Armor/Silva/SilvaArmor.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -22,10 +23,9 @@ namespace CalamityMod.Items.Armor.Silva { Item.width = 34; Item.height = 24; - Item.value = Item.buyPrice(0, 72, 0, 0); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 44; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Silva/SilvaHeadMagic.cs b/Items/Armor/Silva/SilvaHeadMagic.cs index 12edcf92a7..f2ae1a7cd4 100644 --- a/Items/Armor/Silva/SilvaHeadMagic.cs +++ b/Items/Armor/Silva/SilvaHeadMagic.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -24,10 +25,9 @@ namespace CalamityMod.Items.Armor.Silva { Item.width = 24; Item.height = 22; - Item.value = Item.buyPrice(0, 90, 0, 0); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 21; //110 - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Silva/SilvaHeadSummon.cs b/Items/Armor/Silva/SilvaHeadSummon.cs index c5f3ac2604..e1acfa5451 100644 --- a/Items/Armor/Silva/SilvaHeadSummon.cs +++ b/Items/Armor/Silva/SilvaHeadSummon.cs @@ -3,11 +3,12 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Armor.Silva { @@ -29,10 +30,9 @@ namespace CalamityMod.Items.Armor.Silva { Item.width = 28; Item.height = 24; - Item.value = Item.buyPrice(0, 90, 0, 0); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 13; //110 - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Silva/SilvaLeggings.cs b/Items/Armor/Silva/SilvaLeggings.cs index 5491df0763..6db9e7b34d 100644 --- a/Items/Armor/Silva/SilvaLeggings.cs +++ b/Items/Armor/Silva/SilvaLeggings.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -22,10 +23,9 @@ namespace CalamityMod.Items.Armor.Silva { Item.width = 22; Item.height = 18; - Item.value = Item.buyPrice(0, 54, 0, 0); + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.defense = 39; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs b/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs index 8e3a828192..852cea14b0 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 0, 75, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.defense = 2; //4 } diff --git a/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs b/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs index 2b0665f9ea..14a9d19820 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 0, 75, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.defense = 1; //4 } diff --git a/Items/Armor/SnowRuffian/SnowRuffianMask.cs b/Items/Armor/SnowRuffian/SnowRuffianMask.cs index 464c85dcd6..19ffe8aa13 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianMask.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianMask.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 0, 75, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.defense = 1; //4 } diff --git a/Items/Armor/Statigel/StatigelArmor.cs b/Items/Armor/Statigel/StatigelArmor.cs index 1f3af3c8bb..5cf78847b3 100644 --- a/Items/Armor/Statigel/StatigelArmor.cs +++ b/Items/Armor/Statigel/StatigelArmor.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor.Statigel { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.defense = 10; } diff --git a/Items/Armor/Statigel/StatigelGreaves.cs b/Items/Armor/Statigel/StatigelGreaves.cs index 87c6727b5b..d70779a18f 100644 --- a/Items/Armor/Statigel/StatigelGreaves.cs +++ b/Items/Armor/Statigel/StatigelGreaves.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.Statigel { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 3, 0, 0); + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.defense = 8; } diff --git a/Items/Armor/Statigel/StatigelHeadMagic.cs b/Items/Armor/Statigel/StatigelHeadMagic.cs index e8d07401c2..ccaadffd12 100644 --- a/Items/Armor/Statigel/StatigelHeadMagic.cs +++ b/Items/Armor/Statigel/StatigelHeadMagic.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor.Statigel { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 5, 0, 0); + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.defense = 5; //22 } diff --git a/Items/Armor/Statigel/StatigelHeadMelee.cs b/Items/Armor/Statigel/StatigelHeadMelee.cs index d19e0aa3fd..e559bda9b5 100644 --- a/Items/Armor/Statigel/StatigelHeadMelee.cs +++ b/Items/Armor/Statigel/StatigelHeadMelee.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor.Statigel { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 5, 0, 0); + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.defense = 9; //27 } diff --git a/Items/Armor/Statigel/StatigelHeadRanged.cs b/Items/Armor/Statigel/StatigelHeadRanged.cs index 39159babc3..5f3cf2fcba 100644 --- a/Items/Armor/Statigel/StatigelHeadRanged.cs +++ b/Items/Armor/Statigel/StatigelHeadRanged.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor.Statigel { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 5, 0, 0); + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.defense = 7; //25 } diff --git a/Items/Armor/Statigel/StatigelHeadRogue.cs b/Items/Armor/Statigel/StatigelHeadRogue.cs index 538e72f254..0dcf52cd4e 100644 --- a/Items/Armor/Statigel/StatigelHeadRogue.cs +++ b/Items/Armor/Statigel/StatigelHeadRogue.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor.Statigel { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 5, 0, 0); + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.defense = 6; //23 } diff --git a/Items/Armor/Statigel/StatigelHeadSummon.cs b/Items/Armor/Statigel/StatigelHeadSummon.cs index 8526c67ad0..a75c6e4c01 100644 --- a/Items/Armor/Statigel/StatigelHeadSummon.cs +++ b/Items/Armor/Statigel/StatigelHeadSummon.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Armor.Statigel { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 5, 0, 0); + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.defense = 4; //20 } diff --git a/Items/Armor/Sulphurous/SulphurousBreastplate.cs b/Items/Armor/Sulphurous/SulphurousBreastplate.cs index d044b86d81..cac25f6ba9 100644 --- a/Items/Armor/Sulphurous/SulphurousBreastplate.cs +++ b/Items/Armor/Sulphurous/SulphurousBreastplate.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.Sulphurous { Item.width = 24; Item.height = 20; - Item.value = Item.buyPrice(0, 1, 15, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.defense = 6; Item.rare = ItemRarityID.Green; } diff --git a/Items/Armor/Sulphurous/SulphurousHelmet.cs b/Items/Armor/Sulphurous/SulphurousHelmet.cs index 58116d98e3..22bd008848 100644 --- a/Items/Armor/Sulphurous/SulphurousHelmet.cs +++ b/Items/Armor/Sulphurous/SulphurousHelmet.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Armor.Sulphurous { Item.width = 26; Item.height = 26; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.defense = 5; } diff --git a/Items/Armor/Sulphurous/SulphurousLeggings.cs b/Items/Armor/Sulphurous/SulphurousLeggings.cs index 5b0ff929c1..99de8e7313 100644 --- a/Items/Armor/Sulphurous/SulphurousLeggings.cs +++ b/Items/Armor/Sulphurous/SulphurousLeggings.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor.Sulphurous { Item.width = 22; Item.height = 16; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.defense = 5; Item.rare = ItemRarityID.Green; } diff --git a/Items/Armor/Tarragon/TarragonBreastplate.cs b/Items/Armor/Tarragon/TarragonBreastplate.cs index 5ced8b8e03..834abd16aa 100644 --- a/Items/Armor/Tarragon/TarragonBreastplate.cs +++ b/Items/Armor/Tarragon/TarragonBreastplate.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,9 +23,9 @@ namespace CalamityMod.Items.Armor.Tarragon Item.width = 18; Item.height = 18; Item.lifeRegen = 2; - Item.value = Item.buyPrice(0, 40, 0, 0); + Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.defense = 37; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Tarragon/TarragonHeadMagic.cs b/Items/Armor/Tarragon/TarragonHeadMagic.cs index 404e64bed0..f6905b09dd 100644 --- a/Items/Armor/Tarragon/TarragonHeadMagic.cs +++ b/Items/Armor/Tarragon/TarragonHeadMagic.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -24,9 +25,9 @@ namespace CalamityMod.Items.Armor.Tarragon { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 50, 0, 0); + Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.defense = 10; //98 - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Tarragon/TarragonHeadMelee.cs b/Items/Armor/Tarragon/TarragonHeadMelee.cs index cf7f77fe70..ad177f0dbf 100644 --- a/Items/Armor/Tarragon/TarragonHeadMelee.cs +++ b/Items/Armor/Tarragon/TarragonHeadMelee.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -25,9 +26,9 @@ namespace CalamityMod.Items.Armor.Tarragon { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 50, 0, 0); + Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.defense = 33; //98 - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Tarragon/TarragonHeadRanged.cs b/Items/Armor/Tarragon/TarragonHeadRanged.cs index 3883887f76..5cc259e4be 100644 --- a/Items/Armor/Tarragon/TarragonHeadRanged.cs +++ b/Items/Armor/Tarragon/TarragonHeadRanged.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -24,9 +25,9 @@ namespace CalamityMod.Items.Armor.Tarragon { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 50, 0, 0); + Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.defense = 21; //98 - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Tarragon/TarragonHeadRogue.cs b/Items/Armor/Tarragon/TarragonHeadRogue.cs index be8b9f746c..f299a3b901 100644 --- a/Items/Armor/Tarragon/TarragonHeadRogue.cs +++ b/Items/Armor/Tarragon/TarragonHeadRogue.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -24,9 +25,9 @@ namespace CalamityMod.Items.Armor.Tarragon { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 50, 0, 0); + Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.defense = 15; //98 - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Tarragon/TarragonHeadSummon.cs b/Items/Armor/Tarragon/TarragonHeadSummon.cs index dea72a5ff1..f193492035 100644 --- a/Items/Armor/Tarragon/TarragonHeadSummon.cs +++ b/Items/Armor/Tarragon/TarragonHeadSummon.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -23,9 +24,9 @@ namespace CalamityMod.Items.Armor.Tarragon { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 50, 0, 0); + Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.defense = 3; //98 - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Tarragon/TarragonLeggings.cs b/Items/Armor/Tarragon/TarragonLeggings.cs index fa51a3e0e7..a02745d06c 100644 --- a/Items/Armor/Tarragon/TarragonLeggings.cs +++ b/Items/Armor/Tarragon/TarragonLeggings.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,9 +22,9 @@ namespace CalamityMod.Items.Armor.Tarragon { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 30, 0, 0); + Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.defense = 32; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void UpdateEquip(Player player) diff --git a/Items/Armor/TitanHeart/TitanHeartBoots.cs b/Items/Armor/TitanHeart/TitanHeartBoots.cs index 6c2c1de3fd..0693995239 100644 --- a/Items/Armor/TitanHeart/TitanHeartBoots.cs +++ b/Items/Armor/TitanHeart/TitanHeartBoots.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.TitanHeart { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.defense = 14; } diff --git a/Items/Armor/TitanHeart/TitanHeartMantle.cs b/Items/Armor/TitanHeart/TitanHeartMantle.cs index a4640dce2c..8cb91e000c 100644 --- a/Items/Armor/TitanHeart/TitanHeartMantle.cs +++ b/Items/Armor/TitanHeart/TitanHeartMantle.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Armor.TitanHeart { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.defense = 17; } diff --git a/Items/Armor/TitanHeart/TitanHeartMask.cs b/Items/Armor/TitanHeart/TitanHeartMask.cs index 05324058ff..31bdb387cd 100644 --- a/Items/Armor/TitanHeart/TitanHeartMask.cs +++ b/Items/Armor/TitanHeart/TitanHeartMask.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.TitanHeart { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.defense = 12; //43 } diff --git a/Items/Armor/Umbraphile/UmbraphileBoots.cs b/Items/Armor/Umbraphile/UmbraphileBoots.cs index f104dc6a89..53178bf69d 100644 --- a/Items/Armor/Umbraphile/UmbraphileBoots.cs +++ b/Items/Armor/Umbraphile/UmbraphileBoots.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.Umbraphile { Item.width = 22; Item.height = 18; - Item.value = Item.buyPrice(0, 18, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 12; } diff --git a/Items/Armor/Umbraphile/UmbraphileHood.cs b/Items/Armor/Umbraphile/UmbraphileHood.cs index 14c0d862a4..45e36fbe17 100644 --- a/Items/Armor/Umbraphile/UmbraphileHood.cs +++ b/Items/Armor/Umbraphile/UmbraphileHood.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor.Umbraphile { Item.width = 22; Item.height = 20; - Item.value = Item.buyPrice(0, 30, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 8; //36 } diff --git a/Items/Armor/Umbraphile/UmbraphileRegalia.cs b/Items/Armor/Umbraphile/UmbraphileRegalia.cs index d3e5ae0695..b9d9d2eda4 100644 --- a/Items/Armor/Umbraphile/UmbraphileRegalia.cs +++ b/Items/Armor/Umbraphile/UmbraphileRegalia.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor.Umbraphile { Item.width = 38; Item.height = 24; - Item.value = Item.buyPrice(0, 24, 0, 0); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.defense = 16; } diff --git a/Items/Armor/Vanity/AncientGodSlayerChestplate.cs b/Items/Armor/Vanity/AncientGodSlayerChestplate.cs index 42d03c21bc..aeed822bf0 100644 --- a/Items/Armor/Vanity/AncientGodSlayerChestplate.cs +++ b/Items/Armor/Vanity/AncientGodSlayerChestplate.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Vanity @@ -16,7 +17,7 @@ namespace CalamityMod.Items.Armor.Vanity { Item.width = 28; Item.height = 20; - Item.Calamity().customRarity = (CalamityRarity)14; + Item.rare = ModContent.RarityType(); Item.vanity = true; Item.value = Item.buyPrice(0, 60, 0, 0); } diff --git a/Items/Armor/Vanity/AncientGodSlayerHelm.cs b/Items/Armor/Vanity/AncientGodSlayerHelm.cs index a320dd90d2..3633249ba6 100644 --- a/Items/Armor/Vanity/AncientGodSlayerHelm.cs +++ b/Items/Armor/Vanity/AncientGodSlayerHelm.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Vanity @@ -16,7 +17,7 @@ namespace CalamityMod.Items.Armor.Vanity { Item.width = 28; Item.height = 20; - Item.Calamity().customRarity = (CalamityRarity)14; + Item.rare = ModContent.RarityType(); Item.value = Item.buyPrice(0, 75, 0, 0); Item.vanity = true; } diff --git a/Items/Armor/Vanity/AncientGodSlayerLeggings.cs b/Items/Armor/Vanity/AncientGodSlayerLeggings.cs index 8233f46ad6..40c5a15e77 100644 --- a/Items/Armor/Vanity/AncientGodSlayerLeggings.cs +++ b/Items/Armor/Vanity/AncientGodSlayerLeggings.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Vanity @@ -16,7 +17,7 @@ namespace CalamityMod.Items.Armor.Vanity { Item.width = 28; Item.height = 20; - Item.Calamity().customRarity = (CalamityRarity)14; + Item.rare = ModContent.RarityType(); Item.value = Item.buyPrice(0, 45, 0, 0); Item.vanity = true; } diff --git a/Items/Armor/Vanity/GodSlayerHornedHelm.cs b/Items/Armor/Vanity/GodSlayerHornedHelm.cs index 4d4958cbb1..e5b37444c8 100644 --- a/Items/Armor/Vanity/GodSlayerHornedHelm.cs +++ b/Items/Armor/Vanity/GodSlayerHornedHelm.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Armor.GodSlayer; +using CalamityMod.Rarities; using Terraria; using Terraria.ModLoader; @@ -19,7 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.height = 18; Item.value = Item.buyPrice(0, 8, 0, 0); Item.vanity = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Vanity/GodSlayerVisage.cs b/Items/Armor/Vanity/GodSlayerVisage.cs index 4432ca3e9c..55c4bcaf0b 100644 --- a/Items/Armor/Vanity/GodSlayerVisage.cs +++ b/Items/Armor/Vanity/GodSlayerVisage.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Armor.GodSlayer; +using CalamityMod.Rarities; using Terraria; using Terraria.ModLoader; @@ -19,7 +20,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.height = 18; Item.value = Item.buyPrice(0, 8, 0, 0); Item.vanity = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Vanity/SilvaHelm.cs b/Items/Armor/Vanity/SilvaHelm.cs index 76de417288..af1e5b21fa 100644 --- a/Items/Armor/Vanity/SilvaHelm.cs +++ b/Items/Armor/Vanity/SilvaHelm.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Armor.Silva; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -20,8 +21,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.height = 20; Item.value = Item.buyPrice(0, 8, 0, 0); Item.vanity = true; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Vanity/SilvaHornedHelm.cs b/Items/Armor/Vanity/SilvaHornedHelm.cs index 32bf15510e..8ee1ff68af 100644 --- a/Items/Armor/Vanity/SilvaHornedHelm.cs +++ b/Items/Armor/Vanity/SilvaHornedHelm.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Armor.Silva; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -20,8 +21,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.height = 24; Item.value = Item.buyPrice(0, 8, 0, 0); Item.vanity = true; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Vanity/SilvaMask.cs b/Items/Armor/Vanity/SilvaMask.cs index c4e4eef21a..e25e96722e 100644 --- a/Items/Armor/Vanity/SilvaMask.cs +++ b/Items/Armor/Vanity/SilvaMask.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Armor.Silva; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -20,8 +21,7 @@ namespace CalamityMod.Items.Armor.Vanity Item.height = 26; Item.value = Item.buyPrice(0, 8, 0, 0); Item.vanity = true; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Victide/VictideBreastplate.cs b/Items/Armor/Victide/VictideBreastplate.cs index 5d701514d0..c3a1d46b1e 100644 --- a/Items/Armor/Victide/VictideBreastplate.cs +++ b/Items/Armor/Victide/VictideBreastplate.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor.Victide { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.defense = 5; //9 } diff --git a/Items/Armor/Victide/VictideGreaves.cs b/Items/Armor/Victide/VictideGreaves.cs index fbf7e64f2d..292de1ffc2 100644 --- a/Items/Armor/Victide/VictideGreaves.cs +++ b/Items/Armor/Victide/VictideGreaves.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Armor.Victide { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 0, 50, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.defense = 4; //9 } diff --git a/Items/Armor/Victide/VictideHeadMagic.cs b/Items/Armor/Victide/VictideHeadMagic.cs index 00ba882b34..4d998d6b48 100644 --- a/Items/Armor/Victide/VictideHeadMagic.cs +++ b/Items/Armor/Victide/VictideHeadMagic.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor.Victide { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 1, 50, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.defense = 2; //9 } diff --git a/Items/Armor/Victide/VictideHeadMelee.cs b/Items/Armor/Victide/VictideHeadMelee.cs index eeb7eaf92f..899cdb59fb 100644 --- a/Items/Armor/Victide/VictideHeadMelee.cs +++ b/Items/Armor/Victide/VictideHeadMelee.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor.Victide { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 1, 50, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.defense = 4; //11 } diff --git a/Items/Armor/Victide/VictideHeadRanged.cs b/Items/Armor/Victide/VictideHeadRanged.cs index 4d6a1e5e81..48432755db 100644 --- a/Items/Armor/Victide/VictideHeadRanged.cs +++ b/Items/Armor/Victide/VictideHeadRanged.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor.Victide { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 1, 50, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.defense = 3; //10 } diff --git a/Items/Armor/Victide/VictideHeadRogue.cs b/Items/Armor/Victide/VictideHeadRogue.cs index 657b11354c..526904b85c 100644 --- a/Items/Armor/Victide/VictideHeadRogue.cs +++ b/Items/Armor/Victide/VictideHeadRogue.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor.Victide { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 1, 50, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.defense = 3; //10 } diff --git a/Items/Armor/Victide/VictideHeadSummon.cs b/Items/Armor/Victide/VictideHeadSummon.cs index 219fea7730..9a3ff0e5b7 100644 --- a/Items/Armor/Victide/VictideHeadSummon.cs +++ b/Items/Armor/Victide/VictideHeadSummon.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Armor.Victide { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 1, 50, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.defense = 1; //8 } diff --git a/Items/Armor/Wulfrum/WulfrumSet.cs b/Items/Armor/Wulfrum/WulfrumSet.cs index 9769758e7e..169663c958 100644 --- a/Items/Armor/Wulfrum/WulfrumSet.cs +++ b/Items/Armor/Wulfrum/WulfrumSet.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Items.Armor.Wulfrum { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 0, 75, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; } @@ -301,7 +301,7 @@ namespace CalamityMod.Items.Armor.Wulfrum { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 0, 50, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.defense = 2; } @@ -335,7 +335,7 @@ namespace CalamityMod.Items.Armor.Wulfrum { Item.width = 18; Item.height = 18; - Item.value = Item.buyPrice(0, 0, 25, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.defense = 1; diff --git a/Items/BrimstoneLocus.cs b/Items/BrimstoneLocus.cs index 8f17006c2b..eead7e98e4 100644 --- a/Items/BrimstoneLocus.cs +++ b/Items/BrimstoneLocus.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria.ID; using Terraria.ModLoader; @@ -19,8 +20,7 @@ namespace CalamityMod.Items { Item.width = 20; Item.height = 20; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = 0; } diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index e04c0d4b85..7135286549 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1,6 +1,4 @@ -using System; -using System.IO; -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.Potions; using CalamityMod.CalPlayer; using CalamityMod.Events; @@ -18,11 +16,14 @@ using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Rogue; using CalamityMod.Projectiles.Summon; using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; using CalamityMod.UI; using CalamityMod.UI.CalamitasEnchants; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System; +using System.IO; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -78,7 +79,6 @@ namespace CalamityMod.Items #endregion // Miscellaneous stuff - public CalamityRarity customRarity = CalamityRarity.NoEffect; public int timesUsed = 0; public bool donorItem = false; public bool devItem = false; @@ -120,7 +120,6 @@ namespace CalamityMod.Items myClone.DischargeEnchantExhaustion = DischargeEnchantExhaustion; // Miscellaneous - myClone.customRarity = customRarity; myClone.timesUsed = timesUsed; myClone.donorItem = donorItem; myClone.devItem = devItem; @@ -132,11 +131,6 @@ namespace CalamityMod.Items #region SetDefaults public override void SetDefaults(Item item) { - // TODO -- Remove this in 1.4 with ModRarity. - // TODO -- Remove all instances of manually setting the rarity of postML items to Red. - if (customRarity.IsPostML() && item.rare != ItemRarityID.Purple) - item.rare = ItemRarityID.Purple; - // All items that stack to 30, 50, 75, 99 , or 999 now stack to 9999 instead. if (item.maxStack == 30 || item.maxStack == 50 || item.maxStack == 75 || item.maxStack == 99 || item.maxStack == 999) item.maxStack = 9999; @@ -520,7 +514,6 @@ namespace CalamityMod.Items public override void SaveData(Item item, TagCompound tag) { tag.Add("timesUsed", timesUsed); - tag.Add("rarity", (int)customRarity); tag.Add("charge", Charge); tag.Add("enchantmentID", AppliedEnchantment.HasValue ? AppliedEnchantment.Value.ID : 0); tag.Add("DischargeEnchantExhaustion", DischargeEnchantExhaustion); @@ -531,7 +524,6 @@ namespace CalamityMod.Items { canFirePointBlankShots = tag.GetBool("canFirePointBlankShots"); timesUsed = tag.GetInt("timesUsed"); - customRarity = (CalamityRarity)tag.GetInt("rarity"); // Changed charge from int to float. If an old charge int is present, load that instead. if (tag.ContainsKey("Charge")) @@ -556,7 +548,6 @@ namespace CalamityMod.Items // rip, no other flags. what a byte. writer.Write(flags); - writer.Write((int)customRarity); writer.Write(timesUsed); writer.Write(Charge); writer.Write(AppliedEnchantment.HasValue ? AppliedEnchantment.Value.ID : 0); @@ -568,7 +559,6 @@ namespace CalamityMod.Items BitsByte flags = reader.ReadByte(); canFirePointBlankShots = flags[0]; - customRarity = (CalamityRarity)reader.ReadInt32(); timesUsed = reader.ReadInt32(); Charge = reader.ReadSingle(); @@ -1829,42 +1819,72 @@ namespace CalamityMod.Items public static readonly int Rarity9BuyPrice = Item.buyPrice(0, 80, 0, 0); public static readonly int Rarity10BuyPrice = Item.buyPrice(1, 0, 0, 0); public static readonly int Rarity11BuyPrice = Item.buyPrice(1, 10, 0, 0); - public static readonly int RarityTurquoiseBuyPrice = Item.buyPrice(1, 20, 0, 0); - public static readonly int RarityPureGreenBuyPrice = Item.buyPrice(1, 30, 0, 0); - public static readonly int RarityDarkBlueBuyPrice = Item.buyPrice(1, 40, 0, 0); - public static readonly int RarityVioletBuyPrice = Item.buyPrice(1, 50, 0, 0); - public static readonly int RarityHotPinkBuyPrice = Item.buyPrice(2, 0, 0, 0); - - //These duplicates are for my sanity... public static readonly int Rarity12BuyPrice = Item.buyPrice(1, 20, 0, 0); public static readonly int Rarity13BuyPrice = Item.buyPrice(1, 30, 0, 0); public static readonly int Rarity14BuyPrice = Item.buyPrice(1, 40, 0, 0); public static readonly int Rarity15BuyPrice = Item.buyPrice(1, 50, 0, 0); public static readonly int Rarity16BuyPrice = Item.buyPrice(2, 0, 0, 0); + public static readonly int RarityWhiteBuyPrice = Item.buyPrice(0, 0, 50, 0); + public static readonly int RarityBlueBuyPrice = Item.buyPrice(0, 1, 0, 0); + public static readonly int RarityGreenBuyPrice = Item.buyPrice(0, 2, 0, 0); + public static readonly int RarityOrangeBuyPrice = Item.buyPrice(0, 4, 0, 0); + public static readonly int RarityLightRedBuyPrice = Item.buyPrice(0, 12, 0, 0); + public static readonly int RarityPinkBuyPrice = Item.buyPrice(0, 24, 0, 0); + public static readonly int RarityLightPurpleBuyPrice = Item.buyPrice(0, 36, 0, 0); + public static readonly int RarityLimeBuyPrice = Item.buyPrice(0, 48, 0, 0); + public static readonly int RarityYellowBuyPrice = Item.buyPrice(0, 60, 0, 0); + public static readonly int RarityCyanBuyPrice = Item.buyPrice(0, 80, 0, 0); + public static readonly int RarityRedBuyPrice = Item.buyPrice(1, 0, 0, 0); + public static readonly int RarityPurpleBuyPrice = Item.buyPrice(1, 10, 0, 0); + public static readonly int RarityTurquoiseBuyPrice = Item.buyPrice(1, 20, 0, 0); + public static readonly int RarityPureGreenBuyPrice = Item.buyPrice(1, 30, 0, 0); + public static readonly int RarityDarkBlueBuyPrice = Item.buyPrice(1, 40, 0, 0); + public static readonly int RarityVioletBuyPrice = Item.buyPrice(1, 50, 0, 0); + public static readonly int RarityHotPinkBuyPrice = Item.buyPrice(2, 0, 0, 0); + public static int GetBuyPrice(int rarity) { - return rarity switch + switch (rarity) { - 0 => Rarity0BuyPrice, - 1 => Rarity1BuyPrice, - 2 => Rarity2BuyPrice, - 3 => Rarity3BuyPrice, - 4 => Rarity4BuyPrice, - 5 => Rarity5BuyPrice, - 6 => Rarity6BuyPrice, - 7 => Rarity7BuyPrice, - 8 => Rarity8BuyPrice, - 9 => Rarity9BuyPrice, - 10 => Rarity10BuyPrice, - 11 => Rarity11BuyPrice, - (int)CalamityRarity.Turquoise => RarityTurquoiseBuyPrice, - (int)CalamityRarity.PureGreen => RarityPureGreenBuyPrice, - (int)CalamityRarity.DarkBlue => RarityDarkBlueBuyPrice, - (int)CalamityRarity.Violet => RarityVioletBuyPrice, - (int)CalamityRarity.HotPink => RarityHotPinkBuyPrice, - _ => 0, - }; + case 0: + return Rarity0BuyPrice; + case 1: + return Rarity1BuyPrice; + case 2: + return Rarity2BuyPrice; + case 3: + return Rarity3BuyPrice; + case 4: + return Rarity4BuyPrice; + case 5: + return Rarity5BuyPrice; + case 6: + return Rarity6BuyPrice; + case 7: + return Rarity7BuyPrice; + case 8: + return Rarity8BuyPrice; + case 9: + return Rarity9BuyPrice; + case 10: + return Rarity10BuyPrice; + case 11: + return Rarity11BuyPrice; + } + if (rarity == ModContent.RarityType()) + return RarityTurquoiseBuyPrice; + if (rarity == ModContent.RarityType()) + return RarityPureGreenBuyPrice; + if (rarity == ModContent.RarityType()) + return RarityDarkBlueBuyPrice; + if (rarity == ModContent.RarityType()) + return RarityVioletBuyPrice; + if (rarity == ModContent.RarityType()) + return RarityHotPinkBuyPrice; + + // Return 0 if it's not a progression based or other mod's rarity + return 0; } public static int GetBuyPrice(Item item) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index a13cf71904..8c7151e199 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Items } if (devItem) { - TooltipLine line = new TooltipLine(Mod, "CalamityDev", CalamityUtils.ColorMessage("- Developer Item -", CalamityUtils.HotPinkRarityColor)); + TooltipLine line = new TooltipLine(Mod, "CalamityDev", CalamityUtils.ColorMessage("- Developer Item -", CalamityUtils.DevItemColor)); tooltips.Add(line); } } @@ -86,11 +86,6 @@ namespace CalamityMod.Items #region Rarity Coloration private void ApplyRarityColor(Item item, TooltipLine nameLine) { - // Apply standard post-ML rarities to the item's color first. - Color? standardRarityColor = CalamityUtils.GetRarityColor(customRarity); - if (!item.expert && standardRarityColor.HasValue) - nameLine.OverrideColor = standardRarityColor.Value; - #region Uniquely Colored Developer Items if (item.type == ModContent.ItemType()) nameLine.OverrideColor = new Color(Main.DiscoR, 100, 255); diff --git a/Items/DraedonMisc/AuricQuantumCoolingCell.cs b/Items/DraedonMisc/AuricQuantumCoolingCell.cs index 8476053606..2a5697732e 100644 --- a/Items/DraedonMisc/AuricQuantumCoolingCell.cs +++ b/Items/DraedonMisc/AuricQuantumCoolingCell.cs @@ -1,5 +1,6 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.TileEntities; using CalamityMod.Tiles.DraedonSummoner; using CalamityMod.Tiles.Furniture.CraftingStations; @@ -31,9 +32,8 @@ namespace CalamityMod.Items.DraedonMisc Item.maxStack = 999; Item.consumable = true; Item.useStyle = ItemUseStyleID.Swing; - Item.rare = ItemRarityID.Red; Item.useTime = Item.useAnimation = 15; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void ModifyTooltips(List tooltips) diff --git a/Items/DraedonMisc/DraedonPowerCell.cs b/Items/DraedonMisc/DraedonPowerCell.cs index 9778413112..d084e1e7f6 100644 --- a/Items/DraedonMisc/DraedonPowerCell.cs +++ b/Items/DraedonMisc/DraedonPowerCell.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -24,8 +25,7 @@ namespace CalamityMod.Items.DraedonMisc { Item.width = 26; Item.height = 14; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.maxStack = 999; Item.consumable = true; diff --git a/Items/DraedonMisc/DraedonsLogHell.cs b/Items/DraedonMisc/DraedonsLogHell.cs index bc2c8548bb..a24c2155b9 100644 --- a/Items/DraedonMisc/DraedonsLogHell.cs +++ b/Items/DraedonMisc/DraedonsLogHell.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.UI; using Terraria; using Terraria.ID; @@ -18,8 +19,7 @@ namespace CalamityMod.Items.DraedonMisc { Item.width = 28; Item.height = 28; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.HoldUp; } diff --git a/Items/DraedonMisc/DraedonsLogJungle.cs b/Items/DraedonMisc/DraedonsLogJungle.cs index 4b9a0ba6c9..c516d8ec11 100644 --- a/Items/DraedonMisc/DraedonsLogJungle.cs +++ b/Items/DraedonMisc/DraedonsLogJungle.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.UI; using Terraria; using Terraria.ID; @@ -18,8 +19,7 @@ namespace CalamityMod.Items.DraedonMisc { Item.width = 28; Item.height = 28; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.HoldUp; } diff --git a/Items/DraedonMisc/DraedonsLogPlanetoid.cs b/Items/DraedonMisc/DraedonsLogPlanetoid.cs index c5fc95d727..5f2d05c18c 100644 --- a/Items/DraedonMisc/DraedonsLogPlanetoid.cs +++ b/Items/DraedonMisc/DraedonsLogPlanetoid.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.UI; using Terraria; using Terraria.ID; @@ -18,8 +19,7 @@ namespace CalamityMod.Items.DraedonMisc { Item.width = 28; Item.height = 28; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.HoldUp; } diff --git a/Items/DraedonMisc/DraedonsLogSnowBiome.cs b/Items/DraedonMisc/DraedonsLogSnowBiome.cs index a2d0c50cb4..360bb47b61 100644 --- a/Items/DraedonMisc/DraedonsLogSnowBiome.cs +++ b/Items/DraedonMisc/DraedonsLogSnowBiome.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.UI; using Terraria; using Terraria.ID; @@ -18,8 +19,7 @@ namespace CalamityMod.Items.DraedonMisc { Item.width = 28; Item.height = 28; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.HoldUp; } diff --git a/Items/DraedonMisc/DraedonsLogSunkenSea.cs b/Items/DraedonMisc/DraedonsLogSunkenSea.cs index 6c6dc63a39..bcc7d5487e 100644 --- a/Items/DraedonMisc/DraedonsLogSunkenSea.cs +++ b/Items/DraedonMisc/DraedonsLogSunkenSea.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.UI; using Terraria; using Terraria.ID; @@ -18,8 +19,7 @@ namespace CalamityMod.Items.DraedonMisc { Item.width = 28; Item.height = 28; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.HoldUp; } diff --git a/Items/DraedonMisc/EncryptedSchematicHell.cs b/Items/DraedonMisc/EncryptedSchematicHell.cs index 754dcc69b6..b24cb29794 100644 --- a/Items/DraedonMisc/EncryptedSchematicHell.cs +++ b/Items/DraedonMisc/EncryptedSchematicHell.cs @@ -1,12 +1,13 @@ -using System; -using CalamityMod.CustomRecipes; +using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using CalamityMod.UI; +using System; +using System.Collections.Generic; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Collections.Generic; -using System.Linq; -using CalamityMod.UI; namespace CalamityMod.Items.DraedonMisc { @@ -23,8 +24,7 @@ namespace CalamityMod.Items.DraedonMisc { Item.width = 42; Item.height = 42; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.maxStack = 1; Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.HoldUp; diff --git a/Items/DraedonMisc/EncryptedSchematicIce.cs b/Items/DraedonMisc/EncryptedSchematicIce.cs index 24bb2b46a8..05eb68feda 100644 --- a/Items/DraedonMisc/EncryptedSchematicIce.cs +++ b/Items/DraedonMisc/EncryptedSchematicIce.cs @@ -1,12 +1,13 @@ -using System; -using CalamityMod.CustomRecipes; +using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using CalamityMod.UI; +using System; +using System.Collections.Generic; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Collections.Generic; -using System.Linq; -using CalamityMod.UI; namespace CalamityMod.Items.DraedonMisc @@ -24,8 +25,7 @@ namespace CalamityMod.Items.DraedonMisc { Item.width = 42; Item.height = 42; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.maxStack = 1; Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.HoldUp; diff --git a/Items/DraedonMisc/EncryptedSchematicJungle.cs b/Items/DraedonMisc/EncryptedSchematicJungle.cs index 5d57394681..4bad6f0872 100644 --- a/Items/DraedonMisc/EncryptedSchematicJungle.cs +++ b/Items/DraedonMisc/EncryptedSchematicJungle.cs @@ -1,12 +1,13 @@ -using System; -using CalamityMod.CustomRecipes; +using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using CalamityMod.UI; +using System; +using System.Collections.Generic; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Collections.Generic; -using System.Linq; -using CalamityMod.UI; namespace CalamityMod.Items.DraedonMisc { @@ -23,8 +24,7 @@ namespace CalamityMod.Items.DraedonMisc { Item.width = 42; Item.height = 42; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.maxStack = 1; Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.HoldUp; diff --git a/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs b/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs index 46b778cf9a..e6fc68090f 100644 --- a/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs +++ b/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs @@ -1,12 +1,13 @@ -using System; -using CalamityMod.CustomRecipes; +using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using CalamityMod.UI; +using System; +using System.Collections.Generic; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Collections.Generic; -using System.Linq; -using CalamityMod.UI; namespace CalamityMod.Items.DraedonMisc { @@ -23,8 +24,7 @@ namespace CalamityMod.Items.DraedonMisc { Item.width = 42; Item.height = 42; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.maxStack = 1; Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.HoldUp; diff --git a/Items/DraedonMisc/EncryptedSchematicSunkenSea.cs b/Items/DraedonMisc/EncryptedSchematicSunkenSea.cs index ba7c826e9f..11f2001706 100644 --- a/Items/DraedonMisc/EncryptedSchematicSunkenSea.cs +++ b/Items/DraedonMisc/EncryptedSchematicSunkenSea.cs @@ -1,10 +1,11 @@ -using System; -using CalamityMod.CustomRecipes; +using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; +using CalamityMod.UI; +using CalamityMod.Rarities; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.UI; namespace CalamityMod.Items.DraedonMisc { @@ -23,8 +24,7 @@ namespace CalamityMod.Items.DraedonMisc { Item.width = 42; Item.height = 42; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.maxStack = 1; Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.HoldUp; diff --git a/Items/DraedonMisc/VoltageRegulationSystem.cs b/Items/DraedonMisc/VoltageRegulationSystem.cs index 2b1c316262..488cbe141b 100644 --- a/Items/DraedonMisc/VoltageRegulationSystem.cs +++ b/Items/DraedonMisc/VoltageRegulationSystem.cs @@ -1,13 +1,14 @@ -using CalamityMod.Items.Materials; +using CalamityMod.CustomRecipes; +using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using CalamityMod.TileEntities; using CalamityMod.Tiles.DraedonSummoner; +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using Microsoft.Xna.Framework; -using CalamityMod.TileEntities; -using CalamityMod.CustomRecipes; -using System.Collections.Generic; -using System; namespace CalamityMod.Items.DraedonMisc { @@ -28,8 +29,7 @@ namespace CalamityMod.Items.DraedonMisc Item.maxStack = 999; Item.consumable = true; Item.useStyle = ItemUseStyleID.Swing; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.useTime = Item.useAnimation = 15; } diff --git a/Items/Dyes/AuricDye.cs b/Items/Dyes/AuricDye.cs index d713c04294..3350406048 100644 --- a/Items/Dyes/AuricDye.cs +++ b/Items/Dyes/AuricDye.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 9, 0, 0); } diff --git a/Items/Dyes/BloodflareDye.cs b/Items/Dyes/BloodflareDye.cs index 2fca9ea149..3da1c20844 100644 --- a/Items/Dyes/BloodflareDye.cs +++ b/Items/Dyes/BloodflareDye.cs @@ -1,11 +1,12 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Graphics.Shaders; -using Microsoft.Xna.Framework; -using ReLogic.Content; namespace CalamityMod.Items.Dyes { @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 4, 0, 0); } diff --git a/Items/Dyes/BlueCosmicFlameDye.cs b/Items/Dyes/BlueCosmicFlameDye.cs index bdf7b3abc6..c03daf9ff3 100644 --- a/Items/Dyes/BlueCosmicFlameDye.cs +++ b/Items/Dyes/BlueCosmicFlameDye.cs @@ -1,11 +1,12 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Graphics.Shaders; -using Microsoft.Xna.Framework; -using ReLogic.Content; namespace CalamityMod.Items.Dyes { @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 5, 0, 0); } diff --git a/Items/Dyes/CalamitousDye.cs b/Items/Dyes/CalamitousDye.cs index 05501ad551..bbe95866b6 100644 --- a/Items/Dyes/CalamitousDye.cs +++ b/Items/Dyes/CalamitousDye.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 10, 0, 0); } diff --git a/Items/Dyes/CeaselessDye.cs b/Items/Dyes/CeaselessDye.cs index 6a70ba8b24..c05b5ec04c 100644 --- a/Items/Dyes/CeaselessDye.cs +++ b/Items/Dyes/CeaselessDye.cs @@ -1,10 +1,11 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Graphics.Shaders; -using ReLogic.Content; namespace CalamityMod.Items.Dyes { @@ -19,8 +20,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 4, 0, 0); } diff --git a/Items/Dyes/CosmiliteDye.cs b/Items/Dyes/CosmiliteDye.cs index b4032df071..9193190811 100644 --- a/Items/Dyes/CosmiliteDye.cs +++ b/Items/Dyes/CosmiliteDye.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 5, 0, 0); } diff --git a/Items/Dyes/DragonSoulDye.cs b/Items/Dyes/DragonSoulDye.cs index 3896572671..c03b06e19a 100644 --- a/Items/Dyes/DragonSoulDye.cs +++ b/Items/Dyes/DragonSoulDye.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -19,8 +20,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 8, 0, 0); } diff --git a/Items/Dyes/EndothermicDye.cs b/Items/Dyes/EndothermicDye.cs index a65cb589d4..921ef87638 100644 --- a/Items/Dyes/EndothermicDye.cs +++ b/Items/Dyes/EndothermicDye.cs @@ -1,11 +1,12 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Graphics.Shaders; -using Microsoft.Xna.Framework; -using ReLogic.Content; namespace CalamityMod.Items.Dyes { @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 5, 0, 0); } diff --git a/Items/Dyes/ExoDye.cs b/Items/Dyes/ExoDye.cs index 005a541acd..85d0eb73ea 100644 --- a/Items/Dyes/ExoDye.cs +++ b/Items/Dyes/ExoDye.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; @@ -23,8 +24,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 10, 0, 0); } diff --git a/Items/Dyes/NightmareDye.cs b/Items/Dyes/NightmareDye.cs index 7c2a358682..a4dea3fc0e 100644 --- a/Items/Dyes/NightmareDye.cs +++ b/Items/Dyes/NightmareDye.cs @@ -1,11 +1,12 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Graphics.Shaders; -using Microsoft.Xna.Framework; -using ReLogic.Content; namespace CalamityMod.Items.Dyes { @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 5, 0, 0); } diff --git a/Items/Dyes/PinkCosmicFlameDye.cs b/Items/Dyes/PinkCosmicFlameDye.cs index af00a3d3d8..1beb474c35 100644 --- a/Items/Dyes/PinkCosmicFlameDye.cs +++ b/Items/Dyes/PinkCosmicFlameDye.cs @@ -1,11 +1,12 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.Graphics.Shaders; -using Microsoft.Xna.Framework; -using ReLogic.Content; namespace CalamityMod.Items.Dyes { @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 5, 0, 0); } diff --git a/Items/Dyes/ProfanedMoonlightDye.cs b/Items/Dyes/ProfanedMoonlightDye.cs index 8338dda857..60d048767d 100644 --- a/Items/Dyes/ProfanedMoonlightDye.cs +++ b/Items/Dyes/ProfanedMoonlightDye.cs @@ -1,8 +1,10 @@ -using Microsoft.Xna.Framework.Graphics; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; using Terraria.Graphics.Shaders; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Dyes { @@ -17,8 +19,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 10, 0, 0); } } diff --git a/Items/Dyes/ShadowspecDye.cs b/Items/Dyes/ShadowspecDye.cs index 7b3f8abf66..780c79161d 100644 --- a/Items/Dyes/ShadowspecDye.cs +++ b/Items/Dyes/ShadowspecDye.cs @@ -1,11 +1,12 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Graphics.Shaders; -using Microsoft.Xna.Framework; -using ReLogic.Content; namespace CalamityMod.Items.Dyes { @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 10, 0, 0); } diff --git a/Items/Dyes/StratusDye.cs b/Items/Dyes/StratusDye.cs index 22ecc07d9f..a9fa1d0db8 100644 --- a/Items/Dyes/StratusDye.cs +++ b/Items/Dyes/StratusDye.cs @@ -1,12 +1,13 @@ using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Graphics.Shaders; -using Microsoft.Xna.Framework; -using CalamityMod.Items.Placeables.Ores; -using ReLogic.Content; namespace CalamityMod.Items.Dyes { @@ -22,8 +23,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 4, 50, 0); } diff --git a/Items/Dyes/SwirlingCosmicFlameDye.cs b/Items/Dyes/SwirlingCosmicFlameDye.cs index bef086a047..23bb2e48aa 100644 --- a/Items/Dyes/SwirlingCosmicFlameDye.cs +++ b/Items/Dyes/SwirlingCosmicFlameDye.cs @@ -1,10 +1,11 @@ -using Microsoft.Xna.Framework.Graphics; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Graphics.Shaders; -using Microsoft.Xna.Framework; -using ReLogic.Content; namespace CalamityMod.Items.Dyes { @@ -20,8 +21,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(0, 7, 50, 0); } diff --git a/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs b/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs index 92d9207cf6..3e63097ed8 100644 --- a/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs +++ b/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Potions; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -27,8 +28,7 @@ The life regen boost is stronger if below 75% health Item.maxStack = 30; Item.useTurn = true; Item.value = Item.sellPrice(gold: 5); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.useAnimation = 17; Item.useTime = 17; Item.useStyle = ItemUseStyleID.EatFood; diff --git a/Items/Fishing/FishingRods/EarlyBloomRod.cs b/Items/Fishing/FishingRods/EarlyBloomRod.cs index a4b527f826..61884f5a17 100644 --- a/Items/Fishing/FishingRods/EarlyBloomRod.cs +++ b/Items/Fishing/FishingRods/EarlyBloomRod.cs @@ -1,10 +1,11 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Items.Materials; -using Terraria.DataStructures; namespace CalamityMod.Items.Fishing.FishingRods { @@ -30,8 +31,7 @@ namespace CalamityMod.Items.Fishing.FishingRods Item.shootSpeed = 18f; Item.shoot = ModContent.ProjectileType(); Item.value = Item.buyPrice(1, 20, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Fishing/FishingRods/TheDevourerofCods.cs b/Items/Fishing/FishingRods/TheDevourerofCods.cs index c49b71b61c..94d5063fbf 100644 --- a/Items/Fishing/FishingRods/TheDevourerofCods.cs +++ b/Items/Fishing/FishingRods/TheDevourerofCods.cs @@ -1,10 +1,11 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; +using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Items.Materials; -using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.DataStructures; @@ -34,8 +35,7 @@ namespace CalamityMod.Items.Fishing.FishingRods Item.shootSpeed = 20f; Item.shoot = ModContent.ProjectileType(); Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/LabFinders/CyanSeekingMechanism.cs b/Items/LabFinders/CyanSeekingMechanism.cs index 7ed2ee5de6..f8bdafb1b1 100644 --- a/Items/LabFinders/CyanSeekingMechanism.cs +++ b/Items/LabFinders/CyanSeekingMechanism.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.LabFinders Item.Calamity().MaxCharge = 100; Item.Calamity().ChargePerUse = 15; Item.Calamity().UsesCharge = true; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && CalamityWorld.SunkenSeaLabCenter != Vector2.Zero; diff --git a/Items/LabFinders/GreenSeekingMechanism.cs b/Items/LabFinders/GreenSeekingMechanism.cs index 87a5c963e3..1f6bbff7c7 100644 --- a/Items/LabFinders/GreenSeekingMechanism.cs +++ b/Items/LabFinders/GreenSeekingMechanism.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.LabFinders Item.Calamity().MaxCharge = 100; Item.Calamity().ChargePerUse = 15; Item.Calamity().UsesCharge = true; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && CalamityWorld.JungleLabCenter != Vector2.Zero; diff --git a/Items/LabFinders/LabSeekingMechanism.cs b/Items/LabFinders/LabSeekingMechanism.cs index e8ef2ed753..26da0fa75c 100644 --- a/Items/LabFinders/LabSeekingMechanism.cs +++ b/Items/LabFinders/LabSeekingMechanism.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria.ID; using Terraria.ModLoader; @@ -18,7 +19,7 @@ namespace CalamityMod.Items.LabFinders { Item.width = 24; Item.height = 26; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/LabFinders/PurpleSeekingMechanism.cs b/Items/LabFinders/PurpleSeekingMechanism.cs index 9f3d3d782a..56c5736d4b 100644 --- a/Items/LabFinders/PurpleSeekingMechanism.cs +++ b/Items/LabFinders/PurpleSeekingMechanism.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.LabFinders Item.Calamity().MaxCharge = 100; Item.Calamity().ChargePerUse = 15; Item.Calamity().UsesCharge = true; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && CalamityWorld.PlanetoidLabCenter != Vector2.Zero; diff --git a/Items/LabFinders/RedSeekingMechanism.cs b/Items/LabFinders/RedSeekingMechanism.cs index 4d6f9e7c68..dcca0a6bee 100644 --- a/Items/LabFinders/RedSeekingMechanism.cs +++ b/Items/LabFinders/RedSeekingMechanism.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.LabFinders Item.Calamity().MaxCharge = 100; Item.Calamity().ChargePerUse = 15; Item.Calamity().UsesCharge = true; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && CalamityWorld.HellLabCenter != Vector2.Zero; diff --git a/Items/LabFinders/YellowSeekingMechanism.cs b/Items/LabFinders/YellowSeekingMechanism.cs index beb3c5702f..36b045645e 100644 --- a/Items/LabFinders/YellowSeekingMechanism.cs +++ b/Items/LabFinders/YellowSeekingMechanism.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.LabFinders Item.Calamity().MaxCharge = 100; Item.Calamity().ChargePerUse = 15; Item.Calamity().UsesCharge = true; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && CalamityWorld.IceLabCenter != Vector2.Zero; diff --git a/Items/LoreItems/KnowledgeCalamitas.cs b/Items/LoreItems/KnowledgeCalamitas.cs index e3325c073b..056c8b57ba 100644 --- a/Items/LoreItems/KnowledgeCalamitas.cs +++ b/Items/LoreItems/KnowledgeCalamitas.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,9 +23,8 @@ namespace CalamityMod.Items.LoreItems { Item.width = 20; Item.height = 20; - Item.rare = ItemRarityID.Red; Item.consumable = false; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeDevourerofGods.cs b/Items/LoreItems/KnowledgeDevourerofGods.cs index 243a37ab26..1e61229979 100644 --- a/Items/LoreItems/KnowledgeDevourerofGods.cs +++ b/Items/LoreItems/KnowledgeDevourerofGods.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,9 +22,8 @@ namespace CalamityMod.Items.LoreItems { Item.width = 20; Item.height = 20; - Item.rare = ItemRarityID.Red; Item.consumable = false; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeExoMechs.cs b/Items/LoreItems/KnowledgeExoMechs.cs index 7b413c9ed2..37332d507d 100644 --- a/Items/LoreItems/KnowledgeExoMechs.cs +++ b/Items/LoreItems/KnowledgeExoMechs.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,9 +22,8 @@ namespace CalamityMod.Items.LoreItems { Item.width = 20; Item.height = 20; - Item.rare = ItemRarityID.Red; Item.consumable = false; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) => false; diff --git a/Items/LoreItems/KnowledgeOldDuke.cs b/Items/LoreItems/KnowledgeOldDuke.cs index 90e5f5dfba..cab1a2821d 100644 --- a/Items/LoreItems/KnowledgeOldDuke.cs +++ b/Items/LoreItems/KnowledgeOldDuke.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,7 +22,7 @@ namespace CalamityMod.Items.LoreItems { Item.width = 20; Item.height = 20; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.consumable = false; } diff --git a/Items/LoreItems/KnowledgePolterghast.cs b/Items/LoreItems/KnowledgePolterghast.cs index a278062ed1..ef2714fa56 100644 --- a/Items/LoreItems/KnowledgePolterghast.cs +++ b/Items/LoreItems/KnowledgePolterghast.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,9 +22,8 @@ namespace CalamityMod.Items.LoreItems { Item.width = 20; Item.height = 20; - Item.rare = ItemRarityID.Red; Item.consumable = false; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeProvidence.cs b/Items/LoreItems/KnowledgeProvidence.cs index d51398fc9f..bbad13b0e8 100644 --- a/Items/LoreItems/KnowledgeProvidence.cs +++ b/Items/LoreItems/KnowledgeProvidence.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,9 +22,8 @@ namespace CalamityMod.Items.LoreItems { Item.width = 20; Item.height = 20; - Item.rare = ItemRarityID.Red; Item.consumable = false; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeSentinels.cs b/Items/LoreItems/KnowledgeSentinels.cs index 3e160c5c14..6056a32d0c 100644 --- a/Items/LoreItems/KnowledgeSentinels.cs +++ b/Items/LoreItems/KnowledgeSentinels.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -22,9 +23,8 @@ namespace CalamityMod.Items.LoreItems { Item.width = 20; Item.height = 20; - Item.rare = ItemRarityID.Red; Item.consumable = false; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeYharon.cs b/Items/LoreItems/KnowledgeYharon.cs index 5903f88ad1..e3eab00918 100644 --- a/Items/LoreItems/KnowledgeYharon.cs +++ b/Items/LoreItems/KnowledgeYharon.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,9 +22,8 @@ namespace CalamityMod.Items.LoreItems { Item.width = 20; Item.height = 20; - Item.rare = ItemRarityID.Red; Item.consumable = false; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) diff --git a/Items/Materials/ArmoredShell.cs b/Items/Materials/ArmoredShell.cs index 6edadb7bb8..9ac8219573 100644 --- a/Items/Materials/ArmoredShell.cs +++ b/Items/Materials/ArmoredShell.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -19,7 +20,6 @@ namespace CalamityMod.Items.Materials Item.height = 34; Item.maxStack = 999; Item.value = Item.buyPrice(0, 7, 0, 0); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } } } diff --git a/Items/Materials/AscendantSpiritEssence.cs b/Items/Materials/AscendantSpiritEssence.cs index 397bc0905c..9d0d402d4a 100644 --- a/Items/Materials/AscendantSpiritEssence.cs +++ b/Items/Materials/AscendantSpiritEssence.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; @@ -28,8 +29,7 @@ namespace CalamityMod.Items.Materials Item.width = 32; Item.height = 54; Item.maxStack = 999; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(gold: 40); } public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) diff --git a/Items/Materials/AshesofAnnihilation.cs b/Items/Materials/AshesofAnnihilation.cs index 4645433d02..7ac4f66962 100644 --- a/Items/Materials/AshesofAnnihilation.cs +++ b/Items/Materials/AshesofAnnihilation.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -27,9 +28,8 @@ namespace CalamityMod.Items.Materials Item.width = 54; Item.height = 56; Item.maxStack = 999; - Item.rare = ItemRarityID.Purple; Item.value = Item.sellPrice(gold: 66, silver: 66, copper: 66); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public void DrawPulsingAfterimage(SpriteBatch spriteBatch, Vector2 baseDrawPosition, Rectangle frame, float baseScale) { diff --git a/Items/Materials/AuricBar.cs b/Items/Materials/AuricBar.cs index 397120f7f1..63e8a59bfc 100644 --- a/Items/Materials/AuricBar.cs +++ b/Items/Materials/AuricBar.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using CalamityMod.Tiles; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; @@ -30,7 +31,7 @@ namespace CalamityMod.Items.Materials Item.height = 30; Item.maxStack = 999; Item.value = Item.sellPrice(gold: 60); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.useStyle = ItemUseStyleID.Swing; Item.useTurn = true; Item.useAnimation = 15; diff --git a/Items/Materials/Bloodstone.cs b/Items/Materials/Bloodstone.cs index 0527d7486a..168b43fa26 100644 --- a/Items/Materials/Bloodstone.cs +++ b/Items/Materials/Bloodstone.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -19,8 +20,7 @@ namespace CalamityMod.Items.Materials Item.height = 10; Item.maxStack = 999; Item.value = Item.sellPrice(silver: 60); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } } } diff --git a/Items/Materials/BloodstoneCore.cs b/Items/Materials/BloodstoneCore.cs index 4e02bf5a6a..5095506abd 100644 --- a/Items/Materials/BloodstoneCore.cs +++ b/Items/Materials/BloodstoneCore.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -19,8 +20,7 @@ namespace CalamityMod.Items.Materials Item.height = 12; Item.maxStack = 999; Item.value = Item.sellPrice(gold: 4); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Materials/CosmiliteBar.cs b/Items/Materials/CosmiliteBar.cs index 7c4171eb35..3cf0d46f16 100644 --- a/Items/Materials/CosmiliteBar.cs +++ b/Items/Materials/CosmiliteBar.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles; +using CalamityMod.Rarities; +using CalamityMod.Tiles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -27,8 +28,7 @@ namespace CalamityMod.Items.Materials Item.height = 24; Item.maxStack = 999; Item.value = Item.sellPrice(gold: 20); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.useStyle = ItemUseStyleID.Swing; Item.useTurn = true; Item.useAnimation = 15; diff --git a/Items/Materials/DarkPlasma.cs b/Items/Materials/DarkPlasma.cs index 2d752c53f8..c9b0d4a68b 100644 --- a/Items/Materials/DarkPlasma.cs +++ b/Items/Materials/DarkPlasma.cs @@ -1,6 +1,7 @@ -using Terraria; -using Terraria.ID; +using CalamityMod.Rarities; +using Terraria; using Terraria.DataStructures; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Materials @@ -23,8 +24,7 @@ namespace CalamityMod.Items.Materials Item.height = 12; Item.maxStack = 999; Item.value = Item.buyPrice(0, 7, 0, 0); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void Update(ref float gravity, ref float maxFallSpeed) { diff --git a/Items/Materials/DarksunFragment.cs b/Items/Materials/DarksunFragment.cs index 6b17733bbc..eb55960517 100644 --- a/Items/Materials/DarksunFragment.cs +++ b/Items/Materials/DarksunFragment.cs @@ -1,10 +1,11 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; -using Terraria.ID; using Terraria.DataStructures; -using Terraria.ModLoader; using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Materials { @@ -28,9 +29,8 @@ namespace CalamityMod.Items.Materials Item.width = 28; Item.height = 32; Item.maxStack = 999; - Item.rare = ItemRarityID.Purple; Item.value = Item.sellPrice(gold: 12); - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) diff --git a/Items/Materials/DivineGeode.cs b/Items/Materials/DivineGeode.cs index e7791dcbde..c3b49fca02 100644 --- a/Items/Materials/DivineGeode.cs +++ b/Items/Materials/DivineGeode.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -19,9 +20,8 @@ namespace CalamityMod.Items.Materials Item.width = 15; Item.height = 12; Item.maxStack = 999; - Item.rare = ItemRarityID.Purple; Item.value = Item.buyPrice(0, 6, 50, 0); - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void Update(ref float gravity, ref float maxFallSpeed) { diff --git a/Items/Materials/DubiousPlating.cs b/Items/Materials/DubiousPlating.cs index 424f63e8a3..8f213e8706 100644 --- a/Items/Materials/DubiousPlating.cs +++ b/Items/Materials/DubiousPlating.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -17,8 +18,7 @@ namespace CalamityMod.Items.Materials Item.width = 30; Item.height = 24; Item.maxStack = 999; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(silver: 6); } } } diff --git a/Items/Materials/EndothermicEnergy.cs b/Items/Materials/EndothermicEnergy.cs index 3eb420ab8c..a6be15323c 100644 --- a/Items/Materials/EndothermicEnergy.cs +++ b/Items/Materials/EndothermicEnergy.cs @@ -1,10 +1,11 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; -using Terraria.ModLoader; using Terraria.DataStructures; -using Terraria.ID; using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Materials { @@ -28,9 +29,8 @@ namespace CalamityMod.Items.Materials Item.width = 36; Item.height = 38; Item.maxStack = 999; - Item.rare = ItemRarityID.Red; Item.value = Item.sellPrice(gold: 2); - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) diff --git a/Items/Materials/ExoPrism.cs b/Items/Materials/ExoPrism.cs index 4260537d51..738fe4ea95 100644 --- a/Items/Materials/ExoPrism.cs +++ b/Items/Materials/ExoPrism.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.GameContent; @@ -22,9 +23,8 @@ namespace CalamityMod.Items.Materials Item.width = 32; Item.height = 52; Item.maxStack = 999; - Item.rare = ItemRarityID.Purple; Item.value = Item.sellPrice(gold: 60); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public void DrawBackAfterimage(SpriteBatch spriteBatch, Vector2 baseDrawPosition, Rectangle frame, float baseScale) { diff --git a/Items/Materials/MiracleMatter.cs b/Items/Materials/MiracleMatter.cs index 287920bae9..1a12655d28 100644 --- a/Items/Materials/MiracleMatter.cs +++ b/Items/Materials/MiracleMatter.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Rarities; +using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -24,9 +25,8 @@ namespace CalamityMod.Items.Materials Item.width = 46; Item.height = 64; Item.maxStack = 999; - Item.rare = ItemRarityID.Purple; Item.value = Item.sellPrice(platinum: 6, gold: 50); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public void DrawBackAfterimage(SpriteBatch spriteBatch, Vector2 baseDrawPosition, Rectangle frame, float baseScale) diff --git a/Items/Materials/MysteriousCircuitry.cs b/Items/Materials/MysteriousCircuitry.cs index 94cd36509b..33ab218335 100644 --- a/Items/Materials/MysteriousCircuitry.cs +++ b/Items/Materials/MysteriousCircuitry.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -17,8 +18,7 @@ namespace CalamityMod.Items.Materials Item.width = 30; Item.height = 24; Item.maxStack = 999; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(silver: 6); } } } diff --git a/Items/Materials/NightmareFuel.cs b/Items/Materials/NightmareFuel.cs index 7fdde445b8..7a246ad080 100644 --- a/Items/Materials/NightmareFuel.cs +++ b/Items/Materials/NightmareFuel.cs @@ -1,10 +1,11 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; -using Terraria.ModLoader; using Terraria.DataStructures; -using Terraria.ID; using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Materials { @@ -28,9 +29,8 @@ namespace CalamityMod.Items.Materials Item.width = 38; Item.height = 36; Item.maxStack = 999; - Item.rare = ItemRarityID.Red; Item.value = Item.sellPrice(gold: 2); - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) diff --git a/Items/Materials/PlasmaDriveCore.cs b/Items/Materials/PlasmaDriveCore.cs index cc1db25aba..2deaf42af6 100644 --- a/Items/Materials/PlasmaDriveCore.cs +++ b/Items/Materials/PlasmaDriveCore.cs @@ -1,11 +1,12 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Graphics.Shaders; -using System; -using Terraria.GameContent; namespace CalamityMod.Items.Materials { @@ -24,8 +25,7 @@ namespace CalamityMod.Items.Materials Item.height = 30; Item.maxStack = 999; Item.value = Item.buyPrice(0, 0, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); } public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) diff --git a/Items/Materials/ReaperTooth.cs b/Items/Materials/ReaperTooth.cs index 5d1bb1e781..33b3f4fe69 100644 --- a/Items/Materials/ReaperTooth.cs +++ b/Items/Materials/ReaperTooth.cs @@ -1,6 +1,7 @@ -using Terraria; -using Terraria.ModLoader; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Materials { @@ -19,8 +20,7 @@ namespace CalamityMod.Items.Materials Item.height = 26; Item.maxStack = 999; Item.value = Item.buyPrice(0, 7, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } } } diff --git a/Items/Materials/RuinousSoul.cs b/Items/Materials/RuinousSoul.cs index 19195eb912..69a869a75a 100644 --- a/Items/Materials/RuinousSoul.cs +++ b/Items/Materials/RuinousSoul.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Materials Item.height = 42; Item.maxStack = 999; Item.value = Item.buyPrice(0, 7, 0, 0); - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } } } diff --git a/Items/Materials/ShadowspecBar.cs b/Items/Materials/ShadowspecBar.cs index 47a24af638..11531a20a4 100644 --- a/Items/Materials/ShadowspecBar.cs +++ b/Items/Materials/ShadowspecBar.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles; +using CalamityMod.Rarities; +using CalamityMod.Tiles; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Materials Item.consumable = true; Item.value = Item.sellPrice(platinum: 1, gold: 92); - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) diff --git a/Items/Materials/SuspiciousScrap.cs b/Items/Materials/SuspiciousScrap.cs index 0bafe069c3..19f206a1d9 100644 --- a/Items/Materials/SuspiciousScrap.cs +++ b/Items/Materials/SuspiciousScrap.cs @@ -1,10 +1,11 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Rarities; +using CalamityMod.World; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.World; -using Terraria.GameContent; namespace CalamityMod.Items.Materials { @@ -23,8 +24,7 @@ namespace CalamityMod.Items.Materials Item.height = 30; Item.maxStack = 999; Item.value = Item.buyPrice(0, 0, 0, 20); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); } public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) { diff --git a/Items/Materials/TwistingNether.cs b/Items/Materials/TwistingNether.cs index 68d257cdad..85ed09f48a 100644 --- a/Items/Materials/TwistingNether.cs +++ b/Items/Materials/TwistingNether.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Materials Item.height = 12; Item.maxStack = 999; Item.value = Item.buyPrice(0, 7, 0, 0); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void Update(ref float gravity, ref float maxFallSpeed) { diff --git a/Items/Materials/UelibloomBar.cs b/Items/Materials/UelibloomBar.cs index 6b1b56336f..e16bad297c 100644 --- a/Items/Materials/UelibloomBar.cs +++ b/Items/Materials/UelibloomBar.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using CalamityMod.Tiles; using Terraria; using Terraria.ID; @@ -22,9 +23,8 @@ namespace CalamityMod.Items.Materials Item.width = 15; Item.height = 12; Item.maxStack = 999; - Item.rare = ItemRarityID.Red; Item.value = Item.sellPrice(gold: 5); - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.useStyle = ItemUseStyleID.Swing; Item.useTurn = true; Item.useAnimation = 15; diff --git a/Items/Materials/YharonSoulFragment.cs b/Items/Materials/YharonSoulFragment.cs index 5dd1b03b0e..8f57f064b5 100644 --- a/Items/Materials/YharonSoulFragment.cs +++ b/Items/Materials/YharonSoulFragment.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Materials Item.height = 14; Item.maxStack = 999; Item.value = Item.sellPrice(gold: 45); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } } } diff --git a/Items/Mounts/Brimrose.cs b/Items/Mounts/Brimrose.cs index 0bf08c0486..d1e2833c03 100644 --- a/Items/Mounts/Brimrose.cs +++ b/Items/Mounts/Brimrose.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -26,7 +27,7 @@ namespace CalamityMod.Items.Mounts Item.mountType = ModContent.MountType(); Item.value = Item.buyPrice(platinum: 1, gold: 50); - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Mounts/ExoThrone.cs b/Items/Mounts/ExoThrone.cs index 3d0fd6b102..6815d7a0d0 100644 --- a/Items/Mounts/ExoThrone.cs +++ b/Items/Mounts/ExoThrone.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using CalamityMod.Rarities; +using System.Collections.Generic; using System.Linq; using Terraria.ID; using Terraria.ModLoader; @@ -28,7 +29,7 @@ namespace CalamityMod.Items.Mounts Item.mountType = ModContent.MountType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void ModifyTooltips(List list) diff --git a/Items/Mounts/Fabsol.cs b/Items/Mounts/Fabsol.cs index aa2847f91c..9d6b2b7d31 100644 --- a/Items/Mounts/Fabsol.cs +++ b/Items/Mounts/Fabsol.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -26,7 +27,7 @@ namespace CalamityMod.Items.Mounts Item.mountType = ModContent.MountType(); Item.value = Item.buyPrice(platinum: 3); - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } } diff --git a/Items/Mounts/GazeOfCrysthamyr.cs b/Items/Mounts/GazeOfCrysthamyr.cs index 4e724482d1..8ccda72dee 100644 --- a/Items/Mounts/GazeOfCrysthamyr.cs +++ b/Items/Mounts/GazeOfCrysthamyr.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Mounts Item.useStyle = ItemUseStyleID.HoldUp; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.UseSound = SoundID.NPCHit56; diff --git a/Items/Mounts/Minecarts/TheCartofGods.cs b/Items/Mounts/Minecarts/TheCartofGods.cs index ed7b6c9c2b..cce1061c75 100644 --- a/Items/Mounts/Minecarts/TheCartofGods.cs +++ b/Items/Mounts/Minecarts/TheCartofGods.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -20,8 +21,7 @@ namespace CalamityMod.Items.Mounts.Minecarts Item.useStyle = ItemUseStyleID.Swing; Item.value = Item.sellPrice(gold: 30); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.UseSound = SoundID.Item68; diff --git a/Items/PermanentBoosters/Dragonfruit.cs b/Items/PermanentBoosters/Dragonfruit.cs index a4a752dac8..d1d4dcb7d1 100644 --- a/Items/PermanentBoosters/Dragonfruit.cs +++ b/Items/PermanentBoosters/Dragonfruit.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; @@ -32,8 +33,7 @@ namespace CalamityMod.Items.PermanentBoosters Item.useStyle = ItemUseStyleID.HoldUp; Item.UseSound = SoundID.Item4; Item.consumable = true; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) diff --git a/Items/PermanentBoosters/Ectoheart.cs b/Items/PermanentBoosters/Ectoheart.cs index c3a74fee90..73bb6a8a07 100644 --- a/Items/PermanentBoosters/Ectoheart.cs +++ b/Items/PermanentBoosters/Ectoheart.cs @@ -1,4 +1,5 @@ using CalamityMod.CalPlayer; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -28,8 +29,7 @@ namespace CalamityMod.Items.PermanentBoosters Item.useStyle = ItemUseStyleID.HoldUp; Item.UseSound = SoundID.Item122; Item.consumable = true; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; // Not researchable, only drops one time. + Item.rare = ModContent.RarityType(); // Not researchable, only drops one time. } public override bool CanUseItem(Player player) => !player.Calamity().adrenalineBoostThree; diff --git a/Items/PermanentBoosters/Elderberry.cs b/Items/PermanentBoosters/Elderberry.cs index cfda237778..7e257082d7 100644 --- a/Items/PermanentBoosters/Elderberry.cs +++ b/Items/PermanentBoosters/Elderberry.cs @@ -1,11 +1,12 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; +using System.Linq; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Linq; -using System.Collections.Generic; namespace CalamityMod.Items.PermanentBoosters { @@ -27,8 +28,7 @@ namespace CalamityMod.Items.PermanentBoosters Item.width = 38; Item.height = 34; Item.useAnimation = 30; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.useTime = 30; Item.useStyle = ItemUseStyleID.HoldUp; Item.UseSound = SoundID.Item4; diff --git a/Items/PermanentBoosters/PhantomHeart.cs b/Items/PermanentBoosters/PhantomHeart.cs index e18caf2985..07b6dfa1ca 100644 --- a/Items/PermanentBoosters/PhantomHeart.cs +++ b/Items/PermanentBoosters/PhantomHeart.cs @@ -1,11 +1,12 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; +using System.Linq; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Linq; -using System.Collections.Generic; namespace CalamityMod.Items.PermanentBoosters { @@ -29,8 +30,7 @@ namespace CalamityMod.Items.PermanentBoosters Item.useStyle = ItemUseStyleID.HoldUp; Item.UseSound = SoundID.Item29; Item.consumable = true; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) diff --git a/Items/Pets/BrimstoneJewel.cs b/Items/Pets/BrimstoneJewel.cs index cc32264382..d1a9f7e642 100644 --- a/Items/Pets/BrimstoneJewel.cs +++ b/Items/Pets/BrimstoneJewel.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Pets Item.buffType = ModContent.BuffType(); Item.value = Item.sellPrice(gold: 40); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Pets/CosmicPlushie.cs b/Items/Pets/CosmicPlushie.cs index 9e9b1ccc51..3fe7593be2 100644 --- a/Items/Pets/CosmicPlushie.cs +++ b/Items/Pets/CosmicPlushie.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -30,7 +31,7 @@ namespace CalamityMod.Items.Pets Item.UseSound = SoundID.Meowmere; Item.value = Item.sellPrice(gold: 7); - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Pets/ForgottenDragonEgg.cs b/Items/Pets/ForgottenDragonEgg.cs index f4c5ce5ed3..cc253d9014 100644 --- a/Items/Pets/ForgottenDragonEgg.cs +++ b/Items/Pets/ForgottenDragonEgg.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Pets Item.buffType = ModContent.BuffType(); Item.value = Item.sellPrice(gold: 30); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Pets/FoxDrive.cs b/Items/Pets/FoxDrive.cs index 89f2257967..e25a138db9 100644 --- a/Items/Pets/FoxDrive.cs +++ b/Items/Pets/FoxDrive.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Pets Item.expert = true; Item.value = Item.sellPrice(gold: 30); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Pets/Levi.cs b/Items/Pets/Levi.cs index 2ec54075a7..db05a825b1 100644 --- a/Items/Pets/Levi.cs +++ b/Items/Pets/Levi.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Pets Item.buffType = ModContent.BuffType(); Item.value = Item.sellPrice(gold: 40); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Pets/LittleLight.cs b/Items/Pets/LittleLight.cs index f8ed2d127e..278e9ccfd6 100644 --- a/Items/Pets/LittleLight.cs +++ b/Items/Pets/LittleLight.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -26,8 +27,7 @@ namespace CalamityMod.Items.Pets Item.buffType = ModContent.BuffType(); Item.value = Item.sellPrice(gold: 15); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Pets/McNuggets.cs b/Items/Pets/McNuggets.cs index 0661024552..4a11496017 100644 --- a/Items/Pets/McNuggets.cs +++ b/Items/Pets/McNuggets.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Pets; using CalamityMod.Projectiles.Pets; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Pets Item.buffType = ModContent.BuffType(); Item.value = Item.sellPrice(gold: 30); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void UseStyle(Player player, Rectangle heldItemFrame) diff --git a/Items/Placeables/DraedonStructures/AgedLaboratoryDoorItem.cs b/Items/Placeables/DraedonStructures/AgedLaboratoryDoorItem.cs index 97f55ef5cd..ea59cc3042 100644 --- a/Items/Placeables/DraedonStructures/AgedLaboratoryDoorItem.cs +++ b/Items/Placeables/DraedonStructures/AgedLaboratoryDoorItem.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.DraedonStructures; using Terraria.ID; using Terraria.ModLoader; @@ -22,8 +23,7 @@ namespace CalamityMod.Items.Placeables.DraedonStructures Item.useAnimation = 15; Item.useTime = 10; Item.useStyle = ItemUseStyleID.Swing; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.consumable = true; Item.createTile = ModContent.TileType(); } diff --git a/Items/Placeables/DraedonStructures/AgedSecurityChest.cs b/Items/Placeables/DraedonStructures/AgedSecurityChest.cs index 1f1b384525..085b50921d 100644 --- a/Items/Placeables/DraedonStructures/AgedSecurityChest.cs +++ b/Items/Placeables/DraedonStructures/AgedSecurityChest.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.DraedonStructures; using Terraria.ID; using Terraria.ModLoader; @@ -22,8 +23,7 @@ namespace CalamityMod.Items.Placeables.DraedonStructures Item.autoReuse = true; Item.useAnimation = 15; Item.useTime = 14; - Item.rare = ItemRarityID.Green; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.value = 500; diff --git a/Items/Placeables/DraedonStructures/ChargingStationItem.cs b/Items/Placeables/DraedonStructures/ChargingStationItem.cs index 6d30809e2d..b66477d841 100644 --- a/Items/Placeables/DraedonStructures/ChargingStationItem.cs +++ b/Items/Placeables/DraedonStructures/ChargingStationItem.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.DraedonStructures; using Terraria; using Terraria.ID; @@ -27,8 +28,7 @@ namespace CalamityMod.Items.Placeables.DraedonStructures Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.value = Item.buyPrice(gold: 50); } } diff --git a/Items/Placeables/DraedonStructures/LabHologramProjectorItem.cs b/Items/Placeables/DraedonStructures/LabHologramProjectorItem.cs index fee2adafb2..99211770fb 100644 --- a/Items/Placeables/DraedonStructures/LabHologramProjectorItem.cs +++ b/Items/Placeables/DraedonStructures/LabHologramProjectorItem.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.DraedonMisc; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.DraedonStructures; using Terraria; using Terraria.ID; @@ -27,8 +28,7 @@ namespace CalamityMod.Items.Placeables.DraedonStructures Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.value = Item.buyPrice(gold: 5); - Item.rare = ItemRarityID.Orange; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.createTile = ModContent.TileType(); } diff --git a/Items/Placeables/DraedonStructures/LaboratoryDoorItem.cs b/Items/Placeables/DraedonStructures/LaboratoryDoorItem.cs index 7b07470423..787153b230 100644 --- a/Items/Placeables/DraedonStructures/LaboratoryDoorItem.cs +++ b/Items/Placeables/DraedonStructures/LaboratoryDoorItem.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.DraedonStructures; using Terraria.ID; using Terraria.ModLoader; @@ -22,8 +23,7 @@ namespace CalamityMod.Items.Placeables.DraedonStructures Item.useAnimation = 15; Item.useTime = 10; Item.useStyle = ItemUseStyleID.Swing; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.consumable = true; Item.createTile = ModContent.TileType(); } diff --git a/Items/Placeables/DraedonStructures/PowerCellFactoryItem.cs b/Items/Placeables/DraedonStructures/PowerCellFactoryItem.cs index 4559888e65..3844b6b0a0 100644 --- a/Items/Placeables/DraedonStructures/PowerCellFactoryItem.cs +++ b/Items/Placeables/DraedonStructures/PowerCellFactoryItem.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.DraedonStructures; using Terraria; using Terraria.ID; @@ -26,8 +27,7 @@ namespace CalamityMod.Items.Placeables.DraedonStructures Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.value = Item.buyPrice(gold: 50); } } diff --git a/Items/Placeables/DraedonStructures/SecurityChest.cs b/Items/Placeables/DraedonStructures/SecurityChest.cs index b41b1e861c..42cb9e63f6 100644 --- a/Items/Placeables/DraedonStructures/SecurityChest.cs +++ b/Items/Placeables/DraedonStructures/SecurityChest.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.DraedonStructures; using Terraria.ID; using Terraria.ModLoader; @@ -22,8 +23,7 @@ namespace CalamityMod.Items.Placeables.DraedonStructures Item.autoReuse = true; Item.useAnimation = 15; Item.useTime = 14; - Item.rare = ItemRarityID.Orange; - Item.Calamity().customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.value = 500; diff --git a/Items/Placeables/Furniture/AltarOfTheAccursedItem.cs b/Items/Placeables/Furniture/AltarOfTheAccursedItem.cs index 3505cecbc1..f9467a4f2f 100644 --- a/Items/Placeables/Furniture/AltarOfTheAccursedItem.cs +++ b/Items/Placeables/Furniture/AltarOfTheAccursedItem.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; @@ -31,7 +32,7 @@ namespace CalamityMod.Items.Placeables.Furniture Item.height = 48; Item.maxStack = 999; Item.useStyle = ItemUseStyleID.Swing; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/Furniture/AuricToilet.cs b/Items/Placeables/Furniture/AuricToilet.cs index 92acab9a4a..3d56aa97d5 100644 --- a/Items/Placeables/Furniture/AuricToilet.cs +++ b/Items/Placeables/Furniture/AuricToilet.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Placeables.FurnitureBotanic; using CalamityMod.Items.Placeables.FurnitureCosmilite; using CalamityMod.Items.Placeables.FurnitureSilva; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; @@ -30,7 +31,7 @@ namespace CalamityMod.Items.Placeables.Furniture Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/Furniture/CraftingStations/CosmicAnvilItem.cs b/Items/Placeables/Furniture/CraftingStations/CosmicAnvilItem.cs index d411993af4..154d1a8ae1 100644 --- a/Items/Placeables/Furniture/CraftingStations/CosmicAnvilItem.cs +++ b/Items/Placeables/Furniture/CraftingStations/CosmicAnvilItem.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -30,8 +31,7 @@ namespace CalamityMod.Items.Placeables.Furniture.CraftingStations Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(platinum: 2, gold: 50); } diff --git a/Items/Placeables/Furniture/CraftingStations/DraedonsForge.cs b/Items/Placeables/Furniture/CraftingStations/DraedonsForge.cs index 30b1e1b268..21ceba638a 100644 --- a/Items/Placeables/Furniture/CraftingStations/DraedonsForge.cs +++ b/Items/Placeables/Furniture/CraftingStations/DraedonsForge.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -28,8 +29,7 @@ namespace CalamityMod.Items.Placeables.Furniture.CraftingStations Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(platinum: 27, gold: 50); } diff --git a/Items/Placeables/Furniture/ThaumaticChair.cs b/Items/Placeables/Furniture/ThaumaticChair.cs index 26beea17ff..48bccbb2a3 100644 --- a/Items/Placeables/Furniture/ThaumaticChair.cs +++ b/Items/Placeables/Furniture/ThaumaticChair.cs @@ -11,6 +11,7 @@ using CalamityMod.Items.Placeables.FurnitureSilva; using CalamityMod.Items.Placeables.FurnitureStatigel; using CalamityMod.Items.Placeables.FurnitureStratus; using CalamityMod.Items.Placeables.FurnitureVoid; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; @@ -40,7 +41,7 @@ namespace CalamityMod.Items.Placeables.Furniture Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Placeables/FurnitureExo/ExoBathtub.cs b/Items/Placeables/FurnitureExo/ExoBathtub.cs index 47e348f6d1..a533d0eacd 100644 --- a/Items/Placeables/FurnitureExo/ExoBathtub.cs +++ b/Items/Placeables/FurnitureExo/ExoBathtub.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoBed.cs b/Items/Placeables/FurnitureExo/ExoBed.cs index ff187454df..ab26c1be01 100644 --- a/Items/Placeables/FurnitureExo/ExoBed.cs +++ b/Items/Placeables/FurnitureExo/ExoBed.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoBookcase.cs b/Items/Placeables/FurnitureExo/ExoBookcase.cs index 438627f431..ddd61d72d2 100644 --- a/Items/Placeables/FurnitureExo/ExoBookcase.cs +++ b/Items/Placeables/FurnitureExo/ExoBookcase.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoCandelabra.cs b/Items/Placeables/FurnitureExo/ExoCandelabra.cs index 88b7f9e119..4ac4b4a130 100644 --- a/Items/Placeables/FurnitureExo/ExoCandelabra.cs +++ b/Items/Placeables/FurnitureExo/ExoCandelabra.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.DraedonMisc; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoCandle.cs b/Items/Placeables/FurnitureExo/ExoCandle.cs index 085a0e9fa6..746c479792 100644 --- a/Items/Placeables/FurnitureExo/ExoCandle.cs +++ b/Items/Placeables/FurnitureExo/ExoCandle.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.DraedonMisc; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoChair.cs b/Items/Placeables/FurnitureExo/ExoChair.cs index 1aae27065f..f968d009ad 100644 --- a/Items/Placeables/FurnitureExo/ExoChair.cs +++ b/Items/Placeables/FurnitureExo/ExoChair.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoChandelier.cs b/Items/Placeables/FurnitureExo/ExoChandelier.cs index c38391a20f..59a129ab75 100644 --- a/Items/Placeables/FurnitureExo/ExoChandelier.cs +++ b/Items/Placeables/FurnitureExo/ExoChandelier.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.DraedonMisc; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoChest.cs b/Items/Placeables/FurnitureExo/ExoChest.cs index cf44f37d75..5412a0139d 100644 --- a/Items/Placeables/FurnitureExo/ExoChest.cs +++ b/Items/Placeables/FurnitureExo/ExoChest.cs @@ -1,7 +1,8 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Rarities; +using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; -using Terraria.ModLoader; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.FurnitureExo { public class ExoChest : ModItem @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoClock.cs b/Items/Placeables/FurnitureExo/ExoClock.cs index 4777b5f2a8..a0ed61f3f9 100644 --- a/Items/Placeables/FurnitureExo/ExoClock.cs +++ b/Items/Placeables/FurnitureExo/ExoClock.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Rarities; +using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; using Terraria.ModLoader; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoConsole.cs b/Items/Placeables/FurnitureExo/ExoConsole.cs index fa7a97ae9e..29a5fe3f09 100644 --- a/Items/Placeables/FurnitureExo/ExoConsole.cs +++ b/Items/Placeables/FurnitureExo/ExoConsole.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.DraedonMisc; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoDisplay.cs b/Items/Placeables/FurnitureExo/ExoDisplay.cs index 631a6782a7..8bfc1c54c8 100644 --- a/Items/Placeables/FurnitureExo/ExoDisplay.cs +++ b/Items/Placeables/FurnitureExo/ExoDisplay.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.DraedonMisc; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoDoor.cs b/Items/Placeables/FurnitureExo/ExoDoor.cs index 0d52c3a447..4527d1188d 100644 --- a/Items/Placeables/FurnitureExo/ExoDoor.cs +++ b/Items/Placeables/FurnitureExo/ExoDoor.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoDresser.cs b/Items/Placeables/FurnitureExo/ExoDresser.cs index 84c0a8def3..d8a06e8cbb 100644 --- a/Items/Placeables/FurnitureExo/ExoDresser.cs +++ b/Items/Placeables/FurnitureExo/ExoDresser.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoKeyboard.cs b/Items/Placeables/FurnitureExo/ExoKeyboard.cs index c1e035ada7..6ad06e401f 100644 --- a/Items/Placeables/FurnitureExo/ExoKeyboard.cs +++ b/Items/Placeables/FurnitureExo/ExoKeyboard.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoLamp.cs b/Items/Placeables/FurnitureExo/ExoLamp.cs index 3e1604046f..9844fb5ef8 100644 --- a/Items/Placeables/FurnitureExo/ExoLamp.cs +++ b/Items/Placeables/FurnitureExo/ExoLamp.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.DraedonMisc; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoLantern.cs b/Items/Placeables/FurnitureExo/ExoLantern.cs index 199a22acbb..d5bd1e6647 100644 --- a/Items/Placeables/FurnitureExo/ExoLantern.cs +++ b/Items/Placeables/FurnitureExo/ExoLantern.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.DraedonMisc; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoPlatform.cs b/Items/Placeables/FurnitureExo/ExoPlatform.cs index 5ce29d2629..48826ccfda 100644 --- a/Items/Placeables/FurnitureExo/ExoPlatform.cs +++ b/Items/Placeables/FurnitureExo/ExoPlatform.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.FurnitureExo; +using CalamityMod.Rarities; +using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; using Terraria.ModLoader; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoPlating.cs b/Items/Placeables/FurnitureExo/ExoPlating.cs index c9d87be990..5f19777591 100644 --- a/Items/Placeables/FurnitureExo/ExoPlating.cs +++ b/Items/Placeables/FurnitureExo/ExoPlating.cs @@ -1,7 +1,8 @@ using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Walls; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; -using CalamityMod.Items.Placeables.Walls; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria.ID; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Placeables/FurnitureExo/ExoPrismPanel.cs b/Items/Placeables/FurnitureExo/ExoPrismPanel.cs index ff608adca4..86ebbf5e69 100644 --- a/Items/Placeables/FurnitureExo/ExoPrismPanel.cs +++ b/Items/Placeables/FurnitureExo/ExoPrismPanel.cs @@ -1,7 +1,8 @@ using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Walls; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; -using CalamityMod.Items.Placeables.Walls; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria.ID; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Placeables/FurnitureExo/ExoPrismPlatform.cs b/Items/Placeables/FurnitureExo/ExoPrismPlatform.cs index 9128c580ad..9286b10f15 100644 --- a/Items/Placeables/FurnitureExo/ExoPrismPlatform.cs +++ b/Items/Placeables/FurnitureExo/ExoPrismPlatform.cs @@ -1,4 +1,5 @@ -using CalamityMod.Tiles.FurnitureExo; +using CalamityMod.Rarities; +using CalamityMod.Tiles.FurnitureExo; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria.ID; @@ -26,7 +27,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Placeables/FurnitureExo/ExoScreen.cs b/Items/Placeables/FurnitureExo/ExoScreen.cs index 127f9076c8..a0deefeac7 100644 --- a/Items/Placeables/FurnitureExo/ExoScreen.cs +++ b/Items/Placeables/FurnitureExo/ExoScreen.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.DraedonMisc; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoServer.cs b/Items/Placeables/FurnitureExo/ExoServer.cs index c4c82e1a1d..59d3fd06ac 100644 --- a/Items/Placeables/FurnitureExo/ExoServer.cs +++ b/Items/Placeables/FurnitureExo/ExoServer.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.DraedonMisc; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoSink.cs b/Items/Placeables/FurnitureExo/ExoSink.cs index c3e89cfe2c..b50f0ce9ed 100644 --- a/Items/Placeables/FurnitureExo/ExoSink.cs +++ b/Items/Placeables/FurnitureExo/ExoSink.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoSofa.cs b/Items/Placeables/FurnitureExo/ExoSofa.cs index 1b529956d1..36b45ce273 100644 --- a/Items/Placeables/FurnitureExo/ExoSofa.cs +++ b/Items/Placeables/FurnitureExo/ExoSofa.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoTable.cs b/Items/Placeables/FurnitureExo/ExoTable.cs index 3d5f60f929..3dee022850 100644 --- a/Items/Placeables/FurnitureExo/ExoTable.cs +++ b/Items/Placeables/FurnitureExo/ExoTable.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoTerminal.cs b/Items/Placeables/FurnitureExo/ExoTerminal.cs index 5cbc24e433..fe803c52c8 100644 --- a/Items/Placeables/FurnitureExo/ExoTerminal.cs +++ b/Items/Placeables/FurnitureExo/ExoTerminal.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.DraedonMisc; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoToilet.cs b/Items/Placeables/FurnitureExo/ExoToilet.cs index f66b810661..3d9334d052 100644 --- a/Items/Placeables/FurnitureExo/ExoToilet.cs +++ b/Items/Placeables/FurnitureExo/ExoToilet.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/FurnitureExo/ExoWorkbench.cs b/Items/Placeables/FurnitureExo/ExoWorkbench.cs index 698976fdd4..05ffa261a6 100644 --- a/Items/Placeables/FurnitureExo/ExoWorkbench.cs +++ b/Items/Placeables/FurnitureExo/ExoWorkbench.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using CalamityMod.Tiles.FurnitureExo; using Terraria.ID; using Terraria.ModLoader; @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Placeables.FurnitureExo Item.useStyle = ItemUseStyleID.Swing; Item.consumable = true; Item.createTile = ModContent.TileType(); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Placeables/Ores/AuricOre.cs b/Items/Placeables/Ores/AuricOre.cs index 26fb196b6e..feeae0abce 100644 --- a/Items/Placeables/Ores/AuricOre.cs +++ b/Items/Placeables/Ores/AuricOre.cs @@ -1,3 +1,4 @@ +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -27,7 +28,7 @@ namespace CalamityMod.Items.Placeables.Ores Item.height = 10; Item.maxStack = 999; Item.value = Item.sellPrice(gold: 4); - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } } } diff --git a/Items/Placeables/Ores/UelibloomOre.cs b/Items/Placeables/Ores/UelibloomOre.cs index ffa95fd10f..b2dfa7d522 100644 --- a/Items/Placeables/Ores/UelibloomOre.cs +++ b/Items/Placeables/Ores/UelibloomOre.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Placeables.Ores Item.width = 10; Item.height = 10; Item.maxStack = 999; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(gold: 1); } } diff --git a/Items/Potions/CeaselessHungerPotion.cs b/Items/Potions/CeaselessHungerPotion.cs index 47ccedf363..4394be8a13 100644 --- a/Items/Potions/CeaselessHungerPotion.cs +++ b/Items/Potions/CeaselessHungerPotion.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,8 +22,7 @@ namespace CalamityMod.Items.Potions Item.height = 18; Item.useTurn = true; Item.maxStack = 30; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.useAnimation = 17; Item.useTime = 17; Item.useStyle = ItemUseStyleID.DrinkLiquid; diff --git a/Items/Potions/DraconicElixir.cs b/Items/Potions/DraconicElixir.cs index 48478a7c71..6facfe39ed 100644 --- a/Items/Potions/DraconicElixir.cs +++ b/Items/Potions/DraconicElixir.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -27,8 +28,7 @@ namespace CalamityMod.Items.Potions Item.height = 44; Item.useTurn = true; Item.maxStack = 30; - Item.Calamity().customRarity = CalamityRarity.Violet; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); Item.useAnimation = 17; Item.useTime = 17; Item.useStyle = ItemUseStyleID.DrinkLiquid; diff --git a/Items/Potions/OmegaHealingPotion.cs b/Items/Potions/OmegaHealingPotion.cs index a02c938662..0edeefbea6 100644 --- a/Items/Potions/OmegaHealingPotion.cs +++ b/Items/Potions/OmegaHealingPotion.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -28,8 +29,7 @@ namespace CalamityMod.Items.Potions Item.consumable = true; Item.potion = true; Item.value = Item.buyPrice(0, 7, 0, 0); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/SummonItems/BloodwormItem.cs b/Items/SummonItems/BloodwormItem.cs index bb5b317080..8bf6c43348 100644 --- a/Items/SummonItems/BloodwormItem.cs +++ b/Items/SummonItems/BloodwormItem.cs @@ -1,6 +1,7 @@ -using Terraria.ModLoader; -using CalamityMod.NPCs.AcidRain; +using CalamityMod.NPCs.AcidRain; +using CalamityMod.Rarities; using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.SummonItems { @@ -20,8 +21,7 @@ namespace CalamityMod.Items.SummonItems Item.width = 28; Item.height = 28; Item.maxStack = 9999; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.bait = 4444; Item.useStyle = ItemUseStyleID.Swing; Item.autoReuse = true; diff --git a/Items/SummonItems/CeremonialUrn.cs b/Items/SummonItems/CeremonialUrn.cs index 2a8387d8f4..1281f8401b 100644 --- a/Items/SummonItems/CeremonialUrn.cs +++ b/Items/SummonItems/CeremonialUrn.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; @@ -20,7 +21,7 @@ namespace CalamityMod.Items.SummonItems { Item.width = 34; Item.height = 54; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/SummonItems/CosmicWorm.cs b/Items/SummonItems/CosmicWorm.cs index 42f44653b6..a8a28fd954 100644 --- a/Items/SummonItems/CosmicWorm.cs +++ b/Items/SummonItems/CosmicWorm.cs @@ -1,11 +1,12 @@ using CalamityMod.Events; using CalamityMod.Items.Materials; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.SummonItems { @@ -28,8 +29,7 @@ namespace CalamityMod.Items.SummonItems Item.useTime = 10; Item.useStyle = ItemUseStyleID.HoldUp; Item.consumable = false; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/SummonItems/JungleDragonEgg.cs b/Items/SummonItems/JungleDragonEgg.cs index d704fc6189..a228a3f624 100644 --- a/Items/SummonItems/JungleDragonEgg.cs +++ b/Items/SummonItems/JungleDragonEgg.cs @@ -1,10 +1,11 @@ using CalamityMod.Events; using CalamityMod.Items.Materials; using CalamityMod.NPCs.Yharon; +using CalamityMod.Rarities; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.SummonItems { @@ -30,8 +31,7 @@ namespace CalamityMod.Items.SummonItems Item.useTime = 10; Item.useStyle = ItemUseStyleID.HoldUp; Item.consumable = false; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/SummonItems/NecroplasmicBeacon.cs b/Items/SummonItems/NecroplasmicBeacon.cs index c86727f55e..7df8d6606e 100644 --- a/Items/SummonItems/NecroplasmicBeacon.cs +++ b/Items/SummonItems/NecroplasmicBeacon.cs @@ -1,12 +1,13 @@ using CalamityMod.Events; using CalamityMod.Items.Materials; using CalamityMod.NPCs.Polterghast; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.SummonItems { @@ -31,8 +32,7 @@ namespace CalamityMod.Items.SummonItems Item.useTime = 10; Item.useStyle = ItemUseStyleID.HoldUp; Item.consumable = false; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/SummonItems/RuneofKos.cs b/Items/SummonItems/RuneofKos.cs index 78a3cc7061..b99557dbfc 100644 --- a/Items/SummonItems/RuneofKos.cs +++ b/Items/SummonItems/RuneofKos.cs @@ -3,12 +3,13 @@ using CalamityMod.Items.Materials; using CalamityMod.NPCs.CeaselessVoid; using CalamityMod.NPCs.Signus; using CalamityMod.NPCs.StormWeaver; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.Audio; +using CalamityMod.Rarities; using System.Linq; using System.Collections.Generic; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.SummonItems { @@ -35,8 +36,7 @@ namespace CalamityMod.Items.SummonItems Item.useStyle = ItemUseStyleID.HoldUp; Item.UseSound = SoundID.Item44; Item.consumable = false; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Tools/BlossomPickaxe.cs b/Items/Tools/BlossomPickaxe.cs index 11803b55dc..cfef478b93 100644 --- a/Items/Tools/BlossomPickaxe.cs +++ b/Items/Tools/BlossomPickaxe.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -30,10 +31,9 @@ namespace CalamityMod.Items.Tools Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Tools/BobbitHook.cs b/Items/Tools/BobbitHook.cs index 38eb189c49..646068e015 100644 --- a/Items/Tools/BobbitHook.cs +++ b/Items/Tools/BobbitHook.cs @@ -1,7 +1,8 @@ -using Terraria; +using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; +using Terraria; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Projectiles.Typeless; using static Terraria.ModLoader.ModContent; @@ -27,8 +28,7 @@ Pull Velocity: {BobbitHead.PullSpeed}"); Item.shootSpeed = BobbitHead.LaunchSpeed; // How quickly the hook is shot. Item.shoot = ProjectileType(); Item.value = Item.buyPrice(1, 40, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = (CalamityRarity)13; + Item.rare = ModContent.RarityType(); Item.width = 30; Item.height = 32; } diff --git a/Items/Tools/CrystylCrusher.cs b/Items/Tools/CrystylCrusher.cs index df1b1826eb..acb2361f13 100644 --- a/Items/Tools/CrystylCrusher.cs +++ b/Items/Tools/CrystylCrusher.cs @@ -1,13 +1,14 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System.Collections.Generic; +using System.Linq; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using System.Linq; -using Terraria.Audio; namespace CalamityMod.Items.Tools { @@ -48,7 +49,7 @@ namespace CalamityMod.Items.Tools Item.shoot = ModContent.ProjectileType(); Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Tools/Grax.cs b/Items/Tools/Grax.cs index 5ffc54d7f6..7ad528da60 100644 --- a/Items/Tools/Grax.cs +++ b/Items/Tools/Grax.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.StatBuffs; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -39,8 +40,7 @@ namespace CalamityMod.Items.Tools Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool AltFunctionUse(Player player) => true; diff --git a/Items/TreasureBags/MiscGrabBags/NecromanticGeode.cs b/Items/TreasureBags/MiscGrabBags/NecromanticGeode.cs index b85c99bbcc..528913fc18 100644 --- a/Items/TreasureBags/MiscGrabBags/NecromanticGeode.cs +++ b/Items/TreasureBags/MiscGrabBags/NecromanticGeode.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Terraria; using Terraria.GameContent.ItemDropRules; using Terraria.ID; @@ -22,7 +23,7 @@ namespace CalamityMod.Items.TreasureBags.MiscGrabBags Item.consumable = true; Item.width = 24; Item.height = 24; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/DraedonsArsenal/FrequencyManipulator.cs b/Items/Weapons/DraedonsArsenal/FrequencyManipulator.cs index 418a2f8974..155fb77dc8 100644 --- a/Items/Weapons/DraedonsArsenal/FrequencyManipulator.cs +++ b/Items/Weapons/DraedonsArsenal/FrequencyManipulator.cs @@ -1,9 +1,10 @@ -using System; -using System.Collections.Generic; -using CalamityMod.CustomRecipes; +using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -40,8 +41,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.knockBack = 5f; Item.value = CalamityGlobalItem.Rarity5BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item1; Item.shootSpeed = 16f; diff --git a/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs b/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs index 55eea24267..d2c70c925b 100644 --- a/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs +++ b/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs @@ -1,6 +1,7 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; @@ -42,8 +43,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs index dd20e23f6d..4aefa9a03f 100644 --- a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs +++ b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs @@ -1,6 +1,7 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; @@ -50,8 +51,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity8BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 24f; diff --git a/Items/Weapons/DraedonsArsenal/GaussDagger.cs b/Items/Weapons/DraedonsArsenal/GaussDagger.cs index 57c7e851fb..0d2ef0e25d 100644 --- a/Items/Weapons/DraedonsArsenal/GaussDagger.cs +++ b/Items/Weapons/DraedonsArsenal/GaussDagger.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System.Collections.Generic; using Terraria; @@ -35,8 +36,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.knockBack = 7f; Item.value = CalamityGlobalItem.Rarity3BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/DraedonsArsenal/GaussPistol.cs b/Items/Weapons/DraedonsArsenal/GaussPistol.cs index bf646086ed..a665a73bdd 100644 --- a/Items/Weapons/DraedonsArsenal/GaussPistol.cs +++ b/Items/Weapons/DraedonsArsenal/GaussPistol.cs @@ -1,6 +1,7 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using System; using System.Collections.Generic; using Terraria; @@ -38,8 +39,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity5BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 14f; diff --git a/Items/Weapons/DraedonsArsenal/GaussRifle.cs b/Items/Weapons/DraedonsArsenal/GaussRifle.cs index 5a5d04b6a5..d53031d4b9 100644 --- a/Items/Weapons/DraedonsArsenal/GaussRifle.cs +++ b/Items/Weapons/DraedonsArsenal/GaussRifle.cs @@ -1,15 +1,16 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Sounds; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.DraedonsArsenal { @@ -42,8 +43,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity8BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 27f; diff --git a/Items/Weapons/DraedonsArsenal/HeavyLaserRifle.cs b/Items/Weapons/DraedonsArsenal/HeavyLaserRifle.cs index 622ddda820..d0277a0c70 100644 --- a/Items/Weapons/DraedonsArsenal/HeavyLaserRifle.cs +++ b/Items/Weapons/DraedonsArsenal/HeavyLaserRifle.cs @@ -1,14 +1,15 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; +using System; using System.Collections.Generic; using Terraria; -using Terraria.ID; -using Terraria.DataStructures; -using Terraria.ModLoader; -using System; using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.DraedonsArsenal { @@ -42,8 +43,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5f; diff --git a/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs b/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs index 5b59d5530a..fbb235d2ce 100644 --- a/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs +++ b/Items/Weapons/DraedonsArsenal/HydraulicVoltCrasher.cs @@ -1,6 +1,7 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using System; using System.Collections.Generic; using Terraria; @@ -40,8 +41,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.shoot = ModContent.ProjectileType(); Item.value = CalamityGlobalItem.Rarity5BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.noMelee = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/DraedonsArsenal/MatterModulator.cs b/Items/Weapons/DraedonsArsenal/MatterModulator.cs index 029d008978..4391a4c42e 100644 --- a/Items/Weapons/DraedonsArsenal/MatterModulator.cs +++ b/Items/Weapons/DraedonsArsenal/MatterModulator.cs @@ -1,6 +1,8 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; @@ -8,7 +10,6 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Sounds; namespace CalamityMod.Items.Weapons.DraedonsArsenal { @@ -40,8 +41,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity5BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 7f; diff --git a/Items/Weapons/DraedonsArsenal/MountedScanner.cs b/Items/Weapons/DraedonsArsenal/MountedScanner.cs index 9399715690..9cfda6dce7 100644 --- a/Items/Weapons/DraedonsArsenal/MountedScanner.cs +++ b/Items/Weapons/DraedonsArsenal/MountedScanner.cs @@ -1,6 +1,7 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; @@ -39,8 +40,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity5BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 1f; diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs index d80492ff93..4045a21f49 100644 --- a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs +++ b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs @@ -1,6 +1,7 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; @@ -50,8 +51,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noUseGraphic = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs index 52d43b3d63..acac4ecd0c 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs @@ -1,14 +1,15 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.DraedonsArsenal { @@ -47,8 +48,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5f; diff --git a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs index aeda0f8e6b..174780c28f 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs @@ -1,15 +1,16 @@ -using System; -using System.Collections.Generic; -using CalamityMod.CustomRecipes; +using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.DraedonsArsenal { @@ -43,8 +44,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 14f; diff --git a/Items/Weapons/DraedonsArsenal/PoleWarper.cs b/Items/Weapons/DraedonsArsenal/PoleWarper.cs index 77fb24c2e4..1905dfc0fb 100644 --- a/Items/Weapons/DraedonsArsenal/PoleWarper.cs +++ b/Items/Weapons/DraedonsArsenal/PoleWarper.cs @@ -1,6 +1,7 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; @@ -38,8 +39,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.knockBack = 8f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item15; Item.autoReuse = true; diff --git a/Items/Weapons/DraedonsArsenal/PulseDragon.cs b/Items/Weapons/DraedonsArsenal/PulseDragon.cs index bf3c3459b9..352588292d 100644 --- a/Items/Weapons/DraedonsArsenal/PulseDragon.cs +++ b/Items/Weapons/DraedonsArsenal/PulseDragon.cs @@ -1,6 +1,7 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; @@ -36,8 +37,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noUseGraphic = true; Item.knockBack = 8f; Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.channel = true; diff --git a/Items/Weapons/DraedonsArsenal/PulsePistol.cs b/Items/Weapons/DraedonsArsenal/PulsePistol.cs index a15610b833..76e8a235d0 100644 --- a/Items/Weapons/DraedonsArsenal/PulsePistol.cs +++ b/Items/Weapons/DraedonsArsenal/PulsePistol.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; @@ -39,8 +40,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity3BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5.2f; // This may seem low but the shot has 10 extra updates. diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.cs b/Items/Weapons/DraedonsArsenal/PulseRifle.cs index bde52d0097..c30a07627e 100644 --- a/Items/Weapons/DraedonsArsenal/PulseRifle.cs +++ b/Items/Weapons/DraedonsArsenal/PulseRifle.cs @@ -1,15 +1,16 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.DraedonsArsenal { @@ -45,8 +46,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5f; diff --git a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs index 007dc1c377..250bd4543a 100644 --- a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs +++ b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs @@ -1,6 +1,7 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; @@ -41,8 +42,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity8BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 1f; diff --git a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs index 7dd58fe462..bfaaf9a316 100644 --- a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs +++ b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs @@ -1,6 +1,7 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; @@ -36,8 +37,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.knockBack = 3f; Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item15; Item.autoReuse = true; diff --git a/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs b/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs index a96dddac1c..c4654065a4 100644 --- a/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs +++ b/Items/Weapons/DraedonsArsenal/StarSwallowerContainmentUnit.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; @@ -36,8 +37,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.knockBack = 2.25f; Item.value = CalamityGlobalItem.Rarity3BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item15; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/DraedonsArsenal/SystemBane.cs b/Items/Weapons/DraedonsArsenal/SystemBane.cs index cb58ee9fa4..2a1cc2758a 100644 --- a/Items/Weapons/DraedonsArsenal/SystemBane.cs +++ b/Items/Weapons/DraedonsArsenal/SystemBane.cs @@ -1,9 +1,10 @@ -using System; -using System.Collections.Generic; -using CalamityMod.CustomRecipes; +using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -40,8 +41,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 4f; Item.value = CalamityGlobalItem.Rarity8BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item1; Item.shootSpeed = 16f; diff --git a/Items/Weapons/DraedonsArsenal/Taser.cs b/Items/Weapons/DraedonsArsenal/Taser.cs index f713c498bb..5eebd9abaf 100644 --- a/Items/Weapons/DraedonsArsenal/Taser.cs +++ b/Items/Weapons/DraedonsArsenal/Taser.cs @@ -2,12 +2,13 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using System; using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Sounds; namespace CalamityMod.Items.Weapons.DraedonsArsenal { @@ -38,8 +39,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity3BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; diff --git a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs index 6cdbf0b7a2..6b1acf602e 100644 --- a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs +++ b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs @@ -1,15 +1,16 @@ using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.DraedonsArsenal { @@ -46,8 +47,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5f; diff --git a/Items/Weapons/DraedonsArsenal/TrackingDisk.cs b/Items/Weapons/DraedonsArsenal/TrackingDisk.cs index 10350e7d66..2a1f456456 100644 --- a/Items/Weapons/DraedonsArsenal/TrackingDisk.cs +++ b/Items/Weapons/DraedonsArsenal/TrackingDisk.cs @@ -1,10 +1,11 @@ -using System; -using System.Collections.Generic; -using CalamityMod.CustomRecipes; +using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -38,8 +39,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.knockBack = 3f; Item.value = CalamityGlobalItem.Rarity3BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.noUseGraphic = true; diff --git a/Items/Weapons/DraedonsArsenal/WavePounder.cs b/Items/Weapons/DraedonsArsenal/WavePounder.cs index 43989bee56..da0ebabd99 100644 --- a/Items/Weapons/DraedonsArsenal/WavePounder.cs +++ b/Items/Weapons/DraedonsArsenal/WavePounder.cs @@ -1,9 +1,10 @@ -using System; -using System.Collections.Generic; -using CalamityMod.CustomRecipes; +using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.DraedonsArsenal; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -39,9 +40,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.knockBack = 0f; Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item1; Item.shootSpeed = 16f; diff --git a/Items/Weapons/Magic/AbyssalTome.cs b/Items/Weapons/Magic/AbyssalTome.cs index c740ca38e3..59e5f92910 100644 --- a/Items/Weapons/Magic/AbyssalTome.cs +++ b/Items/Weapons/Magic/AbyssalTome.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item8; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/AetherfluxCannon.cs b/Items/Weapons/Magic/AetherfluxCannon.cs index 237a8468ae..7e843765bf 100644 --- a/Items/Weapons/Magic/AetherfluxCannon.cs +++ b/Items/Weapons/Magic/AetherfluxCannon.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; @@ -38,8 +39,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 24f; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.Rarity15BuyPrice; } diff --git a/Items/Weapons/Magic/AethersWhisper.cs b/Items/Weapons/Magic/AethersWhisper.cs index 7b36173d13..1cda8ab7eb 100644 --- a/Items/Weapons/Magic/AethersWhisper.cs +++ b/Items/Weapons/Magic/AethersWhisper.cs @@ -1,10 +1,11 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Sounds; namespace CalamityMod.Items.Weapons.Magic { @@ -36,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.UseSound = CommonCalamitySounds.LaserCannonSound; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override Vector2? HoldoutOffset() => new Vector2(-10, 0); diff --git a/Items/Weapons/Magic/AlphaRay.cs b/Items/Weapons/Magic/AlphaRay.cs index 4ba3772822..becac56589 100644 --- a/Items/Weapons/Magic/AlphaRay.cs +++ b/Items/Weapons/Magic/AlphaRay.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; @@ -33,12 +34,11 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 1.5f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Red; Item.UseSound = SoundID.Item33; Item.autoReuse = true; Item.shootSpeed = 6f; Item.shoot = ModContent.ProjectileType(); - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override Vector2? HoldoutOffset() => new Vector2(-5, 0); diff --git a/Items/Weapons/Magic/AlulaAustralis.cs b/Items/Weapons/Magic/AlulaAustralis.cs index 73435c9f5a..82442cb3d2 100644 --- a/Items/Weapons/Magic/AlulaAustralis.cs +++ b/Items/Weapons/Magic/AlulaAustralis.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item9; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/AnahitasArpeggio.cs b/Items/Weapons/Magic/AnahitasArpeggio.cs index 7c443ff0b6..9023df999c 100644 --- a/Items/Weapons/Magic/AnahitasArpeggio.cs +++ b/Items/Weapons/Magic/AnahitasArpeggio.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6.5f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/Apotheosis.cs b/Items/Weapons/Magic/Apotheosis.cs index 3caebdc8d0..eebc001bdc 100644 --- a/Items/Weapons/Magic/Apotheosis.cs +++ b/Items/Weapons/Magic/Apotheosis.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Summon; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -34,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.knockBack = 6.9f; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.UseSound = SoundID.Item92; diff --git a/Items/Weapons/Magic/AquamarineStaff.cs b/Items/Weapons/Magic/AquamarineStaff.cs index 1fd3cb8195..a37799946e 100644 --- a/Items/Weapons/Magic/AquamarineStaff.cs +++ b/Items/Weapons/Magic/AquamarineStaff.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.5f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item43; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/ArcticBearPaw.cs b/Items/Weapons/Magic/ArcticBearPaw.cs index a87651d95b..d022b5f7b0 100644 --- a/Items/Weapons/Magic/ArcticBearPaw.cs +++ b/Items/Weapons/Magic/ArcticBearPaw.cs @@ -27,7 +27,7 @@ Fires spiritual claws that ignore walls and confuse enemies"); Item.useTurn = false; Item.noMelee = true; Item.knockBack = 10f; - Item.value = Item.buyPrice(0, 48, 0, 0); + Item.value = CalamityGlobalItem.Rarity7BuyPrice; Item.rare = ItemRarityID.LightPurple; Item.UseSound = SoundID.Item8; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/AstralStaff.cs b/Items/Weapons/Magic/AstralStaff.cs index 816468dbd7..c556b4b949 100644 --- a/Items/Weapons/Magic/AstralStaff.cs +++ b/Items/Weapons/Magic/AstralStaff.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.UseSound = SoundID.Item105; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/AstralachneaStaff.cs b/Items/Weapons/Magic/AstralachneaStaff.cs index 491bd09b55..8b0ef7dfa8 100644 --- a/Items/Weapons/Magic/AstralachneaStaff.cs +++ b/Items/Weapons/Magic/AstralachneaStaff.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item46; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/Atlantis.cs b/Items/Weapons/Magic/Atlantis.cs index 7ad95edf3f..78566748c9 100644 --- a/Items/Weapons/Magic/Atlantis.cs +++ b/Items/Weapons/Magic/Atlantis.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item34; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/BelchingSaxophone.cs b/Items/Weapons/Magic/BelchingSaxophone.cs index f2037aefb5..9481aecf0d 100644 --- a/Items/Weapons/Magic/BelchingSaxophone.cs +++ b/Items/Weapons/Magic/BelchingSaxophone.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/Biofusillade.cs b/Items/Weapons/Magic/Biofusillade.cs index 4ed97a7d3c..1a129ffb3b 100644 --- a/Items/Weapons/Magic/Biofusillade.cs +++ b/Items/Weapons/Magic/Biofusillade.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Terraria.ID; using Terraria.ModLoader; @@ -28,12 +29,11 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 3f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; Item.UseSound = SoundID.Item33; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 20f; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Weapons/Magic/BlackAnurian.cs b/Items/Weapons/Magic/BlackAnurian.cs index 91d1162cfd..1c8ee8dfc9 100644 --- a/Items/Weapons/Magic/BlackAnurian.cs +++ b/Items/Weapons/Magic/BlackAnurian.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.75f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item111; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/BloodBath.cs b/Items/Weapons/Magic/BloodBath.cs index 91fbd08805..5edc645fc6 100644 --- a/Items/Weapons/Magic/BloodBath.cs +++ b/Items/Weapons/Magic/BloodBath.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.75f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item21; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/BrimroseStaff.cs b/Items/Weapons/Magic/BrimroseStaff.cs index 41cfe62cc6..071bea7217 100644 --- a/Items/Weapons/Magic/BrimroseStaff.cs +++ b/Items/Weapons/Magic/BrimroseStaff.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item43; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/BurningSea.cs b/Items/Weapons/Magic/BurningSea.cs index 345941da55..9817be5dba 100644 --- a/Items/Weapons/Magic/BurningSea.cs +++ b/Items/Weapons/Magic/BurningSea.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6.5f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item20; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/CarnageRay.cs b/Items/Weapons/Magic/CarnageRay.cs index c8f61325c7..2621cd3935 100644 --- a/Items/Weapons/Magic/CarnageRay.cs +++ b/Items/Weapons/Magic/CarnageRay.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.25f; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item72; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/ClamorNoctus.cs b/Items/Weapons/Magic/ClamorNoctus.cs index bfd511e5c8..64e898c3b4 100644 --- a/Items/Weapons/Magic/ClamorNoctus.cs +++ b/Items/Weapons/Magic/ClamorNoctus.cs @@ -1,6 +1,7 @@ -using CalamityMod.Projectiles.Magic; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using Terraria; @@ -33,9 +34,8 @@ Fires night wyverns and stars from the sky that stick to enemies and tiles and e Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.2f; - Item.value = Item.buyPrice(1, 40, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.value = CalamityGlobalItem.Rarity14BuyPrice; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item105; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/CoralSpout.cs b/Items/Weapons/Magic/CoralSpout.cs index 07c7675c8c..63d3ceb286 100644 --- a/Items/Weapons/Magic/CoralSpout.cs +++ b/Items/Weapons/Magic/CoralSpout.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.channel = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item17; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/CosmicRainbow.cs b/Items/Weapons/Magic/CosmicRainbow.cs index 3068e45ec6..64dfe24294 100644 --- a/Items/Weapons/Magic/CosmicRainbow.cs +++ b/Items/Weapons/Magic/CosmicRainbow.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 0f; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.UseSound = SoundID.Item67; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/DarkSpark.cs b/Items/Weapons/Magic/DarkSpark.cs index b8b84093aa..696fd2640f 100644 --- a/Items/Weapons/Magic/DarkSpark.cs +++ b/Items/Weapons/Magic/DarkSpark.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -37,8 +38,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.channel = true; Item.knockBack = 0f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 30f; diff --git a/Items/Weapons/Magic/DeathValleyDuster.cs b/Items/Weapons/Magic/DeathValleyDuster.cs index f8027d1f1c..805eaf2635 100644 --- a/Items/Weapons/Magic/DeathValleyDuster.cs +++ b/Items/Weapons/Magic/DeathValleyDuster.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item20; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/DeathhailStaff.cs b/Items/Weapons/Magic/DeathhailStaff.cs index 7545b24d48..26901b8212 100644 --- a/Items/Weapons/Magic/DeathhailStaff.cs +++ b/Items/Weapons/Magic/DeathhailStaff.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -33,8 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 4f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item12; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/DivineRetribution.cs b/Items/Weapons/Magic/DivineRetribution.cs index 431f5a5b49..5e1f41bf5b 100644 --- a/Items/Weapons/Magic/DivineRetribution.cs +++ b/Items/Weapons/Magic/DivineRetribution.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using Terraria; @@ -33,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.knockBack = 3.5f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.UseSound = SoundID.Item73; diff --git a/Items/Weapons/Magic/Downpour.cs b/Items/Weapons/Magic/Downpour.cs index ab9bd7eec3..519d4f9b56 100644 --- a/Items/Weapons/Magic/Downpour.cs +++ b/Items/Weapons/Magic/Downpour.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item13; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/EidolicWail.cs b/Items/Weapons/Magic/EidolicWail.cs index ed36c5c747..5ec40d9260 100644 --- a/Items/Weapons/Magic/EidolicWail.cs +++ b/Items/Weapons/Magic/EidolicWail.cs @@ -1,9 +1,10 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Sounds; namespace CalamityMod.Items.Weapons.Magic { @@ -30,13 +31,12 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1f; - Item.value = Item.buyPrice(1, 40, 0, 0); - Item.rare = ItemRarityID.Purple; + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.UseSound = CommonCalamitySounds.WyrmScreamSound; Item.autoReuse = true; Item.shootSpeed = 8f; Item.shoot = ModContent.ProjectileType(); - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override Vector2? HoldoutOffset() => new Vector2(-5, 0); diff --git a/Items/Weapons/Magic/EidolonStaff.cs b/Items/Weapons/Magic/EidolonStaff.cs index e86ef2b7a0..2db6595b2f 100644 --- a/Items/Weapons/Magic/EidolonStaff.cs +++ b/Items/Weapons/Magic/EidolonStaff.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using Terraria; @@ -32,9 +33,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; - Item.value = Item.buyPrice(1, 40, 0, 0); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.value = CalamityGlobalItem.Rarity14BuyPrice; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item43; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/EldritchTome.cs b/Items/Weapons/Magic/EldritchTome.cs index eb1463b4ba..b1a9228113 100644 --- a/Items/Weapons/Magic/EldritchTome.cs +++ b/Items/Weapons/Magic/EldritchTome.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item103; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/Eternity.cs b/Items/Weapons/Magic/Eternity.cs index 522c67bb29..5e26fed61f 100644 --- a/Items/Weapons/Magic/Eternity.cs +++ b/Items/Weapons/Magic/Eternity.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System.Collections.Generic; @@ -40,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.knockBack = 0f; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/EventHorizon.cs b/Items/Weapons/Magic/EventHorizon.cs index 3700e6e0eb..3254cb4b99 100644 --- a/Items/Weapons/Magic/EventHorizon.cs +++ b/Items/Weapons/Magic/EventHorizon.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -35,8 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item84; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/EvergladeSpray.cs b/Items/Weapons/Magic/EvergladeSpray.cs index c6544a5c5b..fc3f6d0ec6 100644 --- a/Items/Weapons/Magic/EvergladeSpray.cs +++ b/Items/Weapons/Magic/EvergladeSpray.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4.5f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item13; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/Fabstaff.cs b/Items/Weapons/Magic/Fabstaff.cs index 3066b9cd24..26eef49f31 100644 --- a/Items/Weapons/Magic/Fabstaff.cs +++ b/Items/Weapons/Magic/Fabstaff.cs @@ -1,10 +1,11 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using Microsoft.Xna.Framework; namespace CalamityMod.Items.Weapons.Magic { @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.knockBack = 5f; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.UseSound = SoundID.Item60; diff --git a/Items/Weapons/Magic/FaceMelter.cs b/Items/Weapons/Magic/FaceMelter.cs index ef958e86be..c382960e4b 100644 --- a/Items/Weapons/Magic/FaceMelter.cs +++ b/Items/Weapons/Magic/FaceMelter.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; @@ -34,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.knockBack = 5f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/FatesReveal.cs b/Items/Weapons/Magic/FatesReveal.cs index 865dfe05a0..2db08cf466 100644 --- a/Items/Weapons/Magic/FatesReveal.cs +++ b/Items/Weapons/Magic/FatesReveal.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -37,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shootSpeed = 1f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Magic/FlareBolt.cs b/Items/Weapons/Magic/FlareBolt.cs index 1adcf67989..590421cfe5 100644 --- a/Items/Weapons/Magic/FlareBolt.cs +++ b/Items/Weapons/Magic/FlareBolt.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.5f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item20; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/ForbiddenSun.cs b/Items/Weapons/Magic/ForbiddenSun.cs index 3fa9709b1c..bbac47b400 100644 --- a/Items/Weapons/Magic/ForbiddenSun.cs +++ b/Items/Weapons/Magic/ForbiddenSun.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/FrostBolt.cs b/Items/Weapons/Magic/FrostBolt.cs index 1ed44175c1..325543e753 100644 --- a/Items/Weapons/Magic/FrostBolt.cs +++ b/Items/Weapons/Magic/FrostBolt.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item8; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/GhastlyVisage.cs b/Items/Weapons/Magic/GhastlyVisage.cs index fea75dda32..a48652f61c 100644 --- a/Items/Weapons/Magic/GhastlyVisage.cs +++ b/Items/Weapons/Magic/GhastlyVisage.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shoot = ModContent.ProjectileType(); Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } // This weapon uses a holdout projectile. diff --git a/Items/Weapons/Magic/GleamingMagnolia.cs b/Items/Weapons/Magic/GleamingMagnolia.cs index a24c77a635..d3d18c45f6 100644 --- a/Items/Weapons/Magic/GleamingMagnolia.cs +++ b/Items/Weapons/Magic/GleamingMagnolia.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.5f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item109; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/GruesomeEminence.cs b/Items/Weapons/Magic/GruesomeEminence.cs index a5fa2f8c61..b007364ef3 100644 --- a/Items/Weapons/Magic/GruesomeEminence.cs +++ b/Items/Weapons/Magic/GruesomeEminence.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -40,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shoot = ModContent.ProjectileType(); Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } // This weapon uses a holdout projectile. diff --git a/Items/Weapons/Magic/HadalUrn.cs b/Items/Weapons/Magic/HadalUrn.cs index 6565228df7..f28e821887 100644 --- a/Items/Weapons/Magic/HadalUrn.cs +++ b/Items/Weapons/Magic/HadalUrn.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.75f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.Calamity().donorItem = true; Item.UseSound = ShootSound; diff --git a/Items/Weapons/Magic/HarvestStaff.cs b/Items/Weapons/Magic/HarvestStaff.cs index eeaee7650a..af419bc951 100644 --- a/Items/Weapons/Magic/HarvestStaff.cs +++ b/Items/Weapons/Magic/HarvestStaff.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item20; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/HeliumFlash.cs b/Items/Weapons/Magic/HeliumFlash.cs index 16bb717861..719e4451c0 100644 --- a/Items/Weapons/Magic/HeliumFlash.cs +++ b/Items/Weapons/Magic/HeliumFlash.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -37,8 +38,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.UseSound = SoundID.Item73; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; diff --git a/Items/Weapons/Magic/HellwingStaff.cs b/Items/Weapons/Magic/HellwingStaff.cs index 2220576516..32968ebf0a 100644 --- a/Items/Weapons/Magic/HellwingStaff.cs +++ b/Items/Weapons/Magic/HellwingStaff.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item43; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/Hematemesis.cs b/Items/Weapons/Magic/Hematemesis.cs index 3d2e943e34..d62ecb73e5 100644 --- a/Items/Weapons/Magic/Hematemesis.cs +++ b/Items/Weapons/Magic/Hematemesis.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.75f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.UseSound = SoundID.Item21; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/Heresy.cs b/Items/Weapons/Magic/Heresy.cs index 2c7fbf807b..0d3d28b93d 100644 --- a/Items/Weapons/Magic/Heresy.cs +++ b/Items/Weapons/Magic/Heresy.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.knockBack = 0f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.autoReuse = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Magic/HyphaeRod.cs b/Items/Weapons/Magic/HyphaeRod.cs index ea8634d408..772981e2b3 100644 --- a/Items/Weapons/Magic/HyphaeRod.cs +++ b/Items/Weapons/Magic/HyphaeRod.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item8; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/IceBarrage.cs b/Items/Weapons/Magic/IceBarrage.cs index ae65e0c0fe..c212f84561 100644 --- a/Items/Weapons/Magic/IceBarrage.cs +++ b/Items/Weapons/Magic/IceBarrage.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Ammo; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.UseSound = CastSound; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.damage = 2250; diff --git a/Items/Weapons/Magic/IcicleStaff.cs b/Items/Weapons/Magic/IcicleStaff.cs index 0e2ab29ec4..2123a4a050 100644 --- a/Items/Weapons/Magic/IcicleStaff.cs +++ b/Items/Weapons/Magic/IcicleStaff.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.UseSound = SoundID.Item8; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/IcicleTrident.cs b/Items/Weapons/Magic/IcicleTrident.cs index b4a913b545..6b2326d441 100644 --- a/Items/Weapons/Magic/IcicleTrident.cs +++ b/Items/Weapons/Magic/IcicleTrident.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useTurn = false; Item.noMelee = true; Item.knockBack = 7f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item8; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/InfernalRift.cs b/Items/Weapons/Magic/InfernalRift.cs index cf8ed3f62d..99ff5c8ffd 100644 --- a/Items/Weapons/Magic/InfernalRift.cs +++ b/Items/Weapons/Magic/InfernalRift.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item9; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/LashesofChaos.cs b/Items/Weapons/Magic/LashesofChaos.cs index b221c89245..d6f6ee8ea4 100644 --- a/Items/Weapons/Magic/LashesofChaos.cs +++ b/Items/Weapons/Magic/LashesofChaos.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7.5f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/LightGodsBrilliance.cs b/Items/Weapons/Magic/LightGodsBrilliance.cs index b860ce3474..1786fe8724 100644 --- a/Items/Weapons/Magic/LightGodsBrilliance.cs +++ b/Items/Weapons/Magic/LightGodsBrilliance.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -28,9 +29,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.UseSound = SoundID.Item9; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/MagnaCannon.cs b/Items/Weapons/Magic/MagnaCannon.cs index 067cf143f8..56a8b816d6 100644 --- a/Items/Weapons/Magic/MagnaCannon.cs +++ b/Items/Weapons/Magic/MagnaCannon.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item117; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/MagneticMeltdown.cs b/Items/Weapons/Magic/MagneticMeltdown.cs index dd4f6d6462..cfa98066fd 100644 --- a/Items/Weapons/Magic/MagneticMeltdown.cs +++ b/Items/Weapons/Magic/MagneticMeltdown.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -36,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shootSpeed = 12f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } diff --git a/Items/Weapons/Magic/ManaRose.cs b/Items/Weapons/Magic/ManaRose.cs index ed47793184..41dc9bd437 100644 --- a/Items/Weapons/Magic/ManaRose.cs +++ b/Items/Weapons/Magic/ManaRose.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.25f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item109; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/Miasma.cs b/Items/Weapons/Magic/Miasma.cs index 9063dfb62e..f0e54d67dc 100644 --- a/Items/Weapons/Magic/Miasma.cs +++ b/Items/Weapons/Magic/Miasma.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item8; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/Mistlestorm.cs b/Items/Weapons/Magic/Mistlestorm.cs index bdf62860a1..f09e1673d7 100644 --- a/Items/Weapons/Magic/Mistlestorm.cs +++ b/Items/Weapons/Magic/Mistlestorm.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -30,8 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 3.5f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item39; Item.autoReuse = true; Item.shoot = ProjectileID.PineNeedleFriendly; diff --git a/Items/Weapons/Magic/NightsRay.cs b/Items/Weapons/Magic/NightsRay.cs index 67c5b37d5d..22f758a3f4 100644 --- a/Items/Weapons/Magic/NightsRay.cs +++ b/Items/Weapons/Magic/NightsRay.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.25f; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item72; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/PhantasmalFury.cs b/Items/Weapons/Magic/PhantasmalFury.cs index 7629fb6377..3dac4d9dc0 100644 --- a/Items/Weapons/Magic/PhantasmalFury.cs +++ b/Items/Weapons/Magic/PhantasmalFury.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -29,13 +30,12 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7.5f; - Item.value = Item.buyPrice(1, 40, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.UseSound = SoundID.Item43; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } diff --git a/Items/Weapons/Magic/PhoenixFlameBarrage.cs b/Items/Weapons/Magic/PhoenixFlameBarrage.cs index 3859e15760..90272176e4 100644 --- a/Items/Weapons/Magic/PhoenixFlameBarrage.cs +++ b/Items/Weapons/Magic/PhoenixFlameBarrage.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using Terraria; @@ -32,8 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 3.5f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item20; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/PlagueStaff.cs b/Items/Weapons/Magic/PlagueStaff.cs index 3619ac66ca..748406fe74 100644 --- a/Items/Weapons/Magic/PlagueStaff.cs +++ b/Items/Weapons/Magic/PlagueStaff.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 8f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item43; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/PlasmaRifle.cs b/Items/Weapons/Magic/PlasmaRifle.cs index 816f4d53ec..affec9151e 100644 --- a/Items/Weapons/Magic/PlasmaRifle.cs +++ b/Items/Weapons/Magic/PlasmaRifle.cs @@ -1,11 +1,12 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Sounds; namespace CalamityMod.Items.Weapons.Magic { @@ -33,8 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 4f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = CommonCalamitySounds.PlasmaBlastSound; Item.autoReuse = true; Item.shootSpeed = 12f; diff --git a/Items/Weapons/Magic/PlasmaRod.cs b/Items/Weapons/Magic/PlasmaRod.cs index 0d5a5e25f6..2378ee1770 100644 --- a/Items/Weapons/Magic/PlasmaRod.cs +++ b/Items/Weapons/Magic/PlasmaRod.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.5f; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.UseSound = SoundID.Item109; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/Poseidon.cs b/Items/Weapons/Magic/Poseidon.cs index b0a1a455f9..7a42900988 100644 --- a/Items/Weapons/Magic/Poseidon.cs +++ b/Items/Weapons/Magic/Poseidon.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.UseSound = SoundID.Item84; Item.rare = ItemRarityID.Pink; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/PrimordialAncient.cs b/Items/Weapons/Magic/PrimordialAncient.cs index ebcf4d738e..6c61266fc9 100644 --- a/Items/Weapons/Magic/PrimordialAncient.cs +++ b/Items/Weapons/Magic/PrimordialAncient.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -28,13 +29,12 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.UseSound = SoundID.Item20; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 8f; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Weapons/Magic/PrimordialEarth.cs b/Items/Weapons/Magic/PrimordialEarth.cs index b7a825199e..6cfa37c1ea 100644 --- a/Items/Weapons/Magic/PrimordialEarth.cs +++ b/Items/Weapons/Magic/PrimordialEarth.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item20; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/PurgeGuzzler.cs b/Items/Weapons/Magic/PurgeGuzzler.cs index 870314c270..086d67ca5e 100644 --- a/Items/Weapons/Magic/PurgeGuzzler.cs +++ b/Items/Weapons/Magic/PurgeGuzzler.cs @@ -1,10 +1,11 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Sounds; namespace CalamityMod.Items.Weapons.Magic { @@ -37,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shootSpeed = 6f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Magic/RainbowPartyCannon.cs b/Items/Weapons/Magic/RainbowPartyCannon.cs index 797c6b6c29..6851117e53 100644 --- a/Items/Weapons/Magic/RainbowPartyCannon.cs +++ b/Items/Weapons/Magic/RainbowPartyCannon.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System.Collections.Generic; @@ -42,8 +43,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 3.5f; Item.value = CalamityGlobalItem.RarityHotPinkBuyPrice; - Item.rare = 10; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item11; Item.autoReuse = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Magic/Rancor.cs b/Items/Weapons/Magic/Rancor.cs index 084ed2d437..fdbcbc6ff1 100644 --- a/Items/Weapons/Magic/Rancor.cs +++ b/Items/Weapons/Magic/Rancor.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -39,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shoot = ModContent.ProjectileType(); Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } // This weapon uses a holdout projectile. diff --git a/Items/Weapons/Magic/RecitationoftheBeast.cs b/Items/Weapons/Magic/RecitationoftheBeast.cs index 0a71d0ae97..dfe4e44228 100644 --- a/Items/Weapons/Magic/RecitationoftheBeast.cs +++ b/Items/Weapons/Magic/RecitationoftheBeast.cs @@ -1,5 +1,6 @@ -using CalamityMod.Projectiles.Magic; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using Terraria; @@ -33,12 +34,11 @@ namespace CalamityMod.Items.Weapons.Magic Item.knockBack = 8.5f; Item.UseSound = SoundID.Item8; Item.autoReuse = true; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; Item.DamageType = DamageClass.Magic; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } // Terraria seems to really dislike high crit values in SetDefaults diff --git a/Items/Weapons/Magic/RelicofRuin.cs b/Items/Weapons/Magic/RelicofRuin.cs index 6f2d3c24c6..f072cc4b3a 100644 --- a/Items/Weapons/Magic/RelicofRuin.cs +++ b/Items/Weapons/Magic/RelicofRuin.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4.25f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item84; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/SanguineFlare.cs b/Items/Weapons/Magic/SanguineFlare.cs index 5dc832789a..9a50518c93 100644 --- a/Items/Weapons/Magic/SanguineFlare.cs +++ b/Items/Weapons/Magic/SanguineFlare.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -31,8 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 8f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item20; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/SeethingDischarge.cs b/Items/Weapons/Magic/SeethingDischarge.cs index d639db0633..92c66b8e97 100644 --- a/Items/Weapons/Magic/SeethingDischarge.cs +++ b/Items/Weapons/Magic/SeethingDischarge.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 6.75f; Item.UseSound = CommonCalamitySounds.FlareSound; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/ShadecrystalTome.cs b/Items/Weapons/Magic/ShadecrystalTome.cs index 3e3b0ddddf..9c0f228396 100644 --- a/Items/Weapons/Magic/ShadecrystalTome.cs +++ b/Items/Weapons/Magic/ShadecrystalTome.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.5f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item9; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/ShaderainStaff.cs b/Items/Weapons/Magic/ShaderainStaff.cs index 745c75f899..5b58f19479 100644 --- a/Items/Weapons/Magic/ShaderainStaff.cs +++ b/Items/Weapons/Magic/ShaderainStaff.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 0f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item66; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/ShadowboltStaff.cs b/Items/Weapons/Magic/ShadowboltStaff.cs index a139c79eeb..93eb407558 100644 --- a/Items/Weapons/Magic/ShadowboltStaff.cs +++ b/Items/Weapons/Magic/ShadowboltStaff.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -29,13 +30,12 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 8f; - Item.value = Item.buyPrice(1, 40, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.UseSound = SoundID.Item72; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Weapons/Magic/ShiftingSands.cs b/Items/Weapons/Magic/ShiftingSands.cs index 131ab4225a..d5aba9f974 100644 --- a/Items/Weapons/Magic/ShiftingSands.cs +++ b/Items/Weapons/Magic/ShiftingSands.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.UseSound = SoundID.Item20; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; } diff --git a/Items/Weapons/Magic/SkyGlaze.cs b/Items/Weapons/Magic/SkyGlaze.cs index 2be0681bbc..0bf0396960 100644 --- a/Items/Weapons/Magic/SkyGlaze.cs +++ b/Items/Weapons/Magic/SkyGlaze.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.UseSound = SoundID.Item102; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/SlitheringEels.cs b/Items/Weapons/Magic/SlitheringEels.cs index 51b522a379..290e901a9e 100644 --- a/Items/Weapons/Magic/SlitheringEels.cs +++ b/Items/Weapons/Magic/SlitheringEels.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.NPCHit13; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/SnowstormStaff.cs b/Items/Weapons/Magic/SnowstormStaff.cs index fb7cd9f721..9c2037df0d 100644 --- a/Items/Weapons/Magic/SnowstormStaff.cs +++ b/Items/Weapons/Magic/SnowstormStaff.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 5; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item46; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/SoulPiercer.cs b/Items/Weapons/Magic/SoulPiercer.cs index 9dcc97c30a..5fb19d167b 100644 --- a/Items/Weapons/Magic/SoulPiercer.cs +++ b/Items/Weapons/Magic/SoulPiercer.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -30,13 +31,12 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 8f; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.UseSound = SoundID.Item73; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Magic/StaffofBlushie.cs b/Items/Weapons/Magic/StaffofBlushie.cs index 8b9c4183bd..703e302f76 100644 --- a/Items/Weapons/Magic/StaffofBlushie.cs +++ b/Items/Weapons/Magic/StaffofBlushie.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; @@ -31,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.DamageType = DamageClass.Magic; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/Magic/Starfall.cs b/Items/Weapons/Magic/Starfall.cs index 94c67162ad..709172363a 100644 --- a/Items/Weapons/Magic/Starfall.cs +++ b/Items/Weapons/Magic/Starfall.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.25f; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.UseSound = SoundID.Item105; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/StormSpray.cs b/Items/Weapons/Magic/StormSpray.cs index 2333bbf832..27d56033eb 100644 --- a/Items/Weapons/Magic/StormSpray.cs +++ b/Items/Weapons/Magic/StormSpray.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item13; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/SubsumingVortex.cs b/Items/Weapons/Magic/SubsumingVortex.cs index 5a3fec0860..4a0c167445 100644 --- a/Items/Weapons/Magic/SubsumingVortex.cs +++ b/Items/Weapons/Magic/SubsumingVortex.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -40,8 +41,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.autoReuse = true; Item.channel = true; diff --git a/Items/Weapons/Magic/TacticiansTrumpCard.cs b/Items/Weapons/Magic/TacticiansTrumpCard.cs index b0cc2408e4..e85d6dba52 100644 --- a/Items/Weapons/Magic/TacticiansTrumpCard.cs +++ b/Items/Weapons/Magic/TacticiansTrumpCard.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -33,8 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Weapons/Magic/TearsofHeaven.cs b/Items/Weapons/Magic/TearsofHeaven.cs index 102bfe9771..7d898b8a98 100644 --- a/Items/Weapons/Magic/TearsofHeaven.cs +++ b/Items/Weapons/Magic/TearsofHeaven.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.5f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item8; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/TerraRay.cs b/Items/Weapons/Magic/TerraRay.cs index 5f1207b353..bca657b2a4 100644 --- a/Items/Weapons/Magic/TerraRay.cs +++ b/Items/Weapons/Magic/TerraRay.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item60; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/TheDanceofLight.cs b/Items/Weapons/Magic/TheDanceofLight.cs index bcde5d2041..a9edd0cdbe 100644 --- a/Items/Weapons/Magic/TheDanceofLight.cs +++ b/Items/Weapons/Magic/TheDanceofLight.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; @@ -54,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shootSpeed = 14f; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Weapons/Magic/ThePrince.cs b/Items/Weapons/Magic/ThePrince.cs index f72859147b..465d282b52 100644 --- a/Items/Weapons/Magic/ThePrince.cs +++ b/Items/Weapons/Magic/ThePrince.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -37,9 +38,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.UseSound = SoundID.DD2_FlameburstTowerShot; Item.shoot = ModContent.ProjectileType(); Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - Item.rare = ItemRarityID.Purple; Item.Calamity().donorItem = true; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Magic/TheWand.cs b/Items/Weapons/Magic/TheWand.cs index a9c9c4e245..3454b49463 100644 --- a/Items/Weapons/Magic/TheWand.cs +++ b/Items/Weapons/Magic/TheWand.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; @@ -10,6 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic { public class TheWand : ModItem { + // The actual base damage of The Wand. The damage reported on the item is just the spark, which is irrelevant. public static int BaseDamage = 599; public override void SetStaticDefaults() @@ -23,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { Item.width = 40; - Item.damage = 1; + Item.damage = 14; // same as 1.4 Wand of Sparking Item.mana = 150; Item.DamageType = DamageClass.Magic; Item.noMelee = true; @@ -35,11 +37,10 @@ namespace CalamityMod.Items.Weapons.Magic Item.UseSound = SoundID.Item102; Item.autoReuse = true; Item.height = 36; - Item.value = Item.buyPrice(2, 50, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 24f; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Magic/ThornBlossom.cs b/Items/Weapons/Magic/ThornBlossom.cs index 7b8e337abf..c8d63ddc95 100644 --- a/Items/Weapons/Magic/ThornBlossom.cs +++ b/Items/Weapons/Magic/ThornBlossom.cs @@ -1,10 +1,11 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Microsoft.Xna.Framework; namespace CalamityMod.Items.Weapons.Magic { @@ -31,8 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 2f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item109; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/Thunderstorm.cs b/Items/Weapons/Magic/Thunderstorm.cs index 48c1525648..2eb5a92a2b 100644 --- a/Items/Weapons/Magic/Thunderstorm.cs +++ b/Items/Weapons/Magic/Thunderstorm.cs @@ -1,8 +1,9 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Sounds; namespace CalamityMod.Items.Weapons.Magic { @@ -28,8 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 2f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = CommonCalamitySounds.PlasmaBlastSound; Item.autoReuse = true; Item.shootSpeed = 6f; diff --git a/Items/Weapons/Magic/TomeofFates.cs b/Items/Weapons/Magic/TomeofFates.cs index f54aa67b7d..5d82bf8f10 100644 --- a/Items/Weapons/Magic/TomeofFates.cs +++ b/Items/Weapons/Magic/TomeofFates.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.UseSound = SoundID.Item103; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/Tradewinds.cs b/Items/Weapons/Magic/Tradewinds.cs index 1794bfbb33..e28966b968 100644 --- a/Items/Weapons/Magic/Tradewinds.cs +++ b/Items/Weapons/Magic/Tradewinds.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item7; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/UndinesRetribution.cs b/Items/Weapons/Magic/UndinesRetribution.cs index 357893155f..48b83e3d08 100644 --- a/Items/Weapons/Magic/UndinesRetribution.cs +++ b/Items/Weapons/Magic/UndinesRetribution.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item66; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/ValkyrieRay.cs b/Items/Weapons/Magic/ValkyrieRay.cs index 5df7483887..30aa22b0b5 100644 --- a/Items/Weapons/Magic/ValkyrieRay.cs +++ b/Items/Weapons/Magic/ValkyrieRay.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useTurn = false; Item.noMelee = true; Item.noUseGraphic = true; - Item.value = Item.buyPrice(gold: 36); + Item.value = CalamityGlobalItem.RarityPinkBuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 25f; diff --git a/Items/Weapons/Magic/Vehemence.cs b/Items/Weapons/Magic/Vehemence.cs index 860d298564..0a817182e6 100644 --- a/Items/Weapons/Magic/Vehemence.cs +++ b/Items/Weapons/Magic/Vehemence.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -40,8 +41,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.Rarity15BuyPrice; } diff --git a/Items/Weapons/Magic/VenusianTrident.cs b/Items/Weapons/Magic/VenusianTrident.cs index d37a461d39..1c9b0e2e37 100644 --- a/Items/Weapons/Magic/VenusianTrident.cs +++ b/Items/Weapons/Magic/VenusianTrident.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -31,13 +32,12 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 9f; - Item.value = Item.buyPrice(1, 40, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.UseSound = SoundID.Item45; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 19f; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override Vector2? HoldoutOrigin() => new Vector2(15, 15); diff --git a/Items/Weapons/Magic/Viscera.cs b/Items/Weapons/Magic/Viscera.cs index 695b178658..355ceb8e1f 100644 --- a/Items/Weapons/Magic/Viscera.cs +++ b/Items/Weapons/Magic/Viscera.cs @@ -1,9 +1,10 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using Microsoft.Xna.Framework; namespace CalamityMod.Items.Weapons.Magic { @@ -31,8 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 6f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item20; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/VitriolicViper.cs b/Items/Weapons/Magic/VitriolicViper.cs index 955f7f960d..9f69f2dbd0 100644 --- a/Items/Weapons/Magic/VitriolicViper.cs +++ b/Items/Weapons/Magic/VitriolicViper.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -34,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shootSpeed = 20f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Magic/VividClarity.cs b/Items/Weapons/Magic/VividClarity.cs index 5e66a083d1..f36ece57b9 100644 --- a/Items/Weapons/Magic/VividClarity.cs +++ b/Items/Weapons/Magic/VividClarity.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; @@ -37,12 +38,11 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 7.5f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Red; Item.UseSound = SoundID.Item60; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo projSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Magic/VoidVortex.cs b/Items/Weapons/Magic/VoidVortex.cs index 5847d7f637..13a6e947b3 100644 --- a/Items/Weapons/Magic/VoidVortex.cs +++ b/Items/Weapons/Magic/VoidVortex.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; @@ -34,8 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 0f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item20; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/VoltaicClimax.cs b/Items/Weapons/Magic/VoltaicClimax.cs index 26ea42b687..4c0171f5c6 100644 --- a/Items/Weapons/Magic/VoltaicClimax.cs +++ b/Items/Weapons/Magic/VoltaicClimax.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; @@ -35,12 +36,11 @@ namespace CalamityMod.Items.Weapons.Magic Item.noMelee = true; Item.knockBack = 5f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; Item.UseSound = SoundID.Item20; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Magic/Waywasher.cs b/Items/Weapons/Magic/Waywasher.cs index 2fb897e423..6b3b039e74 100644 --- a/Items/Weapons/Magic/Waywasher.cs +++ b/Items/Weapons/Magic/Waywasher.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.5f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item8; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/Wingman.cs b/Items/Weapons/Magic/Wingman.cs index 310c42f3dd..b789daef6b 100644 --- a/Items/Weapons/Magic/Wingman.cs +++ b/Items/Weapons/Magic/Wingman.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item33; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/WintersFury.cs b/Items/Weapons/Magic/WintersFury.cs index 75f9eadb38..f6b46ccf5f 100644 --- a/Items/Weapons/Magic/WintersFury.cs +++ b/Items/Weapons/Magic/WintersFury.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useTurn = false; Item.noMelee = true; Item.knockBack = 5f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item9; Item.scale = 0.9f; diff --git a/Items/Weapons/Magic/WrathoftheAncients.cs b/Items/Weapons/Magic/WrathoftheAncients.cs index 63e3122055..ad964033eb 100644 --- a/Items/Weapons/Magic/WrathoftheAncients.cs +++ b/Items/Weapons/Magic/WrathoftheAncients.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/WulfrumProsthesis.cs b/Items/Weapons/Magic/WulfrumProsthesis.cs index 59df3cf894..ee7d3ddb2b 100644 --- a/Items/Weapons/Magic/WulfrumProsthesis.cs +++ b/Items/Weapons/Magic/WulfrumProsthesis.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.UseSound = ShootSound; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/WyvernsCall.cs b/Items/Weapons/Magic/WyvernsCall.cs index c646345d00..eb3fa6053d 100644 --- a/Items/Weapons/Magic/WyvernsCall.cs +++ b/Items/Weapons/Magic/WyvernsCall.cs @@ -31,7 +31,7 @@ Fires wyverns and colored feathers from the sky that stick to enemies and tiles Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4.75f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item102; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/YharimsCrystal.cs b/Items/Weapons/Magic/YharimsCrystal.cs index 366a6c2721..81bc417ec8 100644 --- a/Items/Weapons/Magic/YharimsCrystal.cs +++ b/Items/Weapons/Magic/YharimsCrystal.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Magic; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -33,9 +34,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 30f; - Item.rare = ItemRarityID.Purple; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; diff --git a/Items/Weapons/Melee/AbsoluteZero.cs b/Items/Weapons/Melee/AbsoluteZero.cs index ccf523ba80..37ba654575 100644 --- a/Items/Weapons/Melee/AbsoluteZero.cs +++ b/Items/Weapons/Melee/AbsoluteZero.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.useStyle = ItemUseStyleID.Swing; Item.useTurn = false; Item.knockBack = 4f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/AbyssBlade.cs b/Items/Weapons/Melee/AbyssBlade.cs index 262bfc5e22..c4ef4fb816 100644 --- a/Items/Weapons/Melee/AbyssBlade.cs +++ b/Items/Weapons/Melee/AbyssBlade.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 8f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 9f; diff --git a/Items/Weapons/Melee/Aftershock.cs b/Items/Weapons/Melee/Aftershock.cs index 4a650fd46d..cdd473121c 100644 --- a/Items/Weapons/Melee/Aftershock.cs +++ b/Items/Weapons/Melee/Aftershock.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 7.5f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/AirSpinner.cs b/Items/Weapons/Melee/AirSpinner.cs index 810c1a07c9..0b6d941c3f 100644 --- a/Items/Weapons/Melee/AirSpinner.cs +++ b/Items/Weapons/Melee/AirSpinner.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 14f; Item.rare = ItemRarityID.Orange; - Item.value = Item.buyPrice(gold: 4); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/AmidiasTrident.cs b/Items/Weapons/Melee/AmidiasTrident.cs index cf6f53687d..6c9152278b 100644 --- a/Items/Weapons/Melee/AmidiasTrident.cs +++ b/Items/Weapons/Melee/AmidiasTrident.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 44; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; diff --git a/Items/Weapons/Melee/AnarchyBlade.cs b/Items/Weapons/Melee/AnarchyBlade.cs index 2471fd59fa..94648c6cbd 100644 --- a/Items/Weapons/Melee/AnarchyBlade.cs +++ b/Items/Weapons/Melee/AnarchyBlade.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 100; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; } diff --git a/Items/Weapons/Melee/Aorta.cs b/Items/Weapons/Melee/Aorta.cs index 87b204c3ce..83e4387a93 100644 --- a/Items/Weapons/Melee/Aorta.cs +++ b/Items/Weapons/Melee/Aorta.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 8f; Item.rare = ItemRarityID.Orange; - Item.value = Item.buyPrice(gold: 4); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/AquaticDischarge.cs b/Items/Weapons/Melee/AquaticDischarge.cs index 7c80065276..9d0dd2dfb6 100644 --- a/Items/Weapons/Melee/AquaticDischarge.cs +++ b/Items/Weapons/Melee/AquaticDischarge.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 2f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; } diff --git a/Items/Weapons/Melee/ArkoftheCosmos.cs b/Items/Weapons/Melee/ArkoftheCosmos.cs index 5c4e73884d..1b124c621d 100644 --- a/Items/Weapons/Melee/ArkoftheCosmos.cs +++ b/Items/Weapons/Melee/ArkoftheCosmos.cs @@ -1,6 +1,6 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; @@ -107,10 +108,9 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = null; Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Purple; Item.shoot = ProjectileID.PurificationPowder; Item.shootSpeed = 28f; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } // Terraria seems to really dislike high crit values in SetDefaults diff --git a/Items/Weapons/Melee/AstralBlade.cs b/Items/Weapons/Melee/AstralBlade.cs index 2ca14d2d70..0b25259124 100644 --- a/Items/Weapons/Melee/AstralBlade.cs +++ b/Items/Weapons/Melee/AstralBlade.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 4f; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/AstralPike.cs b/Items/Weapons/Melee/AstralPike.cs index 52105ee40a..d013981407 100644 --- a/Items/Weapons/Melee/AstralPike.cs +++ b/Items/Weapons/Melee/AstralPike.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 50; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 13f; diff --git a/Items/Weapons/Melee/AstralScythe.cs b/Items/Weapons/Melee/AstralScythe.cs index a39af656fe..5a141ca35d 100644 --- a/Items/Weapons/Melee/AstralScythe.cs +++ b/Items/Weapons/Melee/AstralScythe.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 6f; Item.UseSound = SoundID.Item71; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5f; diff --git a/Items/Weapons/Melee/Ataraxia.cs b/Items/Weapons/Melee/Ataraxia.cs index c567147c31..7a18f48154 100644 --- a/Items/Weapons/Melee/Ataraxia.cs +++ b/Items/Weapons/Melee/Ataraxia.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Materials; -using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; @@ -36,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/Avalanche.cs b/Items/Weapons/Melee/Avalanche.cs index acf5e5c71e..6cf865c7d6 100644 --- a/Items/Weapons/Melee/Avalanche.cs +++ b/Items/Weapons/Melee/Avalanche.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 7.25f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; } diff --git a/Items/Weapons/Melee/Azathoth.cs b/Items/Weapons/Melee/Azathoth.cs index 7dd2051417..cc821c1d58 100644 --- a/Items/Weapons/Melee/Azathoth.cs +++ b/Items/Weapons/Melee/Azathoth.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee.Yoyos; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -41,11 +42,10 @@ namespace CalamityMod.Items.Weapons.Melee Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; - Item.rare = ItemRarityID.Red; Item.autoReuse = true; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; - Item.value = Item.buyPrice(platinum: 5); + Item.value = CalamityGlobalItem.Rarity16BuyPrice; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/BallOFugu.cs b/Items/Weapons/Melee/BallOFugu.cs index 8d02676ffd..270bb57025 100644 --- a/Items/Weapons/Melee/BallOFugu.cs +++ b/Items/Weapons/Melee/BallOFugu.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.noMelee = true; Item.noUseGraphic = true; Item.knockBack = 8f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/BansheeHook.cs b/Items/Weapons/Melee/BansheeHook.cs index 719394ca7b..a7139769c4 100644 --- a/Items/Weapons/Melee/BansheeHook.cs +++ b/Items/Weapons/Melee/BansheeHook.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Melee.Spears; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -38,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 42f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/Basher.cs b/Items/Weapons/Melee/Basher.cs index bf0fe40235..bb9897519f 100644 --- a/Items/Weapons/Melee/Basher.cs +++ b/Items/Weapons/Melee/Basher.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.useTurn = true; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; } diff --git a/Items/Weapons/Melee/BladecrestOathsword.cs b/Items/Weapons/Melee/BladecrestOathsword.cs index a01fb90c44..f0ffcebe49 100644 --- a/Items/Weapons/Melee/BladecrestOathsword.cs +++ b/Items/Weapons/Melee/BladecrestOathsword.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.noUseGraphic = true; Item.useTurn = true; Item.channel = true; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.shootSpeed = 6f; } diff --git a/Items/Weapons/Melee/BloodyEdge.cs b/Items/Weapons/Melee/BloodyEdge.cs index fd5e1ccdc4..f09e27bee3 100644 --- a/Items/Weapons/Melee/BloodyEdge.cs +++ b/Items/Weapons/Melee/BloodyEdge.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.useTurn = true; Item.height = 60; Item.scale = 1.25f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; } diff --git a/Items/Weapons/Melee/Bonebreaker.cs b/Items/Weapons/Melee/Bonebreaker.cs index 4dee32e880..ddd0245fb5 100644 --- a/Items/Weapons/Melee/Bonebreaker.cs +++ b/Items/Weapons/Melee/Bonebreaker.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.useTurn = true; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.noMelee = true; diff --git a/Items/Weapons/Melee/Brimlance.cs b/Items/Weapons/Melee/Brimlance.cs index 1e8e713f3e..5c64aa424d 100644 --- a/Items/Weapons/Melee/Brimlance.cs +++ b/Items/Weapons/Melee/Brimlance.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 56; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Melee/Brimlash.cs b/Items/Weapons/Melee/Brimlash.cs index bd6a36e0f9..b783b63166 100644 --- a/Items/Weapons/Melee/Brimlash.cs +++ b/Items/Weapons/Melee/Brimlash.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 6f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Melee/BrimstoneSword.cs b/Items/Weapons/Melee/BrimstoneSword.cs index 5e3370c7a3..e40541c5fd 100644 --- a/Items/Weapons/Melee/BrimstoneSword.cs +++ b/Items/Weapons/Melee/BrimstoneSword.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 7.5f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/Melee/BrokenBiomeBlade.cs b/Items/Weapons/Melee/BrokenBiomeBlade.cs index 57e677716b..f51a27795e 100644 --- a/Items/Weapons/Melee/BrokenBiomeBlade.cs +++ b/Items/Weapons/Melee/BrokenBiomeBlade.cs @@ -134,7 +134,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shoot = ProjectileID.PurificationPowder; Item.knockBack = 5f; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.shootSpeed = 12f; } diff --git a/Items/Weapons/Melee/CatastropheClaymore.cs b/Items/Weapons/Melee/CatastropheClaymore.cs index 93e2d951b3..5ec3fdce36 100644 --- a/Items/Weapons/Melee/CatastropheClaymore.cs +++ b/Items/Weapons/Melee/CatastropheClaymore.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 56; - Item.value = Item.buyPrice(0, 48, 0, 0); + Item.value = CalamityGlobalItem.Rarity7BuyPrice; Item.rare = ItemRarityID.LightPurple; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 11f; diff --git a/Items/Weapons/Melee/CausticEdge.cs b/Items/Weapons/Melee/CausticEdge.cs index e52a8545c6..7c5cdf25f9 100644 --- a/Items/Weapons/Melee/CausticEdge.cs +++ b/Items/Weapons/Melee/CausticEdge.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 48; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; } diff --git a/Items/Weapons/Melee/ClamCrusher.cs b/Items/Weapons/Melee/ClamCrusher.cs index 3230269aca..a344c3121a 100644 --- a/Items/Weapons/Melee/ClamCrusher.cs +++ b/Items/Weapons/Melee/ClamCrusher.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.noMelee = true; Item.noUseGraphic = true; Item.knockBack = 10f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/Cnidarian.cs b/Items/Weapons/Melee/Cnidarian.cs index 16909e7a42..6f1a636f64 100644 --- a/Items/Weapons/Melee/Cnidarian.cs +++ b/Items/Weapons/Melee/Cnidarian.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 10f; Item.rare = ItemRarityID.Green; - Item.value = Item.buyPrice(gold: 2); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/CometQuasher.cs b/Items/Weapons/Melee/CometQuasher.cs index f535ed5d80..b802be9f9e 100644 --- a/Items/Weapons/Melee/CometQuasher.cs +++ b/Items/Weapons/Melee/CometQuasher.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 7.75f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shootSpeed = 9f; } diff --git a/Items/Weapons/Melee/CosmicDischarge.cs b/Items/Weapons/Melee/CosmicDischarge.cs index b32df92963..baa5b906fd 100644 --- a/Items/Weapons/Melee/CosmicDischarge.cs +++ b/Items/Weapons/Melee/CosmicDischarge.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,9 +36,8 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 24f; Item.shoot = ModContent.ProjectileType(); - Item.rare = ItemRarityID.Purple; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Melee/CosmicShiv.cs b/Items/Weapons/Melee/CosmicShiv.cs index 95ce00aade..8dde48b2c1 100644 --- a/Items/Weapons/Melee/CosmicShiv.cs +++ b/Items/Weapons/Melee/CosmicShiv.cs @@ -1,10 +1,10 @@ -using Terraria; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Melee.Shortswords; +using CalamityMod.Rarities; +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Items.Materials; -using CalamityMod.Projectiles.Melee.Shortswords; -using CalamityMod.Tiles.Furniture.CraftingStations; - namespace CalamityMod.Items.Weapons.Melee { @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 2.4f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; //Yatagarasu#0001 } diff --git a/Items/Weapons/Melee/CrescentMoon.cs b/Items/Weapons/Melee/CrescentMoon.cs index 015cc5f78a..65119623f4 100644 --- a/Items/Weapons/Melee/CrescentMoon.cs +++ b/Items/Weapons/Melee/CrescentMoon.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Melee; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -34,9 +35,8 @@ namespace CalamityMod.Items.Weapons.Melee Item.useStyle = ItemUseStyleID.Shoot; Item.knockBack = 4f; Item.UseSound = SoundID.Item82; - Item.value = Item.buyPrice(1, 40, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.value = CalamityGlobalItem.Rarity14BuyPrice; + Item.rare = ModContent.RarityType(); Item.shootSpeed = 24f; Item.shoot = ModContent.ProjectileType(); } diff --git a/Items/Weapons/Melee/DarklightGreatsword.cs b/Items/Weapons/Melee/DarklightGreatsword.cs index 779ff13ec3..d427f2ca3b 100644 --- a/Items/Weapons/Melee/DarklightGreatsword.cs +++ b/Items/Weapons/Melee/DarklightGreatsword.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.height = 60; Item.scale = 1.5f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 25f; diff --git a/Items/Weapons/Melee/DeathsAscension.cs b/Items/Weapons/Melee/DeathsAscension.cs index c9e1693c67..6d85ec7240 100644 --- a/Items/Weapons/Melee/DeathsAscension.cs +++ b/Items/Weapons/Melee/DeathsAscension.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -33,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 12f; Item.shoot = ModContent.ProjectileType(); Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Weapons/Melee/DepthCrusher.cs b/Items/Weapons/Melee/DepthCrusher.cs index bd34911e84..e73aac8b38 100644 --- a/Items/Weapons/Melee/DepthCrusher.cs +++ b/Items/Weapons/Melee/DepthCrusher.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.height = 50; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; } diff --git a/Items/Weapons/Melee/DevilsDevastation.cs b/Items/Weapons/Melee/DevilsDevastation.cs index e6c0e4a912..1f10e02927 100644 --- a/Items/Weapons/Melee/DevilsDevastation.cs +++ b/Items/Weapons/Melee/DevilsDevastation.cs @@ -1,11 +1,12 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; @@ -38,11 +39,10 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 6.75f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 28f; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source2, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Melee/DevilsSunrise.cs b/Items/Weapons/Melee/DevilsSunrise.cs index 49d9dfefec..c209d94b20 100644 --- a/Items/Weapons/Melee/DevilsSunrise.cs +++ b/Items/Weapons/Melee/DevilsSunrise.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.useStyle = ItemUseStyleID.Shoot; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/DiseasedPike.cs b/Items/Weapons/Melee/DiseasedPike.cs index a784f6f823..c292fdd675 100644 --- a/Items/Weapons/Melee/DiseasedPike.cs +++ b/Items/Weapons/Melee/DiseasedPike.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 58; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Melee/DraconicDestruction.cs b/Items/Weapons/Melee/DraconicDestruction.cs index b31d77e318..19babcca9e 100644 --- a/Items/Weapons/Melee/DraconicDestruction.cs +++ b/Items/Weapons/Melee/DraconicDestruction.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 14f; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Weapons/Melee/DragonPow.cs b/Items/Weapons/Melee/DragonPow.cs index 4a5123d96b..81634f622e 100644 --- a/Items/Weapons/Melee/DragonPow.cs +++ b/Items/Weapons/Melee/DragonPow.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; @@ -43,7 +44,7 @@ Summons a barrage of petals and waterfalls on enemy hits"); Item.channel = true; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/DragonRage.cs b/Items/Weapons/Melee/DragonRage.cs index 9028ba7755..a06698045f 100644 --- a/Items/Weapons/Melee/DragonRage.cs +++ b/Items/Weapons/Melee/DragonRage.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Terraria.ID; using Terraria.ModLoader; @@ -32,8 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.useStyle = ItemUseStyleID.Shoot; Item.UseSound = SoundID.DD2_SkyDragonsFurySwing; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } } } diff --git a/Items/Weapons/Melee/Earth.cs b/Items/Weapons/Melee/Earth.cs index 6e8e23f7b4..b6b0c38d16 100644 --- a/Items/Weapons/Melee/Earth.cs +++ b/Items/Weapons/Melee/Earth.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; @@ -39,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Weapons/Melee/EarthenPike.cs b/Items/Weapons/Melee/EarthenPike.cs index cdd26b42ef..0196a033c3 100644 --- a/Items/Weapons/Melee/EarthenPike.cs +++ b/Items/Weapons/Melee/EarthenPike.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 60; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 8f; diff --git a/Items/Weapons/Melee/ElementalExcalibur.cs b/Items/Weapons/Melee/ElementalExcalibur.cs index 86d36cb7da..47f08e6bbd 100644 --- a/Items/Weapons/Melee/ElementalExcalibur.cs +++ b/Items/Weapons/Melee/ElementalExcalibur.cs @@ -1,11 +1,12 @@ -using Terraria.DataStructures; -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -40,11 +41,10 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.width = 112; Item.height = 112; - Item.value = Item.buyPrice(5, 0, 0, 0); - Item.rare = ItemRarityID.Purple; + Item.value = CalamityGlobalItem.Rarity16BuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; - Item.Calamity().customRarity = CalamityRarity.Rainbow; + Item.rare = ModContent.RarityType(); } // Terraria seems to really dislike high crit values in SetDefaults diff --git a/Items/Weapons/Melee/EmpyreanKnives.cs b/Items/Weapons/Melee/EmpyreanKnives.cs index 9f08eb02ad..f475985fc3 100644 --- a/Items/Weapons/Melee/EmpyreanKnives.cs +++ b/Items/Weapons/Melee/EmpyreanKnives.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -34,8 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.height = 20; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; } diff --git a/Items/Weapons/Melee/EntropicClaymore.cs b/Items/Weapons/Melee/EntropicClaymore.cs index 1f8dc42e60..574c896f43 100644 --- a/Items/Weapons/Melee/EntropicClaymore.cs +++ b/Items/Weapons/Melee/EntropicClaymore.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 5.25f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Melee/EssenceFlayer.cs b/Items/Weapons/Melee/EssenceFlayer.cs index f2ff4830d2..de6b8a9875 100644 --- a/Items/Weapons/Melee/EssenceFlayer.cs +++ b/Items/Weapons/Melee/EssenceFlayer.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -32,11 +33,10 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item71; Item.autoReuse = true; Item.height = 78; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 21f; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/Excelsus.cs b/Items/Weapons/Melee/Excelsus.cs index 4ab12d185e..2a1f17c094 100644 --- a/Items/Weapons/Melee/Excelsus.cs +++ b/Items/Weapons/Melee/Excelsus.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -32,8 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.height = 94; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; } diff --git a/Items/Weapons/Melee/Exoblade.cs b/Items/Weapons/Melee/Exoblade.cs index 29ba5e8e8d..18b9d9f628 100644 --- a/Items/Weapons/Melee/Exoblade.cs +++ b/Items/Weapons/Melee/Exoblade.cs @@ -1,14 +1,15 @@ using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; +using System.Linq; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; -using System.Linq; -using CalamityMod.Projectiles.Melee; using static Terraria.ModLoader.ModContent; -using Terraria.DataStructures; -using Microsoft.Xna.Framework; namespace CalamityMod.Items.Weapons.Melee { @@ -77,9 +78,8 @@ namespace CalamityMod.Items.Weapons.Melee Item.channel = true; Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.shoot = ProjectileType(); - Item.rare = ItemRarityID.Red; Item.shootSpeed = 9f; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool CanShoot(Player player) diff --git a/Items/Weapons/Melee/FallenPaladinsHammer.cs b/Items/Weapons/Melee/FallenPaladinsHammer.cs index 94ed83fd71..5c25f41927 100644 --- a/Items/Weapons/Melee/FallenPaladinsHammer.cs +++ b/Items/Weapons/Melee/FallenPaladinsHammer.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.DamageType = DamageClass.MeleeNoSpeed; Item.height = 28; - Item.value = Item.buyPrice(gold: 80); + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 14f; diff --git a/Items/Weapons/Melee/FaultLine.cs b/Items/Weapons/Melee/FaultLine.cs index 350708dfc0..e4e152c473 100644 --- a/Items/Weapons/Melee/FaultLine.cs +++ b/Items/Weapons/Melee/FaultLine.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 14f; Item.rare = ItemRarityID.Yellow; - Item.value = Item.buyPrice(gold: 80); + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/FeralthornClaymore.cs b/Items/Weapons/Melee/FeralthornClaymore.cs index 490244bdc2..8870607b02 100644 --- a/Items/Weapons/Melee/FeralthornClaymore.cs +++ b/Items/Weapons/Melee/FeralthornClaymore.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 66; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; } diff --git a/Items/Weapons/Melee/FlarefrostBlade.cs b/Items/Weapons/Melee/FlarefrostBlade.cs index 248eb63358..564cd2a6ec 100644 --- a/Items/Weapons/Melee/FlarefrostBlade.cs +++ b/Items/Weapons/Melee/FlarefrostBlade.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 66; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 11f; diff --git a/Items/Weapons/Melee/Floodtide.cs b/Items/Weapons/Melee/Floodtide.cs index 4280dab996..fbb43767f6 100644 --- a/Items/Weapons/Melee/Floodtide.cs +++ b/Items/Weapons/Melee/Floodtide.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 6f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/ForbiddenOathblade.cs b/Items/Weapons/Melee/ForbiddenOathblade.cs index a0bedc9fae..96d6655267 100644 --- a/Items/Weapons/Melee/ForbiddenOathblade.cs +++ b/Items/Weapons/Melee/ForbiddenOathblade.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 6.5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Melee/ForsakenSaber.cs b/Items/Weapons/Melee/ForsakenSaber.cs index fd3b169971..dd03f41ef1 100644 --- a/Items/Weapons/Melee/ForsakenSaber.cs +++ b/Items/Weapons/Melee/ForsakenSaber.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 56; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index c8423000a7..19ab84fc73 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -1,17 +1,18 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.DataStructures; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; using Microsoft.Xna.Framework.Graphics; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; using Terraria.ModLoader.IO; using static Terraria.ModLoader.ModContent; @@ -147,11 +148,10 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 9f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.shoot = ProjectileID.PurificationPowder; Item.shootSpeed = 24f; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } #region saving and syncing attunements diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 5bcbb3a4c2..994aa0e66c 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using Terraria.WorldBuilding; @@ -52,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/GalactusBlade.cs b/Items/Weapons/Melee/GalactusBlade.cs index 741db3e7c2..05f78cf517 100644 --- a/Items/Weapons/Melee/GalactusBlade.cs +++ b/Items/Weapons/Melee/GalactusBlade.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -37,8 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.height = 58; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 23f; } diff --git a/Items/Weapons/Melee/GalaxySmasher.cs b/Items/Weapons/Melee/GalaxySmasher.cs index fa5fa522d0..da3413af98 100644 --- a/Items/Weapons/Melee/GalaxySmasher.cs +++ b/Items/Weapons/Melee/GalaxySmasher.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -38,9 +39,8 @@ namespace CalamityMod.Items.Weapons.Melee Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.Item1; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; - Item.value = Item.buyPrice(platinum: 1, gold: 80); + Item.rare = ModContent.RarityType(); + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = Speed; diff --git a/Items/Weapons/Melee/GalileoGladius.cs b/Items/Weapons/Melee/GalileoGladius.cs index beeeb76996..f459414c46 100644 --- a/Items/Weapons/Melee/GalileoGladius.cs +++ b/Items/Weapons/Melee/GalileoGladius.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; using CalamityMod.Projectiles.Melee.Shortswords; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -38,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 2.4f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Weapons/Melee/GeliticBlade.cs b/Items/Weapons/Melee/GeliticBlade.cs index e5ed0a28d9..ac332eec26 100644 --- a/Items/Weapons/Melee/GeliticBlade.cs +++ b/Items/Weapons/Melee/GeliticBlade.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 62; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 9f; diff --git a/Items/Weapons/Melee/GoldplumeSpear.cs b/Items/Weapons/Melee/GoldplumeSpear.cs index 1a20a8d663..953fcae055 100644 --- a/Items/Weapons/Melee/GoldplumeSpear.cs +++ b/Items/Weapons/Melee/GoldplumeSpear.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 54; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 8f; diff --git a/Items/Weapons/Melee/GrandGuardian.cs b/Items/Weapons/Melee/GrandGuardian.cs index ba2c5a497b..894270ad5b 100644 --- a/Items/Weapons/Melee/GrandGuardian.cs +++ b/Items/Weapons/Melee/GrandGuardian.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 8.5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(1, 0, 0, 0); + Item.value = CalamityGlobalItem.Rarity10BuyPrice; Item.rare = ItemRarityID.Red; Item.shootSpeed = 12f; } diff --git a/Items/Weapons/Melee/GreatswordofBlah.cs b/Items/Weapons/Melee/GreatswordofBlah.cs index 98a8a4f201..c25bf19ebc 100644 --- a/Items/Weapons/Melee/GreatswordofBlah.cs +++ b/Items/Weapons/Melee/GreatswordofBlah.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; @@ -32,8 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; } diff --git a/Items/Weapons/Melee/Greentide.cs b/Items/Weapons/Melee/Greentide.cs index 9c1817cb95..9a35205b68 100644 --- a/Items/Weapons/Melee/Greentide.cs +++ b/Items/Weapons/Melee/Greentide.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.useTurn = true; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 7; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/HellfireFlamberge.cs b/Items/Weapons/Melee/HellfireFlamberge.cs index 1963484a7e..d28aaeb143 100644 --- a/Items/Weapons/Melee/HellfireFlamberge.cs +++ b/Items/Weapons/Melee/HellfireFlamberge.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 60; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 20f; diff --git a/Items/Weapons/Melee/HellionFlowerSpear.cs b/Items/Weapons/Melee/HellionFlowerSpear.cs index 847b5e8152..2a282402fe 100644 --- a/Items/Weapons/Melee/HellionFlowerSpear.cs +++ b/Items/Weapons/Melee/HellionFlowerSpear.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 64; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 8f; diff --git a/Items/Weapons/Melee/Hellkite.cs b/Items/Weapons/Melee/Hellkite.cs index 30b5e7f6f5..620af39f48 100644 --- a/Items/Weapons/Melee/Hellkite.cs +++ b/Items/Weapons/Melee/Hellkite.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 84; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; } diff --git a/Items/Weapons/Melee/HolyCollider.cs b/Items/Weapons/Melee/HolyCollider.cs index 6f52c0fe4b..6be7e811a3 100644 --- a/Items/Weapons/Melee/HolyCollider.cs +++ b/Items/Weapons/Melee/HolyCollider.cs @@ -1,9 +1,10 @@ using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using System; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Melee { @@ -32,9 +33,8 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.shootSpeed = 10f; - Item.rare = ItemRarityID.Purple; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Melee/IllustriousKnives.cs b/Items/Weapons/Melee/IllustriousKnives.cs index 409934273e..ea81ac1be3 100644 --- a/Items/Weapons/Melee/IllustriousKnives.cs +++ b/Items/Weapons/Melee/IllustriousKnives.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -36,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.height = 62; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/InsidiousImpaler.cs b/Items/Weapons/Melee/InsidiousImpaler.cs index 1d78dc5770..02a46c5b65 100644 --- a/Items/Weapons/Melee/InsidiousImpaler.cs +++ b/Items/Weapons/Melee/InsidiousImpaler.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Melee.Spears; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -34,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 5f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; diff --git a/Items/Weapons/Melee/Lacerator.cs b/Items/Weapons/Melee/Lacerator.cs index a7b82ed913..49b68da302 100644 --- a/Items/Weapons/Melee/Lacerator.cs +++ b/Items/Weapons/Melee/Lacerator.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee.Yoyos; +using CalamityMod.Rarities; using Terraria.ID; using Terraria.ModLoader; @@ -40,8 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 16f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Weapons/Melee/LifefruitScythe.cs b/Items/Weapons/Melee/LifefruitScythe.cs index 80ed39784c..e8b3eb2695 100644 --- a/Items/Weapons/Melee/LifefruitScythe.cs +++ b/Items/Weapons/Melee/LifefruitScythe.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -30,8 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.height = 72; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; } diff --git a/Items/Weapons/Melee/LionHeart.cs b/Items/Weapons/Melee/LionHeart.cs index 775d800f98..f2b770adfe 100644 --- a/Items/Weapons/Melee/LionHeart.cs +++ b/Items/Weapons/Melee/LionHeart.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Cooldowns; +using CalamityMod.Cooldowns; using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Typeless; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -39,8 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Weapons/Melee/Lucrecia.cs b/Items/Weapons/Melee/Lucrecia.cs index 0e7835dec8..ed7e9b7654 100644 --- a/Items/Weapons/Melee/Lucrecia.cs +++ b/Items/Weapons/Melee/Lucrecia.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.noMelee = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 2f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; } diff --git a/Items/Weapons/Melee/MajesticGuard.cs b/Items/Weapons/Melee/MajesticGuard.cs index adbe08061a..35cc7a0b0d 100644 --- a/Items/Weapons/Melee/MajesticGuard.cs +++ b/Items/Weapons/Melee/MajesticGuard.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 7.5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; } diff --git a/Items/Weapons/Melee/MantisClaws.cs b/Items/Weapons/Melee/MantisClaws.cs index 6f2942a15c..e50b931e56 100644 --- a/Items/Weapons/Melee/MantisClaws.cs +++ b/Items/Weapons/Melee/MantisClaws.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 20; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; } diff --git a/Items/Weapons/Melee/MirrorBlade.cs b/Items/Weapons/Melee/MirrorBlade.cs index d783b83dbe..6a6a9a8083 100644 --- a/Items/Weapons/Melee/MirrorBlade.cs +++ b/Items/Weapons/Melee/MirrorBlade.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -33,8 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.height = 62; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.shootSpeed = 9f; Item.shoot = ModContent.ProjectileType(); } diff --git a/Items/Weapons/Melee/Mourningstar.cs b/Items/Weapons/Melee/Mourningstar.cs index b65e3c4ef4..5557064fed 100644 --- a/Items/Weapons/Melee/Mourningstar.cs +++ b/Items/Weapons/Melee/Mourningstar.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -33,8 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 2.5f; Item.UseSound = SoundID.Item116; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.shootSpeed = 24f; Item.shoot = ModContent.ProjectileType(); } diff --git a/Items/Weapons/Melee/Murasama.cs b/Items/Weapons/Melee/Murasama.cs index 793e4607f4..f1d0be476c 100644 --- a/Items/Weapons/Melee/Murasama.cs +++ b/Items/Weapons/Melee/Murasama.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -39,11 +40,10 @@ namespace CalamityMod.Items.Weapons.Melee Item.useTime = 5; Item.knockBack = 6.5f; Item.autoReuse = false; - Item.value = Item.buyPrice(2, 50, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 24f; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 14)); } diff --git a/Items/Weapons/Melee/MycelialClaws.cs b/Items/Weapons/Melee/MycelialClaws.cs index ff6d04d091..d301931151 100644 --- a/Items/Weapons/Melee/MycelialClaws.cs +++ b/Items/Weapons/Melee/MycelialClaws.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 24; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; } diff --git a/Items/Weapons/Melee/Nadir.cs b/Items/Weapons/Melee/Nadir.cs index 06ef7f4d60..8007d538d3 100644 --- a/Items/Weapons/Melee/Nadir.cs +++ b/Items/Weapons/Melee/Nadir.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee.Spears; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; using Terraria.ID; @@ -38,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/Nebulash.cs b/Items/Weapons/Melee/Nebulash.cs index ce5ac3e0cb..229bba9103 100644 --- a/Items/Weapons/Melee/Nebulash.cs +++ b/Items/Weapons/Melee/Nebulash.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.useStyle = ItemUseStyleID.Shoot; Item.knockBack = 2f; Item.UseSound = SoundID.Item117; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.shootSpeed = 24f; Item.shoot = ModContent.ProjectileType(); } diff --git a/Items/Weapons/Melee/NeptunesBounty.cs b/Items/Weapons/Melee/NeptunesBounty.cs index 821c149e76..e817f99ec1 100644 --- a/Items/Weapons/Melee/NeptunesBounty.cs +++ b/Items/Weapons/Melee/NeptunesBounty.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -37,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 12f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Weapons/Melee/Oblivion.cs b/Items/Weapons/Melee/Oblivion.cs index e03281776d..7a562573b7 100644 --- a/Items/Weapons/Melee/Oblivion.cs +++ b/Items/Weapons/Melee/Oblivion.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 14f; Item.rare = ItemRarityID.Lime; - Item.value = Item.buyPrice(gold: 60); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; } } } diff --git a/Items/Weapons/Melee/OldLordOathsword.cs b/Items/Weapons/Melee/OldLordOathsword.cs index 59e16465b6..92b0df6dbe 100644 --- a/Items/Weapons/Melee/OldLordOathsword.cs +++ b/Items/Weapons/Melee/OldLordOathsword.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.noUseGraphic = true; Item.channel = true; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; } diff --git a/Items/Weapons/Melee/Omniblade.cs b/Items/Weapons/Melee/Omniblade.cs index 4ab17121d4..beeb6c6e37 100644 --- a/Items/Weapons/Melee/Omniblade.cs +++ b/Items/Weapons/Melee/Omniblade.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 146; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.noMelee = true; Item.noUseGraphic = true; Item.channel = true; diff --git a/Items/Weapons/Melee/Oracle.cs b/Items/Weapons/Melee/Oracle.cs index a70f494ee7..e2935f759a 100644 --- a/Items/Weapons/Melee/Oracle.cs +++ b/Items/Weapons/Melee/Oracle.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee.Yoyos; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -50,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 16f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Weapons/Melee/Pandemic.cs b/Items/Weapons/Melee/Pandemic.cs index cc37018d66..894948ff5b 100644 --- a/Items/Weapons/Melee/Pandemic.cs +++ b/Items/Weapons/Melee/Pandemic.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 14f; Item.rare = ItemRarityID.Yellow; - Item.value = Item.buyPrice(gold: 80); + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; } } } diff --git a/Items/Weapons/Melee/PerfectDark.cs b/Items/Weapons/Melee/PerfectDark.cs index 6c25e36cde..27952cd245 100644 --- a/Items/Weapons/Melee/PerfectDark.cs +++ b/Items/Weapons/Melee/PerfectDark.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 50; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Melee/PhosphorescentGauntlet.cs b/Items/Weapons/Melee/PhosphorescentGauntlet.cs index 07c0040f90..e36ddefab8 100644 --- a/Items/Weapons/Melee/PhosphorescentGauntlet.cs +++ b/Items/Weapons/Melee/PhosphorescentGauntlet.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -37,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 1f; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } // Terraria seems to really dislike high crit values in SetDefaults. diff --git a/Items/Weapons/Melee/PhotonRipper.cs b/Items/Weapons/Melee/PhotonRipper.cs index d0e9d69804..cb87e0444d 100644 --- a/Items/Weapons/Melee/PhotonRipper.cs +++ b/Items/Weapons/Melee/PhotonRipper.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -40,8 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 1f; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; } diff --git a/Items/Weapons/Melee/PrismaticBreaker.cs b/Items/Weapons/Melee/PrismaticBreaker.cs index f15f4c67b6..5ef6b2735c 100644 --- a/Items/Weapons/Melee/PrismaticBreaker.cs +++ b/Items/Weapons/Melee/PrismaticBreaker.cs @@ -1,7 +1,9 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Materials; +using CalamityMod.Items.Tools; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -9,7 +11,6 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Items.Tools; namespace CalamityMod.Items.Weapons.Melee { @@ -62,7 +63,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 14f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Weapons/Melee/Pwnagehammer.cs b/Items/Weapons/Melee/Pwnagehammer.cs index 0339a2a63d..69306c0f78 100644 --- a/Items/Weapons/Melee/Pwnagehammer.cs +++ b/Items/Weapons/Melee/Pwnagehammer.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.DamageType = DamageClass.MeleeNoSpeed; Item.height = 66; - Item.value = Item.buyPrice(gold: 48); + Item.value = CalamityGlobalItem.RarityLightPurpleBuyPrice; Item.rare = ItemRarityID.LightPurple; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 24.4f; diff --git a/Items/Weapons/Melee/Quagmire.cs b/Items/Weapons/Melee/Quagmire.cs index 0b83c32572..c31145dd16 100644 --- a/Items/Weapons/Melee/Quagmire.cs +++ b/Items/Weapons/Melee/Quagmire.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 10f; Item.rare = ItemRarityID.Lime; - Item.value = Item.buyPrice(gold: 60); + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/RedSun.cs b/Items/Weapons/Melee/RedSun.cs index 37e0a98ba7..ac3c577cc4 100644 --- a/Items/Weapons/Melee/RedSun.cs +++ b/Items/Weapons/Melee/RedSun.cs @@ -1,11 +1,12 @@ -using Terraria.DataStructures; -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -39,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 15f; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Weapons/Melee/RedtideSpear.cs b/Items/Weapons/Melee/RedtideSpear.cs index d3fda2d728..14ee4fc91e 100644 --- a/Items/Weapons/Melee/RedtideSpear.cs +++ b/Items/Weapons/Melee/RedtideSpear.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = null; Item.autoReuse = true; Item.height = 56; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 4f; diff --git a/Items/Weapons/Melee/Riptide.cs b/Items/Weapons/Melee/Riptide.cs index 22716c55f1..c587d5e1d2 100644 --- a/Items/Weapons/Melee/Riptide.cs +++ b/Items/Weapons/Melee/Riptide.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 18f; Item.rare = ItemRarityID.Green; - Item.value = Item.buyPrice(gold: 2); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/SausageMaker.cs b/Items/Weapons/Melee/SausageMaker.cs index d6d77ece4a..0173dd3cda 100644 --- a/Items/Weapons/Melee/SausageMaker.cs +++ b/Items/Weapons/Melee/SausageMaker.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 42; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; diff --git a/Items/Weapons/Melee/ScourgeoftheCosmos.cs b/Items/Weapons/Melee/ScourgeoftheCosmos.cs index b76b9e1c69..8528aba91c 100644 --- a/Items/Weapons/Melee/ScourgeoftheCosmos.cs +++ b/Items/Weapons/Melee/ScourgeoftheCosmos.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; @@ -29,8 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item109; Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; } diff --git a/Items/Weapons/Melee/SeashineSword.cs b/Items/Weapons/Melee/SeashineSword.cs index a912b15630..c3dc632176 100644 --- a/Items/Weapons/Melee/SeashineSword.cs +++ b/Items/Weapons/Melee/SeashineSword.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.useTime = 30; Item.damage = 26; Item.DamageType = DamageClass.Melee; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.width = 38; Item.height = 38; Item.knockBack = 2; diff --git a/Items/Weapons/Melee/SeekingScorcher.cs b/Items/Weapons/Melee/SeekingScorcher.cs index e785b891d9..39b296d852 100644 --- a/Items/Weapons/Melee/SeekingScorcher.cs +++ b/Items/Weapons/Melee/SeekingScorcher.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Terraria.ID; using Terraria.ModLoader; @@ -33,8 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 14f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Weapons/Melee/Shimmerspark.cs b/Items/Weapons/Melee/Shimmerspark.cs index d7a9955f2d..452f6d95ac 100644 --- a/Items/Weapons/Melee/Shimmerspark.cs +++ b/Items/Weapons/Melee/Shimmerspark.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 12f; Item.rare = ItemRarityID.Pink; - Item.value = Item.buyPrice(gold: 36); + Item.value = CalamityGlobalItem.RarityPinkBuyPrice; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/SolarFlare.cs b/Items/Weapons/Melee/SolarFlare.cs index 0966bc6380..5d5e6c135b 100644 --- a/Items/Weapons/Melee/SolarFlare.cs +++ b/Items/Weapons/Melee/SolarFlare.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Melee.Yoyos; +using CalamityMod.Rarities; using Terraria.ID; using Terraria.ModLoader; @@ -38,8 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 16f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } } } diff --git a/Items/Weapons/Melee/SoulEdge.cs b/Items/Weapons/Melee/SoulEdge.cs index 6f28d11ff9..91e28d33ec 100644 --- a/Items/Weapons/Melee/SoulEdge.cs +++ b/Items/Weapons/Melee/SoulEdge.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -37,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 12f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Melee/SoulHarvester.cs b/Items/Weapons/Melee/SoulHarvester.cs index 23083cd2f4..5f231b72d5 100644 --- a/Items/Weapons/Melee/SoulHarvester.cs +++ b/Items/Weapons/Melee/SoulHarvester.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item71; Item.autoReuse = true; Item.height = 64; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 18f; diff --git a/Items/Weapons/Melee/SpineOfThanatos.cs b/Items/Weapons/Melee/SpineOfThanatos.cs index fcde77dc33..8a31b71ebb 100644 --- a/Items/Weapons/Melee/SpineOfThanatos.cs +++ b/Items/Weapons/Melee/SpineOfThanatos.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -22,9 +23,8 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = Item.height = 28; Item.damage = 260; - Item.rare = ItemRarityID.Red; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.noMelee = true; Item.noUseGraphic = true; Item.channel = true; diff --git a/Items/Weapons/Melee/StarnightLance.cs b/Items/Weapons/Melee/StarnightLance.cs index ba9c7218f3..4770df2ed3 100644 --- a/Items/Weapons/Melee/StarnightLance.cs +++ b/Items/Weapons/Melee/StarnightLance.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 72; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; diff --git a/Items/Weapons/Melee/StormSaber.cs b/Items/Weapons/Melee/StormSaber.cs index 93962c5e49..0756a55634 100644 --- a/Items/Weapons/Melee/StormSaber.cs +++ b/Items/Weapons/Melee/StormSaber.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 64; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Melee/StreamGouge.cs b/Items/Weapons/Melee/StreamGouge.cs index 63e1772945..0b7fd66b74 100644 --- a/Items/Weapons/Melee/StreamGouge.cs +++ b/Items/Weapons/Melee/StreamGouge.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee.Spears; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -43,10 +44,9 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item20; Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; - Item.rare = ItemRarityID.Red; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/SubmarineShocker.cs b/Items/Weapons/Melee/SubmarineShocker.cs index 8b79b79f96..5047569e64 100644 --- a/Items/Weapons/Melee/SubmarineShocker.cs +++ b/Items/Weapons/Melee/SubmarineShocker.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 2f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; } } diff --git a/Items/Weapons/Melee/SulphurousGrabber.cs b/Items/Weapons/Melee/SulphurousGrabber.cs index 040e5c3836..9d4335b53b 100644 --- a/Items/Weapons/Melee/SulphurousGrabber.cs +++ b/Items/Weapons/Melee/SulphurousGrabber.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 12f; Item.rare = ItemRarityID.Pink; - Item.value = Item.buyPrice(gold: 36); + Item.value = CalamityGlobalItem.RarityPinkBuyPrice; } } } diff --git a/Items/Weapons/Melee/TeardropCleaver.cs b/Items/Weapons/Melee/TeardropCleaver.cs index 145a48f6e6..67ee6bdb18 100644 --- a/Items/Weapons/Melee/TeardropCleaver.cs +++ b/Items/Weapons/Melee/TeardropCleaver.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 66; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; } diff --git a/Items/Weapons/Melee/TerraEdge.cs b/Items/Weapons/Melee/TerraEdge.cs index 733fefdf82..67343748fe 100644 --- a/Items/Weapons/Melee/TerraEdge.cs +++ b/Items/Weapons/Melee/TerraEdge.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 6.25f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Melee/TerraLance.cs b/Items/Weapons/Melee/TerraLance.cs index 85bca5f26d..98fed94c19 100644 --- a/Items/Weapons/Melee/TerraLance.cs +++ b/Items/Weapons/Melee/TerraLance.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 44; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 11f; diff --git a/Items/Weapons/Melee/Terratomere.cs b/Items/Weapons/Melee/Terratomere.cs index 2ad7270b6a..2d536c3cec 100644 --- a/Items/Weapons/Melee/Terratomere.cs +++ b/Items/Weapons/Melee/Terratomere.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -34,8 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.height = 66; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 20f; } diff --git a/Items/Weapons/Melee/TerrorBlade.cs b/Items/Weapons/Melee/TerrorBlade.cs index 33c75ed257..988229a051 100644 --- a/Items/Weapons/Melee/TerrorBlade.cs +++ b/Items/Weapons/Melee/TerrorBlade.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -36,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 20f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/TheBurningSky.cs b/Items/Weapons/Melee/TheBurningSky.cs index bcd4909bf9..db029ecf42 100644 --- a/Items/Weapons/Melee/TheBurningSky.cs +++ b/Items/Weapons/Melee/TheBurningSky.cs @@ -1,11 +1,12 @@ -using Terraria.DataStructures; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; -using CalamityMod.Buffs.DamageOverTime; namespace CalamityMod.Items.Weapons.Melee { @@ -43,8 +44,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 14f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Melee/TheEnforcer.cs b/Items/Weapons/Melee/TheEnforcer.cs index d6faf2bc3e..f6584c15e1 100644 --- a/Items/Weapons/Melee/TheEnforcer.cs +++ b/Items/Weapons/Melee/TheEnforcer.cs @@ -1,13 +1,14 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Melee { @@ -34,9 +35,8 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 9f; Item.UseSound = SoundID.Item20; Item.autoReuse = true; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/TheGodsGambit.cs b/Items/Weapons/Melee/TheGodsGambit.cs index f81793008f..b2ed4bb9cf 100644 --- a/Items/Weapons/Melee/TheGodsGambit.cs +++ b/Items/Weapons/Melee/TheGodsGambit.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 10f; Item.rare = ItemRarityID.LightRed; - Item.value = Item.buyPrice(gold: 12); + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/TheLastMourning.cs b/Items/Weapons/Melee/TheLastMourning.cs index b10ca26194..6aa2bd3cbf 100644 --- a/Items/Weapons/Melee/TheLastMourning.cs +++ b/Items/Weapons/Melee/TheLastMourning.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using CalamityMod.NPCs.DevourerofGods; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -35,8 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Weapons/Melee/TheMicrowave.cs b/Items/Weapons/Melee/TheMicrowave.cs index a4e6272f81..48e5895050 100644 --- a/Items/Weapons/Melee/TheMicrowave.cs +++ b/Items/Weapons/Melee/TheMicrowave.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 14f; Item.rare = ItemRarityID.Cyan; - Item.value = Item.buyPrice(gold: 95); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; } } } diff --git a/Items/Weapons/Melee/TheMutilator.cs b/Items/Weapons/Melee/TheMutilator.cs index b59a7bf152..c47e82ffa8 100644 --- a/Items/Weapons/Melee/TheMutilator.cs +++ b/Items/Weapons/Melee/TheMutilator.cs @@ -1,10 +1,11 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Melee { @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 10f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Melee/TheObliterator.cs b/Items/Weapons/Melee/TheObliterator.cs index 12ffd8eaa3..6e33707563 100644 --- a/Items/Weapons/Melee/TheObliterator.cs +++ b/Items/Weapons/Melee/TheObliterator.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Melee.Yoyos; +using CalamityMod.Rarities; using Terraria.ID; using Terraria.ModLoader; @@ -38,8 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 16f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } } } diff --git a/Items/Weapons/Melee/TriactisTruePaladinianMageHammerofMightMelee.cs b/Items/Weapons/Melee/TriactisTruePaladinianMageHammerofMightMelee.cs index cc50ea3211..5b7448eb68 100644 --- a/Items/Weapons/Melee/TriactisTruePaladinianMageHammerofMightMelee.cs +++ b/Items/Weapons/Melee/TriactisTruePaladinianMageHammerofMightMelee.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria.ID; using Terraria.ModLoader; @@ -33,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shootSpeed = 25f; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Weapons/Melee/TrueArkoftheAncients.cs b/Items/Weapons/Melee/TrueArkoftheAncients.cs index ea63d9d949..a5b29e6e5e 100644 --- a/Items/Weapons/Melee/TrueArkoftheAncients.cs +++ b/Items/Weapons/Melee/TrueArkoftheAncients.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 6.5f; Item.UseSound = null; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ProjectileID.PurificationPowder; Item.shootSpeed = 12f; diff --git a/Items/Weapons/Melee/TrueBloodyEdge.cs b/Items/Weapons/Melee/TrueBloodyEdge.cs index 3c9118d0e6..41d58ad2f1 100644 --- a/Items/Weapons/Melee/TrueBloodyEdge.cs +++ b/Items/Weapons/Melee/TrueBloodyEdge.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.height = 64; Item.scale = 1.5f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 11f; diff --git a/Items/Weapons/Melee/TrueForbiddenOathblade.cs b/Items/Weapons/Melee/TrueForbiddenOathblade.cs index 8744a09c5f..13944ba37a 100644 --- a/Items/Weapons/Melee/TrueForbiddenOathblade.cs +++ b/Items/Weapons/Melee/TrueForbiddenOathblade.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 7.5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 3f; diff --git a/Items/Weapons/Melee/TrueTyrantYharimsUltisword.cs b/Items/Weapons/Melee/TrueTyrantYharimsUltisword.cs index c5b4c4aa28..2b3ae35df0 100644 --- a/Items/Weapons/Melee/TrueTyrantYharimsUltisword.cs +++ b/Items/Weapons/Melee/TrueTyrantYharimsUltisword.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Buffs.StatBuffs; +using CalamityMod.Buffs.StatBuffs; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -34,8 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.height = 102; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; } diff --git a/Items/Weapons/Melee/Tumbleweed.cs b/Items/Weapons/Melee/Tumbleweed.cs index 5ffdd0f7c9..0cbbf56695 100644 --- a/Items/Weapons/Melee/Tumbleweed.cs +++ b/Items/Weapons/Melee/Tumbleweed.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.noMelee = true; Item.noUseGraphic = true; Item.knockBack = 8f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/TyphonsGreed.cs b/Items/Weapons/Melee/TyphonsGreed.cs index dcc8a9f26c..032b67a6c6 100644 --- a/Items/Weapons/Melee/TyphonsGreed.cs +++ b/Items/Weapons/Melee/TyphonsGreed.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.noMelee = true; Item.noUseGraphic = true; Item.knockBack = 5f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.DD2_SkyDragonsFurySwing; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/TyrantYharimsUltisword.cs b/Items/Weapons/Melee/TyrantYharimsUltisword.cs index 9371ad7230..99254501a8 100644 --- a/Items/Weapons/Melee/TyrantYharimsUltisword.cs +++ b/Items/Weapons/Melee/TyrantYharimsUltisword.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 88; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Melee/UltimusCleaver.cs b/Items/Weapons/Melee/UltimusCleaver.cs index a67f8a1aa9..b9f082ed7a 100644 --- a/Items/Weapons/Melee/UltimusCleaver.cs +++ b/Items/Weapons/Melee/UltimusCleaver.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.useAnimation = 20; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 8f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.autoReuse = true; Item.UseSound = SoundID.Item1; } diff --git a/Items/Weapons/Melee/UrchinFlail.cs b/Items/Weapons/Melee/UrchinFlail.cs index 66bceea443..32fbb58f4c 100644 --- a/Items/Weapons/Melee/UrchinFlail.cs +++ b/Items/Weapons/Melee/UrchinFlail.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.noMelee = true; Item.noUseGraphic = true; Item.knockBack = 6f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item1; Item.autoReuse = true; diff --git a/Items/Weapons/Melee/UrchinMace.cs b/Items/Weapons/Melee/UrchinMace.cs index be75322851..676d1af1ad 100644 --- a/Items/Weapons/Melee/UrchinMace.cs +++ b/Items/Weapons/Melee/UrchinMace.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 4; Item.UseSound = SoundID.Item1; Item.height = 48; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 9f; diff --git a/Items/Weapons/Melee/VeinBurster.cs b/Items/Weapons/Melee/VeinBurster.cs index 7cdfd6766d..ade4afab29 100644 --- a/Items/Weapons/Melee/VeinBurster.cs +++ b/Items/Weapons/Melee/VeinBurster.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 50; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Melee/Verdant.cs b/Items/Weapons/Melee/Verdant.cs index c28d69e902..89e814df13 100644 --- a/Items/Weapons/Melee/Verdant.cs +++ b/Items/Weapons/Melee/Verdant.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee.Yoyos; +using CalamityMod.Rarities; using Terraria.ID; using Terraria.ModLoader; @@ -40,8 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void AddRecipes() diff --git a/Items/Weapons/Melee/Violence.cs b/Items/Weapons/Melee/Violence.cs index 31577c9635..3214650e22 100644 --- a/Items/Weapons/Melee/Violence.cs +++ b/Items/Weapons/Melee/Violence.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,8 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.channel = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; diff --git a/Items/Weapons/Melee/Virulence.cs b/Items/Weapons/Melee/Virulence.cs index 2399a228e2..b845aae321 100644 --- a/Items/Weapons/Melee/Virulence.cs +++ b/Items/Weapons/Melee/Virulence.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.height = 62; Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.Item1; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; } diff --git a/Items/Weapons/Melee/VulcaniteLance.cs b/Items/Weapons/Melee/VulcaniteLance.cs index 6e05119bf2..cb91ef6ab4 100644 --- a/Items/Weapons/Melee/VulcaniteLance.cs +++ b/Items/Weapons/Melee/VulcaniteLance.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 44; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Melee/WindBlade.cs b/Items/Weapons/Melee/WindBlade.cs index 22c408a173..7dcc3ad9fb 100644 --- a/Items/Weapons/Melee/WindBlade.cs +++ b/Items/Weapons/Melee/WindBlade.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 58; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 3f; diff --git a/Items/Weapons/Melee/WulfrumScrewdriver.cs b/Items/Weapons/Melee/WulfrumScrewdriver.cs index 031757d2ce..fb9465da20 100644 --- a/Items/Weapons/Melee/WulfrumScrewdriver.cs +++ b/Items/Weapons/Melee/WulfrumScrewdriver.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 3.75f; Item.UseSound = ThrustSound; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.noMelee = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Ranged/AcesHigh.cs b/Items/Weapons/Ranged/AcesHigh.cs index 4097501f5b..8ba39f8253 100644 --- a/Items/Weapons/Ranged/AcesHigh.cs +++ b/Items/Weapons/Ranged/AcesHigh.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.knockBack = 6f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.UseSound = SoundID.Item36; diff --git a/Items/Weapons/Ranged/AdamantiteParticleAccelerator.cs b/Items/Weapons/Ranged/AdamantiteParticleAccelerator.cs index 1b6e6fcb94..66a4db15d5 100644 --- a/Items/Weapons/Ranged/AdamantiteParticleAccelerator.cs +++ b/Items/Weapons/Ranged/AdamantiteParticleAccelerator.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 3f; Item.channel = true; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.autoReuse = true; Item.shootSpeed = 6f; diff --git a/Items/Weapons/Ranged/Alluvion.cs b/Items/Weapons/Ranged/Alluvion.cs index 3fb582de76..5094bbefd8 100644 --- a/Items/Weapons/Ranged/Alluvion.cs +++ b/Items/Weapons/Ranged/Alluvion.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,14 +32,13 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4f; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Purple; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.UseSound = SoundID.Item5; Item.autoReuse = true; Item.shoot = ProjectileID.WoodenArrowFriendly; Item.shootSpeed = 12f; Item.useAmmo = AmmoID.Arrow; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/AngelicShotgun.cs b/Items/Weapons/Ranged/AngelicShotgun.cs index 9e68187b71..416b380f4d 100644 --- a/Items/Weapons/Ranged/AngelicShotgun.cs +++ b/Items/Weapons/Ranged/AngelicShotgun.cs @@ -1,12 +1,13 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Ranged { @@ -41,7 +42,7 @@ Fighting 'til the war's won"); Item.useStyle = ItemUseStyleID.Shoot; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.shootSpeed = BulletSpeed; diff --git a/Items/Weapons/Ranged/Animosity.cs b/Items/Weapons/Ranged/Animosity.cs index 95e9d2c912..9f319d5446 100644 --- a/Items/Weapons/Ranged/Animosity.cs +++ b/Items/Weapons/Ranged/Animosity.cs @@ -30,7 +30,7 @@ Right click to fire a burst of bullets"); Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item31; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/AntiMaterielRifle.cs b/Items/Weapons/Ranged/AntiMaterielRifle.cs index 1d4e7e597b..466d4445b3 100644 --- a/Items/Weapons/Ranged/AntiMaterielRifle.cs +++ b/Items/Weapons/Ranged/AntiMaterielRifle.cs @@ -1,12 +1,13 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Sounds; namespace CalamityMod.Items.Weapons.Ranged { @@ -32,14 +33,13 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 9.5f; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.UseSound = CommonCalamitySounds.LargeWeaponFireSound; Item.autoReuse = true; Item.shoot = ProjectileID.Bullet; Item.shootSpeed = 12f; Item.useAmmo = AmmoID.Bullet; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/AquashardShotgun.cs b/Items/Weapons/Ranged/AquashardShotgun.cs index ae302784fd..213a4420c4 100644 --- a/Items/Weapons/Ranged/AquashardShotgun.cs +++ b/Items/Weapons/Ranged/AquashardShotgun.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.5f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item61; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Archerfish.cs b/Items/Weapons/Ranged/Archerfish.cs index 6aaa0cfa83..5a8189bfc1 100644 --- a/Items/Weapons/Ranged/Archerfish.cs +++ b/Items/Weapons/Ranged/Archerfish.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item11; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/ArterialAssault.cs b/Items/Weapons/Ranged/ArterialAssault.cs index 3803129ab0..d7837bae03 100644 --- a/Items/Weapons/Ranged/ArterialAssault.cs +++ b/Items/Weapons/Ranged/ArterialAssault.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -32,8 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 4.25f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item102; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/AstralBlaster.cs b/Items/Weapons/Ranged/AstralBlaster.cs index a6ab989774..affb3ddc4f 100644 --- a/Items/Weapons/Ranged/AstralBlaster.cs +++ b/Items/Weapons/Ranged/AstralBlaster.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.75f; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.UseSound = SoundID.Item41; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/AstralRepeater.cs b/Items/Weapons/Ranged/AstralRepeater.cs index dffb9d5199..34446af00c 100644 --- a/Items/Weapons/Ranged/AstralRepeater.cs +++ b/Items/Weapons/Ranged/AstralRepeater.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.5f; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Auralis.cs b/Items/Weapons/Ranged/Auralis.cs index 9f54e6ea86..af31e9618b 100644 --- a/Items/Weapons/Ranged/Auralis.cs +++ b/Items/Weapons/Ranged/Auralis.cs @@ -1,13 +1,14 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Potions; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Sounds; namespace CalamityMod.Items.Weapons.Ranged { @@ -46,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.UseSound = CommonCalamitySounds.PlasmaBlastSound; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/Barinade.cs b/Items/Weapons/Ranged/Barinade.cs index c131c54a2d..b38fcb8320 100644 --- a/Items/Weapons/Ranged/Barinade.cs +++ b/Items/Weapons/Ranged/Barinade.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Barinautical.cs b/Items/Weapons/Ranged/Barinautical.cs index e5716d072d..868b866d5d 100644 --- a/Items/Weapons/Ranged/Barinautical.cs +++ b/Items/Weapons/Ranged/Barinautical.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/BarracudaGun.cs b/Items/Weapons/Ranged/BarracudaGun.cs index ecbcade026..502ec38d89 100644 --- a/Items/Weapons/Ranged/BarracudaGun.cs +++ b/Items/Weapons/Ranged/BarracudaGun.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item10; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/BladedgeGreatbow.cs b/Items/Weapons/Ranged/BladedgeGreatbow.cs index 9295b948c7..ae9920d745 100644 --- a/Items/Weapons/Ranged/BladedgeGreatbow.cs +++ b/Items/Weapons/Ranged/BladedgeGreatbow.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/BlightSpewer.cs b/Items/Weapons/Ranged/BlightSpewer.cs index 4f50043171..87186b48e1 100644 --- a/Items/Weapons/Ranged/BlightSpewer.cs +++ b/Items/Weapons/Ranged/BlightSpewer.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 2f; Item.UseSound = SoundID.Item34; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/BlissfulBombardier.cs b/Items/Weapons/Ranged/BlissfulBombardier.cs index 6b1f1e2c58..a45b4c797a 100644 --- a/Items/Weapons/Ranged/BlissfulBombardier.cs +++ b/Items/Weapons/Ranged/BlissfulBombardier.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -29,8 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 7.5f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item11; Item.autoReuse = true; Item.shootSpeed = 24f; diff --git a/Items/Weapons/Ranged/BloodBoiler.cs b/Items/Weapons/Ranged/BloodBoiler.cs index 35d58c42de..7d4b52c3be 100644 --- a/Items/Weapons/Ranged/BloodBoiler.cs +++ b/Items/Weapons/Ranged/BloodBoiler.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,8 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 4f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.shootSpeed = 12f; Item.shoot = ModContent.ProjectileType(); } diff --git a/Items/Weapons/Ranged/BrimstoneFury.cs b/Items/Weapons/Ranged/BrimstoneFury.cs index b3d2aeba0b..92f5f0e3d5 100644 --- a/Items/Weapons/Ranged/BrimstoneFury.cs +++ b/Items/Weapons/Ranged/BrimstoneFury.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.75f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/ChickenCannon.cs b/Items/Weapons/Ranged/ChickenCannon.cs index 04a365306b..6d5c1114f3 100644 --- a/Items/Weapons/Ranged/ChickenCannon.cs +++ b/Items/Weapons/Ranged/ChickenCannon.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Ranged { @@ -29,8 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 1.5f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); // No use sound is intentional Item.autoReuse = true; Item.shootSpeed = 14.5f; diff --git a/Items/Weapons/Ranged/ClamorRifle.cs b/Items/Weapons/Ranged/ClamorRifle.cs index d36671cb89..1a72063047 100644 --- a/Items/Weapons/Ranged/ClamorRifle.cs +++ b/Items/Weapons/Ranged/ClamorRifle.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.5f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.UseSound = CommonCalamitySounds.PlasmaBoltSound; Item.autoReuse = true; Item.rare = ItemRarityID.Pink; diff --git a/Items/Weapons/Ranged/ClaretCannon.cs b/Items/Weapons/Ranged/ClaretCannon.cs index b6810ad779..32db81d2a9 100644 --- a/Items/Weapons/Ranged/ClaretCannon.cs +++ b/Items/Weapons/Ranged/ClaretCannon.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,8 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 5.5f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item40; Item.autoReuse = true; Item.shootSpeed = 24f; diff --git a/Items/Weapons/Ranged/CleansingBlaze.cs b/Items/Weapons/Ranged/CleansingBlaze.cs index 7bbdd815a8..8a4d1a34be 100644 --- a/Items/Weapons/Ranged/CleansingBlaze.cs +++ b/Items/Weapons/Ranged/CleansingBlaze.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,13 +32,12 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 4f; Item.UseSound = SoundID.Item34; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 14f; Item.useAmmo = AmmoID.Gel; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Ranged/ClockGatlignum.cs b/Items/Weapons/Ranged/ClockGatlignum.cs index 99345c32f4..f8fdbaa4fe 100644 --- a/Items/Weapons/Ranged/ClockGatlignum.cs +++ b/Items/Weapons/Ranged/ClockGatlignum.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.75f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item31; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Condemnation.cs b/Items/Weapons/Ranged/Condemnation.cs index f764aa49c1..436ed8f966 100644 --- a/Items/Weapons/Ranged/Condemnation.cs +++ b/Items/Weapons/Ranged/Condemnation.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -33,8 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 5f; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 14.5f; diff --git a/Items/Weapons/Ranged/Contagion.cs b/Items/Weapons/Ranged/Contagion.cs index 232f9f1bf5..193377daee 100644 --- a/Items/Weapons/Ranged/Contagion.cs +++ b/Items/Weapons/Ranged/Contagion.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -37,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Arrow; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/ContinentalGreatbow.cs b/Items/Weapons/Ranged/ContinentalGreatbow.cs index 68ef596551..e5ff8fd60f 100644 --- a/Items/Weapons/Ranged/ContinentalGreatbow.cs +++ b/Items/Weapons/Ranged/ContinentalGreatbow.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/CoralCannon.cs b/Items/Weapons/Ranged/CoralCannon.cs index 0e617c66b8..f86b50ddc6 100644 --- a/Items/Weapons/Ranged/CoralCannon.cs +++ b/Items/Weapons/Ranged/CoralCannon.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7.5f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item61; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/CorrodedCaustibow.cs b/Items/Weapons/Ranged/CorrodedCaustibow.cs index 59d873c324..5f2539094a 100644 --- a/Items/Weapons/Ranged/CorrodedCaustibow.cs +++ b/Items/Weapons/Ranged/CorrodedCaustibow.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/CosmicBolter.cs b/Items/Weapons/Ranged/CosmicBolter.cs index eec0d6a376..e3790160b9 100644 --- a/Items/Weapons/Ranged/CosmicBolter.cs +++ b/Items/Weapons/Ranged/CosmicBolter.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.75f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item75; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/CrackshotColt.cs b/Items/Weapons/Ranged/CrackshotColt.cs index 4eca6fd88c..8a550fe63e 100644 --- a/Items/Weapons/Ranged/CrackshotColt.cs +++ b/Items/Weapons/Ranged/CrackshotColt.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.25f; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.UseSound = ShootSound with { Volume = 0.6f}; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/DaemonsFlame.cs b/Items/Weapons/Ranged/DaemonsFlame.cs index 8d33ab3949..cb10bf6ab9 100644 --- a/Items/Weapons/Ranged/DaemonsFlame.cs +++ b/Items/Weapons/Ranged/DaemonsFlame.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -37,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Arrow; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/DarkechoGreatbow.cs b/Items/Weapons/Ranged/DarkechoGreatbow.cs index 3fcc6e0b17..e6a6486215 100644 --- a/Items/Weapons/Ranged/DarkechoGreatbow.cs +++ b/Items/Weapons/Ranged/DarkechoGreatbow.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Deathwind.cs b/Items/Weapons/Ranged/Deathwind.cs index 4a223620ff..d2ba35a78a 100644 --- a/Items/Weapons/Ranged/Deathwind.cs +++ b/Items/Weapons/Ranged/Deathwind.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -30,8 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 5f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item5; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/DodusHandcannon.cs b/Items/Weapons/Ranged/DodusHandcannon.cs index a18f2be615..086414d195 100644 --- a/Items/Weapons/Ranged/DodusHandcannon.cs +++ b/Items/Weapons/Ranged/DodusHandcannon.cs @@ -1,10 +1,11 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Sounds; namespace CalamityMod.Items.Weapons.Ranged { @@ -39,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Bullet; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/DragonsBreath.cs b/Items/Weapons/Ranged/DragonsBreath.cs index c83d7ad0fa..259f2f8ba5 100644 --- a/Items/Weapons/Ranged/DragonsBreath.cs +++ b/Items/Weapons/Ranged/DragonsBreath.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Ranged { @@ -51,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Bullet; Item.Calamity().canFirePointBlankShots = true; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.Rarity15BuyPrice; } public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextFloat() > 0.66f; diff --git a/Items/Weapons/Ranged/Drataliornus.cs b/Items/Weapons/Ranged/Drataliornus.cs index ca0c6ce998..a48e24557a 100644 --- a/Items/Weapons/Ranged/Drataliornus.cs +++ b/Items/Weapons/Ranged/Drataliornus.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -38,8 +39,7 @@ Right click to fire two devastating barrages of five empowered fireballs. Item.height = 84; Item.UseSound = SoundID.Item5; Item.shoot = ModContent.ProjectileType(); - Item.value = Item.buyPrice(platinum: 2, gold: 50); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.noMelee = true; Item.noUseGraphic = true; Item.DamageType = DamageClass.Ranged; @@ -47,7 +47,7 @@ Right click to fire two devastating barrages of five empowered fireballs. Item.useTurn = false; Item.useAmmo = AmmoID.Arrow; Item.autoReuse = true; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Ranged/EffluviumBow.cs b/Items/Weapons/Ranged/EffluviumBow.cs index 2eb2a3aefd..4a16683c9d 100644 --- a/Items/Weapons/Ranged/EffluviumBow.cs +++ b/Items/Weapons/Ranged/EffluviumBow.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/EternalBlizzard.cs b/Items/Weapons/Ranged/EternalBlizzard.cs index 2783e4abd7..69bb88219c 100644 --- a/Items/Weapons/Ranged/EternalBlizzard.cs +++ b/Items/Weapons/Ranged/EternalBlizzard.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useTurn = false; Item.noMelee = true; Item.knockBack = 3f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.useAmmo = AmmoID.Arrow; Item.UseSound = SoundID.Item5; diff --git a/Items/Weapons/Ranged/Eviscerator.cs b/Items/Weapons/Ranged/Eviscerator.cs index 406eb5070b..f5c749ed7e 100644 --- a/Items/Weapons/Ranged/Eviscerator.cs +++ b/Items/Weapons/Ranged/Eviscerator.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7.5f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item40; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/FetidEmesis.cs b/Items/Weapons/Ranged/FetidEmesis.cs index 7c83f38d06..55a0ae067c 100644 --- a/Items/Weapons/Ranged/FetidEmesis.cs +++ b/Items/Weapons/Ranged/FetidEmesis.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Ranged { @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Bullet; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/FirestormCannon.cs b/Items/Weapons/Ranged/FirestormCannon.cs index 854d32e36a..d91c7ebf20 100644 --- a/Items/Weapons/Ranged/FirestormCannon.cs +++ b/Items/Weapons/Ranged/FirestormCannon.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1.5f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item11; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/FlakKraken.cs b/Items/Weapons/Ranged/FlakKraken.cs index 0b2cb72003..b6a77b8ca0 100644 --- a/Items/Weapons/Ranged/FlakKraken.cs +++ b/Items/Weapons/Ranged/FlakKraken.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noUseGraphic = true; Item.channel = true; Item.knockBack = 0f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = CommonCalamitySounds.LaserCannonSound; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/FlakToxicannon.cs b/Items/Weapons/Ranged/FlakToxicannon.cs index c5b06fdb29..26e59e3193 100644 --- a/Items/Weapons/Ranged/FlakToxicannon.cs +++ b/Items/Weapons/Ranged/FlakToxicannon.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useTurn = false; Item.noMelee = true; Item.knockBack = 7f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item109; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/FrostbiteBlaster.cs b/Items/Weapons/Ranged/FrostbiteBlaster.cs index 1f8ffbf1da..0ed5298763 100644 --- a/Items/Weapons/Ranged/FrostbiteBlaster.cs +++ b/Items/Weapons/Ranged/FrostbiteBlaster.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useTurn = false; Item.noMelee = true; Item.knockBack = 5f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.useAmmo = AmmoID.Bullet; Item.UseSound = SoundID.Item36; diff --git a/Items/Weapons/Ranged/Fungicide.cs b/Items/Weapons/Ranged/Fungicide.cs index e27c44e88f..d9303b5bb3 100644 --- a/Items/Weapons/Ranged/Fungicide.cs +++ b/Items/Weapons/Ranged/Fungicide.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.5f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item61; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Galeforce.cs b/Items/Weapons/Ranged/Galeforce.cs index fe087b8348..e6ab5e9ca6 100644 --- a/Items/Weapons/Ranged/Galeforce.cs +++ b/Items/Weapons/Ranged/Galeforce.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/GodsBellows.cs b/Items/Weapons/Ranged/GodsBellows.cs index 2f298a6dc7..5a2f292226 100644 --- a/Items/Weapons/Ranged/GodsBellows.cs +++ b/Items/Weapons/Ranged/GodsBellows.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 3.5f; Item.UseSound = SoundID.Item34; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/Goobow.cs b/Items/Weapons/Ranged/Goobow.cs index fa0a53d898..c98b0589fc 100644 --- a/Items/Weapons/Ranged/Goobow.cs +++ b/Items/Weapons/Ranged/Goobow.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/GunkShot.cs b/Items/Weapons/Ranged/GunkShot.cs index ec93c9062b..e1e6867cf2 100644 --- a/Items/Weapons/Ranged/GunkShot.cs +++ b/Items/Weapons/Ranged/GunkShot.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item36; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/HalibutCannon.cs b/Items/Weapons/Ranged/HalibutCannon.cs index c63cc37848..be663b758b 100644 --- a/Items/Weapons/Ranged/HalibutCannon.cs +++ b/Items/Weapons/Ranged/HalibutCannon.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Ranged { @@ -25,10 +26,10 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useTime = 10; Item.useAnimation = 20; Item.useStyle = ItemUseStyleID.Shoot; - Item.rare = ItemRarityID.Red; + Item.rare = ModContent.RarityType(); Item.noMelee = true; Item.knockBack = 1f; - Item.value = Item.buyPrice(1, 0, 0, 0); + Item.value = CalamityGlobalItem.Rarity16BuyPrice; Item.UseSound = null; Item.autoReuse = true; Item.shoot = ProjectileID.Bullet; diff --git a/Items/Weapons/Ranged/HalleysInferno.cs b/Items/Weapons/Ranged/HalleysInferno.cs index 215609248a..ac885b79b6 100644 --- a/Items/Weapons/Ranged/HalleysInferno.cs +++ b/Items/Weapons/Ranged/HalleysInferno.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -36,9 +37,8 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.UseSound = SoundID.Item34; - Item.value = Item.buyPrice(1, 40, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.value = CalamityGlobalItem.Rarity14BuyPrice; + Item.rare = ModContent.RarityType(); } // Terraria seems to really dislike high crit values in SetDefaults diff --git a/Items/Weapons/Ranged/HandheldTank.cs b/Items/Weapons/Ranged/HandheldTank.cs index c18c365f1e..ae9b3efff9 100644 --- a/Items/Weapons/Ranged/HandheldTank.cs +++ b/Items/Weapons/Ranged/HandheldTank.cs @@ -1,11 +1,12 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Ranged { @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/HavocsBreath.cs b/Items/Weapons/Ranged/HavocsBreath.cs index 6b284481be..2ff6b2cc0b 100644 --- a/Items/Weapons/Ranged/HavocsBreath.cs +++ b/Items/Weapons/Ranged/HavocsBreath.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 1.5f; Item.UseSound = SoundID.Item34; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/HeavenlyGale.cs b/Items/Weapons/Ranged/HeavenlyGale.cs index b6116c9833..6f2a33d9aa 100644 --- a/Items/Weapons/Ranged/HeavenlyGale.cs +++ b/Items/Weapons/Ranged/HeavenlyGale.cs @@ -1,11 +1,12 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Ranged { @@ -60,7 +61,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shootSpeed = 12f; Item.useAmmo = AmmoID.Arrow; Item.useTurn = true; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/Helstorm.cs b/Items/Weapons/Ranged/Helstorm.cs index 936607181f..5f97e0f3e5 100644 --- a/Items/Weapons/Ranged/Helstorm.cs +++ b/Items/Weapons/Ranged/Helstorm.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAnimation = 7; Item.useStyle = ItemUseStyleID.Shoot; Item.knockBack = 2.5f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item11; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Infinity.cs b/Items/Weapons/Ranged/Infinity.cs index 478b411ce1..9d8ef4cc79 100644 --- a/Items/Weapons/Ranged/Infinity.cs +++ b/Items/Weapons/Ranged/Infinity.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,9 +36,8 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1f; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item31; Item.autoReuse = true; Item.shoot = ProjectileID.PurificationPowder; diff --git a/Items/Weapons/Ranged/Karasawa.cs b/Items/Weapons/Ranged/Karasawa.cs index 805545e347..8fecb2d588 100644 --- a/Items/Weapons/Ranged/Karasawa.cs +++ b/Items/Weapons/Ranged/Karasawa.cs @@ -1,12 +1,13 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Ranged { @@ -38,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/Leviatitan.cs b/Items/Weapons/Ranged/Leviatitan.cs index 191cb0118d..0c34b42f02 100644 --- a/Items/Weapons/Ranged/Leviatitan.cs +++ b/Items/Weapons/Ranged/Leviatitan.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item92; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/LunarianBow.cs b/Items/Weapons/Ranged/LunarianBow.cs index b4eefa75ce..5d8f6505a3 100644 --- a/Items/Weapons/Ranged/LunarianBow.cs +++ b/Items/Weapons/Ranged/LunarianBow.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item75; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/MagnaStriker.cs b/Items/Weapons/Ranged/MagnaStriker.cs index 8a1a78fe61..f91b5c844c 100644 --- a/Items/Weapons/Ranged/MagnaStriker.cs +++ b/Items/Weapons/Ranged/MagnaStriker.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.25f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = OpalStriker.FireSound; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/MagnomalyCannon.cs b/Items/Weapons/Ranged/MagnomalyCannon.cs index a46dec82d5..54853fe496 100644 --- a/Items/Weapons/Ranged/MagnomalyCannon.cs +++ b/Items/Weapons/Ranged/MagnomalyCannon.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Weapons.Typeless; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -33,13 +34,12 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 9.5f; Item.UseSound = SoundID.Item11; - Item.value = Item.buyPrice(2, 50, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.Rarity15BuyPrice; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; Item.useAmmo = AmmoID.Rocket; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Malevolence.cs b/Items/Weapons/Ranged/Malevolence.cs index 01d647cbfd..9ab4284993 100644 --- a/Items/Weapons/Ranged/Malevolence.cs +++ b/Items/Weapons/Ranged/Malevolence.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item97; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/MarksmanBow.cs b/Items/Weapons/Ranged/MarksmanBow.cs index c54a6692fe..ae5468fba4 100644 --- a/Items/Weapons/Ranged/MarksmanBow.cs +++ b/Items/Weapons/Ranged/MarksmanBow.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shootSpeed = 10f; Item.useAmmo = AmmoID.Arrow; - Item.value = Item.buyPrice(gold: 80); // crafted out of nothing but 31 ectoplasm so it has unique pricing + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; Item.rare = ItemRarityID.Yellow; Item.Calamity().donorItem = true; Item.Calamity().canFirePointBlankShots = true; diff --git a/Items/Weapons/Ranged/Megalodon.cs b/Items/Weapons/Ranged/Megalodon.cs index 895c4d968c..ea624c2947 100644 --- a/Items/Weapons/Ranged/Megalodon.cs +++ b/Items/Weapons/Ranged/Megalodon.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.5f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item11; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Meowthrower.cs b/Items/Weapons/Ranged/Meowthrower.cs index 4639f4d963..ff6b824873 100644 --- a/Items/Weapons/Ranged/Meowthrower.cs +++ b/Items/Weapons/Ranged/Meowthrower.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 1.25f; Item.UseSound = SoundID.Item34; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/MineralMortar.cs b/Items/Weapons/Ranged/MineralMortar.cs index adedd19206..8597a50824 100644 --- a/Items/Weapons/Ranged/MineralMortar.cs +++ b/Items/Weapons/Ranged/MineralMortar.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item11; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Minigun.cs b/Items/Weapons/Ranged/Minigun.cs index 0ec6988d4c..5438f659dd 100644 --- a/Items/Weapons/Ranged/Minigun.cs +++ b/Items/Weapons/Ranged/Minigun.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -29,13 +30,12 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 2.5f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Purple; Item.UseSound = SoundID.Item41; Item.autoReuse = true; Item.shoot = ProjectileID.PurificationPowder; Item.shootSpeed = 22f; Item.useAmmo = AmmoID.Bullet; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/MolecularManipulator.cs b/Items/Weapons/Ranged/MolecularManipulator.cs index 09c08bd9d1..f98668efa8 100644 --- a/Items/Weapons/Ranged/MolecularManipulator.cs +++ b/Items/Weapons/Ranged/MolecularManipulator.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -30,8 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 8f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item33; Item.autoReuse = true; Item.shootSpeed = 25f; diff --git a/Items/Weapons/Ranged/Monsoon.cs b/Items/Weapons/Ranged/Monsoon.cs index 59c32aaf17..6e031c5830 100644 --- a/Items/Weapons/Ranged/Monsoon.cs +++ b/Items/Weapons/Ranged/Monsoon.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 2.5f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item5; Item.autoReuse = true; Item.shoot = ProjectileID.WoodenArrowFriendly; diff --git a/Items/Weapons/Ranged/NettlevineGreatbow.cs b/Items/Weapons/Ranged/NettlevineGreatbow.cs index 29d844516b..d9bb3c0bed 100644 --- a/Items/Weapons/Ranged/NettlevineGreatbow.cs +++ b/Items/Weapons/Ranged/NettlevineGreatbow.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -30,8 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 3f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item5; Item.autoReuse = true; Item.shoot = ProjectileID.PurificationPowder; diff --git a/Items/Weapons/Ranged/Norfleet.cs b/Items/Weapons/Ranged/Norfleet.cs index c4080a1548..c4c7101c2a 100644 --- a/Items/Weapons/Ranged/Norfleet.cs +++ b/Items/Weapons/Ranged/Norfleet.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -30,8 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.UseSound = SoundID.Item92; Item.shoot = ModContent.ProjectileType(); Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.noMelee = true; Item.noUseGraphic = true; Item.DamageType = DamageClass.Ranged; diff --git a/Items/Weapons/Ranged/NullificationRifle.cs b/Items/Weapons/Ranged/NullificationRifle.cs index 98c64bf8fa..7e56de0cb5 100644 --- a/Items/Weapons/Ranged/NullificationRifle.cs +++ b/Items/Weapons/Ranged/NullificationRifle.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item33; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Onyxia.cs b/Items/Weapons/Ranged/Onyxia.cs index 4ac07f7761..a5e7e6db81 100644 --- a/Items/Weapons/Ranged/Onyxia.cs +++ b/Items/Weapons/Ranged/Onyxia.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,8 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 4.5f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item36; Item.autoReuse = true; Item.shoot = ProjectileID.BlackBolt; diff --git a/Items/Weapons/Ranged/OpalStriker.cs b/Items/Weapons/Ranged/OpalStriker.cs index a903ba84ea..86ae118423 100644 --- a/Items/Weapons/Ranged/OpalStriker.cs +++ b/Items/Weapons/Ranged/OpalStriker.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 0f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = FireSound; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/OverloadedBlaster.cs b/Items/Weapons/Ranged/OverloadedBlaster.cs index 4e731f1ae9..822ce39d16 100644 --- a/Items/Weapons/Ranged/OverloadedBlaster.cs +++ b/Items/Weapons/Ranged/OverloadedBlaster.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1.5f; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item9; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/PestilentDefiler.cs b/Items/Weapons/Ranged/PestilentDefiler.cs index 2b293c1f65..7abdc855e3 100644 --- a/Items/Weapons/Ranged/PestilentDefiler.cs +++ b/Items/Weapons/Ranged/PestilentDefiler.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 9.5f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item40; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Phangasm.cs b/Items/Weapons/Ranged/Phangasm.cs index de0a0182c0..4f19bfc7da 100644 --- a/Items/Weapons/Ranged/Phangasm.cs +++ b/Items/Weapons/Ranged/Phangasm.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -27,8 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAnimation = 12; Item.useStyle = ItemUseStyleID.Shoot; Item.knockBack = 3f; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.UseSound = SoundID.Item5; Item.noMelee = true; Item.noUseGraphic = true; @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 20f; Item.useAmmo = AmmoID.Arrow; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/Photoviscerator.cs b/Items/Weapons/Ranged/Photoviscerator.cs index 6b355ba7b2..162fcf73ac 100644 --- a/Items/Weapons/Ranged/Photoviscerator.cs +++ b/Items/Weapons/Ranged/Photoviscerator.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -40,8 +41,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shootSpeed = 18f; Item.useAmmo = AmmoID.Gel; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; } diff --git a/Items/Weapons/Ranged/PristineFury.cs b/Items/Weapons/Ranged/PristineFury.cs index 2fe21ada13..850bc91ce5 100644 --- a/Items/Weapons/Ranged/PristineFury.cs +++ b/Items/Weapons/Ranged/PristineFury.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -40,9 +41,8 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shootSpeed = 11f; Item.useAmmo = AmmoID.Gel; - Item.rare = ItemRarityID.Purple; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override Vector2? HoldoutOffset() => new Vector2(-25, -10); diff --git a/Items/Weapons/Ranged/Pumpler.cs b/Items/Weapons/Ranged/Pumpler.cs index 1d6df97dcb..8a759a84c5 100644 --- a/Items/Weapons/Ranged/Pumpler.cs +++ b/Items/Weapons/Ranged/Pumpler.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1.25f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.noUseGraphic = true; Item.UseSound = SoundID.Item20; diff --git a/Items/Weapons/Ranged/RealmRavager.cs b/Items/Weapons/Ranged/RealmRavager.cs index 9e4bc188e3..eafb00ee1f 100644 --- a/Items/Weapons/Ranged/RealmRavager.cs +++ b/Items/Weapons/Ranged/RealmRavager.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item38; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/ReedBlowgun.cs b/Items/Weapons/Ranged/ReedBlowgun.cs index e7b2d9344d..f9051fd38f 100644 --- a/Items/Weapons/Ranged/ReedBlowgun.cs +++ b/Items/Weapons/Ranged/ReedBlowgun.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.holdStyle = 16; Item.noMelee = true; Item.knockBack = 13.5f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = null; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/RubicoPrime.cs b/Items/Weapons/Ranged/RubicoPrime.cs index 113f44eefd..e19fbecc3b 100644 --- a/Items/Weapons/Ranged/RubicoPrime.cs +++ b/Items/Weapons/Ranged/RubicoPrime.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -38,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Bullet; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/SDFMG.cs b/Items/Weapons/Ranged/SDFMG.cs index 3039a82670..6198cb8543 100644 --- a/Items/Weapons/Ranged/SDFMG.cs +++ b/Items/Weapons/Ranged/SDFMG.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,14 +32,13 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.75f; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.UseSound = SoundID.Item11; Item.autoReuse = true; Item.shoot = ProjectileID.PurificationPowder; Item.shootSpeed = 16f; Item.useAmmo = AmmoID.Bullet; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/SandstormGun.cs b/Items/Weapons/Ranged/SandstormGun.cs index 7576bbc38e..d2a684a0e7 100644 --- a/Items/Weapons/Ranged/SandstormGun.cs +++ b/Items/Weapons/Ranged/SandstormGun.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item11; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/ScorchedEarth.cs b/Items/Weapons/Ranged/ScorchedEarth.cs index c8d1f1a923..9b3fad7b22 100644 --- a/Items/Weapons/Ranged/ScorchedEarth.cs +++ b/Items/Weapons/Ranged/ScorchedEarth.cs @@ -1,12 +1,13 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Ranged { @@ -37,8 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 8.7f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.autoReuse = true; Item.shootSpeed = 12.6f; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/Seadragon.cs b/Items/Weapons/Ranged/Seadragon.cs index 9320dc9b71..7dce68c15a 100644 --- a/Items/Weapons/Ranged/Seadragon.cs +++ b/Items/Weapons/Ranged/Seadragon.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,8 +36,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 2.5f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item11; Item.autoReuse = true; Item.shoot = ProjectileID.PurificationPowder; diff --git a/Items/Weapons/Ranged/SepticSkewer.cs b/Items/Weapons/Ranged/SepticSkewer.cs index 4091fccdfe..8ab249204e 100644 --- a/Items/Weapons/Ranged/SepticSkewer.cs +++ b/Items/Weapons/Ranged/SepticSkewer.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria.ID; using Terraria.ModLoader; @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/Shadethrower.cs b/Items/Weapons/Ranged/Shadethrower.cs index ffc2c9fefe..5b572fd44e 100644 --- a/Items/Weapons/Ranged/Shadethrower.cs +++ b/Items/Weapons/Ranged/Shadethrower.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 1.5f; Item.UseSound = SoundID.Item34; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/Shellshooter.cs b/Items/Weapons/Ranged/Shellshooter.cs index 90144f1798..626f92d13a 100644 --- a/Items/Weapons/Ranged/Shellshooter.cs +++ b/Items/Weapons/Ranged/Shellshooter.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/SlagMagnum.cs b/Items/Weapons/Ranged/SlagMagnum.cs index a6ed9244f4..5cdff65ae7 100644 --- a/Items/Weapons/Ranged/SlagMagnum.cs +++ b/Items/Weapons/Ranged/SlagMagnum.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item41; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/SomaPrime.cs b/Items/Weapons/Ranged/SomaPrime.cs index b9940b4123..2e70f4e6eb 100644 --- a/Items/Weapons/Ranged/SomaPrime.cs +++ b/Items/Weapons/Ranged/SomaPrime.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -42,7 +43,7 @@ Replaces standard bullets with High Velocity Bullets Item.useAmmo = AmmoID.Bullet; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/SparkSpreader.cs b/Items/Weapons/Ranged/SparkSpreader.cs index 3d7dfcc794..7452177386 100644 --- a/Items/Weapons/Ranged/SparkSpreader.cs +++ b/Items/Weapons/Ranged/SparkSpreader.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.UseSound = SoundID.Item34; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; } diff --git a/Items/Weapons/Ranged/SpectreRifle.cs b/Items/Weapons/Ranged/SpectreRifle.cs index bf08a74b53..7d89c4ee19 100644 --- a/Items/Weapons/Ranged/SpectreRifle.cs +++ b/Items/Weapons/Ranged/SpectreRifle.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item40; Item.autoReuse = false; diff --git a/Items/Weapons/Ranged/SpeedBlaster.cs b/Items/Weapons/Ranged/SpeedBlaster.cs index d9a3e30a78..28a0ed4d61 100644 --- a/Items/Weapons/Ranged/SpeedBlaster.cs +++ b/Items/Weapons/Ranged/SpeedBlaster.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.25f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = null; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Spyker.cs b/Items/Weapons/Ranged/Spyker.cs index bdbb1f3159..a51cf59d5f 100644 --- a/Items/Weapons/Ranged/Spyker.cs +++ b/Items/Weapons/Ranged/Spyker.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -29,8 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 6f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item108; Item.autoReuse = true; Item.shootSpeed = 9f; diff --git a/Items/Weapons/Ranged/StarSputter.cs b/Items/Weapons/Ranged/StarSputter.cs index 70c808b56d..fbfe1e3a7b 100644 --- a/Items/Weapons/Ranged/StarSputter.cs +++ b/Items/Weapons/Ranged/StarSputter.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 15f; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.RarityCyanBuyPrice; Item.rare = ItemRarityID.Cyan; Item.UseSound = SoundID.Item92; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/Starmada.cs b/Items/Weapons/Ranged/Starmada.cs index b4d59d2810..e4dcb27588 100644 --- a/Items/Weapons/Ranged/Starmada.cs +++ b/Items/Weapons/Ranged/Starmada.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -33,8 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 50; Item.UseSound = SoundID.Item92; Item.shoot = ModContent.ProjectileType(); - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.noMelee = true; Item.noUseGraphic = true; Item.DamageType = DamageClass.Ranged; @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useTurn = false; Item.useAmmo = AmmoID.FallenStar; Item.autoReuse = true; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; diff --git a/Items/Weapons/Ranged/StellarCannon.cs b/Items/Weapons/Ranged/StellarCannon.cs index fd6a6fb6cc..e992b514b1 100644 --- a/Items/Weapons/Ranged/StellarCannon.cs +++ b/Items/Weapons/Ranged/StellarCannon.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item92; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/StormDragoon.cs b/Items/Weapons/Ranged/StormDragoon.cs index 5d14f2f62e..6fb4f6f4f4 100644 --- a/Items/Weapons/Ranged/StormDragoon.cs +++ b/Items/Weapons/Ranged/StormDragoon.cs @@ -1,6 +1,7 @@ -using Terraria.DataStructures; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -29,8 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 3.25f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item31; Item.autoReuse = true; Item.shoot = ProjectileID.PurificationPowder; diff --git a/Items/Weapons/Ranged/StormSurge.cs b/Items/Weapons/Ranged/StormSurge.cs index 69c8077c1d..035f986c41 100644 --- a/Items/Weapons/Ranged/StormSurge.cs +++ b/Items/Weapons/Ranged/StormSurge.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 5f; Item.UseSound = SoundID.Item122; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.autoReuse = true; //GRRRRRRRRRRRRRRRR false begone Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/SulphuricAcidCannon.cs b/Items/Weapons/Ranged/SulphuricAcidCannon.cs index ed1759a25a..6f0f9794a2 100644 --- a/Items/Weapons/Ranged/SulphuricAcidCannon.cs +++ b/Items/Weapons/Ranged/SulphuricAcidCannon.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria.ID; using Terraria.ModLoader; @@ -27,11 +28,10 @@ namespace CalamityMod.Items.Weapons.Ranged Item.knockBack = 6f; Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; - Item.rare = ItemRarityID.Red; Item.UseSound = SoundID.Item95; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override Vector2? HoldoutOffset() => Vector2.UnitX * -15f; diff --git a/Items/Weapons/Ranged/SurgeDriver.cs b/Items/Weapons/Ranged/SurgeDriver.cs index ce109fabaf..007f257080 100644 --- a/Items/Weapons/Ranged/SurgeDriver.cs +++ b/Items/Weapons/Ranged/SurgeDriver.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,8 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.channel = true; Item.knockBack = 8f; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 11f; diff --git a/Items/Weapons/Ranged/Svantechnical.cs b/Items/Weapons/Ranged/Svantechnical.cs index b1427beda5..9917158633 100644 --- a/Items/Weapons/Ranged/Svantechnical.cs +++ b/Items/Weapons/Ranged/Svantechnical.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -33,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.knockBack = 3.5f; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.UseSound = SoundID.Item31; diff --git a/Items/Weapons/Ranged/TelluricGlare.cs b/Items/Weapons/Ranged/TelluricGlare.cs index b788428f2b..65afc9b5a1 100644 --- a/Items/Weapons/Ranged/TelluricGlare.cs +++ b/Items/Weapons/Ranged/TelluricGlare.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -29,8 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item102; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/TerraFlameburster.cs b/Items/Weapons/Ranged/TerraFlameburster.cs index 19d074fa83..333702ef4f 100644 --- a/Items/Weapons/Ranged/TerraFlameburster.cs +++ b/Items/Weapons/Ranged/TerraFlameburster.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 3.25f; Item.UseSound = SoundID.Item34; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/TheBallista.cs b/Items/Weapons/Ranged/TheBallista.cs index 13d29cc7f4..732429e673 100644 --- a/Items/Weapons/Ranged/TheBallista.cs +++ b/Items/Weapons/Ranged/TheBallista.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 8f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item5; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/TheHive.cs b/Items/Weapons/Ranged/TheHive.cs index a7601bdbfe..8348d2e83b 100644 --- a/Items/Weapons/Ranged/TheHive.cs +++ b/Items/Weapons/Ranged/TheHive.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item61; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/TheJailor.cs b/Items/Weapons/Ranged/TheJailor.cs index 88085341d9..17e42598d1 100644 --- a/Items/Weapons/Ranged/TheJailor.cs +++ b/Items/Weapons/Ranged/TheJailor.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -27,8 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 8f; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item14; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/TheMaelstrom.cs b/Items/Weapons/Ranged/TheMaelstrom.cs index b18b583790..615cf153fd 100644 --- a/Items/Weapons/Ranged/TheMaelstrom.cs +++ b/Items/Weapons/Ranged/TheMaelstrom.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -28,8 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.knockBack = 3f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); Item.noMelee = true; Item.noUseGraphic = true; Item.DamageType = DamageClass.Ranged; diff --git a/Items/Weapons/Ranged/ThePack.cs b/Items/Weapons/Ranged/ThePack.cs index 828f62ee7f..9e7895162f 100644 --- a/Items/Weapons/Ranged/ThePack.cs +++ b/Items/Weapons/Ranged/ThePack.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -36,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Rocket; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Weapons/Ranged/TheSevensStriker.cs b/Items/Weapons/Ranged/TheSevensStriker.cs index 900fc46021..4132ce2595 100644 --- a/Items/Weapons/Ranged/TheSevensStriker.cs +++ b/Items/Weapons/Ranged/TheSevensStriker.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -61,7 +62,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.reuseDelay = 0; Item.shoot = ProjectileID.PlatinumCoin; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Weapons/Ranged/TheStorm.cs b/Items/Weapons/Ranged/TheStorm.cs index 1db916004f..e20bcd8c3b 100644 --- a/Items/Weapons/Ranged/TheStorm.cs +++ b/Items/Weapons/Ranged/TheStorm.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -30,8 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 3.5f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item122; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/TitaniumRailgun.cs b/Items/Weapons/Ranged/TitaniumRailgun.cs index de9fdcd5ed..ced42ff975 100644 --- a/Items/Weapons/Ranged/TitaniumRailgun.cs +++ b/Items/Weapons/Ranged/TitaniumRailgun.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.channel = true; Item.knockBack = 5f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item77 with { Volume = SoundID.Item77.Volume * 0.7f }; Item.autoReuse = true; diff --git a/Items/Weapons/Ranged/TyrannysEnd.cs b/Items/Weapons/Ranged/TyrannysEnd.cs index fca01b23da..c4351807e5 100644 --- a/Items/Weapons/Ranged/TyrannysEnd.cs +++ b/Items/Weapons/Ranged/TyrannysEnd.cs @@ -1,12 +1,13 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Sounds; namespace CalamityMod.Items.Weapons.Ranged { @@ -40,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.UseSound = CommonCalamitySounds.LargeWeaponFireSound; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/Ultima.cs b/Items/Weapons/Ranged/Ultima.cs index 49bceec011..53b50a468e 100644 --- a/Items/Weapons/Ranged/Ultima.cs +++ b/Items/Weapons/Ranged/Ultima.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -43,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.autoReuse = true; Item.noUseGraphic = true; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/UniversalGenesis.cs b/Items/Weapons/Ranged/UniversalGenesis.cs index c58fd3db8f..66e81f06fb 100644 --- a/Items/Weapons/Ranged/UniversalGenesis.cs +++ b/Items/Weapons/Ranged/UniversalGenesis.cs @@ -1,11 +1,12 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Accessories; +using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -41,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.UseSound = SoundID.Item38; Item.useStyle = ItemUseStyleID.Shoot; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/Voidragon.cs b/Items/Weapons/Ranged/Voidragon.cs index 8966963f29..36b0029c2a 100644 --- a/Items/Weapons/Ranged/Voidragon.cs +++ b/Items/Weapons/Ranged/Voidragon.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -42,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Bullet; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.Calamity().canFirePointBlankShots = true; } diff --git a/Items/Weapons/Ranged/WulfrumBlunderbuss.cs b/Items/Weapons/Ranged/WulfrumBlunderbuss.cs index 628057b13b..05bc21531f 100644 --- a/Items/Weapons/Ranged/WulfrumBlunderbuss.cs +++ b/Items/Weapons/Ranged/WulfrumBlunderbuss.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.25f; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.UseSound = ShootSound; Item.autoReuse = false; diff --git a/Items/Weapons/Rogue/AcidicRainBarrel.cs b/Items/Weapons/Rogue/AcidicRainBarrel.cs index 1f697529e0..99574318c2 100644 --- a/Items/Weapons/Rogue/AcidicRainBarrel.cs +++ b/Items/Weapons/Rogue/AcidicRainBarrel.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 8f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 14f; diff --git a/Items/Weapons/Rogue/AlphaVirus.cs b/Items/Weapons/Rogue/AlphaVirus.cs index 265c73464a..e7749cf061 100644 --- a/Items/Weapons/Rogue/AlphaVirus.cs +++ b/Items/Weapons/Rogue/AlphaVirus.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,8 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 4f; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.DamageType = RogueDamageClass.Instance; } diff --git a/Items/Weapons/Rogue/AshenStalactite.cs b/Items/Weapons/Rogue/AshenStalactite.cs index a0b8142245..fa40e51f7e 100644 --- a/Items/Weapons/Rogue/AshenStalactite.cs +++ b/Items/Weapons/Rogue/AshenStalactite.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.maxStack = 1; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; diff --git a/Items/Weapons/Rogue/AuroradicalThrow.cs b/Items/Weapons/Rogue/AuroradicalThrow.cs index ff328b904e..16529e85df 100644 --- a/Items/Weapons/Rogue/AuroradicalThrow.cs +++ b/Items/Weapons/Rogue/AuroradicalThrow.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 6f; Item.UseSound = SoundID.Item117; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Rogue/BallisticPoisonBomb.cs b/Items/Weapons/Rogue/BallisticPoisonBomb.cs index b2824ddbbd..055e2711b7 100644 --- a/Items/Weapons/Rogue/BallisticPoisonBomb.cs +++ b/Items/Weapons/Rogue/BallisticPoisonBomb.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 38; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/BlastBarrel.cs b/Items/Weapons/Rogue/BlastBarrel.cs index d1be39c516..4c5d7c11e1 100644 --- a/Items/Weapons/Rogue/BlastBarrel.cs +++ b/Items/Weapons/Rogue/BlastBarrel.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 8f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 12, 0, 0); //2 gold 40 silver sellprice + Item.value = CalamityGlobalItem.Rarity4BuyPrice; //2 gold 40 silver sellprice Item.rare = ItemRarityID.LightRed; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/BlazingStar.cs b/Items/Weapons/Rogue/BlazingStar.cs index fdbd7cee7b..7230d19372 100644 --- a/Items/Weapons/Rogue/BlazingStar.cs +++ b/Items/Weapons/Rogue/BlazingStar.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useAnimation = 15; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 4f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item1; Item.maxStack = 4; diff --git a/Items/Weapons/Rogue/BloodsoakedCrasher.cs b/Items/Weapons/Rogue/BloodsoakedCrasher.cs index e5770ff4c6..e5e74a2f6b 100644 --- a/Items/Weapons/Rogue/BloodsoakedCrasher.cs +++ b/Items/Weapons/Rogue/BloodsoakedCrasher.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -36,8 +37,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/BouncingEyeball.cs b/Items/Weapons/Rogue/BouncingEyeball.cs index a3116cb795..c0f653e40f 100644 --- a/Items/Weapons/Rogue/BouncingEyeball.cs +++ b/Items/Weapons/Rogue/BouncingEyeball.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 3.5f; Item.rare = ItemRarityID.Green; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.DamageType = RogueDamageClass.Instance; Item.noUseGraphic = true; Item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/Rogue/BrackishFlask.cs b/Items/Weapons/Rogue/BrackishFlask.cs index 6c50e5ca2a..634cc76a8d 100644 --- a/Items/Weapons/Rogue/BrackishFlask.cs +++ b/Items/Weapons/Rogue/BrackishFlask.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item106; Item.autoReuse = true; Item.height = 30; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/Brimblade.cs b/Items/Weapons/Rogue/Brimblade.cs index 930925cdf6..efb7a389dc 100644 --- a/Items/Weapons/Rogue/Brimblade.cs +++ b/Items/Weapons/Rogue/Brimblade.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 6.5f; Item.UseSound = SoundID.Item1; Item.height = 26; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/BurningStrife.cs b/Items/Weapons/Rogue/BurningStrife.cs index dd27b3ba2b..a1162e84c4 100644 --- a/Items/Weapons/Rogue/BurningStrife.cs +++ b/Items/Weapons/Rogue/BurningStrife.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.height = 28; Item.UseSound = SoundID.Item1; Item.useStyle = ItemUseStyleID.Swing; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.autoReuse = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Rogue/CelestialReaper.cs b/Items/Weapons/Rogue/CelestialReaper.cs index ef1f889947..363df8e6f7 100644 --- a/Items/Weapons/Rogue/CelestialReaper.cs +++ b/Items/Weapons/Rogue/CelestialReaper.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.rare = ItemRarityID.Red; Item.UseSound = SoundID.Item71; Item.autoReuse = true; - Item.value = Item.buyPrice(platinum: 1); //sell price of 20 gold + Item.value = CalamityGlobalItem.Rarity10BuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 20f; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/Celestus.cs b/Items/Weapons/Rogue/Celestus.cs index fb225e0ff8..ee18768d03 100644 --- a/Items/Weapons/Rogue/Celestus.cs +++ b/Items/Weapons/Rogue/Celestus.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,8 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noMelee = true; Item.noUseGraphic = true; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/Cinquedea.cs b/Items/Weapons/Rogue/Cinquedea.cs index 93ca7a2e1d..ab7404ef18 100644 --- a/Items/Weapons/Rogue/Cinquedea.cs +++ b/Items/Weapons/Rogue/Cinquedea.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noUseGraphic = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = Speed; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.DamageType = RogueDamageClass.Instance; } diff --git a/Items/Weapons/Rogue/ContaminatedBile.cs b/Items/Weapons/Rogue/ContaminatedBile.cs index a8c0f92f9c..87ee8f3168 100644 --- a/Items/Weapons/Rogue/ContaminatedBile.cs +++ b/Items/Weapons/Rogue/ContaminatedBile.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 4.5f; Item.rare = ItemRarityID.Green; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.UseSound = SoundID.Item106; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Rogue/CorpusAvertor.cs b/Items/Weapons/Rogue/CorpusAvertor.cs index 8f3584e0d4..a19392114d 100644 --- a/Items/Weapons/Rogue/CorpusAvertor.cs +++ b/Items/Weapons/Rogue/CorpusAvertor.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 3f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(gold: 80); + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; Item.rare = ItemRarityID.Yellow; Item.Calamity().donorItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Rogue/CosmicKunai.cs b/Items/Weapons/Rogue/CosmicKunai.cs index d073ed6639..2b4ac9bbad 100644 --- a/Items/Weapons/Rogue/CosmicKunai.cs +++ b/Items/Weapons/Rogue/CosmicKunai.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Rogue { @@ -35,8 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.autoReuse = true; Item.height = 48; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 28f; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/CraniumSmasher.cs b/Items/Weapons/Rogue/CraniumSmasher.cs index df47ad1eec..8e64efeb2f 100644 --- a/Items/Weapons/Rogue/CraniumSmasher.cs +++ b/Items/Weapons/Rogue/CraniumSmasher.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useTime = 15; Item.knockBack = 4f; Item.UseSound = SoundID.Item1; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 20f; diff --git a/Items/Weapons/Rogue/CrushsawCrasher.cs b/Items/Weapons/Rogue/CrushsawCrasher.cs index ae08160741..25d572bae2 100644 --- a/Items/Weapons/Rogue/CrushsawCrasher.cs +++ b/Items/Weapons/Rogue/CrushsawCrasher.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 22; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 11f; diff --git a/Items/Weapons/Rogue/Crystalline.cs b/Items/Weapons/Rogue/Crystalline.cs index e5718b2874..51f16b2bfe 100644 --- a/Items/Weapons/Rogue/Crystalline.cs +++ b/Items/Weapons/Rogue/Crystalline.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 44; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Rogue/CursedDagger.cs b/Items/Weapons/Rogue/CursedDagger.cs index de20311fd2..d8d546063b 100644 --- a/Items/Weapons/Rogue/CursedDagger.cs +++ b/Items/Weapons/Rogue/CursedDagger.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 34; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/DeepSeaDumbbell.cs b/Items/Weapons/Rogue/DeepSeaDumbbell.cs index 8cae49da4f..753974a6d4 100644 --- a/Items/Weapons/Rogue/DeepSeaDumbbell.cs +++ b/Items/Weapons/Rogue/DeepSeaDumbbell.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -40,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Weapons/Rogue/DeepWounder.cs b/Items/Weapons/Rogue/DeepWounder.cs index d89187a56d..c89e182450 100644 --- a/Items/Weapons/Rogue/DeepWounder.cs +++ b/Items/Weapons/Rogue/DeepWounder.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.height = 48; Item.maxStack = 1; Item.rare = ItemRarityID.Lime; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 14f; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/DefectiveSphere.cs b/Items/Weapons/Rogue/DefectiveSphere.cs index 11afc9a373..8f2835b257 100644 --- a/Items/Weapons/Rogue/DefectiveSphere.cs +++ b/Items/Weapons/Rogue/DefectiveSphere.cs @@ -38,7 +38,7 @@ Stealth strikes launch all 4 sphere types at once"); Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.Item15; //phaseblade sound effect - Item.value = Item.buyPrice(0, 16, 0, 0); + Item.value = CalamityGlobalItem.RarityYellowBuyPrice / 5; // Stacks up to 5 Item.rare = ItemRarityID.Yellow; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/DeificThunderbolt.cs b/Items/Weapons/Rogue/DeificThunderbolt.cs index 389f5de01d..c62d4cb355 100644 --- a/Items/Weapons/Rogue/DeificThunderbolt.cs +++ b/Items/Weapons/Rogue/DeificThunderbolt.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Microsoft.Xna.Framework; namespace CalamityMod.Items.Weapons.Rogue { @@ -34,8 +35,7 @@ Stealth strikes summon more lightning and travel faster"); Item.useTime = 21; Item.useAnimation = 21; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.DamageType = RogueDamageClass.Instance; Item.autoReuse = true; diff --git a/Items/Weapons/Rogue/DukesDecapitator.cs b/Items/Weapons/Rogue/DukesDecapitator.cs index e2658e5e6d..04e8eb3069 100644 --- a/Items/Weapons/Rogue/DukesDecapitator.cs +++ b/Items/Weapons/Rogue/DukesDecapitator.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useTime = 30; Item.knockBack = 2f; Item.UseSound = SoundID.Item1; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; diff --git a/Items/Weapons/Rogue/DuststormInABottle.cs b/Items/Weapons/Rogue/DuststormInABottle.cs index fb4646531a..2773b30d66 100644 --- a/Items/Weapons/Rogue/DuststormInABottle.cs +++ b/Items/Weapons/Rogue/DuststormInABottle.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item106; Item.autoReuse = true; Item.height = 24; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/DynamicPursuer.cs b/Items/Weapons/Rogue/DynamicPursuer.cs index 09cad3b5cc..129627f38b 100644 --- a/Items/Weapons/Rogue/DynamicPursuer.cs +++ b/Items/Weapons/Rogue/DynamicPursuer.cs @@ -1,12 +1,13 @@ -using System; -using System.Collections.Generic; -using CalamityMod.CustomRecipes; +using CalamityMod.CustomRecipes; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Items.Weapons.DraedonsArsenal; using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -40,8 +41,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 3f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Red; - modItem.customRarity = CalamityRarity.DraedonRust; + Item.rare = ModContent.RarityType(); Item.noUseGraphic = true; diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index b57dcf6eed..e7e33d5c0e 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -36,8 +37,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noUseGraphic = true; Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/EnchantedAxe.cs b/Items/Weapons/Rogue/EnchantedAxe.cs index 8c0baf8526..6deb1532ac 100644 --- a/Items/Weapons/Rogue/EnchantedAxe.cs +++ b/Items/Weapons/Rogue/EnchantedAxe.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.maxStack = 1; Item.value = 1000; Item.rare = ItemRarityID.Orange; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 30f; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/EpidemicShredder.cs b/Items/Weapons/Rogue/EpidemicShredder.cs index 565528a31b..b45a202e31 100644 --- a/Items/Weapons/Rogue/EpidemicShredder.cs +++ b/Items/Weapons/Rogue/EpidemicShredder.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 4.5f; Item.UseSound = SoundID.Item1; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 18f; diff --git a/Items/Weapons/Rogue/Eradicator.cs b/Items/Weapons/Rogue/Eradicator.cs index 0b82efcf67..ce3b77b5ea 100644 --- a/Items/Weapons/Rogue/Eradicator.cs +++ b/Items/Weapons/Rogue/Eradicator.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -34,8 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 7f; Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = Speed; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/ExecutionersBlade.cs b/Items/Weapons/Rogue/ExecutionersBlade.cs index 52d2211afd..67afce8211 100644 --- a/Items/Weapons/Rogue/ExecutionersBlade.cs +++ b/Items/Weapons/Rogue/ExecutionersBlade.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -36,12 +37,11 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item73; Item.autoReuse = true; Item.height = 64; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 26f; Item.DamageType = RogueDamageClass.Instance; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Rogue/FinalDawn.cs b/Items/Weapons/Rogue/FinalDawn.cs index 9975080415..b5452020e2 100644 --- a/Items/Weapons/Rogue/FinalDawn.cs +++ b/Items/Weapons/Rogue/FinalDawn.cs @@ -1,4 +1,5 @@ using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -31,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 4; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.autoReuse = false; diff --git a/Items/Weapons/Rogue/FishboneBoomerang.cs b/Items/Weapons/Rogue/FishboneBoomerang.cs index bd3480935c..2c42f8aeed 100644 --- a/Items/Weapons/Rogue/FishboneBoomerang.cs +++ b/Items/Weapons/Rogue/FishboneBoomerang.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 5.5f; Item.UseSound = null; Item.height = 34; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 3f; diff --git a/Items/Weapons/Rogue/FrostcrushValari.cs b/Items/Weapons/Rogue/FrostcrushValari.cs index 33eac14abf..b5ab9ffaf3 100644 --- a/Items/Weapons/Rogue/FrostcrushValari.cs +++ b/Items/Weapons/Rogue/FrostcrushValari.cs @@ -27,7 +27,7 @@ Stealth strikes throw three short ranged boomerangs along with a spread of icicl Item.damage = 100; Item.knockBack = 12; Item.DamageType = DamageClass.Throwing; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.useTime = 19; Item.useAnimation = 19; diff --git a/Items/Weapons/Rogue/GhoulishGouger.cs b/Items/Weapons/Rogue/GhoulishGouger.cs index ffd696a74c..369eb1692b 100644 --- a/Items/Weapons/Rogue/GhoulishGouger.cs +++ b/Items/Weapons/Rogue/GhoulishGouger.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -38,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Rogue/Glaive.cs b/Items/Weapons/Rogue/Glaive.cs index 42e5e3190d..b31dbcc000 100644 --- a/Items/Weapons/Rogue/Glaive.cs +++ b/Items/Weapons/Rogue/Glaive.cs @@ -34,7 +34,7 @@ Stealth strikes are super fast and pierce infinitely"); Item.useAnimation = 15; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = Knockback; - Item.value = Item.buyPrice(0, 1, 40, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice / 3; // Stacks up to 3 Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item1; Item.maxStack = 3; diff --git a/Items/Weapons/Rogue/GodsParanoia.cs b/Items/Weapons/Rogue/GodsParanoia.cs index 8ad607017e..2d2f624e63 100644 --- a/Items/Weapons/Rogue/GodsParanoia.cs +++ b/Items/Weapons/Rogue/GodsParanoia.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -37,9 +38,8 @@ Right click to delete all existing spiky balls"); Item.useAnimation = 15; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = knockBack; - Item.value = Item.buyPrice(0, 18, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice / 10; // Stacks up to 10 + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.maxStack = 10; diff --git a/Items/Weapons/Rogue/HeavenfallenStardisk.cs b/Items/Weapons/Rogue/HeavenfallenStardisk.cs index 57362a661d..8c284e94bd 100644 --- a/Items/Weapons/Rogue/HeavenfallenStardisk.cs +++ b/Items/Weapons/Rogue/HeavenfallenStardisk.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 8f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Rogue/Hypothermia.cs b/Items/Weapons/Rogue/Hypothermia.cs index caf4b9a9de..b5ba92489d 100644 --- a/Items/Weapons/Rogue/Hypothermia.cs +++ b/Items/Weapons/Rogue/Hypothermia.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,8 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noMelee = true; Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.Item7; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.damage = 200; Item.useAnimation = 21; @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 8f; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.DamageType = RogueDamageClass.Instance; } diff --git a/Items/Weapons/Rogue/Icebreaker.cs b/Items/Weapons/Rogue/Icebreaker.cs index 63ac67441a..1c57766aac 100644 --- a/Items/Weapons/Rogue/Icebreaker.cs +++ b/Items/Weapons/Rogue/Icebreaker.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.DamageType = DamageClass.Melee; Item.height = 60; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; diff --git a/Items/Weapons/Rogue/InfestedClawmerang.cs b/Items/Weapons/Rogue/InfestedClawmerang.cs index 8533b6047b..db1593c959 100644 --- a/Items/Weapons/Rogue/InfestedClawmerang.cs +++ b/Items/Weapons/Rogue/InfestedClawmerang.cs @@ -32,7 +32,7 @@ Stealth strikes grant the Mushy buff to the user on enemy hits and summon homing Item.UseSound = SoundID.Item1; Item.height = 50; Item.rare = ItemRarityID.Green; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/JawsOfOblivion.cs b/Items/Weapons/Rogue/JawsOfOblivion.cs index 191185fd4d..9dbbff2a07 100644 --- a/Items/Weapons/Rogue/JawsOfOblivion.cs +++ b/Items/Weapons/Rogue/JawsOfOblivion.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; -using CalamityMod.Items.Materials; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -37,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/KelvinCatalyst.cs b/Items/Weapons/Rogue/KelvinCatalyst.cs index a114f7bfc2..8ff90144a5 100644 --- a/Items/Weapons/Rogue/KelvinCatalyst.cs +++ b/Items/Weapons/Rogue/KelvinCatalyst.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 4f; Item.UseSound = SoundID.Item1; Item.height = 20; - Item.value = Item.buyPrice(gold: 36); + Item.value = CalamityGlobalItem.Rarity5BuyPrice; Item.rare = ItemRarityID.Pink; Item.Calamity().donorItem = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Rogue/Kylie.cs b/Items/Weapons/Rogue/Kylie.cs index f8fc03abd3..49168646de 100644 --- a/Items/Weapons/Rogue/Kylie.cs +++ b/Items/Weapons/Rogue/Kylie.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.damage = 63; Item.knockBack = 12; Item.DamageType = DamageClass.Throwing; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.useTime = 25; Item.useAnimation = 25; diff --git a/Items/Weapons/Rogue/LeviathanTeeth.cs b/Items/Weapons/Rogue/LeviathanTeeth.cs index 2b314e5155..f02c3c6fd7 100644 --- a/Items/Weapons/Rogue/LeviathanTeeth.cs +++ b/Items/Weapons/Rogue/LeviathanTeeth.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.autoReuse = true; Item.height = 38; Item.maxStack = 1; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/Lionfish.cs b/Items/Weapons/Rogue/Lionfish.cs index 1384dbb95d..79d6041b96 100644 --- a/Items/Weapons/Rogue/Lionfish.cs +++ b/Items/Weapons/Rogue/Lionfish.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 40; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/LuminousStriker.cs b/Items/Weapons/Rogue/LuminousStriker.cs index 2a326d3e13..8657d9e752 100644 --- a/Items/Weapons/Rogue/LuminousStriker.cs +++ b/Items/Weapons/Rogue/LuminousStriker.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 6f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(1, 0, 0, 0); + Item.value = CalamityGlobalItem.Rarity10BuyPrice; Item.rare = ItemRarityID.Red; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 20f; diff --git a/Items/Weapons/Rogue/MangroveChakram.cs b/Items/Weapons/Rogue/MangroveChakram.cs index 12781b6207..065b0cbe94 100644 --- a/Items/Weapons/Rogue/MangroveChakram.cs +++ b/Items/Weapons/Rogue/MangroveChakram.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 7.5f; Item.UseSound = SoundID.Item1; Item.height = 38; - Item.value = Item.buyPrice(gold: 60); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; diff --git a/Items/Weapons/Rogue/MetalMonstrosity.cs b/Items/Weapons/Rogue/MetalMonstrosity.cs index 9d74cd456f..1090cd6c11 100644 --- a/Items/Weapons/Rogue/MetalMonstrosity.cs +++ b/Items/Weapons/Rogue/MetalMonstrosity.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noMelee = true; Item.UseSound = SoundID.Item1; Item.rare = ItemRarityID.Orange; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.damage = 30; Item.useAnimation = 40; diff --git a/Items/Weapons/Rogue/MeteorFist.cs b/Items/Weapons/Rogue/MeteorFist.cs index 50ffeff74e..efa0163d74 100644 --- a/Items/Weapons/Rogue/MeteorFist.cs +++ b/Items/Weapons/Rogue/MeteorFist.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item20; Item.autoReuse = true; Item.height = 28; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5f; diff --git a/Items/Weapons/Rogue/MoltenAmputator.cs b/Items/Weapons/Rogue/MoltenAmputator.cs index f8f3f7db20..a4360e21ad 100644 --- a/Items/Weapons/Rogue/MoltenAmputator.cs +++ b/Items/Weapons/Rogue/MoltenAmputator.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -33,8 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.height = 60; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = Speed; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/Mycoroot.cs b/Items/Weapons/Rogue/Mycoroot.cs index 0f053bc3d9..8b455edac4 100644 --- a/Items/Weapons/Rogue/Mycoroot.cs +++ b/Items/Weapons/Rogue/Mycoroot.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.autoReuse = true; Item.height = 32; Item.rare = ItemRarityID.Green; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 20f; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/NanoblackReaper.cs b/Items/Weapons/Rogue/NanoblackReaper.cs index 20ee3cafe5..5247147bcd 100644 --- a/Items/Weapons/Rogue/NanoblackReaper.cs +++ b/Items/Weapons/Rogue/NanoblackReaper.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -43,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item18; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/NightsGaze.cs b/Items/Weapons/Rogue/NightsGaze.cs index 6154308605..859c1cae76 100644 --- a/Items/Weapons/Rogue/NightsGaze.cs +++ b/Items/Weapons/Rogue/NightsGaze.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Rogue; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -38,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 30f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.DamageType = RogueDamageClass.Instance; } diff --git a/Items/Weapons/Rogue/Nychthemeron.cs b/Items/Weapons/Rogue/Nychthemeron.cs index 5e4204294c..ab85e47620 100644 --- a/Items/Weapons/Rogue/Nychthemeron.cs +++ b/Items/Weapons/Rogue/Nychthemeron.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.autoReuse = true; Item.height = 18; Item.maxStack = 10; - Item.value = Item.buyPrice(0, 3, 60, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice / 10; // Stacks up to 10 Item.rare = ItemRarityID.LightPurple; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; diff --git a/Items/Weapons/Rogue/Penumbra.cs b/Items/Weapons/Rogue/Penumbra.cs index 4fcb1c6f1e..bb252c95e7 100644 --- a/Items/Weapons/Rogue/Penumbra.cs +++ b/Items/Weapons/Rogue/Penumbra.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -29,8 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noMelee = true; Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.Item103; - Item.value = Item.buyPrice(1, 80, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.damage = 1008; Item.useAnimation = 40; @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = ShootSpeed; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.DamageType = RogueDamageClass.Instance; } diff --git a/Items/Weapons/Rogue/PhantasmalRuin.cs b/Items/Weapons/Rogue/PhantasmalRuin.cs index 5074a209bc..221904967e 100644 --- a/Items/Weapons/Rogue/PhantasmalRuin.cs +++ b/Items/Weapons/Rogue/PhantasmalRuin.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Microsoft.Xna.Framework; namespace CalamityMod.Items.Weapons.Rogue { @@ -38,7 +39,7 @@ Stealth strikes continuously leave spectral clones in their wake"); Item.DamageType = RogueDamageClass.Instance; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/PoisonPack.cs b/Items/Weapons/Rogue/PoisonPack.cs index 8f2d99a3ba..bcd48c8230 100644 --- a/Items/Weapons/Rogue/PoisonPack.cs +++ b/Items/Weapons/Rogue/PoisonPack.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useAnimation = 19; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = baseKnockback; - Item.value = Item.buyPrice(0, 0, 33, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice / 3; // Stacks up to 3 Item.rare = ItemRarityID.Blue; Item.UseSound = SoundID.Item1; Item.maxStack = 3; diff --git a/Items/Weapons/Rogue/Prismalline.cs b/Items/Weapons/Rogue/Prismalline.cs index 03922a2622..d532c1dce1 100644 --- a/Items/Weapons/Rogue/Prismalline.cs +++ b/Items/Weapons/Rogue/Prismalline.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 46; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index 7fd1968ec8..9344191a5b 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Microsoft.Xna.Framework; namespace CalamityMod.Items.Weapons.Rogue { @@ -33,8 +34,7 @@ Stealth strikes spawn smaller spears to fly along side it"); Item.useAnimation = 18; Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.DamageType = RogueDamageClass.Instance; Item.autoReuse = true; diff --git a/Items/Weapons/Rogue/RadiantStar.cs b/Items/Weapons/Rogue/RadiantStar.cs index 471f8de583..85ff8007c1 100644 --- a/Items/Weapons/Rogue/RadiantStar.cs +++ b/Items/Weapons/Rogue/RadiantStar.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 48; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 20f; diff --git a/Items/Weapons/Rogue/RefractionRotor.cs b/Items/Weapons/Rogue/RefractionRotor.cs index fc7e677f78..67aadc8a89 100644 --- a/Items/Weapons/Rogue/RefractionRotor.cs +++ b/Items/Weapons/Rogue/RefractionRotor.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -34,8 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noMelee = true; Item.noUseGraphic = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/RegulusRiot.cs b/Items/Weapons/Rogue/RegulusRiot.cs index 54108cf9ee..92c2ad8f3a 100644 --- a/Items/Weapons/Rogue/RegulusRiot.cs +++ b/Items/Weapons/Rogue/RegulusRiot.cs @@ -28,7 +28,7 @@ Stealth strikes explode into energy stars"); Item.noMelee = true; Item.noUseGraphic = true; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.useTime = 26; Item.useAnimation = 26; Item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/Rogue/Sacrifice.cs b/Items/Weapons/Rogue/Sacrifice.cs index e1f2c26b23..cf47f2724b 100644 --- a/Items/Weapons/Rogue/Sacrifice.cs +++ b/Items/Weapons/Rogue/Sacrifice.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.NPCs.NormalNPCs; +using CalamityMod.NPCs.NormalNPCs; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,8 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.shootSpeed = 12f; Item.DamageType = RogueDamageClass.Instance; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; } diff --git a/Items/Weapons/Rogue/SandDollar.cs b/Items/Weapons/Rogue/SandDollar.cs index 9cbf1d8ec1..0c0b51ae5a 100644 --- a/Items/Weapons/Rogue/SandDollar.cs +++ b/Items/Weapons/Rogue/SandDollar.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 3.5f; Item.autoReuse = true; Item.UseSound = SoundID.Item1; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice / 2; // Stacks to 2 Item.rare = ItemRarityID.Green; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 14f; diff --git a/Items/Weapons/Rogue/Sandslasher.cs b/Items/Weapons/Rogue/Sandslasher.cs index a6877f1c74..aaa9baf17b 100644 --- a/Items/Weapons/Rogue/Sandslasher.cs +++ b/Items/Weapons/Rogue/Sandslasher.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 7f; diff --git a/Items/Weapons/Rogue/ScarletDevil.cs b/Items/Weapons/Rogue/ScarletDevil.cs index f78d6fd5fb..ce9b23830b 100644 --- a/Items/Weapons/Rogue/ScarletDevil.cs +++ b/Items/Weapons/Rogue/ScarletDevil.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -38,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Weapons/Rogue/ScourgeoftheDesert.cs b/Items/Weapons/Rogue/ScourgeoftheDesert.cs index e5c933dc94..6e17f316fe 100644 --- a/Items/Weapons/Rogue/ScourgeoftheDesert.cs +++ b/Items/Weapons/Rogue/ScourgeoftheDesert.cs @@ -30,7 +30,7 @@ Stealth strikes gain damage as they damage enemies"); Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 44; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/ScourgeoftheSeas.cs b/Items/Weapons/Rogue/ScourgeoftheSeas.cs index eb0704eac9..62ec6607f6 100644 --- a/Items/Weapons/Rogue/ScourgeoftheSeas.cs +++ b/Items/Weapons/Rogue/ScourgeoftheSeas.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.Item1; Item.rare = ItemRarityID.Pink; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/SeafoamBomb.cs b/Items/Weapons/Rogue/SeafoamBomb.cs index 6e007138b3..33e45aac82 100644 --- a/Items/Weapons/Rogue/SeafoamBomb.cs +++ b/Items/Weapons/Rogue/SeafoamBomb.cs @@ -32,7 +32,7 @@ Stealth strikes are faster and explode into 5 bubbles"); Item.knockBack = 8f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 8f; diff --git a/Items/Weapons/Rogue/SealedSingularity.cs b/Items/Weapons/Rogue/SealedSingularity.cs index d015f9898c..91ee0d2bea 100644 --- a/Items/Weapons/Rogue/SealedSingularity.cs +++ b/Items/Weapons/Rogue/SealedSingularity.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -34,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item106; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Weapons/Rogue/SearedPan.cs b/Items/Weapons/Rogue/SearedPan.cs index e1958bfcdc..c797383a3d 100644 --- a/Items/Weapons/Rogue/SearedPan.cs +++ b/Items/Weapons/Rogue/SearedPan.cs @@ -1,12 +1,13 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Rogue { @@ -45,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; Item.Calamity().donorItem = true; diff --git a/Items/Weapons/Rogue/Seraphim.cs b/Items/Weapons/Rogue/Seraphim.cs index d0abcea860..4f5acac6cc 100644 --- a/Items/Weapons/Rogue/Seraphim.cs +++ b/Items/Weapons/Rogue/Seraphim.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; -using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; +using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -37,8 +38,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = SeraphimProjectile.InitialSpeed; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/ShatteredSun.cs b/Items/Weapons/Rogue/ShatteredSun.cs index 05d656a366..21dbeb9e8d 100644 --- a/Items/Weapons/Rogue/ShatteredSun.cs +++ b/Items/Weapons/Rogue/ShatteredSun.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -32,8 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 25f; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/SkyStabber.cs b/Items/Weapons/Rogue/SkyStabber.cs index f7417eab2e..0226142e51 100644 --- a/Items/Weapons/Rogue/SkyStabber.cs +++ b/Items/Weapons/Rogue/SkyStabber.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useAnimation = 15; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = knockBack; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice / 4; // stacks up to 4 Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item1; Item.maxStack = 4; diff --git a/Items/Weapons/Rogue/SkyfinBombers.cs b/Items/Weapons/Rogue/SkyfinBombers.cs index 1a8c81fbde..860f3f4c73 100644 --- a/Items/Weapons/Rogue/SkyfinBombers.cs +++ b/Items/Weapons/Rogue/SkyfinBombers.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item11; Item.autoReuse = true; Item.height = 30; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/SlickCane.cs b/Items/Weapons/Rogue/SlickCane.cs index e8b01a528b..9ec8d1bb93 100644 --- a/Items/Weapons/Rogue/SlickCane.cs +++ b/Items/Weapons/Rogue/SlickCane.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 5f; Item.UseSound = SoundID.DD2_GhastlyGlaivePierce; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 22f; diff --git a/Items/Weapons/Rogue/SnapClam.cs b/Items/Weapons/Rogue/SnapClam.cs index a0bee8a453..e3e888d814 100644 --- a/Items/Weapons/Rogue/SnapClam.cs +++ b/Items/Weapons/Rogue/SnapClam.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 3f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/SpearofPaleolith.cs b/Items/Weapons/Rogue/SpearofPaleolith.cs index 062e04be9b..e0c10e550e 100644 --- a/Items/Weapons/Rogue/SpearofPaleolith.cs +++ b/Items/Weapons/Rogue/SpearofPaleolith.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 54; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 35f; diff --git a/Items/Weapons/Rogue/StarofDestruction.cs b/Items/Weapons/Rogue/StarofDestruction.cs index 4c2a6ddd78..6de5bc1555 100644 --- a/Items/Weapons/Rogue/StarofDestruction.cs +++ b/Items/Weapons/Rogue/StarofDestruction.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 10f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5f; diff --git a/Items/Weapons/Rogue/StellarKnife.cs b/Items/Weapons/Rogue/StellarKnife.cs index 46924d8dd8..75c460ab65 100644 --- a/Items/Weapons/Rogue/StellarKnife.cs +++ b/Items/Weapons/Rogue/StellarKnife.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.knockBack = 4f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Rogue/SubductionSlicer.cs b/Items/Weapons/Rogue/SubductionSlicer.cs index c5cfc0123f..ca814c534a 100644 --- a/Items/Weapons/Rogue/SubductionSlicer.cs +++ b/Items/Weapons/Rogue/SubductionSlicer.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useAnimation = 20; Item.knockBack = 8.5f; Item.UseSound = SoundID.Item1; - Item.value = Item.buyPrice(gold: 80); + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; diff --git a/Items/Weapons/Rogue/Supernova.cs b/Items/Weapons/Rogue/Supernova.cs index f22c32b50b..abd2b0a60c 100644 --- a/Items/Weapons/Rogue/Supernova.cs +++ b/Items/Weapons/Rogue/Supernova.cs @@ -1,11 +1,12 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Microsoft.Xna.Framework; namespace CalamityMod.Items.Weapons.Rogue { @@ -34,11 +35,10 @@ Stealth strikes release energy as they fly"); Item.autoReuse = true; Item.height = 36; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Red; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; Item.DamageType = RogueDamageClass.Instance; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/TarragonThrowingDart.cs b/Items/Weapons/Rogue/TarragonThrowingDart.cs index 076f4c4f4b..aa1705f4a0 100644 --- a/Items/Weapons/Rogue/TarragonThrowingDart.cs +++ b/Items/Weapons/Rogue/TarragonThrowingDart.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -34,11 +35,10 @@ Stealth strikes erupt into thorns on enemy hits"); Item.height = 34; Item.maxStack = 999; Item.value = Item.sellPrice(copper: 30); - Item.rare = ItemRarityID.Purple; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; Item.DamageType = RogueDamageClass.Instance; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/TerraDisk.cs b/Items/Weapons/Rogue/TerraDisk.cs index f50391ada8..46d0ea996d 100644 --- a/Items/Weapons/Rogue/TerraDisk.cs +++ b/Items/Weapons/Rogue/TerraDisk.cs @@ -37,7 +37,7 @@ Stealth strikes travel slower and are rapidly orbited by the smaller disks"); Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.Item1; - Item.value = Item.buyPrice(gold: 80); + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; Item.rare = ItemRarityID.Yellow; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Rogue/TerrorTalons.cs b/Items/Weapons/Rogue/TerrorTalons.cs index e9484126b6..99f1c7e092 100644 --- a/Items/Weapons/Rogue/TerrorTalons.cs +++ b/Items/Weapons/Rogue/TerrorTalons.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item39; Item.autoReuse = true; Item.height = 24; - Item.value = Item.buyPrice(0, 48, 0, 0); + Item.value = CalamityGlobalItem.Rarity7BuyPrice; Item.rare = ItemRarityID.LightPurple; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10.5f; diff --git a/Items/Weapons/Rogue/TheAtomSplitter.cs b/Items/Weapons/Rogue/TheAtomSplitter.cs index 2c866aa768..229b67a6bd 100644 --- a/Items/Weapons/Rogue/TheAtomSplitter.cs +++ b/Items/Weapons/Rogue/TheAtomSplitter.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -33,8 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noMelee = true; Item.noUseGraphic = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/TheReaper.cs b/Items/Weapons/Rogue/TheReaper.cs index 97c1d9cf62..e7fbf0d1f4 100644 --- a/Items/Weapons/Rogue/TheReaper.cs +++ b/Items/Weapons/Rogue/TheReaper.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,8 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/TheSyringe.cs b/Items/Weapons/Rogue/TheSyringe.cs index 541276129c..85ac17ebf5 100644 --- a/Items/Weapons/Rogue/TheSyringe.cs +++ b/Items/Weapons/Rogue/TheSyringe.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noUseGraphic = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = Speed; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.DamageType = RogueDamageClass.Instance; } diff --git a/Items/Weapons/Rogue/TimeBolt.cs b/Items/Weapons/Rogue/TimeBolt.cs index 063021688f..ae67c0491f 100644 --- a/Items/Weapons/Rogue/TimeBolt.cs +++ b/Items/Weapons/Rogue/TimeBolt.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -32,8 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; diff --git a/Items/Weapons/Rogue/TotalityBreakers.cs b/Items/Weapons/Rogue/TotalityBreakers.cs index fe7eee02b5..c82ccfcfc3 100644 --- a/Items/Weapons/Rogue/TotalityBreakers.cs +++ b/Items/Weapons/Rogue/TotalityBreakers.cs @@ -32,7 +32,7 @@ Stealth strikes leak tar as they fly"); Item.UseSound = SoundID.Item106; Item.autoReuse = true; Item.height = 42; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/ToxicantTwister.cs b/Items/Weapons/Rogue/ToxicantTwister.cs index aad5bcd687..3ed271c903 100644 --- a/Items/Weapons/Rogue/ToxicantTwister.cs +++ b/Items/Weapons/Rogue/ToxicantTwister.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/Turbulance.cs b/Items/Weapons/Rogue/Turbulance.cs index d58b05e4b5..b979404bc5 100644 --- a/Items/Weapons/Rogue/Turbulance.cs +++ b/Items/Weapons/Rogue/Turbulance.cs @@ -32,7 +32,7 @@ Stealth strikes are trailed by homing wind slashes"); Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.height = 14; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 12f; diff --git a/Items/Weapons/Rogue/Valediction.cs b/Items/Weapons/Rogue/Valediction.cs index b9011d0ea7..3baebf3abe 100644 --- a/Items/Weapons/Rogue/Valediction.cs +++ b/Items/Weapons/Rogue/Valediction.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Rogue/Wrathwing.cs b/Items/Weapons/Rogue/Wrathwing.cs index 7b0fcbba31..811032b856 100644 --- a/Items/Weapons/Rogue/Wrathwing.cs +++ b/Items/Weapons/Rogue/Wrathwing.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,8 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.autoReuse = true; Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 28f; Item.DamageType = RogueDamageClass.Instance; diff --git a/Items/Weapons/Summon/AresExoskeleton.cs b/Items/Weapons/Summon/AresExoskeleton.cs index fc3b86e843..67b7567192 100644 --- a/Items/Weapons/Summon/AresExoskeleton.cs +++ b/Items/Weapons/Summon/AresExoskeleton.cs @@ -1,11 +1,12 @@ -using Terraria.DataStructures; +using CalamityMod.Particles; +using CalamityMod.Projectiles.Summon.SmallAresArms; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Projectiles.Summon.SmallAresArms; -using Microsoft.Xna.Framework.Graphics; -using CalamityMod.Particles; namespace CalamityMod.Items.Weapons.Summon { @@ -86,7 +87,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.knockBack = 1f; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item117; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/BelladonnaSpiritStaff.cs b/Items/Weapons/Summon/BelladonnaSpiritStaff.cs index ce4db5324f..bddd3cbd4e 100644 --- a/Items/Weapons/Summon/BelladonnaSpiritStaff.cs +++ b/Items/Weapons/Summon/BelladonnaSpiritStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 1f; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/BlackHawkRemote.cs b/Items/Weapons/Summon/BlackHawkRemote.cs index c909a90c21..3378e2c185 100644 --- a/Items/Weapons/Summon/BlackHawkRemote.cs +++ b/Items/Weapons/Summon/BlackHawkRemote.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.HoldUp; Item.noMelee = true; Item.knockBack = 1f; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.UseSound = SoundID.Item15; //phaseblade sound effect Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/BloodClotStaff.cs b/Items/Weapons/Summon/BloodClotStaff.cs index 4f3867917c..b22d0b5b5b 100644 --- a/Items/Weapons/Summon/BloodClotStaff.cs +++ b/Items/Weapons/Summon/BloodClotStaff.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2.25f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/BorealisBomber.cs b/Items/Weapons/Summon/BorealisBomber.cs index 8ee803a241..5d8fbab902 100644 --- a/Items/Weapons/Summon/BorealisBomber.cs +++ b/Items/Weapons/Summon/BorealisBomber.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item44; //item.autoReuse = true; diff --git a/Items/Weapons/Summon/CadaverousCarrion.cs b/Items/Weapons/Summon/CadaverousCarrion.cs index c93c1b92de..9e99b027e5 100644 --- a/Items/Weapons/Summon/CadaverousCarrion.cs +++ b/Items/Weapons/Summon/CadaverousCarrion.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -33,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.shoot = ModContent.ProjectileType(); Item.value = CalamityGlobalItem.Rarity13BuyPrice; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Summon/CalamarisLament.cs b/Items/Weapons/Summon/CalamarisLament.cs index 8f9a2cdd1b..1126c184ee 100644 --- a/Items/Weapons/Summon/CalamarisLament.cs +++ b/Items/Weapons/Summon/CalamarisLament.cs @@ -1,5 +1,6 @@ using Terraria.DataStructures; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -26,14 +27,13 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2.5f; - Item.value = Item.buyPrice(1, 40, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.UseSound = SoundID.Item83; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; Item.DamageType = DamageClass.Summon; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Summon/CinderBlossomStaff.cs b/Items/Weapons/Summon/CinderBlossomStaff.cs index f7662735b7..d12dd3c7c5 100644 --- a/Items/Weapons/Summon/CinderBlossomStaff.cs +++ b/Items/Weapons/Summon/CinderBlossomStaff.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item34; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/CindersOfLament.cs b/Items/Weapons/Summon/CindersOfLament.cs index df5476a6dc..ec0a8f39ea 100644 --- a/Items/Weapons/Summon/CindersOfLament.cs +++ b/Items/Weapons/Summon/CindersOfLament.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -34,8 +35,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.noMelee = true; Item.knockBack = 0f; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.DD2_BetsySummon; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Summon/CorroslimeStaff.cs b/Items/Weapons/Summon/CorroslimeStaff.cs index 4aa058fd30..c46bf46712 100644 --- a/Items/Weapons/Summon/CorroslimeStaff.cs +++ b/Items/Weapons/Summon/CorroslimeStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/CorvidHarbringerStaff.cs b/Items/Weapons/Summon/CorvidHarbringerStaff.cs index c3f0a843f0..a44c45ce66 100644 --- a/Items/Weapons/Summon/CorvidHarbringerStaff.cs +++ b/Items/Weapons/Summon/CorvidHarbringerStaff.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,9 +36,8 @@ namespace CalamityMod.Items.Weapons.Summon Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 13f; - Item.value = Item.buyPrice(2, 50, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Summon/CosmicImmaterializer.cs b/Items/Weapons/Summon/CosmicImmaterializer.cs index a56527f521..e70bd8985a 100644 --- a/Items/Weapons/Summon/CosmicImmaterializer.cs +++ b/Items/Weapons/Summon/CosmicImmaterializer.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -33,12 +34,11 @@ namespace CalamityMod.Items.Weapons.Summon Item.noMelee = true; Item.knockBack = 0f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Red; Item.UseSound = SoundID.Item60; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; Item.DamageType = DamageClass.Summon; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && player.maxMinions >= 10; diff --git a/Items/Weapons/Summon/CosmicViperEngine.cs b/Items/Weapons/Summon/CosmicViperEngine.cs index 32b2411d5c..570cb03e97 100644 --- a/Items/Weapons/Summon/CosmicViperEngine.cs +++ b/Items/Weapons/Summon/CosmicViperEngine.cs @@ -1,11 +1,12 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Ores; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -37,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.DamageType = DamageClass.Summon; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Summon/Cosmilamp.cs b/Items/Weapons/Summon/Cosmilamp.cs index a0a37ca941..736213a16d 100644 --- a/Items/Weapons/Summon/Cosmilamp.cs +++ b/Items/Weapons/Summon/Cosmilamp.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -29,8 +30,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.noMelee = true; Item.knockBack = 4f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item44; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/CrimslimeStaff.cs b/Items/Weapons/Summon/CrimslimeStaff.cs index 0979145480..b9d95cdcc0 100644 --- a/Items/Weapons/Summon/CrimslimeStaff.cs +++ b/Items/Weapons/Summon/CrimslimeStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 12, 0, 0); + Item.value = CalamityGlobalItem.Rarity4BuyPrice; Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/DankStaff.cs b/Items/Weapons/Summon/DankStaff.cs index e5792383f9..90f8d3a99a 100644 --- a/Items/Weapons/Summon/DankStaff.cs +++ b/Items/Weapons/Summon/DankStaff.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2.25f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/DazzlingStabberStaff.cs b/Items/Weapons/Summon/DazzlingStabberStaff.cs index e77b92ed58..a0d3cdce77 100644 --- a/Items/Weapons/Summon/DazzlingStabberStaff.cs +++ b/Items/Weapons/Summon/DazzlingStabberStaff.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -33,8 +34,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.shootSpeed = 13f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Summon/DeepseaStaff.cs b/Items/Weapons/Summon/DeepseaStaff.cs index 2c7453f6c9..d92a490a6f 100644 --- a/Items/Weapons/Summon/DeepseaStaff.cs +++ b/Items/Weapons/Summon/DeepseaStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/DormantBrimseeker.cs b/Items/Weapons/Summon/DormantBrimseeker.cs index 7beac3b873..9155676a1f 100644 --- a/Items/Weapons/Summon/DormantBrimseeker.cs +++ b/Items/Weapons/Summon/DormantBrimseeker.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.shootSpeed = 10f; Item.DamageType = DamageClass.Summon; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Summon/DragonbloodDisgorger.cs b/Items/Weapons/Summon/DragonbloodDisgorger.cs index 948935deef..a7ef91b92b 100644 --- a/Items/Weapons/Summon/DragonbloodDisgorger.cs +++ b/Items/Weapons/Summon/DragonbloodDisgorger.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -30,8 +31,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.noMelee = true; Item.knockBack = 4f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.DD2_SkeletonDeath; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Summon/DreadmineStaff.cs b/Items/Weapons/Summon/DreadmineStaff.cs index 7da2b2128f..4c8b801dd2 100644 --- a/Items/Weapons/Summon/DreadmineStaff.cs +++ b/Items/Weapons/Summon/DreadmineStaff.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 4.5f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item113; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/EndoHydraStaff.cs b/Items/Weapons/Summon/EndoHydraStaff.cs index 7e787a69e1..0b35b22b02 100644 --- a/Items/Weapons/Summon/EndoHydraStaff.cs +++ b/Items/Weapons/Summon/EndoHydraStaff.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -35,9 +36,8 @@ namespace CalamityMod.Items.Weapons.Summon Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; - Item.value = Item.buyPrice(2, 50, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Summon/Endogenesis.cs b/Items/Weapons/Summon/Endogenesis.cs index b6e5fb7346..694a33d21d 100644 --- a/Items/Weapons/Summon/Endogenesis.cs +++ b/Items/Weapons/Summon/Endogenesis.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -47,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.shootSpeed = 10f; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Weapons/Summon/EntropysVigil.cs b/Items/Weapons/Summon/EntropysVigil.cs index 06957ed75e..c6bc532540 100644 --- a/Items/Weapons/Summon/EntropysVigil.cs +++ b/Items/Weapons/Summon/EntropysVigil.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item82; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/EtherealSubjugator.cs b/Items/Weapons/Summon/EtherealSubjugator.cs index 3c327b55e0..b039355a9c 100644 --- a/Items/Weapons/Summon/EtherealSubjugator.cs +++ b/Items/Weapons/Summon/EtherealSubjugator.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -29,14 +30,13 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 1f; - Item.value = Item.buyPrice(1, 40, 0, 0); - Item.rare = ItemRarityID.Red; + Item.value = CalamityGlobalItem.Rarity14BuyPrice; Item.UseSound = SoundID.Item82; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; Item.DamageType = DamageClass.Summon; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Summon/FlamsteedRing.cs b/Items/Weapons/Summon/FlamsteedRing.cs index a42f6709d1..71beef9019 100644 --- a/Items/Weapons/Summon/FlamsteedRing.cs +++ b/Items/Weapons/Summon/FlamsteedRing.cs @@ -1,17 +1,18 @@ -using Terraria.DataStructures; -using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.Audio; using System.Collections.Generic; using System.Linq; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Summon { @@ -67,7 +68,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.knockBack = 1f; Item.value = CalamityGlobalItem.RarityHotPinkBuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; Item.UseSound = SoundID.Item117; diff --git a/Items/Weapons/Summon/ForgottenApexWand.cs b/Items/Weapons/Summon/ForgottenApexWand.cs index d22224a73f..b4b04706a2 100644 --- a/Items/Weapons/Summon/ForgottenApexWand.cs +++ b/Items/Weapons/Summon/ForgottenApexWand.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.UseSound = SoundID.Item89; Item.noMelee = true; Item.rare = ItemRarityID.Pink; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.autoReuse = true; Item.knockBack = 4f; diff --git a/Items/Weapons/Summon/FrostBlossomStaff.cs b/Items/Weapons/Summon/FrostBlossomStaff.cs index 032f5cf6fc..431d9bfea3 100644 --- a/Items/Weapons/Summon/FrostBlossomStaff.cs +++ b/Items/Weapons/Summon/FrostBlossomStaff.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.UseSound = SoundID.Item28; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/FuelCellBundle.cs b/Items/Weapons/Summon/FuelCellBundle.cs index 37822aed5d..687137e5a7 100644 --- a/Items/Weapons/Summon/FuelCellBundle.cs +++ b/Items/Weapons/Summon/FuelCellBundle.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useTime = Item.useAnimation = 20; Item.noMelee = true; Item.knockBack = 7f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item106; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/GammaHeart.cs b/Items/Weapons/Summon/GammaHeart.cs index 16e80e5130..9d90ba1378 100644 --- a/Items/Weapons/Summon/GammaHeart.cs +++ b/Items/Weapons/Summon/GammaHeart.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -32,8 +33,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Summon/GodspawnHelixStaff.cs b/Items/Weapons/Summon/GodspawnHelixStaff.cs index 960671ce70..d79ab19f8b 100644 --- a/Items/Weapons/Summon/GodspawnHelixStaff.cs +++ b/Items/Weapons/Summon/GodspawnHelixStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 1.25f; - Item.value = Item.buyPrice(0, 95, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/GuidelightofOblivion.cs b/Items/Weapons/Summon/GuidelightofOblivion.cs index c609013450..52cec5511b 100644 --- a/Items/Weapons/Summon/GuidelightofOblivion.cs +++ b/Items/Weapons/Summon/GuidelightofOblivion.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -31,8 +32,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.noMelee = true; Item.knockBack = 5f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.Calamity().customRarity = CalamityRarity.Turquoise; - Item.rare = ItemRarityID.Purple; + Item.rare = ModContent.RarityType(); Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.UseSound = SoundID.Item44; diff --git a/Items/Weapons/Summon/HerringStaff.cs b/Items/Weapons/Summon/HerringStaff.cs index d128a78b77..a7e83b1b88 100644 --- a/Items/Weapons/Summon/HerringStaff.cs +++ b/Items/Weapons/Summon/HerringStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 1.25f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item21; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/HivePod.cs b/Items/Weapons/Summon/HivePod.cs index e24115c160..8409ce711a 100644 --- a/Items/Weapons/Summon/HivePod.cs +++ b/Items/Weapons/Summon/HivePod.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 4f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item78; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/IgneousExaltation.cs b/Items/Weapons/Summon/IgneousExaltation.cs index d3b13c84b3..998c6de7bb 100644 --- a/Items/Weapons/Summon/IgneousExaltation.cs +++ b/Items/Weapons/Summon/IgneousExaltation.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4.5f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item71; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/MagicalConch.cs b/Items/Weapons/Summon/MagicalConch.cs index 2ae0c04d27..05bfe24002 100644 --- a/Items/Weapons/Summon/MagicalConch.cs +++ b/Items/Weapons/Summon/MagicalConch.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/Metastasis.cs b/Items/Weapons/Summon/Metastasis.cs index 557f14e4d0..f3a8404e48 100644 --- a/Items/Weapons/Summon/Metastasis.cs +++ b/Items/Weapons/Summon/Metastasis.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -34,8 +35,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.noMelee = true; Item.knockBack = 2f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.DD2_BetsySummon; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; diff --git a/Items/Weapons/Summon/MidnightSunBeacon.cs b/Items/Weapons/Summon/MidnightSunBeacon.cs index 49a51ff32e..30127051bc 100644 --- a/Items/Weapons/Summon/MidnightSunBeacon.cs +++ b/Items/Weapons/Summon/MidnightSunBeacon.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -37,8 +38,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.DamageType = DamageClass.Summon; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { diff --git a/Items/Weapons/Summon/OrthoceraShell.cs b/Items/Weapons/Summon/OrthoceraShell.cs index d5325bc7a7..2158b07a68 100644 --- a/Items/Weapons/Summon/OrthoceraShell.cs +++ b/Items/Weapons/Summon/OrthoceraShell.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.HoldUp; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item42; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/Perdition.cs b/Items/Weapons/Summon/Perdition.cs index e35366fb5b..4000405c2f 100644 --- a/Items/Weapons/Summon/Perdition.cs +++ b/Items/Weapons/Summon/Perdition.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Items.Weapons.Summon { @@ -36,8 +37,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.sentry = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool AltFunctionUse(Player player) => true; diff --git a/Items/Weapons/Summon/PlantationStaff.cs b/Items/Weapons/Summon/PlantationStaff.cs index 8196c322b5..72737e2776 100644 --- a/Items/Weapons/Summon/PlantationStaff.cs +++ b/Items/Weapons/Summon/PlantationStaff.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 1f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = SoundID.Item76; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/PolypLauncher.cs b/Items/Weapons/Summon/PolypLauncher.cs index 89a5811f8d..2f3172ad9c 100644 --- a/Items/Weapons/Summon/PolypLauncher.cs +++ b/Items/Weapons/Summon/PolypLauncher.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 0f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = 2; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/SandSharknadoStaff.cs b/Items/Weapons/Summon/SandSharknadoStaff.cs index cc24f159bd..44e5df871b 100644 --- a/Items/Weapons/Summon/SandSharknadoStaff.cs +++ b/Items/Weapons/Summon/SandSharknadoStaff.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 60, 0, 0); + Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Lime; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/SarosPossession.cs b/Items/Weapons/Summon/SarosPossession.cs index 9143482dea..b83d663f88 100644 --- a/Items/Weapons/Summon/SarosPossession.cs +++ b/Items/Weapons/Summon/SarosPossession.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -40,8 +41,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.shootSpeed = 10f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); } public override void HoldItem(Player player) diff --git a/Items/Weapons/Summon/ScabRipper.cs b/Items/Weapons/Summon/ScabRipper.cs index 6c2441a810..5ca0c79a3f 100644 --- a/Items/Weapons/Summon/ScabRipper.cs +++ b/Items/Weapons/Summon/ScabRipper.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 0.5f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item83; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/SeaboundStaff.cs b/Items/Weapons/Summon/SeaboundStaff.cs index 0067aec2a5..da3c63f379 100644 --- a/Items/Weapons/Summon/SeaboundStaff.cs +++ b/Items/Weapons/Summon/SeaboundStaff.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/ShellfishStaff.cs b/Items/Weapons/Summon/ShellfishStaff.cs index 6d24dbbd96..361875cc6a 100644 --- a/Items/Weapons/Summon/ShellfishStaff.cs +++ b/Items/Weapons/Summon/ShellfishStaff.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/Sirius.cs b/Items/Weapons/Summon/Sirius.cs index f4622e1fbe..8aeeefa0c4 100644 --- a/Items/Weapons/Summon/Sirius.cs +++ b/Items/Weapons/Summon/Sirius.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -38,9 +39,8 @@ namespace CalamityMod.Items.Weapons.Summon Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; - Item.value = Item.buyPrice(1, 40, 0, 0); - Item.rare = ItemRarityID.Red; - Item.Calamity().customRarity = CalamityRarity.PureGreen; + Item.value = CalamityGlobalItem.Rarity14BuyPrice; + Item.rare = ModContent.RarityType(); } public override void HoldItem(Player player) diff --git a/Items/Weapons/Summon/SpikecragStaff.cs b/Items/Weapons/Summon/SpikecragStaff.cs index 97326d4b47..ed853e80ef 100644 --- a/Items/Weapons/Summon/SpikecragStaff.cs +++ b/Items/Weapons/Summon/SpikecragStaff.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.autoReuse = true; Item.shootSpeed = 20f; diff --git a/Items/Weapons/Summon/SquirrelSquireStaff.cs b/Items/Weapons/Summon/SquirrelSquireStaff.cs index cb781e814b..3ca5677e19 100644 --- a/Items/Weapons/Summon/SquirrelSquireStaff.cs +++ b/Items/Weapons/Summon/SquirrelSquireStaff.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 0.5f; - Item.value = Item.buyPrice(0, 0, 50, 0); + Item.value = CalamityGlobalItem.Rarity0BuyPrice; Item.rare = ItemRarityID.White; Item.UseSound = SoundID.Item44; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/StaffoftheMechworm.cs b/Items/Weapons/Summon/StaffoftheMechworm.cs index 0825d967bb..b4b66e0da1 100644 --- a/Items/Weapons/Summon/StaffoftheMechworm.cs +++ b/Items/Weapons/Summon/StaffoftheMechworm.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using System.Linq; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -30,8 +31,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.noMelee = true; Item.knockBack = 2f; Item.value = CalamityGlobalItem.Rarity14BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.DarkBlue; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item113; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/StormjawStaff.cs b/Items/Weapons/Summon/StormjawStaff.cs index 1953f19c5b..2e2487d4ea 100644 --- a/Items/Weapons/Summon/StormjawStaff.cs +++ b/Items/Weapons/Summon/StormjawStaff.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.NPCDeath34; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/SunGodStaff.cs b/Items/Weapons/Summon/SunGodStaff.cs index ddfb3c81eb..136a7a3c9d 100644 --- a/Items/Weapons/Summon/SunGodStaff.cs +++ b/Items/Weapons/Summon/SunGodStaff.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 1.25f; - Item.value = Item.buyPrice(0, 48, 0, 0); + Item.value = CalamityGlobalItem.Rarity7BuyPrice; Item.rare = ItemRarityID.LightPurple; Item.UseSound = SoundID.Item44; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/TemporalUmbrella.cs b/Items/Weapons/Summon/TemporalUmbrella.cs index c9198d3169..09331bb955 100644 --- a/Items/Weapons/Summon/TemporalUmbrella.cs +++ b/Items/Weapons/Summon/TemporalUmbrella.cs @@ -1,9 +1,10 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -38,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.noMelee = true; Item.UseSound = SoundID.Item68; Item.value = CalamityGlobalItem.Rarity16BuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Weapons/Summon/UniverseSplitter.cs b/Items/Weapons/Summon/UniverseSplitter.cs index d6dcb55f9b..6062187123 100644 --- a/Items/Weapons/Summon/UniverseSplitter.cs +++ b/Items/Weapons/Summon/UniverseSplitter.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Items.SummonItems; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -46,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.noUseGraphic = true; Item.value = CalamityGlobalItem.RarityHotPinkBuyPrice; - Item.Calamity().customRarity = CalamityRarity.HotPink; + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } diff --git a/Items/Weapons/Summon/Vigilance.cs b/Items/Weapons/Summon/Vigilance.cs index 35a2b1a45a..77b1cb6074 100644 --- a/Items/Weapons/Summon/Vigilance.cs +++ b/Items/Weapons/Summon/Vigilance.cs @@ -1,7 +1,8 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -32,8 +33,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.DamageType = DamageClass.Summon; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Summon/VileFeeder.cs b/Items/Weapons/Summon/VileFeeder.cs index 492bb7d05d..70e478ba42 100644 --- a/Items/Weapons/Summon/VileFeeder.cs +++ b/Items/Weapons/Summon/VileFeeder.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 0.5f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item2; Item.autoReuse = true; diff --git a/Items/Weapons/Summon/ViridVanguard.cs b/Items/Weapons/Summon/ViridVanguard.cs index fce9e9ea58..95b8145f50 100644 --- a/Items/Weapons/Summon/ViridVanguard.cs +++ b/Items/Weapons/Summon/ViridVanguard.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Items.Materials; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Summon @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.UseSound = SoundID.Item71; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Summon/VoidConcentrationStaff.cs b/Items/Weapons/Summon/VoidConcentrationStaff.cs index 3b4bdec377..2678178442 100644 --- a/Items/Weapons/Summon/VoidConcentrationStaff.cs +++ b/Items/Weapons/Summon/VoidConcentrationStaff.cs @@ -1,8 +1,9 @@ -using Terraria.DataStructures; -using CalamityMod.Buffs.Summon; +using CalamityMod.Buffs.Summon; using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -36,8 +37,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Turquoise; + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Summon/WulfrumController.cs b/Items/Weapons/Summon/WulfrumController.cs index 950e494927..73fd3384f6 100644 --- a/Items/Weapons/Summon/WulfrumController.cs +++ b/Items/Weapons/Summon/WulfrumController.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.useStyle = ItemUseStyleID.HoldUp; Item.noMelee = true; Item.knockBack = 0.5f; - Item.value = Item.buyPrice(0, 1, 0, 0); + Item.value = CalamityGlobalItem.Rarity1BuyPrice; Item.rare = ItemRarityID.Blue; Item.UseSound = SoundID.Item15; //phaseblade sound effect Item.autoReuse = true; diff --git a/Items/Weapons/Summon/YharonsKindleStaff.cs b/Items/Weapons/Summon/YharonsKindleStaff.cs index 35d73976e1..46bff3bb0f 100644 --- a/Items/Weapons/Summon/YharonsKindleStaff.cs +++ b/Items/Weapons/Summon/YharonsKindleStaff.cs @@ -1,10 +1,11 @@ -using Terraria.DataStructures; -using CalamityMod.Projectiles.Summon; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Rarities; +using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Terraria; -using Terraria.ModLoader; +using Terraria.DataStructures; using Terraria.ID; -using CalamityMod.Sounds; +using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Summon { @@ -32,8 +33,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.noMelee = true; Item.knockBack = 7f; Item.value = CalamityGlobalItem.Rarity15BuyPrice; - Item.rare = ItemRarityID.Purple; - Item.Calamity().customRarity = CalamityRarity.Violet; + Item.rare = ModContent.RarityType(); Item.UseSound = CommonCalamitySounds.FlareSound; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Typeless/FiniteUse/Bazooka.cs b/Items/Weapons/Typeless/FiniteUse/Bazooka.cs index 57d76ee079..94a7426ca5 100644 --- a/Items/Weapons/Typeless/FiniteUse/Bazooka.cs +++ b/Items/Weapons/Typeless/FiniteUse/Bazooka.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 10f; - Item.value = Item.buyPrice(0, 36, 0, 0); + Item.value = CalamityGlobalItem.Rarity6BuyPrice; Item.rare = ItemRarityID.Pink; Item.UseSound = FireSound; Item.autoReuse = true; diff --git a/Items/Weapons/Typeless/FiniteUse/Hydra.cs b/Items/Weapons/Typeless/FiniteUse/Hydra.cs index f0a6c08f07..df3542f111 100644 --- a/Items/Weapons/Typeless/FiniteUse/Hydra.cs +++ b/Items/Weapons/Typeless/FiniteUse/Hydra.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 10f; - Item.value = Item.buyPrice(0, 80, 0, 0); + Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.UseSound = FireSound; Item.autoReuse = true; diff --git a/Items/Weapons/Typeless/FiniteUse/LightningHawk.cs b/Items/Weapons/Typeless/FiniteUse/LightningHawk.cs index 924cef71b1..8bbae3b121 100644 --- a/Items/Weapons/Typeless/FiniteUse/LightningHawk.cs +++ b/Items/Weapons/Typeless/FiniteUse/LightningHawk.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 8f; - Item.value = Item.buyPrice(0, 48, 0, 0); + Item.value = CalamityGlobalItem.Rarity7BuyPrice; Item.rare = ItemRarityID.LightPurple; Item.UseSound = Magnum.FireSound; Item.autoReuse = true; diff --git a/Items/Weapons/Typeless/FiniteUse/Magnum.cs b/Items/Weapons/Typeless/FiniteUse/Magnum.cs index 0bbe41d633..5f5348d35c 100644 --- a/Items/Weapons/Typeless/FiniteUse/Magnum.cs +++ b/Items/Weapons/Typeless/FiniteUse/Magnum.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 8f; - Item.value = Item.buyPrice(0, 2, 0, 0); + Item.value = CalamityGlobalItem.Rarity2BuyPrice; Item.rare = ItemRarityID.Green; Item.UseSound = FireSound; Item.autoReuse = true; diff --git a/Items/Weapons/Typeless/GoldenGun.cs b/Items/Weapons/Typeless/GoldenGun.cs index 7c3dd14448..463102c246 100644 --- a/Items/Weapons/Typeless/GoldenGun.cs +++ b/Items/Weapons/Typeless/GoldenGun.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Typeless Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 4, 0, 0); + Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item11; Item.autoReuse = true; diff --git a/Items/Weapons/Typeless/Skynamite.cs b/Items/Weapons/Typeless/Skynamite.cs index d198da3097..ec55cbf8bc 100644 --- a/Items/Weapons/Typeless/Skynamite.cs +++ b/Items/Weapons/Typeless/Skynamite.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Typeless Item.noMelee = true; Item.noUseGraphic = true; Item.UseSound = SoundID.Item1; - Item.value = Item.buyPrice(0, 0, 40, 0); // Crafted 10 at a time + Item.value = CalamityGlobalItem.Rarity3BuyPrice / 10; // Crafted 10 at a time Item.rare = ItemRarityID.Orange; } diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index 044cf6e309..0ccb3875e2 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -1379,24 +1379,6 @@ namespace CalamityMod public static bool DisableAllDodges(bool disable) => Main.LocalPlayer.Calamity().disableAllDodges = disable; #endregion - #region Item Rarity - public static int GetCalamityRarity(Item item) - { - CalamityGlobalItem cgi = item.Calamity(); - CalamityRarity calrare = cgi.customRarity; - if (calrare == CalamityRarity.NoEffect) - return item.rare; - return (int)calrare; - } - - public static bool SetCalamityRarity(Item item, int rarityNum) - { - CalamityGlobalItem cgi = item.Calamity(); - cgi.customRarity = (CalamityRarity)rarityNum; - return cgi.customRarity != CalamityRarity.NoEffect; - } - #endregion - #region Summoner Cross Class Nerf Disabling public static bool SetSummonerNerfDisabledByMinion(int type, bool disableNerf) { @@ -1655,35 +1637,6 @@ namespace CalamityMod return new ArgumentNullException("ERROR: Must specify a bool."); return DisableAllDodges(disableDodges); - case "GetRarity": - case "GetItemRarity": - case "GetCalamityRarity": - case "GetPostMLRarity": - case "GetPostMoonLordRarity": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify an Item."); - if (!(args[1] is Item)) - return new ArgumentException("ERROR: The first argument to \"GetCalamityRarity\" must be an Item."); - Item itemToGet = (Item)args[1]; - return GetCalamityRarity(itemToGet); - - case "SetRarity": - case "SetItemRarity": - case "SetCalamityRarity": - case "SetPostMLRarity": - case "SetPostMoonLordRarity": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify both an Item and desired rarity as an int or short ID."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify desired rarity as an int or short ID."); - if (!castID(args[2], out int rarity)) - return new ArgumentException("ERROR: The second argument to \"SetCalamityRarity\" must be an int or short ID."); - if (!(args[1] is Item)) - return new ArgumentException("ERROR: The first argument to \"SetCalamityRarity\" must be an Item."); - - Item itemToSet = (Item)args[1]; - return SetCalamityRarity(itemToSet, rarity); - case "AcidRainActive": case "IsAcidRainActive": case "GetAcidRainActive": diff --git a/NPCs/Abyss/DevilFish.cs b/NPCs/Abyss/DevilFish.cs index dda4ba5d09..ff79ca84d0 100644 --- a/NPCs/Abyss/DevilFish.cs +++ b/NPCs/Abyss/DevilFish.cs @@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.Abyss bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A sturdy fish, which has spent a long time seething in the Abyss. Males are easily identified by their forward-facing horns, and females by their curled horns.") + new FlavorTextBestiaryInfoElement("A sturdy fish, which has spent a long time seething in the Abyss. Males are easily identified by their forward-facing horns.") }); } diff --git a/NPCs/Abyss/DevilFishAlt.cs b/NPCs/Abyss/DevilFishAlt.cs index a348ebf5bb..3cb05235ec 100644 --- a/NPCs/Abyss/DevilFishAlt.cs +++ b/NPCs/Abyss/DevilFishAlt.cs @@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.Abyss bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { // Will move to localization whenever that is cleaned up. - new FlavorTextBestiaryInfoElement("A sturdy fish, which has spent a long time seething in the Abyss. Males are easily identified by their forward-facing horns, and females by their curled horns.") + new FlavorTextBestiaryInfoElement("A sturdy fish, which has spent a long time seething in the Abyss. Females are easily identified by their curled horns.") }); } diff --git a/Rarities/CalamityRed.cs b/Rarities/CalamityRed.cs new file mode 100644 index 0000000000..97cb162adb --- /dev/null +++ b/Rarities/CalamityRed.cs @@ -0,0 +1,21 @@ +using Microsoft.Xna.Framework; +using Terraria.ModLoader; + +namespace CalamityMod.Rarities +{ + public class CalamityRed : ModRarity + { + // Calamity Red is Rarity 17 + // This rarity should never be assigned to any items. + // It is the equivalent of vanilla's Purple rarity (11): only used for positive reforges on top-rarity items. + public override Color RarityColor => new Color(163, 25, 26); // #A3191A + // (139, 0, 0) is the classic donator item color + + public override int GetPrefixedRarity(int offset, float valueMult) => offset switch + { + -2 => ModContent.RarityType(), + -1 => ModContent.RarityType(), + _ => Type, + }; + } +} diff --git a/Rarities/DarkBlue.cs b/Rarities/DarkBlue.cs new file mode 100644 index 0000000000..24596eec7a --- /dev/null +++ b/Rarities/DarkBlue.cs @@ -0,0 +1,20 @@ +using Microsoft.Xna.Framework; +using Terraria.ModLoader; + +namespace CalamityMod.Rarities +{ + public class DarkBlue : ModRarity + { + // Dark Blue is Rarity 14 + public override Color RarityColor => new Color(43, 96, 222); + + public override int GetPrefixedRarity(int offset, float valueMult) => offset switch + { + -2 => ModContent.RarityType(), + -1 => ModContent.RarityType(), + 1 => ModContent.RarityType(), + 2 => ModContent.RarityType(), + _ => Type, + }; + } +} diff --git a/Rarities/DarkOrange.cs b/Rarities/DarkOrange.cs new file mode 100644 index 0000000000..e7a2b677a3 --- /dev/null +++ b/Rarities/DarkOrange.cs @@ -0,0 +1,11 @@ +using Microsoft.Xna.Framework; +using Terraria.ModLoader; + +namespace CalamityMod.Rarities +{ + // Draedon's Arsenal "Rust" / "Bronze" rarity + public class DarkOrange : ModRarity + { + public override Color RarityColor => new Color(204, 71, 35); + } +} diff --git a/Rarities/HotPink.cs b/Rarities/HotPink.cs new file mode 100644 index 0000000000..938fdfe59c --- /dev/null +++ b/Rarities/HotPink.cs @@ -0,0 +1,20 @@ +using Microsoft.Xna.Framework; +using Terraria.ModLoader; + +namespace CalamityMod.Rarities +{ + public class HotPink : ModRarity + { + // Hot Pink is Rarity 16 + public override Color RarityColor => new Color(255, 0, 255); + + public override int GetPrefixedRarity(int offset, float valueMult) => offset switch + { + -2 => ModContent.RarityType(), + -1 => ModContent.RarityType(), + 1 => ModContent.RarityType(), + 2 => ModContent.RarityType(), + _ => Type, + }; + } +} diff --git a/Rarities/PureGreen.cs b/Rarities/PureGreen.cs new file mode 100644 index 0000000000..958ace0025 --- /dev/null +++ b/Rarities/PureGreen.cs @@ -0,0 +1,21 @@ +using Microsoft.Xna.Framework; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Rarities +{ + public class PureGreen : ModRarity + { + // Pure Green is Rarity 13 + public override Color RarityColor => new Color(0, 255, 0); + + public override int GetPrefixedRarity(int offset, float valueMult) => offset switch + { + -2 => ItemRarityID.Purple, + -1 => ModContent.RarityType(), + 1 => ModContent.RarityType(), + 2 => ModContent.RarityType(), + _ => Type, + }; + } +} diff --git a/Rarities/Rainbow.cs b/Rarities/Rainbow.cs new file mode 100644 index 0000000000..af84446b62 --- /dev/null +++ b/Rarities/Rainbow.cs @@ -0,0 +1,14 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Rarities +{ + // Heart of the Elements, The Community and Elemental Excalibur are Rainbow for decoration + // TODO -- this should be changed to be a color override + // it's only used for a few items and is purely decorative + public class Rainbow : ModRarity + { + public override Color RarityColor => new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + } +} diff --git a/Rarities/Turquoise.cs b/Rarities/Turquoise.cs new file mode 100644 index 0000000000..afc59dcb4e --- /dev/null +++ b/Rarities/Turquoise.cs @@ -0,0 +1,21 @@ +using Microsoft.Xna.Framework; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Rarities +{ + public class Turquoise : ModRarity + { + // Turquoise is Rarity 12 + public override Color RarityColor => new Color(0, 255, 200); + + public override int GetPrefixedRarity(int offset, float valueMult) => offset switch + { + -2 => ItemRarityID.Red, + -1 => ItemRarityID.Purple, + 1 => ModContent.RarityType(), + 2 => ModContent.RarityType(), + _ => Type, + }; + } +} diff --git a/Rarities/Violet.cs b/Rarities/Violet.cs new file mode 100644 index 0000000000..4aeb617b1b --- /dev/null +++ b/Rarities/Violet.cs @@ -0,0 +1,20 @@ +using Microsoft.Xna.Framework; +using Terraria.ModLoader; + +namespace CalamityMod.Rarities +{ + public class Violet : ModRarity + { + // Violet is Rarity 15 + public override Color RarityColor => new Color(108, 45, 199); + + public override int GetPrefixedRarity(int offset, float valueMult) => offset switch + { + -2 => ModContent.RarityType(), + -1 => ModContent.RarityType(), + 1 => ModContent.RarityType(), + 2 => ModContent.RarityType(), + _ => Type, + }; + } +} diff --git a/Utilities/ItemUtils.cs b/Utilities/ItemUtils.cs index 2e0750b745..7dcb400111 100644 --- a/Utilities/ItemUtils.cs +++ b/Utilities/ItemUtils.cs @@ -27,64 +27,9 @@ namespace CalamityMod /// The item to check. public static bool IsWhip(this Item item) => item.shoot > ProjectileID.None && ProjectileID.Sets.IsAWhip[item.shoot]; - #region Item Rarity Utilities - internal const int TurquoiseRarityValue = 12; - internal static readonly Color TurquoiseRarityColor = new Color(0, 255, 200); - internal const int PureGreenRarityValue = 13; - internal static readonly Color PureGreenRarityColor = new Color(0, 255, 0); - internal const int DarkBlueRarityValue = 14; - internal static readonly Color DarkBlueRarityColor = new Color(43, 96, 222); - internal const int VioletRarityValue = 15; - internal static readonly Color VioletRarityColor = new Color(108, 45, 199); - internal const int HotPinkRarityValue = 16; - internal static readonly Color HotPinkRarityColor = new Color(255, 0, 255); - internal const int RainbowRarityValue = 30; - // The rainbow rarity has an ever-shifting color, not a stored constant - internal const int DraedonRustRarityValue = 33; - internal static readonly Color DraedonRustRarityColor = new Color(204, 71, 35); - // The donator rarity isn't technically a rarity, but is a constant color used in tooltips + #region Color Constants + internal static readonly Color DevItemColor = new Color(255, 0, 255); internal static readonly Color DonatorItemColor = new Color(139, 0, 0); - - public static readonly CalamityRarity[] postMLRarities = - { - CalamityRarity.Turquoise, - CalamityRarity.PureGreen, - CalamityRarity.DarkBlue, - CalamityRarity.Violet, - CalamityRarity.HotPink - }; - - public static bool IsPostML(this CalamityRarity calrare) - { - for(int i = 0; i < postMLRarities.Length; ++i) - if (postMLRarities[i] == calrare) - return true; - return false; - } - - public static Color? GetRarityColor(CalamityRarity calrare) - { - switch (calrare) - { - default: - return null; - case CalamityRarity.Turquoise: - return TurquoiseRarityColor; - case CalamityRarity.PureGreen: - return PureGreenRarityColor; - case CalamityRarity.DarkBlue: - return DarkBlueRarityColor; - case CalamityRarity.Violet: - return VioletRarityColor; - case CalamityRarity.HotPink: - return HotPinkRarityColor; - - case CalamityRarity.Rainbow: - return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); - case CalamityRarity.DraedonRust: - return DraedonRustRarityColor; - } - } #endregion // TODO -- This probably isn't the best place to put this but it needs to be somewhere easily accessible.