aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/resources/audio/END.oggbin1155224 -> 1068663 bytes
-rw-r--r--res/resources/audio/FEED_ATHANASE.oggbin513150 -> 491799 bytes
-rw-r--r--res/resources/audio/FIND_CONSOLE.oggbin1627908 -> 1627143 bytes
-rw-r--r--res/resources/audio/FIND_DISK.oggbin969007 -> 955817 bytes
-rw-r--r--res/resources/audio/GAME_LOST.oggbin1849460 -> 2273267 bytes
-rw-r--r--res/resources/audio/INSTALL_CONSOLE.oggbin1719262 -> 1726139 bytes
-rw-r--r--res/resources/audio/INTRO.oggbin923189 -> 855819 bytes
-rw-r--r--res/resources/audio/USE_DISK.oggbin0 -> 54291 bytes
-rw-r--r--res/resources/audio/WHAT_HAPPENED.oggbin2019139 -> 1907920 bytes
-rw-r--r--src/esieequest/engine/GameEngine.java2
-rw-r--r--src/esieequest/engine/commands/Command.java1
-rw-r--r--src/esieequest/engine/commands/KillCommand.java28
-rw-r--r--src/esieequest/game/Text.java1
-rw-r--r--src/esieequest/game/characters/Athanase.java10
-rw-r--r--src/esieequest/game/items/Banana.java9
-rw-r--r--src/esieequest/game/items/PortableConsole.java8
-rw-r--r--src/esieequest/game/states/Quest.java1
17 files changed, 52 insertions, 8 deletions
diff --git a/res/resources/audio/END.ogg b/res/resources/audio/END.ogg
index db2b370..da9b823 100644
--- a/res/resources/audio/END.ogg
+++ b/res/resources/audio/END.ogg
Binary files differ
diff --git a/res/resources/audio/FEED_ATHANASE.ogg b/res/resources/audio/FEED_ATHANASE.ogg
index 94e8668..e771484 100644
--- a/res/resources/audio/FEED_ATHANASE.ogg
+++ b/res/resources/audio/FEED_ATHANASE.ogg
Binary files differ
diff --git a/res/resources/audio/FIND_CONSOLE.ogg b/res/resources/audio/FIND_CONSOLE.ogg
index 39aee7e..df7b169 100644
--- a/res/resources/audio/FIND_CONSOLE.ogg
+++ b/res/resources/audio/FIND_CONSOLE.ogg
Binary files differ
diff --git a/res/resources/audio/FIND_DISK.ogg b/res/resources/audio/FIND_DISK.ogg
index b852de2..73e13f1 100644
--- a/res/resources/audio/FIND_DISK.ogg
+++ b/res/resources/audio/FIND_DISK.ogg
Binary files differ
diff --git a/res/resources/audio/GAME_LOST.ogg b/res/resources/audio/GAME_LOST.ogg
index 71dffae..e7ea01d 100644
--- a/res/resources/audio/GAME_LOST.ogg
+++ b/res/resources/audio/GAME_LOST.ogg
Binary files differ
diff --git a/res/resources/audio/INSTALL_CONSOLE.ogg b/res/resources/audio/INSTALL_CONSOLE.ogg
index fe7a296..4e9bdab 100644
--- a/res/resources/audio/INSTALL_CONSOLE.ogg
+++ b/res/resources/audio/INSTALL_CONSOLE.ogg
Binary files differ
diff --git a/res/resources/audio/INTRO.ogg b/res/resources/audio/INTRO.ogg
index da90187..6281bdd 100644
--- a/res/resources/audio/INTRO.ogg
+++ b/res/resources/audio/INTRO.ogg
Binary files differ
diff --git a/res/resources/audio/USE_DISK.ogg b/res/resources/audio/USE_DISK.ogg
new file mode 100644
index 0000000..93ca1b5
--- /dev/null
+++ b/res/resources/audio/USE_DISK.ogg
Binary files differ
diff --git a/res/resources/audio/WHAT_HAPPENED.ogg b/res/resources/audio/WHAT_HAPPENED.ogg
index 0aac689..e149474 100644
--- a/res/resources/audio/WHAT_HAPPENED.ogg
+++ b/res/resources/audio/WHAT_HAPPENED.ogg
Binary files differ
diff --git a/src/esieequest/engine/GameEngine.java b/src/esieequest/engine/GameEngine.java
index 9211eb0..ebd37b4 100644
--- a/src/esieequest/engine/GameEngine.java
+++ b/src/esieequest/engine/GameEngine.java
@@ -111,7 +111,7 @@ public class GameEngine {
111 return; 111 return;
112 } 112 }
113 }); 113 });
114 this.view.echo("You are trapped. You losed."); 114 this.view.echo("You are trapped. Game Over.");
115 } 115 }
116 116
117 } 117 }
diff --git a/src/esieequest/engine/commands/Command.java b/src/esieequest/engine/commands/Command.java
index 5c44e9b..e73856a 100644
--- a/src/esieequest/engine/commands/Command.java
+++ b/src/esieequest/engine/commands/Command.java
@@ -43,6 +43,7 @@ public enum Command {
43 43
44 // shortcuts 44 // shortcuts
45 DO(new DoCommand()), 45 DO(new DoCommand()),
46 KILL(new KillCommand()),
46 47
47 ; 48 ;
48 49
diff --git a/src/esieequest/engine/commands/KillCommand.java b/src/esieequest/engine/commands/KillCommand.java
new file mode 100644
index 0000000..9f5dc49
--- /dev/null
+++ b/src/esieequest/engine/commands/KillCommand.java
@@ -0,0 +1,28 @@
1package esieequest.engine.commands;
2
3import esieequest.game.Game;
4import esieequest.game.Text;
5import esieequest.ui.View;
6
7/**
8 * Allows the user to commit suicide.
9 *
10 * @author Benoit LUBRANO DI SBARAGLIONE
11 */
12public class KillCommand implements Executable {
13
14 @Override
15 public void execute(final String argument, final Game game, final View view) {
16
17 if (!argument.isEmpty()) {
18 view.echo(Text.TOO_MANY_ARGUMENTS.toString());
19 return;
20 }
21
22 view.echo(Text.KILL.toString());
23 view.disableInput();
24 view.stopMusic();
25
26 }
27
28}
diff --git a/src/esieequest/game/Text.java b/src/esieequest/game/Text.java
index 7f74e58..09317c1 100644
--- a/src/esieequest/game/Text.java
+++ b/src/esieequest/game/Text.java
@@ -55,6 +55,7 @@ public enum Text {
55 WELCOME("Welcome to ESIEEquest! ESIEEquest is a new, amazingly boring adventure game."), 55 WELCOME("Welcome to ESIEEquest! ESIEEquest is a new, amazingly boring adventure game."),
56 CHALLENGE_FAILED("Challenge failed: you died from exhaustion..."), 56 CHALLENGE_FAILED("Challenge failed: you died from exhaustion..."),
57 QUIT("Thanks for wasting your time. Good bye."), 57 QUIT("Thanks for wasting your time. Good bye."),
58 KILL("You killed yourself! Game Over."),
58 59
59 ALEA_OVERRIDE_ENABLED("Alea override enabled."), 60 ALEA_OVERRIDE_ENABLED("Alea override enabled."),
60 ALEA_OVERRIDE_DISABLED("Alea override disabled."), 61 ALEA_OVERRIDE_DISABLED("Alea override disabled."),
diff --git a/src/esieequest/game/characters/Athanase.java b/src/esieequest/game/characters/Athanase.java
index 51fa3c0..442273f 100644
--- a/src/esieequest/game/characters/Athanase.java
+++ b/src/esieequest/game/characters/Athanase.java
@@ -10,6 +10,7 @@ import esieequest.ui.View;
10 * Athanase the mathgorilla. 10 * Athanase the mathgorilla.
11 * 11 *
12 * @author Pacien TRAN-GIRARD 12 * @author Pacien TRAN-GIRARD
13 * @author Benoit LUBRANO DI SBARAGLIONE
13 */ 14 */
14public class Athanase extends SimpleCharacter { 15public class Athanase extends SimpleCharacter {
15 16
@@ -36,7 +37,7 @@ public class Athanase extends SimpleCharacter {
36 if (playersInventory.hasItem(Item.BANANA)) { 37 if (playersInventory.hasItem(Item.BANANA)) {
37 playersInventory.removeItem(Item.BANANA); 38 playersInventory.removeItem(Item.BANANA);
38 view.updateInventory(playersInventory); 39 view.updateInventory(playersInventory);
39 view.echo("Ooooh! You have a banana! *nomz* WAIT!... It tastes like... an EMERGENCY BANANA! That means... Hmmm..." 40 view.echo("Ooooh! You have a banana! *nomz* WAIT!... It tastes like... an EMERGENCY BANANA! That means... Hmmm..."
40 + "\n" 41 + "\n"
41 + "They turned it ON... Their stupid machine... It was not ready. It was a beta... Obviously it crashed... WITH THE ENTIRE UNIVERSE" 42 + "They turned it ON... Their stupid machine... It was not ready. It was a beta... Obviously it crashed... WITH THE ENTIRE UNIVERSE"
42 + "\n" + "I think we have to restart everything..."); 43 + "\n" + "I think we have to restart everything...");
@@ -71,12 +72,15 @@ public class Athanase extends SimpleCharacter {
71 if (playersInventory.hasItem(Item.PORTABLE_CONSOLE)) { 72 if (playersInventory.hasItem(Item.PORTABLE_CONSOLE)) {
72 view.echo("The Universe is far away... Well... Not exactly... Sort of... Complicated. Find an antenna on the outside or something that may act as an amplifier and connect the Portable Console to contact the Universe."); 73 view.echo("The Universe is far away... Well... Not exactly... Sort of... Complicated. Find an antenna on the outside or something that may act as an amplifier and connect the Portable Console to contact the Universe.");
73 } else { 74 } else {
75 view.echo("You should go outside, at the Console instead of talking to me.");
76 }
77 break;
78 case USE_DISK:
79 if (playersInventory.hasItem(Item.DISK)) {
74 view.echo("Well... You have installed the console, right? Have you turned it ON and inserted the disk? Because you should."); 80 view.echo("Well... You have installed the console, right? Have you turned it ON and inserted the disk? Because you should.");
75 } 81 }
76 break; 82 break;
77
78 } 83 }
79 84
80 } 85 }
81
82} 86}
diff --git a/src/esieequest/game/items/Banana.java b/src/esieequest/game/items/Banana.java
index 81f0b45..0c7e7ba 100644
--- a/src/esieequest/game/items/Banana.java
+++ b/src/esieequest/game/items/Banana.java
@@ -1,12 +1,14 @@
1package esieequest.game.items; 1package esieequest.game.items;
2 2
3import esieequest.game.Game; 3import esieequest.game.Game;
4import esieequest.game.states.Quest;
4import esieequest.ui.View; 5import esieequest.ui.View;
5 6
6/** 7/**
7 * A Banana that can be eaten only by Athanase. 8 * A Banana that can be eaten only by Athanase.
8 * 9 *
9 * @author Pacien TRAN-GIRARD 10 * @author Pacien TRAN-GIRARD
11 * @author Benoit LUBRANO DI SBARAGLIONE
10 */ 12 */
11public class Banana extends SimpleItem { 13public class Banana extends SimpleItem {
12 14
@@ -19,7 +21,10 @@ public class Banana extends SimpleItem {
19 21
20 @Override 22 @Override
21 public void use(final Game game, final View view) { 23 public void use(final Game game, final View view) {
22 view.echo("Better keep it for later..."); 24 if (game.getPlayer().getCurrentQuest() == Quest.FEED_ATHANASE) {
25 view.echo("Athanase would eat this!");
26 } else {
27 view.echo("Better keep it for later...");
28 }
23 } 29 }
24
25} 30}
diff --git a/src/esieequest/game/items/PortableConsole.java b/src/esieequest/game/items/PortableConsole.java
index 9c14219..cf63da1 100644
--- a/src/esieequest/game/items/PortableConsole.java
+++ b/src/esieequest/game/items/PortableConsole.java
@@ -3,12 +3,14 @@ package esieequest.game.items;
3import esieequest.game.Game; 3import esieequest.game.Game;
4import esieequest.game.map.Direction; 4import esieequest.game.map.Direction;
5import esieequest.game.map.Room; 5import esieequest.game.map.Room;
6import esieequest.game.states.Quest;
6import esieequest.ui.View; 7import esieequest.ui.View;
7 8
8/** 9/**
9 * The transponder. 10 * The transponder.
10 * 11 *
11 * @author Pacien TRAN-GIRARD 12 * @author Pacien TRAN-GIRARD
13 * @author Benoit LUBRANO DI SBARAGLIONE
12 */ 14 */
13public class PortableConsole extends SimpleItem { 15public class PortableConsole extends SimpleItem {
14 16
@@ -23,11 +25,13 @@ public class PortableConsole extends SimpleItem {
23 public void use(final Game game, final View view) { 25 public void use(final Game game, final View view) {
24 final boolean onRoundabout = game.getPlayer().getCurrentRoom().equals( 26 final boolean onRoundabout = game.getPlayer().getCurrentRoom().equals(