添加get.is.zhuanhuanji
This commit is contained in:
parent
61edbb76eb
commit
54cd98468e
|
@ -8896,7 +8896,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
game.expandSkills(list2);
|
game.expandSkills(list2);
|
||||||
for(var k=0;k<list2.length;k++){
|
for(var k=0;k<list2.length;k++){
|
||||||
var info=lib.skill[list2[k]];
|
var info=lib.skill[list2[k]];
|
||||||
if(!info||!info.trigger||!info.trigger.player||info.silent||info.limited||info.juexingji||info.zhuanhuanji||info.hiddenSkill||info.dutySkill||(info.zhuSkill&&!player.isZhu2())) continue;
|
if(get.is.zhuanhuanji(list2[k],player)) continue;
|
||||||
|
if(!info||!info.trigger||!info.trigger.player||info.silent||info.limited||info.juexingji||info.hiddenSkill||info.dutySkill||(info.zhuSkill&&!player.isZhu2())) continue;
|
||||||
if(info.trigger.player==name2||Array.isArray(info.trigger.player)&&info.trigger.player.includes(name2)){
|
if(info.trigger.player==name2||Array.isArray(info.trigger.player)&&info.trigger.player.includes(name2)){
|
||||||
if(info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue;
|
if(info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue;
|
||||||
if(info.init) continue;
|
if(info.init) continue;
|
||||||
|
@ -8976,7 +8977,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
game.expandSkills(list2);
|
game.expandSkills(list2);
|
||||||
for(var k=0;k<list2.length;k++){
|
for(var k=0;k<list2.length;k++){
|
||||||
var info=lib.skill[list2[k]];
|
var info=lib.skill[list2[k]];
|
||||||
if(!info||!info.enable||info.charlotte||info.limited||info.juexingji||info.zhuanhuanji||info.hiddenSkill||info.dutySkill||(info.zhuSkill&&!player.isZhu2())) continue;
|
if(get.is.zhuanhuanji(list2[k],player)) continue;
|
||||||
|
if(!info||!info.enable||info.charlotte||info.limited||info.juexingji||info.hiddenSkill||info.dutySkill||(info.zhuSkill&&!player.isZhu2())) continue;
|
||||||
if((info.enable=='phaseUse'||(Array.isArray(info.enable)&&info.enable.includes('phaseUse')))||(info.enable=='chooseToUse'||(Array.isArray(info.enable)&&info.enable.includes('chooseToUse')))){
|
if((info.enable=='phaseUse'||(Array.isArray(info.enable)&&info.enable.includes('phaseUse')))||(info.enable=='chooseToUse'||(Array.isArray(info.enable)&&info.enable.includes('chooseToUse')))){
|
||||||
if(info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue;
|
if(info.ai&&(info.ai.combo||info.ai.notemp||info.ai.neg)) continue;
|
||||||
if(info.init||info.onChooseToUse) continue;
|
if(info.init||info.onChooseToUse) continue;
|
||||||
|
|
|
@ -11535,22 +11535,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return game.hasPlayer(function(current){
|
return game.hasPlayer(function(current){
|
||||||
return current.getSkills(null,false,false).filter(function(i){
|
return current.getSkills(null,false,false).filter(function(i){
|
||||||
var info=get.info(i);
|
return get.is.zhuanhuanji(i,current);
|
||||||
return info&&info.zhuanhuanji;
|
|
||||||
}).length>0;
|
}).length>0;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target.getSkills(null,false,false).filter(function(i){
|
return target.getSkills(null,false,false).filter(function(i){
|
||||||
var info=get.info(i);
|
return get.is.zhuanhuanji(i,current);
|
||||||
return info&&info.zhuanhuanji;
|
|
||||||
}).length>0;
|
}).length>0;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var list=target.getSkills(null,false,false).filter(function(i){
|
var list=target.getSkills(null,false,false).filter(function(i){
|
||||||
var info=get.info(i);
|
return get.is.zhuanhuanji(i,current);
|
||||||
return info&&info.zhuanhuanji;
|
|
||||||
});
|
});
|
||||||
if(list.length==1){
|
if(list.length==1){
|
||||||
event._result={control:list[0]};
|
event._result={control:list[0]};
|
||||||
|
@ -11584,8 +11581,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return game.hasPlayer(function(current){
|
return game.hasPlayer(function(current){
|
||||||
return current.getSkills(null,false,false).filter(function(i){
|
return current.getSkills(null,false,false).filter(function(i){
|
||||||
var info=get.info(i);
|
return get.is.zhuanhuanji(i,current);
|
||||||
return info&&info.zhuanhuanji;
|
|
||||||
}).length>0;
|
}).length>0;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -7936,8 +7936,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
getZhuanhuanji:function(player,bool){
|
getZhuanhuanji:function(player,bool){
|
||||||
var skills=player.getSkills(null,false,false).filter(function(i){
|
var skills=player.getSkills(null,false,false).filter(function(i){
|
||||||
var info=get.info(i);
|
const list=get.skillCategoriesOf(i);
|
||||||
return info&&!info.charlotte&&info.zhuanhuanji;
|
return !list.includes('Charlotte')&&list.includes('转换技');
|
||||||
});
|
});
|
||||||
if(!bool) return skills;
|
if(!bool) return skills;
|
||||||
if(!skills.length) return 'none';
|
if(!skills.length) return 'none';
|
||||||
|
|
|
@ -281,7 +281,7 @@ export class Get extends Uninstantable {
|
||||||
if (info.zhuSkill) list.add('主公技');
|
if (info.zhuSkill) list.add('主公技');
|
||||||
if (info.limited) list.add('限定技');
|
if (info.limited) list.add('限定技');
|
||||||
if (info.juexingji) list.add('觉醒技');
|
if (info.juexingji) list.add('觉醒技');
|
||||||
if (info.zhuanhuanji) list.add('转换技');
|
if (get.is.zhuanhuanji(skill, player)) list.add('转换技');
|
||||||
if (info.hiddenSkill) list.add('隐匿技');
|
if (info.hiddenSkill) list.add('隐匿技');
|
||||||
if (info.clanSkill) list.add('宗族技');
|
if (info.clanSkill) list.add('宗族技');
|
||||||
if (info.groupSkill) list.add('势力技');
|
if (info.groupSkill) list.add('势力技');
|
||||||
|
|
|
@ -443,4 +443,18 @@ export class Is extends Uninstantable {
|
||||||
if (info.locked) return true;
|
if (info.locked) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @param { string } skill
|
||||||
|
* @param { Player } player
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
static zhuanhuanji(skill, player) {
|
||||||
|
const info = lib.skill[skill], { zhuanhuanji } = info;
|
||||||
|
if ('zhuanhuanji2' in info) {
|
||||||
|
const { zhuanhuanji2 } = info;
|
||||||
|
if (typeof zhuanhuanji2 === 'function') return Boolean(zhuanhuanji2(skill, player));
|
||||||
|
return Boolean(zhuanhuanji2);
|
||||||
|
}
|
||||||
|
return Boolean(zhuanhuanji);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue