26 lines
637 B
Plaintext
26 lines
637 B
Plaintext
int CountShadowCreatures()
|
|
{ // return number of active shadow creatures
|
|
int nRet=0;
|
|
object oWP=GetWaypointByTag("SHADOW_ENTRANCE_POINT");
|
|
int nC=1;
|
|
object oCR=GetNearestObject(OBJECT_TYPE_CREATURE,oWP,nC);
|
|
while(oCR!=OBJECT_INVALID)
|
|
{ // count them
|
|
if (!GetIsPC(oCR))
|
|
{ // is not a PC
|
|
if (GetIsEnemy(GetFirstPC(),oCR)==TRUE)
|
|
nRet++;
|
|
} // is not a PC
|
|
nC++;
|
|
oCR=GetNearestObject(OBJECT_TYPE_CREATURE,oWP,nC);
|
|
} // count them
|
|
return nRet;
|
|
} // CountShadowCreatures()
|
|
|
|
int StartingConditional()
|
|
{
|
|
int nReturn=FALSE;
|
|
if (CountShadowCreatures()>2) nReturn=TRUE;
|
|
return nReturn;
|
|
}
|