From b2362c92c66898a0f8f27c9f8696b017490c4f6e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 6 Apr 2020 09:24:53 -0400 Subject: [PATCH 01/12] meter shake config should be under rev changes --- Configs.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Configs.cs b/Configs.cs index d1289c8b91..f4a3160ce5 100644 --- a/Configs.cs +++ b/Configs.cs @@ -63,12 +63,6 @@ namespace CalamityMod [Tooltip("Prevents the movement of the Adrenaline, Rage and Stealth bars with the Mouse")] public bool MeterPosLock { get; set; } - [DefaultValue(2f)] - [Range(0f, 4f)] - [Label("Adrenaline and Rage Meter Shake")] - [Tooltip("How much the Adrenaline and Rage Meter shake while in use. Set to 0 to disable.")] - public float MeterShake { get; set; } - [DefaultValue(true)] [Label("Boss Health Bar Small Text")] [Tooltip("Enables the small text below the health bar\nThis displays the exact health amount or remaining boss parts")] @@ -143,6 +137,12 @@ namespace CalamityMod [DefaultValue(RipperUI.DefaultAdrenPosY)] public float AdrenalineMeterPosY { get; set; } + [DefaultValue(2f)] + [Range(0f, 4f)] + [Label("Adrenaline and Rage Meter Shake")] + [Tooltip("How much the Adrenaline and Rage Meter shake while in use. Set to 0 to disable.")] + public float MeterShake { get; set; } + [DefaultValue(false)] [Label("Revengeance and Death Thorium Boss buff")] [Tooltip("Buffs the health of Thorium bosses if Revengeance or Death is enabled")] From d76674c8b862a13cac0e7b211392c21c92128ba7 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:12:46 -0400 Subject: [PATCH 02/12] true melee changes and some balancing --- CalPlayer/CalamityPlayer.cs | 4 +- CalamityMod.cs | 69 ---------------------- Items/CalamityGlobalItem.cs | 24 ++++++++ Items/Tools/PurityAxe.cs | 2 +- Items/Weapons/Melee/Brimlance.cs | 1 + Items/Weapons/Melee/CelestialClaymore.cs | 4 +- Items/Weapons/Melee/ClamCrusher.cs | 2 +- Items/Weapons/Melee/DevilsSunrise.cs | 1 + Items/Weapons/Melee/DiseasedPike.cs | 1 + Items/Weapons/Melee/EutrophicScimitar.cs | 4 +- Items/Weapons/Melee/ExsanguinationLance.cs | 1 + Items/Weapons/Melee/ForsakenSaber.cs | 6 ++ Items/Weapons/Melee/FulgurationHalberd.cs | 1 + Items/Weapons/Melee/GildedProboscis.cs | 1 + Items/Weapons/Melee/HeartRapier.cs | 1 + Items/Weapons/Melee/MarniteSpear.cs | 1 + Items/Weapons/Melee/Murasama.cs | 1 + Items/Weapons/Melee/SausageMaker.cs | 1 + Items/Weapons/Melee/StormSaber.cs | 19 +++++- Items/Weapons/Melee/TrueCausticEdge.cs | 18 +++--- Items/Weapons/Melee/YateveoBloom.cs | 2 + Items/Weapons/Ranged/Barinautical.cs | 2 +- Projectiles/CalamityGlobalProjectile.cs | 11 ---- Projectiles/Melee/ClamCrusherFlail.cs | 1 - Projectiles/Melee/CosmicDischargeFlail.cs | 1 - Projectiles/Melee/MourningstarFlail.cs | 1 - Projectiles/Melee/NebulashFlail.cs | 1 - Projectiles/Melee/TumbleweedFlail.cs | 1 - Projectiles/Melee/UrchinBall.cs | 1 - Projectiles/Melee/YateveoBloomProj.cs | 1 - Utilities/CalamityRecipes.cs | 7 +++ 31 files changed, 84 insertions(+), 107 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index ee7a375f76..e8eea9b926 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -3633,7 +3633,7 @@ namespace CalamityMod.CalPlayer #region Get Weapon Damage And KB public override void ModifyWeaponDamage(Item item, ref float add, ref float mult, ref float flat) { - bool isTrueMelee = item.melee && (item.shoot == 0 || (item.noMelee && item.noUseGraphic && item.useStyle == 5 && !CalamityMod.trueMeleeBoostExceptionList.Contains(item.type) && ItemID.Sets.Yoyo[item.type] != true)); + bool isTrueMelee = item.melee && (item.shoot == 0 || item.Calamity().trueMelee); if (isTrueMelee) { if (tScale) @@ -3760,7 +3760,7 @@ namespace CalamityMod.CalPlayer } } } - bool isTrueMelee = item.melee && (item.shoot == 0 || (item.noMelee && item.noUseGraphic && item.useStyle == 5 && !CalamityMod.trueMeleeBoostExceptionList.Contains(item.type) && ItemID.Sets.Yoyo[item.type] != true)); + bool isTrueMelee = item.melee && (item.shoot == 0 || item.Calamity().trueMelee); if (isTrueMelee) { if (fungalSymbiote && player.whoAmI == Main.myPlayer) diff --git a/CalamityMod.cs b/CalamityMod.cs index 60c5e4d3d9..3058478a50 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -165,7 +165,6 @@ namespace CalamityMod public static List movementImpairImmuneList; public static List trapProjectileList; public static List scopedWeaponList; - public static List trueMeleeBoostExceptionList; public static List boomerangList; public static List javelinList; public static List daggerList; @@ -374,7 +373,6 @@ namespace CalamityMod movementImpairImmuneList = null; trapProjectileList = null; scopedWeaponList = null; - trueMeleeBoostExceptionList = null; boomerangList = null; javelinList = null; daggerList = null; @@ -1820,73 +1818,6 @@ namespace CalamityMod ModContent.ItemType() }; - trueMeleeBoostExceptionList = new List() - { - ItemID.FlowerPow, - ItemID.Flairon, - ItemID.ChlorophytePartisan, - ItemID.MushroomSpear, - ItemID.NorthPole, - ItemID.WoodYoyo, - ItemID.CorruptYoyo, - ItemID.CrimsonYoyo, - ItemID.JungleYoyo, - ItemID.Cascade, - ItemID.Chik, - ItemID.Code1, - ItemID.Code2, - ItemID.Rally, - ItemID.Yelets, - ItemID.RedsYoyo, - ItemID.ValkyrieYoyo, - ItemID.Amarok, - ItemID.HelFire, - ItemID.Kraken, - ItemID.TheEyeOfCthulhu, - ItemID.FormatC, - ItemID.Gradient, - ItemID.Valor, - ItemID.Terrarian, - - // flails - ModContent.ItemType(), - ModContent.ItemType(), - - // spears - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType(), - - // yoyos - 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(), - - // other - ModContent.ItemType(), - ModContent.ItemType() - }; - boomerangList = new List() { ModContent.ItemType(), diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 17f7bcd7aa..81bd98aef1 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -54,6 +54,7 @@ namespace CalamityMod.Items #endregion public bool rogue = false; + public bool trueMelee = false; public int timesUsed = 0; @@ -180,6 +181,29 @@ namespace CalamityMod.Items item.damage *= 4; item.rare = 4; } + + switch (item.type) + { + case ItemID.Spear: + case ItemID.TheRottedFork: + case ItemID.Swordfish: + case ItemID.Arkhalis: + case ItemID.DarkLance: + case ItemID.CobaltNaginata: + case ItemID.PalladiumPike: + case ItemID.MythrilHalberd: + case ItemID.OrichalcumHalberd: + case ItemID.AdamantiteGlaive: + case ItemID.TitaniumTrident: + case ItemID.Gungnir: + case ItemID.ObsidianSwordfish: + case ItemID.MonkStaffT3: + case ItemID.MonkStaffT1: + trueMelee = true; + break; + default: + break; + } } #endregion diff --git a/Items/Tools/PurityAxe.cs b/Items/Tools/PurityAxe.cs index bdc6bf04f6..9fced17a3a 100644 --- a/Items/Tools/PurityAxe.cs +++ b/Items/Tools/PurityAxe.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Items.Tools recipe.AddIngredient(ItemID.PurificationPowder, 20); recipe.AddIngredient(ItemID.PixieDust, 10); recipe.AddIngredient(ItemID.CrystalShard, 5); - recipe.AddTile(TileID.Anvils); + recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Weapons/Melee/Brimlance.cs b/Items/Weapons/Melee/Brimlance.cs index 4e7c7c12fd..a204e8aac4 100644 --- a/Items/Weapons/Melee/Brimlance.cs +++ b/Items/Weapons/Melee/Brimlance.cs @@ -32,6 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 5; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; + item.Calamity().trueMelee = true; } } } diff --git a/Items/Weapons/Melee/CelestialClaymore.cs b/Items/Weapons/Melee/CelestialClaymore.cs index 217c9754e0..7cba73378e 100644 --- a/Items/Weapons/Melee/CelestialClaymore.cs +++ b/Items/Weapons/Melee/CelestialClaymore.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 50; - item.damage = 63; + item.damage = 70; item.melee = true; item.useAnimation = 23; item.useTime = 23; @@ -88,7 +88,7 @@ namespace CalamityMod.Items.Weapons.Melee default: break; } - Projectile.NewProjectile(vector2.X, vector2.Y, 0f, 0f, type, damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(3)); + Projectile.NewProjectile(vector2.X, vector2.Y, 0f, 0f, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0f, (float)Main.rand.Next(3)); } return false; } diff --git a/Items/Weapons/Melee/ClamCrusher.cs b/Items/Weapons/Melee/ClamCrusher.cs index 5d9ed99c23..08562b8c22 100644 --- a/Items/Weapons/Melee/ClamCrusher.cs +++ b/Items/Weapons/Melee/ClamCrusher.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.damage = 140; + item.damage = 100; item.melee = true; item.width = 40; item.height = 60; diff --git a/Items/Weapons/Melee/DevilsSunrise.cs b/Items/Weapons/Melee/DevilsSunrise.cs index e0efd6d5f8..a7a9b0c133 100644 --- a/Items/Weapons/Melee/DevilsSunrise.cs +++ b/Items/Weapons/Melee/DevilsSunrise.cs @@ -38,6 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; + item.Calamity().trueMelee = true; } 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/DiseasedPike.cs b/Items/Weapons/Melee/DiseasedPike.cs index fbcf8cb69d..3f6d1ecbba 100644 --- a/Items/Weapons/Melee/DiseasedPike.cs +++ b/Items/Weapons/Melee/DiseasedPike.cs @@ -32,6 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 8; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; + item.Calamity().trueMelee = true; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/EutrophicScimitar.cs b/Items/Weapons/Melee/EutrophicScimitar.cs index e018ff715f..907f8f29c2 100644 --- a/Items/Weapons/Melee/EutrophicScimitar.cs +++ b/Items/Weapons/Melee/EutrophicScimitar.cs @@ -42,7 +42,9 @@ namespace CalamityMod.Items.Weapons.Melee dust.noGravity = true; dust.fadeIn = 0.9473684f; } - return true; + + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * 0.7), knockBack, player.whoAmI, 0f, 0f); + return false; } } } diff --git a/Items/Weapons/Melee/ExsanguinationLance.cs b/Items/Weapons/Melee/ExsanguinationLance.cs index 838bf0e9f9..0dd40697fe 100644 --- a/Items/Weapons/Melee/ExsanguinationLance.cs +++ b/Items/Weapons/Melee/ExsanguinationLance.cs @@ -33,6 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 8; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 8f; + item.Calamity().trueMelee = true; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/ForsakenSaber.cs b/Items/Weapons/Melee/ForsakenSaber.cs index 2492ffdc2f..de304b98f0 100644 --- a/Items/Weapons/Melee/ForsakenSaber.cs +++ b/Items/Weapons/Melee/ForsakenSaber.cs @@ -33,6 +33,12 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 5f; } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0f, 0f); + return false; + } + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); diff --git a/Items/Weapons/Melee/FulgurationHalberd.cs b/Items/Weapons/Melee/FulgurationHalberd.cs index 3dcb5c06b6..e033e89a45 100644 --- a/Items/Weapons/Melee/FulgurationHalberd.cs +++ b/Items/Weapons/Melee/FulgurationHalberd.cs @@ -31,6 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; item.shootSpeed = 6f; + item.Calamity().trueMelee = true; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Melee/GildedProboscis.cs b/Items/Weapons/Melee/GildedProboscis.cs index 1f80a37c3c..d50a4f8fa7 100644 --- a/Items/Weapons/Melee/GildedProboscis.cs +++ b/Items/Weapons/Melee/GildedProboscis.cs @@ -34,6 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.shoot = ModContent.ProjectileType(); item.shootSpeed = 13f; item.Calamity().customRarity = CalamityRarity.Turquoise; + item.Calamity().trueMelee = true; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/HeartRapier.cs b/Items/Weapons/Melee/HeartRapier.cs index a87a3c2330..eb2b398344 100644 --- a/Items/Weapons/Melee/HeartRapier.cs +++ b/Items/Weapons/Melee/HeartRapier.cs @@ -32,6 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 5; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; + item.Calamity().trueMelee = true; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/MarniteSpear.cs b/Items/Weapons/Melee/MarniteSpear.cs index 4cbf780e06..367ac7d2aa 100644 --- a/Items/Weapons/Melee/MarniteSpear.cs +++ b/Items/Weapons/Melee/MarniteSpear.cs @@ -31,6 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 2; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 5f; + item.Calamity().trueMelee = true; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/Murasama.cs b/Items/Weapons/Melee/Murasama.cs index afb2d14bee..0e79619fa7 100644 --- a/Items/Weapons/Melee/Murasama.cs +++ b/Items/Weapons/Melee/Murasama.cs @@ -34,6 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; item.Calamity().customRarity = CalamityRarity.Violet; + item.Calamity().trueMelee = true; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Melee/SausageMaker.cs b/Items/Weapons/Melee/SausageMaker.cs index 97f9d5e6b0..0c0b6a3054 100644 --- a/Items/Weapons/Melee/SausageMaker.cs +++ b/Items/Weapons/Melee/SausageMaker.cs @@ -33,6 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 3; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; + item.Calamity().trueMelee = true; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/StormSaber.cs b/Items/Weapons/Melee/StormSaber.cs index aafa76768b..ebe427f352 100644 --- a/Items/Weapons/Melee/StormSaber.cs +++ b/Items/Weapons/Melee/StormSaber.cs @@ -11,13 +11,14 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Storm Saber"); - Tooltip.SetDefault("Fires a storm beam"); + Tooltip.SetDefault("Fires two storm beams\n" + + "One from blade and one from the sky"); } public override void SetDefaults() { item.width = 58; - item.damage = 42; + item.damage = 50; item.melee = true; item.useAnimation = 23; item.useTime = 23; @@ -33,6 +34,20 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 12f; } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0f, 0f); + + Vector2 spawnPos = new Vector2(player.MountedCenter.X + Main.rand.Next(-200, 201), player.MountedCenter.Y - 600f); + Vector2 targetPos = Main.MouseWorld + new Vector2(Main.rand.Next(-30, 31), Main.rand.Next(-30, 31)); + Vector2 velocity = targetPos - spawnPos; + velocity.Normalize(); + velocity *= 13f; + + Projectile.NewProjectile(spawnPos, velocity, type, (int)(damage * 0.6), knockBack, player.whoAmI); + return false; + } + public override void MeleeEffects(Player player, Rectangle hitbox) { if (Main.rand.NextBool(5)) diff --git a/Items/Weapons/Melee/TrueCausticEdge.cs b/Items/Weapons/Melee/TrueCausticEdge.cs index 2004d477f6..7be9f192e0 100644 --- a/Items/Weapons/Melee/TrueCausticEdge.cs +++ b/Items/Weapons/Melee/TrueCausticEdge.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 64; - item.damage = 42; + item.damage = 75; item.melee = true; item.useAnimation = 28; item.useStyle = 1; @@ -34,19 +34,17 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 16f; } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0f, 0f); + return false; + } + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ItemID.FlaskofCursedFlames, 5); - recipe.AddIngredient(ItemID.FlaskofPoison, 5); - recipe.AddIngredient(ItemID.Deathweed, 3); - recipe.AddTile(TileID.DemonAltar); - recipe.SetResult(this); - recipe.AddRecipe(); - recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ItemID.FlaskofIchor, 5); + recipe.AddRecipeGroup("AnyEvilFlask", 5); recipe.AddIngredient(ItemID.FlaskofPoison, 5); recipe.AddIngredient(ItemID.Deathweed, 3); recipe.AddTile(TileID.DemonAltar); diff --git a/Items/Weapons/Melee/YateveoBloom.cs b/Items/Weapons/Melee/YateveoBloom.cs index 4851938639..427455d81a 100644 --- a/Items/Weapons/Melee/YateveoBloom.cs +++ b/Items/Weapons/Melee/YateveoBloom.cs @@ -60,6 +60,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useAnimation = 33; item.useTime = 33; item.shootSpeed = 4.5f; + item.Calamity().trueMelee = true; } else { @@ -68,6 +69,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useAnimation = 22; item.useTime = 22; item.shootSpeed = ShootSpeed; + item.Calamity().trueMelee = false; } return base.CanUseItem(player); } diff --git a/Items/Weapons/Ranged/Barinautical.cs b/Items/Weapons/Ranged/Barinautical.cs index 3ee0dea505..1ecdf007f8 100644 --- a/Items/Weapons/Ranged/Barinautical.cs +++ b/Items/Weapons/Ranged/Barinautical.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 20; + item.damage = 23; item.ranged = true; item.width = 30; item.height = 42; diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 78bc745f74..f46e160544 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -73,31 +73,20 @@ namespace CalamityMod.Projectiles switch (projectile.type) { case ProjectileID.Spear: - case ProjectileID.ChainKnife: case ProjectileID.TheRottedFork: - case ProjectileID.BallOHurt: - case ProjectileID.TheMeatball: case ProjectileID.Swordfish: case ProjectileID.Arkhalis: - case ProjectileID.BlueMoon: case ProjectileID.DarkLance: - case ProjectileID.Sunfury: - case ProjectileID.Anchor: - case ProjectileID.BoxingGlove: case ProjectileID.CobaltNaginata: case ProjectileID.PalladiumPike: case ProjectileID.MythrilHalberd: case ProjectileID.OrichalcumHalberd: case ProjectileID.AdamantiteGlaive: case ProjectileID.TitaniumTrident: - case ProjectileID.TheDaoofPow: - case ProjectileID.GolemFist: case ProjectileID.Gungnir: case ProjectileID.ObsidianSwordfish: - case ProjectileID.ChainGuillotine: case ProjectileID.MonkStaffT3: case ProjectileID.MonkStaffT1: - case ProjectileID.SolarWhipSword: trueMelee = true; break; case ProjectileID.StarWrath: diff --git a/Projectiles/Melee/ClamCrusherFlail.cs b/Projectiles/Melee/ClamCrusherFlail.cs index 1821044352..ab30de06fa 100644 --- a/Projectiles/Melee/ClamCrusherFlail.cs +++ b/Projectiles/Melee/ClamCrusherFlail.cs @@ -26,7 +26,6 @@ namespace CalamityMod.Projectiles.Melee projectile.melee = true; projectile.alpha = 255; projectile.tileCollide = false; - projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/CosmicDischargeFlail.cs b/Projectiles/Melee/CosmicDischargeFlail.cs index 67332b2145..2f3aed3202 100644 --- a/Projectiles/Melee/CosmicDischargeFlail.cs +++ b/Projectiles/Melee/CosmicDischargeFlail.cs @@ -30,7 +30,6 @@ namespace CalamityMod.Projectiles.Melee projectile.ignoreWater = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 4; - projectile.Calamity().trueMelee = true; projectile.coldDamage = true; } public override Color SpecialDrawColor => new Color(150, 255, 255); diff --git a/Projectiles/Melee/MourningstarFlail.cs b/Projectiles/Melee/MourningstarFlail.cs index eeeb42a21a..7a602f1b75 100644 --- a/Projectiles/Melee/MourningstarFlail.cs +++ b/Projectiles/Melee/MourningstarFlail.cs @@ -21,7 +21,6 @@ namespace CalamityMod.Projectiles.Melee projectile.ignoreWater = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; - projectile.Calamity().trueMelee = true; } } } diff --git a/Projectiles/Melee/NebulashFlail.cs b/Projectiles/Melee/NebulashFlail.cs index 9ae8afc278..47cba7fb60 100644 --- a/Projectiles/Melee/NebulashFlail.cs +++ b/Projectiles/Melee/NebulashFlail.cs @@ -27,7 +27,6 @@ namespace CalamityMod.Projectiles.Melee projectile.ignoreWater = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 2; - projectile.Calamity().trueMelee = true; } public override Color SpecialDrawColor => new Color(255, 200, 0); public override int ExudeDustType => ModContent.DustType(); diff --git a/Projectiles/Melee/TumbleweedFlail.cs b/Projectiles/Melee/TumbleweedFlail.cs index 9994353091..8d412f1c10 100644 --- a/Projectiles/Melee/TumbleweedFlail.cs +++ b/Projectiles/Melee/TumbleweedFlail.cs @@ -21,7 +21,6 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.melee = true; projectile.alpha = 255; - projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/UrchinBall.cs b/Projectiles/Melee/UrchinBall.cs index 4eeac5a8a6..7f48fa8765 100644 --- a/Projectiles/Melee/UrchinBall.cs +++ b/Projectiles/Melee/UrchinBall.cs @@ -27,7 +27,6 @@ namespace CalamityMod.Projectiles.Melee projectile.alpha = 255; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 3; - projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/YateveoBloomProj.cs b/Projectiles/Melee/YateveoBloomProj.cs index c1634de9a4..9ff164c273 100644 --- a/Projectiles/Melee/YateveoBloomProj.cs +++ b/Projectiles/Melee/YateveoBloomProj.cs @@ -22,7 +22,6 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.melee = true; projectile.alpha = 255; - projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 1a9e896d67..751360327d 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -963,6 +963,13 @@ namespace CalamityMod }); RecipeGroup.RegisterGroup("CursedFlameIchor", group); + group = new RecipeGroup(() => "Any Evil Flask", new int[] + { + ItemID.FlaskofCursedFlames, + ItemID.FlaskofIchor + }); + RecipeGroup.RegisterGroup("AnyEvilFlask", group); + group = new RecipeGroup(() => "Any Evil Water", new int[] { ItemID.UnholyWater, From 809cead4f8cdb6497c1efc0d40316019f1e90e20 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:42:17 -0400 Subject: [PATCH 03/12] cadance no longer fucks with maso nymphs --- CalPlayer/CalamityPlayer.cs | 14 ++++++++++++++ CalPlayer/CalamityPlayerMiscEffects.cs | 1 - 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index e8eea9b926..ec388d22d1 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -9138,6 +9138,20 @@ namespace CalamityMod.CalPlayer fullBright = true; } } + if (cadence) + { + if (Main.rand.NextBool(5) && drawInfo.shadow == 0f) + { + Vector2 vector2_2 = new Vector2((float)Main.rand.Next(-10, 11), (float)Main.rand.Next(-10, 11)); + vector2_2.Normalize(); + vector2_2.X *= 0.66f; + int heart = Gore.NewGore(drawInfo.position + new Vector2((float)Main.rand.Next(player.width + 1), (float)Main.rand.Next(player.height + 1)), vector2_2 * (float)Main.rand.Next(3, 6) * 0.33f, 331, (float)Main.rand.Next(40, 121) * 0.01f); + Main.gore[heart].sticky = false; + Main.gore[heart].velocity *= 0.4f; + Main.gore[heart].velocity.Y -= 0.6f; + Main.playerDrawGore.Add(heart); + } + } } #endregion diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index ea981c87b5..8e32f3ee89 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2687,7 +2687,6 @@ namespace CalamityMod.CalPlayer player.discount = true; player.lifeMagnet = true; player.calmed = true; - player.loveStruck = true; } if (modPlayer.community) From 26003869558c4a6a938417e23c00c145c395d8b5 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:44:00 -0400 Subject: [PATCH 04/12] cadance hearts only show if not lovestruck --- CalPlayer/CalamityPlayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index ec388d22d1..a7eab5ff5c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -9138,7 +9138,7 @@ namespace CalamityMod.CalPlayer fullBright = true; } } - if (cadence) + if (cadence && !player.loveStruck) { if (Main.rand.NextBool(5) && drawInfo.shadow == 0f) { From aca9b0becb6ededbe684d52d3f8c11f5eb32b07e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 6 Apr 2020 11:50:58 -0400 Subject: [PATCH 05/12] glacial state and ice star --- Buffs/StatDebuffs/GlacialState.png | Bin 525 -> 434 bytes Items/Weapons/Rogue/IceStar.png | Bin 1531 -> 1318 bytes Projectiles/Rogue/IceStarProjectile.png | Bin 1531 -> 1318 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Buffs/StatDebuffs/GlacialState.png b/Buffs/StatDebuffs/GlacialState.png index f38b37b8bb6bb58ffd0853c304ac5322012c2829..b3d02f6cff91b50ae6340480b711df985dedac8c 100644 GIT binary patch delta 408 zcmV;J0cZY=1hNB=B!78HL_t(oh2@toNCQzE$3G_~@ef!8F&GvM;(@Ssg2E7ti$=k? zViCb?5yXW>VZmV2D2QOtHW3B}!@|;v$2@ttnxGJe=`z$Z<9 zv=M(lyi5Nl#D9y+rCc4b?|_yje>kZE3Av1V$$ggWIv}~1c`l=TI-CR&@`agbpbpq^ zz_(wEguH$B2*65d7f4pVeslkK_5v*#10tFCA|JV|fIiuCKyoA}8S3teS-IBazSHu^ z9r$%G81z)E<%?(cUZBrzc^%1nqZ+vb!N0#9{{W~ylo5tv5Y0{i0000hYd9Md09QucniUW(+7L`z4_HqKp%H1-vzo?8_icGS3&Y&}GK;n9mGN_;dqO zqI(!x`MnHuo(sUpE8wkxK(Y|Y{J)GR*G{!p9WIV*x>U@ofL!e|W7*@*L=r9|^UJ_= zs=_I|aIH<{dw=D5VNM0)$tHVG=Ik+C_7F^VI>e_w)}#b1Kki z?HYX0m6z&*?;F)FtzJ p^NqO+yb84JpOISuKCSt8{0oAttV!aAm0bV;002ovPDHLkV1k_d{RRL4 diff --git a/Items/Weapons/Rogue/IceStar.png b/Items/Weapons/Rogue/IceStar.png index c71cf0bd495326f94afe78df1bebd2201bc93507..cfeebe4f904f599381257be96e4d60647ebca659 100644 GIT binary patch delta 1286 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 Date: Mon, 6 Apr 2020 13:55:14 -0400 Subject: [PATCH 06/12] reduced severity of sulphuric poisoning --- CalPlayer/CalamityPlayerLifeRegen.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 1d70f34cc7..f9d30b3803 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -164,7 +164,7 @@ namespace CalamityMod.CalPlayer player.lifeRegen = 0; player.lifeRegenTime = 0; - lifeRegenLost += 12; + lifeRegenLost += 6; } if (modPlayer.hFlames) From f236b5ef899966d4af9119b57a41e6d4126d726c Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 6 Apr 2020 17:57:02 -0400 Subject: [PATCH 07/12] color swap utility and pristine fury color tweaks --- Items/CalamityGlobalItem.cs | 2 +- Projectiles/Ranged/PristineFire.cs | 13 +++++++------ Projectiles/Ranged/PristineSecondary.cs | 2 +- Utilities/CalamityUtils.cs | 13 +++++++++++++ 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 81bd98aef1..571031fff8 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -895,7 +895,7 @@ namespace CalamityMod.Items if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(255, Main.DiscoG, 0); if (item.type == ModContent.ItemType()) - tt2.overrideColor = new Color(255, 255, Main.DiscoB); + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); break; } } diff --git a/Projectiles/Ranged/PristineFire.cs b/Projectiles/Ranged/PristineFire.cs index b4c6f15f6c..43fee8ce6b 100644 --- a/Projectiles/Ranged/PristineFire.cs +++ b/Projectiles/Ranged/PristineFire.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using Microsoft.Xna.Framework; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -57,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f; Main.dust[num448].velocity *= 0.2f; Main.dust[num448].noLight = true; - Main.dust[num448].color = new Color(255, 255, Main.DiscoB); + Main.dust[num448].color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); } projectile.ai[0] += 1f; if (projectile.ai[0] == 48f) @@ -84,7 +85,7 @@ namespace CalamityMod.Projectiles.Ranged Main.dust[num42].position = projectile.Center + value8; Main.dust[num42].velocity = projectile.velocity; Main.dust[num42].noLight = true; - Main.dust[num42].color = new Color(255, 255, Main.DiscoB); + Main.dust[num42].color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); } } } @@ -124,14 +125,14 @@ namespace CalamityMod.Projectiles.Ranged dust.noGravity = true; dust.velocity *= 3f; dust.velocity += value4 * Main.rand.NextFloat(); - dust.color = new Color(255, 255, Main.DiscoB); - num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, new Color(255, 255, Main.DiscoB), num51); + dust.color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); + num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, num51); dust.position = projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f; dust.velocity *= 2f; dust.noGravity = true; dust.fadeIn = 1f; dust.velocity += value4 * Main.rand.NextFloat(); - dust.color = new Color(255, 255, Main.DiscoB); + dust.color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); } for (int num55 = 0; num55 < 20; num55++) { @@ -141,7 +142,7 @@ namespace CalamityMod.Projectiles.Ranged dust.noGravity = true; dust.velocity *= 0.5f; dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat()); - dust.color = new Color(255, 255, Main.DiscoB); + dust.color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); } } } diff --git a/Projectiles/Ranged/PristineSecondary.cs b/Projectiles/Ranged/PristineSecondary.cs index 71ce99a83b..6c00a74439 100644 --- a/Projectiles/Ranged/PristineSecondary.cs +++ b/Projectiles/Ranged/PristineSecondary.cs @@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Ranged dust.velocity.Y *= 1.2f; dust.scale *= num296; dust.noLight = true; - dust.color = new Color(255, 255, Main.DiscoB); + dust.color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); } } } diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index 6138b314d9..2038fb18e8 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -2311,6 +2311,19 @@ namespace CalamityMod sb.Append("[c/").Append(color.Hex3()).Append(':').Append(msg).Append(']'); return sb.ToString(); } + + /// + /// Returns a color lerp that allows for smooth transitioning between two given colors + /// + /// The first color you want it to switch between + /// The second color you want it to switch between + /// How long you want it to take to swap between colors + public static Color ColorSwap(Color firstColor, Color secondColor, float seconds) + { + double timeMult = (double)(MathHelper.PiOver2 / seconds); + float colorMePurple = (float)((Math.Sin(timeMult * Main.GlobalTime) + 1) * 0.5f); + return Color.Lerp(firstColor, secondColor, colorMePurple); + } #endregion #region Miscellaneous Utilities From 4c7db0606ac60fce72ea4c11b8bb93d0fac68a60 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 6 Apr 2020 18:48:10 -0400 Subject: [PATCH 08/12] utility error fix --- Utilities/CalamityUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index 2038fb18e8..8987da7f46 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -2320,7 +2320,7 @@ namespace CalamityMod /// How long you want it to take to swap between colors public static Color ColorSwap(Color firstColor, Color secondColor, float seconds) { - double timeMult = (double)(MathHelper.PiOver2 / seconds); + double timeMult = (double)(MathHelper.TwoPi / seconds); float colorMePurple = (float)((Math.Sin(timeMult * Main.GlobalTime) + 1) * 0.5f); return Color.Lerp(firstColor, secondColor, colorMePurple); } From 5d818946e015b4d11acfaa731f4d50552bd18adf Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 6 Apr 2020 19:05:34 -0400 Subject: [PATCH 09/12] custom rarities for six dev weapons --- Items/CalamityGlobalItem.cs | 13 +++++++++++++ Items/Tools/CrystylCrusher.cs | 2 +- Items/Weapons/Melee/DraconicDestruction.cs | 2 +- Items/Weapons/Melee/GaelsGreatsword.cs | 2 +- Items/Weapons/Rogue/ScarletDevil.cs | 2 +- Items/Weapons/Summon/BensUmbrella.cs | 2 +- Items/Weapons/Summon/Endogenesis.cs | 2 +- 7 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 571031fff8..61573a4baf 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -6,6 +6,7 @@ using CalamityMod.Items.DifficultyItems; using CalamityMod.Items.Materials; using CalamityMod.Items.PermanentBoosters; using CalamityMod.Items.Potions; +using CalamityMod.Items.Tools; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; @@ -876,6 +877,18 @@ namespace CalamityMod.Items tt2.overrideColor = new Color(0.34f, 0.34f + 0.66f * Main.DiscoG / 255f, 0.34f + 0.5f * Main.DiscoG / 255f); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(255 - Main.DiscoG < 80 ? 80 : Main.DiscoG < 50 ? 255 : 255 - Main.DiscoG, Main.DiscoG < 126 ? 126 : Main.DiscoG, 0); //alternates between emerald green and amber (BanditHueh) + if (item.type == ModContent.ItemType()) + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(210, 0, 255), new Color(255, 248, 24), 2f); + if (item.type == ModContent.ItemType()) + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(131, 239, 255), new Color(36, 55, 230), 2f); + if (item.type == ModContent.ItemType()) + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 69, 0), new Color(139, 0, 0), 2f); + if (item.type == ModContent.ItemType()) + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(191, 45, 71), new Color(185, 187, 253), 2f); + if (item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(146, 0, 0); + if (item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(129, 29, 149); // Uniquely colored legendary weapons and Yharim's Crystal if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) diff --git a/Items/Tools/CrystylCrusher.cs b/Items/Tools/CrystylCrusher.cs index 3834460bfc..061966f0cd 100644 --- a/Items/Tools/CrystylCrusher.cs +++ b/Items/Tools/CrystylCrusher.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Tools item.rare = 10; item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/CrystylCharge"); item.shoot = ModContent.ProjectileType(); - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override Vector2? HoldoutOrigin() diff --git a/Items/Weapons/Melee/DraconicDestruction.cs b/Items/Weapons/Melee/DraconicDestruction.cs index 2fd2356777..1bb40c681d 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().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 2934847dd8..5d3964a5e3 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().customRarity = CalamityRarity.Violet; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; item.useStyle = ItemUseStyleID.SwingThrow; } public override void HoldItem(Player player) diff --git a/Items/Weapons/Rogue/ScarletDevil.cs b/Items/Weapons/Rogue/ScarletDevil.cs index 03e4534a45..5f760e2c66 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().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override void AddRecipes() diff --git a/Items/Weapons/Summon/BensUmbrella.cs b/Items/Weapons/Summon/BensUmbrella.cs index f83c0ec086..d448b643a0 100644 --- a/Items/Weapons/Summon/BensUmbrella.cs +++ b/Items/Weapons/Summon/BensUmbrella.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Summon item.noMelee = true; item.knockBack = 1f; item.value = Item.buyPrice(5, 0, 0, 0); - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; item.rare = 10; item.UseSound = SoundID.Item68; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/Endogenesis.cs b/Items/Weapons/Summon/Endogenesis.cs index b08bd918ae..10abe1e3a1 100644 --- a/Items/Weapons/Summon/Endogenesis.cs +++ b/Items/Weapons/Summon/Endogenesis.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Summon item.shootSpeed = 10f; item.value = Item.buyPrice(5, 0, 0, 0); - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override bool CanUseItem(Player player) From 487b984c8e79b024d84663bd49c5422e47f96737 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Tue, 7 Apr 2020 01:36:45 +0100 Subject: [PATCH 10/12] Changed sulph set tooltip --- Items/Armor/SulfurHelmet.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Items/Armor/SulfurHelmet.cs b/Items/Armor/SulfurHelmet.cs index dedc824eeb..7a46af18f9 100644 --- a/Items/Armor/SulfurHelmet.cs +++ b/Items/Armor/SulfurHelmet.cs @@ -36,7 +36,8 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "Attacking and being attacked by enemies inflicts poison\n" + - "Grants a sulphurous bubble jump that applies venom on hit\n" + + "Grants an additional jump\n" + + "Jumping off the ground leaves behind a sulphurous bubble that applies venom on hit\n" + "Slightly reduces breath loss in the abyss\n" + "Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + From 7f729d82d7a83ede48a9519f21634fd9dd53d9ba Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Mon, 6 Apr 2020 20:49:57 -0400 Subject: [PATCH 11/12] code improvements to various weapons increased randomness of the velocity of sylvan slashes and phantasmal lost souls --- Projectiles/Rogue/LuminousStrikerProj.cs | 10 ++---- Projectiles/Rogue/NightsGazeProjectile.cs | 22 ++++--------- Projectiles/Rogue/PhantasmalRuinProj.cs | 14 ++++---- Projectiles/Rogue/ScarletDevilProjectile.cs | 7 ++-- Projectiles/Rogue/SpearofPaleolithProj.cs | 8 ++--- Projectiles/Rogue/SupernovaBomb.cs | 6 +--- Projectiles/Rogue/SylvanSlashAttack.cs | 21 +++++------- Projectiles/Rogue/TotalityFlask.cs | 36 +++++++++------------ 8 files changed, 45 insertions(+), 79 deletions(-) diff --git a/Projectiles/Rogue/LuminousStrikerProj.cs b/Projectiles/Rogue/LuminousStrikerProj.cs index 6f53f0d3f1..e7d5691396 100644 --- a/Projectiles/Rogue/LuminousStrikerProj.cs +++ b/Projectiles/Rogue/LuminousStrikerProj.cs @@ -11,9 +11,6 @@ namespace CalamityMod.Projectiles.Rogue { public class LuminousStrikerProj : ModProjectile { - public int shardRainTimer = 3; - bool stealthStrike = false; - public override void SetStaticDefaults() { DisplayName.SetDefault("Luminous Striker"); @@ -37,29 +34,26 @@ namespace CalamityMod.Projectiles.Rogue if (projectile.ai[0] == 0f && modPlayer.StealthStrikeAvailable()) { projectile.Calamity().stealthStrike = true; - stealthStrike = true; projectile.timeLeft = 600; projectile.ai[0] = 1f; } - shardRainTimer--; if (Main.rand.NextBool(4)) Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 176, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f; - if (shardRainTimer == 0) + if (projectile.timeLeft % 4 == 0) { if (projectile.owner == Main.myPlayer) { - if (stealthStrike) + if (projectile.Calamity().stealthStrike) { Projectile.NewProjectile(projectile.Center.X + Main.rand.NextFloat(-15f, 15f), projectile.Center.Y + Main.rand.NextFloat(-15f, 15f), projectile.velocity.X, projectile.velocity.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.25), projectile.knockBack * 0.25f, projectile.owner, 0f, 0f); } else Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, -2f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.25), projectile.knockBack * 0.25f, projectile.owner, 0f, 0f); } - shardRainTimer = 4; } } diff --git a/Projectiles/Rogue/NightsGazeProjectile.cs b/Projectiles/Rogue/NightsGazeProjectile.cs index 59b92265e6..fcc2008c1a 100644 --- a/Projectiles/Rogue/NightsGazeProjectile.cs +++ b/Projectiles/Rogue/NightsGazeProjectile.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Rogue if (projectile.Calamity().stealthStrike) { - if (Main.rand.Next(8) == 0) + if (Main.rand.NextBool(8)) { int projectileDamage = (int)(projectile.damage * 0.75f); int projectileType = ModContent.ProjectileType(); @@ -127,20 +127,12 @@ namespace CalamityMod.Projectiles.Rogue { for (int i = 0; i < 5; i++) { - int dustToUse = Main.rand.Next(0, 3); - int dustType = 0; - switch (dustToUse) - { - case 0: - dustType = 109; - break; - case 1: - dustType = 111; - break; - case 2: - dustType = 132; - break; - } + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + 109, + 111, + 132 + }); int dust = Dust.NewDust(projectile.Center, 1, 1, dustType, projectile.velocity.X / 3f, projectile.velocity.Y / 3f, 0, default, 1.5f); Main.dust[dust].noGravity = true; diff --git a/Projectiles/Rogue/PhantasmalRuinProj.cs b/Projectiles/Rogue/PhantasmalRuinProj.cs index 60e9ef165e..4c8e102722 100644 --- a/Projectiles/Rogue/PhantasmalRuinProj.cs +++ b/Projectiles/Rogue/PhantasmalRuinProj.cs @@ -10,8 +10,6 @@ namespace CalamityMod.Projectiles.Rogue { public class PhantasmalRuinProj : ModProjectile { - private int projCount = 18; - public override void SetStaticDefaults() { DisplayName.SetDefault("Phantasmal Ruin"); @@ -41,8 +39,7 @@ namespace CalamityMod.Projectiles.Rogue { projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f; Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 175, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 0, default(Color), 0.85f); - projCount--; - if (projCount <= 0) + if (projectile.timeLeft % 18 == 0) { if (projectile.owner == Main.myPlayer) { @@ -54,13 +51,12 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.NextBool(3)) { - int soul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, Main.rand.Next(-2,3), ProjectileID.LostSoulFriendly, (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); + int soul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, Main.rand.NextFloat(-2,2), ProjectileID.LostSoulFriendly, (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); Main.projectile[soul].Calamity().forceRogue = true; Main.projectile[soul].timeLeft = 180; } } } - projCount = 18; } } @@ -87,7 +83,7 @@ namespace CalamityMod.Projectiles.Rogue } else { - damage = (int)((double)damage * 0.9); + damage = (int)(damage * 0.9); } } } @@ -111,6 +107,10 @@ namespace CalamityMod.Projectiles.Rogue int num24 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f) + randomSpeed2, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.05), 0f, projectile.owner, 1f, ai1); } } + else + { + damage = (int)(damage * 0.9); + } } } } diff --git a/Projectiles/Rogue/ScarletDevilProjectile.cs b/Projectiles/Rogue/ScarletDevilProjectile.cs index de038da53d..104c5466d0 100644 --- a/Projectiles/Rogue/ScarletDevilProjectile.cs +++ b/Projectiles/Rogue/ScarletDevilProjectile.cs @@ -10,8 +10,6 @@ namespace CalamityMod.Projectiles.Rogue { public class ScarletDevilProjectile : ModProjectile { - bool lifesteal = false; - public override void SetStaticDefaults() { DisplayName.SetDefault("Spear the Gungnir"); @@ -41,7 +39,6 @@ namespace CalamityMod.Projectiles.Rogue if (projectile.ai[0] == 1f && modPlayer.StealthStrikeAvailable()) { projectile.Calamity().stealthStrike = true; - lifesteal = true; } if ((projectile.ai[0] %= 5f) == 0f) { @@ -79,7 +76,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.0075), 0f, projectile.owner, 0f, 0f); - if (target.type == NPCID.TargetDummy || !lifesteal) + if (target.type == NPCID.TargetDummy || !projectile.Calamity().stealthStrike) { return; } @@ -94,7 +91,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.0075), 0f, projectile.owner, 0f, 0f); - if (!lifesteal) + if (!projectile.Calamity().stealthStrike) { return; } diff --git a/Projectiles/Rogue/SpearofPaleolithProj.cs b/Projectiles/Rogue/SpearofPaleolithProj.cs index b1ce0e8d2c..346463ddb8 100644 --- a/Projectiles/Rogue/SpearofPaleolithProj.cs +++ b/Projectiles/Rogue/SpearofPaleolithProj.cs @@ -10,7 +10,6 @@ namespace CalamityMod.Projectiles.Rogue { public class SpearofPaleolithProj : ModProjectile { - private int shardRainTimer = 3; private bool stealthInit = false; public override void SetStaticDefaults() @@ -40,8 +39,6 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 1800; stealthInit = true; } - shardRainTimer--; - if (Main.rand.NextBool(4)) { @@ -52,13 +49,12 @@ namespace CalamityMod.Projectiles.Rogue { projectile.rotation -= 1.57f; } - if (shardRainTimer == 0) + if (projectile.timeLeft % 3 == 0) { if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); } - shardRainTimer = 3; } } diff --git a/Projectiles/Rogue/SupernovaBomb.cs b/Projectiles/Rogue/SupernovaBomb.cs index 27ecf14550..47aa2b6774 100644 --- a/Projectiles/Rogue/SupernovaBomb.cs +++ b/Projectiles/Rogue/SupernovaBomb.cs @@ -11,8 +11,6 @@ namespace CalamityMod.Projectiles.Rogue { public class SupernovaBomb : ModProjectile { - private int stealthTimer = 8; - public override void SetStaticDefaults() { DisplayName.SetDefault("Supernova Bomb"); @@ -68,14 +66,12 @@ namespace CalamityMod.Projectiles.Rogue //stealth strike if (projectile.Calamity().stealthStrike == true) { - stealthTimer--; - if (stealthTimer == 0) + if (projectile.timeLeft % 8 == 0) { if (projectile.owner == Main.myPlayer) { Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, 2f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.8), projectile.knockBack, projectile.owner, 0f, 0f); } - stealthTimer = 8; } } } diff --git a/Projectiles/Rogue/SylvanSlashAttack.cs b/Projectiles/Rogue/SylvanSlashAttack.cs index 6198ace61a..b37be1ec9d 100644 --- a/Projectiles/Rogue/SylvanSlashAttack.cs +++ b/Projectiles/Rogue/SylvanSlashAttack.cs @@ -9,8 +9,6 @@ namespace CalamityMod.Projectiles.Rogue { public class SylvanSlashAttack : ModProjectile { - public int cooldown = 6; - public override void SetStaticDefaults() { DisplayName.SetDefault("Sylvan Slash"); @@ -36,7 +34,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true); if (projectile.spriteDirection == -1) { - num = 3.14159274f; + num = MathHelper.Pi; } if (++projectile.frame >= Main.projFrames[projectile.type]) { @@ -93,8 +91,7 @@ namespace CalamityMod.Projectiles.Rogue player.itemAnimation = 2; player.itemRotation = (float)Math.Atan2((double)(projectile.velocity.Y * (float)projectile.direction), (double)(projectile.velocity.X * (float)projectile.direction)); - if (cooldown < 5) - cooldown++; + projectile.ai[0]++; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) @@ -103,7 +100,7 @@ namespace CalamityMod.Projectiles.Rogue CalamityPlayer modPlayer = player.Calamity(); if (projectile.owner == Main.myPlayer) { - if (cooldown == 5) + if (projectile.ai[0] % 5 == 0) { if ((target.damage > 5 || target.boss) && !target.SpawnedFromStatue) { @@ -111,16 +108,15 @@ namespace CalamityMod.Projectiles.Rogue { if (modPlayer.rogueStealth < modPlayer.rogueStealthMax) modPlayer.rogueStealth += 0.01f; - cooldown = 0; } } } if (Main.rand.NextBool(8)) { - float speedMult = Main.rand.Next(3,6); + float speedMult = Main.rand.NextFloat(3,6); Vector2 vector1 = new Vector2(projectile.Center.X - player.Center.X, projectile.Center.Y - player.Center.Y); vector1.Normalize(); - Projectile.NewProjectile(player.Center.X, player.Center.Y, -vector1.X * speedMult, -vector1.Y * speedMult, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(player.Center.X, player.Center.Y, -vector1.X * speedMult, -vector1.Y * speedMult, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); } } } @@ -131,21 +127,20 @@ namespace CalamityMod.Projectiles.Rogue CalamityPlayer modPlayer = player.Calamity(); if (projectile.owner == Main.myPlayer) { - if (cooldown == 5) + if (projectile.ai[0] >= 5) { if (modPlayer.wearingRogueArmor && modPlayer.rogueStealthMax != 0) { if (modPlayer.rogueStealth < modPlayer.rogueStealthMax) modPlayer.rogueStealth += 0.01f; - cooldown = 0; } } if (Main.rand.NextBool(8)) { - float speedMult = Main.rand.Next(3,6); + float speedMult = Main.rand.NextFloat(3,6); Vector2 vector1 = new Vector2(projectile.Center.X - player.Center.X, projectile.Center.Y - player.Center.Y); vector1.Normalize(); - Projectile.NewProjectile(player.Center.X, player.Center.Y, -vector1.X * speedMult, -vector1.Y * speedMult, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(player.Center.X, player.Center.Y, -vector1.X * speedMult, -vector1.Y * speedMult, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Rogue/TotalityFlask.cs b/Projectiles/Rogue/TotalityFlask.cs index 14530795c5..d3f1ce9e8e 100644 --- a/Projectiles/Rogue/TotalityFlask.cs +++ b/Projectiles/Rogue/TotalityFlask.cs @@ -8,8 +8,6 @@ namespace CalamityMod.Projectiles.Rogue { public class TotalityFlask : ModProjectile { - private int tarTimer = 10; - public override void SetStaticDefaults() { DisplayName.SetDefault("Totality Flask"); @@ -30,36 +28,34 @@ namespace CalamityMod.Projectiles.Rogue { if (projectile.Calamity().stealthStrike == true) { - tarTimer--; - if (tarTimer == 0) + if (projectile.timeLeft % 10 == 0) { if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.6), projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType(), (int)(projectile.damage * 0.6), projectile.knockBack, projectile.owner, 0f, 0f); } - tarTimer = 10; } } Vector2 spinningpoint = new Vector2(4f, -8f); float rotation = projectile.rotation; if (projectile.direction == -1) - spinningpoint.X = -4f; - Vector2 vector2 = spinningpoint.RotatedBy((double) rotation, new Vector2()); + spinningpoint.X = -4f; + Vector2 vector2 = spinningpoint.RotatedBy((double)rotation, new Vector2()); for (int index1 = 0; index1 < 1; ++index1) { - int index2 = Dust.NewDust(projectile.Center + vector2 - Vector2.One * 5f, 4, 4, 6, 0.0f, 0.0f, 0, new Color(), 1f); - Main.dust[index2].scale = 1.5f; - Main.dust[index2].noGravity = true; - Main.dust[index2].velocity = Main.dust[index2].velocity * 0.25f + Vector2.Normalize(vector2) * 1f; - Main.dust[index2].velocity = Main.dust[index2].velocity.RotatedBy(-1.57079637050629 * (double) projectile.direction, new Vector2()); + int index2 = Dust.NewDust(projectile.Center + vector2 - Vector2.One * 5f, 4, 4, 6, 0.0f, 0.0f, 0, new Color(), 1f); + Main.dust[index2].scale = 1.5f; + Main.dust[index2].noGravity = true; + Main.dust[index2].velocity = Main.dust[index2].velocity * 0.25f + Vector2.Normalize(vector2) * 1f; + Main.dust[index2].velocity = Main.dust[index2].velocity.RotatedBy(-MathHelper.PiOver2 * (double)projectile.direction, new Vector2()); } } public override void Kill(int timeLeft) { Main.PlaySound(13, (int) projectile.position.X, (int) projectile.position.Y, 1, 1f, 0.0f); - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 10; + //projectile.usesLocalNPCImmunity = true; + //projectile.localNPCHitCooldown = 10; Vector2 vector2 = new Vector2(20f, 20f); for (int index = 0; index < 5; ++index) Dust.NewDust(projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 191, 0.0f, 0.0f, 0, Color.Red, 1f); @@ -67,17 +63,17 @@ namespace CalamityMod.Projectiles.Rogue { int index2 = Dust.NewDust(projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 31, 0.0f, 0.0f, 100, new Color(), 1.5f); Dust dust = Main.dust[index2]; - dust.velocity = dust.velocity * 1.4f; + dust.velocity *= 1.4f; } for (int index1 = 0; index1 < 20; ++index1) { int index2 = Dust.NewDust(projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 6, 0.0f, 0.0f, 100, new Color(), 2.5f); - Main.dust[index2].noGravity = true; Dust dust1 = Main.dust[index2]; - dust1.velocity = dust1.velocity * 5f; + dust1.noGravity = true; + dust1.velocity *= 5f; int index3 = Dust.NewDust(projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 6, 0.0f, 0.0f, 100, new Color(), 1.5f); Dust dust2 = Main.dust[index3]; - dust2.velocity = dust2.velocity * 3f; + dust2.velocity *= 3f; } int num251 = Main.rand.Next(2, 4); if (projectile.owner == Main.myPlayer) @@ -91,7 +87,7 @@ namespace CalamityMod.Projectiles.Rogue } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 0.6), 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType(), (int)(projectile.damage * 0.6), 0f, Main.myPlayer, 0f, 0f); } } } From 650e46bc10f52227999eec4e3eb19a9e12a00601 Mon Sep 17 00:00:00 2001 From: Amber Sienna Date: Tue, 7 Apr 2020 02:35:38 +0100 Subject: [PATCH 12/12] ooo pretty colours that are actually readable now --- Items/CalamityGlobalItem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 61573a4baf..538234fbe8 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -876,7 +876,7 @@ namespace CalamityMod.Items 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); if (item.type == ModContent.ItemType()) - tt2.overrideColor = new Color(255 - Main.DiscoG < 80 ? 80 : Main.DiscoG < 50 ? 255 : 255 - Main.DiscoG, Main.DiscoG < 126 ? 126 : Main.DiscoG, 0); //alternates between emerald green and amber (BanditHueh) + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 166, 0), new Color(25, 250, 25), 4f); //alternates between emerald green and amber (BanditHueh) if (item.type == ModContent.ItemType()) tt2.overrideColor = CalamityUtils.ColorSwap(new Color(210, 0, 255), new Color(255, 248, 24), 2f); if (item.type == ModContent.ItemType())