Skip to main content

更好的电子钓鱼

Project description

logo

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_cooldown_time_min 钓鱼冷却下限,单位为秒
fishing_cooldown_time_max 钓鱼冷却上限
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等帮助插件查看。管理员指令默认隐藏,只能由 SUPERUSER 发送“钓鱼帮助”查看。

赛博放生

当用户使用货币放生由自己取名的一条鱼后,每个用户在钓鱼时都有机会钓到那一条鱼。但此功能开关 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-1.0.2.tar.gz (21.2 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-1.0.2-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_fishing2-1.0.2.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nonebot_plugin_fishing2-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ee1211ce07be0385186a8084072afc7c133578319b642d1bc3724612a77c8c85
MD5 a2354e195f672cfb6714ac4283120b73
BLAKE2b-256 aaa19a0b289ffcade8ff92b6d61ab724f1b8d8e42e018a01ca0ac72715c97085

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_fishing2-1.0.2.tar.gz:

Publisher: pypi-publish.yml on GLDYM/nonebot-plugin-fishing2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_fishing2-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 923954bb9b887207086f779f3d9c57727485d7ab19e371abaad3ecb23ab2907d
MD5 cc8433efc08cbae0e7a5ea623f32611f
BLAKE2b-256 1c0f7704c54504918a48770d148f90be9ad0a2c2a81d523f3b10ddf90eadc12d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_fishing2-1.0.2-py3-none-any.whl:

Publisher: pypi-publish.yml on GLDYM/nonebot-plugin-fishing2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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