Story
	name <MILITARY: X Invades FedTer>

	% element1 will be the FedTer military faction.
	element2 <Faction Military !Enemy 1>
	element3 <Scene Target !Enemy 2>

	% V1 = Initialization counter
	% V2 = Original faction of E2 (the town being invaded)
	% V5 = PC involvement;
	%     if > 0 missions for N1, if < 0 missions for N2
	% V6 = News Randomizer
	% V7 = End of story timer
	%     if V7 <> 0, story is over.

	% V101 = E1 Victories Count
	% V102 = E2 Victories Count


	rumor <!3 is being invaded by !2 forces.>

	start <ifG V7 0 else GoInitialize ifG ComTime V7 EndStory>
	GoInitialize <if= V1 0 else GoCheckFTWin V= 1 1 V= 2 SceneFaction N3>
	GoCheckFTWin <ifFaction N1 else GoFTLoss ifG V101 15 else GoCheckFTLoss Goto GoFTWin>
	GoCheckFTLoss <ifFaction N2 else GoFTWin ifG V102 10 else GoCheckDraw Goto GoFTLoss>
	% If the scene has changed faction by some means other than this
	% story, the story concludes in a draw. No winners, no losers.
	GoCheckDraw <if# SceneFaction N3 V2 EndStory>

	GoFTLoss <SetSceneFaction N3 N2 Trigger FacWin N2 Trigger FacLose N1 V= 6 450 V+ 6 d5 News V5 Goto GoSetTimer>
	GoFTWin <Trigger FacWin N1 Trigger FacLose N2 V= 6 400 V+ 6 d5 News V5 Goto GoSetTimer>
	GoSetTimer <PurgeStory V= 7 ComTime V+ 7 86400>

	% Every hour, update the news.
	Hour <if= V7 0 ifG V102 V101 else GoNewsNotWinning ifG V102 7 else GoNewsMinorWin  V= 6 200 V+ 6 d5  News V6>
	GoNewsMinorWin <ifG V102 d7 else GoNewsNothing  V= 6 250 V+ 6 d5  News V6>
	GoNewsNotWinning <ifG V101 V102 else GoNewsNothing ifG V101 d15 else GoNewsMinorLoss  ifG 7 V102 else GoNewsMinorLoss  V= 6 300 V+ 6 d5  News V6>
	GoNewsMinorLoss <ifG V101 d5 else GoNewsNothing  V= 6 350 V+ 6 d5  News V6>
	GoNewsNothing <V= 6 100 V+ 6 d5  News V6>

	% Every half-hour, load a plot.
	HalfHour <if= V7 0 StoryLine .invstory>
	.invstory <TS_MIL_PLOT_Inv_*.txt>

	% Every quarter, add one randomly to either V101 or V102
	quarter <if= V7 0 if= d2 1 else GoCheckAddV102 V+ 101 1>
	GoCheckAddV102 <V+ 102 1>

	% GENERAL WAR NEWS
	Msg101 <War rages on in \SCENE N3 . Mecha from \NARRATIVE 2 are moving into the city. The local militia has rallied to the defense.>
	Msg102 <\NARRATIVE 3 is under attack as \NARRATIVE 2 prepares for a complete takeover. More details as they become avaliable.>
	Msg103 <Skip vacation plans for \NARRATIVE 3 , since that town is currently being attacked by \NARRATIVE 2 .>
	Msg104 <Military leaders from \NARRATIVE 2 have declared \NARRATIVE 3 to be a primary objective. Several mecha conflicts have been reported in the area.>
	Msg105 <Frightened citizens leave \NARRATIVE 3 following an attack from \NARRATIVE 2 . Civil leaders say there is no cause for alarm.>

	% TEAM 2 IS CLOSE TO WINNING
	Msg201 <A victory for \NARRATIVE 2 seems definite in the recent \NARRATIVE 3 conflict.>
	Msg202 <\NARRATIVE 3 is expected to fall to \NARRATIVE 2 invaders soon.>
	Msg203 <\NARRATIVE 3 defenses have been all but exhausted; \NARRATIVE 2 stands ready to occupy the city.>
	Msg204 <The war in \NARRATIVE 3 may soon be drawing to a close, with \NARRATIVE 2 close to victory.>
	Msg205 <Mecha from \NARRATIVE 2 stand poised to occupy the \NARRATIVE 3 city center.>

	% TEAM 2 IS AHEAD, BUT NOT THAT MUCH
	Msg251 <War in \NARRATIVE 3 favors the \NARRATIVE 2 attackers.>
	Msg252 <Initial reports indicate that \NARRATIVE 2 has been successful in the first stages of the \NARRATIVE 3 attack.>
	Msg253 <Military analysts predict a victory for \NARRATIVE 2 in \NARRATIVE 3 .>
	Msg254 <Defenders of \NARRATIVE 3 face the superior firepower of \NARRATIVE 2 , but vow to never surrender.>
	Msg255 <The first stages of the \NARRATIVE 3 invasion have proceeded favorably for \NARRATIVE 2 .>

	% TEAM 2 IS ABOUT TO LOSE
	Msg301 <A loss for \NARRATIVE 2 seems definite in the recent conflict with \NARRATIVE 1 .>
	Msg302 <\NARRATIVE 3 to be saved from \NARRATIVE 2 by \NARRATIVE 1 .>
	Msg303 <Nearly all battle groups of \NARRATIVE 2 have been routed from the \NARRATIVE 3 theatre. This battle may soon be over.>
	Msg304 <\NARRATIVE 3 citizens breathe a sigh of relief as \NARRATIVE 2 war machine is forced away from the city.>
	Msg305 <\NARRATIVE 3 holds strong against \NARRATIVE 2 assault; \NARRATIVE 1 expects conflict to end soon.>

	% TEAM 2 IS BEHIND, BUT NOT THAT MUCH
	Msg351 <War in \NARRATIVE 3 favors the defenders against \NARRATIVE 2 .>
	Msg352 <The defenders of \NARRATIVE 3 have managed to hold off \NARRATIVE 2 so far, but a tough battle remains.>
	Msg353 <Though still early in the battle, military analysts predict a loss for \NARRATIVE 2 in \NARRATIVE 3 .>
	Msg354 <Mecha from \NARRATIVE 1 hold strong against \NARRATIVE 2 offensive.>
	Msg355 <The first stages of the \NARRATIVE 3 invasion have proceeded badly for \NARRATIVE 2 , thanks largely to \NARRATIVE 1 .>

	% TEAM 1 HAS LOST
	Msg401 <\NARRATIVE 3 has been captured by \NARRATIVE 2 forces.>
	Msg402 <\NARRATIVE 3 has fallen to \NARRATIVE 2 in the recent war.>
	Msg403 <Forces from \NARRATIVE 2 have succeeded in capturing \NARRATIVE 3 .>
	Msg404 <The war in \NARRATIVE 3 is over, and \NARRATIVE 2 reigns victorious.>
	Msg405 <Fighting over \NARRATIVE 3 has ended with a victory for \NARRATIVE 2 .>

	% TEAM 1 HAS WON
	Msg451 <Defenders of \NARRATIVE 3 have managed to fight off \NARRATIVE 2 .>
	Msg452 <\NARRATIVE 3 protected by \NARRATIVE 1 from \NARRATIVE 2 .>
	Msg453 <\NARRATIVE 3 breaks \NARRATIVE 2 offensive. Failed conquerors forced to retreat.>
	Msg454 <Fighting is over in \NARRATIVE 3 , as \NARRATIVE 1 defeats \NARRATIVE 2 .>
	Msg455 <The fight for \NARRATIVE 3 is over, with a victory for \NARRATIVE 1 over \NARRATIVE 2 .>

