X0 i0 enemy
From NWN Lexicon
Contents |
[edit] x0_i0_enemy
Library with functions for finding and identifying enemies.
NOTE: This file includes x0_i0_match .
[edit] Constants
Name | Value | Brief Description |
---|---|---|
MELEE_DISTANCE | 3.0 |
[edit] Structures
Name | Variables | Brief Description | |
---|---|---|---|
sEnemies | int FIGHTERS int FIGHTER_LEVELS int CLERICS int CLERIC_LEVELS int MAGES int MAGE_LEVELS int MONSTERS int MONTERS_LEVELS int TOTAL int TOTAL_LEVELS |
int ENEMY_NUM int ALLY_NUM int ENEMY_CR int ALLY_CR |
Used to collect the number of enemies and allies in a situation and their respective challenge rating. |
[edit] Functions
Name | Brief Description |
---|---|
Gets the number of enemies in a sphere shape around a target. | |
Gets how many friendly creatures are within a spherical range of a target object. | |
CountEnemiesAndAllies | Count the number of enemies and allies in a given radius and their respective total CRs (slightly rounded, since we use integers instead of floats). This returns a "struct sSituation" type value. |
Returns number of enemies perceived and their combined levels. | |
Seeks out an enemy more than 3 meters away. | |
GetIsMeleeAttacker | Returns TRUE if the given opponent is a melee attacker, meaning they are in melee range and equipped with a melee weapon. |
GetIsRangedAttacker | Returns TRUE if the given opponent is a ranged attacker, meaning they are outside melee range. |
GetIsWieldingRanged | Returns TRUE if the given opponent is wielding a ranged weapon. |
Use the four archetypes to determine the most dangerous group type facing the NPC. | |
GetNearestEnemy | Gets the nearest enemy. |
GetNearestPerceivedEnemy |
Returns the nearest object that can be seen, then checks for he nearest heard target. |
GetNearestSeenEnemy | Get the nearest seen enemy. This will NOT return an enemy that is heard but not seen; for that, use GetNearestPerceivedEnemy instead. |
GetNearestSeenFriend | Get the nearest seen friend. |
Determines closest visual creature and determines the closest heard creature. | |
Determines the number of enemies within a 5 meter radius of the target object. | |
Determines the number of enemies outside a 5 meter radius of the target object. | |
Determine the number of targets within 20 meters that are of the specified racial-type |
author: Mistress