commit
aed7e098fb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -101,38 +101,91 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return !target.hasSkill('wuling_wuqinxi');
|
return !target.hasSkill('wuling_wuqinxi');
|
||||||
},
|
},
|
||||||
usable:1,
|
usable:1,
|
||||||
|
prompt:'选择一名角色,向其传授“五禽戏”',
|
||||||
|
group:'wuling_die',
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
target.addSkill('wuling_wuqinxi');
|
target.addAdditionalSkill(`wuling_${player.playerid}`,'wuling_wuqinxi');
|
||||||
player.chooseControl(lib.skill.wuling.wuqinxi).set('prompt','五灵:请选择'+get.translation(target)+'的初始五禽戏效果').set('ai',()=>['鹿','熊'].randomGet()).set('choiceList',lib.skill.wuling.wuqinxiMap);
|
var next=player.chooseToMove(`五灵:调整向${get.translation(target)}传授的“五禽戏”顺序`);
|
||||||
|
next.set('list',[
|
||||||
|
['',[lib.skill.wuling.wuqinxi,(item,type,position,noclick,node)=>{
|
||||||
|
node=ui.create.buttonPresets.vcard(item,type,position,noclick);
|
||||||
|
node._customintro=[
|
||||||
|
node=>`五禽戏:${node.link[2]}`,
|
||||||
|
node=>lib.skill.wuling.wuqinxiMap[lib.skill.wuling.wuqinxi.indexOf(node.link[2])].slice(2)
|
||||||
|
];
|
||||||
|
return node;
|
||||||
|
}]]
|
||||||
|
]);
|
||||||
|
next.set('processAI',()=>{
|
||||||
|
const event=get.event().getParent(),player=event.player,target=event.target;
|
||||||
|
const spirits=[];
|
||||||
|
let nextPlayer=player;
|
||||||
|
do{
|
||||||
|
nextPlayer=nextPlayer.getNext();
|
||||||
|
if(get.attitude(player,nextPlayer)<0){
|
||||||
|
spirits.add('熊');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while(nextPlayer!=target);
|
||||||
|
if(!spirits.length) spirits.add('猿');
|
||||||
|
if(get.recoverEffect(target,player,player)>0||target.hasCard(card=>{
|
||||||
|
return get.effect(target,{
|
||||||
|
name:card.viewAs||card.name,
|
||||||
|
cards:[card],
|
||||||
|
},target,target)<-1;
|
||||||
|
},'j')) spirits.add('鹿');
|
||||||
|
const others=lib.skill.wuling.wuqinxi.slice().removeArray(spirits);
|
||||||
|
do{
|
||||||
|
others.randomSort();
|
||||||
|
}
|
||||||
|
while(others.length>1&&others[0]=='鹿');
|
||||||
|
return [spirits.concat(others).map(i=>['','',i])];
|
||||||
|
})
|
||||||
'step 1'
|
'step 1'
|
||||||
player.popup(result.control);
|
var sortedWuqinxi=result.moved[0].map(i=>i[2]);
|
||||||
target.storage.wuling_wuqinxi=result.control;
|
game.log(target,'习得的五禽戏顺序为','#g'+sortedWuqinxi.join('、'));
|
||||||
|
sortedWuqinxi.unshift(sortedWuqinxi[0]);
|
||||||
|
target.storage.wuling_wuqinxi=sortedWuqinxi;
|
||||||
lib.skill.wuling.updateMark(target);
|
lib.skill.wuling.updateMark(target);
|
||||||
},
|
},
|
||||||
wuqinxi:['虎','鹿','熊','猿','鹤'],
|
wuqinxi:['虎','鹿','熊','猿','鹤'],
|
||||||
wuqinxiMap:[
|
wuqinxiMap:[
|
||||||
'虎:使用仅指定唯一目标的牌对目标角色造成的伤害+1',
|
'虎:当你使用指定唯一目标的牌对目标角色造成伤害时,此伤害+1。',
|
||||||
'鹿:回复1点体力并弃置判定区的所有牌;不能成为延时锦囊牌的目标',
|
'鹿:①当你获得此效果时,你回复1点体力并弃置判定区的所有牌。②你不能成为延时锦囊牌的目标。',
|
||||||
'熊:受到伤害时,此伤害-1',
|
'熊:当你受到伤害时,此伤害-1。',
|
||||||
'猿:出牌阶段开始时,选择一名角色,随机获得其装备区里的一张牌',
|
'猿:出牌阶段开始时,你选择一名角色,随机获得其装备区里的一张牌。',
|
||||||
'鹤:出牌阶段开始时,摸两张牌',
|
'鹤:出牌阶段开始时,你摸两张牌。',
|
||||||
],
|
],
|
||||||
updateMark:function(player){
|
updateMark:function(player){
|
||||||
var wuqinxi=player.storage.wuling_wuqinxi;
|
var wuqinxi=player.storage.wuling_wuqinxi;
|
||||||
game.log(player,'获得了','#g【'+wuqinxi+'】','标记');
|
if(!wuqinxi) return;
|
||||||
|
var prevMark=wuqinxi.shift();
|
||||||
|
// wuqinxi.push(prevMark);
|
||||||
|
var curMark=wuqinxi[0];
|
||||||
|
if(!curMark){
|
||||||
|
for(var skill in player.additionalSkills){
|
||||||
|
if(!skill.startsWith('wuling_')) continue;
|
||||||
|
player.removeAdditionalSkill(skill);
|
||||||
|
}
|
||||||
|
game.log(player,'完成了五禽戏的操练');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
game.log(player,'获得了','#g【'+curMark+'】','标记');
|
||||||
player.markSkill('wuling_wuqinxi');
|
player.markSkill('wuling_wuqinxi');
|
||||||
game.broadcastAll(function(player,wuqinxi){
|
game.broadcastAll(function(player,curMark){
|
||||||
if(player.marks.wuling_wuqinxi) player.marks.wuling_wuqinxi.firstChild.innerHTML=wuqinxi;
|
if(player.marks.wuling_wuqinxi) player.marks.wuling_wuqinxi.firstChild.innerHTML=curMark;
|
||||||
},player,wuqinxi);
|
},player,curMark);
|
||||||
if(wuqinxi=='鹿'){
|
if(curMark=='鹿'){
|
||||||
player.logSkill('wuling_wuqinxi');
|
player.logSkill('wuling_wuqinxi');
|
||||||
player.recover();
|
player.recover();
|
||||||
player.discard(player.getCards('j'));
|
player.discard(player.getCards('j')).discarder=player;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:7,
|
order:7,
|
||||||
|
threaten:5,
|
||||||
result:{target:1},
|
result:{target:1},
|
||||||
},
|
},
|
||||||
derivation:'wuling_wuqinxi',
|
derivation:'wuling_wuqinxi',
|
||||||
|
@ -141,51 +194,51 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
nopop:true,
|
nopop:true,
|
||||||
charlotte:true,
|
charlotte:true,
|
||||||
intro:{
|
intro:{
|
||||||
content:function(storage){
|
markcount:()=>0,
|
||||||
var str='<li>当前效果:'+storage;
|
mark:function(dialog,storage){
|
||||||
var list=lib.skill.wuling.wuqinxiMap.map(str2=>str2.slice(2));
|
const wuqinxiMap=lib.skill.wuling.wuqinxiMap;
|
||||||
str+='<br><li>';
|
const str=`<li>当前效果:${storage[0]}<br><li>${wuqinxiMap.find(str=>storage[0]==str[0]).slice(2)}<br>`;
|
||||||
str+=list[lib.skill.wuling.wuqinxi.indexOf(storage)];
|
dialog.addText(str,false);
|
||||||
return str;
|
const str2='<div class="text center">“五禽戏”顺序:<br>'+storage.join(' ')+'</div>';
|
||||||
|
dialog.addText(str2);
|
||||||
|
if(storage.length>1){
|
||||||
|
const str3=`<div class="text" style="font-size:10px; ">[下一效果] ${wuqinxiMap.find(str=>storage[1]==str[0])}<br></div>`;
|
||||||
|
dialog.add(str3);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mod:{
|
mod:{
|
||||||
targetEnabled:function(card,player,target){
|
targetEnabled:function(card,player,target){
|
||||||
if(get.type(card)=='delay'&&target.storage.wuling_wuqinxi&&target.storage.wuling_wuqinxi=='鹿') return false;
|
if(get.type(card)=='delay'&&target.storage.wuling_wuqinxi&&target.storage.wuling_wuqinxi[0]=='鹿') return false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
trigger:{
|
trigger:{
|
||||||
source:'damageBegin1',
|
source:'damageBegin1',
|
||||||
player:['phaseBegin','damageBegin2','phaseUseBegin'],
|
player:['phaseZhunbeiBegin','damageBegin4','phaseUseBegin'],
|
||||||
},
|
},
|
||||||
filter:function(event,player,name){
|
filter:function(event,player,name){
|
||||||
var wuqinxi=player.storage.wuling_wuqinxi;
|
const wuqinxi=player.storage.wuling_wuqinxi&&player.storage.wuling_wuqinxi[0];
|
||||||
if(!wuqinxi) return false;
|
if(!wuqinxi) return false;
|
||||||
if(event.name=='phase') return true;
|
if(event.name=='phaseZhunbei') return true;
|
||||||
switch(name){
|
switch(name){
|
||||||
case 'damageBegin1':
|
case 'damageBegin1':
|
||||||
if(wuqinxi!='虎'||!event.card) return false;
|
if(wuqinxi!='虎'||!event.card) return false;
|
||||||
var evt=event.getParent('useCard');
|
var evt=event.getParent('useCard');
|
||||||
return evt.targets&&evt.targets.length==1&&evt.targets.includes(event.player);
|
return evt.targets&&evt.targets.length==1&&evt.targets.includes(event.player);
|
||||||
break;
|
case 'damageBegin4':
|
||||||
case 'damageBegin2':
|
|
||||||
return wuqinxi=='熊';
|
return wuqinxi=='熊';
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
if(wuqinxi=='鹤') return true;
|
if(wuqinxi=='鹤') return true;
|
||||||
if(wuqinxi!='猿') return false;
|
if(wuqinxi!='猿') return false;
|
||||||
return game.hasPlayer(target=>target.countGainableCards(player,'e'));
|
return game.hasPlayer(target=>target.countGainableCards(player,'e'));
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
|
onremove:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var wuqinxi=player.storage.wuling_wuqinxi;
|
var wuqinxi=player.storage.wuling_wuqinxi[0];
|
||||||
if(trigger.name=='phase'){
|
if(trigger.name=='phaseZhunbei'){
|
||||||
var num=lib.skill.wuling.wuqinxi.indexOf(wuqinxi)+1;
|
|
||||||
if(num>=lib.skill.wuling.wuqinxi.length) num-=lib.skill.wuling.wuqinxi.length;
|
|
||||||
player.storage.wuling_wuqinxi=lib.skill.wuling.wuqinxi[num];
|
|
||||||
lib.skill.wuling.updateMark(player);
|
lib.skill.wuling.updateMark(player);
|
||||||
event.finish();
|
event.finish();
|
||||||
}
|
}
|
||||||
|
@ -197,7 +250,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
trigger.num++;
|
trigger.num++;
|
||||||
event.finish();
|
event.finish();
|
||||||
break;
|
break;
|
||||||
case 'damageBegin2':
|
case 'damageBegin4':
|
||||||
trigger.num--;
|
trigger.num--;
|
||||||
event.finish();
|
event.finish();
|
||||||
break;
|
break;
|
||||||
|
@ -232,8 +285,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
ai:{
|
ai:{
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target){
|
target:function(card,player,target){
|
||||||
var wuqinxi=target.storage.wuling_wuqinxi;
|
const wuqinxi=target.storage.wuling_wuqinxi;
|
||||||
if(!wuqinxi||wuqinxi!='熊') return;
|
if(!wuqinxi||!wuqinxi.length) return;
|
||||||
|
const curWuqinxi=wuqinxi[0];
|
||||||
|
const nextWuqinxi=wuqinxi[1];
|
||||||
|
if(nextWuqinxi=='鹿'&&get.type(card)=='delay') return 'zerotarget';
|
||||||
|
if(curWuqinxi!='熊') return;
|
||||||
if(player.hasSkillTag('jueqing',false,target)) return;
|
if(player.hasSkillTag('jueqing',false,target)) return;
|
||||||
var num=get.tag(card,'damage');
|
var num=get.tag(card,'damage');
|
||||||
if(num){
|
if(num){
|
||||||
|
@ -244,6 +301,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
die:{
|
||||||
|
trigger:{player:'die'},
|
||||||
|
filter:function(event,player){
|
||||||
|
return game.hasPlayer(current=>current.additionalSkills[`wuling_${player.playerid}`]);
|
||||||
|
},
|
||||||
|
forced:true,
|
||||||
|
locked:false,
|
||||||
|
forceDie:true,
|
||||||
|
content:function(){
|
||||||
|
var targets=game.filterPlayer(current=>{
|
||||||
|
return current.additionalSkills[`wuling_${player.playerid}`];
|
||||||
|
});
|
||||||
|
player.line(targets);
|
||||||
|
targets.forEach(current=>current.removeAdditionalSkill(`wuling_${player.playerid}`));
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
youyi:{
|
youyi:{
|
||||||
|
@ -259,11 +332,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var cards=_status.renku.slice();
|
var cards=_status.renku.slice();
|
||||||
game.cardsDiscard(cards);
|
game.cardsDiscard(cards).fromRenku=true;
|
||||||
_status.renku.removeArray(cards);
|
_status.renku.removeArray(cards);
|
||||||
player.$throw(cards,1000);
|
player.$throw(cards,1000);
|
||||||
game.updateRenku();
|
game.updateRenku();
|
||||||
game.log(cards,'被置入了弃牌堆');
|
game.log(cards,'从仁库进入了弃牌堆');
|
||||||
'step 1'
|
'step 1'
|
||||||
var targets=game.filterPlayer();
|
var targets=game.filterPlayer();
|
||||||
player.line(targets);
|
player.line(targets);
|
||||||
|
@ -7802,16 +7875,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
shen_huatuo:'神华佗',
|
shen_huatuo:'神华佗',
|
||||||
shen_huatuo_prefix:'神',
|
shen_huatuo_prefix:'神',
|
||||||
wuling:'五灵',
|
wuling:'五灵',
|
||||||
wuling_info:'出牌阶段限一次,你可以令一名没有“五禽戏”的角色获得“五禽戏”,然后你为其指定一个“五禽戏”的初始效果。',
|
wuling_info:'①出牌阶段限一次。你可以选择一名没有“五禽戏”的角色,按照你选择的顺序向其传授“五禽戏”,且其获得如下效果:其获得你选择的第一种“五禽戏”的效果,并在其每个准备阶段移除当前“五禽戏”的效果并切换为下一种。②当你死亡时,你令场上的角色失去你传授的“五禽戏”。',
|
||||||
wuling_wuqinxi:'五禽戏',
|
wuling_wuqinxi:'五禽戏',
|
||||||
wuling_wuqinxi_info:'<br><li>“五禽戏”分为“虎、鹿、熊、猿、鹤”五个不同的效果,有“五禽戏”的角色的准备阶段,将自己“五禽戏”的效果更换为“五禽戏”顺序的下一种效果'+
|
wuling_wuqinxi_info:'<br><li>“五禽戏”分为“虎、鹿、熊、猿、鹤”五个不同的效果:'+
|
||||||
'<br><li>虎:你使用仅指定唯一目标的牌对目标角色造成的伤害+1'+
|
'<br><li>虎:当你使用指定唯一目标的牌对目标角色造成伤害时,此伤害+1。'+
|
||||||
'<br><li>鹿:获得或更换至此效果时,回复1点体力并弃置判定区的所有牌;你不能成为延时锦囊牌的目标'+
|
'<br><li>鹿:①当你获得此效果时,你回复1点体力并弃置判定区的所有牌。②你不能成为延时锦囊牌的目标。'+
|
||||||
'<br><li>熊:当你受到伤害时,此伤害-1'+
|
'<br><li>熊:当你受到伤害时,此伤害-1。'+
|
||||||
'<br><li>猿:出牌阶段开始时,你选择一名角色,随机获得其装备区里的一张牌'+
|
'<br><li>猿:出牌阶段开始时,你选择一名角色,随机获得其装备区里的一张牌。'+
|
||||||
'<br><li>鹤:出牌阶段开始时,你摸两张牌',
|
'<br><li>鹤:出牌阶段开始时,你摸两张牌。',
|
||||||
youyi:'游医',
|
youyi:'游医',
|
||||||
youyi_info:'①弃牌阶段结束时,你可以将所有于此阶段进入弃牌堆的牌置入仁区。②出牌阶段限一次,你可以将仁区的所有牌置入弃牌堆,然后令所有角色各回复1点体力。',
|
youyi_info:'①弃牌阶段结束时,你可以将所有于此阶段弃置的牌置入仁区。②出牌阶段限一次。你可以将仁区的所有牌置入弃牌堆,令所有角色各回复1点体力。',
|
||||||
|
|
||||||
extra_feng:'神话再临·风',
|
extra_feng:'神话再临·风',
|
||||||
extra_huo:'神话再临·火',
|
extra_huo:'神话再临·火',
|
||||||
|
|
|
@ -10798,7 +10798,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
mamidi:['mamidi','xin_mamidi'],
|
mamidi:['mamidi','xin_mamidi'],
|
||||||
mengyou:['mengyou','ns_mengyou'],
|
mengyou:['mengyou','ns_mengyou'],
|
||||||
zhangchu:['zhangchu','jsrg_zhangchu'],
|
zhangchu:['zhangchu','jsrg_zhangchu'],
|
||||||
xianglang:['xianglang','re_xianglang'],
|
xianglang:['xianglang','mb_xianglang'],
|
||||||
},
|
},
|
||||||
translate:{
|
translate:{
|
||||||
re_panfeng:'潘凤',
|
re_panfeng:'潘凤',
|
||||||
|
|
|
@ -6,7 +6,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
connect:true,
|
connect:true,
|
||||||
characterSort:{
|
characterSort:{
|
||||||
mobile:{
|
mobile:{
|
||||||
mobile_default:['re_xianglang','yanxiang','xin_wuban','laimin','baoxin','jiangji','liwei','xin_guozhao',"miheng","taoqian","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding","zhangyì","jiakui","yangbiao","chendeng","dongcheng","yangyi","dengzhi","zhengxuan","sp_sufei","furong","dingyuan","simashi","yanghuiyu","hucheer","gongsunkang","nanhualaoxian","zhouqun","qiaozhou","fuqian","simafu","mayuanyi","yanpu","sunhanhua","sp_maojie","peixiu","sp_jianggan","ruanhui","xin_mamidi","sp_caosong","yangfu","wangjun","sp_pengyang","qianzhao",'shichangshi'],
|
mobile_default:['mb_xianglang','yanxiang','xin_wuban','laimin','baoxin','jiangji','liwei','xin_guozhao',"miheng","taoqian","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding","zhangyì","jiakui","yangbiao","chendeng","dongcheng","yangyi","dengzhi","zhengxuan","sp_sufei","furong","dingyuan","simashi","yanghuiyu","hucheer","gongsunkang","nanhualaoxian","zhouqun","qiaozhou","fuqian","simafu","mayuanyi","yanpu","sunhanhua","sp_maojie","peixiu","sp_jianggan","ruanhui","xin_mamidi","sp_caosong","yangfu","wangjun","sp_pengyang","qianzhao",'shichangshi'],
|
||||||
mobile_yijiang:["yj_zhanghe","yj_zhangliao","yj_xuhuang","yj_ganning",'yj_huangzhong','yj_weiyan','yj_zhoubuyi'],
|
mobile_yijiang:["yj_zhanghe","yj_zhangliao","yj_xuhuang","yj_ganning",'yj_huangzhong','yj_weiyan','yj_zhoubuyi'],
|
||||||
mobile_standard:["xin_xiahoudun","xin_zhangfei"],
|
mobile_standard:["xin_xiahoudun","xin_zhangfei"],
|
||||||
mobile_shenhua_feng:['re_xiaoqiao',"xin_zhoutai"],
|
mobile_shenhua_feng:['re_xiaoqiao',"xin_zhoutai"],
|
||||||
|
@ -26,7 +26,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
character:{
|
character:{
|
||||||
re_xianglang:['male','shu',3,['naxue','yijie']],
|
mb_xianglang:['male','shu',3,['naxue','yijie']],
|
||||||
yanxiang:['male','qun',3,['kujian','twruilian'],['character:tw_yanxiang','die_audio:tw_yanxiang']],
|
yanxiang:['male','qun',3,['kujian','twruilian'],['character:tw_yanxiang','die_audio:tw_yanxiang']],
|
||||||
mb_sunluyu:['female','wu',3,['mbmeibu','mbmumu']],
|
mb_sunluyu:['female','wu',3,['mbmeibu','mbmumu']],
|
||||||
xin_wuban:['male','shu',4,['xinjintao'],['clan:陈留吴氏','character:wuban']],
|
xin_wuban:['male','shu',4,['xinjintao'],['clan:陈留吴氏','character:wuban']],
|
||||||
|
@ -410,17 +410,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
map.trigger.cancel();
|
map.trigger.cancel();
|
||||||
var num=player.countDiscardableCards(player,'he');
|
var num=player.countDiscardableCards(player,'he');
|
||||||
if(num){
|
if(num){
|
||||||
var result=yield player.chooseToDiscard('纳学:弃置任意张牌并摸等量的牌',[1,num],true).set('ai',lib.skill.zhiheng.check);
|
var result=yield player.chooseToDiscard('纳学:是否弃置任意张牌并摸等量的牌?','he',[1,num]).set('ai',lib.skill.zhiheng.check);
|
||||||
if(result.bool) player.draw(result.cards.length);
|
if(result.bool) yield player.draw(result.cards.length);
|
||||||
}
|
}
|
||||||
if(player.countCards('he')){
|
if(player.countCards('h')){
|
||||||
var result2=yield player.chooseCardTarget({
|
var result2=yield player.chooseCardTarget({
|
||||||
prompt:'纳学:将至多两张牌交给一名其他角色',
|
prompt:'是否交给至多两名其他角色各一张手牌?',
|
||||||
|
prompt2:'先按顺序选中所有要给出的牌,然后再按顺序选择等量的目标角色。',
|
||||||
selectCard:[1,2],
|
selectCard:[1,2],
|
||||||
filterCard:true,
|
filterCard:true,
|
||||||
filterTarget:lib.filter.notMe,
|
filterTarget:lib.filter.notMe,
|
||||||
forced:true,
|
selectTarget:function(){
|
||||||
position:'he',
|
return ui.selected.cards.length;
|
||||||
|
},
|
||||||
|
filterOk:()=>{
|
||||||
|
return ui.selected.cards.length==ui.selected.targets.length;
|
||||||
|
},
|
||||||
|
position:'h',
|
||||||
ai1:function(card){
|
ai1:function(card){
|
||||||
if(card.name=='du') return 10;
|
if(card.name=='du') return 10;
|
||||||
else if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0;
|
else if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0;
|
||||||
|
@ -437,7 +443,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return att;
|
return att;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if(result2.bool) player.give(result2.cards,result2.targets[0]);
|
if(result2.bool){
|
||||||
|
const list=[];
|
||||||
|
for(let i=0;i<result2.targets.length;i++){
|
||||||
|
list.push([result2.targets[i],result2.cards[i]]);
|
||||||
|
player.line(result2.targets[i]);
|
||||||
|
}
|
||||||
|
game.loseAsync({
|
||||||
|
gain_list:list,
|
||||||
|
player:player,
|
||||||
|
cards:result2.cards,
|
||||||
|
giver:player,
|
||||||
|
animate:'giveAuto',
|
||||||
|
}).setContent('gaincardMultiple');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -449,16 +468,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
forceDie:true,
|
forceDie:true,
|
||||||
|
skillAnimation:true,
|
||||||
|
animationColor:'orange',
|
||||||
|
logTarget:function(event,player){
|
||||||
|
return game.filterPlayer(target=>target!=player);
|
||||||
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
|
'step 0'
|
||||||
var targets=game.filterPlayer(target=>target!=player);
|
var targets=game.filterPlayer(target=>target!=player);
|
||||||
var sum=targets.reduce((num,target)=>num+=target.hp,0);
|
var sum=targets.reduce((num,target)=>num+=target.hp,0);
|
||||||
sum=Math.max(1,Math.floor(sum/targets.length));
|
sum=Math.max(1,Math.floor(sum/targets.length));
|
||||||
targets.forEach(target=>{
|
event.num=sum;
|
||||||
if(target.hp!=sum){
|
event.targets=targets;
|
||||||
game.log(target,'将体力从',target.hp,'改为',sum);
|
'step 1'
|
||||||
target.changeHp(sum-target.hp)._triggered=null;
|
var target=targets.shift();
|
||||||
}
|
var delta=target.hp-num;
|
||||||
});
|
if(delta!=0){
|
||||||
|
target[delta>0?'loseHp':'recover'](Math.abs(delta));
|
||||||
|
}
|
||||||
|
if(targets.length) event.redo();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
//阎象
|
//阎象
|
||||||
|
@ -15740,12 +15768,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
yanxiang:'阎象',
|
yanxiang:'阎象',
|
||||||
kujian:'苦谏',
|
kujian:'苦谏',
|
||||||
kujian_info:'出牌阶段限一次,你可以将至多两张手牌称为“谏”并交给一名其他角色,然后你获得以下效果:当其他角色使用或打出牌后,若其中有“谏”,你与其各摸两张牌;当其他角色不因使用或打出而失去牌后,若其中有“谏”,你与其各弃置一张牌。',
|
kujian_info:'出牌阶段限一次,你可以将至多两张手牌称为“谏”并交给一名其他角色,然后你获得以下效果:当其他角色使用或打出牌后,若其中有“谏”,你与其各摸两张牌;当其他角色不因使用或打出而失去牌后,若其中有“谏”,你与其各弃置一张牌。',
|
||||||
re_xianglang:'手杀向朗',
|
mb_xianglang:'手杀向朗',
|
||||||
re_xianglang_prefix:'手杀',
|
mb_xianglang_prefix:'手杀',
|
||||||
naxue:'纳学',
|
naxue:'纳学',
|
||||||
naxue_info:'你可以跳过出牌阶段。若如此做,你弃置任意张牌并摸等量的牌,然后交给一名其他角色至多两张牌。',
|
naxue_info:'你可以跳过出牌阶段。若如此做,你可以弃置任意张牌并摸等量的牌,然后你可以交给至多两名其他角色各一张手牌。',
|
||||||
yijie:'遗诫',
|
yijie:'遗诫',
|
||||||
yijie_info:'锁定技,当你死亡时,所有其他角色将体力调整为X(X为所有其他角色的体力值之和除以所有其他角色数,向下取整,且X至少为1)。',
|
yijie_info:'锁定技。当你死亡时,你令所有其他角色将体力回复或失去至X(X为所有其他角色的体力之和除以所有其他角色数,向下取整,且X至少为1)。',
|
||||||
|
|
||||||
mobile_standard:'手杀异构·标准包',
|
mobile_standard:'手杀异构·标准包',
|
||||||
mobile_shenhua_feng:'手杀异构·其疾如风',
|
mobile_shenhua_feng:'手杀异构·其疾如风',
|
||||||
|
|
|
@ -346,6 +346,8 @@ window.noname_character_rank={
|
||||||
'tianshangyi',
|
'tianshangyi',
|
||||||
'malingli',
|
'malingli',
|
||||||
'caoyi',
|
'caoyi',
|
||||||
|
'sb_sp_zhugeliang',
|
||||||
|
'sb_zhugeliang',
|
||||||
],
|
],
|
||||||
am:[
|
am:[
|
||||||
'diy_caiwenji',
|
'diy_caiwenji',
|
||||||
|
@ -634,6 +636,7 @@ window.noname_character_rank={
|
||||||
'dc_jiachong',
|
'dc_jiachong',
|
||||||
'pangshanmin',
|
'pangshanmin',
|
||||||
'kuaiqi',
|
'kuaiqi',
|
||||||
|
'shen_huatuo',
|
||||||
],
|
],
|
||||||
bp:[
|
bp:[
|
||||||
'chess_diaochan',
|
'chess_diaochan',
|
||||||
|
@ -1001,6 +1004,7 @@ window.noname_character_rank={
|
||||||
'ol_liuyan',
|
'ol_liuyan',
|
||||||
'sunhuan',
|
'sunhuan',
|
||||||
'yue_caiyong',
|
'yue_caiyong',
|
||||||
|
'sb_huangyueying',
|
||||||
],
|
],
|
||||||
b:[
|
b:[
|
||||||
'diy_feishi',
|
'diy_feishi',
|
||||||
|
@ -1312,6 +1316,7 @@ window.noname_character_rank={
|
||||||
're_simalang',
|
're_simalang',
|
||||||
'laimin',
|
'laimin',
|
||||||
'baoxin',
|
'baoxin',
|
||||||
|
'mb_xianglang',
|
||||||
],
|
],
|
||||||
bm:[
|
bm:[
|
||||||
'diy_xizhenxihong',
|
'diy_xizhenxihong',
|
||||||
|
|
289
character/sb.js
289
character/sb.js
|
@ -7,7 +7,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
character:{
|
character:{
|
||||||
sb_huangyueying:['female','shu',3,['sbqicai','sbjizhi']],
|
sb_huangyueying:['female','shu',3,['sbqicai','sbjizhi']],
|
||||||
sb_sp_zhugeliang:['male','shu',3,['sbhuoji','sbkanpo']],
|
sb_sp_zhugeliang:['male','shu',3,['sbhuoji','sbkanpo']],
|
||||||
sb_zhugeliang:['male','shu',3,['sbguanxing','sbkongcheng']],
|
sb_zhugeliang:['male','shu',3,['sbguanxing','sbkongcheng'],['unseen']],
|
||||||
sb_zhanghe:['male','wei',4,['sbqiaobian']],
|
sb_zhanghe:['male','wei',4,['sbqiaobian']],
|
||||||
sb_yujin:['male','wei',4,['sbxiayuan','sbjieyue']],
|
sb_yujin:['male','wei',4,['sbxiayuan','sbjieyue']],
|
||||||
sb_huaxiong:['male','qun','3/4/1',['new_reyaowu','sbyangwei']],
|
sb_huaxiong:['male','qun','3/4/1',['new_reyaowu','sbyangwei']],
|
||||||
|
@ -46,10 +46,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
characterSort:{
|
characterSort:{
|
||||||
sb:{
|
sb:{
|
||||||
sb_zhi:['sb_sunquan','sb_zhouyu','sb_zhangjiao','sb_caocao','sb_zhenji','sb_liubei','sb_daqiao','sb_liubiao'],
|
sb_zhi:['sb_sunquan','sb_zhouyu','sb_zhangjiao','sb_caocao','sb_zhenji','sb_liubei','sb_daqiao','sb_liubiao','sb_sp_zhugeliang'],
|
||||||
sb_shi:['sb_xuhuang','sb_machao','sb_fazheng','sb_chengong','sb_diaochan','sb_pangtong','sb_zhanghe'],
|
sb_shi:['sb_xuhuang','sb_machao','sb_fazheng','sb_chengong','sb_diaochan','sb_pangtong','sb_zhanghe'],
|
||||||
sb_tong:['liucheng','sp_yangwan','sb_xiahoushi','sb_zhangfei','sb_zhaoyun','sb_sunce','sb_zhurong','sb_xiaoqiao'],
|
sb_tong:['liucheng','sp_yangwan','sb_xiahoushi','sb_zhangfei','sb_zhaoyun','sb_sunce','sb_zhurong','sb_xiaoqiao'],
|
||||||
sb_yu:['sb_yujin','sb_lvmeng','sb_huangzhong','sb_huanggai','sb_zhouyu','sb_caoren','sb_ganning','sb_yl_luzhi'],
|
sb_yu:['sb_yujin','sb_lvmeng','sb_huangzhong','sb_huanggai','sb_zhouyu','sb_caoren','sb_ganning','sb_yl_luzhi','sb_huangyueying'],
|
||||||
sb_neng:['sb_huaxiong','sb_sunshangxiang','sb_jiangwei','sb_yuanshao','sb_menghuo'],
|
sb_neng:['sb_huaxiong','sb_sunshangxiang','sb_jiangwei','sb_yuanshao','sb_menghuo'],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -61,32 +61,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(get.type2(card)=='trick') return true;
|
if(get.type2(card)=='trick') return true;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
init:function(player){
|
|
||||||
var skill='sbqicai_'+player.playerid;
|
|
||||||
if(!lib.skill[skill]){
|
|
||||||
lib.skill[skill]={
|
|
||||||
onremove:true,
|
|
||||||
mark:true,
|
|
||||||
marktext:'奇',
|
|
||||||
intro:{
|
|
||||||
markcount:function(storage){
|
|
||||||
return (storage||0).toString();
|
|
||||||
},
|
|
||||||
content:function(storage){
|
|
||||||
return '已被掠夺'+(storage||0)+'张普通锦囊牌';
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
lib.translate[skill]='奇才';
|
|
||||||
lib.translate[skill+'_bg']='奇';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getLimit:3,
|
getLimit:3,
|
||||||
audio:2,
|
audio:2,
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
|
onChooseToUse:function(event){
|
||||||
|
if(!event.sbqicai&&!game.online){
|
||||||
|
const player=get.player();
|
||||||
|
const cards=Array.from(ui.discardPile.childNodes).filter(card=>lib.skill.sbqicai.filterCardx(card,player));
|
||||||
|
event.set('sbqicai',cards);
|
||||||
|
}
|
||||||
|
},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(!game.hasPlayer(target=>target!=player&&target.hasEmptySlot(2))) return false;
|
if(!game.hasPlayer(target=>target!=player&&target.hasEmptySlot(2))) return false;
|
||||||
return player.countCards('h',card=>lib.skill.sbqicai.filterCardx(card,player))||Array.from(ui.discardPile.childNodes).some(card=>lib.skill.sbqicai.filterCardx(card,player));
|
return player.countCards('h',card=>lib.skill.sbqicai.filterCardx(card,player))||event.sbqicai&&event.sbqicai.length;
|
||||||
},
|
},
|
||||||
filterCardx:function(card,player){
|
filterCardx:function(card,player){
|
||||||
if(player.getStorage('sbqicai').includes(card.name)) return false;
|
if(player.getStorage('sbqicai').includes(card.name)) return false;
|
||||||
|
@ -95,8 +82,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
usable:1,
|
usable:1,
|
||||||
chooseButton:{
|
chooseButton:{
|
||||||
dialog:function(event,player){
|
dialog:function(event,player){
|
||||||
var list1=player.getCards('h',card=>lib.skill.sbqicai.filterCardx(card,player));
|
const list1=player.getCards('h',card=>lib.skill.sbqicai.filterCardx(card,player));
|
||||||
var list2=Array.from(ui.discardPile.childNodes).filter(card=>lib.skill.sbqicai.filterCardx(card,player));
|
const list2=event.sbqicai;
|
||||||
var dialog=ui.create.dialog('###奇才###<div class="text center">请选择一张防具牌置入一名其他角色的装备区</div>');
|
var dialog=ui.create.dialog('###奇才###<div class="text center">请选择一张防具牌置入一名其他角色的装备区</div>');
|
||||||
if(list1.length){
|
if(list1.length){
|
||||||
dialog.add('<div class="text center">手牌区</div>');
|
dialog.add('<div class="text center">手牌区</div>');
|
||||||
|
@ -105,6 +92,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(list2.length){
|
if(list2.length){
|
||||||
dialog.add('<div class="text center">弃牌堆</div>');
|
dialog.add('<div class="text center">弃牌堆</div>');
|
||||||
dialog.add(list2);
|
dialog.add(list2);
|
||||||
|
if(list1.length) dialog.classList.add('fullheight');
|
||||||
}
|
}
|
||||||
return dialog;
|
return dialog;
|
||||||
},
|
},
|
||||||
|
@ -143,7 +131,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.markAuto('sbqicai',[cards[0].name]);
|
player.markAuto('sbqicai',[cards[0].name]);
|
||||||
target.equip(cards[0]);
|
target.equip(cards[0]);
|
||||||
player.addSkill('sbqicai_gain');
|
player.addSkill('sbqicai_gain');
|
||||||
target.addSkill('sbqicai_'+player.playerid);
|
lib.skill.sbqicai.updateCounter(player,target,0);
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
result:{
|
result:{
|
||||||
|
@ -161,6 +149,40 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return '请选择置入'+get.translation(links)+'的角色';
|
return '请选择置入'+get.translation(links)+'的角色';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
updateCounter:function(player,target,num){
|
||||||
|
const skill=`sbqicai_${player.playerid}`;
|
||||||
|
game.broadcastAll(lib.skill.sbqicai.initSkill,skill);
|
||||||
|
if(!target.hasSkill(skill)) target.addSkill(skill);
|
||||||
|
if(num==0) target.clearMark(skill,false);
|
||||||
|
else if(num>0) target.addMark(skill,num,false);
|
||||||
|
if(target.countMark(skill)>=lib.skill.sbqicai.getLimit) target.removeSkill(skill);
|
||||||
|
if(!_status.postReconnect.sbqicai){
|
||||||
|
_status.postReconnect.sbqicai=[
|
||||||
|
lib.skill.sbqicai.initSkill,
|
||||||
|
[]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
_status.postReconnect.sbqicai[1].add(skill);
|
||||||
|
},
|
||||||
|
initSkill:skill=>{
|
||||||
|
if(!lib.skill[skill]){
|
||||||
|
lib.skill[skill]={
|
||||||
|
onremove:true,
|
||||||
|
mark:true,
|
||||||
|
marktext:'奇',
|
||||||
|
intro:{
|
||||||
|
markcount:function(storage){
|
||||||
|
return (storage||0).toString();
|
||||||
|
},
|
||||||
|
content:function(storage){
|
||||||
|
return '已被掠夺'+get.cnNumber(storage||0)+'张普通锦囊牌';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
lib.translate[skill]='奇才';
|
||||||
|
lib.translate[skill+'_bg']='奇';
|
||||||
|
}
|
||||||
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:7,
|
order:7,
|
||||||
result:{
|
result:{
|
||||||
|
@ -170,6 +192,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
marktext:'才',
|
||||||
intro:{content:'已使用$发动过此技能'},
|
intro:{content:'已使用$发动过此技能'},
|
||||||
subSkill:{
|
subSkill:{
|
||||||
gain:{
|
gain:{
|
||||||
|
@ -183,14 +206,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
|
direct:true,
|
||||||
|
charlotte:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
if(!event.checkedTargets) event.checkedTargets=[];
|
||||||
var target=game.findPlayer(function(current){
|
var target=game.findPlayer(function(current){
|
||||||
if(!trigger.getg(current).length||!current.hasSkill('sbqicai_'+player.playerid)) return false;
|
if(!trigger.getg(current).length||!current.hasSkill('sbqicai_'+player.playerid)) return false;
|
||||||
|
if(event.checkedTargets.includes(current)) return false;
|
||||||
if(current.countMark('sbqicai_'+player.playerid)>=lib.skill.sbqicai.getLimit) return false;
|
if(current.countMark('sbqicai_'+player.playerid)>=lib.skill.sbqicai.getLimit) return false;
|
||||||
return trigger.getg(current).some(card=>get.type(card)=='trick'&&lib.filter.canBeGained(card,current,player));
|
return trigger.getg(current).some(card=>get.type(card)=='trick'&&lib.filter.canBeGained(card,current,player));
|
||||||
});
|
});
|
||||||
|
if(!target){
|
||||||
|
event.finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
event.target=target;
|
event.target=target;
|
||||||
|
player.logSkill('sbqicai_gain',target);
|
||||||
|
event.checkedTargets.add(target);
|
||||||
var cards=trigger.getg(target).filter(card=>get.type(card)=='trick'&&lib.filter.canBeGained(card,target,player));
|
var cards=trigger.getg(target).filter(card=>get.type(card)=='trick'&&lib.filter.canBeGained(card,target,player));
|
||||||
if(cards.length<=lib.skill.sbqicai.getLimit-target.countMark('sbqicai_'+player.playerid)) event._result={bool:true,links:cards};
|
if(cards.length<=lib.skill.sbqicai.getLimit-target.countMark('sbqicai_'+player.playerid)) event._result={bool:true,links:cards};
|
||||||
else{
|
else{
|
||||||
|
@ -201,9 +234,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
|
game.delaye(0.5);
|
||||||
target.give(result.links,player);
|
target.give(result.links,player);
|
||||||
target.addMark('sbqicai_'+player.playerid,result.links.length,false);
|
lib.skill.sbqicai.updateCounter(player,target,result.links.length);
|
||||||
}
|
}
|
||||||
|
event.goto(0);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -243,17 +278,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filterTarget:lib.filter.notMe,
|
filterTarget:lib.filter.notMe,
|
||||||
prompt:'选择一名其他角色,对其与其势力相同的所有其他角色各造成1点火属性伤害',
|
prompt:'选择一名其他角色,对其与其势力相同的所有其他角色各造成1点火属性伤害',
|
||||||
usable:1,
|
usable:1,
|
||||||
line:false,
|
line:'fire',
|
||||||
content:function(){
|
content:function(){
|
||||||
|
'step 0'
|
||||||
|
target.damage('fire');
|
||||||
|
'step 1'
|
||||||
var targets=game.filterPlayer(current=>{
|
var targets=game.filterPlayer(current=>{
|
||||||
if(current==player) return false;
|
if(current==player||current==target) return false;
|
||||||
return current.group==target.group;
|
return current.group==target.group;
|
||||||
});
|
});
|
||||||
player.line(targets);
|
if(targets.length){
|
||||||
targets.forEach(i=>i.damage(1,'fire'));
|
game.delayx();
|
||||||
|
player.line(targets,'fire');
|
||||||
|
targets.forEach(i=>i.damage('fire'));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:7,
|
order:7,
|
||||||
|
fireAttack:true,
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
var att=get.attitude(player,target);
|
var att=get.attitude(player,target);
|
||||||
|
@ -327,35 +369,138 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{global:'roundStart'},
|
trigger:{global:'roundStart'},
|
||||||
forced:true,
|
forced:true,
|
||||||
locked:false,
|
locked:false,
|
||||||
|
get getNumber(){
|
||||||
|
return 3;
|
||||||
|
},
|
||||||
content:function*(event,map){
|
content:function*(event,map){
|
||||||
var player=map.player;
|
var player=map.player;
|
||||||
var storage=player.getStorage('sbkanpo').slice();
|
var storage=player.getStorage('sbkanpo').slice();
|
||||||
if(storage.length){
|
if(storage.length){
|
||||||
player.unmarkAuto('sbkanpo',storage);
|
player.unmarkAuto('sbkanpo',storage);
|
||||||
}
|
}
|
||||||
var result=yield player.chooseButton(['看破:是否记录三张不同的牌名',[lib.inpile.map(name=>[get.translation(get.type(name)),'',name]),'vcard']],3).set('ai',function(button){
|
const list=get.inpileVCardList(info=>{
|
||||||
|
if(info[2]=='sha'&&info[3]) return false;
|
||||||
|
return info[0]!='equip';
|
||||||
|
});
|
||||||
|
const func=()=>{
|
||||||
|
const event=get.event();
|
||||||
|
const controls=[link=>{
|
||||||
|
const evt=get.event();
|
||||||
|
if(link=='cancel2') ui.click.cancel();
|
||||||
|
else{
|
||||||
|
if(evt.dialog&&evt.dialog.buttons){
|
||||||
|
for(let i=0;i<evt.dialog.buttons.length;i++){
|
||||||
|
const button=evt.dialog.buttons[i];
|
||||||
|
button.classList.remove('selectable');
|
||||||
|
button.classList.remove('selected');
|
||||||
|
const counterNode=button.querySelector('.caption');
|
||||||
|
if(counterNode){
|
||||||
|
counterNode.childNodes[0].innerHTML=``;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ui.selected.buttons.length=0;
|
||||||
|
game.check();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
event.controls=['清除选择','cancel2'].map(control=>{
|
||||||
|
return ui.create.control(controls.concat(control=='清除选择'?[control,'stayleft']:control));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
if(event.isMine()) func();
|
||||||
|
else if(event.isOnline()) event.player.send(func);
|
||||||
|
var result=yield player.chooseButton(['看破:是否记录三个牌名?',[list,'vcard']],[1,3],true).set('ai',function(button){
|
||||||
switch(button.link[2]){
|
switch(button.link[2]){
|
||||||
case 'wuxie':return 5+Math.random();
|
case 'wuxie':return 5+Math.random();
|
||||||
case 'sha':return 5+Math.random();
|
case 'sha':return 5+Math.random();
|
||||||
case 'tao':return 4+Math.random();
|
case 'tao':return 4+Math.random();
|
||||||
|
case 'jiu':return 3+Math.random();
|
||||||
case 'lebu':return 3+Math.random();
|
case 'lebu':return 3+Math.random();
|
||||||
case 'shan':return 4.5+Math.random();
|
case 'shan':return 4.5+Math.random();
|
||||||
case 'wuzhong':return 4+Math.random();
|
case 'wuzhong':return 4+Math.random();
|
||||||
case 'shunshou':return 3+Math.random();
|
case 'shunshou':return 2.7+Math.random();
|
||||||
case 'nanman':return 2+Math.random();
|
case 'nanman':return 2+Math.random();
|
||||||
case 'wanjian':return 2+Math.random();
|
case 'wanjian':return 1.6+Math.random();
|
||||||
default:return Math.random();
|
default:return 1.5+Math.random();
|
||||||
}
|
}
|
||||||
}).set('filterButton',button=>{
|
}).set('filterButton',button=>{
|
||||||
return !_status.event.names.includes(button.link[2]);
|
return !_status.event.names.includes(button.link[2]);
|
||||||
}).set('names',storage);
|
}).set('names',storage).set('custom',{
|
||||||
|
add:{
|
||||||
|
confirm:function(bool){
|
||||||
|
if(bool!=true) return;
|
||||||
|
const event=get.event().parent;
|
||||||
|
if(event.controls) event.controls.forEach(i=>i.close());
|
||||||
|
if(ui.confirm) ui.confirm.close();
|
||||||
|
game.uncheck();
|
||||||
|
},
|
||||||
|
button:function(){
|
||||||
|
if(ui.selected.buttons.length) return;
|
||||||
|
const event=get.event();
|
||||||
|
if(event.dialog&&event.dialog.buttons){
|
||||||
|
for(let i=0;i<event.dialog.buttons.length;i++){
|
||||||
|
const button=event.dialog.buttons[i];
|
||||||
|
const counterNode=button.querySelector('.caption');
|
||||||
|
if(counterNode){
|
||||||
|
counterNode.childNodes[0].innerHTML=``;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!ui.selected.buttons.length){
|
||||||
|
const evt=event.parent;
|
||||||
|
if(evt.controls) evt.controls[0].hide();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
replace:{
|
||||||
|
button:function(button){
|
||||||
|
const event=get.event();
|
||||||
|
if(!event.isMine()) return;
|
||||||
|
if(button.classList.contains('selectable')==false) return;
|
||||||
|
if(ui.selected.buttons.length>=lib.skill.sbkanpo.getNumber) return false;
|
||||||
|
button.classList.add('selected');
|
||||||
|
ui.selected.buttons.push(button);
|
||||||
|
let counterNode=button.querySelector('.caption');
|
||||||
|
const count=ui.selected.buttons.filter(i=>i==button).length;
|
||||||
|
if(counterNode){
|
||||||
|
counterNode=counterNode.childNodes[0];
|
||||||
|
counterNode.innerHTML=`×${count}`;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
counterNode=ui.create.caption(`<span style="font-size:24px; font-family:xinwei; text-shadow:#FFF 0 0 4px, #FFF 0 0 4px, rgba(74,29,1,1) 0 0 3px;">×${count}</span>`,button);
|
||||||
|
counterNode.style.right='5px';
|
||||||
|
counterNode.style.bottom='2px';
|
||||||
|
}
|
||||||
|
const evt=event.parent;
|
||||||
|
if(evt.controls) evt.controls[0].show();
|
||||||
|
game.check();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var names=result.links.map(link=>link[2]);
|
var names=result.links.map(link=>link[2]);
|
||||||
player.markAuto('sbkanpo',names);
|
player.setStorage('sbkanpo',names);
|
||||||
game.log(player,'记录了','#y'+get.translation(names));
|
player.markSkill('sbkanpo');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
intro:{content:'已记录$'},
|
marktext:'破',
|
||||||
|
intro:{
|
||||||
|
markcount:function(storage,player){
|
||||||
|
if(player.isUnderControl(true)) return storage.length;
|
||||||
|
return '?';
|
||||||
|
},
|
||||||
|
mark:function(dialog,content,player){
|
||||||
|
if(player.isUnderControl(true)){
|
||||||
|
const storage=player.getStorage('sbkanpo');
|
||||||
|
dialog.addText('已记录牌名:');
|
||||||
|
dialog.addSmall([storage,'vcard']);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return `${get.translation(player)}记录了一些牌名`;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
group:'sbkanpo_kanpo',
|
group:'sbkanpo_kanpo',
|
||||||
subSkill:{
|
subSkill:{
|
||||||
kanpo:{
|
kanpo:{
|
||||||
|
@ -365,7 +510,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return event.player!=player&&player.getStorage('sbkanpo').includes(event.card.name);
|
return event.player!=player&&player.getStorage('sbkanpo').includes(event.card.name);
|
||||||
},
|
},
|
||||||
prompt2:function(event,player){
|
prompt2:function(event,player){
|
||||||
return '移除'+get.translation(event.card.name)+',令'+get.translation(event.card)+'失效';
|
return '移除'+get.translation(event.card.name)+'的记录,令'+get.translation(event.card)+'无效';
|
||||||
},
|
},
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
var effect=0;
|
var effect=0;
|
||||||
|
@ -407,28 +552,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
if(trigger.name=='phaseJieshu'){
|
if(trigger.name=='phaseJieshu'){
|
||||||
event.goto(1);
|
event.goto(2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var cards=player.getCards('s',card=>card.hasGaintag('sbguanxing'));
|
var cards=player.getCards('s',card=>card.hasGaintag('sbguanxing'));
|
||||||
if(cards.length) player.loseToDiscardpile(cards);
|
if(cards.length) player.loseToDiscardpile(cards);
|
||||||
var bool=player.getAllHistory('useSkill',evt=>evt.skill=='sbguanxing').length>1;
|
var bool=player.getAllHistory('useSkill',evt=>evt.skill=='sbguanxing').length>1;
|
||||||
var num=Math.min(7,bool?cards.length+1:7);
|
event.num=Math.min(7,bool?cards.length+1:7);
|
||||||
|
'step 1'
|
||||||
var cards2=get.cards(num);
|
var cards2=get.cards(num);
|
||||||
player.$gain2(cards2,false);
|
player.$gain2(cards2,false);
|
||||||
game.log(player,'将',cards2,'置于了武将牌上');
|
game.log(player,'将',cards2,'置于了武将牌上');
|
||||||
player.loseToSpecial(cards2,'sbguanxing').visible=true;
|
player.loseToSpecial(cards2,'sbguanxing').visible=true;
|
||||||
player.markSkill('sbguanxing');
|
player.markSkill('sbguanxing');
|
||||||
'step 1'
|
'step 2'
|
||||||
var cards=player.getCards('s',card=>card.hasGaintag('sbguanxing'));
|
var cards=player.getCards('s',card=>card.hasGaintag('sbguanxing'));
|
||||||
if(cards.length){
|
if(cards.length){
|
||||||
player.chooseToMove().set('list',[
|
player.chooseToMove().set('list',[
|
||||||
['“星”',cards],
|
['你的“星”',cards],
|
||||||
['牌堆顶'],
|
['牌堆顶'],
|
||||||
]).set('prompt','观星:点击将牌移动到牌堆顶').set('processAI',function(list){
|
]).set('prompt','观星:点击将牌移动到牌堆顶').set('processAI',function(list){
|
||||||
var cards=list[0][1].slice(),player=_status.event.player;
|
var cards=list[0][1].slice(),player=_status.event.player;
|
||||||
var name=_status.event.getTrigger().name;
|
var name=_status.event.getTrigger().name;
|
||||||
var target=(name=='phaseBegin'?player:target);
|
var target=(name=='phaseZhunbei'?player:target);
|
||||||
var top=[],att=get.sgn(get.attitude(player,target));
|
var top=[],att=get.sgn(get.attitude(player,target));
|
||||||
if(att!=0&&(target!=player||!player.hasWuxie())){
|
if(att!=0&&(target!=player||!player.hasWuxie())){
|
||||||
for(var i=0;i<judges.length;i++){
|
for(var i=0;i<judges.length;i++){
|
||||||
|
@ -444,15 +590,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else event._result={bool:false};
|
else event._result={bool:false};
|
||||||
'step 2'
|
'step 3'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var cards=result.moved[1];
|
var cards=result.moved[1];
|
||||||
player.$throw(cards,1000);
|
player.loseToDiscardpile(cards,ui.cardPile,'insert').log=false;
|
||||||
for(var i=cards.length-1;i>=0;i--){
|
game.log(player,'将',cards,'置于了牌堆顶');
|
||||||
player.lose([cards[i]],ui.cardPile,'insert');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(trigger.name=='phaseBegin') player.addTempSkill('sbguanxing_on');
|
else if(trigger.name=='phaseZhunbei') player.addTempSkill('sbguanxing_on');
|
||||||
},
|
},
|
||||||
group:'sbguanxing_unmark',
|
group:'sbguanxing_unmark',
|
||||||
subSkill:{
|
subSkill:{
|
||||||
|
@ -495,22 +639,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
sbkongcheng:{
|
sbkongcheng:{
|
||||||
audio:2,
|
audio:2,
|
||||||
trigger:{player:'damageBegin2'},
|
trigger:{player:['damageBegin3','damageBegin4']},
|
||||||
filter:function(event,player){
|
filter:function(event,player,name){
|
||||||
return player.hasSkill('sbguanxing');
|
if(!player.hasSkill('sbguanxing')) return false;
|
||||||
|
const num=player.countCards('s',card=>card.hasGaintag('sbguanxing'));
|
||||||
|
if(name=='damageBegin3'&&!num) return true;
|
||||||
|
if(name=='damageBegin4'&&num) return true;
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
forced:true,
|
forced:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
var num=player.countCards('s',card=>card.hasGaintag('sbguanxing'));
|
var num=player.countCards('s',card=>card.hasGaintag('sbguanxing'));
|
||||||
event.num=num;
|
if(!num&&event.triggername=='damageBegin3'){
|
||||||
if(!num){
|
trigger.increase('num');
|
||||||
trigger.num++;
|
}
|
||||||
event.finish();
|
else if(num&&event.triggername=='damageBegin4'){
|
||||||
|
player.judge(function(result){
|
||||||
|
if(get.number(result)<=get.player().countCards('s',card=>card.hasGaintag('sbguanxing'))) return 2;
|
||||||
|
return -1;
|
||||||
|
}).set('judge2',result=>result.bool).set('callback',function(){
|
||||||
|
if(event.judgeResult.number<=player.countCards('s',card=>card.hasGaintag('sbguanxing'))){
|
||||||
|
event.getParent('sbkongcheng').getTrigger().decrease('num');
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else player.judge();
|
|
||||||
'step 1'
|
|
||||||
if(result.number<=num) trigger.num--;
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
//卢植
|
//卢植
|
||||||
|
@ -5562,23 +5715,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
sb_xiaoqiao_prefix:'谋',
|
sb_xiaoqiao_prefix:'谋',
|
||||||
sbtianxiang:'天香',
|
sbtianxiang:'天香',
|
||||||
sbtianxiang_info:'①出牌阶段限三次,你可以交给一名没有“天香”标记的其他角色一张红色牌,然后令其获得此牌花色的“天香”标记。②当你受到伤害时,你可以移去一名角色的“天香”标记,若此“天香”标记为:红桃,你防止此伤害,其受到伤害来源对其造成的1点伤害(若没有伤害来源则改为无来源伤害);方片,其交给你两张牌。③准备阶段,你移去场上所有的“天香”标记,然后摸等量的牌。',
|
sbtianxiang_info:'①出牌阶段限三次,你可以交给一名没有“天香”标记的其他角色一张红色牌,然后令其获得此牌花色的“天香”标记。②当你受到伤害时,你可以移去一名角色的“天香”标记,若此“天香”标记为:红桃,你防止此伤害,其受到伤害来源对其造成的1点伤害(若没有伤害来源则改为无来源伤害);方片,其交给你两张牌。③准备阶段,你移去场上所有的“天香”标记,然后摸等量的牌。',
|
||||||
sb_sp_zhugeliang:'谋卧龙',
|
sb_sp_zhugeliang:'谋诸葛亮',
|
||||||
sb_sp_zhugeliang_prefix:'谋',
|
sb_sp_zhugeliang_prefix:'谋',
|
||||||
sb_zhugeliang:'谋诸葛亮',
|
sb_zhugeliang:'谋诸葛亮',
|
||||||
sb_zhugeliang_prefix:'谋',
|
sb_zhugeliang_prefix:'谋',
|
||||||
sbhuoji:'火计',
|
sbhuoji:'火计',
|
||||||
sbhuoji_info:'使命技。①使命:出牌阶段限一次,你可以选择一名其他角色,对其和所有势力与其势力相同的其他角色造成1点火属性伤害。②成功:准备阶段,若你本局游戏已造成的火属性伤害大于等于游戏人数,则你将武将牌更换为谋诸葛亮(若你没有拥有此技能的武将牌则改为失去〖火计〗和〖看破〗,然后获得〖观星〗和〖空城〗)。③失败:使命成功前进入濒死状态。',
|
sbhuoji_info:'使命技。①使命:出牌阶段限一次。你可以对一名其他角色造成1点火焰伤害,然后你对所有与其势力相同的不为其的其他角色各造成1点火焰伤害。②成功:准备阶段,若你本局游戏已造成的火焰伤害不小于本局游戏总角色数,则你失去〖火计〗和〖看破〗,然后获得〖观星〗和〖空城〗。③失败:使命成功前进入濒死状态。',
|
||||||
sbkanpo:'看破',
|
sbkanpo:'看破',
|
||||||
sbkanpo_info:'①一轮开始时,你清除“看破”记录的牌名,然后你可以记录三个非此次移去的牌名的牌名。②一名其他角色使用你“看破”记录的牌名的牌时,你可以从“看破”中移去此牌名,令此牌无效。',
|
sbkanpo_info:'①一轮游戏开始时,你清除〖看破①〗记录的牌名,然后你可以依次记录共计三个未于本次清除过的非装备牌牌名(对其他角色不可见)。②当其他角色使用你〖看破①〗记录过的牌名的牌时,你可以移去一个〖看破①〗中的此牌名的记录,令此牌无效。',
|
||||||
sbguanxing:'观星',
|
sbguanxing:'观星',
|
||||||
sbguanxing_info:'①准备阶段,你将武将牌上所有“星”置入弃牌堆,将牌堆顶的X张牌称为“星”置于你的武将牌上(X为你此次移去的“星”数+1且至多为7,若本次为第一次发动〖观星〗则X为7),然后你可以将任意张“星”置于牌堆顶,若你未将任意“星”置于牌堆顶,你可以于结束阶段将任意张“星”置于牌堆顶。②你可以如手牌般使用或打出“星”。',
|
sbguanxing_info:'①准备阶段,你将所有“星”置入弃牌堆,将牌堆顶的X张牌置于你的武将牌上,称为“星”。然后你可以将任意张“星”置于牌堆顶(X为你此次移去的“星”数+1且至多为7,若你此前未发动过〖观星①〗则X为7)。②结束阶段,若你未于本回合的准备阶段将“星”置于过牌堆顶,你可以将任意张“星”置于牌堆顶。③你可以如手牌般使用或打出“星”。',
|
||||||
sbkongcheng:'空城',
|
sbkongcheng:'空城',
|
||||||
sbkongcheng_info:'锁定技,当你受到伤害时,若你拥有技能〖观星〗,则:若你有“星”,你进行一次判定,若判定结果点数小于等于你的“星”,则此伤害-1;没有“星”,此伤害+1。',
|
sbkongcheng_info:'锁定技。当你受到伤害时,若你有〖观星〗,且若你:有“星”,你判定,若结果点数不大于你的“星”数,此伤害-1;没有“星”,此伤害+1。',
|
||||||
sb_huangyueying:'谋黄月英',
|
sb_huangyueying:'谋黄月英',
|
||||||
sb_huangyueying_prefix:'谋',
|
sb_huangyueying_prefix:'谋',
|
||||||
sbqicai:'奇才',
|
sbqicai:'奇才',
|
||||||
sbqicai_backup:'奇才',
|
sbqicai_backup:'奇才',
|
||||||
sbqicai_info:'①出牌阶段限一次,你可以将手牌中或弃牌堆中的一张防具牌置于一名其他角色的装备栏,然后其须将之后获得的前三张基本锦囊牌交给你。②你使用锦囊牌无距离限制。',
|
sbqicai_info:'①出牌阶段限一次。你可以将手牌中或弃牌堆中的一张防具牌置于一名其他角色的防具栏,然后其获得如下效果:当其得到普通锦囊牌后,其将此牌交给你(限三张)。②你使用锦囊牌无距离限制。',
|
||||||
sbjizhi:'集智',
|
sbjizhi:'集智',
|
||||||
sbjizhi_info:'锁定技,当你使用一张普通锦囊牌时,你摸一张牌,且此牌本回合不计入你的手牌上限。',
|
sbjizhi_info:'锁定技,当你使用一张普通锦囊牌时,你摸一张牌,且此牌本回合不计入你的手牌上限。',
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
sp_zhongdan:["cuiyan","huangfusong"],
|
sp_zhongdan:["cuiyan","huangfusong"],
|
||||||
sp_guozhan2:["sp_dongzhuo","liqueguosi","zhangren"],
|
sp_guozhan2:["sp_dongzhuo","liqueguosi","zhangren"],
|
||||||
sp_others:["hanba","caiyang"],
|
sp_others:["hanba","caiyang"],
|
||||||
sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_feiyi','ol_dingshangwan','ol_liwan'],
|
sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_feiyi','ol_dingshangwan','ol_liwan','ol_liuyan'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
characterFilter:{
|
characterFilter:{
|
||||||
|
|
|
@ -956,7 +956,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
game.checkGlobalHistory('cardMove',function(evt){
|
game.checkGlobalHistory('cardMove',function(evt){
|
||||||
if(evt.name=='cardsDiscard'&&evt.getParent('phaseDiscard')==event) cards.addArray(evt.cards);
|
if(evt.name=='cardsDiscard'&&evt.getParent('phaseDiscard')==event) cards.addArray(evt.cards);
|
||||||
});
|
});
|
||||||
return cards;
|
return cards.filterInD('d');
|
||||||
},
|
},
|
||||||
audio:2,
|
audio:2,
|
||||||
sunbenSkill:true,
|
sunbenSkill:true,
|
||||||
|
|
|
@ -404,6 +404,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var suits=result.links.map(i=>i[2].slice(6));
|
var suits=result.links.map(i=>i[2].slice(6));
|
||||||
|
player.logSkill('qingbei');
|
||||||
player.addTempSkill('qingbei_effect','roundStart');
|
player.addTempSkill('qingbei_effect','roundStart');
|
||||||
player.setStorage('qingbei_effect',suits);
|
player.setStorage('qingbei_effect',suits);
|
||||||
player.markSkill('qingbei_effect');
|
player.markSkill('qingbei_effect');
|
||||||
|
@ -418,12 +419,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{player:'useCardAfter'},
|
trigger:{player:'useCardAfter'},
|
||||||
charlotte:true,
|
charlotte:true,
|
||||||
onremove:true,
|
onremove:true,
|
||||||
|
forced:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(!lib.suit.includes(get.suit(event.card))) return false;
|
if(!lib.suit.includes(get.suit(event.card))) return false;
|
||||||
return player.getStorage('qingbei_effect').length;
|
return player.getStorage('qingbei_effect').length;
|
||||||
},
|
},
|
||||||
direct:true,
|
|
||||||
firstDo:true,
|
|
||||||
content:function(){
|
content:function(){
|
||||||
player.draw(player.getStorage('qingbei_effect').length);
|
player.draw(player.getStorage('qingbei_effect').length);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue