added warbanner NPC blacklist
This commit is contained in:
1 parent
946c69762f
commit
8ece364470
1 file changed
+6
-1
@@ -40,6 +40,11 @@ namespace CalamityMod.Items.Accessories
|
||||
Item.expert = true;
|
||||
}
|
||||
|
||||
private static bool IsBlacklistedNPC(NPC npc)
|
||||
{
|
||||
return npc.type == NPCID.CultistArcherBlue || npc.type == NPCID.CultistDevote;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
@@ -75,7 +80,7 @@ namespace CalamityMod.Items.Accessories
|
||||
float generousHitboxWidth = Math.Max(nPC.Hitbox.Width / 2f, nPC.Hitbox.Height / 2f) + 100; // Adds some room so max bonus isnt when you're ON the hitbox
|
||||
float intensity = Utils.Remap(Utils.Distance(player.Center, nPC.Center), MaxDistance + generousHitboxWidth, generousHitboxWidth, 1, 3, true); // We have to have this seperate from bonus, otherwise all effected enemies take damage based on the closest enemy
|
||||
|
||||
if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType<SuperDummyNPC>()) && !nPC.dontTakeDamage)
|
||||
if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType<SuperDummyNPC>()) && !nPC.dontTakeDamage && !IsBlacklistedNPC(nPC))
|
||||
{
|
||||
float minDamageMult = 0.10f;
|
||||
int maxTargets = 7;
|
||||
|
||||
Reference in new issue
Block a user