# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# ### BattleMobile (battlemobile.grp)
.headerstart
IsId          	###
Type          	13
Init          	BattleMobileInit
Death         	BattleMobileDeath
GndAttkInit   	BattleMobileGndAttkInit
AirAttkInit   	BattleMobileAirAttkInit
Unused1       	BattleMobileUnused1
GndAttkRpt    	BattleMobileGndAttkRpt
AirAttkRpt    	BattleMobileAirAttkRpt
CastSpell     	[NONE]
GndAttkToIdle 	BattleMobileGndAttkToIdle
AirAttkToIdle 	BattleMobileAirAttkToIdle
Unused2       	[NONE]
Walking       	BattleMobileWalking
WalkingToIdle 	BattleMobileWalkingToIdle
SpecialState1 	[NONE]
.headerend
# ----------------------------------------------------------------------------- #

BattleMobileInit:
	imgul             	### 0 0	# Battle Mobile Shadow (battlemobile-shad.grp)
BattleMobileWalkingToIdle:
	playfram          	0x00
BattleMobileLocal00:
	wait				1
	waitrand          	62 74 
	randcondjmp       	25 BattleMobileLocal01
	goto              	BattleMobileLocal00

BattleMobileLocal01:
	playfram          	0x00
	wait              	1 
	playfram          	0xaa
	randcondjmp       	192 BattleMobileLocal03
	turnccwise        	2 
	wait              	3 
	turnccwise        	2 
	wait              	3 
	turnccwise        	2 
	wait              	3 
	turnccwise        	2 
	wait              	3 
	turnccwise        	2 
	wait              	3 
	wait              	6 
	turncwise         	2 
	wait              	3 
	turncwise         	2 
	wait              	3 
	turncwise         	2 
	wait              	3 
	turncwise         	2 
	wait              	3 
	turncwise         	2 
	wait              	3 
	wait              	6 
	turnccwise        	2 
	wait              	3 
	turnccwise        	2 
	wait              	3 
	turnccwise        	2 
	wait              	3 
	goto              	BattleMobileLocal04

BattleMobileLocal04:
	playfram          	0x00
	wait              	1 
	goto              	BattleMobileWalkingToIdle

BattleMobileLocal03:
	wait              	13 
	playfram          	0x00
	wait              	1 
	goto              	BattleMobileWalkingToIdle

BattleMobileDeath:
	playsndbtwn       	276 277	# Terran\MARINE\TMaDth00.WAV | Terran\MARINE\TMaDth01.WAV
	setfldirect       	0 
	playfram          	0x00	# Frame set 13
	imgol             	3 0 0	# Scourge Death (zerg\zavDeath.grp)
	wait              	2 
	lowsprul          	236 0 0	# Marine Remnants (terran\tmaDeath.grp)
	wait              	1 
	end

BattleMobileGndAttkInit:
	playfram          	0xaa	# Frame set 12
	wait				1
BattleMobileGndAttkRpt:
	nobrkcodestart
	playsnd           	69	# Bullet\TMaFir00.wav
	attack
	playfram          	0x99
	wait              	1 
	playfram          	0xaa
	wait				1
	playfram          	0x99
	wait              	1 
	playfram          	0xaa
	wait				1
	nobrkcodeend
	gotorepeatattk
	ignorerest
BattleMobileGndAttkToIdle:
	playfram          	0xaa	# Frame set 12
	wait              	1 
	goto              	BattleMobileWalkingToIdle

BattleMobileAirAttkInit:
	playfram          	0x99	# Frame set 12
BattleMobileAirAttkRpt:
	wait              	1 
	nobrkcodestart
	playsnd           	69	# Bullet\TMaFir00.wav
	attack
	playfram          	0xaa
	wait              	1 
	playfram          	0xbb
	wait				1
	nobrkcodeend
	gotorepeatattk
	ignorerest
BattleMobileAirAttkToIdle:
	playfram          	0xcc	# Frame set 12
	wait              	1 
	goto              	BattleMobileWalkingToIdle

BattleMobileWalking:
	move              	4 
	wait              	1 
	playfram          	0x11	# Frame set 4
	move              	4 
	wait              	1 
	playfram          	0x22	# Frame set 5
	move              	4 
	wait              	1 
	playfram          	0x33	# Frame set 6
	move              	4 
	wait              	1 
	playfram          	0x44	# Frame set 7
	move              	4 
	wait              	1 
	playfram          	0x55	# Frame set 8
	move              	4 
	wait              	1 
	playfram          	0x66	# Frame set 9
	move              	4 
	wait              	1 
	playfram          	0x77	# Frame set 10
	move              	4 
	wait              	1 
	playfram          	0x88	# Frame set 11
	goto              	BattleMobileWalking