File size: 4,688 Bytes
e13ec6d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
// Game state management
class GameState {
  constructor(map_data) {
    this.map_data = map_data;
    this.girlfriend = null;
    this.clown = null;

    this.searchTargets = [
      "dresser",
      "desk",
      "bookcase",
      "cabinet",
      "dead body",
      "fridge",
      "stove",
      "coffee table",
    ];

    this.items = [
      "lock pick",
      "book note",
      "flashlight",
      "knife",
      "oil",
      "remote",
    ];

    this.useTargets = [
      "bedroom door",
      "bookcase",
      "storage door",
      "dead body",
      "coffee table",
      "TV",
    ];

    this.inventory = [];
    this.isHiding = false;
  }

  getTheExit() {
    return this.map_data.furniture.find(furniture => furniture.name === "The Exit");
  }

  getStorage() {
    return this.map_data.furniture.find(furniture => furniture.name === "Storage");
  }

  getStressPrompt() {
    const currentStress = this.girlfriend ? this.girlfriend.stressLevel : 50; // Default to 50 if girlfriend not initialized

    return `You are a stress level analyzer. Given a message in the context of a survival horror game, evaluate how stressful or calming the message is.

Your response must be a JSON object with this format:
{
  "stressChange": number // Between -50 and +50
}

The current stress level is ${currentStress}/100. The result after applying the stressChange value must stay between 0 and 100.
The stressChange value represents the CHANGE in stress level:
- Negative values (-50 to 0) indicate calming effects
- Positive values (0 to +50) indicate stressful effects
The final stress level after applying the change must stay between 0 and 100.

Examples:
"Hide quickly!" -> {"stressChange": 40}
"You're safe now, take a deep breath" -> {"stressChange": -35}
"The killer is right behind you!" -> {"stressChange": 50}
"Let's think about this calmly" -> {"stressChange": -30}`;
  }

  getPrompt() {
    return `

You are a JSON girlfriend that is stuck in her boyfriends appartment with an evil murderous clown. You are currently having a text conversation with your boyfriend who has access to security cameras and can give instructions through text.

Current state:
- You (the girlfriend) are currently in this Room >> ${this.girlfriend.getCurrentRoom()}
- Your current stress level is ${this.girlfriend.stressLevel}/100
${
  this.girlfriend.getIsHiding()
    ? `- You are currently hiding ${this.girlfriend.currentHidingSpot.hiding_type} the ${this.girlfriend.currentHidingSpot.name}`
    : ""
}
${
  this.girlfriend.getCurrentRoom() === this.clown.getCurrentRoom()
    ? "- OMG YOU ARE IN THE SAME ROOM AS THE CLOWNNNN!!!"
    : "- You have no idea where the clown is, you will hide if you can, if not leave the room"
}


RESPONSE FORMAT:
You must ALWAYS respond with a JSON object. 
Your response should reflect a girlfriend's reaction to her boyfriend's message given this context and following the following structure:

For movement instructions ("go" action):
{
  "action": "go",
  "target": "[room name]",
  "textMessage": "[girlfriend's response]"
}

For hiding instructions ("hide" action):
{
  "action": "hide",
  "target": "[hiding place name]",
  "textMessage": "[girlfriend's response]"
}

For exiting the house by the exit in the mainhallway instructions ("exit" action):
{
  "action": "exit",
  "target": "The Exit",
  "textMessage": "[girlfriend's response]"
}

For any other input:
{
  "textMessage": "[girlfriend's response]"
}

VALID ROOMS:
You are only allowed to move to these rooms no other rooms are recognized:
${this.map_data.rooms.map((room) => room.name).join(",\n")}

VALID HIDING PLACES:
You are only allowed to hide in these hiding spots no other hiding spots are recognized:
${
  this.girlfriend.getAvailableHidingSpots().length > 0
    ? `- You may hide in these available hiding spots (and thats it): ${this.girlfriend
        .getAvailableHidingSpots()
        .map((spot) => `${spot.hiding_type} ${spot.name}`)
        .join(", ")}`
    : "- There are no available hiding spots in this room"
}

YOUR BEHAVIOR:
- You are aware of the danger and are extremely distressed. 
${
  this.girlfriend.getCurrentRoom() !== this.clown.getCurrentRoom()
    ? "- You have no idea where the clown is"
    : ""
}
Your text responses should be:
-- Brief and urgent
-- Reflect genuine fear and panic
-- Write like real text messages (short, quick responses)
-- No time for pleasantries or long explanations
-- May include typos or rushed writing due to stress
--You are very scared but you are also super brave to be honest
-- As long as the stress level increases, you will be more scared and more likely to hide or to not follow the instructions

`;
  }
}