koishi-plugin-smmcat-gensokyo 0.0.47 → 0.0.49
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/data/buffFn.d.ts +4 -0
- package/lib/index.js +187 -23
- package/package.json +1 -1
package/lib/data/buffFn.d.ts
CHANGED
|
@@ -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 {
|
|
@@ -60,6 +62,8 @@ type BuffFnList = {
|
|
|
60
62
|
[key: string]: BuffConfig;
|
|
61
63
|
};
|
|
62
64
|
export declare const BuffFn: BuffFnList;
|
|
65
|
+
/** BUFF状态持续时间格式化 */
|
|
66
|
+
export declare function buffTimeFormat(time: number): any;
|
|
63
67
|
/** 为目标添加BUFF */
|
|
64
68
|
export declare function giveBuff(agent: BattleAttribute, buff: {
|
|
65
69
|
name: string;
|
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,8 +692,36 @@ 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
|
};
|
|
720
|
+
function buffTimeFormat(time) {
|
|
721
|
+
const dict = { 1: "¹", 2: "²", 3: "³", 4: "⁴", 5: "⁵", 6: "⁶", 7: "⁷", 8: "⁸", 9: "⁹" };
|
|
722
|
+
return dict[time] || "⁺";
|
|
723
|
+
}
|
|
724
|
+
__name(buffTimeFormat, "buffTimeFormat");
|
|
671
725
|
function giveBuff(agent, buff) {
|
|
672
726
|
const buffInfo = BuffFn[buff.name] || null;
|
|
673
727
|
if (!buffInfo) return;
|
|
@@ -676,7 +730,7 @@ function giveBuff(agent, buff) {
|
|
|
676
730
|
if (agent.buff[buff.name]) again = true;
|
|
677
731
|
agent.buff[buff.name] = buff;
|
|
678
732
|
const dict = { 1: "¹", 2: "²", 3: "³", 4: "⁴", 5: "⁵", 6: "⁶", 7: "⁷", 8: "⁸", 9: "⁹" };
|
|
679
|
-
return again ? `${getLineupName(agent)}被再次挂上了${buff.name}${
|
|
733
|
+
return again ? `${getLineupName(agent)}被再次挂上了${buff.name}${buffTimeFormat(buff.timer)}` : `${getLineupName(agent)}被挂上了${buff.name}${buffTimeFormat(buff.timer)}`;
|
|
680
734
|
}
|
|
681
735
|
__name(giveBuff, "giveBuff");
|
|
682
736
|
function clearBuff(agent, buff) {
|
|
@@ -786,8 +840,32 @@ function settlementBuff(agent) {
|
|
|
786
840
|
});
|
|
787
841
|
break;
|
|
788
842
|
case "印记" /* 印记 */:
|
|
843
|
+
const _upMsg = [];
|
|
844
|
+
const _downMsg = [];
|
|
789
845
|
buffInfo.fn(agent, (val) => {
|
|
790
|
-
|
|
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
|
+
);
|
|
791
869
|
});
|
|
792
870
|
default:
|
|
793
871
|
break;
|
|
@@ -809,7 +887,7 @@ var PassiveFn = {
|
|
|
809
887
|
const val = Math.floor(config.harm * 0.1);
|
|
810
888
|
if (val) {
|
|
811
889
|
const res = giveCure(config.linkAgent.self, val);
|
|
812
|
-
return `‣ ${getLineupName(config.linkAgent.self)}
|
|
890
|
+
return `‣ ${getLineupName(config.linkAgent.self)}触发被动 ¦${this.name}¦ HP+${res.val}`;
|
|
813
891
|
}
|
|
814
892
|
return ``;
|
|
815
893
|
}, "damageFn")
|
|
@@ -822,7 +900,7 @@ var PassiveFn = {
|
|
|
822
900
|
const val = Math.floor(config.harm * 0.2);
|
|
823
901
|
if (val && random(0, 10) <= 4) {
|
|
824
902
|
const value = new BuffDamage(val, config.linkAgent.self, true).giveDamage();
|
|
825
|
-
return `‣ ${getLineupName(config.linkAgent.goal)}
|
|
903
|
+
return `‣ ${getLineupName(config.linkAgent.goal)}触发被动 ¦${this.name}¦ HP-${value}`;
|
|
826
904
|
}
|
|
827
905
|
return ``;
|
|
828
906
|
}, "damageFn")
|
|
@@ -836,7 +914,7 @@ var PassiveFn = {
|
|
|
836
914
|
const upVal = Math.floor(config.harm * 0.3);
|
|
837
915
|
if (upVal) {
|
|
838
916
|
config.harm += Math.floor(config.harm * 0.3);
|
|
839
|
-
return `‣ ${getLineupName(config.linkAgent.self)}
|
|
917
|
+
return `‣ ${getLineupName(config.linkAgent.self)}触发被动 ¦${this.name}¦ 伤害+${upVal}`;
|
|
840
918
|
}
|
|
841
919
|
return ``;
|
|
842
920
|
}
|
|
@@ -852,7 +930,7 @@ var PassiveFn = {
|
|
|
852
930
|
const upVal = Math.floor(config.harm * 0.3);
|
|
853
931
|
if (upVal) {
|
|
854
932
|
config.harm += Math.floor(config.harm * 0.3);
|
|
855
|
-
return `‣ ${getLineupName(config.linkAgent.self)}
|
|
933
|
+
return `‣ ${getLineupName(config.linkAgent.self)}触发被动 ¦${this.name}¦ 伤害+${upVal}`;
|
|
856
934
|
}
|
|
857
935
|
return ``;
|
|
858
936
|
}
|
|
@@ -871,31 +949,23 @@ var PassiveFn = {
|
|
|
871
949
|
);
|
|
872
950
|
if (upVal) {
|
|
873
951
|
const value = new BuffDamage(upVal, config.linkAgent.goal, true).giveDamage();
|
|
874
|
-
return `‣ ${getLineupName(config.linkAgent.self)}
|
|
952
|
+
return `‣ ${getLineupName(config.linkAgent.self)}触发被动 ¦${this.name}¦ HP-${value}`;
|
|
875
953
|
}
|
|
876
954
|
return ``;
|
|
877
955
|
}
|
|
878
956
|
return ``;
|
|
879
957
|
}, "damageFn")
|
|
880
958
|
},
|
|
881
|
-
"
|
|
882
|
-
name: "
|
|
883
|
-
info: "
|
|
959
|
+
"霜灼破": {
|
|
960
|
+
name: "霜灼破",
|
|
961
|
+
info: "造成伤害时有 20% 概率为自身增加1点 ⌈落霜⌋ 印记,每层 ⌈落霜⌋ 印记增加 5% 攻击力,持续6回合",
|
|
884
962
|
type: "atk",
|
|
885
963
|
damageFn: /* @__PURE__ */ __name(function(config) {
|
|
886
|
-
if (
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
const upDamage = Math.min(20, Math.floor((config.agent.goal.maxHp + config.agent.goal.maxHp) * 0.05) || 1) * timeVal;
|
|
890
|
-
const value = new BuffDamage(upDamage, config.linkAgent.goal, true).giveDamage();
|
|
891
|
-
return `‣ ${getLineupName(config.linkAgent.self)}触发被动¦${this.name}¦ 催化中毒 目标HP-${value}`;
|
|
892
|
-
} else {
|
|
893
|
-
if (random(0, 10) <= 2) {
|
|
894
|
-
giveBuff(config.linkAgent.goal, { name: "中毒", timer: 2 });
|
|
895
|
-
return `‣ ${getLineupName(config.linkAgent.self)}触发被动¦${this.name}¦ 附着2回合⌈中毒⌋`;
|
|
896
|
-
}
|
|
897
|
-
return ``;
|
|
964
|
+
if (random(0, 10) <= 2) {
|
|
965
|
+
giveBuff(config.linkAgent.self, { name: "落霜", timer: 6 });
|
|
966
|
+
return `‣ ${getLineupName(config.linkAgent.self)}触发被动 ¦${this.name}¦ 获得1点落霜`;
|
|
898
967
|
}
|
|
968
|
+
return ``;
|
|
899
969
|
}, "damageFn")
|
|
900
970
|
}
|
|
901
971
|
};
|
|
@@ -1468,6 +1538,78 @@ var skillFn = {
|
|
|
1468
1538
|
}
|
|
1469
1539
|
return msgList.join("\n");
|
|
1470
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
|
+
const useAtk = Math.floor(agent.self.atk * 2 + agent.self.atk * 0.2 * (agent.self.expand["frost-buff"]?.val || 0));
|
|
1558
|
+
const goalList = getFreeList(agentList.goalList).slice(0, 4).filter((i) => i);
|
|
1559
|
+
const msgList = [`${getLineupName(agent.self)}释放了群体技能霜月架势!`];
|
|
1560
|
+
goalList.forEach((goal) => {
|
|
1561
|
+
let useBuff = false;
|
|
1562
|
+
const damageData = new Damage({ self: agent.self, goal }).result({
|
|
1563
|
+
before: /* @__PURE__ */ __name((val) => {
|
|
1564
|
+
val.default_harm = useAtk;
|
|
1565
|
+
}, "before"),
|
|
1566
|
+
beforEnd: /* @__PURE__ */ __name((val) => {
|
|
1567
|
+
if (val.harm && agent.self.expand["frost-buff"]?.val == 6 && random(0, 10) < 6) {
|
|
1568
|
+
useBuff = true;
|
|
1569
|
+
giveBuff(goal, { name: "破绽", timer: 2 });
|
|
1570
|
+
}
|
|
1571
|
+
}, "beforEnd")
|
|
1572
|
+
});
|
|
1573
|
+
fn({
|
|
1574
|
+
type: "伤害技" /* 伤害技 */,
|
|
1575
|
+
damage: damageData,
|
|
1576
|
+
isNext: false,
|
|
1577
|
+
target: [goal]
|
|
1578
|
+
});
|
|
1579
|
+
msgList.push(`- 对 ${getLineupName(goal)} 造成 ${damageData.harm} 伤害。${useBuff ? "(破绽)" : ""}` + baseMoreDamage(damageData));
|
|
1580
|
+
});
|
|
1581
|
+
clearImprint(agent.self, { name: "落霜" });
|
|
1582
|
+
return msgList.join("\n");
|
|
1583
|
+
}, "fn")
|
|
1584
|
+
},
|
|
1585
|
+
"飞雪": {
|
|
1586
|
+
name: "飞雪",
|
|
1587
|
+
type: "伤害技" /* 伤害技 */,
|
|
1588
|
+
info: "快速突进,对单个目标发动强力斩击,造成1.3倍伤害。造成伤害时获得2层 ⌈落霜⌋ 印记,印记持续6回合",
|
|
1589
|
+
lv: 10,
|
|
1590
|
+
mp: 60,
|
|
1591
|
+
fn: /* @__PURE__ */ __name(function(agent, agentList, fn) {
|
|
1592
|
+
let useBuff = false;
|
|
1593
|
+
const damageData = new Damage({ self: agent.self, goal: agent.goal }).result({
|
|
1594
|
+
before: /* @__PURE__ */ __name((val) => {
|
|
1595
|
+
val.default_harm += Math.floor(val.default_harm * 0.3);
|
|
1596
|
+
}, "before"),
|
|
1597
|
+
beforEnd: /* @__PURE__ */ __name((val) => {
|
|
1598
|
+
if (val.harm) {
|
|
1599
|
+
useBuff = true;
|
|
1600
|
+
giveBuff(agent.self, { name: "落霜", timer: 6 });
|
|
1601
|
+
giveBuff(agent.self, { name: "落霜", timer: 6 });
|
|
1602
|
+
}
|
|
1603
|
+
}, "beforEnd")
|
|
1604
|
+
});
|
|
1605
|
+
fn({
|
|
1606
|
+
type: "伤害技" /* 伤害技 */,
|
|
1607
|
+
damage: damageData,
|
|
1608
|
+
isNext: false,
|
|
1609
|
+
target: [agent.goal]
|
|
1610
|
+
});
|
|
1611
|
+
return `${getLineupName(agent.self)} 发动飞雪!对 ${getLineupName(agent.goal)} 造成 ${damageData.harm} 伤害。${useBuff ? "并为自己挂上2层 ⌈落霜⌋ 印记" : ""}` + baseMoreDamage(damageData);
|
|
1612
|
+
}, "fn")
|
|
1471
1613
|
}
|
|
1472
1614
|
};
|
|
1473
1615
|
|
|
@@ -2252,6 +2394,27 @@ var propsData = {
|
|
|
2252
2394
|
await session.send(`复活成功,当前血量:${val.currentHP}`);
|
|
2253
2395
|
});
|
|
2254
2396
|
}, "fn")
|
|
2397
|
+
},
|
|
2398
|
+
"中级复活卷轴": {
|
|
2399
|
+
name: "中级复活卷轴",
|
|
2400
|
+
type: "消耗类" /* 消耗类 */,
|
|
2401
|
+
info: "复活玩家,复活时保留 80% 血量。(该道具使用完需要冷却 6 分钟)",
|
|
2402
|
+
price: 120,
|
|
2403
|
+
cooling: 3600,
|
|
2404
|
+
fn: /* @__PURE__ */ __name(async function(session) {
|
|
2405
|
+
if (BattleData.isBattleByUserId(session.userId)) {
|
|
2406
|
+
session.send(`该道具在战斗中无法使用!请在小队脱离战斗后使用。`);
|
|
2407
|
+
return { err: true };
|
|
2408
|
+
}
|
|
2409
|
+
if (!User.isDie(session.userId)) {
|
|
2410
|
+
session.send(`您还没有阵亡,使用失败!`);
|
|
2411
|
+
return { err: true };
|
|
2412
|
+
}
|
|
2413
|
+
const { maxHp } = User.getUserAttributeByUserId(session.userId);
|
|
2414
|
+
User.giveLife(session.userId, Math.floor(maxHp * 0.8), async (val) => {
|
|
2415
|
+
await session.send(`复活成功,当前血量:${val.currentHP}`);
|
|
2416
|
+
});
|
|
2417
|
+
}, "fn")
|
|
2255
2418
|
}
|
|
2256
2419
|
};
|
|
2257
2420
|
|
|
@@ -3216,7 +3379,8 @@ var GensokyoMap = {
|
|
|
3216
3379
|
areaName: "竞技场",
|
|
3217
3380
|
type: "冒险区" /* 冒险区 */,
|
|
3218
3381
|
needLv: 1,
|
|
3219
|
-
top: "咆哮营地"
|
|
3382
|
+
top: "咆哮营地",
|
|
3383
|
+
monster: [{ name: "星见雅", lv: 30 }]
|
|
3220
3384
|
}
|
|
3221
3385
|
}
|
|
3222
3386
|
};
|