From 65ca9c8b05638e1cd81d8b828c4e64947aae4e7a Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Wed, 10 Jun 2020 23:53:03 -0400 Subject: [PATCH] added a friendly bee list --- CalPlayer/CalamityPlayer.cs | 7 ++++--- CalamityMod.cs | 13 +++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 86f194fea7..9357ca85eb 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4484,7 +4484,7 @@ namespace CalamityMod.CalPlayer { CalamityUtils.Inflict246DebuffsNPC(target, ModContent.BuffType()); } - if ((plaguebringerCarapace || uberBees) && (proj.type == 566 || proj.type == 181 || proj.type == 189)) + if ((plaguebringerCarapace || uberBees) && CalamityMod.friendlyBeeList.Contains(proj.type)) { target.AddBuff(ModContent.BuffType(), 360); } @@ -4819,7 +4819,7 @@ namespace CalamityMod.CalPlayer { CalamityUtils.Inflict246DebuffsPvp(target, ModContent.BuffType()); } - if ((plaguebringerCarapace || uberBees) && (proj.type == 566 || proj.type == 181 || proj.type == 189)) + if ((plaguebringerCarapace || uberBees) && CalamityMod.friendlyBeeList.Contains(proj.type)) { target.AddBuff(ModContent.BuffType(), 360); } @@ -5374,7 +5374,7 @@ namespace CalamityMod.CalPlayer int defenseAdd = (int)(target.defense * 0.05 * (proj.damage / 50D) * acidRoundMultiplier); //100 defense * 0.05 = 5 damage += defenseAdd; } - if (uberBees && (proj.type == ProjectileID.GiantBee || proj.type == ProjectileID.Bee || proj.type == ProjectileID.Wasp || proj.type == ModContent.ProjectileType() || proj.type == ModContent.ProjectileType() || proj.type == ModContent.ProjectileType() || proj.type == ModContent.ProjectileType())) + if (uberBees && CalamityMod.friendlyBeeList.Contains(proj.type)) { damage += Main.rand.Next(20, 31); } @@ -5390,6 +5390,7 @@ namespace CalamityMod.CalPlayer if (miniPBG.type == ModContent.ProjectileType() && Vector2.Distance(proj.Center, miniPBG.Center) <= PlaguebringerSummon.auraRange && miniPBG.owner == proj.owner) { damage += Main.rand.Next(10, 21); + break; } } } diff --git a/CalamityMod.cs b/CalamityMod.cs index 70074240a0..a5bd7f5454 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -146,6 +146,7 @@ namespace CalamityMod public static List bossHPScaleList; public static List beeEnemyList; public static List beeProjectileList; + public static List friendlyBeeList; public static List hardModeNerfList; public static List debuffList; public static List fireWeaponList; @@ -370,6 +371,7 @@ namespace CalamityMod bossScaleList = null; bossHPScaleList = null; beeEnemyList = null; + friendlyBeeList = null; beeProjectileList = null; hardModeNerfList = null; debuffList = null; @@ -902,6 +904,17 @@ namespace CalamityMod ModContent.ProjectileType() }; + friendlyBeeList = new List() + { + ProjectileID.GiantBee, + ProjectileID.Bee, + ProjectileID.Wasp, + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() + }; + hardModeNerfList = new List() { ProjectileID.WebSpit,