From e060dfdfb84789334e438eaac0f86d2841c167fe Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Fri, 30 Aug 2019 23:10:11 +0800 Subject: [PATCH] v1.9.92.2(Part 3) --- mode/brawl.js | 6 +- mode/doudizhu.js | 1 + mode/guozhan.js | 14824 ++++++++++++++++++++++----------------------- 3 files changed, 7416 insertions(+), 7415 deletions(-) diff --git a/mode/brawl.js b/mode/brawl.js index 357f46f6e..180b499a1 100644 --- a/mode/brawl.js +++ b/mode/brawl.js @@ -780,9 +780,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ init:function(){ var map={}; var map3=[]; - var list1=['司','夏','诸']; - var list2=['马','侯','葛']; - var exclude=['界','新','大']; + var list1=['司','夏','诸','皇']; + var list2=['马','侯','葛','甫']; + var exclude=['界','新','大','旧','☆','神']; for(var i in lib.character){ if(lib.filter.characterDisabled(i)) continue; var surname=lib.translate[i]; diff --git a/mode/doudizhu.js b/mode/doudizhu.js index 4e7757a72..67cd88520 100644 --- a/mode/doudizhu.js +++ b/mode/doudizhu.js @@ -691,6 +691,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ lib.playerOL[i].init(result[i][0],result[i][1]); } } + game.zhu=zhu; zhu.maxHp++; zhu.hp++; zhu.update(); diff --git a/mode/guozhan.js b/mode/guozhan.js index 19125f6cf..a08f0e4b4 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -1,713 +1,713 @@ -'use strict'; -game.import('mode',function(lib,game,ui,get,ai,_status){ - return { - name:'guozhan', - startBefore:function(){ - var playback=localStorage.getItem(lib.configprefix+'playback'); - for(var i in lib.characterPack.mode_guozhan){ - if(!get.config('onlyguozhan')&&!playback){ - if(lib.character[i.slice(3)]) continue; - } - lib.character[i]=lib.characterPack.mode_guozhan[i]; - if(!lib.character[i][4]){ - lib.character[i][4]=[]; - } - if(!lib.translate[i]){ - lib.translate[i]=lib.translate[i.slice(3)]; - } - } - for(var i in lib.character){ - if(lib.character[i][1]=='shen'){ - if(lib.character[i][4]&&lib.group.contains(lib.character[i][4][0])){ - lib.character[i][1]=lib.character[i][4][0]; - } - else{ - lib.character[i][1]='qun'; - } - } - } - lib.card.sha.complexTarget=true; - }, - onreinit:function(){ - var pack=lib.characterPack.mode_guozhan; - for(var i in pack){ - if(!lib.configOL.onlyguozhan){ - if(lib.character[i.slice(3)]) continue; - } - lib.character[i]=pack[i]; - if(!lib.character[i][4]){ - lib.character[i][4]=[]; - } - if(!lib.translate[i]){ - lib.translate[i]=lib.translate[i.slice(3)]; - } - } - }, - start:function(){ - "step 0" - var playback=localStorage.getItem(lib.configprefix+'playback'); - if(playback){ - ui.create.me(); - ui.arena.style.display='none'; - ui.system.style.display='none'; - _status.playback=playback; - localStorage.removeItem(lib.configprefix+'playback'); - var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); - store.get(parseInt(playback)).onsuccess=function(e){ - if(e.target.result){ - game.playVideoContent(e.target.result.video); - } - else{ - alert('播放失败:找不到录像'); - game.reload(); - } - } - event.finish(); - } - else if(_status.connectMode){ - game.waitForPlayer(); - } - else{ - if(get.config('guozhanpile')){ - lib.card.list=lib.guozhanPile.slice(0); - game.fixedPile=true; - } - game.prepareArena(); - // game.delay(); - game.showChangeLog(); - } - if(!_status.connectMode){ - _status.mode=get.config('guozhan_mode'); - if(_status.brawl&&_status.brawl.submode){ - _status.mode=_status.brawl.submode; - } - } - "step 1" - if(_status.connectMode){ - if(lib.configOL.guozhanpile){ - lib.card.list=lib.guozhanPile.slice(0); - game.fixedPile=true; - } - game.broadcastAll(function(pack){ - for(var i=0;i1) return (1.7+Math.random())*Math.max(num,1); - } - } - return 1+Math.random(); - }, - filter:function (button,player){ - var evt=_status.event.getParent('chooseToUse'); - if(!ui.selected.buttons.length){ - if(typeof button.link!='string') return false; - if(evt.type=='dying'){ - if(evt.dying.group=='unknown') return true; - return evt.dying.group==lib.character[button.link][1]; - } - return true; - } - else{ - if(typeof ui.selected.buttons[0].link!='string') return false; - if(typeof button.link!='object') return false; - var name=button.link[2]; - if(player.storage.yigui.used.contains(name)) return false; - var card={name:name}; - if(button.link[3]) card.nature=button.link[3]; - var info=get.info(card); - var group=lib.character[ui.selected.buttons[0].link][1]; - if(evt.type=='dying'){ - return evt.filterCard(card,player,evt); - } - if(!lib.filter.filterCard(card,player,evt)) return false; - else if(evt.filterCard&&!evt.filterCard(card,player,evt)) return false; - if(info.changeTarget){ - var list=game.filterPlayer(function(current){ - return player.canUse(card,current); - }); - for(var i=0;i0; - }); - }, - direct:true, - content:function (){ - 'step 0' - player.chooseTarget(get.prompt2('xindiaodu'),function(card,player,current){ - return current!=player&¤t.isFriendOf(player)&¤t.countGainableCards(player,'e')>0; - }).ai=function(target){ - var num=1; - if(target.hasSkill('gzxiaoji')) num+=2.5; - if(target.isDamaged()&&target.getEquip('baiyin')) num+=2.5; - if(target.hasSkill('xuanlve')) num+=2; - return num; - }; - 'step 1' - if(result.bool){ - event.target1=result.targets[0]; - player.logSkill('xindiaodu',event.target1); - player.line(event.target1,'xindiaodu'); - player.gainPlayerCard(event.target1,'e',true); - } - else event.finish(); - 'step 2' - if(result.bool){ - event.card=result.cards[0]; - player.chooseTarget('是否将'+get.translation(event.card)+'交给一名其他角色?',function(card,player,current){ - return current!=player&¤t!=event.target1&¤t.isFriendOf(player); - }); - } - else event.finish(); - 'step 3' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'green'); - target.gain(card,player) - player.$give(card,target); - } - }, - }, + gz_jun_caocao:['male','wei',4,['jianan','huibian','gzzongyu','wuziliangjiangdao'],[]], + } + }, + skill:{ + yigui:{ + init:function (player,skill){ + if(!player.storage.skill) player.storage[skill]={ + character:[], + used:[], + } + }, + enable:"chooseToUse", + filter:function (event,player){ + if(event.type=='wuxie') return false; + var storage=player.storage.yigui; + if(!storage||!storage.character.length) return false; + if(event.type=='dying'){ + if((!event.filterCard({name:'tao'},player,event)||storage.used.contains('tao'))&& + (!event.filterCard({name:'jiu'},player,event)||storage.used.contains('jiu'))) return false; + var target=event.dying; + if(target.group=='unknown') return true; + for(var i=0;i1) return (1.7+Math.random())*Math.max(num,1); + } + } + return 1+Math.random(); + }, + filter:function (button,player){ + var evt=_status.event.getParent('chooseToUse'); + if(!ui.selected.buttons.length){ + if(typeof button.link!='string') return false; + if(evt.type=='dying'){ + if(evt.dying.group=='unknown') return true; + return evt.dying.group==lib.character[button.link][1]; + } + return true; + } + else{ + if(typeof ui.selected.buttons[0].link!='string') return false; + if(typeof button.link!='object') return false; + var name=button.link[2]; + if(player.storage.yigui.used.contains(name)) return false; + var card={name:name}; + if(button.link[3]) card.nature=button.link[3]; + var info=get.info(card); + var group=lib.character[ui.selected.buttons[0].link][1]; + if(evt.type=='dying'){ + return evt.filterCard(card,player,evt); + } + if(!lib.filter.filterCard(card,player,evt)) return false; + else if(evt.filterCard&&!evt.filterCard(card,player,evt)) return false; + if(info.changeTarget){ + var list=game.filterPlayer(function(current){ + return player.canUse(card,current); + }); + for(var i=0;i0; + }); + }, + direct:true, + content:function (){ + 'step 0' + player.chooseTarget(get.prompt2('xindiaodu'),function(card,player,current){ + return current!=player&¤t.isFriendOf(player)&¤t.countGainableCards(player,'e')>0; + }).ai=function(target){ + var num=1; + if(target.hasSkill('gzxiaoji')) num+=2.5; + if(target.isDamaged()&&target.getEquip('baiyin')) num+=2.5; + if(target.hasSkill('xuanlve')) num+=2; + return num; + }; + 'step 1' + if(result.bool){ + event.target1=result.targets[0]; + player.logSkill('xindiaodu',event.target1); + player.line(event.target1,'xindiaodu'); + player.gainPlayerCard(event.target1,'e',true); + } + else event.finish(); + 'step 2' + if(result.bool){ + event.card=result.cards[0]; + player.chooseTarget('是否将'+get.translation(event.card)+'交给一名其他角色?',function(card,player,current){ + return current!=player&¤t!=event.target1&¤t.isFriendOf(player); + }); + } + else event.finish(); + 'step 3' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + target.gain(card,player) + player.$give(card,target); + } + }, + }, gzbuyi:{ trigger:{global:'dyingAfter'}, usable:1, @@ -783,14 +783,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return event.result.card.name=='sha'||event.result.card.name=='juedou'; }, content:function(){ - 'step 0' + 'step 0' player.gain(trigger.result.card,'gain2'); - player.chooseBool('是否令当前回合角色获得【筑围】的加成效果?').ai=function(){ - return get.attitude(player,_status.currentPhase)>0; - }; - 'step 1' + player.chooseBool('是否令当前回合角色获得【筑围】的加成效果?').ai=function(){ + return get.attitude(player,_status.currentPhase)>0; + }; + 'step 1' if(result.bool){ - var target=_status.currentPhase; + var target=_status.currentPhase; if(!target.hasSkill('zhuwei_eff')){ target.addTempSkill('zhuwei_eff'); target.storage.zhuwei_eff=1; @@ -819,9 +819,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ init:function(player){player.storage.gzweidi=[]}, enable:'phaseUse', usable:1, - filter:function(event,player){ - return player.storage.gzweidi.length>0 - }, + filter:function(event,player){ + return player.storage.gzweidi.length>0 + }, filterTarget:function(card,player,target){return target!=player&&player.storage.gzweidi.contains(target)}, content:function(){ 'step 0' @@ -946,7 +946,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ return event.target&&event.target==player&&event.card&&event.card.name=='zhibi' }, - check:function(){return false}, + check:function(){return false}, content:function(){ player.showHandcards(); } @@ -961,7 +961,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ 'step 0' event.players=game.filterPlayer(function(current){ return current.isFriendOf(trigger.source)&¤t.hp>=player.hp&&!game.hasPlayer(function(current2){ - return current2.hp>current.hp&¤t2.isFriendOf(current); + return current2.hp>current.hp&¤t2.isFriendOf(current); }) }); var str=event.players.length?',然后对'+get.translation(event.players)+(event.players.length==1?'':'中的一名角色')+'造成一点伤害':''; @@ -1016,9 +1016,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(event.source&&event.source==player&&_status.currentPhase!=player&&event.notLink()) return true; if(event.player&&event.player==player&&_status.currentPhase==player) return true; }, - check:function(event,player){ - return _status.currentPhase!=player; - }, + check:function(event,player){ + return _status.currentPhase!=player; + }, content:function(){trigger.num++}, ai:{ //damageBones:true, @@ -1029,65 +1029,65 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ forceunique:true, group:'wuziliangjiangdao', derivation:'wuziliangjiangdao', - global:'g_jianan', + global:'g_jianan', }, g_jianan:{ trigger:{player:'phaseBegin'}, - filter:function(event,player){ - if(!get.zhu(player,'jianan')) return false; - if(!player.countCards('he')) return false; - if(get.is.jun(player)&&player.isUnseen(1)) return false; - return !player.isUnseen(); + filter:function(event,player){ + if(!get.zhu(player,'jianan')) return false; + if(!player.countCards('he')) return false; + if(get.is.jun(player)&&player.isUnseen(1)) return false; + return !player.isUnseen(); }, direct:true, content:function(){ - 'step 0' - var skills=['tuxi','qiaobian','gzxiaoguo','gzjieyue','new_duanliang']; - game.countPlayer(function(current){ - if(current==player) return; + 'step 0' + var skills=['tuxi','qiaobian','gzxiaoguo','gzjieyue','new_duanliang']; + game.countPlayer(function(current){ + if(current==player) return; if(current.hasSkill('tuxi')) skills.remove('tuxi'); if(current.hasSkill('qiaobian')) skills.remove('qiaobian'); if(current.hasSkill('gzxiaoguo')) skills.remove('gzxiaoguo'); if(current.hasSkill('gzjieyue')) skills.remove('gzjieyue'); if(current.hasSkill('new_duanliang')) skills.remove('new_duanliang'); - }); - if(!skills.length) event.finish(); - else{ - event.skills=skills; - var next=player.chooseToDiscard(); - next.prompt='是否弃置一张牌并发动【五子良将纛】?' - next.prompt2=get.translation('wuziliangjiangdao_info'); - next.logSkill='g_jianan'; - next.skills=skills; - next.ai=function(card){ - return -1; - }; - } - 'step 1' - if(!result.bool) event.finish(); - else{ - var list=["主将","副将"]; - if(player.isUnseen(0)||get.is.jun(player)) list.remove("主将"); - if(player.isUnseen(1)) list.remove("副将"); - if(!list.length) event.finish(); - else if(list.length<2) event._result={control:list[0]}; - else{ - player.chooseControl(list).prompt="请选择暗置一张武将牌"; - } - } - 'step 2' - if(!result.control) event.finish(); - else{ - var num=result.control=='主将'?0:1; - player.hideCharacter(num); - player.chooseControl(event.skills).prompt="选择获得其中的一个技能直到下回合开始"; - } - 'step 3' - var link=result.control; - player.addTempSkill(link,{player:"phaseBefore"}); - player.addTempSkill("jianan_eff",{player:"phaseBefore"}); - game.log(player,"获得了技能","#g【"+get.translation(result.control)+"】"); - }, + }); + if(!skills.length) event.finish(); + else{ + event.skills=skills; + var next=player.chooseToDiscard(); + next.prompt='是否弃置一张牌并发动【五子良将纛】?' + next.prompt2=get.translation('wuziliangjiangdao_info'); + next.logSkill='g_jianan'; + next.skills=skills; + next.ai=function(card){ + return -1; + }; + } + 'step 1' + if(!result.bool) event.finish(); + else{ + var list=["主将","副将"]; + if(player.isUnseen(0)||get.is.jun(player)) list.remove("主将"); + if(player.isUnseen(1)) list.remove("副将"); + if(!list.length) event.finish(); + else if(list.length<2) event._result={control:list[0]}; + else{ + player.chooseControl(list).prompt="请选择暗置一张武将牌"; + } + } + 'step 2' + if(!result.control) event.finish(); + else{ + var num=result.control=='主将'?0:1; + player.hideCharacter(num); + player.chooseControl(event.skills).prompt="选择获得其中的一个技能直到下回合开始"; + } + 'step 3' + var link=result.control; + player.addTempSkill(link,{player:"phaseBefore"}); + player.addTempSkill("jianan_eff",{player:"phaseBefore"}); + game.log(player,"获得了技能","#g【"+get.translation(result.control)+"】"); + }, }, jianan_eff:{ ai:{nomingzhi:true} @@ -1216,14 +1216,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ mark:true, intro:{content:function(){return get.translation('wuziliangjiangdao_info')}}, }, - + gzzhengbi:{ trigger:{player:'phaseUseBegin'}, filter:function(event,player){ //if(event.player!=player) return false; return game.hasPlayer(function(current){return current!=player&¤t.identity=='unknown'})||player.countCards('h',{type:'basic'}); }, - check:function(event,player){ + check:function(event,player){ if(player.countCards('h',function(card){return get.value(card)<7})){ if(player.isUnseen()) return Math.random()>0.7; return true; @@ -1336,9 +1336,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ position:'h', filterCard:true, selectCard:-1, - filter:function(event,player){ - return !player.storage.gzfengying&&player.countCards('h')>0; - }, + filter:function(event,player){ + return !player.storage.gzfengying&&player.countCards('h')>0; + }, filterTarget:function(card,player,target){ return target==player; }, @@ -1347,8 +1347,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ lose:false, content:function(){ 'step 0' - player.awakenSkill('gzfengying'); - player.storage.gzfengying=true; + player.awakenSkill('gzfengying'); + player.storage.gzfengying=true; player.useCard({name:'xietianzi'},cards,target); 'step 1' var list=game.filterPlayer(function(current){ @@ -1383,42 +1383,42 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } } }, - }, - - junling4_eff:{ - mod:{ - cardEnabled:function(card){if(get.position(card)=='h') return false}, - cardUsable:function(card){if(get.position(card)=='h') return false}, - cardRespondable:function(card){if(get.position(card)=='h') return false}, - cardSavable:function(card){if(get.position(card)=='h') return false}, - }, - mark:true, - marktext:'令', - intro:{ - content:'不能使用或打出手牌' - } - }, - junling5_eff:{ - trigger:{player:"recoverBefore"}, - priority:44, - forced:true, - silent:true, - popup:false, - content:function(){trigger.cancel()}, - mark:true, - marktext:'令', - intro:{ - content:'不能回复体力' - }, - ai:{ - effect:{ - target:function (card,player,target){ - if(get.tag(card,'recover')) return 'zeroplayertarget'; - }, - }, - } - }, - + }, + + junling4_eff:{ + mod:{ + cardEnabled:function(card){if(get.position(card)=='h') return false}, + cardUsable:function(card){if(get.position(card)=='h') return false}, + cardRespondable:function(card){if(get.position(card)=='h') return false}, + cardSavable:function(card){if(get.position(card)=='h') return false}, + }, + mark:true, + marktext:'令', + intro:{ + content:'不能使用或打出手牌' + } + }, + junling5_eff:{ + trigger:{player:"recoverBefore"}, + priority:44, + forced:true, + silent:true, + popup:false, + content:function(){trigger.cancel()}, + mark:true, + marktext:'令', + intro:{ + content:'不能回复体力' + }, + ai:{ + effect:{ + target:function (card,player,target){ + if(get.tag(card,'recover')) return 'zeroplayertarget'; + }, + }, + } + }, + gzjieyue:{ trigger:{player:'phaseBegin'}, filter:function(event,player){ @@ -1434,7 +1434,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ position:'h', filterCard:true, filterTarget:function(card,player,target){ - return target.identity!='wei'&&target!=player; + return target.identity!='wei'&&target!=player; }, ai1:function(card,player,target){ if(get.attitude(player,target)>0) return 11-get.value(card); @@ -1488,8 +1488,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, audio:['jieyue',2], - }, - + }, + jianglue:{ limited:true, enable:'phaseUse', @@ -1598,18 +1598,18 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ return (!player.isUnseen())&&player.countCards('he')>2&&game.hasPlayer(function(current){ return current!=player&¤t.hasSkill('gzxuanhuo')&&player.isFriendOf(current); - }); - }, - prompt:function(){ - var player=_status.event.player; - var list=game.filterPlayer(function(current){ - return current!=player&¤t.hasSkill('gzxuanhuo')&&player.isFriendOf(current); - }); - var str='选择两张牌。将第一张牌交给'+get.translation(list); - if(list.length>1) str+='中的一人'; - str+=',并弃置第二张牌'; - return str; + }); }, + prompt:function(){ + var player=_status.event.player; + var list=game.filterPlayer(function(current){ + return current!=player&¤t.hasSkill('gzxuanhuo')&&player.isFriendOf(current); + }); + var str='选择两张牌。将第一张牌交给'+get.translation(list); + if(list.length>1) str+='中的一人'; + str+=',并弃置第二张牌'; + return str; + }, position:'he', filterCard:true, selectCard:2, @@ -1621,5461 +1621,5461 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, filterTarget:function(card,player,target){return target!=player&&target.hasSkill('gzxuanhuo')&&target.isFriendOf(player)}, discard:false, - lose:false, + lose:false, content:function(){ 'step 0' - target.gain(cards[0],player); - player.$giveAuto(cards[0],target); - player.discard(cards[1]); + target.gain(cards[0],player); + player.$giveAuto(cards[0],target); + player.discard(cards[1]); 'step 1' var list=['wusheng','new_paoxiao','new_longdan','new_tieji','liegong','xinkuanggu']; for(var i=0;i0; - }, - content:function(){ - 'step 0' - event.num=trigger.num; - 'step 1' - event.num--; - player.logSkill('enyuan_damage',trigger.source); - trigger.source.chooseCard('交给'+get.translation(player)+'一张手牌,或失去一点体力','h').set('ai',function(card){ - if(get.attitude(_status.event.player,_status.event.getParent().player)>0) return 11-get.value(card); - return 7-get.value(card); - }); - 'step 2' - if(result.bool){ - player.gain(result.cards[0],trigger.source); - trigger.source.$give(1,player); - } - else trigger.source.loseHp(); - if(event.num>0) event.goto(1); - }, - audio:'enyuan2', - }, - } - }, - - "new_jushou":{ - audio:"jushou", - trigger:{ - player:"phaseEnd", - }, - content:function (){ - 'step 0' - event.num=game.countGroup(); - player.draw(event.num); - if(event.num>2) player.turnOver(); - 'step 1' - player.chooseCard('h',true,'弃置一张手牌,若以此法弃置的是装备牌,则你改为使用之').set('ai',function(card){ - if(get.type(card)=='equip'){ - return 5-get.value(card); - } - return -get.value(card); - }).set('filterCard',lib.filter.cardDiscardable); - 'step 2' - if(result.bool&&result.cards.length){ - if(get.type(result.cards[0])=='equip'&&player.canEquip(result.cards[0],true)){ - player.$give(result.cards,player); - player.lose(result.cards,ui.special); - event.toequip=result.cards[0]; - } - else{ - player.discard(result.cards[0]); - } - } - 'step 3' - if(event.toequip){ - game.delay(); - } - 'step 4' - if(event.toequip){ - player.equip(event.toequip); - } - }, - ai:{ - effect:{ - target:function (card,player,target){ - if(card.name=='guiyoujie') return [0,1]; - }, - }, - }, - }, - "new_duanliang":{ - subSkill:{ - off:{ - sub:true, - }, - }, - mod:{ - targetInRange:function (card,player,target){ - if(card.name=='bingliang'){ - return true; - } - }, - }, - audio:"duanliang1", - enable:"chooseToUse", - filterCard:function (card){ - if(get.type(card)!='basic'&&get.type(card)!='equip') return false; - return get.color(card)=='black'; - }, - filter:function (event,player){ - if(player.hasSkill('new_duanliang_off')) return false; - return player.countCards('he',{type:['basic','equip'],color:'black'}) - }, - position:"he", - viewAs:{ - name:"bingliang", - }, - onuse:function (result,player){ - if(get.distance(player,result.targets[0])>2) player.addTempSkill('new_duanliang_off'); - }, - prompt:"将一黑色的基本牌或装备牌当兵粮寸断使用", - check:function (card){return 6-get.value(card)}, - ai:{ - order:9, - basic:{ - order:1, - useful:1, - value:4, - }, - result:{ - target:function (player,target){ - if(target.hasJudge('caomu')) return 0; - return -1.5/Math.sqrt(target.countCards('h')+1); - }, - }, - tag:{ - skip:"phaseDraw", - }, - }, - }, - "new_shushen":{ - audio:"shushen", - trigger:{ - player:"recoverAfter", - }, - direct:true, - content:function (){ - 'step 0' - event.num=trigger.num||1; - "step 1" - player.chooseTarget(get.prompt2('new_shushen'),function(card,player,target){ - return target!=player; - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - "step 2" - if(result.bool){ - player.logSkill('new_shushen',result.targets); - result.targets[0].draw(); - if(event.num>1){ - event.num--; - event.goto(1); - } - } - }, - ai:{ - threaten:0.8, - expose:0.1, - }, - }, - "new_fenji":{ - audio:"fenji", - trigger:{ - global:"phaseAfter", - }, - filter:function (event,player){ - if(event.player.countCards('h')==0&&event.player.isAlive()) return true; - return false; - }, - check:function (event,player){ - return get.attitude(player,event.player)>2; - }, - content:function (){ - player.line(trigger.player,'green'); - trigger.player.draw(2); - player.loseHp(); - }, - }, - "new_luanji":{ - audio:"luanji", - enable:"phaseUse", - viewAs:{ - name:"wanjian", - }, - filterCard:function (card,player){ - if(!player.storage.new_luanji) return true; - return !player.storage.new_luanji.contains(get.suit(card)); - }, - selectCard:2, - check:function (card){ - var player=_status.event.player; - var targets=game.filterPlayer(function(current){ - return player.canUse('wanjian',current); - }); - var num=0; - for(var i=0;i=7){ - if(num<2) return 0; - } - else if(targets.length>=5){ - if(num<1.5) return 0; - } - } - return 6-get.value(card); - }, - group:["new_luanji_count","new_luanji_reset","new_luanji_respond"], - subSkill:{ - reset:{ - trigger:{ - player:"phaseAfter", - }, - silent:true, - filter:function (event,player){ - return player.storage.new_luanji?true:false; - }, - content:function (){ - delete player.storage.new_luanji; - }, - sub:true, - forced:true, - popup:false, - }, - count:{ - trigger:{ - player:"useCard", - }, - silent:true, - filter:function (event){ - return event.skill=='new_luanji'; - }, - content:function (){ - if(!player.storage.new_luanji){ - player.storage.new_luanji=[]; - } - for(var i=0;i=0) return 0; - if(player.hasCard(function(card){ - return get.tag(card,'damage')&&player.canUse(card,target,true,true); - })){ - if(target.maxHp>3) return -0.5; - return -1; - } - return 0; - }, - }, - }, - }, - "new_kongcheng":{ - init:function (player){ - if(player.storage.new_kongcheng==undefined) player.storage.new_kongcheng=[]; - }, - group:["new_kongcheng_gain","new_kongcheng_got"], - subSkill:{ - gain:{ - audio:"kongcheng", - trigger:{ - player:"gainEnd", - }, - filter:function (event,player){ - return event.source&&event.source!=player&&event.cards.length==player.countCards('h')&&player!=_status.currentPhase; - }, - content:function (){ - player.storage.new_kongcheng=player.storage.new_kongcheng.concat(player.getCards('h')); - player.markSkill('new_kongcheng'); - game.addVideo('storage',player,['new_kongcheng',get.cardsInfo(player.storage.new_kongcheng),'cards']); - player.lose(player.getCards('h'),ui.special,'toStorage'); - }, - sub:true, - forced:true, - }, - got:{ - trigger:{ - player:"phaseDrawBegin", - }, - filter:function (event,player){ - return player.storage.new_kongcheng.length>0; - }, - content:function (){ - player.gain(player.storage.new_kongcheng,'draw','fromStorage'); - player.storage.new_kongcheng=[]; - game.addVideo('storage',player,['new_kongcheng',get.cardsInfo(player.storage.new_kongcheng),'cards']); - player.unmarkSkill('new_kongcheng'); - }, - sub:true, - forced:true, - }, - }, - audio:"kongcheng", - trigger:{ - target:"useCardToBefore", - }, - forced:true, - priority:15, - check:function (event,player){ - return get.effect(event.target,event.card,event.player,player)<0; - }, - filter:function (event,player){ - return player.countCards('h')==0&&(event.card.name=='sha'||event.card.name=='juedou'); - }, - content:function (){ - trigger.cancel(); - }, - ai:{ - effect:{ - target:function (card,player,target,current){ - if(target.countCards('h')==0&&(card.name=='sha'||card.name=='juedou')) return 'zeroplayertarget'; - }, - }, - }, - intro:{ - mark:function (dialog,content,player){ - if(content&&content.length){ - if(player==game.me||player.isUnderControl()){ - dialog.addAuto(content); - } - else{ - return '共有'+get.cnNumber(content.length)+'张牌'; - } - } - }, - content:function (content,player){ - if(content&&content.length){ - if(player==game.me||player.isUnderControl()){ - return get.translation(content); - } - return '共有'+get.cnNumber(content.length)+'张牌'; - } - }, - }, - }, - "new_keji":{ - audio:"keji", - group:["new_keji_count","new_keji_reset","new_keji_judge"], - subSkill:{ - reset:{ - trigger:{ - player:"phaseEnd", - }, - priority:1, - silent:true, - content:function (){ - player.storage.keji_type=[]; - player.storage.keji_color=[]; - player.storage.keji_suit=[]; - }, - sub:true, - forced:true, - popup:false, - }, - count:{ - trigger:{ - player:"useCard", - }, - silent:true, - content:function (){ - if(!player.storage.keji_type){ - player.storage.keji_type=[]; - } - if(!player.storage.keji_color){ - player.storage.keji_color=[]; - } - if(!player.storage.keji_suit){ - player.storage.keji_suit=[]; - } - player.storage.keji_type.add(get.type(trigger.card)); - player.storage.keji_color.add(get.color(trigger.card)); - player.storage.keji_suit.add(get.suit(trigger.card)); - }, - sub:true, - forced:true, - popup:false, - }, - judge:{ - audio:"keji", - forced:true, - trigger:{ - player:"phaseDiscardBefore", - }, - filter:function (event,player){ - return !player.storage.keji_color||player.storage.keji_color.length<2; - }, - content:function (){ - player.addTempSkill('keji_add','phaseAfter'); - }, - sub:true, - }, - }, - }, - "keji_add":{ - mod:{ - maxHandcard:function (player,num){ - return num+4; - }, - }, - }, - "new_mouduan":{ - trigger:{ - player:"phaseEnd", - }, - priority:2, - audio:"qinxue", - filter:function (event,player){ - if(player.storage.keji_suit&&player.storage.keji_suit.length>3) return true; - if(player.storage.keji_type&&player.storage.keji_type.length>2) return true; - return false; - }, - check:function(event,player){ - return player.canMoveCard(true); - }, - content:function (){ - player.moveCard(); - }, - }, - "new_longdan":{ - group:["new_longdan_sha","new_longdan_shan","new_longdan_draw","new_longdan_shamiss","new_longdan_shanafter"], - subSkill:{ - shanafter:{ - sub:true, - audio:"reyajiao", - trigger:{ - player:"respond", - }, - priority:1, - filter:function (event,player){ - return event.skill=='new_longdan_shan'&&event.getParent(2).name=='sha'; - }, - direct:true, - content:function (){ - "step 0" - player.chooseTarget("是否发动【龙胆】令一名其他角色回复1点体力?",function(card,player,target){ - return target!=trigger.source&&target!=player&&target.isDamaged(); - }).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - "step 1" - if(result.bool&&result.targets&&result.targets.length){ - player.line(result.targets[0],'green'); - result.targets[0].recover(); - } - }, - }, - shamiss:{ - sub:true, - audio:"reyajiao", - trigger:{ - player:"shaMiss", - }, - direct:true, - filter:function (event,player){ - return event.skill=='new_longdan_sha'; - }, - content:function (){ - "step 0" - player.chooseTarget("是否发动【龙胆】对一名其他角色造成1点伤害?",function(card,player,target){ - return target!=trigger.target&&target!=player; - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }); - "step 1" - if(result.bool&&result.targets&&result.targets.length){ - player.line(result.targets[0],'green'); - result.targets[0].damage(); - } - }, - }, - draw:{ - trigger:{ - player:["useCard","respond"], - }, - priority:2, - forced:true, - popup:false, - filter:function (event,player){ - if(!get.zhu(player,'shouyue')) return false; - return event.skill=='new_longdan_sha'||event.skill=='new_longdan_shan'; - }, - content:function (){ - player.draw(); - //player.storage.fanghun2++; - }, - sub:true, - }, - sha:{ - audio:"longdan_sha", - enable:["chooseToUse","chooseToRespond"], - filterCard:{ - name:"shan", - }, - viewAs:{ - name:"sha", - }, - viewAsFilter:function (player){ - if(!player.countCards('h','shan')) return false; - }, - prompt:"将一张闪当杀使用或打出", - check:function (){return 1}, - ai:{ - effect:{ - target:function (card,player,target,current){ - if(get.tag(card,'respondSha')&¤t<0) return 0.6 - }, - }, - respondSha:true, - skillTagFilter:function (player){ - if(!player.countCards('h','shan')) return false; - }, - order:function (){ - return get.order({name:'sha'})+0.1; - }, - }, - sub:true, - }, - shan:{ - audio:"longdan_shan", - enable:["chooseToRespond"], - filterCard:{ - name:"sha", - }, - viewAs:{ - name:"shan", - }, - prompt:"将一张杀当闪打出", - check:function (){return 1}, - viewAsFilter:function (player){ - if(!player.countCards('h','sha')) return false; - }, - ai:{ - respondShan:true, - skillTagFilter:function (player){ - if(!player.countCards('h','sha')) return false; - }, - effect:{ - target:function (card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0) return 0.6 - }, - }, - }, - sub:true, - }, - }, - }, - "new_paoxiao":{ - audio:"paoxiao", - trigger:{ - player:"useCard", - }, - filter:function (event,player){ - if(_status.currentPhase!=player) return false; - return event.card.name=='sha'&&(get.cardCount({name:'sha'},player)==2); - }, - forced:true, - content:function (){ - player.draw(); - }, - mod:{ - cardUsable:function (card,player,num){ - if(card.name=='sha') return Infinity; - }, - }, - ai:{ - unequip:true, - skillTagFilter:function (player,tag,arg){ - if(!get.zhu(player,'shouyue')) return false; - if(arg&&arg.name=='sha') return true; - return false; - }, - }, - }, - "new_kurou":{ - audio:"rekurou", - enable:"phaseUse", - usable:1, - filterCard:true, - check:function (card){ - return 8-get.value(card); - }, - position:"he", - content:function (){ - player.loseHp(); - player.draw(3); - player.addTempSkill('kurou_effect','phaseAfter'); - }, - ai:{ - order:8, - result:{ - player:function (player){ - if(player.hp<=2) return player.countCards('h')==0?1:0; - if(player.countCards('h',{name:'sha',color:'red'})) return 1; - return player.countCards('h')<=player.hp?1:0; - }, - }, - }, - }, - "kurou_effect":{ - mod:{ - cardUsable:function (card,player,num){ - if(card.name=='sha') return num+1; - }, - }, - }, - "new_chuli":{ - audio:"chulao", - enable:"phaseUse", - usable:1, - filterTarget:function (card,player,target){ - if(player==target) return false; - for(var i=0;i0; - }, - filter:function (event,player){ - return player.countCards('he')>0; - }, - filterCard:true, - position:"he", - selectTarget:[1,3], - check:function (card){ - if(get.suit(card)=='spade') return 8-get.value(card); - return 5-get.value(card); - }, - content:function (){ - "step 0" - if(num==0&&get.suit(cards[0])=='spade') player.draw(); - player.choosePlayerCard(targets[num],'he',true); - "step 1" - if(result.bool){ - if(result.links.length) targets[num].discard(result.links[0]); - if(get.suit(result.links[0])=='spade') targets[num].draw(); - } - }, - ai:{ - result:{ - target:-1, - }, - threaten:1.2, - order:3, - }, - }, - "baka_hunshang":{ - skillAnimation:true, - audio:"hunshang", - derivation:["reyingzi","gzyinghun"], - viceSkill:true, - init:function (player){ - if(player.checkViceSkill('baka_hunshang')&&!player.viceChanged){ - player.removeMaxHp(); - } - }, - trigger:{ - player:"phaseBegin", - }, - filter:function (event,player){ - return player.hp<=1; - }, - forced:true, - //priority:3, - content:function (){ - player.addTempSkill('baka_yingzi','phaseAfter'); - player.addTempSkill('baka_yinghun','phaseAfter'); - }, - ai:{ - threaten:function (player,target){ - if(target.hp==1) return 2; - return 0.5; - }, - maixie:true, - effect:{ - target:function (card,player,target){ - if(!target.hasFriend()) return; - if(get.tag(card,'damage')==1&&target.hp==2&&!target.isTurnedOver()&& - _status.currentPhase!=target&&get.distance(_status.currentPhase,target,'absolute')<=3) return [0.5,1]; - }, - }, - }, - }, - "baka_yinghun":{ - inherit:"gzyinghun", - filter:function (event,player){ - return player.isDamaged(); - }, - //priority:2, - audio:"yinghun", - audioname:["sunce"], - trigger:{ - player:"phaseBegin", - }, - direct:true, - content:function (){ - "step 0" - player.chooseTarget(get.prompt('yinghun'),function(card,player,target){ - return player!=target; - }).set('ai',function(target){ - var player=_status.event.player; - if(player.maxHp-player.hp==1&&target.countCards('he')==0){ - return 0; - } - if(get.attitude(_status.event.player,target)>0){ - return 10+get.attitude(_status.event.player,target); - } - if(player.maxHp-player.hp==1){ - return -1; - } - return 1; - }); - "step 1" - if(result.bool){ - event.num=player.maxHp-player.hp; - player.logSkill(event.name,result.targets); - event.target=result.targets[0]; - if(event.num==1){ - event.directcontrol=true; - } - else{ - var str1='摸'+get.cnNumber(event.num,true)+'弃一'; - var str2='摸一弃'+get.cnNumber(event.num,true); - player.chooseControl(str1,str2,function(event,player){ - return _status.event.choice; - }).set('choice',get.attitude(player,event.target)>0?str1:str2); - event.str=str1; - } - } - else{ - event.finish(); - } - "step 2" - if(event.directcontrol||result.control==event.str){ - event.target.draw(event.num); - event.target.chooseToDiscard(true,'he'); - } - else{ - event.target.draw(); - event.target.chooseToDiscard(event.num,true,'he'); - } - }, - ai:{ - threaten:function (player,target){ - if(target.hp==target.maxHp) return 0.5; - if(target.hp==1) return 2; - if(target.hp==2) return 1.5; - return 0.5; - }, - maixie:true, - effect:{ - target:function (card,player,target){ - if(target.maxHp<=3) return; - if(get.tag(card,'damage')){ - if(target.hp==target.maxHp) return [0,1]; - } - if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; - }, - }, - }, - }, - "baka_yingzi":{ - mod:{ - maxHandcard:function (player,num){ - if(!player.hasSkill('reyingzi')&&player.hp0) - }, - content:function (){ - "step 0" - event.cards=get.cards(2); - "step 1" - if(event.cards.length>1){ - player.chooseCardButton('将“遗计”牌分配给任意角色',true,event.cards,[1,event.cards.length]).set('ai',function(button){ - if(ui.selected.buttons.length==0) return 1; - return 0; - }); - } - else if(event.cards.length==1){ - event._result={links:event.cards.slice(0),bool:true}; - } - else{ - event.finish(); - } - "step 2" - if(result.bool){ - for(var i=0;i0){ - return att/(1+target.countCards('h')); - } - else{ - return att/100; - } - }).set('enemy',get.value(event.togive[0])<0); - } - "step 3" - if(result.targets.length){ - result.targets[0].gain(event.togive,'draw'); - player.line(result.targets[0],'green'); - game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张牌'); - event.goto(1); - } - }, - ai:{ - maixie:true, - "maixie_hp":true, - effect:{ - target:function (card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(!target.hasFriend()) return; - var num=1; - if(get.attitude(player,target)>0){ - if(player.needsToDiscard()){ - num=0.7; - } - else{ - num=0.5; - } - } - if(target.hp>=4) return [1,num*2]; - if(target.hp==3) return [1,num*1.5]; - if(target.hp==2) return [1,num*0.5]; - } - }, - }, - }, - }, - "new_jieming":{ - audio:"jieming", - trigger:{ - player:"damageEnd", - }, - direct:true, - content:function (){ - "step 0" - player.chooseTarget(get.prompt('new_jieming'),function(card,player,target){ - return target.countCards('h')2){ - return Math.min(5,target.maxHp)-target.countCards('h'); - } - return att/3; - }); - "step 1" - if(result.bool){ - player.logSkill('new_jieming',result.targets); - for(var i=0;i1){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - var max=0; - var players=game.filterPlayer(); - for(var i=0;i0){ - max=Math.max(Math.min(5,players[i].hp)-players[i].countCards('h'),max); - } - } - switch(max){ - case 0:return 2; - case 1:return 1.5; - case 2:return [1,2]; - default:return [0,max]; - } - } - if((card.name=='tao'||card.name=='caoyao')&& - target.hp>1&&target.countCards('h')<=target.hp) return [0,0]; - }, - }, - }, - }, - "new_fangzhu":{ - audio:"fangzhu", - trigger:{ - player:"damageEnd", - }, - direct:true, - content:function (){ - "step 0" - player.chooseTarget(get.prompt('new_fangzhu'),function(card,player,target){ - return player!=target - }).ai=function(target){ - if(target.hasSkillTag('noturn')) return 0; - var player=_status.event.player; - if(get.attitude(_status.event.player,target)==0) return 0; - if(get.attitude(_status.event.player,target)>0){ - if(target.classList.contains('turnedover')) return 1000-target.countCards('h'); - if(player.maxHp-player.hp<3) return -1; - return 100-target.countCards('h'); - } - else{ - if(target.classList.contains('turnedover')) return -1; - if(player.maxHp-player.hp>=3) return -1; - return 1+target.countCards('h'); - } - } - "step 1" - if(result.bool){ - player.logSkill('new_fangzhu',result.targets); - event.target=result.targets[0] - 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); - }).set('dialog',['弃置一张手牌并失去一点体力;或选择不弃置,将武将牌翻面并摸牌。']); - } - else event.finish(); - "step 2" - if(result.bool){ - event.target.loseHp(); - } - else{ - event.target.draw(player.maxHp-player.hp); - event.target.turnOver(); - } - }, - ai:{ - maixie:true, - "maixie_hp":true, - effect:{ - target:function (card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; - if(target.hp<=1) return; - if(!target.hasFriend()) return; - var hastarget=false; - var turnfriend=false; - var players=game.filterPlayer(); - for(var i=0;i0&&players[i].isTurnedOver()){ - hastarget=true; - turnfriend=true; - } - } - if(get.attitude(player,target)>0&&!hastarget) return; - if(turnfriend||target.hp==target.maxHp) return [0.5,1]; - if(target.hp>1) return [1,0.5]; - } - }, - }, - }, - }, - "fengyin_main":{ - init:function (player,skill){ - var skills=lib.character[player.name1][3]; - for(var i=0;i0){ - if(controls.length==1) event._result={control:controls[0]}; - else{ - player.chooseControl(controls).set('ai',function(){ - var choice='主将'; - var skills=lib.character[target.name2][3]; - for(var i=0;i1?2:0; - return 8-get.value(card); - }).set('num',num).set('suit',suit); - "step 4" - if(!result.bool){ - trigger.directHit=true; - } - }, - }, - hmkyuanyu:{ - trigger:{ - player:"damageBegin", - }, - forced:true, - filter:function (event,player){ - if(event.num<=0||!event.source) return false; - var n1=player.getNext(); - var p1=player.getPrevious(); - if(event.source!=n1&&event.source!=p1) return true; - }, - content:function (){ - trigger.cancel(); - }, - ai:{ - effect:{ - target:function (card,player,target){ - if(player.hasSkillTag('jueqing',false,target)) return; - if(player==target.getNext()||player==target.getPrevious()) return; - var num=get.tag(card,'damage'); - if(num){ - return 0; - } - }, - }, - }, - }, - hmkguishu:{ - group:["hmkguishu_reset"], - subSkill:{ - reset:{ - sub:true, - silent:true, - forced:true, - popup:false, - trigger:{ - player:"phaseBefore", - }, - content:function (){ - player.storage.hmkguishu=0; - }, - }, - }, - enable:"phaseUse", - filter:function (event,player){ - return player.countCards('h',{suit:'spade'})>0; - }, - init:function (player){ - player.storage.hmkguishu=0; - }, - chooseButton:{ - dialog:function (event,player){ - var list=['yuanjiao','zhibi']; - for(var i=0;i2) return 1; - return 0; - } - }, - backup:function (links,player){ - return { - filterCard:function (card,player){ - return get.suit(card)=='spade'; - }, - position:"h", - selectCard:1, - popname:true, - ai:function(card){ - return 6-ai.get.value(card); - }, - viewAs:{name:links[0][2]}, - onuse:function(result,player){ - player.logSkill('hmkguishu'); - if(result.card.name=='yuanjiao') player.storage.hmkguishu=1; - else player.storage.hmkguishu=2; - }, - } - }, - prompt:function (links,player){ - return '将一张手牌当作'+get.translation(links[0][2])+'使用'; - }, - }, - ai:{ - order:4, - result:{ - player:function (player){ - return 2; - }, - }, - threaten:1.6, - }, - }, - "new_buqu":{ - audio:"buqu", - trigger:{ - player:"dieBefore", - }, - forced:true, - filter:function (event,player){return player.maxHp>0&&player.hp<=0}, - content:function (){ - "step 0" - event.card=get.cards()[0]; - if(player.storage.new_buqu==undefined) player.storage.new_buqu=[]; - player.storage.new_buqu.push(event.card); - player.syncStorage('new_buqu'); - player.showCards(player.storage.new_buqu,'不屈') - player.markSkill('new_buqu'); - "step 1" - for(var i=0;i1; - }, - content:function (){ - var target=player.getNext(); - player.viewCharacter(target,1); - }, - }, - aozhan:{ - mod:{ - cardEnabled:function (card,player){ - if(_status.event.skill==undefined&&get.owner(card)!=undefined&&card.name=='tao') return false; - }, - cardUsable:function (card,player){ - if(_status.event.skill==undefined&&get.owner(card)!=undefined&&card.name=='tao') return false; - }, - cardRespondable:function (card,player){ - if(_status.event.skill==undefined&&get.owner(card)!=undefined&&card.name=='tao') return false; - }, - cardSavable:function (card,player){ - if(_status.event.skill==undefined&&get.owner(card)!=undefined&&card.name=='tao') return false; - }, - }, - group:["aozhan_sha","aozhan_shan"], - subSkill:{ - sha:{ - enable:["chooseToUse","chooseToRespond"], - filterCard:{ - name:"tao", - }, - viewAs:{ - name:"sha", - }, - viewAsFilter:function (player){ - if(!player.countCards('h','tao')) return false; - }, - prompt:"将一张桃当杀使用或打出", - check:function (){return 1}, - ai:{ - effect:{ - target:function (card,player,target,current){ - if(get.tag(card,'respondSha')&¤t<0) return 0.6 - }, - }, - respondSha:true, - skillTagFilter:function (player){ - if(!player.countCards('h','tao')) return false; - }, - order:function (){ - return get.order({name:'sha'})-0.1; - }, - }, - sub:true, - }, - shan:{ - enable:["chooseToRespond"], - filterCard:{ - name:"tao", - }, - viewAs:{ - name:"shan", - }, - prompt:"将一张桃当闪打出", - check:function (){return 1}, - viewAsFilter:function (player){ - if(!player.countCards('h','tao')) return false; - }, - ai:{ - respondShan:true, - skillTagFilter:function (player){ - if(!player.countCards('h','tao')) return false; - }, - effect:{ - target:function (card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0) return 0.6 - }, - }, - }, - sub:true, - }, - }, - }, - _aozhan_judge:{ - trigger:{ - player:"phaseBefore", - }, - forced:true, - priority:22, - filter:function (event,player){ - if(get.mode()!='guozhan') return false; - if(_status.connectMode&&!lib.configOL.aozhan) return false; - else if(!_status.connectMode&&!get.config('aozhan')) return false; - if(_status._aozhan) return false; - if(game.players.length>4) return false; - if(game.players.length>3&&game.players.length+game.dead.length<=7) return false; - for(var i=0;i1) return false; - } - return true; - }, - content:function (){ - var color=get.groupnature(player.group,"raw"); - if(player.isUnseen()) color='fire'; - player.$fullscreenpop('鏖战模式',color); - game.broadcastAll(function(){ - _status._aozhan=true; - ui.aozhan=ui.create.div('.touchinfo.left',ui.window); - ui.aozhan.innerHTML='鏖战模式'; - if(ui.time3) ui.time3.style.display='none'; - game.playBackgroundMusic(); - }); - game.countPlayer(function(current){current.addSkill('aozhan')}); - }, - }, - "xianqu_skill":{ - enable:"phaseUse", - filter:function (event,player){ - return player.countCards('h')<4; - }, - usable:1, - mark:true, - intro:{ - content:"◇出牌阶段,你可以弃置此标记,然后将手牌摸至四张并观看一名其他角色的一张武将牌。", - }, - content:function (){ - "step 0" - player.draw(4-player.countCards('h')); - player.chooseTarget('是否观看一名其他角色的一张暗置武将牌?',function(card,player,target){ - return target!=player&&target.isUnseen(2); - }).set('ai',function(target){ - if(target.isUnseen()){ - var next=_status.event.player.getNext(); - if (target!=next) return 10; - return 9; - } - return -get.attitude(_status.event.player,target); - }); - "step 1" - if(result.bool){ - event.target=result.targets[0]; - player.line(event.target,'green'); - var controls=[]; - if(event.target.isUnseen(0)) controls.push('主将'); - if(event.target.isUnseen(1)) controls.push('副将'); - if(controls.length>1){ - player.chooseControl(controls); - } - if(controls.length==0) event.finish(); - } - else{ - player.removeSkill('xianqu_skill'); - event.finish(); - } - "step 2" - if(result.control){ - if(result.control=='主将'){ - player.viewCharacter(event.target,0); - } - else{ - player.viewCharacter(event.target,1); - } - } - else if(target.isUnseen(0)){ - player.viewCharacter(event.target,0); - } - else{ - player.viewCharacter(event.target,1); - } - player.removeSkill('xianqu_skill'); - }, - ai:{ - order:1, - result:{ - player:2, - }, - }, - }, - "zhulianbihe_skill":{ - group:["zhulianbihe_skill_draw","zhulianbihe_skill_tao"], - mark:true, - intro:{ - content:"◇出牌阶段,你可以弃置此标记 然后摸两张牌。
◇你可以将此标记当做【桃】使用。", - }, - }, - "yinyang_skill":{ - group:["yinyang_skill_draw","yinyang_skill_add"], - mark:true, - intro:{ - content:"◇出牌阶段,你可以弃置此标记,然后摸一张牌。
◇弃牌阶段,你可以弃置此标记,然后本回合手牌上限+2。", - }, - }, - "zhulianbihe_skill_draw":{ - enable:"phaseUse", - usable:1, - content:function (){ - player.draw(2); - player.removeSkill('zhulianbihe_skill'); - }, - ai:{ - order:function (item,player){ - var cards=player.getCards('h'); - if(player.hp>=3){ - if(cards.length>=3){ - for(var i=0;i=1) return 7.2; - } - return 1; - } - else return 7.2; - } - if(player.hp=2){ - if(cards.length<2){ - for(var i=0;i=1) return 7.2; - } - return 1; - } - } - return 1; - }, - result:{ - player:2, - }, - }, - }, - "zhulianbihe_skill_tao":{ - enable:"chooseToUse", - viewAs:{ - name:"tao", - }, - filterCard:function (){return false}, - selectCard:-1, - precontent:function (){ - player.removeSkill('zhulianbihe_skill'); - }, - ai:{ - save:true, - respondTao:true, - }, - }, - "yinyang_skill_draw":{ - enable:"phaseUse", - usable:1, - content:function (){ - player.draw(); - player.removeSkill('yinyang_skill'); - }, - ai:{ - order:function (item,player){ - if(player.countCards('h')player.getHandcardLimit()) return 0; - return 1; - }, - }, - }, - }, - "yinyang_skill_add":{ - trigger:{ - player:"phaseDiscardBefore", - }, - filter:function (event,player){ - return player.needsToDiscard(); - }, - prompt:"是否弃置【阴阳鱼】标记,使本回合的手牌上限+2?", - content:function (){ - player.addTempSkill('yinyang_add','phaseAfter'); - player.removeSkill('yinyang_skill'); - }, - }, - "yinyang_add":{ - mod:{ - maxHandcard:function (player,num){ - return num+2; - }, - }, - }, - /*----分界线----*/ - _lianheng:{ - mode:['guozhan'], - enable:'phaseUse', - usable:1, - prompt:'将至多三张可合纵的牌交给一名与你势力不同的角色,或未确定势力的角色,若你交给与你势力不同的角色,则你摸等量的牌', - filter:function(event,player){ - return (player.getCards('h',function(card){ - return card.hasTag('lianheng'); - }).length); - }, - filterCard:function(card){ - return card.hasTag('lianheng'); - }, - filterTarget:function(card,player,target){ - if(target==player) return false; - if(player.isUnseen()) return target.isUnseen(); - if(player.identity=='ye') return true; - return target.identity!=player.identity; - }, - selectCard:[1,3], - prepare:'give', - discard:false, - // delay:0.5, - content:function(){ - "step 0" - target.gain(cards,player); - "step 1" - if(!target.isUnseen()){ - player.draw(cards.length); - } - }, - ai:{ - basic:{ - order:2 - }, - result:{ - player:function(player,target){ - if(target.isUnseen()) return 0; - if(player.isMajor()) return 0; - return 0.5; - }, - target:function(player,target){ - if(target.isUnseen()) return 0; - return 1; - } - }, - } - }, - qianhuan:{ - group:['qianhuan_add','qianhuan_use'], - init:function(player){ - player.storage.qianhuan=[]; - }, - intro:{ - content:'cards' - }, - ai:{ - threaten:1.8 - }, - audio:2, - subSkill:{ - add:{ - trigger:{global:'damageEnd'}, - filter:function(event,player){ - var suits=[]; - for(var i=0;i=3){ - goon=false; - } - } - else if(trigger.card.name=='guohe'){ - if(trigger.target.countCards('he')>=3||!trigger.target.countCards('h')){ - goon=false; - } - } - else if(trigger.card.name=='shuiyanqijunx'){ - if(trigger.target.countCards('e')<=1||trigger.target.hp>=3){ - goon=false; - } - } - else if(get.tag(trigger.card,'damage')&&trigger.target.hp>=3){ - goon=false; - } - } - player.chooseButton().set('goon',goon).set('ai',function(button){ - if(_status.event.goon) return 1; - return 0; - }).set('createDialog',[get.prompt('qianhuan'),'
移去一张“千幻”牌令'+ - get.translation(trigger.player)+'对'+get.translation(trigger.target)+'的'+get.translation(trigger.card)+'失效
',player.storage.qianhuan]); - 'step 1' - if(result.bool){ - var card=result.links[0]; - player.storage.qianhuan.remove(card); - if(player.storage.qianhuan.length){ - player.updateMarks('qianhuan'); - } - else{ - player.unmarkSkill('qianhuan'); - } - game.cardsDiscard(card); - player.$throw(card); - player.logSkill('qianhuan',trigger.player); - trigger.cancel(); - } - } - } - } - }, - gzzhiman:{ - audio:'zhiman', - inherit:'zhiman', - content:function(){ - 'step 0' - if(trigger.player.countGainableCards(player,'ej')){ - player.gainPlayerCard(trigger.player,'ej',true); - } - trigger.cancel(); - 'step 1' - if(player.sameIdentityAs(trigger.player)){ - trigger.player.mayChangeVice(); - } - } - }, - gzdiancai:{ - group:['gzdiancai_count','gzdiancai_init'], - audio:2, - trigger:{global:'phaseUseEnd'}, - filter:function(event,player){ - return _status.currentPhase!=player&&player.storage.gzdiancai>=player.hp; - }, - content:function(){ - 'step 0' - var num=player.maxHp-player.countCards('h'); - if(num>0){ - player.draw(num); - } - 'step 1' - player.mayChangeVice(); - }, - subSkill:{ - init:{ - trigger:{global:'phaseUseBegin'}, - filter:function(event,player){ - return _status.currentPhase!=player; - }, - silent:true, - content:function(){ - player.storage.gzdiancai=0; - } - }, - count:{ - trigger:{player:'loseEnd'}, - silent:true, - filter:function(event,player){ - return _status.currentPhase!=player; - }, - content:function(){ - player.storage.gzdiancai+=trigger.cards.length; - } - } - } - }, - /*diaodu:{ - enable:'phaseUse', - audio:2, - usable:1, - filterTarget:function(card,player,target){ - return player.sameIdentityAs(target); - }, - selectTarget:-1, - content:function(){ - 'step 0' - var use=target.countCards('h',{type:'equip'})>0; - var move=false; - var es=target.getCards('e'); - if(es.length&&target.identity!='ye'){ - move=game.hasPlayer(function(current){ - if(current!=target&&target.identity!=current.identity){ - for(var i=0;i=4; - }); - var vacancies={ - equip1:0, - equip2:0, - equip3:0, - equip4:0, - equip5:0 - }; - for(var i=0;i=3){ - return 1; - } - vacancies[type]--; - } - } - } - if(num&&player.hp==1){ - return 0.5; - } - return 0; - } - } - } - }, - xuanlve:{ - trigger:{player:'loseEnd'}, - direct:true, - filter:function(event,player){ - for(var i=0;i=5){ - return 8-get.value(card); - } - if(num>=3){ - return 7-get.value(card); - } - if(num>=2){ - return 3-get.value(card); - } - return 0; - }, - content:function(){ - 'step 0' - var num=game.countPlayer(function(current){ - if(current.identity=='wu'){ - return current.countCards('e'); - } - })+player.storage.yuanjiangfenghuotu.length; - if(num){ - event.shown=get.cards(num); - player.showCards(event.shown,get.translation('lianzi')); - } - else{ - event.finish(); - return; - } - 'step 1' - var list=[]; - var discards=[]; - var type=get.type(cards[0],'trick'); - for(var i=0;i=3&&player.hasStockSkill('lianzi')){ - player.removeSkill('lianzi'); - player.addSkill('gzzhiheng'); - } - } - }, - ai:{ - order:7, - result:{ - player:1 - } - } - }, - jubao:{ - mod:{ - canBeGained:function(card){ - if(get.position(card)=='e'&&get.subtype(card)=='equip5') return false; - } - }, - trigger:{player:'phaseEnd'}, - audio:2, - forced:true, - unique:true, - filter:function(event,player){ - if(game.hasPlayer(function(current){ - return current.countCards('ej',function(card){ - return card.name=='dinglanyemingzhu'; - }); - })){ - return true; - } - for(var i=0;i0; - }, - content:function(){ - 'step 0' - player.chooseCardButton('将一张“烽火”置入弃牌堆',player.storage.yuanjiangfenghuotu,true); - 'step 1' - if(result.bool){ - player.$throw(result.links); - var card=result.links[0]; - game.cardsDiscard(card); - player.storage.yuanjiangfenghuotu.remove(card); - player.syncStorage('yuanjiangfenghuotu'); - player.updateMarks('yuanjiangfenghuotu'); - } - } - }, - jiahe_put:{ - enable:'phaseUse', - audio:"jiahe", - filter:function(event,player){ - var zhu=get.zhu(player,'jiahe'); - if(zhu&&zhu.storage.yuanjiangfenghuotu){ - return player.countCards('he',{type:'equip'})>0; - } - return false; - }, - filterCard:{type:'equip'}, - position:'he', - usable:1, - check:function(card){ - var zhu=get.zhu(_status.event.player,'jiahe'); - if(!zhu) return 0; - var num=7-get.value(card); - if(get.position(card)=='h'){ - if(zhu.storage.yuanjiangfenghuotu>=5){ - return num-3; - } - return num+3; - } - else{ - var player=_status.event.player; - var zhu=get.zhu(player,'jiahe'); - if(zhu.storage.yuanjiangfenghuotu>=5&&!player.hasSkillTag('noe')){ - return num-5; - } - } - return num; - }, - discard:false, - lose:true, - prepare:function(cards,player){ - var zhu=get.zhu(player,'jiahe'); - player.$give(cards,zhu); - player.line(zhu); - }, - content:function(){ - var zhu=get.zhu(player,'jiahe'); - zhu.storage.yuanjiangfenghuotu.add(cards[0]); - zhu.syncStorage('yuanjiangfenghuotu'); - zhu.updateMarks('yuanjiangfenghuotu'); - event.trigger('addCardToStorage'); - }, - ai:{ - order:1, - result:{ - player:1 - } - } - }, - jiahe_skill:{ - trigger:{player:'phaseBegin'}, - direct:true, - audio:"jiahe", - filter:function(event,player){ - var zhu=get.zhu(player,'jiahe'); - if(zhu&&zhu.storage.yuanjiangfenghuotu&&zhu.storage.yuanjiangfenghuotu.length){ - return true; - } - return false; - }, - content:function(){ - 'step 0' - var zhu=get.zhu(player,'jiahe'); - event.num=zhu.storage.yuanjiangfenghuotu.length; - 'step 1' - var list=[]; - if(event.num>=1&&!player.hasSkill('reyingzi')) list.push('reyingzi'); - if(event.num>=2&&!player.hasSkill('haoshi')) list.push('haoshi'); - if(event.num>=3&&!player.hasSkill('shelie')) list.push('shelie'); - if(event.num>=4&&!player.hasSkill('duoshi')) list.push('duoshi'); - if(!list.length){ - event.finish(); - return; - } - var prompt2='你可以获得下列一项技能直到回合结束'; - if(list.length>=5){ - if(event.done){ - prompt2+=' (2/2)'; - } - else{ - prompt2+=' (1/2)'; - } - } - list.push('cancel2'); - player.chooseControl(list).set('prompt',get.translation('yuanjiangfenghuotu')). - set('prompt2',prompt2).set('centerprompt2',true).set('ai',function(evt,player){ - var controls=_status.event.controls; - if(controls.contains('haoshi')){ - var nh=player.countCards('h'); - if(player.hasSkill('reyingzi')){ - if(nh==0) return 'haoshi'; - } - else{ - if(nh<=1) return 'haoshi'; - } - } - if(controls.contains('shelie')){ - return 'shelie'; - } - if(controls.contains('reyingzi')){ - return 'reyingzi'; - } - if(controls.contains('duoshi')){ - return 'duoshi'; - } - return controls.randomGet(); - }); - 'step 2' - if(result.control!='cancel2'){ - player.addTempSkill(result.control); - if(!event.done) player.logSkill('jiahe'); - game.log(player,'获得了技能','【'+get.translation(result.control)+'】'); - if(event.num>=5&&!event.done){ - event.done=true; - event.goto(1); - } - } - } - }, - yuanjiangfenghuotu:{ - unique:true, - forceunique:true, - nopop:true, - mark:true, - intro:{ - content:'cards', - mark:function(dialog,content,player){ - if(content&&content.length){ - dialog.addSmall(content); - } - dialog.addText('
  • 每名吴势力角色的出牌阶段限一次,该角色可以将一张装备牌置于“缘江烽火图”上,称之为“烽火”。
  • 根据“烽火”的数量,所有吴势力角色可于其准备阶段开始时选择并获得其中一个技能直到回合结束:一张以上~英姿;两张以上~好施;三张以上~涉猎;四张以上~度势;五张以上~可额外选择一项。
  • 锁定技,当你受到【杀】或锦囊牌造成的伤害后,你将一张“烽火”置入弃牌堆。',false) - } - } - }, - gzqice:{ - enable:'phaseUse', - usable:1, - audio:"qice", - filter:function(event,player){ - return player.countCards('h')>0 - }, - group:'gzqice_change', - subSkill:{ - change:{ - trigger:{player:'useCardAfter'}, - filter:function(event,player){ - return event.skill=='gzqice_backup'; - }, - silent:true, - content:function(){ - player.mayChangeVice(); - event.skill='gzqice'; - event.trigger('skillAfter'); - } - } - }, - chooseButton:{ - dialog:function(){ - var list=[ - 'taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman', - 'xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying' - ]; - for(var i=0;inum){ - return false; - } - } - else if(info.changeTarget){ - var giveup=true; - var list=game.filterPlayer(function(current){ - return player.canUse(card,current); - }); - for(var i=0;i0&&!players[i].hasSha()){ - juedou=true; - } - if(player.canUse('shunshou',players[i])&&get.attitude(player,players[i])<-1){ - shunshou=true; - } - if(players[i].countCards('j')&&get.attitude(player,players[i])>2){ - guohe=true; - } - } - } - if(juedou&&button.link[2]=='juedou') return 3; - if(guohe&&button.link[2]=='guohe') return 2; - if(shunshou&&button.link[2]=='shunshou') return 1.5; - if(button.link[2]=='wuzhong') return 1; - return 0; - }, - backup:function(links,player){ - return { - filterCard:true, - audio:"qice", - selectCard:-1, - selectTarget:function(){ - var select=get.select(get.info(get.card()).selectTarget); - var nh=_status.event.player.countCards('h'); - if(select[1]>nh){ - select[1]=nh; - } - return select; - }, - filterTarget:function(card,player,target){ - var info=get.info(card); - if(info.changeTarget){ - var targets=[target]; - info.changeTarget(player,targets); - if(targets.length>player.countCards('h')){ - return false; - } - } - return lib.filter.filterTarget(card,player,target); - }, - audio:2, - popname:true, - viewAs:{name:links[0][2]}, - ai1:function(){ - return 1; - } - } - }, - prompt:function(links,player){ - return '将全部手牌当作'+get.translation(links[0][2])+'使用'; - } - }, - ai:{ - order:1, - result:{ - player:function(player){ - var num=0; - var cards=player.getCards('h'); - if(cards.length>=3&&player.hp>=3) return 0; - for(var i=0;i=2; - }, - content:function(){ - 'step 0' - var list=player.storage.gzhuashen.slice(0); - if(!list.length){ - event.finish(); - return; - } - player.chooseButton().set('ai',function(){ - return Math.random()-0.3; - }).set('createDialog',['是否替换一张“化身”?',[list,'character']]); - 'step 1' - if(result.bool){ - player.logSkill('gzhuashen'); - game.log(player,'替换了一张','#g化身'); - lib.skill.gzhuashen.addCharacter(player,_status.characterlist.randomGet(),true); - lib.skill.gzhuashen.removeCharacter(player,result.links[0]); - game.delayx(); - } - } - }, - triggered:{}, - flash:{ - hookTrigger:{ - log:function(player,skill){ - var sources=lib.skill.gzhuashen.getSkillSources(player,skill); - if(sources.length){ - player.flashAvatar('gzhuashen',sources.randomGet()); - player.storage.gzhuashen_removing.add(skill); - } - } - }, - trigger:{player:['useSkillBegin','useCard','respond']}, - silent:true, - filter:function(event,player){ - return event.skill&&lib.skill.gzhuashen.getSkillSources(player,event.skill).length>0; - }, - content:function(){ - lib.skill.gzhuashen_flash.hookTrigger.log(player,trigger.skill); - } - }, - clear:{ - trigger:{player:'phaseAfter'}, - silent:true, - content:function(){ - player.storage.gzhuashen_trigger.length=0; - } - }, - disallow:{ - hookTrigger:{ - block:function(event,player,name,skill){ - for(var i=0;i0){ - return true; - } - } - return false; - } - } - }, - remove:{ - trigger:{player:['useSkillAfter','useCardAfter','respondAfter','triggerAfter','skillAfter']}, - hookTrigger:{ - after:function(event,player){ - if(event._direct&&!player.storage.gzhuashen_removing.contains(event.skill)) return false; - if(lib.skill[event.skill].silent) return false; - return lib.skill.gzhuashen.getSkillSources(player,event.skill).length>0; - } - }, - silent:true, - filter:function(event,player){ - return event.skill&&lib.skill.gzhuashen.getSkillSources(player,event.skill).length>0; - }, - content:function(){ - 'step 0' - if(trigger.name=='trigger'){ - player.storage.gzhuashen_trigger.push([trigger._trigger,trigger.triggername]); - } - var sources=lib.skill.gzhuashen.getSkillSources(player,trigger.skill); - if(sources.length==1){ - event.directresult=sources[0]; - } - else{ - player.chooseButton(true).set('createDialog',['移除一张“化身”牌',[sources,'character']]); - } - 'step 1' - if(!event.directresult&&result&&result.links[0]){ - event.directresult=result.links[0]; - } - var name=event.directresult; - lib.skill.gzhuashen.removeCharacter(player,name); - game.log(player,'移除了化身牌','#g'+get.translation(name)); - } - } - }, - ai:{ - nofrequent:true, - skillTagFilter:function(player,tag,arg){ - if(arg&&player.storage.gzhuashen){ - if(lib.skill.gzhuashen.getSkillSources(player,arg).length>0){ - return true; - } - } - return false; - } - } - }, - gzxiongsuan:{ - limited:true, - audio:'xiongsuan', - enable:'phaseUse', - filterCard:true, - filter:function(event,player){ - return player.countCards('h'); - }, - filterTarget:function(card,player,target){ - return target.sameIdentityAs(player); - }, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - 'step 0' - player.awakenSkill('gzxiongsuan'); - target.damage('nocard'); - 'step 1' - player.draw(3); - var list=[]; - var skills=target.getOriginalSkills(); - for(var i=0;i1){ - player.chooseControl(list).set('prompt','选择一个限定技在回合结束后重置之'); - } - else{ - event.finish(); - } - 'step 2' - target.storage.gzxiongsuan_restore=result.control; - target.addTempSkill('gzxiongsuan_restore','phaseBegin'); - }, - subSkill:{ - restore:{ - trigger:{global:'phaseAfter'}, - silent:true, - content:function(){ - player.restoreSkill(player.storage.gzxiongsuan_restore); - } - } - }, - ai:{ - order:4, - damage:true, - result:{ - target:function(player,target){ - if(target.hp>1){ - var skills=target.getOriginalSkills(); - for(var i=0;i0) return 10; - if(target.hp>=4) return 5; - if(target.hp==3){ - if(player.countCards('h')<=2&&game.hasPlayer(function(current){ - return current.hp<=1&&get.attitude(player,current)<0; - })){ - return 3; - } - } - return 0; - } - } - } - }, - gzsuishi:{ - audio:'suishi', - trigger:{global:'dying'}, - forced:true, - priority:6.5, - check:function(){ - return false; - }, - filter:function(event,player){ - return event.player!=player&&event.parent.name=='damage'&&event.parent.source&&event.parent.source.isFriendOf(player); - }, - content:function(){ - player.draw(); - }, - group:'gzsuishi2' - }, - gzsuishi2:{ - audio:'suishi', - trigger:{global:'dieAfter'}, - forced:true, - filter:function(event,player){ - return event.player.isFriendOf(player); - }, - content:function(){ - player.loseHp(); - } - }, - hongfa_respond:{ - audio:'hongfa', - trigger:{player:'chooseToRespondBegin'}, - direct:true, - filter:function(event,player){ - if(event.responded) return false; - if(!event.filterCard({name:'sha'})) return false; - var zhu=get.zhu(player,'hongfa'); - if(zhu&&zhu.storage.huangjintianbingfu&&zhu.storage.huangjintianbingfu.length>0){ - return true; - } - return false; - }, - content:function(){ - "step 0" - var zhu=get.zhu(player,'hongfa'); - player.chooseCardButton(get.prompt('huangjintianbingfu'),zhu.storage.huangjintianbingfu).set('ai',function(){ - if(_status.event.goon) return 1; - return 0; - }).set('goon',player.countCards('h','sha')==0); - "step 1" - if(result.bool){ - var card=result.links[0]; - trigger.untrigger(); - trigger.responded=true; - trigger.result={bool:true,card:{name:'sha'},cards:[card]}; - var zhu=get.zhu(player,'hongfa'); - zhu.storage.huangjintianbingfu.remove(card); - zhu.syncStorage('huangjintianbingfu'); - zhu.updateMarks('huangjintianbingfu'); - player.logSkill('hongfa_respond'); - } - } - }, - hongfa_use:{ - audio:'hongfa', - enable:'chooseToUse', - filter:function(event,player){ - if(!event.filterCard({name:'sha'},player)) return false; - var zhu=get.zhu(player,'hongfa'); - if(zhu&&zhu.storage.huangjintianbingfu&&zhu.storage.huangjintianbingfu.length>0){ - return true; - } - return false; - }, - chooseButton:{ - dialog:function(event,player){ - var zhu=get.zhu(player,'hongfa'); - return ui.create.dialog('黄巾天兵符',zhu.storage.huangjintianbingfu,'hidden'); - }, - backup:function(links,player){ - return { - filterCard:function(){return false}, - selectCard:-1, - viewAs:{name:'sha'}, - cards:links, - onuse:function(result,player){ - result.cards=lib.skill[result.skill].cards; - var card=result.cards[0]; - var zhu=get.zhu(player,'hongfa'); - zhu.storage.huangjintianbingfu.remove(card); - zhu.syncStorage('huangjintianbingfu'); - zhu.updateMarks('huangjintianbingfu'); - player.logSkill('hongfa_use',result.targets); - } - } - }, - prompt:function(links,player){ - return '选择杀的目标'; - } - }, - ai:{ - respondSha:true, - skillTagFilter:function(player){ - var zhu=get.zhu(player,'hongfa'); - if(zhu&&zhu.storage.huangjintianbingfu&&zhu.storage.huangjintianbingfu.length>0){ - return true; - } - return false; - }, - order:function(){ - return get.order({name:'sha'})-0.1; - }, - result:{ - player:function(player){ - if(player.countCards('h','sha')) return 0; - return 1; - } - } - } - }, - hongfa:{ - audio:2, - init:function(player){ - player.storage.huangjintianbingfu=[]; - }, - derivation:'huangjintianbingfu', - unique:true, - forceunique:true, - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - return player.storage.huangjintianbingfu.length==0; - }, - content:function(){ - player.storage.huangjintianbingfu.addArray(get.cards(get.population('qun'))); - player.syncStorage('huangjintianbingfu'); - player.updateMarks('huangjintianbingfu'); - event.trigger('addCardToStorage'); - }, - ai:{ - threaten:2, - }, - group:'hongfa_hp', - global:['hongfa_use','hongfa_respond'], - subSkill:{ - hp:{ - trigger:{player:'loseHpBefore'}, - filter:function(event,player){ - return player.storage.huangjintianbingfu.length>0; - }, - direct:true, - content:function(){ - 'step 0' - player.chooseCardButton(get.prompt('hongfa'),player.storage.huangjintianbingfu).set('ai',function(){ - return 1; - }); - 'step 1' - if(result.bool){ - var card=result.links[0]; - game.cardsDiscard(card); - player.storage.huangjintianbingfu.remove(card); - player.$throw(card,1000); - player.updateMarks('huangjintianbingfu'); - player.syncStorage('huangjintianbingfu'); - trigger.cancel(); - player.logSkill('hongfa'); - game.delay(); - } - } - } - } - }, - wendao:{ - audio:2, - unique:true, - forceunique:true, - enable:'phaseUse', - filterCard:{color:'red'}, - position:'he', - check:function(card){ - return 6-get.value(card); - }, - filter:function(event,player){ - for(var i=0;i
  • 当你计算群势力角色数时,每一张“天兵”均可视为一名群势力角色。
  • 每当你失去体力时,你可改为将一张“天兵”置入弃牌堆。
  • 与你势力相同的角色可将一张“天兵”当【杀】使用或打出。',false) - } - } - }, - wuxin:{ - // unique:true, - trigger:{player:'phaseDrawBegin'}, - // frequent:'check', - // check:function(event,player){ - // var num=get.population('qun'); - // if(player.hasSkill('huangjintianbingfu')){ - // num+=player.storage.huangjintianbingfu.length; - // } - // return num>event.num; - // }, - audio:2, - content:function(){ - 'step 0' - var num=get.population('qun'); - if(player.hasSkill('huangjintianbingfu')){ - num+=player.storage.huangjintianbingfu.length; - } - player.chooseCardButton(num,true,get.cards(num),'按顺将卡牌置于牌堆顶(先选择的在上)').set('ai',function(button){ - return get.value(button.link); - }); - 'step 1' - if(result.bool){ - var list=result.links.slice(0); - while(list.length){ - ui.cardPile.insertBefore(list.pop(),ui.cardPile.firstChild); - } - } - } - }, - zhangwu:{ - audio:2, - unique:true, - forceunique:true, - ai:{ - threaten:2, - }, - 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, - filter:function(event,player){ - if(player.storage.zhangwu){ - for(var i=0;i
    【武圣】
    将“红色牌”改为“任意牌”
    【咆哮】
    增加描述“你使用的【杀】无视其他角色的防具”
    【龙胆】
    增加描述“你每发动一次‘龙胆’便摸一张牌”
    【烈弓】
    增加描述“你的攻击范围+1”
    【铁骑】
    将“一张明置的武将牌”改为“所有明置的武将牌”
    ", - } - }, - jizhao:{ - derivation:'rerende', - unique:true, - enable:'chooseToUse', - mark:true, - skillAnimation:true, - animationColor:'fire', - init:function(player){ - player.storage.jizhao=false; - }, - filter:function(event,player){ - if(player.storage.jizhao) return false; - if(event.type=='dying'){ - if(player!=event.dying) return false; - return true; - } - return false; - }, - content:function(){ - 'step 0' - player.awakenSkill('jizhao'); - player.storage.jizhao=true; - var num=player.maxHp-player.countCards('h'); - if(num>0){ - player.draw(num); - } - 'step 1' - if(player.hp<2){ - player.recover(2-player.hp); - } - 'step 2' - player.removeSkill('shouyue'); - player.removeSkill('wuhujiangdaqi'); - player.addSkill('rerende'); - }, - ai:{ - order:1, - skillTagFilter:function(player){ - if(player.storage.jizhao) return false; - if(player.hp>0) return false; - }, - save:true, - result:{ - player:10 - }, - }, - intro:{ - content:'limited' - } - }, - gzshoucheng:{ - inherit:'shoucheng', - audio:'shoucheng', - filter:function(event,player){ - if(event.player.countCards('h')) return false; - if(!event.player.isFriendOf(player)) return false; - if(_status.currentPhase==event.player) return false; - for(var i=0;i0; - }, - content:function(){ - "step 0" - player.chooseCardTarget({ - filterCard:function(card){ - return get.type(card)=='equip'; - }, - position:'he', - filterTarget:function(card,player,target){ - return target.isEmpty(get.subtype(card)); - }, - ai1:function(card){ - return 6-get.value(card); - }, - ai2:function(target){ - return get.attitude(_status.event.player,target)-3; - }, - prompt:get.prompt('yuanhu') - }); - "step 1" - if(result.bool){ - var target=result.targets[0]; - player.logSkill('huyuan',target); - event.current=target; - target.equip(result.cards[0]); - if(target!=player){ - player.$give(result.cards,target); - } - game.delay(2); - player.chooseTarget('弃置一名角色的一张牌',function(card,player,target){ - var source=_status.event.source; - return get.distance(source,target)<=1&&source!=target&&target.countCards('he'); - }).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }).set('source',target); - } - else{ - event.finish(); - } - "step 2" - if(result.bool&&result.targets.length){ - event.current.line(result.targets,'green'); - player.discardPlayerCard(true,result.targets[0],'he'); - } - }, - }, - heyi:{ - zhenfa:'inline', - global:'heyi_distance' - }, - heyi_distance:{ - mod:{ - globalTo:function(from,to,distance){ - if(game.hasPlayer(function(current){ - return current.hasSkill('heyi')&¤t.inline(to)&¤t!=to; - })){ - return distance+1; - } - } - } - }, - tianfu:{ - init:function(player){ - player.checkMainSkill('tianfu'); - }, - mainSkill:true, - inherit:'kanpo', - zhenfa:'inline', - viewAsFilter:function(player){ - return _status.currentPhase.inline(player)&&!player.hasSkill('kanpo')&&player.countCards('h',{color:'black'})>0; - }, - }, - yizhi:{ - init:function(player){ - if(player.checkViceSkill('yizhi')&&!player.viceChanged){ - player.removeMaxHp(); - } - }, - viceSkill:true, - inherit:'guanxing', - filter:function(event,player){ - return !player.hasSkill('guanxing'); - } - }, - gzshangyi:{ - audio:'shangyi', - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterTarget:function(card,player,target){ - return player!=target&&(target.countCards('h')||target.isUnseen(2)); - }, - content:function(){ - "step 0" - target.viewHandcards(player); - "step 1" - if(!target.countCards('h')){ - event._result={index:1}; - } - else if(!target.isUnseen(2)){ - event._result={index:0}; - } - else{ - player.chooseControl().set('choiceList',[ - '观看'+get.translation(target)+'的手牌并可以弃置其中的一张黑色牌', - '观看'+get.translation(target)+'的所有暗置的武将牌', - ]); - } - "step 2" - if(result.index==0){ - player.discardPlayerCard(target,'h').set('filterButton',function(button){ - return get.color(button.link)=='black'; - }).set('visible',true); - } - else{ - player.viewCharacter(target,2); - } - }, - ai:{ - order:11, - result:{ - target:function(player,target){ - return -target.countCards('h'); - } - }, - threaten:1.1 - }, - }, - niaoxiang:{ - zhenfa:'siege', - global:'niaoxiang_sha' - }, - niaoxiang_sha:{ - trigger:{player:'shaBegin'}, - filter:function(event,player){ - if(game.countPlayer()<4) return false; - return player.siege(event.target)&&game.hasPlayer(function(current){ - return current.hasSkill('niaoxiang')&¤t.siege(event.target); - }); - }, - forced:true, - logTarget:'target', - content:function(){ - if(typeof trigger.shanRequired=='number'){ - trigger.shanRequired++; - } - else{ - trigger.shanRequired=2; - } - } - }, - fengshi:{ - audio:2, - zhenfa:'siege', - global:'fengshi_sha' - }, - fengshi_sha:{ - audio:'fengshi', - trigger:{player:'shaBegin'}, - filter:function(event,player){ - if(game.countPlayer()<4) return false; - return player.siege(event.target)&&game.hasPlayer(function(current){ - return current.hasSkill('fengshi')&¤t.siege(event.target); - })&&event.target.countCards('e'); - }, - logTarget:'target', - content:function(){ - trigger.target.chooseToDiscard('e',true); - } - }, - gzguixiu:{ - audio:'guixiu', - trigger:{player:['showCharacterAfter','removeCharacterBefore']}, - filter:function(event,player){ - if(event.name=='removeCharacter') return event.toRemove=='gz_mifuren'&&player.isDamaged(); - return event.toShow.contains('gz_mifuren'); - }, - content:function(){ - if(trigger.name=='showCharacter'){ - player.draw(2); - } - else{ - player.recover(); - } - }, - }, - gzcunsi:{ - derivation:'gzyongjue', - enable:'phaseUse', - audio:'cunsi', - filter:function(event,player){ - return player.checkMainSkill('gzcunsi',false)||player.checkViceSkill('gzcunsi',false); - }, - unique:true, - forceunique:true, - filterTarget:true, - skillAnimation:true, - content:function(){ - 'step 0' - if(player.checkMainSkill('gzcunsi',false)){ - player.removeCharacter(0); - } - else{ - player.removeCharacter(1); - } - 'step 1' - target.addSkill('gzyongjue'); - if(target!=player){ - target.draw(2); - } - }, - ai:{ - order:9, - result:{ - player:function(player,target){ - var num=0; - if(player.isDamaged()&&target.isFriendOf(player)){ - num++; - if(target.hasSkill('kanpo')) num+=0.5; - if(target.hasSkill('liegong')) num+=0.5; - if(target.hasSkill('tieji')) num+=0.5; - if(target.hasSkill('gzrende')) num+=1.2; - if(target.hasSkill('longdan')) num+=1.2; - if(target.hasSkill('paoxiao')) num+=1.2; - if(target.hasSkill('zhangwu')) num+=1.5; - if(target!=player) num+=0.5; - } - return num; - } - } - } - }, - gzyongjue:{ - audio:'yongjue', - trigger:{global:'useCardAfter'}, - filter:function(event,player){ - if(event.gzyongjue==player){ - for(var i=0;i0&&event.source&&event.source.isUnseen(2); - }, - content:function(){ - trigger.num--; - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing',false,target)) return; - if(!player.isUnseen(2)) return; - var num=get.tag(card,'damage'); - if(num){ - if(num>1) return 0.5; - return 0; - } - } - } - }, - }, - hunshang:{ - init:function(player){ - if(player.checkViceSkill('hunshang')&&!player.viceChanged){ - player.removeMaxHp(); - } - }, - group:['hunshang_yingzi','hunshang_yinghun'], - }, - hunshang_yingzi:{ - inherit:'yingzi', - filter:function(event,player){ - return player.hp<=1&&!player.hasSkill('yingzi'); - } - }, - hunshang_yinghun:{ - inherit:'gzyinghun', - filter:function(event,player){ - return player.hp<=1&&player.isDamaged()&&!player.hasSkill('gzyinghun'); - } - }, - yingyang:{ - trigger:{player:'compare',target:'compare'}, - filter:function(event){ - return !event.iwhile; - }, - direct:true, - content:function(){ - 'step 0' - player.chooseControl('点数+3','点数-3','cancel2').set('prompt',get.prompt('yingyang')).set('ai',function(){ - if(_status.event.small) return 1; - else return 0; - }).set('small',trigger.small); - 'step 1' - if(result.index!=2){ - player.logSkill('yingyang'); - if(result.index==0){ - game.log(player,'拼点牌点数+3'); - if(player==trigger.player){ - trigger.num1+=3; - } - else{ - trigger.num2+=3; - } - } - else{ - game.log(player,'拼点牌点数-3'); - if(player==trigger.player){ - trigger.num1-=3; - } - else{ - trigger.num2-=3; - } - } - } - - } - }, - gzqianxi:{ - audio:'qianxi', - trigger:{player:'phaseBegin'}, - content:function(){ - "step 0" - player.judge(); - "step 1" - event.color=result.color; - player.chooseTarget(function(card,player,target){ - return player!=target&&get.distance(player,target)<=1; - },true).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }); - "step 2" - if(result.bool&&result.targets.length){ - result.targets[0].storage.qianxi2=event.color; - result.targets[0].addSkill('qianxi2'); - player.line(result.targets,'green'); - game.addVideo('storage',result.targets[0],['qianxi2',event.color]); - } - }, - }, - gzduanchang:{ - audio:'duanchang', - trigger:{player:'dieBegin'}, - forced:true, - filter:function(event,player){ - return event.source&&event.source.isIn()&&event.source!=player&& - (event.source.hasMainCharacter()||event.source.hasViceCharacter()); - }, - content:function(){ - 'step 0' - if(!trigger.source.hasViceCharacter()){ - event._result={control:'主将'} - } - else if(!trigger.source.hasMainCharacter()){ - event._result={control:'副将'} - } - else{ - player.chooseControl('主将','副将',function(){ - return Math.random()<0.5?'主将':'副将'; - }).set('prompt','令'+get.translation(trigger.source)+'失去一张武将牌的所有技能'); - } - 'step 1' - var skills; - if(result.control=='主将'){ - trigger.source.showCharacter(0); - game.broadcastAll(function(player){ - player.node.avatar.classList.add('disabled'); - },trigger.source); - skills=lib.character[trigger.source.name][3]; - game.log(trigger.source,'失去了主将技能'); - } - else{ - trigger.source.showCharacter(1); - game.broadcastAll(function(player){ - player.node.avatar2.classList.add('disabled'); - },trigger.source); - skills=lib.character[trigger.source.name2][3]; - game.log(trigger.source,'失去了副将技能'); - } - var list=[]; - for(var i=0;i2) return 0; - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; - if(!ui.selected.cards.length&&card.name=='du') return 20; - var player=get.owner(card); - if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ - if(ui.selected.cards.length){ - return -1; - } - var players=game.filterPlayer(); - for(var i=0;i=3&& - get.attitude(players[i],player)>=3){ - return 11-get.value(card); - } - } - if(player.countCards('h')>player.hp) return 10-get.value(card); - if(player.countCards('h')>2) return 6-get.value(card); - return -1; - } - return 10-get.value(card); - }, - content:function(){ - target.gain(cards,player); - if(typeof player.storage.gzrende!='number'){ - player.storage.gzrende=0; - } - if(player.storage.gzrende>=0){ - player.storage.gzrende+=cards.length; - if(player.storage.gzrende>=3){ - player.recover(); - player.storage.gzrende=-1; - } - } - }, - ai:{ - order:function(skill,player){ - if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ - return 1; - } - return 10; - }, - result:{ - target:function(player,target){ - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - return -10; - } - if(target.hasJudge('lebu')) return 0; - var nh=target.countCards('h'); - var np=player.countCards('h'); - if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ - if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; - } - return Math.max(1,5-nh); - } - }, - effect:{ - target:function(card,player,target){ - if(player==target&&get.type(card)=='equip'){ - if(player.countCards('e',{subtype:get.subtype(card)})){ - var players=game.filterPlayer(); - for(var i=0;i0){ - return 0; - } - } - } - } - } - }, - threaten:0.8 - } - }, - gzrende1:{ - trigger:{player:'phaseUseBegin'}, - silent:true, - content:function(){ - player.storage.gzrende=0; - } - }, - gzzhiheng:{ - inherit:'zhiheng', - audio:'zhiheng', - selectCard:function(){ - var player=_status.event.player; - var range1=[1,player.maxHp]; - if(player.hasSkill('dinglanyemingzhu_skill')){ - for(var i=0;i=0) return 0; - if(player.hasCard(function(card){ - return get.tag(card,'damage')&&player.canUse(card,target,true,true); - })){ - if(target.maxHp>3) return -0.5; - return -1; - } - return 0; - } - } - } - }, - qingcheng_ai:{ - ai:{ - effect:{ - target:function(card){ - if(get.tag(card,'damage')) return 2; - } - } - } - }, - duoshi:{ - enable:'chooseToUse', - viewAs:{name:'yiyi'}, - usable:4, - filterCard:{color:'red'}, - viewAsFilter:function(player){ - return player.countCards('h',{color:'red'})>0; - }, - check:function(card){ - return 5-get.value(card); - } - }, - gzxiaoguo:{ - inherit:'xiaoguo', - audio:'xiaoguo', - content:function(){ - "step 0" - var nono=(Math.abs(get.attitude(player,trigger.player))<3); - if(get.damageEffect(trigger.player,player,player)<=0){ - nono=true; - } - var next=player.chooseToDiscard(get.prompt('gzxiaoguo',trigger.player),{type:'basic'}); - next.set('ai',function(card){ - if(_status.event.nono) return 0; - return 8-get.useful(card); - }); - next.set('logSkill',['gzxiaoguo',trigger.player]); - next.set('nono',nono); - "step 1" - if(result.bool){ - var nono=(get.damageEffect(trigger.player,player,trigger.player)>=0); - trigger.player.chooseToDiscard('弃置一张装备牌,或受到一点伤害','he',{type:'equip'}).set('ai',function(card){ - if(_status.event.nono){ - return 0; - } - if(_status.event.player.hp==1) return 10-get.value(card); - return 9-get.value(card); - }).set('nono',nono); - } - else{ - event.finish(); - } - "step 2" - if(!result.bool){ - trigger.player.damage(); - } - }, - }, - _mingzhi1:{ - trigger:{player:'phaseBeginStart'}, - priority:19, - forced:true, - popup:false, - content:function(){ - "step 0" - var choice=1; - for(var i=0;i=2||(popu==1&&game.players.length<=4)){ - return Math.random()<0.5?3:(Math.random()<0.5?2:1); - } - if(choice==0) return 0; - if(get.population(group)>0&&player.wontYe()){ - return Math.random()<0.2?(Math.random()<0.5?3:(Math.random()<0.5?2:1)):0; - } - var nming=0; - for(var i=0;i=2||(popu==1&&game.players.length<=4)){ - return true; - } - if(get.population(group)>0&&player.wontYe()){ - return Math.random()<0.2?true:false; - } - var nming=0; - for(var i=0;ievent.maxHp) player.recover(player.maxHp-event.maxHp); - } - }, - _zhenfazhaohuan:{ - enable:'phaseUse', - usable:1, - getConfig:function(player,target){ - var config={}; - var skills=player.getSkills(); - for(var i=0;i=num){ - break; - } - } - } - else{ - if(!map[lib.character[list[i]][1]]){ - group=lib.character[list[i]][1]; - choice.push(list[i]); - list.splice(i--,1); - } - } - } - } - return choice; - }, - getState:function(){ - var state={}; - for(var i in lib.playerOL){ - var player=lib.playerOL[i]; - state[i]={ - identity:player.identity, - shown:player.ai.shown, - }; - } - return state; - }, - updateState:function(state){ - for(var i in state){ - var player=lib.playerOL[i]; - if(player){ - player.identity=state[i].identity; - player.ai.shown=state[i].shown; - } - } - }, - getRoomInfo:function(uiintro){ - var num,last; - if(lib.configOL.initshow_draw=='off'){ - num='关闭' - } - else{ - num={mark:'标记',draw:'摸牌'}[lib.configOL.initshow_draw]; - } - uiintro.add('
    首亮奖励:'+num); - uiintro.add('
    珠联璧合:'+(lib.configOL.zhulian?'开启':'关闭')); - uiintro.add('
    出牌时限:'+lib.configOL.choose_timeout+'秒'); - uiintro.add('
    国战牌堆:'+(lib.configOL.guozhanpile?'开启':'关闭')); - uiintro.add('
    鏖战模式:'+(lib.configOL.aozhan?'开启':'关闭')); - uiintro.add('
    观看下家副将:'+(lib.configOL.viewnext?'开启':'关闭')); - last=uiintro.add('
    国战武将:'+(lib.configOL.onlyguozhan?'开启':'关闭')); - if(!lib.configOL.onlyguozhan){ - // uiintro.add('
    屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); - // last=uiintro.add('
    屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')); - if(lib.configOL.banned.length){ - last=uiintro.add('
    禁用武将:'+get.translation(lib.configOL.banned)); - } - if(lib.configOL.bannedcards.length){ - last=uiintro.add('
    禁用卡牌:'+get.translation(lib.configOL.bannedcards)); - } - } - last.style.paddingBottom='8px'; - }, - addRecord:function(bool){ - if(typeof bool=='boolean'){ - var data=lib.config.gameRecord.guozhan.data; - var identity=game.me.identity; - if(!data[identity]){ - data[identity]=[0,0]; - } - if(bool){ - data[identity][0]++; - } - else{ - data[identity][1]++; - } - var list=lib.group.slice(0); - list.add('ye'); - var str=''; - for(var i=0;i'; - } - } - lib.config.gameRecord.guozhan.str=str; - game.saveConfig('gameRecord',lib.config.gameRecord); - } - }, - getIdentityList:function(player){ - if(!player.isUnseen()) return; - if(player==game.me) return; - var list={ - wei:'魏', - shu:'蜀', - wu:'吴', - qun:'群', - ye:'野', - unknown:'猜' - } - var num=Math.floor((game.players.length+game.dead.length)/2); - var noye=true; - if(get.population('wei')>=num){ - delete list.wei; - noye=false; - } - if(get.population('shu')>=num){ - delete list.shu; - noye=false; - } - if(get.population('wu')>=num){ - delete list.wu; - noye=false; - } - if(get.population('qun')>=num){ - delete list.qun; - noye=false; - } - if(noye){ - delete list.ye; - } - return list; - }, - getIdentityList2:function(list){ - for(var i in list){ - switch(i){ - case 'unknown':list[i]='未知';break; - case 'ye':list[i]='野心家';break; - case 'qun':list[i]+='雄';break; - default:list[i]+='国'; - } - } - }, - getVideoName:function(){ - var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2); - var str2=get.cnNumber(parseInt(get.config('player_number')))+'人'+ - get.translation(lib.config.mode); - if(game.me.identity=='ye'){ - str2+=' - 野心家'; - } - var name=[str,str2]; - return name; - }, - showIdentity:function(started){ - if(game.phaseNumber==0&&!started) return; - for(var i=0;i1){ - check=false; - } - } - else{ - if(hasunknown&&!game.hasPlayer(function(current){ - return get.is.jun(current); - })){ - var players=game.players.concat(game.dead); - var num=0; - for(var i=0;iplayers.length/2){ - check=false; - } - } - } - } - if(check){ - game.checkResult(); - } - else if(!hasunknown){ - var ids=[]; - var idmap={}; - var idp={}; - for(var i=0;i1&&idmap[id2]>1) return; - if(idmap[id1]>1&&id1=='ye') return; - if(idmap[id2]>1&&id2=='ye') return; - if(idmap[id1]==1){ - idp[id1].showGiveup(); - } - if(idmap[id2]==1){ - idp[id2].showGiveup(); - } - } - }, - checkResult:function(){ - _status.overing=true; - for(var i=0;i0; - }, - chooseCharacter:function(){ - var next=game.createEvent('chooseCharacter',false); - next.showConfig=true; - next.addPlayer=true; - next.ai=function(player,list,back){ - if(_status.brawl&&_status.brawl.chooseCharacterAi){ - if(_status.brawl.chooseCharacterAi(player,list,back)!==false){ - return; - } - } - for(var i=0;i'; - td.link=i-1; - seats.appendChild(td); - td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ - if(_status.dragged) return; - if(_status.justdragged) return; - if(_status.cheat_seat){ - _status.cheat_seat.classList.remove('bluebg'); - if(_status.cheat_seat==this){ - delete _status.cheat_seat; - return; - } - } - this.classList.add('bluebg'); - _status.cheat_seat=this; - }); - } - dialog.content.appendChild(seats); - if(game.me==game.zhu){ - seats.previousSibling.style.display='none'; - seats.style.display='none'; - } - - dialog.add(ui.create.div('.placeholder.add-setting')); - dialog.add(ui.create.div('.placeholder.add-setting')); - if(get.is.phoneLayout()) dialog.add(ui.create.div('.placeholder.add-setting')); - }; - var removeSetting=function(){ - var dialog=_status.event.dialog; - if(dialog){ - dialog.style.height=''; - delete dialog._scrollset; - var list=Array.from(dialog.querySelectorAll('.add-setting')); - while(list.length){ - list.shift().remove(); - } - ui.update(); - } - }; - event.addSetting=addSetting; - event.removeSetting=removeSetting; - - var chosen=lib.config.continue_name||[]; - game.saveConfig('continue_name'); - event.chosen=chosen; - - var i; - event.list=[]; - for(i in lib.character){ - if(i.indexOf('gz_shibing')==0) continue; - if(chosen.contains(i)) continue; - if(lib.filter.characterDisabled(i)) continue; - if(get.config('onlyguozhan')){ - if(!lib.characterPack.mode_guozhan[i]) continue; - if(get.is.jun(i)) continue; - } - if(lib.character[i][2]==3||lib.character[i][2]==4||lib.character[i][2]==5) - event.list.push(i); - } - _status.characterlist=event.list.slice(0); - _status.yeidentity=[]; - if(_status.brawl&&_status.brawl.chooseCharacterFilter){ - event.list=_status.brawl.chooseCharacterFilter(event.list); - } - event.list.randomSort(); - // var list=event.list.splice(0,parseInt(get.config('choice_num'))); - var list; - if(_status.brawl&&_status.brawl.chooseCharacter){ - list=_status.brawl.chooseCharacter(event.list,game.me); - } - else{ - list=game.getCharacterChoice(event.list,parseInt(get.config('choice_num'))); - } - if(_status.auto){ - event.ai(game.me,list); - lib.init.onfree(); - } - else if(chosen.length){ - game.me.init(chosen[0],chosen[1],false); - lib.init.onfree(); - } - else{ - var dialog=ui.create.dialog('选择角色','hidden',[list,'character']); - if(!_status.brawl||!_status.brawl.noAddSetting){ - if(get.config('change_identity')){ - addSetting(dialog); - } - } - var next=game.me.chooseButton(dialog,true,2).set('onfree',true); - next.filterButton=function(button){ - if(ui.dialog.buttons.length<=10){ - for(var i=0;ilist.length){ - num=5; - } - else if(lib.configOL.number*7>list.length){ - num=6; - } - else{ - num=7; - } - var filterButton=function(button){ - if(ui.dialog){ - if(ui.dialog.buttons.length<=10){ - for(var i=0;i0; + }, + content:function(){ + 'step 0' + event.num=trigger.num; + 'step 1' + event.num--; + player.logSkill('enyuan_damage',trigger.source); + trigger.source.chooseCard('交给'+get.translation(player)+'一张手牌,或失去一点体力','h').set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.getParent().player)>0) return 11-get.value(card); + return 7-get.value(card); + }); + 'step 2' + if(result.bool){ + player.gain(result.cards[0],trigger.source); + trigger.source.$give(1,player); + } + else trigger.source.loseHp(); + if(event.num>0) event.goto(1); + }, + audio:'enyuan2', + }, + } + }, + + "new_jushou":{ + audio:"jushou", + trigger:{ + player:"phaseEnd", + }, + content:function (){ + 'step 0' + event.num=game.countGroup(); + player.draw(event.num); + if(event.num>2) player.turnOver(); + 'step 1' + player.chooseCard('h',true,'弃置一张手牌,若以此法弃置的是装备牌,则你改为使用之').set('ai',function(card){ + if(get.type(card)=='equip'){ + return 5-get.value(card); + } + return -get.value(card); + }).set('filterCard',lib.filter.cardDiscardable); + 'step 2' + if(result.bool&&result.cards.length){ + if(get.type(result.cards[0])=='equip'&&player.canEquip(result.cards[0],true)){ + player.$give(result.cards,player); + player.lose(result.cards,ui.special); + event.toequip=result.cards[0]; + } + else{ + player.discard(result.cards[0]); + } + } + 'step 3' + if(event.toequip){ + game.delay(); + } + 'step 4' + if(event.toequip){ + player.equip(event.toequip); + } + }, + ai:{ + effect:{ + target:function (card,player,target){ + if(card.name=='guiyoujie') return [0,1]; + }, + }, + }, + }, + "new_duanliang":{ + subSkill:{ + off:{ + sub:true, + }, + }, + mod:{ + targetInRange:function (card,player,target){ + if(card.name=='bingliang'){ + return true; + } + }, + }, + audio:"duanliang1", + enable:"chooseToUse", + filterCard:function (card){ + if(get.type(card)!='basic'&&get.type(card)!='equip') return false; + return get.color(card)=='black'; + }, + filter:function (event,player){ + if(player.hasSkill('new_duanliang_off')) return false; + return player.countCards('he',{type:['basic','equip'],color:'black'}) + }, + position:"he", + viewAs:{ + name:"bingliang", + }, + onuse:function (result,player){ + if(get.distance(player,result.targets[0])>2) player.addTempSkill('new_duanliang_off'); + }, + prompt:"将一黑色的基本牌或装备牌当兵粮寸断使用", + check:function (card){return 6-get.value(card)}, + ai:{ + order:9, + basic:{ + order:1, + useful:1, + value:4, + }, + result:{ + target:function (player,target){ + if(target.hasJudge('caomu')) return 0; + return -1.5/Math.sqrt(target.countCards('h')+1); + }, + }, + tag:{ + skip:"phaseDraw", + }, + }, + }, + "new_shushen":{ + audio:"shushen", + trigger:{ + player:"recoverAfter", + }, + direct:true, + content:function (){ + 'step 0' + event.num=trigger.num||1; + "step 1" + player.chooseTarget(get.prompt2('new_shushen'),function(card,player,target){ + return target!=player; + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + "step 2" + if(result.bool){ + player.logSkill('new_shushen',result.targets); + result.targets[0].draw(); + if(event.num>1){ + event.num--; + event.goto(1); + } + } + }, + ai:{ + threaten:0.8, + expose:0.1, + }, + }, + "new_fenji":{ + audio:"fenji", + trigger:{ + global:"phaseAfter", + }, + filter:function (event,player){ + if(event.player.countCards('h')==0&&event.player.isAlive()) return true; + return false; + }, + check:function (event,player){ + return get.attitude(player,event.player)>2; + }, + content:function (){ + player.line(trigger.player,'green'); + trigger.player.draw(2); + player.loseHp(); + }, + }, + "new_luanji":{ + audio:"luanji", + enable:"phaseUse", + viewAs:{ + name:"wanjian", + }, + filterCard:function (card,player){ + if(!player.storage.new_luanji) return true; + return !player.storage.new_luanji.contains(get.suit(card)); + }, + selectCard:2, + check:function (card){ + var player=_status.event.player; + var targets=game.filterPlayer(function(current){ + return player.canUse('wanjian',current); + }); + var num=0; + for(var i=0;i=7){ + if(num<2) return 0; + } + else if(targets.length>=5){ + if(num<1.5) return 0; + } + } + return 6-get.value(card); + }, + group:["new_luanji_count","new_luanji_reset","new_luanji_respond"], + subSkill:{ + reset:{ + trigger:{ + player:"phaseAfter", + }, + silent:true, + filter:function (event,player){ + return player.storage.new_luanji?true:false; + }, + content:function (){ + delete player.storage.new_luanji; + }, + sub:true, + forced:true, + popup:false, + }, + count:{ + trigger:{ + player:"useCard", + }, + silent:true, + filter:function (event){ + return event.skill=='new_luanji'; + }, + content:function (){ + if(!player.storage.new_luanji){ + player.storage.new_luanji=[]; + } + for(var i=0;i=0) return 0; + if(player.hasCard(function(card){ + return get.tag(card,'damage')&&player.canUse(card,target,true,true); + })){ + if(target.maxHp>3) return -0.5; + return -1; + } + return 0; + }, + }, + }, + }, + "new_kongcheng":{ + init:function (player){ + if(player.storage.new_kongcheng==undefined) player.storage.new_kongcheng=[]; + }, + group:["new_kongcheng_gain","new_kongcheng_got"], + subSkill:{ + gain:{ + audio:"kongcheng", + trigger:{ + player:"gainEnd", + }, + filter:function (event,player){ + return event.source&&event.source!=player&&event.cards.length==player.countCards('h')&&player!=_status.currentPhase; + }, + content:function (){ + player.storage.new_kongcheng=player.storage.new_kongcheng.concat(player.getCards('h')); + player.markSkill('new_kongcheng'); + game.addVideo('storage',player,['new_kongcheng',get.cardsInfo(player.storage.new_kongcheng),'cards']); + player.lose(player.getCards('h'),ui.special,'toStorage'); + }, + sub:true, + forced:true, + }, + got:{ + trigger:{ + player:"phaseDrawBegin", + }, + filter:function (event,player){ + return player.storage.new_kongcheng.length>0; + }, + content:function (){ + player.gain(player.storage.new_kongcheng,'draw','fromStorage'); + player.storage.new_kongcheng=[]; + game.addVideo('storage',player,['new_kongcheng',get.cardsInfo(player.storage.new_kongcheng),'cards']); + player.unmarkSkill('new_kongcheng'); + }, + sub:true, + forced:true, + }, + }, + audio:"kongcheng", + trigger:{ + target:"useCardToBefore", + }, + forced:true, + priority:15, + check:function (event,player){ + return get.effect(event.target,event.card,event.player,player)<0; + }, + filter:function (event,player){ + return player.countCards('h')==0&&(event.card.name=='sha'||event.card.name=='juedou'); + }, + content:function (){ + trigger.cancel(); + }, + ai:{ + effect:{ + target:function (card,player,target,current){ + if(target.countCards('h')==0&&(card.name=='sha'||card.name=='juedou')) return 'zeroplayertarget'; + }, + }, + }, + intro:{ + mark:function (dialog,content,player){ + if(content&&content.length){ + if(player==game.me||player.isUnderControl()){ + dialog.addAuto(content); + } + else{ + return '共有'+get.cnNumber(content.length)+'张牌'; + } + } + }, + content:function (content,player){ + if(content&&content.length){ + if(player==game.me||player.isUnderControl()){ + return get.translation(content); + } + return '共有'+get.cnNumber(content.length)+'张牌'; + } + }, + }, + }, + "new_keji":{ + audio:"keji", + group:["new_keji_count","new_keji_reset","new_keji_judge"], + subSkill:{ + reset:{ + trigger:{ + player:"phaseEnd", + }, + priority:1, + silent:true, + content:function (){ + player.storage.keji_type=[]; + player.storage.keji_color=[]; + player.storage.keji_suit=[]; + }, + sub:true, + forced:true, + popup:false, + }, + count:{ + trigger:{ + player:"useCard", + }, + silent:true, + content:function (){ + if(!player.storage.keji_type){ + player.storage.keji_type=[]; + } + if(!player.storage.keji_color){ + player.storage.keji_color=[]; + } + if(!player.storage.keji_suit){ + player.storage.keji_suit=[]; + } + player.storage.keji_type.add(get.type(trigger.card)); + player.storage.keji_color.add(get.color(trigger.card)); + player.storage.keji_suit.add(get.suit(trigger.card)); + }, + sub:true, + forced:true, + popup:false, + }, + judge:{ + audio:"keji", + forced:true, + trigger:{ + player:"phaseDiscardBefore", + }, + filter:function (event,player){ + return !player.storage.keji_color||player.storage.keji_color.length<2; + }, + content:function (){ + player.addTempSkill('keji_add','phaseAfter'); + }, + sub:true, + }, + }, + }, + "keji_add":{ + mod:{ + maxHandcard:function (player,num){ + return num+4; + }, + }, + }, + "new_mouduan":{ + trigger:{ + player:"phaseEnd", + }, + priority:2, + audio:"qinxue", + filter:function (event,player){ + if(player.storage.keji_suit&&player.storage.keji_suit.length>3) return true; + if(player.storage.keji_type&&player.storage.keji_type.length>2) return true; + return false; + }, + check:function(event,player){ + return player.canMoveCard(true); + }, + content:function (){ + player.moveCard(); + }, + }, + "new_longdan":{ + group:["new_longdan_sha","new_longdan_shan","new_longdan_draw","new_longdan_shamiss","new_longdan_shanafter"], + subSkill:{ + shanafter:{ + sub:true, + audio:"reyajiao", + trigger:{ + player:"respond", + }, + priority:1, + filter:function (event,player){ + return event.skill=='new_longdan_shan'&&event.getParent(2).name=='sha'; + }, + direct:true, + content:function (){ + "step 0" + player.chooseTarget("是否发动【龙胆】令一名其他角色回复1点体力?",function(card,player,target){ + return target!=trigger.source&&target!=player&&target.isDamaged(); + }).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + "step 1" + if(result.bool&&result.targets&&result.targets.length){ + player.line(result.targets[0],'green'); + result.targets[0].recover(); + } + }, + }, + shamiss:{ + sub:true, + audio:"reyajiao", + trigger:{ + player:"shaMiss", + }, + direct:true, + filter:function (event,player){ + return event.skill=='new_longdan_sha'; + }, + content:function (){ + "step 0" + player.chooseTarget("是否发动【龙胆】对一名其他角色造成1点伤害?",function(card,player,target){ + return target!=trigger.target&&target!=player; + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }); + "step 1" + if(result.bool&&result.targets&&result.targets.length){ + player.line(result.targets[0],'green'); + result.targets[0].damage(); + } + }, + }, + draw:{ + trigger:{ + player:["useCard","respond"], + }, + priority:2, + forced:true, + popup:false, + filter:function (event,player){ + if(!get.zhu(player,'shouyue')) return false; + return event.skill=='new_longdan_sha'||event.skill=='new_longdan_shan'; + }, + content:function (){ + player.draw(); + //player.storage.fanghun2++; + }, + sub:true, + }, + sha:{ + audio:"longdan_sha", + enable:["chooseToUse","chooseToRespond"], + filterCard:{ + name:"shan", + }, + viewAs:{ + name:"sha", + }, + viewAsFilter:function (player){ + if(!player.countCards('h','shan')) return false; + }, + prompt:"将一张闪当杀使用或打出", + check:function (){return 1}, + ai:{ + effect:{ + target:function (card,player,target,current){ + if(get.tag(card,'respondSha')&¤t<0) return 0.6 + }, + }, + respondSha:true, + skillTagFilter:function (player){ + if(!player.countCards('h','shan')) return false; + }, + order:function (){ + return get.order({name:'sha'})+0.1; + }, + }, + sub:true, + }, + shan:{ + audio:"longdan_shan", + enable:["chooseToRespond"], + filterCard:{ + name:"sha", + }, + viewAs:{ + name:"shan", + }, + prompt:"将一张杀当闪打出", + check:function (){return 1}, + viewAsFilter:function (player){ + if(!player.countCards('h','sha')) return false; + }, + ai:{ + respondShan:true, + skillTagFilter:function (player){ + if(!player.countCards('h','sha')) return false; + }, + effect:{ + target:function (card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0) return 0.6 + }, + }, + }, + sub:true, + }, + }, + }, + "new_paoxiao":{ + audio:"paoxiao", + trigger:{ + player:"useCard", + }, + filter:function (event,player){ + if(_status.currentPhase!=player) return false; + return event.card.name=='sha'&&(get.cardCount({name:'sha'},player)==2); + }, + forced:true, + content:function (){ + player.draw(); + }, + mod:{ + cardUsable:function (card,player,num){ + if(card.name=='sha') return Infinity; + }, + }, + ai:{ + unequip:true, + skillTagFilter:function (player,tag,arg){ + if(!get.zhu(player,'shouyue')) return false; + if(arg&&arg.name=='sha') return true; + return false; + }, + }, + }, + "new_kurou":{ + audio:"rekurou", + enable:"phaseUse", + usable:1, + filterCard:true, + check:function (card){ + return 8-get.value(card); + }, + position:"he", + content:function (){ + player.loseHp(); + player.draw(3); + player.addTempSkill('kurou_effect','phaseAfter'); + }, + ai:{ + order:8, + result:{ + player:function (player){ + if(player.hp<=2) return player.countCards('h')==0?1:0; + if(player.countCards('h',{name:'sha',color:'red'})) return 1; + return player.countCards('h')<=player.hp?1:0; + }, + }, + }, + }, + "kurou_effect":{ + mod:{ + cardUsable:function (card,player,num){ + if(card.name=='sha') return num+1; + }, + }, + }, + "new_chuli":{ + audio:"chulao", + enable:"phaseUse", + usable:1, + filterTarget:function (card,player,target){ + if(player==target) return false; + for(var i=0;i0; + }, + filter:function (event,player){ + return player.countCards('he')>0; + }, + filterCard:true, + position:"he", + selectTarget:[1,3], + check:function (card){ + if(get.suit(card)=='spade') return 8-get.value(card); + return 5-get.value(card); + }, + content:function (){ + "step 0" + if(num==0&&get.suit(cards[0])=='spade') player.draw(); + player.choosePlayerCard(targets[num],'he',true); + "step 1" + if(result.bool){ + if(result.links.length) targets[num].discard(result.links[0]); + if(get.suit(result.links[0])=='spade') targets[num].draw(); + } + }, + ai:{ + result:{ + target:-1, + }, + threaten:1.2, + order:3, + }, + }, + "baka_hunshang":{ + skillAnimation:true, + audio:"hunshang", + derivation:["reyingzi","gzyinghun"], + viceSkill:true, + init:function (player){ + if(player.checkViceSkill('baka_hunshang')&&!player.viceChanged){ + player.removeMaxHp(); + } + }, + trigger:{ + player:"phaseBegin", + }, + filter:function (event,player){ + return player.hp<=1; + }, + forced:true, + //priority:3, + content:function (){ + player.addTempSkill('baka_yingzi','phaseAfter'); + player.addTempSkill('baka_yinghun','phaseAfter'); + }, + ai:{ + threaten:function (player,target){ + if(target.hp==1) return 2; + return 0.5; + }, + maixie:true, + effect:{ + target:function (card,player,target){ + if(!target.hasFriend()) return; + if(get.tag(card,'damage')==1&&target.hp==2&&!target.isTurnedOver()&& + _status.currentPhase!=target&&get.distance(_status.currentPhase,target,'absolute')<=3) return [0.5,1]; + }, + }, + }, + }, + "baka_yinghun":{ + inherit:"gzyinghun", + filter:function (event,player){ + return player.isDamaged(); + }, + //priority:2, + audio:"yinghun", + audioname:["sunce"], + trigger:{ + player:"phaseBegin", + }, + direct:true, + content:function (){ + "step 0" + player.chooseTarget(get.prompt2('gzyinghun'),function(card,player,target){ + return player!=target; + }).set('ai',function(target){ + var player=_status.event.player; + if(player.maxHp-player.hp==1&&target.countCards('he')==0){ + return 0; + } + if(get.attitude(_status.event.player,target)>0){ + return 10+get.attitude(_status.event.player,target); + } + if(player.maxHp-player.hp==1){ + return -1; + } + return 1; + }); + "step 1" + if(result.bool){ + event.num=player.maxHp-player.hp; + player.logSkill(event.name,result.targets); + event.target=result.targets[0]; + if(event.num==1){ + event.directcontrol=true; + } + else{ + var str1='摸'+get.cnNumber(event.num,true)+'弃一'; + var str2='摸一弃'+get.cnNumber(event.num,true); + player.chooseControl(str1,str2,function(event,player){ + return _status.event.choice; + }).set('choice',get.attitude(player,event.target)>0?str1:str2); + event.str=str1; + } + } + else{ + event.finish(); + } + "step 2" + if(event.directcontrol||result.control==event.str){ + event.target.draw(event.num); + event.target.chooseToDiscard(true,'he'); + } + else{ + event.target.draw(); + event.target.chooseToDiscard(event.num,true,'he'); + } + }, + ai:{ + threaten:function (player,target){ + if(target.hp==target.maxHp) return 0.5; + if(target.hp==1) return 2; + if(target.hp==2) return 1.5; + return 0.5; + }, + maixie:true, + effect:{ + target:function (card,player,target){ + if(target.maxHp<=3) return; + if(get.tag(card,'damage')){ + if(target.hp==target.maxHp) return [0,1]; + } + if(get.tag(card,'recover')&&player.hp>=player.maxHp-1) return [0,0]; + }, + }, + }, + }, + "baka_yingzi":{ + mod:{ + maxHandcard:function (player,num){ + if(!player.hasSkill('reyingzi')&&player.hp0) + }, + content:function (){ + "step 0" + event.cards=get.cards(2); + "step 1" + if(event.cards.length>1){ + player.chooseCardButton('将“遗计”牌分配给任意角色',true,event.cards,[1,event.cards.length]).set('ai',function(button){ + if(ui.selected.buttons.length==0) return 1; + return 0; + }); + } + else if(event.cards.length==1){ + event._result={links:event.cards.slice(0),bool:true}; + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + for(var i=0;i0){ + return att/(1+target.countCards('h')); + } + else{ + return att/100; + } + }).set('enemy',get.value(event.togive[0])<0); + } + "step 3" + if(result.targets.length){ + result.targets[0].gain(event.togive,'draw'); + player.line(result.targets[0],'green'); + game.log(result.targets[0],'获得了'+get.cnNumber(event.togive.length)+'张牌'); + event.goto(1); + } + }, + ai:{ + maixie:true, + "maixie_hp":true, + effect:{ + target:function (card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(!target.hasFriend()) return; + var num=1; + if(get.attitude(player,target)>0){ + if(player.needsToDiscard()){ + num=0.7; + } + else{ + num=0.5; + } + } + if(target.hp>=4) return [1,num*2]; + if(target.hp==3) return [1,num*1.5]; + if(target.hp==2) return [1,num*0.5]; + } + }, + }, + }, + }, + "new_jieming":{ + audio:"jieming", + trigger:{ + player:"damageEnd", + }, + direct:true, + content:function (){ + "step 0" + player.chooseTarget(get.prompt('new_jieming'),'令一名角色将手牌补至X张(X为其体力上限且至多为5)',function(card,player,target){ + return target.countCards('h')2){ + return Math.min(5,target.maxHp)-target.countCards('h'); + } + return att/3; + }); + "step 1" + if(result.bool){ + player.logSkill('new_jieming',result.targets); + for(var i=0;i1){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + var max=0; + var players=game.filterPlayer(); + for(var i=0;i0){ + max=Math.max(Math.min(5,players[i].hp)-players[i].countCards('h'),max); + } + } + switch(max){ + case 0:return 2; + case 1:return 1.5; + case 2:return [1,2]; + default:return [0,max]; + } + } + if((card.name=='tao'||card.name=='caoyao')&& + target.hp>1&&target.countCards('h')<=target.hp) return [0,0]; + }, + }, + }, + }, + "new_fangzhu":{ + audio:"fangzhu", + trigger:{ + player:"damageEnd", + }, + direct:true, + content:function (){ + "step 0" + player.chooseTarget(get.prompt2('new_fangzhu'),function(card,player,target){ + return player!=target + }).ai=function(target){ + if(target.hasSkillTag('noturn')) return 0; + var player=_status.event.player; + if(get.attitude(_status.event.player,target)==0) return 0; + if(get.attitude(_status.event.player,target)>0){ + if(target.classList.contains('turnedover')) return 1000-target.countCards('h'); + if(player.maxHp-player.hp<3) return -1; + return 100-target.countCards('h'); + } + else{ + if(target.classList.contains('turnedover')) return -1; + if(player.maxHp-player.hp>=3) return -1; + return 1+target.countCards('h'); + } + } + "step 1" + if(result.bool){ + player.logSkill('new_fangzhu',result.targets); + event.target=result.targets[0] + 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); + }).set('prompt','弃置一张手牌并失去一点体力;或选择不弃置,将武将牌翻面并摸'+(player.maxHp-player.hp)+'张牌。'); + } + else event.finish(); + "step 2" + if(result.bool){ + event.target.loseHp(); + } + else{ + event.target.draw(player.maxHp-player.hp); + event.target.turnOver(); + } + }, + ai:{ + maixie:true, + "maixie_hp":true, + effect:{ + target:function (card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; + if(target.hp<=1) return; + if(!target.hasFriend()) return; + var hastarget=false; + var turnfriend=false; + var players=game.filterPlayer(); + for(var i=0;i0&&players[i].isTurnedOver()){ + hastarget=true; + turnfriend=true; + } + } + if(get.attitude(player,target)>0&&!hastarget) return; + if(turnfriend||target.hp==target.maxHp) return [0.5,1]; + if(target.hp>1) return [1,0.5]; + } + }, + }, + }, + }, + "fengyin_main":{ + init:function (player,skill){ + var skills=lib.character[player.name1][3]; + for(var i=0;i0){ + if(controls.length==1) event._result={control:controls[0]}; + else{ + player.chooseControl(controls).set('ai',function(){ + var choice='主将'; + var skills=lib.character[target.name2][3]; + for(var i=0;i1?2:0; + return 8-get.value(card); + }).set('num',num).set('suit',suit); + "step 4" + if(!result.bool){ + trigger.directHit=true; + } + }, + }, + hmkyuanyu:{ + trigger:{ + player:"damageBegin", + }, + forced:true, + filter:function (event,player){ + if(event.num<=0||!event.source) return false; + var n1=player.getNext(); + var p1=player.getPrevious(); + if(event.source!=n1&&event.source!=p1) return true; + }, + content:function (){ + trigger.cancel(); + }, + ai:{ + effect:{ + target:function (card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return; + if(player==target.getNext()||player==target.getPrevious()) return; + var num=get.tag(card,'damage'); + if(num){ + return 0; + } + }, + }, + }, + }, + hmkguishu:{ + group:["hmkguishu_reset"], + subSkill:{ + reset:{ + sub:true, + silent:true, + forced:true, + popup:false, + trigger:{ + player:"phaseBefore", + }, + content:function (){ + player.storage.hmkguishu=0; + }, + }, + }, + enable:"phaseUse", + filter:function (event,player){ + return player.countCards('h',{suit:'spade'})>0; + }, + init:function (player){ + player.storage.hmkguishu=0; + }, + chooseButton:{ + dialog:function (event,player){ + var list=['yuanjiao','zhibi']; + for(var i=0;i2) return 1; + return 0; + } + }, + backup:function (links,player){ + return { + filterCard:function (card,player){ + return get.suit(card)=='spade'; + }, + position:"h", + selectCard:1, + popname:true, + ai:function(card){ + return 6-ai.get.value(card); + }, + viewAs:{name:links[0][2]}, + onuse:function(result,player){ + player.logSkill('hmkguishu'); + if(result.card.name=='yuanjiao') player.storage.hmkguishu=1; + else player.storage.hmkguishu=2; + }, + } + }, + prompt:function (links,player){ + return '将一张手牌当作'+get.translation(links[0][2])+'使用'; + }, + }, + ai:{ + order:4, + result:{ + player:function (player){ + return 2; + }, + }, + threaten:1.6, + }, + }, + "new_buqu":{ + audio:"buqu", + trigger:{ + player:"dieBefore", + }, + forced:true, + filter:function (event,player){return player.maxHp>0&&player.hp<=0}, + content:function (){ + "step 0" + event.card=get.cards()[0]; + if(player.storage.new_buqu==undefined) player.storage.new_buqu=[]; + player.storage.new_buqu.push(event.card); + player.syncStorage('new_buqu'); + player.showCards(player.storage.new_buqu,'不屈') + player.markSkill('new_buqu'); + "step 1" + for(var i=0;i1; + }, + content:function (){ + var target=player.getNext(); + player.viewCharacter(target,1); + }, + }, + aozhan:{ + mod:{ + cardEnabled:function (card,player){ + if(_status.event.skill==undefined&&get.owner(card)!=undefined&&card.name=='tao') return false; + }, + cardUsable:function (card,player){ + if(_status.event.skill==undefined&&get.owner(card)!=undefined&&card.name=='tao') return false; + }, + cardRespondable:function (card,player){ + if(_status.event.skill==undefined&&get.owner(card)!=undefined&&card.name=='tao') return false; + }, + cardSavable:function (card,player){ + if(_status.event.skill==undefined&&get.owner(card)!=undefined&&card.name=='tao') return false; + }, + }, + group:["aozhan_sha","aozhan_shan"], + subSkill:{ + sha:{ + enable:["chooseToUse","chooseToRespond"], + filterCard:{ + name:"tao", + }, + viewAs:{ + name:"sha", + }, + viewAsFilter:function (player){ + if(!player.countCards('h','tao')) return false; + }, + prompt:"将一张桃当杀使用或打出", + check:function (){return 1}, + ai:{ + effect:{ + target:function (card,player,target,current){ + if(get.tag(card,'respondSha')&¤t<0) return 0.6 + }, + }, + respondSha:true, + skillTagFilter:function (player){ + if(!player.countCards('h','tao')) return false; + }, + order:function (){ + return get.order({name:'sha'})-0.1; + }, + }, + sub:true, + }, + shan:{ + enable:["chooseToRespond"], + filterCard:{ + name:"tao", + }, + viewAs:{ + name:"shan", + }, + prompt:"将一张桃当闪打出", + check:function (){return 1}, + viewAsFilter:function (player){ + if(!player.countCards('h','tao')) return false; + }, + ai:{ + respondShan:true, + skillTagFilter:function (player){ + if(!player.countCards('h','tao')) return false; + }, + effect:{ + target:function (card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0) return 0.6 + }, + }, + }, + sub:true, + }, + }, + }, + _aozhan_judge:{ + trigger:{ + player:"phaseBefore", + }, + forced:true, + priority:22, + filter:function (event,player){ + if(get.mode()!='guozhan') return false; + if(_status.connectMode&&!lib.configOL.aozhan) return false; + else if(!_status.connectMode&&!get.config('aozhan')) return false; + if(_status._aozhan) return false; + if(game.players.length>4) return false; + if(game.players.length>3&&game.players.length+game.dead.length<=7) return false; + for(var i=0;i1) return false; + } + return true; + }, + content:function (){ + var color=get.groupnature(player.group,"raw"); + if(player.isUnseen()) color='fire'; + player.$fullscreenpop('鏖战模式',color); + game.broadcastAll(function(){ + _status._aozhan=true; + ui.aozhan=ui.create.div('.touchinfo.left',ui.window); + ui.aozhan.innerHTML='鏖战模式'; + if(ui.time3) ui.time3.style.display='none'; + game.playBackgroundMusic(); + }); + game.countPlayer(function(current){current.addSkill('aozhan')}); + }, + }, + "xianqu_skill":{ + enable:"phaseUse", + filter:function (event,player){ + return player.countCards('h')<4; + }, + usable:1, + mark:true, + intro:{ + content:"◇出牌阶段,你可以弃置此标记,然后将手牌摸至四张并观看一名其他角色的一张武将牌。", + }, + content:function (){ + "step 0" + player.draw(4-player.countCards('h')); + player.chooseTarget('是否观看一名其他角色的一张暗置武将牌?',function(card,player,target){ + return target!=player&&target.isUnseen(2); + }).set('ai',function(target){ + if(target.isUnseen()){ + var next=_status.event.player.getNext(); + if (target!=next) return 10; + return 9; + } + return -get.attitude(_status.event.player,target); + }); + "step 1" + if(result.bool){ + event.target=result.targets[0]; + player.line(event.target,'green'); + var controls=[]; + if(event.target.isUnseen(0)) controls.push('主将'); + if(event.target.isUnseen(1)) controls.push('副将'); + if(controls.length>1){ + player.chooseControl(controls); + } + if(controls.length==0) event.finish(); + } + else{ + player.removeSkill('xianqu_skill'); + event.finish(); + } + "step 2" + if(result.control){ + if(result.control=='主将'){ + player.viewCharacter(event.target,0); + } + else{ + player.viewCharacter(event.target,1); + } + } + else if(target.isUnseen(0)){ + player.viewCharacter(event.target,0); + } + else{ + player.viewCharacter(event.target,1); + } + player.removeSkill('xianqu_skill'); + }, + ai:{ + order:1, + result:{ + player:2, + }, + }, + }, + "zhulianbihe_skill":{ + group:["zhulianbihe_skill_draw","zhulianbihe_skill_tao"], + mark:true, + intro:{ + content:"◇出牌阶段,你可以弃置此标记 然后摸两张牌。
    ◇你可以将此标记当做【桃】使用。", + }, + }, + "yinyang_skill":{ + group:["yinyang_skill_draw","yinyang_skill_add"], + mark:true, + intro:{ + content:"◇出牌阶段,你可以弃置此标记,然后摸一张牌。
    ◇弃牌阶段,你可以弃置此标记,然后本回合手牌上限+2。", + }, + }, + "zhulianbihe_skill_draw":{ + enable:"phaseUse", + usable:1, + content:function (){ + player.draw(2); + player.removeSkill('zhulianbihe_skill'); + }, + ai:{ + order:function (item,player){ + var cards=player.getCards('h'); + if(player.hp>=3){ + if(cards.length>=3){ + for(var i=0;i=1) return 7.2; + } + return 1; + } + else return 7.2; + } + if(player.hp=2){ + if(cards.length<2){ + for(var i=0;i=1) return 7.2; + } + return 1; + } + } + return 1; + }, + result:{ + player:2, + }, + }, + }, + "zhulianbihe_skill_tao":{ + enable:"chooseToUse", + viewAs:{ + name:"tao", + }, + filterCard:function (){return false}, + selectCard:-1, + precontent:function (){ + player.removeSkill('zhulianbihe_skill'); + }, + ai:{ + save:true, + respondTao:true, + }, + }, + "yinyang_skill_draw":{ + enable:"phaseUse", + usable:1, + content:function (){ + player.draw(); + player.removeSkill('yinyang_skill'); + }, + ai:{ + order:function (item,player){ + if(player.countCards('h')player.getHandcardLimit()) return 0; + return 1; + }, + }, + }, + }, + "yinyang_skill_add":{ + trigger:{ + player:"phaseDiscardBefore", + }, + filter:function (event,player){ + return player.needsToDiscard(); + }, + prompt:"是否弃置【阴阳鱼】标记,使本回合的手牌上限+2?", + content:function (){ + player.addTempSkill('yinyang_add','phaseAfter'); + player.removeSkill('yinyang_skill'); + }, + }, + "yinyang_add":{ + mod:{ + maxHandcard:function (player,num){ + return num+2; + }, + }, + }, + /*----分界线----*/ + _lianheng:{ + mode:['guozhan'], + enable:'phaseUse', + usable:1, + prompt:'将至多三张可合纵的牌交给一名与你势力不同的角色,或未确定势力的角色,若你交给与你势力不同的角色,则你摸等量的牌', + filter:function(event,player){ + return (player.getCards('h',function(card){ + return card.hasTag('lianheng'); + }).length); + }, + filterCard:function(card){ + return card.hasTag('lianheng'); + }, + filterTarget:function(card,player,target){ + if(target==player) return false; + if(player.isUnseen()) return target.isUnseen(); + if(player.identity=='ye') return true; + return target.identity!=player.identity; + }, + selectCard:[1,3], + prepare:'give', + discard:false, + // delay:0.5, + content:function(){ + "step 0" + target.gain(cards,player); + "step 1" + if(!target.isUnseen()){ + player.draw(cards.length); + } + }, + ai:{ + basic:{ + order:2 + }, + result:{ + player:function(player,target){ + if(target.isUnseen()) return 0; + if(player.isMajor()) return 0; + return 0.5; + }, + target:function(player,target){ + if(target.isUnseen()) return 0; + return 1; + } + }, + } + }, + qianhuan:{ + group:['qianhuan_add','qianhuan_use'], + init:function(player){ + player.storage.qianhuan=[]; + }, + intro:{ + content:'cards' + }, + ai:{ + threaten:1.8 + }, + audio:2, + subSkill:{ + add:{ + trigger:{global:'damageEnd'}, + filter:function(event,player){ + var suits=[]; + for(var i=0;i=3){ + goon=false; + } + } + else if(trigger.card.name=='guohe'){ + if(trigger.target.countCards('he')>=3||!trigger.target.countCards('h')){ + goon=false; + } + } + else if(trigger.card.name=='shuiyanqijunx'){ + if(trigger.target.countCards('e')<=1||trigger.target.hp>=3){ + goon=false; + } + } + else if(get.tag(trigger.card,'damage')&&trigger.target.hp>=3){ + goon=false; + } + } + player.chooseButton().set('goon',goon).set('ai',function(button){ + if(_status.event.goon) return 1; + return 0; + }).set('createDialog',[get.prompt('qianhuan'),'
    移去一张“千幻”牌令'+ + get.translation(trigger.player)+'对'+get.translation(trigger.target)+'的'+get.translation(trigger.card)+'失效
    ',player.storage.qianhuan]); + 'step 1' + if(result.bool){ + var card=result.links[0]; + player.storage.qianhuan.remove(card); + if(player.storage.qianhuan.length){ + player.updateMarks('qianhuan'); + } + else{ + player.unmarkSkill('qianhuan'); + } + game.cardsDiscard(card); + player.$throw(card); + player.logSkill('qianhuan',trigger.player); + trigger.cancel(); + } + } + } + } + }, + gzzhiman:{ + audio:'zhiman', + inherit:'zhiman', + content:function(){ + 'step 0' + if(trigger.player.countGainableCards(player,'ej')){ + player.gainPlayerCard(trigger.player,'ej',true); + } + trigger.cancel(); + 'step 1' + if(player.sameIdentityAs(trigger.player)){ + trigger.player.mayChangeVice(); + } + } + }, + gzdiancai:{ + group:['gzdiancai_count','gzdiancai_init'], + audio:2, + trigger:{global:'phaseUseEnd'}, + filter:function(event,player){ + return _status.currentPhase!=player&&player.storage.gzdiancai>=player.hp; + }, + content:function(){ + 'step 0' + var num=player.maxHp-player.countCards('h'); + if(num>0){ + player.draw(num); + } + 'step 1' + player.mayChangeVice(); + }, + subSkill:{ + init:{ + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + return _status.currentPhase!=player; + }, + silent:true, + content:function(){ + player.storage.gzdiancai=0; + } + }, + count:{ + trigger:{player:'loseEnd'}, + silent:true, + filter:function(event,player){ + return _status.currentPhase!=player; + }, + content:function(){ + player.storage.gzdiancai+=trigger.cards.length; + } + } + } + }, + /*diaodu:{ + enable:'phaseUse', + audio:2, + usable:1, + filterTarget:function(card,player,target){ + return player.sameIdentityAs(target); + }, + selectTarget:-1, + content:function(){ + 'step 0' + var use=target.countCards('h',{type:'equip'})>0; + var move=false; + var es=target.getCards('e'); + if(es.length&&target.identity!='ye'){ + move=game.hasPlayer(function(current){ + if(current!=target&&target.identity!=current.identity){ + for(var i=0;i=4; + }); + var vacancies={ + equip1:0, + equip2:0, + equip3:0, + equip4:0, + equip5:0 + }; + for(var i=0;i=3){ + return 1; + } + vacancies[type]--; + } + } + } + if(num&&player.hp==1){ + return 0.5; + } + return 0; + } + } + } + }, + xuanlve:{ + trigger:{player:'loseEnd'}, + direct:true, + filter:function(event,player){ + for(var i=0;i=5){ + return 8-get.value(card); + } + if(num>=3){ + return 7-get.value(card); + } + if(num>=2){ + return 3-get.value(card); + } + return 0; + }, + content:function(){ + 'step 0' + var num=game.countPlayer(function(current){ + if(current.identity=='wu'){ + return current.countCards('e'); + } + })+player.storage.yuanjiangfenghuotu.length; + if(num){ + event.shown=get.cards(num); + player.showCards(event.shown,get.translation('lianzi')); + } + else{ + event.finish(); + return; + } + 'step 1' + var list=[]; + var discards=[]; + var type=get.type(cards[0],'trick'); + for(var i=0;i=3&&player.hasStockSkill('lianzi')){ + player.removeSkill('lianzi'); + player.addSkill('gzzhiheng'); + } + } + }, + ai:{ + order:7, + result:{ + player:1 + } + } + }, + jubao:{ + mod:{ + canBeGained:function(card){ + if(get.position(card)=='e'&&get.subtype(card)=='equip5') return false; + } + }, + trigger:{player:'phaseEnd'}, + audio:2, + forced:true, + unique:true, + filter:function(event,player){ + if(game.hasPlayer(function(current){ + return current.countCards('ej',function(card){ + return card.name=='dinglanyemingzhu'; + }); + })){ + return true; + } + for(var i=0;i0; + }, + content:function(){ + 'step 0' + player.chooseCardButton('将一张“烽火”置入弃牌堆',player.storage.yuanjiangfenghuotu,true); + 'step 1' + if(result.bool){ + player.$throw(result.links); + var card=result.links[0]; + game.cardsDiscard(card); + player.storage.yuanjiangfenghuotu.remove(card); + player.syncStorage('yuanjiangfenghuotu'); + player.updateMarks('yuanjiangfenghuotu'); + } + } + }, + jiahe_put:{ + enable:'phaseUse', + audio:"jiahe", + filter:function(event,player){ + var zhu=get.zhu(player,'jiahe'); + if(zhu&&zhu.storage.yuanjiangfenghuotu){ + return player.countCards('he',{type:'equip'})>0; + } + return false; + }, + filterCard:{type:'equip'}, + position:'he', + usable:1, + check:function(card){ + var zhu=get.zhu(_status.event.player,'jiahe'); + if(!zhu) return 0; + var num=7-get.value(card); + if(get.position(card)=='h'){ + if(zhu.storage.yuanjiangfenghuotu>=5){ + return num-3; + } + return num+3; + } + else{ + var player=_status.event.player; + var zhu=get.zhu(player,'jiahe'); + if(zhu.storage.yuanjiangfenghuotu>=5&&!player.hasSkillTag('noe')){ + return num-5; + } + } + return num; + }, + discard:false, + lose:true, + prepare:function(cards,player){ + var zhu=get.zhu(player,'jiahe'); + player.$give(cards,zhu); + player.line(zhu); + }, + content:function(){ + var zhu=get.zhu(player,'jiahe'); + zhu.storage.yuanjiangfenghuotu.add(cards[0]); + zhu.syncStorage('yuanjiangfenghuotu'); + zhu.updateMarks('yuanjiangfenghuotu'); + event.trigger('addCardToStorage'); + }, + ai:{ + order:1, + result:{ + player:1 + } + } + }, + jiahe_skill:{ + trigger:{player:'phaseBegin'}, + direct:true, + audio:"jiahe", + filter:function(event,player){ + var zhu=get.zhu(player,'jiahe'); + if(zhu&&zhu.storage.yuanjiangfenghuotu&&zhu.storage.yuanjiangfenghuotu.length){ + return true; + } + return false; + }, + content:function(){ + 'step 0' + var zhu=get.zhu(player,'jiahe'); + event.num=zhu.storage.yuanjiangfenghuotu.length; + 'step 1' + var list=[]; + if(event.num>=1&&!player.hasSkill('reyingzi')) list.push('reyingzi'); + if(event.num>=2&&!player.hasSkill('haoshi')) list.push('haoshi'); + if(event.num>=3&&!player.hasSkill('shelie')) list.push('shelie'); + if(event.num>=4&&!player.hasSkill('duoshi')) list.push('duoshi'); + if(!list.length){ + event.finish(); + return; + } + var prompt2='你可以获得下列一项技能直到回合结束'; + if(list.length>=5){ + if(event.done){ + prompt2+=' (2/2)'; + } + else{ + prompt2+=' (1/2)'; + } + } + list.push('cancel2'); + player.chooseControl(list).set('prompt',get.translation('yuanjiangfenghuotu')). + set('prompt2',prompt2).set('centerprompt2',true).set('ai',function(evt,player){ + var controls=_status.event.controls; + if(controls.contains('haoshi')){ + var nh=player.countCards('h'); + if(player.hasSkill('reyingzi')){ + if(nh==0) return 'haoshi'; + } + else{ + if(nh<=1) return 'haoshi'; + } + } + if(controls.contains('shelie')){ + return 'shelie'; + } + if(controls.contains('reyingzi')){ + return 'reyingzi'; + } + if(controls.contains('duoshi')){ + return 'duoshi'; + } + return controls.randomGet(); + }); + 'step 2' + if(result.control!='cancel2'){ + player.addTempSkill(result.control); + if(!event.done) player.logSkill('jiahe'); + game.log(player,'获得了技能','【'+get.translation(result.control)+'】'); + if(event.num>=5&&!event.done){ + event.done=true; + event.goto(1); + } + } + } + }, + yuanjiangfenghuotu:{ + unique:true, + forceunique:true, + nopop:true, + mark:true, + intro:{ + content:'cards', + mark:function(dialog,content,player){ + if(content&&content.length){ + dialog.addSmall(content); + } + dialog.addText('
    • 每名吴势力角色的出牌阶段限一次,该角色可以将一张装备牌置于“缘江烽火图”上,称之为“烽火”。
    • 根据“烽火”的数量,所有吴势力角色可于其准备阶段开始时选择并获得其中一个技能直到回合结束:一张以上~英姿;两张以上~好施;三张以上~涉猎;四张以上~度势;五张以上~可额外选择一项。
    • 锁定技,当你受到【杀】或锦囊牌造成的伤害后,你将一张“烽火”置入弃牌堆。',false) + } + } + }, + gzqice:{ + enable:'phaseUse', + usable:1, + audio:"qice", + filter:function(event,player){ + return player.countCards('h')>0 + }, + group:'gzqice_change', + subSkill:{ + change:{ + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + return event.skill=='gzqice_backup'; + }, + silent:true, + content:function(){ + player.mayChangeVice(); + event.skill='gzqice'; + event.trigger('skillAfter'); + } + } + }, + chooseButton:{ + dialog:function(){ + var list=[ + 'taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman', + 'xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying' + ]; + for(var i=0;inum){ + return false; + } + } + else if(info.changeTarget){ + var giveup=true; + var list=game.filterPlayer(function(current){ + return player.canUse(card,current); + }); + for(var i=0;i0&&!players[i].hasSha()){ + juedou=true; + } + if(player.canUse('shunshou',players[i])&&get.attitude(player,players[i])<-1){ + shunshou=true; + } + if(players[i].countCards('j')&&get.attitude(player,players[i])>2){ + guohe=true; + } + } + } + if(juedou&&button.link[2]=='juedou') return 3; + if(guohe&&button.link[2]=='guohe') return 2; + if(shunshou&&button.link[2]=='shunshou') return 1.5; + if(button.link[2]=='wuzhong') return 1; + return 0; + }, + backup:function(links,player){ + return { + filterCard:true, + audio:"qice", + selectCard:-1, + selectTarget:function(){ + var select=get.select(get.info(get.card()).selectTarget); + var nh=_status.event.player.countCards('h'); + if(select[1]>nh){ + select[1]=nh; + } + return select; + }, + filterTarget:function(card,player,target){ + var info=get.info(card); + if(info.changeTarget){ + var targets=[target]; + info.changeTarget(player,targets); + if(targets.length>player.countCards('h')){ + return false; + } + } + return lib.filter.filterTarget(card,player,target); + }, + audio:2, + popname:true, + viewAs:{name:links[0][2]}, + ai1:function(){ + return 1; + } + } + }, + prompt:function(links,player){ + return '将全部手牌当作'+get.translation(links[0][2])+'使用'; + } + }, + ai:{ + order:1, + result:{ + player:function(player){ + var num=0; + var cards=player.getCards('h'); + if(cards.length>=3&&player.hp>=3) return 0; + for(var i=0;i=2; + }, + content:function(){ + 'step 0' + var list=player.storage.gzhuashen.slice(0); + if(!list.length){ + event.finish(); + return; + } + player.chooseButton().set('ai',function(){ + return Math.random()-0.3; + }).set('createDialog',['是否替换一张“化身”?',[list,'character']]); + 'step 1' + if(result.bool){ + player.logSkill('gzhuashen'); + game.log(player,'替换了一张','#g化身'); + lib.skill.gzhuashen.addCharacter(player,_status.characterlist.randomGet(),true); + lib.skill.gzhuashen.removeCharacter(player,result.links[0]); + game.delayx(); + } + } + }, + triggered:{}, + flash:{ + hookTrigger:{ + log:function(player,skill){ + var sources=lib.skill.gzhuashen.getSkillSources(player,skill); + if(sources.length){ + player.flashAvatar('gzhuashen',sources.randomGet()); + player.storage.gzhuashen_removing.add(skill); + } + } + }, + trigger:{player:['useSkillBegin','useCard','respond']}, + silent:true, + filter:function(event,player){ + return event.skill&&lib.skill.gzhuashen.getSkillSources(player,event.skill).length>0; + }, + content:function(){ + lib.skill.gzhuashen_flash.hookTrigger.log(player,trigger.skill); + } + }, + clear:{ + trigger:{player:'phaseAfter'}, + silent:true, + content:function(){ + player.storage.gzhuashen_trigger.length=0; + } + }, + disallow:{ + hookTrigger:{ + block:function(event,player,name,skill){ + for(var i=0;i0){ + return true; + } + } + return false; + } + } + }, + remove:{ + trigger:{player:['useSkillAfter','useCardAfter','respondAfter','triggerAfter','skillAfter']}, + hookTrigger:{ + after:function(event,player){ + if(event._direct&&!player.storage.gzhuashen_removing.contains(event.skill)) return false; + if(lib.skill[event.skill].silent) return false; + return lib.skill.gzhuashen.getSkillSources(player,event.skill).length>0; + } + }, + silent:true, + filter:function(event,player){ + return event.skill&&lib.skill.gzhuashen.getSkillSources(player,event.skill).length>0; + }, + content:function(){ + 'step 0' + if(trigger.name=='trigger'){ + player.storage.gzhuashen_trigger.push([trigger._trigger,trigger.triggername]); + } + var sources=lib.skill.gzhuashen.getSkillSources(player,trigger.skill); + if(sources.length==1){ + event.directresult=sources[0]; + } + else{ + player.chooseButton(true).set('createDialog',['移除一张“化身”牌',[sources,'character']]); + } + 'step 1' + if(!event.directresult&&result&&result.links[0]){ + event.directresult=result.links[0]; + } + var name=event.directresult; + lib.skill.gzhuashen.removeCharacter(player,name); + game.log(player,'移除了化身牌','#g'+get.translation(name)); + } + } + }, + ai:{ + nofrequent:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&player.storage.gzhuashen){ + if(lib.skill.gzhuashen.getSkillSources(player,arg).length>0){ + return true; + } + } + return false; + } + } + }, + gzxiongsuan:{ + limited:true, + audio:'xiongsuan', + enable:'phaseUse', + filterCard:true, + filter:function(event,player){ + return player.countCards('h'); + }, + filterTarget:function(card,player,target){ + return target.sameIdentityAs(player); + }, + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + 'step 0' + player.awakenSkill('gzxiongsuan'); + target.damage('nocard'); + 'step 1' + player.draw(3); + var list=[]; + var skills=target.getOriginalSkills(); + for(var i=0;i1){ + player.chooseControl(list).set('prompt','选择一个限定技在回合结束后重置之'); + } + else{ + event.finish(); + } + 'step 2' + target.storage.gzxiongsuan_restore=result.control; + target.addTempSkill('gzxiongsuan_restore','phaseBegin'); + }, + subSkill:{ + restore:{ + trigger:{global:'phaseAfter'}, + silent:true, + content:function(){ + player.restoreSkill(player.storage.gzxiongsuan_restore); + } + } + }, + ai:{ + order:4, + damage:true, + result:{ + target:function(player,target){ + if(target.hp>1){ + var skills=target.getOriginalSkills(); + for(var i=0;i0) return 10; + if(target.hp>=4) return 5; + if(target.hp==3){ + if(player.countCards('h')<=2&&game.hasPlayer(function(current){ + return current.hp<=1&&get.attitude(player,current)<0; + })){ + return 3; + } + } + return 0; + } + } + } + }, + gzsuishi:{ + audio:'suishi', + trigger:{global:'dying'}, + forced:true, + priority:6.5, + check:function(){ + return false; + }, + filter:function(event,player){ + return event.player!=player&&event.parent.name=='damage'&&event.parent.source&&event.parent.source.isFriendOf(player); + }, + content:function(){ + player.draw(); + }, + group:'gzsuishi2' + }, + gzsuishi2:{ + audio:'suishi', + trigger:{global:'dieAfter'}, + forced:true, + filter:function(event,player){ + return event.player.isFriendOf(player); + }, + content:function(){ + player.loseHp(); + } + }, + hongfa_respond:{ + audio:'hongfa', + trigger:{player:'chooseToRespondBegin'}, + direct:true, + filter:function(event,player){ + if(event.responded) return false; + if(!event.filterCard({name:'sha'})) return false; + var zhu=get.zhu(player,'hongfa'); + if(zhu&&zhu.storage.huangjintianbingfu&&zhu.storage.huangjintianbingfu.length>0){ + return true; + } + return false; + }, + content:function(){ + "step 0" + var zhu=get.zhu(player,'hongfa'); + player.chooseCardButton(get.prompt('huangjintianbingfu'),zhu.storage.huangjintianbingfu).set('ai',function(){ + if(_status.event.goon) return 1; + return 0; + }).set('goon',player.countCards('h','sha')==0); + "step 1" + if(result.bool){ + var card=result.links[0]; + trigger.untrigger(); + trigger.responded=true; + trigger.result={bool:true,card:{name:'sha'},cards:[card]}; + var zhu=get.zhu(player,'hongfa'); + zhu.storage.huangjintianbingfu.remove(card); + zhu.syncStorage('huangjintianbingfu'); + zhu.updateMarks('huangjintianbingfu'); + player.logSkill('hongfa_respond'); + } + } + }, + hongfa_use:{ + audio:'hongfa', + enable:'chooseToUse', + filter:function(event,player){ + if(!event.filterCard({name:'sha'},player)) return false; + var zhu=get.zhu(player,'hongfa'); + if(zhu&&zhu.storage.huangjintianbingfu&&zhu.storage.huangjintianbingfu.length>0){ + return true; + } + return false; + }, + chooseButton:{ + dialog:function(event,player){ + var zhu=get.zhu(player,'hongfa'); + return ui.create.dialog('黄巾天兵符',zhu.storage.huangjintianbingfu,'hidden'); + }, + backup:function(links,player){ + return { + filterCard:function(){return false}, + selectCard:-1, + viewAs:{name:'sha'}, + cards:links, + onuse:function(result,player){ + result.cards=lib.skill[result.skill].cards; + var card=result.cards[0]; + var zhu=get.zhu(player,'hongfa'); + zhu.storage.huangjintianbingfu.remove(card); + zhu.syncStorage('huangjintianbingfu'); + zhu.updateMarks('huangjintianbingfu'); + player.logSkill('hongfa_use',result.targets); + } + } + }, + prompt:function(links,player){ + return '选择杀的目标'; + } + }, + ai:{ + respondSha:true, + skillTagFilter:function(player){ + var zhu=get.zhu(player,'hongfa'); + if(zhu&&zhu.storage.huangjintianbingfu&&zhu.storage.huangjintianbingfu.length>0){ + return true; + } + return false; + }, + order:function(){ + return get.order({name:'sha'})-0.1; + }, + result:{ + player:function(player){ + if(player.countCards('h','sha')) return 0; + return 1; + } + } + } + }, + hongfa:{ + audio:2, + init:function(player){ + player.storage.huangjintianbingfu=[]; + }, + derivation:'huangjintianbingfu', + unique:true, + forceunique:true, + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return player.storage.huangjintianbingfu.length==0; + }, + content:function(){ + player.storage.huangjintianbingfu.addArray(get.cards(get.population('qun'))); + player.syncStorage('huangjintianbingfu'); + player.updateMarks('huangjintianbingfu'); + event.trigger('addCardToStorage'); + }, + ai:{ + threaten:2, + }, + group:'hongfa_hp', + global:['hongfa_use','hongfa_respond'], + subSkill:{ + hp:{ + trigger:{player:'loseHpBefore'}, + filter:function(event,player){ + return player.storage.huangjintianbingfu.length>0; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseCardButton(get.prompt('hongfa'),player.storage.huangjintianbingfu).set('ai',function(){ + return 1; + }); + 'step 1' + if(result.bool){ + var card=result.links[0]; + game.cardsDiscard(card); + player.storage.huangjintianbingfu.remove(card); + player.$throw(card,1000); + player.updateMarks('huangjintianbingfu'); + player.syncStorage('huangjintianbingfu'); + trigger.cancel(); + player.logSkill('hongfa'); + game.delay(); + } + } + } + } + }, + wendao:{ + audio:2, + unique:true, + forceunique:true, + enable:'phaseUse', + filterCard:{color:'red'}, + position:'he', + check:function(card){ + return 6-get.value(card); + }, + filter:function(event,player){ + for(var i=0;i
    • 当你计算群势力角色数时,每一张“天兵”均可视为一名群势力角色。
    • 每当你失去体力时,你可改为将一张“天兵”置入弃牌堆。
    • 与你势力相同的角色可将一张“天兵”当【杀】使用或打出。',false) + } + } + }, + wuxin:{ + // unique:true, + trigger:{player:'phaseDrawBegin'}, + // frequent:'check', + // check:function(event,player){ + // var num=get.population('qun'); + // if(player.hasSkill('huangjintianbingfu')){ + // num+=player.storage.huangjintianbingfu.length; + // } + // return num>event.num; + // }, + audio:2, + content:function(){ + 'step 0' + var num=get.population('qun'); + if(player.hasSkill('huangjintianbingfu')){ + num+=player.storage.huangjintianbingfu.length; + } + player.chooseCardButton(num,true,get.cards(num),'按顺将卡牌置于牌堆顶(先选择的在上)').set('ai',function(button){ + return get.value(button.link); + }); + 'step 1' + if(result.bool){ + var list=result.links.slice(0); + while(list.length){ + ui.cardPile.insertBefore(list.pop(),ui.cardPile.firstChild); + } + } + } + }, + zhangwu:{ + audio:2, + unique:true, + forceunique:true, + ai:{ + threaten:2, + }, + 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, + filter:function(event,player){ + if(player.storage.zhangwu){ + for(var i=0;i
      【武圣】
      将“红色牌”改为“任意牌”
      【咆哮】
      增加描述“你使用的【杀】无视其他角色的防具”
      【龙胆】
      增加描述“你每发动一次‘龙胆’便摸一张牌”
      【烈弓】
      增加描述“你的攻击范围+1”
      【铁骑】
      将“一张明置的武将牌”改为“所有明置的武将牌”
    ", + } + }, + jizhao:{ + derivation:'rerende', + unique:true, + enable:'chooseToUse', + mark:true, + skillAnimation:true, + animationColor:'fire', + init:function(player){ + player.storage.jizhao=false; + }, + filter:function(event,player){ + if(player.storage.jizhao) return false; + if(event.type=='dying'){ + if(player!=event.dying) return false; + return true; + } + return false; + }, + content:function(){ + 'step 0' + player.awakenSkill('jizhao'); + player.storage.jizhao=true; + var num=player.maxHp-player.countCards('h'); + if(num>0){ + player.draw(num); + } + 'step 1' + if(player.hp<2){ + player.recover(2-player.hp); + } + 'step 2' + player.removeSkill('shouyue'); + player.removeSkill('wuhujiangdaqi'); + player.addSkill('rerende'); + }, + ai:{ + order:1, + skillTagFilter:function(player){ + if(player.storage.jizhao) return false; + if(player.hp>0) return false; + }, + save:true, + result:{ + player:10 + }, + }, + intro:{ + content:'limited' + } + }, + gzshoucheng:{ + inherit:'shoucheng', + audio:'shoucheng', + filter:function(event,player){ + if(event.player.countCards('h')) return false; + if(!event.player.isFriendOf(player)) return false; + if(_status.currentPhase==event.player) return false; + for(var i=0;i0; + }, + content:function(){ + "step 0" + player.chooseCardTarget({ + filterCard:function(card){ + return get.type(card)=='equip'; + }, + position:'he', + filterTarget:function(card,player,target){ + return target.isEmpty(get.subtype(card)); + }, + ai1:function(card){ + return 6-get.value(card); + }, + ai2:function(target){ + return get.attitude(_status.event.player,target)-3; + }, + prompt:get.prompt2('huyuan') + }); + "step 1" + if(result.bool){ + var target=result.targets[0]; + player.logSkill('huyuan',target); + event.current=target; + target.equip(result.cards[0]); + if(target!=player){ + player.$give(result.cards,target); + } + game.delay(2); + player.chooseTarget('弃置一名角色的一张牌',function(card,player,target){ + var source=_status.event.source; + return get.distance(source,target)<=1&&source!=target&&target.countCards('he'); + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }).set('source',target); + } + else{ + event.finish(); + } + "step 2" + if(result.bool&&result.targets.length){ + event.current.line(result.targets,'green'); + player.discardPlayerCard(true,result.targets[0],'he'); + } + }, + }, + heyi:{ + zhenfa:'inline', + global:'heyi_distance' + }, + heyi_distance:{ + mod:{ + globalTo:function(from,to,distance){ + if(game.hasPlayer(function(current){ + return current.hasSkill('heyi')&¤t.inline(to)&¤t!=to; + })){ + return distance+1; + } + } + } + }, + tianfu:{ + init:function(player){ + player.checkMainSkill('tianfu'); + }, + mainSkill:true, + inherit:'kanpo', + zhenfa:'inline', + viewAsFilter:function(player){ + return _status.currentPhase.inline(player)&&!player.hasSkill('kanpo')&&player.countCards('h',{color:'black'})>0; + }, + }, + yizhi:{ + init:function(player){ + if(player.checkViceSkill('yizhi')&&!player.viceChanged){ + player.removeMaxHp(); + } + }, + viceSkill:true, + inherit:'guanxing', + filter:function(event,player){ + return !player.hasSkill('guanxing'); + } + }, + gzshangyi:{ + audio:'shangyi', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterTarget:function(card,player,target){ + return player!=target&&(target.countCards('h')||target.isUnseen(2)); + }, + content:function(){ + "step 0" + target.viewHandcards(player); + "step 1" + if(!target.countCards('h')){ + event._result={index:1}; + } + else if(!target.isUnseen(2)){ + event._result={index:0}; + } + else{ + player.chooseControl().set('choiceList',[ + '观看'+get.translation(target)+'的手牌并可以弃置其中的一张黑色牌', + '观看'+get.translation(target)+'的所有暗置的武将牌', + ]); + } + "step 2" + if(result.index==0){ + player.discardPlayerCard(target,'h').set('filterButton',function(button){ + return get.color(button.link)=='black'; + }).set('visible',true); + } + else{ + player.viewCharacter(target,2); + } + }, + ai:{ + order:11, + result:{ + target:function(player,target){ + return -target.countCards('h'); + } + }, + threaten:1.1 + }, + }, + niaoxiang:{ + zhenfa:'siege', + global:'niaoxiang_sha' + }, + niaoxiang_sha:{ + trigger:{player:'shaBegin'}, + filter:function(event,player){ + if(game.countPlayer()<4) return false; + return player.siege(event.target)&&game.hasPlayer(function(current){ + return current.hasSkill('niaoxiang')&¤t.siege(event.target); + }); + }, + forced:true, + logTarget:'target', + content:function(){ + if(typeof trigger.shanRequired=='number'){ + trigger.shanRequired++; + } + else{ + trigger.shanRequired=2; + } + } + }, + fengshi:{ + audio:2, + zhenfa:'siege', + global:'fengshi_sha' + }, + fengshi_sha:{ + audio:'fengshi', + trigger:{player:'shaBegin'}, + filter:function(event,player){ + if(game.countPlayer()<4) return false; + return player.siege(event.target)&&game.hasPlayer(function(current){ + return current.hasSkill('fengshi')&¤t.siege(event.target); + })&&event.target.countCards('e'); + }, + logTarget:'target', + content:function(){ + trigger.target.chooseToDiscard('e',true); + } + }, + gzguixiu:{ + audio:'guixiu', + trigger:{player:['showCharacterAfter','removeCharacterBefore']}, + filter:function(event,player){ + if(event.name=='removeCharacter') return event.toRemove=='gz_mifuren'&&player.isDamaged(); + return event.toShow.contains('gz_mifuren'); + }, + content:function(){ + if(trigger.name=='showCharacter'){ + player.draw(2); + } + else{ + player.recover(); + } + }, + }, + gzcunsi:{ + derivation:'gzyongjue', + enable:'phaseUse', + audio:'cunsi', + filter:function(event,player){ + return player.checkMainSkill('gzcunsi',false)||player.checkViceSkill('gzcunsi',false); + }, + unique:true, + forceunique:true, + filterTarget:true, + skillAnimation:true, + content:function(){ + 'step 0' + if(player.checkMainSkill('gzcunsi',false)){ + player.removeCharacter(0); + } + else{ + player.removeCharacter(1); + } + 'step 1' + target.addSkill('gzyongjue'); + if(target!=player){ + target.draw(2); + } + }, + ai:{ + order:9, + result:{ + player:function(player,target){ + var num=0; + if(player.isDamaged()&&target.isFriendOf(player)){ + num++; + if(target.hasSkill('kanpo')) num+=0.5; + if(target.hasSkill('liegong')) num+=0.5; + if(target.hasSkill('tieji')) num+=0.5; + if(target.hasSkill('gzrende')) num+=1.2; + if(target.hasSkill('longdan')) num+=1.2; + if(target.hasSkill('paoxiao')) num+=1.2; + if(target.hasSkill('zhangwu')) num+=1.5; + if(target!=player) num+=0.5; + } + return num; + } + } + } + }, + gzyongjue:{ + audio:'yongjue', + trigger:{global:'useCardAfter'}, + filter:function(event,player){ + if(event.gzyongjue==player){ + for(var i=0;i0&&event.source&&event.source.isUnseen(2); + }, + content:function(){ + trigger.num--; + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return; + if(!player.isUnseen(2)) return; + var num=get.tag(card,'damage'); + if(num){ + if(num>1) return 0.5; + return 0; + } + } + } + }, + }, + hunshang:{ + init:function(player){ + if(player.checkViceSkill('hunshang')&&!player.viceChanged){ + player.removeMaxHp(); + } + }, + group:['hunshang_yingzi','hunshang_yinghun'], + }, + hunshang_yingzi:{ + inherit:'yingzi', + filter:function(event,player){ + return player.hp<=1&&!player.hasSkill('yingzi'); + } + }, + hunshang_yinghun:{ + inherit:'gzyinghun', + filter:function(event,player){ + return player.hp<=1&&player.isDamaged()&&!player.hasSkill('gzyinghun'); + } + }, + yingyang:{ + trigger:{player:'compare',target:'compare'}, + filter:function(event){ + return !event.iwhile; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseControl('点数+3','点数-3','cancel2').set('prompt',get.prompt3('yingyang')).set('ai',function(){ + if(_status.event.small) return 1; + else return 0; + }).set('small',trigger.small); + 'step 1' + if(result.index!=2){ + player.logSkill('yingyang'); + if(result.index==0){ + game.log(player,'拼点牌点数+3'); + if(player==trigger.player){ + trigger.num1+=3; + } + else{ + trigger.num2+=3; + } + } + else{ + game.log(player,'拼点牌点数-3'); + if(player==trigger.player){ + trigger.num1-=3; + } + else{ + trigger.num2-=3; + } + } + } + + } + }, + gzqianxi:{ + audio:'qianxi', + trigger:{player:'phaseBegin'}, + content:function(){ + "step 0" + player.judge(); + "step 1" + event.color=result.color; + player.chooseTarget(function(card,player,target){ + return player!=target&&get.distance(player,target)<=1; + },true).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }); + "step 2" + if(result.bool&&result.targets.length){ + result.targets[0].storage.qianxi2=event.color; + result.targets[0].addSkill('qianxi2'); + player.line(result.targets,'green'); + game.addVideo('storage',result.targets[0],['qianxi2',event.color]); + } + }, + }, + gzduanchang:{ + audio:'duanchang', + trigger:{player:'dieBegin'}, + forced:true, + filter:function(event,player){ + return event.source&&event.source.isIn()&&event.source!=player&& + (event.source.hasMainCharacter()||event.source.hasViceCharacter()); + }, + content:function(){ + 'step 0' + if(!trigger.source.hasViceCharacter()){ + event._result={control:'主将'} + } + else if(!trigger.source.hasMainCharacter()){ + event._result={control:'副将'} + } + else{ + player.chooseControl('主将','副将',function(){ + return Math.random()<0.5?'主将':'副将'; + }).set('prompt','令'+get.translation(trigger.source)+'失去一张武将牌的所有技能'); + } + 'step 1' + var skills; + if(result.control=='主将'){ + trigger.source.showCharacter(0); + game.broadcastAll(function(player){ + player.node.avatar.classList.add('disabled'); + },trigger.source); + skills=lib.character[trigger.source.name][3]; + game.log(trigger.source,'失去了主将技能'); + } + else{ + trigger.source.showCharacter(1); + game.broadcastAll(function(player){ + player.node.avatar2.classList.add('disabled'); + },trigger.source); + skills=lib.character[trigger.source.name2][3]; + game.log(trigger.source,'失去了副将技能'); + } + var list=[]; + for(var i=0;i2) return 0; + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0; + if(!ui.selected.cards.length&&card.name=='du') return 20; + var player=get.owner(card); + if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ + if(ui.selected.cards.length){ + return -1; + } + var players=game.filterPlayer(); + for(var i=0;i=3&& + get.attitude(players[i],player)>=3){ + return 11-get.value(card); + } + } + if(player.countCards('h')>player.hp) return 10-get.value(card); + if(player.countCards('h')>2) return 6-get.value(card); + return -1; + } + return 10-get.value(card); + }, + content:function(){ + target.gain(cards,player); + if(typeof player.storage.gzrende!='number'){ + player.storage.gzrende=0; + } + if(player.storage.gzrende>=0){ + player.storage.gzrende+=cards.length; + if(player.storage.gzrende>=3){ + player.recover(); + player.storage.gzrende=-1; + } + } + }, + ai:{ + order:function(skill,player){ + if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ + return 1; + } + return 10; + }, + result:{ + target:function(player,target){ + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + return -10; + } + if(target.hasJudge('lebu')) return 0; + var nh=target.countCards('h'); + var np=player.countCards('h'); + if(player.hp==player.maxHp||player.storage.gzrende<0||player.countCards('h')+player.storage.gzrende<=2){ + if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; + } + return Math.max(1,5-nh); + } + }, + effect:{ + target:function(card,player,target){ + if(player==target&&get.type(card)=='equip'){ + if(player.countCards('e',{subtype:get.subtype(card)})){ + var players=game.filterPlayer(); + for(var i=0;i0){ + return 0; + } + } + } + } + } + }, + threaten:0.8 + } + }, + gzrende1:{ + trigger:{player:'phaseUseBegin'}, + silent:true, + content:function(){ + player.storage.gzrende=0; + } + }, + gzzhiheng:{ + inherit:'zhiheng', + audio:'zhiheng', + selectCard:function(){ + var player=_status.event.player; + var range1=[1,player.maxHp]; + if(player.hasSkill('dinglanyemingzhu_skill')){ + for(var i=0;i=0) return 0; + if(player.hasCard(function(card){ + return get.tag(card,'damage')&&player.canUse(card,target,true,true); + })){ + if(target.maxHp>3) return -0.5; + return -1; + } + return 0; + } + } + } + }, + qingcheng_ai:{ + ai:{ + effect:{ + target:function(card){ + if(get.tag(card,'damage')) return 2; + } + } + } + }, + duoshi:{ + enable:'chooseToUse', + viewAs:{name:'yiyi'}, + usable:4, + filterCard:{color:'red'}, + viewAsFilter:function(player){ + return player.countCards('h',{color:'red'})>0; + }, + check:function(card){ + return 5-get.value(card); + } + }, + gzxiaoguo:{ + inherit:'xiaoguo', + audio:'xiaoguo', + content:function(){ + "step 0" + var nono=(Math.abs(get.attitude(player,trigger.player))<3); + if(get.damageEffect(trigger.player,player,player)<=0){ + nono=true; + } + var next=player.chooseToDiscard(get.prompt2('gzxiaoguo',trigger.player),{type:'basic'}); + next.set('ai',function(card){ + if(_status.event.nono) return 0; + return 8-get.useful(card); + }); + next.set('logSkill',['gzxiaoguo',trigger.player]); + next.set('nono',nono); + "step 1" + if(result.bool){ + var nono=(get.damageEffect(trigger.player,player,trigger.player)>=0); + trigger.player.chooseToDiscard('弃置一张装备牌,或受到一点伤害','he',{type:'equip'}).set('ai',function(card){ + if(_status.event.nono){ + return 0; + } + if(_status.event.player.hp==1) return 10-get.value(card); + return 9-get.value(card); + }).set('nono',nono); + } + else{ + event.finish(); + } + "step 2" + if(!result.bool){ + trigger.player.damage(); + } + }, + }, + _mingzhi1:{ + trigger:{player:'phaseBeginStart'}, + priority:19, + forced:true, + popup:false, + content:function(){ + "step 0" + var choice=1; + for(var i=0;i=2||(popu==1&&game.players.length<=4)){ + return Math.random()<0.5?3:(Math.random()<0.5?2:1); + } + if(choice==0) return 0; + if(get.population(group)>0&&player.wontYe()){ + return Math.random()<0.2?(Math.random()<0.5?3:(Math.random()<0.5?2:1)):0; + } + var nming=0; + for(var i=0;i=2||(popu==1&&game.players.length<=4)){ + return true; + } + if(get.population(group)>0&&player.wontYe()){ + return Math.random()<0.2?true:false; + } + var nming=0; + for(var i=0;ievent.maxHp) player.recover(player.maxHp-event.maxHp); + } + }, + _zhenfazhaohuan:{ + enable:'phaseUse', + usable:1, + getConfig:function(player,target){ + var config={}; + var skills=player.getSkills(); + for(var i=0;i=num){ + break; + } + } + } + else{ + if(!map[lib.character[list[i]][1]]){ + group=lib.character[list[i]][1]; + choice.push(list[i]); + list.splice(i--,1); + } + } + } + } + return choice; + }, + getState:function(){ + var state={}; + for(var i in lib.playerOL){ + var player=lib.playerOL[i]; + state[i]={ + identity:player.identity, + shown:player.ai.shown, + }; + } + return state; + }, + updateState:function(state){ + for(var i in state){ + var player=lib.playerOL[i]; + if(player){ + player.identity=state[i].identity; + player.ai.shown=state[i].shown; + } + } + }, + getRoomInfo:function(uiintro){ + var num,last; + if(lib.configOL.initshow_draw=='off'){ + num='关闭' + } + else{ + num={mark:'标记',draw:'摸牌'}[lib.configOL.initshow_draw]; + } + uiintro.add('
    首亮奖励:'+num); + uiintro.add('
    珠联璧合:'+(lib.configOL.zhulian?'开启':'关闭')); + uiintro.add('
    出牌时限:'+lib.configOL.choose_timeout+'秒'); + uiintro.add('
    国战牌堆:'+(lib.configOL.guozhanpile?'开启':'关闭')); + uiintro.add('
    鏖战模式:'+(lib.configOL.aozhan?'开启':'关闭')); + uiintro.add('
    观看下家副将:'+(lib.configOL.viewnext?'开启':'关闭')); + last=uiintro.add('
    国战武将:'+(lib.configOL.onlyguozhan?'开启':'关闭')); + if(!lib.configOL.onlyguozhan){ + // uiintro.add('
    屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); + // last=uiintro.add('
    屏蔽强将:'+(lib.configOL.ban_strong?'开启':'关闭')); + if(lib.configOL.banned.length){ + last=uiintro.add('
    禁用武将:'+get.translation(lib.configOL.banned)); + } + if(lib.configOL.bannedcards.length){ + last=uiintro.add('
    禁用卡牌:'+get.translation(lib.configOL.bannedcards)); + } + } + last.style.paddingBottom='8px'; + }, + addRecord:function(bool){ + if(typeof bool=='boolean'){ + var data=lib.config.gameRecord.guozhan.data; + var identity=game.me.identity; + if(!data[identity]){ + data[identity]=[0,0]; + } + if(bool){ + data[identity][0]++; + } + else{ + data[identity][1]++; + } + var list=lib.group.slice(0); + list.add('ye'); + var str=''; + for(var i=0;i'; + } + } + lib.config.gameRecord.guozhan.str=str; + game.saveConfig('gameRecord',lib.config.gameRecord); + } + }, + getIdentityList:function(player){ + if(!player.isUnseen()) return; + if(player==game.me) return; + var list={ + wei:'魏', + shu:'蜀', + wu:'吴', + qun:'群', + ye:'野', + unknown:'猜' + } + var num=Math.floor((game.players.length+game.dead.length)/2); + var noye=true; + if(get.population('wei')>=num){ + delete list.wei; + noye=false; + } + if(get.population('shu')>=num){ + delete list.shu; + noye=false; + } + if(get.population('wu')>=num){ + delete list.wu; + noye=false; + } + if(get.population('qun')>=num){ + delete list.qun; + noye=false; + } + if(noye){ + delete list.ye; + } + return list; + }, + getIdentityList2:function(list){ + for(var i in list){ + switch(i){ + case 'unknown':list[i]='未知';break; + case 'ye':list[i]='野心家';break; + case 'qun':list[i]+='雄';break; + default:list[i]+='国'; + } + } + }, + getVideoName:function(){ + var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2); + var str2=get.cnNumber(parseInt(get.config('player_number')))+'人'+ + get.translation(lib.config.mode); + if(game.me.identity=='ye'){ + str2+=' - 野心家'; + } + var name=[str,str2]; + return name; + }, + showIdentity:function(started){ + if(game.phaseNumber==0&&!started) return; + for(var i=0;i1){ + check=false; + } + } + else{ + if(hasunknown&&!game.hasPlayer(function(current){ + return get.is.jun(current); + })){ + var players=game.players.concat(game.dead); + var num=0; + for(var i=0;iplayers.length/2){ + check=false; + } + } + } + } + if(check){ + game.checkResult(); + } + else if(!hasunknown){ + var ids=[]; + var idmap={}; + var idp={}; + for(var i=0;i1&&idmap[id2]>1) return; + if(idmap[id1]>1&&id1=='ye') return; + if(idmap[id2]>1&&id2=='ye') return; + if(idmap[id1]==1){ + idp[id1].showGiveup(); + } + if(idmap[id2]==1){ + idp[id2].showGiveup(); + } + } + }, + checkResult:function(){ + _status.overing=true; + for(var i=0;i0; + }, + chooseCharacter:function(){ + var next=game.createEvent('chooseCharacter',false); + next.showConfig=true; + next.addPlayer=true; + next.ai=function(player,list,back){ + if(_status.brawl&&_status.brawl.chooseCharacterAi){ + if(_status.brawl.chooseCharacterAi(player,list,back)!==false){ + return; + } + } + for(var i=0;i'; + td.link=i-1; + seats.appendChild(td); + td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ + if(_status.dragged) return; + if(_status.justdragged) return; + if(_status.cheat_seat){ + _status.cheat_seat.classList.remove('bluebg'); + if(_status.cheat_seat==this){ + delete _status.cheat_seat; + return; + } + } + this.classList.add('bluebg'); + _status.cheat_seat=this; + }); + } + dialog.content.appendChild(seats); + if(game.me==game.zhu){ + seats.previousSibling.style.display='none'; + seats.style.display='none'; + } + + dialog.add(ui.create.div('.placeholder.add-setting')); + dialog.add(ui.create.div('.placeholder.add-setting')); + if(get.is.phoneLayout()) dialog.add(ui.create.div('.placeholder.add-setting')); + }; + var removeSetting=function(){ + var dialog=_status.event.dialog; + if(dialog){ + dialog.style.height=''; + delete dialog._scrollset; + var list=Array.from(dialog.querySelectorAll('.add-setting')); + while(list.length){ + list.shift().remove(); + } + ui.update(); + } + }; + event.addSetting=addSetting; + event.removeSetting=removeSetting; + + var chosen=lib.config.continue_name||[]; + game.saveConfig('continue_name'); + event.chosen=chosen; + + var i; + event.list=[]; + for(i in lib.character){ + if(i.indexOf('gz_shibing')==0) continue; + if(chosen.contains(i)) continue; + if(lib.filter.characterDisabled(i)) continue; + if(get.config('onlyguozhan')){ + if(!lib.characterPack.mode_guozhan[i]) continue; + if(get.is.jun(i)) continue; + } + if(lib.character[i][2]==3||lib.character[i][2]==4||lib.character[i][2]==5) + event.list.push(i); + } + _status.characterlist=event.list.slice(0); + _status.yeidentity=[]; + if(_status.brawl&&_status.brawl.chooseCharacterFilter){ + event.list=_status.brawl.chooseCharacterFilter(event.list); + } + event.list.randomSort(); + // var list=event.list.splice(0,parseInt(get.config('choice_num'))); + var list; + if(_status.brawl&&_status.brawl.chooseCharacter){ + list=_status.brawl.chooseCharacter(event.list,game.me); + } + else{ + list=game.getCharacterChoice(event.list,parseInt(get.config('choice_num'))); + } + if(_status.auto){ + event.ai(game.me,list); + lib.init.onfree(); + } + else if(chosen.length){ + game.me.init(chosen[0],chosen[1],false); + lib.init.onfree(); + } + else{ + var dialog=ui.create.dialog('选择角色','hidden',[list,'character']); + if(!_status.brawl||!_status.brawl.noAddSetting){ + if(get.config('change_identity')){ + addSetting(dialog); + } + } + var next=game.me.chooseButton(dialog,true,2).set('onfree',true); + next.filterButton=function(button){ + if(ui.dialog.buttons.length<=10){ + for(var i=0;ilist.length){ + num=5; + } + else if(lib.configOL.number*7>list.length){ + num=6; + } + else{ + num=7; + } + var filterButton=function(button){ + if(ui.dialog){ + if(ui.dialog.buttons.length<=10){ + for(var i=0;i根据“烽火”的数量,所有吴势力角色可于其准备阶段开始时选择并获得其中一个技能直到回合结束:一张以上~英姿;两张以上~好施;三张以上~涉猎;四张以上~度势;五张以上~可额外选择一项。
    锁定技,当你受到【杀】或锦囊牌造成的伤害后,你将一张“烽火”置入弃牌堆。', - yuanjiangfenghuotu_ab:'江图', - yuanjiangfenghuotu_bg:'图', - wuxin:'悟心', - wuxin_info:'摸牌阶段开始时,你可以观看牌堆顶的X张牌(X为群势力角色的数量),然后将这些牌以任意顺序置于牌堆顶', - hongfa:'弘法', - hongfa_use:'天兵', - hongfa_respond:'天兵', - hongfa_info:'君主技,锁定技,当此武将牌明置时,你获得“黄巾天兵符”;准备阶段开始时,若没有“天兵”,你将牌堆顶的X张牌置于“黄巾天兵符”上,称为“天兵”(X为群势力角色的数量)', - wendao:'问道', - wendao_info:'出牌阶段限一次,你可以弃置一张红色牌,获得弃牌堆里或场上的一张【太平要术】', - huangjintianbingfu:'黄巾天兵符', - huangjintianbingfu_ab:'兵符', - huangjintianbingfu_bg:'符', - huangjintianbingfu_info:'锁定技 :当你计算群势力角色数时,每一张“天兵”均可视为一名群势力角色。
    每当你失去体力时,你可改为将一张“天兵”置入弃牌堆。
    与你势力相同的角色可将一张“天兵”当【杀】使用或打出。', - wuhujiangdaqi:'五虎将大旗', - wuhujiangdaqi_ab:'将旗', - wuhujiangdaqi_bg:'旗', - wuhujiangdaqi_info:'存活的蜀势力角色的技能按以下规则改动:
    武圣:将“红色牌”改为“任意牌”
    咆哮:增加描述“你使用的【杀】无视其他角色的防具”
    龙胆:增加描述“你每发动一次‘龙胆’便摸一张牌”
    烈弓:增加描述“你的攻击范围+1”
    铁骑:将“一张明置的武将牌”改为“所有明置的武将牌”', - zhangwu:'章武', - zhangwu_info:'锁定技。当【飞龙夺凤】进入弃牌堆或其他角色的装备区时,你获得之。当你失去【飞龙夺风】时,展示之,然后将此牌置于牌堆底并摸两张牌', - shouyue:'授钺', - shouyue_info:'君主技。只要此武将牌处于明置状态,你便拥有“五虎将大旗”', - jizhao:'激诏', - jizhao_bg:'诏', - jizhao_info:'限定技。当你处于濒死状态时,你可以将手牌补至体力上限,体力回复至2点,失去技能“授钺”并获得技能“仁德”', - gzshoucheng:'守成', - gzshoucheng_info:'当与你势力相同的一名角色于其回合外失去最后手牌时,你可以令其摸一张牌', - gzmingshi:'名士', - gzmingshi_info:'锁定技,当你受到伤害时,若伤害来源有暗置的武将牌,此伤害-1', - fengshi:'锋矢', - fengshi_sha:'锋矢', - fengshi_info:'阵法技,在同一个围攻关系中,若你是围攻角色,则你或另一名围攻角色使用【杀】指定被围攻角色为目标后,可令该角色弃置装备区里的一张牌', - gzsuishi:'随势', - gzsuishi_info:'锁定技,当其他角色进入濒死状态时,若伤害来源与你势力相同,你摸一张牌;当其他角色死亡时,若其与你势力相同,你失去1点体力', - baoling:'暴凌', - baoling_info:'主将技,锁定技,出牌阶段结束时,若你有副将,则你移除副将,然后加3点体力上限,回复3点体力,并获得“崩坏”', - yingyang:'鹰扬', - yingyang_info:'当你拼点的牌亮出后,你可以令此牌的点数+3或-3', - hunshang:'魂殇', - hunshang_info:'副将技,此武将牌减少半个阴阳鱼;准备阶段,若你的体力值不大于1,则你本回合获得“英姿”和“英魂”', - gzguixiu:'闺秀', - gzguixiu_info:'当你明置此武将牌时,你可以摸两张牌;当你移除此武将牌时,你可以回复1点体力', - gzcunsi:'存嗣', - gzcunsi_info:'出牌阶段,你可以移除此武将牌并选择一名角色,然后其获得技能“勇决”,若你没有获得“勇决”,则获得“勇决”的角色摸两张牌', - gzyongjue:'勇决', - gzyongjue_info:'若与你势力相同的一名角色于其回合内使用的第一张牌为【杀】,则该角色可以在此【杀】结算完成后获得之', - gzqianxi:'潜袭', - gzqianxi_info:'准备阶段开始时,你可以进行判定,然后你选择距离为1的一名角色,直到回合结束,该角色不能使用或打出与结果颜色相同的手牌', - gzshangyi:'尚义', - gzshangyi_info:'出牌阶段限一次,你可以令一名其他角色观看你的手牌。若如此做,你选择一项:1.观看其手牌并可以弃置其中的一张黑色牌;2.观看其所有暗置的武将牌', - niaoxiang:'鸟翔', - niaoxiang_sha:'鸟翔', - niaoxiang_info:'阵法技,在同一个围攻关系中,若你是围攻角色,则你或另一名围攻角色使用【杀】指定被围攻角色为目标后,你令该角色需依次使用两张【闪】才能抵消', - yicheng:'疑城', - yicheng_info:'当与你势力相同的一名角色成为【杀】的目标后,你可以令该角色摸一张牌然后弃置一张牌', - yizhi:'遗志', - yizhi_info:'副将技,此武将牌上单独的阴阳鱼个数-1。若你的主将拥有技能“观星”,则将其描述中的X改为5;若你的主将没有技能“观星”,则你拥有技能“观星”', - tianfu:'天覆', - tianfu_info:'主将技,阵法技,若当前回合角色与你处于同一队列,你拥有技能“看破”', - ziliang:'资粮', - ziliang_info:'副将技,当与你势力相同的一名角色受到伤害后,你可以将一张“田”交给该角色', - gzjixi:'急袭', - gzjixi_info:'主将技,此武将牌减少半个阴阳鱼;你可以将一张“田”当【顺手牵羊】使用', - huyuan:'护援', - huyuan_info:'结束阶段开始时,你可以将一张装备牌置入一名角色的装备区,然后你可以弃置该角色距离为1的一名角色的一张牌', - heyi:'鹤翼', - heyi_info:'阵法技,与你处于同一队列的其他角色防御距离+1', - gz_shibing1wei:'魏兵', - gz_shibing2wei:'魏兵', - gz_shibing1shu:'蜀兵', - gz_shibing2shu:'蜀兵', - gz_shibing1wu:'吴兵', - gz_shibing2wu:'吴兵', - gz_shibing1qun:'群兵', - gz_shibing2qun:'群兵', - gzduanchang:'断肠', - gzduanchang_info:'锁定技,当你死亡时,你令杀死你的角色失去一张武将牌的所有技能', - gzweimu:'帷幕', - gzweimu_info:'锁定技,当你成为黑色锦囊牌的目标时,则取消之', - gzqianxun:'谦逊', - gzqianxun_info:'锁定技,当你成为顺手牵羊或乐不思蜀的目标时,则取消之', - gzkongcheng:'空城', - gzkongcheng_info:'锁定技,当你成为【杀】或【决斗】的目标时,若你没有手牌,则取消之', - gzxiaoji:'枭姬', - gzxiaoji_info:'当你失去装备区里的牌后,你可以摸两张牌', - gzrende:'仁德', - gzrende_info:'出牌阶段,你可以将任意张手牌交给其他角色,然后若你于此阶段内给出第三张“仁德”牌时,你回复1点体力', - gzzhiheng:'制衡', - gzzhiheng_info:'出牌阶段限一次,你可以弃置至多X张牌(X为你的体力上限),然后摸等量的牌', - huoshui:'祸水', - huoshui_info:'出牌阶段,你可以明置此武将牌;你的回合内,若此武将牌处于明置状态,其他角色不能明置其武将牌', - qingcheng:'倾城', - qingcheng_info:'出牌阶段,你可以弃置一张装备牌并选择一名两张武将牌均明置的其他角色,你暗置其一张武将牌', - duoshi:'度势', - duoshi_info:'出牌阶段限四次,你可以将一张红色手牌当【以逸待劳】使用。', - gzxiaoguo:'骁果', - gzxiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张基本牌,令该角色选择一项:1.弃置一张装备牌;2.受到你对其造成的1点伤害。', - gzduanliang:'断粮', - gzduanliang_info:'你可以将一张黑色基本牌或黑色装备牌当【兵粮寸断】使用;你可以对距离为2的角色使用【兵粮寸断】', - - guozhan_default:"国战标准", - guozhan_zhen:"君临天下•阵", - guozhan_shi:"君临天下•势", - guozhan_bian:"君临天下•变", - guozhan_quan:"君临天下•权", - guozhan_jun:"君主武将", - guozhan_others:"其他", - }, - junList:['liubei','zhangjiao','sunquan','caocao'], - guozhanPile:[ - ['spade',1,'juedou'], - ['spade',1,'shandian','thunder'], - ['spade',2,'feilongduofeng'], - ['spade',2,'bagua'], - ['spade',2,'hanbing'], - ['spade',3,'guohe'], - ['spade',3,'shunshou'], - ['spade',4,'guohe'], - ['spade',4,'shunshou'], - ['spade',5,'sha'], - ['spade',5,'jueying'], - ['spade',6,'qinggang'], - ['spade',6,'sha','thunder'], - ['spade',7,'sha'], - ['spade',7,'sha','thunder'], - ['spade',8,'sha'], - ['spade',8,'sha'], - ['spade',9,'sha'], - ['spade',9,'jiu'], - ['spade',10,'sha'], - ['spade',10,'bingliang'], - ['spade',11,'sha'], - ['spade',11,'wuxie'], - ['spade',12,'zhangba'], - ['spade',12,'tiesuo'], - ['spade',13,'nanman'], - ['spade',13,'dawan'], - - ['club',1,'juedou'], - ['club',1,'baiyin'], - ['club',2,'sha'], - ['club',2,'tengjia','fire'], - ['club',2,'renwang'], - ['club',3,'sha'], - ['club',3,'zhibi'], - ['club',4,'sha'], - ['club',4,'zhibi'], - ['club',5,'sha'], - ['club',5,'dilu'], - ['club',6,'lebu'], - ['club',6,'sha','thunder'], - ['club',7,'nanman'], - ['club',7,'sha','thunder'], - ['club',8,'sha'], - ['club',8,'sha','thunder'], - ['club',9,'sha'], - ['club',9,'jiu'], - ['club',10,'sha'], - ['club',10,'bingliang'], - ['club',11,'sha'], - ['club',11,'sha'], - ['club',12,'jiedao'], - ['club',12,'tiesuo'], - ['club',13,'wuxie',null,['guo']], - ['club',13,'tiesuo'], - - ['diamond',1,'zhuge'], - ['diamond',1,'zhuque'], - ['diamond',2,'shan'], - ['diamond',2,'tao'], - ['diamond',3,'shan'], - ['diamond',3,'shunshou'], - ['diamond',4,'yiyi'], - ['diamond',4,'sha','fire'], - ['diamond',5,'guanshi'], - ['diamond',5,'sha','fire'], - ['diamond',6,'shan'], - ['diamond',6,'wuliu'], - ['diamond',7,'shan'], - ['diamond',7,'shan'], - ['diamond',8,'shan'], - ['diamond',8,'shan'], - ['diamond',9,'shan'], - ['diamond',9,'jiu'], - ['diamond',10,'shan'], - ['diamond',10,'sha'], - ['diamond',11,'shan'], - ['diamond',11,'sha'], - ['diamond',12,'sha'], - ['diamond',12,'sanjian'], - ['diamond',12,'wuxie',null,['guo']], - ['diamond',13,'shan'], - ['diamond',13,'zixin'], - - ['heart',1,'taoyuan'], - ['heart',1,'wanjian'], - ['heart',2,'shan'], - ['heart',2,'huogong','fire'], - ['heart',3,'taipingyaoshu'], - ['heart',3,'huogong','fire'], - ['heart',4,'tao'], - ['heart',4,'sha','fire'], - ['heart',5,'qilin'], - ['heart',5,'chitu'], - ['heart',6,'tao'], - ['heart',6,'lebu'], - ['heart',7,'tao'], - ['heart',7,'wuzhong'], - ['heart',8,'tao'], - ['heart',8,'wuzhong'], - ['heart',9,'tao'], - ['heart',9,'yuanjiao'], - ['heart',10,'tao'], - ['heart',10,'sha'], - ['heart',11,'shan'], - ['heart',11,'yiyi'], - ['heart',12,'tao'], - ['heart',12,'sha'], - ['heart',12,'guohe'], - ['heart',13,'shan'], - ['heart',13,'zhuahuang'], - - ['spade',1,'xietianzi',null,['lianheng']], - ['spade',2,'minguangkai'], - ['spade',3,'huoshaolianying','fire'], - ['spade',4,'sha'], - ['spade',5,'qinglong'], - ['spade',6,'jiu',null,['lianheng']], - ['spade',7,'sha'], - ['spade',8,'sha'], - ['spade',9,'sha','thunder'], - ['spade',10,'sha','thunder'], - ['spade',11,'sha','thunder',['lianheng']], - ['spade',12,'lulitongxin'], - ['spade',13,'wuxie'], - - ['heart',1,'lianjunshengyan'], - ['heart',2,'diaohulishan'], - ['heart',3,'jingfanma',null,['lianheng']], - ['heart',4,'shan'], - ['heart',5,'shan'], - ['heart',6,'shan'], - ['heart',7,'shan'], - ['heart',8,'tao'], - ['heart',9,'tao'], - ['heart',10,'sha'], - ['heart',11,'sha'], - ['heart',12,'huoshaolianying','fire',['lianheng']], - ['heart',13,'shuiyanqijunx'], - - ['club',1,'yuxi'], - ['club',2,'huxinjing',null,['lianheng']], - ['club',3,'chiling'], - ['club',4,'sha'], - ['club',5,'sha','thunder',['lianheng']], - ['club',6,'sha'], - ['club',7,'sha'], - ['club',8,'sha'], - ['club',9,'jiu'], - ['club',10,'lulitongxin'], - ['club',11,'huoshaolianying','fire',['lianheng']], - ['club',12,'shuiyanqijunx'], - ['club',13,'wuxie',null,['guo']], - - ['diamond',1,'xietianzi',null,['lianheng']], - ['diamond',2,'tao'], - ['diamond',3,'tao',null,['lianheng']], - ['diamond',4,'xietianzi',null,['lianheng']], - ['diamond',5,'muniu'], - ['diamond',6,'shan'], - ['diamond',7,'shan'], - ['diamond',8,'sha','fire'], - ['diamond',9,'sha','fire'], - ['diamond',10,'diaohulishan',null,['lianheng']], - ['diamond',11,'wuxie',null,['guo']], - ['diamond',12,'fangtian'], - ['diamond',13,'shan'], - - ['diamond',6,'dinglanyemingzhu'], - ['heart',13,'liulongcanjia'], - ], - element:{ - content:{ + gzzongyu_info:'当【六龙骖驾】进入其他角色的装备区后,你可以用你装备区内所有坐骑牌(至少一张)与【六龙骖驾】交换位置。锁定技,当你使用一张坐骑牌后,若场上或弃牌堆中有【六龙骖驾】,则将【六龙骖驾】置入你的装备区。', + + xindiaodu:"调度", + "xindiaodu_info":"当与你势力相同的角色使用装备牌时,该角色可以摸一张牌;出牌阶段开始时,你可以获得与你势力相同的一名其他角色装备区里的一张牌,然后你可以将此牌交给另一名与你势力相同的其他角色。", + yigui:"役鬼", + "yigui_info":"当你第一次明置此武将牌时,你将剩余武将牌堆的两张牌扣置于游戏外,称为“魂”;你可以将一张“魂”亮出并置入剩余武将牌堆,视为你使用一张本回合你未以此法使用过的基本牌或普通锦囊牌,且目标须为与此“魂”势力相同或未确定势力的角色。 ", + "yigui_init":"役鬼", + "yigui_init_info":"", + "yigui_refrain":"役鬼", + "yigui_refrain_info":"", + jihun:"汲魂", + jihun_info:"当你受到伤害后,或与你势力不同的角色进入濒死状态被救回后,你可以将剩余武将牌堆的一张牌当“魂”扣置于游戏外。", + + + "xianqu_skill":"先驱", + "xianqu_skill_info":"", + "zhulianbihe_skill":"珠联璧合", + "zhulianbihe_skill_info":"", + "yinyang_skill":"阴阳鱼", + "yinyang_skill_info":"", + "zhulianbihe_skill_draw":"珠联•摸牌", + "zhulianbihe_skill_draw_info":"", + "zhulianbihe_skill_tao":"珠联•桃", + "zhulianbihe_skill_tao_info":"", + "yinyang_skill_draw":"阴阳鱼", + "yinyang_skill_draw_info":"", + "yinyang_skill_add":"阴阳鱼", + "yinyang_skill_add_info":"", + "yinyang_add":"阴阳鱼", + "yinyang_add_info":"", + aozhan:"鏖战", + "aozhan_info":"◇锁定技,你的【桃】只能当做【杀】或【闪】使用或打出,不能用来回复体力。", + + "new_jushou":"据守", + "new_jushou_info":"结束阶段,你可以摸X张牌(X为亮明势力数),然后弃置一张手牌,若以此法弃置的是装备牌,则改为你使用之。若X大于2,则你将武将牌叠置。", + "new_duanliang":"断粮", + "new_duanliang_info":"出牌阶段,你可以将一张黑色基本牌或黑色装备牌当做一张【兵粮寸断】使用。你使用【兵粮寸断】没有距离限制。若你对距离超过2的角色发动了“断粮”,则本回合不能再发动“断粮”。", + "new_shushen":"淑慎", + "new_shushen_info":"当你回复1点体力时,你可令一名其他角色摸一张牌。", + "new_fenji":"奋激", + "new_fenji_info":"一名角色的结束阶段,若其没有手牌,则你可以令其摸两张牌,然后你失去1点体力。", + "new_luanji":"乱击", + "new_luanji_info":"你可以将两张与你本回合以此法转化的花色均不相同的手牌当【万箭齐发】使用,然后当一名与你势力相同的角色因响应此牌而打出【闪】时,该角色摸一张牌", + "new_qingcheng":"倾城", + "new_qingcheng_info":"出牌阶段,你可以弃置一张黑色牌并选择一名武将牌均明置的其他角色,然后你暗置其一张武将牌。若此牌为装备牌,则你可以再选择一名角色并重复同样的操作。", + "new_kongcheng":"空城", + "new_kongcheng_info":"锁定技,若你没有手牌,1.当你成为【杀】或【决斗】的目标时,取消之;2.你的回合外,其他角色交给你的牌置于你的武将牌上,摸牌阶段你获得武将牌上的牌。", + "new_keji":"克己", + "new_keji_info":"锁定技,若你没有在出牌阶段内使用过颜色不同的牌,则你本回合手牌上限+4。", + "keji_add":"克己", + "keji_add_info":"", + "new_mouduan":"谋断", + "new_mouduan_info":"结束阶段,若你于本回合内使用过四种花色或三种类别的牌,则你可以移动场上的一张牌。", + "new_longdan":"龙胆", + "new_longdan_info":"你可以将【杀】当【闪】,【闪】当【杀】使用或打出。你发动龙胆时:若你的杀被【闪】抵消,则你可以对另一名角色造成1点伤害;若你的【闪】抵消了【杀】,则你可以令一名其他角色回复1点体力。(不能是【杀】的使用者)", + "new_paoxiao":"咆哮", + "new_paoxiao_info":"锁定技,你使用【杀】无数量限制;你在一回合内使用第二张【杀】时,摸一张牌。", + "new_kurou":"苦肉", + "new_kurou_info":"出牌阶段限一次,你可以弃置一张牌,然后失去1点体力并摸三张牌,本回合你可以多使用一张【杀】。", + "kurou_effect":"苦肉", + "kurou_effect_info":"", + "new_chuli":"除疠", + "new_chuli_info":"出牌阶段限一次,若你有牌,你可以选择至多三名势力各不相同或未确定势力的其他角色,你弃置你和这些角色的各一张牌。然后以此法弃置黑桃牌的角色各摸一张牌。", + "baka_hunshang":"魂殇", + "baka_hunshang_info":"副将技,此武将牌减少半个阴阳鱼;准备阶段,若你的体力值不大于1,则你本回合获得“英姿”和“英魂”", + "baka_yinghun":"英魂", + "baka_yinghun_info":"准备阶段开始时,若你已受伤,你可令一名其他角色执行一项:摸X张牌,然后弃置一张牌;或摸一张牌,然后弃置X张牌(X为你已损失的体力值)", + "baka_yingzi":"英姿", + "baka_yingzi_info":"锁定技,摸牌阶段摸牌时,你额外摸一张牌;你的手牌上限不会因体力值的减少而减少。", + "new_yiji":"遗计", + "new_yiji_info":"当你受到伤害后,你可以观看牌堆顶的两张牌,并将其交给任意角色", + "new_jieming":"节命", + "new_jieming_info":"当你受到伤害后,你可以令一名角色将手牌摸至X张(X为其体力上限且最多为5)。", + "new_fangzhu":"放逐", + "new_fangzhu_info":"当你受到伤害后,你可以令一名其他角色选择一项:摸X张牌并将武将牌叠置(X为你已损失的体力值);弃置一张牌并失去1点体力。", + "fengyin_main":"铁骑[主将]", + "fengyin_main_info":"", + "fengyin_vice":"铁骑[副将]", + "fengyin_vice_info":"", + "new_tieji":"铁骑", + "new_tieji_info":"当你使用【杀】指定一个目标后,你可以令其本回合一张明置的武将牌的非锁定技失效,然后你进行判定,除非该角色弃置与结果花色相同的一张牌,否则不能使用【闪】。", + hmkyuanyu:"远域", + "hmkyuanyu_info":"锁定技,当你受到伤害时,若伤害来源与你的座次不相邻,防止此伤害。", + hmkguishu:"鬼术", + "hmkguishu_info":"出牌阶段,你可以将一张黑桃手牌当作【知己知彼】或【远交近攻】使用。若你本回合内已经发动过了“鬼术”,则你必须选择与上次不同的选项。", + "new_buqu":"不屈", + "new_buqu_info":"锁定技,在你死亡前,若你的体力值不大于0,亮出牌堆顶的一张牌并置于你的武将牌上,若此牌的点数与你武将牌上已有的牌点数均不同,则你回复至1体力。", + "_mingzhisuodingji":"亮将", + "_mingzhisuodingji_info":"出牌阶段,你可以明置拥有“锁定技”的武将牌。", + + gz_jun_liubei:'君刘备', + gz_jun_zhangjiao:'君张角', + gz_jun_sunquan:'君孙权', + gz_liqueguosi:'李傕郭汜', + gz_bianfuren:'卞夫人', + gz_lvfan:'吕范', + gz_shamoke:'沙摩柯', + gz_masu:'马谡', + gz_yuji:'于吉', + + gzshushen:'淑慎', + gzshushen_info:'当你回复1点体力时,你可令与你势力相同的一名其他角色摸一张牌。', + _lianheng:'合纵', + lianheng_tag:'合', + guo_tag:'国', + qianhuan:'千幻', + qianhuan_bg:'幻', + qianhuan_info:'当与你势力相同的一名角色受到伤害后,你可以将一张与你武将牌上花色均不同的牌置于你的武将牌上。当一名与你势力相同的角色成为基本牌或锦囊牌的唯一目标时,你可以移去一张“千幻”牌,取消之。', + gzzhiman:'制蛮', + gzzhiman_info:'当你对其他角色造成伤害时,你可以防止此伤害。若如此做,你获得其装备区或判定区里的一张牌。然后若该角色与你势力相同,则该角色可以变更其副将。', + + gzdiancai:'典财', + gzdiancai_info:'其他角色的出牌阶段结束时,若你于此阶段失去了x张或更多的牌,则你可以将手牌摸至体力上限。若如此做,你可以变更副将(x为你的体力值)。', + xuanlve:'旋略', + xuanlve_info:'当你失去装备区里的牌后,你可以弃置一名其他角色的一张牌。', + yongjin:'勇进', + yongjin_info:'限定技,出牌阶段,你可以移动场上的至多三张装备牌。', + lianzi:'敛资', + lianzi_info:'出牌阶段限一次,你可以弃置一张手牌,然后亮出牌堆顶X张牌(X为吴势力角色装备区里的牌和“烽火”的总和),获得其中所有与你弃置牌类别相同的牌,将其余的牌置入弃牌堆,若一次获得的牌超过三张,则你失去技能“敛资”并获得技能“制衡”。', + gzqice:'奇策', + gzqice_backup:'奇策', + gzqice_info:'出牌阶段限一次,你可以将所有手牌当任意一张普通锦囊牌使用,你不能以此法使用目标数超过X的牌(X为你的手牌数),然后你可以变更副将。', + gzyuejian:'约俭', + gzyuejian_info:'与你势力相同角色的弃牌阶段开始时,若其本回合未使用指定过其他势力的角色为目标,则该角色本回合手牌上限等同于其体力上限', + gzxiongsuan:'凶算', + gzxiongsuan_info:'限定技,出牌阶段,你可以弃置一张手牌并选择与你势力相同的一名角色,对其造成1点伤害,然后你摸三张牌。若该角色有已发动的限定技,则你选择其中一个限定技,此回合结束后视为该限定技未发动过。', + gzhuashen:'化身', + gzhuashen_info:'准备阶段开始时,若你的“化身”不足两张,则你可以观看剩余武将牌堆中的五张牌,然后扣置其中至多两张武将牌在你的武将旁,称为“化身”;若“化身”有两张以上,则你可以用剩余武将牌堆顶的一张牌替换一张“化身”。你可以于相应的时机明置并发动“化身”的一个技能,技能结算完成后将该“化身”放回剩余武将牌堆。你每个时机只能发动一张“化身”的技能,且不能发动带有技能类型的技能(锁定技、限定技等)。', + gzxinsheng:'新生', + gzxinsheng_info:'当你受到伤害后,你可以从剩余武将牌堆中扣置一张牌加入到“化身”牌中。', + + jubao:'聚宝', + jubao_info:'锁定技,你装备区里的宝物牌不能被其他角色获得,结束阶段开始时,若场上或弃牌堆有【定澜夜明珠】,则你摸一张牌,然后获得装备区里有【定澜夜明珠】角色的一张牌。', + jiahe:'嘉禾', + jiahe_info:'君主技,只要此武将牌处于明置状态,你便拥有“缘江烽火图”。', + jiahe_put:'烽火', + jiahe_put_info:'出牌阶段限一次,你可以将一张装备牌置于“缘江烽火图”上,称之为“烽火”。', + jiahe_skill:'缘江烽火图', + yuanjiangfenghuotu:'缘江烽火图', + yuanjiangfenghuotu_info:'每名吴势力角色的出牌阶段限一次,该角色可以将一张装备牌置于“缘江烽火图”上,称之为“烽火”。
    根据“烽火”的数量,所有吴势力角色可于其准备阶段开始时选择并获得其中一个技能直到回合结束:一张以上~英姿;两张以上~好施;三张以上~涉猎;四张以上~度势;五张以上~可额外选择一项。
    锁定技,当你受到【杀】或锦囊牌造成的伤害后,你将一张“烽火”置入弃牌堆。', + yuanjiangfenghuotu_ab:'江图', + yuanjiangfenghuotu_bg:'图', + wuxin:'悟心', + wuxin_info:'摸牌阶段开始时,你可以观看牌堆顶的X张牌(X为群势力角色的数量),然后将这些牌以任意顺序置于牌堆顶', + hongfa:'弘法', + hongfa_use:'天兵', + hongfa_respond:'天兵', + hongfa_info:'君主技,锁定技,当此武将牌明置时,你获得“黄巾天兵符”;准备阶段开始时,若没有“天兵”,你将牌堆顶的X张牌置于“黄巾天兵符”上,称为“天兵”(X为群势力角色的数量)', + wendao:'问道', + wendao_info:'出牌阶段限一次,你可以弃置一张红色牌,获得弃牌堆里或场上的一张【太平要术】', + huangjintianbingfu:'黄巾天兵符', + huangjintianbingfu_ab:'兵符', + huangjintianbingfu_bg:'符', + huangjintianbingfu_info:'锁定技 :当你计算群势力角色数时,每一张“天兵”均可视为一名群势力角色。
    每当你失去体力时,你可改为将一张“天兵”置入弃牌堆。
    与你势力相同的角色可将一张“天兵”当【杀】使用或打出。', + wuhujiangdaqi:'五虎将大旗', + wuhujiangdaqi_ab:'将旗', + wuhujiangdaqi_bg:'旗', + wuhujiangdaqi_info:'存活的蜀势力角色的技能按以下规则改动:
    武圣:将“红色牌”改为“任意牌”
    咆哮:增加描述“你使用的【杀】无视其他角色的防具”
    龙胆:增加描述“你每发动一次‘龙胆’便摸一张牌”
    烈弓:增加描述“你的攻击范围+1”
    铁骑:将“一张明置的武将牌”改为“所有明置的武将牌”', + zhangwu:'章武', + zhangwu_info:'锁定技。当【飞龙夺凤】进入弃牌堆或其他角色的装备区时,你获得之。当你失去【飞龙夺风】时,展示之,然后将此牌置于牌堆底并摸两张牌', + shouyue:'授钺', + shouyue_info:'君主技。只要此武将牌处于明置状态,你便拥有“五虎将大旗”', + jizhao:'激诏', + jizhao_bg:'诏', + jizhao_info:'限定技。当你处于濒死状态时,你可以将手牌补至体力上限,体力回复至2点,失去技能“授钺”并获得技能“仁德”', + gzshoucheng:'守成', + gzshoucheng_info:'当与你势力相同的一名角色于其回合外失去最后手牌时,你可以令其摸一张牌', + gzmingshi:'名士', + gzmingshi_info:'锁定技,当你受到伤害时,若伤害来源有暗置的武将牌,此伤害-1', + fengshi:'锋矢', + fengshi_sha:'锋矢', + fengshi_info:'阵法技,在同一个围攻关系中,若你是围攻角色,则你或另一名围攻角色使用【杀】指定被围攻角色为目标后,可令该角色弃置装备区里的一张牌', + gzsuishi:'随势', + gzsuishi_info:'锁定技,当其他角色进入濒死状态时,若伤害来源与你势力相同,你摸一张牌;当其他角色死亡时,若其与你势力相同,你失去1点体力', + baoling:'暴凌', + baoling_info:'主将技,锁定技,出牌阶段结束时,若你有副将,则你移除副将,然后加3点体力上限,回复3点体力,并获得“崩坏”', + yingyang:'鹰扬', + yingyang_info:'当你拼点的牌亮出后,你可以令此牌的点数+3或-3', + hunshang:'魂殇', + hunshang_info:'副将技,此武将牌减少半个阴阳鱼;准备阶段,若你的体力值不大于1,则你本回合获得“英姿”和“英魂”', + gzguixiu:'闺秀', + gzguixiu_info:'当你明置此武将牌时,你可以摸两张牌;当你移除此武将牌时,你可以回复1点体力', + gzcunsi:'存嗣', + gzcunsi_info:'出牌阶段,你可以移除此武将牌并选择一名角色,然后其获得技能“勇决”,若你没有获得“勇决”,则获得“勇决”的角色摸两张牌', + gzyongjue:'勇决', + gzyongjue_info:'若与你势力相同的一名角色于其回合内使用的第一张牌为【杀】,则该角色可以在此【杀】结算完成后获得之', + gzqianxi:'潜袭', + gzqianxi_info:'准备阶段开始时,你可以进行判定,然后你选择距离为1的一名角色,直到回合结束,该角色不能使用或打出与结果颜色相同的手牌', + gzshangyi:'尚义', + gzshangyi_info:'出牌阶段限一次,你可以令一名其他角色观看你的手牌。若如此做,你选择一项:1.观看其手牌并可以弃置其中的一张黑色牌;2.观看其所有暗置的武将牌', + niaoxiang:'鸟翔', + niaoxiang_sha:'鸟翔', + niaoxiang_info:'阵法技,在同一个围攻关系中,若你是围攻角色,则你或另一名围攻角色使用【杀】指定被围攻角色为目标后,你令该角色需依次使用两张【闪】才能抵消', + yicheng:'疑城', + yicheng_info:'当与你势力相同的一名角色成为【杀】的目标后,你可以令该角色摸一张牌然后弃置一张牌', + yizhi:'遗志', + yizhi_info:'副将技,此武将牌上单独的阴阳鱼个数-1。若你的主将拥有技能“观星”,则将其描述中的X改为5;若你的主将没有技能“观星”,则你拥有技能“观星”', + tianfu:'天覆', + tianfu_info:'主将技,阵法技,若当前回合角色与你处于同一队列,你拥有技能“看破”', + ziliang:'资粮', + ziliang_info:'副将技,当与你势力相同的一名角色受到伤害后,你可以将一张“田”交给该角色', + gzjixi:'急袭', + gzjixi_info:'主将技,此武将牌减少半个阴阳鱼;你可以将一张“田”当【顺手牵羊】使用', + huyuan:'护援', + huyuan_info:'结束阶段开始时,你可以将一张装备牌置入一名角色的装备区,然后你可以弃置该角色距离为1的一名角色的一张牌', + heyi:'鹤翼', + heyi_info:'阵法技,与你处于同一队列的其他角色防御距离+1', + gz_shibing1wei:'魏兵', + gz_shibing2wei:'魏兵', + gz_shibing1shu:'蜀兵', + gz_shibing2shu:'蜀兵', + gz_shibing1wu:'吴兵', + gz_shibing2wu:'吴兵', + gz_shibing1qun:'群兵', + gz_shibing2qun:'群兵', + gzduanchang:'断肠', + gzduanchang_info:'锁定技,当你死亡时,你令杀死你的角色失去一张武将牌的所有技能', + gzweimu:'帷幕', + gzweimu_info:'锁定技,当你成为黑色锦囊牌的目标时,则取消之', + gzqianxun:'谦逊', + gzqianxun_info:'锁定技,当你成为顺手牵羊或乐不思蜀的目标时,则取消之', + gzkongcheng:'空城', + gzkongcheng_info:'锁定技,当你成为【杀】或【决斗】的目标时,若你没有手牌,则取消之', + gzxiaoji:'枭姬', + gzxiaoji_info:'当你失去装备区里的牌后,你可以摸两张牌', + gzrende:'仁德', + gzrende_info:'出牌阶段,你可以将任意张手牌交给其他角色,然后若你于此阶段内给出第三张“仁德”牌时,你回复1点体力', + gzzhiheng:'制衡', + gzzhiheng_info:'出牌阶段限一次,你可以弃置至多X张牌(X为你的体力上限),然后摸等量的牌', + huoshui:'祸水', + huoshui_info:'出牌阶段,你可以明置此武将牌;你的回合内,若此武将牌处于明置状态,其他角色不能明置其武将牌', + qingcheng:'倾城', + qingcheng_info:'出牌阶段,你可以弃置一张装备牌并选择一名两张武将牌均明置的其他角色,你暗置其一张武将牌', + duoshi:'度势', + duoshi_info:'出牌阶段限四次,你可以将一张红色手牌当【以逸待劳】使用。', + gzxiaoguo:'骁果', + gzxiaoguo_info:'其他角色的结束阶段开始时,你可以弃置一张基本牌,令该角色选择一项:1.弃置一张装备牌;2.受到你对其造成的1点伤害。', + gzduanliang:'断粮', + gzduanliang_info:'你可以将一张黑色基本牌或黑色装备牌当【兵粮寸断】使用;你可以对距离为2的角色使用【兵粮寸断】', + + guozhan_default:"国战标准", + guozhan_zhen:"君临天下•阵", + guozhan_shi:"君临天下•势", + guozhan_bian:"君临天下•变", + guozhan_quan:"君临天下•权", + guozhan_jun:"君主武将", + guozhan_others:"其他", + }, + junList:['liubei','zhangjiao','sunquan','caocao'], + guozhanPile:[ + ['spade',1,'juedou'], + ['spade',1,'shandian','thunder'], + ['spade',2,'feilongduofeng'], + ['spade',2,'bagua'], + ['spade',2,'hanbing'], + ['spade',3,'guohe'], + ['spade',3,'shunshou'], + ['spade',4,'guohe'], + ['spade',4,'shunshou'], + ['spade',5,'sha'], + ['spade',5,'jueying'], + ['spade',6,'qinggang'], + ['spade',6,'sha','thunder'], + ['spade',7,'sha'], + ['spade',7,'sha','thunder'], + ['spade',8,'sha'], + ['spade',8,'sha'], + ['spade',9,'sha'], + ['spade',9,'jiu'], + ['spade',10,'sha'], + ['spade',10,'bingliang'], + ['spade',11,'sha'], + ['spade',11,'wuxie'], + ['spade',12,'zhangba'], + ['spade',12,'tiesuo'], + ['spade',13,'nanman'], + ['spade',13,'dawan'], + + ['club',1,'juedou'], + ['club',1,'baiyin'], + ['club',2,'sha'], + ['club',2,'tengjia','fire'], + ['club',2,'renwang'], + ['club',3,'sha'], + ['club',3,'zhibi'], + ['club',4,'sha'], + ['club',4,'zhibi'], + ['club',5,'sha'], + ['club',5,'dilu'], + ['club',6,'lebu'], + ['club',6,'sha','thunder'], + ['club',7,'nanman'], + ['club',7,'sha','thunder'], + ['club',8,'sha'], + ['club',8,'sha','thunder'], + ['club',9,'sha'], + ['club',9,'jiu'], + ['club',10,'sha'], + ['club',10,'bingliang'], + ['club',11,'sha'], + ['club',11,'sha'], + ['club',12,'jiedao'], + ['club',12,'tiesuo'], + ['club',13,'wuxie',null,['guo']], + ['club',13,'tiesuo'], + + ['diamond',1,'zhuge'], + ['diamond',1,'zhuque'], + ['diamond',2,'shan'], + ['diamond',2,'tao'], + ['diamond',3,'shan'], + ['diamond',3,'shunshou'], + ['diamond',4,'yiyi'], + ['diamond',4,'sha','fire'], + ['diamond',5,'guanshi'], + ['diamond',5,'sha','fire'], + ['diamond',6,'shan'], + ['diamond',6,'wuliu'], + ['diamond',7,'shan'], + ['diamond',7,'shan'], + ['diamond',8,'shan'], + ['diamond',8,'shan'], + ['diamond',9,'shan'], + ['diamond',9,'jiu'], + ['diamond',10,'shan'], + ['diamond',10,'sha'], + ['diamond',11,'shan'], + ['diamond',11,'sha'], + ['diamond',12,'sha'], + ['diamond',12,'sanjian'], + ['diamond',12,'wuxie',null,['guo']], + ['diamond',13,'shan'], + ['diamond',13,'zixin'], + + ['heart',1,'taoyuan'], + ['heart',1,'wanjian'], + ['heart',2,'shan'], + ['heart',2,'huogong','fire'], + ['heart',3,'taipingyaoshu'], + ['heart',3,'huogong','fire'], + ['heart',4,'tao'], + ['heart',4,'sha','fire'], + ['heart',5,'qilin'], + ['heart',5,'chitu'], + ['heart',6,'tao'], + ['heart',6,'lebu'], + ['heart',7,'tao'], + ['heart',7,'wuzhong'], + ['heart',8,'tao'], + ['heart',8,'wuzhong'], + ['heart',9,'tao'], + ['heart',9,'yuanjiao'], + ['heart',10,'tao'], + ['heart',10,'sha'], + ['heart',11,'shan'], + ['heart',11,'yiyi'], + ['heart',12,'tao'], + ['heart',12,'sha'], + ['heart',12,'guohe'], + ['heart',13,'shan'], + ['heart',13,'zhuahuang'], + + ['spade',1,'xietianzi',null,['lianheng']], + ['spade',2,'minguangkai'], + ['spade',3,'huoshaolianying','fire'], + ['spade',4,'sha'], + ['spade',5,'qinglong'], + ['spade',6,'jiu',null,['lianheng']], + ['spade',7,'sha'], + ['spade',8,'sha'], + ['spade',9,'sha','thunder'], + ['spade',10,'sha','thunder'], + ['spade',11,'sha','thunder',['lianheng']], + ['spade',12,'lulitongxin'], + ['spade',13,'wuxie'], + + ['heart',1,'lianjunshengyan'], + ['heart',2,'diaohulishan'], + ['heart',3,'jingfanma',null,['lianheng']], + ['heart',4,'shan'], + ['heart',5,'shan'], + ['heart',6,'shan'], + ['heart',7,'shan'], + ['heart',8,'tao'], + ['heart',9,'tao'], + ['heart',10,'sha'], + ['heart',11,'sha'], + ['heart',12,'huoshaolianying','fire',['lianheng']], + ['heart',13,'shuiyanqijunx'], + + ['club',1,'yuxi'], + ['club',2,'huxinjing',null,['lianheng']], + ['club',3,'chiling'], + ['club',4,'sha'], + ['club',5,'sha','thunder',['lianheng']], + ['club',6,'sha'], + ['club',7,'sha'], + ['club',8,'sha'], + ['club',9,'jiu'], + ['club',10,'lulitongxin'], + ['club',11,'huoshaolianying','fire',['lianheng']], + ['club',12,'shuiyanqijunx'], + ['club',13,'wuxie',null,['guo']], + + ['diamond',1,'xietianzi',null,['lianheng']], + ['diamond',2,'tao'], + ['diamond',3,'tao',null,['lianheng']], + ['diamond',4,'xietianzi',null,['lianheng']], + ['diamond',5,'muniu'], + ['diamond',6,'shan'], + ['diamond',7,'shan'], + ['diamond',8,'sha','fire'], + ['diamond',9,'sha','fire'], + ['diamond',10,'diaohulishan',null,['lianheng']], + ['diamond',11,'wuxie',null,['guo']], + ['diamond',12,'fangtian'], + ['diamond',13,'shan'], + + ['diamond',6,'dinglanyemingzhu'], + ['heart',13,'liulongcanjia'], + ], + element:{ + content:{ chooseJunlingFor:function(){ 'step 0' var list=['junling1','junling2','junling3','junling4','junling5','junling6']; @@ -7669,63 +7669,63 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ for(var i=0;i0){ - min=Math.min(min,num); - } - } - } - return get.population(this.identity)==min; - }, - logAi:function(targets,card){ - if(this.ai.shown==1||this.isMad()) return; - if(typeof targets=='number'){ - this.ai.shown+=targets; - } - else{ - var effect=0,c,shown; - var info=get.info(card); - if(info.ai&&info.ai.expose){ - if(_status.event.name=='_wuxie'){ - if(_status.event.source&&_status.event.source.ai.shown){ - this.ai.shown+=0.2; - } - } - else{ - this.ai.shown+=info.ai.expose; - } - } - if(targets.length>0){ - for(var i=0;i0){ - if(effect<1) c=0.5; - else c=1; - if(targets.length==1&&targets[0]==this); - else if(targets.length==1) this.ai.shown+=0.2*c; - else this.ai.shown+=0.1*c; - } - } - if(this.ai.shown>0.95) this.ai.shown=0.95; - if(this.ai.shown<-0.5) this.ai.shown=-0.5; - }, - } - }, - get:{ + }, + /**/ + mayChangeVice:function(repeat){ + if(!_status.changedSkills) _status.changedSkills=[]; + var skill=_status.event.name; + if(repeat||!_status.changedSkills.contains(skill)){ + var next=game.createEvent('mayChangeVice'); + next.setContent('mayChangeVice'); + next.player=this; + next.skill=skill; + if(repeat) next.repeat=true; + return next; + } + }, + differentIdentityFrom:function(target,self){ + if(this==target) return false; + if(self){ + if(target.identity=='unknown') return false; + if(target.identity=='ye'||this.identity=='ye') return true; + if(this.identity=='unknown'){ + var identity=lib.character[this.name1][1]; + if(this.wontYe()) return identity!=target.identity; + return true; + } + } + else{ + if(this.identity=='unknown'||target.identity=='unknown') return false; + if(this.identity=='ye'||target.identity=='ye') return true; + } + return this.identity!=target.identity; + }, + sameIdentityAs:function(target,shown){ + if(shown){ + if(this.identity=='ye'||this.identity=='unknown') return false; + } + else{ + if(this==target) return true; + if(target.identity=='unknown'||target.identity=='ye'||this.identity=='ye') return false; + if(this.identity=='unknown'){ + var identity=lib.character[this.name1][1]; + if(this.wontYe()) return identity==target.identity; + return false; + } + } + return this.identity==target.identity; + }, + getModeState:function(){ + return { + unseen:this.isUnseen(0), + unseen2:this.isUnseen(1), + } + }, + setModeState:function(info){ + if(info.mode.unseen) this.classList.add('unseen'); + if(info.mode.unseen2) this.classList.add('unseen2'); + if(!info.name) return; + // if(info.name.indexOf('unknown')==0){ + // if(this==game.me){ + // lib.translate[info.name]+='(你)'; + // } + // } + this.init(info.name1,info.name2,false); + this.name1=info.name1; + this.name=info.name; + this.node.name_seat=ui.create.div('.name.name_seat',get.verticalStr(lib.translate[this.name].slice(0,3)),this); + if(info.identityShown){ + this.setIdentity(info.identity); + this.node.identity.classList.remove('guessing'); + } + else if(this!=game.me){ + this.node.identity.firstChild.innerHTML='猜'; + this.node.identity.dataset.color='unknown'; + this.node.identity.classList.add('guessing'); + } + }, + dieAfter:function(source){ + this.showCharacter(2); + if(source&&source.identity!='unknown'){ + if(source.identity=='ye') source.draw(3); + else if(this.identity=='ye') source.draw(1); + else if(this.identity!=source.identity) source.draw(get.population(this.identity)+1); + else source.discard(source.getCards('he')); + } + + if(get.is.jun(this.name1)){ + var yelist=[]; + for(var i=0;i0){ + min=Math.min(min,num); + } + } + } + return get.population(this.identity)==min; + }, + logAi:function(targets,card){ + if(this.ai.shown==1||this.isMad()) return; + if(typeof targets=='number'){ + this.ai.shown+=targets; + } + else{ + var effect=0,c,shown; + var info=get.info(card); + if(info.ai&&info.ai.expose){ + if(_status.event.name=='_wuxie'){ + if(_status.event.source&&_status.event.source.ai.shown){ + this.ai.shown+=0.2; + } + } + else{ + this.ai.shown+=info.ai.expose; + } + } + if(targets.length>0){ + for(var i=0;i0){ + if(effect<1) c=0.5; + else c=1; + if(targets.length==1&&targets[0]==this); + else if(targets.length==1) this.ai.shown+=0.2*c; + else this.ai.shown+=0.1*c; + } + } + if(this.ai.shown>0.95) this.ai.shown=0.95; + if(this.ai.shown<-0.5) this.ai.shown=-0.5; + }, + } + }, + get:{ junlingEffect:function(source,junling,performer,targets,viewer){ var att1=get.attitude(viewer,source),att2=get.attitude(viewer,performer); var eff1=0,eff2=0; @@ -8385,90 +8385,90 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ break; } return Math.sign(att1)*eff1+Math.sign(att2)*eff2; - }, - realAttitude:function(from,toidentity,difficulty){ - if(from.identity==toidentity&&toidentity!='ye'){ - return 4+difficulty; - } - if(from.identity=='unknown'&&lib.character[from.name1][1]==toidentity){ - if(from.wontYe()) return 4+difficulty; - } - var groups=[]; - for(var i=0;i=game.players.length/2){ - if(to_p<=from_p){ - return 0.5; - } - return 0; - } - if(to_p=get.population()-2){ - toidentity='ye'; - } - } - var att=get.realAttitude(from,toidentity,difficulty); - if(from.storage.zhibi&&from.storage.zhibi.contains(to)){ - return att; - } - if(to.ai.shown>=0.5) return att*to.ai.shown; - - var nshown=0; - for(var i=0;i=game.players.length/2&&att>=0){ - return 0; - } - return Math.min(0,Math.random()-0.5)+difficulty; - } - if(to.ai.shown>=0.2){ - if(att>2){ - return Math.max(0,Math.random()-0.5)+difficulty; - } - if(att>=0){ - return 0; - } - return Math.min(0,Math.random()-0.7)+difficulty; - } - if(att>2){ - return Math.max(0,Math.random()-0.7)+difficulty; - } - if(att>=0){ - return Math.min(0,Math.random()-0.3)+difficulty; - } - return Math.min(0,Math.random()-0.5)+difficulty; - }, - } - }; -}); + }, + realAttitude:function(from,toidentity,difficulty){ + if(from.identity==toidentity&&toidentity!='ye'){ + return 4+difficulty; + } + if(from.identity=='unknown'&&lib.character[from.name1][1]==toidentity){ + if(from.wontYe()) return 4+difficulty; + } + var groups=[]; + for(var i=0;i=game.players.length/2){ + if(to_p<=from_p){ + return 0.5; + } + return 0; + } + if(to_p=get.population()-2){ + toidentity='ye'; + } + } + var att=get.realAttitude(from,toidentity,difficulty); + if(from.storage.zhibi&&from.storage.zhibi.contains(to)){ + return att; + } + if(to.ai.shown>=0.5) return att*to.ai.shown; + + var nshown=0; + for(var i=0;i=game.players.length/2&&att>=0){ + return 0; + } + return Math.min(0,Math.random()-0.5)+difficulty; + } + if(to.ai.shown>=0.2){ + if(att>2){ + return Math.max(0,Math.random()-0.5)+difficulty; + } + if(att>=0){ + return 0; + } + return Math.min(0,Math.random()-0.7)+difficulty; + } + if(att>2){ + return Math.max(0,Math.random()-0.7)+difficulty; + } + if(att>=0){ + return Math.min(0,Math.random()-0.3)+difficulty; + } + return Math.min(0,Math.random()-0.5)+difficulty; + }, + } + }; +});