调整十常侍结党某常侍同时有双向和单向不认可时固定不可选择双向不认可常侍

This commit is contained in:
mengxinzxz 2023-11-14 18:08:57 +08:00
parent 0ba3035db5
commit ab19f9ba9e
1 changed files with 9 additions and 2 deletions

View File

@ -1607,11 +1607,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var others=list.randomGets(4);
if(others.length==1) event._result={bool:true,links:others};
else{
var conflictList=others.filter(changshi=>{
var conflictList,map={
'scs_bilan':'scs_hankui',
'scs_hankui':'scs_bilan',
'scs_duangui':'scs_guosheng',
'scs_guosheng':'scs_duangui',
},list=others.slice();
if(map[first]&&others.some(changshi=>map[first]==changshi)) conflictList=[others.find(changshi=>map[first]==changshi)];
else conflictList=others.filter(changshi=>{
var map=lib.skill.mbdanggu.conflictMap(player);
var names=map[first];
return names.contains(changshi);
}),list=others.slice();
});
if(conflictList.length){
var conflict=conflictList.randomGet();
list.remove(conflict);