-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathAdventureData.java
75 lines (65 loc) · 2.97 KB
/
AdventureData.java
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
import java.util.*;
import java.util.AbstractMap.SimpleEntry;
public class AdventureData {
public static Character interactIntroSteve (String playerName) {
Character player = new Character(playerName);
Character introSteve = new Character("Steve Sminkle");
introSteve.setScript(
new DialogNode(
"You mind if I ask you a few question?",
null,
new ArrayList<>(
List.of(
new SimpleEntry<>(
"Why do you think it's me?",
new DialogNode(
"Your friend Xavier spotted you at the scene of the crime shortly after the incident " +
"took place! Next time you plan on vandalizing school property, give it some thought at least ",
null,
new ArrayList<>(
List.of(
new SimpleEntry<>(
"Who's Xavier?",
new DialogNode(
"Very funny. The Disciplinary Board is meeting inside the student center as " +
"we speak deciding your fate. You better hope the school doesn't press charges for what you wrote on that statue!"
)
)
)
)
)
),
new SimpleEntry<>(
"I'm innocent I swear!!",
new DialogNode(
"Look, kid, if you really didn't do this, you're going to" +
"have to find me some kind of evidence. Right now, all teh cards are stacked against you. I've got" +
"a witness, Xavier saying they saw you at the scene of the crime at the time in question. Give me" +
"something better than that and, I'll hear it out."
)
),
new SimpleEntry<>(
"Awwww, you got me.",
new DialogNode("You shrug and Steve begins to turn red. He huffily gets" +
"his handcuffs out and arrests you on felony vandalism",
false
) // first bad end
)
)
)
)
);
if (!introSteve.interact(player)) {
return null;
}
return player;
}
public static boolean loadGameDataAndMC (Character player) {
boolean success = LocationData.loadLocationData();
success &= CharacterData.loadCharacterData();
success &= ItemData.loadItemData();
// Set player location
player.setCurrentLocation(LocationData.insideLangdale);
return success;
}
}