koishi-plugin-smmcat-gensokyo 0.0.48 → 0.0.50

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.
@@ -18,6 +18,8 @@ interface DeBuffParams {
18
18
  interface ImprintBuffParams {
19
19
  type: BuffType.印记;
20
20
  key: string;
21
+ up?: BuffGain;
22
+ down?: BuffGain;
21
23
  data?: any;
22
24
  }
23
25
  interface ControlBuffParams {
package/lib/index.js CHANGED
@@ -362,6 +362,32 @@ var monsterData = {
362
362
  { name: "初级复活卷轴", val: 1, radomVal: 50 }
363
363
  ],
364
364
  fn: [{ name: "瓦尼瓦尼", prob: 1 }]
365
+ },
366
+ "星见雅": {
367
+ name: "星见雅",
368
+ type: "野怪" /* 野怪 */,
369
+ info: "星见雅,对空洞事务特别行动部第六课课长,同时也是史上最年轻的“虚狩”。",
370
+ pic: "http://smmcat.cn/run/gensokyo/星见雅.png",
371
+ hp: 100,
372
+ maxHp: 100,
373
+ mp: 110,
374
+ maxMp: 110,
375
+ atk: 24,
376
+ def: 3,
377
+ chr: 150,
378
+ csr: 0,
379
+ evasion: 100,
380
+ hit: 1150,
381
+ ghd: 1.5,
382
+ speed: 6,
383
+ giveExp: 22,
384
+ giveMonetary: 3,
385
+ passiveList: ["霜灼破"],
386
+ giveProps: [
387
+ { name: "大红药", val: 2, radomVal: 20 },
388
+ { name: "中级复活卷轴", val: 1, radomVal: 50 }
389
+ ],
390
+ fn: [{ name: "飞雪", prob: 3 }, { name: "霜月架势", prob: 1 }]
365
391
  }
366
392
  };
367
393
 
@@ -666,6 +692,29 @@ var BuffFn = {
666
692
  }
667
693
  });
668
694
  }, "fn")
695
+ },
696
+ "落霜": {
697
+ name: "落霜",
698
+ type: "印记" /* 印记 */,
699
+ info: "每层 落霜 增加 附着者攻击力 5%,并且消耗每层 ⌈落霜⌋ 均对 霜月架势 技能增加 20% 伤害。最多拥有6点",
700
+ key: "curse-buff",
701
+ initFn: /* @__PURE__ */ __name(function(agent, fn) {
702
+ if (!agent.expand["frost-buff"]) agent.expand["frost-buff"] = { val: 0 };
703
+ if (agent.expand["frost-buff"].val < 6) agent.expand["frost-buff"].val++;
704
+ }, "initFn"),
705
+ fn: /* @__PURE__ */ __name(function(agent, fn) {
706
+ const upatk = Math.floor(agent.atk * 0.05 * (agent.expand["frost-buff"]?.val || 0));
707
+ fn && fn({
708
+ type: "印记" /* 印记 */,
709
+ key: "curse-buff",
710
+ up: {
711
+ atk: upatk
712
+ },
713
+ data: {
714
+ msg: `印记 ⌈落霜⌋ 存在${agent.expand["frost-buff"].val}个`
715
+ }
716
+ });
717
+ }, "fn")
669
718
  }
670
719
  };
671
720
  function buffTimeFormat(time) {
@@ -791,8 +840,32 @@ function settlementBuff(agent) {
791
840
  });
792
841
  break;
793
842
  case "印记" /* 印记 */:
843
+ const _upMsg = [];
844
+ const _downMsg = [];
794
845
  buffInfo.fn(agent, (val) => {
795
- msgList.push(val.data.msg);
846
+ if (val.up) {
847
+ Object.keys(val.up).forEach((buffName) => {
848
+ if (agent.gain[buffName] !== void 0) {
849
+ _upMsg.push(
850
+ val.up[buffName] > 0 ? gainDict[buffName] + "↑" + val.up[buffName] : gainDict[buffName] + "↓" + Math.abs(val.up[buffName])
851
+ );
852
+ agent.gain[buffName] += val.up[buffName];
853
+ }
854
+ });
855
+ }
856
+ if (val.down) {
857
+ Object.keys(val.down).forEach((buffName) => {
858
+ if (agent.gain[buffName] !== void 0) {
859
+ _downMsg.push(
860
+ val.down[buffName] > 0 ? gainDict[buffName] + "↓" + val.down[buffName] : gainDict[buffName] + "↑" + Math.abs(val.down[buffName])
861
+ );
862
+ agent.gain[buffName] -= val.down[buffName];
863
+ }
864
+ });
865
+ }
866
+ msgList.push(
867
+ (_upMsg.length ? _upMsg.join("、") + " " : "") + (_downMsg.length ? _downMsg.join("、") + " " : "") + val.data.msg
868
+ );
796
869
  });
797
870
  default:
798
871
  break;
@@ -883,24 +956,16 @@ var PassiveFn = {
883
956
  return ``;
884
957
  }, "damageFn")
885
958
  },
886
- "剧毒": {
887
- name: "剧毒",
888
- info: "造成伤害时有20%概率为目标附加中毒状态2回合,对已在中毒状态的目标 80% 概率直接催化中毒(结算剩余中毒总计伤害)",
959
+ "霜灼破": {
960
+ name: "霜灼破",
961
+ info: "造成伤害时有 20% 概率为自身增加1点 ⌈落霜⌋ 印记,每层 ⌈落霜⌋ 印记增加 5% 攻击力,持续6回合",
889
962
  type: "atk",
890
963
  damageFn: /* @__PURE__ */ __name(function(config) {
891
- if (config.linkAgent.goal.buff["中毒"] && random(0, 10) <= 8) {
892
- const timeVal = config.linkAgent.goal.buff["中毒"].timer;
893
- clearBuff(config.linkAgent.goal, { name: "中毒" });
894
- const upDamage = Math.min(20, Math.floor((config.agent.goal.maxHp + config.agent.goal.maxHp) * 0.05) || 1) * timeVal;
895
- const value = new BuffDamage(upDamage, config.linkAgent.goal, true).giveDamage();
896
- return `‣ ${getLineupName(config.linkAgent.self)}触发被动 ¦${this.name}¦ 催化中毒${buffTimeFormat(timeVal)} 目标HP-${value}`;
897
- } else {
898
- if (random(0, 10) <= 2) {
899
- giveBuff(config.linkAgent.goal, { name: "中毒", timer: 2 });
900
- return `‣ ${getLineupName(config.linkAgent.self)}触发被动 ¦${this.name}¦ 附着2回合⌈中毒⌋`;
901
- }
902
- return ``;
964
+ if (random(0, 10) <= 2) {
965
+ giveBuff(config.linkAgent.self, { name: "落霜", timer: 6 });
966
+ return `‣ ${getLineupName(config.linkAgent.self)}触发被动 ¦${this.name 获得1点落霜`;
903
967
  }
968
+ return ``;
904
969
  }, "damageFn")
905
970
  }
906
971
  };
@@ -1473,6 +1538,79 @@ var skillFn = {
1473
1538
  }
1474
1539
  return msgList.join("\n");
1475
1540
  }, "fn")
1541
+ },
1542
+ "霜月架势": {
1543
+ name: "霜月架势",
1544
+ type: "伤害技" /* 伤害技 */,
1545
+ info: "将收刀进入 霜月架势 并开始蓄力,对目标全体(最大4名)造成 200%基础攻击力 伤害。触发技能前记录当前所有 ⌈落霜⌋ 印记,每消耗1个 ⌈落霜⌋ 印记,该次伤害增加20%,当消耗达到6印记时,有 60% 概率对目标添加 2回合 ⌈破绽⌋ 状态",
1546
+ lv: 10,
1547
+ mp: 120,
1548
+ fn: /* @__PURE__ */ __name(function(agent, agentList, fn) {
1549
+ if (agent.goal.type == "怪物" && agent.self.expand["frost-buff"]?.val <= 4) {
1550
+ fn({
1551
+ type: "释放失败" /* 释放失败 */,
1552
+ isNext: true,
1553
+ err: "释放失败,星见雅打算至少攒满4豆放弃思考。"
1554
+ });
1555
+ return ``;
1556
+ }
1557
+ let useAtk = Math.floor(agent.self.atk * 2);
1558
+ useAtk += useAtk * 0.2 * (agent.self.expand["frost-buff"]?.val || 0);
1559
+ const goalList = getFreeList(agentList.goalList).slice(0, 4).filter((i) => i);
1560
+ const msgList = [`${getLineupName(agent.self)}释放了群体技能霜月架势!`];
1561
+ goalList.forEach((goal) => {
1562
+ let useBuff = false;
1563
+ const damageData = new Damage({ self: agent.self, goal }).result({
1564
+ before: /* @__PURE__ */ __name((val) => {
1565
+ val.default_harm = useAtk;
1566
+ }, "before"),
1567
+ beforEnd: /* @__PURE__ */ __name((val) => {
1568
+ if (val.harm && agent.self.expand["frost-buff"]?.val == 6 && random(0, 10) < 6) {
1569
+ useBuff = true;
1570
+ giveBuff(goal, { name: "破绽", timer: 2 });
1571
+ }
1572
+ }, "beforEnd")
1573
+ });
1574
+ fn({
1575
+ type: "伤害技" /* 伤害技 */,
1576
+ damage: damageData,
1577
+ isNext: false,
1578
+ target: [goal]
1579
+ });
1580
+ msgList.push(`- 对 ${getLineupName(goal)} 造成 ${damageData.harm} 伤害。${useBuff ? "(破绽)" : ""}` + baseMoreDamage(damageData));
1581
+ });
1582
+ clearImprint(agent.self, { name: "落霜" });
1583
+ return msgList.join("\n");
1584
+ }, "fn")
1585
+ },
1586
+ "飞雪": {
1587
+ name: "飞雪",
1588
+ type: "伤害技" /* 伤害技 */,
1589
+ info: "快速突进,对单个目标发动强力斩击,造成1.3倍伤害。造成伤害时获得2层 ⌈落霜⌋ 印记,印记持续6回合",
1590
+ lv: 10,
1591
+ mp: 60,
1592
+ fn: /* @__PURE__ */ __name(function(agent, agentList, fn) {
1593
+ let useBuff = false;
1594
+ const damageData = new Damage({ self: agent.self, goal: agent.goal }).result({
1595
+ before: /* @__PURE__ */ __name((val) => {
1596
+ val.default_harm += Math.floor(val.default_harm * 0.3);
1597
+ }, "before"),
1598
+ beforEnd: /* @__PURE__ */ __name((val) => {
1599
+ if (val.harm) {
1600
+ useBuff = true;
1601
+ giveBuff(agent.self, { name: "落霜", timer: 6 });
1602
+ giveBuff(agent.self, { name: "落霜", timer: 6 });
1603
+ }
1604
+ }, "beforEnd")
1605
+ });
1606
+ fn({
1607
+ type: "伤害技" /* 伤害技 */,
1608
+ damage: damageData,
1609
+ isNext: false,
1610
+ target: [agent.goal]
1611
+ });
1612
+ return `${getLineupName(agent.self)} 发动飞雪!对 ${getLineupName(agent.goal)} 造成 ${damageData.harm} 伤害。${useBuff ? "并为自己挂上2层 ⌈落霜⌋ 印记" : ""}` + baseMoreDamage(damageData);
1613
+ }, "fn")
1476
1614
  }
1477
1615
  };
1478
1616
 
@@ -2257,6 +2395,27 @@ var propsData = {
2257
2395
  await session.send(`复活成功,当前血量:${val.currentHP}`);
2258
2396
  });
2259
2397
  }, "fn")
2398
+ },
2399
+ "中级复活卷轴": {
2400
+ name: "中级复活卷轴",
2401
+ type: "消耗类" /* 消耗类 */,
2402
+ info: "复活玩家,复活时保留 80% 血量。(该道具使用完需要冷却 6 分钟)",
2403
+ price: 120,
2404
+ cooling: 3600,
2405
+ fn: /* @__PURE__ */ __name(async function(session) {
2406
+ if (BattleData.isBattleByUserId(session.userId)) {
2407
+ session.send(`该道具在战斗中无法使用!请在小队脱离战斗后使用。`);
2408
+ return { err: true };
2409
+ }
2410
+ if (!User.isDie(session.userId)) {
2411
+ session.send(`您还没有阵亡,使用失败!`);
2412
+ return { err: true };
2413
+ }
2414
+ const { maxHp } = User.getUserAttributeByUserId(session.userId);
2415
+ User.giveLife(session.userId, Math.floor(maxHp * 0.8), async (val) => {
2416
+ await session.send(`复活成功,当前血量:${val.currentHP}`);
2417
+ });
2418
+ }, "fn")
2260
2419
  }
2261
2420
  };
2262
2421
 
@@ -3221,7 +3380,8 @@ var GensokyoMap = {
3221
3380
  areaName: "竞技场",
3222
3381
  type: "冒险区" /* 冒险区 */,
3223
3382
  needLv: 1,
3224
- top: "咆哮营地"
3383
+ top: "咆哮营地",
3384
+ monster: [{ name: "星见雅", lv: 30 }]
3225
3385
  }
3226
3386
  }
3227
3387
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-smmcat-gensokyo",
3
3
  "description": "名为《幻想乡》的文字冒险游戏",
4
- "version": "0.0.48",
4
+ "version": "0.0.50",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [