Index: code/branches/campaignHS15/data/levels/Campaign1.oxw
===================================================================
--- code/branches/campaignHS15/data/levels/Campaign1.oxw	(revision 10783)
+++ code/branches/campaignHS15/data/levels/Campaign1.oxw	(revision 10792)
@@ -40,5 +40,6 @@
     <?lua
         waves = 3
-        enemies = 5
+        enemiesInit = 5
+        enemiesIncrease = 2
         allies = 3
 
@@ -241,4 +242,5 @@
     <!-- Actual recursive Event(s) for the respective waves. -->
     <?lua
+    enemies = enemiesInit
     for k = 1, waves, 1
     do
@@ -252,4 +254,5 @@
         </events>
     </EventMultiTrigger>
+    <?lua enemies = enemies + enemiesIncrease ?>
     <?lua end ?>
 
@@ -286,4 +289,29 @@
     </EventDispatcher>
 
+    <DistanceTrigger active=false name="reachedC" position="<?lua printC(cC) ?>" distance=1000 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true>
+        <events>
+            <activity>
+                <EventListener event="waveClear1" />
+            </activity>
+        </events>
+    </DistanceTrigger>
+
+    <!-- TODO: find out how to link an event to the COMPLETION of a dock. How is this not possible?? -->
+    <EventMultiTrigger name="dockedC" activations="1" stayactive="true" delay=3>
+        <events>
+            <trigger>
+                <EventListener event="dockC" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <EventMultiTrigger name="wave2" activations="1" delay=8>
+        <events>
+            <trigger>
+                <EventListener event="dockedC" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
     <!-- FIXME: This trigger needs fixing, as endMission can only be called by a Pawn Distance Trigger. Herpaderp.
     Also, the fix proposed in MissionOne does not work anymore... -->
@@ -362,4 +390,38 @@
     </QuestEffectBeacon>
 
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest4.1" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="reachedC" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest4.2" />
+            <CompleteQuest questId="quest4" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="dockedC" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest5" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="waveClear2" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
     <!--NOTIFICATIONS -->
 
@@ -444,13 +506,16 @@
     </SimpleNotification>
 
+    <!-- HACK: Somehow only fires a second time if the (notification,event) pairs are separate! WTF -->
+    <?lua
+    for k = 1, waves, 1 do
+    ?>
     <SimpleNotification broadcast="true" message="An enemy wave is approaching the shuttle!">
         <events>
             <trigger>
-                <EventListener event="wave1" />
-                <EventListener event="wave2" />
-                <EventListener event="wave3" />
-            </trigger>
-        </events>
-    </SimpleNotification>
+                <EventListener event="wave<?lua print(k) ?>" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+    <?lua end ?>
 
     <SimpleNotification broadcast="true" message="yippie ki yay motherf*cker!">
@@ -468,6 +533,48 @@
             <trigger>
                 <EventListener event="waveClear1" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="But it's not over yet! Get to Station C and dock!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=4 >
+                   <events>
+                      <trigger>
+                         <EventListener event="waveClear1" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="This is our powerful reinforced cannon suit.">
+        <events>
+            <trigger>
+                <EventListener event="dockedC" />
+            </trigger>
+        </events>
+    </SimpleNotification>   
+
+    <SimpleNotification broadcast="true" message="It should deal with those pesky invaders!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=4 >
+                   <events>
+                      <trigger>
+                         <EventListener event="dockedC" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Brilliant work, Commander! now undock again.">
+        <events>
+            <trigger>
                 <EventListener event="waveClear2" />
-                <EventListener event="waveClear3" />
             </trigger>
         </events>
@@ -584,9 +691,23 @@
                         <EventListener event="dockC" />
                     </execute>
-                    <undocking>
-                        <EventListener event="undockC" />
-                    </undocking>
+                    <active>
+                        <EventListener event="reachedC" />
+                    </active>
                 </events>
                 <attached>
+                    <!--HACK: We use another dock to undock back to the ship since undocking is not implemented... -->
+                    <Dock position="0,0,0" active=true>
+                        <effects>
+                            <DockToShip target="newSpaceShip" />
+                        </effects>
+                        <events>
+                            <execute>
+                                <EventListener event="undockC" />
+                            </execute>
+                            <active>
+                                <EventListener event="reachedC" />
+                            </active>
+                        </events>
+                    </Dock>
                     <DistanceTrigger position="0,0,0" distance="200" target="SpaceShip" beaconMode="exclude" targetname="NPC" name="dockC" />
                     <Billboard position="0,0,0" amplitude=1 material="Flares/lensflare" colour="1,0,0.05" />
@@ -747,4 +868,5 @@
     <!-- Enemies. Outer loop defines waves, inner loop defines enemies in every wave. -->
     <?lua
+    enemies = enemiesInit
     for k = 1, waves, 1
     do
@@ -753,6 +875,6 @@
     for i = 1, enemies, 1
     do
-    x = math.cos(math.pi/(enemies + 3)*(i+1))*1500
-    y = math.sin(math.pi/(enemies + 3)*(i+1))*1500
+    x = math.cos(math.pi/(2*enemies - 2)*(i+k))*1500
+    y = math.sin(math.pi/(2*enemies - 2)*(i+k))*1500
     ?>
     <SpaceShip visible=false active=false name="attackers<?lua print(k)?>" radarname="Attacker" position="<?lua print(y)?>,<?lua print(math.pow(-1,i)*250) ?>,<?lua print(x)?>" lookat="0,0,0" team=1>
@@ -785,5 +907,7 @@
     </SpaceShip>
     <?lua end ?>
-    <?lua end ?>
+    <?lua 
+    enemies = enemies + enemiesIncrease
+    end ?>
 
     <!-- Transporter, starting Point is near A, end Point near B, the circle parameters for the waypoints are: Center = (0, -887, 0), r = 2613 -->
