IF
	!See(NearestEnemyOf(Myself))
        !Global("Lunar","LOCALS",1)
THEN
	RESPONSE #100
		SetGlobal("Lunar","LOCALS",1)
END

IF
	Global("Lunar","LOCALS",1)
	OR(5)
		See(NearestEnemyOfType([0.0.0.DRUID_ALL]))
		See(NearestEnemyOfType([0.0.0.CLERIC_ALL]))
		See(NearestEnemyOfType([0.0.0.BARD_ALL]))
		See(NearestEnemyOfType([0.0.0.LONG_BOW]))
		See(NearestEnemyOfType)
THEN
	RESPONSE #100
		SetGlobal("Lunar","LOCALS",2)
		ReallyForceSpellRES("balth06",LastSeenBy(Myself)) // 매직 미사일
END

IF
	Global("Lunar","LOCALS",1)
	!See(NearestEnemyOfType([0.0.0.DRUID_ALL]))
	!See(NearestEnemyOfType([0.0.0.CLERIC_ALL]))
	!See(NearestEnemyOfType([0.0.0.BARD_ALL]))
	!See(NearestEnemyOfType([0.0.0.LONG_BOW]))
	!See(NearestEnemyOfType)
	See(SixthNearestEnemyOf(Myself))
THEN
	RESPONSE #100
		SetGlobal("Lunar","LOCALS",2)
		ReallyForceSpellRES("balth06",LastSeenBy(Myself)) // 매직 미사일
END

IF
	Global("Lunar","LOCALS",2)
	OR(4)
		See(NearestEnemyOfType([0.0.0.RANGER_ALL]))
		See(NearestEnemyOfType([0.0.0.PALADIN_ALL]))
		See(NearestEnemyOfType)
		See(NearestEnemyOfType([0.0.0.FIGHTER_ALL]))
THEN
	RESPONSE #100
		SetGlobal("Lunar","LOCALS",0)
		ReallyForceSpell(LastSeenBy(Myself),WIZARD_BIGBYS_CLENCHED_FIST)
		ReallyForceSpellRES("balth07",LastSeenBy(Myself)) // 상급 저주
END

IF
	Global("Lunar","LOCALS",2)
	!See(NearestEnemyOfType([0.0.0.RANGER_ALL]))
	!See(NearestEnemyOfType([0.0.0.PALADIN_ALL]))
	!See(NearestEnemyOfType)
	!See(NearestEnemyOfType([0.0.0.FIGHTER_ALL]))
	See(NearestEnemyOf(Myself))
THEN
	RESPONSE #100
		SetGlobal("Lunar","LOCALS",0)
		ReallyForceSpell(LastSeenBy(Myself),WIZARD_BIGBYS_CLENCHED_FIST)
		ReallyForceSpellRES("balth07",LastSeenBy(Myself)) // 상급 저주
END

IF
	HPPercentLT(Myself,20)
	Global("SecondWind","LOCALS",0)
THEN
	RESPONSE #100
		SetGlobal("SecondWind","LOCALS",1)
		DisplayStringHead(Myself,73944) // 두번째 바람!
		ApplySpell(Myself,CLERIC_HEAL)
END

IF
	HPPercentLT(Myself,50)
        !GlobalTimerNotExpired("HEAL_1","LOCALS")
        GlobalLT("HEAL1_INCRE","LOCALS",5)
THEN
	RESPONSE #100
                IncrementGlobal("HEAL1_INCRE","LOCALS",1)
                SetGlobalTimer("HEAL_1","LOCALS",6)
		DisplayStringHead(Myself,46150)
		CreateItem("POTN55",1,0,0)
		UseItem("POTN55",Myself)
END

IF
	HaveSpell(MONK_LAY_ON_HANDS)
	!GlobalTimerNotExpired("LayOnHands","LOCALS")
THEN
	RESPONSE #100
		SetGlobalTimer("LayOnHands","LOCALS",12)
		Spell(Myself,MONK_LAY_ON_HANDS)
END

IF
	RandomNum(2,1)
	!GlobalTimerNotExpired("ChangeStance","LOCALS")
	Range(LastSeenBy(Myself),20)
	Global("Lunar","LOCALS",0)
THEN
	RESPONSE #100
		SetGlobalTimer("ChangeStance","LOCALS",8)
		DisplayStringHead(Myself,72908) // 루나 스탠스!
		ReallyForceSpellRES("balth02",Myself) // 루나 스탠스!
END

IF
	RandomNum(3,1)
	HPPercentLT(Myself,75)
	Range(LastSeenBy(Myself),10)
	Global("Lunar","LOCALS",0)
	!StateCheck(Myself,STATE_INVISIBLE)
	!GlobalTimerNotExpired("ShadowStance","LOCALS")
THEN
	RESPONSE #100
		SetGlobalTimer("ShadowStance","LOCALS",30)
		DisplayStringHead(Myself,73943) // 섀도우 스탠스!
		ReallyForceSpellRES("balth10",Myself) // 섀도우 스탠스!
END

IF
	!GlobalTimerNotExpired("MonkTimer","LOCALS")
	Range(LastSeenBy(Myself),4)
	RandomNum(3,1)
	Global("Lunar","LOCALS",0)
THEN
	RESPONSE #100
		SetGlobalTimer("MonkTimer","LOCALS",3)
		DisplayStringHead(Myself,73942) // 섀도우리스 킥!
		FaceObject(LastSeenBy(Myself))
		SwingOnce()
		PlaySound("BALTHA02")
		ReallyForceSpellRES("balth09",LastSeenBy(Myself)) // 섀도우리스 킥!
END

IF
	!GlobalTimerNotExpired("MonkTimer","LOCALS")
	Range(LastSeenBy(Myself),10)
	RandomNum(2,1)
	Global("Lunar","LOCALS",0)
THEN
	RESPONSE #100
		SetGlobalTimer("MonkTimer","LOCALS",12)
		DisplayStringHead(Myself,72915) // 드래곤 주먹
		ForceSpellRES("balth03",Myself) // 드래곤 주먹
		Continue()
END

IF
	!GlobalTimerNotExpired("MonkTimer","LOCALS")
	Range(LastSeenBy(Myself),10)
	RandomNum(2,2)
	Global("Lunar","LOCALS",0)
THEN
	RESPONSE #100
		SetGlobalTimer("MonkTimer","LOCALS",12)
		DisplayStringHead(Myself,72916) // 타이거 스트라이크
		ForceSpellRES("balth04",Myself) // 타이거 스트라이크
		Continue()
END

IF
	!GlobalTimerNotExpired("MonkTimer","LOCALS")
	Range(LastSeenBy(Myself),5)
	RandomNum(2,1)
	Global("Lunar","LOCALS",0)
THEN
	RESPONSE #100
		SetGlobalTimer("MonkTimer","LOCALS",6)
		DisplayStringHead(Myself,71989) // 살인의 손
		ForceSpellRES("balth05",Myself) // 살인의 손
		Continue()
END

IF
	!GlobalTimerNotExpired("MonkTimer","LOCALS")
	HaveSpell(MONK_QUIVERING_PALM)
	RandomNum(2,2)
	Global("Lunar","LOCALS",0)
THEN
	RESPONSE #100
		SetGlobalTimer("MonkTimer","LOCALS",5)
		DisplayStringHead(Myself,72936) // 히요-오-차!
		ForceSpell(Myself,MONK_QUIVERING_PALM)
		Continue()
END

IF
	!GlobalTimerNotExpired("MonkTimer","LOCALS")
	HaveSpell(MONK_STUNNING_BLOW)
	RandomNum(2,1)
	Global("Lunar","LOCALS",0)
THEN
	RESPONSE #100
		SetGlobalTimer("MonkTimer","LOCALS",9)
		DisplayStringHead(Myself,72937) // 캬이-야!
		ForceSpell(Myself,MONK_STUNNING_BLOW)
		Continue()
END

IF
	!HPPercentLT(Myself,20)
	Global("Lunar","LOCALS",0)
THEN
	RESPONSE #100
		AttackReevaluate(LastSeenBy(Myself),15)
END

IF
	HPPercentLT(Myself,20)
	Global("Lunar","LOCALS",0)
THEN
	RESPONSE #100
		RunAwayFrom(NearestEnemyOf(Myself),45)
END

IF
	Heard([ANYONE],150)
        InMyGroup(LastHeardBy(Myself))
	Allegiance(Myself,NEUTRAL)
THEN
	RESPONSE #100
                Shout(150)
                Enemy()
END

IF
        AttackedBy([GOODCUTOFF],DEFAULT)
	Allegiance(Myself,NEUTRAL)
THEN
	RESPONSE #100
                Shout(150)
                Enemy()
END