From 810d156e21d444a5b7be33828fcd0723df733f91 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Fri, 22 Nov 2019 13:19:45 +0800 Subject: [PATCH] v1.9.95.4 --- character/diy.js | 120 ++++++++++++++- character/extra.js | 36 ++--- character/mobile.js | 10 +- character/old.js | 4 +- character/refresh.js | 26 ++-- character/shenhua.js | 225 ++++++++++++++++------------ character/sp.js | 274 +++++++++++++++++------------------ character/standard.js | 106 +++++++------- character/xinghuoliaoyuan.js | 79 +++++----- character/yijiang.js | 173 +++++++++++----------- 10 files changed, 603 insertions(+), 450 deletions(-) diff --git a/character/diy.js b/character/diy.js index 59f9cfa6b..e38c71ade 100755 --- a/character/diy.js +++ b/character/diy.js @@ -10,6 +10,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ key_kyousuke:['male','qun',4,['nk_shekong','key_huanjie']], key_yuri:['female','qun',3,['yuri_xingdong','key_huanjie','yuri_wangxi'],['zhu']], key_haruko:['female','qun',4,['haruko_haofang','haruko_zhuishi']], + key_kagari:['female','shen',3,['kagari_zongsi']], // diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']], // diy_hanlong:['male','wei',4,['siji','ciqiu']], diy_feishi:['male','shu',3,['shuaiyan','moshou']], @@ -86,7 +87,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ diy:{ diy_tieba:["diy_wenyang","ns_zuoci","ns_lvzhi","ns_wangyun","ns_nanhua","ns_nanhua_left","ns_nanhua_right","ns_huamulan","ns_huangzu","ns_jinke","ns_yanliang","ns_wenchou","ns_caocao","ns_caocaosp","ns_zhugeliang","ns_wangyue","ns_yuji","ns_xinxianying","ns_guanlu","ns_simazhao","ns_sunjian","ns_duangui","ns_zhangbao","ns_masu","ns_zhangxiu","ns_lvmeng","ns_shenpei","ns_yujisp","ns_yangyi","ns_liuzhang","ns_xinnanhua"], 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_key:["key_lucia","key_kyousuke","key_yuri","key_haruko"], + diy_key:["key_lucia","key_kyousuke","key_yuri","key_haruko","key_kagari"], }, }, characterIntro:{ @@ -100,6 +101,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ diy_tianyu:'字国让,渔阳雍奴(今天津市武清区东北)人。三国时期曹魏将领。初从刘备,因母亲年老回乡,后跟随公孙瓒,公孙瓒败亡,劝说鲜于辅加入曹操。曹操攻略河北时,田豫正式得到曹操任用,历任颖阴、郎陵令、弋阳太守等。', }, characterTitle:{ + key_kagari:'#bRewrite', key_lucia:'#bRewrite', key_kyousuke:'#bLittle Busters!', key_yuri:'#rAngel Beats!', @@ -139,6 +141,118 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yuji:['zuoci'] }, skill:{ + kagari_zongsi:{ + enable:'phaseUse', + usable:1, + content:function(){ + 'step 0' + var controls=[]; + if(ui.cardPile.hasChildNodes()) controls.push('选择牌堆中的一张牌'); + if(ui.discardPile.hasChildNodes()) controls.push('选择弃牌堆中的一张牌'); + if(game.hasPlayer(function(current){ + return current.countCards('hej')>0; + })) controls.push('选择一名角色区域内的一张牌'); + if(!controls.length){event.finish();return;} + event.controls=controls; + var next=player.chooseControl(); + next.set('choiceList',controls) + next.set('prompt','请选择要移动的卡牌的来源'); + 'step 1' + result.control=event.controls[result.index]; + var list=['弃牌堆','牌堆','角色']; + for(var i=0;i0; + }); + } + else{ + var source=ui[event.index==0?'discardPile':'cardPile'].childNodes; + var list=[]; + for(var i=0;i②当你因【毒】失去体力时,你改为回复等量的体力。
③当你处于濒死状态时,你可以使用一张【毒】(每回合限一次)。', lucia_zhenren:'振刃', @@ -5131,6 +5246,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ haruko_haofang_info:'锁定技,你不能使用非转化的延时锦囊牌。你可以将一张延时锦囊牌当做【无中生有】使用。', haruko_zhuishi:'追逝', haruko_zhuishi_info:'一名角色的判定阶段开始时,若其判定区内有牌,则你可以失去1点体力,然后获得其判定区内的所有牌。', + kagari_zongsi:'纵丝', + kagari_zongsi_info:'出牌阶段限一次,你可以选择一张不在游戏外的牌,然后将其置于牌堆/弃牌堆的顶部/底部或一名角色的对应区域内。', + ns_chuanshu:'传术', ns_chuanshu_info:'限定技 当一名其他角色进入濒死状态时,你可以令其选择获得技能【雷击】或【鬼道】,其回复体力至1并摸两张牌。当该被【传术】的角色造成或受到一次伤害后,你摸一张牌。其阵亡后,你重置技能【传术】', ns_xiandao1:'仙道', diff --git a/character/extra.js b/character/extra.js index 602c2c24e..abe57cbec 100755 --- a/character/extra.js +++ b/character/extra.js @@ -279,10 +279,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.storage.ol_wuqian_target=target; player.addTempSkill('ol_wuqian_target'); target.addTempSkill('ol_wuqian_targeted'); - var list=game.filterPlayer(); - for(var i=0;i0; }, @@ -1105,7 +1101,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qixing:{ audio:2, unique:true, - trigger:{global:'gameDrawAfter',player:'phaseBegin'}, + trigger:{global:'gameDrawAfter',player:'phaseZhunbeiBegin'}, forced:true, check:function(event,player){ return player.hp<=1; @@ -1203,8 +1199,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, dawu:{ unique:true, - trigger:{player:'phaseEnd'}, - priority:1, + trigger:{player:'phaseJieshuBegin'}, + //priority:1, direct:true, filter:function(event,player){ return player.storage.qixing&&player.storage.qixing.length; @@ -1273,7 +1269,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, dawu3:{ - trigger:{player:['phaseBegin','dieBegin']}, + trigger:{player:['phaseZhunbeiBegin','dieBegin']}, silent:true, content:function(){ for(var i=0;i1) return false; if(get.type(event.card)!='trick') return false; diff --git a/character/shenhua.js b/character/shenhua.js index a710c56c0..428ffa752 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -180,7 +180,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ animationColor:'thunder', audio:2, trigger:{ - player:'phaseBegin', + player:'phaseZhunbeiBegin', }, forced:true, unique:true, @@ -269,7 +269,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "drlt_zhenggu":{ audio:2, trigger:{ - player:"phaseEnd", + player:"phaseJieshuBegin", }, group:["drlt_zhenggu2"], direct:true, @@ -363,7 +363,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, audio:2, trigger:{ - player:"phaseEnd", + player:"phaseJieshuBegin", }, check:function (event,player){ var num=0; @@ -538,7 +538,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'wood', trigger:{ - player:'phaseBegin', + player:'phaseZhunbeiBegin', }, forced:true, unique:true, @@ -565,7 +565,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:"phaseUse", filter:function (event,player){ - return player.countCards('h',{type:'equip'})>0; + return player.countCards('he',{type:'equip'})>0; }, filterCard:function (card){ return get.type(card)=='equip'; @@ -577,10 +577,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.draw(); }, discard:false, + visible:true, + loseTo:'discardPile', prompt:"将一张装备牌置入弃牌堆并摸一张牌", delay:0.5, prepare:function (cards,player){ player.$throw(cards,1000); + game.log(player,'将',cards,'置入了弃牌堆'); }, }, "drlt_yongsi":{ @@ -599,7 +602,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ '2':{ audio:["yongsi2",2], trigger:{ - player:'phaseDiscardBegin' + player:'phaseUseEnd' }, forced:true, filter:function(event,player){ @@ -632,41 +635,56 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, zhuSkill:true, trigger:{ - player:"phaseDiscardAfter", + player:"phaseDiscardBegin", }, direct:true, filter:function (event,player){ if(!player.hasZhuSkill('drlt_weidi')) return false; - return event.cards&&event.cards.length>0&&game.countPlayer(function(current){return current!=player&¤t.group=='qun'})>0; + return player.needsToDiscard()>0&&game.countPlayer(function(current){return current!=player&¤t.group=='qun'})>0; }, content:function(){ 'step 0' - event.cards=trigger.cards; + event.count=player.needsToDiscard(); event.logged=false; event.gived=[]; 'step 1' if(!game.hasPlayer(function(target){ return target!=player&&target.group=='qun'&&!event.gived.contains(target); })) event.finish(); - else player.chooseTarget('是否将 '+get.translation(event.cards[0])+' 给予其他群雄角色?',function(card,player,target){ - return target!=player&&target.group=='qun'&&!event.gived.contains(target); - }).ai=function(target){ - if(event.cards[0].name=='du') return -get.attitude(player,target); - return get.attitude(player,target); - }; + else player.chooseCardTarget({ + prompt:'是否将一张手牌给予其他群雄角色?', + filterTarget:function(card,player,target){ + return target!=player&&target.group=='qun'&&!_status.event.gived.contains(target); + }, + filterCard:true, + position:'h', + ai1:function(card){ + var value=get.value(card); + var player=_status.event.player; + if(game.hasPlayer(function(current){ + return get.sgn(value)==get.sgn(get.attitude(player,current)) + })) return 1; + return -1; + }, + ai2:function(target){ + var player=_status.event.player; + if(get.value(ui.selected.cards[0])<0) return -get.attitude(player,target); + return get.attitude(player,target); + }, + gived:event.gived, + }); 'step 2' if(result.bool){ if(!event.logged){ player.logSkill('drlt_weidi'); event.logged=true; } - player.line(result.targets); - player.$give(event.cards[0],result.targets[0]); - result.targets[0].gain(event.cards[0]); + player.line(result.targets[0]); + result.targets[0].gain(result.cards[0],player,'giveAuto'); event.gived.add(result.targets[0]); - }; - event.cards.remove(event.cards[0]); - if(event.cards.length>0) event.goto(1); + event.count--; + if(event.count) event.goto(1); + } }, }, "drlt_xiongluan":{ @@ -906,7 +924,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kongsheng:{ audio:2, trigger:{ - player:"phaseBegin", + player:"phaseZhunbeiBegin", }, direct:true, filter:function (event,player){ @@ -938,7 +956,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, mark:true, trigger:{ - player:"phaseEnd", + player:"phaseJieshuBegin", }, filter:function (event,player){ return player.storage.kongsheng2!=undefined&&player.storage.kongsheng2.length>0; @@ -950,7 +968,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.logSkill('kongsheng'); event.list=[]; for(var i=0;i=player.hp) return true; return false; }, content:function(){ - if(trigger.target.countCards('h')<=player.countCards('h')) trigger.directHit=true; - + if(trigger.target.countCards('h')<=player.countCards('h')) trigger.getParent().directHit.push(trigger.target); if(trigger.target.hp>=player.hp){ - if(typeof trigger.extraDamage!='number'){ - trigger.extraDamage=0; + var id=trigger.target.playerid; + var map=trigger.getParent().customArgs; + if(!map[id]) map[id]={}; + if(typeof map[id].extraDamage!='number'){ + map[id].extraDamage=0; } - trigger.extraDamage++; + map[id].extraDamage++; } }, ai:{ @@ -2439,7 +2462,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ - return lib.filter.targetInRange({name:'sha'},target,player)&&target.countCards('he'); + return target!=player&&lib.filter.targetInRange({name:'sha'},target,player)&&target.countCards('he'); }, content:function(){ "step 0" @@ -2479,7 +2502,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, //priority:-10, derivation:'reguanxing', - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, forced:true, filter:function(event,player){ if(player.storage.zhiji) return false; @@ -2576,7 +2599,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, popup:false, audio:false, - priority:-50, + //priority:-50, content:function(){ "step 0" player.chooseToDiscard(true); @@ -2608,7 +2631,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhuSkill:true, keepSkill:true, derivation:'jijiang', - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, forced:true, filter:function(event,player){ if(!player.hasZhuSkill('ruoyu'))return false; @@ -2808,26 +2831,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; }, content:function(){ - "step 0" player.judge(function(card){ if(get.suit(card)=='heart') return -1; return 1; - },ui.special); - "step 1" - var bool1=result.bool; - var bool2=!get.owner(result.card); - if(bool1&&bool2){ - event.card=result.card; - event.node=result.node; - } - else{ - if(bool2) game.cardsDiscard(result.card); - event.finish(); - } - "step 2" - event.card.goto(ui.special); - event.trigger("addCardToStorage"); + }).callback=lib.skill.tuntian.callback; + }, + callback:function(){ + 'step 0' + if(!event.judgeResult.bool){ + game.cardsDiscard(card); + event.finish(); + } + else if(get.mode()=='guozhan'){ + player.chooseBool('是否将'+get.translation(card)+'作为【田】置于武将牌上?').ai=function(){ + return true; + }; + } + else event.directbool=true; + 'step 1' + if(!result.bool&&!event.directbool){ + game.cardsDiscard(card); + return; + }; + event.node=event.judgeResult.node; + //event.trigger("addCardToStorage"); + //event.card.fix(); player.storage.tuntian.push(event.card); + //event.card.goto(ui.special); + game.cardsGotoSpecial(card); event.node.moveDelete(player); game.broadcast(function(cardid,player){ var node=lib.cardOL[cardid]; @@ -2846,13 +2877,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:'cards' }, group:'tuntian_dist', + locked:false, subSkill:{ dist:{ + locked:false, mod:{ globalFrom:function(from,to,distance){ if(from.storage.tuntian){ var num=distance-from.storage.tuntian.length; - if(_status.event.skill=='jixi_backup'||_status.event.skill=='gzjixi') num++; + if(_status.event.skill=='jixi_backup'||_status.event.skill=='gzjixi_backup') num++; return num; } } @@ -2900,7 +2933,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, unique:true, juexingji:true, - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, forced:true, filter:function(event,player){ if(player.storage.tuntian) return player.storage.tuntian.length>=3&&!player.storage.zaoxian; @@ -2990,7 +3023,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, derivation:['reyingzi','gzyinghun'], unique:true, - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, filter:function(event,player){ return player.hp==1&&!player.storage.hunzi; }, @@ -3465,9 +3498,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, huashen2:{ audio:2, - trigger:{player:['phaseBeginStart','phaseAfter','huashenStart']}, + trigger:{player:['phaseZhunbeiBeginStart','phaseAfter','huashenStart']}, filter:function(event,player,name){ - if(name=='phaseBeginStart'&&game.phaseNumber==1) return false; + if(name=='phaseZhunbeiBeginStart'&&game.phaseNumber==1) return false; return true; }, //priority:50, @@ -3552,13 +3585,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } - // if(event.triggername=='phaseBegin'){ + // if(event.triggername=='phaseZhunbeiBegin'){ // (function(){ // var skills=[link]; // var list=[]; // game.expandSkills(skills); // var triggerevent=event._trigger; - // var name='phaseBegin'; + // var name='phaseZhunbeiBegin'; // for(i=0;i1; }, - priority:5, + //priority:5, content:function(){ "step 0" player.chooseToCompare(trigger.player); @@ -3859,10 +3892,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, xingshang:{ audio:2, - unique:true, - gainable:true, + //unique:true, + //gainable:true, trigger:{global:'die'}, - priority:5, + //priority:5, filter:function(event){ return event.player.countCards('he')>0; }, @@ -4186,7 +4219,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yinghun:{ audio:2, audioname:['sunce'], - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, filter:function(event,player){ return player.hp0; }, @@ -4350,10 +4383,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, roulin:{ audio:2, - trigger:{player:'shaBegin',target:'shaBegin'}, + trigger:{player:'useCardToPlayered',target:'useCardToTargeted'}, forced:true, filter:function(event,player){ - if(event.directHit) return false; + if(event.card.name!='sha') return false; if(player==event.player){ return event.target.sex=='female'; } @@ -4362,20 +4395,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ check:function(event,player){ return player==event.player; }, - priority:-1, content:function(){ - if(typeof trigger.shanRequired=='number'){ - trigger.shanRequired++; + var id=(player==trigger.player?trigger.target:player).playerid; + var map=trigger.getParent().customArgs; + if(!map[id]) map[id]={}; + if(typeof map[id].shanRequired=='number'){ + map[id].shanRequired++; } else{ - trigger.shanRequired=2; + map[id].shanRequired=2; } } }, benghuai:{ audio:2, audioname:['zhugedan'], - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, forced:true, check:function(){ return false; @@ -4646,16 +4681,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 5-get.useful(card); }, content:function(){ - 'step 0' player.draw(); - 'step 1' - game.cardsDiscard(cards); }, discard:false, + visible:true, + loseTo:'discardPile', prompt:'将一张梅花牌置入弃牌堆并摸一张牌', delay:0.5, prepare:function(cards,player){ player.$throw(cards,1000); + game.log(player,'将',cards,'置入了弃牌堆'); }, ai:{ basic:{ @@ -5221,7 +5256,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mengjin:{ audio:2, trigger:{player:'shaMiss'}, - priority:-1, + //priority:-1, filter:function(event){ return event.target.countCards('he')>0; }, @@ -5468,7 +5503,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, jushou:{ audio:true, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, content:function(){ player.draw(3); player.turnOver(); @@ -5483,7 +5518,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, moon_jushou:{ audio:'jushou', - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, content:function(){ player.draw(); player.turnOver(); @@ -5498,17 +5533,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, liegong:{ audio:2, - trigger:{player:'shaBegin'}, + trigger:{player:'useCardToTargeted'}, check:function(event,player){ return get.attitude(player,event.target)<=0; }, logTarget:'target', filter:function(event,player){ + if(event.card.name!='sha') return false; var length=event.target.countCards('h'); return (length>=player.hp||length<=player.getAttackRange()); }, content:function(){ - trigger.directHit=true; + trigger.getParent().directHit.push(trigger.target); }, locked:false, mod:{ @@ -5880,7 +5916,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, xintianxiang3:{ - trigger:{player:['phaseBegin','dieBegin']}, + trigger:{player:['phaseZhunbeiBegin','dieBegin']}, silent:true, content:function(){ if(player.storage.xintianxiang3){ @@ -5937,7 +5973,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ init:function(player){ player.storage.gzbuqu=[]; }, - priority:-15, + //priority:-15, intro:{ content:'cards' }, @@ -6014,9 +6050,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - var num=(-trigger.num-Math.max(player.hp-trigger.num,1)+1) - player.storage.gzbuqu.addArray(get.cards(num)); - event.trigger("addCardToStorage"); + var num=(-trigger.num-Math.max(player.hp-trigger.num,1)+1); + var cards=get.cards(num); + game.cardsGotoSpecial(cards); + player.storage.gzbuqu.addArray(cards); + //event.trigger("addCardToStorage"); player.showCards(get.translation(player)+'的不屈牌',player.storage.gzbuqu); 'step 1' lib.skill.gzbuqu.process(player); @@ -6036,7 +6074,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.storage.buqu==undefined) player.storage.buqu=[]; player.storage.buqu.push(event.card); player.syncStorage('buqu'); - event.trigger("addCardToStorage"); + //event.trigger("addCardToStorage"); + game.cardsGotoSpecial(event.card); player.showCards(player.storage.buqu,'不屈') player.markSkill('buqu'); "step 1" @@ -6444,15 +6483,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "drlt_congjian":"从谏", "drlt_congjian_info":"当你成为锦囊牌的目标时,若此牌的目标数大于1,则你可以交给其中一名其他目标角色一张牌,然后摸一张牌,若你给出的是装备牌,改为摸两张牌", "drlt_yongsi":"庸肆", - "drlt_yongsi_info":"锁定技,摸牌阶段,你改为摸X张牌(X为存活势力数);弃牌阶段,若你本回合:1.没有造成伤害,将手牌摸至当前体力值;2.造成的伤害超过1点,本回合手牌上限改为已损失体力值", + "drlt_yongsi_info":"锁定技,摸牌阶段,你改为摸X张牌(X为存活势力数);出牌阶段结束时,若你本回合:1.没有造成伤害,将手牌摸至当前体力值;2.造成的伤害超过1点,本回合手牌上限改为已损失体力值", "drlt_weidi":"伪帝", - "drlt_weidi_info":"主公技,你于弃牌阶段弃置的牌可以交给其他群雄角色各一张。", + "drlt_weidi_info":"主公技,弃牌阶段开始时,若你的手牌数大于手牌上限,则你可以将至多X张手牌分别交给等量的其他群雄角色(X为你的手牌数与手牌上限之差)。", "drlt_qianjie":"谦节", - "drlt_qianjie_info":"锁定技,你不能被横置,且不能成为延时类锦囊的目标。你不能成为其他角色拼点的目标。", + "drlt_qianjie_info":"锁定技,当你横置时,取消之。你不能成为延时类锦囊的目标。你不能成为其他角色拼点的目标。", "drlt_jueyan":"决堰", "drlt_jueyan_info":"出牌阶段限一次,你可以废除一个装备栏,然后执行对应一项:武器栏,本回合内你可以多使用三张【杀】;防具栏,摸三张牌,本回合手牌上限+3;2个坐骑栏,本回合你使用的牌无距离限制;宝物栏,本回合获得技能集智", "drlt_poshi":"破势", - "drlt_poshi_info":"觉醒技,准备阶段开始时,若你的装备栏均已被废除或体力值为1,则你扣减一点体力上限,将手牌摸至体力上限,失去技能“决堰”并获得技能“怀柔”", + "drlt_poshi_info":"觉醒技,准备阶段开始时,若你的装备栏均已被废除或体力值为1,则你减一点体力上限,将手牌摸至体力上限,失去技能“决堰”并获得技能“怀柔”", "drlt_huairou":"怀柔", "drlt_huairou_info":"出牌阶段,你可以重铸装备牌", "drlt_zhenggu":"镇骨", diff --git a/character/sp.js b/character/sp.js index 28f9c4ab9..7d44a3fa0 100755 --- a/character/sp.js +++ b/character/sp.js @@ -629,14 +629,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(target.canUse('juedou',player,false)) list.push('juedou'); if(!list.length) event.finish(); else if(list.length==1) event._result={control:list[0]}; - else target.chooseControl(list).set('prompt','对'+get.translation(player)+'使用一张【杀】或【决斗】。'); + else target.chooseControl(list).set('prompt','对'+get.translation(player)+'使用一张【杀】或【决斗】。').ai=function(){ + return get.effect(player,{name:'sha'},target,target)>=get.effect(player,{name:'juedou'},target,target)?'sha':'juedou'; + }; 'step 3' target.useCard({name:result.control},player); }, + ai:{ + order:7, + result:{ + target:-1.2, + player:function(player,target){ + if(target.countCards('h')-player.countCards('h')>1) return 1; + if(get.damageEffect(target,player,player,player)>0) return 1; + if(player.hp>3||player.countCards('h','sha')&&player.countCards('h','shan')) return 0; + if(player.hp>2) return -1.1; + return -2; + }, + }, + }, }, niluan:{ audio:2, - trigger:{global:'phaseEnd'}, + trigger:{global:'phaseJieshuBegin'}, filter:function(event,player){ return event.player!=player&&(event.player.hp>player.hp||event.player.countUsed('sha')) }, @@ -726,7 +741,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, audio:'gxlianhua', sub:true, - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, //filter:function(event,player){ // return player.storage.gxlianhua&&player.storage.gxlianhua.red+player.storage.gxlianhua.black>0; //}, @@ -887,7 +902,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, mingjie:{ - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, check:function(){ return ui.cardPile.hasChildNodes()&&get.color(ui.cardPile.firstChild)!='black'; }, @@ -1155,7 +1170,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, beishui:{ - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, audio:2, skillAnimation:'epic', animationColor:'thunder', @@ -1335,7 +1350,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:"cards", }, trigger:{ - player:"phaseEnd", + player:"phaseJieshuBegin", }, direct:true, filter:function (event,player){ @@ -1391,7 +1406,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, "biaozhao3":{ trigger:{ - player:"phaseBegin", + player:"phaseZhunbeiBegin", }, forced:true, audio:"biaozhao", @@ -1445,7 +1460,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0]; player.logSkill('yechou',target); player.line(target,'green'); - target.addTempSkill('yechou2',{player:'phaseBeginStart'}); + target.addTempSkill('yechou2',{player:'phaseZhunbeiBegin'}); } }, ai:{ @@ -1954,7 +1969,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } if(list.length==1){ target.storage.xiongsuan_restore=list[0]; - target.addTempSkill('xiongsuan_restore','phaseBegin'); + target.addTempSkill('xiongsuan_restore','phaseZhunbeiBegin'); event.finish(); } else if(list.length>1){ @@ -1965,7 +1980,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } 'step 2' target.storage.xiongsuan_restore=result.control; - target.addTempSkill('xiongsuan_restore','phaseBegin'); + target.addTempSkill('xiongsuan_restore','phaseZhunbeiBegin'); }, subSkill:{ restore:{ @@ -2799,7 +2814,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool){ player.addTempSkill('spwenji_respond'); player.storage.spwenji_respond=result.cards[0].name; - event.target.give(result.cards,player); + event.target.give(result.cards,player,true); } }, subSkill:{ @@ -2849,7 +2864,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ used:{}, end:{ audio:'sptunjiang', - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, frequent:true, prompt2:'结束阶段,若你未跳过本回合的出牌阶段,且你于本回合出牌阶段内未使用牌指定过其他角色为目标,则你可以摸X张牌(X为全场势力数)。', filter:function(event,player){ @@ -2911,7 +2926,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ combo:'guju' }, - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, forced:true, skillAnimation:true, animationColor:'thunder', @@ -3038,7 +3053,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, zongkui:{ - trigger:{player:'phaseBegin',global:'roundStart'}, + trigger:{player:'phaseZhunbeiBegin',global:'roundStart'}, direct:true, audio:2, filter:function(event,player){ @@ -3126,7 +3141,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, discard3:{ - trigger:{global:'phaseBegin'}, + trigger:{global:'phaseZhunbeiBegin'}, silent:true, content:function(){ delete player.storage.zishu; @@ -3282,7 +3297,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, polu:{ audio:2, - trigger:{player:['phaseBegin','damageEnd']}, + trigger:{player:['phaseZhunbeiBegin','damageEnd']}, forced:true, filter:function(event,player){ return !player.getEquip('ly_piliche'); @@ -3488,7 +3503,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:['damageEnd','recoverEnd']}, forced:true, popup:false, - priority:15, + //priority:15, filter:function(event,player){ if(!(player.storage.xianfu2&&player.storage.xianfu2.isIn()&&event.num>0)) return false; if(event.name=='damage') return true; @@ -3934,7 +3949,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jingong2:{ - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, forced:true, filter:function(event,player){ return !player.getStat('damage'); @@ -3990,7 +4005,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, lizhan:{ audio:'yanzheng', - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, direct:true, filter:function(event,player){ for(var i=0;i1; }, @@ -4036,13 +4051,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, yixiang:{ audio:2, - trigger:{target:'useCardToBegin'}, + trigger:{target:'useCardToTargeted'}, frequent:true, filter:function(event,player){ if(event.player.hp<=player.hp) return false; if(event.targets.length>1) return false; var hs=player.getCards('h'); - var names=['sha','shan','tao','jiu']; + var names=['sha','shan','tao','jiu','du']; for(var i=0;i=3; @@ -5386,7 +5401,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:['yjixi_count1','yjixi_count2'], subSkill:{ count1:{ - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, silent:true, content:function(){ player.storage.yjixi++; @@ -5836,7 +5851,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:['dying','dieBegin']}, forced:true, popup:false, - priority:10, + //priority:10, filter:function(event,player){ return event.player==player.storage.shichou_target; }, @@ -5967,7 +5982,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, yingjian:{ - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, direct:true, content:function(){ player.chooseUseTarget('###是否发动【影箭】?###视为使用一张没有距离限制的【杀】',{name:'sha'},false,'nodistance').logSkill='yingjian'; @@ -6203,7 +6218,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, tuifeng2:{ audio:'tuifeng', - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, forced:true, filter:function(event,player){ return player.storage.tuifeng.length>0; @@ -6548,7 +6563,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, shefu:{ - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, direct:true, audio:2, init:function(player){ @@ -6638,7 +6653,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, shefu2:{ trigger:{global:['useCard','respondEnd']}, - priority:15, + //priority:15, audio:'shefu', filter:function(event,player){ if(_status.currentPhase==player) return false; @@ -7040,7 +7055,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'qizhi2' }, qizhi2:{ - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, silent:true, content:function(){ player.storage.qizhi=0; @@ -7048,7 +7063,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, jinqu:{ audio:2, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, check:function(event,player){ return player.storage.qizhi>=player.countCards('h'); }, @@ -7109,8 +7124,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, mouduan2:{ audio:1, - trigger:{global:'phaseBegin'}, - priority:5, + trigger:{global:'phaseZhunbeiBegin'}, + //priority:5, filter:function(event,player){ return player._mouduan_mark&&player._mouduan_mark.name=='文'&&player.countCards('h')>2; }, @@ -7311,7 +7326,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, xuehen:{ audio:2, - trigger:{global:'phaseEnd'}, + trigger:{global:'phaseJieshuBegin'}, forced:true, filter:function(event,player){ return player.hasSkill('fenyong2')&&event.player.isAlive(); @@ -7424,17 +7439,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger.player.line(player); } else{ - if(get.itemtype(trigger.card)=='card'){ - trigger.player.$gain2(trigger.card); + if(get.itemtype(trigger.cards)=='cards'){ + trigger.player.$gain2(trigger.cards); if(!trigger.player.storage.zhenwei2){ - trigger.player.storage.zhenwei2=[trigger.card]; + trigger.player.storage.zhenwei2=trigger.cards.slice(0); } else{ - trigger.player.storage.zhenwei2.push(trigger.card); + trigger.player.storage.zhenwei2.addArray(trigger.cards); } - ui.special.appendChild(trigger.card); + game.cardsGotoSpecial(trigger.cards); + //ui.special.appendChild(trigger.card); trigger.player.markSkill('zhenwei2'); - event.trigger("addCardToStorage"); + //event.trigger("addCardToStorage"); } trigger.getParent().excluded.add(trigger.target); trigger.player.addSkill('zhenwei2'); @@ -7545,7 +7561,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, xunzhi:{ audio:2, - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, init:function(player){ player.storage.xunzhi=0; }, @@ -7614,7 +7630,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, junwei:{ - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, direct:true, filter:function(event,player){ return player.storage.yinling&&player.storage.yinling.length>=3; @@ -7730,7 +7746,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:'cards' }, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, forced:true, content:function(){ 'step 0' @@ -7817,10 +7833,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player.countCards('he',{suit:'diamond'})>0; }, discard:false, - lose:false, + //lose:false, + visible:true, + toStorage:true, prepare:'give', content:function(){ - player.lose(cards,ui.special,'toStorage','visible'); + //player.lose(cards,ui.special,'toStorage','visible'); if(target.hasSkill('yanxiao2')&&target.storage.yanxiao2){ target.storage.yanxiao2.push(cards[0]); target.syncStorage('yanxiao2'); @@ -7942,7 +7960,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:['xingwu_color','xingwu_color2'], subSkill:{ color:{ - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, silent:true, content:function(){ player.storage.xingwu_color=['black','red']; @@ -8050,7 +8068,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, yinbing:{ - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, direct:true, audio:2, init:function(player){ @@ -8128,7 +8146,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'yinbing_discard' }, juedi:{ - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, filter:function(event,player){ return player.storage.yinbing&&player.storage.yinbing.length>0; }, @@ -8348,7 +8366,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, fentian:{ audio:2, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, direct:true, filter:function(event,player){ if(player.countCards('h')>=player.hp) return false; @@ -8396,7 +8414,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, zhiri:{ - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, forced:true, unique:true, juexingji:true, @@ -8448,7 +8466,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ danji:{ skillAnimation:true, animationColor:'water', - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, forced:true, unique:true, juexingji:true, @@ -8560,7 +8578,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, shuliang:{ audio:2, - trigger:{global:'phaseEnd'}, + trigger:{global:'phaseJieshuBegin'}, direct:true, filter:function(event,player){ return player.storage.tunchu&&player.storage.tunchu.length>0&&event.player.countCards('h')0&&player.countCards('h')>0; @@ -9132,7 +9150,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ranshang2:{ audio:2, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, forced:true, filter:function(event,player){ return player.storage.ranshang>0; @@ -9148,8 +9166,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ (event.card.name=='nanman'||event.card.name=='wanjian'); }, content:function(){ - player.addTempSkill('hanyong3'); - player.storage.hanyong3=trigger.card; + trigger.baseDamage++; }, }, hanyong3:{ @@ -9166,7 +9183,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, yishe:{ audio:2, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, init:function(player){ player.storage.yishe=[]; }, @@ -9399,7 +9416,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, lixia:{ audio:2, - trigger:{global:'phaseEnd'}, + trigger:{global:'phaseJieshuBegin'}, filter:function(event,player){ return event.player.isAlive()&&event.player!=player&&get.distance(event.player,player,'attack')>1; }, @@ -9434,18 +9451,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, logTarget:'source', content:function(){ - "step 0" - trigger.source.judge(ui.special); - "step 1" - if(result.color=='black'){ - game.cardsDiscard(result.card); - trigger.num++; + trigger.source.judge().callback=lib.skill.fuji.callback; + }, + callback:function(){ + var evt=event.getParent(2); + if(event.judgeResult.color=='black'){ + game.cardsDiscard(card); + evt._trigger.num++; } else{ - trigger.source.gain(result.card); - trigger.source.$gain2(result.card); + evt._trigger.source.gain(card,'gain2'); } - } + }, }, fulu:{ enable:'chooseToUse', @@ -9528,7 +9545,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, kunfen:{ audio:2, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, direct:true, content:function(){ "step 0" @@ -9571,7 +9588,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, derivation:'tiaoxin', trigger:{player:'dying'}, - priority:10, + //priority:10, forced:true, filter:function(event,player){ return !player.storage.kunfen; @@ -9623,7 +9640,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, jilei:{ trigger:{player:'damageEnd'}, - priority:9, + //priority:9, audio:2, direct:true, filter:function(event){ @@ -9750,7 +9767,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var current=ui.discardPile.childNodes[i]; if((!trigger.cards.contains(current))&&get.number(current)==number) event.togain.push(current); } - if(!event.togain.length) event.goto(4); + if(!event.togain.length) event.goto(5); "step 3" player.chooseButton(['是否获得其中的一张牌?',event.togain]).ai=function(button){ return get.value(button.link); @@ -9828,8 +9845,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:true, unique:true, mark:true, - trigger:{player:'phaseBegin'}, - priority:10, + trigger:{player:'phaseZhunbeiBegin'}, + //priority:10, filter:function(event,player){ if(player.storage.zuixiang) return false; return true; @@ -9839,8 +9856,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ "step 0" - player.storage.zuixiang=get.cards(3); - event.trigger('addCardToStorage'); + var cards=get.cards(3); + player.storage.zuixiang=cards; + game.cardsGotoSpecial(cards); player.showCards(player.storage.zuixiang); player.markSkill('zuixiang'); player.syncStorage('zuixiang'); @@ -9904,8 +9922,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, zuixiang2:{ unique:true, - trigger:{player:'phaseBegin'}, - priority:9.5, + trigger:{player:'phaseZhunbeiBegin'}, + //priority:9.5, filter:function(event,player){ if(player.storage.zuixiang&&player.storage.zuixiang.length) return true; return false; @@ -9919,8 +9937,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.finish(); } else{ - player.storage.zuixiang.addArray(get.cards(3)); - event.trigger('addCardToStorage'); + var cards=get.cards(3); + player.storage.zuixiang.addArray(cards); + game.cardsGotoSpecial(cards); + //event.trigger('addCardToStorage'); player.showCards(player.storage.zuixiang); player.markSkill('zuixiang'); player.syncStorage('zuixiang'); @@ -10077,14 +10097,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, prepare:'throw', discard:false, - lose:false, + //lose:false, + visible:true, + toStorage:true, content:function(){ - player.lose(cards,ui.special,'toStorage'); + //player.lose(cards,ui.special,'toStorage'); target.$gain2(cards); target.storage.zhoufu2=cards[0]; target.addSkill('zhoufu2'); target.storage.zhoufu3=player; - ui.special.appendChild(cards[0]); + //ui.special.appendChild(cards[0]); target.syncStorage('zhoufu2'); }, check:function(card){ @@ -10101,7 +10123,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhoufu2:{ trigger:{player:'judgeBegin'}, forced:true, - priority:10, + //priority:10, mark:'card', filter:function(event){ return !event.directresult; @@ -10123,7 +10145,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, zhoufu3:{ - trigger:{global:'phaseEnd'}, + trigger:{global:'phaseJieshuBegin'}, silent:true, content:function(){ if(player.storage.zhoufu3.isIn()){ @@ -10159,7 +10181,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, kuiwei:{ audio:2, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, check:function(event,player){ if(player.isTurnedOver()) return true; var num=game.countPlayer(function(current){ @@ -10250,7 +10272,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, wangzun:{ audio:2, - trigger:{global:'phaseBegin'}, + trigger:{global:'phaseZhunbeiBegin'}, check:function(event,player){ var att=get.attitude(player,event.player); return !game.hasPlayer(function(current){ @@ -10276,7 +10298,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'wangzun2' }, wangzun2:{ - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, silent:true, content:function(){ player.unmarkSkill('wangzun'); @@ -10392,7 +10414,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juexingji:true, forceunique:true, derivation:'xiaoji', - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, filter:function(event,player){ if(player.storage.fanxiang) return false; return game.hasPlayer(function(current){ @@ -10755,7 +10777,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, qiluan4:{ - trigger:{global:'phaseBegin'}, + trigger:{global:'phaseZhunbeiBegin'}, silent:true, content:function(){ player.storage.qiluan=0; @@ -10964,7 +10986,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, fenming:{ audio:2, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, check:function(event,player){ var num=game.countPlayer(function(current){ if(current.isLinked()&¤t.countCards('he')){ @@ -11032,7 +11054,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, xiaoguo:{ audio:2, - trigger:{global:'phaseEnd'}, + trigger:{global:'phaseJieshuBegin'}, filter:function(event,player){ return event.player.isAlive()&&event.player!=player&&player.countCards('h',{type:'basic'}); }, @@ -11082,7 +11104,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'dying'}, forced:true, popup:false, - priority:12, + //priority:12, check:function(){ return false; }, @@ -11217,7 +11239,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, junbing2:{ audio:'junbing', - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, filter:function(event,player){ if(player.countCards('h')>1) return false; return game.hasPlayer(function(current){ @@ -11390,7 +11412,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, shenzhi:{ audio:2, - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, check:function(event,player){ if(player.hp>2) return false; var cards=player.getCards('h'); @@ -11419,7 +11441,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, animationColor:'orange', audio:2, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, forced:true, unique:true, juexingji:true, @@ -11545,7 +11567,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, huxiao:{ trigger:{source:'damageSource'}, - silent:true, + //silent:true, filter:function(event,player){ if(event._notrigger.contains(event.player)) return false; return event.nature=='fire'; @@ -11555,37 +11577,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.storage.huxiao=[]; } player.storage.huxiao.add(trigger.player); + trigger.player.draw(); + player.addTempSkill('huxiao3'); }, - group:['huxiao_draw','huxiao_clear'], + group:['huxiao_clear'], subSkill:{ - draw:{ - trigger:{source:'damageSource'}, - priority:-6, - filter:function(event,player){ - if(!player.storage.huxiao||!player.storage.huxiao.length) return false; - for(var i=0;i0; @@ -12478,7 +12474,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ animationColor:'thunder', audio:true, derivation:['benghuai','weizhong'], - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, filter:function(event,player){ return player.maxHp>game.players.length&&player.hp1){ - return get.unuseful2(card); - } - return -1; - }); - "step 1" - if(result.bool==false){ - trigger.directHit=true; - } + var id=(player==trigger.player?trigger.target:trigger.player)['playerid']; + var idt=trigger.target.playerid; + var map=trigger.getParent().customArgs; + if(!map[idt]) map[idt]={}; + if(!map[idt].shaReq) map[idt].shaReq={}; + if(!map[idt].shaReq[id]) map[idt].shaReq[id]=1; + map[idt].shaReq[id]++; }, ai:{ result:{ @@ -2312,7 +2310,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, biyue:{ audio:2, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, frequent:true, content:function(){ player.draw(); @@ -2320,7 +2318,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, xinbiyue:{ audio:'biyue', - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, frequent:true, // alter:true, content:function(){ @@ -2332,8 +2330,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, yaowu:{ - trigger:{player:'damage'}, - priority:1, + trigger:{player:'damageBegin3'}, + //priority:1, audio:2, filter:function(event){ if(event.card&&(event.card.name=='sha')){ @@ -2460,6 +2458,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ longdan1:'龙胆', longdan2:'龙胆', mashu:'马术', + mashu2:'马术', feiying:'飞影', tieji:'铁骑', jizhi:'集智', @@ -2508,6 +2507,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kongcheng_info:'锁定技,当你没有手牌时,你不能成为【杀】或【决斗】的目标。', longdan_info:'你可以将【杀】当做【闪】,或将【闪】当做【闪】使用或打出', mashu_info:'锁定技,你计算与其他角色的距离时-1。', + mashu2_info:'锁定技,你计算与其他角色的距离时-1。', feiying_info:'锁定技,其他角色计算与你的距离时+1', tieji_info:'当你使用【杀】指定目标时,你可以进行一次判定。若结果为红色,则此【杀】不可被闪避。', jizhi_info:'当你使用一张非转化的普通锦囊牌时,你可以摸一张牌。', diff --git a/character/xinghuoliaoyuan.js b/character/xinghuoliaoyuan.js index 48b790f3c..3aed9bff9 100755 --- a/character/xinghuoliaoyuan.js +++ b/character/xinghuoliaoyuan.js @@ -46,7 +46,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "xinfu_langxi":{ audio:2, trigger:{ - player:"phaseBegin", + player:"phaseZhunbeiBegin", }, direct:true, content:function (){ @@ -491,7 +491,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, discard:{ trigger:{ - player:"phaseBegin", + player:"phaseZhunbeiBegin", }, forced:true, filter:function (event,player){ @@ -520,7 +520,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, trigger:{ - player:"phaseEnd", + player:"phaseJieshuBegin", }, direct:true, filter:function (player,event){ @@ -543,7 +543,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "xinfu_zhenxing":{ audio:2, trigger:{ - player:["damageEnd","phaseEnd"], + player:["damageEnd","phaseJieshuBegin"], }, direct:true, content:function (){ @@ -806,11 +806,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ player:"phaseDrawBefore", }, - priority:10, + //priority:10, content:function (){ "step 0" event.cards=get.cards(4); - player.chooseCardButton(event.cards,2,'选择两张牌置于牌堆顶').set('ai',ai.get.buttonValue); + player.chooseCardButton(true.event.cards,2,'选择两张牌置于牌堆顶').set('ai',ai.get.buttonValue); "step 1" if(result.bool){ var choice=[]; @@ -1177,7 +1177,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, gainable:true, trigger:{global:'die'}, - priority:5, + //priority:5, filter:function(event){ return event.player.countCards('he')>0; }, @@ -1190,7 +1190,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "xinfu_fujian":{ audio:2, trigger:{ - player:"phaseEnd", + player:"phaseJieshuBegin", }, filter:function (event,player){ return !game.hasPlayer(function(current){ @@ -1361,7 +1361,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return event.player.hp<0&&event.player!=player; }, forced:true, - priority:7, + //priority:7, content:function (){ if(trigger.parent.name=='damage'&&get.itemtype(trigger.parent.cards)=='cards'&&get.position(trigger.parent.cards[0])=='d'){ player.gain(trigger.parent.cards,"gain2"); @@ -1386,7 +1386,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, audio:3, trigger:{ - player:"phaseBegin", + player:"phaseZhunbeiBegin", }, forced:true, direct:true, @@ -2037,7 +2037,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, "xinfu_dianhua":{ trigger:{ - player:["phaseBegin","phaseEnd"], + player:["phaseZhunbeiBegin","phaseJieshuBegin"], }, frequent:true, audio:2, @@ -2709,7 +2709,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ intro:{ content:"limited", }, - priority:6, + //priority:6, audio:2, content:function (){ "step 0" @@ -2740,7 +2740,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ unique:true, audio:2, trigger:{ - player:"phaseEnd", + player:"phaseJieshuBegin", }, limited:true, init:function (player){ @@ -2870,27 +2870,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(event.targets.contains(player)) return true; return false; }, - content:function (){ - "step 0" - player.judge(function(card){ - return 1; - },ui.special); - "step 1" - if(result.bool){ - result.card.goto(ui.special); - player.storage.xinfu_jijun.push(result.card); - result.node.moveDelete(player); + callback:function(){ + game.cardsGotoSpecial(card); + player.storage.xinfu_jijun.push(card); + var node=event.judgeResult.node; + node.moveDelete(player); game.broadcast(function(cardid,player){ var node=lib.cardOL[cardid]; if(node){ node.moveDelete(player); } - },result.node.cardid,player); - game.addVideo('gain2',player,get.cardsInfo([result.node])); + },node.cardid,player); + game.addVideo('gain2',player,get.cardsInfo([node])); player.markSkill('xinfu_jijun'); game.addVideo('storage',player,['xinfu_jijun',get.cardsInfo(player.storage.xinfu_jijun),'cards']); - event.trigger("addCardToStorage"); - } + //event.trigger("addCardToStorage"); + }, + content:function (){ + player.judge(function(card){ + return 1; + }).callback=lib.skill.xinfu_jijun.callback; }, init:function (player){ player.storage.xinfu_jijun=[]; @@ -2963,7 +2962,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, audio:2, trigger:{ - player:"phaseEnd", + player:"phaseJieshuBegin", }, filter:function (event,player){ return player.countCards('he')&&player.storage.xinfu_jijun.length; @@ -3299,7 +3298,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(range<3&&event.num<=1) return false; return true; }, - priority:-9.5, + //priority:-9.5, content:function (){ trigger.num=trigger.source.getAttackRange()<3?1:trigger.num+1; }, @@ -3491,7 +3490,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "xinfu_youdi":{ audio:2, trigger:{ - player:"phaseEnd", + player:"phaseJieshuBegin", }, direct:true, filter:function (event,player){ @@ -4434,19 +4433,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, trigger:{ - player:['phaseBegin','phaseEnd'], + player:['phaseZhunbeiBefore','phaseJieshuBefore'], }, forced:true, audio:2, group:'xinfu_pdgyingshi2', - priority:Infinity, + priority:15, content:function(){ - var evt=event.getParent('arrangeTrigger'); - if(evt&&evt.map){ - evt.map=[]; - evt.doing.list=[]; - } - game.log(player,'跳过了',event.triggername=='phaseBegin'?'准备阶段':'结束阶段'); + trigger.cancel(); + game.log(player,'跳过了',event.triggername=='phaseZhunbeiBefore'?'准备阶段':'结束阶段'); }, }, xinfu_pdgyingshi2:{ @@ -4650,7 +4645,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, prompt:function (links,player){ - var str=!player.storage.yizan?'两张手牌(其中至少应有一张基本牌)':'一张基本牌'; + var str=!player.storage.yizan?'两张牌(其中至少应有一张基本牌)':'一张基本牌'; return '将'+str+'当做'+get.translation(links[0][3]||'')+get.translation(links[0][2])+'使用'; }, }, @@ -4959,7 +4954,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:"dying", source:"gainEnd", }, - priority:6, + //priority:6, audio:2, filter:function (event,player){ if(event.name=='dying') return true; @@ -5233,7 +5228,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "xinfu_shangjian":{ group:["xinfu_shangjian_count","xinfu_shangjian_init"], trigger:{ - global:"phaseEnd", + global:"phaseJieshuBegin", }, audio:2, filter:function (event,player){ @@ -5346,7 +5341,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })) return false; return true; }, - priority:-10, + //priority:-10, content:function (){ trigger.num=1; }, diff --git a/character/yijiang.js b/character/yijiang.js index ee45ba057..76b6226e4 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -195,14 +195,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xindanshou:{ audio:'danshou', trigger:{ - global:['phaseEnd','phaseBefore'], + global:['phaseJieshuBegin','phaseBefore'], target:'useCardToTargeted', }, forced:true, popup:false, filter:function(event,player,name){ return name=='phaseBefore'|| - ((name=='phaseEnd'&&event.player!=player&&player.countCards('he')>=event.player.countCards('h'))|| + ((name=='phaseJieshuBegin'&&event.player!=player&&player.countCards('he')>=event.player.countCards('h'))|| (event.targets&&event.targets.contains(player))) &&!player.hasSkill('xindanshou_as'); }, @@ -213,7 +213,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.finish(); return; } - else if(event.triggername=='phaseEnd'){ + else if(event.triggername=='phaseJieshuBegin'){ var num=trigger.player.countCards('h'); if(num>0) player.chooseToDiscard(get.prompt('xindanshou',trigger.player),num,'弃置'+get.cnNumber(num)+'张牌并对'+get.translation(trigger.player)+'造成1点伤害','he').set('logSkill',['xindanshou',trigger.player]).set('ai',function(card){ if(get.damageEffect(_status.event.getTrigger().player,_status.event.player,_status.event.player)>0) return 6-get.value(card); @@ -658,7 +658,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, xindangxian:{ - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, forced:true, audio:'dangxian', audioname:['guansuo'], @@ -1401,7 +1401,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhenjun:{ audio:"jieyue", trigger:{ - player:"phaseBegin", + player:"phaseZhunbeiBegin", }, filter:function (event,player){ return game.hasPlayer(function(current){ @@ -1452,7 +1452,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ rezhenjun:{ audio:"jieyue", trigger:{ - player:"phaseBegin", + player:"phaseZhunbeiBegin", }, filter:function (event,player){ return game.hasPlayer(function(current){ @@ -1556,7 +1556,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:['pingkou_init','pingkou_count'], subSkill:{ init:{ - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, silent:true, content:function(){ player.storage.pingkou=0; @@ -1576,7 +1576,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, direct:true, filter:function(event,player){ return player.storage.pingkou>0; @@ -1735,9 +1735,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:8, threaten:1.8, result:{ - player:function(player,target){ - if(target.isEnemiesOf(player)&&!target.countCards('he')) return 0; - return 1; + target:function(player,target){ + var att=get.attitude(player,target); + var num=player.getStat('skill').pindi+1; + if(att<=0&&target.countCards('he')0; }, @@ -5549,7 +5551,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, dangxian:{ - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, forced:true, audio:2, audioname:['guansuo'], @@ -5913,7 +5915,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, xingxue:{ audio:2, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, direct:true, content:function(){ 'step 0' @@ -6537,7 +6539,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ init:function(player){ player.storage.huomo={}; }, - trigger:{global:'phaseBegin'}, + trigger:{global:'phaseZhunbeiBegin'}, silent:true, content:function(){ player.storage.huomo={}; @@ -6741,7 +6743,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, taoxi3:{ - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, forced:true, popup:false, filter:function(event,player){ @@ -6762,7 +6764,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ animationColor:'thunder', audio:2, trigger:{player:'dying'}, - priority:6, + //priority:6, zhuSkill:true, filter:function(event,player){ if(player.storage.xingshuai) return false; @@ -7045,7 +7047,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, xinpojun2:{ - trigger:{global:'phaseEnd'}, + trigger:{global:'phaseJieshuBegin'}, forced:true, audio:false, mark:true, @@ -7077,14 +7079,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, qiaoshi:{ audio:2, - trigger:{global:'phaseEnd'}, + trigger:{global:'phaseJieshuBegin'}, filter:function(event,player){ return event.player!=player&&event.player.countCards('h')==player.countCards('h')&&event.player.isAlive(); }, check:function(event,player){ return get.attitude(player,event.player)>=0; }, - priority:-5, + //priority:-5, logTarget:'player', content:function(){ game.asyncDraw([trigger.player,player]); @@ -7102,14 +7104,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:{name:'sha'}, prepare:function(cards,player){ player.$throw(cards,1000); + game.log(player,'将',cards,'置入了弃牌堆'); }, discard:false, + loseTo:'discardPile', + visible:true, delay:0.5, content:function(){ - "step 0" player.draw(); - "step 1" - game.cardsDiscard(cards); }, ai:{ basic:{ @@ -7143,7 +7145,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, youdi:{ audio:true, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, direct:true, filter:function(event,player){ return player.countCards('he')>0; @@ -7501,7 +7503,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, qianxi:{ audio:2, - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, content:function(){ "step 0" player.draw(); @@ -7763,8 +7765,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, bingyi:{ audio:2, - trigger:{player:'phaseDiscardEnd'}, + trigger:{player:'phaseJieshuBegin'}, filter:function(event,player){ + return player.countCards('h')>0; + }, + filterx:function(event,player){ var cards=player.getCards('h'); if(cards.length<1) return false; var color=get.color(cards[0]); @@ -7776,11 +7781,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, content:function(){ "step 0" - player.chooseTarget(get.prompt('bingyi'),'令至多'+get.cnNumber(player.countCards('h'))+'名角色各摸一张牌',[1,player.countCards('h')],function(card,player,target){ + if(lib.skill.bingyi.filterx(trigger,player)){player.chooseTarget(get.prompt('bingyi'),'展示所有手牌,并令至多'+get.cnNumber(player.countCards('h'))+'名角色各摸一张牌',[1,player.countCards('h')],function(card,player,target){ return true; }).set('ai',function(target){ return get.attitude(_status.event.player,target); - }); + });} + else player.chooseBool(get.prompt('bingyi'),'展示所有手牌').ai=function(){return false}; "step 1" if(result.bool){ player.logSkill('bingyi'); @@ -7793,6 +7799,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 2" if(targets&&targets.length){ player.line(targets,'green'); + targets.sortBySeat(); game.asyncDraw(targets); } }, @@ -8062,7 +8069,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, chanhui2:{ - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, forced:true, popup:false, audio:false, @@ -8133,7 +8140,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:3, unique:true, juexingji:true, - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, forced:true, filter:function(event,player){ return !player.hasSkill('paiyi')&&player.storage.quanji&&player.storage.quanji.length>=3; @@ -8272,7 +8279,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, global:'qieting2', globalSilent:true, - trigger:{global:'phaseEnd'}, + trigger:{global:'phaseJieshuBegin'}, filter:function(event,player){ return event.player!=player&&!event.player.tempSkills.qieting3&&event.player.isAlive(); }, @@ -8346,7 +8353,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, zhuikong:{ audio:2, - trigger:{global:'phaseBegin'}, + trigger:{global:'phaseZhunbeiBegin'}, check:function(event,player){ if(get.attitude(player,event.player)<-2){ var cards=player.getCards('h'); @@ -8899,7 +8906,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, zhiyan:{ audio:2, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, direct:true, content:function(){ "step 0" @@ -8935,7 +8942,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, miji:{ audio:2, - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, filter:function(event,player){ return player.hp0; @@ -10144,7 +10151,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, }, xinjingce:{ - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, frequent:true, filter:function(event,player){ return player.countUsed()>=player.hp; @@ -10238,7 +10245,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, oldrenxin:{ trigger:{global:'dying'}, - priority:6, + //priority:6, filter:function(event,player){ return event.player!=player&&event.player.hp<=0&&player.countCards('h')>0; }, @@ -10348,7 +10355,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, xiansi:{ audio:2, - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseZhunbeiBegin'}, direct:true, init:function(player){ if(!player.storage.xiansi) player.storage.xiansi=[]; @@ -10403,24 +10410,37 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:'xiansi2' }, xiansi2:{ - enable:'phaseUse', + enable:'chooseToUse', audio:2, - forceaudio:true, + viewAs:{name:'sha'}, filter:function(event,player){ - var players=game.filterPlayer(); + return game.hasPlayer(function(current){ + return current.hasSkill('xiansi')&¤t.storage.xiansi.length>1&&event.filterTarget({name:'sha'},player,current); + }); + }, + filterTarget:function(card,player,target){ + var bool=false; + var players=ui.selected.targets.slice(0); for(var i=0;i1&&player.canUse('sha',players[i],true,true); - } + if(players[i].hasSkill('xiansi')&&players[i].storage.xiansi.length>1) bool=true;break; } + if(!bool&&(!target.hasSkill('xiansi')||target.storage.xiansi.length<=1)) return false; + return _status.event._backup.filterTarget.apply(this,arguments); + }, + complexSelect:true, + selectCard:-1, + filterCard:function(){ return false; }, + forceaudio:true, direct:true, + prompt:'弃置一名有【逆】的角色的两张【逆】,然后视为对包含其在内的角色使用【杀】。', delay:0, - content:function(){ + log:false, + precontent:function(){ "step 0" var targets=game.filterPlayer(function(current){ - if(current.storage.xiansi){ + if(event.result.targets.contains(current)&¤t.storage.xiansi){ return current.storage.xiansi.length>1&&player.canUse('sha',current,true,true); } return false; @@ -10461,7 +10481,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } "step 3" if(event.directresult||result.bool){ - player.logSkill('xiansi2'); + player.logSkill('xiansi2',event.target); var links=event.directresult||result.links; for(var i=0;i=4&&!player.storage.zzili; }, @@ -10797,7 +10806,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ // } }, zpaiyi:{ - trigger:{player:'phaseEnd'}, + trigger:{player:'phaseJieshuBegin'}, filter:function(event,player){ for(var i=0;i