nonebot-plugin-fishing2 0.1.1__py3-none-any.whl → 1.0.1__py3-none-any.whl

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.
@@ -1,301 +1,301 @@
1
- from pydantic import BaseModel
2
- from typing import List, Dict
3
-
4
- from nonebot import get_plugin_config
5
-
6
-
7
- # fmt:off
8
- class Config(BaseModel):
9
- fishes: List[Dict] = [
10
- {
11
- "type": "fish", # 类型,必填,可用值:fish, item,同类型物品不能同时作为鱼饵
12
- "name": "小鱼", # 名称,必填
13
- "price": 15, # 基准价格,必填
14
- "amount": 1, # 单份数量,模拟耐久
15
- "props": [ # 属性,选填,作为鱼饵时改变
16
- {
17
- "type": "rm_fish", # 可用值: rare_fish, normal_fish, fish, rm_fish, special_fish, no_fish
18
- "key": "小鱼", # 如果为 fish 或 rm_fish,需要填写鱼名
19
- "value": 0 # 如果为 rare_fish, normal_fish, fish,填写权重;如果为 special_fish, no_fish,填写概率
20
- }
21
- ],
22
- "description": "一条小鱼。把它当做鱼饵可以防止钓到小鱼。", # 描述,必填
23
- "can_catch": True, # 是否可以抓取,必填
24
- "sleep_time": 2, # 钓上来需要的时间,默认 60
25
- "weight": 1000, # 权重
26
- "can_buy": True, # 是否可以购买,必填
27
- "buy_price": 50, # 购买价格
28
- "can_sell": True # 是否可以出售,必填
29
- },
30
- {
31
- "type": "item",
32
- "name": "尚方宝剑",
33
- "price": 20,
34
- "props": [],
35
- "description": "假的。",
36
- "can_catch": True,
37
- "sleep_time": 2,
38
- "weight": 500,
39
- "can_buy": False,
40
- "can_sell": True,
41
- },
42
- {
43
- "type": "fish",
44
- "name": "小杂鱼~♡",
45
- "price": 100,
46
- "props": [],
47
- "description": "杂鱼,杂鱼~",
48
- "can_catch": True,
49
- "sleep_time": 10,
50
- "weight": 100,
51
- "can_buy": False,
52
- "can_sell": True
53
- },
54
- {
55
- "type": "fish",
56
- "name": "烤激光鱼",
57
- "price": 1000,
58
- "props": [],
59
- "description": "河里为什么会有烤鱼?",
60
- "can_catch": True,
61
- "sleep_time": 20,
62
- "weight": 20,
63
- "can_buy": False,
64
- "can_sell": True
65
- },
66
- {
67
- "type": "fish",
68
- "name": "琪露诺",
69
- "price": 1000,
70
- "props": [],
71
- "description": "邪恶的冰之精灵,是个笨蛋。",
72
- "can_catch": True,
73
- "sleep_time": 60,
74
- "weight": 20,
75
- "can_buy": False,
76
- "can_sell": True
77
- },
78
- {
79
- "type": "fish",
80
- "name": "大傻",
81
- "price": 2000,
82
- "props": [],
83
- "description": "非常能吃大米。",
84
- "can_catch": True,
85
- "sleep_time": 30,
86
- "weight": 10,
87
- "can_buy": False,
88
- "can_sell": True
89
- },
90
- {
91
- "type": "fish",
92
- "name": "帕秋莉",
93
- "price": 8000,
94
- "props": [],
95
- "description": "Neet姬,非常难在图书馆外见到她。",
96
- "can_catch": True,
97
- "sleep_time": 120,
98
- "weight": 0,
99
- "can_buy": False,
100
- "can_sell": True
101
- },
102
- {
103
- "type": "item",
104
- "name": "钢制鱼竿",
105
- "price": 10,
106
- "amount": 30,
107
- "props": [
108
- {
109
- "type": "rare_fish",
110
- "value": 5
111
- },
112
- {
113
- "type": "no_fish",
114
- "value": 0.05
115
- }
116
- ],
117
- "description": "升级的鱼竿,提升钓上大鱼的概率;但是因为偏重,容易空军。",
118
- "can_catch": False,
119
- "can_buy": True,
120
- "can_sell": False
121
- },
122
- {
123
- "type": "item",
124
- "name": "钛金鱼竿",
125
- "price": 40,
126
- "amount": 20,
127
- "props": [
128
- {
129
- "type": "rare_fish",
130
- "value": 10
131
- },
132
- {
133
- "type": "no_fish",
134
- "value": -0.05
135
- }
136
- ],
137
- "description": "更坚韧的鱼竿,显著提升钓上大鱼的概率。",
138
- "can_catch": False,
139
- "can_buy": True,
140
- "buy_price": 40,
141
- "can_sell": False
142
- },
143
- {
144
- "type": "item",
145
- "name": "附魔鱼竿",
146
- "price": 20,
147
- "amount": 20,
148
- "props": [
149
- {
150
- "type": "normal_fish",
151
- "value": -250
152
- }
153
- ],
154
- "description": "附魔的鱼竿,大幅减少钓上垃圾的概率。",
155
- "can_catch": True,
156
- "sleep_time": 30,
157
- "weight": 40,
158
- "can_buy": False,
159
- "can_sell": False
160
- },
161
- {
162
- "type": "fish",
163
- "name": "大米",
164
- "price": 700,
165
- "props": [
166
- {
167
- "type": "fish",
168
- "key": "大傻",
169
- "value": 10000
170
- }
171
- ],
172
- "description": "Fufu 最爱吃的大米!",
173
- "can_catch": False,
174
- "can_buy": True,
175
- "can_sell": False
176
- },
177
- {
178
- "type": "fish",
179
- "name": "棒棒糖",
180
- "price": 50,
181
- "props": [
182
- {
183
- "type": "special_fish",
184
- "value": 0.5
185
- },
186
- {
187
- "type": "fish",
188
- "key": "帕秋莉",
189
- "value": 10
190
- }
191
- ],
192
- "description": "可以吸引到一些奇怪的鱼。",
193
- "can_catch": False,
194
- "can_buy": True,
195
- "can_sell": False
196
- },
197
- {
198
- "type": "fish",
199
- "name": "传奇棒棒糖",
200
- "price": 200,
201
- "props": [
202
- {
203
- "type": "special_fish",
204
- "value": 1
205
- },
206
- {
207
- "type": "no_fish",
208
- "value": -1
209
- }
210
- ],
211
- "description": "必定钓到特殊鱼。",
212
- "can_catch": False,
213
- "can_buy": False,
214
- "can_sell": False
215
- }
216
- ]
217
-
218
- fishing_achievement: List[Dict] = [
219
- {
220
- "type": "fishing_frequency",
221
- "name": "腥味十足的生意",
222
- "data": 1,
223
- "description": "钓到一条鱼。"
224
- },
225
- {
226
- "type": "fishing_frequency",
227
- "name": "还是钓鱼大佬",
228
- "data": 100,
229
- "description": "累计钓鱼一百次。"
230
- },
231
- {
232
- "type": "fish_type",
233
- "name": "那是鱼吗?",
234
- "data": "小杂鱼~♡",
235
- "description": "获得#####。[原文如此]"
236
- },
237
- {
238
- "type": "fish_type",
239
- "name": "那一晚, 激光鱼和便携式烤炉都喝醉了",
240
- "data": "烤激光鱼",
241
- "description": "获得烤激光鱼。"
242
- },
243
- {
244
- "type": "fish_type",
245
- "name": "你怎么把 Fufu 钓上来了",
246
- "data": "大傻",
247
- "description": "获得大傻"
248
- },
249
- {
250
- "type": "fish_type",
251
- "name": "⑨",
252
- "data": "琪露诺",
253
- "description": "发现了湖边的冰之精灵"
254
- },
255
- {
256
- "type": "fish_type",
257
- "name": "不动的大图书馆",
258
- "data": "帕秋莉",
259
- "description": "Neet 姬好不容易出门一次,就被你钓上来了?"
260
- },
261
- {
262
- "type": "fish_type",
263
- "name": "工欲善其事,必先利其器",
264
- "data": "钛金鱼竿",
265
- "description": "在钓鱼用具店购买钛金鱼竿"
266
- },
267
- {
268
- "type": "fish_type",
269
- "name": "为啥能钓上鱼竿?",
270
- "data": "附魔鱼竿",
271
- "description": "钓上附魔鱼竿"
272
- }
273
- ]
274
-
275
- fishing_coin_name: str = "绿宝石" # 货币名称
276
-
277
- fishing_cooldown_time_min: int = 60 # 钓鱼冷却下限,单位为秒
278
-
279
- fishing_cooldown_time_max: int = 90 # 钓鱼冷却上限
280
-
281
- punish_limit: int = 3 # 短时间多次钓鱼后,禁言所需次数,防止刷屏
282
-
283
- special_fish_enabled: bool = False # 是否启用赛博放生 & 特殊鱼
284
-
285
- special_fish_price: int = 200 # 特殊鱼出售的价格
286
-
287
- special_fish_free_price: int = 100 # 特殊鱼放生的价格
288
-
289
- special_fish_probability: float = 0.01 # 钓上特殊鱼的概率,注意这个判定在空军判定之后
290
-
291
- no_fish_probability: float = 0.1 # 空军的概率
292
-
293
- rare_fish_weight: int = 500 # 稀有鱼权重分界线,影响 rare_fish 属性与 normal_fish 属性的区分
294
-
295
- buy_rate: float = 2.0 # 在不指定 buy_price 时,购买价格/基准价格比,应大于 1
296
-
297
- backpack_forward: bool = True # 背包是否使用聊天记录
298
- # fmt:on
299
-
300
- config = get_plugin_config(Config)
301
-
1
+ from pydantic import BaseModel
2
+ from typing import List, Dict
3
+
4
+ from nonebot import get_plugin_config
5
+
6
+
7
+ # fmt:off
8
+ class Config(BaseModel):
9
+ fishes: List[Dict] = [
10
+ {
11
+ "type": "fish", # 类型,必填,可用值:fish, item,同类型物品不能同时作为鱼饵
12
+ "name": "小鱼", # 名称,必填
13
+ "price": 15, # 基准价格,必填
14
+ "amount": 1, # 单份数量,模拟耐久
15
+ "props": [ # 属性,选填,作为鱼饵时改变
16
+ {
17
+ "type": "rm_fish", # 可用值: rare_fish, normal_fish, fish, rm_fish, special_fish, no_fish
18
+ "key": "小鱼", # 如果为 fish 或 rm_fish,需要填写鱼名
19
+ "value": 0 # 如果为 rare_fish, normal_fish, fish,填写权重;如果为 special_fish, no_fish,填写概率
20
+ }
21
+ ],
22
+ "description": "一条小鱼。把它当做鱼饵可以防止钓到小鱼。", # 描述,必填
23
+ "can_catch": True, # 是否可以抓取,必填
24
+ "sleep_time": 2, # 钓上来需要的时间,默认 60
25
+ "weight": 1000, # 权重
26
+ "can_buy": True, # 是否可以购买,必填
27
+ "buy_price": 50, # 购买价格
28
+ "can_sell": True # 是否可以出售,必填
29
+ },
30
+ {
31
+ "type": "item",
32
+ "name": "尚方宝剑",
33
+ "price": 20,
34
+ "props": [],
35
+ "description": "假的。",
36
+ "can_catch": True,
37
+ "sleep_time": 2,
38
+ "weight": 500,
39
+ "can_buy": False,
40
+ "can_sell": True,
41
+ },
42
+ {
43
+ "type": "fish",
44
+ "name": "小杂鱼~♡",
45
+ "price": 100,
46
+ "props": [],
47
+ "description": "杂鱼,杂鱼~",
48
+ "can_catch": True,
49
+ "sleep_time": 10,
50
+ "weight": 100,
51
+ "can_buy": False,
52
+ "can_sell": True
53
+ },
54
+ {
55
+ "type": "fish",
56
+ "name": "烤激光鱼",
57
+ "price": 1000,
58
+ "props": [],
59
+ "description": "河里为什么会有烤鱼?",
60
+ "can_catch": True,
61
+ "sleep_time": 20,
62
+ "weight": 20,
63
+ "can_buy": False,
64
+ "can_sell": True
65
+ },
66
+ {
67
+ "type": "fish",
68
+ "name": "琪露诺",
69
+ "price": 1000,
70
+ "props": [],
71
+ "description": "邪恶的冰之精灵,是个笨蛋。",
72
+ "can_catch": True,
73
+ "sleep_time": 60,
74
+ "weight": 20,
75
+ "can_buy": False,
76
+ "can_sell": True
77
+ },
78
+ {
79
+ "type": "fish",
80
+ "name": "大傻",
81
+ "price": 2000,
82
+ "props": [],
83
+ "description": "非常能吃大米。",
84
+ "can_catch": True,
85
+ "sleep_time": 30,
86
+ "weight": 10,
87
+ "can_buy": False,
88
+ "can_sell": True
89
+ },
90
+ {
91
+ "type": "fish",
92
+ "name": "帕秋莉",
93
+ "price": 8000,
94
+ "props": [],
95
+ "description": "Neet姬,非常难在图书馆外见到她。",
96
+ "can_catch": True,
97
+ "sleep_time": 120,
98
+ "weight": 0,
99
+ "can_buy": False,
100
+ "can_sell": True
101
+ },
102
+ {
103
+ "type": "item",
104
+ "name": "钢制鱼竿",
105
+ "price": 10,
106
+ "amount": 30,
107
+ "props": [
108
+ {
109
+ "type": "rare_fish",
110
+ "value": 5
111
+ },
112
+ {
113
+ "type": "no_fish",
114
+ "value": 0.05
115
+ }
116
+ ],
117
+ "description": "升级的鱼竿,提升钓上大鱼的概率;但是因为偏重,容易空军。",
118
+ "can_catch": False,
119
+ "can_buy": True,
120
+ "can_sell": False
121
+ },
122
+ {
123
+ "type": "item",
124
+ "name": "钛金鱼竿",
125
+ "price": 40,
126
+ "amount": 20,
127
+ "props": [
128
+ {
129
+ "type": "rare_fish",
130
+ "value": 10
131
+ },
132
+ {
133
+ "type": "no_fish",
134
+ "value": -0.05
135
+ }
136
+ ],
137
+ "description": "更坚韧的鱼竿,显著提升钓上大鱼的概率。",
138
+ "can_catch": False,
139
+ "can_buy": True,
140
+ "buy_price": 40,
141
+ "can_sell": False
142
+ },
143
+ {
144
+ "type": "item",
145
+ "name": "附魔鱼竿",
146
+ "price": 20,
147
+ "amount": 20,
148
+ "props": [
149
+ {
150
+ "type": "normal_fish",
151
+ "value": -250
152
+ }
153
+ ],
154
+ "description": "附魔的鱼竿,大幅减少钓上垃圾的概率。",
155
+ "can_catch": True,
156
+ "sleep_time": 30,
157
+ "weight": 40,
158
+ "can_buy": False,
159
+ "can_sell": False
160
+ },
161
+ {
162
+ "type": "fish",
163
+ "name": "大米",
164
+ "price": 700,
165
+ "props": [
166
+ {
167
+ "type": "fish",
168
+ "key": "大傻",
169
+ "value": 10000
170
+ }
171
+ ],
172
+ "description": "Fufu 最爱吃的大米!",
173
+ "can_catch": False,
174
+ "can_buy": True,
175
+ "can_sell": False
176
+ },
177
+ {
178
+ "type": "fish",
179
+ "name": "棒棒糖",
180
+ "price": 50,
181
+ "props": [
182
+ {
183
+ "type": "special_fish",
184
+ "value": 0.5
185
+ },
186
+ {
187
+ "type": "fish",
188
+ "key": "帕秋莉",
189
+ "value": 10
190
+ }
191
+ ],
192
+ "description": "可以吸引到一些奇怪的鱼。",
193
+ "can_catch": False,
194
+ "can_buy": True,
195
+ "can_sell": False
196
+ },
197
+ {
198
+ "type": "fish",
199
+ "name": "传奇棒棒糖",
200
+ "price": 200,
201
+ "props": [
202
+ {
203
+ "type": "special_fish",
204
+ "value": 1
205
+ },
206
+ {
207
+ "type": "no_fish",
208
+ "value": -1
209
+ }
210
+ ],
211
+ "description": "必定钓到特殊鱼。",
212
+ "can_catch": False,
213
+ "can_buy": False,
214
+ "can_sell": False
215
+ }
216
+ ]
217
+
218
+ fishing_achievement: List[Dict] = [
219
+ {
220
+ "type": "fishing_frequency",
221
+ "name": "腥味十足的生意",
222
+ "data": 1,
223
+ "description": "钓到一条鱼。"
224
+ },
225
+ {
226
+ "type": "fishing_frequency",
227
+ "name": "还是钓鱼大佬",
228
+ "data": 100,
229
+ "description": "累计钓鱼一百次。"
230
+ },
231
+ {
232
+ "type": "fish_type",
233
+ "name": "那是鱼吗?",
234
+ "data": "小杂鱼~♡",
235
+ "description": "获得#####。[原文如此]"
236
+ },
237
+ {
238
+ "type": "fish_type",
239
+ "name": "那一晚, 激光鱼和便携式烤炉都喝醉了",
240
+ "data": "烤激光鱼",
241
+ "description": "获得烤激光鱼。"
242
+ },
243
+ {
244
+ "type": "fish_type",
245
+ "name": "你怎么把 Fufu 钓上来了",
246
+ "data": "大傻",
247
+ "description": "获得大傻"
248
+ },
249
+ {
250
+ "type": "fish_type",
251
+ "name": "⑨",
252
+ "data": "琪露诺",
253
+ "description": "发现了湖边的冰之精灵"
254
+ },
255
+ {
256
+ "type": "fish_type",
257
+ "name": "不动的大图书馆",
258
+ "data": "帕秋莉",
259
+ "description": "Neet 姬好不容易出门一次,就被你钓上来了?"
260
+ },
261
+ {
262
+ "type": "fish_type",
263
+ "name": "工欲善其事,必先利其器",
264
+ "data": "钛金鱼竿",
265
+ "description": "在钓鱼用具店购买钛金鱼竿"
266
+ },
267
+ {
268
+ "type": "fish_type",
269
+ "name": "为啥能钓上鱼竿?",
270
+ "data": "附魔鱼竿",
271
+ "description": "钓上附魔鱼竿"
272
+ }
273
+ ]
274
+
275
+ fishing_coin_name: str = "绿宝石" # 货币名称
276
+
277
+ fishing_cooldown_time_min: int = 60 # 钓鱼冷却下限,单位为秒
278
+
279
+ fishing_cooldown_time_max: int = 90 # 钓鱼冷却上限
280
+
281
+ punish_limit: int = 3 # 短时间多次钓鱼后,禁言所需次数,防止刷屏
282
+
283
+ special_fish_enabled: bool = False # 是否启用赛博放生 & 特殊鱼
284
+
285
+ special_fish_price: int = 200 # 特殊鱼出售的价格
286
+
287
+ special_fish_free_price: int = 100 # 特殊鱼放生的价格
288
+
289
+ special_fish_probability: float = 0.01 # 钓上特殊鱼的概率,注意这个判定在空军判定之后
290
+
291
+ no_fish_probability: float = 0.1 # 空军的概率
292
+
293
+ rare_fish_weight: int = 500 # 稀有鱼权重分界线,影响 rare_fish 属性与 normal_fish 属性的区分
294
+
295
+ buy_rate: float = 2.0 # 在不指定 buy_price 时,购买价格/基准价格比,应大于 1
296
+
297
+ backpack_forward: bool = True # 背包是否使用聊天记录
298
+ # fmt:on
299
+
300
+ config = get_plugin_config(Config)
301
+