koishi-plugin-smmcat-gensokyo 0.0.26 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/battle.d.ts CHANGED
@@ -24,6 +24,8 @@ type TeamData = {
24
24
  };
25
25
  };
26
26
  export type BattleAttribute = {
27
+ /** 唯一标识 */
28
+ id: number;
27
29
  /** 阵容 */
28
30
  for?: 'self' | 'goal';
29
31
  /** 等级 */
package/lib/index.js CHANGED
@@ -1333,7 +1333,7 @@ var skillFn = {
1333
1333
  isNext: false,
1334
1334
  target: [goal]
1335
1335
  });
1336
- msgList.push(`对 ${getLineupName(goal)} 造成 ${damageData.harm} 伤害。${useBuff ? "(中毒)" : ""}` + moreDamageInfo(damageData));
1336
+ msgList.push(`- ${getLineupName(goal)} 造成 ${damageData.harm} 伤害。${useBuff ? "(中毒)" : ""}` + moreDamageInfo(damageData));
1337
1337
  });
1338
1338
  return msgList.join("\n");
1339
1339
  }, "fn")
@@ -1681,7 +1681,7 @@ MP:${item.mp}/${item.maxMp + item.gain.maxMp}`);
1681
1681
  }
1682
1682
  }
1683
1683
  } else {
1684
- const fliteMyList = allAgentList.filter((item) => item.name !== agent.name && item.hp > 0);
1684
+ const fliteMyList = allAgentList.filter((item) => item.id !== agent.id && item.hp > 0);
1685
1685
  if (!fliteMyList.length) continue;
1686
1686
  selectGoal = fliteMyList[Math.random() * fliteMyList.length];
1687
1687
  }
@@ -1856,6 +1856,7 @@ function initBattleAttribute(data) {
1856
1856
  if ("playName" in data) {
1857
1857
  const userData = data;
1858
1858
  const temp = {
1859
+ id: Date.now(),
1859
1860
  userId: userData.userId,
1860
1861
  name: userData.playName,
1861
1862
  lv: userData.lv,
@@ -1894,6 +1895,7 @@ function initBattleAttribute(data) {
1894
1895
  } else {
1895
1896
  const monsterData2 = data;
1896
1897
  const temp = {
1898
+ id: Date.now(),
1897
1899
  name: monsterData2.name,
1898
1900
  type: "怪物",
1899
1901
  selfType: monsterData2.type,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-smmcat-gensokyo",
3
3
  "description": "名为《幻想乡》的文字冒险游戏",
4
- "version": "0.0.26",
4
+ "version": "0.0.27",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [