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.
@@ -0,0 +1,157 @@
1
+ from typing import Literal, Optional, Union
2
+
3
+ from nonebot.adapters.onebot.v11 import MessageSegment
4
+
5
+ from .config import config
6
+
7
+
8
+ class Achievement:
9
+ type: Literal["fishing_frequency", "fish_type"] = None
10
+ name: str = None
11
+ data: Union[str, int] = (None,)
12
+ description: int = None
13
+
14
+ def __init__(self, achievemrnt: dict):
15
+ self.type = achievemrnt["type"]
16
+ self.name = achievemrnt["name"]
17
+ self.data = achievemrnt["data"]
18
+ self.description = achievemrnt["description"]
19
+
20
+
21
+ class Property:
22
+ type: Literal[
23
+ "rare_fish", "normal_fish", "fish", "rm_fish", "special_fish", "no_fish"
24
+ ] = None
25
+ key: Optional[str] = None
26
+ value: Optional[int] = None
27
+
28
+ def __init__(self, property: dict):
29
+ self.type = property["type"]
30
+ self.key = property["key"] if property.get("key") else None
31
+ self.value = property["value"] if property.get("value") else None
32
+
33
+ # fmt:off
34
+ def __str__(self) -> str:
35
+ match self.type:
36
+ case "normal_fish":
37
+ result = f"普通鱼权重{'增加' if self.value > 0 else '减少'}{abs(self.value)}"
38
+ case "rare_fish":
39
+ result = f"稀有鱼权重{'增加' if self.value > 0 else '减少'}{abs(self.value)}"
40
+ case "fish":
41
+ result = f"{self.key}权重{'增加' if self.value > 0 else '减少'}{abs(self.value)}"
42
+ case "rm_fish":
43
+ result = f"不会钓到{self.key}\n"
44
+ case "special_fish":
45
+ result = f"特殊鱼概率{'增加' if self.value > 0 else '减少'}{abs(self.value)}"
46
+ case "no_fish":
47
+ result = f"空军概率{'增加' if self.value > 0 else '减少'}{abs(self.value)}"
48
+ case _:
49
+ pass
50
+ return result
51
+ # fmt:on
52
+
53
+
54
+ class Fish:
55
+ type: Literal["fish", "item"] = "fish"
56
+ name: str = ""
57
+ price: int = 0
58
+ props: list[Property] = []
59
+ description: str = ""
60
+ can_catch: bool = False
61
+ sleep_time: Optional[int] = 0
62
+ weight: Optional[int] = 0
63
+ can_buy: bool = False
64
+ buy_price: Optional[int] = 0
65
+ amount: Optional[int] = 0
66
+ can_sell: bool = False
67
+
68
+ def __init__(self, fish_dict: dict):
69
+ self.type = fish_dict["type"] if fish_dict.get("type") else "fish"
70
+ self.name = fish_dict["name"] # 鱼名字都不填,搁着虚空造鱼呢?
71
+ self.price = fish_dict["price"] if fish_dict.get("price") else 15
72
+ self.amount = fish_dict["amount"] if fish_dict.get("amount") else 1
73
+ self.description = (
74
+ fish_dict["description"]
75
+ if fish_dict.get("description")
76
+ else "没有人知道这条鱼的信息。"
77
+ )
78
+ self.can_catch = fish_dict["can_catch"]
79
+ self.can_buy = fish_dict["can_buy"]
80
+ self.can_sell = fish_dict["can_sell"]
81
+
82
+ self.sleep_time = fish_dict["sleep_time"] if fish_dict.get("sleep_time") else 60
83
+ self.weight = fish_dict["weight"] if fish_dict.get("weight") else 0
84
+
85
+ self.buy_price = (
86
+ fish_dict["buy_price"]
87
+ if fish_dict.get("buy_price")
88
+ else int(fish_dict["price"] * config.buy_rate)
89
+ )
90
+
91
+ self.props = []
92
+ if fish_dict.get("props") and fish_dict["props"] != []:
93
+ for property in fish_dict["props"]:
94
+ self.props.append(Property(property))
95
+
96
+ def print_info(self) -> list[MessageSegment]:
97
+ message = []
98
+
99
+ message1 = ""
100
+ message1 += f"▶ 名称:{self.name}\n"
101
+ message1 += f"▶ 基准价格:{self.price} {fishing_coin_name}\n"
102
+ message1 += f"▶ 单份数量:{self.amount}\n"
103
+ message1 += f"▶ 描述:{self.description}\n"
104
+ message1 += f'▶ {"可钓鱼获取" if self.can_catch else "不可钓鱼获取"},'
105
+ message1 += f'{"可购买" if self.can_buy else "不可购买"},'
106
+ message1 += f'{"可出售" if self.can_sell else "不可出售"}'
107
+ message.append(MessageSegment.text(message1))
108
+ if self.can_catch:
109
+ message2 = ""
110
+ message2 += f"▶ 钓鱼信息:\n"
111
+ message2 += f" ▷ 基础权重:{self.weight},"
112
+ message2 += f"上钩时间:{self.sleep_time}s"
113
+ message.append(MessageSegment.text(message2))
114
+ if self.can_buy:
115
+ message3 = ""
116
+ message3 += f"▶ 商店信息:\n"
117
+ message3 += f" ▷ 购买价格:{self.buy_price}\n"
118
+ message.append(MessageSegment.text(message3))
119
+ if self.props != []:
120
+ message4 = ""
121
+ message4 += f"▶ 道具信息:\n"
122
+ message4 += f' ▷ 道具类型:{"鱼饵" if self.type == "fish" else "道具"}\n'
123
+ message4 += self.print_props()
124
+ message.append(MessageSegment.text(message4))
125
+ return message
126
+
127
+ def print_props(self) -> str:
128
+ result = " ▷ 道具效果:\n"
129
+ for i in range(len(self.props)):
130
+ prop = self.props[i]
131
+ result += (
132
+ f" {i + 1}. {str(prop)}"
133
+ if i == len(self.props) - 1
134
+ else f" {i + 1}. {str(prop)}\n"
135
+ )
136
+ return result
137
+
138
+
139
+ # Constants
140
+ fishing_coin_name = config.fishing_coin_name
141
+ config_fishes: list[Fish] = [Fish(fish_dict) for fish_dict in config.fishes]
142
+ config_achievements = [
143
+ Achievement(achievement_dict) for achievement_dict in config.fishing_achievement
144
+ ]
145
+
146
+ fish_list: list[str] = [fish.name for fish in config_fishes]
147
+ can_catch_fishes = {fish.name: fish.weight for fish in config_fishes if fish.can_catch}
148
+ can_buy_fishes = [fish.name for fish in config_fishes if fish.can_buy]
149
+ can_sell_fishes = [fish.name for fish in config_fishes if fish.can_sell]
150
+
151
+
152
+ def get_fish_by_name(fish_name: str) -> Fish | None:
153
+ for fish in config_fishes:
154
+ if fish.name == fish_name:
155
+ return fish
156
+
157
+ return None
@@ -0,0 +1,168 @@
1
+ Metadata-Version: 2.4
2
+ Name: nonebot-plugin-fishing2
3
+ Version: 0.0.4
4
+ Summary: 更好的电子钓鱼
5
+ Author-email: ALittleBot <160833462+C14H22O@users.noreply.github.com>, Polaris_Light <995905922@qq.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/FDCraft/nonebot-plugin-fishing2
8
+ Keywords: fishing
9
+ Requires-Python: >=3.8
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: nonebot2>=2.2.1
13
+ Requires-Dist: nonebot-adapter-onebot>=2.0.0-beta.1
14
+ Requires-Dist: pydantic>=1.10
15
+ Requires-Dist: nonebot-plugin-localstore>=0.6.0
16
+ Requires-Dist: sqlalchemy>=2.0.27
17
+ Requires-Dist: aiosqlite>=0.20.0
18
+ Requires-Dist: nonebot-plugin-orm>=0.7.1
19
+ Dynamic: license-file
20
+
21
+ <div align="center">
22
+ <a href="https://v2.nonebot.dev/store"><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
23
+ <br>
24
+ <p><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
25
+ </div>
26
+
27
+ <div align="center">
28
+
29
+ # nonebot-plugin-fishing2
30
+
31
+ _✨ 更好的电子钓鱼 ✨_
32
+
33
+ <a href="./LICENSE">
34
+ <img src="https://img.shields.io/github/license/FDCraft/nonebot-plugin-fishing2.svg" alt="license">
35
+ </a>
36
+ <a href="https://pypi.python.org/pypi/nonebot-plugin-fishing2">
37
+ <img src="https://img.shields.io/pypi/v/nonebot-plugin-fishing2.svg" alt="pypi">
38
+ </a>
39
+ <img src="https://img.shields.io/badge/python-3.8+-blue.svg" alt="python">
40
+
41
+ </div>
42
+
43
+ ## 💿 安装
44
+
45
+ <details open>
46
+ <summary>使用 nb-cli 安装</summary>
47
+ 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
48
+
49
+ nb plugin install nonebot-plugin-fishing2
50
+
51
+ </details>
52
+
53
+ <details>
54
+ <summary>使用包管理器安装</summary>
55
+ 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
56
+
57
+ <details>
58
+ <summary>pip</summary>
59
+
60
+ pip install nonebot-plugin-fishing2
61
+ </details>
62
+ <details>
63
+ <summary>pdm</summary>
64
+
65
+ pdm add nonebot-plugin-fishing2
66
+ </details>
67
+ <details>
68
+ <summary>poetry</summary>
69
+
70
+ poetry add nonebot-plugin-fishing2
71
+ </details>
72
+ <details>
73
+ <summary>conda</summary>
74
+
75
+ conda install nonebot-plugin-fishing2
76
+ </details>
77
+
78
+ 打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
79
+
80
+ plugins = ["nonebot_plugin_fishing2"]
81
+
82
+ </details>
83
+
84
+ 注意:安装过后,需在控制台输入 `nb orm upgrade` 指令以初始化数据库。本插件数据库与 [Nonebot-plugin-fishing](https://github.com/ALittleBot/nonebot-plugin-fishing) 通用,可以互换。
85
+
86
+ ## ⚙️ 配置
87
+
88
+ 在 nonebot2 项目的`.env`文件中添加下表中的配置
89
+
90
+ | 配置项 | 必填 | 说明 |
91
+ |:------------------------:|:----:|:--------------------------------------------------------------:|
92
+ | fishes | 否 | 配置鱼塘内的普通鱼(大概是鱼……) |
93
+ | fishing_achievement | 否 | 配置钓鱼成就 |
94
+ | fishing_coin_name | 否 | 填入卖鱼获取的货币名称 |
95
+ | fishing_limit | 否 | 填入每次钓鱼后,限制钓鱼的秒数 |
96
+ | punish_limit | 否 | 短时间多次钓鱼后,禁言所需次数,防止刷屏 |
97
+ | special_fish_enabled | 否 | 是否启用赛博放生 & 特殊鱼(默认为否) |
98
+ | special_fish_price | 否 | 特殊鱼出售的价格 |
99
+ | special_fish_free_price | 否 | 特殊鱼放生的价格 |
100
+ | special_fish_probability | 否 | 钓上特殊鱼的概率,注意这个判定在空军判定之后 |
101
+ | no_fish_probability | 否 | 空军的概率 |
102
+ | rare_fish_weight | 否 | 稀有鱼权重分界线,影响 rare_fish 属性与 normal_fish 属性的区分 |
103
+ | buy_rate | 否 | 在不指定 buy_price 时,购买价格/基准价格比,应大于 1 |
104
+ | backpack_forward | 否 | 背包是否使用聊天记录 |
105
+
106
+ 其中 `fishes` 配置项说明如下。预设配置经过了计算以平衡,如果需要自行填表,请使用“钓鱼预测”命令进行预测。
107
+
108
+ ```dotenv
109
+ FISHES='
110
+ [
111
+ {
112
+ "type": "fish", # 类型,必填,可用值:fish, item,同类型物品不能同时作为鱼饵
113
+ "name": "小鱼", # 名称,必填
114
+ "price": 15, # 基准价格,必填
115
+ "amount": 1, # 单份数量,模拟耐久
116
+ "props": [ # 属性,选填,作为鱼饵时改变
117
+ {
118
+ "type": "rm_fish", # 可用值: rare_fish, normal_fish, fish, rm_fish, special_fish, no_fish
119
+ "key": "小鱼", # 如果为 fish 或 rm_fish,需要填写鱼名
120
+ "value": 0 # 如果为 rare_fish, normal_fish, fish,填写权重;如果为 special_fish, no_fish,填写概率
121
+ }
122
+ ],
123
+ "description": "一条小鱼。把它当做鱼饵可以防止钓到小鱼。", # 描述,必填
124
+ "can_catch": True, # 是否可以抓取,必填
125
+ "sleep_time": 2, # 钓上来需要的时间,默认 60
126
+ "weight": 1000, # 权重
127
+ "can_buy": True, # 是否可以购买,必填
128
+ "buy_price": 50, # 购买价格
129
+ "can_sell": True # 是否可以出售,必填
130
+ },
131
+ ]
132
+ '
133
+ ```
134
+
135
+ ## 🔨 更新
136
+
137
+ 每一次更新后,需执行 `nb orm upgrade`。
138
+
139
+ ## 🎉 使用
140
+
141
+ ### 指令表
142
+
143
+ 在群聊或私聊发送“钓鱼帮助”查看本插件的帮助,或者使用[NoneBot-Plugin-PicMenu-Next](https://github.com/lgc-NB2Dev/nonebot-plugin-picmenu-next)等帮助插件查看。
144
+
145
+ ### 管理员指令表
146
+
147
+ | 指令 | 范围 | 说明 |
148
+ |:--------:|:----:|:----------------------------------------------:|
149
+ | 钓鱼预测 | 所有 | 对钓鱼进行模拟,查看各鱼的概率与期望,便于填表 |
150
+ | 鱼池 | 所有 | 查看数据库里面的所有特殊鱼 |
151
+
152
+ ### 赛博放生
153
+
154
+ 当用户使用货币放生由自己取名的一条鱼后,每个用户在钓鱼时都有机会钓到那一条鱼。但此功能开关 `special_fish_enabled` 默认关闭,原因是用户生成内容如果不符合规范,可能导致出现不可预料的情况,请谨慎开启。
155
+
156
+ ## 📝 Todo
157
+
158
+ - [x] 重写数据库逻辑(改为使用 [nonebot/plugin-orm](https://github.com/nonebot/plugin-orm))
159
+ - [x] 增加系统商店,卖出钓到的鱼
160
+ - [x] 赛博放生 [#4](https://github.com/C14H22O/nonebot-plugin-fishing/issues/4) (已基本完成)
161
+ - [ ] ~~使用 [nonebot_plugin_chikari_economy](https://github.com/mrqx0195/nonebot_plugin_chikari_economy) 经济系统~~
162
+ - [x] 为鱼竿增加耐久度,耐久度为0时需重新购买鱼竿
163
+ - [x] 为钓鱼背包添加排序
164
+ - [x] 添加成就系统
165
+ - [x] 买装备!
166
+ - [ ] 支持卖与普通鱼同名的特殊鱼
167
+ - [ ] 管理员命令:捞鱼
168
+ - [ ] 屏蔽词库
@@ -1,14 +1,15 @@
1
- nonebot_plugin_fishing2/__init__.py,sha256=i2tmiGGJ4XUOCwi01tyU092Us1Uw-Trp05hg3rXDMbQ,11607
2
- nonebot_plugin_fishing2/config.py,sha256=0eTa7GUt9yUiSS2yLCeo8BEteVWh3Zj3d7utvSEPbFw,5698
3
- nonebot_plugin_fishing2/data_source.py,sha256=UkcJzCYu1JMYneCYrL4ZqftuAlfPG7bdiXprl5Q_Le0,31357
1
+ nonebot_plugin_fishing2/__init__.py,sha256=69eM0yZaNrksVda9zWygA5JBr2gAua-mBugdLWVNHgg,16507
2
+ nonebot_plugin_fishing2/config.py,sha256=FWrOFQXv-W7VAB8T0zN4Elm_fRycUpGua8Ee9ABPSG4,9882
3
+ nonebot_plugin_fishing2/data_source.py,sha256=A1gWZFqBh1Exmmpy6RVXw9SvdPkWNcmdjCNaxbH-QGE,29791
4
+ nonebot_plugin_fishing2/fish_helper.py,sha256=Rf3SX4UcM0-E6apLUbHB40I4onK-8qPZmZrsVBMnZ3I,6054
4
5
  nonebot_plugin_fishing2/model.py,sha256=_DtmxiQhJDiIvY1XOMQZ0HA-ruWY0bexWX9frdhnk0Q,752
5
6
  nonebot_plugin_fishing2/migrations/68463f3e5f33_.py,sha256=WnaV5T1uCHvYWcnepHqV9kOurDYddFUvXXfA2Rtd5Ok,776
6
7
  nonebot_plugin_fishing2/migrations/7609e6d106dd_init_db.py,sha256=tpuIfsS6yPsnGIeMPo16exsEfYZ_urgYAqlCyQ8aw-Y,1386
7
8
  nonebot_plugin_fishing2/migrations/c5ab992c9af3_add_achievements.py,sha256=KVj9ADeP03zfW4ZBDmnghbWdxLor3u1yKeho0GaddCI,1119
8
9
  nonebot_plugin_fishing2/migrations/e9015df43907_add_special_fishes_field.py,sha256=R4p9vPD5lgg4vmY2KUgF2qIlraxhPYkL93lM5l7wMZw,1094
9
10
  nonebot_plugin_fishing2/migrations/f70bdeaec7a4_add_specialfishes_table.py,sha256=DUqv9MTaOSZCBj_9oT2eY3pmWeMnyH0cPj9GyYa5Sag,1194
10
- nonebot_plugin_fishing2-0.0.3.dist-info/licenses/LICENSE,sha256=yuLTg7OdKnH7rznCsJ31UJwI4B8_oEP4f_zE7bJS75w,1091
11
- nonebot_plugin_fishing2-0.0.3.dist-info/METADATA,sha256=dYqboVGyAKQOhG9ZmVgaEVaG3Tf-ss9ezd6sqSPaQRU,4667
12
- nonebot_plugin_fishing2-0.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
- nonebot_plugin_fishing2-0.0.3.dist-info/top_level.txt,sha256=nSgqw96Nh44l966KEYkw0rbdyEJyzi2V7jCZ1kCZIps,24
14
- nonebot_plugin_fishing2-0.0.3.dist-info/RECORD,,
11
+ nonebot_plugin_fishing2-0.0.4.dist-info/licenses/LICENSE,sha256=n-2xoOXX434-tBisMKX2-_FycV2VrmIiTP1rZvuW_fY,1091
12
+ nonebot_plugin_fishing2-0.0.4.dist-info/METADATA,sha256=eEqw2ELRV8AHohuC-eMe2YxM-5OZptummJKA4Ky9QD4,7541
13
+ nonebot_plugin_fishing2-0.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
+ nonebot_plugin_fishing2-0.0.4.dist-info/top_level.txt,sha256=nSgqw96Nh44l966KEYkw0rbdyEJyzi2V7jCZ1kCZIps,24
15
+ nonebot_plugin_fishing2-0.0.4.dist-info/RECORD,,
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Polaris_Light
3
+ Copyright (c) 2025 Polaris_Light
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,144 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: nonebot-plugin-fishing2
3
- Version: 0.0.3
4
- Summary: 更好的电子钓鱼
5
- Author-email: ALittleBot <160833462+C14H22O@users.noreply.github.com>, Polaris_Light <995905922@qq.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/FDCraft/nonebot-plugin-fishing2
8
- Keywords: fishing
9
- Requires-Python: >=3.8
10
- Description-Content-Type: text/markdown
11
- License-File: LICENSE
12
- Requires-Dist: nonebot2>=2.2.1
13
- Requires-Dist: nonebot-adapter-onebot>=2.0.0-beta.1
14
- Requires-Dist: pydantic>=1.10
15
- Requires-Dist: nonebot-plugin-localstore>=0.6.0
16
- Requires-Dist: sqlalchemy>=2.0.27
17
- Requires-Dist: aiosqlite>=0.20.0
18
- Requires-Dist: nonebot-plugin-orm>=0.7.1
19
- Dynamic: license-file
20
-
21
- <div align="center">
22
- <a href="https://v2.nonebot.dev/store"><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/nbp_logo.png" width="180" height="180" alt="NoneBotPluginLogo"></a>
23
- <br>
24
- <p><img src="https://github.com/A-kirami/nonebot-plugin-template/blob/resources/NoneBotPlugin.svg" width="240" alt="NoneBotPluginText"></p>
25
- </div>
26
-
27
- <div align="center">
28
-
29
- # nonebot-plugin-fishing2
30
-
31
- _✨ 更好的电子钓鱼 ✨_
32
-
33
- <a href="./LICENSE">
34
- <img src="https://img.shields.io/github/license/FDCraft/nonebot-plugin-fishing2.svg" alt="license">
35
- </a>
36
- <a href="https://pypi.python.org/pypi/nonebot-plugin-fishing2">
37
- <img src="https://img.shields.io/pypi/v/nonebot-plugin-fishing2.svg" alt="pypi">
38
- </a>
39
- <img src="https://img.shields.io/badge/python-3.8+-blue.svg" alt="python">
40
-
41
- </div>
42
-
43
- ## 💿 安装
44
-
45
- <details open>
46
- <summary>使用 nb-cli 安装</summary>
47
- 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
48
-
49
- nb plugin install nonebot-plugin-fishing2
50
-
51
- </details>
52
-
53
- <details>
54
- <summary>使用包管理器安装</summary>
55
- 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
56
-
57
- <details>
58
- <summary>pip</summary>
59
-
60
- pip install nonebot-plugin-fishing2
61
- </details>
62
- <details>
63
- <summary>pdm</summary>
64
-
65
- pdm add nonebot-plugin-fishing2
66
- </details>
67
- <details>
68
- <summary>poetry</summary>
69
-
70
- poetry add nonebot-plugin-fishing2
71
- </details>
72
- <details>
73
- <summary>conda</summary>
74
-
75
- conda install nonebot-plugin-fishing2
76
- </details>
77
-
78
- 打开 nonebot2 项目根目录下的 `pyproject.toml` 文件, 在 `[tool.nonebot]` 部分追加写入
79
-
80
- plugins = ["nonebot_plugin_fishing2"]
81
-
82
- </details>
83
-
84
- 注意:安装过后,需在控制台输入 `nb orm upgrade` 指令以初始化数据库。
85
-
86
- ## ⚙️ 配置
87
-
88
- 在 nonebot2 项目的`.env`文件中添加下表中的必填配置
89
-
90
- | 配置项 | 必填 | 说明 |
91
- |:-----:|:----:|:----:|
92
- | fishes | 否 | 配置鱼塘内鱼们的名称、权重、等待时间和价格 |
93
- | fishing_limit | 否 | 填入每次钓鱼后,限制钓鱼的秒数 |
94
- | fishing_coin_name | 否 | 填入卖鱼获取的货币名称 |
95
- | special_fish_enabled | 否 | 是否启用赛博放生功能(默认为否) |
96
- | special_fish_price | 否 | 每放生一次所需的货币数量 |
97
- | special_fish_probability | 否 | 钓鱼时钓到用户放生的鱼的概率 |
98
-
99
- 其中 `fishes` 配置项说明如下:
100
-
101
- ```dotenv
102
- FISHES='
103
- [
104
- {
105
- "name": "小鱼", # 鱼的名称
106
- "frequency": 2, # 鱼上钩的时间
107
- "weight": 100, # 权重
108
- "price": 2 # 价格
109
- }
110
- ]
111
- '
112
- ```
113
-
114
- ## 🔨 更新
115
-
116
- 每一次更新后,需执行 `nb orm upgrade`。
117
-
118
- ## 🎉 使用
119
-
120
- ### 指令表
121
- | 指令 | 范围 | 说明 |
122
- |:-----:|:----:|:----:|
123
- | 钓鱼 | 所有 | 放下鱼竿 |
124
- | 卖鱼 | 所有 | 获取货币 |
125
- | 放生 | 所有 | 赛博放生 |
126
- | 祈愿 | 所有 | 向神祈愿 |
127
- | 背包 | 所有 | 查看背包 |
128
- | 成就 | 所有 | 查看成就 |
129
- | 排行榜 | 所有 | 富翁排行 |
130
-
131
- ### 赛博放生
132
-
133
- 当用户使用货币放生由自己取名的一条鱼后,每个用户在钓鱼时都有机会钓到那一条鱼。但此功能开关 `special_fish_enabled` 默认关闭,原因是用户生成内容如果不符合规范,可能导致出现不可预料的情况,请谨慎开启。
134
-
135
-
136
- ## 📝 Todo
137
-
138
- - [x] 重写数据库逻辑(改为使用 [nonebot/plugin-orm](https://github.com/nonebot/plugin-orm))
139
- - [x] 增加系统商店,卖出钓到的鱼们
140
- - [x] 赛博放生 [#4](https://github.com/C14H22O/nonebot-plugin-fishing/issues/4) (已基本完成)
141
- - [ ] 使用 [nonebot_plugin_chikari_economy](https://github.com/mrqx0195/nonebot_plugin_chikari_economy) 经济系统
142
- - [x] 为鱼竿增加耐久度,耐久度为0时需重新购买鱼竿
143
- - [ ] 为钓鱼背包添加排序
144
- - [x] 添加成就系统