Merge branch 'PR-Branch' into master
This commit is contained in:
commit
8406c27127
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.
|
@ -203,7 +203,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
player.chooseToDiscard({suit:get.suit(event.card2)},function(card){
|
||||
var evt=_status.event.getParent();
|
||||
if(get.damageEffect(evt.target,evt.player,evt.player,'fire')>0){
|
||||
return 7-get.value(card,evt.player);
|
||||
return 6.2+Math.min(4,evt.player.hp)-get.value(card,evt.player);
|
||||
}
|
||||
return -1;
|
||||
}).set('prompt',false);
|
||||
|
@ -225,8 +225,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
value:[3,1],
|
||||
useful:1,
|
||||
},
|
||||
wuxie:function(target,card,player,current,state){
|
||||
if(get.attitude(current,player)>=0&&state>0) return false;
|
||||
wuxie:function(target,card,player,viewer,state){
|
||||
let att=get.attitude(viewer,target), eff=get.effect(target,card,player,target);
|
||||
if(status*get.attitude(viewer,player)>0&&!player.isMad() || status*eff*att>=0) return 0;
|
||||
if(get.attitude(viewer,player)>=0 || _status.event.getRand('huogong_wuxie')*4>player.countCards('h')) return 0;
|
||||
},
|
||||
result:{
|
||||
player:function(player){
|
||||
|
|
|
@ -187,40 +187,40 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
equipSkill:true,
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseTarget(get.prompt2('xuelunyang'),function(card,player,target){
|
||||
var names=[];
|
||||
if(target.name&&!target.isUnseen(0)) names.add(target.name);
|
||||
if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
|
||||
if(target.name2&&!target.isUnseen(1)) names.add(target.name2);
|
||||
var pss=player.getSkills();
|
||||
for(var i=0;i<names.length;i++){
|
||||
var info=lib.character[names[i]];
|
||||
if(info){
|
||||
var skills=info[3];
|
||||
for(var j=0;j<skills.length;j++){
|
||||
if(lib.translate[skills[j]+'_info']&&lib.skill[skills[j]]&&
|
||||
!lib.skill[skills[j]].unique&&!pss.contains(skills[j])){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}).set('ai',function(target){
|
||||
return Math.random();
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
event.target=result.targets[0];
|
||||
player.logSkill('xuelunyang',event.target);
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
'step 2'
|
||||
var names=[];
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseTarget(get.prompt2('xuelunyang'),function(card,player,target){
|
||||
var names=[];
|
||||
if(target.name&&!target.isUnseen(0)) names.add(target.name);
|
||||
if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
|
||||
if(target.name2&&!target.isUnseen(1)) names.add(target.name2);
|
||||
var pss=player.getSkills();
|
||||
for(var i=0;i<names.length;i++){
|
||||
var info=lib.character[names[i]];
|
||||
if(info){
|
||||
var skills=info[3];
|
||||
for(var j=0;j<skills.length;j++){
|
||||
if(lib.translate[skills[j]+'_info']&&lib.skill[skills[j]]&&
|
||||
!lib.skill[skills[j]].unique&&!pss.contains(skills[j])){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}).set('ai',function(target){
|
||||
return Math.random();
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
event.target=result.targets[0];
|
||||
player.logSkill('xuelunyang',event.target);
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
'step 2'
|
||||
var names=[];
|
||||
var list=[];
|
||||
if(target.name&&!target.isUnseen(0)) names.add(target.name);
|
||||
if(target.name1&&!target.isUnseen(0)) names.add(target.name1);
|
||||
|
@ -240,12 +240,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
player.chooseControl(list).set('prompt','选择获得一个技能').set('choice',get.max(list,get.skillRank,'item')).set('ai',function(){return _status.event.choice})
|
||||
'step 3'
|
||||
player.addTempSkill(result.control);
|
||||
player.popup(result.control);
|
||||
game.log(player,'获得了','#g【'+get.translation(result.control)+'】');
|
||||
},
|
||||
},
|
||||
'step 3'
|
||||
player.addTempSkill(result.control);
|
||||
player.popup(result.control);
|
||||
game.log(player,'获得了','#g【'+get.translation(result.control)+'】');
|
||||
},
|
||||
},
|
||||
|
||||
"jiuwei":{
|
||||
trigger:{
|
||||
|
|
|
@ -188,6 +188,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
//族王浑
|
||||
clanfuxun:{
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(player.isPhaseUsing()&&get.type(card)=='equip'&&get.equipValue(card,player)>0) return num+3;
|
||||
},
|
||||
},
|
||||
locked:false,
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
|
@ -206,6 +212,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!ui.selected.cards.length) return target.countGainableCards(player,'h')>0;
|
||||
return true;
|
||||
},
|
||||
check:function(card){
|
||||
var player=_status.event.player;
|
||||
var evtx=_status.event.getParent('phaseUse');
|
||||
var targets=game.filterPlayer(target=>target!=player&&lib.skill.clanfuxun.ai.result.target(player,target)!=0);
|
||||
targets.sort((a,b)=>Math.abs(lib.skill.clanfuxun.ai.result.target(player,b))-Math.abs(lib.skill.clanfuxun.ai.result.target(player,a)));
|
||||
if(evtx&&targets.length){
|
||||
var target=targets[0];
|
||||
if(!target.hasHistory('lose',evt=>{
|
||||
return evt.getParent(3).name!='clanfuxun'&&evt.getParent('phaseUse')==evtx&&evt.cards2.length;
|
||||
})&&!target.hasHistory('gain',evt=>{
|
||||
return evt.getParent().name!='clanfuxun'&&evt.getParent('phaseUse')==evtx&&evt.cards.length;
|
||||
})&&Math.abs(player.countCards('h')-target.countCards('h'))==2){
|
||||
if(player.countCards('h')>target.countCards('h')) return 1/(get.value(card)||0.5);
|
||||
return -1;
|
||||
}
|
||||
if(card.name=='du') return 20;
|
||||
return -1;
|
||||
}
|
||||
if(card.name=='du') return 20;
|
||||
return -1;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
if(cards.length){
|
||||
|
@ -261,9 +288,36 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
ai:{
|
||||
order:2,
|
||||
order:function(item,player){
|
||||
var evtx=_status.event.getParent('phaseUse');
|
||||
if(game.hasPlayer(current=>{
|
||||
if(current==player||!evtx||get.attitude(player,current)==0) return false;
|
||||
return !current.hasHistory('lose',evt=>{
|
||||
return evt.getParent(3).name!='clanfuxun'&&evt.getParent('phaseUse')==evtx&&evt.cards2.length;
|
||||
})&&!current.hasHistory('gain',evt=>{
|
||||
return evt.getParent().name!='clanfuxun'&&evt.getParent('phaseUse')==evtx&&evt.cards.length;
|
||||
})&&Math.abs(player.countCards('h')-current.countCards('h'))==2;
|
||||
})) return 10;
|
||||
return 2;
|
||||
},
|
||||
result:{
|
||||
target:-1,
|
||||
target:function(player,target){
|
||||
var evtx=_status.event.getParent('phaseUse');
|
||||
var num=get.sgn(get.attitude(player,target));
|
||||
var targets=game.filterPlayer(current=>{
|
||||
if(current==player||!evtx||get.attitude(player,current)==0) return false;
|
||||
return !current.hasHistory('lose',evt=>{
|
||||
return evt.getParent(3).name!='clanfuxun'&&evt.getParent('phaseUse')==evtx&&evt.cards2.length;
|
||||
})&&!current.hasHistory('gain',evt=>{
|
||||
return evt.getParent().name!='clanfuxun'&&evt.getParent('phaseUse')==evtx&&evt.cards.length;
|
||||
})&&Math.abs(player.countCards('h')-current.countCards('h'))==2;
|
||||
});
|
||||
if(targets.contains(target)){
|
||||
if(player.countCards('h')<target.countCards('h')) return get.sgn(num+0.5)*Math.sqrt(2-num);
|
||||
else return num*(2+num);
|
||||
}
|
||||
return get.sgn(num+0.5)*(1-num)*0.25;
|
||||
},
|
||||
},
|
||||
},
|
||||
subSkill:{
|
||||
|
@ -272,9 +326,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.itemtype(card)=='card';
|
||||
},
|
||||
position:'hes',
|
||||
filterTarget:lib.filter.targetEnabled,
|
||||
filterTarget:lib.filter.filterTarget,
|
||||
selectCard:1,
|
||||
check:(card)=>6-get.value(card),
|
||||
check:function(card){
|
||||
var player=_status.event.player;
|
||||
if(player.hasSkill('clanzhongliu')&&get.position(card)!='h') return 10-get.value(card);
|
||||
return 5-get.value(card);
|
||||
},
|
||||
log:false,
|
||||
precontent:function(){
|
||||
delete event.result.skill;
|
||||
|
@ -2106,7 +2164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
str+=('摸'+get.cnNumber(Math.min(8,num2-num1))+'张牌,然后手牌上限-1。');
|
||||
}
|
||||
str+=('<br>※当前手牌上限:'+num2);
|
||||
var num3=player.countMark('clanguixiang_count');
|
||||
var num3=((_status.event.getParent().phaseIndex||0)+1);
|
||||
if(num3>0){
|
||||
str+=(';阶段数:'+num3)
|
||||
}
|
||||
|
@ -2128,7 +2186,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
ai:{
|
||||
order:function(item,player){
|
||||
var num=player.getHandcardLimit(),numx=player.countMark('clanguixiang_count');
|
||||
var num=player.getHandcardLimit(),numx=((_status.event.getParent().phaseIndex||0)+1);
|
||||
if(num==5&&numx==4&&player.getStat('skill').clanyirong) return 0;
|
||||
if(player.countCards('h')==num+1&&num!=2&&(num<=4||num>4&&numx>4)) return 10;
|
||||
return 0.5;
|
||||
|
@ -2139,56 +2197,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
clanguixiang:{
|
||||
audio:2,
|
||||
init:function(player){
|
||||
player.addSkill('clanguixiang_count');
|
||||
},
|
||||
onremove:function(player){
|
||||
player.removeSkill('clanguixiang_count');
|
||||
var event=_status.event.getParent('phase');
|
||||
if(event) delete event._clanguixiang;
|
||||
},
|
||||
trigger:{
|
||||
player:['phaseZhunbeiBefore','phaseJudgeBefore','phaseDrawBefore','phaseDiscardBefore','phaseJieshuBefore'],
|
||||
player:'phaseChange',
|
||||
},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
var evt=event.getParent('phase');
|
||||
if(!evt||!evt._clanguixiang) return false;
|
||||
var num1=player.getHandcardLimit()-1,num2=player.countMark('clanguixiang_count');
|
||||
if(event.phaseList[event.num].startsWith('phaseUse')) return false;
|
||||
var num1=player.getHandcardLimit()-1,num2=event.num;
|
||||
return num1==num2;
|
||||
},
|
||||
content:function(){
|
||||
trigger.cancel(null,null,'notrigger');
|
||||
var next=player.phaseUse();
|
||||
event.next.remove(next);
|
||||
trigger.getParent().next.unshift(next);
|
||||
},
|
||||
subSkill:{
|
||||
count:{
|
||||
trigger:{
|
||||
player:['phaseZhunbeiBegin','phaseJudgeBegin','phaseDrawBegin','phaseDiscardBegin','phaseJieshuBegin','phaseUseBegin'],
|
||||
},
|
||||
forced:true,
|
||||
popup:false,
|
||||
lastDo:true,
|
||||
priority:-Infinity,
|
||||
content:function(){
|
||||
player.addMark('clanguixiang_count',1,false);
|
||||
},
|
||||
group:'clanguixiang_clear',
|
||||
},
|
||||
clear:{
|
||||
trigger:{player:'phaseBefore'},
|
||||
forced:true,
|
||||
charlotte:true,
|
||||
popup:false,
|
||||
firstDo:true,
|
||||
priority:Infinity,
|
||||
content:function(){
|
||||
delete player.storage.clanguixiang_count;
|
||||
trigger._clanguixiang=true;
|
||||
},
|
||||
},
|
||||
trigger.phaseList[trigger.num]='phaseUse|clanguixiang';
|
||||
game.delayx();
|
||||
},
|
||||
},
|
||||
clanmuyin:{
|
||||
|
|
|
@ -3304,14 +3304,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dddduanbing:{
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.canAddJudge('bingliang')&&player.hasCard((card)=>lib.skill['dddduanbing'].filterCard(card,player),'h');
|
||||
return player.canAddJudge('bingliang')&&player.hasCard((card)=>lib.skill['dddduanbing'].filterCard(card,player),'he');
|
||||
},
|
||||
filterCard:function(card,player){
|
||||
if(get.color(card)!='black'||get.type2(card)=='trick') return false;
|
||||
return player.canAddJudge(get.autoViewAs({name:'bingliang'},[card]));
|
||||
},
|
||||
check:function(card){
|
||||
return 6-get.value(card);
|
||||
return 8.2-get.value(card);
|
||||
},
|
||||
discard:false,
|
||||
lose:false,
|
||||
|
|
124
character/diy.js
124
character/diy.js
|
@ -178,7 +178,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ns_chengpu:['male','wu',4,['decadelihuo','decadechunlao']],
|
||||
ns_sundeng:['male','wu',4,['xinkuangbi']],
|
||||
ns_duji:['male','wei',3,['xinfu_andong','xinyingshi']],
|
||||
old_majun:["male","wei",3,["xinfu_jingxie1","xinfu_qiaosi"],[]],
|
||||
old_majun:["male","wei",3,["xinfu_jingxie1","xinfu_qiaosi"]],
|
||||
ns_mengyou:['male','qun',4,['nsmanzhi']],
|
||||
|
||||
old_jiakui:['male','wei',4,['tongqu','xinwanlan']],
|
||||
ol_guohuai:['male','wei',3,['rejingce']],
|
||||
|
@ -219,7 +220,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"ns_chentai","ns_huangwudie","ns_sunyi","ns_zhangning","ns_yanghu"],
|
||||
diy_yijiang3:['ns_ruanji','ns_zanghong','ns_limi','ns_zhonglimu','prp_zhugeliang','key_seira','key_kiyu','key_tomoyo','key_minagi','key_michiru'],
|
||||
diy_tieba:["ns_zuoci","ns_lvzhi","ns_wangyun","ns_nanhua","ns_nanhua_left","ns_nanhua_right","ns_huamulan","ns_huangzu","ns_jinke","ns_yanliang","ns_wenchou","ns_caocao","ns_caocaosp","ns_zhugeliang","ns_wangyue","ns_yuji","ns_xinxianying","ns_guanlu","ns_simazhao","ns_sunjian","ns_duangui","ns_zhangbao","ns_masu","ns_zhangxiu","ns_lvmeng","ns_shenpei","ns_yujisp","ns_yangyi","ns_liuzhang","ns_xinnanhua","ns_luyusheng"],
|
||||
diy_fakenews:["diy_wenyang","ns_zhangwei","ns_caimao","ns_chengpu",'ns_sundeng','ns_duji'],
|
||||
diy_fakenews:["diy_wenyang","ns_zhangwei","ns_caimao","ns_chengpu",'ns_sundeng','ns_duji','ns_mengyou'],
|
||||
diy_xushi:["diy_feishi","diy_hanlong","diy_liufu","diy_liuyan","diy_liuzan","diy_tianyu","diy_xizhenxihong","diy_yangyi","diy_zaozhirenjun"],
|
||||
diy_default:["diy_yuji","diy_caiwenji","diy_lukang","diy_zhenji","old_majun"],
|
||||
diy_noname:['noname'],
|
||||
|
@ -373,6 +374,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ns_zhangxiu:'#p本因坊神策',
|
||||
ns_yangyi:'#p本因坊神策',
|
||||
ns_liuzhang:'#r矮子剑薄荷糖',
|
||||
ns_mengyou:'#g残昼厄夜',
|
||||
},
|
||||
card:{
|
||||
kano_paibingbuzhen:{
|
||||
|
@ -2599,7 +2601,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
else game.delayx();
|
||||
'step 3'
|
||||
player.addTempSkill('nstuilun_effect',{player:'phaseBegin'});
|
||||
player.addTempSkill('nstuilun_effect',{player:'phaseBeginStart'});
|
||||
},
|
||||
subSkill:{
|
||||
effect:{
|
||||
|
@ -3560,7 +3562,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(player.countCards('h')>0) player.chooseToDiscard('h',true,player.countCards('h'));
|
||||
player.recover();
|
||||
trigger.cancel();
|
||||
player.addTempSkill('kyou_duanfa_draw',{player:'phaseBegin'});
|
||||
player.addTempSkill('kyou_duanfa_draw',{player:'phaseBeginStart'});
|
||||
},
|
||||
subSkill:{
|
||||
draw:{
|
||||
|
@ -6370,9 +6372,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var num=game.roundNumber;
|
||||
if(num&&typeof num=='number') player.draw(Math.min(3,num));
|
||||
'step 1'
|
||||
var next=player.phaseUse();
|
||||
event.next.remove(next);
|
||||
trigger.next.push(next);
|
||||
trigger.phaseList.splice(trigger.num,0,'phaseUse|godan_yuanyi');
|
||||
},
|
||||
},
|
||||
godan_feiqu:{
|
||||
|
@ -17953,6 +17953,96 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
},
|
||||
nsmanzhi:{
|
||||
audio:'dcmanzhi',
|
||||
trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
var nums=[];
|
||||
game.countPlayer(current=>{
|
||||
nums.add(current.hp);
|
||||
nums.add(current.maxHp);
|
||||
nums.add(current.countCards('h'));
|
||||
nums.add(current.countCards('e'));
|
||||
nums.add(current.countCards('j'));
|
||||
});
|
||||
for(var a of nums){
|
||||
for(var b of nums){
|
||||
if((0.5*a*a)+(2.5*b)-game.roundNumber==game.countPlayer()) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var nums=[];
|
||||
game.countPlayer(current=>{
|
||||
nums.add(current.hp);
|
||||
nums.add(current.maxHp);
|
||||
nums.add(current.countCards('h'));
|
||||
nums.add(current.countCards('e'));
|
||||
nums.add(current.countCards('j'));
|
||||
});
|
||||
nums.sort((a,b)=>a-b);
|
||||
var a=null,b=null,goon=false;
|
||||
for(a of nums){
|
||||
for(b of nums){
|
||||
if((0.5*a*a)+(2.5*b)-game.roundNumber==game.countPlayer()){
|
||||
goon=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(goon) break;
|
||||
}
|
||||
player.chooseButton(2,[
|
||||
'蛮智:请选择让下列等式成立的A与B的值',
|
||||
'<div class="text center">目标等式</div>',
|
||||
`0.5 × A² + 2.5 × B - ${game.roundNumber} = ${game.countPlayer()}`,
|
||||
'<div class="text center">A的可选值</div>',
|
||||
[nums.map(i=>{
|
||||
return [
|
||||
`A|${i}`,
|
||||
i==a?(`<span class="yellowtext">${i}</span>`):i,
|
||||
]
|
||||
}),'tdnodes'],
|
||||
'<div class="text center">B的可选值</div>',
|
||||
[nums.map(i=>{
|
||||
return [
|
||||
`B|${i}`,
|
||||
i==b?(`<span class="yellowtext">${i}</span>`):i,
|
||||
]
|
||||
}),'tdnodes'],
|
||||
]).set('filterButton',function(button){
|
||||
if(!ui.selected.buttons.length) return true;
|
||||
return button.link[0]!=ui.selected.buttons[0].link[0];
|
||||
}).set('filterOk',function(){
|
||||
if(ui.selected.buttons.length!=2) return false;
|
||||
var a,b;
|
||||
for(var i of ui.selected.buttons){
|
||||
if(i.link[0]=='A') a=parseInt(i.link.slice(2));
|
||||
else b=parseInt(i.link.slice(2));
|
||||
}
|
||||
return (0.5*a*a)+(2.5*b)-game.roundNumber==game.countPlayer();
|
||||
}).set('choice',[a,b]).set('ai',(button)=>{
|
||||
var choice=_status.event.choice;
|
||||
if(button.link==`A|${choice[0]}`||button.link==`B|${choice[1]}`) return 1;
|
||||
return 0;
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var a,b;
|
||||
for(var i of result.links){
|
||||
if(i[0]=='A') a=parseInt(i.slice(2));
|
||||
else b=parseInt(i.slice(2));
|
||||
}
|
||||
equals=`0.5×${a}²+2.5×${b}-${game.roundNumber}=${game.countPlayer()}`;
|
||||
player.logSkill('nsmanzhi');
|
||||
player.chat(equals);
|
||||
game.log(player,'的计算结果为',equals);
|
||||
player.draw(game.countPlayer());
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
dynamicTranslate:{
|
||||
nsjiquan:function(player){
|
||||
|
@ -19030,6 +19120,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
junk_huangyueying_prefix:'旧界',
|
||||
old_majun:'骰子马钧',
|
||||
old_majun_prefix:'骰子',
|
||||
ns_mengyou:'数学孟优',
|
||||
ns_mengyou_prefix:'数学',
|
||||
ns_mengyou_ab:'孟优',
|
||||
nsmanzhi:'蛮智',
|
||||
nsmanzhi_info:'准备阶段或结束阶段开始时,你可以将场上出现的数字代入等式中的A和B。若此等式成立,你摸Y张牌。(等式为Y=0.5A²+2.5B-X,其中X为游戏轮数,Y为存活人数)',
|
||||
ns_chengpu:'铁索程普',
|
||||
ns_chengpu_prefix:'铁索',
|
||||
ns_chengpu_ab:'程普',
|
||||
ns_sundeng:'画饼孙登',
|
||||
ns_sundeng_prefix:'画饼',
|
||||
ns_sundeng_ab:'孙登',
|
||||
ns_duji:'画饼杜畿',
|
||||
ns_duji_prefix:'画饼',
|
||||
ns_duji_ab:'杜畿',
|
||||
|
||||
diy_tieba:'吧友设计',
|
||||
diy_xushi:'玩点论杀·虚实篇',
|
||||
|
@ -19041,12 +19145,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
diy_yijiang3:'设计比赛2022',
|
||||
diy_fakenews:'杀海流言',
|
||||
diy_trashbin:'垃圾桶',
|
||||
ns_chengpu:'铁索程普',
|
||||
ns_chengpu_ab:'程普',
|
||||
ns_sundeng:'画饼孙登',
|
||||
ns_sundeng_ab:'孙登',
|
||||
ns_duji:'画饼杜畿',
|
||||
ns_duji_ab:'杜畿',
|
||||
},
|
||||
pinyins:{
|
||||
加藤うみ:['Kato','Umi'],
|
||||
|
|
|
@ -2453,6 +2453,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(player.needsToDiscard()) return num/3;
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
targetInRange:function(card,player,target){
|
||||
if(target.hasMark('yingba_mark')) return true;
|
||||
}
|
||||
},
|
||||
enable:'phaseUse',
|
||||
|
@ -2468,15 +2471,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
locked:false,
|
||||
//global:'yingba_mark',
|
||||
mod:{
|
||||
targetInRange:function(card,player,target){
|
||||
if(target.hasMark('yingba_mark')) return true;
|
||||
},
|
||||
},
|
||||
ai:{
|
||||
combo:'scfuhai',
|
||||
threaten:3,
|
||||
order:9,
|
||||
order:11,
|
||||
result:{
|
||||
player:function(player,target){
|
||||
if(player.maxHp==1) return -2.5;
|
||||
|
@ -3588,7 +3586,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
huoxin2:{
|
||||
trigger:{
|
||||
player:['phaseAfter','dieAfter'],
|
||||
global:'phaseBefore',
|
||||
global:'phaseBeforeStart',
|
||||
},
|
||||
lastDo:true,
|
||||
charlotte:true,
|
||||
|
@ -5414,7 +5412,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.chooseTarget(get.prompt('dawu'),'令至多'+get.cnNumber(num)+'名角色获得“大雾”标记',
|
||||
[1,num]).set('ai',function(target){
|
||||
if(target.isMin()) return 0;
|
||||
if(target.hasSkill('biantian2')) return 0;
|
||||
if(target.hasSkill('biantian2')||target.hasSkill('dawu2')) return 0;
|
||||
var att=get.attitude(player,target);
|
||||
if(att>=4){
|
||||
if(_status.event.allUse) return att;
|
||||
|
@ -5428,13 +5426,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
})*2);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.logSkill('dawu',result.targets,'thunder');
|
||||
var length=result.targets.length;
|
||||
for(var i=0;i<length;i++){
|
||||
result.targets[i].addSkill('dawu2');
|
||||
}
|
||||
var targets=result.targets.sortBySeat();
|
||||
player.logSkill('dawu',targets,'thunder');
|
||||
var length=targets.length;
|
||||
targets.forEach(target=>{
|
||||
target.addAdditionalSkill(`dawu_${player.playerid}`,'dawu2');
|
||||
target.markAuto('dawu2',[player]);
|
||||
});
|
||||
player.addTempSkill('dawu3',{player:'phaseBeginStart'})
|
||||
player.chooseCardButton('选择弃置'+get.cnNumber(length)+'张“星”',length,player.getExpansions('qixing'),true);
|
||||
player.addSkill('dawu3');
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
|
@ -5445,46 +5445,41 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ai:{combo:'qixing'},
|
||||
},
|
||||
dawu2:{
|
||||
trigger:{player:'damageBegin4'},
|
||||
filter:function(event){
|
||||
if(!event.hasNature('thunder')) return true;
|
||||
return false;
|
||||
},
|
||||
mark:true,
|
||||
forced:true,
|
||||
charlotte:true,
|
||||
content:function(){
|
||||
trigger.cancel();
|
||||
},
|
||||
ai:{
|
||||
nofire:true,
|
||||
nodamage:true,
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(get.tag(card,'damage')&&!get.tag(card,'thunderDamage')) return [0,0];
|
||||
if(get.tag(card,'damage')&&!get.tag(card,'thunderDamage')) return 'zeroplayertarget';
|
||||
}
|
||||
},
|
||||
},
|
||||
intro:{
|
||||
markcount:()=>1,
|
||||
content:'共有1个标记',
|
||||
content:function(storage){
|
||||
return `共有${storage.length}枚标记`;
|
||||
},
|
||||
}
|
||||
},
|
||||
dawu3:{
|
||||
trigger:{player:['phaseBegin','dieBegin']},
|
||||
silent:true,
|
||||
trigger:{global:'damageBegin4'},
|
||||
filter:function(event,player){
|
||||
return !event.hasNature('thunder')&&event.player.getStorage('dawu2').includes(player);
|
||||
},
|
||||
forced:true,
|
||||
charlotte:true,
|
||||
logTarget:'player',
|
||||
content:function(){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].hasSkill('dawu2')){
|
||||
game.players[i].removeSkill('dawu2');
|
||||
trigger.cancel();
|
||||
},
|
||||
onremove:function(player){
|
||||
game.countPlayer2(current=>{
|
||||
if(current.getStorage('dawu2').includes(player)){
|
||||
current.unmarkAuto('dawu2',player);
|
||||
current.removeAdditionalSkill(`dawu_${player.playerid}`);
|
||||
}
|
||||
if(game.players[i].hasSkill('kuangfeng2')){
|
||||
game.players[i].removeSkill('kuangfeng2');
|
||||
}
|
||||
}
|
||||
player.removeSkill('dawu3');
|
||||
}
|
||||
},true);
|
||||
},
|
||||
},
|
||||
kuangfeng:{
|
||||
unique:true,
|
||||
|
@ -5501,13 +5496,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
var length=result.targets.length;
|
||||
for(var i=0;i<length;i++){
|
||||
result.targets[i].addSkill('kuangfeng2');
|
||||
}
|
||||
player.logSkill('kuangfeng',result.targets,'fire');
|
||||
player.chooseCardButton('弃置'+get.cnNumber(length)+'枚星',length,player.getExpansions('qixing'),true);
|
||||
player.addSkill('dawu3');
|
||||
var targets=result.targets.sortBySeat();
|
||||
player.logSkill('kuangfeng',targets,'fire');
|
||||
var length=targets.length;
|
||||
targets.forEach(target=>{
|
||||
target.addAdditionalSkill(`kuangfeng_${player.playerid}`,'kuangfeng2');
|
||||
target.markAuto('kuangfeng2',[player]);
|
||||
});
|
||||
player.addTempSkill('kuangfeng3',{player:'phaseBeginStart'})
|
||||
player.chooseCardButton('选择弃置'+get.cnNumber(length)+'张“星”',length,player.getExpansions('qixing'),true);
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
|
@ -5518,28 +5515,40 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ai:{combo:'qixing'},
|
||||
},
|
||||
kuangfeng2:{
|
||||
trigger:{player:'damageBegin3'},
|
||||
filter:function(event){
|
||||
if(event.hasNature('fire')) return true;
|
||||
return false;
|
||||
},
|
||||
mark:true,
|
||||
charlotte:true,
|
||||
intro:{
|
||||
markcount:()=>1,
|
||||
content:'共有1个标记'
|
||||
},
|
||||
forced:true,
|
||||
content:function(){
|
||||
trigger.num++;
|
||||
content:function(storage){
|
||||
return `共有${storage.length}枚标记`;
|
||||
},
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(get.tag(card,'fireDamage')) return 1.5;
|
||||
if(get.tag(card,'fireDamage')&¤t<0) return 1.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
kuangfeng3:{
|
||||
trigger:{global:'damageBegin3'},
|
||||
filter:function(event){
|
||||
return event.hasNature('fire')&&event.player.getStorage('kuangfeng2').includes(player);
|
||||
},
|
||||
charlotte:true,
|
||||
forced:true,
|
||||
logTarget:'player',
|
||||
content:function(){
|
||||
trigger.num++;
|
||||
},
|
||||
onremove:function(player){
|
||||
game.countPlayer2(current=>{
|
||||
if(current.getStorage('kuangfeng2').includes(player)){
|
||||
current.unmarkAuto('kuangfeng2',player);
|
||||
current.removeAdditionalSkill(`kuangfeng_${player.playerid}`);
|
||||
}
|
||||
},true);
|
||||
},
|
||||
},
|
||||
yeyan:{
|
||||
unique:true,
|
||||
forceDie:true,
|
||||
|
|
|
@ -3397,7 +3397,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
target:function(player,target){
|
||||
var val=0;
|
||||
var bool1=!game.hasPlayer(current=>current.maxHp<target.maxHp),bool2=target.isMinHp(),bool3=target.isMinHandcard();
|
||||
if(bool1) val+=5;
|
||||
if(bool1) val+=6.5;
|
||||
if(bool2){
|
||||
if(bool1) target.maxHp++;
|
||||
val+=Math.max(0,get.recoverEffect(target,player,player));
|
||||
|
@ -3872,7 +3872,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
dcqizi:{
|
||||
mod:{
|
||||
playerEnabled:function(card,player,target){
|
||||
cardSavable:function(card,player,target){
|
||||
if(get.distance(player,target)>2&&card.name=='tao'&&target==_status.event.dying) return false;
|
||||
},
|
||||
}
|
||||
|
@ -4997,10 +4997,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return false;
|
||||
},
|
||||
prompt2:'检索一张【无中生有】并置于牌堆顶',
|
||||
check:function(event,player){
|
||||
if(!_status.currentPhase) return false;
|
||||
return get.attitude(player,_status.currentPhase.next)>0;
|
||||
},
|
||||
content:function(){
|
||||
var card=get.cardPile(function(card){
|
||||
return card.name=='wuzhong'&&get.suit(card)!='diamond';
|
||||
|
@ -6402,6 +6398,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger.directHit.push(trigger.target);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
player:function(card,player,target){
|
||||
if(player!==target&&get.itemtype(target)==='player'&&(card.name==='sha'||get.type(card,false)==='trick')&&
|
||||
target.countCards('he')&&!target.hasSkillTag('noh')) return [1,0,1,-1];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -7631,9 +7635,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
list.push(suit);
|
||||
}
|
||||
}
|
||||
if(list.length){
|
||||
player.chooseControl(list,'cancel2').set('dialog',dialog);
|
||||
}
|
||||
if(list.length) player.chooseControl(list,'cancel2').set('dialog',dialog).set('list',list).set('map',map).set('ai',function(){
|
||||
let max=0,res='cancel2';
|
||||
for(let s of _status.event.list){
|
||||
let temp=0;
|
||||
for(let i of _status.event.map[s]){
|
||||
temp+=get.value(i,_status.event.player)+get.sgn(get.attitude(_status.event.player,get.owner(i)))*(6-get.value(i,get.owner(i)));
|
||||
}
|
||||
for(let i in _status.event.map){
|
||||
if(i===s) continue;
|
||||
for(let j of _status.event.map[i]){
|
||||
temp-=get.sgn(get.attitude(_status.event.player,get.owner(j)))*get.value(j,get.owner(j));
|
||||
}
|
||||
}
|
||||
if(temp>max){
|
||||
res=s;
|
||||
max=temp;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
});
|
||||
else event.finish();
|
||||
'step 3'
|
||||
if(result.control!='cancel2'){
|
||||
|
@ -8390,6 +8411,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
subSkill:{
|
||||
effect:{
|
||||
audio:'kuanshi',
|
||||
mark:true,
|
||||
intro:{
|
||||
content:'每回合限一次,当$于一回合内受到第2点伤害后,其回复1点体力。'
|
||||
},
|
||||
trigger:{global:'damageEnd'},
|
||||
forced:true,
|
||||
charlotte:true,
|
||||
|
@ -9359,6 +9384,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
dcdanying:{
|
||||
audio:2,
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(num<=0 || card.name!=='sha'&&card.name!=='shan' || !player.hasCard(i=>i.hasGaintag('dcmiyun_tag'),'h')) return;
|
||||
return Math.max(0.12,num/25);
|
||||
}
|
||||
},
|
||||
locked:false,
|
||||
enable:['chooseToUse','chooseToRespond'],
|
||||
usable:1,
|
||||
hiddenCard:function(player,name){
|
||||
|
@ -9435,11 +9467,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
target:function(card,player,target){
|
||||
if(_status._dcdanying_aiChecking) return;
|
||||
_status._dcdanying_aiChecking=true;
|
||||
var eff=get.effect(target,{name:'guohe_copy2'},player,player);
|
||||
let eff=get.effect(target,{name:'guohe_copy2'},player,player);
|
||||
delete _status._dcdanying_aiChecking;
|
||||
if(eff>0) eff=-1;
|
||||
else eff=1;
|
||||
return [1,eff];
|
||||
return [1,get.sgn(eff)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10068,6 +10098,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp_jiaxu:['sp_jiaxu','dc_sp_jiaxu','yj_jiaxu'],
|
||||
qiaorui:['qiaorui','tw_qiaorui'],
|
||||
mamidi:['mamidi','xin_mamidi'],
|
||||
mengyou:['mengyou','ns_mengyou'],
|
||||
},
|
||||
translate:{
|
||||
re_panfeng:'潘凤',
|
||||
|
|
|
@ -201,7 +201,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
chiying:{
|
||||
trigger:{global:'damageBegin'},
|
||||
trigger:{global:'damageBegin2'},
|
||||
check:function(event,player){
|
||||
return get.attitude(player,event.player)>0;
|
||||
},
|
||||
|
@ -209,7 +209,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.num<=1) return false;
|
||||
return true;
|
||||
},
|
||||
priority:-11,
|
||||
content:function(){
|
||||
trigger.num=1;
|
||||
if(trigger.source){
|
||||
|
|
|
@ -227,7 +227,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
target.isOnline()){
|
||||
player.storage.jsrgbashiing=true;
|
||||
var list=['sha','shan'].filter(name=>trigger.filterCard({name:name},player,trigger));
|
||||
var names=list.map(i=>'【'+i+'】').join('或');
|
||||
var names=list.map(i=>'【'+get.translation(i)+'】').join('或');
|
||||
var next=target.chooseToRespond('是否替'+get.translation(player)+'打出一张'+names+'?',{name:list});
|
||||
next.set('ai',function(){
|
||||
var event=_status.event;
|
||||
|
|
|
@ -6,7 +6,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
connect:true,
|
||||
characterSort:{
|
||||
mobile:{
|
||||
mobile_default:['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:['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_standard:["xin_xiahoudun","xin_zhangfei"],
|
||||
mobile_shenhua_feng:['re_xiaoqiao',"xin_zhoutai"],
|
||||
|
@ -26,6 +26,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
character:{
|
||||
xin_wuban:['male','shu',4,['xinjintao'],['clan:陈留吴氏','character:wuban']],
|
||||
baoxin:['male','qun',4,['mutao','yimou'],['character:tw_baoxin']],
|
||||
jiangji:['male','wei',3,['twjichou','jilun'],['character:tw_jiangji']],
|
||||
liwei:['male','shu',4,['jiaohua'],['character:tw_liwei','die:tw_liwei']],
|
||||
laimin:['male','shu',3,['laishou','luanqun']],
|
||||
yj_zhoubuyi:['male','wei',3,['mbhuiyao','mbquesong']],
|
||||
xin_guozhao:['female','wei',3,['yichong','wufei']],
|
||||
xin_zhangyi:['male','shu',4,['xinwurong','shizhi']],
|
||||
|
@ -166,6 +171,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
scs_gaowang:['male','qun','',['scsmiaoyu'],['unseen','sex:male_castrated']],
|
||||
},
|
||||
characterIntro:{
|
||||
laimin:'来敏(165年—261年),字敬达,义阳新野人,东汉太中大夫来歙之后,司空来艳之子,三国时期蜀汉官员。东汉末年,逢董卓之乱,来敏跟随姐夫黄琬到荆州避难,黄琬是刘璋祖母的侄子,来敏又与姐姐来氏入蜀,被刘璋引为宾客。来敏喜欢读书,尤其喜欢《左氏春秋》。刘备平定益州后,以来敏为典学校尉,后立太子,来敏为家令。刘禅继位后,任命来敏为虎贲中郎将,诸葛亮驻汉中,请来敏为军祭酒、辅军将军。却因其口出狂言而被罢官,诸葛亮死后,来敏历任大长秋、光禄大夫、执慎将军等职,期间多次因说错话而被免官,蜀汉景耀年间,来敏去世,时年九十七岁。',
|
||||
shichangshi:'十常侍,指中国东汉(公元25年—220年)灵帝时期(168年-189年)操纵政权的十二个宦官:张让、赵忠、夏恽、郭胜、孙璋、毕岚、栗嵩、段珪、高望、张恭、韩悝、宋典(在小说《三国演义》里,十常侍指的是指张让、赵忠、封谞、段珪、曹节、侯览、蹇硕、程旷、夏恽、郭胜十人),他们都任职中常侍。玩弄小皇帝于股掌之中,以至灵帝称“张常侍是我父,赵常侍是我母”。十常侍自己横征暴敛,卖官鬻爵,他们的父兄子弟遍布天下,横行乡里,祸害百姓,无官敢管。人民不堪剥削、压迫,纷纷起来反抗。当时一些比较清醒的官吏,已看出宦官集团的黑暗腐败,导致大规模农民起义的形势。郎中张钧在给皇帝的奏章中明确指出,黄巾起义是外戚宦官专权逼出来的,他说:“张角所以能兴兵作乱,万人所以乐附之者,其源皆由十常侍多放父兄、子弟、婚宗、宾客典据州郡,辜确财利,侵略百姓,百姓之怨无所告诉,故谋议不轨,聚为‘盗贼’。”后被曹操、袁绍所歼。',
|
||||
sunzhang:'孙璋(?-189年?)东汉末期汉灵帝的宦官,官居中常侍,为十常侍之一,在张让、赵忠之下位居第三。光熹元年(189年),张让、赵忠、段珪等诛杀何进,袁绍率军入宫,诛杀孙璋。',
|
||||
bilan:'毕岚(?—189),东汉宦官,十常侍之一。十常侍朋比为奸,祸乱朝纲,制造出党锢之祸,后被袁绍诛杀。另外,毕岚曾制造翻车,用于取河水洒路。',
|
||||
|
@ -380,6 +386,373 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
skill:{
|
||||
//吴班
|
||||
xinjintao:{
|
||||
audio:'jintao',
|
||||
inherit:'jintao',
|
||||
content:function(){
|
||||
var evt=trigger.getParent('phaseUse');
|
||||
var index=player.getHistory('useCard',function(evtx){
|
||||
return evtx.card.name=='sha'&&evtx.getParent('phaseUse')==evt;
|
||||
}).indexOf(trigger);
|
||||
if(index==0){
|
||||
game.log(trigger.card,'不可被响应');
|
||||
trigger.directHit.addArray(game.players);
|
||||
}
|
||||
else{
|
||||
game.log(trigger.card,'伤害+1');
|
||||
if(typeof trigger.baseDamage!='number') trigger.baseDamage=1;
|
||||
trigger.baseDamage++;
|
||||
}
|
||||
},
|
||||
},
|
||||
//鲍信
|
||||
mutao:{
|
||||
audio:'twmutao',
|
||||
inherit:'twmutao',
|
||||
content:function(){
|
||||
'step 0'
|
||||
event.togive=target.getNext();
|
||||
var cards=target.getCards('h',{name:'sha'});
|
||||
if(!cards.length){
|
||||
game.log('但',target,'没有','#y杀','!');
|
||||
event.finish();
|
||||
}
|
||||
else target.addToExpansion(cards,target,'give').gaintag.add('mutao');
|
||||
'step 1'
|
||||
var card=target.getExpansions('mutao').randomGet();
|
||||
target.give(card,event.togive);
|
||||
'step 2'
|
||||
if(target.getExpansions('mutao').length){
|
||||
event.togive=event.togive.getNext();
|
||||
event.goto(1);
|
||||
}
|
||||
else{
|
||||
target.line(event.togive);
|
||||
event.togive.damage(Math.min(3,event.togive.countCards('h',{name:'sha'})),target);
|
||||
}
|
||||
},
|
||||
intro:{
|
||||
content:'expansion',
|
||||
markcount:'expansion',
|
||||
},
|
||||
},
|
||||
yimou:{
|
||||
audio:'twyimou',
|
||||
inherit:'twyimou',
|
||||
content:function(){
|
||||
'step 0'
|
||||
if(trigger.player!=player) player.addExpose(0.3);
|
||||
var target=get.translation(trigger.player);
|
||||
var choiceList=[
|
||||
'令'+target+'获得牌堆里的一张【杀】',
|
||||
'令'+target+'将一张牌交给另一名角色,然后'+target+'摸两张牌',
|
||||
];
|
||||
var list=['选项一'];
|
||||
if(trigger.player.countCards('h')) list.push('选项二');
|
||||
else choiceList[1]='<span style="opacity:0.5">'+choiceList[1]+'</span>';
|
||||
player.chooseControl(list).set('prompt','毅谋:请选择一项').set('choiceList',choiceList).set('ai',function(){
|
||||
var evt=_status.event.getTrigger(),list=_status.event.list;
|
||||
var player=_status.event.player;
|
||||
var target=evt.player;
|
||||
if(target.countCards('h')&&list.contains('选项二')) return '选项二';
|
||||
return '选项一';
|
||||
}).set('list',list);
|
||||
'step 1'
|
||||
event.choice=result.control;
|
||||
'step 2'
|
||||
if(event.choice!='选项二'){
|
||||
var card=get.cardPile2(function(card){
|
||||
return card.name=='sha';
|
||||
});
|
||||
if(card) trigger.player.gain(card,'gain2');
|
||||
else game.log('但牌堆里已经没有','#y杀','了!');
|
||||
if(event.choice=='选项一') event.finish();
|
||||
}
|
||||
'step 3'
|
||||
if(event.choice!='选项一'){
|
||||
if(trigger.player.countCards('h')) trigger.player.chooseCardTarget({
|
||||
prompt:'将一张手牌交给另一名其他角色并摸两张牌',
|
||||
filterCard:true,
|
||||
forced:true,
|
||||
filterTarget:lib.filter.notMe,
|
||||
ai1:function(card){
|
||||
return 1/Math.max(0.1,get.value(card));
|
||||
},
|
||||
ai2:function(target){
|
||||
var player=_status.event.player,att=get.attitude(player,target);
|
||||
if(target.hasSkillTag('nogain')) att/=9;
|
||||
return 4+att;
|
||||
},
|
||||
});
|
||||
else event.finish();
|
||||
}
|
||||
'step 4'
|
||||
var target=result.targets[0];
|
||||
trigger.player.line(target);
|
||||
trigger.player.give(result.cards,target);
|
||||
trigger.player.draw(2);
|
||||
},
|
||||
},
|
||||
//蒋济
|
||||
jilun:{
|
||||
audio:'twjilun',
|
||||
inherit:'twjilun',
|
||||
filter:function(event,player){
|
||||
return player.hasSkill('twjichou');
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var num=Math.min(Math.max(1,player.getStorage('twjichou').length),5);
|
||||
event.num=num;
|
||||
var choices=['选项一'];
|
||||
var choiceList=[
|
||||
'摸'+get.cnNumber(num)+'张牌',
|
||||
'获得一个“机论”标记',
|
||||
];
|
||||
if(!player.getStorage('twjichou').length||!player.getStorage('twjichou').filter(function(name){
|
||||
return !player.getStorage('jilun').contains(name)&&player.hasUseTarget({name:name});
|
||||
}).length) choiceList[1]='<span style="opacity:0.5">'+choiceList[1]+'</span>';
|
||||
else choices.push('选项二');
|
||||
player.chooseControl(choices,'cancel2').set('choiceList',choiceList).set('prompt',get.prompt('jilun')).set('ai',()=>{
|
||||
if(_status.event.choiceList.length==1||!player.getStorage('twjichou').length) return 0;
|
||||
var val=_status.event.num>3?Math.min(1.5,1+(_status.event.num-3)*0.1):1;
|
||||
for(var name of player.getStorage('twjichou')){
|
||||
if(player.getStorage('jilun').contains(name)) continue;
|
||||
if(player.getUseValue({name:name})>4*val) return 1;
|
||||
}
|
||||
return 0;
|
||||
}).set('num',num);
|
||||
'step 1'
|
||||
if(result.control!='cancel2'){
|
||||
player.logSkill('jilun');
|
||||
if(result.control=='选项一') player.draw(num);
|
||||
else player.addMark('jilun_mark',1);
|
||||
}
|
||||
},
|
||||
group:'jilun_effect',
|
||||
subSkill:{
|
||||
mark:{
|
||||
intro:{content:'mark'},
|
||||
},
|
||||
effect:{
|
||||
audio:'twjilun',
|
||||
trigger:{global:'phaseJieshuBegin'},
|
||||
filter:function(event,player){
|
||||
return player.hasMark('jilun_mark');
|
||||
},
|
||||
forced:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
if(!player.getStorage('twjichou').length||!player.getStorage('twjichou').filter(function(name){
|
||||
return !player.getStorage('jilun').contains(name)&&player.hasUseTarget({name:name});
|
||||
}).length){
|
||||
if(player.hasMark('jilun_mark')) player.removeMark('jilun_mark',player.countMark('jilun_mark'));
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
var list=[];
|
||||
for(var name of player.getStorage('twjichou')){
|
||||
if(!player.getStorage('jilun').contains(name)){
|
||||
list.push(['锦囊','',name]);
|
||||
}
|
||||
}
|
||||
player.chooseButton(['###机论:请选择你要执行的选项###<div class="text center"><li>失去1枚“机论”标记,视为使用一张〖急筹〗已记录但〖机论〗未记录的普通锦囊牌<br><li>失去所有“机论”标记</div>',[list,'vcard']]).set('filterButton',function(button){
|
||||
return _status.event.player.hasUseTarget({name:button.link[2]});
|
||||
}).set('ai',function(button){
|
||||
return _status.event.getParent().player.getUseValue({name:button.link[2]},null,true);
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
player.removeMark('jilun_mark',1);
|
||||
var card={name:result.links[0][2],isCard:true};
|
||||
player.chooseUseTarget(card,true);
|
||||
player.markAuto('jilun',[card.name]);
|
||||
player.syncStorage('jilun');
|
||||
}
|
||||
else{
|
||||
player.removeMark('jilun_mark',player.countMark('jilun_mark'));
|
||||
event.finish();
|
||||
}
|
||||
'step 2'
|
||||
if(player.hasMark('jilun_mark')) event.goto(0);
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
//李遗
|
||||
jiaohua:{
|
||||
onremove:true,
|
||||
audio:'twjiaohua',
|
||||
enable:'phaseUse',
|
||||
usable:3,
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
return ui.create.dialog('###教化###选择一种牌的类型,令一名角色从牌堆获得此类型的一张牌');
|
||||
},
|
||||
chooseControl:function(event,player){
|
||||
var list=['basic','trick','equip'].filter(type=>!player.getStorage('jiaohua').contains(type));
|
||||
list.push('cancel2');
|
||||
return list;
|
||||
},
|
||||
check:function(event,player){
|
||||
var list=['trick','equip','basic'].filter(type=>!player.getStorage('jiaohua').contains(type));
|
||||
return list[0];
|
||||
},
|
||||
backup:function(result,player){
|
||||
return{
|
||||
type:result.control,
|
||||
audio:'twjiaohua',
|
||||
filterTarget:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
var type=lib.skill.jiaohua_backup.type;
|
||||
var card=get.cardPile2(card=>get.type2(card)==type);
|
||||
if(card) target.gain(card,'gain2');
|
||||
else game.log('但牌堆里已经没有','#y'+get.translation(type)+'牌','了!');
|
||||
'step 1'
|
||||
player.markAuto('jiaohua',[lib.skill.jiaohua_backup.type]);
|
||||
'step 2'
|
||||
if(!['basic','trick','equip'].some(type=>!player.getStorage('jiaohua').contains(type))){
|
||||
player.popup('教化');
|
||||
player.unmarkAuto('jiaohua',player.getStorage('jiaohua'));
|
||||
game.log(player,'清空了','#g【教化】','记录');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
result:{target:1},
|
||||
},
|
||||
}
|
||||
},
|
||||
prompt:function(result,player){
|
||||
return '令一名角色从牌堆中获得一张'+get.translation(result.control)+'牌';
|
||||
},
|
||||
},
|
||||
ai:{
|
||||
order:7,
|
||||
result:{player:1},
|
||||
},
|
||||
intro:{content:'已记录$牌'},
|
||||
},
|
||||
//来敏
|
||||
laishou:{
|
||||
audio:2,
|
||||
trigger:{player:['damageBegin4','phaseZhunbeiBegin']},
|
||||
filter:function(event,player){
|
||||
var num=9;
|
||||
if(event.name=='damage') return event.num>=player.getHp()&&player.maxHp<num;
|
||||
return player.maxHp>=num;
|
||||
},
|
||||
forced:true,
|
||||
content:function(){
|
||||
if(trigger.name=='damage'){
|
||||
player.gainMaxHp(trigger.num);
|
||||
trigger.cancel();
|
||||
}
|
||||
else player.die();
|
||||
},
|
||||
},
|
||||
luanqun:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.countCards('h');
|
||||
},
|
||||
usable:1,
|
||||
content:function(){
|
||||
'step 0'
|
||||
var targets=game.filterPlayer(current=>current.countCards('h')).sortBySeat();
|
||||
event.targets=targets;
|
||||
var next=player.chooseCardOL(targets,'乱群:请选择要展示的牌',true).set('ai',function(card){
|
||||
return -get.value(card);
|
||||
}).set('source',player);
|
||||
next.aiCard=function(target){
|
||||
var hs=target.getCards('h');
|
||||
return {bool:true,cards:[hs.randomGet()]};
|
||||
};
|
||||
next._args.remove('glow_result');
|
||||
'step 1'
|
||||
var cards=[];
|
||||
event.videoId=lib.status.videoId++;
|
||||
for(var i=0;i<targets.length;i++) cards.push(result[i].cards[0]);
|
||||
event.cards=cards;
|
||||
game.log(player,'展示了',targets,'的',cards);
|
||||
game.broadcastAll(function(targets,cards,id,player){
|
||||
var dialog=ui.create.dialog(get.translation(player)+'发动了【乱群】',cards);
|
||||
dialog.videoId=id;
|
||||
var getName=function(target){
|
||||
if(target._tempTranslate) return target._tempTranslate;
|
||||
var name=target.name;
|
||||
if(lib.translate[name+'_ab']) return lib.translate[name+'_ab'];
|
||||
return get.translation(name);
|
||||
}
|
||||
for(var i=0;i<targets.length;i++){
|
||||
dialog.buttons[i].querySelector('.info').innerHTML=getName(targets[i])+get.translation(cards[i].suit);
|
||||
}
|
||||
},targets,cards,event.videoId,player);
|
||||
game.delay(4);
|
||||
'step 2'
|
||||
game.broadcastAll('closeDialog',event.videoId);
|
||||
var card=cards[targets.indexOf(player)];
|
||||
var cardx=cards.filter(cardy=>cardy!=card&&get.color(cardy,targets[cards.indexOf(cardy)])==get.color(card,player));
|
||||
if(cardx.length){
|
||||
player.chooseButton(['乱群:是否获得其中的一张牌',cardx]).set('forceAuto',true).set('ai',function(button){
|
||||
var cards=_status.event.list[0];
|
||||
var targets=_status.event.list[1];
|
||||
var player=_status.event.player;
|
||||
if(get.attitude(player,targets[cards.indexOf(button.link)])) return 0;
|
||||
return get.value(button.link,player);
|
||||
}).set('list',[cards,targets]);
|
||||
}
|
||||
else event.goto(4);
|
||||
'step 3'
|
||||
if(result.bool){
|
||||
var card=result.links[0];
|
||||
player.gain(card,get.owner(card),'give');
|
||||
}
|
||||
'step 4'
|
||||
var card=cards[targets.indexOf(player)];
|
||||
targets=targets.filter(target=>get.color(cards[targets.indexOf(target)],target)!=get.color(card,player));
|
||||
if(targets.length){
|
||||
player.line(targets);
|
||||
targets.forEach(target=>{
|
||||
target.addTempSkill('luanqun_effect',{player:'phaseUseAfter'});
|
||||
target.markAuto('luanqun_effect',[player]);
|
||||
});
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:9,
|
||||
result:{
|
||||
player:function(player,target){
|
||||
if(player.hasSkill('laishou')) return 1;
|
||||
return player.hp>=2?1:0;
|
||||
},
|
||||
},
|
||||
},
|
||||
subSkill:{
|
||||
effect:{
|
||||
charlotte:true,
|
||||
onremove:true,
|
||||
intro:{content:'出牌阶段第一张【杀】只能指定$为目标,且此牌不可被响应'},
|
||||
mod:{
|
||||
playerEnabled:function(card,player,target){
|
||||
if(!player.isPhaseUsing()) return;
|
||||
if(card.name=='sha'&&player.getStorage('luanqun_effect').contains(target)) return false;
|
||||
},
|
||||
},
|
||||
trigger:{player:'useCard1'},
|
||||
filter:function(event,player){
|
||||
return player.isPhaseUsing()&&event.card.name=='sha';
|
||||
},
|
||||
forced:true,
|
||||
content:function(){
|
||||
trigger.directHit.addArray(player.getStorage('luanqun_effect'));
|
||||
player.removeSkill('luanqun_effect');
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
//☆周不疑
|
||||
mbhuiyao:{
|
||||
audio:2,
|
||||
|
@ -497,6 +870,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
lib.translate['yichong_'+player.playerid+'_bg']='雀';
|
||||
}
|
||||
},
|
||||
getLimit:1,
|
||||
audio:2,
|
||||
trigger:{player:'phaseZhunbeiBegin'},
|
||||
direct:true,
|
||||
|
@ -541,7 +915,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.markSkill('yichong');
|
||||
game.broadcastAll(function(player,suit){
|
||||
if(player.marks.yichong) player.marks.yichong.firstChild.innerHTML=get.translation(suit);
|
||||
},player,suit)
|
||||
},player,suit);
|
||||
if(target.countCards('he',{suit:suit})) player.gain(target.getCards('he',{suit:suit}),target,'giveAuto');
|
||||
game.countPlayer(function(current){
|
||||
current.removeSkill('yichong_'+player.playerid);
|
||||
|
@ -560,7 +934,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.storage.yichong) return false;
|
||||
return game.hasPlayer(function(current){
|
||||
if(!event.getg(current).length||!current.hasSkill('yichong_'+player.playerid)) return false;
|
||||
if(current.countMark('yichong_'+player.playerid)>=5) return false;
|
||||
if(current.countMark('yichong_'+player.playerid)>=lib.skill.yichong.getLimit) return false;
|
||||
return event.getg(current).some(card=>get.suit(card,current)==player.storage.yichong&&lib.filter.canBeGained(card,current,player));
|
||||
});
|
||||
},
|
||||
|
@ -569,14 +943,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
var target=game.findPlayer(function(current){
|
||||
if(!trigger.getg(current).length||!current.hasSkill('yichong_'+player.playerid)) return false;
|
||||
if(current.countMark('yichong_'+player.playerid)>=5) return false;
|
||||
if(current.countMark('yichong_'+player.playerid)>=lib.skill.yichong.getLimit) return false;
|
||||
return trigger.getg(current).some(card=>get.suit(card,current)==player.storage.yichong&&lib.filter.canBeGained(card,current,player));
|
||||
});
|
||||
event.target=target;
|
||||
var cards=trigger.getg(target).filter(card=>get.suit(card,target)==player.storage.yichong&&lib.filter.canBeGained(card,target,player));
|
||||
if(cards.length<=5-target.countMark('yichong_'+player.playerid)) event._result={bool:true,links:cards};
|
||||
if(cards.length<=lib.skill.yichong.getLimit-target.countMark('yichong_'+player.playerid)) event._result={bool:true,links:cards};
|
||||
else{
|
||||
var num=(5-target.countMark('yichong_'+player.playerid));
|
||||
var num=(lib.skill.yichong.getLimit-target.countMark('yichong_'+player.playerid));
|
||||
player.chooseButton(['易宠:获得其中的'+get.cnNumber(num)+'张牌',cards],num,true).set('ai',function(button){
|
||||
return get.value(button.link);
|
||||
});
|
||||
|
@ -613,7 +987,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var target=game.findPlayer(current=>current.hasSkill('yichong_'+player.playerid));
|
||||
event.target=target;
|
||||
if(trigger.name=='damage'){
|
||||
player.chooseBool(get.prompt('wufei',target),'对'+get.translation(target)+'造成1点伤害').set('choice',get.damageEffect(target,player,player)>0);
|
||||
player.chooseBool(get.prompt('wufei',target),'令'+get.translation(target)+'受到1点无来源伤害').set('choice',get.damageEffect(target,player,player)>0);
|
||||
}
|
||||
else{
|
||||
player.logSkill('wufei',target);
|
||||
|
@ -625,7 +999,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 1'
|
||||
if(result.bool){
|
||||
player.logSkill('wufei',target);
|
||||
target.damage();
|
||||
target.damage('nosource');
|
||||
}
|
||||
},
|
||||
subSkill:{
|
||||
|
@ -4594,7 +4968,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
viewAsFilter:function(player){
|
||||
return player.hasCard({type:'equip'},'ehs');
|
||||
},
|
||||
check:(card)=>5-get.value(card),
|
||||
check:function(card){
|
||||
if(_status.event.type=='dying') return 1/(get.value(card)||0.5);
|
||||
return 5-get.value(card);
|
||||
},
|
||||
locked:false,
|
||||
mod:{
|
||||
maxHandcard:function(player,num){
|
||||
|
@ -12164,7 +12541,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player:"linkBefore",
|
||||
},
|
||||
forced:true,
|
||||
priority:20,
|
||||
//priority:20,
|
||||
filter:function(event,player){
|
||||
return !player.isLinked();
|
||||
},
|
||||
|
@ -13178,7 +13555,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
cancel:{
|
||||
trigger:{player:'phaseUseEnd'},
|
||||
priority:50,
|
||||
firstDo:true,
|
||||
silent:true,
|
||||
charlotte:true,
|
||||
content:function(){
|
||||
|
@ -14851,9 +15228,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xin_guozhao:'手杀郭照',
|
||||
xin_guozhao_prefix:'手杀',
|
||||
yichong:'易宠',
|
||||
yichong_info:'①准备阶段,你可以选择一名其他角色并选择一个花色,然后你获得其所有此花色的牌,移除场上的所有“雀”标记,令其获得“雀”标记直到你的下个回合开始。②拥有“雀”标记的角色获得你最后一次发动〖易宠①〗选择的花色的牌后,你获得这些牌(你至多通过每个“雀”得到五张牌)。',
|
||||
yichong_info:'①准备阶段,你可以选择一名其他角色并选择一个花色,然后你获得其所有此花色的牌,移除场上的所有“雀”标记,令其获得“雀”标记直到你的下个回合开始。②拥有“雀”标记的角色获得你最后一次发动〖易宠①〗选择的花色的牌后,你获得这些牌(你至多通过每个“雀”得到一张牌)。',
|
||||
wufei:'诬诽',
|
||||
wufei_info:'若场上存在拥有“雀”标记的角色A,则:①当你使用【杀】或伤害类锦囊牌指定第一个目标后,你令A成为此牌伤害来源。②当你受到伤害后,若A的体力值大于1且A的体力值大于你,则你可以对A造成1点伤害。',
|
||||
wufei_info:'若场上存在拥有“雀”标记的角色A,则:①当你使用【杀】或伤害类锦囊牌指定第一个目标后,你令A成为此牌伤害来源。②当你受到伤害后,若A的体力值大于1且A的体力值大于你,则你可以令A受到1点无来源伤害。',
|
||||
yj_zhoubuyi:'☆周不疑',
|
||||
yj_zhoubuyi_prefix:'☆',
|
||||
mbhuiyao:'慧夭',
|
||||
|
@ -14886,6 +15263,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
re_chenqun_prefix:'手杀',
|
||||
old_yuanshu:'手杀袁术',
|
||||
old_yuanshu_prefix:'手杀',
|
||||
baoxin:'鲍信',
|
||||
mutao:'募讨',
|
||||
mutao_info:'出牌阶段限一次。你可以选择一名角色,令其将手牌中所有的【杀】置于武将牌上,然后将这些牌依次随机交给其下家开始的每一名角色。然后其对最后一名以此法获得【杀】的角色A造成X点伤害(X为A手牌中【杀】的数量且至多为3)。',
|
||||
yimou:'毅谋',
|
||||
yimou_info:'当一名角色受到伤害后,若其存活且你至其的距离不大于1,你可以选择一项:1.令其从牌堆中获得一张【杀】;2.令其将一张手牌交给另一名角色并摸两张牌。',
|
||||
jiangji:'蒋济',
|
||||
jilun:'机论',
|
||||
jilun_info:'①当你受到伤害后,若你拥有技能〖急筹〗,则你可以一项:1.摸X张牌(X为〖急筹①〗记录数,且X且至少为1,至多为5)。2.获得1枚“机论”标记。②一名角色的结束阶段,若你拥有“机论”,则重复选择执行以下项直到你没有“机论”标记:1.失去1枚“机论”标记,视为使用一张〖急筹①〗记录过且未被〖机论②〗记录过的普通锦囊牌并记录此牌牌名。2.失去所有“机论”标记。',
|
||||
liwei:'李遗',
|
||||
jiaohua:'教化',
|
||||
jiaohua_backup:'教化',
|
||||
jiaohua_info:'出牌阶段限三次,你可以选择一个未被〖教化〗记录过的牌的类型,令一名角色从牌堆中获得一张此类型的牌,然后记录此类型,若基本、锦囊、装备均已被你发动〖教化〗记录,则你清空〖教化〗记录。',
|
||||
laimin:'来敏',
|
||||
laishou:'来寿',
|
||||
laishou_info:'锁定技。①当你受到伤害值大于等于你的体力值的伤害时,若你的体力上限小于9,你防止此伤害并增加等量体力上限。②准备阶段,若你的体力上限不小于9,你死亡。',
|
||||
luanqun:'乱群',
|
||||
luanqun_info:'出牌阶段限一次,若你有手牌,则你可以令所有有手牌的角色同时展示一张手牌,然后你可以获得其中一张与你展示的牌颜色相同的展示牌,所有本次展示牌颜色与你展示的牌颜色不同的角色的下个出牌阶段使用的第一张【杀】只能对你使用,且此【杀】不可被响应。',
|
||||
xin_wuban:'吴班',
|
||||
xinjintao:'进讨',
|
||||
xinjintao_info:'锁定技,你使用【杀】无距离限制且次数上限+1。你于出牌阶段内使用的第一张【杀】不可被响应,第二张【杀】伤害+1。',
|
||||
|
||||
mobile_standard:'手杀异构·标准包',
|
||||
mobile_shenhua_feng:'手杀异构·其疾如风',
|
||||
|
|
|
@ -944,6 +944,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
trigger.cancel();
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(card.name==='sha'&&!game.hasNature(card)&&target.hasEmptySlot(2)) return 'zeroplayertarget';
|
||||
if(get.subtype(card)=='equip2'&&target.isEmpty(2)) return [0.6,-0.8];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//战役篇蒋钦
|
||||
|
@ -983,9 +991,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
preHidden:true,
|
||||
filter:function(event,player){
|
||||
if(get.type(event.card)!='equip') return false;
|
||||
var gz=get.mode()=='guozhan';
|
||||
if(gz&&event.player.isFriendOf(player)) return false;
|
||||
return player.countMark('pkwuku')<(gz?2:3);
|
||||
return player.countMark('pkwuku')<3;
|
||||
},
|
||||
content:function(){
|
||||
player.addMark('pkwuku',1);
|
||||
|
@ -1978,7 +1984,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
subSkill:{
|
||||
skip:{
|
||||
trigger:{player:'phaseBefore'},
|
||||
trigger:{player:'phaseBeforeStart'},
|
||||
forced:true,
|
||||
priority:Infinity,
|
||||
popup:false,
|
||||
|
|
|
@ -960,6 +960,8 @@ window.noname_character_rank={
|
|||
'mengyou',
|
||||
're_wenpin',
|
||||
'yue_zhoufei',
|
||||
'ns_mengyou',
|
||||
'zhangyan',
|
||||
],
|
||||
b:[
|
||||
'diy_feishi',
|
||||
|
@ -1969,6 +1971,7 @@ window.noname_character_rank={
|
|||
'clan_zhonghui',
|
||||
'zhoubuyi',
|
||||
'dc_wangjun',
|
||||
'ns_mengyou',
|
||||
'key_kano',
|
||||
'key_haruko',
|
||||
'key_akiko',
|
||||
|
|
|
@ -880,15 +880,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
logTarget:'player',
|
||||
check:function(event,player){
|
||||
if(get.attitude(player,event.player)<5) return false;
|
||||
if(player.maxHp-player.hp>=2) return false;
|
||||
if(player.hp==1) return false;
|
||||
if(player.hp==2&&player.countCards('h')<2) return false;
|
||||
if(event.player.countCards('h')>=event.player.hp) return false;
|
||||
return true;
|
||||
if(get.attitude(_status.event.player,event.player)<1) return false;
|
||||
return player.hp>1||player.hasCard(card=>(get.name(card)==='tao'||get.name(card)==='jiu')&&lib.filter.cardEnabled(card,player),'hs');
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
if(get.mode()!=='identity'||player.identity!=='nei') player.addExpose(0.2);
|
||||
player.draw(2);
|
||||
'step 1'
|
||||
var cards=player.getCards('he');
|
||||
|
@ -906,7 +903,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger.player.markAuto('rexiantu_check',[player]);
|
||||
},
|
||||
ai:{
|
||||
threaten:1.1,
|
||||
threaten:function(player,target){
|
||||
return 1+game.countPlayer((current)=>{
|
||||
if(current!=target&&get.attitude(target,current)>0) return 0.5;
|
||||
return 0;
|
||||
});
|
||||
},
|
||||
expose:0.3
|
||||
},
|
||||
subSkill:{
|
||||
|
@ -1921,14 +1923,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
var hs=player.getCards('h');
|
||||
const hs=player.getCards('h');
|
||||
if(!hs.length) return false;
|
||||
if((player.getStat('skill').reqice||0)>=player.countMark('reqice_mark')+1) return false;
|
||||
for(var i=0; i<hs.length; i++){
|
||||
var mod2=game.checkMod(hs[i],player,'unchanged','cardEnabled2',player);
|
||||
if(mod2===false) return false;
|
||||
}
|
||||
return true;
|
||||
if(hs.some(card=>{
|
||||
const mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
|
||||
return (mod2===false)
|
||||
})) return false;
|
||||
return lib.inpile.some(name=>{
|
||||
if(get.type(name)!='trick') return false;
|
||||
const card=get.autoViewAs({name},hs);
|
||||
return event.filterCard(card,player,event);
|
||||
});
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
|
@ -1939,7 +1945,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return ui.create.dialog(get.translation('reqice'),[list,'vcard']);
|
||||
},
|
||||
filter:function(button,player){
|
||||
return lib.filter.filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||
const event=_status.event.getParent(),card=get.autoViewAs({
|
||||
name:button.link[2],
|
||||
},player.getCards('h'));
|
||||
return event.filterCard(card,player,event);
|
||||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
|
@ -1981,6 +1990,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return 13-num;
|
||||
}
|
||||
},
|
||||
nokeep:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(tag==='nokeep') return (!arg||arg.card&&get.name(arg.card)==='tao')&&player.isPhaseUsing()&&!player.getStat('skill').reqice&&player.hasCard((card)=>get.name(card)!='tao','h');
|
||||
},
|
||||
threaten:1.7,
|
||||
},
|
||||
subSkill:{
|
||||
|
@ -2725,6 +2738,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return -0.5;
|
||||
}
|
||||
},
|
||||
nokeep:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(tag==='nokeep') return (!arg||arg.card&&get.name(arg.card)==='tao')&&player.isPhaseUsing()&&player.countSkill('rezhanjue_draw')<3&&player.hasCard((card)=>get.name(card)!='tao'&&!card.hasGaintag('reqinwang'),'h');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -4858,8 +4875,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
check:function(event,player){
|
||||
return (player.countCards('h')+2+event.num)<=5||game.hasPlayer(function(target){
|
||||
return !game.hasPlayer(function(current){
|
||||
return current!=player&¤t!=target&¤t.countCards('h')<target.countCards('h');
|
||||
return player!==target&&!game.hasPlayer(function(current){
|
||||
return current!==player&¤t!==target&¤t.countCards('h')<target.countCards('h');
|
||||
})&&get.attitude(player,target)>0;
|
||||
});
|
||||
},
|
||||
|
@ -6258,22 +6275,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
selectCard:[1,Infinity],
|
||||
position:'hs',
|
||||
check:function(card){
|
||||
var player=_status.event.player;
|
||||
if(ui.selected.cards.length){
|
||||
var list=game.filterPlayer(function(current){
|
||||
return current!=player&&player.canUse('sha',current,false)&&get.effect(current,{name:'sha'},player,player)>0;
|
||||
}).sort(function(a,b){
|
||||
return get.effect(b,{name:'sha'},player,player)-get.effect(a,{name:'sha'},player,player);
|
||||
let player = _status.event.player;
|
||||
if (ui.selected.cards.length) {
|
||||
let list = game.filterPlayer(function (current) {
|
||||
return current !== player && player.canUse('sha', current, false) && get.effect(current, {name: 'sha'}, player, player) > 0;
|
||||
}).sort(function (a, b) {
|
||||
return get.effect(b, {name: 'sha'}, player, player) - get.effect(a, {name: 'sha'}, player, player);
|
||||
});
|
||||
if(!list.length) return 0;
|
||||
var target=list[0];
|
||||
if(target.mayHaveShan()&&!player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
card:card,
|
||||
},true)) return 0;
|
||||
return 6.5-get.value(card);
|
||||
if (!list.length) return 0;
|
||||
let target = list[0],
|
||||
cards = ui.selected.cards.concat([card]),
|
||||
color = [];
|
||||
for (let i of cards) {
|
||||
if (!color.includes(get.color(i, player))) color.add(get.color(i, player));
|
||||
}
|
||||
if (color.length !== 1) color[0] = 'none';
|
||||
if (player.hasSkillTag(
|
||||
'directHit_ai',
|
||||
true,
|
||||
{
|
||||
target: target,
|
||||
card: {name: 'sha', suit: 'none', color: color[0], cards: cards, isCard: true}
|
||||
},
|
||||
true
|
||||
)) return 6.5 - get.value(card, player);
|
||||
if (Math.random() * target.countCards('hs') < 1 || player.needsToDiscard(-ui.selected.cards.length)) return 6 - get.value(card, player);
|
||||
return 0;
|
||||
}
|
||||
return 6.3-get.value(card);
|
||||
return 6.3 - get.value(card);
|
||||
},
|
||||
onuse:function(result,player){
|
||||
player.addTempSkill('changbiao_draw');
|
||||
|
@ -6305,6 +6334,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return card.name!='sha'&&get.value(card,player)<6.3;
|
||||
},'hs')?1:0)>1?-1:1);
|
||||
},
|
||||
nokeep:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(tag==='nokeep'){
|
||||
let num=0;
|
||||
if(arg&&(!arg.card||get.name(arg.card)!=='tao')) return false;
|
||||
player.getHistory('sourceDamage',function(evxt){
|
||||
let evt=evxt.getParent();
|
||||
if(evt&&evt.name=='sha'&&evt.skill=='changbiao') num+=evt.cards.length;
|
||||
});
|
||||
return player.needsToDiscard(num)>0;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
//国钟会
|
||||
|
@ -7492,9 +7533,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
"step 0"
|
||||
target.chooseToDiscard(cards.length,'弃置'+get.cnNumber(cards.length)+'张牌并失去1点体力,或点取消将武将牌翻面并摸'+get.cnNumber(cards.length)+'张牌','he').set('ai',function(card){
|
||||
var player=_status.event.player;
|
||||
if(player.isTurnedOver()) return -1;
|
||||
return (player.hp*player.hp)-get.value(card);
|
||||
if(cards.length>3||target.hasSkillTag('noturn')||target.isTurnedOver()||(get.name(card)=='tao'||get.name(card)=='jiu')&&lib.filter.cardSavable(card,target,target)) return -1;
|
||||
if(target.hp<=1){
|
||||
if(cards.length<target.getEnemies().length&&target.hasCard((cardx)=>{
|
||||
return (get.name(cardx)=='tao'||get.name(cardx)=='jiu')&&lib.filter.cardSavable(cardx,target,target);
|
||||
},'hs')) return 7-get.value(card);
|
||||
return -1;
|
||||
}
|
||||
return 24-5*cards.length-2*Math.min(4,target.hp)-get.value(card);
|
||||
});
|
||||
"step 1"
|
||||
if(!result.bool){
|
||||
|
@ -7505,7 +7551,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
ai:{
|
||||
order:2,
|
||||
expose:0.3,
|
||||
threaten:1.8,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
|
@ -10847,34 +10892,40 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
useShan:true,
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(get.tag(card,'respondShan')&&!player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
card:card,
|
||||
},true)){
|
||||
var hastarget=game.hasPlayer(function(current){
|
||||
return get.attitude(target,current)<0;
|
||||
});
|
||||
var be=target.countCards('e',{color:'black'});
|
||||
if(target.countCards('h','shan')&&be){
|
||||
if(!target.hasSkill('xinguidao')) return 0;
|
||||
return [0,hastarget?target.countCards('he')/2:0];
|
||||
}
|
||||
if(target.countCards('h','shan')&&target.countCards('h')>2){
|
||||
if(!target.hasSkill('xinguidao')) return 0;
|
||||
return [0,hastarget?target.countCards('h')/4:0];
|
||||
}
|
||||
if(target.countCards('h')>3||(be&&target.countCards('h')>=2)){
|
||||
return [0,0];
|
||||
}
|
||||
if(target.countCards('h')==0){
|
||||
return [1.5,0];
|
||||
}
|
||||
if(target.countCards('h')==1&&!be){
|
||||
return [1.2,0];
|
||||
}
|
||||
if(!target.hasSkill('xinguidao')) return [1,0.05];
|
||||
return [1,Math.min(0.5,(target.countCards('h')+be)/4)];
|
||||
let name='sha';
|
||||
if(typeof card=='object'){
|
||||
if(card.viewAs) name=card.viewAs;
|
||||
else name=get.name(card);
|
||||
}
|
||||
if(name=='shandian'||get.tag(card,'respondShan')&&!player.hasSkillTag('directHit_ai',true,{
|
||||
target: target,
|
||||
card: card
|
||||
},true)){
|
||||
let club=0,spade=0;
|
||||
if(game.hasPlayer(function(current){
|
||||
return get.attitude(target,current)<0&&get.damageEffect(current,target,target,'thunder')>0;
|
||||
})){
|
||||
club=2;
|
||||
spade=4;
|
||||
}
|
||||
if(!target.isHealthy()) club+=2;
|
||||
if(!club&&!spade) return 1;
|
||||
if(!target.mayHaveShan(player)) return 1-0.1*Math.min(5,target.countCards('hs'));
|
||||
if(!target.hasSkillTag('rejudge')) return [1,(club+spade)/4];
|
||||
let pos=(player==target||player.hasSkillTag('viewHandcard',null,target,true))?'hes':'e',better=club>spade?'club':'spade',max=0;
|
||||
target.hasCard(function(cardx){
|
||||
if(get.suit(cardx)==better){
|
||||
max=2;
|
||||
return true;
|
||||
}
|
||||
if(spade&&get.color(cardx)=='black') max=1;
|
||||
},pos);
|
||||
if(max==2) return [1,Math.max(club,spade)];
|
||||
if(max==1) return [1,Math.min(club,spade)];
|
||||
if(pos=='e') return [1,Math.min(Math.max(1,target.countCards('hs'))*(club+spade)/4,Math.max(club,spade))];
|
||||
return [1,(club+spade)/4];
|
||||
}
|
||||
if(name=='lebu'||name=='bingliang') return [target.hasSkillTag('rejudge')?0.4:1,2,target.hasSkillTag('rejudge')?0.4:1,0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10910,6 +10961,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
xinguidao:{
|
||||
audio:2,
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(num>0&&get.itemtype(card)=='card'&&get.color(card)=='black'&&get.type(card)=='equip') num*1.35;
|
||||
},
|
||||
aiValue:function(player,card,num){
|
||||
if(num>0&&get.itemtype(card)=='card'&&get.color(card)=='black') return num*1.15;
|
||||
},
|
||||
aiUseful:function(player,card,num){
|
||||
if(num>0&&get.itemtype(card)=='card'&&get.color(card)=='black') return num*1.35;
|
||||
}
|
||||
},
|
||||
locked:false,
|
||||
trigger:{global:'judge'},
|
||||
filter:function(event,player){
|
||||
return player.countCards('hes',{color:'black'})>0;
|
||||
|
@ -12239,6 +12302,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
rezhiheng:{
|
||||
audio:2,
|
||||
audioname:['shen_caopi'],
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(num<=0||get.itemtype(card)!=='card'||get.type(card)!=='equip') return num;
|
||||
let eq=player.getEquip(get.subtype(card));
|
||||
if(eq&&get.equipValue(card)-get.equipValue(eq)<Math.max(1.2,6-player.hp)) return 0;
|
||||
}
|
||||
},
|
||||
locked:false,
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
position:'he',
|
||||
|
@ -12290,10 +12361,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
delay:{}
|
||||
},
|
||||
ai:{
|
||||
order:1,
|
||||
order:function(item,player){
|
||||
if(player.hasCard((i)=>get.value(i)>Math.max(6,9-player.hp),'he')) return 1;
|
||||
return 10;
|
||||
},
|
||||
result:{
|
||||
player:1
|
||||
},
|
||||
nokeep:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(tag==='nokeep') return (!arg||arg&&arg.card&&get.name(arg.card)==='tao')&&player.isPhaseUsing()&&!player.getStat().skill.rezhiheng&&player.hasCard((card)=>get.name(card)!=='tao','h');
|
||||
},
|
||||
threaten:1.55
|
||||
},
|
||||
},
|
||||
|
|
259
character/sb.js
259
character/sb.js
|
@ -38,6 +38,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sb_liubiao:['male','qun',3,['sbzishou','sbzongshi']],
|
||||
sb_zhurong:['female','shu',4,['sblieren','sbjuxiang']],
|
||||
sb_menghuo:['male','shu',4,['sbhuoshou','sbzaiqi']],
|
||||
sb_yl_luzhi:['male','qun',3,['nzry_mingren','sbzhenliang']],
|
||||
sb_xiaoqiao:['female','wu',3,['sbtianxiang','xinhongyan']],
|
||||
},
|
||||
characterSort:{
|
||||
sb:{
|
||||
|
@ -49,6 +51,185 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
skill:{
|
||||
//卢植
|
||||
sbzhenliang:{
|
||||
mark:true,
|
||||
locked:false,
|
||||
zhuanhuanji:true,
|
||||
marktext:'☯',
|
||||
intro:{
|
||||
content:function(storage,player){
|
||||
if(storage) return '你的回合外,一名角色使用或打出牌结算完成后,若此牌与“任”类别相同,则你可以令一名角色摸一张牌。';
|
||||
return '出牌阶段限一次,你可以弃置一张与“任”颜色相同的牌并对攻击范围内的一名角色造成1点伤害。';
|
||||
},
|
||||
},
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
if(player.storage.sbzhenliang) return false;
|
||||
var storage=player.getExpansions('nzry_mingren');
|
||||
if(!storage.length) return false;
|
||||
var color=get.color(storage[0]);
|
||||
return game.hasPlayer(function(current){
|
||||
return player.inRange(current)&&player.countCards('he',function(card){
|
||||
return get.color(card)==color;
|
||||
})>=Math.max(1,Math.abs(player.getHp()-current.getHp()));
|
||||
});
|
||||
},
|
||||
filterCard:function(card,player){
|
||||
return get.color(card)==get.color(player.getExpansions('nzry_mingren')[0]);
|
||||
},
|
||||
selectCard:[1,Infinity],
|
||||
complexSelect:true,
|
||||
complexCard:true,
|
||||
position:'he',
|
||||
filterTarget:function(card,player,target){
|
||||
return player.inRange(target)&&ui.selected.cards.length==Math.max(1,Math.abs(player.getHp()-target.getHp()));
|
||||
},
|
||||
check:function(card){
|
||||
return 6.5-get.value(card);
|
||||
},
|
||||
prompt:'弃置与攻击范围内的一名角色体力值之差(至少为1)张与“任”颜色相同的牌,对其造成1点伤害。',
|
||||
content:function(){
|
||||
player.changeZhuanhuanji('sbzhenliang');
|
||||
target.damage('nocard');
|
||||
},
|
||||
ai:{
|
||||
order:5,
|
||||
result:{
|
||||
player:function(player,target){
|
||||
return get.damageEffect(target,player,player);
|
||||
},
|
||||
},
|
||||
},
|
||||
group:'sbzhenliang_draw',
|
||||
subSkill:{
|
||||
draw:{
|
||||
trigger:{global:['useCardAfter','respondAfter']},
|
||||
filter:function(event,player){
|
||||
if(_status.currentPhase==player||!player.storage.sbzhenliang) return false;
|
||||
var card=player.getExpansions('nzry_mingren')[0];
|
||||
return card&&get.type2(event.card)==get.type2(card);
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseTarget(get.prompt('sbzhenliang'),'令一名角色摸一张牌').set('ai',function(target){
|
||||
if(target.hasSkillTag('nogain')) return 0.1;
|
||||
var att=get.attitude(player,target);
|
||||
return att*(Math.max(5-target.countCards('h'),2)+3);
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.changeZhuanhuanji('sbzhenliang');
|
||||
player.logSkill('sbzhenliang',target);
|
||||
target.draw();
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
ai:{combo:'nzry_mingren'},
|
||||
},
|
||||
//小乔
|
||||
sbtianxiang:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.countCards('he',card=>lib.skill.sbtianxiang.filterCard(card,player))&&game.hasPlayer(target=>lib.skill.sbtianxiang.filterTarget(null,player,target));
|
||||
},
|
||||
filterCard:function(card,player){
|
||||
return get.color(card,player)=='red';
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return target!=player&&!target.getSkills().some(skill=>skill.indexOf('sbtianxiang_')==0);
|
||||
},
|
||||
discard:false,
|
||||
lose:false,
|
||||
delay:0,
|
||||
usable:3,
|
||||
prompt:'将一张红色牌交给一名角色并令其获得此花色的“天香”标记',
|
||||
content:function(){
|
||||
player.give(cards,target);
|
||||
var suit=get.suit(cards[0],player);
|
||||
target.addSkill('sbtianxiang_'+suit);
|
||||
},
|
||||
ai:{
|
||||
order:5,
|
||||
result:{target:-1},
|
||||
},
|
||||
group:['sbtianxiang_draw','sbtianxiang_effect'],
|
||||
subSkill:{
|
||||
heart:{
|
||||
charlotte:true,
|
||||
mark:true,
|
||||
marktext:'♥︎',
|
||||
intro:{content:'伤害转移术'},
|
||||
},
|
||||
diamond:{
|
||||
charlotte:true,
|
||||
mark:true,
|
||||
marktext:'♦︎',
|
||||
intro:{content:'掳掠大法'},
|
||||
},
|
||||
draw:{
|
||||
audio:'sbtianxiang',
|
||||
trigger:{player:'phaseZhunbeiBegin'},
|
||||
filter:function(event,player){
|
||||
return game.hasPlayer(target=>target.getSkills().some(skill=>skill.indexOf('sbtianxiang_')==0));
|
||||
},
|
||||
forced:true,
|
||||
locked:false,
|
||||
content:function(){
|
||||
var num=0;
|
||||
game.countPlayer(target=>{
|
||||
var skills=target.getSkills().filter(skill=>skill.indexOf('sbtianxiang_')==0);
|
||||
target.removeSkill(skills);
|
||||
num+=skills.length;
|
||||
});
|
||||
player.draw(num);
|
||||
},
|
||||
},
|
||||
effect:{
|
||||
trigger:{player:'damageBegin3'},
|
||||
filter:function(event,player){
|
||||
return game.hasPlayer(target=>target.getSkills().some(skill=>skill.indexOf('sbtianxiang_')==0));
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseTarget(get.prompt('sbtianxiang'),'移去一名角色的“天香”标记并执行相应效果',function(card,player,target){
|
||||
return target.getSkills().some(skill=>skill.indexOf('sbtianxiang_')==0);
|
||||
}).set('ai',target=>{
|
||||
var player=_status.event.player;
|
||||
return -get.attitude(player,target)*target.getSkills().filter(skill=>skill.indexOf('sbtianxiang_')==0).length;
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
event.target=target;
|
||||
player.logSkill('sbtianxiang',target);
|
||||
var skills=target.getSkills().filter(skill=>skill.indexOf('sbtianxiang_')==0);
|
||||
target.removeSkill(skills);
|
||||
if(skills.contains('sbtianxiang_heart')){
|
||||
target.damage(trigger.source?trigger.source:'nosource');
|
||||
trigger.cancel();
|
||||
}
|
||||
if(skills.contains('sbtianxiang_diamond')){
|
||||
var cards=target.getCards('he');
|
||||
if(!cards.length) event.finish();
|
||||
else if(cards.length<=2) event._result={bool:true,cards:cards};
|
||||
else target.chooseCard('he',2,'天香:交给'+get.translation(player)+'两张牌',true);
|
||||
}
|
||||
else event.finish();
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
if(result.bool) player.gain(result.cards,target,'giveAuto');
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
//张郃
|
||||
sbqiaobian:{
|
||||
audio:2,
|
||||
|
@ -240,7 +421,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
player.chooseTarget(get.prompt('sbzaiqi'),'选择任意名角色并消耗等量蓄力值,令这些角色选择一项:1.令你摸一张牌;2.弃置一张牌,然后你回复1点体力',[1,player.countMark('charge')]).set('ai',function(target){
|
||||
var player=_status.event.player;
|
||||
return get.attitude(player,target)+player.getDamagedHp()*3.5;
|
||||
var att=get.attitude(player,target);
|
||||
return 3-get.sgn(att)+Math.abs(att/1000);
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
|
@ -280,14 +462,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
global:'phaseBefore',
|
||||
},
|
||||
usable:1,
|
||||
forced:true,
|
||||
locked:false,
|
||||
filter:function(event,player){
|
||||
if(event.name=='damage') return true;
|
||||
return (event.name!='phase'||game.phaseNumber==0);
|
||||
},
|
||||
forced:true,
|
||||
locked:false,
|
||||
content:function(){
|
||||
player.addMark('charge',1);
|
||||
player.addMark('charge',trigger.name=='damage'?1:3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -333,7 +515,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var target=trigger.card.storage.sblieren[1];
|
||||
player.chooseTarget('烈刃:是否对除'+get.translation(target)+'外的一名其他角色造成1点伤害?',(card,player,target)=>{
|
||||
return target!=_status.event.targeted&&target!=player;
|
||||
}).set('targeted',target);
|
||||
}).set('targeted',target).set('ai',targetx=>get.damageEffect(targetx,_status.event.player,_status.event.player));
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
|
@ -518,7 +700,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return event.filterCard(get.autoViewAs({name:'juedou'},hs));
|
||||
},
|
||||
ai:{order:0.001},
|
||||
ai:{
|
||||
order:0.001,
|
||||
nokeep:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(tag==='nokeep'){
|
||||
if(arg&&(!arg.card||get.name(arg.card)!=='tao')) return false;
|
||||
let limit=player.hasMark('sbjiang')?(game.countPlayer(current=>{
|
||||
return current.group=='wu'&¤t!=player;
|
||||
})+1):1;
|
||||
return player.isPhaseUsing()&&(player.getStat('skill').sbjiang_qiben||0)<limit&&player.hasCard((card)=>get.name(card)!='tao','h');
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -3551,10 +3745,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(result.bool){
|
||||
var target=result.targets[0],card=result.cards[0];
|
||||
player.logSkill('sbkurou',target);
|
||||
if(get.mode()!=='identity'||player.identity!=='nei') player.addExpose(0.15);
|
||||
player.give(card,target);
|
||||
player.loseHp(['tao','jiu'].contains(get.name(card,target))?2:1);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
nokeep:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(tag==='nokeep') return (!arg||arg.card&&get.name(arg.card)==='tao')&&player.hp<=0&&player.isPhaseUsing();
|
||||
}
|
||||
},
|
||||
subSkill:{
|
||||
gain:{
|
||||
audio:'sbkurou',
|
||||
|
@ -3626,6 +3827,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
subSkill:{
|
||||
draw:{
|
||||
audio:'sbzhaxiang',
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(num>0&&_status.event&&_status.event.type=='phase'&&get.tag(card,'recover')) return num/5;
|
||||
}
|
||||
},
|
||||
trigger:{player:'phaseDrawBegin2'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
|
@ -3637,7 +3843,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'recover')&&target.hp>=target.maxHp-1&&target.maxHp>1) return [0,0];
|
||||
if(get.tag(card,'recover')&&target.hp>0&&target.needsToDiscard()<1) return [0,0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3648,6 +3854,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sbzhiheng:{
|
||||
audio:2,
|
||||
audioname:['shen_caopi'],
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(num<=0||get.itemtype(card)!=='card'||get.type(card)!=='equip') return num;
|
||||
let eq=player.getEquip(get.subtype(card));
|
||||
if(eq&&get.equipValue(card)-get.equipValue(eq)<Math.max(1.2,6-player.hp)) return 0;
|
||||
}
|
||||
},
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
position:'he',
|
||||
|
@ -3689,10 +3902,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(all) player.removeMark('sbtongye',1);
|
||||
},
|
||||
ai:{
|
||||
order:1,
|
||||
order:function(item,player){
|
||||
if(player.hasCard((i)=>get.value(i)>Math.max(6,9-player.hp),'he')) return 1;
|
||||
return 10;
|
||||
},
|
||||
result:{
|
||||
player:1
|
||||
},
|
||||
nokeep:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(tag==='nokeep') return (!arg||arg&&arg.card&&get.name(arg.card)==='tao')&&player.isPhaseUsing()&&!player.getStat().skill.sbzhiheng&&player.hasCard((card)=>get.name(card)!=='tao','h');
|
||||
},
|
||||
threaten:1.56
|
||||
},
|
||||
},
|
||||
|
@ -3703,7 +3923,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
onremove:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseControl('变化','不变').set('prompt','统业:猜测场上装备数是否于你下回合准备阶段前发生变化').set('ai',()=>Number((game.countPlayer()<=4?Math.random():1)<0.4));
|
||||
player.chooseControl('变化','不变').set('prompt','统业:猜测场上装备数是否于你下回合准备阶段前发生变化').set('ai',()=>{
|
||||
let player = _status.event.player;
|
||||
if(game.countPlayer() > 3) return '变化';
|
||||
if(game.countPlayer(function (current){
|
||||
return current.hasCard({type: 'equip'}, 'e');
|
||||
}) < game.countPlayer()) return '变化';
|
||||
if(game.countPlayer() == 2 && game.countPlayer(function (current){
|
||||
if (current != player) return current.countCards('e', {type: 'equip'}) + current.countDisabledSlot();
|
||||
}) >= 5) return '不变';
|
||||
if(Math.random() < 0.3) return '变化';
|
||||
return '不变';
|
||||
});
|
||||
'step 1'
|
||||
if(result.control=='变化'){
|
||||
player.addSkill('sbtongye_change',1);
|
||||
|
@ -4882,10 +5113,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sbhuoshou:'祸首',
|
||||
sbhuoshou_info:'锁定技。①【南蛮入侵】对你无效。②当其他角色使用【南蛮入侵】指定第一个目标后,你代替其成为此牌的伤害来源。③出牌阶段开始时,你随机获得弃牌堆中的一张【南蛮入侵】。④出牌阶段,若你于此阶段使用过【南蛮入侵】,你不能使用【南蛮入侵】。',
|
||||
sbzaiqi:'再起',
|
||||
sbzaiqi_info:'蓄力技(1/7)。①弃牌阶段结束时,你可以消耗任意点蓄力值并选择等量名角色,然后令这些角色选择一项:1.令你摸一张牌;2.弃置一张牌,然后你回复1点体力。②每回合限一次。当你造成伤害后,你获得1点蓄力值。',
|
||||
sbzaiqi_info:'蓄力技(3/7)。①弃牌阶段结束时,你可以消耗任意点蓄力值并选择等量名角色,然后令这些角色选择一项:1.令你摸一张牌;2.弃置一张牌,然后你回复1点体力。②每回合限一次。当你造成伤害后,你获得1点蓄力值。',
|
||||
sb_zhanghe:'谋张郃',
|
||||
sbqiaobian:'巧变',
|
||||
sbqiaobian_info:'每回合限一次。①你可以失去1点体力并跳过判定阶段,将判定区的所有牌移动给一名其他角色(无法置入其判定区的牌改为弃置之)。②你可以跳过摸牌阶段,于下个准备阶段摸两张牌并回复1点体力。③你可以将手牌数弃置至六张(若手牌数少于六张则跳过之)并跳过出牌阶段和弃牌阶段,然后移动场上的一张牌。',
|
||||
sb_yl_luzhi:'谋卢植',
|
||||
sb_yl_luzhi_prefix:'谋',
|
||||
sbzhenliang:'贞良',
|
||||
sbzhenliang_info:'转换技。阴:出牌阶段限一次,你可以弃置X张与“任”颜色相同的牌并对攻击范围内的一名角色造成1点伤害(X为你与其体力值值差且X至少为1)。阳:你的回合外,一名角色使用或打出牌结算完成后,若此牌与“任”类别相同,则你可以令一名角色摸一张牌。',
|
||||
sb_xiaoqiao:'谋小乔',
|
||||
sb_xiaoqiao_prefix:'谋',
|
||||
sbtianxiang:'天香',
|
||||
sbtianxiang_info:'①出牌阶段限三次,你可以交给一名没有“天香”标记的其他角色一张红色牌,然后令其获得此牌花色的“天香”标记。②当你受到伤害时,你可以移去一名角色的“天香”标记,若此“天香”标记为:红桃,你防止此伤害,其受到伤害来源对其造成的1点伤害(若没有伤害来源则改为无来源伤害);方片,其交给你两张牌。③准备阶段,你移去场上所有的“天香”标记,然后摸等量的牌。',
|
||||
|
||||
sb_zhi:'谋攻篇·知',
|
||||
sb_shi:'谋攻篇·识',
|
||||
|
|
|
@ -2270,6 +2270,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
nzry_mingren:{
|
||||
audio:"nzry_mingren_1",
|
||||
audioname:['sb_yl_luzhi'],
|
||||
marktext:"任",
|
||||
intro:{
|
||||
content:'expansion',
|
||||
|
@ -2283,6 +2284,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
subSkill:{
|
||||
1:{
|
||||
audio:2,
|
||||
audioname:['sb_yl_luzhi'],
|
||||
trigger:{
|
||||
global:'phaseBefore',
|
||||
player:'enterGame',
|
||||
|
@ -2307,7 +2309,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
2:{
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:'phaseJieshuBegin',
|
||||
},
|
||||
|
@ -2317,7 +2318,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseCard('h','是否用一张手牌替换“任”('+get.translation(player.getExpansions('nzry_mingren')[0])+')?').set('ai',function(card){
|
||||
player.chooseCard('h',get.prompt('nzry_mingren'),'选择一张手牌替换“任”('+get.translation(player.getExpansions('nzry_mingren')[0])+')').set('ai',function(card){
|
||||
var player=_status.event.player;
|
||||
var color=get.color(card);
|
||||
if(color==get.color(player.getExpansions('nzry_mingren')[0])) return false;
|
||||
|
@ -3156,13 +3157,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
xinkuanggu:{
|
||||
trigger:{source:'damageSource'},
|
||||
filter:function(event,player){
|
||||
return get.distance(player,event.player)<=1&&event.num>0;
|
||||
},
|
||||
direct:true,
|
||||
audio:'kuanggu',
|
||||
audioname:['re_weiyan','ol_weiyan'],
|
||||
trigger:{source:'damageSource'},
|
||||
filter:function(event,player){
|
||||
return event.kuangguCheck&&event.num>0;
|
||||
},
|
||||
direct:true,
|
||||
preHidden:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -3177,7 +3178,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else{
|
||||
choice='draw_card';
|
||||
}
|
||||
var next=player.chooseDrawRecover(get.prompt(event.name)).set('logSkill',event.name).set('prompt2','摸一张牌或回复1点体力');
|
||||
var next=player.chooseDrawRecover('###'+get.prompt(event.name)+'###摸一张牌或回复1点体力').set('logSkill',event.name);
|
||||
next.set('choice',choice);
|
||||
next.set('ai',function(){
|
||||
return _status.event.getParent().choice;
|
||||
|
@ -3190,7 +3191,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
event.goto(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
group:'kuanggu_check',
|
||||
},
|
||||
xinliegong:{
|
||||
shaRelated:true,
|
||||
|
@ -3803,6 +3805,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
preHidden:true,
|
||||
audioname:['sp_lvmeng','re_sunben','re_sunce'],
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(get.color(card)==='red'&&get.name(card)==='sha') return get.order({name: 'sha'})+0.15;
|
||||
}
|
||||
},
|
||||
trigger:{
|
||||
player:'useCardToPlayered',
|
||||
target:'useCardToTargeted',
|
||||
|
@ -3811,6 +3818,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!(event.card.name=='juedou'||(event.card.name=='sha'&&get.color(event.card)=='red'))) return false;
|
||||
return player==event.target||event.getParent().triggeredTargets3.length==1;
|
||||
},
|
||||
locked:false,
|
||||
frequent:true,
|
||||
content:function(){
|
||||
player.draw();
|
||||
|
@ -4871,9 +4879,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
preHidden:true,
|
||||
check:function(event,player){
|
||||
if(player.countCards('h')<=1) return true;
|
||||
return game.hasPlayer(function(current){
|
||||
return current!=player&¤t.isMinHandcard()&&get.attitude(player,current)>0;
|
||||
return (player.countCards('h')+2+event.num)<=5||game.hasPlayer(function(target){
|
||||
return player!==target&&!game.hasPlayer(function(current){
|
||||
return current!==player&¤t!==target&¤t.countCards('h')<target.countCards('h');
|
||||
})&&get.attitude(player,target)>0;
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
|
@ -5030,6 +5039,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
re_sunyi:'gzyinghun_re_sunyi',
|
||||
tw_ol_sunjian:'yinghun_ol_sunjian',
|
||||
},
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(num>0&&_status.event&&_status.event.type=='phase'&&get.tag(card,'recover')){
|
||||
if(player.needsToDiscard()) return num/3;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
locked:false,
|
||||
trigger:{player:'phaseZhunbeiBegin'},
|
||||
direct:true,
|
||||
preHidden:true,
|
||||
|
@ -5081,6 +5099,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.num>0) event.target.chooseToDiscard(event.num,true,'he');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')&&get.itemtype(player)==='player'&&target.hp>(player.hasSkillTag('damageBonus',true,{
|
||||
target:target,
|
||||
card:card
|
||||
})?2:1)) return [1,1];
|
||||
}
|
||||
},
|
||||
threaten:function(player,target){
|
||||
return Math.max(0.5,target.getDamagedHp()/2);
|
||||
},
|
||||
maixie:true
|
||||
}
|
||||
},
|
||||
gzyinghun:{
|
||||
audio:'yinghun',
|
||||
|
@ -5089,6 +5121,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
re_sunyi:'gzyinghun_re_sunyi',
|
||||
tw_ol_sunjian:'yinghun_ol_sunjian',
|
||||
},
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(num>0&&_status.event&&_status.event.type=='phase'&&get.tag(card,'recover')){
|
||||
if(player.needsToDiscard()) return num/3;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
locked:false,
|
||||
trigger:{player:'phaseZhunbeiBegin'},
|
||||
filter:function(event,player){
|
||||
return player.getDamagedHp()>0;
|
||||
|
@ -5143,13 +5184,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
ai:{
|
||||
threaten:function(player,target){
|
||||
if(target.hp==target.maxHp) return 0.5;
|
||||
if(target.hp==1) return 2;
|
||||
if(target.hp==2) return 1.5;
|
||||
return 0.5;
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'damage')&&get.itemtype(player)==='player'&&target.hp>(player.hasSkillTag('damageBonus',true,{
|
||||
target:target,
|
||||
card:card
|
||||
})?2:1)) return [1,1];
|
||||
}
|
||||
},
|
||||
maixie:true,
|
||||
threaten:function(player,target){
|
||||
return Math.max(0.5,target.getDamagedHp()/2);
|
||||
},
|
||||
maixie:true
|
||||
}
|
||||
},
|
||||
yinghun_ol_sunjian:{audio:2},
|
||||
|
@ -6238,30 +6284,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
useShan:true,
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(get.tag(card,'respondShan')){
|
||||
var hastarget=game.hasPlayer(function(current){
|
||||
return get.attitude(target,current)<0;
|
||||
});
|
||||
var be=target.countCards('e',{color:'black'});
|
||||
if(target.countCards('h','shan')&&be){
|
||||
if(!target.hasSkill('guidao')) return 0;
|
||||
return [0,hastarget?target.countCards('he')/2:0];
|
||||
if(get.tag(card,'respondShan')&&!player.hasSkillTag('directHit_ai',true,{
|
||||
target: target,
|
||||
card: card
|
||||
},true)){
|
||||
let club=0,spade=0;
|
||||
if(game.hasPlayer(function(current){
|
||||
return get.attitude(target,current)<0&&get.damageEffect(current,target,target,'thunder')>0;
|
||||
})){
|
||||
club=2;
|
||||
spade=4;
|
||||
}
|
||||
if(target.countCards('h','shan')&&target.countCards('h')>2){
|
||||
if(!target.hasSkill('guidao')) return 0;
|
||||
return [0,hastarget?target.countCards('h')/4:0];
|
||||
}
|
||||
if(target.countCards('h')>3||(be&&target.countCards('h')>=2)){
|
||||
return [0,0];
|
||||
}
|
||||
if(target.countCards('h')==0){
|
||||
return [1.5,0];
|
||||
}
|
||||
if(target.countCards('h')==1&&!be){
|
||||
return [1.2,0];
|
||||
}
|
||||
if(!target.hasSkill('guidao')) return [1,0.05];
|
||||
return [1,Math.min(0.5,(target.countCards('h')+be)/4)];
|
||||
if(!target.isHealthy()) club+=2;
|
||||
if(!club&&!spade) return 1;
|
||||
if(!target.mayHaveShan(player)) return 1-0.1*Math.min(5,target.countCards('hs'));
|
||||
if(!target.hasSkillTag('rejudge')) return [1,(club+spade)/4];
|
||||
let pos=player.hasSkillTag('viewHandcard',null,target,true)?'hes':'e',better=club>spade?'club':'spade',max=0;
|
||||
target.hasCard(function(cardx){
|
||||
if(get.suit(cardx)===better){
|
||||
max=2;
|
||||
return true;
|
||||
}
|
||||
if(spade&&get.color(cardx)==='black') max=1;
|
||||
},pos);
|
||||
if(max===2) return [1,Math.max(club,spade)];
|
||||
if(max===1) return [1,Math.min(club,spade)];
|
||||
if(pos==='e') return [1,Math.min(Math.max(1,target.countCards('hs'))*(club+spade)/4,Math.max(club,spade))];
|
||||
return [1,(club+spade)/4];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6458,11 +6507,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{source:'damageSource'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return get.distance(player,event.player)<=1&&player.isDamaged();
|
||||
return event.kuangguCheck&&player.isDamaged();
|
||||
},
|
||||
content:function(){
|
||||
player.recover(trigger.num);
|
||||
}
|
||||
},
|
||||
group:'kuanggu_check',
|
||||
subSkill:{
|
||||
check:{
|
||||
charlotte:true,
|
||||
trigger:{source:'damage'},
|
||||
filter:function(event,player){
|
||||
return get.distance(player,event.player)<=1;
|
||||
},
|
||||
firstDo:true,
|
||||
silent:true,
|
||||
content:function(){
|
||||
trigger.kuangguCheck=true;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
tianxiang:{
|
||||
audio:2,
|
||||
|
@ -6859,6 +6923,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
xinhongyan:{
|
||||
audio:2,
|
||||
audioname:['sb_xiaoqiao'],
|
||||
mod:{
|
||||
suit:function(card,suit){
|
||||
if(suit=='spade') return 'heart';
|
||||
|
@ -7206,17 +7271,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
useShan:true,
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(get.tag(card,'respondShan')){
|
||||
var hastarget=game.hasPlayer(function(current){
|
||||
return get.attitude(target,current)<0;
|
||||
});
|
||||
if(target.countCards('h','shan')&&target.countCards('e',{suit:'spade'})){
|
||||
return [0,hastarget?target.countCards('he')/2:0];
|
||||
}
|
||||
if(target.countCards('h','shan')){
|
||||
return [1,hastarget?target.countCards('he')/2:0];
|
||||
}
|
||||
return [1,target.countCards('h')/4];
|
||||
if(get.tag(card,'respondShan')&&!player.hasSkillTag('directHit_ai',true,{
|
||||
target: target,
|
||||
card: card
|
||||
},true)&&game.hasPlayer(function(current){
|
||||
return get.attitude(target,current)<0&&get.damageEffect(current,target,target,'thunder')>0;
|
||||
})){
|
||||
if(!target.mayHaveShan(player)) return 1-0.1*Math.min(5,target.countCards('hs'));
|
||||
if(!target.hasSkillTag('rejudge')) return [1,1];
|
||||
let pos=player.hasSkillTag('viewHandcard',null,target,true)?'hes':'e';
|
||||
if(target.hasCard(function(cardx){
|
||||
return get.suit(cardx)==='spade';
|
||||
},pos)) return [1,4];
|
||||
if(pos==='e') return [1,Math.min(4,1+0.75*Math.max(1,target.countCards('hs')))];
|
||||
return [1,1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8106,7 +8174,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xinkuanggu:'狂骨',
|
||||
gzbuqu:'不屈',
|
||||
gzbuqu_info:'①当你扣减1点体力时,若你的体力值小于1,你可以将牌堆顶的一张牌置于你的武将牌上,称为“创”。②当你回复1点体力时,你移去一张“创”。③若你有“创”且点数均不相同,则你不结算濒死流程。',
|
||||
xinkuanggu_info:'当你对距离1以内的一名角色造成1点伤害后,你可以回复1点体力或摸一张牌。',
|
||||
xinkuanggu_info:'当你造成1点伤害后,若受伤角色受到此伤害时你与其的距离不大于1,则你可以回复1点体力或摸一张牌。',
|
||||
xinliegong_info:'①你使用【杀】可以选择你距离不大于此【杀】点数的角色为目标。②当你使用【杀】指定一个目标后,你可以根据下列条件执行相应的效果:1.其手牌数小于等于你的手牌数,此【杀】不可被响应,2.其体力值大于等于你的体力值,此【杀】伤害+1。',
|
||||
jiewei_info:'当你的武将牌翻面后,你可以摸一张牌。然后你可以使用一张锦囊牌或装备牌,并可以在此牌结算后弃置场上一张同类型的牌',
|
||||
releiji_info:'当你使用或打出一张【闪】时,你可令一名其他角色进行一次判定:若结果为梅花,其受到一点雷电伤害,然后你回复一点体力;若结果为黑桃,其受到两点雷电伤害。',
|
||||
|
@ -8115,7 +8183,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
jushou_info:'结束阶段,你可以摸3张牌,并将武将牌翻面。',
|
||||
moon_jushou_info:'结束阶段,你可以摸一张牌,并将武将牌翻面。',
|
||||
liegong_info:'当你使用【杀】时,若目标的手牌数大于等于你的体力值,或小于等于你的攻击范围,你可令此【杀】不能被响应。',
|
||||
kuanggu_info:'锁定技,当你造成伤害后,若受伤角色与你的距离不大于1,你回复X点体力(X为伤害值)。',
|
||||
kuanggu_info:'锁定技,当你造成伤害后,若受伤角色受到此伤害时你与其的距离不大于1,你回复X点体力(X为伤害值)。',
|
||||
tianxiang_info:'当你即将受到伤害时,你可以弃置一张♥手牌,将伤害转移给一名其他角色,然后该角色摸X张牌(X为其已损失的体力值)。',
|
||||
hongyan_info:'锁定技,你区域内的黑桃牌和黑桃判定牌均视为红桃。',
|
||||
buqu_info:'锁定技,当你处于濒死状态时,你亮出牌堆顶的一张牌并置于你的武将牌上,称之为“创”。若此牌的点数与你武将牌上已有的“创”点数均不同,则你回复至1体力。若点数相同,则将此牌置入弃牌堆。只要你的武将牌上有“创”,你的手牌上限便与“创”的数量相等。',
|
||||
|
|
470
character/sp.js
470
character/sp.js
|
@ -13,7 +13,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp_huben:['duanjiong','ol_mengda',"caohong","xiahouba","zhugeke","zumao","wenpin","litong","mazhong","heqi","quyi","luzhi","zangba","yuejin","dingfeng","wuyan","ol_zhuling","tianyu","huojun",'zhaoyǎn','dengzhong','ol_furong','macheng','ol_zhangyì','ol_zhujun','maxiumatie','luoxian','ol_huban','haopu','ol_qianzhao'],
|
||||
sp_liesi:['mizhu','weizi','ol_liuba','zhangshiping'],
|
||||
sp_default:["sp_diaochan","sp_zhaoyun","sp_sunshangxiang","sp_caoren","sp_jiangwei","sp_machao","sp_caiwenji","jsp_guanyu","jsp_huangyueying","sp_pangde","sp_jiaxu","yuanshu",'sp_zhangliao','sp_ol_zhanghe','sp_menghuo'],
|
||||
sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_feiyi','ol_lvboshe'],
|
||||
sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_feiyi','ol_lvboshe','zhangyan'],
|
||||
sp_qifu:["caoying",'panshu',"caochun","yuantanyuanshang",'caoshuang','wolongfengchu','guansuo','baosanniang','fengfangnv','jin_zhouchu'],
|
||||
sp_wanglang:['ol_wanglang','ol_puyuan','ol_zhouqun'],
|
||||
sp_zhongdan:["cuiyan","huangfusong"],
|
||||
|
@ -33,6 +33,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
character:{
|
||||
zhangyan:['male','qun',4,['olsuji','ollangdao']],
|
||||
ol_tw_zhangji:['male','wei',3,['skill_zhangji_A','skill_zhangji_B'],['unseen']],
|
||||
ol_feiyi:['male','shu',3,['skill_feiyi_A','skill_feiyi_B'],['unseen']],
|
||||
ol_lvboshe:['male','qun',4,['skill_lvboshe'],['unseen']],
|
||||
|
@ -203,6 +204,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
luzhi:['male','wei',3,['qingzhong','weijing']]
|
||||
},
|
||||
characterIntro:{
|
||||
zhangyan:'张燕,本姓褚,生卒年不详,常山真定(今河北正定南)人,东汉末年黑山军首领。张燕剽捍,敏捷过人,军中称为“飞燕”。官渡之战时投降曹操,被任命为平北将军,封安国亭侯。死后其子张方袭爵。',
|
||||
lushi:'卢氏,五斗米教主张衡妻,张鲁母,擅长驻颜之术,常年令自己保持少女的容颜。常拜访刘焉,与其交好。',
|
||||
lvboshe:'吕伯奢,东汉成皋(今河南荥阳)人,曹操父亲曹嵩的故友。曹操与陈宫在逃离董卓避祸,返回乡里的途中借宿于吕伯奢家,未伤其人,有贼八人欲捉曹操,曹操杀之,明罗贯中在历史小说《三国演义》中将这段历史进行了丑化加工,也成为小说中曹操名言“宁教我负天下人,休教天下人负我”的出处。',
|
||||
caoxi:'曹羲(?-249年),字昭叔。曹真之子,曹爽之弟。为人有学识,明律法。司马懿曾组织朝议改革九品中正制废除九品而留中正,曹羲认为此举并无区别,最终都是决定于人的人治。曹爽掌权后,受封中领军,掌握禁兵,封安乡侯。曹爽及诸兄弟轻视司马懿,恣意妄为,经常外出狩猎,曹羲屡次劝谏,不被采纳。249年,司马懿发动高平陵政变,被夷三族。',
|
||||
|
@ -704,6 +706,285 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
skill:{
|
||||
//张燕
|
||||
olsuji:{
|
||||
audio:2,
|
||||
trigger:{global:'phaseUseBegin'},
|
||||
filter:function(event,player){
|
||||
if(!event.player.isDamaged()) return false;
|
||||
return _status.connectMode&&player.countCards('hes')||!_status.connectMode&&player.hasCard(card=>{
|
||||
return get.color(card)=='black';
|
||||
},'hes');
|
||||
},
|
||||
direct:true,
|
||||
content:[
|
||||
(event,map)=>{
|
||||
var player=map.player,trigger=map.trigger;
|
||||
var next=player.chooseToUse();
|
||||
next.set('openskilldialog',`###${get.prompt('olsuji')}###将一张黑色牌当【杀】使用${
|
||||
player==trigger.player?'':`。若${get.translation(trigger.player)}受到了此【杀】的伤害,你获得其一张牌。`
|
||||
}`);
|
||||
next.set('norestore',true);
|
||||
next.set('_backupevent','olsuji_backup');
|
||||
next.set('addCount',false);
|
||||
next.set('logSkill','olsuji');
|
||||
next.set('custom',{
|
||||
add:{},
|
||||
replace:{window:function(){}}
|
||||
});
|
||||
next.backup('olsuji_backup');
|
||||
},
|
||||
(event,map)=>{
|
||||
if(map.result.bool){
|
||||
var player=map.player,trigger=map.trigger;
|
||||
if(trigger.player.isIn()&&trigger.player.hasHistory('damage',evt=>{
|
||||
return evt.card&&evt.card.storage&&evt.card.storage.olsuji;
|
||||
})&&trigger.player.countGainableCards(player,'he')) player.gainPlayerCard(trigger.player,'he',true);
|
||||
}
|
||||
},
|
||||
],
|
||||
subSkill:{
|
||||
backup:{
|
||||
filterCard:function(card){
|
||||
return get.itemtype(card)=='card'&&get.color(card)=='black';
|
||||
},
|
||||
viewAs:{
|
||||
name:'sha',
|
||||
storage:{olsuji:true},
|
||||
},
|
||||
selectCard:1,
|
||||
position:'hes',
|
||||
ai1:function(card){
|
||||
return 5-get.value(card);
|
||||
},
|
||||
precontent:function(){
|
||||
delete event.result.skill;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
ollangdao:{
|
||||
audio:2,
|
||||
trigger:{player:'useCardToPlayer'},
|
||||
filter:function(event,player){
|
||||
if(event.card.name!='sha') return false;
|
||||
return event.isFirstTarget&&event.targets.length==1&&player.getStorage('ollangdao').length<3;
|
||||
},
|
||||
logTarget:'target',
|
||||
onremove:true,
|
||||
check:function(event,player){
|
||||
if(get.attitude(player,event.target)>0){
|
||||
if(player.getStorage('ollangdao').includes(1)&&game.hasPlayer(current=>{
|
||||
return player.canUse(event.card,current)&&get.effect(current,event.card,player,player)>0;
|
||||
})) return event.getRand()<0.5;
|
||||
return false;
|
||||
}
|
||||
return event.target.getHp()<=2||player.getDamagedHp()>1||!player.hasCard({color:'black'},'hes');
|
||||
},
|
||||
content:function*(event,map){
|
||||
var player=map.player,trigger=map.trigger,result=map.result;
|
||||
var target=trigger.target;
|
||||
var send=function(card,list){
|
||||
var next=game.createEvent('ollangdao_choose',false);
|
||||
next.setContent(lib.skill.ollangdao.contentx);
|
||||
next.set('card',card);
|
||||
next.set('list',list);
|
||||
game.resume();
|
||||
};
|
||||
var sendback=function(result,player){
|
||||
if(!result) result={};
|
||||
if(typeof result.index!=='number'||result.index<0){
|
||||
result.index=[0,1,2].find(i=>!event.player.getStorage('ollangdao').includes(i));
|
||||
}
|
||||
results.push([player,result]);
|
||||
};
|
||||
var ai_targets=[];
|
||||
var results=[];
|
||||
var players=[player,target];
|
||||
var withme=false,withol=false,withai=false;
|
||||
for(var i=0;i<players.length;i++){
|
||||
if(_status.connectMode) players[i].showTimer();
|
||||
var card=trigger.card,list=player.getStorage('ollangdao');
|
||||
if(players[i].isOnline()){
|
||||
withol=true;
|
||||
players[i].send(send,card,list);
|
||||
players[i].wait(sendback);
|
||||
}
|
||||
else if(players[i]==game.me){
|
||||
withme=true;
|
||||
var next=game.createEvent('ollangdao_choose',false);
|
||||
next.setContent(lib.skill.ollangdao.contentx);
|
||||
next.set('card',card);
|
||||
next.set('list',list);
|
||||
if(_status.connectMode) game.me.wait(sendback);
|
||||
}
|
||||
else{
|
||||
ai_targets.push(players[i]);
|
||||
}
|
||||
}
|
||||
if(ai_targets.length){
|
||||
for(var i=0;i<ai_targets.length;i++){
|
||||
if(players.contains(ai_targets[i])){
|
||||
var target=ai_targets[i];
|
||||
var list=[0,1,2].removeArray(player.getStorage('ollangdao'));
|
||||
var index=list[0];
|
||||
if(get.attitude(target,player)<0){
|
||||
if(!game.hasPlayer(current=>{
|
||||
return !trigger.targets.includes(current)&&player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)<0;
|
||||
})) list.removeArray([0,2]);
|
||||
if(player.getStorage('ollangdao').includes(2)) list.remove(0);
|
||||
}
|
||||
else{
|
||||
if(!game.hasPlayer(current=>{
|
||||
return !trigger.targets.includes(current)&&player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)>0;
|
||||
})) list.remove(1);
|
||||
if(!list.includes(1)) list.remove(0);
|
||||
}
|
||||
if(list.length) index=list.randomGet();
|
||||
sendback({index:index},target);
|
||||
ai_targets.splice(i--,1);
|
||||
}
|
||||
}
|
||||
if(ai_targets.length){
|
||||
ai_targets.randomSort();
|
||||
setTimeout(function(){
|
||||
event.interval=setInterval(function(){
|
||||
var target=ai_targets.shift();
|
||||
var list=[0,1,2].removeArray(player.getStorage('ollangdao'));
|
||||
var index=list[0];
|
||||
if(get.attitude(target,player)<0){
|
||||
if(!game.hasPlayer(current=>{
|
||||
return !trigger.targets.includes(current)&&player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)<0;
|
||||
})) list.removeArray([0,2]);
|
||||
if(player.getStorage('ollangdao').includes(2)) list.remove(0);
|
||||
}
|
||||
else{
|
||||
if(!game.hasPlayer(current=>{
|
||||
return !trigger.targets.includes(current)&&player.canUse(trigger.card,current)&&get.effect(current,trigger.card,player,target)>0;
|
||||
})) list.remove(1);
|
||||
if(!list.includes(1)) list.remove(0);
|
||||
}
|
||||
if(list.length) index=list.randomGet();
|
||||
sendback({index:index},target);
|
||||
if(!ai_targets.length){
|
||||
clearInterval(event.interval);
|
||||
if(withai) game.resume();
|
||||
}
|
||||
},_status.connectMode?750:75);
|
||||
},500);
|
||||
}
|
||||
}
|
||||
if(withme){
|
||||
result=yield next;
|
||||
if(_status.connectMode){
|
||||
game.me.unwait(result,game.me);
|
||||
}
|
||||
else{
|
||||
if(!result) result={};
|
||||
if(typeof result.index!=='number'||result.index<0){
|
||||
result.index=[0,1,2].find(i=>!event.player.getStorage('ollangdao').includes(i));
|
||||
}
|
||||
results.push([player,result]);
|
||||
}
|
||||
}
|
||||
if(withol&&!event.resultOL){
|
||||
game.pause();
|
||||
yield null;
|
||||
}
|
||||
if(ai_targets.length>0){
|
||||
withai=true;
|
||||
game.pause();
|
||||
yield null;
|
||||
}
|
||||
if(_status.connectMode){
|
||||
for(var i of [player,target]) i.hideTimer();
|
||||
}
|
||||
var chosenCount=[0,0,0];
|
||||
results.sort((a,b)=>lib.sort.seat(a[0],b[0]));
|
||||
player.when('useCardAfter')
|
||||
.assign({
|
||||
card:trigger.card
|
||||
})
|
||||
.then(()=>{
|
||||
var card=get.info(event.name).card;
|
||||
var dieEvts=game.getGlobalHistory('everything',evt=>evt.name=='die');
|
||||
if(trigger.card==card&&!game.hasPlayer2(current=>{
|
||||
for(var evt of dieEvts){
|
||||
if(evt.player!=current) continue;
|
||||
var evtx=evt.getParent(2);
|
||||
if(evtx.name!='damage') continue;
|
||||
if(evtx.card&&evtx.card==card) return true;
|
||||
}
|
||||
return false;
|
||||
},true)){
|
||||
var toRemove=card.storage.ollangdao_remove;
|
||||
var list=[0,1,2].filter(i=>(toRemove>>i)&1);
|
||||
if(!list.length) return;
|
||||
player.markAuto('ollangdao',list);
|
||||
game.log(player,'移去了','#g【狼蹈】','的','#y选项'+list.map(i=>{
|
||||
return get.cnNumber(i+1,true);
|
||||
}).join('、'));
|
||||
}
|
||||
});
|
||||
if(!trigger.card.storage) trigger.card.storage={};
|
||||
if(!trigger.card.storage.ollangdao_remove) trigger.card.storage.ollangdao_remove=0;
|
||||
var config=[['伤害+1','fire'],['目标+1','wood'],['不能响应','water']];
|
||||
for(var res of results){
|
||||
var target=res[0],result=res[1];
|
||||
if(!target||!result) continue;
|
||||
var ind=result.index;
|
||||
var conf=config[ind];
|
||||
trigger.card.storage.ollangdao_remove|=1<<ind;
|
||||
target.popup(conf[0],conf[1]);
|
||||
game.log(target,'选择令',trigger.card,`#g${conf[0]}`);
|
||||
chosenCount[ind]++;
|
||||
}
|
||||
game.delay();
|
||||
var extraBaseDamage=chosenCount[0],extraTargetNum=chosenCount[1],directHit=chosenCount[2];
|
||||
trigger.getParent().baseDamage+=extraBaseDamage;
|
||||
if(directHit) trigger.directHit.addArray(game.players);
|
||||
if(extraTargetNum<=0){
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
result=yield player.chooseTarget(`狼蹈:为${get.translation(trigger.card)}额外指定至多${get.cnNumber(extraTargetNum)}个目标`,(card,player,target)=>{
|
||||
return !_status.event.targets.includes(target)&&player.canUse(_status.event.card,target);
|
||||
}).set('targets',trigger.targets).set('ai',target=>{
|
||||
var player=_status.event.player;
|
||||
return get.effect(target,_status.event.card,player,player);
|
||||
}).set('card',trigger.card);
|
||||
if(result.bool){
|
||||
if(!event.isMine()&&!event.isOnline()) game.delayex();
|
||||
var targets=result.targets;
|
||||
player.line(targets);
|
||||
trigger.targets.addArray(targets);
|
||||
game.log(targets,'也成为了',trigger.card,'的目标');
|
||||
}
|
||||
},
|
||||
contentx:function(){
|
||||
'step 0'
|
||||
var name=get.translation(card);
|
||||
var choices=[],choiceList=[
|
||||
`令${name}伤害基数+1`,
|
||||
`令${name}可以多选择一个目标`,
|
||||
`令${name}不可被响应`
|
||||
];
|
||||
[0,1,2].forEach((item,index)=>{
|
||||
if(event.list.includes(item)){
|
||||
choiceList[index]=`<span style="text-decoration: line-through; opacity:0.5; ">${choiceList[index]}</span>`
|
||||
}
|
||||
else choices.push(`选项${get.cnNumber(index+1,true)}`);
|
||||
});
|
||||
game.me.chooseControl(choices).set('prompt','狼蹈:请选择一项').set('choiceList',choiceList).set('ai',()=>{
|
||||
return _status.event.controls.randomGet();
|
||||
});
|
||||
'step 1'
|
||||
event.result={index:['选项一','选项二','选项三'].indexOf(result.control)};
|
||||
},
|
||||
intro:{
|
||||
content:(storage,player)=>`已移除选项${storage.map(i=>get.cnNumber(i+1,true)).join('、')}`,
|
||||
},
|
||||
},
|
||||
//张既
|
||||
skill_zhangji_A:{
|
||||
audio:2,
|
||||
|
@ -1225,7 +1506,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
'step 0'
|
||||
var info=lib.skill.olgangshu.getInfo(player);
|
||||
player.chooseControl('攻击范围('+info[0]+')','摸牌数('+info[1]+')','使用【杀】的上限('+info[2]+')','cancel2').set('prompt',get.prompt('olgangshu')).set('prompt2','<div class="text center">令以下一个数值+1(每项至多+5):<br>1.攻击范围;<br>2.下个摸牌阶段的摸牌数;<br>3.使用【杀】的次数上限。</div>').set('ai',()=>{
|
||||
player.chooseControl('攻击范围('+info[0]+')','摸牌数('+info[1]+')','使用杀的上限('+info[2]+')','cancel2').set('prompt',get.prompt('olgangshu')).set('prompt2','<div class="text center">令以下一个数值+1(每项至多+5):<br>1.攻击范围;<br>2.下个摸牌阶段的摸牌数;<br>3.使用【杀】的次数上限。</div>').set('ai',()=>{
|
||||
return _status.event.choice;
|
||||
}).set('choice',function(){
|
||||
var info=lib.skill.olgangshu.getInfo(player);
|
||||
|
@ -2149,7 +2430,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
game.cardsGotoOrdering(card);
|
||||
'step 1'
|
||||
if(player.countCards('he')>0){
|
||||
player.chooseCard('he','天候:是否用一张牌交换牌堆顶的'+get.translation(card)+'?').set('promptx',[[card]]).set('ai',()=>-1)
|
||||
player.chooseCard('he','天候:是否用一张牌交换牌堆顶的'+get.translation(card)+'?').set('promptx',[[card]]).set('card',card).set('ai',cardx=>{
|
||||
let card=_status.event.card,val=get.value(card,player)-get.value(cardx,player);
|
||||
if(val<0) return -val;
|
||||
let suit=get.suit(card);
|
||||
if(suit==='heart') return val+game.countPlayer((current)=>{
|
||||
if(player!==current&&!game.hasPlayer((tar)=>tar.hp-current.hp>1)) return get.sgn(get.attitude(player,current));
|
||||
return 0;
|
||||
});
|
||||
if(suit=='club') return val+game.countPlayer((current)=>{
|
||||
if(player!==current&&(current.hp<2||!game.hasPlayer((tar)=>current.hp-tar.hp>1))) return get.sgn(get.attitude(player,current));
|
||||
return 0;
|
||||
});
|
||||
return val+0.1;
|
||||
});
|
||||
}
|
||||
else{
|
||||
event._result={bool:false};
|
||||
|
@ -2206,6 +2500,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var current of players){
|
||||
current.removeAdditionalSkill(key);
|
||||
}
|
||||
game.removeGlobalSkill('oltianhou_'+player.playerid+'_ai');
|
||||
game.broadcastAll(function(){
|
||||
delete _status.tempBackground;
|
||||
game.updateBackground();
|
||||
|
@ -2241,20 +2536,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
global:'oltianhou_spade_ai',
|
||||
},
|
||||
spade_ai:{
|
||||
effect:{
|
||||
player:function(card,player,target,current){
|
||||
if(get.tag(card,'fireDamage')&&!player.hasSkill('oltianhou_spade')){
|
||||
return 'zerotarget';
|
||||
ai:{
|
||||
effect:{
|
||||
player:function(card,player,target,current){
|
||||
if((typeof card=='object'&&game.hasNature(card,'fire')||get.tag(card,'fireDamage'))&&!player.hasSkill('oltianhou_spade')) return 'zeroplayertarget';
|
||||
if((typeof card=='object'&&game.hasNature(card,'thunder')||get.tag(card,'thunderDamage'))){
|
||||
var list=lib.skill.oltianhou_spade.logTarget({player:target});
|
||||
var eff=list.reduce(function(eff,current){
|
||||
eff+=get.effect(current,{name:'losehp'},player,player)/get.attitude(player,player);
|
||||
},0);
|
||||
return [1,eff];
|
||||
}
|
||||
}
|
||||
else if(get.tag(card,'thunderDamage')){
|
||||
var list=lib.skill.oltianhou_spade.logTarget({player:target});
|
||||
var eff=list.reduce(function(eff,current){
|
||||
eff+=get.effect(current,{name:'losehp'},player,player)
|
||||
},0);
|
||||
return [1,eff];
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
miehuo:{
|
||||
audio:'oltianhou_spade',
|
||||
|
@ -2284,6 +2579,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
trigger.player.loseHp();
|
||||
},
|
||||
global:'oltianhou_heart_ai'
|
||||
},
|
||||
heart_ai:{
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(num>0&&_status.event&&_status.event.type=='phase'&&!player.hasSkill('oltianhou_heart')&&get.tag(card,'recover')&&!player.isMaxHp()&&player.needsToDiscard()<=1&&!game.hasPlayer(function(current){
|
||||
return current.hp-player.hp>1;
|
||||
})&&get.effect(player,{name:'losehp'},player,player)<0) return 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
club:{
|
||||
audio:true,
|
||||
|
@ -2301,6 +2606,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
trigger.player.loseHp();
|
||||
},
|
||||
global:'oltianhou_club_ai'
|
||||
},
|
||||
club_ai:{
|
||||
ai:{
|
||||
nokeep:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
return _status.event&&_status.event.type=='phase'&&(!arg||arg.card&&get.name(arg.card)==='tao')&&!player.hasSkill('oltianhou_club')&&player.isMinHp()&&get.effect(player,{name:'losehp'},player,player)<0;
|
||||
}
|
||||
}
|
||||
},
|
||||
diamond:{
|
||||
audio:true,
|
||||
|
@ -2336,13 +2650,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
global:'oltianhou_diamond_ai',
|
||||
},
|
||||
diamond_ai:{
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(card.name=='sha'&&!player.hasSkill('oltianhou_diamond')){
|
||||
if(target!=player.getNext()&&target!=player.getPrevious()) return 0.7;
|
||||
ai:{
|
||||
effect:{
|
||||
player:function(card,player,target){
|
||||
if(get.name(card)=='sha'&&!player.hasSkill('oltianhou_diamond')&&target!=player.getNext()&&target!=player.getPrevious()){
|
||||
let num=get.number(card),max=_status.aiyh_MAXNUM||13;
|
||||
return [num/max,0,num/max,0];
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -3650,15 +3967,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
mod:{
|
||||
aiValue:function(player,card,num){
|
||||
if(get.itemtype(card)!='card'||!card.hasGaintag('oldaili_tag')) return;
|
||||
if(get.distance(_status.currentPhase,player,'absolute')==1&&!player.isTurnedOver()) return;
|
||||
if(player.countCards('h',card=>{
|
||||
if(num < 0 ||get.itemtype(card) != 'card' || !card.hasGaintag('oldaili_tag')) return;
|
||||
if(get.distance(_status.currentPhase, player, 'absolute') == 1 && !player.isTurnedOver()) return;
|
||||
let dai = player.countCards('h', (card) => {
|
||||
return card.hasGaintag('oldaili_tag');
|
||||
})%2==0&&!ui.selected.cards.some(card=>{
|
||||
});
|
||||
if(ui.selected.cards && ui.selected.cards.length) dai += ui.selected.cards.filter((card) => {
|
||||
return card.hasGaintag('oldaili_tag');
|
||||
})){
|
||||
return num/10;
|
||||
}
|
||||
}).length;
|
||||
if(dai % 2) return Math.sqrt(num);
|
||||
return num + 6;
|
||||
},
|
||||
aiUseful:function(){
|
||||
return lib.skill.oldaili.mod.aiValue.apply(this,arguments);
|
||||
|
@ -4017,9 +4335,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
player.damage('nosource');
|
||||
'step 1'
|
||||
var next=player.phaseUse();
|
||||
event.next.remove(next);
|
||||
trigger.next.push(next);
|
||||
trigger.phaseList.splice(trigger.num,0,'phaseUse|oldianjun');
|
||||
},
|
||||
},
|
||||
olkangrui:{
|
||||
|
@ -6077,9 +6393,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
ai:{
|
||||
threaten:1.2,
|
||||
order:9,
|
||||
order:9.1,
|
||||
result:{
|
||||
target:-1,
|
||||
player:function(player){
|
||||
let min=24;
|
||||
player.countCards('he',function(card){
|
||||
min=Math.min(min,get.value(card));
|
||||
});
|
||||
if(ui.selected.targets.length==1) return 1-min/6;
|
||||
return 0.75-min/48;
|
||||
},
|
||||
target:function(player,target){
|
||||
if(target.hasCard(function(card){
|
||||
return lib.filter.cardDiscardable(card,player,'olqingyi');
|
||||
},'he')) return -1;
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
group:'olqingyi_gain',
|
||||
|
@ -8492,13 +8821,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return player!=event.player&&event.player.isIn()&&player.countCards('h')>0&&!player.hasSkill('yuanzi_round',null,null,false);
|
||||
},
|
||||
check:function(event,player){
|
||||
if(get.attitude(player,event.player)<=4) return false;
|
||||
if(event.player.hasJudge('lebu')) return false;
|
||||
if(event.player.hasJudge('lebu')||get.attitude(player,event.player)<2) return false;
|
||||
return game.hasPlayer(function(current){
|
||||
return event.player!=player&&game.hasPlayer(function(current){
|
||||
return current!=player&¤t!=event.player&&event.player.inRange(current)&&get.attitude(event.player,current)<0;
|
||||
});
|
||||
})
|
||||
return current!==player&¤t!==event.player&&event.player.inRange(current)&&get.attitude(event.player,current)<0;
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
var cards=player.getCards('h');
|
||||
|
@ -16325,10 +16651,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
yjixi:{
|
||||
derivation:'rewangzun',
|
||||
audio:'weidi',
|
||||
trigger:{player:'phaseJieshuBegin'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return player.countMark('yjixi')>=3;
|
||||
if(player.phaseNumber<3) return false;
|
||||
var num=0;
|
||||
for(var i=player.actionHistory.length-1;i>=0;i--){
|
||||
if(!player.actionHistory[i].isMe) continue;
|
||||
if(_status.globalHistory[i].changeHp.some(evt=>evt.player==player&&evt.getParent().name=='loseHp')) return false;
|
||||
else{
|
||||
num++;
|
||||
if(num>=3) break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
skillAnimation:true,
|
||||
animationColor:'gray',
|
||||
|
@ -16384,6 +16721,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
xinyongsi:{
|
||||
audio:'yongsi1',
|
||||
group:['xinyongsi1','xinyongsi2'],
|
||||
locked:true,
|
||||
},
|
||||
|
@ -16397,7 +16735,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
player.draw(game.countGroup());
|
||||
trigger.changeToZero();
|
||||
}
|
||||
},
|
||||
},
|
||||
xinyongsi2:{
|
||||
audio:'yongsi2',
|
||||
|
@ -16412,13 +16750,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return 8-get.value(card);
|
||||
};
|
||||
'step 1'
|
||||
if(!result.bool){
|
||||
player.loseHp();
|
||||
var num=player.countMark('yjixi');
|
||||
if(num) player.removeMark('yjixi',num,false);
|
||||
}
|
||||
else player.addMark('yjixi',1,false);
|
||||
}
|
||||
if(!result.bool) player.loseHp();
|
||||
},
|
||||
},
|
||||
lianzhu:{
|
||||
audio:2,
|
||||
|
@ -17713,6 +18046,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
zhidao:{
|
||||
audio:2,
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(num>0&&!player.hasSkill('zhidao2')&&!get.tag(card,'damage')&&(!lib.filter.targetEnabled(card,player,player)||get.effect(player,card,player)<=0)) return num+10;
|
||||
}
|
||||
},
|
||||
trigger:{source:'damageSource'},
|
||||
filter:function(event,player){
|
||||
if(event._notrigger.contains(event.player)) return false;
|
||||
|
@ -17877,16 +18215,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
'step 0'
|
||||
player.draw(3);
|
||||
'step 1'
|
||||
var list=lib.skill.zhengnan.derivation.filter(skill=>!player.hasSkill(skill));
|
||||
if(list.length==1) event._result={control:list[0]};
|
||||
else if(list.length){
|
||||
else if(list.length>0){
|
||||
player.chooseControl(list).set('prompt','选择获得一项技能').set('ai',function(){
|
||||
if(_status.event.controls.contains('dangxian')) return 'dangxian';
|
||||
return _status.event.controls[0];
|
||||
});
|
||||
}
|
||||
else event.finish();
|
||||
'step 1'
|
||||
'step 2'
|
||||
if(result.control){
|
||||
player.addSkillLog(result.control);
|
||||
player.popup(result.control);
|
||||
|
@ -21594,6 +21933,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"step 1"
|
||||
if(result.bool){
|
||||
var nono=(get.damageEffect(trigger.player,player,trigger.player)>=0);
|
||||
if(get.mode()!=='identity'||player.identity!=='nei') player.addExpose(0.15);
|
||||
trigger.player.chooseToDiscard('he','弃置一张装备牌并令'+get.translation(player)+'摸一张牌,或受到一点伤害',{type:'equip'}).set('ai',function(card){
|
||||
if(_status.event.nono){
|
||||
return 0;
|
||||
|
@ -21612,10 +21952,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else{
|
||||
trigger.player.damage();
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
expose:0.3,
|
||||
threaten:1.3
|
||||
}
|
||||
},
|
||||
suishi:{
|
||||
|
@ -24401,6 +24737,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(player.storage.skill_lvboshe) return '农民的回合结束时:阴,你可以令地主进行一个额外回合;<span class="bluetext">阳,你可以令其进行一个额外回合</span>。';
|
||||
return '农民的回合结束时:<span class="bluetext">阴,你可以令地主进行一个额外回合</span>;阳,你可以令其进行一个额外回合。';
|
||||
},
|
||||
ollangdao:function(player){
|
||||
var str='当你使用【杀】指定唯一目标时,你可以与该目标角色同时选择一项:';
|
||||
var list=[
|
||||
'1.令此【杀】伤害基数+1;',
|
||||
'2.令你可以为此【杀】多选择一个目标;',
|
||||
'3.令此【杀】不可被响应。'
|
||||
];
|
||||
var storage=player.getStorage('ollangdao');
|
||||
list.forEach((item,index)=>{
|
||||
if(storage.includes(index)){
|
||||
str+=`<span style="text-decoration: line-through;">${item}</span>`;
|
||||
}
|
||||
else str+=item;
|
||||
})
|
||||
str+='然后若没有角色因此【杀】死亡,你移除本次被选择的项。';
|
||||
return str;
|
||||
},
|
||||
},
|
||||
characterReplace:{
|
||||
shixie:['shixie','dc_shixie'],
|
||||
|
@ -24827,7 +25180,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
refuhan:'扶汉',
|
||||
refuhan_info:'限定技,回合开始时,你可以移去所有"梅影"标记并摸等量的牌,然后从X张蜀势力武将牌中选择并获得至多两个技能(限定技、觉醒技、隐匿技、使命技、主公技除外)。若此时你是体力值最低的角色,你回复1点体力(X为场上角色数,且X∈[4,+∞))。',
|
||||
yjixi:'觊玺',
|
||||
yjixi_info:'觉醒技,结束阶段,若你连续三回合没有因〖庸肆〗而失去过体力,则你增加1点体力上限并回复1点体力,然后选择一项:获得技能〖妄尊〗;摸两张牌并获得当前主公的主公技。',
|
||||
yjixi_info:'觉醒技,结束阶段,若你已连续三个自己回合未失去过体力,则你增加1点体力上限并回复1点体力,然后选择一项:获得技能〖妄尊〗;摸两张牌并获得当前主公的主公技。',
|
||||
xinyongsi:'庸肆',
|
||||
xinyongsi1:'庸肆',
|
||||
xinyongsi2:'庸肆',
|
||||
|
@ -25653,6 +26006,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ol_lvboshe:'吕伯奢',
|
||||
skill_lvboshe:'技能',
|
||||
skill_lvboshe_info:'农民的回合结束时:阴,你可以令地主进行一个额外回合;阳,你可以令其进行一个额外回合。',
|
||||
zhangyan:'张燕',
|
||||
olsuji:'肃疾',
|
||||
olsuji_info:'一名角色的出牌阶段开始时,若其已受伤,你可以将一张黑色牌当【杀】使用。若其受到此【杀】的伤害,你获得其一张牌。',
|
||||
ollangdao:'狼蹈',
|
||||
ollangdao_info:'当你使用【杀】指定唯一目标时,你可以与该目标角色同时选择一项:1.令此【杀】伤害基数+1;2.令你可以为此【杀】多选择一个目标;3.令此【杀】不可被响应。然后若没有角色因此【杀】死亡,你移除本次被选择的项。',
|
||||
|
||||
|
||||
sp_tianji:'天极·皇室宗亲',
|
||||
|
|
|
@ -41,7 +41,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
qiuliju:['male','qun','4/6',['koulve','qljsuiren']],
|
||||
re_hucheer:['male','qun',4,['redaoji','fuzhong']],
|
||||
re_dongcheng:['male','qun',4,['xuezhao']],
|
||||
tangji:['female','qun',3,['jielie','kangge']],
|
||||
tangji:['female','qun',3,['kangge','jielie']],
|
||||
zhangheng:['male','qun',8,['dangzai','liangjue']],
|
||||
duanwei:['male','qun',4,['langmie']],
|
||||
re_niujin:['male','wei',4,['recuorui','reliewei']],
|
||||
|
@ -2814,9 +2814,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filterCard:true,
|
||||
selectCard:[1,Infinity],
|
||||
check:function(card){
|
||||
var player=_status.event.player;
|
||||
if(ui.selected.cards.length<=Math.max(1,player.needsToDiscard(),player.countCards('h')-4)) return 6-get.value(card);
|
||||
return 4-get.value(card);
|
||||
let player=_status.event.player,num=player.hasSkill('nifu')?15:8;
|
||||
if(ui.selected.cards.length<=Math.max(1,player.needsToDiscard(),player.countCards('h')-4)) return num-get.value(card);
|
||||
return num/2-get.value(card);
|
||||
},
|
||||
position:'h',
|
||||
discard:false,
|
||||
|
@ -2870,7 +2870,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
viewAs:{name:'juedou'},
|
||||
position:'h',
|
||||
filterTarget:lib.filter.targetEnabled,
|
||||
check:(card)=>get.name(card)=='sha'?7:5.5-get.value(card),
|
||||
check:(card)=>get.name(card)=='sha'?0:5.5-get.value(card),
|
||||
log:false,
|
||||
precontent:function(){
|
||||
delete event.result.skill;
|
||||
|
@ -4545,12 +4545,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
//唐姬
|
||||
jielie:{
|
||||
kangge:{
|
||||
audio:2,
|
||||
trigger:{player:'phaseBegin'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return player.phaseNumber==1&&!player.storage.jielie&&game.hasPlayer(current=>current!=player);
|
||||
return player.phaseNumber==1&&!player.storage.kangge&&game.hasPlayer(current=>current!=player);
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -4560,31 +4560,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.logSkill('jielie',target);
|
||||
player.addSkill('jielie_clear');
|
||||
player.storage.jielie=target;
|
||||
player.markSkill('jielie');
|
||||
player.logSkill('kangge',target);
|
||||
player.addSkill('kangge_clear');
|
||||
player.storage.kangge=target;
|
||||
player.markSkill('kangge');
|
||||
game.delayx();
|
||||
}
|
||||
},
|
||||
intro:{content:'已指定$为目标'},
|
||||
group:['jielie_draw','jielie_dying','jielie_die'],
|
||||
group:['kangge_draw','kangge_dying','kangge_die'],
|
||||
subSkill:{
|
||||
draw:{
|
||||
audio:'jielie',
|
||||
audio:'kangge',
|
||||
trigger:{
|
||||
global:['gainAfter','loseAsyncAfter'],
|
||||
},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
if(player.countMark('jielie_draw')>=3) return false;
|
||||
var target=player.storage.jielie;
|
||||
if(player.countMark('kangge_draw')>=3) return false;
|
||||
var target=player.storage.kangge;
|
||||
return target&&target!=_status.currentPhase&&event.getg(target).length>0;
|
||||
},
|
||||
logTarget:'player',
|
||||
content:function(){
|
||||
var num=Math.min(3-player.countMark('jielie_draw'),trigger.getg(player.storage.jielie).length);
|
||||
player.addMark('jielie_draw',num,false);
|
||||
var num=Math.min(3-player.countMark('kangge_draw'),trigger.getg(player.storage.kangge).length);
|
||||
player.addMark('kangge_draw',num,false);
|
||||
player.draw(num);
|
||||
},
|
||||
},
|
||||
|
@ -4595,18 +4595,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
popup:false,
|
||||
charlotte:true,
|
||||
filter:function(event,player){
|
||||
return player.countMark('jielie_draw')>0;
|
||||
return player.countMark('kangge_draw')>0;
|
||||
},
|
||||
content:function(){
|
||||
player.removeMark('jielie_draw',player.countMark('jielie_draw'),false);
|
||||
player.removeMark('kangge_draw',player.countMark('kangge_draw'),false);
|
||||
},
|
||||
},
|
||||
dying:{
|
||||
audio:'jielie',
|
||||
audio:'kangge',
|
||||
trigger:{global:'dying'},
|
||||
logTarget:'player',
|
||||
filter:function(event,player){
|
||||
return event.player==player.storage.jielie&&event.player.hp<1&&!player.hasSkill('jielie_temp');
|
||||
return event.player==player.storage.kangge&&event.player.hp<1&&!player.hasSkill('kangge_temp');
|
||||
},
|
||||
check:function(event,player){
|
||||
return get.attitude(player,event.player)>0;
|
||||
|
@ -4614,15 +4614,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
prompt2:'令其将体力值回复至1点',
|
||||
content:function(){
|
||||
trigger.player.recover(1-trigger.player.hp);
|
||||
player.addTempSkill('jielie_temp','roundStart');
|
||||
player.addTempSkill('kangge_temp','roundStart');
|
||||
},
|
||||
},
|
||||
temp:{},
|
||||
die:{
|
||||
audio:'jielie',
|
||||
audio:'kangge',
|
||||
trigger:{global:'dieAfter'},
|
||||
filter:function(event,player){
|
||||
return event.player==player.storage.jielie;
|
||||
return event.player==player.storage.kangge;
|
||||
},
|
||||
forced:true,
|
||||
content:function(){
|
||||
|
@ -4636,24 +4636,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
threaten:2,
|
||||
},
|
||||
},
|
||||
kangge:{
|
||||
jielie:{
|
||||
audio:2,
|
||||
trigger:{player:'damageBegin4'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return ((!event.source)||(event.source!=player&&event.source!=player.storage.jielie))&&player.storage.jielie&&player.storage.jielie.isIn();
|
||||
return ((!event.source)||(event.source!=player&&event.source!=player.storage.kangge))&&player.storage.kangge&&player.storage.kangge.isIn();
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseControl(lib.suit.slice(0),'cancel2').set('prompt',get.prompt('kangge')).set('prompt2','防止伤害并改为失去等量体力,且令'+get.translation(player.storage.jielie)+'从弃牌堆中获得等量的花色牌').set('ai',function(){
|
||||
player.chooseControl(lib.suit.slice(0),'cancel2').set('prompt',get.prompt('jielie')).set('prompt2','防止伤害并改为失去等量体力,且令'+get.translation(player.storage.kangge)+'从弃牌堆中获得等量的花色牌').set('ai',function(){
|
||||
var player=_status.event.player;
|
||||
if(get.attitude(player,player.storage.jielie)<=0) return 'cancel2';
|
||||
if(get.attitude(player,player.storage.kangge)<=0) return 'cancel2';
|
||||
return lib.suit.randomGet();
|
||||
});
|
||||
'step 1'
|
||||
if(result.control!='cancel2'){
|
||||
event.suit=result.control;
|
||||
player.logSkill('kangge',player.storage.jielie);
|
||||
player.logSkill('jielie',player.storage.kangge);
|
||||
trigger.cancel();
|
||||
player.loseHp(trigger.num);
|
||||
}
|
||||
|
@ -4667,7 +4667,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(card) cards.push(card);
|
||||
else break;
|
||||
}
|
||||
if(cards.length) player.storage.jielie.gain(cards,'gain2');
|
||||
if(cards.length) player.storage.kangge.gain(cards,'gain2');
|
||||
},
|
||||
},
|
||||
//张横
|
||||
|
@ -8836,7 +8836,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
zongkui:{
|
||||
trigger:{player:'phaseBefore',global:'roundStart'},
|
||||
trigger:{
|
||||
player:'phaseBeforeEnd',
|
||||
global:'roundStart',
|
||||
},
|
||||
direct:true,
|
||||
audio:2,
|
||||
audioname:['tw_beimihu'],
|
||||
|
@ -10208,7 +10211,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
zongkui:'纵傀',
|
||||
zongkui_mark:'纵傀',
|
||||
zongkui_mark_bg:'傀',
|
||||
zongkui_info:'回合开始时,你可以指定一名未拥有“傀”标记的其他角色,令其获得一枚“傀”标记。每轮游戏开始时,你指定一名体力值最少且没有“傀”标记的其他角色,令其获得一枚“傀”标记。',
|
||||
zongkui_info:'回合开始前,你可以指定一名未拥有“傀”标记的其他角色,令其获得一枚“傀”标记。一轮游戏开始时,你指定一名体力值最少且没有“傀”标记的其他角色,令其获得一枚“傀”标记。',
|
||||
guju:'骨疽',
|
||||
guju_info:'锁定技,拥有“傀”标记的角色受到伤害后,你摸一张牌。',
|
||||
baijia:'拜假',
|
||||
|
@ -10450,10 +10453,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
liangjue:'粮绝',
|
||||
liangjue_info:'锁定技,当有黑色牌进入或者离开你的判定区或装备区后,若你的体力值大于1,你失去1点体力,然后摸两张牌。',
|
||||
tangji:'唐姬',
|
||||
jielie:'抗歌',
|
||||
jielie_info:'你的第一个回合开始时,选择一名其他角色,该角色每次于其回合外得到牌后,你摸等量的牌(每回合至多摸三张);其进入濒死状态时,你可令其回复体力至1点(每轮限一次)。该角色死亡时,你弃置所有牌并失去1点体力。',
|
||||
kangge:'节烈',
|
||||
kangge_info:'当你受到除自己和“抗歌”角色以外的角色造成的伤害时,你可以防止此伤害并选择一种花色,然后你失去X点体力,令“抗歌”角色从弃牌堆中随机获得X张此花色的牌(X为伤害值)。',
|
||||
kangge:'抗歌',
|
||||
kangge_info:'你的第一个回合开始时,选择一名其他角色,该角色每次于其回合外得到牌后,你摸等量的牌(每回合至多摸三张);其进入濒死状态时,你可令其回复体力至1点(每轮限一次)。该角色死亡时,你弃置所有牌并失去1点体力。',
|
||||
jielie:'节烈',
|
||||
jielie_info:'当你受到除自己和“抗歌”角色以外的角色造成的伤害时,你可以防止此伤害并选择一种花色,然后你失去X点体力,令“抗歌”角色从弃牌堆中随机获得X张此花色的牌(X为伤害值)。',
|
||||
re_dongcheng:'董承',
|
||||
xuezhao:'血诏',
|
||||
xuezhao_info:'出牌阶段限一次,你可弃置一张手牌并选择至多X名其他角色(X为你的体力上限)。这些角色依次选择是否交给你一张牌,若选择是,该角色摸一张牌且你本回合可多使用一张【杀】;若选择否,该角色本回合无法响应你使用的牌。',
|
||||
|
|
|
@ -1459,6 +1459,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
xinzhiheng:{
|
||||
audio:'zhiheng',
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(num<=0||get.itemtype(card)!=='card'||get.type(card)!=='equip') return num;
|
||||
let eq=player.getEquip(get.subtype(card));
|
||||
if(eq&&get.equipValue(card)-get.equipValue(eq)<Math.max(1.2,6-player.hp)) return 0;
|
||||
}
|
||||
},
|
||||
locked:false,
|
||||
enable:'phaseUse',
|
||||
// alter:true,
|
||||
usable:1,
|
||||
|
@ -1503,16 +1511,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
delay:{}
|
||||
},
|
||||
ai:{
|
||||
order:1,
|
||||
order:function(item,player){
|
||||
if(player.hasCard((i)=>get.value(i)>Math.max(6,9-player.hp),'he')) return 1;
|
||||
return 10;
|
||||
},
|
||||
result:{
|
||||
player:1
|
||||
},
|
||||
nokeep:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(tag==='nokeep') return (!arg||arg&&arg.card&&get.name(arg.card)==='tao')&&player.isPhaseUsing()&&!player.getStat().skill.xinzhiheng&&player.hasCard((card)=>get.name(card)!=='tao','h');
|
||||
},
|
||||
threaten:1.55
|
||||
},
|
||||
},
|
||||
zhiheng:{
|
||||
audio:2,
|
||||
audioname:['gz_jun_sunquan'],
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(num<=0||get.itemtype(card)!=='card'||get.type(card)!=='equip') return num;
|
||||
let eq=player.getEquip(get.subtype(card));
|
||||
if(eq&&get.equipValue(card)-get.equipValue(eq)<Math.max(1.2,6-player.hp)) return 0;
|
||||
}
|
||||
},
|
||||
locked:false,
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
position:'he',
|
||||
|
|
|
@ -1100,20 +1100,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
logTarget:'player',
|
||||
check:function(event,player){
|
||||
var att=get.attitude(event.player,player);
|
||||
if(player.hasSkill('twzhiqu')){
|
||||
var cnt=game.countPlayer(current=>get.distance(player,current)==2&&!player.inRange(current));
|
||||
if(cnt>=2){
|
||||
if(att<0) return true;
|
||||
return false;
|
||||
}
|
||||
if(att<0&&cnt>=2||att>0&&!cnt) return true;
|
||||
return false;
|
||||
}
|
||||
else{
|
||||
if(att<0) return false;
|
||||
return true;
|
||||
}
|
||||
let att=get.attitude(player,event.player);
|
||||
if(att>0) return true;
|
||||
if(!player.hasSkill('twzhiqu')) return false;
|
||||
let cnt=game.countPlayer(current=>get.distance(player,current)===2);
|
||||
if(cnt>2||cnt===2&&Math.abs(att)<2||cnt&&Math.abs(att)<1) return true;
|
||||
return false;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -1126,20 +1118,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return _status.event.choice;
|
||||
}).set('choice',function(){
|
||||
var att=get.attitude(target,player);
|
||||
if(att==0) return 0;
|
||||
if(att===0) return 0;
|
||||
if(player.hasSkill('twzhiqu')){
|
||||
var cnt=game.countPlayer(current=>get.distance(player,current)==2&&!player.inRange(current));
|
||||
if(cnt>=2){
|
||||
if(att<0) return 1;
|
||||
return 0;
|
||||
var cnt=game.countPlayer(current=>get.distance(player,current)===2);
|
||||
if(att>0){
|
||||
if(cnt||player.needsToDiscard(1)) return 0;
|
||||
return 1;
|
||||
}
|
||||
if(att<0&&cnt>=2||att>0&&!cnt) return 1;
|
||||
if(!cnt) return 0;
|
||||
if(cnt>=2||get.distance(target,player,'attack')===2||get.distance(target,player)===2) return 1;
|
||||
return 0;
|
||||
}
|
||||
else{
|
||||
if(att<0) return 0;
|
||||
return [0,1].randomGet();
|
||||
}
|
||||
if(att<0||player.needsToDiscard(1)&&game.hasPlayer(function(current){
|
||||
return current!==player&¤t!==target&&!player.inRange(current);
|
||||
})) return 0;
|
||||
return [0,1].randomGet();
|
||||
}());
|
||||
'step 1'
|
||||
if(result.index==0){
|
||||
|
@ -1360,6 +1353,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
locked:false,
|
||||
direct:true,
|
||||
onremove:true,
|
||||
intro:{
|
||||
content:'players'
|
||||
},
|
||||
filter:function(event,player){
|
||||
return game.hasPlayer(current=>current!=player)&&(event.name!='phase'||game.phaseNumber==0);
|
||||
},
|
||||
|
@ -4570,6 +4566,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
forced:true,
|
||||
logTarget:'target',
|
||||
init:function(player){
|
||||
var target=_status.currentPhase;
|
||||
if(!target||!target!=player) return;
|
||||
if(!player.getStorage('twxiangyu_range').length){
|
||||
var targets=game.filterPlayer(current=>{
|
||||
return current.getHistory('lose').length;
|
||||
|
@ -4591,7 +4589,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
mod:{
|
||||
attackRange:function(player,num){
|
||||
return num+player.getStorage('twxiangyu_range').length;
|
||||
return num+Math.min(5,player.getStorage('twxiangyu_range').length);
|
||||
},
|
||||
},
|
||||
subSkill:{
|
||||
|
@ -4622,7 +4620,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
marktext:'羽',
|
||||
intro:{
|
||||
content:function(storage,player){
|
||||
var num=storage?storage.length:0;
|
||||
var num=Math.min(5,storage?storage.length:0);
|
||||
return '攻击范围+'+num;
|
||||
},
|
||||
},
|
||||
|
@ -11389,6 +11387,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
twzhian:{
|
||||
audio:2,
|
||||
init:function(player){
|
||||
game.addGlobalSkill('twzhian_ai');
|
||||
},
|
||||
onremove:function(player){
|
||||
game.removeGlobalSkill('twzhian_ai');
|
||||
},
|
||||
usable:1,
|
||||
trigger:{global:'useCardAfter'},
|
||||
direct:true,
|
||||
|
@ -11468,6 +11472,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 2'
|
||||
if(result.bool&&target.getCards('ej').contains(trigger.cards[0])) player.gain(trigger.cards,target,'give','bySelf');
|
||||
},
|
||||
subSkill:{
|
||||
ai:{
|
||||
trigger:{player:'dieAfter'},
|
||||
filter:function(event,player){
|
||||
return !game.hasPlayer((current)=>current.hasSkill('twzhian'),true);
|
||||
},
|
||||
silent:true,
|
||||
forceDie:true,
|
||||
content:function(){
|
||||
game.removeGlobalSkill('twzhian_ai');
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
player:function(card,player,target){
|
||||
if(get.type(card)!=='delay'&&get.type(card)!=='equip') return 1;
|
||||
let za=game.findPlayer((cur)=>cur.hasSkill('twzhian')&&(!cur.storage.counttrigger||!cur.storage.counttrigger.twzhian)&&get.attitude(player,cur)<=0);
|
||||
if(za) return [0.5,-0.8];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
twyujue:{
|
||||
audio:2,
|
||||
|
@ -14119,7 +14145,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
equan_info:'锁定技。①当有角色于你的回合内受到伤害后,其获得X枚“毒”(X为伤害值)。②准备阶段,你令所有拥有“毒”标记的角色移去所有“毒”标记并失去等量的体力。③当有角色因〖恶泉②〗进入濒死状态时,你令其所有技能失效直到回合结束。',
|
||||
manji:'蛮汲',
|
||||
manji_info:'锁定技。其他角色失去体力后,若你的体力值:不大于该角色,你回复1点体力;不小于该角色,你摸一张牌。',
|
||||
wuban:'吴班',
|
||||
wuban:'TW吴班',
|
||||
wuban_prefix:'TW',
|
||||
jintao:'进讨',
|
||||
jintao_info:'锁定技,你使用【杀】无距离限制且次数上限+1。你于出牌阶段内使用的第一张【杀】伤害+1,第二张【杀】不可被响应。',
|
||||
yuejiu:'TW乐就',
|
||||
|
@ -14275,7 +14302,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
twbingde_info:'出牌阶段限一次。你可以选择一个本阶段未选择过的花色并弃置一张牌,你摸等同于本阶段你使用此花色的牌数,然后若你以此法弃置的牌的花色与你选择的花色相同,你令你〖秉德〗于此阶段发动的次数上限+1。',
|
||||
twqingtao:'清滔',
|
||||
twqingtao_info:'①摸牌阶段结束时,你可以重铸一张牌。若此牌为【酒】或非基本牌,你摸一张牌。②结束阶段,若你本回合未发动〖清滔①〗,你可以发动〖清滔①〗。',
|
||||
tw_jiangji:'蒋济',
|
||||
tw_jiangji:'TW蒋济',
|
||||
tw_jiangji_prefix:'TW',
|
||||
twjichou:'急筹',
|
||||
twjichou_info:'①每回合限一次。你可以视为使用一张未被〖急筹①〗记录过的普通锦囊牌并记录此牌。②你无法响应或{使用对应实体牌包含你的手牌的}〖急筹①〗记录过的锦囊牌。③出牌阶段限一次。你可将手牌中的一张〖急筹①〗记录过的锦囊牌交给其他角色。',
|
||||
twjilun:'机论',
|
||||
|
@ -14308,7 +14336,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
twxiongzheng_info:'一轮游戏开始时,①若你上一轮发动过〖雄争〗且选择过“雄争”角色,你可以选择一项:1.视为对任意名上一轮内未对“雄争”角色造成过伤害的角色依次使用一张【杀】;2.令任意名上一轮对“雄争”角色造成过伤害的角色摸两张牌。②你可以选择一名未以此法选择过的角色,称为“雄争”角色。',
|
||||
twluannian:'乱年',
|
||||
twluannian_info:'主公技。其他群势力角色的出牌阶段限一次。其可以弃置X张牌并对“雄争”角色造成1点伤害(X为所有角色于本轮发动〖乱年〗的次数+1)。',
|
||||
tw_baoxin:'鲍信',
|
||||
tw_baoxin:'TW鲍信',
|
||||
tw_baoxin_prefix:'TW',
|
||||
twmutao:'募讨',
|
||||
twmutao_info:'出牌阶段限一次。你可以选择一名角色,令其将手牌中所有的【杀】依次交给其下家开始的每一名角色。然后其对最后一名以此法获得【杀】的角色A造成X点伤害(X为A手牌中【杀】的数量且至多为2)。',
|
||||
twyimou:'毅谋',
|
||||
|
@ -14473,7 +14502,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
tw_liuzhang_prefix:'TW',
|
||||
twyaohu:'邀虎',
|
||||
twyaohu_info:'每轮限一次。回合开始时,你须选择场上的一个势力。该势力的角色的出牌阶段开始时,其获得你的一张“生”,然后其须选择一项:1.对你指定的另一名的其他角色使用一张【杀】(无距离限制);2.本回合其使用伤害牌指定你为目标时须交给你两张牌,否则取消此目标。',
|
||||
tw_liwei:'李遗',
|
||||
tw_liwei:'TW李遗',
|
||||
tw_liwei_prefix:'TW',
|
||||
twjiaohua:'教化',
|
||||
twjiaohua_info:'当你或体力值最小的其他角色因摸牌而得到牌后,你可以令该角色从牌堆或弃牌堆中获得一张本次未获得的类别的牌(每种类别每回合限一次)。',
|
||||
tw_yanxiang:'阎象',
|
||||
|
|
|
@ -94,8 +94,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp2_wangzhe:['dc_daxiaoqiao','dc_sp_machao'],
|
||||
sp2_doukou:['re_xinxianying','huaman','xuelingyun','dc_ruiji','duanqiaoxiao','tianshangyi'],
|
||||
sp2_jichu:['zhaoang','dc_liuye','dc_wangyun','yanghong','huanfan','xizheng'],
|
||||
sp2_yuxiu:['dongguiren','dc_tengfanglan','zhangjinyun','zhoubuyi'],
|
||||
sp2_qifu:['ol_guansuo','dc_zhaoxiang','dc_xujing'],
|
||||
sp2_yuxiu:['dongguiren','dc_tengfanglan','zhangjinyun','zhoubuyi','dc_xujing'],
|
||||
sp2_qifu:['ol_guansuo','dc_zhaoxiang'],
|
||||
sp2_gaoshan:['wanglang','liuhui'],
|
||||
sp2_wumiao:['wu_zhugeliang','wu_luxun'],
|
||||
}
|
||||
|
@ -2358,22 +2358,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}).set('choice',(()=>{
|
||||
var choicesx=choices.slice();
|
||||
var cards=player.getCards('hs');
|
||||
var bool1=get.tag(trigger.card,'damage')&&choicesx.contains('选项一')&&trigger.targets.some(current=>{
|
||||
var bool1=get.tag(trigger.card,'damage')&&choicesx.includes('选项一')&&trigger.targets.some(current=>{
|
||||
return get.attitude(player,current)<0;
|
||||
}),bool2=choicesx.contains('选项二')&&game.countPlayer(current=>get.attitude(player,current)>0)>=1;
|
||||
if(!bool1&&!bool2){
|
||||
}),bool2=choicesx.includes('选项二');
|
||||
if(bool2) bool2=game.countPlayer(function(current){
|
||||
return player!=current&&get.attitude(player,current)>0;
|
||||
});
|
||||
else bool2=0;
|
||||
if(bool1||bool2){
|
||||
for(var i=0;i<cards.length;i++){
|
||||
var name=get.name(cards[i]);
|
||||
if(player.getStorage('dcqingshi_clear').contains(name)) continue;
|
||||
if(player.getStorage('dcqingshi_clear').includes(name)) continue;
|
||||
for(var j=i+1;j<cards.length;j++){
|
||||
if(name==get.name(cards[j])&&get.position(cards[i])+get.position(cards[j])!='ss'&&player.hasValueTarget(cards[i])){
|
||||
if(name===get.name(cards[j])&&get.position(cards[i])+get.position(cards[j])!=='ss'&&player.hasValueTarget(cards[i])){
|
||||
choicesx.remove('选项三');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(choicesx.contains('选项三')) return '选项三';
|
||||
if(bool2>2) return '选项二';
|
||||
if(choicesx.includes('选项三')) return '选项三';
|
||||
if(bool2===2) return '选项二';
|
||||
if(bool1) return '选项一';
|
||||
if(bool2) return '选项二';
|
||||
return 'cancel2';
|
||||
|
@ -2486,6 +2492,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
subSkill:{
|
||||
effect:{
|
||||
mod:{
|
||||
aiOrder:function(player,card,num){
|
||||
if(num>0&&get.itemtype(card)==='card'&&card.hasGaintag('dczhizhe')) return num+0.16;
|
||||
},
|
||||
aiValue:function(player,card,num){
|
||||
if(num>0&&get.itemtype(card)==='card'&&card.hasGaintag('dczhizhe')) return 2*num;
|
||||
},
|
||||
aiUseful:function(player,card,num){
|
||||
if(num>0&&!player._dczhizhe_mod&&get.itemtype(card)==='card'&&card.hasGaintag('dczhizhe')){
|
||||
if(player.canIgnoreHandcard(card)) return Infinity;
|
||||
player._dczhizhe_mod=true;
|
||||
if(player.hp<3&&player.needsToDiscard(player.countCards('h',(cardx)=>{
|
||||
if(player.canIgnoreHandcard(cardx)||get.useful(cardx)>6) return true;
|
||||
return false;
|
||||
}))) return num*1.5;
|
||||
return num*10;
|
||||
}
|
||||
}
|
||||
},
|
||||
trigger:{player:['useCardAfter','respondAfter']},
|
||||
charlotte:true,
|
||||
forced:true,
|
||||
|
@ -2778,7 +2803,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
order:1,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(game.roundNumber==1&&ui.cardPile.childNodes.length>game.countPlayer()*5&&!game.hasPlayer(current=>current.hp<=2)&&!player.hasSkill('dcjijiao_risutoa')) return 0;
|
||||
if(ui.cardPile.childNodes.length>game.players.length*5&&!player.hasSkill('dcjijiao_risutoa')&&
|
||||
!game.hasPlayer(current=>current.hp<=1)&&game.countPlayer(current=>current.hp===2&¤t.countCards('hes')<3)<=1) return 0;
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
@ -3028,8 +3054,43 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},true);
|
||||
},
|
||||
ai:{
|
||||
order:5.5,
|
||||
result:{player:1}
|
||||
order:function(){
|
||||
return 0.9*get.order({name:'juedou'});
|
||||
},
|
||||
tag:{
|
||||
respond:2,
|
||||
respondSha:2,
|
||||
damage:1,
|
||||
},
|
||||
result:{
|
||||
player:function(player){
|
||||
let target=null, maxval=0;
|
||||
for(let i of game.players){
|
||||
let jdeff=get.effect(i,{
|
||||
name:'juedou',
|
||||
isCard:true,
|
||||
cards:ui.selected.cards,
|
||||
storage:{dcctjiuxian:true}
|
||||
},player,player);
|
||||
if(i===player||!player.canUse({
|
||||
name:'juedou',
|
||||
isCard:true,
|
||||
cards:ui.selected.cards,
|
||||
storage:{dcctjiuxian:true}
|
||||
},i)||jdeff<0) continue;
|
||||
let receff=0;
|
||||
game.filterPlayer(function(current){
|
||||
if(player!=current&&i.inRange(current)&¤t.isDamaged()) receff=Math.max(receff,get.recoverEffect(current,i,i));
|
||||
});
|
||||
if(jdeff+receff/5>maxval){
|
||||
target=i;
|
||||
maxval=jdeff+receff/5;
|
||||
}
|
||||
}
|
||||
if(target) return maxval/80;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
subSkill:{
|
||||
help:{
|
||||
|
@ -3609,6 +3670,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.logSkill('dcyuandi',target);
|
||||
if(result.control=='选项一'){
|
||||
player.discardPlayerCard(target,'h',true);
|
||||
if(get.mode()!=='identity'||player.identity!=='nei') player.addExpose(0.15);
|
||||
}
|
||||
else game.asyncDraw([target,player]);
|
||||
}
|
||||
|
@ -3863,6 +3925,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
dcaichen:{
|
||||
audio:2,
|
||||
init:function(player){
|
||||
game.addGlobalSkill('dcaichen_hit');
|
||||
},
|
||||
onremove:function(player){
|
||||
game.removeGlobalSkill('dcaichen_hit');
|
||||
},
|
||||
trigger:{
|
||||
player:['loseAfter','phaseDiscardBefore'],
|
||||
global:'loseAsyncAfter',
|
||||
|
@ -3886,6 +3954,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger.directHit.add(player);
|
||||
game.log(player,'不可响应',trigger.card);
|
||||
}
|
||||
},
|
||||
subSkill:{
|
||||
hit:{
|
||||
trigger:{player:'dieAfter'},
|
||||
filter:function(event,player){
|
||||
return !game.hasPlayer(current=>current.hasSkill('dcaichen'));
|
||||
},
|
||||
silent:true,
|
||||
forceDie:true,
|
||||
content:function(){
|
||||
game.removeGlobalSkill('dcaichen_hit');
|
||||
},
|
||||
ai:{
|
||||
directHit_ai:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
return arg&&arg.card&&arg.target&&arg.target.hasSkill('dcaichen')&&ui.cardPile.childNodes.length<40&&get.suit(arg.card)==='spade';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//杨彪
|
||||
|
@ -4348,7 +4435,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(cards.length){
|
||||
player.chooseButton(['暗织:选择令'+get.translation(target)+'获得的牌',cards],true,Math.min(cards.length,2)).set('ai',button=>{
|
||||
var player=_status.event.player,target=_status.event.getParent().target;
|
||||
return get.sgnAttitude(player,target)*get.buttonValue(button);
|
||||
return get.sgnAttitude(player,target)*get.value(button.link,target);
|
||||
});
|
||||
}
|
||||
}else event.finish();
|
||||
|
@ -4498,11 +4585,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
//周宣
|
||||
dcwumei:{
|
||||
audio:2,
|
||||
trigger:{player:'phaseBegin'},
|
||||
trigger:{player:'phaseBeginStart'},
|
||||
filter:function(event,player){
|
||||
return !player.hasSkill('dcwumei_used');
|
||||
},
|
||||
priority:10,//离谱的优先机制
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -4529,17 +4615,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger._triggered=5;
|
||||
var evt=player.insertPhase();
|
||||
delete evt.skill;
|
||||
game.broadcastAll(function(player){
|
||||
player.classList.remove('glow_phase');
|
||||
delete _status.currentPhase;
|
||||
},player);
|
||||
}
|
||||
}
|
||||
},
|
||||
subSkill:{
|
||||
used:{charlotte:true},
|
||||
wake:{
|
||||
init:function(player){
|
||||
game.addGlobalSkill('dcwumei_all');
|
||||
},
|
||||
onremove:function(player){
|
||||
game.removeGlobalSkill('dcwumei_all');
|
||||
delete player.storage.dcwumei_wake;
|
||||
},
|
||||
trigger:{player:'phaseJieshuBegin'},
|
||||
charlotte:true,
|
||||
popup:false,
|
||||
forced:true,
|
||||
onremove:true,
|
||||
filter:function(event,player){
|
||||
return player.storage.dcwumei_wake&&player.storage.dcwumei_wake.length;
|
||||
},
|
||||
|
@ -4572,17 +4668,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
},
|
||||
all:{
|
||||
trigger:{player:'dieAfter'},
|
||||
filter:function(event,player){
|
||||
return !game.hasPlayer(current=>current.hasSkill('dcwumei_wake'));
|
||||
},
|
||||
silent:true,
|
||||
forceDie:true,
|
||||
content:function(){
|
||||
game.removeGlobalSkill('dcwumei_all');
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
player_use:function(card,player,target){
|
||||
if(get.tag(card,'recover')&&target.hp>0) return 0;
|
||||
if(get.tag(card,'damage')) return 0.5;
|
||||
},
|
||||
target:function(card,player,target){
|
||||
if(_status.event.type!='phase') return;
|
||||
if (get.tag(card,'recover')){
|
||||
return [1,1-target.hp];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7722,6 +7824,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
onremove:true,
|
||||
subSkill:{
|
||||
insert:{
|
||||
mark:true,
|
||||
intro:{
|
||||
content:'players'
|
||||
},
|
||||
trigger:{global:'phaseAfter'},
|
||||
forced:true,
|
||||
charlotte:true,
|
||||
|
@ -10447,6 +10553,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
player.draw(2+get.sgn(trigger.player.hp-player.hp));
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.itemtype(player)!=='player'||player===target) return 1;
|
||||
let num=1,ds=2+get.sgn(player.hp-target.hp);
|
||||
if(player===_status.currentPhase&&_status.currentPhase.group==='qun'&&target.hasZhuSkill('yuwei',player)) num=2;
|
||||
if(target.getHistory('gain',function(evt){
|
||||
return evt.getParent(2).name==='shiyuan'&&evt.cards.length===ds;
|
||||
}).length>=num) return 1;
|
||||
let name=get.name(card);
|
||||
if(get.tag(card,'lose')||name==='huogong'||name==='juedou'||name==='tiesuo') return [1,ds];
|
||||
if(!target.hasFriend()) return 1;
|
||||
return [1,0.8*ds];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
dushi:{
|
||||
audio:2,
|
||||
|
@ -10986,7 +11108,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return true;
|
||||
},
|
||||
viewAs:{name:'nanman'},
|
||||
ai:{order:0.1},
|
||||
ai:{
|
||||
order:0.1,
|
||||
nokeep:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(tag==='nokeep') return (!arg||arg.card&&get.name(arg.card)==='tao')&&player.isPhaseUsing()&&!player.getStat('skill').mansi_viewas&&player.hasCard((card)=>get.name(card)!=='tao','h');
|
||||
}
|
||||
},
|
||||
},
|
||||
souying:{
|
||||
audio:2,
|
||||
|
|
|
@ -2420,13 +2420,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var player=_status.event.player;
|
||||
var target=_status.event.target;
|
||||
var controls=_status.event.controls.slice();
|
||||
controls.sort(function(a,b){
|
||||
return [
|
||||
get.effect(target,{name:'wuzhong'},player,player)/2,
|
||||
get.effect(target,{name:'guohe_copy2'},player,player),
|
||||
get.effect(target,{name:'kaihua'},player,player),
|
||||
][['摸牌','弃牌','制衡'].indexOf(b)-['摸牌','弃牌','制衡'].indexOf(a)];
|
||||
});
|
||||
var map={
|
||||
'摸牌':get.effect(target,{name:'wuzhong'},player,player)/2,
|
||||
'弃牌':get.effect(target,{name:'guohe_copy2'},player,player),
|
||||
'制衡':get.effect(target,{name:'kaihua'},player,player),
|
||||
};
|
||||
controls.sort((a,b)=>map[b]-map[a]);
|
||||
return controls[0];
|
||||
}).set('target',target);
|
||||
}
|
||||
|
@ -2509,10 +2508,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ol_guansuo:'dangxian_guansuo',
|
||||
},
|
||||
content:function(){
|
||||
var next=player.phaseUse();
|
||||
next.xindangxian=true;
|
||||
event.next.remove(next);
|
||||
trigger.next.push(next);
|
||||
trigger.phaseList.splice(trigger.num,0,'phaseUse|xindangxian');
|
||||
},
|
||||
group:'xindangxian_rewrite',
|
||||
subSkill:{
|
||||
|
@ -2521,7 +2517,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
forced:true,
|
||||
popup:false,
|
||||
filter:function(kagari){
|
||||
return kagari.xindangxian==true;
|
||||
return kagari._extraPhaseReason=='xindangxian';
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -7665,9 +7661,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
audioname:['guansuo'],
|
||||
content:function(){
|
||||
var next=player.phaseUse();
|
||||
event.next.remove(next);
|
||||
trigger.next.push(next);
|
||||
trigger.phaseList.splice(trigger.num,0,'phaseUse|dangxian');
|
||||
}
|
||||
},
|
||||
longyin:{
|
||||
|
@ -8484,6 +8478,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(target.countCards('h','sha')>1) return 'zeroplayertarget';
|
||||
}
|
||||
}
|
||||
},
|
||||
nokeep:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(tag==='nokeep') return (!arg||arg.card&&get.name(arg.card)==='tao')&&player.isPhaseUsing()&&player.countSkill('zhanjue_draw')<2&&player.hasCard((card)=>get.name(card)!='tao','h');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -10585,6 +10583,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
if(get.mode()!=='identity'||player.identity!=='nei') player.addExpose(0.2);
|
||||
player.draw(2);
|
||||
"step 1"
|
||||
player.chooseCard(2,'he',true,'交给'+get.translation(trigger.player)+'两张牌').set('ai',function(card){
|
||||
|
@ -10599,8 +10598,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger.player.storage.xiantu4.push(player);
|
||||
},
|
||||
ai:{
|
||||
threaten:1.1,
|
||||
expose:0.3
|
||||
threaten:1.1
|
||||
}
|
||||
},
|
||||
xiantu1:{audio:true},
|
||||
|
@ -12567,13 +12565,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
usable:1,
|
||||
audio:'qice_backup',
|
||||
filter:function(event,player){
|
||||
var hs=player.getCards('h');
|
||||
const hs=player.getCards('h');
|
||||
if(!hs.length) return false;
|
||||
for(var i=0;i<hs.length;i++){
|
||||
var mod2=game.checkMod(hs[i],player,'unchanged','cardEnabled2',player);
|
||||
if(mod2===false) return false;
|
||||
}
|
||||
return true;
|
||||
if(hs.some(card=>{
|
||||
const mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player);
|
||||
return (mod2===false)
|
||||
})) return false;
|
||||
return lib.inpile.some(name=>{
|
||||
if(get.type(name)!='trick') return false;
|
||||
const card=get.autoViewAs({name},hs);
|
||||
return event.filterCard(card,player,event);
|
||||
});
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(player){
|
||||
|
@ -12584,7 +12586,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return ui.create.dialog(get.translation('qice'),[list,'vcard']);
|
||||
},
|
||||
filter:function(button,player){
|
||||
return lib.filter.filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||
const event=_status.event.getParent(),card=get.autoViewAs({
|
||||
name:button.link[2],
|
||||
},player.getCards('h'));
|
||||
return event.filterCard(card,player,event);
|
||||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
|
@ -12655,6 +12660,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return 12-num;
|
||||
}
|
||||
},
|
||||
nokeep:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
if(tag==='nokeep') return (!arg||arg.card&&get.name(arg.card)==='tao')&&player.isPhaseUsing()&&!player.getStat('skill').qice&&player.hasCard((card)=>get.name(card)!='tao','h');
|
||||
},
|
||||
threaten:1.6,
|
||||
}
|
||||
},
|
||||
|
@ -12793,7 +12802,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return true;//player.countCards('h')>player.maxHp;
|
||||
return player.countCards('h')>player.maxHp;
|
||||
},
|
||||
usable:1,
|
||||
content:function(){
|
||||
|
@ -14499,7 +14508,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
olddanshou_info:'当你造成伤害后,你可以摸一张牌。若如此做,终止一切结算,当前回合结束。',
|
||||
xindanshou_info:'①每回合限一次,当你成为基本牌或锦囊牌的目标后,你可以摸X张牌(X为你本回合内成为过基本牌或锦囊牌的目标的次数)。②一名其他角色的结束阶段,若你本回合内没有发动过〖胆守①〗,则你可以弃置X张牌并对其造成1点伤害(X为其手牌数,无牌则不弃)。',
|
||||
yizhong_info:'锁定技,当你的防具栏为空时,黑色的【杀】对你无效',
|
||||
xinzhan_info:'出牌阶段限一次,你可以观看牌堆顶的3张牌,然后展示其中任意数量♥的牌并获得之。',
|
||||
xinzhan_info:'出牌阶段限一次,若你的手牌数大于你的体力上限,你可以观看牌堆顶的三张牌,然后展示其中任意红桃牌并获得之。',
|
||||
huilei_info:'锁定技,当你死亡时,杀死你的角色弃置所有的牌。',
|
||||
enyuan_info:'锁定技。①当其他角色令你回复1点体力后,该角色摸一张牌。②当其他角色对你造成伤害后,其须交给你一张♥手牌,否则失去1点体力。',
|
||||
xuanhuo_info:'出牌阶段限一次,你可以将一张红桃手牌交给一名其他角色,获得该角色的一张牌,然后交给除该角色外的一名其他角色',
|
||||
|
|
|
@ -2592,10 +2592,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return player!=event.player&&event.num<event.player.hp;
|
||||
},
|
||||
check:function(event,player){
|
||||
if(get.attitude(player,event.player)>-2) return false;
|
||||
if(player.hp>2) return true;
|
||||
if(player.hp==2&&event.player.hp<3) return false;
|
||||
return player.hp>1;
|
||||
if(event.player.hasSkillTag('nodamage')) return false;
|
||||
let tj = player.countCards('hs', function (card) {
|
||||
return get.name(card) === 'tao' || get.name(card) === 'jiu';
|
||||
}),
|
||||
att = get.attitude(_status.event.player, event.player),
|
||||
eff = get.damageEffect(event.player, player, _status.event.player, event.nature),
|
||||
fd = event.player.hasSkillTag('filterDamage', null, {
|
||||
player: player,
|
||||
card: event.card
|
||||
}),
|
||||
hp = player.hp + tj;
|
||||
if(player.storage.tairan2) hp -= player.storage.tairan2;
|
||||
if(eff <= 0 || fd || att >= -2 || Math.abs(hp) <= 1) return false;
|
||||
if(hp > 2 || event.player.isLinked() && event.nature && eff > 0) return true;
|
||||
return !event.player.countCards('hs') || event.player.hp > 2 * event.num && !event.player.hasSkillTag('maixie');
|
||||
},
|
||||
logTarget:'player',
|
||||
content:function(){
|
||||
|
@ -2604,6 +2615,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger.yimie_num=trigger.player.hp-trigger.num;
|
||||
trigger.num=trigger.player.hp;
|
||||
},
|
||||
ai:{
|
||||
damageBonus:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
return arg && arg.target && arg.target.hp > 1 && player.hp > 1 && get.attitude(player, arg.target) < -2;
|
||||
}
|
||||
}
|
||||
},
|
||||
yimie2:{
|
||||
trigger:{player:'damageEnd'},
|
||||
|
|
184
character/yxs.js
184
character/yxs.js
|
@ -92,40 +92,39 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
yxs_meixi:'妺喜,姓嬉(喜),生卒年不详,亦作妺嬉、末喜、末嬉,有施氏之女,夏朝最后一位君主夏桀的王后。根据先秦时代记述女子名时所用的全称和简称方式,妺喜应姓喜,即嬉(也作僖)。由于其名字的“妺”字与“妹妹”的“妹”字字形相似,且在《庄子》等作中也有以妺为妹的用法,因此常误作"妹喜"。',
|
||||
yxs_lanlinwang:'高长恭(541年―573年),又名高孝瓘、高肃,祖籍渤海调蓨(今河北省景县),神武帝高欢之孙,文襄帝高澄第四子,生母不详,南北朝时期北齐宗室、将领,封爵兰陵郡王。高长恭貌柔心壮,音容兼美。为将躬勤细事,每得甘美,虽一瓜数果,必与将士分享。累次升任至并州刺史。突厥攻入晋阳,高长恭奋力将其击退。邙山之战,高长恭为中军,率领五百骑兵再入周军包围圈,直至金墉城下,因高长恭戴着头盔,城中的人不确定是敌军或是我军,直到高长恭把头盔脱下来城上的人才知道是高长恭,派弓箭手开始放箭保护他,之后高长恭成功替金墉解围,高长恭在此次战中威名大振,士兵们为此战而讴歌他,即后来知名的《兰陵王入阵曲》。',
|
||||
},
|
||||
characterTitle:{
|
||||
"yxs_qinqiong":"Sukincen",
|
||||
},
|
||||
characterTitle:{
|
||||
yxs_qinqiong:"Sukincen",
|
||||
},
|
||||
skill:{
|
||||
yxs_fanji:{
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:"damageEnd",
|
||||
},
|
||||
direct:true,
|
||||
priority:12,
|
||||
filter:function (event,player){
|
||||
if(!player.countCards('h',{name:'sha'})) return false;
|
||||
return event.card&&(event.card.name=='sha'||event.card.name=='juedou');
|
||||
},
|
||||
content:function (){
|
||||
player.addTempSkill('yxs_fanji2','shaAfter');
|
||||
player.chooseToUse({name:'sha'},trigger.source,'反击:是否对'+get.translation(trigger.source)+'使用一张杀?').logSkill='yxs_fanji';
|
||||
},
|
||||
},
|
||||
yxs_fanji2:{
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:"shaBegin",
|
||||
},
|
||||
direct:true,
|
||||
filter:function (event,player){
|
||||
return event.card&&event.card.name=='sha'&&get.color(event.card)=='red';
|
||||
},
|
||||
content:function (){
|
||||
trigger.directHit=true;
|
||||
},
|
||||
},
|
||||
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:"damageEnd",
|
||||
},
|
||||
direct:true,
|
||||
priority:12,
|
||||
filter:function (event,player){
|
||||
if(!player.countCards('h',{name:'sha'})) return false;
|
||||
return event.card&&(event.card.name=='sha'||event.card.name=='juedou');
|
||||
},
|
||||
content:function(){
|
||||
player.addTempSkill('yxs_fanji2','shaAfter');
|
||||
player.chooseToUse({name:'sha'},trigger.source,'反击:是否对'+get.translation(trigger.source)+'使用一张杀?').logSkill='yxs_fanji';
|
||||
},
|
||||
},
|
||||
yxs_fanji2:{
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:"shaBegin",
|
||||
},
|
||||
direct:true,
|
||||
filter:function (event,player){
|
||||
return event.card&&event.card.name=='sha'&&get.color(event.card)=='red';
|
||||
},
|
||||
content:function (){
|
||||
trigger.directHit=true;
|
||||
},
|
||||
},
|
||||
yxs_menshen3:{
|
||||
trigger:{
|
||||
player:['phaseBegin','dieBegin'],
|
||||
|
@ -133,78 +132,75 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
silent:true,
|
||||
filter:function(event,player){
|
||||
return game.hasPlayer(function(current){
|
||||
return current.hasSkill('yxs_menshen2');
|
||||
});
|
||||
return current.hasSkill('yxs_menshen2');
|
||||
});
|
||||
},
|
||||
content:function(){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].hasSkill('yxs_menshen2')){
|
||||
game.players[i].removeSkill('yxs_menshen2');
|
||||
}
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].hasSkill('yxs_menshen2')){
|
||||
game.players[i].removeSkill('yxs_menshen2');
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
yxs_menshen:{
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:"phaseEnd",
|
||||
},
|
||||
priority:15,
|
||||
group:'yxs_menshen3',
|
||||
onremove:true,
|
||||
filter:function (event,player){
|
||||
return game.players.length>1;
|
||||
},
|
||||
content:function (){
|
||||
"step 0"
|
||||
player.chooseTarget('选择【门神】的目标',lib.translate.yxs_menshen_info,true,function(card,player,target){
|
||||
return target!=player;
|
||||
}).set('ai',function(target){
|
||||
return get.attitude(player,target);
|
||||
});
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
},
|
||||
yxs_menshen:{
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:"phaseEnd",
|
||||
},
|
||||
priority:15,
|
||||
group:'yxs_menshen3',
|
||||
onremove:true,
|
||||
filter:function (event,player){
|
||||
return game.players.length>1;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
player.chooseTarget('选择【门神】的目标',lib.translate.yxs_menshen_info,true,function(card,player,target){
|
||||
return target!=player;
|
||||
}).set('ai',function(target){
|
||||
return get.attitude(player,target);
|
||||
});
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.line(target,'green');
|
||||
game.log(target,'成为了','【门神】','的目标');
|
||||
target.storage.yxs_menshen2=player;
|
||||
target.addSkill('yxs_menshen2');
|
||||
}
|
||||
else {
|
||||
event.finish();
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
expose:0.5,
|
||||
},
|
||||
},
|
||||
|
||||
yxs_menshen2:{
|
||||
audio:2,
|
||||
mark:'character',
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
expose:0.5,
|
||||
},
|
||||
},
|
||||
yxs_menshen2:{
|
||||
audio:2,
|
||||
mark:'character',
|
||||
intro:{
|
||||
content:'当你成为【杀】或【决斗】的目标后,改为$成为目标'
|
||||
},
|
||||
nopop:true,
|
||||
priority:15,
|
||||
trigger:{
|
||||
target:["shaBegin","juedouBegin"],
|
||||
},
|
||||
forced:true,
|
||||
priority:15,
|
||||
trigger:{
|
||||
target:["shaBegin","juedouBegin"],
|
||||
},
|
||||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
return player.isAlive();
|
||||
},
|
||||
content:function (){
|
||||
var target=player.storage.yxs_menshen2;
|
||||
trigger.player.line(target,'green');
|
||||
trigger.targets.remove(player);
|
||||
trigger.targets.push(target);
|
||||
trigger.target = target;
|
||||
},
|
||||
},
|
||||
|
||||
content:function (){
|
||||
var target=player.storage.yxs_menshen2;
|
||||
trigger.player.line(target,'green');
|
||||
trigger.targets.remove(player);
|
||||
trigger.targets.push(target);
|
||||
trigger.target = target;
|
||||
},
|
||||
},
|
||||
guimian:{
|
||||
trigger:{source:'damageEnd'},
|
||||
forced:true,
|
||||
|
@ -2938,12 +2934,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
yxs_qinqiong:"秦琼",
|
||||
|
||||
yxs_fanji:"反击",
|
||||
yxs_fanji2:"反击",
|
||||
yxs_fanji_info:"当你受到【杀】或【决斗】造成的伤害后,你可以对伤害来源使用一张【杀】。若此【杀】为红色,其不可闪避",
|
||||
yxs_menshen:"门神",
|
||||
yxs_menshen2:"门神",
|
||||
yxs_menshen3:"门神",
|
||||
yxs_menshen_info:"回合结束阶段,你可选择一名其他角色,若如此做,直到你的下回合开始,所有角色对该角色使用的【杀】或【决斗】均视为对你使用",
|
||||
yxs_fanji2:"反击",
|
||||
yxs_fanji_info:"当你受到【杀】或【决斗】造成的伤害后,你可以对伤害来源使用一张【杀】。若此【杀】为红色,其不可闪避",
|
||||
yxs_menshen:"门神",
|
||||
yxs_menshen2:"门神",
|
||||
yxs_menshen3:"门神",
|
||||
yxs_menshen_info:"回合结束阶段,你可选择一名其他角色,若如此做,直到你的下回合开始,所有角色对该角色使用的【杀】或【决斗】均视为对你使用",
|
||||
zhuxin:'诛心',
|
||||
zhuxin_info:'出牌阶段限一次,你可以与一名其他角色拼点,若你赢,你对其造成一点伤害',
|
||||
wlianhuan:'连环',
|
||||
|
|
928
game/game.js
928
game/game.js
File diff suppressed because it is too large
Load Diff
|
@ -41586,7 +41586,7 @@ var pinyin_dict_withtone = "yī,dīng zhēng,kǎo qiǎo yú,qī,shàng,xià,hǎn
|
|||
temp = '';
|
||||
for (var j = 0; j < max && (i + j) < chinese.length; j++) {
|
||||
if (!dict.withtone[chinese[i]]) {
|
||||
i+=(result[i].length-1);
|
||||
i+=(result[m].length-1);
|
||||
break;
|
||||
} // 如果碰到非汉字直接停止本次查找
|
||||
temp += chinese[i + j];
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 97 KiB |
Binary file not shown.
After Width: | Height: | Size: 91 KiB |
|
@ -12950,7 +12950,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
_mingzhi1:{
|
||||
trigger:{player:'phaseBeginStart'},
|
||||
priority:19,
|
||||
//priority:19,
|
||||
ruleSkill:true,
|
||||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
|
@ -14036,6 +14037,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
game.broadcastAll(function(){
|
||||
ui.arena.classList.add('choose-character');
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].classList.add('unseen');
|
||||
game.players[i].classList.add('unseen2');
|
||||
}
|
||||
});
|
||||
var list=[];
|
||||
for(var i in lib.characterPack.mode_guozhan){
|
||||
|
@ -14207,59 +14212,15 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
'step 2'
|
||||
if(!result) result={};
|
||||
var result2=event.result2;
|
||||
for(var i in result){
|
||||
if(result[i]&&result[i].links) result[i]=result[i].links[0][2].slice(6);
|
||||
else if(result[i]=='ai') result[i]=function(){
|
||||
var player=lib.playerOL[i];
|
||||
var name1=result2[i][0],name2=result2[i][1];
|
||||
if(get.is.double(name1,true)) return get.is.double(name2,true).filter(group=>get.is.double(name1,true).contains(group)).randomGet();
|
||||
if(lib.character[name1][1]=='ye') return get.is.double(name2,true).randomGet();
|
||||
}();
|
||||
}
|
||||
game.broadcast(function(result,result2){
|
||||
for(var i in result){
|
||||
if(!lib.playerOL[i].name){
|
||||
lib.playerOL[i].init(result[i][0],result[i][1],false);
|
||||
}
|
||||
if(result2[i]&&result2[i].length) lib.playerOL[i].trueIdentity=result2[i];
|
||||
}
|
||||
setTimeout(function(){
|
||||
ui.arena.classList.remove('choose-character');
|
||||
},500);
|
||||
},result2,result);
|
||||
for(var i in result2){
|
||||
if(!lib.playerOL[i].name){
|
||||
lib.playerOL[i].init(result2[i][0],result2[i][1],false);
|
||||
}
|
||||
if(result[i]&&result[i].length) lib.playerOL[i].trueIdentity=result[i];
|
||||
}
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
_status.characterlist.remove(game.players[i].name);
|
||||
_status.characterlist.remove(game.players[i].name2);
|
||||
game.players[i].hiddenSkills=lib.character[game.players[i].name1][3].slice(0);
|
||||
var hiddenSkills2=lib.character[game.players[i].name2][3];
|
||||
for(var j=0;j<hiddenSkills2.length;j++){
|
||||
game.players[i].hiddenSkills.add(hiddenSkills2[j]);
|
||||
}
|
||||
for(var j=0;j<game.players[i].hiddenSkills.length;j++){
|
||||
if(!lib.skill[game.players[i].hiddenSkills[j]]){
|
||||
game.players[i].hiddenSkills.splice(j--,1);
|
||||
}
|
||||
}
|
||||
for(var j=0;j<game.players[i].hiddenSkills.length;j++){
|
||||
game.players[i].name1=game.players[i].name;
|
||||
game.players[i].addSkillTrigger(game.players[i].hiddenSkills[j],true);
|
||||
}
|
||||
}
|
||||
game.broadcastAll(function(result){
|
||||
for(var i in result){
|
||||
if(!lib.playerOL[i].name){
|
||||
lib.playerOL[i].init(result[i][0],result[i][1],false);
|
||||
}
|
||||
}
|
||||
game.broadcastAll(function(result,result2){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].classList.add('unseen');
|
||||
game.players[i].classList.add('unseen2');
|
||||
var current=game.players[i],id=current.playerid;
|
||||
if(result[id]&&!current.name){
|
||||
current.init(result[id][0],result[id][1],false);
|
||||
}
|
||||
if(result2[id]&&result2[id].length){
|
||||
current.trueIdentity=result2[id][0][2].slice(6);
|
||||
}
|
||||
if(game.players[i]!=game.me){
|
||||
game.players[i].node.identity.firstChild.innerHTML='猜';
|
||||
game.players[i].node.identity.dataset.color='unknown';
|
||||
|
@ -14286,7 +14247,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
setTimeout(function(){
|
||||
ui.arena.classList.remove('choose-character');
|
||||
},500);
|
||||
},result2);
|
||||
},result2,result);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -753,7 +753,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
player.init(result.links[0]);
|
||||
player.hp++;
|
||||
player.maxHp++;
|
||||
player.update();
|
||||
player.$update();
|
||||
}
|
||||
});
|
||||
"step 5"
|
||||
|
@ -1441,7 +1441,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
return list2.randomGets(num).sort(lib.sort.character);
|
||||
}
|
||||
var getGroup=function(name){
|
||||
if(lib.characterReplace[name]) return lib.character[lib.characterReplace[name][0]][1];
|
||||
var characterReplace = lib.characterReplace[name];
|
||||
if(characterReplace && characterReplace[0] && lib.character[characterReplace[0]]) return lib.character[characterReplace[0]][1];
|
||||
return lib.character[name][1];
|
||||
}
|
||||
var list2x=list2.slice(0);
|
||||
|
@ -1852,6 +1853,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
zhu.identityShown=true;
|
||||
zhu.identity=zhuid;
|
||||
if(zhuid=='zhu') zhu.isZhu=true;
|
||||
zhu.setIdentity();
|
||||
zhu.node.identity.classList.remove('guessing');
|
||||
me.setIdentity(identity);
|
||||
|
@ -1950,14 +1952,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var next=game.zhu.chooseButton(true);
|
||||
next.set('selectButton',(lib.configOL.double_character?2:1));
|
||||
next.set('createDialog',['选择角色',[list,'characterx']]);
|
||||
next.set('callback',function(player,result){
|
||||
player.init(result.links[0],result.links[1]);
|
||||
});
|
||||
next.set('ai',function(button){
|
||||
return Math.random();
|
||||
});
|
||||
"step 1"
|
||||
if(game.me!=game.zhu){
|
||||
if(!game.zhu.name){
|
||||
game.zhu.init(result.links[0],result.links[1])
|
||||
}
|
||||
event.list.remove(get.sourceCharacter(game.zhu.name1));
|
||||
|
@ -1971,7 +1970,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
game.zhu.update();
|
||||
}
|
||||
game.broadcast(function(zhu,name,name2,addMaxHp){
|
||||
if(game.zhu!=game.me){
|
||||
if(!zhu.name){
|
||||
zhu.init(name,name2);
|
||||
}
|
||||
if(addMaxHp){
|
||||
|
|
Loading…
Reference in New Issue