Compare commits

..
6 Commits
Author SHA1 Message Date
539943419 2ae64b3a04 fix a bug 2024-06-11 18:24:50 +08:00
539943419 02b2e93e02 修复了“放逐”中的一个bug 2024-05-13 00:54:00 +08:00
539943419 5c2252f5bf fix 2024-03-15 00:29:56 +08:00
539943419 47deb43845 fix a bug with sup2_tieji 2024-03-15 00:18:26 +08:00
539943419 c1d1c10ca7 添加武将“超马超” 2024-03-15 00:00:08 +08:00
539943419 3ff62c5156 init 2024-03-12 23:19:48 +08:00
75 changed files with 756 additions and 12324 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
Prettier Fixer.py
-83
View File
@@ -1,83 +0,0 @@
# 导入os模块,用于操作文件和目录
import os
from time import sleep
# 定义一个函数,接受一个文件名作为参数,返回修改后的内容
def modify_file(filename):
# 打开文件,以只读模式
with open(filename, 'r', encoding='UTF-8') as f:
# 读取文件的所有行,存入一个列表
lines = f.readlines()
# 创建一个空列表,用于存储修改后的行
new_lines = []
num = 0
# 遍历每一行
for line in lines:
if '"step 0";' in line:
line = line.replace('"step 0";', '"step 0"')
num+=1
if '("step 1");' in line:
line = line.replace('("step 1");', '"step 1"')
num+=1
if '("step 2");' in line:
line = line.replace('("step 2");', '"step 2"')
num+=1
if '("step 3");' in line:
line = line.replace('("step 3");', '"step 3"')
num+=1
if '("step 4");' in line:
line = line.replace('("step 4");', '"step 4"')
num+=1
if '("step 5");' in line:
line = line.replace('("step 5");', '"step 5"')
num+=1
if '("step 6");' in line:
line = line.replace('("step 6");', '"step 6"')
num+=1
if '("step 7");' in line:
line = line.replace('("step 7");', '"step 7"')
num+=1
if '("step 8");' in line:
line = line.replace('("step 8");', '"step 8"')
num+=1
if '("step 9");' in line:
line = line.replace('("step 9");', '"step 9"')
num+=1
if '("step 10");' in line:
line = line.replace('("step 10");', '"step 10"')
num+=1
print(line)
# 将修改后的行添加到新列表中
new_lines.append(line)
# 返回新列表中的所有行,用换行符连接
print("Successfully fixed " + str(num) +" code errors")
return ''.join(new_lines)
# 获取当前目录下的所有文件和子目录
flag = False
files = os.listdir('.')
# 遍历每一个文件或子目录
for file in files:
# 如果是文件,并且文件名是extension.js
if os.path.isfile(file) and file == 'extension.js':
# 调用函数,传入文件名,得到修改后的内容
content = modify_file(file)
# 打开文件,以写入模式,覆盖原内容
with open(file, 'w', encoding='UTF-8') as f:
# 写入修改后的内容
f.write(content)
flag = True
if os.path.isfile(file) and file == 'game.js':
# 调用函数,传入文件名,得到修改后的内容
content = modify_file(file)
# 打开文件,以写入模式,覆盖原内容
with open(file, 'w', encoding='UTF-8') as f:
# 写入修改后的内容
f.write(content)
flag = True
if flag:
pass
else:
print('ERROR')
sleep(3)
-2597
View File
File diff suppressed because it is too large. Load diff
+755 -9548
View File
File diff suppressed because it is too large. Load diff
-96
View File
@@ -1,96 +0,0 @@
// 用于在game.import中包裹skill,对其进行一定的预处理,使其支持一些如自动导入子技能,自动设置技能名等的功能
export function skillFactory(skill) {
for (let skill_name in skill.skill) {
const skill_content = skill.skill[skill_name];
// 自动导入在autoSubSkill下的子技能
if (skill_content.autoSubSkill) {
skill_content.group || (skill_content.group = []);
skill_content.subSkill || (skill_content.subSkill = {});
// skill_content.subSkill = skill_content.subSkill ?? {};
// skill_content.group = skill_content.group ?? [];
for (let autoSubSkillName in skill_content.autoSubSkill) {
skill_content.subSkill[autoSubSkillName] = skill_content.autoSubSkill[autoSubSkillName];
skill_content.group.push(`${skill_name}_${autoSubSkillName}`);
}
}
// 自动根据autoTranslate设置技能的translate相关内容
if (skill_content.autoTranslate) {
skill.translate[`${skill_name}`] = skill_content.autoTranslate.name;
skill.translate[`${skill_name}_info`] = skill_content.autoTranslate.info;
}
}
return skill;
}
export default (lib, game, ui, get, ai, _status) => {
return {
isAsyncFunction(func) {
return func.constructor.name === "AsyncFunction";
},
watch: function (obj, key, callback) {},
game: {},
/**
* Description 角色相关操作
*/
player: {
/**
* Description 更换角色的头像
* @param {Player} player 需要更换头像的玩家
* @param {string} imageSource 图片源,可以为角色名(player.name)
* @param {number|string} replace 要替代的,默认为1(单将模式不用管)
* @returns {null} 无返回
*/
changeAvatar(player, imageSource, replace) {
if (replace && (player.name2 === replace || replace === 2)) {
player.node.avatar2.setBackground(imageSource, "character");
} else {
player.node.avatar.setBackground(imageSource, "character");
}
},
/**
* Description 为角色设置用于显示的名称(如吕布,貂蝉等)
* @param {Player} player 要设置名称的玩家
* @param {string} name 新名称
* @param {undefined | 1 | 2} replace name1或name2
* @returns {null}
*/
setName(player, name, replace) {
let targetNode = player.node.name;
if (replace && (player.name2 === replace || replace === 2)) {
targetNode = player.node.name2;
}
targetNode.innerHTML = name;
}
},
loadash: {
/**
* Description 浅浅拷贝对象
* @param {Array | Object} target
* @returns {Array | Object}
*/
shallowClone(target) {
if (Array.isArray(target)) {
return [...target];
}
if (typeof target === "object" && target !== null) {
return { ...target };
}
return target;
}
},
// 提供一些便捷的math功能
math: {},
other: {
/**
* Description 返回一个function,每次执行会控制台递增输出0,1,2等等,用于debug挺好
* @returns {function}
*/
useLogger() {
let count = 0;
return (...args) => {
console.log(count++, ...args);
};
}
}
};
};
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 297 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 756 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 569 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 456 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 843 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 920 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB