From 2fa14f654af06339a0263126ec396b69145929d1 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 2 Nov 2019 14:48:22 -0400 Subject: [PATCH] changed astral fish code to be less math heavy. May rework again later --- CalPlayer/CalamityPlayer.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index b01dfaccf3..de360a2b82 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -7389,6 +7389,7 @@ namespace CalamityMod.CalPlayer { if (ZoneAstral) //Astral Infection, fishing in water { + int astralFish = Main.rand.Next(100); if (caughtType == ItemID.WoodenCrate) { caughtType = ItemID.WoodenCrate; @@ -7413,35 +7414,35 @@ namespace CalamityMod.CalPlayer { caughtType = ItemID.ZephyrFish; } - else if (Main.rand.NextBool(10)) + else if (astralFish >= 75) //25% { caughtType = ModContent.ItemType(); } - else if (Main.rand.NextBool(15)) + else if (astralFish <= 74 && astralFish >= 60) //15% { caughtType = ModContent.ItemType(); } - else if (player.cratePotion && Main.rand.NextBool(5)) + else if (player.cratePotion && astralFish <= 9 && astralFish >= 28) //20% { caughtType = ModContent.ItemType(); } - else if (!player.cratePotion && Main.rand.NextBool(10)) + else if (!player.cratePotion && astralFish <= 9 && astralFish >= 18) //10% { caughtType = ModContent.ItemType(); } - else if (Main.rand.NextBool(15)) + else if (astralFish <= 8 && astralFish >= 6) //3% { caughtType = ModContent.ItemType(); } - else if (Main.rand.NextBool(15)) + else if (astralFish <= 5 && astralFish >= 3) //3% { caughtType = ModContent.ItemType(); } - else if (Main.rand.NextBool(15)) + else if (astralFish <= 2 && astralFish >= 0) //3% { caughtType = ModContent.ItemType(); } - else + else //41% w/o crate pot, 31% w/ crate pot { caughtType = ModContent.ItemType(); }