Skip to content

Commit 8069334

Browse files
committed
Adding NwCreature.SurrenderToEnemies
Adding NwCreature.SurrenderToEnemiesl https://nwnlexicon.com/index.php/SurrenderToEnemies
1 parent 06b3969 commit 8069334

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

NWN.Anvil/src/main/API/Objects/NwCreature.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,6 +2781,17 @@ public void SummonFamiliar(string resRef)
27812781
Creature.m_bSummonedFamiliar = 1;
27822782
}
27832783

2784+
/// <summary>
2785+
/// 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.
2786+
/// If this command is run on a PC or an object that is not a creature, nothing will happen.
2787+
/// </summary>
2788+
2789+
public async Task SurrenderToEnemies()
2790+
{
2791+
await WaitForObjectContext();
2792+
NWScript.SurrenderToEnemies();
2793+
}
2794+
27842795
/// <summary>
27852796
/// Forces this creature to unsummon their familiar.<br/>
27862797
/// Does nothing if this creature has no familiar summoned.

0 commit comments

Comments
 (0)