[EVENTS e_doom_lesser_boss]
ON=@Death
LOCAL.NEW=<NEW>
LIST.DoomReward.ADD=0
IF (<ATTACKER>)
	FOR 0 <EVAL <ATTACKER>-1>
		IF (<ATTACKER.<dLOCAL._FOR>.DAM>)
		REF2=<ATTACKER.<dLOCAL._FOR>>
			IF (<REF2.FLAGS>&STATF_PET)
			REF2=<REF2.OWNER>
			ENDIF
			IF (<LIST.DoomReward.FINDELEM <REF2>> == -1) && (<REF2.ISPLAYER>)
			LIST.DoomReward.ADD=<REF2>
			LOCAL.POINTS=<REF2.dTAG0.DoomPoints>
			FLOAT.FAME=<FLOATVAL (30000*(1+((SQRT(<REF2.LUCK>))/100)>
			LOCAL.POINTS=<EVAL <LOCAL.POINTS>+(<FEVAL <FLOAT.FAME>>)>
			REF2.TAG.DoomPoints=<dLOCAL.POINTS>
			ENDIF
		ENDIF
	ENDFOR
	IF (<dLIST.DoomReward.COUNT> > 1)
	LIST.DoomReward.0.REMOVE
		WHILE (<dLIST.DoomReward.COUNT>) && (!(<LOCAL.Break>))
		LOCAL.ListIndex=<R<LIST.DoomReward.COUNT>>
		REF2=<LIST.DoomReward.<dLOCAL.ListIndex>>
		LIST.DoomReward.<dLOCAL.ListIndex>.REMOVE
		FLOAT.CONSTA=0.000863
		FLOAT.CONSTB=0.000004
		FLOAT.CHANCE=<FLOATVAL (<FLOAT.CONSTA>*(10@(<FLOAT.CONSTB>*<REF2.dTAG0.DoomPoints>)))>
			IF (<FLOAT.CHANCE> > <RANDOMDOUBLE 2>)
			SERV.NEWITEM <HVAL <DEF.DOOMGAUNTLET_ARTIFACTS>>
			REF2.BOUNCE <NEW>
			REF2.SYSMESSAGELOC -1,1062317
			REF2.TAG.DOOMPOINTS=
			LOCAL.Break=1
			ENDIF
		ENDWHILE
	ENDIF
ENDIF
LIST.DoomReward.CLEAR
NEW=<LOCAL.NEW>
IF (<FLOATVAL 0.0005> > <RANDOMDOUBLE>)
NEWLOOT=<HVAL <DEF.MINORARTIS>>
ENDIF
IF (<FLOATVAL 0.0005> > <RANDOMDOUBLE>)
NEWLOOT=<HVAL <DEF.RANDOM_ML_SETS_DROP_LIST>>
ENDIF
FOR 2
RANDMAGICITEMGREAT
ENDFOR
FOR 2
RANDMAGICITEM
ENDFOR
newloot=i_osi_treasure_map

REF1=<TAG.DOOMFLOOR> //Doom Floor that originated this lesser boss
TRY VAR0.LESSERBOSS.<BASEID>=<EVAL <VAR0.LESSERBOSS.<BASEID>>-1>

IF (<VAR0.LESSERBOSS.<BASEID>> <= 0)
TRY VAR.LESSERBOSS.<BASEID>=-1
REF2=<REF1.TAG0.NEXTDOOMFLOOR> //the next floor
	IF (<REF2>)
	TRY VAR.LESSERBOSS.<REF2.TAG0.LESSERBOSS>=0
	REF5=<REF2.TAG0.DOOR1>
	REF6=<REF2.TAG0.DOOR2>
	REF5.COLOR=0676
	REF6.COLOR=0676
	ENDIF
	FOR <REF1.TAG0.TOTALPLAYERS>
	TRY REF1.TAG.PLAYER.<dLOCAL._FOR>=
	ENDFOR
REF1.TAG.TOTALPLAYERS=
REF1.TAG.3PLAYERTIER=
REF3=<REF1.TAG0.DOOR1>
REF4=<REF1.TAG0.DOOR2>
REF3.COLOR=0455
REF4.COLOR=0455
REF3.TYPE=T_DOOR
REF4.TYPE=T_DOOR

SERV.NEWITEM=i_multi_pentagram
NEW.ATTR=<DEF.ATTR_MOVE_NEVER>
NEW.P=<REF1.TAG0.PENTAGRAMP>
NEW.MULTICREATE
REF1.TAG.PENTAGRAM.UID=<NEW>
NEW=<LOCAL.NEW>

ENDIF

IF (<REF1.TAG0.DARKFATHERSUMMONER>) && (<VAR0.LESSERBOSS.<BASEID>> <= 0)
LOCAL.DARKFATHERS=<EVAL <REF1.F_CHECKGAUNTLETPLAYERS>/3>
	IF (<LOCAL.DARKFATHERS> > 7)
	LOCAL.DARKFATHERS=7
	ENDIF
	IF (<LOCAL.DARKFATHERS> < 1)
	LOCAL.DARKFATHERS=1
	ENDIF
	FOR <LOCAL.DARKFATHERS>
	SERV.NEWNPC C_DARK_FATHER
	VAR0.DARKFATHER ++
		DORAND 5
		NEW.P=419,430,-1,3
		NEW.P=422,426,-1,3
		NEW.P=426,428,-1,3
		NEW.P=426,434,-1,3
		NEW.P=421,434,-1,3
		ENDDO
	NEW.UPDATEX
	ENDFOR
ENDIF

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

[CHARDEF 313]
DEFNAME=c_Darknight_Creeper
NAME=Darknight Creeper
ARMOR=65
DAM=22,26
CAN=MT_WALK|MT_USEHANDS
CATEGORY=Addon
SUBSECTION=Doom
DESCRIPTION=Darknight Creeper
TAG.IAMACHAMPION=1

ON=@Create
NPC=BRAIN_MONSTER
//TAG.override.regenval_1=3 //20
STR={301 330}
DEX={101 110}
INT={301 330}
MAXHITS=4500
WRESTLING=90.0
MAGICRESISTANCE=90.0
TACTICS=100.0
MAGERY={112.0 120.0}
EVALUATINGINTEL={118.0 120.0}
MEDITATION=150.0
FAME=10000
KARMA=-10000
DORAND 20
NAME=Pariah
NAME=Ydoc Llessue
NAME=Zhaan
NAME=Lorbna
NAME=Gragok
NAME=Thranger
NAME=Krygar
NAME=Grothelfiend
NAME=Centibis
NAME=Farthak
NAME=Laitesach
NAME=Crenabil
NAME=Krullus
NAME=Legron
NAME=Noirkrach
NAME=Blassarrabb
NAME=Gragragron
NAME=Vendodroth
NAME=Flaggroth
NAME=Vilithrar
ENDDO

ON=@Hit
IF (<FLOATVAL 0.2> > <RANDOMDOUBLE>)
SRC.SPELLEFFECT S_POISON,100.0,<UID>
ENDIF

[CHARDEF 315]
DEFNAME=c_flesh_renderer
NAME=Flesh Renderer
ARMOR=75
DAM=16,20
CAN=MT_WALK
CATEGORY=Addon
SUBSECTION=Doom
DESCRIPTION=Flesh Renderer
MOVERATE=25
TAG.IAMACHAMPION=1

ON=@Create
NPC=BRAIN_MONSTER
//TAG.override.regenval_1=3 //20
STR={401 460}
DEX={201 210}
INT={221 260}
MAXHITS=5000
WRESTLING={90.0 100.0}
TACTICS=100.0
MAGICRESISTANCE={155.0 160.0}
FAME=10000
KARMA=-10000

ON=@Hit
IF (<SRC.FLAGS>&statf_onhorse)
SRC.DCLICK <SRC>
ENDIF

[CHARDEF 306]
DEFNAME=c_impaler
NAME=Impaler
CAN=MT_WALK
ARMOR=75
DAM=31,35
CATEGORY=Addon
SUBSECTION=Doom
DESCRIPTION=Impaler
TAG.IAMACHAMPION=1
MOVERATE=70

ON=@Create
NPC=BRAIN_MONSTER
STR=390
DEX=200
INT=190
MAXHITS=5500
WRESTLING=80.0
TACTICS=100.0
MAGICRESISTANCE=100.0
FAME=10000
KARMA=-10000
DORAND 20
NAME=Po-Kor
NAME=Manglar
NAME=Verolyn
NAME=Gathfe
NAME=Skred
NAME=Flandrith
NAME=Stavinfeks
NAME=Steelbane
NAME=Crarigor
NAME=Empalk
NAME=Perfus
NAME=Cassiel
NAME=Magor
NAME=Xtul
NAME=Vladeer
NAME=Scrill
NAME=Slix
NAME=Ix
NAME=Selminus
NAME=Victux
ENDDO

ON=@Hit
IF !(<SRC.FINDID.i_bleeding_timer>)
LOCAL.OLDNEW=<NEW>
SERV.NEWITEM i_bleeding_timer
NEW.LINK=<UID>
NEW.CONT=<SRC>
NEW.MORE1=5
NEW.TIMER=2
NEW=<LOCAL.OLDNEW>
ENDIF
IF (!(<SRC.TAG0.MORTALWOUNDED>)) && (20 > <R100>)
SRC.TAG.MORTALWOUNDED=1
SRC.TIMERF 6,REMOVEMORTALWOUND
ENDIF
IF (<FLOATVAL 0.1> > <RANDOMDOUBLE>)
SRC.SPELLEFFECT S_POISON,120.0,<UID>
ENDIF

[NAMES NAMES_SHADOW_KNIGHT]
20
Oghmus
Arametheus
Terxor
Erdok
Archatrix
Jonar
Marth'Fador
Helzigar
Tyrnak
Krakus
Marcus Fel
Lord Kaos
Doomor
Uhn
Malashim
Samael
Nelokhiel
Montobulus
Usuhl
Zul

[CHARDEF 311]
DEFNAME=c_shadow_knight
NAME=#NAMES_SHADOW_KNIGHT the Shadow Knight
ARMOR=68
CAN=MT_WALK
DAM=20,30
CATEGORY=Addon
SUBSECTION=Doom
DESCRIPTION=Shadow Knight
TAG.IAMACHAMPION=1
MOVERATE=70

ON=@Create
NPC=BRAIN_MONSTER
//TAG.override.regenval_1=3 //20
STR=250
DEX=100
INT=100
MAXHITS=6300
WRESTLING=120.0
TACTICS=100.0
MAGICRESISTANCE=120.0
HIDING=1250
STEALTH=1250
MAGERY=110.0
EVALUATINGINTEL=100.0
FAME=10000
KARMA=-10000

[CHARDEF c_true_abyssmal_horror]
ID=c_abyssmal_horror
DEFNAME=c_true_abyssmal_horror
NAME=Abyssmal Horror
ARMOR=55
CAN=MT_WALK|MT_USEHANDS
DAM=13,17
CATEGORY=Addon
SUBSECTION=Doom
DESCRIPTION=Abyssmal Horror
TAG.IAMACHAMPION=1

ON=@Create
NPC=BRAIN_MONSTER
//TAG.override.regenval_1=3 //20
STR={401 421}
DEX={81 90}
INT={1401 1420}
MAXHITS=6500
WRESTLING=88.0
TACTICS=100.0
MAGICRESISTANCE=120.0
MAGERY=120.0
EVALUATINGINTEL=200.0
FAME=10000
KARMA=-10000

[NAMES NAMES_DARK_FATHER]
19
Ankou
Arhaios Ophis
Armarus
Arsat
Azazel
Ga'ahp
Grigorus
Hrallath
Heksen
Karnax
Keelus
Kra'an
Peinsluth
Peirazo
Ponerus
Taet Nu'uhn
Therion
Turi'el
Vairocan

[chardef 318]
DEFNAME=C_dark_father
NAME=#NAMES_DARK_FATHER the Dark Father
CAN=MT_WALK
DAM=17,21
ARMOR=30
CATEGORY=Addon
SUBSECTION=Doom
DESCRIPTION=Dark Father
BLOODCOLOR=0ad
MOVERATE=30
TAG.IAMACHAMPION=1
TEVENTS=e_npc_necromancer_paladin

ON=@Create
NPC=brain_monster
//TAG.override.regenval_1=3 //25
FAME=10000
KARMA=-10000
STR=590
MAXHITS=32500
DEX=400
INT=1000
MAXMANA=5000
TACTICS=100.0
WRESTLING=120.0
EVALUATINGINTEL=100.0
MAGERY=100.0
MagicResistance=150.0
NECROMANCY=100.0
SPIRITSPEAK=110.0

ON=@Hit
IF (<FLOATVAL 0.25> > <RANDOMDOUBLE>)
	IF (<SRC> != <UID>)
	SRC.DAMAGE <ARGN1> <ARGN2> <UID>
	ENDIF
ENDIF

ON=@Death
LOCAL.NEW=<NEW>
LIST.DoomReward.ADD=0
IF (<ATTACKER>)
	FOR 0 <EVAL <ATTACKER>-1>
		IF (<ATTACKER.<dLOCAL._FOR>.DAM>)
		REF2=<ATTACKER.<dLOCAL._FOR>>
			IF (<REF2.FLAGS>&STATF_PET)
			REF2=<REF2.OWNER>
			ENDIF
			IF (<LIST.DoomReward.FINDELEM <REF2>> == -1) && (<REF2.ISPLAYER>)
			LIST.DoomReward.ADD=<REF2>
			LOCAL.POINTS=<REF2.dTAG0.DoomPoints>
			FLOAT.FAME=<FLOATVAL (30000*(1+((SQRT(<REF2.LUCK>))/100)>
			LOCAL.POINTS=<EVAL <LOCAL.POINTS>+(<FEVAL <FLOAT.FAME>>)>
			REF2.TAG.DoomPoints=<dLOCAL.POINTS>
			ENDIF
		ENDIF
	ENDFOR
	IF (<dLIST.DoomReward.COUNT> > 1)
	LIST.DoomReward.0.REMOVE
		WHILE (<dLIST.DoomReward.COUNT>) && (!(<LOCAL.Break>))
		LOCAL.ListIndex=<R<LIST.DoomReward.COUNT>>
		REF2=<LIST.DoomReward.<dLOCAL.ListIndex>>
		LIST.DoomReward.<dLOCAL.ListIndex>.REMOVE
		FLOAT.CONSTA=0.000863
		FLOAT.CONSTB=0.000004
		FLOAT.CHANCE=<FLOATVAL (<FLOAT.CONSTA>*(10@(<FLOAT.CONSTB>*<REF2.dTAG0.DoomPoints>)))>
			IF (<FLOAT.CHANCE> > <RANDOMDOUBLE>)
			SERV.NEWITEM <HVAL <DEF.DOOMGAUNTLET_ARTIFACTS>>
			REF2.BOUNCE <NEW>
			REF2.SYSMESSAGELOC -1,1062317
			REF2.TAG.DOOMPOINTS=
			LOCAL.Break=1
			ENDIF
		ENDWHILE
	ENDIF
ENDIF
LIST.DoomReward.CLEAR
IF (<FLOATVAL 0.0025> > <RANDOMDOUBLE>)
NEWLOOT=<HVAL <DEF.RANDOM_ML_SETS_DROP_LIST>>
ENDIF
IF (<FLOATVAL 0.005> > <RANDOMDOUBLE>)
NEWLOOT=<HVAL <DEF.MINORARTIS>>
ENDIF
VAR0.DARKFATHER --
IF (<VAR0.DARKFATHER> <= 0)
VAR.DARKFATHER=
F_RESETDOOMGAUNTLET
ENDIF
FOR 10
	DORAND 2
	RANDMAGICITEMGREAT
	RANDMAGICITEM
	ENDDO
ENDFOR
FOR 3
serv.newitem=i_osi_treasure_map,1,<UID>
new.tag.level=<r4,5>
	IF (<FLOATVAL 0.1> > <RANDOMDOUBLE>)
	NEW.TAG0.LEVEL ++
	ENDIF
ENDFOR
SERV.B @0ad A Dark Father has been slain!
NEW=<LOCAL.NEW>

ON=@GetHit
IF !(<SRC.ISPLAYER>)
	IF !(<SRC.FLAGS>&statf_pet)
	RETURN 1
	ENDIF
ENDIF
IF (<FLOATVAL 0.05> > <RANDOMDOUBLE>)
LOCAL.OLDNEW=<NEW>
SERV.NEWITEM i_unholy_bone
NEW.LINK=<UID>
NEW.P=<SRC.P>
NEW.TIMER=8
NEW=<LOCAL.OLDNEW>
ENDIF

[EOF]