Mission recategorization into trainings, challenges and scenarios.
authorWuzzy <almikes@aol.com>
Wed, 13 Apr 2016 14:39:17 +0200
changeset 11968 1de4d6b35748
parent 11967 7dd85fe00de3
child 11969 7718ebf8cf14
Mission recategorization into trainings, challenges and scenarios. This moves the missions into new folders and adds a nice tab widget in the mission menu
QTfrontend/game.cpp
QTfrontend/game.h
QTfrontend/hwform.cpp
QTfrontend/hwform.h
QTfrontend/ui/page/pagetraining.cpp
QTfrontend/ui/page/pagetraining.h
share/hedgewars/Data/Graphics/Missions/CMakeLists.txt
share/hedgewars/Data/Graphics/Missions/Challenge/Basic_Training_-_Sniper_Rifle.png
share/hedgewars/Data/Graphics/Missions/Challenge/Basic_Training_-_Sniper_Rifle@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/CMakeLists.txt
share/hedgewars/Data/Graphics/Missions/Challenge/Challenge_-_Speed_Shoppa_-_Hedgelove@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/Challenge_-_Speed_Shoppa_-_Ropes@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/Challenge_-_Speed_Shoppa_-_ShoppaKing@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/ClimbHome.png
share/hedgewars/Data/Graphics/Missions/Challenge/ClimbHome@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Bazooka_easy@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Bazooka_hard@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Cluster_Bomb@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Grenade_easy@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Grenade_hard@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Homing_Bee@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Shotgun@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/User_Mission_-_RCPlane_Challenge.png
share/hedgewars/Data/Graphics/Missions/Challenge/User_Mission_-_RCPlane_Challenge@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge.png
share/hedgewars/Data/Graphics/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge@2x.png
share/hedgewars/Data/Graphics/Missions/Challenge/User_Mission_-_That_Sinking_Feeling.png
share/hedgewars/Data/Graphics/Missions/Challenge/User_Mission_-_That_Sinking_Feeling@2x.png
share/hedgewars/Data/Graphics/Missions/Scenario/CMakeLists.txt
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Bamboo_Thicket.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Bamboo_Thicket@2x.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Dangerous_Ducklings.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Dangerous_Ducklings@2x.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Diver.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Diver@2x.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Newton_and_the_Hammock.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Newton_and_the_Hammock@2x.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Nobody_Laugh.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Nobody_Laugh@2x.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Spooky_Tree.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Spooky_Tree@2x.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Teamwork.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Teamwork@2x.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_The_Great_Escape.png
share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_The_Great_Escape@2x.png
share/hedgewars/Data/Graphics/Missions/Scenario/portal@2x.png
share/hedgewars/Data/Graphics/Missions/Training/Basic_Training_-_Sniper_Rifle.png
share/hedgewars/Data/Graphics/Missions/Training/Basic_Training_-_Sniper_Rifle@2x.png
share/hedgewars/Data/Graphics/Missions/Training/Challenge_-_Speed_Shoppa_-_Hedgelove@2x.png
share/hedgewars/Data/Graphics/Missions/Training/Challenge_-_Speed_Shoppa_-_Ropes@2x.png
share/hedgewars/Data/Graphics/Missions/Training/Challenge_-_Speed_Shoppa_-_ShoppaKing@2x.png
share/hedgewars/Data/Graphics/Missions/Training/ClimbHome.png
share/hedgewars/Data/Graphics/Missions/Training/ClimbHome@2x.png
share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Bazooka_easy@2x.png
share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Bazooka_hard@2x.png
share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Cluster_Bomb@2x.png
share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Grenade_easy@2x.png
share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Grenade_hard@2x.png
share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Homing_Bee@2x.png
share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Shotgun@2x.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Bamboo_Thicket.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Bamboo_Thicket@2x.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Dangerous_Ducklings.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Dangerous_Ducklings@2x.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Diver.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Diver@2x.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Newton_and_the_Hammock.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Newton_and_the_Hammock@2x.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Nobody_Laugh.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Nobody_Laugh@2x.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_RCPlane_Challenge.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_RCPlane_Challenge@2x.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Rope_Knock_Challenge.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Rope_Knock_Challenge@2x.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Spooky_Tree.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Spooky_Tree@2x.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Teamwork.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Teamwork@2x.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_That_Sinking_Feeling.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_That_Sinking_Feeling@2x.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_The_Great_Escape.png
share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_The_Great_Escape@2x.png
share/hedgewars/Data/Graphics/Missions/Training/portal@2x.png
share/hedgewars/Data/Missions/CMakeLists.txt
share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua
share/hedgewars/Data/Missions/Challenge/CMakeLists.txt
share/hedgewars/Data/Missions/Challenge/Challenge_-_Speed_Shoppa_-_Hedgelove.lua
share/hedgewars/Data/Missions/Challenge/Challenge_-_Speed_Shoppa_-_Ropes.lua
share/hedgewars/Data/Missions/Challenge/Challenge_-_Speed_Shoppa_-_ShoppaKing.lua
share/hedgewars/Data/Missions/Challenge/ClimbHome.lua
share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Bazooka_easy.lua
share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Bazooka_hard.lua
share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Cluster_Bomb.lua
share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Grenade_easy.lua
share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Grenade_hard.lua
share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Homing_Bee.lua
share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Shotgun.lua
share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua
share/hedgewars/Data/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge.lua
share/hedgewars/Data/Missions/Challenge/User_Mission_-_That_Sinking_Feeling.lua
share/hedgewars/Data/Missions/Scenario/CMakeLists.txt
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Bamboo_Thicket.lua
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Dangerous_Ducklings.lua
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Diver.lua
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Newton_and_the_Hammock.lua
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Nobody_Laugh.lua
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Spooky_Tree.lua
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork.lua
share/hedgewars/Data/Missions/Scenario/User_Mission_-_The_Great_Escape.lua
share/hedgewars/Data/Missions/Scenario/portal.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Sniper_Rifle.lua
share/hedgewars/Data/Missions/Training/Challenge_-_Speed_Shoppa_-_Hedgelove.lua
share/hedgewars/Data/Missions/Training/Challenge_-_Speed_Shoppa_-_Ropes.lua
share/hedgewars/Data/Missions/Training/Challenge_-_Speed_Shoppa_-_ShoppaKing.lua
share/hedgewars/Data/Missions/Training/ClimbHome.lua
share/hedgewars/Data/Missions/Training/Target_Practice_-_Bazooka_easy.lua
share/hedgewars/Data/Missions/Training/Target_Practice_-_Bazooka_hard.lua
share/hedgewars/Data/Missions/Training/Target_Practice_-_Cluster_Bomb.lua
share/hedgewars/Data/Missions/Training/Target_Practice_-_Grenade_easy.lua
share/hedgewars/Data/Missions/Training/Target_Practice_-_Grenade_hard.lua
share/hedgewars/Data/Missions/Training/Target_Practice_-_Homing_Bee.lua
share/hedgewars/Data/Missions/Training/Target_Practice_-_Shotgun.lua
share/hedgewars/Data/Missions/Training/User_Mission_-_Bamboo_Thicket.lua
share/hedgewars/Data/Missions/Training/User_Mission_-_Dangerous_Ducklings.lua
share/hedgewars/Data/Missions/Training/User_Mission_-_Diver.lua
share/hedgewars/Data/Missions/Training/User_Mission_-_Newton_and_the_Hammock.lua
share/hedgewars/Data/Missions/Training/User_Mission_-_Nobody_Laugh.lua
share/hedgewars/Data/Missions/Training/User_Mission_-_RCPlane_Challenge.lua
share/hedgewars/Data/Missions/Training/User_Mission_-_Rope_Knock_Challenge.lua
share/hedgewars/Data/Missions/Training/User_Mission_-_Spooky_Tree.lua
share/hedgewars/Data/Missions/Training/User_Mission_-_Teamwork.lua
share/hedgewars/Data/Missions/Training/User_Mission_-_That_Sinking_Feeling.lua
share/hedgewars/Data/Missions/Training/User_Mission_-_The_Great_Escape.lua
share/hedgewars/Data/Missions/Training/portal.lua
--- a/QTfrontend/game.cpp	Sun Nov 20 04:21:24 2016 +0100
+++ b/QTfrontend/game.cpp	Wed Apr 13 14:39:17 2016 +0200
@@ -44,6 +44,7 @@
 // last game info
 QList<QVariant> lastGameStartArgs = QList<QVariant>();
 GameType lastGameType = gtNone;
+QString lastTrainingSubFolder = NULL;
 GameCFGWidget * lastGameCfg = NULL;
 QString lastGameAmmo = NULL;
 TeamSelWidget * lastGameTeamSel = NULL;
@@ -478,14 +479,16 @@
     SetGameState(gsStarted);
 }
 
-void HWGame::StartTraining(const QString & file)
+void HWGame::StartTraining(const QString & file, const QString & subFolder)
 {
     lastGameStartArgs.clear();
     lastGameStartArgs.append(file);
     lastGameType = gtTraining;
+    lastTrainingSubFolder = subFolder;
 
     gameType = gtTraining;
-    training = "Missions/Training/" + file + ".lua";
+
+    training = "Missions/" + subFolder + "/" + file + ".lua";
     demo.clear();
     Start(false);
     SetGameState(gsStarted);
--- a/QTfrontend/game.h	Sun Nov 20 04:21:24 2016 +0100
+++ b/QTfrontend/game.h	Wed Apr 13 14:39:17 2016 +0200
@@ -64,6 +64,7 @@
 // last game info
 extern QList<QVariant> lastGameStartArgs;
 extern GameType lastGameType;
+extern QString lastTrainingSubFolder;
 extern GameCFGWidget * lastGameCfg;
 extern QString lastGameAmmo;
 extern TeamSelWidget * lastGameTeamSel;
@@ -79,7 +80,7 @@
         void StartLocal();
         void StartQuick();
         void StartNet();
-        void StartTraining(const QString & file);
+        void StartTraining(const QString & file, const QString & subFolder);
         void StartCampaign(const QString & camp, const QString & campScript, const QString & campTeam);
         void abort();
         GameState gameState;
--- a/QTfrontend/hwform.cpp	Sun Nov 20 04:21:24 2016 +0100
+++ b/QTfrontend/hwform.cpp	Wed Apr 13 14:39:17 2016 +0200
@@ -318,7 +318,7 @@
     connect(ui.pageSinglePlayer->BtnLoad, SIGNAL(clicked()), this, SLOT(GoToSaves()));
     connect(ui.pageSinglePlayer->BtnDemos, SIGNAL(clicked()), this, SLOT(GoToDemos()));
 
-    connect(ui.pageTraining, SIGNAL(startMission(const QString&)), this, SLOT(startTraining(const QString&)));
+    connect(ui.pageTraining, SIGNAL(startMission(const QString&, const QString&)), this, SLOT(startTraining(const QString&, const QString&)));
 
     connect(ui.pageCampaign->BtnStartCampaign, SIGNAL(clicked()), this, SLOT(StartCampaign()));
     connect(ui.pageCampaign->btnPreview, SIGNAL(clicked()), this, SLOT(StartCampaign()));
@@ -1701,11 +1701,11 @@
     ui.pageVideos->startEncoding(record);
 }
 
-void HWForm::startTraining(const QString & scriptName)
+void HWForm::startTraining(const QString & scriptName, const QString & subFolder)
 {
     CreateGame(0, 0, 0);
 
-    game->StartTraining(scriptName);
+    game->StartTraining(scriptName, subFolder);
 }
 
 void HWForm::StartCampaign()
@@ -2095,7 +2095,7 @@
 
     switch(lastGameType) {
     case gtTraining:
-        game->StartTraining(lastGameStartArgs.at(0).toString());
+        game->StartTraining(lastGameStartArgs.at(0).toString(), lastTrainingSubFolder);
         break;
     case gtQLocal:
         game->StartQuick();
--- a/QTfrontend/hwform.h	Sun Nov 20 04:21:24 2016 +0100
+++ b/QTfrontend/hwform.h	Wed Apr 13 14:39:17 2016 +0200
@@ -95,7 +95,7 @@
         void DeleteWeaponSet();
         void SimpleGame();
         void PlayDemo();
-        void startTraining(const QString&);
+        void startTraining(const QString&, const QString&);
         void StartCampaign();
         void NetConnect();
         void NetConnectServer(const QString & host, quint16 port);
--- a/QTfrontend/ui/page/pagetraining.cpp	Sun Nov 20 04:21:24 2016 +0100
+++ b/QTfrontend/ui/page/pagetraining.cpp	Wed Apr 13 14:39:17 2016 +0200
@@ -73,14 +73,27 @@
     pageLayout->setAlignment(infoLayout, Qt::AlignLeft);
 
 
-    // mission list
-    lstMissions = new QListWidget(this);
-    lstMissions->setWhatsThis(tr("Pick the mission or training to play"));
-    pageLayout->addWidget(lstMissions, 1, 0, 1, 2); // span 2 columns
+    // tab widget containing all lists
+    tbw = new QTabWidget(this);
+    pageLayout->addWidget(tbw, 1, 0, 1, 2); // span 2 columns
+    // let's not make the tab widget use more space than needed
+    tbw->setFixedWidth(400);
+    pageLayout->setAlignment(tbw, Qt::AlignHCenter);
+
+    // training/challenge/scenario lists
+    lstTrainings = new QListWidget(this);
+    lstTrainings ->setWhatsThis(tr("Pick the training to play"));
 
-    // let's not make the list use more space than needed
-    lstMissions->setFixedWidth(400);
-    pageLayout->setAlignment(lstMissions, Qt::AlignHCenter);
+    lstChallenges = new QListWidget(this);
+    lstChallenges ->setWhatsThis(tr("Pick the challenge to play"));
+
+    lstScenarios= new QListWidget(this);
+    lstScenarios->setWhatsThis(tr("Pick the scenario to play"));
+
+    tbw->addTab(lstTrainings, tr("Trainings"));
+    tbw->addTab(lstChallenges, tr("Challenges"));
+    tbw->addTab(lstScenarios, tr("Scenarios"));
+    tbw->setCurrentWidget(lstTrainings);
 
     return pageLayout;
 }
@@ -103,9 +116,20 @@
 
 void PageTraining::connectSignals()
 {
-    connect(lstMissions, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(updateInfo()));
-    connect(lstMissions, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(updateInfo()));
-    connect(lstMissions, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(startSelected()));
+    connect(lstTrainings, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(updateInfo()));
+    connect(lstTrainings, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(updateInfo()));
+    connect(lstTrainings, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(startSelected()));
+
+    connect(lstChallenges, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(updateInfo()));
+    connect(lstChallenges, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(updateInfo()));
+    connect(lstChallenges, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(startSelected()));
+
+    connect(lstScenarios, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(updateInfo()));
+    connect(lstScenarios, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(updateInfo()));
+    connect(lstScenarios, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(startSelected()));
+
+    connect(tbw, SIGNAL(currentChanged(int)), this, SLOT(updateInfo()));
+
     connect(btnPreview, SIGNAL(clicked()), this, SLOT(startSelected()));
     connect(btnStart, SIGNAL(clicked()), this, SLOT(startSelected()));
 }
@@ -140,79 +164,128 @@
     m_info = new QSettings(infoFile, QSettings::IniFormat, this);
     m_info->setIniCodec("UTF-8");
 
-
-    QStringList missionList = dataMgr.entryList(
-                                  "Missions/Training",
-                                  QDir::Files, QStringList("*.lua")).
-                              replaceInStrings(QRegExp("\\.lua$"), "");
-
-    // scripts to lost - TODO: model?
-    foreach (const QString & mission, missionList)
-    {
-        QListWidgetItem * item = new QListWidgetItem(mission);
+    QStringList m_list;
+    QListWidget * m_widget;
+    QString subFolder;
 
-        // fallback name: replace underscores in mission name with spaces
-        QString name = item->text().replace("_", " ");
-
-        // see if we can get a prettier/translated name
-        name = m_info->value(mission + ".name", name).toString();
+    for(int i=1; i<=3; i++) {
+        switch(i) {
+            case 1:
+                subFolder = "Training";
+                m_widget = lstTrainings;
+                break;
+            case 2:
+                subFolder = "Challenge";
+                m_widget = lstChallenges;
+                break;
+            case 3:
+                subFolder = "Scenario";
+                m_widget = lstScenarios;
+                break;
+        }
+        m_list = dataMgr.entryList(
+                    "Missions/" + subFolder,
+                    QDir::Files, QStringList("*.lua")).
+               replaceInStrings(QRegExp("\\.lua$"), "");
 
-        item->setText(name);
+        // scripts to load - TODO: model?
+        foreach (const QString & m_id, m_list)
+        {
+            QListWidgetItem * item = new QListWidgetItem(m_id);
+
+            // fallback name: replace underscores in mission name with spaces
+            QString name = item->text().replace("_", " ");
 
-        // store original name in data
-        item->setData(Qt::UserRole, mission);
+            // see if we can get a prettier/translated name
+            name = m_info->value(m_id + ".name", name).toString();
+
+            item->setText(name);
 
-        lstMissions->addItem(item);
+            // store original name in data
+            item->setData(Qt::UserRole, m_id);
+
+            m_widget->addItem(item);
+        }
     }
 
     updateInfo();
 
     // pre-select first mission
-    if (lstMissions->count() > 0)
-        lstMissions->setCurrentRow(0);
+    if (lstTrainings->count() > 0)
+        lstTrainings->setCurrentRow(0);
+
+    if (lstChallenges->count() > 0)
+        lstChallenges->setCurrentRow(0);
+
+    if (lstScenarios->count() > 0)
+        lstScenarios->setCurrentRow(0);
 }
 
+QString PageTraining::getSubFolderOfSelected()
+{
+    QString subFolder;
+    if (tbw->currentWidget() == lstTrainings) {
+        subFolder = "Training";
+    } else if (tbw->currentWidget() == lstChallenges) {
+        subFolder = "Challenge";
+    } else if (tbw->currentWidget() == lstScenarios) {
+        subFolder = "Scenario";
+    } else {
+        subFolder = "Training";
+    }
+    return subFolder;
+}
 
 void PageTraining::startSelected()
 {
-    QListWidgetItem * curItem = lstMissions->currentItem();
+    QListWidget *list;
+    list = (QListWidget*) tbw->currentWidget();
+    QListWidgetItem * curItem = list->currentItem();
 
     if (curItem != NULL)
-        emit startMission(curItem->data(Qt::UserRole).toString());
+        emit startMission(curItem->data(Qt::UserRole).toString(), getSubFolderOfSelected());
 }
 
 
 void PageTraining::updateInfo()
 {
-    if (lstMissions->currentItem())
+    if (tbw->currentWidget())
     {
-        // TODO also use .pngs in userdata folder
-        QString thumbFile =     "physfs://Graphics/Missions/Training/" +
-                                lstMissions->currentItem()->data(Qt::UserRole).toString() +
-                                "@2x.png";
+        QString subFolder;
+        QListWidget *list;
+        subFolder = getSubFolderOfSelected();
+        list = (QListWidget*) tbw->currentWidget();
+        if (list->currentItem())
+        {
+            // TODO also use .pngs in userdata folder
+            QString thumbFile =     "physfs://Graphics/Missions/" +
+                                    subFolder + "/" +
+                                    list->currentItem()->data(Qt::UserRole).toString() +
+                                    "@2x.png";
 
-        if (QFile::exists(thumbFile))
-            btnPreview->setIcon(QIcon(thumbFile));
-        else
-            btnPreview->setIcon(QIcon(":/res/Trainings.png"));
-
-        QString realName = lstMissions->currentItem()->data(
-                               Qt::UserRole).toString();
+            if (QFile::exists(thumbFile))
+                btnPreview->setIcon(QIcon(thumbFile));
+            else
+                btnPreview->setIcon(QIcon(":/res/Trainings.png"));
 
-        QString caption = m_info->value(realName + ".name",
-                                        lstMissions->currentItem()->text()).toString();
+            QString realName = list->currentItem()->data(
+                                    Qt::UserRole).toString();
 
-        QString description = m_info->value(realName + ".desc",
-                                            tr("No description available")).toString();
+            QString caption = m_info->value(realName + ".name",
+                                            list->currentItem()->text()).toString();
+
+            QString description = m_info->value(realName + ".desc",
+                                                tr("No description available")).toString();
 
-        lblCaption->setText("<h2>" + caption +"</h2>");
-        lblDescription->setText(description);
-    }
-    else
-    {
-        btnPreview->setIcon(QIcon(":/res/Trainings.png"));
-        lblCaption->setText(tr("Select a mission!"));
-        // TODO better text and tr()
-        lblDescription->setText("");
+            lblCaption->setText("<h2>" + caption +"</h2>");
+            lblDescription->setText(description);
+        }
+        else
+        {
+            btnPreview->setIcon(QIcon(":/res/Trainings.png"));
+            lblCaption->setText(tr("Select a mission!"));
+            // TODO better text and tr()
+            lblDescription->setText("");
+        }
     }
 }
--- a/QTfrontend/ui/page/pagetraining.h	Sun Nov 20 04:21:24 2016 +0100
+++ b/QTfrontend/ui/page/pagetraining.h	Wed Apr 13 14:39:17 2016 +0200
@@ -30,7 +30,7 @@
 
 
     signals:
-        void startMission(const QString & scriptName);
+        void startMission(const QString & scriptName, const QString & subFolder);
 
 
     protected:
@@ -44,8 +44,12 @@
         QPushButton * btnStart;
         QLabel * lblCaption;
         QLabel * lblDescription;
-        QListWidget * lstMissions;
+        QTabWidget * tbw;
+        QListWidget * lstTrainings;
+        QListWidget * lstChallenges;
+        QListWidget * lstScenarios;
         QSettings * m_info;
+        QString getSubFolderOfSelected();
 
 
     private slots:
--- a/share/hedgewars/Data/Graphics/Missions/CMakeLists.txt	Sun Nov 20 04:21:24 2016 +0100
+++ b/share/hedgewars/Data/Graphics/Missions/CMakeLists.txt	Wed Apr 13 14:39:17 2016 +0200
@@ -1,1 +1,3 @@
 add_subdirectory(Training)
+add_subdirectory(Challenge)
+add_subdirectory(Scenario)
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/Basic_Training_-_Sniper_Rifle.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/Basic_Training_-_Sniper_Rifle@2x.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Graphics/Missions/Challenge/CMakeLists.txt	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,5 @@
+file(GLOB MissionPics *@2x.png)
+
+install(FILES
+    ${MissionPics}
+    DESTINATION ${SHAREPATH}Data/Graphics/Missions/Challenge)
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/Challenge_-_Speed_Shoppa_-_Hedgelove@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/Challenge_-_Speed_Shoppa_-_Ropes@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/Challenge_-_Speed_Shoppa_-_ShoppaKing@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/ClimbHome.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/ClimbHome@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Bazooka_easy@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Bazooka_hard@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Cluster_Bomb@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Grenade_easy@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Grenade_hard@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Homing_Bee@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/Target_Practice_-_Shotgun@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/User_Mission_-_RCPlane_Challenge.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/User_Mission_-_RCPlane_Challenge@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/User_Mission_-_That_Sinking_Feeling.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Challenge/User_Mission_-_That_Sinking_Feeling@2x.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Graphics/Missions/Scenario/CMakeLists.txt	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,5 @@
+file(GLOB MissionPics *@2x.png)
+
+install(FILES
+    ${MissionPics}
+    DESTINATION ${SHAREPATH}Data/Graphics/Missions/Scenario)
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Bamboo_Thicket.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Bamboo_Thicket@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Dangerous_Ducklings.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Dangerous_Ducklings@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Diver.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Diver@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Newton_and_the_Hammock.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Newton_and_the_Hammock@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Nobody_Laugh.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Nobody_Laugh@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Spooky_Tree.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Spooky_Tree@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Teamwork.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_Teamwork@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_The_Great_Escape.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/User_Mission_-_The_Great_Escape@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Scenario/portal@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/Basic_Training_-_Sniper_Rifle.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/Basic_Training_-_Sniper_Rifle@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/Challenge_-_Speed_Shoppa_-_Hedgelove@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/Challenge_-_Speed_Shoppa_-_Ropes@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/Challenge_-_Speed_Shoppa_-_ShoppaKing@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/ClimbHome.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/ClimbHome@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Bazooka_easy@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Bazooka_hard@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Cluster_Bomb@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Grenade_easy@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Grenade_hard@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Homing_Bee@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/Target_Practice_-_Shotgun@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Bamboo_Thicket.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Bamboo_Thicket@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Dangerous_Ducklings.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Dangerous_Ducklings@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Diver.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Diver@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Newton_and_the_Hammock.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Newton_and_the_Hammock@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Nobody_Laugh.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Nobody_Laugh@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_RCPlane_Challenge.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_RCPlane_Challenge@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Rope_Knock_Challenge.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Rope_Knock_Challenge@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Spooky_Tree.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Spooky_Tree@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Teamwork.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Teamwork@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_That_Sinking_Feeling.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_That_Sinking_Feeling@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_The_Great_Escape.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_The_Great_Escape@2x.png has changed
Binary file share/hedgewars/Data/Graphics/Missions/Training/portal@2x.png has changed
--- a/share/hedgewars/Data/Missions/CMakeLists.txt	Sun Nov 20 04:21:24 2016 +0100
+++ b/share/hedgewars/Data/Missions/CMakeLists.txt	Wed Apr 13 14:39:17 2016 +0200
@@ -1,2 +1,4 @@
 add_subdirectory(Training)
+add_subdirectory(Challenge)
+add_subdirectory(Scenario)
 add_subdirectory(Campaign)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,363 @@
+-- Hedgewars SniperRifle Training
+-- Scripting Example
+
+-- Lines such as this one are comments - they are ignored
+-- by the game, no matter what kind of text is in there.
+-- It's also possible to place a comment after some real
+-- instruction as you see below. In short, everything
+-- following "--" is ignored.
+
+---------------------------------------------------------------
+-- At first we implement the localization library using loadfile.
+-- This allows us to localize strings without needing to think
+-- about translations.
+-- We can use the function loc(text) to localize a string.
+
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+
+-- This variable will hold the number of destroyed targets.
+local score = 0
+-- This variable will hold the number of shots from the sniper rifle
+local shots = 0
+-- This variable represents the number of targets to destroy.
+local score_goal = 31
+-- This variable controls how many milliseconds/ticks we'd
+-- like to wait before we end the round once all targets
+-- have been destroyed.
+local end_timer = 1000 -- 1000 ms = 1 s
+-- This variable is set to true if the game is lost (i.e.
+-- time runs out).
+local game_lost = false
+-- This variable will point to the hog's gear
+local player = nil
+-- This variable will grab the time left at the end of the round
+local time_goal = 0
+
+local target = nil
+
+local last_hit_time = 0
+
+local cinematic = false
+
+-- This is a custom function to make it easier to
+-- spawn more targets with just one line of code
+-- You may define as many custom functions as you
+-- like.
+function spawnTarget(x, y)
+	-- add a new target gear
+	target = AddGear(x, y, gtTarget, 0, 0, 0, 0)
+	-- have the camera move to the target so the player knows where it is
+	FollowGear(target)
+end
+
+function blowUp(x, y)
+    if cinematic == false then
+        cinematic = true
+        SetCinematicMode(true)
+    end
+	-- adds some TNT
+	gear = AddGear(x, y, gtDynamite, 0, 0, 0, 0)
+end
+
+function onNewTurn()
+	SetWeapon(amSniperRifle)
+end
+
+-- This function is called before the game loads its
+-- resources.
+-- It's one of the predefined function names that will
+-- be called by the game. They give you entry points
+-- where you're able to call your own code using either
+-- provided instructions or custom functions.
+function onGameInit()
+	-- At first we have to overwrite/set some global variables
+	-- that define the map, the game has to load, as well as
+	-- other things such as the game rules to use, etc.
+	-- Things we don't modify here will use their default values.
+
+	-- The base number for the random number generator
+	Seed = 0
+	-- Game settings and rules
+	GameFlags = gfMultiWeapon + gfOneClanMode + gfArtillery
+	-- The time the player has to move each round (in ms)
+	TurnTime = 150000
+	-- The frequency of crate drops
+	CaseFreq = 0
+	-- The number of mines being placed
+	MinesNum = 0
+	-- The number of explosives being placed
+	Explosives = 0
+	-- The delay between each round
+	Delay = 0
+	-- The map to be played
+	Map = "Ropes"
+	-- The theme to be used
+	Theme = "Golf"
+
+	-- Create the player team
+	AddTeam(loc("Sniperz"), 14483456, "Simple", "Island", "Default")
+	-- And add a hog to it
+	player = AddHog(loc("Hunter"), 0, 1, "Sniper")
+	SetGearPosition(player, 602, 1465)
+end
+
+-- This function is called when the round starts
+-- it spawns the first target that has to be destroyed.
+-- In addition it shows the scenario goal(s).
+function onGameStart()
+	-- Disable graph in stats screen
+	SendHealthStatsOff()
+	-- Spawn the first target.
+	spawnTarget(860,1020)
+
+	-- Show some nice mission goals.
+	-- Parameters are: caption, sub caption, description,
+	-- extra text, icon and time to show.
+	-- A negative icon parameter (-n) represents the n-th weapon icon
+	-- A positive icon paramter (n) represents the (n+1)-th mission icon
+	-- A timeframe of 0 is replaced with the default time to show.
+	ShowMission(loc("Sniper Training"), loc("Aiming Practice"), loc("Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."), -amSniperRifle, 0)
+end
+
+-- This function is called every game tick.
+-- Note that there are 1000 ticks within one second.
+-- You shouldn't try to calculate too complicated
+-- code here as this might slow down your game.
+function onGameTick20()
+	if game_lost then
+		return
+	end
+	-- after a target is destroyed, show hog, then target
+	if (target ~= nil) and (TurnTimeLeft + 1300 < last_hit_time) then
+		-- move camera to the target
+		FollowGear(target)
+	elseif TurnTimeLeft + 300 < last_hit_time then
+		-- move camera to the hog
+		FollowGear(player)
+	end
+	-- If time's up, set the game to be lost.
+	-- We actually check the time to be "1 ms" as it
+	-- will be at "0 ms" right at the start of the game.
+	if TurnTimeLeft < 40 and TurnTimeLeft > 0 and score < score_goal and game_lost == false then
+		game_lost = true
+		-- ... and show a short message.
+		AddCaption(loc("Time's up!"))
+		ShowMission(loc("Sniper Training"), loc("Aiming Practice"), loc("Oh no! Time's up! Just try again."), -amSkip, 0)
+		-- and generate the stats and go to the stats screen
+		generateStats()
+		EndGame()
+		-- Just to be sure set the goal time to 1 ms
+		time_goal = 1
+	end
+	-- If the goal is reached or we've lost ...
+	if score == score_goal or game_lost then
+		-- ... check to see if the time we'd like to
+		-- wait has passed and then ...
+		if end_timer == 0 then
+			-- ... end the game ...
+			generateStats()
+			EndGame()
+		else
+			-- ... or just lower the timer by 1.
+			-- Reset the time left to stop the timer
+			TurnTimeLeft = time_goal
+		end
+        end_timer = end_timer - 20
+	end
+end
+
+-- This function is called when the game is initialized
+-- to request the available ammo and probabilities
+function onAmmoStoreInit()
+	-- add an unlimited supply of shotgun ammo
+	SetAmmo(amSniperRifle, 9, 0, 0, 0)
+end
+
+-- This function is called when a new gear is added.
+-- We use it to count the number of shots, which we
+-- in turn use to calculate the final score and stats
+function onGearAdd(gear)
+	if GetGearType(gear) == gtSniperRifleShot then
+		shots = shots + 1
+	end
+end
+
+-- This function is called before a gear is destroyed.
+-- We use it to count the number of targets destroyed.
+function onGearDelete(gear)
+	local gt = GetGearType(gear)
+
+	if gt == gtCase then
+		game_lost = true
+		return
+	end
+
+	if (gt == gtDynamite) and cinematic then
+		cinematic = false
+		SetCinematicMode(false)
+		return
+	end
+
+	if gt == gtTarget then
+		-- remember when the target was hit for adjusting the camera
+		last_hit_time = TurnTimeLeft
+		-- Add one point to our score/counter
+		score = score + 1
+		-- If we haven't reached the goal ...
+		if score < score_goal then
+			-- ... spawn another target.
+			if score == 1 then
+				spawnTarget(1520,1350)
+			elseif score == 2 then
+				spawnTarget(1730,1040)
+			elseif score == 3 then
+				spawnTarget(2080,780)
+			elseif score == 4 then
+				AddCaption(loc("Good so far!") .. " " .. loc("Keep it up!"));
+				blowUp(1730,1226)
+				blowUp(1440,1595)
+				blowUp(1527,1575)
+				blowUp(1614,1595)
+				blowUp(1420,1675)
+				blowUp(1527,1675)
+				blowUp(1634,1675)
+				blowUp(1440,1755)
+				blowUp(1527,1775)
+				blowUp(1614,1755)
+				spawnTarget(1527,1667)
+			elseif score == 5 then
+				spawnTarget(1527,1667)
+			elseif score == 6 then
+				spawnTarget(2175,1300)
+			elseif score == 7 then
+				spawnTarget(2250,940)
+			elseif score == 8 then
+				spawnTarget(2665,1540)
+			elseif score == 9 then
+				spawnTarget(3040,1160)
+			elseif score == 10 then
+				spawnTarget(2930,1500)
+			elseif score == 11 then
+				AddCaption(loc("This one's tricky."));
+				spawnTarget(700,720)
+			elseif score == 12 then
+				AddCaption(loc("Well done."));
+				blowUp(914,1222)
+				blowUp(1050,1222)
+				blowUp(1160,1008)
+				blowUp(1160,1093)
+				blowUp(1160,1188)
+				blowUp(375,911)
+				blowUp(510,911)
+				blowUp(640,911)
+				blowUp(780,911)
+				blowUp(920,911)
+				blowUp(1060,913)
+				blowUp(1198,913)
+				spawnTarget(1200,730)
+			elseif score == 13 then
+				spawnTarget(1200,830)
+			elseif score == 14 then
+				spawnTarget(1430,450)
+			elseif score == 15 then
+				spawnTarget(796,240)
+			elseif score == 16 then
+				spawnTarget(300,10)
+			elseif score == 17 then
+				spawnTarget(2080,820)
+			elseif score == 18 then
+				AddCaption(loc("Demolition is fun!"));
+				blowUp(2110,920)
+				blowUp(2210,920)
+				blowUp(2200,305)
+				blowUp(2300,305)
+				blowUp(2300,400)
+				blowUp(2300,500)
+				blowUp(2300,600)
+				blowUp(2300,700)
+				blowUp(2300,800)
+				blowUp(2300,900)
+				blowUp(2401,305)
+				blowUp(2532,305)
+				blowUp(2663,305)
+				spawnTarget(2300,760)
+			elseif score == 19 then
+				spawnTarget(2300,760)
+			elseif score == 20 then
+				spawnTarget(2738,190)
+			elseif score == 21 then
+				spawnTarget(2590,-100)
+			elseif score == 22 then
+				AddCaption(loc("Will this ever end?"));
+				blowUp(2790,305)
+				blowUp(2930,305)
+				blowUp(3060,305)
+				blowUp(3190,305)
+				blowUp(3310,305)
+				blowUp(3393,613)
+				blowUp(2805,370)
+				blowUp(2805,500)
+				blowUp(2805,630)
+				blowUp(2805,760)
+				blowUp(2805,890)
+				blowUp(3258,370)
+				blowUp(3258,475)
+				blowUp(3264,575)
+				spawnTarget(3230,240)
+			elseif score == 23 then
+				spawnTarget(3230,290)
+			elseif score == 24 then
+				spawnTarget(3670,250)
+			elseif score == 25 then
+				spawnTarget(2620,-100)
+			elseif score == 26 then
+				spawnTarget(2870,300)
+			elseif score == 27 then
+				spawnTarget(3850,900)
+			elseif score == 28 then
+				spawnTarget(3780,300)
+			elseif score == 29 then
+				spawnTarget(3670,0)
+			elseif score == 30 then
+				AddCaption(loc("Last Target!"));
+				spawnTarget(3480,1200)
+			end
+		else
+			if not game_lost then
+			-- Otherwise show that the goal was accomplished
+			ShowMission(loc("Sniper Training"), loc("Aiming Practice"), loc("Congratulations! You've eliminated all targets|within the allowed time frame."), 0, 0)
+			-- Also let the hogs shout "victory!"
+			PlaySound(sndVictory)
+			-- Save the time left so we may keep it.
+			time_goal = TurnTimeLeft
+			end
+		end
+	end
+end
+
+-- This function calculates the final score of the player and provides some texts and
+-- data for the final stats screen
+function generateStats()
+	local accuracy = (score/shots)*100
+	local end_score_targets = (score * 200)
+	local end_score_overall
+	if not game_lost then
+		local end_score_time = math.ceil(time_goal/5)
+		local end_score_accuracy = math.ceil(accuracy * 100)
+		end_score_overall = end_score_time + end_score_targets + end_score_accuracy
+
+		SendStat(siGameResult, loc("You have successfully finished the sniper rifle training!"))
+		SendStat(siCustomAchievement, string.format(loc("You have destroyed %d of %d targets (+%d points)."), score, score_goal, end_score_targets))
+		SendStat(siCustomAchievement, string.format(loc("You have made %d shots."), shots))
+		SendStat(siCustomAchievement, string.format(loc("Accuracy bonus: +%d points"), end_score_accuracy))
+		SendStat(siCustomAchievement, string.format(loc("You had %.2fs remaining on the clock (+%d points)."), (time_goal/1000), end_score_time))
+	else
+		SendStat(siGameResult, loc("You lose!"))
+
+		SendStat(siCustomAchievement, string.format(loc("You have destroyed %d of %d targets (+%d points)."), score, score_goal, end_score_targets))
+		SendStat(siCustomAchievement, string.format(loc("You have made %d shots."), shots))
+		end_score_overall = end_score_targets
+	end
+	SendStat(siPlayerKills, tostring(end_score_overall), loc("Sniperz"))
+	SendStat(siPointType, loc("points"))
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/CMakeLists.txt	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,5 @@
+file(GLOB Scripts *.lua)
+
+install(FILES
+    ${Scripts}
+    DESTINATION ${SHAREPATH}Data/Missions/Challenge)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/Challenge_-_Speed_Shoppa_-_Hedgelove.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,38 @@
+HedgewarsScriptLoad("/Scripts/SpeedShoppa.lua")
+
+local params = {}
+params.missionTitle = loc("Shoppa Love")
+params.teamName = loc("Team of Hearts")
+params.hogName = loc("Heartful")
+params.teamFlag = "cm_iluvu"
+params.teamGrave = "heart"
+params.hogHat = "pinksunhat"
+params.crateType = "health"
+params.faceLeft = true
+
+params.time = 45000
+params.map = "Hedgelove"
+params.theme = "Nature"
+
+params.hog_x = 410
+params.hog_y = 934
+params.crates = {
+	{ x = 183, y = 710 },
+	{ x = 202, y = 519 },
+	{ x = 336, y = 356 },
+	{ x = 658, y = 363 },
+	{ x = 1029, y = 39 },
+	{ x = 758, y = 879 },
+	{ x = 1324, y = 896 },
+	{ x = 1410, y = 390 },
+	{ x = 1746, y = 348 },
+	{ x = 1870, y = 538 },
+	{ x = 1884, y = 723 },
+	{ x = 1682, y = 970 },
+}
+params.extra_onGameStart = function()
+	PlaceGirder(394, 1000, 0)
+	PlaceGirder(1696, 1000, 0)
+end
+
+SpeedShoppaMission(params)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/Challenge_-_Speed_Shoppa_-_Ropes.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,43 @@
+HedgewarsScriptLoad("/Scripts/SpeedShoppa.lua")
+
+local params = {}
+params.missionTitle = loc("Ropes and Crates")
+params.teamName = loc("Shoppa Union")
+params.hogName = loc("Hook")
+params.teamFlag = "cm_shoppa"
+params.hogHat = "NoHat"
+
+params.time = 115000
+params.map = "Ropes"
+params.theme = "City"
+
+params.hog_x = 3754
+params.hog_y = 1742
+params.crates = {
+	{ x = 3533, y = 1404 },
+	{ x = 3884, y = 1048 },
+	{ x = 3366, y = 664 },
+	{ x = 3162, y = 630 },
+	{ x = 2872, y = 402 },
+	{ x = 3812, y = 322 },
+	{ x = 3685, y = 34 },
+	{ x = 3324, y = 540 },
+	{ x = 2666, y = 224 },
+	{ x = 2380, y = 1002 },
+	{ x = 2224, y = 1008 },
+	{ x = 2226, y = 854 },
+	{ x = 3274, y = 1754 },
+	{ x = 3016, y = 1278 },
+	{ x = 2756, y = 1716 },
+	{ x = 2334, y = 1756 },
+	{ x = 1716, y = 1752 },
+	{ x = 1526, y = 1464 },
+	{ x = 356, y = 1734 },
+	{ x = 598, y = 1444 },
+	{ x = 1084, y = 1150 },
+	{ x = 358, y = 834 },
+	{ x = 936, y = 200 },
+	{ x = 1540, y = 514 },
+}
+
+SpeedShoppaMission(params)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/Challenge_-_Speed_Shoppa_-_ShoppaKing.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,54 @@
+HedgewarsScriptLoad("/Scripts/SpeedShoppa.lua")
+
+local params = {}
+params.missionTitle = loc("The Customer is King")
+params.teamName = loc("Shoppa Union")
+params.hogName = loc("King Customer")
+params.teamFlag = "cm_shoppa"
+params.teamGrave = "money"
+params.hogHat = "crown"
+
+params.time = 160000
+params.map = "ShoppaKing"
+params.theme = "Castle"
+
+params.hog_x = 543
+params.hog_y = 1167
+params.crates = {
+	{ x = 170, y = 172 },
+	{ x = 216, y = 478 },
+	{ x = 616, y = 966 },
+	{ x = 291, y = 1898 },
+	{ x = 486, y = 1965 },
+	{ x = 852, y = 1289 },
+	{ x = 1224, y = 1625 },
+	{ x = 925, y = 584 },
+	{ x = 2013, y = 141 },
+	{ x = 2250, y = 351 },
+	{ x = 2250, y = 537 },
+	{ x = 2472, y = 513 },
+	{ x = 1974, y = 459 },
+	{ x = 1995, y = 1068 },
+	{ x = 2385, y = 1788 },
+	{ x = 1698, y = 1725 },
+	{ x = 2913, y = 1092 },
+	{ x = 3972, y = 1788 },
+	{ x = 3762, y = 1635 },
+	{ x = 2577, y = 1473 },
+	{ x = 3612, y = 1068 },
+	{ x = 3945, y = 687 },
+	{ x = 2883, y = 618 },
+	{ x = 3543, y = 471 },
+	{ x = 3636, y = 306 },
+	{ x = 3210, y = 321 },
+	{ x = 3426, y = 126 },
+	{ x = 3033, y = 1590 },
+	{ x = 3774, y = 1341 },
+	{ x = 1254, y = 297 },
+	{ x = 1300, y = 1022 },
+	{ x = 1410, y = 1292 },
+	{ x = 868, y = 1812 },
+	{ x = 3426, y = 954 },
+}
+
+SpeedShoppaMission(params)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/ClimbHome.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,34 @@
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+
+isSinglePlayer = true
+
+-- trying to allow random theme, but fixed theme objects...
+-- Also skip some ugly themes, or ones where the sky is "meh"
+--local themes = { "Art","Cake","City","EarthRise","Halloween","Olympics","Underwater","Bamboo","Castle","Compost","Eyes","Hell","Planes","Bath","Cave","CrazyMission","Freeway","Island","Sheep","Blox","Cheese","Deepspace","Fruit","Jungle","Snow","Brick","Christmas","Desert","Golf","Nature","Stage" }
+local themes = {"Christmas","Hell","Bamboo","City","Island","Bath","Compost","Jungle","Desert","Nature","Olympics","Brick","EarthRise","Sheep","Cake","Freeway","Snow","Castle","Fruit","Stage","Cave","Golf","Cheese","Halloween"}
+local totalHedgehogs = 0
+local HH = {}
+local teams = {}
+local dummyHog = nil
+
+
+function onGameInit()
+    -- Ensure people get same map for same theme
+    Theme = themes[GetRandom(#themes)+1]
+    Seed = ClimbHome
+    TurnTime = 999999999
+    EnableGameFlags(gfOneClanMode)
+    DisableGameFlags(gfBottomBorder+gfBorder)
+    CaseFreq = 0
+    Explosives = 0
+    MineDudPercent = 0
+    Map = "ClimbHome"
+    AddTeam(loc("Lonely Hog"), 0xDD0000, "Simple", "Island", "Default")
+    player = AddHog(loc("Climber"), 0, 1, "NoHat")
+    if showWaterStats then
+        dummyHog = AddHog(" ", 0, 1, "NoHat")
+        HH[dummyHog] = nil
+        totalHedgehogs = totalHedgehogs - 1
+        SendStat(siClanHealth, tostring(32640), " ")
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Bazooka_easy.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,35 @@
+HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
+
+local params = {
+	ammoType = amBazooka,
+	gearType = gtShell,
+	missionTitle = loc("Target Practice: Bazooka (easy)"),
+	wind = 50,
+	solidLand = true,
+	map = "Lonely_Island",
+	theme = "Island",
+	hog_x = 1439,
+	hog_y = 482,
+	hogName = loc("Zook"),
+	hogHat = "war_americanww2helmet",
+	teamName = loc("Team Zook"),
+	targets = {
+		{ x = 1310, y = 756 },
+		{ x = 1281, y = 893 },
+		{ x = 1376, y = 670 },
+		{ x = 1725, y = 907 },
+		{ x = 1971, y = 914 },
+		{ x = 1098, y = 955 },
+		{ x = 1009, y = 877 },
+		{ x = 930, y = 711 },
+		{ x = 771, y = 744 },
+		{ x = 385, y = 405 },
+		{ x = 442, y = 780 },
+		{ x = 620, y = 639 },
+		{ x = 311, y = 239 },
+	},
+	time = 80000,
+	shootText = loc("You have launched %d bazookas."),
+}
+
+TargetPracticeMission(params)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Bazooka_hard.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,40 @@
+HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
+
+local params = {
+	ammoType = amBazooka,
+	gearType = gtShell,
+	missionTitle = loc("Target Practice: Bazooka (hard)"),
+	wind = 20,
+	solidLand = true,
+	artillery = true,
+	map = "SB_Grassy",
+	theme = "Castle",
+	hog_x = 2112,
+	hog_y = 913,
+	hogName = loc("Zook"),
+	hogHat = "war_americanww2helmet",
+	teamName = loc("Team Zook"),
+	targets = {
+		{ x = 2660, y = 936 },
+		{ x = 2857, y = 629 },
+		{ x = 3044, y = 851 },
+		{ x = 3200, y = 441 },
+		{ x = 2931, y = 440 },
+		{ x = 3264, y = 370 },
+		{ x = 1880, y = 684 },
+		{ x = 1392, y = 672 },
+		{ x = 1587, y = 656 },
+		{ x = 1300, y = 840 },
+		{ x = 952, y = 814 },
+		{ x = 862, y = 634 },
+		{ x = 748, y = 794 },
+		{ x = 639, y = 548 },
+		{ x = 1730, y = 549 },
+		{ x = 1466, y = 566 },
+		{ x = 3716, y = 954 },
+	},
+	time = 180000,
+	shootText = loc("You have launched %d bazookas."),
+}
+
+TargetPracticeMission(params)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Cluster_Bomb.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,33 @@
+HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
+
+local params = {
+	ammoType = amClusterBomb,
+	gearType = gtClusterBomb,
+	missionTitle = loc("Cluster Bomb Training"),
+	solidLand = false,
+	map = "Trash",
+	theme = "Golf",
+	hog_x = 756,
+	hog_y = 370,
+	hogName = loc("Private Nolak"),
+	hogHat = "war_desertgrenadier1",
+	teamName = loc("The Hogies"),
+	targets = {
+		{ x = 628, y = 0 },
+		{ x = 891, y = 0 },
+		{ x = 1309, y = 0 },
+		{ x = 1128, y = 0 },
+		{ x = 410, y = 0 },
+		{ x = 1564, y = 0 },
+		{ x = 1248, y = 476 },
+		{ x = 169, y = 0 },
+		{ x = 1720, y = 0 },
+		{ x = 1441, y = 0 },
+		{ x = 599, y = 0 },
+		{ x = 1638, y = 0 },
+	},
+	time = 180000,
+	shootText = loc("You have thrown %d cluster bombs."),
+}
+
+TargetPracticeMission(params)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Grenade_easy.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,30 @@
+HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
+
+local params = {
+	ammoType = amGrenade,
+	gearType = gtGrenade,
+	missionTitle = loc("Target Practice: Grenade (easy)"),
+	solidLand = true,
+	artillery = true,
+	map = "SB_Crystal",
+	theme = "Cave",
+	hog_x = 2039,
+	hog_y = 684,
+	hogName = loc("Grenadier"),
+	hogHat = "war_desertgrenadier2",
+	teamName = loc("Grenade Group"),
+	targets = {
+		{ x = 1834, y = 747 },
+		{ x = 2308, y = 729 },
+		{ x = 1659, y = 718 },
+		{ x = 1196, y = 704 },
+		{ x = 2650, y = 826 },
+		{ x = 1450, y = 705 },
+		{ x = 2774, y = 848 },
+		{ x = 2970, y = 704 },
+	},
+	time = 80000,
+	shootText = loc("You have thrown %d grenades."),
+}
+
+TargetPracticeMission(params)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Grenade_hard.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,41 @@
+HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
+
+local params = {
+	ammoType = amGrenade,
+	gearType = gtGrenade,
+	missionTitle = loc("Target Practice: Grenade (hard)"),
+	solidLand = true,
+	artillery = true,
+	map = "SB_Crystal",
+	theme = "Cave",
+	hog_x = 1456,
+	hog_y = 669,
+	hogName = loc("Grenadier"),
+	hogHat = "war_desertgrenadier2",
+	teamName = loc("Grenade Group"),
+	targets = {
+		{ x = 1190, y = 694 },
+		{ x = 962, y = 680 },
+		{ x = 1090, y = 489 },
+		{ x = 1664, y = 666 },
+		{ x = 1584, y = 580 },
+		{ x = 2160, y = 738 },
+		{ x = 1836, y = 726 },
+		{ x = 618, y = 753 },
+		{ x = 837, y = 668 },
+		{ x = 2424, y = 405 },
+		{ x = 2310, y = 742 },
+		{ x = 294, y = 897 },
+		{ x = 472, y = 855 },
+		{ x = 2949, y = 724},
+		{ x = 3356, y = 926 },
+		{ x = 3734, y = 918 },
+		{ x = 170, y = 874 },
+		
+		
+	},
+	time = 180000,
+	shootText = loc("You have thrown %d grenades."),
+}
+
+TargetPracticeMission(params)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Homing_Bee.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,35 @@
+HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
+
+local params = {
+	ammoType = amBee,
+	gearType = gtBee,
+	missionTitle = loc("Target Practice: Homing Bee"),
+	solidLand = true,
+	map = "Hedgewars",
+	theme = "Nature",
+	hog_x = 1990,
+	hog_y = 514,
+	hogHat = "NoHat",
+	teamGrave = "bp2",
+	targets = {
+		{ x = 1949, y = 273 },
+		{ x = 1734, y = 322 },
+		{ x = 1574, y = 340 },
+		{ x = 1642, y = 474 },
+		{ x = 2006, y = 356 },
+		{ x = 1104, y = 285 },
+		{ x = 565, y = 440 },
+		{ x = 732, y = 350 },
+		{ x = 2022, y = 396 },
+		{ x = 366, y = 360 },
+		{ x = 556, y = 300 },
+		{ x = 902, y = 306 },
+		{ x = 924, y = 411 },
+		{ x = 227, y = 510 },
+		{ x = 150, y = 300 },
+	},
+	time = 120000,
+	shootText = loc("You have launched %d homing bees."),
+}
+
+TargetPracticeMission(params)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/Target_Practice_-_Shotgun.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,38 @@
+HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
+
+local params = {
+	ammoType = amShotgun,
+	gearType = gtShotgunShot,
+	missionTitle = loc("Target Practice: Shotgun"),
+	solidLand = false,
+	map = "SB_Haunty",
+	theme = "Halloween",
+	hog_x = 320,
+	hog_y = 324,
+	hogHat = "NoHat",
+	hogGrave = "Bones",
+	targets = {
+		{ x = 495, y = 501 },
+		{ x = 227, y = 530 },
+		{ x = 835, y = 934 },
+		{ x = 1075, y = 889 },
+		{ x = 887, y = 915 },
+		{ x = 1148, y = 750 },
+		{ x = 916, y = 915 },
+		{ x = 1211, y = 700 },
+		{ x = 443, y = 505 },
+		{ x = 822, y = 964 },
+		{ x = 1092, y = 819 },
+		{ x = 1301, y = 683 },
+		{ x = 1480, y = 661 },
+		{ x = 1492, y = 786 },
+		{ x = 1605, y = 562 },
+		{ x = 1545, y = 466 },
+		{ x = 1654, y = 392 },
+		{ x = 1580, y = 334 },
+		{ x = 1730, y = 222 },
+	},
+	time = 90000,
+}
+
+TargetPracticeMission(params)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,494 @@
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+
+local player = nil
+local RCGear = nil
+local planesUsed = 0
+local planeTimer = 0
+local planeUhOh = false
+local cratesLeft = 0
+local crateStreak = 0
+local longestCrateStreak = 0
+local commentTimer = 0
+local missiles = 0
+local totalMissiles = 0
+local missileScanTimer = 0
+local nextComment = sndNone
+
+function onGameInit()
+
+	Seed = 1
+	GameFlags = gfInfAttack + gfInvulnerable + gfOneClanMode + gfSolidLand
+
+	TurnTime = 90 * 1000
+
+	Map = "Ropes"
+	Theme = "Eyes"
+
+	CaseFreq = 0
+	MinesNum = 0
+	Explosives = 0
+
+	AddTeam(loc("Wannabe Flyboys"), 14483456, "Simple", "Island", "Default", "Hedgewars")
+	player = AddHog(loc("Ace"), 0, 80, "Gasmask")
+	SetGearPosition(player, 1380, 1500)
+
+end
+
+
+
+function onGameStart()
+
+	SendHealthStatsOff()
+
+	ShowMission     (
+                                loc("RC PLANE TRAINING"),
+                                loc("a Hedgewars challenge"),
+
+                                loc("Collect or destroy all the health crates.") .. "|" ..
+                                loc("Compete to use as few planes as possible!") .. "|" ..
+								"", -amRCPlane, 4000
+                                )
+
+	PlaceGirder(2192, 508, 6)
+	PlaceGirder(2192, 670, 6)
+	PlaceGirder(2193, 792, 2)
+	PlaceGirder(2100, 825, 4)
+	PlaceGirder(2009, 899, 6)
+	PlaceGirder(2084, 992, 4)
+	PlaceGirder(2145, 1087, 6)
+	PlaceGirder(2199, 1235, 5)
+	PlaceGirder(2308, 1296, 0)
+	PlaceGirder(2424, 1234, 7)
+	PlaceGirder(2473, 1129, 2)
+	PlaceGirder(2437, 1046, 1)
+	PlaceGirder(2409, 927, 6)
+	PlaceGirder(2408, 763, 6)
+	PlaceGirder(2404, 540, 6)
+	PlaceGirder(2426, 423, 3)
+	PlaceGirder(2550, 400, 4)
+	PlaceGirder(2668, 425, 1)
+	PlaceGirder(2707, 541, 6)
+	PlaceGirder(2706, 703, 6)
+	PlaceGirder(2705, 867, 6)
+	PlaceGirder(2779, 962, 4)
+	PlaceGirder(2894, 924, 3)
+	PlaceGirder(2908, 802, 6)
+	PlaceGirder(2907, 639, 6)
+	PlaceGirder(3052, 566, 4)
+	PlaceGirder(2971, 394, 4)
+	PlaceGirder(3103, 448, 7)
+	PlaceGirder(3047, 654, 0)
+	PlaceGirder(3043, 746, 6)
+	PlaceGirder(3265, 1583, 6)
+	PlaceGirder(3256, 1491, 4)
+	PlaceGirder(3187, 1401, 6)
+	PlaceGirder(3326, 1400, 6)
+	PlaceGirder(774, 530, 5)
+	PlaceGirder(922, 595, 4)
+	PlaceGirder(1079, 533, 7)
+	PlaceGirder(1139, 386, 6)
+	PlaceGirder(1074, 237, 5)
+	PlaceGirder(723, 381, 6)
+	PlaceGirder(781, 229, 7)
+	PlaceGirder(927, 746, 6)
+	PlaceGirder(874, 736, 0)
+	PlaceGirder(982, 737, 0)
+	PlaceGirder(2430, 1730, 4)
+
+	PlaceGirder(1613, 1104, 7)
+	PlaceGirder(1564, 1256, 6)
+	PlaceGirder(1643, 1341, 5)
+	PlaceGirder(1780, 1372, 4)
+	PlaceGirder(1869, 1296, 7)
+	PlaceGirder(1858, 1163, 5)
+	PlaceGirder(1739, 1044, 5)
+	PlaceGirder(1621, 926, 5)
+	PlaceGirder(1597, 985, 5)
+	PlaceGirder(1449, 939, 4)
+	PlaceGirder(1473, 874, 4)
+	PlaceGirder(2092, 1352, 7)
+	PlaceGirder(2145, 1444, 7)
+	PlaceGirder(2004, 1443, 3)
+	PlaceGirder(1978, 1523, 2)
+	PlaceGirder(2021, 1596, 1)
+	PlaceGirder(2103, 1625, 0)
+	PlaceGirder(2208, 1551, 7)
+	PlaceGirder(2327, 1431, 7)
+	PlaceGirder(2395, 1478, 6)
+	PlaceGirder(2396, 1600, 2)
+	PlaceGirder(2495, 1285, 6)
+	PlaceGirder(2494, 1408, 2)
+	PlaceGirder(2547, 530, 0)
+
+	PlaceGirder(2451, 1551, 0)
+	PlaceGirder(2551, 706, 6)
+	PlaceGirder(2551, 869, 6)
+	PlaceGirder(2623, 1016, 5)
+	PlaceGirder(2773, 1083, 4)
+	PlaceGirder(2924, 1019, 7)
+	PlaceGirder(2568, 1491, 7)
+	PlaceGirder(2618, 1346, 6)
+	PlaceGirder(2674, 1195, 7)
+	PlaceGirder(2822, 1142, 4)
+	PlaceGirder(2963, 1069, 7)
+	PlaceGirder(3067, 938, 5)
+	PlaceGirder(2803, 1373, 2)
+	PlaceGirder(2811, 1559, 2)
+
+	tempG = SpawnHealthCrate(930, 557)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(979, 692)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(876, 703)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(2309, 1260)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(1733, 1127)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(1738, 1320)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(3249, 1460)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(3051, 617)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(2972, 353)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(2548, 358)
+
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(2090, 1580)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(1752, 1753)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(1865, 1758)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(1985, 1760)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(2429, 1760)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(2810, 1480)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(2800, 1277)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(2806, 1107)
+	SetHealth(tempG, 25)
+
+	PlaceGirder(1897, 903, 6)
+	PlaceGirder(1916, 784, 3)
+	PlaceGirder(2010, 732, 4)
+	PlaceGirder(2082, 639, 6)
+	PlaceGirder(2081, 516, 2)
+	PlaceGirder(1985, 487, 4)
+	PlaceGirder(1862, 407, 5)
+	PlaceGirder(1855, 224, 7)
+	PlaceGirder(2006, 163, 4)
+	PlaceGirder(2128, 187, 1)
+	PlaceGirder(2251, 213, 4)
+	PlaceGirder(2413, 213, 4)
+	PlaceGirder(1952, 618, 0)
+	PlaceGirder(957, 1068, 4)
+	PlaceGirder(794, 1069, 4)
+	PlaceGirder(728, 1163, 6)
+	PlaceGirder(728, 1287, 2)
+	PlaceGirder(802, 1342, 4)
+	PlaceGirder(966, 1342, 4)
+	PlaceGirder(674, 1032, 1)
+	PlaceGirder(554, 1011, 4)
+	PlaceGirder(445, 1056, 3)
+	PlaceGirder(422, 1174, 6)
+	PlaceGirder(369, 1341, 5)
+	PlaceGirder(495, 1313, 5)
+	PlaceGirder(568, 1379, 3)
+	PlaceGirder(577, 1202, 2)
+	PlaceGirder(744, 1490, 5)
+	PlaceGirder(760, 1617, 7)
+	PlaceGirder(622, 1693, 4)
+	PlaceGirder(476, 1623, 5)
+	PlaceGirder(376, 1697, 1)
+	PlaceGirder(955, 1746, 2)
+	PlaceGirder(1025, 1746, 2)
+	PlaceGirder(1090, 1745, 2)
+	PlaceGirder(1156, 1746, 2)
+	PlaceGirder(3806, 1530, 2)
+	PlaceGirder(3880, 1464, 2)
+	PlaceGirder(3738, 1458, 2)
+	PlaceGirder(3806, 1390, 2)
+	PlaceGirder(3805, 1588, 0)
+	PlaceGirder(3676, 1609, 3)
+	PlaceGirder(3930, 1615, 1)
+	PlaceGirder(3719, 1295, 0)
+	PlaceGirder(3888, 1294, 0)
+	PlaceGirder(3661, 1385, 2)
+	PlaceGirder(3955, 1377, 2)
+	PlaceGirder(3982, 1518, 0)
+	PlaceGirder(3378, 440, 2)
+	PlaceGirder(3447, 492, 4)
+	PlaceGirder(3564, 529, 1)
+	PlaceGirder(3596, 647, 6)
+	PlaceGirder(3521, 740, 4)
+	PlaceGirder(3524, 838, 4)
+	PlaceGirder(3644, 819, 3)
+	PlaceGirder(3691, 708, 6)
+	PlaceGirder(3690, 545, 6)
+	PlaceGirder(3612, 433, 5)
+	PlaceGirder(3463, 383, 4)
+	PlaceGirder(2815, 122, 7)
+	PlaceGirder(2960, 72, 4)
+	PlaceGirder(3032, 123, 2)
+	PlaceGirder(3063, 174, 0)
+	PlaceGirder(3095, 124, 2)
+	PlaceGirder(3169, 71, 4)
+	PlaceGirder(3320, 124, 5)
+	PlaceGirder(3210, 179, 2)
+	PlaceGirder(2932, 181, 2)
+
+	tempG = SpawnHealthCrate(3804, 1461)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(3269, 1742)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(3066, 121)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(3207, 104)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(2928, 103)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(1997, 202)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(2253, 159)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(2132, 774)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(2549, 490)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(3527, 694)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(3777, 78)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(1124, 1746)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(1056, 1740)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(993, 1742)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(799, 1298)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(577, 1126)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(596, 1463)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(3854, 1043)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(1944, 567)
+	SetHealth(tempG, 25)
+	tempG = SpawnHealthCrate(338, 1748)
+	SetHealth(tempG, 25)
+
+
+end
+
+--function onGameTick()
+
+	--if RCGear ~= nil then
+	--	AddCaption(GetTimer(RCGear))
+	--end
+
+--end
+
+function onGameTick20()
+	if RCGear ~= nil then
+		if(GetTimer(RCGear) < 3000 and planeUhOh == false) then
+			PlaySound(sndUhOh, player)
+			planeUhOh = true
+		end
+		planeTimer = planeTimer + 20
+	end
+	if commentTimer > 0 then
+		commentTimer = commentTimer - 20
+	elseif(nextComment ~= sndNone) then
+		PlaySound(nextComment, player)
+		nextComment = sndNone
+	end
+	if missileScanTimer > 0 then
+		missileScanTimer = missileScanTimer - 20
+	else
+		if crateStreak == 0 and missiles == 3 then
+			PlaySound(sndMissed, player)
+			missiles = 4
+		end
+	end
+end
+
+function onNewTurn()
+	TurnTimeLeft = -1
+end
+
+function onGearAdd(gear)
+
+	if GetGearType(gear) == gtRCPlane then
+		RCGear = gear
+		planesUsed = planesUsed + 1
+		planeTimer = 0
+		missiles = 0
+	end
+
+	if GetGearType(gear) == gtCase then
+		cratesLeft = cratesLeft + 1
+	end
+
+	if GetGearType(gear) == gtAirBomb then
+		totalMissiles = totalMissiles + 1
+	end
+end
+
+function onGearDelete(gear)
+
+	if GetGearType(gear) == gtRCPlane then
+
+		RCGear = nil
+		planeUhOh = false
+		missiles = 0
+		AddCaption(string.format(loc("Planes used: %d"), planesUsed))
+
+		if(planeTimer < 2000 and crateStreak == 0) then
+			nextComment = sndStupid
+			commentTimer = math.min(2000-planeTimer, 800)
+		elseif(planeTimer < 5000 and crateStreak == 0) then
+			PlaySound(sndOops, player)
+		elseif(planesUsed == 72) then
+			PlaySound(sndStupid, player)
+		elseif(planesUsed == 50) then
+			PlaySound(sndNutter, player)
+		elseif(planesUsed == 30) then
+			PlaySound(sndOops, player)
+		end
+
+		crateStreak = 0
+
+	elseif GetGearType(gear) == gtAirBomb then
+		missiles = missiles + 1
+		missileScanTimer = 500
+
+	elseif GetGearType(gear) == gtCase then
+
+		cratesLeft = cratesLeft - 1
+		crateStreak = crateStreak + 1
+		if(crateStreak > longestCrateStreak) then
+			longestCrateStreak = crateStreak
+		end
+
+		AddCaption(string.format(loc("Crates left: %d"), cratesLeft))
+
+		if cratesLeft == 0 then
+
+			local rank = "unknown"
+			local color = 0xFFFFFFFF
+			local sound = sndVictory
+			if planesUsed >= 156 then
+				rank = loc("Destroyer of planes")	
+				color = 0xD06700FF
+				sound = sndLaugh
+			elseif planesUsed >= 98 then
+				rank = loc("Hopeless case")
+				color = 0xFF0000FF
+			elseif planesUsed >= 72 then
+				rank = loc("Drunk greenhorn")
+				color = 0xFF0040FF
+			elseif planesUsed >= 50 then
+				rank = loc("Greenhorn") -- a.k.a. "absolute beginner"
+				color = 0xFF0080FF
+			elseif planesUsed >= 39 then
+				rank = loc("Beginner")
+				color = 0xFF00BFFF
+			elseif planesUsed >= 30 then
+				rank = loc("Experienced beginner")
+				color = 0xFF00CCFF
+			elseif planesUsed >= 21 then
+				rank = loc("Below-average pilot")
+				color = 0xFF00FFFF
+			elseif planesUsed >= 17 then
+				rank = loc("Average pilot")				
+				color = 0xBF00FFFF
+			elseif planesUsed >= 13 then
+				rank = loc("Above-average pilot")
+				color = 0x8000FFFF
+			elseif planesUsed >= 8 then
+				rank = loc("Professional pilot")
+				color = 0x4000FFFF
+			elseif planesUsed >= 5 then
+				rank = loc("Professional stunt pilot")
+				color = 0x0000FFFF
+			elseif planesUsed >= 3 then
+				rank = loc("Elite pilot")
+				color = 0x0040FFFF
+			elseif planesUsed == 2 then
+				rank = loc("Upper-class elite pilot")
+				color = 0x0080FFFF
+			elseif planesUsed == 1 then
+				rank = loc("Top-class elite pilot")
+				color = 0x00FFFFFF
+				sound = sndFlawless
+			else
+				rank = loc("Cheater")
+				color = 0xFF0000FF
+				sound = sndCoward
+			end
+			AddCaption(string.format(loc("Rank: %s"), rank), color, capgrpMessage2)
+			SendStat(siCustomAchievement, string.format(loc("Your rank: %s"), rank))
+			if planesUsed == 1 then
+				AddCaption(loc("Flawless victory!"))
+				SendStat(siGameResult, loc("You have perfectly beaten the challenge!"))
+				SendStat(siCustomAchievement, loc("You have used only 1 RC plane. Outstanding!"))
+			else
+				AddCaption(loc("Victory!"))
+				SendStat(siGameResult, loc("You have finished the challenge!"))
+				SendStat(siCustomAchievement, string.format(loc("You have used %d RC planes."), planesUsed))
+			end
+		
+			if(totalMissiles > 1) then
+				SendStat(siCustomAchievement, string.format(loc("You have dropped %d missiles."), totalMissiles))
+			end
+
+			if(longestCrateStreak > 5) then
+				if(planesUsed == 1) then
+					SendStat(siCustomAchievement, string.format(loc("In your best (and only) flight you took out %d crates with one RC plane!"), longestCrateStreak))
+				else
+					SendStat(siCustomAchievement, string.format(loc("In your best flight you took out %d crates with one RC plane."), longestCrateStreak))
+				end
+			end
+
+			if(planesUsed == 2) then
+				SendStat(siCustomAchievement, loc("This was an awesome performance! But this challenge can be finished with even just one RC plane. Can you figure out how?"))
+			end
+			if(planesUsed == 1) then
+				SendStat(siCustomAchievement, loc("Congratulations! You have truly mastered this challenge! Don't forget to save the demo."))
+				SendStat(siCustomAchievement, string.format(loc("You have gained an achievement: %s"), loc("Prestigious Pilot")))
+			end
+
+			ShowMission     (
+                                loc("CHALLENGE COMPLETE"),
+                                loc("Congratulations!"),
+                                string.format(loc("Planes used: %d"), planesUsed) .. "|" ..
+                                "", 0, 0
+                                )
+			SetState(player, gstWinner)
+			PlaySound(sound, player)
+
+
+			DismissTeam(loc("Wannabe Flyboys"))
+			EndGame()
+		end
+
+		if RCGear ~= nil then
+			SetTimer(RCGear, GetTimer(RCGear) + 10000)
+		end
+	end
+
+end
+
+function onAmmoStoreInit()
+	SetAmmo(amRCPlane, 9, 0, 0, 0)
+end
+
+function onNewTurn()
+ 	SetWeapon(amRCPlane)
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,273 @@
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+
+local hhs = {}
+local missionWon = nil
+local endTimer = 1000
+local hogsKilled = 0
+local finishTime
+
+local HogData =	{
+					{"Bufon", 			"ShaggyYeti",false},
+					{"burp", 			"lambda",false},
+					{"Blue", 			"cap_blue",false},
+					{"bender", 			"NoHat",false},
+					{"Castell",			"NoHat",false},
+					{"cekoto", 			"NoHat",false},
+					{"CheezeMonkey",	"NoHat",false},
+					{"claymore", 		"NoHat",false},
+					{"CIA-144", 		"cyborg1",false},
+					{"doomy ", 			"NoHat",false},
+					{"Falkenauge", 		"NoHat",false},
+					{"FadeOne", 		"NoHat",false},
+					{"hayaa", 			"NoHat",false},
+					{"Hermes", 			"laurel",false},
+					{"HedgeKing",		"NoHat",false},
+					{"Izack1535", 		"NoHat",false},
+					{"Kiofspa", 		"NoHat",false},
+					{"Komplex", 		"NoHat",false},
+					{"koda", 			"poke_mudkip",false},
+					{"Lalo", 			"NoHat",false},
+					{"Logan", 			"NoHat",false},
+					{"lollkiller", 		"NoHat",false},
+					{"Luelle", 			"NoHat",false},
+					{"mikade", 			"Skull",false},
+					{"Mushi", 			"sm_daisy",false},
+					{"Naboo", 			"NoHat",false},
+					{"nemo", 			"bb_bub",false},
+					{"practice", 		"NoHat",false},
+					{"Prof. Panic",  	"NoHat",false},
+					{"Randy",			"zoo_Sheep",false},
+					{"rhino", 			"NinjaTriangle",false},
+					{"Radissthor",  	"NoHat",false},
+					{"Sami",			"sm_peach",false},
+					{"soreau", 			"NoHat",false},
+					{"sdw195", 			"NoHat",false},
+					{"sphrix", 			"TeamTopHat",false},
+					{"sheepluva",		"zoo_Sheep",false},
+					{"Smaxx", 			"NoHat",false},
+					{"shadowzero", 		"NoHat",false},
+					{"Star and Moon",	"SparkleSuperFun",false},
+					{"The 24",			"NoHat",false},
+					{"TLD",				"NoHat",false},
+					{"Tiyuri", 			"sf_ryu",false},
+					{"unC0Rr", 			"cyborg1",false},
+					{"Waldsau", 		"cyborg1",false},
+					{"wolfmarc", 		"knight",false},
+					{"Xeli", 			"android",false}
+
+				}
+
+function GenericEnd()
+	EndGame()
+end
+
+function GameOverMan()
+	missionWon = false
+	ShowMission(loc("Rope-knocking Challenge"), loc("Challenge over!"), loc("Oh no! Just try again!"), -amSkip, 0)
+	SendStat(siGameResult, loc("Challenge over!"))
+	local score = math.ceil((hogsKilled / 16)*6000)
+	SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, score))
+	SendStat(siPointType, "points")
+	SendStat(siPlayerKills, tostring(score), loc("Wannabe Shoppsta"))
+	PlaySound(sndHellish)
+end
+
+function GG()
+	missionWon = true
+	local completeTime = (TurnTime - finishTime) / 1000
+	ShowMission(loc("Rope-knocking Challenge"), loc("Challenge completed!"), loc("Congratulations!") .. "|" .. string.format(loc("Completion time: %.2fs"), completeTime), 0, 0)
+	PlaySound(sndHomerun)
+	SendStat(siGameResult, loc("Challenge completed!"))
+	local hogScore = math.ceil((hogsKilled / 16)*6000)
+	local timeScore = math.ceil((finishTime/TurnTime)*6000)
+	local score = hogScore + timeScore
+	SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, hogScore))
+	SendStat(siCustomAchievement, string.format(loc("You have completed this challenge in %.2f s (+%d points)."), completeTime, timeScore))
+	SendStat(siPointType, "points")
+	SendStat(siPlayerKills, tostring(score), loc("Wannabe Shoppsta"))
+end
+
+function AssignCharacter(p)
+
+	done = false
+	sanityCheck = 0
+
+	while(done == false) do
+
+		i = 1+ GetRandom(#HogData)
+		if HogData[i][3] == false then
+			HogData[i][3] = true
+			done = true
+			SetHogName(hhs[p], HogData[i][1])
+			SetHogHat(hhs[p], HogData[i][2])
+		elseif HogData[i][3] == true then
+			sanityCheck = sanityCheck +1
+			if sanityCheck == 100 then
+				done = true
+				SetHogName(hhs[p], "Newbie")
+				SetHogHat(hhs[p], "NoHat")
+			end
+		end
+
+	end
+
+end
+
+function onGameInit()
+
+	--Seed = 1
+	GameFlags = gfBorder + gfSolidLand
+
+	TurnTime = 180 * 1000
+	Delay = 500
+	Map = "Ropes"
+	Theme = "Eyes"
+
+	CaseFreq = 0
+	MinesNum = 0
+	Explosives = 0
+
+	AddTeam(loc("Wannabe Shoppsta"), 0x11F12B, "Simple", "Island", "Default", "cm_shoppa")
+	hhs[0] = AddHog(loc("Ace"), 0, 1, "Gasmask")
+	SetGearPosition(player, 1380, 1500)
+
+	AddTeam(loc("Unsuspecting Louts"), 0xDD0000, "Simple", "Island", "Default", "cm_face")
+	for i = 1, 8 do
+		hhs[i] = AddHog("generic", 0, 1, "NoHat")
+	end
+
+	AddTeam(loc("Unlucky Sods"), 0xDD0000, "Simple", "Island", "Default", "cm_balrog")
+	for i = 9, 16 do
+		hhs[i] = AddHog("generic", 0, 1, "NoHat")
+	end
+
+end
+
+
+
+function onGameStart()
+	SendHealthStatsOff()
+
+	ShowMission     (
+                        loc("Rope-knocking Challenge"),
+                        loc("Challenge"),
+                        loc("Use the rope to knock your enemies to their doom.") .. "|" ..
+                        loc("Finish this challenge as fast as possible to earn bonus points."),
+                        -amRope, 4000)
+
+	PlaceGirder(46,1783, 0)
+
+	SetGearPosition(hhs[0], 2419, 1769)
+	SetGearPosition(hhs[1], 3350, 570)
+	SetGearPosition(hhs[2], 3039, 1300)
+	SetGearPosition(hhs[3], 2909, 430)
+	SetGearPosition(hhs[4], 2150, 879)
+	SetGearPosition(hhs[5], 1735, 1136)
+	SetGearPosition(hhs[6], 1563, 553)
+	SetGearPosition(hhs[7], 679, 859)
+	SetGearPosition(hhs[8], 1034, 251)
+	SetGearPosition(hhs[9], 255, 67)
+	SetGearPosition(hhs[10], 2671, 7)
+	SetGearPosition(hhs[11], 2929, 244)
+	SetGearPosition(hhs[12], 1946, 221)
+	SetGearPosition(hhs[13], 3849, 1067)
+	SetGearPosition(hhs[14], 3360, 659)
+	SetGearPosition(hhs[15], 3885, 285)
+	SetGearPosition(hhs[16], 935, 1160)
+
+	for i = 1, 16 do
+		AssignCharacter(i)
+	end
+
+end
+
+function onGameTick()
+
+	if (TurnTimeLeft == 1) and (missionWon == nil) then
+		GameOverMan()
+	end
+
+	if missionWon ~= nil then
+
+		endTimer = endTimer - 1
+		if endTimer == 1 then
+			GenericEnd()
+		end
+
+		if missionWon == true then
+			AddCaption(loc("Victory!"), 0xFFFFFFFF,capgrpGameState)
+		else
+			AddCaption(loc("Challenge over!"), 0xFFFFFFFF,capgrpGameState)
+		end
+
+	end
+
+end
+
+function onGearDamage(gear, damage)
+
+	if gear ~= hhs[0] and GetGearType(gear) == gtHedgehog then
+
+		AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
+		DeleteGear(gear)
+		PlaySound(sndExplosion)
+		AddCaption(string.format(knockTaunt(), GetHogName(gear)), 0xFFFFFFFF, capgrpMessage)
+
+		hogsKilled = hogsKilled +1
+		if hogsKilled == 15 then
+			PlaySound(sndRideOfTheValkyries)
+		elseif hogsKilled == 16 then
+			finishTime = TurnTimeLeft
+			GG()
+		end
+
+	end
+
+end
+
+function knockTaunt()
+	local r = math.random(0,23)
+	local taunt
+	if r == 0 then taunt =		loc("%s has been knocked out.")
+	elseif r == 1 then taunt =	loc("%s hit the ground.")
+	elseif r == 2 then taunt =	loc("%s splatted.")
+	elseif r == 3 then taunt =	loc("%s was smashed.")
+	elseif r == 4 then taunt =	loc("%s felt unstable.")
+	elseif r == 5 then taunt =	loc("%s exploded.")
+	elseif r == 6 then taunt =	loc("%s fell from a high cliff.")
+	elseif r == 7 then taunt =	loc("%s goes the way of the lemming.")
+	elseif r == 8 then taunt =	loc("%s was knocked away.")
+	elseif r == 9 then taunt =	loc("%s was really unlucky.")
+	elseif r == 10 then taunt =	loc("%s felt victim to rope-knocking.")
+	elseif r == 11 then taunt =	loc("%s had no chance.")
+	elseif r == 12 then taunt =	loc("%s was a good target.")
+	elseif r == 13 then taunt =	loc("%s spawned at a really bad position.")
+	elseif r == 14 then taunt =	loc("%s was doomed from the beginning.")
+	elseif r == 15 then taunt =	loc("%s has fallen victim to gravity.")
+	elseif r == 16 then taunt =	loc("%s hates Newton.")		-- Isaac Newton
+	elseif r == 17 then taunt =	loc("%s had it coming.")
+	elseif r == 18 then taunt =	loc("%s is eliminated!")
+	elseif r == 19 then taunt =	loc("%s fell too fast.")
+	elseif r == 20 then taunt =	loc("%s flew like a rock.")
+	elseif r == 21 then taunt =	loc("%s stumpled.")
+	elseif r == 22 then taunt =	loc("%s was shoved away.")
+	elseif r == 23 then taunt =	loc("%s didn't expect that.")
+	end
+	return taunt
+end
+
+function onGearDelete(gear)
+
+	if (gear == hhs[0]) and (missionWon == nil) then
+		GameOverMan()
+	end
+
+end
+
+function onAmmoStoreInit()
+	SetAmmo(amRope, 9, 0, 0, 0)
+end
+
+function onNewTurn()
+ 	SetWeapon(amRope)
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Challenge/User_Mission_-_That_Sinking_Feeling.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,301 @@
+
+
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+
+local player
+local hh = {}
+local hhCount = 8
+local GameOver = false
+local introStage = 0
+local genCounter = 0
+local waterCounter = 0
+local waterPix = 0
+local frig = 0
+local watGear = nil
+local cinematic = false
+
+-- allow skipping of the intro via hitting precise key
+function onPrecise()
+	if introStage < 100 then
+		introStage = 110
+		genCounter = 0
+		FollowGear(CurrentHedgehog)
+		AddCaption(loc("Good luck out there!"))
+		ShowMission(loc("That Sinking Feeling"), loc("Challenge"), loc("Save as many hapless hogs as possible!"), 4, 0)
+		SetInputMask(0xFFFFFFFF)
+	end
+end
+
+function onGameInit()
+
+	Seed = 0
+	GameFlags = gfInfAttack + gfInvulnerable + gfOneClanMode
+	TurnTime = 90000
+	CaseFreq = 0
+	MinesNum = 0
+	MinesTime  = 3000
+	Explosives = 0
+	Delay = 10
+	Map = "Islands"
+	Theme = "City"
+	SuddenDeathTurns = 1
+
+	AddTeam(loc("Hapless Hogs"), 14483456, "Simple", "Island", "Default")
+	hh[0] = AddHog(loc("Sinky"), 1, 100, "fr_lemon")
+	hh[1] = AddHog(loc("Drowner"), 1, 100, "fr_orange")
+	hh[2] = AddHog(loc("Heavy"), 1, 100, "dish_Teapot")
+	hh[3] = AddHog(loc("Clumsy"), 1, 100, "dish_SauceBoatSilver")
+	hh[4] = AddHog(loc("Silly"), 1, 100, "dish_Ladle")
+	hh[5] = AddHog(loc("Careless"), 1, 100, "StrawHatEyes")
+	hh[6] = AddHog(loc("Sponge"), 1, 100, "sf_chunli")
+	hh[7] = AddHog(loc("Deadweight"), 1, 100, "dish_Teacup")
+
+	AddTeam(loc("Nameless Heroes"), 14483456, "Simple", "Island", "Default", "cm_crossedswords")
+	player = AddHog(loc("The Nameless One"), 0, 1, "NoHat")
+
+	SetGearPosition(player, 3992, 733)
+	SetGearPosition(hh[0], 938, 1369)
+	SetGearPosition(hh[1], 1301, 1439)
+	SetGearPosition(hh[2], 2093, 447)
+	SetGearPosition(hh[3], 2971, 926)
+	SetGearPosition(hh[4], 719, 545)
+	SetGearPosition(hh[5], 1630, 821)
+	SetGearPosition(hh[6], 2191, 810)
+	SetGearPosition(hh[7], 3799, 945)
+
+	-- Disable all input except [Precise] for the intro
+	SetInputMask(gmPrecise)
+end
+
+
+function onGameStart()
+    cinematic = true
+    SetCinematicMode(true)
+	SendHealthStatsOff()
+
+	ShowMission(loc("That Sinking Feeling"), loc("Challenge"), loc("Save as many hapless hogs as possible!"), 4, 1)
+
+	HogTurnLeft(hh[0], false)
+	HogTurnLeft(hh[1], true)
+
+	SpawnUtilityCrate(148,265,amLowGravity)
+	SpawnUtilityCrate(2124,1516,amJetpack)
+
+end
+
+
+function onNewTurn()
+	TurnTimeLeft = -1
+end
+
+function onGameTick()
+
+	-- intro sequence
+	if introStage < 100 then
+
+		frig = frig + 1
+		if frig == 50 then
+			frig = 0			
+			AddCaption(loc("Press [Precise] to skip intro"))
+			if watGear ~= nil then			
+				FollowGear(watGear)
+			end
+		end
+
+		
+		--AddCaption(loc("Press [Precise] to skip intro"))
+		genCounter = genCounter + 1
+
+		if introStage == 0 then
+
+						
+			--FollowGear(hh[0])
+
+			if genCounter == 2000 then
+				watGear = hh[0]
+				HogSay(hh[0], loc("This rain is really something..."), SAY_SAY,2)
+			elseif genCounter == 5000 then
+				introStage = 1
+				genCounter = 0
+			end
+
+		elseif introStage == 1 then
+						
+			--FollowGear(hh[1])
+
+			if genCounter == 2000 then
+				watGear = hh[1]
+				HogSay(hh[1], loc("Heh, it's not that bad."), SAY_SAY,2)
+			elseif genCounter == 5000 then
+				introStage = 2
+				genCounter = 0
+			end
+
+		elseif introStage == 2 then
+
+			--FollowGear(hh[0])
+
+			if genCounter == 2000 then
+				watGear = hh[0]
+				HogSay(hh[0], loc("You'd almost swear the water was rising!"), SAY_SHOUT,2)
+			elseif genCounter == 6000 then
+				introStage = 3
+				genCounter = 0
+			end
+
+		elseif introStage == 3 then
+
+			--FollowGear(hh[1])
+
+			if genCounter == 2000 then
+				watGear = hh[1]
+				HogSay(hh[1], loc("Haha, now THAT would be something!"), SAY_SAY,2)
+			elseif genCounter == 6000 then
+				introStage = 4
+				genCounter = 0
+			end
+
+		elseif introStage == 4 then
+
+			--FollowGear(hh[0])
+
+			if genCounter == 2000 then
+				watGear = hh[0]
+				HogSay(hh[0], loc("Hahahaha!"), SAY_SHOUT,2)
+				HogSay(hh[1], loc("Hahahaha!"), SAY_SHOUT,2)
+			elseif genCounter == 3000 then
+				introStage = 5
+				genCounter = 0
+			end
+
+		elseif introStage == 5 then
+
+			--FollowGear(hh[1])
+
+			if genCounter == 2000 then
+				watGear = hh[1]
+				HogSay(hh[0], loc("..."), SAY_THINK,2)
+				HogSay(hh[1], loc("..."), SAY_THINK,2)
+			elseif genCounter == 5000 then
+				introStage = 6
+				genCounter = 0
+			end
+
+		elseif introStage == 6 then
+
+			--FollowGear(hh[0])
+
+			if genCounter == 2000 then
+				watGear = hh[0]
+				HogSay(hh[0], loc("It's a good thing SUDDEN DEATH is 99 turns away..."), SAY_THINK,2)
+			elseif genCounter == 6000 then
+				introStage = 7
+				genCounter = 0
+			end
+
+
+		elseif introStage == 7 then
+
+			if genCounter == 2000 then
+				introStage = 110
+				FollowGear(CurrentHedgehog)
+				ShowMission(loc("That Sinking Feeling"), loc("User Challenge"), loc("Save as many hapless hogs as possible!"), 4, 0)
+				SetInputMask(0xFFFFFFFF)
+			end
+
+		end
+
+	end
+
+	-- start the water rising when the intro is finished
+	if introStage == 110 then
+
+        if cinematic then
+            SetCinematicMode(false)
+            cinematic = false
+        end
+
+		waterCounter = waterCounter + 1
+		if (waterCounter == 100) and (waterPix < 1615) then
+			waterCounter = 0
+			SetTag(AddGear(0, 0, gtWaterUp, 0, 0, 0, 0), 1)
+			waterPix = waterPix +1
+			--AddCaption(waterPix)
+
+			if (waterPix >= 1615) and (GameOver == false) then
+				GameOver = true
+				AddCaption(loc("The flood has stopped! Challenge over."))
+				SendStat(siGameResult, loc("Challenge completed!"))
+				SendStat(siPlayerKills, tostring(hhCount), loc("Nameless Heroes"))
+				SendStat(siPointType, loc("rescues"))
+
+				-- Do not count drowning hedgehogs
+				local hhLeft = hhCount
+				for i=1,#hh do
+					local isDrowning = band(GetState(hh[i]),gstDrowning) ~= 0
+					if isDrowning then
+						hhLeft = hhLeft - 1
+					end
+				end
+
+				SendStat(siCustomAchievement, string.format(loc("You saved %d of 8 Hapless Hogs."), hhLeft))
+
+				if hhLeft == 8 then
+					AddCaption(loc("Achievement obtained: Lively Lifeguard"),0xffba00ff,capgrpMessage2)
+					SendStat(siCustomAchievement, loc("You have obtained an achievement: Lively Lifeguard"))
+				end
+				EndGame()
+
+			end
+
+		end
+
+	end
+end
+
+
+function onAmmoStoreInit()
+
+	SetAmmo(amBazooka, 9, 0, 0, 0)
+
+	SetAmmo(amRope, 9, 0, 0, 0)
+	SetAmmo(amParachute, 9, 0, 0, 0)
+	SetAmmo(amJetpack, 2, 0, 0, 2)
+
+	SetAmmo(amGirder, 9, 0, 0, 0)
+	SetAmmo(amBaseballBat, 9, 0, 0, 0)
+
+	SetAmmo(amTeleport, 1, 0, 0, 1)
+	SetAmmo(amPortalGun, 3, 0, 0, 1)
+
+	SetAmmo(amLowGravity, 0, 0, 0, 1)
+
+end
+
+function onGearDelete(gear)
+
+	if GetGearType(gear) == gtHedgehog then
+		if GetHogTeamName(gear) == loc("Hapless Hogs") then
+			hhCount = hhCount - 1
+			AddCaption(string.format(loc("%d Hapless Hogs left"), hhCount))
+		end
+	end
+
+	if ((gear == player) or (hhCount == 0)) and (GameOver == false) then
+		SetHealth(player, 0)
+		AddCaption(loc("Disqualified!"))
+		if gear == player then
+			SendStat(siCustomAchievement, loc("Your hedgehog died!"))
+			SendStat(siCustomAchievement, loc("You must survive the flood in order to score."))
+		else
+			SendStat(siCustomAchievement, loc("You haven't rescued anyone."))
+		end
+		SendStat(siPlayerKills, "0", loc("Nameless Heroes"))
+		SendStat(siPointType, loc("points"))
+
+		SendStat(siGameResult, loc("Disqualified!"))
+		GameOver = true
+		EndGame()
+	end
+
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Scenario/CMakeLists.txt	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,5 @@
+file(GLOB Scripts *.lua)
+
+install(FILES
+    ${Scripts}
+    DESTINATION ${SHAREPATH}Data/Missions/Scenario)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Bamboo_Thicket.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,88 @@
+
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+
+local player = nil 
+local enemy = nil
+local firedShell = false
+local turnNumber = 0
+
+local hhs = {}
+local numhhs = 0
+
+function onGameInit()
+
+	Seed = 0 
+	TurnTime = 20000 
+	CaseFreq = 0 
+	MinesNum = 0 
+	Explosives = 0 
+	Map = "Bamboo" 
+	Theme = "Bamboo"
+	SuddenDeathTurns = 99999
+
+	AddTeam(loc("Pathetic Resistance"), 14483456, "Simple", "Island", "Default")
+	player = AddHog(loc("Ikeda"), 0, 10, "StrawHat")
+			
+	AddTeam(loc("Cybernetic Empire"), 	1175851, "Simple", "Island", "Default")
+	enemy = AddHog(loc("Unit 835"), 1, 10, "cyborg1")
+
+	SetGearPosition(player,142,656)
+	SetGearPosition(enemy,1824,419)
+
+end
+
+
+function onGameStart()
+
+	ShowMission(loc("Bamboo Thicket"), loc("User Challenge"), loc("Eliminate the enemy before the time runs out"), -amBazooka, 0)
+
+	--WEAPON CRATE LIST. WCRATES: 1
+	SpawnAmmoCrate(891,852,amBazooka)
+	--UTILITY CRATE LIST. UCRATES: 2
+	SpawnUtilityCrate(962,117,amBlowTorch)
+	SpawnUtilityCrate(403,503,amParachute)
+
+	AddAmmo(enemy, amGrenade, 100)
+		
+end
+
+function onNewTurn()
+	SetWind(100)
+	turnNumber = turnNumber + 1
+end
+
+function onAmmoStoreInit()
+	SetAmmo(amSkip, 9, 0, 0, 0)
+	SetAmmo(amGirder, 4, 0, 0, 0)
+	SetAmmo(amBlowTorch, 0, 0, 0, 1)
+	SetAmmo(amParachute, 0, 0, 0, 2)
+	SetAmmo(amBazooka, 0, 0, 0, 2)
+end
+
+
+function onGearAdd(gear)
+
+	if GetGearType(gear) == gtHedgehog then
+		hhs[numhhs] = gear
+		numhhs = numhhs + 1
+	elseif GetGearType(gear) == gtShell then
+		firedShell = true
+	end
+
+end
+
+function onGearDelete(gear)
+
+	if (gear == enemy) then
+		
+		ShowMission(loc("Bamboo Thicket"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
+		
+		if (turnNumber < 6) and (firedShell == false) then
+			AddCaption(loc("Achievement Unlocked") .. ": " .. loc("Energetic Engineer"),0xffba00ff,capgrpMessage2)
+		end
+
+	elseif gear == player then
+		ShowMission(loc("Bamboo Thicket"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
+	end
+
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Dangerous_Ducklings.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,148 @@
+
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+
+local player = nil -- This variable will point to the hog's gear
+local instructor = nil
+local enemy = nil
+
+local speechStage = 0
+
+local gameLost = false
+local gameWon = false
+local notListening = false
+
+local endTimer = 0
+
+function onGameInit()
+
+	-- Things we don't modify here will use their default values.
+
+	Seed = 0 -- The base number for the random number generator
+	GameFlags = gfInfAttack -- Game settings and rules
+	TurnTime = 60000 -- The time the player has to move each round (in ms)
+	CaseFreq = 0 -- The frequency of crate drops
+	MinesNum = 0 -- The number of mines being placed
+	Explosives = 0 -- The number of explosives being placed
+	Delay = 0 -- The delay between each round
+	Map = "Bath" -- The map to be played
+	Theme = "Bath" -- The theme to be used
+	SuddenDeathTurns = 99999
+
+
+	AddTeam(loc("Bloody Rookies"), 14483456, "Simple", "Island", "Default")
+	player = AddHog(loc("Hunter"), 0, 1, "NoHat")
+	instructor = AddHog(loc("Instructor"), 0, 100, "sf_vega")
+
+	AddTeam(loc("Blue Team"), 29439, "Simple", "Island", "Default")
+	enemy = AddHog(loc("Filthy Blue"), 1, 100, "Skull")
+
+	SetGearPosition(player,146,902)
+	SetGearPosition(instructor,317,902)
+	SetGearPosition(enemy,1918,837)
+
+	HogSay(player, ".............................", SAY_THINK)
+	HogTurnLeft(instructor, true)
+
+end
+
+
+function onGameStart()
+
+	SpawnAmmoCrate(475,476,amRope)
+	SpawnAmmoCrate(1729,476,amFirePunch)
+
+	FollowGear(player)
+
+	ShowMission(loc("Dangerous Ducklings"), "", loc("Eliminate the Blue Team"), -amRope, 5000);
+
+end
+
+
+function onGameTick()
+
+
+	-- opening speech
+	if (notListening == false) and (gameLost == false) then
+
+		if (TurnTimeLeft == 58000) and (speechStage == 0)  then
+			HogSay(instructor, loc("Listen up, maggot!!"), SAY_SHOUT)
+			speechStage = 1
+		elseif (TurnTimeLeft == 57000) and (speechStage == 1) then
+			HogSay(player,loc("!!!"),SAY_SHOUT)
+		elseif (TurnTimeLeft == 55000) and (speechStage == 1) then
+			HogSay(instructor, loc("The enemy is hiding out on yonder ducky!"), SAY_SAY)
+			speechStage = 2
+
+		elseif (TurnTimeLeft == 49000) and (speechStage == 2) then
+			FollowGear(enemy)
+		elseif (TurnTimeLeft == 46500) and (speechStage == 2) then
+			FollowGear(instructor)
+			HogSay(instructor, loc("Get on over there and take him out!"), SAY_SAY)
+			speechStage = 3
+		elseif (TurnTimeLeft == 43500) and (speechStage == 3) then
+			HogSay(instructor, loc("GO! GO! GO!"), SAY_SHOUT)
+			speechStage = 4
+			givenSpeech = true
+		end
+
+	end
+
+	-- if player falls in water or if player ignores speech
+	if (CurrentHedgehog ~= nil) and (CurrentHedgehog == player) then
+		if (GetY(player) > WaterLine) and (gameLost == false) then
+			HogSay(instructor, loc("DAMMIT, ROOKIE!"), SAY_SHOUT)
+			gameLost = true
+		end
+
+		if (GetX(player) > 300) and (GetY(player) > 880) and (notListening == false) and (speechStage < 3) then
+			HogSay(instructor, loc("DAMMIT, ROOKIE! GET OFF MY HEAD!"), SAY_SHOUT)
+			notListening = true
+		end
+
+	end
+
+	--player out of time
+	if (TurnTimeLeft == 1) and (gameWon == false) then
+		SetHealth(player, 0)
+	end
+
+	-- meh
+	if gameLost == true then
+		endTimer = endTimer + 1
+		if (CurrentHedgehog ~= nil) and (CurrentHedgehog == instructor) then
+			if endTimer >= 3000 then
+				--SetHealth(instructor,0)
+				TurnTimeLeft = 1
+				DismissTeam(loc("Bloody Rookies"))
+			end
+			ShowMission(loc("MISSION FAILED"), loc(":("), loc("You've failed. Try again."), -amRope, 5000);
+		end
+	end
+
+end
+
+
+function onAmmoStoreInit()
+	SetAmmo(amFirePunch, 0, 0, 0, 1)
+	SetAmmo(amParachute, 1, 0, 0, 0)
+	SetAmmo(amRope, 0, 0, 0, 1)
+end
+
+function onGearDelete(gear)
+	if GetGearType(gear) == gtHedgehog then
+		if gear == player then
+			gameLost = true
+		elseif (gear == instructor) and (GetY(gear) > WaterLine) then
+			HogSay(player, loc("See ya!"), SAY_THINK)
+			TurnTimeLeft = 3000
+			AddCaption(loc("Achievement Unlocked") .. ": " .. loc("Naughty Ninja"),0xffba00ff,capgrpMessage2)
+			DismissTeam(loc("Blue Team"))
+			gameWon = true
+		elseif gear == enemy then
+			HogSay(player, loc("Enjoy the swim..."), SAY_THINK)
+			gameWon = true
+			TurnTimeLeft = 3000
+		end
+
+	end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Diver.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,97 @@
+
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+
+local player = nil -- This variable will point to the hog's gear
+local enemy = nil
+
+local GameOver = false
+
+function onGameInit()
+
+	-- Things we don't modify here will use their default values.
+
+	Seed = 0 -- The base number for the random number generator
+	GameFlags = gfInfAttack + gfDisableWind-- Game settings and rules
+	TurnTime = 90000 -- The time the player has to move each round (in ms)
+	CaseFreq = 0 -- The frequency of crate drops
+	MinesNum = 0 -- The number of mines being placed
+	MinesTime  = 1000
+	Explosives = 0 -- The number of explosives being placed
+	Delay = 10 -- The delay between each round
+	Map = "Hydrant" -- The map to be played
+	Theme = "City" -- The theme to be used
+	SuddenDeathTurns = 99999
+
+	AddTeam(loc("Bloody Rookies"), 14483456, "Simple", "Island", "Default")
+	player = AddHog(loc("Hunter"), 0, 1, "NoHat")
+			
+	AddTeam(loc("Toxic Team"), 	1175851, "Simple", "Island", "Default")
+	enemy = AddHog(loc("Poison"), 1, 100, "Skull")
+
+	SetGearPosition(player,430,516)
+	SetGearPosition(enemy,1464,936)
+
+end
+
+
+function onGameStart()
+
+
+	SpawnAmmoCrate(426,886,amJetpack)
+	SpawnAmmoCrate(1544,690,amFirePunch)
+	SpawnAmmoCrate(950,851,amBlowTorch)
+	SpawnAmmoCrate(1032,853,amParachute)
+
+	AddGear(579, 296, gtMine, 0, 0, 0, 0)
+
+	ShowMission(loc("Operation Diver"), "", loc("Eliminate Poison before the time runs out") .. loc("|- Mines Time:") .. " " .. 1 .. " " .. loc("sec"), -amFirePunch, 0);
+	--SetTag(AddGear(0, 0, gtATSmoothWindCh, 0, 0, 0, 1), -70)
+
+	SetWind(-100)
+
+end
+
+
+function onGameTick()
+
+
+	if (TotalRounds == 3) and (GameOver == false) then
+		SetHealth(player, 0)
+		GameOver = true
+	end
+
+	if TurnTimeLeft == 1 then
+		SetHealth(player, 0)
+		GameOver = true
+	end
+
+end
+
+
+function onAmmoStoreInit()
+	SetAmmo(amFirePunch, 1, 0, 0, 1)
+	SetAmmo(amBlowTorch, 0, 0, 0, 1)
+	SetAmmo(amGirder, 1, 0, 0, 0)
+	SetAmmo(amParachute, 0, 0, 0, 1)
+	SetAmmo(amJetpack, 0, 0, 0, 1)
+end
+
+
+function onGearAdd(gear)
+
+	if GetGearType(gear) == gtJetpack then
+		SetHealth(gear,1000)
+	end
+
+end
+
+function onGearDelete(gear)
+
+	if (gear == enemy) and (GameOver == false) then
+		ShowMission(loc("Operation Diver"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
+	elseif gear == player then
+		ShowMission(loc("Operation Diver"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)		
+		GameOver = true
+	end
+
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Newton_and_the_Hammock.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,132 @@
+
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+
+local player = nil 
+local enemy = nil
+local failed = false
+
+local hhs = {}
+local numhhs = 0
+
+function onGameInit()
+
+	Seed = 0
+	TurnTime = 60000 
+	CaseFreq = 0
+	MinesTime  = 1000
+	SuddenDeathTurns = 999999
+	HealthCaseProb = 35
+	Explosives = 0
+	MinesNum = 0
+	Map = "Hammock" 
+	Theme = "Nature"
+
+	AddTeam(loc("Pathetic Resistance"), 14483456, "Simple", "Island", "Default")
+	player = AddHog(loc("Ikeda"), 0, 48, "StrawHat")
+			
+	AddTeam(loc("Cybernetic Empire"), 	1175851, "Simple", "Island", "Default")
+	enemy = AddHog(loc("Unit") .. " 811", 1, 100, "cyborg1")
+
+	SetGearPosition(player,430,1540)
+	SetGearPosition(enemy,1464,1960)
+
+end
+
+
+function onGameStart()
+
+	AddAmmo(enemy, amShotgun, 100)
+	AddAmmo(enemy, amFirePunch, 100)
+
+	--GIRDER LIST. 
+	PlaceGirder(1073,2009,0)
+	PlaceGirder(524,1487,3)
+	PlaceGirder(638,1453,4)
+	PlaceGirder(761,1453,0)
+	PlaceGirder(840,1421,3)
+	PlaceGirder(302,1388,6)
+	PlaceGirder(327,1506,1)
+	PlaceGirder(1669,1832,3)
+	--MINE LIST. 
+	AddGear(1056,1987,gtMine, 0, 0, 0, 0)
+	AddGear(1086,1988,gtMine, 0, 0, 0, 0)
+	--STICKY MINE LIST. 
+	AddGear(1089,965,gtSMine, 0, 0, 0, 0)
+	AddGear(1133,945,gtSMine, 0, 0, 0, 0)	
+	AddGear(1010,1081,gtSMine, 0, 0, 0, 0)
+	AddGear(1036,1049,gtSMine, 0, 0, 0, 0)
+	AddGear(1057,1004,gtSMine, 0, 0, 0, 0)
+	AddGear(784,1252,gtSMine, 0, 0, 0, 0)
+	AddGear(841,1257,gtSMine, 0, 0, 0, 0)
+	AddGear(902,1263,gtSMine, 0, 0, 0, 0)
+	AddGear(952,1281,gtSMine, 0, 0, 0, 0)
+	AddGear(517,1546,gtSMine, 0, 0, 0, 0)
+	AddGear(559,1597,gtSMine, 0, 0, 0, 0)
+	AddGear(613,1650,gtSMine, 0, 0, 0, 0)
+	AddGear(674,1705,gtSMine, 0, 0, 0, 0)
+	AddGear(746,1692,gtSMine, 0, 0, 0, 0)
+	AddGear(810,1692,gtSMine, 0, 0, 0, 0)
+	AddGear(872,1673,gtSMine, 0, 0, 0, 0)
+	AddGear(933,1666,gtSMine, 0, 0, 0, 0)
+	AddGear(981,1662,gtSMine, 0, 0, 0, 0)
+	AddGear(1016,1634,gtSMine, 0, 0, 0, 0)
+	AddGear(1063,1595,gtSMine, 0, 0, 0, 0)
+	AddGear(1100,1574,gtSMine, 0, 0, 0, 0)
+	AddGear(1002,1461,gtSMine, 0, 0, 0, 0)
+	AddGear(1052,1438,gtSMine, 0, 0, 0, 0)
+	AddGear(1102,1464,gtSMine, 0, 0, 0, 0)
+	--WEAPON CRATE LIST. 
+	SpawnAmmoCrate(1565,642,amSineGun)
+	SpawnAmmoCrate(548,858,amBazooka)
+	--UTILITY CRATE LIST.
+	SpawnUtilityCrate(479,847,amJetpack)
+	SpawnUtilityCrate(1550,1715,amBlowTorch)
+	SpawnUtilityCrate(1227,1941,amJetpack)
+	SpawnUtilityCrate(1070,1964,amInvulnerable)
+	SpawnUtilityCrate(1070,1875,amTeleport)
+	--HOG POSITION LIST.
+	if hhs[0] ~= nil then
+       		 SetGearPosition(hhs[0],397,865)
+	end
+		if hhs[1] ~= nil then
+        	SetGearPosition(hhs[1],561,1365)
+	end
+
+	ShowMission(loc("Newton's Hammock"), loc("User Challenge"), loc("Eliminate the enemy before the time runs out"), -amParachute, 0)
+		
+end
+
+function onAmmoStoreInit()
+	SetAmmo(amSkip, 9, 0, 0, 1)
+	SetAmmo(amBazooka, 0, 0, 0, 1)
+	SetAmmo(amJetpack, 0, 0, 0, 1)
+	SetAmmo(amTeleport, 0, 0, 0, 1)
+	SetAmmo(amSineGun, 0, 0, 0, 1)
+	SetAmmo(amInvulnerable, 0, 0, 0, 1)
+	SetAmmo(amBlowTorch, 0, 0, 0, 1)
+end
+
+function onGearDamage(gear, damage)
+	if (gear == player) and (damage >= 48) then
+		failed = true
+	end
+end
+
+function onGearAdd(gear)
+
+	if GetGearType(gear) == gtHedgehog then
+		hhs[numhhs] = gear
+		numhhs = numhhs + 1
+	end	
+
+end
+
+function onGearDelete(gear)
+
+	if (gear == enemy) and (failed == false) then
+		ShowMission(loc("Newton's Hammock"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
+	elseif gear == player then
+		ShowMission(loc("Newton's Hammock"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
+	end
+
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Nobody_Laugh.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,130 @@
+--------------------------------------
+-- NOBODY LAUGH
+-- a hilarious (not really) adventure
+--------------------------------------
+
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+HedgewarsScriptLoad("/Scripts/Tracker.lua")
+
+local hhs = {}
+
+function onGameInit()
+
+	Seed = 0
+	GameFlags = gfInfAttack + gfPerHogAmmo +gfDisableWind
+	SuddenDeathTurns = 9999
+	TurnTime = 180000
+	CaseFreq = 0
+	MinesNum = 0
+	Explosives = 0
+	Map = "Bath"
+	Theme = "Nature"
+
+	AddTeam(loc("Nameless Heroes"), 14483456, "eyecross", "Wood", "HillBilly", "cm_birdy")
+	hhs[1] = AddHog(loc( "Hunter" ), 0, 1, "Skull")
+	SetGearPosition(hhs[1], 1267, 451)
+	hhs[2] = AddHog(loc("Drowner"), 0, 31, "mp3")
+	SetGearPosition(hhs[2], 1332, 451)
+
+	AddTeam(loc("Clowns"), 1175851, "Duck2", "Tank", "Mobster", "cm_spider")
+	hhs[3] = AddHog(loc("Poison"), 5, 100, "WhySoSerious")
+	SetGearPosition(hhs[3], 1133, 446)
+	hhs[4] = AddHog(loc("Bobo"), 5, 100, "clown")
+	SetGearPosition(hhs[4], 1215, 553)
+	hhs[5] = AddHog(loc("Copper"), 5, 10, "clown-copper")
+	SetGearPosition(hhs[5], 414, 376)
+	hhs[6] = AddHog(loc("Derp"), 5, 100, "clown-crossed")
+	SetGearPosition(hhs[6], 1590, 886)
+	hhs[7] = AddHog(loc("Eckles"), 5, 100, "clown-copper")
+	SetGearPosition(hhs[7], 772, 754)
+	hhs[8] = AddHog(loc("Frank"), 5, 50, "clown-copper")
+	SetGearPosition(hhs[8], 1688, 714)
+	hhs[9] = AddHog(loc("Harry"), 5, 50, "clown-copper")
+	SetGearPosition(hhs[9], 1932, 837)
+	hhs[10] = AddHog(loc("Igmund"), 5, 50, "WhySoSerious")
+	SetGearPosition(hhs[10], 1601, 733)
+
+end
+
+function onGameStart()
+
+	AddAmmo(enemy, amAirAttack, 100)
+
+	ShowMission(	loc("Nobody Laugh"),
+					loc("User Challenge"),
+					loc("Eliminate the enemy before the time runs out")
+					, 0, 0
+				)
+
+	-- GIRDERS
+	PlaceGirder(1212, 710, 7)
+	PlaceGirder(1215, 570, 4)
+	PlaceGirder(1288, 520, 2)
+	PlaceGirder(1184, 468, 4)
+	PlaceGirder(1344, 468, 4)
+	PlaceGirder(1247, 346, 4)
+
+	PlaceGirder(667, 438, 4)
+	PlaceGirder(507, 438, 4)
+	PlaceGirder(434, 487, 2)
+	PlaceGirder(505, 537, 4)
+	PlaceGirder(665, 537, 4)
+	PlaceGirder(737, 487, 2)
+
+	PlaceGirder(416, 465, 6)
+	PlaceGirder(1415, 378, 6)
+	PlaceGirder(1300, 625, 3)
+	PlaceGirder(1359, 566, 3)
+	PlaceGirder(1436, 538, 0)
+	PlaceGirder(1505, 468, 4)
+
+	------ AMMO CRATE LIST ------
+	tempG = SpawnAmmoCrate(1242, 315, amBaseballBat)
+	tempG = SpawnAmmoCrate(1309, 315, amAirAttack)
+	tempG = SpawnAmmoCrate(144, 895, amAirAttack)
+	tempG = SpawnAmmoCrate(664, 699, amIceGun)
+	tempG = SpawnAmmoCrate(1572, 444, amFirePunch)
+	tempG = SpawnAmmoCrate(1574, 382, amDynamite)
+
+	------ UTIL CRATE LIST ------
+	tempG = SpawnUtilityCrate(654, 513, amParachute)
+	tempG = SpawnUtilityCrate(1569, 413, amParachute)
+
+	-- HOG AMMO
+	AddAmmo(hhs[1],amParachute,1)
+	AddAmmo(hhs[1],amHammer,1)
+	AddAmmo(hhs[2],amWhip,1)
+
+	for i = 3, 10 do
+		AddAmmo(hhs[i], amDEagle, 100)
+		AddAmmo(hhs[i], amShotgun, 100)
+		AddAmmo(hhs[i], amGrenade, 100)
+		AddAmmo(hhs[i], amBazooka, 100)
+		AddAmmo(hhs[i], amDrill, 100)
+	end
+
+end
+
+function onNewTurn()
+	SetWind(100)
+end
+
+function onAmmoStoreInit()
+
+	SetAmmo(amBaseballBat, 0, 0, 0, 1)
+	SetAmmo(amAirAttack, 0, 0, 0, 1)
+	SetAmmo(amFirePunch, 0, 0, 0, 1)
+	SetAmmo(amDynamite, 0, 0, 0, 1)
+	SetAmmo(amHammer, 0, 0, 0, 1)
+	SetAmmo(amIceGun, 0, 0, 0, 1)
+
+	SetAmmo(amParachute, 0, 0, 0, 1)
+
+	SetAmmo(amSwitch, 9, 0, 0, 0)
+	SetAmmo(amSkip, 9, 0, 0, 0)
+
+end
+
+------------------------------
+--                  I'm in         whitesppaaaaaaaaaacceeeee           :D
+------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Spooky_Tree.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,153 @@
+
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+
+---------------------------------------------------------------
+
+local player = nil -- This variable will point to the hog's gear
+local instructor = nil
+local enemy = nil
+
+local GameOver = false
+local birdSpeech = false
+local birdSqualk = false
+
+local GirderCrate = nil
+
+function onGameInit()
+
+	-- Things we don't modify here will use their default values.
+	Seed = 0 -- The base number for the random number generator
+	GameFlags = gfInfAttack +gfDisableWind-- Game settings and rules
+	TurnTime = 90000 -- The time the player has to move each round (in ms)
+	CaseFreq = 0 -- The frequency of crate drops
+	MinesNum = 0 -- The number of mines being placed
+	MinesTime  = 1
+	Explosives = 0 -- The number of explosives being placed
+	Delay = 10 -- The delay between each round
+	Map = "Tree" -- The map to be played
+	Theme = "Halloween" -- The theme to be used
+	SuddenDeathTurns = 99999
+
+	AddTeam(loc("Bloody Rookies"), 14483456, "Simple", "Island", "Default")
+	player = AddHog(loc("Hunter"), 0, 1, "NoHat")
+			--852718
+	AddTeam(loc("Toxic Team"), 	1175851, "Simple", "Island", "Default")
+	enemy = AddHog(loc("Poison"), 1, 10, "Skull")
+
+	SetGearPosition(player,970,23)
+	SetGearPosition(enemy,498,806)
+
+end
+
+
+function onGameStart()
+
+	--right side mines
+	AddGear(1681,359,gtMine, 0, 0, 0, 0)
+	AddGear(1718,518,gtMine, 0, 0, 0, 0)
+	AddGear(1648,527,gtMine, 0, 0, 0, 0)
+	AddGear(1584,522,gtMine, 0, 0, 0, 0)
+
+	--tunnel mines
+	AddGear(301,569,gtSMine, 0, 0, 0, 0)
+	AddGear(372,608,gtSMine, 0, 0, 0, 0)
+	AddGear(453,628,gtSMine, 0, 0, 0, 0)
+	AddGear(524,611,gtSMine, 0, 0, 0, 0)
+	AddGear(613,611,gtSMine, 0, 0, 0, 0)
+
+	AddGear(308,486,gtSMine, 0, 0, 0, 0)
+	AddGear(372,478,gtSMine, 0, 0, 0, 0)
+	AddGear(453,466,gtSMine, 0, 0, 0, 0)
+	AddGear(524,471,gtSMine, 0, 0, 0, 0)
+	AddGear(613,466,gtSMine, 0, 0, 0, 0)
+
+	--above the tunnel mines
+	AddGear(331,433,gtMine, 0, 0, 0, 0)
+	AddGear(404,420,gtMine, 0, 0, 0, 0)
+	AddGear(484,424,gtMine, 0, 0, 0, 0)
+	AddGear(562,417,gtMine, 0, 0, 0, 0)
+	AddGear(640,412,gtMine, 0, 0, 0, 0)
+
+	-- crates crates and more crates
+	SpawnAmmoCrate(1208,576,amBlowTorch)
+	SpawnAmmoCrate(1467,376,amPickHammer)
+	SpawnUtilityCrate(373,165,amGirder)
+	SpawnUtilityCrate(704,623,amJetpack)
+	SpawnUtilityCrate(1646,749,amLaserSight)
+
+	SpawnAmmoCrate(745,418,amShotgun) --shotgun1
+	SpawnAmmoCrate(833,432,amFirePunch) --fire punch
+	GirderCrate = SpawnAmmoCrate(1789,514,amShotgun) -- final shotgun
+	SpawnAmmoCrate(1181,419,amBee)
+
+	ShowMission(loc("Spooky Tree"), "", loc("Eliminate all enemies") .. loc("|- Mines Time:") .. " " .. 0 .. " " .. loc("sec"), -amBee, 0)
+
+	SetWind(-75)
+
+end
+
+
+function onGameTick()
+
+
+	if CurrentHedgehog ~= nil then
+
+		if (birdSqualk == false) and (GetX(CurrentHedgehog) == 1102) and (GetY(CurrentHedgehog) == 133)  then
+			birdSqualk = true
+			PlaySound(sndBirdyLay)
+		end
+
+		if (birdSpeech == false) and (GetX(CurrentHedgehog) == 1068) and (GetY(CurrentHedgehog) == 162) then
+			birdSpeech = true
+			HogSay(player,loc("Good birdy......"),SAY_THINK)
+		end
+	end
+
+	if CurrentHedgehog ~= nil then
+		--AddCaption(GetX(CurrentHedgehog) .. ";" .. GetY(CurrentHedgehog))
+	end
+
+	if (TotalRounds == 2) and (GameOver == false) then -- just in case
+		SetHealth(player, 0)
+		GameOver = true
+	end
+
+	if TurnTimeLeft == 1 then
+		--ShowMission(loc(caption), loc(subcaption), loc(timeout), -amSkip, 0);
+		SetHealth(player, 0)
+		GameOver = true
+	end
+
+end
+
+
+function onAmmoStoreInit()
+	SetAmmo(amShotgun, 0, 0, 0, 1)
+	SetAmmo(amFirePunch, 0, 0, 0, 1)
+	SetAmmo(amBee, 0, 0, 0, 1)
+	SetAmmo(amBlowTorch, 0, 0, 0, 1)
+	SetAmmo(amGirder, 0, 0, 0, 1)
+	SetAmmo(amParachute, 1, 0, 0, 1)
+	SetAmmo(amPickHammer, 0, 0, 0, 1)
+	SetAmmo(amJetpack, 0, 0, 0, 1)
+	SetAmmo(amLaserSight, 0, 0, 0, 1)
+end
+
+function onGearDelete(gear)
+
+	if gear == GirderCrate then
+		TurnTimeLeft = TurnTimeLeft + 30000
+	end
+
+	if GetGearType(gear) == gtCase then
+		TurnTimeLeft = TurnTimeLeft + 5000
+	end
+
+	if (gear == enemy) and (GameOver == false) then
+		ShowMission(loc("Spooky Tree"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0);
+	elseif gear == player then
+		ShowMission(loc("Spooky Tree"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
+		GameOver = true
+	end
+
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,119 @@
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+
+local player = nil -- This variable will point to the hog's gear
+local p2 = nil
+local enemy = nil
+local bCrate = nil
+
+local GameOver = false
+
+function onGameInit()
+
+	-- Things we don't modify here will use their default values.
+	Seed = 0 -- The base number for the random number generator
+	GameFlags = gfDisableWind-- Game settings and rules
+	TurnTime = 30000 -- The time the player has to move each round (in ms)
+	CaseFreq = 0 -- The frequency of crate drops
+	MinesNum = 0 -- The number of mines being placed
+	MinesTime  = 1
+	Explosives = 0 -- The number of explosives being placed
+	Delay = 10 -- The delay between each round
+	Map = "Mushrooms" -- The map to be played
+	Theme = "Nature" -- The theme to be used
+	SuddenDeathTurns = 99999
+
+	AddTeam(loc("Feeble Resistance"), 14483456, "Simple", "Island", "Default")
+	player = AddHog(string.format(loc("Pathetic Hog #%d"), 1), 0, 50, "NoHat")
+	p2 = AddHog(string.format(loc("Pathetic Hog #%d"), 2), 0, 20, "NoHat")
+
+	--AddTeam("Toxic Team", 	1175851, "Simple", "Island", "Robot","cm_binary")
+	AddTeam(loc("Cybernetic Empire"), 	1175851, "Simple", "Island", "Robot", "cm_binary")
+	enemy = AddHog(loc("Unit 3378"), 5, 30, "cyborg1")
+
+	SetGearPosition(player,1403,235)
+	SetGearPosition(p2,1269,239)
+	SetGearPosition(enemy,492,495)
+
+end
+
+
+function onGameStart()
+
+	--mines
+	AddGear(276,76,gtMine, 0, 0, 0, 0)
+	AddGear(301,76,gtMine, 0, 0, 0, 0)
+	AddGear(326,76,gtMine, 0, 0, 0, 0)
+	AddGear(351,76,gtMine, 0, 0, 0, 0)
+	AddGear(376,76,gtMine, 0, 0, 0, 0)
+	AddGear(401,76,gtMine, 0, 0, 0, 0)
+	AddGear(426,76,gtMine, 0, 0, 0, 0)
+	AddGear(451,76,gtMine, 0, 0, 0, 0)
+	AddGear(476,76,gtMine, 0, 0, 0, 0)
+
+	AddGear(886,356,gtMine, 0, 0, 0, 0)
+	AddGear(901,356,gtMine, 0, 0, 0, 0)
+	AddGear(926,356,gtMine, 0, 0, 0, 0)
+	AddGear(951,356,gtMine, 0, 0, 0, 0)
+	AddGear(976,356,gtMine, 0, 0, 0, 0)
+	AddGear(1001,356,gtMine, 0, 0, 0, 0)
+
+	-- crates crates and more crates
+	bCrate = SpawnAmmoCrate(1688,476,amBaseballBat)
+	SpawnUtilityCrate(572,143,amGirder)
+	SpawnAmmoCrate(1704,954,amPickHammer)
+	SpawnAmmoCrate(704,623,amBlowTorch)
+	SpawnUtilityCrate(1543,744,amJetpack)
+	SpawnAmmoCrate(227,442,amDrill)
+
+	ShowMission(loc("Codename: Teamwork"), "", loc("- Eliminate Unit 3378 |- Feeble Resistance must survive") .. loc("|- Mines Time:") .. " " .. 0 .. " " .. loc("sec"), 0, 0)
+
+end
+
+
+--function onGameTick()
+
+	--if CurrentHedgehog ~= nil then
+	--	AddCaption(GetX(CurrentHedgehog) .. ";" .. GetY(CurrentHedgehog))
+	--end
+
+--end
+
+
+function onAmmoStoreInit()
+	SetAmmo(amBlowTorch, 0, 0, 0, 1)
+	SetAmmo(amGirder, 0, 0, 0, 1)
+	SetAmmo(amPickHammer, 0, 0, 0, 2)
+	SetAmmo(amJetpack, 0, 0, 0, 1)
+	SetAmmo(amDrill, 0, 0, 0, 2)
+	SetAmmo(amBaseballBat, 0, 0, 0, 1)
+	SetAmmo(amSwitch, 9, 0, 0, 0)
+	SetAmmo(amSkip, 9, 0, 0, 0)
+end
+
+function onGearDamage(gear, damage)
+	if (gear == player) and (damage == 30) then
+		HogSay(player,loc("T_T"),SAY_SHOUT)
+	end
+end
+
+function onGearDelete(gear)
+
+	if gear == bCrate then
+		HogSay(CurrentHedgehog, loc("Hmmm..."), SAY_THINK)
+	end
+
+	if GetGearType(gear) == gtCase then
+		TurnTimeLeft = TurnTimeLeft + 5000
+	end
+
+	if (gear == enemy) and (GameOver == false) then
+		ShowMission(loc("Codename: Teamwork"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
+		GameOver = true
+	elseif  ( ((gear == player) or (gear == p2)) and (GameOver == false)) then
+		ShowMission(loc("Codename: Teamwork"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
+		GameOver = true
+		SetHealth(p2,0)
+		SetHealth(player,0)
+	end
+
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_The_Great_Escape.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,122 @@
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+
+local player = nil
+local enemy = nil
+
+function onGameInit()
+
+	Map = "Castle"
+	Theme = "Nature"
+	Seed = 0
+	GameFlags = gfInfAttack
+
+	TurnTime = 45 * 1000
+
+	CaseFreq = 0
+	MinesNum = 0
+	Explosives = 0
+
+	AddTeam(loc("Hero Team"), 14483456, "Simple", "Island", "Default", "Hedgewars")
+	player = AddHog(loc("Good Dude"), 0, 80, "NoHat") --NoHat
+
+	AddTeam(loc("Bad Team"), 	1175851, "Simple", "Island", "Default", "Hedgewars")
+	enemy = AddHog(loc("Bad Guy"), 1, 40, "NoHat")
+
+end
+
+function onGameStart()
+
+ShowMission(loc("The Great Escape"), loc("Get out of there!"), loc("Elimate your captor."), -amGrenade, 0)
+
+------ GIRDER LIST ------
+PlaceGirder(1042,564,0)
+PlaceGirder(1028,474,6)
+PlaceGirder(1074,474,6)
+PlaceGirder(1050,385,0)
+PlaceGirder(1175,731,7)
+PlaceGirder(1452,905,2)
+PlaceGirder(1522,855,4)
+PlaceGirder(1496,900,3)
+PlaceGirder(1682,855,4)
+PlaceGirder(1773,887,2)
+PlaceGirder(1647,901,1)
+PlaceGirder(1871,883,6)
+PlaceGirder(1871,723,6)
+PlaceGirder(1774,768,6)
+PlaceGirder(1773,767,6)
+PlaceGirder(1821,904,1)
+PlaceGirder(1822,802,3)
+PlaceGirder(1820,723,1)
+PlaceGirder(1782,678,4)
+PlaceGirder(1822,661,0)
+PlaceGirder(1822,644,0)
+PlaceGirder(1742,644,0)
+PlaceGirder(1742,661,0)
+PlaceGirder(1694,676,2)
+PlaceGirder(1903,635,0)
+------ HEALTH CRATE LIST ------
+SpawnHealthCrate(1476,169)
+SpawnHealthCrate(1551,177)
+SpawnHealthCrate(1586,200)
+SpawnHealthCrate(1439,189)
+SpawnHealthCrate(1401,211)
+SpawnHealthCrate(1633,210)
+------ MINE LIST ------
+tempG = AddGear(1010,680,gtMine, 0, 0, 0, 0)
+SetTimer(tempG, 1)
+tempG = AddGear(1031,720,gtMine, 0, 0, 0, 0)
+SetTimer(tempG, 1)
+tempG = AddGear(1039,748,gtMine, 0, 0, 0, 0)
+SetTimer(tempG, 1)
+tempG = AddGear(1051,777,gtMine, 0, 0, 0, 0)
+SetTimer(tempG, 1)
+tempG = AddGear(1065,796,gtMine, 0, 0, 0, 0)
+SetTimer(tempG, 1)
+tempG = AddGear(1094,800,gtMine, 0, 0, 0, 0)
+SetTimer(tempG, 1)
+------ REPOSITION LIST ------
+SetGearPosition(player,1050,534)
+SetGearPosition(enemy,1512,158)
+SetHealth(player, 1)
+SetHealth(enemy, 1)
+------ AMMO CRATE LIST ------
+SpawnAmmoCrate(1632,943,5)
+SpawnAmmoCrate(1723,888,12)
+SpawnAmmoCrate(1915,599,1)
+------ UTILITY CRATE LIST ------
+SpawnUtilityCrate(1519,945,15)
+SpawnUtilityCrate(1227,640,6)
+SpawnUtilityCrate(1416,913,18)
+------ END LOADING DATA ------
+
+end
+
+function onGameTick()
+
+	if TurnTimeLeft == TurnTime-1 then
+		SetWind(100)
+	end
+
+end
+
+function onGearDelete(gear)
+	if (GetGearType(gear) == gtCase) and (CurrentHedgehog == player) then
+		if GetHealth(gear) > 0 then
+			AddGear(GetX(gear), GetY(gear), gtGrenade, 0, 0, 0, 1)
+		end
+	elseif gear == player then
+		ShowMission(loc("The Great Escape"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
+	elseif gear == enemy then
+		ShowMission(loc("The Great Escape"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
+	end
+end
+
+function onAmmoStoreInit()
+	SetAmmo(amGrenade, 1, 0, 0, 1)
+	SetAmmo(amParachute, 1, 0, 0, 1)
+	SetAmmo(amFirePunch, 0, 0, 0, 3)
+	SetAmmo(amPickHammer, 0, 0, 0, 1)
+	SetAmmo(amBlowTorch, 0, 0, 0, 1)
+	SetAmmo(amShotgun, 0, 0, 0, 1)
+	SetAmmo(amSkip, 9, 0, 0, 0)
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Scenario/portal.lua	Wed Apr 13 14:39:17 2016 +0200
@@ -0,0 +1,205 @@
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+HedgewarsScriptLoad("/Scripts/Utils.lua")
+
+local MineArray = {}
+local player
+local adviceGiven = false
+local adviceGiven2 = false
+
+function onGameInit()
+	Seed = 0 -- The base number for the random number generator
+	GameFlags = gfInfAttack +gfBorder +gfDisableWind +gfSolidLand
+	TurnTime = 1500000 -- The time the player has to move each round (in ms)
+	CaseFreq = 0 -- The frequency of crate drops
+	MinesNum = 0 -- The number of mines being placed
+	Explosives = 0 -- The number of explosives being placed
+	Delay = 10 -- The delay between each round
+	Map = "portal" -- The map to be played
+	Theme = "Hell" -- The theme to be used
+	-- Disable Sudden Death
+	HealthDecrease = 0
+	WaterRise = 0
+
+	AddTeam(loc("Subjects"), 0xFFFF01, "Simple", "Island", "Default", "cm_test")
+	player = AddHog(loc("Subject 1"), 0, 10, "Terminator_Glasses")
+
+	AddTeam(loc("Hell Army"), 0xFF0402, "skull", "Island", "Default", "cm_hellish")
+	enemy1 = AddHog(loc("Lucifer"), 1, 200, "InfernalHorns")
+	enemy2 = AddHog(loc("Voldemort"), 1, 150, "WizardHat")
+	enemy3 = AddHog(loc("Zombi"), 1, 100, "Zombi")
+	enemy4 = AddHog(loc("Predator"), 1, 14, "anzac")
+	enemy5 = AddHog(loc("Oneye"), 1, 50, "cyclops")
+	enemy6 = AddHog(loc("Razac"), 1, 50, "Evil")
+	enemy7 = AddHog(loc("C-2"), 1, 50, "cyborg1")
+	enemy8 = AddHog(loc("Rider"), 1, 50, "scif_SparkssHelmet")
+
+	AddTeam(loc("Badmad"), 0xFF0402, "skull", "Island", "Default", "cm_pentagram")
+	enemy9 = AddHog(loc("C-1"), 1, 50, "cyborg2")
+	enemy10 = AddHog(loc("Hidden"), 1, 40, "bushhider")
+	enemy11 = AddHog(loc("Ronald"), 1, 70, "clown")
+	enemy12 = AddHog(loc("Phosphat"), 1, 50, "chef")
+	enemy13 = AddHog(loc("Lestat"), 1, 30, "vampirichog")
+
+	SetGearPosition(player, 350, 1820)
+	SetGearPosition(enemy1, 2037, 1313)
+	SetGearPosition(enemy2, 1369, 1605)
+	SetGearPosition(enemy3, 1750, 1937)
+	SetGearPosition(enemy4, 3125, 89)
+	SetGearPosition(enemy5, 743, 900)
+	SetGearPosition(enemy6, 130, 360)
+	SetGearPosition(enemy7, 1333, 640)
+	SetGearPosition(enemy8, 1355, 200)
+	SetGearPosition(enemy9, 2680, 225)
+	SetGearPosition(enemy10, 2970, 800)
+	SetGearPosition(enemy11, 4050, 1964)
+	SetGearPosition(enemy12, 2666, 950)
+	SetGearPosition(enemy13, 3306, 1205)
+
+end
+
+function onAmmoStoreInit()
+
+	SetAmmo(amFirePunch, 0,0,0,1)
+	SetAmmo(amParachute, 0, 0, 0, 2)
+	SetAmmo(amGirder, 0, 0, 0, 3)
+	SetAmmo(amTeleport, 0, 0, 0, 1)
+	SetAmmo(amLaserSight,0,0,0,1)
+	SetAmmo(amHellishBomb,0,0,0,1)
+	SetAmmo(amGrenade,0,0,0,1)
+	SetAmmo(amRope,0,0,0,1)
+	SetAmmo(amDEagle,0,0,0,1)
+	SetAmmo(amExtraTime,0,0,0,2)
+	SetAmmo(amSkip,9,0,0,0)
+	SetAmmo(amBlowTorch, 0, 0, 0, 1)
+	SetAmmo(amPickHammer, 0, 0, 0, 1)
+	SetAmmo(amSnowball, 0, 0, 0, 1)
+
+end
+
+function onGameStart()
+
+	SetWind(100)
+
+	MineArray[0] = AddGear(840, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[1] = AddGear(900, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[2] = AddGear(1000, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[3] = AddGear(1100, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[4] = AddGear(1140, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[5] = AddGear(1170, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[6] = AddGear(1200, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[7] = AddGear(1200, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[8] = AddGear(1230, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[9] = AddGear(1280, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[10] = AddGear(1302, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[11] = AddGear(1350, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[12] = AddGear(1383, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[13] = AddGear(1400, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[14] = AddGear(1423, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[15] = AddGear(1470, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[16] = AddGear(1480, 1847, gtMine, 0, 0, 0, 0)
+	MineArray[17] = AddGear(1311, 1847, gtMine, 0, 0, 0, 0)
+
+	MineArray[18] = AddGear(840, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[19] = AddGear(900, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[20] = AddGear(1000, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[21] = AddGear(1100, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[22] = AddGear(1140, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[23] = AddGear(1170, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[24] = AddGear(1200, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[25] = AddGear(1230, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[26] = AddGear(1280, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[27] = AddGear(1302, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[28] = AddGear(1350, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[29] = AddGear(1383, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[30] = AddGear(1400, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[31] = AddGear(1423, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[32] = AddGear(1470, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[33] = AddGear(1480, 1785, gtMine, 0, 0, 0, 0)
+	MineArray[34] = AddGear(1311, 1785, gtMine, 0, 0, 0, 0)
+
+	MineArray[35] = AddGear(4029, 89, gtMine, 0, 0, 0, 120)
+
+	for i = 0,#MineArray do
+		SetTimer(MineArray[i],050)
+		SetState(MineArray[i],544)
+	end
+	--needed this MineArray cause timer didn't work, its was always 3sec, i wanna instant mines
+
+	--UTILITY CRATE--
+	parachute = SpawnUtilityCrate(1670, 1165, amParachute)
+	girder = SpawnUtilityCrate(2101, 1297, amGirder)
+	SpawnUtilityCrate(3965, 625, amBlowTorch)
+	SpawnUtilityCrate(2249, 93, amBlowTorch)
+	SpawnUtilityCrate(2181, 829, amBlowTorch)
+	SpawnUtilityCrate(1820, 567, amBlowTorch)
+	SpawnUtilityCrate(1375, 900, amTeleport)
+	SpawnUtilityCrate(130, 600, amPickHammer)
+	SpawnUtilityCrate(1660,1820, amLaserSight)
+	SpawnUtilityCrate(4070,1840, amLaserSight)
+
+
+	--AMMO CRATE--
+	portalgun = SpawnAmmoCrate(505, 1943, amPortalGun, 1000)
+	extratime = SpawnAmmoCrate(4020, 785, amExtraTime, 2)
+	SpawnAmmoCrate(425, 613, amSnowball)
+	SpawnAmmoCrate(861, 633, amHellishBomb)
+	SpawnAmmoCrate(2510, 623, amSnowball)
+	SpawnAmmoCrate(2900, 1600, amGrenade)
+	SpawnAmmoCrate(2680, 320, amGrenade)
+	SpawnAmmoCrate(2650, 80, amDEagle)
+	SpawnAmmoCrate(3000, 100, amDEagle)
+	SpawnAmmoCrate(2900, 1400, amRope)
+	SpawnAmmoCrate(4025, 1117, amFirePunch)
+
+	--HEALTH CRATE--
+	SpawnHealthCrate(2000, 780)
+
+	--GIRDER--
+	PlaceGirder(3363, 1323, 4)
+
+	ShowMission (loc("Portal Mind Challenge"), loc("Mission"),
+		loc("Defeat all enemies!") .. "|" .. loc("In this mission you have infinite time."),
+		-amPortalGun, 5000)
+	HogSay(player, loc("I should get myself a portal device, maybe this crate has one."), SAY_THINK)
+
+end
+
+function onGameTick()
+
+	if (player ~= nil)  then
+		if (gearIsInBox(player, 1650, 1907, 200, 60) and (adviceGiven == false)) then
+			adviceGiven = true
+			HogSay(player, loc("Hmmm, I’ll have to find some way of moving him off this anti-portal surface."), SAY_THINK)
+		elseif (gearIsInBox(player, 2960, 790, 200, 60) and (adviceGiven2 == false)) then
+			adviceGiven2 = true
+			HogSay(player, loc("The anti-portal surface is all over the floor, and I have nothing to kill him. Dropping something could hurt him enough to kill him."), SAY_THINK)
+		end
+	end
+
+end
+
+function onGearDelete(gear)
+	-- Check gear collection
+	if CurrentHedgehog == player and (band(GetGearMessage(gear), gmDestroy) ~= 0) then
+		if gear == portalgun then
+			HogSay(player, loc("Great! Let’s kill all these enemies, using portals."), SAY_THINK)
+		end
+
+		if gear == girder then
+			HogSay(player, loc("This will be useful when I need a new platform or if I want to rise."), SAY_THINK)
+		end
+
+		if gear == parachute then
+			HogSay(player, loc("You can’t open a portal on the blue surface."), SAY_THINK)
+		end
+
+		if gear == extratime then
+			HogSay(player, loc("What?! For all this struggle I just win some ... time? Oh dear!"), SAY_SHOUT)
+		end
+	end
+
+	if gear == player then
+		player = nil
+	end
+end
+
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Sniper_Rifle.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,363 +0,0 @@
--- Hedgewars SniperRifle Training
--- Scripting Example
-
--- Lines such as this one are comments - they are ignored
--- by the game, no matter what kind of text is in there.
--- It's also possible to place a comment after some real
--- instruction as you see below. In short, everything
--- following "--" is ignored.
-
----------------------------------------------------------------
--- At first we implement the localization library using loadfile.
--- This allows us to localize strings without needing to think
--- about translations.
--- We can use the function loc(text) to localize a string.
-
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-
--- This variable will hold the number of destroyed targets.
-local score = 0
--- This variable will hold the number of shots from the sniper rifle
-local shots = 0
--- This variable represents the number of targets to destroy.
-local score_goal = 31
--- This variable controls how many milliseconds/ticks we'd
--- like to wait before we end the round once all targets
--- have been destroyed.
-local end_timer = 1000 -- 1000 ms = 1 s
--- This variable is set to true if the game is lost (i.e.
--- time runs out).
-local game_lost = false
--- This variable will point to the hog's gear
-local player = nil
--- This variable will grab the time left at the end of the round
-local time_goal = 0
-
-local target = nil
-
-local last_hit_time = 0
-
-local cinematic = false
-
--- This is a custom function to make it easier to
--- spawn more targets with just one line of code
--- You may define as many custom functions as you
--- like.
-function spawnTarget(x, y)
-	-- add a new target gear
-	target = AddGear(x, y, gtTarget, 0, 0, 0, 0)
-	-- have the camera move to the target so the player knows where it is
-	FollowGear(target)
-end
-
-function blowUp(x, y)
-    if cinematic == false then
-        cinematic = true
-        SetCinematicMode(true)
-    end
-	-- adds some TNT
-	gear = AddGear(x, y, gtDynamite, 0, 0, 0, 0)
-end
-
-function onNewTurn()
-	SetWeapon(amSniperRifle)
-end
-
--- This function is called before the game loads its
--- resources.
--- It's one of the predefined function names that will
--- be called by the game. They give you entry points
--- where you're able to call your own code using either
--- provided instructions or custom functions.
-function onGameInit()
-	-- At first we have to overwrite/set some global variables
-	-- that define the map, the game has to load, as well as
-	-- other things such as the game rules to use, etc.
-	-- Things we don't modify here will use their default values.
-
-	-- The base number for the random number generator
-	Seed = 0
-	-- Game settings and rules
-	GameFlags = gfMultiWeapon + gfOneClanMode + gfArtillery
-	-- The time the player has to move each round (in ms)
-	TurnTime = 150000
-	-- The frequency of crate drops
-	CaseFreq = 0
-	-- The number of mines being placed
-	MinesNum = 0
-	-- The number of explosives being placed
-	Explosives = 0
-	-- The delay between each round
-	Delay = 0
-	-- The map to be played
-	Map = "Ropes"
-	-- The theme to be used
-	Theme = "Golf"
-
-	-- Create the player team
-	AddTeam(loc("Sniperz"), 14483456, "Simple", "Island", "Default")
-	-- And add a hog to it
-	player = AddHog(loc("Hunter"), 0, 1, "Sniper")
-	SetGearPosition(player, 602, 1465)
-end
-
--- This function is called when the round starts
--- it spawns the first target that has to be destroyed.
--- In addition it shows the scenario goal(s).
-function onGameStart()
-	-- Disable graph in stats screen
-	SendHealthStatsOff()
-	-- Spawn the first target.
-	spawnTarget(860,1020)
-
-	-- Show some nice mission goals.
-	-- Parameters are: caption, sub caption, description,
-	-- extra text, icon and time to show.
-	-- A negative icon parameter (-n) represents the n-th weapon icon
-	-- A positive icon paramter (n) represents the (n+1)-th mission icon
-	-- A timeframe of 0 is replaced with the default time to show.
-	ShowMission(loc("Sniper Training"), loc("Aiming Practice"), loc("Eliminate all targets before your time runs out.|You have unlimited ammo for this mission."), -amSniperRifle, 0)
-end
-
--- This function is called every game tick.
--- Note that there are 1000 ticks within one second.
--- You shouldn't try to calculate too complicated
--- code here as this might slow down your game.
-function onGameTick20()
-	if game_lost then
-		return
-	end
-	-- after a target is destroyed, show hog, then target
-	if (target ~= nil) and (TurnTimeLeft + 1300 < last_hit_time) then
-		-- move camera to the target
-		FollowGear(target)
-	elseif TurnTimeLeft + 300 < last_hit_time then
-		-- move camera to the hog
-		FollowGear(player)
-	end
-	-- If time's up, set the game to be lost.
-	-- We actually check the time to be "1 ms" as it
-	-- will be at "0 ms" right at the start of the game.
-	if TurnTimeLeft < 40 and TurnTimeLeft > 0 and score < score_goal and game_lost == false then
-		game_lost = true
-		-- ... and show a short message.
-		AddCaption(loc("Time's up!"))
-		ShowMission(loc("Sniper Training"), loc("Aiming Practice"), loc("Oh no! Time's up! Just try again."), -amSkip, 0)
-		-- and generate the stats and go to the stats screen
-		generateStats()
-		EndGame()
-		-- Just to be sure set the goal time to 1 ms
-		time_goal = 1
-	end
-	-- If the goal is reached or we've lost ...
-	if score == score_goal or game_lost then
-		-- ... check to see if the time we'd like to
-		-- wait has passed and then ...
-		if end_timer == 0 then
-			-- ... end the game ...
-			generateStats()
-			EndGame()
-		else
-			-- ... or just lower the timer by 1.
-			-- Reset the time left to stop the timer
-			TurnTimeLeft = time_goal
-		end
-        end_timer = end_timer - 20
-	end
-end
-
--- This function is called when the game is initialized
--- to request the available ammo and probabilities
-function onAmmoStoreInit()
-	-- add an unlimited supply of shotgun ammo
-	SetAmmo(amSniperRifle, 9, 0, 0, 0)
-end
-
--- This function is called when a new gear is added.
--- We use it to count the number of shots, which we
--- in turn use to calculate the final score and stats
-function onGearAdd(gear)
-	if GetGearType(gear) == gtSniperRifleShot then
-		shots = shots + 1
-	end
-end
-
--- This function is called before a gear is destroyed.
--- We use it to count the number of targets destroyed.
-function onGearDelete(gear)
-	local gt = GetGearType(gear)
-
-	if gt == gtCase then
-		game_lost = true
-		return
-	end
-
-	if (gt == gtDynamite) and cinematic then
-		cinematic = false
-		SetCinematicMode(false)
-		return
-	end
-
-	if gt == gtTarget then
-		-- remember when the target was hit for adjusting the camera
-		last_hit_time = TurnTimeLeft
-		-- Add one point to our score/counter
-		score = score + 1
-		-- If we haven't reached the goal ...
-		if score < score_goal then
-			-- ... spawn another target.
-			if score == 1 then
-				spawnTarget(1520,1350)
-			elseif score == 2 then
-				spawnTarget(1730,1040)
-			elseif score == 3 then
-				spawnTarget(2080,780)
-			elseif score == 4 then
-				AddCaption(loc("Good so far!") .. " " .. loc("Keep it up!"));
-				blowUp(1730,1226)
-				blowUp(1440,1595)
-				blowUp(1527,1575)
-				blowUp(1614,1595)
-				blowUp(1420,1675)
-				blowUp(1527,1675)
-				blowUp(1634,1675)
-				blowUp(1440,1755)
-				blowUp(1527,1775)
-				blowUp(1614,1755)
-				spawnTarget(1527,1667)
-			elseif score == 5 then
-				spawnTarget(1527,1667)
-			elseif score == 6 then
-				spawnTarget(2175,1300)
-			elseif score == 7 then
-				spawnTarget(2250,940)
-			elseif score == 8 then
-				spawnTarget(2665,1540)
-			elseif score == 9 then
-				spawnTarget(3040,1160)
-			elseif score == 10 then
-				spawnTarget(2930,1500)
-			elseif score == 11 then
-				AddCaption(loc("This one's tricky."));
-				spawnTarget(700,720)
-			elseif score == 12 then
-				AddCaption(loc("Well done."));
-				blowUp(914,1222)
-				blowUp(1050,1222)
-				blowUp(1160,1008)
-				blowUp(1160,1093)
-				blowUp(1160,1188)
-				blowUp(375,911)
-				blowUp(510,911)
-				blowUp(640,911)
-				blowUp(780,911)
-				blowUp(920,911)
-				blowUp(1060,913)
-				blowUp(1198,913)
-				spawnTarget(1200,730)
-			elseif score == 13 then
-				spawnTarget(1200,830)
-			elseif score == 14 then
-				spawnTarget(1430,450)
-			elseif score == 15 then
-				spawnTarget(796,240)
-			elseif score == 16 then
-				spawnTarget(300,10)
-			elseif score == 17 then
-				spawnTarget(2080,820)
-			elseif score == 18 then
-				AddCaption(loc("Demolition is fun!"));
-				blowUp(2110,920)
-				blowUp(2210,920)
-				blowUp(2200,305)
-				blowUp(2300,305)
-				blowUp(2300,400)
-				blowUp(2300,500)
-				blowUp(2300,600)
-				blowUp(2300,700)
-				blowUp(2300,800)
-				blowUp(2300,900)
-				blowUp(2401,305)
-				blowUp(2532,305)
-				blowUp(2663,305)
-				spawnTarget(2300,760)
-			elseif score == 19 then
-				spawnTarget(2300,760)
-			elseif score == 20 then
-				spawnTarget(2738,190)
-			elseif score == 21 then
-				spawnTarget(2590,-100)
-			elseif score == 22 then
-				AddCaption(loc("Will this ever end?"));
-				blowUp(2790,305)
-				blowUp(2930,305)
-				blowUp(3060,305)
-				blowUp(3190,305)
-				blowUp(3310,305)
-				blowUp(3393,613)
-				blowUp(2805,370)
-				blowUp(2805,500)
-				blowUp(2805,630)
-				blowUp(2805,760)
-				blowUp(2805,890)
-				blowUp(3258,370)
-				blowUp(3258,475)
-				blowUp(3264,575)
-				spawnTarget(3230,240)
-			elseif score == 23 then
-				spawnTarget(3230,290)
-			elseif score == 24 then
-				spawnTarget(3670,250)
-			elseif score == 25 then
-				spawnTarget(2620,-100)
-			elseif score == 26 then
-				spawnTarget(2870,300)
-			elseif score == 27 then
-				spawnTarget(3850,900)
-			elseif score == 28 then
-				spawnTarget(3780,300)
-			elseif score == 29 then
-				spawnTarget(3670,0)
-			elseif score == 30 then
-				AddCaption(loc("Last Target!"));
-				spawnTarget(3480,1200)
-			end
-		else
-			if not game_lost then
-			-- Otherwise show that the goal was accomplished
-			ShowMission(loc("Sniper Training"), loc("Aiming Practice"), loc("Congratulations! You've eliminated all targets|within the allowed time frame."), 0, 0)
-			-- Also let the hogs shout "victory!"
-			PlaySound(sndVictory)
-			-- Save the time left so we may keep it.
-			time_goal = TurnTimeLeft
-			end
-		end
-	end
-end
-
--- This function calculates the final score of the player and provides some texts and
--- data for the final stats screen
-function generateStats()
-	local accuracy = (score/shots)*100
-	local end_score_targets = (score * 200)
-	local end_score_overall
-	if not game_lost then
-		local end_score_time = math.ceil(time_goal/5)
-		local end_score_accuracy = math.ceil(accuracy * 100)
-		end_score_overall = end_score_time + end_score_targets + end_score_accuracy
-
-		SendStat(siGameResult, loc("You have successfully finished the sniper rifle training!"))
-		SendStat(siCustomAchievement, string.format(loc("You have destroyed %d of %d targets (+%d points)."), score, score_goal, end_score_targets))
-		SendStat(siCustomAchievement, string.format(loc("You have made %d shots."), shots))
-		SendStat(siCustomAchievement, string.format(loc("Accuracy bonus: +%d points"), end_score_accuracy))
-		SendStat(siCustomAchievement, string.format(loc("You had %.2fs remaining on the clock (+%d points)."), (time_goal/1000), end_score_time))
-	else
-		SendStat(siGameResult, loc("You lose!"))
-
-		SendStat(siCustomAchievement, string.format(loc("You have destroyed %d of %d targets (+%d points)."), score, score_goal, end_score_targets))
-		SendStat(siCustomAchievement, string.format(loc("You have made %d shots."), shots))
-		end_score_overall = end_score_targets
-	end
-	SendStat(siPlayerKills, tostring(end_score_overall), loc("Sniperz"))
-	SendStat(siPointType, loc("points"))
-end
--- a/share/hedgewars/Data/Missions/Training/Challenge_-_Speed_Shoppa_-_Hedgelove.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-HedgewarsScriptLoad("/Scripts/SpeedShoppa.lua")
-
-local params = {}
-params.missionTitle = loc("Shoppa Love")
-params.teamName = loc("Team of Hearts")
-params.hogName = loc("Heartful")
-params.teamFlag = "cm_iluvu"
-params.teamGrave = "heart"
-params.hogHat = "pinksunhat"
-params.crateType = "health"
-params.faceLeft = true
-
-params.time = 45000
-params.map = "Hedgelove"
-params.theme = "Nature"
-
-params.hog_x = 410
-params.hog_y = 934
-params.crates = {
-	{ x = 183, y = 710 },
-	{ x = 202, y = 519 },
-	{ x = 336, y = 356 },
-	{ x = 658, y = 363 },
-	{ x = 1029, y = 39 },
-	{ x = 758, y = 879 },
-	{ x = 1324, y = 896 },
-	{ x = 1410, y = 390 },
-	{ x = 1746, y = 348 },
-	{ x = 1870, y = 538 },
-	{ x = 1884, y = 723 },
-	{ x = 1682, y = 970 },
-}
-params.extra_onGameStart = function()
-	PlaceGirder(394, 1000, 0)
-	PlaceGirder(1696, 1000, 0)
-end
-
-SpeedShoppaMission(params)
--- a/share/hedgewars/Data/Missions/Training/Challenge_-_Speed_Shoppa_-_Ropes.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-HedgewarsScriptLoad("/Scripts/SpeedShoppa.lua")
-
-local params = {}
-params.missionTitle = loc("Ropes and Crates")
-params.teamName = loc("Shoppa Union")
-params.hogName = loc("Hook")
-params.teamFlag = "cm_shoppa"
-params.hogHat = "NoHat"
-
-params.time = 115000
-params.map = "Ropes"
-params.theme = "City"
-
-params.hog_x = 3754
-params.hog_y = 1742
-params.crates = {
-	{ x = 3533, y = 1404 },
-	{ x = 3884, y = 1048 },
-	{ x = 3366, y = 664 },
-	{ x = 3162, y = 630 },
-	{ x = 2872, y = 402 },
-	{ x = 3812, y = 322 },
-	{ x = 3685, y = 34 },
-	{ x = 3324, y = 540 },
-	{ x = 2666, y = 224 },
-	{ x = 2380, y = 1002 },
-	{ x = 2224, y = 1008 },
-	{ x = 2226, y = 854 },
-	{ x = 3274, y = 1754 },
-	{ x = 3016, y = 1278 },
-	{ x = 2756, y = 1716 },
-	{ x = 2334, y = 1756 },
-	{ x = 1716, y = 1752 },
-	{ x = 1526, y = 1464 },
-	{ x = 356, y = 1734 },
-	{ x = 598, y = 1444 },
-	{ x = 1084, y = 1150 },
-	{ x = 358, y = 834 },
-	{ x = 936, y = 200 },
-	{ x = 1540, y = 514 },
-}
-
-SpeedShoppaMission(params)
--- a/share/hedgewars/Data/Missions/Training/Challenge_-_Speed_Shoppa_-_ShoppaKing.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-HedgewarsScriptLoad("/Scripts/SpeedShoppa.lua")
-
-local params = {}
-params.missionTitle = loc("The Customer is King")
-params.teamName = loc("Shoppa Union")
-params.hogName = loc("King Customer")
-params.teamFlag = "cm_shoppa"
-params.teamGrave = "money"
-params.hogHat = "crown"
-
-params.time = 160000
-params.map = "ShoppaKing"
-params.theme = "Castle"
-
-params.hog_x = 543
-params.hog_y = 1167
-params.crates = {
-	{ x = 170, y = 172 },
-	{ x = 216, y = 478 },
-	{ x = 616, y = 966 },
-	{ x = 291, y = 1898 },
-	{ x = 486, y = 1965 },
-	{ x = 852, y = 1289 },
-	{ x = 1224, y = 1625 },
-	{ x = 925, y = 584 },
-	{ x = 2013, y = 141 },
-	{ x = 2250, y = 351 },
-	{ x = 2250, y = 537 },
-	{ x = 2472, y = 513 },
-	{ x = 1974, y = 459 },
-	{ x = 1995, y = 1068 },
-	{ x = 2385, y = 1788 },
-	{ x = 1698, y = 1725 },
-	{ x = 2913, y = 1092 },
-	{ x = 3972, y = 1788 },
-	{ x = 3762, y = 1635 },
-	{ x = 2577, y = 1473 },
-	{ x = 3612, y = 1068 },
-	{ x = 3945, y = 687 },
-	{ x = 2883, y = 618 },
-	{ x = 3543, y = 471 },
-	{ x = 3636, y = 306 },
-	{ x = 3210, y = 321 },
-	{ x = 3426, y = 126 },
-	{ x = 3033, y = 1590 },
-	{ x = 3774, y = 1341 },
-	{ x = 1254, y = 297 },
-	{ x = 1300, y = 1022 },
-	{ x = 1410, y = 1292 },
-	{ x = 868, y = 1812 },
-	{ x = 3426, y = 954 },
-}
-
-SpeedShoppaMission(params)
--- a/share/hedgewars/Data/Missions/Training/ClimbHome.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-
-isSinglePlayer = true
-
--- trying to allow random theme, but fixed theme objects...
--- Also skip some ugly themes, or ones where the sky is "meh"
---local themes = { "Art","Cake","City","EarthRise","Halloween","Olympics","Underwater","Bamboo","Castle","Compost","Eyes","Hell","Planes","Bath","Cave","CrazyMission","Freeway","Island","Sheep","Blox","Cheese","Deepspace","Fruit","Jungle","Snow","Brick","Christmas","Desert","Golf","Nature","Stage" }
-local themes = {"Christmas","Hell","Bamboo","City","Island","Bath","Compost","Jungle","Desert","Nature","Olympics","Brick","EarthRise","Sheep","Cake","Freeway","Snow","Castle","Fruit","Stage","Cave","Golf","Cheese","Halloween"}
-local totalHedgehogs = 0
-local HH = {}
-local teams = {}
-local dummyHog = nil
-
-
-function onGameInit()
-    -- Ensure people get same map for same theme
-    Theme = themes[GetRandom(#themes)+1]
-    Seed = ClimbHome
-    TurnTime = 999999999
-    EnableGameFlags(gfOneClanMode)
-    DisableGameFlags(gfBottomBorder+gfBorder)
-    CaseFreq = 0
-    Explosives = 0
-    MineDudPercent = 0
-    Map = "ClimbHome"
-    AddTeam(loc("Lonely Hog"), 0xDD0000, "Simple", "Island", "Default")
-    player = AddHog(loc("Climber"), 0, 1, "NoHat")
-    if showWaterStats then
-        dummyHog = AddHog(" ", 0, 1, "NoHat")
-        HH[dummyHog] = nil
-        totalHedgehogs = totalHedgehogs - 1
-        SendStat(siClanHealth, tostring(32640), " ")
-    end
-end
--- a/share/hedgewars/Data/Missions/Training/Target_Practice_-_Bazooka_easy.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
-
-local params = {
-	ammoType = amBazooka,
-	gearType = gtShell,
-	missionTitle = loc("Target Practice: Bazooka (easy)"),
-	wind = 50,
-	solidLand = true,
-	map = "Lonely_Island",
-	theme = "Island",
-	hog_x = 1439,
-	hog_y = 482,
-	hogName = loc("Zook"),
-	hogHat = "war_americanww2helmet",
-	teamName = loc("Team Zook"),
-	targets = {
-		{ x = 1310, y = 756 },
-		{ x = 1281, y = 893 },
-		{ x = 1376, y = 670 },
-		{ x = 1725, y = 907 },
-		{ x = 1971, y = 914 },
-		{ x = 1098, y = 955 },
-		{ x = 1009, y = 877 },
-		{ x = 930, y = 711 },
-		{ x = 771, y = 744 },
-		{ x = 385, y = 405 },
-		{ x = 442, y = 780 },
-		{ x = 620, y = 639 },
-		{ x = 311, y = 239 },
-	},
-	time = 80000,
-	shootText = loc("You have launched %d bazookas."),
-}
-
-TargetPracticeMission(params)
--- a/share/hedgewars/Data/Missions/Training/Target_Practice_-_Bazooka_hard.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
-
-local params = {
-	ammoType = amBazooka,
-	gearType = gtShell,
-	missionTitle = loc("Target Practice: Bazooka (hard)"),
-	wind = 20,
-	solidLand = true,
-	artillery = true,
-	map = "SB_Grassy",
-	theme = "Castle",
-	hog_x = 2112,
-	hog_y = 913,
-	hogName = loc("Zook"),
-	hogHat = "war_americanww2helmet",
-	teamName = loc("Team Zook"),
-	targets = {
-		{ x = 2660, y = 936 },
-		{ x = 2857, y = 629 },
-		{ x = 3044, y = 851 },
-		{ x = 3200, y = 441 },
-		{ x = 2931, y = 440 },
-		{ x = 3264, y = 370 },
-		{ x = 1880, y = 684 },
-		{ x = 1392, y = 672 },
-		{ x = 1587, y = 656 },
-		{ x = 1300, y = 840 },
-		{ x = 952, y = 814 },
-		{ x = 862, y = 634 },
-		{ x = 748, y = 794 },
-		{ x = 639, y = 548 },
-		{ x = 1730, y = 549 },
-		{ x = 1466, y = 566 },
-		{ x = 3716, y = 954 },
-	},
-	time = 180000,
-	shootText = loc("You have launched %d bazookas."),
-}
-
-TargetPracticeMission(params)
--- a/share/hedgewars/Data/Missions/Training/Target_Practice_-_Cluster_Bomb.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
-
-local params = {
-	ammoType = amClusterBomb,
-	gearType = gtClusterBomb,
-	missionTitle = loc("Cluster Bomb Training"),
-	solidLand = false,
-	map = "Trash",
-	theme = "Golf",
-	hog_x = 756,
-	hog_y = 370,
-	hogName = loc("Private Nolak"),
-	hogHat = "war_desertgrenadier1",
-	teamName = loc("The Hogies"),
-	targets = {
-		{ x = 628, y = 0 },
-		{ x = 891, y = 0 },
-		{ x = 1309, y = 0 },
-		{ x = 1128, y = 0 },
-		{ x = 410, y = 0 },
-		{ x = 1564, y = 0 },
-		{ x = 1248, y = 476 },
-		{ x = 169, y = 0 },
-		{ x = 1720, y = 0 },
-		{ x = 1441, y = 0 },
-		{ x = 599, y = 0 },
-		{ x = 1638, y = 0 },
-	},
-	time = 180000,
-	shootText = loc("You have thrown %d cluster bombs."),
-}
-
-TargetPracticeMission(params)
--- a/share/hedgewars/Data/Missions/Training/Target_Practice_-_Grenade_easy.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
-
-local params = {
-	ammoType = amGrenade,
-	gearType = gtGrenade,
-	missionTitle = loc("Target Practice: Grenade (easy)"),
-	solidLand = true,
-	artillery = true,
-	map = "SB_Crystal",
-	theme = "Cave",
-	hog_x = 2039,
-	hog_y = 684,
-	hogName = loc("Grenadier"),
-	hogHat = "war_desertgrenadier2",
-	teamName = loc("Grenade Group"),
-	targets = {
-		{ x = 1834, y = 747 },
-		{ x = 2308, y = 729 },
-		{ x = 1659, y = 718 },
-		{ x = 1196, y = 704 },
-		{ x = 2650, y = 826 },
-		{ x = 1450, y = 705 },
-		{ x = 2774, y = 848 },
-		{ x = 2970, y = 704 },
-	},
-	time = 80000,
-	shootText = loc("You have thrown %d grenades."),
-}
-
-TargetPracticeMission(params)
--- a/share/hedgewars/Data/Missions/Training/Target_Practice_-_Grenade_hard.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
-
-local params = {
-	ammoType = amGrenade,
-	gearType = gtGrenade,
-	missionTitle = loc("Target Practice: Grenade (hard)"),
-	solidLand = true,
-	artillery = true,
-	map = "SB_Crystal",
-	theme = "Cave",
-	hog_x = 1456,
-	hog_y = 669,
-	hogName = loc("Grenadier"),
-	hogHat = "war_desertgrenadier2",
-	teamName = loc("Grenade Group"),
-	targets = {
-		{ x = 1190, y = 694 },
-		{ x = 962, y = 680 },
-		{ x = 1090, y = 489 },
-		{ x = 1664, y = 666 },
-		{ x = 1584, y = 580 },
-		{ x = 2160, y = 738 },
-		{ x = 1836, y = 726 },
-		{ x = 618, y = 753 },
-		{ x = 837, y = 668 },
-		{ x = 2424, y = 405 },
-		{ x = 2310, y = 742 },
-		{ x = 294, y = 897 },
-		{ x = 472, y = 855 },
-		{ x = 2949, y = 724},
-		{ x = 3356, y = 926 },
-		{ x = 3734, y = 918 },
-		{ x = 170, y = 874 },
-		
-		
-	},
-	time = 180000,
-	shootText = loc("You have thrown %d grenades."),
-}
-
-TargetPracticeMission(params)
--- a/share/hedgewars/Data/Missions/Training/Target_Practice_-_Homing_Bee.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
-
-local params = {
-	ammoType = amBee,
-	gearType = gtBee,
-	missionTitle = loc("Target Practice: Homing Bee"),
-	solidLand = true,
-	map = "Hedgewars",
-	theme = "Nature",
-	hog_x = 1990,
-	hog_y = 514,
-	hogHat = "NoHat",
-	teamGrave = "bp2",
-	targets = {
-		{ x = 1949, y = 273 },
-		{ x = 1734, y = 322 },
-		{ x = 1574, y = 340 },
-		{ x = 1642, y = 474 },
-		{ x = 2006, y = 356 },
-		{ x = 1104, y = 285 },
-		{ x = 565, y = 440 },
-		{ x = 732, y = 350 },
-		{ x = 2022, y = 396 },
-		{ x = 366, y = 360 },
-		{ x = 556, y = 300 },
-		{ x = 902, y = 306 },
-		{ x = 924, y = 411 },
-		{ x = 227, y = 510 },
-		{ x = 150, y = 300 },
-	},
-	time = 120000,
-	shootText = loc("You have launched %d homing bees."),
-}
-
-TargetPracticeMission(params)
--- a/share/hedgewars/Data/Missions/Training/Target_Practice_-_Shotgun.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-HedgewarsScriptLoad("/Scripts/TargetPractice.lua")
-
-local params = {
-	ammoType = amShotgun,
-	gearType = gtShotgunShot,
-	missionTitle = loc("Target Practice: Shotgun"),
-	solidLand = false,
-	map = "SB_Haunty",
-	theme = "Halloween",
-	hog_x = 320,
-	hog_y = 324,
-	hogHat = "NoHat",
-	hogGrave = "Bones",
-	targets = {
-		{ x = 495, y = 501 },
-		{ x = 227, y = 530 },
-		{ x = 835, y = 934 },
-		{ x = 1075, y = 889 },
-		{ x = 887, y = 915 },
-		{ x = 1148, y = 750 },
-		{ x = 916, y = 915 },
-		{ x = 1211, y = 700 },
-		{ x = 443, y = 505 },
-		{ x = 822, y = 964 },
-		{ x = 1092, y = 819 },
-		{ x = 1301, y = 683 },
-		{ x = 1480, y = 661 },
-		{ x = 1492, y = 786 },
-		{ x = 1605, y = 562 },
-		{ x = 1545, y = 466 },
-		{ x = 1654, y = 392 },
-		{ x = 1580, y = 334 },
-		{ x = 1730, y = 222 },
-	},
-	time = 90000,
-}
-
-TargetPracticeMission(params)
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Bamboo_Thicket.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-
-local player = nil 
-local enemy = nil
-local firedShell = false
-local turnNumber = 0
-
-local hhs = {}
-local numhhs = 0
-
-function onGameInit()
-
-	Seed = 0 
-	TurnTime = 20000 
-	CaseFreq = 0 
-	MinesNum = 0 
-	Explosives = 0 
-	Map = "Bamboo" 
-	Theme = "Bamboo"
-	SuddenDeathTurns = 99999
-
-	AddTeam(loc("Pathetic Resistance"), 14483456, "Simple", "Island", "Default")
-	player = AddHog(loc("Ikeda"), 0, 10, "StrawHat")
-			
-	AddTeam(loc("Cybernetic Empire"), 	1175851, "Simple", "Island", "Default")
-	enemy = AddHog(loc("Unit 835"), 1, 10, "cyborg1")
-
-	SetGearPosition(player,142,656)
-	SetGearPosition(enemy,1824,419)
-
-end
-
-
-function onGameStart()
-
-	ShowMission(loc("Bamboo Thicket"), loc("User Challenge"), loc("Eliminate the enemy before the time runs out"), -amBazooka, 0)
-
-	--WEAPON CRATE LIST. WCRATES: 1
-	SpawnAmmoCrate(891,852,amBazooka)
-	--UTILITY CRATE LIST. UCRATES: 2
-	SpawnUtilityCrate(962,117,amBlowTorch)
-	SpawnUtilityCrate(403,503,amParachute)
-
-	AddAmmo(enemy, amGrenade, 100)
-		
-end
-
-function onNewTurn()
-	SetWind(100)
-	turnNumber = turnNumber + 1
-end
-
-function onAmmoStoreInit()
-	SetAmmo(amSkip, 9, 0, 0, 0)
-	SetAmmo(amGirder, 4, 0, 0, 0)
-	SetAmmo(amBlowTorch, 0, 0, 0, 1)
-	SetAmmo(amParachute, 0, 0, 0, 2)
-	SetAmmo(amBazooka, 0, 0, 0, 2)
-end
-
-
-function onGearAdd(gear)
-
-	if GetGearType(gear) == gtHedgehog then
-		hhs[numhhs] = gear
-		numhhs = numhhs + 1
-	elseif GetGearType(gear) == gtShell then
-		firedShell = true
-	end
-
-end
-
-function onGearDelete(gear)
-
-	if (gear == enemy) then
-		
-		ShowMission(loc("Bamboo Thicket"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
-		
-		if (turnNumber < 6) and (firedShell == false) then
-			AddCaption(loc("Achievement Unlocked") .. ": " .. loc("Energetic Engineer"),0xffba00ff,capgrpMessage2)
-		end
-
-	elseif gear == player then
-		ShowMission(loc("Bamboo Thicket"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
-	end
-
-end
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Dangerous_Ducklings.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-
-local player = nil -- This variable will point to the hog's gear
-local instructor = nil
-local enemy = nil
-
-local speechStage = 0
-
-local gameLost = false
-local gameWon = false
-local notListening = false
-
-local endTimer = 0
-
-function onGameInit()
-
-	-- Things we don't modify here will use their default values.
-
-	Seed = 0 -- The base number for the random number generator
-	GameFlags = gfInfAttack -- Game settings and rules
-	TurnTime = 60000 -- The time the player has to move each round (in ms)
-	CaseFreq = 0 -- The frequency of crate drops
-	MinesNum = 0 -- The number of mines being placed
-	Explosives = 0 -- The number of explosives being placed
-	Delay = 0 -- The delay between each round
-	Map = "Bath" -- The map to be played
-	Theme = "Bath" -- The theme to be used
-	SuddenDeathTurns = 99999
-
-
-	AddTeam(loc("Bloody Rookies"), 14483456, "Simple", "Island", "Default")
-	player = AddHog(loc("Hunter"), 0, 1, "NoHat")
-	instructor = AddHog(loc("Instructor"), 0, 100, "sf_vega")
-
-	AddTeam(loc("Blue Team"), 29439, "Simple", "Island", "Default")
-	enemy = AddHog(loc("Filthy Blue"), 1, 100, "Skull")
-
-	SetGearPosition(player,146,902)
-	SetGearPosition(instructor,317,902)
-	SetGearPosition(enemy,1918,837)
-
-	HogSay(player, ".............................", SAY_THINK)
-	HogTurnLeft(instructor, true)
-
-end
-
-
-function onGameStart()
-
-	SpawnAmmoCrate(475,476,amRope)
-	SpawnAmmoCrate(1729,476,amFirePunch)
-
-	FollowGear(player)
-
-	ShowMission(loc("Dangerous Ducklings"), "", loc("Eliminate the Blue Team"), -amRope, 5000);
-
-end
-
-
-function onGameTick()
-
-
-	-- opening speech
-	if (notListening == false) and (gameLost == false) then
-
-		if (TurnTimeLeft == 58000) and (speechStage == 0)  then
-			HogSay(instructor, loc("Listen up, maggot!!"), SAY_SHOUT)
-			speechStage = 1
-		elseif (TurnTimeLeft == 57000) and (speechStage == 1) then
-			HogSay(player,loc("!!!"),SAY_SHOUT)
-		elseif (TurnTimeLeft == 55000) and (speechStage == 1) then
-			HogSay(instructor, loc("The enemy is hiding out on yonder ducky!"), SAY_SAY)
-			speechStage = 2
-
-		elseif (TurnTimeLeft == 49000) and (speechStage == 2) then
-			FollowGear(enemy)
-		elseif (TurnTimeLeft == 46500) and (speechStage == 2) then
-			FollowGear(instructor)
-			HogSay(instructor, loc("Get on over there and take him out!"), SAY_SAY)
-			speechStage = 3
-		elseif (TurnTimeLeft == 43500) and (speechStage == 3) then
-			HogSay(instructor, loc("GO! GO! GO!"), SAY_SHOUT)
-			speechStage = 4
-			givenSpeech = true
-		end
-
-	end
-
-	-- if player falls in water or if player ignores speech
-	if (CurrentHedgehog ~= nil) and (CurrentHedgehog == player) then
-		if (GetY(player) > WaterLine) and (gameLost == false) then
-			HogSay(instructor, loc("DAMMIT, ROOKIE!"), SAY_SHOUT)
-			gameLost = true
-		end
-
-		if (GetX(player) > 300) and (GetY(player) > 880) and (notListening == false) and (speechStage < 3) then
-			HogSay(instructor, loc("DAMMIT, ROOKIE! GET OFF MY HEAD!"), SAY_SHOUT)
-			notListening = true
-		end
-
-	end
-
-	--player out of time
-	if (TurnTimeLeft == 1) and (gameWon == false) then
-		SetHealth(player, 0)
-	end
-
-	-- meh
-	if gameLost == true then
-		endTimer = endTimer + 1
-		if (CurrentHedgehog ~= nil) and (CurrentHedgehog == instructor) then
-			if endTimer >= 3000 then
-				--SetHealth(instructor,0)
-				TurnTimeLeft = 1
-				DismissTeam(loc("Bloody Rookies"))
-			end
-			ShowMission(loc("MISSION FAILED"), loc(":("), loc("You've failed. Try again."), -amRope, 5000);
-		end
-	end
-
-end
-
-
-function onAmmoStoreInit()
-	SetAmmo(amFirePunch, 0, 0, 0, 1)
-	SetAmmo(amParachute, 1, 0, 0, 0)
-	SetAmmo(amRope, 0, 0, 0, 1)
-end
-
-function onGearDelete(gear)
-	if GetGearType(gear) == gtHedgehog then
-		if gear == player then
-			gameLost = true
-		elseif (gear == instructor) and (GetY(gear) > WaterLine) then
-			HogSay(player, loc("See ya!"), SAY_THINK)
-			TurnTimeLeft = 3000
-			AddCaption(loc("Achievement Unlocked") .. ": " .. loc("Naughty Ninja"),0xffba00ff,capgrpMessage2)
-			DismissTeam(loc("Blue Team"))
-			gameWon = true
-		elseif gear == enemy then
-			HogSay(player, loc("Enjoy the swim..."), SAY_THINK)
-			gameWon = true
-			TurnTimeLeft = 3000
-		end
-
-	end
-end
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Diver.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-
-local player = nil -- This variable will point to the hog's gear
-local enemy = nil
-
-local GameOver = false
-
-function onGameInit()
-
-	-- Things we don't modify here will use their default values.
-
-	Seed = 0 -- The base number for the random number generator
-	GameFlags = gfInfAttack + gfDisableWind-- Game settings and rules
-	TurnTime = 90000 -- The time the player has to move each round (in ms)
-	CaseFreq = 0 -- The frequency of crate drops
-	MinesNum = 0 -- The number of mines being placed
-	MinesTime  = 1000
-	Explosives = 0 -- The number of explosives being placed
-	Delay = 10 -- The delay between each round
-	Map = "Hydrant" -- The map to be played
-	Theme = "City" -- The theme to be used
-	SuddenDeathTurns = 99999
-
-	AddTeam(loc("Bloody Rookies"), 14483456, "Simple", "Island", "Default")
-	player = AddHog(loc("Hunter"), 0, 1, "NoHat")
-			
-	AddTeam(loc("Toxic Team"), 	1175851, "Simple", "Island", "Default")
-	enemy = AddHog(loc("Poison"), 1, 100, "Skull")
-
-	SetGearPosition(player,430,516)
-	SetGearPosition(enemy,1464,936)
-
-end
-
-
-function onGameStart()
-
-
-	SpawnAmmoCrate(426,886,amJetpack)
-	SpawnAmmoCrate(1544,690,amFirePunch)
-	SpawnAmmoCrate(950,851,amBlowTorch)
-	SpawnAmmoCrate(1032,853,amParachute)
-
-	AddGear(579, 296, gtMine, 0, 0, 0, 0)
-
-	ShowMission(loc("Operation Diver"), "", loc("Eliminate Poison before the time runs out") .. loc("|- Mines Time:") .. " " .. 1 .. " " .. loc("sec"), -amFirePunch, 0);
-	--SetTag(AddGear(0, 0, gtATSmoothWindCh, 0, 0, 0, 1), -70)
-
-	SetWind(-100)
-
-end
-
-
-function onGameTick()
-
-
-	if (TotalRounds == 3) and (GameOver == false) then
-		SetHealth(player, 0)
-		GameOver = true
-	end
-
-	if TurnTimeLeft == 1 then
-		SetHealth(player, 0)
-		GameOver = true
-	end
-
-end
-
-
-function onAmmoStoreInit()
-	SetAmmo(amFirePunch, 1, 0, 0, 1)
-	SetAmmo(amBlowTorch, 0, 0, 0, 1)
-	SetAmmo(amGirder, 1, 0, 0, 0)
-	SetAmmo(amParachute, 0, 0, 0, 1)
-	SetAmmo(amJetpack, 0, 0, 0, 1)
-end
-
-
-function onGearAdd(gear)
-
-	if GetGearType(gear) == gtJetpack then
-		SetHealth(gear,1000)
-	end
-
-end
-
-function onGearDelete(gear)
-
-	if (gear == enemy) and (GameOver == false) then
-		ShowMission(loc("Operation Diver"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
-	elseif gear == player then
-		ShowMission(loc("Operation Diver"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)		
-		GameOver = true
-	end
-
-end
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Newton_and_the_Hammock.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-
-local player = nil 
-local enemy = nil
-local failed = false
-
-local hhs = {}
-local numhhs = 0
-
-function onGameInit()
-
-	Seed = 0
-	TurnTime = 60000 
-	CaseFreq = 0
-	MinesTime  = 1000
-	SuddenDeathTurns = 999999
-	HealthCaseProb = 35
-	Explosives = 0
-	MinesNum = 0
-	Map = "Hammock" 
-	Theme = "Nature"
-
-	AddTeam(loc("Pathetic Resistance"), 14483456, "Simple", "Island", "Default")
-	player = AddHog(loc("Ikeda"), 0, 48, "StrawHat")
-			
-	AddTeam(loc("Cybernetic Empire"), 	1175851, "Simple", "Island", "Default")
-	enemy = AddHog(loc("Unit") .. " 811", 1, 100, "cyborg1")
-
-	SetGearPosition(player,430,1540)
-	SetGearPosition(enemy,1464,1960)
-
-end
-
-
-function onGameStart()
-
-	AddAmmo(enemy, amShotgun, 100)
-	AddAmmo(enemy, amFirePunch, 100)
-
-	--GIRDER LIST. 
-	PlaceGirder(1073,2009,0)
-	PlaceGirder(524,1487,3)
-	PlaceGirder(638,1453,4)
-	PlaceGirder(761,1453,0)
-	PlaceGirder(840,1421,3)
-	PlaceGirder(302,1388,6)
-	PlaceGirder(327,1506,1)
-	PlaceGirder(1669,1832,3)
-	--MINE LIST. 
-	AddGear(1056,1987,gtMine, 0, 0, 0, 0)
-	AddGear(1086,1988,gtMine, 0, 0, 0, 0)
-	--STICKY MINE LIST. 
-	AddGear(1089,965,gtSMine, 0, 0, 0, 0)
-	AddGear(1133,945,gtSMine, 0, 0, 0, 0)	
-	AddGear(1010,1081,gtSMine, 0, 0, 0, 0)
-	AddGear(1036,1049,gtSMine, 0, 0, 0, 0)
-	AddGear(1057,1004,gtSMine, 0, 0, 0, 0)
-	AddGear(784,1252,gtSMine, 0, 0, 0, 0)
-	AddGear(841,1257,gtSMine, 0, 0, 0, 0)
-	AddGear(902,1263,gtSMine, 0, 0, 0, 0)
-	AddGear(952,1281,gtSMine, 0, 0, 0, 0)
-	AddGear(517,1546,gtSMine, 0, 0, 0, 0)
-	AddGear(559,1597,gtSMine, 0, 0, 0, 0)
-	AddGear(613,1650,gtSMine, 0, 0, 0, 0)
-	AddGear(674,1705,gtSMine, 0, 0, 0, 0)
-	AddGear(746,1692,gtSMine, 0, 0, 0, 0)
-	AddGear(810,1692,gtSMine, 0, 0, 0, 0)
-	AddGear(872,1673,gtSMine, 0, 0, 0, 0)
-	AddGear(933,1666,gtSMine, 0, 0, 0, 0)
-	AddGear(981,1662,gtSMine, 0, 0, 0, 0)
-	AddGear(1016,1634,gtSMine, 0, 0, 0, 0)
-	AddGear(1063,1595,gtSMine, 0, 0, 0, 0)
-	AddGear(1100,1574,gtSMine, 0, 0, 0, 0)
-	AddGear(1002,1461,gtSMine, 0, 0, 0, 0)
-	AddGear(1052,1438,gtSMine, 0, 0, 0, 0)
-	AddGear(1102,1464,gtSMine, 0, 0, 0, 0)
-	--WEAPON CRATE LIST. 
-	SpawnAmmoCrate(1565,642,amSineGun)
-	SpawnAmmoCrate(548,858,amBazooka)
-	--UTILITY CRATE LIST.
-	SpawnUtilityCrate(479,847,amJetpack)
-	SpawnUtilityCrate(1550,1715,amBlowTorch)
-	SpawnUtilityCrate(1227,1941,amJetpack)
-	SpawnUtilityCrate(1070,1964,amInvulnerable)
-	SpawnUtilityCrate(1070,1875,amTeleport)
-	--HOG POSITION LIST.
-	if hhs[0] ~= nil then
-       		 SetGearPosition(hhs[0],397,865)
-	end
-		if hhs[1] ~= nil then
-        	SetGearPosition(hhs[1],561,1365)
-	end
-
-	ShowMission(loc("Newton's Hammock"), loc("User Challenge"), loc("Eliminate the enemy before the time runs out"), -amParachute, 0)
-		
-end
-
-function onAmmoStoreInit()
-	SetAmmo(amSkip, 9, 0, 0, 1)
-	SetAmmo(amBazooka, 0, 0, 0, 1)
-	SetAmmo(amJetpack, 0, 0, 0, 1)
-	SetAmmo(amTeleport, 0, 0, 0, 1)
-	SetAmmo(amSineGun, 0, 0, 0, 1)
-	SetAmmo(amInvulnerable, 0, 0, 0, 1)
-	SetAmmo(amBlowTorch, 0, 0, 0, 1)
-end
-
-function onGearDamage(gear, damage)
-	if (gear == player) and (damage >= 48) then
-		failed = true
-	end
-end
-
-function onGearAdd(gear)
-
-	if GetGearType(gear) == gtHedgehog then
-		hhs[numhhs] = gear
-		numhhs = numhhs + 1
-	end	
-
-end
-
-function onGearDelete(gear)
-
-	if (gear == enemy) and (failed == false) then
-		ShowMission(loc("Newton's Hammock"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
-	elseif gear == player then
-		ShowMission(loc("Newton's Hammock"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
-	end
-
-end
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Nobody_Laugh.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
---------------------------------------
--- NOBODY LAUGH
--- a hilarious (not really) adventure
---------------------------------------
-
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-HedgewarsScriptLoad("/Scripts/Tracker.lua")
-
-local hhs = {}
-
-function onGameInit()
-
-	Seed = 0
-	GameFlags = gfInfAttack + gfPerHogAmmo +gfDisableWind
-	SuddenDeathTurns = 9999
-	TurnTime = 180000
-	CaseFreq = 0
-	MinesNum = 0
-	Explosives = 0
-	Map = "Bath"
-	Theme = "Nature"
-
-	AddTeam(loc("Nameless Heroes"), 14483456, "eyecross", "Wood", "HillBilly", "cm_birdy")
-	hhs[1] = AddHog(loc( "Hunter" ), 0, 1, "Skull")
-	SetGearPosition(hhs[1], 1267, 451)
-	hhs[2] = AddHog(loc("Drowner"), 0, 31, "mp3")
-	SetGearPosition(hhs[2], 1332, 451)
-
-	AddTeam(loc("Clowns"), 1175851, "Duck2", "Tank", "Mobster", "cm_spider")
-	hhs[3] = AddHog(loc("Poison"), 5, 100, "WhySoSerious")
-	SetGearPosition(hhs[3], 1133, 446)
-	hhs[4] = AddHog(loc("Bobo"), 5, 100, "clown")
-	SetGearPosition(hhs[4], 1215, 553)
-	hhs[5] = AddHog(loc("Copper"), 5, 10, "clown-copper")
-	SetGearPosition(hhs[5], 414, 376)
-	hhs[6] = AddHog(loc("Derp"), 5, 100, "clown-crossed")
-	SetGearPosition(hhs[6], 1590, 886)
-	hhs[7] = AddHog(loc("Eckles"), 5, 100, "clown-copper")
-	SetGearPosition(hhs[7], 772, 754)
-	hhs[8] = AddHog(loc("Frank"), 5, 50, "clown-copper")
-	SetGearPosition(hhs[8], 1688, 714)
-	hhs[9] = AddHog(loc("Harry"), 5, 50, "clown-copper")
-	SetGearPosition(hhs[9], 1932, 837)
-	hhs[10] = AddHog(loc("Igmund"), 5, 50, "WhySoSerious")
-	SetGearPosition(hhs[10], 1601, 733)
-
-end
-
-function onGameStart()
-
-	AddAmmo(enemy, amAirAttack, 100)
-
-	ShowMission(	loc("Nobody Laugh"),
-					loc("User Challenge"),
-					loc("Eliminate the enemy before the time runs out")
-					, 0, 0
-				)
-
-	-- GIRDERS
-	PlaceGirder(1212, 710, 7)
-	PlaceGirder(1215, 570, 4)
-	PlaceGirder(1288, 520, 2)
-	PlaceGirder(1184, 468, 4)
-	PlaceGirder(1344, 468, 4)
-	PlaceGirder(1247, 346, 4)
-
-	PlaceGirder(667, 438, 4)
-	PlaceGirder(507, 438, 4)
-	PlaceGirder(434, 487, 2)
-	PlaceGirder(505, 537, 4)
-	PlaceGirder(665, 537, 4)
-	PlaceGirder(737, 487, 2)
-
-	PlaceGirder(416, 465, 6)
-	PlaceGirder(1415, 378, 6)
-	PlaceGirder(1300, 625, 3)
-	PlaceGirder(1359, 566, 3)
-	PlaceGirder(1436, 538, 0)
-	PlaceGirder(1505, 468, 4)
-
-	------ AMMO CRATE LIST ------
-	tempG = SpawnAmmoCrate(1242, 315, amBaseballBat)
-	tempG = SpawnAmmoCrate(1309, 315, amAirAttack)
-	tempG = SpawnAmmoCrate(144, 895, amAirAttack)
-	tempG = SpawnAmmoCrate(664, 699, amIceGun)
-	tempG = SpawnAmmoCrate(1572, 444, amFirePunch)
-	tempG = SpawnAmmoCrate(1574, 382, amDynamite)
-
-	------ UTIL CRATE LIST ------
-	tempG = SpawnUtilityCrate(654, 513, amParachute)
-	tempG = SpawnUtilityCrate(1569, 413, amParachute)
-
-	-- HOG AMMO
-	AddAmmo(hhs[1],amParachute,1)
-	AddAmmo(hhs[1],amHammer,1)
-	AddAmmo(hhs[2],amWhip,1)
-
-	for i = 3, 10 do
-		AddAmmo(hhs[i], amDEagle, 100)
-		AddAmmo(hhs[i], amShotgun, 100)
-		AddAmmo(hhs[i], amGrenade, 100)
-		AddAmmo(hhs[i], amBazooka, 100)
-		AddAmmo(hhs[i], amDrill, 100)
-	end
-
-end
-
-function onNewTurn()
-	SetWind(100)
-end
-
-function onAmmoStoreInit()
-
-	SetAmmo(amBaseballBat, 0, 0, 0, 1)
-	SetAmmo(amAirAttack, 0, 0, 0, 1)
-	SetAmmo(amFirePunch, 0, 0, 0, 1)
-	SetAmmo(amDynamite, 0, 0, 0, 1)
-	SetAmmo(amHammer, 0, 0, 0, 1)
-	SetAmmo(amIceGun, 0, 0, 0, 1)
-
-	SetAmmo(amParachute, 0, 0, 0, 1)
-
-	SetAmmo(amSwitch, 9, 0, 0, 0)
-	SetAmmo(amSkip, 9, 0, 0, 0)
-
-end
-
-------------------------------
---                  I'm in         whitesppaaaaaaaaaacceeeee           :D
-------------------------------
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_RCPlane_Challenge.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,494 +0,0 @@
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-
-local player = nil
-local RCGear = nil
-local planesUsed = 0
-local planeTimer = 0
-local planeUhOh = false
-local cratesLeft = 0
-local crateStreak = 0
-local longestCrateStreak = 0
-local commentTimer = 0
-local missiles = 0
-local totalMissiles = 0
-local missileScanTimer = 0
-local nextComment = sndNone
-
-function onGameInit()
-
-	Seed = 1
-	GameFlags = gfInfAttack + gfInvulnerable + gfOneClanMode + gfSolidLand
-
-	TurnTime = 90 * 1000
-
-	Map = "Ropes"
-	Theme = "Eyes"
-
-	CaseFreq = 0
-	MinesNum = 0
-	Explosives = 0
-
-	AddTeam(loc("Wannabe Flyboys"), 14483456, "Simple", "Island", "Default", "Hedgewars")
-	player = AddHog(loc("Ace"), 0, 80, "Gasmask")
-	SetGearPosition(player, 1380, 1500)
-
-end
-
-
-
-function onGameStart()
-
-	SendHealthStatsOff()
-
-	ShowMission     (
-                                loc("RC PLANE TRAINING"),
-                                loc("a Hedgewars challenge"),
-
-                                loc("Collect or destroy all the health crates.") .. "|" ..
-                                loc("Compete to use as few planes as possible!") .. "|" ..
-								"", -amRCPlane, 4000
-                                )
-
-	PlaceGirder(2192, 508, 6)
-	PlaceGirder(2192, 670, 6)
-	PlaceGirder(2193, 792, 2)
-	PlaceGirder(2100, 825, 4)
-	PlaceGirder(2009, 899, 6)
-	PlaceGirder(2084, 992, 4)
-	PlaceGirder(2145, 1087, 6)
-	PlaceGirder(2199, 1235, 5)
-	PlaceGirder(2308, 1296, 0)
-	PlaceGirder(2424, 1234, 7)
-	PlaceGirder(2473, 1129, 2)
-	PlaceGirder(2437, 1046, 1)
-	PlaceGirder(2409, 927, 6)
-	PlaceGirder(2408, 763, 6)
-	PlaceGirder(2404, 540, 6)
-	PlaceGirder(2426, 423, 3)
-	PlaceGirder(2550, 400, 4)
-	PlaceGirder(2668, 425, 1)
-	PlaceGirder(2707, 541, 6)
-	PlaceGirder(2706, 703, 6)
-	PlaceGirder(2705, 867, 6)
-	PlaceGirder(2779, 962, 4)
-	PlaceGirder(2894, 924, 3)
-	PlaceGirder(2908, 802, 6)
-	PlaceGirder(2907, 639, 6)
-	PlaceGirder(3052, 566, 4)
-	PlaceGirder(2971, 394, 4)
-	PlaceGirder(3103, 448, 7)
-	PlaceGirder(3047, 654, 0)
-	PlaceGirder(3043, 746, 6)
-	PlaceGirder(3265, 1583, 6)
-	PlaceGirder(3256, 1491, 4)
-	PlaceGirder(3187, 1401, 6)
-	PlaceGirder(3326, 1400, 6)
-	PlaceGirder(774, 530, 5)
-	PlaceGirder(922, 595, 4)
-	PlaceGirder(1079, 533, 7)
-	PlaceGirder(1139, 386, 6)
-	PlaceGirder(1074, 237, 5)
-	PlaceGirder(723, 381, 6)
-	PlaceGirder(781, 229, 7)
-	PlaceGirder(927, 746, 6)
-	PlaceGirder(874, 736, 0)
-	PlaceGirder(982, 737, 0)
-	PlaceGirder(2430, 1730, 4)
-
-	PlaceGirder(1613, 1104, 7)
-	PlaceGirder(1564, 1256, 6)
-	PlaceGirder(1643, 1341, 5)
-	PlaceGirder(1780, 1372, 4)
-	PlaceGirder(1869, 1296, 7)
-	PlaceGirder(1858, 1163, 5)
-	PlaceGirder(1739, 1044, 5)
-	PlaceGirder(1621, 926, 5)
-	PlaceGirder(1597, 985, 5)
-	PlaceGirder(1449, 939, 4)
-	PlaceGirder(1473, 874, 4)
-	PlaceGirder(2092, 1352, 7)
-	PlaceGirder(2145, 1444, 7)
-	PlaceGirder(2004, 1443, 3)
-	PlaceGirder(1978, 1523, 2)
-	PlaceGirder(2021, 1596, 1)
-	PlaceGirder(2103, 1625, 0)
-	PlaceGirder(2208, 1551, 7)
-	PlaceGirder(2327, 1431, 7)
-	PlaceGirder(2395, 1478, 6)
-	PlaceGirder(2396, 1600, 2)
-	PlaceGirder(2495, 1285, 6)
-	PlaceGirder(2494, 1408, 2)
-	PlaceGirder(2547, 530, 0)
-
-	PlaceGirder(2451, 1551, 0)
-	PlaceGirder(2551, 706, 6)
-	PlaceGirder(2551, 869, 6)
-	PlaceGirder(2623, 1016, 5)
-	PlaceGirder(2773, 1083, 4)
-	PlaceGirder(2924, 1019, 7)
-	PlaceGirder(2568, 1491, 7)
-	PlaceGirder(2618, 1346, 6)
-	PlaceGirder(2674, 1195, 7)
-	PlaceGirder(2822, 1142, 4)
-	PlaceGirder(2963, 1069, 7)
-	PlaceGirder(3067, 938, 5)
-	PlaceGirder(2803, 1373, 2)
-	PlaceGirder(2811, 1559, 2)
-
-	tempG = SpawnHealthCrate(930, 557)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(979, 692)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(876, 703)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(2309, 1260)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(1733, 1127)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(1738, 1320)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(3249, 1460)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(3051, 617)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(2972, 353)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(2548, 358)
-
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(2090, 1580)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(1752, 1753)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(1865, 1758)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(1985, 1760)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(2429, 1760)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(2810, 1480)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(2800, 1277)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(2806, 1107)
-	SetHealth(tempG, 25)
-
-	PlaceGirder(1897, 903, 6)
-	PlaceGirder(1916, 784, 3)
-	PlaceGirder(2010, 732, 4)
-	PlaceGirder(2082, 639, 6)
-	PlaceGirder(2081, 516, 2)
-	PlaceGirder(1985, 487, 4)
-	PlaceGirder(1862, 407, 5)
-	PlaceGirder(1855, 224, 7)
-	PlaceGirder(2006, 163, 4)
-	PlaceGirder(2128, 187, 1)
-	PlaceGirder(2251, 213, 4)
-	PlaceGirder(2413, 213, 4)
-	PlaceGirder(1952, 618, 0)
-	PlaceGirder(957, 1068, 4)
-	PlaceGirder(794, 1069, 4)
-	PlaceGirder(728, 1163, 6)
-	PlaceGirder(728, 1287, 2)
-	PlaceGirder(802, 1342, 4)
-	PlaceGirder(966, 1342, 4)
-	PlaceGirder(674, 1032, 1)
-	PlaceGirder(554, 1011, 4)
-	PlaceGirder(445, 1056, 3)
-	PlaceGirder(422, 1174, 6)
-	PlaceGirder(369, 1341, 5)
-	PlaceGirder(495, 1313, 5)
-	PlaceGirder(568, 1379, 3)
-	PlaceGirder(577, 1202, 2)
-	PlaceGirder(744, 1490, 5)
-	PlaceGirder(760, 1617, 7)
-	PlaceGirder(622, 1693, 4)
-	PlaceGirder(476, 1623, 5)
-	PlaceGirder(376, 1697, 1)
-	PlaceGirder(955, 1746, 2)
-	PlaceGirder(1025, 1746, 2)
-	PlaceGirder(1090, 1745, 2)
-	PlaceGirder(1156, 1746, 2)
-	PlaceGirder(3806, 1530, 2)
-	PlaceGirder(3880, 1464, 2)
-	PlaceGirder(3738, 1458, 2)
-	PlaceGirder(3806, 1390, 2)
-	PlaceGirder(3805, 1588, 0)
-	PlaceGirder(3676, 1609, 3)
-	PlaceGirder(3930, 1615, 1)
-	PlaceGirder(3719, 1295, 0)
-	PlaceGirder(3888, 1294, 0)
-	PlaceGirder(3661, 1385, 2)
-	PlaceGirder(3955, 1377, 2)
-	PlaceGirder(3982, 1518, 0)
-	PlaceGirder(3378, 440, 2)
-	PlaceGirder(3447, 492, 4)
-	PlaceGirder(3564, 529, 1)
-	PlaceGirder(3596, 647, 6)
-	PlaceGirder(3521, 740, 4)
-	PlaceGirder(3524, 838, 4)
-	PlaceGirder(3644, 819, 3)
-	PlaceGirder(3691, 708, 6)
-	PlaceGirder(3690, 545, 6)
-	PlaceGirder(3612, 433, 5)
-	PlaceGirder(3463, 383, 4)
-	PlaceGirder(2815, 122, 7)
-	PlaceGirder(2960, 72, 4)
-	PlaceGirder(3032, 123, 2)
-	PlaceGirder(3063, 174, 0)
-	PlaceGirder(3095, 124, 2)
-	PlaceGirder(3169, 71, 4)
-	PlaceGirder(3320, 124, 5)
-	PlaceGirder(3210, 179, 2)
-	PlaceGirder(2932, 181, 2)
-
-	tempG = SpawnHealthCrate(3804, 1461)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(3269, 1742)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(3066, 121)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(3207, 104)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(2928, 103)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(1997, 202)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(2253, 159)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(2132, 774)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(2549, 490)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(3527, 694)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(3777, 78)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(1124, 1746)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(1056, 1740)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(993, 1742)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(799, 1298)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(577, 1126)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(596, 1463)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(3854, 1043)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(1944, 567)
-	SetHealth(tempG, 25)
-	tempG = SpawnHealthCrate(338, 1748)
-	SetHealth(tempG, 25)
-
-
-end
-
---function onGameTick()
-
-	--if RCGear ~= nil then
-	--	AddCaption(GetTimer(RCGear))
-	--end
-
---end
-
-function onGameTick20()
-	if RCGear ~= nil then
-		if(GetTimer(RCGear) < 3000 and planeUhOh == false) then
-			PlaySound(sndUhOh, player)
-			planeUhOh = true
-		end
-		planeTimer = planeTimer + 20
-	end
-	if commentTimer > 0 then
-		commentTimer = commentTimer - 20
-	elseif(nextComment ~= sndNone) then
-		PlaySound(nextComment, player)
-		nextComment = sndNone
-	end
-	if missileScanTimer > 0 then
-		missileScanTimer = missileScanTimer - 20
-	else
-		if crateStreak == 0 and missiles == 3 then
-			PlaySound(sndMissed, player)
-			missiles = 4
-		end
-	end
-end
-
-function onNewTurn()
-	TurnTimeLeft = -1
-end
-
-function onGearAdd(gear)
-
-	if GetGearType(gear) == gtRCPlane then
-		RCGear = gear
-		planesUsed = planesUsed + 1
-		planeTimer = 0
-		missiles = 0
-	end
-
-	if GetGearType(gear) == gtCase then
-		cratesLeft = cratesLeft + 1
-	end
-
-	if GetGearType(gear) == gtAirBomb then
-		totalMissiles = totalMissiles + 1
-	end
-end
-
-function onGearDelete(gear)
-
-	if GetGearType(gear) == gtRCPlane then
-
-		RCGear = nil
-		planeUhOh = false
-		missiles = 0
-		AddCaption(string.format(loc("Planes used: %d"), planesUsed))
-
-		if(planeTimer < 2000 and crateStreak == 0) then
-			nextComment = sndStupid
-			commentTimer = math.min(2000-planeTimer, 800)
-		elseif(planeTimer < 5000 and crateStreak == 0) then
-			PlaySound(sndOops, player)
-		elseif(planesUsed == 72) then
-			PlaySound(sndStupid, player)
-		elseif(planesUsed == 50) then
-			PlaySound(sndNutter, player)
-		elseif(planesUsed == 30) then
-			PlaySound(sndOops, player)
-		end
-
-		crateStreak = 0
-
-	elseif GetGearType(gear) == gtAirBomb then
-		missiles = missiles + 1
-		missileScanTimer = 500
-
-	elseif GetGearType(gear) == gtCase then
-
-		cratesLeft = cratesLeft - 1
-		crateStreak = crateStreak + 1
-		if(crateStreak > longestCrateStreak) then
-			longestCrateStreak = crateStreak
-		end
-
-		AddCaption(string.format(loc("Crates left: %d"), cratesLeft))
-
-		if cratesLeft == 0 then
-
-			local rank = "unknown"
-			local color = 0xFFFFFFFF
-			local sound = sndVictory
-			if planesUsed >= 156 then
-				rank = loc("Destroyer of planes")	
-				color = 0xD06700FF
-				sound = sndLaugh
-			elseif planesUsed >= 98 then
-				rank = loc("Hopeless case")
-				color = 0xFF0000FF
-			elseif planesUsed >= 72 then
-				rank = loc("Drunk greenhorn")
-				color = 0xFF0040FF
-			elseif planesUsed >= 50 then
-				rank = loc("Greenhorn") -- a.k.a. "absolute beginner"
-				color = 0xFF0080FF
-			elseif planesUsed >= 39 then
-				rank = loc("Beginner")
-				color = 0xFF00BFFF
-			elseif planesUsed >= 30 then
-				rank = loc("Experienced beginner")
-				color = 0xFF00CCFF
-			elseif planesUsed >= 21 then
-				rank = loc("Below-average pilot")
-				color = 0xFF00FFFF
-			elseif planesUsed >= 17 then
-				rank = loc("Average pilot")				
-				color = 0xBF00FFFF
-			elseif planesUsed >= 13 then
-				rank = loc("Above-average pilot")
-				color = 0x8000FFFF
-			elseif planesUsed >= 8 then
-				rank = loc("Professional pilot")
-				color = 0x4000FFFF
-			elseif planesUsed >= 5 then
-				rank = loc("Professional stunt pilot")
-				color = 0x0000FFFF
-			elseif planesUsed >= 3 then
-				rank = loc("Elite pilot")
-				color = 0x0040FFFF
-			elseif planesUsed == 2 then
-				rank = loc("Upper-class elite pilot")
-				color = 0x0080FFFF
-			elseif planesUsed == 1 then
-				rank = loc("Top-class elite pilot")
-				color = 0x00FFFFFF
-				sound = sndFlawless
-			else
-				rank = loc("Cheater")
-				color = 0xFF0000FF
-				sound = sndCoward
-			end
-			AddCaption(string.format(loc("Rank: %s"), rank), color, capgrpMessage2)
-			SendStat(siCustomAchievement, string.format(loc("Your rank: %s"), rank))
-			if planesUsed == 1 then
-				AddCaption(loc("Flawless victory!"))
-				SendStat(siGameResult, loc("You have perfectly beaten the challenge!"))
-				SendStat(siCustomAchievement, loc("You have used only 1 RC plane. Outstanding!"))
-			else
-				AddCaption(loc("Victory!"))
-				SendStat(siGameResult, loc("You have finished the challenge!"))
-				SendStat(siCustomAchievement, string.format(loc("You have used %d RC planes."), planesUsed))
-			end
-		
-			if(totalMissiles > 1) then
-				SendStat(siCustomAchievement, string.format(loc("You have dropped %d missiles."), totalMissiles))
-			end
-
-			if(longestCrateStreak > 5) then
-				if(planesUsed == 1) then
-					SendStat(siCustomAchievement, string.format(loc("In your best (and only) flight you took out %d crates with one RC plane!"), longestCrateStreak))
-				else
-					SendStat(siCustomAchievement, string.format(loc("In your best flight you took out %d crates with one RC plane."), longestCrateStreak))
-				end
-			end
-
-			if(planesUsed == 2) then
-				SendStat(siCustomAchievement, loc("This was an awesome performance! But this challenge can be finished with even just one RC plane. Can you figure out how?"))
-			end
-			if(planesUsed == 1) then
-				SendStat(siCustomAchievement, loc("Congratulations! You have truly mastered this challenge! Don't forget to save the demo."))
-				SendStat(siCustomAchievement, string.format(loc("You have gained an achievement: %s"), loc("Prestigious Pilot")))
-			end
-
-			ShowMission     (
-                                loc("CHALLENGE COMPLETE"),
-                                loc("Congratulations!"),
-                                string.format(loc("Planes used: %d"), planesUsed) .. "|" ..
-                                "", 0, 0
-                                )
-			SetState(player, gstWinner)
-			PlaySound(sound, player)
-
-
-			DismissTeam(loc("Wannabe Flyboys"))
-			EndGame()
-		end
-
-		if RCGear ~= nil then
-			SetTimer(RCGear, GetTimer(RCGear) + 10000)
-		end
-	end
-
-end
-
-function onAmmoStoreInit()
-	SetAmmo(amRCPlane, 9, 0, 0, 0)
-end
-
-function onNewTurn()
- 	SetWeapon(amRCPlane)
-end
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Rope_Knock_Challenge.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,273 +0,0 @@
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-
-local hhs = {}
-local missionWon = nil
-local endTimer = 1000
-local hogsKilled = 0
-local finishTime
-
-local HogData =	{
-					{"Bufon", 			"ShaggyYeti",false},
-					{"burp", 			"lambda",false},
-					{"Blue", 			"cap_blue",false},
-					{"bender", 			"NoHat",false},
-					{"Castell",			"NoHat",false},
-					{"cekoto", 			"NoHat",false},
-					{"CheezeMonkey",	"NoHat",false},
-					{"claymore", 		"NoHat",false},
-					{"CIA-144", 		"cyborg1",false},
-					{"doomy ", 			"NoHat",false},
-					{"Falkenauge", 		"NoHat",false},
-					{"FadeOne", 		"NoHat",false},
-					{"hayaa", 			"NoHat",false},
-					{"Hermes", 			"laurel",false},
-					{"HedgeKing",		"NoHat",false},
-					{"Izack1535", 		"NoHat",false},
-					{"Kiofspa", 		"NoHat",false},
-					{"Komplex", 		"NoHat",false},
-					{"koda", 			"poke_mudkip",false},
-					{"Lalo", 			"NoHat",false},
-					{"Logan", 			"NoHat",false},
-					{"lollkiller", 		"NoHat",false},
-					{"Luelle", 			"NoHat",false},
-					{"mikade", 			"Skull",false},
-					{"Mushi", 			"sm_daisy",false},
-					{"Naboo", 			"NoHat",false},
-					{"nemo", 			"bb_bub",false},
-					{"practice", 		"NoHat",false},
-					{"Prof. Panic",  	"NoHat",false},
-					{"Randy",			"zoo_Sheep",false},
-					{"rhino", 			"NinjaTriangle",false},
-					{"Radissthor",  	"NoHat",false},
-					{"Sami",			"sm_peach",false},
-					{"soreau", 			"NoHat",false},
-					{"sdw195", 			"NoHat",false},
-					{"sphrix", 			"TeamTopHat",false},
-					{"sheepluva",		"zoo_Sheep",false},
-					{"Smaxx", 			"NoHat",false},
-					{"shadowzero", 		"NoHat",false},
-					{"Star and Moon",	"SparkleSuperFun",false},
-					{"The 24",			"NoHat",false},
-					{"TLD",				"NoHat",false},
-					{"Tiyuri", 			"sf_ryu",false},
-					{"unC0Rr", 			"cyborg1",false},
-					{"Waldsau", 		"cyborg1",false},
-					{"wolfmarc", 		"knight",false},
-					{"Xeli", 			"android",false}
-
-				}
-
-function GenericEnd()
-	EndGame()
-end
-
-function GameOverMan()
-	missionWon = false
-	ShowMission(loc("Rope-knocking Challenge"), loc("Challenge over!"), loc("Oh no! Just try again!"), -amSkip, 0)
-	SendStat(siGameResult, loc("Challenge over!"))
-	local score = math.ceil((hogsKilled / 16)*6000)
-	SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, score))
-	SendStat(siPointType, "points")
-	SendStat(siPlayerKills, tostring(score), loc("Wannabe Shoppsta"))
-	PlaySound(sndHellish)
-end
-
-function GG()
-	missionWon = true
-	local completeTime = (TurnTime - finishTime) / 1000
-	ShowMission(loc("Rope-knocking Challenge"), loc("Challenge completed!"), loc("Congratulations!") .. "|" .. string.format(loc("Completion time: %.2fs"), completeTime), 0, 0)
-	PlaySound(sndHomerun)
-	SendStat(siGameResult, loc("Challenge completed!"))
-	local hogScore = math.ceil((hogsKilled / 16)*6000)
-	local timeScore = math.ceil((finishTime/TurnTime)*6000)
-	local score = hogScore + timeScore
-	SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, hogScore))
-	SendStat(siCustomAchievement, string.format(loc("You have completed this challenge in %.2f s (+%d points)."), completeTime, timeScore))
-	SendStat(siPointType, "points")
-	SendStat(siPlayerKills, tostring(score), loc("Wannabe Shoppsta"))
-end
-
-function AssignCharacter(p)
-
-	done = false
-	sanityCheck = 0
-
-	while(done == false) do
-
-		i = 1+ GetRandom(#HogData)
-		if HogData[i][3] == false then
-			HogData[i][3] = true
-			done = true
-			SetHogName(hhs[p], HogData[i][1])
-			SetHogHat(hhs[p], HogData[i][2])
-		elseif HogData[i][3] == true then
-			sanityCheck = sanityCheck +1
-			if sanityCheck == 100 then
-				done = true
-				SetHogName(hhs[p], "Newbie")
-				SetHogHat(hhs[p], "NoHat")
-			end
-		end
-
-	end
-
-end
-
-function onGameInit()
-
-	--Seed = 1
-	GameFlags = gfBorder + gfSolidLand
-
-	TurnTime = 180 * 1000
-	Delay = 500
-	Map = "Ropes"
-	Theme = "Eyes"
-
-	CaseFreq = 0
-	MinesNum = 0
-	Explosives = 0
-
-	AddTeam(loc("Wannabe Shoppsta"), 0x11F12B, "Simple", "Island", "Default", "cm_shoppa")
-	hhs[0] = AddHog(loc("Ace"), 0, 1, "Gasmask")
-	SetGearPosition(player, 1380, 1500)
-
-	AddTeam(loc("Unsuspecting Louts"), 0xDD0000, "Simple", "Island", "Default", "cm_face")
-	for i = 1, 8 do
-		hhs[i] = AddHog("generic", 0, 1, "NoHat")
-	end
-
-	AddTeam(loc("Unlucky Sods"), 0xDD0000, "Simple", "Island", "Default", "cm_balrog")
-	for i = 9, 16 do
-		hhs[i] = AddHog("generic", 0, 1, "NoHat")
-	end
-
-end
-
-
-
-function onGameStart()
-	SendHealthStatsOff()
-
-	ShowMission     (
-                        loc("Rope-knocking Challenge"),
-                        loc("Challenge"),
-                        loc("Use the rope to knock your enemies to their doom.") .. "|" ..
-                        loc("Finish this challenge as fast as possible to earn bonus points."),
-                        -amRope, 4000)
-
-	PlaceGirder(46,1783, 0)
-
-	SetGearPosition(hhs[0], 2419, 1769)
-	SetGearPosition(hhs[1], 3350, 570)
-	SetGearPosition(hhs[2], 3039, 1300)
-	SetGearPosition(hhs[3], 2909, 430)
-	SetGearPosition(hhs[4], 2150, 879)
-	SetGearPosition(hhs[5], 1735, 1136)
-	SetGearPosition(hhs[6], 1563, 553)
-	SetGearPosition(hhs[7], 679, 859)
-	SetGearPosition(hhs[8], 1034, 251)
-	SetGearPosition(hhs[9], 255, 67)
-	SetGearPosition(hhs[10], 2671, 7)
-	SetGearPosition(hhs[11], 2929, 244)
-	SetGearPosition(hhs[12], 1946, 221)
-	SetGearPosition(hhs[13], 3849, 1067)
-	SetGearPosition(hhs[14], 3360, 659)
-	SetGearPosition(hhs[15], 3885, 285)
-	SetGearPosition(hhs[16], 935, 1160)
-
-	for i = 1, 16 do
-		AssignCharacter(i)
-	end
-
-end
-
-function onGameTick()
-
-	if (TurnTimeLeft == 1) and (missionWon == nil) then
-		GameOverMan()
-	end
-
-	if missionWon ~= nil then
-
-		endTimer = endTimer - 1
-		if endTimer == 1 then
-			GenericEnd()
-		end
-
-		if missionWon == true then
-			AddCaption(loc("Victory!"), 0xFFFFFFFF,capgrpGameState)
-		else
-			AddCaption(loc("Challenge over!"), 0xFFFFFFFF,capgrpGameState)
-		end
-
-	end
-
-end
-
-function onGearDamage(gear, damage)
-
-	if gear ~= hhs[0] and GetGearType(gear) == gtHedgehog then
-
-		AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
-		DeleteGear(gear)
-		PlaySound(sndExplosion)
-		AddCaption(string.format(knockTaunt(), GetHogName(gear)), 0xFFFFFFFF, capgrpMessage)
-
-		hogsKilled = hogsKilled +1
-		if hogsKilled == 15 then
-			PlaySound(sndRideOfTheValkyries)
-		elseif hogsKilled == 16 then
-			finishTime = TurnTimeLeft
-			GG()
-		end
-
-	end
-
-end
-
-function knockTaunt()
-	local r = math.random(0,23)
-	local taunt
-	if r == 0 then taunt =		loc("%s has been knocked out.")
-	elseif r == 1 then taunt =	loc("%s hit the ground.")
-	elseif r == 2 then taunt =	loc("%s splatted.")
-	elseif r == 3 then taunt =	loc("%s was smashed.")
-	elseif r == 4 then taunt =	loc("%s felt unstable.")
-	elseif r == 5 then taunt =	loc("%s exploded.")
-	elseif r == 6 then taunt =	loc("%s fell from a high cliff.")
-	elseif r == 7 then taunt =	loc("%s goes the way of the lemming.")
-	elseif r == 8 then taunt =	loc("%s was knocked away.")
-	elseif r == 9 then taunt =	loc("%s was really unlucky.")
-	elseif r == 10 then taunt =	loc("%s felt victim to rope-knocking.")
-	elseif r == 11 then taunt =	loc("%s had no chance.")
-	elseif r == 12 then taunt =	loc("%s was a good target.")
-	elseif r == 13 then taunt =	loc("%s spawned at a really bad position.")
-	elseif r == 14 then taunt =	loc("%s was doomed from the beginning.")
-	elseif r == 15 then taunt =	loc("%s has fallen victim to gravity.")
-	elseif r == 16 then taunt =	loc("%s hates Newton.")		-- Isaac Newton
-	elseif r == 17 then taunt =	loc("%s had it coming.")
-	elseif r == 18 then taunt =	loc("%s is eliminated!")
-	elseif r == 19 then taunt =	loc("%s fell too fast.")
-	elseif r == 20 then taunt =	loc("%s flew like a rock.")
-	elseif r == 21 then taunt =	loc("%s stumpled.")
-	elseif r == 22 then taunt =	loc("%s was shoved away.")
-	elseif r == 23 then taunt =	loc("%s didn't expect that.")
-	end
-	return taunt
-end
-
-function onGearDelete(gear)
-
-	if (gear == hhs[0]) and (missionWon == nil) then
-		GameOverMan()
-	end
-
-end
-
-function onAmmoStoreInit()
-	SetAmmo(amRope, 9, 0, 0, 0)
-end
-
-function onNewTurn()
- 	SetWeapon(amRope)
-end
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Spooky_Tree.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-
----------------------------------------------------------------
-
-local player = nil -- This variable will point to the hog's gear
-local instructor = nil
-local enemy = nil
-
-local GameOver = false
-local birdSpeech = false
-local birdSqualk = false
-
-local GirderCrate = nil
-
-function onGameInit()
-
-	-- Things we don't modify here will use their default values.
-	Seed = 0 -- The base number for the random number generator
-	GameFlags = gfInfAttack +gfDisableWind-- Game settings and rules
-	TurnTime = 90000 -- The time the player has to move each round (in ms)
-	CaseFreq = 0 -- The frequency of crate drops
-	MinesNum = 0 -- The number of mines being placed
-	MinesTime  = 1
-	Explosives = 0 -- The number of explosives being placed
-	Delay = 10 -- The delay between each round
-	Map = "Tree" -- The map to be played
-	Theme = "Halloween" -- The theme to be used
-	SuddenDeathTurns = 99999
-
-	AddTeam(loc("Bloody Rookies"), 14483456, "Simple", "Island", "Default")
-	player = AddHog(loc("Hunter"), 0, 1, "NoHat")
-			--852718
-	AddTeam(loc("Toxic Team"), 	1175851, "Simple", "Island", "Default")
-	enemy = AddHog(loc("Poison"), 1, 10, "Skull")
-
-	SetGearPosition(player,970,23)
-	SetGearPosition(enemy,498,806)
-
-end
-
-
-function onGameStart()
-
-	--right side mines
-	AddGear(1681,359,gtMine, 0, 0, 0, 0)
-	AddGear(1718,518,gtMine, 0, 0, 0, 0)
-	AddGear(1648,527,gtMine, 0, 0, 0, 0)
-	AddGear(1584,522,gtMine, 0, 0, 0, 0)
-
-	--tunnel mines
-	AddGear(301,569,gtSMine, 0, 0, 0, 0)
-	AddGear(372,608,gtSMine, 0, 0, 0, 0)
-	AddGear(453,628,gtSMine, 0, 0, 0, 0)
-	AddGear(524,611,gtSMine, 0, 0, 0, 0)
-	AddGear(613,611,gtSMine, 0, 0, 0, 0)
-
-	AddGear(308,486,gtSMine, 0, 0, 0, 0)
-	AddGear(372,478,gtSMine, 0, 0, 0, 0)
-	AddGear(453,466,gtSMine, 0, 0, 0, 0)
-	AddGear(524,471,gtSMine, 0, 0, 0, 0)
-	AddGear(613,466,gtSMine, 0, 0, 0, 0)
-
-	--above the tunnel mines
-	AddGear(331,433,gtMine, 0, 0, 0, 0)
-	AddGear(404,420,gtMine, 0, 0, 0, 0)
-	AddGear(484,424,gtMine, 0, 0, 0, 0)
-	AddGear(562,417,gtMine, 0, 0, 0, 0)
-	AddGear(640,412,gtMine, 0, 0, 0, 0)
-
-	-- crates crates and more crates
-	SpawnAmmoCrate(1208,576,amBlowTorch)
-	SpawnAmmoCrate(1467,376,amPickHammer)
-	SpawnUtilityCrate(373,165,amGirder)
-	SpawnUtilityCrate(704,623,amJetpack)
-	SpawnUtilityCrate(1646,749,amLaserSight)
-
-	SpawnAmmoCrate(745,418,amShotgun) --shotgun1
-	SpawnAmmoCrate(833,432,amFirePunch) --fire punch
-	GirderCrate = SpawnAmmoCrate(1789,514,amShotgun) -- final shotgun
-	SpawnAmmoCrate(1181,419,amBee)
-
-	ShowMission(loc("Spooky Tree"), "", loc("Eliminate all enemies") .. loc("|- Mines Time:") .. " " .. 0 .. " " .. loc("sec"), -amBee, 0)
-
-	SetWind(-75)
-
-end
-
-
-function onGameTick()
-
-
-	if CurrentHedgehog ~= nil then
-
-		if (birdSqualk == false) and (GetX(CurrentHedgehog) == 1102) and (GetY(CurrentHedgehog) == 133)  then
-			birdSqualk = true
-			PlaySound(sndBirdyLay)
-		end
-
-		if (birdSpeech == false) and (GetX(CurrentHedgehog) == 1068) and (GetY(CurrentHedgehog) == 162) then
-			birdSpeech = true
-			HogSay(player,loc("Good birdy......"),SAY_THINK)
-		end
-	end
-
-	if CurrentHedgehog ~= nil then
-		--AddCaption(GetX(CurrentHedgehog) .. ";" .. GetY(CurrentHedgehog))
-	end
-
-	if (TotalRounds == 2) and (GameOver == false) then -- just in case
-		SetHealth(player, 0)
-		GameOver = true
-	end
-
-	if TurnTimeLeft == 1 then
-		--ShowMission(loc(caption), loc(subcaption), loc(timeout), -amSkip, 0);
-		SetHealth(player, 0)
-		GameOver = true
-	end
-
-end
-
-
-function onAmmoStoreInit()
-	SetAmmo(amShotgun, 0, 0, 0, 1)
-	SetAmmo(amFirePunch, 0, 0, 0, 1)
-	SetAmmo(amBee, 0, 0, 0, 1)
-	SetAmmo(amBlowTorch, 0, 0, 0, 1)
-	SetAmmo(amGirder, 0, 0, 0, 1)
-	SetAmmo(amParachute, 1, 0, 0, 1)
-	SetAmmo(amPickHammer, 0, 0, 0, 1)
-	SetAmmo(amJetpack, 0, 0, 0, 1)
-	SetAmmo(amLaserSight, 0, 0, 0, 1)
-end
-
-function onGearDelete(gear)
-
-	if gear == GirderCrate then
-		TurnTimeLeft = TurnTimeLeft + 30000
-	end
-
-	if GetGearType(gear) == gtCase then
-		TurnTimeLeft = TurnTimeLeft + 5000
-	end
-
-	if (gear == enemy) and (GameOver == false) then
-		ShowMission(loc("Spooky Tree"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0);
-	elseif gear == player then
-		ShowMission(loc("Spooky Tree"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
-		GameOver = true
-	end
-
-end
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Teamwork.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-
-local player = nil -- This variable will point to the hog's gear
-local p2 = nil
-local enemy = nil
-local bCrate = nil
-
-local GameOver = false
-
-function onGameInit()
-
-	-- Things we don't modify here will use their default values.
-	Seed = 0 -- The base number for the random number generator
-	GameFlags = gfDisableWind-- Game settings and rules
-	TurnTime = 30000 -- The time the player has to move each round (in ms)
-	CaseFreq = 0 -- The frequency of crate drops
-	MinesNum = 0 -- The number of mines being placed
-	MinesTime  = 1
-	Explosives = 0 -- The number of explosives being placed
-	Delay = 10 -- The delay between each round
-	Map = "Mushrooms" -- The map to be played
-	Theme = "Nature" -- The theme to be used
-	SuddenDeathTurns = 99999
-
-	AddTeam(loc("Feeble Resistance"), 14483456, "Simple", "Island", "Default")
-	player = AddHog(string.format(loc("Pathetic Hog #%d"), 1), 0, 50, "NoHat")
-	p2 = AddHog(string.format(loc("Pathetic Hog #%d"), 2), 0, 20, "NoHat")
-
-	--AddTeam("Toxic Team", 	1175851, "Simple", "Island", "Robot","cm_binary")
-	AddTeam(loc("Cybernetic Empire"), 	1175851, "Simple", "Island", "Robot", "cm_binary")
-	enemy = AddHog(loc("Unit 3378"), 5, 30, "cyborg1")
-
-	SetGearPosition(player,1403,235)
-	SetGearPosition(p2,1269,239)
-	SetGearPosition(enemy,492,495)
-
-end
-
-
-function onGameStart()
-
-	--mines
-	AddGear(276,76,gtMine, 0, 0, 0, 0)
-	AddGear(301,76,gtMine, 0, 0, 0, 0)
-	AddGear(326,76,gtMine, 0, 0, 0, 0)
-	AddGear(351,76,gtMine, 0, 0, 0, 0)
-	AddGear(376,76,gtMine, 0, 0, 0, 0)
-	AddGear(401,76,gtMine, 0, 0, 0, 0)
-	AddGear(426,76,gtMine, 0, 0, 0, 0)
-	AddGear(451,76,gtMine, 0, 0, 0, 0)
-	AddGear(476,76,gtMine, 0, 0, 0, 0)
-
-	AddGear(886,356,gtMine, 0, 0, 0, 0)
-	AddGear(901,356,gtMine, 0, 0, 0, 0)
-	AddGear(926,356,gtMine, 0, 0, 0, 0)
-	AddGear(951,356,gtMine, 0, 0, 0, 0)
-	AddGear(976,356,gtMine, 0, 0, 0, 0)
-	AddGear(1001,356,gtMine, 0, 0, 0, 0)
-
-	-- crates crates and more crates
-	bCrate = SpawnAmmoCrate(1688,476,amBaseballBat)
-	SpawnUtilityCrate(572,143,amGirder)
-	SpawnAmmoCrate(1704,954,amPickHammer)
-	SpawnAmmoCrate(704,623,amBlowTorch)
-	SpawnUtilityCrate(1543,744,amJetpack)
-	SpawnAmmoCrate(227,442,amDrill)
-
-	ShowMission(loc("Codename: Teamwork"), "", loc("- Eliminate Unit 3378 |- Feeble Resistance must survive") .. loc("|- Mines Time:") .. " " .. 0 .. " " .. loc("sec"), 0, 0)
-
-end
-
-
---function onGameTick()
-
-	--if CurrentHedgehog ~= nil then
-	--	AddCaption(GetX(CurrentHedgehog) .. ";" .. GetY(CurrentHedgehog))
-	--end
-
---end
-
-
-function onAmmoStoreInit()
-	SetAmmo(amBlowTorch, 0, 0, 0, 1)
-	SetAmmo(amGirder, 0, 0, 0, 1)
-	SetAmmo(amPickHammer, 0, 0, 0, 2)
-	SetAmmo(amJetpack, 0, 0, 0, 1)
-	SetAmmo(amDrill, 0, 0, 0, 2)
-	SetAmmo(amBaseballBat, 0, 0, 0, 1)
-	SetAmmo(amSwitch, 9, 0, 0, 0)
-	SetAmmo(amSkip, 9, 0, 0, 0)
-end
-
-function onGearDamage(gear, damage)
-	if (gear == player) and (damage == 30) then
-		HogSay(player,loc("T_T"),SAY_SHOUT)
-	end
-end
-
-function onGearDelete(gear)
-
-	if gear == bCrate then
-		HogSay(CurrentHedgehog, loc("Hmmm..."), SAY_THINK)
-	end
-
-	if GetGearType(gear) == gtCase then
-		TurnTimeLeft = TurnTimeLeft + 5000
-	end
-
-	if (gear == enemy) and (GameOver == false) then
-		ShowMission(loc("Codename: Teamwork"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
-		GameOver = true
-	elseif  ( ((gear == player) or (gear == p2)) and (GameOver == false)) then
-		ShowMission(loc("Codename: Teamwork"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
-		GameOver = true
-		SetHealth(p2,0)
-		SetHealth(player,0)
-	end
-
-end
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_That_Sinking_Feeling.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,301 +0,0 @@
-
-
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-
-local player
-local hh = {}
-local hhCount = 8
-local GameOver = false
-local introStage = 0
-local genCounter = 0
-local waterCounter = 0
-local waterPix = 0
-local frig = 0
-local watGear = nil
-local cinematic = false
-
--- allow skipping of the intro via hitting precise key
-function onPrecise()
-	if introStage < 100 then
-		introStage = 110
-		genCounter = 0
-		FollowGear(CurrentHedgehog)
-		AddCaption(loc("Good luck out there!"))
-		ShowMission(loc("That Sinking Feeling"), loc("Challenge"), loc("Save as many hapless hogs as possible!"), 4, 0)
-		SetInputMask(0xFFFFFFFF)
-	end
-end
-
-function onGameInit()
-
-	Seed = 0
-	GameFlags = gfInfAttack + gfInvulnerable + gfOneClanMode
-	TurnTime = 90000
-	CaseFreq = 0
-	MinesNum = 0
-	MinesTime  = 3000
-	Explosives = 0
-	Delay = 10
-	Map = "Islands"
-	Theme = "City"
-	SuddenDeathTurns = 1
-
-	AddTeam(loc("Hapless Hogs"), 14483456, "Simple", "Island", "Default")
-	hh[0] = AddHog(loc("Sinky"), 1, 100, "fr_lemon")
-	hh[1] = AddHog(loc("Drowner"), 1, 100, "fr_orange")
-	hh[2] = AddHog(loc("Heavy"), 1, 100, "dish_Teapot")
-	hh[3] = AddHog(loc("Clumsy"), 1, 100, "dish_SauceBoatSilver")
-	hh[4] = AddHog(loc("Silly"), 1, 100, "dish_Ladle")
-	hh[5] = AddHog(loc("Careless"), 1, 100, "StrawHatEyes")
-	hh[6] = AddHog(loc("Sponge"), 1, 100, "sf_chunli")
-	hh[7] = AddHog(loc("Deadweight"), 1, 100, "dish_Teacup")
-
-	AddTeam(loc("Nameless Heroes"), 14483456, "Simple", "Island", "Default", "cm_crossedswords")
-	player = AddHog(loc("The Nameless One"), 0, 1, "NoHat")
-
-	SetGearPosition(player, 3992, 733)
-	SetGearPosition(hh[0], 938, 1369)
-	SetGearPosition(hh[1], 1301, 1439)
-	SetGearPosition(hh[2], 2093, 447)
-	SetGearPosition(hh[3], 2971, 926)
-	SetGearPosition(hh[4], 719, 545)
-	SetGearPosition(hh[5], 1630, 821)
-	SetGearPosition(hh[6], 2191, 810)
-	SetGearPosition(hh[7], 3799, 945)
-
-	-- Disable all input except [Precise] for the intro
-	SetInputMask(gmPrecise)
-end
-
-
-function onGameStart()
-    cinematic = true
-    SetCinematicMode(true)
-	SendHealthStatsOff()
-
-	ShowMission(loc("That Sinking Feeling"), loc("Challenge"), loc("Save as many hapless hogs as possible!"), 4, 1)
-
-	HogTurnLeft(hh[0], false)
-	HogTurnLeft(hh[1], true)
-
-	SpawnUtilityCrate(148,265,amLowGravity)
-	SpawnUtilityCrate(2124,1516,amJetpack)
-
-end
-
-
-function onNewTurn()
-	TurnTimeLeft = -1
-end
-
-function onGameTick()
-
-	-- intro sequence
-	if introStage < 100 then
-
-		frig = frig + 1
-		if frig == 50 then
-			frig = 0			
-			AddCaption(loc("Press [Precise] to skip intro"))
-			if watGear ~= nil then			
-				FollowGear(watGear)
-			end
-		end
-
-		
-		--AddCaption(loc("Press [Precise] to skip intro"))
-		genCounter = genCounter + 1
-
-		if introStage == 0 then
-
-						
-			--FollowGear(hh[0])
-
-			if genCounter == 2000 then
-				watGear = hh[0]
-				HogSay(hh[0], loc("This rain is really something..."), SAY_SAY,2)
-			elseif genCounter == 5000 then
-				introStage = 1
-				genCounter = 0
-			end
-
-		elseif introStage == 1 then
-						
-			--FollowGear(hh[1])
-
-			if genCounter == 2000 then
-				watGear = hh[1]
-				HogSay(hh[1], loc("Heh, it's not that bad."), SAY_SAY,2)
-			elseif genCounter == 5000 then
-				introStage = 2
-				genCounter = 0
-			end
-
-		elseif introStage == 2 then
-
-			--FollowGear(hh[0])
-
-			if genCounter == 2000 then
-				watGear = hh[0]
-				HogSay(hh[0], loc("You'd almost swear the water was rising!"), SAY_SHOUT,2)
-			elseif genCounter == 6000 then
-				introStage = 3
-				genCounter = 0
-			end
-
-		elseif introStage == 3 then
-
-			--FollowGear(hh[1])
-
-			if genCounter == 2000 then
-				watGear = hh[1]
-				HogSay(hh[1], loc("Haha, now THAT would be something!"), SAY_SAY,2)
-			elseif genCounter == 6000 then
-				introStage = 4
-				genCounter = 0
-			end
-
-		elseif introStage == 4 then
-
-			--FollowGear(hh[0])
-
-			if genCounter == 2000 then
-				watGear = hh[0]
-				HogSay(hh[0], loc("Hahahaha!"), SAY_SHOUT,2)
-				HogSay(hh[1], loc("Hahahaha!"), SAY_SHOUT,2)
-			elseif genCounter == 3000 then
-				introStage = 5
-				genCounter = 0
-			end
-
-		elseif introStage == 5 then
-
-			--FollowGear(hh[1])
-
-			if genCounter == 2000 then
-				watGear = hh[1]
-				HogSay(hh[0], loc("..."), SAY_THINK,2)
-				HogSay(hh[1], loc("..."), SAY_THINK,2)
-			elseif genCounter == 5000 then
-				introStage = 6
-				genCounter = 0
-			end
-
-		elseif introStage == 6 then
-
-			--FollowGear(hh[0])
-
-			if genCounter == 2000 then
-				watGear = hh[0]
-				HogSay(hh[0], loc("It's a good thing SUDDEN DEATH is 99 turns away..."), SAY_THINK,2)
-			elseif genCounter == 6000 then
-				introStage = 7
-				genCounter = 0
-			end
-
-
-		elseif introStage == 7 then
-
-			if genCounter == 2000 then
-				introStage = 110
-				FollowGear(CurrentHedgehog)
-				ShowMission(loc("That Sinking Feeling"), loc("User Challenge"), loc("Save as many hapless hogs as possible!"), 4, 0)
-				SetInputMask(0xFFFFFFFF)
-			end
-
-		end
-
-	end
-
-	-- start the water rising when the intro is finished
-	if introStage == 110 then
-
-        if cinematic then
-            SetCinematicMode(false)
-            cinematic = false
-        end
-
-		waterCounter = waterCounter + 1
-		if (waterCounter == 100) and (waterPix < 1615) then
-			waterCounter = 0
-			SetTag(AddGear(0, 0, gtWaterUp, 0, 0, 0, 0), 1)
-			waterPix = waterPix +1
-			--AddCaption(waterPix)
-
-			if (waterPix >= 1615) and (GameOver == false) then
-				GameOver = true
-				AddCaption(loc("The flood has stopped! Challenge over."))
-				SendStat(siGameResult, loc("Challenge completed!"))
-				SendStat(siPlayerKills, tostring(hhCount), loc("Nameless Heroes"))
-				SendStat(siPointType, loc("rescues"))
-
-				-- Do not count drowning hedgehogs
-				local hhLeft = hhCount
-				for i=1,#hh do
-					local isDrowning = band(GetState(hh[i]),gstDrowning) ~= 0
-					if isDrowning then
-						hhLeft = hhLeft - 1
-					end
-				end
-
-				SendStat(siCustomAchievement, string.format(loc("You saved %d of 8 Hapless Hogs."), hhLeft))
-
-				if hhLeft == 8 then
-					AddCaption(loc("Achievement obtained: Lively Lifeguard"),0xffba00ff,capgrpMessage2)
-					SendStat(siCustomAchievement, loc("You have obtained an achievement: Lively Lifeguard"))
-				end
-				EndGame()
-
-			end
-
-		end
-
-	end
-end
-
-
-function onAmmoStoreInit()
-
-	SetAmmo(amBazooka, 9, 0, 0, 0)
-
-	SetAmmo(amRope, 9, 0, 0, 0)
-	SetAmmo(amParachute, 9, 0, 0, 0)
-	SetAmmo(amJetpack, 2, 0, 0, 2)
-
-	SetAmmo(amGirder, 9, 0, 0, 0)
-	SetAmmo(amBaseballBat, 9, 0, 0, 0)
-
-	SetAmmo(amTeleport, 1, 0, 0, 1)
-	SetAmmo(amPortalGun, 3, 0, 0, 1)
-
-	SetAmmo(amLowGravity, 0, 0, 0, 1)
-
-end
-
-function onGearDelete(gear)
-
-	if GetGearType(gear) == gtHedgehog then
-		if GetHogTeamName(gear) == loc("Hapless Hogs") then
-			hhCount = hhCount - 1
-			AddCaption(string.format(loc("%d Hapless Hogs left"), hhCount))
-		end
-	end
-
-	if ((gear == player) or (hhCount == 0)) and (GameOver == false) then
-		SetHealth(player, 0)
-		AddCaption(loc("Disqualified!"))
-		if gear == player then
-			SendStat(siCustomAchievement, loc("Your hedgehog died!"))
-			SendStat(siCustomAchievement, loc("You must survive the flood in order to score."))
-		else
-			SendStat(siCustomAchievement, loc("You haven't rescued anyone."))
-		end
-		SendStat(siPlayerKills, "0", loc("Nameless Heroes"))
-		SendStat(siPointType, loc("points"))
-
-		SendStat(siGameResult, loc("Disqualified!"))
-		GameOver = true
-		EndGame()
-	end
-
-end
--- a/share/hedgewars/Data/Missions/Training/User_Mission_-_The_Great_Escape.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-
-local player = nil
-local enemy = nil
-
-function onGameInit()
-
-	Map = "Castle"
-	Theme = "Nature"
-	Seed = 0
-	GameFlags = gfInfAttack
-
-	TurnTime = 45 * 1000
-
-	CaseFreq = 0
-	MinesNum = 0
-	Explosives = 0
-
-	AddTeam(loc("Hero Team"), 14483456, "Simple", "Island", "Default", "Hedgewars")
-	player = AddHog(loc("Good Dude"), 0, 80, "NoHat") --NoHat
-
-	AddTeam(loc("Bad Team"), 	1175851, "Simple", "Island", "Default", "Hedgewars")
-	enemy = AddHog(loc("Bad Guy"), 1, 40, "NoHat")
-
-end
-
-function onGameStart()
-
-ShowMission(loc("The Great Escape"), loc("Get out of there!"), loc("Elimate your captor."), -amGrenade, 0)
-
------- GIRDER LIST ------
-PlaceGirder(1042,564,0)
-PlaceGirder(1028,474,6)
-PlaceGirder(1074,474,6)
-PlaceGirder(1050,385,0)
-PlaceGirder(1175,731,7)
-PlaceGirder(1452,905,2)
-PlaceGirder(1522,855,4)
-PlaceGirder(1496,900,3)
-PlaceGirder(1682,855,4)
-PlaceGirder(1773,887,2)
-PlaceGirder(1647,901,1)
-PlaceGirder(1871,883,6)
-PlaceGirder(1871,723,6)
-PlaceGirder(1774,768,6)
-PlaceGirder(1773,767,6)
-PlaceGirder(1821,904,1)
-PlaceGirder(1822,802,3)
-PlaceGirder(1820,723,1)
-PlaceGirder(1782,678,4)
-PlaceGirder(1822,661,0)
-PlaceGirder(1822,644,0)
-PlaceGirder(1742,644,0)
-PlaceGirder(1742,661,0)
-PlaceGirder(1694,676,2)
-PlaceGirder(1903,635,0)
------- HEALTH CRATE LIST ------
-SpawnHealthCrate(1476,169)
-SpawnHealthCrate(1551,177)
-SpawnHealthCrate(1586,200)
-SpawnHealthCrate(1439,189)
-SpawnHealthCrate(1401,211)
-SpawnHealthCrate(1633,210)
------- MINE LIST ------
-tempG = AddGear(1010,680,gtMine, 0, 0, 0, 0)
-SetTimer(tempG, 1)
-tempG = AddGear(1031,720,gtMine, 0, 0, 0, 0)
-SetTimer(tempG, 1)
-tempG = AddGear(1039,748,gtMine, 0, 0, 0, 0)
-SetTimer(tempG, 1)
-tempG = AddGear(1051,777,gtMine, 0, 0, 0, 0)
-SetTimer(tempG, 1)
-tempG = AddGear(1065,796,gtMine, 0, 0, 0, 0)
-SetTimer(tempG, 1)
-tempG = AddGear(1094,800,gtMine, 0, 0, 0, 0)
-SetTimer(tempG, 1)
------- REPOSITION LIST ------
-SetGearPosition(player,1050,534)
-SetGearPosition(enemy,1512,158)
-SetHealth(player, 1)
-SetHealth(enemy, 1)
------- AMMO CRATE LIST ------
-SpawnAmmoCrate(1632,943,5)
-SpawnAmmoCrate(1723,888,12)
-SpawnAmmoCrate(1915,599,1)
------- UTILITY CRATE LIST ------
-SpawnUtilityCrate(1519,945,15)
-SpawnUtilityCrate(1227,640,6)
-SpawnUtilityCrate(1416,913,18)
------- END LOADING DATA ------
-
-end
-
-function onGameTick()
-
-	if TurnTimeLeft == TurnTime-1 then
-		SetWind(100)
-	end
-
-end
-
-function onGearDelete(gear)
-	if (GetGearType(gear) == gtCase) and (CurrentHedgehog == player) then
-		if GetHealth(gear) > 0 then
-			AddGear(GetX(gear), GetY(gear), gtGrenade, 0, 0, 0, 1)
-		end
-	elseif gear == player then
-		ShowMission(loc("The Great Escape"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
-	elseif gear == enemy then
-		ShowMission(loc("The Great Escape"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
-	end
-end
-
-function onAmmoStoreInit()
-	SetAmmo(amGrenade, 1, 0, 0, 1)
-	SetAmmo(amParachute, 1, 0, 0, 1)
-	SetAmmo(amFirePunch, 0, 0, 0, 3)
-	SetAmmo(amPickHammer, 0, 0, 0, 1)
-	SetAmmo(amBlowTorch, 0, 0, 0, 1)
-	SetAmmo(amShotgun, 0, 0, 0, 1)
-	SetAmmo(amSkip, 9, 0, 0, 0)
-end
--- a/share/hedgewars/Data/Missions/Training/portal.lua	Sun Nov 20 04:21:24 2016 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,205 +0,0 @@
-HedgewarsScriptLoad("/Scripts/Locale.lua")
-HedgewarsScriptLoad("/Scripts/Utils.lua")
-
-local MineArray = {}
-local player
-local adviceGiven = false
-local adviceGiven2 = false
-
-function onGameInit()
-	Seed = 0 -- The base number for the random number generator
-	GameFlags = gfInfAttack +gfBorder +gfDisableWind +gfSolidLand
-	TurnTime = 1500000 -- The time the player has to move each round (in ms)
-	CaseFreq = 0 -- The frequency of crate drops
-	MinesNum = 0 -- The number of mines being placed
-	Explosives = 0 -- The number of explosives being placed
-	Delay = 10 -- The delay between each round
-	Map = "portal" -- The map to be played
-	Theme = "Hell" -- The theme to be used
-	-- Disable Sudden Death
-	HealthDecrease = 0
-	WaterRise = 0
-
-	AddTeam(loc("Subjects"), 0xFFFF01, "Simple", "Island", "Default", "cm_test")
-	player = AddHog(loc("Subject 1"), 0, 10, "Terminator_Glasses")
-
-	AddTeam(loc("Hell Army"), 0xFF0402, "skull", "Island", "Default", "cm_hellish")
-	enemy1 = AddHog(loc("Lucifer"), 1, 200, "InfernalHorns")
-	enemy2 = AddHog(loc("Voldemort"), 1, 150, "WizardHat")
-	enemy3 = AddHog(loc("Zombi"), 1, 100, "Zombi")
-	enemy4 = AddHog(loc("Predator"), 1, 14, "anzac")
-	enemy5 = AddHog(loc("Oneye"), 1, 50, "cyclops")
-	enemy6 = AddHog(loc("Razac"), 1, 50, "Evil")
-	enemy7 = AddHog(loc("C-2"), 1, 50, "cyborg1")
-	enemy8 = AddHog(loc("Rider"), 1, 50, "scif_SparkssHelmet")
-
-	AddTeam(loc("Badmad"), 0xFF0402, "skull", "Island", "Default", "cm_pentagram")
-	enemy9 = AddHog(loc("C-1"), 1, 50, "cyborg2")
-	enemy10 = AddHog(loc("Hidden"), 1, 40, "bushhider")
-	enemy11 = AddHog(loc("Ronald"), 1, 70, "clown")
-	enemy12 = AddHog(loc("Phosphat"), 1, 50, "chef")
-	enemy13 = AddHog(loc("Lestat"), 1, 30, "vampirichog")
-
-	SetGearPosition(player, 350, 1820)
-	SetGearPosition(enemy1, 2037, 1313)
-	SetGearPosition(enemy2, 1369, 1605)
-	SetGearPosition(enemy3, 1750, 1937)
-	SetGearPosition(enemy4, 3125, 89)
-	SetGearPosition(enemy5, 743, 900)
-	SetGearPosition(enemy6, 130, 360)
-	SetGearPosition(enemy7, 1333, 640)
-	SetGearPosition(enemy8, 1355, 200)
-	SetGearPosition(enemy9, 2680, 225)
-	SetGearPosition(enemy10, 2970, 800)
-	SetGearPosition(enemy11, 4050, 1964)
-	SetGearPosition(enemy12, 2666, 950)
-	SetGearPosition(enemy13, 3306, 1205)
-
-end
-
-function onAmmoStoreInit()
-
-	SetAmmo(amFirePunch, 0,0,0,1)
-	SetAmmo(amParachute, 0, 0, 0, 2)
-	SetAmmo(amGirder, 0, 0, 0, 3)
-	SetAmmo(amTeleport, 0, 0, 0, 1)
-	SetAmmo(amLaserSight,0,0,0,1)
-	SetAmmo(amHellishBomb,0,0,0,1)
-	SetAmmo(amGrenade,0,0,0,1)
-	SetAmmo(amRope,0,0,0,1)
-	SetAmmo(amDEagle,0,0,0,1)
-	SetAmmo(amExtraTime,0,0,0,2)
-	SetAmmo(amSkip,9,0,0,0)
-	SetAmmo(amBlowTorch, 0, 0, 0, 1)
-	SetAmmo(amPickHammer, 0, 0, 0, 1)
-	SetAmmo(amSnowball, 0, 0, 0, 1)
-
-end
-
-function onGameStart()
-
-	SetWind(100)
-
-	MineArray[0] = AddGear(840, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[1] = AddGear(900, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[2] = AddGear(1000, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[3] = AddGear(1100, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[4] = AddGear(1140, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[5] = AddGear(1170, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[6] = AddGear(1200, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[7] = AddGear(1200, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[8] = AddGear(1230, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[9] = AddGear(1280, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[10] = AddGear(1302, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[11] = AddGear(1350, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[12] = AddGear(1383, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[13] = AddGear(1400, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[14] = AddGear(1423, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[15] = AddGear(1470, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[16] = AddGear(1480, 1847, gtMine, 0, 0, 0, 0)
-	MineArray[17] = AddGear(1311, 1847, gtMine, 0, 0, 0, 0)
-
-	MineArray[18] = AddGear(840, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[19] = AddGear(900, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[20] = AddGear(1000, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[21] = AddGear(1100, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[22] = AddGear(1140, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[23] = AddGear(1170, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[24] = AddGear(1200, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[25] = AddGear(1230, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[26] = AddGear(1280, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[27] = AddGear(1302, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[28] = AddGear(1350, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[29] = AddGear(1383, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[30] = AddGear(1400, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[31] = AddGear(1423, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[32] = AddGear(1470, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[33] = AddGear(1480, 1785, gtMine, 0, 0, 0, 0)
-	MineArray[34] = AddGear(1311, 1785, gtMine, 0, 0, 0, 0)
-
-	MineArray[35] = AddGear(4029, 89, gtMine, 0, 0, 0, 120)
-
-	for i = 0,#MineArray do
-		SetTimer(MineArray[i],050)
-		SetState(MineArray[i],544)
-	end
-	--needed this MineArray cause timer didn't work, its was always 3sec, i wanna instant mines
-
-	--UTILITY CRATE--
-	parachute = SpawnUtilityCrate(1670, 1165, amParachute)
-	girder = SpawnUtilityCrate(2101, 1297, amGirder)
-	SpawnUtilityCrate(3965, 625, amBlowTorch)
-	SpawnUtilityCrate(2249, 93, amBlowTorch)
-	SpawnUtilityCrate(2181, 829, amBlowTorch)
-	SpawnUtilityCrate(1820, 567, amBlowTorch)
-	SpawnUtilityCrate(1375, 900, amTeleport)
-	SpawnUtilityCrate(130, 600, amPickHammer)
-	SpawnUtilityCrate(1660,1820, amLaserSight)
-	SpawnUtilityCrate(4070,1840, amLaserSight)
-
-
-	--AMMO CRATE--
-	portalgun = SpawnAmmoCrate(505, 1943, amPortalGun, 1000)
-	extratime = SpawnAmmoCrate(4020, 785, amExtraTime, 2)
-	SpawnAmmoCrate(425, 613, amSnowball)
-	SpawnAmmoCrate(861, 633, amHellishBomb)
-	SpawnAmmoCrate(2510, 623, amSnowball)
-	SpawnAmmoCrate(2900, 1600, amGrenade)
-	SpawnAmmoCrate(2680, 320, amGrenade)
-	SpawnAmmoCrate(2650, 80, amDEagle)
-	SpawnAmmoCrate(3000, 100, amDEagle)
-	SpawnAmmoCrate(2900, 1400, amRope)
-	SpawnAmmoCrate(4025, 1117, amFirePunch)
-
-	--HEALTH CRATE--
-	SpawnHealthCrate(2000, 780)
-
-	--GIRDER--
-	PlaceGirder(3363, 1323, 4)
-
-	ShowMission (loc("Portal Mind Challenge"), loc("Mission"),
-		loc("Defeat all enemies!") .. "|" .. loc("In this mission you have infinite time."),
-		-amPortalGun, 5000)
-	HogSay(player, loc("I should get myself a portal device, maybe this crate has one."), SAY_THINK)
-
-end
-
-function onGameTick()
-
-	if (player ~= nil)  then
-		if (gearIsInBox(player, 1650, 1907, 200, 60) and (adviceGiven == false)) then
-			adviceGiven = true
-			HogSay(player, loc("Hmmm, I’ll have to find some way of moving him off this anti-portal surface."), SAY_THINK)
-		elseif (gearIsInBox(player, 2960, 790, 200, 60) and (adviceGiven2 == false)) then
-			adviceGiven2 = true
-			HogSay(player, loc("The anti-portal surface is all over the floor, and I have nothing to kill him. Dropping something could hurt him enough to kill him."), SAY_THINK)
-		end
-	end
-
-end
-
-function onGearDelete(gear)
-	-- Check gear collection
-	if CurrentHedgehog == player and (band(GetGearMessage(gear), gmDestroy) ~= 0) then
-		if gear == portalgun then
-			HogSay(player, loc("Great! Let’s kill all these enemies, using portals."), SAY_THINK)
-		end
-
-		if gear == girder then
-			HogSay(player, loc("This will be useful when I need a new platform or if I want to rise."), SAY_THINK)
-		end
-
-		if gear == parachute then
-			HogSay(player, loc("You can’t open a portal on the blue surface."), SAY_THINK)
-		end
-
-		if gear == extratime then
-			HogSay(player, loc("What?! For all this struggle I just win some ... time? Oh dear!"), SAY_SHOUT)
-		end
-	end
-
-	if gear == player then
-		player = nil
-	end
-end
-