commit
04439d6476
|
@ -803,7 +803,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
silent:true,
|
||||
content:function(){
|
||||
player.exitSubPlayer(true);
|
||||
game.createTrigger('phaseAfter','lianjing',player,trigger);
|
||||
if(lib.filter.filterTrigger(trigger,player,'phaseAfter','lianjing')) game.createTrigger('phaseAfter','lianjing',player,trigger);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -8203,7 +8203,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
hs:get.cards(4)
|
||||
});
|
||||
player.callSubPlayer(player.storage.huanfeng_end);
|
||||
// game.createTrigger('phaseBegin','shengdun',player,trigger);
|
||||
// if(lib.filter.filterTrigger(trigger,player,'phaseBegin','shengdun')) game.createTrigger('phaseBegin','shengdun',player,trigger);
|
||||
},
|
||||
// group:'huanfeng_end',
|
||||
subSkill:{
|
||||
|
|
|
@ -3130,7 +3130,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var keys=['filterTarget','selectTarget','ai2'];
|
||||
for(var key of keys) delete next[key];
|
||||
for(var i in trigger){
|
||||
if(!next.hasOwnProperty(i)) next[i]=trigger[i];
|
||||
if(!(i in next)) next[i]=trigger[i];
|
||||
}
|
||||
next.filterTargetx=trigger.filterTarget||(()=>false);
|
||||
next.filterTarget=function(card,player,target){
|
||||
|
@ -3732,7 +3732,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(list.length>0) continue;
|
||||
var info=get.info(skill);
|
||||
if(info&&(!info.unique||info.gainable)){
|
||||
lib.skill.rehuashen.createAudio(name,skill,'jsrg_xushao');
|
||||
// lib.skill.rehuashen.createAudio(name,skill,'jsrg_xushao');
|
||||
skills.add(skill);
|
||||
}
|
||||
}
|
||||
|
@ -3744,6 +3744,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.addSkillBlocker('sbyingmen');
|
||||
game.log(player,'将','#y'+get.translation(characters),'加入了','#g“访客”');
|
||||
game.broadcastAll(function(player,characters){
|
||||
player.tempname.addArray(characters);
|
||||
player.$draw(characters.map(function(name){
|
||||
var cardname='huashen_card_'+name;
|
||||
lib.card[cardname]={
|
||||
|
@ -3764,6 +3765,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var characters2=player.getStorage('sbyingmen').slice(0);
|
||||
characters2.removeArray(characters);
|
||||
skills.removeArray(lib.skill.sbyingmen.getSkills(characters2,player));
|
||||
game.broadcastAll((player,characters)=>player.tempname.removeArray(characters),player,characters);
|
||||
player.unmarkAuto('sbyingmen',characters);
|
||||
_status.characterlist.addArray(characters);
|
||||
player.removeInvisibleSkill(skills);
|
||||
|
|
|
@ -10620,10 +10620,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
if(event.control=='弃置化身') return;
|
||||
if(player.storage.rehuashen.current!=event.card){
|
||||
const old=player.storage.rehuashen.current;
|
||||
player.storage.rehuashen.current=event.card;
|
||||
game.broadcastAll(function(player,sex){
|
||||
player.sex=sex;
|
||||
},player,lib.character[event.card][0]);
|
||||
game.broadcastAll(function(player,character,old){
|
||||
player.tempname.remove(old);
|
||||
player.tempname.add(character);
|
||||
player.sex=lib.character[event.card][0];
|
||||
},player,event.card,old);
|
||||
game.log(player,'将性别变为了','#y'+get.translation(lib.character[event.card][0])+'性');
|
||||
player.changeGroup(lib.character[event.card][1]);
|
||||
}
|
||||
|
@ -10636,7 +10639,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.popup(link);
|
||||
player.syncStorage('rehuashen');
|
||||
player.updateMarks('rehuashen');
|
||||
lib.skill.rehuashen.createAudio(event.card,link,'re_zuoci');
|
||||
// lib.skill.rehuashen.createAudio(event.card,link,'re_zuoci');
|
||||
}
|
||||
},
|
||||
init:function(player,skill){
|
||||
|
@ -10752,42 +10755,42 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return node;
|
||||
},
|
||||
createAudio:(character,skillx,name)=>{
|
||||
var skills=game.expandSkills([skillx]);
|
||||
skills=skills.filter(skill=>get.info(skill));
|
||||
if(!skills.length) return;
|
||||
var skillss=skills.filter(skill=>get.info(skill).derivation);
|
||||
if(skillss.length){
|
||||
skillss.forEach(skill=>{
|
||||
var derivationSkill=get.info(skill).derivation;
|
||||
skills[Array.isArray(derivationSkill)?'addArray':'add'](derivationSkill);
|
||||
});
|
||||
}
|
||||
skills.forEach(skill=>{
|
||||
var info=lib.skill[skill];
|
||||
if(info){
|
||||
if(!info.audioname2) info.audioname2={};
|
||||
if(info.audioname&&info.audioname.includes(character)){
|
||||
if(info.audio){
|
||||
if(typeof info.audio=='string') skill=info.audio;
|
||||
if(Array.isArray(info.audio)) skill=info.audio[0];
|
||||
}
|
||||
if(!lib.skill[skill+'_'+character]) lib.skill[skill+'_'+character]={audio:2};
|
||||
info.audioname2[name]=(skill+'_'+character);
|
||||
}
|
||||
else if(info.audioname2[character]){
|
||||
info.audioname2[name]=info.audioname2[character];
|
||||
}
|
||||
else{
|
||||
if(info.audio){
|
||||
if(typeof info.audio=='string') skill=info.audio;
|
||||
if(Array.isArray(info.audio)) skill=info.audio[0];
|
||||
}
|
||||
info.audioname2[name]=skill;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// createAudio:(character,skillx,name)=>{
|
||||
// var skills=game.expandSkills([skillx]);
|
||||
// skills=skills.filter(skill=>get.info(skill));
|
||||
// if(!skills.length) return;
|
||||
// var skillss=skills.filter(skill=>get.info(skill).derivation);
|
||||
// if(skillss.length){
|
||||
// skillss.forEach(skill=>{
|
||||
// var derivationSkill=get.info(skill).derivation;
|
||||
// skills[Array.isArray(derivationSkill)?'addArray':'add'](derivationSkill);
|
||||
// });
|
||||
// }
|
||||
// skills.forEach(skill=>{
|
||||
// var info=lib.skill[skill];
|
||||
// if(info){
|
||||
// if(!info.audioname2) info.audioname2={};
|
||||
// if(info.audioname&&info.audioname.includes(character)){
|
||||
// if(info.audio){
|
||||
// if(typeof info.audio=='string') skill=info.audio;
|
||||
// if(Array.isArray(info.audio)) skill=info.audio[0];
|
||||
// }
|
||||
// if(!lib.skill[skill+'_'+character]) lib.skill[skill+'_'+character]={audio:2};
|
||||
// info.audioname2[name]=(skill+'_'+character);
|
||||
// }
|
||||
// else if(info.audioname2[character]){
|
||||
// info.audioname2[name]=info.audioname2[character];
|
||||
// }
|
||||
// else{
|
||||
// if(info.audio){
|
||||
// if(typeof info.audio=='string') skill=info.audio;
|
||||
// if(Array.isArray(info.audio)) skill=info.audio[0];
|
||||
// }
|
||||
// info.audioname2[name]=skill;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
mark:true,
|
||||
intro:{
|
||||
onunmark:function(storage,player){
|
||||
|
|
|
@ -4412,9 +4412,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!event.logged) player.logSkill('huashen');
|
||||
var skill=map.skill,character=map.character;
|
||||
if(character!=player.storage.huashen.current){
|
||||
const old=player.storage.huashen.current;
|
||||
player.storage.huashen.current=character;
|
||||
player.markSkill('huashen');
|
||||
game.broadcastAll(function(character,player){
|
||||
game.broadcastAll(function(player,character,old){
|
||||
player.tempname.remove(old);
|
||||
player.tempname.add(character);
|
||||
player.sex=lib.character[character][0];
|
||||
//player.group=lib.character[character][1];
|
||||
//player.node.name.dataset.nature=get.groupnature(player.group);
|
||||
|
@ -4434,7 +4437,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},50);
|
||||
},200);
|
||||
}
|
||||
},character,player);
|
||||
},player,character,old);
|
||||
game.log(player,'将性别变为了','#y'+get.translation(lib.character[character][0])+'性');
|
||||
player.changeGroup(lib.character[character][1]);
|
||||
}
|
||||
|
@ -4446,7 +4449,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.popup(skill);
|
||||
player.syncStorage('huashen');
|
||||
player.updateMarks('huashen');
|
||||
lib.skill.rehuashen.createAudio(character,skill,'zuoci');
|
||||
// lib.skill.rehuashen.createAudio(character,skill,'zuoci');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8366,7 +8366,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.addTempSkill(result.control);
|
||||
player.storage.pingjian_check[result.control]=(trigger.name=='damage'?trigger:'phaseJieshu');
|
||||
var name=event.list.find(name=>lib.character[name][3].includes(result.control));
|
||||
if(name) lib.skill.rehuashen.createAudio(name,result.control,'xushao');
|
||||
// if(name) lib.skill.rehuashen.createAudio(name,result.control,'xushao');
|
||||
if(name) game.broadcastAll((player,name)=>player.tempname.add(name),player,name);
|
||||
},
|
||||
group:'pingjian_use',
|
||||
phaseUse_special:[],
|
||||
|
@ -8454,7 +8455,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.addTempSkill(result.control);
|
||||
player.storage.pingjian_check[result.control]='phaseUse';
|
||||
var name=event.list.find(name=>lib.character[name][3].includes(result.control));
|
||||
if(name) lib.skill.rehuashen.createAudio(name,result.control,'xushao');
|
||||
// if(name) lib.skill.rehuashen.createAudio(name,result.control,'xushao');
|
||||
if(name) game.broadcastAll((player,name)=>player.tempname.add(name),player,name);
|
||||
},
|
||||
ai:{order:12,result:{player:1}},
|
||||
},
|
||||
|
@ -8473,6 +8475,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
var skill=trigger.sourceSkill||trigger.skill;
|
||||
player.removeSkill(skill);
|
||||
const names=player.tempname&&player.tempname.filter(i=>lib.character[i][3].includes(skill));
|
||||
if(names) game.broadcastAll((player,names)=>player.tempname.removeArray(names),player,names);
|
||||
delete player.storage.pingjian_check[skill];
|
||||
},
|
||||
group:'pingjian_check2',
|
||||
|
@ -8495,6 +8499,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return player.storage.pingjian_check[skill]==trigger;
|
||||
});
|
||||
player.removeSkill(skills);
|
||||
const names=player.tempname&&player.tempname.filter(i=>skills.some(skill=>lib.character[i][3].includes(skill)));
|
||||
if(names) game.broadcastAll((player,names)=>player.tempname.removeArray(names),player,names);
|
||||
for(var skill of skills) delete player.storage.pingjian_check[skill];
|
||||
},
|
||||
},
|
||||
|
|
|
@ -100,7 +100,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.draw(3);
|
||||
player.addSkill('shuiyun');
|
||||
'step 1'
|
||||
game.createTrigger('phaseEnd','shuiyun',player,trigger);
|
||||
if(lib.filter.filterTrigger(trigger,player,'phaseEnd','shuiyun')) game.createTrigger('phaseEnd','shuiyun',player,trigger);
|
||||
},
|
||||
},
|
||||
shenwu:{
|
||||
|
|
960
game/game.js
960
game/game.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue