

Whether or not to run the code for checking whether an NPC will remain active. CooldownSlot determines which of the player's cooldown counters to use (-1, 0, or 1), and defaults to -1. Return false to block the NPC from hitting the target. More.ĬanHitPlayer (NPC npc, Player target, ref int cooldownSlot)Īllows you to determine whether an NPC can hit the given player.

Return true to allow hitting the target, return false to block the NPC from hitting the target, and return null to use the vanilla code for whether the target can be hit. More.Īllows you to determine whether an NPC can hit the given friendly NPC. Return true to allow the NPC to teleport to the statue, return false to block this NPC from teleporting to the statue, and return null to use the vanilla code for whether the NPC can teleport to the statue. Whether this NPC can be telported a King or Queen statue. More.ĬanGoToStatue (NPC npc, bool toKingStatue) Return true to allow talking with the player, return false to block this NPC from talking with the player, and return null to use the vanilla code for whether the NPC can talk. More.Īllows you to determine whether this NPC can talk with the player. Return true to allow hitting the NPC, return false to block hitting the NPC, and return null to use the vanilla code for whether the NPC can be hit. More.ĬanBeHitByProjectile (NPC npc, Projectile projectile)Īllows you to determine whether an NPC can be hit by the given projectile. More.ĬanBeHitByItem (NPC npc, Player player, Item item)Īllows you to determine whether an NPC can be hit by the given melee weapon when swung. Useful for buffing town NPCs when certain bosses are defeated, etc. More.īuffTownNPC (ref float damageMult, ref int defense)Īllows you to modify the stats of town NPCs. More.īossHeadSpriteEffects (NPC npc, ref SpriteEffects spriteEffects)Īllows you to flip an NPC's boss head icon on the map.

Set index to -1 to stop the texture from being displayed. More.Īllows you to customize the boss head texture used by an NPC based on its state. More.īossHeadRotation (NPC npc, ref float rotation)Īllows you to customize the rotation of an NPC's boss head icon on the map. Use this method to either force or stop an autoload or to control the internal name. Name is initialized to the overriding class name. Return true to allow autoloading by default returns the mod's autoload property. More.Īllows you to automatically load a GlobalNPC instead of using Mod.AddGlobalNPC. This will only be called if PreAI returns true. Allows you to determine how any NPC behaves.
