From Mod Wiki
integer mask -- Mask of which allegiances to match. This may include TA_FLAG_FRIEND, TA_FLAG_NEUTRAL, and TA_FLAG_ENEMY. boolean inclusive -- Whether to include or exclude matched entities.
- This includes disguise information, to not do that use filterEntitiesByAllegiance.
Removes entities from the entity cache based on whether they are of the given allegiance relative to this entity, and returns the number that are left.