xiongzhu 2 лет назад
Родитель
Сommit
ef93386e6f
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/game/game.service.ts

+ 3 - 3
src/game/game.service.ts

@@ -249,7 +249,7 @@ export class GameService implements OnModuleInit {
     formatCharactors(charactors: Charactor[]) {
     formatCharactors(charactors: Charactor[]) {
         return charactors
         return charactors
             .map((i) => {
             .map((i) => {
-                let s = `- ${i.name}: ${i.gender}, ${i.occupation}, ${i.personality}`
+                let s = `- ${i.name}: ${i.gender}, ${i.age}岁, ${i.occupation}, ${i.personality}`
                 if (i.dead) {
                 if (i.dead) {
                     s += ' (死亡)'
                     s += ' (死亡)'
                 } else if (i.hp === 0) {
                 } else if (i.hp === 0) {
@@ -425,7 +425,7 @@ export class GameService implements OnModuleInit {
                 })
                 })
                 this.send(`${id}`, {
                 this.send(`${id}`, {
                     type: 'newCharactor',
                     type: 'newCharactor',
-                    data: options
+                    data: newCharactor
                 })
                 })
             }
             }
         }
         }
@@ -439,7 +439,7 @@ export class GameService implements OnModuleInit {
                 ? `请加入${charactorsWillDead.map((i) => i.name).join('、')}死亡的剧情`
                 ? `请加入${charactorsWillDead.map((i) => i.name).join('、')}死亡的剧情`
                 : '',
                 : '',
             newCharactor: newCharactor
             newCharactor: newCharactor
-                ? `加入新的角色:姓名:${newCharactor.name};性别:${newCharactor.gender};年龄:${newCharactor.age};职业:${newCharactor.occupation};性格:${newCharactor.personality};背景:${newCharactor.background};HP:100`
+                ? `加入新的角色: ${newCharactor.name}, ${newCharactor.gender}, ${newCharactor.age}岁, ${newCharactor.occupation}, ${newCharactor.personality}`
                 : ''
                 : ''
         })
         })