Skip to content

Commit e7d16d0

Browse files
committed
增加:协同对弈开始和结算
1 parent 41c0e4e commit e7d16d0

File tree

2 files changed

+146
-0
lines changed

2 files changed

+146
-0
lines changed
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
import { Script } from '@/system/script';
2+
import { IFuncOrigin, IFuncOperatorOrigin, IFuncOperator } from '@/interface/IFunc';
3+
// const normal = -1; //定义常量
4+
// const left = 0;
5+
const center = 1;
6+
const right = 2;
7+
8+
export class Func019 implements IFuncOrigin {
9+
id = 19;
10+
name = '协同对弈';
11+
desc = '进行协同对弈开始或结束等操作';
12+
operator: IFuncOperatorOrigin[] = [{ // 自动上阵
13+
desc: [
14+
1280, 720,
15+
[
16+
[right, 994, 656, 0x826952],
17+
[right, 1064, 654, 0x826952],
18+
[right, 1021, 638, 0xffffff],
19+
[right, 1041, 641, 0xfdfdfd],
20+
[right, 1012, 626, 0xf2f2f1],
21+
[right, 1053, 630, 0xfefefe],
22+
[right, 1159, 619, 0xe6d5b5],
23+
]
24+
],
25+
oper: [
26+
[center, 1280, 720, 993, 621, 1058, 677, 1000],
27+
]
28+
}, { // 1 取消自动_战
29+
desc: [
30+
1280, 720,
31+
[
32+
[right, 1006, 630, 0xfbfafa],
33+
[right, 1022, 633, 0xffffff],
34+
[right, 1041, 634, 0xfafaf9],
35+
[right, 1020, 640, 0xf2f1f1],
36+
[right, 1043, 642, 0xf8f7f7],
37+
[right, 1064, 645, 0x826952],
38+
[right, 993, 642, 0x826952],
39+
[right, 1159, 619, 0xe6d5b5],
40+
]
41+
],
42+
oper: [
43+
[center, 1280, 720, 1152, 594, 1243, 648, 1000],
44+
]
45+
}, { // 2 特写
46+
desc: [
47+
1280, 720,
48+
[
49+
[right, 1067, 632, 0x5eafbf],
50+
[right, 1093, 617, 0xfbecd1],
51+
[right, 1100, 633, 0x5aaeb9],
52+
[right, 1165, 633, 0x733841],
53+
[right, 1189, 643, 0x3e2829],
54+
]
55+
],
56+
oper: [
57+
[center, 1280, 720, 491, 530, 721, 658, 1000],
58+
]
59+
}, { // 3 胜利
60+
desc: [
61+
1280, 720,
62+
[
63+
[center, 481, 94, 0x831a11],
64+
[center, 504, 126, 0x8e1a11],
65+
[center, 751, 124, 0xb19968],
66+
[center, 907, 114, 0xdac395],
67+
[center, 756, 165, 0x89653e],
68+
]
69+
],
70+
oper: [
71+
[center, 1280, 720, 491, 530, 721, 658, 1000],
72+
]
73+
}, { // 4 失败
74+
desc: [
75+
1280, 720,
76+
[
77+
[center, 470, 83, 0x514a5b],
78+
[center, 451, 120, 0x5a5164],
79+
[center, 499, 124, 0x5e5468],
80+
[center, 727, 108, 0xb5aea0],
81+
[center, 921, 115, 0xa79e8f],
82+
[center, 851, 164, 0x756a5c],
83+
[center, 781, 189, 0x62574a],
84+
]
85+
],
86+
oper: [
87+
[center, 1280, 720, 491, 530, 721, 658, 1000],
88+
]
89+
}, { // 5 番胜
90+
desc: [
91+
1280, 720,
92+
[
93+
[center, 521, 345, 0x671915],
94+
[center, 781, 352, 0xa2372c],
95+
[center, 497, 271, 0x9e9958],
96+
[center, 822, 284, 0xdd5440],
97+
[center, 521, 385, 0xc73527],
98+
]
99+
],
100+
oper: [
101+
[center, 1280, 720, 491, 530, 721, 658, 1000],
102+
]
103+
}, { // 6 开始前
104+
desc: [
105+
1280, 720,
106+
[
107+
[center, 778, 630, 0xa27c67],
108+
[center, 882, 637, 0xc8a77b],
109+
[right, 979, 650, 0x977461],
110+
[right, 1080, 641, 0xebd1a0],
111+
[right, 1169, 617, 0xe7d8bb],
112+
]
113+
]
114+
}]
115+
operatorFunc(thisScript: Script, thisOperator: IFuncOperator[]): boolean {
116+
if (thisScript.oper({
117+
name: '协同对弈_界面判断',
118+
operator: [thisOperator[0], thisOperator[2], thisOperator[3], thisOperator[4], thisOperator[5]]
119+
})) {
120+
return true;
121+
}
122+
let curCnt = 0;
123+
const maxCount = 3;
124+
while (thisScript.oper({
125+
id: 19,
126+
name: '协同对弈_开始',
127+
operator: [thisOperator[6], thisOperator[1]]
128+
})) {
129+
curCnt++;
130+
thisScript.keepScreen(false);
131+
if (curCnt >= maxCount) {
132+
thisScript.myToast('开始对弈前画面,脚本自动停止');
133+
sleep(2000);
134+
thisScript.doPush(thisScript, { text: `[${thisScript.schemeHistory.map(item => item.schemeName).join('、')}]已停止,请查看。` });
135+
thisScript.stop();
136+
sleep(2000);
137+
return false;
138+
}
139+
sleep(1000);
140+
}
141+
return false;
142+
}
143+
}

src/common/version.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,9 @@ export const versionList = [{
12841284
}, {
12851285
version: '20241216_01',
12861286
desc: '新增:支持巅峰s2斗技'
1287+
}, {
1288+
version: '20241227_01',
1289+
desc: '增加:协同对弈开始和结算'
12871290
}];
12881291

12891292
export default versionList[versionList.length - 1].version;

0 commit comments

Comments
 (0)