ACR_CreatureBehavior.CreatureObject.CallToFriends C# (CSharp) Method

CallToFriends() private method

This method speaks a string of the creature calling out to its friends that it has spotted trouble.
private CallToFriends ( ) : void
return void
        private void CallToFriends()
        {
            string sShout = Script.GetLocalString(ObjectId, "ACR_CREATURE_SURPRISE_SHOUT");
            if (sShout == "")
            {
                if (TacticsType == AIParty.AIType.BEHAVIOR_TYPE_MINDLESS)
                {
                    switch (new Random().Next(4))
                    {
                        case 1:
                            sShout = "Nnnnnraaaaaagh!";
                            break;
                        case 2:
                            sShout = "*groans*";
                            break;
                        case 3:
                            sShout = "Mmmmmmrrrrrrn.";
                            break;
                        case 4:
                            sShout = "Chseeeeeeeeeeeeh.";
                            break;
                    }
                }
                else if (TacticsType == AIParty.AIType.BEHAVIOR_TYPE_ANIMAL)
                {
                    sShout = "*howls!*";
                }
                else
                {
                    switch (new Random().Next(8))
                    {
                        case 1:
                            sShout = "Bwuh?";
                            break;
                        case 2:
                            sShout = "Bane's black balls!";
                            break;
                        case 3:
                            sShout = "Ack!";
                            break;
                        case 4:
                            sShout = "Galad!";
                            break;
                        case 5:
                            sShout = "Hrast!";
                            break;
                        case 6:
                            sShout = "Naeth!";
                            break;
                        case 7:
                            sShout = "Stlarning hells!";
                            break;
                        case 8:
                            sShout = "*says something that's <i>certainly</i> profanity.*";
                            break;
                    }
                }
            }

            Script.ActionSpeakString(sShout, CLRScriptBase.TALKVOLUME_TALK);
            foreach (CreatureObject ally in Party.PartyMembers)
            {
                if (Script.GetArea(ally.ObjectId) == Script.GetArea(ObjectId))
                {
                    Vector3 allyPosition = Script.GetPosition(ally.ObjectId);
                    Vector3 personalPosition = Script.GetPosition(ObjectId);
                    int X = (int)Math.Pow(allyPosition.x - personalPosition.x, 2);
                    int Y = (int)Math.Pow(allyPosition.y - personalPosition.y, 2);
                    if (X + Y < 40 * 40 && // Within earshot.
                        !ally.HasCombatRoundProcess)
                    {
                        ally.HasCombatRoundProcess = true;
                        Script.DelayCommand(0.5f, delegate() { ally.CallToFriends(); });
                        Script.DelayCommand(3.0f, delegate() { ally.SelectCombatRoundAction(false); });
                    }
                }
            }
        }