JS脚本:「牌圣」 (#1693)
28
repo/js/DSTCG/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
脚本名称:「牌圣」(Duel Saint of TCG)
|
||||
|
||||
功能描述:智能版自动七圣召唤
|
||||
|
||||
## 核心功能
|
||||
|
||||
1. 衡量双方出战角色牌的血量、可能发生的元素反应,通过切人来规避伤害或打出元素反应
|
||||
2. 自动重投元素骰
|
||||
|
||||
## 注意事项
|
||||
|
||||
1. 使用前最好确保位于“手牌选择”界面或**牌局开始后任何一个阶段的界面**
|
||||
2. 由于手牌部分的逻辑还未完善(人话:没来得及做),已经在JS内关闭了双方召唤、支援牌区的识别和手牌详情的识别
|
||||
3. 本JS脚本目前为测试版,出现bug请在v7群或者测试群内@作者反馈
|
||||
|
||||
## 测试阶段尚未解决的问题
|
||||
|
||||
```JS脚本配置未完全关联```
|
||||
|
||||
1. OCR识别血量不准确
|
||||
2. 考量全面的通用策略(现有版本不考虑手牌和副牌区)尚待完善,目前进度:第三版策略,绘制流程图重制阶段
|
||||
3. 手牌和副牌的结合使用(需要完善卡牌描述字符串信息的解析相关方法,该部分代码已经注释)
|
||||
|
||||
## 其它
|
||||
|
||||
作者:提瓦特钓鱼玳师
|
||||
|
||||
脚本反馈邮箱:hijiwos@hotmail.com
|
||||
46
repo/js/DSTCG/action的描述(字符串解析相关[未实装]).md
Normal file
@@ -0,0 +1,46 @@
|
||||
|
||||
### action:单个卡牌效果(以下仅影响出牌决策,具体效果不进行推算,数据实时获取)
|
||||
|
||||
1. dealDamage:(boolean)是否造成伤害
|
||||
2. instantDamage:(boolean)是否是即时伤害
|
||||
3. clickTwice:(boolean)是否需要二次点击
|
||||
例如指定敌方的召唤牌
|
||||
|
||||
4. damage:(int)伤害
|
||||
正数为攻击、负数为治疗
|
||||
5. residueDegree:(int)剩余次数
|
||||
6. consumption:(int) 生效后减少的可用次数
|
||||
|
||||
7. effectType:(String)生效类型
|
||||
- 我方出战角色为...(角色被动)user_main_card\[card_name\]
|
||||
- 我方...卡牌入场(名称、类型)user_card_income\[card_name\]
|
||||
- 敌方...卡牌入场(名称、类型)enemy_card_income\[card_name\]
|
||||
- 我方切换角色 user_switch
|
||||
- 敌方切换角色 enemy_switch
|
||||
- 我方造成元素攻击 user_element_dmg
|
||||
- 敌方造成元素攻击 enemy_element_dmg
|
||||
- 我方造成穿透伤害 user_real_dmg
|
||||
- 敌方造成穿透伤害 enemy_real_dmg
|
||||
- 回合结束 round_over
|
||||
8. elementType:(String)元素类型(元素附着)
|
||||
- 无 None
|
||||
- 火 Pyro
|
||||
- 水 Hydro
|
||||
- 风 Anemo
|
||||
- 雷 Electro
|
||||
- 草 Dendro
|
||||
- 冰 Cryo
|
||||
- 岩 Geo
|
||||
9. targetType:(String)目标
|
||||
- 敌方出战卡牌 enemy_main_card
|
||||
- 我方出战卡牌 user_main_card
|
||||
- 敌方下一个角色卡牌 enemy_next_card
|
||||
- 我方下一个角色卡牌 user_next_card
|
||||
- 敌方所有后台卡牌 enemy_other_card
|
||||
- 我方所有后台卡牌 user_other_card
|
||||
- 敌方支援牌 enemy_location
|
||||
- 敌方召唤牌 enemy_summon
|
||||
- 我方支援牌 user_location
|
||||
- 我方召唤牌 user_summon
|
||||
10. specialEffect:(String)特殊效果
|
||||
例如本回合禁止对方使用行动牌(秘传卡牌等)
|
||||
40
repo/js/DSTCG/assets/Strategy/strategyOne.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
缺少实时监测技能骰子消耗的方法
|
||||
|
||||
元素爆发释放检测是否有对应手牌
|
||||
元素反应检测只能判断增幅,计算伤害要额外根据技能
|
||||
每轮次优先无条件打出0消耗的手牌
|
||||
|
||||
// 1
|
||||
if 我方骰子数小于等于1
|
||||
结束回合
|
||||
// 2
|
||||
else if 我方出战角色充能已满且元素爆发满足释放条件(此if语句内仅供参考,实际执行直接释放元素爆发)
|
||||
if 敌方出战角色附着有元素
|
||||
if 我方出战角色元素可以与敌方出战角色的附着元素发生反应
|
||||
释放元素爆发
|
||||
else if 我方出战角色血量小于等于3
|
||||
切换我方受对方元素影响后血量最高的后台角色(逻辑需要完善,可能存在只剩一张牌的情况)
|
||||
|
||||
// 3
|
||||
else if 我方出战角色充能已满且元素爆发不满足释放条件
|
||||
切换我方受对方元素影响最低的角色(如果切换的是当前角色,检测释放条件释放元素技能或普攻)
|
||||
|
||||
// 4
|
||||
else if 我方出战角色经元素反应检测后剩余血量大于0
|
||||
if 敌方出战角色附着有元素
|
||||
if 我方出战角色元素可以与敌方出战角色的附着元素发生反应
|
||||
释放元素技能
|
||||
else
|
||||
if 我方出战角色为法器角色
|
||||
释放元素技能
|
||||
else
|
||||
释放普攻
|
||||
else
|
||||
我方出战角色使用附带元素附着的攻击(优先技能,避免使用元素爆发)
|
||||
|
||||
// 5
|
||||
else if 我方出战角色经元素反应检测后剩余血量小于等于0
|
||||
if 敌方出战角色经元素反应检测后血量小于等于0
|
||||
我方释放元素技能(骰子数识别)
|
||||
else
|
||||
切换我方元素检测后血量最高的角色(保证角色未倒地)
|
||||
28
repo/js/DSTCG/assets/Strategy/strategyTwo.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
// 元素爆发满足释放条件应当优先释放元素爆发
|
||||
|
||||
if 我方剩余骰子数 == 0
|
||||
结束回合
|
||||
if 敌方剩余骰子数 <= 2 or 敌方已经结束回合
|
||||
if 我方剩余骰子数 <= 2
|
||||
模拟所有我方角色经过敌方出战角色攻击后的剩余血量
|
||||
计算我方角色经计算后血量最高的那个,切换该角色,如果要求换的角色为出战角色,结束回合
|
||||
else // 我方剩余骰子数 >= 3
|
||||
if 敌方出战角色附着有元素
|
||||
计算我方出战角色的元素是否能与之发生反应
|
||||
if 能反应
|
||||
计算元素战技的消耗并计算可用性
|
||||
if 能释放
|
||||
元素调和后释放(如果需要元素调和)
|
||||
else // 无法释放
|
||||
模拟所有我方角色经过敌方出战角色攻击后的剩余血量
|
||||
else // 无法反应
|
||||
if 我方出战角色为法器角色
|
||||
计算并释放元素战技
|
||||
else // 不是法器角色
|
||||
计算并释放普通攻击
|
||||
计算我方角色经计算后血量最高的那个,切换该角色,如果要求换的角色为出战角色,结束回合
|
||||
else // 敌方出战角色未附着元素
|
||||
else
|
||||
if 我方剩余骰子数 == 1
|
||||
|
||||
else // 我方剩余骰子数 >= 2
|
||||
12013
repo/js/DSTCG/assets/card_dic.json
Normal file
BIN
repo/js/DSTCG/assets/charge.png
Normal file
|
After Width: | Height: | Size: 644 B |
BIN
repo/js/DSTCG/assets/dice/MainAnemo.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
repo/js/DSTCG/assets/dice/MainCryo.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
repo/js/DSTCG/assets/dice/MainDendro.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
repo/js/DSTCG/assets/dice/MainElectro.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
repo/js/DSTCG/assets/dice/MainGeo.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
repo/js/DSTCG/assets/dice/MainHydro.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
repo/js/DSTCG/assets/dice/MainOmni.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
repo/js/DSTCG/assets/dice/MainPyro.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
repo/js/DSTCG/assets/dice/RollAnemo.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
repo/js/DSTCG/assets/dice/RollCryo.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
repo/js/DSTCG/assets/dice/RollDendro.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
repo/js/DSTCG/assets/dice/RollElectro.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
repo/js/DSTCG/assets/dice/RollGeo.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
repo/js/DSTCG/assets/dice/RollHydro.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
repo/js/DSTCG/assets/dice/RollOmni.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
repo/js/DSTCG/assets/dice/RollPyro.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
repo/js/DSTCG/assets/dice/bin/RollOmni.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
repo/js/DSTCG/assets/disable.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
repo/js/DSTCG/assets/enemy_turn.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
repo/js/DSTCG/assets/num/Hand10.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
repo/js/DSTCG/assets/num/Hand5.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
repo/js/DSTCG/assets/num/Hand6.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
repo/js/DSTCG/assets/num/Hand7.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
repo/js/DSTCG/assets/num/Hand8.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
repo/js/DSTCG/assets/num/Hand9.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
repo/js/DSTCG/assets/setting.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
repo/js/DSTCG/assets/state/StateCryo.png
Normal file
|
After Width: | Height: | Size: 789 B |
BIN
repo/js/DSTCG/assets/state/StateDendro.png
Normal file
|
After Width: | Height: | Size: 607 B |
BIN
repo/js/DSTCG/assets/state/StateElectro.png
Normal file
|
After Width: | Height: | Size: 715 B |
BIN
repo/js/DSTCG/assets/state/StateFreeze.png
Normal file
|
After Width: | Height: | Size: 602 B |
BIN
repo/js/DSTCG/assets/state/StateHydro.png
Normal file
|
After Width: | Height: | Size: 715 B |
BIN
repo/js/DSTCG/assets/state/StatePyro.png
Normal file
|
After Width: | Height: | Size: 713 B |
BIN
repo/js/DSTCG/assets/uncharge.png
Normal file
|
After Width: | Height: | Size: 673 B |
BIN
repo/js/DSTCG/assets/user_turn.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
2504
repo/js/DSTCG/main.js
Normal file
15
repo/js/DSTCG/manifest.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "「牌圣」",
|
||||
"version": "1.0",
|
||||
"bgi_version": "0.45.0",
|
||||
"description": "智能版自动七圣召唤",
|
||||
"authors": [
|
||||
{
|
||||
"name": "提瓦特钓鱼玳师",
|
||||
"links": "https://github.com/Hijiwos"
|
||||
}
|
||||
],
|
||||
"settings_ui": "settings.json",
|
||||
"main": "main.js"
|
||||
}
|
||||
3
repo/js/DSTCG/settings.json
Normal file
@@ -0,0 +1,3 @@
|
||||
[
|
||||
|
||||
]
|
||||
BIN
repo/js/DSTCG/strategy2(目前最好的策略,流程图部分未完成).vsdx
Normal file
14
repo/js/DSTCG/其它预期.md
Normal file
@@ -0,0 +1,14 @@
|
||||
\[默认满级\]
|
||||
|
||||
# 自动寻找并进入对局类
|
||||
|
||||
1. 猫尾酒馆(角色挑战)
|
||||
- 传送到猫尾酒馆
|
||||
- 交互画框
|
||||
- 根据角色选择对应挑战
|
||||
- 判断剩余邀请函并自动购买(检测兑换币是否充足)
|
||||
- 进入角色对战(普通和认真)
|
||||
2. 猫尾酒馆(酒馆挑战)
|
||||
3. 猫尾酒馆(每周对战)
|
||||
4. 大世界(角色对战)
|
||||
|
||||