Skip to main content

更好的电子钓鱼

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-fishing2

✨ 更好的电子钓鱼 ✨

license pypi python

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-fishing2
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-fishing2
pdm
pdm add nonebot-plugin-fishing2
poetry
poetry add nonebot-plugin-fishing2
conda
conda install nonebot-plugin-fishing2

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_fishing2"]

注意:安装过后,需在控制台输入 nb orm upgrade 指令以初始化数据库。本插件数据库与 Nonebot-plugin-fishing 通用,可以互换。

⚙️ 配置

在 nonebot2 项目的.env文件中添加下表中的配置

配置项 必填 说明
fishes 配置鱼塘内的普通鱼(大概是鱼……)
fishing_achievement 配置钓鱼成就
fishing_coin_name 填入卖鱼获取的货币名称
fishing_limit 填入每次钓鱼后,限制钓鱼的秒数
punish_limit 短时间多次钓鱼后,禁言所需次数,防止刷屏
special_fish_enabled 是否启用赛博放生 & 特殊鱼(默认为否)
special_fish_price 特殊鱼出售的价格
special_fish_free_price 特殊鱼放生的价格
special_fish_probability 钓上特殊鱼的概率,注意这个判定在空军判定之后
no_fish_probability 空军的概率
rare_fish_weight 稀有鱼权重分界线,影响 rare_fish 属性与 normal_fish 属性的区分
buy_rate 在不指定 buy_price 时,购买价格/基准价格比,应大于 1
backpack_forward 背包是否使用聊天记录

其中 fishes 配置项说明如下。预设配置经过了计算以平衡,如果需要自行填表,请使用“钓鱼预测”命令进行预测。

FISHES='
    [
        {
            "type": "fish", # 类型,必填,可用值:fish, item,同类型物品不能同时作为鱼饵
            "name": "小鱼", # 名称,必填
            "price": 15, # 基准价格,必填
            "amount": 1, # 单份数量,模拟耐久
            "props": [ # 属性,选填,作为鱼饵时改变
                {
                    "type": "rm_fish", # 可用值: rare_fish, normal_fish, fish, rm_fish, special_fish, no_fish
                    "key": "小鱼", # 如果为 fish 或 rm_fish,需要填写鱼名
                    "value": 0 # 如果为 rare_fish, normal_fish, fish,填写权重;如果为 special_fish, no_fish,填写概率
                }
            ],
            "description": "一条小鱼。把它当做鱼饵可以防止钓到小鱼。", # 描述,必填
            "can_catch": True, # 是否可以抓取,必填
            "sleep_time": 2, # 钓上来需要的时间,默认 60
            "weight": 1000, # 权重
            "can_buy": True, # 是否可以购买,必填
            "buy_price": 50, # 购买价格
            "can_sell": True # 是否可以出售,必填
        },
    ]
'

🔨 更新

每一次更新后,需执行 nb orm upgrade

🎉 使用

指令表

在群聊或私聊发送“钓鱼帮助”查看本插件的帮助,或者使用NoneBot-Plugin-PicMenu-Next等帮助插件查看。

管理员指令表

指令 范围 说明
钓鱼预测 所有 对钓鱼进行模拟,查看各鱼的概率与期望,便于填表
鱼池 所有 查看数据库里面的所有特殊鱼

赛博放生

当用户使用货币放生由自己取名的一条鱼后,每个用户在钓鱼时都有机会钓到那一条鱼。但此功能开关 special_fish_enabled 默认关闭,原因是用户生成内容如果不符合规范,可能导致出现不可预料的情况,请谨慎开启。

📝 Todo

  • 重写数据库逻辑(改为使用 nonebot/plugin-orm
  • 增加系统商店,卖出钓到的鱼
  • 赛博放生 #4 (已基本完成)
  • 使用 nonebot_plugin_chikari_economy 经济系统
  • 为鱼竿增加耐久度,耐久度为0时需重新购买鱼竿
  • 为钓鱼背包添加排序
  • 添加成就系统
  • 买装备!
  • 支持卖与普通鱼同名的特殊鱼
  • 管理员命令:捞鱼
  • 屏蔽词库

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_fishing2-0.0.4.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_fishing2-0.0.4-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_fishing2-0.0.4.tar.gz.

File metadata

  • Download URL: nonebot_plugin_fishing2-0.0.4.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for nonebot_plugin_fishing2-0.0.4.tar.gz
Algorithm Hash digest
SHA256 a08d0aabf77ab58e0eea2d596c9a699f697076fac9f82eefa096e2e4ab95f6ce
MD5 6fc5fe9f5df9aa05d5fe6794bae14e21
BLAKE2b-256 281265a60f9ee1fe81b2882413e1966bb3d9bf10741a66077a7db13f4471df9b

See more details on using hashes here.

File details

Details for the file nonebot_plugin_fishing2-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_fishing2-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e96000980fbd4c5b639df2c8d3aa6bdf9a752078ee24eb37d5f16ee1c23273f4
MD5 a5d4e6c090275a69959e54bb3ad71999
BLAKE2b-256 947215ec1af71c5eff4d132f736ad5d51834033536e8a5a1a028db7b4e695c03

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page