Skip to content

Commit

Permalink
增加kokomi原神面板
Browse files Browse the repository at this point in the history
  • Loading branch information
shiki88 committed Sep 1, 2023
1 parent c01c604 commit 684bbca
Show file tree
Hide file tree
Showing 150 changed files with 5,811 additions and 10,193 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ import (
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/jptingroom" // 日语听力学习材料
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/juejuezi" // 绝绝子生成器
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/kfccrazythursday" // 疯狂星期四
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/kokomi" // kokomi原神面板
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/lolicon" // lolicon 随机图片
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/magicprompt" // magicprompt吟唱提示
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/midicreate" // 简易midi音乐制作
Expand Down Expand Up @@ -151,7 +152,6 @@ import (
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/wordle" // 猜单词
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/ygo" // 游戏王相关插件
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/ymgal" // 月幕galgame
_ "github.com/FloatTech/ZeroBot-Plugin/plugin/kokomi" // kokomi原神面板

// _ "github.com/FloatTech/ZeroBot-Plugin/plugin/wtf" // 鬼东西

Expand Down
15 changes: 0 additions & 15 deletions plugin/kokomi/.gitignore

This file was deleted.

30 changes: 15 additions & 15 deletions plugin/kokomi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ kokomi是一个ZeroBot-Plugin的扩展插件,提供包括原神角色面板绘

git clone https://gitee.com/lianhong2758/kokomi-plugin.git ./plugin/kokomi/

//在群文件下载
//在群文件或别的地方通过压缩包方式下载

如果是手动下载的zip压缩包,请将解压后的kokomi文件夹放置在ZeroBot-Plugin目录下的plugin文件夹内。
如果解压后文件夹名称不是kokomi,请动手修改。

通过上述三种方法之一下载,然后在main.go中导入包

_ "github.com/FloatTech/ZeroBot-Plugin/plugin/kokomi" // kokomi原神面板

当然,如果你实在看不懂,这边还有详细的手把手图文教程[kokomi图文详细教程](https://b23.tv/CZDooLr)

# 功能说明(部分移植喵喵菜单)
- 原神面板功能:
- kokomi菜单
Expand All @@ -38,32 +41,29 @@ kokomi是一个ZeroBot-Plugin的扩展插件,提供包括原神角色面板绘
- 全部面板
- 雷神面板
- 队伍伤害[xx xx xx xx]
管理员专属
主人专属
- 上传第(1|2)立绘XX
- 删除第(1|2)立绘XX
- 切换api[数字]

原神wiki功能:
- #材料/培养xxx [角色培养材料查询]
- #特产/位置xxx [特产位置查询]
- #武器/图鉴xxx [武器图鉴查询]
- #收益xxx [角色收益曲线查询]
- #参考xxx [角色参考面板查询]
- #查卡xxx [七圣召唤查卡]
- #攻略xxx [角色攻略查询]
- #原魔xxx [原魔图鉴查询]
- #xxx [角色图鉴查询]
- #xxx材料/培养 [角色培养材料查询]
- #xxx特产/位置 [特产位置查询]
- #xxx武器/图鉴 [武器图鉴查询]
- #xxx收益 [角色收益曲线查询]
- #xxx参考 [角色参考面板查询]
- #xxx查卡 [七圣召唤查卡]
- #xxx攻略 [角色攻略查询]
- #xxx原魔 [原魔图鉴查询]
- #xxx图鉴 [角色图鉴查询]

# 服务依赖

#更新面板 依赖于面板查询API,面板服务由 `http://enka.network/`提供
如果可以的话,也请在Patreon上支持Enka,或提供闲置的原神账户,具体可在Enka官网 Discord联系

国内网络如Enka服务访问不稳定,可尝试更换 @MiniGrayGay 大佬提供的中转服务
国内网络如Enka服务访问不稳定,可尝试更换代理服务
方法:发送切换api即可(需要权限),未来可能适配喵喵api

【链接1】:https://enka.microgg.cn/
【链接2】:https://enka.minigg.cn/
# 未来可期 (以后可能适配的功能)
#雷神伤害
#本地计算
Expand Down
21 changes: 18 additions & 3 deletions plugin/kokomi/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,36 @@ package kokomi

import (
"encoding/json"
"fmt"
"github.com/sirupsen/logrus"
"os"
)

var Config config
var (
Config config
url string
edition string
Postfix string
)

func init() {
cache, err := os.ReadFile("plugin/kokomi/config.json")
if err != nil {
logrus.Errorln("获取kokomi配置文件错误")
logrus.Errorln("获取kokomi配置文件错误,请重新配置config.josn文件,若无法解决,请加群解决,678586912")
os.Exit(1)
}
err = json.Unmarshal(cache, &Config)
if err != nil {
logrus.Errorln("解析kokomi配置文件错误")
logrus.Errorln("解析kokomi配置文件错误,请重新配置config.josn文件,若无法解决,请加群解决,678586912")
os.Exit(1)
}
fmt.Print(
"==========[ZeroBot-Plugin & ", Config.Edition, "]==================",
"\n\n插件配置加载完成,本插件完全免费,作者尽力维护",
"\n若出现问题请加群解决,678586912",
"\n\n============================================================\n\n",
)
url = Config.Apis[Config.Apiid]
edition = Config.Edition
Postfix = Config.Postfix
}
4 changes: 2 additions & 2 deletions plugin/kokomi/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"api_id": 1,
"apis": ["https://enka.microgg.cn/api/uid/%v", "https://enka.minigg.cn/u/%v/__data.json", "https://enka.network/api/uid/%v"],
"apis": [ "https://enka.network/api/uid/%v", "http://profile.microgg.cn/api/uid/%v"],
"postfix": "~",
"edition": " & kokomi v2.4.2"
"edition": "kokomi v2.4.1"
}
11 changes: 3 additions & 8 deletions plugin/kokomi/data/character/七七/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@
"key": "heal",
"value": 22.15
},
"talentKey": {
"3531": "a",
"3532": "e",
"3539": "q"
},
"talentId": {
"10351": 3531,
"10352": 3532,
"10353": 3539
"10351": "a",
"10352": "e",
"10353": "q"
},
"talentCons": {
"e": 5,
Expand Down
15 changes: 6 additions & 9 deletions plugin/kokomi/data/character/丽莎/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"desc": "慵懒而博学的图书管理员,须弥教令院「两百年一见」的天才毕业生。",
"cncv": "钟可",
"jpcv": "田中理惠",
"costume": false,
"costume": [
200601
],
"ver": 1,
"baseAttr": {
"hp": 9570,
Expand All @@ -23,15 +25,10 @@
"key": "mastery",
"value": 96
},
"talentKey": {
"431": "a",
"432": "e",
"439": "q"
},
"talentId": {
"10060": 431,
"10061": 432,
"10062": 439
"10060": "a",
"10061": "e",
"10062": "q"
},
"talentCons": {
"e": 5,
Expand Down
11 changes: 3 additions & 8 deletions plugin/kokomi/data/character/久岐忍/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@
"key": "hpPct",
"value": 24
},
"talentKey": {
"6531": "a",
"6532": "e",
"6539": "q"
},
"talentId": {
"10651": 6531,
"10652": 6532,
"10655": 6539
"10651": "a",
"10652": "e",
"10655": "q"
},
"talentCons": {
"e": 3,
Expand Down
11 changes: 3 additions & 8 deletions plugin/kokomi/data/character/九条裟罗/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@
"key": "atkPct",
"value": 24
},
"talentKey": {
"5631": "a",
"5632": "e",
"5639": "q"
},
"talentId": {
"10561": 5631,
"10562": 5632,
"10565": 5639
"10561": "a",
"10562": "e",
"10565": "q"
},
"talentCons": {
"e": 5,
Expand Down
11 changes: 3 additions & 8 deletions plugin/kokomi/data/character/云堇/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@
"key": "recharge",
"value": 26.67
},
"talentKey": {
"6431": "a",
"6432": "e",
"6439": "q"
},
"talentId": {
"10641": 6431,
"10642": 6432,
"10643": 6439
"10641": "a",
"10642": "e",
"10643": "q"
},
"talentCons": {
"e": 5,
Expand Down
11 changes: 3 additions & 8 deletions plugin/kokomi/data/character/五郎/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@
"key": "dmg",
"value": 24
},
"talentKey": {
"5531": "a",
"5532": "e",
"5539": "q"
},
"talentId": {
"10551": 5531,
"10552": 5532,
"10555": 5539
"10551": "a",
"10552": "e",
"10555": "q"
},
"talentCons": {
"e": 3,
Expand Down
11 changes: 3 additions & 8 deletions plugin/kokomi/data/character/优菈/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@
"key": "cdmg",
"value": 38.4
},
"talentKey": {
"5131": "a",
"5132": "e",
"5139": "q"
},
"talentId": {
"10511": 5131,
"10512": 5132,
"10515": 5139
"10511": "a",
"10512": "e",
"10515": "q"
},
"talentCons": {
"e": 5,
Expand Down
11 changes: 3 additions & 8 deletions plugin/kokomi/data/character/八重神子/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@
"key": "cpct",
"value": 19.2
},
"talentKey": {
"5831": "a",
"5832": "e",
"5839": "q"
},
"talentId": {
"10581": 5831,
"10582": 5832,
"10585": 5839
"10581": "a",
"10582": "e",
"10585": "q"
},
"talentCons": {
"e": 3,
Expand Down
11 changes: 3 additions & 8 deletions plugin/kokomi/data/character/凝光/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,10 @@
"key": "dmg",
"value": 24
},
"talentKey": {
"2731": "a",
"2732": "e",
"2739": "q"
},
"talentId": {
"10271": 2731,
"10272": 2732,
"10274": 2739
"10271": "a",
"10272": "e",
"10274": "q"
},
"talentCons": {
"e": 5,
Expand Down
Binary file modified plugin/kokomi/data/character/凝光/imgs/splash.webp
Binary file not shown.
11 changes: 3 additions & 8 deletions plugin/kokomi/data/character/凯亚/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@
"key": "recharge",
"value": 26.67
},
"talentKey": {
"1531": "a",
"1532": "e",
"1539": "q"
},
"talentId": {
"10073": 1531,
"10074": 1532,
"10075": 1539
"10073": "a",
"10074": "e",
"10075": "q"
},
"talentCons": {
"e": 3,
Expand Down
11 changes: 3 additions & 8 deletions plugin/kokomi/data/character/刻晴/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,10 @@
"key": "cdmg",
"value": 38.4
},
"talentKey": {
"4231": "a",
"4232": "e",
"4239": "q"
},
"talentId": {
"10421": 4231,
"10422": 4232,
"10425": 4239
"10421": "a",
"10422": "e",
"10425": "q"
},
"talentCons": {
"e": 5,
Expand Down
11 changes: 3 additions & 8 deletions plugin/kokomi/data/character/北斗/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@
"key": "dmg",
"value": 24
},
"talentKey": {
"2431": "a",
"2432": "e",
"2439": "q"
},
"talentId": {
"10241": 2431,
"10242": 2432,
"10245": 2439
"10241": "a",
"10242": "e",
"10245": "q"
},
"talentCons": {
"e": 3,
Expand Down
Loading

0 comments on commit 684bbca

Please sign in to comment.