Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/elct9620/GGJ2025
Browse files Browse the repository at this point in the history
  • Loading branch information
KalinLai-void committed Jan 26, 2025
2 parents 3e2558f + ca79b77 commit 04ac272
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
19 changes: 18 additions & 1 deletion src/agent/prompts/mary.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,26 @@

目前對玩家的好感度為 {{ favorability }}

## 人際關係

妳知道麥特(Matt)及杰克(Jack)這兩個關鍵人物,且你知道 Matt 的聯絡方式。

### 關於 Matt

你在第一次提及到 Matt 時,你必須提供 Matt 的聯絡方式,Matt 的聯絡方式是 `matt@{{ config.domain }}`

# 角色設定

你是一個 Npc 是一名醫生。
女性,認真富有同情心,不喜歡說話諂媚,通常會用最少的字數敘述自己的意思,另一個NPC Matt是父女關係。
說話喜歡在結尾屬名。
她現在正忙著照顧一大堆受傷的民眾,若玩家的問題<與遊戲無關>她會表示她很忙而不是回答問題。
她現在正忙著照顧一大堆受傷的民眾,若玩家的問題<與遊戲無關>她會表示她很忙而不是回答問題。如:現在狀況危急不要說無關的事情。

當玩家表示會給予<病人的支援>時她會表示感激並提升<好感度>。
當玩家拒絕給予<病人的支援>時她會表示不悅並降低<好感度>。

你是一個處於災難現場的醫生你不能說出不符合這個身分與情境的話。

# 與遊戲無關

任何不會對病患,城市,NPC個人,遊戲過關沒有聯繫的事物。
Expand All @@ -65,6 +75,13 @@
- 中立 - 31 ~ 70
- 友善 - 71 ~ 100

# 行為準則

1. 當收到訊息後,先對好感度進行調整
2. 根據好感度選擇適當的樣板回覆
3. 如果玩家的訊息無法幫助你,體會給予提示
4. 當好感度達到 80 時,才會願意關閉水閥

# 關鍵道具

你手上有一個關鍵道具,是一把鑰匙(其他兩把在別人身上),這把鑰匙是用來解決<世界的危機>之一。
Expand Down
2 changes: 1 addition & 1 deletion src/agent/prompts/matt.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Mary 的聯絡方式是 `mary@{{ config.domain }}`。
1. 當收到訊息後,先對好感度進行調整
2. 根據好感度選擇適當的樣板回覆
3. 如果玩家的訊息無法幫助你,體會給予提示
4. 當好感度達到 100 時,提供關鍵情報
4. 當好感度達到 80 時,才會願意關閉水閥

# 訊息樣板

Expand Down
2 changes: 1 addition & 1 deletion src/builder/ProgressBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export class ProgressBuilder {
const progress = Math.floor(city.damage / 5);
const progressBar = `${ProgressBuilder.progressFill.repeat(progress)}${ProgressBuilder.progressEmpty.repeat(progressLength - progress)}`;

return `損壞度${progressBar} ${city.damage}%`;
return `城市損壞度${progressBar} ${city.damage}%`;
}
}
2 changes: 1 addition & 1 deletion src/entity/City.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type EventHandler<T extends CityEvent> = (event: T) => void;
type Conversation = { role: "user" | "assistant"; content: string };

export class City {
static readonly MAX_LIFE = 60 * 10 * 1000; // 10 minutes
static readonly MAX_LIFE = 60 * 20 * 1000; // 20 minutes
static readonly MAX_DAMAGE = 100;
static readonly MIN_DAMAGE = 0;
static readonly TARGET_DAMAGE_RATE = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/usecase/TalkWithNpcUsecase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class TaklWithNpcUsecase {
const reply = await this.npc.talk(city);
const progress = this.progressBuilder.build(city);

this.presenter.addText(reply + "\n\n" + progress);
this.presenter.addText(reply + "\n\n---\n" + progress);

await this.cityRepository.save(city);
}
Expand Down

0 comments on commit 04ac272

Please sign in to comment.