koishi-plugin-smmcat-gensokyo 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. package/lib/index.js +15 -37
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -468,34 +468,34 @@ var User = {
468
468
  const lv = UserData.lv;
469
469
  const benchmark = {
470
470
  10: {
471
- hp: 1.4,
472
- maxHp: 1.4,
473
- mp: 1.2,
474
- maxMp: 1.2,
475
- atk: 1.2,
471
+ hp: 1.2,
472
+ maxHp: 1.2,
473
+ mp: 1.1,
474
+ maxMp: 1.1,
475
+ atk: 1.12,
476
476
  def: 1.1,
477
477
  chr: 1.1,
478
- evasion: 1.2,
479
- hit: 1.2,
478
+ evasion: 1.1,
479
+ hit: 1.1,
480
480
  ghd: 1,
481
481
  speed: 1.05
482
482
  },
483
483
  20: {
484
- hp: 1.35,
485
- maxHp: 1.35,
484
+ hp: 1.15,
485
+ maxHp: 1.15,
486
486
  mp: 1.1,
487
487
  maxMp: 1.1,
488
488
  atk: 1.1,
489
489
  def: 1.1,
490
490
  chr: 1.1,
491
491
  evasion: 1.1,
492
- hit: 1.1,
492
+ hit: 1.08,
493
493
  ghd: 1,
494
494
  speed: 1.05
495
495
  },
496
496
  40: {
497
- hp: 1.2,
498
- maxHp: 1.2,
497
+ hp: 1.1,
498
+ maxHp: 1.1,
499
499
  mp: 1.05,
500
500
  maxMp: 1.05,
501
501
  atk: 1.1,
@@ -807,7 +807,8 @@ var Damage = class {
807
807
  evasion(fn) {
808
808
  const { self, goal } = this.config.agent;
809
809
  if (this.config.isRealHarm) return this;
810
- const evaVal = (goal.evasion - (self.hit - 1e3)) / 10;
810
+ const lvSup = /* @__PURE__ */ __name(() => Math.floor((goal.lv - self.lv) / 5) * 20, "lvSup");
811
+ const evaVal = Math.min(95, (goal.evasion - (self.hit - 1e3) + lvSup()) / 10);
811
812
  if (random(0, 100) <= evaVal) {
812
813
  this.config.isEvasion = true;
813
814
  fn && fn(this.config);
@@ -926,7 +927,6 @@ var BattleData = {
926
927
  };
927
928
  });
928
929
  await session.send(`开始与 ${goal.map((i) => i.name).join("、")} 进行战斗`);
929
- console.log(BattleData.lastPlay[session.userId]);
930
930
  },
931
931
  /** 文本化当前战况 */
932
932
  battleSituationTextFormat(team) {
@@ -1003,29 +1003,7 @@ ${generateHealthDisplay(item.hp, item.maxHp + item.gain.maxHp)}(${item.hp}/${ite
1003
1003
  } else {
1004
1004
  selectGoal = lifeGoalList[Math.floor(Math.random() * lifeGoalList.length)];
1005
1005
  }
1006
- console.log(selectGoal);
1007
- const damageInfo = new Damage({ self: agent, goal: selectGoal }).result({
1008
- // 开始计算伤害前
1009
- before: /* @__PURE__ */ __name((val) => {
1010
- console.log(val);
1011
- }, "before"),
1012
- // 计算真实伤害前
1013
- beforRealHarm: /* @__PURE__ */ __name((val) => {
1014
- console.log(val);
1015
- }, "beforRealHarm"),
1016
- // 是否成功闪避
1017
- evasion: /* @__PURE__ */ __name((val) => {
1018
- console.log(val);
1019
- }, "evasion"),
1020
- // 是否成功暴击
1021
- csp: /* @__PURE__ */ __name((val) => {
1022
- console.log(val);
1023
- }, "csp"),
1024
- // 防御抵消前
1025
- beforDef: /* @__PURE__ */ __name((val) => {
1026
- console.log(val);
1027
- }, "beforDef")
1028
- });
1006
+ const damageInfo = new Damage({ self: agent, goal: selectGoal }).result();
1029
1007
  giveDamage(agent, selectGoal, damageInfo);
1030
1008
  msgList.push(
1031
1009
  `[${agent.type}]${agent.name} 使用普攻攻击了 [${selectGoal.type}]${selectGoal.name},造成了${damageInfo.harm}伤害。` + (damageInfo.isCsp ? `(暴击!)` : "") + (damageInfo.isEvasion ? `(闪避成功!)` : "") + (damageInfo.isBadDef ? `(未破防!)` : "")
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-smmcat-gensokyo",
3
3
  "description": "名为《幻想乡》的文字冒险游戏",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [