diff --git a/Buffs/Pets/RotomBuff.cs b/Buffs/Pets/RotomBuff.cs index a3fc3e925d..e667577316 100644 --- a/Buffs/Pets/RotomBuff.cs +++ b/Buffs/Pets/RotomBuff.cs @@ -21,10 +21,7 @@ namespace CalamityMod.Buffs.Pets bool PetProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; if (PetProjectileNotSpawned && player.whoAmI == Main.myPlayer) { - float baseDamage = 10f + - (Main.hardMode ? 10f : 0f) + - (NPC.downedMoonlord ? 30f : 0f); - Projectile.NewProjectile(player.position.X + (player.width / 2), player.position.Y + (player.height / 2), 0f, 0f, ModContent.ProjectileType(), (int)(baseDamage * (player.allDamage + player.minionDamage - 1f)), 0f, player.whoAmI, 50f, 0f); + Projectile.NewProjectile(player.position.X + (player.width / 2), player.position.Y + (player.height / 2), 0f, 0f, ModContent.ProjectileType(), 0, 0f, player.whoAmI, 50f, 0f); } } } diff --git a/Buffs/Pets/SCalPetBuff.cs b/Buffs/Pets/SCalPetBuff.cs new file mode 100644 index 0000000000..bef829c02f --- /dev/null +++ b/Buffs/Pets/SCalPetBuff.cs @@ -0,0 +1,28 @@ +using CalamityMod.Projectiles.Pets; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Pets +{ + public class SCalPetBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Supreme Calamitas"); + Description.SetDefault("Watching over you with supreme calamitous energy... How adorable"); + Main.buffNoTimeDisplay[Type] = true; + Main.vanityPet[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.buffTime[buffIndex] = 18000; + player.Calamity().scalPet = true; + bool PetProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; + if (PetProjectileNotSpawned && player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(player.position.X + (player.width / 2), player.position.Y + (player.height / 2), 0f, 0f, ModContent.ProjectileType(), 0, 0f, player.whoAmI, 50f, 0f); + } + } + } +} diff --git a/Buffs/Pets/SCalPetBuff.png b/Buffs/Pets/SCalPetBuff.png new file mode 100644 index 0000000000..ccce6a3ad1 Binary files /dev/null and b/Buffs/Pets/SCalPetBuff.png differ diff --git a/Buffs/Potions/TeslaBuff.cs b/Buffs/Potions/TeslaBuff.cs index 4f8fc7fc39..3aabc48ec8 100644 --- a/Buffs/Potions/TeslaBuff.cs +++ b/Buffs/Potions/TeslaBuff.cs @@ -1,5 +1,4 @@ using CalamityMod.CalPlayer; -using CalamityMod.Projectiles.Typeless; using Terraria; using Terraria.ModLoader; @@ -17,14 +16,6 @@ namespace CalamityMod.Buffs.Potions longerExpertDebuff = false; } - public override void Update(NPC npc, ref int buffIndex) - { - if (npc.Calamity().tesla < npc.buffTime[buffIndex]) - npc.Calamity().tesla = npc.buffTime[buffIndex]; - npc.DelBuff(buffIndex); - buffIndex--; - } - public override void Update(Player player, ref int buffIndex) { player.Calamity().tesla = true; diff --git a/Buffs/StatDebuffs/TeslaFreeze.cs b/Buffs/StatDebuffs/TeslaFreeze.cs new file mode 100644 index 0000000000..f270835445 --- /dev/null +++ b/Buffs/StatDebuffs/TeslaFreeze.cs @@ -0,0 +1,32 @@ +using CalamityMod.CalPlayer; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.StatDebuffs +{ + public class TeslaFreeze : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Galvanic Corrosion"); + Description.SetDefault("Your limbs have begun to corrode"); + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = false; + longerExpertDebuff = false; + } + + public override void Update(NPC npc, ref int buffIndex) + { + if (npc.Calamity().tesla < npc.buffTime[buffIndex]) + npc.Calamity().tesla = npc.buffTime[buffIndex]; + npc.DelBuff(buffIndex); + buffIndex--; + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().teslaFreeze = true; + } + } +} diff --git a/Buffs/StatDebuffs/TeslaFreeze.png b/Buffs/StatDebuffs/TeslaFreeze.png new file mode 100644 index 0000000000..97136a54fe Binary files /dev/null and b/Buffs/StatDebuffs/TeslaFreeze.png differ diff --git a/Buffs/Summon/AstrageldonBuff.cs b/Buffs/Summon/AstrageldonBuff.cs new file mode 100644 index 0000000000..a482975266 --- /dev/null +++ b/Buffs/Summon/AstrageldonBuff.cs @@ -0,0 +1,36 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Summon; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Summon +{ + public class AstrageldonBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Astral Jelly"); + Description.SetDefault("The mini astrageldon slime will protect you"); + Main.buffNoTimeDisplay[Type] = true; + Main.buffNoSave[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.Calamity(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) + { + modPlayer.aSlime = true; + } + if (!modPlayer.aSlime) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} diff --git a/Buffs/Summon/AstrageldonBuff.png b/Buffs/Summon/AstrageldonBuff.png new file mode 100644 index 0000000000..84a4ca48ad Binary files /dev/null and b/Buffs/Summon/AstrageldonBuff.png differ diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 0b609069f6..ba6cba7941 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1,4 +1,3 @@ -using CalamityMod; using CalamityMod.Buffs; using CalamityMod.Buffs.Cooldowns; using CalamityMod.Buffs.DamageOverTime; @@ -6,9 +5,9 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; -using CalamityMod.Items.Armor; using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; +using CalamityMod.Items.Armor; using CalamityMod.Items.DifficultyItems; using CalamityMod.Items.Fishing.BrimstoneCragCatches; using CalamityMod.Items.Mounts; @@ -16,7 +15,6 @@ using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; -using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs; using CalamityMod.NPCs.Calamitas; @@ -47,7 +45,6 @@ using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; using Terraria.ModLoader.IO; -using Terraria.ModLoader.Config; namespace CalamityMod.CalPlayer { @@ -112,6 +109,9 @@ namespace CalamityMod.CalPlayer public int pissWaterBoost = 0; public int gaelRageCooldown = 0; public int packetTimer = 0; + public int navyRodAuraTimer = 0; + public int brimLoreInfernoTimer = 0; + public int tarraLifeAuraTimer = 0; public int bloodflareHeartTimer = 180; public int bloodflareManaTimer = 180; public int moneyStolenByBandit = 0; @@ -190,6 +190,7 @@ namespace CalamityMod.CalPlayer public bool astrophage = false; public bool babyGhostBell = false; public bool radiator = false; + public bool scalPet = false; // Rage public int stressMax = 10000; @@ -600,6 +601,7 @@ namespace CalamityMod.CalPlayer public bool draconicSurge = false; public bool draconicSurgeCooldown = false; public bool tesla = false; + public bool teslaFreeze = false; public bool baguette = false; public bool vodka = false; public bool redWine = false; @@ -648,6 +650,7 @@ namespace CalamityMod.CalPlayer public bool cEyes = false; public bool cSlime = false; public bool cSlime2 = false; + public bool aSlime = false; public bool bStar = false; public bool aStar = false; public bool SP = false; @@ -1004,6 +1007,7 @@ namespace CalamityMod.CalPlayer astrophage = false; babyGhostBell = false; radiator = false; + scalPet = false; onyxExcavator = false; angryDog = false; fab = false; @@ -1354,6 +1358,7 @@ namespace CalamityMod.CalPlayer draconicSurge = false; draconicSurgeCooldown = false; tesla = false; + teslaFreeze = false; baguette = false; trippy = false; amidiasBlessing = false; @@ -1415,6 +1420,7 @@ namespace CalamityMod.CalPlayer cEyes = false; cSlime = false; cSlime2 = false; + aSlime = false; bStar = false; aStar = false; SP = false; @@ -1622,6 +1628,7 @@ namespace CalamityMod.CalPlayer holyWrath = false; profanedRage = false; tesla = false; + teslaFreeze = false; baguette = false; draconicSurge = false; draconicSurgeCooldown = false; @@ -4751,8 +4758,7 @@ namespace CalamityMod.CalPlayer { if (heldItem.type > 0) { - if ((heldItem.summon && !heldItem.melee && !heldItem.ranged && !heldItem.magic && !heldItem.Calamity().rogue) || - heldItem.hammer > 0 || heldItem.pick > 0 || heldItem.axe > 0) + if (heldItem.summon && !heldItem.melee && !heldItem.ranged && !heldItem.magic && !heldItem.Calamity().rogue) { damageMult += 0.1; } diff --git a/CalPlayer/CalamityPlayerFishing.cs b/CalPlayer/CalamityPlayerFishing.cs index 482c9834ef..28884275ea 100644 --- a/CalPlayer/CalamityPlayerFishing.cs +++ b/CalPlayer/CalamityPlayerFishing.cs @@ -32,20 +32,47 @@ namespace CalamityMod.CalPlayer bool honey = liquidType == 2; Point point = player.Center.ToTileCoordinates(); - bool abyssPosX = false; + bool canSulphurFish = false; if (CalamityWorld.abyssSide) { if (point.X < 380) - abyssPosX = true; + canSulphurFish = true; } else { if (point.X > Main.maxTilesX - 380) - abyssPosX = true; + canSulphurFish = true; } if (modPlayer.ZoneAbyss || modPlayer.ZoneSulphur) - abyssPosX = true; + canSulphurFish = true; + + // Quest Fish + if (modPlayer.ZoneSunkenSea && questFish == ModContent.ItemType() && Main.rand.NextBool(10)) + { + caughtType = ModContent.ItemType(); + return; + } + if (modPlayer.ZoneSunkenSea && questFish == ModContent.ItemType() && Main.rand.NextBool(10)) + { + caughtType = ModContent.ItemType(); + return; + } + if (modPlayer.ZoneSunkenSea && questFish == ModContent.ItemType() && Main.rand.NextBool(10)) + { + caughtType = ModContent.ItemType(); + return; + } + if (modPlayer.ZoneCalamity && questFish == ModContent.ItemType() && Main.rand.NextBool(10)) + { + caughtType = ModContent.ItemType(); + return; + } + if (modPlayer.ZoneCalamity && questFish == ModContent.ItemType() && Main.rand.NextBool(10)) + { + caughtType = ModContent.ItemType(); + return; + } if (modPlayer.alluringBait) { @@ -183,7 +210,7 @@ namespace CalamityMod.CalPlayer { List rareItemList = new List(); - if (abyssPosX) + if (canSulphurFish) { switch (Main.rand.Next(2)) { @@ -262,7 +289,7 @@ namespace CalamityMod.CalPlayer { biomeCrateList.Add(ModContent.ItemType()); } - if (abyssPosX) + if (canSulphurFish) { biomeCrateList.Add(ModContent.ItemType()); } @@ -314,6 +341,10 @@ namespace CalamityMod.CalPlayer if (water) { + if (caughtType == ItemID.WoodenCrate || caughtType == ItemID.IronCrate || caughtType == ItemID.GoldenCrate || caughtType == ItemID.FrogLeg || caughtType == ItemID.BalloonPufferfish || caughtType == ItemID.ZephyrFish) + { + return; + } if ((player.ZoneCrimson || player.ZoneCorrupt) && player.ZoneRockLayerHeight && Main.hardMode) { if (Main.rand.NextBool(15)) @@ -385,31 +416,7 @@ namespace CalamityMod.CalPlayer if (modPlayer.ZoneAstral) // Astral Infection, fishing in water { int astralFish = Main.rand.Next(100); - if (caughtType == ItemID.WoodenCrate) - { - caughtType = ItemID.WoodenCrate; - } - else if (caughtType == ItemID.IronCrate) - { - caughtType = ItemID.IronCrate; - } - else if (caughtType == ItemID.GoldenCrate) - { - caughtType = ItemID.GoldenCrate; - } - else if (caughtType == ItemID.FrogLeg) - { - caughtType = ItemID.FrogLeg; - } - else if (caughtType == ItemID.BalloonPufferfish) - { - caughtType = ItemID.BalloonPufferfish; - } - else if (caughtType == ItemID.ZephyrFish) - { - caughtType = ItemID.ZephyrFish; - } - else if (astralFish >= 85) // 15% + if (astralFish >= 85) // 15% { caughtType = ModContent.ItemType(); } @@ -444,37 +451,14 @@ namespace CalamityMod.CalPlayer else // 31% w/o crate pot, 21% w/ crate pot { caughtType = ModContent.ItemType(); + return; } } if (modPlayer.ZoneSunkenSea) // Sunken Sea, fishing in water { int sunkenFish = Main.rand.Next(100); - if (caughtType == ItemID.WoodenCrate) - { - caughtType = ItemID.WoodenCrate; - } - else if (caughtType == ItemID.IronCrate) - { - caughtType = ItemID.IronCrate; - } - else if (caughtType == ItemID.GoldenCrate) - { - caughtType = ItemID.GoldenCrate; - } - else if (caughtType == ItemID.FrogLeg) - { - caughtType = ItemID.FrogLeg; - } - else if (caughtType == ItemID.BalloonPufferfish) - { - caughtType = ItemID.BalloonPufferfish; - } - else if (caughtType == ItemID.ZephyrFish) - { - caughtType = ItemID.ZephyrFish; - } - else if (sunkenFish >= 85 && Main.hardMode) // 15% + if (sunkenFish >= 85 && Main.hardMode) // 15% { caughtType = ModContent.ItemType(); } @@ -513,6 +497,7 @@ namespace CalamityMod.CalPlayer else // 33% w/o crate pot, 23% w/ crate pot + 18% if prehardmode { caughtType = ModContent.ItemType(); + return; } } @@ -523,14 +508,14 @@ namespace CalamityMod.CalPlayer if (junk) { - if (abyssPosX && power < 40) + if (canSulphurFish && power < 40) { caughtType = ModContent.ItemType(); } return; } - /*if (abyssPosX && (bait.type == ItemID.GoldWorm || bait.type == ItemID.GoldGrasshopper || bait.type == ItemID.GoldButterfly) && power > 150) + /*if (canSulphurFish && (bait.type == ItemID.GoldWorm || bait.type == ItemID.GoldGrasshopper || bait.type == ItemID.GoldButterfly) && power > 150) { if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -550,33 +535,9 @@ namespace CalamityMod.CalPlayer return; }*/ - if (abyssPosX) + if (canSulphurFish) { - if (caughtType == ItemID.WoodenCrate) - { - caughtType = ItemID.WoodenCrate; - } - else if (caughtType == ItemID.IronCrate) - { - caughtType = ItemID.IronCrate; - } - else if (caughtType == ItemID.GoldenCrate) - { - caughtType = ItemID.GoldenCrate; - } - else if (caughtType == ItemID.FrogLeg) - { - caughtType = ItemID.FrogLeg; - } - else if (caughtType == ItemID.BalloonPufferfish) - { - caughtType = ItemID.BalloonPufferfish; - } - else if (caughtType == ItemID.ZephyrFish) - { - caughtType = ItemID.ZephyrFish; - } - else if (power >= 40) + if (power >= 40) { if (Main.rand.NextBool(15) && power < 80) { @@ -588,7 +549,7 @@ namespace CalamityMod.CalPlayer } if (power >= 110) { - if (abyssPosX && Main.rand.NextBool(25) && power < 240) + if (Main.rand.NextBool(25) && power < 240) { caughtType = ModContent.ItemType(); } @@ -660,28 +621,6 @@ namespace CalamityMod.CalPlayer } } } - - // Quest Fish - if (modPlayer.ZoneSunkenSea && questFish == ModContent.ItemType() && Main.rand.NextBool(10)) - { - caughtType = ModContent.ItemType(); - } - if (modPlayer.ZoneSunkenSea && questFish == ModContent.ItemType() && Main.rand.NextBool(10)) - { - caughtType = ModContent.ItemType(); - } - if (modPlayer.ZoneSunkenSea && questFish == ModContent.ItemType() && Main.rand.NextBool(10)) - { - caughtType = ModContent.ItemType(); - } - if (modPlayer.ZoneCalamity && questFish == ModContent.ItemType() && Main.rand.NextBool(10)) - { - caughtType = ModContent.ItemType(); - } - if (modPlayer.ZoneCalamity && questFish == ModContent.ItemType() && Main.rand.NextBool(10)) - { - caughtType = ModContent.ItemType(); - } } #endregion diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 6a15157e1e..d81517cfe9 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1,8 +1,5 @@ -using CalamityMod; -using CalamityMod.Buffs.Alcohol; -using CalamityMod.Buffs.Cooldowns; +using CalamityMod.Buffs.Cooldowns; using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.Pets; using CalamityMod.Buffs.Potions; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; @@ -14,6 +11,7 @@ using CalamityMod.Items.Fishing.FishingRods; using CalamityMod.NPCs; using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.Astral; +using CalamityMod.NPCs.Crags; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.Projectiles.Boss; @@ -30,11 +28,10 @@ using Terraria; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -using Terraria.ModLoader.Config; namespace CalamityMod.CalPlayer { - public class CalamityPlayerMiscEffects + public class CalamityPlayerMiscEffects { #region Post Update Misc Effects public static void CalamityPostUpdateMiscEffects(Player player, Mod mod) @@ -1138,7 +1135,7 @@ namespace CalamityMod.CalPlayer { player.moveSpeed += 0.05f; player.jumpSpeedBoost += player.autoJump ? 0f : 0.1f; - player.statDefense -= 5; + player.statDefense -= 3; } if (modPlayer.desertScourgeLore) { @@ -2543,7 +2540,10 @@ namespace CalamityMod.CalPlayer player.statDefense -= AbyssalFlames.DefenseReduction; if (modPlayer.gsInferno) + { + player.blackout = true; player.statDefense -= GodSlayerInferno.DefenseReduction; + } if (modPlayer.astralInfection) player.statDefense -= AstralInfectionDebuff.DefenseReduction; @@ -2609,7 +2609,7 @@ namespace CalamityMod.CalPlayer player.velocity.X = 0f; } - if (modPlayer.vaporfied) + if (modPlayer.vaporfied || modPlayer.teslaFreeze) { player.velocity.Y *= 0.98f; player.velocity.X *= 0.98f; @@ -2899,96 +2899,108 @@ namespace CalamityMod.CalPlayer } } + #region Damage Auras + // Tarragon Summon set bonus life aura if (modPlayer.tarraSummon) { - int lifeCounter = 0; - float num2 = 300f; - bool flag = lifeCounter % 60 == 0; - int num3 = 200; + const int FramesPerHit = 60; - if (player.whoAmI == Main.myPlayer) + // Constantly increment the timer every frame. + modPlayer.tarraLifeAuraTimer = (modPlayer.tarraLifeAuraTimer + 1) % FramesPerHit; + + // If the timer rolls over, it's time to deal damage. Only run this code for the client which is wearing the armor. + if (modPlayer.tarraLifeAuraTimer == 0 && player.whoAmI == Main.myPlayer) { - for (int l = 0; l < 200; l++) + const int BaseDamage = 200; + int damage = (int)(BaseDamage * (player.allDamage + player.minionDamage - 1f)); + float range = 300f; + + for (int i = 0; i < Main.maxNPCs; ++i) { - NPC nPC = Main.npc[l]; - if (nPC.active && !nPC.friendly && nPC.damage > 0 && !nPC.dontTakeDamage && Vector2.Distance(player.Center, nPC.Center) <= num2) - { - if (flag) - { - nPC.StrikeNPC(num3, 0f, 0, false, false, false); - if (Main.netMode != NetmodeID.SinglePlayer) - NetMessage.SendData(28, -1, -1, null, l, (float)num3, 0f, 0f, 0, 0, 0); - } - } + NPC nPC = Main.npc[i]; + if (!nPC.active || nPC.friendly || nPC.damage <= 0 || nPC.dontTakeDamage) + continue; + + if (Vector2.Distance(player.Center, nPC.Center) <= range) + Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, player.whoAmI, i); } } - - if (lifeCounter >= 180) - lifeCounter = 0; - lifeCounter++; } + // Navy Fishing Rod's electric aura when in-use if (player.inventory[player.selectedItem].type == ModContent.ItemType() && player.ownedProjectileCounts[ModContent.ProjectileType()] != 0) { - int auraCounter = 0; - float num2 = 200f; - bool flag = auraCounter % 120 == 0; - int num3 = 10; + const int FramesPerHit = 120; - if (player.whoAmI == Main.myPlayer) + // Constantly increment the timer every frame. + modPlayer.navyRodAuraTimer = (modPlayer.navyRodAuraTimer + 1) % FramesPerHit; + + // If the timer rolls over, it's time to deal damage. Only run this code for the client which is holding the fishing rod, + if (modPlayer.navyRodAuraTimer == 0 && player.whoAmI == Main.myPlayer) { - for (int l = 0; l < 200; l++) + const int BaseDamage = 10; + int damage = (int)(BaseDamage * player.allDamage); + float range = 200f; + + for (int i = 0; i < Main.maxNPCs; ++i) { - NPC nPC = Main.npc[l]; - if (nPC.active && !nPC.friendly && nPC.damage > 0 && !nPC.dontTakeDamage && Vector2.Distance(player.Center, nPC.Center) <= num2) + NPC nPC = Main.npc[i]; + if (!nPC.active || nPC.friendly || nPC.damage <= 0 || nPC.dontTakeDamage) + continue; + + if (Vector2.Distance(player.Center, nPC.Center) <= range) + Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, player.whoAmI, i); + + // Occasionally spawn cute sparks so it looks like an electrical aura + if (Main.rand.NextBool(10)) { - if (flag) - { - nPC.StrikeNPC(num3, 0f, 0, false, false, false); - if (Main.netMode != NetmodeID.SinglePlayer) - NetMessage.SendData(28, -1, -1, null, l, (float)num3, 0f, 0f, 0, 0, 0); + Vector2 value15 = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51)); + while (value15.X == 0f && value15.Y == 0f) + value15 = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51)); - Vector2 value15 = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51)); - while (value15.X == 0f && value15.Y == 0f) - value15 = new Vector2((float)Main.rand.Next(-50, 51), (float)Main.rand.Next(-50, 51)); - - value15.Normalize(); - value15 *= (float)Main.rand.Next(30, 61) * 0.1f; - int num17 = Projectile.NewProjectile(nPC.Center.X, nPC.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), 5, 0f, player.whoAmI, 0f, 0f); - Main.projectile[num17].melee = false; - Main.projectile[num17].localNPCHitCooldown = -1; - } + value15.Normalize(); + value15 *= (float)Main.rand.Next(30, 61) * 0.1f; + int spark = Projectile.NewProjectile(nPC.Center.X, nPC.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), damage / 2, 0f, player.whoAmI, 0f, 0f); + Main.projectile[spark].melee = false; + Main.projectile[spark].localNPCHitCooldown = -2; + Main.projectile[spark].penetrate = 5; } } } - - if (auraCounter >= 360) - auraCounter = 0; - auraCounter++; } + // Brimstone Elemental lore inferno potion boost if (modPlayer.brimstoneElementalLore && player.inferno) { - int num = ModContent.BuffType(); - float num2 = 300f; - bool flag = player.infernoCounter % 30 == 0; - int damage = 50; + const int FramesPerHit = 30; + // Constantly increment the timer every frame. + modPlayer.brimLoreInfernoTimer = (modPlayer.brimLoreInfernoTimer + 1) % FramesPerHit; + + // Only run this code for the client which is wearing the armor. + // Brimstone flames is applied every single frame, but direct damage is only dealt twice per second. if (player.whoAmI == Main.myPlayer) { - for (int l = 0; l < 200; l++) + const int BaseDamage = 50; + int damage = (int)(BaseDamage * player.allDamage); + float range = 300f; + + for (int i = 0; i < Main.maxNPCs; ++i) { - NPC nPC = Main.npc[l]; - if (nPC.active && !nPC.friendly && nPC.damage > 0 && !nPC.dontTakeDamage && Vector2.Distance(player.Center, nPC.Center) <= num2) + NPC nPC = Main.npc[i]; + if (!nPC.active || nPC.friendly || nPC.damage <= 0 || nPC.dontTakeDamage) + continue; + + if (Vector2.Distance(player.Center, nPC.Center) <= range) { - if (nPC.FindBuffIndex(num) == -1 && !nPC.buffImmune[num]) - nPC.AddBuff(num, 120, false); - if (flag) - player.ApplyDamageToNPC(nPC, damage, 0f, 0, false); + nPC.AddBuff(ModContent.BuffType(), 120); + if (modPlayer.brimLoreInfernoTimer == 0) + Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, player.whoAmI, i); } } } } + #endregion if (modPlayer.royalGel) { diff --git a/CalamityMod.cs b/CalamityMod.cs index fadeee88b7..5835116754 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1412,7 +1412,8 @@ namespace CalamityMod ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), - ModContent.NPCType() + ModContent.NPCType(), + ModContent.NPCType() }; // Enemies that inflict an average of 101 to 200 damage in Expert Mode @@ -2031,7 +2032,11 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - ModContent.ItemType() + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() }; flaskBombProjList = new List() @@ -2049,7 +2054,13 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), - ModContent.ProjectileType() + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() }; spikyBallList = new List() diff --git a/Items/Accessories/ArcanumoftheVoid.cs b/Items/Accessories/ArcanumoftheVoid.cs index b29ff067c3..37606d7116 100644 --- a/Items/Accessories/ArcanumoftheVoid.cs +++ b/Items/Accessories/ArcanumoftheVoid.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories item.height = 26; item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/AsgardianAegis.cs b/Items/Accessories/AsgardianAegis.cs index 3b22b427fc..f48eb63d02 100644 --- a/Items/Accessories/AsgardianAegis.cs +++ b/Items/Accessories/AsgardianAegis.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(0, 90, 0, 0); //30 gold reforge item.defense = 10; item.accessory = true; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/AstralArcanum.cs b/Items/Accessories/AstralArcanum.cs index b8e22e2d1e..28e8d6abaf 100644 --- a/Items/Accessories/AstralArcanum.cs +++ b/Items/Accessories/AstralArcanum.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories item.height = 26; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/BadgeofBravery.cs b/Items/Accessories/BadgeofBravery.cs index 3a5210332e..fd69344781 100644 --- a/Items/Accessories/BadgeofBravery.cs +++ b/Items/Accessories/BadgeofBravery.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories item.height = 30; item.value = Item.buyPrice(0, 21, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/CrawCarapace.cs b/Items/Accessories/CrawCarapace.cs index d21d4806b9..8139737171 100644 --- a/Items/Accessories/CrawCarapace.cs +++ b/Items/Accessories/CrawCarapace.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { player.endurance += 0.05f; - player.thorns = 0.25f; + player.thorns += 0.25f; } } } diff --git a/Items/Accessories/DarkSunRing.cs b/Items/Accessories/DarkSunRing.cs index 9323ba47f6..9d5f0c5217 100644 --- a/Items/Accessories/DarkSunRing.cs +++ b/Items/Accessories/DarkSunRing.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories item.defense = 10; item.lifeRegen = 1; item.accessory = true; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/DeepDiver.cs b/Items/Accessories/DeepDiver.cs index 3be347a7f9..9ab6e96179 100644 --- a/Items/Accessories/DeepDiver.cs +++ b/Items/Accessories/DeepDiver.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories item.rare = 2; item.defense = 2; item.accessory = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/DimensionalSoulArtifact.cs b/Items/Accessories/DimensionalSoulArtifact.cs index 04c901182e..17ce7a5e50 100644 --- a/Items/Accessories/DimensionalSoulArtifact.cs +++ b/Items/Accessories/DimensionalSoulArtifact.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(1, 50, 0, 0); item.accessory = true; item.rare = 10; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs index 1557e30b42..38ff72b2cd 100644 --- a/Items/Accessories/DraedonsHeart.cs +++ b/Items/Accessories/DraedonsHeart.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories item.height = 26; item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/DragonScales.cs b/Items/Accessories/DragonScales.cs index 6fc1e2c19d..93ea711fa1 100644 --- a/Items/Accessories/DragonScales.cs +++ b/Items/Accessories/DragonScales.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories item.height = 34; item.value = Item.buyPrice(0, 90, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; item.accessory = true; } diff --git a/Items/Accessories/EclipseMirror.cs b/Items/Accessories/EclipseMirror.cs index 492bf841a3..ed17546fc9 100644 --- a/Items/Accessories/EclipseMirror.cs +++ b/Items/Accessories/EclipseMirror.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories item.width = 38; item.height = 38; item.value = Item.buyPrice(0, 22, 0, 0); - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; item.accessory = true; } diff --git a/Items/Accessories/EldritchSoulArtifact.cs b/Items/Accessories/EldritchSoulArtifact.cs index d768a519f3..a9302d4b85 100644 --- a/Items/Accessories/EldritchSoulArtifact.cs +++ b/Items/Accessories/EldritchSoulArtifact.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(1, 50, 0, 0); item.accessory = true; item.rare = 10; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/ElementalGauntlet.cs b/Items/Accessories/ElementalGauntlet.cs index b0a5337afd..f8c1323cf3 100644 --- a/Items/Accessories/ElementalGauntlet.cs +++ b/Items/Accessories/ElementalGauntlet.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories item.height = 38; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/ElementalQuiver.cs b/Items/Accessories/ElementalQuiver.cs index 27a6f6df32..23b26e354e 100644 --- a/Items/Accessories/ElementalQuiver.cs +++ b/Items/Accessories/ElementalQuiver.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories item.height = 32; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/ElysianAegis.cs b/Items/Accessories/ElysianAegis.cs index 8a30fd383a..94ec1afd38 100644 --- a/Items/Accessories/ElysianAegis.cs +++ b/Items/Accessories/ElysianAegis.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories item.height = 42; item.value = Item.buyPrice(0, 60, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.defense = 8; item.accessory = true; } diff --git a/Items/Accessories/EtherealTalisman.cs b/Items/Accessories/EtherealTalisman.cs index f66cc4652e..e97f68e4d6 100644 --- a/Items/Accessories/EtherealTalisman.cs +++ b/Items/Accessories/EtherealTalisman.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories item.height = 32; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/FabledTortoiseShell.cs b/Items/Accessories/FabledTortoiseShell.cs index 42a891cda4..c659c1a4d7 100644 --- a/Items/Accessories/FabledTortoiseShell.cs +++ b/Items/Accessories/FabledTortoiseShell.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 5; item.accessory = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override void UpdateAccessory(Player player, bool hideVisual) @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.Calamity(); modPlayer.fabledTortoise = true; player.moveSpeed -= 0.5f; - player.thorns = 0.25f; + player.thorns += 0.25f; } } } diff --git a/Items/Accessories/GiantTortoiseShell.cs b/Items/Accessories/GiantTortoiseShell.cs index ee9b15e6b8..ef667fd30d 100644 --- a/Items/Accessories/GiantTortoiseShell.cs +++ b/Items/Accessories/GiantTortoiseShell.cs @@ -26,16 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { player.moveSpeed -= 0.1f; - player.thorns = 0.25f; - } - - // This item cannot be crafted, but it can be crafted into a normal Turtle Shell. - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(this); - recipe.SetResult(ItemID.TurtleShell); - recipe.AddRecipe(); + player.thorns += 0.25f; } } } diff --git a/Items/Accessories/GodlySoulArtifact.cs b/Items/Accessories/GodlySoulArtifact.cs index e72cfbbefc..cae592c6ea 100644 --- a/Items/Accessories/GodlySoulArtifact.cs +++ b/Items/Accessories/GodlySoulArtifact.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(1, 50, 0, 0); item.accessory = true; item.rare = 10; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/GoldBurdenBreaker.cs b/Items/Accessories/GoldBurdenBreaker.cs index 1ff71e1628..c8e69720b6 100644 --- a/Items/Accessories/GoldBurdenBreaker.cs +++ b/Items/Accessories/GoldBurdenBreaker.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(0, 21, 0, 0); item.rare = 10; item.accessory = true; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/HeartoftheElements.cs b/Items/Accessories/HeartoftheElements.cs index 3e22d38ca2..b13e02dcbf 100644 --- a/Items/Accessories/HeartoftheElements.cs +++ b/Items/Accessories/HeartoftheElements.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 9; item.accessory = true; - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.Rainbow; } public override bool CanEquipAccessory(Player player, int slot) diff --git a/Items/Accessories/HideofAstrumDeus.cs b/Items/Accessories/HideofAstrumDeus.cs index cf8bdbab22..0cacfad449 100644 --- a/Items/Accessories/HideofAstrumDeus.cs +++ b/Items/Accessories/HideofAstrumDeus.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories item.height = 26; item.value = Item.buyPrice(0, 30, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/JellyChargedBattery.cs b/Items/Accessories/JellyChargedBattery.cs index 34b0492d34..6eaf774eff 100644 --- a/Items/Accessories/JellyChargedBattery.cs +++ b/Items/Accessories/JellyChargedBattery.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Jelly-Charged Battery"); - Tooltip.SetDefault("+1 max minions and 10% minion damage\n" + + Tooltip.SetDefault("+1 max minions and 7% minion damage\n" + "Minion attacks spawn orbs of energy and inflict Electrified"); } @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories player.Calamity().voltaicJelly = true; player.Calamity().jellyChargedBattery = true; player.maxMinions ++; - player.minionDamage += 0.1f; + player.minionDamage += 0.07f; } public override void AddRecipes() diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index ea4ada46c7..e049ffebc8 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories item.width = 46; item.height = 40; item.value = Item.buyPrice(0, 18, 0, 0); - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.accessory = true; } diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index fd26b56a7c..a8e0b263ca 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories item.height = 32; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void ModifyTooltips(List list) diff --git a/Items/Accessories/PlagueHive.cs b/Items/Accessories/PlagueHive.cs index cc33b3d11b..c3689dce80 100644 --- a/Items/Accessories/PlagueHive.cs +++ b/Items/Accessories/PlagueHive.cs @@ -77,8 +77,6 @@ namespace CalamityMod.Items.Accessories if (player.whoAmI == Main.myPlayer) { Projectile p = Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType(), num3, 0f, player.whoAmI, l); - p.minion = true; - p.Calamity().forceMinion = true; } } } diff --git a/Items/Accessories/PlaguedFuelPack.cs b/Items/Accessories/PlaguedFuelPack.cs index 7d711ee88a..e6c16a55d6 100644 --- a/Items/Accessories/PlaguedFuelPack.cs +++ b/Items/Accessories/PlaguedFuelPack.cs @@ -1,4 +1,5 @@ using CalamityMod.CalPlayer; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -31,5 +32,19 @@ namespace CalamityMod.Items.Accessories player.Calamity().throwingVelocity += 0.15f; player.Calamity().plaguedFuelPack = true; } + + public override void ModifyTooltips(List tooltips) + { + if (CalamityMod.PlaguePackHotKey.GetAssignedKeys().Count > 0) + { + foreach (TooltipLine line in tooltips) + { + if (line.mod == "Terraria" && line.Name == "Tooltip2") + { + line.text = "Press " + CalamityMod.PlaguePackHotKey.GetAssignedKeys()[0] + " to consume 25% of your maximum stealth to perform a swift upwards/diagonal dash which leaves a trail of plagued clouds"; + } + } + } + } } } diff --git a/Items/Accessories/ProfanedSoulArtifact.cs b/Items/Accessories/ProfanedSoulArtifact.cs index 04b430a1ef..736eca44cf 100644 --- a/Items/Accessories/ProfanedSoulArtifact.cs +++ b/Items/Accessories/ProfanedSoulArtifact.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; item.accessory = true; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/RampartofDeities.cs b/Items/Accessories/RampartofDeities.cs index 32ab866e5d..a428bc8ee8 100644 --- a/Items/Accessories/RampartofDeities.cs +++ b/Items/Accessories/RampartofDeities.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 12; item.accessory = true; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/ReaperToothNecklace.cs b/Items/Accessories/ReaperToothNecklace.cs index be6516091e..b5108a2740 100644 --- a/Items/Accessories/ReaperToothNecklace.cs +++ b/Items/Accessories/ReaperToothNecklace.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(0, 60, 0, 0); item.rare = 10; item.accessory = true; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/Regenator.cs b/Items/Accessories/Regenator.cs index 5cabaa43e1..e651a4ca1d 100644 --- a/Items/Accessories/Regenator.cs +++ b/Items/Accessories/Regenator.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Accessories item.rare = 5; item.defense = 6; item.accessory = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/SamuraiBadge.cs b/Items/Accessories/SamuraiBadge.cs index ac8f1d33d8..e695637546 100644 --- a/Items/Accessories/SamuraiBadge.cs +++ b/Items/Accessories/SamuraiBadge.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories item.height = 30; item.value = Item.buyPrice(0, 21, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/SpectralVeil.cs b/Items/Accessories/SpectralVeil.cs index f06ad15c1a..4c0495c62c 100644 --- a/Items/Accessories/SpectralVeil.cs +++ b/Items/Accessories/SpectralVeil.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Accessories item.width = 30; item.height = 38; item.value = Item.buyPrice(1, 40, 0, 0); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; item.accessory = true; } diff --git a/Items/Accessories/Sponge.cs b/Items/Accessories/Sponge.cs index 534088d789..67036ef7b7 100644 --- a/Items/Accessories/Sponge.cs +++ b/Items/Accessories/Sponge.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories item.height = 20; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/StatMeter.cs b/Items/Accessories/StatMeter.cs index ad9bc997b0..94b0501429 100644 --- a/Items/Accessories/StatMeter.cs +++ b/Items/Accessories/StatMeter.cs @@ -55,8 +55,8 @@ namespace CalamityMod.Items.Accessories line2.text = "Adrenaline Charge Time: " + adrenalineChargeTime + " seconds | Rage Damage Boost: " + rageDamage + "%\n\n" + "Melee Damage: " + modPlayer.damageStats[0] + "% | Melee Crit Chance: " + modPlayer.critStats[0] + "%\n" + "Melee Speed Boost: " + meleeSpeed + "%\n\n" + - "Ranged Damage: " + modPlayer.damageStats[1] + "% | Ranged Crit Chance: " + modPlayer.critStats[1] + "%\n\n" + - "Ammo Consumption Chance: " + modPlayer.ammoReductionRanged + "%\n" + + "Ranged Damage: " + modPlayer.damageStats[1] + "% | Ranged Crit Chance: " + modPlayer.critStats[1] + "%\n" + + "Ammo Consumption Chance: " + modPlayer.ammoReductionRanged + "%\n\n" + "Magic Damage: " + modPlayer.damageStats[2] + "% | Magic Crit Chance: " + modPlayer.critStats[2] + "%\n" + "Mana Usage: " + manaCost + "% | Mana Regen: " + manaRegen + "\n\n" + "Minion Damage: " + modPlayer.damageStats[3] + "% | Minion Slots: " + minionSlots + "\n\n" + diff --git a/Items/Accessories/StatisBeltOfCurses.cs b/Items/Accessories/StatisBeltOfCurses.cs index 0a1f8c67b3..d1c602b8aa 100644 --- a/Items/Accessories/StatisBeltOfCurses.cs +++ b/Items/Accessories/StatisBeltOfCurses.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories item.height = 32; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs index 2a22ae0f73..de070c05d3 100644 --- a/Items/Accessories/TheAmalgam.cs +++ b/Items/Accessories/TheAmalgam.cs @@ -144,8 +144,6 @@ namespace CalamityMod.Items.Accessories if (player.whoAmI == Main.myPlayer) { Projectile p = Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType(), num3, 0f, player.whoAmI, l); - p.minion = true; - p.Calamity().forceMinion = true; } } } diff --git a/Items/Accessories/TheBee.cs b/Items/Accessories/TheBee.cs index bdaf347f57..e0194468d0 100644 --- a/Items/Accessories/TheBee.cs +++ b/Items/Accessories/TheBee.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 4; item.accessory = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/TheCamper.cs b/Items/Accessories/TheCamper.cs index d26df912cb..546a9a2a20 100644 --- a/Items/Accessories/TheCamper.cs +++ b/Items/Accessories/TheCamper.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("The Camper"); Tooltip.SetDefault("You deal no damage unless stationary\n" + - "Standing still grants buff(s) dependant on what weapon you're holding\n" + + "Standing still grants buff(s) dependent on what weapon you're holding\n" + "Standing still provides a damaging aura around you\n" + "While moving, you regenerate health as if standing still\n" + "In rest may we find victory."); diff --git a/Items/Accessories/TheCommunity.cs b/Items/Accessories/TheCommunity.cs index 01c5289459..f3575b1da4 100644 --- a/Items/Accessories/TheCommunity.cs +++ b/Items/Accessories/TheCommunity.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories item.height = 20; item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.Rainbow; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/TheEvolution.cs b/Items/Accessories/TheEvolution.cs index 9f63b44d24..fcd2d5d966 100644 --- a/Items/Accessories/TheEvolution.cs +++ b/Items/Accessories/TheEvolution.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Accessories item.height = 26; item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/TheTransformer.cs b/Items/Accessories/TheTransformer.cs index d927f16533..95b7e61d88 100644 --- a/Items/Accessories/TheTransformer.cs +++ b/Items/Accessories/TheTransformer.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(0, 3, 0, 0); item.rare = 1; item.accessory = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/ToxicHeart.cs b/Items/Accessories/ToxicHeart.cs index 05cd3d3166..95624e8c84 100644 --- a/Items/Accessories/ToxicHeart.cs +++ b/Items/Accessories/ToxicHeart.cs @@ -52,8 +52,6 @@ namespace CalamityMod.Items.Accessories if (player.whoAmI == Main.myPlayer) { Projectile p = Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType(), num3, 0f, player.whoAmI, l); - p.minion = true; - p.Calamity().forceMinion = true; } } } diff --git a/Items/Accessories/VeneratedLocket.cs b/Items/Accessories/VeneratedLocket.cs index 308e89d874..ac2db5fa4b 100644 --- a/Items/Accessories/VeneratedLocket.cs +++ b/Items/Accessories/VeneratedLocket.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories item.height = 36; item.value = Item.buyPrice(25, 0, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; item.accessory = true; } diff --git a/Items/Accessories/Wings/CelestialTracers.cs b/Items/Accessories/Wings/CelestialTracers.cs index 08cc95743e..085b06cd12 100644 --- a/Items/Accessories/Wings/CelestialTracers.cs +++ b/Items/Accessories/Wings/CelestialTracers.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories.Wings item.height = 32; item.value = Item.buyPrice(1, 20, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/Wings/DrewsWings.cs b/Items/Accessories/Wings/DrewsWings.cs index 00627b4f86..a29e50298f 100644 --- a/Items/Accessories/Wings/DrewsWings.cs +++ b/Items/Accessories/Wings/DrewsWings.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories.Wings item.width = 22; item.height = 20; item.value = Item.buyPrice(1, 0, 0, 0); - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; item.accessory = true; } diff --git a/Items/Accessories/Wings/ElysianTracers.cs b/Items/Accessories/Wings/ElysianTracers.cs index 0300928bde..ead024b476 100644 --- a/Items/Accessories/Wings/ElysianTracers.cs +++ b/Items/Accessories/Wings/ElysianTracers.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories.Wings item.height = 32; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/Wings/ElysianWings.cs b/Items/Accessories/Wings/ElysianWings.cs index 689ec09615..b375fa6675 100644 --- a/Items/Accessories/Wings/ElysianWings.cs +++ b/Items/Accessories/Wings/ElysianWings.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories.Wings item.height = 32; item.value = Item.buyPrice(0, 45, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.accessory = true; } diff --git a/Items/Accessories/Wings/InfinityBoots.cs b/Items/Accessories/Wings/InfinityBoots.cs index c27ffda586..c045026cbc 100644 --- a/Items/Accessories/Wings/InfinityBoots.cs +++ b/Items/Accessories/Wings/InfinityBoots.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories.Wings item.height = 32; item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/YharimsInsignia.cs b/Items/Accessories/YharimsInsignia.cs index 1f7859b709..9773e7caf8 100644 --- a/Items/Accessories/YharimsInsignia.cs +++ b/Items/Accessories/YharimsInsignia.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories item.height = 38; item.value = Item.buyPrice(0, 30, 0, 0); item.accessory = true; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Ammo/BloodRune.cs b/Items/Ammo/BloodRune.cs index 7cfc46677a..46f31b5047 100644 --- a/Items/Ammo/BloodRune.cs +++ b/Items/Ammo/BloodRune.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Ammo item.consumable = true; item.knockBack = 10f; item.value = Item.buyPrice(0, 1, 0, 0); - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 0f; item.ammo = item.type; // CONSIDER -- Would item.type work here instead of a self reference? diff --git a/Items/Ammo/BloodfireArrow.cs b/Items/Ammo/BloodfireArrow.cs index 28010408e4..0b3b0dff61 100644 --- a/Items/Ammo/BloodfireArrow.cs +++ b/Items/Ammo/BloodfireArrow.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Ammo item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.ammo = 40; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void AddRecipes() diff --git a/Items/Ammo/ElysianArrow.cs b/Items/Ammo/ElysianArrow.cs index ac8c42911f..79a77c2df2 100644 --- a/Items/Ammo/ElysianArrow.cs +++ b/Items/Ammo/ElysianArrow.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Ammo item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.ammo = 40; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Ammo/HolyFireBullet.cs b/Items/Ammo/HolyFireBullet.cs index 4a1294f469..5b35aff63e 100644 --- a/Items/Ammo/HolyFireBullet.cs +++ b/Items/Ammo/HolyFireBullet.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Ammo item.knockBack = 2f; item.value = 2000; item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; item.ammo = 97; diff --git a/Items/Ammo/VanquisherArrow.cs b/Items/Ammo/VanquisherArrow.cs index 6e1641b00f..95c10fa693 100644 --- a/Items/Ammo/VanquisherArrow.cs +++ b/Items/Ammo/VanquisherArrow.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Ammo item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.ammo = 40; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Armor/AuricTeslaBodyArmor.cs b/Items/Armor/AuricTeslaBodyArmor.cs index 19afcd5528..52b4f7f445 100644 --- a/Items/Armor/AuricTeslaBodyArmor.cs +++ b/Items/Armor/AuricTeslaBodyArmor.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 44, 0, 0); item.defense = 48; - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/AuricTeslaCuisses.cs b/Items/Armor/AuricTeslaCuisses.cs index 7d96ee4414..cefc53a321 100644 --- a/Items/Armor/AuricTeslaCuisses.cs +++ b/Items/Armor/AuricTeslaCuisses.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 8, 0, 0); item.defense = 44; - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/AuricTeslaHelm.cs b/Items/Armor/AuricTeslaHelm.cs index 7c812a46bb..6e320210be 100644 --- a/Items/Armor/AuricTeslaHelm.cs +++ b/Items/Armor/AuricTeslaHelm.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 80, 0, 0); item.defense = 54; //132 - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/AuricTeslaHoodedFacemask.cs b/Items/Armor/AuricTeslaHoodedFacemask.cs index 3281d6edbb..19e573aa62 100644 --- a/Items/Armor/AuricTeslaHoodedFacemask.cs +++ b/Items/Armor/AuricTeslaHoodedFacemask.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 80, 0, 0); item.defense = 40; //132 - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/AuricTeslaPlumedHelm.cs b/Items/Armor/AuricTeslaPlumedHelm.cs index aad1a0cfcc..3236001445 100644 --- a/Items/Armor/AuricTeslaPlumedHelm.cs +++ b/Items/Armor/AuricTeslaPlumedHelm.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 80, 0, 0); item.defense = 34; //132 - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/AuricTeslaSpaceHelmet.cs b/Items/Armor/AuricTeslaSpaceHelmet.cs index 8d9feea085..188f38b4ae 100644 --- a/Items/Armor/AuricTeslaSpaceHelmet.cs +++ b/Items/Armor/AuricTeslaSpaceHelmet.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 80, 0, 0); item.defense = 12; //132 - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/AuricTeslaWireHemmedVisage.cs b/Items/Armor/AuricTeslaWireHemmedVisage.cs index 46499fdd37..87dc2fa2e6 100644 --- a/Items/Armor/AuricTeslaWireHemmedVisage.cs +++ b/Items/Armor/AuricTeslaWireHemmedVisage.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 80, 0, 0); item.defense = 24; //132 - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/BloodflareBodyArmor.cs b/Items/Armor/BloodflareBodyArmor.cs index e7080c92c4..e714271439 100644 --- a/Items/Armor/BloodflareBodyArmor.cs +++ b/Items/Armor/BloodflareBodyArmor.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 48, 0, 0); item.defense = 35; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/BloodflareCuisses.cs b/Items/Armor/BloodflareCuisses.cs index 6a5f9d7467..003c7e6a4f 100644 --- a/Items/Armor/BloodflareCuisses.cs +++ b/Items/Armor/BloodflareCuisses.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 36, 0, 0); item.defense = 29; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/BloodflareHelm.cs b/Items/Armor/BloodflareHelm.cs index 7a5c2acaaa..df49a7c161 100644 --- a/Items/Armor/BloodflareHelm.cs +++ b/Items/Armor/BloodflareHelm.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 28; //85 - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/BloodflareHelmet.cs b/Items/Armor/BloodflareHelmet.cs index 47558b21bd..be9b361942 100644 --- a/Items/Armor/BloodflareHelmet.cs +++ b/Items/Armor/BloodflareHelmet.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 16; //85 - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/BloodflareHornedHelm.cs b/Items/Armor/BloodflareHornedHelm.cs index d4217009b2..bcf2c00e06 100644 --- a/Items/Armor/BloodflareHornedHelm.cs +++ b/Items/Armor/BloodflareHornedHelm.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 34; //85 - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/BloodflareHornedMask.cs b/Items/Armor/BloodflareHornedMask.cs index 2dd346302f..ee9bdd9346 100644 --- a/Items/Armor/BloodflareHornedMask.cs +++ b/Items/Armor/BloodflareHornedMask.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 22; //85 - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/BloodflareMask.cs b/Items/Armor/BloodflareMask.cs index 48539bf563..b4fe9fafff 100644 --- a/Items/Armor/BloodflareMask.cs +++ b/Items/Armor/BloodflareMask.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 49; //85 - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/DemonshadeBreastplate.cs b/Items/Armor/DemonshadeBreastplate.cs index daf22895ed..6793f8828c 100644 --- a/Items/Armor/DemonshadeBreastplate.cs +++ b/Items/Armor/DemonshadeBreastplate.cs @@ -24,14 +24,14 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(4, 0, 0, 0); item.defense = 50; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void UpdateEquip(Player player) { CalamityPlayer modPlayer = player.Calamity(); modPlayer.shadeRegen = true; - player.thorns = 100f; + player.thorns += 100f; player.statLifeMax2 += 200; player.statManaMax2 += 200; player.allDamage += 0.15f; diff --git a/Items/Armor/DemonshadeGreaves.cs b/Items/Armor/DemonshadeGreaves.cs index 6d60533f33..946fe42d19 100644 --- a/Items/Armor/DemonshadeGreaves.cs +++ b/Items/Armor/DemonshadeGreaves.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(3, 0, 0, 0); item.defense = 50; //15 - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/DemonshadeHelm.cs b/Items/Armor/DemonshadeHelm.cs index 5a0f6b2309..d98ab0a0b0 100644 --- a/Items/Armor/DemonshadeHelm.cs +++ b/Items/Armor/DemonshadeHelm.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(5, 0, 0, 0); item.defense = 50; //15 - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/FearmongerGreathelm.cs b/Items/Armor/FearmongerGreathelm.cs index bd4d624dc0..39f455b176 100644 --- a/Items/Armor/FearmongerGreathelm.cs +++ b/Items/Armor/FearmongerGreathelm.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(gold: 75); item.defense = 38; // 132 total - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/FearmongerGreaves.cs b/Items/Armor/FearmongerGreaves.cs index bba444ef4c..ea17bdf2c9 100644 --- a/Items/Armor/FearmongerGreaves.cs +++ b/Items/Armor/FearmongerGreaves.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(gold: 45); item.defense = 44; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/FearmongerPlateMail.cs b/Items/Armor/FearmongerPlateMail.cs index 1f6d21769d..5d91d74ac2 100644 --- a/Items/Armor/FearmongerPlateMail.cs +++ b/Items/Armor/FearmongerPlateMail.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(gold: 60); item.defense = 50; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/GodSlayerChestplate.cs b/Items/Armor/GodSlayerChestplate.cs index bbdf29a3f6..c6056bf119 100644 --- a/Items/Armor/GodSlayerChestplate.cs +++ b/Items/Armor/GodSlayerChestplate.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 41; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/GodSlayerHelm.cs b/Items/Armor/GodSlayerHelm.cs index f08b8f5dd0..48eee14bbe 100644 --- a/Items/Armor/GodSlayerHelm.cs +++ b/Items/Armor/GodSlayerHelm.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 75, 0, 0); item.defense = 48; //96 - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/GodSlayerHelmet.cs b/Items/Armor/GodSlayerHelmet.cs index f13be8e652..9c5e10f08c 100644 --- a/Items/Armor/GodSlayerHelmet.cs +++ b/Items/Armor/GodSlayerHelmet.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 75, 0, 0); item.defense = 35; //96 - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/GodSlayerHornedHelm.cs b/Items/Armor/GodSlayerHornedHelm.cs index 77318968fb..279998cda0 100644 --- a/Items/Armor/GodSlayerHornedHelm.cs +++ b/Items/Armor/GodSlayerHornedHelm.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 75, 0, 0); item.defense = 12; //96 - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/GodSlayerLeggings.cs b/Items/Armor/GodSlayerLeggings.cs index 8c6edaeb1a..c7f5a9546b 100644 --- a/Items/Armor/GodSlayerLeggings.cs +++ b/Items/Armor/GodSlayerLeggings.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 45, 0, 0); item.defense = 35; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/GodSlayerMask.cs b/Items/Armor/GodSlayerMask.cs index 52811287f2..d6ae9cd2bd 100644 --- a/Items/Armor/GodSlayerMask.cs +++ b/Items/Armor/GodSlayerMask.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 75, 0, 0); item.defense = 29; //96 - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/GodSlayerVisage.cs b/Items/Armor/GodSlayerVisage.cs index cfc5a0ecbd..82599bd18a 100644 --- a/Items/Armor/GodSlayerVisage.cs +++ b/Items/Armor/GodSlayerVisage.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 75, 0, 0); item.defense = 21; //96 - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/OmegaBlueChestplate.cs b/Items/Armor/OmegaBlueChestplate.cs index 33572c7c3d..8bfaa408c1 100644 --- a/Items/Armor/OmegaBlueChestplate.cs +++ b/Items/Armor/OmegaBlueChestplate.cs @@ -25,7 +25,7 @@ No positive life regen"); item.value = Item.sellPrice(0, 38, 0, 0); item.rare = 10; item.defense = 28; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/OmegaBlueHelmet.cs b/Items/Armor/OmegaBlueHelmet.cs index 1cbebee9cf..77e7dc027c 100644 --- a/Items/Armor/OmegaBlueHelmet.cs +++ b/Items/Armor/OmegaBlueHelmet.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Armor item.value = Item.sellPrice(0, 35, 0, 0); item.rare = 10; item.defense = 19; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/OmegaBlueLeggings.cs b/Items/Armor/OmegaBlueLeggings.cs index 6165844ea6..510dd130af 100644 --- a/Items/Armor/OmegaBlueLeggings.cs +++ b/Items/Armor/OmegaBlueLeggings.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor item.value = Item.sellPrice(0, 35, 25, 0); item.rare = 10; item.defense = 22; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/SilvaArmor.cs b/Items/Armor/SilvaArmor.cs index 39c0c4f34b..cdf8f9a50b 100644 --- a/Items/Armor/SilvaArmor.cs +++ b/Items/Armor/SilvaArmor.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 24; item.value = Item.buyPrice(0, 72, 0, 0); item.defense = 44; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/SilvaHelm.cs b/Items/Armor/SilvaHelm.cs index e35a85d533..1b445468a0 100644 --- a/Items/Armor/SilvaHelm.cs +++ b/Items/Armor/SilvaHelm.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 20; item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 52; //110 - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/SilvaHelmet.cs b/Items/Armor/SilvaHelmet.cs index 78307b412f..9313d28278 100644 --- a/Items/Armor/SilvaHelmet.cs +++ b/Items/Armor/SilvaHelmet.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 24; item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 13; //110 - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/SilvaHornedHelm.cs b/Items/Armor/SilvaHornedHelm.cs index 0c66100137..d8f36afa90 100644 --- a/Items/Armor/SilvaHornedHelm.cs +++ b/Items/Armor/SilvaHornedHelm.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 24; item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 36; //110 - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/SilvaLeggings.cs b/Items/Armor/SilvaLeggings.cs index 6edf0e960c..f8ace3b468 100644 --- a/Items/Armor/SilvaLeggings.cs +++ b/Items/Armor/SilvaLeggings.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 54, 0, 0); item.defense = 39; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/SilvaMask.cs b/Items/Armor/SilvaMask.cs index 6032af0834..4d5adf3031 100644 --- a/Items/Armor/SilvaMask.cs +++ b/Items/Armor/SilvaMask.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 26; item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 30; //110 - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/SilvaMaskedCap.cs b/Items/Armor/SilvaMaskedCap.cs index a254441214..9142ca31af 100644 --- a/Items/Armor/SilvaMaskedCap.cs +++ b/Items/Armor/SilvaMaskedCap.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor item.height = 22; item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 21; //110 - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/TarragonBreastplate.cs b/Items/Armor/TarragonBreastplate.cs index 05cc2b896f..c6bebaa258 100644 --- a/Items/Armor/TarragonBreastplate.cs +++ b/Items/Armor/TarragonBreastplate.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor item.lifeRegen = 2; item.value = Item.buyPrice(0, 40, 0, 0); item.defense = 37; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/TarragonHelm.cs b/Items/Armor/TarragonHelm.cs index e8153546d5..9484f13214 100644 --- a/Items/Armor/TarragonHelm.cs +++ b/Items/Armor/TarragonHelm.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 50, 0, 0); item.defense = 33; //98 - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/TarragonHelmet.cs b/Items/Armor/TarragonHelmet.cs index 2e3d8b3ccf..42b57fc274 100644 --- a/Items/Armor/TarragonHelmet.cs +++ b/Items/Armor/TarragonHelmet.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 50, 0, 0); item.defense = 15; //98 - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/TarragonHornedHelm.cs b/Items/Armor/TarragonHornedHelm.cs index c24fe0787c..8f00660879 100644 --- a/Items/Armor/TarragonHornedHelm.cs +++ b/Items/Armor/TarragonHornedHelm.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 50, 0, 0); item.defense = 3; //98 - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/TarragonLeggings.cs b/Items/Armor/TarragonLeggings.cs index 364f235eed..26e53942d6 100644 --- a/Items/Armor/TarragonLeggings.cs +++ b/Items/Armor/TarragonLeggings.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 30, 0, 0); item.defense = 32; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/TarragonMask.cs b/Items/Armor/TarragonMask.cs index 518984b3a8..5fdfa0eb2c 100644 --- a/Items/Armor/TarragonMask.cs +++ b/Items/Armor/TarragonMask.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 50, 0, 0); item.defense = 10; //98 - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/TarragonVisage.cs b/Items/Armor/TarragonVisage.cs index 2fd839489e..43d4223e27 100644 --- a/Items/Armor/TarragonVisage.cs +++ b/Items/Armor/TarragonVisage.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 50, 0, 0); item.defense = 21; //98 - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/Vanity/ApronOfAffection.cs b/Items/Armor/Vanity/ApronOfAffection.cs index 1ec1d6e9af..e22f05af4b 100644 --- a/Items/Armor/Vanity/ApronOfAffection.cs +++ b/Items/Armor/Vanity/ApronOfAffection.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Armor.Vanity item.width = 18; item.height = 18; item.rare = 5; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.value = Item.buyPrice(0, 15, 0, 0); item.vanity = true; } diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 09d2bcd9f5..0e41d7a46c 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -55,12 +55,12 @@ namespace CalamityMod.Items public int timesUsed = 0; - public int postMoonLordRarity = 0; + public CalamityRarity customRarity = 0; #region SetDefaults public override void SetDefaults(Item item) { - if (postMoonLordRarity != 0 && item.rare != 10) + if (customRarity.IsPostML() && item.rare != 10) item.rare = 10; if (item.maxStack == 99 || item.type == ItemID.Dynamite || item.type == ItemID.StickyDynamite || @@ -135,11 +135,15 @@ namespace CalamityMod.Items if (CalamityMod.lavaFishList.Contains(item.type)) ItemID.Sets.CanFishInLava[item.type] = true; - if (item.type == ItemID.GravityGlobe) + // not expert because ML drops it in normal so that it can be used with the lore item + if (item.type == ItemID.GravityGlobe) { item.expert = false; item.rare = 10; } + + if(item.type == ItemID.SuspiciousLookingTentacle) + item.expert = true; } #endregion @@ -341,7 +345,7 @@ namespace CalamityMod.Items "timesUsed", timesUsed }, { - "rarity", postMoonLordRarity + "rarity", (int)customRarity } }; } @@ -350,13 +354,13 @@ namespace CalamityMod.Items { rogue = tag.GetBool("rogue"); timesUsed = tag.GetInt("timesUsed"); - postMoonLordRarity = tag.GetInt("rarity"); + customRarity = (CalamityRarity)tag.GetInt("rarity"); } public override void LoadLegacy(Item item, BinaryReader reader) { int loadVersion = reader.ReadInt32(); - postMoonLordRarity = reader.ReadInt32(); + customRarity = (CalamityRarity)reader.ReadInt32(); timesUsed = reader.ReadInt32(); if (loadVersion == 0) @@ -376,7 +380,7 @@ namespace CalamityMod.Items flags[0] = rogue; writer.Write(flags); - writer.Write(postMoonLordRarity); + writer.Write((int)customRarity); writer.Write(timesUsed); } @@ -385,7 +389,7 @@ namespace CalamityMod.Items BitsByte flags = reader.ReadByte(); rogue = flags[0]; - postMoonLordRarity = reader.ReadInt32(); + customRarity = (CalamityRarity)reader.ReadInt32(); timesUsed = reader.ReadInt32(); } #endregion @@ -503,57 +507,62 @@ namespace CalamityMod.Items TooltipLine tt2 = tooltips.FirstOrDefault(x => x.Name == "ItemName" && x.mod == "Terraria"); if (tt2 != null) { - switch (postMoonLordRarity) + switch (customRarity) { - case 12: + default: + break; + case CalamityRarity.Turquoise: tt2.overrideColor = new Color(0, 255, 200); break; - case 13: + case CalamityRarity.PureGreen: tt2.overrideColor = new Color(0, 255, 0); break; - case 14: + case CalamityRarity.DarkBlue: tt2.overrideColor = new Color(43, 96, 222); break; - case 15: + case CalamityRarity.Violet: tt2.overrideColor = new Color(108, 45, 199); break; - case 16: + case CalamityRarity.Developer: tt2.overrideColor = new Color(255, 0, 255); break; - case 17: //Legendary Weapons - if (item.type == ModContent.ItemType()) - tt2.overrideColor = new Color(Main.DiscoR, 203, 103); + + case CalamityRarity.Rainbow: + tt2.overrideColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + break; + case CalamityRarity.RareVariant: + tt2.overrideColor = new Color(255, 140, 0); + break; + case CalamityRarity.Dedicated: + tt2.overrideColor = new Color(139, 0, 0); + break; + + case CalamityRarity.ItemSpecific: + // Uniquely colored developer weapons + if(item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(Main.DiscoR, 100, 255); + if(item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(0, 0, 255); + if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(0.34f, 0.34f + 0.66f * Main.DiscoG / 255f, 0.34f + 0.5f * Main.DiscoG / 255f); + + // Uniquely colored legendary weapons if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) tt2.overrideColor = new Color(255, Main.DiscoG, 53); + if (item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(Main.DiscoR, 203, 103); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(53, Main.DiscoG, 255); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(150, Main.DiscoG, 255); - if (item.type == ModContent.ItemType()) + if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(Main.DiscoR, 203, 103); + if (item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(60, Main.DiscoG, 190); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(255, Main.DiscoG, 155); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(255, Main.DiscoG, 0); - if (item.type == ModContent.ItemType()) - tt2.overrideColor = new Color(60, Main.DiscoG, 190); - break; - case 18: //Fabstaff - tt2.overrideColor = new Color(Main.DiscoR, 100, 255); - break; - case 19: //Blushie Staff - tt2.overrideColor = new Color(0, 0, 255); - break; - case 20: //Non-Expert Rainbow - tt2.overrideColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); - break; - case 21: //Patreon - tt2.overrideColor = new Color(139, 0, 0); - break; - case 22: //Rare Variants - tt2.overrideColor = new Color(255, 140, 0); - break; - default: break; } } diff --git a/Items/Critters/PiggyItem.cs b/Items/Critters/PiggyItem.cs index c07b0306d3..9cb6f11ef1 100644 --- a/Items/Critters/PiggyItem.cs +++ b/Items/Critters/PiggyItem.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Critters item.height = 24; item.makeNPC = (short)ModContent.NPCType(); item.rare = 1; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } } } diff --git a/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs b/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs index b12c8fca28..7c16239701 100644 --- a/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs +++ b/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs @@ -24,7 +24,7 @@ Angiogenesis"); item.useTurn = true; item.value = Item.sellPrice(gold: 5); item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; item.useAnimation = 17; item.useTime = 17; item.useStyle = 2; diff --git a/Items/Fishing/FishingRods/EarlyBloomRod.cs b/Items/Fishing/FishingRods/EarlyBloomRod.cs index d9839095b9..d174f6aa54 100644 --- a/Items/Fishing/FishingRods/EarlyBloomRod.cs +++ b/Items/Fishing/FishingRods/EarlyBloomRod.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Fishing.FishingRods item.shoot = ModContent.ProjectileType(); item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Fishing/FishingRods/NavyFishingRod.cs b/Items/Fishing/FishingRods/NavyFishingRod.cs index 6e16d27ad8..31a6df3557 100644 --- a/Items/Fishing/FishingRods/NavyFishingRod.cs +++ b/Items/Fishing/FishingRods/NavyFishingRod.cs @@ -1,11 +1,8 @@ -using CalamityMod.Projectiles.Typeless; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.DataStructures; -using Terraria.ID; -using Terraria.Localization; -using Terraria.ModLoader; using CalamityMod.Items.Placeables; +using CalamityMod.Projectiles.Typeless; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Fishing.FishingRods { public class NavyFishingRod : ModItem @@ -20,7 +17,6 @@ namespace CalamityMod.Items.Fishing.FishingRods public override void SetDefaults() { - //item.CloneDefaults(2289); //Wooden Fishing Pole item.width = 24; item.height = 28; item.useAnimation = 8; diff --git a/Items/Fishing/FishingRods/TheDevourerofCods.cs b/Items/Fishing/FishingRods/TheDevourerofCods.cs index cd8d2be906..052f29bbac 100644 --- a/Items/Fishing/FishingRods/TheDevourerofCods.cs +++ b/Items/Fishing/FishingRods/TheDevourerofCods.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Fishing.FishingRods item.shoot = ModContent.ProjectileType(); item.value = Item.buyPrice(1, 80, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Fishing.FishingRods int linecolor = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, 0, 0f, player.whoAmI, 0.0f, 0.0f); if (Main.rand.NextBool(2)) //randomizing line color { - Main.projectile[linecolor].Calamity().lineColor = true; + Main.projectile[linecolor].Calamity().lineColor = 1; } } return false; diff --git a/Items/LoreItems/KnowledgeBumblebirb.cs b/Items/LoreItems/KnowledgeBumblebirb.cs index 2227276ba1..61756c9a97 100644 --- a/Items/LoreItems/KnowledgeBumblebirb.cs +++ b/Items/LoreItems/KnowledgeBumblebirb.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeCalamitas.cs b/Items/LoreItems/KnowledgeCalamitas.cs index 1c9d02f8ff..719f437875 100644 --- a/Items/LoreItems/KnowledgeCalamitas.cs +++ b/Items/LoreItems/KnowledgeCalamitas.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeDevourerofGods.cs b/Items/LoreItems/KnowledgeDevourerofGods.cs index 26f7bcdc4e..2b5971cc69 100644 --- a/Items/LoreItems/KnowledgeDevourerofGods.cs +++ b/Items/LoreItems/KnowledgeDevourerofGods.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgePolterghast.cs b/Items/LoreItems/KnowledgePolterghast.cs index a8c64fd829..1f6b02e81a 100644 --- a/Items/LoreItems/KnowledgePolterghast.cs +++ b/Items/LoreItems/KnowledgePolterghast.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeProfanedGuardians.cs b/Items/LoreItems/KnowledgeProfanedGuardians.cs index 32cb335c73..63d3d697e6 100644 --- a/Items/LoreItems/KnowledgeProfanedGuardians.cs +++ b/Items/LoreItems/KnowledgeProfanedGuardians.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeProvidence.cs b/Items/LoreItems/KnowledgeProvidence.cs index a64514bb78..1475cfdc45 100644 --- a/Items/LoreItems/KnowledgeProvidence.cs +++ b/Items/LoreItems/KnowledgeProvidence.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeSentinels.cs b/Items/LoreItems/KnowledgeSentinels.cs index d0c0094e71..594a8f89fb 100644 --- a/Items/LoreItems/KnowledgeSentinels.cs +++ b/Items/LoreItems/KnowledgeSentinels.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeYharon.cs b/Items/LoreItems/KnowledgeYharon.cs index fd48f66361..3f7d20e354 100644 --- a/Items/LoreItems/KnowledgeYharon.cs +++ b/Items/LoreItems/KnowledgeYharon.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool CanUseItem(Player player) diff --git a/Items/Materials/ArmoredShell.cs b/Items/Materials/ArmoredShell.cs index 96a45e3390..6b08a43f6a 100644 --- a/Items/Materials/ArmoredShell.cs +++ b/Items/Materials/ArmoredShell.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Materials item.height = 34; item.maxStack = 999; item.value = Item.buyPrice(0, 7, 0, 0); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } } } diff --git a/Items/Materials/AuricBar.cs b/Items/Materials/AuricBar.cs index 1a494b91d6..1720c6f3cc 100644 --- a/Items/Materials/AuricBar.cs +++ b/Items/Materials/AuricBar.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Materials item.height = 30; item.maxStack = 999; item.value = Item.sellPrice(gold: 45); - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Materials/Bloodstone.cs b/Items/Materials/Bloodstone.cs index d8586e7e11..e072b3af93 100644 --- a/Items/Materials/Bloodstone.cs +++ b/Items/Materials/Bloodstone.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.value = Item.sellPrice(silver: 60); item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } } } diff --git a/Items/Materials/BloodstoneCore.cs b/Items/Materials/BloodstoneCore.cs index a171f86eda..2069eb2dea 100644 --- a/Items/Materials/BloodstoneCore.cs +++ b/Items/Materials/BloodstoneCore.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 4); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void AddRecipes() diff --git a/Items/Materials/CalamitousEssence.cs b/Items/Materials/CalamitousEssence.cs index 527dd6b4ad..9861cbf206 100644 --- a/Items/Materials/CalamitousEssence.cs +++ b/Items/Materials/CalamitousEssence.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 24); - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Materials/CosmiliteBar.cs b/Items/Materials/CosmiliteBar.cs index accdfef1d0..bbadbc1d27 100644 --- a/Items/Materials/CosmiliteBar.cs +++ b/Items/Materials/CosmiliteBar.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Materials item.height = 24; item.maxStack = 999; item.value = Item.buyPrice(0, 7, 0, 0); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Materials/DarkPlasma.cs b/Items/Materials/DarkPlasma.cs index 1fadc65ced..4e78240d05 100644 --- a/Items/Materials/DarkPlasma.cs +++ b/Items/Materials/DarkPlasma.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Materials item.height = 12; item.maxStack = 999; item.value = Item.buyPrice(0, 7, 0, 0); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Materials/DarksunFragment.cs b/Items/Materials/DarksunFragment.cs index 8fdeb2b1fb..8ded44ab30 100644 --- a/Items/Materials/DarksunFragment.cs +++ b/Items/Materials/DarksunFragment.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 12); - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Materials/DivineGeode.cs b/Items/Materials/DivineGeode.cs index 232e8b1270..ad96f4cc67 100644 --- a/Items/Materials/DivineGeode.cs +++ b/Items/Materials/DivineGeode.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.buyPrice(0, 6, 50, 0); - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Materials/EffulgentFeather.cs b/Items/Materials/EffulgentFeather.cs index c004cb6239..9b119c3217 100644 --- a/Items/Materials/EffulgentFeather.cs +++ b/Items/Materials/EffulgentFeather.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.value = Item.buyPrice(0, 6, 50, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } } } diff --git a/Items/Materials/EndothermicEnergy.cs b/Items/Materials/EndothermicEnergy.cs index 2760839b00..d8a95728ff 100644 --- a/Items/Materials/EndothermicEnergy.cs +++ b/Items/Materials/EndothermicEnergy.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 2); - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } } } diff --git a/Items/Materials/HellcasterFragment.cs b/Items/Materials/HellcasterFragment.cs index 40bf9019ec..e59b8c5f58 100644 --- a/Items/Materials/HellcasterFragment.cs +++ b/Items/Materials/HellcasterFragment.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Materials item.height = 14; item.maxStack = 999; item.value = Item.sellPrice(gold: 16); - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.Violet; } } } diff --git a/Items/Materials/NightmareFuel.cs b/Items/Materials/NightmareFuel.cs index a558c0b808..be84815272 100644 --- a/Items/Materials/NightmareFuel.cs +++ b/Items/Materials/NightmareFuel.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 2); - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } } } diff --git a/Items/Materials/Phantoplasm.cs b/Items/Materials/Phantoplasm.cs index 578c39fe7a..8b38af5d3e 100644 --- a/Items/Materials/Phantoplasm.cs +++ b/Items/Materials/Phantoplasm.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 1); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Color? GetAlpha(Color lightColor) diff --git a/Items/Materials/ReaperTooth.cs b/Items/Materials/ReaperTooth.cs index 308797634f..8cc54ed18d 100644 --- a/Items/Materials/ReaperTooth.cs +++ b/Items/Materials/ReaperTooth.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.value = Item.buyPrice(0, 7, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } } } diff --git a/Items/Materials/RuinousSoul.cs b/Items/Materials/RuinousSoul.cs index a23ff729db..218ff81623 100644 --- a/Items/Materials/RuinousSoul.cs +++ b/Items/Materials/RuinousSoul.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Materials item.height = 20; item.maxStack = 999; item.value = Item.buyPrice(0, 7, 0, 0); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } } } diff --git a/Items/Materials/ShadowspecBar.cs b/Items/Materials/ShadowspecBar.cs index 7253620433..b844b6bfda 100644 --- a/Items/Materials/ShadowspecBar.cs +++ b/Items/Materials/ShadowspecBar.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 70); - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void AddRecipes() diff --git a/Items/Materials/TwistingNether.cs b/Items/Materials/TwistingNether.cs index e3b0c4dd13..fe3b6d2032 100644 --- a/Items/Materials/TwistingNether.cs +++ b/Items/Materials/TwistingNether.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.buyPrice(0, 7, 0, 0); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Materials/UeliaceBar.cs b/Items/Materials/UeliaceBar.cs index a1bcb010e4..13216161bd 100644 --- a/Items/Materials/UeliaceBar.cs +++ b/Items/Materials/UeliaceBar.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 3); - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Materials/UnholyEssence.cs b/Items/Materials/UnholyEssence.cs index ba3e80f2a3..b5c93906b0 100644 --- a/Items/Materials/UnholyEssence.cs +++ b/Items/Materials/UnholyEssence.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.buyPrice(0, 6, 50, 0); - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Mounts/GazeOfCrysthamyr.cs b/Items/Mounts/GazeOfCrysthamyr.cs index 1210fd1e51..bc9b235121 100644 --- a/Items/Mounts/GazeOfCrysthamyr.cs +++ b/Items/Mounts/GazeOfCrysthamyr.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Mounts item.UseSound = SoundID.NPCHit56; item.noMelee = true; item.mountType = ModContent.MountType(); - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override void AddRecipes() diff --git a/Items/NormalityRelocator.cs b/Items/NormalityRelocator.cs index 3516e82641..8c9da7049f 100644 --- a/Items/NormalityRelocator.cs +++ b/Items/NormalityRelocator.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items item.height = 38; item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override void UpdateInventory(Player player) diff --git a/Items/PermanentBoosters/Dragonfruit.cs b/Items/PermanentBoosters/Dragonfruit.cs index cd6e3cb8e3..a1986c5752 100644 --- a/Items/PermanentBoosters/Dragonfruit.cs +++ b/Items/PermanentBoosters/Dragonfruit.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.PermanentBoosters item.UseSound = SoundID.Item4; item.consumable = true; item.rare = 10; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool CanUseItem(Player player) diff --git a/Items/PermanentBoosters/Ectoheart.cs b/Items/PermanentBoosters/Ectoheart.cs index 54bf66b627..a59a069083 100644 --- a/Items/PermanentBoosters/Ectoheart.cs +++ b/Items/PermanentBoosters/Ectoheart.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.PermanentBoosters item.UseSound = SoundID.Item122; item.consumable = true; item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool CanUseItem(Player player) diff --git a/Items/PermanentBoosters/PhantomHeart.cs b/Items/PermanentBoosters/PhantomHeart.cs index 4fd253b791..c9cc9c6a88 100644 --- a/Items/PermanentBoosters/PhantomHeart.cs +++ b/Items/PermanentBoosters/PhantomHeart.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.PermanentBoosters item.UseSound = SoundID.Item29; item.consumable = true; item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool CanUseItem(Player player) diff --git a/Items/PermanentBoosters/RedLightningContainer.cs b/Items/PermanentBoosters/RedLightningContainer.cs index 2563d35e6f..dc90e33d79 100644 --- a/Items/PermanentBoosters/RedLightningContainer.cs +++ b/Items/PermanentBoosters/RedLightningContainer.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.PermanentBoosters item.UseSound = SoundID.Item122; item.consumable = true; item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool CanUseItem(Player player) diff --git a/Items/Pets/BloodyVein.cs b/Items/Pets/BloodyVein.cs index 05b628544b..77052bf7de 100644 --- a/Items/Pets/BloodyVein.cs +++ b/Items/Pets/BloodyVein.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Pets item.shoot = ModContent.ProjectileType(); item.buffType = ModContent.BuffType(); item.rare = 3; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override void UseStyle(Player player) diff --git a/Items/Pets/BrimstoneJewel.cs b/Items/Pets/BrimstoneJewel.cs new file mode 100644 index 0000000000..308955e9b7 --- /dev/null +++ b/Items/Pets/BrimstoneJewel.cs @@ -0,0 +1,35 @@ +using CalamityMod.Buffs.Pets; +using CalamityMod.Projectiles.Pets; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Pets +{ + public class BrimstoneJewel : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Brimstone Jewel"); + Tooltip.SetDefault("The ultimate reward for defeating such a beast...\n" + + "Who knew she'd be so darn cute!"); + } + + public override void SetDefaults() + { + item.CloneDefaults(ItemID.ZephyrFish); + item.shoot = ModContent.ProjectileType(); + item.buffType = ModContent.BuffType(); + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.Dedicated; + } + + public override void UseStyle(Player player) + { + if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.AddBuff(item.buffType, 3600, true); + } + } + } +} diff --git a/Items/Pets/BrimstoneJewel.png b/Items/Pets/BrimstoneJewel.png new file mode 100644 index 0000000000..b3b5cd5605 Binary files /dev/null and b/Items/Pets/BrimstoneJewel.png differ diff --git a/Items/Pets/CosmicPlushie.cs b/Items/Pets/CosmicPlushie.cs index 65e863cc2f..7237d467e8 100644 --- a/Items/Pets/CosmicPlushie.cs +++ b/Items/Pets/CosmicPlushie.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Pets item.buffType = ModContent.BuffType(); item.rare = 10; item.UseSound = new Terraria.Audio.LegacySoundStyle(SoundID.Meowmere, 5); - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void UseStyle(Player player) diff --git a/Items/Pets/ForgottenDragonEgg.cs b/Items/Pets/ForgottenDragonEgg.cs index ff7957f225..18b569c4e2 100644 --- a/Items/Pets/ForgottenDragonEgg.cs +++ b/Items/Pets/ForgottenDragonEgg.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Pets item.shoot = ModContent.ProjectileType(); item.buffType = ModContent.BuffType(); item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override void UseStyle(Player player) diff --git a/Items/Placeables/Furniture/CraftingStations/DraedonsForge.cs b/Items/Placeables/Furniture/CraftingStations/DraedonsForge.cs index bd31d2a451..411692b680 100644 --- a/Items/Placeables/Furniture/CraftingStations/DraedonsForge.cs +++ b/Items/Placeables/Furniture/CraftingStations/DraedonsForge.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Placeables.Furniture.CraftingStations item.value = 5000000; item.rare = 10; item.createTile = ModContent.TileType(); - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void AddRecipes() diff --git a/Items/Placeables/Ores/AuricOre.cs b/Items/Placeables/Ores/AuricOre.cs index 626d480224..49930ebde1 100644 --- a/Items/Placeables/Ores/AuricOre.cs +++ b/Items/Placeables/Ores/AuricOre.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Placeables.Ores item.height = 10; item.maxStack = 999; item.value = Item.sellPrice(gold: 2); - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; } } } diff --git a/Items/Potions/Baguette.cs b/Items/Potions/Baguette.cs index edbfe127d9..aa39f03d0d 100644 --- a/Items/Potions/Baguette.cs +++ b/Items/Potions/Baguette.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Potions item.value = Item.buyPrice(0, 0, 50, 0); item.buffType = ModContent.BuffType(); item.buffTime = 18000; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override void OnConsumeItem(Player player) diff --git a/Items/Potions/OmegaHealingPotion.cs b/Items/Potions/OmegaHealingPotion.cs index e4326a7100..6f7c90dc8c 100644 --- a/Items/Potions/OmegaHealingPotion.cs +++ b/Items/Potions/OmegaHealingPotion.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Potions item.potion = true; item.rare = 10; item.value = Item.buyPrice(0, 7, 0, 0); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void AddRecipes() diff --git a/Items/Potions/SupremeHealingPotion.cs b/Items/Potions/SupremeHealingPotion.cs index 1fbf4a8c2c..26739a6738 100644 --- a/Items/Potions/SupremeHealingPotion.cs +++ b/Items/Potions/SupremeHealingPotion.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Potions item.potion = true; item.rare = 10; item.value = Item.buyPrice(0, 6, 50, 0); - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Potions/SupremeManaPotion.cs b/Items/Potions/SupremeManaPotion.cs index 3c103a4f8d..91a11973ff 100644 --- a/Items/Potions/SupremeManaPotion.cs +++ b/Items/Potions/SupremeManaPotion.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Potions item.consumable = true; item.rare = 10; item.value = Item.buyPrice(0, 6, 50, 0); - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/SummonItems/ChickenEgg.cs b/Items/SummonItems/ChickenEgg.cs index d9bae20147..fe2cbf5f23 100644 --- a/Items/SummonItems/ChickenEgg.cs +++ b/Items/SummonItems/ChickenEgg.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.SummonItems item.useTime = 45; item.useStyle = 4; item.consumable = false; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool CanUseItem(Player player) diff --git a/Items/SummonItems/CosmicWorm.cs b/Items/SummonItems/CosmicWorm.cs index d6997b5219..e20ea1ee81 100644 --- a/Items/SummonItems/CosmicWorm.cs +++ b/Items/SummonItems/CosmicWorm.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.SummonItems item.useTime = 45; item.useStyle = 4; item.consumable = false; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool CanUseItem(Player player) diff --git a/Items/SummonItems/EyeofExtinction.cs b/Items/SummonItems/EyeofExtinction.cs index c0e11c4d67..2c6a3e0910 100644 --- a/Items/SummonItems/EyeofExtinction.cs +++ b/Items/SummonItems/EyeofExtinction.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.SummonItems item.useTime = 45; item.useStyle = 4; item.consumable = false; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool CanUseItem(Player player) diff --git a/Items/SummonItems/NecroplasmicBeacon.cs b/Items/SummonItems/NecroplasmicBeacon.cs index 4cdb3d249a..4d79385faa 100644 --- a/Items/SummonItems/NecroplasmicBeacon.cs +++ b/Items/SummonItems/NecroplasmicBeacon.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.SummonItems item.useTime = 45; item.useStyle = 4; item.consumable = false; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/SummonItems/ProfanedCore.cs b/Items/SummonItems/ProfanedCore.cs index f9f2d5fda9..a5c7eff7ba 100644 --- a/Items/SummonItems/ProfanedCore.cs +++ b/Items/SummonItems/ProfanedCore.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.SummonItems item.useStyle = 4; item.consumable = true; item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool CanUseItem(Player player) diff --git a/Items/SummonItems/ProfanedCoreUnlimited.cs b/Items/SummonItems/ProfanedCoreUnlimited.cs index d945666738..e9651a26bc 100644 --- a/Items/SummonItems/ProfanedCoreUnlimited.cs +++ b/Items/SummonItems/ProfanedCoreUnlimited.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.SummonItems item.useStyle = 4; item.consumable = false; item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool CanUseItem(Player player) diff --git a/Items/SummonItems/ProfanedShard.cs b/Items/SummonItems/ProfanedShard.cs index eca05b3806..2d097d7d4a 100644 --- a/Items/SummonItems/ProfanedShard.cs +++ b/Items/SummonItems/ProfanedShard.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.SummonItems item.useTime = 45; item.useStyle = 4; item.consumable = true; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool CanUseItem(Player player) diff --git a/Items/SummonItems/RuneofCos.cs b/Items/SummonItems/RuneofCos.cs index 1462b333dd..821e4478b5 100644 --- a/Items/SummonItems/RuneofCos.cs +++ b/Items/SummonItems/RuneofCos.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.SummonItems item.rare = 9; item.UseSound = SoundID.Item44; item.consumable = false; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool CanUseItem(Player player) diff --git a/Items/Tools/BlossomPickaxe.cs b/Items/Tools/BlossomPickaxe.cs index 9f732544e8..3443ad53ee 100644 --- a/Items/Tools/BlossomPickaxe.cs +++ b/Items/Tools/BlossomPickaxe.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Tools item.UseSound = SoundID.Item1; item.autoReuse = true; item.tileBoost += 6; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Tools/CrystylCrusher.cs b/Items/Tools/CrystylCrusher.cs index d7ebbe4821..5711f1f0e0 100644 --- a/Items/Tools/CrystylCrusher.cs +++ b/Items/Tools/CrystylCrusher.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Tools item.rare = 10; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override bool AltFunctionUse(Player player) diff --git a/Items/Tools/GallantPickaxe.cs b/Items/Tools/GallantPickaxe.cs index 16c69483b6..eb9de146b3 100644 --- a/Items/Tools/GallantPickaxe.cs +++ b/Items/Tools/GallantPickaxe.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Tools item.UseSound = SoundID.Item1; item.autoReuse = true; item.tileBoost += 4; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.useTurn = true; } diff --git a/Items/Tools/Grax.cs b/Items/Tools/Grax.cs index 85a79d94a1..98e60b3058 100644 --- a/Items/Tools/Grax.cs +++ b/Items/Tools/Grax.cs @@ -16,9 +16,9 @@ namespace CalamityMod.Items.Tools public override void SetDefaults() { item.width = 60; - item.damage = 450; + item.damage = 500; item.melee = true; - item.useAnimation = 20; + item.useAnimation = 16; item.useStyle = 1; item.useTime = 4; item.useTurn = true; @@ -31,14 +31,15 @@ namespace CalamityMod.Items.Tools item.tileBoost += 5; item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddRecipeGroup("LunarHamaxe"); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); diff --git a/Items/TreasureBags/AstrageldonBag.cs b/Items/TreasureBags/AstrageldonBag.cs index 32f44dc255..4acd405307 100644 --- a/Items/TreasureBags/AstrageldonBag.cs +++ b/Items/TreasureBags/AstrageldonBag.cs @@ -49,8 +49,8 @@ namespace CalamityMod.Items.TreasureBags DropHelper.DropItem(player, ItemID.FallenStar, 30, 50); // Weapons - DropHelper.DropItemChance(player, ModContent.ItemType(), 4); - DropHelper.DropItemChance(player, ModContent.ItemType(), 4); + DropHelper.DropItemChance(player, ModContent.ItemType(), 3); + DropHelper.DropItemChance(player, ModContent.ItemType(), 3); // Equipment DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge && NPC.downedMoonlord); @@ -60,7 +60,7 @@ namespace CalamityMod.Items.TreasureBags DropHelper.DropItemChance(player, ModContent.ItemType(), 7); // Other - DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge); + DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge && !player.Calamity().adrenalineBoostTwo); DropHelper.DropItemChance(player, ItemID.HallowedKey, 5); } } diff --git a/Items/TreasureBags/BumblebirbBag.cs b/Items/TreasureBags/BumblebirbBag.cs index e4e06f26f8..e3d8743d08 100644 --- a/Items/TreasureBags/BumblebirbBag.cs +++ b/Items/TreasureBags/BumblebirbBag.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.TreasureBags // Equipment DropHelper.DropItem(player, ModContent.ItemType()); - DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge); + DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge && !player.Calamity().rageBoostThree); // Vanity DropHelper.DropItemChance(player, ModContent.ItemType(), 7); diff --git a/Items/TreasureBags/CrabulonBag.cs b/Items/TreasureBags/CrabulonBag.cs index cafa89a774..acdf6947fd 100644 --- a/Items/TreasureBags/CrabulonBag.cs +++ b/Items/TreasureBags/CrabulonBag.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.TreasureBags // Equipment DropHelper.DropItem(player, ModContent.ItemType()); - DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge); + DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge && !player.Calamity().rageBoostOne); // Vanity DropHelper.DropItemChance(player, ModContent.ItemType(), 7); diff --git a/Items/TreasureBags/DevourerofGodsBag.cs b/Items/TreasureBags/DevourerofGodsBag.cs index 880e4573ff..08498a5e80 100644 --- a/Items/TreasureBags/DevourerofGodsBag.cs +++ b/Items/TreasureBags/DevourerofGodsBag.cs @@ -59,7 +59,6 @@ namespace CalamityMod.Items.TreasureBags // Weapons DropHelper.DropItemChance(player, ModContent.ItemType(), 3); - DropHelper.DropItemChance(player, ModContent.ItemType(), 3); float dischargeChance = CalamityWorld.defiled ? DropHelper.DefiledDropRateFloat : DropHelper.LegendaryDropRateFloat; DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge, dischargeChance); DropHelper.DropItemChance(player, ModContent.ItemType(), 3); @@ -68,7 +67,10 @@ namespace CalamityMod.Items.TreasureBags DropHelper.DropItemChance(player, ModContent.ItemType(), DropHelper.RareVariantDropRateInt); DropHelper.DropItemChance(player, ModContent.ItemType(), 3); DropHelper.DropItemChance(player, ModContent.ItemType(), 3); - DropHelper.DropItemChance(player, ModContent.ItemType(), 3); + if (Main.rand.NextBool(3)) + { + DropHelper.DropItemFromSetChance(player, 1f, ModContent.ItemType(), ModContent.ItemType()); + } // Equipment DropHelper.DropItem(player, ModContent.ItemType()); diff --git a/Items/TreasureBags/PolterghastBag.cs b/Items/TreasureBags/PolterghastBag.cs index 0d81274260..f26e2f3f5b 100644 --- a/Items/TreasureBags/PolterghastBag.cs +++ b/Items/TreasureBags/PolterghastBag.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.TreasureBags player.TryGettingDevArmor(); // Materials - DropHelper.DropItem(player, ModContent.ItemType(), 6, 10); + DropHelper.DropItem(player, ModContent.ItemType(), 10, 20); DropHelper.DropItem(player, ModContent.ItemType(), 20, 30); // Weapons @@ -66,7 +66,7 @@ namespace CalamityMod.Items.TreasureBags // Equipment DropHelper.DropItem(player, ModContent.ItemType()); - DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge); + DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge && !player.Calamity().adrenalineBoostThree); // Vanity DropHelper.DropItemChance(player, ModContent.ItemType(), 7); diff --git a/Items/TreasureBags/RavagerBag.cs b/Items/TreasureBags/RavagerBag.cs index f40dfcf0ef..911bb72f2d 100644 --- a/Items/TreasureBags/RavagerBag.cs +++ b/Items/TreasureBags/RavagerBag.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Items.TreasureBags DropHelper.DropItemChance(player, ModContent.ItemType(), 0.5f); DropHelper.DropItemChance(player, ModContent.ItemType(), 0.5f); DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.downedProvidence); - DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge); + DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge && !player.Calamity().rageBoostTwo); // Vanity DropHelper.DropItemChance(player, ModContent.ItemType(), 7); diff --git a/Items/TreasureBags/SlimeGodBag.cs b/Items/TreasureBags/SlimeGodBag.cs index 7d52189f4d..cd7b217e82 100644 --- a/Items/TreasureBags/SlimeGodBag.cs +++ b/Items/TreasureBags/SlimeGodBag.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Items.TreasureBags // Equipment DropHelper.DropItem(player, ModContent.ItemType()); - DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge); + DropHelper.DropItemCondition(player, ModContent.ItemType(), CalamityWorld.revenge && !player.Calamity().adrenalineBoostOne); // Vanity DropHelper.DropItemFromSetChance(player, 7, ModContent.ItemType(), ModContent.ItemType()); diff --git a/Items/Weapons/Magic/AbyssShocker.cs b/Items/Weapons/Magic/AbyssShocker.cs index c2cbffa684..cd84a9747a 100644 --- a/Items/Weapons/Magic/AbyssShocker.cs +++ b/Items/Weapons/Magic/AbyssShocker.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic item.value = Item.buyPrice(0, 4, 0, 0); item.rare = 3; item.autoReuse = true; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14f; } diff --git a/Items/Weapons/Magic/AlphaRay.cs b/Items/Weapons/Magic/AlphaRay.cs index dd325af122..1a4ba247c4 100644 --- a/Items/Weapons/Magic/AlphaRay.cs +++ b/Items/Weapons/Magic/AlphaRay.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shootSpeed = 6f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Magic/ApoctosisArray.cs b/Items/Weapons/Magic/ApoctosisArray.cs index e1d65900d2..73720a1bcd 100644 --- a/Items/Weapons/Magic/ApoctosisArray.cs +++ b/Items/Weapons/Magic/ApoctosisArray.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 8f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Magic/Apotheosis.cs b/Items/Weapons/Magic/Apotheosis.cs index cc25fdd2c8..dacdd84757 100644 --- a/Items/Weapons/Magic/Apotheosis.cs +++ b/Items/Weapons/Magic/Apotheosis.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Magic/AsteroidStaff.cs b/Items/Weapons/Magic/AsteroidStaff.cs index 61f597b376..0e4360f634 100644 --- a/Items/Weapons/Magic/AsteroidStaff.cs +++ b/Items/Weapons/Magic/AsteroidStaff.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/AuguroftheElements.cs b/Items/Weapons/Magic/AuguroftheElements.cs index d603e751c8..84d647227d 100644 --- a/Items/Weapons/Magic/AuguroftheElements.cs +++ b/Items/Weapons/Magic/AuguroftheElements.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 30f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Magic/BlushieStaff.cs b/Items/Weapons/Magic/BlushieStaff.cs index 5b95198ba7..1c2b386333 100644 --- a/Items/Weapons/Magic/BlushieStaff.cs +++ b/Items/Weapons/Magic/BlushieStaff.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic item.shoot = ModContent.ProjectileType(); item.mana = 200; item.shootSpeed = 0f; - item.Calamity().postMoonLordRarity = 19; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override void AddRecipes() diff --git a/Items/Weapons/Magic/ClamorNoctus.cs b/Items/Weapons/Magic/ClamorNoctus.cs index 8a5d93c31e..97761b3104 100644 --- a/Items/Weapons/Magic/ClamorNoctus.cs +++ b/Items/Weapons/Magic/ClamorNoctus.cs @@ -33,7 +33,7 @@ Fires night wyverns and stars from the sky that stick to enemies and tiles and e item.knockBack = 5.2f; item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; item.UseSound = SoundID.Item105; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/Climax.cs b/Items/Weapons/Magic/Climax.cs index 482afbcc0e..2962b9c12b 100644 --- a/Items/Weapons/Magic/Climax.cs +++ b/Items/Weapons/Magic/Climax.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/ClothiersWrath.cs b/Items/Weapons/Magic/ClothiersWrath.cs index 6ba7f5c339..41f19227e9 100644 --- a/Items/Weapons/Magic/ClothiersWrath.cs +++ b/Items/Weapons/Magic/ClothiersWrath.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ProjectileID.ClothiersCurse; item.shootSpeed = 6f; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Magic/Cryophobia.cs b/Items/Weapons/Magic/Cryophobia.cs index d2bf5d5c68..20b7971099 100644 --- a/Items/Weapons/Magic/Cryophobia.cs +++ b/Items/Weapons/Magic/Cryophobia.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shootSpeed = 12f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Magic/DarkSpark.cs b/Items/Weapons/Magic/DarkSpark.cs index c16b8b02dd..287c69df4d 100644 --- a/Items/Weapons/Magic/DarkSpark.cs +++ b/Items/Weapons/Magic/DarkSpark.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Magic item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 30f; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Magic/DeathhailStaff.cs b/Items/Weapons/Magic/DeathhailStaff.cs index d3720de54d..6ba9203013 100644 --- a/Items/Weapons/Magic/DeathhailStaff.cs +++ b/Items/Weapons/Magic/DeathhailStaff.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 18f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } /*public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/DivineRetribution.cs b/Items/Weapons/Magic/DivineRetribution.cs index 0ac63c9caf..8d72d86381 100644 --- a/Items/Weapons/Magic/DivineRetribution.cs +++ b/Items/Weapons/Magic/DivineRetribution.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shootSpeed = 19f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/Effervescence.cs b/Items/Weapons/Magic/Effervescence.cs index 76d41db4f9..5976f683fd 100644 --- a/Items/Weapons/Magic/Effervescence.cs +++ b/Items/Weapons/Magic/Effervescence.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shootSpeed = 13f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Magic/EidolicWail.cs b/Items/Weapons/Magic/EidolicWail.cs index 9323ff0770..1f0b09584b 100644 --- a/Items/Weapons/Magic/EidolicWail.cs +++ b/Items/Weapons/Magic/EidolicWail.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shootSpeed = 5f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Magic/ElementalRay.cs b/Items/Weapons/Magic/ElementalRay.cs index a4d73a87fa..bc61caa4a1 100644 --- a/Items/Weapons/Magic/ElementalRay.cs +++ b/Items/Weapons/Magic/ElementalRay.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/EventHorizon.cs b/Items/Weapons/Magic/EventHorizon.cs index 3ee5ffddec..42ea681026 100644 --- a/Items/Weapons/Magic/EventHorizon.cs +++ b/Items/Weapons/Magic/EventHorizon.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.rare = 10; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; item.value = Item.buyPrice(1, 80, 0, 0); item.UseSound = SoundID.Item84; diff --git a/Items/Weapons/Magic/EyeofMagnus.cs b/Items/Weapons/Magic/EyeofMagnus.cs index f8358f98a2..e568c0825b 100644 --- a/Items/Weapons/Magic/EyeofMagnus.cs +++ b/Items/Weapons/Magic/EyeofMagnus.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic item.value = Item.buyPrice(0, 36, 0, 0); item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Magic/Fabstaff.cs b/Items/Weapons/Magic/Fabstaff.cs index 0f1d7c519e..2db840dafe 100644 --- a/Items/Weapons/Magic/Fabstaff.cs +++ b/Items/Weapons/Magic/Fabstaff.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; - item.Calamity().postMoonLordRarity = 18; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/FaceMelter.cs b/Items/Weapons/Magic/FaceMelter.cs index 48ab733ce8..e1b6bcb24f 100644 --- a/Items/Weapons/Magic/FaceMelter.cs +++ b/Items/Weapons/Magic/FaceMelter.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic item.noMelee = true; item.knockBack = 5f; item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.value = Item.buyPrice(1, 80, 0, 0); item.shoot = ModContent.ProjectileType(); item.UseSound = SoundID.Item47; diff --git a/Items/Weapons/Magic/FatesReveal.cs b/Items/Weapons/Magic/FatesReveal.cs index 3e263576e2..8bd4fc2b5a 100644 --- a/Items/Weapons/Magic/FatesReveal.cs +++ b/Items/Weapons/Magic/FatesReveal.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 1f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } /*public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/GammaFusillade.cs b/Items/Weapons/Magic/GammaFusillade.cs index a79424b611..fa37505ae9 100644 --- a/Items/Weapons/Magic/GammaFusillade.cs +++ b/Items/Weapons/Magic/GammaFusillade.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Magic/Genisis.cs b/Items/Weapons/Magic/Genisis.cs index 364aaf662c..16c7e991e4 100644 --- a/Items/Weapons/Magic/Genisis.cs +++ b/Items/Weapons/Magic/Genisis.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shootSpeed = 6f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Magic/GhastlyVisage.cs b/Items/Weapons/Magic/GhastlyVisage.cs index e13007b5b3..d380e2445d 100644 --- a/Items/Weapons/Magic/GhastlyVisage.cs +++ b/Items/Weapons/Magic/GhastlyVisage.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic item.rare = 10; item.shootSpeed = 9f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Magic/HadopelagicEcho.cs b/Items/Weapons/Magic/HadopelagicEcho.cs index 40c2f922ce..94c1c2e386 100644 --- a/Items/Weapons/Magic/HadopelagicEcho.cs +++ b/Items/Weapons/Magic/HadopelagicEcho.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shootSpeed = 20f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Magic/HeliumFlash.cs b/Items/Weapons/Magic/HeliumFlash.cs index 2a229734d9..6ce35c8eb2 100644 --- a/Items/Weapons/Magic/HeliumFlash.cs +++ b/Items/Weapons/Magic/HeliumFlash.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic item.UseSound = SoundID.Item73; item.rare = 10; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; item.value = Item.buyPrice(1, 80, 0, 0); item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/IceBarrage.cs b/Items/Weapons/Magic/IceBarrage.cs index 0c6c700c0f..3c99de5b63 100644 --- a/Items/Weapons/Magic/IceBarrage.cs +++ b/Items/Weapons/Magic/IceBarrage.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic { item.width = 60; item.height = 60; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.value = Item.buyPrice(1, 80, 0, 0); item.useStyle = ItemUseStyleID.HoldingUp; item.magic = true; diff --git a/Items/Weapons/Magic/Judgement.cs b/Items/Weapons/Magic/Judgement.cs index 5a9e4cd075..567965579c 100644 --- a/Items/Weapons/Magic/Judgement.cs +++ b/Items/Weapons/Magic/Judgement.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 30f; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void AddRecipes() diff --git a/Items/Weapons/Magic/Keelhaul.cs b/Items/Weapons/Magic/Keelhaul.cs index a7ac6ad127..144ba99e79 100644 --- a/Items/Weapons/Magic/Keelhaul.cs +++ b/Items/Weapons/Magic/Keelhaul.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic item.UseSound = SoundID.Item102; item.autoReuse = true; item.rare = 8; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.value = Item.buyPrice(0, 80, 0, 0); item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; diff --git a/Items/Weapons/Magic/LightGodsBrilliance.cs b/Items/Weapons/Magic/LightGodsBrilliance.cs index bf14f3e5fb..b25236887d 100644 --- a/Items/Weapons/Magic/LightGodsBrilliance.cs +++ b/Items/Weapons/Magic/LightGodsBrilliance.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 25f; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Magic/MadAlchemistsCocktailGlove.cs b/Items/Weapons/Magic/MadAlchemistsCocktailGlove.cs index 2deccd1db6..cdfdce12c8 100644 --- a/Items/Weapons/Magic/MadAlchemistsCocktailGlove.cs +++ b/Items/Weapons/Magic/MadAlchemistsCocktailGlove.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Magic/MagneticMeltdown.cs b/Items/Weapons/Magic/MagneticMeltdown.cs index e626e67307..ea9676b0bc 100644 --- a/Items/Weapons/Magic/MagneticMeltdown.cs +++ b/Items/Weapons/Magic/MagneticMeltdown.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/Mistlestorm.cs b/Items/Weapons/Magic/Mistlestorm.cs index 59da4e1e24..45ffc677e2 100644 --- a/Items/Weapons/Magic/Mistlestorm.cs +++ b/Items/Weapons/Magic/Mistlestorm.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = 336; item.shootSpeed = 24f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/NuclearFury.cs b/Items/Weapons/Magic/NuclearFury.cs index 1627b3a751..399e34adff 100644 --- a/Items/Weapons/Magic/NuclearFury.cs +++ b/Items/Weapons/Magic/NuclearFury.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Magic/PhantasmalFury.cs b/Items/Weapons/Magic/PhantasmalFury.cs index 3657c17c42..1c9d8b894e 100644 --- a/Items/Weapons/Magic/PhantasmalFury.cs +++ b/Items/Weapons/Magic/PhantasmalFury.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/PhoenixFlameBarrage.cs b/Items/Weapons/Magic/PhoenixFlameBarrage.cs index 863a153dc4..dffa051d42 100644 --- a/Items/Weapons/Magic/PhoenixFlameBarrage.cs +++ b/Items/Weapons/Magic/PhoenixFlameBarrage.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 30f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/PlasmaRifle.cs b/Items/Weapons/Magic/PlasmaRifle.cs index f718f08fef..640c62a2c0 100644 --- a/Items/Weapons/Magic/PlasmaRifle.cs +++ b/Items/Weapons/Magic/PlasmaRifle.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shootSpeed = 12f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Magic/PrimordialAncient.cs b/Items/Weapons/Magic/PrimordialAncient.cs index 31b24be7a4..4460659361 100644 --- a/Items/Weapons/Magic/PrimordialAncient.cs +++ b/Items/Weapons/Magic/PrimordialAncient.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 8f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void AddRecipes() diff --git a/Items/Weapons/Magic/PurgeGuzzler.cs b/Items/Weapons/Magic/PurgeGuzzler.cs index 1b97178764..2770ccd882 100644 --- a/Items/Weapons/Magic/PurgeGuzzler.cs +++ b/Items/Weapons/Magic/PurgeGuzzler.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Magic/RecitationoftheBeast.cs b/Items/Weapons/Magic/RecitationoftheBeast.cs index 103c09491a..20e93320d7 100644 --- a/Items/Weapons/Magic/RecitationoftheBeast.cs +++ b/Items/Weapons/Magic/RecitationoftheBeast.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.magic = true; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Magic/RougeSlash.cs b/Items/Weapons/Magic/RougeSlash.cs index 5fa4265a31..4dafbc4b84 100644 --- a/Items/Weapons/Magic/RougeSlash.cs +++ b/Items/Weapons/Magic/RougeSlash.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Magic/SHPC.cs b/Items/Weapons/Magic/SHPC.cs index d51940c20e..4bfd67fdb4 100644 --- a/Items/Weapons/Magic/SHPC.cs +++ b/Items/Weapons/Magic/SHPC.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; - item.Calamity().postMoonLordRarity = 17; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Magic/SanguineFlare.cs b/Items/Weapons/Magic/SanguineFlare.cs index 3450cf95fa..5a6b9b34a6 100644 --- a/Items/Weapons/Magic/SanguineFlare.cs +++ b/Items/Weapons/Magic/SanguineFlare.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/ShadowboltStaff.cs b/Items/Weapons/Magic/ShadowboltStaff.cs index efb6ff9a26..f962f3079e 100644 --- a/Items/Weapons/Magic/ShadowboltStaff.cs +++ b/Items/Weapons/Magic/ShadowboltStaff.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/SoulPiercer.cs b/Items/Weapons/Magic/SoulPiercer.cs index a7ac01484b..96ed1f1afa 100644 --- a/Items/Weapons/Magic/SoulPiercer.cs +++ b/Items/Weapons/Magic/SoulPiercer.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } /*public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/StratusSphere.cs b/Items/Weapons/Magic/StratusSphere.cs index 0ce4793f85..5646a4c5cf 100644 --- a/Items/Weapons/Magic/StratusSphere.cs +++ b/Items/Weapons/Magic/StratusSphere.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Magic item.holdStyle = 3; item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Magic/SubsumingVortex.cs b/Items/Weapons/Magic/SubsumingVortex.cs index a0cefe816a..48c8c0223f 100644 --- a/Items/Weapons/Magic/SubsumingVortex.cs +++ b/Items/Weapons/Magic/SubsumingVortex.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 9f; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Magic/T1000.cs b/Items/Weapons/Magic/T1000.cs index cdaff41429..8dc4a7bd54 100644 --- a/Items/Weapons/Magic/T1000.cs +++ b/Items/Weapons/Magic/T1000.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Magic/TheWand.cs b/Items/Weapons/Magic/TheWand.cs index 83d2661686..547d8bf874 100644 --- a/Items/Weapons/Magic/TheWand.cs +++ b/Items/Weapons/Magic/TheWand.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void AddRecipes() diff --git a/Items/Weapons/Magic/ThornBlossom.cs b/Items/Weapons/Magic/ThornBlossom.cs index b0324f41bd..5e355f0bd4 100644 --- a/Items/Weapons/Magic/ThornBlossom.cs +++ b/Items/Weapons/Magic/ThornBlossom.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/Thunderstorm.cs b/Items/Weapons/Magic/Thunderstorm.cs index d15f0fba9f..a08cdb4226 100644 --- a/Items/Weapons/Magic/Thunderstorm.cs +++ b/Items/Weapons/Magic/Thunderstorm.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shootSpeed = 6f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Magic/UltraLiquidator.cs b/Items/Weapons/Magic/UltraLiquidator.cs index 0829adfca8..9d18479c0f 100644 --- a/Items/Weapons/Magic/UltraLiquidator.cs +++ b/Items/Weapons/Magic/UltraLiquidator.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/VenusianTrident.cs b/Items/Weapons/Magic/VenusianTrident.cs index 015f95ba5c..7d5c9954a4 100644 --- a/Items/Weapons/Magic/VenusianTrident.cs +++ b/Items/Weapons/Magic/VenusianTrident.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 19f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/Vesuvius.cs b/Items/Weapons/Magic/Vesuvius.cs index f2b94fda2d..2ec0fe3b9f 100644 --- a/Items/Weapons/Magic/Vesuvius.cs +++ b/Items/Weapons/Magic/Vesuvius.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Magic item.rare = 8; item.shootSpeed = 20f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 17; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } /*public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/Viscera.cs b/Items/Weapons/Magic/Viscera.cs index 1bd3d6aae4..4dd87bf603 100644 --- a/Items/Weapons/Magic/Viscera.cs +++ b/Items/Weapons/Magic/Viscera.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/VividClarity.cs b/Items/Weapons/Magic/VividClarity.cs index db4ea0882c..c146d8141a 100644 --- a/Items/Weapons/Magic/VividClarity.cs +++ b/Items/Weapons/Magic/VividClarity.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/VoidVortex.cs b/Items/Weapons/Magic/VoidVortex.cs index 414e23f45a..00f935aafc 100644 --- a/Items/Weapons/Magic/VoidVortex.cs +++ b/Items/Weapons/Magic/VoidVortex.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Magic/YharimsCrystal.cs b/Items/Weapons/Magic/YharimsCrystal.cs index 1d4d62a045..7018d3c5e3 100644 --- a/Items/Weapons/Magic/YharimsCrystal.cs +++ b/Items/Weapons/Magic/YharimsCrystal.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 30f; - item.Calamity().postMoonLordRarity = 17; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/AccretionDiskMelee.cs b/Items/Weapons/Melee/AccretionDiskMelee.cs index 2a6454d494..23206b8a26 100644 --- a/Items/Weapons/Melee/AccretionDiskMelee.cs +++ b/Items/Weapons/Melee/AccretionDiskMelee.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 13f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/AegisBlade.cs b/Items/Weapons/Melee/AegisBlade.cs index 81a4cc0b98..8bf4f7a002 100644 --- a/Items/Weapons/Melee/AegisBlade.cs +++ b/Items/Weapons/Melee/AegisBlade.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 7; item.value = Item.buyPrice(0, 60, 0, 0); item.shootSpeed = 14f; - item.Calamity().postMoonLordRarity = 17; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Melee/AirSpinner.cs b/Items/Weapons/Melee/AirSpinner.cs index 3bd257f851..4a05ae5486 100644 --- a/Items/Weapons/Melee/AirSpinner.cs +++ b/Items/Weapons/Melee/AirSpinner.cs @@ -11,7 +11,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Air Spinner"); - Tooltip.SetDefault("Fires feathers when enemies are near\nAn exceptionally agile yoyo"); + Tooltip.SetDefault("Fires feathers when enemies are near\n" + + "A very agile yoyo"); ItemID.Sets.Yoyo[item.type] = true; ItemID.Sets.GamepadExtraRange[item.type] = 15; ItemID.Sets.GamepadSmartQuickReach[item.type] = true; diff --git a/Items/Weapons/Melee/Animus.cs b/Items/Weapons/Melee/Animus.cs index 7680ae8e12..65fe9f4017 100644 --- a/Items/Weapons/Melee/Animus.cs +++ b/Items/Weapons/Melee/Animus.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee item.height = 90; item.value = Item.buyPrice(5, 0, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/AquaticDissolution.cs b/Items/Weapons/Melee/AquaticDissolution.cs index 2c9c3276d1..bf5b6b75bd 100644 --- a/Items/Weapons/Melee/AquaticDissolution.cs +++ b/Items/Weapons/Melee/AquaticDissolution.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/ArkoftheCosmos.cs b/Items/Weapons/Melee/ArkoftheCosmos.cs index bd303d1850..c68ce9de29 100644 --- a/Items/Weapons/Melee/ArkoftheCosmos.cs +++ b/Items/Weapons/Melee/ArkoftheCosmos.cs @@ -1,5 +1,4 @@ using CalamityMod.Items.Materials; -using CalamityMod.Items.Placeables.Ores; using CalamityMod.Projectiles.Melee; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; @@ -23,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 102; - item.damage = 680; + item.damage = 600; item.melee = true; item.useAnimation = 15; item.useTime = 15; @@ -38,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 28f; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/ArkoftheElements.cs b/Items/Weapons/Melee/ArkoftheElements.cs index 3a1e796519..00def45e96 100644 --- a/Items/Weapons/Melee/ArkoftheElements.cs +++ b/Items/Weapons/Melee/ArkoftheElements.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/Ataraxia.cs b/Items/Weapons/Melee/Ataraxia.cs index ccabb4c859..9a234701a6 100644 --- a/Items/Weapons/Melee/Ataraxia.cs +++ b/Items/Weapons/Melee/Ataraxia.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item1; item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.value = Item.buyPrice(2, 50, 0, 0); item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/Azathoth.cs b/Items/Weapons/Melee/Azathoth.cs index e97ea6e976..396e32b38c 100644 --- a/Items/Weapons/Melee/Azathoth.cs +++ b/Items/Weapons/Melee/Azathoth.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.autoReuse = true; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; item.value = Item.buyPrice(platinum: 5); } diff --git a/Items/Weapons/Melee/BansheeHook.cs b/Items/Weapons/Melee/BansheeHook.cs index b894196a64..13a98989bd 100644 --- a/Items/Weapons/Melee/BansheeHook.cs +++ b/Items/Weapons/Melee/BansheeHook.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 42f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/BrinyBaron.cs b/Items/Weapons/Melee/BrinyBaron.cs index 28d03a855d..7c09cf78f8 100644 --- a/Items/Weapons/Melee/BrinyBaron.cs +++ b/Items/Weapons/Melee/BrinyBaron.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; item.shootSpeed = 4f; - item.Calamity().postMoonLordRarity = 17; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Melee/Carnage.cs b/Items/Weapons/Melee/Carnage.cs index 1db5ec56e0..0eeedbbc78 100644 --- a/Items/Weapons/Melee/Carnage.cs +++ b/Items/Weapons/Melee/Carnage.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee item.height = 60; item.value = Item.buyPrice(0, 4, 0, 0); item.rare = 3; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Weapons/Melee/CorpusAvertorMelee.cs b/Items/Weapons/Melee/CorpusAvertorMelee.cs index c5b418bcbe..f5834482e5 100644 --- a/Items/Weapons/Melee/CorpusAvertorMelee.cs +++ b/Items/Weapons/Melee/CorpusAvertorMelee.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Melee item.autoReuse = true; item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; item.melee = true; diff --git a/Items/Weapons/Melee/CosmicDischarge.cs b/Items/Weapons/Melee/CosmicDischarge.cs index 3494d933fc..55ba0008b4 100644 --- a/Items/Weapons/Melee/CosmicDischarge.cs +++ b/Items/Weapons/Melee/CosmicDischarge.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shootSpeed = 24f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 17; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/CosmicShiv.cs b/Items/Weapons/Melee/CosmicShiv.cs index 245eafb9bb..23d006204a 100644 --- a/Items/Weapons/Melee/CosmicShiv.cs +++ b/Items/Weapons/Melee/CosmicShiv.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14f; item.value = Item.buyPrice(2, 50, 0, 0); //50 gold - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/CrescentMoon.cs b/Items/Weapons/Melee/CrescentMoon.cs index abfda3b4ac..3b266c61d3 100644 --- a/Items/Weapons/Melee/CrescentMoon.cs +++ b/Items/Weapons/Melee/CrescentMoon.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item82; item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; item.shootSpeed = 24f; item.shoot = ModContent.ProjectileType(); } diff --git a/Items/Weapons/Melee/Devastation.cs b/Items/Weapons/Melee/Devastation.cs index 69f4abb2e8..3cb846c756 100644 --- a/Items/Weapons/Melee/Devastation.cs +++ b/Items/Weapons/Melee/Devastation.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/DevilsDevastation.cs b/Items/Weapons/Melee/DevilsDevastation.cs index 1d7b431444..f451606dfd 100644 --- a/Items/Weapons/Melee/DevilsDevastation.cs +++ b/Items/Weapons/Melee/DevilsDevastation.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 28f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/DevilsSunrise.cs b/Items/Weapons/Melee/DevilsSunrise.cs index 17fb94b0f2..e0efd6d5f8 100644 --- a/Items/Weapons/Melee/DevilsSunrise.cs +++ b/Items/Weapons/Melee/DevilsSunrise.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useStyle = 5; item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.value = Item.buyPrice(1, 40, 0, 0); item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/DivineHatchet.cs b/Items/Weapons/Melee/DivineHatchet.cs index 6e9c8ceb16..6025795649 100644 --- a/Items/Weapons/Melee/DivineHatchet.cs +++ b/Items/Weapons/Melee/DivineHatchet.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 8; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/DraconicDestruction.cs b/Items/Weapons/Melee/DraconicDestruction.cs index 2b79e568ce..518573389f 100644 --- a/Items/Weapons/Melee/DraconicDestruction.cs +++ b/Items/Weapons/Melee/DraconicDestruction.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14f; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/DraedonsExoblade.cs b/Items/Weapons/Melee/DraedonsExoblade.cs index 5c030c2254..296a0d669f 100644 --- a/Items/Weapons/Melee/DraedonsExoblade.cs +++ b/Items/Weapons/Melee/DraedonsExoblade.cs @@ -13,8 +13,6 @@ namespace CalamityMod.Items.Weapons.Melee { public class DraedonsExoblade : ModItem { - private static int BaseDamage = 6700; - public override void SetStaticDefaults() { DisplayName.SetDefault("Exoblade"); @@ -29,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 80; - item.damage = BaseDamage; + item.damage = 5000; item.useAnimation = 14; item.useStyle = 1; item.useTime = 14; @@ -43,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 19f; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } // Gains 100% of missing health as base damage. diff --git a/Items/Weapons/Melee/DragonPow.cs b/Items/Weapons/Melee/DragonPow.cs index 2c44d10259..1e888204fc 100644 --- a/Items/Weapons/Melee/DragonPow.cs +++ b/Items/Weapons/Melee/DragonPow.cs @@ -1,5 +1,4 @@ using CalamityMod.Items.Materials; -using CalamityMod.Items.Placeables.Ores; using CalamityMod.Projectiles.Melee; using CalamityMod.Tiles.Furniture.CraftingStations; using Terraria; @@ -10,7 +9,6 @@ namespace CalamityMod.Items.Weapons.Melee { public class DragonPow : ModItem { - public static int BaseDamage = 3900; public static float Speed = 13f; public static float ReturnSpeed = 20f; public static float SparkSpeed = 0.6f; @@ -31,7 +29,7 @@ Summons a barrage of petals and waterfalls on enemy hits"); item.width = 76; item.height = 82; item.melee = true; - item.damage = BaseDamage; + item.damage = 4900; item.knockBack = 9f; item.useAnimation = 20; item.useTime = 20; @@ -44,7 +42,7 @@ Summons a barrage of petals and waterfalls on enemy hits"); item.channel = true; item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.value = Item.buyPrice(2, 50, 0, 0); item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/DragonRage.cs b/Items/Weapons/Melee/DragonRage.cs index be5d405b96..185870139a 100644 --- a/Items/Weapons/Melee/DragonRage.cs +++ b/Items/Weapons/Melee/DragonRage.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/Earth.cs b/Items/Weapons/Melee/Earth.cs index e2f02a163f..38858f734f 100644 --- a/Items/Weapons/Melee/Earth.cs +++ b/Items/Weapons/Melee/Earth.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee item.height = 104; item.value = Item.buyPrice(5, 0, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Melee/ElementalExcalibur.cs b/Items/Weapons/Melee/ElementalExcalibur.cs index 374ab4b289..3ef670429d 100644 --- a/Items/Weapons/Melee/ElementalExcalibur.cs +++ b/Items/Weapons/Melee/ElementalExcalibur.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 20; + item.Calamity().customRarity = CalamityRarity.Rainbow; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/ElementalShortsword.cs b/Items/Weapons/Melee/ElementalShortsword.cs index a4d070a65f..bdaadec96f 100644 --- a/Items/Weapons/Melee/ElementalShortsword.cs +++ b/Items/Weapons/Melee/ElementalShortsword.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 14f; item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/EmpyreanKnives.cs b/Items/Weapons/Melee/EmpyreanKnives.cs index eaf40852c1..4d0e09fb47 100644 --- a/Items/Weapons/Melee/EmpyreanKnives.cs +++ b/Items/Weapons/Melee/EmpyreanKnives.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/EradicatorMelee.cs b/Items/Weapons/Melee/EradicatorMelee.cs index 6af744e9ee..3814e11695 100644 --- a/Items/Weapons/Melee/EradicatorMelee.cs +++ b/Items/Weapons/Melee/EradicatorMelee.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/EssenceFlayer.cs b/Items/Weapons/Melee/EssenceFlayer.cs index 14caa4b5f8..8618e64136 100644 --- a/Items/Weapons/Melee/EssenceFlayer.cs +++ b/Items/Weapons/Melee/EssenceFlayer.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 21f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/EvilSmasher.cs b/Items/Weapons/Melee/EvilSmasher.cs index 814da94ee5..a9a000ac7c 100644 --- a/Items/Weapons/Melee/EvilSmasher.cs +++ b/Items/Weapons/Melee/EvilSmasher.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Melee item.height = 62; item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Melee/Excelsus.cs b/Items/Weapons/Melee/Excelsus.cs index 3e51834081..0e785ce60d 100644 --- a/Items/Weapons/Melee/Excelsus.cs +++ b/Items/Weapons/Melee/Excelsus.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/ExoGladius.cs b/Items/Weapons/Melee/ExoGladius.cs index 474f7ad5c8..2410ebe1e9 100644 --- a/Items/Weapons/Melee/ExoGladius.cs +++ b/Items/Weapons/Melee/ExoGladius.cs @@ -6,7 +6,6 @@ using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System; using Terraria; -using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -30,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 12; item.width = 56; item.height = 56; - item.damage = 3001; + item.damage = 2700; item.melee = true; item.knockBack = 9.9f; item.UseSound = SoundID.Item1; @@ -40,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 19f; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index 9d441bab48..830f7104b8 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index ca62f42184..f59dd97945 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; item.useStyle = ItemUseStyleID.SwingThrow; } public override void HoldItem(Player player) diff --git a/Items/Weapons/Melee/GalacticaBlade.cs b/Items/Weapons/Melee/GalacticaBlade.cs index 114a3b0bb9..0dea32d88c 100644 --- a/Items/Weapons/Melee/GalacticaBlade.cs +++ b/Items/Weapons/Melee/GalacticaBlade.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 23f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/GalaxySmasherMelee.cs b/Items/Weapons/Melee/GalaxySmasherMelee.cs index bf2fa405c6..9f4639f092 100644 --- a/Items/Weapons/Melee/GalaxySmasherMelee.cs +++ b/Items/Weapons/Melee/GalaxySmasherMelee.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item1; item.rare = 10; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; item.value = Item.buyPrice(1, 80, 0, 0); item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/GalileoGladius.cs b/Items/Weapons/Melee/GalileoGladius.cs index 830c1d236e..d0238f7842 100644 --- a/Items/Weapons/Melee/GalileoGladius.cs +++ b/Items/Weapons/Melee/GalileoGladius.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 14f; item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/GildedProboscis.cs b/Items/Weapons/Melee/GildedProboscis.cs index 4da7a61e8d..39fc2f0643 100644 --- a/Items/Weapons/Melee/GildedProboscis.cs +++ b/Items/Weapons/Melee/GildedProboscis.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 13f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/GrandDad.cs b/Items/Weapons/Melee/GrandDad.cs index 7d05d25190..3ea14221fb 100644 --- a/Items/Weapons/Melee/GrandDad.cs +++ b/Items/Weapons/Melee/GrandDad.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee item.height = 124; item.value = Item.buyPrice(1, 0, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Melee/GreatswordofBlah.cs b/Items/Weapons/Melee/GreatswordofBlah.cs index 134891cf55..0c48b805e4 100644 --- a/Items/Weapons/Melee/GreatswordofBlah.cs +++ b/Items/Weapons/Melee/GreatswordofBlah.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/GreatswordofJudgement.cs b/Items/Weapons/Melee/GreatswordofJudgement.cs index 7439bde456..a08668dd40 100644 --- a/Items/Weapons/Melee/GreatswordofJudgement.cs +++ b/Items/Weapons/Melee/GreatswordofJudgement.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/HolyCollider.cs b/Items/Weapons/Melee/HolyCollider.cs index 921384f93e..39ec83b7dd 100644 --- a/Items/Weapons/Melee/HolyCollider.cs +++ b/Items/Weapons/Melee/HolyCollider.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; item.shootSpeed = 10f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Melee/InsidiousImpaler.cs b/Items/Weapons/Melee/InsidiousImpaler.cs index 7b8854e527..71ce9c1397 100644 --- a/Items/Weapons/Melee/InsidiousImpaler.cs +++ b/Items/Weapons/Melee/InsidiousImpaler.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/KelvinCatalystMelee.cs b/Items/Weapons/Melee/KelvinCatalystMelee.cs index 1efdb67021..e069ce832b 100644 --- a/Items/Weapons/Melee/KelvinCatalystMelee.cs +++ b/Items/Weapons/Melee/KelvinCatalystMelee.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee item.shoot = ModContent.ProjectileType(); item.shootSpeed = 8f; item.melee = true; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/Lacerator.cs b/Items/Weapons/Melee/Lacerator.cs index 104bbda4f4..5ac2723a06 100644 --- a/Items/Weapons/Melee/Lacerator.cs +++ b/Items/Weapons/Melee/Lacerator.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee item.width = 30; item.height = 26; item.melee = true; - item.damage = 150; + item.damage = 100; item.knockBack = 7f; item.useTime = 20; item.useAnimation = 20; @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 16f; item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; item.value = Item.buyPrice(platinum: 1, gold: 40); } diff --git a/Items/Weapons/Melee/LifefruitScythe.cs b/Items/Weapons/Melee/LifefruitScythe.cs index d2211f00a8..4bd35bc74d 100644 --- a/Items/Weapons/Melee/LifefruitScythe.cs +++ b/Items/Weapons/Melee/LifefruitScythe.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 9f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/MirrorBlade.cs b/Items/Weapons/Melee/MirrorBlade.cs index b18306f645..9cba7693da 100644 --- a/Items/Weapons/Melee/MirrorBlade.cs +++ b/Items/Weapons/Melee/MirrorBlade.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shootSpeed = 9f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/Mourningstar.cs b/Items/Weapons/Melee/Mourningstar.cs index 7b352bd348..398cb93e78 100644 --- a/Items/Weapons/Melee/Mourningstar.cs +++ b/Items/Weapons/Melee/Mourningstar.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shootSpeed = 24f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/Murasama.cs b/Items/Weapons/Melee/Murasama.cs index 6292a01d8a..afb2d14bee 100644 --- a/Items/Weapons/Melee/Murasama.cs +++ b/Items/Weapons/Melee/Murasama.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/Nadir.cs b/Items/Weapons/Melee/Nadir.cs index 9f6fc0a9f1..978f6640e9 100644 --- a/Items/Weapons/Melee/Nadir.cs +++ b/Items/Weapons/Melee/Nadir.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item1; item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.value = Item.buyPrice(1, 80, 0, 0); item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/NanoblackReaperMelee.cs b/Items/Weapons/Melee/NanoblackReaperMelee.cs index 8d49a6bfa8..a5e26f0b0a 100644 --- a/Items/Weapons/Melee/NanoblackReaperMelee.cs +++ b/Items/Weapons/Melee/NanoblackReaperMelee.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item18; item.rare = 10; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; item.value = Item.buyPrice(5, 0, 0, 0); item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/NeptunesBounty.cs b/Items/Weapons/Melee/NeptunesBounty.cs index 3d633ff715..4d83db6a77 100644 --- a/Items/Weapons/Melee/NeptunesBounty.cs +++ b/Items/Weapons/Melee/NeptunesBounty.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Neptune's Bounty"); - Tooltip.SetDefault("Fires a trident that rains additional tridents as it travels/n" + + Tooltip.SetDefault("Fires a trident that rains additional tridents as it travels\n" + "Hitting enemies will inflict the crush depth debuff\n" + - "The lower the enemies' defense the more damage they take from this debuff"); + "The lower the enemies' defense, the more damage they take from this debuff"); } public override void SetDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index a227663b34..2c4bb8a4b7 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/Oracle.cs b/Items/Weapons/Melee/Oracle.cs index e93b77f3f5..6388bc5410 100644 --- a/Items/Weapons/Melee/Oracle.cs +++ b/Items/Weapons/Melee/Oracle.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 16f; item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.value = Item.buyPrice(platinum: 2, gold: 50); } diff --git a/Items/Weapons/Melee/PlagueKeeper.cs b/Items/Weapons/Melee/PlagueKeeper.cs index bb2efe07f2..119f6b0746 100644 --- a/Items/Weapons/Melee/PlagueKeeper.cs +++ b/Items/Weapons/Melee/PlagueKeeper.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 9f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/RedSun.cs b/Items/Weapons/Melee/RedSun.cs index 4920ef9c58..acfbd26958 100644 --- a/Items/Weapons/Melee/RedSun.cs +++ b/Items/Weapons/Melee/RedSun.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/Roxcalibur.cs b/Items/Weapons/Melee/Roxcalibur.cs index 4624070a39..2d6682b6a6 100644 --- a/Items/Weapons/Melee/Roxcalibur.cs +++ b/Items/Weapons/Melee/Roxcalibur.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Melee item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/RoyalKnivesMelee.cs b/Items/Weapons/Melee/RoyalKnivesMelee.cs index e5257b8fda..b8069cf1dc 100644 --- a/Items/Weapons/Melee/RoyalKnivesMelee.cs +++ b/Items/Weapons/Melee/RoyalKnivesMelee.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 9f; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/ScourgeoftheCosmos.cs b/Items/Weapons/Melee/ScourgeoftheCosmos.cs index 0467808069..ccfe4156f0 100644 --- a/Items/Weapons/Melee/ScourgeoftheCosmos.cs +++ b/Items/Weapons/Melee/ScourgeoftheCosmos.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/SolarFlare.cs b/Items/Weapons/Melee/SolarFlare.cs index 50db47237e..266c7959af 100644 --- a/Items/Weapons/Melee/SolarFlare.cs +++ b/Items/Weapons/Melee/SolarFlare.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 16f; item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.value = Item.buyPrice(platinum: 1, gold: 20); } } diff --git a/Items/Weapons/Melee/SolsticeClaymore.cs b/Items/Weapons/Melee/SolsticeClaymore.cs index f0c6822dad..5d9a48ade3 100644 --- a/Items/Weapons/Melee/SolsticeClaymore.cs +++ b/Items/Weapons/Melee/SolsticeClaymore.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/SoulEdge.cs b/Items/Weapons/Melee/SoulEdge.cs index b4919ba97f..313f6f4a40 100644 --- a/Items/Weapons/Melee/SoulEdge.cs +++ b/Items/Weapons/Melee/SoulEdge.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/SoulHarvester.png b/Items/Weapons/Melee/SoulHarvester.png index 5b55262a00..8e1c5d040f 100644 Binary files a/Items/Weapons/Melee/SoulHarvester.png and b/Items/Weapons/Melee/SoulHarvester.png differ diff --git a/Items/Weapons/Melee/SpatialLance.cs b/Items/Weapons/Melee/SpatialLance.cs index 18e6a8736f..348dfe9479 100644 --- a/Items/Weapons/Melee/SpatialLance.cs +++ b/Items/Weapons/Melee/SpatialLance.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/StellarContemptMelee.cs b/Items/Weapons/Melee/StellarContemptMelee.cs index 0b1b4cd8dc..716cea5214 100644 --- a/Items/Weapons/Melee/StellarContemptMelee.cs +++ b/Items/Weapons/Melee/StellarContemptMelee.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item1; item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.value = Item.buyPrice(1, 20, 0, 0); item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/StellarStriker.cs b/Items/Weapons/Melee/StellarStriker.cs index 7ce9f1a39a..2374549080 100644 --- a/Items/Weapons/Melee/StellarStriker.cs +++ b/Items/Weapons/Melee/StellarStriker.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Melee item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Melee/StreamGouge.cs b/Items/Weapons/Melee/StreamGouge.cs index a2231026d5..19c411dd09 100644 --- a/Items/Weapons/Melee/StreamGouge.cs +++ b/Items/Weapons/Melee/StreamGouge.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/Swordsplosion.cs b/Items/Weapons/Melee/Swordsplosion.cs index 8e4333333d..5f1b235dfe 100644 --- a/Items/Weapons/Melee/Swordsplosion.cs +++ b/Items/Weapons/Melee/Swordsplosion.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/TerrorBlade.cs b/Items/Weapons/Melee/TerrorBlade.cs index 42a23a0a76..e3cbcf53f9 100644 --- a/Items/Weapons/Melee/TerrorBlade.cs +++ b/Items/Weapons/Melee/TerrorBlade.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } 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 ebcfea6001..3c7e3163a9 100644 --- a/Items/Weapons/Melee/TheBurningSky.cs +++ b/Items/Weapons/Melee/TheBurningSky.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 35f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/TheEnforcer.cs b/Items/Weapons/Melee/TheEnforcer.cs index e044a95778..ed3ab18a5b 100644 --- a/Items/Weapons/Melee/TheEnforcer.cs +++ b/Items/Weapons/Melee/TheEnforcer.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Melee/TheLastMourning.cs b/Items/Weapons/Melee/TheLastMourning.cs index e5d460d631..d0815c3c7c 100644 --- a/Items/Weapons/Melee/TheLastMourning.cs +++ b/Items/Weapons/Melee/TheLastMourning.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item1; item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.value = Item.buyPrice(1, 40, 0, 0); } diff --git a/Items/Weapons/Melee/TheMutilator.cs b/Items/Weapons/Melee/TheMutilator.cs index 47f85a49a2..1041483cad 100644 --- a/Items/Weapons/Melee/TheMutilator.cs +++ b/Items/Weapons/Melee/TheMutilator.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; item.shootSpeed = 10f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } 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 6856c66a74..147e967a08 100644 --- a/Items/Weapons/Melee/TheObliterator.cs +++ b/Items/Weapons/Melee/TheObliterator.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 16f; item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; item.value = Item.buyPrice(platinum: 1, gold: 40); } } diff --git a/Items/Weapons/Melee/ThePlaguebringer.cs b/Items/Weapons/Melee/ThePlaguebringer.cs index 5657766a41..64867678b4 100644 --- a/Items/Weapons/Melee/ThePlaguebringer.cs +++ b/Items/Weapons/Melee/ThePlaguebringer.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee item.width = 30; item.height = 32; item.melee = true; - item.damage = 100; + item.damage = 66; item.knockBack = 2.5f; item.useTime = 22; item.useAnimation = 22; diff --git a/Items/Weapons/Melee/TriactisTruePaladinianMageHammerofMightMelee.cs b/Items/Weapons/Melee/TriactisTruePaladinianMageHammerofMightMelee.cs index fe458efd1a..2bfb276451 100644 --- a/Items/Weapons/Melee/TriactisTruePaladinianMageHammerofMightMelee.cs +++ b/Items/Weapons/Melee/TriactisTruePaladinianMageHammerofMightMelee.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 25f; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/TrueTyrantYharimsUltisword.cs b/Items/Weapons/Melee/TrueTyrantYharimsUltisword.cs index 150bc0af71..d93736f308 100644 --- a/Items/Weapons/Melee/TrueTyrantYharimsUltisword.cs +++ b/Items/Weapons/Melee/TrueTyrantYharimsUltisword.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/Verdant.cs b/Items/Weapons/Melee/Verdant.cs index 2fb5164206..730ac72254 100644 --- a/Items/Weapons/Melee/Verdant.cs +++ b/Items/Weapons/Melee/Verdant.cs @@ -11,7 +11,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Verdant"); - Tooltip.SetDefault("Fires crystal leaves when enemies are near\nAn exceptionally agile yoyo"); + Tooltip.SetDefault("Fires crystal leaves when enemies are near\n" + + "A very agile yoyo"); ItemID.Sets.Yoyo[item.type] = true; ItemID.Sets.GamepadExtraRange[item.type] = 15; ItemID.Sets.GamepadSmartQuickReach[item.type] = true; @@ -22,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee item.width = 30; item.height = 30; item.melee = true; - item.damage = 218; + item.damage = 128; item.knockBack = 6f; item.useTime = 22; item.useAnimation = 22; @@ -39,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.autoReuse = true; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.value = Item.buyPrice(platinum: 1, gold: 20); } diff --git a/Items/Weapons/Melee/YateveoBloom.cs b/Items/Weapons/Melee/YateveoBloom.cs index 22a1649246..4851938639 100644 --- a/Items/Weapons/Melee/YateveoBloom.cs +++ b/Items/Weapons/Melee/YateveoBloom.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item1; item.rare = 2; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.value = Item.buyPrice(0, 2, 0, 0); item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/AMR.cs b/Items/Weapons/Ranged/AMR.cs index e46b9a1b51..fab41ac3ce 100644 --- a/Items/Weapons/Ranged/AMR.cs +++ b/Items/Weapons/Ranged/AMR.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 12f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/AcesHigh.cs b/Items/Weapons/Ranged/AcesHigh.cs index dc79f6efb2..8cfe3189e9 100644 --- a/Items/Weapons/Ranged/AcesHigh.cs +++ b/Items/Weapons/Ranged/AcesHigh.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shootSpeed = 24f; item.shoot = ModContent.ProjectileType(); item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Alluvion.cs b/Items/Weapons/Ranged/Alluvion.cs index 448268b588..e7422b617a 100644 --- a/Items/Weapons/Ranged/Alluvion.cs +++ b/Items/Weapons/Ranged/Alluvion.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 1; item.shootSpeed = 17f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Ranged/AngelicShotgun.cs b/Items/Weapons/Ranged/AngelicShotgun.cs index a01e5cb60e..f5cf3a8766 100644 --- a/Items/Weapons/Ranged/AngelicShotgun.cs +++ b/Items/Weapons/Ranged/AngelicShotgun.cs @@ -38,7 +38,7 @@ Fighting 'til the war's won"); item.rare = 10; item.value = Item.buyPrice(1, 20, 0, 0); - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.shootSpeed = BulletSpeed; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/Arbalest.cs b/Items/Weapons/Ranged/Arbalest.cs index 46141c8dcb..dbb5d98e0b 100644 --- a/Items/Weapons/Ranged/Arbalest.cs +++ b/Items/Weapons/Ranged/Arbalest.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 10f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Ranged/ArterialAssault.cs b/Items/Weapons/Ranged/ArterialAssault.cs index c09bc0a264..7bc4a3bd7e 100644 --- a/Items/Weapons/Ranged/ArterialAssault.cs +++ b/Items/Weapons/Ranged/ArterialAssault.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 30f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void AddRecipes() diff --git a/Items/Weapons/Ranged/BlissfulBombardier.cs b/Items/Weapons/Ranged/BlissfulBombardier.cs index ae3b43c26c..713d9aa80b 100644 --- a/Items/Weapons/Ranged/BlissfulBombardier.cs +++ b/Items/Weapons/Ranged/BlissfulBombardier.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shootSpeed = 24f; item.shoot = ModContent.ProjectileType(); item.useAmmo = 771; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/BlossomFlux.cs b/Items/Weapons/Ranged/BlossomFlux.cs index 5315af2db9..0fdd171705 100644 --- a/Items/Weapons/Ranged/BlossomFlux.cs +++ b/Items/Weapons/Ranged/BlossomFlux.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 17; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Ranged/ChickenCannon.cs b/Items/Weapons/Ranged/ChickenCannon.cs index 6a89ba593b..eaf9543241 100644 --- a/Items/Weapons/Ranged/ChickenCannon.cs +++ b/Items/Weapons/Ranged/ChickenCannon.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shootSpeed = 24f; item.shoot = ModContent.ProjectileType(); item.useAmmo = 771; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/ClaretCannon.cs b/Items/Weapons/Ranged/ClaretCannon.cs index 0b2f0dbb5b..9c24bfb9e2 100644 --- a/Items/Weapons/Ranged/ClaretCannon.cs +++ b/Items/Weapons/Ranged/ClaretCannon.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shootSpeed = 24f; item.shoot = ModContent.ProjectileType(); item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/CleansingBlaze.cs b/Items/Weapons/Ranged/CleansingBlaze.cs index 7677d818b9..79cb7ae596 100644 --- a/Items/Weapons/Ranged/CleansingBlaze.cs +++ b/Items/Weapons/Ranged/CleansingBlaze.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14f; item.useAmmo = 23; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Ranged/ClockworkBow.cs b/Items/Weapons/Ranged/ClockworkBow.cs index 29eca1822c..41bf9ce578 100644 --- a/Items/Weapons/Ranged/ClockworkBow.cs +++ b/Items/Weapons/Ranged/ClockworkBow.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 30f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Ranged/Contagion.cs b/Items/Weapons/Ranged/Contagion.cs index 26308fdef4..645ba6085d 100644 --- a/Items/Weapons/Ranged/Contagion.cs +++ b/Items/Weapons/Ranged/Contagion.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Ranged/DaemonsFlame.cs b/Items/Weapons/Ranged/DaemonsFlame.cs index c9cd86b2db..65ec6f5800 100644 --- a/Items/Weapons/Ranged/DaemonsFlame.cs +++ b/Items/Weapons/Ranged/DaemonsFlame.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Ranged/Deathwind.cs b/Items/Weapons/Ranged/Deathwind.cs index 607bd17aa1..9b04611136 100644 --- a/Items/Weapons/Ranged/Deathwind.cs +++ b/Items/Weapons/Ranged/Deathwind.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Ranged/DodusHandcannon.cs b/Items/Weapons/Ranged/DodusHandcannon.cs index 7323a9c23e..439445107c 100644 --- a/Items/Weapons/Ranged/DodusHandcannon.cs +++ b/Items/Weapons/Ranged/DodusHandcannon.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LargeWeaponFire"); diff --git a/Items/Weapons/Ranged/DragonsBreath.cs b/Items/Weapons/Ranged/DragonsBreath.cs index 0efe260b0d..75d25cade5 100644 --- a/Items/Weapons/Ranged/DragonsBreath.cs +++ b/Items/Weapons/Ranged/DragonsBreath.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 12f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Drataliornus.cs b/Items/Weapons/Ranged/Drataliornus.cs index c8bd9ed6a4..3b9e864a60 100644 --- a/Items/Weapons/Ranged/Drataliornus.cs +++ b/Items/Weapons/Ranged/Drataliornus.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; -using CalamityMod.Items.Placeables.Ores; using CalamityMod.Items.Weapons.Summon; using CalamityMod.Projectiles.Ranged; using CalamityMod.Tiles.Furniture.CraftingStations; @@ -25,7 +24,7 @@ Right click to fire two devastating barrages of five empowered fireballs. public override void SetDefaults() { - item.damage = 640; + item.damage = 700; item.knockBack = 1f; item.shootSpeed = 18f; item.useStyle = 5; @@ -45,7 +44,7 @@ Right click to fire two devastating barrages of five empowered fireballs. item.useTurn = false; item.useAmmo = AmmoID.Arrow; item.autoReuse = true; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Ranged/ElementalBlaster.cs b/Items/Weapons/Ranged/ElementalBlaster.cs index d439cb6d28..6f962e4f9b 100644 --- a/Items/Weapons/Ranged/ElementalBlaster.cs +++ b/Items/Weapons/Ranged/ElementalBlaster.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 18f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/ElementalEruption.cs b/Items/Weapons/Ranged/ElementalEruption.cs index 2059db310d..1c11f4e444 100644 --- a/Items/Weapons/Ranged/ElementalEruption.cs +++ b/Items/Weapons/Ranged/ElementalEruption.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.useAmmo = 23; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/FlurrystormCannon.cs b/Items/Weapons/Ranged/FlurrystormCannon.cs index 5fe7621314..4966c4dadc 100644 --- a/Items/Weapons/Ranged/FlurrystormCannon.cs +++ b/Items/Weapons/Ranged/FlurrystormCannon.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.useAmmo = AmmoID.Snowball; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.shootSpeed = 18f; } diff --git a/Items/Weapons/Ranged/GoldenEagle.cs b/Items/Weapons/Ranged/GoldenEagle.cs index 80a2024543..80fbac4ef2 100644 --- a/Items/Weapons/Ranged/GoldenEagle.cs +++ b/Items/Weapons/Ranged/GoldenEagle.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 20f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/HalleysInferno.cs b/Items/Weapons/Ranged/HalleysInferno.cs index 1674654ff2..9520c9fdc6 100644 --- a/Items/Weapons/Ranged/HalleysInferno.cs +++ b/Items/Weapons/Ranged/HalleysInferno.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.UseSound = SoundID.Item34; item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14.6f; diff --git a/Items/Weapons/Ranged/HandheldTank.cs b/Items/Weapons/Ranged/HandheldTank.cs index e43c4a81c7..4e1c3032dd 100644 --- a/Items/Weapons/Ranged/HandheldTank.cs +++ b/Items/Weapons/Ranged/HandheldTank.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; diff --git a/Items/Weapons/Ranged/HeavenlyGale.cs b/Items/Weapons/Ranged/HeavenlyGale.cs index 6aa03a8d8d..591ffedf9a 100644 --- a/Items/Weapons/Ranged/HeavenlyGale.cs +++ b/Items/Weapons/Ranged/HeavenlyGale.cs @@ -1,5 +1,4 @@ using CalamityMod.Items.Materials; -using CalamityMod.Items.Placeables.Ores; using CalamityMod.Projectiles.Ranged; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; @@ -24,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 570; + item.damage = 720; item.ranged = true; item.width = 44; item.height = 58; @@ -40,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 1; item.shootSpeed = 17f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Ranged/Hellborn.cs b/Items/Weapons/Ranged/Hellborn.cs index 4da4264576..8193f63878 100644 --- a/Items/Weapons/Ranged/Hellborn.cs +++ b/Items/Weapons/Ranged/Hellborn.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 14f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Ranged/Infinity.cs b/Items/Weapons/Ranged/Infinity.cs index 5a1b797703..a7d55b5804 100644 --- a/Items/Weapons/Ranged/Infinity.cs +++ b/Items/Weapons/Ranged/Infinity.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 12f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Interfacer.cs b/Items/Weapons/Ranged/Interfacer.cs index 88084ea48f..f709664990 100644 --- a/Items/Weapons/Ranged/Interfacer.cs +++ b/Items/Weapons/Ranged/Interfacer.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shootSpeed = 13f; item.shoot = 10; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Karasawa.cs b/Items/Weapons/Ranged/Karasawa.cs index 65ddb16335..3b285c3522 100644 --- a/Items/Weapons/Ranged/Karasawa.cs +++ b/Items/Weapons/Ranged/Karasawa.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.value = Item.buyPrice(1, 80, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 1f; diff --git a/Items/Weapons/Ranged/LeadWizard.cs b/Items/Weapons/Ranged/LeadWizard.cs index fa42d96fdb..dcaa615f70 100644 --- a/Items/Weapons/Ranged/LeadWizard.cs +++ b/Items/Weapons/Ranged/LeadWizard.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 20f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/MagnomalyCannon.cs b/Items/Weapons/Ranged/MagnomalyCannon.cs index edd77f00ab..1ce9908c0b 100644 --- a/Items/Weapons/Ranged/MagnomalyCannon.cs +++ b/Items/Weapons/Ranged/MagnomalyCannon.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; item.useAmmo = 771; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Megafleet.cs b/Items/Weapons/Ranged/Megafleet.cs index 5644d6ef22..bc000c72d3 100644 --- a/Items/Weapons/Ranged/Megafleet.cs +++ b/Items/Weapons/Ranged/Megafleet.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 18f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Minigun.cs b/Items/Weapons/Ranged/Minigun.cs index bc4422ad56..e5f29a1062 100644 --- a/Items/Weapons/Ranged/Minigun.cs +++ b/Items/Weapons/Ranged/Minigun.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 22f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/MolecularManipulator.cs b/Items/Weapons/Ranged/MolecularManipulator.cs index 4c2bfbbc23..cfc0c3929e 100644 --- a/Items/Weapons/Ranged/MolecularManipulator.cs +++ b/Items/Weapons/Ranged/MolecularManipulator.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.autoReuse = true; item.shootSpeed = 25f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/NettlelineGreatbow.cs b/Items/Weapons/Ranged/NettlelineGreatbow.cs index 20d930686c..4d81612587 100644 --- a/Items/Weapons/Ranged/NettlelineGreatbow.cs +++ b/Items/Weapons/Ranged/NettlelineGreatbow.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 16f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Ranged/Norfleet.cs b/Items/Weapons/Ranged/Norfleet.cs index 75c5d72542..ee010d0502 100644 --- a/Items/Weapons/Ranged/Norfleet.cs +++ b/Items/Weapons/Ranged/Norfleet.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.useTurn = false; item.useAmmo = 75; item.autoReuse = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Ranged/OnyxChainBlaster.cs b/Items/Weapons/Ranged/OnyxChainBlaster.cs index 79d0f8293a..1d91ff0cac 100644 --- a/Items/Weapons/Ranged/OnyxChainBlaster.cs +++ b/Items/Weapons/Ranged/OnyxChainBlaster.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 24f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Onyxia.cs b/Items/Weapons/Ranged/Onyxia.cs index 92bc722f6b..0e269619a7 100644 --- a/Items/Weapons/Ranged/Onyxia.cs +++ b/Items/Weapons/Ranged/Onyxia.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 28f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/PearlGod.cs b/Items/Weapons/Ranged/PearlGod.cs index a4e228fdc4..9a7dafaf4a 100644 --- a/Items/Weapons/Ranged/PearlGod.cs +++ b/Items/Weapons/Ranged/PearlGod.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shootSpeed = 24f; item.shoot = ModContent.ProjectileType(); item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Phangasm.cs b/Items/Weapons/Ranged/Phangasm.cs index af13c501d6..59667ebada 100644 --- a/Items/Weapons/Ranged/Phangasm.cs +++ b/Items/Weapons/Ranged/Phangasm.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Ranged/Photoviscerator.cs b/Items/Weapons/Ranged/Photoviscerator.cs index 3b26f500c5..7d00b487e4 100644 --- a/Items/Weapons/Ranged/Photoviscerator.cs +++ b/Items/Weapons/Ranged/Photoviscerator.cs @@ -1,5 +1,4 @@ using CalamityMod.Items.Materials; -using CalamityMod.Items.Placeables.Ores; using CalamityMod.Projectiles.Ranged; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; @@ -20,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 250; + item.damage = 280; item.ranged = true; item.width = 84; item.height = 30; @@ -36,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; item.useAmmo = 23; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/PlanetaryAnnihilation.cs b/Items/Weapons/Ranged/PlanetaryAnnihilation.cs index b699dd4f3e..fe4b128171 100644 --- a/Items/Weapons/Ranged/PlanetaryAnnihilation.cs +++ b/Items/Weapons/Ranged/PlanetaryAnnihilation.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/SDFMG.cs b/Items/Weapons/Ranged/SDFMG.cs index 39e2ef6cfc..2828158778 100644 --- a/Items/Weapons/Ranged/SDFMG.cs +++ b/Items/Weapons/Ranged/SDFMG.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 16f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Seadragon.cs b/Items/Weapons/Ranged/Seadragon.cs index 8a81c6e6d9..2834b9a04d 100644 --- a/Items/Weapons/Ranged/Seadragon.cs +++ b/Items/Weapons/Ranged/Seadragon.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 16f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/SeasSearing.cs b/Items/Weapons/Ranged/SeasSearing.cs index 8ab876dfba..4da8202ed2 100644 --- a/Items/Weapons/Ranged/SeasSearing.cs +++ b/Items/Weapons/Ranged/SeasSearing.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.knockBack = 5f; item.rare = 5; item.value = Item.buyPrice(0, 36, 0, 0); - item.Calamity().postMoonLordRarity = 17; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; item.UseSound = SoundID.Item11; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/SepticSkewer.cs b/Items/Weapons/Ranged/SepticSkewer.cs index a3d08f52ac..62b6b11b5c 100644 --- a/Items/Weapons/Ranged/SepticSkewer.cs +++ b/Items/Weapons/Ranged/SepticSkewer.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.knockBack = 7.5f; item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.UseSound = SoundID.Item10; item.autoReuse = true; item.shootSpeed = 25f; diff --git a/Items/Weapons/Ranged/Shredder.cs b/Items/Weapons/Ranged/Shredder.cs index 75d7f8891a..1ed0c63fd8 100644 --- a/Items/Weapons/Ranged/Shredder.cs +++ b/Items/Weapons/Ranged/Shredder.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 12f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Skullmasher.cs b/Items/Weapons/Ranged/Skullmasher.cs index 17ccb25930..7208b6c37b 100644 --- a/Items/Weapons/Ranged/Skullmasher.cs +++ b/Items/Weapons/Ranged/Skullmasher.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 12f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/SomaPrime.cs b/Items/Weapons/Ranged/SomaPrime.cs index 196e15b089..b9131ab884 100644 --- a/Items/Weapons/Ranged/SomaPrime.cs +++ b/Items/Weapons/Ranged/SomaPrime.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 30f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Spyker.cs b/Items/Weapons/Ranged/Spyker.cs index 9cd282e254..4cba9ae60c 100644 --- a/Items/Weapons/Ranged/Spyker.cs +++ b/Items/Weapons/Ranged/Spyker.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shootSpeed = 9f; item.shoot = ModContent.ProjectileType(); item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Starfleet.cs b/Items/Weapons/Ranged/Starfleet.cs index 65f59c3e34..bc079179e5 100644 --- a/Items/Weapons/Ranged/Starfleet.cs +++ b/Items/Weapons/Ranged/Starfleet.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; item.useAmmo = 75; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/StarfleetMK2.cs b/Items/Weapons/Ranged/StarfleetMK2.cs index 30d3ed7685..e00d679049 100644 --- a/Items/Weapons/Ranged/StarfleetMK2.cs +++ b/Items/Weapons/Ranged/StarfleetMK2.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.useTurn = false; item.useAmmo = 75; item.autoReuse = true; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Ranged/StormDragoon.cs b/Items/Weapons/Ranged/StormDragoon.cs index 050aa4e27b..1678fb6ea7 100644 --- a/Items/Weapons/Ranged/StormDragoon.cs +++ b/Items/Weapons/Ranged/StormDragoon.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = 10; item.shootSpeed = 18f; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/SulphuricAcidCannon.cs b/Items/Weapons/Ranged/SulphuricAcidCannon.cs index 57a4e63954..aba0c12e73 100644 --- a/Items/Weapons/Ranged/SulphuricAcidCannon.cs +++ b/Items/Weapons/Ranged/SulphuricAcidCannon.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.UseSound = SoundID.Item95; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/Svantechnical.cs b/Items/Weapons/Ranged/Svantechnical.cs index 428427e1a6..c5e1ca1859 100644 --- a/Items/Weapons/Ranged/Svantechnical.cs +++ b/Items/Weapons/Ranged/Svantechnical.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shootSpeed = 12f; item.shoot = 10; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/TelluricGlare.cs b/Items/Weapons/Ranged/TelluricGlare.cs index 2db3e8a18e..e85901230c 100644 --- a/Items/Weapons/Ranged/TelluricGlare.cs +++ b/Items/Weapons/Ranged/TelluricGlare.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Ranged/ThePack.cs b/Items/Weapons/Ranged/ThePack.cs index 13f769d45a..ee0a5f47b7 100644 --- a/Items/Weapons/Ranged/ThePack.cs +++ b/Items/Weapons/Ranged/ThePack.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.knockBack = 7.5f; item.value = Item.buyPrice(1, 80, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.UseSound = SoundID.Item11; item.autoReuse = true; item.shootSpeed = 24f; diff --git a/Items/Weapons/Ranged/TheStorm.cs b/Items/Weapons/Ranged/TheStorm.cs index a68c24eadc..2c043519d2 100644 --- a/Items/Weapons/Ranged/TheStorm.cs +++ b/Items/Weapons/Ranged/TheStorm.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 28f; item.useAmmo = 40; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Ranged/TrueConferenceCall.cs b/Items/Weapons/Ranged/TrueConferenceCall.cs index 014adcfe3f..e4251e1b61 100644 --- a/Items/Weapons/Ranged/TrueConferenceCall.cs +++ b/Items/Weapons/Ranged/TrueConferenceCall.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shootSpeed = 18f; item.shoot = 10; item.useAmmo = 97; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/WulfrumBow.cs b/Items/Weapons/Ranged/WulfrumBow.cs index 3cbde50fca..a5b7b24805 100644 --- a/Items/Weapons/Ranged/WulfrumBow.cs +++ b/Items/Weapons/Ranged/WulfrumBow.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.value = Item.buyPrice(0, 1, 0, 0); item.rare = 1; item.UseSound = SoundID.Item5; - item.autoReuse = true; + item.autoReuse = false; item.shoot = 10; item.shootSpeed = 12f; item.useAmmo = 40; diff --git a/Items/Weapons/Rogue/AccretionDisk.cs b/Items/Weapons/Rogue/AccretionDisk.cs index 5b4d03feb7..3dd455302b 100644 --- a/Items/Weapons/Rogue/AccretionDisk.cs +++ b/Items/Weapons/Rogue/AccretionDisk.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 13f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Rogue/AlphaVirus.cs b/Items/Weapons/Rogue/AlphaVirus.cs index 5022651efa..a2563c0223 100644 --- a/Items/Weapons/Rogue/AlphaVirus.cs +++ b/Items/Weapons/Rogue/AlphaVirus.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 4f; item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; item.Calamity().rogue = true; } diff --git a/Items/Weapons/Rogue/BloodsoakedCrasher.cs b/Items/Weapons/Rogue/BloodsoakedCrasher.cs index b58d020088..9d6ce42eb2 100644 --- a/Items/Weapons/Rogue/BloodsoakedCrasher.cs +++ b/Items/Weapons/Rogue/BloodsoakedCrasher.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.height = 64; item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; item.Calamity().rogue = true; diff --git a/Items/Weapons/Rogue/Celestus.cs b/Items/Weapons/Rogue/Celestus.cs index e9b432db50..98e59077b4 100644 --- a/Items/Weapons/Rogue/Celestus.cs +++ b/Items/Weapons/Rogue/Celestus.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 20; - item.damage = 850; + item.damage = 940; item.noMelee = true; item.noUseGraphic = true; item.autoReuse = true; @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 25f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/CorpusAvertor.cs b/Items/Weapons/Rogue/CorpusAvertor.cs index f263e96016..855a99e517 100644 --- a/Items/Weapons/Rogue/CorpusAvertor.cs +++ b/Items/Weapons/Rogue/CorpusAvertor.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.autoReuse = true; item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; item.Calamity().rogue = true; diff --git a/Items/Weapons/Rogue/CosmicKunai.cs b/Items/Weapons/Rogue/CosmicKunai.cs index 209019b84d..a65566c3af 100644 --- a/Items/Weapons/Rogue/CosmicKunai.cs +++ b/Items/Weapons/Rogue/CosmicKunai.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shootSpeed = 28f; item.rare = 9; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/DeepSeaDumbbell.cs b/Items/Weapons/Rogue/DeepSeaDumbbell.cs index 38d0bfd739..e0814e9fd0 100644 --- a/Items/Weapons/Rogue/DeepSeaDumbbell.cs +++ b/Items/Weapons/Rogue/DeepSeaDumbbell.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Rogue/DeificThunderbolt.cs b/Items/Weapons/Rogue/DeificThunderbolt.cs new file mode 100644 index 0000000000..9b11ace49d --- /dev/null +++ b/Items/Weapons/Rogue/DeificThunderbolt.cs @@ -0,0 +1,75 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Rogue; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class DeificThunderbolt : RogueWeapon + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Deific Thunderbolt"); + Tooltip.SetDefault(@"Fires a lightning bolt to electrocute enemies +The lightning bolt travels faster while it is raining +Summons lightning from the sky on impact +Stealth strikes summon more lightning and travel faster"); + } + + public override void SafeSetDefaults() + { + item.damage = 567; + item.knockBack = 10f; + item.crit += 12; + + item.width = 56; + item.height = 56; + item.useStyle = 1; + item.noMelee = true; + item.noUseGraphic = true; + + item.value = Item.buyPrice(1, 40, 0, 0); + item.useTime = 21; + item.useAnimation = 21; + item.rare = 10; + item.Calamity().customRarity = CalamityRarity.PureGreen; //13 + item.Calamity().rogue = true; + + item.autoReuse = true; + item.shootSpeed = 13.69f; + item.shoot = ModContent.ProjectileType(); + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + float stealthSpeedMult = 1f; + if (player.Calamity().StealthStrikeAvailable()) + stealthSpeedMult = 1.5f; + float rainSpeedMult = 1f; + if (Main.raining) + rainSpeedMult = 1.5f; + + int thunder = Projectile.NewProjectile(position.X, position.Y, speedX * rainSpeedMult * stealthSpeedMult, speedY * rainSpeedMult * stealthSpeedMult, type, damage, knockBack, player.whoAmI, 0f, 0f); + if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike + { + Main.projectile[thunder].Calamity().stealthStrike = true; + } + return false; + } + + public override void AddRecipes() + { + + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ModContent.ItemType(), 15); + recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/Rogue/DeificThunderbolt.png b/Items/Weapons/Rogue/DeificThunderbolt.png new file mode 100644 index 0000000000..48a95983d6 Binary files /dev/null and b/Items/Weapons/Rogue/DeificThunderbolt.png differ diff --git a/Items/Weapons/Rogue/DuneHopper.cs b/Items/Weapons/Rogue/DuneHopper.cs index 2b85dea96b..20070dd84d 100644 --- a/Items/Weapons/Rogue/DuneHopper.cs +++ b/Items/Weapons/Rogue/DuneHopper.cs @@ -33,7 +33,7 @@ Stealth strikes throws three high speed spears"); item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index aedb9b1a8a..43639da00c 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.height = 72; item.value = Item.buyPrice(1, 80, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; item.Calamity().rogue = true; diff --git a/Items/Weapons/Rogue/EmpyreanKnivesThrown.cs b/Items/Weapons/Rogue/EmpyreanKnivesThrown.cs index 9c5fdb960c..d61e8f05fc 100644 --- a/Items/Weapons/Rogue/EmpyreanKnivesThrown.cs +++ b/Items/Weapons/Rogue/EmpyreanKnivesThrown.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/Eradicator.cs b/Items/Weapons/Rogue/Eradicator.cs index 25eddf7d29..64310e3584 100644 --- a/Items/Weapons/Rogue/Eradicator.cs +++ b/Items/Weapons/Rogue/Eradicator.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Rogue/ExecutionersBlade.cs b/Items/Weapons/Rogue/ExecutionersBlade.cs index 269c8b34a1..72fe50b415 100644 --- a/Items/Weapons/Rogue/ExecutionersBlade.cs +++ b/Items/Weapons/Rogue/ExecutionersBlade.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 26f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Rogue/GalaxySmasherRogue.cs b/Items/Weapons/Rogue/GalaxySmasherRogue.cs index 9ccadbd91d..8230867646 100644 --- a/Items/Weapons/Rogue/GalaxySmasherRogue.cs +++ b/Items/Weapons/Rogue/GalaxySmasherRogue.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.UseSound = SoundID.Item1; item.rare = 10; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; item.value = Item.buyPrice(1, 80, 0, 0); item.Calamity().rogue = true; diff --git a/Items/Weapons/Rogue/GhoulishGouger.cs b/Items/Weapons/Rogue/GhoulishGouger.cs index 50fc0240ae..ec28b21cf0 100644 --- a/Items/Weapons/Rogue/GhoulishGouger.cs +++ b/Items/Weapons/Rogue/GhoulishGouger.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Rogue/GodsParanoia.cs b/Items/Weapons/Rogue/GodsParanoia.cs index 17b9e96216..b684ccd42a 100644 --- a/Items/Weapons/Rogue/GodsParanoia.cs +++ b/Items/Weapons/Rogue/GodsParanoia.cs @@ -38,7 +38,7 @@ Right click to delete all existing spiky balls"); item.knockBack = knockBack; item.value = Item.buyPrice(0, 18, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; item.UseSound = SoundID.Item1; item.autoReuse = true; item.maxStack = 10; diff --git a/Items/Weapons/Rogue/HellsSun.cs b/Items/Weapons/Rogue/HellsSun.cs index 051015b9d6..02572281ba 100644 --- a/Items/Weapons/Rogue/HellsSun.cs +++ b/Items/Weapons/Rogue/HellsSun.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.knockBack = knockBack; item.value = Item.buyPrice(0, 12, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 12;; + item.Calamity().customRarity = CalamityRarity.Turquoise;; item.UseSound = SoundID.Item1; item.autoReuse = true; item.maxStack = 10; diff --git a/Items/Weapons/Rogue/Hypothermia.cs b/Items/Weapons/Rogue/Hypothermia.cs index 5b39ecbc66..9755c7b594 100644 --- a/Items/Weapons/Rogue/Hypothermia.cs +++ b/Items/Weapons/Rogue/Hypothermia.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 8f; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; item.Calamity().rogue = true; } diff --git a/Items/Weapons/Rogue/IronFrancisca.cs b/Items/Weapons/Rogue/IronFrancisca.cs index 660ed4695c..dee5566fa7 100644 --- a/Items/Weapons/Rogue/IronFrancisca.cs +++ b/Items/Weapons/Rogue/IronFrancisca.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.useTime = 15; item.knockBack = 1f; item.UseSound = SoundID.Item1; - item.autoReuse = true; + item.autoReuse = false; item.height = 36; item.maxStack = 999; item.value = 1000; diff --git a/Items/Weapons/Rogue/JawsOfOblivion.cs b/Items/Weapons/Rogue/JawsOfOblivion.cs index b36ae5e430..cf59053e0c 100644 --- a/Items/Weapons/Rogue/JawsOfOblivion.cs +++ b/Items/Weapons/Rogue/JawsOfOblivion.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 25f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; item.Calamity().rogue = true; } diff --git a/Items/Weapons/Rogue/KelvinCatalyst.cs b/Items/Weapons/Rogue/KelvinCatalyst.cs index 76077d81f2..ab79e1d97b 100644 --- a/Items/Weapons/Rogue/KelvinCatalyst.cs +++ b/Items/Weapons/Rogue/KelvinCatalyst.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 8f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/LeadTomahawk.cs b/Items/Weapons/Rogue/LeadTomahawk.cs index c10e4a0b2f..08cd0829c1 100644 --- a/Items/Weapons/Rogue/LeadTomahawk.cs +++ b/Items/Weapons/Rogue/LeadTomahawk.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.useTime = 15; item.knockBack = 1f; item.UseSound = SoundID.Item1; - item.autoReuse = true; + item.autoReuse = false; item.height = 36; item.maxStack = 999; item.value = 1000; diff --git a/Items/Weapons/Rogue/LunarKunai.cs b/Items/Weapons/Rogue/LunarKunai.cs index 6d0ade36c0..a3b0f827c8 100644 --- a/Items/Weapons/Rogue/LunarKunai.cs +++ b/Items/Weapons/Rogue/LunarKunai.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 22f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.Calamity().rogue = true; } diff --git a/Items/Weapons/Rogue/Malachite.cs b/Items/Weapons/Rogue/Malachite.cs index c8749b2d9b..d7a1285cf9 100644 --- a/Items/Weapons/Rogue/Malachite.cs +++ b/Items/Weapons/Rogue/Malachite.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 17; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Rogue/MoltenAmputator.cs b/Items/Weapons/Rogue/MoltenAmputator.cs index 05443b3cb8..7b3cd734cb 100644 --- a/Items/Weapons/Rogue/MoltenAmputator.cs +++ b/Items/Weapons/Rogue/MoltenAmputator.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/NanoblackReaperRogue.cs b/Items/Weapons/Rogue/NanoblackReaperRogue.cs index 3af840fbb6..a4234a6dd9 100644 --- a/Items/Weapons/Rogue/NanoblackReaperRogue.cs +++ b/Items/Weapons/Rogue/NanoblackReaperRogue.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.UseSound = SoundID.Item18; item.rare = 10; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; item.value = Item.buyPrice(5, 0, 0, 0); item.Calamity().rogue = true; diff --git a/Items/Weapons/Rogue/NastyCholla.cs b/Items/Weapons/Rogue/NastyCholla.cs index 84b0b01ee7..ac27606130 100644 --- a/Items/Weapons/Rogue/NastyCholla.cs +++ b/Items/Weapons/Rogue/NastyCholla.cs @@ -59,7 +59,7 @@ Stealth strikes throw five at once"); public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.Cactus, 2); + recipe.AddIngredient(ItemID.Cactus, 3); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(this, 15); recipe.AddRecipe(); diff --git a/Items/Weapons/Rogue/NightsGaze.cs b/Items/Weapons/Rogue/NightsGaze.cs index 0c6de3cb11..88cb5fe336 100644 --- a/Items/Weapons/Rogue/NightsGaze.cs +++ b/Items/Weapons/Rogue/NightsGaze.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 30f; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; item.Calamity().rogue = true; } diff --git a/Items/Weapons/Rogue/Penumbra.cs b/Items/Weapons/Rogue/Penumbra.cs index 4f153d8685..aaadd0afd8 100644 --- a/Items/Weapons/Rogue/Penumbra.cs +++ b/Items/Weapons/Rogue/Penumbra.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = ShootSpeed; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; item.Calamity().rogue = true; } diff --git a/Items/Weapons/Rogue/PhantasmalRuin.cs b/Items/Weapons/Rogue/PhantasmalRuin.cs index aef6824c7a..7b6882864b 100644 --- a/Items/Weapons/Rogue/PhantasmalRuin.cs +++ b/Items/Weapons/Rogue/PhantasmalRuin.cs @@ -33,7 +33,7 @@ Stealth strikes summon ghost clones instead of lost souls"); item.useAnimation = 25; item.UseSound = SoundID.Item1; item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; item.Calamity().rogue = true; item.autoReuse = true; diff --git a/Items/Weapons/Rogue/Plaguenade.cs b/Items/Weapons/Rogue/Plaguenade.cs index 3e6be11d3b..b181d4091a 100644 --- a/Items/Weapons/Rogue/Plaguenade.cs +++ b/Items/Weapons/Rogue/Plaguenade.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index b55426104b..6bb3d09553 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -33,7 +33,7 @@ Stealth strikes spawn smaller spears to fly along side it"); item.useAnimation = 15; item.UseSound = SoundID.Item1; item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.Calamity().rogue = true; item.autoReuse = true; diff --git a/Items/Weapons/Rogue/ProfanedTrident.cs b/Items/Weapons/Rogue/ProfanedTrident.cs index b7481dff91..8e96469cc2 100644 --- a/Items/Weapons/Rogue/ProfanedTrident.cs +++ b/Items/Weapons/Rogue/ProfanedTrident.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 28f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } } } diff --git a/Items/Weapons/Rogue/Quasar.cs b/Items/Weapons/Rogue/Quasar.cs index 0835d99ffe..cf4e42f337 100644 --- a/Items/Weapons/Rogue/Quasar.cs +++ b/Items/Weapons/Rogue/Quasar.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/RoyalKnives.cs b/Items/Weapons/Rogue/RoyalKnives.cs index 191204a525..6784809e99 100644 --- a/Items/Weapons/Rogue/RoyalKnives.cs +++ b/Items/Weapons/Rogue/RoyalKnives.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 9f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/ScarletDevil.cs b/Items/Weapons/Rogue/ScarletDevil.cs index b49d7a4cfd..03e4534a45 100644 --- a/Items/Weapons/Rogue/ScarletDevil.cs +++ b/Items/Weapons/Rogue/ScarletDevil.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 30f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void AddRecipes() diff --git a/Items/Weapons/Rogue/ScourgeoftheCosmosThrown.cs b/Items/Weapons/Rogue/ScourgeoftheCosmosThrown.cs index 601b5fd819..e91862d664 100644 --- a/Items/Weapons/Rogue/ScourgeoftheCosmosThrown.cs +++ b/Items/Weapons/Rogue/ScourgeoftheCosmosThrown.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/ShatteredSun.cs b/Items/Weapons/Rogue/ShatteredSun.cs index f4648891f5..ec10eaa50e 100644 --- a/Items/Weapons/Rogue/ShatteredSun.cs +++ b/Items/Weapons/Rogue/ShatteredSun.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 25f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Rogue/SpearofDestiny.cs b/Items/Weapons/Rogue/SpearofDestiny.cs index 6e5858bdcb..dff97777b8 100644 --- a/Items/Weapons/Rogue/SpearofDestiny.cs +++ b/Items/Weapons/Rogue/SpearofDestiny.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/StellarContemptRogue.cs b/Items/Weapons/Rogue/StellarContemptRogue.cs index dc08796548..8e410b1a3e 100644 --- a/Items/Weapons/Rogue/StellarContemptRogue.cs +++ b/Items/Weapons/Rogue/StellarContemptRogue.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.UseSound = SoundID.Item1; item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.value = Item.buyPrice(1, 20, 0, 0); item.Calamity().rogue = true; diff --git a/Items/Weapons/Rogue/Supernova.cs b/Items/Weapons/Rogue/Supernova.cs index 2c94805a36..0fd1ff9caf 100644 --- a/Items/Weapons/Rogue/Supernova.cs +++ b/Items/Weapons/Rogue/Supernova.cs @@ -21,7 +21,7 @@ Stealth strikes release energy as they fly"); public override void SafeSetDefaults() { item.width = 34; - item.damage = 1349; + item.damage = 1800; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 24; @@ -36,7 +36,7 @@ Stealth strikes release energy as they fly"); item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/SylvanSlasher.cs b/Items/Weapons/Rogue/SylvanSlasher.cs index ed2e940fce..9a8288fc70 100644 --- a/Items/Weapons/Rogue/SylvanSlasher.cs +++ b/Items/Weapons/Rogue/SylvanSlasher.cs @@ -31,7 +31,7 @@ Does not consume stealth and cannot stealth strike"); item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/TarragonThrowingDart.cs b/Items/Weapons/Rogue/TarragonThrowingDart.cs index 0ca22238bd..52b172f6d0 100644 --- a/Items/Weapons/Rogue/TarragonThrowingDart.cs +++ b/Items/Weapons/Rogue/TarragonThrowingDart.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Rogue/TheReaper.cs b/Items/Weapons/Rogue/TheReaper.cs index e018e76f0c..61f9ae178d 100644 --- a/Items/Weapons/Rogue/TheReaper.cs +++ b/Items/Weapons/Rogue/TheReaper.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/TimeBolt.cs b/Items/Weapons/Rogue/TimeBolt.cs index 893fdfbb66..59b043c2e8 100644 --- a/Items/Weapons/Rogue/TimeBolt.cs +++ b/Items/Weapons/Rogue/TimeBolt.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.autoReuse = true; item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; item.Calamity().rogue = true; diff --git a/Items/Weapons/Rogue/TriactisTruePaladinianMageHammerofMight.cs b/Items/Weapons/Rogue/TriactisTruePaladinianMageHammerofMight.cs index 3dd5cd56dc..355add4068 100644 --- a/Items/Weapons/Rogue/TriactisTruePaladinianMageHammerofMight.cs +++ b/Items/Weapons/Rogue/TriactisTruePaladinianMageHammerofMight.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 25f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override void AddRecipes() diff --git a/Items/Weapons/Rogue/UtensilPoker.cs b/Items/Weapons/Rogue/UtensilPoker.cs index 5085b6c294..5f99306e89 100644 --- a/Items/Weapons/Rogue/UtensilPoker.cs +++ b/Items/Weapons/Rogue/UtensilPoker.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.autoReuse = true; item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; } diff --git a/Items/Weapons/Rogue/Valediction.cs b/Items/Weapons/Rogue/Valediction.cs index ca55ccbf5b..f0143e8a4f 100644 --- a/Items/Weapons/Rogue/Valediction.cs +++ b/Items/Weapons/Rogue/Valediction.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; item.Calamity().rogue = true; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } } } diff --git a/Items/Weapons/Summon/AbandonedSlimeStaff.cs b/Items/Weapons/Summon/AbandonedSlimeStaff.cs new file mode 100644 index 0000000000..65c713d6e6 --- /dev/null +++ b/Items/Weapons/Summon/AbandonedSlimeStaff.cs @@ -0,0 +1,89 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Summon; +using CalamityMod.Items.Placeables.Ores; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Summon +{ + public class AbandonedSlimeStaff : ModItem + { + int slimeSlots; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Abandoned Slime Staff"); + Tooltip.SetDefault("Cast down from the heavens in disgust, this relic sings a song of quiet tragedy...\n" + + "Consumes all of the remaining minion slots on use\n" + + "Increased power and size based on the number of minion slots used"); + } + + public override void SetDefaults() + { + item.width = 62; + item.height = 62; + item.useStyle = ItemUseStyleID.SwingThrow; + item.noMelee = true; + item.UseSound = SoundID.Item44; + + item.summon = true; + item.mana = 40; + item.damage = 61; + item.knockBack = 3f; + item.autoReuse = true; + item.useTime = 36; + item.useAnimation = 36; + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 10f; + + item.value = Item.buyPrice(0, 60, 0, 0); + item.rare = 7; + item.Calamity().customRarity = CalamityRarity.Dedicated; //rarity 21 + } + + public override void HoldItem(Player player) + { + //same boost as Aero Stone + player.jumpSpeedBoost += player.autoJump ? 0.25f : 1f; + + double minionCount = 0; + for (int j = 0; j < Main.projectile.Length; j++) + { + Projectile projectile = Main.projectile[j]; + if (projectile.active && projectile.owner == player.whoAmI && projectile.minion && projectile.type != ModContent.ProjectileType()) + { + minionCount += projectile.minionSlots; + } + } + slimeSlots = (int)((double)player.maxMinions - minionCount); + } + + public override bool CanUseItem(Player player) + { + return slimeSlots >= 1; + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + for (int x = 0; x < Main.projectile.Length; x++) + { + Projectile projectile2 = Main.projectile[x]; + if (projectile2.active && projectile2.owner == player.whoAmI && projectile2.type == ModContent.ProjectileType()) + { + projectile2.Kill(); + } + } + float damageMult = ((float)Math.Log(slimeSlots, MathHelper.E)) + 1f; + float size = (0.25f * (slimeSlots - 1f)) + 1f; + position = Main.MouseWorld; + speedX = 0; + speedY = 0; + int slime = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * damageMult), knockBack, player.whoAmI); + Main.projectile[slime].Calamity().lineColor = slimeSlots; + Main.projectile[slime].scale = size; + return false; + } + } +} diff --git a/Items/Weapons/Summon/AbandonedSlimeStaff.png b/Items/Weapons/Summon/AbandonedSlimeStaff.png new file mode 100644 index 0000000000..939fa844c1 Binary files /dev/null and b/Items/Weapons/Summon/AbandonedSlimeStaff.png differ diff --git a/Items/Weapons/Summon/AngryChickenStaff.cs b/Items/Weapons/Summon/AngryChickenStaff.cs index 5016213d30..6481587612 100644 --- a/Items/Weapons/Summon/AngryChickenStaff.cs +++ b/Items/Weapons/Summon/AngryChickenStaff.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Summon item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.summon = true; - item.Calamity().postMoonLordRarity = 14; + item.Calamity().customRarity = CalamityRarity.DarkBlue; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Summon/CalamarisLament.cs b/Items/Weapons/Summon/CalamarisLament.cs index 3949587b15..8783771ec2 100644 --- a/Items/Weapons/Summon/CalamarisLament.cs +++ b/Items/Weapons/Summon/CalamarisLament.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Summon item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.summon = true; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Summon/CosmicImmaterializer.cs b/Items/Weapons/Summon/CosmicImmaterializer.cs index f731aec02d..9eabdb1c34 100644 --- a/Items/Weapons/Summon/CosmicImmaterializer.cs +++ b/Items/Weapons/Summon/CosmicImmaterializer.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Summon item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.summon = true; - item.Calamity().postMoonLordRarity = 15; + item.Calamity().customRarity = CalamityRarity.Violet; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Summon/Cosmilamp.cs b/Items/Weapons/Summon/Cosmilamp.cs index 9b743ab5ad..393ad9abcd 100644 --- a/Items/Weapons/Summon/Cosmilamp.cs +++ b/Items/Weapons/Summon/Cosmilamp.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Summon item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.summon = true; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Summon/ElementalAxe.cs b/Items/Weapons/Summon/ElementalAxe.cs index 6351e9f084..1b504cf6aa 100644 --- a/Items/Weapons/Summon/ElementalAxe.cs +++ b/Items/Weapons/Summon/ElementalAxe.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Summon item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Summon recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ItemID.LunarBar, 5); recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ModContent.ItemType()); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Summon/Endogenesis.cs b/Items/Weapons/Summon/Endogenesis.cs index 0a471991ba..3923b580aa 100644 --- a/Items/Weapons/Summon/Endogenesis.cs +++ b/Items/Weapons/Summon/Endogenesis.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Summon item.shootSpeed = 10f; item.value = Item.buyPrice(5, 0, 0, 0); - item.Calamity().postMoonLordRarity = 16; + item.Calamity().customRarity = CalamityRarity.Developer; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Summon/EnergyStaff.cs b/Items/Weapons/Summon/EnergyStaff.cs index 25b98ad581..314d352683 100644 --- a/Items/Weapons/Summon/EnergyStaff.cs +++ b/Items/Weapons/Summon/EnergyStaff.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Summon item.rare = 10; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Summon/EtherealSubjugator.cs b/Items/Weapons/Summon/EtherealSubjugator.cs index f210c9cfa9..1c53125c41 100644 --- a/Items/Weapons/Summon/EtherealSubjugator.cs +++ b/Items/Weapons/Summon/EtherealSubjugator.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Summon item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.summon = true; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Summon/LanternoftheSoul.cs b/Items/Weapons/Summon/LanternoftheSoul.cs index 812ea0b3e1..9b58254857 100644 --- a/Items/Weapons/Summon/LanternoftheSoul.cs +++ b/Items/Weapons/Summon/LanternoftheSoul.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Summon item.rare = 10; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 22; + item.Calamity().customRarity = CalamityRarity.RareVariant; item.UseSound = SoundID.Item44; } diff --git a/Items/Weapons/Summon/ResurrectionButterfly.cs b/Items/Weapons/Summon/ResurrectionButterfly.cs index 525759ba0d..36ca363c5c 100644 --- a/Items/Weapons/Summon/ResurrectionButterfly.cs +++ b/Items/Weapons/Summon/ResurrectionButterfly.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Summon item.knockBack = 1f; item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; item.UseSound = SoundID.Item44; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/Sirius.cs b/Items/Weapons/Summon/Sirius.cs index 90b73a7005..ce2f94bc25 100644 --- a/Items/Weapons/Summon/Sirius.cs +++ b/Items/Weapons/Summon/Sirius.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Summon item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void HoldItem(Player player) diff --git a/Items/Weapons/Summon/StaffoftheMechworm.cs b/Items/Weapons/Summon/StaffoftheMechworm.cs index 6fad1cc5eb..f2b7a04d87 100644 --- a/Items/Weapons/Summon/StaffoftheMechworm.cs +++ b/Items/Weapons/Summon/StaffoftheMechworm.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Summon item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.summon = true; - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Typeless/Aestheticus.cs b/Items/Weapons/Typeless/Aestheticus.cs index a76b05e9a9..19f795a72b 100644 --- a/Items/Weapons/Typeless/Aestheticus.cs +++ b/Items/Weapons/Typeless/Aestheticus.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Typeless item.value = Item.buyPrice(0, 4, 0, 0); item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; - item.Calamity().postMoonLordRarity = 21; + item.Calamity().customRarity = CalamityRarity.Dedicated; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Typeless/AethersWhisper.cs b/Items/Weapons/Typeless/AethersWhisper.cs index fdbef74b9c..803413a8ad 100644 --- a/Items/Weapons/Typeless/AethersWhisper.cs +++ b/Items/Weapons/Typeless/AethersWhisper.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Typeless item.autoReuse = true; item.shootSpeed = 12f; item.shoot = ModContent.ProjectileType(); - item.Calamity().postMoonLordRarity = 13; + item.Calamity().customRarity = CalamityRarity.PureGreen; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs b/Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs index 3889edb674..ce4a92d54b 100644 --- a/Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs +++ b/Items/Weapons/Typeless/FiniteUse/ElephantKiller.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Typeless.FiniteUse item.shootSpeed = 12f; item.shoot = ModContent.ProjectileType(); item.useAmmo = ModContent.ItemType(); - item.Calamity().postMoonLordRarity = 12; + item.Calamity().customRarity = CalamityRarity.Turquoise; if (CalamityPlayer.areThereAnyDamnBosses) { item.Calamity().timesUsed = 3; diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 8af52924a2..966bd18d10 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -448,7 +448,7 @@ namespace CalamityMod calamity, "Supreme Calamitas", (Func)(() => CalamityWorld.downedSCal), ModContent.ItemType(), - new List() {ModContent.ItemType(), ModContent.ItemType()}, + new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, new List() {ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType()}, "Use an [i:" + ModContent.ItemType() + "]", "[c/FFA500:Please don't waste my time.]"); diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index e33da490fb..dc7fb26ca2 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -509,13 +509,16 @@ namespace CalamityMod.NPCs.Abyss } if (CalamityWorld.downedCalamitas) { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.Ectoplasm, Main.rand.Next(8, 13)); Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType(), Main.rand.Next(6, 9)); if (Main.expertMode && Main.rand.NextBool(2)) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType(), Main.rand.Next(2, 4)); } } + if (NPC.downedPlantBoss) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.Ectoplasm, Main.rand.Next(8, 13)); + } } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Astral/AstralSlime.cs b/NPCs/Astral/AstralSlime.cs index 4c5ef46eb2..98834b3411 100644 --- a/NPCs/Astral/AstralSlime.cs +++ b/NPCs/Astral/AstralSlime.cs @@ -2,6 +2,7 @@ using CalamityMod.Dusts; using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -76,6 +77,8 @@ namespace CalamityMod.NPCs.Astral int oreMin = Main.expertMode ? 11 : 8; int oreMax = Main.expertMode ? 16 : 12; DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedStarGod, oreMin, oreMax); + float slimeStaffDrop = (CalamityWorld.defiled ? DropHelper.DefiledDropRateFloat : 0.03f); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedAstrageldon, slimeStaffDrop, 1, 1); } } } diff --git a/NPCs/Astral/Atlas.cs b/NPCs/Astral/Atlas.cs index 48140579a7..17d55d33bd 100644 --- a/NPCs/Astral/Atlas.cs +++ b/NPCs/Astral/Atlas.cs @@ -630,7 +630,8 @@ namespace CalamityMod.NPCs.Astral int minStardust = Main.expertMode ? 7 : 6; int maxStardust = Main.expertMode ? 9 : 8; DropHelper.DropItem(npc, ModContent.ItemType(), minStardust, maxStardust); - DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedAstrageldon); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedAstrageldon, 7, 1, 1); + //not guarantee to prevent inventory spam } } } diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index bcc7ec44bf..9d81b23a2a 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -323,8 +323,8 @@ namespace CalamityMod.NPCs.AstrumAureus DropHelper.DropItemSpray(npc, ItemID.FallenStar, 25, 40); // Weapons - DropHelper.DropItemChance(npc, ModContent.ItemType(), 5); - DropHelper.DropItemChance(npc, ModContent.ItemType(), 5); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); // Vanity DropHelper.DropItemChance(npc, ModContent.ItemType(), 7); diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 460e4dffc7..7380f12256 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -1,5 +1,6 @@ using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.Astral; +using CalamityMod.NPCs.Crags; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.Projectiles.Boss; using CalamityMod.Items.LoreItems; @@ -14758,7 +14759,7 @@ namespace CalamityMod.NPCs } } } - if (Main.dayTime && (double)npc.position.Y <= Main.worldSurface * 16.0 && (npc.type == 2 || npc.type == 133 || npc.type == 190 || npc.type == 191 || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType() || npc.type == 192 || npc.type == 193 || npc.type == 194 || npc.type == 317 || npc.type == 318)) + if (Main.dayTime && (double)npc.position.Y <= Main.worldSurface * 16.0 && (npc.type == 2 || npc.type == 133 || npc.type == 190 || npc.type == 191 || npc.type == ModContent.NPCType() || npc.type == 192 || npc.type == 193 || npc.type == 194 || npc.type == 317 || npc.type == 318)) { if (npc.timeLeft > 10) { @@ -14949,10 +14950,9 @@ namespace CalamityMod.NPCs if (Main.rand.Next(40) == 0) { int num = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + (float)npc.height * 0.25f), npc.width, (int)((float)npc.height * 0.5f), 5, npc.velocity.X, 2f, 0, default(Color), 1f); - Dust expr_B48_cp_0_cp_0 = Main.dust[num]; - expr_B48_cp_0_cp_0.velocity.X = expr_B48_cp_0_cp_0.velocity.X * 0.5f; - Dust expr_B62_cp_0_cp_0 = Main.dust[num]; - expr_B62_cp_0_cp_0.velocity.Y = expr_B62_cp_0_cp_0.velocity.Y * 0.1f; + Dust dust = Main.dust[num]; + dust.velocity.X *= 0.5f; + dust.velocity.Y *= 0.1f; } } else if (npc.type == 133) @@ -15166,10 +15166,9 @@ namespace CalamityMod.NPCs if ((npc.type == 2 || npc.type == 133 || npc.type == ModContent.NPCType() || npc.type == ModContent.NPCType() || npc.type == 190 || npc.type == 191 || npc.type == 192 || npc.type == 193 || npc.type == 194) && Main.rand.Next(40) == 0) { int num4 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + (float)npc.height * 0.25f), npc.width, (int)((float)npc.height * 0.5f), 5, npc.velocity.X, 2f, 0, default(Color), 1f); - Dust expr_1490_cp_0_cp_0 = Main.dust[num4]; - expr_1490_cp_0_cp_0.velocity.X = expr_1490_cp_0_cp_0.velocity.X * 0.5f; - Dust expr_14AB_cp_0_cp_0 = Main.dust[num4]; - expr_14AB_cp_0_cp_0.velocity.Y = expr_14AB_cp_0_cp_0.velocity.Y * 0.1f; + Dust dust = Main.dust[num4]; + dust.velocity.X *= 0.5f; + dust.velocity.Y *= 0.1f; } if (npc.wet && npc.type != 170 && npc.type != 171 && npc.type != 172) { @@ -18909,11 +18908,10 @@ namespace CalamityMod.NPCs if (npc.type == 23) { int num12 = Dust.NewDust(new Vector2(npc.position.X - npc.velocity.X, npc.position.Y - npc.velocity.Y), npc.width, npc.height, 6, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 2f); - Main.dust[num12].noGravity = true; - Dust expr_EC5_cp_0_cp_0 = Main.dust[num12]; - expr_EC5_cp_0_cp_0.velocity.X = expr_EC5_cp_0_cp_0.velocity.X * 0.3f; - Dust expr_EE0_cp_0_cp_0 = Main.dust[num12]; - expr_EE0_cp_0_cp_0.velocity.Y = expr_EE0_cp_0_cp_0.velocity.Y * 0.3f; + Dust dust = Main.dust[num12]; + dust.noGravity = true; + dust.velocity.X *= 0.3f; + dust.velocity.Y *= 0.3f; } else if (npc.type != 139 && npc.type != 205 && npc.type != 252 && Main.rand.Next(20) == 0) { @@ -18923,19 +18921,17 @@ namespace CalamityMod.NPCs num13 = 5; } int num14 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + (float)npc.height * 0.25f), npc.width, (int)((float)npc.height * 0.5f), num13, npc.velocity.X, 2f, 75, npc.color, npc.scale); - Dust expr_1013_cp_0_cp_0 = Main.dust[num14]; - expr_1013_cp_0_cp_0.velocity.X = expr_1013_cp_0_cp_0.velocity.X * 0.5f; - Dust expr_102E_cp_0_cp_0 = Main.dust[num14]; - expr_102E_cp_0_cp_0.velocity.Y = expr_102E_cp_0_cp_0.velocity.Y * 0.1f; + Dust dust = Main.dust[num14]; + dust.velocity.X *= 0.5f; + dust.velocity.Y *= 0.1f; } } else if (npc.type != 252 && Main.rand.Next(40) == 0) { int num15 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + (float)npc.height * 0.25f), npc.width, (int)((float)npc.height * 0.5f), 5, npc.velocity.X, 2f, 0, default(Color), 1f); - Dust expr_10D4_cp_0_cp_0 = Main.dust[num15]; - expr_10D4_cp_0_cp_0.velocity.X = expr_10D4_cp_0_cp_0.velocity.X * 0.5f; - Dust expr_10EF_cp_0_cp_0 = Main.dust[num15]; - expr_10EF_cp_0_cp_0.velocity.Y = expr_10EF_cp_0_cp_0.velocity.Y * 0.1f; + Dust dust = Main.dust[num15]; + dust.velocity.X *= 0.5f; + dust.velocity.Y *= 0.1f; } if ((npc.type == 6 || npc.type == 94 || npc.type == 173) && npc.wet) { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 0f55673279..7edeac02bb 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -26,6 +26,7 @@ using CalamityMod.NPCs.Bumblebirb; using CalamityMod.NPCs.Calamitas; using CalamityMod.NPCs.CeaselessVoid; using CalamityMod.NPCs.Crabulon; +using CalamityMod.NPCs.Crags; using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; @@ -678,7 +679,7 @@ namespace CalamityMod.NPCs npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Webbed] = true; npc.buffImmune[BuffID.Slow] = true; @@ -2157,6 +2158,19 @@ namespace CalamityMod.NPCs break; + case NPCID.Nurse: + switch (Main.rand.Next(25)) // 24 Nurse names + { + case 0: + npc.GivenName = "Farsni"; + break; + + default: + break; + } + + break; + default: break; } diff --git a/NPCs/Crags/CalamityEye.cs b/NPCs/Crags/CalamityEye.cs new file mode 100644 index 0000000000..54f2fd78ab --- /dev/null +++ b/NPCs/Crags/CalamityEye.cs @@ -0,0 +1,137 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Banners; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.NPCs.Crags +{ + public class CalamityEye : ModNPC + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Calamity Eye"); + Main.npcFrameCount[npc.type] = 4; + } + + public override void SetDefaults() + { + npc.lavaImmune = true; + npc.aiStyle = 2; + npc.damage = 40; + npc.width = 30; + npc.height = 30; + npc.defense = 12; + npc.lifeMax = 140; + npc.knockBackResist = 0f; + animationType = 2; + npc.value = Item.buyPrice(0, 0, 5, 0); + npc.HitSound = SoundID.NPCHit1; + npc.DeathSound = SoundID.NPCDeath1; + if (CalamityWorld.downedProvidence) + { + npc.damage = 227; + npc.defense = 101; + npc.lifeMax = 5000; + npc.value = Item.buyPrice(0, 0, 50, 0); + } + banner = npc.type; + bannerItem = ModContent.ItemType(); + } + + public override void AI() + { + if ((double) npc.life < (double) npc.lifeMax * 0.5) + { + if (npc.direction == -1 && (double) npc.velocity.X > -6.0) + { + npc.velocity.X -= 0.1f; + if ((double) npc.velocity.X > 6.0) + npc.velocity.X -= 0.1f; + else if ((double) npc.velocity.X > 0.0) + npc.velocity.X += 0.05f; + if ((double) npc.velocity.X < -6.0) + npc.velocity.X = -6f; + } + else if (npc.direction == 1 && (double) npc.velocity.X < 6.0) + { + npc.velocity.X += 0.1f; + if ((double) npc.velocity.X < -6.0) + npc.velocity.X += 0.1f; + else if ((double) npc.velocity.X < 0.0) + npc.velocity.X -= 0.05f; + if ((double) npc.velocity.X > 6.0) + npc.velocity.X = 6f; + } + if (npc.directionY == -1 && (double) npc.velocity.Y > -4.0) + { + npc.velocity.Y -= 0.1f; + if ((double) npc.velocity.Y > 4.0) + npc.velocity.Y -= 0.1f; + else if ((double) npc.velocity.Y > 0.0) + npc.velocity.Y += 0.05f; + if ((double) npc.velocity.Y < -4.0) + npc.velocity.Y = -4f; + } + else if (npc.directionY == 1 && (double) npc.velocity.Y < 4.0) + { + npc.velocity.Y += 0.1f; + if ((double) npc.velocity.Y < -4.0) + npc.velocity.Y += 0.1f; + else if ((double) npc.velocity.Y < 0.0) + npc.velocity.Y -= 0.05f; + if ((double) npc.velocity.Y > 4.0) + npc.velocity.Y = 4f; + } + } + if (Main.rand.NextBool(40)) + { + int index = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + (float) npc.height * 0.25f), npc.width, (int) ((double) npc.height * 0.5), 5, npc.velocity.X, 2f, 0, new Color(), 1f); + Main.dust[index].velocity.X *= 0.5f; + Main.dust[index].velocity.Y *= 0.1f; + } + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default, 1f); + } + if (npc.life <= 0) + { + for (int k = 0; k < 20; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default, 1f); + } + } + } + + public override float SpawnChance(NPCSpawnInfo spawnInfo) + { + return spawnInfo.player.Calamity().ZoneCalamity ? 0.25f : 0f; + } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(BuffID.Weak, 120, true); + player.AddBuff(ModContent.BuffType(), 120, true); + if (CalamityWorld.revenge) + { + player.AddBuff(ModContent.BuffType(), 180, true); + } + } + + public override void NPCLoot() + { + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedProvidence, 2, 1, 1); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), Main.hardMode, 3, 1, 1); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), Main.hardMode, 2, 1, 1); + DropHelper.DropItemChance(npc, ItemID.Lens, 2); + } + } +} diff --git a/NPCs/NormalNPCs/CalamityEye.png b/NPCs/Crags/CalamityEye.png similarity index 100% rename from NPCs/NormalNPCs/CalamityEye.png rename to NPCs/Crags/CalamityEye.png diff --git a/NPCs/NormalNPCs/CharredSlime.cs b/NPCs/Crags/CharredSlime.cs similarity index 60% rename from NPCs/NormalNPCs/CharredSlime.cs rename to NPCs/Crags/CharredSlime.cs index a2e7bdbae1..23d5668e3f 100644 --- a/NPCs/NormalNPCs/CharredSlime.cs +++ b/NPCs/Crags/CharredSlime.cs @@ -1,9 +1,12 @@ -using CalamityMod.Items.Placeables.Banners; +using CalamityMod.World; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.NPCs.NormalNPCs +namespace CalamityMod.NPCs.Crags { public class CharredSlime : ModNPC { @@ -24,24 +27,39 @@ namespace CalamityMod.NPCs.NormalNPCs npc.lifeMax = 250; npc.knockBackResist = 0f; animationType = 81; - npc.value = Item.buyPrice(0, 0, 10, 0); + npc.value = Item.buyPrice(0, 0, 5, 0); npc.alpha = 50; npc.lavaImmune = true; npc.noGravity = false; npc.noTileCollide = false; npc.HitSound = SoundID.NPCHit1; npc.DeathSound = SoundID.NPCDeath1; + if (CalamityWorld.downedProvidence) + { + npc.damage = 227; + npc.defense = 90; + npc.lifeMax = 7500; + npc.value = Item.buyPrice(0, 0, 50, 0); + } banner = npc.type; bannerItem = ModContent.ItemType(); } public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !NPC.downedPlantBoss) + if (!NPC.downedPlantBoss) { return 0f; } - return SpawnCondition.Underworld.Chance * 0.06f; + return spawnInfo.player.Calamity().ZoneCalamity ? 0.08f : 0f; + } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + if (CalamityWorld.revenge) + { + player.AddBuff(ModContent.BuffType(), 180, true); + } } public override void HitEffect(int hitDirection, double damage) @@ -61,7 +79,9 @@ namespace CalamityMod.NPCs.NormalNPCs public override void NPCLoot() { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType(), Main.rand.Next(10, 27)); + DropHelper.DropItem(npc, ModContent.ItemType(), 10, 26); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedProvidence, 2, 1, 1); + DropHelper.DropItemChance(npc, ModContent.ItemType(), 3, 1, 1); } } } diff --git a/NPCs/NormalNPCs/CharredSlime.png b/NPCs/Crags/CharredSlime.png similarity index 100% rename from NPCs/NormalNPCs/CharredSlime.png rename to NPCs/Crags/CharredSlime.png diff --git a/NPCs/Crags/CultistAssassin.cs b/NPCs/Crags/CultistAssassin.cs index 3752607774..e258a8cadd 100644 --- a/NPCs/Crags/CultistAssassin.cs +++ b/NPCs/Crags/CultistAssassin.cs @@ -71,14 +71,8 @@ namespace CalamityMod.NPCs.Crags public override void NPCLoot() { - if (CalamityWorld.downedProvidence && Main.rand.NextBool(2)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } - if (Main.rand.NextBool(3)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedProvidence, 2, 1, 1); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), Main.hardMode, 3, 1, 1); } } } diff --git a/NPCs/Crags/DespairStone.cs b/NPCs/Crags/DespairStone.cs index cbdbd8c0ea..9ce49ac73e 100644 --- a/NPCs/Crags/DespairStone.cs +++ b/NPCs/Crags/DespairStone.cs @@ -343,14 +343,8 @@ namespace CalamityMod.NPCs.Crags public override void NPCLoot() { - if (CalamityWorld.downedProvidence && Main.rand.NextBool(2)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } - if (Main.hardMode && Main.rand.NextBool(3)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedProvidence, 2, 1, 1); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), Main.hardMode, 3, 1, 1); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Crags/Scryllar.cs b/NPCs/Crags/Scryllar.cs index 9c62e3912d..97da982839 100644 --- a/NPCs/Crags/Scryllar.cs +++ b/NPCs/Crags/Scryllar.cs @@ -261,18 +261,9 @@ namespace CalamityMod.NPCs.Crags public override void NPCLoot() { - if (CalamityWorld.downedProvidence && Main.rand.NextBool(2)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } - if (Main.hardMode && Main.rand.NextBool(3)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } - if (CalamityWorld.downedYharon) - { - DropHelper.DropItemChance(npc, ModContent.ItemType(), CalamityWorld.defiled ? 0.05f : 0.02f); - } + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedProvidence, 2, 1, 1); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), Main.hardMode, 3, 1, 1); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedYharon, CalamityWorld.defiled ? 0.05f : 0.02f); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Crags/ScryllarRage.cs b/NPCs/Crags/ScryllarRage.cs index b6608d1aad..aa8b413415 100644 --- a/NPCs/Crags/ScryllarRage.cs +++ b/NPCs/Crags/ScryllarRage.cs @@ -261,18 +261,9 @@ namespace CalamityMod.NPCs.Crags public override void NPCLoot() { - if (CalamityWorld.downedProvidence && Main.rand.NextBool(2)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } - if (Main.hardMode && Main.rand.NextBool(3)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } - if (CalamityWorld.downedYharon) - { - DropHelper.DropItemChance(npc, ModContent.ItemType(), CalamityWorld.defiled ? 0.05f : 0.02f); - } + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedProvidence, 2, 1, 1); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), Main.hardMode, 3, 1, 1); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedYharon, CalamityWorld.defiled ? 0.05f : 0.02f); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/Crags/SoulSlurper.cs b/NPCs/Crags/SoulSlurper.cs index 396e12404f..3f4f1c1223 100644 --- a/NPCs/Crags/SoulSlurper.cs +++ b/NPCs/Crags/SoulSlurper.cs @@ -228,7 +228,7 @@ namespace CalamityMod.NPCs.Crags { DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedProvidence, 2, 1, 1); DropHelper.DropItemCondition(npc, ModContent.ItemType(), Main.hardMode, 3, 1, 1); - DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); + DropHelper.DropItemChance(npc, ModContent.ItemType(), (Main.hardMode ? 30 : 10)); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index 0a308d0caf..f8f9a321bd 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -275,7 +275,6 @@ namespace CalamityMod.NPCs.DevourerofGods player.AddBuff(ModContent.BuffType(), 240, true); player.AddBuff(ModContent.BuffType(), 300, true); player.AddBuff(BuffID.Frostburn, 240, true); - player.AddBuff(BuffID.Darkness, 240, true); } } } diff --git a/NPCs/DevourerofGods/DevourerofGodsBody2.cs b/NPCs/DevourerofGods/DevourerofGodsBody2.cs index d63812f9de..478891f5e4 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody2.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody2.cs @@ -153,7 +153,6 @@ namespace CalamityMod.NPCs.DevourerofGods { player.AddBuff(ModContent.BuffType(), 120, true); player.AddBuff(BuffID.Frostburn, 120, true); - player.AddBuff(BuffID.Darkness, 120, true); } } } diff --git a/NPCs/DevourerofGods/DevourerofGodsBodyS.cs b/NPCs/DevourerofGods/DevourerofGodsBodyS.cs index 072f76474b..9d791f471a 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBodyS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBodyS.cs @@ -217,9 +217,7 @@ namespace CalamityMod.NPCs.DevourerofGods if (npc.life <= 0) { float randomSpread = (float)(Main.rand.Next(-100, 100) / 100); - Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGS3"), 1f); - Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGS4"), 1f); - Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGS5"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGS6"), 1f); npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 50; @@ -258,7 +256,6 @@ namespace CalamityMod.NPCs.DevourerofGods player.AddBuff(ModContent.BuffType(), 240, true); player.AddBuff(ModContent.BuffType(), 300, true); player.AddBuff(BuffID.Frostburn, 240, true); - player.AddBuff(BuffID.Darkness, 240, true); } } } diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 827b5bf673..1ec8ea39b0 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -775,7 +775,6 @@ namespace CalamityMod.NPCs.DevourerofGods player.AddBuff(ModContent.BuffType(), 300, true); player.AddBuff(ModContent.BuffType(), 420, true); player.AddBuff(BuffID.Frostburn, 300, true); - player.AddBuff(BuffID.Darkness, 300, true); if (CalamityWorld.death) { player.KillMe(PlayerDeathReason.ByCustomReason(player.name + "'s essence was consumed by the devourer."), 1000.0, 0, false); diff --git a/NPCs/DevourerofGods/DevourerofGodsHead2.cs b/NPCs/DevourerofGods/DevourerofGodsHead2.cs index ff05b27f70..fb7d17ef9c 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead2.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead2.cs @@ -484,7 +484,6 @@ namespace CalamityMod.NPCs.DevourerofGods { player.AddBuff(ModContent.BuffType(), 180, true); player.AddBuff(BuffID.Frostburn, 180, true); - player.AddBuff(BuffID.Darkness, 180, true); } } } diff --git a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs index 06867fa4de..1a8309f684 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs @@ -989,14 +989,13 @@ namespace CalamityMod.NPCs.DevourerofGods // Weapons DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); - DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), DropHelper.RareVariantDropRateInt); DropHelper.DropItemChance(npc, ModContent.ItemType(), DropHelper.RareVariantDropRateInt); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); - DropHelper.DropItemChance(npc, ModContent.ItemType(), 4); + DropHelper.DropItemFromSetChance(npc, 0.25f, ModContent.ItemType(), ModContent.ItemType()); // Vanity DropHelper.DropItemChance(npc, ModContent.ItemType(), 7); @@ -1123,6 +1122,7 @@ namespace CalamityMod.NPCs.DevourerofGods { Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS5"), 1f); npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 50; @@ -1160,7 +1160,6 @@ namespace CalamityMod.NPCs.DevourerofGods player.AddBuff(ModContent.BuffType(), 300, true); player.AddBuff(ModContent.BuffType(), 420, true); player.AddBuff(BuffID.Frostburn, 300, true); - player.AddBuff(BuffID.Darkness, 300, true); if ((CalamityWorld.death || CalamityWorld.bossRushActive) && npc.alpha <= 0) { player.KillMe(PlayerDeathReason.ByCustomReason(player.name + "'s essence was consumed by the devourer."), 1000.0, 0, false); diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index a07d49d7a9..638dedd1ca 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -226,7 +226,6 @@ namespace CalamityMod.NPCs.DevourerofGods player.AddBuff(ModContent.BuffType(), 180, true); player.AddBuff(ModContent.BuffType(), 240, true); player.AddBuff(BuffID.Frostburn, 180, true); - player.AddBuff(BuffID.Darkness, 180, true); // TODO: don't talk if the player has iframes if (player.immuneTime > 0 || player.immune) diff --git a/NPCs/DevourerofGods/DevourerofGodsTail2.cs b/NPCs/DevourerofGods/DevourerofGodsTail2.cs index 9d31755254..5852c2428c 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail2.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail2.cs @@ -150,7 +150,6 @@ namespace CalamityMod.NPCs.DevourerofGods { player.AddBuff(ModContent.BuffType(), 90, true); player.AddBuff(BuffID.Frostburn, 90, true); - player.AddBuff(BuffID.Darkness, 90, true); } } } diff --git a/NPCs/DevourerofGods/DevourerofGodsTailS.cs b/NPCs/DevourerofGods/DevourerofGodsTailS.cs index 9714a9ccc5..4c785879ea 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTailS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTailS.cs @@ -247,8 +247,8 @@ namespace CalamityMod.NPCs.DevourerofGods } if (npc.life <= 0) { - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS5"), 1f); - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS6"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS4"), 1f); npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 50; @@ -302,7 +302,6 @@ namespace CalamityMod.NPCs.DevourerofGods player.AddBuff(ModContent.BuffType(), 180, true); player.AddBuff(ModContent.BuffType(), 240, true); player.AddBuff(BuffID.Frostburn, 180, true); - player.AddBuff(BuffID.Darkness, 180, true); // TODO: don't talk if the player has iframes if (player.immune || player.immuneTime > 0) diff --git a/NPCs/NormalNPCs/CalamityEye.cs b/NPCs/NormalNPCs/CalamityEye.cs deleted file mode 100644 index d3eef1ded1..0000000000 --- a/NPCs/NormalNPCs/CalamityEye.cs +++ /dev/null @@ -1,78 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Items.Materials; -using CalamityMod.Items.Placeables.Banners; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.NPCs.NormalNPCs -{ - public class CalamityEye : ModNPC - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Calamity Eye"); - Main.npcFrameCount[npc.type] = 4; - } - - public override void SetDefaults() - { - npc.lavaImmune = true; - npc.aiStyle = 2; - aiType = 133; - npc.damage = 40; - npc.width = 30; - npc.height = 30; - npc.defense = 12; - npc.lifeMax = 140; - npc.knockBackResist = 0f; - animationType = 2; - npc.value = Item.buyPrice(0, 0, 5, 0); - npc.HitSound = SoundID.NPCHit1; - npc.DeathSound = SoundID.NPCDeath1; - banner = npc.type; - bannerItem = ModContent.ItemType(); - } - - public override void HitEffect(int hitDirection, double damage) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default, 1f); - } - if (npc.life <= 0) - { - for (int k = 0; k < 20; k++) - { - Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default, 1f); - } - } - } - - public override float SpawnChance(NPCSpawnInfo spawnInfo) - { - if (spawnInfo.playerSafe || !NPC.downedPlantBoss || spawnInfo.player.Calamity().ZoneSulphur) - { - return 0f; - } - return SpawnCondition.OverworldNightMonster.Chance * 0.045f; - } - - public override void OnHitPlayer(Player player, int damage, bool crit) - { - player.AddBuff(BuffID.Weak, 120, true); - player.AddBuff(ModContent.BuffType(), 120, true); - } - - public override void NPCLoot() - { - if (Main.rand.NextBool(2)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType()); - } - if (Main.rand.NextBool(2)) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.Lens); - } - } - } -} diff --git a/NPCs/NormalNPCs/Cryon.cs b/NPCs/NormalNPCs/Cryon.cs index f703bcbc9b..8104f589d5 100644 --- a/NPCs/NormalNPCs/Cryon.cs +++ b/NPCs/NormalNPCs/Cryon.cs @@ -13,7 +13,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetStaticDefaults() { DisplayName.SetDefault("Cryon"); - Main.npcFrameCount[npc.type] = 8; + Main.npcFrameCount[npc.type] = 6; } public override void SetDefaults() @@ -318,7 +318,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (npc.velocity.Y > 0f || npc.velocity.Y < 0f) { npc.spriteDirection = npc.direction; - npc.frame.Y = frameHeight * 7; + npc.frame.Y = frameHeight * 5; npc.frameCounter = 0.0; } else @@ -330,7 +330,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.frame.Y = npc.frame.Y + frameHeight; npc.frameCounter = 0.0; } - if (npc.frame.Y >= frameHeight * 6) + if (npc.frame.Y >= frameHeight * 4) { npc.frame.Y = 0; } diff --git a/NPCs/NormalNPCs/Cryon.png b/NPCs/NormalNPCs/Cryon.png index 3b705c9b93..c01233d646 100644 Binary files a/NPCs/NormalNPCs/Cryon.png and b/NPCs/NormalNPCs/Cryon.png differ diff --git a/NPCs/NormalNPCs/ImpiousImmolator.cs b/NPCs/NormalNPCs/ImpiousImmolator.cs index b3a35eb4d3..fcfcf771f2 100644 --- a/NPCs/NormalNPCs/ImpiousImmolator.cs +++ b/NPCs/NormalNPCs/ImpiousImmolator.cs @@ -243,7 +243,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { - npc.frameCounter += hasBeenHit ? 0.15f : 0.075f; + npc.frameCounter += hasBeenHit ? 0.25f : 0.125f; npc.frameCounter %= Main.npcFrameCount[npc.type]; int frame = (int)npc.frameCounter; npc.frame.Y = frame * frameHeight; diff --git a/NPCs/NormalNPCs/ImpiousImmolator.png b/NPCs/NormalNPCs/ImpiousImmolator.png index d9175e3f3e..84082faf9b 100644 Binary files a/NPCs/NormalNPCs/ImpiousImmolator.png and b/NPCs/NormalNPCs/ImpiousImmolator.png differ diff --git a/NPCs/Perforator/PerforatorBodyLarge.cs b/NPCs/Perforator/PerforatorBodyLarge.cs index ab46aa4796..06e44c6ddb 100644 --- a/NPCs/Perforator/PerforatorBodyLarge.cs +++ b/NPCs/Perforator/PerforatorBodyLarge.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorBodyMedium.cs b/NPCs/Perforator/PerforatorBodyMedium.cs index 8eab025384..5498270a99 100644 --- a/NPCs/Perforator/PerforatorBodyMedium.cs +++ b/NPCs/Perforator/PerforatorBodyMedium.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorBodySmall.cs b/NPCs/Perforator/PerforatorBodySmall.cs index 4201b1ef58..960cf840e3 100644 --- a/NPCs/Perforator/PerforatorBodySmall.cs +++ b/NPCs/Perforator/PerforatorBodySmall.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index 24806af701..84e3f37921 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 68c6eb5e23..2f512e9a7c 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index 73dc937c86..aeee4daf05 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorTailLarge.cs b/NPCs/Perforator/PerforatorTailLarge.cs index 5ba6d3c066..d3f2a7c6e9 100644 --- a/NPCs/Perforator/PerforatorTailLarge.cs +++ b/NPCs/Perforator/PerforatorTailLarge.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorTailMedium.cs b/NPCs/Perforator/PerforatorTailMedium.cs index 8ea59a6afa..453593479d 100644 --- a/NPCs/Perforator/PerforatorTailMedium.cs +++ b/NPCs/Perforator/PerforatorTailMedium.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Perforator/PerforatorTailSmall.cs b/NPCs/Perforator/PerforatorTailSmall.cs index c1e70e23e9..060195eef4 100644 --- a/NPCs/Perforator/PerforatorTailSmall.cs +++ b/NPCs/Perforator/PerforatorTailSmall.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.Perforator npc.alpha = 255; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index d63f903cee..98c327bc95 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -752,7 +752,7 @@ namespace CalamityMod.NPCs.Polterghast if (!Main.expertMode) { // Materials - DropHelper.DropItem(npc, ModContent.ItemType(), 5, 8); + DropHelper.DropItem(npc, ModContent.ItemType(), 7, 15); DropHelper.DropItem(npc, ModContent.ItemType(), 10, 20); // Vanity diff --git a/NPCs/SlimeGod/SlimeGod.cs b/NPCs/SlimeGod/SlimeGod.cs index 9bbd90ea00..9556ba6bf7 100644 --- a/NPCs/SlimeGod/SlimeGod.cs +++ b/NPCs/SlimeGod/SlimeGod.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.SlimeGod aiType = -1; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/SlimeGod/SlimeGodRun.cs b/NPCs/SlimeGod/SlimeGodRun.cs index fc034f43d2..5721df3af9 100644 --- a/NPCs/SlimeGod/SlimeGodRun.cs +++ b/NPCs/SlimeGod/SlimeGodRun.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.SlimeGod animationType = 50; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/SlimeGod/SlimeGodRunSplit.cs b/NPCs/SlimeGod/SlimeGodRunSplit.cs index 35d6c7b35c..ee79892754 100644 --- a/NPCs/SlimeGod/SlimeGodRunSplit.cs +++ b/NPCs/SlimeGod/SlimeGodRunSplit.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.knockBackResist = 0f; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/SlimeGod/SlimeGodSplit.cs b/NPCs/SlimeGod/SlimeGodSplit.cs index c70579656e..1d68bbf9da 100644 --- a/NPCs/SlimeGod/SlimeGodSplit.cs +++ b/NPCs/SlimeGod/SlimeGodSplit.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.knockBackResist = 0f; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; - npc.buffImmune[ModContent.BuffType()] = true; + npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[ModContent.BuffType()] = true; npc.buffImmune[BuffID.Slow] = true; npc.buffImmune[BuffID.Webbed] = true; diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index d4e6e2e127..f2c7ef62ac 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -2169,6 +2169,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.revenge); // Vanity + DropHelper.DropItem(npc, ModContent.ItemType()); DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.death); // Other diff --git a/NPCs/TownNPCs/SEAHOE.cs b/NPCs/TownNPCs/SEAHOE.cs index f1103644cf..1832df7399 100644 --- a/NPCs/TownNPCs/SEAHOE.cs +++ b/NPCs/TownNPCs/SEAHOE.cs @@ -167,14 +167,14 @@ namespace CalamityMod.NPCs.TownNPCs } else if (CalamityWorld.downedDoG) { - dialogue.Add("The Devourer of God’s cosmic armor is unique in that it is capable of not only protecting his body from tearing itself apart when ripping through the fabric of space and time, but also allows him to control his powers."); + dialogue.Add("The Devourer of God's cosmic armor is unique in that it is capable of not only protecting his body from tearing itself apart when ripping through the fabric of space and time, but also allows him to control his powers."); dialogue.Add("With the cosmic steel you can fashion many of your weapons into much more powerful forms."); dialogue.Add("The Devourer of Gods is extremely powerful. However, he is young, foolhardy, and very lazy. Perhaps if he had been given time to develop he would have turned into quite the threat."); dialogue.Add("Ah, the dragon Yharon is fickle. You may find that he will refuse to use his full power unless you are strong enough to unleash the power of the Dark Sun."); } else if (CalamityWorld.downedProvidence) { - dialogue.Add("The Rune of Kos holds a significant portion of Providence’s brand of magic, easily distinguishable from all others. Activating it in certain places would have some...risky consequences."); + dialogue.Add("The Rune of Kos holds a significant portion of Providence's brand of magic, easily distinguishable from all others. Activating it in certain places would have some...risky consequences."); dialogue.Add("Ironic, is it not, that Statis was defeated by the very Sentinel his people fashioned their art of stealth from. Fate so often weaves cruel tales."); dialogue.Add("The Dungeon seems to be more active now. You may hear the faint whisperings of angry spirits who have not left to the Void...I would recommend searching there before taking on the Sentinels."); } @@ -202,9 +202,9 @@ namespace CalamityMod.NPCs.TownNPCs dialogue.Add("If you take an idol down to the Brimstone Crags you might be able to see just what is lurking in the shadows."); dialogue.Add("The Brimstone Crags...Yharim despised that place, and did everything he could to raze it to the ground. It might explain a few things about him."); dialogue.Add("The witch just might offer you an opportunity for a challenge if you are willing to fight during the night."); - dialogue.Add("If you’ve gathered the souls used to power those automatons head once more to the jungle. You will find a powerful enemy to fight, which will unleash the full fervor of the jungle once defeated. Do not underestimate it!"); + dialogue.Add("If you've gathered the souls used to power those automatons head once more to the jungle. You will find a powerful enemy to fight, which will unleash the full fervor of the jungle once defeated. Do not underestimate it!"); dialogue.Add("Be careful when defeating Plantera and the Golem. You might accidentally unleash a new threat in the jungle that needs to be quelled."); - dialogue.Add("When exploring the jungle temple be careful. You may not wish to disturb the Lihzard’s idol, the Golem. It’s quite the destructive force."); + dialogue.Add("When exploring the jungle temple be careful. You may not wish to disturb the Lihzard's idol, the Golem. It's quite the destructive force."); } else if (Main.hardMode) { @@ -216,10 +216,10 @@ namespace CalamityMod.NPCs.TownNPCs dialogue.Add("Have you heard of the Brimstone Crags? It was once a grand kingdom, not too different from my own. However, it also met a similar fate. I would not advise going down there, unless you seek a painful death."); dialogue.Add("Ah yes, the Abyss. That trench is full of powerful creatures that could devour you in a heartbeat. I would explore the dungeon first."); dialogue.Add("The Sulphurous Seas are dangerous. The toxic waters will burn your skin, but if you can brave them you will be able to reach the Abyss, where there are powerful weapons and dangers aplenty."); - dialogue.Add("The Sulphurous Seas were created long ago, when Yharim’s dungeon could no longer hold as many corpses as it needed to. Many of the bodies were dumped into the ocean. This, along with severe pollution from the heydays of Draedon's experiments have turned a paradise into a wasteland."); + dialogue.Add("The Sulphurous Seas were created long ago, when Yharim's dungeon could no longer hold as many corpses as it needed to. Many of the bodies were dumped into the ocean. This, along with severe pollution from the heydays of Draedon's experiments have turned a paradise into a wasteland."); dialogue.Add("Be careful what you attack in the " + worldEvil + ". You might just unveil a greater threat than what was there before."); dialogue.Add("Scattered across the lands are shrines dedicated to the gods. You can take whatever is in them, but a few items you may not be able to use until much later."); - dialogue.Add("I’m assuming you’ve heard the legends that speak of the ninja, Statis? There are some who say that if you were able to defeat the gods which his clan once worshipped you would be able to harness some of his powers."); + dialogue.Add("I'm assuming you've heard the legends that speak of the ninja, Statis? There are some who say that if you were able to defeat the gods which his clan once worshipped you would be able to harness some of his powers."); dialogue.Add("The dungeon is a dark place. None of us know of its true purpose, however, the ancient Eidolist cultists used it for worship before Lord Yharim took it over."); dialogue.Add("The " + worldEvil + " used to be easily manageable and controlled by nature. However, the recent wars and pollution have tipped the balance out of favor."); } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 33230db61b..e1b16577d7 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles private int counter = 0; private int counter2 = 0; - public bool lineColor = false; //holy mother of god, Eater of Shoals was a pain in the ass + public int lineColor = 0; //holy mother of god, Eater of Shoals was a pain in the ass public bool extorterBoost = false; #region SetDefaults diff --git a/Projectiles/Magic/WulfrumBolt.cs b/Projectiles/Magic/WulfrumBolt.cs index 745d26addb..a9eb6b7fec 100644 --- a/Projectiles/Magic/WulfrumBolt.cs +++ b/Projectiles/Magic/WulfrumBolt.cs @@ -23,12 +23,13 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.15f / 255f, (255 - projectile.alpha) * 0.25f / 255f); + Lighting.AddLight(projectile.Center, 0f, (255 - projectile.alpha) * 0.1f / 255f, 0f); for (int num151 = 0; num151 < 3; num151++) { int num154 = 14; int num155 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width - num154 * 2, projectile.height - num154 * 2, 61, 0f, 0f, 100, default, 3f); Main.dust[num155].noGravity = true; + Main.dust[num155].noLight = true; Main.dust[num155].velocity *= 0.1f; Main.dust[num155].velocity += projectile.velocity * 0.5f; } @@ -37,6 +38,7 @@ namespace CalamityMod.Projectiles.Magic int num156 = 16; int num157 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width - num156 * 2, projectile.height - num156 * 2, 61, 0f, 0f, 100, default, 2.25f); Main.dust[num157].velocity *= 0.25f; + Main.dust[num157].noLight = true; Main.dust[num157].velocity += projectile.velocity * 0.5f; return; } diff --git a/Projectiles/Melee/SoulScythe.cs b/Projectiles/Melee/SoulScythe.cs index 408fb40701..50d0f8277f 100644 --- a/Projectiles/Melee/SoulScythe.cs +++ b/Projectiles/Melee/SoulScythe.cs @@ -46,32 +46,7 @@ namespace CalamityMod.Projectiles.Melee Main.PlaySound(2, (int)target.position.X, (int)target.position.Y, 14); if (projectile.owner == Main.myPlayer) { - // DEFECT -- HiveBombExplosion does not exist. - // Projectile.NewProjectile(target.Center.X, target.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - } - projectile.position.X = projectile.position.X + (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); - projectile.width = 60; - projectile.height = 60; - projectile.position.X = projectile.position.X - (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); - for (int num621 = 0; num621 < 30; num621++) - { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 89, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; - if (Main.rand.NextBool(2)) - { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } - } - for (int num623 = 0; num623 < 50; num623++) - { - int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 89, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 89, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + Projectile.NewProjectile(target.Center.X, target.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Melee/SoulScythe.png b/Projectiles/Melee/SoulScythe.png index 360c6a671f..7fb6f47cfb 100644 Binary files a/Projectiles/Melee/SoulScythe.png and b/Projectiles/Melee/SoulScythe.png differ diff --git a/Projectiles/Melee/SoulScytheExplosion.cs b/Projectiles/Melee/SoulScytheExplosion.cs new file mode 100644 index 0000000000..368ab02962 --- /dev/null +++ b/Projectiles/Melee/SoulScytheExplosion.cs @@ -0,0 +1,62 @@ +using CalamityMod.Buffs.DamageOverTime; +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class SoulScytheExplosion : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Explosion"); + } + + public override void SetDefaults() + { + projectile.width = 60; + projectile.height = 60; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.melee = true; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.timeLeft = 5; + } + + public override void AI() + { + if (projectile.timeLeft == 5) + { + for (int num621 = 0; num621 < 30; num621++) + { + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 89, 0f, 0f, 100, default, 2f); + Main.dust[num622].velocity *= 3f; + if (Main.rand.NextBool(2)) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 50; num623++) + { + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 89, 0f, 0f, 100, default, 3f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity *= 5f; + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 89, 0f, 0f, 100, default, 2f); + Main.dust[num624].velocity *= 2f; + } + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 600); + } + } +} \ No newline at end of file diff --git a/Projectiles/Melee/SoulScytheExplosion.png b/Projectiles/Melee/SoulScytheExplosion.png new file mode 100644 index 0000000000..80da916522 Binary files /dev/null and b/Projectiles/Melee/SoulScytheExplosion.png differ diff --git a/Projectiles/Melee/Yoyos/LaceratorYoyo.cs b/Projectiles/Melee/Yoyos/LaceratorYoyo.cs index 431c0511a0..c9972ca647 100644 --- a/Projectiles/Melee/Yoyos/LaceratorYoyo.cs +++ b/Projectiles/Melee/Yoyos/LaceratorYoyo.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos projectile.MaxUpdates = 2; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 5; + projectile.localNPCHitCooldown = 8; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Melee/Yoyos/OracleYoyo.cs b/Projectiles/Melee/Yoyos/OracleYoyo.cs index 277d5b5058..3c94bb3512 100644 --- a/Projectiles/Melee/Yoyos/OracleYoyo.cs +++ b/Projectiles/Melee/Yoyos/OracleYoyo.cs @@ -20,10 +20,11 @@ namespace CalamityMod.Projectiles.Melee.Yoyos private const float MaxAuraRadius = 100f; private const float MinDischargeRate = 0.05f; private const float MaxDischargeRate = 0.53f; - private const float ChargePerHit = 4f; + private const float DischargeRateScaleFactor = 0.003f; + private const float ChargePerHit = 3f; - private const int AuraBaseDamage = 300; - private const float AuraChargeDamageMultiplier = 2f; + private const int AuraBaseDamage = 150; + private const float AuraChargeDamageMultiplier = 1.6f; private const int HitsPerOrbVolley = 3; // Ensures that the main AI only runs once per frame, despite the projectile's multiple updates @@ -78,7 +79,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Lighting.AddLight(projectile.Center, 0.6f, 0.42f, 0.1f); // The aura discharges over time based on its current charge. - float discharge = MinDischargeRate + 0.003f * projectile.localAI[1]; + float discharge = MinDischargeRate + DischargeRateScaleFactor * projectile.localAI[1]; if (discharge > MaxDischargeRate) discharge = MaxDischargeRate; projectile.localAI[1] -= discharge; diff --git a/Projectiles/Melee/Yoyos/PandemicYoyo.cs b/Projectiles/Melee/Yoyos/PandemicYoyo.cs index de49dd6f86..9f1ff3adce 100644 --- a/Projectiles/Melee/Yoyos/PandemicYoyo.cs +++ b/Projectiles/Melee/Yoyos/PandemicYoyo.cs @@ -73,7 +73,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos num438 *= num440; num439 *= num440; if (projectile.owner == Main.myPlayer) - Projectile.NewProjectile(value10.X, value10.Y, num438, num439, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); + { + if (Main.rand.NextBool(2)) + { + Projectile.NewProjectile(value10.X, value10.Y, num438, num439, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); + } + } } } } diff --git a/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs b/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs index 2174502fb9..7061349c54 100644 --- a/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs +++ b/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos projectile.MaxUpdates = 2; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 5; + projectile.localNPCHitCooldown = 8; } public override void AI() @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos target.AddBuff(ModContent.BuffType(), 300); if (projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)(projectile.damage * 0.75), projectile.knockBack, projectile.owner, 0f, 0f); Main.projectile[proj].Calamity().forceMelee = true; } } diff --git a/Projectiles/Melee/Yoyos/VerdantYoyo.cs b/Projectiles/Melee/Yoyos/VerdantYoyo.cs index 8207519cdb..c9202c6025 100644 --- a/Projectiles/Melee/Yoyos/VerdantYoyo.cs +++ b/Projectiles/Melee/Yoyos/VerdantYoyo.cs @@ -81,11 +81,11 @@ namespace CalamityMod.Projectiles.Melee.Yoyos num440 = num437 / num440; num438 *= num440; num439 *= num440; - if (Main.rand.NextBool(2)) + if (Main.rand.NextBool(3)) { if (projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(value10.X, value10.Y, num438, num439, 227, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + int proj = Projectile.NewProjectile(value10.X, value10.Y, num438, num439, 227, (int)(projectile.damage * 0.6), projectile.knockBack, projectile.owner, 0f, 0f); Main.projectile[proj].Calamity().forceMelee = true; } } diff --git a/Projectiles/Pets/LeviPet.cs b/Projectiles/Pets/LeviPet.cs index e88f8846fa..367878a3e2 100644 --- a/Projectiles/Pets/LeviPet.cs +++ b/Projectiles/Pets/LeviPet.cs @@ -27,12 +27,12 @@ namespace CalamityMod.Projectiles.Pets public override void AI() { Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); if (!player.active) { projectile.active = false; return; } - CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.leviPet = false; @@ -45,16 +45,16 @@ namespace CalamityMod.Projectiles.Pets projectile.tileCollide = false; int num17 = 100; Vector2 vector3 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); - float num18 = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector3.X; - float num19 = Main.player[projectile.owner].position.Y + (float)(Main.player[projectile.owner].height / 2) - vector3.Y; + float num18 = player.position.X + (float)(player.width / 2) - vector3.X; + float num19 = player.position.Y + (float)(player.height / 2) - vector3.Y; num19 += (float)Main.rand.Next(-10, 21); num18 += (float)Main.rand.Next(-10, 21); - num18 += (float)(60 * -(float)Main.player[projectile.owner].direction); + num18 += (float)(60 * -(float)player.direction); num19 -= 60f; float num20 = (float)Math.Sqrt((double)(num18 * num18 + num19 * num19)); float num21 = 18f; - if (num20 < (float)num17 && Main.player[projectile.owner].velocity.Y == 0f && - projectile.position.Y + (float)projectile.height <= Main.player[projectile.owner].position.Y + (float)Main.player[projectile.owner].height && + if (num20 < (float)num17 && player.velocity.Y == 0f && + projectile.position.Y + (float)projectile.height <= player.position.Y + (float)player.height && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) { projectile.ai[0] = 0f; @@ -65,8 +65,8 @@ namespace CalamityMod.Projectiles.Pets } if (num20 > 2000f) { - projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); - projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); projectile.netUpdate = true; } if (num20 < 50f) diff --git a/Projectiles/Pets/SCalPet.cs b/Projectiles/Pets/SCalPet.cs new file mode 100644 index 0000000000..1bc597c7c4 --- /dev/null +++ b/Projectiles/Pets/SCalPet.cs @@ -0,0 +1,148 @@ +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Pets +{ + public class SCalPet : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Supreme Calamitas"); + Main.projFrames[projectile.type] = 4; + Main.projPet[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.netImportant = true; + projectile.width = 30; + projectile.height = 30; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft *= 5; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (!player.active) + { + projectile.active = false; + return; + } + if (player.dead) + { + modPlayer.scalPet = false; + } + if (modPlayer.scalPet) + { + projectile.timeLeft = 2; + } + float num16 = 0.5f; + projectile.tileCollide = false; + int num17 = 100; + Vector2 vector3 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num18 = player.position.X + (float)(player.width / 2) - vector3.X; + float num19 = player.position.Y + (float)(player.height / 2) - vector3.Y; + num19 += (float)Main.rand.Next(-10, 21); + num18 += (float)Main.rand.Next(-10, 21); + num18 += (float)(60 * -(float)player.direction); + num19 -= 60f; + float num20 = (float)Math.Sqrt((double)(num18 * num18 + num19 * num19)); + float num21 = 18f; + if (num20 < (float)num17 && player.velocity.Y == 0f && + projectile.position.Y + (float)projectile.height <= player.position.Y + (float)player.height && + !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.ai[0] = 0f; + if (projectile.velocity.Y < -6f) + { + projectile.velocity.Y = -6f; + } + } + if (num20 > 2000f) + { + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (num20 < 50f) + { + if (Math.Abs(projectile.velocity.X) > 2f || Math.Abs(projectile.velocity.Y) > 2f) + { + projectile.velocity *= 0.99f; + } + num16 = 0.01f; + } + else + { + if (num20 < 100f) + { + num16 = 0.1f; + } + if (num20 > 300f) + { + num16 = 1f; + } + num20 = num21 / num20; + num18 *= num20; + num19 *= num20; + } + if (projectile.velocity.X < num18) + { + projectile.velocity.X = projectile.velocity.X + num16; + if (num16 > 0.05f && projectile.velocity.X < 0f) + { + projectile.velocity.X = projectile.velocity.X + num16; + } + } + if (projectile.velocity.X > num18) + { + projectile.velocity.X = projectile.velocity.X - num16; + if (num16 > 0.05f && projectile.velocity.X > 0f) + { + projectile.velocity.X = projectile.velocity.X - num16; + } + } + if (projectile.velocity.Y < num19) + { + projectile.velocity.Y = projectile.velocity.Y + num16; + if (num16 > 0.05f && projectile.velocity.Y < 0f) + { + projectile.velocity.Y = projectile.velocity.Y + num16 * 2f; + } + } + if (projectile.velocity.Y > num19) + { + projectile.velocity.Y = projectile.velocity.Y - num16; + if (num16 > 0.05f && projectile.velocity.Y > 0f) + { + projectile.velocity.Y = projectile.velocity.Y - num16 * 2f; + } + } + if ((double)projectile.velocity.X >= 0.25) + { + projectile.direction = -1; + } + else if ((double)projectile.velocity.X < -0.25) + { + projectile.direction = 1; + } + projectile.spriteDirection = projectile.direction; + projectile.rotation = projectile.velocity.X * 0.05f; + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= 4) + { + projectile.frame = 0; + } + } + } +} diff --git a/Projectiles/Pets/SCalPet.png b/Projectiles/Pets/SCalPet.png new file mode 100644 index 0000000000..418e48c9d1 Binary files /dev/null and b/Projectiles/Pets/SCalPet.png differ diff --git a/Projectiles/Ranged/DrataliornusBow.cs b/Projectiles/Ranged/DrataliornusBow.cs index ba2bde9fe1..d454833f74 100644 --- a/Projectiles/Ranged/DrataliornusBow.cs +++ b/Projectiles/Ranged/DrataliornusBow.cs @@ -85,8 +85,6 @@ namespace CalamityMod.Projectiles.Ranged Main.PlaySound(SoundID.Item5, projectile.position); } - player.phantasmTime = 2; - if (timeToFire && Main.myPlayer == projectile.owner) { if (canFire) //fire an angery flame diff --git a/Projectiles/Rogue/DeificThunderboltProj.cs b/Projectiles/Rogue/DeificThunderboltProj.cs new file mode 100644 index 0000000000..ae53da2487 --- /dev/null +++ b/Projectiles/Rogue/DeificThunderboltProj.cs @@ -0,0 +1,110 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class DeificThunderboltProj : ModProjectile + { + private bool playedSound = false; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lightning"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 6; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + Main.projFrames[projectile.type] = 8; + } + + public override void SetDefaults() + { + projectile.width = 26; + projectile.height = 26; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.extraUpdates = 1; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.timeLeft = 300; + projectile.Calamity().rogue = true; + } + + public override void AI() + { + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= Main.projFrames[projectile.type]) + { + projectile.frame = 0; + } + if (!playedSound) + { + Main.PlaySound(SoundID.Item92, (int)projectile.position.X, (int)projectile.position.Y); //electrosphere launcher fire sound + playedSound = true; + } + if (Main.rand.NextBool(8)) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 132, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); + } + projectile.spriteDirection = projectile.direction = (projectile.velocity.X > 0).ToDirectionInt(); + projectile.rotation = projectile.velocity.ToRotation() + (projectile.spriteDirection == 1 ? 0f : MathHelper.Pi); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.Electrified, 300); + } + + public override void OnHitPvp(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.Electrified, 300); + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i <= 10; i++) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 132, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); + } + + if (Main.myPlayer == projectile.owner) + { + if (projectile.Calamity().stealthStrike) + { + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/LightningStrike"), (int)projectile.position.X, (int)projectile.position.Y); + } + int amt = (projectile.Calamity().stealthStrike ? Main.rand.Next(3, 6) : 1); + for (int n = 0; n < amt; n++) + { + Vector2 spawnPoint = new Vector2(projectile.Center.X + (float)Main.rand.Next(-100, 101), projectile.Center.Y - (float)Main.rand.Next(700, 801)); + float randomVelocity = Main.rand.NextFloat() - 0.5f; + Vector2 fireTo = new Vector2(spawnPoint.X + 100f * randomVelocity, spawnPoint.Y + 900); + Vector2 ai0 = fireTo - spawnPoint; + float ai = (float)Main.rand.Next(100); + Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(0.78539818525314331)) * 7f; + int proj = Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ProjectileID.CultistBossLightningOrbArc, projectile.damage, projectile.knockBack, projectile.owner, ai0.ToRotation(), ai); + Main.projectile[proj].extraUpdates += 6; + //Does not force to Rogue because lightning is extremely abusable with Moonstone Crown + Main.projectile[proj].friendly = true; + Main.projectile[proj].hostile = false; + Main.projectile[proj].penetrate = -1; + Main.projectile[proj].usesLocalNPCImmunity = true; + Main.projectile[proj].localNPCHitCooldown = 2400; + } + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } +} diff --git a/Projectiles/Rogue/DeificThunderboltProj.png b/Projectiles/Rogue/DeificThunderboltProj.png new file mode 100644 index 0000000000..1732471ed9 Binary files /dev/null and b/Projectiles/Rogue/DeificThunderboltProj.png differ diff --git a/Projectiles/Rogue/ExorcismProj.cs b/Projectiles/Rogue/ExorcismProj.cs index b8fe4f5cd2..eeb4b19c9c 100644 --- a/Projectiles/Rogue/ExorcismProj.cs +++ b/Projectiles/Rogue/ExorcismProj.cs @@ -101,6 +101,8 @@ namespace CalamityMod.Projectiles.Rogue public override void Kill(int timeLeft) { + //Crystal smash sound + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 27); // Light burst int p = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(projectile.damage * 0.8f), 0, projectile.owner, projectile.ai[0] - 1f, 0); Main.projectile[p].rotation = projectile.rotation; diff --git a/Projectiles/Rogue/ExorcismStar.cs b/Projectiles/Rogue/ExorcismStar.cs index 09d4b64aaf..b7a4454f5f 100644 --- a/Projectiles/Rogue/ExorcismStar.cs +++ b/Projectiles/Rogue/ExorcismStar.cs @@ -30,6 +30,14 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { projectile.rotation += projectile.ai[0]; + if (projectile.soundDelay == 0) + { + projectile.soundDelay = 20 + Main.rand.Next(40); + if (Main.rand.NextBool(5)) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 9); + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Rogue/NastyChollaBol.cs b/Projectiles/Rogue/NastyChollaBol.cs index b2a152cdd5..910a43d9b5 100644 --- a/Projectiles/Rogue/NastyChollaBol.cs +++ b/Projectiles/Rogue/NastyChollaBol.cs @@ -22,8 +22,6 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 200; projectile.tileCollide = false; projectile.Calamity().rogue = true; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = -1; } public override void AI() @@ -169,6 +167,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.ai[1] = (float)i; projectile.velocity = (Main.npc[i].Center - projectile.Center) * 0.75f; projectile.netUpdate = true; + projectile.damage = 0; projectile.StatusNPC(i); int num28 = 20; Point[] array2 = new Point[num28]; @@ -224,6 +223,7 @@ namespace CalamityMod.Projectiles.Rogue public override void Kill(int timeLeft) { + Player player = Main.player[projectile.owner]; int num251 = Main.rand.Next(2, 4); if (projectile.owner == Main.myPlayer) { @@ -236,7 +236,7 @@ namespace CalamityMod.Projectiles.Rogue } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - int shard = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), projectile.damage / 5, 0f, projectile.owner, 0f, 0f); + int shard = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(4f * (player.allDamage + player.meleeDamage - 1f)), 0f, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Rogue/NightsGazeStar.cs b/Projectiles/Rogue/NightsGazeStar.cs index 822d15ff2f..7dc14c154b 100644 --- a/Projectiles/Rogue/NightsGazeStar.cs +++ b/Projectiles/Rogue/NightsGazeStar.cs @@ -94,6 +94,14 @@ namespace CalamityMod.Projectiles.Rogue projectile.velocity = velocityNew * speed; } } + if (projectile.soundDelay == 0) + { + projectile.soundDelay = 20 + Main.rand.Next(40); + if (Main.rand.NextBool(5)) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 9); + } + } } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Summon/AstrageldonLaser.cs b/Projectiles/Summon/AstrageldonLaser.cs new file mode 100644 index 0000000000..aaf681ac73 --- /dev/null +++ b/Projectiles/Summon/AstrageldonLaser.cs @@ -0,0 +1,80 @@ +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Summon +{ + public class AstrageldonLaser : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Astral Laser"); + Main.projFrames[projectile.type] = 3; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + ProjectileID.Sets.MinionShot[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 10; + projectile.friendly = true; + projectile.minion = true; + projectile.ignoreWater = true; + projectile.alpha = 255; + projectile.penetrate = -1; + projectile.timeLeft = 600; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = -2; + projectile.extraUpdates = 1; + } + + public override void AI() + { + projectile.frameCounter++; + if (projectile.frameCounter > 4) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame >= 3) + { + projectile.frame = 0; + } + if (projectile.ai[0] == 0f) + { + projectile.ai[0] = 1f; + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 12); + } + if (projectile.alpha > 0) + { + projectile.alpha -= 25; + } + if (projectile.alpha < 0) + { + projectile.alpha = 0; + } + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(255, 255, 255, projectile.alpha); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1); + return false; + } + } +} diff --git a/Projectiles/Summon/AstrageldonLaser.png b/Projectiles/Summon/AstrageldonLaser.png new file mode 100644 index 0000000000..71261b1ba3 Binary files /dev/null and b/Projectiles/Summon/AstrageldonLaser.png differ diff --git a/Projectiles/Summon/AstrageldonSummon.cs b/Projectiles/Summon/AstrageldonSummon.cs new file mode 100644 index 0000000000..dbeca33ecf --- /dev/null +++ b/Projectiles/Summon/AstrageldonSummon.cs @@ -0,0 +1,220 @@ +using CalamityMod.Buffs.Summon; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Projectiles.Boss; + +namespace CalamityMod.Projectiles.Summon +{ + public class AstrageldonSummon : ModProjectile + { + public bool dust = false; + private int attackCounter = 1; + private int teleportCounter = 400; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Astrageldon"); + Main.projFrames[projectile.type] = 6; + ProjectileID.Sets.MinionSacrificable[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.width = 64; + projectile.height = 64; + projectile.netImportant = true; + projectile.friendly = true; + projectile.minionSlots = 1; + projectile.alpha = 75; + projectile.timeLeft = 18000; + projectile.penetrate = -1; + projectile.timeLeft *= 5; + projectile.minion = true; + projectile.tileCollide = false; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.aiStyle = 26; + aiType = 266; + } + + public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough) + { + //for platform collision? + fallThrough = false; + return true; + } + + public override void AI() + { + Player player = Main.player[projectile.owner];; + CalamityPlayer modPlayer = player.Calamity(); + CalamityGlobalProjectile modProj = projectile.Calamity(); + + projectile.minionSlots = modProj.lineColor; + + //hitbox size scaling + projectile.width = (int)(64f * projectile.scale); + projectile.height = (int)(64f * projectile.scale); + + //on spawn effects and flexible minions + if (!dust) + { + modProj.spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f); + modProj.spawnedPlayerMinionProjectileDamageValue = projectile.damage; + int dustAmt = 16; + for (int dustIndex = 0; dustIndex < dustAmt; dustIndex++) + { + Vector2 vector6 = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f; + vector6 = vector6.RotatedBy((double)((float)(dustIndex - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + projectile.Center; + Vector2 vector7 = vector6 - projectile.Center; + int dusty = Dust.NewDust(vector6 + vector7, 0, 0, ModContent.DustType(), vector7.X * 1f, vector7.Y * 1f, 100, default, 1.1f); + Main.dust[dusty].noGravity = true; + Main.dust[dusty].noLight = true; + Main.dust[dusty].velocity = vector7; + } + dust = true; + } + if ((player.allDamage + player.minionDamage - 1f) != modProj.spawnedPlayerMinionDamageValue) + { + int damage2 = (int)((float)modProj.spawnedPlayerMinionProjectileDamageValue / + modProj.spawnedPlayerMinionDamageValue * + (player.allDamage + player.minionDamage - 1f)); + projectile.damage = damage2; + } + + //Bool setup + bool flag64 = projectile.type == ModContent.ProjectileType(); + player.AddBuff(ModContent.BuffType(), 3600); + if (flag64) + { + if (player.dead) + { + modPlayer.aSlime = false; + } + if (modPlayer.aSlime) + { + projectile.timeLeft = 2; + } + } + + if (projectile.frame == 0 || projectile.frame == 1) + { + float mindistance = 1000f; + float longdistance = 2000f; + float longestdistance = 3000f; + Vector2 objectivepos = projectile.position; + bool gotoenemy = false; + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false)) + { + bool lineOfSight = Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height); + float disttoobjective = Vector2.Distance(npc.Center, projectile.Center); + if (((Vector2.Distance(projectile.Center, objectivepos) > disttoobjective && disttoobjective < mindistance) || !gotoenemy) && lineOfSight) + { + + mindistance = disttoobjective; + objectivepos = npc.Center; + gotoenemy = true; + } + } + } + else + { + for (int num645 = 0; num645 < Main.npc.Length; num645++) + { + NPC npc = Main.npc[num645]; + if (npc.CanBeChasedBy(projectile, false)) + { + bool lineOfSight = Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height); + float disttoobjective = Vector2.Distance(npc.Center, projectile.Center); + if (((Vector2.Distance(projectile.Center, objectivepos) > disttoobjective && disttoobjective < mindistance) || !gotoenemy) && lineOfSight) + { + + mindistance = disttoobjective; + objectivepos = npc.Center; + gotoenemy = true; + } + } + } + } + float maxdisttoenemy = longdistance; + if (gotoenemy) + { + maxdisttoenemy = longestdistance; + } + if (gotoenemy) + { + float teleportRange = objectivepos.Length(); + float scaleAddition = projectile.scale * 5f; + if (teleportCounter <= 0 && teleportRange >= 800f) + { + projectile.position.X = objectivepos.X - (float)(projectile.width / 2) + Main.rand.NextFloat(-100f, 100f); + projectile.position.Y = objectivepos.Y - (float)(projectile.height / 2) - Main.rand.NextFloat(0f + scaleAddition, 200f + scaleAddition); + projectile.netUpdate = true; + teleportCounter = 600; + } + if (teleportCounter > 0) + teleportCounter -= Main.rand.Next(1, 4); + } + + if (attackCounter > 0) + { + attackCounter += Main.rand.Next(1, 4); + } + if (attackCounter > 300) + { + attackCounter = 0; + projectile.netUpdate = true; + } + float scaleFactor3 = 6f; + int projType = ModContent.ProjectileType(); + if (gotoenemy && attackCounter == 0) + { + attackCounter += 2; + if (Main.myPlayer == projectile.owner) + { + Vector2 laserVel = objectivepos - projectile.Center; + laserVel.Normalize(); + laserVel *= scaleFactor3; + int laser = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, laserVel.X, laserVel.Y, projType, projectile.damage, 0f, projectile.owner, 0f, 0f); + projectile.netUpdate = true; + } + } + } + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (projectile.penetrate == 0) + { + projectile.Kill(); + } + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(ModContent.BuffType(), 120); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int height = texture.Height / Main.projFrames[projectile.type]; + int y6 = height * projectile.frame; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, height)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture.Width / 2f, (float)height / 2f), projectile.scale, SpriteEffects.None, 0f); + return false; + } + } +} diff --git a/Projectiles/Summon/AstrageldonSummon.png b/Projectiles/Summon/AstrageldonSummon.png new file mode 100644 index 0000000000..3f2f122a68 Binary files /dev/null and b/Projectiles/Summon/AstrageldonSummon.png differ diff --git a/Projectiles/Summon/AureusBomber.cs b/Projectiles/Summon/AureusBomber.cs index 4f78f42b71..5cc0e9f039 100644 --- a/Projectiles/Summon/AureusBomber.cs +++ b/Projectiles/Summon/AureusBomber.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { DisplayName.SetDefault("Aureus Bomber"); - Main.projFrames[projectile.type] = 4; + Main.projFrames[projectile.type] = 3; ProjectileID.Sets.MinionSacrificable[projectile.type] = true; ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; ProjectileID.Sets.TrailCacheLength[projectile.type] = 1; @@ -33,7 +33,6 @@ namespace CalamityMod.Projectiles.Summon projectile.penetrate = 1; projectile.minion = true; projectile.tileCollide = false; - projectile.scale = 0.5f; } public override void AI() @@ -111,10 +110,10 @@ namespace CalamityMod.Projectiles.Summon //dust effects if (Main.rand.Next(10) == 0) { - int index = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0.0f, 0.0f, 100, Color.Transparent, 2f); - Main.dust[index].velocity *= 0.3f; - Main.dust[index].noGravity = true; - Main.dust[index].noLight = true; + int index = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0.0f, 0.0f, 100, Color.Transparent, 2f); + Main.dust[index].velocity *= 0.3f; + Main.dust[index].noGravity = true; + Main.dust[index].noLight = true; } //frames @@ -124,7 +123,7 @@ namespace CalamityMod.Projectiles.Summon projectile.frame++; projectile.frameCounter = 0; } - if (projectile.frame >= 4) + if (projectile.frame >= 3) { projectile.frame = 0; } diff --git a/Projectiles/Summon/AureusBomber.png b/Projectiles/Summon/AureusBomber.png index 802f806c0e..4cadb5a695 100644 Binary files a/Projectiles/Summon/AureusBomber.png and b/Projectiles/Summon/AureusBomber.png differ diff --git a/Projectiles/Summon/BlackHawkSummon.cs b/Projectiles/Summon/BlackHawkSummon.cs index aa864041ba..222c362b0e 100644 --- a/Projectiles/Summon/BlackHawkSummon.cs +++ b/Projectiles/Summon/BlackHawkSummon.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 vector6 = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f; vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + projectile.Center; Vector2 vector7 = vector6 - projectile.Center; - int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 180, vector7.X * 1.75f, vector7.Y * 1.75f, 100, default, 1.1f); + int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 258, vector7.X * 1.75f, vector7.Y * 1.75f, 100, default, 1.1f); Main.dust[num228].noGravity = true; Main.dust[num228].velocity = vector7; } @@ -225,8 +225,8 @@ namespace CalamityMod.Projectiles.Summon } if (num651 > 2000f) { - projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); - projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); projectile.netUpdate = true; } if (num651 > 70f) @@ -271,8 +271,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 value19 = vector46 - projectile.Center; value19.Normalize(); value19 *= scaleFactor3; - int bullet = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value19.X, value19.Y, num658, projectile.damage, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[bullet].owner = projectile.owner; //doesn't do damage otherwise for some retarded reason + int bullet = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value19.X, value19.Y, num658, projectile.damage, 0f, projectile.owner, 0f, 0f); projectile.netUpdate = true; } } diff --git a/Projectiles/Summon/HermitCrabMinion.cs b/Projectiles/Summon/HermitCrabMinion.cs index 173e5d5aed..79475c4f7f 100644 --- a/Projectiles/Summon/HermitCrabMinion.cs +++ b/Projectiles/Summon/HermitCrabMinion.cs @@ -105,20 +105,38 @@ namespace CalamityMod.Projectiles.Summon float num633 = 600f; bool chaseNPC = false; float npcPositionX = 0f; - for (int num645 = 0; num645 < 200; num645++) - { - NPC npcTarget = Main.npc[num645]; - if (npcTarget.CanBeChasedBy(projectile, false)) - { - float num646 = Vector2.Distance(npcTarget.Center, projectile.Center); - if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !chaseNPC) - { - num633 = num646; - vector46 = npcTarget.Center; - npcPositionX = npcTarget.position.X; - chaseNPC = true; - } - } + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy(projectile, false)) + { + float num646 = Vector2.Distance(npc.Center, projectile.Center); + if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !chaseNPC) + { + num633 = num646; + vector46 = npc.Center; + npcPositionX = npc.position.X; + chaseNPC = true; + } + } + } + else + { + for (int num645 = 0; num645 < 200; num645++) + { + NPC npcTarget = Main.npc[num645]; + if (npcTarget.CanBeChasedBy(projectile, false)) + { + float num646 = Vector2.Distance(npcTarget.Center, projectile.Center); + if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !chaseNPC) + { + num633 = num646; + vector46 = npcTarget.Center; + npcPositionX = npcTarget.position.X; + chaseNPC = true; + } + } + } } if (chaseNPC) { @@ -160,6 +178,14 @@ namespace CalamityMod.Projectiles.Summon projectile.velocity.X = -9f; } } + if (playerDistance > 1000f) + { + fly = true; + chaseNPC = false; + projectile.velocity.X = 0f; + projectile.velocity.Y = 0f; + projectile.tileCollide = false; + } } else { @@ -285,8 +311,8 @@ namespace CalamityMod.Projectiles.Summon } if (playerDistance > 2000f) { - projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); - projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); + projectile.position.X = player.Center.X - (float)(projectile.width / 2); + projectile.position.Y = player.Center.Y - (float)(projectile.height / 2); projectile.netUpdate = true; } if (playerDistance < 100f) diff --git a/Projectiles/Summon/PlantSummon.cs b/Projectiles/Summon/PlantSummon.cs index c99c46bf6c..eb17437f33 100644 --- a/Projectiles/Summon/PlantSummon.cs +++ b/Projectiles/Summon/PlantSummon.cs @@ -160,6 +160,7 @@ namespace CalamityMod.Projectiles.Summon float num646 = Vector2.Distance(npc.Center, projectile.Center); if ((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !flag25) { + num633 = num646; vector46 = npc.Center; flag25 = true; } diff --git a/Projectiles/Summon/ProfanedEnergy.cs b/Projectiles/Summon/ProfanedEnergy.cs index 84b56e475d..93b191e433 100644 --- a/Projectiles/Summon/ProfanedEnergy.cs +++ b/Projectiles/Summon/ProfanedEnergy.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Summon { Player player = Main.player[projectile.owner]; projectile.frameCounter++; - if (projectile.frameCounter > 6) + if (projectile.frameCounter > 5) { projectile.frame++; projectile.frameCounter = 0; diff --git a/Projectiles/Summon/ProfanedEnergy.png b/Projectiles/Summon/ProfanedEnergy.png index d9175e3f3e..84082faf9b 100644 Binary files a/Projectiles/Summon/ProfanedEnergy.png and b/Projectiles/Summon/ProfanedEnergy.png differ diff --git a/Projectiles/Summon/WulfrumDroid.cs b/Projectiles/Summon/WulfrumDroid.cs index aa3a78fd03..a832f48a9e 100644 --- a/Projectiles/Summon/WulfrumDroid.cs +++ b/Projectiles/Summon/WulfrumDroid.cs @@ -108,16 +108,19 @@ namespace CalamityMod.Projectiles.Summon float num7 = 400f; bool flag = false; int num8 = -1; - NPC minionAttackTargetNpc = projectile.OwnerMinionAttackTargetNPC; - if (minionAttackTargetNpc != null && minionAttackTargetNpc.CanBeChasedBy((object) this, false)) - { - float num1 = Vector2.Distance(minionAttackTargetNpc.Center, projectile.Center); - if (((double) Vector2.Distance(projectile.Center, vector2_3) > (double) num1 && (double) num1 < (double) num7 || !flag) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, minionAttackTargetNpc.position, minionAttackTargetNpc.width, minionAttackTargetNpc.height)) + if (player.HasMinionAttackTargetNPC) + { + NPC npc = Main.npc[player.MinionAttackTargetNPC]; + if (npc.CanBeChasedBy((object) this, false)) { - num7 = num1; - vector2_3 = minionAttackTargetNpc.Center; - flag = true; - num8 = minionAttackTargetNpc.whoAmI; + float num1 = Vector2.Distance(npc.Center, projectile.Center); + if (((double) Vector2.Distance(projectile.Center, vector2_3) > (double) num1 && (double) num1 < (double) num7 || !flag) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height)) + { + num7 = num1; + vector2_3 = npc.Center; + flag = true; + num8 = npc.whoAmI; + } } } if (!flag) diff --git a/Projectiles/Typeless/DevourerofCodsBobber.cs b/Projectiles/Typeless/DevourerofCodsBobber.cs index 44836f8152..0bed41f22b 100644 --- a/Projectiles/Typeless/DevourerofCodsBobber.cs +++ b/Projectiles/Typeless/DevourerofCodsBobber.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Typeless public override bool PreDrawExtras(SpriteBatch spriteBatch) { Lighting.AddLight(projectile.Center, 0.35f, 0f, 0.25f); - CalamityUtils.DrawFishingLine(projectile, ModContent.ItemType(), projectile.Calamity().lineColor ? new Color(252, 109, 202, 100) : new Color(39, 151, 171, 100)); + CalamityUtils.DrawFishingLine(projectile, ModContent.ItemType(), projectile.Calamity().lineColor == 1 ? new Color(252, 109, 202, 100) : new Color(39, 151, 171, 100)); return false; } } diff --git a/Projectiles/Typeless/DirectStrike.cs b/Projectiles/Typeless/DirectStrike.cs index 1593c78a4d..127b2cd62a 100644 --- a/Projectiles/Typeless/DirectStrike.cs +++ b/Projectiles/Typeless/DirectStrike.cs @@ -14,6 +14,7 @@ namespace CalamityMod.Projectiles.Typeless { projectile.width = 2; projectile.height = 2; + projectile.friendly = true; projectile.penetrate = 1; projectile.extraUpdates = 0; projectile.ignoreWater = true; diff --git a/Projectiles/Typeless/NavyBobber.cs b/Projectiles/Typeless/NavyBobber.cs index c9f606ea4a..f7b80b79bc 100644 --- a/Projectiles/Typeless/NavyBobber.cs +++ b/Projectiles/Typeless/NavyBobber.cs @@ -1,10 +1,8 @@ +using CalamityMod.Items.Fishing.FishingRods; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; using Terraria; -using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Items.Fishing.FishingRods; namespace CalamityMod.Projectiles.Typeless { public class NavyBobber : ModProjectile @@ -16,7 +14,6 @@ namespace CalamityMod.Projectiles.Typeless public override void SetDefaults() { - //projectile.CloneDefaults(360); //Wooden Bobber projectile.width = 14; projectile.height = 14; projectile.aiStyle = 61; diff --git a/Projectiles/Typeless/TeslaAura.cs b/Projectiles/Typeless/TeslaAura.cs index 2af729e8a6..8e806421de 100644 --- a/Projectiles/Typeless/TeslaAura.cs +++ b/Projectiles/Typeless/TeslaAura.cs @@ -1,6 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.NPCs; -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -74,12 +74,13 @@ namespace CalamityMod.Projectiles.Typeless } target.AddBuff(BuffID.Electrified, 300); - target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 120); } public override void OnHitPvp(Player target, int damage, bool crit) { target.AddBuff(BuffID.Electrified, 300); + target.AddBuff(ModContent.BuffType(), 120); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 02903e1837..9e18bad3c8 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -778,6 +778,12 @@ namespace CalamityMod r.AddIngredient(ModContent.ItemType(), 7); r.AddTile(TileID.MythrilAnvil); r.SetResult(ItemID.TerraBlade); + r.AddRecipe(); + + // Turtle Shell with Giant Tortoise Shell + r = GetNewRecipe(); + r.AddIngredient(ModContent.ItemType()); + r.SetResult(ItemID.TurtleShell); r.AddRecipe(); } #endregion diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index f52e0b4ffe..f4654b7855 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -37,6 +37,16 @@ namespace CalamityMod { public static class CalamityUtils { + public static readonly CalamityRarity[] postMLRarities = + { + CalamityRarity.Turquoise, + CalamityRarity.PureGreen, + CalamityRarity.DarkBlue, + CalamityRarity.Violet, + CalamityRarity.Developer, + CalamityRarity.Rainbow + }; + #region Object Extensions public static CalamityPlayer Calamity(this Player player) => player.GetModPlayer(); public static CalamityGlobalNPC Calamity(this NPC npc) => npc.GetGlobalNPC(); @@ -172,6 +182,19 @@ namespace CalamityMod #endregion #region Item Utilities + public static bool IsPostML(this CalamityRarity calrare) + { + return calrare != CalamityRarity.NoEffect; + // TODO -- separate out whether an item is post-ML from its custom rarity. + // This is necessary because there are pre-ML rare variants, legendary weapons and dedicated items. + /* + for(int i = 0; i < postMLRarities.Length; ++i) + if (postMLRarities[i] == calrare) + return true; + return false; + */ + } + public static Rectangle FixSwingHitbox(float hitboxWidth, float hitboxHeight) { Player player = Main.player[Main.myPlayer]; diff --git a/Utilities/Enums.cs b/Utilities/Enums.cs index ebea6267a6..4401d332ab 100644 --- a/Utilities/Enums.cs +++ b/Utilities/Enums.cs @@ -7,4 +7,18 @@ Crimson, Hallow } + + public enum CalamityRarity + { + ItemSpecific = -1, + NoEffect = 0, + Turquoise = 12, + PureGreen = 13, + DarkBlue = 14, + Violet = 15, + Developer = 16, + Rainbow = 30, + RareVariant = 31, + Dedicated = 32 + } } diff --git a/Walls/BrimstoneSlagWallUnsafe.cs b/Walls/BrimstoneSlagWallUnsafe.cs new file mode 100644 index 0000000000..4a583696e9 --- /dev/null +++ b/Walls/BrimstoneSlagWallUnsafe.cs @@ -0,0 +1,80 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Walls +{ + public class BrimstoneSlagWallUnsafe : ModWall + { + public override void SetDefaults() + { + drop = ModContent.ItemType(); + AddMapEntry(new Color(24, 16, 29)); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 60, 0f, 0f, 1, new Color(255, 255, 255), 1f); + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 1, 0f, 0f, 1, new Color(100, 100, 100), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) + { + Texture2D sprite = ModContent.GetTexture("CalamityMod/Walls/BrimstoneSlagWall"); + Color lightColor = GetWallColour(i, j); + Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + zero -= new Vector2(8, 8); + Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; + int[] sheetOffset = CreatePattern(i, j); + spriteBatch.Draw + ( + sprite, + drawOffset, + new Rectangle(sheetOffset[0] + Main.tile[i, j].wallFrameX(), sheetOffset[1] + Main.tile[i, j].wallFrameY(), 32, 32), + lightColor, + 0, + new Vector2(0f, 0f), + 1, + SpriteEffects.None, + 0f + ); + return false; + } + + private int[] CreatePattern(int i, int j) + { + int[] sheetOffset = new int[2] { i % 2, j % 2 }; + sheetOffset[0] = sheetOffset[0] * 468; + sheetOffset[1] = sheetOffset[1] * 180; + return sheetOffset; + } + + private Color GetWallColour(int i, int j) + { + int colType = Main.tile[i, j].wallColor(); + Color paintCol = WorldGen.paintColor(colType); + if (colType < 13) + { + paintCol.R = (byte)((paintCol.R / 2f) + 128); + paintCol.G = (byte)((paintCol.G / 2f) + 128); + paintCol.B = (byte)((paintCol.B / 2f) + 128); + } + if (colType == 29) + { + paintCol = Color.Black; + } + Color col = Lighting.GetColor(i, j); + col.R = (byte)(paintCol.R / 255f * col.R); + col.G = (byte)(paintCol.G / 255f * col.G); + col.B = (byte)(paintCol.B / 255f * col.B); + return col; + } + } +} diff --git a/Walls/BrimstoneSlagWallUnsafe.png b/Walls/BrimstoneSlagWallUnsafe.png new file mode 100644 index 0000000000..f789f6969b Binary files /dev/null and b/Walls/BrimstoneSlagWallUnsafe.png differ diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index b65f0d6e80..76d5651965 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -17,6 +17,7 @@ using CalamityMod.Tiles.Astral; using CalamityMod.Tiles.AstralDesert; using CalamityMod.Tiles.AstralSnow; using CalamityMod.Tiles.Crags; +using CalamityMod.Tiles.FurnitureAncient; using CalamityMod.Tiles.Ores; using CalamityMod.Tiles.SunkenSea; using CalamityMod.Walls; @@ -3040,7 +3041,7 @@ namespace CalamityMod.World public static void UnderworldIslandHouse(int i, int j, int item) { ushort type = (ushort)ModContent.TileType(); //tile - byte wall = (byte)14; //wall + byte wall = (byte)ModContent.WallType(); //wall Vector2 vector = new Vector2((float)i, (float)j); int num = 1; if (WorldGen.genRand.Next(2) == 0) @@ -3133,7 +3134,7 @@ namespace CalamityMod.World Main.tile[num11, num10 - 1].active(false); Main.tile[num11, num10 - 2].active(false); } - WorldGen.PlaceTile(num9, num10, 10, true, false, -1, 19); //door + WorldGen.PlaceTile(num9, num10, ModContent.TileType(), true, false, -1); //door num9 = i + (num2 + 1) * -num - num; for (int num12 = num6; num12 <= num7 + 1; num12++) { @@ -3146,13 +3147,13 @@ namespace CalamityMod.World } WorldGen.AddBuriedChest(i, num10 - 3, item, false, 4); //chest int num22 = i + (num2 / 2 + 1) * -num; - WorldGen.PlaceTile(num22, num7 - 1, 14, true, false, -1, 13); //table - WorldGen.PlaceTile(num22 - 2, num7 - 1, 15, true, false, 0, 16); //chair + WorldGen.PlaceTile(num22, num7 - 1, ModContent.TileType(), true, false, -1); //table + WorldGen.PlaceTile(num22 - 2, num7 - 1, ModContent.TileType(), true, false, 0); //chair Tile tile = Main.tile[num22 - 2, num7 - 1]; tile.frameX += 18; Tile tile2 = Main.tile[num22 - 2, num7 - 2]; tile2.frameX += 18; - WorldGen.PlaceTile(num22 + 2, num7 - 1, 15, true, false, 0, 16); //chair + WorldGen.PlaceTile(num22 + 2, num7 - 1, ModContent.TileType(), true, false, 0); //chair } #endregion