character[4]可自定义gzgroup,使得神势力角色可以使用lib.group以外的势力作为自己的势力

This commit is contained in:
mengxinzxz 2023-11-17 20:00:13 +08:00
parent 46e29873ec
commit e8ea201272
1 changed files with 5 additions and 2 deletions

View File

@ -19,8 +19,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
for(var i in lib.character){ for(var i in lib.character){
if(lib.character[i][1]=='shen'){ if(lib.character[i][1]=='shen'){
if(lib.character[i][4]){ if(lib.character[i][4]){
var group=lib.character[i][4].find(group=>lib.group.contains(group)||group=='key'); var group=lib.character[i][4].find(group=>lib.group.contains(group)||group=='key'||group.startsWith('gzgroup:'));
if(group) lib.character[i][1]=group; if(group){
if(group.startsWith('gzgroup:')) lib.character[i][1]=group.slice(8);
else lib.character[i][1]=group;
}
else lib.character[i][1]='qun'; else lib.character[i][1]='qun';
} }
else lib.character[i][1]='qun'; else lib.character[i][1]='qun';