aboutsummaryrefslogtreecommitdiff
path: root/src/esieequest/game/characters/Athanase.java
blob: 442273f246a360fd2401d20cdfa132b5d7d1eb75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package esieequest.game.characters;

import esieequest.game.Game;
import esieequest.game.items.Inventory;
import esieequest.game.items.Item;
import esieequest.game.states.Quest;
import esieequest.ui.View;

/**
 * Athanase the mathgorilla.
 * 
 * @author Pacien TRAN-GIRARD
 * @author Benoit LUBRANO DI SBARAGLIONE
 */
public class Athanase extends SimpleCharacter {

	/**
	 * Instantiates Athanase.
	 */
	public Athanase() {
		super("Athanase");
	}

	@Override
	public void talk(final Game game, final View view) {
		final Quest currentQuest = game.getPlayer().getCurrentQuest();
		final Inventory playersInventory = game.getPlayer().getInventory();
		switch (currentQuest) {

		case WHAT_HAPPENED:
			view.echo("Who are you? Where did Leila go? Somethin happened... But... Can't think... I'm hungry... So hungry...");
			game.getPlayer().setCurrentQuest(Quest.FEED_ATHANASE);
			view.updateQuest(Quest.FEED_ATHANASE);
			break;

		case FEED_ATHANASE:
			if (playersInventory.hasItem(Item.BANANA)) {
				playersInventory.removeItem(Item.BANANA);
				view.updateInventory(playersInventory);
				view.echo("Ooooh! You have a banana! *nomz* WAIT!... It tastes like... an EMERGENCY BANANA! That means... Hmmm..." 
						+ "\n"
						+ "They turned it ON... Their stupid machine... It was not ready. It was a beta... Obviously it crashed... WITH THE ENTIRE UNIVERSE"
						+ "\n" + "I think we have to restart everything...");
				game.getPlayer().setCurrentQuest(Quest.FIND_DISK);
				view.updateQuest(Quest.FIND_DISK);
			} else {
				view.echo("ME=HUNGRY => ¬(ME CAN HELP YOU)");
			}
			break;

		case FIND_DISK:
			if (playersInventory.hasItem(Item.DISK)) {
				view.echo("Fantastic! You have the bootloader disk! Now we need a remote console to connect to the Universe... They have a portable one at the Esieespace...");
				game.getPlayer().setCurrentQuest(Quest.FIND_CONSOLE);
				view.updateQuest(Quest.FIND_CONSOLE);
			} else {
				view.echo("Hopefully the Club*nix guys made an emergency boot disk, just in case... FIND IT and bring it!");
			}
			break;

		case FIND_CONSOLE:
			if (playersInventory.hasItem(Item.PORTABLE_CONSOLE)) {
				view.echo("Yaaaay! You found it! We have the software, we have the hardware... I think we are ready for the complete reboot.");
				game.getPlayer().setCurrentQuest(Quest.INSTALL_CONSOLE);
				view.updateQuest(Quest.INSTALL_CONSOLE);
			} else {
				view.echo("We need the Portable Remote Console to connect to the Universe... Find it at the Esieespace HQ.");
			}
			break;

		case INSTALL_CONSOLE:
			if (playersInventory.hasItem(Item.PORTABLE_CONSOLE)) {
				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.");
			} else {
				view.echo("You should go outside, at the Console instead of talking to me.");
			}
			break;
		case USE_DISK:
			if (playersInventory.hasItem(Item.DISK)) {
				view.echo("Well... You have installed the console, right? Have you turned it ON and inserted the disk? Because you should.");
			}
			break;
		}

	}
}