diff --git a/Buffs/StatDebuffs/KamiDebuff.cs b/Buffs/StatDebuffs/KamiDebuff.cs index d554fa2441..2f5afc5ff8 100644 --- a/Buffs/StatDebuffs/KamiDebuff.cs +++ b/Buffs/StatDebuffs/KamiDebuff.cs @@ -6,7 +6,8 @@ namespace CalamityMod.Buffs.StatDebuffs public class KamiDebuff : ModBuff { public const float MultiplicativeDamageReduction = 0.8f; - public const float MaxNPCSpeed = 16f; // Hard-cap for npc speed when afflicted with this debuff. Does not affect certain NPCs and does not affect any bosses (Basically only works on boss minions). + // Hard-cap for npc speed when afflicted with this debuff. Does not affect certain NPCs and does not affect any bosses (Basically only works on boss minions). + public const float MaxNPCSpeed = 16f; public override void SetDefaults() { DisplayName.SetDefault("Kami Flu"); diff --git a/CalamityLists.cs b/CalamityLists.cs index 5bdee4af8a..4f5bbb2235 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -144,6 +144,8 @@ namespace CalamityMod public static List legOverrideList; + public static List kamiDebuffColorImmuneList; + public static void LoadLists() { donatorList = new List() @@ -278,8 +280,8 @@ namespace CalamityMod trueMeleeProjectileList = new List() { - // Vanilla shit - ProjectileID.Spear, + // Vanilla shit + ProjectileID.Spear, ProjectileID.Trident, ProjectileID.TheRottedFork, ProjectileID.Swordfish, @@ -300,7 +302,7 @@ namespace CalamityMod ProjectileID.MonkStaffT3, ProjectileID.NorthPoleWeapon, - // Tools + // Tools ProjectileID.CobaltDrill, ProjectileID.MythrilDrill, ProjectileID.AdamantiteDrill, @@ -328,8 +330,8 @@ namespace CalamityMod ProjectileID.SawtoothShark, ProjectileID.ButchersChainsaw, - // Calamity shit - ModContent.ProjectileType(), + // Calamity shit + ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), @@ -394,7 +396,7 @@ namespace CalamityMod projectileDestroyExceptionList = new List() { - //holdout projectiles + //holdout projectiles ProjectileID.Phantasm, ProjectileID.VortexBeater, ProjectileID.DD2PhoenixBow, @@ -423,7 +425,7 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), - //Some hostile boss projectiles + //Some hostile boss projectiles ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), @@ -875,7 +877,7 @@ namespace CalamityMod ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), - //Cryonic Bar set stuff, could potentially be removed + //Cryonic Bar set stuff, could potentially be removed ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), @@ -1921,7 +1923,7 @@ namespace CalamityMod NPCID.BaldZombie, NPCID.PincushionZombie, NPCID.ArmedZombiePincussion, // what is this spelling - NPCID.SlimedZombie, + NPCID.SlimedZombie, NPCID.ArmedZombieSlimed, NPCID.SwampZombie, NPCID.ArmedZombieSwamp, @@ -1948,8 +1950,8 @@ namespace CalamityMod NPCID.SmallBaldZombie, NPCID.BigZombie, NPCID.SmallZombie - // halloween zombies not included because they don't drop shackles or zombie arms - }; + // halloween zombies not included because they don't drop shackles or zombie arms + }; demonEyeList = new List() { @@ -1957,7 +1959,7 @@ namespace CalamityMod NPCID.CataractEye, NPCID.SleepyEye, NPCID.DialatedEye, // it is spelled "dilated" - NPCID.GreenEye, + NPCID.GreenEye, NPCID.PurpleEye, NPCID.DemonEyeOwl, NPCID.DemonEyeSpaceship, @@ -1988,13 +1990,13 @@ namespace CalamityMod NPCID.BigSkeleton, NPCID.SmallSkeleton, - //Note: These skeletons don't count for Skeleton Banner for some god forsaken reason - NPCID.SkeletonTopHat, + //Note: These skeletons don't count for Skeleton Banner for some god forsaken reason + NPCID.SkeletonTopHat, NPCID.SkeletonAstonaut, NPCID.SkeletonAlien, - //Other skeleton types - NPCID.ArmoredSkeleton, + //Other skeleton types + NPCID.ArmoredSkeleton, NPCID.HeavySkeleton, NPCID.SkeletonArcher, NPCID.GreekSkeleton @@ -2061,8 +2063,8 @@ namespace CalamityMod NPCID.SantaNK1, NPCID.Everscream, NPCID.DD2Betsy, - NPCID.Mothron - }; + NPCID.Mothron + }; bossMinionList = new List() { @@ -2293,6 +2295,14 @@ namespace CalamityMod CalamityMod.Instance.GetEquipSlot("SirenLeg", EquipType.Legs), CalamityMod.Instance.GetEquipSlot("PopoLeg", EquipType.Legs) }; + + // Duke Fishron phase 3 becomes way too easy if you can make him stop being invisible with Yanmei's Knife. + // This is a list so that other NPCs can be added as necessary. + // IT DOES NOT make them immune to the debuff, just stops them from being recolored. + kamiDebuffColorImmuneList = new List() + { + NPCID.DukeFishron, + }; } public static void UnloadLists() @@ -2365,10 +2375,11 @@ namespace CalamityMod hornetList = null; mossHornetList = null; bossMinionList = null; - minibossList = null; + minibossList = null; legOverrideList = null; + kamiDebuffColorImmuneList = null; } } } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index e079b053af..6c6bda94ec 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4368,7 +4368,7 @@ namespace CalamityMod.NPCs return new Color(200, 50, 50, npc.alpha); } - if (npc.Calamity().kamiFlu > 0) + if (npc.Calamity().kamiFlu > 0 && !CalamityLists.kamiDebuffColorImmuneList.Contains(npc.type)) { return new Color(51, 197, 108, npc.alpha); } diff --git a/Projectiles/Typeless/YanmeisKnifeSlash.cs b/Projectiles/Typeless/YanmeisKnifeSlash.cs index 174ddf2585..108095c8b9 100644 --- a/Projectiles/Typeless/YanmeisKnifeSlash.cs +++ b/Projectiles/Typeless/YanmeisKnifeSlash.cs @@ -14,7 +14,20 @@ namespace CalamityMod.Projectiles.Typeless public class YanmeisKnifeSlash : ModProjectile { // This is a rather weird thing, but it's what the patron asked for. - public static readonly Func CanRecieveCoolEffectsFrom = (npc) => (npc.boss && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType()) || CalamityLists.bossMinionList.Contains(npc.type) || CalamityLists.minibossList.Contains(npc.type) || AcidRainEvent.AllMinibosses.Contains(npc.type); + public static readonly Func CanRecieveCoolEffectsFrom = (npc) => + { + bool validBoss = npc.boss && npc.type != ModContent.NPCType() + && npc.type != ModContent.NPCType() + && npc.type != ModContent.NPCType(); + if (validBoss) + return true; + bool bossMinion = CalamityLists.bossMinionList.Contains(npc.type); + if (bossMinion) + return true; + bool miniboss = CalamityLists.minibossList.Contains(npc.type) || AcidRainEvent.AllMinibosses.Contains(npc.type); + return miniboss; + }; + public override void SetStaticDefaults() { DisplayName.SetDefault("Yanmei's Knife"); @@ -31,7 +44,9 @@ namespace CalamityMod.Projectiles.Typeless projectile.ownerHitCheck = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 20; - projectile.Calamity().trueMelee = true; + + // Not considered true melee to prevent Titan Scale from triggering. + // projectile.Calamity().trueMelee = true; } public override void AI()