%% Crime Corporate missions! Missions which may be taken by either crime
%% or corporate factions! It's like those crazy multicolored magic cards!

ArenaMission
	name <A Waltz For Three>
	requires <*MISSION (Crime|Corporate) -!Ne>
	desc <Mecha from %name1% and %name2% are fighting over salvage. Your job is to get it first.>
	%% Created by palefire
	%% Edited by Joe

	MapWidth 50
	MapHeight 50

	PayRate 400

	AsteroidMap
	terrain <GROUND>
	RockyTiles
	Vacuum
	SpaceBackdrop

	Element1 <Faction Military>
	Element2 <Faction Military !Enemy 1>

	% L1 = Initialization Counter
	% L2 = Victory Counter
	% L3 = Investigation Counter

	Start <if= L1 0 CommanderSays 1 L= 1 1>
	nu1 <if= T1 0 if= L2 0 L= 2 1 Alert 2 LoseArenaMission>
	nu2 <if= T2 0 if= T3 0 if= L2 0 L= 2 1 Return if= T4 0 else GoWinMission Goto GoDebrisLost>
	nu3 <if= T3 0 if= T2 0 if= L2 0 L= 2 1 Return if= T4 0 else GoWinMission Goto GoDebrisLost>

	GoWinMission <TeamNeutral 4 Salvage XPV 200 Alert 3 WinArenaMission>
	GoDebrisLost <Alert 4 WinArenaMission>

	Msg1 <They are fighting over a downed ship. Investigate and secure the area. Keep the ship intact if possible. Eliminate both parties.>
	Msg2 <The mission is a failure.>
	Msg3 <The mission is a success. Feel free to salvage anything, except the ship.>
	Msg4 <The derelict has been destroyed. Don't touch anything at the scene. We are dispatching professionals to collect the scattered debris.>

sub
	Team 1
	SetEnemy 2 3
	ParaX 5
	ParaY 5

	Team 2
	SetEnemy 1 3
	Deploy <SetSelfFaction M1 WMecha 2 ArenaRenown 800>
	ParaX 20
	ParaY 30

	Team 3
	setEnemy 1 2
	Deploy <SetSelfFaction M2 WMecha 3 ArenaRenown 800>
	ParaX 30
	ParaY 20

	Team 4
	setEnemy 1
	ParaX 25
	ParaY 25
end
inv
	CombatProp 30
	SetTeam 4
	name <Unidentified Debris>
	sdl_sprite <prop_derelict.png>
	roguechar <&>
	use <TeamNeutral 4 Print 5>
	msg5 <You disabled the crude trap someone set on the debris.>
	Scale 2
	sub
		Turret
		name <Hidden Turret>
		size 8
		armor 8
		sub
			MLauncher 15
			name <Proximity Missile Trap>
			sub
				stc dcm-15
				Magazine 10
			end

		end
	end

end
