diff --git a/Events/AcidRainEvent.cs b/Events/AcidRainEvent.cs index 3bc02c7436..5e73a3b8d1 100644 --- a/Events/AcidRainEvent.cs +++ b/Events/AcidRainEvent.cs @@ -63,18 +63,18 @@ namespace CalamityMod.Events ( ModContent.NPCType(), 1, false ) }; - public static List PossibleMinibossesAS = new List() + public static List<(int, bool)> PossibleMinibossesAS = new List<(int, bool)>() { - ModContent.NPCType() + (ModContent.NPCType(), true) }; - public static List PossibleMinibossesPolter = new List() + public static List<(int, bool)> PossibleMinibossesPolter = new List<(int, bool)>() { - ModContent.NPCType(), - ModContent.NPCType() + (ModContent.NPCType(), true), + (ModContent.NPCType(), false) }; - public static readonly List AllMinibosses = PossibleMinibossesAS.Concat(PossibleMinibossesPolter).Distinct().ToList(); + public static readonly List AllMinibosses = PossibleMinibossesAS.Select(miniboss => miniboss.Item1).ToList().Concat(PossibleMinibossesPolter.Select(miniboss => miniboss.Item1)).Distinct().ToList(); public static bool AnyRainMinibosses { @@ -82,7 +82,8 @@ namespace CalamityMod.Events { for (int i = 0; i < Main.npc.Length; i++) { - if (Main.npc[i].active && (PossibleMinibossesAS.Contains(Main.npc[i].type)) || PossibleMinibossesPolter.Contains(Main.npc[i].type)) + if (Main.npc[i].active && (PossibleMinibossesAS.Select(miniboss => miniboss.Item1).Contains(Main.npc[i].type) || + PossibleMinibossesPolter.Select(miniboss => miniboss.Item1).Contains(Main.npc[i].type))) { return true; } diff --git a/Events/AcidRainT2_BossChecklist.png b/Events/AcidRainT2_BossChecklist.png index 75fa9ae23d..22dbb5cc20 100644 Binary files a/Events/AcidRainT2_BossChecklist.png and b/Events/AcidRainT2_BossChecklist.png differ diff --git a/Events/AcidRainT3_BossChecklist.png b/Events/AcidRainT3_BossChecklist.png new file mode 100644 index 0000000000..cff4064a5a Binary files /dev/null and b/Events/AcidRainT3_BossChecklist.png differ diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 56222ab4f1..8676aee509 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -560,7 +560,7 @@ namespace CalamityMod { InvasionDifficulty.TryGetValue("Acid Rain Aquatic Scourge", out float order); List enemies = AcidRainEvent.PossibleEnemiesAS.Select(enemy => enemy.Item1).ToList(); - enemies.Add(ModContent.NPCType()); + enemies.AddRange(AcidRainEvent.PossibleMinibossesAS.Select(miniboss => miniboss.Item1)); int summon = ItemType(); List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; List collection = new List() { ItemType() }; @@ -574,13 +574,13 @@ namespace CalamityMod { InvasionDifficulty.TryGetValue("Acid Rain Polterghast", out float order); List enemies = AcidRainEvent.PossibleEnemiesPolter.Select(enemy => enemy.Item1).ToList(); - enemies.Add(ModContent.NPCType()); + enemies.AddRange(AcidRainEvent.PossibleMinibossesPolter.Select(miniboss => miniboss.Item1)); int summon = ItemType(); List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; List collection = new List() { ItemType() }; string instructions = $"Use a [i:{summon}] or wait for the invasion to occur naturally after the Polterghast is defeated"; string despawn = CalamityUtils.ColorMessage("The mysterious creatures of the sulphuric sea descended back into the deep ocean.", new Color(146, 183, 116)); - string bossLogTex = "CalamityMod/Events/AcidRainT2_BossChecklist"; + string bossLogTex = "CalamityMod/Events/AcidRainT3_BossChecklist"; string iconTexture = "CalamityMod/ExtraTextures/UI/AcidRainIcon"; AddInvasion(bossChecklist, calamity, "Acid Rain (Post-Polter)", order, enemies, DownedBoomerDuke, summon, loot, collection, instructions, despawn, bossLogTex, iconTexture); } diff --git a/NPCs/AcidRain/AcidEel.cs b/NPCs/AcidRain/AcidEel.cs index 77f3d4c6dd..d1784cbf3b 100644 --- a/NPCs/AcidRain/AcidEel.cs +++ b/NPCs/AcidRain/AcidEel.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Weapons.Magic; using CalamityMod.World; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -29,12 +30,14 @@ namespace CalamityMod.NPCs.AcidRain if (CalamityWorld.downedPolterghast) { + npc.Calamity().DR = 0.3f; npc.damage = 160; npc.lifeMax = 6650; npc.defense = 45; } else if (CalamityWorld.downedAquaticScourge) { + npc.Calamity().DR = 0.1f; npc.damage = 80; npc.lifeMax = 705; } @@ -149,6 +152,10 @@ namespace CalamityMod.NPCs.AcidRain } } } + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + CalamityGlobalNPC.DrawGlowmask(spriteBatch, ModContent.GetTexture(Texture + "Glow"), npc); + } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) { npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale); diff --git a/NPCs/AcidRain/AcidEelGlow.png b/NPCs/AcidRain/AcidEelGlow.png new file mode 100644 index 0000000000..14e5183f3a Binary files /dev/null and b/NPCs/AcidRain/AcidEelGlow.png differ diff --git a/NPCs/AcidRain/CragmawMire.cs b/NPCs/AcidRain/CragmawMire.cs index 25fc4f3028..6628ac50fb 100644 --- a/NPCs/AcidRain/CragmawMire.cs +++ b/NPCs/AcidRain/CragmawMire.cs @@ -140,9 +140,9 @@ namespace CalamityMod.NPCs.AcidRain if (!Phase2) { - npc.Calamity().DR = 0.5f; + npc.Calamity().DR = 0.4f; if (!player.wet) - npc.Calamity().DR = 0.8f; + npc.Calamity().DR = 0.6f; npc.HitSound = SoundID.NPCHit42; if (npc.ai[0] % 420f < 240f) { diff --git a/NPCs/AcidRain/FlakCrab.cs b/NPCs/AcidRain/FlakCrab.cs index 3a2ba3f567..9ffc0ecd5c 100644 --- a/NPCs/AcidRain/FlakCrab.cs +++ b/NPCs/AcidRain/FlakCrab.cs @@ -29,10 +29,12 @@ namespace CalamityMod.NPCs.AcidRain npc.lifeMax = 700; npc.aiStyle = aiType = -1; + npc.Calamity().DR = 0.15f; if (CalamityWorld.downedPolterghast) { npc.lifeMax = 7500; + npc.Calamity().DR = 0.4f; } npc.knockBackResist = 0f; diff --git a/NPCs/AcidRain/GammaSlime.cs b/NPCs/AcidRain/GammaSlime.cs index 5c0bbcbd76..a3d47365f0 100644 --- a/NPCs/AcidRain/GammaSlime.cs +++ b/NPCs/AcidRain/GammaSlime.cs @@ -26,10 +26,11 @@ namespace CalamityMod.NPCs.AcidRain public override void SetDefaults() { npc.width = 40; - npc.height = 30; + npc.height = 44; npc.damage = 145; npc.lifeMax = 6410; + npc.Calamity().DR = 0.25f; npc.defense = 50; npc.aiStyle = aiType = -1; @@ -190,6 +191,7 @@ namespace CalamityMod.NPCs.AcidRain float opacity = MathHelper.Lerp(0.3f, 0.9f, (npc.ai[3] - 480f) / 60f); Utils.DrawLine(spriteBatch, npc.Top + new Vector2(0f, 4f), npc.Top + new Vector2(0f, 4f) - Vector2.UnitY * length, Color.Lerp(Color.Lime, Color.Transparent, opacity)); } + CalamityGlobalNPC.DrawGlowmask(spriteBatch, ModContent.GetTexture(Texture + "Glow"), npc); } public override void NPCLoot() diff --git a/NPCs/AcidRain/GammaSlimeGlow.png b/NPCs/AcidRain/GammaSlimeGlow.png new file mode 100644 index 0000000000..8c5ee1e1f7 Binary files /dev/null and b/NPCs/AcidRain/GammaSlimeGlow.png differ diff --git a/NPCs/AcidRain/IrradiatedSlime.cs b/NPCs/AcidRain/IrradiatedSlime.cs index 3866837a48..8863f8bb6c 100644 --- a/NPCs/AcidRain/IrradiatedSlime.cs +++ b/NPCs/AcidRain/IrradiatedSlime.cs @@ -5,6 +5,7 @@ using CalamityMod.Items.Placeables.Banners; using CalamityMod.Projectiles.Enemy; using CalamityMod.World; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -24,17 +25,11 @@ namespace CalamityMod.NPCs.AcidRain npc.width = 40; npc.height = 30; + npc.Calamity().DR = 0.15f; npc.damage = 75; npc.lifeMax = 640; npc.defense = 5; - if (CalamityWorld.downedPolterghast) - { - npc.damage = 245; - npc.lifeMax = 5995; - npc.defense = 60; - } - npc.knockBackResist = 0f; animationType = 81; for (int k = 0; k < npc.buffImmune.Length; k++) @@ -329,8 +324,11 @@ namespace CalamityMod.NPCs.AcidRain Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/IrradiatedSlime2"), 1f); } } - - public override void NPCLoot() + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + CalamityGlobalNPC.DrawGlowmask(spriteBatch, ModContent.GetTexture(Texture + "Glow"), npc); + } + public override void NPCLoot() { DropHelper.DropItemChance(npc, ModContent.ItemType(), 100); } diff --git a/NPCs/AcidRain/IrradiatedSlimeGlow.png b/NPCs/AcidRain/IrradiatedSlimeGlow.png new file mode 100644 index 0000000000..91bb11a744 Binary files /dev/null and b/NPCs/AcidRain/IrradiatedSlimeGlow.png differ diff --git a/NPCs/AcidRain/NuclearTerror.cs b/NPCs/AcidRain/NuclearTerror.cs index e74be6b84f..cc055dc5bf 100644 --- a/NPCs/AcidRain/NuclearTerror.cs +++ b/NPCs/AcidRain/NuclearTerror.cs @@ -1,8 +1,5 @@ using CalamityMod.Dusts; -using CalamityMod.Items.Accessories; -using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Enemy; -using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -11,7 +8,6 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.Items.Weapons.Rogue; namespace CalamityMod.NPCs.AcidRain { @@ -157,7 +153,7 @@ namespace CalamityMod.NPCs.AcidRain } } } - npc.spriteDirection = (npc.velocity.X > 0).ToDirectionInt(); + npc.spriteDirection = (npc.velocity.X < 0).ToDirectionInt(); } else { @@ -165,7 +161,7 @@ namespace CalamityMod.NPCs.AcidRain { ShootPosition = player.Center; npc.netUpdate = true; - npc.spriteDirection = (ShootPosition.X - npc.Center.X > 0).ToDirectionInt(); + npc.spriteDirection = (ShootPosition.X - npc.Center.X < 0).ToDirectionInt(); } switch (PhaseArray[AttackIndex]) { @@ -390,6 +386,11 @@ namespace CalamityMod.NPCs.AcidRain npc.frame.Y = Walking ? 4 * frameHeight : 0; } } + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) + { + CalamityGlobalNPC.DrawGlowmask(spriteBatch, ModContent.GetTexture(Texture), npc, true); + return false; + } public override bool CheckDead() { if (!npc.dontTakeDamage) diff --git a/NPCs/AcidRain/NuclearTerror.png b/NPCs/AcidRain/NuclearTerror.png index 1e815f2429..0b1c23b0b9 100644 Binary files a/NPCs/AcidRain/NuclearTerror.png and b/NPCs/AcidRain/NuclearTerror.png differ diff --git a/NPCs/AcidRain/NuclearToad.cs b/NPCs/AcidRain/NuclearToad.cs index 42b465bfa4..32583795a7 100644 --- a/NPCs/AcidRain/NuclearToad.cs +++ b/NPCs/AcidRain/NuclearToad.cs @@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Enemy; 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; @@ -156,5 +157,9 @@ namespace CalamityMod.NPCs.AcidRain { target.AddBuff(ModContent.BuffType(), 300); } + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + CalamityGlobalNPC.DrawGlowmask(spriteBatch, ModContent.GetTexture(Texture + "Glow"), npc, true); + } } } diff --git a/NPCs/AcidRain/NuclearToadGlow.png b/NPCs/AcidRain/NuclearToadGlow.png new file mode 100644 index 0000000000..d51d2291f3 Binary files /dev/null and b/NPCs/AcidRain/NuclearToadGlow.png differ diff --git a/NPCs/AcidRain/Orthocera.cs b/NPCs/AcidRain/Orthocera.cs index 9fda3479c6..6dfe9404bc 100644 --- a/NPCs/AcidRain/Orthocera.cs +++ b/NPCs/AcidRain/Orthocera.cs @@ -26,20 +26,17 @@ namespace CalamityMod.NPCs.AcidRain npc.height = 34; npc.aiStyle = aiType = -1; - npc.damage = 40; - npc.lifeMax = 360; - npc.defense = 8; + npc.damage = 75; + npc.lifeMax = 605; + npc.defense = 15; + npc.Calamity().DR = 0.2f; if (CalamityWorld.downedPolterghast) { npc.damage = 180; npc.lifeMax = 5700; npc.defense = 65; - } - else if (CalamityWorld.downedAquaticScourge) - { - npc.damage = 75; - npc.lifeMax = 605; + npc.Calamity().DR = 0.35f; } npc.knockBackResist = 0f; diff --git a/NPCs/AcidRain/Skyfin.cs b/NPCs/AcidRain/Skyfin.cs index 2254ac9d80..793d6a2ed9 100644 --- a/NPCs/AcidRain/Skyfin.cs +++ b/NPCs/AcidRain/Skyfin.cs @@ -39,11 +39,13 @@ namespace CalamityMod.NPCs.AcidRain npc.damage = 175; npc.lifeMax = 6300; npc.defense = 58; + npc.Calamity().DR = 0.2f; } else if (CalamityWorld.downedAquaticScourge) { npc.damage = 85; npc.lifeMax = 700; + npc.Calamity().DR = 0.1f; } npc.knockBackResist = 0f; diff --git a/NPCs/AcidRain/SulfurousSkater.cs b/NPCs/AcidRain/SulfurousSkater.cs index e6a4f5000a..4ecd62c3a0 100644 --- a/NPCs/AcidRain/SulfurousSkater.cs +++ b/NPCs/AcidRain/SulfurousSkater.cs @@ -5,6 +5,7 @@ using CalamityMod.Items.Weapons.Melee; using CalamityMod.Projectiles.Enemy; using CalamityMod.World; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using System.IO; using Terraria; @@ -43,6 +44,7 @@ namespace CalamityMod.NPCs.AcidRain npc.damage = 140; npc.lifeMax = 6600; npc.defense = 33; + npc.Calamity().DR = 0.15f; } npc.knockBackResist = 0f; @@ -132,7 +134,7 @@ namespace CalamityMod.NPCs.AcidRain npc.ai[1] = 0f; npc.velocity.Y -= jumpSpeed; npc.velocity.X = lungeForwardSpeed * (npc.Center.X - destination.X < 0).ToDirectionInt(); - npc.spriteDirection = (npc.Center.X - destination.X < 0).ToDirectionInt(); + npc.spriteDirection = (npc.Center.X - destination.X > 0).ToDirectionInt(); npc.netSpam = 0; npc.netUpdate = true; } @@ -150,7 +152,7 @@ namespace CalamityMod.NPCs.AcidRain if (npc.Distance(player.Center) < 200f) inertia *= 0.667f; npc.velocity = (npc.velocity * inertia + npc.DirectionTo(player.Center) * speed) / (inertia + 1f); - npc.spriteDirection = (npc.velocity.X > 0).ToDirectionInt(); + npc.spriteDirection = (npc.velocity.X < 0).ToDirectionInt(); if (npc.Distance(player.Center) < 20f) { Flying = false; @@ -177,6 +179,10 @@ namespace CalamityMod.NPCs.AcidRain } } } + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + CalamityGlobalNPC.DrawGlowmask(spriteBatch, ModContent.GetTexture(Texture + "Glow"), npc, true, Vector2.UnitY * 4f); + } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) { npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale); diff --git a/NPCs/AcidRain/SulfurousSkater.png b/NPCs/AcidRain/SulfurousSkater.png index 6a49d2534a..55b5932047 100644 Binary files a/NPCs/AcidRain/SulfurousSkater.png and b/NPCs/AcidRain/SulfurousSkater.png differ diff --git a/NPCs/AcidRain/SulfurousSkaterGlow.png b/NPCs/AcidRain/SulfurousSkaterGlow.png new file mode 100644 index 0000000000..8bfef7e576 Binary files /dev/null and b/NPCs/AcidRain/SulfurousSkaterGlow.png differ diff --git a/NPCs/AcidRain/Trilobite.cs b/NPCs/AcidRain/Trilobite.cs index be3833c619..9e0c6c1c0d 100644 --- a/NPCs/AcidRain/Trilobite.cs +++ b/NPCs/AcidRain/Trilobite.cs @@ -37,11 +37,13 @@ namespace CalamityMod.NPCs.AcidRain npc.damage = 160; npc.lifeMax = 7200; npc.defense = 78; + npc.Calamity().DR = 0.4f; } else if (CalamityWorld.downedAquaticScourge) { npc.damage = 66; npc.lifeMax = 850; + npc.Calamity().DR = 0.25f; } npc.knockBackResist = 0f; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 83a5a5300d..f5d61c6009 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1108,6 +1108,24 @@ namespace CalamityMod.NPCs } #endregion + #region Glowmask Drawing + public static void DrawGlowmask(SpriteBatch spriteBatch, Texture2D texture, NPC npc, bool invertedDirection = false, Vector2 offset = default) + { + SpriteEffects effects = npc.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + if (invertedDirection) + effects = npc.spriteDirection == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + spriteBatch.Draw(texture, + npc.Center - Main.screenPosition + offset, + npc.frame, + Color.White, + npc.rotation, + npc.Size / 2f, + npc.scale, + effects, + 0f); + } + #endregion + // TODO -- Change Iron Heart damage in here for Iron Heart mode #region Iron Heart Changes private void IronHeartChanges(NPC npc) @@ -3424,7 +3442,7 @@ namespace CalamityMod.NPCs { if (projectile.melee && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) { - if (!CalamityPlayer.areThereAnyDamnBosses) + if (!CalamityPlayer.areThereAnyDamnBosses && !AcidRainEvent.AllMinibosses.Contains(npc.type)) { damage = npc.lifeMax * 3; } @@ -3435,7 +3453,7 @@ namespace CalamityMod.NPCs { if (projectile.magic && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) { - if (!CalamityPlayer.areThereAnyDamnBosses) + if (!CalamityPlayer.areThereAnyDamnBosses && !AcidRainEvent.AllMinibosses.Contains(npc.type)) { damage = npc.lifeMax * 3; } @@ -3446,7 +3464,7 @@ namespace CalamityMod.NPCs { if (projectile.Calamity().rogue && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) { - if (!CalamityPlayer.areThereAnyDamnBosses) + if (!CalamityPlayer.areThereAnyDamnBosses && !AcidRainEvent.AllMinibosses.Contains(npc.type)) { damage = npc.lifeMax * 3; } @@ -3457,7 +3475,7 @@ namespace CalamityMod.NPCs { if (projectile.ranged && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) { - if (!CalamityPlayer.areThereAnyDamnBosses) + if (!CalamityPlayer.areThereAnyDamnBosses && !AcidRainEvent.AllMinibosses.Contains(npc.type)) { damage = npc.lifeMax * 3; } @@ -3468,7 +3486,7 @@ namespace CalamityMod.NPCs { if ((projectile.minion || projectile.sentry || ProjectileID.Sets.MinionShot[projectile.type] || ProjectileID.Sets.SentryShot[projectile.type] || CalamityMod.projectileMinionList.Contains(projectile.type)) && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) { - if (!CalamityPlayer.areThereAnyDamnBosses) + if (!CalamityPlayer.areThereAnyDamnBosses && !AcidRainEvent.AllMinibosses.Contains(npc.type)) { damage = npc.lifeMax * 3; } @@ -3774,13 +3792,16 @@ namespace CalamityMod.NPCs if (player.Calamity().ZoneSulphur && !player.Calamity().ZoneAbyss && CalamityWorld.rainingAcid) { - spawnRate = Main.hardMode ? 36 : 33; - maxSpawns = Main.hardMode ? 15 : 12; if (AcidRainEvent.AnyRainMinibosses) { maxSpawns = 5; spawnRate *= 2; } + else + { + spawnRate = Main.hardMode ? 36 : 33; + maxSpawns = Main.hardMode ? 15 : 12; + } } } } @@ -3917,7 +3938,7 @@ namespace CalamityMod.NPCs if (!(CalamityWorld.downedPolterghast && CalamityWorld.acidRainPoints == 2)) { List<(int, int, bool)> PossibleEnemies = AcidRainEvent.PossibleEnemiesPreHM; - List PossibleMinibosses = new List(); + List<(int, bool)> PossibleMinibosses = new List<(int, bool)>(); if (CalamityWorld.downedAquaticScourge) { PossibleEnemies = AcidRainEvent.PossibleEnemiesAS; @@ -3931,13 +3952,18 @@ namespace CalamityMod.NPCs foreach (int enemy in PossibleEnemies.Select(enemyType => enemyType.Item1)) { if (spawnInfo.water || !PossibleEnemies.First(potential => potential.Item1 == enemy).Item3) - pool.Add(enemy, 1f); + { + pool.Add(enemy, 1f); + } } if (PossibleMinibosses.Count > 0) { - foreach (int enemy in PossibleMinibosses) + foreach (int enemy in PossibleMinibosses.Select(miniboss => miniboss.Item1).ToList()) { - pool.Add(enemy, 0.05f); + if (spawnInfo.water || !PossibleMinibosses.First(potential => potential.Item1 == enemy).Item2) + { + pool.Add(enemy, 0.05f); + } } } pool.Add(ModContent.NPCType(), 0.08f); diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 4ff26b5c7b..702e888b47 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -1609,8 +1609,8 @@ namespace CalamityMod.NPCs CalamityWorld.acidRainPoints = (int)MathHelper.Max(2, CalamityWorld.acidRainPoints); // Cap at 2. The last points are for Old Duke. } } - if (AcidRainEvent.PossibleMinibossesAS.Contains(npc.type) || - AcidRainEvent.PossibleMinibossesPolter.Contains(npc.type)) + if (AcidRainEvent.PossibleMinibossesAS.Select(miniboss => miniboss.Item1).Contains(npc.type) || + AcidRainEvent.PossibleMinibossesPolter.Select(miniboss => miniboss.Item1).Contains(npc.type)) { CalamityWorld.acidRainPoints -= AcidRainEvent.MinibossDeathValue; if (CalamityWorld.downedPolterghast) diff --git a/UI/StealthStrikeUI.cs b/UI/StealthStrikeUI.cs index e95addbdb0..85fd00f89f 100644 --- a/UI/StealthStrikeUI.cs +++ b/UI/StealthStrikeUI.cs @@ -50,7 +50,7 @@ namespace CalamityMod.UI if (new Rectangle((int)(DrawPosition.X + Main.screenPosition.X - player.width / 2), (int)(DrawPosition.Y + Main.screenPosition.Y), barTexture.Width, barTexture.Height).Intersects( new Rectangle((int)Main.MouseWorld.X, (int)Main.MouseWorld.Y, 8, 8))) { - if (modPlayer.rogueStealthMax > 0f) + if (modPlayer.rogueStealthMax > 0f && modPlayer.stealthUIAlpha >= 0.5f) { Main.LocalPlayer.mouseInterface = true; Main.instance.MouseText("Stealth: " + (int)(modPlayer.rogueStealth * 100) + "/" + (int)(modPlayer.rogueStealthMax * 100) + "", 0, 0, -1, -1, -1, -1); //only way I got this to show up consistently, otherwise it fucked up and showed up anywhere onscreen lol.