kotori-plugin-penis 1.3.1 → 1.5.0

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/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @Package kotori-plugin-penis
3
- * @Version 1.3.1
3
+ * @Version 1.5.0
4
4
  * @Author Himeno <me@hotaru.icu>
5
5
  * @Copyright 2024-2025 Hotaru. All rights reserved.
6
6
  * @License GPL-3.0
7
7
  * @Link https://github.com/kotorijs/kotori
8
- * @Date 2026/3/29 14:23:44
8
+ * @Date 2026/8/2 15:56:04
9
9
  */
10
10
  "use strict";
11
11
  var __defProp = Object.defineProperty;
@@ -39,6 +39,8 @@ const inject = ["file", "server"];
39
39
  const config = import_kotori_bot.Tsu.Object({
40
40
  max: import_kotori_bot.Tsu.Number().default(30).describe("The maximum length of the dick"),
41
41
  min: import_kotori_bot.Tsu.Number().default(-30).describe("The minimum length of the dick"),
42
+ maxThickness: import_kotori_bot.Tsu.Number().default(10).describe("The maximum thickness of the dick"),
43
+ minThickness: import_kotori_bot.Tsu.Number().default(0.1).describe("The minimum thickness of the dick"),
42
44
  joke: import_kotori_bot.Tsu.Number().default(10).describe("Send a joke when the length is less than value"),
43
45
  avgMinNum: import_kotori_bot.Tsu.Number().default(5).describe("The minimum at avg rank"),
44
46
  probability: import_kotori_bot.Tsu.Number().default(0.45).describe("\u4E0D\u6000\u5B55\u7684\u6982\u7387 (0-1)"),
@@ -48,6 +50,11 @@ const config = import_kotori_bot.Tsu.Object({
48
50
  });
49
51
  function main(ctx, config2) {
50
52
  const getNewLength = () => config2.min + Math.floor(Math.random() * (config2.max - config2.min + 1));
53
+ const getNewThickness = () => Number(
54
+ (config2.minThickness * 10 + Math.random() * (config2.maxThickness * 10 - config2.minThickness * 10) / 10).toFixed(
55
+ 2
56
+ )
57
+ );
51
58
  const getTodayPath = () => `${(/* @__PURE__ */ new Date()).getFullYear()}-${(/* @__PURE__ */ new Date()).getMonth() + 1}-${(/* @__PURE__ */ new Date()).getDay()}.json`;
52
59
  const loadTodayData = () => ctx.file.load(getTodayPath(), "json", {});
53
60
  const saveTodayData = (data) => ctx.file.save(getTodayPath(), data);
@@ -60,13 +67,15 @@ function main(ctx, config2) {
60
67
  ctx.command("dick - \u83B7\u53D6\u4ECA\u65E5\u725B\u725B\u957F\u5EA6").shortcut("\u4ECA\u65E5\u957F\u5EA6").action((_, session) => {
61
68
  const id = `${session.api.adapter.identity}${session.userId}`;
62
69
  const today = loadTodayData();
63
- const todayLength = typeof today[id] === "number" ? today[id] : getNewLength();
64
- const params = [import_kotori_bot.Messages.mention(session.userId), todayLength];
70
+ const [todayLength, todayThickness] = Array.isArray(today[id]) ? today[id] : [getNewLength(), getNewThickness()];
71
+ const params = [import_kotori_bot.Messages.mention(session.userId), todayLength, todayThickness];
65
72
  if (todayLength <= 0) session.quick(["newnew.msg.today_length.info.2", params]);
66
73
  else if (todayLength > 0 && todayLength <= config2.joke) session.quick(["newnew.msg.today_length.info.1", params]);
74
+ else if (todayThickness > 7) session.quick(["newnew.msg.today_length.info.3", params]);
75
+ else if (todayThickness < 1) session.quick(["newnew.msg.today_length.info.4", params]);
67
76
  else session.quick(["newnew.msg.today_length.info.0", params]);
68
- if (typeof today[id] === "number") return;
69
- today[id] = todayLength;
77
+ if (Array.isArray(today[id])) return;
78
+ today[id] = [todayLength, todayThickness];
70
79
  saveTodayData(today);
71
80
  const stat = loadStatData();
72
81
  const person = stat[id];
@@ -123,9 +132,8 @@ function main(ctx, config2) {
123
132
  });
124
133
  ctx.command("daydick - \u67E5\u770B\u725B\u725B\u957F\u5EA6\u4ECA\u65E5\u6392\u884C").shortcut("\u4ECA\u65E5\u6392\u884C").action((_, session) => {
125
134
  const today = loadTodayData();
126
- if (today.length <= 0) return "newnew.msg.today_ranking.fail";
127
- const entries = Object.entries(today).filter((val) => val[0].startsWith(session.api.adapter.identity));
128
- entries.sort((a, b) => b[1] - a[1]);
135
+ const entries = Object.entries(today).filter((val) => val[0].startsWith(session.api.adapter.identity)).sort((a, b) => b[1][0] - a[1][0]);
136
+ if (entries.length <= 0) return "newnew.msg.today_ranking.fail";
129
137
  let list = "";
130
138
  let num = 1;
131
139
  for (const entry of entries) {
@@ -133,7 +141,7 @@ function main(ctx, config2) {
133
141
  list += session.format("newnew.msg.today_ranking.list", [
134
142
  num,
135
143
  entry[0].slice(session.api.adapter.identity.length),
136
- entry[1]
144
+ entry[1][0]
137
145
  ]);
138
146
  num += 1;
139
147
  }
@@ -149,11 +157,44 @@ function main(ctx, config2) {
149
157
  senderRecord.received = 0;
150
158
  senderRecord.lastTime = Date.now();
151
159
  }
160
+ const targetId = args[0] ?? session.userId;
161
+ const params = [import_kotori_bot.Messages.mention(targetId), import_kotori_bot.Messages.mention(session.userId)];
152
162
  if (senderRecord.given >= config2.maxCount) {
153
- return session.quick(["\u6742\u9C7C\u6B27\u5C3C\u9171\uFF0C\u4F60\u4ECA\u5929\u5DF2\u7ECF\u793E\u4E86 {0} \u6B21\u4E86\uFF0C\u8EAB\u4F53\u8981\u88AB\u638F\u7A7A\u4E86\u54E6\uFF01\u4F11\u606F\u4E0B\u5427\u3002", [config2.maxCount]]);
163
+ return session.quick(["{1} \u4F60\u4ECA\u5929\u5DF2\u7ECF {0} \u6B21\u4E86\uFF0C\u8EAB\u4F53\u8981\u88AB\u638F\u7A7A\u4E86\u54E6\uFF01\u4F11\u606F\u4E0B\u5427\u3002", [config2.maxCount, params[1]]]);
154
164
  }
155
- const targetId = args[0] ?? session.userId;
165
+ const lengthData = loadTodayData();
156
166
  const targetFullId = `${session.api.adapter.identity}${targetId}`;
167
+ const [[targetLength, targetThickness], [senderLength, senderThickness]] = [targetFullId, senderId].map(
168
+ (id) => Array.isArray(lengthData[id]) ? lengthData[id] : (() => {
169
+ lengthData[id] = [getNewLength(), getNewThickness()];
170
+ saveTodayData(lengthData);
171
+ return lengthData[id];
172
+ })()
173
+ );
174
+ if (senderLength === 0) return session.quick(["{1} \u4F60\u6CA1\u6709\u6B66\u5668\u554A\uFF01\u60F3\u4EC0\u4E48\u4E86\uFF01", params]);
175
+ if (targetId === session.userId) {
176
+ const cutFailed = Math.random() < config2.cutProbability;
177
+ if (targetLength > 0 && cut) {
178
+ session.quick([cutFailed ? "{1} \u4F60\u6CA1\u5FCD\u4F4F\uFF01\u793E\u4FDD\u4E86\uFF01" : "{1} \u4F60\u6210\u529F\u5BF8\u6B62\u4E86\uFF01", params]);
179
+ }
180
+ if (targetLength > 0) session.quick(["{1} \u8D77\u98DE\u6210\u529F\uFF01\u72B6\u6001\u826F\u597D\uFF01", params]);
181
+ else session.quick(["{1} \u6316\u5751\u6210\u529F\uFF01\u611F\u89C9\u826F\u597D\uFF01", params]);
182
+ if (!cut || cutFailed) {
183
+ senderRecord.given += 1;
184
+ senderRecord.lastTime = Date.now();
185
+ data[senderId] = senderRecord;
186
+ saveData(data);
187
+ }
188
+ return;
189
+ }
190
+ if (targetLength === 0) return session.quick(["{0} \u662F\u5E73\u7684\u554A\uFF01\u4F60\u5E72\u4EC0\u4E48\u4E86\uFF01", params]);
191
+ if (targetLength * senderLength < 0)
192
+ return session.quick(["\u7FA4\u53CB {0} \u548C {1} \u4F60\u90FD\u662F\u53EF\u7231\u7684\u5973\u5B69\u5B50\u5662( \u2022\u0300 \u03C9 \u2022\u0301 )\u2727\uFF0C\u65E0\u6CD5\u8FDB\u884C\u793E\u4FDD\uFF01", params]);
193
+ if (targetLength > 0 && senderLength < 0)
194
+ return session.quick(["\u4F60\u5728\u60F3\u4EC0\u4E48\uFF1F\uFF1F{1} \u4F60\u662F\u53EF\u7231\u7684\u5973\u5B69\u5B50\u554A( \u2022\u0300 \u03C9 \u2022\u0301 )\u2727", params]);
195
+ if (targetLength * senderLength > 0) return session.quick(["\uFF1F\uFF1F\u6960\u6960\uFF1F\uFF1F\u7EDD\u5BF9\u4E0D\u884C\uFF01{1}", params]);
196
+ if (targetThickness < senderThickness)
197
+ return session.quick(["\u7FA4\u53CB {0} \u7684OO\u592A\u5C0F\u4E86\uFF0C{1} \u4F60\u7684\u793E\u4FDD\u65E0\u6CD5\u8FDB\u5165\uFF01", params]);
157
198
  const targetRecord = data[targetFullId] || { given: 0, received: 0, lastTime: 0 };
158
199
  if (targetRecord.lastTime < todayStart) {
159
200
  targetRecord.given = 0;
@@ -161,9 +202,8 @@ function main(ctx, config2) {
161
202
  targetRecord.lastTime = Date.now();
162
203
  }
163
204
  if (targetRecord.received >= config2.maxCount2) {
164
- return session.quick(["\u7FA4\u53CB {0} \u7684\u5C0F\u809A\u809A\u5DF2\u7ECF\u88C5\u4E0D\u4E0B\u4E86\uFF0C\u8BF7\u4E0D\u8981\u518D\u793E\u4E86\uFF01", [import_kotori_bot.Messages.mention(targetId)]]);
205
+ return session.quick(["\u7FA4\u53CB {0} \u7684\u5C0F\u809A\u809A\u5DF2\u7ECF\u88C5\u4E0D\u4E0B\u4E86\uFF0C{1} \u8BF7\u4E0D\u8981\u518D\u793E\u4E86\uFF01", params]);
165
206
  }
166
- const cutFailed = Math.random() < config2.cutProbability;
167
207
  const noPregnancy = Math.random() < config2.probability;
168
208
  const babyTypes = [
169
209
  "\u4E00\u53EA\u7537\u5A03",
@@ -173,25 +213,28 @@ function main(ctx, config2) {
173
213
  "\u4E09\u80DE\u80CE\uFF01",
174
214
  "\u4E00\u4E2A\u5927\u80D6\u5C0F\u5B50",
175
215
  "\u4E00\u5BF9\u9F99\u51E4\u53CC\u80DE\u80CE",
176
- "\u4E00\u53EA\u5C0F\u5DE7\u5C0F\u5973\u513F"
216
+ "\u4E00\u53EA\u5C0F\u5DE7\u5C0F\u5973\u513F",
217
+ "\u4E00\u53EA\u5F02\u5F62\uFF01",
218
+ "\u4E00\u5BF9\u5F02\u5F62\uFF01",
219
+ "\u4E00\u7FA4\u5F02\u5F62\uFF01"
177
220
  ];
178
221
  const pickBaby = () => babyTypes[Math.floor(Math.random() * babyTypes.length)];
179
222
  if (cut) {
180
- if (cutFailed) {
223
+ if (Math.random() < config2.cutProbability) {
181
224
  senderRecord.given++;
182
225
  targetRecord.received++;
183
226
  const babyStr = noPregnancy ? "\u5E86\u5E78\u7684\u662F\u6CA1\u6709\u6000\u5B55" : `\u7FA4\u53CB\u8BDE\u4E0B\u4E86 ${pickBaby()}`;
184
- session.quick([`\u4F60\u5728 cum \u7FA4\u53CB {0} \u7684\u8FC7\u7A0B\u4E2D\u4F7F\u7528\u4E86\u5BF8\u6B62\uFF0C\u4F46\u4F60\u6CA1\u5FCD\u4F4F\uFF01${babyStr}`, [import_kotori_bot.Messages.mention(targetId)]]);
227
+ session.quick([`{1} \u4F60\u5728 cum \u7FA4\u53CB {0} \u7684\u8FC7\u7A0B\u4E2D\u4F7F\u7528\u4E86\u5BF8\u6B62\uFF0C\u4F46\u4F60\u6CA1\u5FCD\u4F4F\uFF01${babyStr}`, params]);
185
228
  } else {
186
- session.quick(["\u4F60\u5728 cum \u7FA4\u53CB {0} \u7684\u8FC7\u7A0B\u4E2D\u6210\u529F\u5BF8\u6B62\uFF01(\u597D\u8170\u529B\uFF01)", [import_kotori_bot.Messages.mention(targetId)]]);
229
+ session.quick(["{1} \u4F60\u5728 cum \u7FA4\u53CB {0} \u7684\u8FC7\u7A0B\u4E2D\u6210\u529F\u5BF8\u6B62\uFF01(\u597D\u8170\u529B\uFF01)", params]);
187
230
  }
188
231
  } else {
189
232
  senderRecord.given++;
190
233
  targetRecord.received++;
191
234
  if (noPregnancy) {
192
- session.quick(["\u4F60\u793E\u4FDD\u4E86\u7FA4\u53CB {0}\uFF0C\u4F46\u5979\u5E76\u6CA1\u6709\u6000\u5B55\u2026\u2026", [import_kotori_bot.Messages.mention(targetId)]]);
235
+ session.quick(["{1} \u4F60\u793E\u4FDD\u4E86\u7FA4\u53CB {0}\uFF0C\u4F46\u5979\u5E76\u6CA1\u6709\u6000\u5B55\u2026\u2026", params]);
193
236
  } else {
194
- session.quick([`\u4F60\u793E\u4FDD\u4E86\u7FA4\u53CB {0} \u5E76\u8BDE\u4E0B\u4E86 ${pickBaby()}`, [import_kotori_bot.Messages.mention(targetId)]]);
237
+ session.quick([`{1} \u4F60\u793E\u4FDD\u4E86\u7FA4\u53CB {0} \u5E76\u8BDE\u4E0B\u4E86 ${pickBaby()}`, params]);
195
238
  }
196
239
  }
197
240
  const now = Date.now();
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "newnew.descr.today_length": "获取今日的牛~牛长度",
3
- "newnew.msg.today_length.info.0": "{0}今日的牛~牛长度是{1} cm...真的有那么长吗(#°Д°)",
4
- "newnew.msg.today_length.info.1": "{0}今日的牛~牛长度是{1} cm",
5
- "newnew.msg.today_length.info.2": "{0}今日的牛~牛长度是...今天是可爱的女孩子噢( •̀ ω •́ )✧({1}cm)",
3
+ "newnew.msg.today_length.info.0": "{0}今日的牛~牛长度是{1} cm,粗度是{2} cm,...真的有那么长吗(#°Д°)",
4
+ "newnew.msg.today_length.info.1": "{0}今日的牛~牛长度是{1} cm,粗度是{2} cm",
5
+ "newnew.msg.today_length.info.2": "{0}今日的牛~牛长度是...今天是可爱的女孩子噢( •̀ ω •́ )✧({1}cm),粗度是{2} cm",
6
+ "newnew.msg.today_length.info.3": "{0}今日的牛~牛长度是{1} cm,粗度是{2} cm,...真的有那么粗吗(#°Д°)",
7
+ "newnew.msg.today_length.info.4": "{0}今日的牛~牛长度是{1} cm,粗度是{2} cm,...真的有那么细吗(#°Д°)",
6
8
  "newnew.descr.my_length": "获取自己的牛牛信息",
7
9
  "newnew.msg.my_length": "{0}\n最大长度:{1} cm 最深长度:{2} cm\n使用次数:{3} 次 累计长度:{4} cm\n平均长度:{5} cm",
8
10
  "newnew.msg.my_length.fail": "{0}你的牛牛丢了...找不到你的牛牛数据呢/(ㄒoㄒ)/~~对不起",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kotori-plugin-penis",
3
- "version": "1.3.1",
3
+ "version": "1.5.0",
4
4
  "description": "查看今日牛牛的长度和排行和寸止",
5
5
  "main": "lib/index.js",
6
6
  "keywords": [