From 8069334503d91132056496cb74930ce50911d146 Mon Sep 17 00:00:00 2001 From: pyro7r34d Date: Tue, 6 Jan 2026 11:21:13 -0500 Subject: [PATCH 1/2] Adding NwCreature.SurrenderToEnemies Adding NwCreature.SurrenderToEnemiesl https://nwnlexicon.com/index.php/SurrenderToEnemies --- NWN.Anvil/src/main/API/Objects/NwCreature.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/NWN.Anvil/src/main/API/Objects/NwCreature.cs b/NWN.Anvil/src/main/API/Objects/NwCreature.cs index 45b3bd51b..1ed1e5e39 100644 --- a/NWN.Anvil/src/main/API/Objects/NwCreature.cs +++ b/NWN.Anvil/src/main/API/Objects/NwCreature.cs @@ -2781,6 +2781,17 @@ public void SummonFamiliar(string resRef) Creature.m_bSummonedFamiliar = 1; } + /// + /// Use this on an NPC to cause all nearby creatures to stop what they are doing and sets the NPC's enemies within this range to be neutral towards the NPC with nearby enemies. + /// If this command is run on a PC or an object that is not a creature, nothing will happen. + /// + + public async Task SurrenderToEnemies() + { + await WaitForObjectContext(); + NWScript.SurrenderToEnemies(); + } + /// /// Forces this creature to unsummon their familiar.
/// Does nothing if this creature has no familiar summoned. From 190014511e9a0e73c0c8dc0845e16b9db74da796 Mon Sep 17 00:00:00 2001 From: pyro7r34d Date: Tue, 6 Jan 2026 21:16:02 -0500 Subject: [PATCH 2/2] Requested formatting fixes Adding requested formatting fixes --- NWN.Anvil/src/main/API/Objects/NwCreature.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/NWN.Anvil/src/main/API/Objects/NwCreature.cs b/NWN.Anvil/src/main/API/Objects/NwCreature.cs index 1ed1e5e39..c0457d8cb 100644 --- a/NWN.Anvil/src/main/API/Objects/NwCreature.cs +++ b/NWN.Anvil/src/main/API/Objects/NwCreature.cs @@ -2785,7 +2785,6 @@ public void SummonFamiliar(string resRef) /// Use this on an NPC to cause all nearby creatures to stop what they are doing and sets the NPC's enemies within this range to be neutral towards the NPC with nearby enemies. /// If this command is run on a PC or an object that is not a creature, nothing will happen. ///
- public async Task SurrenderToEnemies() { await WaitForObjectContext();