; Made by Silver for RoT
;
; this file used to be named xmazemonsters. It's related to the fights in hell's kitchen.

	TAKE T603
	TAKE T604

	LOCK 1
	IF C28, @fightslayerxmazenu
	IF C31, @fightslayerxmazenu
	IF C40, @fightslayerxmazenu

	EJECT -C31
	EJECT -C40

	IF R35, @fightvampxmazenu

@fightghoulxmazenu

@setghoul1
	SET gfightxmaze1, "1629"
	ADD gfightxmaze1, "%R20"
@setghoul2
	SET gfightxmaze2, "1629"
	ADD gfightxmaze2, "%R20"
@setghoul3
	SET gfightxmaze3, "1629"
	ADD gfightxmaze3, "%R20"

	COMPARE #<gfightxmaze1>, #<gfightxmaze2>
	IF= @setghoul2

	COMPARE #<gfightxmaze1>, #<gfightxmaze3>
	IF= @setghoul3

	COMPARE #<gfightxmaze2>, #<gfightxmaze3>
	IF= @setghoul3



	SET fightxmazechance, "%R10"
	COMPARE #<fightxmazechance>, "7"
	IF< @fightghoulxmazenu1
	COMPARE #<fightxmazechance>, "10"
	IF< @fightghoulxmazenu2
	GOTO @fightghoulxmazenu3

@fightghoulxmazenu1
	FIGHT2 #<gfightxmaze1> 
	GOTO @finalend
@fightghoulxmazenu2
	FIGHT2 #<gfightxmaze1>, #<gfightxmaze2>
	GOTO @finalend
@fightghoulxmazenu3
	FIGHT2 #<gfightxmaze1>, #<gfightxmaze2>, #<gfightxmaze3>
	GOTO @finalend


@fightvampxmazenu

	IF E2156+R75, @fightghoulxmazenu

	SET vfightx, "0"

@setvamp1
	SET vfightxmaze1, "1601"
	ADD vfightxmaze1, "%R13"
@setvamp2
	SET vfightxmaze2, "1601"
	ADD vfightxmaze2, "%R13"

	COMPARE #<vfightxmaze1>, #<vfightxmaze2>
	IF= @setvamp2

	IF R30, @fightvampxmazenu2a

@fightvampxmazenu1a
	COMPARE #<vfightx>, "1"
	IF> @fightvampxmazenu1b
	IF -E2144, @skipsetstakeset1a
	HOST_GIVE T603
@skipsetstakeset1a
	FIGHT2 #<vfightxmaze1>
	IF -E2144, @skipsetstakeset2a
	HOST_GIVE T604
@skipsetstakeset2a
	IF T603+T604, @finalend
	HOST_TAKE T603
	HOST_TAKE T604
	ADD vfightx, "1"
	IF DEAD, @finalend
	GOTO @fightvampxmazenu1a

@fightvampxmazenu1b
	ADD vfightxmaze1, "14"
	FIGHT2 #<vfightxmaze1>
	GOTO @finalend


@fightvampxmazenu2a
	COMPARE #<vfightx>, "1"
	IF> @fightvampxmazenu2b
	IF -E2144, @skipsetstakeset1b
	HOST_GIVE T603
@skipsetstakeset1b
	FIGHT2 #<vfightxmaze1>, #<vfightxmaze2>
	IF -E2144, @skipsetstakeset2b
	HOST_GIVE T604
@skipsetstakeset2b
	IF T603+T604, @finalend
	HOST_TAKE T603
	HOST_TAKE T604
	ADD vfightx, "1"
	IF DEAD, @finalend
	GOTO @fightvampxmazenu2a

@fightvampxmazenu2b
	ADD vfightxmaze1, "14"
	ADD vfightxmaze2, "14"
	FIGHT2 #<vfightxmaze1>, #<vfightxmaze2>
	GOTO @finalend


@fightslayerxmazenu

	EJECT T428

@setslayer1
	SET sfightxmaze1, "1649"
	ADD sfightxmaze1, "%R10"
@setslayer2
	SET sfightxmaze2, "1649"
	ADD sfightxmaze2, "%R10"
@setslayer3
	SET sfightxmaze3, "1649"
	ADD sfightxmaze3, "%R10"

	COMPARE #<sfightxmaze1>, #<sfightxmaze2>
	IF= @setslayer2

	COMPARE #<sfightxmaze1>, #<sfightxmaze3>
	IF= @setslayer3

	COMPARE #<sfightxmaze2>, #<sfightxmaze3>
	IF= @setslayer3


	SET fightxmazechance, "%R10"
	COMPARE #<fightxmazechance>, "7"
	IF< @fightslayerxmazenu1
	COMPARE #<fightxmazechance>, "10"
	IF< @fightslayerxmazenu2
	GOTO @fightslayerxmazenu3

@fightslayerxmazenu1
	FIGHT2 #<sfightxmaze1> 
	GOTO @finalend
@fightslayerxmazenu2
	FIGHT2 #<sfightxmaze1>, #<sfightxmaze2>
	GOTO @finalend
@fightslayerxmazenu3
	FIGHT2 #<sfightxmaze1>, #<sfightxmaze2>, #<sfightxmaze3>
	GOTO @finalend

; Comment: Mazes... gotta love them!