Merge branch 'libccy:PR-Branch' into PR-Branch

This commit is contained in:
157 2023-12-03 14:56:29 +08:00 committed by GitHub
commit 3718608690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 651 additions and 777 deletions

View File

@ -662,6 +662,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
clanmingjie:{ clanmingjie:{
init:function(player){ init:function(player){
var skill='clanmingjie_'+player.playerid;
if(!lib.skill[skill]){
lib.skill[skill]={
charlotte:true,
mark:true,
marktext:'戒',
intro:{content:'已被$指定为【铭戒】目标'},
};
lib.translate[skill]='铭戒';
lib.translate[skill+'_bg']='戒';
}
player.addSkill('clanmingjie_record'); player.addSkill('clanmingjie_record');
}, },
onremove:function(player){ onremove:function(player){
@ -671,23 +682,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'phaseUse', enable:'phaseUse',
limited:true, limited:true,
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return !player.getStorage('clanmingjie_effect').contains(target); return !target.hasSkill('clanmingjie_'+player.playerid);
}, },
skillAnimation:true, skillAnimation:true,
animationColor:'thunder', animationColor:'thunder',
content:function(){ content:function(){
'step 0'
player.awakenSkill('clanmingjie'); player.awakenSkill('clanmingjie');
player.addSkill('clanmingjie_effect'); player.addSkill('clanmingjie_effect');
player.markAuto('clanmingjie_effect',[target]); var skill='clanmingjie_'+player.playerid;
target.addSkill('clanmingjie_mark'); target.addTempSkill(skill,{player:'phaseAfter'});
target.markAuto('clanmingjie_mark',[player]); target.storage[skill]=player;
}, },
ai:{ ai:{
order:10, order:10,
result:{ result:{
target:function(player,target){ target:function(player,target){
if(player.getStorage('clanmingjie_effect').contains(target)) return 0;
if(player.hasSkill('clanzhongliu')||player.hp==1){ if(player.hasSkill('clanzhongliu')||player.hp==1){
if(!player.hasCard(card=>{ if(!player.hasCard(card=>{
var info=get.info(card); var info=get.info(card);
@ -710,7 +719,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
return get.sgnAttitude(player,target); return get.sgnAttitude(player,target);
}, },
} },
}, },
subSkill:{ subSkill:{
effect:{ effect:{
@ -722,8 +731,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var info=get.info(card); var info=get.info(card);
if(info.allowMultiple==false) return false; if(info.allowMultiple==false) return false;
if(event.targets&&!info.multitarget){ if(event.targets&&!info.multitarget){
return player.getStorage('clanmingjie_effect').some(current=>{ return game.filterPlayer().some(current=>{
return current.isIn()&&!event.targets.contains(current)&&lib.filter.targetEnabled2(card,player,current)&&lib.filter.targetInRange(card,player,current); if(!current.hasSkill('clanmingjie_'+player.playerid)) return false;
return !event.targets.contains(current)&&lib.filter.targetEnabled2(card,player,current)&&lib.filter.targetInRange(card,player,current);
}); });
} }
return false; return false;
@ -733,7 +743,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 0' 'step 0'
player.chooseTarget(get.prompt('clanmingjie_effect'),'令任意【铭戒】目标角色成为'+get.translation(trigger.card)+'的目标',function(card,player,target){ player.chooseTarget(get.prompt('clanmingjie_effect'),'令任意【铭戒】目标角色成为'+get.translation(trigger.card)+'的目标',function(card,player,target){
var trigger=_status.event.getTrigger(); var trigger=_status.event.getTrigger();
if(trigger.targets.contains(target)||!target.isIn()||!player.getStorage('clanmingjie_effect').contains(target)) return false; if(trigger.targets.contains(target)||!target.isIn()||!target.hasSkill('clanmingjie_'+player.playerid)) return false;
return lib.filter.targetEnabled2(trigger.card,player,target)&&lib.filter.targetInRange(trigger.card,player,target); return lib.filter.targetEnabled2(trigger.card,player,target)&&lib.filter.targetInRange(trigger.card,player,target);
},[1,Infinity]).set('ai',function(target){ },[1,Infinity]).set('ai',function(target){
var player=_status.event.player; var player=_status.event.player;
@ -749,14 +759,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
}, },
group:'clanmingjie_targeted', group:'clanmingjie_targeted',
intro:{content:'使用牌时可以额外指定$为目标'},
}, },
targeted:{ targeted:{
charlotte:true, charlotte:true,
trigger:{global:'phaseEnd'}, trigger:{global:'phaseEnd'},
filter:function(event,player){ filter:function(event,player){
if(!player.getStorage('clanmingjie_effect').contains(event.player)) return false; var cards=player.getStorage('clanmingjie_record').slice();
return event.player!=player||!player.getHistory('useSkill',evt=>evt.skill=='clanmingjie'&&evt.targets[0]==player).length; cards=cards.filterInD('d');
if(!cards.length) return false;
var history=player.getHistory('useSkill',evt=>evt.skill=='clanmingjie');
if(history.length){
var targets=history.reduce((list,evt)=>list.addArray(evt.targets),[]);
if(event.player!=player&&targets.includes(event.player)) return true;
}
if(player.actionHistory.length>=2){
for(var i=player.actionHistory.length-2;i>=0;i--){
if(!player.actionHistory[i].isMe) continue;
var history2=player.actionHistory[i].useSkill.filter(evt=>evt.skill=='clanmingjie');
if(history2.length){
var targets2=history2.reduce((list,evt)=>list.addArray(evt.targets),[]);
if(targets2.includes(event.player)) return true;
}
break;
}
}
return false;
}, },
forced:true, forced:true,
popup:false, popup:false,
@ -764,10 +791,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 0' 'step 0'
var cards=player.getStorage('clanmingjie_record').slice(); var cards=player.getStorage('clanmingjie_record').slice();
cards=cards.filterInD('d'); cards=cards.filterInD('d');
if(cards.length){ event.cards=cards;
event.cards=cards;
}
else event.goto(4);
'step 1' 'step 1'
player.chooseButton(['铭戒:是否使用这些牌?',cards]).set('filterButton',button=>{ player.chooseButton(['铭戒:是否使用这些牌?',cards]).set('filterButton',button=>{
return _status.event.player.hasUseTarget(button.link); return _status.event.player.hasUseTarget(button.link);
@ -782,24 +806,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
game.delayx(); game.delayx();
player.chooseUseTarget(card,true); player.chooseUseTarget(card,true);
} }
else event.goto(4); else event.finish();
'step 3' 'step 3'
if(event.cards.filter(card=>{ if(event.cards.filter(card=>{
return get.position(card,true)=='d'&&player.hasUseTarget(card); return get.position(card,true)=='d'&&player.hasUseTarget(card);
}).length) event.goto(1); }).length) event.goto(1);
'step 4'
player.unmarkAuto('clanmingjie_effect',[trigger.player]);
trigger.player.unmarkAuto('clanmingjie_mark',[player]);
'step 5'
if(!player.getStorage('clanmingjie_effect').length) player.removeSkill('clanmingjie_effect');
if(!trigger.player.getStorage('clanmingjie_mark').length) player.removeSkill('clanmingjie_mark');
}, },
}, },
mark:{
charlotte:true,
marktext:'戒',
intro:{content:'已被$指定为【铭戒】目标'},
},
record:{ record:{
charlotte:true, charlotte:true,
trigger:{ trigger:{
@ -2634,7 +2647,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
clanjiexuan:'解悬', clanjiexuan:'解悬',
clanjiexuan_info:'限定技,转换技。阴:你可以将一张红色牌当【顺手牵羊】使用;阳:你可以将一张黑色牌当【过河拆桥】使用。', clanjiexuan_info:'限定技,转换技。阴:你可以将一张红色牌当【顺手牵羊】使用;阳:你可以将一张黑色牌当【过河拆桥】使用。',
clanmingjie:'铭戒', clanmingjie:'铭戒',
clanmingjie_info:'限定技。出牌阶段,你可以选择一名角色,然后直到其下回合结束时,当你使用牌时你可以指定其为额外目标。然后其下回合结束时,你可以使用本回合使用过的黑桃牌和被抵消过的牌。', clanmingjie_info:'限定技。出牌阶段,你可以选择一名角色,然后你获得此下效果:①你使用牌时你可以指定其为额外目标直到其下个回合结束。②其下个回合结束时(若该角色为你则改为你的下下个回合结束时),你可以使用本回合使用过的黑桃牌和被抵消过的牌。',
clan_wanghun:'族王浑', clan_wanghun:'族王浑',
clanfuxun:'抚循', clanfuxun:'抚循',
clanfuxun_info:'出牌阶段限一次。你可以获得或交给一名其他角色一张手牌,然后若其手牌数与你相等且于此阶段仅以此法获得或失去过牌,你可以将一张牌当任意基本牌使用。', clanfuxun_info:'出牌阶段限一次。你可以获得或交给一名其他角色一张手牌,然后若其手牌数与你相等且于此阶段仅以此法获得或失去过牌,你可以将一张牌当任意基本牌使用。',

View File

@ -803,7 +803,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
silent:true, silent:true,
content:function(){ content:function(){
player.exitSubPlayer(true); player.exitSubPlayer(true);
game.createTrigger('phaseAfter','lianjing',player,trigger); if(lib.filter.filterTrigger(trigger,player,'phaseAfter','lianjing')) game.createTrigger('phaseAfter','lianjing',player,trigger);
} }
} }
}, },

View File

@ -8203,7 +8203,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
hs:get.cards(4) hs:get.cards(4)
}); });
player.callSubPlayer(player.storage.huanfeng_end); 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', // group:'huanfeng_end',
subSkill:{ subSkill:{

View File

@ -3130,7 +3130,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var keys=['filterTarget','selectTarget','ai2']; var keys=['filterTarget','selectTarget','ai2'];
for(var key of keys) delete next[key]; for(var key of keys) delete next[key];
for(var i in trigger){ 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.filterTargetx=trigger.filterTarget||(()=>false);
next.filterTarget=function(card,player,target){ 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; if(list.length>0) continue;
var info=get.info(skill); var info=get.info(skill);
if(info&&(!info.unique||info.gainable)){ 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); skills.add(skill);
} }
} }
@ -3744,6 +3744,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.addSkillBlocker('sbyingmen'); player.addSkillBlocker('sbyingmen');
game.log(player,'将','#y'+get.translation(characters),'加入了','#g“访客”'); game.log(player,'将','#y'+get.translation(characters),'加入了','#g“访客”');
game.broadcastAll(function(player,characters){ game.broadcastAll(function(player,characters){
player.tempname.addArray(characters);
player.$draw(characters.map(function(name){ player.$draw(characters.map(function(name){
var cardname='huashen_card_'+name; var cardname='huashen_card_'+name;
lib.card[cardname]={ lib.card[cardname]={
@ -3764,6 +3765,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var characters2=player.getStorage('sbyingmen').slice(0); var characters2=player.getStorage('sbyingmen').slice(0);
characters2.removeArray(characters); characters2.removeArray(characters);
skills.removeArray(lib.skill.sbyingmen.getSkills(characters2,player)); skills.removeArray(lib.skill.sbyingmen.getSkills(characters2,player));
game.broadcastAll((player,characters)=>player.tempname.removeArray(characters),player,characters);
player.unmarkAuto('sbyingmen',characters); player.unmarkAuto('sbyingmen',characters);
_status.characterlist.addArray(characters); _status.characterlist.addArray(characters);
player.removeInvisibleSkill(skills); player.removeInvisibleSkill(skills);

View File

@ -20,6 +20,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
connect:true, connect:true,
character:{ character:{
ol_jianyong:['male','shu',3,['olqiaoshui','jyzongshi'],['unseen']],
ol_lingtong:['male','wu',4,['olxuanfeng'],['die_audio:re_lingtong','unseen']], ol_lingtong:['male','wu',4,['olxuanfeng'],['die_audio:re_lingtong','unseen']],
re_xushu:['male','shu',4,['zhuhai','qianxin']], re_xushu:['male','shu',4,['zhuhai','qianxin']],
re_lidian:['male','wei',3,['xunxun','xinwangxi']], re_lidian:['male','wei',3,['xunxun','xinwangxi']],
@ -170,6 +171,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_guohuai:['xiahouyuan','zhanghe'], re_guohuai:['xiahouyuan','zhanghe'],
}, },
skill:{ skill:{
//界简雍
olqiaoshui:{
audio:2,
inherit:'reqiaoshui',
filter:function(event,player){
return player.countCards('h')>0&&!player.hasSkill('olqiaoshui_used');
},
content:function(){
'step 0'
player.chooseToCompare(target);
'step 1'
if(result.bool) player.addTempSkill('qiaoshui3',{player:'phaseUseAfter'});
else{
player.addTempSkill('qiaoshui2');
player.addTempSkill('olqiaoshui_used');
}
},
subSkill:{
used:{
charlotte:true,
mark:true,
marktext:'<span style="text-decoration: line-through;">说</span>',
intro:{content:'被迫闭嘴'},
},
},
},
//界凌统 //界凌统
olxuanfeng:{ olxuanfeng:{
audio:'xuanfeng', audio:'xuanfeng',
@ -10620,10 +10647,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
if(event.control=='弃置化身') return; if(event.control=='弃置化身') return;
if(player.storage.rehuashen.current!=event.card){ if(player.storage.rehuashen.current!=event.card){
const old=player.storage.rehuashen.current;
player.storage.rehuashen.current=event.card; player.storage.rehuashen.current=event.card;
game.broadcastAll(function(player,sex){ game.broadcastAll(function(player,character,old){
player.sex=sex; player.tempname.remove(old);
},player,lib.character[event.card][0]); 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])+'性'); game.log(player,'将性别变为了','#y'+get.translation(lib.character[event.card][0])+'性');
player.changeGroup(lib.character[event.card][1]); player.changeGroup(lib.character[event.card][1]);
} }
@ -10636,7 +10666,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.popup(link); player.popup(link);
player.syncStorage('rehuashen'); player.syncStorage('rehuashen');
player.updateMarks('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){ init:function(player,skill){
@ -10752,42 +10782,42 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
return node; return node;
}, },
createAudio:(character,skillx,name)=>{ // createAudio:(character,skillx,name)=>{
var skills=game.expandSkills([skillx]); // var skills=game.expandSkills([skillx]);
skills=skills.filter(skill=>get.info(skill)); // skills=skills.filter(skill=>get.info(skill));
if(!skills.length) return; // if(!skills.length) return;
var skillss=skills.filter(skill=>get.info(skill).derivation); // var skillss=skills.filter(skill=>get.info(skill).derivation);
if(skillss.length){ // if(skillss.length){
skillss.forEach(skill=>{ // skillss.forEach(skill=>{
var derivationSkill=get.info(skill).derivation; // var derivationSkill=get.info(skill).derivation;
skills[Array.isArray(derivationSkill)?'addArray':'add'](derivationSkill); // skills[Array.isArray(derivationSkill)?'addArray':'add'](derivationSkill);
}); // });
} // }
skills.forEach(skill=>{ // skills.forEach(skill=>{
var info=lib.skill[skill]; // var info=lib.skill[skill];
if(info){ // if(info){
if(!info.audioname2) info.audioname2={}; // if(!info.audioname2) info.audioname2={};
if(info.audioname&&info.audioname.includes(character)){ // if(info.audioname&&info.audioname.includes(character)){
if(info.audio){ // if(info.audio){
if(typeof info.audio=='string') skill=info.audio; // if(typeof info.audio=='string') skill=info.audio;
if(Array.isArray(info.audio)) skill=info.audio[0]; // if(Array.isArray(info.audio)) skill=info.audio[0];
} // }
if(!lib.skill[skill+'_'+character]) lib.skill[skill+'_'+character]={audio:2}; // if(!lib.skill[skill+'_'+character]) lib.skill[skill+'_'+character]={audio:2};
info.audioname2[name]=(skill+'_'+character); // info.audioname2[name]=(skill+'_'+character);
} // }
else if(info.audioname2[character]){ // else if(info.audioname2[character]){
info.audioname2[name]=info.audioname2[character]; // info.audioname2[name]=info.audioname2[character];
} // }
else{ // else{
if(info.audio){ // if(info.audio){
if(typeof info.audio=='string') skill=info.audio; // if(typeof info.audio=='string') skill=info.audio;
if(Array.isArray(info.audio)) skill=info.audio[0]; // if(Array.isArray(info.audio)) skill=info.audio[0];
} // }
info.audioname2[name]=skill; // info.audioname2[name]=skill;
} // }
} // }
}); // });
}, // },
mark:true, mark:true,
intro:{ intro:{
onunmark:function(storage,player){ onunmark:function(storage,player){
@ -13882,7 +13912,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:["changeHp"], player:["changeHp"],
}, },
audio:2, audio:2,
audioname:{gongsunzan:'yicong'}, audioname2:{gongsunzan:'yicong'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
return get.sgn(player.hp-2.5)!=get.sgn(player.hp-2.5-event.num); return get.sgn(player.hp-2.5)!=get.sgn(player.hp-2.5-event.num);
@ -15612,6 +15642,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_lidian_prefix:'界', re_lidian_prefix:'界',
re_xushu:'界徐庶', re_xushu:'界徐庶',
re_xushu_prefix:'界', re_xushu_prefix:'界',
ol_jianyong:'OL界简雍',
ol_jianyong_prefix:'OL界',
olqiaoshui:'巧说',
olqiaoshui_info:'出牌阶段,你可与一名其他角色拼点。若你赢,你使用的下一张基本牌或普通锦囊牌可以额外指定任意一名其他角色为目标或减少指定一个目标;若你没赢,此技能于本回合失效且本回合你不能使用锦囊牌。',
refresh_standard:'界限突破·标', refresh_standard:'界限突破·标',
refresh_feng:'界限突破·风', refresh_feng:'界限突破·风',

View File

@ -4412,9 +4412,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!event.logged) player.logSkill('huashen'); if(!event.logged) player.logSkill('huashen');
var skill=map.skill,character=map.character; var skill=map.skill,character=map.character;
if(character!=player.storage.huashen.current){ if(character!=player.storage.huashen.current){
const old=player.storage.huashen.current;
player.storage.huashen.current=character; player.storage.huashen.current=character;
player.markSkill('huashen'); 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.sex=lib.character[character][0];
//player.group=lib.character[character][1]; //player.group=lib.character[character][1];
//player.node.name.dataset.nature=get.groupnature(player.group); //player.node.name.dataset.nature=get.groupnature(player.group);
@ -4434,7 +4437,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},50); },50);
},200); },200);
} }
},character,player); },player,character,old);
game.log(player,'将性别变为了','#y'+get.translation(lib.character[character][0])+'性'); game.log(player,'将性别变为了','#y'+get.translation(lib.character[character][0])+'性');
player.changeGroup(lib.character[character][1]); player.changeGroup(lib.character[character][1]);
} }
@ -4446,7 +4449,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.popup(skill); player.popup(skill);
player.syncStorage('huashen'); player.syncStorage('huashen');
player.updateMarks('huashen'); player.updateMarks('huashen');
lib.skill.rehuashen.createAudio(character,skill,'zuoci'); // lib.skill.rehuashen.createAudio(character,skill,'zuoci');
} }
} }
} }

View File

@ -703,6 +703,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
skill:{ skill:{
//OL飞扬
olfeiyang:{
trigger:{player:'phaseZhunbeiBegin'},
filter:function(event,player){
return player.countCards('he',card=>{
if(_status.connectMode&&get.position(card)=='h') return true;
return lib.filter.cardDiscardable(card,player);
})>=3&&player.countCards('j');
},
direct:true,
//limited:true,
//skillAnimation:true,
//animationColor:'orange',
content:function(){
'step 0'
player.chooseToDiscard(get.prompt2('olfeiyang'),'he',3).set('ai',function(card){
var player=_status.event.player;
if(player.hasCard(function(card){
return get.effect(player,{
name:card.viewAs||card.name,
cards:[card],
},player,player)<0;
},'j')) return 6-get.value(card);
return 0;
}).set('logSkill','olfeiyang');
'step 1'
if(result.bool){
//player.awakenSkill('olfeiyang');
player.discardPlayerCard(player,'j',true);
}
},
},
//李婉 //李婉
ollianju:{ ollianju:{
audio:2, audio:2,
@ -8092,7 +8124,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2, audio:2,
enable:'chooseToUse', enable:'chooseToUse',
hiddenCard:function(player,name){ hiddenCard:function(player,name){
if(get.type(name)=='basic'&&lib.inpile.contains(name)&&!player.getStorage('yilie_count').contains(name)){ if(get.type(name)=='basic'&&lib.inpile.contains(name)&&!player.getStorage('yilie_count').includes(name)){
var hs=player.getCards('hs'); var hs=player.getCards('hs');
if(hs.length<2) return false; if(hs.length<2) return false;
var bool=false,map={}; var bool=false,map={};
@ -8123,7 +8155,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
if(!bool) return false; if(!bool) return false;
for(var name of lib.inpile){ for(var name of lib.inpile){
if(get.type(name)!='basic'||list.contains(name)) continue; if(get.type(name)!='basic'||list.includes(name)) continue;
var card={name:name}; var card={name:name};
if(event.filterCard(card,player,event)) return true; if(event.filterCard(card,player,event)) return true;
if(name=='sha'){ if(name=='sha'){
@ -8138,10 +8170,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
chooseButton:{ chooseButton:{
dialog:function(event,player){ dialog:function(event,player){
var list=[]; var list=[];
var storage=player.storage.yilie_count; var storage=player.getStorage('yilie_count');
for(var i of lib.inpile){ for(var i of lib.inpile){
if(get.type(i)!='basic') continue; if(get.type(i)!='basic'||storage.includes(i)) continue;
if(storage&&storage.contains(i)) continue;
var card={name:i,isCard:true}; var card={name:i,isCard:true};
if(event.filterCard(card,player,event)) list.push(['基本','',i]); if(event.filterCard(card,player,event)) list.push(['基本','',i]);
if(i=='sha'){ if(i=='sha'){
@ -8154,25 +8185,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return ui.create.dialog('义烈',[list,'vcard'],'hidden') return ui.create.dialog('义烈',[list,'vcard'],'hidden')
}, },
check:function(button){ check:function(button){
let player=_status.event.player,hs=player.getCards('h',card=>{ var player=_status.event.player;
return get.name(card)!==button.link[2]&&(!button.link[3]||get.hasNature(card,button.link[3])); var evt=_status.event.getParent();
}),bool=false,map={}; var name=button.link[2],card={name:name,nature:button.link[3]};
for(let i of hs){ if(name=='shan') return 2;
let color=get.color(i); if(evt.type=='dying'){
if(!map[color]) map[color]=true; if(get.attitude(player,evt.dying)<2) return 0;
else{ if(name=='jiu') return 2.1;
bool=true; return 1.9;
break; }
if(evt.type=='phase'){
if(button.link[2]=='jiu'){
if(player.getUseValue({name:'jiu'})<=0) return 0;
var cards=player.getCards('hs',cardx=>get.value(cardx)<8);
cards.sort((a,b)=>get.value(a)-get.value(b));
if(cards.some(cardx=>get.name(cardx)=='sha'&&!cards.slice(0,2).includes(cardx))) return player.getUseValue({name:'jiu'});
return 0;
} }
return player.getUseValue(card)/4;
} }
if(!bool) return 0; return 1;
if(button.link[2]=='shan') return 3;
if(button.link[2]=='jiu'){
if(player.getUseValue({name:'jiu'})<=0) return 0;
if(player.countCards('h','sha')) return player.getUseValue({name:'jiu'});
return 0;
}
return player.getUseValue({name:button.link[2],nature:button.link[3]})/4;
}, },
backup:function(links,player){ backup:function(links,player){
return { return {
@ -8187,10 +8219,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
position:'hs', position:'hs',
complexCard:true, complexCard:true,
check:(card)=>{ check:(card)=>8-get.value(card),
if(get.name(card)===lib.skill.yilie_backup.viewAs.name&&(!lib.skill.yilie_backup.viewAs.nature||game.hasNature(card,lib.skill.yilie_backup.viewAs.nature))) return -1;
return 8-get.value(card);
},
popname:true, popname:true,
viewAs:{ viewAs:{
name:links[0][2], name:links[0][2],
@ -8211,12 +8240,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
ai:{ ai:{
order:function(item,player){ order:function(item,player){
return 2.6; if(player&&_status.event.type=='phase'){
var add=false,max=0;
var names=lib.inpile.filter(name=>get.type(name)=='basic'&&!player.getStorage('yilie_count').includes(name));
if(names.includes('sha')) add=true;
names=names.map(namex=>{return {name:namex}});
if(add) lib.inpile_nature.forEach(nature=>names.push({name:'sha',nature:nature}));
names.forEach(card=>{
if(player.getUseValue(card)>0){
var temp=get.order(card);
if(card.name=='jiu'){
var cards=player.getCards('hs',cardx=>get.value(cardx)<8);
cards.sort((a,b)=>get.value(a)-get.value(b));
if(!cards.some(cardx=>get.name(cardx)=='sha'&&!cards.slice(0,2).includes(cardx))) temp=0;
}
if(temp>max) max=temp;
}
});
if(max>0) max-=0.001;
return max;
}
return 0.5;
}, },
respondShan:true, respondShan:true,
respondSha:true, respondSha:true,
fireAttack:true, fireAttack:true,
skillTagFilter:function(player,tag){ skillTagFilter:function(player,tag,arg){
if(arg=='respond') return false;
var hs=player.getCards('hs'); var hs=player.getCards('hs');
if(hs.length<2) return false; if(hs.length<2) return false;
var bool=false,map={}; var bool=false,map={};
@ -26628,6 +26678,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
oldhuxiao_info:'锁定技,当你使用的【杀】被【闪】抵消后,你令此【杀】不计入使用次数。', oldhuxiao_info:'锁定技,当你使用的【杀】被【闪】抵消后,你令此【杀】不计入使用次数。',
oldwuji:'武继', oldwuji:'武继',
oldwuji_info:'觉醒技结束阶段若你本回合造成了3点或更多伤害你加1点体力上限并回复1点体力并失去技能〖虎啸〗。', oldwuji_info:'觉醒技结束阶段若你本回合造成了3点或更多伤害你加1点体力上限并回复1点体力并失去技能〖虎啸〗。',
olfeiyang:'飞扬',
//olfeiyang_info:'限定技。准备阶段,你可以弃置两张牌,然后弃置判定区的一张牌。',
olfeiyang_info:'准备阶段,你可以弃置三张牌,然后弃置判定区的一张牌。',
sp_tianji:'天极·皇室宗亲', sp_tianji:'天极·皇室宗亲',

View File

@ -8366,7 +8366,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.addTempSkill(result.control); player.addTempSkill(result.control);
player.storage.pingjian_check[result.control]=(trigger.name=='damage'?trigger:'phaseJieshu'); player.storage.pingjian_check[result.control]=(trigger.name=='damage'?trigger:'phaseJieshu');
var name=event.list.find(name=>lib.character[name][3].includes(result.control)); 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', group:'pingjian_use',
phaseUse_special:[], phaseUse_special:[],
@ -8454,7 +8455,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.addTempSkill(result.control); player.addTempSkill(result.control);
player.storage.pingjian_check[result.control]='phaseUse'; player.storage.pingjian_check[result.control]='phaseUse';
var name=event.list.find(name=>lib.character[name][3].includes(result.control)); 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}}, ai:{order:12,result:{player:1}},
}, },
@ -8473,6 +8475,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){ content:function(){
var skill=trigger.sourceSkill||trigger.skill; var skill=trigger.sourceSkill||trigger.skill;
player.removeSkill(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]; delete player.storage.pingjian_check[skill];
}, },
group:'pingjian_check2', group:'pingjian_check2',
@ -8495,6 +8499,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.storage.pingjian_check[skill]==trigger; return player.storage.pingjian_check[skill]==trigger;
}); });
player.removeSkill(skills); 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]; for(var skill of skills) delete player.storage.pingjian_check[skill];
}, },
}, },

View File

@ -100,7 +100,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.draw(3); player.draw(3);
player.addSkill('shuiyun'); player.addSkill('shuiyun');
'step 1' 'step 1'
game.createTrigger('phaseEnd','shuiyun',player,trigger); if(lib.filter.filterTrigger(trigger,player,'phaseEnd','shuiyun')) game.createTrigger('phaseEnd','shuiyun',player,trigger);
}, },
}, },
shenwu:{ shenwu:{

View File

@ -5114,7 +5114,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
jyzongshi:{ jyzongshi:{
audio:2, audio:2,
audioname:['re_jianyong'], audioname:['re_jianyong','ol_jianyong'],
trigger:{player:['chooseToCompareAfter','compareMultipleAfter'],target:['chooseToCompareAfter','compareMultipleAfter']}, trigger:{player:['chooseToCompareAfter','compareMultipleAfter'],target:['chooseToCompareAfter','compareMultipleAfter']},
filter:function(event,player){ filter:function(event,player){
if(event.preserve) return false; if(event.preserve) return false;
@ -10272,6 +10272,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audioname2:{ audioname2:{
re_jianyong:'reqiaoshui', re_jianyong:'reqiaoshui',
xin_jianyong:'xinqiaoshui', xin_jianyong:'xinqiaoshui',
ol_jianyong:'olqiaoshui',
}, },
trigger:{player:'useCard2'}, trigger:{player:'useCard2'},
filter:function(event,player){ filter:function(event,player){
@ -13910,7 +13911,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
masu:['xin_masu','re_masu','masu'], masu:['xin_masu','re_masu','masu'],
xusheng:['xusheng','xin_xusheng','re_xusheng','old_xusheng'], xusheng:['xusheng','xin_xusheng','re_xusheng','old_xusheng'],
wuguotai:['wuguotai','xin_wuguotai','re_wuguotai'], wuguotai:['wuguotai','xin_wuguotai','re_wuguotai'],
lingtong:['lingtong','xin_lingtong','re_lingtong','old_lingtong'], lingtong:['lingtong','xin_lingtong','ol_lingtong','re_lingtong','old_lingtong'],
gaoshun:['gaoshun','xin_gaoshun','re_gaoshun','old_gaoshun'], gaoshun:['gaoshun','xin_gaoshun','re_gaoshun','old_gaoshun'],
zhonghui:['zhonghui','xin_zhonghui','re_zhonghui','old_zhonghui','pe_zhonghui'], zhonghui:['zhonghui','xin_zhonghui','re_zhonghui','old_zhonghui','pe_zhonghui'],
wangyi:['wangyi','re_wangyi','old_wangyi'], wangyi:['wangyi','re_wangyi','old_wangyi'],
@ -13925,7 +13926,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
manchong:['manchong','re_manchong'], manchong:['manchong','re_manchong'],
caochong:['caochong','re_caochong','old_caochong'], caochong:['caochong','re_caochong','old_caochong'],
guohuai:['guohuai','re_guohuai','xin_guohuai','tw_guohuai','ol_guohuai'], guohuai:['guohuai','re_guohuai','xin_guohuai','tw_guohuai','ol_guohuai'],
jianyong:['jianyong','re_jianyong','xin_jianyong'], jianyong:['jianyong','ol_jianyong','re_jianyong','xin_jianyong'],
panzhangmazhong:['panzhangmazhong','re_panzhangmazhong','xin_panzhangmazhong'], panzhangmazhong:['panzhangmazhong','re_panzhangmazhong','xin_panzhangmazhong'],
yufan:['yufan','xin_yufan','re_yufan'], yufan:['yufan','xin_yufan','re_yufan'],
zhuran:['zhuran','re_zhuran','xin_zhuran','old_zhuran'], zhuran:['zhuran','re_zhuran','xin_zhuran','old_zhuran'],

View File

@ -31,7 +31,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
characterSort:{ characterSort:{
yingbian:{ yingbian:{
yingbian_pack1:['jin_simayi','jin_zhangchunhua','ol_lisu','simazhou','cheliji','ol_huaxin'], yingbian_pack1:['jin_simayi','jin_zhangchunhua','ol_lisu','simazhou','cheliji','ol_huaxin'],
yingbian_pack2:['jin_simashi','jin_xiahouhui','zhanghuyuechen','shibao','jin_yanghuiyu'], yingbian_pack2:['jin_simashi','jin_xiahouhui','zhanghuyuechen','shibao','jin_yanghuiyu','chengjichengcui'],
yingbian_pack3:['jin_simazhao','jin_wangyuanji','duyu','weiguan','xuangongzhu'], yingbian_pack3:['jin_simazhao','jin_wangyuanji','duyu','weiguan','xuangongzhu'],
yingbian_pack4:['zhongyan','xinchang','jin_jiachong','wangxiang'], yingbian_pack4:['zhongyan','xinchang','jin_jiachong','wangxiang'],
yingbian_pack5:['yangyan','yangzhi'], yingbian_pack5:['yangyan','yangzhi'],

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -583,8 +583,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
uiintro.add('<div class="text chat">侯选人数:'+lib.configOL.choice_num+'人'); uiintro.add('<div class="text chat">侯选人数:'+lib.configOL.choice_num+'人');
uiintro.add('<div class="text chat">替补人数:'+lib.configOL.replace_number+'人'); uiintro.add('<div class="text chat">替补人数:'+lib.configOL.replace_number+'人');
} }
else if(lib.configOL.versus_mode=='2v2'||lib.configOL.versus_mode=='3v3'){ if(lib.configOL.versus_mode=='2v2'||lib.configOL.versus_mode=='3v3'){
uiintro.add('<div class="text chat">四号位换牌:'+(lib.configOL.replace_handcard?'开启':'关闭')); uiintro.add('<div class="text chat">四号位保护:'+(lib.configOL.replace_handcard?'开启':'关闭'));
if(lib.configOL.versus_mode=='2v2') uiintro.add('<div class="text chat">四号位【飞扬】:'+(lib.configOL.olfeiyang_four?'开启':'关闭'));
} }
var last=uiintro.add('<div class="text chat">出牌时限:'+lib.configOL.choose_timeout+'秒'); var last=uiintro.add('<div class="text chat">出牌时限:'+lib.configOL.choose_timeout+'秒');
// uiintro.add('<div class="text chat">屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); // uiintro.add('<div class="text chat">屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭'));
@ -1427,7 +1428,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
setTimeout(function(){ setTimeout(function(){
ui.arena.classList.remove('choose-character'); ui.arena.classList.remove('choose-character');
},500); },500);
if(get.config('olfeiyang_four')){
var target=_status.firstAct.previous;
if(target.isIn()) target.addSkill('olfeiyang');
}
game.addGlobalSkill('versus_viewHandcard'); game.addGlobalSkill('versus_viewHandcard');
if(get.config('two_phaseswap')){ if(get.config('two_phaseswap')){
game.addGlobalSkill('autoswap'); game.addGlobalSkill('autoswap');
@ -3384,6 +3388,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
setTimeout(function(){ setTimeout(function(){
ui.arena.classList.remove('choose-character'); ui.arena.classList.remove('choose-character');
},500); },500);
if(lib.configOL.olfeiyang_four){
var target=_status.firstAct.previous;
if(target.isIn()) target.addSkill('olfeiyang');
}
game.addGlobalSkill('versus_viewHandcard'); game.addGlobalSkill('versus_viewHandcard');
}); });
}, },
@ -7060,10 +7068,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(this.replacetwo){ if(this.replacetwo){
game.replacePlayerTwo(this,this.replacetwo); game.replacePlayerTwo(this,this.replacetwo);
delete this.replacetwo; delete this.replacetwo;
if(get.config('olfeiyang_four')&&this==_status.firstAct.previous){
this.addSkill('olfeiyang');
}
} }
else if(friend&&friend.replacetwo){ else if(friend&&friend.replacetwo){
game.replacePlayerTwo(this,friend.replacetwo); game.replacePlayerTwo(this,friend.replacetwo);
delete friend.replacetwo; delete friend.replacetwo;
if(get.config('olfeiyang_four')&&this==_status.firstAct.previous){
this.addSkill('olfeiyang');
}
} }
else{ else{
game.over(this.side!=me.side); game.over(this.side!=me.side);