IF
  Die()
THEN
  RESPONSE #100
    Shout(66)
END

IF
  OR(2)
    Heard([NEUTRAL],79)
    Heard([EVILCUTOFF],79)
  Allegiance(Myself,NEUTRAL)
  !Global("BP_PlotMan","LOCALS",1)
THEN
  RESPONSE #100
    Enemy()
    Continue()
END

IF
  Global("BPCHARM","LOCALS",1)
  !StateCheck(Myself,STATE_CHARMED)
THEN
  RESPONSE #100
    SetGlobal("BPCHARM","LOCALS",0)
    ClearActions(Myself)
    Continue()
END

IF
  GlobalTimerNotExpired("BPCHASE","LOCALS")
  Global("BPCHASER","LOCALS",1)
  OR(2)
    See([GOODCUTOFF])
    See(LastHitter(Myself))
  !General(Myself,HUMANOID)
  !General(Myself,GIANTHUMANOID)
THEN
  RESPONSE #10
    DisplayStringHead(Myself,@0)
    SetGlobal("BPCHASER","LOCALS",0)
    AttackReevaluate(LastSeenBy(Myself),15)
  RESPONSE #20
    DisplayStringHead(Myself,@0)
    SetGlobal("BPCHASER","LOCALS",0)
    ForceSpell(Myself,TELEKINESIS)
    SetGlobal("BP_BehTel","LOCALS",1)
    DisplayStringHead(Myself,@1)
    ChangeSpecifics(Myself,CALLED_FOR_BOULDER)
  RESPONSE #15
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_ANTIMAGIC_RAY)
    SetGlobalTimer("RAY","LOCALS",3)
    IncrementGlobal("BeholdRay","LOCALS",1)
  RESPONSE #10
    SetGlobalTimer("BPT","LOCALS",ONE_ROUND)
    Spell(LastSeenBy(Myself),WIZARD_NPC_SYMBOL_STUN)
  RESPONSE #10
    SetGlobalTimer("BPT","LOCALS",ONE_ROUND)
    Spell(LastSeenBy(Myself),WIZARD_MAZE)
  RESPONSE #5
    SetGlobalTimer("BPT","LOCALS",ONE_ROUND)
    IncrementGlobal("mmiss","LOCALS",1)
    ForceSpell(LastSeenBy(Myself),BEHOLDER_MAGIC_MISSILE)
  RESPONSE #10
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_PARALYZATION)
    SetGlobalTimer("par","LOCALS",2)
    IncrementGlobal("BeholdParal","LOCALS",1)
  RESPONSE #100
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_FEAR)
    SetGlobalTimer("fear","LOCALS",4)
    IncrementGlobal("BeFear","LOCALS",1)
  RESPONSE #5
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),HIVE_MOTHER_CAUSE_SERIOUS_WOUNDS)
    SetGlobalTimer("wnd","LOCALS",2)
    IncrementGlobal("BeWound","LOCALS",1)
  RESPONSE #10
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_FLESH_TO_STONE)
    IncrementGlobal("BeStone","LOCALS",1)
    SetGlobalTimer("stn","LOCALS",8)
  RESPONSE #10
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_DEATH_RAY)
    SetGlobalTimer("dth","LOCALS",10)
    IncrementGlobal("BeDeath","LOCALS",1)
  RESPONSE #10
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_DOMINATION)
    SetGlobalTimer("dom","LOCALS",3)
    IncrementGlobal("BeDom","LOCALS",1)
  RESPONSE #10
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_SLOW)
    SetGlobalTimer("slo","LOCALS",8)
    IncrementGlobal("BeSlow","LOCALS",1)

END

IF
  GlobalTimerExpired("BPCHASE","LOCALS")
  Global("BPCHASER","LOCALS",1)
  !See([GOODCUTOFF])
  !See(LastHitter(Myself))
THEN
  RESPONSE #100
    DisplayStringHead(Myself,@2)
    SetGlobal("BPCHASER","LOCALS",0)
    ClearActions(Myself)
    Continue()
END

IF
  !Allegiance(Myself,ENEMY)
  !Allegiance(Myself,PC)
  OR(2)
    AttackedBy([GOODCUTOFF],DEFAULT)
    Allegiance(LastAttackerOf(Myself),GOODCUTOFF)
THEN
  RESPONSE #100
    Enemy()
    Shout(151)
    Continue()
END

IF
  !Allegiance(Myself,ENEMY)
  !Allegiance(Myself,GOODCUTOFF)
  OR(2)
    HitBy([GOODCUTOFF],CRUSHING)
    Allegiance(LastHitter(Myself),GOODCUTOFF)
THEN
  RESPONSE #100
    Shout(151)
    Enemy()
    Continue()
END

IF
  ActionListEmpty()
  OR(4)
    CheckStat(Myself,11,180)
    CheckStat(Myself,16,180)
    CheckStat(Myself,17,180)
    CheckStat(Myself,20,180)
THEN
  RESPONSE #100
    DisplayStringHead(Myself,@1)
    SpellNoDec(Myself,CLERIC_ZONE_OF_SWEET_AIR)
END

IF
  TookDamage()
  Global("BPCHASER","LOCALS",0)
  !See(LastHitter(Myself))
  !See([GOODCUTOFF])
THEN
  RESPONSE #30
    DisplayStringHead(Myself,@3)
    SetGlobalTimer("BPCHASE","LOCALS",12)
    SetGlobal("BPCHASER","LOCALS",1)
    MoveToObject(LastHitter(Myself))
  RESPONSE #15
    DisplayStringHead(Myself,@3)
    SetGlobalTimer("BPCHASE","LOCALS",13)
    SetGlobal("BPCHASER","LOCALS",1)
    SetGlobalTimer("BPT","LOCALS",ONE_ROUND)
    ForceSpell(Myself,WIZARD_STONE_SKIN)
    RemoveSpell(WIZARD_STONE_SKIN)
    Wait(1)
    MoveToObject(LastHitter(Myself))
  RESPONSE #15
    DisplayStringHead(Myself,@3)
    SetGlobalTimer("BPCHASE","LOCALS",15)
    SetGlobal("BPCHASER","LOCALS",1)
    SetGlobalTimer("BPT","LOCALS",ONE_ROUND)
    ForceSpell(Myself,WIZARD_TRUE_SIGHT)
    RemoveSpell(WIZARD_TRUE_SIGHT)
    Wait(1)
    MoveToObject(LastHitter(Myself))
  RESPONSE #15
    DisplayStringHead(Myself,@3)
    SetGlobalTimer("BPCHASE","LOCALS",15)
    SetGlobal("BPCHASER","LOCALS",1)
    SetGlobalTimer("BPT","LOCALS",ONE_ROUND)
    ForceSpell(Myself,WIZARD_PROTECTION_FROM_THE_ELEMENTS)
    RemoveSpell(WIZARD_PROTECTION_FROM_THE_ELEMENTS)
    Wait(1)
    MoveToObject(LastHitter(Myself))
  RESPONSE #15
    DisplayStringHead(Myself,@3)
    SetGlobalTimer("BPCHASE","LOCALS",13)
    SetGlobal("BPCHASER","LOCALS",1)
    IncrementGlobal("TURN","LOCALS",1)
    SetGlobalTimer("BPT","LOCALS",ONE_ROUND)
    ReallyForceSpell(Myself,BEHOLDER_SPELL_TURNING)
    Wait(1)
    MoveToObject(LastHitter(Myself))
  RESPONSE #30
    DisplayStringHead(Myself,@3)
    RunAwayFrom(LastHitter(Myself),45)
END

IF
  CheckStatGT(Myself,10,180)
  CheckStatGT(Myself,5,INT)
  OR(2)
    See(LastAttackerOf(Myself))
    See(LastHitter(Myself))
  CheckStatLT(LastSeenBy(Myself),11,180)
  !GlobalTimerNotExpired("BPCHASE","LOCALS")
THEN
  RESPONSE #100
    SetGlobalTimer("BPCHASE","LOCALS",TWO_ROUNDS)
    DisplayStringHead(Myself,@4)
    EquipMostDamagingMelee()
    MoveToObject(LastSeenBy(Myself))
    AttackOneRound(LastSeenBy(Myself))
END

IF
  CheckStatGT(Myself,10,180)
  CheckStatGT(Myself,5,INT)
  OR(2)
    See(TenthNearest([GOODCUTOFF]))
    See(TenthNearest([PC]))
  CheckStatLT(LastSeenBy(Myself),11,180)
  !GlobalTimerNotExpired("BPCHASE","LOCALS")
THEN
  RESPONSE #100
    SetGlobalTimer("BPCHASE","LOCALS",TWO_ROUNDS)
    DisplayStringHead(Myself,@4)
    EquipMostDamagingMelee()
    MoveToObject(LastSeenBy(Myself))
    AttackOneRound(LastSeenBy(Myself))
END

IF
  CheckStatGT(Myself,10,180)
  CheckStatGT(Myself,5,INT)
  See(TenthNearest)
  CheckStatLT(TenthNearest,11,180)
  !GlobalTimerNotExpired("BPCHASE","LOCALS")
THEN
  RESPONSE #100
    SetGlobalTimer("BPCHASE","LOCALS",ONE_ROUND)
    DisplayStringHead(Myself,@4)
    MoveToObject(TenthNearest)
END

//////////////CLOUDLIKE  EFFECTS//////////////////////

IF
  CheckStat(Myself,11,180) // I'm in a stinking cloud
  CheckStatGT(Myself,5,INT)
  !StateCheck(Myself,STATE_SLEEPING) // not yet affected
  CheckStatGT(Myself,4,SAVEVSSPELL) //and I got a reasonable chance of failing a save throw (25%+)
  OR(2)
    Detect(NearestEnemyOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
    Detect(NearestMyGroupOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
  Range(LastSeenBy(Myself),16)
THEN
  RESPONSE #100
    SetInterrupt(FALSE)
    RunAwayFrom(LastSeenBy(Myself),30)
    SetInterrupt(TRUE)
END

IF
  CheckStatGT(Myself,11,180) // I'm in a web,entangle, or grease spell
  CheckStatLT(Myself,15,180)
  CheckStatGT(Myself,5,INT)
  CheckStatLT(Myself,1,131) // I don't have free action
  CheckStatLT(Myself,1,WEB) //and not webbed up
  CheckStatLT(Myself,1,ENTANGLE) //nor entangled --I can move
  CheckStatGT(Myself,4,SAVEVSSPELL) //and I got a reasonable chance of failing a save throw (25%+)
  OR(3)
    Detect([0.0.MORNINGSTAR.FAIRY_NYMPH.65])
    Detect(NearestEnemyOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
    Detect(NearestMyGroupOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
  Range(LastSeenBy(Myself),16)
THEN
  RESPONSE #100
    SetInterrupt(FALSE)
    RunAwayFrom(LastSeenBy(Myself),30)
    SetInterrupt(TRUE)
END

IF
  CheckStat(Myself,15,180) // I'm in an Ice Storm
  CheckStatGT(Myself,5,INT)
  CheckStatLT(Myself,100,RESISTCOLD) // Not Immune
  OR(3)
    Detect([0.0.MORNINGSTAR.FAIRY_NYMPH.65])
    Detect(NearestEnemyOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
    Detect(NearestMyGroupOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
  Range(LastSeenBy(Myself),16)
THEN
  RESPONSE #100
    SetInterrupt(FALSE)
    RunAwayFrom(LastSeenBy(Myself),30)
    SetInterrupt(TRUE)
END

IF
  CheckStat(Myself,16,180) // I'm in a Cloudkill or Death Fog
  CheckStatGT(Myself,5,INT)
  CheckStatLT(Myself,100,RESISTPOISON) // Not Immune
  OR(3)
    Detect([0.0.MORNINGSTAR.FAIRY_NYMPH.65])
    Detect(NearestEnemyOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
    Detect(NearestMyGroupOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
  Range(LastSeenBy(Myself),16)
THEN
  RESPONSE #100
    SetInterrupt(FALSE)
    RunAwayFrom(LastSeenBy(Myself),30)
    SetInterrupt(TRUE)
END

IF
  CheckStat(Myself,17,180) // I'm in a Death Fog
  CheckStatGT(Myself,5,INT)
  CheckStatLT(Myself,100,RESISTACID) // Not Immune
  OR(3)
    Detect([0.0.MORNINGSTAR.FAIRY_NYMPH.65])
    Detect(NearestEnemyOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
    Detect(NearestMyGroupOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
  Range(LastSeenBy(Myself),16)
THEN
  RESPONSE #100
    SetInterrupt(FALSE)
    RunAwayFrom(LastSeenBy(Myself),30)
    SetInterrupt(TRUE)
END

IF
  CheckStat(Myself,18,180) // Incendiary Cloud, Meteor Swarm or Fire Storm -- bad stuff
  CheckStatGT(Myself,5,INT)
  CheckStatLT(Myself,100,RESISTFIRE) // Not Immune
  OR(3)
    Detect([0.0.MORNINGSTAR.FAIRY_NYMPH.65])
    Detect(NearestEnemyOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
    Detect(NearestMyGroupOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
  Range(LastSeenBy(Myself),16)
THEN
  RESPONSE #100
    SetInterrupt(FALSE)
    RunAwayFrom(LastSeenBy(Myself),30)
    SetInterrupt(TRUE)
END

// This is to try and keep them from going back in to whomp somebody
IF
  CheckStatLT(Myself,11,180) // No longer in the cloud effects
  CheckStatGT(Myself,5,INT)
  OR(3)
    Detect([0.0.MORNINGSTAR.FAIRY_NYMPH.65])
    Detect(NearestEnemyOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
    Detect(NearestMyGroupOfType([0.0.MORNINGSTAR.FAIRY_NYMPH.65]))
  !Range(LastSeenBy(Myself),16)
  Exists([EVILCUTOFF])
  !Range(NearestEnemyOf(Myself),2)
THEN
  RESPONSE #100
    EquipRanged()  //use your bow, then
    SmallWait(3)
    Continue()
END

//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////

IF
  OR(2)
    !Allegiance(Myself,EVILCUTOFF)
    !Detect([GOODCUTOFF])
THEN
  RESPONSE #100
END

IF
  Global("BP_BehTel","LOCALS",0)
  See(NearestEnemyOf(Myself))
THEN
  RESPONSE #100
    ForceSpell(Myself,TELEKINESIS)
    SetGlobal("BP_BehTel","LOCALS",1)
END

IF
  Global("BP_ShBald","LOCALS",0)
  PartyHasItem("WA2SHIEL")  // ~Shield of Balduran~
THEN
  RESPONSE #100
    SetGlobalTimer("BALD","LOCALS",7)
    SetGlobal("BP_ShBald","LOCALS",1)
END

IF
  Global("BP_ShBald","LOCALS",1)
  GlobalTimerExpired("BALD","LOCALS")
THEN
  RESPONSE #100
    SetGlobal("BP_ShBald","LOCALS",2)
END

IF
  Global("BP_ShBald","LOCALS",2)
  HasItemEquiped("WA2SHIEL",Player1)
  !GlobalTimerNotExpired("SHIELD","LOCALS")
  !Specifics(Myself,CALLED_FOR_BOULDER)
  GlobalLT("BP_TelSum","LOCALS",24)
  See(Player1)
THEN
  RESPONSE #90
    DisplayStringHead(Myself,100660)  // @1
    ChangeSpecifics(Myself,CALLED_FOR_BOULDER)
    SetGlobalTimer("SHIELD","LOCALS",3)
    IncrementGlobal("BP_TelSum","LOCALS",1)
  RESPONSE #40
    Continue()
END

IF
  Global("BP_ShBald","LOCALS",2)
  HasItemEquiped("WA2SHIEL",Player2)
  !GlobalTimerNotExpired("SHIELD","LOCALS")
  !Specifics(Myself,CALLED_FOR_BOULDER)
  GlobalLT("BP_TelSum","LOCALS",24)
  See(Player2)
THEN
  RESPONSE #90
    DisplayStringHead(Myself,100660)  // @1
    ChangeSpecifics(Myself,CALLED_FOR_BOULDER)
    SetGlobalTimer("SHIELD","LOCALS",3)
    IncrementGlobal("BP_TelSum","LOCALS",1)
    Continue()
END

IF
  Global("BP_ShBald","LOCALS",2)
  HasItemEquiped("WA2SHIEL",Player3)
  !GlobalTimerNotExpired("SHIELD","LOCALS")
  !Specifics(Myself,CALLED_FOR_BOULDER)
  GlobalLT("BP_TelSum","LOCALS",24)
  See(Player3)
THEN
  RESPONSE #90
    DisplayStringHead(Myself,100660)  // @1
    ChangeSpecifics(Myself,CALLED_FOR_BOULDER)
    SetGlobalTimer("SHIELD","LOCALS",3)
    IncrementGlobal("BP_TelSum","LOCALS",1)
  RESPONSE #40
    Continue()
END

IF
  Global("BP_ShBald","LOCALS",2)
  HasItemEquiped("WA2SHIEL",Player4)
  !GlobalTimerNotExpired("SHIELD","LOCALS")
  !Specifics(Myself,CALLED_FOR_BOULDER)
  GlobalLT("BP_TelSum","LOCALS",24)
  See(Player4)
THEN
  RESPONSE #90
    DisplayStringHead(Myself,100660)  // @1
    ChangeSpecifics(Myself,CALLED_FOR_BOULDER)
    SetGlobalTimer("SHIELD","LOCALS",3)
    IncrementGlobal("BP_TelSum","LOCALS",1)
  RESPONSE #40
    Continue()
END

IF
  Global("BP_ShBald","LOCALS",2)
  HasItemEquiped("WA2SHIEL",Player5)
  !GlobalTimerNotExpired("SHIELD","LOCALS")
  !Specifics(Myself,CALLED_FOR_BOULDER)
  GlobalLT("BP_TelSum","LOCALS",24)
  See(Player5)
THEN
  RESPONSE #90
    DisplayStringHead(Myself,100660)  // @1
    ChangeSpecifics(Myself,CALLED_FOR_BOULDER)
    SetGlobalTimer("SHIELD","LOCALS",3)
    IncrementGlobal("BP_TelSum","LOCALS",1)
  RESPONSE #40
    Continue()
END

IF
  Global("BP_ShBald","LOCALS",2)
  HasItemEquiped("WA2SHIEL",Player6)
  !GlobalTimerNotExpired("SHIELD","LOCALS")
  !Specifics(Myself,CALLED_FOR_BOULDER)
  GlobalLT("BP_TelSum","LOCALS",24)
  See(Player6)
THEN
  RESPONSE #90
    DisplayStringHead(Myself,100660)  // @1
    ChangeSpecifics(Myself,CALLED_FOR_BOULDER)
    SetGlobalTimer("SHIELD","LOCALS",3)
    IncrementGlobal("BP_TelSum","LOCALS",1)
  RESPONSE #40
    Continue()
END

IF
  RandomNum(2,1)
  GlobalLT("BeholdRay","LOCALS",16)
  !GlobalTimerNotExpired("RAY","LOCALS")
  OR(11)
    See(NearestEnemyOf(Myself))
    See([GOODCUTOFF.0.0.MONK])
    See([GOODCUTOFF.0.0.THIEF_ALL])
    See([GOODCUTOFF.0.0.FIGHTER_ALL])
    See([GOODCUTOFF.0.0.RANGER_ALL])
    See([GOODCUTOFF.0.0.PALADIN_ALL])
    See([GOODCUTOFF.0.0.BARD_ALL])
    See([GOODCUTOFF.0.0.CLERIC_ALL])
    See([GOODCUTOFF.0.0.DRUID_ALL])
    See([GOODCUTOFF.0.0.LONG_BOW])
    See([GOODCUTOFF.0.0.SORCERER])
  OR(12)
    SpellCastInnate(LastSeenBy(Myself),0)
    SpellCastPriest(LastSeenBy(Myself),0)
    SpellCast(LastSeenBy(Myself),0)
    HasImmunityEffects(LastSeenBy(Myself))
    HasBounceEffects(LastSeenBy(Myself))
    StateCheck(LastSeenBy(Myself),STATE_HASTED)
    StateCheck(LastSeenBy(Myself),STATE_BLESS)
    StateCheck(LastSeenBy(Myself),STATE_CHANT)
    StateCheck(LastSeenBy(Myself),STATE_LUCK)
    StateCheck(LastSeenBy(Myself),STATE_BLUR)
    StateCheck(LastSeenBy(Myself),STATE_INVISIBLE)
    StateCheck(LastSeenBy(Myself),STATE_IMPROVEDINVISIBILITY)
THEN
  RESPONSE #100
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_ANTIMAGIC_RAY)
    SetGlobalTimer("RAY","LOCALS",3)
    IncrementGlobal("BeholdRay","LOCALS",1)
END

IF
  See([GOODCUTOFF.0.0.0.0.SUMMONED])
  GlobalLT("summon","LOCALS",3)
  !GlobalTimerNotExpired("summ","LOCALS")
  RandomNum(3,1)
THEN
  RESPONSE #100
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_PARALYZATION)
    ReallyForceSpell(LastSeenBy(Myself),WIZARD_DEATH_SPELL)
    IncrementGlobal("summon","LOCALS",1)
    SetGlobalTimer("summ","LOCALS",8)
END

IF
  RandomNumLT(15,3)
  GlobalLT("BeholdParal","LOCALS",8)
  !GlobalTimerNotExpired("par","LOCALS")
  OR(9)
    See(NearestEnemyOf(Myself))
    See(Player1)
    See(LastAttackerOf(Myself))
    See(LastHitter(Myself))
    See([GOODCUTOFF.0.0.BARD_ALL])
    See([GOODCUTOFF.0.0.CLERIC_ALL])
    See([GOODCUTOFF.0.0.DRUID_ALL])
    See([GOODCUTOFF.0.0.LONG_BOW])
    See([GOODCUTOFF.0.0.SORCERER])
  OR(2)
    !Global("BP_ShBald","LOCALS",2)
    !HasItem("WA2SHIEL",LastSeenBy(Myself))  // ~Shield of Balduran~
  !StateCheck(LastSeenBy(Myself),STATE_HELPLESS)
  !CheckStatGT(LastSeenBy(Myself),50,RESISTMAGIC)
THEN
  RESPONSE #100
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_PARALYZATION)
    SetGlobalTimer("par","LOCALS",2)
    IncrementGlobal("BeholdParal","LOCALS",1)
END

IF
  RandomNumGT(15,2)
  RandomNumLT(15,5)
  GlobalLT("BeHold","LOCALS",8)
  !GlobalTimerNotExpired("hold","LOCALS")
  OR(7)
    See(NearestEnemyOf(Myself))
    See(Player1)
    See([GOODCUTOFF.0.0.FIGHTER_ALL])
    See([GOODCUTOFF.0.0.MONK])
    See([GOODCUTOFF.0.0.RANGER_ALL])
    See([GOODCUTOFF.0.0.PALADIN_ALL])
    See([GOODCUTOFF.0.0.0.0.SUMMONED])
  OR(2)
    !Global("BP_ShBald","LOCALS",2)
    !HasItem("WA2SHIEL",LastSeenBy(Myself))  // ~Shield of Balduran~
  CheckStat(LastSeenBy(Myself),0,HELD)
  !StateCheck(LastSeenBy(Myself),STATE_HELPLESS)
  CheckStatLT(LastSeenBy(Myself),51,RESISTMAGIC)
  CheckStat(LastSeenBy(Myself),0,131)
  HPGT(Myself,50)
THEN
  RESPONSE #100
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),TYRANT_HOLD_MONSTER)
    SetGlobalTimer("hold","LOCALS",3)
    IncrementGlobal("Behold","LOCALS",1)
END

IF
  RandomNumGT(15,4)
  RandomNumLT(15,7)
  GlobalLT("BeFear","LOCALS",10)
  !GlobalTimerNotExpired("fear","LOCALS")
  OR(4)
    See(NearestEnemyOf(Myself))
    See(Player1)
    See(LastAttackerOf(Myself))
    See(LastHitter(Myself))
  OR(2)
    !Global("BP_ShBald","LOCALS",2)
    !HasItem("WA2SHIEL",LastSeenBy(Myself))  // ~Shield of Balduran~
  !CheckStatGT(LastSeenBy(Myself),0,178)
  !CheckStatGT(LastSeenBy(Myself),50,RESISTMAGIC)
  !StateCheck(LastSeenBy(Myself),STATE_PANIC)
THEN
  RESPONSE #100
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_FEAR)
    SetGlobalTimer("fear","LOCALS",4)
    IncrementGlobal("BeFear","LOCALS",1)
END

IF
  RandomNumGT(15,6)
  RandomNumLT(15,11)
  GlobalLT("BeWound","LOCALS",16)
  !GlobalTimerNotExpired("wnd","LOCALS")
  See(MostDamagedOf([GOODCUTOFF]))
  OR(2)
    !Global("BP_ShBald","LOCALS",2)
    !HasItem("WA2SHIEL",LastSeenBy(Myself))  // ~Shield of Balduran~
THEN
  RESPONSE #100
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_CAUSE_SERIOUS_WOUNDS)
    SetGlobalTimer("wnd","LOCALS",2)
    IncrementGlobal("BeWound","LOCALS",1)
END

IF
  RandomNum(15,11)
  GlobalLT("BeStone","LOCALS",4)
  !GlobalTimerNotExpired("stn","LOCALS")
  OR(9)
    See(NearestEnemyOf(Myself))
    See(Player1)
    See(LastAttackerOf(Myself))
    See(LastHitter(Myself))
    See([GOODCUTOFF.0.0.BARD_ALL])
    See([GOODCUTOFF.0.0.CLERIC_ALL])
    See([GOODCUTOFF.0.0.DRUID_ALL])
    See([GOODCUTOFF.0.0.LONG_BOW])
    See([GOODCUTOFF.0.0.SORCERER])
  OR(2)
    !Global("BP_ShBald","LOCALS",2)
    !HasItem("WA2SHIEL",LastSeenBy(Myself))  // ~Shield of Balduran~
THEN
  RESPONSE #100
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_FLESH_TO_STONE)
    IncrementGlobal("BeStone","LOCALS",1)
    SetGlobalTimer("stn","LOCALS",8)
END

IF
  GlobalLT("BeDom","LOCALS",8)
  !GlobalTimerNotExpired("dom","LOCALS")
  StateCheck(LastAttackerOf(Myself),STATE_CHARMED)
THEN
  RESPONSE #65
    FaceObject(LastAttackerOf(Myself))
    ForceSpell(LastAttackerOf(Myself),BEHOLDER_DOMINATION)
    SetGlobalTimer("dom","LOCALS",3)
    IncrementGlobal("BeDom","LOCALS",1)
  RESPONSE #35
    Continue()
END

IF
  RandomNum(15,12)
  GlobalLT("BeDom","LOCALS",8)
  !GlobalTimerNotExpired("dom","LOCALS")
  OR(7)
    See(NearestEnemyOf(Myself))
    See(Player1)
    See([GOODCUTOFF.0.0.FIGHTER_ALL])
    See([GOODCUTOFF.0.0.MONK])
    See([GOODCUTOFF.0.0.RANGER_ALL])
    See([GOODCUTOFF.0.0.PALADIN_ALL])
    See([GOODCUTOFF.0.0.0.0.SUMMONED])
  OR(2)
    !Global("BP_ShBald","LOCALS",2)
    !HasItem("WA2SHIEL",LastSeenBy(Myself))  // ~Shield of Balduran~
  !StateCheck(LastSeenBy(Myself),STATE_CONFUSED)
  !StateCheck(LastSeenBy(Myself),STATE_HELPLESS)
  !CheckStatGT(LastSeenBy(Myself),50,RESISTMAGIC)
  !CheckStatGT(LastSeenBy(Myself),0,119)
THEN
  RESPONSE #100
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_DOMINATION)
    SetGlobalTimer("dom","LOCALS",3)
    IncrementGlobal("BeDom","LOCALS",1)
END

IF
  RandomNumGT(15,12)
  RandomNumLT(15,15)
  GlobalLT("BeSlow","LOCALS",8)
  !GlobalTimerNotExpired("slo","LOCALS")
  OR(7)
    See(NearestEnemyOf(Myself))
    See(Player1)
    See([GOODCUTOFF.0.0.FIGHTER_ALL])
    See([GOODCUTOFF.0.0.MONK])
    See([GOODCUTOFF.0.0.RANGER_ALL])
    See([GOODCUTOFF.0.0.PALADIN_ALL])
    See([GOODCUTOFF.0.0.0.0.SUMMONED])
  OR(2)
    !Global("BP_ShBald","LOCALS",2)
    !HasItem("WA2SHIEL",LastSeenBy(Myself))  // ~Shield of Balduran~
  !StateCheck(LastSeenBy(Myself),STATE_HELPLESS)
  !StateCheck(LastSeenBy(Myself),STATE_SLOWED)
THEN
  RESPONSE #100
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_SLOW)
    SetGlobalTimer("slo","LOCALS",8)
    IncrementGlobal("BeSlow","LOCALS",1)
END

IF
  RandomNum(15,15)
  GlobalLT("BeDeath","LOCALS",5)
  !GlobalTimerNotExpired("dth","LOCALS")
  OR(11)
    See([GOODCUTOFF.0.0.MONK])
    See([GOODCUTOFF.0.0.THIEF_ALL])
    See([GOODCUTOFF.0.0.FIGHTER_ALL])
    See([GOODCUTOFF.0.0.RANGER_ALL])
    See([GOODCUTOFF.0.0.PALADIN_ALL])
    See([GOODCUTOFF.0.0.BARD_ALL])
    See([GOODCUTOFF.0.0.CLERIC_ALL])
    See([GOODCUTOFF.0.0.DRUID_ALL])
    See([GOODCUTOFF.0.0.LONG_BOW])
    See([GOODCUTOFF.0.0.SORCERER])
    See(FourthNearestEnemyOf(Myself))
  OR(2)
    !Global("BP_ShBald","LOCALS",2)
    !HasItem("WA2SHIEL",LastSeenBy(Myself))  // ~Shield of Balduran~
  HPLT(LastSeenBy(Myself),75)
  CheckStatLT(LastSeenBy(Myself),50,RESISTMAGIC)
THEN
  RESPONSE #100
    FaceObject(LastSeenBy(Myself))
    ForceSpell(LastSeenBy(Myself),BEHOLDER_DEATH_RAY)
    SetGlobalTimer("dth","LOCALS",10)
    IncrementGlobal("BeDeath","LOCALS",1)
END

IF
  True()
THEN
  RESPONSE #50
    Continue()
  RESPONSE #50
END

IF
  Range(MostDamagedOf,3)
THEN
  RESPONSE #90
    AttackReevaluate(MostDamagedOf,35)
  RESPONSE #10
END

IF
  True()
THEN
  RESPONSE #60
    AttackReevaluate(NearestEnemyOf(Myself),25)
  RESPONSE #60
    ChangeSpecifics(Myself,CALLED_FOR_BOULDER)
  RESPONSE #45
END

