init: add workspace files

This commit is contained in:
2026-05-26 16:41:20 +08:00
commit f4f2393f72
1041 changed files with 67405 additions and 0 deletions

15
world/extends/item/eq.js Normal file
View File

@@ -0,0 +1,15 @@
EQUIPMENT.prototype.query_score = function () {
if (this.grade) {
var sc = this.score;
if (!sc) sc = this.grade * 100;
sc += this.level * this.grade * 10;
if (this.st_prop) {
for (var i = 0; i < this.st_prop.length; i++) {
sc += this.st_prop[i].grade * 10;
}
}
return sc;
}
return 0;
}

10
world/extends/item/obj.js Normal file
View File

@@ -0,0 +1,10 @@
OBJ.prototype.format_to_sell = function () {
return `["${this.color_name}","${this.id}",${this.count},${this.grade},"${this.unit}",${this.value}]`;
}
OBJ.prototype.format_to_pack = function () {
return `["${this.color_name}","${this.id}",${this.count},${this.grade},"${this.unit}",${this.transable ? this.value : 0},${this.is_equipment ? 1 : 0},${this.on_use ? 1 : 0},${this.on_study ? 1 : 0},${this.on_open ? 1 : 0},${this.combine_count > 0 ? this.combine_count : 0},${this.is_locked ? 1 : 0},${this.otype}]`;
}