aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoît LUBRANO DI SBARAGLIONE2014-06-05 18:42:25 +0200
committerBenoît LUBRANO DI SBARAGLIONE2014-06-05 18:42:25 +0200
commitabd34ab61aa8be29730739eabaa21838ac90fe85 (patch)
tree1ea9070cde292998362e395bcbf449981beacd61 /src
parent728e80ade4d37659fb09ab4ea7db826a58311398 (diff)
downloadesieequest-abd34ab61aa8be29730739eabaa21838ac90fe85.tar.gz
Add instructions before end game
Diffstat (limited to 'src')
-rw-r--r--src/esieequest/engine/commands/KillCommand.java5
-rw-r--r--src/esieequest/game/characters/Athanase.java10
-rw-r--r--src/esieequest/game/items/Banana.java1
-rw-r--r--src/esieequest/game/items/PortableConsole.java8
-rw-r--r--src/esieequest/game/states/Quest.java1
5 files changed, 20 insertions, 5 deletions
diff --git a/src/esieequest/engine/commands/KillCommand.java b/src/esieequest/engine/commands/KillCommand.java
index bcc0021..9f5dc49 100644
--- a/src/esieequest/engine/commands/KillCommand.java
+++ b/src/esieequest/engine/commands/KillCommand.java
@@ -4,6 +4,11 @@ import esieequest.game.Game;
4import esieequest.game.Text; 4import esieequest.game.Text;
5import esieequest.ui.View; 5import esieequest.ui.View;
6 6
7/**
8 * Allows the user to commit suicide.
9 *
10 * @author Benoit LUBRANO DI SBARAGLIONE
11 */
7public class KillCommand implements Executable { 12public class KillCommand implements Executable {
8 13
9 @Override 14 @Override
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..4350463 100644
--- a/src/esieequest/game/items/Banana.java
+++ b/src/esieequest/game/items/Banana.java
@@ -7,6 +7,7 @@ import esieequest.ui.View;
7 * A Banana that can be eaten only by Athanase. 7 * A Banana that can be eaten only by Athanase.
8 * 8 *
9 * @author Pacien TRAN-GIRARD 9 * @author Pacien TRAN-GIRARD
10 * @author Benoit LUBRANO DI SBARAGLIONE
10 */ 11 */
11public class Banana extends SimpleItem { 12public class Banana extends SimpleItem {
12 13
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(
25 Room.ENTRANCE_ROUNDABOUT); 27 Room.ENTRANCE_ROUNDABOUT);
26 final boolean pointingSouth = game.getPlayer().getCurrentDirection().equals(Direction.EAST); 28 final boolean pointingEast = game.getPlayer().getCurrentDirection().equals(Direction.EAST);
27 29
28 if (onRoundabout && pointingSouth) { 30 if (onRoundabout && pointingEast) {
29 game.getPlayer().getInventory().removeItem(Item.PORTABLE_CONSOLE); 31 game.getPlayer().getInventory().removeItem(Item.PORTABLE_CONSOLE);
30 game.getPlayer().getCurrentSide().getInventory().putItem(Item.PORTABLE_CONSOLE); 32 game.getPlayer().getCurrentSide().getInventory().putItem(Item.PORTABLE_CONSOLE);
33 game.getPlayer().setCurrentQuest(Quest.USE_DISK);
34 view.updateQuest(Quest.USE_DISK);
31 35
32 view.updateInventory(game.getPlayer().getInventory()); 36 view.updateInventory(game.getPlayer().getInventory());
33 view.updateLocation(game.getPlayer().getCurrentRoom(), game.getPlayer() 37 view.updateLocation(game.getPlayer().getCurrentRoom(), game.getPlayer()
diff --git a/src/esieequest/game/states/Quest.java b/src/esieequest/game/states/Quest.java
index 2a7c591..a09ea09 100644
--- a/src/esieequest/game/states/Quest.java
+++ b/src/esieequest/game/states/Quest.java
@@ -18,6 +18,7 @@ public enum Quest {
18 FIND_DISK("Find the Disk at Club*Nix"), 18 FIND_DISK("Find the Disk at Club*Nix"),
19 FIND_CONSOLE("Find the Portable Remote Console at ESIEEspace"), 19 FIND_CONSOLE("Find the Portable Remote Console at ESIEEspace"),
20 INSTALL_CONSOLE("Find a place to install the Console"), 20 INSTALL_CONSOLE("Find a place to install the Console"),
21 USE_DISK("Insert the disk into the Console"),
21 22
22 ; 23 ;
23 24