Index: code/branches/Merge_HS18/data/levels/Wagnis.oxw
===================================================================
--- code/branches/Merge_HS18/data/levels/Wagnis.oxw	(revision 12184)
+++ code/branches/Merge_HS18/data/levels/Wagnis.oxw	(revision 12184)
@@ -0,0 +1,522 @@
+<LevelInfo
+ name = "Wagnis"
+ description = "A clone of the iconic Risk."
+ tags = ""
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("WagnisHUD.oxo")
+  include("templates/lodInformation.oxt")
+  include("templates/wagnisCursor.oxt")
+  include("includes/notifications.oxi")
+?>
+
+<Level plugins="wagnis" gametype="Wagnis">
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/skyBoxBasic"
+  >
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+    <SpawnPoint position="-100, 45, 75" lookat="0,45,75" spawnclass=SpaceShip pawndesign=wagnisCursor />
+
+<WagnisGameboard position="20,20,20" connections_string="1=2+3, 2=1+3+4, 3=1+2+4+21, 4=2+3+5, 5=4+6+7, 6=5+7+8+12, 7=5+6+9+8, 8=6+7+9+10+11+12, 9=7+8+10, 10=8+9+11+14, 11=8+10+12+13, 12=6+8+11+13, 13=11+12+27, 14=10+15+16, 15=14+16+17+19, 16=14+15+17+18, 17=15+16+18+19+20, 18=16+17+20+33+35+36, 19=15+17+20+21, 20=17+18+19+36+22, 21=3+19+20+22+23+24, 22=21+20+36+23, 23=21+22+24+36+26+25, 24=21+23+25, 25=24+26+23, 26=25+23, 27=13+28+29+30+31, 28=27+29, 29=27+28+30+32+34, 30=27+29+31+32, 31=27+30+32, 32=31+30+29+34+33, 33=18+32+34+35, 34=29+32+33+35+37+38, 35=18+33+34+37+36, 36=18+20+22+23+37+35, 37=34+35+36+38, 38=34+37+39, 39=38+40+41, 40=39+41+42, 41=39+40+42, 42=40+41">
+
+
+  <Provinces>
+    <!-- SA -->
+    <WagnisProvince ID="1" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="2" position="0,28,8" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.293, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="2" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="2" position="0,39,4" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.293, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="3" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="2" position="0,34,17" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.293, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="4" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="2" position="0,46,14" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.293, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+
+
+
+    <!-- NA -->
+    <WagnisProvince ID="5" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,61,8" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.8125, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="6" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,73,9" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.8125, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="7" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,65,20" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.8125, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="8" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,70,29" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.8125, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="9" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" position="0,60,32" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.8125, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="10" position="0,66,41" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.8125, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="11" position="0,76,38" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.8125, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="12" position="0,80,25" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.8125, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="13" position="0,82,52" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="1" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.8125, 0.082"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+
+
+
+
+    <!-- EU -->
+    <WagnisProvince ID="14" position="0,58,62" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="4" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.085,0.457,0.804"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="15" position="0,50,57" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="4" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.085,0.457,0.804"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="16" position="0,53,74" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="4" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.085,0.457,0.804"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="17" position="0,40,72" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="4" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.085,0.457,0.804"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="18" position="0,45,86" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="4" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.085,0.457,0.804"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="19" position="0,39,58" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="4" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.085,0.457,0.804"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="20" position="0,32,81" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="4" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.085,0.457,0.804"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+
+
+
+
+    <!-- AF -->
+    <WagnisProvince ID="21" position="0,20,45" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="2" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.515,0.199,0.054"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="22" position="0,23,62" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="2" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.515,0.199,0.054"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="23" position="0,16,73" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="2" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.515,0.199,0.054"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="24" position="0,10,50" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="2" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.515,0.199,0.054"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="25" position="0,4,61" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="2" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.515,0.199,0.054"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="26" position="0,5,76" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="2" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.515,0.199,0.054"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+
+
+
+
+
+    <!-- AS -->
+    <WagnisProvince ID="27" position="0,81,76" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="5" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="28" position="0,82,103" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="5" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="29" position="0,69,112" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="5" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="30" position="0,72,95" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="5" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="31" position="0,70,79" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="5" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="32" position="0,60,93" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="5" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="33" position="0,52,105" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="5" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="34" position="0,50,121" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="5" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="35" position="0,41,105" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="5" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="36" position="0,30,101" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="5" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="37" position="0,33,116" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="5" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="38" position="0,35,127" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="5" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+
+
+
+
+    <!-- AU -->
+    <WagnisProvince ID="39" position="0,22,131" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="6" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.695,0.085,0.804"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="40" position="0,13,121" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="6" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.695,0.085,0.804"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="41" position="0,13,141" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="6" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.695,0.085,0.804"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="42" position="0,5,130" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="6" rotationrate="<?lua print(math.random() * 50) ?>" rotationaxis="<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>,<?lua print((math.random()-1)*5)?>">
+      <attached>
+        <Model position="0,0,0" mesh="ast1.mesh" scale3D="1.4,1.4,1.4" />
+        <Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.695,0.085,0.804"/>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+
+    <WagnisProvince ID="1000" radarname="continue" health = 10000000 maxhealth = 10000000 initialhealth = 10000000 collisionType=kinematic mass=100 continent="0" position="0,75,137" pitch=90 rotationrate="0" rotationaxis="0,0,0">
+      <attached>
+        <Model position="0,0,0" mesh="broke-satellite.mesh" scale3D="3,3,3" />
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="3,3,3" /> 
+      </collisionShapes>
+    </WagnisProvince>
+  
+
+  </Provinces>
+</WagnisGameboard>
+
+<Billboard position="0,27,32" amplitude=1 material="Wagnis/Arrow" rotation="0.4" colour="1,1,1"/> <!--3,21-->
+<Billboard position="0,53.5,11" amplitude=1 material="Wagnis/Arrow" rotation="1.1" colour="1,1,1"/> <!--4,5-->
+<Billboard position="0,29.5,52" amplitude=1 material="Wagnis/Arrow" rotation="2.2" colour="1,1,1"/> <!--19,21-->
+<Billboard position="0,28,62" amplitude=1 material="Wagnis/Arrow" rotation="2.8" colour="1,1,1"/> <!--20,21-->
+<Billboard position="0,27.5,71.5" amplitude=1 material="Wagnis/Arrow" rotation="2.7" colour="1,1,1"/> <!--20,22-->
+<Billboard position="0,26.5,81.5" amplitude=1 material="Wagnis/Arrow" rotation="3" colour="1,1,1"/> <!--22,36-->
+<Billboard position="0,23,87" amplitude=1 material="Wagnis/Arrow" rotation="2.7" colour="1,1,1"/> <!--23,36-->
+<Billboard position="0,81.5,64" amplitude=1 material="Wagnis/Arrow" rotation="0" colour="1,1,1"/> <!--13,27-->
+<Billboard position="0,81.5,38.5" amplitude=1 material="Wagnis/Arrow" rotation="-0.1" colour="1,1,1"/> <!--12,13-->
+<Billboard position="0,76,96" amplitude=1 material="Wagnis/Arrow" rotation="0.3" colour="1,1,1"/> <!--27,29-->
+<Billboard position="0,62,51.5" amplitude=1 material="Wagnis/Arrow" rotation="0.2" colour="1,1,1"/> <!--10,14-->
+<Billboard position="0,31,91" amplitude=1 material="Wagnis/Arrow" rotation="0.1" colour="1,1,1"/> <!--20,36-->
+<Billboard position="0,43,95.5" amplitude=1 material="Wagnis/Arrow" rotation="0.1" colour="1,1,1"/> <!--18,35-->
+<Billboard position="0,37.5,93.5" amplitude=1 material="Wagnis/Arrow" rotation="0.7" colour="1,1,1"/> <!--18,36-->
+<Billboard position="0,48.5,95.5" amplitude=1 material="Wagnis/Arrow" rotation="-0.5" colour="1,1,1"/> <!--18,33-->
+
+
+
+<!--
+<Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.8125, 0.082"/>
+<Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.926, 0.293, 0.082"/>
+<Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.515,0.199,0.054"/>
+<Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.085,0.457,0.804"/>
+<Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.256,0.804,0.085"/>
+<Billboard position="0,0,0" amplitude=1 material="Wagnis/Background" colour="0.695,0.085,0.804"/>
+-->
+    
+  </Scene>
+</Level>
+
Index: code/branches/Merge_HS18/data/levels/templates/wagnisCursor.oxt
===================================================================
--- code/branches/Merge_HS18/data/levels/templates/wagnisCursor.oxt	(revision 12184)
+++ code/branches/Merge_HS18/data/levels/templates/wagnisCursor.oxt	(revision 12184)
@@ -0,0 +1,42 @@
+<Template name=wagnisCursor>
+  <SpaceShip
+   hudtemplate            = WagnisHUD
+  >
+
+
+<weaponslots>
+      <WeaponSlot position="0,0,0" />
+      <WeaponSlot position="0,0,0" />
+</weaponslots>
+<weaponsets>
+      <WeaponSet firemode=0 />
+      <WeaponSet firemode=1 />
+</weaponsets>
+<weaponpacks>
+      <WeaponPack>
+        <links>
+          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+          <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+        </links>
+        <Weapon>
+            <WagnisGun mode=0 munitionpershot=0 delay=0     damage=1      muzzleoffset="0, 0, 0" />
+            <WagnisGun mode=1 munitionpershot=0 delay=0     damage=1000   muzzleoffset="0, 0, 0" />
+        </Weapon>
+      </WeaponPack>
+</weaponpacks>
+<munition>
+      <LaserMunition initialmagazines=2 maxmagazines=4 munitionpermagazine=1 replenishamount=2 replenishinterval=7.5/>
+</munition>
+
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipassffcameras defaults=0>
+  <SpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,0, 0" drag=true mouselook=true />
+      <CameraPosition position="0,0, 0" drag=true mouselook=true />
+    </camerapositions>
+  </SpaceShip>
+</Template>
+
Index: code/branches/Merge_HS18/data/overlays/WagnisHUD.oxo
===================================================================
--- code/branches/Merge_HS18/data/overlays/WagnisHUD.oxo	(revision 12184)
+++ code/branches/Merge_HS18/data/overlays/WagnisHUD.oxo	(revision 12184)
@@ -0,0 +1,26 @@
+<Template name="WagnisHUD">
+  <OverlayGroup name = "WagnisHuD" scale = "100, 100">  
+    
+    <WagnisHUD
+     name          = "Navigation"
+     correctaspect = true
+     font          = "Monofur"
+     textsize      = 0.02
+     navMarkerSize = 0.05
+     aimMarkerSize = 0.02
+     healthMarkerSize = 0
+     healthLevelMarkerSize = 0
+    />
+
+      <WagnisHUDinfo
+       name      = "descr1"
+       position  = "0.2, 0.08"
+       pickpoint = "0, 1"
+       font      = "Monofur"
+       caption   = "player name"
+       colour    = "1, 1, 1, 1"
+       textsize  = 0.06
+      />
+
+  </OverlayGroup>
+</Template>
Index: code/branches/Merge_HS18/src/libraries/tools/Timer.cc
===================================================================
--- code/branches/Merge_HS18/src/libraries/tools/Timer.cc	(revision 12183)
+++ code/branches/Merge_HS18/src/libraries/tools/Timer.cc	(revision 12184)
@@ -37,4 +37,5 @@
 
 #include <boost/bimap.hpp>
+#include <functional>
 
 #include "util/Clock.h"
Index: code/branches/Merge_HS18/src/modules/CMakeLists.txt
===================================================================
--- code/branches/Merge_HS18/src/modules/CMakeLists.txt	(revision 12183)
+++ code/branches/Merge_HS18/src/modules/CMakeLists.txt	(revision 12184)
@@ -51,3 +51,4 @@
 ADD_SUBDIRECTORY(pacman)
 ADD_SUBDIRECTORY(orxyroad)
+ADD_SUBDIRECTORY(wagnis)
 ADD_SUBDIRECTORY(TixyTaxyTorxy)
Index: code/branches/Merge_HS18/src/modules/wagnis/CMakeLists.txt
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/CMakeLists.txt	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/CMakeLists.txt	(revision 12184)
@@ -0,0 +1,18 @@
+SET_SOURCE_FILES(WAGNIS_SRC_FILES
+  WagnisProvince.cc
+  WagnisGameboard.cc
+  WagnisPlayer.cc
+  Wagnis.cc
+  WagnisHUD.cc
+  WagnisHUDinfo.cc
+)
+
+ORXONOX_ADD_LIBRARY(wagnis
+  PLUGIN
+  FIND_HEADER_FILES
+  LINK_LIBRARIES
+    orxonox
+    overlays
+    objects
+  SOURCE_FILES ${WAGNIS_SRC_FILES}
+)
Index: code/branches/Merge_HS18/src/modules/wagnis/Wagnis.cc
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/Wagnis.cc	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/Wagnis.cc	(revision 12184)
@@ -0,0 +1,279 @@
+
+
+
+#include "Wagnis.h"
+
+
+
+namespace orxonox{
+
+RegisterClass(Wagnis);
+
+//Constructor
+Wagnis::Wagnis(Context* context) : Deathmatch(context){
+    RegisterObject(Wagnis);
+    this->gameBoard = nullptr;
+    this->gameStage = NOT_READY;
+    this->active_player = 1;
+    this->initial_reinforcements_left = 2; //changed here
+
+    int n = 4;
+    for(int i = 0;i < n;i++){
+        WagnisPlayer* p = new WagnisPlayer(context);
+        p->Player_ID = i+1;
+        p->master = this;
+        this->players.push_back(p);
+    }
+}
+//Destructor
+Wagnis::~Wagnis(){}
+
+
+//Runs the game
+void Wagnis::start(){
+    Deathmatch::start();
+    if(this->gameStage == NOT_READY){
+        this->createGame();
+
+        for(WagnisPlayer* ptr: this->players){
+            ptr->gameBoard = this->gameBoard;
+        }
+    }
+
+    this->gameStage = CHOOSE_PROVINCE_STAGE;
+    this->players.at(0)->gameStage = this->gameStage;
+    this->players.at(0)->setActive(true);
+    this->players.at(0)->reinforcements = 0;
+    orxout()<<"Player "<<1<<"\'s turn. Please choose province."<<endl;
+}
+
+//Tick
+void Wagnis::tick(float dt){
+    SUPER(Wagnis,tick,dt);
+}
+
+
+
+/**
+ * Callback function for Player classes. Needs to be called for the game to go on.
+ * arg: player: pointer to the player which finished his stage.
+ * (used to deactivate player after finishing)
+ * enum GameStage { NOT_READY, CHOOSE_PROVINCE_STAGE, REINFORCEMENT_STAGE, ATTACK_STAGE, MOVE_STAGE };
+ **/
+void Wagnis::playerFinishedStageCallback(WagnisPlayer* player){
+
+    player->resetProvinceSelection();
+
+    if(this->active_player != player->Player_ID){
+        orxout()<<"shit happend. This player should not be activ. Wagnis::playerFinishedStage was called from wrong player"<<endl;
+    }
+    switch(this->gameStage){
+        case CHOOSE_PROVINCE_STAGE:{
+            player->setActive(false);
+            if(this->unoccupiedProvinces() > 0){
+                //Still empty provinces left
+
+                if(this->active_player < (int)this->players.size()){
+                    this->active_player++;
+                }else{
+                    this->active_player = 1;
+                }
+
+                WagnisPlayer* next = this->players[this->active_player - 1];
+                next->gameStage = CHOOSE_PROVINCE_STAGE;
+                next->setActive(true);
+                next->reinforcements = 0;
+                orxout()<<"Player "<<next->Player_ID<<"\'s turn. Please choose province."<<endl;
+            }else{
+                //no empty provinces left
+                this->active_player = 1;
+                WagnisPlayer* next = this->players[this->active_player - 1];
+                next->gameStage = REINFORCEMENT_STAGE;
+                this->gameStage = REINFORCEMENT_STAGE;
+                next->setActive(true);
+                next->reinforcements = 1;
+                orxout()<<"Player "<<next->Player_ID<<"\'s turn. Reinforcement."<<endl;
+            }
+            break;
+        }
+        case REINFORCEMENT_STAGE:{
+            
+            if(this->initial_reinforcements_left > 0){
+                player->setActive(false);
+                if(this->active_player == (int)this->players.size()){
+                    //Last player finished this round of initial troops.
+                    this->initial_reinforcements_left -= 1;
+                    WagnisPlayer* next = this->players.at(0);
+                    this->active_player = 1;
+                    next->setActive(true);
+                    next->gameStage = REINFORCEMENT_STAGE;
+                    if(this->initial_reinforcements_left > 0){
+                        //Still more troops left to place and player 1 is next.
+                        next->reinforcements = 1;
+                    }else{
+                        //No more troops left to place and player 1 is next.
+                        next->reinforcements = this->reinforcementsCounter(1);
+                    }
+                }else{
+                    //Player who finished was not the last player
+                    WagnisPlayer* next = this->players.at(this->active_player);
+                    this->active_player += 1;
+                    next->setActive(true);
+                    next->gameStage = REINFORCEMENT_STAGE;
+                    next->reinforcements = 1;
+                }
+                break;
+            }
+            //Standard Reinforcement
+
+            player->gameStage = ATTACK_STAGE;
+            this->gameStage = ATTACK_STAGE;
+            orxout()<<"Player "<<player->Player_ID<<"\'s turn. Attack."<<endl;
+            break;
+        }
+        case ATTACK_STAGE:{
+            player->gameStage = MOVE_STAGE;
+            this->gameStage = MOVE_STAGE;
+            orxout()<<"Player "<<player->Player_ID<<"\'s turn. Move."<<endl;
+            break;
+        }
+        case MOVE_STAGE:{
+            player->setActive(false);
+            int tc;
+            do{
+                if(this->active_player < (int)this->players.size()){
+                    this->active_player++;
+                }else{
+                    this->active_player = 1;
+                }
+                
+                tc = 0;
+                for(WagnisProvince* p: this->gameBoard->provs){
+                    if(p->getOwner_ID() == this->active_player){
+                        tc++;
+                    }
+                }
+            }while(tc == 0); //Skip players without provinces.
+
+            if(player->Player_ID == this->active_player){
+                //If all players except one got skipped, we got a winner
+                this->gameStage = WINNER_STAGE;
+                player->gameStage = WINNER_STAGE;
+            }else{
+                WagnisPlayer* next = this->players[this->active_player - 1];
+                orxout()<<"Player "<<next->Player_ID<<"\'s turn. Reinforcement."<<endl;
+                next->gameStage = REINFORCEMENT_STAGE;
+                this->gameStage = REINFORCEMENT_STAGE;
+                next->setActive(true);
+                next->reinforcements = reinforcementsCounter(next->Player_ID);
+            }
+            
+            break;
+        }
+        default:{}
+    }
+}
+
+
+
+
+//Creates and links all needed classes
+void Wagnis::createGame(){
+    orxout() << "Game creation started" << endl;
+
+    if(!findGameBoard()){
+        orxout() << "Error: GameBoard not found" << endl;
+    }
+
+    this->gameBoard->initializeNeighbors();
+    this->gameBoard->initializeContinents();
+    
+    orxout() << "Game creation finished" << endl;
+}
+
+//Finds the pointer to the gameBoard
+bool Wagnis::findGameBoard(){
+    for (WagnisGameboard* gb : ObjectList<WagnisGameboard>()){
+        this->gameBoard = gb;
+        orxout()<<"Gameboard pointer found and added"<<endl;
+        return true;
+    }
+    return false;
+}
+
+//Counts legit provinces(not including buttons)
+int Wagnis::provinceCount(){
+    int n = 0;
+    for(WagnisProvince* p: this->gameBoard->provs){
+        if(p != nullptr){
+            if(p->ID < 1000){
+                n++;
+            }
+        }else{
+            orxout()<<"Nullpointer found in provinces!!!"<<endl;
+        }
+    }
+    return n;
+}
+
+int Wagnis::unoccupiedProvinces(){
+    int n = 0;
+    for(WagnisProvince* p: this->gameBoard->provs){
+        if(p != nullptr){
+            if(p->getOwner_ID() == -1 && p->ID < 1000){
+                n++;
+            }
+        }
+    }
+    return n;
+}
+
+int Wagnis::reinforcementsCounter(int player){
+    int n = 0;
+    for(WagnisProvince* p:this->gameBoard->provs){
+        if(p != nullptr){
+            if(p->getOwner_ID() == player){
+                n++;
+            }
+        }else{
+            orxout()<<"Nullpointer found in provinces!!!"<<endl;
+        }
+    }
+
+    n = n/3;
+    if(n<3)n=3;
+
+    int i = 0;
+    bool b = true;
+
+    for(std::vector<WagnisProvince*>* cont_vec:this->gameBoard->continents){
+        for(WagnisProvince* p: *(cont_vec)){
+            if(p->getOwner_ID() != player) b = false;
+        }
+
+        if(b) n += this->getContinentValue(i);
+        b = true; i++;
+    }
+
+    return n;
+}
+
+int Wagnis::getContinentValue(int cont){
+    switch(cont){
+        case 1: return 7;
+        case 2: return 5;
+        case 3: return 5;
+        case 4: return 3;
+        case 5: return 2;
+        case 6: return 2;
+        default: return 0;
+    }
+    return 0;   
+}
+
+
+}
+
+
+        
+    
Index: code/branches/Merge_HS18/src/modules/wagnis/Wagnis.h
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/Wagnis.h	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/Wagnis.h	(revision 12184)
@@ -0,0 +1,86 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Authors:
+ *  
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+
+#ifndef Wagnis_h
+#define Wagnis_h
+
+#include "WagnisPrereqs.h"
+#include "WagnisGameboard.h"
+#include "WagnisProvince.h"
+#include "WagnisPlayer.h"
+#include "gametypes/Deathmatch.h"
+
+
+/** Die Wagnis Klasse hat die folgenden Aufgaben:
+ *  1. Das Spiel erstellen.
+ *  - Gameboard initialisieren
+ *  - Provinzen initialisieren
+ *  - Provinzen verbinden (Nachbarschaften eintragen)
+ *  - Spieler initialisieren
+ *  -
+ * 
+ *  2. Den Spielablauf steuern
+ *  - Für einen Spieler berechnen wie viele Truppen er setzen darf.
+ *  - Den Funktion "setTroops(int troops)" beim Spieler aufrufen.
+ *  - Die Funktion "playerTurn()" bei jedem Spieler aufrufen.
+ *  - 
+ * 
+ **/
+
+
+namespace orxonox
+{
+    class /**_WagnisExport**/ Wagnis : public Deathmatch
+    {
+        public:
+        Wagnis(Context* context);
+        virtual ~Wagnis();
+        void start();
+        void tick(float);
+        void playerFinishedStageCallback(WagnisPlayer*);
+
+
+
+        WagnisGameboard* gameBoard;
+
+        int active_player;
+        int initial_reinforcements_left;
+        GameStage gameStage;
+        std::vector<WagnisPlayer*> players;
+        void createGame();
+        bool findGameBoard();
+        int provinceCount();
+        int reinforcementsCounter(int);
+        int getContinentValue(int);
+        int unoccupiedProvinces();
+    };
+}
+#endif
+ /* Wagnis_h */
Index: code/branches/Merge_HS18/src/modules/wagnis/WagnisGameboard.cc
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/WagnisGameboard.cc	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/WagnisGameboard.cc	(revision 12184)
@@ -0,0 +1,153 @@
+#include "WagnisGameboard.h"
+#include "core/CoreIncludes.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include <vector>
+#include <string>
+
+
+namespace orxonox
+{
+    RegisterClass(WagnisGameboard);
+    
+    WagnisGameboard::WagnisGameboard(Context* context) : StaticEntity(context){
+        RegisterObject(WagnisGameboard);
+        this->connections_string = "";
+    }
+    WagnisGameboard::~WagnisGameboard(){
+        for(std::vector<WagnisProvince*>* vec: this->continents){
+            delete vec;
+        }
+    }
+
+    void WagnisGameboard::XMLPort(Element& xmlelement,XMLPort::Mode mode){
+        SUPER(WagnisGameboard, XMLPort, xmlelement, mode);
+
+        XMLPortObject(WagnisGameboard, WagnisProvince, "Provinces", addProvince, getProvince, xmlelement, mode);
+        XMLPortParam(WagnisGameboard, "connections_string", setConnections_string, getConnections_string, xmlelement, mode);
+    }
+
+
+
+
+
+
+
+    //XML FUNCTIONS
+    //Adds a Province to the Gameboard
+    void WagnisGameboard::addProvince(WagnisProvince* province){
+        orxout() << "added" << endl;
+        orxout() << province->getID() << endl;
+        this->provs.push_back(province);
+    }
+    //XML get province
+    WagnisProvince* WagnisGameboard::getProvince(unsigned int index) const{
+        if(this->provs.size() <= index) return nullptr;
+        return this->provs.at(index);
+    }
+    //XML set connections_string
+    void WagnisGameboard::setConnections_string(const std::string& str){
+        this->connections_string = str;
+    }
+    //XML get connections_string
+    std::string WagnisGameboard::getConnections_string() const{
+        return this -> connections_string;
+    }
+
+
+
+
+
+
+
+    //Parses the string and initializes the neigbors vector of all provinces according
+    //Syntax: 32=7-8-4  , 2=33+5+7+1+4
+    void WagnisGameboard::initializeNeighbors(){
+        
+        std::string str = this->connections_string;
+        orxout() << "inizializing started" << endl;
+        orxout() << "String size:" << endl;
+        orxout() << str.size() << endl;
+        orxout() << str<<endl;
+        unsigned int n = 0;
+        while(n < str.size()){
+            int tmp = parse_int(str,n);
+            n = tmp & 0x0000FFFF;
+            int origin_ID = tmp >> 16;
+            if(n == str.size() || str[n] != '='){
+                orxout() << "Error while parsing neighbors-string: '=' expected at position: "<< n << endl;
+                orxout() << "Correct syntax: 32=4+2+5+67, 54=8+1+12" << endl;
+            }
+            int other_ID;
+            do{
+                n++;
+                tmp = parse_int(str,n);
+                n = tmp & 0x0000FFFF;
+                other_ID = tmp >> 16;
+
+                for(WagnisProvince* orig:this->provs){
+                    if(orig->getID() == origin_ID){
+                        for(WagnisProvince* other:this->provs){
+                            if(other->getID() == other_ID){
+                                orig->addNeighbor(other);
+                                //orxout() << "Added neighbor province "<< other_ID << " to province " << origin_ID << endl;
+                                break;
+                            }
+                        }
+                    }
+                }
+            }while((n < str.size()) && (str[n] == '+'));
+
+            if(n == str.size()) return;
+            while((n < str.size()) && (str[n] == ' ')) n++;
+            if(n == str.size()) return;
+            if(str[n] != ','){
+                orxout() << "Error while parsing neighbors-string: ',' expected at position: "<< n << endl;
+                orxout() << "Correct syntax: 32=4+2+5+67, 54=8+1+12" << endl;
+            }
+            n++;
+            while(n < str.size() && str[n] == ' ') n++;
+            orxout()<<"One province finished"<<endl;
+        }
+    }
+
+    void WagnisGameboard::initializeContinents(){
+        int maxconts=0;
+        for(WagnisProvince* p:this->provs){
+            if(p->getContinent() > maxconts){
+                maxconts = p->getContinent();
+            }
+        }
+        for(int i=0;i<=maxconts;i++){
+            this->continents.push_back(new std::vector<WagnisProvince*>());
+            for(WagnisProvince* p:this->provs){
+                if(p->getContinent() == i){
+                    this->continents[i]->push_back(p);
+                }
+            }
+            orxout()<<"There are "<<this->continents[i]->size()<<" Provinces in Continent "<< i << endl;
+        }
+    }
+
+    //Returns the parsed int and the offset encoded in an int. the upper 16bit(incl MSB) is the number
+    //and the lower 16 bits is the new n(after the last digit)
+    int WagnisGameboard::parse_int(std::string str,unsigned int n){
+        if(n >= str.size()){
+            orxout() << "Error while parsing neighbors-string: Internal error at WagnisGameboard::parse_int() "<< endl;
+        }
+        int digit = str[n] - '0';
+        int number = digit;
+        if(digit < 0 || digit > 9){
+            orxout() << "Error while parsing neighbors-string: Digit expected at position: "<< n << endl;
+            orxout() << "Correct syntax: 32=4+2+5+67, 54=8+1+12" << endl;
+        }
+
+        n++;
+        while(n < str.size() && str[n] - '0' >= 0 && str[n] - '0' < 10){
+            digit = str[n] - '0';
+            number = 10 * number;
+            number += digit;
+            n++;
+        }
+        return (number << 16)+n;
+    }
+}
Index: code/branches/Merge_HS18/src/modules/wagnis/WagnisGameboard.h
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/WagnisGameboard.h	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/WagnisGameboard.h	(revision 12184)
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+#ifndef Wagnis_Gameboard_h
+#define Wagnis_Gameboard_h
+
+#include "WagnisPrereqs.h"
+#include "WagnisProvince.h"
+
+#include "OrxonoxPrereqs.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "worldentities/StaticEntity.h"
+#include <string>
+#include <vector>
+
+
+namespace orxonox
+{
+    class WagnisGameboard : public StaticEntity
+    {
+    public:
+        WagnisGameboard(Context*);
+        virtual ~WagnisGameboard();
+
+        //XML
+        virtual void XMLPort(Element&,XMLPort::Mode);
+        void addProvince(WagnisProvince*);
+        WagnisProvince* getProvince(unsigned int) const;
+        void setConnections_string(const std::string&);
+        std::string getConnections_string() const;
+        //XML end
+        
+        void initializeNeighbors();
+        void initializeContinents();
+
+
+
+        std::string connections_string;
+        std::vector<WagnisProvince*> provs;
+        std::vector<std::vector<WagnisProvince*>*> continents;
+        int parse_int(std::string,unsigned int);
+    };
+}
+
+
+#endif
Index: code/branches/Merge_HS18/src/modules/wagnis/WagnisHUD.cc
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/WagnisHUD.cc	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/WagnisHUD.cc	(revision 12184)
@@ -0,0 +1,700 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Roman Kunz
+ */
+
+#include "WagnisHUD.h"
+
+#include <OgreCamera.h>
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreFontManager.h>
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreFontManager.h>
+#   include <OgreOverlayManager.h>
+#   include <OgreTextAreaOverlayElement.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
+
+#include <typeinfo>
+
+#include "util/Math.h"
+#include "util/Convert.h"
+#include "core/command/ConsoleCommandIncludes.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "CameraManager.h"
+#include "Scene.h"
+#include "Radar.h"
+#include "graphics/Camera.h"
+#include "controllers/HumanController.h"
+#include "worldentities/pawns/Pawn.h"
+#include "worldentities/WorldEntity.h"
+#include "core/config/ConfigValueIncludes.h"
+#include "tools/TextureGenerator.h"
+
+
+namespace orxonox
+{
+
+    SetConsoleCommand("WagnisHUD","selectClosest", &WagnisHUD::selectClosestTarget).addShortcut().keybindMode(KeybindMode::OnPress);
+    SetConsoleCommand("WagnisHUD","selectNext", &WagnisHUD::selectNextTarget).addShortcut().keybindMode(KeybindMode::OnPress);
+
+    static bool compareDistance(std::pair<RadarViewable*, unsigned int> a,
+            std::pair<RadarViewable*, unsigned int> b)
+    {
+        return a.second < b.second;
+    }
+    RegisterClass ( WagnisHUD );
+
+    WagnisHUD* WagnisHUD::localHUD_s = nullptr;
+
+    WagnisHUD::WagnisHUD(Context* context) :
+        OrxonoxOverlay(context)
+    {
+        RegisterObject(WagnisHUD);
+        this->setConfigValues();
+
+        // Set default values
+        this->setFont("Monofur");
+        this->setTextSize(0.05f);
+        this->setNavMarkerSize(0.03f);
+        this->setAimMarkerSize(0.02f);
+        this->setHealthMarkerSize(0.06f);
+        this->setHealthLevelMarkerSize(0.06f);
+        markerLimit_ = 200;
+
+        this->setDetectionLimit(10000.0f);
+        this->currentMunitionSpeed_ = 750.0f;
+
+        this->closestTarget_ = true;
+        this->nextTarget_ = false;
+        WagnisHUD::localHUD_s = this;
+    }
+
+    WagnisHUD::~WagnisHUD()
+    {
+        if (this->isInitialized())
+        {
+            for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end();)
+            removeObject((it++)->first);
+        }
+        this->sortedObjectList_.clear();
+    }
+
+    void WagnisHUD::setConfigValues()
+    {
+        SetConfigValue(markerLimit_, 3);
+        SetConfigValue(showDistance_, false);
+    }
+
+    void WagnisHUD::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(WagnisHUD, XMLPort, xmlelement, mode);
+
+        XMLPortParam(WagnisHUD, "font", setFont, getFont, xmlelement, mode);
+        XMLPortParam(WagnisHUD, "textSize", setTextSize, getTextSize, xmlelement, mode);
+        XMLPortParam(WagnisHUD, "navMarkerSize", setNavMarkerSize, getNavMarkerSize, xmlelement, mode);
+        XMLPortParam(WagnisHUD, "detectionLimit", setDetectionLimit, getDetectionLimit, xmlelement, mode);
+        XMLPortParam(WagnisHUD, "aimMarkerSize", setAimMarkerSize, getAimMarkerSize, xmlelement, mode);
+        XMLPortParam(WagnisHUD, "healthMarkerSize", setHealthMarkerSize, getHealthMarkerSize, xmlelement, mode);
+        XMLPortParam(WagnisHUD, "healthLevelMarkerSize", setHealthLevelMarkerSize, getHealthLevelMarkerSize, xmlelement, mode);
+
+    }
+
+    void WagnisHUD::setFont(const std::string& font)
+    {
+        const Ogre::ResourcePtr& fontPtr = Ogre::FontManager::getSingleton().getByName(font);
+        if (fontPtr.isNull())
+        {
+            orxout(internal_warning) << "WagnisHUD: Font '" << font << "' not found" << endl;
+            return;
+        }
+        this->fontName_ = font;
+        for (const auto& mapEntry : this->activeObjectList_)
+        {
+            if (mapEntry.second.text_ != nullptr)
+                mapEntry.second.text_->setFontName(this->fontName_);
+        }
+    }
+
+    const std::string& WagnisHUD::getFont() const
+    {
+        return this->fontName_;
+    }
+
+    void WagnisHUD::setTextSize(float size)
+    {
+        if (size <= 0.0f)
+        {
+            orxout(internal_warning) << "WagnisHUD: Negative font size not allowed" << endl;
+            return;
+        }
+        this->textSize_ = size;
+        for (const auto& mapEntry : this->activeObjectList_)
+        {
+            if (mapEntry.second.text_)
+                mapEntry.second.text_->setCharHeight(size);
+        }
+    }
+
+    float WagnisHUD::getTextSize() const
+    {
+        return this->textSize_;
+    }
+
+    float WagnisHUD::getArrowSizeX(int dist) const
+    {
+        if (dist < 600)
+        dist = 600;
+        return this->getActualSize().x * 900 * this->navMarkerSize_ / dist;
+    }
+
+    float WagnisHUD::getArrowSizeY(int dist) const
+    {
+        if (dist < 600)
+        dist = 600;
+        return this->getActualSize().y * 900 * this->navMarkerSize_ / dist;
+    }
+
+    void WagnisHUD::tick(float dt)
+    {
+        SUPER(WagnisHUD, tick, dt);
+
+        Camera* cam = CameraManager::getInstance().getActiveCamera();
+        if (cam == nullptr)
+        return;
+        const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix();
+
+        for (std::pair<RadarViewable*, unsigned int>& pair : this->sortedObjectList_)
+        pair.second = (int)((pair.first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f);
+
+        this->sortedObjectList_.sort(compareDistance);
+
+        unsigned int markerCount = 0;
+        bool closeEnough = false; // only display objects that are close enough to be relevant for the player
+
+        // if the selected object doesn't exist any more or is now out of range select the closest object
+        std::map<RadarViewable*, ObjectInfo>::iterator selectedActiveObject = this->activeObjectList_.find(this->selectedTarget_);
+        if(selectedActiveObject == this->activeObjectList_.end())
+        {
+            this->closestTarget_ = true;
+        }
+        else if(this->detectionLimit_ < (this->selectedTarget_->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f)
+        {
+            this->closestTarget_ = true;
+            selectedActiveObject->second.selected_ = false;
+        }
+
+        bool nextHasToBeSelected = false;
+
+        for (std::list<std::pair<RadarViewable*, unsigned int>>::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++markerCount, ++listIt)
+        {
+
+            std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.find(listIt->first);
+            closeEnough = listIt->second < this->detectionLimit_;
+            // display radarviewables on HUD if the marker limit and max-distance is not exceeded
+            if (markerCount < this->markerLimit_ && (closeEnough || this->detectionLimit_ < 0))
+            {
+                // Get Distance to HumanController and save it in the TextAreaOverlayElement.
+                int dist = listIt->second;
+                float textLength = 0.0f;
+
+                if (this->showDistance_)
+                {
+                    //display distance next to cursor
+                    it->second.text_->setCaption(multi_cast<std::string>(dist));
+                    textLength = multi_cast<std::string>(dist).size() * it->second.text_->getCharHeight() * 0.3f;
+                }
+                else
+                {
+                    //display name next to cursor
+                    it->second.text_->setCaption(it->first->getRadarName());
+                    textLength = it->first->getRadarName().size() * it->second.text_->getCharHeight() * 0.3f;
+                }
+
+                // select the object that aim-assistant indicates
+                if(this->closestTarget_)
+                // select the closest object
+                {
+                    if(listIt == this->sortedObjectList_.begin())
+                    {
+                        it->second.selected_ = true;
+                        this->selectedTarget_ = it->first;
+                    }
+                    else if(it->second.selected_)
+                    {
+                        it->second.selected_ = false;
+                    }
+
+                }
+                else if(this->nextTarget_)
+                // select the next object in sortedObjectList
+                {
+                    if(nextHasToBeSelected){
+                        it->second.selected_ = true;
+                        this->selectedTarget_ = it->first;
+                        nextHasToBeSelected = false;
+                    }
+                    else if(it->second.selected_)
+                    {
+                        nextHasToBeSelected = true;
+                        it->second.selected_ = false;
+
+                        // check if there's a next object
+                        listIt++;
+                        if(listIt != this->sortedObjectList_.end())
+                        {
+                            // and if the marker limit and max-distance are not exceeded for it
+                            if (markerCount + 1 >= this->markerLimit_ ||
+                                    (listIt->second > this->detectionLimit_ && detectionLimit_ >= 0))
+                            {
+                                // otherwise select the closest object
+                                this->activeObjectList_.find(this->sortedObjectList_.begin()->first)->second.selected_ = true;
+                                this->selectedTarget_ = it->first;
+                                nextHasToBeSelected = false;
+                            }
+                        }
+                        listIt--;
+                    }
+                }
+
+
+
+
+                // Transform to screen coordinates
+                Vector3 pos = camTransform * it->first->getRVWorldPosition();
+
+                bool outOfView = true;
+                if (pos.z > 1.0)
+                {
+                    // z > 1.0 means that the object is behind the camera
+                    outOfView = true;
+                    // we have to switch all coordinates (if you don't know why,
+                    // try linear algebra lectures, because I can't explain..)
+                    pos.x = -pos.x;
+                    pos.y = -pos.y;
+                }
+                else
+                    outOfView = pos.x < -1.0 || pos.x > 1.0 || pos.y < -1.0 || pos.y > 1.0;
+
+                if (outOfView)
+                {
+                    // Object is not in view
+
+                    // Change material only if outOfView changed
+                    if (!it->second.wasOutOfView_)
+                    {
+                        it->second.health_->hide();
+                        it->second.healthLevel_->hide();
+                        it->second.panel_->setMaterialName(TextureGenerator::getMaterialName("arrows.png", it->first->getRadarObjectColour()));
+                        it->second.wasOutOfView_ = true;
+                        it->second.target_->hide();
+                    }
+
+                    //float xDistScale = this->getActualSize().x * 1000.0f * this->navMarkerSize_ / dist;
+                    //float yDistScale = this->getActualSize().y * 1000.0f * this->navMarkerSize_ / dist;
+
+                    // Adjust Arrowsize according to distance
+                    it->second.panel_->setDimensions(getArrowSizeX(dist), getArrowSizeY(dist));
+
+                    // Switch between top, bottom, left and right position of the arrow at the screen border
+                    if (pos.x < pos.y)
+                    {
+                        if (pos.y > -pos.x)
+                        {
+                            // Top
+                            float position = pos.x / pos.y + 1.0f;
+                            it->second.panel_->setPosition((position - it->second.panel_->getWidth()) * 0.5f, 0.0f);
+                            it->second.panel_->setUV(0.5f, 0.0f, 1.0f, 0.5f);
+                            it->second.text_->setLeft((position - textLength) * 0.5f);
+                            it->second.text_->setTop(it->second.panel_->getHeight());
+                        }
+                        else
+                        {
+                            // Left
+                            float position = pos.y / pos.x + 1.0f;
+                            it->second.panel_->setPosition(0.0f, (position - it->second.panel_->getWidth()) * 0.5f);
+                            it->second.panel_->setUV(0.0f, 0.0f, 0.5f, 0.5f);
+                            it->second.text_->setLeft(it->second.panel_->getWidth() + 0.01f);
+                            it->second.text_->setTop((position - it->second.text_->getCharHeight()) * 0.5f);
+                        }
+                    }
+                    else
+                    {
+                        if (pos.y < -pos.x)
+                        {
+                            // Bottom
+                            float position = -pos.x / pos.y + 1.0f;
+                            it->second.panel_->setPosition((position - it->second.panel_->getWidth()) * 0.5f, 1.0f - it->second.panel_->getHeight());
+                            it->second.panel_->setUV(0.0f, 0.5f, 0.5f, 1.0f );
+                            it->second.text_->setLeft((position - textLength) * 0.5f);
+                            it->second.text_->setTop(1.0f - it->second.panel_->getHeight() - it->second.text_->getCharHeight());
+                        }
+                        else
+                        {
+                            // Right
+                            float position = -pos.y / pos.x + 1.0f;
+                            it->second.panel_->setPosition(1.0f - it->second.panel_->getWidth(), (position - it->second.panel_->getHeight()) * 0.5f);
+                            it->second.panel_->setUV(0.5f, 0.5f, 1.0f, 1.0f);
+                            it->second.text_->setLeft(1.0f - it->second.panel_->getWidth() - textLength - 0.01f);
+                            it->second.text_->setTop((position - it->second.text_->getCharHeight()) * 0.5f);
+                        }
+                    }
+                }
+                else
+                {
+                    // Object is in view
+
+                    //calculate the health of the actual selected radarViewable (relativHealthScale: while (0) is no health left, (1) is the initial health)
+                    const Pawn* pawnPtr = orxonox_cast<const Pawn*>(it->first->getWorldEntity());
+                    if (pawnPtr)
+                    {
+                        float health = pawnPtr->getHealth();
+                        float initHealth = pawnPtr->getMaxHealth();
+                        float relativHealthScale = health/initHealth;
+
+                        //integer values from 0 to 10 (0 is no health and 10 is full health)
+                        int discreteHealthScale = (int)(10*relativHealthScale);
+
+                        //calculate the HealthLevel (= OponentLevel or Strength) there are 5 Levels
+                        //Level 1, Level 2,... , Level 5
+                        int HealthLevel = 1;
+
+                        if(initHealth < 200)
+                            HealthLevel = 1;
+                        if(200 <= initHealth && initHealth < 500)
+                            HealthLevel = 2;
+                        if(500 <= initHealth && initHealth < 1000)
+                            HealthLevel = 3;
+                        if(1000 <= initHealth && initHealth < 2500)
+                            HealthLevel = 4;
+                        if(2500 <= initHealth)
+                            HealthLevel = 5;
+
+                        // Change material only if outOfView changed
+                        if (it->second.wasOutOfView_)
+                        {
+                            //it->second.health_->setMaterialName(TextureGenerator::getMaterialName("bar2_1.png", it->first->getRadarObjectColour()));
+                            it->second.health_->setMaterialName(TextureGenerator::getMaterialName("barSquare.png", it->first->getRadarObjectColour()));
+                            it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x , 0.75f*this->healthMarkerSize_ * this->getActualSize().y);
+
+                            // because as soon as relative health drops below 10% (0.1) the descrete value is 0 but as long as the
+                            // spaceship is still intact there should be at least one part of the bar left.
+                            if(1<=discreteHealthScale){
+                                it->second.health_->setTiling((float)discreteHealthScale , 1 ,0);
+                                it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x *0.1f*discreteHealthScale, 0.75f*this->healthMarkerSize_ * this->getActualSize().y);
+                            }
+
+                            //healthLevel
+                            it->second.healthLevel_->setMaterialName(TextureGenerator::getMaterialName("barSquare.png", it->first->getRadarObjectColour()));
+                            it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x , 0.75f*this->healthLevelMarkerSize_ * this->getActualSize().y);
+                            it->second.healthLevel_->setTiling((float)HealthLevel , 1 ,0);
+                            it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x *0.1f*HealthLevel, 0.25f*this->healthLevelMarkerSize_ * this->getActualSize().y);
+                        }
+
+                        // sets Position and Dimensions (amount) health
+                        it->second.health_->setUV(0.0f, 0.0f, 1.0f, 1.0f);
+                        it->second.health_->setLeft((pos.x + 0.975f - it->second.panel_->getWidth()) * 0.5f);
+                        it->second.health_->setTop((-pos.y + 1.04f - it->second.panel_->getHeight()) * 0.5f);
+
+                        // because as soon as relative health drops below 10% (0.1) the descrete value is 0 but as long as the
+                        // spaceship is still intact there should be at least one part of the bar left.
+                        if(1<=discreteHealthScale){
+                            it->second.health_->setTiling((float)discreteHealthScale , 1 ,0);
+                            it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x *0.1f*discreteHealthScale, 0.75f*this->healthMarkerSize_ * this->getActualSize().y);
+                        }
+
+                        //sets Position and Dimensions (level) of healthLevel
+                        it->second.healthLevel_->setMaterialName(TextureGenerator::getMaterialName("barSquare.png", it->first->getRadarObjectColour()));
+                        it->second.healthLevel_->setUV(0.0f, 0.0f, 1.0f, 1.0f);
+                        it->second.healthLevel_->setLeft((pos.x + 0.975f - it->second.panel_->getWidth()) * 0.5f);
+                        it->second.healthLevel_->setTop((-pos.y + 1.125f - it->second.panel_->getHeight()) * 0.5f);
+
+                        it->second.healthLevel_->setTiling((float)HealthLevel , 1 ,0);
+                        it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x *0.1f*HealthLevel, 0.25f*this->healthLevelMarkerSize_ * this->getActualSize().y);
+
+                        // Make sure the overlays are shown
+                        it->second.health_->show();
+                        it->second.healthLevel_->show();
+                    }
+
+
+                    // Change material only if outOfView changed
+                    if (it->second.wasOutOfView_)
+                    {
+                        //it->second.panel_->setMaterialName("Orxonox/NavTDC");
+                        it->second.panel_->setMaterialName(TextureGenerator::getMaterialName("tdc.png", it->first->getRadarObjectColour()));
+                        it->second.panel_->setDimensions(this->navMarkerSize_ * this->getActualSize().x, this->navMarkerSize_ * this->getActualSize().y);
+                        it->second.target_->setDimensions(this->aimMarkerSize_ * this->getActualSize().x, this->aimMarkerSize_ * this->getActualSize().y);
+                        it->second.wasOutOfView_ = false;
+                    }
+
+                    // Position marker
+                    it->second.panel_->setUV(0.0f, 0.0f, 1.0f, 1.0f);
+                    it->second.panel_->setLeft((pos.x + 1.0f - it->second.panel_->getWidth()) * 0.5f);
+                    it->second.panel_->setTop((-pos.y + 1.0f - it->second.panel_->getHeight()) * 0.5f);
+
+                    // Position text
+                    it->second.text_->setLeft((pos.x + 1.0f + it->second.panel_->getWidth()) * 0.5f);
+                    it->second.text_->setTop((-pos.y + 1.0f + it->second.panel_->getHeight()) * 0.5f);
+
+                    // Make sure the overlays are shown
+                    it->second.panel_->show();
+                    it->second.text_->show();
+
+                    // Target marker
+                    const Pawn* pawn = dynamic_cast<const Pawn*>(it->first->getWorldEntity());
+                    /* Pawn* humanPawn = HumanController::getLocalControllerEntityAsPawn();*/
+                    if(!it->second.selected_
+                            || it->first->getRVVelocity().squaredLength() == 0
+                            || pawn == nullptr
+                            /* TODO : improve getTeam in such a way that it works
+                             * || humanPawn == nullptr
+                             * || pawn->getTeam() == humanPawn->getTeam()*/)
+                    {
+                        // don't show marker for not selected enemies nor if the selected doesn't move
+                        it->second.target_->hide();
+                    }
+                    else // object is selected and moves
+                    {
+                        // get the aim position
+                        const Vector3& targetPos = this->toAimPosition(it->first);
+                        // Transform to screen coordinates
+                        Vector3 screenPos = camTransform * targetPos;
+                        // Check if the target marker is in view too
+                        if(screenPos.z > 1 || screenPos.x < -1.0 || screenPos.x > 1.0
+                                || screenPos.y < -1.0 || screenPos.y > 1.0)
+                        {
+                            it->second.target_->hide();
+                        }
+                        else
+                        {
+                            it->second.target_->setLeft((screenPos.x + 1.0f - it->second.target_->getWidth()) * 0.5f);
+                            it->second.target_->setTop((-screenPos.y + 1.0f - it->second.target_->getHeight()) * 0.5f);
+                            it->second.target_->show();
+                        }
+                    }
+
+                }
+            }
+            else // do not display on HUD
+
+            {
+                it->second.health_->hide();
+                it->second.healthLevel_->hide();
+                it->second.panel_->hide();
+                it->second.text_->hide();
+                it->second.target_->hide();
+            }
+        }
+
+        this->closestTarget_ = false;
+        this->nextTarget_ = false;
+    }
+
+    /** Overridden method of OrxonoxOverlay.
+     @details
+     Usually the entire overlay scales with scale().
+     Here we obviously have to adjust this.
+     */
+    void WagnisHUD::sizeChanged()
+    {
+        // Use size to compensate for aspect ratio if enabled.
+        float xScale = this->getActualSize().x;
+        float yScale = this->getActualSize().y;
+
+        for (const auto& mapEntry : this->activeObjectList_)
+        {
+            if (mapEntry.second.health_ != nullptr)
+                mapEntry.second.health_->setDimensions(this->healthMarkerSize_ * xScale, this->healthMarkerSize_ * yScale);
+            if (mapEntry.second.healthLevel_ != nullptr)
+                mapEntry.second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * xScale, this->healthLevelMarkerSize_ * yScale);
+            if (mapEntry.second.panel_ != nullptr)
+                mapEntry.second.panel_->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);
+            if (mapEntry.second.text_ != nullptr)
+                mapEntry.second.text_->setCharHeight(this->textSize_ * yScale);
+            if (mapEntry.second.target_ != nullptr)
+                mapEntry.second.target_->setDimensions(this->aimMarkerSize_ * xScale, this->aimMarkerSize_ * yScale);
+        }
+    }
+
+    void WagnisHUD::addObject(RadarViewable* object)
+    {
+        if (showObject(object) == false)
+        return;
+
+        if (this->activeObjectList_.size() >= this->markerLimit_)
+        if (object == nullptr)
+        return;
+
+        // Object hasn't been added yet (we know that)
+        assert(this->activeObjectList_.find(object) == this->activeObjectList_.end());
+
+        // Scales used for dimensions and text size
+        float xScale = this->getActualSize().x;
+        float yScale = this->getActualSize().y;
+
+        // Create everything needed to display the object on the radar and add it to the map
+
+        // Create health
+        Ogre::PanelOverlayElement* health = static_cast<Ogre::PanelOverlayElement*>( Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "WagnisHUD_healthMarker_" + getUniqueNumberString()));
+        //panel->setMaterialName("Orxonox/NavTDC");
+        health->setMaterialName(TextureGenerator::getMaterialName("barSquare.png", object->getRadarObjectColour()));
+        health->setDimensions(this->healthMarkerSize_ * xScale, this->healthMarkerSize_ * yScale);
+        //panel->setColour(object->getRadarObjectColour());
+
+        // Create healthLevel
+        Ogre::PanelOverlayElement* healthLevel = static_cast<Ogre::PanelOverlayElement*>( Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "WagnisHUD_healthLevelMarker_" + getUniqueNumberString()));
+        //panel->setMaterialName("Orxonox/NavTDC");
+        health->setMaterialName(TextureGenerator::getMaterialName("barSquare.png", object->getRadarObjectColour()));
+        health->setDimensions(this->healthLevelMarkerSize_ * xScale, this->healthLevelMarkerSize_ * yScale);
+
+
+        // Create arrow/marker
+        Ogre::PanelOverlayElement* panel = static_cast<Ogre::PanelOverlayElement*>( Ogre::OverlayManager::getSingleton()
+                .createOverlayElement("Panel", "WagnisHUD_navMarker_" + getUniqueNumberString()));
+        //panel->setMaterialName("Orxonox/NavTDC");
+        panel->setMaterialName(TextureGenerator::getMaterialName("tdc.png", object->getRadarObjectColour()));
+        panel->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);
+        //panel->setColour(object->getRadarObjectColour());
+
+        // Create target marker
+        Ogre::PanelOverlayElement* target = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
+                    .createOverlayElement("Panel", "WagnisHUD_targetMarker_" + getUniqueNumberString()));
+        target->setMaterialName(TextureGenerator::getMaterialName("target.png", object->getRadarObjectColour()));
+        target->setDimensions(this->aimMarkerSize_ * xScale, this->aimMarkerSize_ * yScale);
+
+        // Create text
+        Ogre::TextAreaOverlayElement* text = static_cast<Ogre::TextAreaOverlayElement*>( Ogre::OverlayManager::getSingleton()
+                .createOverlayElement("TextArea", "WagnisHUD_navText_" + getUniqueNumberString()));
+        text->setFontName(this->fontName_);
+        text->setCharHeight(this->textSize_ * yScale);
+        text->setColour(object->getRadarObjectColour());
+
+        health->hide();
+        healthLevel->hide();
+        panel->hide();
+        target->hide();
+        text->hide();
+
+        ObjectInfo tempStruct =
+        {   health, healthLevel, panel, target, text, false, false, false};
+        this->activeObjectList_[object] = tempStruct;
+
+        this->background_->addChild(health);
+        this->background_->addChild(healthLevel);
+        this->background_->addChild(panel);
+        this->background_->addChild(target);
+        this->background_->addChild(text);
+
+        this->sortedObjectList_.push_front(std::make_pair(object, (unsigned int)0));
+    }
+
+    void WagnisHUD::removeObject(RadarViewable* viewable)
+    {
+        std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.find(viewable);
+
+        if (this->activeObjectList_.find(viewable) != this->activeObjectList_.end())
+        {
+            // Detach overlays
+            this->background_->removeChild(it->second.health_->getName());
+            this->background_->removeChild(it->second.healthLevel_->getName());
+            this->background_->removeChild(it->second.panel_->getName());
+            this->background_->removeChild(it->second.target_->getName());
+            this->background_->removeChild(it->second.text_->getName());
+            // Properly destroy the overlay elements (do not use delete!)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second.health_);
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second.healthLevel_);
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second.panel_);
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second.target_);
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second.text_);
+            // Remove from the list
+            this->activeObjectList_.erase(viewable);
+        }
+
+        for (std::list<std::pair<RadarViewable*, unsigned int>>::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt)
+        {
+            if ((listIt->first) == viewable)
+            {
+                this->sortedObjectList_.erase(listIt);
+                break;
+            }
+        }
+    }
+
+    void WagnisHUD::objectChanged(RadarViewable* viewable)
+    {
+        // TODO: niceification neccessary ;)
+        removeObject(viewable);
+        addObject(viewable);
+    }
+
+    bool WagnisHUD::showObject(RadarViewable* rv)
+    {
+        if (rv == orxonox_cast<RadarViewable*>(this->getOwner()))
+        return false;
+        assert(rv->getWorldEntity());
+        if (rv->getWorldEntity()->isVisible() == false || rv->getRadarVisibility() == false)
+        return false;
+        return true;
+    }
+
+    void WagnisHUD::changedOwner()
+    {
+        const std::set<RadarViewable*>& respawnObjects = this->getOwner()->getScene()->getRadar()->getRadarObjects();
+        for (RadarViewable* respawnObject : respawnObjects)
+        {
+            if (!respawnObject->isHumanShip_)
+            this->addObject(respawnObject);
+        }
+    }
+
+    Vector3 WagnisHUD::toAimPosition(RadarViewable* target) const
+    {
+        Vector3 wePosition = HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition();
+        Vector3 targetPosition = target->getRVWorldPosition();
+        Vector3 targetSpeed = target->getRVVelocity();
+
+        return getPredictedPosition(wePosition, this->currentMunitionSpeed_, targetPosition, targetSpeed);
+    }
+
+    void WagnisHUD::selectClosestTarget()
+    {
+        if(WagnisHUD::localHUD_s)
+        {
+            WagnisHUD::localHUD_s->closestTarget_ = true;
+        }
+    }
+
+    void WagnisHUD::selectNextTarget()
+    {
+        if(WagnisHUD::localHUD_s)
+        {
+            WagnisHUD::localHUD_s->nextTarget_ = true;
+        }
+    }
+}
Index: code/branches/Merge_HS18/src/modules/wagnis/WagnisHUD.h
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/WagnisHUD.h	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/WagnisHUD.h	(revision 12184)
@@ -0,0 +1,166 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Roman Kunz
+
+ *
+ */
+
+#ifndef _WagnisHUD_H__
+#define _WagnisHUD_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <string>
+
+#include "util/OgreForwardRefs.h"
+#include "tools/interfaces/Tickable.h"
+#include "interfaces/RadarListener.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport WagnisHUD : public OrxonoxOverlay, public Tickable, public RadarListener
+    {
+        public:
+            WagnisHUD(Context* context);
+            virtual ~WagnisHUD();
+
+            void setConfigValues();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void tick(float dt) override;
+
+            // RadarListener interface
+            virtual void addObject(RadarViewable* object) override;
+            virtual void removeObject(RadarViewable* viewable) override;
+            virtual void objectChanged(RadarViewable* viewable) override;
+
+            virtual void changedOwner() override;
+            virtual void sizeChanged() override;
+            virtual void angleChanged() override { }
+            virtual void positionChanged() override { }
+            virtual void radarTick(float dt) override {}
+
+            virtual inline float getRadarSensitivity() const override
+                { return 1.0f; }
+
+            inline unsigned int getMarkerLimit() const
+                { return this->markerLimit_; }
+
+            static void selectClosestTarget();
+            static void selectNextTarget();
+
+        private:
+            struct ObjectInfo
+            {
+
+
+
+                Ogre::PanelOverlayElement* health_;
+                Ogre::PanelOverlayElement* healthLevel_;
+                Ogre::PanelOverlayElement* panel_;
+                Ogre::PanelOverlayElement* target_;
+                Ogre::TextAreaOverlayElement* text_;
+                bool outOfView_;
+                bool wasOutOfView_;
+                bool selected_;
+            };
+
+            bool showObject(RadarViewable* rv);
+
+            // XMLPort accessors
+            inline void setHealthMarkerSize(float size)
+                        {
+                            this->healthMarkerSize_ = size;
+                            this->sizeChanged();
+                        }
+            inline float getHealthMarkerSize() const
+                            { return healthMarkerSize_; }
+
+            inline void setHealthLevelMarkerSize(float size)
+                                    {
+                                        this->healthLevelMarkerSize_ = size;
+                                        this->sizeChanged();
+                                    }
+                        inline float getHealthLevelMarkerSize() const
+                                        { return healthLevelMarkerSize_; }
+
+            inline void setNavMarkerSize(float size)
+            {
+                this->navMarkerSize_ = size;
+                this->sizeChanged();
+            }
+            inline float getNavMarkerSize() const
+                { return navMarkerSize_; }
+            inline void setAimMarkerSize(float size)
+            {
+                this->aimMarkerSize_ = size;
+                this->sizeChanged();
+            }
+
+            inline float getAimMarkerSize() const
+                { return aimMarkerSize_; }
+            inline void setDetectionLimit(float limit)
+                { this->detectionLimit_ = limit; }
+            inline float getDetectionLimit() const
+                { return this->detectionLimit_; }
+
+            void setTextSize(float size);
+            float getTextSize() const;
+
+            void setFont(const std::string& font);
+            const std::string& getFont() const;
+
+            float getArrowSizeX(int dist) const;
+            float getArrowSizeY(int dist) const;
+
+            Vector3 toAimPosition(RadarViewable* target) const;
+
+            std::map<RadarViewable*, ObjectInfo> activeObjectList_;
+            std::list<std::pair<RadarViewable*, unsigned int>> sortedObjectList_;
+
+            float healthMarkerSize_;
+            float healthLevelMarkerSize_;
+            float navMarkerSize_;
+            float aimMarkerSize_;
+            std::string fontName_;
+            float textSize_;
+            bool showDistance_;
+
+            RadarViewable* selectedTarget_;
+
+            bool closestTarget_;
+            bool nextTarget_;
+
+            static WagnisHUD* localHUD_s; //!< This is used as a filter. Only the local HUD should be influenced by the static Console Command functions.
+
+
+            float currentMunitionSpeed_;
+
+            unsigned int markerLimit_;
+            float detectionLimit_; //!< Objects that are more far away than detectionLimit_ are not displayed on the HUD. 10000.0f is the default value.
+    };
+}
+
+#endif /* _WagnisHUD_H__ */
Index: code/branches/Merge_HS18/src/modules/wagnis/WagnisHUDinfo.cc
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/WagnisHUDinfo.cc	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/WagnisHUDinfo.cc	(revision 12184)
@@ -0,0 +1,115 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Roman Kunz
+ *
+ */
+
+#include "WagnisHUDinfo.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include <string>
+
+namespace orxonox
+{
+    RegisterClass(WagnisHUDinfo);
+
+    WagnisHUDinfo::WagnisHUDinfo(Context* context) : OverlayText(context)
+    {
+        RegisterObject(WagnisHUDinfo);
+
+        this->wagnisgame = nullptr;
+        this->bShow_ = false;
+    }
+
+    void WagnisHUDinfo::tick(float dt)
+    {
+        SUPER(WagnisHUDinfo, tick, dt);
+        if(wagnisgame==nullptr){
+            findWagnis();
+        }
+        switch(wagnisgame->active_player){
+            case 1: setColour( colour({255,0,0}, 100.0f) );
+                    break;
+            case 2: setColour( colour({0,255,0}, 100.0f) );
+                    break;
+            case 3: setColour( colour({255,255,0}, 100.0f) );
+                    break;
+            case 4: setColour( colour({0,0,255}, 100.0f) );
+                    break;
+            case 5: setColour( colour({255,0,255}, 100.0f) );
+                    break;
+            case 6: setColour( colour({0,255,255}, 40.0f) );
+                    break;
+            case 7: setColour( colour({128,128,0}, 100.0f) );
+                    break;
+            case 8: setColour( colour({153,255,204}, 100.0f) );
+                    break;
+            case 9: setColour( colour({102,51,0}, 100.0f) );
+                    break;
+        }
+
+        std::stringstream ss;
+        switch(wagnisgame->gameStage){
+            case CHOOSE_PROVINCE_STAGE: {
+                ss<<"Player "<<wagnisgame->active_player<<" choose a province to occupy";
+                setCaption( ss.str() );
+                break;
+            }
+            case REINFORCEMENT_STAGE: {
+                ss<<"Player "<<wagnisgame->active_player<<" place your reinforcements: "<<wagnisgame->players.at(wagnisgame->active_player-1)->reinforcements;
+                setCaption( ss.str() );
+                break;
+            }
+            case ATTACK_STAGE: {
+                ss<<"Player "<<wagnisgame->active_player<<" you can attack now";
+                setCaption( ss.str() );
+                break;
+            }
+            case MOVE_STAGE: {
+                ss<<"Player "<<wagnisgame->active_player<<" you can reorganize your troops now";
+                setCaption( ss.str() );
+                break;
+            }
+            case NOT_READY: {
+                ss<<"";
+                setCaption( ss.str() );
+                break;
+            }
+            case WINNER_STAGE: {
+                ss<<"PLAYER "<<wagnisgame->active_player<<" WINS!!!";
+                setCaption( ss.str() );
+                break;
+            }
+            default: {}
+        }
+    }
+    void WagnisHUDinfo::findWagnis(){
+    for (Wagnis* gb : ObjectList<Wagnis>()){
+        this->wagnisgame = gb;
+        orxout()<<"Wagnis pointer found and added"<<endl;
+        return;
+    }
+}
+}
Index: code/branches/Merge_HS18/src/modules/wagnis/WagnisHUDinfo.h
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/WagnisHUDinfo.h	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/WagnisHUDinfo.h	(revision 12184)
@@ -0,0 +1,49 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Roman Kunz
+ *
+ */
+
+#ifndef _WagnisHUDinfo_H__
+#define _WagnisHUDinfo_H__
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+#include "WagnisPrereqs.h"
+#include "Wagnis.h"
+
+namespace orxonox
+{
+    class WagnisHUDinfo : public OverlayText, public Tickable
+    {
+        public:
+            WagnisHUDinfo(Context* context);
+
+            virtual void tick(float dt) override;
+            void findWagnis();
+        private:
+            Wagnis* wagnisgame;
+            bool bShow_;
+    };
+}
+#endif /* _WagnisHUDinfo_H__ */
Index: code/branches/Merge_HS18/src/modules/wagnis/WagnisPlayer.cc
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/WagnisPlayer.cc	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/WagnisPlayer.cc	(revision 12184)
@@ -0,0 +1,378 @@
+
+
+
+#include "WagnisPlayer.h"
+#include <vector>
+#include <string>
+#include <cstdlib>
+#include <ctime>
+
+
+namespace orxonox
+{
+    RegisterClass(WagnisPlayer);
+
+    //Constructor
+    WagnisPlayer::WagnisPlayer(Context* context) : HumanPlayer(context){
+        RegisterObject(WagnisPlayer);
+        this->gameBoard = nullptr;
+        this->is_active = false;
+        this->origin_province = nullptr;
+        this->target_province = nullptr;
+        this->province_selection_changed = false;
+        this->gameStage = NOT_READY;
+        this->reinforcements = 0;
+    }
+    //Destructor
+    WagnisPlayer::~WagnisPlayer(){
+
+    }
+    //Tick
+    void WagnisPlayer::tick(float dt){
+        SUPER(WagnisPlayer, tick, dt);
+
+        if(this->is_active)
+        {            
+            for(WagnisProvince* prov:this->gameBoard->provs){
+                //orxout()<<"province health: "<<prov->getHealth()<<endl;
+                if(prov->getHealth() < prov->getMaxHealth()){
+                    //Check if next-player-button was hit
+                    if(prov->getID() == 1000){
+                        master->playerFinishedStageCallback(this);
+                        prov->setHealth(prov->getMaxHealth());
+                        break;
+                    }
+                    //Check left/right click
+                    if(prov->getHealth() <= prov->getMaxHealth()-1000.0f){
+                        this->target_province = prov;
+                        this->province_selection_changed = true;
+                    }else{
+                        if(this->origin_province != nullptr) this->origin_province->dehighlight();
+                        this->origin_province = prov;
+                        this->origin_province->highlight();
+                        this->province_selection_changed = true;
+                    }
+                    prov->setHealth(prov->getMaxHealth());
+                }
+            }
+
+            if((this->province_selection_changed && this->origin_province != nullptr && this->target_province != nullptr)
+            ||(this->province_selection_changed && this->target_province != nullptr && ((gameStage == CHOOSE_PROVINCE_STAGE)||(gameStage == REINFORCEMENT_STAGE)))){
+                
+                this->province_selection_changed = false;
+                switch(gameStage){
+                    case CHOOSE_PROVINCE_STAGE: 
+                    {   
+                        if (checkMove(SET_TROOPS_INITIAL)){
+                            this->target_province->setOwner_ID(this->Player_ID);
+                            this->target_province->setTroops(this->target_province->getTroops()+1);
+                            orxout()<<"Province "<<this->target_province->getID()<<" owned by Player "<<this->target_province->getOwner_ID()<<" troops: "<<this->target_province->getTroops()<<endl;
+                            master->playerFinishedStageCallback(this);
+                        }else{
+                            orxout()<<"Sorry, someone already owns this provice"<<endl;
+                        }
+
+                        break;
+                    }
+                    
+                    case REINFORCEMENT_STAGE:
+                    {
+                        if ( reinforcements > 0) 
+                        {
+                            if (checkMove(SET_TROOPS))
+                            {
+                                this->target_province->setTroops(this->target_province->getTroops()+1);
+                                this->reinforcements -= 1;
+                                orxout()<<"Province "<<this->target_province->getID()<<" owned by Player "<<this->target_province->getOwner_ID()<<" troops: "<<this->target_province->getTroops()<<endl;
+                                if(reinforcements == 0) master->playerFinishedStageCallback(this);
+                            }
+                        }   
+                        
+                        break;
+                    }
+                    case ATTACK_STAGE:{
+
+                        if (checkMove(ATTACK))
+                        
+                        {
+                            while ((this->origin_province->getTroops() > 1) && (this->target_province->getTroops() > 0)) //still troops available
+                            {
+                                while ((this->origin_province->getTroops() >= 4) && (this->target_province->getTroops() >= 2))
+                                {
+                                    //normal fight, 3 attackers, 2 defenders
+                                    int att1 = dice();
+                                    int att2 = dice();
+                                    int att3 = dice();
+                                    int def1 = dice();
+                                    int def2 = dice();
+                                    
+                                    int attBest = best3(att1, att2, att3);
+                                    int attSecond = second3(att1, att2, att3);
+                                    int defBest = best2(def1, def2);
+                                    int defSecond = second2(def1, def2);
+
+                                    if(defBest >= attBest)
+                                        this->origin_province->setTroops(this->origin_province->getTroops()-1);
+                                    if (attBest > defBest)
+                                        this->target_province->setTroops(this->target_province->getTroops()-1);
+                                    if(defSecond >= attSecond)
+                                        this->origin_province->setTroops(this->origin_province->getTroops()-1);
+                                    if (attSecond > defSecond)
+                                        this->target_province->setTroops(this->target_province->getTroops()-1);
+                                }
+
+                                if ((this->origin_province->getTroops() == 3) && (this->target_province->getTroops() >= 2))
+                                {
+                                    //2 attackers, 2 defenders
+                                    int att1 = dice();
+                                    int att2 = dice();
+                                    int def1 = dice();
+                                    int def2 = dice();
+                                    
+                                    int attBest = best2(att1, att2);
+                                    int attSecond = second2(att1, att2);
+                                    int defBest = best2(def1, def2);
+                                    int defSecond = second2(def1, def2);
+
+                                    if(defBest >= attBest)
+                                        this->origin_province->setTroops(this->origin_province->getTroops()-1);
+                                    if (attBest > defBest)
+                                        this->target_province->setTroops(this->target_province->getTroops()-1);
+                                    if(defSecond >= attSecond)
+                                        this->origin_province->setTroops(this->origin_province->getTroops()-1);
+                                    if (attSecond > defSecond)
+                                        this->target_province->setTroops(this->target_province->getTroops()-1);
+                                }
+
+                                if((this->origin_province->getTroops() == 2) && (this->target_province->getTroops() >= 2))
+                                {
+                                    //1 attacker, 2 defenders
+                                    int attBest = dice();
+                                    int def1 = dice();
+                                    int def2 = dice();
+                                    
+                                    int defBest = best2(def1, def2);
+
+                                    if(defBest >= attBest)
+                                        this->origin_province->setTroops(this->origin_province->getTroops()-1);
+                                    if (attBest > defBest)
+                                        this->target_province->setTroops(this->target_province->getTroops()-1);
+                                }
+
+                                if((this->origin_province->getTroops() >= 4) && (this->target_province->getTroops() == 1))
+                                {
+                                    //3 attackers, 1 defender
+                                    int att1 = dice();
+                                    int att2 = dice();
+                                    int att3 = dice();
+                                    int defBest = dice();
+                                    
+                                    int attBest = best3(att1, att2, att3);
+
+                                    if(defBest >= attBest)
+                                        this->origin_province->setTroops(this->origin_province->getTroops()-1);
+                                    if (attBest > defBest)
+                                        this->target_province->setTroops(this->target_province->getTroops()-1);
+                                }
+
+                                if((this->origin_province->getTroops() == 3) && (this->target_province->getTroops() == 1))
+                                {
+                                    //2 attackers, 1 defender
+                                    int att1 = dice();
+                                    int att2 = dice();
+                                    int defBest = dice();
+                                    
+                                    int attBest = best2(att1, att2);
+
+                                    if(defBest >= attBest)
+                                        this->origin_province->setTroops(this->origin_province->getTroops()-1);
+                                    if (attBest > defBest)
+                                        this->target_province->setTroops(this->target_province->getTroops()-1);
+                                }
+
+                                if((this->origin_province->getTroops() == 2) && (this->target_province->getTroops() == 1))
+                                {
+                                    //1 attacker, 1 defender
+                                    int attBest = dice();
+                                    int defBest = dice();
+
+                                    if(defBest >= attBest)
+                                        this->origin_province->setTroops(this->origin_province->getTroops()-1);
+                                    if (attBest > defBest)
+                                        this->target_province->setTroops(this->target_province->getTroops()-1);
+                                }
+                            }
+
+                            if (this->target_province->getTroops() == 0) //attacker won
+                            {
+                                this->target_province->setOwner_ID(this->Player_ID);
+                                this->target_province->setTroops(this->origin_province->getTroops() - 1);
+                                this->origin_province->setTroops(1);
+                            }
+                        }
+                        
+                        break;
+                    }
+                    case MOVE_STAGE:{
+
+                        if (checkMove(MOVE))
+                        {
+                            this->target_province->setTroops(this->target_province->getTroops() + this->origin_province->getTroops()-1);
+                            this->origin_province->setTroops(1);
+                            master->playerFinishedStageCallback(this);
+                        }
+                        break;
+                    }
+
+                    default: break;
+                }
+            }
+        }
+    }
+
+    //checks if a move is valid, possible MoveTypes: ATTACK, MOVE, SET_TROOPS, SET_TROOPS_INITIAL
+    bool WagnisPlayer::checkMove(MoveType move_type)
+    {
+        if (move_type == ATTACK)
+        {
+            if (isNeighbour(this->origin_province, this->target_province))//provinces neighbours
+            {
+                if (this->origin_province->getOwner_ID() == this->Player_ID) //origin belongs to player
+                {
+                    if (this->target_province->getOwner_ID() != this->Player_ID)//target belongs to enemy
+                        return true;
+                }
+            }
+        }
+
+        if (move_type == MOVE)
+        {
+            AlreadyChecked.clear();
+            if (existPath(this->origin_province, this->target_province))//path exists, all belong to same player
+            {
+                if (this->origin_province->getOwner_ID() == this->Player_ID)//origin belongs to player
+                    return true;
+            }
+
+        }
+
+        if (move_type == SET_TROOPS)
+        {
+            if (this->target_province->getOwner_ID() == this->Player_ID)//target belongs to player
+                return true;
+        }
+
+        if (move_type == SET_TROOPS_INITIAL)
+        {
+            if (this->target_province->getOwner_ID() == -1)//target belongs to nobody
+                return true;
+        }
+        
+        return false;
+    }
+
+    //Return a "Player x" String
+    std::string WagnisPlayer::toString(){
+        std::string str = "Player ";
+        str.append(std::to_string(Player_ID));
+        return str;
+    }
+
+    //private function for CheckMove
+    //checks if provinces are neighbours for move
+    bool WagnisPlayer::isNeighbour(WagnisProvince* origin, WagnisProvince* target)
+    {
+        for (unsigned int i = 0; i < origin->neighbors.size(); ++i)
+        {
+            if (target == origin->neighbors[i])
+                return true;
+        }
+
+        return false;
+    }
+
+    //private function for CheckMove
+    //checks if path is complete with provinces owned by player
+    bool WagnisPlayer::existPath(WagnisProvince* origin, WagnisProvince* target)
+    {
+        AlreadyChecked.push_back(origin->getID());
+        
+        if (origin->getOwner_ID() == target->getOwner_ID() && isNeighbour(origin, target))
+            return true;
+        
+        for (unsigned int i = 0; i < origin->neighbors.size(); ++i)
+        {                
+            if ((origin->getOwner_ID() == origin->neighbors[i]->getOwner_ID()) && (!(contains(AlreadyChecked, origin->neighbors[i]->getID()))))
+                return existPath(origin->neighbors[i], target);
+        }
+        
+        return false;
+    }
+
+    int WagnisPlayer::dice() //returns random integer in range [1, 2, 3, 4, 5, 6] 
+    {
+        return (rand()%6+1);
+    }
+
+    int WagnisPlayer::best3(int a, int b, int c) //returns best of 3 integers for attack stage
+    {
+        if(a >= b && a>= c)
+            return a;
+        if(b >= a && b>= c)
+            return b;
+        else    
+            return c;
+    }
+
+    int WagnisPlayer::best2(int a, int b) //returns best of 2 integers for attack stage
+    {
+        if(a >= b)
+            return a;
+        else 
+            return b; 
+    }
+
+    int WagnisPlayer::second3(int a, int b, int c) //returns second of 3 integers for attack stage
+    {
+        if((a >= b && a <= c)||(a <= b && a >= c))
+            return a;
+        if((b >= a && b <= c)||(b <= a && b >= c))
+            return b;
+        else   
+            return c;
+    }
+
+    int WagnisPlayer::second2(int a, int b) //returns second of 2 integers for attack stage
+    {
+        if(a <= b)
+            return a;
+        else 
+            return b;    
+    }
+
+    bool WagnisPlayer::contains(std::vector<int> a, int key)
+    {
+        if(std::count(a.begin(), a.end(), key))
+            return true;
+        else 
+            return false;
+    }
+    
+    void WagnisPlayer::setActive(bool b){
+        this->is_active = b;
+        if(b == true) orxout()<<"Player "<<this->Player_ID<<"\'s turn"<<endl;
+    }
+
+    bool WagnisPlayer::isActive() const {
+        return this->is_active;
+    }
+
+    //Resets the two province pointers and dehighlights them.
+    void WagnisPlayer::resetProvinceSelection(){
+
+        if(this->origin_province != nullptr)this->origin_province->dehighlight();
+        if(this->target_province != nullptr)this->target_province->dehighlight();
+        this->origin_province = nullptr;
+        this->target_province = nullptr;
+    }
+}
Index: code/branches/Merge_HS18/src/modules/wagnis/WagnisPlayer.h
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/WagnisPlayer.h	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/WagnisPlayer.h	(revision 12184)
@@ -0,0 +1,71 @@
+
+
+
+
+
+#ifndef Wagnis_Player_h
+#define Wagnis_Player_h
+
+#include "WagnisPrereqs.h"
+#include "Wagnis.h"
+#include "OrxonoxPrereqs.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "WagnisProvince.h"
+#include "WagnisGameboard.h"
+#include <vector>
+#include <string>
+#include "infos/HumanPlayer.h"
+#include <algorithm>
+#include <iostream>
+
+
+
+
+
+namespace orxonox
+{
+    class WagnisPlayer : public HumanPlayer, public Tickable
+    {
+    public:
+        WagnisPlayer(Context*);
+        virtual ~WagnisPlayer();
+        void tick(float);
+
+        void playerTurn();
+        bool checkMove(MoveType);
+        void setTroops(WagnisProvince*);
+        void attack(WagnisProvince*,WagnisProvince*);
+        void moveTroops(WagnisProvince*,WagnisProvince*);
+        std::string toString();
+        void setActive(bool);
+        bool isActive() const;
+        void resetProvinceSelection();
+
+
+
+        Wagnis* master;
+        GameStage gameStage;
+        bool province_selection_changed;
+        int Player_ID;
+        WagnisGameboard* gameBoard;
+        WagnisProvince* origin_province;
+        WagnisProvince* target_province;
+        int reinforcements;
+        std::vector<int> AlreadyChecked;
+        bool isNeighbour(WagnisProvince*, WagnisProvince*);
+        bool existPath(WagnisProvince*, WagnisProvince*);
+        bool contains(std::vector<int>, int);
+        int dice();
+        int best3(int, int, int);
+        int best2(int, int);
+        int second3(int, int, int);
+        int second2(int, int);
+
+        private:
+        bool is_active;
+    };
+}
+
+
+#endif
Index: code/branches/Merge_HS18/src/modules/wagnis/WagnisPrereqs.h
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/WagnisPrereqs.h	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/WagnisPrereqs.h	(revision 12184)
@@ -0,0 +1,79 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oliver Stadler
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the questsystem module
+*/
+
+#ifndef _WagnisPrereqs_H__
+#define _WagnisPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(WAGNIS_STATIC_BUILD)
+#  ifdef WAGNIS_SHARED_BUILD
+#    define _WagnisExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _WagnisExport
+#    else
+#      define _WagnisExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _WagnisExport  __attribute__ ((visibility("default")))
+#else
+#  define _WagnisExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+
+    class Wagnis;
+    class WagnisProvince;
+    class WagnisGameboard;
+    class WagnisPlayer;
+    class WagnisHUD;
+    class WagnisHUDinfo;
+    enum GameStage { NOT_READY, CHOOSE_PROVINCE_STAGE, REINFORCEMENT_STAGE, ATTACK_STAGE, MOVE_STAGE, WINNER_STAGE };
+    enum MoveType { ATTACK, MOVE, SET_TROOPS, SET_TROOPS_INITIAL };
+
+}
+
+#endif /* _WagnisPrereqs_H__ */
Index: code/branches/Merge_HS18/src/modules/wagnis/WagnisProvince.cc
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/WagnisProvince.cc	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/WagnisProvince.cc	(revision 12184)
@@ -0,0 +1,125 @@
+
+
+#include "WagnisProvince.h"
+
+#define WAGNIS_PROVINCE_MAX_HEALTH 1000000.0f
+
+/**TODO
+ * 
+ * 
+ * 
+ **/
+
+namespace orxonox
+{
+    RegisterClass(WagnisProvince);
+
+    //Constructor
+    WagnisProvince::WagnisProvince(Context* context) : Pawn(context){
+        RegisterObject(WagnisProvince);
+        this->owner_ID = -1;
+        this->troops = 0;
+        this->setRadarName("");
+        this->setRadarObjectColour(colour({128,128,128}, 100.0f));
+        this->ID = -1;
+        this->continent = 0;
+        this->neighbors = std::vector<WagnisProvince*>();
+        
+        this->initialHealth_ = WAGNIS_PROVINCE_MAX_HEALTH;
+        this->maxHealth_ = WAGNIS_PROVINCE_MAX_HEALTH;
+        this->health_ = WAGNIS_PROVINCE_MAX_HEALTH;
+    }
+    //Destructor
+    WagnisProvince::~WagnisProvince(){
+
+    }
+
+    //XML Port
+    void WagnisProvince::XMLPort(Element& xmlelement,XMLPort::Mode mode){
+        SUPER(WagnisProvince, XMLPort, xmlelement, mode);
+
+        XMLPortParam(WagnisProvince, "ID", setID, getID, xmlelement, mode);
+        XMLPortParam(WagnisProvince, "continent", setContinent, getContinent, xmlelement, mode);
+    }
+
+
+
+
+    //SET()
+
+    //set owner_ID
+    void WagnisProvince::setOwner_ID(int owner){
+        this->owner_ID = owner;
+        switch(owner){
+            case 1: this->setRadarObjectColour( colour({255,0,0}, 100.0f) );
+                    break;
+            case 2: this->setRadarObjectColour( colour({0,255,0}, 100.0f) );
+                    break;
+            case 3: this->setRadarObjectColour( colour({255,255,0}, 100.0f) );
+                    break;
+            case 4: this->setRadarObjectColour( colour({0,0,255}, 100.0f) );
+                    break;
+            case 5: this->setRadarObjectColour( colour({255,0,255}, 100.0f) );
+                    break;
+            case 6: this->setRadarObjectColour( colour({0,255,255}, 100.0f) );
+                    break;
+            case 7: this->setRadarObjectColour( colour({128,128,0}, 100.0f) );
+                    break;
+            case 8: this->setRadarObjectColour( colour({153,255,204}, 100.0f) );
+                    break;
+            case 9: this->setRadarObjectColour( colour({102,51,0}, 100.0f) );
+                    break;
+        }
+
+    }
+    //highlight a province
+    void WagnisProvince::highlight(){
+        this->setRadarObjectColour( colour({255,255,255}, 100.0f) );
+    }
+    //dehighlight a province
+    void WagnisProvince::dehighlight(){
+        this->setOwner_ID( this->getOwner_ID() );
+    }
+
+
+
+    
+    //set troops
+    void WagnisProvince::setTroops(int troops){
+        this->troops = troops;
+        this->setRadarName(std::to_string(troops));
+    }
+    //set ID
+    void WagnisProvince::setID(int id){
+        this->ID = id;
+    }
+    //set Continent
+    void WagnisProvince::setContinent(int cont){
+        this->continent = cont;
+    }
+
+
+    //GET()
+
+    //get owner_ID
+    int WagnisProvince::getOwner_ID() const{
+        return this->owner_ID;
+    }
+    //get troops
+    int WagnisProvince::getTroops() const{
+        return this->troops;
+    }
+    //get ID
+    int WagnisProvince::getID() const{
+        return this->ID;
+    }
+    //get continent
+    int WagnisProvince::getContinent() const{
+        return this-> continent;
+    }
+
+    //Adds a connection to neighbors.
+    void WagnisProvince::addNeighbor(WagnisProvince* prov){
+        neighbors.push_back(prov);
+    }
+}
Index: code/branches/Merge_HS18/src/modules/wagnis/WagnisProvince.h
===================================================================
--- code/branches/Merge_HS18/src/modules/wagnis/WagnisProvince.h	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/wagnis/WagnisProvince.h	(revision 12184)
@@ -0,0 +1,56 @@
+
+
+
+
+
+#ifndef Wagnis_Province_h
+#define Wagnis_Province_h
+
+#include "WagnisPrereqs.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "worldentities/pawns/Pawn.h"
+#include "tools/OgreBulletUtils.h"
+#include <vector>
+#include <OgreColourValue.h>
+#include "tools/ToolsPrereqs.h"
+
+namespace orxonox
+{
+    class _WagnisExport WagnisProvince : public Pawn
+    {
+    public:
+        WagnisProvince(Context*);
+        virtual ~WagnisProvince();
+
+
+        virtual void XMLPort(Element&,XMLPort::Mode);
+
+        void setOwner_ID(int);
+        void setTroops(int);
+        void setID(int);
+        void setContinent(int);
+        void highlight();
+        void dehighlight();
+
+        int getOwner_ID() const;
+        int getTroops() const;
+        int getID() const;
+        int getContinent() const;
+
+        void addNeighbor(WagnisProvince*);
+
+
+        std::vector<WagnisProvince*> neighbors;
+        int ID;
+        int continent;
+
+        private:
+        int troops;
+        int owner_ID;
+
+    };
+}
+
+
+#endif
Index: code/branches/Merge_HS18/src/modules/weapons/projectiles/CMakeLists.txt
===================================================================
--- code/branches/Merge_HS18/src/modules/weapons/projectiles/CMakeLists.txt	(revision 12183)
+++ code/branches/Merge_HS18/src/modules/weapons/projectiles/CMakeLists.txt	(revision 12184)
@@ -14,3 +14,4 @@
   GravityBombField.cc
   MineProjectile.cc
+  WagnisProjectile.cc
 )
Index: code/branches/Merge_HS18/src/modules/weapons/projectiles/WagnisProjectile.cc
===================================================================
--- code/branches/Merge_HS18/src/modules/weapons/projectiles/WagnisProjectile.cc	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/weapons/projectiles/WagnisProjectile.cc	(revision 12184)
@@ -0,0 +1,90 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*/
+
+#include "WagnisProjectile.h"
+
+#include "core/config/ConfigValueIncludes.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "core/command/Executor.h"
+
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+    RegisterClass(WagnisProjectile);
+
+    WagnisProjectile::WagnisProjectile(Context* context) : MovableEntity(context), BasicProjectile()
+    {
+        RegisterObject(WagnisProjectile);
+
+        this->setConfigValues();
+
+        // Get notification about collisions
+        if (GameMode::isMaster())
+        {
+            this->setMass(0.1f);
+            this->enableCollisionCallback();
+            this->setCollisionResponse(false);
+            this->setCollisionType(CollisionType::Dynamic);
+
+            // Create a sphere collision shape and attach it to the projectile.
+            collisionShape_ = new SphereCollisionShape(this->getContext());
+            setCollisionShapeRadius(3.0f);
+            this->attachCollisionShape(collisionShape_);
+
+            this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&BasicProjectile::destroyObject, this)));
+        }
+    }
+
+    WagnisProjectile::~WagnisProjectile()
+    {
+    }
+
+    void WagnisProjectile::setConfigValues()
+    {
+        SetConfigValue(lifetime_, 4.0f).description("The time in seconds a projectile stays alive");
+    }
+
+    void WagnisProjectile::tick(float dt)
+    {
+        SUPER(WagnisProjectile, tick, dt);
+
+        if (!this->isActive())
+            return;
+
+        this->destroyCheck();
+    }
+
+    bool WagnisProjectile::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint)
+    {
+        return this->processCollision(otherObject, contactPoint, cs);
+    }
+
+    void WagnisProjectile::setCollisionShapeRadius(float radius)
+    {
+        if (collisionShape_ != nullptr && radius > 0)
+        {
+            collisionShape_->setRadius(radius);
+        }        
+    }
+}
Index: code/branches/Merge_HS18/src/modules/weapons/projectiles/WagnisProjectile.h
===================================================================
--- code/branches/Merge_HS18/src/modules/weapons/projectiles/WagnisProjectile.h	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/weapons/projectiles/WagnisProjectile.h	(revision 12184)
@@ -0,0 +1,68 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      simonmie
+ *
+ */
+
+/**
+    @file Projectile.h
+    @brief Definition of the Projectile class.
+*/
+
+#ifndef _WagnisProjectile__
+#define _WagnisProjectile__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "tools/Timer.h"
+#include "worldentities/MovableEntity.h"
+#include "objects/collisionshapes/SphereCollisionShape.h"
+
+#include "BasicProjectile.h"
+
+namespace orxonox
+{
+    class _WeaponsExport WagnisProjectile : public MovableEntity, public BasicProjectile
+    {
+        public:
+            WagnisProjectile(Context* context);
+            virtual ~WagnisProjectile();
+
+            void setConfigValues();
+
+            virtual void tick(float dt) override;
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
+
+        protected:
+            virtual void setCollisionShapeRadius(float radius);
+            float lifetime_; //!< The time the projectile exists.
+
+        private:
+            Timer destroyTimer_; //!< Timer to destroy the projectile after its lifetime has run out.
+            WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile.
+    };
+}
+
+#endif /* _WagnisProjectile__ */
Index: code/branches/Merge_HS18/src/modules/weapons/weaponmodes/CMakeLists.txt
===================================================================
--- code/branches/Merge_HS18/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 12183)
+++ code/branches/Merge_HS18/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 12184)
@@ -13,3 +13,4 @@
   GravityBombFire.cc
   MineGun.cc
+  WagnisGun.cc
 )
Index: code/branches/Merge_HS18/src/modules/weapons/weaponmodes/WagnisGun.cc
===================================================================
--- code/branches/Merge_HS18/src/modules/weapons/weaponmodes/WagnisGun.cc	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/weapons/weaponmodes/WagnisGun.cc	(revision 12184)
@@ -0,0 +1,116 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+
+ *   The WagnisGun, WagnisProjectile and WagnisCursor was made to be used as a "cursor", by fireing invisible projectiles at an object.
+ *   You can then monitor the Objects HP in order to know which one has been hit (=clicked). And yes, it isn't a very beautiful solution.
+*/
+
+#include "WagnisGun.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "core/command/Executor.h"
+
+#include "graphics/Model.h"
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+#include "worldentities/WorldEntity.h"
+#include "worldentities/pawns/Pawn.h"
+
+#include "weapons/projectiles/WagnisProjectile.h"
+#include "weapons/MuzzleFlash.h"
+
+namespace orxonox
+{
+    RegisterClass(WagnisGun);
+
+    WagnisGun::WagnisGun(Context* context) : WeaponMode(context)
+    {
+        RegisterObject(WagnisGun);
+
+        this->reloadTime_ = 0.5f;
+        this->damage_ = 0.0f; //default 15
+        this->speed_ = 800.0f;
+        this->delay_ = 0.0f;
+        this->setMunitionName("LaserMunition");
+
+
+
+        this->delayTimer_.setTimer(this->delay_, false, createExecutor(createFunctor(&WagnisGun::shot, this)));
+        this->delayTimer_.stopTimer();
+        hudImageString_ = "Orxonox/WSHUD_WM_HsW01";
+    }
+
+    WagnisGun::~WagnisGun()
+    {
+    }
+
+    void WagnisGun::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(WagnisGun, XMLPort, xmlelement, mode);
+
+        XMLPortParam(WagnisGun, "delay", setDelay, getDelay, xmlelement, mode);
+        XMLPortParam(WagnisGun, "material", setMaterial, getMaterial, xmlelement, mode);
+        XMLPortParam(WagnisGun, "projectileMesh", setMesh, getMesh, xmlelement, mode);
+        XMLPortParam(WagnisGun, "sound", setSound, getSound, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Set the firing delay.
+    @param delay
+        The firing delay in seconds.
+    */
+    void WagnisGun::setDelay(float delay)
+    {
+        this->delay_ = delay;
+        this->delayTimer_.setInterval(this->delay_);
+    }
+
+    void WagnisGun::fire()
+    {
+        this->delayTimer_.startTimer();
+    }
+
+    /**
+    @brief
+        Fires the weapon. Creates a projectile and fires it.
+    */
+    void WagnisGun::shot()
+    {
+        assert( this->getWeapon() && this->getWeapon()->getWeaponPack() && this->getWeapon()->getWeaponPack()->getWeaponSystem() && this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn() );
+
+        // Create the projectile.
+        WagnisProjectile* projectile = new WagnisProjectile(this->getContext());
+
+        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+
+        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+        projectile->setShieldDamage(this->getShieldDamage());
+        projectile->setHealthDamage(this->getHealthDamage());
+    }
+}
Index: code/branches/Merge_HS18/src/modules/weapons/weaponmodes/WagnisGun.h
===================================================================
--- code/branches/Merge_HS18/src/modules/weapons/weaponmodes/WagnisGun.h	(revision 12184)
+++ code/branches/Merge_HS18/src/modules/weapons/weaponmodes/WagnisGun.h	(revision 12184)
@@ -0,0 +1,93 @@
+#ifndef _WagnisGun__
+#define _WagnisGun__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "tools/Timer.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        Shoots laser beams.
+    @author
+        Hagen Seifert
+    @ingroup WeaponsWeaponModes
+    */
+    class _WeaponsExport WagnisGun : public WeaponMode
+    {
+        public:
+            WagnisGun(Context* context);
+            virtual ~WagnisGun();
+
+            virtual void fire() override;
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+
+        protected:
+            /**
+            @brief Set the mesh.
+            @param mesh The mesh name.
+            */
+            void setMesh(const std::string& mesh)
+                { this->mesh_ = mesh; }
+
+            /**
+            @brief Get the mesh.
+            @return Returns the mesh name.
+            */
+            const std::string& getMesh() const
+                { return this->mesh_; }
+
+            /**
+            @brief Set the sound.
+            @param sound The Sound name.
+            */
+            void setSound(const std::string& sound)
+                { this->sound_ = sound; }
+
+            /**
+            @brief Get the sound.
+            @return Returns the sound name.
+            */
+            const std::string& getSound() const
+                { return this->sound_; }
+
+            /**
+            @brief Set the material.
+            @param material The material name.
+            */
+            void setMaterial(const std::string& material)
+                { this->material_ = material; }
+            /**
+            @brief Get the material.
+            @return Returns the material name.
+            */
+            const std::string& getMaterial() const
+                { return this->material_; }
+
+            void setDelay(float delay);
+            /**
+            @brief Get the firing delay.
+            @return Returns the firing delay in seconds.
+            */
+            float getDelay() const
+                { return this->delay_; }
+
+            virtual void shot();
+            void muzzleflash();
+
+            std::string material_; //!< The material.
+            std::string mesh_; //!< The mesh.
+            std::string sound_; //!< The sound.
+
+
+
+            float speed_; //!< The speed of the fired projectile.
+            float delay_; //!< The firing delay.
+            Timer delayTimer_; //!< A timer to delay the firing.
+    };
+}
+
+#endif /* _WagnisGun__ */
