Guanxing
|
@ -327,8 +327,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
return (lib.filter.judge(card,player,target)&&player!=target);
|
||||
},
|
||||
judge:function(card){
|
||||
if(get.suit(card)=='club') return 0;
|
||||
return -3;
|
||||
if(get.suit(card)=='club') return 1;
|
||||
return -2;
|
||||
},
|
||||
judge2:function(result){
|
||||
if(result.bool==false) return true;
|
||||
|
|
|
@ -523,7 +523,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
ai:{
|
||||
canLink:function(player,target,card){
|
||||
if(player.hasSkill('jueqing')||target.hasSkill('gangzhi')||target.hasSkill('gangzhi')) return false;
|
||||
if(!target.isLinked()||player.hasSkill('jueqing')||target.hasSkill('gangzhi')||target.hasSkill('gangzhi')) return false;
|
||||
var es=target.countCards('e');
|
||||
if(!es) return true;
|
||||
if(target.hp>=3&&es>=2){
|
||||
|
|
|
@ -1709,8 +1709,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
return (lib.filter.judge(card,player,target)&&player!=target);
|
||||
},
|
||||
judge:function(card){
|
||||
if(get.suit(card)=='heart') return 0;
|
||||
return -3;
|
||||
if(get.suit(card)=='heart') return 1;
|
||||
return -2;
|
||||
},
|
||||
judge2:function(result){
|
||||
if(result.bool==false) return true;
|
||||
|
@ -1759,8 +1759,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
selectTarget:[-1,-1],
|
||||
judge:function(card){
|
||||
if(get.suit(card)=='spade'&&get.number(card)>1&&get.number(card)<10) return -6;
|
||||
return 0;
|
||||
if(get.suit(card)=='spade'&&get.number(card)>1&&get.number(card)<10) return -5;
|
||||
return 1;
|
||||
},
|
||||
judge2:function(result){
|
||||
if(result.bool==false) return true;
|
||||
|
|
|
@ -165,7 +165,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
old_jiakui:['male','wei',4,['tongqu','xinwanlan']],
|
||||
ol_guohuai:['male','wei',3,['rejingce']],
|
||||
junk_zhangrang:['male','qun',3,['junktaoluan']],
|
||||
junk_simayi:['male','jin',3,['buchen','smyyingshi','xiongzhi','xinquanbian'],['hiddenSkill']],
|
||||
},
|
||||
characterFilter:{
|
||||
key_jojiro:function(mode){
|
||||
|
@ -198,7 +197,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
diy_default:["diy_feishi","diy_liuyan","diy_yuji","diy_caiwenji","diy_lukang","diy_zhenji","diy_liufu","diy_xizhenxihong","diy_liuzan","diy_zaozhirenjun","diy_yangyi","diy_tianyu"],
|
||||
diy_noname:['noname'],
|
||||
diy_key:["key_lucia","key_kyousuke","key_yuri","key_haruko","key_umi","key_rei","key_komari","key_yukine","key_yusa","key_misa","key_masato","key_iwasawa","key_kengo","key_yoshino","key_yui","key_tsumugi","key_saya","key_harukakanata","key_inari","key_shiina","key_sunohara","key_rin","key_sasami","key_akane","key_doruji","key_yuiko","key_riki","key_hisako","key_hinata","key_noda","key_tomoya","key_nagisa","key_ayato","key_ao","key_yuzuru","sp_key_kanade","key_mio","key_midori","key_kyoko","key_shizuru","key_shiorimiyuki","key_miki","key_shiori","key_kaori","sp_key_yuri","key_akiko","key_abyusa","key_godan","key_yuu","key_ryoichi","key_kotori","key_jojiro","key_shiroha","key_shizuku","key_hiroto","key_sakuya","key_youta","key_rumi","key_chihaya","key_yukito","key_asara","key_kotomi","key_mia","key_kano"],
|
||||
diy_trashbin:['old_jiakui','ol_guohuai','junk_zhangrang','junk_simayi'],
|
||||
diy_trashbin:['old_jiakui','ol_guohuai','junk_zhangrang'],
|
||||
},
|
||||
},
|
||||
characterIntro:{
|
||||
|
@ -3042,77 +3041,30 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
event.num=game.countGroup();
|
||||
player.markAuto('shiroha_yuzhao',game.cardsGotoSpecial(get.cards(event.num)).cards);
|
||||
if(window.decadeUI&&!_status.connectMode) event.goto(3);
|
||||
'step 1'
|
||||
player.chooseButton(['将'+get.cnNumber(num)+'张牌置于牌堆顶(先选择的在上)',player.getStorage('shiroha_yuzhao')],true,num).set('ai',function(button){
|
||||
var player=_status.event.player;
|
||||
var next=_status.event.getTrigger().player;
|
||||
var att=get.attitude(player,next);
|
||||
var card=button.link;
|
||||
var judge=next.getCards('j')[ui.selected.buttons.length];
|
||||
if(judge){
|
||||
return get.judge(judge)(card)*att;
|
||||
}
|
||||
return get.value(card)*att;
|
||||
var next=player.chooseToMove(),num=game.countGroup();
|
||||
next.set('prompt','预兆:将'+get.cnNumber(num)+'张牌置于牌堆顶');
|
||||
next.set('num',num);
|
||||
next.set('forced',true);
|
||||
next.set('filterOk',function(moved){
|
||||
return moved[1].length==_status.event.num;
|
||||
});
|
||||
next.set('filterMove',function(from,to,moved){
|
||||
if(to!=1) return true;
|
||||
return moved[1].length<_status.event.num;
|
||||
});
|
||||
next.set('list',[
|
||||
[get.translation(player)+'(你)的“兆”',player.storage.shiroha_yuzhao],
|
||||
['牌堆顶'],
|
||||
]);
|
||||
next.set('processAI',function(list){
|
||||
var cards=list[0][1],cards2=cards.randomRemove(_status.event.num);
|
||||
return [cards,cards2];
|
||||
});
|
||||
'step 2'
|
||||
player.unmarkAuto('shiroha_yuzhao',result.links);
|
||||
while(result.links.length){
|
||||
ui.cardPile.insertBefore(result.links.pop().fix(),ui.cardPile.firstChild);
|
||||
}
|
||||
game.updateRoundNumber();
|
||||
event.finish();
|
||||
'step 3'
|
||||
'短鸽自己八成不会写,我先写好算了';
|
||||
var cards=player.getStorage('shiroha_yuzhao');
|
||||
var yuzhao=decadeUI.content.chooseGuanXing(player,cards,cards.length,null,num);
|
||||
yuzhao.caption='【预兆】';
|
||||
yuzhao.header1='预兆';
|
||||
yuzhao.header2='牌堆顶';
|
||||
yuzhao.tip='将'+num+'张牌置于牌堆顶<br>'+yuzhao.tip;
|
||||
yuzhao.callback=function(){
|
||||
return this.cards[1].length==num;
|
||||
};
|
||||
event.switchToAuto=function(){
|
||||
var cheats=[];
|
||||
var cards=yuzhao.cards[0].slice(0);
|
||||
var stopped=false;
|
||||
|
||||
var next=trigger.player;
|
||||
var hasFriend=get.attitude(player,next)>0;
|
||||
|
||||
var judges=next.node.judges.childNodes;
|
||||
if(judges.length>0) cheats=decadeUI.get.cheatJudgeCards(cards,judges,hasFriend);
|
||||
if(hasFriend){
|
||||
cards=cards.sort(function(b,a){
|
||||
return get.value(b,next)-get.value(a,next);
|
||||
});
|
||||
}
|
||||
else{
|
||||
cards.sort(function(a,b){
|
||||
return get.value(b,next)-get.value(a,next);
|
||||
});
|
||||
}
|
||||
cards=cheats.concat(cards);
|
||||
var time=500;
|
||||
var gainNum=num;
|
||||
for(var i=cards.length-1;i>=0;i--){
|
||||
setTimeout(function(card,index,finished,moveDown){
|
||||
yuzhao.move(card,index,moveDown?1:0);
|
||||
if(finished) yuzhao.finishTime(1000);
|
||||
},time,cards[i],i,i==0,gainNum>0);
|
||||
time += 500;
|
||||
gainNum--;
|
||||
}
|
||||
};
|
||||
if(!event.isMine()){
|
||||
event.switchToAuto();
|
||||
}
|
||||
'step 4'
|
||||
var cards=event.cards2;
|
||||
if(event.result&&event.result.bool){
|
||||
if(result&&result.bool){
|
||||
var cards=result.moved[1];
|
||||
player.unmarkAuto('shiroha_yuzhao',cards);
|
||||
var first=ui.cardPile.firstChild;
|
||||
while(cards.length){
|
||||
ui.cardPile.insertBefore(cards.pop().fix(),ui.cardPile.firstChild);
|
||||
}
|
||||
|
@ -15932,11 +15884,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ns_caimao:'蔡瑁',
|
||||
nsdingzhou:'定州',
|
||||
nsdingzhou_info:'出牌阶段限一次,你可以选择一名区域内有牌的其他角色。你随机获得其区域内的一张牌,然后摸一张牌。若你以此法获得了两张颜色不同的牌,则你失去1点体力。',
|
||||
junk_simayi:'止息司马懿',
|
||||
ol_guohuai_ab:'郭淮',
|
||||
junk_zhangrang_ab:'张让',
|
||||
old_jiakui_ab:'贾逵',
|
||||
junk_simayi_ab:'司马懿',
|
||||
diy_tieba:'吧友设计',
|
||||
diy_default:'常规',
|
||||
diy_noname:'无名专属',
|
||||
|
|
|
@ -2977,49 +2977,39 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
player.storage.qixing=game.cardsGotoSpecial(get.cards(7)).cards;
|
||||
player.markSkill('qixing');
|
||||
game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'cards']);
|
||||
player.markAuto('qixing',game.cardsGotoSpecial(get.cards(7)).cards);
|
||||
"step 1"
|
||||
player.chooseCard('选择任意张手牌与“星”交换',[1,Math.min(player.countCards('h'),player.storage.qixing.length)]).set('promptx',[player.storage.qixing]).ai=function(card){
|
||||
var val=get.value(card);
|
||||
if(val<0) return 10;
|
||||
if(player.skipList.contains('phaseUse')){
|
||||
return val;
|
||||
var cards=player.getStorage('qixing');
|
||||
if(!cards.length||!player.countCards('h')){
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
return -val;
|
||||
};
|
||||
var next=player.chooseToMove('七星:是否交换“星”和手牌?');
|
||||
next.set('list',[
|
||||
[get.translation(player)+'(你)的星',cards],
|
||||
['手牌区',player.getCards('h')],
|
||||
]);
|
||||
next.set('filterMove',function(from,to){
|
||||
return typeof to!='number';
|
||||
});
|
||||
next.set('processAI',function(list){
|
||||
var player=_status.event.player,cards=list[0][1].concat(list[1][1]).sort(function(a,b){
|
||||
return get.useful(a)-get.useful(b);
|
||||
}),cards2=cards.splice(0,player.storage.qixing.length);
|
||||
return [cards2,cards];
|
||||
});
|
||||
"step 2"
|
||||
if(result.bool){
|
||||
player.logSkill('qixing');
|
||||
player.lose(result.cards,ui.special,'toStorage');
|
||||
player.storage.qixing=player.storage.qixing.concat(result.cards);
|
||||
player.syncStorage('qixing');
|
||||
event.num=result.cards.length;
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
"step 3"
|
||||
player.chooseCardButton(player.storage.qixing,'选择'+event.num+'张牌作为手牌',event.num,true).ai=function(button){
|
||||
var val=get.value(button.link);
|
||||
if(val<0) return -10;
|
||||
if(player.skipList.contains('phaseUse')){
|
||||
return -val;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
if(player==game.me&&!event.isMine()){
|
||||
game.delay(0.5);
|
||||
}
|
||||
"step 4"
|
||||
player.gain(result.links,'fromStorage');
|
||||
for(var i=0;i<result.links.length;i++){
|
||||
player.storage.qixing.remove(result.links[i]);
|
||||
}
|
||||
player.syncStorage('qixing');
|
||||
if(player==game.me&&_status.auto){
|
||||
game.delay(0.5);
|
||||
var pushs=result.moved[0],gains=result.moved[1];
|
||||
pushs.removeArray(player.storage.qixing);
|
||||
gains.removeArray(player.getCards('h'));
|
||||
if(!pushs.length||pushs.length!=gains.length) return;
|
||||
player.lose(pushs,ui.special,'toStorage');
|
||||
game.log(player,'将',pushs,'作为“星”置于武将牌上');
|
||||
player.gain(gains,'gain2','log','fromStorage');
|
||||
player.storage.qixing.addArray(pushs);
|
||||
player.storage.qixing.removeArray(gains);
|
||||
player.markSkill('qixing');
|
||||
}
|
||||
},
|
||||
mark:true,
|
||||
|
@ -3061,45 +3051,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
player.chooseCard('选择任意张手牌与“星”交换',[1,Math.min(player.countCards('h'),player.storage.qixing.length)]).set('promptx',[player.storage.qixing]).ai=function(card){
|
||||
var val=get.value(card);
|
||||
if(val<0) return 10;
|
||||
if(player.skipList.contains('phaseUse')){
|
||||
return val;
|
||||
var cards=player.getStorage('qixing');
|
||||
if(!cards.length||!player.countCards('h')){
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
return -val;
|
||||
};
|
||||
var next=player.chooseToMove('七星:是否交换“星”和手牌?');
|
||||
next.set('list',[
|
||||
[get.translation(player)+'(你)的星',cards],
|
||||
['手牌区',player.getCards('h')],
|
||||
]);
|
||||
next.set('filterMove',function(from,to){
|
||||
return typeof to!='number';
|
||||
});
|
||||
next.set('processAI',function(list){
|
||||
var player=_status.event.player,cards=list[0][1].concat(list[1][1]).sort(function(a,b){
|
||||
return get.value(a)-get.value(b);
|
||||
}),cards2=cards.splice(0,player.storage.qixing.length);
|
||||
return [cards2,cards];
|
||||
});
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.logSkill('qixing');
|
||||
player.lose(result.cards,ui.special,'toStorage');
|
||||
player.storage.qixing=player.storage.qixing.concat(result.cards);
|
||||
player.syncStorage('qixing');
|
||||
event.num=result.cards.length;
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
"step 2"
|
||||
player.chooseCardButton(player.storage.qixing,'选择'+event.num+'张牌作为手牌',event.num,true).ai=function(button){
|
||||
var val=get.value(button.link);
|
||||
if(val<0) return -10;
|
||||
if(player.skipList.contains('phaseUse')){
|
||||
return -val;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
if(player==game.me&&!event.isMine()){
|
||||
game.delay(0.5);
|
||||
}
|
||||
"step 3"
|
||||
player.gain(result.links,'fromStorage');
|
||||
for(var i=0;i<result.links.length;i++){
|
||||
player.storage.qixing.remove(result.links[i]);
|
||||
}
|
||||
player.syncStorage('qixing');
|
||||
if(player==game.me&&_status.auto){
|
||||
game.delay(0.5);
|
||||
var pushs=result.moved[0],gains=result.moved[1];
|
||||
pushs.removeArray(player.storage.qixing);
|
||||
gains.removeArray(player.getCards('h'));
|
||||
if(!pushs.length||pushs.length!=gains.length) return;
|
||||
player.logSkill('qixing2');
|
||||
player.lose(pushs,ui.special,'toStorage');
|
||||
game.log(player,'将',pushs,'作为“星”置于武将牌上');
|
||||
player.gain(gains,'gain2','log','fromStorage');
|
||||
player.storage.qixing.addArray(pushs);
|
||||
player.storage.qixing.removeArray(gains);
|
||||
player.markSkill('qixing');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1127,7 +1127,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
var num1=player.countCards('h'),num2=player.storage.fengjie2.hp;
|
||||
if(num1>num2) player.chooseToDiscard('h',true,num1-num2);
|
||||
else player.drawTo(Math.min(4,num2));
|
||||
else player.drawTo(Math.min(num1+4,num2));
|
||||
},
|
||||
},
|
||||
//陈武董袭
|
||||
|
@ -3287,35 +3287,47 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
mjweipo_effect:{
|
||||
audio:'mjweipo',
|
||||
enable:'chooseToUse',
|
||||
hiddenCard:function(player,name){
|
||||
return name==player.storage.mjweipo_effect&&player.countCards('h','sha')>0;
|
||||
},
|
||||
viewAs:function(cards,player){
|
||||
return {name:player.storage.mjweipo_effect};
|
||||
},
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.countCards('hs','sha')>0&&event.filterCard({name:player.storage.mjweipo_effect},player,event);
|
||||
return player.countCards('h','sha')>0;
|
||||
},
|
||||
prompt:function(){
|
||||
return '将一张杀当做'+get.translation(_status.event.player.storage.mjweipo_effect)+'使用';
|
||||
return '弃置一张【杀】并获得一张'+get.translation(_status.event.player.storage.mjweipo_effect);
|
||||
},
|
||||
filterCard:{name:'sha'},
|
||||
check:function(card){
|
||||
return 6-get.value(card);
|
||||
},
|
||||
position:'hs',
|
||||
position:'h',
|
||||
popname:true,
|
||||
onuse:function(links,player){
|
||||
content:function(){
|
||||
var name=player.storage.mjweipo_effect,card=false;
|
||||
if(name=='binglinchengxiax'){
|
||||
if(!_status.binglinchengxiax){
|
||||
_status.binglinchengxiax=[
|
||||
['spade',7],
|
||||
['club',7],
|
||||
['club',13],
|
||||
];
|
||||
game.broadcastAll(function(){lib.inpile.add('binglinchengxiax')});
|
||||
}
|
||||
if(_status.binglinchengxiax.length){
|
||||
var info=_status.binglinchengxiax.randomRemove();
|
||||
card=game.createCard2('binglinchengxiax',info[0],info[1]);
|
||||
}
|
||||
}
|
||||
if(!card) card=get.cardPile(name);
|
||||
if(card) player.gain(card,'gain2');
|
||||
player.removeSkill('mjweipo_effect');
|
||||
},
|
||||
ai:{
|
||||
order:7,
|
||||
result:{player:1},
|
||||
},
|
||||
group:'mjweipo_remove',
|
||||
mark:true,
|
||||
marktext:'迫',
|
||||
intro:{content:'可将【杀】当做【$】使用'},
|
||||
intro:{content:'可弃置一张【杀】并获得【$】'},
|
||||
group:'mjweipo_remove',
|
||||
},
|
||||
mjweipo_remove:{
|
||||
trigger:{global:['phaseBegin','die']},
|
||||
|
@ -11226,7 +11238,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
threaten:0.7,
|
||||
},
|
||||
},
|
||||
"xinfu_shangjian":{
|
||||
xinfu_shangjian:{
|
||||
trigger:{
|
||||
global:"phaseJieshuBegin",
|
||||
},
|
||||
|
@ -11238,6 +11250,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
return num>0&&num<=player.hp
|
||||
},
|
||||
locked:true,
|
||||
frequent:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
|
@ -13034,7 +13047,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
shenpei:['shenpei','sp_shenpei'],
|
||||
wangcan:['wangcan','sp_wangcan'],
|
||||
sunshao:['sp_sunshao','sunshao'],
|
||||
xunchen:['xunchen','sp_xunchen'],
|
||||
xunchen:['re_xunchen','xunchen','sp_xunchen'],
|
||||
xinpi:['xinpi','sp_xinpi'],
|
||||
duyu:['duyu','sp_duyu'],
|
||||
zhangwen:['sp_zhangwen','zhangwen'],
|
||||
|
@ -13084,7 +13097,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"qc_mingzhe":"明哲",
|
||||
"qc_mingzhe_info":"",
|
||||
"xinfu_shangjian":"尚俭",
|
||||
"xinfu_shangjian_info":"一名角色的结束阶段开始时,若你于此回合内失去了X张或更少的牌,则你可以摸等量的牌。(X为你的体力值)",
|
||||
"xinfu_shangjian_info":"锁定技。一名角色的结束阶段开始时,若你于此回合内失去了X张或更少的牌,则你可以摸等量的牌(X为你的体力值)。",
|
||||
"rw_bagua_skill":"先天八卦阵",
|
||||
"rw_bagua_skill_info":"当你需要使用或打出一张【闪】时,你可以进行判定,若判定结果不为黑桃,视为你使用或打出了一张【闪】。",
|
||||
"rw_baiyin_skill":"照月狮子盔",
|
||||
|
@ -13586,7 +13599,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
mjweipo:'危迫',
|
||||
mjweipo_effect:'危迫',
|
||||
mjweipo_remove:'危迫',
|
||||
mjweipo_info:'出牌阶段限一次。你可以选择一个智囊或【兵临城下】,令一名没有〖危迫〗效果的角色获得如下一次性效果直到你下回合开始:其可以将一张【杀】当做你选择的牌使用。',
|
||||
mjweipo_info:'出牌阶段限一次。你可以选择一个智囊或【兵临城下】,令一名没有〖危迫〗效果的角色获得如下一次性效果直到你下回合开始:其可于出牌阶段弃置一张【杀】,并获得一张你选择的牌。',
|
||||
mjchenshi:'陈势',
|
||||
mjchenshi_player:'陈势',
|
||||
mjchenshi_target:'陈势',
|
||||
|
@ -13697,7 +13710,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
qingjue_info:'每轮限一次。当有其他角色A使用牌指定另一名体力值小于A且不处于濒死状态的其他角色B为目标时,你可以摸一张牌,然后与A拼点。若你赢,你取消此目标。若你没赢,你将此牌的目标改为自己。',
|
||||
fengjie:'奉节',
|
||||
fengjie2:'奉节',
|
||||
fengjie_info:'锁定技,准备阶段开始时,你选择一名其他角色并获得如下效果直到你下回合开始:一名角色的结束阶段开始时,你将手牌摸至(至多摸至四张)或弃置至与其体力值相等。',
|
||||
fengjie_info:'锁定技,准备阶段开始时,你选择一名其他角色并获得如下效果直到你下回合开始:一名角色的结束阶段开始时,你将手牌摸至(至多摸四张)或弃置至与其体力值相等。',
|
||||
sp_zongyu:'手杀宗预',
|
||||
zhibian:'直辩',
|
||||
zhibian_info:'准备阶段,你可以和一名其他角色拼点。若你赢,你可选择:①将其装备区/判定区内的一张牌移动到你的对应区域。②回复1点体力。③背水:跳过下个摸牌阶段,然后依次执行上述所有选项;若你没赢,你失去1点体力。',
|
||||
|
|
|
@ -7,17 +7,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
old_standard:['ol_yuanshu'],
|
||||
old_shenhua:["yuji","zhangjiao","old_zhugezhan","old_guanqiujian","xiahouyuan","weiyan","xiaoqiao","pangde"],
|
||||
old_refresh:["old_zhangfei","old_huatuo","old_zhaoyun","ol_huaxiong"],
|
||||
old_yijiang1:["masu","xushu","yujin","xin_yujin","old_xusheng","old_lingtong","fazheng"],
|
||||
old_yijiang1:["masu","xushu","xin_yujin","old_xusheng","old_lingtong","fazheng"],
|
||||
old_yijiang2:["old_zhonghui"],
|
||||
old_yijiang3:["liru","old_zhuran","old_fuhuanghou","old_caochong"],
|
||||
old_yijiang4:["old_caozhen","old_chenqun","old_zhuhuan"],
|
||||
old_yijiang5:["old_caoxiu","old_quancong","old_zhuzhi"],
|
||||
old_yijiang67:["ol_zhangrang","ol_liuyu"],
|
||||
old_sp:["old_lingju","old_maliang","old_machao","zhangliang","jsp_caoren","ol_guansuo","old_zhangxingcai","old_huangfusong","ol_maliang","old_wangyun"],
|
||||
old_yingbian:['junk_simayi'],
|
||||
old_mobile:["old_caochun","old_majun"],
|
||||
},
|
||||
},
|
||||
character:{
|
||||
junk_simayi:['male','jin',3,['buchen','smyyingshi','xiongzhi','quanbian'],['hiddenSkill']],
|
||||
fazheng:['male','shu',3,['enyuan','xuanhuo']],
|
||||
ol_yuanshu:['male','qun',4,['wangzun','tongji']],
|
||||
pangde:['male','qun',4,['mashu','mengjin']],
|
||||
|
@ -42,7 +44,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
masu:['male','shu',3,['xinzhan','huilei']],
|
||||
xushu:['male','shu',3,['wuyan','jujian']],
|
||||
liru:['male','qun',3,['juece','mieji','fencheng']],
|
||||
yujin:['male','wei',4,['yizhong']],
|
||||
xin_yujin:['male','wei',4,['jieyue']],
|
||||
//lusu:['male','wu',3,['haoshi','dimeng']],
|
||||
//yuanshao:['male','qun',4,['luanji','xueyi'],['zhu']],
|
||||
|
@ -791,6 +792,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
oldxuanfeng_info:'每当你失去一次装备区里的牌时,你可以执行下列两项中的一项:1.视为对任意一名其他角色使用一张【杀】(此【杀】不计入每回合的使用限制);2.对与你距离1以内的一名其他角色造成一点伤害',
|
||||
ol_yuanshu:'旧袁术',
|
||||
fazheng:'旧法正',
|
||||
junk_simayi:'旧晋司马懿',
|
||||
junk_simayi_ab:'司马懿',
|
||||
|
||||
old_standard:'标准包',
|
||||
old_shenhua:'神话再临',
|
||||
|
|
|
@ -258,6 +258,7 @@ window.noname_character_rank={
|
|||
'ol_wangrong',
|
||||
're_nanhualaoxian',
|
||||
'fuqian',
|
||||
'liuyong',
|
||||
'key_misuzu',
|
||||
'key_sunohara',
|
||||
'key_umi',
|
||||
|
@ -407,7 +408,7 @@ window.noname_character_rank={
|
|||
'shen_zhenji',
|
||||
'shen_simayi',
|
||||
'xushao',
|
||||
're_yujin',
|
||||
'tw_yujin',
|
||||
'xurong',
|
||||
'beimihu',
|
||||
'guanlu',
|
||||
|
@ -485,6 +486,7 @@ window.noname_character_rank={
|
|||
'ol_yujin',
|
||||
'ol_huaxin',
|
||||
'qiaozhou',
|
||||
're_xunchen',
|
||||
],
|
||||
bp:[
|
||||
'chess_diaochan',
|
||||
|
@ -711,6 +713,7 @@ window.noname_character_rank={
|
|||
'yuanhuan',
|
||||
'zhouyi',
|
||||
'yangzhi',
|
||||
'wanniangongzhu',
|
||||
],
|
||||
b:[
|
||||
'diy_feishi',
|
||||
|
@ -911,6 +914,8 @@ window.noname_character_rank={
|
|||
'yangyan',
|
||||
'zuofen',
|
||||
're_kanze',
|
||||
'tongyuan',
|
||||
'zhangning',
|
||||
],
|
||||
bm:[
|
||||
'diy_xizhenxihong',
|
||||
|
@ -1667,7 +1672,7 @@ window.noname_character_rank={
|
|||
're_caiwenji',
|
||||
're_caozhi',
|
||||
'yujin_yujin',
|
||||
're_yujin',
|
||||
'tw_yujin',
|
||||
'gaoshun',
|
||||
're_zhonghui',
|
||||
'old_madai',
|
||||
|
@ -1765,6 +1770,11 @@ window.noname_character_rank={
|
|||
'yangyan',
|
||||
'yangzhi',
|
||||
'zuofen',
|
||||
'liuyong',
|
||||
'zhangning',
|
||||
'wanniangongzhu',
|
||||
're_xunchen',
|
||||
'tongyuan',
|
||||
],
|
||||
junk:[
|
||||
'sunshao',
|
||||
|
|
|
@ -7353,26 +7353,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
if(player.isUnderControl()){
|
||||
game.swapPlayerAuto(player);
|
||||
}
|
||||
var num=game.countPlayer()<4?3:5;
|
||||
var cards=get.cards(num);
|
||||
event.cards=cards;
|
||||
var switchToAuto=function(){
|
||||
_status.imchoosing=false;
|
||||
if(event.dialog) event.dialog.close();
|
||||
if(event.control) event.control.close();
|
||||
game.cardsGotoOrdering(cards);
|
||||
var next=player.chooseToMove();
|
||||
next.set('list',[
|
||||
['牌堆顶',cards],
|
||||
['牌堆底'],
|
||||
]);
|
||||
next.set('prompt','观星:点击将牌移动到牌堆顶或牌堆底');
|
||||
next.processAI=function(list){
|
||||
var cards=list[0][1],player=_status.event.player;
|
||||
var target=(_status.event.getTrigger().name=='phaseZhunbei')?player:player.next;
|
||||
var att=get.sgn(get.attitude(player,target));
|
||||
var top=[];
|
||||
var judges=player.getCards('j');
|
||||
var judges=target.getCards('j');
|
||||
var stopped=false;
|
||||
if(!player.hasWuxie()){
|
||||
if(player!=target||!target.hasWuxie()){
|
||||
for(var i=0;i<judges.length;i++){
|
||||
var judge=get.judge(judges[i]);
|
||||
cards.sort(function(a,b){
|
||||
return judge(b)-judge(a);
|
||||
return (judge(b)-judge(a))*att;
|
||||
});
|
||||
if(judge(cards[0])<0){
|
||||
if(judge(cards[0])*att<0){
|
||||
stopped=true;break;
|
||||
}
|
||||
else{
|
||||
|
@ -7383,14 +7386,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var bottom;
|
||||
if(!stopped){
|
||||
cards.sort(function(a,b){
|
||||
return get.value(b,player)-get.value(a,player);
|
||||
return (get.value(b,player)-get.value(a,player))*att;
|
||||
});
|
||||
while(cards.length){
|
||||
if(get.value(cards[0],player)<=5) break;
|
||||
if((get.value(cards[0],player)<=5)==(att>0)) break;
|
||||
top.unshift(cards.shift());
|
||||
}
|
||||
}
|
||||
bottom=cards;
|
||||
return [top,bottom];
|
||||
}
|
||||
"step 1"
|
||||
var top=result.moved[0];
|
||||
var bottom=result.moved[1];
|
||||
top.reverse();
|
||||
for(var i=0;i<top.length;i++){
|
||||
ui.cardPile.insertBefore(top[i],ui.cardPile.firstChild);
|
||||
}
|
||||
|
@ -7402,147 +7411,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(bottom.length)+'下');
|
||||
game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶');
|
||||
game.delay(2);
|
||||
};
|
||||
var chooseButton=function(online,player,cards){
|
||||
var event=_status.event;
|
||||
player=player||event.player;
|
||||
cards=cards||event.cards;
|
||||
event.top=[];
|
||||
event.bottom=[];
|
||||
event.status=true;
|
||||
event.dialog=ui.create.dialog('按顺序选择置于牌堆顶的牌(先选择的在上)',cards);
|
||||
for(var i=0;i<event.dialog.buttons.length;i++){
|
||||
event.dialog.buttons[i].classList.add('pointerdiv');
|
||||
}
|
||||
event.switchToAuto=function(){
|
||||
event._result='ai';
|
||||
event.dialog.close();
|
||||
event.control.close();
|
||||
_status.imchoosing=false;
|
||||
},
|
||||
event.control=ui.create.control('ok','pileTop','pileBottom',function(link){
|
||||
var event=_status.event;
|
||||
if(link=='ok'){
|
||||
if(online){
|
||||
event._result={
|
||||
top:[],
|
||||
bottom:[]
|
||||
}
|
||||
for(var i=0;i<event.top.length;i++){
|
||||
event._result.top.push(event.top[i].link);
|
||||
}
|
||||
for(var i=0;i<event.bottom.length;i++){
|
||||
event._result.bottom.push(event.bottom[i].link);
|
||||
}
|
||||
}
|
||||
else{
|
||||
var i;
|
||||
for(i=0;i<event.top.length;i++){
|
||||
ui.cardPile.insertBefore(event.top[i].link,ui.cardPile.firstChild);
|
||||
}
|
||||
for(i=0;i<event.bottom.length;i++){
|
||||
ui.cardPile.appendChild(event.bottom[i].link);
|
||||
}
|
||||
for(i=0;i<event.dialog.buttons.length;i++){
|
||||
if(event.dialog.buttons[i].classList.contains('glow')==false&&
|
||||
event.dialog.buttons[i].classList.contains('target')==false)
|
||||
ui.cardPile.appendChild(event.dialog.buttons[i].link);
|
||||
}
|
||||
if(event.triggername=='phaseZhunbeiBegin'&&event.top.length==0){
|
||||
player.addTempSkill('reguanxing_on');
|
||||
}
|
||||
player.popup(get.cnNumber(event.top.length)+'上'+get.cnNumber(event.cards.length-event.top.length)+'下');
|
||||
game.log(player,'将'+get.cnNumber(event.top.length)+'张牌置于牌堆顶');
|
||||
}
|
||||
event.dialog.close();
|
||||
event.control.close();
|
||||
game.resume();
|
||||
_status.imchoosing=false;
|
||||
}
|
||||
else if(link=='pileTop'){
|
||||
event.status=true;
|
||||
event.dialog.content.childNodes[0].innerHTML='按顺序选择置于牌堆顶的牌';
|
||||
}
|
||||
else{
|
||||
event.status=false;
|
||||
event.dialog.content.childNodes[0].innerHTML='按顺序选择置于牌堆底的牌';
|
||||
}
|
||||
})
|
||||
for(var i=0;i<event.dialog.buttons.length;i++){
|
||||
event.dialog.buttons[i].classList.add('selectable');
|
||||
}
|
||||
event.custom.replace.button=function(link){
|
||||
var event=_status.event;
|
||||
if(link.classList.contains('target')){
|
||||
link.classList.remove('target');
|
||||
event.top.remove(link);
|
||||
}
|
||||
else if(link.classList.contains('glow')){
|
||||
link.classList.remove('glow');
|
||||
event.bottom.remove(link);
|
||||
}
|
||||
else if(event.status){
|
||||
link.classList.add('target');
|
||||
event.top.unshift(link);
|
||||
}
|
||||
else{
|
||||
link.classList.add('glow');
|
||||
event.bottom.push(link);
|
||||
}
|
||||
}
|
||||
event.custom.replace.window=function(){
|
||||
for(var i=0;i<_status.event.dialog.buttons.length;i++){
|
||||
_status.event.dialog.buttons[i].classList.remove('target');
|
||||
_status.event.dialog.buttons[i].classList.remove('glow');
|
||||
_status.event.top.length=0;
|
||||
_status.event.bottom.length=0;
|
||||
}
|
||||
}
|
||||
game.pause();
|
||||
game.countChoose();
|
||||
};
|
||||
event.switchToAuto=switchToAuto;
|
||||
|
||||
if(event.isMine()){
|
||||
chooseButton();
|
||||
event.finish();
|
||||
}
|
||||
else if(event.isOnline()){
|
||||
event.player.send(chooseButton,true,event.player,event.cards);
|
||||
event.player.wait();
|
||||
game.pause();
|
||||
}
|
||||
else{
|
||||
event.switchToAuto();
|
||||
event.finish();
|
||||
}
|
||||
"step 1"
|
||||
if(event.result=='ai'||!event.result){
|
||||
event.switchToAuto();
|
||||
}
|
||||
else{
|
||||
var top=event.result.top||[];
|
||||
var bottom=event.result.bottom||[];
|
||||
for(var i=0;i<top.length;i++){
|
||||
ui.cardPile.insertBefore(top[i],ui.cardPile.firstChild);
|
||||
}
|
||||
for(i=0;i<bottom.length;i++){
|
||||
ui.cardPile.appendChild(bottom[i]);
|
||||
}
|
||||
for(i=0;i<event.cards.length;i++){
|
||||
if(!top.contains(event.cards[i])&&!bottom.contains(event.cards[i])){
|
||||
ui.cardPile.appendChild(event.cards[i]);
|
||||
}
|
||||
}
|
||||
if(event.triggername=='phaseZhunbeiBegin'&&top.length==0){
|
||||
player.addTempSkill('reguanxing_on');
|
||||
}
|
||||
player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(event.cards.length-top.length)+'下');
|
||||
game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶');
|
||||
game.updateRoundNumber();
|
||||
game.delay(2);
|
||||
}
|
||||
game.delayx();
|
||||
},
|
||||
subSkill:{
|
||||
on:{}
|
||||
|
@ -9419,22 +9289,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
preHidden:true,
|
||||
content:function(){
|
||||
"step 0"
|
||||
event.cards=get.cards(4);
|
||||
player.chooseCardButton(event.cards,2,'选择两张牌置于牌堆顶',true).set('ai',ai.get.buttonValue);
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
var choice=[];
|
||||
for(var i=0;i<result.links.length;i++){
|
||||
choice.push(result.links[i]);
|
||||
cards.remove(result.links[i]);
|
||||
}
|
||||
for(var i=0;i<cards.length;i++){
|
||||
ui.cardPile.appendChild(cards[i]);
|
||||
}
|
||||
while(choice.length){
|
||||
ui.cardPile.insertBefore(choice.pop(),ui.cardPile.firstChild);
|
||||
var cards=get.cards(4);
|
||||
game.cardsGotoOrdering(cards);
|
||||
var next=player.chooseToMove('恂恂:将两张牌置于牌堆顶',true);
|
||||
next.set('list',[
|
||||
['牌堆顶',cards],
|
||||
['牌堆底'],
|
||||
]);
|
||||
next.set('filterMove',function(from,to,moved){
|
||||
if(to==1&&moved[1].length>=2) return false;
|
||||
return true;
|
||||
});
|
||||
next.set('filterOk',function(moved){
|
||||
return moved[1].length==2;
|
||||
});
|
||||
next.set('processAI',function(list){
|
||||
var cards=list[0][1].slice(0).sort(function(a,b){
|
||||
return get.value(b)-get.value(a);
|
||||
});
|
||||
return [cards,cards.splice(2)];
|
||||
})
|
||||
'step 1'
|
||||
var top=result.moved[0];
|
||||
var bottom=result.moved[1];
|
||||
top.reverse();
|
||||
for(var i=0;i<top.length;i++){
|
||||
ui.cardPile.insertBefore(top[i],ui.cardPile.firstChild);
|
||||
}
|
||||
for(i=0;i<bottom.length;i++){
|
||||
ui.cardPile.appendChild(bottom[i]);
|
||||
}
|
||||
game.updateRoundNumber();
|
||||
game.delayx();
|
||||
},
|
||||
},
|
||||
wangxi:{
|
||||
|
|
|
@ -203,52 +203,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
'step 0'
|
||||
player.awakenSkill('hongju');
|
||||
if(player.countCards('h')==0) event.goto(2);
|
||||
else{
|
||||
var dialog=['请选择要交换的手牌和「荣」,或点「取消」','<div class="text center">「征荣」牌</div>',player.storage.zhengrong,'<div class="text center">手牌区</div>',player.getCards('h')];
|
||||
var next=player.chooseButton(dialog);
|
||||
next.set('filterButton',function(button){
|
||||
var ss=_status.event.player.storage.zhengrong;
|
||||
var hs=_status.event.player.getCards('h');
|
||||
var sn=0;
|
||||
var hn=0;
|
||||
var ub=ui.selected.buttons;
|
||||
for(var i=0;i<ub.length;i++){
|
||||
if(ss.contains(ub[i].link)) sn++;
|
||||
else hn++;
|
||||
var cards=player.getStorage('zhengrong');
|
||||
if(!cards.length||!player.countCards('h')){
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
return !(sn>=hs.length&&ss.contains(button.link)||hn>=ss.length&&hs.contains(button.link));
|
||||
var next=player.chooseToMove('征荣:是否交换“荣”和手牌?');
|
||||
next.set('list',[
|
||||
[get.translation(player)+'(你)的“荣”',cards],
|
||||
['手牌区',player.getCards('h')],
|
||||
]);
|
||||
next.set('filterMove',function(from,to){
|
||||
return typeof to!='number';
|
||||
});
|
||||
next.set('selectButton',function(){
|
||||
if(ui.selected.buttons.length==0) return 2;
|
||||
var ss=_status.event.player.storage.zhengrong;
|
||||
var hs=_status.event.player.getCards('h');
|
||||
var sn=0;
|
||||
var hn=0;
|
||||
var ub=ui.selected.buttons;
|
||||
for(var i=0;i<ub.length;i++){
|
||||
if(ss.contains(ub[i].link)) sn++;
|
||||
else hn++;
|
||||
}
|
||||
if(sn!=hn) return 2*Math.max(sn,hn);
|
||||
else{
|
||||
if(sn==ss.length||hn==hs.length||sn==hs.length||hn==ss.length) return ub.length;
|
||||
return [ub.length,ub.length+1];
|
||||
}
|
||||
next.set('processAI',function(list){
|
||||
var player=_status.event.player,cards=list[0][1].concat(list[1][1]).sort(function(a,b){
|
||||
return get.value(a)-get.value(b);
|
||||
}),cards2=cards.splice(0,player.storage.zhengrong.length);
|
||||
return [cards2,cards];
|
||||
});
|
||||
next.set('ai',function(){return -1});
|
||||
}
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var gains=[];
|
||||
var pushs=[];
|
||||
for(var i=0;i<result.links.length;i++){
|
||||
var card=result.links[i];
|
||||
if(player.storage.zhengrong.contains(card)) gains.push(card);
|
||||
else pushs.push(card);
|
||||
}
|
||||
var pushs=result.moved[0],gains=result.moved[1];
|
||||
pushs.removeArray(player.storage.zhengrong);
|
||||
gains.removeArray(player.getCards('h'));
|
||||
if(!pushs.length||pushs.length!=gains.length) return;
|
||||
player.lose(pushs,ui.special,'toStorage');
|
||||
game.log(player,'将',pushs,'放在了武将牌上');
|
||||
game.log(player,'将',pushs,'作为“荣”置于武将牌上');
|
||||
player.gain(gains,'gain2','log','fromStorage');
|
||||
player.storage.zhengrong.addArray(pushs);
|
||||
player.storage.zhengrong.removeArray(gains);
|
||||
|
@ -532,9 +513,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
check:function(event,player){
|
||||
var num=0;
|
||||
if(player.getHistory('lose',function(evt){
|
||||
if(player.hasHistory('lose',function(evt){
|
||||
return evt.type=='discard';
|
||||
}).length) num++;
|
||||
})) num++;
|
||||
if(!player.isMinHandcard()) num++;
|
||||
if(!player.getStat('damage')) num++;
|
||||
if(num==3) return player.hp>=2;
|
||||
|
@ -542,9 +523,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
prompt:function(event,player){
|
||||
var num=3;
|
||||
if(player.getHistory('lose',function(evt){
|
||||
if(player.hasHistory('lose',function(evt){
|
||||
return evt.type=='discard';
|
||||
}).length) num--;
|
||||
})) num--;
|
||||
if(!player.isMinHandcard()) num--;
|
||||
if(!player.getStat('damage')) num--;
|
||||
return get.prompt('xinfu_zuilun')+'(可获得'+get.cnNumber(num)+'张牌)'
|
||||
|
@ -553,34 +534,64 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
event.num=0;
|
||||
event.cards=get.cards(3);
|
||||
if(player.getHistory('lose',function(evt){
|
||||
game.cardsGotoOrdering(cards);
|
||||
if(player.hasHistory('lose',function(evt){
|
||||
return evt.type=='discard';
|
||||
}).length) event.num++;
|
||||
})) event.num++;
|
||||
if(!player.isMinHandcard()) event.num++;
|
||||
if(!player.getStat('damage')) event.num++;
|
||||
'step 1'
|
||||
if(event.num==0){
|
||||
player.gain(event.cards,'draw');
|
||||
event.finish();
|
||||
}else{
|
||||
var prompt;
|
||||
if(event.num==3) prompt="罪论:请按顺序将卡牌置于牌堆顶(先选择的在上)";
|
||||
else prompt="罪论:请按顺序将"+get.cnNumber(event.num)+"张卡牌置于牌堆顶(先选择的在上),然后获得其余的牌。";
|
||||
player.chooseCardButton(event.num,true,event.cards,prompt).set('ai',function(button){
|
||||
}
|
||||
else{
|
||||
var prompt='罪论:将'+get.cnNumber(num)+'牌置于牌堆顶';
|
||||
if(num<3) prompt+='并获得其余的牌';
|
||||
var next=player.chooseToMove(prompt,true);
|
||||
if(num<3){
|
||||
next.set('list',[
|
||||
['牌堆顶',cards],
|
||||
['获得'],
|
||||
]);
|
||||
next.set('filterMove',function(from,to,moved){
|
||||
if(to==1&&moved[0].length<=_status.event.num) return false;
|
||||
return true;
|
||||
});
|
||||
next.set('filterOk',function(moved){
|
||||
return moved[0].length==_status.event.num;
|
||||
});
|
||||
}
|
||||
else{
|
||||
next.set('list',[
|
||||
['牌堆顶',cards],
|
||||
]);
|
||||
}
|
||||
next.set('num',num);
|
||||
next.set('processAI',function(list){
|
||||
var check=function(card){
|
||||
var player=_status.event.player;
|
||||
var next=player.getNext();
|
||||
var next=player.next;
|
||||
var att=get.attitude(player,next);
|
||||
var card=button.link;
|
||||
var judge=next.getCards('j')[ui.selected.buttons.length];
|
||||
var judge=next.getCards('j')[tops.length];
|
||||
if(judge){
|
||||
return get.judge(judge)(card)*att;
|
||||
}
|
||||
return next.getUseValue(card)*att;
|
||||
}
|
||||
var cards=list[0][1].slice(0),tops=[];
|
||||
while(tops.length<_status.event.num){
|
||||
list.sort(function(a,b){
|
||||
return check(b)-check(a);
|
||||
});
|
||||
tops.push(cards.shift());
|
||||
}
|
||||
return [tops,cards];
|
||||
});
|
||||
}
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
var list=result.links.slice(0);
|
||||
var list=result.moved[0];
|
||||
var num=list.length-1;
|
||||
for(var i=0;i<list.length;i++){
|
||||
event.cards.remove(list[num-i]);
|
||||
|
@ -1083,6 +1094,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
})) return true;
|
||||
return false;
|
||||
},
|
||||
prompt2:function(event){
|
||||
return '令'+get.translation(event.card)+'不能被响应,然后本回合不能再使用牌'
|
||||
},
|
||||
content:function(){
|
||||
trigger.nowuxie=true;
|
||||
trigger.directHit.addArray(game.players);
|
||||
|
@ -1846,7 +1860,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var history=player.getHistory('useCard');
|
||||
var evt=name=='useCardAfter'?event:event.getParent();
|
||||
for(var i=0;i<history.length;i++){
|
||||
if(history[i]!=evt&&get.type(history[i].card)==get.type(event.card)) return false;
|
||||
if(history[i]!=evt&&get.type2(history[i].card)==get.type2(event.card)) return false;
|
||||
else if(history[i]==evt) return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1867,14 +1881,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"step 0"
|
||||
event.cards=trigger.cards.filterInD();
|
||||
if(event.cards.length>1){
|
||||
player.chooseButton(true,event.cards.length,['按顺序将卡牌置于牌堆顶(先选择的在上)',event.cards]).set('ai',function(button){
|
||||
var value=get.value(button.link);
|
||||
if(_status.event.reverse) return value;
|
||||
return -value;
|
||||
}).set('reverse',((_status.currentPhase&&_status.currentPhase.next)?get.attitude(player,_status.currentPhase.next)>0:false))
|
||||
var next=player.chooseToMove('恃才:将牌按顺序置于牌堆顶');
|
||||
next.set('list',[['牌堆顶',event.cards]]);
|
||||
next.set('reverse',((_status.currentPhase&&_status.currentPhase.next)?get.attitude(player,_status.currentPhase.next)>0:false));
|
||||
next.set('processAI',function(list){
|
||||
var cards=list[0][1].slice(0);
|
||||
cards.sort(function(a,b){
|
||||
return (_status.event.reverse?1:-1)*(get.value(b)-get.value(a));
|
||||
});
|
||||
return [cards];
|
||||
});
|
||||
}
|
||||
"step 1"
|
||||
if(result.bool&&result.links&&result.links.length) cards=result.links.slice(0);
|
||||
if(result.bool&&result.moved&&result.moved[0].length) cards=result.moved[0].slice(0);
|
||||
while(cards.length){
|
||||
var card=cards.pop();
|
||||
if(get.position(card,true)=='o'){
|
||||
|
|
172
character/sp.js
|
@ -14873,25 +14873,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var i=0;i<lib.suit.length;i++){
|
||||
if(player.hasMark('xinfu_falu_'+lib.suit[i])) num++;
|
||||
}
|
||||
if(player.isUnderControl()){
|
||||
game.swapPlayerAuto(player);
|
||||
}
|
||||
var cards=get.cards(num);
|
||||
event.cards=cards;
|
||||
var switchToAuto=function(){
|
||||
_status.imchoosing=false;
|
||||
if(event.dialog) event.dialog.close();
|
||||
if(event.control) event.control.close();
|
||||
game.cardsGotoOrdering(cards);
|
||||
var next=player.chooseToMove();
|
||||
next.set('list',[
|
||||
['牌堆顶',cards],
|
||||
['牌堆底'],
|
||||
]);
|
||||
next.set('prompt','点化:点击将牌移动到牌堆顶或牌堆底');
|
||||
next.processAI=function(list){
|
||||
var cards=list[0][1],player=_status.event.player;
|
||||
var target=(_status.event.getTrigger().name=='phaseZhunbei')?player:player.next;
|
||||
var att=get.sgn(get.attitude(player,target));
|
||||
var top=[];
|
||||
var judges=player.getCards('j');
|
||||
var judges=target.getCards('j');
|
||||
var stopped=false;
|
||||
if(!player.hasWuxie()){
|
||||
if(player!=target||!target.hasWuxie()){
|
||||
for(var i=0;i<judges.length;i++){
|
||||
var judge=get.judge(judges[i]);
|
||||
cards.sort(function(a,b){
|
||||
return judge(b)-judge(a);
|
||||
return (judge(b)-judge(a))*att;
|
||||
});
|
||||
if(judge(cards[0])<0){
|
||||
if(judge(cards[0])*att<0){
|
||||
stopped=true;break;
|
||||
}
|
||||
else{
|
||||
|
@ -14902,14 +14905,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var bottom;
|
||||
if(!stopped){
|
||||
cards.sort(function(a,b){
|
||||
return get.value(b,player)-get.value(a,player);
|
||||
return (get.value(b,player)-get.value(a,player))*att;
|
||||
});
|
||||
while(cards.length){
|
||||
if(get.value(cards[0],player)<=5) break;
|
||||
if((get.value(cards[0],player)<=5)==(att>0)) break;
|
||||
top.unshift(cards.shift());
|
||||
}
|
||||
}
|
||||
bottom=cards;
|
||||
return [top,bottom];
|
||||
}
|
||||
"step 1"
|
||||
var top=result.moved[0];
|
||||
var bottom=result.moved[1];
|
||||
top.reverse();
|
||||
for(var i=0;i<top.length;i++){
|
||||
ui.cardPile.insertBefore(top[i],ui.cardPile.firstChild);
|
||||
}
|
||||
|
@ -14918,141 +14927,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(bottom.length)+'下');
|
||||
game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶');
|
||||
game.delay(2);
|
||||
};
|
||||
var chooseButton=function(online,player,cards){
|
||||
var event=_status.event;
|
||||
player=player||event.player;
|
||||
cards=cards||event.cards;
|
||||
event.top=[];
|
||||
event.bottom=[];
|
||||
event.status=true;
|
||||
event.dialog=ui.create.dialog('按顺序选择置于牌堆顶的牌(先选择的在上)',cards);
|
||||
for(var i=0;i<event.dialog.buttons.length;i++){
|
||||
event.dialog.buttons[i].classList.add('pointerdiv');
|
||||
}
|
||||
event.switchToAuto=function(){
|
||||
event._result='ai';
|
||||
event.dialog.close();
|
||||
event.control.close();
|
||||
_status.imchoosing=false;
|
||||
},
|
||||
event.control=ui.create.control('ok','pileTop','pileBottom',function(link){
|
||||
var event=_status.event;
|
||||
if(link=='ok'){
|
||||
if(online){
|
||||
event._result={
|
||||
top:[],
|
||||
bottom:[]
|
||||
}
|
||||
for(var i=0;i<event.top.length;i++){
|
||||
event._result.top.push(event.top[i].link);
|
||||
}
|
||||
for(var i=0;i<event.bottom.length;i++){
|
||||
event._result.bottom.push(event.bottom[i].link);
|
||||
}
|
||||
}
|
||||
else{
|
||||
var i;
|
||||
for(i=0;i<event.top.length;i++){
|
||||
ui.cardPile.insertBefore(event.top[i].link,ui.cardPile.firstChild);
|
||||
}
|
||||
for(i=0;i<event.bottom.length;i++){
|
||||
ui.cardPile.appendChild(event.bottom[i].link);
|
||||
}
|
||||
for(i=0;i<event.dialog.buttons.length;i++){
|
||||
if(event.dialog.buttons[i].classList.contains('glow')==false&&
|
||||
event.dialog.buttons[i].classList.contains('target')==false)
|
||||
ui.cardPile.appendChild(event.dialog.buttons[i].link);
|
||||
}
|
||||
player.popup(get.cnNumber(event.top.length)+'上'+get.cnNumber(event.cards.length-event.top.length)+'下');
|
||||
game.log(player,'将'+get.cnNumber(event.top.length)+'张牌置于牌堆顶');
|
||||
}
|
||||
event.dialog.close();
|
||||
event.control.close();
|
||||
game.resume();
|
||||
_status.imchoosing=false;
|
||||
}
|
||||
else if(link=='pileTop'){
|
||||
event.status=true;
|
||||
event.dialog.content.childNodes[0].innerHTML='按顺序选择置于牌堆顶的牌';
|
||||
}
|
||||
else{
|
||||
event.status=false;
|
||||
event.dialog.content.childNodes[0].innerHTML='按顺序选择置于牌堆底的牌';
|
||||
}
|
||||
})
|
||||
for(var i=0;i<event.dialog.buttons.length;i++){
|
||||
event.dialog.buttons[i].classList.add('selectable');
|
||||
}
|
||||
event.custom.replace.button=function(link){
|
||||
var event=_status.event;
|
||||
if(link.classList.contains('target')){
|
||||
link.classList.remove('target');
|
||||
event.top.remove(link);
|
||||
}
|
||||
else if(link.classList.contains('glow')){
|
||||
link.classList.remove('glow');
|
||||
event.bottom.remove(link);
|
||||
}
|
||||
else if(event.status){
|
||||
link.classList.add('target');
|
||||
event.top.unshift(link);
|
||||
}
|
||||
else{
|
||||
link.classList.add('glow');
|
||||
event.bottom.push(link);
|
||||
}
|
||||
}
|
||||
event.custom.replace.window=function(){
|
||||
for(var i=0;i<_status.event.dialog.buttons.length;i++){
|
||||
_status.event.dialog.buttons[i].classList.remove('target');
|
||||
_status.event.dialog.buttons[i].classList.remove('glow');
|
||||
_status.event.top.length=0;
|
||||
_status.event.bottom.length=0;
|
||||
}
|
||||
}
|
||||
game.pause();
|
||||
game.countChoose();
|
||||
};
|
||||
event.switchToAuto=switchToAuto;
|
||||
|
||||
if(event.isMine()){
|
||||
chooseButton();
|
||||
event.finish();
|
||||
}
|
||||
else if(event.isOnline()){
|
||||
event.player.send(chooseButton,true,event.player,event.cards);
|
||||
event.player.wait();
|
||||
game.pause();
|
||||
}
|
||||
else{
|
||||
event.switchToAuto();
|
||||
event.finish();
|
||||
}
|
||||
"step 1"
|
||||
if(event.result=='ai'||!event.result){
|
||||
event.switchToAuto();
|
||||
}
|
||||
else{
|
||||
var top=event.result.top||[];
|
||||
var bottom=event.result.bottom||[];
|
||||
for(var i=0;i<top.length;i++){
|
||||
ui.cardPile.insertBefore(top[i],ui.cardPile.firstChild);
|
||||
}
|
||||
for(i=0;i<bottom.length;i++){
|
||||
ui.cardPile.appendChild(bottom[i]);
|
||||
}
|
||||
for(i=0;i<event.cards.length;i++){
|
||||
if(!top.contains(event.cards[i])&&!bottom.contains(event.cards[i])){
|
||||
ui.cardPile.appendChild(event.cards[i]);
|
||||
}
|
||||
}
|
||||
player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(event.cards.length-top.length)+'下');
|
||||
game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶');
|
||||
game.updateRoundNumber();
|
||||
game.delay(2);
|
||||
}
|
||||
game.delayx();
|
||||
},
|
||||
ai:{
|
||||
threaten:2.2
|
||||
|
|
832
character/sp2.js
|
@ -1062,225 +1062,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
},
|
||||
xinguanxing:{
|
||||
audio:'guanxing',
|
||||
// alter:true,
|
||||
trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']},
|
||||
frequent:true,
|
||||
filter:function(event,player,name){
|
||||
if(name=='phaseJieshuBegin'){
|
||||
return player.hasSkill('xinguanxing_on');
|
||||
}
|
||||
return true;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
if(get.is.altered('xinguanxing')){
|
||||
event.num=game.countPlayer()<4?3:5;
|
||||
}
|
||||
else{
|
||||
event.num=Math.min(5,game.countPlayer());
|
||||
}
|
||||
event.cards=get.cards(event.num);
|
||||
event.chosen=[];
|
||||
event.num1=0;
|
||||
event.num2=0;
|
||||
event.bottom=-1;
|
||||
'step 1'
|
||||
var js=player.getCards('j');
|
||||
var pos;
|
||||
var choice=-1;
|
||||
var getval=function(card,pos){
|
||||
if(js[pos]){
|
||||
return (get.judge(js[pos]))(card);
|
||||
}
|
||||
else if(event.triggername=='phaseJieshuBegin'&&get.attitude(player,player.getNext())<=0){
|
||||
return 11.5-get.value(card,player);
|
||||
}
|
||||
else{
|
||||
return get.value(card,player);
|
||||
}
|
||||
};
|
||||
event.discard=false;
|
||||
var minval=6;
|
||||
for(pos=0;pos<event.cards.length;pos++){
|
||||
var max=getval(event.cards[pos],pos);
|
||||
for(var j=pos+1;j<event.cards.length;j++){
|
||||
var current=getval(event.cards[j],pos);
|
||||
if(current>max){
|
||||
choice=j;
|
||||
max=current;
|
||||
}
|
||||
}
|
||||
if(event.bottom<0){
|
||||
if(!js[pos]){
|
||||
if(max<minval){
|
||||
event.bottom=pos;
|
||||
}
|
||||
}
|
||||
else if(max<0){
|
||||
event.bottom=pos;
|
||||
}
|
||||
}
|
||||
if(event.bottom>=0&&event.bottom<=pos){
|
||||
choice=pos;
|
||||
event.discard=true;break;
|
||||
}
|
||||
if(choice!=-1){
|
||||
break;
|
||||
}
|
||||
}
|
||||
player.chooseCardButton('观星:选择要移动的牌',event.cards).set('filterButton',function(button){
|
||||
return !_status.event.chosen.contains(button.link);
|
||||
}).set('chosen',event.chosen).set('ai',function(button){
|
||||
return button.link==_status.event.choice?1:0;
|
||||
}).set('choice',event.cards[choice]);
|
||||
event.pos=pos;
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
var card=result.links[0];
|
||||
var index=event.cards.indexOf(card);
|
||||
event.card=card;
|
||||
event.chosen.push(card);
|
||||
event.cards.remove(event.card);
|
||||
var controlai=event.pos||0;
|
||||
if(event.discard){
|
||||
controlai=event.cards.length+1;
|
||||
}
|
||||
var buttons=event.cards.slice(0);
|
||||
player.chooseControl(function(){
|
||||
return _status.event.controlai;
|
||||
}).set('controlai',controlai).set('sortcard',buttons).set('tosort',card);
|
||||
}
|
||||
else{
|
||||
event.goto(4);
|
||||
}
|
||||
'step 3'
|
||||
if(typeof result.index=='number'){
|
||||
if(result.index>event.cards.length){
|
||||
ui.cardPile.appendChild(event.card);
|
||||
event.num2++;
|
||||
}
|
||||
else{
|
||||
event.cards.splice(result.index,0,event.card);
|
||||
}
|
||||
event.num--;
|
||||
if(event.num>0){
|
||||
event.goto(1);
|
||||
}
|
||||
}
|
||||
'step 4'
|
||||
while(event.cards.length){
|
||||
ui.cardPile.insertBefore(event.cards.pop(),ui.cardPile.firstChild);
|
||||
event.num1++;
|
||||
}
|
||||
var js=player.getCards('j');
|
||||
if(js.length==1){
|
||||
if((get.judge(js[0]))(ui.cardPile.firstChild)<0){
|
||||
player.addTempSkill('guanxing_fail');
|
||||
}
|
||||
}
|
||||
player.popup(get.cnNumber(event.num1)+'上'+get.cnNumber(event.num2)+'下');
|
||||
game.log(player,'将','#y'+get.cnNumber(event.num1)+'张牌','置于牌堆顶,','#y'+get.cnNumber(event.num2)+'张牌','置于牌堆底');
|
||||
if(event.triggername=='phaseZhunbeiBegin'&&get.is.altered('xinguanxing')&&event.num1==0){
|
||||
player.addTempSkill('xinguanxing_on');
|
||||
}
|
||||
},
|
||||
subSkill:{
|
||||
on:{}
|
||||
}
|
||||
},
|
||||
guanxing_oldnew:{
|
||||
audio:2,
|
||||
audioname:['jiangwei'],
|
||||
trigger:{player:'phaseZhunbeiBegin'},
|
||||
frequent:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
event.num=Math.min(5,game.countPlayer());
|
||||
if(event.name!='yizhi'&&player.hasSkill('yizhi')) event.num=5;
|
||||
event.cards=get.cards(event.num);
|
||||
event.chosen=[];
|
||||
event.num1=0;
|
||||
event.num2=0;
|
||||
'step 1'
|
||||
var js=player.getCards('j');
|
||||
var pos;
|
||||
var choice=-1;
|
||||
var getval=function(card,pos){
|
||||
if(js[pos]){
|
||||
return (get.judge(js[pos]))(card);
|
||||
}
|
||||
else{
|
||||
return get.value(card);
|
||||
}
|
||||
};
|
||||
for(pos=0;pos<Math.min(event.cards.length,js.length+2);pos++){
|
||||
var max=getval(event.cards[pos],pos);
|
||||
for(var j=pos+1;j<event.cards.length;j++){
|
||||
var current=getval(event.cards[j],pos);
|
||||
if(current>max){
|
||||
choice=j;
|
||||
max=current;
|
||||
}
|
||||
}
|
||||
if(choice!=-1){
|
||||
break;
|
||||
}
|
||||
}
|
||||
player.chooseCardButton('观星:选择要移动的牌',event.cards).set('filterButton',function(button){
|
||||
return !_status.event.chosen.contains(button.link);
|
||||
}).set('chosen',event.chosen).set('ai',function(button){
|
||||
return button.link==_status.event.choice?1:0;
|
||||
}).set('choice',event.cards[choice]);
|
||||
event.pos=pos;
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
var card=result.links[0];
|
||||
var index=event.cards.indexOf(card);
|
||||
event.card=card;
|
||||
event.chosen.push(card);
|
||||
event.cards.remove(event.card);
|
||||
var buttons=event.cards.slice(0);
|
||||
player.chooseControl(function(){
|
||||
return _status.event.controlai;
|
||||
}).set('controlai',event.pos||0).set('sortcard',buttons).set('tosort',card);
|
||||
}
|
||||
else{
|
||||
event.goto(4);
|
||||
}
|
||||
'step 3'
|
||||
if(typeof result.index=='number'){
|
||||
if(result.index>event.cards.length){
|
||||
ui.cardPile.appendChild(event.card);
|
||||
event.num2++;
|
||||
}
|
||||
else{
|
||||
event.cards.splice(result.index,0,event.card);
|
||||
}
|
||||
event.num--;
|
||||
if(event.num>0){
|
||||
event.goto(1);
|
||||
}
|
||||
}
|
||||
'step 4'
|
||||
while(event.cards.length){
|
||||
ui.cardPile.insertBefore(event.cards.pop(),ui.cardPile.firstChild);
|
||||
event.num1++;
|
||||
}
|
||||
var js=player.getCards('j');
|
||||
if(js.length==1){
|
||||
if((get.judge(js[0]))(ui.cardPile.firstChild)<0){
|
||||
player.addTempSkill('guanxing_fail');
|
||||
}
|
||||
}
|
||||
player.popup(get.cnNumber(event.num1)+'上'+get.cnNumber(event.num2)+'下');
|
||||
game.log(player,'将','#y'+get.cnNumber(event.num1)+'张牌','置于牌堆顶,','#y'+get.cnNumber(event.num2)+'张牌','置于牌堆底');
|
||||
},
|
||||
ai:{
|
||||
guanxing:true
|
||||
}
|
||||
},
|
||||
guanxing_fail:{},
|
||||
guanxing:{
|
||||
audio:2,
|
||||
|
@ -1290,19 +1071,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
preHidden:true,
|
||||
content:function(){
|
||||
"step 0"
|
||||
if(player.isUnderControl()){
|
||||
game.swapPlayerAuto(player);
|
||||
}
|
||||
var num=Math.min(5,game.countPlayer());
|
||||
if(player.hasSkill('yizhi')&&player.hasSkill('guanxing')){
|
||||
num=5;
|
||||
}
|
||||
var cards=get.cards(num);
|
||||
event.cards=cards;
|
||||
var switchToAuto=function(){
|
||||
_status.imchoosing=false;
|
||||
if(event.dialog) event.dialog.close();
|
||||
if(event.control) event.control.close();
|
||||
game.cardsGotoOrdering(cards);
|
||||
var next=player.chooseToMove();
|
||||
next.set('list',[
|
||||
['牌堆顶',cards],
|
||||
['牌堆底'],
|
||||
]);
|
||||
next.set('prompt','观星:点击将牌移动到牌堆顶或牌堆底');
|
||||
next.processAI=function(list){
|
||||
var cards=list[0][1],player=_status.event.player;
|
||||
var top=[];
|
||||
var judges=player.getCards('j');
|
||||
var stopped=false;
|
||||
|
@ -1331,6 +1113,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
bottom=cards;
|
||||
return [top,bottom];
|
||||
}
|
||||
"step 1"
|
||||
var top=result.moved[0];
|
||||
var bottom=result.moved[1];
|
||||
top.reverse();
|
||||
for(var i=0;i<top.length;i++){
|
||||
ui.cardPile.insertBefore(top[i],ui.cardPile.firstChild);
|
||||
}
|
||||
|
@ -1339,141 +1127,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(bottom.length)+'下');
|
||||
game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶');
|
||||
game.delay(2);
|
||||
};
|
||||
var chooseButton=function(online,player,cards){
|
||||
var event=_status.event;
|
||||
player=player||event.player;
|
||||
cards=cards||event.cards;
|
||||
event.top=[];
|
||||
event.bottom=[];
|
||||
event.status=true;
|
||||
event.dialog=ui.create.dialog('按顺序选择置于牌堆顶的牌(先选择的在上)',cards);
|
||||
for(var i=0;i<event.dialog.buttons.length;i++){
|
||||
event.dialog.buttons[i].classList.add('pointerdiv');
|
||||
}
|
||||
event.switchToAuto=function(){
|
||||
event._result='ai';
|
||||
event.dialog.close();
|
||||
event.control.close();
|
||||
_status.imchoosing=false;
|
||||
},
|
||||
event.control=ui.create.control('ok','pileTop','pileBottom',function(link){
|
||||
var event=_status.event;
|
||||
if(link=='ok'){
|
||||
if(online){
|
||||
event._result={
|
||||
top:[],
|
||||
bottom:[]
|
||||
}
|
||||
for(var i=0;i<event.top.length;i++){
|
||||
event._result.top.push(event.top[i].link);
|
||||
}
|
||||
for(var i=0;i<event.bottom.length;i++){
|
||||
event._result.bottom.push(event.bottom[i].link);
|
||||
}
|
||||
}
|
||||
else{
|
||||
var i;
|
||||
for(i=0;i<event.top.length;i++){
|
||||
ui.cardPile.insertBefore(event.top[i].link,ui.cardPile.firstChild);
|
||||
}
|
||||
for(i=0;i<event.bottom.length;i++){
|
||||
ui.cardPile.appendChild(event.bottom[i].link);
|
||||
}
|
||||
for(i=0;i<event.dialog.buttons.length;i++){
|
||||
if(event.dialog.buttons[i].classList.contains('glow')==false&&
|
||||
event.dialog.buttons[i].classList.contains('target')==false)
|
||||
ui.cardPile.appendChild(event.dialog.buttons[i].link);
|
||||
}
|
||||
player.popup(get.cnNumber(event.top.length)+'上'+get.cnNumber(event.cards.length-event.top.length)+'下');
|
||||
game.log(player,'将'+get.cnNumber(event.top.length)+'张牌置于牌堆顶');
|
||||
}
|
||||
event.dialog.close();
|
||||
event.control.close();
|
||||
game.resume();
|
||||
_status.imchoosing=false;
|
||||
}
|
||||
else if(link=='pileTop'){
|
||||
event.status=true;
|
||||
event.dialog.content.childNodes[0].innerHTML='按顺序选择置于牌堆顶的牌';
|
||||
}
|
||||
else{
|
||||
event.status=false;
|
||||
event.dialog.content.childNodes[0].innerHTML='按顺序选择置于牌堆底的牌';
|
||||
}
|
||||
})
|
||||
for(var i=0;i<event.dialog.buttons.length;i++){
|
||||
event.dialog.buttons[i].classList.add('selectable');
|
||||
}
|
||||
event.custom.replace.button=function(link){
|
||||
var event=_status.event;
|
||||
if(link.classList.contains('target')){
|
||||
link.classList.remove('target');
|
||||
event.top.remove(link);
|
||||
}
|
||||
else if(link.classList.contains('glow')){
|
||||
link.classList.remove('glow');
|
||||
event.bottom.remove(link);
|
||||
}
|
||||
else if(event.status){
|
||||
link.classList.add('target');
|
||||
event.top.unshift(link);
|
||||
}
|
||||
else{
|
||||
link.classList.add('glow');
|
||||
event.bottom.push(link);
|
||||
}
|
||||
}
|
||||
event.custom.replace.window=function(){
|
||||
for(var i=0;i<_status.event.dialog.buttons.length;i++){
|
||||
_status.event.dialog.buttons[i].classList.remove('target');
|
||||
_status.event.dialog.buttons[i].classList.remove('glow');
|
||||
_status.event.top.length=0;
|
||||
_status.event.bottom.length=0;
|
||||
}
|
||||
}
|
||||
game.pause();
|
||||
game.countChoose();
|
||||
};
|
||||
event.switchToAuto=switchToAuto;
|
||||
|
||||
if(event.isMine()){
|
||||
chooseButton();
|
||||
event.finish();
|
||||
}
|
||||
else if(event.isOnline()){
|
||||
event.player.send(chooseButton,true,event.player,event.cards);
|
||||
event.player.wait();
|
||||
game.pause();
|
||||
}
|
||||
else{
|
||||
event.switchToAuto();
|
||||
event.finish();
|
||||
}
|
||||
"step 1"
|
||||
if(event.result=='ai'||!event.result){
|
||||
event.switchToAuto();
|
||||
}
|
||||
else{
|
||||
var top=event.result.top||[];
|
||||
var bottom=event.result.bottom||[];
|
||||
for(var i=0;i<top.length;i++){
|
||||
ui.cardPile.insertBefore(top[i],ui.cardPile.firstChild);
|
||||
}
|
||||
for(i=0;i<event.cards.length;i++){
|
||||
if(!top.contains(event.cards[i])&&!bottom.contains(event.cards[i])){
|
||||
ui.cardPile.appendChild(event.cards[i]);
|
||||
}
|
||||
}
|
||||
for(i=0;i<bottom.length;i++){
|
||||
ui.cardPile.appendChild(bottom[i]);
|
||||
}
|
||||
player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(event.cards.length-top.length)+'下');
|
||||
game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶');
|
||||
game.updateRoundNumber();
|
||||
game.delay(2);
|
||||
}
|
||||
game.delayx();
|
||||
},
|
||||
ai:{
|
||||
threaten:1.2
|
||||
|
@ -2899,9 +2554,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
wusheng_info:'你可以将一张红色牌当做【杀】使用或打出。',
|
||||
paoxiao_info:'锁定技,出牌阶段,你使用【杀】没有数量限制。',
|
||||
guanxing_info:'准备阶段,你可以观看牌堆顶的X张牌,并将其以任意顺序置于牌堆项或牌堆底。(X为存活角色数且至多为5)',
|
||||
xinguanxing:'观星',
|
||||
xinguanxing_info:'准备阶段,你可以观看牌堆顶的x张牌,并将其以任意顺序置于牌堆项或牌堆底,x为存活角色个数且不超过5',
|
||||
xinguanxing_info_alter:'准备阶段,你可以观看牌堆顶的5张牌(存活角色小于4时改为3张),并将其以任意顺序置于牌堆项或牌堆底,如果你把观星的牌都放在牌堆底,你可以在结束阶段再进行1次观星',
|
||||
kongcheng_info:'锁定技,当你没有手牌时,你不能成为【杀】或【决斗】的目标。',
|
||||
longdan_info:'你可以将【杀】当做【闪】,或将【闪】当做【杀】使用或打出。',
|
||||
mashu_info:'锁定技,你计算与其他角色的距离时-1。',
|
||||
|
|
|
@ -5,12 +5,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
connect:true,
|
||||
characterSort:{
|
||||
tw:{
|
||||
tw_mobile:['tw_beimihu','nashime','tw_gexuan','tw_dongzhao','jiachong','duosidawang','wuban','yuejiu','tw_fuwan'],
|
||||
tw_mobile:['tw_beimihu','nashime','tw_gexuan','tw_dongzhao','jiachong','duosidawang','wuban','yuejiu','tw_fuwan','tw_yujin','tw_zhaoxiang'],
|
||||
tw_yijiang:['tw_caoang','tw_caohong','tw_zumao','tw_dingfeng','tw_maliang','tw_xiahouba'],
|
||||
tw_english:['kaisa'],
|
||||
},
|
||||
},
|
||||
character:{
|
||||
tw_yujin:['male','qun',4,['xinzhenjun']],
|
||||
tw_fuwan:['male','qun',4,['twmoukui']],
|
||||
tw_zhaoxiang:['female','shu',4,['refanghun','twfuhan','twqueshi']],
|
||||
yuejiu:['male','qun',4,['cuijin']],
|
||||
|
@ -148,6 +149,90 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
skill:{
|
||||
xinzhenjun:{
|
||||
audio:2,
|
||||
trigger:{
|
||||
player:'phaseUseBegin'
|
||||
},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return player.countCards('he')>0;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseCardTarget({
|
||||
filterCard:true,
|
||||
filterTarget:lib.filter.notMe,
|
||||
position:'he',
|
||||
prompt:get.prompt2('xinzhenjun'),
|
||||
ai1:function(card){
|
||||
var player=_status.event.player;
|
||||
if(card.name=='sha'&&get.color(card)=='red'){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
var current=game.players[i];
|
||||
if(current!=player&&get.attitude(player,current)>0&¤t.hasValueTarget(card)) return 7;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 7-get.value(card);
|
||||
},
|
||||
ai2:function(target){
|
||||
var player=_status.event.player;
|
||||
var card=ui.selected.cards[0];
|
||||
var att=get.attitude(player,target);
|
||||
if(get.value(card)<0) return -att*2;
|
||||
if(target.countCards('h',{name:'sha',color:'red'})||target.hasSkill('wusheng')||target.hasSkill('new_rewusheng')||target.hasSkill('wushen')||(card.name=='sha'&&get.color(card)=='red'&&target.hasValueTarget(card))) return att*2;
|
||||
var eff=0;
|
||||
game.countPlayer(function(current){
|
||||
if(target!=current&&get.distance(target,current,'attack')>1) return;
|
||||
var eff2=get.damageEffect(current,player,player);
|
||||
if(eff2>eff) eff=eff2;
|
||||
});
|
||||
if(att>0&&eff>0) eff+=2*att;
|
||||
return eff;
|
||||
},
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
event.target=target;
|
||||
player.logSkill('xinzhenjun',target);
|
||||
target.gain(result.cards,player,'giveAuto')
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
target.chooseToUse({
|
||||
filterCard:function(card){
|
||||
return get.name(card)=='sha'&&get.color(card)!='black'&&lib.filter.cardEnabled.apply(this,arguments);
|
||||
},
|
||||
prompt:'请使用一张不为黑色的【杀】,否则'+get.translation(player)+'可以对你或你攻击范围内的一名其他角色造成1点伤害',
|
||||
});
|
||||
'step 3'
|
||||
if(result.bool){
|
||||
var num=1;
|
||||
game.countPlayer2(function(current){
|
||||
current.getHistory('damage',function(evt){
|
||||
if(evt.getParent(evt.notLink()?4:8)==event) num+=evt.num;
|
||||
});
|
||||
});
|
||||
player.draw(num);
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
player.chooseTarget('是否对'+get.translation(target)+'或其攻击范围内的一名角色造成1点伤害?',function(card,player,target){
|
||||
return target==_status.event.targetx||_status.event.targetx.inRange(target);
|
||||
}).set('targetx',event.target).ai=function(target){
|
||||
var player=_status.event.player;
|
||||
return get.damageEffect(target,player,player)
|
||||
};
|
||||
}
|
||||
'step 4'
|
||||
if(result.bool){
|
||||
player.line(result.targets);
|
||||
result.targets[0].damage('nocard');
|
||||
}
|
||||
},
|
||||
},
|
||||
twmoukui:{
|
||||
trigger:{player:'useCardToPlayered'},
|
||||
direct:true,
|
||||
|
@ -1643,6 +1728,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
tw_fuwan:'TW伏完',
|
||||
twmoukui:'谋溃',
|
||||
twmoukui_info:'当你使用【杀】指定目标后,你可以选择一项:①摸一张牌;②弃置该角色的一张牌;③背水:若此【杀】未因造成伤害而令该角色进入过濒死状态,则该角色弃置你的一张牌。',
|
||||
tw_yujin:'SP于禁',
|
||||
xinzhenjun:'镇军',
|
||||
xinzhenjun_info:'出牌阶段开始时,你可以将一张牌交给一名其他角色,令其选择是否使用一张不为黑色的【杀】。若其选择是,则你于此【杀】结算完成后摸1+X张牌(X为此【杀】造成的伤害总点数)。若其选择否,则你对其或其攻击范围内的一名其他角色造成1点伤害。',
|
||||
tw_mobile:'移动版',
|
||||
tw_yijiang:'一将成名TW',
|
||||
tw_english:'英文版',
|
||||
|
|
|
@ -6,7 +6,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
//connectBanned:['qinmi'],
|
||||
characterSort:{
|
||||
yijiang:{
|
||||
yijiang_2011:['caozhi','re_yujin','zhangchunhua','xin_fazheng','xin_masu','xin_xushu','xusheng','lingtong','wuguotai','chengong','gaoshun'],
|
||||
yijiang_2011:['caozhi','yujin','zhangchunhua','xin_fazheng','xin_masu','xin_xushu','xusheng','lingtong','wuguotai','chengong','gaoshun'],
|
||||
yijiang_2012:['old_wangyi','xunyou','zhonghui','madai','liaohua','old_guanzhang','bulianshi','handang','chengpu','liubiao','old_huaxiong','caozhang'],
|
||||
yijiang_2013:['manchong','guohuai','caochong','guanping','liufeng','jianyong','yufan','panzhangmazhong','zhuran','xin_liru','fuhuanghou'],
|
||||
yijiang_2014:['hanhaoshihuan','chenqun','caozhen','zhangsong','wuyi','zhoucang','zhuhuan','guyong','sunluban','yj_jushou','caifuren'],
|
||||
|
@ -96,7 +96,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
|
||||
old_huaxiong:['male','qun',6,['shiyong']],
|
||||
|
||||
re_yujin:["male","wei",4,["xinzhenjun"],[]],
|
||||
yujin:["male","wei",4,["yizhong"],[]],
|
||||
},
|
||||
characterIntro:{
|
||||
caozhi:'字子建,沛国谯人,三国曹魏著名文学家,建安文学代表人物。魏武帝曹操之子,魏文帝曹丕之弟,生前曾为陈王,去世后谥号“思”,因此又称陈思王。南朝宋文学家谢灵运更有“天下才有一石,曹子建独占八斗”的评价。王士祯尝论汉魏以来二千年间诗家堪称“仙才”者,曹植、李白、苏轼三人耳。',
|
||||
|
@ -912,106 +912,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
},
|
||||
xinzhenjun:{
|
||||
audio:'jieyue',
|
||||
trigger:{
|
||||
player:'phaseUseBegin'
|
||||
},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return player.countCards('he')>0;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseCardTarget({
|
||||
filterCard:true,
|
||||
filterTarget:lib.filter.notMe,
|
||||
position:'he',
|
||||
prompt:get.prompt2('xinzhenjun'),
|
||||
ai1:function(card){
|
||||
var player=_status.event.player;
|
||||
if(card.name=='sha'&&get.color(card)=='red'){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
var current=game.players[i];
|
||||
if(current!=player&&get.attitude(player,current)>0&¤t.hasValueTarget(card)) return 7;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 7-get.value(card);
|
||||
},
|
||||
ai2:function(target){
|
||||
var player=_status.event.player;
|
||||
var card=ui.selected.cards[0];
|
||||
var att=get.attitude(player,target);
|
||||
if(get.value(card)<0) return -att*2;
|
||||
if(target.countCards('h',{name:'sha',color:'red'})||target.hasSkill('wusheng')||target.hasSkill('new_rewusheng')||target.hasSkill('wushen')||(card.name=='sha'&&get.color(card)=='red'&&target.hasValueTarget(card))) return att*2;
|
||||
var eff=0;
|
||||
game.countPlayer(function(current){
|
||||
if(target!=current&&get.distance(target,current,'attack')>1) return;
|
||||
var eff2=get.damageEffect(current,player,player);
|
||||
if(eff2>eff) eff=eff2;
|
||||
});
|
||||
if(att>0&&eff>0) eff+=2*att;
|
||||
return eff;
|
||||
},
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
event.target=target;
|
||||
player.logSkill('xinzhenjun',target);
|
||||
target.gain(result.cards,player,'giveAuto')
|
||||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
target.chooseToUse({
|
||||
filterCard:function(card){
|
||||
return get.name(card)=='sha'&&get.color(card)!='black'&&lib.filter.cardEnabled.apply(this,arguments);
|
||||
},
|
||||
prompt:'请使用一张不为黑色的【杀】,否则'+get.translation(player)+'可以对你或你攻击范围内的一名其他角色造成1点伤害',
|
||||
});
|
||||
'step 3'
|
||||
if(result.bool){
|
||||
var num=1;
|
||||
game.countPlayer2(function(current){
|
||||
current.getHistory('damage',function(evt){
|
||||
if(evt.getParent(evt.notLink()?4:8)==event) num+=evt.num;
|
||||
});
|
||||
});
|
||||
player.draw(num);
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
player.chooseTarget('是否对'+get.translation(target)+'或其攻击范围内的一名角色造成1点伤害?',function(card,player,target){
|
||||
return target==_status.event.targetx||_status.event.targetx.inRange(target);
|
||||
}).set('targetx',event.target).ai=function(target){
|
||||
var player=_status.event.player;
|
||||
return get.damageEffect(target,player,player)
|
||||
};
|
||||
}
|
||||
'step 4'
|
||||
if(result.bool){
|
||||
player.line(result.targets);
|
||||
result.targets[0].damage('nocard');
|
||||
}
|
||||
},
|
||||
//group:['xinzhenjun_damage'],
|
||||
subSkill:{
|
||||
damage:{
|
||||
trigger:{global:'damage'},
|
||||
forced:true,
|
||||
silent:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
var evt=event.getParent(event.notLink()?4:8);
|
||||
return evt&&evt.name=='xinzhenjun'&&evt.player==player;
|
||||
},
|
||||
content:function(){
|
||||
player.draw(trigger.num);
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
xinfuli:{
|
||||
audio:2,
|
||||
skillAnimation:true,
|
||||
|
@ -2858,9 +2758,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{player:'phaseDrawAfter'},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return player.storage.bizhuan&&player.storage.bizhuan.length;
|
||||
return player.storage.bizhuan&&player.storage.bizhuan.length&&player.countCards('he')>0;
|
||||
},
|
||||
locked:false,
|
||||
content:function(){
|
||||
"step 0"
|
||||
var four=false;
|
||||
|
@ -2876,122 +2775,78 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
}
|
||||
var suits2=[];
|
||||
if(four){
|
||||
suits2=['club','spade','heart','diamond'];
|
||||
for(var i=0;i<player.storage.bizhuan.length;i++){
|
||||
suits2.remove(get.suit(player.storage.bizhuan[i]));
|
||||
var next=player.chooseToMove('通博:是否交换“书”和手牌?').set('four',four).set('suits2',suits2).set('nofour',nofour);
|
||||
next.set('list',[
|
||||
[get.translation(player)+'(你)的“书”',player.storage.bizhuan],
|
||||
['你的牌',player.getCards('he')],
|
||||
]);
|
||||
next.set('filterMove',function(from,to){
|
||||
return typeof to!='number';
|
||||
});
|
||||
next.set('processAI',function(list){
|
||||
var player=_status.event.player,cards=list[0][1].concat(list[1][1]),cards2=[];
|
||||
if(_status.event.four){
|
||||
var sorted=[[],[],[],[]];
|
||||
for(var i of cards){
|
||||
var index=lib.suit.indexOf(get.suit(i,false));
|
||||
if(sorted[index]) sorted[index].push(i);
|
||||
}
|
||||
}
|
||||
player.chooseCard('选择任意张牌与“书”交换',[1,Math.min(player.countCards('he'),player.storage.bizhuan.length)],'he').set('ai',function(card){
|
||||
var val=get.value(card);
|
||||
if(_status.event.four&&!_status.event.nofour){
|
||||
var suits=_status.event.suits2.slice(0);
|
||||
for(var i=0;i<ui.selected.cards.length;i++){
|
||||
suits.remove(get.suit(ui.selected.cards[i]));
|
||||
}
|
||||
if(suits.contains(get.suit(card))){
|
||||
if(val<0) return 10;
|
||||
return 1;
|
||||
if(_status.event.nofour){
|
||||
sorted.sort(function(a,b){
|
||||
return a.length-b.length;
|
||||
});
|
||||
var cards3=cards.slice(0).sort(function(a,b){
|
||||
return get.useful(a)-get.useful(b);
|
||||
});
|
||||
cards3.removeArray(sorted[0]);
|
||||
cards2=cards3.slice(0,4);
|
||||
cards.removeArray(cards2);
|
||||
}
|
||||
else{
|
||||
return 0;
|
||||
for(var i of sorted){
|
||||
cards2.push(i.randomGet());
|
||||
cards.remove(cards2);
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(val<0) return 10;
|
||||
if(_status.event.player.skipList.contains('phaseUse')){
|
||||
return val;
|
||||
cards.sort(function(a,b){
|
||||
return get.useful(a)-get.useful(b);
|
||||
});
|
||||
cards2=cards.splice(0,player.storage.bizhuan.length);
|
||||
}
|
||||
return 10-val;
|
||||
}
|
||||
}).set('four',four).set('suits2',suits2).set('nofour',nofour).set('promptx',[player.storage.bizhuan]);
|
||||
event.four=four;
|
||||
event.nofour=nofour;
|
||||
return [cards2,cards];
|
||||
});
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.logSkill('tongbo');
|
||||
player.lose(result.cards,ui.special,'toStorage');
|
||||
player.storage.bizhuan=player.storage.bizhuan.concat(result.cards);
|
||||
player.syncStorage('bizhuan');
|
||||
event.num=result.cards.length;
|
||||
}
|
||||
else{
|
||||
var pushs=result.moved[0],gains=result.moved[1];
|
||||
pushs.removeArray(player.storage.bizhuan);
|
||||
gains.removeArray(player.getCards('he'));
|
||||
if(!pushs.length||pushs.length!=gains.length){
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
player.logSkill('tongbo');
|
||||
player.lose(pushs,ui.special,'toStorage');
|
||||
game.log(player,'将',pushs,'作为“星”置于武将牌上');
|
||||
player.gain(gains,'gain2','log','fromStorage');
|
||||
player.storage.bizhuan.addArray(pushs);
|
||||
player.storage.bizhuan.removeArray(gains);
|
||||
player.markSkill('bizhuan');
|
||||
}
|
||||
"step 2"
|
||||
var suits2={
|
||||
heart:0,
|
||||
diamond:0,
|
||||
spade:0,
|
||||
club:0
|
||||
};
|
||||
for(var i=0;i<player.storage.bizhuan.length;i++){
|
||||
suits2[get.suit(player.storage.bizhuan[i])]++;
|
||||
}
|
||||
player.chooseCardButton(player.storage.bizhuan,'选择'+event.num+'张牌作为手牌',event.num,true).set('ai',function(button){
|
||||
var val=get.value(button.link);
|
||||
if(_status.event.four||_status.event.nofour){
|
||||
var suits=get.copy(_status.event.suits2);
|
||||
for(var i=0;i<ui.selected.buttons.length;i++){
|
||||
suits[get.suit(ui.selected.buttons[i].link)]--;
|
||||
}
|
||||
var num=suits[get.suit(button.link)];
|
||||
if(_status.event.nofour){
|
||||
for(var i in suits){
|
||||
if(suits[i]==0) return val;
|
||||
}
|
||||
if(num!=2){
|
||||
if(val<=0) return 0.01;
|
||||
return val;
|
||||
}
|
||||
else{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(num>1){
|
||||
if(val<=0) return 0.01;
|
||||
return val;
|
||||
}
|
||||
else{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(val<0) return -10;
|
||||
if(_status.event.player.skipList.contains('phaseUse')){
|
||||
return -val;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
}).set('four',event.four).set('suits2',suits2).set('nofour',event.nofour);
|
||||
if(player==game.me&&!event.isMine()){
|
||||
game.delay(0.5);
|
||||
}
|
||||
"step 3"
|
||||
player.gain(result.links,'fromStorage');
|
||||
for(var i=0;i<result.links.length;i++){
|
||||
player.storage.bizhuan.remove(result.links[i]);
|
||||
}
|
||||
player.syncStorage('bizhuan');
|
||||
if(player==game.me&&_status.auto){
|
||||
game.delay(0.5);
|
||||
}
|
||||
"step 4"
|
||||
suits2=['club','spade','heart','diamond'];
|
||||
var suits2=['club','spade','heart','diamond'];
|
||||
for(var i=0;i<player.storage.bizhuan.length;i++){
|
||||
suits2.remove(get.suit(player.storage.bizhuan[i]));
|
||||
}
|
||||
if(suits2.length>0){
|
||||
event.finish();
|
||||
}
|
||||
"step 5"
|
||||
"step 3"
|
||||
event.cards=player.storage.bizhuan.slice(0);
|
||||
player.storage.bizhuan.length=0;
|
||||
player.unmarkSkill('bizhuan');
|
||||
"step 6"
|
||||
"step 4"
|
||||
if(event.cards.length>1){
|
||||
player.chooseCardButton('将所有“书”交给任意名其他角色',true,event.cards,[1,event.cards.length]).set('ai',function(button){
|
||||
if(ui.selected.buttons.length==0) return 1;
|
||||
|
@ -3004,7 +2859,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else{
|
||||
event.finish();
|
||||
}
|
||||
"step 7"
|
||||
"step 5"
|
||||
if(result.bool){
|
||||
for(var i=0;i<result.links.length;i++){
|
||||
event.cards.remove(result.links[i]);
|
||||
|
@ -3028,12 +2883,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else{
|
||||
event.finish();
|
||||
}
|
||||
"step 8"
|
||||
"step 6"
|
||||
if(result.targets.length){
|
||||
result.targets[0].gain(event.togive,'draw');
|
||||
player.line(result.targets[0],'green');
|
||||
game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张','#g“书”');
|
||||
event.goto(6);
|
||||
if(event.cards.length) event.goto(4);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
@ -10209,7 +10064,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return false;
|
||||
},
|
||||
direct:true,
|
||||
check:function(trigger,player){
|
||||
if(trigger.getParent(3).name!='phaseDiscard'||!game.hasPlayer(function(current){
|
||||
return current.isDamaged()&&get.recoverEffect(current,player,player)>0;
|
||||
}))
|
||||
for(var i=0;i<trigger.cards2.length;i++){
|
||||
if(get.position(trigger.cards2[i],true)=='d'&&get.type(trigger.cards2[i],false)=='equip'){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
var cards=[];
|
||||
|
@ -10218,16 +10083,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
cards.push(trigger.cards2[i]);
|
||||
}
|
||||
}
|
||||
player.chooseCardButton(cards,[1,cards.length],'纵玄:将弃置的牌按任意顺序置于牌堆顶(先选择的在上)').set('ai',function(){
|
||||
return -1;
|
||||
var next=player.chooseToMove('纵玄:将任意张牌置于牌堆顶',true);
|
||||
next.set('list',[
|
||||
['本次弃置的牌',cards],
|
||||
['牌堆顶'],
|
||||
]);
|
||||
next.set('filterOk',function(moved){
|
||||
return moved[1].length>0;
|
||||
});
|
||||
"step 1"
|
||||
if(result&&result.bool&&result.links&&result.links.length){
|
||||
var cards=result.links.slice(0);
|
||||
while(cards.length){
|
||||
ui.cardPile.insertBefore(cards.pop(),ui.cardPile.firstChild);
|
||||
next.set('processAI',function(list){
|
||||
var cards=list[0][1].slice(0),cards2=cards.filter(function(i){
|
||||
return get.type(i,false)=='equip';
|
||||
}),cards3;
|
||||
if(cards2.length){
|
||||
cards3=cards2.randomGet();
|
||||
}
|
||||
player.logSkill(event.name);
|
||||
else cards3=cards.randomGet();
|
||||
return [[],[cards3]];
|
||||
})
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var cards=result.moved[1];
|
||||
game.log(player,'将',cards,'置于了牌堆顶');
|
||||
while(cards.length) ui.cardPile.insertBefore(cards.pop().fix(),ui.cardPile.firstChild)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -12254,7 +12132,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
characterReplace:{
|
||||
caozhi:['re_caozhi','caozhi'],
|
||||
zhangchunhua:['re_zhangchunhua','zhangchunhua','mini_zhangchunhua'],
|
||||
yujin:['yujin_yujin','re_yujin','ol_yujin','xin_yujin','yujin'],
|
||||
yujin:['yujin_yujin','ol_yujin','xin_yujin','yujin'],
|
||||
xushu:['re_xushu','xin_xushu','xushu'],
|
||||
fazheng:['re_fazheng','xin_fazheng','fazheng'],
|
||||
masu:['xin_masu','re_masu','masu'],
|
||||
|
@ -12314,7 +12192,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xunyou:'荀攸',
|
||||
liubiao:'刘表',
|
||||
zhuran:'朱然',
|
||||
yujin:'毅重于禁',
|
||||
yujin:'于禁',
|
||||
masu:'旧马谡',
|
||||
xin_masu:'马谡',
|
||||
xin_fazheng:'法正',
|
||||
|
@ -12393,8 +12271,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"zhenjun_info":"准备阶段,你可以弃置一名手牌数多于体力值的角色的X张牌(X为其手牌数和体力值之差),然后选择一项:1.你弃置等同于其中非装备牌数量的牌;2.其摸等量的牌。",
|
||||
rezhenjun:"镇军",
|
||||
rezhenjun_info:"准备阶段,你可以弃置一名角色的X张牌(X为其手牌数和体力值之差且至少为1),然后选择一项:1.你弃置X张牌;2.其摸X张牌。(X为其弃置的牌中非装备牌的数量)",
|
||||
xinzhenjun:'镇军',
|
||||
xinzhenjun_info:'出牌阶段开始时,你可以将一张牌交给一名其他角色,令其选择是否使用一张不为黑色的【杀】。若其选择是,则你于此【杀】结算完成后摸1+X张牌(X为此【杀】造成的伤害总点数)。若其选择否,则你对其或其攻击范围内的一名其他角色造成1点伤害。',
|
||||
fenli:'奋励',
|
||||
fenli_info:'若你的手牌数为全场最多,你可以跳过摸牌阶段;若你的体力值为全场最多,你可以跳过出牌阶段;若你的装备区里有牌且数量为全场最多,你可以跳过弃牌阶段。',
|
||||
pingkou:'平寇',
|
||||
|
|
|
@ -15,7 +15,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
jin_yanghuiyu:['female','jin',3,['huirong','ciwei','caiyuan'],['hiddenSkill']],
|
||||
shibao:['male','jin',4,['zhuosheng']],
|
||||
jin_zhangchunhua:['female','jin',3,['huishi','qingleng','xuanmu'],['hiddenSkill']],
|
||||
jin_simayi:['male','jin',3,['buchen','smyyingshi','xiongzhi','quanbian'],['hiddenSkill']],
|
||||
jin_simayi:['male','jin',3,['buchen','smyyingshi','xiongzhi','xinquanbian'],['hiddenSkill']],
|
||||
jin_wangyuanji:['female','jin',3,['shiren','yanxi'],['hiddenSkill']],
|
||||
jin_simazhao:['male','jin',3,['tuishi','xinchoufa','zhaoran','chengwu'],['zhu','hiddenSkill']],
|
||||
jin_xiahouhui:['female','jin',3,['baoqie','jyishi','shiduo'],['hiddenSkill']],
|
||||
|
@ -1484,25 +1484,51 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
'step 0'
|
||||
var cards=get.cards(Math.min(5,player.maxHp));
|
||||
event.cards=cards;
|
||||
game.cardsGotoOrdering(cards);
|
||||
var suit=get.suit(trigger.card);
|
||||
player.chooseButton(['权变:获得一张不为'+get.translation(suit)+'花色的牌',cards]).set('suit',suit).set('filterButton',function(button){
|
||||
return get.suit(button)!=_status.event.suit;
|
||||
var next=player.chooseToMove('权变:获得一张不为'+get.translation(suit)+'花色的牌并排列其他牌');
|
||||
next.set('suit',suit);
|
||||
next.set('list',[
|
||||
['牌堆顶',cards],
|
||||
['获得'],
|
||||
])
|
||||
next.set('filterMove',function(from,to,moved){
|
||||
var suit=_status.event.suit;
|
||||
if(moved[0].contains(from.link)){
|
||||
if(typeof to=='number'){
|
||||
if(to==1){
|
||||
if(moved[1].length) return false;
|
||||
return get.suit(from.link,false)!=suit;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if(moved[1].contains(to.link)) return get.suit(from.link,false)!=suit;
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
if(typeof to=='number') return true;
|
||||
return get.suit(to.link,false)!=suit;
|
||||
}
|
||||
});
|
||||
next.set('processAI',function(list){
|
||||
var cards=list[0][1].slice(0).sort(function(a,b){
|
||||
return get.value(b)-get.value(a);
|
||||
}),gains=[];
|
||||
for(var i of cards){
|
||||
if(get.suit(i,false)!=_status.event.suit){
|
||||
cards.remove(i);
|
||||
gains.push(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return [cards,gains];
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var card=result.links[0];
|
||||
cards.remove(card);
|
||||
player.gain(card,'gain2','log');
|
||||
if(!cards.length) event.finish();
|
||||
}
|
||||
'step 2'
|
||||
player.chooseCardButton(cards.length,true,cards,'按顺序将卡牌置于牌堆顶(先选择的在上)');
|
||||
'step 3'
|
||||
if(result.bool){
|
||||
var list=result.links.slice(0);
|
||||
while(list.length){
|
||||
ui.cardPile.insertBefore(list.pop(),ui.cardPile.firstChild);
|
||||
var list=result.moved;
|
||||
if(list[1].length) player.gain(list[1],'gain2');
|
||||
while(list[0].length){
|
||||
ui.cardPile.insertBefore(list[0].pop(),ui.cardPile.firstChild);
|
||||
}
|
||||
game.updateRoundNumber();
|
||||
}
|
||||
|
@ -2379,21 +2405,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
'step 0'
|
||||
trigger.changeToZero();
|
||||
event.cards=game.cardsGotoOrdering(get.cards(ui.cardPile.childElementCount%10)).cards;
|
||||
var num=Math.ceil(event.cards.length/2);
|
||||
var str='按顺序将卡牌置于牌堆底';
|
||||
if(event.cards.length>num) str='按顺序将'+get.cnNumber(num)+'张牌置于牌堆底,然后获得其余的牌';
|
||||
player.chooseButton([str,'<div class="text center">(先选择的在上)</div>',event.cards],true,num).set('ai',function(card){
|
||||
return -get.value(card);
|
||||
var cards=game.cardsGotoOrdering(get.cards(ui.cardPile.childElementCount%10)).cards;
|
||||
var num=Math.ceil(cards.length/2);
|
||||
var next=player.chooseToMove('慧识:将'+get.cnNumber(num)+'张牌置于牌堆底并获得其余的牌',true);
|
||||
next.set('list',[
|
||||
['牌堆顶的展示牌',cards],
|
||||
['牌堆底'],
|
||||
]);
|
||||
next.set('filterMove',function(from,to,moved){
|
||||
if(moved[0].contains(from)&&to==1) return moved[1].length<_status.event.num;
|
||||
return true;
|
||||
});
|
||||
next.set('filterOk',function(moved){
|
||||
return moved[1].length==_status.event.num;
|
||||
});
|
||||
next.set('num',num);
|
||||
next.set('processAI',function(list){
|
||||
var cards=list[0][1].slice(0).sort(function(a,b){
|
||||
return get.value(b)-get.useful(a);
|
||||
});
|
||||
return [cards,cards.splice(cards.length-_status.event.num)];
|
||||
});
|
||||
'step 1'
|
||||
for(var i of result.links){
|
||||
cards.remove(i);
|
||||
i.fix();
|
||||
ui.cardPile.appendChild(i);
|
||||
if(result.bool){
|
||||
var list=result.moved;
|
||||
if(list[0].length) player.gain(list[0],'gain2');
|
||||
while(list[1].length) ui.cardPile.appendChild(list[1].shift().fix());
|
||||
}
|
||||
game.updateRoundNumber();
|
||||
if(cards.length) player.gain(cards,'gain2','log');
|
||||
},
|
||||
},
|
||||
qingleng:{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
window.noname_asset_list=[
|
||||
'v1.9.110.10.1',
|
||||
'v1.9.111',
|
||||
'audio/background/aozhan_chaoming.mp3',
|
||||
'audio/background/aozhan_online.mp3',
|
||||
'audio/background/aozhan_rewrite.mp3',
|
||||
|
@ -4639,6 +4639,13 @@ window.noname_asset_list=[
|
|||
'image/character/yangyan.jpg',
|
||||
'image/character/yangzhi.jpg',
|
||||
'image/character/zuofen.jpg',
|
||||
'image/character/re_kanze.jpg',
|
||||
'image/character/liuyong.jpg',
|
||||
'image/character/re_xunchen.jpg',
|
||||
'image/character/tongyuan.jpg',
|
||||
'image/character/tw_yujin.jpg',
|
||||
'image/character/wanniangongzhu.jpg',
|
||||
'image/character/zhangning.jpg',
|
||||
|
||||
'image/character/baiwuchang.jpg',
|
||||
'image/character/baosanniang.jpg',
|
||||
|
|
318
game/game.js
|
@ -7398,7 +7398,7 @@
|
|||
str+='\n-------------';
|
||||
str+='\n'+line;
|
||||
str+='\n'+column;
|
||||
if(err&&err.stack) str+='\n'+err.stack;
|
||||
if(err&&err.stack) str+='\n'+decodeURI(err.stack);
|
||||
alert(str);
|
||||
window.ea=Array.from(arguments);
|
||||
window.em=msg;
|
||||
|
@ -7408,7 +7408,7 @@
|
|||
game.print(msg);
|
||||
game.print(line);
|
||||
game.print(column);
|
||||
game.print(err.stack);
|
||||
game.print(decodeURI(err.stack));
|
||||
if(!lib.config.errstop){
|
||||
_status.withError=true;
|
||||
game.loop();
|
||||
|
@ -10369,6 +10369,137 @@
|
|||
emptyEvent:function(){
|
||||
event.trigger(event.name);
|
||||
},
|
||||
chooseToMove:function(){
|
||||
'step 0'
|
||||
if(event.chooseTime&&_status.connectMode&&!game.online){
|
||||
event.time=lib.configOL.choose_timeout;
|
||||
game.broadcastAll(function(time){
|
||||
lib.configOL.choose_timeout=time;
|
||||
},event.chooseTime);
|
||||
}
|
||||
if(event.isMine()){
|
||||
var list=event.list,filterMove=event.filterMove,filterOk=event.filterOk;
|
||||
_status.imchoosing=true;
|
||||
var event=_status.event;
|
||||
event.settleed=false;
|
||||
event.dialog=ui.create.dialog(event.prompt||'请选择要操作的牌','hidden','forcebutton');
|
||||
event.switchToAuto=function(){
|
||||
if(!filterOk(event.moved)){
|
||||
if(!event.forced) event._result={bool:false};
|
||||
else event._result='ai';
|
||||
}
|
||||
else{
|
||||
event._result={
|
||||
bool:true,
|
||||
moved:event.moved,
|
||||
};
|
||||
}
|
||||
event.dialog.close();
|
||||
if(ui.confirm) ui.confirm.close();
|
||||
game.resume();
|
||||
_status.imchoosing=false;
|
||||
};
|
||||
event.dialog.classList.add('scroll1');
|
||||
event.dialog.classList.add('scroll2');
|
||||
event.dialog.classList.add('fullwidth');
|
||||
|
||||
event.moved=[];
|
||||
var buttonss=[];
|
||||
event.buttonss=buttonss;
|
||||
var updateButtons=function(){
|
||||
for(var i of buttonss){
|
||||
event.moved[i._link]=get.links(Array.from(i.childNodes));
|
||||
if(i.textPrompt) i.previousSibling.innerHTML=('<div class="text center">'+i.textPrompt(event.moved[i._link])+'</div>');
|
||||
}
|
||||
if(filterOk(event.moved)){
|
||||
ui.create.confirm('o');
|
||||
}
|
||||
else{
|
||||
if(!event.forced) ui.create.confirm('c');
|
||||
else if(ui.confirm) ui.confirm.close();
|
||||
}
|
||||
};
|
||||
var clickButtons=function(){
|
||||
if(!ui.selected.guanxing_button) return;
|
||||
if(ui.selected.guanxing_button.parentNode==this) return;
|
||||
if(!filterMove(ui.selected.guanxing_button,this._link,event.moved)) return;
|
||||
ui.selected.guanxing_button.classList.remove('glow2');
|
||||
this.appendChild(ui.selected.guanxing_button);
|
||||
delete ui.selected.guanxing_button;
|
||||
updateButtons();
|
||||
};
|
||||
|
||||
for(var i=0;i<list.length;i++){
|
||||
event.dialog.add('<div class="text center">'+list[i][0]+'</div>');
|
||||
var buttons=ui.create.div('.buttons',event.dialog.content,clickButtons);
|
||||
buttonss.push(buttons);
|
||||
buttons.classList.add('popup');
|
||||
buttons.classList.add('guanxing');
|
||||
buttons._link=i;
|
||||
if(list[i][1]){
|
||||
ui.create.buttons(list[i][1],'card',buttons);
|
||||
}
|
||||
if(list[i][2]) buttons.textPrompt=list[i][2];
|
||||
}
|
||||
event.dialog.open();
|
||||
updateButtons();
|
||||
|
||||
event.custom.replace.button=function(button){
|
||||
if(!ui.selected.guanxing_button){
|
||||
ui.selected.guanxing_button=button;
|
||||
button.classList.add('glow2');
|
||||
return;
|
||||
}
|
||||
if(ui.selected.guanxing_button==button){
|
||||
button.classList.remove('glow2');
|
||||
delete ui.selected.guanxing_button;
|
||||
return;
|
||||
}
|
||||
if(!filterMove(button,ui.selected.guanxing_button,event.moved)) return;
|
||||
var par1=ui.selected.guanxing_button.parentNode,ind1=ui.selected.guanxing_button.nextSibling,par2=button.parentNode,ind2=button.nextSibling;
|
||||
ui.selected.guanxing_button.classList.remove('glow2');
|
||||
par1.insertBefore(button,ind1);
|
||||
par2.insertBefore(ui.selected.guanxing_button,ind2);
|
||||
delete ui.selected.guanxing_button;
|
||||
updateButtons();
|
||||
}
|
||||
event.custom.replace.confirm=function(bool){
|
||||
if(bool) event._result={
|
||||
bool:true,
|
||||
moved:event.moved,
|
||||
};
|
||||
else event._result={bool:false};
|
||||
event.dialog.close();
|
||||
if(ui.confirm) ui.confirm.close();
|
||||
game.resume();
|
||||
_status.imchoosing=false;
|
||||
};
|
||||
|
||||
game.pause();
|
||||
game.countChoose();
|
||||
event.choosing=true;
|
||||
}
|
||||
else if(event.isOnline()){
|
||||
event.send();
|
||||
}
|
||||
else{
|
||||
event.result='ai';
|
||||
}
|
||||
"step 1"
|
||||
if(event.time) game.broadcastAll(function(time){
|
||||
lib.configOL.choose_timeout=time;
|
||||
},event.time);
|
||||
var result=event.result||result;
|
||||
if((!result||result=='ai'||(event.forced&&!result.bool))&&event.processAI){
|
||||
var moved=event.processAI(event.list);
|
||||
if(moved) result={
|
||||
bool:true,
|
||||
moved:moved,
|
||||
}
|
||||
else result={bool:false};
|
||||
}
|
||||
event.result=result;
|
||||
},
|
||||
showCharacter:function(){
|
||||
'step 0'
|
||||
event.trigger('showCharacterEnd');
|
||||
|
@ -11287,7 +11418,7 @@
|
|||
}
|
||||
event.filter2=function(info2){
|
||||
var info=lib.skill[info2[0]];
|
||||
if(!lib.translate[info2[0]]||info.popup===false||info.silent) return false;
|
||||
if(!lib.translate[info2[0]]||info.silent) return false;
|
||||
return true;
|
||||
}
|
||||
event.filter3=function(info,info2){
|
||||
|
@ -12433,9 +12564,9 @@
|
|||
}
|
||||
game.pause();
|
||||
if(range[1]>1&&typeof event.selectCard!='function'){
|
||||
event.promptdiscard=ui.create.control('提示',function(){
|
||||
event.promptdiscard=ui.create.control('AI代选',function(){
|
||||
ai.basic.chooseCard(event.ai);
|
||||
if(_status.event.custom.add.card){
|
||||
if(_status.event.custom&&_status.event.custom.add.card){
|
||||
_status.event.custom.add.card();
|
||||
}
|
||||
for(var i=0;i<ui.selected.cards.length;i++){
|
||||
|
@ -16371,15 +16502,16 @@
|
|||
},
|
||||
chooseToGuanxing:function(){
|
||||
"step 0"
|
||||
if(player.isUnderControl()){
|
||||
game.swapPlayerAuto(player);
|
||||
}
|
||||
var cards=get.cards(num);
|
||||
event.cards=cards;
|
||||
var switchToAuto=(event.ai||function(){
|
||||
_status.imchoosing=false;
|
||||
if(event.dialog) event.dialog.close();
|
||||
if(event.control) event.control.close();
|
||||
game.cardsGotoOrdering(cards);
|
||||
var next=player.chooseToMove();
|
||||
next.set('list',[
|
||||
['牌堆顶',cards],
|
||||
['牌堆底'],
|
||||
]);
|
||||
next.set('prompt','点击将牌移动到牌堆顶或牌堆底');
|
||||
next.processAI=event.processAI||function(list){
|
||||
var cards=list[0][1],player=_status.event.player;
|
||||
var top=[];
|
||||
var bottom;
|
||||
cards.sort(function(a,b){
|
||||
|
@ -16390,6 +16522,12 @@
|
|||
top.unshift(cards.shift());
|
||||
}
|
||||
bottom=cards;
|
||||
return [top,bottom];
|
||||
};
|
||||
"step 1"
|
||||
var top=result.moved[0];
|
||||
var bottom=result.moved[1];
|
||||
top.reverse();
|
||||
for(var i=0;i<top.length;i++){
|
||||
ui.cardPile.insertBefore(top[i],ui.cardPile.firstChild);
|
||||
}
|
||||
|
@ -16398,122 +16536,8 @@
|
|||
}
|
||||
player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(bottom.length)+'下');
|
||||
game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶');
|
||||
game.delay(2);
|
||||
});
|
||||
var chooseButton=function(player,cards){
|
||||
var event=_status.event;
|
||||
player=player||event.player;
|
||||
cards=cards||event.cards;
|
||||
event.top=[];
|
||||
event.bottom=[];
|
||||
event.status=true;
|
||||
event.dialog=ui.create.dialog('按顺序选择置于牌堆顶的牌(先选择的在上)',cards);
|
||||
for(var i=0;i<event.dialog.buttons.length;i++){
|
||||
event.dialog.buttons[i].classList.add('pointerdiv');
|
||||
}
|
||||
event.switchToAuto=function(){
|
||||
event._result='ai';
|
||||
event.dialog.close();
|
||||
event.control.close();
|
||||
_status.imchoosing=false;
|
||||
},
|
||||
event.control=ui.create.control('ok','pileTop','pileBottom',function(link){
|
||||
var event=_status.event;
|
||||
if(link=='ok'){
|
||||
event._result={
|
||||
top:[],
|
||||
bottom:[]
|
||||
}
|
||||
for(var i=0;i<event.top.length;i++){
|
||||
event._result.top.push(event.top[i].link);
|
||||
}
|
||||
for(var i=0;i<event.bottom.length;i++){
|
||||
event._result.bottom.push(event.bottom[i].link);
|
||||
}
|
||||
event.dialog.close();
|
||||
event.control.close();
|
||||
game.resume();
|
||||
_status.imchoosing=false;
|
||||
}
|
||||
else if(link=='pileTop'){
|
||||
event.status=true;
|
||||
event.dialog.content.childNodes[0].innerHTML='按顺序选择置于牌堆顶的牌';
|
||||
}
|
||||
else{
|
||||
event.status=false;
|
||||
event.dialog.content.childNodes[0].innerHTML='按顺序选择置于牌堆底的牌';
|
||||
}
|
||||
})
|
||||
for(var i=0;i<event.dialog.buttons.length;i++){
|
||||
event.dialog.buttons[i].classList.add('selectable');
|
||||
}
|
||||
event.custom.replace.button=function(link){
|
||||
var event=_status.event;
|
||||
if(link.classList.contains('target')){
|
||||
link.classList.remove('target');
|
||||
event.top.remove(link);
|
||||
}
|
||||
else if(link.classList.contains('glow')){
|
||||
link.classList.remove('glow');
|
||||
event.bottom.remove(link);
|
||||
}
|
||||
else if(event.status){
|
||||
link.classList.add('target');
|
||||
event.top.unshift(link);
|
||||
}
|
||||
else{
|
||||
link.classList.add('glow');
|
||||
event.bottom.push(link);
|
||||
}
|
||||
}
|
||||
event.custom.replace.window=function(){
|
||||
for(var i=0;i<_status.event.dialog.buttons.length;i++){
|
||||
_status.event.dialog.buttons[i].classList.remove('target');
|
||||
_status.event.dialog.buttons[i].classList.remove('glow');
|
||||
_status.event.top.length=0;
|
||||
_status.event.bottom.length=0;
|
||||
}
|
||||
}
|
||||
game.pause();
|
||||
game.countChoose();
|
||||
};
|
||||
event.switchToAuto=switchToAuto;
|
||||
if(event.isMine()){
|
||||
chooseButton();
|
||||
}
|
||||
else if(event.isOnline()){
|
||||
event.player.send(chooseButton,event.player,event.cards);
|
||||
event.player.wait();
|
||||
game.pause();
|
||||
}
|
||||
else{
|
||||
event.switchToAuto();
|
||||
event.finish();
|
||||
}
|
||||
"step 1"
|
||||
var result=event.result||result;
|
||||
if(!result||result=='ai'){
|
||||
event.switchToAuto();
|
||||
}
|
||||
else{
|
||||
var top=result.top||[];
|
||||
var bottom=result.bottom||[];
|
||||
for(var i=0;i<top.length;i++){
|
||||
ui.cardPile.insertBefore(top[i],ui.cardPile.firstChild);
|
||||
}
|
||||
for(i=0;i<event.cards.length;i++){
|
||||
if(!top.contains(event.cards[i])&&!bottom.contains(event.cards[i])){
|
||||
ui.cardPile.appendChild(event.cards[i]);
|
||||
}
|
||||
}
|
||||
for(i=0;i<bottom.length;i++){
|
||||
ui.cardPile.appendChild(bottom[i]);
|
||||
}
|
||||
player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(event.cards.length-top.length)+'下');
|
||||
game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶');
|
||||
game.updateRoundNumber();
|
||||
game.delay(2);
|
||||
}
|
||||
game.delayx();
|
||||
},
|
||||
},
|
||||
player:{
|
||||
|
@ -16676,6 +16700,22 @@
|
|||
}
|
||||
this.checkConflict();
|
||||
},
|
||||
chooseToMove:function(){
|
||||
var next=game.createEvent('chooseToMove');
|
||||
next.player=this;
|
||||
for(var i=0;i<arguments.length;i++){
|
||||
if(typeof arguments[i]=='boolean'){
|
||||
next.forced=arguments[i];
|
||||
}
|
||||
else if(typeof arguments[i]=='string'){
|
||||
next.prompt=arguments[i];
|
||||
}
|
||||
}
|
||||
next.setContent('chooseToMove');
|
||||
next.filterOk=function(){return true};
|
||||
next.filterMove=function(){return true};
|
||||
return next;
|
||||
},
|
||||
chooseToGuanxing:function(num){
|
||||
var next=game.createEvent('chooseToGuanxing');
|
||||
next.num=num||1;
|
||||
|
@ -18861,7 +18901,7 @@
|
|||
var event=_status.event.getParent();
|
||||
var to=(player==event.player?event.target:event.player);
|
||||
var addi=(get.value(card)>=8&&get.type(card)!='equip')?-10:0;
|
||||
if(card.name=='du') addi+=5;
|
||||
if(card.name=='du') addi-=5;
|
||||
if(player==event.player){
|
||||
if(get.attitude(player,to)>0&&event.small){
|
||||
return -getn(card)-get.value(card)/2+addi;
|
||||
|
@ -18877,6 +18917,7 @@
|
|||
}
|
||||
next.setContent('chooseToCompare');
|
||||
}
|
||||
next.forceDie=true;
|
||||
next._args=Array.from(arguments);
|
||||
return next;
|
||||
},
|
||||
|
@ -26398,7 +26439,7 @@
|
|||
firstDo:true,
|
||||
trigger:{player:['playercontrol','chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin',
|
||||
'chooseButtonBegin','chooseCardBegin','chooseTargetBegin','chooseCardTargetBegin','chooseControlBegin',
|
||||
'chooseBoolBegin','choosePlayerCardBegin','discardPlayerCardBegin','gainPlayerCardBegin']},
|
||||
'chooseBoolBegin','choosePlayerCardBegin','discardPlayerCardBegin','gainPlayerCardBegin','chooseToMoveBegin']},
|
||||
forced:true,
|
||||
priority:100,
|
||||
forceDie:true,
|
||||
|
@ -47500,7 +47541,7 @@
|
|||
game.resume2();
|
||||
}
|
||||
else if((_status.event.isMine()||_status.event.forceMine)&&!dialogtouched){
|
||||
if(_status.event.custom.replace.window){
|
||||
if(_status.event.custom&&_status.event.custom.replace.window){
|
||||
_status.event.custom.replace.window();
|
||||
}
|
||||
else{
|
||||
|
@ -47609,7 +47650,7 @@
|
|||
if(_status.justdragged) return;
|
||||
_status.clicked=true;
|
||||
var custom=_status.event.custom;
|
||||
if(custom.replace.button){
|
||||
if(custom&&custom.replace.button){
|
||||
custom.replace.button(this);
|
||||
return;
|
||||
}
|
||||
|
@ -47658,7 +47699,7 @@
|
|||
return;
|
||||
}
|
||||
var custom=_status.event.custom;
|
||||
if(custom.replace.card){
|
||||
if(custom&&custom.replace.card){
|
||||
custom.replace.card(this);
|
||||
return;
|
||||
}
|
||||
|
@ -47837,7 +47878,7 @@
|
|||
}
|
||||
_status.clicked=true;
|
||||
var custom=_status.event.custom;
|
||||
if(custom.replace.target){
|
||||
if(custom&&custom.replace.target){
|
||||
custom.replace.target(this,e);
|
||||
return;
|
||||
}
|
||||
|
@ -48000,7 +48041,7 @@
|
|||
},
|
||||
ok:function(node){
|
||||
var event=_status.event;
|
||||
if(event.custom.replace.confirm){
|
||||
if(event.custom&&event.custom.replace.confirm){
|
||||
event.custom.replace.confirm(true);return;
|
||||
}
|
||||
event.result={
|
||||
|
@ -48623,15 +48664,16 @@
|
|||
}
|
||||
},
|
||||
pause:function(){
|
||||
if(_status.paused2) return;
|
||||
if(_status.nopause) return;
|
||||
if(_status.paused2||_status.pausing||_status.nopause) return;
|
||||
if(!_status.video){
|
||||
if(ui.pause.classList.contains('hidden')) return;
|
||||
if(!_status.gameStarted) return;
|
||||
}
|
||||
ui.system.hide();
|
||||
game.pause2();
|
||||
var node=ui.create.pause().animate('start');
|
||||
var node=ui.create.pause();
|
||||
if(!node) return;
|
||||
node.animate('start');
|
||||
ui.sidebar3.innerHTML='';
|
||||
if(lib.config.show_discardpile){
|
||||
for(var i=0;i<ui.discardPile.childNodes.length;i++){
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
window.noname_update={
|
||||
version:'1.9.110.10.1',
|
||||
update:'1.9.110.10',
|
||||
version:'1.9.111',
|
||||
update:'1.9.110.10.1',
|
||||
changeLog:[
|
||||
'左棻',
|
||||
'SP包更名',
|
||||
'观星类技能操作逻辑修改',
|
||||
'刘永、荀谌、童渊、TW于禁、万年公主、张宁',
|
||||
'国战南华老仙、周夷',
|
||||
'bug修复',
|
||||
],
|
||||
files:[
|
||||
'card/extra.js',
|
||||
//'card/gujian.js',
|
||||
//'card/guozhan.js',
|
||||
'card/guozhan.js',
|
||||
//'card/gwent.js',
|
||||
//'card/huanlekapai.js',
|
||||
//'card/mtg.js',
|
||||
|
@ -18,7 +19,7 @@ window.noname_update={
|
|||
//'card/swd.js',
|
||||
//'card/yunchou.js',
|
||||
//'card/yingbian.js',
|
||||
'card/yongjian.js',
|
||||
//'card/yongjian.js',
|
||||
//'card/zhenfa.js',
|
||||
//'card/zhulu.js',
|
||||
'character/diy.js',
|
||||
|
@ -29,15 +30,15 @@ window.noname_update={
|
|||
//'character/hearth.js',
|
||||
'character/mobile.js',
|
||||
//'character/mtg.js',
|
||||
'character/offline.js',
|
||||
//'character/old.js',
|
||||
//'character/offline.js',
|
||||
'character/old.js',
|
||||
//'character/ow.js',
|
||||
'character/rank.js',
|
||||
'character/refresh.js',
|
||||
'character/shenhua.js',
|
||||
'character/sp.js',
|
||||
'character/sp2.js',
|
||||
//'character/tw.js',
|
||||
'character/tw.js',
|
||||
'character/standard.js',
|
||||
//'character/swd.js',
|
||||
//'character/xianjian.js',
|
||||
|
@ -46,13 +47,13 @@ window.noname_update={
|
|||
'character/yijiang.js',
|
||||
//'character/yxs.js',
|
||||
//'extension/boss/extension.js',
|
||||
//'layout/default/layout.css',
|
||||
'layout/default/layout.css',
|
||||
//'layout/newlayout/global.css',
|
||||
//'layout/default/menu.css',
|
||||
//'layout/nova/layout.css',
|
||||
//'layout/mobile/equip.css',
|
||||
'mode/boss.js',
|
||||
'mode/brawl.js',
|
||||
//'mode/boss.js',
|
||||
//'mode/brawl.js',
|
||||
//'mode/chess.js',
|
||||
//'mode/connect.js',
|
||||
//'mode/doudizhu.js',
|
||||
|
@ -66,7 +67,7 @@ window.noname_update={
|
|||
//'game/keyWords.js',
|
||||
//'game/NoSleep.js',
|
||||
//'game/config.js',
|
||||
'game/package.js',
|
||||
//'game/package.js',
|
||||
//'game/asset.js',
|
||||
//'game/source.js',
|
||||
//'theme/style/hp/xinglass.css',
|
||||
|
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 133 KiB |
After Width: | Height: | Size: 145 KiB |
After Width: | Height: | Size: 147 KiB |
After Width: | Height: | Size: 162 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 149 KiB |
After Width: | Height: | Size: 120 KiB |
|
@ -1447,6 +1447,10 @@ div:not(.handcards)>.card>.info>span,
|
|||
.button.card.button>.intro {
|
||||
top: 69px;
|
||||
}
|
||||
.buttons.guanxing {
|
||||
min-height: 110px;
|
||||
width: 90%;
|
||||
}
|
||||
.buttons.smallzoom {
|
||||
display: block;
|
||||
zoom: 0.65
|
||||
|
@ -1463,10 +1467,10 @@ div:not(.handcards)>.card>.info>span,
|
|||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
}
|
||||
.buttons.scrollbuttons .button:first-child{
|
||||
.buttons.scrollbuttons:not(.popup) .button:first-child{
|
||||
margin-left: 12px;
|
||||
}
|
||||
.buttons.scrollbuttons .button:last-child{
|
||||
.buttons.scrollbuttons:not(.popup) .button:last-child{
|
||||
margin-right: 12px;
|
||||
}
|
||||
/*.buttons.smallzoom .card.button>.name,
|
||||
|
|
407
mode/guozhan.js
|
@ -269,7 +269,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
'3':[
|
||||
'gz_simayi','gz_luxun','gz_wuguotai',
|
||||
'gz_caiwenji','gz_shibao','gz_xuyou',
|
||||
'gz_zhugeke',
|
||||
'gz_zhugeke','gz_re_nanhualaoxian','gz_zhouyi',
|
||||
],
|
||||
'2':[
|
||||
'gz_re_lusu','gz_zhangzhang',
|
||||
|
@ -298,7 +298,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
'gz_lingtong','gz_sunshangxiang','gz_sunce',
|
||||
'gz_re_yuanshao','gz_yuanshu','gz_hetaihou',
|
||||
'gz_jin_simashi','gz_sp_duyu','gz_shibao',
|
||||
'gz_gongsunyuan','gz_panjun',
|
||||
'gz_gongsunyuan','gz_panjun','gz_re_nanhualaoxian',
|
||||
],
|
||||
'6':[
|
||||
'gz_zhenji','gz_guojia','gz_yujin',
|
||||
|
@ -306,7 +306,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
'gz_zhouyu','gz_lingcao','gz_daqiao','gz_dingfeng',
|
||||
'gz_yuji','gz_caiwenji','gz_diaochan','gz_zuoci',
|
||||
'gz_key_ushio','gz_jin_simazhao','gz_dongzhao',
|
||||
'gz_liuba',
|
||||
'gz_liuba','gz_zhouyi','gz_re_xunchen',
|
||||
],
|
||||
'5':[
|
||||
'gz_zhangliao','gz_caocao','gz_xuhuang',
|
||||
|
@ -360,8 +360,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
guozhan_single:['gz_re_xushu','gz_yanbaihu','gz_wujing','gz_dongzhao','gz_huangzu','gz_zhugeke','gz_liuba','gz_zhuling'],
|
||||
guozhan_double:['gz_tangzi','gz_liuqi','gz_mengda','gz_mifangfushiren','gz_zhanglu','gz_shixie','gz_xuyou','gz_xiahouba','gz_panjun','gz_xf_sufei','gz_wenqin','gz_pengyang'],
|
||||
guozhan_yexinjia:['gz_zhonghui','gz_simazhao','gz_gongsunyuan','gz_sunchen'],
|
||||
guozhan_zongheng:['gz_huaxin','gz_luyusheng','gz_zongyu','gz_miheng','gz_fengxi','gz_dengzhi'],
|
||||
guozhan_others:["gz_lingcao","gz_lifeng","gz_beimihu","gz_jianggan","gz_key_ushio","gz_sp_duyu"],
|
||||
guozhan_zongheng:['gz_huaxin','gz_luyusheng','gz_zongyu','gz_miheng','gz_fengxi','gz_dengzhi','gz_re_xunchen'],
|
||||
guozhan_others:["gz_lingcao","gz_lifeng","gz_beimihu","gz_jianggan","gz_key_ushio","gz_sp_duyu","gz_re_nanhualaoxian","gz_zhouyi"],
|
||||
}
|
||||
},
|
||||
characterPack:{
|
||||
|
@ -512,6 +512,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
gz_miheng:['male','qun',3,['gzrekuangcai','gzshejian'],['gzskin']],
|
||||
gz_fengxi:['male','wu',3,['yusui','boyan']],
|
||||
gz_dengzhi:['male','shu',3,['gzjianliang','gzweimeng'],['gzskin']],
|
||||
gz_re_nanhualaoxian:['male','qun',4,['gzgongxiu','gzjinghe']],
|
||||
gz_zhouyi:['female','wu',3,['gzzhukou','gzduannian','gzlianyou']],
|
||||
gz_re_xunchen:['male','qun',3,['gzfenglve','gzanyong']],
|
||||
|
||||
gz_cuimao:['male','wei',3,['gzzhengbi','gzfengying'],[]],
|
||||
gz_yujin:['male','wei',4,['gzjieyue'],['gzskin']],
|
||||
|
@ -541,6 +544,358 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
skill:{
|
||||
//荀谌
|
||||
gzfenglve:{
|
||||
audio:'refenglve',
|
||||
derivation:'gzfenglve_zongheng',
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
filter:function(event,player){
|
||||
return player.countCards('h')>0&&!player.hasSkillTag('noCompareSource')&&game.hasPlayer(function(current){
|
||||
return current!=player&¤t.countCards('h')>0&&!current.hasSkillTag('noCompareTarget');
|
||||
});
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return target!=player&&target.countCards('h')>0&&!target.hasSkillTag('noCompareTarget');
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseToCompare(target);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
if(!target.countCards('hej')) event.goto(3);
|
||||
else{
|
||||
event.giver=target;
|
||||
event.gainner=player;
|
||||
target.choosePlayerCard(target,true,'hej',2,'交给'+get.translation(player)+'两张牌');
|
||||
}
|
||||
}
|
||||
else if(result.tie){
|
||||
event.goto(3);
|
||||
}
|
||||
else{
|
||||
if(!player.countCards('he')) event.goto(3);
|
||||
else{
|
||||
event.giver=player;
|
||||
event.gainner=target;
|
||||
player.chooseCard(true,'he','交给'+get.translation(target)+'一张牌');
|
||||
}
|
||||
}
|
||||
'step 2'
|
||||
if(result.bool) event.gainner.gain(result.cards,event.giver,'giveAuto');
|
||||
'step 3'
|
||||
if(target.isIn()) player.chooseBool('纵横:是否令'+get.translation(target)+'获得【锋略】?').set('ai',function(){
|
||||
var evt=_status.event.getParent();
|
||||
return get.attitude(evt.player,evt.target)>0;
|
||||
});
|
||||
else event.finish();
|
||||
'step 4'
|
||||
if(result.bool){
|
||||
target.addTempSkill('gzfenglve_zongheng',{player:'phaseEnd'});
|
||||
game.log(player,'发起了','#y纵横',',令',target,'获得了技能','#g【锋略】');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:8,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(!player.hasCard(function(card){
|
||||
if(get.position(card)!="h") return false;
|
||||
var val=get.value(card);
|
||||
if(val<0) return true;
|
||||
if(val<=5){
|
||||
return card.number>=10;
|
||||
}
|
||||
if(val<=6){
|
||||
return card.number>=13;
|
||||
}
|
||||
return false;
|
||||
})) return 0;
|
||||
return -Math.sqrt(1+target.countCards('he'))/(1+target.countCards('j'));
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
gzfenglve_zongheng:{
|
||||
inherit:'gzfenglve',
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseToCompare(target);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
if(!target.countCards('hej')) event.finish();
|
||||
else{
|
||||
event.giver=target;
|
||||
event.gainner=player;
|
||||
target.choosePlayerCard(target,true,'hej','交给'+get.translation(player)+'一张牌');
|
||||
}
|
||||
}
|
||||
else if(result.tie){
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
if(!player.countCards('he')) event.finish();
|
||||
else{
|
||||
event.giver=player;
|
||||
event.gainner=target;
|
||||
player.chooseCard(true,'he',2,'交给'+get.translation(target)+'两张牌');
|
||||
}
|
||||
}
|
||||
'step 2'
|
||||
if(result.bool) event.gainner.gain(result.cards,event.giver,'giveAuto');
|
||||
},
|
||||
ai:{
|
||||
order:8,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(!player.hasCard(function(card){
|
||||
if(get.position(card)!="h") return false;
|
||||
var val=get.value(card);
|
||||
if(val<0) return true;
|
||||
if(val<=5){
|
||||
return card.number>=12;
|
||||
}
|
||||
if(val<=6){
|
||||
return card.number>=13;
|
||||
}
|
||||
return false;
|
||||
})) return 0;
|
||||
return -Math.sqrt(1+target.countCards('he'))/(1+target.countCards('j'));
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
gzanyong:{
|
||||
audio:'anyong',
|
||||
trigger:{global:'damageBegin1'},
|
||||
usable:1,
|
||||
filter:function(event,player){
|
||||
return event.source&&event.player!=event.source&&
|
||||
event.source.isFriendOf(player)&&event.player.isIn();
|
||||
},
|
||||
check:function(event,player){
|
||||
if(event.player.hasSkillTag('filterDamage',null,{
|
||||
player:event.source,
|
||||
card:event.card,
|
||||
})) return false;
|
||||
if(event.player.isUnseen()) return true;
|
||||
if(event.player.hp>event.num&&event.player.hp<=event.num*2) return player.hp>1||trigger.player.isUnseen(2);
|
||||
return false;
|
||||
},
|
||||
logTarget:'player',
|
||||
preHidden:true,
|
||||
content:function(){
|
||||
trigger.num*=2;
|
||||
if(!trigger.player.isUnseen(2)){
|
||||
player.loseHp();
|
||||
player.removeSkill('gzanyong');
|
||||
}
|
||||
else if(!trigger.player.isUnseen()){
|
||||
player.chooseToDiscard('h',2,true);
|
||||
}
|
||||
},
|
||||
},
|
||||
//周夷
|
||||
gzzhukou:{
|
||||
audio:'zhukou',
|
||||
trigger:{source:'damageSource'},
|
||||
preHidden:true,
|
||||
filter:function(event,player){
|
||||
if(!player.getHistory('useCard').length) return false;
|
||||
var evt=event.getParent('phaseUse');
|
||||
if(!evt||!evt.player) return false;
|
||||
return player.getHistory('sourceDamage',function(evtx){
|
||||
return evtx.getParent('phaseUse')==evt;
|
||||
}).indexOf(event)==0;
|
||||
},
|
||||
frequent:true,
|
||||
content:function(){
|
||||
player.draw(player.getHistory('useCard').length);
|
||||
},
|
||||
},
|
||||
gzduannian:{
|
||||
audio:2,
|
||||
trigger:{player:'phaseUseEnd'},
|
||||
preHidden:true,
|
||||
filter:function(event,player){
|
||||
return player.countCards('h')>0&&!player.hasCard(function(card){
|
||||
return !lib.filter.cardDiscardable(card,player,'gzduannian');
|
||||
},'h');
|
||||
},
|
||||
check:function(card){
|
||||
return player.countCards('h',function(card){
|
||||
return get.value(card)>=6;
|
||||
})<=Math.max(1,player.countCards('h')/2);
|
||||
},
|
||||
content:function(){
|
||||
var cards=player.getCards('h',function(card){
|
||||
return lib.filter.cardDiscardable(card,player,'gzduannian');
|
||||
});
|
||||
if(cards.length){
|
||||
player.discard(cards);
|
||||
player.draw(cards.length);
|
||||
}
|
||||
},
|
||||
},
|
||||
gzlianyou:{
|
||||
trigger:{player:'die'},
|
||||
direct:true,
|
||||
forceDie:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseTarget(lib.filter.notMe,get.prompt('gzlianyou'),'令一名其他角色获得〖兴火〗').set('forceDie',true).set('ai',function(target){
|
||||
return 10+(get.attitude(_status.event.player,target)*target.hasSkillTag('fireAttack',null,null,true)?2:1)
|
||||
});
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.logSkill('gzlianyou',target);
|
||||
target.addSkillLog('gzxinghuo');
|
||||
game.delayx();
|
||||
}
|
||||
},
|
||||
derivation:'gzxinghuo',
|
||||
},
|
||||
gzxinghuo:{
|
||||
trigger:{player:'damageBegin1'},
|
||||
forced:true,
|
||||
filter:function(event){
|
||||
return event.nature=='fire';
|
||||
},
|
||||
content:function(){
|
||||
trigger.num++;
|
||||
},
|
||||
},
|
||||
//南华老仙
|
||||
gzgongxiu:{
|
||||
trigger:{player:'phaseDrawBegin2'},
|
||||
preHidden:true,
|
||||
filter:function(event,player){
|
||||
return !event.numFixed&&event.num>0&&player.maxHp>0;
|
||||
},
|
||||
content:function(){
|
||||
trigger.num--;
|
||||
player.addTempSkill('gzgongxiu2','phaseUseAfter');
|
||||
},
|
||||
},
|
||||
gzgongxiu2:{
|
||||
trigger:{player:'phaseDrawEnd'},
|
||||
forced:true,
|
||||
charlotte:true,
|
||||
popup:false,
|
||||
content:function(){
|
||||
'step 0'
|
||||
var str='令至多'+get.cnNumber(player.maxHp)+'名角色';
|
||||
if(typeof player.storage.gzgongxiu!='number'){
|
||||
player.chooseControl().set('choiceList',[
|
||||
str+'各摸一张牌',
|
||||
str+'各弃置一张牌',
|
||||
]);
|
||||
}
|
||||
else event._result={index:1-player.storage.gzgongxiu};
|
||||
'step 1'
|
||||
var num=result.index;
|
||||
event.index=num;
|
||||
player.storage.gzgongxiu=num;
|
||||
player.chooseTarget(true,[1,player.maxHp],'选择至多'+get.cnNumber(player.maxHp)+'名角色各'+(num?'弃置':'摸')+'一张牌').set('goon',event.index?-1:1).set('ai',function(target){
|
||||
var evt=_status.event;
|
||||
return evt.goon*get.attitude(evt.player,target);
|
||||
});
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
var targets=result.targets.sortBySeat();
|
||||
player.line(targets,'green');
|
||||
if(event.index==0) game.asyncDraw(targets);
|
||||
else{
|
||||
for(var i of targets) i.chooseToDiscard('he',true);
|
||||
event.finish();
|
||||
}
|
||||
}
|
||||
'step 3'
|
||||
game.delayx();
|
||||
},
|
||||
},
|
||||
gzjinghe:{
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.maxHp>0&&player.countCards('h')>0&&!player.hasSkill('gzjinghe_clear');
|
||||
},
|
||||
selectCard:function(){
|
||||
var max=_status.event.player.maxHp;
|
||||
if(ui.selected.targets.length) return [ui.selected.targets.length,max];
|
||||
return [1,max];
|
||||
},
|
||||
selectTarget:function(){
|
||||
return ui.selected.cards.length;
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return !target.isUnseen();
|
||||
},
|
||||
filterCard:function(card){
|
||||
if(ui.selected.cards.length){
|
||||
var name=get.name(card);
|
||||
for(var i of ui.selected.cards){
|
||||
if(get.name(i)==name) return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
position:'h',
|
||||
check:function(card){
|
||||
var player=_status.event.player;
|
||||
if(game.countPlayer(function(current){
|
||||
return get.attitude(player,current)>0&&!current.isUnseen();
|
||||
})>ui.selected.cards.length) return get.position(card)=='e'?2:1;
|
||||
return 0;
|
||||
},
|
||||
complexCard:true,
|
||||
discard:false,
|
||||
lose:false,
|
||||
delay:false,
|
||||
multitarget:true,
|
||||
multiline:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.showCards(cards,get.translation(player)+'发动了【经合】');
|
||||
event.skills=lib.skill.gzjinghe.derivation.randomGets(targets.length);
|
||||
player.addTempSkill('gzjinghe_clear',{player:'phaseBegin'});
|
||||
event.targets.sortBySeat();
|
||||
event.num=0;
|
||||
'step 1'
|
||||
event.target=targets[num];
|
||||
event.num++;
|
||||
event.target.chooseControl(event.skills,'cancel2').set('choiceList',event.skills.map(function(i){
|
||||
return '<div class="skill">【'+get.translation(lib.translate[i+'_ab']||get.translation(i).slice(0,2))+'】</div><div>'+get.skillInfoTranslation(i,player)+'</div>';
|
||||
})).set('displayIndex',false).set('prompt','选择获得一个技能');
|
||||
'step 2'
|
||||
var skill=result.control;
|
||||
if(skill!='cancel2'){
|
||||
event.skills.remove(skill);
|
||||
target.addAdditionalSkill('gzjinghe_'+player.playerid,skill);
|
||||
target.popup(skill);
|
||||
game.log(target,'获得了技能','#g【'+get.translation(skill)+'】');
|
||||
}
|
||||
if(event.num<event.targets.length) event.goto(1);
|
||||
if(target!=game.me&&!target.isOnline2()) game.delayx();
|
||||
},
|
||||
ai:{
|
||||
threaten:3,
|
||||
order:10,
|
||||
result:{
|
||||
target:1,
|
||||
},
|
||||
},
|
||||
derivation:['releiji','nhyinbing','nhhuoqi','nhguizhu','nhxianshou','nhlundao','nhguanyue','nhyanzheng'],
|
||||
subSkill:{
|
||||
clear:{
|
||||
onremove:function(player){
|
||||
game.countPlayer(function(current){
|
||||
current.removeAdditionalSkill('gzjinghe_'+player.playerid);
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
//孙綝
|
||||
gzshilu:{
|
||||
audio:2,
|
||||
|
@ -8219,16 +8574,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
wuxin:{
|
||||
// unique:true,
|
||||
trigger:{player:'phaseDrawBegin1'},
|
||||
// frequent:'check',
|
||||
// check:function(event,player){
|
||||
// var num=get.population('qun');
|
||||
// if(player.hasSkill('huangjintianbingfu')){
|
||||
// num+=player.storage.huangjintianbingfu.length;
|
||||
// }
|
||||
// return num>event.num;
|
||||
// },
|
||||
audio:2,
|
||||
filter:function(event,player){
|
||||
return get.population('qun')>0;
|
||||
|
@ -8239,12 +8585,20 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(player.hasSkill('huangjintianbingfu')){
|
||||
num+=player.storage.huangjintianbingfu.length;
|
||||
}
|
||||
player.chooseCardButton(num,true,get.cards(num),'按顺序将卡牌置于牌堆顶(先选择的在上)').set('ai',function(button){
|
||||
return get.value(button.link);
|
||||
var cards=get.cards(num);
|
||||
game.cardsGotoOrdering(cards);
|
||||
var next=player.chooseToMove('悟心:将卡牌以任意顺序置于牌堆顶');
|
||||
next.set('list',[['牌堆顶',cards]]);
|
||||
next.set('processAI',function(list){
|
||||
var cards=list[0][1].slice(0);
|
||||
cards.sort(function(a,b){
|
||||
return get.value(b)-get.value(a);
|
||||
});
|
||||
return [cards];
|
||||
})
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var list=result.links.slice(0);
|
||||
var list=result.moved[0].slice(0);
|
||||
while(list.length){
|
||||
ui.cardPile.insertBefore(list.pop(),ui.cardPile.firstChild);
|
||||
}
|
||||
|
@ -10699,6 +11053,25 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
liuba:'刘巴',
|
||||
pengyang:'彭羕',
|
||||
sunchen:'孙綝',
|
||||
gz_dengzhi:'邓芝',
|
||||
gzfenglve:'锋略',
|
||||
gzfenglve_info:'出牌阶段限一次,你可以和一名其他角色进行拼点。若你赢,其将区域内的两张牌交给你;若你输,你交给其一张牌。',
|
||||
gzfenglve_zongheng:'锋略·纵横',
|
||||
gzfenglve_zongheng_info:'出牌阶段限一次,你可以和一名其他角色进行拼点。若你赢,其将区域内的一张牌交给你;若你输,你交给其两张牌。',
|
||||
gzanyong:'暗涌',
|
||||
gzanyong_info:'每回合限一次。当己方角色对其他角色造成伤害时,你可令伤害值翻倍。然后若受伤角色:武将牌均明置,则你失去1点体力并失去〖暗涌〗;有一张明置的武将牌,则你弃置两张手牌。',
|
||||
gzzhukou:'逐寇',
|
||||
gzzhukou_info:'当你于一名角色的出牌阶段第一次造成伤害后,你可以摸X张牌(X为本回合你已使用的牌数且至多为5)。',
|
||||
gzduannian:'断念',
|
||||
gzduannian_info:'出牌阶段结束时,若你有手牌你可以弃置所有手牌,然后将手牌摸至体力上限。',
|
||||
gzlianyou:'莲佑',
|
||||
gzlianyou_info:'你死亡时,可以选择一名其他角色。该角色获得技能“兴火”。',
|
||||
gzxinghuo:'兴火',
|
||||
gzxinghuo_info:'锁定技,你造成的火焰伤害+1。',
|
||||
gzgongxiu:'共修',
|
||||
gzgongxiu_info:'摸牌阶段,你可以少摸一张牌,然后选择一个与上次不同的选项:①令至多X名角色各摸一张牌。②令至多X名角色各弃置一张牌。(X为你的体力上限)',
|
||||
gzjinghe:'经合',
|
||||
gzjinghe_info:'出牌阶段限一次,你可以展示至多X张牌名各不相同的手牌(X为你的体力上限),并选择等量有明置武将牌的角色。然后每名角色可以从“写满技能的天书”中选择并获得一个技能直到你的下回合开始。',
|
||||
gzshilu:'嗜戮',
|
||||
gzshilu_info:'①一名角色死亡时,你可以将其所有武将牌置于你的武将牌上,称为“戮”,若杀死其的角色是你,则你从剩余的武将牌堆随机额外获得两张“戮”。②准备阶段,你可以弃置至多X张牌,然后摸等量的牌(X为“戮”数)。',
|
||||
gzxiongnve:'凶虐',
|
||||
|
|