nonebot-plugin-fishing2 0.0.3__py3-none-any.whl → 0.0.4__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.
- nonebot_plugin_fishing2/__init__.py +281 -110
- nonebot_plugin_fishing2/config.py +144 -39
- nonebot_plugin_fishing2/data_source.py +393 -403
- nonebot_plugin_fishing2/fish_helper.py +157 -0
- nonebot_plugin_fishing2-0.0.4.dist-info/METADATA +168 -0
- {nonebot_plugin_fishing2-0.0.3.dist-info → nonebot_plugin_fishing2-0.0.4.dist-info}/RECORD +9 -8
- {nonebot_plugin_fishing2-0.0.3.dist-info → nonebot_plugin_fishing2-0.0.4.dist-info}/licenses/LICENSE +1 -1
- nonebot_plugin_fishing2-0.0.3.dist-info/METADATA +0 -144
- {nonebot_plugin_fishing2-0.0.3.dist-info → nonebot_plugin_fishing2-0.0.4.dist-info}/WHEEL +0 -0
- {nonebot_plugin_fishing2-0.0.3.dist-info → nonebot_plugin_fishing2-0.0.4.dist-info}/top_level.txt +0 -0
@@ -8,26 +8,28 @@ except ImportError:
|
|
8
8
|
# pydantic v1
|
9
9
|
from nonebot import get_driver
|
10
10
|
|
11
|
-
|
11
|
+
# fmt:off
|
12
12
|
class Config(BaseModel):
|
13
13
|
fishes: List[Dict] = [
|
14
14
|
{
|
15
|
-
"type": "fish",
|
16
|
-
"name": "小鱼",
|
17
|
-
"price":
|
18
|
-
"
|
15
|
+
"type": "fish", # 类型,必填,可用值:fish, item,同类型物品不能同时作为鱼饵
|
16
|
+
"name": "小鱼", # 名称,必填
|
17
|
+
"price": 15, # 基准价格,必填
|
18
|
+
"amount": 1, # 单份数量,模拟耐久
|
19
|
+
"props": [ # 属性,选填,作为鱼饵时改变
|
19
20
|
{
|
20
|
-
"type": "rm_fish",
|
21
|
-
"key": "小鱼"
|
21
|
+
"type": "rm_fish", # 可用值: rare_fish, normal_fish, fish, rm_fish, special_fish, no_fish
|
22
|
+
"key": "小鱼", # 如果为 fish 或 rm_fish,需要填写鱼名
|
23
|
+
"value": 0 # 如果为 rare_fish, normal_fish, fish,填写权重;如果为 special_fish, no_fish,填写概率
|
22
24
|
}
|
23
25
|
],
|
24
|
-
"description": "一条小鱼。把它当做鱼饵可以防止钓到小鱼。",
|
25
|
-
"can_catch": True,
|
26
|
-
"
|
27
|
-
"weight": 1000,
|
28
|
-
"can_buy": True,
|
29
|
-
"
|
30
|
-
"can_sell": True
|
26
|
+
"description": "一条小鱼。把它当做鱼饵可以防止钓到小鱼。", # 描述,必填
|
27
|
+
"can_catch": True, # 是否可以抓取,必填
|
28
|
+
"sleep_time": 2, # 钓上来需要的时间,默认 60
|
29
|
+
"weight": 1000, # 权重
|
30
|
+
"can_buy": True, # 是否可以购买,必填
|
31
|
+
"buy_price": 50, # 购买价格
|
32
|
+
"can_sell": True # 是否可以出售,必填
|
31
33
|
},
|
32
34
|
{
|
33
35
|
"type": "item",
|
@@ -36,7 +38,7 @@ class Config(BaseModel):
|
|
36
38
|
"props": [],
|
37
39
|
"description": "假的。",
|
38
40
|
"can_catch": True,
|
39
|
-
"
|
41
|
+
"sleep_time": 2,
|
40
42
|
"weight": 500,
|
41
43
|
"can_buy": False,
|
42
44
|
"can_sell": True,
|
@@ -48,7 +50,7 @@ class Config(BaseModel):
|
|
48
50
|
"props": [],
|
49
51
|
"description": "杂鱼,杂鱼~",
|
50
52
|
"can_catch": True,
|
51
|
-
"
|
53
|
+
"sleep_time": 10,
|
52
54
|
"weight": 100,
|
53
55
|
"can_buy": False,
|
54
56
|
"can_sell": True
|
@@ -60,7 +62,7 @@ class Config(BaseModel):
|
|
60
62
|
"props": [],
|
61
63
|
"description": "河里为什么会有烤鱼?",
|
62
64
|
"can_catch": True,
|
63
|
-
"
|
65
|
+
"sleep_time": 20,
|
64
66
|
"weight": 20,
|
65
67
|
"can_buy": False,
|
66
68
|
"can_sell": True
|
@@ -72,7 +74,7 @@ class Config(BaseModel):
|
|
72
74
|
"props": [],
|
73
75
|
"description": "邪恶的冰之精灵,是个笨蛋。",
|
74
76
|
"can_catch": True,
|
75
|
-
"
|
77
|
+
"sleep_time": 60,
|
76
78
|
"weight": 20,
|
77
79
|
"can_buy": False,
|
78
80
|
"can_sell": True
|
@@ -84,7 +86,7 @@ class Config(BaseModel):
|
|
84
86
|
"props": [],
|
85
87
|
"description": "非常能吃大米。",
|
86
88
|
"can_catch": True,
|
87
|
-
"
|
89
|
+
"sleep_time": 30,
|
88
90
|
"weight": 10,
|
89
91
|
"can_buy": False,
|
90
92
|
"can_sell": True
|
@@ -96,31 +98,73 @@ class Config(BaseModel):
|
|
96
98
|
"props": [],
|
97
99
|
"description": "Neet姬,非常难在图书馆外见到她。",
|
98
100
|
"can_catch": True,
|
99
|
-
"
|
101
|
+
"sleep_time": 120,
|
100
102
|
"weight": 0,
|
101
103
|
"can_buy": False,
|
102
104
|
"can_sell": True
|
103
105
|
},
|
106
|
+
{
|
107
|
+
"type": "item",
|
108
|
+
"name": "钢制鱼竿",
|
109
|
+
"price": 10,
|
110
|
+
"amount": 30,
|
111
|
+
"props": [
|
112
|
+
{
|
113
|
+
"type": "rare_fish",
|
114
|
+
"value": 5
|
115
|
+
},
|
116
|
+
{
|
117
|
+
"type": "no_fish",
|
118
|
+
"value": 0.05
|
119
|
+
}
|
120
|
+
],
|
121
|
+
"description": "升级的鱼竿,提升钓上大鱼的概率;但是因为偏重,容易空军。",
|
122
|
+
"can_catch": False,
|
123
|
+
"can_buy": True,
|
124
|
+
"can_sell": False
|
125
|
+
},
|
104
126
|
{
|
105
127
|
"type": "item",
|
106
128
|
"name": "钛金鱼竿",
|
107
|
-
"price":
|
129
|
+
"price": 20,
|
130
|
+
"amount": 20,
|
108
131
|
"props": [
|
109
132
|
{
|
110
133
|
"type": "rare_fish",
|
111
134
|
"value": 10
|
112
|
-
}
|
135
|
+
},
|
136
|
+
{
|
137
|
+
"type": "no_fish",
|
138
|
+
"value": -0.05
|
139
|
+
}
|
113
140
|
],
|
114
141
|
"description": "更坚韧的鱼竿,显著提升钓上大鱼的概率。",
|
115
142
|
"can_catch": False,
|
116
143
|
"can_buy": True,
|
117
|
-
"
|
144
|
+
"can_sell": False
|
145
|
+
},
|
146
|
+
{
|
147
|
+
"type": "item",
|
148
|
+
"name": "附魔鱼竿",
|
149
|
+
"price": 35,
|
150
|
+
"amount": 20,
|
151
|
+
"props": [
|
152
|
+
{
|
153
|
+
"type": "normal_fish",
|
154
|
+
"value": -250
|
155
|
+
}
|
156
|
+
],
|
157
|
+
"description": "附魔的鱼竿,大幅减少钓上垃圾的概率。",
|
158
|
+
"can_catch": True,
|
159
|
+
"sleep_time": 30,
|
160
|
+
"weight": 100,
|
161
|
+
"can_buy": False,
|
118
162
|
"can_sell": False
|
119
163
|
},
|
120
164
|
{
|
121
165
|
"type": "fish",
|
122
166
|
"name": "大米",
|
123
|
-
"price":
|
167
|
+
"price": 700,
|
124
168
|
"props": [
|
125
169
|
{
|
126
170
|
"type": "fish",
|
@@ -128,25 +172,52 @@ class Config(BaseModel):
|
|
128
172
|
"value": 10000
|
129
173
|
}
|
130
174
|
],
|
131
|
-
"description": "Fufu
|
175
|
+
"description": "Fufu 最爱吃的大米!",
|
176
|
+
"can_catch": False,
|
177
|
+
"can_buy": True,
|
178
|
+
"can_sell": False
|
179
|
+
},
|
180
|
+
{
|
181
|
+
"type": "fish",
|
182
|
+
"name": "棒棒糖",
|
183
|
+
"price": 50,
|
184
|
+
"props": [
|
185
|
+
{
|
186
|
+
"type": "special_fish",
|
187
|
+
"value": 0.5
|
188
|
+
},
|
189
|
+
{
|
190
|
+
"type": "fish",
|
191
|
+
"key": "帕秋莉",
|
192
|
+
"value": 10
|
193
|
+
}
|
194
|
+
],
|
195
|
+
"description": "可以吸引到一些奇怪的鱼。",
|
196
|
+
"can_catch": False,
|
197
|
+
"can_buy": True,
|
198
|
+
"can_sell": False
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"type": "fish",
|
202
|
+
"name": "传奇棒棒糖",
|
203
|
+
"price": 200,
|
204
|
+
"props": [
|
205
|
+
{
|
206
|
+
"type": "special_fish",
|
207
|
+
"value": 1
|
208
|
+
},
|
209
|
+
{
|
210
|
+
"type": "no_fish",
|
211
|
+
"value": -1
|
212
|
+
}
|
213
|
+
],
|
214
|
+
"description": "必定钓到特殊鱼。这是个管理员物品",
|
132
215
|
"can_catch": False,
|
133
216
|
"can_buy": False,
|
134
217
|
"can_sell": False
|
135
218
|
}
|
136
219
|
]
|
137
|
-
|
138
|
-
punish_limit: int = 3
|
139
|
-
|
140
|
-
fishing_limit: int = 60
|
141
|
-
|
142
|
-
fishing_coin_name: str = "绿宝石" # It means Fishing Coin.
|
143
|
-
|
144
|
-
special_fish_enabled: bool = True
|
145
|
-
|
146
|
-
special_fish_price: int = 200
|
147
|
-
|
148
|
-
special_fish_probability: float = 0.01
|
149
|
-
|
220
|
+
|
150
221
|
fishing_achievement: List[Dict] = [
|
151
222
|
{
|
152
223
|
"type": "fishing_frequency",
|
@@ -189,13 +260,47 @@ class Config(BaseModel):
|
|
189
260
|
"name": "不动的大图书馆",
|
190
261
|
"data": "帕秋莉",
|
191
262
|
"description": "Neet 姬好不容易出门一次,就被你钓上来了?"
|
263
|
+
},
|
264
|
+
{
|
265
|
+
"type": "fish_type",
|
266
|
+
"name": "工欲善其事,必先利其器",
|
267
|
+
"data": "钛金鱼竿",
|
268
|
+
"description": "在钓鱼用具店购买钛金鱼竿"
|
269
|
+
},
|
270
|
+
{
|
271
|
+
"type": "fish_type",
|
272
|
+
"name": "为啥能钓上鱼竿?",
|
273
|
+
"data": "附魔鱼竿",
|
274
|
+
"description": "钓上附魔鱼竿"
|
192
275
|
}
|
193
276
|
]
|
194
277
|
|
278
|
+
fishing_coin_name: str = "绿宝石" # 货币名称
|
279
|
+
|
280
|
+
fishing_limit: int = 60 # 每次钓鱼后,限制钓鱼的秒数
|
281
|
+
|
282
|
+
punish_limit: int = 3 # 短时间多次钓鱼后,禁言所需次数,防止刷屏
|
283
|
+
|
284
|
+
special_fish_enabled: bool = False # 是否启用赛博放生 & 特殊鱼
|
285
|
+
|
286
|
+
special_fish_price: int = 200 # 特殊鱼出售的价格
|
287
|
+
|
288
|
+
special_fish_free_price: int = 100 # 特殊鱼放生的价格
|
289
|
+
|
290
|
+
special_fish_probability: float = 0.01 # 钓上特殊鱼的概率,注意这个判定在空军判定之后
|
291
|
+
|
292
|
+
no_fish_probability: float = 0.1 # 空军的概率
|
293
|
+
|
294
|
+
rare_fish_weight: int = 500 # 稀有鱼权重分界线,影响 rare_fish 属性与 normal_fish 属性的区分
|
295
|
+
|
296
|
+
buy_rate: float = 2.0 # 在不指定 buy_price 时,购买价格/基准价格比,应大于 1
|
297
|
+
|
298
|
+
backpack_forward: bool = True # 背包是否使用聊天记录
|
299
|
+
# fmt:on
|
195
300
|
|
196
301
|
try:
|
197
302
|
# pydantic v2
|
198
303
|
config = get_plugin_config(Config)
|
199
304
|
except:
|
200
305
|
# pydantic v1
|
201
|
-
config = Config.parse_obj(get_driver().config)
|
306
|
+
config = Config.parse_obj(get_driver().config)
|