diff --git a/projects/mtg/bin/Res/campaigns/tutorial/duel1/deck.txt b/projects/mtg/bin/Res/campaigns/tutorial/duel1/deck.txt
new file mode 100644
index 000000000..077fd776a
--- /dev/null
+++ b/projects/mtg/bin/Res/campaigns/tutorial/duel1/deck.txt
@@ -0,0 +1,21 @@
+#NAME:Magnivore
+#DESC:Do not underestimate
+#DESC:this... thing... because
+#DESC:it happens to be blind.
+#DESC:For if you do, it will
+#DESC:be your last mistake!
+Hymn to Tourach (FEM) * 4 #
+Magnivore (ODY) * 4 #
+Stone Rain (CHK) * 4 #
+Mountain (RAV) * 4 #
+Swamp (RAV) * 4 #
+Swamp (TSP) * 4 #
+Mountain (TSP) * 4 #
+Damnation (PLC) * 4 #
+Demolish (10E) * 4 #
+Mountain (LRW) * 4 #
+Swamp (LRW) * 4 #
+Blightning (ALA) * 4 #
+Megrim (M10) * 4 #
+Sign in Blood (M10) * 4 #
+Pyroclasm (M10) * 4 #
diff --git a/projects/mtg/bin/Res/campaigns/tutorial/duel1/rules.txt b/projects/mtg/bin/Res/campaigns/tutorial/duel1/rules.txt
new file mode 100644
index 000000000..118fdad76
--- /dev/null
+++ b/projects/mtg/bin/Res/campaigns/tutorial/duel1/rules.txt
@@ -0,0 +1,9 @@
+[INIT]
+mode=mtg
+[PLAYERS]
+life:4
+auto=shuffle
+auto=draw:7
+auto=@each my draw:draw:1
+[PLAYER2]
+library:forest,forest,forest,mountain,mountain,plains,raging goblin,goblin king
\ No newline at end of file
diff --git a/projects/mtg/bin/Res/campaigns/tutorial/story.xml b/projects/mtg/bin/Res/campaigns/tutorial/story.xml
new file mode 100644
index 000000000..8cdef9738
--- /dev/null
+++ b/projects/mtg/bin/Res/campaigns/tutorial/story.xml
@@ -0,0 +1,31 @@
+
+
+
+dialog
+This is a test Story, what do you want to do?
+Go left
+Go right
+
+
+
+dialog
+You found the Grail
+click to continue
+
+
+
+dialog
+You found the Arch of Noah
+click to continue
+
+
+
+duel
+End
+1
+
+
+
+End
+The End
+
\ No newline at end of file
diff --git a/projects/mtg/include/GameApp.h b/projects/mtg/include/GameApp.h
index 8cf087206..745d5333d 100644
--- a/projects/mtg/include/GameApp.h
+++ b/projects/mtg/include/GameApp.h
@@ -40,6 +40,7 @@
#define GAME_TYPE_MOMIR 1
#define GAME_TYPE_RANDOM1 2
#define GAME_TYPE_RANDOM2 3
+#define GAME_TYPE_STORY 4
class MTGAllCards;
class TransitionBase;
diff --git a/projects/mtg/include/GameState.h b/projects/mtg/include/GameState.h
index aa9ef3a0a..7acd78934 100644
--- a/projects/mtg/include/GameState.h
+++ b/projects/mtg/include/GameState.h
@@ -18,8 +18,9 @@ enum ENUM_GAME_STATE
GAME_STATE_SHOP = 4,
GAME_STATE_OPTIONS = 5,
GAME_STATE_AWARDS = 6,
- GAME_STATE_TRANSITION = 7,
- GAME_STATE_MAX = 8,
+ GAME_STATE_STORY = 7,
+ GAME_STATE_TRANSITION = 8,
+ GAME_STATE_MAX = 9,
};
enum ENUM_GS_TRANSITION
diff --git a/projects/mtg/include/GameStateStory.h b/projects/mtg/include/GameStateStory.h
new file mode 100644
index 000000000..02453f222
--- /dev/null
+++ b/projects/mtg/include/GameStateStory.h
@@ -0,0 +1,29 @@
+#ifndef _GAME_STATE_STORY_H_
+#define _GAME_STATE_STORY_H_
+
+
+#include "../include/GameState.h"
+#include
+
+class StoryFlow;
+class SimpleMenu;
+
+class GameStateStory: public GameState, public JGuiListener {
+private:
+ StoryFlow * flow;
+ SimpleMenu * menu;
+ vector stories;
+ void loadStoriesMenu(const char * root);
+ public:
+ GameStateStory(GameApp* parent);
+ ~GameStateStory();
+ void Start();
+ void End();
+ void Update(float dt);
+ void Render();
+ void ButtonPressed(int controllerId, int controlId);
+
+};
+
+
+#endif
\ No newline at end of file
diff --git a/projects/mtg/include/Player.h b/projects/mtg/include/Player.h
index a4086025a..8b535a851 100644
--- a/projects/mtg/include/Player.h
+++ b/projects/mtg/include/Player.h
@@ -45,6 +45,7 @@ class Player: public Damageable{
class HumanPlayer: public Player{
public:
HumanPlayer(MTGPlayerCards * deck, string deckFile, string deckFileSmall);
+ HumanPlayer(string deckFile);
};
diff --git a/projects/mtg/include/StoryFlow.h b/projects/mtg/include/StoryFlow.h
new file mode 100644
index 000000000..2703375a1
--- /dev/null
+++ b/projects/mtg/include/StoryFlow.h
@@ -0,0 +1,86 @@
+#ifndef _STORYFLOW_H_
+#define _STORYFLOW_H_
+
+#include
+#include