From 21457e251255bc364146831129a5f8e261e48262 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Tue, 23 Jul 2019 17:59:48 +0800 Subject: [PATCH] v1.9.90.2 --- card/guozhan.js | 4 +- character/extra.js | 29 ++- character/refresh.js | 18 +- character/shenhua.js | 96 ++++++-- character/sp.js | 466 ++++++++++++++++++++++------------- character/standard.js | 44 +++- character/xinghuoliaoyuan.js | 19 +- character/yijiang.js | 70 +++++- game/game.js | 7 + game/update.js | 14 +- mode/guozhan.js | 46 +++- mode/identity.js | 4 +- 12 files changed, 564 insertions(+), 253 deletions(-) diff --git a/card/guozhan.js b/card/guozhan.js index 7ea63367f..7795332ba 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -944,7 +944,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ return get.attitude(player,event.player)<0; }, content:function(){ - player.gainPlayerCard(trigger.player,true); + player.gainPlayerCard(trigger.player,'h',true); }, }, taipingyaoshu:{ @@ -1230,9 +1230,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageAfter'}, direct:true, filter:function(event,player){ + if(event.player.isDead()) return false; if(player.countCards('h')==0) return false; if(!event.card) return false; if(event.card.name!='sha') return false; + if(!event.notLink()) return functiofalse; return game.hasPlayer(function(current){ return current!=event.player&&get.distance(event.player,current)<=1; }); diff --git a/character/extra.js b/character/extra.js index bb7ec834f..b441a8d75 100755 --- a/character/extra.js +++ b/character/extra.js @@ -29,7 +29,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, skill:{ "new_wuhun":{ - audio:"wuhun3", + audio:"wuhun2", group:["new_wuhun_mark","new_wuhun_die"], trigger:{ player:"damageEnd", @@ -80,7 +80,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, subSkill:{ die:{ - audio:"wuhun3", + audio:"wuhun2", skillAnimation:true, trigger:{ player:"dieBegin", @@ -435,9 +435,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return !player.hasSkill('lianpo2'); }, content:function(){ + player.addTempSkill('lianpo2'); player.insertPhase(); } }, + lianpo2:{}, baonu:{ audio:2, mark:true, @@ -1608,8 +1610,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, discard:{ - trigger:{player:['useCardAfter','respondAfter']}, + trigger:{player:['useCard','respond']}, forced:true, + popup:false, logTarget:function(){ return _status.currentPhase; }, @@ -1627,7 +1630,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, xinlonghun1:{ - audio:true, + audio:'longhun1', enable:['chooseToUse','chooseToRespond'], prompt:function(){ return '将至多两张红桃牌当作桃使用'; @@ -1647,7 +1650,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, xinlonghun2:{ - audio:true, + audio:'longhun2', enable:['chooseToUse','chooseToRespond'], prompt:function(){ return '将至多两张方片牌当作火杀使用或打出'; @@ -1667,7 +1670,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, xinlonghun3:{ - audio:true, + audio:'longhun3', enable:['chooseToUse','chooseToRespond'], prompt:function(){ return '将至多两张黑桃牌当作无懈可击使用'; @@ -1687,7 +1690,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, xinlonghun4:{ - audio:true, + audio:'longhun4', enable:['chooseToUse','chooseToRespond'], prompt:function(){ return '将至多两张梅花牌当作闪打出'; @@ -1712,7 +1715,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 2+num; } }, - audio:true, + audio:'juejing', trigger:{player:['dyingBegin','dyingAfter']}, forced:true, content:function(){ @@ -1761,6 +1764,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, gongxin:{ audio:2, + audioname:['re_lvmeng'], enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ @@ -1982,11 +1986,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, content:function(){ "step 0" - player.chooseTarget(true,get.prompt('nzry_jieying'),function(card,player,target){ - return target!=player; + player.chooseTarget(true,'请选择【结营】的目标',function(card,player,target){ + return target!=player&&!target.isLinked(); }).ai=function(target){ - if(!target.isLinked()) return get.attitude(player,target); - return 1; + return 1+Math.random(); }; "step 1" if(result.bool){ @@ -2462,7 +2465,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, filter:function(event,player){ - return player.storage.drlt_jieying==event.player; + return player.storage.drlt_jieying==event.player&&player!=event.player; }, logTarget:'player', content:function(){ diff --git a/character/refresh.js b/character/refresh.js index 4f2d00010..ed7c3293d 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -627,6 +627,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, audio:"wusheng", + audioname:['re_guanyu','guanzhang','jsp_guanyu','guansuo'], enable:["chooseToRespond","chooseToUse"], filterCard:function (card,player){ if(get.zhu(player,'shouyue')) return true; @@ -1407,9 +1408,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ canBeDiscarded:function(card){ if(get.position(card)=='e') return false; }, - cardDiscardable:function(card){ - if(get.position(card)=='e') return false; - } }, }, rejizhi:{ @@ -1978,7 +1976,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, reyingzi:{ audio:2, - audioname:['sunce'], + audioname:['heqi','sunce'], trigger:{player:'phaseDrawBegin'}, forced:true, content:function(){ @@ -2579,6 +2577,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, reyicong:{ + trigger:{ + player:["changeHp"], + }, + audio:2, + forced:true, + filter:function(event,player){ + return get.sgn(player.hp-2)!=get.sgn(player.hp-2-event.num); + }, + content:function (){}, mod:{ globalFrom:function(from,to,current){ if(from.hp>2) return current-1; @@ -2774,7 +2781,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, reguose:{ - audio:1, + audio:2, enable:'phaseUse', usable:1, discard:false, @@ -2816,6 +2823,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fenwei:{ skillAnimation:true, audio:2, + audioname:['heqi'], unique:true, mark:true, limited:true, diff --git a/character/shenhua.js b/character/shenhua.js index e5eec82d2..693bc9dbd 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -984,7 +984,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, "nzry_juzhan":{ - audio:2, + audio:"nzry_juzhan_1", mark:true, locked:false, zhuanhuanji:true, @@ -1150,7 +1150,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - "nzry_binglve":{}, + "nzry_binglve":{audio:2}, "nzry_huaiju":{ marktext:"橘", init:function(player,skill){ @@ -1388,6 +1388,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "nzry_lijun":{ unique:true, global:'nzry_lijun1', + audio:'nzry_lijun1', zhuSkill:true, }, nzry_lijun2:{}, @@ -1504,6 +1505,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, "nzry_shicai":{ + audio:"nzry_shicai_2", group:["nzry_shicai_1","nzry_shicai_2","nzry_shicai_3"], ai:{ effect:{ @@ -1578,6 +1580,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, "nzry_mingren":{ + audio:"nzry_mingren_1", init:function (player){ player.storage.nzry_mingren=[]; }, @@ -1639,6 +1642,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, "nzry_zhenliang":{ + audio:"nzry_zhenliang_1", mark:true, locked:false, zhuanhuanji:true, @@ -1657,24 +1661,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, filter:function(event,player){ - return game.countPlayer(function(current){ + return game.hasPlayer(function(current){ return current!=player&& get.distance(player,current,'attack')<=1&& - Math.abs(current.hp-player.hp)>=1&& player.storage.nzry_mingren!=undefined&& - player.countCards('he',{color:get.color(player.storage.nzry_mingren[0])})>=Math.abs(current.hp-player.hp); - })>0&&player.storage.nzry_zhenliang!=true; + player.countCards('he',{color:get.color(player.storage.nzry_mingren[0])})>=Math.max(Math.abs(current.hp-player.hp),1); + })&&player.storage.nzry_zhenliang!=true; }, filterTarget:function(card,player,target){ return player.storage.nzry_mingren!=undefined&& target!=player&& get.distance(player,target,'attack')<=1&& - Math.abs(target.hp-player.hp)>=1&& - player.countCards('he',{color:get.color(player.storage.nzry_mingren[0])})>=Math.abs(target.hp-player.hp); + player.countCards('he',{color:get.color(player.storage.nzry_mingren[0])})>=Math.max(Math.abs(target.hp-player.hp),1); }, content:function(){ 'step 0' - player.chooseCard('请发动【贞良】的牌',Math.abs(target.hp-player.hp),'he',{color:get.color(player.storage.nzry_mingren[0])},true).set('ai',function(card){ + player.chooseCard('请选择发动【贞良】的牌',Math.max(Math.abs(target.hp-player.hp),1),'he',{color:get.color(player.storage.nzry_mingren[0])},true).set('ai',function(card){ return 6-get.value(card); }); 'step 1' @@ -1752,6 +1754,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, "nzry_shenshi":{ mark:true, + audio:'nzry_shenshi_1', locked:false, zhuanhuanji:true, marktext:'审', @@ -1777,7 +1780,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ position:'he', filterCard:true, filterTarget:function(card,player,target){ - return target.isMaxHandcard(); + return target!=player&&!game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')>target.countCards('h'); + }); }, check:function(card){ return 5-get.value(card); @@ -1949,6 +1954,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jianchu:{ + audio:2, trigger:{player:'shaBegin'}, filter:function(event){ return event.target.countCards('he')>0; @@ -2443,7 +2449,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, tiaoxin:{ - audio:4, + audio:2, + audioname:['sp_jiangwei','xiahouba'], enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ @@ -2810,6 +2817,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, tuntian:{ audio:2, + audioname:['gz_dengai'], trigger:{player:'loseEnd'}, frequent:true, filter:function(event,player){ @@ -2959,6 +2967,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, jiang:{ audio:2, + audioname:['sp_lvmeng'], trigger:{global:['useCard']}, filter:function(event,player){ if(!(event.card.name=='juedou'||(event.card.name=='sha'&&get.color(event.card)=='red'))) return false; @@ -3016,6 +3025,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhiba:{ unique:true, global:'zhiba2', + audio:'zhiba2', zhuSkill:true, }, zhiba2:{ @@ -3689,6 +3699,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, huoshou:{ + audio:"huoshou1", locked:true, group:['huoshou1','huoshou2'], ai:{ @@ -3712,6 +3723,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, huoshou2:{ + audio:"huoshou1", trigger:{global:'damageBefore'}, forced:true, filter:function(event,player){ @@ -3771,6 +3783,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ juxiang:{ unique:true, locked:true, + audio:"juxiang1", group:['juxiang1','juxiang2'], ai:{ effect:{ @@ -3793,6 +3806,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, juxiang2:{ + audio:"juxiang1", trigger:{global:'useCardAfter'}, forced:true, filter:function(event,player){ @@ -3805,6 +3819,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, lieren:{ audio:2, + audioname:['boss_lvbu3'], trigger:{source:'damageEnd'}, filter:function(event,player){ if(event._notrigger.contains(event.player)) return false; @@ -3926,6 +3941,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ songwei:{ unique:true, global:'songwei2', + audio:"songwei2", zhuSkill:true, }, songwei2:{ @@ -4374,7 +4390,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, benghuai:{ - audio:4, + audio:2, + audioname:['zhugedan'], trigger:{player:'phaseEnd'}, forced:true, check:function(){ @@ -4406,6 +4423,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ baonue:{ unique:true, global:'baonue2', + audio:'baonue2', zhuSkill:true, }, baonue2:{ @@ -4525,7 +4543,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ wansha:{ locked:true, audio:2, - audioname:['boss_lvbu3'], + audioname:['boss_lvbu3','shen_simayi'], global:'wansha2', trigger:{global:'dying'}, priority:15, @@ -4546,6 +4564,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, weimu:{ + trigger:{global:'useCard'}, + audio:2, + forced:true, + filter:function (event,player,card){ + if(get.color(event.card)!='black') return false; + return event.card.name=='nanman'&&player!=event.player||event.card.name=='wanjian'&&player!=event.player||event.card.name=='taoyuan'&&player.hp0&&player.side==event.player.side; - }, + return player.countCards('he')>0&&player.side==event.player.side; + }, direct:true, content:function (){ - "step 0" - player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('huanshi_three'),'he').set('ai',function(card){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var judging=_status.event.judging; - var result=trigger.judge(card)-trigger.judge(judging); - var attitude=get.attitude(player,trigger.player); - if(attitude==0||result==0) return 0; - if(attitude>0){ - return result-get.value(card)/2; - } - else{ - return -result-get.value(card)/2; - } - }).set('judging',trigger.player.judging[0]); - "step 1" - if(result.bool){ - player.respond(result.cards,'highlight'); - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - player.logSkill('huanshi_three'); - if(trigger.player.judging[0].clone){ - trigger.player.judging[0].clone.classList.remove('thrownhighlight'); - game.broadcast(function(card){ - if(card.clone){ - card.clone.classList.remove('thrownhighlight'); - } - },trigger.player.judging[0]); - game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); - } - trigger.player.judging[0].discard(); - trigger.player.judging[0]=result.cards[0]; - if(!get.owner(result.cards[0],'judge')){ - trigger.position.appendChild(result.cards[0]); - } - game.log(trigger.player,'的判定牌改为',result.cards[0]); - game.delay(2); - } - }, + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('huanshi_three'),'he').set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result-get.value(card)/2; + } + else{ + return -result-get.value(card)/2; + } + }).set('judging',trigger.player.judging[0]); + "step 1" + if(result.bool){ + player.respond(result.cards,'highlight'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.logSkill('huanshi_three'); + if(trigger.player.judging[0].clone){ + trigger.player.judging[0].clone.classList.remove('thrownhighlight'); + game.broadcast(function(card){ + if(card.clone){ + card.clone.classList.remove('thrownhighlight'); + } + },trigger.player.judging[0]); + game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); + } + trigger.player.judging[0].discard(); + trigger.player.judging[0]=result.cards[0]; + if(!get.owner(result.cards[0],'judge')){ + trigger.position.appendChild(result.cards[0]); + } + game.log(trigger.player,'的判定牌改为',result.cards[0]); + game.delay(2); + } + }, ai:{ tag:{ rejudge:1, @@ -854,35 +854,35 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:"shaBegin", }, check:function (event,player){ - return get.attitude(player,event.target)<0; - }, + return get.attitude(player,event.target)<0; + }, logTarget:"target", line:false, content:function (){ - 'step 0' - player.line(trigger.target,{color:[220, 90, 139]}); - player.chooseControl(['basic','trick','equip']).set('ai',function(){ - if(!trigger.target.countCards('h','sha')&&trigger.target.countCards('h','shan')) return 'trick'; - return 'basic'; - }).prompt='请选择一种牌的类别'; - 'step 1' - trigger.target.chooseCard('he','交给'+get.translation(player)+'一张'+get.translation(result.control)+'牌,否则此【杀】不可被闪避。',function(card){ - return get.type(card,'trick')==result.control; - }).set('ai',function(card){ - var num=_status.event.num; - if(num==0) return 0; - if(card.name=='shan') return num>1?2:0; - return 8-get.value(card); - }).set('num',trigger.target.countCards('h','shan')) - 'step 2' - if(result.bool){ - var cards=result.cards; - trigger.target.$giveAuto(cards,player) - player.gain(cards); - } - else trigger.directHit=true; - game.delay(); - }, + 'step 0' + player.line(trigger.target,{color:[220, 90, 139]}); + player.chooseControl(['basic','trick','equip']).set('ai',function(){ + if(!trigger.target.countCards('h','sha')&&trigger.target.countCards('h','shan')) return 'trick'; + return 'basic'; + }).prompt='请选择一种牌的类别'; + 'step 1' + trigger.target.chooseCard('he','交给'+get.translation(player)+'一张'+get.translation(result.control)+'牌,否则此【杀】不可被闪避。',function(card){ + return get.type(card,'trick')==result.control; + }).set('ai',function(card){ + var num=_status.event.num; + if(num==0) return 0; + if(card.name=='shan') return num>1?2:0; + return 8-get.value(card); + }).set('num',trigger.target.countCards('h','shan')) + 'step 2' + if(result.bool){ + var cards=result.cards; + trigger.target.$giveAuto(cards,player) + player.gain(cards); + } + else trigger.directHit=true; + game.delay(); + }, }, //变权移植 wanwei:{ @@ -1231,10 +1231,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(target==player.storage.zhengbi_eff1) return true; }, cardUsable:function (card,player,num){ - if(typeof num=='number'&&player.storage.zhengbi_eff1.isAlive()) return num+100; + if(typeof num=='number'&&player.storage.zhengbi_eff1&&player.storage.zhengbi_eff1.isAlive()) return num+100; }, playerEnabled:function (card,player,target){ - if(player.storage.zhengbi_eff1.isAlive()&&target!=player.storage.zhengbi_eff1){ + if(player.storage.zhengbi_eff1.isAlive()&&player.storage.zhengbi_eff1&&target!=player.storage.zhengbi_eff1){ var num=player.getCardUsable(card)-100; if(num<=0) return false; } @@ -1312,21 +1312,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:"loseEnd", }, filter:function (event,player){ - var cs=event.cards; - for(var i=0;i0){ - player.chooseToDiscard('he',true,num); - } - 'step 2' - var bool=true; - if(result.cards){ - for(var i=0;i0){ + player.chooseToDiscard('he',true,num); + } + 'step 2' + var bool=true; + if(result.cards){ + for(var i=0;i1; }, + audio:6, content:function(){ 'step 0' player.chooseTarget('选择【先辅】的目标',lib.translate.xianfu_info,true,function(card,player,target){ @@ -3329,6 +3347,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, fuqi:{ + audio:2, + forced:true, + trigger:{ + global:"chooseToRespondBegin", + }, + filter:function(event,player){ + return player==event.source&&player!=event.player&&get.distance(player,event.player)<=1; + }, + content:function(){}, mod:{ wuxieRespondable:function(card,player,target,current){ if(player!=current&&get.distance(player,current)<=1){ @@ -3535,6 +3562,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, moucheng:{ + audio:2, derivation:['jingong','wy_meirenji','wy_xiaolicangdao'], trigger:{global:'damageEnd'}, forced:true, @@ -3738,9 +3766,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, zhaohuo:{ + audio:2, trigger:{global:'dying'}, forced:true, - popup:false, priority:12, filter:function(event,player){ return event.player!=player&&player.maxHp>1; @@ -3754,6 +3782,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, yixiang:{ + audio:2, trigger:{target:'useCardToBegin'}, frequent:true, filter:function(event,player){ @@ -3790,6 +3819,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, yirang:{ + audio:2, trigger:{player:'phaseUseBegin'}, direct:true, filter:function(event,player){ @@ -3829,12 +3859,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, kuangcai:{ + audio:2, trigger:{player:'phaseUseBegin'}, filter:function(event,player){ - return !_status.auto&&event.player==game.me&&!event.player.isMad()&&!_status.connectMode; + return !event.player.isMad()&&!_status.connectMode; }, content:function(){ - player.forceCountChoose={chooseToUse:5,default:5}; + game.countPlayer(function(current){ + current.forceCountChoose={default:5}; + }); player.addSkill('kuangcai_use'); player.addSkill('kuangcai_cancel'); ui.auto.hide(); @@ -3848,10 +3881,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, targetInRange:function(){ return true; - } + }, + cardEnabled:function(card,player){ + if(player.forceCountChoose&&player.forceCountChoose.default<=0) return false; + }, }, trigger:{player:'useCard'}, forced:true, + audio:'kuangcai', usable:5, filter:function(event,player){ if(!player.forceCountChoose){ @@ -3861,14 +3898,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ player.draw(); - player.forceCountChoose.chooseToUse--; + player.forceCountChoose.default--; } }, cancel:{ trigger:{player:'phaseUseEnd'}, + priority:50, silent:true, content:function(){ - delete player.forceCountChoose; + game.countPlayer(function(current){ + delete current.forceCountChoose; + }); ui.auto.show(); player.removeSkill('kuangcai_use'); player.removeSkill('kuangcai_cancel'); @@ -3877,6 +3917,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, shejian:{ + audio:2, trigger:{player:'phaseDiscardEnd'}, direct:true, filter:function(event,player){ @@ -4271,6 +4312,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, kuanshi:{ + audio:2, trigger:{player:'phaseEnd'}, direct:true, content:function(){ @@ -4284,17 +4326,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ var target=result.targets[0]; - player.logSkill('kuanshi',target); + player.logSkill('kuanshi'); target.storage.kuanshi2=player; target.addSkill('kuanshi2'); } } }, kuanshi2:{ - mark:'character', + /*mark:'character', intro:{ content:'下一次受到超过1点的伤害时,防止此伤害,然后$跳过下个回合的摸牌阶段' - }, + },*/ trigger:{player:'damageBegin'}, forced:true, filter:function(event,player){ @@ -4323,6 +4365,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, xiashu:{ + audio:2, trigger:{player:'phaseUseBegin'}, direct:true, filter:function(event,player){ @@ -4438,6 +4481,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, sheyan:{ + audio:2, trigger:{global:'useCard'}, filter:function(event,player){ if(!event.targets||!event.targets.contains(player)) return false; @@ -4457,7 +4501,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return !trigger.targets.contains(current)&&lib.filter.targetEnabled2(trigger.card,trigger.player,current); }); if(bool1&&bool2){ - player.chooseControlList(true,get.prompt('sheyan'),['为'+get.translation(trigger.card)+'增加一个目标','为'+get.translation(trigger.card)+'减少一个目标'],function(event,player){ + player.chooseControlList(get.prompt('sheyan'),['为'+get.translation(trigger.card)+'增加一个目标','为'+get.translation(trigger.card)+'减少一个目标'],function(event,player){ if(_status.event.add) return 0; return 1; }).set('add',get.effect(player,trigger.card,trigger.player,player)>=0); @@ -4522,6 +4566,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, bingzheng:{ + audio:2, trigger:{player:'phaseUseEnd'}, direct:true, content:function(){ @@ -4614,6 +4659,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, fuman:{ + audio:2, enable:'phaseUse', filterTarget:function(card,player,target){ return !target.hasSkill('fuman2')&&target!=player; @@ -4715,6 +4761,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, shanxi:{ + audio:2, enable:'phaseUse', usable:1, filterCard:{color:'red',type:'basic'}, @@ -4807,6 +4854,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, duanbing:{ + audio:2, + audioname:['heqi'], trigger:{player:'useCard'}, filter:function(event,player){ if(event.card.name!='sha') return false; @@ -4859,6 +4908,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, fuhan:{ + audio:2, trigger:{player:'phaseBefore'}, unique:true, limited:true, @@ -4918,6 +4968,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, fanghun:{ + audio:2, init:function(player){ player.storage.fanghun=0; player.storage.fanghun2=0; @@ -4949,6 +5000,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, sha:{ + audio:'fanghun', enable:['chooseToUse','chooseToRespond'], filterCard:{name:'shan'}, viewAs:{name:'sha'}, @@ -4983,6 +5035,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, shan:{ enable:['chooseToRespond'], + audio:'fanghun', filterCard:{name:'sha'}, viewAs:{name:'shan'}, prompt:'将一张杀当闪打出', @@ -5117,6 +5170,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, lianzhu:{ + audio:2, enable:'phaseUse', usable:1, filterCard:true, @@ -5257,6 +5311,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, shanjia:{ + audio:2, init:function(player){ player.storage.shanjia=0; }, @@ -5436,6 +5491,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, shichou:{ + audio:1, skillAnimation:true, unique:true, limited:true, @@ -5756,6 +5812,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, hongde:{ + audio:2, trigger:{player:['gainEnd','loseEnd']}, direct:true, filter:function(event,player){ @@ -5776,6 +5833,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ziyuan:{ + audio:2, enable:'phaseUse', usable:1, filterCard:function(card){ @@ -5848,6 +5906,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jugu:{ + audio:2, mod:{ maxHandcard:function(player,num){ return num+player.maxHp; @@ -5861,6 +5920,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, tuifeng:{ + audio:2, trigger:{player:'damageEnd'}, direct:true, notemp:true, @@ -5899,6 +5959,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, tuifeng2:{ + audio:'tuifeng', trigger:{player:'phaseBegin'}, forced:true, filter:function(event,player){ @@ -5926,7 +5987,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ weidi:{ trigger:{global:['gameStart','zhuUpdate']}, forced:true, - popup:false, + audio:2, filter:function(event,player){ var mode=get.mode(); return (mode=='identity'||(mode=='versus'&&_status.mode=='four')); @@ -5958,6 +6019,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jianshu:{ + audio:2, unique:true, limited:true, enable:'phaseUse', @@ -6021,6 +6083,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, yongdi:{ + audio:2, unique:true, limited:true, trigger:{player:'damageEnd'}, @@ -6033,6 +6096,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.storage.yongdi=false; }, mark:true, + intro:{ + content:'limited' + }, direct:true, content:function(){ 'step 0' @@ -6088,6 +6154,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, gushe:{ + audio:2, enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ @@ -6161,6 +6228,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jici:{ + audio:2, trigger:{player:'compare'}, filter:function(event,player){ return event.getParent().name=='gushe'&&!event.iwhile&&event.num1<=player.storage.gushe; @@ -6175,6 +6243,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, juesi:{ + audio:2, enable:'phaseUse', filter:function(event,player){ return player.countCards('h','sha')>0; @@ -6456,6 +6525,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, jili:{ + audio:2, trigger:{global:'useCard'}, forced:true, check:function(event,player){ @@ -6483,6 +6553,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, zhidao:{ + audio:2, trigger:{source:'damageEnd'}, filter:function(event,player){ if(event._notrigger.contains(event.player)) return false; @@ -6527,7 +6598,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, trigger:{source:'damageEnd'}, - silent:true, + audio:2, + forced:true, mark:true, intro:{ content:function(storage){ @@ -6554,6 +6626,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'luanzhan_cancel', subSkill:{ cancel:{ + audio:'luanzhan', trigger:{player:'useCard'}, forced:true, filter:function(event,player){ @@ -6588,6 +6661,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, zhengnan:{ + audio:1, trigger:{global:'dieAfter'}, frequent:true, content:function(){ @@ -6625,6 +6699,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, qizhi:{ + audio:2, trigger:{player:'useCard'}, direct:true, filter:function(event,player){ @@ -6673,6 +6748,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jinqu:{ + audio:2, trigger:{player:'phaseEnd'}, check:function(event,player){ return player.storage.qizhi>=player.countCards('h'); @@ -6697,6 +6773,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, mouduan:{ + audio:1, init2:function(player){ game.broadcastAll(function(player){ player._mouduan_mark=player.mark('武',{ @@ -6732,6 +6809,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'mouduan2' }, mouduan2:{ + audio:1, trigger:{global:'phaseBegin'}, priority:5, filter:function(event,player){ @@ -6757,6 +6835,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, tanhu:{ + audio:1, enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ @@ -6810,6 +6889,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jiaozi:{ + audio:2, trigger:{player:'damageBegin',source:'damageBegin'}, forced:true, filter:function(event,player){ @@ -6820,6 +6900,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jiqiao:{ + audio:2, trigger:{player:'phaseUseBegin'}, direct:true, filter:function(event,player){ @@ -6858,6 +6939,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, linglong:{ + audio:2, inherit:'bagua_skill', filter:function(event,player){ if(!lib.skill.bagua_skill.filter(event,player)) return false; @@ -6889,19 +6971,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.getEquip(5)) return; if(get.position(card)=='e') return false; }, - cardDiscardable:function (card,player){ + /*cardDiscardable:function (card,player){ if(player.getEquip(5)) return; if(get.position(card)=='e') return false; - }, + },*/ } }, fenyong:{ + audio:2, trigger:{player:'damageEnd'}, content:function(){ player.addTempSkill('fenyong2'); } }, fenyong2:{ + audio:'fenyong', mark:true, intro:{ content:'防止你受到的所有伤害' @@ -6925,6 +7009,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, xuehen:{ + audio:2, trigger:{global:'phaseEnd'}, forced:true, filter:function(event,player){ @@ -6974,6 +7059,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, zhenwei:{ + audio:2, trigger:{global:'useCardToBefore'}, direct:true, priority:5, @@ -7083,6 +7169,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jie:{ + audio:1, trigger:{source:'damageBegin'}, filter:function(event){ return event.card&&event.card.name=='sha'&&get.color(event.card)=='red'&&event.notLink(); @@ -7093,7 +7180,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, dahe:{ - audio:2, + audio:1, enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ @@ -7167,6 +7254,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, xunzhi:{ + audio:2, trigger:{player:'phaseBegin'}, init:function(player){ player.storage.xunzhi=0; @@ -7201,6 +7289,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, yawang:{ + audio:2, trigger:{player:'phaseDrawBefore'}, forced:true, check:function(event,player){ @@ -7426,6 +7515,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, yanxiao:{ + audio:2, enable:'phaseUse', filterCard:{suit:'diamond'}, filterTarget:true, @@ -7464,6 +7554,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, yanxiao2:{ + audio:'yanxiao', mark:true, intro:{ content:'cards' @@ -7485,9 +7576,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, anxian:{ + audio:2, group:['anxian_source','anxian_target'], subSkill:{ source:{ + audio:"anxian", trigger:{source:'damageBefore'}, filter:function(event,player){ return event.card&&event.card.name=='sha'; @@ -7507,6 +7600,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, target:{ + audio:"anxian", trigger:{target:'shaBefore'}, direct:true, filter:function(event,player){ @@ -8082,6 +8176,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, nuzhan:{ + audio:2, trigger:{player:'useCard'}, filter:function(event,player){ return event.card&&event.card.name=='sha'&&event.cards&& @@ -8096,6 +8191,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'nuzhan2' }, nuzhan2:{ + audio:'nuzhan', trigger:{source:'damageBegin'}, forced:true, filter:function(event,player){ @@ -8550,6 +8646,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, chenqing:{ + audio:2, trigger:{global:'dying'}, priority:6, filter:function(event,player){ @@ -8633,6 +8730,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, mozhi:{ + audio:2, intro:{ content:'cards' }, @@ -8770,6 +8868,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, yishe:{ + audio:2, trigger:{player:'phaseEnd'}, init:function(player){ player.storage.yishe=[]; @@ -8792,6 +8891,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, bushi:{ + audio:2, trigger:{player:'damageEnd',source:'damageEnd'}, filter:function(event,player){ if(event._notrigger.contains(event.player)) return false; @@ -8818,6 +8918,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, midao:{ + audio:2, unique:true, trigger:{global:'judge'}, direct:true, @@ -8919,6 +9020,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, fengpo3:{}, biluan:{ + audio:2, trigger:{player:'phaseDrawBefore'}, mark:true, unique:true, @@ -8989,6 +9091,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, lixia:{ + audio:2, trigger:{global:'phaseEnd'}, filter:function(event,player){ return event.player.isAlive()&&event.player!=player&&get.distance(event.player,player,'attack')>1; @@ -9768,6 +9871,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, tongji:{ global:'tongji_disable', + audio:2, + trigger:{global:"useCard"}, + forced:true, + filter:function (event,player){ + return get.distance(event.player,player,'attack')<=1&&player!=event.player&&event.card.name=='sha'&&player.hp1) return false; @@ -10822,6 +10937,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, junbing:{ + audio:2, global:'junbing2', unique:true, forceunique:true @@ -11490,6 +11606,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, yicong:{ + trigger:{ + player:["changeHp"], + }, + audio:2, + audioname:['re_gongsunzan'], + forced:true, + filter:function(event,player){ + return get.sgn(player.hp-2)!=get.sgn(player.hp-2-event.num); + }, + content:function (){}, mod:{ globalFrom:function(from,to,current){ if(from.hp>2) return current-1; @@ -11650,6 +11776,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, baobian:{ + audio:2, trigger:{player:['phaseBefore','changeHp']}, forced:true, popup:false, @@ -11659,6 +11786,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.removeAdditionalSkill('baobian'); var list=[]; if(player.hp<=3){ + if(trigger.num!=undefined&&trigger.num<0) player.logSkil('baobian'); list.push('tiaoxin'); } if(player.hp<=2){ diff --git a/character/standard.js b/character/standard.js index 8c8226d29..b5cd1b5bd 100755 --- a/character/standard.js +++ b/character/standard.js @@ -85,6 +85,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skill:{ hujia:{ audio:2, + audioname:['re_caocao'], unique:true, zhuSkill:true, trigger:{player:'chooseToRespondBegin'}, @@ -348,6 +349,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, tiandu:{ audio:2, + audioname:['re_guojia','xizhicai'], trigger:{player:'judgeEnd'}, frequent:function(event){ if(event.result.card.name=='du') return false; @@ -674,13 +676,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jijiang:{ + audio:'jijiang1', + audioname:['liushan','re_liubei'], unique:true, group:['jijiang1','jijiang2'], zhuSkill:true, }, jijiang1:{ audio:2, - audioname:['liushan'], + audioname:['liushan','re_liubei'], trigger:{player:'chooseToRespondBegin'}, check:function(event){ if(event.jijiang) return false; @@ -736,8 +740,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jijiang2:{ - audio:2, - audioname:['liushan'], + audio:'jijiang1', + audioname:['liushan','re_liubei'], enable:'chooseToUse', filter:function(event,player){ if(event.filterCard&&!event.filterCard({name:'sha'},player,event)) return false; @@ -826,7 +830,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, wusheng:{ - audio:3, + audio:2, + audioname:['re_guanyu','guanzhang','jsp_guanyu','guansuo'], enable:['chooseToRespond','chooseToUse'], filterCard:function(card,player){ if(get.zhu(player,'shouyue')) return true; @@ -857,6 +862,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, paoxiao:{ + audio:2, + audioname:['re_zhangfei','guanzhang','xiahouba'], + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'&&player.getStat().card.sha>1&&event.getParent().type=='phase'; + }, + content:function(){}, mod:{ cardUsable:function(card,player,num){ if(card.name=='sha') return Infinity; @@ -1319,6 +1332,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){} }, longdan:{ + audio:'longdan_sha', + audioname:['re_zhaoyun'], group:['longdan_sha','longdan_shan','longdan_draw'], subSkill:{ draw:{ @@ -1336,6 +1351,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, sha:{ audio:2, + audioname:['re_zhaoyun'], enable:['chooseToUse','chooseToRespond'], filterCard:{name:'shan'}, viewAs:{name:'sha'}, @@ -1362,7 +1378,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, shan:{ - audio:2, + audio:'longdan_sha', + audioname:['re_zhaoyun'], enable:['chooseToRespond'], filterCard:{name:'sha'}, viewAs:{name:'shan'}, @@ -1676,7 +1693,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, qixi:{ - audio:4, + audio:2, + audioname:['ganning','re_ganning'], enable:'chooseToUse', filterCard:function(card){ return get.color(card)=='black'; @@ -1690,7 +1708,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ check:function(card){return 4-get.value(card)} }, keji:{ - audio:4, + audio:2, + audioname:['re_lvmeng','sp_lvmeng'], trigger:{player:'phaseDiscardBefore'}, frequent:function(event,player){ return !player.needsToDiscard(); @@ -1727,6 +1746,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, yingzi:{ audio:2, + audioname:['sp_lvmeng'], trigger:{player:'phaseDrawBegin'}, frequent:true, content:function(){ @@ -1786,7 +1806,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, guose:{ - audio:1, + audio:2, filter:function(event,player){ return player.countCards('he',{suit:'diamond'})>0; }, @@ -1804,6 +1824,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, liuli:{ audio:2, + audioname:['re_daqiao','daxiaoqiao'], trigger:{target:'shaBefore'}, direct:true, priority:5, @@ -1928,7 +1949,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, xiaoji:{ - audio:4, + audio:2, + audioname:['sp_sunshangxiang'], trigger:{player:'loseEnd'}, frequent:true, filter:function(event,player){ @@ -2163,6 +2185,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, jijiu:{ audio:2, + audioname:['re_huatuo'], enable:'chooseToUse', filter:function(event,player){ return _status.currentPhase!=player; @@ -2184,12 +2207,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, wushuang:{ + audio:'wushuang1', forced:true, locked:true, group:['wushuang1','wushuang2'] }, wushuang1:{ audio:2, + audioname:['re_lvbu'], trigger:{player:'shaBegin'}, forced:true, filter:function(event,player){ @@ -2207,6 +2232,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, wushuang2:{ audio:2, + audioname:['re_lvbu'], trigger:{player:'juedou',target:'juedou'}, forced:true, filter:function(event,player){ diff --git a/character/xinghuoliaoyuan.js b/character/xinghuoliaoyuan.js index a2167a1d8..14adc08f1 100755 --- a/character/xinghuoliaoyuan.js +++ b/character/xinghuoliaoyuan.js @@ -1660,7 +1660,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:"tiesuo", }, prompt:"将一张梅花牌当铁锁连环使用", - check:function (card){return 4-get.value(card)}, + check:function (card){return 6-get.value(card)}, mark:true, marktext:"凤", intro:{ @@ -1758,7 +1758,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.suit(card)=='club'; }, check:function (card){ - return 5-get.useful(card); + return -1; }, content:function (){ player.draw(); @@ -1856,12 +1856,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ order:1, result:{ - target:function (player,target){ + target:0, + /*target:function (player,target){ if(target.hasSkillTag('nofire')) return 0; if(lib.config.mode=='versus') return -1; if(player.hasUnknown()) return 0; return get.damageEffect(target,player); - }, + },*/ }, }, }, @@ -2724,6 +2725,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, result:{ target:function (player,target){ + var raweffect=function(player,target){ if(player.countCards('h','sha')){ return get.effect(target,{name:'sha'},player,target); }else{ @@ -2745,6 +2747,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(att<=0&&!target.countCards('he')) return 1.5; return -1.5; } + } + var num=game.countPlayer(function(current){ + return current!=player&¤t.hp==target.hp&&(raweffect(player,current)*get.attitude(player,current))>0 + }); + return raweffect(player,target)*(num-1); }, }, expose:0.4, @@ -4278,6 +4285,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ viewAs:{ name:"wuxie", }, + check:function(card){ + if(card.name=='wuxie') return 1000; + return 0; + }, prompt:"将一张手牌当无懈可击使用", threaten:1.2, }, diff --git a/character/yijiang.js b/character/yijiang.js index 4cdd7909c..faefcb7ac 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -12,7 +12,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xunyou:['male','wei',3,['zhiyu','qice']], xin_xushu:['male','shu',3,['xinwuyan','xinjujian']], xin_masu:['male','shu',3,['sanyao','zhiman']], - xin_fazheng:['male','shu',3,['xinenyuan','xinxuanhuo']], + xin_fazheng:['male','shu',3,['xinenyuan','xinxuanhuo'],['die_audio']], zhuran:['male','wu',4,['danshou']], xusheng:['male','wu',4,['xinpojun']], wuguotai:['female','wu',3,['ganlu','buyi']], @@ -453,9 +453,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, fenli:{ + audio:2, group:['fenli_draw','fenli_use','fenli_discard'], subSkill:{ draw:{ + audio:'fenli', trigger:{player:'phaseDrawBefore'}, prompt:'是否发动【奋励】跳过摸牌阶段?', filter:function(event,player){ @@ -472,6 +474,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, use:{ + audio:'fenli', trigger:{player:'phaseUseBefore'}, prompt:'是否发动【奋励】跳过出牌阶段?', filter:function(event,player){ @@ -489,6 +492,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, discard:{ + audio:'fenli', trigger:{player:'phaseDiscardBefore'}, prompt:'是否发动【奋励】跳过弃牌阶段?', filter:function(event,player){ @@ -504,6 +508,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, pingkou:{ + audio:2, group:['pingkou_init','pingkou_count'], subSkill:{ init:{ @@ -620,6 +625,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, pindi:{ + audio:2, enable:'phaseUse', filterTarget:function(card,player,target){ if(player==target) return false; @@ -693,6 +699,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, funan:{ + audio:2, trigger:{global:['respondAfter','useCardAfter']}, filter:function(event,player){ if(!event.respondTo) return false; @@ -753,6 +760,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jiexun:{ + audio:2, trigger:{player:'phaseEnd'}, // filter:function(event,player){ // return game.hasPlayer(function(current){ @@ -810,9 +818,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, zhuandui:{ + audio:2, group:['zhuandui_respond','zhuandui_use'], subSkill:{ use:{ + audio:"zhuandui", trigger:{player:'shaBegin'}, check:function(event,player){ return get.attitude(player,event.target)<0; @@ -831,6 +841,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, respond:{ + audio:"zhuandui", trigger:{target:'shaBegin'}, check:function(event,player){ return get.effect(player,event.card,event.player,player)<0; @@ -858,6 +869,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, tianbian:{ + audio:2, trigger:{player:'chooseCardBegin'}, check:function(event,player){ return player.hasCard(function(card){ @@ -902,6 +914,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jianzheng:{ + audio:2, trigger:{global:'useCard'}, filter:function(event,player){ if(!player.countCards('h')) return false; @@ -979,6 +992,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, qingxian:{ + audio:2, group:['qingxian_jilie','qingxian_rouhe'], ai:{ threaten:0.8, @@ -995,6 +1009,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, subSkill:{ rouhe:{ + audio:'qingxian', trigger:{player:'recoverEnd'}, direct:true, content:function(){ @@ -1021,6 +1036,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jilie:{ + audio:'qingxian', trigger:{player:'damageEnd'}, filter:function(event,player){ return event.source&&event.source.isIn(); @@ -1105,6 +1121,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, juexiang:{ + audio:2, trigger:{player:'dieBegin'}, direct:true, skillAnimation:true, @@ -1127,6 +1144,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ derivation:['juexiang_ji','juexiang_lie','juexiang_rou','juexiang_he'], subSkill:{ ji:{ + audio:1, mark:true, nopop:true, intro:{ @@ -1154,6 +1172,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, lie:{ + audio:1, mark:true, nopop:true, intro:{ @@ -1183,6 +1202,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, rou:{ + audio:1, mark:true, nopop:true, intro:{ @@ -1215,6 +1235,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, he:{ + audio:1, mark:true, nopop:true, intro:{ @@ -1265,6 +1286,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, bizhuan:{ + audio:2, trigger:{player:'useCardAfter',target:'useCardToBegin'}, filter:function(event,player){ if(event.name!='useCard'&&event.player==event.target) return false; @@ -1480,6 +1502,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, shouxi:{ + audio:2, trigger:{target:'shaBefore'}, direct:true, init:function(player){ @@ -1538,6 +1561,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, huimin:{ + audio:2, trigger:{player:'phaseEnd'}, check:function(event,player){ return game.countPlayer(function(current){ @@ -1651,6 +1675,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, fuzhu:{ + audio:2, trigger:{global:'phaseEnd'}, filter:function(event,player){ return event.player!=player&&event.player.sex=='male'&&ui.cardPile.childElementCount<=player.hp*10; @@ -1693,9 +1718,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, wengua:{ - global:'wengua2' + global:'wengua2', + audio:2, }, wengua2:{ + audio:'wengua', enable:'phaseUse', filter:function(event,player){ if(player.hasSkill('wengua3')) return false; @@ -1825,6 +1852,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, wengua3:{}, daiyan:{ + audio:2, trigger:{player:'phaseEnd'}, direct:true, init:function(){ @@ -1886,6 +1914,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, fumian:{ + audio:2, trigger:{player:'phaseBegin'}, direct:true, content:function(){ @@ -2023,6 +2052,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, zhongjian:{ + audio:2, enable:'phaseUse', usable:2, filter:function(event,player){ @@ -2143,6 +2173,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, caishi:{ + audio:2, trigger:{player:'phaseDrawBegin'}, direct:true, init:function(player){ @@ -2300,6 +2331,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, xinsidi:{ + audio:"sidi", trigger:{global:'phaseUseBegin'}, direct:true, filter:function(event,player){ @@ -2358,6 +2390,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:false, content:function(){ if(!player.storage.xinsidi3&&player.storage.xinsidi4.isAlive()){ + player.storage.xinsidi4.logSkill('xinsidi',player); player.storage.xinsidi4.useCard({name:'sha'},player); } delete player.storage.xinsidi2; @@ -2601,6 +2634,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, taoluan_backup:{}, jishe:{ + audio:2, enable:'phaseUse', filter:function(event,player){ return player.getHandcardLimit()>0; @@ -2639,6 +2673,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jishe3:{ + audio:'jishe', trigger:{player:'phaseEnd'}, direct:true, filter:function(event,player){ @@ -2678,6 +2713,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, lianhuo:{ + audio:2, trigger:{player:'damageBegin'}, forced:true, filter:function(event,player){ @@ -2688,6 +2724,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, huisheng:{ + audio:2, trigger:{player:'damageBefore'}, direct:true, filter:function(event,player){ @@ -2776,6 +2813,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, qinqing:{ + audio:2, mode:['identity','versus'], available:function(mode){ if(mode=='versus'&&_status.mode!='four') return false; @@ -2786,14 +2824,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var zhu=get.zhu(player); if(!zhu||!zhu.isZhu) return false; return game.hasPlayer(function(current){ - return current!=player&¤t!=zhu&&get.distance(current,zhu,'attack')<=1; + return current!=zhu&&get.distance(current,zhu,'attack')<=1; }); }, content:function(){ 'step 0' player.chooseTarget(get.prompt('qinqing'),[1,Infinity],function(card,player,target){ var zhu=get.zhu(player); - if(target==player||target==zhu) return false; + if(target==zhu) return false; return get.distance(target,zhu,'attack')<=1; }).set('ai',function(target){ var he=target.countCards('he') @@ -2844,6 +2882,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, guizao:{ + audio:2, trigger:{player:'phaseDiscardEnd'}, direct:true, filter:function(event,player){ @@ -2867,6 +2906,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, jiyu:{ + audio:2, enable:'phaseUse', locked:false, filter:function(event,player){ @@ -3307,7 +3347,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, fulin:{ trigger:{player:'phaseDiscardBegin'}, - silent:true, + audio:2, content:function(){ player.addTempSkill('fulin2','phaseDiscardAfter'); }, @@ -3323,7 +3363,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, count:{ trigger:{player:'gainEnd'}, - silent:true, + audio:'fulin', filter:function(event,player){ return _status.currentPhase==player; }, @@ -3597,6 +3637,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, qingxi:{ + audio:2, trigger:{source:'damageBegin'}, check:function(event,player){ return get.attitude(player,event.player)<0; @@ -4154,6 +4195,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, benxi:{ + audio:2, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return player.isPhaseUsing(); + }, + content:function(){}, mod:{ globalFrom:function(from,to,distance){ if(_status.currentPhase==from){ @@ -4184,6 +4232,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, sidi:{ + audio:2, trigger:{global:'respondEnd'}, filter:function(event,player){ if(event.parent.parent.name!='sha') return false; @@ -5136,6 +5185,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, qinwang:{ + audio:'qinwang1', unique:true, group:['qinwang1','qinwang2'], zhuSkill:true, @@ -5219,7 +5269,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, qinwang2:{ - audio:2, + audio:'qinwang1', enable:'chooseToUse', filter:function(event,player){ if(event.filterCard&&!event.filterCard({name:'sha'},player,event)) return false; @@ -6419,6 +6469,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, zhiman:{ audio:2, + audioname:['guansuo'], trigger:{source:'damageBefore'}, check:function(event,player){ if(get.damageEffect(event.player,player,player)<0) return true; @@ -8266,6 +8317,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, zongshi:{ + audio:2, mod:{ maxHandcard:function(player,num){ return num+game.countGroup(); @@ -8691,6 +8743,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'xinenyuan2' }, xinenyuan2:{ + audio:true, trigger:{player:'gainEnd'}, filter:function(event,player){ return event.source&&event.source.isAlive()&&event.source!=player&&event.cards.length>=2; @@ -8704,6 +8757,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, enyuan:{ + audio:'enyuan1', locked:true, group:['enyuan1','enyuan2'], ai:{ @@ -8731,7 +8785,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enyuan2:{ trigger:{player:'damageEnd'}, forced:true, - audio:true, + audio:2, filter:function(event,player){ return event.source&&event.source!=player; }, diff --git a/game/game.js b/game/game.js index 83e3b9e9f..f7e47b7ce 100644 --- a/game/game.js +++ b/game/game.js @@ -4167,6 +4167,13 @@ frequent:true, intro:'开启后游戏中将有两个内奸(内奸胜利条件仍为主内1v1时击杀主公)' }, + choose_group:{ + name:'神武将选择势力', + init:true, + restart:true, + frequent:true, + intro:'若开启此选项,选择神武将的玩家需在亮出自己的武将牌之前为自己选择一个势力。' + }, double_character:{ name:'双将模式', init:false, diff --git a/game/update.js b/game/update.js index 1711f250e..857715a38 100644 --- a/game/update.js +++ b/game/update.js @@ -1,26 +1,22 @@ window.noname_update={ - version:'1.9.90.1', - update:'1.9.90', + version:'1.9.90.2', + update:'1.9.90.1', changeLog:[ - '神武将选择势力(仅限单机身份模式)', - 'bug修复', + '神武将选择势力设为可选选项', + '大量配音问题修复', ], files:[ - 'card/extra.js', 'card/guozhan.js', 'character/extra.js', + 'character/old.js', 'character/refresh.js', 'character/shenhua.js', 'character/sp.js', 'character/standard.js', 'character/xinghuoliaoyuan.js', 'character/yijiang.js', - 'mode/boss.js', 'mode/guozhan.js', 'mode/identity.js', - 'mode/versus.js', 'game/game.js', - 'layout/default/layout.css', - 'layout/mobile/layout.css', ] }; diff --git a/mode/guozhan.js b/mode/guozhan.js index 27d0938c6..101cb3c2a 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -285,7 +285,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ gz_panfeng:['male','qun',4,['kuangfu'],['gzskin']], gz_zoushi:['female','qun',3,['huoshui','qingcheng']], - gz_dengai:['male','wei',4,['tuntian','ziliang','gzjixi'],['gzskin']], + gz_dengai:['male','wei',4,['tuntian','ziliang','gzjixi'],['gzskin','die_audio']], gz_caohong:['male','wei',4,['huyuan','heyi'],['gzskin']], gz_jiangfei:['male','shu',3,['shengxi','gzshoucheng']], gz_jiangwei:['male','shu',4,['tiaoxin','yizhi','tianfu'],['gzskin']], @@ -2129,6 +2129,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, }, "new_keji":{ + audio:"keji", group:["new_keji_count","new_keji_reset","new_keji_judge"], subSkill:{ reset:{ @@ -2786,7 +2787,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(result.bool){ player.logSkill('new_fangzhu',result.targets); event.target=result.targets[0] - event.target.chooseToDiscard().set('ai',function(card){ + event.target.chooseToDiscard('he').set('ai',function(card){ var player=_status.event.player; if(player.isTurnedOver()) return -1; return (player.hp*player.hp)-get.value(card); @@ -3707,6 +3708,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, gzzhiman:{ + audio:'zhiman', inherit:'zhiman', content:function(){ 'step 0' @@ -4908,6 +4910,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, hongfa_respond:{ + audio:'hongfa', trigger:{player:'chooseToRespondBegin'}, direct:true, filter:function(event,player){ @@ -4941,6 +4944,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, hongfa_use:{ + audio:'hongfa', enable:'chooseToUse', filter:function(event,player){ if(!event.filterCard({name:'sha'},player)) return false; @@ -4997,6 +5001,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, hongfa:{ + audio:2, init:function(player){ player.storage.huangjintianbingfu=[]; }, @@ -5012,6 +5017,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ player.storage.huangjintianbingfu.addArray(get.cards(get.population('qun'))); player.syncStorage('huangjintianbingfu'); player.updateMarks('huangjintianbingfu'); + event.trigger('addCardToStorage'); }, ai:{ threaten:2, @@ -5047,6 +5053,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, wendao:{ + audio:2, unique:true, forceunique:true, enable:'phaseUse', @@ -5125,6 +5132,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ // } // return num>event.num; // }, + audio:2, content:function(){ 'step 0' var num=get.population('qun'); @@ -5144,6 +5152,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, zhangwu:{ + audio:2, unique:true, forceunique:true, ai:{ @@ -5152,6 +5161,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ group:['zhangwu_gain','zhangwu_clear','zhangwu_count1','zhangwu_count2','zhangwu_count3'], subSkill:{ gain:{ + audio:'zhangwu', trigger:{global:['discardAfter','respondAfter','useCardAfter','equipAfter', 'judgeAfter','useSkillAfter','phaseDrawBegin','phaseAfter']}, forced:true, @@ -5165,11 +5175,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } } } - if(game.hasPlayer(function(current){ - return current!=player&¤t.getEquip('feilongduofeng'); - })){ - return true; - } + if(event.name=='equip'&&player!=event.player&&event.card.name=='feilongduofeng') return true; + //if(game.hasPlayer(function(current){ + // return current!=player&¤t.getEquip('feilongduofeng'); + //})){ + // return true; + //} if(['discard','respond','useCard'].contains(event.name)&&event.cards){ for(var i=0;i