diff --git a/character/huicui.js b/character/huicui.js new file mode 100644 index 000000000..1d0d2362e --- /dev/null +++ b/character/huicui.js @@ -0,0 +1,10201 @@ +'use strict'; +game.import('character',function(lib,game,ui,get,ai,_status){ + return { + name:'huicui', + connect:true, + character:{ + dc_wuban:['male','shu',4,['dcyouzhan'],['clan:陈留吴氏','unseen']], + yue_caiwenji:['female','qun',3,['dcshuangjia','dcbeifen']], + liuchongluojun:['male','qun',3,['dcminze','dcjini']], + yuechen:['male','wei',4,['dcporui','dcgonghu'],['unseen']], + zhangkai:['male','qun',4,['dcxiangshu']], + gaoxiang:['male','shu',4,['dcchiying'],['unseen']], + yuanyin:['male','qun',3,['dcmoshou','dcyunjiu'],['unseen']], + dongwan:['female','qun',3,['dcshengdu','dcxianjiao'],['unseen']], + zhangchu:['female','qun',3,['dcjizhong','dcrihui','dcguangshi']], + peiyuanshao:['male','qun',4,['dcmoyu'],['unseen']], + mengjie:['male','qun',3,['dcyinlu','dcyouqi']], + dc_huojun:['male','shu',4,['dcgue','dcsigong']], + dc_sunhanhua:['female','wu',3,['dchuiling','dcchongxu']], + dc_sunziliufang:['male','wei',3,['dcqinshen','dcweidang']], + yuantanyuanxiyuanshang:['male','qun',4,['dcneifa']], + qiaorui:['male','qun',4,['dcaishou','dcsaowei']], + xianglang:['male','shu',3,['dckanji','dcqianzheng']], + qinlang:['male','wei',4,['dchaochong','dcjinjin']], + furongfuqian:['male','shu','4/6',['dcxuewei','dcyuguan']], + zhenghun:['male','wei',3,['dcqiangzhi','dcpitian']], + dc_zhaotongzhaoguang:['male','shu',4,['yizan_use','dcqingren','dclongyuan']], + dc_huanghao:['male','shu',3,['dcqinqing','huisheng','dccunwei']], + liupi:['male','qun',4,['dcjuying']], + dc_sp_jiaxu:['male','wei',3,['zhenlue','dcjianshu','dcyongdi']], + leibo:['male','qun',4,['dcsilve','dcshuaijie']], + gongsundu:['male','qun',4,['dczhenze','dcanliao']], + panghui:['male','wei',5,['dcyiyong']], + dc_yuejiu:['male','qun',4,['dccuijin']], + chenjiao:['male','wei',3,['dcxieshou','dcqingyan','dcqizi']], + wanglie:['male','qun',3,['dcchongwang','dchuagui']], + chengui:['male','qun',3,['dcyingtu','dccongshi']], + dc_huangquan:['male','shu',3,['dcquanjian','dctujue']], + yinfuren:['female','wei',3,['dcyingyu','dcyongbi']], + dc_lvkuanglvxiang:['male','wei',4,['dcshuhe','dcliehou']], + guanhai:['male','qun',4,['suoliang','qinbao']], + huzhao:['male','qun',3,['midu','xianwang']], + dc_liuba:['male','shu',3,['dczhubi','dcliuzhuan']], + zhangxun:['male','qun',4,['suizheng']], + zongyu:['male','shu',3,['zyqiao','chengshang']], + dc_jiling:['male','qun',4,['dcshuangren']], + dc_yanghu:['male','wei',3,['dcdeshao','dcmingfa']], + caimaozhangyun:['male','wei',4,['lianzhou','jinglan']], + tenggongzhu:['female','wu',3,['xingchong','liunian']], + dc_huangchengyan:['male','qun',3,['dcjiezhen','dczecai','dcyinshi']], + dc_gaolan:['male','qun',4,['xizhen']], + guanning:['male','qun','3/7',['dunshi']], + dc_jiben:['male','qun',3,['xunli','zhishi','lieyi']], + mamidi:['male','qun','4/6',['bingjie','zhengding']], + re_dengzhi:['male','shu',3,['jianliang','weimeng']], + fengxi:['male','wu',3,['yusui','boyan']], + re_miheng:['male','qun',3,['rekuangcai','reshejian']], + re_chendeng:['male','qun',3,['refuyuan','reyingshui','rewangzu']], + wanniangongzhu:['female','qun',3,['zhenge','xinghan']], + re_xunchen:['male','qun',3,['refenglve','anyong'],['clan:颍川荀氏']], + re_kanze:['male','wu',3,['xiashu','rekuanshi']], + lvlingqi:['female','qun',4,['guowu','zhuangrong']], + zhanghu:['male','wei',4,['cuijian','zhtongyuan']], + luyusheng:['female','wu',3,['zhente','zhiwei']], + huaxin:['male','wei',3,['spwanggui','xibing']], + mengyou:['male','qun',5,['hmmanyi','dcmanzhi'],['unseen']], + liuyong:['male','shu',3,['zhuning','fengxiang']], + dc_sunru:['female','wu',3,['xiecui','youxu']], + xiahoulingnv:['female','wei',4,['fuping','weilie']], + zhangyao:['female','wu',3,['yuanyu','xiyan']], + tengyin:['male','wu',3,['chenjian','xixiu']], + zhangxuan:['female','wu',4,['tongli','shezang']], + wangtao:['female','shu',3,['huguan','yaopei']], + wangyue:['female','shu',3,['huguan','mingluan']], + zhaoyan:['female','wu',3,['jinhui','qingman']], + heyan:['male','wei',3,['yachai','qingtan']], + re_sunluyu:['female','wu',3,['remeibu','remumu']], + re_dongbai:['female','qun',3,['relianzhu','rexiahui']], + zhoushan:['male','wu',4,['dcmiyun','dcdanying']], + dc_caiyang:['male','wei',4,['dcxunji','dcjiaofeng']], + xiahoujie:['male','wei',5,['liedan','zhuangdan']], + caoxing:['male','qun',4,['cxliushi','zhanwan']], + re_chunyuqiong:['male','qun',4,['recangchu','reliangying','reshishou']], + xingdaorong:['male','qun','4/6',['xuxie']], + re_panfeng:['male','qun',4,['xinkuangfu']], + }, + characterSort:{ + huicui:{ + sp_baigei:['re_panfeng','xingdaorong','caoxing','re_chunyuqiong','xiahoujie','dc_caiyang','zhoushan'], + sp_caizijiaren:['re_dongbai','re_sunluyu','heyan','zhaoyan','wangtao','wangyue','zhangxuan','tengyin','zhangyao','xiahoulingnv','dc_sunru'], + sp_zhilan:['liuyong','wanniangongzhu','zhanghu','lvlingqi','tenggongzhu','panghui','dc_zhaotongzhaoguang','yuantanyuanxiyuanshang','yuechen'], + sp_guixin:['re_kanze','re_chendeng','caimaozhangyun','dc_lvkuanglvxiang','dc_gaolan','yinfuren','chengui','chenjiao','dc_sp_jiaxu','qinlang'], + sp_daihan:['mamidi','dc_jiling','zhangxun','dc_yuejiu','wanglie','leibo','qiaorui','dongwan','yuanyin'], + sp_jianghu:['guanning','huzhao','dc_huangchengyan','mengjie'], + sp_zongheng:['huaxin','luyusheng','re_xunchen','re_miheng','fengxi','re_dengzhi','dc_yanghu','zongyu'], + sp_taiping:['guanhai','liupi','peiyuanshao','zhangchu','zhangkai'], + sp_yanhan:['dc_liuba','dc_huangquan','furongfuqian','xianglang','dc_huojun','gaoxiang','dc_wuban'], + sp_jishi:['dc_jiben','zhenghun','dc_sunhanhua','liuchongluojun'], + sp_raoting:['dc_huanghao','dc_sunziliufang','dc_sunchen'], + sp_yijun:['gongsundu','mengyou'], + sp_zhengyin:['yue_caiwenji'], + } + }, + skill:{ + //吴班 + dcyouzhan:{ + audio:2, + trigger:{ + global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + forced:true, + filter:function(event,player){ + if(player!=_status.currentPhase) return false; + return game.hasPlayer(current=>{ + if(current==player) return false; + var evt=event.getl(current); + return evt&&evt.cards2.length; + }); + }, + content:function(){ + 'step 0' + var targets=game.filterPlayer(current=>{ + if(current==player) return false; + var evt=trigger.getl(current); + return evt&&evt.cards2.length; + }); + event.targets=targets; + player.logSkill('dcyouzhan',targets); + 'step 1' + var target=targets.shift(); + player.draw(); + target.addTempSkill('dcyouzhan_effect'); + target.addMark('dcyouzhan_effect',1,false); + target.addTempSkill('dcyouzhan_draw'); + if(targets.length){ + event.redo(); + } + }, + subSkill:{ + effect:{ + trigger:{ + player:'damageBegin3', + }, + filter:function(event,player){ + return player.hasMark('dcyouzhan_effect'); + }, + forced:true, + charlotte:true, + onremove:true, + content:function(){ + 'step 0' + trigger.num+=player.countMark('dcyouzhan_effect'); + player.removeSkill('dcyouzhan_effect'); + }, + mark:true, + intro:{ + content:'本回合下一次受到的伤害+#', + }, + ai:{ + damageBonus:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')) return 1+0.5*target.countMark('dcyouzhan_effect'); + } + } + } + }, + draw:{ + trigger:{ + global:'phaseJieshuBegin', + }, + forced:true, + charlotte:true, + filter:function(event,player){ + return !player.getHistory('damage').length; + }, + content:function(){ + player.draw(player.getHistory('lose').length); + }, + }, + } + }, + //乐蔡文姬 + dcshuangjia:{ + audio:2, + trigger:{ + global:'phaseBefore', + player:'enterGame' + }, + forced:true, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); + }, + content:function(){ + 'step 0' + var cards=player.getCards('h'); + player.addGaintag(cards,'dcshuangjia_tag'); + }, + mod:{ + ignoredHandcard:function(card,player){ + if(card.hasGaintag('dcshuangjia_tag')){ + return true; + } + }, + cardDiscardable:function(card,player,name){ + if(name=='phaseDiscard'&&card.hasGaintag('dcshuangjia_tag')){ + return false; + } + }, + globalTo:function(from,to,distance){ + return distance+Math.min(5,to.countCards('h',card=>card.hasGaintag('dcshuangjia_tag'))); + } + }, + }, + dcbeifen:{ + audio:2, + trigger:{ + player:['loseAfter'], + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + filter:function(event,player){ + var evt=event.getl(player); + if(!evt||!evt.hs||!evt.hs.length) return false; + if(event.name=='lose'){ + for(var i in event.gaintag_map){ + if(event.gaintag_map[i].contains('dcshuangjia_tag')) return true; + } + return false; + } + return player.hasHistory('lose',evt=>{ + if(event!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].contains('dcshuangjia_tag')) return true; + } + return false; + }); + }, + forced:true, + content:function(){ + var suits=lib.suit.slice(); + player.countCards('h',card=>{ + if(!card.hasGaintag('dcshuangjia_tag')) return false; + suits.remove(get.suit(card)); + }); + var cards=[]; + while(suits.length){ + var suit=suits.shift(); + var card=get.cardPile(cardx=>{ + return get.suit(cardx,false)==suit; + }); + if(card) cards.push(card); + } + if(cards.length){ + player.gain(cards,'gain2'); + } + }, + mod:{ + cardUsable:function(card,player){ + var len=player.countCards('h'); + var cnt=player.countCards('h',card=>card.hasGaintag('dcshuangjia_tag')); + if(2*cntcard.hasGaintag('dcshuangjia_tag')); + if(2*cnt{ + if(!cardx.hasGaintag('dcshuangjia_tag')) return false; + if(card==cardx) return false; + suits.remove(get.suit(cardx)); + }); + if(suits.length) return num+suits.length*2.5; + } + }, + }, + }, + //孟优 + dcmanzhi:{ + audio:2, + trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, + filter:function(event,player){ + if(event.name=='phaseJieshu'){ + var del=0; + game.getGlobalHistory('changeHp',evt=>{ + if(evt.player!=player) return; + for(var phase of lib.phaseName){ + var evtx=evt.getParent(phase); + if(evtx&&evtx.name==phase) del+=evt.num; + } + }); + if(del!=0) return false; + } + return game.hasPlayer(current=>{ + if(current==player) return false; + return !player.hasSkill('dcmanzhi_1')&¤t.countCards('he')||!player.hasSkill('dcmanzhi_2')&¤t.countCards('hej'); + }) + }, + direct:true, + content:function(){ + 'step 0' + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + player.chooseTarget(get.prompt2('dcmanzhi'),(card,player,target)=>{ + if(player==target) return false; + return !player.hasSkill('dcmanzhi_1')&&target.countCards('he')||!player.hasSkill('dcmanzhi_2')&&target.countCards('hej'); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + var choices=[]; + var choiceList=[ + '令其交给你两张牌,然后其视为使用一张无距离限制的【杀】', + '你获得其区域内的至多两张牌,然后交给其等量的牌并摸一张牌' + ]; + var chosen=[player.hasSkill('dcmanzhi_1'),player.hasSkill('dcmanzhi_2')]; + if(target.countCards('he')&&(!chosen[0]||trigger.name=='phaseZhunbei')) choices.push('选项一'); + else choiceList[0]=''+choiceList[0]+(chosen[0]?'(已被选择过)':'')+''; + if(target.countCards('hej')&&(!chosen[1]||trigger.name=='phaseZhunbei')) choices.push('选项二'); + else choiceList[1]=''+choiceList[1]+(chosen[1]?'(已被选择过)':'')+''; + if(trigger.name=='phaseJieshu') choices.push('cancel2'); + player.chooseControl(choices).set('choiceList',choiceList).set('ai',()=>{ + return _status.event.choice; + }).set('choice',function(){ + if(target.getUseValue({name:'sha'},false)>5&&!player.hasShan()&&trigger.name=='phaseZhunbei') return 1; + return 0; + }()).set('prompt','蛮智:请选择一项'); + } + else{ + if(_status.connectMode){game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()});} + event.finish(); + } + 'step 2' + if(_status.connectMode){game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()});} + if(result.control=='cancel2'){event.finish();return;} + player.logSkill('dcmanzhi',target); + if(result.control=='选项一'){ + player.addTempSkill('dcmanzhi_1'); + target.chooseCard(2,'he','蛮智:请交给'+get.translation(player)+'两张牌'); + } + else{ + player.addTempSkill('dcmanzhi_2'); + player.gainPlayerCard(target,'hej',[1,2],true); + event.goto(5); + } + 'step 3' + if(result.bool){ + target.give(result.cards,player); + } + else event.finish(); + 'step 4' + target.chooseUseTarget('sha',true,'nodistance'); + event.finish(); + 'step 5' + if(result.bool&&target.isIn()){ + var num=result.cards.length,hs=player.getCards('he'); + if(!hs.length) event.finish(); + else if(hs.lengthplayer.hasValueTarget(card),'h')){ + if(get.position(card)=='e') return 0; + return 8-get.value(card); + } + return 6-get.value(card); + }, + content:function(){ + 'step 0' + var targets=game.filterPlayer(current=>{ + return current.countGainableCards(player,'e'); + }); + if(targets.length==0) event._result={bool:false}; + else if(targets.length==1) event._result={bool:true,targets:targets}; + else player.chooseTarget('自固:获得一名角色装备区里的一张牌',true,(card,player,target)=>{ + return target.countGainableCards(player,'e'); + }).set('ai',target=>{ + if(target==_status.event.player) return 10; + if(get.attitude(_status.event.player,target)<0){ + if(target.hasCard(card=>{ + return get.value(card,player)>=6; + })) return 12; + return 8; + } + return 0; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.gainPlayerCard('e',target,true); + } + 'step 2' + if(!result.bool||target==player||!result.cards||!result.cards.some(i=>get.owner(i)==player)) player.draw(); + }, + ai:{ + order:function(item,player){ + if(!player.hasSkill('dczuowei')) return 9; + if(player.countCards('h')==player.countCards('e')+1&&!player.hasCard(card=>player.hasValueTarget(card),'h')) return 9; + return 1; + }, + result:{ + player:1 + } + } + }, + dczuowei:{ + audio:2, + trigger:{player:'useCard'}, + filter:function(event,player){ + return !player.hasSkill('dczuowei_ban')&&_status.currentPhase==player; + }, + direct:true, + locked:false, + content:function(){ + 'step 0' + var hs=player.countCards('h'); + var es=Math.max(1,player.countCards('e')); + var sign=Math.sign(hs-es); + event.sign=sign; + if(sign>0) player.chooseBool(get.prompt('dczuowei'),'令'+get.translation(trigger.card)+'不可被响应').set('ai',()=>1); + else if(sign==0) player.chooseTarget(get.prompt('dczuowei'),'对一名其他角色造成1点伤害',lib.filter.notMe).set('ai',target=>{ + return get.damageEffect(target,_status.event.player,_status.event.player); + }); + else player.chooseBool(get.prompt('dczuowei'),'摸两张牌,然后此技能于本回合失效').set('ai',()=>1); + 'step 1' + if(!result.bool) event.finish() + else if(event.sign<=0&&!event.isMine()&&!event.isOnline()) game.delayx(); + 'step 2' + var sign=event.sign; + if(sign>0){ + player.logSkill('dczuowei'); + trigger.directHit.addArray(game.players); + event.finish(); + } + else if(sign==0){ + var target=result.targets[0]; + player.logSkill('dczuowei',target); + target.damage(); + } + else{ + player.logSkill('dczuowei'); + player.draw(2); + player.addTempSkill('dczuowei_ban'); + } + }, + subSkill:{ + ban:{charlotte:true} + }, + mod:{ + aiOrder:function(player,card,num){ + if(player.hasSkill('dczuowei_ban')||_status.currentPhase!=player) return; + var cardsh=[],cardse=[]; + if(Array.isArray(card.cards)){ + cardsh.addArray(card.cards.filter(i=>get.position(i)=='h')); + cardse.addArray(card.cards.filter(i=>get.position(i)=='e')); + } + if(_status.currentPhase==player){ + if(get.tag(card,'draw')||get.tag(card,'gain')){ + if(player.countCards('h')-cardsh.length<=Math.max(1,player.countCards('e'))-cardse.length+(get.type(card)=='equip')) return num+10; + return num/5; + } + } + }, + }, + ai:{ + threaten:3, + reverseEquip:true, + effect:{ + player_use:function(card,player,target,current){ + if(player.hasSkill('dczuowei_ban')||_status.currentPhase!=player) return; + if(get.type(card)=='equip'&&get.cardtag(card,'gifts')) return; + if(player.countCards('h')>Math.max(1,player.countCards('e'))) return [1,3]; + } + } + } + }, + //刘宠骆俊 + dcminze:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return !player.hasSkill('dcminze_ban'); + }, + filterTarget:function(card,player,target){ + if(player.getStorage('dcminze_targeted').contains(target)) return false; + return target.countCards('h')get.name(i,player))); + 'step 1' + if(target.countCards('h')>player.countCards('h')){ + player.addTempSkill('dcminze_ban','phaseUseAfter'); + } + }, + ai:{ + order:6.5, + expose:0.2, + }, + subSkill:{ + targeted:{onremove:true,charlotte:true}, + ban:{charlotte:true}, + given:{ + charlotte:true, + onremove:true, + intro:{ + content:'本回合以此法交出的牌名:$', + }, + }, + draw:{ + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + return player.getStorage('dcminze_given').length; + }, + forced:true, + locked:false, + content:function(){ + var num=Math.min(5,player.getStorage('dcminze_given').length)-player.countCards('h'); + if(num>0) player.draw(num); + } + } + } + }, + dcjini:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return player.maxHp-player.countMark('dcjini_counted')>0; + }, + content:function(){ + 'step 0' + player.chooseCard(get.prompt2('dcjini'),[1,player.maxHp-player.countMark('dcjini_counted')],(card,player,target)=>{ + var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player); + return mod=='unchanged'; + }).set('ai',card=>{ + return 6-get.value(card); + }); + 'step 1' + if(result.bool){ + var cards=result.cards; + player.logSkill('dcjini'); + player.addTempSkill('dcjini_counted'); + player.addMark('dcjini_counted',cards.length,false); + player.loseToDiscardpile(cards); + player.draw(cards.length); + } + else event.finish(); + 'step 2' + if(trigger.source&&trigger.source.isIn()&&Array.isArray(result)){ + for(var i of result){ + if(get.name(i,player)=='sha'&&get.owner(i)==player&&get.position(i)=='h'){ + player.chooseToUse(function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },'击逆:是否对'+get.translation(trigger.source)+'使用一张不可被响应的杀?').set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; + return lib.filter.targetEnabled.apply(this,arguments); + }).set('sourcex',trigger.source).set('oncard',()=>{ + _status.event.directHit.addArray(game.players); + }); + break; + } + } + } + }, + subSkill:{ + counted:{ + onremove:true, + charlotte:true + } + } + }, + //乐綝 + dcporui:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + filter:function(event,player){ + if(player==event.player) return false; + if(player.hasSkill('dcporui_round')) return false; + return game.hasPlayer(current=>{ + if(current==player||current==event.player) return false; + return current.getHistory('lose').length>0; + })&&(_status.connectMode||player.hasCard({type:'basic'},'h')); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseCardTarget({ + prompt:get.prompt('dcporui'), + //prompt2:'弃置一张基本牌并选择一名本回合失去过牌的非当前回合的其他角色,你视为对其依次使用'+get.cnNumber(Math.max(0,player.hp)+1)+'张【杀】', + prompt2:get.skillInfoTranslation('dcporui',player), + filterCard:function(card,player){ + if(get.type(card)!='basic') return false; + return lib.filter.cardDiscardable.apply(this,arguments); + }, + selectCard:1, + targets:game.filterPlayer(current=>{ + if(current==player||current==trigger.player) return false; + return current.getHistory('lose').length>0; + }), + filterTarget:function(card,player,target){ + return _status.event.targets.contains(target); + }, + ai1:function(card){ + return 7-get.value(card); + }, + ai2:function(target){ + return get.effect(target,{name:'sha'},_status.event.player,_status.event.player); + } + }); + 'step 1' + if(result.bool){ + var target=result.targets[0],cards=result.cards; + event.target=target; + player.logSkill('dcporui',target); + player.discard(cards); + event.num2=Math.max(0,player.hp); + event.num=event.num2+1; + player.addTempSkill('dcporui_round','roundStart'); + } + else event.finish(); + 'step 2' + var card={name:'sha',isCard:true,storage:{dcporui:true}}; + if(player.canUse(card,target,false)&&target.isIn()){ + player.useCard(card,target); + event.num--; + } + else event.goto(4); + 'step 3' + if(event.num>0) event.goto(2); + 'step 4' + if(!player.hasMark('dcgonghu_damage')){ + var cards=player.getCards('h'); + if(cards.length==0) event._result={bool:false}; + else if(cards.length<=event.num2) event._result={bool:true,cards:cards}; + else player.chooseCard('破锐:交给'+get.translation(target)+get.cnNumber(event.num2)+'张手牌',true,event.num2); + } + else event.goto(6) + 'step 5' + if(result.bool){ + player.give(result.cards,target); + } + 'step 6' + if(player.hasMark('dcgonghu_basic')){ + if(!target.hasHistory('damage',evt=>{ + return evt.card&&evt.card.storage&&evt.card.storage.dcporui&&evt.getParent('dcporui')==event; + })){ + player.recover(); + } + } + }, + subSkill:{ + round:{charlotte:true} + }, + ai:{ + expose:0.4, + threaten:4.8 + } + }, + dcgonghu:{ + audio:2, + trigger:{ + player:['loseAfter','damageEnd'], + source:'damageSource', + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + forced:true, + filter:function(event,player){ + if(event.name=='damage'){ + if(player.hasMark('dcgonghu_damage')) return false; + return _status.currentPhase&&_status.currentPhase!=player; + } + if(player.hasMark('dcgonghu_basic')) return false; + var evt=event.getl(player); + return evt&&evt.cards2&&evt.cards2.some(i=>get.type2(i,player)=='basic'); + }, + group:['dcgonghu_basic','dcgonghu_trick'], + content:function(){ + player.addMark('dcgonghu_'+(trigger.name=='damage'?'damage':'basic'),1,false); + game.log(player,'修改了技能','#g【破锐】'); + }, + subSkill:{ + trick:{ + audio:'dcgonghu', + trigger:{player:'useCard2'}, + direct:true, + locked:true, + filter:function(event,player){ + if(!player.hasMark('dcgonghu_basic')||!player.hasMark('dcgonghu_damage')) return false; + var card=event.card; + if(get.color(card,false)!='red'||get.type(card,null,true)!='trick') return false; + var info=get.info(card); + if(info.allowMultiple==false) return false; + if(event.targets&&!info.multitarget){ + if(game.hasPlayer(function(current){ + return !event.targets.contains(current)&&lib.filter.targetEnabled2(card,player,current); + })){ + return true; + } + } + return false; + }, + content:function(){ + 'step 0' + var prompt2='为'+get.translation(trigger.card)+'增加一个目标' + player.chooseTarget(get.prompt('dcgonghu_trick'),function(card,player,target){ + var player=_status.event.player; + return !_status.event.targets.contains(target)&&lib.filter.targetEnabled2(_status.event.card,player,target); + }).set('prompt2',prompt2).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player); + }).set('card',trigger.card).set('targets',trigger.targets); + 'step 1' + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.targets=result.targets; + } + else{ + event.finish(); + } + 'step 2' + if(event.targets){ + player.logSkill('dcgonghu_trick',event.targets); + trigger.targets.addArray(event.targets); + } + }, + }, + basic:{ + audio:'dcgonghu', + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + if(!player.hasMark('dcgonghu_basic')||!player.hasMark('dcgonghu_damage')) return false; + var card=event.card; + return (get.color(card,false)=='red'&&get.type(card,null,false)=='basic'); + }, + content:function(){ + trigger.directHit.addArray(game.filterPlayer()); + game.log(trigger.card,'不可被响应'); + }, + }, + } + }, + //张闿 + dcxiangshu:{ + audio:2, + trigger:{global:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return event.player!=player&&event.player.countCards('h')>=event.player.hp; + }, + content:function(){ + 'step 0' + var list=[0,1,2,3,4,5,'cancel2']; + player.chooseControl(list).set('prompt',get.prompt2('dcxiangshu')).set('ai',()=>{ + return _status.event.choice; + }).set('choice',function(){ + if(get.attitude(player,trigger.player)>0) return 'cancel2'; + var cards=trigger.player.getCards('h'); + var num=0; + for(var card of cards){ + if(!trigger.player.hasValueTarget(card)){ + num++; + if(num>=5) break; + } + } + if(cards.length>=3&&Math.random()<0.5) num=Math.max(0,num-1); + return num; + }()); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('dcxiangshu',trigger.player); + var num=result.index; + player.storage.dcxiangshu_lottery=num; + player.addTempSkill('dcxiangshu_lottery','phaseUseAfter'); + } + else event.finish(); + 'step 2' + player.chooseToDiscard('相鼠:是否弃置一张牌不公布此数字?').set('ai',card=>2-get.value(card)); + 'step 3' + if(!result.bool){ + var num=player.storage.dcxiangshu_lottery; + player.markSkill('dcxiangshu_lottery'); + player.popup(num); + game.log(player,'选择了数字','#g'+num); + } + }, + subSkill:{ + lottery:{ + audio:'dcxiangshu', + trigger:{global:'phaseUseEnd'}, + charlotte:true, + forced:true, + onremove:true, + logTarget:'player', + filter:function(event,player){ + return typeof player.storage.dcxiangshu_lottery=='number'&&Math.abs(event.player.countCards('h')-player.storage.dcxiangshu_lottery)<=1; + }, + content:function(){ + var delt=Math.abs(trigger.player.countCards('h')-player.storage.dcxiangshu_lottery); + if(delt<=1&&trigger.player.countGainableCards('he',player)>0){ + player.gainPlayerCard(trigger.player,'he',true); + } + if(delt==0){ + trigger.player.damage(player); + } + }, + intro:{content:'猜测的数字为#'} + } + } + }, + //裴元绍 + dcmoyu:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return !player.hasSkill('dcmoyu_ban'); + }, + filterTarget:function(card,player,target){ + return player!=target&&!player.getStorage('dcmoyu_clear').contains(target)&&target.countGainableCards(player,'hej'); + }, + global:'dcmoyu_ai', + content:function(){ + 'step 0' + player.addTempSkill('dcmoyu_clear'); + player.markAuto('dcmoyu_clear',[target]); + player.gainPlayerCard(target,'hej',true); + 'step 1' + var num=player.getStorage('dcmoyu_clear').length; + target.chooseToUse(function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },'是否对'+get.translation(player)+'使用一张【杀】(伤害基数为'+num+')?').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; + return lib.filter.filterTarget.apply(this,arguments); + }).set('sourcex',player).set('num',num).set('oncard',card=>{ + var evt=_status.event; + evt.baseDamage=evt.num; + }); + 'step 2' + if(result.bool){ + if(player.hasHistory('damage',evt=>{ + return evt.card&&evt.card.name=='sha'&&evt.getParent(4)==event; + })) player.addTempSkill('dcmoyu_ban'); + } + }, + subSkill:{ + clear:{ + charlotte:true, + onremove:true, + }, + ban:{charlotte:true}, + ai:{ + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='delay'&¤t<0){ + var currentx=_status.currentPhase; + if(!currentx||!currentx.isIn()) return; + var list=game.filterPlayer(current=>{ + if(current==target) return true; + if(!current.hasSkill('dcmoyu')) return false; + if(current.hasJudge('lebu')) return false; + return get.attitude(current,target)>0; + }); + list.sortBySeat(currentx); + if(list.indexOf(target)!=0) return 'zerotarget'; + } + }, + }, + } + } + }, + ai:{ + order:9, + threaten:2.4, + result:{ + target:function(player,target){ + var eff=get.effect(target,{name:'shunshou'},player,player); + if(eff>0) return eff/10; + if(player.hasShan()&&!target.hasSkillTag('directHit_ai',true,{ + target:player, + card:{name:'sha'}, + },true)) return eff; + if(player.getStorage('dcmoyu_clear').length||player.hp+player.countCards('hs','tao')<=1) return 0; + return eff; + } + } + } + }, + //张楚 + dcjizhong:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:lib.filter.notMe, + selectTarget:1, + content:function(){ + 'step 0' + target.draw(2); + 'step 1' + var marked=target.hasMark('dcjizhong'); + if(marked){ + if(target.countCards('h')) target.chooseToDiscard('集众:弃置三张手牌',3,true); + event.finish(); + } + else{ + target.chooseToDiscard('集众:弃置三张手牌,或点击“取消”获得“信众”标记',3); + } + 'step 2' + if(!result.bool){ + target.addMark('dcjizhong',1); + } + }, + marktext:'信', + intro:{ + name:'信众', + name2:'信众', + markcount:()=>0, + content:'已成为信徒', + }, + ai:{ + order:9.5, + result:{ + target:function(player,target){ + if(get.attitude(player,target)>0) return 1; + var num=target.countCards('h'); + if(num<=1) return -num; + return -1/(num/2+1); + } + } + } + }, + dcrihui:{ + audio:2, + trigger:{player:'useCardAfter'}, + usable:1, + filter:function(event,player){ + if(!event.targets||event.targets.length!=1||event.targets[0]==player) return false; + var card=event.card; + var target=event.targets[0]; + var marked=target.hasMark('dcjizhong'); + return (get.type(card)=='trick'||get.color(card)=='black'&&get.type(card)=='basic')&& + (marked||!marked&&game.hasPlayer(current=>current.hasMark('dcjizhong'))); + }, + direct:true, + content:function(){ + 'step 0' + var target=trigger.targets[0]; + var card={name:trigger.card.name,nature:trigger.card.nature,isCard:true}; + event.target=target; + event.card=card; + if(target.hasMark('dcjizhong')) player.gainPlayerCard(get.prompt('dcrihui',target),target,'hej').set('logSkill',['dcrihui',target]); + else{ + player.chooseBool(get.prompt('dcrihui',target),'令所有有“信众”的角色依次视为对其使用一张'+get.translation(card)).set('ai',()=>{ + return _status.event.bool; + }).set('bool',function(){ + var eff=0; + game.countPlayer(current=>{ + if(!current.hasMark('dcjizhong')) return; + eff+=get.effect(target,card,current,player); + }); + return eff>0; + }()); + } + 'step 1' + if(!result.bool){ + player.storage.counttrigger.dcrihui--; + event.finish(); + return; + } + if(target.hasMark('dcjizhong')) event.finish(); + else{ + player.logSkill('dcrihui',target); + event.targets=game.filterPlayer(current=>current.hasMark('dcjizhong')); + event.targets.sortBySeat(_status.currentPhase); + } + 'step 2' + var current=event.targets.shift(); + if(current.canUse(card,target,false)){ + current.useCard(card,target,false); + } + if(event.targets.length) event.redo(); + } + }, + dcguangshi:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return !game.hasPlayer(current=>current!=player&&!current.hasMark('dcjizhong')); + }, + forced:true, + content:function(){ + player.loseHp(); + player.draw(2); + } + }, + //董绾 + dcshengdu:{ + audio:2, + trigger:{player:'phaseBegin'}, + direct:true, + content:function(){ + 'step 0' + if(target) event._result={bool:true,targets:[target]}; + else player.chooseTarget(get.prompt2('dcshengdu'),lib.filter.notMe).set('ai',target=>{ + var player=_status.event.player; + var att=get.attitude(player,target); + var eff=get.effect(target,{ + name:'sha', + storage:{dcxianjiao:true}, + },player,player); + var value=att/5; + if(value<0) value=-value/1.3; + value=Math.max(value-eff/20,0.01); + var skills=target.getSkills(null,false,false); + for(var skill of skills){ + var str=get.skillInfoTranslation(skill,target); + if(/摸牌阶段[^少放弃]{0,8}摸/.test(str)) value+=Math.random()/2+1.5; + } + return value; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcshengdu',target); + target.addSkill('dcshengdu_effect'); + target.markAuto('dcshengdu_effect',[player]); + } + }, + subSkill:{ + effect:{ + trigger:{player:'gainAfter'}, + charlotte:true, + forced:true, + popup:false, + filter:function(event,player){ + return event.getParent(2).name=='phaseDraw'; + }, + content:function(){ + 'step 0' + var targets=player.getStorage('dcshengdu_effect'); + event.targets=targets.sortBySeat(player); + 'step 1' + var target=targets.shift(); + if(target.isIn()){ + target.logSkill('dcshengdu_effect',player); + target.draw(trigger.cards.length); + } + if(targets.length) event.redo(); + 'step 2' + player.removeSkill('dcshengdu_effect'); + game.delayx(); + }, + marktext:'绞', + intro:{ + content:'下个摸牌阶段获得牌后,$摸等量的牌' + } + } + } + }, + dcxianjiao:{ + audio:2, + enable:'phaseUse', + usable:1, + position:'hs', + viewAs:{ + name:'sha', + storage:{dcxianjiao:true} + }, + filterCard:function(card,player){ + if(ui.selected.cards.length){ + return get.color(card)!=get.color(ui.selected.cards[0]); + } + return true; + }, + selectCard:2, + complexCard:true, + check:function(card){ + return 6-get.value(card); + }, + precontent:function(){ + player.addTempSkill('dcxianjiao_after'); + event.getParent().addCount=false; + }, + ai:{ + order:function(item,player){ + return get.order({name:'sha'})+0.1; + }, + }, + locked:false, + mod:{ + targetInRange:function(card){ + if(card.storage&&card.storage.dcxianjiao) return true; + }, + }, + subSkill:{ + after:{ + trigger:{global:'useCardAfter'}, + forced:true, + direct:true, + charlotte:true, + filter:function(event,player){ + return event.card.name=='sha'&&event.card.storage&&event.card.storage.dcxianjiao; + }, + content:function(){ + 'step 0' + var damaged=game.hasPlayer2(current=>{ + return current.hasHistory('damage',evt=>evt.card==trigger.card); + }); + var targets=trigger.targets.filter(i=>i.isIn()); + player.logSkill('dcxianjiao_after',targets); + if(damaged){ + for(var target of targets){ + target.loseHp(); + } + } + else{ + for(var target of targets){ + var next=game.createEvent('dcshengdu',false); + next.player=player; + next.target=target; + next.setContent(lib.skill.dcshengdu.content); + } + } + } + } + } + }, + //袁胤 + dcmoshou:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + init:function(player,skill){ + if(typeof player.storage[skill]!='number') player.storage[skill]=0; + }, + filter:function(event,player){ + return get.color(event.card)=='black'&&event.player!=player; + }, + frequent:true, + prompt2:function(event,player){ + var num=player.getAllHistory('useSkill',evt=>evt.skill=='dcmoshou').length%3+1; + return '摸'+get.cnNumber(num)+'张牌'; + }, + content:function(){ + var num=player.getAllHistory('useSkill',evt=>evt.skill=='dcmoshou').length; + player.storage.dcmoshou=num; + player.syncStorage('dcmoshou'); + player.markSkill('dcmoshou'); + num=(num-1)%3+1; + player.draw(num); + }, + mark:true, + marktext:'守', + intro:{ + markcount:function(storage,player){ + if(typeof storage!='number') return 1; + return storage%3+1; + }, + content:'本局游戏已发动过$次技能', + } + }, + dcyunjiu:{ + audio:2, + trigger:{global:'dieAfter'}, + direct:true, + content:function(){ + 'step 0' + var evt=trigger.player.getHistory('lose',evtx=>{ + return evtx.getParent(2)==trigger; + })[0]; + if(!evt) event.finish(); + else{ + var cards=[]; + //冷知识,角色死亡后只有手牌区和装备区的牌是被系统弃置的,其余牌的处理方式均为置入弃牌堆 + cards.addArray(evt.hs).addArray(evt.es); + event.cards=cards.filterInD('d'); + var num=cards.length; + if(num){ + event.videoId=lib.status.videoId++; + var func=function(cards,id){ + var num=cards.length; + var dialog=ui.create.dialog(get.prompt('dcyunjiu'),'
弃置'+get.cnNumber(num)+'张牌,令一名其他角色获得以下这些牌
',cards); + dialog.videoId=id; + return dialog; + }; + if(player.isOnline2()){ + player.send(func,cards,event.videoId); + } + event.dialog=func(cards,event.videoId); + if(player!=game.me||_status.auto){ + event.dialog.style.display='none'; + } + player.chooseCardTarget({ + prompt:false, + filterTarget:lib.filter.notMe, + filterCard:lib.filter.cardDiscardable, + selectCard:num, + position:'he', + goon:function(){ + if(!game.hasPlayer(current=>get.attitude(player,current))>0) return false; + var value=0; + for(var card of cards){ + value+=get.value(card,player,'raw')-1.2; + } + return value>0; + }(), + ai1:function(card){ + if(_status.event.goon){ + if(ui.selected.cards.length==_status.event.selectCard[1]-1&&ui.selected.cards.length>0) return 7-get.value(card); + return 5.5-get.value(card); + } + return 0; + }, + ai2:function(target){ + return get.attitude(_status.event.player,target)/Math.sqrt(target.countCards('h')+1); + } + }); + } + else event.finish(); + } + 'step 1' + if(player.isOnline2()){player.send('closeDialog',event.videoId)} + event.dialog.close(); + if(result.bool){ + var cardsx=result.cards,target=result.targets[0]; + player.logSkill('dcyunjiu',target); + player.discard(cardsx); + target.gain(cards.filterInD('d'),'gain2').giver=player; + } + else event.finish(); + 'step 2' + player.gainMaxHp(); + player.recover(); + } + }, + //高翔 + dcchiying:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target.hp<=player.hp; + }, + content:function(){ + 'step 0' + var targets=game.filterPlayer(current=>target.inRange(current)&¤t!=player).sortBySeat(player); + event.targets=targets; + 'step 1' + var current=targets.shift(); + if(current.countCards('he')) current.chooseToDiscard('驰应:请弃置一张牌','he',true); + if(targets.length) event.redo(); + 'step 2' + if(target!=player){ + var cards=[]; + game.getGlobalHistory('cardMove',evt=>{ + if(evt.getParent(3)==event){ + cards.addArray(evt.cards.filter(card=>get.type(card)=='basic')); + } + }); + cards=cards.filterInD('d'); + if(cards.length) target.gain(cards,'gain2'); + } + }, + ai:{ + order:6, + result:{ + target:function(player,target){ + var targets=game.filterPlayer(current=>target.inRange(current)&¤t!=player); + var eff=0; + for(var targetx of targets){ + var effx=get.effect(targetx,{name:'guohe_copy2'},player,target); + if(get.attitude(player,targetx)<0) effx/=2; + eff+=effx; + } + return (target==player?0.5:1)*eff*(get.attitude(player,target)<=0?0.75:1); + } + } + } + }, + //霍峻 + dcgue:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + hiddenCard:function(player,name){ + if(player.getStorage('dcgue').contains(_status.currentPhase)) return false; + return name=='sha'||name=='shan'; + }, + filter:function(event,player){ + //if(event.dcgue||event.type=='wuxie'||player==_status.currentPhase||player.getStorage('dcgue').contains(_status.currentPhase)) return false; + if(event.dcgue||event.type=='wuxie'||player==_status.currentPhase) return false; + if(!player.countCards('h')||player.hasSkill('dcgue_blocker',null,null,false)) return false; + for(var name of ['sha','shan']){ + if(event.filterCard({name:name,isCard:true},player,event)) return true; + } + return false; + }, + chooseButton:{ + dialog:function(event,player){ + var vcards=[]; + for(var name of ['sha','shan']){ + var card={name:name,isCard:true}; + if(event.filterCard(card,player,event)) vcards.push(['基本','',name]); + } + return ui.create.dialog('孤扼',[vcards,'vcard'],'hidden'); + }, + check:function(button){ + if(_status.event.player.countCards('h',{name:['sha','shan']})>1) return 0; + return 1; + }, + backup:function(links,player){ + return { + filterCard:()=>false, + selectCard:-1, + viewAs:{ + name:links[0][2], + isCard:true, + }, + popname:true, + precontent:function(){ + 'step 0' + player.logSkill('dcgue'); + player.addTempSkill('dcgue_blocker'); + player.showHandcards(); + delete event.result.skill; + 'step 1' + if(player.countCards('h',{name:['sha','shan']})>1){ + var evt=event.getParent(); + evt.set('dcgue',true); + evt.goto(0); + delete evt.openskilldialog; + return; + } + //else player.markAuto('dcgue',[_status.currentPhase]); + game.delayx(); + }, + } + }, + prompt:function(links,player){ + return '展示所有手牌'+(player.countCards('h',{name:['sha','shan']})<=1?',然后视为使用【'+get.translation(links[0][2])+'】':''); + } + }, + subSkill:{blocker:{charlotte:true}}, + //intro:{content:'已于$的回合发动过技能'}, + ai:{ + order:1, + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag,arg){ + //if(player.getStorage('dcgue').contains(_status.currentPhase)) return false; + if(player.countCards('h',{name:['sha','shan']})>1) return false; + }, + result:{ + player:function(player){ + if(player.countCards('h',{name:['sha','shan']})>1) return 0; + return 1; + } + } + } + }, + dcsigong:{ + audio:2, + trigger:{global:'phaseEnd'}, + filter:function(event,player){ + if(player.hasSkill('dcsigong_round')) return false; + if(event.player==player||!event.player.isIn()) return false; + if(!player.canUse('sha',event.player,false)) return false; + var respondEvts=[]; + game.countPlayer2(current=>respondEvts.addArray(current.getHistory('useCard')).addArray(current.getHistory('respond'))); + respondEvts=respondEvts.filter(i=>i.respondTo).map(evt=>evt.respondTo); + return event.player.hasHistory('useCard',evt=>{ + return respondEvts.some(list=>list[1]==evt.card); + }); + }, + direct:true, + content:function(){ + 'step 0' + var num=1-player.countCards('h'); + event.num=num; + var prompt2=''; + if(num>=0){ + var next=player.chooseBool().set('ai',()=>_status.event.goon); + prompt2+=(num>0?'摸一张牌,':'')+'视为对'+get.translation(trigger.player)+'使用一张【杀】(伤害基数+1)'; + } + else{ + var next=player.chooseToDiscard(-num).set('ai',card=>{ + if(_status.event.goon) return 5.2-get.value(card); + return 0; + }).set('logSkill',['dcsigong',trigger.player]); + prompt2+='将手牌数弃置至1,视为对'+get.translation(trigger.player)+'使用一张【杀】(伤害基数+1)'; + } + next.set('prompt',get.prompt('dcsigong',trigger.player)); + next.set('prompt2',prompt2); + next.set('goon',get.effect(trigger.player,{name:'sha'},player,player)>0); + 'step 1' + if(result.bool){ + if(num>=0) player.logSkill('dcsigong',trigger.player); + if(num>0) player.draw(num,'nodelay'); + event.num=Math.max(1,Math.abs(num)); + } + else event.finish(); + 'step 2' + if(player.canUse('sha',trigger.player,false)){ + player.addTempSkill('dcsigong_check'); + player.useCard({name:'sha',isCard:true},trigger.player,false).set('shanReq',num).set('oncard',card=>{ + var evt=_status.event; + evt.baseDamage++; + for(var target of evt.targets){ + var id=target.playerid; + var map=evt.customArgs; + if(!map[id]) map[id]={}; + map[id].shanRequired=evt.shanReq; + } + }); + } + }, + subSkill:{ + round:{charlotte:true}, + check:{ + charlotte:true, + forced:true, + popup:false, + trigger:{source:'damageSource'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.getParent(3).name=='dcsigong'; + }, + content:function(){ + player.addTempSkill('dcsigong_round','roundStart'); + } + } + } + }, + //孙寒华 + dchuiling:{ + audio:2, + trigger:{player:'useCard'}, + forced:true, + direct:true, + filter:function(){ + return ui.discardPile.childNodes.length>0; + }, + onremove:true, + marktext:'灵', + intro:{ + name2:'灵', + content:'mark', + }, + content:function(){ + 'step 0' + var mark=false; + var red=0,black=0; + for(var i=0;iblack){ + player.logSkill('dchuiling'); + player.recover(); + event.finish(); + if(get.color(trigger.card)=='black') mark=true; + event.logged=true; + } + else{ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + player.chooseTarget(get.prompt('dchuiling'),'弃置一名角色的一张牌',(card,player,target)=>{ + return target.countDiscardableCards(player,'he')>0; + }).set('ai',target=>{ + return get.effect(target,{name:'guohe_copy2'},_status.event.player); + }); + if(get.color(trigger.card)=='red') mark=true; + } + if(mark){ + if(!event.logged) player.logSkill('dchuiling'); + player.addMark('dchuiling',1); + event.logged=true; + } + 'step 1' + if(result.bool){ + var target=result.targets[0]; + if(!event.logged) player.logSkill('dchuiling',target); + else player.line(target); + player.discardPlayerCard(target,'he',true); + } + }, + mod:{ + aiOrder:function(player,card,num){ + if(get.itemtype(card)!='card') return; + var len=ui.discardPile.childNodes.length; + if(!len){ + var type=get.type(card); + if(type=='basic'||type=='trick'){ + if(player.getDamagedHp()>0){ + return num+(get.color(card)=='red'?15:10); + } + return num+10; + } + return; + } + if(len>40) return; + var red=0,black=0; + for(var i=0;i0){ + return num+(get.color(card)=='red'?15:10); + } + return num+10; + } + return; + } + else{ + var color=get.color(card); + if(color=='red'&&redblack) return num+10; + } + }, + } + }, + dcchongxu:{ + audio:2, + enable:'phaseUse', + limited:true, + skillAnimation:true, + animationColor:'wood', + derivation:['dctaji','dcqinghuang'], + filterCard:()=>false, + selectCard:[0,1], + prompt:function(){ + return '限定技。你可以失去〖汇灵〗,增加'+_status.event.player.countMark('dchuiling')+'点体力上限,然后获得〖踏寂〗和〖清荒〗。' + }, + filter:function(event,player){ + return player.countMark('dchuiling')>=4; + }, + content:function(){ + 'step 0' + player.awakenSkill('dcchongxu'); + player.gainMaxHp(player.countMark('dchuiling')); + player.removeSkill('dchuiling'); + 'step 1' + player.addSkillLog('dctaji'); + player.addSkillLog('dcqinghuang'); + }, + ai:{ + order:function(itemp,player){ + if(player.hasCard(card=>{ + return get.type(card)!='equip'&&player.getUseValue(card)>1; + },'h')) return 12; + return 0.1; + }, + result:{ + player:function(player){ + return (player.countMark('dchuiling')>=6||player.hp<=2)?1:0; + } + } + } + }, + dctaji:{ + audio:2, + trigger:{ + player:'loseAfter', + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + forced:true, + locked:false, + filter:function(event,player){ + var evt=event.getl(player); + return evt&&evt.hs&&evt.hs.length; + }, + content:function(){ + 'step 0' + var evt=trigger.getParent(); + var effects=[ + ['useCard',function(){ + 'step 0' + var targets=game.filterPlayer(current=>{ + return current.countDiscardableCards(player,'he')&¤t!=player; + }); + if(!targets.length) event.finish(); + else player.chooseTarget('踏寂:弃置其他角色一张牌',true,(card,player,target)=>{ + return _status.event.targets.contains(target); + }).set('targets',targets).set('ai',target=>{ + return get.effect(target,{name:'guohe_copy2'},_status.event.player); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.line(target); + player.discardPlayerCard(target,'he',true); + } + }], + ['respond',function(){ + player.draw(); + }], + ['discard',function(){ + player.recover(); + }], + ['other',function(){ + player.addSkill('dctaji_damage'); + player.addMark('dctaji_damage',1,false); + game.log(player,'下一次对其他角色造成的伤害','#g+1'); + + }] + ]; + var name=evt.name; + if(trigger.name=='loseAsync') name=evt.type; + var list=['useCard','respond','discard','other']; + if(!list.contains(name)) name='other'; + for(var i=0;i<1+player.countMark('dcqinghuang_add');i++){ + if(!list.length) break; + if(!list.contains(name)) name=list.randomRemove(1)[0]; + if(name=='useCard') list.remove('useCard'); + for(var effect of effects){ + if(effect[0]==name){ + list.remove(name); + var next=game.createEvent('dctaji_'+name); + next.player=player; + next.setContent(effect[1]); + break; + } + } + } + }, + subSkill:{ + damage:{ + trigger:{source:'damageBegin3'}, + forced:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + return event.player!=player; + }, + content:function(){ + trigger.num+=player.countMark('dctaji_damage'); + player.removeSkill('dctaji_damage'); + }, + intro:{ + content:'下次对其他角色造成伤害时,此伤害+#', + } + } + } + }, + dcqinghuang:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return player.maxHp>1; + }, + check:function(event,player){ + var num1=player.countCards('h'); + var num2=player.countCards('h',card=>player.hasValueTarget(card)); + var num3=player.getHandcardLimit(); + if(player.isDamaged()){ + return num2>1||num1-num2-num3>0; + } + else{ + return num2>2+Math.max(0,3-player.hp)||player.hp>2&&num1-num2-num3>2; + } + }, + content:function(){ + player.loseMaxHp(); + player.addTempSkill('dcqinghuang_add'); + player.addMark('dcqinghuang_add',1,false); + }, + subSkill:{ + add:{ + charlotte:true, + onremove:true, + } + } + }, + //孟节 + dcyinlu:{ + audio:2, + trigger:{ + global:'phaseBefore', + player:'enterGame', + }, + forced:true, + locked:false, + derivation:['dcyinlu_lequan','dcyinlu_huoxi','dcyinlu_zhangqi','dcyinlu_yunxiang'], + global:['dcyinlu_lequan','dcyinlu_huoxi','dcyinlu_zhangqi','dcyinlu_yunxiang'], + group:'dcyinlu_move', + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); + }, + hasMark:function(target){ + return lib.skill.dcyinlu.derivation.some(i=>target.hasMark(i)); + }, + content:function(){ + 'step 0' + event.marks=lib.skill.dcyinlu.derivation.slice(0,3); + if(game.countPlayer()<=2) event.goto(3); + 'step 1' + player.chooseTarget('引路:令三名角色分别获得〖引路〗标记',true,3).set('targetprompt',()=>{ + return get.translation(lib.skill.dcyinlu.derivation[ui.selected.targets.length-1]); + }).set('complexSelect',true).set('ai',target=>{ + var player=_status.event.player; + if(ui.selected.targets.length==2) return get.effect(target,{name:'losehp'},player,player); + return get.attitude(player,target); + }); + 'step 2' + if(result.bool){ + var targets=result.targets; + player.line(targets); + for(var i=0;i
【'+ + get.translation(mark)+'】
'+lib.translate[mark+'_info']+'
']) + } + var target=game.filterPlayer(i=>i!=player)[0]; + event.target=target; + player.chooseButton(['引路:令'+get.translation(target)+'获得2枚〖引路〗标记',[list,'textbutton']]).set('ai',button=>{ + var mark=button.link; + if(mark=='dcyinlu_lequan') return 9; + if(mark=='dcyinlu_zhangqi') return 10; + return 8; + }).set('forced',true).set('selectButton',2).set('forcebutton',true); + 'step 4' + if(result.bool){ + var marks=result.links; + for(var mark of marks) target.addMark(mark,1); + event.marks.removeArray(marks); + for(var mark of event.marks) player.addMark(mark,1); + } + 'step 5' + player.addMark('dcyinlu_yunxiang',1); + player.addMark('dcyinlu_xiang',1); + game.log(player,'获得了1点芸香值'); + }, + subSkill:{ + move:{ + audio:'dcyinlu', + trigger:{ + player:'phaseZhunbeiBegin', + global:'die', + }, + direct:true, + filter:function(event,player){ + if(event.name=='die'){ + return lib.skill.dcyinlu.hasMark(event.player); + } + return game.hasPlayer(current=>{ + return lib.skill.dcyinlu.hasMark(current); + }) + }, + content:function(){ + 'step 0' + if(trigger.name=='die'){ + var marks=lib.skill.dcyinlu.derivation.filter(mark=>trigger.player.hasMark(mark)); + event.marks=marks; + event.goto(3); + } + else{ + if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); + player.chooseTarget(get.prompt('dcyinlu_move'),'移动一名角色的〖引路〗标记',2,(card,player,target)=>{ + if(ui.selected.targets.length==0) return lib.skill.dcyinlu.hasMark(target); + return true; + }).set('ai',target=>{ + var player=_status.event.player; + if(ui.selected.targets.length==0){ + var owned=lib.skill.dcyinlu.derivation.filter(i=>target.hasMark(i)); + var att=get.attitude(player,target); + if(att>0){ + if(owned.contains('dcyinlu_zhangqi')) return target.hasCard({suit:'spade'},'he')?5:10; + if(owned.contains('dcyinlu_lequan')&&target.isHealthy()&&game.hasPlayer(current=>{ + return current!=target&&get.recoverEffect(current,player,player)>0; + })) return 2; + return 0; + } + if(att<0){ + if(owned.some(i=>i!='dcyinlu_zhangqi')) return 8; + return 0; + } + if(owned.contains('dcyinlu_zhangqi')&&game.hasPlayer(current=>{ + return current!=target&&get.effect(current,{name:'losehp'},player,player)>0; + })) return 3; + return 1; + } + else{ + var targetx=ui.selected.targets[0]; + var att=get.attitude(player,targetx),att2=get.attitude(player,target); + var owned=lib.skill.dcyinlu.derivation.filter(i=>targetx.hasMark(i)); + if(att>0){ + if(owned.contains('dcyinlu_zhangqi')) return -att2; + if(owned.contains('dcyinlu_lequan')) return get.recoverEffect(target,player,player); + } + else if(att<0){ + if(owned.some(i=>i!='dcyinlu_zhangqi')) return att2; + } + else{ + if(owned.contains('dcyinlu_zhangqi')) return get.effect(target,{name:'losehp'},player,player); + return att2; + } + } + return Math.random(); + }); + } + 'step 1' + if(result.bool){ + var marks=lib.skill.dcyinlu.derivation; + var targets=result.targets,owned=marks.filter(mark=>targets[0].hasMark(mark)); + event.targets=targets; + if(owned.length==1) event._result={bool:true,control:owned[0]}; + else{ + player.chooseControl(owned).set('prompt','引路:选择要移动'+get.translation(targets[0])+'的标记').set('choiceList',owned.map(mark=>{ + return '
【'+get.translation(mark)+'】
'+lib.translate[mark+'_info']+'
'; + })).set('displayIndex',false).set('ai',()=>{ + return _status.event.choice; + }).set('choice',function(){ + var att=get.attitude(player,targets[0]),att2=get.attitude(player,targets[1]); + if(att>0){ + if(owned.contains('dcyinlu_zhangqi')&&att2<0) return 'dcyinlu_zhangqi'; + if(owned.contains('dcyinlu_lequan')&&att2>0) return 'dcyinlu_lequan'; + } + else if(att<0){ + var marksx=owned.filter(i=>i!='dcyinlu_zhangqi'); + if(marksx.length&&att2>0) return marksx[0]; + return owned[0]; + } + else{ + if(owned.contains('dcyinlu_zhangqi')) return 'dcyinlu_zhangqi'; + } + if(owned.length>1) owned.remove('dcyinlu_zhangqi'); + return owned[0]; + }()); + } + } + else{ + if(_status.connectMode) game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); + event.finish(); + } + 'step 2' + if(_status.connectMode) game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); + var mark=result.control,count=targets[0].countMark(mark); + player.logSkill('dcyinlu_move',targets,false); + player.line2(targets,mark=='dcyinlu_zhangqi'?'fire':'green'); + targets[0].removeMark(mark,count); + targets[1].addMark(mark,count); + event.finish(); + 'step 3' + player.chooseTarget('引路:是否转移“'+get.translation(event.marks[0])+'”标记?').set('ai',target=>{ + var player=_status.event.player,mark=_status.event.mark; + if(mark=='dcyinlu_zhangqi') return get.effect(target,{name:'losehp'},player,player)+0.1; + if(mark=='dcyinlu_lequan') return get.recoverEffect(target,player,player)+get.attitude(player,target)/5; + return get.attitude(player,target); + }).set('mark',event.marks[0]); + 'step 4' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcyinlu_move',target); + var count=trigger.player.countMark(event.marks[0]); + trigger.player.removeMark(event.marks[0],count,false); + target.addMark(event.marks[0],count); + } + 'step 5' + event.marks.shift(); + if(event.marks.length) event.goto(3); + } + }, + lequan:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + charlotte:true, + filter:function(event,player){ + return player.hasMark('dcyinlu_lequan')&&game.hasPlayer(current=>current.hasSkill('dcyinlu')); + }, + marktext:'乐', + intro:{ + name:'乐泉', + name2:'乐泉', + markcount:()=>0, + content:'结束阶段,你可以弃置一张♦牌并回复1点体力。' + }, + content:function(){ + 'step 0' + player.chooseToDiscard('乐泉:是否弃置一张♦牌并回复1点体力?',{suit:'diamond'},'he').set('ai',card=>{ + if(_status.event.goon) return 7-get.value(card); + return 0; + }).set('logSkill','dcyinlu_lequan').set('goon',get.recoverEffect(player,player)); + 'step 1' + if(result.bool){ + player.recover(); + } + } + }, + huoxi:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + charlotte:true, + filter:function(event,player){ + return player.hasMark('dcyinlu_huoxi')&&game.hasPlayer(current=>current.hasSkill('dcyinlu')); + }, + marktext:'藿', + intro:{ + name:'藿溪', + name2:'藿溪', + markcount:()=>0, + content:'结束阶段,你可以弃置一张♥牌并摸两张牌。' + }, + content:function(){ + 'step 0' + player.chooseToDiscard('藿溪:是否弃置一张♥牌并摸两张牌?',{suit:'heart'},'he').set('ai',card=>{ + return 6-get.value(card); + }).set('logSkill','dcyinlu_huoxi'); + 'step 1' + if(result.bool){ + player.draw(2); + } + }, + }, + zhangqi:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + direct:true, + charlotte:true, + filter:function(event,player){ + return player.hasMark('dcyinlu_zhangqi')&&game.hasPlayer(current=>current.hasSkill('dcyinlu')); + }, + marktext:'瘴', + intro:{ + name:'瘴气', + name2:'瘴气', + markcount:()=>0, + content:'锁定技。结束阶段,你须弃置一张♠牌,否则失去1点体力。' + }, + content:function(){ + 'step 0' + player.chooseToDiscard('瘴气:弃置一张♠牌,或失去1点体力',{suit:'spade'},'he').set('ai',card=>{ + if(_status.event.goon) return 7-get.value(card); + return 0; + }).set('logSkill','dcyinlu_zhangqi').set('goon',get.effect(player,{name:'losehp'},player)<0); + 'step 1' + if(!result.bool){ + player.logSkill('dcyinlu_zhangqi'); + player.loseHp(); + } + } + }, + yunxiang:{ + trigger:{player:['phaseJieshuBegin','damageBegin4']}, + direct:true, + charlotte:true, + filter:function(event,player){ + if(!game.hasPlayer(current=>current.hasSkill('dcyinlu'))) return false; + if(event.name=='phaseJieshu') return player.hasMark('dcyinlu_yunxiang'); + return player.hasMark('dcyinlu_yunxiang')&&player.hasMark('dcyinlu_xiang'); + }, + onremove:function(player){ + delete player.storage.dcyinlu_xiang; + }, + marktext:'芸', + intro:{ + name:'芸香', + name2:'芸香', + markcount:function(storage,player){ + return player.countMark('dcyinlu_xiang'); + }, + content:function(storage,player){ + return '①结束阶段,你可以弃置一张♣牌,获得1点“芸香”值。②当你受到伤害时,你可以扣减所有“芸香”值,减少等量的伤害。
  • 当前芸香值:'+player.countMark('dcyinlu_xiang'); + } + }, + content:function(){ + 'step 0' + if(trigger.name=='phaseJieshu'){ + player.chooseToDiscard('芸香:是否弃置一张♣牌,获得1枚“香”?',{suit:'club'},'he').set('ai',card=>{ + return 6-get.value(card)+2.5*_status.event.player.countMark('dcyinlu_xiang'); + }).set('logSkill','dcyinlu_yunxiang'); + } + else{ + player.chooseBool('芸香:是否移去所有“香”,令此伤害-'+player.countMark('dcyinlu_xiang')+'?').set('ai',()=>{ + return _status.event.bool; + }).set('bool',get.damageEffect(player,trigger.source,player)<0); + } + 'step 1' + if(result.bool){ + if(trigger.name=='phaseJieshu'){ + player.addMark('dcyinlu_xiang',1,false); + game.log(player,'获得了1点芸香值'); + } + else{ + player.logSkill('dcyinlu_yunxiang'); + var num=player.countMark('dcyinlu_xiang'); + player.removeMark('dcyinlu_xiang',num,false); + game.log(player,'扣减了',num,'点芸香值'); + trigger.num=Math.max(0,trigger.num-num); + } + } + } + } + } + }, + dcyouqi:{ + audio:2, + trigger:{global:'loseAfter'}, + filter:function(event,player){ + if(event.getParent(3).name.indexOf('dcyinlu_')!=0||player==event.player) return false; + return true; + }, + derivation:'dcyouqi_faq', + direct:true, + forced:true, + content:function(){ + if(Math.random()<1.25-0.25*get.distance(player,trigger.player)){ + player.logSkill('dcyouqi'); + player.gain(trigger.cards.filterInD('d'),'gain2'); + } + }, + }, + //孙资刘放 + dcqinshen:{ + audio:2, + trigger:{player:'phaseDiscardEnd'}, + frequent:true, + prompt2:function(){ + return '摸'+get.cnNumber(lib.skill.dcqinshen.getNum())+'张牌'; + }, + getNum:function(){ + var list=lib.suit.slice(); + game.getGlobalHistory('cardMove',function(evt){ + if(evt.name!='lose'&&evt.name!='cardsDiscard') return false; + if(evt.name=='lose'&&evt.position!=ui.discardPile) return false; + for(var card of evt.cards) list.remove(get.suit(card,false)); + }); + return list.length; + }, + filter:function(event,player){ + return lib.skill.dcqinshen.getNum()>0; + }, + content:function(){ + player.draw(lib.skill.dcqinshen.getNum()); + } + }, + dcweidang:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + getLength:function(card){ + var name=get.translation(get.name(card)); + if(name=='挟令') name='挟天子以令诸侯'; + if(name=='霹雳投石车') name='霹雳车'; + return name.length; + }, + direct:true, + filter:function(event,player){ + var num=lib.skill.dcqinshen.getNum(); + return event.player!=player&&(_status.connectMode?player.countCards('he'):player.hasCard(card=>lib.skill.dcweidang.getLength(card)==num,'he')); + }, + content:function(){ + 'step 0' + var num=lib.skill.dcqinshen.getNum(); + event.num=num; + player.chooseCard(get.prompt('dcweidang'),'将一张字数为'+num+'的牌置于牌堆底,然后获得一张字数为'+num+'的牌。若你能使用此牌,你使用之。','he',(card,player,target)=>{ + return lib.skill.dcweidang.getLength(card)==_status.event.num; + }).set('num',num).set('ai',card=>{ + return 5-get.value(card); + }); + 'step 1' + if(result.bool){ + player.logSkill('dcweidang'), + player.lose(result.cards[0],ui.cardPile); + game.broadcastAll(function(player){ + var cardx=ui.create.card(); + cardx.classList.add('infohidden'); + cardx.classList.add('infoflip'); + player.$throw(cardx,1000,'nobroadcast'); + },player); + game.delayx(); + } + else event.finish(); + 'step 2' + var card=get.cardPile(cardx=>lib.skill.dcweidang.getLength(cardx)==num); + if(card){ + player.gain(card,'gain2'); + if(player.hasUseTarget(card)){ + player.chooseUseTarget(card,true); + } + } + } + }, + //三袁 + dcneifa:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + content:function(){ + 'step 0' + player.draw(3); + player.chooseToDiscard(true,'he').set('ai',function(cardx){ + var player=_status.event.player; + var num=0; + var hs=player.getCards('h'); + var muniu=player.getEquip('muniu'); + if(muniu&&muniu.cards) hs=hs.concat(muniu.cards); + if(get.type(cardx)=='basic'){ + var shas=hs.filter(function(card){ + return card!=cardx&&get.name(card,player)=='sha'&&player.hasValueTarget(card,false); + }); + var numx=player.countCards('h',function(card){ + return get.type2(card,player)=='trick'; + }); + num+=Math.min(numx,Math.max(0,shas.length-player.getCardUsable('sha')))*0.65; + num+=Math.min(player.getCardUsable('sha')+numx,shas.filter(function(card){ + return game.countPlayer(function(current){ + return player.canUse(card,current)&&get.effect(current,card,player,player)>0; + })>1; + }).length)*1.1; + var taos=Math.min(player.maxHp-player.hp,hs.filter(function(card){ + return cardx!=card&&get.name(card,player)=='tao'; + }).length); + num+=taos*player.getDamagedHp()*1.2; + } + else if(get.type2(cardx)=='trick'){ + var numx=Math.sqrt(Math.min(5,player.countCards('h',function(card){ + return get.type(card,player)=='basic'; + }))); + num+=hs.filter(function(card){ + return card!=cardx&&get.type2(card)=='trick'&&player.hasValueTarget(card); + }).length*0.65; + } + else num=4; + return num*1.5-get.value(cardx); + }); + 'step 1' + if(result.bool&&result.cards&&result.cards.length&&get.type(result.cards[0])!='equip'){ + var name=get.type(result.cards[0])=='basic'?'dcneifa_basic':'dcneifa_trick'; + player.addTempSkill(name,'phaseUseAfter'); + var num=Math.min(5,player.countCards('h',function(cardx){ + var type=get.type(cardx,player); + return (name=='dcneifa_basic')!=(type=='basic')&&type!='equip'; + })); + if(num>0) player.addMark(name,num,false); + else player.storage[name]=0; + } + }, + ai:{ + threaten:2.33, + }, + }, + dcneifa_basic:{ + mark:true, + marktext:'伐', + onremove:true, + intro:{ + name:'内伐 - 基本牌', + content:'本回合内不能使用锦囊牌,且使用【杀】选择目标时可以多选择1个目标,且使用【杀】的目标次数上限+#。', + }, + mod:{ + cardEnabled:function(card,player){ + if(get.type(card,'trick')=='trick') return false; + }, + cardSavable:function(card,player){ + if(get.type(card,'trick')=='trick') return false; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha'){ + return num+player.countMark('dcneifa_basic'); + } + }, + }, + trigger:{player:'useCard2'}, + filter:function(event,player){ + if(event.card.name!='sha') return false; + return game.hasPlayer(function(current){ + return !event.targets.contains(current)&&player.canUse(event.card,current,false); + }); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('dcneifa'),'为'+get.translation(trigger.card)+'额外指定一个目标',function(card,player,target){ + return !_status.event.sourcex.contains(target)&&player.canUse(_status.event.card,target,false); + }).set('sourcex',trigger.targets).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,_status.event.card,player,player); + }).set('card',trigger.card); + 'step 1' + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.targets=result.targets; + } + else{ + event.finish(); + } + 'step 2' + player.logSkill('dcneifa',event.targets); + trigger.targets.addArray(event.targets); + }, + }, + dcneifa_trick:{ + trigger:{player:'useCard2'}, + direct:true, + mark:true, + marktext:'伐', + onremove:true, + mod:{ + cardEnabled:function(card,player){ + if(get.type(card)=='basic') return false; + }, + cardSavable:function(card,player){ + if(get.type(card)=='basic') return false; + }, + }, + intro:{ + name:'内伐 - 锦囊牌', + content:'本回合内不能使用基本牌,且使用普通锦囊牌选择目标时可以多选择或者取消1个目标。' + }, + filter:function(event,player){ + if(get.type(event.card)!='trick') return false; + if(event.targets&&event.targets.length>0) return true; + var info=get.info(event.card); + if(info.allowMultiple==false) return false; + if(event.targets&&!info.multitarget){ + if(game.hasPlayer(function(current){ + return !event.targets.contains(current)&&lib.filter.targetEnabled2(event.card,player,current); + })){ + return true; + } + } + return false; + }, + content:function(){ + 'step 0' + var prompt2='为'+get.translation(trigger.card)+'增加或减少一个目标' + player.chooseTarget(get.prompt('dcneifa'),function(card,player,target){ + var player=_status.event.player; + if(_status.event.targets.contains(target)) return true; + return lib.filter.targetEnabled2(_status.event.card,player,target); + }).set('prompt2',prompt2).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player)*(_status.event.targets.contains(target)?-1:1); + }).set('targets',trigger.targets).set('card',trigger.card); + 'step 1' + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.targets=result.targets; + } + else{ + event.finish(); + } + 'step 2' + if(event.targets){ + player.logSkill('dcneifa',event.targets); + if(trigger.targets.contains(event.targets[0])) trigger.targets.removeArray(event.targets); + else trigger.targets.addArray(event.targets); + } + } + }, + //桥蕤 + dcaishou:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return player.hasCard(card=>card.hasGaintag('dcaishou_tag'),'h'); + }, + forced:true, + locked:false, + group:['dcaishou_draw','dcaishou_lose'], + subfrequent:['draw'], + content:function(){ + 'step 0' + player.discard(player.getCards('h',card=>card.hasGaintag('dcaishou_tag'))); + 'step 1' + var len=0; + player.getHistory('lose',evt=>{ + if(evt.getParent(2)==event) len+=evt.cards.length; + }); + if(len>Math.max(0,player.hp)&&player.maxHp<9){ + player.gainMaxHp(); + } + }, + subSkill:{ + draw:{ + audio:'dcaishou', + trigger:{player:'phaseJieshuBegin'}, + frequent:function(event,player){ + return player.maxHp>1; + }, + prompt2:function(event,player){ + return '摸'+get.cnNumber(player.maxHp)+'张牌,称为“隘”'; + }, + check:function(event,player){ + return player.maxHp>1; + }, + content:function(){ + player.draw(player.maxHp).gaintag=['dcaishou_tag']; + } + }, + lose:{ + audio:'dcaishou', + trigger:{ + player:'loseAfter', + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + forced:true, + locked:false, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + var evt=event.getl(player); + if(!evt||!evt.hs||!evt.hs.length||player.hasCard(card=>card.hasGaintag('dcaishou_tag'),'h')) return false; + if(event.name=='lose'){ + for(var i in event.gaintag_map){ + if(event.gaintag_map[i].contains('dcaishou_tag')) return true; + } + return false; + } + return player.hasHistory('lose',function(evt){ + if(event!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].contains('dcaishou_tag')) return true; + } + return false; + }); + }, + content:function(){ + player.loseMaxHp(); + } + }, + } + }, + dcsaowei:{ + audio:2, + trigger:{global:'useCardAfter'}, + filter:function(event,player){ + return event.player!=player&&event.card.name=='sha'&&event.targets.length&&!event.targets.contains(player)&& + event.targets.every(current=>player.inRange(current)&¤t.isIn())&&player.hasCard(card=>card.hasGaintag('dcaishou_tag'),'h'); + }, + direct:true, + content:function(){ + 'step 0' + player.chooseCardTarget({ + position:'hs', + prompt:get.prompt('dcsaowei'), + prompt2:'将一张“隘”当做【杀】对'+get.translation(trigger.targets)+'使用', + targets:trigger.targets, + filterCard:function(card,player){ + if(get.itemtype(card)=='card'&&!card.hasGaintag('dcaishou_tag')) return false; + return _status.event.targets.every(current=>player.canUse(get.autoViewAs({name:'sha'},[card]),current,false)); + }, + filterTarget:function(card,player,target){ + if(!_status.event.targets.contains(target)) return false; + card=get.autoViewAs({name:'sha'},[card]); + return lib.filter.filterTarget.apply(this,arguments); + }, + selectTarget:-1, + ai1:function(card){ + var player=_status.event.player; + if(player.isHealthy()&&player.hasSkill('dcaishou')&&player.countCards('h',card=>card.hasGaintag('dcaishou_tag')==1)) return 0; + var eff=0; + for(var target of _status.event.targets){ + eff+=get.effect(target,get.autoViewAs({name:'sha'},[card]),player,player); + } + if(eff>0) return 6.5+eff/10-get.value(card); + return 0; + }, + ai2:()=>1, + }); + 'step 1' + if(result.bool){ + var cards=result.cards,targets=result.targets; + var cardx=get.autoViewAs({name:'sha'},cards); + player.useCard(cardx,cards,targets,false,'dcsaowei'); + } + }, + }, + //向朗 + dckanji:{ + audio:2, + enable:'phaseUse', + usable:2, + filter:function(event,player){ + return player.countCards('h'); + }, + content:function(){ + 'step 0' + player.showHandcards(); + 'step 1' + var suits=[]; + player.getCards('h',card=>suits.add(get.suit(card))); + if(suits.length==player.countCards('h')){ + player.draw(2); + event.suitsLength=suits.length; + player.addTempSkill('dckanji_check'); + } + }, + subSkill:{ + check:{ + trigger:{player:'gainAfter'}, + filter:function(event,player){ + if(event.getParent(2).name!='dckanji') return false; + var len=event.getParent(2).suitsLength; + var suits=[]; + player.getCards('h',card=>suits.add(get.suit(card))); + return suits.length>=4&&len<4; + }, + charlotte:true, + forced:true, + popup:false, + content:function(){ + player.skip('phaseDiscard'); + game.log(player,'跳过了','#y弃牌阶段'); + }, + } + }, + ai:{ + order:9, + result:{ + player:function(player,target){ + var count=player.countCards('h'); + if(count>4) return false; + var suits=[]; + player.getCards('h',card=>suits.add(get.suit(card))); + return suits.length==count?1:0; + } + } + } + }, + dcqianzheng:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + usable:2, + direct:true, + filter:function(event,player){ + return event.player!=player&&(get.type(event.card)=='trick'||event.card.name=='sha')&&player.countCards('he')>1; + }, + content:function(){ + 'step 0' + var str=',若重铸的牌中没有'+get.translation(get.type2(trigger.card))+'牌,你于'+get.translation(trigger.cards)+'进入弃牌堆后获得之'; + player.chooseCard(get.prompt('dcqianzheng'),'重铸两张牌'+(trigger.cards.length?str:'')+'。',2,'he',(card,player,target)=>{ + var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player); + return mod=='unchanged'; + }).set('ai',card=>{ + var val=get.value(card); + if(get.type2(card)==_status.event.type) val+=0.5; + return 6-val; + }).set('type',get.type2(trigger.card)); + 'step 1' + if(result.bool){ + var cards=result.cards; + player.logSkill('dcqianzheng'); + player.loseToDiscardpile(cards); + player.draw(cards.length); + if(cards.every(card=>get.type2(card)!=get.type2(trigger.card))){ + trigger.getParent().dcqianzheng=true; + player.addTempSkill('dcqianzheng_gain'); + } + } + else player.storage.counttrigger.dcqianzheng--; + }, + subSkill:{ + gain:{ + trigger:{global:'cardsDiscardAfter'}, + filter:function(event,player){ + var evt=event.getParent(); + if(evt.name!='orderingDiscard') return false; + return evt.relatedEvent.dcqianzheng&&event.cards.filterInD('d').length; + }, + charlotte:true, + forced:true, + popup:false, + content:function(){ + player.gain(trigger.cards.filterInD('d'),'gain2'); + }, + } + }, + }, + //秦朗 + dchaochong:{ + audio:2, + trigger:{player:'useCardAfter'}, + filter:function(event,player){ + return player.getHandcardLimit()!=player.countCards('h'); + }, + direct:true, + locked:false, + content:function(){ + 'step 0' + var del=player.getHandcardLimit()-player.countCards('h'); + event.delta=del; + if(del>0){ + player.chooseBool(get.prompt('dchaochong'),'摸'+get.cnNumber(Math.min(5,del))+'张牌,然后令你的手牌上限-1').set('ai',()=>{ + var player=_status.event.player; + if(player.isPhaseUsing()&&player.hasCard(cardx=>player.hasUseTarget(cardx)&&player.hasValueTarget(cardx),'hs')) return false; + return true; + }); + } + else if(del<0){ + player.chooseToDiscard(get.prompt('dchaochong'),'弃置'+get.cnNumber(-del)+'张手牌,然后令你的手牌上限+1',-del).set('ai',card=>{ + var player=_status.event.player; + if(player.isPhaseUsing()&&player.hasCard(cardx=>player.hasValueTarget(cardx),'hs')) return 6-player.getUseValue(card); + return 5-get.value(card); + }).set('logSkill','dchaochong'); + } + 'step 1' + if(result.bool){ + if(event.delta>0){ + player.logSkill('dchaochong'); + player.draw(Math.min(5,event.delta)); + lib.skill.dchaochong.change(player,-1); + } + else if(event.delta<0){ + lib.skill.dchaochong.change(player,1); + } + } + }, + change:function(player,num){ + if(typeof player.storage.dchaochong!=='number') player.storage.dchaochong=0; + if(!num) return; + player.storage.dchaochong+=num; + player.markSkill('dchaochong'); + game.log(player,'的手牌上限','#g'+(num>0?'+':'')+num); + }, + markimage:'image/card/handcard.png', + intro:{ + content:function(storage,player){ + var num=player.storage.dchaochong; + return '手牌上限'+(num>=0?'+':'')+num; + } + }, + mod:{ + maxHandcard:function(player,num){ + return num+player.countMark('dchaochong'); + } + }, + ai:{threaten:2.2} + }, + dcjinjin:{ + audio:2, + trigger:{ + source:'damageSource', + player:'damageEnd', + }, + usable:1, + logTarget:'source', + check:function(event,player){ + if(typeof player.storage.dchaochong!='number'||player.storage.dchaochong==0) return true; + var evt=event.getParent('useCard'); + if(evt&&evt.player==player&&event.source==player) return false; + if(player.isPhaseUsing()&&player.storage.dchaochong==-1) return true; + return Math.abs(player.storage.dchaochong)>=2; + }, + prompt2:function(event,player){ + var str=''; + if(typeof player.storage.dchaochong=='number'&&player.storage.dchaochong!=0){ + str +='重置因〖佞宠〗增加或减少的手牌上限,'; + } + var num=Math.abs(player.countMark('dchaochong'))||1; + if(event.source&&event.source.isIn()){ + str+='令伤害来源弃置至多'+get.cnNumber(num)+'张牌,然后你摸'+num+'-X张牌(X为其弃置的牌数)'; + } + else str+='你摸'+get.cnNumber(num)+'张牌'; + return str; + }, + content:function(){ + 'step 0' + var del=Math.abs(player.countMark('dchaochong'))||1; + event.delta=del; + player.storage.dchaochong=0; + if(player.hasSkill('dchaochong',null,false,false)) player.markSkill('dchaochong'); + game.log(player,'重置了手牌上限'); + if(trigger.source&&trigger.source.isIn()){ + trigger.source.chooseToDiscard(get.translation(player)+'对你发动了【矜谨】','弃置至多'+get.cnNumber(del)+'张牌,然后'+get.translation(player)+'摸'+del+'-X张牌(X为你弃置的牌数)。',[1,del],'he').set('ai',card=>{ + if(_status.event.goon) return 5.5-get.value(card); + return 0; + }).set('goon',get.attitude(trigger.source,player)<0); + } + 'step 1' + var num=event.delta; + if(result.bool) num-=result.cards.length; + if(num>0) player.draw(num); + }, + ai:{ + combo:'dchaochong', + maixie:true, + maixie_hp:true, + threaten:0.85, + 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=0; + if(typeof target.storage.dcninchong=='number') num=Math.abs(target.storage.dcninchong); + if(num<=0) return; + return [1,Math.min(1,num/3)]; + } + }, + }, + }, + }, + //二傅 + dcxuewei:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('dcxuewei'),(card,player,target)=>{ + return target.hp<=player.hp; + }).set('ai',target=>{ + var player=_status.event.player; + return get.effect(target,{name:'tao'},player,player)+0.1; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcxuewei',target); + player.addTempSkill('dcxuewei_shelter',{player:'phaseBegin'}); + player.markAuto('dcxuewei_shelter',[target]); + } + }, + ai:{threaten:1.1}, + subSkill:{ + shelter:{ + audio:'dcxuewei', + trigger:{global:'damageBegin4'}, + filter:function(event,player){ + return player.getStorage('dcxuewei_shelter').contains(event.player); + }, + charlotte:true, + forced:true, + onremove:true, + logTarget:'player', + marktext:'卫', + intro:{content:'保护对象:$'}, + content:function(){ + 'step 0' + trigger.cancel(); + 'step 1' + player.loseHp(); + if(trigger.player!=player) game.asyncDraw([player,trigger.player]); + else player.draw('nodelay'); + 'step 2' + game.delayx(); + }, + ai:{ + filterDamage:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.player&&arg.player.hasSkillTag('jueqing',false,player)) return false; + return true; + } + }, + } + }, + }, + dcyuguan:{ + audio:2, + trigger:{global:'phaseEnd'}, + filter:function(event,player){ + var num=player.getDamagedHp(); + if(num==0) return false; + return !game.hasPlayer(current=>{ + return current.getDamagedHp()>num; + }); + }, + check:function(event,player){ + var num=player.getDamagedHp()-1; + if(num<=0) return false; + var list=game.filterPlayer().map(target=>{ + return get.attitude(player,target)*Math.pow(Math.max(0,target.maxHp-target.countCards('h')-1),2); + }).sort((a,b)=>b-a); + return list.slice(0,num).reduce((p,c)=>p+c,0)>0; + }, + content:function(){ + 'step 0' + player.loseMaxHp(); + 'step 1' + var num=player.getDamagedHp(); + if(!player.isIn()||!num) event.finish(); + else player.chooseTarget('御关:令'+get.cnNumber(num)+'名角色将手牌摸至体力上限',Math.min(game.countPlayer(),num),true).set('ai',target=>{ + return get.attitude(_status.event.player,target)*Math.max(0.1,target.maxHp-target.countCards('h')); + }); + 'step 2' + if(result.bool){ + var targets=result.targets.sortBySeat(_status.currentPhase); + player.line(targets); + for(var target of targets){ + target.drawTo(target.maxHp); + } + } + } + }, + //郑浑 + dcqiangzhi:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + if(target==player) return false; + return target.countDiscardableCards(player,'he')+player.countDiscardableCards(player,'he')>=3; + }, + content:function(){ + 'step 0' + var dialog=[]; + dialog.push('强峙:弃置你与'+get.translation(target)+'的共计三张牌'); + if(player.countCards('h')) dialog.addArray(['
    你的手牌
    ',player.getCards('h')]); + if(player.countCards('e')) dialog.addArray(['
    你的装备
    ',player.getCards('e')]); + if(target.countCards('h')){ + dialog.add('
    '+get.translation(target)+'的手牌
    '); + if(player.hasSkillTag('viewHandcard',null,target,true)) dialog.push(target.getCards('h')); + else dialog.push([target.getCards('h'),'blank']); + } + if(target.countCards('e')) dialog.addArray(['
    '+get.translation(target)+'的装备
    ',target.getCards('e')]); + player.chooseButton(3,true).set('createDialog',dialog).set('filterButton',button=>{ + if(!lib.filter.canBeDiscarded(button.link,_status.event.player,get.owner(button.link))) return false; + return true; + }).set('filterOk',()=>{ + return ui.selected.buttons.length==3; + }).set('ai',button=>{ + var player=_status.event.player; + var target=_status.event.getParent().target; + var card=button.link; + if(get.owner(card)==player){ + if(_status.event.damage) return 15-get.value(card); + if(player.hp>=3||get.damageEffect(player,target,player)>=0||player.hasSkill('dcpitian')&&player.getHandcardLimit()-player.countCards('h')>=1&&player.hp>1) return 0; + if(ui.selected.buttons.length==0) return 10-get.value(card); + return 0; + } + else{ + if(_status.event.damage) return 0; + return -(get.sgnAttitude(player,target)||1)*get.value(card); + } + }).set('damage',get.damageEffect(target,player,player)>10&&player.countCards('he',card=>{ + return lib.filter.canBeDiscarded(card,player,player)&&get.value(card)<5; + })>=3); + 'step 1' + if(result.bool){ + var links=result.links; + var list1=[],list2=[]; + event.players=[player,target]; + for(var card of links){ + if(get.owner(card)==player) list1.push(card); + else list2.push(card); + } + if(list1.length&&list2.length){ + game.loseAsync({ + lose_list:[ + [player,list1], + [target,list2] + ], + discarder:player, + }).setContent('discardMultiple'); + event.finish(); + } + else if(list2.length) target.discard(list2); + else player.discard(list1); + if(list2.length>=3) event.players.reverse(); + } + else event.finish(); + 'step 2' + event.players[0].line(event.players[1]); + event.players[1].damage(event.players[0]); + }, + ai:{ + expose:0.2, + order:4, + result:{ + target:function(player,target){ + return get.effect(target,{name:'guohe_copy2'},player,target)/2*(target.countDiscardableCards(player,'he')>=2?1.25:1)+get.damageEffect(target,player,target)/3; + } + } + } + }, + dcpitian:{ + audio:2, + trigger:{ + player:['loseAfter','damageEnd'], + global:'loseAsyncAfter', + }, + forced:true, + locked:false, + group:'dcpitian_draw', + filter:function(event,player){ + if(event.name=='damage') return true; + return event.type=='discard'&&event.getl(player).cards2.length>0; + }, + content:function(){ + player.addMark('dcpitian_handcard',1,false); + player.addSkill('dcpitian_handcard'); + game.log(player,'的手牌上限','#y+1'); + }, + subSkill:{ + draw:{ + audio:'dcpitian', + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + return player.countCards('h')Math.min(2,player.hp-1); + }, + content:function(){ + 'step 0' + var num=Math.min(5,player.getHandcardLimit()-player.countCards('h')); + if(num>0) player.draw(num); + 'step 1' + player.removeMark('dcpitian_handcard',player.countMark('dcpitian_handcard'),false); + game.log(player,'重置了','#g【辟田】','增加的手牌上限'); + } + }, + handcard:{ + markimage:'image/card/handcard.png', + intro:{ + content:function(storage,player){ + return '手牌上限+'+storage; + } + }, + charlotte:true, + mod:{ + maxHandcard:function(player,num){ + return num+player.countMark('dcpitian_handcard'); + } + }, + } + }, + ai:{ + effect:{ + target:function (card,player,target){ + if(get.tag(card,'discard')) return 0.9; + if(get.tag(card,'damage')) return 0.95; + }, + }, + }, + }, + //新服二赵 + dcqingren:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + frequent:true, + filter:function(event,player){ + return player.hasHistory('useSkill',evt=>['yizan_use','yizan_use_backup'].contains(evt.sourceSkill||evt.skill)); + }, + content:function(){ + player.draw(player.getHistory('useSkill',evt=>['yizan_use','yizan_use_backup'].contains(evt.sourceSkill||evt.skill)).length) + }, + }, + dclongyuan:{ + audio:'xinfu_longyuan', + forced:true, + unique:true, + juexingji:true, + trigger:{ + global:'phaseEnd', + }, + skillAnimation:true, + animationColor:'orange', + filter:function(event,player){ + return player.countMark('yizan_use')>=3; + }, + content:function(){ + player.awakenSkill('dclongyuan'); + player.draw(2); + player.recover(); + player.storage.yizan=true; + }, + derivation:'yizan_rewrite', + }, + //黄皓 + dcqinqing:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + var zhu=game.filterPlayer(current=>current.getSeatNum()==1)[0]; + if(!zhu||!zhu.isIn()) return false; + return game.hasPlayer(current=>{ + return current!=player&¤t.inRange(zhu); + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('dcqinqing'),function(card,player,target){ + var zhu=game.filterPlayer(current=>current.getSeatNum()==1)[0]; + return target!=player&&target.inRange(zhu)&&target.countDiscardableCards(player,'he')>0; + }).set('ai',function(target){ + var zhu=game.filterPlayer(current=>current.getSeatNum()==1)[0]; + var he=target.countCards('he'); + if(get.attitude(_status.event.player,target)>0){ + if(target.countCards('h')>zhu.countCards('h')+1) return 0.1; + } + else{ + if(he>zhu.countCards('h')+1) return 2; + if(he>0) return 1; + } + return 0; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('dcqinqing',target); + if(target.countCards('he')) player.discardPlayerCard(target,'he',true); + } + else{ + event.finish(); + } + 'step 2' + var zhu=game.filterPlayer(current=>current.getSeatNum()==1)[0]; + if(zhu&&zhu.isIn()){ + if(target.countCards('h')>zhu.countCards('h')) player.draw(); + } + } + }, + dccunwei:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + forced:true, + filter:function(event,player){ + return event.player!=player&&get.type2(event.card)=='trick'&&(event.targets.length==1||player.countCards('he')>0); + }, + content:function(){ + if(trigger.targets.length==1) player.draw(); + else if(player.countCards('he')>0) player.chooseToDiscard('he',true,'存畏:请弃置一张牌'); + } + }, + //刘辟 + dcjuying:{ + audio:2, + trigger:{player:'phaseUseEnd'}, + filter:function(event,player){ + return player.getCardUsable('sha',true)>player.getHistory('useCard',evt=>{ + return evt.getParent('phaseUse')==event&&evt.card.name=='sha'&&evt.addCount!==false; + }).length; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseButton([ + get.prompt('dcjuying'), + [[ + ['sha','你于下回合使用【杀】的次数上限+1'], + ['hand','本回合手牌上限+2'], + ['draw','摸三张牌'], + ],'textbutton'] + ]).set('ai',function(button){ + var player=_status.event.player,choice=button.link; + if(choice=='draw') return 10; + if(choice=='sha') return 9; + var del=3-player.hp; + if(choice=='hand'&&player.needsToDiscard()>0&&del<=0) return 8; + return 0; + }).set('selectButton',[1,3]); + 'step 1' + if(result.bool){ + player.logSkill('dcjuying'); + var choices=result.links; + event.choices=choices; + if(choices.contains('sha')){ + player.addMark('dcjuying_sha',1,false); + player.addSkill('dcjuying_sha'); + } + if(choices.contains('hand')){ + player.addMark('dcjuying_hand',1,false); + player.addTempSkill('dcjuying_hand'); + } + if(choices.contains('draw')){ + player.draw(3); + } + } + else event.finish(); + 'step 2' + var num=event.choices.length-Math.max(0,player.hp); + if(num>0){ + player.chooseToDiscard(num,true,'he'); + } + }, + ai:{ + effect:{ + player_use:function(card,player,target){ + if(typeof card=='object'&&player.isPhaseUsing()&&card.name=='sha'&&player.getCardUsable('sha')==1) return 'zeroplayertarget'; + }, + target_use:function(card,player,target){ + if(card.name=='jiu'&&player.getCardUsable('sha')==2) return [1,1]; + } + }, + }, + subSkill:{ + sha:{ + trigger:{player:'phaseBegin'}, + filter:function(event,player){ + return player.countMark('dcjuying_sha')>0; + }, + silent:true, + firstDo:true, + charlotte:true, + onremove:true, + content:function(){ + player.addMark('dcjuying_effect',player.countMark('dcjuying_sha'),false); + player.addTempSkill('dcjuying_effect'); + player.removeSkill('dcjuying_sha'); + }, + intro:{content:'下回合使用【杀】的次数上限+#'} + }, + effect:{ + onremove:true, + charlotte:true, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.countMark('dcjuying_effect'); + }, + }, + intro:{content:'本回合使用【杀】的次数上限+#'} + }, + hand:{ + onremove:true, + charlotte:true, + mod:{ + maxHandcard:function(player,num){ + return num+2*player.countMark('dcjuying_hand'); + } + } + } + }, + }, + //新服加强魏贾诩 + dcjianshu:{ + audio:'jianshu', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h',{color:'black'})>0; + }, + filterTarget:function(card,player,target){ + if(target==player) return false; + if(ui.selected.targets.length){ + return ui.selected.targets[0]!=target&&!ui.selected.targets[0].hasSkillTag('noCompareSource')&&target.countCards('h') + &&!target.hasSkillTag('noCompareTarget'); + } + return true; + }, + targetprompt:['发起者','拼点目标'], + filterCard:{color:'black'}, + discard:false, + lose:false, + delay:false, + check:function(card){ + if(_status.event.player.hp==1) return 8-get.value(card); + return 6-get.value(card); + }, + selectTarget:2, + multitarget:true, + content:function(){ + 'step 0' + player.give(cards,targets[0],'give'); + 'step 1' + targets[0].chooseToCompare(targets[1]); + 'step 2' + player.addTempSkill('dcjianshu_check','phaseUseAfter'); + if(result.bool){ + var cards=targets[0].getCards('he',function(card){ + return lib.filter.cardDiscardable(card,targets[0],'dcjianshu'); + }); + if(cards.length>0) targets[0].discard(cards.randomGet()); + targets[1].loseHp(); + } + else if(result.tie){ + targets[0].loseHp(); + targets[1].loseHp(); + } + else{ + var cards=targets[1].getCards('he',function(card){ + return lib.filter.cardDiscardable(card,targets[1],'dcjianshu'); + }); + if(cards.length>0) targets[1].discard(cards.randomGet()); + targets[0].loseHp(); + } + }, + subSkill:{ + check:{ + trigger:{global:'dieAfter'}, + charlotte:true, + forced:true, + popup:false, + filter:function(event,player){ + return event.getParent(3).name=='dcjianshu'; + }, + content:function(){ + delete player.getStat('skill').dcjianshu; + } + } + }, + ai:{ + expose:0.4, + order:4, + result:{ + target:function(player,target){ + if(ui.selected.targets.length) return -1; + return -0.5; + } + } + } + }, + dcyongdi:{ + audio:'yongdi', + audioname:['xinping'], + unique:true, + limited:true, + enable:'phaseUse', + filterTarget:function(card,player,target){ + return target.hasSex('male'); + }, + animationColor:'thunder', + skillAnimation:'legend', + mark:true, + intro:{ + content:'limited' + }, + content:function(){ + 'step 0' + player.awakenSkill('dcyongdi'); + //player.logSkill('dcyongdi',target); + if(!game.hasPlayer(current=>current.maxHpcurrent.maxHp{ + return target!=player&&!player.getStorage('dcsilve').contains(target); + }).set('ai',target=>{ + var att=get.attitude(_status.event.player,target); + if(att>0) return att+1; + if(att==0) return Math.random(); + return att; + }).set('animate',false); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcsilve'); + player.markAuto('dcsilve',[target]); + player.addSkill('dcsilve_rob'); + player.addSkill('dcsilve_revenge'); + target.addSkill('dcsilve_target'); + if(!target.storage.dcsilve_target) target.storage.dcsilve_target=[]; + target.storage.dcsilve_target.push(player); + } + }, + subSkill:{ + rob:{ + audio:'dcsilve', + trigger:{global:'damageSource'}, + filter:function(event,player){ + if(!player.getStorage('dcsilve').contains(event.source)) return false; + if(!event.player.isIn()||event.player==player) return false; + if(player.getStorage('dcsilve_robbed').contains(event.player)) return false; + return event.player.countCards('he')>0; + }, + charlotte:true, + prompt2:function(event,player){ + return '获得'+get.translation(event.player)+'一张牌'; + }, + logTarget:'player', + content:function(){ + player.addTempSkill('dcsilve_robbed'); + player.markAuto('dcsilve_self',[trigger.player]); + if(trigger.player.countGainableCards(player,'he')>0){ + player.markAuto('dcsilve_robbed',[trigger.player]); + player.gainPlayerCard(trigger.player,'he',true); + } + if(trigger.source&&trigger.source!=player) trigger.source.markSkill('dcsilve_target'); + } + }, + revenge:{ + audio:'dcsilve', + trigger:{global:'damageEnd'}, + filter:function(event,player){ + if(!player.getStorage('dcsilve').contains(event.player)) return false; + if(!event.player.isIn()||!event.source||!event.source.isIn()||event.source==player) return false; + return true; + }, + forced:true, + locked:false, + charlotte:true, + direct:true, + content:function(){ + 'step 0' + if(trigger.player&&trigger.player!=player) trigger.player.markSkill('dcsilve_target'); + player.markAuto('dcsilve_self',[trigger.player]); + player.chooseToUse('私掠:对'+get.translation(trigger.source)+'使用一张【杀】,或弃置一张手牌',function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + }).set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.source&&!ui.selected.targets.contains(_status.event.source)) return false; + return lib.filter.targetEnabled.apply(this,arguments); + }).set('source',trigger.source).set('logSkill','dcsilve_revenge'); + 'step 1' + if(!result.bool){ + if(player.countCards('h')>0) player.chooseToDiscard('h',true).set('logSkill','dcsilve_revenge'); + } + } + }, + self:{ + marktext:'私', + intro:{ + name:'私掠', + content:function(storage,player){ + if(!storage||!storage.length) return '没有打劫对象'; + if(storage[0]==player) return '已绑定'+get.translation(player)+'自己'; + return '打劫对象:'+get.translation(storage); + } + }, + }, + target:{ + marktext:'掠', + intro:{ + name:'私掠', + content:function(storage,player){ + return '被'+get.translation(storage)+'盯上了!'; + } + } + }, + robbed:{onremove:true,charlotte:true}, + } + }, + dcshuaijie:{ + audio:2, + enable:'phaseUse', + limited:true, + skillAnimation:true, + animationColor:'thunder', + filter:function(event,player){ + var targets=player.getStorage('dcsilve').filter(i=>i.isIn()); + if(!targets.length) return true; + return targets.filter(target=>{ + return player.hp>target.hp&&player.countCards('e')>target.countCards('e'); + }).length==targets.length; + }, + content:function(){ + 'step 0' + player.awakenSkill('dcshuaijie'); + player.loseMaxHp(); + var choices=[]; + var choiceList=[ + '获得“私掠”角色至多三张牌', + '从牌堆中获得三张类型各不相同的牌' + ]; + var targets=player.getStorage('dcsilve').filter(i=>i.isIn()); + event.targets=targets; + if(targets.length) choices.push('选项一'); + else choiceList[0]=''+choiceList[0]+''; + choices.push('选项二'); + player.chooseControl(choices).set('prompt','衰劫:选择一项').set('choiceList',choiceList).set('ai',()=>_status.event.choice).set('choice',function(){ + var eff=0; + for(var target of targets){ + eff+=get.effect(target,{name:'shunshou_copy2'},player,player)*2; + } + eff-=get.effect(player,{name:'dongzhuxianji'},player,player); + return eff>0&&choices.contains('选项一')?'选项一':'选项二'; + }()); + 'step 1' + if(result.control=='选项一'){ + if(targets.length){ + for(var target of targets){ + if(target.countGainableCards(player,'he')>0) { + player.line(target); + player.gainPlayerCard(target,'he',true,[1,3]); + } + } + } + } + else{ + var cards=[]; + for(var i=0;i<3;i++){ + var card=get.cardPile(cardx=>{ + return cards.filter(cardxx=>get.type2(cardxx)==get.type2(cardx)).length==0; + }); + if(card) cards.push(card); + } + if(cards.length) player.gain(cards,'gain2'); + } + 'step 2' + var targets=player.getStorage('dcsilve').filter(i=>i.isIn()); + for(var target of targets){ + target.unmarkAuto('dcsilve_target',[player]); + } + delete player.storage.dcsilve; + delete player.storage.dcsilve_self; + player.markAuto('dcsilve',[player]); + player.markAuto('dcsilve_self',[player]); + }, + ai:{ + combo:'dcsilve', + order:8, + result:{ + player:function(player){ + var targets=player.getStorage('dcsilve').filter(i=>i.isIn()); + if(!targets.length) return 1; + var att=0; + targets.forEach(i=>att+=get.attitude(player,i)); + if(att<0) return 1; + return 0; + } + } + } + }, + //庞会 + dcyiyong:{ + audio:2, + trigger:{ + source:'damageBegin1', + }, + usable:2, + filter:function(event,player){ + return player.countDiscardableCards(player,'he')>0&&player!=event.player; + }, + check:function(event,player){ + return get.attitude(player,event.player)<0&&player.countCards('he',card=>lib.filter.cardDiscardable(card,player,'dcyiyong')&&get.value(card,player)<7)>0; + }, + logTarget:'player', + content:function(){ + 'step 0' + event.list=[player]; + event.cards0=[];event.cards1=[]; + if(trigger.player.countDiscardableCards(trigger.player,'he')>0){ + event.list.push(trigger.player); + } + if(!event.isMine()&&!event.isOnline()) game.delayx(); + player.chooseCardOL(event.list,'he',true,[1,Infinity],'异勇:弃置任意张牌',(card,player,target)=>{ + return lib.filter.cardDiscardable(card,player,'dcyiyong'); + }).set('ai',card=>{ + var evt=_status.event.getParent(2); + var source=evt.player,player=_status.event.player,target=evt.list[1]; + if(!target) return get.unuseful(card); + if(player==source){ + var total=0,need=0; + target.countCards('he',card=>{ + if(lib.filter.cardDiscardable(card,target,'dcyiyong')&&get.value(card)<5) need+=get.number(card); + }); + for(var i of ui.selected.cards) total+=get.number(i); + if(total>=need+5) return 0; + var val=6; + if(target.hp<=2&&!target.hasSkillTag('filterDamage',null,{ + player:player, + card:evt.getTrigger().card, + })) val+=2+get.number(card)/5; + if(target.countCards('he',card=>get.value(card)<5)>=3) val-=3+get.number(card)/5; + return val-get.value(card); + } + if(ui.selected.cards.length>1&&ui.selected.cards.length+2>=source.countCards('he')) return 0; + if(player.hp<=2&&!target.hasSkillTag('filterDamage',null,{ + player:player, + card:evt.getTrigger().card, + })) return 10-get.value(card); + return 5-get.value(card); + }); + 'step 1' + var lose_list=[],cards=[]; + for(var i=0; iget.number(i,false)).reduce((p,c)=>p+c,0) + } + var num0=getn(event.cards0),num1=getn(event.cards1); + if(num0<=num1){ + player.draw(event.cards1.length); + } + if(num0>=num1){ + trigger.num++; + } + } + }, + //乐就 + dccuijin:{ + audio:2, + trigger:{global:'useCard'}, + direct:true, + filter:function(event,player){ + return event.card.name=='sha'&&(event.player==player||player.inRange(event.player))&&player.countCards('he')>0; + }, + content:function(){ + 'step 0' + if(player!=game.me&&!player.isOnline()) game.delayx(); + var target=trigger.player; + event.target=target; + player.chooseToDiscard('he',get.prompt('dccuijin',target),'弃置一张牌并令'+get.translation(trigger.player)+'使用的【杀】伤害+1,但若其未造成伤害,则你摸一张牌并对其造成1点伤害。').set('ai',function(card){ + if(_status.event.goon) return 7-get.value(card); + return 0; + }).set('goon',function(){ + var d1=true; + if(trigger.player.hasSkill('jueqing')||trigger.player.hasSkill('gangzhi')) d1=false + for(var target of trigger.targets){ + if(!target.mayHaveShan()||trigger.player.hasSkillTag('directHit_ai',true,{ + target:target, + card:trigger.card, + },true)){ + if(!target.hasSkill('gangzhi')) d1=false; + if(!target.hasSkillTag('filterDamage',null,{ + player:trigger.player, + card:trigger.card, + })&&get.attitude(player,target)<0) return true; + } + } + if(d1) return get.damageEffect(trigger.player,player,player)>0; + return false; + }()).logSkill=['dccuijin',target]; + 'step 1' + if(result.bool){ + if(typeof trigger.baseDamage!='number') trigger.baseDamage=1; + trigger.baseDamage++; + player.addSkill('dccuijin_damage'); + player.markAuto('dccuijin_damage',[trigger.card]); + if(!player.storage.dccuijin_map) player.storage.dccuijin_map={}; + player.storage.dccuijin_map[trigger.card.cardid]=trigger.targets.slice(); + } + }, + subSkill:{ + damage:{ + trigger:{ + global:['damage','damageCancelled','damageZero','shaMiss','useCardToExcluded','useCardToEnd','eventNeutralized','useCardAfter','shaCancelled'], + }, + forced:true, + silent:true, + firstDo:true, + charlotte:true, + onremove:true, + filter:function(event,player,name){ + if(!event.card) return false; + var cards=player.getStorage('dccuijin_damage'); + if(!cards.contains(event.card)) return false; + return true; + }, + content:function(){ + 'step 0' + var card=trigger.card; + if(event.triggername=='useCardAfter'){ + var cards=player.getStorage('dccuijin_damage'); + cards=cards.remove(card); + if(!cards.length){ + player.removeSkill('dccuijin_damage'); + delete player.storage.dccuijin_map; + } + else delete player.storage.dccuijin_map[card.cardid]; + event.finish(); + } + else{ + var target,source; + if(trigger.name.indexOf('damage')==0){ + target=trigger.player; + source=trigger.source; + } + else{ + target=trigger.target; + source=trigger.player; + } + if(player.storage.dccuijin_map[card.cardid].contains(target)&&!target.hasHistory('damage',evt=>{ + return evt.card==card; + })){ + player.logSkill('dccuijin_damage',source); + player.storage.dccuijin_map[card.cardid].remove(target); + player.draw(); + if(source&&source.isIn()){ + player.line(trigger.player,'green'); + trigger.player.damage(); + } + } + } + 'step 1' + game.delayx(); + }, + }, + }, + }, + //陈矫 + dcxieshou:{ + trigger:{ + global:'damageEnd', + }, + usable:1, + filter:function(event,player){ + return get.distance(player,event.player)<=2&&event.player.isIn(); + }, + check:function(event,player){ + return get.attitude(player,event.player)>4; + }, + locked:false, + logTarget:'player', + onremove:true, + change:function(player,num){ + player.addSkill('dcxieshoux'); + if(typeof player.storage.dcxieshoux!=='number') player.storage.dcxieshoux=0; + if(!num) return; + player.storage.dcxieshoux+=num; + if(player.storage.dcxieshoux!=0) player.markSkill('dcxieshoux'); + else player.unmarkSkill('dcxieshoux'); + game.log(player,'的手牌上限',(num>0?'+':'')+num); + }, + content:function(){ + 'step 0' + lib.skill.dcxieshou.change(player,-1); + 'step 1' + var list=[],target=trigger.player; + event.target=target; + var choiceList=['回复1点体力','复原,摸两张牌']; + if(target.getDamagedHp()==0) choiceList[0]=''+choiceList[0]+''; + else list.push('选项一'); + list.push('选项二'); + target.chooseControl(list).set('choiceList',choiceList).set('prompt',get.translation(player)+'对你发动了【协守】,请选择一项'); + 'step 2' + if(result.control=='选项一'){ + target.recover(); + } + else { + target.link(false); + target.draw(2); + } + }, + ai:{ + expose:0.3, + }, + }, + dcxieshoux:{ + markimage:'image/card/handcard.png', + intro:{ + content:function(storage,player){ + var num=player.storage.dcxieshoux; + return '手牌上限'+(num >= 0?'+':'')+num; + } + }, + charlotte:true, + mod:{ + maxHandcard:function(player,num){ + return num+(player.storage.dcxieshoux||0); + } + }, + }, + dcqingyan:{ + trigger:{ + target:'useCardToTargeted', + }, + filter:function(event,player){ + return event.player!=player&&get.color(event.card)=='black'; + }, + usable:2, + direct:true, + content:function(){ + 'step 0' + if(player.countCards('h')1); + }else{ + player.chooseToDiscard(get.prompt('dcqingyan'),'弃置一张手牌令你的手牌上限+1').set('ai',card=>6-get.value(card)).set('logSkill','dcqingyan'); + } + 'step 1' + if(result.bool){ + if(result.cards&&result.cards.length){ + lib.skill.dcxieshou.change(player,1); + }else{ + player.logSkill('dcqingyan'); + player.drawTo(player.maxHp); + } + } else player.storage.counttrigger.dcqingyan--; + } + }, + dcqizi:{ + mod:{ + playerEnabled:function(card,player,target){ + if(get.distance(player,target)>2&&card.name=='tao'&&target==_status.event.dying) return false; + }, + } + }, + //公孙度 + dczhenze:{ + audio:2, + trigger:{player:'phaseDiscardBegin'}, + direct:true, + content:function(){ + 'step 0' + var getCond=(player)=>Math.sign(player.countCards('h')-Math.max(0,player.hp)); + var me=getCond(player); + var recovers=game.filterPlayer(current=>getCond(current)==me),loses=game.filterPlayer().removeArray(recovers); + event.recovers=recovers; event.loses=loses; + var list=[]; + if(loses.length) list.push('选项一'); + if(recovers.length) list.push('选项二'); + list.push('cancel2'); + var sign=[['≥','<'],['≠','='],['≤','>']]; + var choiceList=[ + '令所有手牌数'+sign[me+1][0]+'体力值的角色失去1点体力'+(loses.length?'('+get.translation(loses)+')':''), + '令所有手牌数'+sign[me+1][1]+'体力值的角色回复1点体力'+(recovers.length?'('+get.translation(recovers)+')':'') + ]; + if(!loses.length) choiceList[0]=''+choiceList[0]+''; + if(!recovers.length) choiceList[1]=''+choiceList[1]+''; + player.chooseControl(list).set('choiceList',choiceList).set('prompt',get.prompt('dczhenze')).set('ai',()=>_status.event.choice).set('choice',(()=>{ + var effect=0; + if(list.length==2){ + if(list.contains('选项一')){ + loses.forEach(i=>effect+=get.effect(i,{name:'losehp'},player,player)); + if(effect>0) return '选项一'; + }else{ + recovers.forEach(i=>effect+=get.recoverEffect(i,player,player)); + if(effect>0) return '选项二'; + } + }else{ + loses.forEach(i=>effect-=get.effect(i,{name:'losehp'},player,player)); + recovers.forEach(i=>effect+=get.recoverEffect(i,player,player)); + if(effect>0) return '选项二'; + return '选项一'; + } + })()); + 'step 1' + if(result.control=='cancel2'){ + event.finish(); + } + else { + var lose=result.control=='选项一',targets=event[lose?'loses':'recovers']; + player.logSkill('dczhenze',targets); + for(var i of targets){ + i[lose?'loseHp':'recover'](); + } + } + } + }, + dcanliao:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + if((player.getStat().skill.dcanliao||0)>=game.countPlayer(current=>current.group=='qun')) return false; + return true; + }, + filterTarget:function(card,player,target){ + return target.countCards('he'); + }, + content:function(){ + 'step 0' + player.choosePlayerCard(target,'he',true).set('filterButton',function(button){ + var player=_status.event.player,card=button.link; + if(get.owner(card)==player){ + var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player); + if(mod!='unchanged') return mod; + } + return true; + }).set('ai',function(card){ + if(get.attitude(_status.event.player,_status.event.getParent().target)>=0) return -get.buttonValue(card); + return get.buttonValue(card); + }); + 'step 1' + if(result.bool){ + target.loseToDiscardpile(result.links); + target.draw(); + } + }, + ai:{ + expose:0.1, + result:{ + target:function(player,target){ + if(target.hasCard(card=>get.value(card)>=6,'e')&&get.attitude(player,target)<0) return -1; + return 1; + } + } + } + }, + //王烈 + dcchongwang:{ + audio:2, + trigger:{global:'useCard'}, + direct:true, + filter:function(event,player){ + if(player==event.player) return false; + var type=get.type(event.card); + if(type!='basic'&&type!='trick') return false; + var history=game.getAllGlobalHistory('useCard'); + var index=history.indexOf(event); + if(index>0) return history[index-1].player==player; + return false; + }, + content:function(){ + 'step 0' + var source=trigger.player; + var list=[['exclude','令'+get.translation(trigger.card)+'无效']]; + var cards=trigger.cards.filterInD(); + if(source.isIn()&&cards.length>0) list.push(['gain','令'+get.translation(source)+'收回'+get.translation(cards)]); + player.chooseButton([ + get.prompt('dcchongwang',source), + [list,'textbutton'], + 'noforcebutton', + ]).set('ai',function(button){ + var player=_status.event.player,choice=button.link; + var evt=_status.event.getTrigger(); + if(choice=='exclude'){ + var effect=0; + if(!evt.targets.length&&get.info(evt.card,false).notarget) effect-=get.effect(evt.player,evt.card,evt.player,player); + for(var i of evt.targets){ + effect-=get.effect(i,evt.card,evt.player,player); + } + return effect; + } + else{ + var cards=evt.cards.filterInD(); + return get.value(cards,evt.player)*get.attitude(player,evt.player); + } + return 0; + }) + 'step 1' + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + } + else event.finish(); + 'step 2' + if(result.bool){ + player.logSkill('dcchongwang',trigger.player); + if(result.links[0]=='gain'){ + player.addTempSkill('dcchongwang_gain'); + trigger._dcchongwang=true; + } + else{ + trigger.targets.length=0; + trigger.all_excluded=true; + game.log(trigger.card,'被无效了'); + } + } + }, + ai:{ + threaten:3.5, + directHit_ai:true, + }, + subSkill:{ + gain:{ + trigger:{global:'useCardAfter'}, + charlotte:true, + forced:true, + popup:false, + filter:function(event,player){ + return event._dcchongwang; + }, + content:function(){ + trigger.player.gain(trigger.cards.filterInD(),'gain2'); + } + } + } + }, + dchuagui:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countCards('he')>0; + }); + }, + content:function(){ + 'step 0' + var min=Math.max.apply(Math,game.filterPlayer().map(function(current){ + return 1+current.getFriends().length; + })); + var max=Math.min(min,game.countPlayer(function(current){ + return current!=player&¤t.countCards('he')>0; + })); + player.chooseTarget(get.prompt('dchuagui'),'令至多'+get.cnNumber(max)+'名角色进行囚徒困境选择',[1,max],function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }).set('animate',false).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + player.logSkill('dchuagui'); + event.players=result.targets.slice(0); + event._global_waiting=true; + } + else event.finish(); + 'step 2' + var send=function(source){ + var next=game.createEvent('dchuagui_choose',false); + next.player=game.me; + next.source=source; + next.setContent(lib.skill.dchuagui.contentx); + game.resume(); + }; + var sendback=function(result,player){ + if(!Array.isArray(result)){ + result=[ + Math.random()<0.5?'仅展示牌':'交出牌', + player.getCards('he').randomGet() + ]; + } + event.results.push([player,result]); + }; + event.ai_targets=[]; + event.results=[]; + var players=game.filterPlayer(function(current){ + return current!=player; + }).sortBySeat(); + var time=10000; + if(lib.configOL&&lib.configOL.choose_timeout) time=parseInt(lib.configOL.choose_timeout)*1000; + for(var i=0;iget.value(b,target)-get.value(a,target)); + var choice='仅展示牌',card=hs[0]; + if(att<-2&&Math.random()>((get.value(card,target)-3)/5)) choice='交出牌'; + sendback([choice,card],target); + if(!event.ai_targets.length){ + clearInterval(event.interval); + if(event.withai) game.resume(); + } + },_status.connectMove?750:75); + },500) + } + 'step 3' + if(event.withme){ + if(_status.connectMode) game.me.unwait(result,game.me); + else{ + if(!Array.isArray(result)){ + result=[ + Math.random()<0.5?'仅展示牌':'交出牌', + player.getCards('he').randomGet() + ]; + } + event.results.push([player,result]); + } + } + 'step 4' + if(event.withol&&!event.resultOL){ + game.pause(); + } + 'step 5' + if(event.ai_targets.length>0){ + event.withai=true; + game.pause(); + } + 'step 6' + delete event._global_waiting; + for(var i of game.players) i.hideTimer(); + event.videoId=lib.status.videoId++; + game.broadcastAll(function(name,id,results){ + var dialog=ui.create.dialog(name+'发动了技能【化归】','hidden','forcebutton'); + dialog.videoId=id; + dialog.classList.add('scroll1'); + dialog.classList.add('scroll2'); + dialog.classList.add('fullwidth'); + dialog.classList.add('fullheight'); + dialog.buttonss=[]; + + var list=['仅展示牌的玩家','交出牌的玩家'] + for(var i=0;i'+list[i]+''); + var buttons=ui.create.div('.buttons',dialog.content); + dialog.buttonss.push(buttons); + buttons.classList.add('popup'); + buttons.classList.add('guanxing'); + } + dialog.open(); + + var getx=function(){ + var item=results.shift(); + var card=item[1][1],index=item[1][0]=='仅展示牌'?0:1; + var button=ui.create.button(card,'card',dialog.buttonss[index]); + button.querySelector('.info').innerHTML=(function(target){ + if(target._tempTranslate) return target._tempTranslate; + var name=target.name; + if(lib.translate[name+'_ab']) return lib.translate[name+'_ab']; + return get.translation(name); + }(item[0])); + if(results.length>0) setTimeout(getx,500); + } + setTimeout(getx,500); + },get.translation(player),event.videoId,event.results.slice(0)); + game.delay(0,2000+event.results.length*500) + 'step 7' + game.broadcastAll('closeDialog',event.videoId); + var shown=[],given=[]; + for(var i of event.results){ + (i[1][0]=='仅展示牌'?shown:given).push(i); + } + var list=given.length>0?given:shown; + var cards=[],targets=[]; + for(var i of list){ + cards.push(i[1][1]); + targets.push(i[0]); + //i[0].$give(i[1][1],player); + } + player.line(targets); + player.gain(cards,'give'); + //step 8 + //game.delayx(); + }, + contentx:function(){ + 'step 0' + event._global_waiting=true; + event.result=['仅展示牌',player.getCards('he').randomGet()]; + var str=get.translation(source); + player.chooseControl('仅展示牌','交出牌').set('choiceList',[ + '仅展示一张牌。但如果所有人都选择了仅展示,则'+str+'获得这张牌', + '将一张牌交给'+str, + ]).set('_global_waiting',true); + 'step 1' + event.result[0]=result.control; + player.chooseCard('he',true).set('_global_waiting',true); + 'step 2' + event.result[1]=result.cards[0]; + }, + }, + //陈珪 + dcyingtu:{ + audio:2, + trigger:{ + global:['gainAfter','loseAsyncAfter'], + }, + usable:1, + filter:function(event,player){ + return lib.skill.dcyingtu.filterx(event,player,player.getNext())||lib.skill.dcyingtu.filterx(event,player,player.getPrevious()); + }, + filterx:function(event,player,target){ + var evt=event.getParent('phaseDraw'); + if(evt&&target==evt.player) return false; + return event.getg(target).length>0&&target.hasCard(function(card){ + return lib.filter.canBeGained(card,target,player) + },'he'); + }, + logTarget:'player', + direct:true, + checkx:function(player,source){ + var target=(source==player.getNext()?player.getPrevious():player.getNext()); + return Math.min(0,get.attitude(player,target))>=get.attitude(player,source); + }, + content:function(){ + 'step 0' + var targets=[]; + event.targets=targets; + if(lib.skill.dcyingtu.filterx(trigger,player,player.getNext())) targets.add(player.getNext()); + if(lib.skill.dcyingtu.filterx(trigger,player,player.getPrevious())) targets.add(player.getPrevious()); + 'step 1' + var target=targets.shift(); + event.target=target; + player.chooseBool( + get.prompt('dcyingtu',target), + '获得该角色的一张牌,然后将一张牌交给该角色的对位角色。若你给出的是装备牌,则其使用其获得的牌。' + ).set('goon',lib.skill.dcyingtu.checkx(player,target)).set('ai',function(){ + return _status.event.goon; + }); + 'step 2' + if(result.bool){ + player.logSkill('dcyingtu',target); + var next=game.createEvent('dcyingtu_insert'); + next.player=player; + next.target=target; + next.setContent(lib.skill.dcyingtu.contentx); + event.finish(); + } + else if(targets.length>0) event.goto(1); + else player.storage.counttrigger.dcyingtu--; + }, + contentx:function(){ + 'step 0' + event.side=(target==player.getPrevious()?'getNext':'getPrevious'); + player.gainPlayerCard(target,true,'he'); + 'step 1' + var he=player.getCards('he'); + if(he.length>0){ + var target=player[event.side](); + event.target=target; + if(he.length==1) event._result={bool:true,cards:he}; + else player.chooseCard('he',true,'交给'+get.translation(target)+'一张牌') + } + else event.finish(); + 'step 2' + if(result.bool){ + var card=result.cards[0]; + event.card=card; + player.line(target); + player.give(card,target); + } + else event.finish(); + 'step 3' + if(target.getCards('h').contains(card)&&get.type(card,null,target)=='equip'&&target.canUse(card,target)) target.chooseUseTarget(card,true,'nopopup'); + }, + }, + dccongshi:{ + audio:2, + trigger:{global:'useCardAfter'}, + forced:true, + locked:false, + filter:function(event,player){ + return get.type(event.card,null,false)=='equip'&&event.player.isMaxEquip(); + }, + content:function(){ + player.draw(); + }, + }, + //黄权 + dcquanjian:{ + audio:2, + enable:'phaseUse', + usable:2, + chooseButton:{ + dialog:function(event,player){ + var dialog=ui.create.dialog('劝谏:令一名其他角色…','hidden'); + dialog.add([[ + ['damage','对其攻击范围内的一名角色造成1点伤害'], + ['draw','将其手牌数调整至体力上限(至多摸至五张),且其本回合内不能使用手牌'] + ],'textbutton']); + return dialog; + }, + filter:function(button,player){ + return !player.hasSkill('dcquanjian_'+button.link,null,null,false); + }, + check:()=>1+Math.random(), + backup:function(links){ + return get.copy(lib.skill['dcquanjian_'+links[0]]); + }, + prompt:function(links){ + if(links[0]=='damage') return '令一名其他角色对攻击范围内的另一名角色造成1点伤害'; + return '令一名其他角色将手牌数调整至体力上限(至多摸至五张)且本回合内不能使用手牌'; + }, + }, + ai:{ + order:2, + result:{player:1}, + }, + subSkill:{ + backup:{audio:'dcquanjian'}, + damage:{ + audio:'dcquanjian', + charlotte:true, + selectTarget:2, + filterTarget:function(card,player,target){ + if(!ui.selected.targets.length) return target!=player; + return ui.selected.targets[0].inRange(target); + }, + complexTarget:true, + complexSelect:true, + filterCard:()=>false, + selectCard:-1, + targetprompt:['造成伤害','受到伤害'], + multitarget:true, + content:function(){ + 'step 0' + player.addTempSkill('dcquanjian_damage','phaseUseAfter'); + targets[0].chooseControl().set('choiceList',[ + '对'+get.translation(targets[1])+'造成1点伤害', + '本回合下次受到的伤害+1', + ]).set('ai',function(){ + return _status.event.eff>=0?0:1; + }).set('eff',get.damageEffect(targets[1],targets[0],targets[0])); + 'step 1' + if(result.index==0){ + targets[1].damage(targets[0]); + } + else{ + target.addMark('dcquanjian_effect',1,false); + target.addTempSkill('dcquanjian_effect'); + } + }, + ai:{ + result:{ + player:function(player,target){ + if(ui.selected.targets.length==0){ + if(!game.hasPlayer((current)=>current.inRangeOf(target)&&get.damageEffect(current,target,player)>0)) return 0; + if(get.attitude(player,target)>0) return 2; + return 1; + } + return get.damageEffect(target,ui.selected.targets[0],player,player); + }, + }, + }, + }, + draw:{ + audio:'dcquanjian', + charlotte:true, + filterTarget:function(card,player,target){ + if(target==player) return false; + var num=target.countCards('h'); + if(num>target.maxHp) return true; + return numfalse, + selectCard:-1, + content:function(){ + 'step 0' + player.addTempSkill('dcquanjian_draw','phaseUseAfter'); + var num1=target.countCards('h'),num2=target.maxHp; + var num=0; + if(num1>num2){ + event.index=0; + num=num1-num2; + target.chooseControl().set('choiceList',[ + '弃置'+get.cnNumber(num)+'张手牌', + '本回合下次受到的伤害+1', + ]).set('ai',function(){ + var player=_status.event.player; + if(_status.event.number==1&&player.hasCard(function(card){ + return lib.filter.cardDiscardable(card,player,'dcquanjian_draw')&&get.value(card)<5; + },'h')) return 0; + return 1; + }).set('number',num); + } + else{ + event.index=1; + num=Math.min(num2,5)-num1; + if(num<=0) event.finish(); + else target.chooseControl().set('choiceList',[ + '摸'+get.cnNumber(num)+'张牌,且本回合内不能使用或打出手牌', + '本回合下次受到的伤害+1', + ]).set('ai',function(){ + return 0; + }); + } + event.num=num; + 'step 1' + if(result.index==0){ + if(event.index==0) target.chooseToDiscard('h',true,num); + else target.draw(num); + } + else{ + target.addMark('dcquanjian_effect',1,false); + target.addTempSkill('dcquanjian_effect'); + event.finish(); + } + 'step 2' + target.addTempSkill('dcquanjian_disable'); + }, + ai:{ + result:{ + target:function(player,target){ + var num1=target.countCards('h'),num2=target.maxHp; + if(num1>num2) return -1; + return Math.min(5,num2)-num1; + }, + }, + }, + }, + effect:{ + charlotte:true, + trigger:{player:'damageBegin3'}, + forced:true, + onremove:true, + marktext:'谏', + content:function(){ + trigger.num+=player.countMark(event.name); + player.removeSkill(event.name); + }, + intro:{content:'下次受到的伤害+#'}, + ai:{threaten:2.5}, + }, + disable:{ + charlotte:true, + mod:{ + cardEnabled2:function(card){ + if(get.position(card)=='h') return false; + }, + }, + mark:true, + marktext:'禁', + intro:{content:'不能使用或打出手牌'}, + ai:{threaten:2.5}, + }, + }, + }, + dctujue:{ + audio:2, + trigger:{player:'dying'}, + direct:true, + limited:true, + skillAnimation:true, + animationColor:'gray', + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + 'step 0' + player.chooseTarget(lib.filter.notMe,get.prompt2('dctujue')).set('ai',function(target){ + if(_status.event.skip) return 0; + return 200+get.attitude(_status.event.player,target); + }).set('skip',player.countCards('hs',{name:['tao','jiu']})+player.hp>0); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dctujue',target); + player.awakenSkill('dctujue'); + var cards=player.getCards('he'); + player.give(cards,target); + player.recover(cards.length); + player.draw(cards.length); + } + }, + }, + //尹夫人 + dcyingyu:{ + audio:2, + trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, + direct:true, + filter:function(event,player){ + if(event.name=='phaseJieshu'&&!player.storage.dcyingyu) return false; + return game.countPlayer(function(current){ + return current.countCards('h')>0; + })>1; + }, + content:function(){ + 'step 0' + player.chooseTarget(2,get.prompt('dcyingyu'),'展示两名角色的各一张手牌。若这两张牌花色不同,则你可以令其中一名角色获得另一名角色的展示牌。',function(card,player,target){ + return target.countCards('h')>0; + }).set('ai',function(target){ + var player=_status.event.player; + if(!ui.selected.targets.length) return get.attitude(player,target); + return 1-get.attitude(player,target); + }); + 'step 1' + if(result.bool){ + var targets=result.targets.sortBySeat(); + event.targets=targets; + event.cards=[]; + player.logSkill('dcyingyu',targets); + player.choosePlayerCard(targets[0],true,'h'); + } + else event.finish(); + 'step 2' + var card=result.cards[0]; + player.line(targets[0]); + player.showCards(card,get.translation(player)+'对'+get.translation(targets[0])+'发动了【媵予】') + event.cards.push(card); + player.choosePlayerCard(targets[1],true,'h'); + 'step 3' + var card=result.cards[0]; + player.line(targets[1]); + player.showCards(card,get.translation(player)+'对'+get.translation(targets[1])+'发动了【媵予】') + event.cards.push(card); + if(get.suit(cards[0],targets[0])==get.suit(cards[1],targets[1])) event.finish(); + 'step 4' + var str1=get.translation(targets[0]),str2=get.translation(targets[1]); + player.chooseControl('cancel2').set('choiceList',[ + '令'+str1+'获得'+str2+'的'+get.translation(cards[1]), + '令'+str2+'获得'+str1+'的'+get.translation(cards[0]), + ]).set('goon',get.attitude(player,targets[0])>0?0:1).set('ai',()=>_status.event.goon); + 'step 5' + if(result.control!='cancel2'){ + var i=result.index; + targets[1-i].give(cards[1-i],targets[i],'give'); + } + }, + onremove:true, + }, + dcyongbi:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h')>0&&game.hasPlayer((current)=>lib.skill.dcyongbi.filterTarget(null,player,current)); + }, + filterTarget:function(card,player,target){ + return target!=player&&target.hasSex('male'); + }, + selectCard:-1, + filterCard:true, + position:'h', + limited:true, + skillAnimation:true, + animationColor:'fire', + discard:false, + lose:false, + content:function(){ + 'step 0' + player.awakenSkill('dcyongbi'); + if(player.hasSkill('dcyingyu',null,null,false)) player.storage.dcyingyu=true; + player.give(cards,target); + 'step 1' + var list=[]; + for(var i of cards){ + list.add(get.suit(i,player)); + if(list.length>=3) break; + } + if(list.length>=2){ + player.addMark('dcyongbi_eff1',2,false); + player.addSkill('dcyongbi_eff1'); + target.addMark('dcyongbi_eff1',2,false); + target.addSkill('dcyongbi_eff1'); + } + if(list.length>=3){ + player.addMark('dcyongbi_eff2',1,false); + player.addSkill('dcyongbi_eff2'); + target.addMark('dcyongbi_eff2',1,false); + target.addSkill('dcyongbi_eff2'); + } + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(player.hasUnknown()) return 0; + var zhu=get.zhu(player); + if(zhu&&get.attitude(player,zhu)>0){ + if(target==zhu) return 4; + } + return 1; + }, + }, + }, + subSkill:{ + eff1:{ + mod:{ + maxHandcard:(player,num)=>num+player.countMark('dcyongbi_eff1'), + }, + charlotte:true, + onremove:true, + marktext:'拥', + intro:{content:'手牌上限+#'}, + }, + eff2:{ + trigger:{player:'damageBegin4'}, + forced:true, + filter:function(event,player){ + return event.num>1; + }, + content:function(){ + trigger.num-=player.countMark('dcyongbi_eff2'); + }, + charlotte:true, + onremove:true, + marktext:'嬖', + intro:{content:'受到大于1的伤害时,此伤害-#'}, + }, + }, + }, + //吕旷吕翔 + dcshuhe:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterCard:true, + position:'h', + discard:false, + lose:false, + delay:false, + check:function(cardx){ + var player=_status.event.player; + var num1=get.number(cardx),players=game.filterPlayer(); + var goon=false,effect=0; + for(var current of players){ + var cards=current.getCards('ej',function(card){ + var num=get.number(card); + return num==num1; + }); + if(cards.length){ + goon=true; + var att=get.attitude(player,current); + for(var card of cards){ + if(get.position(card)=='e'){ + var val=get.value(card,current); + if(att<=0) effect+=val; + else effect-=val/2; + } + else{ + var eff=get.effect(current,{name:card.viewAs||card.name},player,player); + effect-=get.sgn(att)*eff; + } + } + } + } + if(goon){ + if(effect>0) return 6+effect-get.value(cardx); + return 0; + } + return game.hasPlayer(function(current){ + return current!=player&&get.attitude(player,current)>0; + })?(6-get.value(cardx)):0; + }, + content:function(){ + 'step 0' + player.showCards(cards,get.translation(player)+'发动了【数合】'); + 'step 1' + event.cards2=[]; + var num1=get.number(cards[0],player); + var lose_list=[],players=game.filterPlayer(); + for(var current of players){ + var cards=current.getCards('ej',function(card){ + var num=get.number(card); + return num==num1; + }); + if(cards.length>0){ + player.line(current,'thunder'); + current.$throw(cards); + lose_list.push([current,cards]); + event.cards2.addArray(cards); + } + } + if(lose_list.length){ + event.lose_list=lose_list; + game.loseAsync({ + lose_list:lose_list, + }).setContent('chooseToCompareLose'); + } + else{ + event.goto(3); + player.chooseTarget(true,lib.filter.notMe,'将'+get.translation(event.cards[0])+'交给一名其他角色').set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + } + 'step 2' + var cards=event.cards2; + if(cards.length>0){ + if(event.lose_list) game.delayx(); + player.gain(cards,'gain2'); + } + event.finish(); + 'step 3' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + player.give(cards,target); + player.addMark('dcliehou',1); + } + }, + ai:{ + order:2, + result:{ + player:1, + }, + }, + }, + dcliehou:{ + audio:2, + trigger:{player:'phaseDrawBegin2'}, + forced:true, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + var num=Math.min(5,1+player.countMark('dcliehou')); + trigger.num+=num; + trigger._dcliehou=num; + }, + group:'dcliehou_discard', + subSkill:{ + discard:{ + trigger:{player:'phaseDrawEnd'}, + forced:true, + filter:function(event,player){ + return typeof event._dcliehou=='number'; + }, + content:function(){ + 'step 0' + var num=trigger._dcliehou; + player.chooseToDiscard(num,'he','弃置'+get.cnNumber(num)+'张牌,或失去1点体力').set('ai',function(card){ + if(_status.event.goon) return 6-get.value(card); + return 26-get.value(card); + }).set('goon',player.hp>Math.max(1,4-num)||get.effect(player,{name:'losehp'},player,player)>0); + 'step 1' + if(!result.bool) player.loseHp(); + }, + }, + }, + marktext:'爵', + intro:{ + name:'列侯(爵)', + name2:'爵', + content:'〖列侯〗的摸牌数+#', + }, + }, + //管亥 + suoliang:{ + audio:2, + trigger:{source:'damageSource'}, + logTarget:'player', + usable:1, + filter:function(event,player){ + return event.player!=player&&event.player.maxHp>0&&event.player.countCards('he')>0; + }, + check:function(event,player){ + return get.attitude(player,event.player)<=0; + }, + content:function(){ + 'step 0' + var target=trigger.player; + event.target=target; + player.choosePlayerCard(target,true,'he',[1,target.maxHp],'选择'+get.translation(target)+'的至多'+get.cnNumber(target.maxHp)+'张牌'); + 'step 1' + if(result.bool){ + player.showCards(result.cards,get.translation(player)+'对'+get.translation(target)+'发动了【索粮】') + var cards=result.cards.filter(function(card){ + var suit=get.suit(card,target); + if(suit!='heart'&&suit!='club') return false; + return lib.filter.canBeGained(card,target,player) + }); + if(cards.length) player.gain(cards,target,'giveAuto','bySelf'); + else{ + var cards=result.cards.filter(function(card){ + return lib.filter.canBeDiscarded(card,target,player) + }); + if(cards.length) target.discard(cards,'notBySelf'); + } + } + }, + }, + qinbao:{ + audio:2, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return (event.card.name=='sha'||get.type(event.card,null,false)=='trick')&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')>=player.countCards('h'); + }); + }, + content:function(){ + var hs=player.countCards('h'); + trigger.directHit.addArray(game.filterPlayer(function(current){ + return current!=player&¤t.countCards('h')>=hs; + })); + }, + ai:{ + threaten:1.4, + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + return player.countCards('h',function(card){ + return !ui.selected.cards.contains(card); + })<=arg.target.countCards('h'); + }, + }, + }, + //胡昭 + midu:{ + audio:2, + enable:'phaseUse', + usable:1, + isDisabled:function(player,pos){ + return pos>0?player.isDisabled(pos):player.storage._disableJudge; + }, + chooseButton:{ + dialog:function(event,player){ + var dialog=ui.create.dialog('弥笃:选择要废除或恢复的装备栏或判定区','hidden'); + dialog.classList.add('withbg'); + dialog.noforcebutton=true; + var list1=[],list2=[]; + for(var i=1;i<6;i++){ + (player.isDisabled(i)?list2:list1).push(i); + } + (player.storage._disableJudge?list2:list1).push(-1); + var addTable=function(list){ + var table=document.createElement('div'); + table.classList.add('add-setting'); + table.style.margin='0'; + table.style.width='100%'; + table.style.position='relative'; + for(var i of list){ + var td=ui.create.div('.shadowed.reduce_radius.pointerdiv.tdnode'); + td.innerHTML=''+(i>0?get.translation('equip'+i)+'栏':'判定区')+''; + td.link=i; + td.addEventListener(lib.config.touchscreen?'touchend':'click',ui.click.button); + for(var j in lib.element.button){ + td[j]=lib.element.button[j]; + } + table.appendChild(td); + dialog.buttons.add(td); + } + dialog.content.appendChild(table); + } + if(list1.length){ + dialog.addText('未废除'); + addTable(list1); + } + if(list2.length){ + dialog.addText('已废除'); + addTable(list2); + } + return dialog; + }, + filter:function(button,player){ + if(!ui.selected.buttons.length) return true; + if(lib.skill.midu.isDisabled(player,ui.selected.buttons[0].link)) return false; + return !player.isDisabled(button.link); + }, + check:function(button){ + var player=_status.event.player; + if(lib.skill.midu.isDisabled(player,button.link)){ + if(button.link<=0) return -10; + if(player.hasCard(function(card){ + return get.subtype(card)==('equip'+button.link); + },'hs')) return 15; + return 10; + } + if(button.link<=0||player.isEmpty(button.link)&&!player.hasCard(function(card){ + return get.subtype(card)==('equip'+button.link)&&player.canUse(card,player)&&get.effect(player,card,player,player)>0; + },'hs')) return 5; + return 0; + }, + select:[1,6], + backup:function(links,player){ + if(lib.skill.midu.isDisabled(player,links[0])){ + return { + audio:'midu', + selectCard:-1, + selectTarget:-1, + filterCard:()=>false, + filterTarget:()=>false, + equip:links[0], + content:function(){ + var pos=lib.skill.midu_backup.equip; + if(pos<=0) player.enableJudge(); + else player.enableEquip(pos); + player.addTempSkill('huomo',{player:'phaseBegin'}); + }, + } + } + else{ + return { + audio:'midu', + selectCard:-1, + filterCard:()=>false, + filterTarget:true, + equip:links.sort(), + content:function(){ + var list=lib.skill.midu_backup.equip,bool=false; + for(var i of list){ + if(i<=0) bool=true; + else player.disableEquip(i); + } + if(bool) player.disableJudge(); + target.draw(list.length) + }, + ai:{ + tag:{ + draw:1, + }, + result:{ + target:2, + }, + }, + } + } + }, + prompt:function(links,player){ + if(lib.skill.midu.isDisabled(player,links[0])){ + return '恢复一个装备栏或判定区并获得〖活墨〗'; + } + var numc=get.cnNumber(links.length); + return '废除'+numc+'个装备栏或判定区并令一名角色摸'+numc+'张牌'; + }, + }, + derivation:'huomo', + ai:{ + order:8, + result:{player:1}, + }, + subSkill:{backup:{}}, + }, + xianwang:{ + mod:{ + globalTo:function(source,player,distance){ + var num=player.countDisabled(); + if(num>0) return distance+(num>2?2:1); + }, + globalFrom:function(source,player,distance){ + var num=source.countDisabled(); + if(num>0) return distance-(num>2?2:1); + }, + }, + }, + //刘巴 + dczhubi:{ + audio:2, + trigger:{ + global:['loseAfter','loseAsyncAfter'], + }, + filter:function(event,player){ + if(event.type!='discard'||event.getlx===false) return false; + for(var i of event.cards){ + if(get.suit(i,event.player)=='diamond') return true; + } + return false; + }, + prompt2:'检索一张【无中生有】并置于牌堆顶', + check:function(event,player){ + if(!_status.currentPhase) return false; + return get.attitude(player,_status.currentPhase.next)>0; + }, + content:function(){ + var card=get.cardPile(function(card){ + return card.name=='wuzhong'&&get.suit(card)!='diamond'; + }); + if(card){ + game.log(player,'将',card,'置于牌堆顶'); + card.fix(); + ui.cardPile.insertBefore(card,ui.cardPile.firstChild); + game.updateRoundNumber(); + game.delayx(); + } + }, + }, + dcliuzhuan:{ + audio:2, + group:['dcliuzhuan_mark','dcliuzhuan_gain'], + mod:{ + targetEnabled:function(card){ + if(card.cards){ + for(var i of card.cards){ + if(i.hasGaintag('dcliuzhuan_tag')) return false; + } + } + else if(get.itemtype(card)=='card'){ + if(card.hasGaintag('dcliuzhuan_tag')) return false; + } + }, + }, + subSkill:{ + gain:{ + trigger:{global:['loseAfter','loseAsyncAfter','cardsDiscardAfter']}, + forced:true, + logTarget:()=>_status.currentPhase, + filter:function(event,player){ + var current=_status.currentPhase; + if(!current) return false; + if(event.name=='cardsDiscard'){ + var evtx=event.getParent(); + if(evtx.name!='orderingDiscard') return false; + var evtx2=(evtx.relatedEvent||evtx.getParent()); + return current.hasHistory('lose',function(evtx3){ + var evtx4=evtx3.relatedEvent||evtx3.getParent(); + if(evtx2!=evtx4) return false; + for(var i in evtx3.gaintag_map){ + if(evtx3.gaintag_map[i].contains('dcliuzhuan_tag')) return true; + } + }); + return false; + } + else if(event.name=='lose'){ + if(event.player!=current||event.position!=ui.discardPile) return false; + for(var i in event.gaintag_map){ + if(event.gaintag_map[i].contains('dcliuzhuan_tag')) return true; + } + return false; + } + return current.hasHistory('lose',function(evt){ + if(evt.getParent()!=event||evt.position!=ui.discardPile) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].contains('dcliuzhuan_tag')) return true; + } + }); + }, + content:function(){ + var cards,current=_status.currentPhase; + if(trigger.name=='lose') cards=trigger.hs.filter(function(i){ + return trigger.gaintag_map[i.cardid]&&trigger.gaintag_map[i.cardid].contains('dcliuzhuan_tag')&&get.position(i,true)=='d'; + }); + else if(trigger.name=='cardsDiscard'){ + var evtx=trigger.getParent(); + var evtx2=(evtx.relatedEvent||evtx.getParent()); + var bool=false; + var history=current.getHistory('lose',function(evtx3){ + var evtx4=evtx3.relatedEvent||evtx3.getParent(); + if(evtx2!=evtx4) return false; + for(var i in evtx3.gaintag_map){ + if(evtx3.gaintag_map[i].contains('dcliuzhuan_tag')) return true; + } + }); + cards=trigger.cards.filter(function(i){ + for(var evt of history){ + if(evt.gaintag_map[i.cardid]&&evt.gaintag_map[i.cardid].contains('dcliuzhuan_tag')&&get.position(i,true)=='d') return true; + } + return false; + }); + } + else{ + cards=[]; + current.getHistory('lose',function(evt){ + if(evt.getParent()!=trigger||evt.position!=ui.discardPile) return false; + for(var card of evt.hs){ + if(get.position(card,true)!='d') continue; + var i=card.cardid; + if(evt.gaintag_map[i]&&evt.gaintag_map[i].contains('dcliuzhuan_tag')) cards.push(card); + } + }); + } + if(cards&&cards.length>0) player.gain(cards,'gain2'); + }, + }, + mark:{ + trigger:{global:'gainBegin'}, + forced:true, + popup:false, + silent:true, + lastDo:true, + filter:function(event,player){ + if(player==event.player||event.player!=_status.currentPhase) return false; + var evt=event.getParent('phaseDraw'); + if(evt&&evt.name=='phaseDraw') return false; + return true; + }, + content:function(){ + trigger.gaintag.add('dcliuzhuan_tag'); + trigger.player.addTempSkill('dcliuzhuan_tag'); + }, + }, + tag:{ + charlotte:true, + onremove:(player,skill)=>player.removeGaintag(skill), + }, + }, + }, + //张勋 + suizheng:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('suizheng'),'令一名角色下回合内获得〖随征〗效果').set('',function(target){ + var player=_status.event.player,att=get.attitude(player,target); + if(target.hasJudge('lebu')) return att/2; + return att*get.threaten(target)*Math.sqrt(2+player==target?(player.countCards('h','sha')*2):target.countCards('h')) + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('suizheng',target); + target.addMark('suizheng_effect',1,false); + target.markAuto('suizheng_source',[player]); + target.addTempSkill('suizheng_effect',{player:player==target?'phaseJieshuBefore':'phaseAfter'}); + } + }, + subSkill:{ + effect:{ + audio:'suizheng', + charlotte:true, + mod:{ + targetInRange:function(card){ + if(card.name=='sha') return true; + }, + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.countMark('suizheng_effect'); + }, + }, + trigger:{player:'phaseUseEnd'}, + forced:true, + popup:false, + filter:function(event,player){ + var list=player.getStorage('suizheng_source'); + if(!list.filter((i)=>i.isIn().length)) return false; + return player.hasHistory('sourceDamage',function(evt){ + return evt.player.isIn()&&evt.getParent('phaseUse')==event; + }); + }, + content:function(){ + 'step 0' + var targets=player.getStorage('suizheng_source').slice(0).sortBySeat(); + event.targets=targets; + 'step 1' + var target=targets.shift(); + event.target=target; + var list=[]; + player.getHistory('sourceDamage',function(evt){ + if(evt.player.isIn()&&evt.getParent('phaseUse')==trigger) list.add(evt.player); + }); + if(!list.length) event.finish(); + else if(target.isIn()){ + list=list.filter(function(i){ + return target.canUse('sha',i,false); + }); + if(list.length>0) target.chooseTarget('随征:是否对一名角色使用【杀】?',function(card,player,target){ + return _status.event.targets.contains(target); + }).set('targets',list).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player); + }); + } + else event._result={bool:false}; + 'step 2' + if(result.bool){ + target.useCard({ + name:'sha', + isCard:true, + },result.targets,false,'suizheng_effect'); + } + if(targets.length>0) event.goto(1); + }, + onremove:function(player){ + delete player.storage.suizheng_effect; + delete player.storage.suizheng_source; + }, + intro:{content:'使用【杀】无距离限制且次数上限+#'}, + }, + }, + }, + //纪灵 + dcshuangren:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + preHidden:true, + filter:function(event,player){ + return player.countCards('h')>0&&game.hasPlayer(function(current){ + return current!=player&&player.canCompare(current); + }) + }, + content:function(){ + 'step 0' + var goon; + if(player.needsToDiscard()>1){ + goon=player.hasCard(function(card){ + return card.number>10&&get.value(card)<=5; + }); + } + else if(player.hasSha()){ + goon=player.hasCard(function(card){ + return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; + }); + } + else{ + goon=player.hasCard(function(card){ + return get.value(card)<=5; + }); + } + player.chooseTarget(get.prompt2('dcshuangren'),function(card,player,target){ + return player.canCompare(target); + }).set('ai',function(target){ + var player=_status.event.player; + if(_status.event.goon&&get.attitude(player,target)<0){ + return get.effect(target,{name:'sha'},player,player); + } + return 0; + }).set('goon',goon).setHiddenSkill(event.name); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('dcshuangren',target); + player.chooseToCompare(target); + } + else{ + event.finish(); + } + 'step 2' + if(result.bool){ + var target=event.target; + if(game.hasPlayer(function(current){ + if(target==current||target.group!=current.group) return false; + return player.canUse('sha',current,false); + })){ + var str='请选择视为使用【杀】的目标'; + var str2='操作提示:选择一名角色B,或选择包含A('+get.translation(target)+')在内的两名角色A和B(B的势力需为'+get.translation(target.group)+'势力)'; + player.chooseTarget([1,2],str,str2,true,function(card,player,target){ + if(!player.canUse('sha',target,false)) return false; + var current=_status.event.target; + if(target==current) return true; + if(target.group!=current.group) return false; + if(!ui.selected.targets.length) return true; + return ui.selected.targets[0]==current; + return current==target; + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player); + }).set('target',target).set('complexTarget',true); + } + else{ + player.useCard({name:'sha',isCard:true},target,false); + event.finish(); + } + } + else{ + player.addTempSkill('dcshuangren_debuff','phaseUseAfter'); + event.finish(); + } + 'step 3' + if(result.bool&&result.targets&&result.targets.length){ + player.useCard({name:'sha',isCard:true},result.targets,false); + } + }, + subSkill:{ + debuff:{ + charlotte:true, + mod:{ + cardEnabled:function(card){ + if(card.name=='sha') return false; + }, + }, + }, + }, + }, + //羊祜 + dcdeshao:{ + audio:2, + usable:2, + trigger:{target:'useCardToTargeted'}, + filter:function(event,player){ + return player!=event.player&&get.color(event.card)=='black'; + }, + logTarget:'player', + check:function(event,player){ + var eff=get.effect(player,{name:'wuzhong'},player,player)/2; + if(player.countCards('h')+1<=event.player.countCards('h')&&event.player.countCards('he')>0) eff+=get.effect(event.player,{name:'guohe_copy2'},player,player); + return eff; + }, + content:function(){ + 'step 0' + player.draw(); + 'step 1' + var target=trigger.player; + if(player.countCards('h')<=target.countCards('h')&&target.countCards('he')>0){ + player.discardPlayerCard(target,true,'he'); + player.addExpose(0.2); + } + }, + }, + dcmingfa:{ + audio:2, + trigger:{player:'useCardAfter'}, + direct:true, + filter:function(event,player){ + return player.isPhaseUsing()&&(event.card.name=='sha'||get.type(event.card)=='trick')&&event.cards.filterInD().length>0&&!player.getExpansions('dcmingfa').length; + }, + content:function(){ + 'step 0' + var str,cards=trigger.cards.filterInD(),card=trigger.card; + if(cards.length==1&&card.name==cards[0].name&&(card.nature||false)==(cards[0].nature||false)) str=get.translation(cards[0]); + else str=(get.translation(trigger.card)+'('+get.translation(cards)+')'); + var cardx={ + name:trigger.card.name, + nature:trigger.card.nature, + isCard:true, + }; + player.chooseTarget(lib.filter.notMe,get.prompt('dcmingfa'),'将'+str+'作为“明伐”牌置于武将牌上,并选择一名其他角色。该角色下回合结束时对其执行〖明伐〗的后续效果。').set('card',cardx).set('goon',function(){ + var getMax=function(card){ + return Math.max.apply(Math,game.filterPlayer(function(current){ + return current!=player&&lib.filter.targetEnabled2(card,player,current); + }).map(function(i){ + return get.effect(i,card,player,player)*Math.sqrt(Math.min(i.getHandcardLimit(),1+i.countCards('h'))); + }).concat([0])); + } + var eff1=getMax(cardx); + if(player.hasCard(function(card){ + if((card.name!='sha'&&get.type(card)!='trick')||!player.hasValueTarget(card,null,true)) return false; + return getMax({ + name:get.name(card), + nature:get.nature(card), + isCard:true, + })>=eff1; + },'hs')) return false; + return true; + }()).set('ai',function(target){ + if(!_status.event.goon) return 0; + var player=_status.event.player,card=_status.event.card; + if(!lib.filter.targetEnabled2(card,player,target)) return 0; + return get.effect(target,card,player,player)*Math.sqrt(Math.min(target.getHandcardLimit(),1+target.countCards('h'))); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcmingfa',target); + var card={ + name:trigger.card.name, + nature:trigger.card.nature, + isCard:true, + }; + player.storage.dcmingfa_info=[card,target]; + player.addToExpansion(trigger.cards.filterInD(),'gain2').gaintag.add('dcmingfa'); + } + }, + group:'dcmingfa_use', + ai:{expose:0.2}, + intro:{ + mark:function(dialog,storage,player){ + var cards=player.getExpansions('dcmingfa'); + if(!cards.length) return '没有“明伐”牌'; + else dialog.add(cards); + var info=player.storage.dcmingfa_info; + if(info){ + dialog.addText('记录牌:'+get.translation(info[0])+'
    记录目标:'+get.translation(info[1])); + } + }, + content:'expansion', + }, + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); + delete player.storage.dcmingfa_info; + }, + subSkill:{ + use:{ + audio:'dcmingfa', + trigger:{global:['phaseEnd','die']}, + forced:true, + filter:function(event,player){ + if(!player.storage.dcmingfa_info||!player.getExpansions('dcmingfa').length) return false; + return event.player==player.storage.dcmingfa_info[1]; + }, + content:function(){ + 'step 0' + var target=trigger.player; + event.target=target; + var card=player.storage.dcmingfa_info[0]; + delete player.storage.dcmingfa_info; + event.card=card; + event.count=Math.max(1,Math.min(5,target.countCards('h'))); + if(!event.player.isIn()) event.goto(2); + 'step 1' + event.count--; + if(target.isIn()&&lib.filter.targetEnabled2(card,player,target)){ + player.useCard(get.copy(card),target); + if(event.count>0) event.redo(); + } + 'step 2' + var cards=player.getExpansions('dcmingfa'); + if(cards.length>0) player.loseToDiscardpile(cards); + }, + }, + }, + }, + //蔡瑁张允 + lianzhou:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + if(!player.isLinked()) return true; + return game.hasPlayer(function(current){ + return current!=player&¤t.hp==player.hp&&!current.isLinked(); + }); + }, + content:function(){ + 'step 0' + if(!player.isLinked()) player.link(); + 'step 1' + var num=game.countPlayer(function(current){ + return current!=player&¤t.hp==player.hp&&!current.isLinked(); + }); + if(num>0){ + player.chooseTarget([1,num],'选择横置任意名体力值等于你的角色',function(card,player,current){ + return current!=player&¤t.hp==player.hp&&!current.isLinked(); + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'tiesuo'},player,player); + }); + } + else event.finish(); + 'step 2' + if(result.bool){ + var targets=result.targets.sortBySeat(); + player.line(targets,'green'); + for(var i of targets) i.link(); + } + }, + ai:{halfneg:true}, + }, + jinglan:{ + audio:2, + trigger:{source:'damageSource'}, + forced:true, + content:function(){ + var delta=player.countCards('h')-player.hp; + if(delta>0) player.chooseToDiscard('h',4,true); + else if(delta==0){ + player.chooseToDiscard('h',true); + player.recover(); + } + else{ + player.damage('fire','nosource'); + player.draw(5); + } + }, + ai:{halfneg:true}, + }, + //滕公主 + xingchong:{ + audio:2, + trigger:{global:'roundStart'}, + direct:true, + filter:function(event,player){ + return player.maxHp>0; + }, + content:function(){ + 'step 0' + var list=[]; + for(var i=0;i<=Math.min(5,player.maxHp);i++){ + list.push(get.cnNumber(i)+'张'); + } + list.push('cancel2'); + player.chooseControl(list).set('prompt',get.prompt('xingchong')).set('prompt2','请首先选择摸牌的张数').set('ai',function(){ + var player=_status.event.player,num1=player.maxHp,num2=player.countCards('h'); + if(num1<=num2) return 0; + return Math.ceil((num1-num2)/2); + }); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('xingchong'); + var num2=result.index; + if(num2>0) player.draw(num2); + var num=Math.min(5,player.maxHp)-num2; + if(num==0) event.finish(); + else event.num=num; + } + else event.finish(); + 'step 2' + if(player.countCards('h')>0){ + player.chooseCard('h',[1,Math.min(player.countCards('h'),event.num)],'请选择要展示的牌').set('ai',()=>1+Math.random()); + } + else event.finish(); + 'step 3' + if(result.bool){ + var cards=result.cards; + player.showCards(cards,get.translation(player)+'发动了【幸宠】'); + player.addGaintag(cards,'xingchong'); + player.addTempSkill('xingchong_effect','roundStart'); + } + }, + subSkill:{ + effect:{ + audio:'xingchong', + trigger:{ + player:['loseAfter'], + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + filter:function(event,player){ + var evt=event.getl(player); + if(!evt||!evt.cards2||!evt.cards2.length) return false; + if(event.name=='lose'){ + for(var i in event.gaintag_map){ + if(event.gaintag_map[i].contains('xingchong')) return true; + } + return false; + } + return player.hasHistory('lose',function(evt){ + if(event!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].contains('xingchong')) return true; + } + return false; + }); + }, + forced:true, + popup:false, + charlotte:true, + onremove:function(player){ + player.removeGaintag('xingchong'); + }, + content:function(){ + 'step 0' + if(trigger.delay===false) game.delayx(); + 'step 1' + player.logSkill('xingchong_effect'); + var num=0; + if(trigger.name=='lose'){ + for(var i in trigger.gaintag_map){ + if(trigger.gaintag_map[i].contains('xingchong')) num++; + } + } + else player.getHistory('lose',function(evt){ + if(trigger!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].contains('xingchong')) num++; + } + }); + player.draw(2*num); + }, + }, + }, + }, + liunian:{ + audio:2, + trigger:{global:'washCard'}, + forced:true, + filter:function(event,player){ + return game.shuffleNumber<=2; + }, + content:function(){ + if(game.shuffleNumber==1) player.addTempSkill('liunian_shuffle1'); + else player.addTempSkill('liunian_shuffle2'); + game.delayx(); + }, + subSkill:{ + shuffle1:{ + charlotte:true, + forced:true, + trigger:{global:'phaseEnd'}, + content:function(){ + player.gainMaxHp(); + game.delayx(); + }, + }, + shuffle2:{ + charlotte:true, + forced:true, + trigger:{global:'phaseEnd'}, + content:function(){ + 'step 0' + player.recover(); + game.delayx(); + 'step 1' + player.addSkill('liunian_effect'); + player.addMark('liunian_effect',10,false); + }, + }, + effect:{ + charlotte:true, + mod:{ + maxHandcard:function(player,num){ + return num+player.countMark('liunian_effect'); + }, + }, + marktext:'年', + intro:{ + content:'手牌上限+#', + }, + }, + }, + }, + //黄承彦 + dcjiezhen:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + var skills=target.getSkills(null,false,false).filter(function(i){ + if(i=='bazhen') return; + var info=get.info(i); + return info&&!get.is.locked(i)&&!info.limited&&!info.juexingji&&!info.zhuSkill&&!info.charlotte; + }); + target.addAdditionalSkill('dcjiezhen_blocker','bazhen'); + target.addSkill('dcjiezhen_blocker'); + target.markAuto('dcjiezhen_blocker',skills); + player.addSkill('dcjiezhen_clear'); + player.markAuto('dcjiezhen_clear',[target]); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + var skills=target.getSkills(null,false,false).filter(function(i){ + if(i=='bazhen') return; + var info=get.info(i); + return info&&!get.is.locked(i)&&!info.limited&&!info.juexingji&&!info.zhuSkill&&!info.charlotte; + }); + if(!skills.length&&target.isEmpty(2)) return 1; + return -0.5*skills.length; + }, + }, + }, + subSkill:{ + blocker:{ + charlotte:true, + init:function(player,skill){ + player.addSkillBlocker(skill); + }, + onremove:function(player,skill){ + player.removeSkillBlocker(skill); + player.removeAdditionalSkill(skill); + delete player.storage.dcjiezhen_blocker; + }, + charlotte:true, + locked:true, + skillBlocker:function(skill,player){ + return skill!='bazhen'&&skill!='dcjiezhen_blocker'&&!lib.skill[skill].charlotte&&player.getStorage('dcjiezhen_blocker').contains(skill); + }, + mark:true, + marktext:'阵', + intro:{ + content:function(storage,player,skill){ + if(storage.length) return '失效技能:'+get.translation(storage); + return '无失效技能'; + } + } + }, + clear:{ + audio:'dcjiezhen', + charlotte:true, + trigger:{ + global:['judgeAfter','die'], + player:'phaseBegin', + }, + forced:true, + forceDie:true, + onremove:true, + filter:function(event,player){ + if(event.name=='die'){ + return player==event.player||player.getStorage('dcjiezhen_clear').contains(event.player); + } + else if(event.name=='judge'){ + return event.skill=='bagua'&&player.getStorage('dcjiezhen_clear').contains(event.player); + } + return player.getStorage('dcjiezhen_clear').length>0; + }, + logTarget:function(event,player){ + if(event.name!='phase') return event.player; + return player.getStorage('dcjiezhen_clear'); + }, + content:function(){ + 'step 0' + var targets=player.getStorage('dcjiezhen_clear'); + if(trigger.name=='die'&&player==trigger.player){ + for(var target of targets){ + target.removeSkill('dcjiezhen_blocker'); + } + player.removeSkill('dcjiezhen_clear'); + event.finish(); + return; + } + if(trigger.name=='phase') event.targets=targets.slice(0).sortBySeat(); + else event.targets=[trigger.player]; + 'step 1' + var target=targets.shift(); + var storage=player.getStorage('dcjiezhen_clear'); + if(storage.contains(target)){ + storage.remove(target); + target.removeSkill('dcjiezhen_blocker'); + if(target.isAlive()&&target.countGainableCards(player,'hej')>0) player.gainPlayerCard(target,'hej',true); + } + if(targets.length>0){ + event.redo(); + } + else{ + player.removeSkill('dcjiezhen_clear'); + } + }, + }, + }, + derivation:'bazhen', + }, + dczecai:{ + audio:2, + trigger:{global:'roundStart'}, + limited:true, + skillAnimation:true, + direct:true, + animationColor:'soil', + filter:function(event,player){ + return game.roundNumber>1; + }, + getMax:function(){ + var getNum=function(current){ + var history=current.actionHistory; + var num=0; + for(var i=history.length-2;i>=0;i--){ + for(var j=0;jmax){ + max=num; + current=target; + } + else if(num==max) current=false; + } + return current; + }, + content:function(){ + 'step 0' + event.target=lib.skill.dczecai.getMax(); + var str='令一名其他角色于本轮内获得〖集智〗'; + if(event.target&&event.target!=player) str+=(';若选择的目标为'+get.translation(event.target)+',则其获得一个额外的回合'); + player.chooseTarget(lib.filter.notMe,get.prompt('dczecai'),str).set('maximum',event.target).set('ai',function(card,player,target){ + if(target!=_status.event.maximum) return 0; + return get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + player.awakenSkill('dczecai'); + var target=result.targets[0]; + player.logSkill('dczecai',target); + target.addAdditionalSkill('dczecai_effect','rejizhi'); + target.addTempSkill('dczecai_effect','roundStart'); + if(target==event.target){ + var evt=trigger._trigger; + target.insertPhase(); + if(evt.player!=target&&!evt._finished){ + evt.finish(); + evt._triggered=5; + evt.player.insertPhase(); + } + } + } + }, + derivation:'rejizhi', + subSkill:{ + effect:{ + charlotte:true, + mark:true, + marktext:'才', + intro:{content:'已拥有技能〖集智〗'}, + }, + }, + }, + dcyinshi:{ + audio:2, + trigger:{player:'damageBegin'}, + usable:1, + filter:function(event,player){ + return !event.card||get.color(event.card)=='none'; + }, + forced:true, + content:function(){ + trigger.cancel(); + }, + group:'dcyinshi_gain', + subSkill:{ + gain:{ + audio:'dcyinshi', + trigger:{global:'judgeEnd'}, + forced:true, + filter:function(event,player){ + return event.skill=='bagua'&&event.result.card&&get.position(event.result.card,true)=='o'; + }, + content:function(){ + player.gain(trigger.result.card,'gain2'); + }, + }, + }, + }, + //高览 + xizhen:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&&(player.canUse('sha',current,false)||player.canUse('juedou',current,false)); + }) + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('xizhen'),'视为对一名角色使用【杀】或【决斗】',function(card,player,target){ + return target!=player&&(player.canUse('sha',target,false)||player.canUse('juedou',target,false)); + }).set('ai',function(target){ + var player=_status.event.player; + var eff1=0,eff2=0; + if(player.canUse('sha',target,false)) eff1=get.effect(target,{name:'sha'},player,player); + if(player.canUse('juedou',target,false)) eff2=get.effect(target,{name:'juedou'},player,player); + var effx=Math.max(eff1,eff2); + if(effx<=0) return 0; + if(target.isHealthy()) effx*=3; + if(get.attitude(player,target)>0) effx*=1.6; + return effx; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('xizhen',target); + var list=[]; + if(player.canUse('sha',target,false)) list.push('sha'); + if(player.canUse('juedou',target,false)) list.push('juedou'); + if(list.length==1) event._result={control:list[0]}; + else player.chooseControl(list).set('prompt','视为对'+get.translation(target)+'使用…').set('ai',function(){ + var player=_status.event.player,target=_status.event.getParent().target; + var eff1=get.effect(target,{name:'sha'},player,player),eff2=get.effect(target,{name:'juedou'},player,player); + return eff1>eff2?0:1; + }); + } + else event.finish(); + 'step 2' + player.useCard({name:result.control,isCard:true},target,false); + 'step 3' + if(target.isIn()){ + player.storage.xizhen_effect=target; + player.addTempSkill('xizhen_effect','phaseUseAfter'); + } + }, + subSkill:{ + effect:{ + audio:'xizhen', + charlotte:true, + onremove:true, + trigger:{global:['useCard','respond']}, + logTarget:function(event,player){ + return player.storage.xizhen_effect; + }, + forced:true, + filter:function(event,player){ + return Array.isArray(event.respondTo)&&event.respondTo[0]==player&&player.storage.xizhen_effect&&player.storage.xizhen_effect.isIn(); + }, + content:function(){ + 'step 0' + var target=player.storage.xizhen_effect; + event.target=target; + target.recover(); + 'step 1' + player.draw(target.isHealthy()?2:1); + }, + mark:'character', + intro:{content:'已指定$为目标'}, + }, + }, + }, + //管宁 + dunshi:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + usable:1, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[['sha','shan','tao','jiu'],0]; + }, + hiddenCard:function(player,name){ + if(player.storage.dunshi&&player.storage.dunshi[0].contains(name)&&!player.getStat('skill').dunshi) return true; + return false; + }, + marktext:'席', + mark:true, + intro:{ + markcount:function(storage){ + return storage[1]; + }, + content:function(storage,player){ + if(!storage) return; + var str='
  • '; + if(!storage[0].length){ + str+='已无可用牌'; + } + else{ + str+='剩余可用牌:'; + str+=get.translation(storage[0]); + } + str+='
  • “席”标记数量:'; + str+=(storage[1]); + return str; + }, + }, + filter:function(event,player){ + if(event.type=='wuxie') return false; + var storage=player.storage.dunshi; + if(!storage||!storage[0].length) return false; + for(var i of storage[0]){ + var card={name:i,isCard:true}; + if(event.filterCard(card,player,event)) return true; + } + return false; + }, + chooseButton:{ + dialog:function(event,player){ + var list=[]; + var storage=player.storage.dunshi; + for(var i of storage[0]) list.push(['基本','',i]); + return ui.create.dialog('遁世',[list,'vcard'],'hidden'); + }, + filter:function(button,player){ + var evt=_status.event.getParent(); + return evt.filterCard({name:button.link[2],isCard:true},player,evt); + }, + check:function(button){ + var card={name:button.link[2]},player=_status.event.player; + if(_status.event.getParent().type!='phase') return 1; + if(card.name=='jiu') return 0; + if(card.name=='sha'&&player.hasSkill('jiu')) return 0; + return player.getUseValue(card,null,true); + }, + backup:function(links,player){ + return { + audio:'dunshi', + filterCard:function(){return false}, + popname:true, + viewAs:{ + name:links[0][2], + isCard:true, + }, + selectCard:-1, + precontent:function(){ + player.addTempSkill('dunshi_damage'); + player.storage.dunshi_damage=event.result.card.name; + }, + } + }, + prompt:function(links,player){ + return '选择【'+get.translation(links[0][2])+'】的目标'; + } + }, + ai:{ + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag,arg){ + var storage=player.storage.dunshi; + if(!storage||!storage[0].length) return false; + if(player.getStat('skill').dunshi) return false; + switch(tag){ + case 'respondSha':return (_status.event.type!='phase'||(player==game.me||player.isUnderControl()||player.isOnline()))&&storage[0].contains('sha'); + case 'respondShan':return storage[0].contains('shan'); + case 'save': + if(arg==player&&storage[0].contains('jiu')) return true; + return storage[0].contains('tao'); + } + }, + order:2, + result:{ + player:function(player){ + if(_status.event.type=='dying'){ + return get.attitude(player,_status.event.dying); + } + return 1; + }, + }, + }, + initList:function(){ + var list,skills=[]; + var banned=['xunyi']; + if(get.mode()=='guozhan'){ + list=[]; + for(var i in lib.characterPack.mode_guozhan) list.push(i); + } + else if(_status.connectMode) list=get.charactersOL(); + else{ + list=[]; + for(var i in lib.character){ + if(lib.filter.characterDisabled2(i)||lib.filter.characterDisabled(i)) continue; + list.push(i); + } + } + for(var i of list){ + if(i.indexOf('gz_jun')==0) continue; + for(var j of lib.character[i][3]){ + var skill=lib.skill[j]; + if(!skill||skill.zhuSkill||banned.contains(j)) continue; + if(skill.ai&&(skill.ai.combo||skill.ai.notemp||skill.ai.neg)) continue; + var info=get.translation(j); + for(var ix=0;ix0) return 3; + return 0; + case 1: + return 1; + case 2: + var num=player.storage.dunshi[1]; + for(var i of ui.selected.buttons){ + if(i.link==1) num++; + } + if(num>0&&player.isDamaged()) return 2; + return 0; + } + }); + 'step 1' + if(player.isOnline2()){ + player.send('closeDialog',event.videoId); + } + event.dialog.close(); + event.links=result.links.sort(); + for(var i of event.links){ + game.log(player,'选择了','#g【遁世】','的','#y选项'+get.cnNumber(i+1,true)); + } + if(event.links.contains(0)){ + trigger.cancel(); + if(!_status.dunshi_list) lib.skill.dunshi.initList(); + var list=_status.dunshi_list.filter(function(i){ + return !target.hasSkill(i,null,null,false); + }).randomGets(3); + if(list.length==0) event.goto(3); + else{ + event.videoId=lib.status.videoId++; + var func=function(skills,id,target){ + var dialog=ui.create.dialog('forcebutton'); + dialog.videoId=id; + dialog.add('令'+get.translation(target)+'获得一个技能'); + for(var i=0;i
    【'+get.translation(skills[i])+'】
    '+lib.translate[skills[i]+'_info']+'
    '); + } + dialog.addText('
    '); + } + if(player.isOnline()) player.send(func,list,event.videoId,target); + else if(player==game.me) func(list,event.videoId,target); + player.chooseControl(list).set('ai',function(){ + var controls=_status.event.controls; + if(controls.contains('cslilu')) return 'cslilu'; + return controls[0]; + }); + } + } + else event.goto(3); + 'step 2' + game.broadcastAll('closeDialog',event.videoId); + target.addSkillLog(result.control); + 'step 3' + var storage=player.storage.dunshi; + if(event.links.contains(1)){ + storage[0].remove(event.cardname); + storage[1]++; + player.markSkill('dunshi'); + } + if(event.links.contains(2)){ + player.loseMaxHp(); + if(storage[1]>0) player.draw(storage[1]); + } + }, + }, + }, + }, + //吉本 + xunli:{ + audio:2, + trigger:{ + global:['loseAfter','loseAsyncAfter'], + }, + forced:true, + filter:function(event,player){ + if(event.type!='discard'||event.getlx===false||player.getExpansions('xunli').length>=9) return false; + for(var i of event.cards){ + if(get.position(i,true)=='d'&&get.color(i,event.cards2&&event.cards2.contains(i)?event.player:false)=='black') return true; + } + return false; + }, + content:function(){ + 'step 0' + var num=9-player.getExpansions('xunli').length; + var cards=[]; + for(var i of trigger.cards){ + if(get.position(i,true)=='d'&&get.color(i,trigger.cards2&&trigger.cards2.contains(i)?trigger.player:false)=='black') cards.push(i); + } + if(cards.length<=num) event._result={ + bool:true, + links:cards, + } + else player.chooseButton(true,num,['寻疠:将'+get.cnNumber(num)+'张牌置于武将牌上',cards]).set('forceAuto',true).set('ai',function(button){ + return get.value(button.link,_status.event.player); + }); + 'step 1' + if(result.bool){ + player.addToExpansion('gain2',result.links).gaintag.add('xunli'); + } + }, + marktext:'疠', + intro:{ + content:'expansion', + markcount:'expansion', + }, + group:'xunli_exchange', + subSkill:{ + exchange:{ + audio:'xunli', + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.getExpansions('xunli').length>0&&player.hasCard((card)=>get.color(card,player)=='black','h'); + }, + content:function(){ + "step 0" + var cards=player.getExpansions('xunli'); + if(!cards.length||!player.countCards('h')){ + event.finish(); + return; + } + var next=player.chooseToMove('寻疠:是否交换“疠”和手牌?'); + next.set('list',[ + [get.translation(player)+'(你)的疠',cards], + ['手牌区',player.getCards('h',(card)=>get.color(card,player)=='black')], + ]); + next.set('filterMove',function(from,to){ + return typeof to!='number'; + }); + next.set('processAI',function(list){ + var player=_status.event.player; + var getv=function(card){ + if(get.info(card).toself) return 0; + return player.getUseValue(card,false); + }; + var cards=list[0][1].concat(list[1][1]).sort(function(a,b){ + return getv(b)-getv(a); + }),cards2=cards.splice(0,player.getExpansions('xunli').length); + return [cards2,cards]; + }); + "step 1" + if(result.bool){ + var pushs=result.moved[0],gains=result.moved[1]; + pushs.removeArray(player.getExpansions('xunli')); + gains.removeArray(player.getCards('h')); + if(!pushs.length||pushs.length!=gains.length) return; + player.logSkill('xunli_exchange'); + player.addToExpansion(pushs,player,'giveAuto').gaintag.add('xunli'); + game.log(player,'将',pushs,'作为“疠”置于武将牌上'); + player.gain(gains,'gain2'); + } + }, + }, + }, + }, + zhishi:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('zhishi')).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + if(att<=4) return 0; + if(target.hasSkillTag('nogain')) att/=10; + return att; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('zhishi',target); + player.storage.zhishi_mark=target; + player.addTempSkill('zhishi_mark',{player:'phaseBegin'}); + } + }, + ai:{expose:0.3}, + subSkill:{ + mark:{ + trigger:{ + global:['dying','useCardToTargeted'], + }, + direct:true, + charlotte:true, + filter:function(event,player){ + if(!player.getExpansions('xunli').length) return false; + var target=player.storage.zhishi_mark; + if(event.name=='dying') return event.player==target; + return event.card.name=='sha'&&event.target==target; + }, + content:function(){ + 'step 0' + var target=player.storage.zhishi_mark; + event.target=target; + player.chooseButton([get.prompt('zhishi',target),'
    弃置任意张“疠”并令其摸等量的牌
    ',player.getExpansions('xunli')],[1,Infinity]).set('ai',function(button){ + var player=_status.event.player,target=player.storage.zhishi_mark; + if(target.hp<1&&target!=get.zhu(player)) return 0; + if(target.hasSkillTag('nogain')) return 0; + return 3-player.getUseValue(card,false); + }); + 'step 1' + if(result.bool){ + player.logSkill('zhishi',target); + player.loseToDiscardpile(result.links); + target.draw(result.links.length); + } + }, + mark:'character', + intro:{ + content:'决定帮助$,具体帮不帮另说', + }, + }, + }, + }, + lieyi:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.getExpansions('xunli').length>0; + }, + filterTarget:lib.filter.notMe, + content:function(){ + 'step 0' + var cards=player.getExpansions('xunli'); + var cards2=cards.filter(function(card){ + return target.isIn()&&player.canUse(card,target,false); + }); + if(cards2.length){ + player.chooseButton(['对'+get.translation(target)+'使用一张牌',cards2],true).set('ai',function(button){ + return get.order(button.link); + }); + } + else{ + event.finish(); + if(cards.length) player.loseToDiscardpile(cards); + if(target.isAlive()&&!target.hasHistory('damage',function(evt){ + return evt.getParent('lieyi')==event&&evt._dyinged; + })) player.loseHp(); + } + 'step 1' + player.useCard(result.links[0],target,false); + event.goto(0); + }, + ai:{ + order:2, + result:{ + target:function(player,target){ + var cards=player.getExpansions('xunli'); + var effect=0,damage=0; + for(var i of cards){ + if(player.canUse(i,target,false)){ + effect+=get.effect(target,i,player,target); + damage+=get.tag(i,'damage'); + } + } + if(damage>=target.hp) return effect; + if(player.hp>2&&cards.length>3) return effect/3; + return 0; + }, + }, + }, + }, + //马日磾 + bingjie:{ + trigger:{player:'phaseUseBegin'}, + check:function(event,player){ + return player.maxHp>3&&player.isDamaged()&&player.hasCard(function(card){ + return game.hasPlayer(function(current){ + return current!=player&&get.attitude(player,current)<0&&player.canUse(card,current,null,true)&&get.effect(current,card,player,player)>0; + })&&player.hasValueTarget(card); + },'hs'); + }, + content:function(){ + 'step 0' + player.loseMaxHp(); + 'step 1' + player.addTempSkill('bingjie_effect'); + game.delayx(); + }, + subSkill:{ + effect:{ + audio:'bingjie', + trigger:{player:'useCardToPlayered'}, + forced:true, + charlotte:true, + logTarget:'target', + filter:function(event,player){ + return event.target!=player&&(event.card.name=='sha'||get.type(event.card,false)=='trick')&&event.target.countCards('he')>0; + }, + content:function(){ + 'step 0' + trigger.target.chooseToDiscard('he',true); + 'step 1' + if(result.bool&&result.cards.length&&get.color(result.cards[0],trigger.target)==get.color(trigger.card)){ + game.log(trigger.target,'不能响应',trigger.card); + trigger.directHit.push(trigger.target); + } + }, + }, + }, + }, + zhengding:{ + audio:2, + trigger:{player:['useCard','respond']}, + forced:true, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + if(!Array.isArray(event.respondTo)) return false; + if(player==event.respondTo[0]) return false; + var color=get.color(event.card); + if(color=='none') return false; + return color==get.color(event.respondTo[1]); + }, + content:function(){ + player.gainMaxHp(); + player.recover(); + }, + }, + //孙茹 + xiecui:{ + audio:2, + trigger:{global:'damageBegin1'}, + filter:function(event,player){ + var source=event.source; + if(!source||source!=_status.currentPhase||event.getParent().type!='card') return false; + return !source.hasHistory('sourceDamage',function(evt){ + return evt.getParent().type=='card'; + }); + }, + logTarget:'source', + prompt2:function(event,player){ + var str=('令'+get.translation(event.player)+'即将受到的'); + str+=(''+event.num+'点'); + if(lib.linked.contains(event.nature)){ + str+=(get.translation(event.nature)+'属性'); + } + str+='伤害+1'; + if(event.source.group=='wu'){ + var cards=event.cards.filterInD(); + if(cards.length){ + str+=(';然后'+get.translation(event.source)+'获得'+get.translation(cards)+',且本回合的手牌上限+1') + } + } + return str; + }, + check:function(event,player){ + var att=get.attitude(player,event.player); + if(att<0){ + if(event.source.group!='wu'||!event.cards.filterInD().length) return true; + return get.attitude(player,event.source)>0; + } + return false; + }, + content:function(){ + trigger.num++; + var source=trigger.source; + if(source.group=='wu'){ + var cards=trigger.cards.filterInD(); + if(cards.length>0){ + source.gain(cards,'gain2'); + source.addMark('xiecui_effect',1,false); + source.addTempSkill('xiecui_effect'); + } + } + }, + subSkill:{ + effect:{ + charlotte:true, + mod:{ + maxHandcard:(player,num)=>num+player.countMark('xiecui_effect'), + }, + marktext:'翠', + onremove:true, + intro:{content:'手牌上限+#'}, + }, + }, + ai:{threaten:1.75}, + }, + youxu:{ + audio:2, + trigger:{global:'phaseEnd'}, + logTarget:'player', + filter:function(event,player){ + return event.player.countCards('h')>event.player.hp; + }, + check:function(event,player){ + if(get.attitude(player,event.player)<=0) return true; + else return game.hasPlayer(function(current){ + return current!=event.player&¤t.isDamaged()&¤t.isMinHp()&& + get.attitude(player,current)>0&&get.recoverEffect(current,player,player)>0; + }); + }, + content:function(){ + 'step 0' + if(player==trigger.player){ + player.chooseCard('h',true,'请展示一张手牌'); + } + else{ + player.choosePlayerCard(trigger.player,true,'h'); + } + 'step 1' + var card=result.cards[0]; + event.card=card; + var str=get.translation(player); + if(player!=trigger.player) str+=('对'+get.translation(trigger.player)); + str+='发动了【忧恤】'; + player.showCards(card,str); + player.chooseTarget('令一名角色获得'+get.translation(card),'若其体力值为全场最少,则其回复1点体力',function(card,player,target){ + return target!=_status.event.getTrigger().player; + }).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target); + if(att<0) return 0; + if(target.isDamaged()&&target.isMinHp&&get.recoverEffect(target,player,player)>0) return 4*att; + return att; + }); + 'step 2' + var target=result.targets[0]; + event.target=target; + player.line(target,'green'); + target.gain(card,trigger.player,'give').giver=player; + 'step 3' + if(target.isMinHp()) target.recover(); + }, + }, + //夏侯令女 + fuping:{ + audio:2, + hiddenCard:function(player,name){ + var list=player.getStorage('fuping').slice(0); + list.removeArray(player.getStorage('fuping_round')); + return list.contains(name)&&player.hasCard((card)=>(get.type(card)!='basic'),'ehs'); + }, + enable:'chooseToUse', + locked:false, + filter:function(event,player){ + var list=player.getStorage('fuping').slice(0); + list.removeArray(player.getStorage('fuping_round')); + if(!list.length) return false; + if(!player.hasCard((card)=>(get.type(card)!='basic'),'ehs')) return false; + for(var i of list){ + var type=get.type2(i,false); + if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true; + } + return false; + }, + chooseButton:{ + dialog:function(event,player){ + var list=player.getStorage('fuping').slice(0); + list.removeArray(player.getStorage('fuping_round')); + var list2=[]; + for(var i of list){ + var type=get.type2(i,false); + if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) list2.push([type,'',i]); + } + return ui.create.dialog('浮萍',[list2,'vcard']); + }, + check:function(button){ + if(_status.event.getParent().type!='phase') return 1; + return _status.event.player.getUseValue({name:button.link[2]},null,true); + }, + backup:function(links,player){ + return { + audio:'fuping', + filterCard:(card)=>get.type(card)!='basic', + position:'he', + popname:true, + viewAs:{ + name:links[0][2], + isCard:true, + }, + check:function(card){ + return 8-get.value(card); + }, + precontent:function(){ + player.addTempSkill('fuping_round'); + player.markAuto('fuping_round',[event.result.card.name]); + }, + } + }, + prompt:function(links,player){ + return '将一张非基本牌当做【'+get.translation(links[0][2])+'】使用'; + }, + }, + ai:{ + order:8, + result:{player:1}, + respondSha:true, + skillTagFilter:function(player){ + var list=player.getStorage('fuping').slice(0); + list.removeArray(player.getStorage('fuping_round')); + return list.contains('sha'); + }, + }, + mod:{ + targetInRange:function(card,player,target){ + if(player.countDisabled()>=5) return true; + }, + }, + marktext:'萍', + intro:{content:'已记录$'}, + group:'fuping_mark', + subSkill:{ + mark:{ + trigger:{global:'useCardAfter'}, + filter:function(event,player){ + return player!=event.player&&event.targets.contains(player)&& + player.countDisabled()<5&&!player.getStorage('fuping').contains(event.card.name); + }, + logTarget:'player', + prompt2:(event)=>('废除一个装备栏并记录【'+get.translation(event.card.name)+'】'), + check:function(event,player){ + var list=['tao','juedou','guohe','shunshou','wuzhong','xietianzi','yuanjiao','wanjian','nanman','huoshaolianying','chuqibuyi','zhujinqiyuan','lebu','bingliang']; + if(!list.contains(event.card.name)) return false; + if(['nanman','wanjian'].contains(event.card.name)&&!player.hasValueTarget({name:event.card.name})) return false; + var list=[3,5,4,1,2]; + for(var i of list){ + if(!player.isDisabled(i)){ + var card=player.getEquip(i); + if(!card) return true; + if(get.value(card,player)<=0) return true; + } + } + return false; + }, + content:function(){ + player.markAuto('fuping',[trigger.card.name]); + game.log(player,'记录了','#y'+get.translation(trigger.card.name)); + player.chooseToDisable().set('ai',function(event,player,list){ + var list=[3,5,4,1,2]; + for(var i of list){ + if(!player.isDisabled(i)){ + var card=player.getEquip(i); + if(!card) return 'equip'+i; + if(get.value(card,player)<=0) return 'equip'+i; + } + } + return list.randomGet(); + }); + }, + }, + backup:{audio:'fuping'}, + round:{charlotte:true,onremove:true}, + }, + }, + weilie:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countMark('weilie')<=player.getStorage('fuping').length&&player.countCards('he')>0&&game.hasPlayer((current)=>current.isDamaged()) + }, + filterCard:true, + position:'he', + filterTarget:(card,player,target)=>target.isDamaged(), + check:function(card){ + return 8-get.value(card); + }, + content:function(){ + 'step 0' + player.addMark('weilie',1,false); + target.recover(); + 'step 1' + if(target.isDamaged()) target.draw(); + }, + onremove:true, + ai:{ + order:1, + result:{ + player:function(player,target){ + var eff=get.recoverEffect(target,player,player); + if(target.getDamagedHp()>1) eff+=get.effect(target,{name:'wuzhong'},player,player)/2; + return eff; + }, + }, + }, + }, + //张瑶 + //Partly powered by 烟雨墨染 + yuanyu:{ + audio:2, + enable:'phaseUse', + usable:1, + content:function(){ + 'step 0' + player.draw(); + 'step 1' + if(player.countCards('h')>0){ + var suits=lib.suit.slice(0),cards=player.getExpansions('yuanyu'); + for(var i of cards) suits.remove(get.suit(i,false)); + var str='选择一张手牌,作为“怨”置于武将牌上;同时选择一名其他角色,令该角色获得〖怨语〗的后续效果。' + if(suits.length){ + str+='目前“怨”中未包含的花色:'; + for(var i of suits) str+=get.translation(i); + } + player.chooseCardTarget({ + filterCard:true, + filterTarget:lib.filter.notMe, + position:'h', + prompt:'怨语:选择置于武将牌上的牌和目标', + prompt2:str, + suits:suits, + forced:true, + ai1:function(card){ + var val=get.value(card),evt=_status.event; + if(evt.suits.contains(get.suit(card,false))) return 8-get.value(card); + return 5-get.value(card); + }, + ai2:function(target){ + var player=_status.event.player; + if(player.storage.yuanyu_damage&&player.storage.yuanyu_damage.contains(target)) return 0; + return -get.attitude(player,target); + }, + }); + } + else event.finish(); + 'step 2' + var target=result.targets[0]; + player.addSkill('yuanyu_damage'); + player.markAuto('yuanyu_damage',result.targets); + player.line(target,'green'); + if(!target.storage.yuanyu_mark){ + target.storage.yuanyu_mark=player; + target.markSkillCharacter('yuanyu_mark',player,'怨语','已获得〖怨语〗效果'); + target.addSkill('yuanyu_mark'); + } + player.addToExpansion(result.cards,player,'give').gaintag.add('yuanyu'); + }, + intro:{ + content:'expansion', + markcount:'expansion', + }, + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); + player.removeSkill('yuanyu_damage'); + }, + ai:{ + order:7, + result:{ + player:1, + }, + }, + subSkill:{ + mark:{ + mark:'character', + charlotte:true, + intro:{ + content:'已获得〖怨语〗效果', + onunmark:true, + }, + }, + damage:{ + trigger:{global:['damageSource','phaseDiscardBegin']}, + forced:true, + charlotte:true, + onremove:function(player,skill){ + if(player.storage[skill]){ + for(var i of player.storage[skill]){ + if(i.storage.yuanyu_mark==player) i.unmarkSkill('yuanyu_mark'); + } + } + delete player.storage[skill]; + }, + filter:function(event,player){ + if(event.name=='damage'){ + var source=event.source; + return source&&player.getStorage('yuanyu_damage').contains(source)&&source.countCards('h')>0; + } + else{ + if(player==event.player){ + return player.getStorage('yuanyu_damage').some(function(target){ + return target.isIn()&&target.countCards('h')>0; + }); + } + else if(player.getStorage('yuanyu_damage').contains(event.player)){ + return event.player.countCards('h')>0; + } + return false; + } + }, + content:function(){ + 'step 0' + if(trigger.name=='phaseDiscard'){ + if(trigger.player==player){ + event.targets=player.getStorage('yuanyu_damage').filter(function(target){ + return target.isIn()&&target.countCards('h')>0; + }).sortBySeat(); + } + else event.targets=[trigger.player]; + } + else event.targets=[trigger.source]; + 'step 1' + event.target=event.targets.shift(); + event.count=trigger.name=='damage'?trigger.num:1; + 'step 2' + event.count--; + var suits=lib.suit.slice(0),cards=player.getExpansions('yuanyu'); + for(var i of cards) suits.remove(get.suit(i,false)); + var next=target.chooseCard('h',true,'将一张手牌置于'+get.translation(player)+'的武将牌上'); + next.set('suits',suits); + next.set('ai',function(card){ + var val=get.value(card),evt=_status.event; + if(evt.suits.contains(get.suit(card,false))) return 5-get.value(card); + return 8-get.value(card); + }); + if(suits.length){ + var str='目前未包含的花色:'; + for(var i of suits) str+=get.translation(i); + next.set('prompt2',str); + } + 'step 3' + player.addToExpansion(result.cards,target,'give').gaintag.add('yuanyu'); + 'step 4' + if(!player.hasSkill('yuanyu_damage')) event.finish(); + else if(event.count>0&&target.countCards('h')>0) event.goto(2); + else if(event.targets.length>0) event.goto(1); + }, + }, + }, + }, + xiyan:{ + audio:2, + trigger:{player:'addToExpansionAfter'}, + filter:function(event,player){ + if(!event.gaintag.contains('yuanyu')) return false; + var cards=player.getExpansions('yuanyu'); + if(cards.length_status.currentPhase, + prompt2:'获得所有“怨”', + check:()=>true, + content:function(){ + 'step 0' + player.removeSkill('yuanyu_damage'); + var cards=player.getExpansions('yuanyu'); + player.gain(cards,'gain2'); + 'step 1' + var target=_status.currentPhase; + if(player==target){ + player.addMark('xiyan_buff',4,false); + player.addTempSkill('xiyan_buff'); + delete player.getStat('skill').yuanyu; + event.finish(); + } + else{ + player.chooseBool('夕颜:是否令'+get.translation(target)+'本回合的手牌上限-4且不能使用基本牌?').set('ai',function(){ + return _status.event.bool; + }).set('bool',get.attitude(player,target)<0); + } + 'step 2' + if(result.bool){ + var target=_status.currentPhase; + target.addMark('xiyan_debuff',4,false); + target.addTempSkill('xiyan_debuff'); + } + }, + subSkill:{ + buff:{ + charlotte:true, + mark:true, + marktext:" +4 ", + intro:{ + content:"本回合手牌上限+4且使用牌无次数限制", + }, + mod:{ + maxHandcard:function(player,num){ + return num+player.countMark('xiyan_buff'); + }, + cardUsable:function(card,player){ + return Infinity; + }, + }, + sub:true, + }, + debuff:{ + charlotte:true, + mark:true, + marktext:" -4 ", + intro:{ + content:"本回合手牌上限-#且不能使用基本牌", + }, + mod:{ + maxHandcard:function(player,num){ + return num-player.countMark('xiyan_debuff'); + }, + cardEnabled:function(card){ + if(get.type(card)=='basic') return false; + }, + cardSavable:function(card){ + if(get.type(card)=='basic') return false; + }, + }, + sub:true, + }, + }, + }, + //滕胤 + chenjian:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + prompt2:function(event,player){ + return '展示牌堆顶的'+get.cnNumber(3+player.countMark('chenjian'))+'张牌。然后你可依次执行以下两项中的任意项:⒈弃置一张牌,然后令一名角色获得与你弃置牌花色相同的牌。⒉使用其中剩余的一张牌。若你执行了所有选项,则你获得一枚“陈见”,然后重铸所有手牌。'; + }, + content:function(){ + 'step 0' + var cards=get.cards(3+player.countMark('chenjian')); + event.cards=cards; + game.cardsGotoOrdering(cards); + game.log(player,'展示了',event.cards); + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,id,cards){ + var str=get.translation(player)+'发动了【陈见】'; + var dialog=ui.create.dialog(str,cards); + dialog.videoId=id; + },player,event.videoId,event.cards); + game.addVideo('showCards',player,[get.translation(player)+'发动了【陈见】',get.cardsInfo(event.cards)]); + game.delay(2); + 'step 1' + if(!player.countCards('he')){ + game.broadcastAll('closeDialog',event.videoId); + game.addVideo('cardDialog',null,event.videoId); + event.goto(4); + } + else{ + player.chooseToDiscard('he').set('prompt',false).set('ai',function(card){ + var cards=_status.event.getParent().cards,val=-get.value(card),suit=get.suit(card); + for(var i of cards){ + if(get.suit(i,false)==suit) val+=get.value(i,'raw'); + } + return val; + }); + var func=function(id){ + var dialog=get.idDialog(id); + if(dialog) dialog.content.firstChild.innerHTML='是否弃置一张牌?'; + }; + if(player==game.me) func(event.videoId); + else if(player.isOnline()) player.send(func,event.videoId); + } + 'step 2' + game.broadcastAll('closeDialog',event.videoId); + game.addVideo('cardDialog',null,event.videoId); + if(result.bool){ + event.goon1=true; + var suit=get.suit(result.cards[0],player); + var cards2=event.cards.filter(function(i){ + return get.suit(i,false)==suit; + }); + if(cards2.length){ + event.cards2=cards2; + player.chooseTarget(true,'选择一名角色获得'+get.translation(cards2)).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(att>0){ + return att+Math.max(0,5-target.countCards('h')); + } + return att; + }); + } + else event.goto(4); + } + else event.goto(4); + 'step 3' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + target.gain(event.cards2,'gain2'); + event.cards.removeArray(event.cards2); + } + 'step 4' + var cards2=cards.filter(function(i){ + return player.hasUseTarget(i); + }); + if(cards2.length) player.chooseButton(['是否使用其中的一张牌?',cards2]).set('ai',function(button){ + return player.getUseValue(button.link); + }); + else event.finish(); + 'step 5' + if(result.bool){ + player.chooseUseTarget(true,result.links[0],false); + event.goon2=true; + } + 'step 6' + if(event.goon1&&event.goon2){ + if(player.countMark('chenjian')<2) player.addMark('chenjian',1,false); + var cards=player.getCards('h'); + player.loseToDiscardpile(cards); + player.draw(cards.length); + } + }, + marktext:'见', + intro:{content:'展示牌数量+#'}, + }, + xixiu:{ + mod:{ + canBeDiscarded:function(card,player,target){ + if(player!=target&&get.position(card)=='e'&&target.countCards('e')==1) return false; + }, + }, + audio:2, + trigger:{target:'useCardToTargeted'}, + forced:true, + filter:function(event,player){ + if(player==event.player||!player.countCards('e')) return false; + var suit=get.suit(event.card,false); + if(suit=='none') return false; + return player.hasCard(function(card){ + return get.suit(card,player)==suit; + },'e'); + }, + content:function(){ + player.draw(); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(typeof card=='object'&&player!=target){ + var suit=get.suit(card); + if(suit=='none') return; + if(player.hasCard(function(card){ + return get.suit(card,player)==suit; + },'e')) return [1,0.08]; + } + }, + }, + }, + }, + //张嫙 + tongli:{ + audio:2, + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + if(!event.isFirstTarget||(event.card.storage&&event.card.storage.tongli)) return false; + var type=get.type(event.card); + if(type!='basic'&&type!='trick') return false; + var hs=player.getCards('h'); + if(!hs.length) return false; + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=player) return false; + var num1=player.getHistory('useCard',function(evtx){ + if(evtx.getParent('phaseUse')!=evt) return false; + return !evtx.card.storage||!evtx.card.storage.tongli; + }).length; + if(hs.length0) event.redo(); + }, + }, + },*/ + }, + shezang:{ + audio:2, + round:1, + trigger:{global:'dying'}, + frequent:true, + filter:function(event,player){ + return event.player==player||player==_status.currentPhase; + }, + content:function(){ + var cards=[]; + for(var i of lib.suit){ + var card=get.cardPile2(function(card){ + return get.suit(card,false)==i; + }); + if(card) cards.push(card); + } + if(cards.length) player.gain(cards,'gain2'); + }, + }, + //王桃王悦 + huguan:{ + audio:2, + audioname:['wangyue'], + trigger:{global:'useCard'}, + direct:true, + filter:function(event,player){ + if(get.color(event.card,false)!='red') return false; + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=event.player) return false; + return event.player.getHistory('useCard',function(event){ + return event.getParent('phaseUse')==evt; + }).indexOf(event)==0; + }, + content:function(){ + 'step 0' + player.chooseControl(lib.suit,'cancel2').set('prompt',get.prompt('huguan',trigger.player)).set('prompt2','令某种花色的手牌不计入其本回合的手牌上限').set('ai',function(){ + var player=_status.event.player,target=_status.event.getTrigger().player; + if(get.attitude(player,target)<=0) return 'cancel2'; + var list=lib.suit.slice(0); + list.removeArray(target.getStorage('huguan_add')); + if(list.length) return list.randomGet(); + return 'cancel2'; + }); + 'step 1' + if(result.control!='cancel2'){ + var target=trigger.player; + player.logSkill('huguan',target); + game.log(player,'选择了','#g'+get.translation(result.control),'花色') + target.addTempSkill('huguan_add'); + target.markAuto('huguan_add',[result.control]); + } + }, + subSkill:{ + add:{ + charlotte:true, + onremove:true, + mod:{ + ignoredHandcard:function(card,player){ + if(player.getStorage('huguan_add').contains(get.suit(card,player))) return true; + }, + cardDiscardable:function(card,player,name){ + if(name=='phaseDiscard'&&player.getStorage('huguan_add').contains(get.suit(card,player))) return false; + } + }, + intro:{content:'本回合$花色的牌不计入手牌上限'}, + }, + }, + }, + yaopei:{ + audio:2, + trigger:{global:'phaseDiscardEnd'}, + direct:true, + filter:function(event,player){ + if(player==event.player||!event.player.isIn()) return false; + if(!player.hasAllHistory('useSkill',function(evt){ + return evt.skill=='huguan'&&evt.targets.contains(event.player); + })) return false; + var suits=[]; + event.player.getHistory('lose',function(evt){ + if(evt.type=='discard'&&evt.getParent('phaseDiscard')==event){ + for(var i of evt.cards2) suits.add(get.suit(i,evt.hs.contains(i)?evt.player:false)); + } + }); + if(suits.length>=lib.suit.length) return false; + if(_status.connectMode&&player.countCards('h')>0) return true; + return player.hasCard(function(card){ + return !suits.contains(get.suit(card)); + },'he'); + }, + content:function(){ + 'step 0' + var suits=[]; + trigger.player.getHistory('lose',function(evt){ + if(evt.type=='discard'&&evt.getParent('phaseDiscard')==trigger){ + for(var i of evt.cards2) suits.add(get.suit(i,evt.hs.contains(i)?evt.player:false)); + } + }); + player.chooseCardTarget({ + prompt:get.prompt('yaopei',trigger.player), + prompt2:'操作提示:选择要弃置的牌,并选择执行摸牌选项的角色,另一名角色执行回复体力的选项。', + suits:suits, + position:'he', + filterCard:function(card,player){ + return !_status.event.suits.contains(get.suit(card))&&lib.filter.cardDiscardable(card,player,'yaopei'); + }, + filterTarget:function(card,player,target){ + return target==player||target==_status.event.getTrigger().player; + }, + ai1:function(card){ + return 8-get.value(card); + }, + ai2:function(target){ + var player=_status.event.player,source=_status.event.getTrigger().player; + var recoverer=(player==target?source:player); + if(recoverer.isHealthy()) return (get.attitude(player,target)>0?1:0); + if(get.recoverEffect(recoverer,player,player)>0&&get.attitude(player,target)>0) return 2; + return 0; + }, + }); + 'step 1' + if(result.bool){ + var target=trigger.player; + player.logSkill('yaopei',target); + player.discard(result.cards); + if(player==result.targets[0]){ + target.recover(); + player.draw(2); + } + else{ + target.draw(2); + player.recover(); + } + } + }, + }, + mingluan:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player!=event.player&&event.player.isIn()&&player.hasSkill('mingluan_mark')&&player.countCards('he')>0; + }, + content:function(){ + 'step 0' + player.chooseToDiscard('he',get.prompt('mingluan'),'弃置任意张牌,并摸等同于'+get.translation(trigger.player)+'手牌数的牌(至多摸至五张)',[1,Infinity]).set('ai',function(card){ + var player=_status.event.player; + var ph=player.countCards('h'); + if(get.position(card)=='h') ph--; + var num=Math.min(_status.event.getTrigger().player.countCards('h'),5-ph); + if(num>0) return 3.5*num+0.01-get.value(card); + return 0.01-get.value(card); + }).logSkill=['mingluan',trigger.player]; + 'step 1' + if(result.bool){ + var num=trigger.player.countCards('h'),num2=5-player.countCards('h'); + if(num>0&&num2>0) player.draw(Math.min(num,num2)); + } + }, + group:'mingluan_count', + subSkill:{ + count:{ + charlotte:true, + trigger:{global:'recoverEnd'}, + silent:true, + popup:false, + firstDo:true, + filter:function(event,player){ + var current=_status.currentPhase; + return current&¤t!=player&&!player.hasSkill('mingluan_mark'); + }, + content:function(){ + player.addTempSkill('mingluan_mark'); + }, + }, + mark:{ + charlotte:true, + }, + }, + }, + //赵嫣 + jinhui:{ + audio:2, + enable:'phaseUse', + usable:1, + content:function(){ + 'step 0' + var cards=[]; + while(cards.length<3){ + var card=get.cardPile2(function(card){ + for(var i of cards){ + if(i.name==card.name) return false; + } + var info=get.info(card,false); + if(info.ai&&info.ai.tag&&info.ai.tag.damage) return false; + return !info.notarget&&(info.toself||info.singleCard||!info.selectTarget||info.selectTarget==1); + }); + if(card) cards.push(card); + else break; + } + if(!cards.length) event.finish(); + else{ + player.showCards(cards,get.translation(player)+'发动了【锦绘】'); + event.cards=cards; + game.cardsGotoOrdering(cards); + if(game.hasPlayer((current)=>(current!=player))) player.chooseTarget('选择【锦绘】的目标',true,lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player,cards=_status.event.getParent().cards.slice(0); + var max_effect=0,max_effect_player=0; + for(var i of cards){ + var targetx=lib.skill.jinhui.getUsableTarget(i,target,player); + if(targetx){ + var effect2=get.effect(targetx,i,target,target); + var effect3=get.effect(targetx,i,target,player); + if(effect2>max_effect){ + max_effect=effect2; + max_effect_player=effect3; + } + } + } + return max_effect_player; + }); + else event.finish(); + } + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.line(target,'green'); + var cards=cards.filter(function(card){ + return lib.skill.jinhui.getUsableTarget(card,target,player); + }); + if(cards.length){ + if(cards.length==1) event._result={bool:true,links:cards}; + else target.chooseButton(['选择按“锦绘”规则使用一张牌',cards],true).set('ai',function(button){ + var player=_status.event.player,target=_status.event.getParent().player,card=button.link; + var targetx=lib.skill.jinhui.getUsableTarget(card,player,target); + var effect=get.effect(targetx,card,player,player),cards=_status.event.getParent().cards.slice(0); + var effect2=0,effect3=0; + cards.remove(button.link); + for(var i of cards){ + var targetx=lib.skill.jinhui.getUsableTarget(i,target,player); + if(targetx){ + effect2+=get.effect(targetx,i,target,target); + effect3+=get.effect(targetx,i,target,player); + } + } + if(effect2>0) effect+=effect3; + return effect; + }); + } + else event.goto(3); + } + else event.finish(); + 'step 2' + if(result.bool){ + var card=result.links[0]; + event.cards.remove(card); + var targetx=lib.skill.jinhui.getUsableTarget(card,target,player); + target.useCard(card,targetx,false,'noai'); + } + 'step 3' + var cards=cards.filter(function(card){ + return lib.skill.jinhui.getUsableTarget(card,player,target); + }); + if(cards.length){ + player.chooseButton(['是否按“锦绘”规则使用其中一张牌?',cards]).set('ai',function(button){ + var player=_status.event.player,target=_status.event.getParent().target; + var card=button.link,targetx=lib.skill.jinhui.getUsableTarget(card,player,target); + return get.effect(targetx,card,player,player) + }); + } + else event.finish(); + 'step 4' + if(result.bool){ + var card=result.links[0]; + cards.remove(card); + var targetx=lib.skill.jinhui.getUsableTarget(card,player,target); + if(targetx){ + player.useCard(card,targetx,false,'noai'); + } + if(cards.length) event.goto(3); + } + else event.finish(); + }, + getUsableTarget:function(card,player,target){ + var info=get.info(card,false); + if(info.toself) return player.canUse(card,player,false)?player:false; + return (target.isIn()&&player.canUse(card,target,false))?target:false; + }, + ai:{ + order:5, + result:{player:1}, + }, + }, + qingman:{ + audio:2, + trigger:{global:'phaseEnd'}, + forced:true, + logTarget:'player', + filter:function(event,player){ + if(!event.player.isAlive()) return false; + var num=player.countCards('h'); + if(num>=5) return false; + var num2=0; + for(var i=1;i<=5;i++){ + if(event.player.isEmpty(i)) num2++; + } + return num0){ + event.num=Math.ceil(th/2); + var list=[ + '本回合不能使用或打出手牌,然后'+str+'摸两张牌', + '展示所有手牌,并将其中一种花色的所有牌交给'+str, + '弃置'+get.cnNumber(event.num)+'张手牌', + ]; + target.chooseControl().set('choiceList',list).set('ai',function(){ + return get.rand(0,2); + }); + } + else event._result={index:0}; + 'step 1' + switch(result.index){ + case 0: + target.addTempSkill('yachai_block'); + player.draw(2); + event.finish(); + break; + case 1:target.showHandcards();break; + case 2:event.goto(4);break; + } + 'step 2' + var map={},hs=target.getCards('h'); + for(var i of hs){ + map[get.suit(i,target)]=true; + } + var list=[]; + for(var i of lib.suit){ + if(map[i]) list.push(i); + } + if(!list.length) event.finish(); + else if(list.length==1) event._result={control:list[0]}; + else target.chooseControl(list).set('prompt','将一种花色的牌交给'+get.translation(player)); + 'step 3' + var cards=target.getCards('h',function(card){ + return get.suit(card,target)==result.control&&lib.filter.cardDiscardable(card,target,'yachai'); + }); + if(cards.length) target.give(cards,player,'give'); + event.finish(); + 'step 4' + target.chooseToDiscard('h',true,num); + }, + subSkill:{ + block:{ + mark:true, + intro:{content:'不能使用或打出手牌'}, + charlotte:true, + mod:{ + cardEnabled2:function(card){ + if(get.position(card)=='h') return false; + }, + }, + }, + }, + }, + qingtan:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.hasPlayer((current)=>current.countCards('h')>0); + }, + filterTarget:function(card,player,target){ + return target.countCards('h')>0; + }, + selectTarget:-1, + multitarget:true, + multiline:true, + content:function(){ + 'step 0' + targets.sortBySeat(); + var next=player.chooseCardOL(targets,'请选择要展示的牌',true).set('ai',function(card){ + return -get.value(card); + }).set('source',player); + next.aiCard=function(target){ + var hs=target.getCards('h'); + return {bool:true,cards:[hs.randomGet()]}; + }; + next._args.remove('glow_result'); + 'step 1' + var cards=[]; + event.videoId=lib.status.videoId++; + for(var i=0;i'+get.translation(targetsx)+''); + dialog.push(map[suit]); + list.push(suit); + } + } + if(list.length){ + player.chooseControl(list,'cancel2').set('dialog',dialog); + } + else event.finish(); + 'step 3' + if(result.control!='cancel2'){ + event.cards2=cards.filter(function(i){ + return get.suit(i)==result.control; + }) + for(var i=0;i0&&target!=player&&target.countGainableCards(player,'h')>0; + }, + content:function(){ + 'step 0' + player.gainPlayerCard(target,'h',true,[1,player.hp]); + 'step 1' + if(result.bool&&target.isIn()){ + var num=result.cards.length,hs=player.getCards('he'); + var numx=0; + for(var i of result.cards) numx+=get.number(i,player); + event.num=numx; + event.cards=result.cards; + if(!hs.length) event.finish(); + else if(hs.length<=num) event._result={bool:true,cards:hs}; + else player.chooseCard('he',true,'选择交给'+get.translation(target)+get.cnNumber(num)+'张牌','(已获得牌的点数和:'+numx+')',num); + } + else event.finish(); + 'step 2' + player.give(result.cards,target); + var numx=0; + for(var i of result.cards) numx+=get.number(i,player); + if(numx>num) player.draw(); + else if(numx-3) return false; + if(player.hp3) return true; + return false; + }, + preHidden:true, + content:function(){ + 'step 0' + player.loseHp(); + event.target=trigger.player; + 'step 1' + event.addIndex=0; + var list=[],num=target.countCards('h')-player.countCards('h'); + event.num=num; + if(num>0&&target.countCards('h')>0) list.push('令其弃置'+get.cnNumber(num)+'张手牌'); + else event.addIndex++; + if(target.hp>player.hp) list.push('令其失去'+get.cnNumber(target.hp-player.hp)+'点体力'); + if(!list.length) event.finish(); + else if(list.length==1) event._result={index:0}; + else player.chooseControl().set('choiceList',list).set('prompt','令'+get.translation(target)+'执行一项').set('ai',function(){ + var player=_status.event.player,target=_status.event.getParent().target; + return (target.hp-player.hp)>(Math.min(_status.event.getParent().num,target.countCards('h'))/2)?1:0; + }); + 'step 2' + if(result.index+event.addIndex==0) target.chooseToDiscard(num,true,'h'); + else target.loseHp(target.hp-player.hp); + }, + }, + boyan:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + 'step 0' + target.drawTo(Math.min(5,target.maxHp)); + 'step 1' + target.addTempSkill('boyan_block'); + }, + subSkill:{ + block:{ + mark:true, + intro:{content:'不能使用或打出手牌'}, + charlotte:true, + mod:{ + cardEnabled2:function(card){ + if(get.position(card)=='h') return false; + }, + }, + }, + }, + ai:{ + order:4, + result:{ + target:function(player,target){ + if(get.attitude(player,target)>0) return Math.max(0,Math.min(5,target.maxHp)-target.countCards('h')); + if(Math.max(0,Math.min(5,target.maxHp)-target.countCards('h'))<=1&&target.countCards('h','shan')&&!target.hasSkillTag('respondShan',true,null,true)&&player.countCards('h',function(card){ + return get.tag(card,'respondShan')&&player.getUseValue(card,null,true)>0&&get.effect(target,card,player,player)>0; + })) return -2; + }, + }, + }, + }, + //祢衡 + rekuangcai:{ + audio:2, + forced:true, + trigger:{player:'phaseDiscardBegin'}, + filter:function(event,player){ + return !player.getHistory('useCard').length||!player.getHistory('sourceDamage').length; + }, + content:function(){ + lib.skill.rekuangcai.change(player,player.getHistory('useCard').length?-1:1); + }, + mod:{ + targetInRange:function(card,player){ + if(player==_status.currentPhase) return true; + }, + cardUsable:function(card,player){ + if(player==_status.currentPhase) return Infinity; + }, + }, + change:function(player,num){ + if(typeof player.storage.rekuangcai_change!='number') player.storage.rekuangcai_change=0; + player.storage.rekuangcai_change+=num; + player.addSkill('rekuangcai_change'); + }, + group:'rekuangcai_draw', + subSkill:{ + draw:{ + audio:'rekuangcai', + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + return player.getHistory('sourceDamage').length>0; + }, + content:function(){ + player.draw(Math.min(5,player.getStat('damage'))); + }, + }, + change:{ + mod:{ + maxHandcard:function(player,num){ + if(typeof player.storage.rekuangcai_change=='number') return num+player.storage.rekuangcai_change; + }, + }, + charlotte:true, + mark:true, + intro:{ + content:(num)=>('手牌上限'+(num<0?'':'+')+num), + }, + }, + }, + }, + reshejian:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + filter:function(event,player){ + if(player==event.player||event.targets.length!=1) return false; + return player.countCards('h')>=2; + }, + direct:true, + usable:2, + content:function(){ + 'step 0' + player.chooseToDiscard('he',[2,Infinity],get.prompt('reshejian',trigger.player),'
    弃置至少两张手牌,然后选择一项:
    ⒈弃置其等量的牌。⒉对其造成1点伤害。
    ').set('ai',function(card){ + if(_status.event.goon&&ui.selected.cards.length<2) return 5.6-get.value(card); + return 0; + }).set('goon',function(){ + var target=trigger.player; + if(get.damageEffect(target,player,player)>0) return true; + if(target.countCards('he',function(card){ + return get.value(card,target)>6; + })>=2) return true; + return false; + }()).logSkill=['reshejian',trigger.player]; + 'step 1' + if(!result.bool){ + player.storage.counttrigger.reshejian--; + event.finish(); + return; + } + var num=result.cards.length; + event.num=num; + var target=trigger.player,str=get.translation(target); + event.target=target; + if(!target.isIn()) event.finish(); + else if(!target.hasCard(function(card){ + return lib.filter.canBeDiscarded(card,player,target); + },'he')) event._result={index:1}; + else player.chooseControl().set('choiceList',[ + '弃置'+str+'的'+get.cnNumber(num)+'张牌', + '对'+str+'造成1点伤害', + ]).set('ai',function(){ + var player=_status.event.player; + var eff0=get.effect(target,{name:'guohe_copy2'},player,player)*Math.min(1.7,target.countCards('he')); + var eff1=get.damageEffect(target,player,player); + return eff0>eff1?0:1; + }); + 'step 2' + if(result.index==0) player.discardPlayerCard(target,num,true,'he'); + else target.damage(); + }, + }, + //陈登 + refuyuan:{ + audio:2, + trigger:{global:'useCardToTargeted'}, + logTarget:'target', + filter:function(event,player){ + return event.card.name=='sha'&&event.target.isIn()&&!game.hasPlayer2(function(current){ + return current.hasHistory('useCard',function(evt){ + return evt.card!=event.card&&get.color(evt.card,false)=='red'&&evt.targets&&evt.targets.contains(event.target); + }); + }); + }, + check:function(event,player){ + return get.attitude(player,event.target)>0; + }, + content:function(){ + trigger.target.draw(); + }, + }, + reyingshui:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')>0&&game.hasPlayer((current)=>player.inRange(current)); + }, + position:'he', + filterCard:true, + filterTarget:function(card,player,target){ + return player.inRange(target); + }, + discard:false, + lose:false, + delay:false, + check:function(card){ + if(get.type(card)=='equip') return 3-get.value(card); + return 6.5-get.value(card); + }, + content:function(){ + 'step 0' + player.give(cards,target); + 'step 1' + var next=target.chooseCard('he',[2,Infinity],'交给'+get.translation(player)+'至少两张装备牌,否则受到1点伤害',{type:'equip'}); + if(get.damageEffect(target,player,target)>=0) next.set('ai',()=>-1); + else next.set('ai',(card)=>ui.selected.cards.length<2?(6-get.value(card)):0); + 'step 2' + if(result.bool) target.give(result.cards,player); + else target.damage('nocard'); + }, + ai:{ + order:5, + tag:{ + damage:0.5, + }, + result:{ + target:-1.5, + }, + }, + }, + rewangzu:{ + audio:2, + trigger:{player:'damageBegin1'}, + direct:true, + filter:function(event,player){ + return event.source&&player!=event.source&&player.hasCard((card)=>lib.filter.cardDiscardable(card,player,'rewangzu'),'h'); + }, + usable:1, + content:function(){ + 'step 0' + var num=player.getFriends().length; + if(!game.hasPlayer(function(current){ + return current!=player&¤t.getFriends().length>num; + })){ + player.chooseToDiscard('h',get.prompt('rewangzu'),'弃置一张牌并令伤害-1').set('ai',function(card){ + return 7-get.value(card); + }).logSkill='rewangzu'; + } + else{ + player.chooseBool(get.prompt('rewangzu'),'随机弃置一张牌并令伤害-1'); + } + 'step 1' + if(result.bool){ + trigger.num--; + if(!result.cards||!result.cards.length){ + player.logSkill('rewangzu'); + var cards=player.getCards('h',(card)=>lib.filter.cardDiscardable(card,player,'rewangzu')); + if(cards.length) player.discard(cards.randomGet()); + } + } + else player.storage.counttrigger.rewangzu--; + }, + }, + //万年公主 + zhenge:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('zhenge'),'令一名角色的攻击范围+1').set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target) + if(att>0){ + if(!target.hasMark('zhenge_effect')) att*=1.5; + if(!game.hasPlayer(function(current){ + return get.distance(target,current,'attack')>2; + })){ + var usf=Math.max.apply(Math,game.filterPlayer().map(function(current){ + if(target.canUse('sha',current,false)) return get.effect(current,{name:'sha'},target,player); + return 0; + })); + return att+usf; + } + return att; + } + return 0; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('zhenge',target); + target.addSkill('zhenge_effect'); + if(target.countMark('zhenge_effect')<5) target.addMark('zhenge_effect',1,false); + if(!game.hasPlayer(function(current){ + return current!=target&&!target.inRange(current); + })){ + player.chooseTarget('是否令'+get.translation(target)+'视为对另一名角色使用【杀】?',function(card,player,target){ + return _status.event.source.canUse('sha',target); + }).set('source',target).set('ai',function(target){ + var evt=_status.event; + return get.effect(target,{name:'sha'},evt.source,evt.player); + }); + } + else{ + game.delayx(); + event.finish(); + } + } + else event.finish(); + 'step 2' + if(result.bool){ + target.useCard({name:'sha',isCard:true},result.targets[0],false); + } + 'step 3' + game.delayx(); + }, + subSkill:{ + effect:{ + charlotte:true, + onremove:true, + mod:{ + attackRange:function(player,num){ + return num+player.countMark('zhenge_effect'); + }, + }, + intro:{content:'攻击范围+#'}, + }, + }, + }, + xinghan:{ + audio:2, + init:function(player){ + player.addSkill('xinghan_count'); + }, + onremove:function(player){ + player.removeSkill('xinghan_count'); + }, + trigger:{global:'damageSource'}, + forced:true, + filter:function(event,player){ + return event.card&&event.card==player.storage.xinghan_temp&&event.source&&event.source.hasMark('zhenge_effect'); + }, + logTarget:'source', + content:function(){ + player.draw(player.isMaxHandcard(true)?1:Math.min(5,trigger.source.getAttackRange())); + }, + subSkill:{ + count:{ + trigger:{global:'useCard1'}, + forced:true, + charlotte:true, + popup:false, + firstDo:true, + filter:function(event,player){ + return event.card.name=='sha'&&!game.hasPlayer2(function(current){ + return current.hasHistory('useCard',function(evt){ + return evt!=event&&evt.card.name=='sha'; + }) + }); + }, + content:function(){ + player.addTempSkill('xinghan_temp'); + player.storage.xinghan_temp=trigger.card; + }, + }, + temp:{onremove:true}, + }, + ai:{combo:'zhenge'}, + }, + //荀谌 + refenglve:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0&&!player.hasSkillTag('noCompareSource')&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')>0&&!current.hasSkillTag('noCompareTarget'); + }); + }, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0&&!target.hasSkillTag('noCompareTarget'); + }, + content:function(){ + 'step 0' + player.chooseToCompare(target); + 'step 1' + if(result.bool){ + if(!target.countCards('hej')) event.finish(); + else{ + event.giver=target; + event.gainner=player; + target.choosePlayerCard(target,true,'hej',2,'交给'+get.translation(player)+'两张牌'); + } + } + else if(result.tie){ + delete player.getStat('skill').refenglve; + event.finish(); + } + else{ + if(get.position(result.player,true)=='d') target.gain(result.player,'gain2'); + event.finish(); + /*if(!player.countCards('he')) event.finish(); + else{ + event.giver=player; + event.gainner=target; + player.chooseCard(true,'he','交给'+get.translation(target)+'一张牌'); + }*/ + } + 'step 2' + if(result.bool) event.giver.give(result.cards,event.gainner); + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + if(!player.hasCard(function(card){ + if(get.position(card)!="h") return false; + var val=get.value(card); + if(val<0) return true; + if(val<=5){ + return card.number>=11; + } + if(val<=6){ + return card.number>=13; + } + return false; + })) return 0; + return -Math.sqrt(1+target.countCards('he'))/(1+target.countCards('j')); + }, + }, + }, + }, + anyong:{ + audio:2, + trigger:{global:'damageSource'}, + direct:true, + filter:function(event,player){ + return event.source&&event.source==_status.currentPhase&&event.num==1&& + event.player!=event.source&&event.player.isIn()&&player.countCards('he')>0&& + event.source.getHistory('sourceDamage',function(evt){ + return evt.player!=event.source; + }).indexOf(event)==0; + }, + content:function(){ + 'step 0' + player.chooseToDiscard('he',get.prompt('anyong',trigger.player),'弃置一张牌并对其造成1点伤害').set('goon',get.damageEffect(trigger.player,player,player)>0).set('ai',function(card){ + if(_status.event.goon) return 7-get.value(card); + return 0; + }).logSkill=['anyong',trigger.player]; + 'step 1' + if(result.bool) trigger.player.damage(); + }, + }, + //刘永 + zhuning:{ + audio:2, + enable:'phaseUse', + usable:2, + filter:function(event,player){ + if(!player.countCards('he')) return false; + return (!player.getStat('skill').zhuning||player.hasSkill('zhuning_double')); + }, + filterCard:true, + position:'he', + filterTarget:lib.filter.notMe, + selectCard:[1,Infinity], + delay:false, + lose:false, + discard:false, + check:function(card){ + 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(ui.selected.cards.length>=Math.max(1,player.countCards('h')-player.hp)) return 0; + return 10-get.value(card); + }, + content:function(){ + 'step 0' + player.give(cards,target).gaintag.add('fengxiang_tag'); + 'step 1' + var list=[]; + for(var name of lib.inpile){ + var type=get.type(name); + if(type!='basic'&&type!='trick') continue; + var card={name:name,isCard:true}; + if(get.tag(card,'damage')>0&&player.hasUseTarget(card)){ + list.push([type,'',name]); + } + if(name=='sha'){ + for(var i of lib.inpile_nature){ + card.nature=i; + if(player.hasUseTarget(card)) list.push([type,'',name,i]); + } + } + } + if(list.length){ + player.chooseButton(['是否视为使用一张伤害牌?',[list,'vcard']]).set('ai',function(button){ + return _status.event.player.getUseValue({name:button.link[2]}); + }); + } + else event.finish(); + 'step 2' + if(result.bool){ + player.chooseUseTarget({name:result.links[0][2],nature:result.links[0][3],isCard:true},true,false); + } + else event.finish(); + 'step 3' + if(!player.hasHistory('sourceDamage',function(evt){ + if(!evt.card) return false; + var evtx=evt.getParent('useCard'); + return evtx.card==evt.card&&evtx.getParent(2)==event; + })) player.addTempSkill('zhuning_double'); + }, + subSkill:{ + double:{}, + }, + ai:{ + fireAttack:true, + order:4, + result:{ + target:function(player,target){ + if(target.hasSkillTag('nogain')) return 0; + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + if(target.hasSkillTag('nodu')) return 0; + 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.rerende<0||player.countCards('h')<=1){ + if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; + } + return Math.max(1,5-nh); + } + }, + } + }, + fengxiang:{ + getMax:function(event){ + var max=0,max2=null,players=game.filterPlayer(); + for(var current of players){ + var num=0,cards=current.getCards('h',function(card){ + return card.hasGaintag('fengxiang_tag'); + }); + if(event){ + if(event.name=='gain'&&event.gaintag.contains('fengxiang_tag')) cards.removeArray(event.cards); + var evt=event.getl(current); + if(evt&&evt.gaintag_map){ + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].contains('fengxiang_tag')) num++; + } + } + } + num+=cards.length; + if(num>max){ + max=num; + max2=current; + } + else if(num==max) max2=null; + } + return max2; + }, + audio:2, + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + var target=lib.skill.fengxiang.getMax(); + return !target||target.isDamaged(); + }, + logTarget:function(event,player){ + return lib.skill.fengxiang.getMax()||player; + }, + content:function(){ + var target=lib.skill.fengxiang.getMax(); + if(target) target.recover(); + else player.draw(); + }, + group:'fengxiang_draw', + subSkill:{ + draw:{ + trigger:{ + global:['equipAfter','addJudgeAfter','loseAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + forced:true, + filter:function(event,player){ + if(event.name=='lose'&&event.getlx===false) return false; + return lib.skill.fengxiang.getMax()!=lib.skill.fengxiang.getMax(event); + }, + content:function(){ + if(trigger.delay===false) game.delayx(); + player.draw(); + }, + }, + }, + }, + //阚泽 + rekuanshi:{ + audio:'kuanshi', + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('rekuanshi')).set('animate',false).set('ai',function(target){ + var att=get.attitude(player,target); + if(target.hp<3) att/=1.5; + return att; + }); + 'step 1' + if(result.bool){ + player.logSkill('rekuanshi'); + player.addTempSkill('rekuanshi_effect',{player:'phaseBegin'}); + player.storage.rekuanshi_effect=result.targets[0]; + game.delayx(); + } + }, + subSkill:{ + effect:{ + audio:'kuanshi', + trigger:{global:'damageEnd'}, + forced:true, + charlotte:true, + logTarget:'player', + usable:1, + filter:function(event,player){ + if(event.player!=player.storage.rekuanshi_effect||event.player.isHealthy()) return false; + var history=event.player.getHistory('damage',null,event),num=0; + for(var i of history) num+=i.num; + return num>1&&(num-event.num)<2; + }, + content:function(){ + trigger.player.recover(); + } + }, + }, + }, + //吕玲绮 + guowu:{ + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return player.countCards('h')>0; + }, + preHidden:true, + content:function(){ + 'step 0' + var hs=player.getCards('h'); + player.showCards(hs,get.translation(player)+'发动了【帼舞】'); + var list=[]; + for(var i of hs){ + list.add(get.type2(i,player)); + if(list.length>=3) break; + } + if(list.length>=1){ + var card=get.discardPile(function(i){ + return i.name=='sha'; + }); + if(card) player.gain(card,'gain2'); + } + if(list.length>=2) player.addTempSkill('guowu_dist','phaseUseAfter'); + if(list.length>=3) player.addTempSkill('guowu_add','phaseUseAfter'); + }, + subSkill:{ + dist:{ + charlotte:true, + mod:{targetInRange:()=>true}, + }, + add:{ + charlotte:true, + trigger:{player:'useCard1'}, + direct:true, + filter:function(event,player){ + var info=get.info(event.card,false); + if(info.allowMultiple==false) return false; + if(event.card.name!='sha'&&(info.type!='trick'||get.mode()=='guozhan')) return false; + if(event.targets&&!info.multitarget){ + if(game.hasPlayer(function(current){ + return !event.targets.contains(current)&&lib.filter.targetEnabled2(event.card,player,current)&&lib.filter.targetInRange(event.card,player,current); + })){ + return true; + } + } + return false; + }, + content:function(){ + 'step 0' + var num=game.countPlayer(function(current){ + return !trigger.targets.contains(current)&&lib.filter.targetEnabled2(trigger.card,player,current)&&lib.filter.targetInRange(trigger.card,player,current); + }); + player.chooseTarget('帼舞:是否为'+get.translation(trigger.card)+'增加'+(num>1?'至多两个':'一个')+'目标?',[1,Math.min(2,num)],function(card,player,target){ + var trigger=_status.event.getTrigger(); + var card=trigger.card; + return !trigger.targets.contains(target)&&lib.filter.targetEnabled2(card,player,target)&&lib.filter.targetInRange(card,player,target); + }).set('ai',function(target){ + var player=_status.event.player; + var card=_status.event.getTrigger().card; + return get.effect(target,card,player,player); + }); + 'step 1' + if(result.bool){ + if(player!=game.me&&!player.isOnline()) game.delayx(); + } + else event.finish(); + 'step 2' + var targets=result.targets.sortBySeat(); + player.logSkill('guowu_add',targets); + trigger.targets.addArray(targets); + //if(get.mode()=='guozhan') player.removeSkill('guowu_add'); + }, + }, + }, + }, + zhuangrong:{ + derivation:['llqshenwei','wushuang'], + trigger:{global:'phaseEnd'}, + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'gray', + filter:function(event,player){ + return player.hp==1||player.countCards('h')==1; + }, + content:function(){ + 'step 0' + player.awakenSkill('zhuangrong'); + player.loseMaxHp(); + 'step 1' + if(player.maxHp>player.hp) player.recover(player.maxHp-player.hp); + 'step 2' + player.drawTo(Math.min(5,player.maxHp)); + player.addSkillLog('llqshenwei'); + player.addSkillLog('wushuang'); + }, + }, + llqshenwei:{ + audio:2, + trigger:{player:'phaseDrawBegin2'}, + forced:true, + filter:(event)=>!event.numFixed, + content:function(){ + trigger.num+=2; + }, + mod:{ + maxHandcard:(player,num)=>num+2, + }, + }, + cuijian:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.hasPlayer((current)=>lib.skill.cuijian.filterTarget(null,player,current)); + }, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + content:function(){ + 'step 0' + var hs=target.getCards('h','shan'); + if(hs.length){ + hs.addArray(target.getCards('he',function(card){ + return get.subtype(card)=='equip2'; + })) + player.gain(hs,target,'give','bySelf'); + if(player.hasMark('zhtongyuan_basic')) event.finish(); + else event.num=hs.length; + } + else{ + if(player.hasMark('zhtongyuan_trick')) player.draw(2); + event.finish(); + } + 'step 1' + var hs=player.getCards('he'); + if(!hs.length||!target.isIn()) event.finish(); + else if(hs.length<=num) event._result={bool:true,cards:hs}; + else player.chooseCard('he',true,'选择交给'+get.translation(target)+get.cnNumber(num)+'张牌',num); + 'step 2' + if(result.bool&&result.cards&&result.cards.length) player.give(result.cards,target); + }, + ai:{ + order:4, + result:{ + player:function(player,target){ + if(!target.countCards('h','shan')) return player.hasMark('zhtongyuan_trick')?2:0; + return 0; + }, + target:function(player,target){ + if(target.countCards('h','shan')){ + var num=-target.countCards('h')/2; + var card=target.getEquip(2); + if(card) num-=(get.value(card,target)/2); + return num; + } + return -0.01; + }, + }, + }, + }, + tongyuan:{audio:2}, + zhtongyuan:{ + audio:'tongyuan', + trigger:{player:['useCardAfter','respondAfter']}, + forced:true, + filter:function(event,player){ + var type=get.type2(event.card,false); + return (type=='basic'||type=='trick')&&get.color(event.card,false)=='red'&&!player.hasMark('zhtongyuan_'+type); + }, + content:function(){ + var type=get.type2(trigger.card,false); + if(!player.hasMark('zhtongyuan_'+type)){ + player.addMark('zhtongyuan_'+type,1,false); + game.log(player,'修改了技能','#g【摧坚】'); + } + }, + group:['zhtongyuan_basic','zhtongyuan_trick'], + subSkill:{ + basic:{ + trigger:{player:'useCard2'}, + direct:true, + locked:true, + filter:function(event,player){ + if(!player.hasMark('zhtongyuan_basic')||!player.hasMark('zhtongyuan_trick')) return false; + var card=event.card; + if(get.color(card,false)!='red'||get.type(card,null,true)!='basic') return false; + var info=get.info(card); + if(info.allowMultiple==false) return false; + if(event.targets&&!info.multitarget){ + if(game.hasPlayer(function(current){ + return !event.targets.contains(current)&&lib.filter.targetEnabled2(card,player,current); + })){ + return true; + } + } + return false; + }, + content:function(){ + 'step 0' + var prompt2='为'+get.translation(trigger.card)+'增加一个目标' + player.chooseTarget(get.prompt('zhtongyuan'),function(card,player,target){ + var player=_status.event.player; + return !_status.event.targets.contains(target)&&lib.filter.targetEnabled2(_status.event.card,player,target); + }).set('prompt2',prompt2).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player); + }).set('card',trigger.card).set('targets',trigger.targets); + 'step 1' + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.targets=result.targets; + } + else{ + event.finish(); + } + 'step 2' + if(event.targets){ + player.logSkill('zhtongyuan',event.targets); + trigger.targets.addArray(event.targets); + } + }, + }, + trick:{ + audio:'zhtongyuan', + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + if(!player.hasMark('zhtongyuan_basic')||!player.hasMark('zhtongyuan_trick')) return false; + var card=event.card; + return (get.color(card,false)=='red'&&get.type(card,null,false)=='trick'); + }, + content:function(){ + trigger.directHit.addArray(game.filterPlayer()); + game.log(trigger.card,'不可被响应'); + }, + }, + }, + }, + //陆郁生 + zhente:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + logTarget:'player', + usable:1, + preHidden:true, + filter:function(event,player){ + var color=get.color(event.card); + if(player==event.player||event.player.isDead()||color=='none'||(get.mode()=='guozhan'&&color!='black')) return false; + var type=get.type(event.card); + return type=='basic'||type=='trick'; + }, + check:function(event,player){ + return !event.excluded.contains(player)&&get.effect(player,event.card,event.player,player)<0; + }, + content:function(){ + 'step 0' + trigger.player.chooseControl().set('choiceList',[ + '本回合内不能再使用'+get.translation(get.color(trigger.card))+'牌', + '令'+get.translation(trigger.card)+'对'+get.translation(player)+'无效', + ]).set('prompt',get.translation(player)+'发动了【贞特】,请选择一项').set('ai',function(){ + var player=_status.event.player; + var target=_status.event.getParent().player; + var card=_status.event.getTrigger().card,color=get.color(card); + if(get.effect(target,card,player,player)<=0) return 1; + var hs=player.countCards('h',function(card){ + return get.color(card,player)==color&&player.hasValueTarget(card,null,true); + }); + if(!hs.length) return 0; + if(hs>1) return 1; + return Math.random()>0.5?0:1; + }); + 'step 1' + if(result.index==0){ + trigger.player.addTempSkill('zhente2'); + trigger.player.storage.zhente2.add(get.color(trigger.card)); + trigger.player.markSkill('zhente2'); + } + else trigger.excluded.add(player); + }, + }, + zhente2:{ + mod:{ + cardEnabled:function(card,player){ + if(player.getStorage('zhente2').contains(get.color(card))) return false; + }, + cardSavable:function(card,player){ + if(player.getStorage('zhente2').contains(get.color(card))) return false; + }, + }, + charlotte:true, + onremove:true, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + }, + intro:{content:'本回合内不能使用$牌'}, + }, + zhiwei:{ + audio:2, + trigger:{ + player:['enterGame','showCharacterAfter','phaseBegin'], + global:['phaseBefore'], + }, + direct:true, + filter:function(event,player,name){ + if(player.hasSkill('zhiwei2')) return false; + if(get.mode()=='guozhan') return event.name=='showCharacter'&&(event.toShow.contains('gz_luyusheng')||event.toShow.contains('luyusheng')); + return event.name!='showCharacter'&&(name!='phaseBefore'||game.phaseNumber==0); + }, + content:function(){ + 'step 0' + player.chooseTarget('请选择【至微】的目标','选择一名其他角色。该角色造成伤害后,你摸一张牌,该角色受到伤害后,你随机弃置一张手牌。你弃牌阶段弃置的牌均被该角色获得。',true,lib.filter.notMe).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(att>0) return 1+att; + return Math.random(); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('zhiwei',target); + player.storage.zhiwei2=target; + player.addSkill('zhiwei2'); + } + }, + }, + zhiwei2:{ + group:['zhiwei2_draw','zhiwei2_discard','zhiwei2_gain','zhiwei2_clear'], + charlotte:true, + onremove:true, + mark:'character', + intro:{content:'$造成伤害后你摸一张牌;$受到伤害后你弃置一张牌;你于弃牌阶段弃置牌后交给$'}, + subSkill:{ + draw:{ + audio:'zhiwei', + trigger:{global:'damageSource'}, + forced:true, + filter:function(event,player){ + return event.source==player.storage.zhiwei2; + }, + logTarget:'source', + content:function(){ + player.draw(); + }, + }, + discard:{ + audio:'zhiwei', + trigger:{global:'damageEnd'}, + forced:true, + filter:function(event,player){ + return event.player==player.storage.zhiwei2&&player.countCards('h',function(card){ + return lib.filter.cardDiscardable(card,player,'zhiwei2_discard'); + }); + }, + logTarget:'player', + content:function(){ + player.discard(player.getCards('h',function(card){ + return lib.filter.cardDiscardable(card,player,'zhiwei2_discard'); + }).randomGet()); + }, + }, + gain:{ + audio:'zhiwei', + trigger:{ + player:'loseAfter', + global:'loseAsyncAfter', + }, + forced:true, + filter:function(event,player){ + if(event.type!='discard'||event.getlx===false||event.getParent('phaseDiscard').player!=player||!player.storage.zhiwei2||!player.storage.zhiwei2.isIn()) return false; + var evt=event.getl(player); + return evt&&evt.cards2.filterInD('d').length>0; + }, + logTarget:function(event,player){ + return player.storage.zhiwei2; + }, + content:function(){ + if(trigger.delay===false) game.delay(); + player.storage.zhiwei2.gain(trigger.getl(player).cards2.filterInD('d'),'gain2'); + }, + }, + clear:{ + audio:'zhiwei', + trigger:{ + global:'die', + player:['hideCharacterEnd','removeCharacterEnd'], + }, + forced:true, + filter:function(event,player){ + if(event.name=='die') return event.player==player.storage.zhiwei2; + if(event.name=='removeCharacter') return event.toRemove=='luyusheng'||event.toRemove=='gz_luyusheng'; + return event.toHide=='luyusheng'||event.toHide=='gz_luyusheng'; + }, + content:function(){ + 'step 0' + player.removeSkill('zhiwei2'); + if(trigger.name!='die'||get.mode()!='guozhan') event.finish(); + 'step 1' + if(player.name1=='gz_luyusheng'||player.name1=='luyusheng') player.hideCharacter(0); + if(player.name2=='gz_luyusheng'||player.name2=='luyusheng') player.hideCharacter(1); + }, + }, + }, + }, + //华歆 + spwanggui:{ + audio:'wanggui', + trigger:{source:'damageSource'}, + direct:true, + usable:1, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.group!=player.group; + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('spwanggui'),'对一名势力不同的其他角色造成1点伤害',function(card,player,target){ + return target.group!=player.group; + }).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('spwanggui',target); + target.damage(); + } + else player.storage.counttrigger.spwanggui--; + }, + group:'spwanggui_draw', + subSkill:{ + draw:{ + trigger:{player:'damageEnd'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('spwanggui'),'令自己摸一张牌,或和一名势力相同的其他角色各摸一张牌',function(card,player,target){ + return target.group==player.group; + }).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target); + if(target!=player) att*=2; + if(target.hasSkillTag('nogain')) att/=1.7; + return att; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('spwanggui',target); + if(player==target){ + player.draw(); + event.finish(); + } + else{ + var list=[player,target].sortBySeat(); + game.asyncDraw(list); + } + } + else event.finish(); + 'step 2' + game.delayx(); + }, + }, + }, + }, + wanggui:{ + audio:2, + trigger:{ + player:'damageEnd', + source:'damageSource', + }, + direct:true, + filter:function(event,player){ + return player.hasSkill('wanggui')&&!player.hasSkill('wanggui2'); + }, + preHidden:true, + content:function(){ + 'step 0' + player.addTempSkill('wanggui2'); + var bool=player.isUnseen(2); + if(bool){ + player.chooseTarget('望归:是否对一名势力不同的角色造成1点伤害?',function(card,player,target){ + return target.isEnemyOf(player); + }).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); + }).setHiddenSkill('wanggui'); + } + else event.goto(2); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('wanggui',target); + target.damage(); + } + event.finish(); + 'step 2' + player.chooseBool('望归:是否令所有与自己势力相同的角色各摸一张牌?').setHiddenSkill('wanggui'); + 'step 3' + if(result.bool){ + var targets=game.filterPlayer(function(current){ + return current.isFriendOf(player); + }); + targets.sortBySeat(); + player.logSkill('wanggui',targets); + game.asyncDraw(targets); + } + else event.finish(); + 'step 4' + game.delayx(); + }, + }, + wanggui2:{}, + xibing:{ + audio:2, + trigger:{global:'useCardToPlayered'}, + filter:function(event,player){ + if(player==event.player||event.targets.length!=1||event.player.countCards('h')>=event.player.hp) return false; + var bool=function(card){ + return (card.name=='sha'||get.type(card,false)=='trick')&&get.color(card,false)=='black'; + }; + if(!bool(event.card)) return false; + var evt=event.getParent('phaseUse'); + if(evt.player!=event.player) return false; + return get.mode()!='guozhan'||event.player.getHistory('useCard',function(evtx){ + return bool(evtx.card)&&evtx.getParent('phaseUse')==evt; + })[0]==event.getParent(); + }, + logTarget:'player', + check:function(event,player){ + var target=event.player; + var att=get.attitude(player,target); + var num2=Math.min(5,target.hp-target.countCards('h')); + if(num2<=0) return att<=0; + var num=target.countCards('h',function(card){ + return target.hasValueTarget(card,null,true); + }); + if(!num) return att>0; + return num>num2; + }, + preHidden:true, + content:function(){ + 'step 0' + var num=Math.min(5,trigger.player.hp-trigger.player.countCards('h')); + if(num>0) trigger.player.draw(num); + 'step 1' + trigger.player.addTempSkill('xibing2'); + player._xibing=true; + if(get.mode()!='guozhan'||player.isUnseen(2)||trigger.player.isUnseen(2)) event.finish(); + 'step 2' + var target=trigger.player; + var players1=[player.name1,player.name2]; + var players2=[target.name1,target.name2]; + player.chooseButton(2,[ + '是否暗置自己和'+get.translation(target)+'的各一张武将牌?', + '
    你的武将牌
    ', + [players1,'character'], + '
    '+get.translation(target)+'的武将牌
    ', + [players2,'character'], + ]).set('players',players1).set('complexSelect',true).set('filterButton',function(button){ + return !get.is.jun(button.link)&&(ui.selected.buttons.length==0)==(_status.event.players.contains(button.link)); + }); + 'step 3' + if(result.bool){ + var target=trigger.player; + player.hideCharacter(player.name1==result.links[0]?0:1); + target.hideCharacter(target.name1==result.links[1]?0:1); + player.addTempSkill('xibing3'); + target.addTempSkill('xibing3'); + } + }, + }, + xibing2:{ + mod:{ + cardEnabled2:function(card){ + if(get.position(card)=='h') return false; + }, + }, + }, + xibing3:{ + ai:{nomingzhi:true}, + }, + //小虎 + remeibu:{ + audio:"meibu", + trigger:{ + global:"phaseUseBegin", + }, + filter:function(event,player){ + return event.player!=player&&event.player.isAlive()&&event.player.inRange(player)&&player.countCards('he')>0; + }, + direct:true, + derivation:["rezhixi"], + checkx:function(event,player){ + if(get.attitude(player,event.player)>=0) return false; + return event.player.countCards('h')>event.player.hp; + }, + content:function(){ + "step 0" + var check=lib.skill.new_meibu.checkx(trigger,player); + player.chooseToDiscard(get.prompt2('remeibu',trigger.player),'he').set('ai',function(card){ + if(_status.event.check) return 6-get.value(card); + return 0; + }).set('check',check).set('logSkill',['remeibu',trigger.player]); + "step 1" + if(result.bool){ + var target=trigger.player; + var card=result.cards[0]; + player.line(target,'green'); + player.markAuto('remeibu_gain',[get.suit(card,player)]); + player.addTempSkill('remeibu_gain'); + target.addTempSkill('rezhixi','phaseUseEnd'); + } + }, + ai:{ + expose:0.2, + }, + subSkill:{ + gain:{ + trigger:{global:'loseAfter'}, + forced:true, + charlotte:true, + popup:false, + onremove:true, + filter:function(event,player){ + return event.getParent(3).name=='rezhixi'&&player.getStorage('remeibu_gain').contains(get.suit(event.cards[0],event.player))&&get.position(event.cards[0])=='d'; + }, + content:function(){ + player.gain(trigger.cards[0],'gain2'); + }, + }, + }, + }, + remumu:{ + audio:"mumu", + trigger:{ + player:"phaseUseBegin", + }, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.countCards('e')>0; + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('remumu'),function(card,player,target){ + return target.countCards('e')>0; + }).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target),es=target.getCards('e'),val=0; + for(var i of es){ + var eff=-(get.value(i,target)-0.1)*att; + if(eff>val) val=eff; + } + return eff; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('remumu',target); + if(player==target) event._result={index:1}; + else{ + var str=get.translation(target); + player.chooseControl().set('choiceList',[ + '弃置'+str+'装备区的一张牌且本阶段使用【杀】的次数上限+1', + '获得'+str+'装备区的一张牌且本阶段使用【杀】的次数上限-1', + ]).set('ai',function(){ + var player=_status.event.player; + if(player.countCards('hs',function(card){ + return get.name(card,player)=='sha'&&player.hasValueTarget(card); + })0; + }, + content:function(){ + player.chooseToDiscard('h',true); + }, + }, + //董白 + relianzhu:{ + audio:'lianzhu', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterCard:true, + discard:false, + lose:false, + delay:false, + position:'he', + filterTarget:lib.filter.notMe, + check:function(card){ + var num=get.value(card); + if(get.color(card)=='black'){ + if(num>=6) return 0; + return 9-num; + } + else{ + return 7-num; + } + }, + content:function(){ + 'step 0' + player.give(cards,target); + 'step 1' + if(get.color(cards[0],player)=='red'){ + player.draw(); + event.finish(); + } + else{ + target.chooseToDiscard('he',2,'弃置两张牌,或令'+get.translation(player)+'摸两张牌').set('goon',get.attitude(target,player)<0).set('ai',function(card){ + if(!_status.event.goon) return -get.value(card); + return 6-get.value(card); + }); + } + 'step 2' + if(!result.bool) player.draw(2); + }, + ai:{ + order:3, + expose:0.2, + result:{ + target:function(player,target){ + if(ui.selected.cards.length&&get.color(ui.selected.cards[0])=='red'){ + if(target.countCards('h')0; + }, + content:function(){ + trigger.player.loseHp(); + }, + group:'rexiahui_gain', + subSkill:{ + gain:{ + trigger:{global:'gainEnd'}, + forced:true, + popup:false, + filter:function(event,player){ + if(player==event.player) return false; + var evt=event.getl(player); + return evt&&evt.cards2&&evt.cards2.filter(function(card){ + return get.color(card,player)=='black'; + }).length>0; + }, + content:function(){ + trigger.player.addSkill('rexiahui_block'); + var cards=trigger.getl(player).cards2.filter(function(card){ + return get.color(card,player)=='black'; + }); + trigger.player.addGaintag(cards,'rexiahui'); + }, + }, + block:{ + mod:{ + cardEnabled2:function(card){ + if(get.itemtype(card)=='card'&&card.hasGaintag('rexiahui')) return false; + }, + cardDiscardable:function(card){ + if(card.hasGaintag('rexiahui')) return false; + }, + }, + charlotte:true, + forced:true, + popup:false, + trigger:{player:'changeHp'}, + filter:function(event,player){ + return event.num<0; + }, + content:function(){ + player.removeSkill('rexiahui_block'); + }, + onremove:function(player){ + player.removeGaintag('rexiahui'); + }, + }, + }, + }, + //周善 + dcmiyun:{ + audio:2, + trigger:{global:'roundStart'}, + forced:true, + direct:true, + group:'dcmiyun_lose', + content:function(){ + 'step 0' + if(player.hasCard(card=>card.hasGaintag('dcmiyun_tag'),'h')){ + player.chooseCardTarget({ + prompt:'密运:将包括“安”在内的任意张手牌交给一名其他角色', + forced:true, + filterTarget:lib.filter.notMe, + selectCard:[1,Infinity], + filterOk:function(){ + for(var card of ui.selected.cards){ + if(card.hasGaintag('dcmiyun_tag')) return true; + } + return false; + }, + goon:game.hasPlayer(current=>player!=current&&get.attitude(player,current)>0), + ai1:function(card){ + if(get.itemtype(card)!='card') return 0; + if(card.hasGaintag('dcmiyun_tag')) return 100; + if(_status.event.goon) return 8-get.value(card); + return -get.value(card); + }, + ai2:function(target){ + return get.attitude(_status.event.player,target); + } + }); + } + else event.goto(3); + 'step 1' + if(result.bool){ + var target=result.targets[0],cards=result.cards; + player.logSkill('dcmiyun',target); + player.give(cards,target); + } + else event.goto(3); + 'step 2' + player.drawTo(player.maxHp); + 'step 3' + if(game.hasPlayer(current=>current!=player&¤t.countGainableCards(player,'he'))){ + player.chooseTarget('密运:获得一名其他角色的一张牌,称为“安”',true,(card,player,target)=>{ + return target!=player&&target.countGainableCards(player,'he'); + }).set('ai',target=>{ + return get.effect(target,{name:'shunshou'},_status.event.player,_status.event.player); + }) + } + else event.finish(); + 'step 4' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcmiyun',target); + player.gainPlayerCard(target,true,'visibleMove').chooseonly=true; + } + else event.finish(); + 'step 5' + if(result.bool){ + player.gain(result.cards).gaintag.add('dcmiyun_tag'); + } + }, + mod:{ + aiValue:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('dcmiyun_tag')) return Math.abs(num)*10; + }, + aiUseful:function(){ + return lib.skill.dcmiyun.mod.aiValue.apply(this,arguments); + }, + aiOrder:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('dcmiyun_tag')) return 0; + } + }, + subSkill:{ + lose:{ + audio:'dcmiyun', + trigger:{ + player:'loseAfter', + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + forced:true, + filter:function(event,player){ + if(event.getParent().name=='dcmiyun') return false; + var evt=event.getl(player); + if(!evt||!evt.cards2||!evt.cards2.length) return false; + if(event.name=='lose'){ + for(var i in event.gaintag_map){ + if(event.gaintag_map[i].contains('dcmiyun_tag')) return true; + } + return false; + } + return player.hasHistory('lose',evt=>{ + if(event!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].contains('dcmiyun_tag')) return true; + } + return false; + }); + }, + content:function(){ + player.loseHp(); + } + } + } + }, + dcdanying:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + usable:1, + hiddenCard:function(player,name){ + if(!_status.connectMode&&!player.hasCard(card=>card.hasGaintag('dcmiyun_tag'),'h')) return false; + return name=='sha'||name=='shan'; + }, + filter:function(event,player){ + if(event.type=='wuxie'||!player.hasCard(card=>card.hasGaintag('dcmiyun_tag'),'h')) return false; + for(var name of ['sha','shan']){ + if(event.filterCard({name:name,isCard:true},player,event)) return true; + } + return false; + }, + chooseButton:{ + dialog:function(event,player){ + var vcards=[]; + for(var name of ['sha','shan']){ + var card={name:name,isCard:true}; + if(event.filterCard(card,player,event)) vcards.push(['基本','',name]); + } + var dialog=ui.create.dialog('胆迎',[vcards,'vcard'],'hidden'); + dialog.direct=true; + return dialog; + }, + backup:function(links,player){ + return { + filterCard:()=>false, + selectCard:-1, + viewAs:{ + name:links[0][2], + isCard:true, + }, + popname:true, + precontent:function(){ + player.logSkill('dcdanying'); + player.showCards(player.getCards('h',card=>card.hasGaintag('dcmiyun_tag')),get.translation(player)+'的“安”'); + player.addTempSkill('dcdanying_discard'); + }, + } + }, + prompt:function(links,player){ + return '展示“安”,然后视为使用【'+get.translation(links[0][2])+'】'; + } + }, + ai:{ + order:function(item,player){ + var o1=get.order({name:'sha'}),o2=get.order({name:'shan'}); + if(player.countCards('h')>3||player==_status.currentPhase) return Math.max(o1,o2)+0.1; + return Math.min(o1,o2)-0.1; + }, + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag,arg){ + if(!player.hasCard(card=>card.hasGaintag('dcmiyun_tag'),'h')) return false; + }, + result:{ + player:1 + } + }, + subSkill:{ + discard:{ + trigger:{target:'useCardToTargeted'}, + charlotte:true, + forced:true, + filter:function(event,player){ + return player.countDiscardableCards(event.player,'he'); + }, + content:function(){ + trigger.player.discardPlayerCard(player,'he',true); + player.removeSkill('dcdanying_discard'); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(_status._dcdanying_aiChecking) return; + _status._dcdanying_aiChecking=true; + var eff=get.effect(target,{name:'guohe_copy2'},player,player); + delete _status._dcdanying_aiChecking; + if(eff>0) eff=-1; + else eff=1; + return [1,eff]; + } + } + } + } + }, + }, + //蔡阳 + dcxunji:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&!player.getStorage('dcxunji_effect').contains(target); + }, + content:function(){ + player.markAuto('dcxunji_effect',[target]); + player.addTempSkill('dcxunji_effect',{player:'die'}); + target.markSkill('dcxunji_mark'); + }, + ai:{ + order:1, + result:{ + player:function(player,target){ + if(player.hp<2) return 0; + return get.effect(target,{name:'juedou'},player,player); + }, + }, + }, + subSkill:{ + mark:{ + marktext:'嫉', + intro:{content:'你已经被盯上了!'}, + }, + effect:{ + audio:'dcxunji', + charlotte:true, + trigger:{global:'phaseJieshuBegin'}, + forced:true, + popup:false, + onremove:true, + filter:function(event,player){ + return player.getStorage('dcxunji_effect').contains(event.player); + }, + content:function(){ + 'step 0' + var target=trigger.player; + event.target=target; + if(target.getHistory('sourceDamage').length>0&&player.canUse('juedou',target)){ + player.useCard({name:'juedou',isCard:true},target,'dcxunji_effect'); + } + 'step 1' + player.unmarkAuto('dcxunji_effect',[target]); + if(!player.storage.dcxunji_effect.length) player.removeSkill('dcxunji_effect'); + }, + group:'dcxunji_loseHp', + }, + loseHp:{ + trigger:{source:'damageSource'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.card&&event.card.name=='juedou'&&event.getParent().skill=='dcxunji_effect'; + }, + content:function(){ + player.loseHp(trigger.num); + }, + }, + }, + }, + dcjiaofeng:{ + audio:2, + trigger:{source:'damageBegin1'}, + forced:true, + usable:1, + filter:function(event,player){ + return player.isDamaged()&&!player.getHistory('sourceDamage').length; + }, + content:function(){ + var num=player.getDamagedHp(); + if(num>0) player.draw(); + if(num>1) trigger.num++; + if(num>2) player.recover(); + }, + }, + //夏侯杰 + liedan:{ + audio:2, + trigger:{global:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return (player!=event.player||player.countMark('liedan')>4)&&!player.hasSkill('zhuangdan_mark'); + }, + logTarget:'player', + content:function(){ + if(player==trigger.player){ + player.die(); + return; + } + var num=0; + if(player.hp>trigger.player.hp) num++; + if(player.countCards('h')>trigger.player.countCards('h')) num++; + if(player.countCards('e')>trigger.player.countCards('e')) num++; + if(num){ + player.draw(num); + if(num==3&&player.maxHp<8) player.gainMaxHp(); + } + else{ + player.addMark('liedan',1); + player.loseHp(); + } + }, + intro:{content:'mark'}, + }, + zhuangdan:{ + audio:2, + trigger:{global:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return player!=event.player&&player.isMaxHandcard(true); + }, + content:function(){ + player.addTempSkill('zhuangdan_mark',{player:'phaseEnd'}) + }, + }, + zhuangdan_mark:{ + mark:true, + marktext:'胆', + intro:{content:'我超勇的'}, + }, + //乌巢酒仙 + recangchu:{ + audio:2, + trigger:{ + global:'gameStart', + player:'enterGame', + }, + marktext:'粮', + forced:true, + filter:function(event,player){ + return player.countMark('recangchu')0; + }, + content:function(){ + player.addMark('recangchu',1); + }, + }, + recangchu3:{ + audio:'recangchu', + trigger:{global:'die'}, + forced:true, + filter:function(event,player){ + return player.countMark('recangchu')>game.countPlayer(); + }, + content:function(){ + player.removeMark('recangchu',player.countMark('recangchu')-game.countPlayer()); + }, + }, + reliangying:{ + audio:2, + trigger:{player:'phaseDiscardBegin'}, + direct:true, + content:function(){ + 'step 0' + var map={}; + var list=[]; + for(var i=1;i<=player.countMark('recangchu');i++){ + var cn=get.cnNumber(i,true); + map[cn]=i; + list.push(cn); + } + list.push('cancel2'); + event.map=map; + player.chooseControl(list).set('prompt',get.prompt('reliangying')).set('prompt2','摸至多'+get.cnNumber(player.countMark('recangchu'))+'张牌,然后交给等量的角色各一张牌').set('ai',function(){ + var player=_status.event.player; + var num=Math.min(player.countMark('recangchu'),game.countPlayer(function(current){ + return get.attitude(player,current)>0; + })); + if(num>0) return get.cnNumber(num,true); + return 'cancel2'; + }); + 'step 1' + if(result.control=='cancel2'){event.finish();return;} + player.logSkill('reliangying'); + var num=event.map[result.control]||1; + event.num=num; + player.draw(num); + 'step 2' + var num=Math.min(event.num,player.countCards('he'),game.countPlayer(function(target){ + return target!=player; + })); + if(num){ + player.chooseCardTarget({ + prompt:'将'+get.cnNumber(num)+'张牌交给其他角色', + prompt2:'操作提示:先按顺序选中所有要给出的牌,然后再按顺序选择等量的目标角色。可少选一张牌,并将此牌留给自己', + selectCard:[num-1,num], + selectTarget:function(){ + return ui.selected.cards.length; + }, + filterTarget:function(card,player,target){ + return target!=player; + }, + filterOk:function(){ + return ui.selected.cards.length==ui.selected.targets.length; + }, + complexSelect:true, + position:'he', + ai1:function(card){ + if(game.countPlayer(function(current){ + return target!=_status.event.player&&get.attitude(_status.event.player,target)>0; + })<=ui.selected.cards.length) return 0; + if(card.name=='shan') return 1; + return Math.random(); + }, + ai2:function(target){ + if(!target) return 1; + return Math.sqrt(5-Math.min(4,target.countCards('h')))*get.attitude(_status.event.player,target); + }, + forced:true, + }); + } + else event.finish(); + 'step 3' + if(result.bool&&result.cards.length>0){ + var list=[]; + for(var i=0;i0; + }, + filterCard:{suit:'heart'}, + position:'he', + filterTarget:function(card,player,target){ + return player.canUse('sha',target,false); + }, + check:function(card){ + var player=_status.event.player; + var next=player.getNext(); + var att=get.attitude(player,next); + if(att>0){ + var js=next.getCards('j'); + if(js.length) return get.judge(js[0])+10-get.value(card); + return 9-get.value(card) + } + return 6-get.value(card); + }, + discard:false, + prepare:'throw', + loseTo:'cardPile', + visible:true, + insert:true, + content:function(){ + game.log(player,'将',cards,'置于牌堆顶'); + player.useCard({name:'sha',isCard:true},false,targets).card.cxliushi=true; + }, + group:'cxliushi_damage', + subSkill:{ + damage:{ + trigger:{source:'damageSource'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.card&&event.card.cxliushi==true&&event.player.isAlive()&&event.getParent(3).name=='cxliushi'; + }, + content:function(){ + trigger.player.addMark('cxliushi2',1); + trigger.player.addSkill('cxliushi2'); + }, + }, + }, + ai:{ + order:function(){ + return get.order({name:'sha'})-0.4; + }, + result:{ + target:function(player,target){ + var eff=get.effect(target,{name:'sha'},player,target); + var damageEff=get.damageEffect(target,player,player); + if(eff>0) return damageEff>0?0:eff; + if(target.hasSkill('bagua_skill')||target.hasSkill('rw_bagua_skill')||target.hasSkill('bazhen')) return 0; + return eff; + }, + }, + }, + }, + cxliushi2:{ + mod:{ + maxHandcard:function(player,num){ + return num-player.countMark('cxliushi2'); + }, + }, + onremove:true, + charlotte:true, + intro:{ + name2:'流', + content:'手牌上限-#', + }, + }, + zhanwan:{ + audio:2, + trigger:{global:'phaseDiscardEnd'}, + forced:true, + filter:function(event,player){ + return event.player.hasSkill('cxliushi2')&&event.player.getHistory('lose',function(evt){ + if(evt.type=='discard'&&evt.getParent('phaseDiscard')==event) return true; + }).length>0; + }, + logTarget:'player', + content:function(){ + trigger.player.removeSkill('cxliushi2'); + var num=0; + trigger.player.getHistory('lose',function(evt){ + if(evt.type=='discard'&&evt.getParent('phaseDiscard')==trigger) num+=evt.cards2.length; + }); + player.draw(num); + }, + }, + //说出吾名吓汝一跳 + xuxie:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + logTarget:function(event,player){ + return game.filterPlayer(function(current){ + return get.distance(player,current)<=1; + }).sortBySeat(); + }, + check:function(event,player){ + if(player.isHealthy()) return false; + var list=game.filterPlayer(function(current){ + return get.distance(player,current)<=1; + }); + var draw=0; + var discard=0; + var num=2/player.getDamagedHp(); + while(list.length){ + var target=list.shift(); + var att=get.attitude(player,target); + if(att>0){ + draw++; + if(target.countDiscardableCards(player,'he')>0) discard--; + } + if(att==0){ + draw--; + if(target.countDiscardableCards(player,'he')>0) discard--; + } + if(att<0){ + draw--; + if(target.countDiscardableCards(player,'he')>0) discard++; + } + } + return draw>=num||discard>=num; + }, + content:function(){ + 'step 0' + player.loseMaxHp(); + 'step 1' + var targets=game.filterPlayer(function(current){ + return get.distance(player,current)<=1; + }).sortBySeat(); + if(!targets.length) event.finish(); + else{ + event.targets=targets; + player.chooseControl().set('choiceList',[ + '弃置'+get.translation(targets)+'的各一张牌', + '令'+get.translation(targets)+'各摸一张牌', + ]).set('ai',function(){ + var player=_status.event.player; + var list=_status.event.getParent().targets.slice(0); + var draw=0; + var discard=0; + while(list.length){ + var target=list.shift(); + var att=get.attitude(player,target); + if(att>0){ + draw++; + if(target.countDiscardableCards(player,'he')>0) discard--; + } + if(att<0){ + draw--; + if(target.countDiscardableCards(player,'he')>0) discard++; + } + } + if(draw>discard) return 1; + return 0; + }); + } + 'step 2' + event.index=result.index; + if(result.index==1){ + game.asyncDraw(targets); + } + else event.goto(4); + 'step 3' + game.delay(); + event.finish(); + 'step 4' + var target=targets.shift(); + if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,'he',true); + if(targets.length) event.redo(); + }, + group:'xuxie_add', + }, + xuxie_add:{ + audio:'xuxie', + trigger:{player:'phaseUseEnd'}, + forced:true, + locked:false, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.maxHp>player.maxHp; + }); + }, + content:function(){ + player.gainMaxHp(); + player.chooseDrawRecover(2,true); + }, + }, + //新潘凤 + xinkuangfu:{ + enable:'phaseUse', + usable:1, + audio:2, + delay:false, + filterTarget:function(card,player,target){ + if(player==target) return player.countCards('e',function(card){ + return lib.filter.cardDiscardable(card,player); + })>0; + return target.countDiscardableCards(player,'e')>0; + }, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.countCards('e')>0; + }); + }, + content:function(){ + 'step 0' + if(player==target) player.chooseToDiscard('e',true); + else player.discardPlayerCard(target,'e',true); + 'step 1' + player.chooseUseTarget('sha',true,false,'nodistance'); + 'step 2' + var bool=game.hasPlayer2(function(current){ + return current.getHistory('damage',function(evt){ + return evt.getParent('xinkuangfu')==event; + }).length>0 + }); + if(player==target&&bool) player.draw(2); + else if(player!=target&&!bool) player.chooseToDiscard('h',2,true); + }, + ai:{ + order:function(){ + return get.order({name:'sha'})+0.3; + }, + result:{ + target:function(player,target){ + var att=get.attitude(player,target); + var max=0; + var min=1; + target.countCards('e',function(card){ + var val=get.value(card,target); + if(val>max) max=val; + if(val0&&min<=0) return target.hasSkillTag('noe')?3:1; + if(att<0&&max>0){ + if(target.hasSkillTag('noe')) return max>6?(-max/3):0; + return -max; + } + return 0; + }, + }, + }, + }, + }, + card:{ + }, + characterIntro:{ + xingdaorong:'邢道荣是《三国演义》中虚构的人物,为零陵太守刘度手下武将,被评价有万夫不当之勇,于《三国演义》第五十二回登场,被赵云刺死。', + caoxing:'曹性,东汉末年吕布部将,史载他曾与身为自己上司的反叛者郝萌交战,并砍去郝萌一臂,受到吕布的嘉奖。在罗贯中所著古典小说《三国演义》中,也有关于曹性箭射夏侯惇左目的描述,而曹性也随即被暴怒的夏侯惇所杀。在穿越小说《三国之银河射手》中,主角穿越成为曹性,经过一番闯荡之后,被封为“银河射手”。', + xiahoujie:'夏侯杰(?—208年),是罗贯中的小说《三国演义》中曹操的部将,征战时常常带在身边。在第42回长坂坡之战中,张飞大吼,从马儿受惊跌下马来而死。', + huaxin:'华歆(157年-232年1月30日),字子鱼,汉族。平原郡高唐县人(今山东省高唐县)。汉末至三国曹魏初年名士、重臣。华歆早年拜太尉陈球为师,与卢植、郑玄、管宁等为同门,又与管宁、邴原共称一龙,华歆为龙头。汉灵帝时华歆被举为孝廉,任郎中,因病去官。又被大将军何进征召为尚书郎。后任豫章太守,甚得民心。孙策率军南下,华歆举郡投降,被奉为上宾。官渡之战时,被征为议郎、参司空军事。入为尚书、侍中,又代荀彧为尚书令。丞相曹操讨孙权时,授华歆为军师。后为魏王国的御史大夫。曹丕即王位,拜华歆为相国,封安乐乡侯。曹魏建立后,其相国职名改称司徒。魏明帝即位,升任太尉,晋封博平侯。太和五年十二月(232年1月),华歆去世,年七十五,谥号“敬”。有文集三十卷,今佚失,其余见《全三国文》。', + luyusheng:'陆郁生(?年-?),三国时期吴国官员陆绩之女。陆郁生的父亲陆绩是吴郡公认的才子,又是当时吴郡陆氏的领袖。陆绩赴任担任郁林太守,遂取此名。陆郁生年少的时候就定下坚贞的志向。建安二十四年(219年),陆绩早亡,她与两个兄弟陆宏、陆睿当时都只有几岁,一起返回吴县,被他们的从兄陆瑁接回抚养。13周岁的陆郁生嫁给同郡出身的张白为妻。出嫁3个月后,张白因为其兄张温一族的案件遭到连坐,被处以流刑,后死于流放地,陆郁生成为了寡妇,其后公开宣言不再改嫁,困难于生计但拒绝了所有提亲,在艰苦中从未停止服侍、照顾张白的姐妹。事情传到朝廷,皇帝褒奖陆郁生,号其为“义姑”。她的表侄姚信在文集中称赞她的义举。', + fengxi:'冯熙(?—223年),字子柔,颍川郡父城县(今河南省平顶山市宝丰县)人。汉末三国时期吴国官员,东汉初年名将冯异的后人。孙权担任车骑将军时,冯熙担任其幕府东曹掾,后迁立信都尉。刘备去世时,奉命进入蜀汉吊丧,返回后,任中大夫。后奉命出使魏国,受到魏文帝曹丕和尚书令陈群招揽,宁死不从,自尽未果。孙权闻之流泪,称其“东吴苏武”。最终在曹魏死去。', + heyan:'何晏(?-249年),字平叔。南阳郡宛县(今河南省南阳市)人。三国时期曹魏大臣、玄学家,东汉大将军何进之孙(一称何进弟何苗之孙)。何晏之父早逝,司空曹操纳其母尹氏为妾,他因而被收养,为曹操所宠爱。少年时以才秀知名,喜好老庄之学,娶曹操之女金乡公主。魏文帝在位时,未被授予官职。魏明帝认为何晏虚浮不实,也只授其冗官之职。大将军曹爽秉政时,何晏与之共事,得以累官至侍中、吏部尚书,典选举,封列侯。高平陵之变后,与大将军曹爽同为太傅司马懿所杀,被夷灭三族。何晏有文集十一卷,并曾与郑冲等共撰《论语集解》,今已佚。钟嵘《诗品》称“平叔鸿鹄之篇,风规见矣。”将何晏诗列入中品。袁宏在《名士传》中将何晏等称为正始名士。他与夏侯玄、王弼等倡导玄学,竞事清谈,遂开一时风气,为魏晋玄学的创始者之一。', + zhaoyan:'赵嫣,生卒年不详。东吴方士(一说是丞相)赵达之妹,吴大帝孙权之妃,人称赵夫人。她心灵手巧,多才多艺,有“三绝”之称。孙权曾经想要找擅长绘画之人绘制山川地势军阵之图。赵达举荐了自己的妹妹。赵嫣认为水墨容易褪色,不方便在军旅之中保存。自己擅长刺绣,可以在锦帛上绣出孙权所需之图。待制作完成后献于孙权,只见方帛锦绣之上有五岳河海城邑行阵之形,孙权大为赞叹。时人谓之“针绝”。除刺绣之外,赵嫣还擅长绘画织锦,她能用彩丝织成云霞龙蛇之锦,大则盈尺,小则方寸,宫中谓之“机绝”。孙权在昭阳宫居住之时,饱受暑气之扰,以紫绡制成帷帐缓解暑气。赵嫣认为此物不足为贵,她削下自己的头发剖为细丝,以郁夷国出产的神胶连接,花了数月功夫将其制成一顶幔帐,打开之后薄如蝉翼,轻赛寒烟。放下帐帷能笼罩一丈之地,帐内清风自生暑意顿消。收起来则可纳入枕中,携带方便。时人谓之“丝绝”。', + wangtao:'王桃是在《花关索传》中登场的虚拟人物,盗贼王令公的两个女儿之一,王悦的姐姐,与妹妹都是关索之妻。姐妹俩原为卢塘寨山贼,以武艺与美貌而闻名,被众多男性求婚却皆不与理睬。她们在关索回西川认父途中与关索交手时不敌,因意气投合而一齐下嫁。虽为架空之人物,但四川省内有记述夫妻三人共同守护葭萌关一事,民间亦流传如夫妻三人曾共同参与诸葛亮之南蛮征伐等轶事。', + wangyue:'王悦是在《花关索传》中登场的虚拟人物,盗贼王令公的两个女儿之一,王桃的妹妹,与姐姐都是关索之妻。姐妹俩原为卢塘寨山贼,以武艺与美貌而闻名,被众多男性求婚却皆不与理睬。她们在关索回西川认父途中与关索交手时不敌,因意气投合而一齐下嫁。虽为架空之人物,但四川省内有记述夫妻三人共同守护葭萌关一事,民间亦流传如夫妻三人曾共同参与诸葛亮之南蛮征伐等轶事。', + zhangxuan:'张嫙,三国时期孙吴将领张布之女,孙皓后妃张媱的姐姐。初为卫尉冯朝之子冯纯的妻子,后为孙皓后妃,册封左夫人。因孙皓诛灭张布,张媱口吐怨言,被暴怒的孙皓下令棒杀。后来孙皓怀念她的容颜,于是询问侍从:“张布还有女儿吗?”侍从回答:“张布的大女儿嫁给了已故卫尉冯朝的儿子冯纯。”于是孙皓夺走了冯纯的妻子张嫙,纳入宫中。孙皓颇为宠爱张嫙,册封其为左夫人。昼夜嬉戏,纸醉金迷,不理朝政。后来张嫙也去世了,孙皓非常悲伤,下令以最高的规格埋葬张嫙。因为悲伤过度,孙皓一度半年都不出宫门,甚至由于葬礼太过奢华被宫外之人认为孙皓已经死了。', + tengyin:'滕胤(?-256年),字承嗣,三国时期吴国重臣,北海郡剧县(今山东省昌乐县)人。滕胤仪表堂堂,少时有节操,后娶公主为妻。孙权称王后,滕胤被封都亭侯。其后历任丹杨太守、吴郡太守、会稽太守。孙亮继位后,出任太常、卫将军。诸葛恪被杀后,群臣推举滕胤为司徒,但遭权臣孙峻党羽所阻挠,滕胤也有意避嫌,最终只晋爵高密侯。孙峻死后,由其堂弟孙綝执政。滕胤的连襟、骠骑将军吕据联系北伐前线诸将推举滕胤为相,希望分割孙綝权力,但并未成功,滕胤被改任大司马,镇守武昌。不久,滕胤与吕据密谋推翻孙綝,因计划泄露而被杀,惨遭灭族。孙綝被杀后,景帝孙休为滕胤平反。', + zhangyao:'张美人,三国东吴末帝孙皓后妃,张布之女。另有张布女,张美人姊被孙皓立为左夫人。《吴书五妃嫔传第五》:江表传曰:皓以张布女为美人,有宠,皓问曰:“汝父所在?”答曰:“贼以杀之。”皓大怒,棒杀之。后思其颜色,使巧工刻木作美人形象,恒置座侧。问左右:“布复有女否?”答曰:“布大女适故卫尉冯朝子纯。”即夺纯妻入宫,大有宠,拜为左夫人,昼夜与夫人房宴,不听朝政,使尚方以金作华燧、步摇、假髻以千数。令宫人著以相扑,朝成夕败,辄出更作,工匠因缘偷盗,府藏为空。会夫人死,皓哀愍思念,葬于苑中,大作冢,使工匠刻柏作木人,内冢中以为兵卫,以金银珍玩之物送葬,不可称计。已葬之后,皓治丧於内,半年不出。国人见葬太奢丽,皆谓皓已死,所葬者是也。皓舅子何都颜状似皓,云都代立。临海太守奚熙信讹言,举兵欲还诛都,都叔父植时为备海督,击杀熙,夷三族,讹言乃息,而人心犹疑。', + xiahoulingnv:'夏侯令女,字令女,名不详。生卒年不详,三国时期人物。夏侯文宁之女(《三国演义》中为夏侯令之女),曹文叔之妻。其事迹见于《三国志·魏书·诸夏侯曹传第九》裴松之注引皇甫谧《列女传》。而在《三国演义》中,由于作者断句错误,便认为“夏侯令女”是“夏侯令之女”之意(见《三国演义》第107回:“乃夏侯令女也”,由其语气可推断)。', + lvlingqi:'吕玲绮,虚拟人物,源于日本光荣株式会社(现光荣特库摩公司)旗下游戏《真·三国无双》系列,初次登场于《真三国无双7:猛将传》。吕布的女儿,寂寥而威风凛凛的战姬,发挥着不亚于父亲的武艺,非常勇敢地身先士卒立于前线。虽然有着能够直面困难的坚强意志,却由于过去的经历而有着非常害怕孤独的一面。', + liuyong:'刘永,字公寿,涿郡涿县(今河北涿州)人,三国时期蜀汉昭烈帝刘备之子,蜀汉后主刘禅之弟。章武元年(221年)六月,封鲁王。建兴八年(230年),改封甘陵王。咸熙元年(264年),蜀汉灭亡,刘永被迁往洛阳,被任命为奉车都尉,封乡侯。', + wanniangongzhu:'刘氏(生卒年不详),河南郡雒阳县(今河南省洛阳市)人,汉灵帝刘宏之女,汉少帝刘辩与汉献帝刘协的姐妹,封万年公主。', + mamidi:'马日(mì)磾(dí)(?~194年),字翁叔。扶风茂陵(今陕西省兴平市)人。东汉中后期大臣,经学大师马融之族孙(一作族子)。马日磾年轻时即继承马融学说,以才学入仕。曾任谏议大夫,与蔡邕、卢植等人东观典校官藏的《五经》记传,并参与续写《东观汉记》。后历任射声校尉、太尉、太常等职。初平三年(192年),掌权的李傕任命马日磾为太傅、录尚书事,与太仆赵岐共同出使关东。他到寿春袁术处后,对其多有所求,遭袁术轻鄙,袁术遂夺其符节,来随意征辟将士,并企图强迫马日磾任其军师,马日磾求去不能,忧愤发病,兴平元年(194年),卒于寿春。', + guanning:'管宁(158年—241年),字幼安。北海郡朱虚县(今山东省安丘、临朐东南)人。汉末三国时期著名隐士。管宁与华歆、邴原并称为“一龙”。汉末天下大乱时,与邴原及王烈等人避于辽。在当地只谈经典而不问世事,做讲解《诗经》《书经》,谈祭礼、整治威仪、陈明礼让等教化工作,人们都很乐于接受他的教导。直到魏文帝黄初四年(公元223年)才返乡,辽东太守公孙恭亲自送别。此后曹魏几代帝王数次征召管宁,他都没有应命。正始二年(公元241年),管宁逝世,年八十四。著有《氏姓论》。', + tenggongzhu:'滕公主,名讳不详,三国人物,吴大帝孙权之女。一说为养女,生父为孙权堂弟孙奂。黄武年间(222年—228年),以公主身份下嫁功臣滕胄之子滕胤,当时滕胤年仅20岁。滕胤皮肤白皙,容貌俊美,每逢入朝大臣们没有不惊叹称羡的。滕胤仕官后,上书言及时局,又对政策多有匡弼。孙权对公主也特别宠爱,因为滕胤的缘故,又格外增加对公主的赏赐,又几次探望慰劳。少帝孙亮时期,孙綝以宗室身份独揽大权作恶多端,引发群臣不满。五凤三年(256年)滕胤与连襟吕据密谋推翻孙綝,事败遭到夷三族 。公主则被亲兄孙壹救出,携其逃亡曹魏。', + caimaozhangyun:'蔡瑁,字德珪,生卒年不详。襄阳蔡州人,东汉末年荆州名士。少年时与曹操交好。初平元年(公元190年),刘表为荆州刺史。时宗贼猖獗,蔡瑁协助刘表诛杀宗贼,平定荆州之地,蔡瑁因此得刘表重用,并在刘表任镇南将军时担任他的军师。刘表病亡后,蔡瑁拥护刘表幼子刘琮继位,并逼迫他投降南征的曹操。蔡瑁在曹操麾下历任从事中郎、司马、长水校尉,受封汉阳亭侯。张允,生卒年不详,荆州牧刘表的外甥,与蔡瑁一样是刘表幼子刘琮的党羽。刘表病重之时,张允害怕刘表会把州牧之位传给长子刘琦,于是将远赴而来的刘琦阻于门外,不准他与刘表相见。曹操大军到达新野时,张允也随蔡瑁一同投降曹操。之后便隐没于历史之中,并无记载。在《三国演义》中,蔡瑁张允擅长水战,是东吴心腹大患。周瑜用反间计诱骗曹操除掉二人,使得曹军再无能够统领水军的大将。', + zhangxun:'张勋,东汉末年军阀袁术帐下大将,袁术称帝后受封大将军。初平四年(公元193年),袁术引兵入陈留,被曹操、袁绍合力击败,逃至雍丘。后入九江,杀死扬州刺史陈温而自领之,并任命张勋、桥蕤为大将。时孙策依附于袁术,被表为怀义校尉,张勋对其倾心敬服。袁术称帝后,任命张勋为大将军,攻打吕布,大败而还。其后曹操又以袁术称帝为名南下进攻,袁术闻之大惊,即走度淮,留张勋、桥蕤守蕲阳以拒曹。曹操破其军,斩桥蕤,张勋退走。建安四年(公元199年),袁术病死,张勋率残军欲南投孙策,途中被袁术旧部刘勋俘虏,其后下落不明。', + huzhao:'胡昭(162年-250年),字孔明,颍川(治今河南禹州)人。汉末三国时期隐士、书法家。胡昭善长隶书,与钟繇、邯郸淳、卫觊、韦诞齐名。有“钟氏小巧,胡氏豪放”之说,世人并称“钟胡”。', + guanhai:'管亥(生卒年不详),青州黄巾军渠帅,率军侵略北海,围北海相孔融于都昌。孔融派遣太史慈突围而出,前往平原向刘备求援,刘备率军来到,击退管亥。《三国演义》中管亥在单挑中为关羽斩杀。', + yinfuren:'尹夫人,原汉大将军何进的儿媳,丈夫早逝,生有一子何晏。曹操任司空时娶尹氏为妾,一并收养何晏,并生有一子曹矩。', + chengui:'陈珪(生卒年不详),一作圭,字汉瑜。徐州下邳(治今江苏睢宁西北)人,广汉太守陈亹之孙,太尉陈球之侄,吴郡太守陈瑀(一作陈璃)、汝阴太守陈琮的从兄,陈登、陈应之父。官至沛相。', + wanglie:'王烈,字彦方(141-219),平原县(今山东德州平原)人。生于永和六年(公元141年),卒于建安二十三年(公元218年)。王烈少时师从陈寔,闻名遐迩。董卓作乱时避乱辽东,并多次拒绝曹操的聘请。七十八岁时病死于辽东。', + panghui:'庞会,(214—?),三国时期曹魏名将,庞德之子。曹丕即位后,思庞德忠烈,遂赐庞会等兄弟四人爵关内侯,邑各百户。庞会勇烈,有先父之风,官至中尉将军,封列侯。', + chenjiao:'陈矫(?-237年7月11日),字季弼,广陵郡东阳县(治今安徽省天长市西北,今地属江苏省如皋市)人。三国时期曹魏名臣。陈矫本姓刘,因过继与母族而改姓陈。早年避乱江东,后广陵太守陈登请为功曹。曹操辟为丞相掾属,迁任相县令,转任征南长史。又为彭城、乐陵太守,迁任魏郡西部都尉。曹操东征,拜丞相长史,转西曹属、尚书。曹丕称帝,领吏部事,封高陵亭侯,迁尚书令。明帝继位后,进爵东乡侯,后转侍中,加光禄大夫,又拜司徒。景初元年(237年),陈矫去世,谥贞侯。', + gongsundu:'公孙度 (?-204年),字升济,辽东襄平(今辽宁辽阳)人,东汉末年辽东太守。少随父迁居玄菟郡。初为玄菟小吏,建宁二年(169年),继升尚书郎、冀州刺史,后被免官。初平元年(190年),经同乡徐荣推荐,被董卓任命为辽东太守。公孙度到任后,厉行严刑峻法,打击豪强势力,使令行政通,羽翼渐丰。不久,中原地区董卓乱起,各地军阀无暇东顾。公孙度趁机自立为辽东侯、平州牧。继则东伐高句丽,西击乌桓,南取辽东半岛,越海取胶东半岛北部东莱诸县,开疆扩土;又招贤纳士,设馆开学,广招流民,威行海外,俨然以辽东王自居。建安九年(204年)病逝,子公孙康继承其位由于公孙度的锐意进取和苦心经营,使辽东地区在汉末三国的战乱年代,获得了暂时的安宁,推动了当地生产技术和封建文化的发展。', + leibo:'雷薄(生卒年不详),本为东汉末年袁术麾下部将。离开称帝后昏庸奢侈的袁术,与陈兰一起占据嵩山为山贼。后来袭击兵败的袁术,抢夺财宝。同时在《三国演义》中也有出场。', + liupi:'刘辟[pì],东汉末年黄巾起义军将领。黄巾军将领。黄巾之乱后,与龚都一起率军盘踞在汝南。欲追随刘备,将汝南让给刘备。《三国演义》中,在与曹操的部将高览交战时,为保护刘备而战死。', + zhenghun:'郑浑(生卒年不详),字文公。开封(今河南省开封市)人。汉末及三国时期曹魏大臣,东汉名儒郑众曾孙、名士郑泰之弟。郑浑早年避乱淮南,后转投豫章太守华歆。又被曹操辟为掾属,历任下蔡县长、邵陵县令,任内颇有政绩,深得民心。任左冯翊时,击杀扰乱郡县的梁兴,又击败作乱的山贼。历任上党太守、京兆尹、丞相掾属等职。曹丕称帝后,拜侍御史,加驸马都尉。先后任阳平、沛郡太守,任内兴修水利,使农田常年丰收,被百姓称为“郑陂”。后转任山阳和魏郡太守。魏明帝曹叡听闻郑浑的事迹之后,下诏将其政绩布告天下。官至将作大匠。卒年不详。', + furongfuqian:'傅肜[róng](?-222年),义阳(今湖北枣阳)人,三国时蜀汉将领。刘备攻伐吴国时,傅肜为别督。后刘备被陆逊击败,傅肜率部断后,奋战至死。死前怒斥道:“吴狗!何有汉将军降者!”
    傅佥[qiān] ( ? ~263年),义阳(治今湖北省枣阳市)人,蜀汉将领傅彤之子,三国时期蜀汉名将。金长于谋略,并颇有胆勇,姜维甚爱之。傅佥官至关中都督。魏国攻伐蜀汉时,傅佥和蒋舒防守阳安关,兵败战死。', + qinlang:'秦朗(生卒年不详),字元明,小字阿蘇(一作阿鳔),新兴(治今山西忻州)云中人。三国时期曹魏将领,官至骁骑将军、给事中,曾率兵讨伐鲜卑轲比能和步度根的叛军。', + xianglang:'向朗(约167年—247年),字巨达。襄阳郡宜城县(今湖北宜城)人,三国时期蜀汉官员、藏书家、学者。向朗早年师从于司马徽,并被荆州牧刘表任命为临沮县长。后随刘备入蜀,历任巴西、牂牁、房陵太守,并拜步兵校尉,领丞相长史,随丞相诸葛亮北伐。因包庇马谡被免职,后为光禄勋,转左将军、特进,封显明亭侯。曾代理丞相册封张皇后及太子刘璿。晚年专心研究典籍,诱导青年学习,家中藏书丰富,受到举国尊重。延熙十年(247年),向朗去世。《全三国文》收录有一篇《遗言戒子》', + yuantanyuanxiyuanshang:'袁谭袁尚介绍请移步「袁谭袁尚」,此处为袁熙的介绍。
    袁熙(?-207年),字显奕(《后汉书》、《东光世系》作显雍),汝南郡汝阳县(今河南商水)人,是东汉末年占据河北的军阀袁绍次子,袁绍打败公孙瓒后,令袁熙为幽州刺史。袁绍官渡兵败后不久病死,其兄长袁谭、弟弟袁尚各自独立,互相攻伐,曹操趁机进攻袁谭、袁尚,并逐渐占河北。袁熙接纳兵败的袁尚后,因为属下叛变而逃往乌桓,被曹操击败后,逃往辽东太守公孙康帐下,却被公孙康杀死,二人首级被献给曹操。', + zhanghu:'张虎,生卒年不详,雁门马邑(今山西朔城区大夫庄)人。张辽之子,三国时期曹魏武将。官至偏将军,封晋阳侯,有一子张统。', + mengjie:'孟节,南中蛮王孟获之兄。是小说《三国演义》中杜撰的人物,史上并无记载。诸葛亮南征孟获之时,帐下军士因误饮哑泉之水失语。当地山神告知诸葛亮,言万安溪畔有一高士隐居彼处,号“万安隐者”。其草庵后有一泉,名安乐泉,可解哑泉之毒。庵前生有一草,名薤叶芸香,可防瘴气之染。诸葛亮于是带人连夜前往其隐居之处,求得泉水草叶解毒防瘴,拜求隐士姓名,方知其名为孟节,由此而叹:“方信盗跖、下惠之事,今亦有之。”诸葛亮欲申奏刘禅,立其为王,孟节辞之。又以金帛赠之,孟节坚辞不受。诸葛亮嗟叹不已,拜别而回。', + peiyuanshao:'裴元绍,《三国演义》人物,原黄巾军之武将。黄巾起义失败之后,与周仓一同率领残部在山中落草当山贼。公元200年,在关羽欲返刘备旗下,在突破曹操的五道关卡后路过其落草之地,与周仓一同向关羽要求能以期成为关羽家臣。但此时仅周仓同行,其他弟兄则于山中等待。不久后,因其欲夺偶然路过的赵云之马,反遭讨伐战败身死。', + zhangchu:'张楚,《阵面对决》第九弹“燎原”中登场的一个原创人物。她是张角的女儿,张宁的姐姐,在逃亡途中被刘备捕获。之后在诸葛亮的建议下,张楚被囚禁。在《阵面对决》的“怒焰”故事线中,张楚随着刘备入了西川,并被软禁在成都。夷陵之战后,刘备大败,全国主力外出用以支援刘备,朝内空虚,张楚趁机逃跑。', + dongwan:'董绾,袁术老婆,嫉妒冯芳女的美貌,与冯方女有矛盾。', + yuanyin:'袁胤(生卒年不详),东汉末期人物,据说是袁隗之子,是袁术从弟。兴平二年(公元195年)被袁术任命为丹杨太守,后因孙策平定江东被逐。建安四年(公元199年),袁术卒,袁胤因畏惧曹操,遂率领袁术部曲并带着其灵柩及妻子到皖城并投奔庐江太守刘勋。6个月后皖城被孙策所破,袁胤等人迁居吴郡,此后事迹不详。', + gaoxiang:'高翔(又作高详、高祥)(生卒年不详),荆州南郡(治今湖北省公安县)人,三国时期蜀汉将领。曾随刘备攻打汉中,后又随蜀汉丞相诸葛亮参加北伐曹魏的战争。建兴九年(公元231年)的北伐中大破司马懿。官至杂号大将军(即某杂号将军加大,但无考何杂号将军),封玄乡侯。此后,关于高翔的记载不详。', + zhoushan:'周善,《三国演义》中人物,不见于正史记载。为吴侯孙权的家将,此人最有胆量,自幼穿房入户,多随孙策。权为骗其妹回吴,遣善将五百人,扮为商人,分作五船;更诈修国书,以备盘诘;船内暗藏兵器。周善领命,往荆州。正骗得孙夫人带刘禅上船,赵云前来抢走禅,周善在后梢挟住舵,只顾放船下水。正僵持时张飞赶到,周善见张飞上船,提刀来迎,被张飞手起一剑砍倒,提头掷于孙夫人前。', + zhangkai:'张闿[kǎi],陶谦的手下都尉。奉命截杀曹操之父曹嵩,杀死曹嵩,夺去财宝逃往淮南投奔袁术,并担任刺杀陈王刘宠和陈国相骆俊的任务。', + mengyou:'孟优,《三国演义》里的人物,南蛮王孟获之弟。与诸葛亮的南征军交战,向败战的兄长推荐朵思大王,劝兄长借助朵思之力与蜀汉军对抗。后来与兄长一起发誓归顺蜀汉。', + liuchongluojun:'刘宠(?~197年),汉明帝刘庄玄孙,陈敬王刘羡曾孙,陈顷王刘崇之孙,陈孝王刘承之子,陈国第六位国君,也是东汉陈国的最后一位国君。骆俊(?-197),字孝远,东汉末年扬州会稽郡乌伤县(今浙江义乌)人。宗室陈王刘宠的国相,在任期间励精图治,深得民众爱戴。刘宠勇猛过人,善使弓弩,箭法高超。在其父刘承死后,继承陈王爵位。中平年间,黄巾军起义,郡县官兵都弃城逃走,刘宠于是征兵自守卫。当时天下饥荒,诸王侯都已不再享有租赋,反屡遭抢掠,有的甚至流离在外,死于荒野。只有陈国仍很富强,邻郡百姓纷纷前去投靠,陈国拥有部众达十余万人。初平元年(190年),各州郡起兵讨伐董卓,刘宠率军屯驻阳夏,自称辅汉大将军。建安二年(197年),袁术向陈国求取粮草,遭陈国国相骆俊拒绝,袁术大为生气,便派刺客张闿假装路过陈国,乘机杀死骆俊和刘宠。', + yuechen:'乐綝(195~257年),字号不详,阳平郡卫国县(今河南省清丰县)人。三国时期曹魏将领,右将军乐进的儿子。果毅坚毅,袭封广昌亭侯,累迁扬州刺史。甘露二年,为叛乱的征东大将军诸葛诞所杀,追赠卫尉。', + }, + characterTitle:{ + }, + perfectPair:{}, + characterFilter:{ + }, + dynamicTranslate:{ + cuijian:function(player){ + return '出牌阶段限一次,你可以选择一名有手牌的其他角色。若其手牌中有【闪】,则其将所有【闪】和防具牌交给你'+(player.hasMark('zhtongyuan_basic')?'':',然后你交给其等量的牌')+'。'+(player.hasMark('zhtongyuan_trick')?'若其手牌中没有【闪】,则你摸两张牌。':''); + }, + dunshi:function(player){ + var info=player.storage.dunshi; + var str='每回合限一次。你可以视为使用或打出一张'; + var list=['sha','shan','tao','jiu']; + for(var i of list){ + var strx='【'+get.translation(i)+'】'; + if(!info||!info[0].contains(i)) strx=(''+strx+''); + str+=strx; + if(i!='jiu') str+='/'; + } + str+=',然后当前回合角色于本回合内下一次造成伤害时,你选择两项:⒈防止此伤害。系统从技能名中包含“仁/义/礼/智/信”字样的技能中随机选择三个其未拥有的技能,然后你令当前回合角色获得其中一个技能。⒉从〖遁世〗中删除你本次使用或打出的牌并获得一个“赂”。⒊减1点体力上限并摸X张牌(X为你的“赂”数)。'; + return str; + }, + dcporui:function(player){ + return '每轮限一次。其他角色的结束阶段,你可以弃置一张基本牌并选择另一名于此回合内失去过牌的其他角色,你视为对其依次使用X+1张【杀】'+(player.hasMark('dcgonghu_damage')?'':',然后你交给其X张手牌')+'(X为你的体力值)。'+(player.hasMark('dcgonghu_basic')?'若其没有因此受到伤害,你回复1点体力。':''); + }, + }, + perfectPair:{}, + characterReplace:{ + dongbai:['re_dongbai','dongbai','jsrg_dongbai'], + chunyuqiong:['chunyuqiong','re_chunyuqiong'], + kanze:['re_kanze','kanze'], + chendeng:['ol_chendeng','re_chendeng','chendeng'], + miheng:['miheng','re_miheng'], + liuba:['ol_liuba','dc_liuba','liuba'], + lvkuanglvxiang:['lvkuanglvxiang','dc_lvkuanglvxiang'], + dc_huangquan:['dc_huangquan','xf_huangquan'], + yuejiu:['dc_yuejiu','yuejiu'], + jiling:['dc_jiling','tw_jiling','jiling'], + sp_jiaxu:['dc_sp_jiaxu','sp_jiaxu','yj_jiaxu'], + qiaorui:['qiaorui','tw_qiaorui'], + + }, + translate:{ + re_panfeng:'潘凤', + xinkuangfu:'狂斧', + xinkuangfu_info:'出牌阶段限一次,你可选择:1,弃置装备区里的一张牌,你使用无对应实体牌的普【杀】。若此【杀】造成伤害,你摸两张牌。2,弃置一名其他角色装备区里的一张牌,你使用无对应实体牌的普【杀】。若此【杀】未造成伤害,你弃置两张手牌。', + xingdaorong:'邢道荣', + xuxie:'虚猲', + xuxie_info:'出牌阶段开始时,你可以减1点体力上限并选择所有与你距离为1的角色,弃置这些角色的各一张牌或令这些角色各摸一张牌。出牌阶段结束时,若你的体力上限不为全场最多,则你加1点体力上限,然后回复1点体力或摸两张牌。', + caoxing:'曹性', + cxliushi:'流矢', + cxliushi2:'流矢', + cxliushi_info:'出牌阶段,你可以将一张红桃牌置于牌堆顶,视为对一名角色使用一张【杀】(无距离限制且不计入使用次数)。当此【杀】造成伤害后,受到伤害的角色获得一个“流”。有“流”的角色手牌上限-X(X为其“流”数)。', + zhanwan:'斩腕', + zhanwan_info:'锁定技,有“流”的角色于弃牌阶段弃牌后,你摸等量的牌,然后其移去所有的“流”。', + re_chunyuqiong:'淳于琼', + recangchu:'仓储', + recangchu2:'仓储', + recangchu3:'仓储', + recangchu_info:'锁定技,游戏开始时,你获得3个“粮”。你的手牌上限+X(X为“粮”数)。当你于回合外获得牌时,你获得一个“粮”。(你的“粮”数不能超过存活角色数)', + reliangying:'粮营', + reliangying_info:'弃牌阶段开始时,你可以摸至多X张牌,然后交给等量的角色各一张牌。(X为你的“粮”数)', + reshishou:'失守', + reshishou2:'失守', + reshishou_info:'锁定技,当你使用【酒】时或受到1点火焰伤害后,你移去一个“粮”。准备阶段,若你没有“粮”,你失去1点体力。', + xiahoujie:'夏侯杰', + liedan:'裂胆', + liedan_info:'锁定技,其他角色的准备阶段开始时,若X大于0,则你摸X张牌。若X等于3,则你加1点体力上限(至多加到8)。若X为0,则你失去1点体力并获得一枚“裂”(X为你的手牌数,体力值,装备区牌数中大于其的数量)。准备阶段,若“裂”数大于4,则你死亡。', + zhuangdan:'壮胆', + zhuangdan_mark:'壮胆', + zhuangdan_info:'锁定技,其他角色的回合结束时,若你的手牌数为全场唯一最多,则你令〖裂胆〗失效直到你下回合结束。', + dc_caiyang:'蔡阳', + dcxunji:'寻嫉', + dcxunji_info:'出牌阶段限一次,你可以选择一名其他角色。该角色的下个结束阶段开始时,若其于该回合内造成过伤害,则你视为对其使用一张【决斗】,且当此【决斗】对其造成伤害后,你失去等量的体力。', + dcjiaofeng:'交锋', + dcjiaofeng_info:'锁定技。每回合限一次,当你造成伤害时,若你本回合内未造成过其他伤害且你已损失的体力值:大于0,则你摸一张牌;大于1,则此伤害+1;大于2,则你回复1点体力。', + zhoushan:'周善', + dcmiyun:'密运', + dcmiyun_tag:'安', + dcmiyun_info:'锁定技。①一轮游戏开始时,你依次执行:1.若你有“安”,你将包括“安”的在内的任意张手牌交给一名其他角色,然后你将手牌补至体力上限;2.你正面向上获得一名其他角色的一张牌,称为“安”。②当你不因〖密运①〗失去“安”后,你失去1点体力。', + dcdanying:'胆迎', + dcdanying_info:'每回合限一次。你可以展示“安”,然后视为使用或打出一张【杀】或【闪】。然后当你于本回合下一次成为牌的目标后,使用者弃置你的一张牌。', + re_sunluyu:'孙鲁育', + remeibu:'魅步', + remeibu_info:'其他角色的出牌阶段开始时,若你在其攻击范围内,你可以弃置一张牌A,该角色于本阶段内拥有〖止息〗,且当其因〖止息〗弃置与牌A花色相同的牌时,你获得之。', + rezhixi:'止息', + rezhixi_info:'锁定技,当你使用【杀】或普通锦囊牌时,你弃置一张手牌。', + remumu:'穆穆', + remumu_info:'出牌阶段开始时,你可以选择一项:1.弃置一名其他角色装备区里的一张牌,然后你本回合可使用【杀】的次数+1;2.获得一名角色装备区里的一张牌,然后你本回合可使用【杀】的次数-1。', + re_dongbai:'董白', + relianzhu:'连诛', + relianzhu_info:'出牌阶段限一次,你可将一张牌正面朝上交给一名其他角色。若此牌为:红色,你摸一张牌;黑色,对方弃置两张牌或令你摸两张牌。’', + rexiahui:'黠慧', + rexiahui_info:'锁定技,①你的黑色牌不计入手牌上限。②当有其他角色获得你的黑色牌后,其于下次扣减体力前不能使用,打出,弃置这些牌。③一名其他角色的回合结束时,若其本回合失去过其所有“黠慧”牌,则其失去1点体力。', + heyan:'何晏', + yachai:'崖柴', + yachai_info:'当你受到伤害后,你可令伤害来源选择一项:①其本回合不能再使用手牌,然后你摸两张牌;②其展示所有手牌,然后将其手牌中一种花色的所有牌交给你;③弃置一半数量的手牌(向上取整)。', + qingtan:'清谈', + qingtan_info:'出牌阶段限一次,你可令所有有手牌的角色同时选择一张手牌并同时展示。你可以获得其中一种花色的牌,然后展示此花色牌的角色各摸一张牌。若如此做,弃置其他的牌。', + zhaoyan:'赵嫣', + jinhui:'锦绘', + jinhui_info:'出牌阶段限一次,你可以随机展示牌堆中的三张不具有“伤害”标签且使用目标范围为“自己”或“一名角色”的牌,然后选择一名其他角色。该角色选择并按如下“锦绘”规则使用其中一张,然后你可以按如下“锦绘”规则使用剩余的任意张牌:若此牌的使用目标为“自己”,则对自己使用该牌,否则对对方使用该牌(无距离限制且不计入次数限制)。', + qingman:'轻幔', + qingman_info:'锁定技。一名角色的回合结束时,你将手牌摸至X张(X为其装备区中空栏的数量)。', + wangtao:'王桃', + wangyue:'王悦', + huguan:'护关', + huguan_info:'一名角色于出牌阶段内使用第一张牌时,若此牌为红色,则你可以声明一种花色。该花色的牌不计入其本回合的手牌上限。', + yaopei:'摇佩', + yaopei_info:'其他角色的弃牌阶段结束时,若你本局游戏内对其发动过〖护关〗,则你可以弃置一张与其于此阶段弃置的牌花色均不相同的牌。然后你选择一项:①其摸两张牌,你回复1点体力。②其回复1点体力,你摸两张牌。', + mingluan:'鸣鸾', + mingluan_info:'其他角色的结束阶段开始时,若有角色于本回合内回复过体力,则你可以弃置任意张牌,然后摸X张牌(X为当前角色的手牌数,且至多摸至5张)。', + zhangxuan:'张嫙', + tongli:'同礼', + //tongli_info:'当你于出牌阶段内不因〖同礼〗而使用基本牌或普通锦囊牌指定第一个目标后,若你手牌中的花色数和你于本阶段内不因〖同礼〗而使用过的牌数相等,则你可以于此牌结算结束后依次视为对此牌的所有目标使用X张名称和属性相同的牌(X为你手牌中的花色数)。', + tongli_info:'当你于出牌阶段内使用基本牌或普通锦囊牌指定第一个目标后,若你手牌中的花色数和你于本阶段内使用过的牌数相等,则你可以令此牌额外结算X次(X为你手牌中的花色数)。', + shezang:'奢葬', + shezang_info:'每轮限一次。当你或你回合内的其他角色进入濒死状态时,你可以从牌堆中获得每种花色的牌各一张。', + tengyin:'滕胤', + chenjian:'陈见', + chenjian_info:'准备阶段,你可展示牌堆顶的3+X张牌(X为你“陈见”标记的数量且至多为2)。然后你可依次执行以下两项中的任意项:⒈弃置一张牌,然后令一名角色获得与你弃置牌花色相同的牌。⒉使用其中剩余的一张牌。若你执行了所有选项,则你获得一枚“陈见”,然后重铸所有手牌。', + xixiu:'皙秀', + xixiu_info:'锁定技。①当你成为其他角色使用牌的目标时,若你的装备区内有和此牌花色相同的牌,则你摸一张牌。②若你装备区内的牌数为1,则其他角色不能弃置你装备区内的牌。', + zhangyao:'张媱', + yuanyu:"怨语", + yuanyu_info:"出牌阶段限一次。你可以摸一张牌,然后选择一张手牌和一名其他角色。该角色获得如下效果直到你发动〖夕颜〗:{你与该角色的弃牌阶段开始时,或当该角色造成1点伤害后,其须将一张手牌作为“怨”置于你的武将牌上}。然后你将你选择的手牌作为“怨”置于你的武将牌上。", + xiyan:"夕颜", + xiyan_info:"当有牌作为“怨”移动到你的武将牌上后,若“怨”中的花色数达到4种,则你可以获得所有“怨”。然后若当前回合角色:是你,你本回合手牌上限+4且使用牌无次数限制且重置你的〖怨语〗于此阶段的发动次数;不是你,你可令当前回合角色本回合手牌上限-4且不能使用基本牌。", + xiahoulingnv:'夏侯令女', + fuping:'浮萍', + fuping_info:'①其他角色对你使用的牌结算结束后,若你未因此技能记录过此牌的名称且你有未废除的装备栏,则你可以废除一个装备栏,记录此牌的名称。②每回合每种牌名限一次。你可以将一张非基本牌当做〖浮萍①〗记录过的基本牌或锦囊牌使用或打出。③若你的所有装备栏均已被废除,则你使用牌无距离限制。', + weilie:'炜烈', + weilie_info:'每局游戏限X次。出牌阶段,你可以弃置一张牌并选择一名已受伤的角色,令该角色回复1点体力。然后若其体力值小于体力上限,则其摸一张牌(X为你〖浮萍①〗中的记录数+1)。', + dc_sunru:'孙茹', + xiecui:'撷翠', + xiecui_info:'当有角色于回合内第一次因执行牌的效果而造成伤害时,你可以令此伤害+1。若其势力为吴,则该角色获得此伤害牌对应的实体牌,且其本回合的手牌上限+1。', + youxu:'忧恤', + youxu_info:'一名角色A的回合结束时,若其手牌数大于体力值,则你可以展示A的一张牌,然后将此牌交给另一名角色B。若B的体力值为全场最少,则B回复1点体力。', + huaxin:'华歆', + wanggui:'望归', + wanggui_info:'每回合限触发一次,当你造成或受到伤害后,若你:仅明置了此武将牌,则你可对与你势力不同的一名角色造成1点伤害;武将牌均明置,则你可令与你势力相同的角色各摸一张牌。', + spwanggui:'望归', + spwanggui_info:'①当你受到伤害后,你可以摸一张牌,或和一名势力相同的其他角色各摸一张牌;②每回合限一次,当你造成伤害后,你可以对一名与你势力不同的角色造成1点伤害。', + xibing:'息兵', + xibing_info:'当一名其他角色在其出牌阶段内使用黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力值(至多摸五张)且本回合不能再使用手牌。', + xibing_info_guozhan:'当一名其他角色在其出牌阶段内使用第一张黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力(至多摸五张)值且本回合不能再使用手牌。若你与其均明置了所有武将牌,则你可以暗置你与其各一张武将牌且本回合不能再明置此武将牌。', + luyusheng:'陆郁生', + zhente:'贞特', + zhente2:'贞特', + zhente_info:'每回合限一次,当你成为其他角色使用基本牌或普通锦囊牌的目标后,你可令使用者选择一项:1.本回合不能再使用与此牌颜色相同的牌;2.此牌对你无效。 ', + zhente_info_guozhan:'每回合限一次,当你成为其他角色使用黑色基本牌或黑色普通锦囊牌的目标后,你可令使用者选择一项:1.本回合不能再使用黑色牌;2.此牌对你无效。 ', + zhiwei:'至微', + zhiwei2:'至微', + zhiwei_info:'游戏开始时/你的回合开始时,若场上没有因此法被选择过的角色存活,则你选择一名其他角色。该角色造成伤害后,你摸一张牌,该角色受到伤害后,你随机弃置一张手牌。你弃牌阶段弃置的牌均被该角色获得。', + zhiwei_info_guozhan:'你明置此武将牌时,选择一名其他角色。该角色造成伤害后,你摸一张牌,该角色受到伤害后,你随机弃置一张手牌。你弃牌阶段弃置的牌均被该角色获得。该角色死亡时,若你的两个武将牌均明置,你暗置此武将牌。 ', + zhanghu:'张虎', + cuijian:'摧坚', + cuijian_info:'出牌阶段限一次,你可以选择一名有手牌的其他角色。若其手牌中有【闪】,则其将所有【闪】和防具牌交给你,然后你交给其等量的牌。', + zhtongyuan:'同援', + zhtongyuan_info:'锁定技。①当你使用红色锦囊牌后,你于〖摧坚〗后增加“若其手牌中没有【闪】,则你摸两张牌”;②当你使用或打出红色基本牌后,你删除〖摧坚〗中的“,然后你交给其等量的牌”。③当你使用红色的普通锦囊牌/基本牌时,若你已发动过〖摧坚①〗和〖摧坚②〗,则此牌不可被响应/可额外增加一个目标。', + lvlingqi:'吕玲绮', + guowu:'帼舞', + guowu_info:'出牌阶段开始时,你可以展示全部手牌,根据你展示的类型数,你获得对应效果:至少一类,从弃牌堆获得一张【杀】;至少两类,此阶段使用牌无距离限制;至少三类,此阶段使用【杀】或普通锦囊牌可以多指定两个目标。', + guowu_info_guozhan:'出牌阶段开始时,你可以展示全部手牌,根据你展示的类型数,你获得对应效果:至少一类,从弃牌堆获得一张【杀】;至少两类,此阶段使用牌无距离限制;至少三类,此阶段使用【杀】可以多指定两个目标。', + zhuangrong:'妆戎', + zhuangrong_info:'觉醒技,一名角色的回合结束时,若你的体力值或手牌数为1,你减1点体力上限并回复体力至上限,将手牌摸至体力上限,然后获得〖神威〗和〖无双〗。', + llqshenwei:'神威', + llqshenwei_info:'锁定技,摸牌阶段开始时,你令额定摸牌数+2;你的手牌上限+2。', + re_kanze:'阚泽', + rekuanshi:'宽释', + rekuanshi_info:'结束阶段,你可以选择一名角色。你获得如下效果直到你下回合开始:每回合限一次,当其于一回合内受到第2点伤害后,其回复1点体力。', + liuyong:'刘永', + zhuning:'诛佞', + zhuning_info:'出牌阶段限一次。你可将任意张牌交给一名其他角色(称为“隙”),然后可视为使用一张具有伤害标签的基本牌/锦囊牌(不计入次数限制)。若你以此法使用的牌未造成伤害,则你将〖诛佞〗于本回合内改为“限两次”。', + fengxiang:'封乡', + fengxiang_info:'锁定技。①当你受到伤害后,若场上:存在“隙”唯一最多的角色,则其回复1点体力;不存在,则你摸一张牌。②当有角色的手牌移动后,若场上“隙”最多的角色因此发生变化,则你摸一张牌。', + fengxiang_tag:'隙', + re_xunchen:'荀谌', + refenglve:'锋略', + refenglve_info:'出牌阶段限一次,你可以和一名其他角色进行拼点。若你赢,其将区域内的两张牌交给你;若平局,则你令此技能于本阶段内的发动次数上限+1;若你输,其获得你的拼点牌。', + anyong:'暗涌', + anyong_info:'当一名角色于其回合内第一次对其他角色造成伤害后,若伤害值为1,则你可弃置一张牌,并对受伤角色造成1点伤害。', + wanniangongzhu:'万年公主', + zhenge:'枕戈', + zhenge_info:'准备阶段,你可以选择一名角色。该角色本局游戏的攻击范围+1(至多+5)。然后若所有其他角色都在该角色的攻击范围内,则你可以令其视为对另一名角色使用一张【杀】。', + xinghan:'兴汉', + xinghan_info:'锁定技,每回合的第一张【杀】造成伤害后,若此【杀】的使用者成为过〖枕戈〗的目标,则你摸一张牌。若你的手牌数不是全场唯一最多的,则改为摸X张牌(X为该角色的攻击范围且最多为5)。', + re_chendeng:'陈登', + refuyuan:'扶援', + refuyuan_info:'一名角色成为【杀】的目标后,若其本回合内没有成为过其他红色牌的目标,则你可以令其摸一张牌。', + reyingshui:'营说', + reyingshui_info:'出牌阶段限一次,你可将一张牌交给攻击范围内的一名其他角色,然后其选择一项:①交给你至少两张装备牌。②受到1点伤害。', + rewangzu:'望族', + rewangzu_info:'每回合限一次。当你受到其他角色造成的伤害时,你可随机弃置一张手牌,令此伤害-1。若你所在阵营的存活角色数是全场最多的,则你可以自行选择弃置的牌。', + re_miheng:'祢衡', + rekuangcai:'狂才', + rekuangcai_info:'锁定技。①你于回合内使用牌无距离和次数限制。②弃牌阶段开始时,若你本回合内:未使用过牌,则你本局游戏的手牌上限+1;使用过牌但未造成过伤害,则你本局游戏的手牌上限-1。③结束阶段开始时,你摸X张牌(X为你本回合内造成的伤害且至多为5)。', + reshejian:'舌箭', + reshejian_info:'当你成为其他角色使用牌的唯一目标后,你可以弃置至少两张手牌。若如此做,你选择一项:⒈弃置其等量的牌。⒉对其造成1点伤害。', + fengxi:'冯熙', + yusui:'玉碎', + yusui_info:'当你成为其他角色使用黑色牌的目标后,你可以失去1点体力,然后选择一项:⒈令其将手牌数弃置至与你相同;⒉令其失去Y点体力(Y为其的体力值减去你的体力值,不为正时不可选择)', + boyan:'驳言', + boyan_info:'出牌阶段限一次,你可选择一名其他角色。其将手牌摸至体力上限(至多摸至五张),然后其本回合不能使用或打出手牌。', + re_dengzhi:'邓芝', + jianliang:'简亮', + jianliang_info:'摸牌阶段开始时,若你的手牌数不为全场最多,则你可以令至多两名角色各摸一张牌。', + weimeng:'危盟', + weimeng_info:'出牌阶段限一次,你可以获得一名其他角色的至多X张手牌,然后交给其等量的牌(X为你的体力值)。若你给出的牌点数之和:大于获得的牌,则你摸一张牌;小于获得的牌,弃置该角色区域内的一张牌。', + mamidi:'马日磾', + bingjie:'秉节', + bingjie_info:'出牌阶段开始时,你可减1点体力上限,然后当你于本阶段内使用【杀】或普通锦囊牌指定其他角色为目标后,其弃置一张牌。若其弃置的牌与你使用的牌颜色相同,其无法响应此牌。', + zhengding:'正订', + zhengding_info:'锁定技。当你于回合外使用或打出牌响应其他角色使用的牌时,若这两张牌颜色相同,则你加1点体力上限并回复1点体力。', + dc_jiben:'吉本', + xunli:'寻疠', + xunli_info:'锁定技。①当有黑色牌因弃置而进入弃牌堆后,若X大于0,则你将其中的X张牌置于武将牌上作为“疠”(X=min(这些牌的数量,9-Y),Y=你的“疠”数)。②出牌阶段开始时,你可以用任意张黑色手牌交换等量的“疠”。', + zhishi:'指誓', + zhishi_info:'结束阶段,你可选择一名角色。当该角色于你的下回合开始前{成为【杀】的目标后或进入濒死状态时},你可移去任意张“疠”,然后其摸等量的牌。', + lieyi:'烈医', + lieyi_info:'出牌阶段限一次。你可以展示所有“疠”并选择一名其他角色,对其使用其中的一张可对其使用的牌(无距离和次数限制)并重复此流程,并将其余的牌置于弃牌堆。然后若其存活且未于此流程中因受到伤害而进入过濒死状态,则你失去1点体力。', + guanning:'管宁', + dunshi:'遁世', + dunshi_info:'每回合限一次。你可以视为使用或打出一张【杀】/【闪】/【桃】/【酒】,然后当前回合角色于本回合内下一次造成伤害时,你选择两项:⒈防止此伤害。系统从技能名中包含“仁/义/礼/智/信”字样的技能中随机选择三个其未拥有的技能,然后你令当前回合角色获得其中一个技能。⒉从〖遁世〗中删除你本次使用或打出的牌并获得一个“席”。⒊减1点体力上限并摸X张牌(X为你的“席”数)。', + dc_gaolan:'高览', + xizhen:'袭阵', + xizhen_info:'出牌阶段开始时,你可选择一名其他角色,视为对其使用【杀】或【决斗】。然后当有角色于本阶段内使用或打出牌响应你时,该角色回复1点体力,你摸一张牌(若其满体力,改为两张)。', + dc_huangchengyan:'黄承彦', + dcjiezhen:'解阵', + dcjiezhen_info:'出牌阶段限一次,你可选择一名其他角色。该角色获得〖八阵〗,且其所有不为{锁定技、限定技、觉醒技、主公技、带有Charlotte标签}的技能失效。你的下回合开始时,或其因〖八卦阵〗发起的判定结算结束后,你令其恢复其以此法失效的所有技能并失去以此法获得的〖八阵〗,然后获得其区域内的一张牌。', + dczecai:'择才', + dczecai_info:'限定技。一轮游戏开始时,若游戏轮数大于1,则你可令一名其他角色获得〖集智〗直到下一轮游戏开始;若其是上一轮内使用过锦囊牌数量唯一最多的角色,则其获得一个额外的回合。', + dcyinshi:'隐世', + dcyinshi_info:'锁定技。①每回合限一次,当你受到伤害时,若此伤害的渠道不为有颜色的牌,则你防止此伤害。②当有因〖八卦阵〗发起的判定的判定牌生效时,你获得此判定牌。', + tenggongzhu:'滕公主', + xingchong:'幸宠', + xingchong_info:'一轮游戏开始时,你可声明两个自然数X和Y,且(X+Y)≤min(5, 你的体力上限)。你摸X张牌并展示Y张手牌。若如此做,当你于本轮内失去一张以此法展示的牌后,你摸两张牌。', + liunian:'流年', + liunian_info:'锁定技。牌堆第一次洗牌后,你于回合结束时加1点体力上限;牌堆第二次洗牌后,你于本回合结束时回复1点体力,且本局游戏内的手牌上限+10。', + caimaozhangyun:'蔡瑁张允', + lianzhou:'连舟', + lianzhou_info:'锁定技。准备阶段,你横置你的武将牌。然后你可横置任意名体力值等于你的角色。', + jinglan:'惊澜', + jinglan_info:'锁定技。当你造成伤害后,若你的手牌数:大于体力值,你弃置四张手牌;等于体力值,你弃置一张手牌并回复1点体力;小于体力值,你受到1点无来源火焰伤害并摸五张牌。', + dc_yanghu:'羊祜', + dcdeshao:'德劭', + dcdeshao_info:'每回合限两次。当你成为其他角色使用的黑色牌的目标后,你可以摸一张牌,然后若其手牌数不小于你,则你弃置其一张牌。', + dcmingfa:'明伐', + dcmingfa_info:'①出牌阶段限一次。当你使用【杀】或普通锦囊牌结算结束后,若你的武将牌上没有“明伐”牌,则你可以将此牌作为“明伐”牌置于武将牌上并选择一名其他角色,记录该角色和此牌的名称。②一名角色的回合结束时,若其是你〖明伐①〗记录的角色,则你视为对其依次使用X张〖明伐①〗记录的牌,然后移去“明伐”牌(X为其手牌数且至少为1,至多为5)。③一名角色死亡时,若其是你〖明伐①〗记录的角色,则你移去“明伐”牌。', + dc_jiling:'纪灵', + dcshuangren:'双刃', + dcshuangren_info:'出牌阶段开始时,你可以和一名其他角色A进行拼点。若你赢,你选择一名角色B,或选择包含A在内的两名角色A和B(B的势力需与A相同),然后视为对被选择的角色使用一张【杀】(不计入次数限制);若你没赢,则你本阶段内不能使用【杀】。', + zhangxun:'张勋', + suizheng:'随征', + suizheng_info:'结束阶段,你可以选择一名角色A,获得如下效果直到其下回合结束:①A于下回合出牌阶段内使用【杀】的次数上限+1且无距离限制;②A下回合的出牌阶段结束时,你可以选择一名此阶段内受到过A造成的伤害的角色B,视为对B使用一张【杀】。', + dc_liuba:'刘巴', + dczhubi:'铸币', + dczhubi_info:'当有♦牌因弃置而进入弃牌堆后,你可以令系统从牌堆/弃牌堆中检索一张【无中生有】,并将此牌置于牌堆顶。', + dcliuzhuan:'流转', + dcliuzhuan_tag:'转', + dcliuzhuan_info:'锁定技。①其他角色于其回合内不于摸牌阶段而获得的牌称为“转”。②你不能成为实体牌中包含“转”的牌的目标。③当有“转”直接进入弃牌堆或经由处理区进入弃牌堆后,你获得之。', + huzhao:'胡昭', + midu:'弥笃', + midu_info:'出牌阶段限一次。你可以选择一项:⒈废除任意个装备栏或判定区,并令一名角色摸等量的牌。⒉恢复一个已经被废除的装备栏或判定区,然后你获得〖活墨〗直到下回合开始。', + xianwang:'贤望', + xianwang_info:'锁定技。若你有被废除的装备栏,则其他角色至你的距离+1,你至其他角色的距离-1;若废除的装备栏数大于2,则改为距离+2/-2。', + guanhai:'管亥', + suoliang:'索粮', + suoliang_info:'每回合限一次。当你对其他角色造成伤害后,你可以选择并展示其的至多X张牌(X为其体力上限且至多为5)。若这些牌中有♥或♣牌,则你获得这些牌;否则你弃置这些牌。', + qinbao:'侵暴', + qinbao_info:'锁定技。当你使用【杀】或普通锦囊牌时,你令所有手牌数不小于你的角色不能响应此牌。', + dc_lvkuanglvxiang:'吕旷吕翔', + dcshuhe:'数合', + dcshuhe_info:'出牌阶段限一次,你可以展示一张手牌。若场上有与此牌点数相同的牌,则你获得这些牌;否则你将此牌交给一名其他角色并获得一枚“爵”。', + dcliehou:'列侯', + dcliehou_info:'锁定技。摸牌阶段开始时,你令额定摸牌数+X;然后此摸牌阶段结束时,你选择一项:⒈弃置X张牌。⒉失去1点体力(X为你的“爵”数+1且至多为5)。', + yinfuren:'尹夫人', + dcyingyu:'媵予', + dcyingyu_info:'准备阶段开始时,你可以展示两名角色的各一张手牌。若这两张牌的花色不同,则你可以令一名角色获得另一名角色的展示牌。', + dcyongbi:'拥嬖', + dcyongbi_info:'限定技。出牌阶段,你可以将所有手牌交给一名其他男性角色。你将〖媵予〗的发动时机改为“准备阶段和结束阶段开始时”。然后若这些牌中包含的花色数:大于1,则你与其本局游戏的手牌上限+2;大于2,则当你或其于本局游戏内受到大于1的伤害时,此伤害-1。', + dc_huangquan:'黄权', + dcquanjian:'劝谏', + dcquanjian_info:'出牌阶段每项各限一次。你可以选择一项流程并选择一名其他角色A:⒈令A对其攻击范围内的另一名角色B造成1点伤害。⒉令A将手牌数调整至体力上限(至多摸至五张),且其本回合内不能使用或打出手牌。然后A选择一项:⒈执行此流程。⒉本回合下次受到的伤害+1。', + dctujue:'途绝', + dctujue_info:'限定技。当你进入濒死状态时,你可以将所有牌交给一名其他角色。然后你回复等量的体力并摸等量的牌。', + chengui:'陈珪', + dcyingtu:'营图', + dcyingtu_info:'每回合限一次。当你的上家/下家于摸牌阶段外获得牌后,你可以获得其一张牌,然后将一张牌交给你的下家/上家。若你给出的牌为装备牌,则其使用之。', + dccongshi:'从势', + dccongshi_info:'一名角色使用的装备牌结算结束后,若其装备区内的牌数为全场最多,则你摸一张牌。', + wanglie:'王烈', + dcchongwang:'崇望', + dcchongwang_info:'其他角色使用基本牌或普通锦囊牌时,若你是本局游戏内上一张被使用的牌的使用者,则你可以选择一项:⒈令其于此牌结算结束后收回此牌对应的所有实体牌;⒉取消此牌的所有目标。', + dchuagui:'化归', + dchuagui_info:'出牌阶段开始时,你可以选择至多X名有牌的其他角色(X为场上每个阵营中最大阵营的人数,且你的选择结果不展示)。这些角色同时选择一项:⒈交给你一张牌,⒉展示一张牌。若这些角色均选择选项二,则你获得所有展示牌。', + gongsundu:'公孙度', + dczhenze:'震泽', + dczhenze_info:'弃牌阶段开始时,你可以选择一项:1.令所有手牌数与体力值大小关系与你不同的角色失去1点体力;2.令所有手牌数和体力值关系与你相同的角色回复1点体力。', + dcanliao:'安辽', + dcanliao_info:'出牌阶段限X次(X为群势力角色数)。你可以重铸一名角色的一张牌。', + dc_yuejiu:'乐就', + dccuijin:'催进', + dccuijin_info:'当你或你攻击范围内的角色使用【杀】时,你可以弃置一张牌,令此【杀】的伤害基数+1。然后当此杀被目标角色抵消或无效或防止伤害后,你摸一张牌,对使用者造成1点伤害。', + panghui:'庞会', + dcyiyong:'异勇', + dcyiyong_info:'每回合限两次。当你对其他角色造成伤害时,若你有牌,你可以与其同时弃置至少一张牌。若你以此法弃置的牌的点数之和:不大于其,你摸X张牌;不小于其,此伤害+1(X为其以此法弃置的牌数)。', + chenjiao:'陈矫', + dcxieshoux:'协守/清严', + dcxieshou:'协守', + dcxieshou_info:'每回合限一次。当一名角色受到伤害后,若你至其的距离不大于2,你可以令你的手牌上限-1,然后其选择一项:1.回复1点体力;2.复原,摸两张牌。', + dcqingyan:'清严', + dcqingyan_info:'每回合限两次。当你成为其他角色使用黑色牌的目标后,若你的手牌数:小于体力值,你可以将手牌补至体力上限;不小于体力值,你可以弃置一张牌令你的手牌上限+1。', + dcqizi:'弃子', + dcqizi_info:'锁定技。你不能对至其的距离大于2且正在进行濒死流程的角色使用【桃】。', + leibo:'雷薄', + dcsilve:'私掠', + dcsilve_info:'游戏开始时,你选择一名其他角色(对其他角色不可见),称为“私掠”角色。然后你获得以下效果:①当“私掠”角色造成伤害后,若你本回合未因此效果得到过受伤角色的牌,你可以获得受伤角色一张牌;②当“私掠”角色受到其他角色造成的伤害后,若伤害来源存活,你须对伤害来源使用一张【杀】(无距离限制),否则你弃置一张手牌。', + dcshuaijie:'衰劫', + dcshuaijie_info:'限定技。出牌阶段,若你的体力值与装备区里的牌数均大于“私掠”角色,或没有角色有“私掠”,你可以减1点体力上限,然后选择一项:1.获得“私掠”角色至多三张牌;2.从牌堆随机获得三张类型各不同的牌。最后将你的“私掠”角色改为你。', + dc_sp_jiaxu:'魏贾诩', + dcjianshu:'间书', + dcjianshu_info:'出牌阶段限一次。你可以将一张黑色手牌交给一名其他角色,并选择另一名其他角色,你令前者与后者拼点。赢的角色随机弃置一张牌,没赢的角色失去1点体力。若有角色因此死亡,你令你〖间书〗于此阶段发动的次数上限+1。', + dcyongdi:'拥嫡', + dcyongdi_info:'限定技。出牌阶段,你可以选择一名男性角色,若其:体力上限最少,其加1点体力上限;体力值最少,其回复1点体力;手牌数最少,其摸X张牌(X为其体力上限且至多为5)。', + liupi:'刘辟', + dcjuying:'踞营', + dcjuying_info:'出牌阶段结束时,若你于此阶段内使用【杀】的次数未达到上限,你可以选择任意项:1.下回合使用【杀】的次数上限+1;2.本回合手牌上限+2;3.摸三张牌。若你选择的项数超过了你的体力值,你弃置X张牌(X为你选择的项数减你的体力值)。', + dc_huanghao:'黄皓', + dcqinqing:'寝情', + dcqinqing_info:'结束阶段,你可以弃置一名攻击范围内包含一号位的其他角色一张牌。然后若其手牌数大于一号位,你摸一张牌。', + dccunwei:'存畏', + dccunwei_info:'锁定技。当你成为其他角色使用锦囊牌的目标后,若你是唯一目标,你摸一张牌;否则你弃置一张牌。', + dc_zhaotongzhaoguang:'赵统赵广', + dcqingren:'青刃', + dcqingren_info:'结束阶段,你可以摸X张牌(X为你本回合发动〖翊赞〗的次数)。', + dclongyuan:'龙渊', + dclongyuan_info:'锁定技。一名角色的回合结束时,若你本局游戏已发动过至少三次〖翊赞〗,你摸两张牌并回复1点体力,修改〖翊赞〗。', + zhenghun:'郑浑', + dcqiangzhi:'强峙', + dcqiangzhi_info:'出牌阶段限一次。你可以弃置你和一名其他角色的共计三张牌。然后若你与其之中有角色因此失去了三张牌,该角色对另一名角色造成1点伤害。', + dcpitian:'辟田', + dcpitian_info:'①当你的牌被弃置后,或当你受到伤害后,你的手牌上限+1。②结束阶段,若你的手牌数小于手牌上限,你可以摸至手牌上限(至多摸五张),然后重置因〖辟田①〗增加的手牌上限。', + furongfuqian:'傅肜傅佥', + dcxuewei:'血卫', + dcxuewei_info:'结束阶段,你可以选择一名体力值不大于你的角色,然后你获得如下效果直到你的下回合开始时:当其受到伤害时,防止此伤害,然后你失去1点体力,你与其各摸一张牌(若该角色为你,则改为你摸一张牌)。', + dcyuguan:'御关', + dcyuguan_info:'一名角色的回合结束时,若你已损失的体力值为全场最多,你可以减1点体力上限,然后令X名角色将手牌摸至体力上限(X为你已损失的体力值)。', + qinlang:'秦朗', + dchaochong:'昊宠', + dchaochong_info:'当你使用牌后,你可以将手牌摸至或弃置至你的手牌上限数(至多摸五张)。然后若你以此法:获得牌,你的手牌上限-1;失去牌,你的手牌上限+1。', + dcjinjin:'矜谨', + dcjinjin_info:'每回合限一次。当你造成或受到伤害后,你可以重置因〖昊宠〗增加或减少的手牌上限,令伤害来源弃置至多X张牌,然后你摸Y张牌(X为你以此法变化的手牌上限且至少为1,Y为X减其以此法弃置的牌数)。', + xianglang:'向朗', + dckanji:'勘集', + dckanji_info:'出牌阶段限两次。你可以展示所有手牌,若花色均不同,你摸两张牌。然后若你的手牌因此包含了四种花色,你跳过下一个弃牌阶段。', + dcqianzheng:'愆正', + dcqianzheng_info:'每回合限两次。当你成为其他角色使用【杀】或普通锦囊牌的目标后,你可以重铸两张牌。若你以此法重铸的牌中没有与指定你为目标的牌类别相同的牌,你于此牌对应的实体牌进入弃牌堆后获得此牌对应的所有实体牌。', + qiaorui:'桥蕤', + dcaishou:'隘守', + dcaishou_tag:'隘', + dcaishou_info:'①结束阶段,你可以摸X张牌,称为“隘”(X为你的体力上限)。②准备阶段,你弃置所有“隘”,若你以此法弃置的牌数大于体力值且你的体力上限小于9,你加1点体力上限。③当你于回合外失去最后一张“隘”后,你减1点体力上限。', + dcsaowei:'扫围', + dcsaowei_info:'当一名其他角色使用【杀】结算结束后,若此牌的目标角色不包含你且均在你的攻击范围内,你可以将一张“隘”当做【杀】对所有目标角色使用。', + yuantanyuanxiyuanshang:'袁谭袁尚袁熙', + dcneifa:'内伐', + dcneifa_info:'出牌阶段开始时,你可以摸三张牌,然后弃置一张牌。若你弃置的牌类型为:基本牌,本阶段你不能使用锦囊牌,且【杀】的使用次数上限+X且可以额外指定一名目标;锦囊牌,本阶段你不能使用基本牌,且使用普通锦囊牌选择目标时可以增加或减少一个目标(X为你发动〖内伐〗弃牌后手牌中因〖内伐〗而不能使用的牌的数量且最多为5。你以此法选择的额外目标均无距离限制)。', + dc_sunziliufang:'孙资刘放', + dcqinshen:'勤慎', + dcqinshen_info:'弃牌阶段结束时,你可以摸X张牌(X为本回合未进入过弃牌堆的花色数)。', + dcweidang:'伪谠', + dcweidang_info:'其他角色的结束阶段,你可以将一张字数为X的牌置于牌堆底,然后获得牌堆里一张字数为X的牌(X为本回合未进入过弃牌堆的花色数)。若你能使用此牌,你使用之。', + mengjie:'孟节', + dcyinlu:'引路', + dcyinlu_info:'①游戏开始时,你令三名角色依次分别获得“乐泉”、“藿溪”、“瘴气”标记(若场上角色数为2则改为令一名其他角色获得其中2枚,你获得剩余标记),然后你获得“芸香”标记并获得1点“芸香”值。②准备阶段/有〖引路〗标记的角色死亡时,你可以移动一名角色的1枚/其的所有〖引路〗标记。', + dcyinlu_lequan:'乐泉', + dcyinlu_lequan_info:'结束阶段,你可以弃置一张♦牌并回复1点体力。', + dcyinlu_huoxi:'藿溪', + dcyinlu_huoxi_info:'结束阶段,你可以弃置一张♥牌并摸两张牌。', + dcyinlu_zhangqi:'瘴气', + dcyinlu_zhangqi_info:'锁定技。结束阶段,你须弃置一张♠牌,否则失去1点体力。', + dcyinlu_yunxiang:'芸香', + dcyinlu_yunxiang_info:'①结束阶段,你可以弃置一张♣牌,获得1点“芸香”值。②当你受到伤害时,你可以扣减所有“芸香”值,减少等量的伤害。', + dcyouqi:'幽栖', + dcyouqi_info:'锁定技。当其他角色因〖引路〗标记弃置牌后,你有一定概率获得此牌。', + dcyouqi_faq:'〖幽栖〗概率
    ', + dcyouqi_faq_info:'当满足〖幽栖〗条件时,系统生成一个随机数X∈[0,1)。若X小于(1.25-0.25Y),你获得此牌(Y为你至该角色的距离)。', + dc_sunhanhua:'孙寒华', + dchuiling:'汇灵', + dchuiling_info:'锁定技。当你使用牌时,若此牌颜色为弃牌堆中数量较少的颜色,你获得1枚“灵”标记。若弃牌堆中:红色牌数大于黑色牌数,你回复1点体力;黑色牌数大于红色牌数,你可以弃置一名其他角色的一张牌。', + dcchongxu:'冲虚', + dcchongxu_info:'限定技。出牌阶段,若“灵”数不小于4,你可以失去〖汇灵〗,增加等同于“灵”数的体力上限,然后获得〖踏寂〗和〖清荒〗。', + dctaji:'踏寂', + dctaji_info:'当你失去手牌后,根据你失去牌的原因执行以下效果:1.使用:你弃置其他角色一张牌;2.打出:你摸一张牌;3.弃置:你回复1点体力;4.其他:你下一次对其他角色造成伤害时,此伤害+1。', + dcqinghuang:'清荒', + dcqinghuang_info:'出牌阶段开始时,你可以减1点体力上限,然后你于本回合发动〖踏寂〗时额外随机执行一种效果。', + dc_huojun:'霍峻', + dcgue:'孤扼', + dcgue_info:'每名其他角色的回合限一次。当你需要使用或打出【杀】或【闪】时,若你有手牌,你可以展示之。若其中【杀】和【闪】的数量之和不超过1,你视为使用或打出此牌。', + dcsigong:'伺攻', + dcsigong_info:'其他角色的回合结束时,若其于本回合内使用牌被响应过,你可以将手牌摸至或弃置至1,视为对其使用一张需使用X张【闪】抵消的【杀】,且此【杀】的伤害基数+1(X为你以此法弃置的牌数且至少为1)。当你以此法造成伤害后,该技能于本轮失效。', + peiyuanshao:'裴元绍', + dcmoyu:'没欲', + dcmoyu_info:'出牌阶段每名角色限一次。你可以获得一名其他角色区域里的一张牌,然后其可以对你使用一张【杀】,且此【杀】伤害基数为X(X为你于本回合发动此技能的次数)。若此【杀】对你造成了伤害,你令此技能于本回合失效。', + zhangchu:'张楚', + dcjizhong:'集众', + dcjizhong_info:'出牌阶段限一次。你可以令一名其他角色摸两张牌,然后其选择一项:1.若其没有“信众”标记,其获得“信众”标记;2.弃置三张手牌。', + dcrihui:'日彗', + dcrihui_info:'每回合限一次。当你使用普通锦囊牌或黑色基本牌结算结束后,若此牌的目标数为1且目标不为你,且其:没有“信众”,则所有有“信众”的角色依次视为对其使用一张与此牌牌名和属性相同的牌;有“信众”,则你可以获得其区域里的一张牌。', + dcguangshi:'光噬', + dcguangshi_info:'锁定技。准备阶段,若所有其他角色均有“信众”,你失去1点体力并摸两张牌。', + dongwan:'董绾', + dcshengdu:'生妒', + dcshengdu_info:'回合开始时,你可以选择一名其他角色。当其于其的下个摸牌阶段获得牌后,你摸等量的牌。', + dcxianjiao:'献绞', + dcxianjiao_info:'出牌阶段限一次。你可以将两张颜色不同的手牌当无距离限制且无任何次数限制的【杀】使用。然后若此【杀】:造成了伤害,所有目标角色失去1点体力;未造成伤害,你对所有目标角色依次发动一次〖生妒〗。', + yuanyin:'袁胤', + dcmoshou:'墨守', + dcmoshou_info:'当你成为其他角色使用的黑色牌的目标后,你可以摸X张牌(X为你本局游戏此前发动过此技能的次数÷3的余数+1)。', + dcyunjiu:'运柩', + dcyunjiu_info:'一名角色死亡后,你可以弃置等同于其因死亡事件的规则而弃置的牌数,将其此次弃置的牌交给一名其他角色。然后你加1点体力上限并回复1点体力。', + gaoxiang:'高翔', + dcchiying:'驰应', + dcchiying_info:'出牌阶段限一次。你可以选择一名体力不大于你的角色,令其攻击范围内的其他角色依次弃置一张牌。然后若你选择的角色不为你,其获得以此法弃置的牌中所有的基本牌。', + zhangkai:'张闿', + dcxiangshu:'相鼠', + dcxiangshu_info:'其他角色的出牌阶段开始时,若其手牌数不小于其体力值,你可以选择一个不大于5的非负整数,然后你弃置一张牌或声明此数字。若如此做,此阶段结束时,若其手牌数与你选择的数字:差值不大于1,你获得其一张牌;相等,你对其造成1点伤害。', + mengyou:'孟优', + dcmanzhi:'蛮智', + dcmanzhi_info:'①准备阶段,你可以选择一名其他角色并选择一项:1.令其交给你两张牌,然后其视为使用一张无距离限制的【杀】;2.获得其区域内至多两张牌,然后交给其等量的牌并摸一张牌。②结束阶段,若你的体力值与本回合准备阶段时的体力值相等,你可以执行你未于本回合执行过的〖蛮智①〗的分支。', + dc_sunchen:'孙綝', + dczigu:'自固', + dczigu_info:'出牌阶段限一次。你可以弃置一张牌,然后获得场上的一张装备牌。若你没有因此获得其他角色的牌,你摸一张牌。', + dczuowei:'作威', + dczuowei_info:'当你于回合内使用牌时,你可以根据你的手牌数执行对应效果:大于X,令此牌不可被响应;等于X,对一名其他角色造成1点伤害;小于X,摸两张牌并令此技能于本回合失效(X为你装备区里牌的数量且至少为1)。', + liuchongluojun:'刘宠骆俊', + dcminze:'悯泽', + dcminze_info:'①出牌阶段每名角色限一次。你可以将至多两张牌名不同的牌交给一名手牌数小于你的角色,若其因此手牌数大于你,〖悯泽①〗于此阶段失效。②结束阶段,你将手牌摸至X张(X为你本回合因〖悯泽①〗失去过的牌的牌名数且至多为5)', + dcjini:'击逆', + dcjini_info:'当你受到伤害后,你可以重铸至多Y张手牌(Y为你的体力上限减本回合你以此法重铸过的牌数)。若你以此法获得了【杀】,你可以对伤害来源使用一张无视距离且不可被响应的【杀】。', + yuechen:'乐綝', + dcporui:'破锐', + dcporui_info:'每轮限一次。其他角色的结束阶段,你可以弃置一张基本牌并选择另一名于此回合内失去过牌的其他角色,你视为对其依次使用X+1张【杀】,然后你交给其X张手牌(X为你的体力值)。', + dcgonghu:'共护', + dcgonghu_info:'锁定技。①当你于回合外失去基本牌后,你于〖破锐〗后增加“若其没有因此受到伤害,你回复1点体力”。②当你于回合外造成或受到伤害后,你删除〖破锐〗中的“,然后你交给其X张手牌”。③当你使用红色基本牌/红色普通锦囊牌时,若你已发动过〖共护①〗和〖共护②〗,则此牌不可被响应/可额外增加一个目标。', + yue_caiwenji:'乐蔡文姬', + dcshuangjia:'霜笳', + dcshuangjia_tag:'胡笳', + dcshuangjia_info:'锁定技。①游戏开始,你将你的手牌标记为“胡笳”。②你的“胡笳”牌不计入手牌上限。③其他角色至你的距离+X(X为你的“胡笳”数且至多为5)。', + dcbeifen:'悲愤', + dcbeifen_info:'锁定技。①当你失去牌后,若这些牌中有“胡笳”牌,你获得与你手牌中“胡笳”牌花色均不同的每种花色的牌各一张。②若你手牌中“胡笳”牌数小于不为“胡笳”牌的牌数,你使用牌无距离和次数限制。', + dc_wuban:'吴班', + dcyouzhan:'诱战', + dcyouzhan_info:'锁定技。当其他角色于你的回合内失去牌后,你摸一张牌,且其获得如下效果:1.其于此回合下一次受到的伤害+1;2.结束阶段,若其于此回合未受到过伤害,其摸X张牌(X为其此回合失去过牌的次数)。', + + sp_baigei:'无双上将', + sp_caizijiaren:'才子佳人', + sp_zhilan:'芝兰玉树', + sp_zongheng:'纵横捭阖', + sp_guixin:'天下归心', + sp_jianghu:'江湖之远', + sp_daihan:'代汉涂高', + sp_taiping:'太平甲子', + sp_yanhan:'匡鼎炎汉', + sp_jishi:'悬壶济世', + sp_raoting:'绕庭之鸦', + sp_yijun:'异军突起', + sp_zhengyin:'正音雅乐', + }, + }; +}); diff --git a/character/mobile.js b/character/mobile.js index 4f7588520..bf517e4a5 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -8,11 +8,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mobile:{ mobile_default:["miheng","taoqian","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding","zhangyì","jiakui","yangbiao","chendeng","dongcheng","yangyi","dengzhi","zhengxuan","sp_sufei","furong","dingyuan","simashi","yanghuiyu","hucheer","gongsunkang","nanhualaoxian","zhouqun","qiaozhou","fuqian","simafu","mayuanyi","yanpu","sunhanhua","sp_maojie","peixiu","sp_jianggan","ruanhui","xin_mamidi","sp_caosong","yangfu","wangjun","sp_pengyang","qianzhao","old_wanglang",'shichangshi'], mobile_yijiang:["yj_zhanghe","yj_zhangliao","yj_xuhuang","yj_ganning",'yj_huangzhong','yj_weiyan'], - mobile_shijizhi:["sp_wangcan","sp_chenzhen","sp_sunshao","sp_xunchen","luotong","sp_duyu","sp_bianfuren","feiyi"], - mobile_shijixin:['wujing','sp_mifuren','sp_xinpi','wangling','wangfuzhaolei','zhouchu','sp_kongrong','sp_yanghu'], - mobile_shijiren:['caizhenji','xiangchong','sp_huaxin','sp_xujing','zhangzhongjing','sp_zhangwen','liuzhang','qiaogong'], - mobile_shijiyong:['db_wenyang','sp_chendong','yuanhuan','sp_zongyu','sp_wangshuang','sunyi','sp_gaolan','sp_huaman'], - mobile_shijiyan:['sp_cuiyan','sp_zhangchangpu','sp_jiangwan','sp_jiangqing','sp_lvfan','sp_huangfusong','sp_zhujun','liuba'], mobile_sunben:["re_sunben"], mobile_standard:["xin_xiahoudun","xin_zhangfei"], mobile_shenhua:["re_pangtong","re_guanqiujian","xin_yuanshao","re_liushan","re_dongzhuo","re_sp_zhugeliang","re_sunjian","re_dengai","re_jiangwei","re_zhurong","re_caiwenji","re_xunyu","re_dianwei","xin_zhoutai","re_yanwen",'re_zhangzhang'], @@ -51,7 +46,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xin_quancong:['male','wu',4,['sbyaoming']], re_xunyu:["male","wei",3,["quhu","rejieming"],['clan:颍川荀氏']], xin_jushou:['male','qun','2/3/3',['xinjianying','shibei']], - liuba:['male','shu',3,['duanbi','tongduo']], re_bulianshi:['female','wu',3,['reanxu','zhuiyi']], re_caiwenji:['female','qun',3,['rebeige','duanchang']], sp_jianggan:['male','wei',3,['spdaoshu','spdaizui']], @@ -60,65 +54,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_wuguotai:['female','wu',3,['reganlu','buyi']], xin_sunxiu:['male','wu',3,['mobileyanzhu','mobilexingxue','zhaofu'],['zhu']], sp_maojie:['male','wei',3,['bingqing','yingfeng']], - sp_zhujun:['male','qun',4,['yangjie','zjjuxiang','houfeng']], - sp_huangfusong:['male','qun',4,['spzhengjun','spshiji','sptaoluan']], yj_huangzhong:['male','qun',4,['spshidi','spyishi','spqishe']], - sp_lvfan:['male','wu',3,['spdiaodu','spdiancai','spyanji']], re_yufan:['male','wu',3,['zhiyan','rezongxuan']], sunhanhua:['female','wu',3,['chongxu','miaojian','shhlianhua']], - sp_jiangqing:['male','wu',4,['spjianyi','spshangyi']], - sp_jiangwan:['male','shu',3,['spzhenting','spjincui']], - sp_zhangchangpu:['female','wei',3,['spdifei','spyanjiao']], - sp_cuiyan:['male','wei',3,['spyajun','spzundi']], - sp_huaman:['female','shu',4,['spxiangzhen','spfangzong','spxizhan']], - sp_gaolan:['male','qun',4,['spjungong','spdengli']], - sunyi:['male','wu',4,['zaoli']], - sp_wangshuang:['male','wei',4,['yiyong','shanxie']], yanpu:['male','qun',3,['huantu','bihuo']], mayuanyi:['male','qun',4,['jibing','wangjing','moucuan']], simafu:['male','wei',3,['xunde','chenjie']], fuqian:['male','shu',4,['jueyong','poxiang']], - sp_zongyu:['male','shu',3,['zhibian','yuyan']], - yuanhuan:['male','wei',3,['qingjue','fengjie']], - sp_chendong:['male','wu',4,['spyilie','spfenming']], xin_caozhen:['male','wei',4,['discretesidi']], xin_sunluban:['female','wu',3,['xinzenhui','xinjiaojin']], qiaozhou:['male','shu',3,['zhiming','xingbu']], - db_wenyang:['male','wei',4,['dbquedi','dbzhuifeng','dbchongjian','dbchoujue'],['doublegroup:wei:wu']], xin_guyong:['male','wu',3,['xinshenxing','xinbingyi']], re_zhonghui:['male','wei',4,['requanji','zili'],['clan:颍川钟氏']], xin_caifuren:['female','qun',3,['xinqieting','xianzhou']], - sp_yanghu:['male','qun',3,['mingfa','rongbei']], - qiaogong:['male','wu',3,['yizhu','luanchou']], - liuzhang:['male','qun',3,['jutu','yaohu','rehuaibi'],['zhu']], - sp_zhangwen:['male','wu',3,['gebo','spsongshu']], - zhangzhongjing:['male','qun',3,['jishi','xinliaoyi','binglun']], xin_zhoucang:['male','shu',4,['mobilezhongyong']], - sp_xujing:['male','shu',3,['boming','ejian']], - sp_huaxin:['male','wei',3,['yuanqing','shuchen']], - xiangchong:['male','shu',4,['guying','muzhen']], - caizhenji:['female','wei',3,['sheyi','tianyin']], ol_yujin:['male','wei',4,['rejieyue']], - sp_kongrong:['male','qun',3,['xinlirang','xinmingshi']], - zhouchu:['male','wu',4,['xianghai','rechuhai']], - wangfuzhaolei:['male','shu',4,['xunyi']], - wangling:['male','wei',4,['xingqi','xinzifu','mibei'],['clan:太原王氏']], zhouqun:['male','shu',3,['tiansuan']], re_zhurong:['female','shu',4,['juxiang','relieren']], re_jiangwei:['male','shu',4,['retiaoxin','zhiji']], - wujing:['male','wu',4,['heji','liubing']], - sp_mifuren:['female','shu',3,['xinguixiu','qingyu']], - sp_xinpi:['male','wei',3,['spyinju','spchijie']], nanhualaoxian:['male','qun',3,['yufeng','tianshu']], - feiyi:['male','shu',3,['mjshengxi','fyjianyu']], - sp_bianfuren:['female','wei',3,['spwanwei','spyuejian']], - sp_duyu:['male','qun',4,['spwuku','spsanchen']], - luotong:['male','wu',4,['qinzheng']], re_handang:['male','wu',4,['regongji','jiefan']], - sp_wangcan:['male','wei',3,['spqiai','spshanxi']], - sp_chenzhen:['male','shu',3,['shameng']], - sp_sunshao:['male','wu',3,['mjdingyi','mjzuici','mjfubi']], - sp_xunchen:['male','qun',3,['mjweipo','mjchenshi','mjmouzhi'],['clan:颍川荀氏']], re_dengai:['male','wei',4,['retuntian','zaoxian']], xin_fuhuanghou:['female','qun',3,['xinzhuikong','xinqiuyuan']], xin_panzhangmazhong:['male','wu',4,['xinduodao','xinanjian']], @@ -224,24 +179,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yanpu:'阎圃,生卒年不详,是益州巴西安汉(今四川省南充市)人。张鲁割据巴、汉,就以阎圃为功曹。东汉末年人物,本为张鲁部下谋士,后随张鲁一同投降曹操,封平乐乡侯。', mayuanyi:'马元义(?—184年6月7日),东汉末年黄巾之乱的组织者之一,是黄巾大方首领。光和六年(183年),马元义奉黄巾军首领张角之命,筹划起事的准备工作。马元义聚集荆州、扬州信徒数万人约定于邺城相会,并收买中常侍封谞、徐奉等为内应,准备于次年(甲子年)三月初五(戊申日)内外同时起事。由于张角弟子济南人唐周的告密,马元义于于中平元年(184年)正月在河内郡山阳县被捕,送往洛阳车裂,同时被杀的还有教众近千人。由于马元义的被杀,迫使张角提前于二月起兵发动叛乱。', simafu:'司马孚(180年-272年4月3日),字叔达。河内郡温县(今河南温县)人。三国曹魏至西晋初年重臣,西晋宗室,东汉京兆尹司马防第三子,晋宣帝司马懿之弟。自曹操时代起,司马孚就任文学掾,而后历仕魏国五代皇帝,累迁至太傅。司马孚在“高平陵事变”之际,协助司马懿控制京师,诛杀曹爽一党。后又督军成功防御吴、蜀的进攻,为司马氏政权的稳固多有功劳。但他性格十分谨慎,自司马懿执掌大权起,便逐渐引退,更未直接参与司马氏废立魏帝的谋划。西晋代魏后,司马孚进拜太宰,封安平王。晋武帝司马炎对他十分尊宠,但他并不以此为荣,至死仍以魏臣自称。泰始八年二月壬辰日(272年4月3日),司马孚去世,年九十三。武帝为其举哀三日,葬礼规格比照东汉东平献王刘苍,赐谥献王。', - yuanhuan:'袁涣,字曜卿,陈郡扶乐(今河南省周口市太康县)人。东汉末年官员,出身陈郡袁氏,为东汉司徒袁滂之子。袁涣早年曾任郡功曹,后被公府征辟,相继被举为高第、秀才。汉末战乱时,袁涣流寓江淮一带,初为袁术所用,后投吕布。建安三年(198年),曹操率兵剿灭了吕布,袁涣又转投曹操,拜沛南部都尉,后又任谏议大夫、郎中令等职,在任上尽心尽责,以敢谏直言称名。袁涣恕思而后行,外表温柔而内心能断,处危难则勇气极大。汉末三国时期,唯有程昱、曹仁、袁涣三人被评价为勇冠贲育。', sunchen:'孙綝(chēn)(231年-259年1月18日),字子通,吴郡富春(今浙江杭州市富阳区)人。三国时期吴国宗室、权臣,昭义中郎将孙静曾孙、定武中郎将孙暠之孙、安民都尉孙绰的儿子。门荫入仕,初任偏将军。太平元年(256年),升任侍中、武卫将军、都督中外诸军事。掌权以后,诛杀大司马滕胤、骠骑将军吕据等重臣,升任大将军,册封永宁县侯。嗜好杀戮,与皇帝孙亮的矛盾激化,最终废黜孙亮,拥立琅琊王孙休即位,累迁丞相、荆州牧。永安元年十二月(259年1月),在左将军张布的协助下,遭到皇帝孙休捕杀,时年二十八岁,削除宗籍,改姓故氏。', qiaozhou:'谯周(201年-270年),字允南,巴西郡西充国县(今四川西充县槐树镇)人。三国时期蜀汉大臣、学者、儒学家、史学家。幼年丧父,少读典籍,精研六经,颇晓天文,成为蜀地大儒之一,门下有陈寿、罗宪等学生。诸葛亮担任益州牧时,授劝学从事。诸葛亮死后,不顾朝令,前往奔丧。后主刘禅册立太子时,授太子仆,迁太子家令、光禄大夫。反对姜维北伐,著《仇国论》,力陈北伐之失。炎兴元年(263年),邓艾攻打成都时期,力劝刘禅投降,“有全国之功”,投降魏国后,受封阳城亭侯,迁骑都尉。泰始六年(270年),授散骑常侍,同年去世,时年七十岁。', gongsunkang:'公孙康(生卒年不详),辽东襄平(今辽宁辽阳)人。东汉末年辽东地区割据军阀,辽东太守公孙度长子(一作庶子)、车骑将军公孙恭之兄。公孙康在其父死后继任辽东太守。建安十二年(207年),擒斩图谋不轨的袁尚、袁熙兄弟,将其首级献予曹操,被拜为左将军,封襄平侯。建安十四年(209年),公孙康大破高句丽,陷其国都,并讨伐韩濊,设置带方郡。死后因二子年幼,由公孙恭继任。曹丕称帝后,被追赠为大司马。', - qiaogong:'桥公,亦作“乔公”,名字不详,是中国汉末三国时期的长者,江东二乔的父亲,三国时期庐江郡皖县(今安徽潜山)人,中国长篇古典名著《三国演义》中称之为“乔国老”。', - liuzhang:'刘璋(生卒年不详),字季玉,江夏竟陵(今湖北省天门市)人。东汉末年宗室、军阀,益州牧刘焉幼子,在父亲刘焉死后继任益州牧。刘璋为人懦弱多疑。汉中张鲁骄纵,不听刘璋号令,于是刘璋杀张鲁母弟,双方成为仇敌,刘璋派庞羲攻击张鲁,战败。后益州内乱,平定后,又有曹操将前来袭击的消息。在内外交逼之下,刘璋听信手下张松、法正之言,迎接刘备入益州,想借刘备之力,抵抗曹操。不料此举乃引狼入室,刘备反手攻击刘璋,又有法正为内应,进至成都。成都吏民都想抵抗刘备,但刘璋为百姓计而开城出降,群下莫不流涕。刘备占据成都后,刘璋以振威将军的身份被迁往荆州居住,关羽失荆州后,刘璋归属东吴,被孙权任命为益州牧,不久后去世,卒年不详。', - zhangzhongjing:'张仲景(约公元150~154年—约公元215~219年),名机,字仲景,南阳涅阳县(今河南省邓州市穰东镇张寨村)人。东汉末年著名医学家,被后人尊称为“医圣”。张仲景广泛收集医方,写出了传世巨著《伤寒杂病论》。它确立的“辨证论治”原则,是中医临床的基本原则,是中医的灵魂所在。在方剂学方面,《伤寒杂病论》也做出了巨大贡献,创造了很多剂型,记载了大量有效的方剂。其所确立的六经辨证的治疗原则,受到历代医学家的推崇。这是中国第一部从理论到实践、确立辨证论治法则的医学专著,是中国医学史上影响最大的著作之一,是后学者研习中医必备的经典著作,广泛受到医学生和临床大夫的重视。', - xiangchong:'向宠(?~240年),左将军向朗之侄,蜀汉重要将领。具有谦和公允的性格品行,对军事通晓畅达,被汉昭烈帝刘备称赞。刘备时,历任牙门将(类似于主将帐下的偏将),诸葛亮北伐时,以向宠为中领军,封都亭侯。诸葛亮北行汉中前,特意在《出师表》中向刘禅推荐向宠。延熙三年(公元240年),南征汉嘉(今四川省雅安市)蛮夷时,遇害,尸体被其部下夺回,送回成都安葬。', - caizhenji:'蔡贞姬,生卒年不详,汉末大儒蔡邕之女。其父蔡邕精于天文数理,妙解音律,是曹操的挚友和老师。生在书香门第的家庭的蔡贞姬,自小耳濡目染,精通书法与音律。后来,其父为避宦竖迫害,便随父亲来泰山依付羊衜一族,在羊衜的元配孔氏死后,便在父亲的做主下与之成亲。夫妻二人婚后生有两子一女:羊承、羊徽瑜、羊祜。在与羊衜成亲之前,羊衜和孔氏生有一子羊发。后来羊发、羊承同时生病,蔡贞姬知道不能两全,就专心照顾羊发,最后羊发痊愈,羊承病死。', - zhouchu:'周处(236—297年),字子隐,吴郡阳羡(今江苏宜兴)人。西晋大臣、将领,东吴鄱阳太守周鲂之子。少时纵情肆欲,为祸乡里。后来改过自新,拜访名人陆机和陆云,浪子回头,发奋读书,留下“周处除三害”的传说,拜东观左丞,迁无难都督,功业胜过父亲。吴国灭亡后,出仕西晋,拜新平太守,转广汉太守,治境有方。入为散骑常侍,迁御史中丞,刚正不阿。得罪梁孝王司马肜。元康七年,出任建威将军,前往关中,讨伐氐羌齐万年叛乱,遇害于沙场。追赠平西将军,谥号为孝。', - wangfuzhaolei:'王甫(?—222年),字国山,广汉郪(今四川三台县)人,三国时期蜀汉重臣。刘璋时,为益州书佐,之后归降刘备,先后担任绵竹令、荆州议曹从事,并在夷陵之战中阵亡。其子王祐,官至尚书右选郎。赵累,蜀汉大将关羽部下都督。后来吴将吕蒙袭取荆州,赵累被吴将潘璋等在临沮擒获。', - wangling:'王凌(172年~251年6月15日),字彦云,太原郡祁县(今山西省祁县)人,三国时期曹魏将领,东汉司徒王允之侄。王凌出身太原王氏祁县房。举孝廉出身,授发干县令,迁中山太守。颇有政绩,迁司空(曹操)掾属。魏文帝曹丕即位,拜散骑常侍、兖州刺史。参加洞口之战,跟从张辽击败吴将吕范,加号建武将军,封宜城亭侯。太和二年(228年),王凌参与石亭之战,跟从曹休征伐东吴,力挽狂澜,历任扬豫二州刺史,治境有方。齐王曹芳继位,拜征东将军,联合孙礼击败吴将全琮,进封南乡侯,授车骑将军、仪同三司,正始九年(248年),代高柔为司空。嘉平元年(249年),代蒋济为太尉。嘉平三年(251年),不满太傅司马懿专擅朝政,联合兖州刺史令狐愚谋立楚王曹彪为帝,事泄自尽,时年八十岁,夷灭三族。', zhouqun:'周群(生卒年不详),字仲直,巴西阆中(今四川阆中)人。周群年少时随父周舒学习占验天算之术。后来刘璋聘请周群为师友从事,其预言大多得以应验。刘备割据益州,任命周群为儒林校尉。曾劝说刘备攻汉中必定不利,事后得到应验,被举荐为茂才。', dongzhao:'董昭(156年-236年7月4日),字公仁,济阴定陶(今山东省菏泽市定陶区)人。东汉末年曹魏谋士、重臣、开国元勋。董昭年轻时被举为孝廉,后担任袁绍帐下参军。多有战功,但是袁绍听信谗言,董昭不得已离开袁绍投奔张杨。张杨率军迎接汉献帝时,董昭随行,并拜为议郎。后与曹操在洛阳相见,又建议曹操将汉献帝迎接到许昌。董昭自此成为曹操的谋士。建安年间(198年)历任河南尹、冀州牧、徐州牧、魏郡太守等职,多有功劳,深受曹操器重。曹操受封魏公、魏王的谋划都是出自董昭之手。曹丕继魏王位后,董昭任将作大匠。曹丕称帝后,升任大鸿胪。此后先后担任侍中、太常、光禄大夫、太仆等重要职位。魏明帝曹叡即位后转任卫尉。太和六年(232年)升任司徒。青龙四年(236年)卒,时年八十一,谥曰定。', - wujing:'吴景,本吴郡吴县(今江苏苏州)人,后迁居吴郡钱塘(今浙江杭州),孙坚妻子吴夫人(武烈皇后)之弟,孙策和孙权的舅舅,东汉末年将领。吴景因追随孙坚征伐有功,被任命为骑都尉。袁术上表举荐吴景兼任丹杨太守,讨伐前任太守周昕,占据丹杨。后遭扬州刺史刘繇逼迫,再度依附袁术,袁术任用他为督军中郎将,与孙贲共同进击樊能等人。又在秣陵攻打笮融、薛礼。袁术与刘备争夺徐州时,任吴景为广陵太守。建安二年(197年),吴景放弃广陵东归孙策,孙策任他为丹杨太守。朝廷使者吴景为扬武将军,郡守之职照旧。建安八年(203年),吴景死于任上。', nanhualaoxian:'南华老仙,是古典小说《三国演义》中的虚拟人物。其原型来自道教典籍中对庄子的封号,又称“南华仙人”、“南华真人”等。在古典小说《三国演义》通行本的第一回中,描述了南华老仙将《太平要术》赠送给张角的情节。', - feiyi:'费祎(?~253年2月),字文伟,江夏鄳县(今河南省罗山县)人,三国时期蜀汉名臣,与诸葛亮、蒋琬、董允并称为蜀汉四相。深得诸葛亮器重,屡次出使东吴,孙权、诸葛恪、羊茞等人以辞锋刁难,而费祎据理以答,辞义兼备,始终不为所屈。孙权非常惊异于他的才能,加以礼遇。北伐时为中护军,又转为司马。当时魏延与杨仪不和,经常争论,费祎常为二人谏喻,两相匡护,以尽其用。诸葛亮死后,初为后军师,再为尚书令,官至大将军,封成乡侯。费祎主政时,与姜维北伐的主张相左,执行休养生息的政策,为蜀汉的发展尽心竭力。费祎性格谦恭真诚,颇为廉洁,家无余财。后为魏降将郭循(一作郭脩)行刺身死。葬于今广元市昭化古城城西。', - luotong:'骆统(193年-228年),字公绪。会稽郡乌伤县(今浙江义乌)人。东汉末年至三国时期吴国将领、学者,陈国相骆俊之子。骆统二十岁时已任乌程国相,任内有政绩,使得国中民户过万。又迁为功曹,行骑都尉。曾劝孙权尊贤纳士,省役息民。后出任为建忠中郎将。将军凌统逝世后,统领其部曲。因战功迁偏将军,封新阳亭侯,任濡须督。黄武七年(228年),骆统去世,年仅三十六岁。有集十卷,今已佚。', chenzhen:'陈震(?—公元235年),字孝起。荆州南阳郡(今河南南阳)人。三国时期蜀汉官员。刘备领荆州牧时,辟陈震为从事。后随刘备入蜀,为蜀郡北部都尉、汶山太守、犍为太守。建兴三年(225年),拜尚书,迁尚书令。建兴七年(229年),孙权称帝。蜀汉以陈震为卫尉,前往祝贺,与孙权开坛歃盟,交分天下。还蜀,封城阳亭侯。建兴十三年(235年),卒。', nanhualaoxian:'南华老仙,其原型来自道教典籍中对庄子的封号,又称“南华仙人”、“南华真人”等。在古典小说《三国演义》通行本的第一回中,描述了南华老仙将《太平要术》赠送给张角的情节。', hucheer:'胡车儿(生卒年不详),东汉末年武将,初从张绣,为其心腹猛将,勇冠三军,与贾诩交情甚佳。宛城大战后,张绣投降曹操,曹操爱胡车儿之骁勇,手以黄金与之。后因曹操私纳张绣亡叔张济的遗孀邹氏,张绣深感其辱,欲杀曹操,与贾诩商议后决心反曹。《三国演义》中,作者考虑到典韦的勇猛,便增加了令胡车儿盗走典韦的双戟的情节。最终典韦、曹昂(曹操长子)、曹安民(曹操侄子)皆死于此次战斗。野史说胡车儿跟随曹操征战,被赵云在长坂坡上红枪挑死。', @@ -264,207 +207,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_jianggan:'#b对决限定武将', }, card:{ - binglinchengxiax:{ - enable:true, - type:'trick', - derivation:'sp_xunchen', - fullskin:true, - filterTarget:lib.filter.notMe, - content:function(){ - 'step 0' - if(!player.isIn()||!target.isIn()){ - event.finish(); - return; - } - event.showCards=get.cards(4); - game.cardsGotoOrdering(event.showCards); - player.showCards(event.showCards); - 'step 1' - if(player.isIn()&&target.isIn()&&event.showCards.length){ - for(var i of event.showCards){ - if(i.name=='sha'&&player.canUse(i,target,false)){ - player.useCard(i,target,false); - event.showCards.remove(i); - event.redo(); - break; - } - } - } - 'step 2' - if(event.showCards.length){ - while(event.showCards.length) ui.cardPile.insertBefore(event.showCards.pop().fix(),ui.cardPile.firstChild); - game.updateRoundNumber(); - } - }, - ai:{ - basic:{ - useful:4, - value:3, - }, - order:4, - result:{ - target:function(player,target,card,isLink){ - if(get.effect(target,{name:'sha'},player,target)==0) return 0; - return -2.5; - }, - }, - tag:{ - respond:1, - respondShan:1, - damage:1, - } - } - }, - tiaojiyanmei:{ - enable:true, - type:'trick', - derivation:'feiyi', - fullskin:true, - filterTarget:function(card,player,target){ - var targets=[]; - if(ui.selected.targets.length) targets.addArray(ui.selected.targets); - var evt=_status.event.getParent('useCard'); - if(evt&&evt.card==card) targets.addArray(evt.targets); - if(targets.length){ - var hs=target.countCards('h'); - for(var i of targets){ - if(i.countCards('h')!=hs) return true; - } - return false; - } - return true; - }, - chongzhu:true, - selectTarget:2, - postAi:()=>true, - contentBefore:function(){ - if(!targets.length) return; - var map={}; - event.getParent().customArgs.default.tiaojiyanmei_map=map; - var average=0; - for(var target of targets){ - var hs=target.countCards('h'); - map[target.playerid]=hs; - average+=hs; - } - map.average=(average/targets.length); - }, - content:function(){ - var map=event.tiaojiyanmei_map,num1=map.average,num2=map[target.playerid]; - if(typeof num2!='number') num2=target.countCards('h'); - if(num2>num1) target.chooseToDiscard('he',true); - else if(num2num1){ - if(target.countCards('e',function(card){ - return get.value(card)<=0; - })) return 1; - return -1; - } - if(num2average){ - if(target.countCards('e',function(card){ - return get.value(card)<=0; - })) return 1; - return -0.5; - } - return 0; - } - average/=targets.length; - if(thaverage){ - if(target.countCards('e',function(card){ - return get.value(card)<=0; - })) return 1; - return -1; - } - return 0; - }, - }, - }, - }, ly_piliche:{ fullskin:true, //vanish:true, @@ -3587,99 +3329,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ draw:{inherit:'jianying',audio:'xinjianying'}, }, }, - //刘巴 - duanbi:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - var num1=0,num2=0; - var count=game.countPlayer(function(current){ - num1+=current.countCards('h'); - num2++; - return current!=player; - }); - return count>0&&num1>num2*2; - }, - filterTarget:true, - selectTarget:-1, - multitarget:true, - multiline:true, - content:function(){ - 'step 0' - event.num=0; - event.cards=[]; - event.targets.sortBySeat(); - event.targets.remove(player); - 'step 1' - var target=targets[num]; - var num=Math.min(3,Math.floor(target.countCards('h')/2)); - if(num>0) target.chooseToDiscard('h',true,num); - else event._result={bool:false}; - 'step 2' - if(result.bool&&Array.isArray(result.cards)) event.cards.addArray(result.cards); - event.num++; - if(event.num3?'随机获得三':('获得'+get.cnNumber(event.cards.length)))+'张被弃置的牌?').set('ai',function(target){ - var player=_status.event.player,att=get.attitude(player,target); - if(target.hasSkillTag('nogain')) att/=10; - if(target.hasJudge('lebu')) att/=4; - return att*Math.sqrt(Math.max(1,5-target.countCards('h'))); - }); - 'step 4' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'fire'); - target.gain(cards.randomGets(3),'gain2'); - } - }, - ai:{ - order:10, - result:{ - target:function(player,target){ - if(player==target) return 3; - return -Math.min(3,Math.floor(target.countCards('h')/2)); - }, - }, - }, - }, - tongduo:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - direct:true, - usable:1, - filter:function(event,player){ - return player!=event.player&&event.targets.length==1&&game.hasPlayer(function(current){ - return current.countCards('he')>0; - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('tongduo'),'令一名角色重铸一张牌',function(card,player,target){ - return target.countCards('he')>0; - }).set('ai',function(target){ - return get.attitude(_status.event.player,target)*Math.min(3,Math.floor(target.countCards('h')/2)); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('tongduo',target); - } - else event.finish(); - 'step 2' - if(target.countCards('he')==0) event.finish(); - else target.chooseCard('he',true,'请重铸一张牌'); - 'step 3' - target.loseToDiscardpile(result.cards); - target.draw(); - }, - }, //步练师 reanxu:{ audio:2, @@ -4254,247 +3903,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //朱儁 - yangjie:{ - audio:2, - group:['yangjie_add'], - enable:'phaseUse', - prompt:'摸一张牌并与一名其他角色进行拼点', - usable:1, - filter:function(event,player){ - return !player.hasSkillTag('noCompareSource'); - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0&& - !target.hasSkillTag('noCompareTarget'); - }, - content:function(){ - 'step 0' - player.draw(); - 'step 1' - if(player.canCompare(target)) player.chooseToCompare(target).set('small',true); - else event.finish(); - 'step 2' - if(!result.bool){ - var cards=[result.player,result.target].filterInD('d'); - if(!cards.length||!game.hasPlayer((current)=>current!=player&¤t!=target)) event.finish(); - else{ - event.cards=cards; - player.chooseTarget('请选择一名角色','令其获得'+get.translation(cards)+',且视为对'+get.translation(target)+'使用一张火【杀】',function(card,player,target){ - return target!=player&&target!=_status.event.getParent().target; - }).set('ai',function(target){ - var player=_status.event.player,cards=_status.event.getParent().cards,target2=_status.event.getParent().target; - var val=get.value(cards,target)*get.attitude(player,target); - if(val<=0) return 0; - return val+target.canUse({name:'sha',nature:'fire',isCard:true},target2,false)?get.effect(target2,{name:'sha',nature:'fire',isCard:true},target,player):0; - }); - } - } - else event.finish(); - 'step 3' - if(result.bool){ - var source=result.targets[0]; - event.source=source; - player.line(source); - source.gain(cards,'gain2'); - } - else event.finish(); - 'step 4' - var card={name:'sha',nature:'fire',isCard:true}; - if(target.isIn()&&source.isIn()&&source.canUse(card,target,false)) source.useCard(card,target,false); - }, - subSkill:{ - add:{ - trigger:{player:'compare'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.getParent().name=='yangjie'&&event.num1>1&&player.isDamaged(); - }, - content:function(){ - var num=player.getDamagedHp(); - game.log(player,'的拼点牌点数-',num); - trigger.num1=Math.max(1,trigger.num1-num); - } - }, - }, - ai:{ - order:3, - result:{target:-1.5}, - }, - }, - zjjuxiang:{ - audio:2, - trigger:{global:'dyingAfter'}, - logTarget:'player', - limited:true, - skillAnimation:true, - animationColor:'thunder', - filter:function(event,player){ - return event.player!=player&&event.player.isAlive(); - }, - check:function(event,player){ - return get.damageEffect(event.player,player,player)>0; - }, - content:function(){ - 'step 0' - player.awakenSkill('zjjuxiang'); - trigger.player.damage(); - 'step 1' - if(trigger.player.maxHp>0) player.draw(trigger.player.maxHp); - }, - ai:{expose:10}, - }, - houfeng:{ - audio:3, - trigger:{global:'phaseUseBegin'}, - logTarget:'player', - round:1, - filter:(event,player)=>player.inRange(event.player), - check:function(event,player){ - var att=get.attitude(player,event.player); - return att>0; - }, - content:function(){ - 'step 0' - player.chooseButton(['选择'+get.translation(trigger.player)+'要进行的整肃类型',[['zhengsu_leijin','zhengsu_bianzhen','zhengsu_mingzhi'],'vcard']],true).set('ai',()=>Math.random()); - 'step 1' - if(result.bool){ - var name=result.links[0][2],target=trigger.player; - target.addTempSkill('zhengsu',{player:['phaseDiscardAfter','phaseAfter']}); - target.addTempSkill(name,{player:['phaseDiscardAfter','phaseAfter']}); - target.popup(name,'thunder'); - player.addTempSkill('houfeng_share'); - game.delayx(); - } - }, - subSkill:{ - share:{ - trigger:{global:['drawAfter','recoverAfter']}, - forced:true, - popup:false, - charlotte:true, - filter:function(event,player){ - return event.getParent(2).name=='zhengsu'; - }, - content:function(){ - player.chooseDrawRecover(2,true); - }, - }, - }, - }, - //手杀皇甫嵩 - spzhengjun:{ - audio:3, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return !player.hasSkill('zhengsu'); - }, - content:function(){ - 'step 0' - player.chooseButton([get.prompt('spzhengjun'),[['zhengsu_leijin','zhengsu_bianzhen','zhengsu_mingzhi'],'vcard']]).set('ai',()=>Math.random()); - 'step 1' - if(result.bool){ - player.logSkill('spzhengjun',player); - var name=result.links[0][2]; - player.addTempSkill('zhengsu',{player:['phaseDiscardAfter','phaseAfter']}); - player.addTempSkill(name,{player:['phaseDiscardAfter','phaseAfter']}); - player.popup(name,'thunder'); - game.delayx(); - } - }, - group:'spzhengjun_share', - subSkill:{ - share:{ - trigger:{player:['drawAfter','recoverAfter']}, - direct:true, - filter:function(event,player){ - return event.getParent(2).name=='zhengsu'; - }, - content:function(){ - 'step 0' - player.chooseTarget('整军:是否令一名其他角色也回复1点体力或摸两张牌?',lib.filter.notMe).set('ai',function(target){ - var player=_status.event.player; - return Math.max(get.effect(target,{name:'wuzhong'},target,player),get.recoverEffect(target,target,player)); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('spzhengjun',target); - target.chooseDrawRecover(2,true); - } - }, - }, - }, - }, - spshiji:{ - audio:2, - trigger:{source:'damageBegin2'}, - logTarget:'player', - filter:function(event,player){ - return player!=event.player&&lib.linked.contains(event.nature)&&event.player.countCards('h')>0&&!player.isMaxHandcard(true); - }, - check:function(event,player){ - return get.attitude(player,event.player)<=0; - }, - content:function(){ - var target=trigger.player; - player.viewHandcards(target); - var hs=target.getCards('h',{color:'red'}); - if(hs.length){ - target.discard(hs); - player.draw(hs.length); - } - }, - }, - sptaoluan:{ - audio:2, - trigger:{global:'judgeFixing'}, - usable:1, - filter:function(event,player){ - return event.result&&event.result.suit=='spade'; - }, - check:function(event,player){ - return event.result.judge*get.attitude(player,event.player)<=0; - }, - content:function(){ - 'step 0' - var evt=trigger.getParent(); - if(evt.name=='phaseJudge') evt.excluded=true; - else{ - evt.finish(); - evt._triggered=null; - var nexts=trigger.next.slice(); - for(var next of nexts){ - if(next.name=='judgeCallback') trigger.next.remove(next); - } - var evts=game.getGlobalHistory('cardMove',function(evt){ - return evt.getParent(2)==trigger.getParent(); - }); - var cards=[]; - for(var i=evts.length-1;i>=0;i--){ - var evt=evts[i]; - for(var card of evt.cards){ - if(get.position(card,true)=='o') cards.push(card); - } - } - trigger.orderingCards.addArray(cards); - } - var list=[]; - if(get.position(trigger.result.card)=='d') list.push(0); - if(trigger.player.isIn()&&player.canUse({name:'sha',nature:'fire',isCard:true},trigger.player,false)) list.push(1); - if(list.length==2) player.chooseControl().set('choiceList',[ - '获得'+get.translation(trigger.result.card), - '视为对'+get.translation(trigger.player)+'使用一张火【杀】', - ]).set('choice',(get.effect(trigger.player,{name:'sha'},player,player)>0)?1:0); - else if(list.length==1) event._result={index:list[0]}; - else event.finish(); - 'step 1' - if(result.index==0) player.gain(trigger.result.card,'gain2'); - else player.useCard({name:'sha',nature:'fire',isCard:true},trigger.player,false) - }, - }, //猩黄忠 spshidi:{ audio:2, @@ -4589,141 +3997,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //吕范 - spdiaodu:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('spdiaodu'),'令一名角色摸一张牌,然后移动其装备区内的一张牌').set('ai',function(target){ - var player=_status.event.player,att=get.attitude(player,target); - if(att>0){ - if(target.hasCard(function(card){ - if(get.value(card,target)<=0&&game.hasPlayer(function(current){ - return current!=target&¤t.isEmpty(get.subtype(card,false))&&get.effect(current,card,player,player)>0; - })) return true; - return false; - },'e')) return 2*att; - if(!target.hasCard(function(card){ - var sub=get.subtype(card,false); - return game.hasPlayer(function(current){ - return current!=target&¤t.isEmpty(sub); - }) - },'e')) return 1; - } - else if(att<0){ - if(target.hasCard(function(card){ - if(get.value(card,target)>=4.5&&game.hasPlayer(function(current){ - return current!=target&¤t.isEmpty(get.subtype(card,false))&&get.effect(current,card,player,player)>0; - })) return true; - return false; - },'e')) return -att; - } - return 0; - }) - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('spdiaodu',target); - target.draw(); - } - else event.finish(); - 'step 2' - var es=target.getCards('e',function(card){ - var sub=get.subtype(card,false); - return game.hasPlayer(function(current){ - return current!=target&¤t.isEmpty(sub); - }) - }); - if(es.length){ - if(es.length==1) event._result={bool:true,links:es}; - else player.chooseButton(['移动'+get.translation(target)+'的一张装备牌',es],true).set('ai',function(button){ - var player=_status.event.player,target=_status.event.getParent().target,card=button.link; - if(game.hasPlayer(function(current){ - return current!=target&¤t.isEmpty(get.subtype(card,false))&&get.effect(current,card,player,player)>0; - })) return -get.value(card,target)*get.attitude(player,target); - return 0; - }); - } - else event.finish(); - 'step 3' - if(result.bool){ - event.card=result.links[0]; - player.chooseTarget(true,'选择'+get.translation(event.card)+'的移动目标',function(card,player,target){ - return target.isEmpty(_status.event.subtype); - }).set('subtype',get.subtype(event.card)).set('ai',function(target){ - var evt=_status.event; - return get.effect(target,evt.getParent().card,evt.player,evt.player); - }); - } - else event.finish(); - 'step 4' - if(result.bool){ - var target2=result.targets[0]; - target.line(target2); - target.$give(card,target2); - game.delay(0.5); - target2.equip(card); - } - }, - }, - spdiancai:{ - audio:2, - trigger:{global:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return player!=event.player&&player.hasHistory('lose',function(evt){ - return evt.hs&&evt.hs.length>0; - }); - }, - content:function(){ - 'step 0' - var num=0; - player.getHistory('lose',function(evt){ - if(evt.hs) num+=evt.hs.length; - }); - num=Math.min(num,game.countPlayer()); - player.chooseTarget(get.prompt('spdiancai'),[1,num],'令至多'+get.cnNumber(num)+'名角色各摸一张牌').set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var targets=result.targets.sortBySeat(trigger.player); - player.logSkill('spdiancai',targets); - if(targets.length==1){ - targets[0].draw(); - event.finish(); - } - else game.asyncDraw(targets); - } - else event.finish(); - 'step 2' - game.delayx(); - }, - }, - spyanji:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return !player.hasSkill('zhengsu'); - }, - content:function(){ - 'step 0' - player.chooseButton([get.prompt('spyanji'),[['zhengsu_leijin','zhengsu_bianzhen','zhengsu_mingzhi'],'vcard']]); - 'step 1' - if(result.bool){ - player.logSkill('spyanji',player); - var name=result.links[0][2]; - player.addTempSkill('zhengsu',{player:'phaseDiscardAfter'}); - player.addTempSkill(name,{player:'phaseDiscardAfter'}); - player.popup(name,'thunder'); - game.delayx(); - } - }, - }, //虞翻 rezongxuan:{ inherit:'zongxuan', @@ -5018,788 +4291,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //蒋钦 - spjianyi:{ - audio:2, - trigger:{global:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return player!=event.player&&game.getGlobalHistory('cardMove',function(evt){ - if(evt.name!='lose'||evt.type!='discard') return false; - for(var i of evt.cards){ - if(get.subtype(i,false)=='equip2'&&get.position(i,true)=='d') return true; - } - return false; - }).length>0; - }, - content:function(){ - 'step 0' - var cards=[]; - game.getGlobalHistory('cardMove',function(evt){ - if(evt.name!='lose'||evt.type!='discard') return false; - for(var i of evt.cards){ - if(get.subtype(i,false)=='equip2'&&get.position(i,true)=='d') cards.push(i); - } - }); - player.chooseButton(['俭衣:获得一张防具牌',cards],true).set('ai',function(button){ - return get.value(button.link,_status.event.player); - }); - 'step 1' - if(result.bool) player.gain(result.links,'gain2'); - }, - }, - spshangyi:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he')>0&&game.hasPlayer((current)=>lib.skill.spshangyi.filterTarget(null,player,current)); - }, - filterCard:true, - position:'he', - check:function(card){ - return 6-get.value(card); - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - content:function(){ - target.viewHandcards(player); - player.gainPlayerCard(target,'h',true,'visible'); - }, - ai:{ - order:6, - result:{ - player:0.5, - target:function(player,target){ - if(target.hasSkillTag('noh')) return 0; - return -1; - }, - }, - }, - }, - //蒋琬 - spzhenting:{ - audio:2, - trigger:{global:'useCardToTarget'}, - usable:1, - filter:function(event,player){ - return (event.card.name=='sha'||get.type(event.card,false)=='delay')&& - event.player!=player&&!event.targets.contains(player)&&player.inRange(event.target); - }, - logTarget:'target', - check:function(event,player){ - var target=event.target,source=event.player; - var eff1=get.effect(target,event.card,source,player); - if(eff1>=0) return false; - var eff2=get.effect(player,event.card,source,player); - if(eff2>=0) return true; - if(eff1) - if(event.card.name=='sha'){ - if(player.hasShan()) return true; - if(eff1>eff2) return false; - if(player.hp>2) return true; - if(player.hp==2) return eff2>eff1/3; - return false; - } - if(event.card.name=='shandian'||event.card.name=='bingliang') return true; - if(event.card.name=='lebu') return !player.needsToDiscard()&&target.needsToDiscard(); - return false; - }, - content:function(){ - 'step 0' - var target=trigger.target,evt=trigger.getParent(); - evt.triggeredTargets2.remove(target); - evt.targets.remove(target); - evt.triggeredTargets2.add(player); - evt.targets.add(player); - game.log(trigger.card,'的目标被改为了',player); - trigger.untrigger(); - 'step 1' - if(!trigger.player.countDiscardableCards(player,'h')) event._result={index:0}; - else player.chooseControl().set('choiceList',[ - '摸一张牌', - '弃置'+get.translation(trigger.player)+'的一张手牌', - ]); - 'step 2' - if(result.index==0) player.draw(); - else{ - player.line(trigger.player,'fire'); - player.discardPlayerCard(trigger.player,true,'h'); - } - }, - ai:{ - threaten:1.4, - }, - }, - spjincui:{ - audio:2, - enable:'phaseUse', - usable:1, - limited:true, - skillAnimation:true, - animationColor:'orange', - filterTarget:lib.filter.notMe, - content:function(){ - 'step 0' - player.awakenSkill('spjincui'); - game.broadcastAll(function(target1,target2){ - game.swapSeat(target1,target2); - },player,target); - 'step 1' - if(player.hp>0) player.loseHp(player.hp); - }, - ai:{ - order:5, - result:{ - player:function(player,target){ - if(player.hasUnknown()) return 0; - if(!player.countCards('h',{name:['tao','jiu']})) return 0; - var num=0,current=player.next; - while(true){ - num-=get.sgn(get.attitude(player,current)); - if(current==target) break; - current=current.next; - } - while(true){ - if(current==player) break; - num+=get.sgn(get.attitude(player,current))*1.1; - current=current.next; - } - if(nummap[i]); - list.push('cancel2'); - return list; - }, - check:function(event,player){ - var map={},hs=player.getCards('h'),min=Infinity,min_suit=null; - for(var i of hs){ - var suit=get.suit(i,player); - if(!map[suit]) map[suit]=0; - map[suit]+=get.value(i); - } - for(var i in map){ - if(map[i]5||get.value(ui.selected.cards,player)>5) return 0; - return get.damageEffect(target,player,target); - }, - }, - }, - } - }, - prompt:()=>'请选择【严教】的目标', - }, - subSkill:{ - draw:{ - onremove:true, - trigger:{player:'phaseBegin'}, - forced:true, - charlotte:true, - content:function(){ - player.draw(player.countMark('spyanjiao_draw')); - player.removeSkill('spyanjiao_draw'); - }, - mark:true, - intro:{content:'下回合开始时摸#张牌'}, - }, - backup:{audio:'spyanjiao'}, - }, - ai:{ - order:1, - result:{player:1}, - }, - }, - //崔琰 - spyajun:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - var hs=player.getCards('h'); - return hs.length>0&&!player.hasSkillTag('noCompareSource')&&player.hasHistory('gain',function(evt){ - for(var i of evt.cards){ - if(hs.contains(i)) return true; - } - return false; - })&&game.hasPlayer(function(current){ - return current!=player&&player.canCompare(current); - }); - }, - content:function(){ - 'step 0' - var cards=[],hs=player.getCards('h'); - player.getHistory('gain',function(evt){ - cards.addArray(evt.cards); - }); - cards=cards.filter(function(i){ - return hs.contains(i); - }); - player.chooseCardTarget({ - prompt:get.prompt('spyajun'), - prompt2:'操作提示:选择一张本回合新获得的牌作为拼点牌,然后选择一名拼点目标', - cards:cards, - filterCard:function(card){ - return _status.event.cards.contains(card); - }, - filterTarget:function(card,player,target){ - return player.canCompare(target); - }, - ai1:function(card){ - return get.number(card)-get.value(card); - }, - ai2:function(target){ - return -get.attitude(_status.event.player,target)*Math.sqrt(5-Math.min(4,target.countCards('h')))*(target.hasSkillTag('noh')?0.5:1); - }, - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('spyajun',target); - var next=player.chooseToCompare(target); - if(!next.fixedResult) next.fixedResult={}; - next.fixedResult[player.playerid]=result.cards[0]; - } - else event.finish(); - 'step 2' - if(result.bool){ - var cards=[result.player,result.target].filterInD('d'); - if(cards.length){ - player.chooseButton(['是否将一张牌置于牌堆顶?',cards]).set('ai',function(button){ - if(get.color(button.link)=='black') return 1; - return 0; - }); - } - else event.finish(); - } - else{ - player.addMark('spyajun_less',1,false); - player.addTempSkill('spyajun_less'); - event.finish(); - } - 'step 3' - if(result.bool){ - var card=result.links[0]; - card.fix(); - ui.cardPile.insertBefore(card,ui.cardPile.firstChild); - game.updateRoundNumber(); - game.log(player,'将',card,'置于牌堆顶'); - } - }, - group:'spyajun_draw', - subSkill:{ - draw:{ - audio:'spyajun', - trigger:{player:'phaseDrawBegin2'}, - forced:true, - locked:false, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - trigger.num++; - }, - }, - less:{ - onremove:true, - charlotte:true, - intro:{content:'手牌上限-#'}, - mod:{ - maxHandcard:function(player,num){ - return num-player.countMark('spyajun_less'); - } - }, - }, - }, - }, - spzundi:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterCard:true, - filterTarget:true, - check:function(card){ - return 7-get.value(card); - }, - content:function(){ - 'step 0' - player.judge(); - 'step 1' - if(result.color=='black') target.draw(3); - else target.moveCard(); - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - if(target.canMoveCard(true)) return 3; - return 1; - }, - }, - }, - }, - //花蔓 - spxiangzhen:{ - trigger:{target:'useCardToBefore'}, - forced:true, - audio:2, - filter:function(event,player){ - return event.card.name=='nanman'; - }, - content:function(){ - trigger.cancel(); - }, - group:'spxiangzhen_draw', - subSkill:{ - draw:{ - audio:'spxiangzhen', - trigger:{global:'useCardAfter'}, - forced:true, - filter:function(event,player){ - return event.card.name=='nanman'&&game.hasPlayer2(function(current){ - return current.hasHistory('damage',function(evt){ - return evt.card==event.card; - }); - }); - }, - content:function(){ - 'step 0' - if(player!=trigger.player&&trigger.player.isIn()) game.asyncDraw([player,trigger.player].sortBySeat()); - else{ - player.draw(); - event.finish(); - } - 'step 1' - game.delayx(); - }, - }, - }, - }, - spfangzong:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - forced:true, - filter:function(event,player){ - return !player.hasSkill('spxizhan_spfangzong')&&player.countCards('h')0&&!player.hasSkill('spxizhan_spfangzong')&&player.inRange(target)) return false; - }, - targetEnabled:function(card,player,target){ - if(get.tag(card,'damage')>0&&!target.hasSkill('spxizhan_spfangzong')&&player.inRange(target)) return false; - }, - }, - }, - spxizhan:{ - trigger:{global:'phaseBegin'}, - forced:true, - locked:false, - logTarget:'player', - filter:function(event,player){ - return player!=event.player; - }, - content:function(){ - 'step 0' - player.chooseToDiscard('he','嬉战:弃置一张牌或失去1点体力','根据弃置的牌对'+get.translation(trigger.player)+'视为使用如下牌:
    ♠,其使用【酒】;♥,你使用【无中生有】
    ♣,对其使用【铁索连环】;♦:对其使用火【杀】').set('ai',function(card){ - var player=_status.event.player,target=_status.event.getTrigger().player; - var suit=get.suit(card,player),list; - switch(suit){ - case 'spade':list=[{name:'jiu'},target,target];break; - case 'heart':list=[{name:'wuzhong'},player,player];break; - case 'club':list=[{name:'tiesuo'},player,target];break; - case 'diamond':list=[{name:'sha',nature:'fire'},player,target];break; - } - list[0].isCard=true; - var eff=0; - if(list[1].canUse(list[0],list[2],false)) eff=get.effect(list[2],list[0],list[1],player); - if(eff>=0||suit=='club') eff=Math.max(eff,5); - return eff*1.5-get.value(card); - }); - 'step 1' - if(result.bool){ - player.addTempSkill('spxizhan_spfangzong'); - var target=trigger.player,card=result.cards[0],suit=get.suit(card,player); - if((!target||!target.isIn())&&suit!='heart') return; - switch(suit){ - case 'spade': - target.chooseUseTarget('jiu',true); - break; - case 'heart': - player.chooseUseTarget('wuzhong',true); - break; - case 'club': - if(player.canUse('tiesuo',target)) player.useCard({ - name:'tiesuo', - isCard:true, - },target); - break; - case 'diamond': - if(player.canUse({ - name:'sha', - isCard:true, - nature:'fire', - },target,false)) player.useCard({ - name:'sha', - isCard:true, - nature:'fire', - },target,false); - break; - } - } - else player.loseHp(); - }, - subSkill:{ - spfangzong:{charlotte:true}, - }, - }, - //高览 - spjungong:{ - enable:'phaseUse', - filter:function(event,player){ - var num=(player.getStat('skill').spjungong||0); - return (numplayer.hp) return num; - return [0,num]; - }, - check:function(card){ - return 6-get.value(card); - }, - prompt:function(){ - var player=_status.event.player,num=get.cnNumber((player.getStat('skill').spjungong||0)+1); - return '弃置'+num+'张牌或失去'+num+'点体力,视为使用杀'; - }, - content:function(){ - 'step 0' - if(!cards.length) player.loseHp(player.getStat('skill').spjungong||1); - player.useCard({name:'sha',isCard:true},target,false); - 'step 1' - if(player.hasHistory('sourceDamage',function(evt){ - var card=evt.card; - if(!card||card.name!='sha') return false; - var evtx=evt.getParent('useCard'); - return evtx.card==card&&evtx.getParent()==event; - })) player.addTempSkill('spjungong_block'); - }, - ai:{ - order:function(item,player){ - return get.order({name:'sha'},player)+1; - }, - result:{ - target:function(player,target){ - if(!ui.selected.cards.length) return 0; - return get.effect(target,{name:'sha'},player,target); - }, - }, - }, - subSkill:{block:{charlotte:true}}, - }, - spdengli:{ - trigger:{ - player:'useCardToPlayered', - target:'useCardToTargeted', - }, - frequent:true, - filter:function(event,player){ - return event.card.name=='sha'&&event.player.hp==event.target.hp; - }, - content:function(){ - player.draw(); - }, - ai:{ - effect:{ - player:function(card,player,target){ - var hp=player.hp,evt=_status.event; - if(evt.name=='chooseToUse'&&evt.player==player&&evt.skill=='spjungong'&&!ui.selected.cards.length) hp-=((player.getStat('skill').spjungong||0)+1); - if(card&&card.name=='sha'&&hp==target.hp) return [1,0.3]; - }, - target:function(card,player,target){ - if(card&&card.name=='sha'&&player.hp==target.hp) return [1,0.3]; - }, - }, - }, - }, - //孙翊 - zaoli:{ - trigger:{player:'phaseBegin'}, - audio:2, - forced:true, - filter:function(event,player){ - return player.countMark('zaoli')>0; - }, - content:function(){ - 'step 0' - event.num=player.storage.zaoli; - player.removeMark('zaoli',event.num); - if(player.countCards('he')>0){ - player.chooseToDiscard(true,'he',[1,Infinity],'躁厉:弃置至少一张牌').set('ai',function(card){ - if(card.hasGaintag('zaoli')) return 1; - return 5-get.value(card); - }); - } - 'step 1' - if(result.bool) num+=result.cards.length; - if(event.num>2) player.loseHp(); - player.draw(num); - }, - mod:{ - cardEnabled2:function(card,player){ - if(player==_status.currentPhase&&get.itemtype(card)=='card'&&card.hasGaintag('zaoli')) return false; - }, - }, - group:['zaoli_add','zaoli_count'], - init:function(player){ - if(player==_status.currentPhase){ - var hs=player.getCards('h'); - player.getHistory('gain',function(evt){ - hs.removeArray(evt.cards); - }); - if(hs.length) player.addGaintag(hs,'zaoli'); - } - }, - onremove:function(player){ - player.removeGaintag('zaoli'); - delete player.storage.zaoli; - }, - intro:{content:'mark'}, - subSkill:{ - add:{ - audio:'zaoli', - trigger:{player:['useCard','respond']}, - forced:true, - filter:function(event,player){ - return player.countMark('zaoli')<4&&player.hasHistory('lose',function(evt){ - return evt.hs&&evt.hs.length>0&&evt.getParent()==event; - }); - }, - content:function(){ - player.addMark('zaoli',1); - }, - }, - count:{ - trigger:{global:'phaseBeginStart'}, - forced:true, - firstDo:true, - silent:true, - filter:function(event,player){ - if(player==event.player) return player.countCards('h')>0; - return player.hasCard(function(card){ - return card.hasGaintag('zaoli'); - },'h'); - }, - content:function(){ - if(player==trigger.player){ - player.addGaintag(player.getCards('h'),'zaoli'); - } - else player.removeGaintag('zaoli'); - }, - }, - }, - }, - //王双 - yiyong:{ - audio:2, - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&& - event.source&&event.source.isIn()&&player!=event.source - &&event.cards.filterInD().length>0&&player.getEquip(1); - }, - check:function(event,player){ - var card={ - name:'sha', - cards:event.cards.filterInD(), - },target=event.source; - return !player.canUse(card,target,false)||get.effect(target,card,player,player)>0; - }, - content:function(){ - 'step 0' - event.cards=trigger.cards.filterInD(); - player.gain(event.cards,'gain2'); - 'step 1' - var target=trigger.source,hs=player.getCards('h'); - if(target&&target.isIn()&&hs.length>=cards.length&&cards.filter(function(i){ - return hs.contains(i); - }).length==cards.length&&player.canUse({name:'sha',cards:cards},target,false)){ - var next=player.useCard({name:'sha'},cards,target,false); - if(!target.getEquip(1)) next.baseDamage=2; - } - }, - }, - shanxie:{ - audio:2, - enable:'phaseUse', - usable:1, - //filterTarget:function(card,player,target){ - // return target!=player&&target.getEquip(1); - //}, - //selectTarget:[0,1], - content:function(){ - var card=get.cardPile2(function(card){ - return get.subtype(card)=='equip1'; - }); - if(card) player.gain(card,'gain2'); - else{ - var targets=game.filterPlayer(function(current){ - return current.getEquip(1); - }); - if(targets.length){ - var target=targets.randomGet(); - player.gain(target.getEquip(1),target,'give','bySelf'); - } - } - }, - content_old:function(){ - 'step 0' - if(!target){ - var card=get.cardPile2(function(card){ - return get.subtype(card)=='equip1'; - }); - if(card) player.gain(card,'gain2'); - event.finish(); - } - else{ - var card=target.getEquip(1); - if(card){ - event.card=card; - player.gain(card,target,'give'); - } - else event.finish(); - } - 'step 1' - if(player.getCards('h').contains(card)&&get.type(card,player)=='equip'&&player.hasUseTarget(card)) player.chooseUseTarget(card,true,'nopopup'); - 'step 2' - var hs=target.getCards('h',function(card){ - return target.canUse(get.autoViewAs({name:'sha'},[card]),player,false); - }); - if(hs.length){ - if(hs.length==1) event._result={bool:true,cards:hs}; - else target.chooseCard('h',true,'将一张牌当做【杀】对'+get.translation(player)+'使用',function(card){ - return _status.event.cards.contains(card); - }).set('cards',hs).set('ai',function(card){ - return get.effect(_status.event.getParent().player,get.autoViewAs({name:'sha',},[card]),_status.event.player) - }) - } - else event.finish(); - 'step 3' - if(result.bool) target.useCard({name:'sha'},result.cards,player,false); - }, - ai:{ - order:9, - result:{player:1}, - }, - group:'shanxie_exclude', - subSkill:{ - exclude:{ - trigger:{global:'useCard'}, - forced:true, - locked:false, - filter:function(event,player){ - if(event.card.name!='shan'||event.getParent(2).player!=player) return false; - var num=get.number(event.card); - return !num||num<=player.getAttackRange()*2; - }, - logTarget:'player', - content:function(){ - trigger.all_excluded=true; - }, - }, - }, - }, //阎圃 huantu:{ audio:2, @@ -6203,207 +4694,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - //吴景流兵 - liubing:{ - trigger:{player:'useCard1'}, - forced:true, - filter:function(event,player){ - return event.card.name=='sha'&&event.cards.length==1&&player.getHistory('useCard',function(evt){ - return evt.card.name=='sha'&&evt.cards.length==1; - }).indexOf(event)==0; - }, - content:function(){ - game.log(player,'将',trigger.card,'的花色改为','#y♦'); - trigger.card.suit='diamond'; - }, - group:'liubing_gain', - subSkill:{ - gain:{ - trigger:{global:'useCardAfter'}, - forced:true, - audio:'liubing', - filter:function(event,player){ - return event.player!=player&&event.card.isCard&&event.card.name=='sha'&& - get.color(event.card)=='black'&&event.cards.filterInD().length>0&& - event.player.isPhaseUsing()&&!event.player.hasHistory('sourceDamage',function(evt){ - return evt.card==event.card; - }); - }, - logTarget:'player', - content:function(){ - player.gain(trigger.cards.filterInD(),'gain2'); - }, - }, - }, - }, - //新刘璋 - jutu:{ - audio:'xiusheng', - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - return player.storage.yaohu&&game.hasPlayer(function(current){ - return current.group==player.storage.yaohu; - }); - }, - content:function(){ - 'step 0' - var cards=player.getExpansions('jutu'); - if(cards.length>0){ - player.gain(cards,'gain2'); - } - 'step 1' - event.num=game.countPlayer(function(current){ - return current.group==player.storage.yaohu; - }); - player.draw(event.num+1); - if(!event.num) event.finish(); - 'step 2' - var he=player.getCards('he'); - if(!he.length) event.finish(); - else if(he.length0) return 1; - return 1.3; - }); - } - list.sort(function(a,b){ - return getn(b)-getn(a); - }); - return list[0]; - }()); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('yaohu',game.filterPlayer(function(current){ - return current.group==result.control; - })); - game.log(player,'选择了','#y'+get.translation(result.control+2)) - player.storage.yaohu=result.control; - player.markSkill('yaohu'); - } - }, - ai:{combo:'jutu'}, - intro:{content:'已选择了$势力'}, - group:'yaohu_gain', - subSkill:{ - round:{}, - gain:{ - audio:'yinlang', - trigger:{global:'phaseUseBegin'}, - forced:true, - locked:false, - filter:function(event,player){ - return event.player!=player&&event.player.group==player.storage.yaohu&&event.player.isIn()&&player.getExpansions('jutu').length>0; - }, - logTarget:'player', - content:function(){ - 'step 0' - var target=trigger.player; - event.target=target; - target.chooseButton(['选择获得一张“生”',player.getExpansions('jutu')],true).set('ai',function(button){ - return get.value(button.link,player); - }); - 'step 1' - if(result.bool){ - target.gain(result.links,'give',player,'bySelf'); - } - 'step 2' - if(game.hasPlayer(function(current){ - return current!=player&¤t!=target; - })){ - player.chooseTarget(true,'选择'+get.translation(target)+'使用【杀】的目标',function(card,player,target){ - return target!=player&&target!=_status.event.source; - }).set('source',target).set('ai',function(target){ - var evt=_status.event; - return get.effect(target,{name:'sha'},evt.source,evt.player); - }); - } - else{ - event._result={bool:false}; - event.goto(4); - } - 'step 3' - var target2=result.targets[0]; - player.line(target2,'green'); - target.chooseToUse(function(card,player,event){ - if(get.name(card)!='sha') return false; - return lib.filter.filterCard.apply(this,arguments); - },'对'+get.translation(target2)+'使用一张杀,否则交给其两张牌').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ - if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; - return lib.filter.targetEnabled.apply(this,arguments); - }).set('sourcex',target2).set('addCount',false); - 'step 4' - if(!result.bool){ - var hs=target.getCards('he'); - if(!hs.length) event.finish(); - else if(hs.length<=2) event._result={bool:true,cards:hs}; - else target.chooseCard(2,true,'交给'+get.translation(player)+'两张牌','he'); - } - else event.finish(); - 'step 5' - if(result.bool) target.give(result.cards,player); - }, - }, - }, - }, - rehuaibi:{ - audio:'huaibi', - zhuSkill:true, - mod:{ - maxHandcard:function(player,num){ - if(player.storage.yaohu&&player.hasZhuSkill('rehuaibi')) return num+game.countPlayer(function(current){ - return current.group==player.storage.yaohu; - }); - }, - }, - ai:{combo:'yaohu'}, - }, //傅佥 jueyong:{ audio:2, @@ -6540,303 +4830,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //宗预 - zhibian:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer((current)=>(current!=player&&player.canCompare(current))); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('zhibian'),'与一名其他角色进行拼点',function(card,player,target){ - return target!=player&&player.canCompare(target); - }).set('ai',function(target){ - if(!_status.event.goon) return false; - var att=get.attitude(player,target); - if(att<0&&target.countCards('e',function(card){ - return player.canEquip(card)&&get.effect(player,card,target,player)>0; - })) return -att/Math.sqrt(target.countCards('h')); - if(!player.isDamaged()) return false; - if(att<=0) return (1-att)/Math.sqrt(target.countCards('h')); - return Math.sqrt(2/att*Math.sqrt(target.countCards('h'))); - }).set('goon',function(){ - if(!player.hasCard(function(card){ - return (card.number>=14-player.hp&&get.value(card)<=5); - })) return false; - return true; - }()); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('zhibian',target); - player.chooseToCompare(target); - } - else event.finish(); - 'step 2' - if(result.bool){ - var list=[],list2=[ - '将'+get.translation(target)+'装备区/判定区中的一张牌移动到你的区域内', - '回复1点体力', - '背水!跳过摸牌阶段,并依次执行上述所有选项', - ]; - if(target.hasCard(function(card){ - return player.canEquip(card); - },'e')||target.hasCard(function(card){ - return player.canAddJudge(card); - },'j')){ - list.push('选项一'); - } - if(player.isDamaged()){ - list.push('选项二'); - } - if(list.contains('选项一')) list.push('背水!') - list.push('cancel2'); - player.chooseControl(list).set('choiceList',list2).set('ai',function(target){ - if(player.isDamaged()&&(player.hp<=2||!target.countCards('e',function(card){ - return player.canEquip(card)&&get.value(card,target)>=4+player.getDamagedHp(); - }))) return 1; - return 0; - }); - } - else{ - player.loseHp(); - event.finish(); - } - 'step 3' - if(result.control!='cancel2'){ - event.control=result.control; - if(result.control=='选项一'||result.control=='背水!'){ - player.choosePlayerCard(target,'ej',true).set('ai',get.buttonValue); - } - else event.goto(5); - } - else event.finish(); - 'step 4' - if(result.bool){ - var card=result.cards[0]; - target.$give(card,player,false); - game.delayx(); - if(get.position(card)=='e') player.equip(card); - else player.addJudge(card); - } - 'step 5' - if(event.control=='选项二'||event.control=='背水!'){ - player.recover(); - } - if(event.control=='背水!') player.skip('phaseDraw'); - }, - }, - yuyan:{ - audio:2, - trigger:{target:'useCardToTarget'}, - forced:true, - logTarget:'player', - filter:function(event,player){ - return event.card.name=='sha'&&event.card.isCard&&typeof get.number(event.card)=='number'&&player.hp=13||!trigger.player.hasCard(function(card){ - if(_status.connectMode&&get.position(card)=='h') return true; - return get.number(card)>num; - },'he')) event._result={bool:false}; - else trigger.player.chooseCard('he',function(card){ - return get.number(card)>_status.event.number; - },'交给'+get.translation(player)+'一张点数大于'+get.cnNumber(num)+'的牌,或令'+get.translation(trigger.card)+'对其无效').set('number',num).set('',function(card){ - if(card.name=='shan'||card.name=='tao'||card.name=='jiu') return false; - return 6-get.value(card); - }); - 'step 1' - if(result.bool){ - trigger.player.give(result.cards,player); - } - else{ - trigger.targets.remove(player); - trigger.getParent().triggeredTargets2.remove(player); - trigger.untrigger(); - } - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(card.name=='sha'&&player.hp>target.hp&&get.attitude(player,target)<0){ - var num=get.number(card); - if(typeof num!='number') return false; - var bs=player.getCards('h',function(cardx){ - return (get.number(cardx)>num&&!['','',''].contains(cardx.name)); - }); - if(bs.length<2) return 0; - if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')) return; - if(bs.length<=2){ - for(var i=0;ievent.target.hp&&event.targets.length==1&&event.player.countCards('h')>0&&!event.target.isDying()&& - !event.player.hasSkillTag('noCompareTarget')&&!player.hasSkillTag('noCompareSource')); - }, - check:function(event,player){ - var target=event.target,source=event.player; - var eff1=get.effect(target,event.card,source,player); - if(eff1>=0) return false; - var eff2=get.effect(player,event.card,source,player); - if(eff2>=0) return true; - if(eff2>eff1/3) return player.hasCard(function(card){ - return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; - }); - if(eff2>eff1/2) return player.hasCard(function(card){ - return card.number>10&&get.value(card)<=5; - }); - return player.hasCard(function(card){ - return card.number>11&&get.value(card)<=5; - }); - }, - content:function(){ - 'step 0' - player.draw(); - 'step 1' - if(player.canCompare(trigger.player)) player.chooseToCompare(trigger.player); - else event.finish(); - 'step 2' - trigger.targets.remove(trigger.target); - trigger.getParent().triggeredTargets1.remove(trigger.target); - trigger.untrigger(); - if(!result.bool) trigger.targets.push(player); - }, - }, - fengjie:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - return game.hasPlayer((current)=>(current!=player)); - }, - content:function(){ - 'step 0' - player.chooseTarget('请选择【奉节】的目标','选择一名其他角色并获得如下效果直到你下回合开始:一名角色的结束阶段开始时,你将手牌摸至(至多摸至四张)或弃置至与其体力值相等。',lib.filter.notMe,true).set('ai',function(target){ - return (target.hp-player.countCards('h'))/get.threaten(target); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'green'); - game.log(player,'选择了',target); - player.storage.fengjie2=target; - player.addTempSkill('fengjie2',{player:'phaseBegin'}); - game.delayx(); - } - }, - }, - fengjie2:{ - audio:'fengjie', - trigger:{global:'phaseJieshuBegin'}, - forced:true, - charlotte:true, - onremove:true, - filter:function(event,player){ - if(!player.storage.fengjie2||!player.storage.fengjie2.isIn()) return false; - var num1=player.countCards('h'),num2=player.storage.fengjie2.hp; - return num1!=num2; - }, - logTarget:(event,player)=>player.storage.fengjie2, - content:function(){ - var num1=player.countCards('h'),num2=player.storage.fengjie2.hp; - if(num1>num2) player.chooseToDiscard('h',true,num1-num2); - else player.drawTo(Math.min(num1+4,num2)); - }, - }, - //陈武董袭 - spyilie:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseControl('选项一','选项二','背水!','cancel2').set('choiceList',[ - '本阶段内使用【杀】的次数上限+1', - '本回合内使用【杀】被【闪】抵消时摸一张牌', - '背水!失去1点体力并依次执行上述所有选项', - ]).set('ai',function(){ - if(player.countCards('hs',function(card){ - return get.name(card)=='sha'&&player.hasValueTarget(card); - })>player.getCardUsable({name:'sha'})) return 0; - return 1; - }); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('spyilie'); - game.log(player,'选择了','#g【毅烈】','的','#y'+result.control); - if(result.index%2==0) player.addTempSkill('spyilie_add','phaseUseEnd'); - if(result.index>0) player.addTempSkill('spyilie_miss'); - if(result.index==2) player.loseHp(); - } - }, - subSkill:{ - add:{ - charlotte:true, - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+1; - }, - }, - }, - miss:{ - charlotte:true, - audio:'spyilie', - trigger:{player:'shaMiss'}, - forced:true, - content:function(){ - player.draw(); - }, - }, - }, - }, - spfenming:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:(event,player)=>game.hasPlayer((current)=>lib.skill.spfenming.filterTarget(null,player,current)), - filterTarget:function(card,player,target){ - if(target.hp>player.hp) return false; - return !target.isLinked()||target.hasCard(function(card){ - return lib.filter.canBeGained(card,player,target); - },target==player?'e':'he'); - }, - content:function(){ - if(!target.isLinked()) target.link(); - else player.gainPlayerCard(target,target==player?'e':'he',true); - }, - ai:{ - order:7, - result:{ - player:function(player,target){ - if(!target.isLinked()) return get.effect(target,{name:'tiesuo'},player,player); - return get.effect(target,{name:'shunshou_copy2'},player,player); - }, - }, - }, - }, //曹真 disordersidi:{audio:2}, discretesidi:{ @@ -7043,121 +5036,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - //周处 - rechuhai:{ - audio:'chuhai', - inherit:'chuhai', - dutySkill:true, - locked:true, - group:['rechuhai_add','rechuhai_achieve','rechuhai_fail'], - derivation:'zhangming', - prompt:'与一名其他角色进行拼点', - subSkill:{ - add:{ - trigger:{player:'compare'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.getParent().name=='rechuhai'&&event.num1<13&&player.countCards('e')<4; - }, - content:function(){ - var num=4-player.countCards('e'); - game.log(player,'的拼点牌点数+',num); - trigger.num1=Math.min(13,trigger.num1+num); - } - }, - achieve:{ - audio:'rechuhai', - trigger:{player:'equipAfter'}, - forced:true, - skillAnimation:true, - animationColor:'wood', - filter:function(event,player){ - return player.countCards('e')>2; - }, - content:function(){ - player.awakenSkill('rechuhai'); - game.log(player,'成功完成使命'); - if(player.isDamaged()) player.recover(player.maxHp-player.hp); - player.removeSkill('xianghai'); - player.addSkill('zhangming'); - }, - }, - fail:{ - trigger:{player:'chooseToCompareAfter'}, - forced:true, - filter:function(event,player){ - return event.getParent().name=='rechuhai'&&event.num1<7&&!event.result.bool; - }, - content:function(){ - player.awakenSkill('rechuhai'); - game.log(player,'使命失败'); - }, - }, - }, - }, - zhangming:{ - audio:2, - trigger:{player:'useCard'}, - forced:true, - filter:function(event,player){ - return get.suit(event.card)=='club'; - }, - content:function(){ - trigger.directHit.addArray(game.filterPlayer(function(current){ - return current!=player; - })); - }, - group:'zhangming_damage', - subSkill:{ - damage:{ - audio:'zhangming', - trigger:{source:'damageEnd'}, - forced:true, - usable:1, - filter:function(event,player){ - return player!=event.player; - }, - logTarget:'player', - content:function(){ - var list=[],cards=[],target=trigger.player,hs=target.getCards('h'); - if(hs.length>0){ - var card=hs.randomGet(); - list.push(get.type2(card,target)); - player.showCards(card,get.translation(player)+'对'+get.translation(target)+'发动了【彰名】'); - } - target.discard(card); - for(var i=0;i0||player.hasCard(function(i){ - return _status.connectMode||get.type(i,player)=='basic'&&lib.filter.cardDiscardable(i,player,'dbquedi'); - },'h')); - }, - content:function(){ - 'step 0' - var target=trigger.target; - event.target=target; - var list=[]; - if(target.countGainableCards(player,'h')>0) list.push('选项一'); - if(player.hasCard(function(i){ - return get.type(i,player)=='basic'&&lib.filter.cardDiscardable(i,player,'dbquedi'); - },'h')) list.push('选项二'); - list.push('背水!'); - list.push('cancel2'); - player.chooseControl(list).set('choiceList',[ - '获得'+get.translation(target)+'的一张手牌', - '弃置一张基本牌并令'+get.translation(trigger.card)+'伤害+1', - '背水!减1点体力上限并执行所有选项', - ]).set('prompt',get.prompt('dbquedi',target)).set('ai',function(){ - var evt=_status.event.getTrigger(),player=evt.player,target=evt.target,card=evt.card; - if(get.attitude(player,target)>0) return 'cancel2'; - var bool1=target.countGainableCards(player,'h')>0; - var bool2=player.hasCard(function(i){ - return get.type(i,player)=='basic'&&lib.filter.cardDiscardable(i,player,'dbquedi')&&get.value(card,player)<5; - },'h')&&!target.hasSkillTag('filterDamage',null,{ - player:player, - card:card, - }); - if(bool1&&bool2&&(target.hp<=2||(player.isDamaged()&&player.maxHp>3))) return '背水!'; - if(bool1) return '选项一'; - if(bool2) return '选项二'; - return 'cancel2'; - }); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('dbquedi',target); - event.control=result.control; - if(event.control=='背水!') player.loseMaxHp(); - } - else{ - player.storage.counttrigger.dbquedi--; - event.finish(); - } - 'step 2' - if((event.control=='选项一'||event.control=='背水!')&&target.countGainableCards(player,'h')>0) player.gainPlayerCard(target,true,'h'); - 'step 3' - if((event.control=='选项二'||event.control=='背水!')&&player.hasCard(function(i){ - return get.type(i,player)=='basic'&&lib.filter.cardDiscardable(i,player,'dbquedi'); - },'h')){ - player.chooseToDiscard('h','弃置一张基本牌',{type:'basic'},true); - } - else event.finish(); - 'step 4' - if(result.bool) trigger.getParent().baseDamage++; - }, - ai:{ - directHit_ai:true, - skillTagFilter:function(player,tag,arg){ - if(!arg||!arg.card||!arg.target||(arg.card.name!='sha'&&arg.card.name!='juedou')) return false; - if(player.storage.counttrigger&&player.storage.counttrigger.dbquedi&&player.storage.counttrigger.dbquedi>0) return false; - if(arg.target.countCards('h')==1&&(arg.card.name!='sha'||!arg.target.getEquip('bagua')||player.hasSkillTag('unequip',false,{ - name:arg.card?arg.card.name:null, - target:arg.target, - card:arg.card - })||player.hasSkillTag('unequip_ai',false,{ - name:arg.card?arg.card.name:null, - target:arg.target, - card:arg.card - }))) return true; - return false; - }, - }, - }, - dbzhuifeng:{ - audio:2, - groupSkill:true, - enable:'chooseToUse', - usable:2, - viewAsFilter:function(player){ - return player.group=='wei'&&player.hp>0; - }, - viewAs:{name:'juedou',isCard:true}, - filterCard:()=>false, - selectCard:-1, - log:false, - precontent:function(){ - player.logSkill('dbzhuifeng'); - player.loseHp(); - }, - ai:{ - order:function(){ - return get.order({name:'juedou'})-0.5; - }, - }, - group:'dbzhuifeng_self', - subSkill:{ - self:{ - trigger:{player:'damageBegin2'}, - forced:true, - filter:function(event,player){ - var evt=event.getParent(); - return evt.skill=='dbzhuifeng'&&evt.player==player; - }, - content:function(){ - trigger.cancel(); - player.getStat().skill.dbzhuifeng=2; - }, - }, - }, - }, - dbchongjian:{ - audio:2, - groupSkill:true, - hiddenCard:function(player,name){ - if(player.group=='wu'&&(name=='sha'||name=='jiu')&&player.hasCard(function(card){ - return get.type(card)=='equip'; - },'hes')) return true; - return false; - }, - enable:'chooseToUse', - filter:function(event,player){ - return player.group=='wu'&&player.hasCard(function(card){ - return get.type(card)=='equip'; - },'hes')&&(event.filterCard({name:'sha'},player,event)||event.filterCard({name:'jiu'},player,event)); - }, - locked:false, - mod:{ - targetInRange:function(card){ - if(card.storage&&card.storage.dbchongjian) return true; - }, - }, - chooseButton:{ - dialog:function(){ - var list=[]; - list.push(['基本','','sha']); - for(var i of lib.inpile_nature) list.push(['基本','','sha',i]); - list.push(['基本','','jiu']); - return ui.create.dialog('冲坚',[list,'vcard']); - }, - filter:function(button,player){ - var evt=_status.event.getParent(); - return evt.filterCard({name:button.link[2],nature:button.link[3],isCard:true},player,evt); - }, - check:function(button){ - if(_status.event.getParent().type!='phase') return 1; - var player=_status.event.player; - if(button.link[2]=='jiu'&&(player.hasCard(function(card){ - return get.name(card)=='sha'; - },'hs')||player.countCards('hes',function(card){ - if(get.type(card)!='equip') return false; - if(get.position(card)=='e'){ - if(player.hasSkillTag('noe')) return (10-get.value(card))>0; - var sub=get.subtype(card); - if(player.hasCard(function(card){ - return get.subtype(card)==sub&&player.canUse(card,player)&&get.effect(player,card,player,player)>0; - },'hs')) return (10-get.value(card))>0; - } - return (5-get.value(card))>0; - })>1)) return player.getUseValue({name:'jiu'})*4; - return player.getUseValue({name:button.link[2],nature:button.link[3]},false); - }, - backup:function(links,player){ - return { - audio:'dbchongjian', - viewAs:{ - name:links[0][2], - nature:links[0][3], - //isCard:true, - storage:{dbchongjian:true}, - }, - filterCard:{type:'equip'}, - position:'hes', - popname:true, - precontent:function(){ - player.addTempSkill('dbchongjian_effect'); - }, - check:function(card){ - var player=_status.event.player; - if(get.position(card)=='e'){ - if(player.hasSkillTag('noe')) return 10-get.value(card); - var sub=get.subtype(card); - if(player.hasCard(function(card){ - return get.subtype(card)==sub&&player.canUse(card,player)&&get.effect(player,card,player,player)>0; - },'hs')) return 10-get.value(card); - } - return 5-get.value(card); - }, - } - }, - prompt:function(links){ - return '将一张装备牌当做'+(links[0][3]?get.translation(links[0][3]):'')+'【'+get.translation(links[0][2])+'】使用'; - }, - }, - ai:{ - unequip:true, - respondSha:true, - skillTagFilter:function(player,tag,arg){ - if(tag=='unequip'){ - if(player.group!='wu'||!arg||!arg.card||!arg.card.storage||!arg.card.storage.dbchongjian) return false; - return true - } - return player.group=='wu'&&arg=='use'&&player.hasCard(function(card){ - return get.type(card)=='equip'; - },'hes'); - }, - order:function(item,player){ - if(_status.event.type!='phase') return 1; - var player=_status.event.player; - if(player.hasCard(function(card){ - if(get.value(card,player)<0) return true; - var sub=get.subtype(card); - return player.hasCard(function(card){ - return get.subtype(card)==sub&&player.canUse(card,player)&&get.effect(player,card,player,player)>0; - },'hs')>0; - },'e')) return 10; - if(player.countCards('hs','sha')||player.countCards('he',function(card){ - return get.type(card)=='equip'&&get.value(card,player)<5; - })>1) return get.order({name:'jiu'})-0.1; - return get.order({name:'sha'})-0.1; - }, - result:{player:1}, - }, - subSkill:{ - effect:{ - charlotte:true, - mod:{ - targetInRange:function(card){ - if(card.storage&&card.storage.dbchongjian) return true; - }, - }, - trigger:{source:'damageSource'}, - forced:true, - logTarget:'player', - filter:function(event,player){ - return event.parent.skill=='dbchongjian_backup'&&event.card.name=='sha'&&event.getParent().name=='sha'&&event.player.countGainableCards(player,'e')>0; - }, - content:function(){ - player.gainPlayerCard(trigger.player,'e',true,trigger.num); - }, - }, - }, - }, - dbchoujue:{ - audio:2, - trigger:{source:'dieAfter'}, - forced:true, - content:function(){ - player.gainMaxHp(); - player.draw(2); - player.addSkill('counttrigger'); - if(!player.storage.counttrigger) player.storage.counttrigger={}; - if(!player.storage.counttrigger.dbquedi) player.storage.counttrigger.dbquedi=0; - player.storage.counttrigger.dbquedi--; - }, - }, //顾雍 xinshenxing:{ audio:2, @@ -7744,369 +5358,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - //王凌 - xingqi:{ - audio:2, - trigger:{player:'useCard'}, - forced:true, - locked:false, - filter:function(event,player){ - return get.type(event.card,false)!='delay'&&!player.getStorage('xingqi').contains(event.card.name); - }, - content:function(){ - player.markAuto('xingqi',[trigger.card.name]); - game.log(player,'获得了一个','#g【备('+get.translation(trigger.card.name)+')】'); - }, - marktext:'备', - intro:{ - content:'$', - onunmark:function(storage,player){ - delete player.storage.xingqi; - }, - }, - group:'xingqi_gain', - subSkill:{ - gain:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return player.getStorage('xingqi').length>0; - }, - content:function(){ - 'step 0' - player.removeSkill('mibei_mark'); - player.chooseButton(['星启:是否获得一张牌?',[player.getStorage('xingqi'),'vcard']]).set('ai',function(button){ - var card={name:button.link[2]},player=_status.event.player; - if(!get.cardPile2(function(cardx){ - return cardx.name==card.name; - })) return 0; - return get.value(card,player)*player.getUseValue(card); - }); - 'step 1' - if(result.bool){ - player.logSkill('xingqi'); - var name=result.links[0][2]; - game.log(player,'移去了一个','#g【备('+get.translation(name)+')】'); - player.unmarkAuto('xingqi',[name]); - var card=get.cardPile2(function(card){ - return card.name==name; - }); - if(card) player.gain(card,'gain2'); - } - }, - }, - }, - }, - xinzifu:{ - audio:'zifu', - trigger:{player:'phaseUseEnd'}, - forced:true, - filter:function(event,player){ - return player.getStorage('xingqi').length>0&&!player.hasHistory('useCard',function(evt){ - return evt.getParent('phaseUse')==event; - }); - }, - content:function(){ - game.log(player,'移去了所有','#g【备】'); - player.unmarkSkill('xingqi'); - player.addTempSkill('xinzifu_limit'); - player.addMark('xinzifu_limit',1,false); - }, - ai:{ - neg:true, - combo:'xingqi', - }, - subSkill:{ - limit:{ - charlotte:true, - markimage:'image/card/handcard.png', - intro:{ - content:function(storage,player){ - var num=-player.countMark('xinzifu_limit'); - return '手牌上限'+num; - } - }, - mod:{ - maxHandcard:function(player,num){ - return num-player.countMark('xinzifu_limit'); - } - }, - } - } - }, - mibei:{ - audio:2, - trigger:{player:'useCardAfter'}, - dutySkill:true, - forced:true, - skillAnimation:true, - animationColor:'water', - filter:function(event,player){ - if(!player.storage.xingqi||!player.storage.xingqi.length) return false; - var map={basic:0,trick:0,equip:0}; - for(var i of player.storage.xingqi){ - var type=get.type(i); - if(typeof map[type]=='number') map[type]++; - } - for(var i in map){ - if(map[i]<2) return false; - } - return true; - }, - content:function(){ - 'step 0' - game.log(player,'成功完成使命'); - player.awakenSkill('mibei'); - var list=['basic','equip','trick'],cards=[]; - for(var i of list){ - var card=get.cardPile2(function(card){ - return get.type(card)==i; - }); - if(card) cards.push(card); - } - if(cards.length) player.gain(cards,'gain2'); - 'step 1' - player.addSkill('xinmouli'); - }, - group:['mibei_fail','mibei_silent'], - derivation:'xinmouli', - subSkill:{ - silent:{ - trigger:{player:'phaseZhunbeiBegin'}, - silent:true, - lastDo:true, - filter:function(event,player){ - return !player.getStorage('xingqi').length; - }, - content:function(){ - player.addTempSkill('mibei_mark'); - }, - charlotte:true, - }, - mark:{}, - fail:{ - trigger:{player:'phaseJieshuBegin'}, - forced:true, - filter:function(event,player){ - return !player.getStorage('xingqi').length&&player.hasSkill('mibei_mark'); - }, - content:function(){ - game.log(player,'使命失败'); - player.awakenSkill('mibei'); - player.loseMaxHp(); - }, - }, - }, - }, - xinmouli:{ - audio:'mouli', - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.getStorage('xingqi').length>0; - }, - filterTarget:lib.filter.notMe, - content:function(){ - 'step 0' - target.chooseButton(['谋立:是否获得一张牌?',[player.getStorage('xingqi'),'vcard']],true).set('ai',function(button){ - var card={name:button.link[2]},player=_status.event.player; - return get.value(card,player); - }); - 'step 1' - if(result.bool){ - var name=result.links[0][2]; - game.log(player,'移去了一个','#g【备('+get.translation(name)+')】'); - player.unmarkAuto('xingqi',[name]); - var card=get.cardPile2(function(card){ - return card.name==name; - }); - if(card) target.gain(card,'gain2'); - } - }, - ai:{ - combo:'xingqi', - order:1, - result:{ - target:function(player,target){ - if(target.hasSkillTag('nogain')) return 0; - return 1; - }, - }, - }, - }, - //孔融 - xinlirang:{ - audio:'splirang', - trigger:{global:'phaseDrawBegin2'}, - logTarget:'player', - filter:function(event,player){ - return !event.numFixed&&event.player!=player&&player.countMark('xinlirang')==0; - }, - prompt2:'获得一枚“谦”并令其多摸两张牌', - check:function(event,player){ - return get.attitude(player,event.player)>0; - }, - content:function(){ - trigger.num+=2; - player.addMark('xinlirang',1); - player.addTempSkill('xinlirang_gain'); - }, - marktext:'谦', - intro:{ - name:'谦', - content:'mark', - }, - group:'xinlirang_skip', - subSkill:{ - gain:{ - audio:'splirang', - trigger:{global:'phaseDiscardEnd'}, - direct:true, - filter:function(event,player){ - return event.player.hasHistory('lose',function(evt){ - return evt.type=='discard'&&evt.cards2.filterInD('d').length>0&&evt.getParent('phaseDiscard')==event; - }); - }, - content:function(){ - 'step 0' - var cards=[]; - trigger.player.getHistory('lose',function(evt){ - if(evt.type=='discard'&&evt.getParent('phaseDiscard')==trigger) cards.addArray(evt.cards2.filterInD('d')); - }); - player.chooseButton(['礼让:是否获得其中至多两张牌?',cards],[1,2]); - 'step 1' - if(result.bool){ - player.logSkill('xinlirang_gain',trigger.player); - player.gain(result.links,'gain2'); - } - }, - }, - skip:{ - audio:'splirang', - trigger:{player:'phaseDrawBefore'}, - forced:true, - filter:function(event,player){ - return player.hasMark('xinlirang'); - }, - content:function(){ - trigger.cancel(); - player.removeMark('xinlirang',player.countMark('xinlirang')); - }, - }, - }, - }, - xinmingshi:{ - audio:'spmingshi', - trigger:{player:'damageEnd'}, - forced:true, - logTarget:'source', - filter:function(event,player){ - return event.source&&event.source.isIn()&&player.hasMark('xinlirang')&&event.source.countCards('he')>0; - }, - content:function(){ - 'step 0' - trigger.source.chooseToDiscard('he',true).set('color',get.attitude(trigger.source,player)>0?'red':'black').set('ai',function(card){ - return (get.color(card)==_status.event.color?4:0)-get.value(card); - }); - 'step 1' - if(result.bool&&result.cards&&result.cards.length){ - var card=result.cards[0]; - if(get.color(card,trigger.source)=='red') player.recover(); - else if(get.position(card,true)=='d') player.gain(card,'gain2'); - } - }, - ai:{ - combo:'xinmingshi', - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')&&target.hasMark('xinlirang')){ - var cards=[card]; - if(card.cards&&card.cards.length) cards.addArray(card.cards); - if(ui.selected.cards.length) cards.addArray(ui.selected.cards); - if(!player.countCards('he',function(card){ - return !cards.contains(card); - })) return; - if(!player.countCards('h',function(card){ - return !cards.contains(card)&&get.color(card)=='black'&&get.value(card,player)<6; - })) return 'zerotarget'; - return 0.5; - } - }, - }, - }, - }, - //糜夫人 - xinguixiu:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - forced:true, - filter:function(event,player){ - return player.hp%2==1||player.isDamaged(); - }, - content:function(){ - if(player.hp%2==1) player.draw(); - else player.recover(); - }, - }, - qingyu:{ - audio:3, - dutySkill:true, - trigger:{player:'damageBegin2'}, - forced:true, - filter:function(event,player){ - return player.countCards('he',function(card){ - return lib.filter.cardDiscardable(card,player,'qingyu'); - })>1; - }, - content:function(){ - trigger.cancel(); - player.chooseToDiscard(2,'he',true); - }, - group:['qingyu_achieve','qingyu_fail'], - subSkill:{ - achieve:{ - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - skillAnimation:true, - animationColor:'fire', - filter:function(event,player){ - return player.isHealthy()&&player.countCards('h')==0; - }, - content:function(){ - game.log(player,'成功完成使命'); - player.awakenSkill('qingyu'); - player.addSkillLog('xuancun'); - }, - }, - fail:{ - trigger:{player:'dying'}, - forced:true, - content:function(){ - game.log(player,'使命失败'); - player.awakenSkill('qingyu'); - player.loseMaxHp(); - }, - }, - }, - derivation:'xuancun', - }, - xuancun:{ - audio:2, - trigger:{global:'phaseEnd'}, - filter:function(event,player){ - return player!=event.player&&player.countCards('h')0; - }, - prompt2:function(event,player){ - return '令其摸'+get.cnNumber(Math.min(2,player.hp-player.countCards('h')))+'张牌'; - }, - content:function(){ - trigger.player.draw(Math.min(2,player.hp-player.countCards('h'))); - }, - }, //蔡夫人 xinqieting:{ audio:2, @@ -8179,1383 +5430,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, - //羊祜 - mingfa:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.storage.mingfa&&player.countCards('h')>0&&player.getCards('he').contains(player.storage.mingfa) - &&!player.hasSkillTag('noCompareSource')&&game.hasPlayer(function(current){ - return current!=player&&player.canCompare(current); - }); - }, - content:function(){ - 'step 0' - event.card=player.storage.mingfa; - delete player.storage.mingfa; - player.chooseTarget(get.prompt('mingfa'),'用'+get.translation(event.card)+'和一名其他角色拼点',function(card,player,target){ - return player.canCompare(target); - }).set('ai',function(target){ - var player=_status.event.player,card=_status.event.getParent().card; - if(card.number>9||!target.countCards('h',function(cardx){ - return cardx.number>=card.number+2; - })) return -get.attitude(player,target)/Math.sqrt(target.countCards('h')); - return 0; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('mingfa',target); - var next=player.chooseToCompare(target); - if(!next.fixedResult) next.fixedResult={}; - next.fixedResult[player.playerid]=event.card; - } - else{ - player.removeGaintag('mingfa'); - event.finish(); - } - 'step 2' - if(result.bool){ - player.gainPlayerCard(target,true,'he'); - if(event.card.number==1) event.finish(); - } - else{ - player.addTempSkill('mingfa_block'); - event.finish(); - } - 'step 3' - var card=get.cardPile2(function(card){ - return card.number==event.card.number-1; - }); - if(card) player.gain(card,'gain2'); - }, - group:['mingfa_choose','mingfa_add','mingfa_mark'], - subSkill:{ - block:{ - mod:{ - playerEnabled:function(card,player,target){ - if(player!=target) return false; - }, - }, - }, - choose:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - 'step 0' - player.chooseCard('he',get.prompt('mingfa'),'选择展示自己的一张牌').set('ai',function(card){ - return Math.min(13,get.number(card)+2)/Math.pow(Math.min(2,get.value(card)),0.25); - }); - 'step 1' - if(result.bool){ - var card=result.cards[0]; - player.logSkill('mingfa'); - player.removeGaintag('mingfa'); - player.addGaintag(card,'mingfa'); - player.storage.mingfa=card; - player.showCards(card,get.translation(player)+'发动了【明伐】'); - } - }, - }, - add:{ - trigger:{player:'compare',target:'compare'}, - filter:function(event,player){ - if(event.player==player) return !event.iwhile; - return true; - }, - forced:true, - locked:false, - content:function(){ - if(player==trigger.player){ - trigger.num1+=2; - if(trigger.num1>13) trigger.num1=13; - } - else{ - trigger.num2+=2; - if(trigger.num2>13) trigger.num2=13; - } - game.log(player,'的拼点牌点数+2') - }, - }, - mark:{ - trigger:{player:'gainEnd'}, - silent:true, - firstDo:true, - filter:function(event,player){ - return player.storage.mingfa&&event.cards.contains(player.storage.mingfa)&&player.getCards('h').contains(player.storage.mingfa); - }, - content:function(){ - player.addGaintag(player.storage.mingfa,'mingfa'); - }, - }, - }, - }, - rongbei:{ - audio:2, - enable:'phaseUse', - limited:true, - skillAnimation:true, - animationColor:'thunder', - filter:function(event,player){ - return game.hasPlayer((current)=>lib.skill.rongbei.filterTarget(null,player,current)); - }, - filterTarget:function(card,player,target){ - for(var i=1;i<6;i++){ - if(target.isEmpty(i)) return true; - } - return false; - }, - content:function(){ - 'step 0' - event.num=0; - player.awakenSkill('rongbei'); - 'step 1' - while(!target.isEmpty(event.num)){ - event.num++; - if(event.num>5){ - event.finish(); - return; - } - } - var card=get.cardPile2(function(card){ - return get.subtype(card)=='equip'+event.num&&target.canUse(card,target); - }); - if(card){ - target.chooseUseTarget(card,true,'nopopup'); - } - event.num++; - if(event.num<=5) event.redo(); - }, - ai:{ - order:5, - result:{ - target:function(player,target){ - return (target.hasSkillTag('noe')?2:1)*(5-target.countCards('e')-target.countDisabled()); - }, - }, - }, - }, - //桥公 - yizhu:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - forced:true, - locked:false, - content:function(){ - 'step 0' - player.draw(2); - 'step 1' - var hs=player.getCards('he'); - if(!hs.length) event.finish(); - else if(hs.length<=2) event._result={bool:true,cards:hs}; - else player.chooseCard('he',true,2,'选择两张牌洗入牌堆'); - 'step 2' - if(result.bool){ - player.$throw(result.cards.length,1000); - player.lose(result.cards,ui.cardPile).insert_index=function(){ - return ui.cardPile.childNodes[get.rand(0,game.players.length*2-2)]; - } - player.markAuto('yizhu',result.cards); - } - else event.finish(); - 'step 3' - game.updateRoundNumber(); - game.delayx(); - }, - intro:{ - mark:function(dialog,content,player){ - if(player==game.me||player.isUnderControl()) dialog.addAuto(content); - else{ - var names=[]; - for(var i of content) names.add(i.name); - return get.translation(names); - } - }, - }, - group:['yizhu_use','yizhu_discard'], - subSkill:{ - use:{ - audio:'yizhu', - trigger:{global:'useCardToPlayer'}, - filter:function(event,player){ - return player.storage.yizhu&&player.storage.yizhu.length&& - event.player!=player&&event.targets.length==1&& - event.cards.filter(function(i){ - return player.storage.yizhu.contains(i); - }).length>0; - }, - logTarget:'player', - check:function(event,player){ - return get.effect(event.targets[0],event.card,event.player,player)<0; - }, - prompt2:function(event,player){ - return '令'+get.translation(event.card)+'无效并可重新使用'; - }, - content:function(){ - trigger.cancel(); - trigger.targets.length=0; - trigger.getParent().triggeredTargets1.length=0; - var list=trigger.cards.filter(function(i){ - return player.storage.yizhu.contains(i); - }); - player.unmarkAuto('yizhu',list); - game.delayx(); - player.chooseUseTarget(trigger.card,trigger.cards,false,'nothrow'); - }, - }, - discard:{ - trigger:{ - global:['loseAfter','cardsDiscardAfter','loseAsyncAfter','equipAfter'], - }, - forced:true, - locked:false, - filter:function(event,player){ - return player.storage.yizhu&&player.storage.yizhu.length&&event.getd().filter(function(i){ - return player.storage.yizhu.contains(i); - }).length>0; - }, - content:function(){ - var list=trigger.getd().filter(function(i){ - return player.storage.yizhu.contains(i); - }); - player.unmarkAuto('yizhu',list); - player.draw(); - }, - }, - }, - }, - luanchou:{ - audio:2, - enable:'phaseUse', - usable:1, - selectTarget:2, - filterTarget:true, - multitarget:true, - multiline:true, - content:function(){ - game.countPlayer(function(current){ - var num=current.countMark('luanchou'); - if(num) current.removeMark('luanchou',num); - }); - targets.sortBySeat(); - for(var i of targets) i.addMark('luanchou',1); - }, - global:['gonghuan','gonghuan_clear'], - derivation:'gonghuan', - marktext:'姻', - intro:{ - name:'共患', - content:'锁定技。每回合限一次,一名其他角色受到伤害时,若其拥有“姻”标记且其体力值小于你,则你将伤害转移给自己。此伤害结算结束后,若你与其体力值相等,则你与其移去“姻”标记。', - onunmark:true, - }, - ai:{ - order:10, - expose:0.2, - result:{ - target:function(player,target){ - if(!ui.selected.targets.length) return -Math.pow(target.hp,3); - if(target.hp>=ui.selected.targets[0].hp) return 0; - return Math.pow(ui.selected.targets[0].hp-target.hp,3); - }, - }, - }, - }, - gonghuan:{ - audio:2, - forceaudio:true, - trigger:{global:'damageBegin4'}, - usable:1, - forced:true, - logTarget:'player', - filter:function(event,player){ - return event.player.hptarget.hp&&(!current.storage.counttrigger||!current.storage.counttrigger.gonghuan); - }); - if(!other){ - delete _status.luanchou_judging; - return; - }; - var eff=[0,0,0,get.damageEffect(other,player,target,get.nature(card))]; - delete _status.luanchou_judging; - return eff; - } - }, - }, - }, - subSkill:{ - clear:{ - trigger:{player:'damageEnd'}, - forced:true, - popup:false, - filter:function(event,player){ - return event._gonghuan_player; - }, - content:function(){ - player.removeMark('luanchou',player.countMark('luanchou')); - trigger._gonghuan_player.removeMark('luanchou',trigger._gonghuan_player.countMark('luanchou')); - }, - }, - }, - }, - //刘璋 - xiusheng:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - return player.storage.yinlang&&game.hasPlayer(function(current){ - return current.group==player.storage.yinlang; - }); - }, - content:function(){ - 'step 0' - if(player.storage.xiusheng&&player.storage.xiusheng.length>0) player.unmarkSkill('xiusheng'); - 'step 1' - event.num=game.countPlayer(function(current){ - return current.group==player.storage.yinlang; - }); - if(event.num>0) player.draw(event.num); - else event.finish(); - 'step 2' - var he=player.getCards('he'); - if(!he.length) event.finish(); - else if(he.length0) return 1.5; - if(!current.inRange(player)) return 1; - return 0.6; - }); - } - list.sort(function(a,b){ - return getn(b)-getn(a); - }); - return list[0]; - }()); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('yinlang',game.filterPlayer(function(current){ - return current.group==result.control; - })); - game.log(player,'选择了','#y'+get.translation(result.control+2)) - player.storage.yinlang=result.control; - player.markSkill('yinlang'); - } - }, - ai:{combo:'xiusheng'}, - intro:{content:'已选择了$势力'}, - group:'yinlang_gain', - subSkill:{ - round:{}, - gain:{ - audio:'yinlang', - trigger:{global:'phaseUseBegin'}, - forced:true, - locked:false, - filter:function(event,player){ - return event.player.group==player.storage.yinlang&&event.player.isIn()&&player.getStorage('xiusheng').length>0; - }, - logTarget:'player', - content:function(){ - 'step 0' - var str=get.translation(player); - event.target=trigger.player; - event.target.chooseControl().set('choiceList',[ - '获得'+str+'的一张“生”,然后本阶段使用牌时只能指定其为目标', - '令'+str+'获得一张“生”', - ]).set('ai',function(){ - var evt=_status.event.getParent(),player=evt.target,target=evt.player; - if(get.attitude(player,target)>0) return 1; - if(!player.countCards('hs',function(card){ - return player.hasValueTarget(card,null,true)&&(!player.canUse(card,target,null,true)||get.effect(target,card,player,player)<0) - })) return 0; - return 1; - }); - 'step 1' - event.gainner=(result.index==0)?target:player; - if(result.index==0) event.block=true; - event.gainner.chooseButton(['选择获得一张“生”',player.storage.xiusheng],true); - 'step 2' - player.unmarkAuto('xiusheng',result.links); - event.gainner.gain(result.links,'gain2'); - if(event.block){ - target.markAuto('yinlang_block',[player]); - target.addTempSkill('yinlang_block','phaseUseAfter'); - } - }, - }, - block:{ - mod:{ - playerEnabled:function(card,player,target){ - var info=get.info(card); - if(info&&info.singleCard&&ui.selected.cards.length) return; - if(!player.getStorage('yinlang_block').contains(target)) return false; - }, - }, - onremove:true, - }, - }, - }, - huaibi:{ - audio:2, - zhuSkill:true, - mod:{ - maxHandcard:function(player,num){ - if(player.storage.yinlang&&player.hasZhuSkill('huaibi')) return num+game.countPlayer(function(current){ - return current.group==player.storage.yinlang; - }); - }, - }, - ai:{combo:'yinlang'}, - }, - //张温 - gebo:{ - audio:2, - trigger:{global:'recoverAfter'}, - forced:true, - content:function(){ - game.cardsGotoSpecial(get.cards(),'toRenku'); - }, - }, - spsongshu:{ - audio:2, - trigger:{global:'phaseDrawBegin1'}, - logTarget:'player', - filter:function(event,player){ - return event.player.hp>player.hp&&player.hp>0&&!event.numFixed&&_status.renku.length>0; - }, - check:function(event,player){ - var num=Math.min(5,player.hp,_status.renku.length); - if(num<=event.num) return get.attitude(player,event.player)<0; - return false; - }, - content:function(){ - 'step 0' - trigger.changeToZero(); - var num=Math.min(5,player.hp,_status.renku.length); - trigger.player.chooseButton(['选择获得'+get.cnNumber(num)+'张牌',_status.renku],true,num); - 'step 1' - if(result.bool){ - var cards=result.links; - _status.renku.removeArray(cards); - game.updateRenku(); - trigger.player.gain(cards,'gain2','fromRenku'); - trigger.player.addTempSkill('spsongshu_block'); - } - }, - init:function(player){ - player.storage.renku=true; - }, - subSkill:{ - block:{ - mod:{ - playerEnabled:function(card,player,target){ - if(player!=target) return false; - }, - }, - mark:true, - intro:{content:'不能对其他角色使用牌'}, - }, - }, - }, - //张机 - jishi:{ - audio:2, - trigger:{player:'useCardAfter'}, - forced:true, - filter:function(event,player){ - return event.cards.filterInD().length>0&&!player.getHistory('sourceDamage',function(evt){ - return evt.card==event.card; - }).length; - }, - content:function(){ - var cards=trigger.cards.filterInD(); - game.log(player,'将',cards,'置于了仁库'); - game.cardsGotoSpecial(cards,'toRenku'); - }, - init:function(player){ - player.storage.renku=true; - }, - group:'jishi_draw', - subSkill:{ - draw:{ - trigger:{ - global:['gainAfter','cardsDiscardAfter'], - }, - forced:true, - filter:function(event,player){ - return event.fromRenku==true&&!event.outRange; - }, - content:function(){ - player.draw(); - }, - }, - }, - }, - xinliaoyi:{ - audio:'liaoyi', - trigger:{global:'phaseBegin'}, - filter:function(event,player){ - if(player==event.player) return false; - if(_status.renku.length) return true; - return event.player.countCards('h')>event.player.hp; - }, - direct:true, - content:function(){ - 'step 0' - var target=trigger.player; - event.target=target; - var num=Math.max(0,target.countCards('h')-target.hp); - var choiceList=['令其从仁库中获得一张牌','令其将'+get.cnNumber(num)+'张手牌置入仁库']; - var choices=[]; - if(_status.renku.length) choices.push('选项一'); - else choiceList[0]=''+choiceList[0]+''; - if(target.countCards('h')>target.hp){ - event.num=num; - choices.push('选项二'); - } - else choiceList[1]=''+choiceList[1]+''; - if(!choices.length) event.finish(); - else player.chooseControl(choices,'cancel2').set('prompt',get.prompt('xinliaoyi',target)).set('choiceList',choiceList).set('ai',function(){ - var player=_status.event.player,target=_status.event.getTrigger().player; - var att=get.attitude(player,target); - if(att>0){ - if(_status.renku.length>0) return '选项一'; - return 0; - } - if(target.countCards('h')>target.hp) return '选项二'; - return 'cancel2'; - }); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('xinliaoyi',target); - if(result.control=='选项一'){ - target.chooseButton(true,['选择获得一张牌',_status.renku]).set('ai',function(button){ - return get.value(button.link,_status.event.player); - }); - event.goto(4); - } - else{ - var hs=target.getCards('h'); - if(hs.length<=num) event._result={bool:true,cards:hs}; - else target.chooseCard('h',true,'将'+get.cnNumber(num)+'张手牌置于仁库中',num); - } - } - else event.finish(); - 'step 2' - if(result.bool){ - target.$throw(result.cards,1000); - game.log(target,'将',result.cards,'置入了仁库'); - target.lose(result.cards,ui.special,'toRenku'); - } - else event.finish(); - 'step 3' - game.delayx(); - event.finish(); - 'step 4' - var cards=result.links; - _status.renku.removeArray(cards); - game.updateRenku(); - target.gain(cards,'gain2','fromRenku'); - }, - init:function(player){ - player.storage.renku=true; - }, - ai:{threaten:3.4}, - }, - liaoyi:{ - audio:2, - trigger:{global:'phaseBegin'}, - filter:function(event,player){ - if(player==event.player) return false; - var num=event.player.hp-event.player.countCards('h'); - if(num<0) return true; - return num>0&&_status.renku.length>=Math.min(4,num); - }, - logTarget:'player', - prompt2:function(event,player){ - var target=event.player,num=target.hp-target.countCards('h'); - if(num<0) return '令'+get.translation(target)+'将'+get.cnNumber(Math.min(4,-num))+'张牌置入仁库'; - return '令'+get.translation(target)+'从仁库中获得'+get.cnNumber(Math.min(4,num))+'张牌'; - }, - check:function(event,player){ - var target=event.player,num=target.hp-target.countCards('h'),att=get.attitude(player,target); - if(num<0){ - if(target.countCards('e',function(card){ - return get.value(card,target)<=0; - })>=(-num/2)) return att>0; - return att<=0; - } - return att>0; - }, - content:function(){ - 'step 0' - var target=trigger.player,num=target.hp-target.countCards('h'); - event.target=target; - if(num<0){ - num=Math.min(4,-num); - target.chooseCard('he',true,'将'+get.cnNumber(num)+'张牌置于仁库中',num); - } - else{ - num=Math.min(4,num); - target.chooseButton(['选择获得'+get.cnNumber(num)+'张牌',_status.renku],num,true).set('ai',function(button){ - return get.value(button.link,_status.event.player); - }); - event.goto(3); - } - 'step 1' - if(result.bool){ - target.$throw(result.cards,1000); - game.log(target,'将',result.cards,'置入了仁库'); - target.lose(result.cards,ui.special,'toRenku'); - } - else event.finish(); - 'step 2' - game.delayx(); - event.finish(); - 'step 3' - var cards=result.links; - _status.renku.removeArray(cards); - game.updateRenku(); - target.gain(cards,'gain2','fromRenku'); - }, - }, - binglun:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return _status.renku.length>0; - }, - chooseButton:{ - dialog:function(event,player){ - return ui.create.dialog('病论',_status.renku); - }, - backup:function(links,player){ - var obj=lib.skill.binglun_backup; - obj.card=links[0]; - return obj; - }, - prompt:()=>'请选择【病论】的目标', - }, - subSkill:{ - backup:{ - audio:'binglun', - filterCard:()=>false, - selectCard:-1, - filterTarget:true, - delay:false, - content:function(){ - 'step 0' - var card=lib.skill.binglun_backup.card; - game.log(card,'从仁库进入了弃牌堆'); - player.$throw(card,1000); - game.delayx(); - game.cardsDiscard(card).fromRenku=true; - _status.renku.remove(card); - game.updateRenku(); - 'step 1' - target.chooseControl().set('choiceList',[ - '摸一张牌', - '于自己的下回合结束后回复1点体力', - ]).set('ai',function(){ - if(_status.event.player.isHealthy()) return 0; - return 1; - }); - 'step 2' - if(result.index==0) target.draw(); - else{ - target.addSkill('binglun_recover'); - target.addMark('binglun_recover',1,false); - } - }, - ai:{ - result:{ - target:function(player,target){ - if(target.isDamaged()) return 1.5; - return 1; - }, - }, - }, - }, - recover:{ - trigger:{player:'phaseEnd'}, - forced:true, - popup:false, - onremove:true, - charlotte:true, - content:function(){ - if(player.isDamaged()){ - player.logSkill('binglun_recover'); - player.recover(player.countMark('binglun_recover')); - } - player.removeSkill('binglun_recover'); - }, - intro:{ - content:'下回合结束时回复#点体力', - }, - ai:{threaten:1.7}, - }, - }, - ai:{ - order:2, - result:{ - player:1, - }, - }, - }, - mjweipo:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return !current.hasSkill('mjweipo_effect'); - }); - }, - filterTarget:function(card,player,target){ - return !target.hasSkill('mjweipo_effect'); - }, - content:function(){ - 'step 0' - var list=['binglinchengxiax']; - list.addArray(get.zhinangs()); - player.chooseButton(['危迫:选择一个智囊',[list,'vcard']],true).set('ai',function(button){ - return _status.event.getParent().target.getUseValue({name:button.link[2]}); - }); - 'step 1' - if(result.bool){ - var name=result.links[0][2]; - game.log(player,'选择了','#y'+get.translation(name)); - target.storage.mjweipo_effect=name; - target.storage.mjweipo_source=player; - target.addSkill('mjweipo_effect'); - game.delayx(); - } - }, - ai:{ - order:7.1, - result:{ - target:function(player,target){ - if(target==player) return player.countCards('hs','sha')>0?10:0.01; - return (target.countCards('hs','sha')+0.5)*Math.sqrt(Math.max(1,target.hp)); - }, - }, - }, - }, - mjweipo_effect:{ - audio:'mjweipo', - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h','sha')>0; - }, - prompt:function(){ - return '弃置一张【杀】并获得一张'+get.translation(_status.event.player.storage.mjweipo_effect); - }, - filterCard:{name:'sha'}, - check:function(card){ - return 6-get.value(card); - }, - position:'h', - popname:true, - content:function(){ - var name=player.storage.mjweipo_effect,card=false; - if(name=='binglinchengxiax'){ - if(!_status.binglinchengxiax){ - _status.binglinchengxiax=[ - ['spade',7], - ['club',7], - ['club',13], - ]; - game.broadcastAll(function(){lib.inpile.add('binglinchengxiax')}); - } - if(_status.binglinchengxiax.length){ - var info=_status.binglinchengxiax.randomRemove(); - card=game.createCard2('binglinchengxiax',info[0],info[1]); - } - } - if(!card) card=get.cardPile2(name); - if(card) player.gain(card,'gain2'); - player.removeSkill('mjweipo_effect'); - }, - ai:{ - order:7, - result:{player:1}, - }, - mark:true, - marktext:'迫', - intro:{content:'可弃置一张【杀】并获得【$】'}, - group:'mjweipo_remove', - }, - mjweipo_remove:{ - trigger:{global:['phaseBegin','die']}, - forced:true, - firstDo:true, - popup:false, - filter:function(event,player){ - return event.player==player.storage.mjweipo_source; - }, - content:function(){ - player.removeSkill('mjweipo_effect'); - }, - }, - mjchenshi:{ - audio:2, - global:['mjchenshi_player','mjchenshi_target'], - ai:{combo:'mjweipo'}, - }, - mjchenshi_player:{ - trigger:{player:'useCardToPlayered'}, - direct:true, - filter:function(event,player){ - if(!event.card||event.card.name!='binglinchengxiax'||!event.isFirstTarget) return false; - return player.countCards('he')>0&&game.hasPlayer(function(current){ - return current!=player&¤t.hasSkill('mjchenshi'); - }); - }, - content:function(){ - 'step 0' - var list=game.filterPlayer(function(current){ - return current!=player&¤t.hasSkill('mjchenshi'); - }); - player.chooseCardTarget({ - prompt:'是否交给'+get.translation(list)+'一张牌,将牌堆顶三张牌中不为【杀】的牌置于弃牌堆?', - filterCard:true, - position:'he', - filterTarget:function(card,player,target){ - return _status.event.list.contains(target); - }, - list:list, - selectTarget:list.length>1?1:-1, - goon:function(){ - for(var i of list){ - if(get.attitude(player,i)>0) return 1; - return -1; - } - }(), - ai1:function(card){ - if(_status.event.goon>0) return 7-get.value(card); - return 0.01-get.value(card); - }, - ai2:function(target){ - var card=ui.selected.cards[0]; - return get.value(card,target)*get.attitude(_status.event.player,target); - }, - }); - 'step 1' - if(result.bool&&result.cards.length&&result.targets.length){ - var target=result.targets[0]; - target.logSkill('mjchenshi'); - player.line(target,'green'); - player.give(result.cards,target); - trigger.getParent().mjchenshi_ai=true; - } - else event.finish(); - 'step 2' - var cards=get.cards(3); - for(var i=cards.length-1;i>=0;i--){ - if(cards[i].name=='sha'){ - cards[i].fix(); - ui.cardPile.insertBefore(cards[i],ui.cardPile.firstChild); - cards.splice(i,1); - } - } - if(cards.length){ - player.$throw(cards,1000); - game.delayx(); - game.cardsDiscard(cards); - game.log(cards,'进入了弃牌堆'); - } - }, - }, - mjchenshi_target:{ - trigger:{target:'useCardToTargeted'}, - direct:true, - filter:function(event,player){ - if(!event.card||event.card.name!='binglinchengxiax') return false; - return player.countCards('he')>0&&game.hasPlayer(function(current){ - return current!=player&¤t.hasSkill('mjchenshi'); - }); - }, - content:function(){ - 'step 0' - var list=game.filterPlayer(function(current){ - return current!=player&¤t.hasSkill('mjchenshi'); - }); - player.chooseCardTarget({ - prompt:'是否交给'+get.translation(list)+'一张牌,将牌堆顶三张牌中的【杀】置于弃牌堆?', - filterCard:true, - position:'he', - filterTarget:function(card,player,target){ - return _status.event.list.contains(target); - }, - list:list, - selectTarget:list.length>1?1:-1, - goon:function(){ - if(trigger.getParent().chenshi_ai) return 1; - for(var i of list){ - if(get.attitude(player,i)>0) return 1; - return -1; - } - }(), - ai1:function(card){ - if(_status.event.goon>0) return 7-get.value(card); - return 3-get.value(card); - }, - ai2:function(target){ - var card=ui.selected.cards[0]; - return Math.max(0.1,get.value(card,target)*get.attitude(_status.event.player,target)); - }, - }); - 'step 1' - if(result.bool&&result.cards.length&&result.targets.length){ - var target=result.targets[0]; - target.logSkill('mjchenshi'); - player.line(target,'green'); - player.give(result.cards,target); - } - else event.finish(); - 'step 2' - var cards=get.cards(3); - for(var i=cards.length-1;i>=0;i--){ - if(cards[i].name!='sha'){ - cards[i].fix(); - ui.cardPile.insertBefore(cards[i],ui.cardPile.firstChild); - cards.splice(i,1); - } - } - if(cards.length){ - player.$throw(cards,1000); - game.delayx(); - game.cardsDiscard(cards); - game.log(cards,'进入了弃牌堆'); - } - }, - }, - mjmouzhi:{ - audio:2, - trigger:{player:'damageBegin2'}, - forced:true, - filter:function(event,player){ - if(!event.card||get.suit(event.card)=='none') return false; - var all=player.getAllHistory('damage'); - if(!all.length) return false; - return all[all.length-1].card&&get.suit(all[all.length-1].card)==get.suit(event.card); - }, - content:function(){ - trigger.cancel(); - }, - group:'mjmouzhi_mark', - intro:{content:'上次受到伤害的花色:$'}, - ai:{ - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - var color=get.suit(card); - if(color=='none') return; - var all=target.getAllHistory('damage'); - if(!all.length||!all[all.length-1].card) return; - if(get.suit(all[all.length-1].card)==color) return 'zerotarget'; - } - }, - }, - }, - subSkill:{ - mark:{ - trigger:{player:'damage'}, - silent:true, - firstDo:true, - content:function(){ - if(!trigger.card||get.suit(trigger.card)=='none') player.unmarkSkill('mjmouzhi'); - else{ - player.markSkill('mjmouzhi'); - game.broadcastAll(function(player,suit){ - if(player.marks.mjmouzhi) player.marks.mjmouzhi.firstChild.innerHTML=get.translation(suit); - player.storage.mjmouzhi=suit; - },player,get.suit(trigger.card)) - } - }, - }, - }, - }, - mjshengxi:{ - audio:'shengxi', - audioname:['feiyi'], - trigger:{player:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return player.getHistory('useCard').length>0&&player.getHistory('sourceDamage').length==0; - }, - content:function(){ - 'step 0' - var list=get.zhinangs(); - player.chooseButton(['是否发动【生息】获得一张智囊?',[list,'vcard']]).set('ai',function(card){ - return (Math.random()+0.5)*get.value({name:card.link[2]},_status.event.player) - }); - 'step 1' - if(result.bool){ - player.logSkill('mjshengxi'); - var card=get.cardPile2(function(card){ - return card.name==result.links[0][2]; - }); - if(card) player.gain(card,'gain2'); - } - }, - group:'mjshengxi_zhunbei', - subfrequent:['zhunbei'], - subSkill:{ - zhunbei:{ - trigger:{player:'phaseZhunbeiBegin'}, - frequent:true, - prompt2:'从游戏外或牌堆中获得一张【调剂盐梅】', - content:function(){ - if(!_status.tiaojiyanmei_suits||_status.tiaojiyanmei_suits.length>0){ - if(!lib.inpile.contains('tiaojiyanmei')) lib.inpile.add('tiaojiyanmei'); - if(!_status.tiaojiyanmei_suits) _status.tiaojiyanmei_suits=lib.suit.slice(0); - player.gain(game.createCard2('tiaojiyanmei',_status.tiaojiyanmei_suits.randomRemove(),6),'gain2'); - } - else{ - var card=get.cardPile2(function(card){ - return card.name=='tiaojiyanmei'; - }); - if(card) player.gain(card,'gain2'); - } - }, - } - }, - }, - mjkuanji:{ - audio:'fyjianyu', - usable:1, - trigger:{ - player:'loseAfter', - global:'loseAsyncAfter', - }, - direct:true, - filter:function(event,player){ - if(event.type!='discard') return false; - var evt=event.getl(player); - return evt.cards2.filterInD('d').length>0; - }, - content:function(){ - 'step 0' - var cards=trigger.getl(player).cards2; - player.chooseButton(['宽济:是否将一张牌交给一名其他角色?',cards.filterInD('d')]).set('ai',function(button){ - var player=_status.event.player; - if(game.hasPlayer(function(current){ - return current!=player&&get.attitude(player,current)>0; - })) return Math.abs(get.value(button.link,'raw'))+1; - return -get.value(button.link,'raw'); - }); - 'step 1' - if(result.bool){ - event.card=result.links[0]; - player.chooseTarget('将'+get.translation(card)+'交给一名其他角色并摸一张牌',lib.filter.notMe,true).set('ai',function(target){ - var evt=_status.event.getParent(); - return get.attitude(evt.player,target)*get.value(evt.card,target)*(target.hasSkillTag('nogain')?0.1:1); - }); - } - else{ - player.storage.counttrigger.mjkuanji--; - event.finish(); - } - 'step 2' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('mjkuanji',target); - target.gain(card,'gain2'); - player.draw(); - } - }, - }, - mjdingyi:{ - audio:2, - trigger:{ - global:'phaseBefore', - player:'enterGame', - }, - forced:true, - locked:false, - filter:function(event,player){ - return (event.name!='phase'||game.phaseNumber==0); - }, - logTarget:function(){ - return game.players; - }, - content:function(){ - 'step 0' - var list=[]; - for(var i=0;i<4;i++) list.push(lib.skill['mjdingyi_'+i].title); - player.chooseControl().set('choiceList',list).set('prompt','定仪:请选择一个全局效果').set('ai',function(target){ - var list1=player.getEnemies().length; - var list2=game.players.length-list1; - if(list2-list1>1) return 0; - if(game.players.length<6) return 2; - return 3; - }); - 'step 1' - if(typeof result.index=='number'){ - var skill='mjdingyi_'+result.index; - game.log(player,'选择了','#g'+lib.skill[skill].title); - for(var i of game.players) i.addSkill(skill); - game.delayx(); - } - }, - subSkill:{ - 0:{ - title:'摸牌阶段的额定摸牌数+1', - charlotte:true, - mark:true, - marktext:'仪', - trigger:{player:'phaseDrawBegin'}, - forced:true, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - trigger.num+=((player.storage.mjdingyi_plus||0)+1); - }, - intro:{ - content:function(storage,player){ - return '摸牌阶段的额定摸牌数+'+(1*((player.storage.mjdingyi_plus||0)+1)); - }, - }, - }, - 1:{ - title:'手牌上限+2', - charlotte:true, - mark:true, - marktext:'仪', - mod:{ - maxHandcard:function(player,num){ - return num+2*((player.storage.mjdingyi_plus||0)+1); - }, - }, - intro:{ - content:function(storage,player){ - return '手牌上限+'+(2*((player.storage.mjdingyi_plus||0)+1)); - }, - }, - }, - 2:{ - title:'攻击范围+1', - charlotte:true, - mark:true, - marktext:'仪', - mod:{ - attackRange:function(player,num){ - return num+((player.storage.mjdingyi_plus||0)+1); - }, - }, - intro:{ - content:function(storage,player){ - return '攻击范围+'+((player.storage.mjdingyi_plus||0)+1); - }, - }, - }, - 3:{ - title:'脱离濒死状态后回复1点体力', - charlotte:true, - mark:true, - marktext:'仪', - trigger:{player:'dyingAfter'}, - forced:true, - filter:function(event,player){ - return player.isDamaged(); - }, - content:function(){ - player.recover((player.storage.mjdingyi_plus||0)+1); - }, - intro:{ - content:function(storage,player){ - return '脱离濒死状态后回复'+((player.storage.mjdingyi_plus||0)+1)+'点体力'; - }, - }, - }, - }, - }, - mjzuici:{ - audio:'zuici', - trigger:{player:'damageEnd'}, - filter:function(event,player){ - if(!event.source||!event.source.isIn()) return false; - for(var i=0;i<4;i++){ - if(event.source.hasSkill('mjdingyi_'+i)) return true; - } - return false; - }, - logTarget:'source', - check:()=>false, - content:function(){ - 'step 0' - var target=trigger.source; - event.target=target; - for(var i=0;i<4;i++){ - if(target.hasSkill('mjdingyi_'+i)) target.removeSkill('mjdingyi_'+i); - } - 'step 1' - var list=get.zhinangs(); - if(list.length){ - player.chooseButton(['选择要令'+get.translation(target)+'获得的智囊',[list,'vcard']],true); - } - else event.finish(); - 'step 2' - if(result.bool){ - var card=get.cardPile2(function(card){ - return card.name==result.links[0][2]; - }) - if(card) target.gain(card,'gain2'); - } - }, - }, - mjfubi:{ - audio:'fubi', - enable:'phaseUse', - filter:function(event,player){ - if(player.hasSkill('mjfubi_round')) return false; - return game.hasPlayer(function(current){ - for(var i=0;i<4;i++){ - if(current.hasSkill('mjdingyi_'+i)) return true; - } - }); - }, - filterCard:true, - selectCard:[0,1], - filterTarget:function(card,player,target){ - if(ui.selected.cards.length){ - for(var i=0;i<4;i++){ - if(target.hasSkill('mjdingyi_'+i)) return true; - } - } - var num=0; - for(var i=0;i<4;i++){ - if(target.hasSkill('mjdingyi_'+i)) return true; - } - return num>1&&num<4; - }, - check:()=>false, - position:'he', - content:function(){ - 'step 0' - player.addTempSkill('mjfubi_round','roundStart'); - if(cards.length){ - player.addSkill('mjfubi_clear'); - player.markAuto('mjfubi_clear',[target]); - target.addMark('mjdingyi_plus',1,false); - game.log(target,'的','#g【定仪】','效果增加一倍'); - event.finish(); - return; - } - var list=[],nums=[]; - for(var i=0;i<4;i++){ - if(!target.hasSkill('mjdingyi_'+i)){ - list.push(lib.skill['mjdingyi_'+i].title); - nums.push(i); - } - } - if(list.length){ - event.nums=nums; - player.chooseControl().set('choiceList',list).set('prompt','辅弼:请选择为'+get.translation(target)+'更换的〖定仪〗效果').set('ai',function(){ - var player=_status.event.player,target=_status.event.getParent().target; - if(get.attitude(player,target)>0&&!target.hasSkill('mjdingyi_0')) return 0; - return _status.event.getParent().nums.length-1; - }); - } - else event.finish(); - 'step 1' - for(var i=0;i<4;i++){ - if(target.hasSkill('mjdingyi_'+i)) target.removeSkill('mjdingyi_'+i); - } - target.addSkill('mjdingyi_'+event.nums[result.index]); - game.log(target,'的效果被改为','#g'+lib.skill['mjdingyi_'+event.nums[result.index]].title); - }, - ai:{ - order:10, - expose:0, - result:{ - target:function(player,target){ - if(target.hasSkill('mjdingyi_0')) return -1; - return 2; - }, - }, - }, - subSkill:{ - round:{}, - clear:{ - trigger:{player:['phaseBegin','dieBegin']}, - forced:true, - popup:false, - charlotte:true, - content:function(){ - while(player.storage.mjfubi_clear&&player.storage.mjfubi_clear.length){ - var target=player.storage.mjfubi_clear.shift(); - if(target.hasMark('mjdingyi_plus')) target.removeMark('mjdingyi_plus',1,false); - } - delete player.storage.mjfubi_clear; - player.removeSkill('mjfubi_clear'); - }, - }, - }, - }, mobilezhongyong:{ audio:2, trigger:{player:'useCardAfter'}, @@ -9701,467 +5575,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - boming:{ - audio:2, - enable:'phaseUse', - usable:2, - filter:function(event,player){ - return player.countCards('he')>0; - }, - filterCard:true, - position:'he', - filterTarget:lib.filter.notMe, - discard:false, - lose:false, - delay:false, - content:function(){ - player.give(cards,target); - }, - check:function(card){ - return 5-get.value(card); - }, - ai:{ - order:10, - result:{ - target:function(player,target){ - if(!ui.selected.cards.length) return 0; - var card=ui.selected.cards[0]; - if(player.hasSkill('ejian')&&!player.getStorage('ejian').contains(target)){ - var dam=get.damageEffect(target,player,target); - if(dam>0) return dam; - var type=get.type(card,target),ts=target.getCards('he',function(card){ - return get.type(card)==type; - }); - if(ts.length){ - var val=get.value(ts,target); - if(val>get.value(card)) return -Math.max(1,val); - return 0; - } - } - return get.value(card,target)/1.5; - }, - }, - }, - group:'boming_draw', - subSkill:{ - draw:{ - trigger:{player:'phaseJieshuBegin'}, - forced:true, - locked:false, - filter:function(event,player){ - return player.getHistory('lose',function(evt){ - return evt.getParent(2).name=='boming'; - }).length>1; - }, - content:function(){ - player.draw(); - }, - }, - }, - }, - ejian:{ - audio:2, - trigger:{global:'gainAfter'}, - forced:true, - filter:function(event,player){ - var evt=event.getParent(),target=event.player; - if(evt.name!='boming'||evt.player!=player||player.getStorage('ejian').contains(target)||!target.isIn()) return false; - var he=target.getCards('he'),card=event.cards[0]; - if(!he.contains(card)) return false; - var type=get.type2(card); - for(var i of he){ - if(i!=card&&get.type2(i)==type) return true; - } - return false; - }, - logTarget:'player', - content:function(){ - 'step 0' - event.cardType=get.type2(trigger.cards[0]); - event.target=trigger.player; - player.markAuto('ejian',[event.target]); - event.target.chooseControl().set('choiceList',[ - '受到1点伤害', - '展示手牌并弃置所有'+get.translation(event.cardType)+'牌', - ]).set('ai',function(event,player){ - if(get.damageEffect(player,_status.event.getParent().player,player)>=0) return 0; - var type=_status.event.cardType,cards=player.getCards('he',function(card){ - return get.type2(card)==type; - }); - if(cards.length==1) return 1; - if(cards.length>=2){ - for(var i=0;i=8) return 0; - } - if(cards.length>2&&player.hp>2) return 0; - if(cards.length>3) return 0; - return 1; - }).set('cardType',event.cardType); - 'step 1' - if(result.index==1){ - if(target.countCards('h')>0) target.showHandcards(); - } - else{ - target.damage(); - event.finish(); - } - 'step 2' - target.discard(target.getCards('he',function(card){ - return get.type2(card)==event.cardType; - })); - }, - ai:{combo:'boming',halfneg:true}, - onremove:true, - intro:{content:'已对$发动过此技能'}, - }, - hxrenshi:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h')>0&&(!player.storage.hxrenshi2||game.hasPlayer(function(current){ - return !player.storage.hxrenshi2.contains(current); - })) - }, - filterCard:true, - filterTarget:function(card,player,target){ - return !player.storage.hxrenshi2||!player.storage.hxrenshi2.contains(target); - }, - position:'h', - discard:false, - lose:false, - delay:false, - check:function(cardx){ - var player=_status.event.player; - if(player.getStorage('debao').length==1&&(!game.hasPlayer(function(current){ - return get.attitude(player,current)>0&¤t.hp*1.5+current.countCards('h')<4; - })||game.hasPlayer(function(current){ - return get.attitude(player,current)<=0&¤t.hp*1.5+current.countCards('h')<4; - }))) return 0; - return 5-get.value(cardx); - }, - content:function(){ - player.addTempSkill('hxrenshi2','phaseUseEnd'); - player.markAuto('hxrenshi2',targets); - player.give(cards,target); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(ui.selected.cards.length) return get.value(ui.selected.cards[0],target)+0.1; - return 0; - }, - }, - }, - }, - hxrenshi2:{ - onremove:true, - }, - debao:{ - audio:2, - trigger:{global:'gainAfter'}, - forced:true, - filter:function(event,player){ - if(player==event.player||player.getStorage('debao').length>=player.maxHp) return false; - var evt=event.getl(player); - return evt&&evt.cards2&&evt.cards2.length>0; - }, - content:function(){ - var cards=get.cards(); - player.markAuto('debao',cards); - player.$gain2(cards[0],false); - game.cardsGotoSpecial(cards); - game.log(player,'将',cards[0],'放在了武将牌上'); - game.delayx(); - }, - marktext:'仁', - intro:{content:'cards',onunmark:'throw'}, - group:'debao_gain', - subSkill:{ - gain:{ - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - return player.getStorage('debao').length>0; - }, - content:function(){ - var cards=player.storage.debao; - player.gain(cards,'gain2','fromStorage'); - cards.length=0; - player.unmarkSkill('debao'); - }, - }, - }, - }, - buqi:{ - audio:2, - trigger:{global:'dying'}, - forced:true, - filter:function(event,player){ - return player.getStorage('debao').length>1; - }, - logTarget:'player', - content:function(){ - 'step 0' - var cards=player.getStorage('debao'); - if(cards.length==2) event._result={bool:true,links:cards.slice(0)}; - else player.chooseButton(['不弃:请选择移去两张“仁”',cards],2,true); - 'step 1' - if(result.bool){ - var cards=result.links; - player.unmarkAuto('debao',cards); - player.$throw(cards,1000); - game.log(player,'将',cards,'置入了弃牌堆'); - game.delayx(); - game.cardsDiscard(cards); - } - else event.finish(); - 'step 2' - if(trigger.player.isIn()&&trigger.player.isDamaged()) trigger.player.recover(); - }, - group:'buqi_die', - subSkill:{ - die:{ - trigger:{global:'dieAfter'}, - forced:true, - filter:function(event,player){ - return player.getStorage('debao').length>0; - }, - content:function(){ - player.unmarkSkill('debao'); - }, - }, - }, - ai:{ - neg:true, - combo:'debao', - }, - }, - guying:{ - audio:2, - trigger:{ - player:'loseAfter', - global:'loseAsyncAfter', - }, - forced:true, - usable:1, - filter:function(event,player){ - if(event.type!='discard'){ - var evt=event.getParent(); - if(evt.name!='useCard'&&evt.name!='respond') return false; - } - var target=_status.currentPhase,evt=event.getl(player); - if(!evt.cards2||evt.cards2.length!=1||!target||target==player||!target.isIn()) return false; - return get.position(evt.cards2[0])=='d'||target.countCards('he')<0; - }, - logTarget:function(){ - return _status.currentPhase; - }, - content:function(){ - 'step 0' - if(trigger.delay===false) game.delayx(); - event.target=_status.currentPhase; - event.card=trigger.getl(player).cards2[0]; - 'step 1' - player.addMark('guying',1,false); - event.addIndex=0; - var choiceList=[],str=get.translation(player); - if(target.countCards('he')>0) choiceList.push('随机交给'+str+'一张牌'); - else event.addIndex++; - if(get.position(card)=='d') choiceList.push('令'+str+'收回'+get.translation(card)); - if(choiceList.length==1) event._result={index:0}; - target.chooseControl().set('choiceList',choiceList).set('ai',function(){ - var player=_status.event.player,evt=_status.event.getParent(); - if(get.value(evt.card,evt.player)*get.attitude(player,evt.player)>0) return 0; - return Math.random()>(get.value(evt.card,evt.player)/6)?1:0; - return 1; - }); - 'step 2' - if(result.index+event.addIndex==0){ - target.give(target.getCards('he').randomGet(),player); - event.finish(); - } - else player.gain(card,'gain2'); - 'step 3' - if(player.isIn()&&player.getCards('h').contains(card)&&get.type(card,player)=='equip') player.chooseUseTarget(card,true,'nopopup'); - }, - onremove:true, - intro:{content:'已发动过#次'}, - group:'guying_discard', - subSkill:{ - discard:{ - audio:'guying', - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - return player.countMark('guying')>0; - }, - content:function(){ - var num=player.countMark('guying'); - player.removeMark('guying',num,false); - player.chooseToDiscard('he',num,true); - }, - }, - }, - }, - muzhen:{ - audio:2, - enable:'phaseUse', - usable:2, - filter:function(event,player){ - if(!player.hasSkill('muzhen1')&&player.countCards('e')>0&&game.hasPlayer(function(current){ - return current!=player&¤t.countCards('h')>0; - })) return true; - if(!player.hasSkill('muzhen2')&&player.countCards('he')>1&&game.hasPlayer(function(current){ - return current!=player&¤t.countCards('e')>0; - })) return true; - return false; - }, - chooseButton:{ - dialog:function(event,player){ - var list=[ - '将一张装备牌置于其他角色的装备区内并获得其一张手牌', - '将两张牌交给一名其他角色并获得其装备区内的一张牌', - ]; - var choiceList=ui.create.dialog('睦阵:请选择一项','hidden'); - for(var i=0;i0&&game.hasPlayer(function(current){ - return current!=player&¤t.countCards('h')>0; - }) - return !player.hasSkill('muzhen2')&&player.countCards('he')>1&&game.hasPlayer(function(current){ - return current!=player&¤t.countCards('e')>0; - }); - }, - backup:function(links){ - return { - audio:'muzhen', - filterTarget:[ - function(card,player,target){ - return target.countCards('h')>0&&target.isEmpty(ui.selected.cards[0]); - }, - function(card,player,target){ - return target.countCards('e')>0; - } - ][links[0]], - filterCard:[ - function(card,player){ - if(ui.selected.targets.length) return ui.selected.targets[0].isEmpty(card); - return game.hasPlayer(function(current){ - return current.countCards('h')>0&¤t.isEmpty(card); - }) - }, - true, - ], - selectCard:1+links[0], - position:('eh')[links[0]], - discard:false, - lose:false, - delay:false, - content:function(){ - 'step 0' - player.addTempSkill('muzhen'+cards.length,'phaseUseEnd'); - if(cards.length==1){ - player.$giveAuto(cards[0],target); - game.delayx(); - target.equip(cards[0]); - } - else{ - player.give(cards,target); - } - player.gainPlayerCard(target,cards.length==2?'e':'h',true); - }, - } - }, - prompt:function(){ - return '请选择【睦阵】的牌和目标' - }, - }, - }, - muzhen1:{}, - muzhen2:{}, - sheyi2:{charlotte:true}, - sheyi:{ - audio:2, - trigger:{global:'damageBegin4'}, - direct:true, - filter:function(event,player){ - return !player.hasSkill('sheyi2')&&player!=event.player&&event.player.hp=Math.max(1,player.hp); - }, - content:function(){ - 'step 0' - var num=Math.max(1,player.hp),target=trigger.player; - player.chooseCard('he',get.prompt('sheyi',target),'交给其至少'+get.cnNumber(num)+'张牌,防止即将受到的伤害('+trigger.num+'点)',[num,player.countCards('he')]).set('goon',function(){ - if(get.attitude(player,target)<0) return false; - if(trigger.num=0) return false; - if(trigger.num<2&&target.hp>trigger.num) return 6/Math.sqrt(num); - if(target==get.zhu(player)) return 9; - return 8/Math.sqrt(num); - }()).set('ai',function(card){ - if(ui.selected.cards.length>=Math.max(1,_status.event.player.hp)) return 0; - if(typeof _status.event.goon=='number') return _status.event.goon-get.value(card); - return 0; - }); - 'step 1' - if(result.bool){ - var target=trigger.player; - player.logSkill('sheyi',target); - player.addTempSkill('sheyi2','roundStart'); - player.give(result.cards,target); - trigger.cancel(); - } - }, - }, - tianyin:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - forced:true, - filter:function(event,player){ - var list=[]; - player.getHistory('useCard',function(evt){ - list.add(get.type2(evt.card,false)); - }); - for(var i=0;i0; - }, - content:function(){ - 'step 0' - event.count=trigger.num; - 'step 1' - event.count--; - trigger.source.chooseToDiscard('he',true); - 'step 2' - if(event.count>0&&result.bool&&lib.skill.spmingshi.filter(trigger,player)) event.goto(1); - }, - ai:{ - threaten:0.8, - maixie:true, - maixie_defend:true, - }, - }, - splirang:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - var hs=player.getCards('h'); - if(!hs.length) return false; - for(var i of hs){ - if(!lib.filter.cardDiscardable(i,player,'splirang')) return false; - } - return true; - }, - filterCard:true, - selectCard:-1, - content:function(){ - 'step 0' - cards=cards.filterInD('d'); - if(!cards.length||player.hp<1) event.goto(3); - else player.chooseButton(['将任意张牌交给一名其他角色',cards],[1,Math.min(cards.length,player.hp)]).set('ai',function(button){ - return get.value(button.link); - }); - 'step 1' - if(result.bool){ - event.cards=result.links; - player.chooseTarget(true,'令一名角色获得'+get.translation(event.cards),lib.filter.notMe).set('ai',function(target){ - var player=_status.event.player,att=get.attitude(player,target); - if(target.hasSkillTag('nogain')) att/=10; - if(target.hasJudge('lebu')) att/=5; - return att; - }); - } - else event.goto(3); - 'step 2' - if(result.targets&&result.targets.length){ - var target=result.targets[0]; - player.line(target,'green'); - target.gain(cards,'gain2'); - } - 'step 3' - player.draw(); - }, - ai:{ - order:0.1, - result:{ - player:function(player){ - var hs=player.getCards('h'); - if(hs.length<=player.hp&&game.hasPlayer(function(current){ - return current!=player&&get.attitude(player,current)>0&&!current.hasJudge('lebu')&&!current.hasSkillTag('nogain'); - })) return 1; - if(get.value(hs,player)<6) return 1; - return 0; - }, - }, - }, - }, - xianghai:{ - audio:2, - global:'xianghai_g', - mod:{ - cardname:function(card){ - if(get.type(card,null,false)=='equip') return 'jiu'; - }, - }, - ai:{ - threaten:2, - }, - }, - xianghai_g:{ - mod:{ - maxHandcard:function(player,num){ - return num-game.countPlayer(function(current){ - return current!=player&¤t.hasSkill('xianghai'); - }); - }, - }, - }, - chuhai:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return !player.hasSkillTag('noCompareSource'); - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0&& - !target.hasSkillTag('noCompareTarget'); - }, - content:function(){ - 'step 0' - player.draw(); - 'step 1' - if(player.canCompare(target)) player.chooseToCompare(target); - else event.finish(); - 'step 2' - if(result.bool){ - player.storage.chuhai2=target; - player.addTempSkill('chuhai2','phaseUseEnd'); - if(target.countCards('h')>0){ - player.viewHandcards(target); - var types=[],cards=[],hs=target.getCards('h'); - for(var i of hs){ - types.add(get.type2(i,target)); - } - for(var i of types){ - var card=get.cardPile(function(card){ - return get.type2(card,false)==i; - }); - if(card) cards.push(card); - } - if(cards.length) player.gain(cards,'gain2','log'); - } - } - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - if(player.countCards('hs',function(card){ - return get.tag(card,'damage')>0&&player.canUse(card,target,null,true)&& - get.effect(target,card,player,player)>0&&player.hasValueTarget(card,null,true); - })>0) return -3; - return -1; - }, - }, - }, - }, - chuhai2:{ - trigger:{source:'damageSource'}, - forced:true, - charlotte:true, - onremove:true, - filter:function(event,player){ - if(event.player!=player.storage.chuhai2) return false; - for(var i=1;i<6;i++){ - if(player.isEmpty(i)) return true; - } - return false; - }, - content:function(){ - for(var i=1;i<7;i++){ - if(player.isEmpty(i)){ - var sub='equip'+i,card=get.cardPile(function(card){ - return get.subtype(card,false)==sub&&!get.cardtag(card,'gifts'); - }); - if(card){ - player.$gain2(card); - game.delayx(); - player.equip(card); - break; - } - } - } - }, - }, - xunyi:{ - audio:2, - trigger:{ - global:['phaseBefore','dieAfter'], - player:'enterGame', - }, - direct:true, - filter:function(event,player){ - if(event.name=='die') return event.player==player.storage.xunyi2; - return !player.storage.xunyi2&&(event.name!='phase'||game.phaseNumber==0); - }, - content:function(){ - 'step 0' - player.removeSkill('xunyi2'); - player.chooseTarget(lib.filter.notMe,get.prompt2('xunyi')).set('ai',function(target){ - var player=_status.event.player; - return Math.max(1+get.attitude(player,target)*get.threaten(target),Math.random()); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('xunyi',target); - player.storage.xunyi2=target; - player.addSkill('xunyi2'); - } - }, - }, - xunyi2:{ - audio:'xunyi', - trigger:{global:'damageSource'}, - forced:true, - charlotte:true, - filter:function(event,player){ - var list=[player,player.storage.xunyi2]; - return list.contains(event.source)&&!list.contains(event.player); - }, - logTarget:function(event,player){ - return player.storage.xunyi2; - }, - content:function(){ - (player==trigger.source?player.storage.xunyi2:player).draw(); - }, - group:'xunyi3', - mark:true, - intro:{content:'效果目标:$'}, - }, - xunyi3:{ - audio:'xunyi', - trigger:{global:'damageEnd'}, - forced:true, - charlotte:true, - filter:function(event,player){ - var list=[player,player.storage.xunyi2]; - return list.contains(event.player)&&!list.contains(event.source)&& - (player==event.player?player.storage.xunyi2:player).countCards('he')>0; - }, - logTarget:function(event,player){ - return player.storage.xunyi2; - }, - content:function(){ - (player==trigger.player?player.storage.xunyi2:player).chooseToDiscard('he',true); - }, - }, - mouli:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0; - }, - filterCard:true, - position:'h', - filterTarget:lib.filter.notMe, - discard:false, - lose:false, - delay:false, - check:function(card){ - return 8-get.value(card); - }, - content:function(){ - player.give(cards,target); - if(!target.storage.mouli2) target.storage.mouli2=[]; - if(!target.storage.mouli3) target.storage.mouli3=[]; - target.storage.mouli2.add(player); - target.storage.mouli3.push(player); - target.addSkill('mouli_effect'); - }, - ai:{ - threaten:1.2, - order:4, - result:{ - target:1, - }, - }, - subSkill:{ - effect:{ - trigger:{player:'useCard'}, - forced:true, - charlotte:true, - filter:function(event,player){ - if(event.card.name!='sha'&&event.card.name!='shan') return false; - for(var i of player.storage.mouli3){ - if(i.isIn()) return true; - } - return false; - }, - logTarget:function(event,player){ - return player.storage.mouli3; - }, - content:function(){ - 'step 0' - game.delayx(); - player.storage.mouli3.sortBySeat(); - if(player.storage.mouli3.length==1){ - player.storage.mouli3[0].draw(3); - player.storage.mouli3.length=0; - event.finish(); - } - else game.asyncDraw(player.storage.mouli3,3); - 'step 1' - player.storage.mouli3.length=0; - game.delayx(); - }, - group:['mouli_sha','mouli_shan','mouli_clear'], - mark:true, - intro:{ - content:'已因$获得“谋立”效果', - }, - }, - sha:{ - enable:'chooseToUse', - viewAs:{name:'sha'}, - filterCard:{color:'black'}, - position:'he', - prompt:'将一张黑色牌当做杀使用', - check:function(card){ - return 6-get.value(card); - }, - viewAsFilter:function(player){ - return player.countCards('he',{color:'black'})>0; - }, - ai:{ - respondSha:true, - skillTagFilter:function(player){ - return player.countCards('he',{color:'black'})>0; - }, - }, - }, - shan:{ - enable:'chooseToUse', - viewAs:{name:'shan'}, - filterCard:{color:'red'}, - position:'he', - prompt:'将一张红色牌当做闪使用', - check:function(card){ - return 7-get.value(card); - }, - viewAsFilter:function(player){ - return player.countCards('he',{color:'red'})>0; - }, - ai:{ - respondShan:true, - skillTagFilter:function(player){ - return player.countCards('he',{color:'red'})>0; - }, - }, - }, - clear:{ - trigger:{global:['phaseBegin','dieAfter']}, - forced:true, - silent:true, - popup:false, - lastDo:true, - forceDie:true, - filter:function(event,player){ - if(event.name=='die'&&player==event.player) return true; - return player.storage.mouli2.contains(event.player); - }, - content:function(){ - if(trigger.name=='die'&&player==trigger.player){ - player.removeSkill('mouli_effect'); - delete player.storage.mouli2; - delete player.storage.mouli3; - return; - } - player.storage.mouli2.remove(trigger.player); - while(player.storage.mouli3.contains(trigger.player)) player.storage.mouli3.remove(trigger.player); - if(!player.storage.mouli2.length) player.removeSkill('mouli_effect'); - }, - }, - }, - }, - zifu:{ - audio:2, - trigger:{global:'dieAfter'}, - forced:true, - filter:function(event,player){ - return event.player.storage.mouli2&&event.player.storage.mouli2.contains(player); - }, - content:function(){ - player.loseMaxHp(2); - }, - ai:{ - combo:'mouli', - neg:true, - }, - }, tiansuan:{ audio:2, enable:'phaseUse', @@ -10948,302 +5978,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ threaten:1.1 } }, - //狗剩 - reduoji:{ - audio:'duoji', - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he')>0; - }, - filterCard:true, - position:'he', - filterTarget:lib.filter.notMe, - discard:false, - toStorage:true, - delay:false, - check:function(card){ - return 3-get.value(card); - }, - content:function(){ - 'step 0' - player.$give(cards[0],target,false); - target.markAuto('reduoji',cards); - game.log(player,'将',cards[0],'放在了',target,'的武将牌上'); - 'step 1' - game.delay(); - }, - group:['reduoji_equip','reduoji_gain'], - intro:{ - content:'cards', - onunmark:'throw', - }, - ai:{ - order:1, - result:{target:-1}, - }, - subSkill:{ - equip:{ - audio:'duoji', - trigger:{global:'equipAfter'}, - forced:true, - filter:function(event,player){ - if(player==event.player||!event.player.getStorage('reduoji').length||!event.player.getCards('e').contains(event.card)) return false; - var evt=event.getParent(2); - return evt.name=='useCard'&&evt.player==event.player; - }, - logTarget:'player', - content:function(){ - 'step 0' - player.gain(trigger.card,trigger.player,'give','bySelf'); - 'step 1' - var target=trigger.player,storage=target.getStorage('reduoji'); - if(storage.length){ - var card=storage[0]; - target.$throw(card,1000); - target.unmarkAuto('reduoji',[card]); - game.log(target,'移去了',card); - game.cardsDiscard(card); - target.draw(); - } - }, - }, - gain:{ - audio:'duoji', - trigger:{global:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return event.player.getStorage('reduoji').length>0; - }, - logTarget:'player', - content:function(){ - var target=trigger.player,cards=target.storage.reduoji; - target.$give(cards,player); - player.gain(cards,'fromStorage'); - cards.length=0; - target.unmarkSkill('reduoji'); - game.delay(); - }, - }, - }, - }, - //SP辛毗 - spyinju:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:lib.filter.notMe, - content:function(){ - "step 0" - target.chooseToUse(function(card,player,event){ - if(get.name(card)!='sha') return false; - return lib.filter.filterCard.apply(this,arguments); - },'引裾:对'+get.translation(player)+'使用一张杀,或跳过下回合的出牌阶段和弃牌阶段').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ - if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; - return lib.filter.targetEnabled.apply(this,arguments); - }).set('sourcex',player); - "step 1" - if(!result.bool) target.addSkill('spyinju2'); - }, - ai:{ - order:1, - expose:0.2, - result:{ - target:-1.5, - player:function(player,target){ - if(!target.canUse('sha',player)) return 0; - if(target.countCards('h')==0) return 0; - if(target.countCards('h')==1) return -0.1; - if(player.countCards('h','shan')==0) return -1; - if(player.hp<2) return -2; - return -0.5; - } - }, - threaten:1.1 - } - }, - spyinju2:{ - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - charlotte:true, - content:function(){ - player.skip('phaseUse'); - player.skip('phaseDiscard'); - player.removeSkill('spyinju2'); - game.log(player,'跳过了出牌阶段'); - game.log(player,'跳过了弃牌阶段'); - }, - mark:true, - intro:{content:'衣襟被拽住了,下个准备阶段开始时跳过出牌阶段和弃牌阶段'}, - }, - spchijie:{ - audio:2, - trigger:{target:'useCardToTarget'}, - usable:1, - filter:function(event,player){ - return event.player!=player&&event.targets.length==1; - }, - check:function(event,player){ - return get.effect(player,event.card,event.player,player)<0; - }, - content:function(){ - 'step 0' - player.judge(function(card){ - if(get.number(card)>6) return 2; - return 0; - }).judge2=function(result){ - return result.bool?true:false; - }; - 'step 1' - if(result.bool){ - trigger.targets.length=0; - trigger.getParent().triggeredTargets2.length=0; - trigger.cancel(); - } - }, - }, - //糜夫人 - spcunsi:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return !player.isTurnedOver(); - }, - filterTarget:lib.filter.notMe, - content:function(){ - 'step 0' - player.turnOver(); - 'step 1' - var card=get.cardPile(function(card){ - return card.name=='sha'; - }); - if(card) target.gain(card,'gain2'); - 'step 2' - target.addSkill('spcunsi2'); - target.addMark('spcunsi2',1,false); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - var card={name:'sha',isCard:true}; - if(!target.hasSkillTag('nogain')&&game.hasPlayer(function(current){ - return (get.attitude(target,current)<0&& - !current.hasShan() - &&target.canUse(card,current)&& - !current.hasSkillTag('filterDamage',null,{ - player:target, - card:card, - jiu:true, - })&& - get.effect(current,card,target)>0); - })){ - return 4; - } - return 0; - }, - }, - }, - }, - spcunsi2:{ - charlotte:true, - trigger:{player:'useCard1'}, - firstDo:true, - forced:true, - popup:false, - onremove:true, - filter:function(event,player){ - return event.card.name=='sha'; - }, - content:function(){ - trigger.baseDamage+=player.countMark('spcunsi2'); - player.removeSkill('spcunsi2'); - }, - marktext:'嗣', - intro:{ - content:'下一张【杀】的伤害+#', - }, - }, - spguixiu:{ - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event,player){ - if(typeof event.spguixiu=='boolean'&&!event.spguixiu) return false; - return player.isTurnedOver(); - }, - content:function(){ - player.turnOver(); - }, - group:['spguixiu_draw','spguixiu_count'], - subSkill:{ - count:{ - trigger:{player:'damageBegin2'}, - lastDo:true, - silent:true, - content:function(){ - event.spguixiu=player.isTurnedOver(); - }, - }, - draw:{ - trigger:{player:'turnOverAfter'}, - forced:true, - filter:function(event,player){ - return !player.isTurnedOver(); - }, - content:function(){ - player.draw(); - }, - }, - }, - }, - //那个男人的舅舅 - heji:{ - audio:2, - trigger:{global:'useCardAfter'}, - direct:true, - locked:false, - filter:function(event,player){ - if(event.targets.length!=1||event.targets[0]==player||event.targets[0].isDead()) return false; - if(event.card.name!='juedou'&&(event.card.name!='sha'||get.color(event.card)!='red')) return false; - if(_status.connectMode&&player.countCards('h')>0) return true; - return player.hasSha()||player.hasUsableCard('juedou'); - }, - content:function(){ - player.chooseToUse(function(card,player,event){ - var name=get.name(card); - if(name!='sha'&&name!='juedou') return false; - return lib.filter.cardEnabled.apply(this,arguments); - },'合击:是否对'+get.translation(trigger.targets[0])+'使用一张【杀】或【决斗】?').set('logSkill','heji').set('complexSelect',true).set('filterTarget',function(card,player,target){ - if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; - return lib.filter.targetEnabled.apply(this,arguments); - }).set('sourcex',trigger.targets[0]).set('addCount',false); - }, - group:'heji_gain', - subSkill:{ - gain:{ - trigger:{player:'useCard'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.card.isCard&&event.getParent(2).name=='heji'; - }, - content:function(){ - var card=get.cardPile2(function(card){ - return get.color(card,false)=='red'; - }); - if(card) player.gain(card,'gain2'); - }, - }, - }, - mod:{ - aiOrder:function(player,card,num){ - if(get.name(card,player)=='sha'&&get.color(card,player)=='red') return num+0.6*(_status.event.name=='chooseToUse'&&player.hasHistory('useCard',function(evt){ - return evt.card.name=='sha'&&evt.cards.length==1; - })?1:-1); - }, - }, - }, //南华老仙 yufeng:{ audio:2, @@ -11568,850 +6302,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //始计篇·智 - refubi:{ - audio:'fubi', - trigger:{ - global:'phaseBefore', - player:'enterGame', - }, - direct:true, - filter:function(event,player){ - return (event.name!='phase'||game.phaseNumber==0); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('refubi'),lib.filter.notMe).set('ai',function(target){ - return 1+get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('refubi',target); - target.addMark('refubi',1); - } - }, - intro:{ - content:function(info,player){ - var str='已获得“辅弼”标记' - if(player.storage.refubi_effect0){ - str+=';本回合使用【杀】的次数上限+'; - str+=player.storage.refubi_effect0; - } - if(player.storage.refubi_effect1){ - str+=';本回合的手牌上限+'; - str+=(player.storage.refubi_effect1*3); - } - return str; - }, - }, - marktext:'弼', - group:'refubi_buff', - subSkill:{ - buff:{ - trigger:{global:'phaseZhunbeiBegin'}, - direct:true, - filter:function(event,player){ - return event.player!=player&&event.player.hasMark('refubi'); - }, - content:function(){ - 'step 0' - var str=get.translation(trigger.player); - player.chooseControl('cancel2').set('choiceList',[ - '令'+str+'本回合使用【杀】的次数上限+1', - '令'+str+'本回合的手牌上限+3', - ]).set('ai',function(){ - var player=_status.event.player,target=_status.event.getTrigger().player; - if(get.attitude(player,target)<=0) return 'cancel2'; - if(!target.hasJudge('lebu')&&target.countCards('h',function(card){ - return get.name(card,target)=='sha'&&target.hasValueTarget(card); - })>target.getCardUsable('sha')) return 0; - return 1; - }); - 'step 1' - if(result.control!='cancel2'){ - var target=trigger.player; - player.logSkill('refubi',target); - var str='refubi_effect'+result.index; - target.addTempSkill(str); - target.addMark(str,1,false); - game.log(target,[ - '本回合使用【杀】的次数上限+1', - '本回合的手牌上限+3', - ][result.index]); - } - }, - }, - effect0:{ - onremove:true, - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+player.countMark('refubi_effect0'); - }, - }, - }, - effect1:{ - onremove:true, - mod:{ - maxHandcard:function(player,num){ - return num+3*player.countMark('refubi_effect1'); - }, - }, - }, - }, - }, - rezuici:{ - audio:'zuici', - enable:'chooseToUse', - filter:function(event,player){ - if(event.type=='phase'||event.type=='dying'&&player==event.dying) return (player.isDamaged()&&player.countCards('e')>0); - return false; - }, - chooseButton:{ - dialog:function(event,player){ - return ui.create.dialog('###罪辞###选择废除一个有牌的装备栏,然后回复2点体力,并可移动“辅弼”标记。'); - }, - chooseControl:function(event,player){ - var list=[]; - for(var i=1;i<6;i++){ - if(player.getEquip(i)) list.push('equip'+i); - } - list.push('cancel2'); - return list; - }, - check:function(event,player){ - if(player.hp>1&&player.getDamagedHp()<2) return 'cancel2'; - var cards=player.getCards('e').sort(function(a,b){ - return get.value(a)-get.value(b); - }); - var sub=get.subtype(cards[0],false); - if(player.hp<1) return sub; - var val=get.value(cards[0]); - if(val<0) return sub; - return val<4?sub:'cancel2'; - }, - backup:function(result){ - var next=get.copy(lib.skill.rezuicix); - next.position=result.control; - return next; - }, - }, - ai:{ - order:2.7, - result:{ - player:1, - }, - save:true, - skillTagFilter:function(player,tag,arg){ - return player==arg; - }, - }, - }, - rezuicix:{ - audio:'zuici', - content:function(){ - 'step 0' - player.disableEquip(lib.skill.rezuici_backup.position); - player.recover(2); - 'step 1' - var b1=false,b2=false; - for(var i of game.players){ - if(i.hasMark('refubi')) b1=true; - else if(i!=player) b2=true; - if(b1&&b2) break; - } - if(b1&&b2){ - player.chooseTarget('是否转移“辅弼”标记?',function(card,player,target){ - return target!=player&&!target.hasMark('refubi'); - }).set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - return Math.min(att,att-_status.event.preatt); - }).set('preatt',get.attitude(player,game.findPlayer(function(current){ - return current.hasMark('refubi'); - }))); - } - else event.finish(); - 'step 2' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'group'); - game.countPlayer(function(current){ - var num=current.countMark('refubi'); - if(num) current.removeMark('refubi',1,false); - }); - target.addMark('refubi',1); - } - }, - ai:{ - result:{ - player:1, - }, - }, - }, - reshengxi:{ - audio:'shengxi', - audioname:['feiyi'], - trigger:{player:'phaseJieshuBegin'}, - frequent:true, - preHidden:true, - filter:function(event,player){ - return !player.getHistory('sourceDamage').length; - }, - content:function(){ - player.draw(2); - }, - }, - fyjianyu:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return !player.hasSkill('fyjianyu2')&&game.countPlayer(function(current){ - return !current.hasMark('fyjianyux'); - })>1; - }, - filterTarget:function(card,player,target){ - return !target.hasMark('fyjianyux'); - }, - selectTarget:2, - content:function(){ - player.addTempSkill('fyjianyux',{player:'phaseBegin'}); - target.addMark('fyjianyux',1); - }, - ai:{ - order:0.1, - result:{ - target:function(player,target){ - if(!ui.selected.targets.length) return target==player?1:0; - if(get.attitude(player,target)<0) return -1.6*(1+(target.countCards('h',function(card){ - return target.hasValueTarget(card)&&get.effect(player,card,target,target)>0; - }))*Math.sqrt(target.countCards('h'))); - return 0.3*(1+(target.countCards('h',function(card){ - return target.hasValueTarget(card)&&get.effect(player,card,target,target)>0; - }))*Math.sqrt(target.countCards('h'))); - }, - }, - }, - }, - fyjianyux:{ - trigger:{global:'useCardToPlayer'}, - forced:true, - charlotte:true, - filter:function(event,player){ - return event.player!=event.target&&event.player.hasMark('fyjianyux')&& - event.target.hasMark('fyjianyux')&&event.target.isAlive(); - }, - logTarget:'target', - content:function(){ - trigger.target.draw(); - }, - onremove:function(){ - game.countPlayer(function(current){ - var num=current.countMark('fyjianyux'); - if(num) current.removeMark('fyjianyux'); - }); - }, - intro:{ - content:'mark', - }, - }, - fyjianyu2:{}, - spwanwei:{ - audio:2, - enable:'chooseToUse', - filter:function(event,player){ - if(player.hasSkill('spwanwei2')||player.hp<1) return false; - if(event.type=='dying') return event.dying!=player; - if(event.type!='phase') return false; - return game.hasPlayer(function(current){ - return current!=player&¤t.isDamaged(); - }); - }, - filterTarget:function(card,player,target){ - if(_status.event.type=='dying') return target==_status.event.dying; - return player!=target&&target.isDamaged(); - }, - selectTarget:function(){ - if(_status.event.type=='dying') return -1; - return 1; - }, - content:function(){ - player.addTempSkill('spwanwei2','roundStart'); - var num=player.hp; - target.recover(Math.max(num+1,1-target.hp)); - player.loseHp(num); - }, - ai:{ - save:true, - skillTagFilter:function(player,tag,target){ - return player!=target; - }, - expose:0.5, - order:6, - result:{ - target:function(player,target){ - if(_status.event.type!='dying') return 0; - if(get.attitude(player,target)<4) return 0; - if(player.countCards('he')<2&&target!=get.zhu(player)) return 0; - return 1; - }, - }, - }, - }, - spwanwei2:{}, - spyuejian:{ - mod:{ - maxHandcardBase:function(player){ - return player.maxHp; - }, - }, - audio:2, - enable:'chooseToUse', - filter:function(event,player){ - return event.type=='dying'&&player==event.dying&&player.countCards('he')>1; - }, - selectCard:2, - filterCard:true, - position:'he', - check:function(card){ - return 1/Math.max(0.1,get.value(card)); - }, - content:function(){ - player.recover(); - }, - ai:{ - save:true, - skillTagFilter:function(player,tag,target){ - return player==target; - }, - order:1.4, - result:{ - player:1, - }, - }, - }, - spwuku:{ - audio:2, - trigger:{global:'useCard'}, - forced:true, - preHidden:true, - filter:function(event,player){ - if(get.type(event.card)!='equip') return false; - var gz=get.mode()=='guozhan'; - if(gz&&event.player.isFriendOf(player)) return false; - return player.countMark('spwuku')<(gz?2:3); - }, - content:function(){ - player.addMark('spwuku',1); - }, - marktext:'库', - intro:{ - content:'mark', - }, - ai:{ - combo:'spsanchen', - threaten:3.6, - }, - }, - spsanchen:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - forced:true, - juexingji:true, - skillAnimation:true, - animationColor:'gray', - filter:function(event,player){ - return player.countMark('spwuku')>2; - }, - content:function(){ - player.awakenSkill('spsanchen'); - player.gainMaxHp(); - player.recover(); - player.addSkillLog('spmiewu'); - }, - ai:{ - combo:'wuku', - }, - derivation:'spmiewu', - }, - spmiewu:{ - audio:2, - enable:['chooseToUse','chooseToRespond'], - filter:function(event,player){ - if(!player.countMark('spwuku')||!player.countCards('hse')||player.hasSkill('spmiewu2')) return false; - for(var i of lib.inpile){ - var type=get.type2(i); - if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true; - } - return false; - }, - chooseButton:{ - dialog:function(event,player){ - var list=[]; - for(var i=0;i0&&player.countCards('she')>0&&!player.hasSkill('spmiewu2'); - }, - ai:{ - combo:'spwuku', - fireAttack:true, - respondSha:true, - respondShan:true, - skillTagFilter:function(player){ - if(!player.countMark('spwuku')||!player.countCards('hse')||player.hasSkill('spmiewu2')) return false; - }, - order:1, - result:{ - player:function(player){ - if(_status.event.dying) return get.attitude(player,_status.event.dying); - return 1; - }, - }, - }, - }, - spmiewu2:{ - trigger:{player:['useCardAfter','respondAfter']}, - forced:true, - charlotte:true, - popup:false, - filter:function(event,player){ - return event.skill=='spmiewu_backup'; - }, - content:function(){ - player.draw(); - }, - }, - spmiewu_backup:{audio:'spmiewu'}, - qinzheng:{ - audio:2, - trigger:{player:['useCard','respond']}, - forced:true, - filter:function(event,player){ - var num=player.getAllHistory('useCard').length+player.getAllHistory('respond').length; - return num%3==0||num%5==0||num%8==0; - }, - content:function(){ - var num=player.getAllHistory('useCard').length+player.getAllHistory('respond').length; - var cards=[]; - if(num%3==0){ - var card=get.cardPile2(function(card){ - return card.name=='sha'||card.name=='shan'; - }); - if(card) cards.push(card); - } - if(num%5==0){ - var card=get.cardPile2(function(card){ - return ['tao','jiu','zong','xionghuangjiu'].contains(card.name); - }); - if(card) cards.push(card); - } - if(num%8==0){ - var card=get.cardPile2(function(card){ - return ['juedou','wuzhong','zengbin','sadouchengbing','dongzhuxianji','tongzhougongji'].contains(card.name); - }); - if(card) cards.push(card); - } - if(cards.length) player.gain(cards,'gain2'); - }, - group:'qinzheng_count', - intro:{ - content:function(num){ - var str='
  • 总次数:'; - str+=num; - str+='
  • 杀/闪:'; - str+=num%3; - str+='/3
  • 桃/酒:'; - str+=num%5; - str+='/5
  • 决斗/无中生有:'; - str+=num%8; - str+='/8'; - return str; - }, - }, - }, - qinzheng_count:{ - trigger:{player:['useCard1','respond']}, - silent:true, - firstDo:true, - noHidden:true, - content:function(){ - player.storage.qinzheng=player.getAllHistory('useCard').length+player.getAllHistory('respond').length; - player.markSkill('qinzheng'); - }, - }, - spqiai:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he',function(card){ - return get.type(card)!='basic'; - })>0; - }, - filterCard:function(card){ - return get.type(card)!='basic'; - }, - position:'he', - filterTarget:lib.filter.notMe, - delay:false, - discard:false, - lose:false, - check:function(card){ - var player=_status.event.player; - if(get.position(card)=='e'&&card.name=='jinhe') return 10; - if(player.isHealthy()) return 7-get.value(card); - return 9-get.value(card); - }, - content:function(){ - 'step 0' - player.give(cards,target,true); - 'step 1' - if(!target.isIn()){ - event.finish(); - return; - } - if(player.isHealthy()) event._result={index:1}; - else{ - var str=get.translation(player); - target.chooseControl().set('choiceList',[ - '令'+str+'回复1点体力', - '令'+str+'摸两张牌', - ]); - } - 'step 2' - if(result.index==0) player.recover(); - else player.draw(2); - }, - ai:{ - order:8, - result:{ - player:1, - target:function(player,target){ - if(ui.selected.cards.length){ - var card=ui.selected.cards[0]; - var val=get.value(card,target); - if(val<0) return -1; - if(target.hasSkillTag('nogain')) return 0; - var useval=target.getUseValue(card); - if(val<1||useval<=0) return 0.1; - return Math.sqrt(useval); - } - return 0; - }, - }, - }, - }, - spshanxi:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current!=player&&!current.hasMark('spshanxi'); - }); - }, - content:function(){ - 'step 0' - var eff=0; - var target=game.findPlayer(function(current){ - return current!=player&¤t.hasMark('spshanxi'); - }); - if(target) eff=(-get.attitude(player,target)/Math.sqrt(Math.max(1,target.hp))); - player.chooseTarget(get.prompt('spshanxi'),'令一名其他角色获得“檄”',function(card,player,target){ - return target!=player&&!target.hasMark('spshanxi'); - }).set('ai',function(target){ - return (-get.attitude(_status.event.player,target)/Math.sqrt(Math.max(1,target.hp)))-_status.event.eff; - }).set('eff',eff); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('spshanxi',target); - game.countPlayer(function(current){ - if(current==target) current.addMark('spshanxi',1); - else{ - var num=current.countMark('spshanxi'); - if(num>0) current.removeMark('spshanxi',num); - } - }); - } - }, - marktext:'檄', - intro:{ - name2:'檄', - content:'已被设下索命檄文', - }, - group:'spshanxi_suoming', - ai:{threaten:3.3}, - }, - spshanxi_suoming:{ - audio:'spshanxi', - trigger:{global:'recoverAfter'}, - forced:true, - filter:function(event,player){ - return event.player.hasMark('spshanxi')&&event.player.hp>0; - }, - logTarget:'player', - content:function(){ - 'step 0' - if(trigger.player.countCards('he')<2) event._result={bool:false}; - else trigger.player.chooseCard('he',2,'交给'+get.translation(player)+'两张牌,或失去1点体力').set('ai',function(card){ - return 9-get.value(card); - }); - 'step 1' - if(!result.bool) trigger.player.loseHp(); - else trigger.player.give(result.cards,player); - }, - }, - shameng:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - var hs=player.getCards('h'); - if(hs.length<2) return false; - var red=0,black=0; - for(var i of hs){ - if(get.color(i,player)=='red') red++; - else black++; - if(red>1||black>1) return true; - } - return false; - }, - complexCard:true, - selectCard:2, - filterCard:function(card,player){ - if(ui.selected.cards.length) return get.color(card,player)==get.color(ui.selected.cards[0],player); - var color=get.color(card,player); - return player.countCards('h',function(cardx){ - return cardx!=card&&color==get.color(cardx,player); - })>0; - }, - filterTarget:lib.filter.notMe, - check:function(card){return 7-get.value(card)}, - position:'h', - content:function(){ - target.draw(2); - player.draw(3); - }, - ai:{ - order:6, - result:{target:2}, - }, - }, - fubi:{ - trigger:{ - global:'phaseBefore', - player:'enterGame', - }, - direct:true, - skillAnimation:true, - animationColor:'wood', - filter:function(event,player){ - return (event.name!='phase'||game.phaseNumber==0); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('fubi'),lib.filter.notMe).set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('fubi',target); - target.addSkill('fubi2'); - target.storage.fubi2.push(player); - } - }, - }, - fubi2:{ - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=[]; - }, - mod:{ - maxHandcard:function(player,num){ - var list=player.getStorage('fubi2'); - for(var i of list){ - if(i.isIn()) num+=3; - } - return num; - }, - }, - mark:true, - intro:{content:'若$存活,则手牌上限+3'}, - }, - zuici:{ - trigger:{player:'dying'}, - direct:true, - filter:function(event,player){ - return player.countCards('e')>0; - }, - content:function(){ - 'step 0' - var list=[]; - var cards=player.getCards('e'); - for(var i of cards) list.push(get.subtype(i)); - list.push('cancel2'); - player.chooseControl(list).set('prompt',get.prompt2('zuici')); - 'step 1' - if(result.control!='cancel2'){ - player.disableEquip(result.control); - } - else event.finish(); - 'step 2' - if(player.hp<1) player.recover(1-player.hp); - }, - }, - jianzhan:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return lib.skill.jianzhan.filterTarget(null,player,current); - }); - }, - filterTarget:function(card,player,target){ - if(target==player) return false; - if(ui.selected.targets.length){ - var targetx=ui.selected.targets[0]; - return targetx!=target&&targetx.countCards('h')>target.countCards('h')&&targetx.inRange(target); - } - var num=target.countCards('h'); - return game.hasPlayer(function(current){ - return current!=target&¤t!=player&¤t.countCards('h')0) return 0; - if(eff<0||get.attitude(evt.targets[0],evt.player)>1) return 1; - return 0; - }); - 'step 1' - if(result.index==0) targets[0].useCard({name:'sha',isCard:true},targets[1],false); - else player.draw(); - }, - ai:{ - result:{ - target:function(player,target){ - if(ui.selected.targets.length){ - var from=ui.selected.targets[0]; - return get.effect(target,{name:'sha'},from,target); - } - var effs=[0,0]; - game.countPlayer(function(current){ - if(current!=target&&target.canUse('sha',current)){ - var eff=get.effect(current,{name:'sha'},target,target); - if(eff>effs[0]) effs[0]=eff; - if(eff0?0:1]; - } - }, - order:8.5, - expose:0.2 - }, - }, - duoji:{ - audio:2, - enable:'phaseUse', - limited:true, - filter:function(event,player){ - return player.countCards('h')>1&&game.hasPlayer(function(current){ - return current!=player&¤t.countGainableCards(player,'e')>0; - }); - }, - filterCard:true, - selectCard:2, - filterTarget:function(card,player,target){ - return target!=player&&target.countGainableCards(player,'e')>0; - }, - check:function(card){ - return 8-get.value(card); - }, - position:'h', - skillAnimation:true, - animationColor:'metal', - content:function(){ - player.awakenSkill('duoji'); - var cards=target.getGainableCards(player,'e'); - player.gain(cards,target,'give','bySelf'); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - var num=0,es=target.getCards('e'),val=0; - for(var i of es){ - num+=get.value(i,target); - } - for(var i of ui.selected.cards){ - val+=get.value(i,player); - } - if(Math.abs(num)>val) return -num; - return 0; - }, - }, - }, - }, //界伏寿 xinzhuikong:{ audio:2, @@ -19040,7 +12930,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, perfectPair:{ - wujing:['sunce','sunben','wuguotai'], simazhao:['simayi','jin_simayi','jin_wangyuanji'], xugong:['yanbaihu'], }, @@ -19056,34 +12945,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sufei:['yj_sufei','sp_sufei','xf_sufei'], jiakui:['jiakui','old_jiakui'], shenpei:['shenpei','sp_shenpei'], - wangcan:['tw_wangcan','wangcan','sp_wangcan'], - sunshao:['sp_sunshao','sunshao'], - xunchen:['re_xunchen','xunchen','tw_xunchen','sp_xunchen'], - xinpi:['xinpi','sp_xinpi'], - duyu:['duyu','dc_duyu','sp_duyu','pk_sp_duyu'], - zhangwen:['sp_zhangwen','zhangwen'], - ol_bianfuren:['ol_bianfuren','tw_bianfuren','sp_bianfuren'], - wangshuang:['wangshuang','sp_wangshuang'], - huaman:['huaman','sp_huaman'], - gaolan:['dc_gaolan','gaolan','sp_gaolan'], - cuiyan:['sp_cuiyan','cuiyan'], - wujing:['tw_wujing','wujing'], sunru:['dc_sunru','sunru'], - zhouchu:['jin_zhouchu','zhouchu','tw_zhouchu'], liuye:['dc_liuye','liuye'], - liuzhang:['liuzhang','tw_liuzhang'], - chenzhen:['tw_chenzhen','sp_chenzhen'], - feiyi:['tw_feiyi','feiyi'], - wangling:['tw_wangling','wangling'], - qiaogong:['tw_qiaogong','qiaogong'], - sp_chendong:['tw_chendong','sp_chendong','chendong'], - sp_jiangqing:['tw_jiangqing','sp_jiangqing','jiangqing'], - zhaotongzhaoguang:['dc_zhaotongzhaoguang','zhaotongzhaoguang'], + zhaotongzhaoguang:['dc_zhaotongzhaoguang','zhaotongzhaoguang'], yangbiao:['yangbiao','dc_yangbiao','jsrg_yangbiao'], qiaozhou:['yj_qiaozhou','qiaozhou'], sunhanhua:['dc_qiaozhou','sunhanhua'], - kongrong:['sp_kongrong','jsrg_kongrong','kongrong'], - mifuren:['dc_mifuren','sp_mifuren'], }, translate:{ liuzan:'手杀留赞', @@ -19467,81 +13334,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_dengai:'手杀邓艾', flappybird:'飞鸟', flappybird_info:'出牌阶段,你可游玩一局Flappy Bird。', - sp_wangcan:'手杀王粲', - spqiai:'七哀', - spqiai_info:'出牌阶段限一次,你可以将一张非基本牌交给一名其他角色。然后其选择一项:①你回复1点体力。②你摸两张牌。', - spshanxi:'善檄', - spshanxi_suoming:'善檄', - spshanxi_info:'出牌阶段开始时,你可令一名其他角色获得“檄”标记并清除场上已有的其他“檄”标记(若有)。有“檄”标记的角色回复体力时,若其体力值大于0,则其需选择一项:①交给你两张牌。②失去1点体力。', - sp_chenzhen:'陈震', - shameng:'歃盟', - shameng_info:'出牌阶段限一次,你可弃置两张颜色相同的手牌并选择一名其他角色。其摸两张牌,然后你摸三张牌。', - sp_sunshao:'手杀孙邵', - fubi:'辅弼', - fubi2:'辅弼', - fubi_info:'游戏开始时,你可选择一名其他角色。该角色的手牌上限于你死亡前+3。', - zuici:'罪辞', - zuici_info:'当你进入濒死状态时,你可废除你的一个不为空的装备栏,然后将体力值回复至1点。', - sp_xunchen:'手杀荀谌', - jianzhan:'谏战', - jianzhan_info:'出牌阶段限一次,你可选择一名其他角色A和其攻击范围内的另一名手牌数小于其的角色B。A选择一项:①视为对B使用一张【杀】。②令你摸一张牌。', - duoji:'夺冀', - duoji_info:'限定技,出牌阶段,你可弃置两张手牌并选择一名装备区有牌的其他角色。你获得其装备区里的所有牌。', re_handang:'手杀韩当', - luotong:'手杀骆统', - qinzheng:'勤政', - qinzheng_info:'锁定技,当你使用或打出牌时,若你本局游戏内使用或打出过的牌数和:为3的倍数,你从牌堆中获得一张【杀】或【闪】;为5的倍数,你从牌堆中获得一张【桃】或【酒】;为8的倍数,你从牌堆中获得一张【决斗】或【无中生有】(可获得对应的衍生替换牌)。', - sp_duyu:'手杀杜预', - spwuku:'武库', - spwuku_info:'锁定技,当有角色使用装备牌时,若你的“武库”数小于3,则你获得一个“武库”。', - spwuku_info_guozhan:'锁定技,当有其他势力的角色使用装备牌时,若你的“武库”数小于2,则你获得一个“武库”。', - spsanchen:'三陈', - spsanchen_info:'觉醒技,结束阶段,若你的“武库”数大于2,则你加1点体力上限并回复1点体力,然后获得〖灭吴〗。', - spmiewu:'灭吴', - spmiewu2:'灭吴', - spmiewu_backup:'灭吴', - spmiewu_info:'每回合限一次。你可弃置一枚“武库”并将一张牌当做任意基本牌或锦囊牌使用,然后摸一张牌。', - sp_bianfuren:'手杀卞夫人', - spwanwei:'挽危', - spwanwei_info:'每轮累计限一次。①出牌阶段,你可选择一名其他角色。②当有其他角色处于濒死状态时。你可令该角色回复X+1点体力(至少回复至1),然后你失去X点体力。(X为你的体力值)', - spyuejian:'约俭', - spyuejian_info:'锁定技,你的手牌上限基数等于你的体力上限。当你处于濒死状态时,你可弃置两张牌,然后回复1点体力。', - feiyi:'费祎', - reshengxi:'生息', - reshengxi_info:'结束阶段,若你于本回合内未造成过伤害,则你可摸两张牌。', - fyjianyu:'谏喻', - fyjianyu_info:'每轮限一次。出牌阶段,你可选择两名角色,令这些角色获得“喻”直到你的下回合开始。当一名有“喻”的角色A使用牌指定另一名有“喻”的角色B为目标时,你令B摸一张牌。', - fyjianyux:'谏喻', - refubi:'辅弼', - refubi_info:'游戏开始时,你可令一名其他角色获得“辅弼”标记。有“辅弼”标记的角色的准备阶段开始时,你可选择一项:①令其本回合使用【杀】的次数上限+1。②令其本回合的手牌上限+3。', - rezuici:'罪辞', - rezuici_backup:'罪辞', - rezuici_info:'出牌阶段,或当你处于濒死状态时,你可以废除一个有牌的装备栏并回复2点体力,然后可以移动“辅弼”标记。', nanhualaoxian:'手杀南华老仙', yufeng:'御风', yufeng2:'御风', yufeng_info:'出牌阶段限一次,你可以表演“御风飞行”。若表演失败,则你摸X张牌。若表演成功,则你可以选择至多X名其他角色获得“御风”效果,然后摸X-Y张牌(准备阶段开始时,你进行判定。若结果为:红色,你跳过摸牌阶段;黑色,你跳过出牌阶段和弃牌阶段。X为你的得分。Y为你选择的角色数)。', tianshu:'天书', tianshu_info:'出牌阶段限一次,若场上没有【太平要术】,则你可以弃置一张牌并选择一名角色。该角色获得并使用【太平要术】。', - wujing:'吴景', - heji:'合击', - heji_info:'当有角色使用的【决斗】或红色【杀】结算完成后,若此牌对应的目标数为1,则你可以对相同的目标使用一张【杀】或【决斗】(无距离和次数限制)。若你以此法使用的牌不为转化牌,则你从牌堆中随机获得一张红色牌。', - liubing:'流兵', - liubing_info:'锁定技。①当你声明使用【杀】后,若此牌是你本回合使用的第一张有唯一对应实体牌的【杀】,则你将此牌的花色改为♦。②其他角色于其出牌阶段内使用的非转化黑色杀结算结束后,若此【杀】未造成伤害,则你获得之。', - sp_mifuren:'手杀糜夫人', - spcunsi:'存嗣', - spcunsi2:'存嗣', - spcunsi_info:'出牌阶段限一次,你可将武将牌翻至背面并选择一名其他角色。其从牌堆或弃牌堆中获得一张【杀】,且下一张杀的伤害值基数+1。', - spguixiu:'闺秀', - spguixiu_info:'锁定技,当你受到伤害后,若你的武将牌背面朝上,则你将武将牌翻至正面。当你的武将牌从背面翻至正面时,你摸一张牌。', - sp_xinpi:'手杀辛毗', - spyinju:'引裾', - spyinju2:'引裾', - spyinju_info:'出牌阶段限一次,你可令一名其他角色选择一项:①对你使用一张【杀】(无距离限制)。②其下个回合的准备阶段开始时,跳过出牌阶段和弃牌阶段。', - spchijie:'持节', - spchijie_info:'每回合限一次。当你成为其他角色使用牌的唯一目标时,你可判定。若结果大于6,则你取消此牌的所有目标。', - reduoji:'夺冀', - reduoji_info:'出牌阶段限一次,你可将一张牌置于其他角色的武将牌上,称为“冀”。当有装备牌因使用而进入一名角色的装备区后,若该角色有“冀”且其为使用者,则你获得此装备牌,其移去一个“冀”并摸一张牌。一名其他角色的回合结束后,若其有“冀”,则你获得其的所有“冀”。', re_jiangwei:'手杀姜维', retiaoxin:'挑衅', retiaoxin_info:'出牌阶段限一次,你可以指定一名有牌的其他角色,该角色需对你使用一张【杀】,否则你弃置其一张牌。', @@ -19560,133 +13359,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tiansuan2_fire:'命运签', tiansuan2_3:'命运签', tiansuan2_4:'命运签', - wangling:'王凌', - mouli:'谋立', - mouli_info:'出牌阶段限一次,你可以将一张手牌交给一名其他角色,其获得如下效果直到你的下回合开始:其可以将黑色牌当做【杀】,红色牌当做【闪】使用。其第一次触发“使用【杀】/【闪】结算完成后”的时机时,你摸三张牌。', - zifu:'自缚', - zifu_info:'锁定技,当有角色死亡时,若其因你获得的“谋立”效果未过期,则你减2点体力上限。', - wangfuzhaolei:'王甫赵累', - xunyi:'殉义', - xunyi2:'殉义', - xunyi3:'殉义', - xunyi_info:'游戏开始时,或当上一个拥有“殉义”效果的角色死亡后,你可以选择一名角色获得如下效果:当其/你对二者之外的角色造成伤害后,你/其摸一张牌;当其/你受到二者之外的角色造成的伤害后,你/其弃置一张牌。', - zhouchu:'手杀周处', - xianghai:'乡害', - xianghai_info:'锁定技,其他角色的手牌上限-1。你手牌区的装备牌均视为【酒】。', - chuhai:'除害', - chuhai_info:'出牌阶段限一次,你可以摸一张牌,然后和一名其他角色拼点。若你赢,则你观看其手牌,并从牌堆/弃牌堆中获得其手牌中包含的类型的牌各一张,且当你于此阶段内对其造成伤害后,你将牌堆/弃牌堆中的一张装备牌置于你的一个空置装备栏内。', - sp_kongrong:'孔融', - spmingshi:'名士', - spmingshi_info:'锁定技,当你受到1点伤害后,伤害来源弃置一张牌。', - splirang:'礼让', - splirang_info:'出牌阶段限一次,你可以弃置所有手牌,然后将其中的至多X张牌交给一名其他角色(X为你的体力值),之后摸一张牌。', ol_yujin:'手杀于禁', rejieyue:'节钺', rejieyue_info:'结束阶段开始时,你可以将一张牌交给一名其他角色。然后其选择一项:令你摸三张牌:或其保留一张手牌和装备区的牌,然后弃置其余的牌。', - caizhenji:'蔡贞姬', - sheyi:'舍裔', - sheyi_info:'每轮限一次。当有体力值小于你的其他角色受到伤害时,你可以交给其至少X张牌并防止此伤害(X为你的体力值)。', - tianyin:'天音', - tianyin_info:'锁定技,结束阶段开始时,你从牌堆中获得每种本回合未使用过的类型的牌各一张。', - xiangchong:'向宠', - guying:'固营', - guying_info:'锁定技。每回合限一次,当你于回合外因使用/打出/弃置而失去牌后,若牌数为1,则你获得一枚“固”并令当前回合角色选择一项:①随机交给你一张牌。②令你获得本次失去的牌,若为装备牌,则你使用之。准备阶段开始时,你移去所有“固”并弃置等量的牌。', - muzhen:'睦阵', - muzhen_backup:'睦阵', - muzhen_info:'出牌阶段各限一次。①你可以将两张牌交给一名装备区内有牌的其他角色,然后获得其装备区内的一张牌。②你可以将装备区内的一张牌置于其他角色的装备区内,然后获得其一张手牌。', - sp_huaxin:'手杀华歆', - hxrenshi:'仁仕', - hxrenshi_info:'出牌阶段每名角色限一次。你可以将一张手牌交给一名其他角色。', - debao:'德保', - debao_info:'锁定技,当其他角色获得你的牌后,若你的“仁”数小于你的体力上限,则你将牌堆顶的一张牌置于你的武将牌上,称为“仁”。准备阶段,你获得所有“仁”。', - buqi:'不弃', - buqi_info:'锁定技,当有角色进入濒死状态时,若你的“仁”数大于1,则你移去两张“仁”并令其回复1点体力。一名角色死亡后,你将所有“仁”置入弃牌堆。', - sp_xujing:'手杀许靖', - boming:'博名', - boming_info:'出牌阶段限两次,你可以将一张牌交给一名其他角色。结束阶段,若你本回合以此法失去了两张以上的牌,则你摸一张牌。', - ejian:'恶荐', - ejian_info:'锁定技,每名角色限一次。当有其他角色因〖博名〗而获得了你的牌后,若其拥有与此牌类型相同的其他牌,则你令其选择一项:①受到1点伤害。②展示所有手牌,并弃置所有与此牌类别相同的牌。', xin_zhoucang:'手杀周仓', mobilezhongyong:'忠勇', mobilezhongyong_info:'当你于出牌阶段内使用的【杀】结算结束后,若没有目标角色使用【闪】响应过此【杀】,则你可获得此【杀】;否则你可选择一项:①获得目标角色使用的【闪】,然后可将此【杀】交给另一名其他角色。②将目标角色使用的【闪】交给另一名其他角色,然后你本回合使用【杀】的次数上限+1且下一张【杀】的伤害值基数+1。(你不能使用本回合因执行〖忠勇〗的效果获得的牌)', - mjdingyi:'定仪', - mjdingyi_info:'游戏开始时,你选择一个效果(相同效果不可叠加)并令全场角色获得之:①摸牌阶段额定摸牌数+1。②手牌上限+2。③攻击范围+1。④脱离濒死状态时回复1点体力。', - mjzuici:'罪辞', - mjzuici_info:'当你受到伤害后,你可令伤害来源失去〖定仪〗效果,然后令其从牌堆中获得一张由你选择的智囊。', - mjfubi:'辅弼', - mjfubi_info:'每轮限一次。出牌阶段,你可选择一项:①更换一名角色的〖定仪〗效果。②弃置一张牌并令一名角色的〖定仪〗效果翻倍直到你的下回合开始。', - mjshengxi:'生息', - mjshengxi_info:'准备阶段,你可以获得一张【调剂盐梅】;结束阶段,若你本回合使用过牌且未造成伤害,则你可以获得一张智囊。', - mjkuanji:'宽济', - mjkuanji_info:'每回合限一次。当你因弃置而失去牌后,你可令一名其他角色获得其中的一张牌,然后你摸一张牌。', - tiaojiyanmei:'调剂盐梅', - tiaojiyanmei_info:'出牌阶段,对两名手牌数不均相同的其他角色使用。若目标角色于此牌使用准备工作结束时的手牌数大于此时所有目标的平均手牌数,其弃置一张牌。若小于则其摸一张牌。此牌使用结束后,若所有目标角色的手牌数均相等,则你可令一名角色获得所有因执行此牌效果而弃置的牌。', - binglinchengxiax:'兵临城下', - binglinchengxiax_info:'出牌阶段,对一名其他角色使用。你展示牌堆顶的四张牌,依次对其使用其中所有的【杀】,然后将剩余的牌置于牌堆顶。', - mjweipo:'危迫', - mjweipo_effect:'危迫', - mjweipo_remove:'危迫', - mjweipo_info:'出牌阶段限一次。你可以选择一个智囊或【兵临城下】,令一名没有〖危迫〗效果的角色获得如下一次性效果直到你下回合开始:其可于出牌阶段弃置一张【杀】,并获得一张你选择的牌。', - mjchenshi:'陈势', - mjchenshi_player:'陈势', - mjchenshi_target:'陈势', - mjchenshi_info:'当有角色使用【兵临城下】指定第一个目标后,其可交给你一张牌,并将牌堆的顶三张牌中所有不为【杀】的牌置入弃牌堆;当有角色成为【兵临城下】的目标后,其可交给你一张牌,然后将牌堆顶三张牌中所有的【杀】置入弃牌堆。', - mjmouzhi:'谋识', - mjmouzhi_info:'锁定技,当你受到伤害时,若伤害渠道对应的牌和你上次受到的伤害花色相同,则你防止此伤害。', - zhangzhongjing:'张机', - jishi:'济世', - jishi_info:'锁定技。①当你使用的牌结算完成后,若你未因此牌造成过伤害,则你将此牌对应的所有实体牌置于仁库中。②当有牌不因溢出而离开仁库时,你摸一张牌。', - liaoyi:'疗疫', - liaoyi_info:'其他角色的回合开始时,若其:①手牌数小于体力值且仁库内牌数大于等于X,则你可令其从仁库中获得X张牌;②手牌数大于体力值,则你可以令其将X张牌置于仁库中(X为其手牌数与体力值之差且至多为4)。', - xinliaoyi:'疗疫', - xinliaoyi_info:'其他角色的回合开始时,你可选择一项:①令其从仁库中获得一张牌。②若其手牌数大于体力值,则令其将X张手牌置入仁库(X为其手牌数与体力值之差)。', - binglun:'病论', - binglun_info:'出牌阶段限一次,你可以将仁库中的一张牌置于弃牌堆并选择一名角色。该角色选择一项:①摸一张牌。②于其下回合结束时回复1点体力。', - sp_zhangwen:'手杀张温', - gebo:'戈帛', - gebo_info:'锁定技,当有角色回复体力后,你将牌堆顶的一张牌置入仁库。', - spsongshu:'颂蜀', - spsongshu_info:'其他角色的摸牌阶段开始时,若其体力值大于你且仁库内有牌,则你可以令其放弃摸牌。其改为获得X张仁(X为你的体力值且至多为5),且本回合内不能使用牌指定其他角色为目标。', - liuzhang:'刘璋', - xiusheng:'休生', - xiusheng_info:'锁定技。准备阶段,你将所有“生”置入弃牌堆,然后摸X张牌,并将等量的牌置于武将牌上,称为“生”(X为你因〖引狼〗而选择的势力的存活角色数)。', - yinlang:'引狼', - yinlang_info:'①每轮限一次。回合开始时,你选择场上的一个势力。②一名角色的出牌阶段开始时,若其势力与你选择的势力相同,则其选择一项:1.获得你的一张“生”,然后其本回合使用牌时不能指定你以外的角色为目标。2.你获得一张“生”。', - huaibi:'怀璧', - huaibi_info:'主公技,锁定技。你的手牌上限+X(X为你因〖引狼〗而选择的势力的存活角色数)。', - qiaogong:'桥公', - yizhu:'遗珠', - yizhu_info:'①结束阶段,你摸两张牌,然后将两张牌随机插入牌堆前2X张牌的位置中(X为角色数,选择牌的牌名对其他角色可见)。②当有其他角色使用“遗珠”牌指定唯一目标时,你可清除对应的“遗珠”标记并取消此目标,然后你可使用此牌。③当有“遗珠”牌进入弃牌堆后,你摸一张牌并清除对应的“遗珠”标记。', - luanchou:'鸾俦', - luanchou_info:'出牌阶段限一次,你可令两名角色获得“姻”标记并清除原有标记。拥有“姻”标记的角色视为拥有技能〖共患〗。', - gonghuan:'共患', - gonghuan_info:'锁定技。每回合限一次,一名其他角色受到伤害时,若其拥有“姻”标记且其体力值小于你,则你将伤害转移给自己。此伤害结算结束后,你与其移去“姻”标记。', - sp_yanghu:'手杀羊祜', - mingfa:'明伐', - mingfa_info:'①结束阶段,你可展示一张牌并记录为“明伐”。②出牌阶段开始时,若“明伐”牌在你的手牌区或装备区,则你可以使用“明伐”牌与一名其他角色拼点。若你赢:你获得对方一张牌并从牌堆中获得一张点数等于“明伐”牌牌面点数-1的牌。若你没赢:你本回合不能使用牌指定其他角色为目标。③你的拼点牌亮出后,你令此牌的点数+2。', - rongbei:'戎备', - rongbei_info:'限定技。出牌阶段,你可选择一名有空装备栏的角色。系统为该角色的每个空装备栏选择一张装备牌,然后该角色使用之。', xin_caifuren:'手杀蔡夫人', xinqieting:'窃听', xinqieting_info:'其他角色的回合结束时,若其本回合内未对其他角色造成过伤害,则你可选择一项:①摸一张牌。②观看其两张手牌并获得其中的一张。③将其装备区内的一张牌移动至你的装备区。', xinguixiu:'闺秀', xinguixiu_info:'锁定技。结束阶段,若你的体力值为:奇数,你摸一张牌;偶数,你回复1点体力。', - qingyu:'清玉', - qingyu_info:'使命技。①当你受到伤害时,你弃置两张牌,然后防止此伤害。②使命:准备阶段,若你的体力值等于体力上限且你没有手牌,则你获得〖悬存〗。③失败:当你进入濒死状态时,你减1点体力上限。', - xuancun:'悬存', - xuancun_info:'其他角色的回合结束时,若你的手牌数小于体力值,则你可以令其摸X张牌(X为你的体力值与手牌数之差且至多为2)', - xinlirang:'礼让', - xinlirang_info:'①其他角色的摸牌阶段开始时,若你没有“谦”标记,则你可以获得一枚“谦”标记。若如此做,其额定摸牌数+2,且本回合的弃牌阶段开始时,你可以获得其弃置的至多两张牌。②摸牌阶段开始时,若你有“谦”标记,则你跳过此摸牌阶段并移除“谦”标记。', - xinmingshi:'名仕', - xinmingshi_info:'锁定技,当你受到伤害后,若你有“谦”标记,则伤害来源弃置一张牌。若此牌为:黑色:你获得之。红色,你回复1点体力。', - xingqi:'星启', - xingqi_info:'①当你使用牌时,若此牌不为延时锦囊牌且你没有同名的“备”,则你获得一枚与此牌名称相同的“备”。②结束阶段,你可移去一枚“备”,然后从牌堆中获得一张与此“备”名称相同的牌。', - xinzifu:'自缚', - xinzifu_info:'锁定技。出牌阶段结束时,若你本阶段内未使用牌,则你移去所有“备”且本回合的手牌上限-1。', - mibei:'秘备', - mibei_info:'使命技。①使命:当你使用的牌结算完成后,若你的“备”中包含的基本牌,锦囊牌,装备牌数量均大于1,则你从牌堆中获得这三种类型的牌各一张并获得技能“谋立”。②失败:结束阶段开始时,若你没有“备”,且你于本回合的准备阶段开始时也没有“备”,则你减1点体力上限。', - xinmouli:'谋立', - xinmouli_info:'出牌阶段限一次,你可以指定一名其他角色。其移去你的一个“备”,然后从牌堆中获得一张与此“备”名称相同的牌。', re_zhonghui:'手杀钟会', requanji:'权计', requanji_info:'出牌阶段结束时,若你的手牌数大于体力值,或当你受到1点伤害后,你可以摸一张牌,然后将一张手牌置于武将牌上,称为“权”;你的手牌上限+X(X为“权”的数量)。', @@ -19695,29 +13378,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xinshenxing_info:'出牌阶段限X次(X为你的体力值),你可以弃置两张牌,然后摸一张牌。若这两张牌颜色不同,则改为摸两张牌。', xinbingyi:'秉壹', xinbingyi_info:'结束阶段,你可展示所有手牌。若这些牌的颜色或类型均相同,则你可以令至多X名角色各摸一张牌(X为你的手牌数)。', - db_wenyang:'文鸯', - dbquedi:'却敌', - dbquedi_info:'每回合限一次。当你使用【杀】或【决斗】指定唯一目标后,你可选择:①获得目标角色的一张手牌。②弃置一张基本牌,并令此牌的伤害值基数+1。③背水:减1点体力上限,然后依次执行上述所有选项。', - dbzhuifeng:'椎锋', - dbzhuifeng_info:'魏势力技。每回合限两次,你可以失去1点体力并视为使用一张【决斗】。当你因此【决斗】而受到伤害时,你防止此伤害并令此技能失效直到出牌阶段结束。', - dbchongjian:'冲坚', - dbchongjian_backup:'冲坚', - dbchongjian_info:'吴势力技。你可以将一张装备牌当做一种【杀】(无距离限制且无视防具)或【酒】使用。当你以此法使用【杀】造成伤害后,你获得目标角色装备区内的X张牌(X为伤害值)。', - dbchoujue:'仇决', - dbchoujue_info:'锁定技。当你杀死其他角色后,你加1点体力上限并摸两张牌,然后本回合发动【却敌】的次数上限+1。', qiaozhou:'谯周', zhiming:'知命', zhiming_info:'准备阶段开始时或弃牌阶段结束时,你摸一张牌,然后可以将一张牌置于牌堆顶。', xingbu:'星卜', xingbu_info:'结束阶段,你可以展示牌堆顶的三张牌,然后你可以根据X值(X为这三张牌中红色牌的数量),令一名其他角色获得对应的效果直到其下回合结束:①三张:其摸牌阶段多摸两张牌,使用【杀】的次数上限+1。②两张:其使用【杀】的次数上限-1,跳过弃牌阶段。③小于两张:其于准备阶段开始时弃置一张手牌。', - yuanqing:'渊清', - yuanqing_info:'锁定技,出牌阶段结束时,你随机将弃牌堆中你本阶段使用过的牌类型的各一张牌置于仁库中。', - shuchen:'疏陈', - shuchen_info:'锁定技,当有角色进入濒死状态时,若仁库中的牌数大于三,则你获得仁库中的所有牌,然后其回复1点体力。', - rechuhai:'除害', - rechuhai_info:'使命技。①出牌阶段限一次,你可以摸一张牌,然后和一名其他角色拼点。若你赢,则你观看其手牌,并从牌堆/弃牌堆中获得其手牌中包含的类型的牌各一张,且当你于此阶段内对其造成伤害后,你将牌堆/弃牌堆中的一张装备牌置于你的一个空置装备栏内。②当你因发动〖除害①〗而展示拼点牌时,你令此牌的点数+X(X=(4-你装备区的牌数))。③使命:当有装备牌进入你的装备区后,若你的装备区内有至少三张牌,则你将体力值回复至上限,失去〖乡害〗并获得〖彰名〗。④失败:当你因发动〖除害①〗发起的拼点没赢时,若你的最终点数不大于6,则你触发使命失败分支。', - zhangming:'彰名', - zhangming_info:'锁定技。①你使用的♣牌不能被其他角色响应。②每回合限一次,当你对其他角色造成伤害后,你随机弃置其一张手牌,然后你从牌堆或弃牌堆中获得与其展示牌类型不同类型的牌各一张(若其没有手牌,则你改为从牌堆或弃牌堆中获得所有类型牌各一张),且以此法获得的牌不计入本回合的手牌上限。', xin_sunluban:'手杀孙鲁班', xinzenhui:'谮毁', xinzenhui_info:'出牌阶段限一次。当你使用【杀】或黑色普通锦囊牌指定目标时,你可选择另一名能成为此牌目标的其他角色并选择一项:①令其也成为此牌的目标。②获得其一张牌,然后将此牌的使用者改为该角色。', @@ -19726,33 +13391,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xin_caozhen:'手杀曹真', discretesidi:'司敌', discretesidi_info:'①当你使用的不为延时锦囊牌的牌结算结束后,你可选择一名R内不存在以a为第一序偶的二元序偶的其他角色a,并选择一名角色b,在关系R内建立二元序偶<a,b>(b对其他角色不可见)。②一名角色a使用不为延时锦囊牌的牌指定b为目标时,若(aRb)∧(此牌目标数为1)为真,则{你从R内移除<a,b>,且:若b为你,你摸一张牌;若b不为你,你可选择:⒈取消此牌的目标,然后若场上没有处于濒死状态的角色,则你对a造成1点伤害。⒉摸两张牌};否则{你清除R内以a为第一元素的二元序偶}。', - sp_chendong:'陈武董袭', - spyilie:'毅烈', - spyilie_info:'出牌阶段开始时,你可选择:①本阶段内使用【杀】的次数上限+1。②本回合内使用【杀】被【闪】抵消时,摸一张牌。③背水:失去1点体力,然后依次执行上述所有选项。', - spfenming:'奋命', - spfenming_info:'出牌阶段限一次,你可以选择一名体力值不大于你的角色。若其:未横置,其横置;已横置,你获得其一张牌。', - yuanhuan:'袁涣', - qingjue:'请决', - qingjue_info:'每轮限一次。当有其他角色A使用牌指定另一名体力值小于A且不处于濒死状态的其他角色B为目标时,你可以摸一张牌,然后与A拼点。若你赢,你取消此目标。若你没赢,你将此牌的目标改为自己。', - fengjie:'奉节', - fengjie2:'奉节', - fengjie_info:'锁定技,准备阶段开始时,你选择一名其他角色并获得如下效果直到你下回合开始:一名角色的结束阶段开始时,你将手牌摸至(至多摸四张)或弃置至与其体力值相等。', - sp_zongyu:'手杀宗预', - zhibian:'直辩', - zhibian_info:'准备阶段,你可以和一名其他角色拼点。若你赢,你可选择:①将其装备区/判定区内的一张牌移动到你的对应区域。②回复1点体力。③背水:跳过下个摸牌阶段,然后依次执行上述所有选项;若你没赢,你失去1点体力。', - yuyan:'御严', - yuyan_info:'锁定技。当你成为非转换的【杀】的目标时,若使用者的体力值大于你且此【杀】有点数,则你令使用者选择一项:①交给你一张点数大于此【杀】的牌。②取消此目标。', fuqian:'傅佥', jueyong:'绝勇', jueyong_info:'锁定技。①当你不因〖绝勇〗成为唯一牌的目标时,若此牌不为转化牌且对应的实体牌牌数为1且不为【桃】或【酒】且你的“绝”数小于你的体力值的二倍,则你将此牌置于你的武将牌上,称为“绝”,且取消此牌的目标。②结束阶段开始时,若你有“绝”,则你令所有“绝”的原使用者依次对你使用所有“绝”,将无法使用的“绝”置入弃牌堆。', poxiang:'破降', poxiang_info:'出牌阶段限一次。你可以将一张牌交给一名其他角色。你摸三张牌(不计入本回合的手牌上限),移去所有“绝”并失去1点体力。', - jutu:'据土', - jutu_info:'锁定技,准备阶段,你获得所有你武将牌上的“生”,然后摸X+1张牌,然后将X张牌置于你的武将牌上,称为“生”(X为你因〖邀虎〗选择势力的角色数量)。', - yaohu:'邀虎', - yaohu_info:'每轮限一次,你的回合开始时,你须选择场上一个势力。该势力其他角色的出牌阶段开始时,其获得你的一张“生”,然后其须选择一项:①对你指定的另一名的其他角色使用一张【杀】(无距离和次数限制);②交给你两张牌。', - rehuaibi:'怀璧', - rehuaibi_info:'主公技,锁定技,你的手牌上限+X(X为你因〖邀虎〗选择势力的角色数量)。', simafu:'司马孚', xunde:'勋德', xunde_info:'一名角色受到伤害后,若你至其的距离不大于1,则你可判定。若判定结果:大于5,你令该角色获得判定牌;小于7,你令伤害来源弃置一张牌。', @@ -19772,47 +13415,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ huantu_info:'每轮限一次。一名角色的摸牌阶段开始前,若其在你攻击范围内,则你可以交给其一张牌并令其跳过此阶段。然后你于此回合的结束阶段选择一项:①令其回复1点体力并摸两张牌。②你摸三张牌,然后交给其两张手牌。', bihuo:'避祸', bihuo_info:'限定技。一名角色脱离濒死状态时,你可以令其摸三张牌,然后其他角色计算至其的距离时+X直到本轮结束(X为角色数)。', - sp_wangshuang:'手杀王双', - yiyong:'异勇', - yiyong_info:'当你受到其他角色造成的渠道为【杀】的伤害后,若你的装备区内有武器牌,则你可以获得此【杀】对应的所有实体牌,然后将这些牌当做【杀】对伤害来源使用(无距离限制)。若其装备区内没有武器牌,则此伤害+1。', - shanxie:'擅械', - shanxie_info:'①出牌阶段限一次,你可从牌堆中获得一张武器牌。若牌堆中没有武器牌,则你改为随机获得一名角色装备区内的一张武器牌。②当其他角色使用【闪】响应你使用的【杀】时,若此【闪】没有点数或点数不大于你攻击范围的二倍,则你令此【闪】无效。', - shanxie_info_old:'①出牌阶段限一次,你可选择一项:⒈从牌堆中获得一张武器牌。⒉获得一名其他角色装备区内的一张武器牌并使用,然后其将一张手牌当做【杀】对你使用。②当其他角色使用【闪】响应你使用的【杀】时,若此【闪】没有点数或点数不大于你攻击范围的二倍,则你令此【闪】无效。', - sunyi:'手杀孙翊', - zaoli:'躁厉', - zaoli_info:'锁定技。①你不能于回合内使用你手牌中不为本回合获得的牌。②当你使用或打出手牌时,你获得一个“厉”(至多4个)。③回合开始时,若你有“厉”,则你移去所有“厉”并弃置任意张牌,然后摸X+Y张牌。若X大于2,你失去1点体力(X为你移去的标记数,Y为你弃置的牌数)。', - sp_gaolan:'手杀高览', - spjungong:'峻攻', - spjungong_info:'出牌阶段,你可失去X+1点体力或弃置X+1张牌,视为对一名其他角色使用【杀】(不计入次数和距离限制,X为你本回合内发动过〖等力〗的次数)。若你因此【杀】造成了伤害,则你令此技能失效直到回合结束。', - spdengli:'等力', - spdengli_info:'当你使用【杀】指定目标后,或成为【杀】的目标后,若使用者和目标的体力值相等,则你摸一张牌。', - sp_huaman:'手杀花蔓', - spxiangzhen:'象阵', - spxiangzhen_info:'锁定技。①【南蛮入侵】对你无效。②当有角色使用的【南蛮入侵】结算结束后,若有角色因此牌受到过伤害,则你和使用者各摸一张牌。', - spfangzong:'芳踪', - spfangzong_info:'锁定技。若你于当前回合内未发动过〖嬉战〗选择过选项二,则:①你不能于回合内使用具有伤害标签的牌指定攻击范围内的角色为目标。②攻击范围内包含你的角色不能使用具有伤害标签的牌指定你为目标。③结束阶段,你将手牌摸至X张(X为场上存活人数且至多为8)', - spxizhan:'嬉战', - spxizhan_info:'其他角色的回合开始时,你须选择一项:①失去1点体力。②弃置一张牌。然后若此牌的花色为:♠,其视为使用一张【酒】;♥,你视为使用一张【无中生有】;♣,你视为对其使用【铁索连环】;♦:你视为对其使用火【杀】(无距离限制)。', - sp_cuiyan:'手杀崔琰', - spyajun:'雅俊', - spyajun_info:'①摸牌阶段,你令额定摸牌数+1。②出牌阶段开始时,你可以用一张本回合获得的牌与其他角色拼点。若你赢,则你可将其中一张拼点牌置于牌堆顶。若你没赢,你本回合的手牌上限-1。', - spzundi:'尊嫡', - spzundi_info:'出牌阶段限一次,你可以弃置一张手牌并选择一名角色,然后你进行判定。若结果为:黑色,其摸三张牌;红色,其可以移动场上的一张牌。', - sp_zhangchangpu:'手杀张昌蒲', - spdifei:'抵诽', - spdifei_info:'锁定技。每回合限一次,当你受到伤害后,你摸一张牌或弃置一张手牌,然后展示所有手牌。若此伤害的渠道为没有花色的牌或你的手牌中没有与此牌花色相同的牌,则你回复1点体力。', - spyanjiao:'严教', - spyanjiao_info:'出牌阶段限一次。你可以将手牌中一种花色的所有牌交给一名其他角色,对其造成1点伤害。然后你于自己的下回合开始时摸等量的牌。', - sp_jiangwan:'蒋琬', - spzhenting:'镇庭', - spzhenting_info:'每回合限一次。当你攻击范围内的角色成为【杀】或延时锦囊的目标时,若你不是此牌的使用者且不是此牌的目标,则你可以将此目标改为自己。然后你选择一项:①弃置使用者的一张手牌。②摸一张牌。', - spjincui:'尽瘁', - spjincui_info:'限定技。出牌阶段,你可以和一名其他角色交换位置,然后失去X点体力(X为你的体力值)。', - sp_jiangqing:'蒋钦', - spjianyi:'俭衣', - spjianyi_info:'锁定技。其他角色的回合结束时,若弃牌堆中有于本回合内因弃置而进入弃牌堆的防具牌,则你获得其中一张。', - spshangyi:'尚义', - spshangyi_info:'出牌阶段限一次。你可以弃置一张牌并选择一名其他角色。其观看你的手牌,然后你观看其手牌并获得其中的一张。', sunhanhua:'手杀孙寒华', chongxu:'冲虚', chongxu_info:'出牌阶段限一次,你可以随机演奏一首音乐,并根据完成度来获得相应的分数(至多五分)。然后你可修改〖妙剑〗或〖莲华〗(消耗3分),并使用剩余的分数进行摸牌(每张2分)。', @@ -19834,13 +13436,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ rezongxuan:'纵玄', rezongxuan_place:'纵玄', rezongxuan_info:'当你的牌因弃置而进入弃牌堆后,你可以将其以任意顺序置于牌堆顶。出牌阶段限一次,你可以摸一张牌,然后将一张牌置于牌堆顶。', - sp_lvfan:'吕范', - spdiaodu:'调度', - spdiaodu_info:'准备阶段,你可令一名角色摸一张牌,然后移动其装备区内的一张牌。', - spdiancai:'典财', - spdiancai_info:'其他角色的结束阶段开始时,你可以令至多X名角色各摸一张牌(X为你本回合失去的手牌数)。', - spyanji:'严纪', - spyanji_info:'出牌阶段开始时,你可以进行“整肃”。', yj_huangzhong:'☆黄忠', spshidi:'势敌', spshidi_info:'转换技,锁定技。①准备阶段/结束阶段开始时,若你发动此分支的累计次数为奇数/偶数,则你获得一个“☯”。②若你的“☯”数为偶数,则你至其他角色的距离-1,且你使用的黑色【杀】不可被响应。③若你的“☯”数为奇数,则其他角色至你的距离+1,且你不可响应红色【杀】。', @@ -19848,20 +13443,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ spyishi_info:'当你对装备区有牌的其他角色造成伤害时,你可令此伤害-1,然后获得其装备区内的一张牌。', spqishe:'骑射', spqishe_info:'你可以将一张装备牌当做【酒】使用。你的手牌上限+X(X为你装备区内的牌数)。', - sp_huangfusong:'手杀皇甫嵩', - spzhengjun:'整军', - spzhengjun_info:'①出牌阶段开始时,你可进行“整肃”。②当你因整肃而摸牌或回复体力后,你可令一名其他角色选择摸两张牌或回复1点体力。', - spshiji:'势击', - spshiji_info:'当你对其他角色造成属性伤害时,若你的手牌数不为全场唯一最多,则你可以观看其手牌。你令其弃置其中的所有红色牌,然后摸等量的牌。', - sptaoluan:'讨乱', - sptaoluan_info:'每回合限一次。一名角色的判定结果确定时,若结果的花色为♠,则你可以终止导致此判定发生的上级事件。然后选择一项:①获得判定牌对应的实体牌。②视为对判定角色使用一张火【杀】(无距离和次数限制)', - sp_zhujun:'手杀朱儁', - yangjie:'佯解', - yangjie_info:'出牌阶段限一次,你可以摸一张牌并和一名其他角色A拼点。当你以此法展示你的拼点牌时,你令此牌点数-X(X为你已损失的体力值)。若你没赢,则你可以令另一名其他角色B获得两张拼点牌,然后其视为对A使用一张火【杀】。', - zjjuxiang:'拒降', - zjjuxiang_info:'限定技。一名其他角色脱离濒死状态时,你可以对其造成1点伤害,然后摸X张牌(X为其体力上限且至多为5)。', - houfeng:'厚俸', - houfeng_info:'每轮限一次。一名其他角色的出牌阶段开始时,若其在你的攻击范围内,则你可以令其进行“整肃”。然后当其于本回合内因整肃而摸牌或回复体力后,你可选择摸两张牌或回复1点体力。', sp_maojie:'毛玠', bingqing:'秉清', bingqing_info:'当你于出牌阶段内使用的牌结算结束后,若你于本阶段内使用的所有其他牌与此牌花色均不相同,则你可根据X的值执行对应效果:为2,你令一名角色摸两张牌;为3,你弃置一名角色区域内的一张牌;为4,你对一名其他角色造成1点伤害。(X为你本阶段内使用过的牌中包含的花色数)', @@ -19893,11 +13474,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_bulianshi:'手杀步练师', reanxu:'安恤', reanxu_info:'出牌阶段限一次,你可以选择两名其他角色,令其中一名角色获得另一名角色的一张牌。若以此法移动的牌不来自装备区,则你摸一张牌。然后你可以令二者中手牌数较少的一名角色摸一张牌。', - liuba:'刘巴', - duanbi:'锻币', - duanbi_info:'出牌阶段限一次。若场上所有角色的手牌数之和大于角色数之和的二倍,则你可以令所有其他角色各弃置X张手牌(X为该角色手牌数的一半且向下取整且至多为3)。然后你可选择一名角色,令其随机获得三张以此法被弃置的牌。', - tongduo:'统度', - tongduo_info:'每回合限一次。当你成为其他角色使用牌的唯一目标后,你可令一名角色重铸一张牌。', xin_jushou:'手杀沮授', xinjianying:'渐营', xinjianying_info:'①当你于出牌阶段内使用与此阶段你使用的上一张牌点数或花色相同的牌时,你可以摸一张牌。②出牌阶段限一次,你可以将一张牌当做任意基本牌使用(不计入次数限制)。若你于此阶段内使用的上一张牌有花色,则此牌的花色视为上一张牌的花色。', @@ -20029,11 +13605,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mobile_yijiang67:'手杀异构·原创设计', mobile_sp:'手杀异构·SP', mobile_changshi:'十常侍单体', - mobile_shijiren:'始计篇·仁', - mobile_shijizhi:'始计篇·智', - mobile_shijixin:'始计篇·信', - mobile_shijiyong:'始计篇·勇', - mobile_shijiyan:'始计篇·严', } }; }); diff --git a/character/shiji.js b/character/shiji.js new file mode 100644 index 000000000..76dfc633f --- /dev/null +++ b/character/shiji.js @@ -0,0 +1,6465 @@ +'use strict'; +game.import('character',function(lib,game,ui,get,ai,_status){ + return { + name:'shiji', + connect:true, + characterSort:{ + shiji:{ + mobile_shijizhi:["sp_wangcan","sp_chenzhen","sp_sunshao","sp_xunchen","luotong","sp_duyu","sp_bianfuren","feiyi"], + mobile_shijixin:['wujing','sp_mifuren','sp_xinpi','wangling','wangfuzhaolei','zhouchu','sp_kongrong','sp_yanghu'], + mobile_shijiren:['caizhenji','xiangchong','sp_huaxin','sp_xujing','zhangzhongjing','sp_zhangwen','liuzhang','qiaogong'], + mobile_shijiyong:['db_wenyang','sp_chendong','yuanhuan','sp_zongyu','sp_wangshuang','sunyi','sp_gaolan','sp_huaman'], + mobile_shijiyan:['sp_cuiyan','sp_zhangchangpu','sp_jiangwan','sp_jiangqing','sp_lvfan','sp_huangfusong','sp_zhujun','liuba'], + }, + }, + character:{ + liuba:['male','shu',3,['duanbi','tongduo']], + sp_zhujun:['male','qun',4,['yangjie','zjjuxiang','houfeng']], + sp_huangfusong:['male','qun',4,['spzhengjun','spshiji','sptaoluan']], + sp_lvfan:['male','wu',3,['spdiaodu','spdiancai','spyanji']], + sp_jiangqing:['male','wu',4,['spjianyi','spshangyi']], + sp_jiangwan:['male','shu',3,['spzhenting','spjincui']], + sp_zhangchangpu:['female','wei',3,['spdifei','spyanjiao']], + sp_cuiyan:['male','wei',3,['spyajun','spzundi']], + sp_huaman:['female','shu',4,['spxiangzhen','spfangzong','spxizhan']], + sp_gaolan:['male','qun',4,['spjungong','spdengli']], + sunyi:['male','wu',4,['zaoli']], + sp_wangshuang:['male','wei',4,['yiyong','shanxie']], + sp_zongyu:['male','shu',3,['zhibian','yuyan']], + yuanhuan:['male','wei',3,['qingjue','fengjie']], + sp_chendong:['male','wu',4,['spyilie','spfenming']], + db_wenyang:['male','wei',4,['dbquedi','dbzhuifeng','dbchongjian','dbchoujue'],['doublegroup:wei:wu']], + sp_yanghu:['male','qun',3,['mingfa','rongbei']], + qiaogong:['male','wu',3,['yizhu','luanchou']], + liuzhang:['male','qun',3,['jutu','yaohu','rehuaibi'],['zhu']], + sp_zhangwen:['male','wu',3,['gebo','spsongshu']], + zhangzhongjing:['male','qun',3,['jishi','xinliaoyi','binglun']], + sp_xujing:['male','shu',3,['boming','ejian']], + sp_huaxin:['male','wei',3,['yuanqing','shuchen']], + xiangchong:['male','shu',4,['guying','muzhen']], + caizhenji:['female','wei',3,['sheyi','tianyin']], + sp_kongrong:['male','qun',3,['xinlirang','xinmingshi']], + zhouchu:['male','wu',4,['xianghai','rechuhai']], + wangfuzhaolei:['male','shu',4,['xunyi']], + wangling:['male','wei',4,['xingqi','xinzifu','mibei'],['clan:太原王氏']], + wujing:['male','wu',4,['heji','liubing']], + sp_mifuren:['female','shu',3,['xinguixiu','qingyu']], + sp_xinpi:['male','wei',3,['spyinju','spchijie']], + feiyi:['male','shu',3,['mjshengxi','fyjianyu']], + sp_bianfuren:['female','wei',3,['spwanwei','spyuejian']], + sp_duyu:['male','qun',4,['spwuku','spsanchen']], + luotong:['male','wu',4,['qinzheng']], + sp_wangcan:['male','wei',3,['spqiai','spshanxi']], + sp_chenzhen:['male','shu',3,['shameng']], + sp_sunshao:['male','wu',3,['mjdingyi','mjzuici','mjfubi']], + sp_xunchen:['male','qun',3,['mjweipo','mjchenshi','mjmouzhi'],['clan:颍川荀氏']], + + }, + skill:{ + //刘巴 + duanbi:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + var num1=0,num2=0; + var count=game.countPlayer(function(current){ + num1+=current.countCards('h'); + num2++; + return current!=player; + }); + return count>0&&num1>num2*2; + }, + filterTarget:true, + selectTarget:-1, + multitarget:true, + multiline:true, + content:function(){ + 'step 0' + event.num=0; + event.cards=[]; + event.targets.sortBySeat(); + event.targets.remove(player); + 'step 1' + var target=targets[num]; + var num=Math.min(3,Math.floor(target.countCards('h')/2)); + if(num>0) target.chooseToDiscard('h',true,num); + else event._result={bool:false}; + 'step 2' + if(result.bool&&Array.isArray(result.cards)) event.cards.addArray(result.cards); + event.num++; + if(event.num3?'随机获得三':('获得'+get.cnNumber(event.cards.length)))+'张被弃置的牌?').set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target); + if(target.hasSkillTag('nogain')) att/=10; + if(target.hasJudge('lebu')) att/=4; + return att*Math.sqrt(Math.max(1,5-target.countCards('h'))); + }); + 'step 4' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'fire'); + target.gain(cards.randomGets(3),'gain2'); + } + }, + ai:{ + order:10, + result:{ + target:function(player,target){ + if(player==target) return 3; + return -Math.min(3,Math.floor(target.countCards('h')/2)); + }, + }, + }, + }, + tongduo:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + direct:true, + usable:1, + filter:function(event,player){ + return player!=event.player&&event.targets.length==1&&game.hasPlayer(function(current){ + return current.countCards('he')>0; + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('tongduo'),'令一名角色重铸一张牌',function(card,player,target){ + return target.countCards('he')>0; + }).set('ai',function(target){ + return get.attitude(_status.event.player,target)*Math.min(3,Math.floor(target.countCards('h')/2)); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('tongduo',target); + } + else event.finish(); + 'step 2' + if(target.countCards('he')==0) event.finish(); + else target.chooseCard('he',true,'请重铸一张牌'); + 'step 3' + target.loseToDiscardpile(result.cards); + target.draw(); + }, + }, + //朱儁 + yangjie:{ + audio:2, + group:['yangjie_add'], + enable:'phaseUse', + prompt:'摸一张牌并与一名其他角色进行拼点', + usable:1, + filter:function(event,player){ + return !player.hasSkillTag('noCompareSource'); + }, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0&& + !target.hasSkillTag('noCompareTarget'); + }, + content:function(){ + 'step 0' + player.draw(); + 'step 1' + if(player.canCompare(target)) player.chooseToCompare(target).set('small',true); + else event.finish(); + 'step 2' + if(!result.bool){ + var cards=[result.player,result.target].filterInD('d'); + if(!cards.length||!game.hasPlayer((current)=>current!=player&¤t!=target)) event.finish(); + else{ + event.cards=cards; + player.chooseTarget('请选择一名角色','令其获得'+get.translation(cards)+',且视为对'+get.translation(target)+'使用一张火【杀】',function(card,player,target){ + return target!=player&&target!=_status.event.getParent().target; + }).set('ai',function(target){ + var player=_status.event.player,cards=_status.event.getParent().cards,target2=_status.event.getParent().target; + var val=get.value(cards,target)*get.attitude(player,target); + if(val<=0) return 0; + return val+target.canUse({name:'sha',nature:'fire',isCard:true},target2,false)?get.effect(target2,{name:'sha',nature:'fire',isCard:true},target,player):0; + }); + } + } + else event.finish(); + 'step 3' + if(result.bool){ + var source=result.targets[0]; + event.source=source; + player.line(source); + source.gain(cards,'gain2'); + } + else event.finish(); + 'step 4' + var card={name:'sha',nature:'fire',isCard:true}; + if(target.isIn()&&source.isIn()&&source.canUse(card,target,false)) source.useCard(card,target,false); + }, + subSkill:{ + add:{ + trigger:{player:'compare'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.getParent().name=='yangjie'&&event.num1>1&&player.isDamaged(); + }, + content:function(){ + var num=player.getDamagedHp(); + game.log(player,'的拼点牌点数-',num); + trigger.num1=Math.max(1,trigger.num1-num); + } + }, + }, + ai:{ + order:3, + result:{target:-1.5}, + }, + }, + zjjuxiang:{ + audio:2, + trigger:{global:'dyingAfter'}, + logTarget:'player', + limited:true, + skillAnimation:true, + animationColor:'thunder', + filter:function(event,player){ + return event.player!=player&&event.player.isAlive(); + }, + check:function(event,player){ + return get.damageEffect(event.player,player,player)>0; + }, + content:function(){ + 'step 0' + player.awakenSkill('zjjuxiang'); + trigger.player.damage(); + 'step 1' + if(trigger.player.maxHp>0) player.draw(trigger.player.maxHp); + }, + ai:{expose:10}, + }, + houfeng:{ + audio:3, + trigger:{global:'phaseUseBegin'}, + logTarget:'player', + round:1, + filter:(event,player)=>player.inRange(event.player), + check:function(event,player){ + var att=get.attitude(player,event.player); + return att>0; + }, + content:function(){ + 'step 0' + player.chooseButton(['选择'+get.translation(trigger.player)+'要进行的整肃类型',[['zhengsu_leijin','zhengsu_bianzhen','zhengsu_mingzhi'],'vcard']],true).set('ai',()=>Math.random()); + 'step 1' + if(result.bool){ + var name=result.links[0][2],target=trigger.player; + target.addTempSkill('zhengsu',{player:['phaseDiscardAfter','phaseAfter']}); + target.addTempSkill(name,{player:['phaseDiscardAfter','phaseAfter']}); + target.popup(name,'thunder'); + player.addTempSkill('houfeng_share'); + game.delayx(); + } + }, + subSkill:{ + share:{ + trigger:{global:['drawAfter','recoverAfter']}, + forced:true, + popup:false, + charlotte:true, + filter:function(event,player){ + return event.getParent(2).name=='zhengsu'; + }, + content:function(){ + player.chooseDrawRecover(2,true); + }, + }, + }, + }, + //手杀皇甫嵩 + spzhengjun:{ + audio:3, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return !player.hasSkill('zhengsu'); + }, + content:function(){ + 'step 0' + player.chooseButton([get.prompt('spzhengjun'),[['zhengsu_leijin','zhengsu_bianzhen','zhengsu_mingzhi'],'vcard']]).set('ai',()=>Math.random()); + 'step 1' + if(result.bool){ + player.logSkill('spzhengjun',player); + var name=result.links[0][2]; + player.addTempSkill('zhengsu',{player:['phaseDiscardAfter','phaseAfter']}); + player.addTempSkill(name,{player:['phaseDiscardAfter','phaseAfter']}); + player.popup(name,'thunder'); + game.delayx(); + } + }, + group:'spzhengjun_share', + subSkill:{ + share:{ + trigger:{player:['drawAfter','recoverAfter']}, + direct:true, + filter:function(event,player){ + return event.getParent(2).name=='zhengsu'; + }, + content:function(){ + 'step 0' + player.chooseTarget('整军:是否令一名其他角色也回复1点体力或摸两张牌?',lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + return Math.max(get.effect(target,{name:'wuzhong'},target,player),get.recoverEffect(target,target,player)); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('spzhengjun',target); + target.chooseDrawRecover(2,true); + } + }, + }, + }, + }, + spshiji:{ + audio:2, + trigger:{source:'damageBegin2'}, + logTarget:'player', + filter:function(event,player){ + return player!=event.player&&lib.linked.contains(event.nature)&&event.player.countCards('h')>0&&!player.isMaxHandcard(true); + }, + check:function(event,player){ + return get.attitude(player,event.player)<=0; + }, + content:function(){ + var target=trigger.player; + player.viewHandcards(target); + var hs=target.getCards('h',{color:'red'}); + if(hs.length){ + target.discard(hs); + player.draw(hs.length); + } + }, + }, + sptaoluan:{ + audio:2, + trigger:{global:'judgeFixing'}, + usable:1, + filter:function(event,player){ + return event.result&&event.result.suit=='spade'; + }, + check:function(event,player){ + return event.result.judge*get.attitude(player,event.player)<=0; + }, + content:function(){ + 'step 0' + var evt=trigger.getParent(); + if(evt.name=='phaseJudge') evt.excluded=true; + else{ + evt.finish(); + evt._triggered=null; + var nexts=trigger.next.slice(); + for(var next of nexts){ + if(next.name=='judgeCallback') trigger.next.remove(next); + } + var evts=game.getGlobalHistory('cardMove',function(evt){ + return evt.getParent(2)==trigger.getParent(); + }); + var cards=[]; + for(var i=evts.length-1;i>=0;i--){ + var evt=evts[i]; + for(var card of evt.cards){ + if(get.position(card,true)=='o') cards.push(card); + } + } + trigger.orderingCards.addArray(cards); + } + var list=[]; + if(get.position(trigger.result.card)=='d') list.push(0); + if(trigger.player.isIn()&&player.canUse({name:'sha',nature:'fire',isCard:true},trigger.player,false)) list.push(1); + if(list.length==2) player.chooseControl().set('choiceList',[ + '获得'+get.translation(trigger.result.card), + '视为对'+get.translation(trigger.player)+'使用一张火【杀】', + ]).set('choice',(get.effect(trigger.player,{name:'sha'},player,player)>0)?1:0); + else if(list.length==1) event._result={index:list[0]}; + else event.finish(); + 'step 1' + if(result.index==0) player.gain(trigger.result.card,'gain2'); + else player.useCard({name:'sha',nature:'fire',isCard:true},trigger.player,false) + }, + }, + //吕范 + spdiaodu:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('spdiaodu'),'令一名角色摸一张牌,然后移动其装备区内的一张牌').set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target); + if(att>0){ + if(target.hasCard(function(card){ + if(get.value(card,target)<=0&&game.hasPlayer(function(current){ + return current!=target&¤t.isEmpty(get.subtype(card,false))&&get.effect(current,card,player,player)>0; + })) return true; + return false; + },'e')) return 2*att; + if(!target.hasCard(function(card){ + var sub=get.subtype(card,false); + return game.hasPlayer(function(current){ + return current!=target&¤t.isEmpty(sub); + }) + },'e')) return 1; + } + else if(att<0){ + if(target.hasCard(function(card){ + if(get.value(card,target)>=4.5&&game.hasPlayer(function(current){ + return current!=target&¤t.isEmpty(get.subtype(card,false))&&get.effect(current,card,player,player)>0; + })) return true; + return false; + },'e')) return -att; + } + return 0; + }) + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('spdiaodu',target); + target.draw(); + } + else event.finish(); + 'step 2' + var es=target.getCards('e',function(card){ + var sub=get.subtype(card,false); + return game.hasPlayer(function(current){ + return current!=target&¤t.isEmpty(sub); + }) + }); + if(es.length){ + if(es.length==1) event._result={bool:true,links:es}; + else player.chooseButton(['移动'+get.translation(target)+'的一张装备牌',es],true).set('ai',function(button){ + var player=_status.event.player,target=_status.event.getParent().target,card=button.link; + if(game.hasPlayer(function(current){ + return current!=target&¤t.isEmpty(get.subtype(card,false))&&get.effect(current,card,player,player)>0; + })) return -get.value(card,target)*get.attitude(player,target); + return 0; + }); + } + else event.finish(); + 'step 3' + if(result.bool){ + event.card=result.links[0]; + player.chooseTarget(true,'选择'+get.translation(event.card)+'的移动目标',function(card,player,target){ + return target.isEmpty(_status.event.subtype); + }).set('subtype',get.subtype(event.card)).set('ai',function(target){ + var evt=_status.event; + return get.effect(target,evt.getParent().card,evt.player,evt.player); + }); + } + else event.finish(); + 'step 4' + if(result.bool){ + var target2=result.targets[0]; + target.line(target2); + target.$give(card,target2); + game.delay(0.5); + target2.equip(card); + } + }, + }, + spdiancai:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player!=event.player&&player.hasHistory('lose',function(evt){ + return evt.hs&&evt.hs.length>0; + }); + }, + content:function(){ + 'step 0' + var num=0; + player.getHistory('lose',function(evt){ + if(evt.hs) num+=evt.hs.length; + }); + num=Math.min(num,game.countPlayer()); + player.chooseTarget(get.prompt('spdiancai'),[1,num],'令至多'+get.cnNumber(num)+'名角色各摸一张牌').set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var targets=result.targets.sortBySeat(trigger.player); + player.logSkill('spdiancai',targets); + if(targets.length==1){ + targets[0].draw(); + event.finish(); + } + else game.asyncDraw(targets); + } + else event.finish(); + 'step 2' + game.delayx(); + }, + }, + spyanji:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return !player.hasSkill('zhengsu'); + }, + content:function(){ + 'step 0' + player.chooseButton([get.prompt('spyanji'),[['zhengsu_leijin','zhengsu_bianzhen','zhengsu_mingzhi'],'vcard']]); + 'step 1' + if(result.bool){ + player.logSkill('spyanji',player); + var name=result.links[0][2]; + player.addTempSkill('zhengsu',{player:'phaseDiscardAfter'}); + player.addTempSkill(name,{player:'phaseDiscardAfter'}); + player.popup(name,'thunder'); + game.delayx(); + } + }, + }, + //蒋钦 + spjianyi:{ + audio:2, + trigger:{global:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return player!=event.player&&game.getGlobalHistory('cardMove',function(evt){ + if(evt.name!='lose'||evt.type!='discard') return false; + for(var i of evt.cards){ + if(get.subtype(i,false)=='equip2'&&get.position(i,true)=='d') return true; + } + return false; + }).length>0; + }, + content:function(){ + 'step 0' + var cards=[]; + game.getGlobalHistory('cardMove',function(evt){ + if(evt.name!='lose'||evt.type!='discard') return false; + for(var i of evt.cards){ + if(get.subtype(i,false)=='equip2'&&get.position(i,true)=='d') cards.push(i); + } + }); + player.chooseButton(['俭衣:获得一张防具牌',cards],true).set('ai',function(button){ + return get.value(button.link,_status.event.player); + }); + 'step 1' + if(result.bool) player.gain(result.links,'gain2'); + }, + }, + spshangyi:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')>0&&game.hasPlayer((current)=>lib.skill.spshangyi.filterTarget(null,player,current)); + }, + filterCard:true, + position:'he', + check:function(card){ + return 6-get.value(card); + }, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')>0; + }, + content:function(){ + target.viewHandcards(player); + player.gainPlayerCard(target,'h',true,'visible'); + }, + ai:{ + order:6, + result:{ + player:0.5, + target:function(player,target){ + if(target.hasSkillTag('noh')) return 0; + return -1; + }, + }, + }, + }, + //蒋琬 + spzhenting:{ + audio:2, + trigger:{global:'useCardToTarget'}, + usable:1, + filter:function(event,player){ + return (event.card.name=='sha'||get.type(event.card,false)=='delay')&& + event.player!=player&&!event.targets.contains(player)&&player.inRange(event.target); + }, + logTarget:'target', + check:function(event,player){ + var target=event.target,source=event.player; + var eff1=get.effect(target,event.card,source,player); + if(eff1>=0) return false; + var eff2=get.effect(player,event.card,source,player); + if(eff2>=0) return true; + if(eff1) + if(event.card.name=='sha'){ + if(player.hasShan()) return true; + if(eff1>eff2) return false; + if(player.hp>2) return true; + if(player.hp==2) return eff2>eff1/3; + return false; + } + if(event.card.name=='shandian'||event.card.name=='bingliang') return true; + if(event.card.name=='lebu') return !player.needsToDiscard()&&target.needsToDiscard(); + return false; + }, + content:function(){ + 'step 0' + var target=trigger.target,evt=trigger.getParent(); + evt.triggeredTargets2.remove(target); + evt.targets.remove(target); + evt.triggeredTargets2.add(player); + evt.targets.add(player); + game.log(trigger.card,'的目标被改为了',player); + trigger.untrigger(); + 'step 1' + if(!trigger.player.countDiscardableCards(player,'h')) event._result={index:0}; + else player.chooseControl().set('choiceList',[ + '摸一张牌', + '弃置'+get.translation(trigger.player)+'的一张手牌', + ]); + 'step 2' + if(result.index==0) player.draw(); + else{ + player.line(trigger.player,'fire'); + player.discardPlayerCard(trigger.player,true,'h'); + } + }, + ai:{ + threaten:1.4, + }, + }, + spjincui:{ + audio:2, + enable:'phaseUse', + usable:1, + limited:true, + skillAnimation:true, + animationColor:'orange', + filterTarget:lib.filter.notMe, + content:function(){ + 'step 0' + player.awakenSkill('spjincui'); + game.broadcastAll(function(target1,target2){ + game.swapSeat(target1,target2); + },player,target); + 'step 1' + if(player.hp>0) player.loseHp(player.hp); + }, + ai:{ + order:5, + result:{ + player:function(player,target){ + if(player.hasUnknown()) return 0; + if(!player.countCards('h',{name:['tao','jiu']})) return 0; + var num=0,current=player.next; + while(true){ + num-=get.sgn(get.attitude(player,current)); + if(current==target) break; + current=current.next; + } + while(true){ + if(current==player) break; + num+=get.sgn(get.attitude(player,current))*1.1; + current=current.next; + } + if(nummap[i]); + list.push('cancel2'); + return list; + }, + check:function(event,player){ + var map={},hs=player.getCards('h'),min=Infinity,min_suit=null; + for(var i of hs){ + var suit=get.suit(i,player); + if(!map[suit]) map[suit]=0; + map[suit]+=get.value(i); + } + for(var i in map){ + if(map[i]5||get.value(ui.selected.cards,player)>5) return 0; + return get.damageEffect(target,player,target); + }, + }, + }, + } + }, + prompt:()=>'请选择【严教】的目标', + }, + subSkill:{ + draw:{ + onremove:true, + trigger:{player:'phaseBegin'}, + forced:true, + charlotte:true, + content:function(){ + player.draw(player.countMark('spyanjiao_draw')); + player.removeSkill('spyanjiao_draw'); + }, + mark:true, + intro:{content:'下回合开始时摸#张牌'}, + }, + backup:{audio:'spyanjiao'}, + }, + ai:{ + order:1, + result:{player:1}, + }, + }, + //崔琰 + spyajun:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + var hs=player.getCards('h'); + return hs.length>0&&!player.hasSkillTag('noCompareSource')&&player.hasHistory('gain',function(evt){ + for(var i of evt.cards){ + if(hs.contains(i)) return true; + } + return false; + })&&game.hasPlayer(function(current){ + return current!=player&&player.canCompare(current); + }); + }, + content:function(){ + 'step 0' + var cards=[],hs=player.getCards('h'); + player.getHistory('gain',function(evt){ + cards.addArray(evt.cards); + }); + cards=cards.filter(function(i){ + return hs.contains(i); + }); + player.chooseCardTarget({ + prompt:get.prompt('spyajun'), + prompt2:'操作提示:选择一张本回合新获得的牌作为拼点牌,然后选择一名拼点目标', + cards:cards, + filterCard:function(card){ + return _status.event.cards.contains(card); + }, + filterTarget:function(card,player,target){ + return player.canCompare(target); + }, + ai1:function(card){ + return get.number(card)-get.value(card); + }, + ai2:function(target){ + return -get.attitude(_status.event.player,target)*Math.sqrt(5-Math.min(4,target.countCards('h')))*(target.hasSkillTag('noh')?0.5:1); + }, + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('spyajun',target); + var next=player.chooseToCompare(target); + if(!next.fixedResult) next.fixedResult={}; + next.fixedResult[player.playerid]=result.cards[0]; + } + else event.finish(); + 'step 2' + if(result.bool){ + var cards=[result.player,result.target].filterInD('d'); + if(cards.length){ + player.chooseButton(['是否将一张牌置于牌堆顶?',cards]).set('ai',function(button){ + if(get.color(button.link)=='black') return 1; + return 0; + }); + } + else event.finish(); + } + else{ + player.addMark('spyajun_less',1,false); + player.addTempSkill('spyajun_less'); + event.finish(); + } + 'step 3' + if(result.bool){ + var card=result.links[0]; + card.fix(); + ui.cardPile.insertBefore(card,ui.cardPile.firstChild); + game.updateRoundNumber(); + game.log(player,'将',card,'置于牌堆顶'); + } + }, + group:'spyajun_draw', + subSkill:{ + draw:{ + audio:'spyajun', + trigger:{player:'phaseDrawBegin2'}, + forced:true, + locked:false, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + trigger.num++; + }, + }, + less:{ + onremove:true, + charlotte:true, + intro:{content:'手牌上限-#'}, + mod:{ + maxHandcard:function(player,num){ + return num-player.countMark('spyajun_less'); + } + }, + }, + }, + }, + spzundi:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterCard:true, + filterTarget:true, + check:function(card){ + return 7-get.value(card); + }, + content:function(){ + 'step 0' + player.judge(); + 'step 1' + if(result.color=='black') target.draw(3); + else target.moveCard(); + }, + ai:{ + order:8, + result:{ + target:function(player,target){ + if(target.canMoveCard(true)) return 3; + return 1; + }, + }, + }, + }, + //花蔓 + spxiangzhen:{ + trigger:{target:'useCardToBefore'}, + forced:true, + audio:2, + filter:function(event,player){ + return event.card.name=='nanman'; + }, + content:function(){ + trigger.cancel(); + }, + group:'spxiangzhen_draw', + subSkill:{ + draw:{ + audio:'spxiangzhen', + trigger:{global:'useCardAfter'}, + forced:true, + filter:function(event,player){ + return event.card.name=='nanman'&&game.hasPlayer2(function(current){ + return current.hasHistory('damage',function(evt){ + return evt.card==event.card; + }); + }); + }, + content:function(){ + 'step 0' + if(player!=trigger.player&&trigger.player.isIn()) game.asyncDraw([player,trigger.player].sortBySeat()); + else{ + player.draw(); + event.finish(); + } + 'step 1' + game.delayx(); + }, + }, + }, + }, + spfangzong:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + return !player.hasSkill('spxizhan_spfangzong')&&player.countCards('h')0&&!player.hasSkill('spxizhan_spfangzong')&&player.inRange(target)) return false; + }, + targetEnabled:function(card,player,target){ + if(get.tag(card,'damage')>0&&!target.hasSkill('spxizhan_spfangzong')&&player.inRange(target)) return false; + }, + }, + }, + spxizhan:{ + trigger:{global:'phaseBegin'}, + forced:true, + locked:false, + logTarget:'player', + filter:function(event,player){ + return player!=event.player; + }, + content:function(){ + 'step 0' + player.chooseToDiscard('he','嬉战:弃置一张牌或失去1点体力','根据弃置的牌对'+get.translation(trigger.player)+'视为使用如下牌:
    ♠,其使用【酒】;♥,你使用【无中生有】
    ♣,对其使用【铁索连环】;♦:对其使用火【杀】').set('ai',function(card){ + var player=_status.event.player,target=_status.event.getTrigger().player; + var suit=get.suit(card,player),list; + switch(suit){ + case 'spade':list=[{name:'jiu'},target,target];break; + case 'heart':list=[{name:'wuzhong'},player,player];break; + case 'club':list=[{name:'tiesuo'},player,target];break; + case 'diamond':list=[{name:'sha',nature:'fire'},player,target];break; + } + list[0].isCard=true; + var eff=0; + if(list[1].canUse(list[0],list[2],false)) eff=get.effect(list[2],list[0],list[1],player); + if(eff>=0||suit=='club') eff=Math.max(eff,5); + return eff*1.5-get.value(card); + }); + 'step 1' + if(result.bool){ + player.addTempSkill('spxizhan_spfangzong'); + var target=trigger.player,card=result.cards[0],suit=get.suit(card,player); + if((!target||!target.isIn())&&suit!='heart') return; + switch(suit){ + case 'spade': + target.chooseUseTarget('jiu',true); + break; + case 'heart': + player.chooseUseTarget('wuzhong',true); + break; + case 'club': + if(player.canUse('tiesuo',target)) player.useCard({ + name:'tiesuo', + isCard:true, + },target); + break; + case 'diamond': + if(player.canUse({ + name:'sha', + isCard:true, + nature:'fire', + },target,false)) player.useCard({ + name:'sha', + isCard:true, + nature:'fire', + },target,false); + break; + } + } + else player.loseHp(); + }, + subSkill:{ + spfangzong:{charlotte:true}, + }, + }, + //高览 + spjungong:{ + enable:'phaseUse', + filter:function(event,player){ + var num=(player.getStat('skill').spjungong||0); + return (numplayer.hp) return num; + return [0,num]; + }, + check:function(card){ + return 6-get.value(card); + }, + prompt:function(){ + var player=_status.event.player,num=get.cnNumber((player.getStat('skill').spjungong||0)+1); + return '弃置'+num+'张牌或失去'+num+'点体力,视为使用杀'; + }, + content:function(){ + 'step 0' + if(!cards.length) player.loseHp(player.getStat('skill').spjungong||1); + player.useCard({name:'sha',isCard:true},target,false); + 'step 1' + if(player.hasHistory('sourceDamage',function(evt){ + var card=evt.card; + if(!card||card.name!='sha') return false; + var evtx=evt.getParent('useCard'); + return evtx.card==card&&evtx.getParent()==event; + })) player.addTempSkill('spjungong_block'); + }, + ai:{ + order:function(item,player){ + return get.order({name:'sha'},player)+1; + }, + result:{ + target:function(player,target){ + if(!ui.selected.cards.length) return 0; + return get.effect(target,{name:'sha'},player,target); + }, + }, + }, + subSkill:{block:{charlotte:true}}, + }, + spdengli:{ + trigger:{ + player:'useCardToPlayered', + target:'useCardToTargeted', + }, + frequent:true, + filter:function(event,player){ + return event.card.name=='sha'&&event.player.hp==event.target.hp; + }, + content:function(){ + player.draw(); + }, + ai:{ + effect:{ + player:function(card,player,target){ + var hp=player.hp,evt=_status.event; + if(evt.name=='chooseToUse'&&evt.player==player&&evt.skill=='spjungong'&&!ui.selected.cards.length) hp-=((player.getStat('skill').spjungong||0)+1); + if(card&&card.name=='sha'&&hp==target.hp) return [1,0.3]; + }, + target:function(card,player,target){ + if(card&&card.name=='sha'&&player.hp==target.hp) return [1,0.3]; + }, + }, + }, + }, + //孙翊 + zaoli:{ + trigger:{player:'phaseBegin'}, + audio:2, + forced:true, + filter:function(event,player){ + return player.countMark('zaoli')>0; + }, + content:function(){ + 'step 0' + event.num=player.storage.zaoli; + player.removeMark('zaoli',event.num); + if(player.countCards('he')>0){ + player.chooseToDiscard(true,'he',[1,Infinity],'躁厉:弃置至少一张牌').set('ai',function(card){ + if(card.hasGaintag('zaoli')) return 1; + return 5-get.value(card); + }); + } + 'step 1' + if(result.bool) num+=result.cards.length; + if(event.num>2) player.loseHp(); + player.draw(num); + }, + mod:{ + cardEnabled2:function(card,player){ + if(player==_status.currentPhase&&get.itemtype(card)=='card'&&card.hasGaintag('zaoli')) return false; + }, + }, + group:['zaoli_add','zaoli_count'], + init:function(player){ + if(player==_status.currentPhase){ + var hs=player.getCards('h'); + player.getHistory('gain',function(evt){ + hs.removeArray(evt.cards); + }); + if(hs.length) player.addGaintag(hs,'zaoli'); + } + }, + onremove:function(player){ + player.removeGaintag('zaoli'); + delete player.storage.zaoli; + }, + intro:{content:'mark'}, + subSkill:{ + add:{ + audio:'zaoli', + trigger:{player:['useCard','respond']}, + forced:true, + filter:function(event,player){ + return player.countMark('zaoli')<4&&player.hasHistory('lose',function(evt){ + return evt.hs&&evt.hs.length>0&&evt.getParent()==event; + }); + }, + content:function(){ + player.addMark('zaoli',1); + }, + }, + count:{ + trigger:{global:'phaseBeginStart'}, + forced:true, + firstDo:true, + silent:true, + filter:function(event,player){ + if(player==event.player) return player.countCards('h')>0; + return player.hasCard(function(card){ + return card.hasGaintag('zaoli'); + },'h'); + }, + content:function(){ + if(player==trigger.player){ + player.addGaintag(player.getCards('h'),'zaoli'); + } + else player.removeGaintag('zaoli'); + }, + }, + }, + }, + //王双 + yiyong:{ + audio:2, + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&& + event.source&&event.source.isIn()&&player!=event.source + &&event.cards.filterInD().length>0&&player.getEquip(1); + }, + check:function(event,player){ + var card={ + name:'sha', + cards:event.cards.filterInD(), + },target=event.source; + return !player.canUse(card,target,false)||get.effect(target,card,player,player)>0; + }, + content:function(){ + 'step 0' + event.cards=trigger.cards.filterInD(); + player.gain(event.cards,'gain2'); + 'step 1' + var target=trigger.source,hs=player.getCards('h'); + if(target&&target.isIn()&&hs.length>=cards.length&&cards.filter(function(i){ + return hs.contains(i); + }).length==cards.length&&player.canUse({name:'sha',cards:cards},target,false)){ + var next=player.useCard({name:'sha'},cards,target,false); + if(!target.getEquip(1)) next.baseDamage=2; + } + }, + }, + shanxie:{ + audio:2, + enable:'phaseUse', + usable:1, + //filterTarget:function(card,player,target){ + // return target!=player&&target.getEquip(1); + //}, + //selectTarget:[0,1], + content:function(){ + var card=get.cardPile2(function(card){ + return get.subtype(card)=='equip1'; + }); + if(card) player.gain(card,'gain2'); + else{ + var targets=game.filterPlayer(function(current){ + return current.getEquip(1); + }); + if(targets.length){ + var target=targets.randomGet(); + player.gain(target.getEquip(1),target,'give','bySelf'); + } + } + }, + content_old:function(){ + 'step 0' + if(!target){ + var card=get.cardPile2(function(card){ + return get.subtype(card)=='equip1'; + }); + if(card) player.gain(card,'gain2'); + event.finish(); + } + else{ + var card=target.getEquip(1); + if(card){ + event.card=card; + player.gain(card,target,'give'); + } + else event.finish(); + } + 'step 1' + if(player.getCards('h').contains(card)&&get.type(card,player)=='equip'&&player.hasUseTarget(card)) player.chooseUseTarget(card,true,'nopopup'); + 'step 2' + var hs=target.getCards('h',function(card){ + return target.canUse(get.autoViewAs({name:'sha'},[card]),player,false); + }); + if(hs.length){ + if(hs.length==1) event._result={bool:true,cards:hs}; + else target.chooseCard('h',true,'将一张牌当做【杀】对'+get.translation(player)+'使用',function(card){ + return _status.event.cards.contains(card); + }).set('cards',hs).set('ai',function(card){ + return get.effect(_status.event.getParent().player,get.autoViewAs({name:'sha',},[card]),_status.event.player) + }) + } + else event.finish(); + 'step 3' + if(result.bool) target.useCard({name:'sha'},result.cards,player,false); + }, + ai:{ + order:9, + result:{player:1}, + }, + group:'shanxie_exclude', + subSkill:{ + exclude:{ + trigger:{global:'useCard'}, + forced:true, + locked:false, + filter:function(event,player){ + if(event.card.name!='shan'||event.getParent(2).player!=player) return false; + var num=get.number(event.card); + return !num||num<=player.getAttackRange()*2; + }, + logTarget:'player', + content:function(){ + trigger.all_excluded=true; + }, + }, + }, + }, + //吴景流兵 + liubing:{ + trigger:{player:'useCard1'}, + forced:true, + filter:function(event,player){ + return event.card.name=='sha'&&event.cards.length==1&&player.getHistory('useCard',function(evt){ + return evt.card.name=='sha'&&evt.cards.length==1; + }).indexOf(event)==0; + }, + content:function(){ + game.log(player,'将',trigger.card,'的花色改为','#y♦'); + trigger.card.suit='diamond'; + }, + group:'liubing_gain', + subSkill:{ + gain:{ + trigger:{global:'useCardAfter'}, + forced:true, + audio:'liubing', + filter:function(event,player){ + return event.player!=player&&event.card.isCard&&event.card.name=='sha'&& + get.color(event.card)=='black'&&event.cards.filterInD().length>0&& + event.player.isPhaseUsing()&&!event.player.hasHistory('sourceDamage',function(evt){ + return evt.card==event.card; + }); + }, + logTarget:'player', + content:function(){ + player.gain(trigger.cards.filterInD(),'gain2'); + }, + }, + }, + }, + //新刘璋 + jutu:{ + audio:'xiusheng', + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return player.storage.yaohu&&game.hasPlayer(function(current){ + return current.group==player.storage.yaohu; + }); + }, + content:function(){ + 'step 0' + var cards=player.getExpansions('jutu'); + if(cards.length>0){ + player.gain(cards,'gain2'); + } + 'step 1' + event.num=game.countPlayer(function(current){ + return current.group==player.storage.yaohu; + }); + player.draw(event.num+1); + if(!event.num) event.finish(); + 'step 2' + var he=player.getCards('he'); + if(!he.length) event.finish(); + else if(he.length0) return 1; + return 1.3; + }); + } + list.sort(function(a,b){ + return getn(b)-getn(a); + }); + return list[0]; + }()); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('yaohu',game.filterPlayer(function(current){ + return current.group==result.control; + })); + game.log(player,'选择了','#y'+get.translation(result.control+2)) + player.storage.yaohu=result.control; + player.markSkill('yaohu'); + } + }, + ai:{combo:'jutu'}, + intro:{content:'已选择了$势力'}, + group:'yaohu_gain', + subSkill:{ + round:{}, + gain:{ + audio:'yinlang', + trigger:{global:'phaseUseBegin'}, + forced:true, + locked:false, + filter:function(event,player){ + return event.player!=player&&event.player.group==player.storage.yaohu&&event.player.isIn()&&player.getExpansions('jutu').length>0; + }, + logTarget:'player', + content:function(){ + 'step 0' + var target=trigger.player; + event.target=target; + target.chooseButton(['选择获得一张“生”',player.getExpansions('jutu')],true).set('ai',function(button){ + return get.value(button.link,player); + }); + 'step 1' + if(result.bool){ + target.gain(result.links,'give',player,'bySelf'); + } + 'step 2' + if(game.hasPlayer(function(current){ + return current!=player&¤t!=target; + })){ + player.chooseTarget(true,'选择'+get.translation(target)+'使用【杀】的目标',function(card,player,target){ + return target!=player&&target!=_status.event.source; + }).set('source',target).set('ai',function(target){ + var evt=_status.event; + return get.effect(target,{name:'sha'},evt.source,evt.player); + }); + } + else{ + event._result={bool:false}; + event.goto(4); + } + 'step 3' + var target2=result.targets[0]; + player.line(target2,'green'); + target.chooseToUse(function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },'对'+get.translation(target2)+'使用一张杀,否则交给其两张牌').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; + return lib.filter.targetEnabled.apply(this,arguments); + }).set('sourcex',target2).set('addCount',false); + 'step 4' + if(!result.bool){ + var hs=target.getCards('he'); + if(!hs.length) event.finish(); + else if(hs.length<=2) event._result={bool:true,cards:hs}; + else target.chooseCard(2,true,'交给'+get.translation(player)+'两张牌','he'); + } + else event.finish(); + 'step 5' + if(result.bool) target.give(result.cards,player); + }, + }, + }, + }, + rehuaibi:{ + audio:'huaibi', + zhuSkill:true, + mod:{ + maxHandcard:function(player,num){ + if(player.storage.yaohu&&player.hasZhuSkill('rehuaibi')) return num+game.countPlayer(function(current){ + return current.group==player.storage.yaohu; + }); + }, + }, + ai:{combo:'yaohu'}, + }, + //宗预 + zhibian:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer((current)=>(current!=player&&player.canCompare(current))); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('zhibian'),'与一名其他角色进行拼点',function(card,player,target){ + return target!=player&&player.canCompare(target); + }).set('ai',function(target){ + if(!_status.event.goon) return false; + var att=get.attitude(player,target); + if(att<0&&target.countCards('e',function(card){ + return player.canEquip(card)&&get.effect(player,card,target,player)>0; + })) return -att/Math.sqrt(target.countCards('h')); + if(!player.isDamaged()) return false; + if(att<=0) return (1-att)/Math.sqrt(target.countCards('h')); + return Math.sqrt(2/att*Math.sqrt(target.countCards('h'))); + }).set('goon',function(){ + if(!player.hasCard(function(card){ + return (card.number>=14-player.hp&&get.value(card)<=5); + })) return false; + return true; + }()); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('zhibian',target); + player.chooseToCompare(target); + } + else event.finish(); + 'step 2' + if(result.bool){ + var list=[],list2=[ + '将'+get.translation(target)+'装备区/判定区中的一张牌移动到你的区域内', + '回复1点体力', + '背水!跳过摸牌阶段,并依次执行上述所有选项', + ]; + if(target.hasCard(function(card){ + return player.canEquip(card); + },'e')||target.hasCard(function(card){ + return player.canAddJudge(card); + },'j')){ + list.push('选项一'); + } + if(player.isDamaged()){ + list.push('选项二'); + } + if(list.contains('选项一')) list.push('背水!') + list.push('cancel2'); + player.chooseControl(list).set('choiceList',list2).set('ai',function(target){ + if(player.isDamaged()&&(player.hp<=2||!target.countCards('e',function(card){ + return player.canEquip(card)&&get.value(card,target)>=4+player.getDamagedHp(); + }))) return 1; + return 0; + }); + } + else{ + player.loseHp(); + event.finish(); + } + 'step 3' + if(result.control!='cancel2'){ + event.control=result.control; + if(result.control=='选项一'||result.control=='背水!'){ + player.choosePlayerCard(target,'ej',true).set('ai',get.buttonValue); + } + else event.goto(5); + } + else event.finish(); + 'step 4' + if(result.bool){ + var card=result.cards[0]; + target.$give(card,player,false); + game.delayx(); + if(get.position(card)=='e') player.equip(card); + else player.addJudge(card); + } + 'step 5' + if(event.control=='选项二'||event.control=='背水!'){ + player.recover(); + } + if(event.control=='背水!') player.skip('phaseDraw'); + }, + }, + yuyan:{ + audio:2, + trigger:{target:'useCardToTarget'}, + forced:true, + logTarget:'player', + filter:function(event,player){ + return event.card.name=='sha'&&event.card.isCard&&typeof get.number(event.card)=='number'&&player.hp=13||!trigger.player.hasCard(function(card){ + if(_status.connectMode&&get.position(card)=='h') return true; + return get.number(card)>num; + },'he')) event._result={bool:false}; + else trigger.player.chooseCard('he',function(card){ + return get.number(card)>_status.event.number; + },'交给'+get.translation(player)+'一张点数大于'+get.cnNumber(num)+'的牌,或令'+get.translation(trigger.card)+'对其无效').set('number',num).set('',function(card){ + if(card.name=='shan'||card.name=='tao'||card.name=='jiu') return false; + return 6-get.value(card); + }); + 'step 1' + if(result.bool){ + trigger.player.give(result.cards,player); + } + else{ + trigger.targets.remove(player); + trigger.getParent().triggeredTargets2.remove(player); + trigger.untrigger(); + } + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(card.name=='sha'&&player.hp>target.hp&&get.attitude(player,target)<0){ + var num=get.number(card); + if(typeof num!='number') return false; + var bs=player.getCards('h',function(cardx){ + return (get.number(cardx)>num&&!['','',''].contains(cardx.name)); + }); + if(bs.length<2) return 0; + if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')) return; + if(bs.length<=2){ + for(var i=0;ievent.target.hp&&event.targets.length==1&&event.player.countCards('h')>0&&!event.target.isDying()&& + !event.player.hasSkillTag('noCompareTarget')&&!player.hasSkillTag('noCompareSource')); + }, + check:function(event,player){ + var target=event.target,source=event.player; + var eff1=get.effect(target,event.card,source,player); + if(eff1>=0) return false; + var eff2=get.effect(player,event.card,source,player); + if(eff2>=0) return true; + if(eff2>eff1/3) return player.hasCard(function(card){ + return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; + }); + if(eff2>eff1/2) return player.hasCard(function(card){ + return card.number>10&&get.value(card)<=5; + }); + return player.hasCard(function(card){ + return card.number>11&&get.value(card)<=5; + }); + }, + content:function(){ + 'step 0' + player.draw(); + 'step 1' + if(player.canCompare(trigger.player)) player.chooseToCompare(trigger.player); + else event.finish(); + 'step 2' + trigger.targets.remove(trigger.target); + trigger.getParent().triggeredTargets1.remove(trigger.target); + trigger.untrigger(); + if(!result.bool) trigger.targets.push(player); + }, + }, + fengjie:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return game.hasPlayer((current)=>(current!=player)); + }, + content:function(){ + 'step 0' + player.chooseTarget('请选择【奉节】的目标','选择一名其他角色并获得如下效果直到你下回合开始:一名角色的结束阶段开始时,你将手牌摸至(至多摸至四张)或弃置至与其体力值相等。',lib.filter.notMe,true).set('ai',function(target){ + return (target.hp-player.countCards('h'))/get.threaten(target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + game.log(player,'选择了',target); + player.storage.fengjie2=target; + player.addTempSkill('fengjie2',{player:'phaseBegin'}); + game.delayx(); + } + }, + }, + fengjie2:{ + audio:'fengjie', + trigger:{global:'phaseJieshuBegin'}, + forced:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + if(!player.storage.fengjie2||!player.storage.fengjie2.isIn()) return false; + var num1=player.countCards('h'),num2=player.storage.fengjie2.hp; + return num1!=num2; + }, + logTarget:(event,player)=>player.storage.fengjie2, + content:function(){ + var num1=player.countCards('h'),num2=player.storage.fengjie2.hp; + if(num1>num2) player.chooseToDiscard('h',true,num1-num2); + else player.drawTo(Math.min(num1+4,num2)); + }, + }, + //陈武董袭 + spyilie:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseControl('选项一','选项二','背水!','cancel2').set('choiceList',[ + '本阶段内使用【杀】的次数上限+1', + '本回合内使用【杀】被【闪】抵消时摸一张牌', + '背水!失去1点体力并依次执行上述所有选项', + ]).set('ai',function(){ + if(player.countCards('hs',function(card){ + return get.name(card)=='sha'&&player.hasValueTarget(card); + })>player.getCardUsable({name:'sha'})) return 0; + return 1; + }); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('spyilie'); + game.log(player,'选择了','#g【毅烈】','的','#y'+result.control); + if(result.index%2==0) player.addTempSkill('spyilie_add','phaseUseEnd'); + if(result.index>0) player.addTempSkill('spyilie_miss'); + if(result.index==2) player.loseHp(); + } + }, + subSkill:{ + add:{ + charlotte:true, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; + }, + }, + }, + miss:{ + charlotte:true, + audio:'spyilie', + trigger:{player:'shaMiss'}, + forced:true, + content:function(){ + player.draw(); + }, + }, + }, + }, + spfenming:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:(event,player)=>game.hasPlayer((current)=>lib.skill.spfenming.filterTarget(null,player,current)), + filterTarget:function(card,player,target){ + if(target.hp>player.hp) return false; + return !target.isLinked()||target.hasCard(function(card){ + return lib.filter.canBeGained(card,player,target); + },target==player?'e':'he'); + }, + content:function(){ + if(!target.isLinked()) target.link(); + else player.gainPlayerCard(target,target==player?'e':'he',true); + }, + ai:{ + order:7, + result:{ + player:function(player,target){ + if(!target.isLinked()) return get.effect(target,{name:'tiesuo'},player,player); + return get.effect(target,{name:'shunshou_copy2'},player,player); + }, + }, + }, + }, + //周处 + rechuhai:{ + audio:'chuhai', + inherit:'chuhai', + dutySkill:true, + locked:true, + group:['rechuhai_add','rechuhai_achieve','rechuhai_fail'], + derivation:'zhangming', + prompt:'与一名其他角色进行拼点', + subSkill:{ + add:{ + trigger:{player:'compare'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.getParent().name=='rechuhai'&&event.num1<13&&player.countCards('e')<4; + }, + content:function(){ + var num=4-player.countCards('e'); + game.log(player,'的拼点牌点数+',num); + trigger.num1=Math.min(13,trigger.num1+num); + } + }, + achieve:{ + audio:'rechuhai', + trigger:{player:'equipAfter'}, + forced:true, + skillAnimation:true, + animationColor:'wood', + filter:function(event,player){ + return player.countCards('e')>2; + }, + content:function(){ + player.awakenSkill('rechuhai'); + game.log(player,'成功完成使命'); + if(player.isDamaged()) player.recover(player.maxHp-player.hp); + player.removeSkill('xianghai'); + player.addSkill('zhangming'); + }, + }, + fail:{ + trigger:{player:'chooseToCompareAfter'}, + forced:true, + filter:function(event,player){ + return event.getParent().name=='rechuhai'&&event.num1<7&&!event.result.bool; + }, + content:function(){ + player.awakenSkill('rechuhai'); + game.log(player,'使命失败'); + }, + }, + }, + }, + zhangming:{ + audio:2, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return get.suit(event.card)=='club'; + }, + content:function(){ + trigger.directHit.addArray(game.filterPlayer(function(current){ + return current!=player; + })); + }, + group:'zhangming_damage', + subSkill:{ + damage:{ + audio:'zhangming', + trigger:{source:'damageEnd'}, + forced:true, + usable:1, + filter:function(event,player){ + return player!=event.player; + }, + logTarget:'player', + content:function(){ + var list=[],cards=[],target=trigger.player,hs=target.getCards('h'); + if(hs.length>0){ + var card=hs.randomGet(); + list.push(get.type2(card,target)); + player.showCards(card,get.translation(player)+'对'+get.translation(target)+'发动了【彰名】'); + } + target.discard(card); + for(var i=0;i0&& + !target.hasSkillTag('noCompareTarget'); + }, + content:function(){ + 'step 0' + player.draw(); + 'step 1' + if(player.canCompare(target)) player.chooseToCompare(target); + else event.finish(); + 'step 2' + if(result.bool){ + player.storage.chuhai2=target; + player.addTempSkill('chuhai2','phaseUseEnd'); + if(target.countCards('h')>0){ + player.viewHandcards(target); + var types=[],cards=[],hs=target.getCards('h'); + for(var i of hs){ + types.add(get.type2(i,target)); + } + for(var i of types){ + var card=get.cardPile(function(card){ + return get.type2(card,false)==i; + }); + if(card) cards.push(card); + } + if(cards.length) player.gain(cards,'gain2','log'); + } + } + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + if(player.countCards('hs',function(card){ + return get.tag(card,'damage')>0&&player.canUse(card,target,null,true)&& + get.effect(target,card,player,player)>0&&player.hasValueTarget(card,null,true); + })>0) return -3; + return -1; + }, + }, + }, + }, + chuhai2:{ + trigger:{source:'damageSource'}, + forced:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + if(event.player!=player.storage.chuhai2) return false; + for(var i=1;i<6;i++){ + if(player.isEmpty(i)) return true; + } + return false; + }, + content:function(){ + for(var i=1;i<7;i++){ + if(player.isEmpty(i)){ + var sub='equip'+i,card=get.cardPile(function(card){ + return get.subtype(card,false)==sub&&!get.cardtag(card,'gifts'); + }); + if(card){ + player.$gain2(card); + game.delayx(); + player.equip(card); + break; + } + } + } + }, + }, + //文鸯 + dbquedi:{ + audio:2, + trigger:{player:'useCardToPlayered'}, + direct:true, + usable:1, + filter:function(event,player){ + return (event.card.name=='sha'||event.card.name=='juedou')&&event.targets.length==1&& + (event.target.countGainableCards(player,'h')>0||player.hasCard(function(i){ + return _status.connectMode||get.type(i,player)=='basic'&&lib.filter.cardDiscardable(i,player,'dbquedi'); + },'h')); + }, + content:function(){ + 'step 0' + var target=trigger.target; + event.target=target; + var list=[]; + if(target.countGainableCards(player,'h')>0) list.push('选项一'); + if(player.hasCard(function(i){ + return get.type(i,player)=='basic'&&lib.filter.cardDiscardable(i,player,'dbquedi'); + },'h')) list.push('选项二'); + list.push('背水!'); + list.push('cancel2'); + player.chooseControl(list).set('choiceList',[ + '获得'+get.translation(target)+'的一张手牌', + '弃置一张基本牌并令'+get.translation(trigger.card)+'伤害+1', + '背水!减1点体力上限并执行所有选项', + ]).set('prompt',get.prompt('dbquedi',target)).set('ai',function(){ + var evt=_status.event.getTrigger(),player=evt.player,target=evt.target,card=evt.card; + if(get.attitude(player,target)>0) return 'cancel2'; + var bool1=target.countGainableCards(player,'h')>0; + var bool2=player.hasCard(function(i){ + return get.type(i,player)=='basic'&&lib.filter.cardDiscardable(i,player,'dbquedi')&&get.value(card,player)<5; + },'h')&&!target.hasSkillTag('filterDamage',null,{ + player:player, + card:card, + }); + if(bool1&&bool2&&(target.hp<=2||(player.isDamaged()&&player.maxHp>3))) return '背水!'; + if(bool1) return '选项一'; + if(bool2) return '选项二'; + return 'cancel2'; + }); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('dbquedi',target); + event.control=result.control; + if(event.control=='背水!') player.loseMaxHp(); + } + else{ + player.storage.counttrigger.dbquedi--; + event.finish(); + } + 'step 2' + if((event.control=='选项一'||event.control=='背水!')&&target.countGainableCards(player,'h')>0) player.gainPlayerCard(target,true,'h'); + 'step 3' + if((event.control=='选项二'||event.control=='背水!')&&player.hasCard(function(i){ + return get.type(i,player)=='basic'&&lib.filter.cardDiscardable(i,player,'dbquedi'); + },'h')){ + player.chooseToDiscard('h','弃置一张基本牌',{type:'basic'},true); + } + else event.finish(); + 'step 4' + if(result.bool) trigger.getParent().baseDamage++; + }, + ai:{ + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + if(!arg||!arg.card||!arg.target||(arg.card.name!='sha'&&arg.card.name!='juedou')) return false; + if(player.storage.counttrigger&&player.storage.counttrigger.dbquedi&&player.storage.counttrigger.dbquedi>0) return false; + if(arg.target.countCards('h')==1&&(arg.card.name!='sha'||!arg.target.getEquip('bagua')||player.hasSkillTag('unequip',false,{ + name:arg.card?arg.card.name:null, + target:arg.target, + card:arg.card + })||player.hasSkillTag('unequip_ai',false,{ + name:arg.card?arg.card.name:null, + target:arg.target, + card:arg.card + }))) return true; + return false; + }, + }, + }, + dbzhuifeng:{ + audio:2, + groupSkill:true, + enable:'chooseToUse', + usable:2, + viewAsFilter:function(player){ + return player.group=='wei'&&player.hp>0; + }, + viewAs:{name:'juedou',isCard:true}, + filterCard:()=>false, + selectCard:-1, + log:false, + precontent:function(){ + player.logSkill('dbzhuifeng'); + player.loseHp(); + }, + ai:{ + order:function(){ + return get.order({name:'juedou'})-0.5; + }, + }, + group:'dbzhuifeng_self', + subSkill:{ + self:{ + trigger:{player:'damageBegin2'}, + forced:true, + filter:function(event,player){ + var evt=event.getParent(); + return evt.skill=='dbzhuifeng'&&evt.player==player; + }, + content:function(){ + trigger.cancel(); + player.getStat().skill.dbzhuifeng=2; + }, + }, + }, + }, + dbchongjian:{ + audio:2, + groupSkill:true, + hiddenCard:function(player,name){ + if(player.group=='wu'&&(name=='sha'||name=='jiu')&&player.hasCard(function(card){ + return get.type(card)=='equip'; + },'hes')) return true; + return false; + }, + enable:'chooseToUse', + filter:function(event,player){ + return player.group=='wu'&&player.hasCard(function(card){ + return get.type(card)=='equip'; + },'hes')&&(event.filterCard({name:'sha'},player,event)||event.filterCard({name:'jiu'},player,event)); + }, + locked:false, + mod:{ + targetInRange:function(card){ + if(card.storage&&card.storage.dbchongjian) return true; + }, + }, + chooseButton:{ + dialog:function(){ + var list=[]; + list.push(['基本','','sha']); + for(var i of lib.inpile_nature) list.push(['基本','','sha',i]); + list.push(['基本','','jiu']); + return ui.create.dialog('冲坚',[list,'vcard']); + }, + filter:function(button,player){ + var evt=_status.event.getParent(); + return evt.filterCard({name:button.link[2],nature:button.link[3],isCard:true},player,evt); + }, + check:function(button){ + if(_status.event.getParent().type!='phase') return 1; + var player=_status.event.player; + if(button.link[2]=='jiu'&&(player.hasCard(function(card){ + return get.name(card)=='sha'; + },'hs')||player.countCards('hes',function(card){ + if(get.type(card)!='equip') return false; + if(get.position(card)=='e'){ + if(player.hasSkillTag('noe')) return (10-get.value(card))>0; + var sub=get.subtype(card); + if(player.hasCard(function(card){ + return get.subtype(card)==sub&&player.canUse(card,player)&&get.effect(player,card,player,player)>0; + },'hs')) return (10-get.value(card))>0; + } + return (5-get.value(card))>0; + })>1)) return player.getUseValue({name:'jiu'})*4; + return player.getUseValue({name:button.link[2],nature:button.link[3]},false); + }, + backup:function(links,player){ + return { + audio:'dbchongjian', + viewAs:{ + name:links[0][2], + nature:links[0][3], + //isCard:true, + storage:{dbchongjian:true}, + }, + filterCard:{type:'equip'}, + position:'hes', + popname:true, + precontent:function(){ + player.addTempSkill('dbchongjian_effect'); + }, + check:function(card){ + var player=_status.event.player; + if(get.position(card)=='e'){ + if(player.hasSkillTag('noe')) return 10-get.value(card); + var sub=get.subtype(card); + if(player.hasCard(function(card){ + return get.subtype(card)==sub&&player.canUse(card,player)&&get.effect(player,card,player,player)>0; + },'hs')) return 10-get.value(card); + } + return 5-get.value(card); + }, + } + }, + prompt:function(links){ + return '将一张装备牌当做'+(links[0][3]?get.translation(links[0][3]):'')+'【'+get.translation(links[0][2])+'】使用'; + }, + }, + ai:{ + unequip:true, + respondSha:true, + skillTagFilter:function(player,tag,arg){ + if(tag=='unequip'){ + if(player.group!='wu'||!arg||!arg.card||!arg.card.storage||!arg.card.storage.dbchongjian) return false; + return true + } + return player.group=='wu'&&arg=='use'&&player.hasCard(function(card){ + return get.type(card)=='equip'; + },'hes'); + }, + order:function(item,player){ + if(_status.event.type!='phase') return 1; + var player=_status.event.player; + if(player.hasCard(function(card){ + if(get.value(card,player)<0) return true; + var sub=get.subtype(card); + return player.hasCard(function(card){ + return get.subtype(card)==sub&&player.canUse(card,player)&&get.effect(player,card,player,player)>0; + },'hs')>0; + },'e')) return 10; + if(player.countCards('hs','sha')||player.countCards('he',function(card){ + return get.type(card)=='equip'&&get.value(card,player)<5; + })>1) return get.order({name:'jiu'})-0.1; + return get.order({name:'sha'})-0.1; + }, + result:{player:1}, + }, + subSkill:{ + effect:{ + charlotte:true, + mod:{ + targetInRange:function(card){ + if(card.storage&&card.storage.dbchongjian) return true; + }, + }, + trigger:{source:'damageSource'}, + forced:true, + logTarget:'player', + filter:function(event,player){ + return event.parent.skill=='dbchongjian_backup'&&event.card.name=='sha'&&event.getParent().name=='sha'&&event.player.countGainableCards(player,'e')>0; + }, + content:function(){ + player.gainPlayerCard(trigger.player,'e',true,trigger.num); + }, + }, + }, + }, + dbchoujue:{ + audio:2, + trigger:{source:'dieAfter'}, + forced:true, + content:function(){ + player.gainMaxHp(); + player.draw(2); + player.addSkill('counttrigger'); + if(!player.storage.counttrigger) player.storage.counttrigger={}; + if(!player.storage.counttrigger.dbquedi) player.storage.counttrigger.dbquedi=0; + player.storage.counttrigger.dbquedi--; + }, + }, + //王凌 + xingqi:{ + audio:2, + trigger:{player:'useCard'}, + forced:true, + locked:false, + filter:function(event,player){ + return get.type(event.card,false)!='delay'&&!player.getStorage('xingqi').contains(event.card.name); + }, + content:function(){ + player.markAuto('xingqi',[trigger.card.name]); + game.log(player,'获得了一个','#g【备('+get.translation(trigger.card.name)+')】'); + }, + marktext:'备', + intro:{ + content:'$', + onunmark:function(storage,player){ + delete player.storage.xingqi; + }, + }, + group:'xingqi_gain', + subSkill:{ + gain:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.getStorage('xingqi').length>0; + }, + content:function(){ + 'step 0' + player.removeSkill('mibei_mark'); + player.chooseButton(['星启:是否获得一张牌?',[player.getStorage('xingqi'),'vcard']]).set('ai',function(button){ + var card={name:button.link[2]},player=_status.event.player; + if(!get.cardPile2(function(cardx){ + return cardx.name==card.name; + })) return 0; + return get.value(card,player)*player.getUseValue(card); + }); + 'step 1' + if(result.bool){ + player.logSkill('xingqi'); + var name=result.links[0][2]; + game.log(player,'移去了一个','#g【备('+get.translation(name)+')】'); + player.unmarkAuto('xingqi',[name]); + var card=get.cardPile2(function(card){ + return card.name==name; + }); + if(card) player.gain(card,'gain2'); + } + }, + }, + }, + }, + xinzifu:{ + audio:'zifu', + trigger:{player:'phaseUseEnd'}, + forced:true, + filter:function(event,player){ + return player.getStorage('xingqi').length>0&&!player.hasHistory('useCard',function(evt){ + return evt.getParent('phaseUse')==event; + }); + }, + content:function(){ + game.log(player,'移去了所有','#g【备】'); + player.unmarkSkill('xingqi'); + player.addTempSkill('xinzifu_limit'); + player.addMark('xinzifu_limit',1,false); + }, + ai:{ + neg:true, + combo:'xingqi', + }, + subSkill:{ + limit:{ + charlotte:true, + markimage:'image/card/handcard.png', + intro:{ + content:function(storage,player){ + var num=-player.countMark('xinzifu_limit'); + return '手牌上限'+num; + } + }, + mod:{ + maxHandcard:function(player,num){ + return num-player.countMark('xinzifu_limit'); + } + }, + } + } + }, + mibei:{ + audio:2, + trigger:{player:'useCardAfter'}, + dutySkill:true, + forced:true, + skillAnimation:true, + animationColor:'water', + filter:function(event,player){ + if(!player.storage.xingqi||!player.storage.xingqi.length) return false; + var map={basic:0,trick:0,equip:0}; + for(var i of player.storage.xingqi){ + var type=get.type(i); + if(typeof map[type]=='number') map[type]++; + } + for(var i in map){ + if(map[i]<2) return false; + } + return true; + }, + content:function(){ + 'step 0' + game.log(player,'成功完成使命'); + player.awakenSkill('mibei'); + var list=['basic','equip','trick'],cards=[]; + for(var i of list){ + var card=get.cardPile2(function(card){ + return get.type(card)==i; + }); + if(card) cards.push(card); + } + if(cards.length) player.gain(cards,'gain2'); + 'step 1' + player.addSkill('xinmouli'); + }, + group:['mibei_fail','mibei_silent'], + derivation:'xinmouli', + subSkill:{ + silent:{ + trigger:{player:'phaseZhunbeiBegin'}, + silent:true, + lastDo:true, + filter:function(event,player){ + return !player.getStorage('xingqi').length; + }, + content:function(){ + player.addTempSkill('mibei_mark'); + }, + charlotte:true, + }, + mark:{}, + fail:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + return !player.getStorage('xingqi').length&&player.hasSkill('mibei_mark'); + }, + content:function(){ + game.log(player,'使命失败'); + player.awakenSkill('mibei'); + player.loseMaxHp(); + }, + }, + }, + }, + xinmouli:{ + audio:'mouli', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.getStorage('xingqi').length>0; + }, + filterTarget:lib.filter.notMe, + content:function(){ + 'step 0' + target.chooseButton(['谋立:是否获得一张牌?',[player.getStorage('xingqi'),'vcard']],true).set('ai',function(button){ + var card={name:button.link[2]},player=_status.event.player; + return get.value(card,player); + }); + 'step 1' + if(result.bool){ + var name=result.links[0][2]; + game.log(player,'移去了一个','#g【备('+get.translation(name)+')】'); + player.unmarkAuto('xingqi',[name]); + var card=get.cardPile2(function(card){ + return card.name==name; + }); + if(card) target.gain(card,'gain2'); + } + }, + ai:{ + combo:'xingqi', + order:1, + result:{ + target:function(player,target){ + if(target.hasSkillTag('nogain')) return 0; + return 1; + }, + }, + }, + }, + mouli:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterCard:true, + position:'h', + filterTarget:lib.filter.notMe, + discard:false, + lose:false, + delay:false, + check:function(card){ + return 8-get.value(card); + }, + content:function(){ + player.give(cards,target); + if(!target.storage.mouli2) target.storage.mouli2=[]; + if(!target.storage.mouli3) target.storage.mouli3=[]; + target.storage.mouli2.add(player); + target.storage.mouli3.push(player); + target.addSkill('mouli_effect'); + }, + ai:{ + threaten:1.2, + order:4, + result:{ + target:1, + }, + }, + subSkill:{ + effect:{ + trigger:{player:'useCard'}, + forced:true, + charlotte:true, + filter:function(event,player){ + if(event.card.name!='sha'&&event.card.name!='shan') return false; + for(var i of player.storage.mouli3){ + if(i.isIn()) return true; + } + return false; + }, + logTarget:function(event,player){ + return player.storage.mouli3; + }, + content:function(){ + 'step 0' + game.delayx(); + player.storage.mouli3.sortBySeat(); + if(player.storage.mouli3.length==1){ + player.storage.mouli3[0].draw(3); + player.storage.mouli3.length=0; + event.finish(); + } + else game.asyncDraw(player.storage.mouli3,3); + 'step 1' + player.storage.mouli3.length=0; + game.delayx(); + }, + group:['mouli_sha','mouli_shan','mouli_clear'], + mark:true, + intro:{ + content:'已因$获得“谋立”效果', + }, + }, + sha:{ + enable:'chooseToUse', + viewAs:{name:'sha'}, + filterCard:{color:'black'}, + position:'he', + prompt:'将一张黑色牌当做杀使用', + check:function(card){ + return 6-get.value(card); + }, + viewAsFilter:function(player){ + return player.countCards('he',{color:'black'})>0; + }, + ai:{ + respondSha:true, + skillTagFilter:function(player){ + return player.countCards('he',{color:'black'})>0; + }, + }, + }, + shan:{ + enable:'chooseToUse', + viewAs:{name:'shan'}, + filterCard:{color:'red'}, + position:'he', + prompt:'将一张红色牌当做闪使用', + check:function(card){ + return 7-get.value(card); + }, + viewAsFilter:function(player){ + return player.countCards('he',{color:'red'})>0; + }, + ai:{ + respondShan:true, + skillTagFilter:function(player){ + return player.countCards('he',{color:'red'})>0; + }, + }, + }, + clear:{ + trigger:{global:['phaseBegin','dieAfter']}, + forced:true, + silent:true, + popup:false, + lastDo:true, + forceDie:true, + filter:function(event,player){ + if(event.name=='die'&&player==event.player) return true; + return player.storage.mouli2.contains(event.player); + }, + content:function(){ + if(trigger.name=='die'&&player==trigger.player){ + player.removeSkill('mouli_effect'); + delete player.storage.mouli2; + delete player.storage.mouli3; + return; + } + player.storage.mouli2.remove(trigger.player); + while(player.storage.mouli3.contains(trigger.player)) player.storage.mouli3.remove(trigger.player); + if(!player.storage.mouli2.length) player.removeSkill('mouli_effect'); + }, + }, + }, + }, + zifu:{ + audio:2, + trigger:{global:'dieAfter'}, + forced:true, + filter:function(event,player){ + return event.player.storage.mouli2&&event.player.storage.mouli2.contains(player); + }, + content:function(){ + player.loseMaxHp(2); + }, + ai:{ + combo:'mouli', + neg:true, + }, + }, + //孔融 + xinlirang:{ + audio:'splirang', + trigger:{global:'phaseDrawBegin2'}, + logTarget:'player', + filter:function(event,player){ + return !event.numFixed&&event.player!=player&&player.countMark('xinlirang')==0; + }, + prompt2:'获得一枚“谦”并令其多摸两张牌', + check:function(event,player){ + return get.attitude(player,event.player)>0; + }, + content:function(){ + trigger.num+=2; + player.addMark('xinlirang',1); + player.addTempSkill('xinlirang_gain'); + }, + marktext:'谦', + intro:{ + name:'谦', + content:'mark', + }, + group:'xinlirang_skip', + subSkill:{ + gain:{ + audio:'splirang', + trigger:{global:'phaseDiscardEnd'}, + direct:true, + filter:function(event,player){ + return event.player.hasHistory('lose',function(evt){ + return evt.type=='discard'&&evt.cards2.filterInD('d').length>0&&evt.getParent('phaseDiscard')==event; + }); + }, + content:function(){ + 'step 0' + var cards=[]; + trigger.player.getHistory('lose',function(evt){ + if(evt.type=='discard'&&evt.getParent('phaseDiscard')==trigger) cards.addArray(evt.cards2.filterInD('d')); + }); + player.chooseButton(['礼让:是否获得其中至多两张牌?',cards],[1,2]); + 'step 1' + if(result.bool){ + player.logSkill('xinlirang_gain',trigger.player); + player.gain(result.links,'gain2'); + } + }, + }, + skip:{ + audio:'splirang', + trigger:{player:'phaseDrawBefore'}, + forced:true, + filter:function(event,player){ + return player.hasMark('xinlirang'); + }, + content:function(){ + trigger.cancel(); + player.removeMark('xinlirang',player.countMark('xinlirang')); + }, + }, + }, + }, + xinmingshi:{ + audio:'spmingshi', + trigger:{player:'damageEnd'}, + forced:true, + logTarget:'source', + filter:function(event,player){ + return event.source&&event.source.isIn()&&player.hasMark('xinlirang')&&event.source.countCards('he')>0; + }, + content:function(){ + 'step 0' + trigger.source.chooseToDiscard('he',true).set('color',get.attitude(trigger.source,player)>0?'red':'black').set('ai',function(card){ + return (get.color(card)==_status.event.color?4:0)-get.value(card); + }); + 'step 1' + if(result.bool&&result.cards&&result.cards.length){ + var card=result.cards[0]; + if(get.color(card,trigger.source)=='red') player.recover(); + else if(get.position(card,true)=='d') player.gain(card,'gain2'); + } + }, + ai:{ + combo:'xinmingshi', + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')&&target.hasMark('xinlirang')){ + var cards=[card]; + if(card.cards&&card.cards.length) cards.addArray(card.cards); + if(ui.selected.cards.length) cards.addArray(ui.selected.cards); + if(!player.countCards('he',function(card){ + return !cards.contains(card); + })) return; + if(!player.countCards('h',function(card){ + return !cards.contains(card)&&get.color(card)=='black'&&get.value(card,player)<6; + })) return 'zerotarget'; + return 0.5; + } + }, + }, + }, + }, + spmingshi:{ + audio:2, + trigger:{player:'damageEnd'}, + forced:true, + logTarget:'source', + filter:function(event,player){ + return event.source&&player!=event.source&&event.source.countCards('he')>0; + }, + content:function(){ + 'step 0' + event.count=trigger.num; + 'step 1' + event.count--; + trigger.source.chooseToDiscard('he',true); + 'step 2' + if(event.count>0&&result.bool&&lib.skill.spmingshi.filter(trigger,player)) event.goto(1); + }, + ai:{ + threaten:0.8, + maixie:true, + maixie_defend:true, + }, + }, + splirang:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + var hs=player.getCards('h'); + if(!hs.length) return false; + for(var i of hs){ + if(!lib.filter.cardDiscardable(i,player,'splirang')) return false; + } + return true; + }, + filterCard:true, + selectCard:-1, + content:function(){ + 'step 0' + cards=cards.filterInD('d'); + if(!cards.length||player.hp<1) event.goto(3); + else player.chooseButton(['将任意张牌交给一名其他角色',cards],[1,Math.min(cards.length,player.hp)]).set('ai',function(button){ + return get.value(button.link); + }); + 'step 1' + if(result.bool){ + event.cards=result.links; + player.chooseTarget(true,'令一名角色获得'+get.translation(event.cards),lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target); + if(target.hasSkillTag('nogain')) att/=10; + if(target.hasJudge('lebu')) att/=5; + return att; + }); + } + else event.goto(3); + 'step 2' + if(result.targets&&result.targets.length){ + var target=result.targets[0]; + player.line(target,'green'); + target.gain(cards,'gain2'); + } + 'step 3' + player.draw(); + }, + ai:{ + order:0.1, + result:{ + player:function(player){ + var hs=player.getCards('h'); + if(hs.length<=player.hp&&game.hasPlayer(function(current){ + return current!=player&&get.attitude(player,current)>0&&!current.hasJudge('lebu')&&!current.hasSkillTag('nogain'); + })) return 1; + if(get.value(hs,player)<6) return 1; + return 0; + }, + }, + }, + }, + //糜夫人 + xinguixiu:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + return player.hp%2==1||player.isDamaged(); + }, + content:function(){ + if(player.hp%2==1) player.draw(); + else player.recover(); + }, + }, + qingyu:{ + audio:3, + dutySkill:true, + trigger:{player:'damageBegin2'}, + forced:true, + filter:function(event,player){ + return player.countCards('he',function(card){ + return lib.filter.cardDiscardable(card,player,'qingyu'); + })>1; + }, + content:function(){ + trigger.cancel(); + player.chooseToDiscard(2,'he',true); + }, + group:['qingyu_achieve','qingyu_fail'], + subSkill:{ + achieve:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + skillAnimation:true, + animationColor:'fire', + filter:function(event,player){ + return player.isHealthy()&&player.countCards('h')==0; + }, + content:function(){ + game.log(player,'成功完成使命'); + player.awakenSkill('qingyu'); + player.addSkillLog('xuancun'); + }, + }, + fail:{ + trigger:{player:'dying'}, + forced:true, + content:function(){ + game.log(player,'使命失败'); + player.awakenSkill('qingyu'); + player.loseMaxHp(); + }, + }, + }, + derivation:'xuancun', + }, + xuancun:{ + audio:2, + trigger:{global:'phaseEnd'}, + filter:function(event,player){ + return player!=event.player&&player.countCards('h')0; + }, + prompt2:function(event,player){ + return '令其摸'+get.cnNumber(Math.min(2,player.hp-player.countCards('h')))+'张牌'; + }, + content:function(){ + trigger.player.draw(Math.min(2,player.hp-player.countCards('h'))); + }, + }, + //羊祜 + mingfa:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return player.storage.mingfa&&player.countCards('h')>0&&player.getCards('he').contains(player.storage.mingfa) + &&!player.hasSkillTag('noCompareSource')&&game.hasPlayer(function(current){ + return current!=player&&player.canCompare(current); + }); + }, + content:function(){ + 'step 0' + event.card=player.storage.mingfa; + delete player.storage.mingfa; + player.chooseTarget(get.prompt('mingfa'),'用'+get.translation(event.card)+'和一名其他角色拼点',function(card,player,target){ + return player.canCompare(target); + }).set('ai',function(target){ + var player=_status.event.player,card=_status.event.getParent().card; + if(card.number>9||!target.countCards('h',function(cardx){ + return cardx.number>=card.number+2; + })) return -get.attitude(player,target)/Math.sqrt(target.countCards('h')); + return 0; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('mingfa',target); + var next=player.chooseToCompare(target); + if(!next.fixedResult) next.fixedResult={}; + next.fixedResult[player.playerid]=event.card; + } + else{ + player.removeGaintag('mingfa'); + event.finish(); + } + 'step 2' + if(result.bool){ + player.gainPlayerCard(target,true,'he'); + if(event.card.number==1) event.finish(); + } + else{ + player.addTempSkill('mingfa_block'); + event.finish(); + } + 'step 3' + var card=get.cardPile2(function(card){ + return card.number==event.card.number-1; + }); + if(card) player.gain(card,'gain2'); + }, + group:['mingfa_choose','mingfa_add','mingfa_mark'], + subSkill:{ + block:{ + mod:{ + playerEnabled:function(card,player,target){ + if(player!=target) return false; + }, + }, + }, + choose:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.countCards('he')>0; + }, + content:function(){ + 'step 0' + player.chooseCard('he',get.prompt('mingfa'),'选择展示自己的一张牌').set('ai',function(card){ + return Math.min(13,get.number(card)+2)/Math.pow(Math.min(2,get.value(card)),0.25); + }); + 'step 1' + if(result.bool){ + var card=result.cards[0]; + player.logSkill('mingfa'); + player.removeGaintag('mingfa'); + player.addGaintag(card,'mingfa'); + player.storage.mingfa=card; + player.showCards(card,get.translation(player)+'发动了【明伐】'); + } + }, + }, + add:{ + trigger:{player:'compare',target:'compare'}, + filter:function(event,player){ + if(event.player==player) return !event.iwhile; + return true; + }, + forced:true, + locked:false, + content:function(){ + if(player==trigger.player){ + trigger.num1+=2; + if(trigger.num1>13) trigger.num1=13; + } + else{ + trigger.num2+=2; + if(trigger.num2>13) trigger.num2=13; + } + game.log(player,'的拼点牌点数+2') + }, + }, + mark:{ + trigger:{player:'gainEnd'}, + silent:true, + firstDo:true, + filter:function(event,player){ + return player.storage.mingfa&&event.cards.contains(player.storage.mingfa)&&player.getCards('h').contains(player.storage.mingfa); + }, + content:function(){ + player.addGaintag(player.storage.mingfa,'mingfa'); + }, + }, + }, + }, + rongbei:{ + audio:2, + enable:'phaseUse', + limited:true, + skillAnimation:true, + animationColor:'thunder', + filter:function(event,player){ + return game.hasPlayer((current)=>lib.skill.rongbei.filterTarget(null,player,current)); + }, + filterTarget:function(card,player,target){ + for(var i=1;i<6;i++){ + if(target.isEmpty(i)) return true; + } + return false; + }, + content:function(){ + 'step 0' + event.num=0; + player.awakenSkill('rongbei'); + 'step 1' + while(!target.isEmpty(event.num)){ + event.num++; + if(event.num>5){ + event.finish(); + return; + } + } + var card=get.cardPile2(function(card){ + return get.subtype(card)=='equip'+event.num&&target.canUse(card,target); + }); + if(card){ + target.chooseUseTarget(card,true,'nopopup'); + } + event.num++; + if(event.num<=5) event.redo(); + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + return (target.hasSkillTag('noe')?2:1)*(5-target.countCards('e')-target.countDisabled()); + }, + }, + }, + }, + //桥公 + yizhu:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + locked:false, + content:function(){ + 'step 0' + player.draw(2); + 'step 1' + var hs=player.getCards('he'); + if(!hs.length) event.finish(); + else if(hs.length<=2) event._result={bool:true,cards:hs}; + else player.chooseCard('he',true,2,'选择两张牌洗入牌堆'); + 'step 2' + if(result.bool){ + player.$throw(result.cards.length,1000); + player.lose(result.cards,ui.cardPile).insert_index=function(){ + return ui.cardPile.childNodes[get.rand(0,game.players.length*2-2)]; + } + player.markAuto('yizhu',result.cards); + } + else event.finish(); + 'step 3' + game.updateRoundNumber(); + game.delayx(); + }, + intro:{ + mark:function(dialog,content,player){ + if(player==game.me||player.isUnderControl()) dialog.addAuto(content); + else{ + var names=[]; + for(var i of content) names.add(i.name); + return get.translation(names); + } + }, + }, + group:['yizhu_use','yizhu_discard'], + subSkill:{ + use:{ + audio:'yizhu', + trigger:{global:'useCardToPlayer'}, + filter:function(event,player){ + return player.storage.yizhu&&player.storage.yizhu.length&& + event.player!=player&&event.targets.length==1&& + event.cards.filter(function(i){ + return player.storage.yizhu.contains(i); + }).length>0; + }, + logTarget:'player', + check:function(event,player){ + return get.effect(event.targets[0],event.card,event.player,player)<0; + }, + prompt2:function(event,player){ + return '令'+get.translation(event.card)+'无效并可重新使用'; + }, + content:function(){ + trigger.cancel(); + trigger.targets.length=0; + trigger.getParent().triggeredTargets1.length=0; + var list=trigger.cards.filter(function(i){ + return player.storage.yizhu.contains(i); + }); + player.unmarkAuto('yizhu',list); + game.delayx(); + player.chooseUseTarget(trigger.card,trigger.cards,false,'nothrow'); + }, + }, + discard:{ + trigger:{ + global:['loseAfter','cardsDiscardAfter','loseAsyncAfter','equipAfter'], + }, + forced:true, + locked:false, + filter:function(event,player){ + return player.storage.yizhu&&player.storage.yizhu.length&&event.getd().filter(function(i){ + return player.storage.yizhu.contains(i); + }).length>0; + }, + content:function(){ + var list=trigger.getd().filter(function(i){ + return player.storage.yizhu.contains(i); + }); + player.unmarkAuto('yizhu',list); + player.draw(); + }, + }, + }, + }, + luanchou:{ + audio:2, + enable:'phaseUse', + usable:1, + selectTarget:2, + filterTarget:true, + multitarget:true, + multiline:true, + content:function(){ + game.countPlayer(function(current){ + var num=current.countMark('luanchou'); + if(num) current.removeMark('luanchou',num); + }); + targets.sortBySeat(); + for(var i of targets) i.addMark('luanchou',1); + }, + global:['gonghuan','gonghuan_clear'], + derivation:'gonghuan', + marktext:'姻', + intro:{ + name:'共患', + content:'锁定技。每回合限一次,一名其他角色受到伤害时,若其拥有“姻”标记且其体力值小于你,则你将伤害转移给自己。此伤害结算结束后,若你与其体力值相等,则你与其移去“姻”标记。', + onunmark:true, + }, + ai:{ + order:10, + expose:0.2, + result:{ + target:function(player,target){ + if(!ui.selected.targets.length) return -Math.pow(target.hp,3); + if(target.hp>=ui.selected.targets[0].hp) return 0; + return Math.pow(ui.selected.targets[0].hp-target.hp,3); + }, + }, + }, + }, + gonghuan:{ + audio:2, + forceaudio:true, + trigger:{global:'damageBegin4'}, + usable:1, + forced:true, + logTarget:'player', + filter:function(event,player){ + return event.player.hptarget.hp&&(!current.storage.counttrigger||!current.storage.counttrigger.gonghuan); + }); + if(!other){ + delete _status.luanchou_judging; + return; + }; + var eff=[0,0,0,get.damageEffect(other,player,target,get.nature(card))]; + delete _status.luanchou_judging; + return eff; + } + }, + }, + }, + subSkill:{ + clear:{ + trigger:{player:'damageEnd'}, + forced:true, + popup:false, + filter:function(event,player){ + return event._gonghuan_player; + }, + content:function(){ + player.removeMark('luanchou',player.countMark('luanchou')); + trigger._gonghuan_player.removeMark('luanchou',trigger._gonghuan_player.countMark('luanchou')); + }, + }, + }, + }, + //刘璋 + xiusheng:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return player.storage.yinlang&&game.hasPlayer(function(current){ + return current.group==player.storage.yinlang; + }); + }, + content:function(){ + 'step 0' + if(player.storage.xiusheng&&player.storage.xiusheng.length>0) player.unmarkSkill('xiusheng'); + 'step 1' + event.num=game.countPlayer(function(current){ + return current.group==player.storage.yinlang; + }); + if(event.num>0) player.draw(event.num); + else event.finish(); + 'step 2' + var he=player.getCards('he'); + if(!he.length) event.finish(); + else if(he.length0) return 1.5; + if(!current.inRange(player)) return 1; + return 0.6; + }); + } + list.sort(function(a,b){ + return getn(b)-getn(a); + }); + return list[0]; + }()); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('yinlang',game.filterPlayer(function(current){ + return current.group==result.control; + })); + game.log(player,'选择了','#y'+get.translation(result.control+2)) + player.storage.yinlang=result.control; + player.markSkill('yinlang'); + } + }, + ai:{combo:'xiusheng'}, + intro:{content:'已选择了$势力'}, + group:'yinlang_gain', + subSkill:{ + round:{}, + gain:{ + audio:'yinlang', + trigger:{global:'phaseUseBegin'}, + forced:true, + locked:false, + filter:function(event,player){ + return event.player.group==player.storage.yinlang&&event.player.isIn()&&player.getStorage('xiusheng').length>0; + }, + logTarget:'player', + content:function(){ + 'step 0' + var str=get.translation(player); + event.target=trigger.player; + event.target.chooseControl().set('choiceList',[ + '获得'+str+'的一张“生”,然后本阶段使用牌时只能指定其为目标', + '令'+str+'获得一张“生”', + ]).set('ai',function(){ + var evt=_status.event.getParent(),player=evt.target,target=evt.player; + if(get.attitude(player,target)>0) return 1; + if(!player.countCards('hs',function(card){ + return player.hasValueTarget(card,null,true)&&(!player.canUse(card,target,null,true)||get.effect(target,card,player,player)<0) + })) return 0; + return 1; + }); + 'step 1' + event.gainner=(result.index==0)?target:player; + if(result.index==0) event.block=true; + event.gainner.chooseButton(['选择获得一张“生”',player.storage.xiusheng],true); + 'step 2' + player.unmarkAuto('xiusheng',result.links); + event.gainner.gain(result.links,'gain2'); + if(event.block){ + target.markAuto('yinlang_block',[player]); + target.addTempSkill('yinlang_block','phaseUseAfter'); + } + }, + }, + block:{ + mod:{ + playerEnabled:function(card,player,target){ + var info=get.info(card); + if(info&&info.singleCard&&ui.selected.cards.length) return; + if(!player.getStorage('yinlang_block').contains(target)) return false; + }, + }, + onremove:true, + }, + }, + }, + huaibi:{ + audio:2, + zhuSkill:true, + mod:{ + maxHandcard:function(player,num){ + if(player.storage.yinlang&&player.hasZhuSkill('huaibi')) return num+game.countPlayer(function(current){ + return current.group==player.storage.yinlang; + }); + }, + }, + ai:{combo:'yinlang'}, + }, + //张温 + gebo:{ + audio:2, + trigger:{global:'recoverAfter'}, + forced:true, + content:function(){ + game.cardsGotoSpecial(get.cards(),'toRenku'); + }, + }, + spsongshu:{ + audio:2, + trigger:{global:'phaseDrawBegin1'}, + logTarget:'player', + filter:function(event,player){ + return event.player.hp>player.hp&&player.hp>0&&!event.numFixed&&_status.renku.length>0; + }, + check:function(event,player){ + var num=Math.min(5,player.hp,_status.renku.length); + if(num<=event.num) return get.attitude(player,event.player)<0; + return false; + }, + content:function(){ + 'step 0' + trigger.changeToZero(); + var num=Math.min(5,player.hp,_status.renku.length); + trigger.player.chooseButton(['选择获得'+get.cnNumber(num)+'张牌',_status.renku],true,num); + 'step 1' + if(result.bool){ + var cards=result.links; + _status.renku.removeArray(cards); + game.updateRenku(); + trigger.player.gain(cards,'gain2','fromRenku'); + trigger.player.addTempSkill('spsongshu_block'); + } + }, + init:function(player){ + player.storage.renku=true; + }, + subSkill:{ + block:{ + mod:{ + playerEnabled:function(card,player,target){ + if(player!=target) return false; + }, + }, + mark:true, + intro:{content:'不能对其他角色使用牌'}, + }, + }, + }, + //张机 + jishi:{ + audio:2, + trigger:{player:'useCardAfter'}, + forced:true, + filter:function(event,player){ + return event.cards.filterInD().length>0&&!player.getHistory('sourceDamage',function(evt){ + return evt.card==event.card; + }).length; + }, + content:function(){ + var cards=trigger.cards.filterInD(); + game.log(player,'将',cards,'置于了仁库'); + game.cardsGotoSpecial(cards,'toRenku'); + }, + init:function(player){ + player.storage.renku=true; + }, + group:'jishi_draw', + subSkill:{ + draw:{ + trigger:{ + global:['gainAfter','cardsDiscardAfter'], + }, + forced:true, + filter:function(event,player){ + return event.fromRenku==true&&!event.outRange; + }, + content:function(){ + player.draw(); + }, + }, + }, + }, + xinliaoyi:{ + audio:'liaoyi', + trigger:{global:'phaseBegin'}, + filter:function(event,player){ + if(player==event.player) return false; + if(_status.renku.length) return true; + return event.player.countCards('h')>event.player.hp; + }, + direct:true, + content:function(){ + 'step 0' + var target=trigger.player; + event.target=target; + var num=Math.max(0,target.countCards('h')-target.hp); + var choiceList=['令其从仁库中获得一张牌','令其将'+get.cnNumber(num)+'张手牌置入仁库']; + var choices=[]; + if(_status.renku.length) choices.push('选项一'); + else choiceList[0]=''+choiceList[0]+''; + if(target.countCards('h')>target.hp){ + event.num=num; + choices.push('选项二'); + } + else choiceList[1]=''+choiceList[1]+''; + if(!choices.length) event.finish(); + else player.chooseControl(choices,'cancel2').set('prompt',get.prompt('xinliaoyi',target)).set('choiceList',choiceList).set('ai',function(){ + var player=_status.event.player,target=_status.event.getTrigger().player; + var att=get.attitude(player,target); + if(att>0){ + if(_status.renku.length>0) return '选项一'; + return 0; + } + if(target.countCards('h')>target.hp) return '选项二'; + return 'cancel2'; + }); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('xinliaoyi',target); + if(result.control=='选项一'){ + target.chooseButton(true,['选择获得一张牌',_status.renku]).set('ai',function(button){ + return get.value(button.link,_status.event.player); + }); + event.goto(4); + } + else{ + var hs=target.getCards('h'); + if(hs.length<=num) event._result={bool:true,cards:hs}; + else target.chooseCard('h',true,'将'+get.cnNumber(num)+'张手牌置于仁库中',num); + } + } + else event.finish(); + 'step 2' + if(result.bool){ + target.$throw(result.cards,1000); + game.log(target,'将',result.cards,'置入了仁库'); + target.lose(result.cards,ui.special,'toRenku'); + } + else event.finish(); + 'step 3' + game.delayx(); + event.finish(); + 'step 4' + var cards=result.links; + _status.renku.removeArray(cards); + game.updateRenku(); + target.gain(cards,'gain2','fromRenku'); + }, + init:function(player){ + player.storage.renku=true; + }, + ai:{threaten:3.4}, + }, + liaoyi:{ + audio:2, + trigger:{global:'phaseBegin'}, + filter:function(event,player){ + if(player==event.player) return false; + var num=event.player.hp-event.player.countCards('h'); + if(num<0) return true; + return num>0&&_status.renku.length>=Math.min(4,num); + }, + logTarget:'player', + prompt2:function(event,player){ + var target=event.player,num=target.hp-target.countCards('h'); + if(num<0) return '令'+get.translation(target)+'将'+get.cnNumber(Math.min(4,-num))+'张牌置入仁库'; + return '令'+get.translation(target)+'从仁库中获得'+get.cnNumber(Math.min(4,num))+'张牌'; + }, + check:function(event,player){ + var target=event.player,num=target.hp-target.countCards('h'),att=get.attitude(player,target); + if(num<0){ + if(target.countCards('e',function(card){ + return get.value(card,target)<=0; + })>=(-num/2)) return att>0; + return att<=0; + } + return att>0; + }, + content:function(){ + 'step 0' + var target=trigger.player,num=target.hp-target.countCards('h'); + event.target=target; + if(num<0){ + num=Math.min(4,-num); + target.chooseCard('he',true,'将'+get.cnNumber(num)+'张牌置于仁库中',num); + } + else{ + num=Math.min(4,num); + target.chooseButton(['选择获得'+get.cnNumber(num)+'张牌',_status.renku],num,true).set('ai',function(button){ + return get.value(button.link,_status.event.player); + }); + event.goto(3); + } + 'step 1' + if(result.bool){ + target.$throw(result.cards,1000); + game.log(target,'将',result.cards,'置入了仁库'); + target.lose(result.cards,ui.special,'toRenku'); + } + else event.finish(); + 'step 2' + game.delayx(); + event.finish(); + 'step 3' + var cards=result.links; + _status.renku.removeArray(cards); + game.updateRenku(); + target.gain(cards,'gain2','fromRenku'); + }, + }, + binglun:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return _status.renku.length>0; + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('病论',_status.renku); + }, + backup:function(links,player){ + var obj=lib.skill.binglun_backup; + obj.card=links[0]; + return obj; + }, + prompt:()=>'请选择【病论】的目标', + }, + subSkill:{ + backup:{ + audio:'binglun', + filterCard:()=>false, + selectCard:-1, + filterTarget:true, + delay:false, + content:function(){ + 'step 0' + var card=lib.skill.binglun_backup.card; + game.log(card,'从仁库进入了弃牌堆'); + player.$throw(card,1000); + game.delayx(); + game.cardsDiscard(card).fromRenku=true; + _status.renku.remove(card); + game.updateRenku(); + 'step 1' + target.chooseControl().set('choiceList',[ + '摸一张牌', + '于自己的下回合结束后回复1点体力', + ]).set('ai',function(){ + if(_status.event.player.isHealthy()) return 0; + return 1; + }); + 'step 2' + if(result.index==0) target.draw(); + else{ + target.addSkill('binglun_recover'); + target.addMark('binglun_recover',1,false); + } + }, + ai:{ + result:{ + target:function(player,target){ + if(target.isDamaged()) return 1.5; + return 1; + }, + }, + }, + }, + recover:{ + trigger:{player:'phaseEnd'}, + forced:true, + popup:false, + onremove:true, + charlotte:true, + content:function(){ + if(player.isDamaged()){ + player.logSkill('binglun_recover'); + player.recover(player.countMark('binglun_recover')); + } + player.removeSkill('binglun_recover'); + }, + intro:{ + content:'下回合结束时回复#点体力', + }, + ai:{threaten:1.7}, + }, + }, + ai:{ + order:2, + result:{ + player:1, + }, + }, + }, + mjweipo:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return !current.hasSkill('mjweipo_effect'); + }); + }, + filterTarget:function(card,player,target){ + return !target.hasSkill('mjweipo_effect'); + }, + content:function(){ + 'step 0' + var list=['binglinchengxiax']; + list.addArray(get.zhinangs()); + player.chooseButton(['危迫:选择一个智囊',[list,'vcard']],true).set('ai',function(button){ + return _status.event.getParent().target.getUseValue({name:button.link[2]}); + }); + 'step 1' + if(result.bool){ + var name=result.links[0][2]; + game.log(player,'选择了','#y'+get.translation(name)); + target.storage.mjweipo_effect=name; + target.storage.mjweipo_source=player; + target.addSkill('mjweipo_effect'); + game.delayx(); + } + }, + ai:{ + order:7.1, + result:{ + target:function(player,target){ + if(target==player) return player.countCards('hs','sha')>0?10:0.01; + return (target.countCards('hs','sha')+0.5)*Math.sqrt(Math.max(1,target.hp)); + }, + }, + }, + }, + mjweipo_effect:{ + audio:'mjweipo', + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h','sha')>0; + }, + prompt:function(){ + return '弃置一张【杀】并获得一张'+get.translation(_status.event.player.storage.mjweipo_effect); + }, + filterCard:{name:'sha'}, + check:function(card){ + return 6-get.value(card); + }, + position:'h', + popname:true, + content:function(){ + var name=player.storage.mjweipo_effect,card=false; + if(name=='binglinchengxiax'){ + if(!_status.binglinchengxiax){ + _status.binglinchengxiax=[ + ['spade',7], + ['club',7], + ['club',13], + ]; + game.broadcastAll(function(){lib.inpile.add('binglinchengxiax')}); + } + if(_status.binglinchengxiax.length){ + var info=_status.binglinchengxiax.randomRemove(); + card=game.createCard2('binglinchengxiax',info[0],info[1]); + } + } + if(!card) card=get.cardPile2(name); + if(card) player.gain(card,'gain2'); + player.removeSkill('mjweipo_effect'); + }, + ai:{ + order:7, + result:{player:1}, + }, + mark:true, + marktext:'迫', + intro:{content:'可弃置一张【杀】并获得【$】'}, + group:'mjweipo_remove', + }, + mjweipo_remove:{ + trigger:{global:['phaseBegin','die']}, + forced:true, + firstDo:true, + popup:false, + filter:function(event,player){ + return event.player==player.storage.mjweipo_source; + }, + content:function(){ + player.removeSkill('mjweipo_effect'); + }, + }, + mjchenshi:{ + audio:2, + global:['mjchenshi_player','mjchenshi_target'], + ai:{combo:'mjweipo'}, + }, + mjchenshi_player:{ + trigger:{player:'useCardToPlayered'}, + direct:true, + filter:function(event,player){ + if(!event.card||event.card.name!='binglinchengxiax'||!event.isFirstTarget) return false; + return player.countCards('he')>0&&game.hasPlayer(function(current){ + return current!=player&¤t.hasSkill('mjchenshi'); + }); + }, + content:function(){ + 'step 0' + var list=game.filterPlayer(function(current){ + return current!=player&¤t.hasSkill('mjchenshi'); + }); + player.chooseCardTarget({ + prompt:'是否交给'+get.translation(list)+'一张牌,将牌堆顶三张牌中不为【杀】的牌置于弃牌堆?', + filterCard:true, + position:'he', + filterTarget:function(card,player,target){ + return _status.event.list.contains(target); + }, + list:list, + selectTarget:list.length>1?1:-1, + goon:function(){ + for(var i of list){ + if(get.attitude(player,i)>0) return 1; + return -1; + } + }(), + ai1:function(card){ + if(_status.event.goon>0) return 7-get.value(card); + return 0.01-get.value(card); + }, + ai2:function(target){ + var card=ui.selected.cards[0]; + return get.value(card,target)*get.attitude(_status.event.player,target); + }, + }); + 'step 1' + if(result.bool&&result.cards.length&&result.targets.length){ + var target=result.targets[0]; + target.logSkill('mjchenshi'); + player.line(target,'green'); + player.give(result.cards,target); + trigger.getParent().mjchenshi_ai=true; + } + else event.finish(); + 'step 2' + var cards=get.cards(3); + for(var i=cards.length-1;i>=0;i--){ + if(cards[i].name=='sha'){ + cards[i].fix(); + ui.cardPile.insertBefore(cards[i],ui.cardPile.firstChild); + cards.splice(i,1); + } + } + if(cards.length){ + player.$throw(cards,1000); + game.delayx(); + game.cardsDiscard(cards); + game.log(cards,'进入了弃牌堆'); + } + }, + }, + mjchenshi_target:{ + trigger:{target:'useCardToTargeted'}, + direct:true, + filter:function(event,player){ + if(!event.card||event.card.name!='binglinchengxiax') return false; + return player.countCards('he')>0&&game.hasPlayer(function(current){ + return current!=player&¤t.hasSkill('mjchenshi'); + }); + }, + content:function(){ + 'step 0' + var list=game.filterPlayer(function(current){ + return current!=player&¤t.hasSkill('mjchenshi'); + }); + player.chooseCardTarget({ + prompt:'是否交给'+get.translation(list)+'一张牌,将牌堆顶三张牌中的【杀】置于弃牌堆?', + filterCard:true, + position:'he', + filterTarget:function(card,player,target){ + return _status.event.list.contains(target); + }, + list:list, + selectTarget:list.length>1?1:-1, + goon:function(){ + if(trigger.getParent().chenshi_ai) return 1; + for(var i of list){ + if(get.attitude(player,i)>0) return 1; + return -1; + } + }(), + ai1:function(card){ + if(_status.event.goon>0) return 7-get.value(card); + return 3-get.value(card); + }, + ai2:function(target){ + var card=ui.selected.cards[0]; + return Math.max(0.1,get.value(card,target)*get.attitude(_status.event.player,target)); + }, + }); + 'step 1' + if(result.bool&&result.cards.length&&result.targets.length){ + var target=result.targets[0]; + target.logSkill('mjchenshi'); + player.line(target,'green'); + player.give(result.cards,target); + } + else event.finish(); + 'step 2' + var cards=get.cards(3); + for(var i=cards.length-1;i>=0;i--){ + if(cards[i].name!='sha'){ + cards[i].fix(); + ui.cardPile.insertBefore(cards[i],ui.cardPile.firstChild); + cards.splice(i,1); + } + } + if(cards.length){ + player.$throw(cards,1000); + game.delayx(); + game.cardsDiscard(cards); + game.log(cards,'进入了弃牌堆'); + } + }, + }, + mjmouzhi:{ + audio:2, + trigger:{player:'damageBegin2'}, + forced:true, + filter:function(event,player){ + if(!event.card||get.suit(event.card)=='none') return false; + var all=player.getAllHistory('damage'); + if(!all.length) return false; + return all[all.length-1].card&&get.suit(all[all.length-1].card)==get.suit(event.card); + }, + content:function(){ + trigger.cancel(); + }, + group:'mjmouzhi_mark', + intro:{content:'上次受到伤害的花色:$'}, + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + var color=get.suit(card); + if(color=='none') return; + var all=target.getAllHistory('damage'); + if(!all.length||!all[all.length-1].card) return; + if(get.suit(all[all.length-1].card)==color) return 'zerotarget'; + } + }, + }, + }, + subSkill:{ + mark:{ + trigger:{player:'damage'}, + silent:true, + firstDo:true, + content:function(){ + if(!trigger.card||get.suit(trigger.card)=='none') player.unmarkSkill('mjmouzhi'); + else{ + player.markSkill('mjmouzhi'); + game.broadcastAll(function(player,suit){ + if(player.marks.mjmouzhi) player.marks.mjmouzhi.firstChild.innerHTML=get.translation(suit); + player.storage.mjmouzhi=suit; + },player,get.suit(trigger.card)) + } + }, + }, + }, + }, + mjshengxi:{ + audio:'shengxi', + audioname:['feiyi'], + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return player.getHistory('useCard').length>0&&player.getHistory('sourceDamage').length==0; + }, + content:function(){ + 'step 0' + var list=get.zhinangs(); + player.chooseButton(['是否发动【生息】获得一张智囊?',[list,'vcard']]).set('ai',function(card){ + return (Math.random()+0.5)*get.value({name:card.link[2]},_status.event.player) + }); + 'step 1' + if(result.bool){ + player.logSkill('mjshengxi'); + var card=get.cardPile2(function(card){ + return card.name==result.links[0][2]; + }); + if(card) player.gain(card,'gain2'); + } + }, + group:'mjshengxi_zhunbei', + subfrequent:['zhunbei'], + subSkill:{ + zhunbei:{ + trigger:{player:'phaseZhunbeiBegin'}, + frequent:true, + prompt2:'从游戏外或牌堆中获得一张【调剂盐梅】', + content:function(){ + if(!_status.tiaojiyanmei_suits||_status.tiaojiyanmei_suits.length>0){ + if(!lib.inpile.contains('tiaojiyanmei')) lib.inpile.add('tiaojiyanmei'); + if(!_status.tiaojiyanmei_suits) _status.tiaojiyanmei_suits=lib.suit.slice(0); + player.gain(game.createCard2('tiaojiyanmei',_status.tiaojiyanmei_suits.randomRemove(),6),'gain2'); + } + else{ + var card=get.cardPile2(function(card){ + return card.name=='tiaojiyanmei'; + }); + if(card) player.gain(card,'gain2'); + } + }, + } + }, + }, + mjkuanji:{ + audio:'fyjianyu', + usable:1, + trigger:{ + player:'loseAfter', + global:'loseAsyncAfter', + }, + direct:true, + filter:function(event,player){ + if(event.type!='discard') return false; + var evt=event.getl(player); + return evt.cards2.filterInD('d').length>0; + }, + content:function(){ + 'step 0' + var cards=trigger.getl(player).cards2; + player.chooseButton(['宽济:是否将一张牌交给一名其他角色?',cards.filterInD('d')]).set('ai',function(button){ + var player=_status.event.player; + if(game.hasPlayer(function(current){ + return current!=player&&get.attitude(player,current)>0; + })) return Math.abs(get.value(button.link,'raw'))+1; + return -get.value(button.link,'raw'); + }); + 'step 1' + if(result.bool){ + event.card=result.links[0]; + player.chooseTarget('将'+get.translation(card)+'交给一名其他角色并摸一张牌',lib.filter.notMe,true).set('ai',function(target){ + var evt=_status.event.getParent(); + return get.attitude(evt.player,target)*get.value(evt.card,target)*(target.hasSkillTag('nogain')?0.1:1); + }); + } + else{ + player.storage.counttrigger.mjkuanji--; + event.finish(); + } + 'step 2' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('mjkuanji',target); + target.gain(card,'gain2'); + player.draw(); + } + }, + }, + mjdingyi:{ + audio:2, + trigger:{ + global:'phaseBefore', + player:'enterGame', + }, + forced:true, + locked:false, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); + }, + logTarget:function(){ + return game.players; + }, + content:function(){ + 'step 0' + var list=[]; + for(var i=0;i<4;i++) list.push(lib.skill['mjdingyi_'+i].title); + player.chooseControl().set('choiceList',list).set('prompt','定仪:请选择一个全局效果').set('ai',function(target){ + var list1=player.getEnemies().length; + var list2=game.players.length-list1; + if(list2-list1>1) return 0; + if(game.players.length<6) return 2; + return 3; + }); + 'step 1' + if(typeof result.index=='number'){ + var skill='mjdingyi_'+result.index; + game.log(player,'选择了','#g'+lib.skill[skill].title); + for(var i of game.players) i.addSkill(skill); + game.delayx(); + } + }, + subSkill:{ + 0:{ + title:'摸牌阶段的额定摸牌数+1', + charlotte:true, + mark:true, + marktext:'仪', + trigger:{player:'phaseDrawBegin'}, + forced:true, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + trigger.num+=((player.storage.mjdingyi_plus||0)+1); + }, + intro:{ + content:function(storage,player){ + return '摸牌阶段的额定摸牌数+'+(1*((player.storage.mjdingyi_plus||0)+1)); + }, + }, + }, + 1:{ + title:'手牌上限+2', + charlotte:true, + mark:true, + marktext:'仪', + mod:{ + maxHandcard:function(player,num){ + return num+2*((player.storage.mjdingyi_plus||0)+1); + }, + }, + intro:{ + content:function(storage,player){ + return '手牌上限+'+(2*((player.storage.mjdingyi_plus||0)+1)); + }, + }, + }, + 2:{ + title:'攻击范围+1', + charlotte:true, + mark:true, + marktext:'仪', + mod:{ + attackRange:function(player,num){ + return num+((player.storage.mjdingyi_plus||0)+1); + }, + }, + intro:{ + content:function(storage,player){ + return '攻击范围+'+((player.storage.mjdingyi_plus||0)+1); + }, + }, + }, + 3:{ + title:'脱离濒死状态后回复1点体力', + charlotte:true, + mark:true, + marktext:'仪', + trigger:{player:'dyingAfter'}, + forced:true, + filter:function(event,player){ + return player.isDamaged(); + }, + content:function(){ + player.recover((player.storage.mjdingyi_plus||0)+1); + }, + intro:{ + content:function(storage,player){ + return '脱离濒死状态后回复'+((player.storage.mjdingyi_plus||0)+1)+'点体力'; + }, + }, + }, + }, + }, + mjzuici:{ + audio:'zuici', + trigger:{player:'damageEnd'}, + filter:function(event,player){ + if(!event.source||!event.source.isIn()) return false; + for(var i=0;i<4;i++){ + if(event.source.hasSkill('mjdingyi_'+i)) return true; + } + return false; + }, + logTarget:'source', + check:()=>false, + content:function(){ + 'step 0' + var target=trigger.source; + event.target=target; + for(var i=0;i<4;i++){ + if(target.hasSkill('mjdingyi_'+i)) target.removeSkill('mjdingyi_'+i); + } + 'step 1' + var list=get.zhinangs(); + if(list.length){ + player.chooseButton(['选择要令'+get.translation(target)+'获得的智囊',[list,'vcard']],true); + } + else event.finish(); + 'step 2' + if(result.bool){ + var card=get.cardPile2(function(card){ + return card.name==result.links[0][2]; + }) + if(card) target.gain(card,'gain2'); + } + }, + }, + mjfubi:{ + audio:'fubi', + enable:'phaseUse', + filter:function(event,player){ + if(player.hasSkill('mjfubi_round')) return false; + return game.hasPlayer(function(current){ + for(var i=0;i<4;i++){ + if(current.hasSkill('mjdingyi_'+i)) return true; + } + }); + }, + filterCard:true, + selectCard:[0,1], + filterTarget:function(card,player,target){ + if(ui.selected.cards.length){ + for(var i=0;i<4;i++){ + if(target.hasSkill('mjdingyi_'+i)) return true; + } + } + var num=0; + for(var i=0;i<4;i++){ + if(target.hasSkill('mjdingyi_'+i)) return true; + } + return num>1&&num<4; + }, + check:()=>false, + position:'he', + content:function(){ + 'step 0' + player.addTempSkill('mjfubi_round','roundStart'); + if(cards.length){ + player.addSkill('mjfubi_clear'); + player.markAuto('mjfubi_clear',[target]); + target.addMark('mjdingyi_plus',1,false); + game.log(target,'的','#g【定仪】','效果增加一倍'); + event.finish(); + return; + } + var list=[],nums=[]; + for(var i=0;i<4;i++){ + if(!target.hasSkill('mjdingyi_'+i)){ + list.push(lib.skill['mjdingyi_'+i].title); + nums.push(i); + } + } + if(list.length){ + event.nums=nums; + player.chooseControl().set('choiceList',list).set('prompt','辅弼:请选择为'+get.translation(target)+'更换的〖定仪〗效果').set('ai',function(){ + var player=_status.event.player,target=_status.event.getParent().target; + if(get.attitude(player,target)>0&&!target.hasSkill('mjdingyi_0')) return 0; + return _status.event.getParent().nums.length-1; + }); + } + else event.finish(); + 'step 1' + for(var i=0;i<4;i++){ + if(target.hasSkill('mjdingyi_'+i)) target.removeSkill('mjdingyi_'+i); + } + target.addSkill('mjdingyi_'+event.nums[result.index]); + game.log(target,'的效果被改为','#g'+lib.skill['mjdingyi_'+event.nums[result.index]].title); + }, + ai:{ + order:10, + expose:0, + result:{ + target:function(player,target){ + if(target.hasSkill('mjdingyi_0')) return -1; + return 2; + }, + }, + }, + subSkill:{ + round:{}, + clear:{ + trigger:{player:['phaseBegin','dieBegin']}, + forced:true, + popup:false, + charlotte:true, + content:function(){ + while(player.storage.mjfubi_clear&&player.storage.mjfubi_clear.length){ + var target=player.storage.mjfubi_clear.shift(); + if(target.hasMark('mjdingyi_plus')) target.removeMark('mjdingyi_plus',1,false); + } + delete player.storage.mjfubi_clear; + player.removeSkill('mjfubi_clear'); + }, + }, + }, + }, + boming:{ + audio:2, + enable:'phaseUse', + usable:2, + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterCard:true, + position:'he', + filterTarget:lib.filter.notMe, + discard:false, + lose:false, + delay:false, + content:function(){ + player.give(cards,target); + }, + check:function(card){ + return 5-get.value(card); + }, + ai:{ + order:10, + result:{ + target:function(player,target){ + if(!ui.selected.cards.length) return 0; + var card=ui.selected.cards[0]; + if(player.hasSkill('ejian')&&!player.getStorage('ejian').contains(target)){ + var dam=get.damageEffect(target,player,target); + if(dam>0) return dam; + var type=get.type(card,target),ts=target.getCards('he',function(card){ + return get.type(card)==type; + }); + if(ts.length){ + var val=get.value(ts,target); + if(val>get.value(card)) return -Math.max(1,val); + return 0; + } + } + return get.value(card,target)/1.5; + }, + }, + }, + group:'boming_draw', + subSkill:{ + draw:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + locked:false, + filter:function(event,player){ + return player.getHistory('lose',function(evt){ + return evt.getParent(2).name=='boming'; + }).length>1; + }, + content:function(){ + player.draw(); + }, + }, + }, + }, + ejian:{ + audio:2, + trigger:{global:'gainAfter'}, + forced:true, + filter:function(event,player){ + var evt=event.getParent(),target=event.player; + if(evt.name!='boming'||evt.player!=player||player.getStorage('ejian').contains(target)||!target.isIn()) return false; + var he=target.getCards('he'),card=event.cards[0]; + if(!he.contains(card)) return false; + var type=get.type2(card); + for(var i of he){ + if(i!=card&&get.type2(i)==type) return true; + } + return false; + }, + logTarget:'player', + content:function(){ + 'step 0' + event.cardType=get.type2(trigger.cards[0]); + event.target=trigger.player; + player.markAuto('ejian',[event.target]); + event.target.chooseControl().set('choiceList',[ + '受到1点伤害', + '展示手牌并弃置所有'+get.translation(event.cardType)+'牌', + ]).set('ai',function(event,player){ + if(get.damageEffect(player,_status.event.getParent().player,player)>=0) return 0; + var type=_status.event.cardType,cards=player.getCards('he',function(card){ + return get.type2(card)==type; + }); + if(cards.length==1) return 1; + if(cards.length>=2){ + for(var i=0;i=8) return 0; + } + if(cards.length>2&&player.hp>2) return 0; + if(cards.length>3) return 0; + return 1; + }).set('cardType',event.cardType); + 'step 1' + if(result.index==1){ + if(target.countCards('h')>0) target.showHandcards(); + } + else{ + target.damage(); + event.finish(); + } + 'step 2' + target.discard(target.getCards('he',function(card){ + return get.type2(card)==event.cardType; + })); + }, + ai:{combo:'boming',halfneg:true}, + onremove:true, + intro:{content:'已对$发动过此技能'}, + }, + hxrenshi:{ + audio:2, + enable:'phaseUse', + filter:function(event,player){ + return player.countCards('h')>0&&(!player.storage.hxrenshi2||game.hasPlayer(function(current){ + return !player.storage.hxrenshi2.contains(current); + })) + }, + filterCard:true, + filterTarget:function(card,player,target){ + return !player.storage.hxrenshi2||!player.storage.hxrenshi2.contains(target); + }, + position:'h', + discard:false, + lose:false, + delay:false, + check:function(cardx){ + var player=_status.event.player; + if(player.getStorage('debao').length==1&&(!game.hasPlayer(function(current){ + return get.attitude(player,current)>0&¤t.hp*1.5+current.countCards('h')<4; + })||game.hasPlayer(function(current){ + return get.attitude(player,current)<=0&¤t.hp*1.5+current.countCards('h')<4; + }))) return 0; + return 5-get.value(cardx); + }, + content:function(){ + player.addTempSkill('hxrenshi2','phaseUseEnd'); + player.markAuto('hxrenshi2',targets); + player.give(cards,target); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(ui.selected.cards.length) return get.value(ui.selected.cards[0],target)+0.1; + return 0; + }, + }, + }, + }, + hxrenshi2:{ + onremove:true, + }, + debao:{ + audio:2, + trigger:{global:'gainAfter'}, + forced:true, + filter:function(event,player){ + if(player==event.player||player.getStorage('debao').length>=player.maxHp) return false; + var evt=event.getl(player); + return evt&&evt.cards2&&evt.cards2.length>0; + }, + content:function(){ + var cards=get.cards(); + player.markAuto('debao',cards); + player.$gain2(cards[0],false); + game.cardsGotoSpecial(cards); + game.log(player,'将',cards[0],'放在了武将牌上'); + game.delayx(); + }, + marktext:'仁', + intro:{content:'cards',onunmark:'throw'}, + group:'debao_gain', + subSkill:{ + gain:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return player.getStorage('debao').length>0; + }, + content:function(){ + var cards=player.storage.debao; + player.gain(cards,'gain2','fromStorage'); + cards.length=0; + player.unmarkSkill('debao'); + }, + }, + }, + }, + buqi:{ + audio:2, + trigger:{global:'dying'}, + forced:true, + filter:function(event,player){ + return player.getStorage('debao').length>1; + }, + logTarget:'player', + content:function(){ + 'step 0' + var cards=player.getStorage('debao'); + if(cards.length==2) event._result={bool:true,links:cards.slice(0)}; + else player.chooseButton(['不弃:请选择移去两张“仁”',cards],2,true); + 'step 1' + if(result.bool){ + var cards=result.links; + player.unmarkAuto('debao',cards); + player.$throw(cards,1000); + game.log(player,'将',cards,'置入了弃牌堆'); + game.delayx(); + game.cardsDiscard(cards); + } + else event.finish(); + 'step 2' + if(trigger.player.isIn()&&trigger.player.isDamaged()) trigger.player.recover(); + }, + group:'buqi_die', + subSkill:{ + die:{ + trigger:{global:'dieAfter'}, + forced:true, + filter:function(event,player){ + return player.getStorage('debao').length>0; + }, + content:function(){ + player.unmarkSkill('debao'); + }, + }, + }, + ai:{ + neg:true, + combo:'debao', + }, + }, + guying:{ + audio:2, + trigger:{ + player:'loseAfter', + global:'loseAsyncAfter', + }, + forced:true, + usable:1, + filter:function(event,player){ + if(event.type!='discard'){ + var evt=event.getParent(); + if(evt.name!='useCard'&&evt.name!='respond') return false; + } + var target=_status.currentPhase,evt=event.getl(player); + if(!evt.cards2||evt.cards2.length!=1||!target||target==player||!target.isIn()) return false; + return get.position(evt.cards2[0])=='d'||target.countCards('he')<0; + }, + logTarget:function(){ + return _status.currentPhase; + }, + content:function(){ + 'step 0' + if(trigger.delay===false) game.delayx(); + event.target=_status.currentPhase; + event.card=trigger.getl(player).cards2[0]; + 'step 1' + player.addMark('guying',1,false); + event.addIndex=0; + var choiceList=[],str=get.translation(player); + if(target.countCards('he')>0) choiceList.push('随机交给'+str+'一张牌'); + else event.addIndex++; + if(get.position(card)=='d') choiceList.push('令'+str+'收回'+get.translation(card)); + if(choiceList.length==1) event._result={index:0}; + target.chooseControl().set('choiceList',choiceList).set('ai',function(){ + var player=_status.event.player,evt=_status.event.getParent(); + if(get.value(evt.card,evt.player)*get.attitude(player,evt.player)>0) return 0; + return Math.random()>(get.value(evt.card,evt.player)/6)?1:0; + return 1; + }); + 'step 2' + if(result.index+event.addIndex==0){ + target.give(target.getCards('he').randomGet(),player); + event.finish(); + } + else player.gain(card,'gain2'); + 'step 3' + if(player.isIn()&&player.getCards('h').contains(card)&&get.type(card,player)=='equip') player.chooseUseTarget(card,true,'nopopup'); + }, + onremove:true, + intro:{content:'已发动过#次'}, + group:'guying_discard', + subSkill:{ + discard:{ + audio:'guying', + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return player.countMark('guying')>0; + }, + content:function(){ + var num=player.countMark('guying'); + player.removeMark('guying',num,false); + player.chooseToDiscard('he',num,true); + }, + }, + }, + }, + muzhen:{ + audio:2, + enable:'phaseUse', + usable:2, + filter:function(event,player){ + if(!player.hasSkill('muzhen1')&&player.countCards('e')>0&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')>0; + })) return true; + if(!player.hasSkill('muzhen2')&&player.countCards('he')>1&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('e')>0; + })) return true; + return false; + }, + chooseButton:{ + dialog:function(event,player){ + var list=[ + '将一张装备牌置于其他角色的装备区内并获得其一张手牌', + '将两张牌交给一名其他角色并获得其装备区内的一张牌', + ]; + var choiceList=ui.create.dialog('睦阵:请选择一项','hidden'); + for(var i=0;i0&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')>0; + }) + return !player.hasSkill('muzhen2')&&player.countCards('he')>1&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('e')>0; + }); + }, + backup:function(links){ + return { + audio:'muzhen', + filterTarget:[ + function(card,player,target){ + return target.countCards('h')>0&&target.isEmpty(ui.selected.cards[0]); + }, + function(card,player,target){ + return target.countCards('e')>0; + } + ][links[0]], + filterCard:[ + function(card,player){ + if(ui.selected.targets.length) return ui.selected.targets[0].isEmpty(card); + return game.hasPlayer(function(current){ + return current.countCards('h')>0&¤t.isEmpty(card); + }) + }, + true, + ], + selectCard:1+links[0], + position:('eh')[links[0]], + discard:false, + lose:false, + delay:false, + content:function(){ + 'step 0' + player.addTempSkill('muzhen'+cards.length,'phaseUseEnd'); + if(cards.length==1){ + player.$giveAuto(cards[0],target); + game.delayx(); + target.equip(cards[0]); + } + else{ + player.give(cards,target); + } + player.gainPlayerCard(target,cards.length==2?'e':'h',true); + }, + } + }, + prompt:function(){ + return '请选择【睦阵】的牌和目标' + }, + }, + }, + muzhen1:{}, + muzhen2:{}, + sheyi2:{charlotte:true}, + sheyi:{ + audio:2, + trigger:{global:'damageBegin4'}, + direct:true, + filter:function(event,player){ + return !player.hasSkill('sheyi2')&&player!=event.player&&event.player.hp=Math.max(1,player.hp); + }, + content:function(){ + 'step 0' + var num=Math.max(1,player.hp),target=trigger.player; + player.chooseCard('he',get.prompt('sheyi',target),'交给其至少'+get.cnNumber(num)+'张牌,防止即将受到的伤害('+trigger.num+'点)',[num,player.countCards('he')]).set('goon',function(){ + if(get.attitude(player,target)<0) return false; + if(trigger.num=0) return false; + if(trigger.num<2&&target.hp>trigger.num) return 6/Math.sqrt(num); + if(target==get.zhu(player)) return 9; + return 8/Math.sqrt(num); + }()).set('ai',function(card){ + if(ui.selected.cards.length>=Math.max(1,_status.event.player.hp)) return 0; + if(typeof _status.event.goon=='number') return _status.event.goon-get.value(card); + return 0; + }); + 'step 1' + if(result.bool){ + var target=trigger.player; + player.logSkill('sheyi',target); + player.addTempSkill('sheyi2','roundStart'); + player.give(result.cards,target); + trigger.cancel(); + } + }, + }, + tianyin:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + var list=[]; + player.getHistory('useCard',function(evt){ + list.add(get.type2(evt.card,false)); + }); + for(var i=0;i0; + }, + logTarget:function(event,player){ + return player.storage.xunyi2; + }, + content:function(){ + (player==trigger.player?player.storage.xunyi2:player).chooseToDiscard('he',true); + }, + }, + //狗剩 + reduoji:{ + audio:'duoji', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterCard:true, + position:'he', + filterTarget:lib.filter.notMe, + discard:false, + toStorage:true, + delay:false, + check:function(card){ + return 3-get.value(card); + }, + content:function(){ + 'step 0' + player.$give(cards[0],target,false); + target.markAuto('reduoji',cards); + game.log(player,'将',cards[0],'放在了',target,'的武将牌上'); + 'step 1' + game.delay(); + }, + group:['reduoji_equip','reduoji_gain'], + intro:{ + content:'cards', + onunmark:'throw', + }, + ai:{ + order:1, + result:{target:-1}, + }, + subSkill:{ + equip:{ + audio:'duoji', + trigger:{global:'equipAfter'}, + forced:true, + filter:function(event,player){ + if(player==event.player||!event.player.getStorage('reduoji').length||!event.player.getCards('e').contains(event.card)) return false; + var evt=event.getParent(2); + return evt.name=='useCard'&&evt.player==event.player; + }, + logTarget:'player', + content:function(){ + 'step 0' + player.gain(trigger.card,trigger.player,'give','bySelf'); + 'step 1' + var target=trigger.player,storage=target.getStorage('reduoji'); + if(storage.length){ + var card=storage[0]; + target.$throw(card,1000); + target.unmarkAuto('reduoji',[card]); + game.log(target,'移去了',card); + game.cardsDiscard(card); + target.draw(); + } + }, + }, + gain:{ + audio:'duoji', + trigger:{global:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return event.player.getStorage('reduoji').length>0; + }, + logTarget:'player', + content:function(){ + var target=trigger.player,cards=target.storage.reduoji; + target.$give(cards,player); + player.gain(cards,'fromStorage'); + cards.length=0; + target.unmarkSkill('reduoji'); + game.delay(); + }, + }, + }, + }, + //SP辛毗 + spyinju:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:lib.filter.notMe, + content:function(){ + "step 0" + target.chooseToUse(function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },'引裾:对'+get.translation(player)+'使用一张杀,或跳过下回合的出牌阶段和弃牌阶段').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; + return lib.filter.targetEnabled.apply(this,arguments); + }).set('sourcex',player); + "step 1" + if(!result.bool) target.addSkill('spyinju2'); + }, + ai:{ + order:1, + expose:0.2, + result:{ + target:-1.5, + player:function(player,target){ + if(!target.canUse('sha',player)) return 0; + if(target.countCards('h')==0) return 0; + if(target.countCards('h')==1) return -0.1; + if(player.countCards('h','shan')==0) return -1; + if(player.hp<2) return -2; + return -0.5; + } + }, + threaten:1.1 + } + }, + spyinju2:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + charlotte:true, + content:function(){ + player.skip('phaseUse'); + player.skip('phaseDiscard'); + player.removeSkill('spyinju2'); + game.log(player,'跳过了出牌阶段'); + game.log(player,'跳过了弃牌阶段'); + }, + mark:true, + intro:{content:'衣襟被拽住了,下个准备阶段开始时跳过出牌阶段和弃牌阶段'}, + }, + spchijie:{ + audio:2, + trigger:{target:'useCardToTarget'}, + usable:1, + filter:function(event,player){ + return event.player!=player&&event.targets.length==1; + }, + check:function(event,player){ + return get.effect(player,event.card,event.player,player)<0; + }, + content:function(){ + 'step 0' + player.judge(function(card){ + if(get.number(card)>6) return 2; + return 0; + }).judge2=function(result){ + return result.bool?true:false; + }; + 'step 1' + if(result.bool){ + trigger.targets.length=0; + trigger.getParent().triggeredTargets2.length=0; + trigger.cancel(); + } + }, + }, + //糜夫人 + spcunsi:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return !player.isTurnedOver(); + }, + filterTarget:lib.filter.notMe, + content:function(){ + 'step 0' + player.turnOver(); + 'step 1' + var card=get.cardPile(function(card){ + return card.name=='sha'; + }); + if(card) target.gain(card,'gain2'); + 'step 2' + target.addSkill('spcunsi2'); + target.addMark('spcunsi2',1,false); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + var card={name:'sha',isCard:true}; + if(!target.hasSkillTag('nogain')&&game.hasPlayer(function(current){ + return (get.attitude(target,current)<0&& + !current.hasShan() + &&target.canUse(card,current)&& + !current.hasSkillTag('filterDamage',null,{ + player:target, + card:card, + jiu:true, + })&& + get.effect(current,card,target)>0); + })){ + return 4; + } + return 0; + }, + }, + }, + }, + spcunsi2:{ + charlotte:true, + trigger:{player:'useCard1'}, + firstDo:true, + forced:true, + popup:false, + onremove:true, + filter:function(event,player){ + return event.card.name=='sha'; + }, + content:function(){ + trigger.baseDamage+=player.countMark('spcunsi2'); + player.removeSkill('spcunsi2'); + }, + marktext:'嗣', + intro:{ + content:'下一张【杀】的伤害+#', + }, + }, + spguixiu:{ + trigger:{player:'damageEnd'}, + forced:true, + filter:function(event,player){ + if(typeof event.spguixiu=='boolean'&&!event.spguixiu) return false; + return player.isTurnedOver(); + }, + content:function(){ + player.turnOver(); + }, + group:['spguixiu_draw','spguixiu_count'], + subSkill:{ + count:{ + trigger:{player:'damageBegin2'}, + lastDo:true, + silent:true, + content:function(){ + event.spguixiu=player.isTurnedOver(); + }, + }, + draw:{ + trigger:{player:'turnOverAfter'}, + forced:true, + filter:function(event,player){ + return !player.isTurnedOver(); + }, + content:function(){ + player.draw(); + }, + }, + }, + }, + //那个男人的舅舅 + heji:{ + audio:2, + trigger:{global:'useCardAfter'}, + direct:true, + locked:false, + filter:function(event,player){ + if(event.targets.length!=1||event.targets[0]==player||event.targets[0].isDead()) return false; + if(event.card.name!='juedou'&&(event.card.name!='sha'||get.color(event.card)!='red')) return false; + if(_status.connectMode&&player.countCards('h')>0) return true; + return player.hasSha()||player.hasUsableCard('juedou'); + }, + content:function(){ + player.chooseToUse(function(card,player,event){ + var name=get.name(card); + if(name!='sha'&&name!='juedou') return false; + return lib.filter.cardEnabled.apply(this,arguments); + },'合击:是否对'+get.translation(trigger.targets[0])+'使用一张【杀】或【决斗】?').set('logSkill','heji').set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; + return lib.filter.targetEnabled.apply(this,arguments); + }).set('sourcex',trigger.targets[0]).set('addCount',false); + }, + group:'heji_gain', + subSkill:{ + gain:{ + trigger:{player:'useCard'}, + forced:true, + popup:false, + filter:function(event,player){ + return event.card.isCard&&event.getParent(2).name=='heji'; + }, + content:function(){ + var card=get.cardPile2(function(card){ + return get.color(card,false)=='red'; + }); + if(card) player.gain(card,'gain2'); + }, + }, + }, + mod:{ + aiOrder:function(player,card,num){ + if(get.name(card,player)=='sha'&&get.color(card,player)=='red') return num+0.6*(_status.event.name=='chooseToUse'&&player.hasHistory('useCard',function(evt){ + return evt.card.name=='sha'&&evt.cards.length==1; + })?1:-1); + }, + }, + }, + //始计篇·智 + refubi:{ + audio:'fubi', + trigger:{ + global:'phaseBefore', + player:'enterGame', + }, + direct:true, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('refubi'),lib.filter.notMe).set('ai',function(target){ + return 1+get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('refubi',target); + target.addMark('refubi',1); + } + }, + intro:{ + content:function(info,player){ + var str='已获得“辅弼”标记' + if(player.storage.refubi_effect0){ + str+=';本回合使用【杀】的次数上限+'; + str+=player.storage.refubi_effect0; + } + if(player.storage.refubi_effect1){ + str+=';本回合的手牌上限+'; + str+=(player.storage.refubi_effect1*3); + } + return str; + }, + }, + marktext:'弼', + group:'refubi_buff', + subSkill:{ + buff:{ + trigger:{global:'phaseZhunbeiBegin'}, + direct:true, + filter:function(event,player){ + return event.player!=player&&event.player.hasMark('refubi'); + }, + content:function(){ + 'step 0' + var str=get.translation(trigger.player); + player.chooseControl('cancel2').set('choiceList',[ + '令'+str+'本回合使用【杀】的次数上限+1', + '令'+str+'本回合的手牌上限+3', + ]).set('ai',function(){ + var player=_status.event.player,target=_status.event.getTrigger().player; + if(get.attitude(player,target)<=0) return 'cancel2'; + if(!target.hasJudge('lebu')&&target.countCards('h',function(card){ + return get.name(card,target)=='sha'&&target.hasValueTarget(card); + })>target.getCardUsable('sha')) return 0; + return 1; + }); + 'step 1' + if(result.control!='cancel2'){ + var target=trigger.player; + player.logSkill('refubi',target); + var str='refubi_effect'+result.index; + target.addTempSkill(str); + target.addMark(str,1,false); + game.log(target,[ + '本回合使用【杀】的次数上限+1', + '本回合的手牌上限+3', + ][result.index]); + } + }, + }, + effect0:{ + onremove:true, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.countMark('refubi_effect0'); + }, + }, + }, + effect1:{ + onremove:true, + mod:{ + maxHandcard:function(player,num){ + return num+3*player.countMark('refubi_effect1'); + }, + }, + }, + }, + }, + rezuici:{ + audio:'zuici', + enable:'chooseToUse', + filter:function(event,player){ + if(event.type=='phase'||event.type=='dying'&&player==event.dying) return (player.isDamaged()&&player.countCards('e')>0); + return false; + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('###罪辞###选择废除一个有牌的装备栏,然后回复2点体力,并可移动“辅弼”标记。'); + }, + chooseControl:function(event,player){ + var list=[]; + for(var i=1;i<6;i++){ + if(player.getEquip(i)) list.push('equip'+i); + } + list.push('cancel2'); + return list; + }, + check:function(event,player){ + if(player.hp>1&&player.getDamagedHp()<2) return 'cancel2'; + var cards=player.getCards('e').sort(function(a,b){ + return get.value(a)-get.value(b); + }); + var sub=get.subtype(cards[0],false); + if(player.hp<1) return sub; + var val=get.value(cards[0]); + if(val<0) return sub; + return val<4?sub:'cancel2'; + }, + backup:function(result){ + var next=get.copy(lib.skill.rezuicix); + next.position=result.control; + return next; + }, + }, + ai:{ + order:2.7, + result:{ + player:1, + }, + save:true, + skillTagFilter:function(player,tag,arg){ + return player==arg; + }, + }, + }, + rezuicix:{ + audio:'zuici', + content:function(){ + 'step 0' + player.disableEquip(lib.skill.rezuici_backup.position); + player.recover(2); + 'step 1' + var b1=false,b2=false; + for(var i of game.players){ + if(i.hasMark('refubi')) b1=true; + else if(i!=player) b2=true; + if(b1&&b2) break; + } + if(b1&&b2){ + player.chooseTarget('是否转移“辅弼”标记?',function(card,player,target){ + return target!=player&&!target.hasMark('refubi'); + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + return Math.min(att,att-_status.event.preatt); + }).set('preatt',get.attitude(player,game.findPlayer(function(current){ + return current.hasMark('refubi'); + }))); + } + else event.finish(); + 'step 2' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'group'); + game.countPlayer(function(current){ + var num=current.countMark('refubi'); + if(num) current.removeMark('refubi',1,false); + }); + target.addMark('refubi',1); + } + }, + ai:{ + result:{ + player:1, + }, + }, + }, + reshengxi:{ + audio:'shengxi', + audioname:['feiyi'], + trigger:{player:'phaseJieshuBegin'}, + frequent:true, + preHidden:true, + filter:function(event,player){ + return !player.getHistory('sourceDamage').length; + }, + content:function(){ + player.draw(2); + }, + }, + fyjianyu:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return !player.hasSkill('fyjianyu2')&&game.countPlayer(function(current){ + return !current.hasMark('fyjianyux'); + })>1; + }, + filterTarget:function(card,player,target){ + return !target.hasMark('fyjianyux'); + }, + selectTarget:2, + content:function(){ + player.addTempSkill('fyjianyux',{player:'phaseBegin'}); + target.addMark('fyjianyux',1); + }, + ai:{ + order:0.1, + result:{ + target:function(player,target){ + if(!ui.selected.targets.length) return target==player?1:0; + if(get.attitude(player,target)<0) return -1.6*(1+(target.countCards('h',function(card){ + return target.hasValueTarget(card)&&get.effect(player,card,target,target)>0; + }))*Math.sqrt(target.countCards('h'))); + return 0.3*(1+(target.countCards('h',function(card){ + return target.hasValueTarget(card)&&get.effect(player,card,target,target)>0; + }))*Math.sqrt(target.countCards('h'))); + }, + }, + }, + }, + fyjianyux:{ + trigger:{global:'useCardToPlayer'}, + forced:true, + charlotte:true, + filter:function(event,player){ + return event.player!=event.target&&event.player.hasMark('fyjianyux')&& + event.target.hasMark('fyjianyux')&&event.target.isAlive(); + }, + logTarget:'target', + content:function(){ + trigger.target.draw(); + }, + onremove:function(){ + game.countPlayer(function(current){ + var num=current.countMark('fyjianyux'); + if(num) current.removeMark('fyjianyux'); + }); + }, + intro:{ + content:'mark', + }, + }, + fyjianyu2:{}, + spwanwei:{ + audio:2, + enable:'chooseToUse', + filter:function(event,player){ + if(player.hasSkill('spwanwei2')||player.hp<1) return false; + if(event.type=='dying') return event.dying!=player; + if(event.type!='phase') return false; + return game.hasPlayer(function(current){ + return current!=player&¤t.isDamaged(); + }); + }, + filterTarget:function(card,player,target){ + if(_status.event.type=='dying') return target==_status.event.dying; + return player!=target&&target.isDamaged(); + }, + selectTarget:function(){ + if(_status.event.type=='dying') return -1; + return 1; + }, + content:function(){ + player.addTempSkill('spwanwei2','roundStart'); + var num=player.hp; + target.recover(Math.max(num+1,1-target.hp)); + player.loseHp(num); + }, + ai:{ + save:true, + skillTagFilter:function(player,tag,target){ + return player!=target; + }, + expose:0.5, + order:6, + result:{ + target:function(player,target){ + if(_status.event.type!='dying') return 0; + if(get.attitude(player,target)<4) return 0; + if(player.countCards('he')<2&&target!=get.zhu(player)) return 0; + return 1; + }, + }, + }, + }, + spwanwei2:{}, + spyuejian:{ + mod:{ + maxHandcardBase:function(player){ + return player.maxHp; + }, + }, + audio:2, + enable:'chooseToUse', + filter:function(event,player){ + return event.type=='dying'&&player==event.dying&&player.countCards('he')>1; + }, + selectCard:2, + filterCard:true, + position:'he', + check:function(card){ + return 1/Math.max(0.1,get.value(card)); + }, + content:function(){ + player.recover(); + }, + ai:{ + save:true, + skillTagFilter:function(player,tag,target){ + return player==target; + }, + order:1.4, + result:{ + player:1, + }, + }, + }, + spwuku:{ + audio:2, + trigger:{global:'useCard'}, + forced:true, + preHidden:true, + filter:function(event,player){ + if(get.type(event.card)!='equip') return false; + var gz=get.mode()=='guozhan'; + if(gz&&event.player.isFriendOf(player)) return false; + return player.countMark('spwuku')<(gz?2:3); + }, + content:function(){ + player.addMark('spwuku',1); + }, + marktext:'库', + intro:{ + content:'mark', + }, + ai:{ + combo:'spsanchen', + threaten:3.6, + }, + }, + spsanchen:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'gray', + filter:function(event,player){ + return player.countMark('spwuku')>2; + }, + content:function(){ + player.awakenSkill('spsanchen'); + player.gainMaxHp(); + player.recover(); + player.addSkillLog('spmiewu'); + }, + ai:{ + combo:'wuku', + }, + derivation:'spmiewu', + }, + spmiewu:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + filter:function(event,player){ + if(!player.countMark('spwuku')||!player.countCards('hse')||player.hasSkill('spmiewu2')) return false; + for(var i of lib.inpile){ + var type=get.type2(i); + if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true; + } + return false; + }, + chooseButton:{ + dialog:function(event,player){ + var list=[]; + for(var i=0;i0&&player.countCards('she')>0&&!player.hasSkill('spmiewu2'); + }, + ai:{ + combo:'spwuku', + fireAttack:true, + respondSha:true, + respondShan:true, + skillTagFilter:function(player){ + if(!player.countMark('spwuku')||!player.countCards('hse')||player.hasSkill('spmiewu2')) return false; + }, + order:1, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); + return 1; + }, + }, + }, + }, + spmiewu2:{ + trigger:{player:['useCardAfter','respondAfter']}, + forced:true, + charlotte:true, + popup:false, + filter:function(event,player){ + return event.skill=='spmiewu_backup'; + }, + content:function(){ + player.draw(); + }, + }, + spmiewu_backup:{audio:'spmiewu'}, + qinzheng:{ + audio:2, + trigger:{player:['useCard','respond']}, + forced:true, + filter:function(event,player){ + var num=player.getAllHistory('useCard').length+player.getAllHistory('respond').length; + return num%3==0||num%5==0||num%8==0; + }, + content:function(){ + var num=player.getAllHistory('useCard').length+player.getAllHistory('respond').length; + var cards=[]; + if(num%3==0){ + var card=get.cardPile2(function(card){ + return card.name=='sha'||card.name=='shan'; + }); + if(card) cards.push(card); + } + if(num%5==0){ + var card=get.cardPile2(function(card){ + return ['tao','jiu','zong','xionghuangjiu'].contains(card.name); + }); + if(card) cards.push(card); + } + if(num%8==0){ + var card=get.cardPile2(function(card){ + return ['juedou','wuzhong','zengbin','sadouchengbing','dongzhuxianji','tongzhougongji'].contains(card.name); + }); + if(card) cards.push(card); + } + if(cards.length) player.gain(cards,'gain2'); + }, + group:'qinzheng_count', + intro:{ + content:function(num){ + var str='
  • 总次数:'; + str+=num; + str+='
  • 杀/闪:'; + str+=num%3; + str+='/3
  • 桃/酒:'; + str+=num%5; + str+='/5
  • 决斗/无中生有:'; + str+=num%8; + str+='/8'; + return str; + }, + }, + }, + qinzheng_count:{ + trigger:{player:['useCard1','respond']}, + silent:true, + firstDo:true, + noHidden:true, + content:function(){ + player.storage.qinzheng=player.getAllHistory('useCard').length+player.getAllHistory('respond').length; + player.markSkill('qinzheng'); + }, + }, + spqiai:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he',function(card){ + return get.type(card)!='basic'; + })>0; + }, + filterCard:function(card){ + return get.type(card)!='basic'; + }, + position:'he', + filterTarget:lib.filter.notMe, + delay:false, + discard:false, + lose:false, + check:function(card){ + var player=_status.event.player; + if(get.position(card)=='e'&&card.name=='jinhe') return 10; + if(player.isHealthy()) return 7-get.value(card); + return 9-get.value(card); + }, + content:function(){ + 'step 0' + player.give(cards,target,true); + 'step 1' + if(!target.isIn()){ + event.finish(); + return; + } + if(player.isHealthy()) event._result={index:1}; + else{ + var str=get.translation(player); + target.chooseControl().set('choiceList',[ + '令'+str+'回复1点体力', + '令'+str+'摸两张牌', + ]); + } + 'step 2' + if(result.index==0) player.recover(); + else player.draw(2); + }, + ai:{ + order:8, + result:{ + player:1, + target:function(player,target){ + if(ui.selected.cards.length){ + var card=ui.selected.cards[0]; + var val=get.value(card,target); + if(val<0) return -1; + if(target.hasSkillTag('nogain')) return 0; + var useval=target.getUseValue(card); + if(val<1||useval<=0) return 0.1; + return Math.sqrt(useval); + } + return 0; + }, + }, + }, + }, + spshanxi:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&&!current.hasMark('spshanxi'); + }); + }, + content:function(){ + 'step 0' + var eff=0; + var target=game.findPlayer(function(current){ + return current!=player&¤t.hasMark('spshanxi'); + }); + if(target) eff=(-get.attitude(player,target)/Math.sqrt(Math.max(1,target.hp))); + player.chooseTarget(get.prompt('spshanxi'),'令一名其他角色获得“檄”',function(card,player,target){ + return target!=player&&!target.hasMark('spshanxi'); + }).set('ai',function(target){ + return (-get.attitude(_status.event.player,target)/Math.sqrt(Math.max(1,target.hp)))-_status.event.eff; + }).set('eff',eff); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('spshanxi',target); + game.countPlayer(function(current){ + if(current==target) current.addMark('spshanxi',1); + else{ + var num=current.countMark('spshanxi'); + if(num>0) current.removeMark('spshanxi',num); + } + }); + } + }, + marktext:'檄', + intro:{ + name2:'檄', + content:'已被设下索命檄文', + }, + group:'spshanxi_suoming', + ai:{threaten:3.3}, + }, + spshanxi_suoming:{ + audio:'spshanxi', + trigger:{global:'recoverAfter'}, + forced:true, + filter:function(event,player){ + return event.player.hasMark('spshanxi')&&event.player.hp>0; + }, + logTarget:'player', + content:function(){ + 'step 0' + if(trigger.player.countCards('he')<2) event._result={bool:false}; + else trigger.player.chooseCard('he',2,'交给'+get.translation(player)+'两张牌,或失去1点体力').set('ai',function(card){ + return 9-get.value(card); + }); + 'step 1' + if(!result.bool) trigger.player.loseHp(); + else trigger.player.give(result.cards,player); + }, + }, + shameng:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + var hs=player.getCards('h'); + if(hs.length<2) return false; + var red=0,black=0; + for(var i of hs){ + if(get.color(i,player)=='red') red++; + else black++; + if(red>1||black>1) return true; + } + return false; + }, + complexCard:true, + selectCard:2, + filterCard:function(card,player){ + if(ui.selected.cards.length) return get.color(card,player)==get.color(ui.selected.cards[0],player); + var color=get.color(card,player); + return player.countCards('h',function(cardx){ + return cardx!=card&&color==get.color(cardx,player); + })>0; + }, + filterTarget:lib.filter.notMe, + check:function(card){return 7-get.value(card)}, + position:'h', + content:function(){ + target.draw(2); + player.draw(3); + }, + ai:{ + order:6, + result:{target:2}, + }, + }, + fubi:{ + trigger:{ + global:'phaseBefore', + player:'enterGame', + }, + direct:true, + skillAnimation:true, + animationColor:'wood', + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('fubi'),lib.filter.notMe).set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('fubi',target); + target.addSkill('fubi2'); + target.storage.fubi2.push(player); + } + }, + }, + fubi2:{ + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[]; + }, + mod:{ + maxHandcard:function(player,num){ + var list=player.getStorage('fubi2'); + for(var i of list){ + if(i.isIn()) num+=3; + } + return num; + }, + }, + mark:true, + intro:{content:'若$存活,则手牌上限+3'}, + }, + zuici:{ + trigger:{player:'dying'}, + direct:true, + filter:function(event,player){ + return player.countCards('e')>0; + }, + content:function(){ + 'step 0' + var list=[]; + var cards=player.getCards('e'); + for(var i of cards) list.push(get.subtype(i)); + list.push('cancel2'); + player.chooseControl(list).set('prompt',get.prompt2('zuici')); + 'step 1' + if(result.control!='cancel2'){ + player.disableEquip(result.control); + } + else event.finish(); + 'step 2' + if(player.hp<1) player.recover(1-player.hp); + }, + }, + jianzhan:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return lib.skill.jianzhan.filterTarget(null,player,current); + }); + }, + filterTarget:function(card,player,target){ + if(target==player) return false; + if(ui.selected.targets.length){ + var targetx=ui.selected.targets[0]; + return targetx!=target&&targetx.countCards('h')>target.countCards('h')&&targetx.inRange(target); + } + var num=target.countCards('h'); + return game.hasPlayer(function(current){ + return current!=target&¤t!=player&¤t.countCards('h')0) return 0; + if(eff<0||get.attitude(evt.targets[0],evt.player)>1) return 1; + return 0; + }); + 'step 1' + if(result.index==0) targets[0].useCard({name:'sha',isCard:true},targets[1],false); + else player.draw(); + }, + ai:{ + result:{ + target:function(player,target){ + if(ui.selected.targets.length){ + var from=ui.selected.targets[0]; + return get.effect(target,{name:'sha'},from,target); + } + var effs=[0,0]; + game.countPlayer(function(current){ + if(current!=target&&target.canUse('sha',current)){ + var eff=get.effect(current,{name:'sha'},target,target); + if(eff>effs[0]) effs[0]=eff; + if(eff0?0:1]; + } + }, + order:8.5, + expose:0.2 + }, + }, + duoji:{ + audio:2, + enable:'phaseUse', + limited:true, + filter:function(event,player){ + return player.countCards('h')>1&&game.hasPlayer(function(current){ + return current!=player&¤t.countGainableCards(player,'e')>0; + }); + }, + filterCard:true, + selectCard:2, + filterTarget:function(card,player,target){ + return target!=player&&target.countGainableCards(player,'e')>0; + }, + check:function(card){ + return 8-get.value(card); + }, + position:'h', + skillAnimation:true, + animationColor:'metal', + content:function(){ + player.awakenSkill('duoji'); + var cards=target.getGainableCards(player,'e'); + player.gain(cards,target,'give','bySelf'); + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + var num=0,es=target.getCards('e'),val=0; + for(var i of es){ + num+=get.value(i,target); + } + for(var i of ui.selected.cards){ + val+=get.value(i,player); + } + if(Math.abs(num)>val) return -num; + return 0; + }, + }, + }, + }, + }, + characterIntro:{ + yuanhuan:'袁涣,字曜卿,陈郡扶乐(今河南省周口市太康县)人。东汉末年官员,出身陈郡袁氏,为东汉司徒袁滂之子。袁涣早年曾任郡功曹,后被公府征辟,相继被举为高第、秀才。汉末战乱时,袁涣流寓江淮一带,初为袁术所用,后投吕布。建安三年(198年),曹操率兵剿灭了吕布,袁涣又转投曹操,拜沛南部都尉,后又任谏议大夫、郎中令等职,在任上尽心尽责,以敢谏直言称名。袁涣恕思而后行,外表温柔而内心能断,处危难则勇气极大。汉末三国时期,唯有程昱、曹仁、袁涣三人被评价为勇冠贲育。', + qiaogong:'桥公,亦作“乔公”,名字不详,是中国汉末三国时期的长者,江东二乔的父亲,三国时期庐江郡皖县(今安徽潜山)人,中国长篇古典名著《三国演义》中称之为“乔国老”。', + liuzhang:'刘璋(生卒年不详),字季玉,江夏竟陵(今湖北省天门市)人。东汉末年宗室、军阀,益州牧刘焉幼子,在父亲刘焉死后继任益州牧。刘璋为人懦弱多疑。汉中张鲁骄纵,不听刘璋号令,于是刘璋杀张鲁母弟,双方成为仇敌,刘璋派庞羲攻击张鲁,战败。后益州内乱,平定后,又有曹操将前来袭击的消息。在内外交逼之下,刘璋听信手下张松、法正之言,迎接刘备入益州,想借刘备之力,抵抗曹操。不料此举乃引狼入室,刘备反手攻击刘璋,又有法正为内应,进至成都。成都吏民都想抵抗刘备,但刘璋为百姓计而开城出降,群下莫不流涕。刘备占据成都后,刘璋以振威将军的身份被迁往荆州居住,关羽失荆州后,刘璋归属东吴,被孙权任命为益州牧,不久后去世,卒年不详。', + zhangzhongjing:'张仲景(约公元150~154年—约公元215~219年),名机,字仲景,南阳涅阳县(今河南省邓州市穰东镇张寨村)人。东汉末年著名医学家,被后人尊称为“医圣”。张仲景广泛收集医方,写出了传世巨著《伤寒杂病论》。它确立的“辨证论治”原则,是中医临床的基本原则,是中医的灵魂所在。在方剂学方面,《伤寒杂病论》也做出了巨大贡献,创造了很多剂型,记载了大量有效的方剂。其所确立的六经辨证的治疗原则,受到历代医学家的推崇。这是中国第一部从理论到实践、确立辨证论治法则的医学专著,是中国医学史上影响最大的著作之一,是后学者研习中医必备的经典著作,广泛受到医学生和临床大夫的重视。', + xiangchong:'向宠(?~240年),左将军向朗之侄,蜀汉重要将领。具有谦和公允的性格品行,对军事通晓畅达,被汉昭烈帝刘备称赞。刘备时,历任牙门将(类似于主将帐下的偏将),诸葛亮北伐时,以向宠为中领军,封都亭侯。诸葛亮北行汉中前,特意在《出师表》中向刘禅推荐向宠。延熙三年(公元240年),南征汉嘉(今四川省雅安市)蛮夷时,遇害,尸体被其部下夺回,送回成都安葬。', + caizhenji:'蔡贞姬,生卒年不详,汉末大儒蔡邕之女。其父蔡邕精于天文数理,妙解音律,是曹操的挚友和老师。生在书香门第的家庭的蔡贞姬,自小耳濡目染,精通书法与音律。后来,其父为避宦竖迫害,便随父亲来泰山依付羊衜一族,在羊衜的元配孔氏死后,便在父亲的做主下与之成亲。夫妻二人婚后生有两子一女:羊承、羊徽瑜、羊祜。在与羊衜成亲之前,羊衜和孔氏生有一子羊发。后来羊发、羊承同时生病,蔡贞姬知道不能两全,就专心照顾羊发,最后羊发痊愈,羊承病死。', + zhouchu:'周处(236—297年),字子隐,吴郡阳羡(今江苏宜兴)人。西晋大臣、将领,东吴鄱阳太守周鲂之子。少时纵情肆欲,为祸乡里。后来改过自新,拜访名人陆机和陆云,浪子回头,发奋读书,留下“周处除三害”的传说,拜东观左丞,迁无难都督,功业胜过父亲。吴国灭亡后,出仕西晋,拜新平太守,转广汉太守,治境有方。入为散骑常侍,迁御史中丞,刚正不阿。得罪梁孝王司马肜。元康七年,出任建威将军,前往关中,讨伐氐羌齐万年叛乱,遇害于沙场。追赠平西将军,谥号为孝。', + wangfuzhaolei:'王甫(?—222年),字国山,广汉郪(今四川三台县)人,三国时期蜀汉重臣。刘璋时,为益州书佐,之后归降刘备,先后担任绵竹令、荆州议曹从事,并在夷陵之战中阵亡。其子王祐,官至尚书右选郎。赵累,蜀汉大将关羽部下都督。后来吴将吕蒙袭取荆州,赵累被吴将潘璋等在临沮擒获。', + wangling:'王凌(172年~251年6月15日),字彦云,太原郡祁县(今山西省祁县)人,三国时期曹魏将领,东汉司徒王允之侄。王凌出身太原王氏祁县房。举孝廉出身,授发干县令,迁中山太守。颇有政绩,迁司空(曹操)掾属。魏文帝曹丕即位,拜散骑常侍、兖州刺史。参加洞口之战,跟从张辽击败吴将吕范,加号建武将军,封宜城亭侯。太和二年(228年),王凌参与石亭之战,跟从曹休征伐东吴,力挽狂澜,历任扬豫二州刺史,治境有方。齐王曹芳继位,拜征东将军,联合孙礼击败吴将全琮,进封南乡侯,授车骑将军、仪同三司,正始九年(248年),代高柔为司空。嘉平元年(249年),代蒋济为太尉。嘉平三年(251年),不满太傅司马懿专擅朝政,联合兖州刺史令狐愚谋立楚王曹彪为帝,事泄自尽,时年八十岁,夷灭三族。', + wujing:'吴景,本吴郡吴县(今江苏苏州)人,后迁居吴郡钱塘(今浙江杭州),孙坚妻子吴夫人(武烈皇后)之弟,孙策和孙权的舅舅,东汉末年将领。吴景因追随孙坚征伐有功,被任命为骑都尉。袁术上表举荐吴景兼任丹杨太守,讨伐前任太守周昕,占据丹杨。后遭扬州刺史刘繇逼迫,再度依附袁术,袁术任用他为督军中郎将,与孙贲共同进击樊能等人。又在秣陵攻打笮融、薛礼。袁术与刘备争夺徐州时,任吴景为广陵太守。建安二年(197年),吴景放弃广陵东归孙策,孙策任他为丹杨太守。朝廷使者吴景为扬武将军,郡守之职照旧。建安八年(203年),吴景死于任上。', + feiyi:'费祎(?~253年2月),字文伟,江夏鄳县(今河南省罗山县)人,三国时期蜀汉名臣,与诸葛亮、蒋琬、董允并称为蜀汉四相。深得诸葛亮器重,屡次出使东吴,孙权、诸葛恪、羊茞等人以辞锋刁难,而费祎据理以答,辞义兼备,始终不为所屈。孙权非常惊异于他的才能,加以礼遇。北伐时为中护军,又转为司马。当时魏延与杨仪不和,经常争论,费祎常为二人谏喻,两相匡护,以尽其用。诸葛亮死后,初为后军师,再为尚书令,官至大将军,封成乡侯。费祎主政时,与姜维北伐的主张相左,执行休养生息的政策,为蜀汉的发展尽心竭力。费祎性格谦恭真诚,颇为廉洁,家无余财。后为魏降将郭循(一作郭脩)行刺身死。葬于今广元市昭化古城城西。', + luotong:'骆统(193年-228年),字公绪。会稽郡乌伤县(今浙江义乌)人。东汉末年至三国时期吴国将领、学者,陈国相骆俊之子。骆统二十岁时已任乌程国相,任内有政绩,使得国中民户过万。又迁为功曹,行骑都尉。曾劝孙权尊贤纳士,省役息民。后出任为建忠中郎将。将军凌统逝世后,统领其部曲。因战功迁偏将军,封新阳亭侯,任濡须督。黄武七年(228年),骆统去世,年仅三十六岁。有集十卷,今已佚。', + + }, + characterTitle:{ + }, + card:{ + binglinchengxiax:{ + enable:true, + type:'trick', + derivation:'sp_xunchen', + fullskin:true, + filterTarget:lib.filter.notMe, + content:function(){ + 'step 0' + if(!player.isIn()||!target.isIn()){ + event.finish(); + return; + } + event.showCards=get.cards(4); + game.cardsGotoOrdering(event.showCards); + player.showCards(event.showCards); + 'step 1' + if(player.isIn()&&target.isIn()&&event.showCards.length){ + for(var i of event.showCards){ + if(i.name=='sha'&&player.canUse(i,target,false)){ + player.useCard(i,target,false); + event.showCards.remove(i); + event.redo(); + break; + } + } + } + 'step 2' + if(event.showCards.length){ + while(event.showCards.length) ui.cardPile.insertBefore(event.showCards.pop().fix(),ui.cardPile.firstChild); + game.updateRoundNumber(); + } + }, + ai:{ + basic:{ + useful:4, + value:3, + }, + order:4, + result:{ + target:function(player,target,card,isLink){ + if(get.effect(target,{name:'sha'},player,target)==0) return 0; + return -2.5; + }, + }, + tag:{ + respond:1, + respondShan:1, + damage:1, + } + } + }, + tiaojiyanmei:{ + enable:true, + type:'trick', + derivation:'feiyi', + fullskin:true, + filterTarget:function(card,player,target){ + var targets=[]; + if(ui.selected.targets.length) targets.addArray(ui.selected.targets); + var evt=_status.event.getParent('useCard'); + if(evt&&evt.card==card) targets.addArray(evt.targets); + if(targets.length){ + var hs=target.countCards('h'); + for(var i of targets){ + if(i.countCards('h')!=hs) return true; + } + return false; + } + return true; + }, + chongzhu:true, + selectTarget:2, + postAi:()=>true, + contentBefore:function(){ + if(!targets.length) return; + var map={}; + event.getParent().customArgs.default.tiaojiyanmei_map=map; + var average=0; + for(var target of targets){ + var hs=target.countCards('h'); + map[target.playerid]=hs; + average+=hs; + } + map.average=(average/targets.length); + }, + content:function(){ + var map=event.tiaojiyanmei_map,num1=map.average,num2=map[target.playerid]; + if(typeof num2!='number') num2=target.countCards('h'); + if(num2>num1) target.chooseToDiscard('he',true); + else if(num2num1){ + if(target.countCards('e',function(card){ + return get.value(card)<=0; + })) return 1; + return -1; + } + if(num2average){ + if(target.countCards('e',function(card){ + return get.value(card)<=0; + })) return 1; + return -0.5; + } + return 0; + } + average/=targets.length; + if(thaverage){ + if(target.countCards('e',function(card){ + return get.value(card)<=0; + })) return 1; + return -1; + } + return 0; + }, + }, + }, + }, + }, + characterFilter:{ + }, + dynamicTranslate:{ + }, + perfectPair:{ + wujing:['sunce','sunben','wuguotai'], + }, + characterReplace:{ + wangcan:['tw_wangcan','wangcan','sp_wangcan'], + sunshao:['sp_sunshao','sunshao'], + xunchen:['re_xunchen','xunchen','tw_xunchen','sp_xunchen'], + xinpi:['xinpi','sp_xinpi'], + duyu:['duyu','dc_duyu','sp_duyu','pk_sp_duyu'], + zhangwen:['sp_zhangwen','zhangwen'], + ol_bianfuren:['ol_bianfuren','tw_bianfuren','sp_bianfuren'], + wangshuang:['wangshuang','sp_wangshuang'], + huaman:['huaman','sp_huaman'], + gaolan:['dc_gaolan','gaolan','sp_gaolan'], + cuiyan:['sp_cuiyan','cuiyan'], + wujing:['tw_wujing','wujing'], + zhouchu:['jin_zhouchu','zhouchu','tw_zhouchu'], + liuzhang:['liuzhang','tw_liuzhang'], + chenzhen:['tw_chenzhen','sp_chenzhen'], + feiyi:['tw_feiyi','feiyi'], + wangling:['tw_wangling','wangling'], + qiaogong:['tw_qiaogong','qiaogong'], + sp_chendong:['tw_chendong','sp_chendong','chendong'], + sp_jiangqing:['tw_jiangqing','sp_jiangqing','jiangqing'], + kongrong:['sp_kongrong','jsrg_kongrong','kongrong'], + mifuren:['dc_mifuren','sp_mifuren'], + }, + translate:{ + sp_wangcan:'手杀王粲', + spqiai:'七哀', + spqiai_info:'出牌阶段限一次,你可以将一张非基本牌交给一名其他角色。然后其选择一项:①你回复1点体力。②你摸两张牌。', + spshanxi:'善檄', + spshanxi_suoming:'善檄', + spshanxi_info:'出牌阶段开始时,你可令一名其他角色获得“檄”标记并清除场上已有的其他“檄”标记(若有)。有“檄”标记的角色回复体力时,若其体力值大于0,则其需选择一项:①交给你两张牌。②失去1点体力。', + sp_chenzhen:'陈震', + shameng:'歃盟', + shameng_info:'出牌阶段限一次,你可弃置两张颜色相同的手牌并选择一名其他角色。其摸两张牌,然后你摸三张牌。', + sp_sunshao:'手杀孙邵', + fubi:'辅弼', + fubi2:'辅弼', + fubi_info:'游戏开始时,你可选择一名其他角色。该角色的手牌上限于你死亡前+3。', + zuici:'罪辞', + zuici_info:'当你进入濒死状态时,你可废除你的一个不为空的装备栏,然后将体力值回复至1点。', + sp_xunchen:'手杀荀谌', + jianzhan:'谏战', + jianzhan_info:'出牌阶段限一次,你可选择一名其他角色A和其攻击范围内的另一名手牌数小于其的角色B。A选择一项:①视为对B使用一张【杀】。②令你摸一张牌。', + duoji:'夺冀', + duoji_info:'限定技,出牌阶段,你可弃置两张手牌并选择一名装备区有牌的其他角色。你获得其装备区里的所有牌。', + binglinchengxiax:'兵临城下', + binglinchengxiax_info:'出牌阶段,对一名其他角色使用。你展示牌堆顶的四张牌,依次对其使用其中所有的【杀】,然后将剩余的牌置于牌堆顶。', + mjweipo:'危迫', + mjweipo_effect:'危迫', + mjweipo_remove:'危迫', + mjweipo_info:'出牌阶段限一次。你可以选择一个智囊或【兵临城下】,令一名没有〖危迫〗效果的角色获得如下一次性效果直到你下回合开始:其可于出牌阶段弃置一张【杀】,并获得一张你选择的牌。', + mjchenshi:'陈势', + mjchenshi_player:'陈势', + mjchenshi_target:'陈势', + mjchenshi_info:'当有角色使用【兵临城下】指定第一个目标后,其可交给你一张牌,并将牌堆的顶三张牌中所有不为【杀】的牌置入弃牌堆;当有角色成为【兵临城下】的目标后,其可交给你一张牌,然后将牌堆顶三张牌中所有的【杀】置入弃牌堆。', + mjmouzhi:'谋识', + mjmouzhi_info:'锁定技,当你受到伤害时,若伤害渠道对应的牌和你上次受到的伤害花色相同,则你防止此伤害。', + luotong:'手杀骆统', + qinzheng:'勤政', + qinzheng_info:'锁定技,当你使用或打出牌时,若你本局游戏内使用或打出过的牌数和:为3的倍数,你从牌堆中获得一张【杀】或【闪】;为5的倍数,你从牌堆中获得一张【桃】或【酒】;为8的倍数,你从牌堆中获得一张【决斗】或【无中生有】(可获得对应的衍生替换牌)。', + sp_duyu:'手杀杜预', + spwuku:'武库', + spwuku_info:'锁定技,当有角色使用装备牌时,若你的“武库”数小于3,则你获得一个“武库”。', + spwuku_info_guozhan:'锁定技,当有其他势力的角色使用装备牌时,若你的“武库”数小于2,则你获得一个“武库”。', + spsanchen:'三陈', + spsanchen_info:'觉醒技,结束阶段,若你的“武库”数大于2,则你加1点体力上限并回复1点体力,然后获得〖灭吴〗。', + spmiewu:'灭吴', + spmiewu2:'灭吴', + spmiewu_backup:'灭吴', + spmiewu_info:'每回合限一次。你可弃置一枚“武库”并将一张牌当做任意基本牌或锦囊牌使用,然后摸一张牌。', + sp_bianfuren:'手杀卞夫人', + spwanwei:'挽危', + spwanwei_info:'每轮累计限一次。①出牌阶段,你可选择一名其他角色。②当有其他角色处于濒死状态时。你可令该角色回复X+1点体力(至少回复至1),然后你失去X点体力。(X为你的体力值)', + spyuejian:'约俭', + spyuejian_info:'锁定技,你的手牌上限基数等于你的体力上限。当你处于濒死状态时,你可弃置两张牌,然后回复1点体力。', + feiyi:'费祎', + reshengxi:'生息', + reshengxi_info:'结束阶段,若你于本回合内未造成过伤害,则你可摸两张牌。', + fyjianyu:'谏喻', + fyjianyu_info:'每轮限一次。出牌阶段,你可选择两名角色,令这些角色获得“喻”直到你的下回合开始。当一名有“喻”的角色A使用牌指定另一名有“喻”的角色B为目标时,你令B摸一张牌。', + fyjianyux:'谏喻', + mjshengxi:'生息', + mjshengxi_info:'准备阶段,你可以获得一张【调剂盐梅】;结束阶段,若你本回合使用过牌且未造成伤害,则你可以获得一张智囊。', + mjkuanji:'宽济', + mjkuanji_info:'每回合限一次。当你因弃置而失去牌后,你可令一名其他角色获得其中的一张牌,然后你摸一张牌。', + tiaojiyanmei:'调剂盐梅', + tiaojiyanmei_info:'出牌阶段,对两名手牌数不均相同的其他角色使用。若目标角色于此牌使用准备工作结束时的手牌数大于此时所有目标的平均手牌数,其弃置一张牌。若小于则其摸一张牌。此牌使用结束后,若所有目标角色的手牌数均相等,则你可令一名角色获得所有因执行此牌效果而弃置的牌。', + refubi:'辅弼', + refubi_info:'游戏开始时,你可令一名其他角色获得“辅弼”标记。有“辅弼”标记的角色的准备阶段开始时,你可选择一项:①令其本回合使用【杀】的次数上限+1。②令其本回合的手牌上限+3。', + rezuici:'罪辞', + rezuici_backup:'罪辞', + rezuici_info:'出牌阶段,或当你处于濒死状态时,你可以废除一个有牌的装备栏并回复2点体力,然后可以移动“辅弼”标记。', + mjdingyi:'定仪', + mjdingyi_info:'游戏开始时,你选择一个效果(相同效果不可叠加)并令全场角色获得之:①摸牌阶段额定摸牌数+1。②手牌上限+2。③攻击范围+1。④脱离濒死状态时回复1点体力。', + mjzuici:'罪辞', + mjzuici_info:'当你受到伤害后,你可令伤害来源失去〖定仪〗效果,然后令其从牌堆中获得一张由你选择的智囊。', + mjfubi:'辅弼', + mjfubi_info:'每轮限一次。出牌阶段,你可选择一项:①更换一名角色的〖定仪〗效果。②弃置一张牌并令一名角色的〖定仪〗效果翻倍直到你的下回合开始。', + wujing:'吴景', + heji:'合击', + heji_info:'当有角色使用的【决斗】或红色【杀】结算完成后,若此牌对应的目标数为1,则你可以对相同的目标使用一张【杀】或【决斗】(无距离和次数限制)。若你以此法使用的牌不为转化牌,则你从牌堆中随机获得一张红色牌。', + liubing:'流兵', + liubing_info:'锁定技。①当你声明使用【杀】后,若此牌是你本回合使用的第一张有唯一对应实体牌的【杀】,则你将此牌的花色改为♦。②其他角色于其出牌阶段内使用的非转化黑色杀结算结束后,若此【杀】未造成伤害,则你获得之。', + sp_mifuren:'手杀糜夫人', + spcunsi:'存嗣', + spcunsi2:'存嗣', + spcunsi_info:'出牌阶段限一次,你可将武将牌翻至背面并选择一名其他角色。其从牌堆或弃牌堆中获得一张【杀】,且下一张杀的伤害值基数+1。', + spguixiu:'闺秀', + spguixiu_info:'锁定技,当你受到伤害后,若你的武将牌背面朝上,则你将武将牌翻至正面。当你的武将牌从背面翻至正面时,你摸一张牌。', + qingyu:'清玉', + qingyu_info:'使命技。①当你受到伤害时,你弃置两张牌,然后防止此伤害。②使命:准备阶段,若你的体力值等于体力上限且你没有手牌,则你获得〖悬存〗。③失败:当你进入濒死状态时,你减1点体力上限。', + xuancun:'悬存', + xuancun_info:'其他角色的回合结束时,若你的手牌数小于体力值,则你可以令其摸X张牌(X为你的体力值与手牌数之差且至多为2)', + xinlirang:'礼让', + xinlirang_info:'①其他角色的摸牌阶段开始时,若你没有“谦”标记,则你可以获得一枚“谦”标记。若如此做,其额定摸牌数+2,且本回合的弃牌阶段开始时,你可以获得其弃置的至多两张牌。②摸牌阶段开始时,若你有“谦”标记,则你跳过此摸牌阶段并移除“谦”标记。', + xinmingshi:'名仕', + xinmingshi_info:'锁定技,当你受到伤害后,若你有“谦”标记,则伤害来源弃置一张牌。若此牌为:黑色:你获得之。红色,你回复1点体力。', + sp_xinpi:'手杀辛毗', + spyinju:'引裾', + spyinju2:'引裾', + spyinju_info:'出牌阶段限一次,你可令一名其他角色选择一项:①对你使用一张【杀】(无距离限制)。②其下个回合的准备阶段开始时,跳过出牌阶段和弃牌阶段。', + spchijie:'持节', + spchijie_info:'每回合限一次。当你成为其他角色使用牌的唯一目标时,你可判定。若结果大于6,则你取消此牌的所有目标。', + reduoji:'夺冀', + reduoji_info:'出牌阶段限一次,你可将一张牌置于其他角色的武将牌上,称为“冀”。当有装备牌因使用而进入一名角色的装备区后,若该角色有“冀”且其为使用者,则你获得此装备牌,其移去一个“冀”并摸一张牌。一名其他角色的回合结束后,若其有“冀”,则你获得其的所有“冀”。', + wangling:'王凌', + mouli:'谋立', + mouli_info:'出牌阶段限一次,你可以将一张手牌交给一名其他角色,其获得如下效果直到你的下回合开始:其可以将黑色牌当做【杀】,红色牌当做【闪】使用。其第一次触发“使用【杀】/【闪】结算完成后”的时机时,你摸三张牌。', + zifu:'自缚', + zifu_info:'锁定技,当有角色死亡时,若其因你获得的“谋立”效果未过期,则你减2点体力上限。', + xingqi:'星启', + xingqi_info:'①当你使用牌时,若此牌不为延时锦囊牌且你没有同名的“备”,则你获得一枚与此牌名称相同的“备”。②结束阶段,你可移去一枚“备”,然后从牌堆中获得一张与此“备”名称相同的牌。', + xinzifu:'自缚', + xinzifu_info:'锁定技。出牌阶段结束时,若你本阶段内未使用牌,则你移去所有“备”且本回合的手牌上限-1。', + mibei:'秘备', + mibei_info:'使命技。①使命:当你使用的牌结算完成后,若你的“备”中包含的基本牌,锦囊牌,装备牌数量均大于1,则你从牌堆中获得这三种类型的牌各一张并获得技能“谋立”。②失败:结束阶段开始时,若你没有“备”,且你于本回合的准备阶段开始时也没有“备”,则你减1点体力上限。', + xinmouli:'谋立', + xinmouli_info:'出牌阶段限一次,你可以指定一名其他角色。其移去你的一个“备”,然后从牌堆中获得一张与此“备”名称相同的牌。', + wangfuzhaolei:'王甫赵累', + xunyi:'殉义', + xunyi2:'殉义', + xunyi3:'殉义', + xunyi_info:'游戏开始时,或当上一个拥有“殉义”效果的角色死亡后,你可以选择一名角色获得如下效果:当其/你对二者之外的角色造成伤害后,你/其摸一张牌;当其/你受到二者之外的角色造成的伤害后,你/其弃置一张牌。', + zhouchu:'手杀周处', + xianghai:'乡害', + xianghai_info:'锁定技,其他角色的手牌上限-1。你手牌区的装备牌均视为【酒】。', + chuhai:'除害', + chuhai_info:'出牌阶段限一次,你可以摸一张牌,然后和一名其他角色拼点。若你赢,则你观看其手牌,并从牌堆/弃牌堆中获得其手牌中包含的类型的牌各一张,且当你于此阶段内对其造成伤害后,你将牌堆/弃牌堆中的一张装备牌置于你的一个空置装备栏内。', + rechuhai:'除害', + rechuhai_info:'使命技。①出牌阶段限一次,你可以摸一张牌,然后和一名其他角色拼点。若你赢,则你观看其手牌,并从牌堆/弃牌堆中获得其手牌中包含的类型的牌各一张,且当你于此阶段内对其造成伤害后,你将牌堆/弃牌堆中的一张装备牌置于你的一个空置装备栏内。②当你因发动〖除害①〗而展示拼点牌时,你令此牌的点数+X(X=(4-你装备区的牌数))。③使命:当有装备牌进入你的装备区后,若你的装备区内有至少三张牌,则你将体力值回复至上限,失去〖乡害〗并获得〖彰名〗。④失败:当你因发动〖除害①〗发起的拼点没赢时,若你的最终点数不大于6,则你触发使命失败分支。', + zhangming:'彰名', + zhangming_info:'锁定技。①你使用的♣牌不能被其他角色响应。②每回合限一次,当你对其他角色造成伤害后,你随机弃置其一张手牌,然后你从牌堆或弃牌堆中获得与其展示牌类型不同类型的牌各一张(若其没有手牌,则你改为从牌堆或弃牌堆中获得所有类型牌各一张),且以此法获得的牌不计入本回合的手牌上限。', + sp_kongrong:'孔融', + spmingshi:'名士', + spmingshi_info:'锁定技,当你受到1点伤害后,伤害来源弃置一张牌。', + splirang:'礼让', + splirang_info:'出牌阶段限一次,你可以弃置所有手牌,然后将其中的至多X张牌交给一名其他角色(X为你的体力值),之后摸一张牌。', + caizhenji:'蔡贞姬', + sheyi:'舍裔', + sheyi_info:'每轮限一次。当有体力值小于你的其他角色受到伤害时,你可以交给其至少X张牌并防止此伤害(X为你的体力值)。', + tianyin:'天音', + tianyin_info:'锁定技,结束阶段开始时,你从牌堆中获得每种本回合未使用过的类型的牌各一张。', + xiangchong:'向宠', + guying:'固营', + guying_info:'锁定技。每回合限一次,当你于回合外因使用/打出/弃置而失去牌后,若牌数为1,则你获得一枚“固”并令当前回合角色选择一项:①随机交给你一张牌。②令你获得本次失去的牌,若为装备牌,则你使用之。准备阶段开始时,你移去所有“固”并弃置等量的牌。', + muzhen:'睦阵', + muzhen_backup:'睦阵', + muzhen_info:'出牌阶段各限一次。①你可以将两张牌交给一名装备区内有牌的其他角色,然后获得其装备区内的一张牌。②你可以将装备区内的一张牌置于其他角色的装备区内,然后获得其一张手牌。', + sp_huaxin:'手杀华歆', + hxrenshi:'仁仕', + hxrenshi_info:'出牌阶段每名角色限一次。你可以将一张手牌交给一名其他角色。', + debao:'德保', + debao_info:'锁定技,当其他角色获得你的牌后,若你的“仁”数小于你的体力上限,则你将牌堆顶的一张牌置于你的武将牌上,称为“仁”。准备阶段,你获得所有“仁”。', + buqi:'不弃', + buqi_info:'锁定技,当有角色进入濒死状态时,若你的“仁”数大于1,则你移去两张“仁”并令其回复1点体力。一名角色死亡后,你将所有“仁”置入弃牌堆。', + yuanqing:'渊清', + yuanqing_info:'锁定技,出牌阶段结束时,你随机将弃牌堆中你本阶段使用过的牌类型的各一张牌置于仁库中。', + shuchen:'疏陈', + shuchen_info:'锁定技,当有角色进入濒死状态时,若仁库中的牌数大于三,则你获得仁库中的所有牌,然后其回复1点体力。', + sp_xujing:'手杀许靖', + boming:'博名', + boming_info:'出牌阶段限两次,你可以将一张牌交给一名其他角色。结束阶段,若你本回合以此法失去了两张以上的牌,则你摸一张牌。', + ejian:'恶荐', + ejian_info:'锁定技,每名角色限一次。当有其他角色因〖博名〗而获得了你的牌后,若其拥有与此牌类型相同的其他牌,则你令其选择一项:①受到1点伤害。②展示所有手牌,并弃置所有与此牌类别相同的牌。', + zhangzhongjing:'张机', + jishi:'济世', + jishi_info:'锁定技。①当你使用的牌结算完成后,若你未因此牌造成过伤害,则你将此牌对应的所有实体牌置于仁库中。②当有牌不因溢出而离开仁库时,你摸一张牌。', + liaoyi:'疗疫', + liaoyi_info:'其他角色的回合开始时,若其:①手牌数小于体力值且仁库内牌数大于等于X,则你可令其从仁库中获得X张牌;②手牌数大于体力值,则你可以令其将X张牌置于仁库中(X为其手牌数与体力值之差且至多为4)。', + xinliaoyi:'疗疫', + xinliaoyi_info:'其他角色的回合开始时,你可选择一项:①令其从仁库中获得一张牌。②若其手牌数大于体力值,则令其将X张手牌置入仁库(X为其手牌数与体力值之差)。', + binglun:'病论', + binglun_info:'出牌阶段限一次,你可以将仁库中的一张牌置于弃牌堆并选择一名角色。该角色选择一项:①摸一张牌。②于其下回合结束时回复1点体力。', + sp_zhangwen:'手杀张温', + gebo:'戈帛', + gebo_info:'锁定技,当有角色回复体力后,你将牌堆顶的一张牌置入仁库。', + spsongshu:'颂蜀', + spsongshu_info:'其他角色的摸牌阶段开始时,若其体力值大于你且仁库内有牌,则你可以令其放弃摸牌。其改为获得X张仁(X为你的体力值且至多为5),且本回合内不能使用牌指定其他角色为目标。', + liuzhang:'刘璋', + xiusheng:'休生', + xiusheng_info:'锁定技。准备阶段,你将所有“生”置入弃牌堆,然后摸X张牌,并将等量的牌置于武将牌上,称为“生”(X为你因〖引狼〗而选择的势力的存活角色数)。', + yinlang:'引狼', + yinlang_info:'①每轮限一次。回合开始时,你选择场上的一个势力。②一名角色的出牌阶段开始时,若其势力与你选择的势力相同,则其选择一项:1.获得你的一张“生”,然后其本回合使用牌时不能指定你以外的角色为目标。2.你获得一张“生”。', + huaibi:'怀璧', + huaibi_info:'主公技,锁定技。你的手牌上限+X(X为你因〖引狼〗而选择的势力的存活角色数)。', + jutu:'据土', + jutu_info:'锁定技,准备阶段,你获得所有你武将牌上的“生”,然后摸X+1张牌,然后将X张牌置于你的武将牌上,称为“生”(X为你因〖邀虎〗选择势力的角色数量)。', + yaohu:'邀虎', + yaohu_info:'每轮限一次,你的回合开始时,你须选择场上一个势力。该势力其他角色的出牌阶段开始时,其获得你的一张“生”,然后其须选择一项:①对你指定的另一名的其他角色使用一张【杀】(无距离和次数限制);②交给你两张牌。', + rehuaibi:'怀璧', + rehuaibi_info:'主公技,锁定技,你的手牌上限+X(X为你因〖邀虎〗选择势力的角色数量)。', + qiaogong:'桥公', + yizhu:'遗珠', + yizhu_info:'①结束阶段,你摸两张牌,然后将两张牌随机插入牌堆前2X张牌的位置中(X为角色数,选择牌的牌名对其他角色可见)。②当有其他角色使用“遗珠”牌指定唯一目标时,你可清除对应的“遗珠”标记并取消此目标,然后你可使用此牌。③当有“遗珠”牌进入弃牌堆后,你摸一张牌并清除对应的“遗珠”标记。', + luanchou:'鸾俦', + luanchou_info:'出牌阶段限一次,你可令两名角色获得“姻”标记并清除原有标记。拥有“姻”标记的角色视为拥有技能〖共患〗。', + gonghuan:'共患', + gonghuan_info:'锁定技。每回合限一次,一名其他角色受到伤害时,若其拥有“姻”标记且其体力值小于你,则你将伤害转移给自己。此伤害结算结束后,你与其移去“姻”标记。', + sp_yanghu:'手杀羊祜', + mingfa:'明伐', + mingfa_info:'①结束阶段,你可展示一张牌并记录为“明伐”。②出牌阶段开始时,若“明伐”牌在你的手牌区或装备区,则你可以使用“明伐”牌与一名其他角色拼点。若你赢:你获得对方一张牌并从牌堆中获得一张点数等于“明伐”牌牌面点数-1的牌。若你没赢:你本回合不能使用牌指定其他角色为目标。③你的拼点牌亮出后,你令此牌的点数+2。', + rongbei:'戎备', + rongbei_info:'限定技。出牌阶段,你可选择一名有空装备栏的角色。系统为该角色的每个空装备栏选择一张装备牌,然后该角色使用之。', + db_wenyang:'文鸯', + dbquedi:'却敌', + dbquedi_info:'每回合限一次。当你使用【杀】或【决斗】指定唯一目标后,你可选择:①获得目标角色的一张手牌。②弃置一张基本牌,并令此牌的伤害值基数+1。③背水:减1点体力上限,然后依次执行上述所有选项。', + dbzhuifeng:'椎锋', + dbzhuifeng_info:'魏势力技。每回合限两次,你可以失去1点体力并视为使用一张【决斗】。当你因此【决斗】而受到伤害时,你防止此伤害并令此技能失效直到出牌阶段结束。', + dbchongjian:'冲坚', + dbchongjian_backup:'冲坚', + dbchongjian_info:'吴势力技。你可以将一张装备牌当做一种【杀】(无距离限制且无视防具)或【酒】使用。当你以此法使用【杀】造成伤害后,你获得目标角色装备区内的X张牌(X为伤害值)。', + dbchoujue:'仇决', + dbchoujue_info:'锁定技。当你杀死其他角色后,你加1点体力上限并摸两张牌,然后本回合发动【却敌】的次数上限+1。', + sp_chendong:'陈武董袭', + spyilie:'毅烈', + spyilie_info:'出牌阶段开始时,你可选择:①本阶段内使用【杀】的次数上限+1。②本回合内使用【杀】被【闪】抵消时,摸一张牌。③背水:失去1点体力,然后依次执行上述所有选项。', + spfenming:'奋命', + spfenming_info:'出牌阶段限一次,你可以选择一名体力值不大于你的角色。若其:未横置,其横置;已横置,你获得其一张牌。', + yuanhuan:'袁涣', + qingjue:'请决', + qingjue_info:'每轮限一次。当有其他角色A使用牌指定另一名体力值小于A且不处于濒死状态的其他角色B为目标时,你可以摸一张牌,然后与A拼点。若你赢,你取消此目标。若你没赢,你将此牌的目标改为自己。', + fengjie:'奉节', + fengjie2:'奉节', + fengjie_info:'锁定技,准备阶段开始时,你选择一名其他角色并获得如下效果直到你下回合开始:一名角色的结束阶段开始时,你将手牌摸至(至多摸四张)或弃置至与其体力值相等。', + sp_zongyu:'手杀宗预', + zhibian:'直辩', + zhibian_info:'准备阶段,你可以和一名其他角色拼点。若你赢,你可选择:①将其装备区/判定区内的一张牌移动到你的对应区域。②回复1点体力。③背水:跳过下个摸牌阶段,然后依次执行上述所有选项;若你没赢,你失去1点体力。', + yuyan:'御严', + yuyan_info:'锁定技。当你成为非转换的【杀】的目标时,若使用者的体力值大于你且此【杀】有点数,则你令使用者选择一项:①交给你一张点数大于此【杀】的牌。②取消此目标。', + sp_wangshuang:'手杀王双', + yiyong:'异勇', + yiyong_info:'当你受到其他角色造成的渠道为【杀】的伤害后,若你的装备区内有武器牌,则你可以获得此【杀】对应的所有实体牌,然后将这些牌当做【杀】对伤害来源使用(无距离限制)。若其装备区内没有武器牌,则此伤害+1。', + shanxie:'擅械', + shanxie_info:'①出牌阶段限一次,你可从牌堆中获得一张武器牌。若牌堆中没有武器牌,则你改为随机获得一名角色装备区内的一张武器牌。②当其他角色使用【闪】响应你使用的【杀】时,若此【闪】没有点数或点数不大于你攻击范围的二倍,则你令此【闪】无效。', + shanxie_info_old:'①出牌阶段限一次,你可选择一项:⒈从牌堆中获得一张武器牌。⒉获得一名其他角色装备区内的一张武器牌并使用,然后其将一张手牌当做【杀】对你使用。②当其他角色使用【闪】响应你使用的【杀】时,若此【闪】没有点数或点数不大于你攻击范围的二倍,则你令此【闪】无效。', + sunyi:'手杀孙翊', + zaoli:'躁厉', + zaoli_info:'锁定技。①你不能于回合内使用你手牌中不为本回合获得的牌。②当你使用或打出手牌时,你获得一个“厉”(至多4个)。③回合开始时,若你有“厉”,则你移去所有“厉”并弃置任意张牌,然后摸X+Y张牌。若X大于2,你失去1点体力(X为你移去的标记数,Y为你弃置的牌数)。', + sp_gaolan:'手杀高览', + spjungong:'峻攻', + spjungong_info:'出牌阶段,你可失去X+1点体力或弃置X+1张牌,视为对一名其他角色使用【杀】(不计入次数和距离限制,X为你本回合内发动过〖等力〗的次数)。若你因此【杀】造成了伤害,则你令此技能失效直到回合结束。', + spdengli:'等力', + spdengli_info:'当你使用【杀】指定目标后,或成为【杀】的目标后,若使用者和目标的体力值相等,则你摸一张牌。', + sp_huaman:'手杀花蔓', + spxiangzhen:'象阵', + spxiangzhen_info:'锁定技。①【南蛮入侵】对你无效。②当有角色使用的【南蛮入侵】结算结束后,若有角色因此牌受到过伤害,则你和使用者各摸一张牌。', + spfangzong:'芳踪', + spfangzong_info:'锁定技。若你于当前回合内未发动过〖嬉战〗选择过选项二,则:①你不能于回合内使用具有伤害标签的牌指定攻击范围内的角色为目标。②攻击范围内包含你的角色不能使用具有伤害标签的牌指定你为目标。③结束阶段,你将手牌摸至X张(X为场上存活人数且至多为8)', + spxizhan:'嬉战', + spxizhan_info:'其他角色的回合开始时,你须选择一项:①失去1点体力。②弃置一张牌。然后若此牌的花色为:♠,其视为使用一张【酒】;♥,你视为使用一张【无中生有】;♣,你视为对其使用【铁索连环】;♦:你视为对其使用火【杀】(无距离限制)。', + sp_cuiyan:'手杀崔琰', + spyajun:'雅俊', + spyajun_info:'①摸牌阶段,你令额定摸牌数+1。②出牌阶段开始时,你可以用一张本回合获得的牌与其他角色拼点。若你赢,则你可将其中一张拼点牌置于牌堆顶。若你没赢,你本回合的手牌上限-1。', + spzundi:'尊嫡', + spzundi_info:'出牌阶段限一次,你可以弃置一张手牌并选择一名角色,然后你进行判定。若结果为:黑色,其摸三张牌;红色,其可以移动场上的一张牌。', + sp_zhangchangpu:'手杀张昌蒲', + spdifei:'抵诽', + spdifei_info:'锁定技。每回合限一次,当你受到伤害后,你摸一张牌或弃置一张手牌,然后展示所有手牌。若此伤害的渠道为没有花色的牌或你的手牌中没有与此牌花色相同的牌,则你回复1点体力。', + spyanjiao:'严教', + spyanjiao_info:'出牌阶段限一次。你可以将手牌中一种花色的所有牌交给一名其他角色,对其造成1点伤害。然后你于自己的下回合开始时摸等量的牌。', + sp_jiangwan:'蒋琬', + spzhenting:'镇庭', + spzhenting_info:'每回合限一次。当你攻击范围内的角色成为【杀】或延时锦囊的目标时,若你不是此牌的使用者且不是此牌的目标,则你可以将此目标改为自己。然后你选择一项:①弃置使用者的一张手牌。②摸一张牌。', + spjincui:'尽瘁', + spjincui_info:'限定技。出牌阶段,你可以和一名其他角色交换位置,然后失去X点体力(X为你的体力值)。', + sp_jiangqing:'蒋钦', + spjianyi:'俭衣', + spjianyi_info:'锁定技。其他角色的回合结束时,若弃牌堆中有于本回合内因弃置而进入弃牌堆的防具牌,则你获得其中一张。', + spshangyi:'尚义', + spshangyi_info:'出牌阶段限一次。你可以弃置一张牌并选择一名其他角色。其观看你的手牌,然后你观看其手牌并获得其中的一张。', + sp_lvfan:'吕范', + spdiaodu:'调度', + spdiaodu_info:'准备阶段,你可令一名角色摸一张牌,然后移动其装备区内的一张牌。', + spdiancai:'典财', + spdiancai_info:'其他角色的结束阶段开始时,你可以令至多X名角色各摸一张牌(X为你本回合失去的手牌数)。', + spyanji:'严纪', + spyanji_info:'出牌阶段开始时,你可以进行“整肃”。', + sp_huangfusong:'手杀皇甫嵩', + spzhengjun:'整军', + spzhengjun_info:'①出牌阶段开始时,你可进行“整肃”。②当你因整肃而摸牌或回复体力后,你可令一名其他角色选择摸两张牌或回复1点体力。', + spshiji:'势击', + spshiji_info:'当你对其他角色造成属性伤害时,若你的手牌数不为全场唯一最多,则你可以观看其手牌。你令其弃置其中的所有红色牌,然后摸等量的牌。', + sptaoluan:'讨乱', + sptaoluan_info:'每回合限一次。一名角色的判定结果确定时,若结果的花色为♠,则你可以终止导致此判定发生的上级事件。然后选择一项:①获得判定牌对应的实体牌。②视为对判定角色使用一张火【杀】(无距离和次数限制)', + sp_zhujun:'手杀朱儁', + yangjie:'佯解', + yangjie_info:'出牌阶段限一次,你可以摸一张牌并和一名其他角色A拼点。当你以此法展示你的拼点牌时,你令此牌点数-X(X为你已损失的体力值)。若你没赢,则你可以令另一名其他角色B获得两张拼点牌,然后其视为对A使用一张火【杀】。', + zjjuxiang:'拒降', + zjjuxiang_info:'限定技。一名其他角色脱离濒死状态时,你可以对其造成1点伤害,然后摸X张牌(X为其体力上限且至多为5)。', + houfeng:'厚俸', + houfeng_info:'每轮限一次。一名其他角色的出牌阶段开始时,若其在你的攻击范围内,则你可以令其进行“整肃”。然后当其于本回合内因整肃而摸牌或回复体力后,你可选择摸两张牌或回复1点体力。', + liuba:'刘巴', + duanbi:'锻币', + duanbi_info:'出牌阶段限一次。若场上所有角色的手牌数之和大于角色数之和的二倍,则你可以令所有其他角色各弃置X张手牌(X为该角色手牌数的一半且向下取整且至多为3)。然后你可选择一名角色,令其随机获得三张以此法被弃置的牌。', + tongduo:'统度', + tongduo_info:'每回合限一次。当你成为其他角色使用牌的唯一目标后,你可令一名角色重铸一张牌。', + + + mobile_shijiren:'始计篇·仁', + mobile_shijizhi:'始计篇·智', + mobile_shijixin:'始计篇·信', + mobile_shijiyong:'始计篇·勇', + mobile_shijiyan:'始计篇·严', + } + }; +}); diff --git a/character/sp2.js b/character/sp2.js index 972e9d600..465099903 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -4,202 +4,64 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'sp2', connect:true, character:{ - dc_wuban:['male','shu',4,['dcyouzhan'],['clan:陈留吴氏','unseen']], - dc_duyu:['male','wei',3,['dcjianguo','dcdyqingshi'],['unseen']], - ganfurenmifuren:['female','shu',3,['dcchanjuan','dcxunbie']], - dc_ganfuren:['female','shu',3,['dcshushen','dcshenzhi']], - dc_mifuren:['female','shu',3,['dcguixiu','dccunsi']], - yue_caiwenji:['female','qun',3,['dcshuangjia','dcbeifen']], - wanglang:['male','wei',3,['regushe','rejici']], - ruanji:['male','wei',3,['dczhaowen','dcjiudun']], - wu_zhugeliang:['male','shu','4/7',['dcjincui','dcqingshi','dczhizhe']], + dc_wangjun:['male','qun',4,['dcmianyao','dcchangqu']], dc_jsp_guanyu:['male','wei',4,['new_rewusheng','dcdanji']], - duanqiaoxiao:['female','wei',3,['dccaizhuang','dchuayi']], - zhangjinyun:['female','shu',3,['dchuizhi','dcjijiao']], dc_mengda:['male','wei',4,['dclibang','dcwujie']], dc_zhangmancheng:['male','qun',4,['dclvecheng','dczhongji'],['unseen']], - huanfan:['male','wei',3,['dcjianzheng','dcfumou']], - mengyou:['male','qun',5,['hmmanyi','dcmanzhi'],['unseen']], - chentai:['male','wei',4,['dcctjiuxian','dcchenyong']], - dc_sunchen:['male','wu',4,['dczigu','dczuowei'],['unseen']], - sunyu:['male','wu',3,['dcquanshou','dcshexue'],['unseen']], - xizheng:['male','shu',3,['dcdanyi','dcwencan'],['unseen']], - liuchongluojun:['male','qun',3,['dcminze','dcjini']], - yuechen:['male','wei',4,['dcporui','dcgonghu'],['unseen']], - zhangkai:['male','qun',4,['dcxiangshu']], - dc_ruiji:['female','wu',4,['dcwangyuan','dclingyin','dcliying']], - zhoushan:['male','wu',4,['dcmiyun','dcdanying']], - zerong:['male','qun',4,['dccansi','dcfozong']], - gaoxiang:['male','shu',4,['dcchiying'],['unseen']], - xielingyu:['female','wu',3,['dcyuandi','dcxinyou']], - yuanyin:['male','qun',3,['dcmoshou','dcyunjiu'],['unseen']], - dongwan:['female','qun',3,['dcshengdu','dcxianjiao'],['unseen']], - zhangchu:['female','qun',3,['dcjizhong','dcrihui','dcguangshi']], - peiyuanshao:['male','qun',4,['dcmoyu'],['unseen']], - mengjie:['male','qun',3,['dcyinlu','dcyouqi']], //dc_fuwan:['male','qun',4,['dcmoukui']], - dc_yangbiao:['male','qun',3,['dczhaohan','dcjinjie','dcjue']], - dc_huojun:['male','shu',4,['dcgue','dcsigong']], guānning:['male','shu',3,['dcxiuwen','dclongsong']], - dc_sunhanhua:['female','wu',3,['dchuiling','dcchongxu']], - dc_sunziliufang:['male','wei',3,['dcqinshen','dcweidang']], - dc_tengfanglan:['female','wu',3,['dcluochong','dcaichen']], - yuantanyuanxiyuanshang:['male','qun',4,['dcneifa']], sunhuan:['male','wu',4,['dcniji'],['unseen']], - qiaorui:['male','qun',4,['dcaishou','dcsaowei']], - yanghong:['male','qun',3,['dcjianji','dcyuanmo']], - xianglang:['male','shu',3,['dckanji','dcqianzheng']], - qinlang:['male','wei',4,['dchaochong','dcjinjin']], - furongfuqian:['male','shu','4/6',['dcxuewei','dcyuguan']], - zhenghun:['male','wei',3,['dcqiangzhi','dcpitian']], - dc_zhaotongzhaoguang:['male','shu',4,['yizan_use','dcqingren','dclongyuan']], - dc_huanghao:['male','shu',3,['dcqinqing','huisheng','dccunwei']], - xuelingyun:['female','wei',3,['dcxialei','dcanzhi']], - liupi:['male','qun',4,['dcjuying']], - dc_wangyun:['male','qun',4,['dclianji','dcmoucheng'],['clan:太原王氏']], - dc_sp_jiaxu:['male','wei',3,['zhenlue','dcjianshu','dcyongdi']], - dc_zhouxuān:['male','wei',3,['dcwumei','dczhanmeng']], - leibo:['male','qun',4,['dcsilve','dcshuaijie']], - chengbing:['male','wu',3,['dcjingzao','dcenyu']], - dongguiren:['female','qun',3,['dclianzhi','dclingfang','dcfengying']], sunlang:['male','shu',4,['dctingxian','dcbenshi']], - yuanji:['female','wu',3,['dcfangdu','dcjiexing']], - zhujianping:['male','qun',3,['dcxiangmian','dctianji']], shiyi:['male','wu',3,['dccuichuan','dczhengxu']], - gongsundu:['male','qun',4,['dczhenze','dcanliao']], - zhaozhi:['male','shu',3,['dctongguan','dcmengjie']], dc_hujinding:['female','shu','3/6',['dcdeshi','dcwuyuan','huaizi']], - panghui:['male','wei',5,['dcyiyong']], - dc_yuejiu:['male','qun',4,['dccuijin']], liyixiejing:['male','wu',4,['dcdouzhen']], - chenjiao:['male','wei',3,['dcxieshou','dcqingyan','dcqizi']], - wanglie:['male','qun',3,['dcchongwang','dchuagui']], mushun:['male','qun',4,['dcjinjian','dcshizhao']], dc_zhaoyǎn:['male','wei',3,['dcfuning','dcbingji']], wangwei:['male','qun',4,['dcruizhan','dcshilie']], - dc_liuye:['male','wei',3,['dcpoyuan','dchuace']], - luyi:['female','qun',3,['dcyaoyi','dcfuxue']], - dingshangwan:['female','wei',3,['dcfengyan','dcfudao']], - chengui:['male','qun',3,['dcyingtu','dccongshi']], dc_huban:['male','wei',4,['dcchongyi']], - dc_huangquan:['male','shu',3,['dcquanjian','dctujue']], - yinfuren:['female','wei',3,['dcyingyu','dcyongbi']], - quanhuijie:['female','wu',3,['dchuishu','dcyishu','dcligong']], - dc_lvkuanglvxiang:['male','wei',4,['dcshuhe','dcliehou']], - dukui:['male','wei',3,['dcfanyin','dcpeiqi']], - dc_caiyang:['male','wei',4,['dcxunji','dcjiaofeng']], - zhangfen:['male','wu',4,['dcwanglu','dcxianzhu','dcchaixie']], - liuhui:['male','qun',4,['dcgeyuan','dcjieshu','dcgusuan']], - guanhai:['male','qun',4,['suoliang','qinbao']], - huzhao:['male','qun',3,['midu','xianwang']], niufu:['male','qun','4/7',['dcxiaoxi','xiongrao']], bianxi:['male','wei',4,['dunxi']], - xiahoulingnv:['female','wei',4,['fuping','weilie']], - dc_liuba:['male','shu',3,['dczhubi','dcliuzhuan']], - zhangxun:['male','qun',4,['suizheng']], - zongyu:['male','shu',3,['zyqiao','chengshang']], fengfang:['male','qun',3,['dcditing','dcbihuo']], - dc_wangchang:['male','wei',3,['dckaiji','dcpingxi'],['clan:太原王氏']], - zhaoang:['male','wei','3/4',['dczhongjie','dcsushou']], - dc_sunru:['female','wu',3,['xiecui','youxu']], - dc_jiling:['male','qun',4,['dcshuangren']], - caohua:['female','wei',3,['caiyi','guili']], - dc_liuyu:['male','qun',3,['dcsuifu','dcpijing']], qinyilu:['male','qun',3,['piaoping','tuoxian','chuaili']], - zhangxuan:['female','wu',4,['tongli','shezang']], - dc_yanghu:['male','wei',3,['dcdeshao','dcmingfa']], - dc_huangzu:['male','qun',4,['dcjinggong','dcxiaojuan']], - caimaozhangyun:['male','wei',4,['lianzhou','jinglan']], yanrou:['male','wei',4,['choutao','xiangshu']], - zhangyao:['female','wu',3,['yuanyu','xiyan']], - tenggongzhu:['female','wu',3,['xingchong','liunian']], - dc_huangchengyan:['male','qun',3,['dcjiezhen','dczecai','dcyinshi']], - laiyinger:['female','qun',3,['xiaowu','huaping']], - caomao:['male','wei','3/4',['qianlong','fensi','juetao','zhushi'],['zhu']], - dc_gaolan:['male','qun',4,['xizhen']], - guanning:['male','qun','3/7',['dunshi']], - tengyin:['male','wu',3,['chenjian','xixiu']], dc_zhuling:['male','wei',4,['dczhanyi']], - dc_luotong:['male','wu',3,['renzheng','jinjian']], - dc_jiben:['male','qun',3,['xunli','zhishi','lieyi']], licaiwei:['female','wei',3,['yijiao','qibie']], - mamidi:['male','qun','4/6',['bingjie','zhengding']], - re_fengfangnv:['female','qun',3,['tiqi','baoshu']], - wufan:['male','wu',4,['tianyun','wfyuyan']], yanfuren:['female','qun',3,['channi','nifu']], haomeng:['male','qun',7,['xiongmang']], - re_dengzhi:['male','shu',3,['jianliang','weimeng']], - fengxi:['male','wu',3,['yusui','boyan']], - re_miheng:['male','qun',3,['rekuangcai','reshejian']], - re_zhangbao:['male','qun',3,['xinzhoufu','xinyingbing']], - zhaoyan:['female','wu',3,['jinhui','qingman']], - re_sunyi:['male','wu',5,['syjiqiao','syxiongyi']], re_pangdegong:['male','qun',3,['heqia','yinyi']], - wangtao:['female','shu',3,['huguan','yaopei']], - wangyue:['female','shu',3,['huguan','mingluan']], - re_chendeng:['male','qun',3,['refuyuan','reyingshui','rewangzu']], - caojinyu:['female','wei',3,['yuqi','shanshen','xianjing']], hanmeng:['male','qun',4,['jieliang','quanjiu']], xinping:['male','qun',3,['fuyuan','zhongjie','yongdi']], - wanniangongzhu:['female','qun',3,['zhenge','xinghan']], - re_xunchen:['male','qun',3,['refenglve','anyong'],['clan:颍川荀氏']], zhangning:['female','qun',3,['tianze','difa']], - liuyong:['male','shu',3,['zhuning','fengxiang']], tongyuan:['male','qun',4,['chaofeng','chuanshu']], sp_mifangfushiren:['male','shu',4,['dcmffengshi']], - re_kanze:['male','wu',3,['xiashu','rekuanshi']], re_nanhualaoxian:['male','qun',4,['gongxiu','jinghe']], - zhouyi:['female','wu',3,['zhukou','mengqing']], - lvlingqi:['female','qun',4,['guowu','zhuangrong']], dufuren:['female','wei',3,['yise','shunshi']], - zhanghu:['male','wei',4,['cuijian','zhtongyuan']], caoanmin:['male','wei',4,['xianwei']], - re_panshu:['female','wu',3,['zhiren','yaner']], re_zoushi:['female','qun',3,['rehuoshui','reqingcheng']], - luyusheng:['female','wu',3,['zhente','zhiwei']], - huaxin:['male','wei',3,['spwanggui','xibing']], - re_dongbai:['female','qun',3,['relianzhu','rexiahui']], qiuliju:['male','qun','4/6',['koulve','qljsuiren']], - heyan:['male','wei',3,['yachai','qingtan']], re_hucheer:['male','qun',4,['redaoji','fuzhong']], re_dongcheng:['male','qun',4,['xuezhao']], - yangwan:['female','shu',3,['youyan','zhuihuan']], tangji:['female','qun',3,['jielie','kangge']], zhangheng:['male','qun',8,['dangzai','liangjue']], duanwei:['male','qun',4,['langmie']], re_niujin:['male','wei',4,['recuorui','reliewei']], zhangmiao:['male','qun',4,['mouni','zongfan']], liangxing:['male','qun',4,['lulve','lxzhuixi']], - ruanyu:['male','wei',3,['xingzuo','miaoxian']], - xiahoujie:['male','wei',5,['liedan','zhuangdan']], caosong:['male','wei',4,['cslilu','csyizheng']], re_taoqian:['male','qun',3,['zhaohuo','reyixiang','reyirang']], zhaozhong:['male','qun',6,['yangzhong','huangkong']], - fanyufeng:['female','qun',3,['bazhan','jiaoying']], - re_chunyuqiong:['male','qun',4,['recangchu','reliangying','reshishou']], - guozhao:['female','wei',3,['pianchong','zunwei']], hanfu:['male','qun',4,['hfjieying','weipo']], re_quyi:['male','qun',4,['refuqi','jiaozi']], dongxie:['female','qun','3/4',['juntun','jiaojie']], - re_xinxianying:['female','wei',3,['rezhongjian','recaishi']], wangrong:['female','qun',3,['minsi','jijing','zhuide']], ol_dingyuan:['male','qun',4,['cixiao','xianshuai']], - liubian:['male','qun',3,['shiyuan','dushi','yuwei'],['zhu']], xin_baosanniang:['female','shu',3,['decadewuniang','decadexushen']], re_hejin:['male','qun',4,['spmouzhu','spyanhuo']], re_hansui:['male','qun',4,['spniluan','spweiwu']], liuhong:['male','qun',4,['yujue','tuxing']], zhujun:['male','qun',4,['gongjian','kuimang']], - caoxing:['male','qun',4,['cxliushi','zhanwan']], re_maliang:['male','shu',3,['rexiemu','heli'],[]], caobuxing:['male','wu',3,['moying','juanhui'],[]], - re_sunluyu:['female','wu',3,['remeibu','remumu']], - re_liuzan:['male','wu',4,['refenyin','liji']], - wenyang:['male','wei',5,['xinlvli','choujue']], - wangshuang:['male','wei',8,['spzhuilie']], - huaman:['female','shu',3,['hmmanyi','mansi','souying','zhanyuan']], - re_panfeng:['male','qun',4,['xinkuangfu']], - xingdaorong:['male','qun','4/6',['xuxie']], lijue:["male","qun","4/6",["xinfu_langxi","xinfu_yisuan"],[]], zhangji:["male","qun",4,["xinfu_lveming","xinfu_tunjun"],[]], fanchou:["male","qun",4,["xinxingluan"],[]], @@ -215,12 +77,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xf_huangquan:["male","shu",3,["xinfu_dianhu","xinfu_jianji"],[]], xf_sufei:["male","wu",4,["xinfu_lianpian"],[]], xushao:['male','qun',4,['pingjian']], - puyuan:['male','shu',4,['pytianjiang','pyzhuren']], xinpi:['male','wei',3,['xpchijie','yinju']], lisu:['male','qun',2,['lslixun','lskuizhu']], zhangwen:['male','wu',3,['songshu','sibian']], - guanlu:['male','wei',3,['tuiyan','busuan','mingjie']], - gexuan:['male','wu',3,['gxlianhua','zhafu']], mangyachang:["male","qun",4,["spjiedao"],[]], xugong:["male","wu",3,["biaozhao","yechou"],[]], zhangchangpu:["female","wei",3,["yanjiao","xingshen"],[]], @@ -231,12 +90,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_xuyou:['male','qun',3,['spshicai','spfushi']], chunyuqiong:['male','qun',5,['cangchu','sushou','liangying']], lvkuanglvxiang:['male','qun',4,['liehou','qigong']], - leitong:['male','shu',4,['kuiji']], - wulan:['male','shu',4,['wlcuorui']], }, characterSort:{ sp2:{ - sp_whlw:["xurong","lijue","zhangji","fanchou","guosi","duanwei","liangxing","zhangheng",'tangji','niufu'], + sp_whlw:["xurong","lijue","zhangji","fanchou","guosi","duanwei","liangxing","zhangheng",'tangji','niufu','dongxie'], sp_zlzy:["zhangqiying","lvkai","zhanggong","weiwenzhugezhi","beimihu"], sp_longzhou:["xf_tangzi","xf_huangquan","xf_sufei","sp_liuqi"], sp_zizouqi:["mangyachang","xugong","zhangchangpu"], @@ -246,1205 +103,241 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_binglin:['re_niujin',"sp_mifangfushiren",'licaiwei','dc_zhaoyan','shiyi','sunlang','sunhuan','dc_mengda'], sp_danqi:['dufuren','qinyilu','bianxi','dc_huban','dc_hujinding','dc_zhaoyǎn','wangwei','liyixiejing','guānning','dc_jsp_guanyu'], sp_fenghuo:['re_nanhualaoxian','tongyuan','zhangning','re_pangdegong'], - sp_baigei:['re_panfeng','xingdaorong','caoxing','re_chunyuqiong','xiahoujie','dc_caiyang','zhoushan'], - sp_caizijiaren:['re_dongbai','re_sunluyu','heyan','zhaoyan','wangtao','wangyue','zhangxuan','tengyin','zhangyao','xiahoulingnv','dc_sunru'], - sp_zhilan:['liuyong','wanniangongzhu','zhanghu','lvlingqi','tenggongzhu','panghui','dc_zhaotongzhaoguang','yuantanyuanxiyuanshang','yuechen'], - sp_guixin:['re_kanze','re_chendeng','caimaozhangyun','dc_lvkuanglvxiang','dc_gaolan','yinfuren','chengui','chenjiao','dc_sp_jiaxu','qinlang'], - sp_daihan:['mamidi','dc_jiling','zhangxun','dc_yuejiu','wanglie','leibo','qiaorui','dongwan','yuanyin'], - sp_jianghu:['guanning','huzhao','dc_huangchengyan','mengjie'], - sp_zongheng:['huaxin','luyusheng','re_xunchen','re_miheng','fengxi','re_dengzhi','dc_yanghu','zongyu'], - sp_taiping:['guanhai','liupi','peiyuanshao','zhangchu','zhangkai'], - sp_yanhan:['dc_liuba','dc_huangquan','furongfuqian','xianglang','dc_huojun','gaoxiang','dc_wuban'], - sp_jishi:['dc_jiben','zhenghun','dc_sunhanhua','liuchongluojun'], - sp_raoting:['dc_huanghao','dc_sunziliufang','dc_sunchen'], - sp_yijun:['gongsundu','mengyou'], sp_huangjin:['liuhong','zhujun','re_hansui',"xushao"], sp_fadong:['ol_dingyuan','wangrong','re_quyi','hanfu'], sp_xuzhou:['re_taoqian','caosong','zhangmiao','qiuliju'], sp_zhongyuan:['re_hucheer','re_zoushi','caoanmin','re_dongcheng'], - sp_zhengyin:['yue_caiwenji'], sp_xiaohu:['haomeng','yanfuren','yanrou','dc_zhuling'], - sp2_huben:['wangshuang','wenyang','re_liuzan','dc_huangzu','wulan','leitong','chentai','dc_duyu'], - sp2_shengun:["puyuan","guanlu","gexuan",'wufan','re_zhangbao','dukui','zhaozhi','zhujianping','dc_zhouxuān','zerong'], - sp2_bizhe:['dc_luotong','dc_wangchang','chengbing','dc_yangbiao','ruanji'], - sp2_huangjia:['caomao','liubian','dc_liuyu','quanhuijie','dingshangwan','yuanji','xielingyu','sunyu','ganfurenmifuren','dc_ganfuren','dc_mifuren'], - sp2_zhangtai:['guozhao','fanyufeng','ruanyu','yangwan','re_panshu'], - sp2_jinse:['caojinyu','re_sunyi','re_fengfangnv','caohua','laiyinger','zhangfen'], - sp2_yinyu:['zhouyi','luyi'], - sp2_doukou:['re_xinxianying','huaman','xuelingyun','dc_ruiji','duanqiaoxiao'], - sp2_jichu:['zhaoang','dc_liuye','dc_wangyun','yanghong','huanfan','xizheng'], - sp2_yuxiu:['dongguiren','dc_tengfanglan','zhangjinyun'], - sp2_gaoshan:['wanglang','liuhui'], - sp2_wumiao:['wu_zhugeliang'], - sp_decade:['caobuxing','re_maliang','xin_baosanniang','dongxie'], + sp_decade:['caobuxing','re_maliang','xin_baosanniang','dc_wangjun'], } }, skill:{ - //吴班 - dcyouzhan:{ + //新服灭霸 + dcmianyao:{ audio:2, trigger:{ - global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + player:'phaseDrawEnd', }, - forced:true, + direct:true, filter:function(event,player){ - if(player!=_status.currentPhase) return false; - return game.hasPlayer(current=>{ - if(current==player) return false; - var evt=event.getl(current); - return evt&&evt.cards2.length; - }); + return player.countCards('h')>0; }, content:function(){ 'step 0' - var targets=game.filterPlayer(current=>{ - if(current==player) return false; - var evt=trigger.getl(current); - return evt&&evt.cards2.length; + player.chooseCard('h',get.prompt('dcmianyao'),'展示点数最小的一张牌并随机插入牌堆中,然后于回合结束时摸此牌点数张牌。',function(card,player){ + var num=get.number(card,player); + return !player.hasCard(card2=>{ + return card!=card2&&get.number(card2,player){ + var player=_status.event.player; + var value=player.getUseValue(card,null,true); + if(value>5&&get.number(card)<=2) return 0; + return 1+1/Math.max(0.1,value); }); - event.targets=targets; - player.logSkill('dcyouzhan',targets); 'step 1' - var target=targets.shift(); - player.draw(); - target.addTempSkill('dcyouzhan_effect'); - target.addMark('dcyouzhan_effect',1,false); - target.addTempSkill('dcyouzhan_draw'); - if(targets.length){ - event.redo(); + if(result.bool){ + player.logSkill('dcmianyao'); + var card=result.cards[0]; + event.card=card; + player.showCards([card],get.translation(player)+'发动了【免徭】'); } + else event.finish(); + 'step 2' + player.$throw(1,1000); + player.lose(card,ui.cardPile).insert_index=function(){ + return ui.cardPile.childNodes[get.rand(0,ui.cardPile.childNodes.length-1)]; + } + player.addTempSkill('dcmianyao_draw'); + var num=get.number(card); + if(num>0) player.addMark('dcmianyao_draw',num,false); }, subSkill:{ - effect:{ + draw:{ + trigger:{ + player:'phaseEnd', + }, + filter:function(event,player){ + return player.hasMark('dcmianyao_draw'); + }, + forced:true, + charlotte:true, + onremove:true, + content:function(){ + player.draw(player.countMark('dcmianyao_draw')); + }, + } + } + }, + dcchangqu:{ + audio:2, + enable:'phaseUse', + usable:1, + selectTarget:function(){ + return [1,game.countPlayer()-1]; + }, + complexSelect:true, + complexTarget:true, + multitarget:true, + multiline:true, + filterTarget:function(card,player,target){ + if(player==target) return false; + var next=player.getNext(),prev=player.getPrevious(); + var selected=ui.selected.targets; + if(!selected.contains(next)&&!selected.contains(prev)) return (target==next||target==prev); + for(var i of selected){ + if(i.getNext()==target||i.getPrevious()==target) return true; + } + return false; + }, + contentBefore:function(){ + event.getParent()._dcchangqu_targets=targets.slice(); + }, + content:function(){ + 'step 0' + event.targets=event.getParent()._dcchangqu_targets; + var current=targets[0]; + current.addMark('dcchangqu_warship'); + current.addMark('dcchangqu_warshipx',1,false); + event.num=0; + game.delayx(); + 'step 1' + var target=targets.shift(); + event.target=target; + var num=Math.max(1,event.num); + var nextPlayer=targets.find(i=>{ + return i.isIn(); + }); + if(target.hasMark('dcchangqu_warshipx')){ + var prompt2='是否交给'+get.translation(player)+get.cnNumber(num)+'张手牌?'+(nextPlayer?'若如此做,将“战舰”移动给'+get.translation(nextPlayer)+',':',')+'否则你下次受到的属性伤害值+'+num; + target.chooseCard(get.translation(player)+'对你发动了【长驱】',prompt2).set('ai',card=>{ + if(_status.event.att>0) return 6-get.value(card); + if(_status.event.take) return -get.value(card); + return 5-get.value(card); + }).set('att',get.attitude(target,player)).set('take',function(){ + var base=num; + var getEffect=function(target,player,num){ + var natures=['fire','thunder','ice']; + return natures.map(nature=>{ + return get.damageEffect(target,target,player,nature)*Math.sqrt(num)/Math.min(1.5,1+target.countCards('h')); + }).reduce((sum,eff)=>{ + return sum+eff; + },0)/natures.length; + } + var eff=getEffect(player,player,base); + return targets.some((current,ind)=>{ + var num=base+ind+1; + var effx=getEffect(current,player,num); + return effx{ + return i.isIn(); + }); + if(nextPlayer){ + target.line(nextPlayer); + nextPlayer.addMark('dcchangqu_warship',target.countMark('dcchangqu_warship')); + nextPlayer.addMark('dcchangqu_warshipx',target.countMark('dcchangqu_warshipx'),false); + event.goto(1); + game.delayx(); + } + target.removeMark('dcchangqu_warship',target.countMark('dcchangqu_warship')); + target.removeMark('dcchangqu_warshipx',target.countMark('dcchangqu_warshipx'),false); + 'step 4' + var targets=game.players.slice().concat(game.dead); + targets.forEach(i=>{ + delete i.storage.dcchangqu_warshipx; + }); + }, + ai:{ + order:10, + expose:0.05, + result:{ + target:function(player,target){ + var att=get.attitude(player,target); + var targets=game.filterPlayer(i=>i!=player); + targets.sortBySeat(player); + var targets2=targets.reverse(); + var sum=0; + var maxSum=-Infinity,maxIndex=-1; + var maxSum2=-Infinity,maxIndex2=-1; + for(var i=0;imaxSum){ + maxSum=sum; + maxIndex=i; + } + } + var sum=0; + for(var i=0;imaxSum2){ + maxSum2=sum; + maxIndex2=i; + } + } + if(maxSummaxIndex) return -100*get.sgnAttitude(player,target); + if(target==targets[ui.selected.targets.length]) return get.sgnAttitude(player,target); + return 0; + } + }, + }, + subSkill:{ + warship:{ + marktext:'舰', + intro:{ + name:'战舰', + name2:'战舰', + content:'这里停了&艘战舰!不过啥用没有。', + } + }, + add:{ trigger:{ player:'damageBegin3', }, filter:function(event,player){ - return player.hasMark('dcyouzhan_effect'); + return event.nature&&player.hasMark('dcchangqu_add'); }, forced:true, - charlotte:true, onremove:true, + charlotte:true, content:function(){ 'step 0' - trigger.num+=player.countMark('dcyouzhan_effect'); - player.removeSkill('dcyouzhan_effect'); + trigger.num+=player.countMark('dcchangqu_add'); + player.removeSkill('dcchangqu_add'); }, - mark:true, + marktext:'驱', intro:{ - content:'本回合下一次受到的伤害+#', - }, - ai:{ - damageBonus:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')) return 1+0.5*target.countMark('dcyouzhan_effect'); - } - } + content:'下次受到的属性伤害+#', } }, - draw:{ - trigger:{ - global:'phaseJieshuBegin', - }, - forced:true, - charlotte:true, - filter:function(event,player){ - return !player.getHistory('damage').length; - }, - content:function(){ - player.draw(player.getHistory('lose').length); - }, - }, - } - }, - //杜预 - dcjianguo:{ - audio:2, - enable:'phaseUse', - usable:1, - chooseButton:{ - dialog:function(event,player){ - var dialog=ui.create.dialog('谏国:请选择一项','hidden'); - dialog.add([[ - ['discard','令一名角色摸一张牌,然后弃置一半手牌'], - ['draw','令一名角色弃置一张牌,然后摸等同于手牌数一半的牌'] - ],'textbutton']); - return dialog; - }, - check:function(button){ - var player=_status.event.player; - if(button.link=='discard'){ - var discard=Math.max.apply(Math,game.filterPlayer(current=>{ - return lib.skill.dcjianguo_discard.filterTarget(null,player,current); - }).map(current=>{ - return get.effect(current,'dcjianguo_discard',player,player); - })); - return discard; - } - if(button.link=='draw'){ - var draw=Math.max.apply(Math,game.filterPlayer(current=>{ - return lib.skill.dcjianguo_draw.filterTarget(null,player,current); - }).map(current=>{ - return get.effect(current,'dcjianguo_draw',player,player); - })); - return draw; - } - return 0; - }, - backup:function(links){ - return get.copy(lib.skill['dcjianguo_'+links[0]]); - }, - prompt:function(links){ - if(links[0]=='discard') return '令一名角色摸一张牌,然后弃置一半手牌'; - return '令一名角色弃置一张牌,然后摸等同于手牌数一半的牌'; - }, - }, - ai:{ - order:10, - threaten:2.8, - result:{ - //想让杜预两个技能自我联动写起来太累了,开摆 - player:1, - }, - }, - subSkill:{ - backup:{audio:'dcjianguo'}, - discard:{ - audio:'dcjianguo', - filterTarget:()=>true, - filterCard:()=>false, - selectCard:-1, - charlotte:true, - content:function(){ - 'step 0' - target.draw(); - game.delayex(); - 'step 1' - var num=Math.floor(target.countCards('h')/2); - if(num>0) target.chooseToDiscard(num,true,'谏国:请弃置'+get.cnNumber(num)+'张手牌'); - }, - ai:{ - result:{ - target:function(player,target){ - return 1.1-Math.ceil(target.countCards('h')/2); - }, - }, - tag:{ - gain:1, - loseCard:2, - }, - }, - }, - draw:{ - audio:'dcjianguo', - filterTarget:function(card,player,target){ - return target.countCards('he'); - }, - filterCard:()=>false, - selectCard:-1, - charlotte:true, - content:function(){ - 'step 0' - target.chooseToDiscard('he',true,'谏国:请弃置一张牌'); - 'step 1' - var num=Math.floor(target.countCards('h')/2); - if(num>0) target.draw(num); - }, - ai:{ - result:{ - target:function(player,target){ - var fix=0; - var num=target.countCards('h'); - if(player==target&&num%2==1&&num>=5) fix+=1; - return Math.floor(num/2-0.5)+fix; - }, - }, - tag:{ - loseCard:1, - gain:2, - }, - }, - }, - }, - }, - dcdyqingshi:{ - audio:2, - trigger:{ - player:'useCardToPlayered', - }, - filter:function(event,player){ - if(player!=_status.currentPhase) return false; - if(!event.isFirstTarget) return false; - if(event.card.name!='sha'&&get.type(event.card,false)!='trick') return false; - if(player.countCards('h')!=player.getHistory('useCard').indexOf(event.getParent())+1) return false; - return event.targets.some(target=>{ - return target!=player&&target.isIn(); - }); - }, - direct:true, - content:function(){ - 'step 0' - var targets=trigger.targets.filter(target=>{ - return target!=player&&target.isIn(); - }); - player.chooseTarget(get.prompt('dcdyqingshi'),'对一名不为你的目标角色造成1点伤害',(card,player,target)=>{ - return _status.event.targets.contains(target); - }).set('ai',target=>{ - var player=_status.event.player; - return get.damageEffect(target,player,player); - }).set('targets',targets); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcdyqingshi',target); - target.damage(); - } - }, - mod:{ - aiOrder:function(player,card,num){ - if(_status.currentPhase!=player) return; - var cardsh=[]; - if(Array.isArray(card.cards)){ - cardsh.addArray(card.cards.filter(card=>{ - return get.position(card)=='h'; - })); - } - var del=player.countCards('h')-cardsh.length-player.getHistory('useCard').length-1; - if(del<0) return; - if(del>0){ - if(card.name=='sha'||get.type(card,false)!='trick') return num/3; - return num+1; - } - return num+15; - }, - }, - }, - //甘糜 - dcchanjuan:{ - audio:2, - trigger:{ - player:'useCardAfter', - }, - filter:function(event,player){ - if(event.targets.length!=1) return false; - if(!['basic','trick'].contains(get.type(event.card,false))) return false; - if(event.getParent(2).name=='dcchanjuan') return false; - return !player.getStorage('dcchanjuan').contains(event.card.name); - }, - direct:true, - content:function(){ - 'step 0' - var card={ - name:trigger.card.name, - nature:trigger.card.nature, - isCard:true, - } - player.chooseUseTarget(card,get.prompt('dcchanjuan'),false,false).set('prompt2','视为再使用一张'+get.translation(card)).set('logSkill','dcchanjuan'); - 'step 1' - if(result.bool){ - player.markAuto('dcchanjuan',[trigger.card.name]); - var list1=trigger.targets,list2=result.targets; - if(list1.slice().removeArray(list2).length==0&&list2.slice().removeArray(list1).length==0) player.draw(); - } - }, - ai:{ - threaten:2, - }, - intro:{ - content:'已记录牌名:$', - } - }, - dcxunbie:{ - audio:2, - trigger:{ - player:'dying', - }, - filter:function(event,player){ - if(player.hp>0) return false; - var characters=['dc_ganfuren','dc_mifuren']; - game.countPlayer(current=>{ - if(current.name1=='dc_ganfuren'||current.name2=='dc_ganfuren'){ - characters.remove('dc_ganfuren'); - } - if(current.name1=='dc_mifuren'||current.name2=='dc_mifuren'){ - characters.remove('dc_mifuren'); - } - }); - return characters.length; - }, - check:()=>true, - skillAnimation:true, - animationColor:'fire', - limited:true, - derivation:['dcyongjue','dcshushen','dcshenzhi','dcguixiu','dccunsi'], - content:function(){ - 'step 0' - player.awakenSkill('dcxunbie'); - if(player.name1=='ganfurenmifuren'||player.name2=='ganfurenmifuren'){ - var characters=['dc_ganfuren','dc_mifuren']; - game.countPlayer(current=>{ - if(current.name1=='dc_ganfuren'||current.name2=='dc_ganfuren'){ - characters.remove('dc_ganfuren'); - } - if(current.name1=='dc_mifuren'||current.name2=='dc_mifuren'){ - characters.remove('dc_mifuren'); - } - }); - if(characters.length==1) event._result={control:characters[0]}; - else{ - player.chooseControl(characters).set('dialog',[ - '选择要替换成的武将', - [characters,'character'] - ]).set('ai',()=>[0,1].randomGet()); - } - } - else event.goto(2); - 'step 1' - var character=result.control; - if(!_status.characterlist){ - lib.skill.pingjian.initList(); - } - _status.characterlist.remove(character); - _status.characterlist.add('ganfurenmifuren'); - player.reinit('ganfurenmifuren',character,false); - 'step 2' - player.recover(1-player.hp); - player.addTempSkill('dcxunbie_muteki'); - }, - subSkill:{ - muteki:{ - trigger:{ - player:'damageBegin4', - }, - charlotte:true, - forced:true, - content:function(){ - trigger.cancel(); - }, - mark:true, - intro:{content:'防止本回合受到的所有伤害'}, - ai:{ - nofire:true, - nothunder:true, - nodamage:true, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'damage')) return 'zeroplayertarget'; - } - }, - } - } - } - }, - //散装版糜夫人 - dcguixiu:{ - audio:'guixiu', - trigger:{ - player:'phaseBegin', - }, - forced:true, - onremove:true, - filter:function(event,player){ - return !player.hasMark('dcguixiu'); - }, - group:'dcguixiu_rec', - content:function(){ - player.addMark('dcguixiu',1,false); - player.draw(2); - }, - subSkill:{ - rec:{ - audio:'guixiu', - trigger:{ - player:'logSkill', - }, - forced:true, - filter:function(event,player){ - return event.skill=='dccunsi'&&player.isDamaged(); - }, - content:function(){ - player.recover(); - } - } - } - }, - dccunsi:{ - audio:'cunsi', - enable:'phaseUse', - limited:true, - skillAnimation:true, - animationColor:'orange', - filterTarget:true, - derivation:'dcyongjue', - content:function(){ - 'step 0' - player.awakenSkill('dccunsi'); - target.addSkillLog('dcyongjue'); - if(target!=player) player.draw(2); - }, - ai:{ - order:10, - result:{ - target:1, - } - } - }, - dcyongjue:{ - audio:'yongjue', - trigger:{ - player:'useCard', - }, - filter:function(event,player){ - var evtx=event.getParent('phaseUse'); - if(!evtx||evtx.player!=player) return false; - return player.getHistory('useCard',evt=>{ - return evt.card.name=='sha'&&event.getParent('phaseUse')==evtx; - }).indexOf(event)==0; - }, - direct:true, - content:function(){ - 'step 0' - var choices=['选项一']; - var choiceList=['令'+get.translation(trigger.card)+'不计入次数','获得此牌']; - if(trigger.cards.length){ - choices.push('选项二'); - choiceList[1]='获得'+get.translation(trigger.cards); - } - else choiceList[1]=''+choiceList[1]+''; - choices.push('cancel2'); - player.chooseControl(choices).set('choiceList',choiceList).set('ai',()=>{ - return _status.event.choice; - }).set('choice',function(){ - if(choices.length==3&&trigger.addCount===false) return 1; - if(player.getCardUsable({name:'sha'}){ - var player=_status.event.player; - return get.recoverEffect(target,player,player)/2+get.attitude(player,target); - }); - 'step 2' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('dcshushen',target); - event.num--; - var choices=['选项二']; - var choiceList=[ - '令'+get.translation(target)+'回复1点体力', - '你于'+get.translation(target)+'各摸一张牌' - ]; - if(target.isDamaged()) choices.unshift('选项一'); - else choiceList[0]=''+choiceList[0]+''; - player.chooseControl(choices).set('choiceList',choiceList).set('prompt','淑慎:请选择一项').set('ai',()=>{ - return _status.event.choice; - }).set('choice',function(){ - if(target.hp<=2||get.recoverEffect(target,player,player)>20) return 0; - return '选项二'; - }()); - } - else event.finish(); - 'step 3' - if(result.control=='选项一'){ - target.recover(); - } - else{ - var drawers=[player,target].sortBySeat(_status.currentPhase); - game.asyncDraw(drawers); - } - 'step 4' - if(event.num>0) event.goto(1); - } - }, - dcshenzhi:{ - audio:'shenzhi', - trigger:{ - player:'phaseZhunbeiBegin', - }, - filter:function(event,player){ - return player.countCards('h')>player.hp; - }, - direct:true, - content:function(){ - 'step 0' - player.chooseToDiscard(get.prompt('dcshenzhi'),'弃置一张手牌,然后回复1点体力').set('logSkill','dcshenzhi').set('ai',card=>{ - var player=_status.event.player; - if(!player.isDamaged()) return 0; - return Math.min(3,10-2*player.hp)-get.value(card); - }); - 'step 1' - if(result.bool){ - player.recover(); - } - } - }, - //乐蔡文姬 - dcshuangjia:{ - audio:2, - trigger:{ - global:'phaseBefore', - player:'enterGame' - }, - forced:true, - filter:function(event,player){ - return (event.name!='phase'||game.phaseNumber==0); - }, - content:function(){ - 'step 0' - var cards=player.getCards('h'); - player.addGaintag(cards,'dcshuangjia_tag'); - }, - mod:{ - ignoredHandcard:function(card,player){ - if(card.hasGaintag('dcshuangjia_tag')){ - return true; - } - }, - cardDiscardable:function(card,player,name){ - if(name=='phaseDiscard'&&card.hasGaintag('dcshuangjia_tag')){ - return false; - } - }, - globalTo:function(from,to,distance){ - return distance+Math.min(5,to.countCards('h',card=>card.hasGaintag('dcshuangjia_tag'))); - } - }, - }, - dcbeifen:{ - audio:2, - trigger:{ - player:['loseAfter'], - global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], - }, - filter:function(event,player){ - var evt=event.getl(player); - if(!evt||!evt.hs||!evt.hs.length) return false; - if(event.name=='lose'){ - for(var i in event.gaintag_map){ - if(event.gaintag_map[i].contains('dcshuangjia_tag')) return true; - } - return false; - } - return player.hasHistory('lose',evt=>{ - if(event!=evt.getParent()) return false; - for(var i in evt.gaintag_map){ - if(evt.gaintag_map[i].contains('dcshuangjia_tag')) return true; - } - return false; - }); - }, - forced:true, - content:function(){ - var suits=lib.suit.slice(); - player.countCards('h',card=>{ - if(!card.hasGaintag('dcshuangjia_tag')) return false; - suits.remove(get.suit(card)); - }); - var cards=[]; - while(suits.length){ - var suit=suits.shift(); - var card=get.cardPile(cardx=>{ - return get.suit(cardx,false)==suit; - }); - if(card) cards.push(card); - } - if(cards.length){ - player.gain(cards,'gain2'); - } - }, - mod:{ - cardUsable:function(card,player){ - var len=player.countCards('h'); - var cnt=player.countCards('h',card=>card.hasGaintag('dcshuangjia_tag')); - if(2*cntcard.hasGaintag('dcshuangjia_tag')); - if(2*cnt{ - if(!cardx.hasGaintag('dcshuangjia_tag')) return false; - if(card==cardx) return false; - suits.remove(get.suit(cardx)); - }); - if(suits.length) return num+suits.length*2.5; - } - }, - }, - }, - //阮籍 - dczhaowen:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ - return player.countCards('h'); - }, - check:function(event,player){ - return player.hasCard(card=>{ - return get.color(card)=='black'||get.color(card)=='red'&&player.hasValueTarget(card); - }); - }, - content:function(){ - 'step 0' - player.showHandcards(); - 'step 1' - player.addTempSkill('dczhaowen_effect'); - game.broadcastAll(function(cards){ - cards.forEach(card=>card.addGaintag('dczhaowen_tag')); - },player.getCards('h')); - }, - ai:{ - threaten:3 - }, - subSkill:{ - effect:{ - audio:'dczhaowen', - enable:'chooseToUse', - charlotte:true, - onremove:function(player){ - player.removeGaintag('dczhaowen_tag'); - }, - hiddenCard:function(player,name){ - return get.type(name)=='trick'&&!player.getStorage('dczhaowen_viewed').contains(name)&&player.countCards('h',card=>{ - return get.color(card)=='black'&&card.hasGaintag('dczhaowen_tag'); - })>0; - }, - filter:function(event,player){ - if(!player.hasCard(card=>{ - return get.color(card)=='black'&&card.hasGaintag('dczhaowen_tag'); - })) return false; - var storage=player.getStorage('dczhaowen_viewed'); - for(var i of lib.inpile){ - if(!storage.contains(i)&&get.type(i)=='trick'&&event.filterCard({name:i},player,event)) return true; - } - return false; - }, - chooseButton:{ - dialog:function(event,player){ - var cards=player.getCards('h',card=>{ - return get.color(card)=='black'&&card.hasGaintag('dczhaowen_tag'); - }); - var storage=player.getStorage('dczhaowen_viewed'); - var list=[]; - for(var i of lib.inpile){ - if(!storage.contains(i)&&get.type(i)=='trick'&&event.filterCard({name:i},player,event)){ - list.push(['锦囊','',i]); - } - } - return ui.create.dialog('昭文',[list,'vcard'],'hidden'); - }, - check:function(button){ - var player=_status.event.player; - return player.getUseValue({name:button.link[2]})+1; - }, - backup:function(links,player){ - return { - audio:'dczhaowen', - popname:true, - filterCard:function(card,player){ - return get.color(card)=='black'&&card.hasGaintag('dczhaowen_tag'); - }, - selectCard:1, - position:'h', - viewAs:{ - name:links[0][2], - }, - onuse:function(links,player){ - player.addTempSkill('dczhaowen_viewed'); - player.markAuto('dczhaowen_viewed',[links.card.name]); - }, - } - }, - prompt:function(links,player){ - return '将一张展示过的黑色手牌当做'+get.translation(links[0][2])+'使用'; - }, - }, - group:'dczhaowen_draw', - mod:{ - aiOrder:function(player,card,num){ - var cards=[]; - if(card.cards) cards.addArray(cards); - if(get.itemtype(card)=='card') cards.push(card); - for(var cardx of cards){ - if(get.color(cardx)!='red') continue; - if(cardx.hasGaintag('dczhaowen_tag')) return num+0.2; - } - }, - }, - ai:{ - order:12, - result:{ - player:1, - }, - }, - }, - draw:{ - audio:'dczhaowen', - forced:true, - charlotte:true, - trigger:{player:'useCard'}, - filter:function(event,player){ - var cards=event.cards.filter(card=>get.color(card,player)=='red'); - return player.hasHistory('lose',evt=>{ - if(event!=evt.getParent()) return false; - for(var i in evt.gaintag_map){ - if(evt.gaintag_map[i].contains('dczhaowen_tag')){ - if(cards.some(card=>card.cardid==i)) return true; - } - } - }); - }, - content:function(){ - var num=0; - var cards=trigger.cards.filter(card=>get.color(card,player)=='red'); - player.getHistory('lose',evt=>{ - if(trigger!=evt.getParent()) return false; - for(var i in evt.gaintag_map){ - if(evt.gaintag_map[i].contains('dczhaowen_tag')){ - if(cards.some(card=>card.cardid==i)) num++; - } - } - }); - while(num--) player.draw(); - }, - }, - viewed:{ - onremove:true, - charlotte:true, - }, - effect_backup:{ - audio:'dczhaowen', - }, - } - }, - dcjiudun:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - filter:function(event,player){ - if(event.player==player||get.color(event.card)!='black') return false; - if(player.hasSkill('jiu')) return player.countCards('h',card=>{ - return _status.connectMode||lib.filter.cardDiscardable(card,player,'dcjiudun'); - }); - return true; - }, - direct:true, - content:function(){ - 'step 0' - if(player.hasSkill('jiu')){ - player.chooseToDiscard(get.prompt('dcjiudun'),'
    弃置一张手牌,令'+get.translation(trigger.card)+'对你无效
    ').set('logSkill','dcjiudun').set('ai',card=>{ - if(_status.event.goon) return 4.5+Math.max(0,3-player.hp)-get.value(card); - return 0; - }).set('goon',function(){ - if(get.effect(player,trigger.card,trigger.player,player)<-4*Math.max(0,5-Math.sqrt(player.countCards('h')))) return true; - return false; - }()); - event.goto(2); - } - else{ - player.chooseBool(get.prompt('dcjiudun'),'摸一张牌,然后视为使用一张【酒】').set('ai',()=>1); - } - 'step 1' - if(result.bool){ - player.logSkill('dcjiudun'); - player.draw(); - player.chooseUseTarget('jiu',true); - } - event.finish(); - 'step 2' - if(result.bool){ - trigger.excluded.add(player); - game.log(trigger.card,'对',player,'无效'); - } - }, - ai:{ - jiuSustain:true, - skillTagFilter:function(player,tag,name){ - if(name!='phase') return false; - } - } - }, - //武诸葛 - dcjincui:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - filter:function(event,player){ - return true; - }, - forced:true, - group:'dcjincui_advent', - content:function(){ - 'step 0' - var num=0; - for(var i=0;i=player.maxHp) break; - } - } - if(num<1) num=1; - if(num>player.hp) player.recover(num-player.hp); - else if(num0)) break; - top.unshift(cards.shift()); - } - } - bottom=cards; - return [top,bottom]; - } - 'step 2' - var top=result.moved[0]; - var bottom=result.moved[1]; - top.reverse(); - for(var i=0;i=target.hp){ - bool=true; - break; - } - } - } - if(bool) return 0.2; - } - }, - threaten:0.6, - }, - subSkill:{ - advent:{ - audio:'dcjincui', - trigger:{global:'phaseBefore',player:'enterGame'}, - forced:true, - filter:function(event,player){ - return (event.name!='phase'||game.phaseNumber==0)&&player.countCards('h')<7; - }, - content:function(){ - player.drawTo(7); - } - } - }, - }, - dcqingshi:{ - audio:2, - trigger:{player:'useCard'}, - filter:function(event,player){ - if(!player.isPhaseUsing()||player.hasSkill('dcqingshi_blocker')) return false; - if(player.getStorage('dcqingshi_clear').contains(event.card.name)) return false; - if(player.hasCard(card=>{ - return get.name(card)==event.card.name; - })) return true; - return false; - }, - direct:true, - content:function(){ - 'step 0' - var choices=[]; - var choiceList=[ - '令'+get.translation(trigger.card)+'对其中一个目标角色造成的伤害+1', - '令任意名其他角色各摸一张牌', - '摸三张牌,然后〖情势〗于本回合失效' - ]; - if(trigger.targets&&trigger.targets.length) choices.push('选项一'); - else choiceList[0]=''+choiceList[0]+'(无目标角色)'; - if(game.countPlayer(i=>i!=player)) choices.push('选项二'); - else choiceList[1]=''+choiceList[1]+''; - if(player.hp>0) choices.push('选项三'); - else choiceList[2]=''+choiceList[1]+'(体力值为0)'; - player.chooseControl(choices,'cancel2').set('choiceList',choiceList).set('prompt',get.prompt('dcqingshi')).set('ai',()=>{ - return _status.event.choice; - }).set('choice',(()=>{ - var choicesx=choices.slice(); - var cards=player.getCards('hs'); - var bool1=get.tag(trigger.card,'damage')&&choicesx.contains('选项一')&&trigger.targets.some(current=>{ - return get.attitude(player,current)<0; - }),bool2=choicesx.contains('选项二')&&game.countPlayer(current=>get.attitude(player,current)>0)>=1; - if(!bool1&&!bool2){ - for(var i=0;i{ - return _status.event.targets.contains(target); - }).set('ai',target=>{ - return 2-get.attitude(_status.event.player,target); - }).set('targets',event.getParent().getTrigger().targets); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.line(target); - player.addTempSkill('dcqingshi_ex'); - if(!player.storage.dcqingshi_ex) player.storage.dcqingshi_ex=[]; - player.storage.dcqingshi_ex.push([target,card]); - } - }, - content2:function(){ - 'step 0' - player.chooseTarget('令任意名其他角色各摸一张牌',[1,Infinity],true,lib.filter.notMe).set('ai',target=>{ - return get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var targets=result.targets; - targets.sortBySeat(); - player.line(targets); - game.asyncDraw(targets); - game.delayex(); - } - }, - content3:function(){ - 'step 0' - player.draw(3); - player.addTempSkill('dcqingshi_blocker'); - }, - subSkill:{ - ex:{ - trigger:{source:'damageBegin1'}, - filter:function(event,player){ - return player.storage.dcqingshi_ex&&player.storage.dcqingshi_ex.some(info=>{ - return info[0]==event.player&&info[1]==event.card; - }); - }, - forced:true, - charlotte:true, - popup:false, - onremove:true, - content:function(){ - trigger.num++; - for(var i=0;i{ - return get.position(card,true)=='o'&&card.cardid==i; - })) return true; - } - } - return false; - }); - }, - content:function(){ - 'step 0' - var cards=[]; - player.getHistory('lose',function(evt){ - if(evt.getParent()!=trigger) return false; - for(var i in evt.gaintag_map){ - if(evt.gaintag_map[i].contains('dczhizhe')){ - var cardsx=trigger.cards.filter(card=>{ - return get.position(card,true)=='o'&&card.cardid==i; - }); - if(cardsx.length) cards.addArray(cardsx); - } - } - }); - if(cards.length){ - player.gain(cards,'gain2').gaintag.addArray(['dczhizhe','dczhizhe_clear']); - player.addTempSkill('dczhizhe_clear'); - } - }, - }, - clear:{ - charlotte:true, - onremove:function(player){ - player.removeGaintag('dczhizhe_clear'); - }, - mod:{ - cardEnabled2:function(card,player){ - var cards=[]; - if(card.cards) cards.addArray(cards); - if(get.itemtype(card)=='card') cards.push(card); - for(var cardx of cards){ - if(cardx.hasGaintag('dczhizhe_clear')) return false; - } - }, - cardRespondable:function(card,player){ - var cards=[]; - if(card.cards) cards.addArray(cards); - if(get.itemtype(card)=='card') cards.push(card); - for(var cardx of cards){ - if(cardx.hasGaintag('dczhizhe_clear')) return false; - } - }, - cardSavable:function(card,player){ - var cards=[]; - if(card.cards) cards.addArray(cards); - if(get.itemtype(card)=='card') cards.push(card); - for(var cardx of cards){ - if(cardx.hasGaintag('dczhizhe_clear')) return false; - } - }, - } - } } }, //魏关羽 @@ -1526,287 +419,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - //段巧笑 - dccaizhuang:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.hasCard(function(card){ - return lib.filter.cardDiscardable(card,player,'dccaizhuang'); - },'he'); - }, - complexCard:true, - selectCard:[1,4], - position:'he', - filterCard:function(card,player){ - var suit=get.suit(card); - if(!lib.suit.contains(suit)) return false; - if(ui.selected.cards.length){ - if(ui.selected.cards.some(i=>{ - return get.suit(i)==suit; - })) return false; - } - return true; - }, - check:function(card){ - var player=_status.event.player; - var suit=get.suit(card); - if(get.position(card)!='h'&&player.countCards('h',{suit:suit})==1) return 0.1; - if(!player.hasCard(cardx=>cardx!=card&&get.suit(cardx)==suit)) return 7.5-get.value(card); - return 6-get.value(card); - }, - content:function(){ - 'step 0' - var suits=[]; - player.countCards('h',card=>{ - if(suits.length>=4) return; - var suit=get.suit(card); - if(!lib.suit.contains(suit)) return; - suits.add(suit); - }); - if(suits.length>=cards.length) event.finish(); - 'step 1' - player.draw(); - event.goto(0); - }, - ai:{ - order:2, - result:{ - player:function(player){ - var suits=lib.suit.filter(suit=>{ - return player.countCards('h',{suit:suit})>1; - }); - var suits2=[],cards=player.getCards('h'); - for(var card of cards){ - var suitx=get.suit(card); - if(suits2.contains(suitx)) continue; - if(!player.hasCard(cardx=>cardx!=card&&get.suit(cardx)==suitx)&&get.value(card)<7.5||get.value(card)<6) suits2.add(suitx); - } - if(suits2.length<=suits.length) return 0; - return 1; - } - } - } - }, - dchuayi:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - frequent:true, - content:function(){ - 'step 0' - player.judge(()=>1).judge2=(result)=>result.bool; - 'step 1' - var color=result.color; - if(color=='red'||color=='black') player.addTempSkill('dchuayi_'+color,{player:'phaseBegin'}); - }, - subSkill:{ - red:{ - trigger:{global:'phaseEnd'}, - charlotte:true, - forced:true, - filter:function(event,player){ - return event.player!=player; - }, - content:function(){ - player.draw(); - }, - mark:true, - intro:{ - name:'华衣·红', - content:'其他角色的回合结束时,你摸一张牌' - }, - }, - black:{ - trigger:{player:'damageEnd'}, - charlotte:true, - forced:true, - content:function(){ - player.draw(2); - }, - mark:true, - intro:{ - name:'华衣·黑', - content:'当你受到伤害后,摸两张牌' - }, - 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.5; - } - else{ - num=0.3; - } - } - 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]; - } - } - } - } - } - } - }, - //张瑾云 - dchuizhi:{ - audio:2, - trigger:{player:'phaseDrawEnd'}, - direct:true, - content:function(){ - 'step 0' - player.chooseToDiscard(get.prompt('dchuizhi'),'你可以选择弃置任意张手牌并点击“确定”,将手牌摸至与全场手牌数最多的角色数相同。',[0,Infinity]).set('logSkill','dchuizhi').set('ai',card=>{ - if(_status.event.isMax){ - if(ui.selected.cards.length) return -get.value(card); - return 0; - } - return 6-get.value(card); - }).set('isMax',player.isMaxHandcard()); - 'step 1' - if(result.bool){ - var num=0,targets=game.filterPlayer(); - for(var current of targets){ - if(current.isMaxHandcard()){ - num=current.countCards('h'); - break; - } - } - num=Math.max(1,Math.min(5,num-player.countCards('h'))); - player.draw(num); - } - } - }, - dcjijiao:{ - audio:2, - enable:'phaseUse', - limited:true, - skillAnimation:true, - animationColor:'orange', - init:function(player){ - player.addSkill('dcjijiao_machi'); - }, - onremove:function(player){ - player.removeSkill('dcjijiao_machi'); - }, - onChooseToUse:function(event){ - if(event.dcjijiao==undefined&&!game.online){ - var bool=lib.skill.dcjijiao.getCards(event.player,true); - event.set('dcjijiao',bool); - } - }, - filter:function(event,player){ - return event.dcjijiao; - }, - filterTarget:true, - getCards:function(player,bool){ - var cards=Array.from(ui.discardPile.childNodes); - var gains=cards.slice(0); - var history=game.getAllGlobalHistory('cardMove',function(evt){ - if(evt.name=='lose') return evt.position==ui.discardPile; - return evt.name=='cardsDiscard'; - }); - for(var i=history.length-1;i>=0;i--){ - var evt=history[i]; - var cards2=evt.cards.filter(function(card){ - return cards.contains(card); - }); - if(cards2.length){ - if(!lib.skill.dcjijiao.isUse(evt,player)){ - gains.removeArray(cards2); - } - cards.removeArray(cards2); - } - if(!cards.length) break; - } - if(bool) return gains.some(card=>get.type2(card,false)=='trick'); - return gains.filter(card=>get.type2(card,false)=='trick'); - }, - isUse:function(event,player){ - if(event.name!='cardsDiscard') return (event.type=='discard'&&event.player==player); - var evtx=event.getParent(); - if(evtx.name!='orderingDiscard') return false; - var evt2=(evtx.relatedEvent||evtx.getParent()); - return (evt2.name=='useCard'&&evt2.player==player); - }, - content:function(){ - player.awakenSkill('dcjijiao'); - var cards=lib.skill.dcjijiao.getCards(player); - if(cards.length){ - target.gain(cards,'gain2').gaintag.add('dcjijiao'); - target.addSkill('dcjijiao_nowuxie'); - } - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(game.roundNumber==1&&ui.cardPile.childNodes.length>game.countPlayer()*5&&!game.hasPlayer(current=>current.hp<=2)&&!player.hasSkill('dcjijiao_risutoa')) return 0; - return 5; - } - } - }, - subSkill:{ - machi:{ - charlotte:true, - forced:true, - popup:false, - trigger:{ - global:['washCard','die'], - }, - filter:function(event,player){ - return player.hasSkill('dcjijiao',null,false,false); - }, - content:function(){ - player.addSkill('dcjijiao_risutoa'); - } - }, - risutoa:{ - charlotte:true, - forced:true, - popup:false, - trigger:{global:'phaseAfter'}, - content:function(){ - if(player.awakenedSkills.contains('dcjijiao')){ - player.restoreSkill('dcjijiao'); - game.log(player,'重置了','#g【继椒】'); - //player.removeSkill('dcjijiao_machi'); - } - player.removeSkill('dcjijiao_risutoa'); - } - }, - nowuxie:{ - trigger:{player:'useCard1'}, - forced:true, - charlotte:true, - firstDo:true, - popup:false, - filter:function(event,player){ - if(get.type(event.card)!='trick') return false; - return player.hasHistory('lose',function(evt){ - if(evt.getParent()!=event) return false; - for(var i in evt.gaintag_map){ - if(evt.gaintag_map[i].contains('dcjijiao')) return true; - } - return false; - }); - }, - content:function(){ - trigger.nowuxie=true; - }, - onremove:function(player){ - player.removeGaintag('dcjijiao'); - }, - } - } - }, //孟达 dclibang:{ audio:2, @@ -2078,2343 +690,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ threaten:3.2, } }, - //桓范 - dcjianzheng:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target.countCards('h')&&target!=player; - }, - content:function(){ - 'step 0' - var forced=target.hasCard(i=>player.hasUseTarget(i),'h'); - player.choosePlayerCard(target,'h','visible',forced,'获得并使用其中一张牌').set('filterButton',button=>{ - return _status.event.player.hasUseTarget(button.link); - }).set('ai',button=>{ - return _status.event.player.getUseValue(button.link); - }); - 'step 1' - if(result.bool){ - var card=result.links[0]; - event.card=card; - player.gain(card,'giveAuto'); - } - else event.goto(3); - 'step 2' - if(get.position(card)=='h'&&get.owner(card)==player&&player.hasUseTarget(card)){ - player.chooseUseTarget(card,true); - event.finish(); - } - 'step 3' - player.link(true); - target.link(true); - 'step 4' - target.viewHandcards(player); - }, - ai:{ - order:10, - expose:0.2, - result:{ - target:function(player,target){ - return -Math.sqrt(target.countCards('h')); - } - } - } - }, - //fumo! - dcfumou:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event,player){ - return player.getDamagedHp()>0; - }, - content:function(){ - 'step 0' - event.num=trigger.num; - 'step 1' - player.chooseTarget(get.prompt2('dcfumou'),[1,player.getDamagedHp()]).set('ai',target=>{ - var att=get.attitude(_status.event.player,target); - if(target.countCards('h')>=3||target.countCards('e')&&!target.isDamaged()){ - if(!target.canMoveCard()) return -att; - else if(!target.canMoveCard(true)) return -att/5; - } - return att; - }); - 'step 2' - if(result.bool){ - var targets=result.targets; - targets.sortBySeat(_status.currentPhase); - event.targets=targets; - player.logSkill('dcfumou',targets); - event.num--; - } - else event.finish(); - 'step 3' - var target=targets.shift(); - event.target=target; - var choices=[]; - var choiceList=[ - '移动场上的一张牌', - '弃置所有手牌并摸两张牌', - '弃置装备区里的所有牌并回复1点体力' - ]; - if(target.canMoveCard()) choices.push('选项一'); - else choiceList[0]=''+choiceList[0]+''; - if(target.countCards('h')&&!target.hasCard(card=>{ - return !lib.filter.cardDiscardable(card,target,'dcfumou'); - },'h')) choices.push('选项二'); - else choiceList[1]=''+choiceList[1]+''; - if(target.countCards('e')&&!target.hasCard(card=>{ - return !lib.filter.cardDiscardable(card,target,'dcfumou'); - },'h')) choices.push('选项三'); - else choiceList[2]=''+choiceList[2]+''; - if(choices.length){ - target.chooseControl(choices).set('prompt','腹谋:请选择一项').set('choiceList',choiceList).set('ai',()=>{ - return _status.event.choice; - }).set('choice',function(){ - if(choices.length==1) return choices[0]; - var func=(choice,target)=>{ - switch(choice){ - case '选项一': - if(target.canMoveCard(true)) return 5; - return 3; - case '选项二': - if(target.countCards('h')<2&&get.value(target.getCards('h')[0])<6) return 4.5; - return 4.5-target.countCards('h'); - case '选项三': - var e2=target.getEquip(2); - if(target.hp+target.countCards('hs',['tao','jiu'])<2&&!e2) return 5.5; - if(get.recoverEffect(target,target,target)<=0) return 3; - if(!e2) return 4.4; - return 5-1.5*target.countCards('e'); - } - } - var choicesx=choices.map(i=>[i,func(i,target)]).sort((a,b)=>b[1]-a[1]); - return choicesx[0][0]; - }()); - } - else event.goto(5); - 'step 4' - game.log(target,'选择了','#y'+result.control); - if(result.control=='选项一'){ - target.moveCard(true); - } - else if(result.control=='选项二'){ - target.chooseToDiscard(true,'h',target.countCards('h')); - target.draw(2); - } - else{ - target.chooseToDiscard(true,'e',target.countCards('e')); - target.recover(); - } - 'step 5' - if(event.targets.length) event.goto(3); - else if(event.num) 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==2&&target.hasFriend()) return [1,num*1.5]; - if(target.hp>=2) return [1,num]; - } - }, - }, - } - }, - //孟优 - dcmanzhi:{ - audio:2, - trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, - filter:function(event,player){ - if(event.name=='phaseJieshu'){ - var del=0; - game.getGlobalHistory('changeHp',evt=>{ - if(evt.player!=player) return; - for(var phase of lib.phaseName){ - var evtx=evt.getParent(phase); - if(evtx&&evtx.name==phase) del+=evt.num; - } - }); - if(del!=0) return false; - } - return game.hasPlayer(current=>{ - if(current==player) return false; - return !player.hasSkill('dcmanzhi_1')&¤t.countCards('he')||!player.hasSkill('dcmanzhi_2')&¤t.countCards('hej'); - }) - }, - direct:true, - content:function(){ - 'step 0' - if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); - player.chooseTarget(get.prompt2('dcmanzhi'),(card,player,target)=>{ - if(player==target) return false; - return !player.hasSkill('dcmanzhi_1')&&target.countCards('he')||!player.hasSkill('dcmanzhi_2')&&target.countCards('hej'); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - var choices=[]; - var choiceList=[ - '令其交给你两张牌,然后其视为使用一张无距离限制的【杀】', - '你获得其区域内的至多两张牌,然后交给其等量的牌并摸一张牌' - ]; - var chosen=[player.hasSkill('dcmanzhi_1'),player.hasSkill('dcmanzhi_2')]; - if(target.countCards('he')&&(!chosen[0]||trigger.name=='phaseZhunbei')) choices.push('选项一'); - else choiceList[0]=''+choiceList[0]+(chosen[0]?'(已被选择过)':'')+''; - if(target.countCards('hej')&&(!chosen[1]||trigger.name=='phaseZhunbei')) choices.push('选项二'); - else choiceList[1]=''+choiceList[1]+(chosen[1]?'(已被选择过)':'')+''; - if(trigger.name=='phaseJieshu') choices.push('cancel2'); - player.chooseControl(choices).set('choiceList',choiceList).set('ai',()=>{ - return _status.event.choice; - }).set('choice',function(){ - if(target.getUseValue({name:'sha'},false)>5&&!player.hasShan()&&trigger.name=='phaseZhunbei') return 1; - return 0; - }()).set('prompt','蛮智:请选择一项'); - } - else{ - if(_status.connectMode){game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()});} - event.finish(); - } - 'step 2' - if(_status.connectMode){game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()});} - if(result.control=='cancel2'){event.finish();return;} - player.logSkill('dcmanzhi',target); - if(result.control=='选项一'){ - player.addTempSkill('dcmanzhi_1'); - target.chooseCard(2,'he','蛮智:请交给'+get.translation(player)+'两张牌'); - } - else{ - player.addTempSkill('dcmanzhi_2'); - player.gainPlayerCard(target,'hej',[1,2],true); - event.goto(5); - } - 'step 3' - if(result.bool){ - target.give(result.cards,player); - } - else event.finish(); - 'step 4' - target.chooseUseTarget('sha',true,'nodistance'); - event.finish(); - 'step 5' - if(result.bool&&target.isIn()){ - var num=result.cards.length,hs=player.getCards('he'); - if(!hs.length) event.finish(); - else if(hs.length{ - return current!=player&&event.player.inRange(current)&¤t.isDamaged(); - }); - }, - direct:true, - forced:true, - charlotte:true, - content:function(){ - 'step 0' - player.chooseTarget('救陷:是否令其攻击范围内的一名其他角色回复1点体力?',(card,player,target)=>{ - if(_status.event.player==target) return false; - return target.isDamaged()&&_status.event.targetx.inRange(target); - }).set('targetx',trigger.player).set('ai',target=>get.recoverEffect(target,_status.event.player,_status.event.player)); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcctjiuxian_help',target); - target.recover(player); - } - } - } - } - }, - dcchenyong:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - frequent:true, - filter:function(event,player){ - return player.getHistory('useCard').length; - }, - content:function(){ - var types=[]; - var history=player.getHistory('useCard'); - for(var evt of history){ - types.add(get.type2(evt.card)); - } - var num=types.length; - player.draw(num); - }, - ai:{threaten:2.2} - }, - //孙綝 - dczigu:{ - audio:2, - enable:'phaseUse', - usable:1, - filterCard:true, - position:'he', - selectCard:1, - check:function(card){ - var player=_status.event.player; - if(!player.hasSkill('dczuowei')) return 6-get.value(card); - if(player.countCards('h')==player.countCards('e')+1&&!player.hasCard(card=>player.hasValueTarget(card),'h')){ - if(get.position(card)=='e') return 0; - return 8-get.value(card); - } - return 6-get.value(card); - }, - content:function(){ - 'step 0' - var targets=game.filterPlayer(current=>{ - return current.countGainableCards(player,'e'); - }); - if(targets.length==0) event._result={bool:false}; - else if(targets.length==1) event._result={bool:true,targets:targets}; - else player.chooseTarget('自固:获得一名角色装备区里的一张牌',true,(card,player,target)=>{ - return target.countGainableCards(player,'e'); - }).set('ai',target=>{ - if(target==_status.event.player) return 10; - if(get.attitude(_status.event.player,target)<0){ - if(target.hasCard(card=>{ - return get.value(card,player)>=6; - })) return 12; - return 8; - } - return 0; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.gainPlayerCard('e',target,true); - } - 'step 2' - if(!result.bool||target==player||!result.cards||!result.cards.some(i=>get.owner(i)==player)) player.draw(); - }, - ai:{ - order:function(item,player){ - if(!player.hasSkill('dczuowei')) return 9; - if(player.countCards('h')==player.countCards('e')+1&&!player.hasCard(card=>player.hasValueTarget(card),'h')) return 9; - return 1; - }, - result:{ - player:1 - } - } - }, - dczuowei:{ - audio:2, - trigger:{player:'useCard'}, - filter:function(event,player){ - return !player.hasSkill('dczuowei_ban')&&_status.currentPhase==player; - }, - direct:true, - locked:false, - content:function(){ - 'step 0' - var hs=player.countCards('h'); - var es=Math.max(1,player.countCards('e')); - var sign=Math.sign(hs-es); - event.sign=sign; - if(sign>0) player.chooseBool(get.prompt('dczuowei'),'令'+get.translation(trigger.card)+'不可被响应').set('ai',()=>1); - else if(sign==0) player.chooseTarget(get.prompt('dczuowei'),'对一名其他角色造成1点伤害',lib.filter.notMe).set('ai',target=>{ - return get.damageEffect(target,_status.event.player,_status.event.player); - }); - else player.chooseBool(get.prompt('dczuowei'),'摸两张牌,然后此技能于本回合失效').set('ai',()=>1); - 'step 1' - if(!result.bool) event.finish() - else if(event.sign<=0&&!event.isMine()&&!event.isOnline()) game.delayx(); - 'step 2' - var sign=event.sign; - if(sign>0){ - player.logSkill('dczuowei'); - trigger.directHit.addArray(game.players); - event.finish(); - } - else if(sign==0){ - var target=result.targets[0]; - player.logSkill('dczuowei',target); - target.damage(); - } - else{ - player.logSkill('dczuowei'); - player.draw(2); - player.addTempSkill('dczuowei_ban'); - } - }, - subSkill:{ - ban:{charlotte:true} - }, - mod:{ - aiOrder:function(player,card,num){ - if(player.hasSkill('dczuowei_ban')||_status.currentPhase!=player) return; - var cardsh=[],cardse=[]; - if(Array.isArray(card.cards)){ - cardsh.addArray(card.cards.filter(i=>get.position(i)=='h')); - cardse.addArray(card.cards.filter(i=>get.position(i)=='e')); - } - if(_status.currentPhase==player){ - if(get.tag(card,'draw')||get.tag(card,'gain')){ - if(player.countCards('h')-cardsh.length<=Math.max(1,player.countCards('e'))-cardse.length+(get.type(card)=='equip')) return num+10; - return num/5; - } - } - }, - }, - ai:{ - threaten:3, - reverseEquip:true, - effect:{ - player_use:function(card,player,target,current){ - if(player.hasSkill('dczuowei_ban')||_status.currentPhase!=player) return; - if(get.type(card)=='equip'&&get.cardtag(card,'gifts')) return; - if(player.countCards('h')>Math.max(1,player.countCards('e'))) return [1,3]; - } - } - } - }, - //孙瑜 - dcquanshou:{ - audio:2, - trigger:{global:'phaseBegin'}, - filter:function(event,player){ - return event.player.countCards('h')0||event.player.maxHp-event.player.countCards('h')<=2; - }, - content:function(){ - 'step 0' - var draw=Math.min(5,trigger.player.maxHp-trigger.player.countCards('h')); - trigger.player.chooseControl().set('choiceList',[ - (draw>0?'摸'+get.cnNumber(draw)+'张牌,然后':'令')+'你本回合使用【杀】的次数上限-1', - '当你本回合使用牌被抵消后,'+get.translation(player)+'摸一张牌' - ]).set('ai',()=>_status.event.choice).set('choice',function(){ - var draw=Math.min(5,Math.max(0,trigger.player.maxHp-trigger.player.countCards('h'))); - if(get.attitude(trigger.player,player)>0){ - if(draw>=3||trigger.player.getCardUsable('sha')>1) return '选项一'; - if(draw<=1&&trigger.player.countCards('hs',card=>{ - return get.name(card)=='sha'&&trigger.player.hasValueTarget(card); - })) return '选项二'; - return '选项一'; - } - else{ - if(draw>=4) return '选项一'; - if(draw<2&&trigger.player.countCards('hs',card=>{ - return trigger.player.hasValueTarget(card); - })) return '选项二'; - return '选项一'; - } - }()).set('prompt','劝守:请选择一项'); - 'step 1' - game.log(trigger.player,'选择了','#y'+result.control); - if(result.control=='选项一'){ - var draw=Math.min(5,trigger.player.maxHp-trigger.player.countCards('h')); - if(draw>0) trigger.player.draw(draw); - trigger.player.addTempSkill('dcquanshou_sha'); - trigger.player.addMark('dcquanshou_sha',1,false); - } - else{ - trigger.player.addTempSkill('dcquanshou_respond'); - trigger.player.markAuto('dcquanshou_respond',[player]); - } - }, - ai:{ - expose:0.1 - }, - subSkill:{ - sha:{ - charlotte:true, - onremove:true, - marktext:'守', - intro:{content:'使用【杀】的次数上限-#'}, - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return num-player.countMark('dcquanshou_sha'); - }, - } - }, - respond:{ - trigger:{player:['shaMiss','eventNeutralized']}, - filter:function(event,player){ - if(event.type!='card'&&event.name!='_wuxie') return false; - return player.getStorage('dcquanshou_respond').some(i=>i.isIn()); - }, - forced:true, - popup:false, - charlotte:true, - onremove:true, - marktext:'守', - intro:{content:'本回合使用的牌被抵消后,$摸一张牌'}, - content:function(){ - var targets=player.getStorage('dcquanshou_respond'); - targets.sortBySeat(); - for(var target of targets){ - if(target.isIn()){ - target.logSkill('dcquanshou_respond',player); - target.draw(); - } - } - } - } - } - }, - dcshexue:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ - var card=lib.skill.dcshexue.getLast(); - return card&&player.hasUseTarget(card); - }, - getLast:function(){ - for(var current of game.filterPlayer()){ - var history=current.actionHistory; - if(history.length<2) continue; - if(history[history.length-2].isMe){ - var evts=history[history.length-2].useCard; - for(var i=evts.length-1;i>=0;i--){ - var evt=evts[i]; - if(get.type(evt.card)!='basic'&&get.type(evt.card)!='trick') continue; - var evtx=evt.getParent('phaseUse'); - if(evtx&&evtx.player==current){ - return {name:evt.card.name,nature:evt.card.nature}; - } - } - } - } - return null; - }, - direct:true, - group:'dcshexue_end', - content:function(){ - var card=lib.skill.dcshexue.getLast(); - game.broadcastAll(function(card){ - lib.skill.dcshexue_backup.viewAs=card; - lib.skill.dcshexue_backup.prompt='设学:是否将一张牌当做'+get.translation(card)+'使用?'; - },card); - var next=player.chooseToUse(); - next.set('openskilldialog','设学:是否将一张牌当做'+get.translation(card)+'使用?'); - next.set('norestore',true); - next.set('addCount',false); - next.set('_backupevent','dcshexue_backup'); - next.set('custom',{ - add:{}, - replace:{window:function(){}} - }); - next.backup('dcshexue_backup'); - }, - subSkill:{ - backup:{ - audio:'dcshexue', - filterCard:function(card){ - return get.itemtype(card)=='card'; - }, - position:'hes', - selectCard:1, - check:(card)=>6-get.value(card), - popname:true, - }, - end:{ - audio:'dcshexue', - trigger:{player:'phaseUseEnd'}, - filter:function(event,player){ - return player.getHistory('useCard',evt=>{ - return evt.getParent('phaseUse')==event&&(get.type(evt.card)=='basic'||get.type(evt.card)=='trick'); - }).length; - }, - prompt2:function(event,player){ - var history=player.getHistory('useCard',evt=>{ - return evt.getParent('phaseUse')==event&&(get.type(evt.card)=='basic'||get.type(evt.card)=='trick'); - }); - var card=history[history.length-1].card; - return '令下一回合的角色于其出牌阶段开始时选择是否将一张牌当做'+(get.translation(card.nature)||'')+'【'+get.translation(card.name)+'】使用'; - }, - content:function(){ - var history=player.getHistory('useCard',evt=>{ - return evt.getParent('phaseUse')==trigger&&(get.type(evt.card)=='basic'||get.type(evt.card)=='trick'); - }); - var card=history[history.length-1].card; - card={name:card.name,nature:card.nature}; - player.addSkill('dcshexue_studyclear'); - if(!player.storage.dcshexue_studyclear) player.storage.dcshexue_studyclear=[]; - player.storage.dcshexue_studyclear.push(card); - } - }, - study:{ - trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ - return player.getStorage('dcshexue_study').some(i=>event.player.hasUseTarget(i)); - }, - onremove:true, - charlotte:true, - direct:true, - content:function(){ - 'step 0' - event.cards=player.getStorage('dcshexue_study'); - 'step 1' - var card=cards.pop(); - if(trigger.player.hasUseTarget(card)){ - game.broadcastAll(function(card){ - lib.skill.dcshexue_backup.viewAs=card; - lib.skill.dcshexue_backup.prompt='设学:是否将一张牌当做'+get.translation(card)+'使用?'; - },card); - var next=trigger.player.chooseToUse(); - next.set('openskilldialog','设学:是否将一张牌当做'+get.translation(card)+'使用?'); - next.set('norestore',true); - next.set('addCount',false); - next.set('_backupevent','dcshexue_backup'); - next.set('custom',{ - add:{}, - replace:{window:function(){}} - }); - next.backup('dcshexue_backup'); - } - if(cards.length) event.redo(); - } - }, - studyclear:{ - trigger:{global:'phaseBegin'}, - charlotte:true, - forceDie:true, - silent:true, - onremove:true, - lastDo:true, - content:function(){ - trigger.player.addTempSkill('dcshexue_study'); - if(!trigger.player.storage.dcshexue_study) trigger.player.storage.dcshexue_study=[]; - trigger.player.storage.dcshexue_study=trigger.player.storage.dcshexue_study.concat(player.getStorage('dcshexue_studyclear')); - player.removeSkill('dcshexue_studyclear'); - } - } - } - }, - //郤正 - dcdanyi:{ - audio:2, - trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ - if(!event.isFirstTarget) return false; - if(!event.targets||!event.targets.length) return false; - var evt=lib.skill.dcjianying.getLastUsed(player,event.getParent()); - if(!evt||!evt.targets||!evt.targets.length||evt.targets.length!=event.targets.length) return false; - var targetsx=event.targets.slice().sort((a,b)=>a.seatNum-b.seatNum); - var targetsy=evt.targets.slice().sort((a,b)=>a.seatNum-b.seatNum); - for(var i=0;iplayer.canUse(card,current)); - if(targetsx.length!=targets.length) return; - } - else if(targets.length>=select[0]&&targets.length<=select[1]){ - var eff=0; - for(var i of targets){ - eff+=get.effect(i,card,player,player); - } - if(eff<0) return; - } - return num+10; - }, - }, - ai:{ - threaten:2.5, - effect:{ - player:function(card,player,target){ - if(player._dcdanyi_aiChecking) return; - player._dcdanyi_aiChecking=true; - var evt=lib.skill.dcjianying.getLastUsed(player),targets; - if(evt){ - targets=evt.targets; - var select=get.select(_status.event.selectTarget); - if(select[0]==-1){ - var targetsx=game.filterPlayer(current=>player.canUse(card,current)); - if(targetsx.length!=targets.length){ - delete player._dcdanyi_aiChecking; - return; - } - } - else if(targets.length>=select[0]&&targets.length<=select[1]){ - var eff=0; - for(var i of targets){ - eff+=get.effect(i,card,player,player); - } - if(eff<0){ - delete player._dcdanyi_aiChecking; - return; - } - } - } - delete player._dcdanyi_aiChecking; - if((targets||[]).contains(target)) return [1,1]; - } - }, - }, - }, - dcwencan:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - if(ui.selected.targets.length){ - if(ui.selected.targets[0].hp==target.hp) return false; - } - return target.hp!=player.hp; - }, - selectTarget:[1,2], - complexTarget:true, - multiline:true, - content:function(){ - 'step 0' - target.chooseToDiscard(get.translation(player)+'对你发动了【文灿】','是否弃置两张花色不同的牌?或者点击“取消”,令其本回合对你使用牌无次数限制','he',2,(card,player)=>{ - if(!ui.selected.cards.length) return true; - var suit=get.suit(card,player); - for(var i of ui.selected.cards){ - if(get.suit(i,player)==suit) return false; - } - return true; - }).set('complexCard',true).set('ai',card=>{ - if(_status.event.nofear) return 0; - return 5-get.value(card); - }).set('nofear',player.countCards('hs',card=>{ - return get.tag(card,'damage')&&player.canUse(card,target)&&get.effect(target,card,player,target)<=0; - })get.name(i,player))); - 'step 1' - if(target.countCards('h')>player.countCards('h')){ - player.addTempSkill('dcminze_ban','phaseUseAfter'); - } - }, - ai:{ - order:6.5, - expose:0.2, - }, - subSkill:{ - targeted:{onremove:true,charlotte:true}, - ban:{charlotte:true}, - given:{ - charlotte:true, - onremove:true, - intro:{ - content:'本回合以此法交出的牌名:$', - }, - }, - draw:{ - trigger:{player:'phaseJieshuBegin'}, - filter:function(event,player){ - return player.getStorage('dcminze_given').length; - }, - forced:true, - locked:false, - content:function(){ - var num=Math.min(5,player.getStorage('dcminze_given').length)-player.countCards('h'); - if(num>0) player.draw(num); - } - } - } - }, - dcjini:{ - audio:2, - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event,player){ - return player.maxHp-player.countMark('dcjini_counted')>0; - }, - content:function(){ - 'step 0' - player.chooseCard(get.prompt2('dcjini'),[1,player.maxHp-player.countMark('dcjini_counted')],(card,player,target)=>{ - var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player); - return mod=='unchanged'; - }).set('ai',card=>{ - return 6-get.value(card); - }); - 'step 1' - if(result.bool){ - var cards=result.cards; - player.logSkill('dcjini'); - player.addTempSkill('dcjini_counted'); - player.addMark('dcjini_counted',cards.length,false); - player.loseToDiscardpile(cards); - player.draw(cards.length); - } - else event.finish(); - 'step 2' - if(trigger.source&&trigger.source.isIn()&&Array.isArray(result)){ - for(var i of result){ - if(get.name(i,player)=='sha'&&get.owner(i)==player&&get.position(i)=='h'){ - player.chooseToUse(function(card,player,event){ - if(get.name(card)!='sha') return false; - return lib.filter.filterCard.apply(this,arguments); - },'击逆:是否对'+get.translation(trigger.source)+'使用一张不可被响应的杀?').set('complexSelect',true).set('filterTarget',function(card,player,target){ - if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; - return lib.filter.targetEnabled.apply(this,arguments); - }).set('sourcex',trigger.source).set('oncard',()=>{ - _status.event.directHit.addArray(game.players); - }); - break; - } - } - } - }, - subSkill:{ - counted:{ - onremove:true, - charlotte:true - } - } - }, - //乐綝 - dcporui:{ - audio:2, - trigger:{global:'phaseJieshuBegin'}, - filter:function(event,player){ - if(player==event.player) return false; - if(player.hasSkill('dcporui_round')) return false; - return game.hasPlayer(current=>{ - if(current==player||current==event.player) return false; - return current.getHistory('lose').length>0; - })&&(_status.connectMode||player.hasCard({type:'basic'},'h')); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseCardTarget({ - prompt:get.prompt('dcporui'), - //prompt2:'弃置一张基本牌并选择一名本回合失去过牌的非当前回合的其他角色,你视为对其依次使用'+get.cnNumber(Math.max(0,player.hp)+1)+'张【杀】', - prompt2:get.skillInfoTranslation('dcporui',player), - filterCard:function(card,player){ - if(get.type(card)!='basic') return false; - return lib.filter.cardDiscardable.apply(this,arguments); - }, - selectCard:1, - targets:game.filterPlayer(current=>{ - if(current==player||current==trigger.player) return false; - return current.getHistory('lose').length>0; - }), - filterTarget:function(card,player,target){ - return _status.event.targets.contains(target); - }, - ai1:function(card){ - return 7-get.value(card); - }, - ai2:function(target){ - return get.effect(target,{name:'sha'},_status.event.player,_status.event.player); - } - }); - 'step 1' - if(result.bool){ - var target=result.targets[0],cards=result.cards; - event.target=target; - player.logSkill('dcporui',target); - player.discard(cards); - event.num2=Math.max(0,player.hp); - event.num=event.num2+1; - player.addTempSkill('dcporui_round','roundStart'); - } - else event.finish(); - 'step 2' - var card={name:'sha',isCard:true,storage:{dcporui:true}}; - if(player.canUse(card,target,false)&&target.isIn()){ - player.useCard(card,target); - event.num--; - } - else event.goto(4); - 'step 3' - if(event.num>0) event.goto(2); - 'step 4' - if(!player.hasMark('dcgonghu_damage')){ - var cards=player.getCards('h'); - if(cards.length==0) event._result={bool:false}; - else if(cards.length<=event.num2) event._result={bool:true,cards:cards}; - else player.chooseCard('破锐:交给'+get.translation(target)+get.cnNumber(event.num2)+'张手牌',true,event.num2); - } - else event.goto(6) - 'step 5' - if(result.bool){ - player.give(result.cards,target); - } - 'step 6' - if(player.hasMark('dcgonghu_basic')){ - if(!target.hasHistory('damage',evt=>{ - return evt.card&&evt.card.storage&&evt.card.storage.dcporui&&evt.getParent('dcporui')==event; - })){ - player.recover(); - } - } - }, - subSkill:{ - round:{charlotte:true} - }, - ai:{ - expose:0.4, - threaten:4.8 - } - }, - dcgonghu:{ - audio:2, - trigger:{ - player:['loseAfter','damageEnd'], - source:'damageSource', - global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], - }, - forced:true, - filter:function(event,player){ - if(event.name=='damage'){ - if(player.hasMark('dcgonghu_damage')) return false; - return _status.currentPhase&&_status.currentPhase!=player; - } - if(player.hasMark('dcgonghu_basic')) return false; - var evt=event.getl(player); - return evt&&evt.cards2&&evt.cards2.some(i=>get.type2(i,player)=='basic'); - }, - group:['dcgonghu_basic','dcgonghu_trick'], - content:function(){ - player.addMark('dcgonghu_'+(trigger.name=='damage'?'damage':'basic'),1,false); - game.log(player,'修改了技能','#g【破锐】'); - }, - subSkill:{ - trick:{ - audio:'dcgonghu', - trigger:{player:'useCard2'}, - direct:true, - locked:true, - filter:function(event,player){ - if(!player.hasMark('dcgonghu_basic')||!player.hasMark('dcgonghu_damage')) return false; - var card=event.card; - if(get.color(card,false)!='red'||get.type(card,null,true)!='trick') return false; - var info=get.info(card); - if(info.allowMultiple==false) return false; - if(event.targets&&!info.multitarget){ - if(game.hasPlayer(function(current){ - return !event.targets.contains(current)&&lib.filter.targetEnabled2(card,player,current); - })){ - return true; - } - } - return false; - }, - content:function(){ - 'step 0' - var prompt2='为'+get.translation(trigger.card)+'增加一个目标' - player.chooseTarget(get.prompt('dcgonghu_trick'),function(card,player,target){ - var player=_status.event.player; - return !_status.event.targets.contains(target)&&lib.filter.targetEnabled2(_status.event.card,player,target); - }).set('prompt2',prompt2).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player); - }).set('card',trigger.card).set('targets',trigger.targets); - 'step 1' - if(result.bool){ - if(!event.isMine()&&!event.isOnline()) game.delayx(); - event.targets=result.targets; - } - else{ - event.finish(); - } - 'step 2' - if(event.targets){ - player.logSkill('dcgonghu_trick',event.targets); - trigger.targets.addArray(event.targets); - } - }, - }, - basic:{ - audio:'dcgonghu', - trigger:{player:'useCard'}, - forced:true, - filter:function(event,player){ - if(!player.hasMark('dcgonghu_basic')||!player.hasMark('dcgonghu_damage')) return false; - var card=event.card; - return (get.color(card,false)=='red'&&get.type(card,null,false)=='basic'); - }, - content:function(){ - trigger.directHit.addArray(game.filterPlayer()); - game.log(trigger.card,'不可被响应'); - }, - }, - } - }, - //张闿 - dcxiangshu:{ - audio:2, - trigger:{global:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return event.player!=player&&event.player.countCards('h')>=event.player.hp; - }, - content:function(){ - 'step 0' - var list=[0,1,2,3,4,5,'cancel2']; - player.chooseControl(list).set('prompt',get.prompt2('dcxiangshu')).set('ai',()=>{ - return _status.event.choice; - }).set('choice',function(){ - if(get.attitude(player,trigger.player)>0) return 'cancel2'; - var cards=trigger.player.getCards('h'); - var num=0; - for(var card of cards){ - if(!trigger.player.hasValueTarget(card)){ - num++; - if(num>=5) break; - } - } - if(cards.length>=3&&Math.random()<0.5) num=Math.max(0,num-1); - return num; - }()); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('dcxiangshu',trigger.player); - var num=result.index; - player.storage.dcxiangshu_lottery=num; - player.addTempSkill('dcxiangshu_lottery','phaseUseAfter'); - } - else event.finish(); - 'step 2' - player.chooseToDiscard('相鼠:是否弃置一张牌不公布此数字?').set('ai',card=>2-get.value(card)); - 'step 3' - if(!result.bool){ - var num=player.storage.dcxiangshu_lottery; - player.markSkill('dcxiangshu_lottery'); - player.popup(num); - game.log(player,'选择了数字','#g'+num); - } - }, - subSkill:{ - lottery:{ - audio:'dcxiangshu', - trigger:{global:'phaseUseEnd'}, - charlotte:true, - forced:true, - onremove:true, - logTarget:'player', - filter:function(event,player){ - return typeof player.storage.dcxiangshu_lottery=='number'&&Math.abs(event.player.countCards('h')-player.storage.dcxiangshu_lottery)<=1; - }, - content:function(){ - var delt=Math.abs(trigger.player.countCards('h')-player.storage.dcxiangshu_lottery); - if(delt<=1&&trigger.player.countGainableCards('he',player)>0){ - player.gainPlayerCard(trigger.player,'he',true); - } - if(delt==0){ - trigger.player.damage(player); - } - }, - intro:{content:'猜测的数字为#'} - } - } - }, - //芮姬 - dcwangyuan:{ - audio:2, - trigger:{ - player:['loseAfter','logSkill'], - global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], - }, - frequent:true, - filter:function(event,player,name){ - if(player==_status.currentPhase) return (name=='logSkill'&&event.skill=='dcliying'&&player.getExpansions('dcwangyuan').length=game.countPlayer()) return false; - if(event.name=='gain'&&event.player==player) return false; - var evt=event.getl(player); - return evt&&evt.cards2&&evt.cards2.length>0; - }, - content:function(){ - 'step 0' - var cards=player.getExpansions('dcwangyuan'); - var card=get.cardPile2(cardx=>{ - var type=get.type2(cardx); - return (type=='basic'||type=='trick')&&!cards.some(cardxx=>get.name(cardx,false)==get.name(cardxx,false)); - }); - if(card) player.addToExpansion(card,'gain2').gaintag.add('dcwangyuan'); - }, - marktext:'妄', - intro:{ - name:'妄(妄缘/铃音)', - content:'expansion', - markcount:'expansion', - }, - }, - dclingyin:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ - return player.getExpansions('dcwangyuan').length; - }, - direct:true, - content:function(){ - 'step 0' - var cards=player.getExpansions('dcwangyuan'); - player.chooseButton([ - get.prompt('dclingyin')+'(当前轮数:'+get.cnNumber(game.roundNumber,true)+')', - cards - ],[1,game.roundNumber]).set('ai',button=>{ - var color=_status.event.color,player=_status.event.player; - if(ui.selected.buttons.length>0&&ui.selected.buttons.length==player.getExpansions('dcwangyuan').length-1) return 0; - if(color==1) return get.value(button.link); - if(color) return get.color(button.link)==color?1:0; - return 0; - }).set('color',function(){ - var cardsR=cards.filter(i=>get.color(i)=='red'); - if(cardsR.length==cards.length||cardsR.length==0||cards.length<=game.roundNumber) return 1; - if(cardsR.length<=game.roundNumber) return 'red'; - if(cards.length-cardsR.length<=game.roundNumber) return 'black'; - return 1; - }()); - 'step 1' - if(result.bool){ - player.logSkill('dclingyin'); - var cards=result.links; - player.gain(cards,'gain2'); - var cardsx=player.getExpansions('dcwangyuan').removeArray(cards); - if(cardsx.length<=1||get.color(cardsx)!='none'){ - player.addTempSkill('dclingyin_effect'); - game.log(player,'获得了','#g【铃音】','的后续效果'); - } - } - }, - ai:{ - combo:'dcwangyuan', - threaten:3, - }, - subSkill:{ - effect:{ - audio:'dclingyin', - enable:'phaseUse', - trigger:{source:'damageBegin1'}, - viewAs:{name:'juedou'}, - charlotte:true, - forced:true, - prompt:'将一张武器牌或防具牌当【决斗】使用', - filterCard:function(card){ - return get.subtype(card)=='equip1'||get.subtype(card)=='equip2'; - }, - position:'hes', - filter:function(event,player){ - if(event.name=='chooseToUse') return player.countCards('hes',{subtype:['equip1','equip2']})>0; - return event.player!=player; - }, - content:function(){ - trigger.num++; - }, - ai:{ - damageBonus:true, - } - } - } - }, - dcliying:{ - audio:2, - usable:1, - trigger:{ - player:'gainAfter', - global:'loseAsyncAfter', - }, - filter:function(event,player){ - var cards=event.getg(player).filter(i=>get.owner(i)==player&&get.position(i)=='h'); - if(!cards.length) return false; - var evt=event.getParent('phaseDraw'); - if(evt&&evt.name=='phaseDraw') return false; - return true; - }, - direct:true, - content:function(){ - 'step 0' - var cards=trigger.getg(player).filter(i=>get.owner(i)==player&&get.position(i)=='h'); - player.chooseCardTarget({ - prompt:get.prompt('dcliying'), - prompt2:'选择本次获得的任意张牌交给一名其他角色,然后摸一张牌', - filterTarget:lib.filter.notMe, - filterCard:card=>_status.event.cards.contains(card), - cards:cards, - selectCard:[1,cards.length], - ai1:function(card){ - if(ui.selected.cards.length) return 0; - return 3/(Math.abs(get.value(card))+0.1) - }, - ai2:function(target){ - return get.value(ui.selected.cards,target)*get.attitude(_status.event.player,target); - }, - }).set('cards',cards); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcliying',target); - player.give(result.cards,target); - player.draw(); - //if(player!=_status.currentPhase) event.finish(); - } - else{ - player.storage.counttrigger.dcliying--; - event.finish(); - }/* - 'step 2' - var cards=player.getExpansions('dcwangyuan'); - var card=get.cardPile2(cardx=>{ - var type=get.type2(cardx); - return (type=='basic'||type=='trick')&&!cards.some(cardxx=>get.name(cardx,false)==get.name(cardxx,false)); - }); - if(card) player.addToExpansion(card,'gain2').gaintag.add('dcwangyuan');*/ - } - }, - //裴元绍 - dcmoyu:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return !player.hasSkill('dcmoyu_ban'); - }, - filterTarget:function(card,player,target){ - return player!=target&&!player.getStorage('dcmoyu_clear').contains(target)&&target.countGainableCards(player,'hej'); - }, - global:'dcmoyu_ai', - content:function(){ - 'step 0' - player.addTempSkill('dcmoyu_clear'); - player.markAuto('dcmoyu_clear',[target]); - player.gainPlayerCard(target,'hej',true); - 'step 1' - var num=player.getStorage('dcmoyu_clear').length; - target.chooseToUse(function(card,player,event){ - if(get.name(card)!='sha') return false; - return lib.filter.filterCard.apply(this,arguments); - },'是否对'+get.translation(player)+'使用一张【杀】(伤害基数为'+num+')?').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ - if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; - return lib.filter.filterTarget.apply(this,arguments); - }).set('sourcex',player).set('num',num).set('oncard',card=>{ - var evt=_status.event; - evt.baseDamage=evt.num; - }); - 'step 2' - if(result.bool){ - if(player.hasHistory('damage',evt=>{ - return evt.card&&evt.card.name=='sha'&&evt.getParent(4)==event; - })) player.addTempSkill('dcmoyu_ban'); - } - }, - subSkill:{ - clear:{ - charlotte:true, - onremove:true, - }, - ban:{charlotte:true}, - ai:{ - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='delay'&¤t<0){ - var currentx=_status.currentPhase; - if(!currentx||!currentx.isIn()) return; - var list=game.filterPlayer(current=>{ - if(current==target) return true; - if(!current.hasSkill('dcmoyu')) return false; - if(current.hasJudge('lebu')) return false; - return get.attitude(current,target)>0; - }); - list.sortBySeat(currentx); - if(list.indexOf(target)!=0) return 'zerotarget'; - } - }, - }, - } - } - }, - ai:{ - order:9, - threaten:2.4, - result:{ - target:function(player,target){ - var eff=get.effect(target,{name:'shunshou'},player,player); - if(eff>0) return eff/10; - if(player.hasShan()&&!target.hasSkillTag('directHit_ai',true,{ - target:player, - card:{name:'sha'}, - },true)) return eff; - if(player.getStorage('dcmoyu_clear').length||player.hp+player.countCards('hs','tao')<=1) return 0; - return eff; - } - } - } - }, - //张楚 - dcjizhong:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:lib.filter.notMe, - selectTarget:1, - content:function(){ - 'step 0' - target.draw(2); - 'step 1' - var marked=target.hasMark('dcjizhong'); - if(marked){ - if(target.countCards('h')) target.chooseToDiscard('集众:弃置三张手牌',3,true); - event.finish(); - } - else{ - target.chooseToDiscard('集众:弃置三张手牌,或点击“取消”获得“信众”标记',3); - } - 'step 2' - if(!result.bool){ - target.addMark('dcjizhong',1); - } - }, - marktext:'信', - intro:{ - name:'信众', - name2:'信众', - markcount:()=>0, - content:'已成为信徒', - }, - ai:{ - order:9.5, - result:{ - target:function(player,target){ - if(get.attitude(player,target)>0) return 1; - var num=target.countCards('h'); - if(num<=1) return -num; - return -1/(num/2+1); - } - } - } - }, - dcrihui:{ - audio:2, - trigger:{player:'useCardAfter'}, - usable:1, - filter:function(event,player){ - if(!event.targets||event.targets.length!=1||event.targets[0]==player) return false; - var card=event.card; - var target=event.targets[0]; - var marked=target.hasMark('dcjizhong'); - return (get.type(card)=='trick'||get.color(card)=='black'&&get.type(card)=='basic')&& - (marked||!marked&&game.hasPlayer(current=>current.hasMark('dcjizhong'))); - }, - direct:true, - content:function(){ - 'step 0' - var target=trigger.targets[0]; - var card={name:trigger.card.name,nature:trigger.card.nature,isCard:true}; - event.target=target; - event.card=card; - if(target.hasMark('dcjizhong')) player.gainPlayerCard(get.prompt('dcrihui',target),target,'hej').set('logSkill',['dcrihui',target]); - else{ - player.chooseBool(get.prompt('dcrihui',target),'令所有有“信众”的角色依次视为对其使用一张'+get.translation(card)).set('ai',()=>{ - return _status.event.bool; - }).set('bool',function(){ - var eff=0; - game.countPlayer(current=>{ - if(!current.hasMark('dcjizhong')) return; - eff+=get.effect(target,card,current,player); - }); - return eff>0; - }()); - } - 'step 1' - if(!result.bool){ - player.storage.counttrigger.dcrihui--; - event.finish(); - return; - } - if(target.hasMark('dcjizhong')) event.finish(); - else{ - player.logSkill('dcrihui',target); - event.targets=game.filterPlayer(current=>current.hasMark('dcjizhong')); - event.targets.sortBySeat(_status.currentPhase); - } - 'step 2' - var current=event.targets.shift(); - if(current.canUse(card,target,false)){ - current.useCard(card,target,false); - } - if(event.targets.length) event.redo(); - } - }, - dcguangshi:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - filter:function(event,player){ - return !game.hasPlayer(current=>current!=player&&!current.hasMark('dcjizhong')); - }, - forced:true, - content:function(){ - player.loseHp(); - player.draw(2); - } - }, - //董绾 - dcshengdu:{ - audio:2, - trigger:{player:'phaseBegin'}, - direct:true, - content:function(){ - 'step 0' - if(target) event._result={bool:true,targets:[target]}; - else player.chooseTarget(get.prompt2('dcshengdu'),lib.filter.notMe).set('ai',target=>{ - var player=_status.event.player; - var att=get.attitude(player,target); - var eff=get.effect(target,{ - name:'sha', - storage:{dcxianjiao:true}, - },player,player); - var value=att/5; - if(value<0) value=-value/1.3; - value=Math.max(value-eff/20,0.01); - var skills=target.getSkills(null,false,false); - for(var skill of skills){ - var str=get.skillInfoTranslation(skill,target); - if(/摸牌阶段[^少放弃]{0,8}摸/.test(str)) value+=Math.random()/2+1.5; - } - return value; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcshengdu',target); - target.addSkill('dcshengdu_effect'); - target.markAuto('dcshengdu_effect',[player]); - } - }, - subSkill:{ - effect:{ - trigger:{player:'gainAfter'}, - charlotte:true, - forced:true, - popup:false, - filter:function(event,player){ - return event.getParent(2).name=='phaseDraw'; - }, - content:function(){ - 'step 0' - var targets=player.getStorage('dcshengdu_effect'); - event.targets=targets.sortBySeat(player); - 'step 1' - var target=targets.shift(); - if(target.isIn()){ - target.logSkill('dcshengdu_effect',player); - target.draw(trigger.cards.length); - } - if(targets.length) event.redo(); - 'step 2' - player.removeSkill('dcshengdu_effect'); - game.delayx(); - }, - marktext:'绞', - intro:{ - content:'下个摸牌阶段获得牌后,$摸等量的牌' - } - } - } - }, - dcxianjiao:{ - audio:2, - enable:'phaseUse', - usable:1, - position:'hs', - viewAs:{ - name:'sha', - storage:{dcxianjiao:true} - }, - filterCard:function(card,player){ - if(ui.selected.cards.length){ - return get.color(card)!=get.color(ui.selected.cards[0]); - } - return true; - }, - selectCard:2, - complexCard:true, - check:function(card){ - return 6-get.value(card); - }, - precontent:function(){ - player.addTempSkill('dcxianjiao_after'); - event.getParent().addCount=false; - }, - ai:{ - order:function(item,player){ - return get.order({name:'sha'})+0.1; - }, - }, - locked:false, - mod:{ - targetInRange:function(card){ - if(card.storage&&card.storage.dcxianjiao) return true; - }, - }, - subSkill:{ - after:{ - trigger:{global:'useCardAfter'}, - forced:true, - direct:true, - charlotte:true, - filter:function(event,player){ - return event.card.name=='sha'&&event.card.storage&&event.card.storage.dcxianjiao; - }, - content:function(){ - 'step 0' - var damaged=game.hasPlayer2(current=>{ - return current.hasHistory('damage',evt=>evt.card==trigger.card); - }); - var targets=trigger.targets.filter(i=>i.isIn()); - player.logSkill('dcxianjiao_after',targets); - if(damaged){ - for(var target of targets){ - target.loseHp(); - } - } - else{ - for(var target of targets){ - var next=game.createEvent('dcshengdu',false); - next.player=player; - next.target=target; - next.setContent(lib.skill.dcshengdu.content); - } - } - } - } - } - }, - //袁胤 - dcmoshou:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - init:function(player,skill){ - if(typeof player.storage[skill]!='number') player.storage[skill]=0; - }, - filter:function(event,player){ - return get.color(event.card)=='black'&&event.player!=player; - }, - frequent:true, - prompt2:function(event,player){ - var num=player.getAllHistory('useSkill',evt=>evt.skill=='dcmoshou').length%3+1; - return '摸'+get.cnNumber(num)+'张牌'; - }, - content:function(){ - var num=player.getAllHistory('useSkill',evt=>evt.skill=='dcmoshou').length; - player.storage.dcmoshou=num; - player.syncStorage('dcmoshou'); - player.markSkill('dcmoshou'); - num=(num-1)%3+1; - player.draw(num); - }, - mark:true, - marktext:'守', - intro:{ - markcount:function(storage,player){ - if(typeof storage!='number') return 1; - return storage%3+1; - }, - content:'本局游戏已发动过$次技能', - } - }, - dcyunjiu:{ - audio:2, - trigger:{global:'dieAfter'}, - direct:true, - content:function(){ - 'step 0' - var evt=trigger.player.getHistory('lose',evtx=>{ - return evtx.getParent(2)==trigger; - })[0]; - if(!evt) event.finish(); - else{ - var cards=[]; - //冷知识,角色死亡后只有手牌区和装备区的牌是被系统弃置的,其余牌的处理方式均为置入弃牌堆 - cards.addArray(evt.hs).addArray(evt.es); - event.cards=cards.filterInD('d'); - var num=cards.length; - if(num){ - event.videoId=lib.status.videoId++; - var func=function(cards,id){ - var num=cards.length; - var dialog=ui.create.dialog(get.prompt('dcyunjiu'),'
    弃置'+get.cnNumber(num)+'张牌,令一名其他角色获得以下这些牌
    ',cards); - dialog.videoId=id; - return dialog; - }; - if(player.isOnline2()){ - player.send(func,cards,event.videoId); - } - event.dialog=func(cards,event.videoId); - if(player!=game.me||_status.auto){ - event.dialog.style.display='none'; - } - player.chooseCardTarget({ - prompt:false, - filterTarget:lib.filter.notMe, - filterCard:lib.filter.cardDiscardable, - selectCard:num, - position:'he', - goon:function(){ - if(!game.hasPlayer(current=>get.attitude(player,current))>0) return false; - var value=0; - for(var card of cards){ - value+=get.value(card,player,'raw')-1.2; - } - return value>0; - }(), - ai1:function(card){ - if(_status.event.goon){ - if(ui.selected.cards.length==_status.event.selectCard[1]-1&&ui.selected.cards.length>0) return 7-get.value(card); - return 5.5-get.value(card); - } - return 0; - }, - ai2:function(target){ - return get.attitude(_status.event.player,target)/Math.sqrt(target.countCards('h')+1); - } - }); - } - else event.finish(); - } - 'step 1' - if(player.isOnline2()){player.send('closeDialog',event.videoId)} - event.dialog.close(); - if(result.bool){ - var cardsx=result.cards,target=result.targets[0]; - player.logSkill('dcyunjiu',target); - player.discard(cardsx); - target.gain(cards.filterInD('d'),'gain2').giver=player; - } - else event.finish(); - 'step 2' - player.gainMaxHp(); - player.recover(); - } - }, - //谢灵毓 - dcyuandi:{ - audio:2, - trigger:{global:'useCard'}, - filter:function(event,player){ - var evt=event.getParent('phaseUse'); - if(!evt||evt.player!=event.player) return false; - if(event.player==player||!event.targets||event.targets.length>1||event.targets[0]!=event.player) return false; - return event.player.getHistory('useCard',evtx=>{ - return evtx.getParent('phaseUse')==evt; - }).indexOf(event)==0; - }, - direct:true, - global:'dcyuandi_ai', - content:function(){ - 'step 0' - var target=trigger.player; - var name=get.translation(target); - var choices=['选项二']; - var choiceList=['弃置'+name+'一张手牌','你与'+name+'各摸一张牌']; - if(target.countDiscardableCards(player,'h')) choices.unshift('选项一'); - else choiceList[0]=''+choiceList[0]+''; - player.chooseControl(choices,'cancel2').set('choiceList',choiceList).set('ai',()=>{ - return _status.event.choice; - }).set('prompt',get.prompt('dcyuandi',trigger.player)).set('choice',function(){ - if(get.attitude(player,target)<0){ - if(choices.contains('选项一')) return '选项一'; - return 'cancel2'; - } - return '选项二'; - }()); - 'step 1' - if(result.control!='cancel2'){ - var target=trigger.player; - player.logSkill('dcyuandi',target); - if(result.control=='选项一'){ - player.discardPlayerCard(target,'h',true); - } - else game.asyncDraw([target,player]); - } - }, - subSkill:{ - ai:{ - mod:{ - aiOrder:function(player,card,num){ - var info=get.info(card); - if(!info||!info.toself) return; - var evt=_status.event.getParent('phaseUse'); - if(!evt||evt.player!=player) return; - if(player.hasHistory('useCard',evtx=>evtx.getParent('phaseUse')==evt)) return; - if(game.hasPlayer(current=>{ - return current.hasSkill('dcyuandi')&&get.attitude(player,current)>=0; - })) return num+10; - return num/3; - }, - }, - }, - } - }, - dcxinyou:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h'){ - return evt.getParent(2)==event&&evt.cards.length>=2; - })) check|=1; - if(game.getGlobalHistory('changeHp',evt=>{ - return evt.getParent().name=='recover'&&evt.getParent(2)==event; - }).length) check|=2; - if(check>0){ - player.addTempSkill('dcxinyou_effect'); - player.storage.dcxinyou_effect=check; - } - }, - ai:{ - order:1, - result:{player:1} - }, - subSkill:{ - effect:{ - audio:'dcxinyou', - trigger:{player:'phaseJieshuBegin'}, - charlotte:true, - forced:true, - onremove:true, - filter:function(event,player){ - return player.storage.dcxinyou_effect; - }, - content:function(){ - if((player.storage.dcxinyou_effect&1)>0) player.loseHp(); - if((player.storage.dcxinyou_effect&2)>0) player.chooseToDiscard('心幽:弃置两张牌',2,true,'he'); - } - } - } - }, - //高翔 - dcchiying:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target.hp<=player.hp; - }, - content:function(){ - 'step 0' - var targets=game.filterPlayer(current=>target.inRange(current)&¤t!=player).sortBySeat(player); - event.targets=targets; - 'step 1' - var current=targets.shift(); - if(current.countCards('he')) current.chooseToDiscard('驰应:请弃置一张牌','he',true); - if(targets.length) event.redo(); - 'step 2' - if(target!=player){ - var cards=[]; - game.getGlobalHistory('cardMove',evt=>{ - if(evt.getParent(3)==event){ - cards.addArray(evt.cards.filter(card=>get.type(card)=='basic')); - } - }); - cards=cards.filterInD('d'); - if(cards.length) target.gain(cards,'gain2'); - } - }, - ai:{ - order:6, - result:{ - target:function(player,target){ - var targets=game.filterPlayer(current=>target.inRange(current)&¤t!=player); - var eff=0; - for(var targetx of targets){ - var effx=get.effect(targetx,{name:'guohe_copy2'},player,target); - if(get.attitude(player,targetx)<0) effx/=2; - eff+=effx; - } - return (target==player?0.5:1)*eff*(get.attitude(player,target)<=0?0.75:1); - } - } - } - }, - //笮融 - dccansi:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - content:function(){ - 'step 0' - player.recover(); - player.chooseTarget('残肆:选择一名其他角色',true,lib.filter.notMe).set('ai',target=>{ - var player=_status.event.player; - var list=['recover','sha','juedou','huogong']; - return list.reduce((p,c)=>{ - return p+get.effect(target,{name:c},player,player); - },0); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.line(target,'fire'); - target.recover(); - event.list=['sha','juedou','huogong']; - player.addTempSkill('dccansi_draw'); - player.storage.dccansi_draw=target; - } - else event.finish(); - 'step 2' - var card={name:event.list.shift(),isCard:true}; - if(player.canUse(card,target,false)) player.useCard(card,target,false); - if(event.list.length) event.redo(); - 'step 3' - player.removeSkill('dccansi_draw'); - }, - subSkill:{ - draw:{ - trigger:{global:'damageEnd'}, - forced:true, - charlotte:true, - onremove:true, - filter:function(event,player){ - return event.getParent(3).name=='dccansi'&&player.storage.dccansi_draw==event.player; - }, - content:function(){ - for(var i=0;i7; - }, - forced:true, - direct:true, - intro:{ - markcount:'expansion', - content:'expansion', - }, - content:function(){ - 'step 0' - var num=player.countCards('h')-7; - player.chooseCard('佛宗:将'+get.cnNumber(num)+'张手牌置于武将上',true,num); - 'step 1' - if(result.bool){ - var cards=result.cards; - player.logSkill('dcfozong'); - player.addToExpansion(cards,player,'give').gaintag.add('dcfozong'); - } - 'step 2' - var cards=player.getExpansions('dcfozong'); - if(cards.length<7) event.finish(); - else{ - event.targets=game.filterPlayer(i=>i!=player).sortBySeat(player); - game.delayx(); - } - 'step 3' - var target=targets.shift(); - event.target=target; - player.line(target); - var cards=player.getExpansions('dcfozong'); - if(!cards.length) event._result={bool:false}; - else target.chooseButton(['###佛宗###
    获得一张牌并令'+get.translation(player)+'回复1点体力,或点击“取消”令其失去1点体力
    ',cards]).set('ai',button=>{ - if(_status.event.refuse) return get.value(button.link)-7.5; - return get.value(button.link); - }).set('refuse',get.attitude(target,player)<1&&get.effect(player,{name:'losehp'},player,target)>0); - 'step 4' - if(result.bool){ - var card=result.links[0]; - target.gain(card,'give',player); - player.recover(target); - } - else player.loseHp(); - 'step 5' - if(targets.length) event.goto(3); - }, - ai:{halfneg:true} - }, - //周善 - dcmiyun:{ - audio:2, - trigger:{global:'roundStart'}, - forced:true, - direct:true, - group:'dcmiyun_lose', - content:function(){ - 'step 0' - if(player.hasCard(card=>card.hasGaintag('dcmiyun_tag'),'h')){ - player.chooseCardTarget({ - prompt:'密运:将包括“安”在内的任意张手牌交给一名其他角色', - forced:true, - filterTarget:lib.filter.notMe, - selectCard:[1,Infinity], - filterOk:function(){ - for(var card of ui.selected.cards){ - if(card.hasGaintag('dcmiyun_tag')) return true; - } - return false; - }, - goon:game.hasPlayer(current=>player!=current&&get.attitude(player,current)>0), - ai1:function(card){ - if(get.itemtype(card)!='card') return 0; - if(card.hasGaintag('dcmiyun_tag')) return 100; - if(_status.event.goon) return 8-get.value(card); - return -get.value(card); - }, - ai2:function(target){ - return get.attitude(_status.event.player,target); - } - }); - } - else event.goto(3); - 'step 1' - if(result.bool){ - var target=result.targets[0],cards=result.cards; - player.logSkill('dcmiyun',target); - player.give(cards,target); - } - else event.goto(3); - 'step 2' - player.drawTo(player.maxHp); - 'step 3' - if(game.hasPlayer(current=>current!=player&¤t.countGainableCards(player,'he'))){ - player.chooseTarget('密运:获得一名其他角色的一张牌,称为“安”',true,(card,player,target)=>{ - return target!=player&&target.countGainableCards(player,'he'); - }).set('ai',target=>{ - return get.effect(target,{name:'shunshou'},_status.event.player,_status.event.player); - }) - } - else event.finish(); - 'step 4' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcmiyun',target); - player.gainPlayerCard(target,true,'visibleMove').chooseonly=true; - } - else event.finish(); - 'step 5' - if(result.bool){ - player.gain(result.cards).gaintag.add('dcmiyun_tag'); - } - }, - mod:{ - aiValue:function(player,card,num){ - if(get.itemtype(card)=='card'&&card.hasGaintag('dcmiyun_tag')) return Math.abs(num)*10; - }, - aiUseful:function(){ - return lib.skill.dcmiyun.mod.aiValue.apply(this,arguments); - }, - aiOrder:function(player,card,num){ - if(get.itemtype(card)=='card'&&card.hasGaintag('dcmiyun_tag')) return 0; - } - }, - subSkill:{ - lose:{ - audio:'dcmiyun', - trigger:{ - player:'loseAfter', - global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], - }, - forced:true, - filter:function(event,player){ - if(event.getParent().name=='dcmiyun') return false; - var evt=event.getl(player); - if(!evt||!evt.cards2||!evt.cards2.length) return false; - if(event.name=='lose'){ - for(var i in event.gaintag_map){ - if(event.gaintag_map[i].contains('dcmiyun_tag')) return true; - } - return false; - } - return player.hasHistory('lose',evt=>{ - if(event!=evt.getParent()) return false; - for(var i in evt.gaintag_map){ - if(evt.gaintag_map[i].contains('dcmiyun_tag')) return true; - } - return false; - }); - }, - content:function(){ - player.loseHp(); - } - } - } - }, - dcdanying:{ - audio:2, - enable:['chooseToUse','chooseToRespond'], - usable:1, - hiddenCard:function(player,name){ - if(!_status.connectMode&&!player.hasCard(card=>card.hasGaintag('dcmiyun_tag'),'h')) return false; - return name=='sha'||name=='shan'; - }, - filter:function(event,player){ - if(event.type=='wuxie'||!player.hasCard(card=>card.hasGaintag('dcmiyun_tag'),'h')) return false; - for(var name of ['sha','shan']){ - if(event.filterCard({name:name,isCard:true},player,event)) return true; - } - return false; - }, - chooseButton:{ - dialog:function(event,player){ - var vcards=[]; - for(var name of ['sha','shan']){ - var card={name:name,isCard:true}; - if(event.filterCard(card,player,event)) vcards.push(['基本','',name]); - } - var dialog=ui.create.dialog('胆迎',[vcards,'vcard'],'hidden'); - dialog.direct=true; - return dialog; - }, - backup:function(links,player){ - return { - filterCard:()=>false, - selectCard:-1, - viewAs:{ - name:links[0][2], - isCard:true, - }, - popname:true, - precontent:function(){ - player.logSkill('dcdanying'); - player.showCards(player.getCards('h',card=>card.hasGaintag('dcmiyun_tag')),get.translation(player)+'的“安”'); - player.addTempSkill('dcdanying_discard'); - }, - } - }, - prompt:function(links,player){ - return '展示“安”,然后视为使用【'+get.translation(links[0][2])+'】'; - } - }, - ai:{ - order:function(item,player){ - var o1=get.order({name:'sha'}),o2=get.order({name:'shan'}); - if(player.countCards('h')>3||player==_status.currentPhase) return Math.max(o1,o2)+0.1; - return Math.min(o1,o2)-0.1; - }, - respondSha:true, - respondShan:true, - skillTagFilter:function(player,tag,arg){ - if(!player.hasCard(card=>card.hasGaintag('dcmiyun_tag'),'h')) return false; - }, - result:{ - player:1 - } - }, - subSkill:{ - discard:{ - trigger:{target:'useCardToTargeted'}, - charlotte:true, - forced:true, - filter:function(event,player){ - return player.countDiscardableCards(event.player,'he'); - }, - content:function(){ - trigger.player.discardPlayerCard(player,'he',true); - player.removeSkill('dcdanying_discard'); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(_status._dcdanying_aiChecking) return; - _status._dcdanying_aiChecking=true; - var eff=get.effect(target,{name:'guohe_copy2'},player,player); - delete _status._dcdanying_aiChecking; - if(eff>0) eff=-1; - else eff=1; - return [1,eff]; - } - } - } - } - }, - }, - //霍峻 - dcgue:{ - audio:2, - enable:['chooseToUse','chooseToRespond'], - hiddenCard:function(player,name){ - if(player.getStorage('dcgue').contains(_status.currentPhase)) return false; - return name=='sha'||name=='shan'; - }, - filter:function(event,player){ - //if(event.dcgue||event.type=='wuxie'||player==_status.currentPhase||player.getStorage('dcgue').contains(_status.currentPhase)) return false; - if(event.dcgue||event.type=='wuxie'||player==_status.currentPhase) return false; - if(!player.countCards('h')||player.hasSkill('dcgue_blocker',null,null,false)) return false; - for(var name of ['sha','shan']){ - if(event.filterCard({name:name,isCard:true},player,event)) return true; - } - return false; - }, - chooseButton:{ - dialog:function(event,player){ - var vcards=[]; - for(var name of ['sha','shan']){ - var card={name:name,isCard:true}; - if(event.filterCard(card,player,event)) vcards.push(['基本','',name]); - } - return ui.create.dialog('孤扼',[vcards,'vcard'],'hidden'); - }, - check:function(button){ - if(_status.event.player.countCards('h',{name:['sha','shan']})>1) return 0; - return 1; - }, - backup:function(links,player){ - return { - filterCard:()=>false, - selectCard:-1, - viewAs:{ - name:links[0][2], - isCard:true, - }, - popname:true, - precontent:function(){ - 'step 0' - player.logSkill('dcgue'); - player.addTempSkill('dcgue_blocker'); - player.showHandcards(); - delete event.result.skill; - 'step 1' - if(player.countCards('h',{name:['sha','shan']})>1){ - var evt=event.getParent(); - evt.set('dcgue',true); - evt.goto(0); - delete evt.openskilldialog; - return; - } - //else player.markAuto('dcgue',[_status.currentPhase]); - game.delayx(); - }, - } - }, - prompt:function(links,player){ - return '展示所有手牌'+(player.countCards('h',{name:['sha','shan']})<=1?',然后视为使用【'+get.translation(links[0][2])+'】':''); - } - }, - subSkill:{blocker:{charlotte:true}}, - //intro:{content:'已于$的回合发动过技能'}, - ai:{ - order:1, - respondSha:true, - respondShan:true, - skillTagFilter:function(player,tag,arg){ - //if(player.getStorage('dcgue').contains(_status.currentPhase)) return false; - if(player.countCards('h',{name:['sha','shan']})>1) return false; - }, - result:{ - player:function(player){ - if(player.countCards('h',{name:['sha','shan']})>1) return 0; - return 1; - } - } - } - }, - dcsigong:{ - audio:2, - trigger:{global:'phaseEnd'}, - filter:function(event,player){ - if(player.hasSkill('dcsigong_round')) return false; - if(event.player==player||!event.player.isIn()) return false; - if(!player.canUse('sha',event.player,false)) return false; - var respondEvts=[]; - game.countPlayer2(current=>respondEvts.addArray(current.getHistory('useCard')).addArray(current.getHistory('respond'))); - respondEvts=respondEvts.filter(i=>i.respondTo).map(evt=>evt.respondTo); - return event.player.hasHistory('useCard',evt=>{ - return respondEvts.some(list=>list[1]==evt.card); - }); - }, - direct:true, - content:function(){ - 'step 0' - var num=1-player.countCards('h'); - event.num=num; - var prompt2=''; - if(num>=0){ - var next=player.chooseBool().set('ai',()=>_status.event.goon); - prompt2+=(num>0?'摸一张牌,':'')+'视为对'+get.translation(trigger.player)+'使用一张【杀】(伤害基数+1)'; - } - else{ - var next=player.chooseToDiscard(-num).set('ai',card=>{ - if(_status.event.goon) return 5.2-get.value(card); - return 0; - }).set('logSkill',['dcsigong',trigger.player]); - prompt2+='将手牌数弃置至1,视为对'+get.translation(trigger.player)+'使用一张【杀】(伤害基数+1)'; - } - next.set('prompt',get.prompt('dcsigong',trigger.player)); - next.set('prompt2',prompt2); - next.set('goon',get.effect(trigger.player,{name:'sha'},player,player)>0); - 'step 1' - if(result.bool){ - if(num>=0) player.logSkill('dcsigong',trigger.player); - if(num>0) player.draw(num,'nodelay'); - event.num=Math.max(1,Math.abs(num)); - } - else event.finish(); - 'step 2' - if(player.canUse('sha',trigger.player,false)){ - player.addTempSkill('dcsigong_check'); - player.useCard({name:'sha',isCard:true},trigger.player,false).set('shanReq',num).set('oncard',card=>{ - var evt=_status.event; - evt.baseDamage++; - for(var target of evt.targets){ - var id=target.playerid; - var map=evt.customArgs; - if(!map[id]) map[id]={}; - map[id].shanRequired=evt.shanReq; - } - }); - } - }, - subSkill:{ - round:{charlotte:true}, - check:{ - charlotte:true, - forced:true, - popup:false, - trigger:{source:'damageSource'}, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&event.getParent(3).name=='dcsigong'; - }, - content:function(){ - player.addTempSkill('dcsigong_round','roundStart'); - } - } - } - }, //关宁 dcxiuwen:{ audio:2, @@ -4626,935 +901,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - //孙寒华 - dchuiling:{ - audio:2, - trigger:{player:'useCard'}, - forced:true, - direct:true, - filter:function(){ - return ui.discardPile.childNodes.length>0; - }, - onremove:true, - marktext:'灵', - intro:{ - name2:'灵', - content:'mark', - }, - content:function(){ - 'step 0' - var mark=false; - var red=0,black=0; - for(var i=0;iblack){ - player.logSkill('dchuiling'); - player.recover(); - event.finish(); - if(get.color(trigger.card)=='black') mark=true; - event.logged=true; - } - else{ - if(!event.isMine()&&!event.isOnline()) game.delayx(); - player.chooseTarget(get.prompt('dchuiling'),'弃置一名角色的一张牌',(card,player,target)=>{ - return target.countDiscardableCards(player,'he')>0; - }).set('ai',target=>{ - return get.effect(target,{name:'guohe_copy2'},_status.event.player); - }); - if(get.color(trigger.card)=='red') mark=true; - } - if(mark){ - if(!event.logged) player.logSkill('dchuiling'); - player.addMark('dchuiling',1); - event.logged=true; - } - 'step 1' - if(result.bool){ - var target=result.targets[0]; - if(!event.logged) player.logSkill('dchuiling',target); - else player.line(target); - player.discardPlayerCard(target,'he',true); - } - }, - mod:{ - aiOrder:function(player,card,num){ - if(get.itemtype(card)!='card') return; - var len=ui.discardPile.childNodes.length; - if(!len){ - var type=get.type(card); - if(type=='basic'||type=='trick'){ - if(player.getDamagedHp()>0){ - return num+(get.color(card)=='red'?15:10); - } - return num+10; - } - return; - } - if(len>40) return; - var red=0,black=0; - for(var i=0;i0){ - return num+(get.color(card)=='red'?15:10); - } - return num+10; - } - return; - } - else{ - var color=get.color(card); - if(color=='red'&&redblack) return num+10; - } - }, - } - }, - dcchongxu:{ - audio:2, - enable:'phaseUse', - limited:true, - skillAnimation:true, - animationColor:'wood', - derivation:['dctaji','dcqinghuang'], - filterCard:()=>false, - selectCard:[0,1], - prompt:function(){ - return '限定技。你可以失去〖汇灵〗,增加'+_status.event.player.countMark('dchuiling')+'点体力上限,然后获得〖踏寂〗和〖清荒〗。' - }, - filter:function(event,player){ - return player.countMark('dchuiling')>=4; - }, - content:function(){ - 'step 0' - player.awakenSkill('dcchongxu'); - player.gainMaxHp(player.countMark('dchuiling')); - player.removeSkill('dchuiling'); - 'step 1' - player.addSkillLog('dctaji'); - player.addSkillLog('dcqinghuang'); - }, - ai:{ - order:function(itemp,player){ - if(player.hasCard(card=>{ - return get.type(card)!='equip'&&player.getUseValue(card)>1; - },'h')) return 12; - return 0.1; - }, - result:{ - player:function(player){ - return (player.countMark('dchuiling')>=6||player.hp<=2)?1:0; - } - } - } - }, - dctaji:{ - audio:2, - trigger:{ - player:'loseAfter', - global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], - }, - forced:true, - locked:false, - filter:function(event,player){ - var evt=event.getl(player); - return evt&&evt.hs&&evt.hs.length; - }, - content:function(){ - 'step 0' - var evt=trigger.getParent(); - var effects=[ - ['useCard',function(){ - 'step 0' - var targets=game.filterPlayer(current=>{ - return current.countDiscardableCards(player,'he')&¤t!=player; - }); - if(!targets.length) event.finish(); - else player.chooseTarget('踏寂:弃置其他角色一张牌',true,(card,player,target)=>{ - return _status.event.targets.contains(target); - }).set('targets',targets).set('ai',target=>{ - return get.effect(target,{name:'guohe_copy2'},_status.event.player); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.line(target); - player.discardPlayerCard(target,'he',true); - } - }], - ['respond',function(){ - player.draw(); - }], - ['discard',function(){ - player.recover(); - }], - ['other',function(){ - player.addSkill('dctaji_damage'); - player.addMark('dctaji_damage',1,false); - game.log(player,'下一次对其他角色造成的伤害','#g+1'); - - }] - ]; - var name=evt.name; - if(trigger.name=='loseAsync') name=evt.type; - var list=['useCard','respond','discard','other']; - if(!list.contains(name)) name='other'; - for(var i=0;i<1+player.countMark('dcqinghuang_add');i++){ - if(!list.length) break; - if(!list.contains(name)) name=list.randomRemove(1)[0]; - if(name=='useCard') list.remove('useCard'); - for(var effect of effects){ - if(effect[0]==name){ - list.remove(name); - var next=game.createEvent('dctaji_'+name); - next.player=player; - next.setContent(effect[1]); - break; - } - } - } - }, - subSkill:{ - damage:{ - trigger:{source:'damageBegin3'}, - forced:true, - charlotte:true, - onremove:true, - filter:function(event,player){ - return event.player!=player; - }, - content:function(){ - trigger.num+=player.countMark('dctaji_damage'); - player.removeSkill('dctaji_damage'); - }, - intro:{ - content:'下次对其他角色造成伤害时,此伤害+#', - } - } - } - }, - dcqinghuang:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ - return player.maxHp>1; - }, - check:function(event,player){ - var num1=player.countCards('h'); - var num2=player.countCards('h',card=>player.hasValueTarget(card)); - var num3=player.getHandcardLimit(); - if(player.isDamaged()){ - return num2>1||num1-num2-num3>0; - } - else{ - return num2>2+Math.max(0,3-player.hp)||player.hp>2&&num1-num2-num3>2; - } - }, - content:function(){ - player.loseMaxHp(); - player.addTempSkill('dcqinghuang_add'); - player.addMark('dcqinghuang_add',1,false); - }, - subSkill:{ - add:{ - charlotte:true, - onremove:true, - } - } - }, - //孟节 - dcyinlu:{ - audio:2, - trigger:{ - global:'phaseBefore', - player:'enterGame', - }, - forced:true, - locked:false, - derivation:['dcyinlu_lequan','dcyinlu_huoxi','dcyinlu_zhangqi','dcyinlu_yunxiang'], - global:['dcyinlu_lequan','dcyinlu_huoxi','dcyinlu_zhangqi','dcyinlu_yunxiang'], - group:'dcyinlu_move', - filter:function(event,player){ - return (event.name!='phase'||game.phaseNumber==0); - }, - hasMark:function(target){ - return lib.skill.dcyinlu.derivation.some(i=>target.hasMark(i)); - }, - content:function(){ - 'step 0' - event.marks=lib.skill.dcyinlu.derivation.slice(0,3); - if(game.countPlayer()<=2) event.goto(3); - 'step 1' - player.chooseTarget('引路:令三名角色分别获得〖引路〗标记',true,3).set('targetprompt',()=>{ - return get.translation(lib.skill.dcyinlu.derivation[ui.selected.targets.length-1]); - }).set('complexSelect',true).set('ai',target=>{ - var player=_status.event.player; - if(ui.selected.targets.length==2) return get.effect(target,{name:'losehp'},player,player); - return get.attitude(player,target); - }); - 'step 2' - if(result.bool){ - var targets=result.targets; - player.line(targets); - for(var i=0;i
    【'+ - get.translation(mark)+'】
    '+lib.translate[mark+'_info']+'
    ']) - } - var target=game.filterPlayer(i=>i!=player)[0]; - event.target=target; - player.chooseButton(['引路:令'+get.translation(target)+'获得2枚〖引路〗标记',[list,'textbutton']]).set('ai',button=>{ - var mark=button.link; - if(mark=='dcyinlu_lequan') return 9; - if(mark=='dcyinlu_zhangqi') return 10; - return 8; - }).set('forced',true).set('selectButton',2).set('forcebutton',true); - 'step 4' - if(result.bool){ - var marks=result.links; - for(var mark of marks) target.addMark(mark,1); - event.marks.removeArray(marks); - for(var mark of event.marks) player.addMark(mark,1); - } - 'step 5' - player.addMark('dcyinlu_yunxiang',1); - player.addMark('dcyinlu_xiang',1); - game.log(player,'获得了1点芸香值'); - }, - subSkill:{ - move:{ - audio:'dcyinlu', - trigger:{ - player:'phaseZhunbeiBegin', - global:'die', - }, - direct:true, - filter:function(event,player){ - if(event.name=='die'){ - return lib.skill.dcyinlu.hasMark(event.player); - } - return game.hasPlayer(current=>{ - return lib.skill.dcyinlu.hasMark(current); - }) - }, - content:function(){ - 'step 0' - if(trigger.name=='die'){ - var marks=lib.skill.dcyinlu.derivation.filter(mark=>trigger.player.hasMark(mark)); - event.marks=marks; - event.goto(3); - } - else{ - if(_status.connectMode) game.broadcastAll(function(){_status.noclearcountdown=true}); - player.chooseTarget(get.prompt('dcyinlu_move'),'移动一名角色的〖引路〗标记',2,(card,player,target)=>{ - if(ui.selected.targets.length==0) return lib.skill.dcyinlu.hasMark(target); - return true; - }).set('ai',target=>{ - var player=_status.event.player; - if(ui.selected.targets.length==0){ - var owned=lib.skill.dcyinlu.derivation.filter(i=>target.hasMark(i)); - var att=get.attitude(player,target); - if(att>0){ - if(owned.contains('dcyinlu_zhangqi')) return target.hasCard({suit:'spade'},'he')?5:10; - if(owned.contains('dcyinlu_lequan')&&target.isHealthy()&&game.hasPlayer(current=>{ - return current!=target&&get.recoverEffect(current,player,player)>0; - })) return 2; - return 0; - } - if(att<0){ - if(owned.some(i=>i!='dcyinlu_zhangqi')) return 8; - return 0; - } - if(owned.contains('dcyinlu_zhangqi')&&game.hasPlayer(current=>{ - return current!=target&&get.effect(current,{name:'losehp'},player,player)>0; - })) return 3; - return 1; - } - else{ - var targetx=ui.selected.targets[0]; - var att=get.attitude(player,targetx),att2=get.attitude(player,target); - var owned=lib.skill.dcyinlu.derivation.filter(i=>targetx.hasMark(i)); - if(att>0){ - if(owned.contains('dcyinlu_zhangqi')) return -att2; - if(owned.contains('dcyinlu_lequan')) return get.recoverEffect(target,player,player); - } - else if(att<0){ - if(owned.some(i=>i!='dcyinlu_zhangqi')) return att2; - } - else{ - if(owned.contains('dcyinlu_zhangqi')) return get.effect(target,{name:'losehp'},player,player); - return att2; - } - } - return Math.random(); - }); - } - 'step 1' - if(result.bool){ - var marks=lib.skill.dcyinlu.derivation; - var targets=result.targets,owned=marks.filter(mark=>targets[0].hasMark(mark)); - event.targets=targets; - if(owned.length==1) event._result={bool:true,control:owned[0]}; - else{ - player.chooseControl(owned).set('prompt','引路:选择要移动'+get.translation(targets[0])+'的标记').set('choiceList',owned.map(mark=>{ - return '
    【'+get.translation(mark)+'】
    '+lib.translate[mark+'_info']+'
    '; - })).set('displayIndex',false).set('ai',()=>{ - return _status.event.choice; - }).set('choice',function(){ - var att=get.attitude(player,targets[0]),att2=get.attitude(player,targets[1]); - if(att>0){ - if(owned.contains('dcyinlu_zhangqi')&&att2<0) return 'dcyinlu_zhangqi'; - if(owned.contains('dcyinlu_lequan')&&att2>0) return 'dcyinlu_lequan'; - } - else if(att<0){ - var marksx=owned.filter(i=>i!='dcyinlu_zhangqi'); - if(marksx.length&&att2>0) return marksx[0]; - return owned[0]; - } - else{ - if(owned.contains('dcyinlu_zhangqi')) return 'dcyinlu_zhangqi'; - } - if(owned.length>1) owned.remove('dcyinlu_zhangqi'); - return owned[0]; - }()); - } - } - else{ - if(_status.connectMode) game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); - event.finish(); - } - 'step 2' - if(_status.connectMode) game.broadcastAll(function(){delete _status.noclearcountdown;game.stopCountChoose()}); - var mark=result.control,count=targets[0].countMark(mark); - player.logSkill('dcyinlu_move',targets,false); - player.line2(targets,mark=='dcyinlu_zhangqi'?'fire':'green'); - targets[0].removeMark(mark,count); - targets[1].addMark(mark,count); - event.finish(); - 'step 3' - player.chooseTarget('引路:是否转移“'+get.translation(event.marks[0])+'”标记?').set('ai',target=>{ - var player=_status.event.player,mark=_status.event.mark; - if(mark=='dcyinlu_zhangqi') return get.effect(target,{name:'losehp'},player,player)+0.1; - if(mark=='dcyinlu_lequan') return get.recoverEffect(target,player,player)+get.attitude(player,target)/5; - return get.attitude(player,target); - }).set('mark',event.marks[0]); - 'step 4' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcyinlu_move',target); - var count=trigger.player.countMark(event.marks[0]); - trigger.player.removeMark(event.marks[0],count,false); - target.addMark(event.marks[0],count); - } - 'step 5' - event.marks.shift(); - if(event.marks.length) event.goto(3); - } - }, - lequan:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - charlotte:true, - filter:function(event,player){ - return player.hasMark('dcyinlu_lequan')&&game.hasPlayer(current=>current.hasSkill('dcyinlu')); - }, - marktext:'乐', - intro:{ - name:'乐泉', - name2:'乐泉', - markcount:()=>0, - content:'结束阶段,你可以弃置一张♦牌并回复1点体力。' - }, - content:function(){ - 'step 0' - player.chooseToDiscard('乐泉:是否弃置一张♦牌并回复1点体力?',{suit:'diamond'},'he').set('ai',card=>{ - if(_status.event.goon) return 7-get.value(card); - return 0; - }).set('logSkill','dcyinlu_lequan').set('goon',get.recoverEffect(player,player)); - 'step 1' - if(result.bool){ - player.recover(); - } - } - }, - huoxi:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - charlotte:true, - filter:function(event,player){ - return player.hasMark('dcyinlu_huoxi')&&game.hasPlayer(current=>current.hasSkill('dcyinlu')); - }, - marktext:'藿', - intro:{ - name:'藿溪', - name2:'藿溪', - markcount:()=>0, - content:'结束阶段,你可以弃置一张♥牌并摸两张牌。' - }, - content:function(){ - 'step 0' - player.chooseToDiscard('藿溪:是否弃置一张♥牌并摸两张牌?',{suit:'heart'},'he').set('ai',card=>{ - return 6-get.value(card); - }).set('logSkill','dcyinlu_huoxi'); - 'step 1' - if(result.bool){ - player.draw(2); - } - }, - }, - zhangqi:{ - trigger:{player:'phaseJieshuBegin'}, - forced:true, - direct:true, - charlotte:true, - filter:function(event,player){ - return player.hasMark('dcyinlu_zhangqi')&&game.hasPlayer(current=>current.hasSkill('dcyinlu')); - }, - marktext:'瘴', - intro:{ - name:'瘴气', - name2:'瘴气', - markcount:()=>0, - content:'锁定技。结束阶段,你须弃置一张♠牌,否则失去1点体力。' - }, - content:function(){ - 'step 0' - player.chooseToDiscard('瘴气:弃置一张♠牌,或失去1点体力',{suit:'spade'},'he').set('ai',card=>{ - if(_status.event.goon) return 7-get.value(card); - return 0; - }).set('logSkill','dcyinlu_zhangqi').set('goon',get.effect(player,{name:'losehp'},player)<0); - 'step 1' - if(!result.bool){ - player.logSkill('dcyinlu_zhangqi'); - player.loseHp(); - } - } - }, - yunxiang:{ - trigger:{player:['phaseJieshuBegin','damageBegin4']}, - direct:true, - charlotte:true, - filter:function(event,player){ - if(!game.hasPlayer(current=>current.hasSkill('dcyinlu'))) return false; - if(event.name=='phaseJieshu') return player.hasMark('dcyinlu_yunxiang'); - return player.hasMark('dcyinlu_yunxiang')&&player.hasMark('dcyinlu_xiang'); - }, - onremove:function(player){ - delete player.storage.dcyinlu_xiang; - }, - marktext:'芸', - intro:{ - name:'芸香', - name2:'芸香', - markcount:function(storage,player){ - return player.countMark('dcyinlu_xiang'); - }, - content:function(storage,player){ - return '①结束阶段,你可以弃置一张♣牌,获得1点“芸香”值。②当你受到伤害时,你可以扣减所有“芸香”值,减少等量的伤害。
  • 当前芸香值:'+player.countMark('dcyinlu_xiang'); - } - }, - content:function(){ - 'step 0' - if(trigger.name=='phaseJieshu'){ - player.chooseToDiscard('芸香:是否弃置一张♣牌,获得1枚“香”?',{suit:'club'},'he').set('ai',card=>{ - return 6-get.value(card)+2.5*_status.event.player.countMark('dcyinlu_xiang'); - }).set('logSkill','dcyinlu_yunxiang'); - } - else{ - player.chooseBool('芸香:是否移去所有“香”,令此伤害-'+player.countMark('dcyinlu_xiang')+'?').set('ai',()=>{ - return _status.event.bool; - }).set('bool',get.damageEffect(player,trigger.source,player)<0); - } - 'step 1' - if(result.bool){ - if(trigger.name=='phaseJieshu'){ - player.addMark('dcyinlu_xiang',1,false); - game.log(player,'获得了1点芸香值'); - } - else{ - player.logSkill('dcyinlu_yunxiang'); - var num=player.countMark('dcyinlu_xiang'); - player.removeMark('dcyinlu_xiang',num,false); - game.log(player,'扣减了',num,'点芸香值'); - trigger.num=Math.max(0,trigger.num-num); - } - } - } - } - } - }, - dcyouqi:{ - audio:2, - trigger:{global:'loseAfter'}, - filter:function(event,player){ - if(event.getParent(3).name.indexOf('dcyinlu_')!=0||player==event.player) return false; - return true; - }, - derivation:'dcyouqi_faq', - direct:true, - forced:true, - content:function(){ - if(Math.random()<1.25-0.25*get.distance(player,trigger.player)){ - player.logSkill('dcyouqi'); - player.gain(trigger.cards.filterInD('d'),'gain2'); - } - }, - }, - //孙资刘放 - dcqinshen:{ - audio:2, - trigger:{player:'phaseDiscardEnd'}, - frequent:true, - prompt2:function(){ - return '摸'+get.cnNumber(lib.skill.dcqinshen.getNum())+'张牌'; - }, - getNum:function(){ - var list=lib.suit.slice(); - game.getGlobalHistory('cardMove',function(evt){ - if(evt.name!='lose'&&evt.name!='cardsDiscard') return false; - if(evt.name=='lose'&&evt.position!=ui.discardPile) return false; - for(var card of evt.cards) list.remove(get.suit(card,false)); - }); - return list.length; - }, - filter:function(event,player){ - return lib.skill.dcqinshen.getNum()>0; - }, - content:function(){ - player.draw(lib.skill.dcqinshen.getNum()); - } - }, - dcweidang:{ - audio:2, - trigger:{global:'phaseJieshuBegin'}, - getLength:function(card){ - var name=get.translation(get.name(card)); - if(name=='挟令') name='挟天子以令诸侯'; - if(name=='霹雳投石车') name='霹雳车'; - return name.length; - }, - direct:true, - filter:function(event,player){ - var num=lib.skill.dcqinshen.getNum(); - return event.player!=player&&(_status.connectMode?player.countCards('he'):player.hasCard(card=>lib.skill.dcweidang.getLength(card)==num,'he')); - }, - content:function(){ - 'step 0' - var num=lib.skill.dcqinshen.getNum(); - event.num=num; - player.chooseCard(get.prompt('dcweidang'),'将一张字数为'+num+'的牌置于牌堆底,然后获得一张字数为'+num+'的牌。若你能使用此牌,你使用之。','he',(card,player,target)=>{ - return lib.skill.dcweidang.getLength(card)==_status.event.num; - }).set('num',num).set('ai',card=>{ - return 5-get.value(card); - }); - 'step 1' - if(result.bool){ - player.logSkill('dcweidang'), - player.lose(result.cards[0],ui.cardPile); - game.broadcastAll(function(player){ - var cardx=ui.create.card(); - cardx.classList.add('infohidden'); - cardx.classList.add('infoflip'); - player.$throw(cardx,1000,'nobroadcast'); - },player); - game.delayx(); - } - else event.finish(); - 'step 2' - var card=get.cardPile(cardx=>lib.skill.dcweidang.getLength(cardx)==num); - if(card){ - player.gain(card,'gain2'); - if(player.hasUseTarget(card)){ - player.chooseUseTarget(card,true); - } - } - } - }, - //滕芳兰 - dcluochong:{ - audio:2, - trigger:{global:'roundStart'}, - filter:function(event,player){ - return game.hasPlayer(current=>current.countDiscardableCards(player,'hej')>0); - }, - direct:true, - content:function(){ - 'step 0' - var num=4-player.countMark('dcluochong'); - var dialog=[]; - dialog.push('###'+get.prompt('dcluochong')+'###
    弃置任意名角色区域内共计至多'+get.cnNumber(num)+'张牌
    '); - game.filterPlayer().sortBySeat().forEach(target=>{ - if(target.countDiscardableCards(player,'hej')<=0) return false; - var name=(target==player?'你':get.translation(target)); - if(target.countCards('h')){ - dialog.add('
    '+name+'的手牌区
    '); - if(player.hasSkillTag('viewHandcard',null,target,true)||player==target) dialog.push(target.getCards('h')); - else dialog.push([target.getCards('h'),'blank']); - } - if(target.countCards('e')) dialog.addArray(['
    '+name+'的装备区
    ',target.getCards('e')]); - if(target.countCards('j')) dialog.addArray(['
    '+name+'的判定区
    ',target.getCards('j')]); - }); - player.chooseButton([1,num]).set('createDialog',dialog).set('filterButton',button=>{ - return lib.filter.canBeDiscarded(button.link,_status.event.player,get.owner(button.link)); - }).set('ai',button=>{ - var card=button.link; - var player=_status.event.player,target=get.owner(card); - if(target==player&&ui.cardPile.childNodes.length>80){ - if(ui.selected.buttons.some(i=>get.owner(i.link)==player)) return 0; - if(get.value(card,player)<6) return 60-get.value(card,player); - return 0; - } - var num=ui.selected.buttons.filter(i=>get.owner(i.link)==target).length; - return -(get.position(card)!='h'?get.value(card,target):(4.5+Math.random()-0.2*(num>2?1:0)))*get.attitude(player,target); - }); - 'step 1' - if(result.bool){ - var links=result.links; - var lose_list=[]; - var log=false; - for(var target of game.players){ - var cards=links.filter(card=>get.owner(card)==target); - if(cards.length){ - if(cards.length>2){ - player.addMark('dcluochong',1,false); - log=true; - } - lose_list.push([target,cards]); - } - } - player.logSkill('dcluochong',lose_list.map(i=>i[0])); - if(log) game.log(player,'可弃置牌数','#g-1'); - if(lose_list[0].length==1) lose_list[0][0].discard(lose_list[0][1]); - else{ - game.loseAsync({ - lose_list:lose_list, - discarder:player, - }).setContent('discardMultiple'); - } - } - }, - ai:{ - threaten:2.5, - effect:{ - target:function(card,player,target,current){ - if(get.type(card)=='delay'&¤t<0){ - var current=_status.currentPhase; - if(current.getSeatNum()>target.getSeatNum()) return 'zerotarget'; - } - }, - }, - }, - }, - dcaichen:{ - audio:2, - trigger:{ - player:['loseAfter','phaseDiscardBefore'], - global:'loseAsyncAfter', - target:'useCardToTargeted' - }, - filter:function(event,player,name){ - if(event.name=='phaseDiscard') return ui.cardPile.childNodes.length>40; - if(name=='useCardToTargeted') return ui.cardPile.childNodes.length<40&&get.suit(event.card)=='spade'; - if(event.getParent().name!='dcluochong') return false; - if(event.name=='loseAsync'&&!event.getl(player).cards.length) return false; - return ui.cardPile.childNodes.length>80; - }, - forced:true, - content:function(){ - if(trigger.name.indexOf('lose')==0) player.draw(2); - else if(trigger.name=='phaseDiscard'){ - trigger.cancel(); - game.log(player,'跳过了弃牌阶段'); - } - else{ - trigger.directHit.add(player); - game.log(player,'不可响应',trigger.card); - } - } - }, - //三袁 - dcneifa:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - content:function(){ - 'step 0' - player.draw(3); - player.chooseToDiscard(true,'he').set('ai',function(cardx){ - var player=_status.event.player; - var num=0; - var hs=player.getCards('h'); - var muniu=player.getEquip('muniu'); - if(muniu&&muniu.cards) hs=hs.concat(muniu.cards); - if(get.type(cardx)=='basic'){ - var shas=hs.filter(function(card){ - return card!=cardx&&get.name(card,player)=='sha'&&player.hasValueTarget(card,false); - }); - var numx=player.countCards('h',function(card){ - return get.type2(card,player)=='trick'; - }); - num+=Math.min(numx,Math.max(0,shas.length-player.getCardUsable('sha')))*0.65; - num+=Math.min(player.getCardUsable('sha')+numx,shas.filter(function(card){ - return game.countPlayer(function(current){ - return player.canUse(card,current)&&get.effect(current,card,player,player)>0; - })>1; - }).length)*1.1; - var taos=Math.min(player.maxHp-player.hp,hs.filter(function(card){ - return cardx!=card&&get.name(card,player)=='tao'; - }).length); - num+=taos*player.getDamagedHp()*1.2; - } - else if(get.type2(cardx)=='trick'){ - var numx=Math.sqrt(Math.min(5,player.countCards('h',function(card){ - return get.type(card,player)=='basic'; - }))); - num+=hs.filter(function(card){ - return card!=cardx&&get.type2(card)=='trick'&&player.hasValueTarget(card); - }).length*0.65; - } - else num=4; - return num*1.5-get.value(cardx); - }); - 'step 1' - if(result.bool&&result.cards&&result.cards.length&&get.type(result.cards[0])!='equip'){ - var name=get.type(result.cards[0])=='basic'?'dcneifa_basic':'dcneifa_trick'; - player.addTempSkill(name,'phaseUseAfter'); - var num=Math.min(5,player.countCards('h',function(cardx){ - var type=get.type(cardx,player); - return (name=='dcneifa_basic')!=(type=='basic')&&type!='equip'; - })); - if(num>0) player.addMark(name,num,false); - else player.storage[name]=0; - } - }, - ai:{ - threaten:2.33, - }, - }, - dcneifa_basic:{ - mark:true, - marktext:'伐', - onremove:true, - intro:{ - name:'内伐 - 基本牌', - content:'本回合内不能使用锦囊牌,且使用【杀】选择目标时可以多选择1个目标,且使用【杀】的目标次数上限+#。', - }, - mod:{ - cardEnabled:function(card,player){ - if(get.type(card,'trick')=='trick') return false; - }, - cardSavable:function(card,player){ - if(get.type(card,'trick')=='trick') return false; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha'){ - return num+player.countMark('dcneifa_basic'); - } - }, - }, - trigger:{player:'useCard2'}, - filter:function(event,player){ - if(event.card.name!='sha') return false; - return game.hasPlayer(function(current){ - return !event.targets.contains(current)&&player.canUse(event.card,current,false); - }); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('dcneifa'),'为'+get.translation(trigger.card)+'额外指定一个目标',function(card,player,target){ - return !_status.event.sourcex.contains(target)&&player.canUse(_status.event.card,target,false); - }).set('sourcex',trigger.targets).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,_status.event.card,player,player); - }).set('card',trigger.card); - 'step 1' - if(result.bool){ - if(!event.isMine()&&!event.isOnline()) game.delayx(); - event.targets=result.targets; - } - else{ - event.finish(); - } - 'step 2' - player.logSkill('dcneifa',event.targets); - trigger.targets.addArray(event.targets); - }, - }, - dcneifa_trick:{ - trigger:{player:'useCard2'}, - direct:true, - mark:true, - marktext:'伐', - onremove:true, - mod:{ - cardEnabled:function(card,player){ - if(get.type(card)=='basic') return false; - }, - cardSavable:function(card,player){ - if(get.type(card)=='basic') return false; - }, - }, - intro:{ - name:'内伐 - 锦囊牌', - content:'本回合内不能使用基本牌,且使用普通锦囊牌选择目标时可以多选择或者取消1个目标。' - }, - filter:function(event,player){ - if(get.type(event.card)!='trick') return false; - if(event.targets&&event.targets.length>0) return true; - var info=get.info(event.card); - if(info.allowMultiple==false) return false; - if(event.targets&&!info.multitarget){ - if(game.hasPlayer(function(current){ - return !event.targets.contains(current)&&lib.filter.targetEnabled2(event.card,player,current); - })){ - return true; - } - } - return false; - }, - content:function(){ - 'step 0' - var prompt2='为'+get.translation(trigger.card)+'增加或减少一个目标' - player.chooseTarget(get.prompt('dcneifa'),function(card,player,target){ - var player=_status.event.player; - if(_status.event.targets.contains(target)) return true; - return lib.filter.targetEnabled2(_status.event.card,player,target); - }).set('prompt2',prompt2).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player)*(_status.event.targets.contains(target)?-1:1); - }).set('targets',trigger.targets).set('card',trigger.card); - 'step 1' - if(result.bool){ - if(!event.isMine()&&!event.isOnline()) game.delayx(); - event.targets=result.targets; - } - else{ - event.finish(); - } - 'step 2' - if(event.targets){ - player.logSkill('dcneifa',event.targets); - if(trigger.targets.contains(event.targets[0])) trigger.targets.removeArray(event.targets); - else trigger.targets.addArray(event.targets); - } - } - }, //伏完 dcmoukui:{ audio:'moukui', @@ -5633,151 +979,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, - //杨彪 - dczhaohan:{ - audio:2, - trigger:{player:'phaseDrawBegin2'}, - frequent:true, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - trigger.num+=2; - trigger.dczhaohan=true; - player.addTempSkill('dczhaohan_choose','phaseDrawAfter'); - }, - subSkill:{ - choose:{ - trigger:{player:'gainAfter'}, - filter:function(event,player){ - return event.getParent(2).dczhaohan&&player.countCards('h')>=2; - }, - forced:true, - charlotte:true, - popup:false, - content:function(){ - 'step 0' - var choices=[],choiceList=[ - '将两张手牌交给一名没有手牌的角色', - '弃置两张手牌' - ]; - if(game.hasPlayer(current=>current.countCards('h')==0)) choices.push('选项一'); - else choiceList[0]=''+choiceList[0]+''; - choices.push('选项二'); - if(choices.length==1) event._result={control:'选项二'}; - else player.chooseControl(choices).set('choiceList',choiceList).set('ai',()=>_status.event.choice).set('choice',function(){ - if(game.hasPlayer(current=>{ - return current.countCards('h')==0&&get.attitude(player,current)>0; - })) return '选项一'; - return '选项二'; - }()); - 'step 1' - if(result.control=='选项一'){ - player.chooseCardTarget({ - filterCard:true, - selectCard:2, - forced:true, - filterTarget:function(card,player,target){ - return !target.countCards('h'); - }, - ai1:function(card){ - return 7-get.value(card); - }, - ai2:function(target){ - return get.attitude(_status.event.player,target); - }, - prompt:'将两张手牌交给一名没有手牌的角色' - }); - } - else{ - player.chooseToDiscard('昭汉:请弃置两张手牌',true,2); - event.finish(); - } - 'step 2' - if(result.bool){ - player.give(result.cards,result.targets[0]); - } - } - } - } - }, - dcjinjie:{ - audio:2, - trigger:{global:'dying'}, - hasPhase:function(player){ - var history=player.actionHistory; - for(var i=history.length-1;i>=0;i--){ - if(history[i].isMe) return true; - if(history[i].isRound) break; - } - return false; - }, - direct:true, - content:function(){ - 'step 0' - if(lib.skill.dcjinjie.hasPhase(player)){ - player.chooseBool(get.prompt('dcjinjie',trigger.player),'令其摸一张牌').set('ai',()=>{ - return get.attitude(_status.event.player,_status.event.getTrigger().player)>0; - }); - } - else{ - var num=0; - var history=player.actionHistory; - for(var i=history.length-1;i>=0;i--){ - for(var evt of history[i].useSkill){ - if(evt.skill=='dcjinjie') num++; - } - if(history[i].isRound) break; - } - if(num==0){ - player.chooseBool(get.prompt('dcjinjie',trigger.player),'令其回复1点体力').set('ai',()=>{ - var player=_status.event.player; - return get.effect(_status.event.getTrigger().player,{name:'tao'},player,player)>0; - }); - } - else{ - player.chooseToDiscard(get.prompt('dcjinjie',trigger.player),'弃置'+get.cnNumber(num)+'张牌,令其回复1点体力','he',num).set('ai',card=>{ - if(_status.event.eff>0) return get.value({name:'tao'})-get.value(card); - return 0; - }).set('eff',get.effect(trigger.player,{name:'tao'},player,player)).set('logSkill',['dcjinjie',trigger.player]); - } - event.goto(2); - } - 'step 1' - if(result.bool){ - player.logSkill('dcjinjie',trigger.player); - trigger.player.draw(); - } - event.finish(); - 'step 2' - if(result.bool){ - if(!result.cards||!result.cards.length) player.logSkill('dcjinjie',trigger.player); - trigger.player.recover(); - } - }, - }, - dcjue:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(current=>current.isHealthy()&&player.canUse('sha',current,false)); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('dcjue'),'视为对一名未受伤的角色使用一张【杀】',(card,player,target)=>{ - return player.canUse('sha',target,false)&&target.isHealthy(); - }).set('ai',target=>{ - return get.effect(target,{name:'sha'},_status.event.player); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcjue',target); - player.useCard({name:'sha',isCard:true},target,false); - } - }, - }, //孙桓 dcniji:{ audio:2, @@ -5828,2124 +1029,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - //桥蕤 - dcaishou:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - filter:function(event,player){ - return player.hasCard(card=>card.hasGaintag('dcaishou_tag'),'h'); - }, - forced:true, - locked:false, - group:['dcaishou_draw','dcaishou_lose'], - subfrequent:['draw'], - content:function(){ - 'step 0' - player.discard(player.getCards('h',card=>card.hasGaintag('dcaishou_tag'))); - 'step 1' - var len=0; - player.getHistory('lose',evt=>{ - if(evt.getParent(2)==event) len+=evt.cards.length; - }); - if(len>Math.max(0,player.hp)&&player.maxHp<9){ - player.gainMaxHp(); - } - }, - subSkill:{ - draw:{ - audio:'dcaishou', - trigger:{player:'phaseJieshuBegin'}, - frequent:function(event,player){ - return player.maxHp>1; - }, - prompt2:function(event,player){ - return '摸'+get.cnNumber(player.maxHp)+'张牌,称为“隘”'; - }, - check:function(event,player){ - return player.maxHp>1; - }, - content:function(){ - player.draw(player.maxHp).gaintag=['dcaishou_tag']; - } - }, - lose:{ - audio:'dcaishou', - trigger:{ - player:'loseAfter', - global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], - }, - forced:true, - locked:false, - filter:function(event,player){ - if(player==_status.currentPhase) return false; - var evt=event.getl(player); - if(!evt||!evt.hs||!evt.hs.length||player.hasCard(card=>card.hasGaintag('dcaishou_tag'),'h')) return false; - if(event.name=='lose'){ - for(var i in event.gaintag_map){ - if(event.gaintag_map[i].contains('dcaishou_tag')) return true; - } - return false; - } - return player.hasHistory('lose',function(evt){ - if(event!=evt.getParent()) return false; - for(var i in evt.gaintag_map){ - if(evt.gaintag_map[i].contains('dcaishou_tag')) return true; - } - return false; - }); - }, - content:function(){ - player.loseMaxHp(); - } - }, - } - }, - dcsaowei:{ - audio:2, - trigger:{global:'useCardAfter'}, - filter:function(event,player){ - return event.player!=player&&event.card.name=='sha'&&event.targets.length&&!event.targets.contains(player)&& - event.targets.every(current=>player.inRange(current)&¤t.isIn())&&player.hasCard(card=>card.hasGaintag('dcaishou_tag'),'h'); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseCardTarget({ - position:'hs', - prompt:get.prompt('dcsaowei'), - prompt2:'将一张“隘”当做【杀】对'+get.translation(trigger.targets)+'使用', - targets:trigger.targets, - filterCard:function(card,player){ - if(get.itemtype(card)=='card'&&!card.hasGaintag('dcaishou_tag')) return false; - return _status.event.targets.every(current=>player.canUse(get.autoViewAs({name:'sha'},[card]),current,false)); - }, - filterTarget:function(card,player,target){ - if(!_status.event.targets.contains(target)) return false; - card=get.autoViewAs({name:'sha'},[card]); - return lib.filter.filterTarget.apply(this,arguments); - }, - selectTarget:-1, - ai1:function(card){ - var player=_status.event.player; - if(player.isHealthy()&&player.hasSkill('dcaishou')&&player.countCards('h',card=>card.hasGaintag('dcaishou_tag')==1)) return 0; - var eff=0; - for(var target of _status.event.targets){ - eff+=get.effect(target,get.autoViewAs({name:'sha'},[card]),player,player); - } - if(eff>0) return 6.5+eff/10-get.value(card); - return 0; - }, - ai2:()=>1, - }); - 'step 1' - if(result.bool){ - var cards=result.cards,targets=result.targets; - var cardx=get.autoViewAs({name:'sha'},cards); - player.useCard(cardx,cards,targets,false,'dcsaowei'); - } - }, - }, - //杨弘 - dcjianji:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.getAttackRange()>=1; - }, - selectTarget:function(){ - return [1,_status.event.player.getAttackRange()]; - }, - complexSelect:true, - complexTarget:true, - filterTarget:function(card,player,target){ - var selected=ui.selected.targets; - if(!selected.length) return true; - for(var i of selected){ - if(i.getNext()==target||i.getPrevious()==target) return true; - } - return false; - }, - contentBefore:function(){ - event.getParent()._dcjianji_discarded=[]; - }, - content:function(){ - 'step 0' - if(target.countCards('he')>0) target.chooseToDiscard(true,'he'); - else event.finish(); - 'step 1' - if(result.bool){ - event.getParent()._dcjianji_discarded.push(target); - } - }, - contentAfter:function(){ - 'step 0' - var list=targets.filter(target=>{ - var num=target.countCards('h'); - return targets.every(targetx=>{ - return targetx.countCards('h')<=num; - }); - }); - if(list.length){ - event.list=list; - event.current=event.list.shift(); - event.getParent()._dcjianji_discarded.remove(player); - event.targets=event.getParent()._dcjianji_discarded; - } - else event.finish(); - 'step 1' - var targets=event.targets.slice(); - targets.remove(event.current); - if(!targets.length) event._result={bool:false}; - else event.current.chooseTarget('间计:是否视为对除'+get.translation(player)+'外的弃置过牌的一名角色使用一张杀?',(card,player,target)=>{ - return _status.event.targets.contains(target)&&player.canUse('sha',target,false); - }).set('targets',event.targets).set('ai',target=>{ - var player=_status.event.player; - return get.effect(target,{name:'sha'},player,player); - }); - 'step 2' - if(result.bool){ - event.current.useCard({name:'sha',isCard:true},result.targets,false); - } - 'step 3' - if(event.list.length){ - event.current=event.list.shift(); - event.goto(1); - } - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - var eff=get.effect(target,{name:'guohe_copy2'},player,target)/2; - if(ui.selected.targets.length&&eff<0){ - var len=target.countCards('h'); - if(ui.selected.targets.every(i=>{ - return i.countCards('h'){ - return get.effect(i,{name:'sha'},target,player)>0; - })) return 0.1; - } - return ui.selected.targets.reduce((p,c)=>p+get.effect(c,{name:'guohe_copy2'},player,c)/2,0)+eff; - } - } - }, - }, - dcyuanmo:{ - audio:2, - trigger:{player:['damageEnd','phaseZhunbeiBegin']}, - direct:true, - group:'dcyuanmo_add', - init:function(player){player.storage.dcyuanmo_range=0}, - change:function(player,num){ - player.addSkill('dcyuanmo_range'); - if(typeof player.storage.dcyuanmo_range!=='number') player.storage.dcyuanmo_range=0; - if(!num) return; - player.storage.dcyuanmo_range+=num; - if(player.storage.dcyuanmo_range!=0) player.markSkill('dcyuanmo_range'); - else player.unmarkSkill('dcyuanmo_range'); - game.log(player,'的攻击范围',(num>0?'+':'')+num); - }, - content:function(){ - 'step 0' - event.targets=game.filterPlayer(current=>player.inRange(current)); - var choiceList=['攻击范围+1。然后若你攻击范围内的角色数因此增加,你可以获得其中任意名角色的一张牌','攻击范围-1。然后你摸两张牌']; - player.chooseControl('cancel2').set('prompt',get.prompt('dcyuanmo')).set('choiceList',choiceList).set('ai',()=>{ - return _status.event.choice; - }).set('choice',function(){ - if(trigger.name=='phaseZhunbei'&&player.getAttackRange()==1&&!player.hasCard(card=>{ - if(get.subtype(card)!='equip1'&&!player.hasUseTarget(card)) return false; - var num=1; - var info=get.info(card,false); - if(info&&info.distance&&typeof info.distance.attackFrom=='number') num-=info.distance.attackFrom; - return num>1; - },'hs')) return '选项一'; - var targets=event.targets.slice(),targetsx=[]; - var _tmp=player.storage.dcyuanmo_range; - player.storage.dcyuanmo_range++; - try{ - targetsx=game.filterPlayer(current=>player.inRange(current)); - } - catch(e){player.storage.dcyuanmo_range=_tmp}; - player.storage.dcyuanmo_range=_tmp; - targetsx.removeArray(targets); - return targetsx.reduce((p,c)=>{ - return p+Math.max(0,get.effect(c,{name:'shunshou_copy2'},player,player)); - },0)>get.effect(player,{name:'wuzhong'},player,player)/1.5?'选项一':'选项二'; - }()); - 'step 1' - if(result.control=='cancel2'){ - event.finish(); return; - } - player.logSkill('dcyuanmo'); - if(result.control=='选项一'){ - lib.skill.dcyuanmo.change(player,1); - var targetsx=game.filterPlayer(current=>player.inRange(current)); - if(targetsx.length<=targets.length){ - event.finish(); - } - else event.targets=targetsx.removeArray(targets); - } - else{ - lib.skill.dcyuanmo.change(player,-1); - player.draw(2); - event.finish(); - } - 'step 2' - player.chooseTarget('远谟:获得任意名本次进入你攻击范围的角色的一张牌',[1,targets.length],(card,player,target)=>{ - return _status.event.getParent().targets.contains(target)&&target.countGainableCards(player,'he')>0; - }).set('ai',target=>{ - var player=_status.event.player; - return get.effect(target,{name:'shunshou_copy2'},player,player); - }); - 'step 3' - if(result.bool){ - var targets=result.targets.sortBySeat(); - player.line(targets); - for(var target of targets){ - player.gainPlayerCard(target,'he',true); - } - } - }, - subSkill:{ - add:{ - audio:'dcyuanmo', - trigger:{player:'phaseJieshuBegin'}, - filter:function(event,player){ - return !game.hasPlayer(current=>player.inRange(current)); - }, - prompt2:'令你的攻击范围+1', - check:()=>true, - content:function(){ - lib.skill.dcyuanmo.change(player,1); - }, - }, - range:{ - charlotte:true, - intro:{ - content:function(storage,player){ - var num=player.storage.dcyuanmo_range; - return '攻击范围'+(num>=0?'+':'')+num; - } - }, - mod:{ - attackRange:function(player,num){ - return num+player.countMark('dcyuanmo_range'); - }, - }, - } - }, - }, - //向朗 - dckanji:{ - audio:2, - enable:'phaseUse', - usable:2, - filter:function(event,player){ - return player.countCards('h'); - }, - content:function(){ - 'step 0' - player.showHandcards(); - 'step 1' - var suits=[]; - player.getCards('h',card=>suits.add(get.suit(card))); - if(suits.length==player.countCards('h')){ - player.draw(2); - event.suitsLength=suits.length; - player.addTempSkill('dckanji_check'); - } - }, - subSkill:{ - check:{ - trigger:{player:'gainAfter'}, - filter:function(event,player){ - if(event.getParent(2).name!='dckanji') return false; - var len=event.getParent(2).suitsLength; - var suits=[]; - player.getCards('h',card=>suits.add(get.suit(card))); - return suits.length>=4&&len<4; - }, - charlotte:true, - forced:true, - popup:false, - content:function(){ - player.skip('phaseDiscard'); - game.log(player,'跳过了','#y弃牌阶段'); - }, - } - }, - ai:{ - order:9, - result:{ - player:function(player,target){ - var count=player.countCards('h'); - if(count>4) return false; - var suits=[]; - player.getCards('h',card=>suits.add(get.suit(card))); - return suits.length==count?1:0; - } - } - } - }, - dcqianzheng:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - usable:2, - direct:true, - filter:function(event,player){ - return event.player!=player&&(get.type(event.card)=='trick'||event.card.name=='sha')&&player.countCards('he')>1; - }, - content:function(){ - 'step 0' - var str=',若重铸的牌中没有'+get.translation(get.type2(trigger.card))+'牌,你于'+get.translation(trigger.cards)+'进入弃牌堆后获得之'; - player.chooseCard(get.prompt('dcqianzheng'),'重铸两张牌'+(trigger.cards.length?str:'')+'。',2,'he',(card,player,target)=>{ - var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player); - return mod=='unchanged'; - }).set('ai',card=>{ - var val=get.value(card); - if(get.type2(card)==_status.event.type) val+=0.5; - return 6-val; - }).set('type',get.type2(trigger.card)); - 'step 1' - if(result.bool){ - var cards=result.cards; - player.logSkill('dcqianzheng'); - player.loseToDiscardpile(cards); - player.draw(cards.length); - if(cards.every(card=>get.type2(card)!=get.type2(trigger.card))){ - trigger.getParent().dcqianzheng=true; - player.addTempSkill('dcqianzheng_gain'); - } - } - else player.storage.counttrigger.dcqianzheng--; - }, - subSkill:{ - gain:{ - trigger:{global:'cardsDiscardAfter'}, - filter:function(event,player){ - var evt=event.getParent(); - if(evt.name!='orderingDiscard') return false; - return evt.relatedEvent.dcqianzheng&&event.cards.filterInD('d').length; - }, - charlotte:true, - forced:true, - popup:false, - content:function(){ - player.gain(trigger.cards.filterInD('d'),'gain2'); - }, - } - }, - }, - //秦朗 - dchaochong:{ - audio:2, - trigger:{player:'useCardAfter'}, - filter:function(event,player){ - return player.getHandcardLimit()!=player.countCards('h'); - }, - direct:true, - locked:false, - content:function(){ - 'step 0' - var del=player.getHandcardLimit()-player.countCards('h'); - event.delta=del; - if(del>0){ - player.chooseBool(get.prompt('dchaochong'),'摸'+get.cnNumber(Math.min(5,del))+'张牌,然后令你的手牌上限-1').set('ai',()=>{ - var player=_status.event.player; - if(player.isPhaseUsing()&&player.hasCard(cardx=>player.hasUseTarget(cardx)&&player.hasValueTarget(cardx),'hs')) return false; - return true; - }); - } - else if(del<0){ - player.chooseToDiscard(get.prompt('dchaochong'),'弃置'+get.cnNumber(-del)+'张手牌,然后令你的手牌上限+1',-del).set('ai',card=>{ - var player=_status.event.player; - if(player.isPhaseUsing()&&player.hasCard(cardx=>player.hasValueTarget(cardx),'hs')) return 6-player.getUseValue(card); - return 5-get.value(card); - }).set('logSkill','dchaochong'); - } - 'step 1' - if(result.bool){ - if(event.delta>0){ - player.logSkill('dchaochong'); - player.draw(Math.min(5,event.delta)); - lib.skill.dchaochong.change(player,-1); - } - else if(event.delta<0){ - lib.skill.dchaochong.change(player,1); - } - } - }, - change:function(player,num){ - if(typeof player.storage.dchaochong!=='number') player.storage.dchaochong=0; - if(!num) return; - player.storage.dchaochong+=num; - player.markSkill('dchaochong'); - game.log(player,'的手牌上限','#g'+(num>0?'+':'')+num); - }, - markimage:'image/card/handcard.png', - intro:{ - content:function(storage,player){ - var num=player.storage.dchaochong; - return '手牌上限'+(num>=0?'+':'')+num; - } - }, - mod:{ - maxHandcard:function(player,num){ - return num+player.countMark('dchaochong'); - } - }, - ai:{threaten:2.2} - }, - dcjinjin:{ - audio:2, - trigger:{ - source:'damageSource', - player:'damageEnd', - }, - usable:1, - logTarget:'source', - check:function(event,player){ - if(typeof player.storage.dchaochong!='number'||player.storage.dchaochong==0) return true; - var evt=event.getParent('useCard'); - if(evt&&evt.player==player&&event.source==player) return false; - if(player.isPhaseUsing()&&player.storage.dchaochong==-1) return true; - return Math.abs(player.storage.dchaochong)>=2; - }, - prompt2:function(event,player){ - var str=''; - if(typeof player.storage.dchaochong=='number'&&player.storage.dchaochong!=0){ - str +='重置因〖佞宠〗增加或减少的手牌上限,'; - } - var num=Math.abs(player.countMark('dchaochong'))||1; - if(event.source&&event.source.isIn()){ - str+='令伤害来源弃置至多'+get.cnNumber(num)+'张牌,然后你摸'+num+'-X张牌(X为其弃置的牌数)'; - } - else str+='你摸'+get.cnNumber(num)+'张牌'; - return str; - }, - content:function(){ - 'step 0' - var del=Math.abs(player.countMark('dchaochong'))||1; - event.delta=del; - player.storage.dchaochong=0; - if(player.hasSkill('dchaochong',null,false,false)) player.markSkill('dchaochong'); - game.log(player,'重置了手牌上限'); - if(trigger.source&&trigger.source.isIn()){ - trigger.source.chooseToDiscard(get.translation(player)+'对你发动了【矜谨】','弃置至多'+get.cnNumber(del)+'张牌,然后'+get.translation(player)+'摸'+del+'-X张牌(X为你弃置的牌数)。',[1,del],'he').set('ai',card=>{ - if(_status.event.goon) return 5.5-get.value(card); - return 0; - }).set('goon',get.attitude(trigger.source,player)<0); - } - 'step 1' - var num=event.delta; - if(result.bool) num-=result.cards.length; - if(num>0) player.draw(num); - }, - ai:{ - combo:'dchaochong', - maixie:true, - maixie_hp:true, - threaten:0.85, - 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=0; - if(typeof target.storage.dcninchong=='number') num=Math.abs(target.storage.dcninchong); - if(num<=0) return; - return [1,Math.min(1,num/3)]; - } - }, - }, - }, - }, - //二傅 - dcxuewei:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('dcxuewei'),(card,player,target)=>{ - return target.hp<=player.hp; - }).set('ai',target=>{ - var player=_status.event.player; - return get.effect(target,{name:'tao'},player,player)+0.1; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcxuewei',target); - player.addTempSkill('dcxuewei_shelter',{player:'phaseBegin'}); - player.markAuto('dcxuewei_shelter',[target]); - } - }, - ai:{threaten:1.1}, - subSkill:{ - shelter:{ - audio:'dcxuewei', - trigger:{global:'damageBegin4'}, - filter:function(event,player){ - return player.getStorage('dcxuewei_shelter').contains(event.player); - }, - charlotte:true, - forced:true, - onremove:true, - logTarget:'player', - marktext:'卫', - intro:{content:'保护对象:$'}, - content:function(){ - 'step 0' - trigger.cancel(); - 'step 1' - player.loseHp(); - if(trigger.player!=player) game.asyncDraw([player,trigger.player]); - else player.draw('nodelay'); - 'step 2' - game.delayx(); - }, - ai:{ - filterDamage:true, - skillTagFilter:function(player,tag,arg){ - if(arg&&arg.player&&arg.player.hasSkillTag('jueqing',false,player)) return false; - return true; - } - }, - } - }, - }, - dcyuguan:{ - audio:2, - trigger:{global:'phaseEnd'}, - filter:function(event,player){ - var num=player.getDamagedHp(); - if(num==0) return false; - return !game.hasPlayer(current=>{ - return current.getDamagedHp()>num; - }); - }, - check:function(event,player){ - var num=player.getDamagedHp()-1; - if(num<=0) return false; - var list=game.filterPlayer().map(target=>{ - return get.attitude(player,target)*Math.pow(Math.max(0,target.maxHp-target.countCards('h')-1),2); - }).sort((a,b)=>b-a); - return list.slice(0,num).reduce((p,c)=>p+c,0)>0; - }, - content:function(){ - 'step 0' - player.loseMaxHp(); - 'step 1' - var num=player.getDamagedHp(); - if(!player.isIn()||!num) event.finish(); - else player.chooseTarget('御关:令'+get.cnNumber(num)+'名角色将手牌摸至体力上限',Math.min(game.countPlayer(),num),true).set('ai',target=>{ - return get.attitude(_status.event.player,target)*Math.max(0.1,target.maxHp-target.countCards('h')); - }); - 'step 2' - if(result.bool){ - var targets=result.targets.sortBySeat(_status.currentPhase); - player.line(targets); - for(var target of targets){ - target.drawTo(target.maxHp); - } - } - } - }, - //郑浑 - dcqiangzhi:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - if(target==player) return false; - return target.countDiscardableCards(player,'he')+player.countDiscardableCards(player,'he')>=3; - }, - content:function(){ - 'step 0' - var dialog=[]; - dialog.push('强峙:弃置你与'+get.translation(target)+'的共计三张牌'); - if(player.countCards('h')) dialog.addArray(['
    你的手牌
    ',player.getCards('h')]); - if(player.countCards('e')) dialog.addArray(['
    你的装备
    ',player.getCards('e')]); - if(target.countCards('h')){ - dialog.add('
    '+get.translation(target)+'的手牌
    '); - if(player.hasSkillTag('viewHandcard',null,target,true)) dialog.push(target.getCards('h')); - else dialog.push([target.getCards('h'),'blank']); - } - if(target.countCards('e')) dialog.addArray(['
    '+get.translation(target)+'的装备
    ',target.getCards('e')]); - player.chooseButton(3,true).set('createDialog',dialog).set('filterButton',button=>{ - if(!lib.filter.canBeDiscarded(button.link,_status.event.player,get.owner(button.link))) return false; - return true; - }).set('filterOk',()=>{ - return ui.selected.buttons.length==3; - }).set('ai',button=>{ - var player=_status.event.player; - var target=_status.event.getParent().target; - var card=button.link; - if(get.owner(card)==player){ - if(_status.event.damage) return 15-get.value(card); - if(player.hp>=3||get.damageEffect(player,target,player)>=0||player.hasSkill('dcpitian')&&player.getHandcardLimit()-player.countCards('h')>=1&&player.hp>1) return 0; - if(ui.selected.buttons.length==0) return 10-get.value(card); - return 0; - } - else{ - if(_status.event.damage) return 0; - return -(get.sgnAttitude(player,target)||1)*get.value(card); - } - }).set('damage',get.damageEffect(target,player,player)>10&&player.countCards('he',card=>{ - return lib.filter.canBeDiscarded(card,player,player)&&get.value(card)<5; - })>=3); - 'step 1' - if(result.bool){ - var links=result.links; - var list1=[],list2=[]; - event.players=[player,target]; - for(var card of links){ - if(get.owner(card)==player) list1.push(card); - else list2.push(card); - } - if(list1.length&&list2.length){ - game.loseAsync({ - lose_list:[ - [player,list1], - [target,list2] - ], - discarder:player, - }).setContent('discardMultiple'); - event.finish(); - } - else if(list2.length) target.discard(list2); - else player.discard(list1); - if(list2.length>=3) event.players.reverse(); - } - else event.finish(); - 'step 2' - event.players[0].line(event.players[1]); - event.players[1].damage(event.players[0]); - }, - ai:{ - expose:0.2, - order:4, - result:{ - target:function(player,target){ - return get.effect(target,{name:'guohe_copy2'},player,target)/2*(target.countDiscardableCards(player,'he')>=2?1.25:1)+get.damageEffect(target,player,target)/3; - } - } - } - }, - dcpitian:{ - audio:2, - trigger:{ - player:['loseAfter','damageEnd'], - global:'loseAsyncAfter', - }, - forced:true, - locked:false, - group:'dcpitian_draw', - filter:function(event,player){ - if(event.name=='damage') return true; - return event.type=='discard'&&event.getl(player).cards2.length>0; - }, - content:function(){ - player.addMark('dcpitian_handcard',1,false); - player.addSkill('dcpitian_handcard'); - game.log(player,'的手牌上限','#y+1'); - }, - subSkill:{ - draw:{ - audio:'dcpitian', - trigger:{player:'phaseJieshuBegin'}, - filter:function(event,player){ - return player.countCards('h')Math.min(2,player.hp-1); - }, - content:function(){ - 'step 0' - var num=Math.min(5,player.getHandcardLimit()-player.countCards('h')); - if(num>0) player.draw(num); - 'step 1' - player.removeMark('dcpitian_handcard',player.countMark('dcpitian_handcard'),false); - game.log(player,'重置了','#g【辟田】','增加的手牌上限'); - } - }, - handcard:{ - markimage:'image/card/handcard.png', - intro:{ - content:function(storage,player){ - return '手牌上限+'+storage; - } - }, - charlotte:true, - mod:{ - maxHandcard:function(player,num){ - return num+player.countMark('dcpitian_handcard'); - } - }, - } - }, - ai:{ - effect:{ - target:function (card,player,target){ - if(get.tag(card,'discard')) return 0.9; - if(get.tag(card,'damage')) return 0.95; - }, - }, - }, - }, - //新服二赵 - dcqingren:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - frequent:true, - filter:function(event,player){ - return player.hasHistory('useSkill',evt=>['yizan_use','yizan_use_backup'].contains(evt.sourceSkill||evt.skill)); - }, - content:function(){ - player.draw(player.getHistory('useSkill',evt=>['yizan_use','yizan_use_backup'].contains(evt.sourceSkill||evt.skill)).length) - }, - }, - dclongyuan:{ - audio:'xinfu_longyuan', - forced:true, - unique:true, - juexingji:true, - trigger:{ - global:'phaseEnd', - }, - skillAnimation:true, - animationColor:'orange', - filter:function(event,player){ - return player.countMark('yizan_use')>=3; - }, - content:function(){ - player.awakenSkill('dclongyuan'); - player.draw(2); - player.recover(); - player.storage.yizan=true; - }, - derivation:'yizan_rewrite', - }, - //黄皓 - dcqinqing:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - var zhu=game.filterPlayer(current=>current.getSeatNum()==1)[0]; - if(!zhu||!zhu.isIn()) return false; - return game.hasPlayer(current=>{ - return current!=player&¤t.inRange(zhu); - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('dcqinqing'),function(card,player,target){ - var zhu=game.filterPlayer(current=>current.getSeatNum()==1)[0]; - return target!=player&&target.inRange(zhu)&&target.countDiscardableCards(player,'he')>0; - }).set('ai',function(target){ - var zhu=game.filterPlayer(current=>current.getSeatNum()==1)[0]; - var he=target.countCards('he'); - if(get.attitude(_status.event.player,target)>0){ - if(target.countCards('h')>zhu.countCards('h')+1) return 0.1; - } - else{ - if(he>zhu.countCards('h')+1) return 2; - if(he>0) return 1; - } - return 0; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('dcqinqing',target); - if(target.countCards('he')) player.discardPlayerCard(target,'he',true); - } - else{ - event.finish(); - } - 'step 2' - var zhu=game.filterPlayer(current=>current.getSeatNum()==1)[0]; - if(zhu&&zhu.isIn()){ - if(target.countCards('h')>zhu.countCards('h')) player.draw(); - } - } - }, - dccunwei:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - forced:true, - filter:function(event,player){ - return event.player!=player&&get.type2(event.card)=='trick'&&(event.targets.length==1||player.countCards('he')>0); - }, - content:function(){ - if(trigger.targets.length==1) player.draw(); - else if(player.countCards('he')>0) player.chooseToDiscard('he',true,'存畏:请弃置一张牌'); - } - }, - //薛灵芸 - dcxialei:{ - audio:2, - trigger:{ - player:'loseAfter', - global:['cardsDiscardAfter','loseAsyncAfter','equipAfter'], - }, - filter:function(event,player){ - if(player.countMark('dcxialei_clear')>=3) return false; - if(event.name!='cardsDiscard'){ - return event.getd(player,'cards2').some(i=>get.color(i,player)=='red'); - } - else{ - if(!event.cards.filterInD('d').some(i=>get.color(i,player)=='red')) return false; - var evt=event.getParent(); - if(evt.name!='orderingDiscard') return false; - var evtx=(evt.relatedEvent||evt.getParent()); - if(evtx.player!=player) return false; - return player.hasHistory('lose',evtxx=>{ - return evtx==(evtxx.relatedEvent||evtxx.getParent())&&evtxx.cards2.length>0; - }); - } - }, - content:function(){ - 'step 0' - var cards=get.cards(3-player.countMark('dcxialei_clear')); - event.cards=cards; - game.cardsGotoOrdering(cards); - if(cards.length==1) event._result={bool:true,links:cards}; - else player.chooseButton(['霞泪:获得其中的一张牌',cards],true); - 'step 1' - if(result.bool){ - var card=result.links[0]; - player.gain(card,'gain2'); - event.cards.remove(card); - if(event.cards.length){ - player.chooseBool().set('createDialog',['是否将剩余牌置于牌堆底?',event.cards]).set('ai',()=>_status.event.bool).set('bool',function(){ - if(!player.hasSkill('dcanzhi')) return Math.random()<0.5; - if(player.hasSkill('dcanzhi_blocker')){ - var next=_status.currentPhase.getNext(); - var judges=next.getCards('j'); - var val=0; - if(judges.length&&!next.hasWuxie()){ - var att=get.attitude(player,next); - for(var i=0;;i++){ - var judge=judges[i]&&get.judge(judges[i]),card=event.cards[i]; - if(!judge||!card) break; - val+=judge(card)*att; - i++; - } - } - if(val>0) return false; - else if(val==0) return Math.random()<0.5; - return true; - } - var card=event.cards[0]; - if(get.color(card,player)=='red'&&player.isPhaseUsing()&&player.countCards('hs',card=>{ - return get.color(card)=='red'&&player.hasValueTarget(card)&&['basic','trick'].contains(get.type(card)); - })>0) return false; - if(get.color(card,player)=='black') return false; - return true; - }()); - } - else event.goto(3); - } else event.finish(); - 'step 2' - if(result.bool){ - player.popup('牌堆底'); - game.log(player,'将'+get.cnNumber(event.cards.length)+'张牌置于了牌堆底'); - } - else player.popup('牌堆顶'); - while(cards.length){ - var card=cards.pop(); - card.fix(); - if(result.bool) ui.cardPile.appendChild(card); - else ui.cardPile.insertBefore(card,ui.cardPile.firstChild); - } - game.updateRoundNumber(); - 'step 3' - player.addMark('dcxialei_clear',1,false); - player.addTempSkill('dcxialei_clear'); - }, - subSkill:{clear:{onremove:true}} - }, - dcanzhi:{ - enable:'phaseUse', - filter:function(event,player){ - return !player.hasSkill('dcanzhi_blocker'); - }, - group:'dcanzhi_damage', - content:function(){ - 'step 0' - player.judge(result=>{ - if(get.color(result)=='red') return _status.event.getParent().player.countMark('dcxialei_clear')/2; - return 2; - }).judge2=result=>result.bool; - 'step 1' - if(result.color=='red'){ - player.removeSkill('dcxialei_clear'); - event.finish(); - } - else if(result.color=='black'){ - player.addTempSkill('dcanzhi_blocker'); - player.chooseTarget('暗织:是否令一名非当前回合角色获得本回合进入弃牌堆的两张牌?',(card,player,target)=>{ - return target!=_status.currentPhase; - }).set('ai',target=>{ - return get.effect(target,{name:'wuzhong'},_status.event.player); - }); - } - else event.finish(); - 'step 2' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.line(target); - var cards=[]; - game.getGlobalHistory('cardMove',evt=>{ - if(evt.name=='lose'&&evt.position==ui.discardPile||evt.name=='cardsDiscard'){ - cards.addArray(evt.cards.filterInD('d')); - } - }); - if(cards.length){ - player.chooseButton(['暗织:选择令'+get.translation(target)+'获得的牌',cards],true,Math.min(cards.length,2)).set('ai',button=>{ - var player=_status.event.player,target=_status.event.getParent().target; - return get.sgnAttitude(player,target)*get.buttonValue(button); - }); - } - }else event.finish(); - 'step 3' - if(result.bool){ - target.gain(result.links,'gain2'); - } - }, - ai:{ - combo:'dcxialei', - order:function(item,player){ - if(player.countMark('dcxialei_clear')>=2) return 10; - if(player.hasHistory('useSkill',evt=>evt.skill=='dcxialei')&&get.color(ui.cardPile.firstChild,player)=='red'&&player.countMark('dcxialei_clear')>0) return 9; - return 1; - }, - result:{ - player:function(player){ - return 1; - } - } - }, - subSkill:{ - damage:{ - audio:'dcanzhi', - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return !player.hasSkill('dcanzhi_blocker'); - }, - check:function(event,player){ - return game.hasPlayer(current=>{ - return get.attitude(player,current)>0&¤t!=_status.currentPhase; - }); - }, - prompt2:'你判定,若结果为红色,你重置〖霞泪〗的观看牌数;若结果为黑色,〖暗织〗于本回合失效,然后你可以令一名非当前回合角色获得本回合进入弃牌堆的两张牌。', - content:function(){ - event.setContent(lib.skill.dcanzhi.content); - event.goto(0); - } - }, - blocker:{charlotte:true} - } - }, - //刘辟 - dcjuying:{ - audio:2, - trigger:{player:'phaseUseEnd'}, - filter:function(event,player){ - return player.getCardUsable('sha',true)>player.getHistory('useCard',evt=>{ - return evt.getParent('phaseUse')==event&&evt.card.name=='sha'&&evt.addCount!==false; - }).length; - }, - direct:true, - content:function(){ - 'step 0' - player.chooseButton([ - get.prompt('dcjuying'), - [[ - ['sha','你于下回合使用【杀】的次数上限+1'], - ['hand','本回合手牌上限+2'], - ['draw','摸三张牌'], - ],'textbutton'] - ]).set('ai',function(button){ - var player=_status.event.player,choice=button.link; - if(choice=='draw') return 10; - if(choice=='sha') return 9; - var del=3-player.hp; - if(choice=='hand'&&player.needsToDiscard()>0&&del<=0) return 8; - return 0; - }).set('selectButton',[1,3]); - 'step 1' - if(result.bool){ - player.logSkill('dcjuying'); - var choices=result.links; - event.choices=choices; - if(choices.contains('sha')){ - player.addMark('dcjuying_sha',1,false); - player.addSkill('dcjuying_sha'); - } - if(choices.contains('hand')){ - player.addMark('dcjuying_hand',1,false); - player.addTempSkill('dcjuying_hand'); - } - if(choices.contains('draw')){ - player.draw(3); - } - } - else event.finish(); - 'step 2' - var num=event.choices.length-Math.max(0,player.hp); - if(num>0){ - player.chooseToDiscard(num,true,'he'); - } - }, - ai:{ - effect:{ - player_use:function(card,player,target){ - if(typeof card=='object'&&player.isPhaseUsing()&&card.name=='sha'&&player.getCardUsable('sha')==1) return 'zeroplayertarget'; - }, - target_use:function(card,player,target){ - if(card.name=='jiu'&&player.getCardUsable('sha')==2) return [1,1]; - } - }, - }, - subSkill:{ - sha:{ - trigger:{player:'phaseBegin'}, - filter:function(event,player){ - return player.countMark('dcjuying_sha')>0; - }, - silent:true, - firstDo:true, - charlotte:true, - onremove:true, - content:function(){ - player.addMark('dcjuying_effect',player.countMark('dcjuying_sha'),false); - player.addTempSkill('dcjuying_effect'); - player.removeSkill('dcjuying_sha'); - }, - intro:{content:'下回合使用【杀】的次数上限+#'} - }, - effect:{ - onremove:true, - charlotte:true, - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+player.countMark('dcjuying_effect'); - }, - }, - intro:{content:'本回合使用【杀】的次数上限+#'} - }, - hand:{ - onremove:true, - charlotte:true, - mod:{ - maxHandcard:function(player,num){ - return num+2*player.countMark('dcjuying_hand'); - } - } - } - }, - }, - //十周年王允 - dclianji:{ - enable:'phaseUse', - audio:'wylianji', - usable:1, - check:function(card){ - return 5-get.value(card); - }, - filterTarget:function(card,player,target){ - return target!=player; - }, - filterCard:true, - content:function(){ - 'step 0' - var card=get.cardPile2(function(card){ - return get.subtype(card)=='equip1'&&targets[0].hasUseTarget(card); - }); - if(card){ - if(card.name=='qinggang'&&!lib.inpile.contains('qibaodao')){ - card.remove(); - card=game.createCard('qibaodao',card.suit,card.number); - } - targets[0].chooseUseTarget(card,true,'nopopup','nothrow'); - } - else{ - player.chat('没有装备牌了吗'); - game.log('但是牌堆里已经没有装备牌了!'); - } - 'step 1' - game.updateRoundNumber(); - targets[0].chooseToUse(get.translation(player)+'对你发动了【连计】', - {name:'sha'}).set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ - if(target==_status.event.source) return false; - return lib.filter.filterTarget.apply(this,arguments); - }).set('addCount',false).set('source',player).set('prompt2','对除'+get.translation(player)+'外的一名角色使用一张【杀】,并将装备区内的武器牌交给其中一名目标角色;或点击“取消”,令'+get.translation(player)+'视为对你使用一张【杀】,并获得你装备区内的武器牌'); - 'step 2' - var card=targets[0].getEquip(1); - if(result.bool){ - player.addSkill('dclianji_1'); - if(card&&result.targets.filter(target=>target.isIn()).length>0){ - event.card=card; - targets[0].chooseTarget(true,'将'+get.translation(card)+'交给一名目标角色',(card,player,target)=>{ - return _status.event.targets.contains(target); - }).set('ai',function(target){ - var card=_status.event.getParent().card; - return (target.hasSkillTag('nogain')?0:get.attitude(_status.event.player,target))*Math.max(0.1,target.getUseValue(card)); - }).set('targets',result.targets); - } else event.finish(); - } - else{ - player.addSkill('dclianji_2'); - event.goto(4); - } - 'step 3' - targets[0].give(card,result.targets[0],'give'); - event.finish(); - 'step 4' - player.useCard({name:'sha',isCard:true},targets[0],false); - 'step 5' - var card=targets[0].getEquip(1); - if(card) targets[0].give(card,player,'give'); - }, - ai:{ - order:4, - result:{ - target:function(player,target){ - if(game.countPlayer()==2) return -3; - if(!target.getEquip(1)){ - if(game.hasPlayer(function(current){ - return current!=target&&!current.hasSkillTag('nogain')&&get.attitude(current,target)>0; - })) return 3; - return -3; - } - if(!game.hasPlayer(function(current){ - return current!=target&&!current.hasSkillTag('nogain')&&get.attitude(current,target)>0; - })) return -6; - return 4-get.value(target.getEquip(1)); - }, - }, - }, - subSkill:{ - 1:{charlotte:true,onremove:true}, - 2:{charlotte:true,onremove:true}, - } - }, - dcmoucheng:{ - trigger:{player:'phaseZhunbeiBegin'}, - audio:'moucheng', - forced:true, - juexingji:true, - skillAnimation:true, - animationColor:'gray', - derivation:'xinjingong', - unique:true, - filter:function(event,player){ - return player.hasSkill('dclianji_1')&&player.hasSkill('dclianji_2'); - }, - content:function(){ - player.awakenSkill('dcmoucheng'); - player.removeSkill('dclianji'); - game.log(player,'失去了技能','#g【连计】'); - player.addSkillLog('xinjingong'); - }, - }, - //新服加强魏贾诩 - dcjianshu:{ - audio:'jianshu', - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h',{color:'black'})>0; - }, - filterTarget:function(card,player,target){ - if(target==player) return false; - if(ui.selected.targets.length){ - return ui.selected.targets[0]!=target&&!ui.selected.targets[0].hasSkillTag('noCompareSource')&&target.countCards('h') - &&!target.hasSkillTag('noCompareTarget'); - } - return true; - }, - targetprompt:['发起者','拼点目标'], - filterCard:{color:'black'}, - discard:false, - lose:false, - delay:false, - check:function(card){ - if(_status.event.player.hp==1) return 8-get.value(card); - return 6-get.value(card); - }, - selectTarget:2, - multitarget:true, - content:function(){ - 'step 0' - player.give(cards,targets[0],'give'); - 'step 1' - targets[0].chooseToCompare(targets[1]); - 'step 2' - player.addTempSkill('dcjianshu_check','phaseUseAfter'); - if(result.bool){ - var cards=targets[0].getCards('he',function(card){ - return lib.filter.cardDiscardable(card,targets[0],'dcjianshu'); - }); - if(cards.length>0) targets[0].discard(cards.randomGet()); - targets[1].loseHp(); - } - else if(result.tie){ - targets[0].loseHp(); - targets[1].loseHp(); - } - else{ - var cards=targets[1].getCards('he',function(card){ - return lib.filter.cardDiscardable(card,targets[1],'dcjianshu'); - }); - if(cards.length>0) targets[1].discard(cards.randomGet()); - targets[0].loseHp(); - } - }, - subSkill:{ - check:{ - trigger:{global:'dieAfter'}, - charlotte:true, - forced:true, - popup:false, - filter:function(event,player){ - return event.getParent(3).name=='dcjianshu'; - }, - content:function(){ - delete player.getStat('skill').dcjianshu; - } - } - }, - ai:{ - expose:0.4, - order:4, - result:{ - target:function(player,target){ - if(ui.selected.targets.length) return -1; - return -0.5; - } - } - } - }, - dcyongdi:{ - audio:'yongdi', - audioname:['xinping'], - unique:true, - limited:true, - enable:'phaseUse', - filterTarget:function(card,player,target){ - return target.hasSex('male'); - }, - animationColor:'thunder', - skillAnimation:'legend', - mark:true, - intro:{ - content:'limited' - }, - content:function(){ - 'step 0' - player.awakenSkill('dcyongdi'); - //player.logSkill('dcyongdi',target); - if(!game.hasPlayer(current=>current.maxHpcurrent.maxHp{ - return get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcwumei',target); - player.addTempSkill('dcwumei_used','roundStart'); - target.insertPhase(); - target.addTempSkill('dcwumei_wake','phaseAfter'); - var targets=game.filterPlayer(); - if(!target.storage.dcwumei_wake) target.storage.dcwumei_wake=[[],[]]; - for(var targetx of targets){ - target.storage.dcwumei_wake[0].push(targetx); - target.storage.dcwumei_wake[1].push(targetx.hp); - } - target.markSkill('dcwumei_wake'); - if(!trigger._finished){ - trigger.finish(); - trigger.untrigger(true); - trigger._triggered=5; - var evt=player.insertPhase(); - delete evt.skill; - } - } - }, - subSkill:{ - used:{charlotte:true}, - wake:{ - trigger:{player:'phaseJieshuBegin'}, - charlotte:true, - popup:false, - forced:true, - onremove:true, - filter:function(event,player){ - return player.storage.dcwumei_wake&&player.storage.dcwumei_wake.length; - }, - content:function(){ - var storage=player.storage.dcwumei_wake; - for(var i=0;i'; - str+='
  • '+str2; - } - return str; - } - }, - ai:{ - effect:{ - player_use:function(card,player,target){ - if(get.tag(card,'damage')) return 0.5; - }, - target:function(card,player,target){ - if(_status.event.type!='phase') return; - if (get.tag(card,'recover')){ - return [1,1-target.hp]; - } - } - } - } - } - } - }, - dczhanmeng:{ - audio:2, - trigger:{player:'useCard'}, - filter:function(event,player){ - return !player.hasSkill('dczhanmeng_choice1')||!player.hasSkill('dczhanmeng_choice2')|| - !player.hasSkill('dczhanmeng_choice0')&&!game.hasPlayer2(current=>{ - var history=current.actionHistory; - if(history.length<2) return false; - var list=history[history.length-2].useCard.map(evt=>evt.card.name); - if(list.contains(event.card.name)) return true; - return false; - }); - }, - direct:true, - content:function(){ - 'step 0' - var list=[]; - var choiceList=[ - '上回合若没有同名牌被使用过,你获得一张非伤害牌', - '下回合当同名牌首次被使用后,你获得一张伤害牌', - '令一名其他角色弃置两张牌,若点数之和大于10,你对其造成1点火焰伤害' - ]; - var used=game.hasPlayer2(current=>{ - var history=current.actionHistory; - if(history.length<2) return false; - var list=history[history.length-2].useCard.map(evt=>evt.card.name); - if(list.contains(trigger.card.name)) return true; - return false; - }); - if(!player.hasSkill('dczhanmeng_choice0')&&!used) list.push('选项一'); - else choiceList[0]=''+choiceList[0]+(used?'(同名牌被使用过)':'(已选择)')+''; - if(!player.hasSkill('dczhanmeng_choice1')) list.push('选项二'); - else choiceList[1]=''+choiceList[1]+'(已选择)'; - if(!player.hasSkill('dczhanmeng_choice2')) list.push('选项三'); - else choiceList[2]=''+choiceList[2]+'(已选择)'; - list.push('cancel2'); - player.chooseControl(list).set('prompt',get.prompt('dczhanmeng')).set('ai',()=>{ - var choices=_status.event.controls.slice().remove('cancel2'); - var player=_status.event.player,evt=_status.event.getTrigger(); - if(!game.hasPlayer(current=>get.attitude(player,current)<0)) choices.remove('选项三'); - else if(choices.contains('选项三')) return '选项三'; - if(choices.contains('选项二')){ - if(evt.card.name=='sha') return '选项二'; - if(get.type(evt.card,null,false)=='equip') choices.remove('选项二'); - } - if(!choices.length) return 'cancel2'; - return choices.randomGet(); - }).set('choiceList',choiceList); - 'step 1' - if(result.control=='cancel2'){event.finish();return;} - if(result.control=='选项一'){ - player.logSkill('dczhanmeng'); - game.log(player,'选择了','#y'+result.control); - player.addTempSkill('dczhanmeng_choice0'); - var card=get.cardPile2(card=>{ - return !get.tag(card,'damage'); - }); - if(card) player.gain(card,'gain2'); - event.finish(); - } - else if(result.control=='选项二'){ - player.logSkill('dczhanmeng'); - game.log(player,'选择了','#y'+result.control); - player.addTempSkill('dczhanmeng_choice1'); - trigger['dczhanmeng_'+player.playerid]=true; - player.addSkill('dczhanmeng_delay'); - event.finish(); - } - else{ - player.addTempSkill('dczhanmeng_choice2'); - player.chooseTarget('占梦:令一名其他角色弃置两张牌',lib.filter.notMe,true).set('ai',target=>{ - var player=_status.event.player; - var eff1=get.effect(target,{name:'guohe_copy2'},player,player)+0.1; - var eff2=get.damageEffect(target,player,player,'fire')+0.1; - if(eff1<0&&eff2<0) return -eff1*eff2; - return eff1*eff2; - }); - } - 'step 2' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('dczhanmeng',target); - game.log(player,'选择了','#y选项三'); - target.chooseToDiscard(2,'he',true); - } else event.finish(); - 'step 3' - if(result.bool){ - var cards=result.cards; - var num=0; - for(var card of cards){ - num+=get.number(card,false); - } - if(num>10){ - player.line(target,'fire'); - target.damage('fire'); - } - } - }, - ai:{threaten:8}, - subSkill:{ - delay:{ - trigger:{global:['useCardAfter','phaseBeginStart']}, - charlotte:true, - forced:true, - popup:false, - filter:function(event,player,name){ - var history=player.actionHistory; - if(history.length<2) return false; - var list=history[history.length-2].useCard; - if(name=='phaseBeginStart'){ - return !list.some(evt=>evt['dczhanmeng_'+player.playerid]); - } - for(var evt of list){ - if(evt['dczhanmeng_'+player.playerid]&&event.card.name==evt.card.name&&game.getGlobalHistory('useCard',evtx=>{ - return evtx.card.name==event.card.name; - }).indexOf(event)==0) return true; - } - return false; - }, - content:function(){ - if(event.triggername!='phaseBeginStart'){ - player.logSkill('dczhanmeng_delay'); - var card=get.cardPile2(card=>{ - return get.tag(card,'damage'); - }); - if(card) player.gain(card,'gain2'); - } - else player.removeSkill('dczhanmeng_delay'); - } - }, - choice0:{charlotte:true}, - choice1:{charlotte:true}, - choice2:{charlotte:true}, - } - }, - //雷普 - dcsilve:{ - audio:2, - trigger:{ - player:'enterGame', - global:'phaseBefore', - }, - forced:true, - locked:false, - direct:true, - onremove:['dcsilve','dcsilve_self'], - filter:function(event,player){ - return (event.name!='phase'||game.phaseNumber==0); - }, - content:function(){ - 'step 0' - player.chooseTarget('私掠:请选择一名其他角色','选择一名其他角色(暂时仅你可见),称为“私掠”角色,且你获得后续效果',true,(card,player,target)=>{ - return target!=player&&!player.getStorage('dcsilve').contains(target); - }).set('ai',target=>{ - var att=get.attitude(_status.event.player,target); - if(att>0) return att+1; - if(att==0) return Math.random(); - return att; - }).set('animate',false); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcsilve'); - player.markAuto('dcsilve',[target]); - player.addSkill('dcsilve_rob'); - player.addSkill('dcsilve_revenge'); - target.addSkill('dcsilve_target'); - if(!target.storage.dcsilve_target) target.storage.dcsilve_target=[]; - target.storage.dcsilve_target.push(player); - } - }, - subSkill:{ - rob:{ - audio:'dcsilve', - trigger:{global:'damageSource'}, - filter:function(event,player){ - if(!player.getStorage('dcsilve').contains(event.source)) return false; - if(!event.player.isIn()||event.player==player) return false; - if(player.getStorage('dcsilve_robbed').contains(event.player)) return false; - return event.player.countCards('he')>0; - }, - charlotte:true, - prompt2:function(event,player){ - return '获得'+get.translation(event.player)+'一张牌'; - }, - logTarget:'player', - content:function(){ - player.addTempSkill('dcsilve_robbed'); - player.markAuto('dcsilve_self',[trigger.player]); - if(trigger.player.countGainableCards(player,'he')>0){ - player.markAuto('dcsilve_robbed',[trigger.player]); - player.gainPlayerCard(trigger.player,'he',true); - } - if(trigger.source&&trigger.source!=player) trigger.source.markSkill('dcsilve_target'); - } - }, - revenge:{ - audio:'dcsilve', - trigger:{global:'damageEnd'}, - filter:function(event,player){ - if(!player.getStorage('dcsilve').contains(event.player)) return false; - if(!event.player.isIn()||!event.source||!event.source.isIn()||event.source==player) return false; - return true; - }, - forced:true, - locked:false, - charlotte:true, - direct:true, - content:function(){ - 'step 0' - if(trigger.player&&trigger.player!=player) trigger.player.markSkill('dcsilve_target'); - player.markAuto('dcsilve_self',[trigger.player]); - player.chooseToUse('私掠:对'+get.translation(trigger.source)+'使用一张【杀】,或弃置一张手牌',function(card,player,event){ - if(get.name(card)!='sha') return false; - return lib.filter.filterCard.apply(this,arguments); - }).set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ - if(target!=_status.event.source&&!ui.selected.targets.contains(_status.event.source)) return false; - return lib.filter.targetEnabled.apply(this,arguments); - }).set('source',trigger.source).set('logSkill','dcsilve_revenge'); - 'step 1' - if(!result.bool){ - if(player.countCards('h')>0) player.chooseToDiscard('h',true).set('logSkill','dcsilve_revenge'); - } - } - }, - self:{ - marktext:'私', - intro:{ - name:'私掠', - content:function(storage,player){ - if(!storage||!storage.length) return '没有打劫对象'; - if(storage[0]==player) return '已绑定'+get.translation(player)+'自己'; - return '打劫对象:'+get.translation(storage); - } - }, - }, - target:{ - marktext:'掠', - intro:{ - name:'私掠', - content:function(storage,player){ - return '被'+get.translation(storage)+'盯上了!'; - } - } - }, - robbed:{onremove:true,charlotte:true}, - } - }, - dcshuaijie:{ - audio:2, - enable:'phaseUse', - limited:true, - skillAnimation:true, - animationColor:'thunder', - filter:function(event,player){ - var targets=player.getStorage('dcsilve').filter(i=>i.isIn()); - if(!targets.length) return true; - return targets.filter(target=>{ - return player.hp>target.hp&&player.countCards('e')>target.countCards('e'); - }).length==targets.length; - }, - content:function(){ - 'step 0' - player.awakenSkill('dcshuaijie'); - player.loseMaxHp(); - var choices=[]; - var choiceList=[ - '获得“私掠”角色至多三张牌', - '从牌堆中获得三张类型各不相同的牌' - ]; - var targets=player.getStorage('dcsilve').filter(i=>i.isIn()); - event.targets=targets; - if(targets.length) choices.push('选项一'); - else choiceList[0]=''+choiceList[0]+''; - choices.push('选项二'); - player.chooseControl(choices).set('prompt','衰劫:选择一项').set('choiceList',choiceList).set('ai',()=>_status.event.choice).set('choice',function(){ - var eff=0; - for(var target of targets){ - eff+=get.effect(target,{name:'shunshou_copy2'},player,player)*2; - } - eff-=get.effect(player,{name:'dongzhuxianji'},player,player); - return eff>0&&choices.contains('选项一')?'选项一':'选项二'; - }()); - 'step 1' - if(result.control=='选项一'){ - if(targets.length){ - for(var target of targets){ - if(target.countGainableCards(player,'he')>0) { - player.line(target); - player.gainPlayerCard(target,'he',true,[1,3]); - } - } - } - } - else{ - var cards=[]; - for(var i=0;i<3;i++){ - var card=get.cardPile(cardx=>{ - return cards.filter(cardxx=>get.type2(cardxx)==get.type2(cardx)).length==0; - }); - if(card) cards.push(card); - } - if(cards.length) player.gain(cards,'gain2'); - } - 'step 2' - var targets=player.getStorage('dcsilve').filter(i=>i.isIn()); - for(var target of targets){ - target.unmarkAuto('dcsilve_target',[player]); - } - delete player.storage.dcsilve; - delete player.storage.dcsilve_self; - player.markAuto('dcsilve',[player]); - player.markAuto('dcsilve_self',[player]); - }, - ai:{ - combo:'dcsilve', - order:8, - result:{ - player:function(player){ - var targets=player.getStorage('dcsilve').filter(i=>i.isIn()); - if(!targets.length) return 1; - var att=0; - targets.forEach(i=>att+=get.attitude(player,i)); - if(att<0) return 1; - return 0; - } - } - } - }, - //程秉 - dcjingzao:{ - audio:2, - enable:'phaseUse', - filter:function(event,player) { - return !player.hasSkill('dcjingzao_ban')&&game.hasPlayer(current=>lib.skill.dcjingzao.filterTarget(null,player,current)); - }, - filterTarget:function(card,player,target){ - return player!=target&&!target.hasSkill('dcjingzao_temp'); - }, - content:function(){ - 'step 0' - target.addTempSkill('dcjingzao_temp'); - var cards=game.cardsGotoOrdering(get.cards(3+player.countMark('dcjingzao_add'))).cards; - event.cards=cards; - game.log(player,'亮出了',event.cards); - event.videoId=lib.status.videoId++; - game.broadcastAll(function(player,target,id,cards){ - var str=get.translation(player)+'对'+(target==game.me?'你':get.translation(target))+'发动了【经造】'; - var dialog=ui.create.dialog(str,cards); - dialog.videoId=id; - },player,target,event.videoId,event.cards); - game.addVideo('showCards',player,[get.translation(player)+'发动了【经造】',get.cardsInfo(event.cards)]); - game.delay(cards.length-1); - 'step 1' - target.chooseToDiscard('he').set('prompt',false).set('filterCard',card=>{ - var names=_status.event.getParent().cards.map(i=>i.name); - return names.contains(get.name(card)); - }).set('ai',card=>{ - var target=_status.event.player,player=_status.event.getParent().player; - var att=get.attitude(target,player),val=get.value(card); - if(!lib.skill.dcjingzao.filter(null,player)){ - if(att>0) return 0; - return 6-val; - } - else{ - if(att>0) return 4-val; - return 0; - } - }); - var update=function(id,source){ - var dialog=get.idDialog(id); - if(dialog){ - var div=ui.create.div('',dialog.content,1); - var name=get.translation(source); - div.innerHTML='弃置一张满足条件的牌,然后'+name+'〖经造〗本回合亮出牌数+1;或点“取消”令'+name+'随机获得每种牌名的牌各一张,且〖经造〗本回合失效'; - ui.update(); - } - }; - if(target==game.me) update(event.videoId,player); - else if(target.isOnline()) target.send(update,event.videoId,player); - 'step 2' - game.broadcastAll('closeDialog',event.videoId); - if(result.bool){ - player.addTempSkill('dcjingzao_add'); - player.addMark('dcjingzao_add',1,false); - } - else{ - var cards=cards.randomSort(),cards2=[]; - for(var card of cards){ - if(!cards2.map(i=>i.name).contains(card.name)) cards2.push(card); - } - if(cards2.length) player.gain(cards2,'gain2'); - player.addTempSkill('dcjingzao_ban'); - } - }, - ai:{ - order:7, - result:{ - player:1, - } - }, - subSkill:{ - add:{charlotte:true,onremove:true}, - ban:{charlotte:true}, - temp:{charlotte:true} - } - }, - dcenyu:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - forced:true, - filter:function(event,player){ - return event.player!=player&&game.hasPlayer2(current=>{ - return current.hasHistory('useCard',evt=>{ - return evt.card.name==event.card.name&&evt!=event.getParent()&&evt.targets&&evt.targets.contains(player); - }); - }); - }, - content:function(){ - trigger.getParent().excluded.add(player); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(player==target) return; - if(game.hasPlayer2(current=>{ - return current.hasHistory('useCard',evt=>evt.card.name==card.name&&evt.targets&&evt.targets.contains(player)); - })) return 'zerotarget'; - } - } - } - }, - //董贵人 - dclianzhi:{ - audio:2, - trigger:{player:'dying'}, - usable:1, - forced:true, - locked:false, - derivation:'dcshouze', - group:['dclianzhi_connect','dclianzhi_reproach'], - filter:function(event,player){ - return player.getStorage('dclianzhi').filter(i=>i&&i.isIn()).length; - }, - content:function(){ - player.recover(); - game.asyncDraw([player].concat(player.getStorage('dclianzhi').filter(i=>i&&i.isIn())).sortBySeat()); - }, - ai:{ - threaten:0.6, - }, - subSkill:{ - connect:{ - audio:'dclianzhi', - trigger:{ - player:'enterGame', - global:'phaseBefore', - }, - forced:true, - direct:true, - filter:function(event,player){ - return (event.name!='phase'||game.phaseNumber==0); - }, - content:function(){ - 'step 0' - player.chooseTarget('连枝:请选择一名其他角色',lib.translate.dclianzhi_info,true,(card,player,target)=>{ - return target!=player&&!player.getStorage('dclianzhi').contains(target); - }).set('ai',target=>{ - var att=get.attitude(_status.event.player,target); - if(att>0) return att+1; - if(att==0) return Math.random(); - return att; - }).set('animate',false); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dclianzhi'); - player.markAuto('dclianzhi',[target]); - } - }, - }, - reproach:{ - audio:'dclianzhi', - trigger:{global:'dieAfter'}, - filter:function(event,player){ - return player.getStorage('dclianzhi').contains(event.player); - }, - direct:true, - content:function(){ - 'step 0' - var num=Math.max(1,player.countMark('dclingfang')); - player.chooseTarget(get.prompt('dclianzhi'),'选择一名其他角色,你与其各获得〖受责〗,且其获得'+num+'枚“绞”标记',(card,player,target)=>{ - return target!=player; - }).set('ai',target=>-get.attitude(_status.event.player,target)); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dclianzhi_reproach',target); - player.addSkillLog('dcshouze'); - target.addSkillLog('dcshouze'); - target.addMark('dclingfang',Math.max(1,player.countMark('dclingfang'))); - } - }, - } - } - }, - dclingfang:{ - audio:2, - trigger:{ - player:'phaseZhunbeiBegin', - global:'useCardAfter', - }, - forced:true, - filter:function(event,player){ - if(event.name!='useCard') return true; - if(get.color(event.card)!='black') return false; - if(event.player==player) return !event.targets||!event.targets.contains(player); - return event.targets&&event.targets.contains(player); - }, - content:function(){ - player.addMark('dclingfang',1); - }, - marktext:'绞', - intro:{ - name:'绞', - name2:'绞', - content:'mark' - } - }, - dcfengying:{ - audio:2, - enable:'chooseToUse', - group:'dcfengying_record', - locked:false, - filter:function(event,player){ - return player.storage.dcfengying&&player.storage.dcfengying.length&&player.storage.dcfengying.filter(name=>{ - return event.filterCard({name:name},player,event); - }).length&&!player.hasSkill('dcfengying_used'); - }, - hiddenCard:function(player,name){ - var list=player.getStorage('dcfengying'); - if(player.getStorage('dcfengying_used').contains(name)) return false; - return list.contains(name)&&player.hasCard((card)=>(get.number(card)<=player.countMark('dclingfang')),'hs'); - }, - chooseButton:{ - dialog:function(event,player){ - var list=[]; - for(var name of player.storage.dcfengying){ - if(get.type(name)=='basic') list.push(['基本','',name]); - if(get.type(name)=='trick') list.push(['锦囊','',name]); - } - return ui.create.dialog('风影',[list,'vcard']); - }, - filter:function(button,player){ - var card={name:button.link[2],storage:{dcfengying:true}}; - if(player.getStorage('dcfengying_used').contains(card.name)) return false; - return _status.event.getParent().filterCard(card,player,_status.event.getParent()); - }, - check:function(button){ - var player=_status.event.player; - if(player.countCards('hs',button.link[2])>0) return 0; - if(button.link[2]=='wugu') return; - var effect=player.getUseValue(button.link[2]); - if(effect>0) return effect; - return 0; - }, - backup:function(links,player){ - return { - filterCard:function(card,player,event){ - return get.number(card)<=player.countMark('dclingfang'); - }, - audio:'dcfengying', - selectCard:1, - popname:true, - check:function(card){ - return 6-get.value(card)+get.number(card)/15; - }, - position:'hs', - viewAs:{ - name:links[0][2], - storage:{dcfengying:true}, - }, - precontent:function(){ - player.logSkill('dcfengying'); - player.addTempSkill('dcfengying_used'); - player.markAuto('dcfengying_used',[event.result.card.name]); - event.getParent().addCount=false; - delete event.result.skill; - } - } - }, - prompt:function(links,player){ - return '将一张点数不大于'+get.strNumber(player.countMark('dclingfang'))+'的手牌当做'+get.translation(links[0][2])+'使用(无距离和次数限制)'; - } - }, - mod:{ - targetInRange:function(card){ - if(card.storage&&card.storage.dcfengying) return true; - }, - cardUsable:function(card,player){ - if(card.storage&&card.storage.dcfengying) return Infinity; - }, - }, - ai:{ - order:4, - result:{ - player:function(player){ - if(_status.event.dying) return get.attitude(player,_status.event.dying); - return 1; - } - }, - threaten:2, - }, - subSkill:{ - record:{ - trigger:{global:'phaseBegin'}, - filter:function(event,player){ - return ui.discardPile.childNodes.length>0; - }, - forced:true, - popup:false, - content:function(){ - player.storage.dcfengying=[]; - for(var i=0;i{ - return lib.inpile.indexOf(a)-lib.inpile.indexOf(b); - }); - } - }, - used:{ - charlotte:true, - onremove:true, - intro:{ - content:'已使用过$', - }, - }, - } - }, - dcshouze:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - forced:true, - filter:function(event,player){ - return player.countMark('dclingfang')>0; - }, - content:function(){ - 'step 0' - player.removeMark('dclingfang',1); - 'step 1' - var card=get.discardPile(card=>get.color(card,false)=='black'); - if(card) player.gain(card,'gain2'); - player.loseHp(); - } - }, //孙狼 dctingxian:{ audio:2, @@ -8040,361 +1123,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //袁姬 - dcmengchi:{ - audio:'dcfangdu', - trigger:{player:['linkBefore','damageEnd']}, - forced:true, - filter:function(event,player){ - var num=player.getStat('gain'); - if(num&&num>0) return false; - if(event.name=='link') return !player.isLinked(); - return !event.nature; - }, - content:function(){ - if(trigger.name=='link') trigger.cancel(); - else player.recover(); - }, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(player.hasSkillTag('jueqing',false,target)) return; - if(target.getStat('gain')) return; - if(get.tag(card,'natureDamage')) return; - if(target.hp==1) return 0.75; - if(card.name=='sha'&&!player.hasSkill('jiu')||target.hasSkillTag('filterDamage',null,{ - player:player, - card:card, - })) return [1,Math.min(1.5,0.75+0.25*target.hp)]; - }, - }, - }, - mod:{ - cardEnabled:function(card,player){ - if(!player.getStat('gain')) return false; - }, - cardSavable:function(card,player){ - if(!player.getStat('gain')) return false; - }, - }, - }, - dcfangdu:{ - audio:2, - trigger:{ - player:'damageEnd', - }, - forced:true, - filter:function(event,player){ - if(player==_status.currentPhase) return false; - return !event.nature&&!player.hasHistory('damage',evt=>{ - return !evt.nature&&evt!=event; - },event)||event.nature&&!player.hasHistory('damage',evt=>{ - return evt.nature&&evt!=event; - },event)&&event.source&&event.source.isIn()&&event.source.countGainableCards(player,'h'); - }, - content:function(){ - 'step 0' - if(!trigger.nature){ - player.recover(); - } - else{ - var cards=trigger.source.getGainableCards(player,'h'); - if(cards.length){ - player.gain(cards.randomGet(),trigger.source,'giveAuto','bySelf'); - } - } - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(!get.tag(card,'damage')) return; - if(player.hasSkillTag('jueqing',false,target)) return; - if(target==_status.currentPhase) return; - if(player._dcfangdu_aiChecking) return; - if(_status.event.getParent('useCard',true)||_status.event.getParent('_wuxie',true)) return; - if(!get.tag(card,'natureDamage')){ - if(target.hasHistory('damage',evt=>!evt.nature)){ - return [1,-2]; - } - else{ - if(get.attitude(player,target)>0){ - if(target.hasSkill('dcjiexing')) return [0,0.2]; - } - if(get.attitude(player,target)<0&&!player.hasSkillTag('damageBonus')){ - var sha=player.getCardUsable({name:'sha'}); - player._dcfangdu_aiChecking=true; - var num=player.countCards('h',function(card){ - if(get.name(card)=='sha'){ - if(sha==0){ - return false; - } - else{ - sha--; - } - } - return player.canUse(card,target)&&get.effect(target,card,player,player)>0; - }); - delete player._dcfangdu_aiChecking; - if(player.hasSkillTag('damage')){ - num++; - } - if(num<2){ - return [0,0.8]; - } - } - } - } - if(!target.hasHistory('damage',evt=>evt.nature)&&player.countCards('h')>1&&get.tag(card,'natureDamage')) return [1,1]; - } - } - } - }, - dcjiexing:{ - audio:2, - trigger:{player:['recoverEnd','damageEnd','loseHpEnd']}, - check:function(event,player){ - var current=_status.currentPhase; - if(!player.hasSkill('dcmengchi')||get.attitude(player,current)>=0) return true; - var num=player.getStat('gain'); - if(num&&num>0) return true; - if(current.countCards('hs',card=>current.canUse(card,player)&&get.effect(player,card,current,player)<0)>=2) return false; - return true; - }, - content:function(){ - player.draw().gaintag=['dcjiexing']; - player.addTempSkill('dcjiexing_add'); - }, - subSkill:{ - add:{ - charlotte:true, - mod:{ - ignoredHandcard:function(card,player){ - if(card.hasGaintag('dcjiexing')) return true; - }, - cardDiscardable:function(card,player,name){ - if(name=='phaseDiscard'&&card.hasGaintag('dcjiexing')) return false; - }, - }, - onremove:function(player){ - player.removeGaintag('dcjiexing'); - }, - } - } - }, - //朱建平 - olddcxiangmian:{ - audio:'dcxiangmian', - trigger:{global:'phaseJieshuBegin'}, - filter:function(event,player){ - return !player.getStorage('olddcxiangmian').contains(event.player)&&player!=event.player; - }, - logTarget:'player', - check:function(event,player){ - return get.attitude(player,event.player)<0; - }, - content:function(){ - 'step 0' - player.judge(card=>2/Math.sqrt(get.number(card,false))).set('judge2',result=>result.bool); - 'step 1' - player.markAuto('olddcxiangmian',[trigger.player]); - trigger.player.addSkill('olddcxiangmian_countdown'); - if (!trigger.player.storage['olddcxiangmian_countdown']) trigger.player.storage['olddcxiangmian_countdown'] = []; - [player.playerid, result.suit, result.number].forEach(i => trigger.player.storage['olddcxiangmian_countdown'].push(i)); - trigger.player.markSkill('olddcxiangmian_countdown'); - }, - intro:{content:'已对$发动过技能'}, - ai:{ - expose:0.3, - }, - subSkill:{ - countdown:{ - trigger:{player:'useCardAfter'}, - mark:true, - marktext:'💀', - silent:true, - forced:true, - charlotte:true, - intro:{ - markcount:function(storage){ - if(storage){ - var list=storage.filter((_,i)=>i%3==2); - return Math.min.apply(null,list); - } - }, - content:function(storage,player){ - var str='使用' - for(var i=0;ii%3==1)).contains(get.suit(event.card,player)); - }, - content:function(){ - 'step 0' - var storage=player.getStorage('olddcxiangmian_countdown'); - for(var i=0;i0) player.loseHp(player.hp); - i--; - } - } - }, - ai:{ - effect:{ - player_use:function(card,player,target){ - if(typeof card!='object') return; - var storage=player.getStorage('olddcxiangmian_countdown'); - for(var i=0;ilib.skill.dcxiangmian.filterTarget(null,player,current)); - }, - filterTarget:function(card,player,target){ - return !player.getStorage('dcxiangmian').contains(target)&&player!=target; - }, - content:function(){ - 'step 0' - target.judge(card=>-2/Math.sqrt(get.number(card,false))).set('judge2',result=>result.bool===false?true:false); - 'step 1' - player.markAuto('dcxiangmian',[target]); - target.addSkill('dcxiangmian_countdown'); - if (!target.storage['dcxiangmian_countdown']) target.storage['dcxiangmian_countdown']=[]; - [player.playerid,result.suit,result.number].forEach(i=>target.storage['dcxiangmian_countdown'].push(i)); - target.markSkill('dcxiangmian_countdown'); - }, - intro:{content:'已对$发动过技能'}, - ai:{ - expose:0.3, - order:10, - result:{target:-5} - }, - subSkill:{ - countdown:{ - trigger:{player:'useCardAfter'}, - mark:true, - marktext:'💀', - silent:true, - forced:true, - charlotte:true, - intro:{ - markcount:function(storage){ - if(storage){ - var list=storage.filter((_,i)=>i%3==2); - return Math.min.apply(null,list); - } - }, - content:function(storage,player){ - if(!storage) return; - var str='使用'; - str+=get.cnNumber(Math.min.apply(null,storage.filter((_,i)=>i%3==2)))+'张牌后,或使用一张'; - for(var i=0;ii%3==1)).contains(get.suit(event.card,player)); - return true; - }, - content:function(){ - 'step 0' - var storage=player.getStorage('dcxiangmian_countdown'); - for(var i=0;i0) player.loseHp(player.hp); - i--; - } - } - }, - ai:{ - effect:{ - player_use:function(card,player,target){ - if(typeof card!='object') return; - var storage=player.getStorage('dcxiangmian_countdown'); - for(var i=0;i{ - if(get[fn](card,player)==get[fn](cardxx,player)&&!cards.contains(cardxx)){ - return true; - } - }); - if(cardx) cards.push(cardx); - } - /*if(cards.length&&!player.isMaxHandcard(true)) player.draw(); - else*/ if(cards.length) player.gain(cards,'gain2') - } - }, //是仪 dccuichuan:{ audio:2, @@ -8565,295 +1293,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - //赵直 - dctongguan:{ - trigger:{ - global:'phaseBegin', - }, - filter:function(event,player){ - return event.player.phaseNumber==1&&lib.skill.dctongguan.derivation.some(i=>{ - return (player.getStorage('dctongguan')[i]||0)<2; - }); - }, - forced:true, - locked:false, - logTarget:'player', - derivation:['dctongguan_wuyong','dctongguan_gangying','dctongguan_duomou','dctongguan_guojue','dctongguan_renzhi'], - content:function(){ - 'step 0' - var skills=lib.skill.dctongguan.derivation.slice(); - player.chooseControl(skills.filter(i=>{ - return (player.getStorage('dctongguan')[i]||0)<2; - })).set('choiceList',skills.map(i=>{ - var info=''; - switch (player.getStorage('dctongguan')[i]){ - case 1: - info=' style="opacity:0.65;"'; - break; - case 2: - info=' style="text-decoration:line-through; opacity:0.3;"'; - break; - } - return '
    「'+get.translation(lib.translate[i+'_ab']||get.translation(i).slice(0,2))+'」
    ' + - ''+get.skillInfoTranslation(i,player)+'(已选过'+get.cnNumber(player.getStorage('dctongguan')[i]||0)+'次)'+''; - })).set('displayIndex',false).set('prompt','统观:为'+get.translation(trigger.player)+'选择一个属性').set('ai',function(){ - var controls=_status.event.controls,target=_status.event.getTrigger().player; - var str=target.getSkills(null,false,false).map(i=>get.skillInfoTranslation(i)).join(''); - var choices=[]; - if(controls.contains('dctongguan_wuyong')&&/你对\S{1,15}造成\S{1,10}伤害/.test(str)) choices.push('dctongguan_wuyong'); - if(controls.contains('dctongguan_gangying')&&/回复\S{1,5}体力/.test(str)&&_status.event.player.getFriends().length) choices.push('dctongguan_gangying'); - if(controls.contains('dctongguan_duomou')&&/你(可|可以)?摸\S{1,3}张牌/.test(str)) choices.push('dctongguan_duomou'); - if(controls.contains('dctongguan_guojue')&&/(当【过河拆桥】使用|((弃置|获得)\S{1,5}其他角色\S{1,7}牌|))/.test(str)) choices.push('dctongguan_guojue'); - if(controls.contains('dctongguan_renzhi')&&/交给\S{0,5}其他角色/.test(str)&&_status.event.player.getFriends().length) choices.push('dctongguan_renzhi'); - if(choices.length) return choices.randomGet(); - return _status.event.controls.randomGet(); - }); - 'step 1' - if(result.control){ - var skill=result.control; - var func=lib.skill.dctongguan.localMark; - if(event.player==game.me) func(skill,trigger.player) - else if(event.isOnline()) player.send(func,skill,trigger.player) - // game.log(player,'为',trigger.player,'选择了','#g「'+get.translation(skill)+'」','属性'); - game.log(player,'为',trigger.player,'选择了','#g一个属性'); - // player.popup(skill); - trigger.player.addSkill(skill); - if(!player.storage.dctongguan) player.storage.dctongguan={}; - if(!player.storage.dctongguan[skill]) player.storage.dctongguan[skill]=0; - player.storage.dctongguan[skill]++; - } - }, - localMark:function(skill,player){ - var name=skill,info; - if(player.marks[name]) player.updateMarks(); - if(lib.skill[name]) info=lib.skill[name].intro; - if(!info) return; - if(player.marks[name]) player.marks[name].info=info; - else player.marks[name]=player.mark(name,info); - player.updateMarks(); - }, - subSkill:{ - forceFinish:{charlotte:true}, - wuyong:{ - marktext:'勇', - intro:{ - name:'武勇', - content:'属性目标:造成伤害', - }, - charlotte:true, - silent:true, - nopop:true, - }, - gangying:{ - marktext:'刚', - intro:{ - name:'刚硬', - content:'属性目标:回复体力,或于获得牌后手牌数大于体力值', - }, - charlotte:true, - silent:true, - forced:true, - nopop:true, - lastDo:true, - trigger:{player:'gainEnd'}, - filter:function(event,player){ - return player.countCards('h')>player.hp; - }, - content:function(){ - trigger._dctongguan_gangying=true; - }, - }, - duomou:{ - marktext:'谋', - intro:{ - name:'多谋', - content:'属性目标:于摸牌阶段外摸牌', - }, - charlotte:true, - silent:true, - nopop:true, - }, - guojue:{ - marktext:'决', - intro:{ - name:'果决', - content:'属性目标:弃置或获得其他角色牌', - }, - charlotte:true, - silent:true, - nopop:true, - }, - renzhi:{ - marktext:'仁', - intro:{ - name:'仁智', - content:'属性目标:交给其他角色牌', - }, - charlotte:true, - silent:true, - nopop:true, - }, - } - }, - dcmengjie:{ - trigger:{ - global:'phaseEnd', - }, - forced:true, - direct:true, - locked:false, - filter:function(event,player){ - var target=event.player; - if((target.hasSkill('dctongguan_gangying')&&(target.hasHistory('gain',function(evt){ - return evt._dctongguan_gangying==true; - })||game.getGlobalHistory('changeHp',function(evt){ - return evt.player==target&&(evt.getParent().name=='recover'||target.countCards('h')>target.hp); - }).length>0)) || - target.hasSkill('dctongguan_wuyong')&&target.getHistory('sourceDamage').length || - target.hasSkill('dctongguan_duomou')&&target.getHistory('gain',evt=>evt.getParent().name=='draw'&&evt.getParent('phaseDraw').name!='phaseDraw').length){ - return true; - } - var guojue=false,renzhi=false; - game.countPlayer2(current=>{ - if(current==target) return false; - if(!guojue&¤t.hasHistory('lose',evt=>{ - if(evt.type=='discard'){ - if((evt.discarder||evt.getParent(2).player)!=target) return false; - if(!evt.getl(current).cards2.length) return false; - return true; - } - else if(evt.type=='gain'){ - var evtx=evt.getParent(); - if(evtx.giver||evtx.getParent().name=='_yongjian_zengyu') return false; - var cards=evtx.getg(target); - if(!cards.length) return false; - var cards2=evtx.getl(current).cards2; - for(var card of cards2){ - if(cards.contains(card)) return true; - } - } - return false; - })) guojue=true; - if(!renzhi&¤t.hasHistory('gain',evt=>{ - if(evt.giver!=target||evt.getParent().name=='_yongjian_zengyu') return false; - return evt.cards.length; - })) renzhi=true; - }); - return target.hasSkill('dctongguan_guojue')&&guojue||target.hasSkill('dctongguan_renzhi')&&renzhi; - }, - rules:[ - (target)=>target.getHistory('sourceDamage').length, - (target)=>target.hasHistory('gain',function(evt){ - return evt._dctongguan_gangying; - })||game.getGlobalHistory('changeHp',function(evt){ - return evt.player==target&&evt.getParent().name=='recover'; - }).length>0||target.countCards('h')>target.hp, - (target)=>target.getHistory('gain',evt=>evt.getParent().name=='draw'&&evt.getParent('phaseDraw').name!='phaseDraw').length, - (target,bool)=>bool, - (target,bool)=>bool - ], - content:function(){ - 'step 0' - event.nowProperty=0; - var target=trigger.player; - var guojue=false,renzhi=false; - game.countPlayer2(current=>{ - if(current==target) return false; - if(!guojue&¤t.hasHistory('lose',evt=>{ - if(evt.type=='discard'){ - if((evt.discarder||evt.getParent(2).player)!=target) return false; - if(!evt.getl(current).cards2.length) return false; - return true; - } - else if(evt.type=='gain'){ - var evtx=evt.getParent(); - if(evtx.giver||evtx.getParent().name=='_yongjian_zengyu') return false; - var cards=evtx.getg(target); - if(!cards.length) return false; - var cards2=evtx.getl(current).cards2; - for(var card of cards2){ - if(cards.contains(card)) return true; - } - } - return false; - })) guojue=true; - if(!renzhi&¤t.hasHistory('gain',evt=>{ - if(evt.giver!=target||evt.getParent().name=='_yongjian_zengyu') return false; - return evt.cards.length; - })) renzhi=true; - }); - event.guojue=guojue; event.renzhi=renzhi; - 'step 1' - if(event.nowProperty>=5){ - event.finish(); - return; - } - var skills=lib.skill.dctongguan.derivation; - if(trigger.player.hasSkill(skills[event.nowProperty])&&lib.skill.dcmengjie.rules[event.nowProperty](trigger.player,event[event.nowProperty==3?'guojue':'renzhi'])){ - event.goto(2+event.nowProperty*2); - } else event.redo(); - event.nowProperty++; - 'step 2' - player.chooseTarget('梦解:对一名其他角色造成1点伤害',true,lib.filter.notMe).set('ai',target=>get.damageEffect(target,player,player)); - 'step 3' - if(result.bool){ - player.logSkill('dcmengjie',result.targets[0]); - result.targets[0].damage(); - } - game.delayx(); - event.goto(1); - 'step 4' - if(game.hasPlayer(target=>target!=player&&target.isDamaged())) player.chooseTarget('梦解:令一名角色回复1点体力',function(card,player,target){ - return target.isDamaged(); - }).set('ai',target=>get.recoverEffect(target,player,player)); - else event._result={bool:false}; - 'step 5' - if(result.bool){ - player.logSkill('dcmengjie',result.targets[0]); - result.targets[0].recover(); - } - game.delayx(); - event.goto(1); - 'step 6' - player.logSkill('dcmengjie'); - player.draw(2); - 'step 7' - game.delayx(); - event.goto(1); - 'step 8' - if(game.hasPlayer(target=>target.countDiscardableCards(player,'hej'))) player.chooseTarget('梦解:弃置一名角色区域内至多两张牌',true,(card,player,target)=>{ - return target.countDiscardableCards(player,'hej'); - }).set('ai',target=>get.effect(target,{name:'guohe'},player,player)); - else event._result={bool:false}; - 'step 9' - if(result.bool){ - player.logSkill('dcmengjie',result.targets[0]); - player.discardPlayerCard(result.targets[0],true,'hej',[1,2]); - } - game.delayx(); - event.goto(1); - 'step 10' - player.chooseTarget('梦解:令一名其他角色将手牌补至上限',true,(card,player,target)=>{ - return target!=player; - }).set('ai',target=>{ - var att=get.attitude(_status.event.player,target); - if(target.hasSkillTag('nogain')) att/=6; - if(att>2){ - return Math.min(5,target.maxHp)-target.countCards('h'); - } - return att/3; - }); - 'step 11' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcmengjie',target); - var num=Math.min(5,target.maxHp-target.countCards('h')); - target.draw(num); - } - game.delayx(); - event.goto(1); - } - }, //胡金定 dcdeshi:{ audio:2, @@ -8934,277 +1373,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - // 庞会 - dcyiyong:{ - audio:2, - trigger:{ - source:'damageBegin1', - }, - usable:2, - filter:function(event,player){ - return player.countDiscardableCards(player,'he')>0&&player!=event.player; - }, - check:function(event,player){ - return get.attitude(player,event.player)<0&&player.countCards('he',card=>lib.filter.cardDiscardable(card,player,'dcyiyong')&&get.value(card,player)<7)>0; - }, - logTarget:'player', - content:function(){ - 'step 0' - event.list=[player]; - event.cards0=[];event.cards1=[]; - if(trigger.player.countDiscardableCards(trigger.player,'he')>0){ - event.list.push(trigger.player); - } - if(!event.isMine()&&!event.isOnline()) game.delayx(); - player.chooseCardOL(event.list,'he',true,[1,Infinity],'异勇:弃置任意张牌',(card,player,target)=>{ - return lib.filter.cardDiscardable(card,player,'dcyiyong'); - }).set('ai',card=>{ - var evt=_status.event.getParent(2); - var source=evt.player,player=_status.event.player,target=evt.list[1]; - if(!target) return get.unuseful(card); - if(player==source){ - var total=0,need=0; - target.countCards('he',card=>{ - if(lib.filter.cardDiscardable(card,target,'dcyiyong')&&get.value(card)<5) need+=get.number(card); - }); - for(var i of ui.selected.cards) total+=get.number(i); - if(total>=need+5) return 0; - var val=6; - if(target.hp<=2&&!target.hasSkillTag('filterDamage',null,{ - player:player, - card:evt.getTrigger().card, - })) val+=2+get.number(card)/5; - if(target.countCards('he',card=>get.value(card)<5)>=3) val-=3+get.number(card)/5; - return val-get.value(card); - } - if(ui.selected.cards.length>1&&ui.selected.cards.length+2>=source.countCards('he')) return 0; - if(player.hp<=2&&!target.hasSkillTag('filterDamage',null,{ - player:player, - card:evt.getTrigger().card, - })) return 10-get.value(card); - return 5-get.value(card); - }); - 'step 1' - var lose_list=[],cards=[]; - for(var i=0; iget.number(i,false)).reduce((p,c)=>p+c,0) - } - var num0=getn(event.cards0),num1=getn(event.cards1); - if(num0<=num1){ - player.draw(event.cards1.length); - } - if(num0>=num1){ - trigger.num++; - } - } - }, - // 乐就 - dccuijin:{ - audio:2, - trigger:{global:'useCard'}, - direct:true, - filter:function(event,player){ - return event.card.name=='sha'&&(event.player==player||player.inRange(event.player))&&player.countCards('he')>0; - }, - content:function(){ - 'step 0' - if(player!=game.me&&!player.isOnline()) game.delayx(); - var target=trigger.player; - event.target=target; - player.chooseToDiscard('he',get.prompt('dccuijin',target),'弃置一张牌并令'+get.translation(trigger.player)+'使用的【杀】伤害+1,但若其未造成伤害,则你摸一张牌并对其造成1点伤害。').set('ai',function(card){ - if(_status.event.goon) return 7-get.value(card); - return 0; - }).set('goon',function(){ - var d1=true; - if(trigger.player.hasSkill('jueqing')||trigger.player.hasSkill('gangzhi')) d1=false - for(var target of trigger.targets){ - if(!target.mayHaveShan()||trigger.player.hasSkillTag('directHit_ai',true,{ - target:target, - card:trigger.card, - },true)){ - if(!target.hasSkill('gangzhi')) d1=false; - if(!target.hasSkillTag('filterDamage',null,{ - player:trigger.player, - card:trigger.card, - })&&get.attitude(player,target)<0) return true; - } - } - if(d1) return get.damageEffect(trigger.player,player,player)>0; - return false; - }()).logSkill=['dccuijin',target]; - 'step 1' - if(result.bool){ - if(typeof trigger.baseDamage!='number') trigger.baseDamage=1; - trigger.baseDamage++; - player.addSkill('dccuijin_damage'); - player.markAuto('dccuijin_damage',[trigger.card]); - if(!player.storage.dccuijin_map) player.storage.dccuijin_map={}; - player.storage.dccuijin_map[trigger.card.cardid]=trigger.targets.slice(); - } - }, - subSkill:{ - damage:{ - trigger:{ - global:['damage','damageCancelled','damageZero','shaMiss','useCardToExcluded','useCardToEnd','eventNeutralized','useCardAfter','shaCancelled'], - }, - forced:true, - silent:true, - firstDo:true, - charlotte:true, - onremove:true, - filter:function(event,player,name){ - if(!event.card) return false; - var cards=player.getStorage('dccuijin_damage'); - if(!cards.contains(event.card)) return false; - return true; - }, - content:function(){ - 'step 0' - var card=trigger.card; - if(event.triggername=='useCardAfter'){ - var cards=player.getStorage('dccuijin_damage'); - cards=cards.remove(card); - if(!cards.length){ - player.removeSkill('dccuijin_damage'); - delete player.storage.dccuijin_map; - } - else delete player.storage.dccuijin_map[card.cardid]; - event.finish(); - } - else{ - var target,source; - if(trigger.name.indexOf('damage')==0){ - target=trigger.player; - source=trigger.source; - } - else{ - target=trigger.target; - source=trigger.player; - } - if(player.storage.dccuijin_map[card.cardid].contains(target)&&!target.hasHistory('damage',evt=>{ - return evt.card==card; - })){ - player.logSkill('dccuijin_damage',source); - player.storage.dccuijin_map[card.cardid].remove(target); - player.draw(); - if(source&&source.isIn()){ - player.line(trigger.player,'green'); - trigger.player.damage(); - } - } - } - 'step 1' - game.delayx(); - }, - }, - }, - }, - // 陈矫 - dcxieshou:{ - trigger:{ - global:'damageEnd', - }, - usable:1, - filter:function(event,player){ - return get.distance(player,event.player)<=2&&event.player.isIn(); - }, - check:function(event,player){ - return get.attitude(player,event.player)>4; - }, - locked:false, - logTarget:'player', - onremove:true, - change:function(player,num){ - player.addSkill('dcxieshoux'); - if(typeof player.storage.dcxieshoux!=='number') player.storage.dcxieshoux=0; - if(!num) return; - player.storage.dcxieshoux+=num; - if(player.storage.dcxieshoux!=0) player.markSkill('dcxieshoux'); - else player.unmarkSkill('dcxieshoux'); - game.log(player,'的手牌上限',(num>0?'+':'')+num); - }, - content:function(){ - 'step 0' - lib.skill.dcxieshou.change(player,-1); - 'step 1' - var list=[],target=trigger.player; - event.target=target; - var choiceList=['回复1点体力','复原,摸两张牌']; - if(target.getDamagedHp()==0) choiceList[0]=''+choiceList[0]+''; - else list.push('选项一'); - list.push('选项二'); - target.chooseControl(list).set('choiceList',choiceList).set('prompt',get.translation(player)+'对你发动了【协守】,请选择一项'); - 'step 2' - if(result.control=='选项一'){ - target.recover(); - } - else { - target.link(false); - target.draw(2); - } - }, - ai:{ - expose:0.3, - }, - }, - dcxieshoux:{ - markimage:'image/card/handcard.png', - intro:{ - content:function(storage,player){ - var num=player.storage.dcxieshoux; - return '手牌上限'+(num >= 0?'+':'')+num; - } - }, - charlotte:true, - mod:{ - maxHandcard:function(player,num){ - return num+(player.storage.dcxieshoux||0); - } - }, - }, - dcqingyan:{ - trigger:{ - target:'useCardToTargeted', - }, - filter:function(event,player){ - return event.player!=player&&get.color(event.card)=='black'; - }, - usable:2, - direct:true, - content:function(){ - 'step 0' - if(player.countCards('h')1); - }else{ - player.chooseToDiscard(get.prompt('dcqingyan'),'弃置一张手牌令你的手牌上限+1').set('ai',card=>6-get.value(card)).set('logSkill','dcqingyan'); - } - 'step 1' - if(result.bool){ - if(result.cards&&result.cards.length){ - lib.skill.dcxieshou.change(player,1); - }else{ - player.logSkill('dcqingyan'); - player.drawTo(player.maxHp); - } - } else player.storage.counttrigger.dcqingyan--; - } - }, - dcqizi:{ - mod:{ - playerEnabled:function(card,player,target){ - if(get.distance(player,target)>2&&card.name=='tao'&&target==_status.event.dying) return false; - }, - } - }, //李异谢旌 dcdouzhen:{ audio:2, @@ -9280,360 +1448,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - //公孙度 - dczhenze:{ - audio:2, - trigger:{player:'phaseDiscardBegin'}, - direct:true, - content:function(){ - 'step 0' - var getCond=(player)=>Math.sign(player.countCards('h')-Math.max(0,player.hp)); - var me=getCond(player); - var recovers=game.filterPlayer(current=>getCond(current)==me),loses=game.filterPlayer().removeArray(recovers); - event.recovers=recovers; event.loses=loses; - var list=[]; - if(loses.length) list.push('选项一'); - if(recovers.length) list.push('选项二'); - list.push('cancel2'); - var sign=[['≥','<'],['≠','='],['≤','>']]; - var choiceList=[ - '令所有手牌数'+sign[me+1][0]+'体力值的角色失去1点体力'+(loses.length?'('+get.translation(loses)+')':''), - '令所有手牌数'+sign[me+1][1]+'体力值的角色回复1点体力'+(recovers.length?'('+get.translation(recovers)+')':'') - ]; - if(!loses.length) choiceList[0]=''+choiceList[0]+''; - if(!recovers.length) choiceList[1]=''+choiceList[1]+''; - player.chooseControl(list).set('choiceList',choiceList).set('prompt',get.prompt('dczhenze')).set('ai',()=>_status.event.choice).set('choice',(()=>{ - var effect=0; - if(list.length==2){ - if(list.contains('选项一')){ - loses.forEach(i=>effect+=get.effect(i,{name:'losehp'},player,player)); - if(effect>0) return '选项一'; - }else{ - recovers.forEach(i=>effect+=get.recoverEffect(i,player,player)); - if(effect>0) return '选项二'; - } - }else{ - loses.forEach(i=>effect-=get.effect(i,{name:'losehp'},player,player)); - recovers.forEach(i=>effect+=get.recoverEffect(i,player,player)); - if(effect>0) return '选项二'; - return '选项一'; - } - })()); - 'step 1' - if(result.control=='cancel2'){ - event.finish(); - } - else { - var lose=result.control=='选项一',targets=event[lose?'loses':'recovers']; - player.logSkill('dczhenze',targets); - for(var i of targets){ - i[lose?'loseHp':'recover'](); - } - } - } - }, - dcanliao:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - if((player.getStat().skill.dcanliao||0)>=game.countPlayer(current=>current.group=='qun')) return false; - return true; - }, - filterTarget:function(card,player,target){ - return target.countCards('he'); - }, - content:function(){ - 'step 0' - player.choosePlayerCard(target,'he',true).set('filterButton',function(button){ - var player=_status.event.player,card=button.link; - if(get.owner(card)==player){ - var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player); - if(mod!='unchanged') return mod; - } - return true; - }).set('ai',function(card){ - if(get.attitude(_status.event.player,_status.event.getParent().target)>=0) return -get.buttonValue(card); - return get.buttonValue(card); - }); - 'step 1' - if(result.bool){ - target.loseToDiscardpile(result.links); - target.draw(); - } - }, - ai:{ - expose:0.1, - result:{ - target:function(player,target){ - if(target.hasCard(card=>get.value(card)>=6,'e')&&get.attitude(player,target)<0) return -1; - return 1; - } - } - } - }, - //王烈 - dcchongwang:{ - audio:2, - trigger:{global:'useCard'}, - direct:true, - filter:function(event,player){ - if(player==event.player) return false; - var type=get.type(event.card); - if(type!='basic'&&type!='trick') return false; - var history=game.getAllGlobalHistory('useCard'); - var index=history.indexOf(event); - if(index>0) return history[index-1].player==player; - return false; - }, - content:function(){ - 'step 0' - var source=trigger.player; - var list=[['exclude','令'+get.translation(trigger.card)+'无效']]; - var cards=trigger.cards.filterInD(); - if(source.isIn()&&cards.length>0) list.push(['gain','令'+get.translation(source)+'收回'+get.translation(cards)]); - player.chooseButton([ - get.prompt('dcchongwang',source), - [list,'textbutton'], - 'noforcebutton', - ]).set('ai',function(button){ - var player=_status.event.player,choice=button.link; - var evt=_status.event.getTrigger(); - if(choice=='exclude'){ - var effect=0; - if(!evt.targets.length&&get.info(evt.card,false).notarget) effect-=get.effect(evt.player,evt.card,evt.player,player); - for(var i of evt.targets){ - effect-=get.effect(i,evt.card,evt.player,player); - } - return effect; - } - else{ - var cards=evt.cards.filterInD(); - return get.value(cards,evt.player)*get.attitude(player,evt.player); - } - return 0; - }) - 'step 1' - if(result.bool){ - if(!event.isMine()&&!event.isOnline()) game.delayx(); - } - else event.finish(); - 'step 2' - if(result.bool){ - player.logSkill('dcchongwang',trigger.player); - if(result.links[0]=='gain'){ - player.addTempSkill('dcchongwang_gain'); - trigger._dcchongwang=true; - } - else{ - trigger.targets.length=0; - trigger.all_excluded=true; - game.log(trigger.card,'被无效了'); - } - } - }, - ai:{ - threaten:3.5, - directHit_ai:true, - }, - subSkill:{ - gain:{ - trigger:{global:'useCardAfter'}, - charlotte:true, - forced:true, - popup:false, - filter:function(event,player){ - return event._dcchongwang; - }, - content:function(){ - trigger.player.gain(trigger.cards.filterInD(),'gain2'); - } - } - } - }, - dchuagui:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current!=player&¤t.countCards('he')>0; - }); - }, - content:function(){ - 'step 0' - var min=Math.max.apply(Math,game.filterPlayer().map(function(current){ - return 1+current.getFriends().length; - })); - var max=Math.min(min,game.countPlayer(function(current){ - return current!=player&¤t.countCards('he')>0; - })); - player.chooseTarget(get.prompt('dchuagui'),'令至多'+get.cnNumber(max)+'名角色进行囚徒困境选择',[1,max],function(card,player,target){ - return target!=player&&target.countCards('he')>0; - }).set('animate',false).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - player.logSkill('dchuagui'); - event.players=result.targets.slice(0); - event._global_waiting=true; - } - else event.finish(); - 'step 2' - var send=function(source){ - var next=game.createEvent('dchuagui_choose',false); - next.player=game.me; - next.source=source; - next.setContent(lib.skill.dchuagui.contentx); - game.resume(); - }; - var sendback=function(result,player){ - if(!Array.isArray(result)){ - result=[ - Math.random()<0.5?'仅展示牌':'交出牌', - player.getCards('he').randomGet() - ]; - } - event.results.push([player,result]); - }; - event.ai_targets=[]; - event.results=[]; - var players=game.filterPlayer(function(current){ - return current!=player; - }).sortBySeat(); - var time=10000; - if(lib.configOL&&lib.configOL.choose_timeout) time=parseInt(lib.configOL.choose_timeout)*1000; - for(var i=0;iget.value(b,target)-get.value(a,target)); - var choice='仅展示牌',card=hs[0]; - if(att<-2&&Math.random()>((get.value(card,target)-3)/5)) choice='交出牌'; - sendback([choice,card],target); - if(!event.ai_targets.length){ - clearInterval(event.interval); - if(event.withai) game.resume(); - } - },_status.connectMove?750:75); - },500) - } - 'step 3' - if(event.withme){ - if(_status.connectMode) game.me.unwait(result,game.me); - else{ - if(!Array.isArray(result)){ - result=[ - Math.random()<0.5?'仅展示牌':'交出牌', - player.getCards('he').randomGet() - ]; - } - event.results.push([player,result]); - } - } - 'step 4' - if(event.withol&&!event.resultOL){ - game.pause(); - } - 'step 5' - if(event.ai_targets.length>0){ - event.withai=true; - game.pause(); - } - 'step 6' - delete event._global_waiting; - for(var i of game.players) i.hideTimer(); - event.videoId=lib.status.videoId++; - game.broadcastAll(function(name,id,results){ - var dialog=ui.create.dialog(name+'发动了技能【化归】','hidden','forcebutton'); - dialog.videoId=id; - dialog.classList.add('scroll1'); - dialog.classList.add('scroll2'); - dialog.classList.add('fullwidth'); - dialog.classList.add('fullheight'); - dialog.buttonss=[]; - - var list=['仅展示牌的玩家','交出牌的玩家'] - for(var i=0;i'+list[i]+''); - var buttons=ui.create.div('.buttons',dialog.content); - dialog.buttonss.push(buttons); - buttons.classList.add('popup'); - buttons.classList.add('guanxing'); - } - dialog.open(); - - var getx=function(){ - var item=results.shift(); - var card=item[1][1],index=item[1][0]=='仅展示牌'?0:1; - var button=ui.create.button(card,'card',dialog.buttonss[index]); - button.querySelector('.info').innerHTML=(function(target){ - if(target._tempTranslate) return target._tempTranslate; - var name=target.name; - if(lib.translate[name+'_ab']) return lib.translate[name+'_ab']; - return get.translation(name); - }(item[0])); - if(results.length>0) setTimeout(getx,500); - } - setTimeout(getx,500); - },get.translation(player),event.videoId,event.results.slice(0)); - game.delay(0,2000+event.results.length*500) - 'step 7' - game.broadcastAll('closeDialog',event.videoId); - var shown=[],given=[]; - for(var i of event.results){ - (i[1][0]=='仅展示牌'?shown:given).push(i); - } - var list=given.length>0?given:shown; - var cards=[],targets=[]; - for(var i of list){ - cards.push(i[1][1]); - targets.push(i[0]); - //i[0].$give(i[1][1],player); - } - player.line(targets); - player.gain(cards,'give'); - //step 8 - //game.delayx(); - }, - contentx:function(){ - 'step 0' - event._global_waiting=true; - event.result=['仅展示牌',player.getCards('he').randomGet()]; - var str=get.translation(source); - player.chooseControl('仅展示牌','交出牌').set('choiceList',[ - '仅展示一张牌。但如果所有人都选择了仅展示,则'+str+'获得这张牌', - '将一张牌交给'+str, - ]).set('_global_waiting',true); - 'step 1' - event.result[0]=result.control; - player.chooseCard('he',true).set('_global_waiting',true); - 'step 2' - event.result[1]=result.cards[0]; - }, - }, //穆顺 dcjinjian:{ audio:2, @@ -10007,658 +1821,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //刘晔 - dcpoyuan:{ - audio:2, - trigger:{ - global:'phaseBefore', - player:['phaseZhunbeiBegin','enterGame'], - }, - filter:function(event,player){ - if(event.name=='phase'&&game.phaseNumber>0) return false; - if(player.getEquip('pilitoushiche')){ - return game.hasPlayer(function(current){ - return current!=player&¤t.countDiscardableCards(player,'he')>0; - }); - } - else{ - return !player.isDisabled(5); - } - }, - direct:true, - content:function(){ - 'step 0' - if(player.getEquip('pilitoushiche')){ - event.goto(2); - player.chooseTarget(get.prompt('dcpoyuan'),'弃置一名其他角色的至多两张牌',function(card,player,target){ - return target!=player&&target.countDiscardableCards(player,'he')>0; - }).set('ai',function(target){ - var player=_status.event.player,cards=target.getDiscardableCards(player,'he'); - var att=get.attitude(player,target); - if(att<0&&target.hasSkillTag('noe')) att/=2; - var zheng=[],fu=[]; - for(var i of cards){ - var val=get.value(i,target); - if(val>0) zheng.push(i); - else fu.push(i); - } - zheng.sort((a,b)=>get.value(b,target)-get.value(a,target)); - fu.sort((a,b)=>get.value(b,target)-get.value(a,target)); - zheng=zheng.slice(0,2); - fu=fu.slice(0,2); - var eff1=0,eff2=0; - for(var i of zheng) eff1+=get.value(i,target); - for(var i of fu){ - if(get.position(i)=='e') eff2+=(1-get.value(i,target)); - } - return -att*Math.max(eff1,eff2); - }); - } - else{ - player.chooseBool(get.prompt('dcpoyuan'),'装备一张【霹雳投石车】').set('ai',function(){ - return true; - }) - } - 'step 1' - if(result.bool){ - player.logSkill('dcpoyuan'); - var card=game.createCard('pilitoushiche','diamond',9); - player.$gain2(card); - game.delayx(); - player.equip(card); - } - event.finish(); - 'step 2' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcpoyuan',target); - player.discardPlayerCard(target,true,'he',[1,2]) - } - }, - }, - dchuace:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return event.dchuace&&event.dchuace.length>0&&player.countCards('hs')>0; - }, - onChooseToUse:function(event){ - if(game.online||event.dchuace) return; - var list=lib.inpile.filter(function(i){ - return get.type(i)=='trick'&&lib.filter.filterCard({name:i},event.player,event); - }); - if(!list.length){ - event.set('dchuace',list); - return; - } - var history=_status.globalHistory; - var stop=false; - for(var i=history.length-1;i>=0;i--){ - var evt=history[i]; - if(!stop){ - if(evt.isRound) stop=true; - continue; - } - else{ - for(var j of evt.useCard) list.remove(j.card.name); - if(evt.isRound) break; - } - } - event.set('dchuace',list); - }, - chooseButton:{ - dialog:function(event,player){ - return ui.create.dialog('画策',[event.dchuace,'vcard'],'hidden'); - }, - check:function(button){ - var player=_status.event.player,card={name:button.link[2]}; - return player.getUseValue(card); - }, - backup:function(links,player){ - return { - audio:'dchuace', - viewAs:{name:links[0][2]}, - ai1:(card)=>7-get.value(card), - filterCard:true, - position:'hs', - popname:true, - } - }, - prompt:function(links,player){ - return '将一张手牌当做【'+get.translation(links[0][2])+'】使用'; - }, - }, - ai:{ - order:6, - result:{player:1}, - }, - subSkill:{backup:{}}, - }, - pilitoushiche:{ - trigger:{player:['useCard','respond']}, - forced:true, - equipSkill:true, - filter:function(event,player){ - return get.type(event.card)=='basic'; - }, - content:function(){ - if(player==_status.currentPhase) trigger.baseDamage++; - else player.draw(); - }, - mod:{ - targetInRange:function(card,player){ - if(get.type(card)=='basic'&&player==_status.currentPhase) return true; - }, - } - }, - //路易 - dcyaoyi:{ - audio:2, - getZhuanhuanji:function(player,bool){ - var skills=player.getSkills(null,false,false).filter(function(i){ - var info=get.info(i); - return info&&!info.charlotte&&info.zhuanhuanji; - }); - if(!bool) return skills; - if(!skills.length) return 'none'; - var state=lib.skill.dcyaoyi.getState(player,skills[0]); - for(var i=1;i0&&!player.getStat('skill').dcshoutan; - }, - selectCard:function(){ - if(_status.event.player.hasSkill('dcyaoyi')) return [0,1]; - return [1,1]; - }, - filterCard:function(card,player){ - if(player.hasSkill('dcyaoyi')) return false; - var color=get.color(card,player); - if(player.storage.dcshoutan) return color=='black'; - return color!='black'; - }, - prompt:function(){ - var player=_status.event.player; - if(player.hasSkill('dcyaoyi')) return '点击“确认”来变更转换技状态'; - if(player.storage.dcshoutan) return '弃置一张黑色手牌,变更转换技状态'; - return '弃置一张非黑色手牌,变更转换技状态'; - }, - check:function(card){ - return 11-get.value(card); - }, - content:function(){ - player.changeZhuanhuanji('dcshoutan'); - player.addTempSkill('dcshoutan_blocker',{player:['useCard1','useSkillBegin','phaseUseEnd']}); - }, - zhuanhuanji:true, - mark:true, - marktext:'☯', - intro:{ - content:function(storage,player){ - if(storage) return '转换技。出牌阶段限一次,你可以弃置一张黑色手牌。'; - return '转换技。出牌阶段限一次,你可以弃置一张不为黑色的手牌。'; - }, - }, - ai:{ - order:0.1, - result:{ - player:function(player){ - var base=0; - if(ui.selected.cards.length) base=get.value(ui.selected.cards[0]); - var status=player.storage.dcshoutan; - var cards=player.getCards('hs',function(card){ - return !ui.selected.cards.contains(card); - }); - for(var card of cards){ - var val1=player.getUseValue(card,null,true); - player.storage.dcshoutan=!status; - var val2=0; - try{ - val2=player.getUseValue(card,null,true); - }catch(e){ - player.storage.dcshoutan=status; - } - player.storage.dcshoutan=status; - if(val2>val1) base-=(val2-val1); - } - if(base<0) return 1; - return 0; - }, - }, - }, - subSkill:{blocker:{charlotte:true}}, - }, - dcfuxue:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - direct:true, - filter:function(event,player){ - return player.hp>0&&ui.discardPile.childNodes.length>0; - }, - content:function(){ - 'step 0' - var cards=Array.from(ui.discardPile.childNodes); - var gains=cards.slice(0); - var history=game.getAllGlobalHistory('cardMove',function(evt){ - if(evt.name=='lose') return evt.position==ui.discardPile; - return evt.name=='cardsDiscard'; - }); - for(var i=history.length-1;i>=0;i--){ - var evt=history[i]; - var cards2=evt.cards.filter(function(card){ - return cards.contains(card); - }); - if(cards2.length){ - if(lib.skill.dcfuxue.isUse(evt)){ - gains.removeArray(cards2); - } - cards.removeArray(cards2); - } - if(!cards.length) break; - } - if(gains.length){ - var num=player.hp; - player.chooseButton([ - '复学:选择获得'+(num>0?'至多':'')+get.cnNumber(num)+'张牌', - gains, - ],[1,num]).set('ai',function(button){ - var player=_status.event.player,card=button.link; - var getn=function(card){ - return player.countCards('h',card.name)+ui.selected.buttons.filter((button)=>button.link.name==card.name).length; - } - var val=player.getUseValue(card); - if(card.name=='tao'&&getn(card)>=player.getDamagedHp()) return 0; - if(card.name=='sha'&&getn(card)>=player.getCardUsable('sha')) return 0; - return val; - }); - } - else event.finish(); - 'step 1' - if(result.bool){ - player.logSkill('dcfuxue'); - player.gain(result.links,'gain2').gaintag.add('dcfuxue'); - } - }, - isUse:function(event){ - if(event.name!='cardsDiscard') return false; - var evtx=event.getParent(); - if(evtx.name!='orderingDiscard') return false; - var evt2=(evtx.relatedEvent||evtx.getParent()); - return (evt2.name=='phaseJudge'||evt2.name=='useCard'); - }, - group:'dcfuxue_draw', - subSkill:{ - draw:{ - audio:'dcfuxue', - trigger:{player:'phaseJieshuBegin'}, - forced:true, - locked:false, - mod:{ - aiOrder:function(player,card,num){ - if(get.itemtype(card)=='card'&&card.hasGaintag('dcfuxue')) return num+0.5; - }, - }, - filter:function(event,player){ - return player.hp>0&&!player.hasCard(function(card){ - return card.hasGaintag('dcfuxue'); - },'h'); - }, - content:function(){ - player.draw(player.hp); - }, - }, - }, - }, - //丁尚涴 - dcfengyan:{ - enable:'phaseUse', - usable:2, - chooseButton:{ - dialog:function(event,player){ - var dialog=ui.create.dialog('讽言:请选择一项','hidden'); - dialog.add([[ - ['gain','令一名体力值不大于你的其他角色交给你一张手牌'], - ['sha','视为对一名手牌数不大于你的其他角色使用一张【杀】'] - ],'textbutton']); - return dialog; - }, - filter:function(button,player){ - return !player.hasSkill('dcfengyan_'+button.link,null,null,false); - }, - check:function(button){ - var player=_status.event.player; - if(button.link=='gain'&&game.hasPlayer(function(current){ - return lib.skill.dcfengyan_gain.filterTarget(null,player,current)&&get.effect(current,'dcfengyan_gain',player,player)>0; - })) return 4; - if(button.link=='sha'&&game.hasPlayer(function(current){ - return lib.skill.dcfengyan_sha.filterTarget(null,player,current)&&get.effect(current,'dcfengyan_sha',player,player)>0; - })) return 4; - return 2; - }, - backup:function(links){ - return get.copy(lib.skill['dcfengyan_'+links[0]]); - }, - prompt:function(links){ - if(links[0]=='gain') return '令一名体力值不大于你的其他角色交给你一张手牌'; - return '视为对一名手牌数不大于你的其他角色使用【杀】'; - }, - }, - ai:{ - order:10, - threaten:1.7, - result:{player:1}, - }, - subSkill:{ - backup:{audio:'dcfengyan'}, - gain:{ - audio:'dcfengyan', - filterTarget:function(card,player,target){ - return target!=player&&target.hp<=player.hp&&target.countCards('h')>0; - }, - filterCard:()=>false, - selectCard:-1, - charlotte:true, - content:function(){ - 'step 0' - player.addTempSkill('dcfengyan_gain','phaseUseAfter'); - target.chooseCard('h',true,'交给'+get.translation(player)+'一张牌'); - 'step 1' - if(result.bool) target.give(result.cards,player); - }, - ai:{ - tag:{ - loseCard:1, - gain:1, - }, - result:{ - player:0.1, - target:-1, - }, - }, - }, - sha:{ - audio:'dcfengyan', - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')<=player.countCards('h')&&player.canUse('sha',target,false); - }, - filterCard:()=>false, - selectCard:-1, - charlotte:true, - content:function(){ - player.addTempSkill('dcfengyan_sha','phaseUseAfter'); - player.useCard({ - name:'sha', - isCard:true, - },target,false); - }, - ai:{ - result:{ - player:function(player,target){ - return get.effect(target,{ - name:'sha', - isCard:true, - },player,player); - }, - }, - }, - }, - }, - }, - dcfudao:{ - trigger:{ - global:'phaseBefore', - player:'enterGame', - }, - forced:true, - locked:false, - filter:function(event,player){ - return (event.name!='phase'||game.phaseNumber==0)&&game.hasPlayer((current)=>current!=player); - }, - content:function(){ - 'step 0' - player.chooseTarget(true,lib.filter.notMe,'抚悼:请选择一名“继子”','你或“继子”每回合首次使用牌指定对方为目标后各摸两张牌;杀死你或“继子”的角色称为“决裂”。你或“继子”对“决裂”造成的伤害+1。“决裂”对你使用牌后,其本回合内不能再使用牌。').set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcfudao',target); - game.log(target,'成为了',player,'的继子'); - player.addSkill('dcfudao_effect'); - target.addSkill('dcfudao_effect'); - player.markAuto('dcfudao_effect',[target]); - target.markAuto('dcfudao_effect',[player]); - } - }, - group:'dcfudao_refuse', - subSkill:{ - effect:{ - trigger:{player:'useCardToPlayered'}, - forced:true, - charlotte:true, - usable:1, - filter:function(event,player){ - var target=event.target; - if(player==target||!target.isIn()) return false; - return player.getStorage('dcfudao_effect').contains(target); - }, - logTarget:'target', - content:function(){ - 'step 0' - var list=[player,trigger.target]; - list.sortBySeat(); - game.asyncDraw(list,2); - 'step 1' - game.delayx(); - }, - marktext:'继', - intro:{content:'已和$成为继母子关系'}, - group:['dcfudao_revenge','dcfudao_deadmark'], - }, - deadmark:{ - trigger:{player:'dieBegin'}, - forced:true, - popup:false, - lastDo:true, - silent:true, - filter:function(event,player){ - return get.itemtype(event.source)=='player'; - }, - content:function(){ - trigger.source.markAuto('dcfudao_deadmark',[player]); - }, - marktext:'裂', - intro:{ - name:'决裂', - content:'你害死了$!', - }, - }, - revenge:{ - trigger:{source:'damageBegin1'}, - forced:true, - filter:function(event,player){ - var storage1=event.player.getStorage('dcfudao_deadmark'),storage2=player.getStorage('dcfudao_effect'); - for(var i of storage1){ - if(storage2.contains(i)) return true; - } - return false; - }, - content:function(){ - trigger.num++; - }, - logTarget:'player', - }, - refuse:{ - trigger:{target:'useCardToTargeted'}, - forced:true, - filter:function(event,player){ - var storage1=event.player.getStorage('dcfudao_deadmark'),storage2=player.getStorage('dcfudao_effect'); - for(var i of storage1){ - if(storage2.contains(i)) return true; - } - return false; - }, - content:function(){ - trigger.player.addTempSkill('dcfudao_blocker'); - }, - logTarget:'player', - }, - blocker:{ - charlotte:true, - mod:{ - cardEnabled:()=>false, - cardSavable:()=>false, - }, - }, - }, - }, - //陈珪 - dcyingtu:{ - audio:2, - trigger:{ - global:['gainAfter','loseAsyncAfter'], - }, - usable:1, - filter:function(event,player){ - return lib.skill.dcyingtu.filterx(event,player,player.getNext())||lib.skill.dcyingtu.filterx(event,player,player.getPrevious()); - }, - filterx:function(event,player,target){ - var evt=event.getParent('phaseDraw'); - if(evt&&target==evt.player) return false; - return event.getg(target).length>0&&target.hasCard(function(card){ - return lib.filter.canBeGained(card,target,player) - },'he'); - }, - logTarget:'player', - direct:true, - checkx:function(player,source){ - var target=(source==player.getNext()?player.getPrevious():player.getNext()); - return Math.min(0,get.attitude(player,target))>=get.attitude(player,source); - }, - content:function(){ - 'step 0' - var targets=[]; - event.targets=targets; - if(lib.skill.dcyingtu.filterx(trigger,player,player.getNext())) targets.add(player.getNext()); - if(lib.skill.dcyingtu.filterx(trigger,player,player.getPrevious())) targets.add(player.getPrevious()); - 'step 1' - var target=targets.shift(); - event.target=target; - player.chooseBool( - get.prompt('dcyingtu',target), - '获得该角色的一张牌,然后将一张牌交给该角色的对位角色。若你给出的是装备牌,则其使用其获得的牌。' - ).set('goon',lib.skill.dcyingtu.checkx(player,target)).set('ai',function(){ - return _status.event.goon; - }); - 'step 2' - if(result.bool){ - player.logSkill('dcyingtu',target); - var next=game.createEvent('dcyingtu_insert'); - next.player=player; - next.target=target; - next.setContent(lib.skill.dcyingtu.contentx); - event.finish(); - } - else if(targets.length>0) event.goto(1); - else player.storage.counttrigger.dcyingtu--; - }, - contentx:function(){ - 'step 0' - event.side=(target==player.getPrevious()?'getNext':'getPrevious'); - player.gainPlayerCard(target,true,'he'); - 'step 1' - var he=player.getCards('he'); - if(he.length>0){ - var target=player[event.side](); - event.target=target; - if(he.length==1) event._result={bool:true,cards:he}; - else player.chooseCard('he',true,'交给'+get.translation(target)+'一张牌') - } - else event.finish(); - 'step 2' - if(result.bool){ - var card=result.cards[0]; - event.card=card; - player.line(target); - player.give(card,target); - } - else event.finish(); - 'step 3' - if(target.getCards('h').contains(card)&&get.type(card,null,target)=='equip'&&target.canUse(card,target)) target.chooseUseTarget(card,true,'nopopup'); - }, - }, - dccongshi:{ - audio:2, - trigger:{global:'useCardAfter'}, - forced:true, - locked:false, - filter:function(event,player){ - return get.type(event.card,null,false)=='equip'&&event.player.isMaxEquip(); - }, - content:function(){ - player.draw(); - }, - }, //胡班 dcchongyi:{ audio:2, @@ -10748,1622 +1910,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //黄权 - dcquanjian:{ - audio:2, - enable:'phaseUse', - usable:2, - chooseButton:{ - dialog:function(event,player){ - var dialog=ui.create.dialog('劝谏:令一名其他角色…','hidden'); - dialog.add([[ - ['damage','对其攻击范围内的一名角色造成1点伤害'], - ['draw','将其手牌数调整至体力上限(至多摸至五张),且其本回合内不能使用手牌'] - ],'textbutton']); - return dialog; - }, - filter:function(button,player){ - return !player.hasSkill('dcquanjian_'+button.link,null,null,false); - }, - check:()=>1+Math.random(), - backup:function(links){ - return get.copy(lib.skill['dcquanjian_'+links[0]]); - }, - prompt:function(links){ - if(links[0]=='damage') return '令一名其他角色对攻击范围内的另一名角色造成1点伤害'; - return '令一名其他角色将手牌数调整至体力上限(至多摸至五张)且本回合内不能使用手牌'; - }, - }, - ai:{ - order:2, - result:{player:1}, - }, - subSkill:{ - backup:{audio:'dcquanjian'}, - damage:{ - audio:'dcquanjian', - charlotte:true, - selectTarget:2, - filterTarget:function(card,player,target){ - if(!ui.selected.targets.length) return target!=player; - return ui.selected.targets[0].inRange(target); - }, - complexTarget:true, - complexSelect:true, - filterCard:()=>false, - selectCard:-1, - targetprompt:['造成伤害','受到伤害'], - multitarget:true, - content:function(){ - 'step 0' - player.addTempSkill('dcquanjian_damage','phaseUseAfter'); - targets[0].chooseControl().set('choiceList',[ - '对'+get.translation(targets[1])+'造成1点伤害', - '本回合下次受到的伤害+1', - ]).set('ai',function(){ - return _status.event.eff>=0?0:1; - }).set('eff',get.damageEffect(targets[1],targets[0],targets[0])); - 'step 1' - if(result.index==0){ - targets[1].damage(targets[0]); - } - else{ - target.addMark('dcquanjian_effect',1,false); - target.addTempSkill('dcquanjian_effect'); - } - }, - ai:{ - result:{ - player:function(player,target){ - if(ui.selected.targets.length==0){ - if(!game.hasPlayer((current)=>current.inRangeOf(target)&&get.damageEffect(current,target,player)>0)) return 0; - if(get.attitude(player,target)>0) return 2; - return 1; - } - return get.damageEffect(target,ui.selected.targets[0],player,player); - }, - }, - }, - }, - draw:{ - audio:'dcquanjian', - charlotte:true, - filterTarget:function(card,player,target){ - if(target==player) return false; - var num=target.countCards('h'); - if(num>target.maxHp) return true; - return numfalse, - selectCard:-1, - content:function(){ - 'step 0' - player.addTempSkill('dcquanjian_draw','phaseUseAfter'); - var num1=target.countCards('h'),num2=target.maxHp; - var num=0; - if(num1>num2){ - event.index=0; - num=num1-num2; - target.chooseControl().set('choiceList',[ - '弃置'+get.cnNumber(num)+'张手牌', - '本回合下次受到的伤害+1', - ]).set('ai',function(){ - var player=_status.event.player; - if(_status.event.number==1&&player.hasCard(function(card){ - return lib.filter.cardDiscardable(card,player,'dcquanjian_draw')&&get.value(card)<5; - },'h')) return 0; - return 1; - }).set('number',num); - } - else{ - event.index=1; - num=Math.min(num2,5)-num1; - if(num<=0) event.finish(); - else target.chooseControl().set('choiceList',[ - '摸'+get.cnNumber(num)+'张牌,且本回合内不能使用或打出手牌', - '本回合下次受到的伤害+1', - ]).set('ai',function(){ - return 0; - }); - } - event.num=num; - 'step 1' - if(result.index==0){ - if(event.index==0) target.chooseToDiscard('h',true,num); - else target.draw(num); - } - else{ - target.addMark('dcquanjian_effect',1,false); - target.addTempSkill('dcquanjian_effect'); - event.finish(); - } - 'step 2' - target.addTempSkill('dcquanjian_disable'); - }, - ai:{ - result:{ - target:function(player,target){ - var num1=target.countCards('h'),num2=target.maxHp; - if(num1>num2) return -1; - return Math.min(5,num2)-num1; - }, - }, - }, - }, - effect:{ - charlotte:true, - trigger:{player:'damageBegin3'}, - forced:true, - onremove:true, - marktext:'谏', - content:function(){ - trigger.num+=player.countMark(event.name); - player.removeSkill(event.name); - }, - intro:{content:'下次受到的伤害+#'}, - ai:{threaten:2.5}, - }, - disable:{ - charlotte:true, - mod:{ - cardEnabled2:function(card){ - if(get.position(card)=='h') return false; - }, - }, - mark:true, - marktext:'禁', - intro:{content:'不能使用或打出手牌'}, - ai:{threaten:2.5}, - }, - }, - }, - dctujue:{ - audio:2, - trigger:{player:'dying'}, - direct:true, - limited:true, - skillAnimation:true, - animationColor:'gray', - filter:function(event,player){ - return player.countCards('he')>0; - }, - content:function(){ - 'step 0' - player.chooseTarget(lib.filter.notMe,get.prompt2('dctujue')).set('ai',function(target){ - if(_status.event.skip) return 0; - return 200+get.attitude(_status.event.player,target); - }).set('skip',player.countCards('hs',{name:['tao','jiu']})+player.hp>0); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dctujue',target); - player.awakenSkill('dctujue'); - var cards=player.getCards('he'); - player.give(cards,target); - player.recover(cards.length); - player.draw(cards.length); - } - }, - }, - //尹夫人 - dcyingyu:{ - audio:2, - trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']}, - direct:true, - filter:function(event,player){ - if(event.name=='phaseJieshu'&&!player.storage.dcyingyu) return false; - return game.countPlayer(function(current){ - return current.countCards('h')>0; - })>1; - }, - content:function(){ - 'step 0' - player.chooseTarget(2,get.prompt('dcyingyu'),'展示两名角色的各一张手牌。若这两张牌花色不同,则你可以令其中一名角色获得另一名角色的展示牌。',function(card,player,target){ - return target.countCards('h')>0; - }).set('ai',function(target){ - var player=_status.event.player; - if(!ui.selected.targets.length) return get.attitude(player,target); - return 1-get.attitude(player,target); - }); - 'step 1' - if(result.bool){ - var targets=result.targets.sortBySeat(); - event.targets=targets; - event.cards=[]; - player.logSkill('dcyingyu',targets); - player.choosePlayerCard(targets[0],true,'h'); - } - else event.finish(); - 'step 2' - var card=result.cards[0]; - player.line(targets[0]); - player.showCards(card,get.translation(player)+'对'+get.translation(targets[0])+'发动了【媵予】') - event.cards.push(card); - player.choosePlayerCard(targets[1],true,'h'); - 'step 3' - var card=result.cards[0]; - player.line(targets[1]); - player.showCards(card,get.translation(player)+'对'+get.translation(targets[1])+'发动了【媵予】') - event.cards.push(card); - if(get.suit(cards[0],targets[0])==get.suit(cards[1],targets[1])) event.finish(); - 'step 4' - var str1=get.translation(targets[0]),str2=get.translation(targets[1]); - player.chooseControl('cancel2').set('choiceList',[ - '令'+str1+'获得'+str2+'的'+get.translation(cards[1]), - '令'+str2+'获得'+str1+'的'+get.translation(cards[0]), - ]).set('goon',get.attitude(player,targets[0])>0?0:1).set('ai',()=>_status.event.goon); - 'step 5' - if(result.control!='cancel2'){ - var i=result.index; - targets[1-i].give(cards[1-i],targets[i],'give'); - } - }, - onremove:true, - }, - dcyongbi:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return player.countCards('h')>0&&game.hasPlayer((current)=>lib.skill.dcyongbi.filterTarget(null,player,current)); - }, - filterTarget:function(card,player,target){ - return target!=player&&target.hasSex('male'); - }, - selectCard:-1, - filterCard:true, - position:'h', - limited:true, - skillAnimation:true, - animationColor:'fire', - discard:false, - lose:false, - content:function(){ - 'step 0' - player.awakenSkill('dcyongbi'); - if(player.hasSkill('dcyingyu',null,null,false)) player.storage.dcyingyu=true; - player.give(cards,target); - 'step 1' - var list=[]; - for(var i of cards){ - list.add(get.suit(i,player)); - if(list.length>=3) break; - } - if(list.length>=2){ - player.addMark('dcyongbi_eff1',2,false); - player.addSkill('dcyongbi_eff1'); - target.addMark('dcyongbi_eff1',2,false); - target.addSkill('dcyongbi_eff1'); - } - if(list.length>=3){ - player.addMark('dcyongbi_eff2',1,false); - player.addSkill('dcyongbi_eff2'); - target.addMark('dcyongbi_eff2',1,false); - target.addSkill('dcyongbi_eff2'); - } - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - if(player.hasUnknown()) return 0; - var zhu=get.zhu(player); - if(zhu&&get.attitude(player,zhu)>0){ - if(target==zhu) return 4; - } - return 1; - }, - }, - }, - subSkill:{ - eff1:{ - mod:{ - maxHandcard:(player,num)=>num+player.countMark('dcyongbi_eff1'), - }, - charlotte:true, - onremove:true, - marktext:'拥', - intro:{content:'手牌上限+#'}, - }, - eff2:{ - trigger:{player:'damageBegin4'}, - forced:true, - filter:function(event,player){ - return event.num>1; - }, - content:function(){ - trigger.num-=player.countMark('dcyongbi_eff2'); - }, - charlotte:true, - onremove:true, - marktext:'嬖', - intro:{content:'受到大于1的伤害时,此伤害-#'}, - }, - }, - }, - //全惠解 - dchuishu:{ - audio:2, - getList:function(player){ - if(!player.storage.dchuishu) return [3,1,2]; - return player.storage.dchuishu.slice(0); - }, - trigger:{player:'phaseDrawEnd'}, - content:function(){ - 'step 0' - var list=lib.skill.dchuishu.getList(player); - event.list=list; - player.draw(list[0]); - 'step 1' - player.storage.dchuishu_effect=event.list[2]; - player.addTempSkill('dchuishu_effect'); - player.chooseToDiscard('h',true,event.list[1]); - }, - onremove:true, - mark:true, - intro:{ - markcount:function(storage,player){ - var list=lib.skill.dchuishu.getList(player); - return Math.max.apply(Math,list); - }, - content:function(storage,player){ - var list=lib.skill.dchuishu.getList(player); - return '摸牌阶段结束时,你可以摸['+list[0]+']张牌。若如此做:你弃置['+list[1]+']张手牌,且当你于本回合内弃置第['+list[2]+']+1张牌后,你从弃牌堆中获得等量的锦囊牌。'; - }, - }, - subSkill:{ - effect:{ - audio:'dchuishu', - trigger:{ - player:'loseAfter', - global:'loseAsyncAfter', - }, - forced:true, - popup:false, - charlotte:true, - onremove:true, - filter:function(event,player){ - var num=player.storage.dchuishu_effect; - if(typeof num!='number') return false; - if(event.type!='discard'||event.getlx===false) return false; - var evt=event.getl(player); - if(evt.cards2.length==0) return false; - var prev=0,goon=true; - player.getHistory('lose',function(evt){ - if(!goon||evt.type!='discard') return false; - prev+=evt.cards2.length; - if(evt==event||event.getParent()==event){ - goon=false; - return false; - } - }); - return prev>num; - }, - content:function(){ - player.removeSkill('dchuishu_effect'); - var evt=trigger.getl(player); - var num=evt.cards2.length; - var cards=[]; - for(var i=0;i=5) return true; - } - return false; - }, - skillAnimation:true, - animationColor:'wood', - content:function(){ - 'step 0' - player.awakenSkill('dcligong'); - player.gainMaxHp(); - player.recover(); - 'step 1' - player.removeSkill('dcyishu'); - 'step 2' - var list; - if(_status.characterlist){ - list=[]; - for(var i=0;i<_status.characterlist.length;i++){ - var name=_status.characterlist[i]; - if(lib.character[name][1]=='wu'&&(lib.character[name][0]=='female'||lib.character[name][0]=='double')) list.push(name); - } - } - else if(_status.connectMode){ - list=get.charactersOL(function(i){ - return lib.character[i][1]!='wu'||(lib.character[i][0]!='female'&&lib.character[i][0]!='double'); - }); - } - else{ - list=get.gainableCharacters(function(info){ - return info[1]=='wu'&&(info[0]=='female'||info[0]=='double'); - }); - } - var players=game.players.concat(game.dead); - for(var i=0;i'; - td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ - if(_status.dragged) return; - if(_status.justdragged) return; - _status.tempNoButton=true; - setTimeout(function(){ - _status.tempNoButton=false; - },500); - var link=this.link; - if(!this.classList.contains('bluebg')){ - if(rSkill.length>=2) return; - rSkill.add(link); - this.classList.add('bluebg'); - } - else{ - this.classList.remove('bluebg'); - rSkill.remove(link); - } - }); - } - dialog.content.appendChild(table); - dialog.add('  '); - dialog.open(); - - event.switchToAuto=function(){ - event.dialog.close(); - event.control.close(); - game.resume(); - _status.imchoosing=false; - }; - event.control=ui.create.control('ok',function(link){ - event.dialog.close(); - event.control.close(); - game.resume(); - _status.imchoosing=false; - }); - for(var i=0;i0; - }, - filterCard:true, - position:'h', - discard:false, - lose:false, - delay:false, - check:function(cardx){ - var player=_status.event.player; - var num1=get.number(cardx),players=game.filterPlayer(); - var goon=false,effect=0; - for(var current of players){ - var cards=current.getCards('ej',function(card){ - var num=get.number(card); - return num==num1; - }); - if(cards.length){ - goon=true; - var att=get.attitude(player,current); - for(var card of cards){ - if(get.position(card)=='e'){ - var val=get.value(card,current); - if(att<=0) effect+=val; - else effect-=val/2; - } - else{ - var eff=get.effect(current,{name:card.viewAs||card.name},player,player); - effect-=get.sgn(att)*eff; - } - } - } - } - if(goon){ - if(effect>0) return 6+effect-get.value(cardx); - return 0; - } - return game.hasPlayer(function(current){ - return current!=player&&get.attitude(player,current)>0; - })?(6-get.value(cardx)):0; - }, - content:function(){ - 'step 0' - player.showCards(cards,get.translation(player)+'发动了【数合】'); - 'step 1' - event.cards2=[]; - var num1=get.number(cards[0],player); - var lose_list=[],players=game.filterPlayer(); - for(var current of players){ - var cards=current.getCards('ej',function(card){ - var num=get.number(card); - return num==num1; - }); - if(cards.length>0){ - player.line(current,'thunder'); - current.$throw(cards); - lose_list.push([current,cards]); - event.cards2.addArray(cards); - } - } - if(lose_list.length){ - event.lose_list=lose_list; - game.loseAsync({ - lose_list:lose_list, - }).setContent('chooseToCompareLose'); - } - else{ - event.goto(3); - player.chooseTarget(true,lib.filter.notMe,'将'+get.translation(event.cards[0])+'交给一名其他角色').set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - } - 'step 2' - var cards=event.cards2; - if(cards.length>0){ - if(event.lose_list) game.delayx(); - player.gain(cards,'gain2'); - } - event.finish(); - 'step 3' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'green'); - player.give(cards,target); - player.addMark('dcliehou',1); - } - }, - ai:{ - order:2, - result:{ - player:1, - }, - }, - }, - dcliehou:{ - audio:2, - trigger:{player:'phaseDrawBegin2'}, - forced:true, - filter:function(event,player){ - return !event.numFixed; - }, - content:function(){ - var num=Math.min(5,1+player.countMark('dcliehou')); - trigger.num+=num; - trigger._dcliehou=num; - }, - group:'dcliehou_discard', - subSkill:{ - discard:{ - trigger:{player:'phaseDrawEnd'}, - forced:true, - filter:function(event,player){ - return typeof event._dcliehou=='number'; - }, - content:function(){ - 'step 0' - var num=trigger._dcliehou; - player.chooseToDiscard(num,'he','弃置'+get.cnNumber(num)+'张牌,或失去1点体力').set('ai',function(card){ - if(_status.event.goon) return 6-get.value(card); - return 26-get.value(card); - }).set('goon',player.hp>Math.max(1,4-num)||get.effect(player,{name:'losehp'},player,player)>0); - 'step 1' - if(!result.bool) player.loseHp(); - }, - }, - }, - marktext:'爵', - intro:{ - name:'列侯(爵)', - name2:'爵', - content:'〖列侯〗的摸牌数+#', - }, - }, - //杜夔 - dcfanyin:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ - return ui.cardPile.childNodes.length>0; - }, - frequent:true, - locked:false, - content:function(){ - 'step 0' - var card=false; - if(typeof event.num!='number'){ - var num=false; - for(var i=0;i0&&player.canUse('juedou',target)){ - player.useCard({name:'juedou',isCard:true},target,'dcxunji_effect'); - } - 'step 1' - player.unmarkAuto('dcxunji_effect',[target]); - if(!player.storage.dcxunji_effect.length) player.removeSkill('dcxunji_effect'); - }, - group:'dcxunji_loseHp', - }, - loseHp:{ - trigger:{source:'damageSource'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.card&&event.card.name=='juedou'&&event.getParent().skill=='dcxunji_effect'; - }, - content:function(){ - player.loseHp(trigger.num); - }, - }, - }, - }, - dcjiaofeng:{ - audio:2, - trigger:{source:'damageBegin1'}, - forced:true, - usable:1, - filter:function(event,player){ - return player.isDamaged()&&!player.getHistory('sourceDamage').length; - }, - content:function(){ - var num=player.getDamagedHp(); - if(num>0) player.draw(); - if(num>1) trigger.num++; - if(num>2) player.recover(); - }, - }, - //张奋和大风车 - dcwanglu:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - content:function(){ - if(player.isDisabled(5)||player.getEquip('dagongche')){ - var next=player.phaseUse(); - event.next.remove(next); - trigger.getParent().next.push(next); - } - else{ - var card=game.createCard('dagongche','spade',9); - player.$gain2(card); - game.delayx(); - player.equip(card); - } - }, - broadcast:function(player){ - var card=player.getEquip('dagongche'); - if(card) game.broadcast(function(card,storage){ - card.storage=storage; - },card,card.storage); - }, - }, - dcxianzhu:{ - audio:2, - trigger:{source:'damageSource'}, - direct:true, - filter:function(event,player){ - if(!event.card||event.card.name!='sha') return false; - var card=player.getEquip('dagongche'); - if(!card) return false; - var num=0; - for(var i=1;i<=3;i++){ - var key='大攻车选项'+get.cnNumber(i,true); - if(card.storage[key]) num+=card.storage[key]; - } - return num<5; - }, - content:function(){ - 'step 0' - var choiceList=[ - '令【杀】无距离限制且无视防具', - '令【杀】的可选目标数+1', - '令后续的弃牌数量+1', - ]; - var list=[]; - var card=player.getEquip('dagongche'); - for(var i=1;i<=3;i++){ - var key='大攻车选项'+get.cnNumber(i,true); - var num=card.storage[key]; - if(i==1){ - if(!num) list.push('选项一'); - else choiceList[0]=(''+choiceList[0]+'(已强化)'); - } - else{ - list.push('选项'+get.cnNumber(i,true)); - if(num) choiceList[i-1]+=('(已强化'+num+'次)'); - } - } - player.chooseControl(list,'cancel2').set('prompt','是否发动【陷筑】强化【大攻车】?').set('choiceList',choiceList).set('ai',function(){ - var player=_status.event.player,controls=_status.event.controls.slice(0); - var getval=function(choice){ - var card=player.getEquip('dagongche'); - if(choice=='选项一'){ - card.storage.大攻车选项一=1; - var goon=false; - if(game.hasPlayer(function(current){ - var eff1=0,eff2=0; - var cardx={name:'sha',isCard:true}; - if(player.canUse(cardx,current)) eff1=get.effect(current,cardx,player,player); - cardx.storage={dagongche:true}; - if(player.canUse(cardx,current)) eff2=get.effect(current,cardx,player,player); - return (eff2>eff1); - })) goon=true; - delete card.storage.大攻车选项一; - if(goon) return 5; - return 0; - } - else if(choice=='选项二'){ - var num=1; - if(card.storage.大攻车选项二) num+=card.storage.大攻车选项二; - var cardx={name:'sha',isCard:true}; - if(game.countPlayer(function(current){ - return player.canUse(cardx,current)&&get.effect(current,cardx,player,player)>0; - })>num) return 2; - } - else if(choice=='选项三') return 1; - return 0; - }; - var eff=0,current='cancel2'; - for(var i of controls){ - var effx=getval(i); - if(effx>eff){ - eff=effx; - current=i; - } - } - return current; - }); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('dcxianzhu'); - var card=player.getEquip('dagongche'),key='大攻车'+result.control; - if(!card.storage[key]) card.storage[key]=0; - card.storage[key]++; - lib.skill.dcwanglu.broadcast(player); - } - }, - }, - dcchaixie:{ - audio:2, - trigger:{ - player:['loseAfter'], - global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], - }, - forced:true, - filter:function(event,player){ - var evt=event.getl(player); - if(!evt||!evt.es||!evt.es.length) return false; - for(var card of evt.es){ - if(card.name=='dagongche'){ - for(var i=1;i<=3;i++){ - if(card.storage['大攻车选项'+get.cnNumber(i,true)]) return true; - } - } - } - return false; - }, - content:function(){ - var num=0; - var evt=trigger.getl(player); - for(var card of evt.es){ - if(card.name=='dagongche'){ - for(var i=1;i<=3;i++){ - var key='大攻车选项'+get.cnNumber(i,true); - if(card.storage[key]) num+=card.storage[key]; - } - } - } - player.draw(num); - }, - }, - dagongche_skill:{ - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - var cardx={ - name:'sha', - isCard:true, - storage:{dagongche:true}, - }; - return player.hasUseTarget(cardx); - }, - equipSkill:true, - content:function(){ - var card={ - name:'sha', - isCard:true, - storage:{dagongche:true}, - }; - lib.skill.dcwanglu.broadcast(player); - player.chooseUseTarget(card,'大攻车:是否视为使用【杀】?',false).logSkill='dagongche_skill'; - }, - mod:{ - targetInRange:function(card,player,target){ - if(card.storage&&card.storage.dagongche){ - var cardx=player.getEquip('dagongche'); - if(cardx&&cardx.storage.大攻车选项一) return true; - } - }, - selectTarget:function(card,player,range){ - if(card.storage&&card.storage.dagongche&&range[1]!=-1){ - var cardx=player.getEquip('dagongche'); - if(cardx&&cardx.storage.大攻车选项二) range[1]+=cardx.storage.大攻车选项二; - } - }, - canBeDiscarded:function(card){ - if(card.name=='dagongche'&&get.position(card)=='e'){ - for(var i=1;i<=3;i++){ - if(card.storage['大攻车选项'+get.cnNumber(i,true)]) return; - } - return false; - } - }, - }, - ai:{ - unequip:true, - skillTagFilter:function(player,tag,arg){ - if(!arg||!arg.card||!arg.card.storage||!arg.card.storage.dagongche) return false; - var card=player.getEquip('dagongche'); - if(!card||!card.storage.大攻车选项一) return false; - }, - }, - group:'dagongche_skill_discard', - subSkill:{ - discard:{ - trigger:{source:'damageSource'}, - equipSkill:true, - forced:true, - filter:function(event,player){ - if(!event.card||!event.card.storage||!event.card.storage.dagongche) return false; - if(event.getParent().type!='card') return false; - return event.player.hasCard(function(card){ - return lib.filter.canBeDiscarded(card,event.player,player); - },'he'); - }, - logTarget:'player', - content:function(){ - var num=1; - var cardx=player.getEquip('dagongche'); - if(cardx&&cardx.storage.大攻车选项三) num+=cardx.storage.大攻车选项三; - player.discardPlayerCard(trigger.player,true,num,'he'); - }, - }, - }, - }, - //刘徽 - dcgeyuan:{ - audio:2, - trigger:{ - global:['loseAfter','loseAsyncAfter','cardsDiscardAfter','equipAfter'], - }, - forced:true, - filter:function(event,player){ - var cards=event.getd(); - for(var i of cards){ - if(lib.skill.dcgeyuan.filterNumber(player,get.number(i,false))) return true; - } - return false; - }, - content:function(){ - 'step 0' - event.cards=trigger.getd(); - 'step 1' - var card=false; - for(var i of cards){ - if(lib.skill.dcgeyuan.filterNumber(player,get.number(i,false))){ - card=i; - cards.remove(card); - break; - } - } - if(card){ - var number=get.number(card,false); - game.log(player,'将','#y'+get.strNumber(number),'记录为','#g“圆环之弧”'); - player.markAuto('dcgeyuan_homura',[number]); - if(player.getStorage('dcgeyuan').length>player.getStorage('dcgeyuan_homura').length){ - if(cards.length>0) event.redo(); - else event.finish() - } - else if(player.storage.dcgusuan) event.goto(5); - } - else event.finish(); - 'step 2' - var list=player.getStorage('dcgeyuan_homura'); - var num1=list[0],num2=list[list.length-1]; - event.cards2=[]; - var lose_list=[],players=game.filterPlayer(); - for(var current of players){ - var cards=current.getCards('ej',function(card){ - var num=get.number(card); - return num==num1||num==num2; - }); - if(cards.length>0){ - current.$throw(cards); - lose_list.push([current,cards]); - event.cards2.addArray(cards); - } - } - if(lose_list.length){ - event.lose_list=lose_list; - game.loseAsync({ - lose_list:lose_list, - }).setContent('chooseToCompareLose'); - } - 'step 3' - var list=player.getStorage('dcgeyuan_homura'); - var num1=list[0],num2=list[list.length-1]; - var cards=event.cards2; - for(var i=0;i0){ - if(event.lose_list) game.delayx(); - player.gain(cards,'gain2'); - } - 'step 4' - var list=player.getStorage('dcgeyuan_homura'); - var num1=list[0],num2=list[list.length-1]; - player.storage.dcgeyuan_homura=[]; - game.log(player,'清空了','#g“圆环之弧”'); - if(player.getStorage('dcgeyuan').length>3){ - player.unmarkAuto('dcgeyuan',[num1,num2]); - game.log(player,'从','#g“圆环之理”','中移除了','#y'+get.strNumber(num1),'和','#y'+get.strNumber(num2)); - } - event.finish(); - 'step 5' - player.chooseTarget('割圆:选择至多三名角色','第一名角色摸三张牌,第二名角色弃置四张牌,第三名角色将所有手牌与牌堆底的牌交换',true,[1,3]); - 'step 6' - if(result.bool){ - var targets=result.targets; - event.targets=targets; - player.line(targets); - targets[0].draw(3); - if(targets.length<2) event.goto(4); - } - else event.goto(4); - 'step 7' - if(targets[1].countCards('he')>0) targets[1].chooseToDiscard('he',true,4); - if(targets.length<3) event.goto(4); - 'step 8' - var target=targets[2]; - var cards=get.bottomCards(5); - game.cardsGotoOrdering(cards); - var hs=target.getCards('h'); - if(hs.length>0) target.lose(hs,ui.cardPile); - target.gain(cards,'draw'); - event.goto(4); - }, - group:'dcgeyuan_qyubee', - filterNumber:function(player,num){ - var list1=player.getStorage('dcgeyuan'); - var list2=player.getStorage('dcgeyuan_homura'); - if(!list1.contains(num)) return false; - if(!list2.length) return true; - if(list2.contains(num)) return false; - var madoka=list1.indexOf(num); - for(var i of list2){ - var homura=list1.indexOf(i); - var dist=Math.abs(madoka-homura); - if(dist==1||dist==list1.length-1) return true; - } - return false; - }, - subSkill:{ - qyubee:{ - audio:'dcgeyuan', - trigger:{ - global:'phaseBefore', - player:'enterGame', - }, - forced:true, - filter:function(event,player){ - return (event.name!='phase'||game.phaseNumber==0)&&!player.storage.dcgusuan; - }, - content:function(){ - var list=[]; - for(var i=1;i<=13;i++){ - list.push(i); - } - list.randomSort(); - player.storage.dcgeyuan=list; - player.markSkill('dcgeyuan'); - var str='#y'; - for(var i=0;i<13;i++){ - str+=get.strNumber(list[i]); - if(i!=12) str+=','; - } - game.log(player,'将','#y“圆环之理”','赋值为',str); - }, - }, - }, - intro:{ - name:'圆环之理', - mark:function(dialog,storage,player){ - dialog.content.style['overflow-x']='visible'; - var list=storage; - if(!storage||!storage.length) return '(圆环之理尚不存在)'; - var list2=player.getStorage('dcgeyuan_homura'); - var core=document.createElement('div'); - var centerX=-10,centerY=80,radius=80; - var radian=Math.PI*2/list.length; - var fulllist=['A','2','3','4','5','6','7','8','9','10','J','Q','K']; - for(var i=0;i['+fulllist[list[i]-1]+']'; - td.style.position='absolute'; - core.appendChild(td); - td.style.left=(centerX+radius*Math.sin(radian*i))+'px'; - td.style.top=(centerY-radius*Math.cos(radian*i))+'px'; - } - dialog.content.appendChild(core); - }, - }, - }, - dcjieshu:{ - audio:2, - trigger:{player:['useCard','respond']}, - forced:true, - filter:function(event,player){ - var num=get.number(event.card,false); - if(typeof num!='number') return false; - return lib.skill.dcgeyuan.filterNumber(player,num) - }, - content:function(){ - player.draw(); - }, - mod:{ - ignoredHandcard:function(card,player){ - if(!player.getStorage('dcgeyuan').contains(get.number(card))) return true; - }, - cardDiscardable:function(card,player,name){ - if(name=='phaseDiscard'&&!player.getStorage('dcgeyuan').contains(get.number(card))) return false; - }, - }, - }, - dcgusuan:{ - audio:2, - trigger:{global:'phaseEnd'}, - forced:true, - juexingji:true, - skillAnimation:true, - animationColor:'soil', - filter:function(event,player){ - return player.getStorage('dcgeyuan').length==3; - }, - content:function(){ - player.awakenSkill('dcgusuan'); - player.storage.dcgusuan=true; - player.loseMaxHp(); - }, - ai:{combo:'dcgeyuan'}, - derivation:'dcgeyuan_magica', - }, - //管亥 - suoliang:{ - audio:2, - trigger:{source:'damageSource'}, - logTarget:'player', - usable:1, - filter:function(event,player){ - return event.player!=player&&event.player.maxHp>0&&event.player.countCards('he')>0; - }, - check:function(event,player){ - return get.attitude(player,event.player)<=0; - }, - content:function(){ - 'step 0' - var target=trigger.player; - event.target=target; - player.choosePlayerCard(target,true,'he',[1,target.maxHp],'选择'+get.translation(target)+'的至多'+get.cnNumber(target.maxHp)+'张牌'); - 'step 1' - if(result.bool){ - player.showCards(result.cards,get.translation(player)+'对'+get.translation(target)+'发动了【索粮】') - var cards=result.cards.filter(function(card){ - var suit=get.suit(card,target); - if(suit!='heart'&&suit!='club') return false; - return lib.filter.canBeGained(card,target,player) - }); - if(cards.length) player.gain(cards,target,'giveAuto','bySelf'); - else{ - var cards=result.cards.filter(function(card){ - return lib.filter.canBeDiscarded(card,target,player) - }); - if(cards.length) target.discard(cards,'notBySelf'); - } - } - }, - }, - qinbao:{ - audio:2, - trigger:{player:'useCard'}, - forced:true, - filter:function(event,player){ - return (event.card.name=='sha'||get.type(event.card,null,false)=='trick')&&game.hasPlayer(function(current){ - return current!=player&¤t.countCards('h')>=player.countCards('h'); - }); - }, - content:function(){ - var hs=player.countCards('h'); - trigger.directHit.addArray(game.filterPlayer(function(current){ - return current!=player&¤t.countCards('h')>=hs; - })); - }, - ai:{ - threaten:1.4, - directHit_ai:true, - skillTagFilter:function(player,tag,arg){ - return player.countCards('h',function(card){ - return !ui.selected.cards.contains(card); - })<=arg.target.countCards('h'); - }, - }, - }, - //胡昭 - midu:{ - audio:2, - enable:'phaseUse', - usable:1, - isDisabled:function(player,pos){ - return pos>0?player.isDisabled(pos):player.storage._disableJudge; - }, - chooseButton:{ - dialog:function(event,player){ - var dialog=ui.create.dialog('弥笃:选择要废除或恢复的装备栏或判定区','hidden'); - dialog.classList.add('withbg'); - dialog.noforcebutton=true; - var list1=[],list2=[]; - for(var i=1;i<6;i++){ - (player.isDisabled(i)?list2:list1).push(i); - } - (player.storage._disableJudge?list2:list1).push(-1); - var addTable=function(list){ - var table=document.createElement('div'); - table.classList.add('add-setting'); - table.style.margin='0'; - table.style.width='100%'; - table.style.position='relative'; - for(var i of list){ - var td=ui.create.div('.shadowed.reduce_radius.pointerdiv.tdnode'); - td.innerHTML=''+(i>0?get.translation('equip'+i)+'栏':'判定区')+''; - td.link=i; - td.addEventListener(lib.config.touchscreen?'touchend':'click',ui.click.button); - for(var j in lib.element.button){ - td[j]=lib.element.button[j]; - } - table.appendChild(td); - dialog.buttons.add(td); - } - dialog.content.appendChild(table); - } - if(list1.length){ - dialog.addText('未废除'); - addTable(list1); - } - if(list2.length){ - dialog.addText('已废除'); - addTable(list2); - } - return dialog; - }, - filter:function(button,player){ - if(!ui.selected.buttons.length) return true; - if(lib.skill.midu.isDisabled(player,ui.selected.buttons[0].link)) return false; - return !player.isDisabled(button.link); - }, - check:function(button){ - var player=_status.event.player; - if(lib.skill.midu.isDisabled(player,button.link)){ - if(button.link<=0) return -10; - if(player.hasCard(function(card){ - return get.subtype(card)==('equip'+button.link); - },'hs')) return 15; - return 10; - } - if(button.link<=0||player.isEmpty(button.link)&&!player.hasCard(function(card){ - return get.subtype(card)==('equip'+button.link)&&player.canUse(card,player)&&get.effect(player,card,player,player)>0; - },'hs')) return 5; - return 0; - }, - select:[1,6], - backup:function(links,player){ - if(lib.skill.midu.isDisabled(player,links[0])){ - return { - audio:'midu', - selectCard:-1, - selectTarget:-1, - filterCard:()=>false, - filterTarget:()=>false, - equip:links[0], - content:function(){ - var pos=lib.skill.midu_backup.equip; - if(pos<=0) player.enableJudge(); - else player.enableEquip(pos); - player.addTempSkill('huomo',{player:'phaseBegin'}); - }, - } - } - else{ - return { - audio:'midu', - selectCard:-1, - filterCard:()=>false, - filterTarget:true, - equip:links.sort(), - content:function(){ - var list=lib.skill.midu_backup.equip,bool=false; - for(var i of list){ - if(i<=0) bool=true; - else player.disableEquip(i); - } - if(bool) player.disableJudge(); - target.draw(list.length) - }, - ai:{ - tag:{ - draw:1, - }, - result:{ - target:2, - }, - }, - } - } - }, - prompt:function(links,player){ - if(lib.skill.midu.isDisabled(player,links[0])){ - return '恢复一个装备栏或判定区并获得〖活墨〗'; - } - var numc=get.cnNumber(links.length); - return '废除'+numc+'个装备栏或判定区并令一名角色摸'+numc+'张牌'; - }, - }, - derivation:'huomo', - ai:{ - order:8, - result:{player:1}, - }, - subSkill:{backup:{}}, - }, - xianwang:{ - mod:{ - globalTo:function(source,player,distance){ - var num=player.countDisabled(); - if(num>0) return distance+(num>2?2:1); - }, - globalFrom:function(source,player,distance){ - var num=source.countDisabled(); - if(num>0) return distance-(num>2?2:1); - }, - }, - }, //牛辅 dcxiaoxi:{ auto:2, @@ -12580,382 +2126,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //夏侯令女 - fuping:{ - audio:2, - hiddenCard:function(player,name){ - var list=player.getStorage('fuping').slice(0); - list.removeArray(player.getStorage('fuping_round')); - return list.contains(name)&&player.hasCard((card)=>(get.type(card)!='basic'),'ehs'); - }, - enable:'chooseToUse', - locked:false, - filter:function(event,player){ - var list=player.getStorage('fuping').slice(0); - list.removeArray(player.getStorage('fuping_round')); - if(!list.length) return false; - if(!player.hasCard((card)=>(get.type(card)!='basic'),'ehs')) return false; - for(var i of list){ - var type=get.type2(i,false); - if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true; - } - return false; - }, - chooseButton:{ - dialog:function(event,player){ - var list=player.getStorage('fuping').slice(0); - list.removeArray(player.getStorage('fuping_round')); - var list2=[]; - for(var i of list){ - var type=get.type2(i,false); - if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) list2.push([type,'',i]); - } - return ui.create.dialog('浮萍',[list2,'vcard']); - }, - check:function(button){ - if(_status.event.getParent().type!='phase') return 1; - return _status.event.player.getUseValue({name:button.link[2]},null,true); - }, - backup:function(links,player){ - return { - audio:'fuping', - filterCard:(card)=>get.type(card)!='basic', - position:'he', - popname:true, - viewAs:{ - name:links[0][2], - isCard:true, - }, - check:function(card){ - return 8-get.value(card); - }, - precontent:function(){ - player.addTempSkill('fuping_round'); - player.markAuto('fuping_round',[event.result.card.name]); - }, - } - }, - prompt:function(links,player){ - return '将一张非基本牌当做【'+get.translation(links[0][2])+'】使用'; - }, - }, - ai:{ - order:8, - result:{player:1}, - respondSha:true, - skillTagFilter:function(player){ - var list=player.getStorage('fuping').slice(0); - list.removeArray(player.getStorage('fuping_round')); - return list.contains('sha'); - }, - }, - mod:{ - targetInRange:function(card,player,target){ - if(player.countDisabled()>=5) return true; - }, - }, - marktext:'萍', - intro:{content:'已记录$'}, - group:'fuping_mark', - subSkill:{ - mark:{ - trigger:{global:'useCardAfter'}, - filter:function(event,player){ - return player!=event.player&&event.targets.contains(player)&& - player.countDisabled()<5&&!player.getStorage('fuping').contains(event.card.name); - }, - logTarget:'player', - prompt2:(event)=>('废除一个装备栏并记录【'+get.translation(event.card.name)+'】'), - check:function(event,player){ - var list=['tao','juedou','guohe','shunshou','wuzhong','xietianzi','yuanjiao','wanjian','nanman','huoshaolianying','chuqibuyi','zhujinqiyuan','lebu','bingliang']; - if(!list.contains(event.card.name)) return false; - if(['nanman','wanjian'].contains(event.card.name)&&!player.hasValueTarget({name:event.card.name})) return false; - var list=[3,5,4,1,2]; - for(var i of list){ - if(!player.isDisabled(i)){ - var card=player.getEquip(i); - if(!card) return true; - if(get.value(card,player)<=0) return true; - } - } - return false; - }, - content:function(){ - player.markAuto('fuping',[trigger.card.name]); - game.log(player,'记录了','#y'+get.translation(trigger.card.name)); - player.chooseToDisable().set('ai',function(event,player,list){ - var list=[3,5,4,1,2]; - for(var i of list){ - if(!player.isDisabled(i)){ - var card=player.getEquip(i); - if(!card) return 'equip'+i; - if(get.value(card,player)<=0) return 'equip'+i; - } - } - return list.randomGet(); - }); - }, - }, - backup:{audio:'fuping'}, - round:{charlotte:true,onremove:true}, - }, - }, - weilie:{ - audio:2, - enable:'phaseUse', - filter:function(event,player){ - return player.countMark('weilie')<=player.getStorage('fuping').length&&player.countCards('he')>0&&game.hasPlayer((current)=>current.isDamaged()) - }, - filterCard:true, - position:'he', - filterTarget:(card,player,target)=>target.isDamaged(), - check:function(card){ - return 8-get.value(card); - }, - content:function(){ - 'step 0' - player.addMark('weilie',1,false); - target.recover(); - 'step 1' - if(target.isDamaged()) target.draw(); - }, - onremove:true, - ai:{ - order:1, - result:{ - player:function(player,target){ - var eff=get.recoverEffect(target,player,player); - if(target.getDamagedHp()>1) eff+=get.effect(target,{name:'wuzhong'},player,player)/2; - return eff; - }, - }, - }, - }, - //刘巴 - dczhubi:{ - audio:2, - trigger:{ - global:['loseAfter','loseAsyncAfter'], - }, - filter:function(event,player){ - if(event.type!='discard'||event.getlx===false) return false; - for(var i of event.cards){ - if(get.suit(i,event.player)=='diamond') return true; - } - return false; - }, - prompt2:'检索一张【无中生有】并置于牌堆顶', - check:function(event,player){ - if(!_status.currentPhase) return false; - return get.attitude(player,_status.currentPhase.next)>0; - }, - content:function(){ - var card=get.cardPile(function(card){ - return card.name=='wuzhong'&&get.suit(card)!='diamond'; - }); - if(card){ - game.log(player,'将',card,'置于牌堆顶'); - card.fix(); - ui.cardPile.insertBefore(card,ui.cardPile.firstChild); - game.updateRoundNumber(); - game.delayx(); - } - }, - }, - dcliuzhuan:{ - audio:2, - group:['dcliuzhuan_mark','dcliuzhuan_gain'], - mod:{ - targetEnabled:function(card){ - if(card.cards){ - for(var i of card.cards){ - if(i.hasGaintag('dcliuzhuan_tag')) return false; - } - } - else if(get.itemtype(card)=='card'){ - if(card.hasGaintag('dcliuzhuan_tag')) return false; - } - }, - }, - subSkill:{ - gain:{ - trigger:{global:['loseAfter','loseAsyncAfter','cardsDiscardAfter']}, - forced:true, - logTarget:()=>_status.currentPhase, - filter:function(event,player){ - var current=_status.currentPhase; - if(!current) return false; - if(event.name=='cardsDiscard'){ - var evtx=event.getParent(); - if(evtx.name!='orderingDiscard') return false; - var evtx2=(evtx.relatedEvent||evtx.getParent()); - return current.hasHistory('lose',function(evtx3){ - var evtx4=evtx3.relatedEvent||evtx3.getParent(); - if(evtx2!=evtx4) return false; - for(var i in evtx3.gaintag_map){ - if(evtx3.gaintag_map[i].contains('dcliuzhuan_tag')) return true; - } - }); - return false; - } - else if(event.name=='lose'){ - if(event.player!=current||event.position!=ui.discardPile) return false; - for(var i in event.gaintag_map){ - if(event.gaintag_map[i].contains('dcliuzhuan_tag')) return true; - } - return false; - } - return current.hasHistory('lose',function(evt){ - if(evt.getParent()!=event||evt.position!=ui.discardPile) return false; - for(var i in evt.gaintag_map){ - if(evt.gaintag_map[i].contains('dcliuzhuan_tag')) return true; - } - }); - }, - content:function(){ - var cards,current=_status.currentPhase; - if(trigger.name=='lose') cards=trigger.hs.filter(function(i){ - return trigger.gaintag_map[i.cardid]&&trigger.gaintag_map[i.cardid].contains('dcliuzhuan_tag')&&get.position(i,true)=='d'; - }); - else if(trigger.name=='cardsDiscard'){ - var evtx=trigger.getParent(); - var evtx2=(evtx.relatedEvent||evtx.getParent()); - var bool=false; - var history=current.getHistory('lose',function(evtx3){ - var evtx4=evtx3.relatedEvent||evtx3.getParent(); - if(evtx2!=evtx4) return false; - for(var i in evtx3.gaintag_map){ - if(evtx3.gaintag_map[i].contains('dcliuzhuan_tag')) return true; - } - }); - cards=trigger.cards.filter(function(i){ - for(var evt of history){ - if(evt.gaintag_map[i.cardid]&&evt.gaintag_map[i.cardid].contains('dcliuzhuan_tag')&&get.position(i,true)=='d') return true; - } - return false; - }); - } - else{ - cards=[]; - current.getHistory('lose',function(evt){ - if(evt.getParent()!=trigger||evt.position!=ui.discardPile) return false; - for(var card of evt.hs){ - if(get.position(card,true)!='d') continue; - var i=card.cardid; - if(evt.gaintag_map[i]&&evt.gaintag_map[i].contains('dcliuzhuan_tag')) cards.push(card); - } - }); - } - if(cards&&cards.length>0) player.gain(cards,'gain2'); - }, - }, - mark:{ - trigger:{global:'gainBegin'}, - forced:true, - popup:false, - silent:true, - lastDo:true, - filter:function(event,player){ - if(player==event.player||event.player!=_status.currentPhase) return false; - var evt=event.getParent('phaseDraw'); - if(evt&&evt.name=='phaseDraw') return false; - return true; - }, - content:function(){ - trigger.gaintag.add('dcliuzhuan_tag'); - trigger.player.addTempSkill('dcliuzhuan_tag'); - }, - }, - tag:{ - charlotte:true, - onremove:(player,skill)=>player.removeGaintag(skill), - }, - }, - }, - //张勋 - suizheng:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('suizheng'),'令一名角色下回合内获得〖随征〗效果').set('',function(target){ - var player=_status.event.player,att=get.attitude(player,target); - if(target.hasJudge('lebu')) return att/2; - return att*get.threaten(target)*Math.sqrt(2+player==target?(player.countCards('h','sha')*2):target.countCards('h')) - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('suizheng',target); - target.addMark('suizheng_effect',1,false); - target.markAuto('suizheng_source',[player]); - target.addTempSkill('suizheng_effect',{player:player==target?'phaseJieshuBefore':'phaseAfter'}); - } - }, - subSkill:{ - effect:{ - audio:'suizheng', - charlotte:true, - mod:{ - targetInRange:function(card){ - if(card.name=='sha') return true; - }, - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+player.countMark('suizheng_effect'); - }, - }, - trigger:{player:'phaseUseEnd'}, - forced:true, - popup:false, - filter:function(event,player){ - var list=player.getStorage('suizheng_source'); - if(!list.filter((i)=>i.isIn().length)) return false; - return player.hasHistory('sourceDamage',function(evt){ - return evt.player.isIn()&&evt.getParent('phaseUse')==event; - }); - }, - content:function(){ - 'step 0' - var targets=player.getStorage('suizheng_source').slice(0).sortBySeat(); - event.targets=targets; - 'step 1' - var target=targets.shift(); - event.target=target; - var list=[]; - player.getHistory('sourceDamage',function(evt){ - if(evt.player.isIn()&&evt.getParent('phaseUse')==trigger) list.add(evt.player); - }); - if(!list.length) event.finish(); - else if(target.isIn()){ - list=list.filter(function(i){ - return target.canUse('sha',i,false); - }); - if(list.length>0) target.chooseTarget('随征:是否对一名角色使用【杀】?',function(card,player,target){ - return _status.event.targets.contains(target); - }).set('targets',list).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,{name:'sha'},player,player); - }); - } - else event._result={bool:false}; - 'step 2' - if(result.bool){ - target.useCard({ - name:'sha', - isCard:true, - },result.targets,false,'suizheng_effect'); - } - if(targets.length>0) event.goto(1); - }, - onremove:function(player){ - delete player.storage.suizheng_effect; - delete player.storage.suizheng_source; - }, - intro:{content:'使用【杀】无距离限制且次数上限+#'}, - }, - }, - }, //冯方 dcditing:{ audio:2, @@ -13093,765 +2263,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //王昶 - dckaiji:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - if(player.maxHp<=0) return false; - if(!player.storage.dckaiji) return true; - return player.hasCard((card)=>lib.filter.cardDiscardable(card,player,'phaseUse'),'he'); - }, - filterCard:function(card,player){ - if(!player.storage.dckaiji) return false; - return true; - }, - position:'he', - selectCard:function(){ - var player=_status.event.player; - return player.storage.dckaiji?[1,player.maxHp]:-1; - }, - check:function(card){ - var player=_status.event.player; - if(!player.hasSkill('dcpingxi')) return 0; - var num=lib.skill.dcpingxi.getNum()+ui.selected.cards.length; - if(num0; - })){ - if(get.position(card)=='h'&&player.needsToDiscard()>ui.selected.cards.length) return 7+1/Math.max(1,get.value(card)); - return 7-get.value(card); - } - return 0; - }, - content:function(){ - player.changeZhuanhuanji('dckaiji'); - if(!cards.length) player.draw(Math.min(player.maxHp,5)); - }, - zhuanhuanji:true, - mark:true, - marktext:'☯', - intro:{ - content:(storage)=>('转换技。出牌阶段限一次,你可以'+(storage?'弃置至多X张牌':'摸X张牌')+'(X为你的体力上限且至多为5)。'), - }, - ai:{ - threaten:1.6, - order:function(item,player){ - if(player.storage.dckaiji) return 0.1; - return 8; - }, - result:{player:1}, - }, - }, - dcpingxi:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - getNum:function(){ - var num=0; - game.getGlobalHistory('cardMove',function(evt){ - if(evt.name=='lose'&&evt.type=='discard') num+=evt.cards2.length; - }); - return num; - }, - filter:function(event,player){ - return lib.skill.dcpingxi.getNum()>0&&game.hasPlayer(function(current){ - return current!=player; - }); - }, - content:function(){ - 'step 0' - var num=lib.skill.dcpingxi.getNum(); - player.chooseTarget([1,num],function(card,player,target){ - return target!=player; - },get.prompt('dcpingxi'),'选择至多'+get.cnNumber(num)+'名其他角色。弃置这些角色的各一张牌,然后视为对这些角色使用一张【杀】').set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,{name:'guohe_copy2'},player,player)+get.effect(target,{name:'sha'},player,player); - }); - 'step 1' - if(result.bool){ - var targets=result.targets.sortBySeat(); - event.targets=targets; - player.logSkill('dcpingxi',targets); - event.num=0; - } - else event.finish(); - 'step 2' - var target=targets[num]; - if(target.hasCard(function(card){ - return lib.filter.canBeDiscarded(card,player,target); - },'he')) player.discardPlayerCard(target,'he',true); - event.num++; - if(event.num0) player.useCard({ - name:'sha', - isCard:true, - },targetsx); - }, - }, - //赵昂 - dczhongjie:{ - audio:2, - round:1, - trigger:{global:'dying'}, - logTarget:'player', - filter:function(event,player){ - return event.player.hp<1&&event.reason&&event.reason.name=='loseHp'; - }, - check:function(event,player){ - return get.attitude(player,event.player)>2; - }, - content:function(){ - trigger.player.recover(); - trigger.player.draw(); - }, - }, - dcsushou:{ - audio:2, - trigger:{global:'phaseUseBegin'}, - filter:function(event,player){ - return player.hp>0&&event.player.isMaxHandcard(true); - }, - logTarget:'player', - check:function(event,player){ - var num=player.hp; - if(player.hasSkill('dczhongjie')&&(player.storage.dczhongjie_roundcount||0)1; - }, - content:function(){ - 'step 0' - player.loseHp(); - event.target=trigger.player; - 'step 1' - var num=player.getDamagedHp(); - if(num>0) player.draw(num); - if(player==target) event.finish(); - 'step 2' - var ts=target.getCards('h'); - if(ts.length<2) event.finish(); - else{ - var hs=player.getCards('h'); - ts=ts.randomGets(Math.floor(ts.length/2)); - if(!hs.length){ - player.viewCards(get.translation(target)+'的部分手牌'); - event.finish(); - return; - } - var next=player.chooseToMove('夙守:交换至多'+get.cnNumber(Math.min(hs.length,ts.length,player.getDamagedHp()))+'张牌'); - next.set('list',[ - [get.translation(target)+'的部分手牌',ts,'dcsushou_tag'], - ['你的手牌',hs], - ]); - next.set('filterMove',function(from,to,moved){ - if(typeof to=='number') return false; - var player=_status.event.player; - var hs=player.getCards('h'); - var changed=hs.filter(function(card){ - return !moved[1].contains(card); - }); - var changed2=moved[1].filter(function(card){ - return !hs.contains(card); - }); - if(changed.length0; - } - return false; - }, - content:function(){ - trigger.num++; - var source=trigger.source; - if(source.group=='wu'){ - var cards=trigger.cards.filterInD(); - if(cards.length>0){ - source.gain(cards,'gain2'); - source.addMark('xiecui_effect',1,false); - source.addTempSkill('xiecui_effect'); - } - } - }, - subSkill:{ - effect:{ - charlotte:true, - mod:{ - maxHandcard:(player,num)=>num+player.countMark('xiecui_effect'), - }, - marktext:'翠', - onremove:true, - intro:{content:'手牌上限+#'}, - }, - }, - ai:{threaten:1.75}, - }, - youxu:{ - audio:2, - trigger:{global:'phaseEnd'}, - logTarget:'player', - filter:function(event,player){ - return event.player.countCards('h')>event.player.hp; - }, - check:function(event,player){ - if(get.attitude(player,event.player)<=0) return true; - else return game.hasPlayer(function(current){ - return current!=event.player&¤t.isDamaged()&¤t.isMinHp()&& - get.attitude(player,current)>0&&get.recoverEffect(current,player,player)>0; - }); - }, - content:function(){ - 'step 0' - if(player==trigger.player){ - player.chooseCard('h',true,'请展示一张手牌'); - } - else{ - player.choosePlayerCard(trigger.player,true,'h'); - } - 'step 1' - var card=result.cards[0]; - event.card=card; - var str=get.translation(player); - if(player!=trigger.player) str+=('对'+get.translation(trigger.player)); - str+='发动了【忧恤】'; - player.showCards(card,str); - player.chooseTarget('令一名角色获得'+get.translation(card),'若其体力值为全场最少,则其回复1点体力',function(card,player,target){ - return target!=_status.event.getTrigger().player; - }).set('ai',function(target){ - var player=_status.event.player,att=get.attitude(player,target); - if(att<0) return 0; - if(target.isDamaged()&&target.isMinHp&&get.recoverEffect(target,player,player)>0) return 4*att; - return att; - }); - 'step 2' - var target=result.targets[0]; - event.target=target; - player.line(target,'green'); - target.gain(card,trigger.player,'give').giver=player; - 'step 3' - if(target.isMinHp()) target.recover(); - }, - }, - //纪灵 - dcshuangren:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - preHidden:true, - filter:function(event,player){ - return player.countCards('h')>0&&game.hasPlayer(function(current){ - return current!=player&&player.canCompare(current); - }) - }, - content:function(){ - 'step 0' - var goon; - if(player.needsToDiscard()>1){ - goon=player.hasCard(function(card){ - return card.number>10&&get.value(card)<=5; - }); - } - else if(player.hasSha()){ - goon=player.hasCard(function(card){ - return (card.number>=9&&get.value(card)<=5)||get.value(card)<=3; - }); - } - else{ - goon=player.hasCard(function(card){ - return get.value(card)<=5; - }); - } - player.chooseTarget(get.prompt2('dcshuangren'),function(card,player,target){ - return player.canCompare(target); - }).set('ai',function(target){ - var player=_status.event.player; - if(_status.event.goon&&get.attitude(player,target)<0){ - return get.effect(target,{name:'sha'},player,player); - } - return 0; - }).set('goon',goon).setHiddenSkill(event.name); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('dcshuangren',target); - player.chooseToCompare(target); - } - else{ - event.finish(); - } - 'step 2' - if(result.bool){ - var target=event.target; - if(game.hasPlayer(function(current){ - if(target==current||target.group!=current.group) return false; - return player.canUse('sha',current,false); - })){ - var str='请选择视为使用【杀】的目标'; - var str2='操作提示:选择一名角色B,或选择包含A('+get.translation(target)+')在内的两名角色A和B(B的势力需为'+get.translation(target.group)+'势力)'; - player.chooseTarget([1,2],str,str2,true,function(card,player,target){ - if(!player.canUse('sha',target,false)) return false; - var current=_status.event.target; - if(target==current) return true; - if(target.group!=current.group) return false; - if(!ui.selected.targets.length) return true; - return ui.selected.targets[0]==current; - return current==target; - }).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,{name:'sha'},player,player); - }).set('target',target).set('complexTarget',true); - } - else{ - player.useCard({name:'sha',isCard:true},target,false); - event.finish(); - } - } - else{ - player.addTempSkill('dcshuangren_debuff','phaseUseAfter'); - event.finish(); - } - 'step 3' - if(result.bool&&result.targets&&result.targets.length){ - player.useCard({name:'sha',isCard:true},result.targets,false); - } - }, - subSkill:{ - debuff:{ - charlotte:true, - mod:{ - cardEnabled:function(card){ - if(card.name=='sha') return false; - }, - }, - }, - }, - }, - //蓝曹华 - caiyi:{ - audio:2, - zhuanhuanji:true, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - onremove:function(player){ - delete player.storage.caiyi; - delete player.storage.caiyi_info; - }, - filter:function(event,player){ - if(player.storage.caiyi_info){ - if(player.storage.caiyi_info[player.storage.caiyi?1:0].length>=4) return false; - } - return true; - }, - choices:[[ - '回复X点体力', - '摸X张牌', - '复原武将牌', - '随机执行一个已经移除过的选项', - ],[ - '受到X点伤害', - '弃置X张牌', - '翻面并横置', - '随机执行一个已经移除过的选项', - ]], - filterx:[[ - (player)=>player.isDamaged(), - ()=>true, - (player)=>player.isTurnedOver()||player.isLinked(), - ()=>true, - ],[ - ()=>true, - (player)=>player.hasCard(function(card){ - return lib.filter.cardDiscardable(card,player,'caiyi'); - },'he'), - (player)=>!player.isTurnedOver()||!player.isLinked(), - ()=>true, - ]], - content:function(){ - 'step 0' - if(!player.storage.caiyi_info) player.storage.caiyi_info=[[],[]]; - var index=player.storage.caiyi?1:0; - event.index=index; - var list=player.storage.caiyi_info[index],choices=lib.skill.caiyi.choices[index],numbers=['⒈',';⒉',';⒊',';⒋']; - event.num=4-list.length; - var str='令一名角色选择执行其中一项:'; - for(var i=0;i<4;i++){ - if(list.contains(i)) continue; - if(i==3&&!list.length) continue; - str+=numbers.shift(); - str+=choices[i]; - } - str+='。'; - str=str.replace(/X/g,get.cnNumber(event.num)); - player.chooseTarget(get.prompt('caiyi')+'(当前状态:'+(index?'阳':'阴')+')',str).set('ai',function(target){ - var player=_status.event.player; - return (player.storage.caiyi?-1:1)*get.attitude(player,target); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('caiyi',target); - player.changeZhuanhuanji('caiyi'); - event.goto(event.index==1?5:2); - } - else event.finish(); - 'step 2' - var list=[],str=get.cnNumber(num); - var choiceList=[ - '回复'+str+'点体力。', - '摸'+str+'张牌。', - '将武将牌翻至正面且重置。', - '随机执行一个已经被移除的选项。', - ]; - var storage=player.storage.caiyi_info[event.index]; - for(var i=0;i<4;i++){ - if(storage.contains(i)){ - choiceList[i]=(''+choiceList[i]+''); - } - else if(!lib.skill.caiyi.filterx[event.index][i](target)||(i==3&&!storage.length)){ - choiceList[i]=(''+choiceList[i]+''); - } - else list.push('选项'+get.cnNumber(i+1,true)) - } - if(!list.length){ - event.finish(); - return; - } - target.chooseControl(list).set('choiceList',choiceList).set('ai',function(){ - var evt=_status.event,player=evt.player; - var list=evt.controls.slice(0); - var gett=function(choice){ - if(choice=='cancel2') return 0.1; - var max=0,func={ - 选项一:function(current){ - max=get.recoverEffect(current,player,player)*Math.min(evt.getParent().num,player.getDamagedHp()); - }, - 选项二:function(target){ - max=get.effect(target,{name:'wuzhong'},player,player)/2*evt.getParent().num; - }, - 选项三:function(target){ - if(player.isTurnedOver()) max+=25; - if(player.isLinked()) max+=get.effect(player,{name:'tiesuo'},player,player); - }, - 选项四:function(target){ - max=3; - }, - }[choice]; - func(player); - return max; - }; - return list.sort(function(a,b){ - return gett(b)-gett(a); - })[0]; - }); - 'step 3' - var index2=['选项一','选项二','选项三','选项四'].indexOf(result.control); - player.storage.caiyi_info[event.index].push(index2); - if(index2==3){ - var list=player.storage.caiyi_info[event.index].filter(function(i){ - return i!=3&&lib.skill.caiyi.filterx[event.index][i](target); - }); - if(!list.length){ - event.finish(); - return; - } - index2=list.randomGet(); - } - switch(index2){ - case 0: - target.recover(num); - break; - case 1: - target.draw(num); - break; - case 2: - !target.isTurnedOver()||target.turnOver(); - break; - } - if(index2!=2) event.finish(); - 'step 4' - !target.isLinked()||target.link(); - event.finish(); - 'step 5' - var list=[],str=get.cnNumber(num); - var choiceList=[ - '受到'+str+'点伤害。', - '弃置'+str+'张牌。', - '将武将牌翻至背面并横置。', - '随机执行一个已经被移除的选项。', - ]; - var storage=player.storage.caiyi_info[event.index]; - for(var i=0;i<4;i++){ - if(storage.contains(i)){ - choiceList[i]=(''+choiceList[i]+''); - } - else if(!lib.skill.caiyi.filterx[event.index][i](target)||(i==3&&!storage.length)){ - choiceList[i]=(''+choiceList[i]+''); - } - else list.push('选项'+get.cnNumber(i+1,true)) - } - if(!list.length){ - event.finish(); - return; - } - target.chooseControl(list).set('choiceList',choiceList).set('ai',function(){ - var evt=_status.event,player=evt.player; - var list=evt.controls.slice(0); - var gett=function(choice){ - if(choice=='cancel2') return 0.1; - var max=0,func={ - 选项一:function(current){ - max=get.effect(current,{name:'damage'},player,player)*evt.getParent().num; - }, - 选项二:function(target){ - max=get.effect(target,{name:'guohe_copy2'},player,player)*Math.min(player.countCards('he'),evt.getParent().num); - }, - 选项三:function(target){ - if(!player.isTurnedOver()) max-=5; - if(!player.isLinked()) max+=get.effect(player,{name:'tiesuo'},player,player); - }, - 选项四:function(target){ - max=-3; - }, - }[choice]; - func(player); - return max; - }; - return list.sort(function(a,b){ - return gett(b)-gett(a); - })[0]; - }); - 'step 6' - var index2=['选项一','选项二','选项三','选项四'].indexOf(result.control); - player.storage.caiyi_info[event.index].push(index2); - if(index2==3){ - var list=player.storage.caiyi_info[event.index].filter(function(i){ - return i!=3&&lib.skill.caiyi.filterx[event.index][i](target); - }); - if(!list.length){ - event.finish(); - return; - } - index2=list.randomGet(); - } - switch(index2){ - case 0: - target.damage(num); - break; - case 1: - target.chooseToDiscard(num,true,'he'); - break; - case 2: - target.isTurnedOver()||target.turnOver(); - break; - } - if(index2!=2) event.finish(); - 'step 7' - target.isLinked()||target.link(); - event.finish(); - }, - mark:true, - marktext:'☯', - intro:{ - content:function(storage){ - if(storage) return '转换技。结束阶段,你可令一名角色选择并执行一项,然后移除此选项:⒈受到X点伤害。⒉弃置X张牌。⒊翻面并横置。⒋随机执行一个已经移除过的阳选项。(X为该阴阳态剩余选项的数量)。'; - return '转换技。结束阶段,你可令一名角色选择并执行一项,然后移除此选项:⒈回复X点体力。⒉摸X张牌,⒊复原武将牌。⒋随机执行一个已经移除过的阴选项。⒋随机执行一个已经移除过的阳选项。(X为该阴阳态剩余选项的数量)。'; - }, - }, - }, - guili:{ - audio:2, - trigger:{player:'phaseBegin'}, - forced:true, - locked:false, - filter:function(event,player){ - return player.phaseNumber==1&&game.hasPlayer((current)=>current!=player); - }, - content:function(){ - 'step 0' - player.chooseTarget(lib.filter.notMe,true,'请选择【归离】的目标',lib.translate.guili_info).set('ai',function(target){ - return -get.threaten(target); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'green'); - game.log(player,'选择了',target); - player.storage.guili_insert=target; - player.addSkill('guili_insert'); - game.delayx(); - } - }, - onremove:true, - subSkill:{ - insert:{ - trigger:{global:'phaseAfter'}, - forced:true, - charlotte:true, - logTarget:'player', - filter:function(event,player){ - if(event.player!=player.storage.guili_insert) return false; - if(event.player.getHistory('sourceDamage').length>0) return false; - var history=event.player.actionHistory; - if(history[history.length-1].isRound) return true; - for(var i=history.length-2;i>=0;i--){ - if(history[i].isMe) return false; - if(history[i].isRound) return true; - } - return false; - }, - content:function(){ - player.insertPhase(); - }, - }, - }, - }, - //刘虞 - dcsuifu:{ - audio:2, - trigger:{global:'phaseJieshuBegin'}, - filter:function(event,player){ - if(player==event.player||!event.player.countCards('h')) return false; - var num=0; - game.countPlayer(function(current){ - if(current==player||current.getSeatNum()==1){ - current.getHistory('damage',function(evt){ - num+=evt.num; - }); - } - }); - return num>=2; - }, - logTarget:'player', - check:function(event,player){ - return get.attitude(player,event.player)<=0; - }, - content:function(){ - 'step 0' - var target=trigger.player,cards=target.getCards('h'); - target.lose(cards,ui.cardPile,'insert'); - target.$throw(cards.length); - game.updateRoundNumber(); - game.log(player,'将',target,'的',get.cnNumber(cards.length),'张手牌置于牌堆顶'); - 'step 1' - game.delayx(); - player.chooseUseTarget({name:'wugu',isCard:true},true); - }, - }, - dcpijing:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget([1,game.countPlayer()],get.prompt('dcpijing'),'令任意名角色获得技能〖自牧〗').set('ai',function(target){ - return get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var targets=result.targets; - targets.add(player); - targets.sortBySeat(); - player.logSkill('dcpijing',targets); - game.countPlayer(function(current){ - if(!targets.contains(current)) current.removeSkill('dczimu'); - else current.addSkill('dczimu'); - }); - game.delayx(); - } - }, - derivation:'dczimu', - }, - dczimu:{ - audio:2, - trigger:{player:'damageEnd'}, - forced:true, - mark:true, - logTarget:function(event,player){ - return game.filterPlayer(function(current){ - return current.hasSkill('dczimu',null,null,false); - }).sortBySeat(); - }, - content:function(){ - 'step 0' - var list=game.filterPlayer(function(current){ - return current.hasSkill('dczimu',null,null,false); - }); - if(list.length>0){ - if(list.length==1) list[0].draw(); - else{ - game.asyncDraw(list); - event.delay=true; - } - } - 'step 1' - player.removeSkill('dczimu'); - if(event.delay) game.delayx(); - }, - marktext:'牧', - intro:{content:'锁定技。当你受到伤害后,你令所有拥有〖自牧〗的角色各摸一张牌,然后你失去〖自牧〗。'}, - }, //秦宜禄 piaoping:{ audio:2, @@ -13960,369 +2371,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{combo:'piaoping'}, subSkill:{blocker:{charlotte:true}}, }, - //张嫙 - tongli:{ - audio:2, - trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ - if(!event.isFirstTarget||(event.card.storage&&event.card.storage.tongli)) return false; - var type=get.type(event.card); - if(type!='basic'&&type!='trick') return false; - var hs=player.getCards('h'); - if(!hs.length) return false; - var evt=event.getParent('phaseUse'); - if(!evt||evt.player!=player) return false; - var num1=player.getHistory('useCard',function(evtx){ - if(evtx.getParent('phaseUse')!=evt) return false; - return !evtx.card.storage||!evtx.card.storage.tongli; - }).length; - if(hs.length0) event.redo(); - }, - }, - },*/ - }, - shezang:{ - audio:2, - round:1, - trigger:{global:'dying'}, - frequent:true, - filter:function(event,player){ - return event.player==player||player==_status.currentPhase; - }, - content:function(){ - var cards=[]; - for(var i of lib.suit){ - var card=get.cardPile2(function(card){ - return get.suit(card,false)==i; - }); - if(card) cards.push(card); - } - if(cards.length) player.gain(cards,'gain2'); - }, - }, - //羊祜 - dcdeshao:{ - audio:2, - usable:2, - trigger:{target:'useCardToTargeted'}, - filter:function(event,player){ - return player!=event.player&&get.color(event.card)=='black'; - }, - logTarget:'player', - check:function(event,player){ - var eff=get.effect(player,{name:'wuzhong'},player,player)/2; - if(player.countCards('h')+1<=event.player.countCards('h')&&event.player.countCards('he')>0) eff+=get.effect(event.player,{name:'guohe_copy2'},player,player); - return eff; - }, - content:function(){ - 'step 0' - player.draw(); - 'step 1' - var target=trigger.player; - if(player.countCards('h')<=target.countCards('h')&&target.countCards('he')>0){ - player.discardPlayerCard(target,true,'he'); - player.addExpose(0.2); - } - }, - }, - dcmingfa:{ - audio:2, - trigger:{player:'useCardAfter'}, - direct:true, - filter:function(event,player){ - return player.isPhaseUsing()&&(event.card.name=='sha'||get.type(event.card)=='trick')&&event.cards.filterInD().length>0&&!player.getExpansions('dcmingfa').length; - }, - content:function(){ - 'step 0' - var str,cards=trigger.cards.filterInD(),card=trigger.card; - if(cards.length==1&&card.name==cards[0].name&&(card.nature||false)==(cards[0].nature||false)) str=get.translation(cards[0]); - else str=(get.translation(trigger.card)+'('+get.translation(cards)+')'); - var cardx={ - name:trigger.card.name, - nature:trigger.card.nature, - isCard:true, - }; - player.chooseTarget(lib.filter.notMe,get.prompt('dcmingfa'),'将'+str+'作为“明伐”牌置于武将牌上,并选择一名其他角色。该角色下回合结束时对其执行〖明伐〗的后续效果。').set('card',cardx).set('goon',function(){ - var getMax=function(card){ - return Math.max.apply(Math,game.filterPlayer(function(current){ - return current!=player&&lib.filter.targetEnabled2(card,player,current); - }).map(function(i){ - return get.effect(i,card,player,player)*Math.sqrt(Math.min(i.getHandcardLimit(),1+i.countCards('h'))); - }).concat([0])); - } - var eff1=getMax(cardx); - if(player.hasCard(function(card){ - if((card.name!='sha'&&get.type(card)!='trick')||!player.hasValueTarget(card,null,true)) return false; - return getMax({ - name:get.name(card), - nature:get.nature(card), - isCard:true, - })>=eff1; - },'hs')) return false; - return true; - }()).set('ai',function(target){ - if(!_status.event.goon) return 0; - var player=_status.event.player,card=_status.event.card; - if(!lib.filter.targetEnabled2(card,player,target)) return 0; - return get.effect(target,card,player,player)*Math.sqrt(Math.min(target.getHandcardLimit(),1+target.countCards('h'))); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('dcmingfa',target); - var card={ - name:trigger.card.name, - nature:trigger.card.nature, - isCard:true, - }; - player.storage.dcmingfa_info=[card,target]; - player.addToExpansion(trigger.cards.filterInD(),'gain2').gaintag.add('dcmingfa'); - } - }, - group:'dcmingfa_use', - ai:{expose:0.2}, - intro:{ - mark:function(dialog,storage,player){ - var cards=player.getExpansions('dcmingfa'); - if(!cards.length) return '没有“明伐”牌'; - else dialog.add(cards); - var info=player.storage.dcmingfa_info; - if(info){ - dialog.addText('记录牌:'+get.translation(info[0])+'
    记录目标:'+get.translation(info[1])); - } - }, - content:'expansion', - }, - onremove:function(player,skill){ - var cards=player.getExpansions(skill); - if(cards.length) player.loseToDiscardpile(cards); - delete player.storage.dcmingfa_info; - }, - subSkill:{ - use:{ - audio:'dcmingfa', - trigger:{global:['phaseEnd','die']}, - forced:true, - filter:function(event,player){ - if(!player.storage.dcmingfa_info||!player.getExpansions('dcmingfa').length) return false; - return event.player==player.storage.dcmingfa_info[1]; - }, - content:function(){ - 'step 0' - var target=trigger.player; - event.target=target; - var card=player.storage.dcmingfa_info[0]; - delete player.storage.dcmingfa_info; - event.card=card; - event.count=Math.max(1,Math.min(5,target.countCards('h'))); - if(!event.player.isIn()) event.goto(2); - 'step 1' - event.count--; - if(target.isIn()&&lib.filter.targetEnabled2(card,player,target)){ - player.useCard(get.copy(card),target); - if(event.count>0) event.redo(); - } - 'step 2' - var cards=player.getExpansions('dcmingfa'); - if(cards.length>0) player.loseToDiscardpile(cards); - }, - }, - }, - }, - //黄祖 - dcjinggong:{ - audio:2, - enable:'chooseToUse', - locked:false, - mod:{ - targetInRange:function(card){ - if(card.storage&&card.storage.dcjinggong) return true; - }, - }, - viewAsFilter:function(player){ - return player.hasCard(function(card){ - return get.type(card)=='equip'; - },'ehs'); - }, - position:'hes', - filterCard:{type:'equip'}, - viewAs:{ - name:'sha', - storage:{dcjinggong:true}, - }, - check:function(card){ - return 6-get.value(card); - }, - ai:{ - respondSha:true, - skillTagFilter:function(player){ - return player.hasCard(function(card){ - return get.type(card)=='equip'; - },'ehs'); - }, - }, - group:'dcjinggong_base', - subSkill:{ - base:{ - trigger:{player:'useCard1'}, - forced:true, - popup:false, - firstDo:true, - filter:function(event,player){ - return event.skill=='dcjinggong'&&event.targets.length>0; - }, - content:function(){ - trigger.baseDamage=Math.min(5,get.distance(player,trigger.targets[0])); - }, - }, - }, - }, - dcxiaojuan:{ - audio:2, - trigger:{player:'useCardToPlayered'}, - logTarget:'target', - filter:function(event,player){ - return event.targets.length==1&&player!=event.target&&event.target.countCards('h')>1; - }, - check:function(event,player){ - var target=event.target; - if(get.attitude(player,target)>=0) return false; - if(get.color(event.card)=='none') return true; - return Math.floor(target.countCards('h')/2)>=Math.floor(player.countCards('h')/2); - }, - content:function(){ - 'step 0' - var target=trigger.target; - event.target=target; - var num=Math.floor(target.countCards('h')/2); - if(num>0) player.discardPlayerCard(target,'h',num,true); - else event.finish(); - 'step 1' - var suit=get.suit(trigger.card); - if(result.bool&&lib.suit.contains(suit)&&player.countCards('h')>1){ - var bool=false; - for(var i of result.cards){ - if(get.suit(i,target)==suit){ - bool=true; - break; - } - } - if(!bool) event.finish(); - } - else event.finish(); - 'step 2' - if(player.countCards('h')>0) player.chooseToDiscard('h',1,true); - }, - }, - //蔡瑁张允 - lianzhou:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - if(!player.isLinked()) return true; - return game.hasPlayer(function(current){ - return current!=player&¤t.hp==player.hp&&!current.isLinked(); - }); - }, - content:function(){ - 'step 0' - if(!player.isLinked()) player.link(); - 'step 1' - var num=game.countPlayer(function(current){ - return current!=player&¤t.hp==player.hp&&!current.isLinked(); - }); - if(num>0){ - player.chooseTarget([1,num],'选择横置任意名体力值等于你的角色',function(card,player,current){ - return current!=player&¤t.hp==player.hp&&!current.isLinked(); - }).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,{name:'tiesuo'},player,player); - }); - } - else event.finish(); - 'step 2' - if(result.bool){ - var targets=result.targets.sortBySeat(); - player.line(targets,'green'); - for(var i of targets) i.link(); - } - }, - ai:{halfneg:true}, - }, - jinglan:{ - audio:2, - trigger:{source:'damageSource'}, - forced:true, - content:function(){ - var delta=player.countCards('h')-player.hp; - if(delta>0) player.chooseToDiscard('h',4,true); - else if(delta==0){ - player.chooseToDiscard('h',true); - player.recover(); - } - else{ - player.damage('fire','nosource'); - player.draw(5); - } - }, - ai:{halfneg:true}, - }, //闫柔 choutao:{ audio:2, @@ -14419,1398 +2467,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, - //张瑶 - //Partly powered by 烟雨墨染 - yuanyu:{ - audio:2, - enable:'phaseUse', - usable:1, - content:function(){ - 'step 0' - player.draw(); - 'step 1' - if(player.countCards('h')>0){ - var suits=lib.suit.slice(0),cards=player.getExpansions('yuanyu'); - for(var i of cards) suits.remove(get.suit(i,false)); - var str='选择一张手牌,作为“怨”置于武将牌上;同时选择一名其他角色,令该角色获得〖怨语〗的后续效果。' - if(suits.length){ - str+='目前“怨”中未包含的花色:'; - for(var i of suits) str+=get.translation(i); - } - player.chooseCardTarget({ - filterCard:true, - filterTarget:lib.filter.notMe, - position:'h', - prompt:'怨语:选择置于武将牌上的牌和目标', - prompt2:str, - suits:suits, - forced:true, - ai1:function(card){ - var val=get.value(card),evt=_status.event; - if(evt.suits.contains(get.suit(card,false))) return 8-get.value(card); - return 5-get.value(card); - }, - ai2:function(target){ - var player=_status.event.player; - if(player.storage.yuanyu_damage&&player.storage.yuanyu_damage.contains(target)) return 0; - return -get.attitude(player,target); - }, - }); - } - else event.finish(); - 'step 2' - var target=result.targets[0]; - player.addSkill('yuanyu_damage'); - player.markAuto('yuanyu_damage',result.targets); - player.line(target,'green'); - if(!target.storage.yuanyu_mark){ - target.storage.yuanyu_mark=player; - target.markSkillCharacter('yuanyu_mark',player,'怨语','已获得〖怨语〗效果'); - target.addSkill('yuanyu_mark'); - } - player.addToExpansion(result.cards,player,'give').gaintag.add('yuanyu'); - }, - intro:{ - content:'expansion', - markcount:'expansion', - }, - onremove:function(player,skill){ - var cards=player.getExpansions(skill); - if(cards.length) player.loseToDiscardpile(cards); - player.removeSkill('yuanyu_damage'); - }, - ai:{ - order:7, - result:{ - player:1, - }, - }, - subSkill:{ - mark:{ - mark:'character', - charlotte:true, - intro:{ - content:'已获得〖怨语〗效果', - onunmark:true, - }, - }, - damage:{ - trigger:{global:['damageSource','phaseDiscardBegin']}, - forced:true, - charlotte:true, - onremove:function(player,skill){ - if(player.storage[skill]){ - for(var i of player.storage[skill]){ - if(i.storage.yuanyu_mark==player) i.unmarkSkill('yuanyu_mark'); - } - } - delete player.storage[skill]; - }, - filter:function(event,player){ - if(event.name=='damage'){ - var source=event.source; - return source&&player.getStorage('yuanyu_damage').contains(source)&&source.countCards('h')>0; - } - else{ - if(player==event.player){ - return player.getStorage('yuanyu_damage').some(function(target){ - return target.isIn()&&target.countCards('h')>0; - }); - } - else if(player.getStorage('yuanyu_damage').contains(event.player)){ - return event.player.countCards('h')>0; - } - return false; - } - }, - content:function(){ - 'step 0' - if(trigger.name=='phaseDiscard'){ - if(trigger.player==player){ - event.targets=player.getStorage('yuanyu_damage').filter(function(target){ - return target.isIn()&&target.countCards('h')>0; - }).sortBySeat(); - } - else event.targets=[trigger.player]; - } - else event.targets=[trigger.source]; - 'step 1' - event.target=event.targets.shift(); - event.count=trigger.name=='damage'?trigger.num:1; - 'step 2' - event.count--; - var suits=lib.suit.slice(0),cards=player.getExpansions('yuanyu'); - for(var i of cards) suits.remove(get.suit(i,false)); - var next=target.chooseCard('h',true,'将一张手牌置于'+get.translation(player)+'的武将牌上'); - next.set('suits',suits); - next.set('ai',function(card){ - var val=get.value(card),evt=_status.event; - if(evt.suits.contains(get.suit(card,false))) return 5-get.value(card); - return 8-get.value(card); - }); - if(suits.length){ - var str='目前未包含的花色:'; - for(var i of suits) str+=get.translation(i); - next.set('prompt2',str); - } - 'step 3' - player.addToExpansion(result.cards,target,'give').gaintag.add('yuanyu'); - 'step 4' - if(!player.hasSkill('yuanyu_damage')) event.finish(); - else if(event.count>0&&target.countCards('h')>0) event.goto(2); - else if(event.targets.length>0) event.goto(1); - }, - }, - }, - }, - xiyan:{ - audio:2, - trigger:{player:'addToExpansionAfter'}, - filter:function(event,player){ - if(!event.gaintag.contains('yuanyu')) return false; - var cards=player.getExpansions('yuanyu'); - if(cards.length_status.currentPhase, - prompt2:'获得所有“怨”', - check:()=>true, - content:function(){ - 'step 0' - player.removeSkill('yuanyu_damage'); - var cards=player.getExpansions('yuanyu'); - player.gain(cards,'gain2'); - 'step 1' - var target=_status.currentPhase; - if(player==target){ - player.addMark('xiyan_buff',4,false); - player.addTempSkill('xiyan_buff'); - delete player.getStat('skill').yuanyu; - event.finish(); - } - else{ - player.chooseBool('夕颜:是否令'+get.translation(target)+'本回合的手牌上限-4且不能使用基本牌?').set('ai',function(){ - return _status.event.bool; - }).set('bool',get.attitude(player,target)<0); - } - 'step 2' - if(result.bool){ - var target=_status.currentPhase; - target.addMark('xiyan_debuff',4,false); - target.addTempSkill('xiyan_debuff'); - } - }, - subSkill:{ - buff:{ - charlotte:true, - mark:true, - marktext:" +4 ", - intro:{ - content:"本回合手牌上限+4且使用牌无次数限制", - }, - mod:{ - maxHandcard:function(player,num){ - return num+player.countMark('xiyan_buff'); - }, - cardUsable:function(card,player){ - return Infinity; - }, - }, - sub:true, - }, - debuff:{ - charlotte:true, - mark:true, - marktext:" -4 ", - intro:{ - content:"本回合手牌上限-#且不能使用基本牌", - }, - mod:{ - maxHandcard:function(player,num){ - return num-player.countMark('xiyan_debuff'); - }, - cardEnabled:function(card){ - if(get.type(card)=='basic') return false; - }, - cardSavable:function(card){ - if(get.type(card)=='basic') return false; - }, - }, - sub:true, - }, - }, - }, - //滕公主 - xingchong:{ - audio:2, - trigger:{global:'roundStart'}, - direct:true, - filter:function(event,player){ - return player.maxHp>0; - }, - content:function(){ - 'step 0' - var list=[]; - for(var i=0;i<=Math.min(5,player.maxHp);i++){ - list.push(get.cnNumber(i)+'张'); - } - list.push('cancel2'); - player.chooseControl(list).set('prompt',get.prompt('xingchong')).set('prompt2','请首先选择摸牌的张数').set('ai',function(){ - var player=_status.event.player,num1=player.maxHp,num2=player.countCards('h'); - if(num1<=num2) return 0; - return Math.ceil((num1-num2)/2); - }); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('xingchong'); - var num2=result.index; - if(num2>0) player.draw(num2); - var num=Math.min(5,player.maxHp)-num2; - if(num==0) event.finish(); - else event.num=num; - } - else event.finish(); - 'step 2' - if(player.countCards('h')>0){ - player.chooseCard('h',[1,Math.min(player.countCards('h'),event.num)],'请选择要展示的牌').set('ai',()=>1+Math.random()); - } - else event.finish(); - 'step 3' - if(result.bool){ - var cards=result.cards; - player.showCards(cards,get.translation(player)+'发动了【幸宠】'); - player.addGaintag(cards,'xingchong'); - player.addTempSkill('xingchong_effect','roundStart'); - } - }, - subSkill:{ - effect:{ - audio:'xingchong', - trigger:{ - player:['loseAfter'], - global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], - }, - filter:function(event,player){ - var evt=event.getl(player); - if(!evt||!evt.cards2||!evt.cards2.length) return false; - if(event.name=='lose'){ - for(var i in event.gaintag_map){ - if(event.gaintag_map[i].contains('xingchong')) return true; - } - return false; - } - return player.hasHistory('lose',function(evt){ - if(event!=evt.getParent()) return false; - for(var i in evt.gaintag_map){ - if(evt.gaintag_map[i].contains('xingchong')) return true; - } - return false; - }); - }, - forced:true, - popup:false, - charlotte:true, - onremove:function(player){ - player.removeGaintag('xingchong'); - }, - content:function(){ - 'step 0' - if(trigger.delay===false) game.delayx(); - 'step 1' - player.logSkill('xingchong_effect'); - var num=0; - if(trigger.name=='lose'){ - for(var i in trigger.gaintag_map){ - if(trigger.gaintag_map[i].contains('xingchong')) num++; - } - } - else player.getHistory('lose',function(evt){ - if(trigger!=evt.getParent()) return false; - for(var i in evt.gaintag_map){ - if(evt.gaintag_map[i].contains('xingchong')) num++; - } - }); - player.draw(2*num); - }, - }, - }, - }, - liunian:{ - audio:2, - trigger:{global:'washCard'}, - forced:true, - filter:function(event,player){ - return game.shuffleNumber<=2; - }, - content:function(){ - if(game.shuffleNumber==1) player.addTempSkill('liunian_shuffle1'); - else player.addTempSkill('liunian_shuffle2'); - game.delayx(); - }, - subSkill:{ - shuffle1:{ - charlotte:true, - forced:true, - trigger:{global:'phaseEnd'}, - content:function(){ - player.gainMaxHp(); - game.delayx(); - }, - }, - shuffle2:{ - charlotte:true, - forced:true, - trigger:{global:'phaseEnd'}, - content:function(){ - 'step 0' - player.recover(); - game.delayx(); - 'step 1' - player.addSkill('liunian_effect'); - player.addMark('liunian_effect',10,false); - }, - }, - effect:{ - charlotte:true, - mod:{ - maxHandcard:function(player,num){ - return num+player.countMark('liunian_effect'); - }, - }, - marktext:'年', - intro:{ - content:'手牌上限+#', - }, - }, - }, - }, - //黄承彦 - dcjiezhen:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player; - }, - content:function(){ - var skills=target.getSkills(null,false,false).filter(function(i){ - if(i=='bazhen') return; - var info=get.info(i); - return info&&!get.is.locked(i)&&!info.limited&&!info.juexingji&&!info.zhuSkill&&!info.charlotte; - }); - target.addAdditionalSkill('dcjiezhen_blocker','bazhen'); - target.addSkill('dcjiezhen_blocker'); - target.markAuto('dcjiezhen_blocker',skills); - player.addSkill('dcjiezhen_clear'); - player.markAuto('dcjiezhen_clear',[target]); - }, - ai:{ - order:1, - result:{ - target:function(player,target){ - var skills=target.getSkills(null,false,false).filter(function(i){ - if(i=='bazhen') return; - var info=get.info(i); - return info&&!get.is.locked(i)&&!info.limited&&!info.juexingji&&!info.zhuSkill&&!info.charlotte; - }); - if(!skills.length&&target.isEmpty(2)) return 1; - return -0.5*skills.length; - }, - }, - }, - subSkill:{ - blocker:{ - charlotte:true, - init:function(player,skill){ - player.addSkillBlocker(skill); - }, - onremove:function(player,skill){ - player.removeSkillBlocker(skill); - player.removeAdditionalSkill(skill); - delete player.storage.dcjiezhen_blocker; - }, - charlotte:true, - locked:true, - skillBlocker:function(skill,player){ - return skill!='bazhen'&&skill!='dcjiezhen_blocker'&&!lib.skill[skill].charlotte&&player.getStorage('dcjiezhen_blocker').contains(skill); - }, - mark:true, - marktext:'阵', - intro:{ - content:function(storage,player,skill){ - if(storage.length) return '失效技能:'+get.translation(storage); - return '无失效技能'; - } - } - }, - clear:{ - audio:'dcjiezhen', - charlotte:true, - trigger:{ - global:['judgeAfter','die'], - player:'phaseBegin', - }, - forced:true, - forceDie:true, - onremove:true, - filter:function(event,player){ - if(event.name=='die'){ - return player==event.player||player.getStorage('dcjiezhen_clear').contains(event.player); - } - else if(event.name=='judge'){ - return event.skill=='bagua'&&player.getStorage('dcjiezhen_clear').contains(event.player); - } - return player.getStorage('dcjiezhen_clear').length>0; - }, - logTarget:function(event,player){ - if(event.name!='phase') return event.player; - return player.getStorage('dcjiezhen_clear'); - }, - content:function(){ - 'step 0' - var targets=player.getStorage('dcjiezhen_clear'); - if(trigger.name=='die'&&player==trigger.player){ - for(var target of targets){ - target.removeSkill('dcjiezhen_blocker'); - } - player.removeSkill('dcjiezhen_clear'); - event.finish(); - return; - } - if(trigger.name=='phase') event.targets=targets.slice(0).sortBySeat(); - else event.targets=[trigger.player]; - 'step 1' - var target=targets.shift(); - var storage=player.getStorage('dcjiezhen_clear'); - if(storage.contains(target)){ - storage.remove(target); - target.removeSkill('dcjiezhen_blocker'); - if(target.isAlive()&&target.countGainableCards(player,'hej')>0) player.gainPlayerCard(target,'hej',true); - } - if(targets.length>0){ - event.redo(); - } - else{ - player.removeSkill('dcjiezhen_clear'); - } - }, - }, - }, - derivation:'bazhen', - }, - dczecai:{ - audio:2, - trigger:{global:'roundStart'}, - limited:true, - skillAnimation:true, - direct:true, - animationColor:'soil', - filter:function(event,player){ - return game.roundNumber>1; - }, - getMax:function(){ - var getNum=function(current){ - var history=current.actionHistory; - var num=0; - for(var i=history.length-2;i>=0;i--){ - for(var j=0;jmax){ - max=num; - current=target; - } - else if(num==max) current=false; - } - return current; - }, - content:function(){ - 'step 0' - event.target=lib.skill.dczecai.getMax(); - var str='令一名其他角色于本轮内获得〖集智〗'; - if(event.target&&event.target!=player) str+=(';若选择的目标为'+get.translation(event.target)+',则其获得一个额外的回合'); - player.chooseTarget(lib.filter.notMe,get.prompt('dczecai'),str).set('maximum',event.target).set('ai',function(card,player,target){ - if(target!=_status.event.maximum) return 0; - return get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - player.awakenSkill('dczecai'); - var target=result.targets[0]; - player.logSkill('dczecai',target); - target.addAdditionalSkill('dczecai_effect','rejizhi'); - target.addTempSkill('dczecai_effect','roundStart'); - if(target==event.target){ - var evt=trigger._trigger; - target.insertPhase(); - if(evt.player!=target&&!evt._finished){ - evt.finish(); - evt._triggered=5; - evt.player.insertPhase(); - } - } - } - }, - derivation:'rejizhi', - subSkill:{ - effect:{ - charlotte:true, - mark:true, - marktext:'才', - intro:{content:'已拥有技能〖集智〗'}, - }, - }, - }, - dcyinshi:{ - audio:2, - trigger:{player:'damageBegin'}, - usable:1, - filter:function(event,player){ - return !event.card||get.color(event.card)=='none'; - }, - forced:true, - content:function(){ - trigger.cancel(); - }, - group:'dcyinshi_gain', - subSkill:{ - gain:{ - audio:'dcyinshi', - trigger:{global:'judgeEnd'}, - forced:true, - filter:function(event,player){ - return event.skill=='bagua'&&event.result.card&&get.position(event.result.card,true)=='o'; - }, - content:function(){ - player.gain(trigger.result.card,'gain2'); - }, - }, - }, - }, - //来莺儿 - xiaowu:{ - audio:2, - enable:'phaseUse', - usable:1, - selectTarget:function(){ - return [1,game.countPlayer()-1]; - }, - complexSelect:true, - complexTarget:true, - filterTarget:function(card,player,target){ - if(player==target) return false; - var next=player.getNext(),prev=player.getPrevious(); - var selected=ui.selected.targets; - if(!selected.contains(next)&&!selected.contains(prev)) return (target==next||target==prev); - for(var i of selected){ - if(i.getNext()==target||i.getPrevious()==target) return true; - } - return false; - }, - contentBefore:function(){ - event.getParent()._xiaowu_targets=[]; - }, - content:function(){ - 'step 0' - if(!target.isIn()){ - event.finish(); - return; - } - target.chooseControl().set('choiceList',[ - '令'+get.translation(player)+'摸一张牌', - '令自己摸一张牌', - ]).set('ai',function(){ - var player=_status.event.player,target=_status.event.getParent().player; - var all=_status.event.getParent().targets.length,dam=_status.event.getParent(2)._xiaowu_targets.length; - if(get.attitude(player,target)>0||dam>=Math.floor(all/2)) return 0; - return 1; - }); - 'step 1' - if(result.index==0){ - player.draw(); - } - else{ - target.draw(); - event.getParent()._xiaowu_targets.push(target); - } - }, - contentAfter:function(){ - var targetsx=event.getParent()._xiaowu_targets; - var num=(targets.length-targetsx.length-targetsx.length); - if(num>0) player.addMark('shawu',1); - else if(num<0){ - player.line(targetsx,'fire'); - for(var i of targetsx) i.damage(); - } - }, - ai:{ - order:8, - result:{player:1}, - }, - }, - huaping:{ - audio:'huaping', - trigger:{global:'die'}, - limited:true, - skillAnimation:true, - animationColor:'fire', - filter:function(event,player){ - return player!=event.player; - }, - logTarget:'player', - check:function(event,player){ - return get.rank(event.player.name,true)>=5; - }, - content:function(){ - player.awakenSkill('huaping'); - var skills=trigger.player.getSkills(null,false,false).filter(function(i){ - var info=get.info(i); - return info&&!info.charlotte; - }); - if(skills.length){ - for(var i of skills) player.addSkillLog(i); - } - player.removeSkill('xiaowu'); - var num=player.countMark('shawu'); - if(num>0){ - player.removeMark('shawu',num); - player.draw(num); - } - }, - group:'huaping_give', - subSkill:{ - give:{ - audio:'huaping', - trigger:{player:'die'}, - direct:true, - filter:function(event,player){ - return event.player==player; - }, - forceDie:true, - skillAnimation:true, - animationColor:'gray', - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('huaping'),'令一名其他角色获得〖沙舞〗',lib.filter.notMe).set('forceDie',true).set('ai',function(target){ - return get.attitude(_status.event.player,target)+100; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.awakenSkill('huaping'); - player.logSkill('huaping_give',target); - target.addSkill('shawu'); - var num=player.countMark('shawu'); - if(num>0){ - player.removeMark('shawu',num); - target.addMark('shawu',num); - } - } - }, - }, - }, - derivation:'shawu', - }, - shawu:{ - audio:2, - trigger:{player:'useCardToTargeted'}, - shaRelated:true, - direct:true, - filter:function(event,player){ - return event.card.name=='sha'&&event.player.isIn()&&(player.hasMark('shawu')||player.countCards('h',function(card){ - return lib.filter.cardDiscardable(card,player,'shawu'); - })>1); - }, - content:function(){ - 'step 0' - var list=[]; - if(player.countCards('h',function(card){ - return lib.filter.cardDiscardable(card,player,'shawu'); - })>1) list.push('弃置手牌'); - if(player.hasMark('shawu')) list.push('移除标记'); - list.push('cancel2'); - player.chooseControl(list).set('prompt',get.prompt('shawu',trigger.target)).set('prompt2','弃置两张手牌,或移去一枚“沙”并摸两张牌,然后对该角色造成1点伤害').set('ai',function(){ - var player=_status.event.player,target=_status.event.getTrigger().target; - if(get.damageEffect(target,player,player)<=0) return 'cancel2'; - if(player.hasMark('shawu')) return '移除标记'; - if(player.countCards('h',function(card){ - return lib.filter.cardDiscardable(card,player,'shawu')&&get.value(card)<=6.5; - })>1) return '弃置手牌'; - return 'cancel2'; - }); - 'step 1' - var target=trigger.target; - if(result.control=='cancel2'){ - event.finish(); - return; - } - else if(result.control=='移除标记'){ - player.logSkill('shawu',target); - player.removeMark('shawu',1); - player.draw(2); - target.damage(); - event.finish(); - } - else{ - player.chooseToDiscard('h',true,2).logSkill=['shawu',target]; - } - 'step 2' - trigger.target.damage(); - }, - intro:{ - content:'mark', - }, - }, - //曹髦 - qianlong:{ - audio:2, - trigger:{player:'damageEnd'}, - frequent:true, - content:function(){ - 'step 0' - var cards=get.cards(3); - event.cards=cards; - game.cardsGotoOrdering(cards); - //展示牌 - game.log(player,'展示了',event.cards); - event.videoId=lib.status.videoId++; - game.broadcastAll(function(player,id,cards){ - if(player==game.me||player.isUnderControl()) return; - var str=get.translation(player)+'发动了【潜龙】'; - var dialog=ui.create.dialog(str,cards); - dialog.videoId=id; - },player,event.videoId,event.cards); - game.addVideo('showCards',player,[get.translation(player)+'发动了【潜龙】',get.cardsInfo(event.cards)]); - if(player!=game.me&&!player.isUnderControl()&&!player.isOnline()) game.delay(2); - //选牌 - var next=player.chooseToMove('潜龙:获得至多'+get.cnNumber(Math.min(3,player.getDamagedHp()))+'张牌并将其余牌置于牌堆底'); - next.set('list',[ - ['置于牌堆底',cards], - ['自己获得'], - ]) - next.set('filterMove',function(from,to,moved){ - if(moved[0].contains(from.link)){ - if(typeof to=='number'){ - if(to==1){ - if(moved[1].length>=_status.event.player.getDamagedHp()) return false; - } - return true; - } - } - return true; - }); - next.set('processAI',function(list){ - var cards=list[0][1].slice(0).sort(function(a,b){ - if(b.name=='sha') return 1; - return get.value(b)-get.value(a); - }); - return [cards,cards.splice(0,_status.event.player.getDamagedHp())]; - }); - 'step 1' - game.broadcastAll('closeDialog',event.videoId); - game.addVideo('cardDialog',null,event.videoId); - var moved=result.moved; - if(moved[0].length>0){ - for(var i of moved[0]){ - i.fix(); - ui.cardPile.appendChild(i); - } - } - if(moved[1].length>0) player.gain(moved[1],'gain2'); - }, - ai:{ - maixie:true, - maixie_hp:true, - effect:{ - target:function(card,player,target){ - if(get.tag(card,'damage')){ - if(player.hasSkillTag('jueqing',false,target)) return; - if(!target.hasFriend()) return; - var num=1; - if(!player.needsToDiscard()&&target.isDamaged()){ - 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]; - } - } - } - } - }, - fensi:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - content:function(){ - 'step 0' - if(!game.hasPlayer(function(current){ - return current!=player&¤t.hp>=player.hp; - })){ - player.damage(); - event.finish(); - return; - } - else{ - player.chooseTarget(true,'忿肆:对一名体力值不小于你的角色造成1点伤害',function(card,player,target){ - return target.hp>=player.hp; - }).set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player); - }); - } - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.line(target,'green'); - target.damage(); - } - else event.finish(); - 'step 2' - if(target.isIn()&&target.canUse('sha',player,false)) target.useCard({name:'sha',isCard:true},player,false,'noai'); - }, - }, - juetao:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - limited:true, - skillAnimation:true, - animationColor:'thunder', - filter:function(event,player){ - return player.hp==1; - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('juetao'),lib.filter.notMe).set('ai',function(target){ - return -get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('juetao',target); - player.awakenSkill('juetao'); - } - else event.finish(); - 'step 2' - var card=get.bottomCards()[0]; - game.cardsGotoOrdering(card); - player.showCards(card); - player.chooseUseTarget(card,true,false,'nodistance').set('filterTarget',function(card,player,target){ - var evt=_status.event; - if(_status.event.name=='chooseTarget') evt=evt.getParent(); - if(target!=player&&target!=evt.juetao_target) return false; - return lib.filter.targetEnabledx(card,player,target); - }).set('juetao_target',target); - 'step 3' - if(result.bool&&target.isIn()) event.goto(2); - }, - }, - zhushi:{ - audio:2, - usable:1, - trigger:{global:'recoverEnd'}, - direct:true, - zhuSkill:true, - filter:function(event,player){ - return player!=event.player&&event.player.group=='wei'&&event.player==_status.currentPhase&& - event.player.isIn()&&player.hasZhuSkill('zhushi',event.player); - }, - content:function(){ - 'step 0' - var str=get.translation(player); - trigger.player.chooseBool('是否响应'+get.translation(player)+'的主公技【助势】?','令'+get.translation(player)+'摸一张牌').set('goon',get.attitude(trigger.player,player)>0).set('ai',()=>_status.event.goon); - 'step 1' - if(result.bool){ - player.logSkill('zhushi'); - trigger.player.line(player,'thunder'); - player.draw(); - } - else player.storage.counttrigger.zhushi--; - }, - }, - //高览 - xizhen:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current!=player&&(player.canUse('sha',current,false)||player.canUse('juedou',current,false)); - }) - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('xizhen'),'视为对一名角色使用【杀】或【决斗】',function(card,player,target){ - return target!=player&&(player.canUse('sha',target,false)||player.canUse('juedou',target,false)); - }).set('ai',function(target){ - var player=_status.event.player; - var eff1=0,eff2=0; - if(player.canUse('sha',target,false)) eff1=get.effect(target,{name:'sha'},player,player); - if(player.canUse('juedou',target,false)) eff2=get.effect(target,{name:'juedou'},player,player); - var effx=Math.max(eff1,eff2); - if(effx<=0) return 0; - if(target.isHealthy()) effx*=3; - if(get.attitude(player,target)>0) effx*=1.6; - return effx; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('xizhen',target); - var list=[]; - if(player.canUse('sha',target,false)) list.push('sha'); - if(player.canUse('juedou',target,false)) list.push('juedou'); - if(list.length==1) event._result={control:list[0]}; - else player.chooseControl(list).set('prompt','视为对'+get.translation(target)+'使用…').set('ai',function(){ - var player=_status.event.player,target=_status.event.getParent().target; - var eff1=get.effect(target,{name:'sha'},player,player),eff2=get.effect(target,{name:'juedou'},player,player); - return eff1>eff2?0:1; - }); - } - else event.finish(); - 'step 2' - player.useCard({name:result.control,isCard:true},target,false); - 'step 3' - if(target.isIn()){ - player.storage.xizhen_effect=target; - player.addTempSkill('xizhen_effect','phaseUseAfter'); - } - }, - subSkill:{ - effect:{ - audio:'xizhen', - charlotte:true, - onremove:true, - trigger:{global:['useCard','respond']}, - logTarget:function(event,player){ - return player.storage.xizhen_effect; - }, - forced:true, - filter:function(event,player){ - return Array.isArray(event.respondTo)&&event.respondTo[0]==player&&player.storage.xizhen_effect&&player.storage.xizhen_effect.isIn(); - }, - content:function(){ - 'step 0' - var target=player.storage.xizhen_effect; - event.target=target; - target.recover(); - 'step 1' - player.draw(target.isHealthy()?2:1); - }, - mark:'character', - intro:{content:'已指定$为目标'}, - }, - }, - }, - //管宁 - dunshi:{ - audio:2, - enable:['chooseToUse','chooseToRespond'], - usable:1, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=[['sha','shan','tao','jiu'],0]; - }, - hiddenCard:function(player,name){ - if(player.storage.dunshi&&player.storage.dunshi[0].contains(name)&&!player.getStat('skill').dunshi) return true; - return false; - }, - marktext:'席', - mark:true, - intro:{ - markcount:function(storage){ - return storage[1]; - }, - content:function(storage,player){ - if(!storage) return; - var str='
  • '; - if(!storage[0].length){ - str+='已无可用牌'; - } - else{ - str+='剩余可用牌:'; - str+=get.translation(storage[0]); - } - str+='
  • “席”标记数量:'; - str+=(storage[1]); - return str; - }, - }, - filter:function(event,player){ - if(event.type=='wuxie') return false; - var storage=player.storage.dunshi; - if(!storage||!storage[0].length) return false; - for(var i of storage[0]){ - var card={name:i,isCard:true}; - if(event.filterCard(card,player,event)) return true; - } - return false; - }, - chooseButton:{ - dialog:function(event,player){ - var list=[]; - var storage=player.storage.dunshi; - for(var i of storage[0]) list.push(['基本','',i]); - return ui.create.dialog('遁世',[list,'vcard'],'hidden'); - }, - filter:function(button,player){ - var evt=_status.event.getParent(); - return evt.filterCard({name:button.link[2],isCard:true},player,evt); - }, - check:function(button){ - var card={name:button.link[2]},player=_status.event.player; - if(_status.event.getParent().type!='phase') return 1; - if(card.name=='jiu') return 0; - if(card.name=='sha'&&player.hasSkill('jiu')) return 0; - return player.getUseValue(card,null,true); - }, - backup:function(links,player){ - return { - audio:'dunshi', - filterCard:function(){return false}, - popname:true, - viewAs:{ - name:links[0][2], - isCard:true, - }, - selectCard:-1, - precontent:function(){ - player.addTempSkill('dunshi_damage'); - player.storage.dunshi_damage=event.result.card.name; - }, - } - }, - prompt:function(links,player){ - return '选择【'+get.translation(links[0][2])+'】的目标'; - } - }, - ai:{ - respondSha:true, - respondShan:true, - skillTagFilter:function(player,tag,arg){ - var storage=player.storage.dunshi; - if(!storage||!storage[0].length) return false; - if(player.getStat('skill').dunshi) return false; - switch(tag){ - case 'respondSha':return (_status.event.type!='phase'||(player==game.me||player.isUnderControl()||player.isOnline()))&&storage[0].contains('sha'); - case 'respondShan':return storage[0].contains('shan'); - case 'save': - if(arg==player&&storage[0].contains('jiu')) return true; - return storage[0].contains('tao'); - } - }, - order:2, - result:{ - player:function(player){ - if(_status.event.type=='dying'){ - return get.attitude(player,_status.event.dying); - } - return 1; - }, - }, - }, - initList:function(){ - var list,skills=[]; - var banned=['xunyi']; - if(get.mode()=='guozhan'){ - list=[]; - for(var i in lib.characterPack.mode_guozhan) list.push(i); - } - else if(_status.connectMode) list=get.charactersOL(); - else{ - list=[]; - for(var i in lib.character){ - if(lib.filter.characterDisabled2(i)||lib.filter.characterDisabled(i)) continue; - list.push(i); - } - } - for(var i of list){ - if(i.indexOf('gz_jun')==0) continue; - for(var j of lib.character[i][3]){ - var skill=lib.skill[j]; - if(!skill||skill.zhuSkill||banned.contains(j)) continue; - if(skill.ai&&(skill.ai.combo||skill.ai.notemp||skill.ai.neg)) continue; - var info=get.translation(j); - for(var ix=0;ix0) return 3; - return 0; - case 1: - return 1; - case 2: - var num=player.storage.dunshi[1]; - for(var i of ui.selected.buttons){ - if(i.link==1) num++; - } - if(num>0&&player.isDamaged()) return 2; - return 0; - } - }); - 'step 1' - if(player.isOnline2()){ - player.send('closeDialog',event.videoId); - } - event.dialog.close(); - event.links=result.links.sort(); - for(var i of event.links){ - game.log(player,'选择了','#g【遁世】','的','#y选项'+get.cnNumber(i+1,true)); - } - if(event.links.contains(0)){ - trigger.cancel(); - if(!_status.dunshi_list) lib.skill.dunshi.initList(); - var list=_status.dunshi_list.filter(function(i){ - return !target.hasSkill(i,null,null,false); - }).randomGets(3); - if(list.length==0) event.goto(3); - else{ - event.videoId=lib.status.videoId++; - var func=function(skills,id,target){ - var dialog=ui.create.dialog('forcebutton'); - dialog.videoId=id; - dialog.add('令'+get.translation(target)+'获得一个技能'); - for(var i=0;i
    【'+get.translation(skills[i])+'】
    '+lib.translate[skills[i]+'_info']+'
    '); - } - dialog.addText('
    '); - } - if(player.isOnline()) player.send(func,list,event.videoId,target); - else if(player==game.me) func(list,event.videoId,target); - player.chooseControl(list).set('ai',function(){ - var controls=_status.event.controls; - if(controls.contains('cslilu')) return 'cslilu'; - return controls[0]; - }); - } - } - else event.goto(3); - 'step 2' - game.broadcastAll('closeDialog',event.videoId); - target.addSkillLog(result.control); - 'step 3' - var storage=player.storage.dunshi; - if(event.links.contains(1)){ - storage[0].remove(event.cardname); - storage[1]++; - player.markSkill('dunshi'); - } - if(event.links.contains(2)){ - player.loseMaxHp(); - if(storage[1]>0) player.draw(storage[1]); - } - }, - }, - }, - }, - //滕胤 - chenjian:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - prompt2:function(event,player){ - return '展示牌堆顶的'+get.cnNumber(3+player.countMark('chenjian'))+'张牌。然后你可依次执行以下两项中的任意项:⒈弃置一张牌,然后令一名角色获得与你弃置牌花色相同的牌。⒉使用其中剩余的一张牌。若你执行了所有选项,则你获得一枚“陈见”,然后重铸所有手牌。'; - }, - content:function(){ - 'step 0' - var cards=get.cards(3+player.countMark('chenjian')); - event.cards=cards; - game.cardsGotoOrdering(cards); - game.log(player,'展示了',event.cards); - event.videoId=lib.status.videoId++; - game.broadcastAll(function(player,id,cards){ - var str=get.translation(player)+'发动了【陈见】'; - var dialog=ui.create.dialog(str,cards); - dialog.videoId=id; - },player,event.videoId,event.cards); - game.addVideo('showCards',player,[get.translation(player)+'发动了【陈见】',get.cardsInfo(event.cards)]); - game.delay(2); - 'step 1' - if(!player.countCards('he')){ - game.broadcastAll('closeDialog',event.videoId); - game.addVideo('cardDialog',null,event.videoId); - event.goto(4); - } - else{ - player.chooseToDiscard('he').set('prompt',false).set('ai',function(card){ - var cards=_status.event.getParent().cards,val=-get.value(card),suit=get.suit(card); - for(var i of cards){ - if(get.suit(i,false)==suit) val+=get.value(i,'raw'); - } - return val; - }); - var func=function(id){ - var dialog=get.idDialog(id); - if(dialog) dialog.content.firstChild.innerHTML='是否弃置一张牌?'; - }; - if(player==game.me) func(event.videoId); - else if(player.isOnline()) player.send(func,event.videoId); - } - 'step 2' - game.broadcastAll('closeDialog',event.videoId); - game.addVideo('cardDialog',null,event.videoId); - if(result.bool){ - event.goon1=true; - var suit=get.suit(result.cards[0],player); - var cards2=event.cards.filter(function(i){ - return get.suit(i,false)==suit; - }); - if(cards2.length){ - event.cards2=cards2; - player.chooseTarget(true,'选择一名角色获得'+get.translation(cards2)).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(att>0){ - return att+Math.max(0,5-target.countCards('h')); - } - return att; - }); - } - else event.goto(4); - } - else event.goto(4); - 'step 3' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'green'); - target.gain(event.cards2,'gain2'); - event.cards.removeArray(event.cards2); - } - 'step 4' - var cards2=cards.filter(function(i){ - return player.hasUseTarget(i); - }); - if(cards2.length) player.chooseButton(['是否使用其中的一张牌?',cards2]).set('ai',function(button){ - return player.getUseValue(button.link); - }); - else event.finish(); - 'step 5' - if(result.bool){ - player.chooseUseTarget(true,result.links[0],false); - event.goon2=true; - } - 'step 6' - if(event.goon1&&event.goon2){ - if(player.countMark('chenjian')<2) player.addMark('chenjian',1,false); - var cards=player.getCards('h'); - player.loseToDiscardpile(cards); - player.draw(cards.length); - } - }, - marktext:'见', - intro:{content:'展示牌数量+#'}, - }, - xixiu:{ - mod:{ - canBeDiscarded:function(card,player,target){ - if(player!=target&&get.position(card)=='e'&&target.countCards('e')==1) return false; - }, - }, - audio:2, - trigger:{target:'useCardToTargeted'}, - forced:true, - filter:function(event,player){ - if(player==event.player||!player.countCards('e')) return false; - var suit=get.suit(event.card,false); - if(suit=='none') return false; - return player.hasCard(function(card){ - return get.suit(card,player)==suit; - },'e'); - }, - content:function(){ - player.draw(); - }, - ai:{ - effect:{ - target:function(card,player,target){ - if(typeof card=='object'&&player!=target){ - var suit=get.suit(card); - if(suit=='none') return; - if(player.hasCard(function(card){ - return get.suit(card,player)==suit; - },'e')) return [1,0.08]; - } - }, - }, - }, - }, //朱灵 dczhanyi:{ audio:2, @@ -16020,331 +2676,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, - //骆统 - renzheng:{ - audio:2, - trigger:{global:['damageCancelled','damageZero','damageAfter']}, - forced:true, - filter:function(event,player,name){ - if(name=='damageCancelled') return true; - for(var i of event.change_history){ - if(i<0) return true; - } - return false; - }, - content:function(){ - player.draw(2); - }, - }, - jinjian:{ - audio:2, - trigger:{source:'damageBegin1'}, - logTarget:'player', - filter:function(event,player){ - return !event.jinjian_source2&&!player.hasSkill('jinjian_source2'); - }, - prompt2:'令即将对其造成的伤害+1', - check:function(event,player){ - return get.attitude(player,event.player)<0&&!event.player.hasSkillTag('filterDamage',null,{ - player:player, - card:event.card, - }); - }, - content:function(){ - trigger.jinjian_source=true; - trigger.num++; - player.addTempSkill('jinjian_source2') - }, - group:'jinjian_player', - subSkill:{ - player:{ - audio:'jinjian', - trigger:{player:'damageBegin4'}, - filter:function(event,player){ - return !event.jinjian_player2&&!player.hasSkill('jinjian_player2'); - }, - prompt2:'令即将受到的伤害-1', - content:function(){ - trigger.jinjian_player=true; - trigger.num--; - player.addTempSkill('jinjian_player2') - }, - }, - source2:{ - trigger:{source:'damageBegin1'}, - forced:true, - charlotte:true, - filter:function(event,player){ - return !event.jinjian_source; - }, - content:function(){ - trigger.num--; - trigger.jinjian_source2=true; - player.removeSkill('jinjian_source2'); - }, - marktext:' -1 ', - intro:{ - content:'下次造成的伤害-1', - }, - }, - player2:{ - trigger:{player:'damageBegin3'}, - forced:true, - charlotte:true, - filter:function(event,player){ - return !event.jinjian_player; - }, - content:function(){ - trigger.num++; - trigger.jinjian_player2=true; - player.removeSkill('jinjian_player2'); - }, - marktext:' +1 ', - intro:{ - content:'下次受到的伤害+1', - }, - }, - }, - ai:{ - maixie_defend:true, - threaten:0.9, - effect:{ - target:function(card,player,target){ - if(player.hasSkillTag('jueqing')) return; - //if(target.hujia) return; - if(player._jinjian_tmp) return; - if(_status.event.getParent('useCard',true)||_status.event.getParent('_wuxie',true)) return; - if(get.tag(card,'damage')){ - if(target.hasSkill('jinjian_player2')){ - return [1,-2]; - } - else{ - if(get.attitude(player,target)>0){ - return [0,0.2]; - } - if(get.attitude(player,target)<0&&!player.hasSkillTag('damageBonus')){ - var sha=player.getCardUsable({name:'sha'}); - player._jinjian_tmp=true; - var num=player.countCards('h',function(card){ - if(card.name=='sha'){ - if(sha==0){ - return false; - } - else{ - sha--; - } - } - return get.tag(card,'damage')&&player.canUse(card,target)&&get.effect(target,card,player,player)>0; - }); - delete player._jinjian_tmp; - if(player.hasSkillTag('damage')){ - num++; - } - if(num<2){ - return [0,0.8]; - } - } - } - } - } - } - } - }, - //吉本 - xunli:{ - audio:2, - trigger:{ - global:['loseAfter','loseAsyncAfter'], - }, - forced:true, - filter:function(event,player){ - if(event.type!='discard'||event.getlx===false||player.getExpansions('xunli').length>=9) return false; - for(var i of event.cards){ - if(get.position(i,true)=='d'&&get.color(i,event.cards2&&event.cards2.contains(i)?event.player:false)=='black') return true; - } - return false; - }, - content:function(){ - 'step 0' - var num=9-player.getExpansions('xunli').length; - var cards=[]; - for(var i of trigger.cards){ - if(get.position(i,true)=='d'&&get.color(i,trigger.cards2&&trigger.cards2.contains(i)?trigger.player:false)=='black') cards.push(i); - } - if(cards.length<=num) event._result={ - bool:true, - links:cards, - } - else player.chooseButton(true,num,['寻疠:将'+get.cnNumber(num)+'张牌置于武将牌上',cards]).set('forceAuto',true).set('ai',function(button){ - return get.value(button.link,_status.event.player); - }); - 'step 1' - if(result.bool){ - player.addToExpansion('gain2',result.links).gaintag.add('xunli'); - } - }, - marktext:'疠', - intro:{ - content:'expansion', - markcount:'expansion', - }, - group:'xunli_exchange', - subSkill:{ - exchange:{ - audio:'xunli', - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - return player.getExpansions('xunli').length>0&&player.hasCard((card)=>get.color(card,player)=='black','h'); - }, - content:function(){ - "step 0" - var cards=player.getExpansions('xunli'); - if(!cards.length||!player.countCards('h')){ - event.finish(); - return; - } - var next=player.chooseToMove('寻疠:是否交换“疠”和手牌?'); - next.set('list',[ - [get.translation(player)+'(你)的疠',cards], - ['手牌区',player.getCards('h',(card)=>get.color(card,player)=='black')], - ]); - next.set('filterMove',function(from,to){ - return typeof to!='number'; - }); - next.set('processAI',function(list){ - var player=_status.event.player; - var getv=function(card){ - if(get.info(card).toself) return 0; - return player.getUseValue(card,false); - }; - var cards=list[0][1].concat(list[1][1]).sort(function(a,b){ - return getv(b)-getv(a); - }),cards2=cards.splice(0,player.getExpansions('xunli').length); - return [cards2,cards]; - }); - "step 1" - if(result.bool){ - var pushs=result.moved[0],gains=result.moved[1]; - pushs.removeArray(player.getExpansions('xunli')); - gains.removeArray(player.getCards('h')); - if(!pushs.length||pushs.length!=gains.length) return; - player.logSkill('xunli_exchange'); - player.addToExpansion(pushs,player,'giveAuto').gaintag.add('xunli'); - game.log(player,'将',pushs,'作为“疠”置于武将牌上'); - player.gain(gains,'gain2'); - } - }, - }, - }, - }, - zhishi:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('zhishi')).set('ai',function(target){ - var player=_status.event.player; - var att=get.attitude(player,target); - if(att<=4) return 0; - if(target.hasSkillTag('nogain')) att/=10; - return att; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('zhishi',target); - player.storage.zhishi_mark=target; - player.addTempSkill('zhishi_mark',{player:'phaseBegin'}); - } - }, - ai:{expose:0.3}, - subSkill:{ - mark:{ - trigger:{ - global:['dying','useCardToTargeted'], - }, - direct:true, - charlotte:true, - filter:function(event,player){ - if(!player.getExpansions('xunli').length) return false; - var target=player.storage.zhishi_mark; - if(event.name=='dying') return event.player==target; - return event.card.name=='sha'&&event.target==target; - }, - content:function(){ - 'step 0' - var target=player.storage.zhishi_mark; - event.target=target; - player.chooseButton([get.prompt('zhishi',target),'
    弃置任意张“疠”并令其摸等量的牌
    ',player.getExpansions('xunli')],[1,Infinity]).set('ai',function(button){ - var player=_status.event.player,target=player.storage.zhishi_mark; - if(target.hp<1&&target!=get.zhu(player)) return 0; - if(target.hasSkillTag('nogain')) return 0; - return 3-player.getUseValue(card,false); - }); - 'step 1' - if(result.bool){ - player.logSkill('zhishi',target); - player.loseToDiscardpile(result.links); - target.draw(result.links.length); - } - }, - mark:'character', - intro:{ - content:'决定帮助$,具体帮不帮另说', - }, - }, - }, - }, - lieyi:{ - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.getExpansions('xunli').length>0; - }, - filterTarget:lib.filter.notMe, - content:function(){ - 'step 0' - var cards=player.getExpansions('xunli'); - var cards2=cards.filter(function(card){ - return target.isIn()&&player.canUse(card,target,false); - }); - if(cards2.length){ - player.chooseButton(['对'+get.translation(target)+'使用一张牌',cards2],true).set('ai',function(button){ - return get.order(button.link); - }); - } - else{ - event.finish(); - if(cards.length) player.loseToDiscardpile(cards); - if(target.isAlive()&&!target.hasHistory('damage',function(evt){ - return evt.getParent('lieyi')==event&&evt._dyinged; - })) player.loseHp(); - } - 'step 1' - player.useCard(result.links[0],target,false); - event.goto(0); - }, - ai:{ - order:2, - result:{ - target:function(player,target){ - var cards=player.getExpansions('xunli'); - var effect=0,damage=0; - for(var i of cards){ - if(player.canUse(i,target,false)){ - effect+=get.effect(target,i,player,target); - damage+=get.tag(i,'damage'); - } - } - if(damage>=target.hp) return effect; - if(player.hp>2&&cards.length>3) return effect/3; - return 0; - }, - }, - }, - }, //李采薇 yijiao:{ audio:2, @@ -16434,336 +2765,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.draw(hs.length+2); }, }, - //马日磾 - bingjie:{ - trigger:{player:'phaseUseBegin'}, - check:function(event,player){ - return player.maxHp>3&&player.isDamaged()&&player.hasCard(function(card){ - return game.hasPlayer(function(current){ - return current!=player&&get.attitude(player,current)<0&&player.canUse(card,current,null,true)&&get.effect(current,card,player,player)>0; - })&&player.hasValueTarget(card); - },'hs'); - }, - content:function(){ - 'step 0' - player.loseMaxHp(); - 'step 1' - player.addTempSkill('bingjie_effect'); - game.delayx(); - }, - subSkill:{ - effect:{ - audio:'bingjie', - trigger:{player:'useCardToPlayered'}, - forced:true, - charlotte:true, - logTarget:'target', - filter:function(event,player){ - return event.target!=player&&(event.card.name=='sha'||get.type(event.card,false)=='trick')&&event.target.countCards('he')>0; - }, - content:function(){ - 'step 0' - trigger.target.chooseToDiscard('he',true); - 'step 1' - if(result.bool&&result.cards.length&&get.color(result.cards[0],trigger.target)==get.color(trigger.card)){ - game.log(trigger.target,'不能响应',trigger.card); - trigger.directHit.push(trigger.target); - } - }, - }, - }, - }, - zhengding:{ - audio:2, - trigger:{player:['useCard','respond']}, - forced:true, - filter:function(event,player){ - if(player==_status.currentPhase) return false; - if(!Array.isArray(event.respondTo)) return false; - if(player==event.respondTo[0]) return false; - var color=get.color(event.card); - if(color=='none') return false; - return color==get.color(event.respondTo[1]); - }, - content:function(){ - player.gainMaxHp(); - player.recover(); - }, - }, - //冯妤 - tiqi:{ - audio:2, - trigger:{global:['phaseDrawEnd','phaseDrawSkipped','phaseDrawCancelled']}, - filter:function(event,player){ - if(player==event.player) return false; - var num=0; - event.player.getHistory('gain',function(evt){ - if(evt.getParent().name=='draw'&&evt.getParent('phaseDraw')==event) num+=evt.cards.length; - }); - return num!=2; - }, - frequent:true, - logTarget:'player', - content:function(){ - 'step 0' - var num=0; - trigger.player.getHistory('gain',function(evt){ - if(evt.getParent().name=='draw'&&evt.getParent('phaseDraw')==trigger) num+=evt.cards.length; - }); - num=Math.abs(num-2); - event.num=num; - player.draw(num); - 'step 1' - if(trigger.player.isIn()){ - player.chooseControl(' +'+num+' ',' -'+num+' ','cancel2').set('prompt','是否改变'+get.translation(trigger.player)+'本回合的手牌上限?').set('ai',function(){ - var sgn=get.sgn(get.attitude(_status.event.player,_status.event.getTrigger().player)); - if(sgn==0) return 2; - if(sgn==1) return 0; - return 1; - }); - } - else event.finish(); - 'step 2' - if(result.index<2){ - var target=trigger.player; - player.line(target); - if(!target.storage.tiqi_effect) target.storage.tiqi_effect=0; - target.storage.tiqi_effect+=(num*get.sgn(0.5-result.index)); - target.addTempSkill('tiqi_effect'); - target.markSkill('tiqi_effect'); - } - }, - subSkill:{ - effect:{ - mod:{ - maxHandcard:function(player,num){ - if(typeof player.storage.tiqi_effect=='number') return num+player.storage.tiqi_effect; - }, - }, - charlotte:true, - onremove:true, - mark:true, - intro:{ - content:(num)=>('手牌上限'+(num<0?'':'+')+num), - }, - }, - }, - }, - baoshu:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - direct:true, - filter:function(event,player){ - return player.maxHp>0; - }, - content:function(){ - 'step 0' - player.chooseTarget([1,player.maxHp],get.prompt('baoshu'),'令至多'+get.cnNumber(player.maxHp)+'名角色重置武将牌并获得“梳”').set('ai',function(target){ - var att=get.attitude(player,target); - if(att<=0) return 0; - //if(target.isTurnedOver()) return 3*att; - if(target.isLinked()&&get.effect(target,{name:'tiesuo'},player,player)>0) return 1.6*att; - if(ui.selected.targets.length>=Math.sqrt(1+player.maxHp)) return 0; - if(target!=player) return 1.3*att; - return att; - }); - 'step 1' - if(result.bool){ - var targets=result.targets; - targets.sortBySeat(); - player.logSkill('baoshu',targets); - event.targets=targets; - event.num=0; - event.num2=(1+player.maxHp-targets.length); - } - else event.finish(); - 'step 2' - var target=targets[num]; - event.target=target; - if(!target.isIn()){ - if(num0; - }, - content:function(){ - 'step 0' - var suits=[],hs=player.getCards('h'); - for(var i of hs){ - suits.add(get.suit(i,player)); - } - var num=suits.length; - event.num=num; - var cards=get.cards(num); - game.cardsGotoOrdering(cards); - var next=player.chooseToMove(); - next.set('list',[ - ['牌堆顶',cards], - ['牌堆底'], - ]); - next.set('prompt','天运:点击将牌移动到牌堆顶或牌堆底'); - next.processAI=function(list){ - var cards=list[0][1] - return [[],cards]; - } - 'step 1' - var top=result.moved[0]; - var bottom=result.moved[1]; - top.reverse(); - for(var i=0;i1&&player.hp>5-num); - 'step 3' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'green'); - target.draw(num); - player.loseHp(); - } - else game.delayx(); - }, - group:'tianyun_gain', - subSkill:{ - gain:{ - audio:'tianyun', - trigger:{ - global:'phaseBefore', - player:'enterGame', - }, - forced:true, - locked:false, - filter:function(event,player){ - if(event.name=='phase'&&game.phaseNumber!=0) return false; - var suits=lib.suit.slice(0),hs=player.getCards('h'); - for(var i of hs){ - suits.remove(get.suit(i,player)); - if(!suits.length) return false; - } - return true; - }, - content:function(){ - var suits=lib.suit.slice(0),hs=player.getCards('h'); - for(var i of hs){ - suits.remove(get.suit(i,player)); - } - var cards=[]; - for(var i of suits){ - var card=get.cardPile(function(card){ - return get.suit(card,false)==i; - }); - if(card) cards.push(card); - } - if(cards.length) player.gain(cards,'gain2'); - }, - }, - }, - }, - wfyuyan:{ - audio:2, - derivation:'refenyin', - trigger:{global:'roundStart'}, - forced:true, - locked:false, - content:function(){ - 'step 0' - var next=player.chooseTarget('请选择【预言】的目标',true).set('animate',false).set('ai',function(){ - return Math.random(); - }); - 'step 1' - if(result.bool){ - player.storage.wfyuyan=result.targets[0]; - player.addSkill('wfyuyan_dying'); - player.addSkill('wfyuyan_damage'); - } - }, - subSkill:{ - dying:{ - trigger:{global:'dying'}, - forced:true, - charlotte:true, - popup:false, - content:function(){ - if(trigger.player==player.storage.wfyuyan){ - player.logSkill('wfyuyan',trigger.player); - player.addTempSkill('iwasawa_refenyin',{player:'phaseEnd'}); - } - player.removeSkill('wfyuyan_dying'); - }, - }, - damage:{ - trigger:{global:'damageSource'}, - forced:true, - popup:false, - charlotte:true, - filter:function(event,player){ - return event.source&&event.source.isIn(); - }, - content:function(){ - if(trigger.source==player.storage.wfyuyan){ - player.logSkill('wfyuyan',trigger.source); - player.draw(2); - } - player.removeSkill('wfyuyan_damage'); - }, - }, - }, - }, //严夫人 channi:{ audio:2, @@ -16933,596 +2934,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //邓芝 - jianliang:{ - audio:2, - trigger:{player:'phaseDrawBegin2'}, - filter:function(event,player){ - return !player.isMaxHandcard(); - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('jianliang'),'令至多两名角色各摸一张牌',[1,2]).set('ai',function(target){ - return Math.sqrt(5-Math.min(4,target.countCards('h')))*get.attitude(_status.event.player,target); - }); - 'step 1' - if(result.bool){ - var targets=result.targets.sortBySeat(); - player.logSkill('jianliang',targets); - if(targets.length==1){ - targets[0].draw(); - event.finish(); - } - else game.asyncDraw(targets); - } - else event.finish(); - 'step 2' - game.delayx(); - }, - }, - weimeng:{ - audio:2, - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return player.hp>0&&target!=player&&target.countGainableCards(player,'h')>0; - }, - content:function(){ - 'step 0' - player.gainPlayerCard(target,'h',true,[1,player.hp]); - 'step 1' - if(result.bool&&target.isIn()){ - var num=result.cards.length,hs=player.getCards('he'); - var numx=0; - for(var i of result.cards) numx+=get.number(i,player); - event.num=numx; - event.cards=result.cards; - if(!hs.length) event.finish(); - else if(hs.length<=num) event._result={bool:true,cards:hs}; - else player.chooseCard('he',true,'选择交给'+get.translation(target)+get.cnNumber(num)+'张牌','(已获得牌的点数和:'+numx+')',num); - } - else event.finish(); - 'step 2' - player.give(result.cards,target); - var numx=0; - for(var i of result.cards) numx+=get.number(i,player); - if(numx>num) player.draw(); - else if(numx-3) return false; - if(player.hp3) return true; - return false; - }, - preHidden:true, - content:function(){ - 'step 0' - player.loseHp(); - event.target=trigger.player; - 'step 1' - event.addIndex=0; - var list=[],num=target.countCards('h')-player.countCards('h'); - event.num=num; - if(num>0&&target.countCards('h')>0) list.push('令其弃置'+get.cnNumber(num)+'张手牌'); - else event.addIndex++; - if(target.hp>player.hp) list.push('令其失去'+get.cnNumber(target.hp-player.hp)+'点体力'); - if(!list.length) event.finish(); - else if(list.length==1) event._result={index:0}; - else player.chooseControl().set('choiceList',list).set('prompt','令'+get.translation(target)+'执行一项').set('ai',function(){ - var player=_status.event.player,target=_status.event.getParent().target; - return (target.hp-player.hp)>(Math.min(_status.event.getParent().num,target.countCards('h'))/2)?1:0; - }); - 'step 2' - if(result.index+event.addIndex==0) target.chooseToDiscard(num,true,'h'); - else target.loseHp(target.hp-player.hp); - }, - }, - boyan:{ - enable:'phaseUse', - usable:1, - filterTarget:function(card,player,target){ - return target!=player; - }, - content:function(){ - 'step 0' - target.drawTo(Math.min(5,target.maxHp)); - 'step 1' - target.addTempSkill('boyan_block'); - }, - subSkill:{ - block:{ - mark:true, - intro:{content:'不能使用或打出手牌'}, - charlotte:true, - mod:{ - cardEnabled2:function(card){ - if(get.position(card)=='h') return false; - }, - }, - }, - }, - ai:{ - order:4, - result:{ - target:function(player,target){ - if(get.attitude(player,target)>0) return Math.max(0,Math.min(5,target.maxHp)-target.countCards('h')); - if(Math.max(0,Math.min(5,target.maxHp)-target.countCards('h'))<=1&&target.countCards('h','shan')&&!target.hasSkillTag('respondShan',true,null,true)&&player.countCards('h',function(card){ - return get.tag(card,'respondShan')&&player.getUseValue(card,null,true)>0&&get.effect(target,card,player,player)>0; - })) return -2; - }, - }, - }, - }, - //祢衡 - rekuangcai:{ - audio:2, - forced:true, - trigger:{player:'phaseDiscardBegin'}, - filter:function(event,player){ - return !player.getHistory('useCard').length||!player.getHistory('sourceDamage').length; - }, - content:function(){ - lib.skill.rekuangcai.change(player,player.getHistory('useCard').length?-1:1); - }, - mod:{ - targetInRange:function(card,player){ - if(player==_status.currentPhase) return true; - }, - cardUsable:function(card,player){ - if(player==_status.currentPhase) return Infinity; - }, - }, - change:function(player,num){ - if(typeof player.storage.rekuangcai_change!='number') player.storage.rekuangcai_change=0; - player.storage.rekuangcai_change+=num; - player.addSkill('rekuangcai_change'); - }, - group:'rekuangcai_draw', - subSkill:{ - draw:{ - audio:'rekuangcai', - trigger:{player:'phaseJieshuBegin'}, - forced:true, - filter:function(event,player){ - return player.getHistory('sourceDamage').length>0; - }, - content:function(){ - player.draw(Math.min(5,player.getStat('damage'))); - }, - }, - change:{ - mod:{ - maxHandcard:function(player,num){ - if(typeof player.storage.rekuangcai_change=='number') return num+player.storage.rekuangcai_change; - }, - }, - charlotte:true, - mark:true, - intro:{ - content:(num)=>('手牌上限'+(num<0?'':'+')+num), - }, - }, - }, - }, - reshejian:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - filter:function(event,player){ - if(player==event.player||event.targets.length!=1) return false; - return player.countCards('h')>=2; - }, - direct:true, - usable:2, - content:function(){ - 'step 0' - player.chooseToDiscard('he',[2,Infinity],get.prompt('reshejian',trigger.player),'
    弃置至少两张手牌,然后选择一项:
    ⒈弃置其等量的牌。⒉对其造成1点伤害。
    ').set('ai',function(card){ - if(_status.event.goon&&ui.selected.cards.length<2) return 5.6-get.value(card); - return 0; - }).set('goon',function(){ - var target=trigger.player; - if(get.damageEffect(target,player,player)>0) return true; - if(target.countCards('he',function(card){ - return get.value(card,target)>6; - })>=2) return true; - return false; - }()).logSkill=['reshejian',trigger.player]; - 'step 1' - if(!result.bool){ - player.storage.counttrigger.reshejian--; - event.finish(); - return; - } - var num=result.cards.length; - event.num=num; - var target=trigger.player,str=get.translation(target); - event.target=target; - if(!target.isIn()) event.finish(); - else if(!target.hasCard(function(card){ - return lib.filter.canBeDiscarded(card,player,target); - },'he')) event._result={index:1}; - else player.chooseControl().set('choiceList',[ - '弃置'+str+'的'+get.cnNumber(num)+'张牌', - '对'+str+'造成1点伤害', - ]).set('ai',function(){ - var player=_status.event.player; - var eff0=get.effect(target,{name:'guohe_copy2'},player,player)*Math.min(1.7,target.countCards('he')); - var eff1=get.damageEffect(target,player,player); - return eff0>eff1?0:1; - }); - 'step 2' - if(result.index==0) player.discardPlayerCard(target,num,true,'he'); - else target.damage(); - }, - }, - //张宝 - xinzhoufu:{ - audio:'zhoufu', - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he')>0; - }, - filterCard:true, - filterTarget:function(card,player,target){ - return target!=player&&!target.getExpansions('xinzhoufu2').length; - }, - check:function(card){ - return 6-get.value(card) - }, - position:'he', - discard:false, - lose:false, - delay:false, - content:function(){ - target.addToExpansion(cards,player,'give').gaintag.add('xinzhoufu2'); - target.addSkill('xinzhoufu_judge'); - }, - ai:{ - order:9, - result:{ - target:function(player,target){ - if(player.inRange(target)) return -1.3; - return -1; - }, - }, - }, - subSkill:{ - judge:{ - audio:'zhoufu', - trigger:{player:'judgeBefore'}, - forced:true, - charlotte:true, - filter:function(event,player){ - return !event.directresult&&player.getExpansions('xinzhoufu2').length; - }, - content:function(){ - var cards=[player.getExpansions('xinzhoufu2')[0]]; - trigger.directresult=cards[0]; - }, - }, - }, - }, - xinzhoufu2:{ - intro:{ - content:'expansion', - markcount:'expansion', - }, - }, - xinyingbing:{ - audio:'yingbin', - trigger:{player:'useCardToPlayered'}, - forced:true, - logTarget:'target', - filter:function(event,player){ - return event.target.getExpansions('xinzhoufu2').length>0&&!player.hasHistory('gain',function(evt){ - var evtx=evt.getParent(2); - return evtx&&evtx.name=='xinyingbing'&&evtx._trigger.target==event.target; - }); - }, - content:function(){ - player.draw(2); - }, - ai:{ - effect:{ - player:function(card,player,target){ - if(target&&target.getExpansions('xinzhoufu2').length>0&&!player.hasHistory('gain',function(evt){ - var evtx=evt.getParent(2); - return evtx&&evtx.name=='xinyingbing'&&evtx._trigger.target==target; - })) return [1,1]; - }, - }, - }, - }, - //赵嫣 - jinhui:{ - audio:2, - enable:'phaseUse', - usable:1, - content:function(){ - 'step 0' - var cards=[]; - while(cards.length<3){ - var card=get.cardPile2(function(card){ - for(var i of cards){ - if(i.name==card.name) return false; - } - var info=get.info(card,false); - if(info.ai&&info.ai.tag&&info.ai.tag.damage) return false; - return !info.notarget&&(info.toself||info.singleCard||!info.selectTarget||info.selectTarget==1); - }); - if(card) cards.push(card); - else break; - } - if(!cards.length) event.finish(); - else{ - player.showCards(cards,get.translation(player)+'发动了【锦绘】'); - event.cards=cards; - game.cardsGotoOrdering(cards); - if(game.hasPlayer((current)=>(current!=player))) player.chooseTarget('选择【锦绘】的目标',true,lib.filter.notMe).set('ai',function(target){ - var player=_status.event.player,cards=_status.event.getParent().cards.slice(0); - var max_effect=0,max_effect_player=0; - for(var i of cards){ - var targetx=lib.skill.jinhui.getUsableTarget(i,target,player); - if(targetx){ - var effect2=get.effect(targetx,i,target,target); - var effect3=get.effect(targetx,i,target,player); - if(effect2>max_effect){ - max_effect=effect2; - max_effect_player=effect3; - } - } - } - return max_effect_player; - }); - else event.finish(); - } - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.line(target,'green'); - var cards=cards.filter(function(card){ - return lib.skill.jinhui.getUsableTarget(card,target,player); - }); - if(cards.length){ - if(cards.length==1) event._result={bool:true,links:cards}; - else target.chooseButton(['选择按“锦绘”规则使用一张牌',cards],true).set('ai',function(button){ - var player=_status.event.player,target=_status.event.getParent().player,card=button.link; - var targetx=lib.skill.jinhui.getUsableTarget(card,player,target); - var effect=get.effect(targetx,card,player,player),cards=_status.event.getParent().cards.slice(0); - var effect2=0,effect3=0; - cards.remove(button.link); - for(var i of cards){ - var targetx=lib.skill.jinhui.getUsableTarget(i,target,player); - if(targetx){ - effect2+=get.effect(targetx,i,target,target); - effect3+=get.effect(targetx,i,target,player); - } - } - if(effect2>0) effect+=effect3; - return effect; - }); - } - else event.goto(3); - } - else event.finish(); - 'step 2' - if(result.bool){ - var card=result.links[0]; - event.cards.remove(card); - var targetx=lib.skill.jinhui.getUsableTarget(card,target,player); - target.useCard(card,targetx,false,'noai'); - } - 'step 3' - var cards=cards.filter(function(card){ - return lib.skill.jinhui.getUsableTarget(card,player,target); - }); - if(cards.length){ - player.chooseButton(['是否按“锦绘”规则使用其中一张牌?',cards]).set('ai',function(button){ - var player=_status.event.player,target=_status.event.getParent().target; - var card=button.link,targetx=lib.skill.jinhui.getUsableTarget(card,player,target); - return get.effect(targetx,card,player,player) - }); - } - else event.finish(); - 'step 4' - if(result.bool){ - var card=result.links[0]; - cards.remove(card); - var targetx=lib.skill.jinhui.getUsableTarget(card,player,target); - if(targetx){ - player.useCard(card,targetx,false,'noai'); - } - if(cards.length) event.goto(3); - } - else event.finish(); - }, - getUsableTarget:function(card,player,target){ - var info=get.info(card,false); - if(info.toself) return player.canUse(card,player,false)?player:false; - return (target.isIn()&&player.canUse(card,target,false))?target:false; - }, - ai:{ - order:5, - result:{player:1}, - }, - }, - qingman:{ - audio:2, - trigger:{global:'phaseEnd'}, - forced:true, - logTarget:'player', - filter:function(event,player){ - if(!event.player.isAlive()) return false; - var num=player.countCards('h'); - if(num>=5) return false; - var num2=0; - for(var i=1;i<=5;i++){ - if(event.player.isEmpty(i)) num2++; - } - return numcard.hasGaintag('syjiqiao'),'x'); - }, - content:function(){ - 'step 0' - var cards=player.getExpansions('syjiqiao') - var dialog=['激峭:选择获得一张牌'] - var reds=[],blacks=[]; - for(var i of cards) (get.color(i)=='red'?reds:blacks).push(i); - if(reds.length>0){ - dialog.push('
    红色牌
    '); - dialog.push(reds); - } - if(blacks.length>0){ - dialog.push('
    黑色牌
    '); - dialog.push(blacks); - }; - player.chooseButton(dialog,true).set('ai',function(button){ - var player=_status.event.player; - var color=get.color(button.link),cards=player.getExpansions('syjiqiao'); - var num1=cards.filter((card)=>get.color(card)==color).length,num2=cards.length-num1; - if(num1>=num2) return get.value(button.link); - return 0; - }); - 'step 1' - if(result.bool){ - player.gain(result.links,'gain2'); - } - else event.finish(); - 'step 2' - var map={red:0,black:0},cards=player.getExpansions('syjiqiao') - for(var i of cards){ - var color=get.color(i,false); - if(map[color]!=undefined) map[color]++; - } - if(map.red==map.black) player.recover(); - else player.loseHp(); - }, - onremove:function(player){ - var cards=player.getExpansions('syjiqiao') - if(cards.length) player.loseToDiscardpile(cards); - }, - }, - }, - }, - syxiongyi:{ - audio:2, - skillAnimation:true, - animationColor:'wood', - limited:true, - enable:'chooseToUse', - filter:function(event,player){ - if(event.type!='dying') return false; - if(player!=event.dying) return false; - return true; - }, - content:function(){ - 'step 0' - player.awakenSkill('syxiongyi'); - if(!_status.characterlist){ - lib.skill.pingjian.initList(); - } - event.hp=1-player.hp; - if(_status.characterlist.contains('xushi')){ - if(player.name1=='re_sunyi'||player.name2=='re_sunyi') event._result={control:'re_sunyi'}; - else if(player.name2!=undefined){ - player.chooseControl(player.name1,player.name2).set('prompt','请选择要更换的武将牌'); - } - else event._result={control:player.name1}; - hp+=2; - _status.characterlist.remove('xushi'); - _status.characterlist.add('re_sunyi'); - player.reinit('re_sunyi','xushi',false); - } - else{ - player.addSkillLog('olhunzi'); - event.goto(2); - } - 'step 1' - event.hp+=2; - var name=result.control; - _status.characterlist.remove('xushi'); - _status.characterlist.add(name); - player.reinit(name,'xushi',false); - 'step 2' - var hp=event.hp; - if(hp>0) player.recover(hp); - }, - ai:{ - order:1, - save:true, - skillTagFilter:function(player,arg,target){ - return player==target; - }, - result:{ - player:10 - }, - }, - derivation:['olhunzi','reyingzi','gzyinghun'], - }, - gzyinghun_re_sunyi:{audio:1}, - reyingzi_re_sunyi:{audio:1}, //庞德公 heqia:{ audio:2, @@ -17704,421 +3115,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //王桃王悦 - huguan:{ - audio:2, - audioname:['wangyue'], - trigger:{global:'useCard'}, - direct:true, - filter:function(event,player){ - if(get.color(event.card,false)!='red') return false; - var evt=event.getParent('phaseUse'); - if(!evt||evt.player!=event.player) return false; - return event.player.getHistory('useCard',function(event){ - return event.getParent('phaseUse')==evt; - }).indexOf(event)==0; - }, - content:function(){ - 'step 0' - player.chooseControl(lib.suit,'cancel2').set('prompt',get.prompt('huguan',trigger.player)).set('prompt2','令某种花色的手牌不计入其本回合的手牌上限').set('ai',function(){ - var player=_status.event.player,target=_status.event.getTrigger().player; - if(get.attitude(player,target)<=0) return 'cancel2'; - var list=lib.suit.slice(0); - list.removeArray(target.getStorage('huguan_add')); - if(list.length) return list.randomGet(); - return 'cancel2'; - }); - 'step 1' - if(result.control!='cancel2'){ - var target=trigger.player; - player.logSkill('huguan',target); - game.log(player,'选择了','#g'+get.translation(result.control),'花色') - target.addTempSkill('huguan_add'); - target.markAuto('huguan_add',[result.control]); - } - }, - subSkill:{ - add:{ - charlotte:true, - onremove:true, - mod:{ - ignoredHandcard:function(card,player){ - if(player.getStorage('huguan_add').contains(get.suit(card,player))) return true; - }, - cardDiscardable:function(card,player,name){ - if(name=='phaseDiscard'&&player.getStorage('huguan_add').contains(get.suit(card,player))) return false; - } - }, - intro:{content:'本回合$花色的牌不计入手牌上限'}, - }, - }, - }, - yaopei:{ - audio:2, - trigger:{global:'phaseDiscardEnd'}, - direct:true, - filter:function(event,player){ - if(player==event.player||!event.player.isIn()) return false; - if(!player.hasAllHistory('useSkill',function(evt){ - return evt.skill=='huguan'&&evt.targets.contains(event.player); - })) return false; - var suits=[]; - event.player.getHistory('lose',function(evt){ - if(evt.type=='discard'&&evt.getParent('phaseDiscard')==event){ - for(var i of evt.cards2) suits.add(get.suit(i,evt.hs.contains(i)?evt.player:false)); - } - }); - if(suits.length>=lib.suit.length) return false; - if(_status.connectMode&&player.countCards('h')>0) return true; - return player.hasCard(function(card){ - return !suits.contains(get.suit(card)); - },'he'); - }, - content:function(){ - 'step 0' - var suits=[]; - trigger.player.getHistory('lose',function(evt){ - if(evt.type=='discard'&&evt.getParent('phaseDiscard')==trigger){ - for(var i of evt.cards2) suits.add(get.suit(i,evt.hs.contains(i)?evt.player:false)); - } - }); - player.chooseCardTarget({ - prompt:get.prompt('yaopei',trigger.player), - prompt2:'操作提示:选择要弃置的牌,并选择执行摸牌选项的角色,另一名角色执行回复体力的选项。', - suits:suits, - position:'he', - filterCard:function(card,player){ - return !_status.event.suits.contains(get.suit(card))&&lib.filter.cardDiscardable(card,player,'yaopei'); - }, - filterTarget:function(card,player,target){ - return target==player||target==_status.event.getTrigger().player; - }, - ai1:function(card){ - return 8-get.value(card); - }, - ai2:function(target){ - var player=_status.event.player,source=_status.event.getTrigger().player; - var recoverer=(player==target?source:player); - if(recoverer.isHealthy()) return (get.attitude(player,target)>0?1:0); - if(get.recoverEffect(recoverer,player,player)>0&&get.attitude(player,target)>0) return 2; - return 0; - }, - }); - 'step 1' - if(result.bool){ - var target=trigger.player; - player.logSkill('yaopei',target); - player.discard(result.cards); - if(player==result.targets[0]){ - target.recover(); - player.draw(2); - } - else{ - target.draw(2); - player.recover(); - } - } - }, - }, - mingluan:{ - audio:2, - trigger:{global:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return player!=event.player&&event.player.isIn()&&player.hasSkill('mingluan_mark')&&player.countCards('he')>0; - }, - content:function(){ - 'step 0' - player.chooseToDiscard('he',get.prompt('mingluan'),'弃置任意张牌,并摸等同于'+get.translation(trigger.player)+'手牌数的牌(至多摸至五张)',[1,Infinity]).set('ai',function(card){ - var player=_status.event.player; - var ph=player.countCards('h'); - if(get.position(card)=='h') ph--; - var num=Math.min(_status.event.getTrigger().player.countCards('h'),5-ph); - if(num>0) return 3.5*num+0.01-get.value(card); - return 0.01-get.value(card); - }).logSkill=['mingluan',trigger.player]; - 'step 1' - if(result.bool){ - var num=trigger.player.countCards('h'),num2=5-player.countCards('h'); - if(num>0&&num2>0) player.draw(Math.min(num,num2)); - } - }, - group:'mingluan_count', - subSkill:{ - count:{ - charlotte:true, - trigger:{global:'recoverEnd'}, - silent:true, - popup:false, - firstDo:true, - filter:function(event,player){ - var current=_status.currentPhase; - return current&¤t!=player&&!player.hasSkill('mingluan_mark'); - }, - content:function(){ - player.addTempSkill('mingluan_mark'); - }, - }, - mark:{ - charlotte:true, - }, - }, - }, - //陈登 - refuyuan:{ - audio:2, - trigger:{global:'useCardToTargeted'}, - logTarget:'target', - filter:function(event,player){ - return event.card.name=='sha'&&event.target.isIn()&&!game.hasPlayer2(function(current){ - return current.hasHistory('useCard',function(evt){ - return evt.card!=event.card&&get.color(evt.card,false)=='red'&&evt.targets&&evt.targets.contains(event.target); - }); - }); - }, - check:function(event,player){ - return get.attitude(player,event.target)>0; - }, - content:function(){ - trigger.target.draw(); - }, - }, - reyingshui:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he')>0&&game.hasPlayer((current)=>player.inRange(current)); - }, - position:'he', - filterCard:true, - filterTarget:function(card,player,target){ - return player.inRange(target); - }, - discard:false, - lose:false, - delay:false, - check:function(card){ - if(get.type(card)=='equip') return 3-get.value(card); - return 6.5-get.value(card); - }, - content:function(){ - 'step 0' - player.give(cards,target); - 'step 1' - var next=target.chooseCard('he',[2,Infinity],'交给'+get.translation(player)+'至少两张装备牌,否则受到1点伤害',{type:'equip'}); - if(get.damageEffect(target,player,target)>=0) next.set('ai',()=>-1); - else next.set('ai',(card)=>ui.selected.cards.length<2?(6-get.value(card)):0); - 'step 2' - if(result.bool) target.give(result.cards,player); - else target.damage('nocard'); - }, - ai:{ - order:5, - tag:{ - damage:0.5, - }, - result:{ - target:-1.5, - }, - }, - }, - rewangzu:{ - audio:2, - trigger:{player:'damageBegin1'}, - direct:true, - filter:function(event,player){ - return event.source&&player!=event.source&&player.hasCard((card)=>lib.filter.cardDiscardable(card,player,'rewangzu'),'h'); - }, - usable:1, - content:function(){ - 'step 0' - var num=player.getFriends().length; - if(!game.hasPlayer(function(current){ - return current!=player&¤t.getFriends().length>num; - })){ - player.chooseToDiscard('h',get.prompt('rewangzu'),'弃置一张牌并令伤害-1').set('ai',function(card){ - return 7-get.value(card); - }).logSkill='rewangzu'; - } - else{ - player.chooseBool(get.prompt('rewangzu'),'随机弃置一张牌并令伤害-1'); - } - 'step 1' - if(result.bool){ - trigger.num--; - if(!result.cards||!result.cards.length){ - player.logSkill('rewangzu'); - var cards=player.getCards('h',(card)=>lib.filter.cardDiscardable(card,player,'rewangzu')); - if(cards.length) player.discard(cards.randomGet()); - } - } - else player.storage.counttrigger.rewangzu--; - }, - }, - //曹金玉 - yuqi:{ - audio:2, - trigger:{global:'damageEnd'}, - init:function(player){ - if(!player.storage.yuqi) player.storage.yuqi=[0,3,1,1]; - }, - getInfo:function(player){ - if(!player.storage.yuqi) player.storage.yuqi=[0,3,1,1]; - return player.storage.yuqi; - }, - onremove:true, - usable:2, - filter:function(event,player){ - var list=lib.skill.yuqi.getInfo(player); - return event.player.isIn()&&get.distance(player,event.player)<=list[0]; - }, - logTarget:'player', - content:function(){ - 'step 0' - event.list=lib.skill.yuqi.getInfo(player); - var cards=get.cards(event.list[1]); - event.cards=cards; - game.cardsGotoOrdering(cards); - var next=player.chooseToMove(true,'隅泣(若对话框显示不完整,可下滑操作)'); - next.set('list',[ - ['牌堆顶的牌',cards], - ['交给'+get.translation(trigger.player)+'(至少一张'+(event.list[2]>1?(',至多'+get.cnNumber(event.list[2])+'张'):'')+')'], - ['交给自己(至多'+get.cnNumber(event.list[3])+'张)'], - ]); - next.set('filterMove',function(from,to,moved){ - var info=lib.skill.yuqi.getInfo(_status.event.player); - if(to==1) return moved[1].length0) card2=cards.shift(); - else card2=cards.pop(); - return [cards,[card2],cards1]; - }); - next.set('filterOk',function(moved){ - return moved[1].length>0; - }); - 'step 1' - if(result.bool){ - var moved=result.moved; - cards.removeArray(moved[1]); - cards.removeArray(moved[2]); - while(cards.length){ - ui.cardPile.insertBefore(cards.pop().fix(),ui.cardPile.firstChild); - } - var list=[[trigger.player,moved[1]]]; - if(moved[2].length) list.push([player,moved[2]]); - game.loseAsync({ - gain_list:list, - giver:player, - animate:'gain2', - }).setContent('gaincardMultiple'); - } - }, - mark:true, - intro:{ - content:function(storage,player){ - var info=lib.skill.yuqi.getInfo(player); - return '
    蓝色:'+info[0]+' 红色:'+info[1]+'
    绿色:'+info[2]+' 黄色:'+info[3]+'
    ' - }, - }, - ai:{ - threaten:8.8, - }, - }, - shanshen:{ - audio:2, - trigger:{global:'die'}, - direct:true, - content:function(){ - 'step 0' - event.goon=!player.hasAllHistory('sourceDamage',function(evt){ - return evt.player==trigger.player; - }); - var list=lib.skill.yuqi.getInfo(player); - player.chooseControl('蓝色('+list[0]+')','红色('+list[1]+')','绿色('+list[2]+')','黄色('+list[3]+')','cancel2').set('prompt',get.prompt('shanshen')).set('prompt2','令〖隅泣〗中的一个数字+2'+(event.goon?'并回复1点体力':'')).set('ai',function(){ - var player=_status.event.player,info=lib.skill.yuqi.getInfo(player); - if(info[0]info[0]; - })) return 0; - return 2; - }); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('shanshen',trigger.player); - var list=lib.skill.yuqi.getInfo(player); - list[result.index]=Math.min(5,list[result.index]+2); - game.log(player,'将',result.control,'数字改为','#y'+list[result.index]) - player.markSkill('yuqi'); - if(event.goon) player.recover(); - } - }, - }, - xianjing:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - direct:true, - content:function(){ - 'step 0' - var list=lib.skill.yuqi.getInfo(player); - player.chooseControl('蓝色('+list[0]+')','红色('+list[1]+')','绿色('+list[2]+')','黄色('+list[3]+')','cancel2').set('prompt',get.prompt('xianjing')).set('prompt2','令〖隅泣〗中的一个数字+1').set('ai',function(){ - var player=_status.event.player,info=lib.skill.yuqi.getInfo(player); - if(info[0]info[0]; - })) return 0; - return 2; - }); - 'step 1' - if(result.control!='cancel2'){ - player.logSkill('xianjing'); - var list=lib.skill.yuqi.getInfo(player); - list[result.index]=Math.min(5,list[result.index]+1); - game.log(player,'将',result.control,'数字改为','#y'+list[result.index]) - player.markSkill('yuqi'); - if(player.isDamaged()) event.finish(); - } - else event.finish(); - 'step 2' - var list=lib.skill.yuqi.getInfo(player); - player.chooseControl('蓝色('+list[0]+')','红色('+list[1]+')','绿色('+list[2]+')','黄色('+list[3]+')','cancel2').set('prompt','是否令〖隅泣〗中的一个数字+1?').set('ai',function(){ - var player=_status.event.player,info=lib.skill.yuqi.getInfo(player); - if(info[0]info[0]; - })) return 0; - return 2; - }); - 'step 3' - if(result.control!='cancel2'){ - var list=lib.skill.yuqi.getInfo(player); - list[result.index]=Math.min(5,list[result.index]+1); - game.log(player,'将',result.control,'数字改为','#y'+list[result.index]) - player.markSkill('yuqi'); - } - }, - }, //韩猛 jieliang:{ trigger:{global:'phaseDrawBegin2'}, @@ -18242,197 +3238,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, - //万年公主 - zhenge:{ - audio:2, - trigger:{player:'phaseZhunbeiBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('zhenge'),'令一名角色的攻击范围+1').set('ai',function(target){ - var player=_status.event.player,att=get.attitude(player,target) - if(att>0){ - if(!target.hasMark('zhenge_effect')) att*=1.5; - if(!game.hasPlayer(function(current){ - return get.distance(target,current,'attack')>2; - })){ - var usf=Math.max.apply(Math,game.filterPlayer().map(function(current){ - if(target.canUse('sha',current,false)) return get.effect(current,{name:'sha'},target,player); - return 0; - })); - return att+usf; - } - return att; - } - return 0; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('zhenge',target); - target.addSkill('zhenge_effect'); - if(target.countMark('zhenge_effect')<5) target.addMark('zhenge_effect',1,false); - if(!game.hasPlayer(function(current){ - return current!=target&&!target.inRange(current); - })){ - player.chooseTarget('是否令'+get.translation(target)+'视为对另一名角色使用【杀】?',function(card,player,target){ - return _status.event.source.canUse('sha',target); - }).set('source',target).set('ai',function(target){ - var evt=_status.event; - return get.effect(target,{name:'sha'},evt.source,evt.player); - }); - } - else{ - game.delayx(); - event.finish(); - } - } - else event.finish(); - 'step 2' - if(result.bool){ - target.useCard({name:'sha',isCard:true},result.targets[0],false); - } - 'step 3' - game.delayx(); - }, - subSkill:{ - effect:{ - charlotte:true, - onremove:true, - mod:{ - attackRange:function(player,num){ - return num+player.countMark('zhenge_effect'); - }, - }, - intro:{content:'攻击范围+#'}, - }, - }, - }, - xinghan:{ - audio:2, - init:function(player){ - player.addSkill('xinghan_count'); - }, - onremove:function(player){ - player.removeSkill('xinghan_count'); - }, - trigger:{global:'damageSource'}, - forced:true, - filter:function(event,player){ - return event.card&&event.card==player.storage.xinghan_temp&&event.source&&event.source.hasMark('zhenge_effect'); - }, - logTarget:'source', - content:function(){ - player.draw(player.isMaxHandcard(true)?1:Math.min(5,trigger.source.getAttackRange())); - }, - subSkill:{ - count:{ - trigger:{global:'useCard1'}, - forced:true, - charlotte:true, - popup:false, - firstDo:true, - filter:function(event,player){ - return event.card.name=='sha'&&!game.hasPlayer2(function(current){ - return current.hasHistory('useCard',function(evt){ - return evt!=event&&evt.card.name=='sha'; - }) - }); - }, - content:function(){ - player.addTempSkill('xinghan_temp'); - player.storage.xinghan_temp=trigger.card; - }, - }, - temp:{onremove:true}, - }, - ai:{combo:'zhenge'}, - }, - //荀谌 - refenglve:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('h')>0&&!player.hasSkillTag('noCompareSource')&&game.hasPlayer(function(current){ - return current!=player&¤t.countCards('h')>0&&!current.hasSkillTag('noCompareTarget'); - }); - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0&&!target.hasSkillTag('noCompareTarget'); - }, - content:function(){ - 'step 0' - player.chooseToCompare(target); - 'step 1' - if(result.bool){ - if(!target.countCards('hej')) event.finish(); - else{ - event.giver=target; - event.gainner=player; - target.choosePlayerCard(target,true,'hej',2,'交给'+get.translation(player)+'两张牌'); - } - } - else if(result.tie){ - delete player.getStat('skill').refenglve; - event.finish(); - } - else{ - if(get.position(result.player,true)=='d') target.gain(result.player,'gain2'); - event.finish(); - /*if(!player.countCards('he')) event.finish(); - else{ - event.giver=player; - event.gainner=target; - player.chooseCard(true,'he','交给'+get.translation(target)+'一张牌'); - }*/ - } - 'step 2' - if(result.bool) event.giver.give(result.cards,event.gainner); - }, - ai:{ - order:8, - result:{ - target:function(player,target){ - if(!player.hasCard(function(card){ - if(get.position(card)!="h") return false; - var val=get.value(card); - if(val<0) return true; - if(val<=5){ - return card.number>=11; - } - if(val<=6){ - return card.number>=13; - } - return false; - })) return 0; - return -Math.sqrt(1+target.countCards('he'))/(1+target.countCards('j')); - }, - }, - }, - }, - anyong:{ - audio:2, - trigger:{global:'damageSource'}, - direct:true, - filter:function(event,player){ - return event.source&&event.source==_status.currentPhase&&event.num==1&& - event.player!=event.source&&event.player.isIn()&&player.countCards('he')>0&& - event.source.getHistory('sourceDamage',function(evt){ - return evt.player!=event.source; - }).indexOf(event)==0; - }, - content:function(){ - 'step 0' - player.chooseToDiscard('he',get.prompt('anyong',trigger.player),'弃置一张牌并对其造成1点伤害').set('goon',get.damageEffect(trigger.player,player,player)>0).set('ai',function(card){ - if(_status.event.goon) return 7-get.value(card); - return 0; - }).logSkill=['anyong',trigger.player]; - 'step 1' - if(result.bool) trigger.player.damage(); - }, - }, //张宁 tianze:{ audio:2, @@ -18533,148 +3338,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(card) player.gain(card,'gain2'); }, }, - //刘永 - zhuning:{ - audio:2, - enable:'phaseUse', - usable:2, - filter:function(event,player){ - if(!player.countCards('he')) return false; - return (!player.getStat('skill').zhuning||player.hasSkill('zhuning_double')); - }, - filterCard:true, - position:'he', - filterTarget:lib.filter.notMe, - selectCard:[1,Infinity], - delay:false, - lose:false, - discard:false, - check:function(card){ - 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(ui.selected.cards.length>=Math.max(1,player.countCards('h')-player.hp)) return 0; - return 10-get.value(card); - }, - content:function(){ - 'step 0' - player.give(cards,target).gaintag.add('fengxiang_tag'); - 'step 1' - var list=[]; - for(var name of lib.inpile){ - var type=get.type(name); - if(type!='basic'&&type!='trick') continue; - var card={name:name,isCard:true}; - if(get.tag(card,'damage')>0&&player.hasUseTarget(card)){ - list.push([type,'',name]); - } - if(name=='sha'){ - for(var i of lib.inpile_nature){ - card.nature=i; - if(player.hasUseTarget(card)) list.push([type,'',name,i]); - } - } - } - if(list.length){ - player.chooseButton(['是否视为使用一张伤害牌?',[list,'vcard']]).set('ai',function(button){ - return _status.event.player.getUseValue({name:button.link[2]}); - }); - } - else event.finish(); - 'step 2' - if(result.bool){ - player.chooseUseTarget({name:result.links[0][2],nature:result.links[0][3],isCard:true},true,false); - } - else event.finish(); - 'step 3' - if(!player.hasHistory('sourceDamage',function(evt){ - if(!evt.card) return false; - var evtx=evt.getParent('useCard'); - return evtx.card==evt.card&&evtx.getParent(2)==event; - })) player.addTempSkill('zhuning_double'); - }, - subSkill:{ - double:{}, - }, - ai:{ - fireAttack:true, - order:4, - result:{ - target:function(player,target){ - if(target.hasSkillTag('nogain')) return 0; - if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ - if(target.hasSkillTag('nodu')) return 0; - 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.rerende<0||player.countCards('h')<=1){ - if(nh>=np-1&&np<=player.hp&&!target.hasSkill('haoshi')) return 0; - } - return Math.max(1,5-nh); - } - }, - } - }, - fengxiang:{ - getMax:function(event){ - var max=0,max2=null,players=game.filterPlayer(); - for(var current of players){ - var num=0,cards=current.getCards('h',function(card){ - return card.hasGaintag('fengxiang_tag'); - }); - if(event){ - if(event.name=='gain'&&event.gaintag.contains('fengxiang_tag')) cards.removeArray(event.cards); - var evt=event.getl(current); - if(evt&&evt.gaintag_map){ - for(var i in evt.gaintag_map){ - if(evt.gaintag_map[i].contains('fengxiang_tag')) num++; - } - } - } - num+=cards.length; - if(num>max){ - max=num; - max2=current; - } - else if(num==max) max2=null; - } - return max2; - }, - audio:2, - trigger:{player:'damageEnd'}, - forced:true, - filter:function(event,player){ - var target=lib.skill.fengxiang.getMax(); - return !target||target.isDamaged(); - }, - logTarget:function(event,player){ - return lib.skill.fengxiang.getMax()||player; - }, - content:function(){ - var target=lib.skill.fengxiang.getMax(); - if(target) target.recover(); - else player.draw(); - }, - group:'fengxiang_draw', - subSkill:{ - draw:{ - trigger:{ - global:['equipAfter','addJudgeAfter','loseAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], - }, - forced:true, - filter:function(event,player){ - if(event.name=='lose'&&event.getlx===false) return false; - return lib.skill.fengxiang.getMax()!=lib.skill.fengxiang.getMax(event); - }, - content:function(){ - if(trigger.delay===false) game.delayx(); - player.draw(); - }, - }, - }, - }, //童渊 chaofeng:{ audio:2, @@ -18768,46 +3431,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(card) target.discard(card); }, }, - //阚泽 - rekuanshi:{ - audio:'kuanshi', - trigger:{player:'phaseJieshuBegin'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('rekuanshi')).set('animate',false).set('ai',function(target){ - var att=get.attitude(player,target); - if(target.hp<3) att/=1.5; - return att; - }); - 'step 1' - if(result.bool){ - player.logSkill('rekuanshi'); - player.addTempSkill('rekuanshi_effect',{player:'phaseBegin'}); - player.storage.rekuanshi_effect=result.targets[0]; - game.delayx(); - } - }, - subSkill:{ - effect:{ - audio:'kuanshi', - trigger:{global:'damageEnd'}, - forced:true, - charlotte:true, - logTarget:'player', - usable:1, - filter:function(event,player){ - if(event.player!=player.storage.rekuanshi_effect||event.player.isHealthy()) return false; - var history=event.player.getHistory('damage',null,event),num=0; - for(var i of history) num+=i.num; - return num>1&&(num-event.num)<2; - }, - content:function(){ - trigger.player.recover(); - } - }, - }, - }, //南华老仙 jinghe:{ enable:'phaseUse', @@ -19093,255 +3716,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, - //周夷 - zhukou:{ - audio:2, - trigger:{source:'damageSource'}, - filter:function(event,player){ - if(!player.getHistory('useCard').length) return false; - var evt=event.getParent('phaseUse'); - if(!evt||!evt.player) return false; - return player.getHistory('sourceDamage',function(evtx){ - return evtx.getParent('phaseUse')==evt; - }).indexOf(event)==0; - }, - frequent:true, - content:function(){ - player.draw(player.getHistory('useCard').length); - }, - group:'zhukou_all', - subSkill:{ - all:{ - audio:'zhukou', - trigger:{player:'phaseJieshuBegin'}, - filter:function(event,player){ - return game.countPlayer((current)=>(current!=player))>1&&!player.getHistory('sourceDamage').length; - }, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('zhukou'),'对两名其他角色各造成1点伤害',2,lib.filter.notMe).set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player); - }); - 'step 1' - if(result.bool){ - var targets=result.targets.sortBySeat(); - player.logSkill('zhukou',targets); - for(var i of targets) i.damage(); - } - }, - }, - }, - }, - mengqing:{ - trigger:{player:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - return game.countPlayer((current)=>current.isDamaged())>player.hp; - }, - juexingji:true, - skillAnimation:true, - animationColor:'wood', - content:function(){ - player.awakenSkill('mengqing'); - player.gainMaxHp(3); - player.recover(3); - player.removeSkill('zhukou'); - player.addSkill('yuyun'); - }, - derivation:'yuyun', - }, - yuyun:{ - trigger:{player:'phaseUseBegin'}, - forced:true, - filter:function(event,player){ - return player.hp>0||player.maxHp>1; - }, - content:function(){ - 'step 0' - if(player.maxHp<=1) event._result={control:'失去体力',index:0}; - else if(player.hp<1) event._result={control:'减体力上限',index:1}; - else player.chooseControl('失去体力','减体力上限').set('prompt','玉陨:失去1点体力或减1点体力上限').set('ai',function(){ - var player=_status.event.player; - if(player.hp<2||player.getDamagedHp()>2) return 1; - return 0; - }); - 'step 1' - if(result.index==1) player.loseMaxHp(); - else player.loseHp(); - 'step 2' - event.videoId=lib.status.videoId++; - var func=function(player,id){ - var list=[ - '选项一:摸两张牌', - '选项二:对一名其他角色造成1点伤害,且本回合对其使用【杀】无距离和次数限制', - '选项三:本回合手牌上限视为无限', - '选项四:获得一名其他角色区域内的一张牌', - '选项五:令一名其他角色将手牌数摸至体力上限(至多摸至五张)', - ]; - var choiceList=ui.create.dialog('玉陨:请选择一'+(player.getDamagedHp()>0?('至'+get.cnNumber(player.getDamagedHp()+1)):'')+'项'); - choiceList.videoId=id; - for(var i=0;ilib.filter.canBeGained(card,current,player),'hej'); - }).map(function(target){ - return get.effect(target,{name:'shunshou_copy'},player,player); - })); - break; - case 4: - var num=0; - game.countPlayer(function(current){ - if(current!=player&&get.attitude(player,current)>0){ - var num2=Math.min(5,current.maxHp)-current.countCards('h'); - if(num2>num) num=num2; - } - }); - return num*0.8; - break; - } - }); - if(player.getDamagedHp()>0) next.set('selectButton',[1,1+player.getDamagedHp()]); - 'step 3' - if(player.isOnline2()){ - player.send('closeDialog',event.videoId); - } - event.dialog.close(); - result.links.sort(); - for(var i of result.links) game.log(player,'选择了','#g【玉陨】','的','#y选项'+get.cnNumber(1+i,true)) - event.links=result.links; - if(result.links.contains(0)) player.draw(2); - if(result.links.contains(2)) player.addTempSkill('yuyun_114514'); - 'step 4' - if(event.links.contains(1)&&game.hasPlayer(function(current){ - return current!=player; - })) player.chooseTarget(lib.filter.notMe,true,'对一名其他角色造成1点伤害').set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player); - }); - else if(event.links.contains(3)) event.goto(6); - else if(event.links.contains(4)) event.goto(8); - else event.finish(); - 'step 5' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'green'); - target.damage(); - player.markAuto('yuyun_sha',[target]); - player.addTempSkill('yuyun_sha'); - } - if(event.links.contains(3)) event.goto(6); - else if(event.links.contains(4)) event.goto(8); - else event.finish(); - 'step 6' - if(event.links.contains(3)&&game.hasPlayer(function(current){ - return current!=player&¤t.hasCard((card)=>lib.filter.canBeGained(card,current,player),'hej'); - })){ - player.chooseTarget(true,'获得一名其他角色区域内的一张牌',function(card,player,current){ - return current!=player&¤t.hasCard((card)=>lib.filter.canBeGained(card,current,player),'hej'); - }).set('ai',function(target){ - var player=_status.event.player; - return get.effect(target,{name:'shunshou_copy'},player,player); - }); - } - else if(event.links.contains(4)) event.goto(8); - else event.finish(); - 'step 7' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'green'); - player.gainPlayerCard(target,'hej',true); - } - if(!event.links.contains(4)) event.finish(); - 'step 8' - if(event.links.contains(4)&&game.hasPlayer(function(current){ - return current!=player&¤t.countCards('h')2){ - return Math.min(5,target.maxHp)-target.countCards('h'); - } - return att/3; - }); - } - else event.finish(); - 'step 9' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'green'); - target.drawTo(Math.min(5,target.maxHp)); - } - }, - subSkill:{ - '114514':{ - mod:{ - maxHandcardFinal:function(player,num){ - return 114514; - }, - }, - charlotte:true, - }, - sha:{ - mod:{ - cardUsableTarget:function(card,player,target){ - if(card.name=='sha'&&player.getStorage('yuyun_sha').contains(target)) return Infinity; - }, - targetInRange:function(card,player,target){ - if(card.name=='sha'&&player.getStorage('yuyun_sha').contains(target)) return true; - }, - }, - charlotte:true, - onremove:true, - }, - }, - }, //樊稠 xinxingluan:{ audio:'xinfu_xingluan', @@ -19524,115 +3898,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, - //吕玲绮 - guowu:{ - trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ - return player.countCards('h')>0; - }, - preHidden:true, - content:function(){ - 'step 0' - var hs=player.getCards('h'); - player.showCards(hs,get.translation(player)+'发动了【帼舞】'); - var list=[]; - for(var i of hs){ - list.add(get.type2(i,player)); - if(list.length>=3) break; - } - if(list.length>=1){ - var card=get.discardPile(function(i){ - return i.name=='sha'; - }); - if(card) player.gain(card,'gain2'); - } - if(list.length>=2) player.addTempSkill('guowu_dist','phaseUseAfter'); - if(list.length>=3) player.addTempSkill('guowu_add','phaseUseAfter'); - }, - subSkill:{ - dist:{ - charlotte:true, - mod:{targetInRange:()=>true}, - }, - add:{ - charlotte:true, - trigger:{player:'useCard1'}, - direct:true, - filter:function(event,player){ - var info=get.info(event.card,false); - if(info.allowMultiple==false) return false; - if(event.card.name!='sha'&&(info.type!='trick'||get.mode()=='guozhan')) return false; - if(event.targets&&!info.multitarget){ - if(game.hasPlayer(function(current){ - return !event.targets.contains(current)&&lib.filter.targetEnabled2(event.card,player,current)&&lib.filter.targetInRange(event.card,player,current); - })){ - return true; - } - } - return false; - }, - content:function(){ - 'step 0' - var num=game.countPlayer(function(current){ - return !trigger.targets.contains(current)&&lib.filter.targetEnabled2(trigger.card,player,current)&&lib.filter.targetInRange(trigger.card,player,current); - }); - player.chooseTarget('帼舞:是否为'+get.translation(trigger.card)+'增加'+(num>1?'至多两个':'一个')+'目标?',[1,Math.min(2,num)],function(card,player,target){ - var trigger=_status.event.getTrigger(); - var card=trigger.card; - return !trigger.targets.contains(target)&&lib.filter.targetEnabled2(card,player,target)&&lib.filter.targetInRange(card,player,target); - }).set('ai',function(target){ - var player=_status.event.player; - var card=_status.event.getTrigger().card; - return get.effect(target,card,player,player); - }); - 'step 1' - if(result.bool){ - if(player!=game.me&&!player.isOnline()) game.delayx(); - } - else event.finish(); - 'step 2' - var targets=result.targets.sortBySeat(); - player.logSkill('guowu_add',targets); - trigger.targets.addArray(targets); - //if(get.mode()=='guozhan') player.removeSkill('guowu_add'); - }, - }, - }, - }, - zhuangrong:{ - derivation:['llqshenwei','wushuang'], - trigger:{global:'phaseEnd'}, - forced:true, - juexingji:true, - skillAnimation:true, - animationColor:'gray', - filter:function(event,player){ - return player.hp==1||player.countCards('h')==1; - }, - content:function(){ - 'step 0' - player.awakenSkill('zhuangrong'); - player.loseMaxHp(); - 'step 1' - if(player.maxHp>player.hp) player.recover(player.maxHp-player.hp); - 'step 2' - player.drawTo(Math.min(5,player.maxHp)); - player.addSkillLog('llqshenwei'); - player.addSkillLog('wushuang'); - }, - }, - llqshenwei:{ - audio:2, - trigger:{player:'phaseDrawBegin2'}, - forced:true, - filter:(event)=>!event.numFixed, - content:function(){ - trigger.num+=2; - }, - mod:{ - maxHandcard:(player,num)=>num+2, - }, - }, //杜夫人 yise:{ audio:2, @@ -19804,137 +4069,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - cuijian:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return game.hasPlayer((current)=>lib.skill.cuijian.filterTarget(null,player,current)); - }, - filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; - }, - content:function(){ - 'step 0' - var hs=target.getCards('h','shan'); - if(hs.length){ - hs.addArray(target.getCards('he',function(card){ - return get.subtype(card)=='equip2'; - })) - player.gain(hs,target,'give','bySelf'); - if(player.hasMark('zhtongyuan_basic')) event.finish(); - else event.num=hs.length; - } - else{ - if(player.hasMark('zhtongyuan_trick')) player.draw(2); - event.finish(); - } - 'step 1' - var hs=player.getCards('he'); - if(!hs.length||!target.isIn()) event.finish(); - else if(hs.length<=num) event._result={bool:true,cards:hs}; - else player.chooseCard('he',true,'选择交给'+get.translation(target)+get.cnNumber(num)+'张牌',num); - 'step 2' - if(result.bool&&result.cards&&result.cards.length) player.give(result.cards,target); - }, - ai:{ - order:4, - result:{ - player:function(player,target){ - if(!target.countCards('h','shan')) return player.hasMark('zhtongyuan_trick')?2:0; - return 0; - }, - target:function(player,target){ - if(target.countCards('h','shan')){ - var num=-target.countCards('h')/2; - var card=target.getEquip(2); - if(card) num-=(get.value(card,target)/2); - return num; - } - return -0.01; - }, - }, - }, - }, - tongyuan:{audio:2}, - zhtongyuan:{ - audio:'tongyuan', - trigger:{player:['useCardAfter','respondAfter']}, - forced:true, - filter:function(event,player){ - var type=get.type2(event.card,false); - return (type=='basic'||type=='trick')&&get.color(event.card,false)=='red'&&!player.hasMark('zhtongyuan_'+type); - }, - content:function(){ - var type=get.type2(trigger.card,false); - if(!player.hasMark('zhtongyuan_'+type)){ - player.addMark('zhtongyuan_'+type,1,false); - game.log(player,'修改了技能','#g【摧坚】'); - } - }, - group:['zhtongyuan_basic','zhtongyuan_trick'], - subSkill:{ - basic:{ - trigger:{player:'useCard2'}, - direct:true, - locked:true, - filter:function(event,player){ - if(!player.hasMark('zhtongyuan_basic')||!player.hasMark('zhtongyuan_trick')) return false; - var card=event.card; - if(get.color(card,false)!='red'||get.type(card,null,true)!='basic') return false; - var info=get.info(card); - if(info.allowMultiple==false) return false; - if(event.targets&&!info.multitarget){ - if(game.hasPlayer(function(current){ - return !event.targets.contains(current)&&lib.filter.targetEnabled2(card,player,current); - })){ - return true; - } - } - return false; - }, - content:function(){ - 'step 0' - var prompt2='为'+get.translation(trigger.card)+'增加一个目标' - player.chooseTarget(get.prompt('zhtongyuan'),function(card,player,target){ - var player=_status.event.player; - return !_status.event.targets.contains(target)&&lib.filter.targetEnabled2(_status.event.card,player,target); - }).set('prompt2',prompt2).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player); - }).set('card',trigger.card).set('targets',trigger.targets); - 'step 1' - if(result.bool){ - if(!event.isMine()&&!event.isOnline()) game.delayx(); - event.targets=result.targets; - } - else{ - event.finish(); - } - 'step 2' - if(event.targets){ - player.logSkill('zhtongyuan',event.targets); - trigger.targets.addArray(event.targets); - } - }, - }, - trick:{ - audio:'zhtongyuan', - trigger:{player:'useCard'}, - forced:true, - filter:function(event,player){ - if(!player.hasMark('zhtongyuan_basic')||!player.hasMark('zhtongyuan_trick')) return false; - var card=event.card; - return (get.color(card,false)=='red'&&get.type(card,null,false)=='trick'); - }, - content:function(){ - trigger.directHit.addArray(game.filterPlayer()); - game.log(trigger.card,'不可被响应'); - }, - }, - }, - }, xianwei:{ audio:2, trigger:{player:'phaseZhunbeiBegin'}, @@ -20017,132 +4151,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - zhiren:{ - audio:2, - trigger:{player:'useCard'}, - filter:function(event,player){ - return (player==_status.currentPhase||player.hasSkill('yaner_zhiren'))&&event.card.isCard&&player.getHistory('useCard',function(evt){ - return evt.card.isCard; - }).indexOf(event)==0; - }, - frequent:true, - locked:false, - content:function(){ - 'step 0' - event.num=get.translation(trigger.card.name).length; - player.chooseToGuanxing(event.num); - if(event.num<2) event.finish(); - 'step 1' - if(!game.hasPlayer(function(current){ - return current.countDiscardableCards(player,'e')>0; - })){ - event.goto(3); - } - else player.chooseTarget('织纴:是否弃置一名角色装备区内的一张牌?',function(card,player,target){ - return target.countDiscardableCards(player,'e')>0; - }).set('ai',function(target){ - var player=_status.event.player,att=get.attitude(player,target),es=target.getCards('e'),val=0; - for(var i of es){ - var eff=-(get.value(i,target)-0.1)*att; - if(eff>val) val=eff; - } - return eff; - }); - 'step 2' - if(result.bool){ - var target=result.targets[0]; - player.addExpose(0.15); - player.line(target,'green'); - player.discardPlayerCard(target,'e',true); - } - else event.goto(5); - if(event.num<3) event.finish(); - 'step 3' - if(!game.hasPlayer(function(current){ - return current.countDiscardableCards(player,'j')>0; - })){ - if(event.num<3) event.finish(); - else event.goto(5); - } - else player.chooseTarget('织纴:是否弃置一名角色判定区内的一张牌?',function(card,player,target){ - return target.countDiscardableCards(player,'j')>0; - }).set('ai',function(target){ - var player=_status.event.player,att=get.attitude(player,target),es=target.getCards('j'),val=0; - for(var i of es){ - var eff=-(get.effect(target,i,target,player)) - if(eff>val) val=eff; - } - return eff; - }); - 'step 4' - if(result.bool){ - var target=result.targets[0]; - player.addExpose(0.15); - player.line(target,'green'); - player.discardPlayerCard(target,'j',true); - } - if(event.num<3) event.finish(); - 'step 5' - player.recover(); - if(event.num<4) event.finish(); - 'step 6' - player.draw(3); - }, - mod:{ - aiOrder:function(player,card,num){ - if(player==_status.currentPhase&&!player.getHistory('useCard',function(evt){ - return evt.card.isCard; - }).length) return num+Math.pow(get.translation(card.name).length,2); - }, - }, - }, - yaner:{ - audio:2, - trigger:{ - global:['equipAfter','addJudgeAfter','loseAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], - }, - filter:function(event,player){ - var current=_status.currentPhase; - if(!current||current==player||!current.isIn()||!current.isPhaseUsing()) return false; - var evt=event.getl(current); - return evt&&evt.hs&&evt.hs.length&¤t.countCards('h')==0; - }, - usable:1, - logTarget:function(){ - return _status.currentPhase; - }, - prompt2:'与该角色各摸两张牌', - check:function(event,player){ - return get.attitude(player,_status.currentPhase)>0; - }, - content:function(){ - 'step 0' - game.asyncDraw([_status.currentPhase,player],2); - 'step 1' - var e1=player.getHistory('gain',function(evt){ - return evt.getParent(2)==event; - })[0]; - if(e1&&e1.cards&&e1.cards.length==2&&get.type(e1.cards[0])==get.type(e1.cards[1])){ - player.addTempSkill('yaner_zhiren',{player:'phaseBegin'}); - game.log(player,'修改了技能','#g【织纴】'); - } - var target=_status.currentPhase; - if(target.isIn()&&target.isDamaged()){ - var e2=target.getHistory('gain',function(evt){ - return evt.getParent(2)==event; - })[0]; - if(e2&&e2.cards&&e2.cards.length==2&&get.type(e2.cards[0])==get.type(e2.cards[1])) target.recover(); - } - 'step 2' - game.delayx(); - }, - subSkill:{ - zhiren:{charlotte:true}, - }, - ai:{ - expose:0.5, - }, - }, rehuoshui:{ audio:2, trigger:{player:'phaseZhunbeiBegin'}, @@ -20213,476 +4221,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //陆郁生 - zhente:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - logTarget:'player', - usable:1, - preHidden:true, - filter:function(event,player){ - var color=get.color(event.card); - if(player==event.player||event.player.isDead()||color=='none'||(get.mode()=='guozhan'&&color!='black')) return false; - var type=get.type(event.card); - return type=='basic'||type=='trick'; - }, - check:function(event,player){ - return !event.excluded.contains(player)&&get.effect(player,event.card,event.player,player)<0; - }, - content:function(){ - 'step 0' - trigger.player.chooseControl().set('choiceList',[ - '本回合内不能再使用'+get.translation(get.color(trigger.card))+'牌', - '令'+get.translation(trigger.card)+'对'+get.translation(player)+'无效', - ]).set('prompt',get.translation(player)+'发动了【贞特】,请选择一项').set('ai',function(){ - var player=_status.event.player; - var target=_status.event.getParent().player; - var card=_status.event.getTrigger().card,color=get.color(card); - if(get.effect(target,card,player,player)<=0) return 1; - var hs=player.countCards('h',function(card){ - return get.color(card,player)==color&&player.hasValueTarget(card,null,true); - }); - if(!hs.length) return 0; - if(hs>1) return 1; - return Math.random()>0.5?0:1; - }); - 'step 1' - if(result.index==0){ - trigger.player.addTempSkill('zhente2'); - trigger.player.storage.zhente2.add(get.color(trigger.card)); - trigger.player.markSkill('zhente2'); - } - else trigger.excluded.add(player); - }, - }, - zhente2:{ - mod:{ - cardEnabled:function(card,player){ - if(player.getStorage('zhente2').contains(get.color(card))) return false; - }, - cardSavable:function(card,player){ - if(player.getStorage('zhente2').contains(get.color(card))) return false; - }, - }, - charlotte:true, - onremove:true, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=[]; - }, - intro:{content:'本回合内不能使用$牌'}, - }, - zhiwei:{ - audio:2, - trigger:{ - player:['enterGame','showCharacterAfter','phaseBegin'], - global:['phaseBefore'], - }, - direct:true, - filter:function(event,player,name){ - if(player.hasSkill('zhiwei2')) return false; - if(get.mode()=='guozhan') return event.name=='showCharacter'&&(event.toShow.contains('gz_luyusheng')||event.toShow.contains('luyusheng')); - return event.name!='showCharacter'&&(name!='phaseBefore'||game.phaseNumber==0); - }, - content:function(){ - 'step 0' - player.chooseTarget('请选择【至微】的目标','选择一名其他角色。该角色造成伤害后,你摸一张牌,该角色受到伤害后,你随机弃置一张手牌。你弃牌阶段弃置的牌均被该角色获得。',true,lib.filter.notMe).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(att>0) return 1+att; - return Math.random(); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('zhiwei',target); - player.storage.zhiwei2=target; - player.addSkill('zhiwei2'); - } - }, - }, - zhiwei2:{ - group:['zhiwei2_draw','zhiwei2_discard','zhiwei2_gain','zhiwei2_clear'], - charlotte:true, - onremove:true, - mark:'character', - intro:{content:'$造成伤害后你摸一张牌;$受到伤害后你弃置一张牌;你于弃牌阶段弃置牌后交给$'}, - subSkill:{ - draw:{ - audio:'zhiwei', - trigger:{global:'damageSource'}, - forced:true, - filter:function(event,player){ - return event.source==player.storage.zhiwei2; - }, - logTarget:'source', - content:function(){ - player.draw(); - }, - }, - discard:{ - audio:'zhiwei', - trigger:{global:'damageEnd'}, - forced:true, - filter:function(event,player){ - return event.player==player.storage.zhiwei2&&player.countCards('h',function(card){ - return lib.filter.cardDiscardable(card,player,'zhiwei2_discard'); - }); - }, - logTarget:'player', - content:function(){ - player.discard(player.getCards('h',function(card){ - return lib.filter.cardDiscardable(card,player,'zhiwei2_discard'); - }).randomGet()); - }, - }, - gain:{ - audio:'zhiwei', - trigger:{ - player:'loseAfter', - global:'loseAsyncAfter', - }, - forced:true, - filter:function(event,player){ - if(event.type!='discard'||event.getlx===false||event.getParent('phaseDiscard').player!=player||!player.storage.zhiwei2||!player.storage.zhiwei2.isIn()) return false; - var evt=event.getl(player); - return evt&&evt.cards2.filterInD('d').length>0; - }, - logTarget:function(event,player){ - return player.storage.zhiwei2; - }, - content:function(){ - if(trigger.delay===false) game.delay(); - player.storage.zhiwei2.gain(trigger.getl(player).cards2.filterInD('d'),'gain2'); - }, - }, - clear:{ - audio:'zhiwei', - trigger:{ - global:'die', - player:['hideCharacterEnd','removeCharacterEnd'], - }, - forced:true, - filter:function(event,player){ - if(event.name=='die') return event.player==player.storage.zhiwei2; - if(event.name=='removeCharacter') return event.toRemove=='luyusheng'||event.toRemove=='gz_luyusheng'; - return event.toHide=='luyusheng'||event.toHide=='gz_luyusheng'; - }, - content:function(){ - 'step 0' - player.removeSkill('zhiwei2'); - if(trigger.name!='die'||get.mode()!='guozhan') event.finish(); - 'step 1' - if(player.name1=='gz_luyusheng'||player.name1=='luyusheng') player.hideCharacter(0); - if(player.name2=='gz_luyusheng'||player.name2=='luyusheng') player.hideCharacter(1); - }, - }, - }, - }, - //华歆 - spwanggui:{ - audio:'wanggui', - trigger:{source:'damageSource'}, - direct:true, - usable:1, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current.group!=player.group; - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('spwanggui'),'对一名势力不同的其他角色造成1点伤害',function(card,player,target){ - return target.group!=player.group; - }).set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('spwanggui',target); - target.damage(); - } - else player.storage.counttrigger.spwanggui--; - }, - group:'spwanggui_draw', - subSkill:{ - draw:{ - trigger:{player:'damageEnd'}, - direct:true, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('spwanggui'),'令自己摸一张牌,或和一名势力相同的其他角色各摸一张牌',function(card,player,target){ - return target.group==player.group; - }).set('ai',function(target){ - var player=_status.event.player,att=get.attitude(player,target); - if(target!=player) att*=2; - if(target.hasSkillTag('nogain')) att/=1.7; - return att; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('spwanggui',target); - if(player==target){ - player.draw(); - event.finish(); - } - else{ - var list=[player,target].sortBySeat(); - game.asyncDraw(list); - } - } - else event.finish(); - 'step 2' - game.delayx(); - }, - }, - }, - }, - wanggui:{ - audio:2, - trigger:{ - player:'damageEnd', - source:'damageSource', - }, - direct:true, - filter:function(event,player){ - return player.hasSkill('wanggui')&&!player.hasSkill('wanggui2'); - }, - preHidden:true, - content:function(){ - 'step 0' - player.addTempSkill('wanggui2'); - var bool=player.isUnseen(2); - if(bool){ - player.chooseTarget('望归:是否对一名势力不同的角色造成1点伤害?',function(card,player,target){ - return target.isEnemyOf(player); - }).set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player); - }).setHiddenSkill('wanggui'); - } - else event.goto(2); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('wanggui',target); - target.damage(); - } - event.finish(); - 'step 2' - player.chooseBool('望归:是否令所有与自己势力相同的角色各摸一张牌?').setHiddenSkill('wanggui'); - 'step 3' - if(result.bool){ - var targets=game.filterPlayer(function(current){ - return current.isFriendOf(player); - }); - targets.sortBySeat(); - player.logSkill('wanggui',targets); - game.asyncDraw(targets); - } - else event.finish(); - 'step 4' - game.delayx(); - }, - }, - wanggui2:{}, - xibing:{ - audio:2, - trigger:{global:'useCardToPlayered'}, - filter:function(event,player){ - if(player==event.player||event.targets.length!=1||event.player.countCards('h')>=event.player.hp) return false; - var bool=function(card){ - return (card.name=='sha'||get.type(card,false)=='trick')&&get.color(card,false)=='black'; - }; - if(!bool(event.card)) return false; - var evt=event.getParent('phaseUse'); - if(evt.player!=event.player) return false; - return get.mode()!='guozhan'||event.player.getHistory('useCard',function(evtx){ - return bool(evtx.card)&&evtx.getParent('phaseUse')==evt; - })[0]==event.getParent(); - }, - logTarget:'player', - check:function(event,player){ - var target=event.player; - var att=get.attitude(player,target); - var num2=Math.min(5,target.hp-target.countCards('h')); - if(num2<=0) return att<=0; - var num=target.countCards('h',function(card){ - return target.hasValueTarget(card,null,true); - }); - if(!num) return att>0; - return num>num2; - }, - preHidden:true, - content:function(){ - 'step 0' - var num=Math.min(5,trigger.player.hp-trigger.player.countCards('h')); - if(num>0) trigger.player.draw(num); - 'step 1' - trigger.player.addTempSkill('xibing2'); - player._xibing=true; - if(get.mode()!='guozhan'||player.isUnseen(2)||trigger.player.isUnseen(2)) event.finish(); - 'step 2' - var target=trigger.player; - var players1=[player.name1,player.name2]; - var players2=[target.name1,target.name2]; - player.chooseButton(2,[ - '是否暗置自己和'+get.translation(target)+'的各一张武将牌?', - '
    你的武将牌
    ', - [players1,'character'], - '
    '+get.translation(target)+'的武将牌
    ', - [players2,'character'], - ]).set('players',players1).set('complexSelect',true).set('filterButton',function(button){ - return !get.is.jun(button.link)&&(ui.selected.buttons.length==0)==(_status.event.players.contains(button.link)); - }); - 'step 3' - if(result.bool){ - var target=trigger.player; - player.hideCharacter(player.name1==result.links[0]?0:1); - target.hideCharacter(target.name1==result.links[1]?0:1); - player.addTempSkill('xibing3'); - target.addTempSkill('xibing3'); - } - }, - }, - xibing2:{ - mod:{ - cardEnabled2:function(card){ - if(get.position(card)=='h') return false; - }, - }, - }, - xibing3:{ - ai:{nomingzhi:true}, - }, - //董白 - relianzhu:{ - audio:'lianzhu', - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return player.countCards('he')>0; - }, - filterCard:true, - discard:false, - lose:false, - delay:false, - position:'he', - filterTarget:lib.filter.notMe, - check:function(card){ - var num=get.value(card); - if(get.color(card)=='black'){ - if(num>=6) return 0; - return 9-num; - } - else{ - return 7-num; - } - }, - content:function(){ - 'step 0' - player.give(cards,target); - 'step 1' - if(get.color(cards[0],player)=='red'){ - player.draw(); - event.finish(); - } - else{ - target.chooseToDiscard('he',2,'弃置两张牌,或令'+get.translation(player)+'摸两张牌').set('goon',get.attitude(target,player)<0).set('ai',function(card){ - if(!_status.event.goon) return -get.value(card); - return 6-get.value(card); - }); - } - 'step 2' - if(!result.bool) player.draw(2); - }, - ai:{ - order:3, - expose:0.2, - result:{ - target:function(player,target){ - if(ui.selected.cards.length&&get.color(ui.selected.cards[0])=='red'){ - if(target.countCards('h')0; - }, - content:function(){ - trigger.player.loseHp(); - }, - group:'rexiahui_gain', - subSkill:{ - gain:{ - trigger:{global:'gainEnd'}, - forced:true, - popup:false, - filter:function(event,player){ - if(player==event.player) return false; - var evt=event.getl(player); - return evt&&evt.cards2&&evt.cards2.filter(function(card){ - return get.color(card,player)=='black'; - }).length>0; - }, - content:function(){ - trigger.player.addSkill('rexiahui_block'); - var cards=trigger.getl(player).cards2.filter(function(card){ - return get.color(card,player)=='black'; - }); - trigger.player.addGaintag(cards,'rexiahui'); - }, - }, - block:{ - mod:{ - cardEnabled2:function(card){ - if(get.itemtype(card)=='card'&&card.hasGaintag('rexiahui')) return false; - }, - cardDiscardable:function(card){ - if(card.hasGaintag('rexiahui')) return false; - }, - }, - charlotte:true, - forced:true, - popup:false, - trigger:{player:'changeHp'}, - filter:function(event,player){ - return event.num<0; - }, - content:function(){ - player.removeSkill('rexiahui_block'); - }, - onremove:function(player){ - player.removeGaintag('rexiahui'); - }, - }, - }, - }, //丘力居 koulve:{ audio:2, @@ -20755,178 +4293,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, - //何晏 - yachai:{ - audio:2, - trigger:{player:'damageEnd'}, - filter:function(event,player){ - return event.source&&event.source.isIn(); - }, - logTarget:'source', - check:function(event,player){ - return get.attitude(player,event.source)<0; - }, - content:function(){ - 'step 0' - var target=trigger.source,str=get.translation(player); - event.target=target; - var th=target.countCards('h'); - if(th>0){ - event.num=Math.ceil(th/2); - var list=[ - '本回合不能使用或打出手牌,然后'+str+'摸两张牌', - '展示所有手牌,并将其中一种花色的所有牌交给'+str, - '弃置'+get.cnNumber(event.num)+'张手牌', - ]; - target.chooseControl().set('choiceList',list).set('ai',function(){ - return get.rand(0,2); - }); - } - else event._result={index:0}; - 'step 1' - switch(result.index){ - case 0: - target.addTempSkill('yachai_block'); - player.draw(2); - event.finish(); - break; - case 1:target.showHandcards();break; - case 2:event.goto(4);break; - } - 'step 2' - var map={},hs=target.getCards('h'); - for(var i of hs){ - map[get.suit(i,target)]=true; - } - var list=[]; - for(var i of lib.suit){ - if(map[i]) list.push(i); - } - if(!list.length) event.finish(); - else if(list.length==1) event._result={control:list[0]}; - else target.chooseControl(list).set('prompt','将一种花色的牌交给'+get.translation(player)); - 'step 3' - var cards=target.getCards('h',function(card){ - return get.suit(card,target)==result.control&&lib.filter.cardDiscardable(card,target,'yachai'); - }); - if(cards.length) target.give(cards,player,'give'); - event.finish(); - 'step 4' - target.chooseToDiscard('h',true,num); - }, - subSkill:{ - block:{ - mark:true, - intro:{content:'不能使用或打出手牌'}, - charlotte:true, - mod:{ - cardEnabled2:function(card){ - if(get.position(card)=='h') return false; - }, - }, - }, - }, - }, - qingtan:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return game.hasPlayer((current)=>current.countCards('h')>0); - }, - filterTarget:function(card,player,target){ - return target.countCards('h')>0; - }, - selectTarget:-1, - multitarget:true, - multiline:true, - content:function(){ - 'step 0' - targets.sortBySeat(); - var next=player.chooseCardOL(targets,'请选择要展示的牌',true).set('ai',function(card){ - return -get.value(card); - }).set('source',player); - next.aiCard=function(target){ - var hs=target.getCards('h'); - return {bool:true,cards:[hs.randomGet()]}; - }; - next._args.remove('glow_result'); - 'step 1' - var cards=[]; - event.videoId=lib.status.videoId++; - for(var i=0;i'+get.translation(targetsx)+''); - dialog.push(map[suit]); - list.push(suit); - } - } - if(list.length){ - player.chooseControl(list,'cancel2').set('dialog',dialog); - } - else event.finish(); - 'step 3' - if(result.control!='cancel2'){ - event.cards2=cards.filter(function(i){ - return get.suit(i)==result.control; - }) - for(var i=0;i{ - var evtx4=evtx3.relatedEvent||evtx3.getParent(); - if(evtx2!=evtx4) return false; - if(!evtx3.cards2||!evtx3.cards2.length) return false; - cards2.addArray(evtx3.cards2.filterInD('d')); - }); - } - else if(event.name=='loseAsync'){ - player.hasHistory('lose',evt=>{ - if(evt.getParent()!=event||evt.position!=ui.discardPile) return false; - cards2.addArray(evt.cards2.filterInD('d')); - }); - } - else{ - cards2.addArray(event.getd(player).filterInD('d')); - } - return '获得与'+get.translation(cards2)+'花色'+(cards2.length>1?'各':'')+'不相同的牌各一张'; - }, - filter:function(event,player){ - if(player!=_status.currentPhase) return false; - var cards2=[]; - if(event.name=='cardsDiscard'){ - var evtx=event.getParent(); - if(evtx.name!='orderingDiscard') return false; - var evtx2=(evtx.relatedEvent||evtx.getParent()); - if(evtx2.name=='useCard'||evtx2.name=='respond') return false; - player.getHistory('lose',evtx3=>{ - var evtx4=evtx3.relatedEvent||evtx3.getParent(); - if(evtx2!=evtx4) return false; - if(!evtx3.cards2||!evtx3.cards2.length) return false; - cards2.addArray(evtx3.cards2.filterInD('d')); - }); - } - else if(event.name=='loseAsync'){ - player.hasHistory('lose',evt=>{ - if(evt.getParent()!=event||evt.position!=ui.discardPile) return false; - cards2.addArray(evt.cards2.filterInD('d')); - }); - } - else{ - cards2.addArray(event.getd(player).filterInD('d')); - } - if(!cards2.length) return false; - var list=[]; - for(var i of cards2){ - list.add(get.suit(i,player)); - if(list.length>=lib.suit.length) return false; - } - var evt=event.getParent('phaseUse'); - if(evt&&evt.player==player&&!evt.youyaned) return true; - var evt=event.getParent('phaseDiscard'); - if(evt&&evt.player==player&&!evt.youyaned) return true; - return false; - }, - content:function(){ - var evt=trigger.getParent('phaseUse'); - if(evt&&evt.player==player) evt.youyaned=true; - else{ - var evt=trigger.getParent('phaseDiscard'); - if(evt) evt.youyaned=true; - } - var list=[],cards=[]; - var cards2=[]; - if(trigger.name=='cardsDiscard'){ - var evtx=trigger.getParent(); - if(evtx.name!='orderingDiscard') return false; - var evtx2=(evtx.relatedEvent||evtx.getParent()); - if(evtx2.name=='useCard'||evtx2.name=='respond') return false; - player.getHistory('lose',evtx3=>{ - var evtx4=evtx3.relatedEvent||evtx3.getParent(); - if(evtx2!=evtx4) return false; - if(!evtx3.cards2||!evtx3.cards2.length) return false; - cards2.addArray(evtx3.cards2.filterInD('d')); - }); - } - else if(trigger.name=='loseAsync'){ - player.hasHistory('lose',evt=>{ - if(evt.getParent()!=trigger||evt.position!=ui.discardPile) return false; - cards2.addArray(evt.cards2.filterInD('d')); - }); - } - else{ - cards2.addArray(trigger.getd(player).filterInD('d')); - } - for(var i of cards2){ - list.add(get.suit(i,player)); - } - for(var i of lib.suit){ - if(list.contains(i)) continue; - var card=get.cardPile2(function(card){ - return get.suit(card,false)==i; - }) - if(card) cards.push(card); - } - if(cards.length) player.gain(cards,'gain2'); - }, - ai:{ - effect:{ - player_use:function(card,player,target){ - if(typeof card=='object'&&player==_status.currentPhase&& - //(!player.storage.counttrigger||!player.storage.counttrigger.youyan)&& - player.needsToDiscard()==1&&card.cards&&card.cards.filter(function(i){ - return get.position(i)=='h'; - }).length>0&&!get.tag(card,'draw')&&!get.tag(card,'gain')&&!get.tag(card,'discard')) return 'zeroplayertarget'; - }, - }, - }, - }, - zhuihuan:{ - audio:2, - trigger:{player:'phaseJieshuBegin'}, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return !current.hasSkill('zhuihuan2_new'); - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt('zhuihuan'),'令一名角色获得“追还”效果',function(card,player,target){ - return !target.hasSkill('zhuihuan2_new'); - }).set('ai',function(target){ - var player=_status.event.player,att=get.attitude(player,target); - if(target.hasSkill('maixie')||target.hasSkill('maixie_defend')) att/=3; - if(target!=player) att/=Math.pow(game.players.length-get.distance(player,target,'absolute'),0.7); - return att; - }).set('animate',false); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('zhuihuan'); - target.addTempSkill('zhuihuan2_new',{player:'phaseZhunbei'}); - game.delayx(); - } - }, - }, - zhuihuan2_new:{ - trigger:{player:'phaseZhunbeiBegin'}, - charlotte:true, - forced:true, - onremove:true, - filter:function(event,player){ - if(player.storage.zhuihuan2_new){ - for(var source of player.storage.zhuihuan2_new){ - if(!source.isIn()) continue; - if(source.hp>player.hp) return true; - return source.countCards('h')>0; - } - } - }, - logTarget:function(event,player){ - return player.storage.zhuihuan2_new.filter(function(target){ - return target.isIn(); - }); - }, - content:function(){ - 'step 0' - event.targets=player.storage.zhuihuan2_new; - player.removeSkill('zhuihuan2_new'); - 'step 1' - var target=targets.shift(); - if(target.isIn()){ - if(target.hp>player.hp) target.damage(2); - else{ - var hs=target.getCards('h'); - if(hs.length) target.discard(hs.randomGets(2)); - } - } - if(targets.length) event.redo(); - }, - group:'zhuihuan2_new_count', - subSkill:{ - count:{ - trigger:{player:'damage'}, - forced:true, - silent:true, - popup:false, - charlotte:true, - filter:function(event,player){ - return get.itemtype(event.source)=='player'; - }, - content:function(){ - player.markAuto('zhuihuan2_new',[trigger.source]); - }, - }, - }, - }, - zhuihuan2:{ - trigger:{player:'damageEnd'}, - forced:true, - charlotte:true, - logTarget:'source', - filter:function(event,player){ - var source=event.source; - if(source.hp>player.hp) return true; - return source.countCards('h')>0; - }, - content:function(){ - if(player.hpplayer.getCardUsable({name:'sha'})) return 10; - return -player.getUseValue(button,player); - }; - while(cards.length<3){ - canchoose.sort(function(a,b){ - return getv(b)-getv(a); - }); - cards.push(canchoose.shift()); - } - return [cards,canchoose]; - }) - 'step 1' - if(result.bool){ - event.forceDie=true; - var cards=result.moved[0]; - event.cards=cards; - player.storage.xingzuo2=cards; - var hs=player.getCards('h'); - var lose=[],gain=event.cards2; - for(var i of cards){ - if(hs.contains(i)) lose.push(i); - else gain.remove(i); - } - if(lose.length) player.lose(lose,ui.cardPile); - if(gain.length) player.gain(gain,'draw'); - } - else event.finish(); - 'step 2' - for(var i of cards){ - if(!(('hejsdx').includes(get.position(i,true)))){ - i.fix(); - ui.cardPile.appendChild(i); - } - } - game.updateRoundNumber(); - }, - }, - xingzuo2:{ - trigger:{player:'phaseJieshuBegin'}, - direct:true, - charlotte:true, - onremove:true, - filter:function(event,player){ - return game.hasPlayer(function(target){ - return target.countCards('h')>0; - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(function(card,player,target){ - return target.countCards('h')>0; - },'兴作:是否令一名角色将其手牌与牌堆底的三张牌替换?').set('ai',function(target){ - var player=_status.event.player,att=get.attitude(player,target),hs=target.getCards('h'),num=hs.length; - var getv=function(list,target){ - var num=0; - for(var i of list) num+=get.value(i,target); - return num; - },val=getv(hs,target)-getv(player.storage.xingzuo2,target); - if(num<3) return att*Math.sqrt(Math.max(0,-val))*1.5; - if(num==3) return -att*Math.sqrt(Math.max(0,val)); - if(player.hp<(num>4?3:2)) return 0; - return -att*Math.sqrt(Math.max(0,val)); - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - player.logSkill('xingzuo',target); - var cards=get.bottomCards(3); - game.cardsGotoOrdering(cards); - var hs=target.getCards('h'); - target.lose(hs,ui.cardPile); - target.gain(cards,'draw'); - if(hs.length>3) player.loseHp(); - } - else event.finish(); - 'step 2' - game.updateRoundNumber(); - }, - }, - miaoxian:{ - hiddenCard:function(player,name){ - return get.type(name)=='trick'&&!player.getStorage('miaoxian2').contains(name)&&player.countCards('h',{color:'black'})==1; - }, - enable:'chooseToUse', - filter:function(event,player){ - var cards=player.getCards('h',{color:'black'}); - if(cards.length!=1) return false; - var mod2=game.checkMod(cards[0],player,'unchanged','cardEnabled2',player); - if(mod2===false) return false; - var storage=player.getStorage('miaoxian2'); - for(var i of lib.inpile){ - if(!storage.contains(i)&&get.type(i)=='trick'&&event.filterCard({ - name:i, - cards:cards, - },player,event)) return true; - } - return false; - }, - chooseButton:{ - dialog:function(event,player){ - var cards=player.getCards('h',{color:'black'}); - var storage=player.getStorage('miaoxian2'); - var list=[]; - for(var i of lib.inpile){ - if(!storage.contains(i)&&get.type(i)=='trick'&&event.filterCard({ - name:i, - cards:cards, - },player,event)){ - list.push(['锦囊','',i]); - } - } - return ui.create.dialog('妙弦',[list,'vcard'],'hidden'); - }, - check:function(button){ - var player=_status.event.player; - return player.getUseValue({name:button.link[2]})+1; - }, - backup:function(links,player){ - return { - audio:'miaoxian', - popname:true, - filterCard:{color:'black'}, - selectCard:-1, - position:'h', - viewAs:{ - name:links[0][2], - }, - onuse:function(links,player){ - if(!player.storage.miaoxian2) player.storage.miaoxian2=[]; - player.storage.miaoxian2.add(links.card.name); - player.addTempSkill('miaoxian2'); - }, - } - }, - prompt:function(links,player){ - return '将'+get.translation(player.getCards('h',{color:'black'})[0])+'当做'+get.translation(links[0][2])+'使用'; - }, - }, - group:'miaoxian_use', - subfrequent:['use'], - subSkill:{ - use:{ - audio:'miaoxian', - trigger:{player:'loseAfter'}, - frequent:true, - prompt:'是否发动【妙弦】摸一张牌?', - filter:function(event,player){ - var evt=event.getParent(); - if(evt.name!='useCard') return false; - return event.hs&&event.hs.length==1&&event.cards&&event.cards.length==1 - &&get.color(event.hs[0],player)=='red'&&!player.countCards('h',{color:'red'}); - }, - content:function(){ - player.draw(); - }, - }, - backup:{ - audio:'miaoxian', - }, - }, - ai:{ - order:12, - result:{ - player:1, - }, - }, - }, - miaoxian2:{onremove:true}, - //夏侯杰 - liedan:{ - audio:2, - trigger:{global:'phaseZhunbeiBegin'}, - forced:true, - filter:function(event,player){ - return (player!=event.player||player.countMark('liedan')>4)&&!player.hasSkill('zhuangdan_mark'); - }, - logTarget:'player', - content:function(){ - if(player==trigger.player){ - player.die(); - return; - } - var num=0; - if(player.hp>trigger.player.hp) num++; - if(player.countCards('h')>trigger.player.countCards('h')) num++; - if(player.countCards('e')>trigger.player.countCards('e')) num++; - if(num){ - player.draw(num); - if(num==3&&player.maxHp<8) player.gainMaxHp(); - } - else{ - player.addMark('liedan',1); - player.loseHp(); - } - }, - intro:{content:'mark'}, - }, - zhuangdan:{ - audio:2, - trigger:{global:'phaseEnd'}, - forced:true, - filter:function(event,player){ - return player!=event.player&&player.isMaxHandcard(true); - }, - content:function(){ - player.addTempSkill('zhuangdan_mark',{player:'phaseEnd'}) - }, - }, - zhuangdan_mark:{ - mark:true, - marktext:'胆', - intro:{content:'我超勇的'}, - }, //陶谦和曹嵩 reyirang:{ audio:'yirang', @@ -22322,606 +5224,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.draw(2); }, }, - //樊玉凤 - bazhan:{ - audio:2, - enable:'phaseUse', - usable:1, - zhuanhuanji:true, - marktext:'☯', - mark:true, - intro:{ - content:function(storage,player){ - return '出牌阶段限一次,'+(storage?'你可以获得一名其他角色的至多两张手牌。':'你可以将至多两张手牌交给一名其他角色。')+'若以此法移动的牌包含【酒】或♥牌,则你可令得到牌的角色执行一项:①回复1点体力。②复原武将牌。' - }, - }, - filter:function(event,player){ - if(player.storage.bazhan){ - return game.hasPlayer(function(current){ - return current!=player&¤t.countGainableCards(player,'h')>0; - }) - } - return player.countCards('h')>0; - }, - filterCard:true, - discard:false, - lose:false, - selectCard:function(){ - if(_status.event.player.storage.bazhan) return 0; - return [1,2]; - }, - filterTarget:function(card,player,target){ - if(player==target) return false; - if(player.storage.bazhan) return target.countGainableCards(player,'h')>0; - return true; - }, - prompt:function(){ - if(_status.event.player.storage.bazhan) return '获得一名其他角色的至多两张手牌'; - return '将至多两张手牌交给一名其他角色'; - }, - delay:false, - check:function(card){ - var player=_status.event.player; - var bool1=false,bool2=false; - for(var i of game.players){ - if(get.attitude(player,i)<=0||player==i) continue; - bool1=true; - if(i.isDamaged()||i.isTurnedOver()){ - bool2=true; - break; - } - } - if(bool2&&!ui.selected.cards.length&&(get.suit(card,player)=='heart'||get.name(card,player)=='jiu')) return 10; - if(bool1) return 9-get.value(card); - if(get.color(card)=='red') return 5-get.value(card); - return 0; - }, - content:function(){ - 'step 0' - if(player.storage.bazhan){ - event.recover=player; - player.gainPlayerCard(target,'h',true,'visibleMove',[1,2]); - } - else{ - event.recover=target; - player.give(cards,target); - } - player.changeZhuanhuanji('bazhan'); - 'step 1' - var target=event.recover; - if(result.bool&&result.cards&&result.cards.length){ - cards=result.cards; - } - if(!cards||!target||!target.getCards('h').filter(function(i){ - return cards.contains(i); - }).length||function(){ - for(var card of cards){ - if(get.suit(card,target)=='heart'||get.name(card,target)=='jiu') return false; - } - return true; - }()){ - event.finish(); - return; - } - var list=[]; - event.addIndex=0; - var str=get.translation(target); - if(target.isDamaged()) list.push('令'+str+'回复一点体力'); - else event.addIndex++; - if(target.isLinked()||target.isTurnedOver()) list.push('令'+get.translation(target)+'复原武将牌'); - if(!list.length) event.finish(); - else player.chooseControl('cancel2').set('choiceList',list).set('ai',function(){ - var evt=_status.event.getParent(); - if(get.attitude(evt.player,evt.target)<0) return 'cancel2'; - if(target.hp>1&&target.isTurnedOver()) return 1-evt.addIndex; - return 0; - }); - 'step 2' - if(result.control=='cancel2') event.finish(); - else if(result.index+event.addIndex==0){ - event.recover.recover(); - event.finish(); - } - else if(event.recover.isLinked()) event.recover.link(); - 'step 3' - if(event.recover.isTurnedOver()) event.recover.turnOver(); - }, - ai:{ - order:7, - result:{ - target:function(player,target){ - if(player.storage.bazhan) return -1; - if(ui.selected.cards.length){ - var cards=ui.selected.cards,card=cards[0]; - if(get.value(cards,target)<0) return -0.5; - if(get.attitude(player,target)>0){ - if((target.isDamaged()||target.isTurnedOver())&&(get.suit(card,target)=='heart'||get.name(card,target)=='jiu')) return 3; - if(target.hasUseTarget(card)&&target.getUseValue(card)>player.getUseValue(card,null,true)) return 1.4; - return 1; - } - } - return 0; - }, - }, - }, - }, - jiaoying:{ - audio:2, - trigger:{source:'gainEnd'}, - forced:true, - filter:function(event,player){ - if(player==event.player) return false; - var evt=event.getl(player); - return evt&&evt.hs&&evt.hs.length; - }, - logTarget:'player', - content:function(){ - var target=trigger.player; - if(!target.storage.jiaoying2) target.storage.jiaoying2=[]; - var cs=trigger.getl(player).hs; - for(var i of cs) target.storage.jiaoying2.add(get.color(i,player)); - target.addTempSkill('jiaoying2'); - target.markSkill('jiaoying2'); - player.addTempSkill('jiaoying3'); - if(!player.storage.jiaoying3) player.storage.jiaoying3=[]; - player.storage.jiaoying3.add(target); - }, - ai:{ - directHit_ai:true, - skillTagFilter:function(player,tag,arg){ - var target=arg.target; - if(target.getStorage('jiaoying2').contains('red')&&get.tag(arg.card,'respondShan')&&!target.hasSkillTag('respondShan',true,null,true)) return true; - return false; - }, - } - }, - jiaoying2:{ - onremove:true, - charlotte:true, - mod:{ - cardEnabled2:function(card,player){ - if(player.getStorage('jiaoying2').contains(get.color(card))) return false; - }, - }, - intro:{ - content:'本回合内不能使用或打出$牌', - }, - }, - jiaoying3:{ - onremove:true, - trigger:{global:'useCard1'}, - silent:true, - firstDo:true, - charlotte:true, - filter:function(event,player){ - return player.storage.jiaoying3.contains(event.player); - }, - content:function(){ - while(player.storage.jiaoying3.contains(trigger.player)) player.storage.jiaoying3.remove(trigger.player); - if(!player.storage.jiaoying3.length) player.removeSkill('jiaoying3'); - }, - group:'jiaoying3_draw', - }, - jiaoying3_draw:{ - trigger:{global:'phaseEnd'}, - direct:true, - charlotte:true, - filter:function(event,player){ - return player.getStorage('jiaoying3').length>0&&game.hasPlayer(function(current){ - return current.countCards('h')<5; - }) - }, - content:function(){ - 'step 0' - player.storage.jiaoying3.shift(); - player.chooseTarget('醮影:令一名角色将手牌摸至五张',function(card,player,target){ - return target.countCards('h')<5; - }).set('ai',function(target){ - var att=get.attitude(_status.event.player,target); - if(att>2){ - return 5-target.countCards('h'); - } - return att/3; - }); - 'step 1' - if(result.bool){ - player.logSkill('jiaoying',result.targets); - for(var i=0;i0; - }, - content:function(){ - player.addMark('recangchu',1); - }, - }, - recangchu3:{ - audio:'recangchu', - trigger:{global:'die'}, - forced:true, - filter:function(event,player){ - return player.countMark('recangchu')>game.countPlayer(); - }, - content:function(){ - player.removeMark('recangchu',player.countMark('recangchu')-game.countPlayer()); - }, - }, - reliangying:{ - audio:2, - trigger:{player:'phaseDiscardBegin'}, - direct:true, - content:function(){ - 'step 0' - var map={}; - var list=[]; - for(var i=1;i<=player.countMark('recangchu');i++){ - var cn=get.cnNumber(i,true); - map[cn]=i; - list.push(cn); - } - list.push('cancel2'); - event.map=map; - player.chooseControl(list).set('prompt',get.prompt('reliangying')).set('prompt2','摸至多'+get.cnNumber(player.countMark('recangchu'))+'张牌,然后交给等量的角色各一张牌').set('ai',function(){ - var player=_status.event.player; - var num=Math.min(player.countMark('recangchu'),game.countPlayer(function(current){ - return get.attitude(player,current)>0; - })); - if(num>0) return get.cnNumber(num,true); - return 'cancel2'; - }); - 'step 1' - if(result.control=='cancel2'){event.finish();return;} - player.logSkill('reliangying'); - var num=event.map[result.control]||1; - event.num=num; - player.draw(num); - 'step 2' - var num=Math.min(event.num,player.countCards('he'),game.countPlayer(function(target){ - return target!=player; - })); - if(num){ - player.chooseCardTarget({ - prompt:'将'+get.cnNumber(num)+'张牌交给其他角色', - prompt2:'操作提示:先按顺序选中所有要给出的牌,然后再按顺序选择等量的目标角色。可少选一张牌,并将此牌留给自己', - selectCard:[num-1,num], - selectTarget:function(){ - return ui.selected.cards.length; - }, - filterTarget:function(card,player,target){ - return target!=player; - }, - filterOk:function(){ - return ui.selected.cards.length==ui.selected.targets.length; - }, - complexSelect:true, - position:'he', - ai1:function(card){ - if(game.countPlayer(function(current){ - return target!=_status.event.player&&get.attitude(_status.event.player,target)>0; - })<=ui.selected.cards.length) return 0; - if(card.name=='shan') return 1; - return Math.random(); - }, - ai2:function(target){ - if(!target) return 1; - return Math.sqrt(5-Math.min(4,target.countCards('h')))*get.attitude(_status.event.player,target); - }, - forced:true, - }); - } - else event.finish(); - 'step 3' - if(result.bool&&result.cards.length>0){ - var list=[]; - for(var i=0;ired) return 'black'; - return 'red'; - }); - 'step 2' - player.storage.pianchong2=result.control; - player.addTempSkill('pianchong2',{player:'phaseBeginStart'}); - player.popup(result.control,result.control=='red'?'fire':'thunder'); - game.log(player,'声明了','#y'+get.translation(result.control)); - }, - ai:{ - threaten:4.8, - }, - }, - pianchong2:{ - audio:'pianchong', - trigger:{ - player:'loseAfter', - global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], - }, - forced:true, - charlotte:true, - onremove:true, - filter:function(event,player){ - var evt=event.getl(player); - if(!evt||!evt.cards2||!evt.cards2.length) return false; - for(var i of evt.cards2){ - if(get.color(i,player)==player.storage.pianchong2) return true; - } - return false; - }, - content:function(){ - 'step 0' - var num=trigger.getl(player).cards2.filter(function(card){ - return get.color(card,player)==player.storage.pianchong2; - }).length; - var cards=[]; - while(num--){ - var card=get.cardPile2(function(card){ - return !cards.contains(card)&&get.color(card,false)!=player.storage.pianchong2; - }); - if(card) cards.push(card); - else break; - } - if(cards.length) player.gain(cards,'gain2'); - }, - mark:true, - intro:{ - content:'失去一张$牌后,从牌堆中获得一张与此牌颜色不同的牌', - }, - }, - zunwei:{ - audio:2, - enable:'phaseUse', - usable:1, - filter:function(event,player){ - return !player.storage.zunwei||player.storage.zunwei.length<3; - }, - chooseButton:{ - dialog:function(event,player){ - var list=[ - '选择体力值大于你的一名角色', - '选择手牌数大于你的一名角色', - '选择装备数大于你的一名角色', - ]; - var choiceList=ui.create.dialog('尊位:清选择一项','forcebutton','hidden'); - for(var i=0;iplayer.hp; - }, - content:function(){ - player.recover(target.hp-player.hp); - if(!player.storage.zunwei) player.storage.zunwei=[]; - player.storage.zunwei.add(0); - }, - ai:{ - order:10, - result:{ - player:function(player,target){ - return (Math.min(target.hp,player.maxHp)-player.hp); - }, - }, - }, - }, - { - filterTarget:function(card,player,target){ - return target.countCards('h')>player.countCards('h'); - }, - content:function(){ - player.draw(Math.min(5,target.countCards('h')-player.countCards('h'))); - if(!player.storage.zunwei) player.storage.zunwei=[]; - player.storage.zunwei.add(1); - }, - ai:{ - order:10, - result:{ - player:function(player,target){ - return Math.min(5,target.countCards('h')-player.countCards('h')); - }, - }, - }, - }, - { - filterTarget:function(card,player,target){ - return target.countCards('e')>player.countCards('e'); - }, - content:function(){ - 'step 0' - if(!player.storage.zunwei) player.storage.zunwei=[]; - player.storage.zunwei.add(2); - event.num=1; - 'step 1' - var type='equip'+num; - if(!player.isEmpty(type)) return; - var card=get.cardPile2(function(card){ - return get.subtype(card,false)==type&&player.canUse(card,player); - }); - if(card) player.chooseUseTarget(card,true).nopopup=true; - 'step 2' - event.num++; - if(event.num<=5&&target.isAlive()&&player.countCards('e')0?1:0; - }); - 'step 1' - player.addTempSkill('rezhongjian2',{player:'phaseBeginStart'}); - //var str=['造成伤害弃牌','受到伤害摸牌'][result.index]; - //player.popup(str,['fire','wood'][result.index]); - //game.log(player,'选择了','#y'+str) - player.storage.rezhongjian2[result.index].push(target); - player.markSkill('rezhongjian2'); - }, - ai:{ - order:10, - expose:0, - result:{ - player:function(player,target){ - if(get.attitude(player,target)==0) return false; - var sgn=get.sgn((get.realAttitude||get.attitude)(player,target)); - if(game.countPlayer(function(current){ - return get.sgn((get.realAttitude||get.attitude)(player,current))==sgn; - })<=game.countPlayer(function(current){ - return get.sgn((get.realAttitude||get.attitude)(player,current))!=sgn; - })) return 1; - return 0.9; - }, - }, - }, - }, - rezhongjian2:{ - trigger:{ - global:['damageSource','damageEnd'], - }, - forced:true, - filter:function(event,player,name){ - var num=(name=='damageSource'?0:1); - var logTarget=(name=='damageSource'?event.source:event.player); - return logTarget&&logTarget.isAlive()&&player.storage.rezhongjian2[num].contains(logTarget); - }, - logTarget:function(event,player,name){ - return (name=='damageSource'?event.source:event.player); - }, - content:function(){ - var num=(event.triggername=='damageSource'?0:1); - var target=(event.triggername=='damageSource'?trigger.source:trigger.player); - var storage=player.storage.rezhongjian2; - storage[num].remove(target); - if(storage[0].length+storage[1].length) player.markSkill('rezhongjian2'); - else player.removeSkill('rezhongjian2'); - target[event.triggername=='damageSource'?'chooseToDiscard':'draw'](2,true,'he'); - player.draw(); - }, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=[[],[]]; - }, - onremove:true, - intro:{ - markcount:function(storage){ - return storage[0].length+storage[1].length; - }, - mark:function(dialog,storage,player){ - if(player==game.me||player.isUnderControl()){ - if(storage[0].length){ - dialog.addText('弃牌'); - dialog.add([storage[0],'player']); - } - if(storage[1].length){ - dialog.addText('摸牌'); - dialog.add([storage[1],'player']); - } - } - else{ - var list=storage[0].concat(storage[1]).sortBySeat(player); - dialog.add([list,'player']); - } - }, - }, - }, - recaishi:{ - trigger:{player:'phaseDrawEnd'}, - direct:true, - audio:'caishi', - isSame:function(event){ - var cards=[]; - event.player.getHistory('gain',function(evt){ - if(evt.getParent().name=='draw'&&evt.getParent('phaseDraw')==event) cards.addArray(evt.cards); - }); - if(!cards.length) return 'nogain'; - var list=[]; - for(var i=0;i0; - })==0; - }); - 'step 1' - if(result.bool){ - player.logSkill('recaishi'); - player.recover(); - player.addTempSkill('recaishi3'); - } - }, - }, - recaishi2:{}, - recaishi3:{ - mod:{ - targetEnabled:function(card,player,target){ - if(player==target) return false; - }, - }, - mark:true, - intro:{content:'本回合内不能对自己使用牌'}, - }, minsi:{ audio:2, enable:'phaseUse', @@ -23630,57 +5779,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, xianshuai2:{charlotte:true}, - shiyuan:{ - audio:2, - trigger:{target:'useCardToTargeted'}, - frequent:true, - filter:function(event,player){ - var num=1; - if(_status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.group=='qun'&&player.hasZhuSkill('yuwei',_status.currentPhase)) num=2; - return player!=event.player&&player.getHistory('gain',function(evt){ - return evt.getParent(2).name=='shiyuan'&&evt.cards.length==(2+get.sgn(event.player.hp-player.hp)); - }).length0; - }, - filterCard:{suit:'heart'}, - position:'he', - filterTarget:function(card,player,target){ - return player.canUse('sha',target,false); - }, - check:function(card){ - var player=_status.event.player; - var next=player.getNext(); - var att=get.attitude(player,next); - if(att>0){ - var js=next.getCards('j'); - if(js.length) return get.judge(js[0])+10-get.value(card); - return 9-get.value(card) - } - return 6-get.value(card); - }, - discard:false, - prepare:'throw', - loseTo:'cardPile', - visible:true, - insert:true, - content:function(){ - game.log(player,'将',cards,'置于牌堆顶'); - player.useCard({name:'sha',isCard:true},false,targets).card.cxliushi=true; - }, - group:'cxliushi_damage', - subSkill:{ - damage:{ - trigger:{source:'damageSource'}, - forced:true, - popup:false, - filter:function(event,player){ - return event.card&&event.card.cxliushi==true&&event.player.isAlive()&&event.getParent(3).name=='cxliushi'; - }, - content:function(){ - trigger.player.addMark('cxliushi2',1); - trigger.player.addSkill('cxliushi2'); - }, - }, - }, - ai:{ - order:function(){ - return get.order({name:'sha'})-0.4; - }, - result:{ - target:function(player,target){ - var eff=get.effect(target,{name:'sha'},player,target); - var damageEff=get.damageEffect(target,player,player); - if(eff>0) return damageEff>0?0:eff; - if(target.hasSkill('bagua_skill')||target.hasSkill('rw_bagua_skill')||target.hasSkill('bazhen')) return 0; - return eff; - }, - }, - }, - }, - cxliushi2:{ - mod:{ - maxHandcard:function(player,num){ - return num-player.countMark('cxliushi2'); - }, - }, - onremove:true, - charlotte:true, - intro:{ - name2:'流', - content:'手牌上限-#', - }, - }, - zhanwan:{ - audio:2, - trigger:{global:'phaseDiscardEnd'}, - forced:true, - filter:function(event,player){ - return event.player.hasSkill('cxliushi2')&&event.player.getHistory('lose',function(evt){ - if(evt.type=='discard'&&evt.getParent('phaseDiscard')==event) return true; - }).length>0; - }, - logTarget:'player', - content:function(){ - trigger.player.removeSkill('cxliushi2'); - var num=0; - trigger.player.getHistory('lose',function(evt){ - if(evt.type=='discard'&&evt.getParent('phaseDiscard')==trigger) num+=evt.cards2.length; - }); - player.draw(num); - }, - }, rexiemu:{ audio:2, trigger:{player:'phaseJieshuBegin'}, @@ -24717,1207 +6722,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, derivation:'mubing_rewrite', }, - remeibu:{ - audio:"meibu", - trigger:{ - global:"phaseUseBegin", - }, - filter:function(event,player){ - return event.player!=player&&event.player.isAlive()&&event.player.inRange(player)&&player.countCards('he')>0; - }, - direct:true, - derivation:["rezhixi"], - checkx:function(event,player){ - if(get.attitude(player,event.player)>=0) return false; - return event.player.countCards('h')>event.player.hp; - }, - content:function(){ - "step 0" - var check=lib.skill.new_meibu.checkx(trigger,player); - player.chooseToDiscard(get.prompt2('remeibu',trigger.player),'he').set('ai',function(card){ - if(_status.event.check) return 6-get.value(card); - return 0; - }).set('check',check).set('logSkill',['remeibu',trigger.player]); - "step 1" - if(result.bool){ - var target=trigger.player; - var card=result.cards[0]; - player.line(target,'green'); - player.markAuto('remeibu_gain',[get.suit(card,player)]); - player.addTempSkill('remeibu_gain'); - target.addTempSkill('rezhixi','phaseUseEnd'); - } - }, - ai:{ - expose:0.2, - }, - subSkill:{ - gain:{ - trigger:{global:'loseAfter'}, - forced:true, - charlotte:true, - popup:false, - onremove:true, - filter:function(event,player){ - return event.getParent(3).name=='rezhixi'&&player.getStorage('remeibu_gain').contains(get.suit(event.cards[0],event.player))&&get.position(event.cards[0])=='d'; - }, - content:function(){ - player.gain(trigger.cards[0],'gain2'); - }, - }, - }, - }, - remumu:{ - audio:"mumu", - trigger:{ - player:"phaseUseBegin", - }, - direct:true, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current.countCards('e')>0; - }); - }, - content:function(){ - 'step 0' - player.chooseTarget(get.prompt2('remumu'),function(card,player,target){ - return target.countCards('e')>0; - }).set('ai',function(target){ - var player=_status.event.player,att=get.attitude(player,target),es=target.getCards('e'),val=0; - for(var i of es){ - var eff=-(get.value(i,target)-0.1)*att; - if(eff>val) val=eff; - } - return eff; - }); - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('remumu',target); - if(player==target) event._result={index:1}; - else{ - var str=get.translation(target); - player.chooseControl().set('choiceList',[ - '弃置'+str+'装备区的一张牌且本阶段使用【杀】的次数上限+1', - '获得'+str+'装备区的一张牌且本阶段使用【杀】的次数上限-1', - ]).set('ai',function(){ - var player=_status.event.player; - if(player.countCards('hs',function(card){ - return get.name(card,player)=='sha'&&player.hasValueTarget(card); - })0; - }, - content:function(){ - player.chooseToDiscard('h',true); - }, - }, refenyin_wufan:{audio:2}, - //新岩泽(划掉)留赞 - refenyin:{ - audio:2, - audioname:['wufan'], - trigger:{global:['loseAfter','cardsDiscardAfter','loseAsyncAfter','equipAfter']}, - forced:true, - filter:function(event,player){ - if(player!=_status.currentPhase) return false; - var cards=event.getd(); - if(!cards.length) return false; - var list=[]; - var num=cards.length; - for(var i=0;i0; - }, - content:function(){ - var list=[]; - var list2=[]; - var cards=trigger.getd(); - for(var i=0;i4?8:4); - game.getGlobalHistory('cardMove',function(evt){ - if(evt.name=='cardsDiscard'||(evt.name=='lose'&&evt.position==ui.discardPile)) num+=evt.cards.length; - }); - event.set('liji_num',Math.floor(num/evt2.liji_all)); - }, - filterCard:true, - position:'he', - check:function(card){ - var val=get.value(card); - if(!_status.event.player.getStorage('refenyin_mark').contains(get.suit(card))) return 12-val; - return 8-val; - }, - filterTarget:lib.filter.notMe, - content:function(){ - target.damage('nocard'); - }, - ai:{ - order:1, - result:{ - target:-1.5 - }, - tag:{ - damage:1 - }, - }, - }, - //文鸯 - xinlvli:{ - audio:'lvli', - trigger:{player:'damageEnd',source:'damageSource'}, - filter:function(event,player,name){ - var stat=player.getStat().skill; - if(!stat.xinlvli) stat.xinlvli=0; - if(name=='damageEnd'&&!player.storage.beishui) return false; - if(stat.xinlvli>1) return false; - if(stat.xinlvli>0&&(player!=_status.currentPhase||!player.storage.choujue)) return false; - if(player.hp==player.countCards('h')) return false; - if(player.hp0) player.draw(num); - else player.recover(-num); - }, - //group:'lvli3', - }, - lvli:{ - audio:2, - init:function(player,skill){ - player.storage[skill]=0; - }, - enable:'chooseToUse', - filter:function(event,player){ - if(player.storage.lvli>1) return false; - if(player.storage.lvli>0&&(player!=_status.currentPhase||!player.storage.choujue)) return false; - return event.type!='wuxie'&&event.type!='respondShan'; - }, - chooseButton:{ - dialog:function(event,player){ - var list=[]; - for(var i=0;i=Math.random()){ - player.popup('洗具'); - } - else{ - player.popup('杯具'); - trigger.cancel(); - if(!trigger.getParent().lvli6){ - trigger.getParent().goto(0); - } - game.broadcastAll(function(str){ - var dialog=ui.create.dialog(str); - dialog.classList.add('center'); - setTimeout(function(){ - dialog.close(); - },1000); - },get.translation(player)+'声明的'+get.translation(trigger.card.name)+'并没有生效'); - game.log('然而什么都没有发生'); - game.delay(2); - } - }, - }, - lvli3:{ - trigger:{global:'phaseBefore'}, - forced:true, - silent:true, - popup:false, - content:function(){ - player.storage.lvli=0; - }, - }, - lvli4:{ - log:false, - enable:'chooseToUse', - viewAsFilter:function(player){ - if(player.storage.lvli>1) return false; - if(player.storage.lvli>0&&(player!=_status.currentPhase||!player.storage.choujue)) return false; - return true; - }, - filterCard:function(){return false}, - selectCard:-1, - viewAs:{name:'shan'}, - ai:{ - skillTagFilter:function(player){ - if(player.storage.lvli>1) return false; - if(player.storage.lvli>0&&(player!=_status.currentPhase||!player.storage.choujue)) return false; - return true; - }, - threaten:1.5, - respondShan:true, - } - }, - lvli5:{ - log:false, - enable:'chooseToUse', - viewAsFilter:function(player){ - if(player.storage.lvli>1) return false; - if(player.storage.lvli>0&&(player!=_status.currentPhase||!player.storage.choujue)) return false; - return true; - }, - filterCard:function(){return false}, - selectCard:-1, - viewAs:{name:'wuxie'}, - }, - lvli6:{ - trigger:{player:'damageEnd'}, - direct:true, - filter:function(event,player){ - if(!player.storage.beishui) return false; - if(player.storage.lvli>1) return false; - if(player.storage.lvli>0&&(player!=_status.currentPhase||!player.storage.choujue)) return false; - return true; - }, - content:function(){ - var next=player.chooseToUse(); - next.set('norestore',true); - next.set('_backupevent','lvli'); - next.backup('lvli'); - next.set('lvli6',true); - }, - }, - choujue:{ - derivation:['beishui','qingjiao'], - trigger:{global:'phaseAfter'}, - audio:2, - skillAnimation:true, - animationColor:'water', - unique:true, - juexingji:true, - forced:true, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=false; - }, - filter:function(event,player){ - if(player.storage.choujue) return false; - return Math.abs(player.hp-player.countCards('h'))>=3; - }, - content:function(){ - player.awakenSkill('choujue'); - player.storage.choujue=true; - player.loseMaxHp(); - player.addSkill('beishui'); - }, - }, - beishui:{ - trigger:{player:'phaseZhunbeiBegin'}, - audio:2, - skillAnimation:'epic', - animationColor:'thunder', - unique:true, - juexingji:true, - forced:true, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]=false; - }, - filter:function(event,player){ - if(player.storage.beishui) return false; - return Math.min(player.hp,player.countCards('h'))<2; - }, - content:function(){ - player.awakenSkill('beishui'); - player.storage.beishui=true; - player.loseMaxHp(); - player.addSkill('qingjiao'); - }, - }, - qingjiao:{ - trigger:{player:'phaseUseBegin'}, - filter:function(event,player){ - if(!ui.cardPile.hasChildNodes()&&!ui.discardPile.hasChildNodes()); - var hs=player.getCards('h'); - if(!hs.length) return false; - for(var i of hs){ - if(!lib.filter.cardDiscardable(i,player,'qingjiao')) return false; - } - return true; - }, - //check:function(event,player){ - // return player.countCards('h')<=player.hp; - //}, - content:function(){ - 'step 0' - player.chooseToDiscard(true,'h',player.countCards('h')); - 'step 1' - var evt=trigger.getParent(); - if(evt&&evt.getParent&&!evt.qingjiao){ - evt.qingjiao=true; - var next=game.createEvent('qingjiao_discard',false,evt.getParent()); - next.player=player; - next.setContent(function(){ - var hs=player.getCards('he'); - if(hs.length) player.discard(hs); - }); - } - 'step 2' - var list=[]; - var typelist=[]; - var getType=function(card){ - var sub=get.subtype(card); - if(sub) return sub; - return card.name; - }; - for(var i=0;i=8) break; - } - } - if(list.length<8){ - for(var i=0;i=8) break; - } - } - } - player.gain(list,'gain2'); - }, - }, - //王双 - spzhuilie:{ - mod:{ - targetInRange:function(card){ - if(card.name=='sha') return true; - }, - }, - trigger:{player:'useCardToTargeted'}, - filter:function(event,player){ - return event.card&&event.card.name=='sha'&&!player.inRange(event.target); - }, - forced:true, - logTarget:'target', - content:function(){ - 'step 0' - player.judge(function(card){ - var type=get.subtype(card); - return ['equip1','equip4','equip3','equip6'].contains(type)?6:-6; - switch(type){ - case 'equip':return 4; - case 'trick':return -4; - default:return 0; - } - }).judge2=function(result){ - return result.bool; - }; - 'step 1' - if(trigger.getParent().addCount!==false){ - trigger.getParent().addCount=false; - var stat=player.getStat(); - if(stat&&stat.card&&stat.card.sha) stat.card.sha--; - } - if(result.bool===true){ - var map=trigger.customArgs; - var id=trigger.target.playerid; - if(!map[id]) map[id]={}; - if(typeof map[id].extraDamage!='number') map[id].extraDamage=0; - map[id].extraDamage+=trigger.target.hp-1; - } - else if(result.bool===false) player.loseHp(); - }, - }, - spzhuilie2:{ - onremove:true, - intro:{ - content:'使用【杀】的次数上限+#', - }, - mod:{ - cardUsable:function(card,player,num){ - if(card.name=='sha') return num+player.countMark('spzhuilie2'); - }, - }, - }, - //花鬘 - manyi:{ - audio:2, - audioname:['mengyou'] - }, - hmmanyi:{ - trigger:{target:'useCardToBefore'}, - forced:true, - audio:'manyi', - audioname:['mengyou'], - filter:function(event,player){ - return event.card.name=='nanman'; - }, - content:function(){ - trigger.cancel(); - }, - }, - mansi:{ - audio:2, - group:'mansi_viewas', - trigger:{global:'damageEnd'}, - filter:function(event,player){ - return event.card&&event.card.name=='nanman'; - }, - frequent:true, - content:function(){ - player.draw(); - player.addMark('mansi',1,false); - }, - intro:{content:'已因此技能获得了#张牌'}, - }, - mansi_viewas:{ - audio:'mansi', - position:'h', - enable:'phaseUse', - usable:1, - filterCard:true, - selectCard:-1, - filter:function(event,player){ - var hs=player.getCards('h'); - if(!hs.length) return false; - for(var i=0;i0; - } - else{ - var source=event.player; - return source.getHistory('useCard',function(evt){ - return evt.targets&&evt.targets.contains(player); - }).indexOf(event.getParent())>0; - } - }, - content:function(){ - 'step 0' - var next=player.chooseToDiscard('he'); - var prompt; - if(event.triggername=='useCardToTargeted'){ - event.target=trigger.player; - prompt='令'+get.translation(trigger.card)+'对你无效'; - next.set('goon',-get.effect(player,trigger.card,trigger.player,player)); - } - else{ - event.target=trigger.targets[0]; - prompt='弃置一张牌,并获得'+get.translation(trigger.cards.filterInD()); - next.set('goon',get.value(trigger.cards.filterInD())); - } - next.set('prompt',get.prompt('souying',event.target)); - next.set('prompt2',prompt) - next.set('ai',function(card){ - return _status.event.goon-get.value(card); - }); - next.set('logSkill',['souying',event.target]); - 'step 1' - if(result.bool){ - player.addTempSkill('souying2'); - if(event.triggername=='useCardToPlayered') player.gain(trigger.cards.filterInD(),'gain2'); - else trigger.excluded.add(player); - } - }, - ai:{ - expose:0.25, - }, - }, - souying2:{}, - zhanyuan:{ - unique:true, - audio:2, - derivation:'hmxili', - skillAnimation:true, - animationColor:'soil', - juexingji:true, - forced:true, - filter:function(event,player){ - return player.countMark('mansi')>7; - }, - trigger:{player:'phaseZhunbeiBegin'}, - content:function(){ - 'step 0' - player.awakenSkill('zhanyuan'); - player.gainMaxHp(); - player.recover(); - 'step 1' - player.chooseTarget('是否失去〖蛮嗣〗,令一名其他男性角色和自己一同获得技能〖系力〗?',function(card,player,target){ - return target!=player&&target.hasSex('male'); - }).ai=function(target){ - return get.attitude(_status.event.player,target); - }; - 'step 2' - if(result.bool){ - var target=result.targets[0]; - player.line(target,'fire'); - player.addSkill('hmxili'); - target.addSkill('hmxili'); - player.removeSkill('mansi'); - } - }, - }, - hmxili:{ - trigger:{global:'damageBegin1'}, - direct:true, - audio:2, - filter:function(event,player){ - return event.source&&event.source!=player&&event.source==_status.currentPhase&&event.source.hasSkill('hmxili')&&!event.player.hasSkill('hmxili')&&player.countCards('he')>0&&!player.hasSkill('hmxili2'); - }, - content:function(){ - 'step 0' - player.chooseToDiscard('是否弃置一张牌,令'+get.translation(trigger.source)+'对'+get.translation(trigger.player)+'的伤害+1,且你与其各摸两张牌?','he').set('logSkill',['hmxili',trigger.player]).ai=function(card){ - return 9-get.value(card); - }; - 'step 1' - if(result.bool){ - game.asyncDraw([trigger.source,player],2); - trigger.num++; - player.addTempSkill('hmxili2'); - } - else event.finish(); - 'step 2' - game.delayx(); - }, - }, - hmxili2:{}, - //说出吾名吓汝一跳 - xuxie:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - logTarget:function(event,player){ - return game.filterPlayer(function(current){ - return get.distance(player,current)<=1; - }).sortBySeat(); - }, - check:function(event,player){ - if(player.isHealthy()) return false; - var list=game.filterPlayer(function(current){ - return get.distance(player,current)<=1; - }); - var draw=0; - var discard=0; - var num=2/player.getDamagedHp(); - while(list.length){ - var target=list.shift(); - var att=get.attitude(player,target); - if(att>0){ - draw++; - if(target.countDiscardableCards(player,'he')>0) discard--; - } - if(att==0){ - draw--; - if(target.countDiscardableCards(player,'he')>0) discard--; - } - if(att<0){ - draw--; - if(target.countDiscardableCards(player,'he')>0) discard++; - } - } - return draw>=num||discard>=num; - }, - content:function(){ - 'step 0' - player.loseMaxHp(); - 'step 1' - var targets=game.filterPlayer(function(current){ - return get.distance(player,current)<=1; - }).sortBySeat(); - if(!targets.length) event.finish(); - else{ - event.targets=targets; - player.chooseControl().set('choiceList',[ - '弃置'+get.translation(targets)+'的各一张牌', - '令'+get.translation(targets)+'各摸一张牌', - ]).set('ai',function(){ - var player=_status.event.player; - var list=_status.event.getParent().targets.slice(0); - var draw=0; - var discard=0; - while(list.length){ - var target=list.shift(); - var att=get.attitude(player,target); - if(att>0){ - draw++; - if(target.countDiscardableCards(player,'he')>0) discard--; - } - if(att<0){ - draw--; - if(target.countDiscardableCards(player,'he')>0) discard++; - } - } - if(draw>discard) return 1; - return 0; - }); - } - 'step 2' - event.index=result.index; - if(result.index==1){ - game.asyncDraw(targets); - } - else event.goto(4); - 'step 3' - game.delay(); - event.finish(); - 'step 4' - var target=targets.shift(); - if(target.countDiscardableCards(player,'he')>0) player.discardPlayerCard(target,'he',true); - if(targets.length) event.redo(); - }, - group:'xuxie_add', - }, - xuxie_add:{ - audio:'xuxie', - trigger:{player:'phaseUseEnd'}, - forced:true, - locked:false, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current.maxHp>player.maxHp; - }); - }, - content:function(){ - player.gainMaxHp(); - player.chooseDrawRecover(2,true); - }, - }, - //新潘凤 - xinkuangfu:{ - enable:'phaseUse', - usable:1, - audio:2, - delay:false, - filterTarget:function(card,player,target){ - if(player==target) return player.countCards('e',function(card){ - return lib.filter.cardDiscardable(card,player); - })>0; - return target.countDiscardableCards(player,'e')>0; - }, - filter:function(event,player){ - return game.hasPlayer(function(current){ - return current.countCards('e')>0; - }); - }, - content:function(){ - 'step 0' - if(player==target) player.chooseToDiscard('e',true); - else player.discardPlayerCard(target,'e',true); - 'step 1' - player.chooseUseTarget('sha',true,false,'nodistance'); - 'step 2' - var bool=game.hasPlayer2(function(current){ - return current.getHistory('damage',function(evt){ - return evt.getParent('xinkuangfu')==event; - }).length>0 - }); - if(player==target&&bool) player.draw(2); - else if(player!=target&&!bool) player.chooseToDiscard('h',2,true); - }, - ai:{ - order:function(){ - return get.order({name:'sha'})+0.3; - }, - result:{ - target:function(player,target){ - var att=get.attitude(player,target); - var max=0; - var min=1; - target.countCards('e',function(card){ - var val=get.value(card,target); - if(val>max) max=val; - if(val0&&min<=0) return target.hasSkillTag('noe')?3:1; - if(att<0&&max>0){ - if(target.hasSkillTag('noe')) return max>6?(-max/3):0; - return -max; - } - return 0; - }, - }, - }, - }, - //吴兰雷铜 - wlcuorui:{ - audio:2, - trigger:{player:'phaseUseBegin'}, - direct:true, - filter:function(event,player){ - if(!['identity','guozhan'].contains(get.mode())){ - return game.hasPlayer(function(current){ - return current.isFriendOf(player)&¤t.countDiscardableCards(player,'hej')>0; - }); - } - return game.hasPlayer(current=>{ - return get.distance(player,current)<=1&¤t.countDiscardableCards(player,'hej')>0; - }); - }, - content:function(){ - 'step 0' - if(!['identity','guozhan'].contains(get.mode())){ - player.chooseTarget(function(card,player,target){ - return target.isFriendOf(player)&&target.countDiscardableCards(player,'hej')>0; - },get.prompt2('wlcuorui')).set('ai',function(target){ - if(target.countCards('e',function(card){ - return card.name!='tengjia'&&get.value(card,target)<=0; - })) return 10; - if(target.countCards('j',function(card){ - return get.effect(target,{name:card.viewAs||card.name},target,target)<0; - })) return 10; - return Math.random()+0.2-1/target.countCards('hej'); - }); - } - else{ - player.chooseTarget(function(card,player,target){ - return get.distance(player,target)<=1&&target.countDiscardableCards(player,'hej')>0; - },get.prompt2('wlcuorui')).set('ai',function(target){ - if(game.hasPlayer(current=>{ - return current!=target&&get.attitude(_status.event.player,current)<0; - })) return get.effect(target,{name:'guohe'},player,player)+10; - return 0; - }); - } - 'step 1' - if(result.bool){ - var target=result.targets[0]; - event.target=target; - player.logSkill('wlcuorui',target); - player.discardPlayerCard(target,'hej',true); - if(['identity','guozhan'].contains(get.mode())) event.goto(7); - } - else event.finish(); - 'step 2' - if(!result.cards||!result.cards.length){ - event.finish(); - return; - } - var color=get.color(result.cards[0],result.cards[0].original=='j'?false:target); - event.color=color; - var list=[]; - if(game.hasPlayer(function(current){ - return (get.mode()=='versus'?current.isEnemyOf(player):current!=player&¤t!=target)&¤t.countCards('h'); - })) list.push('展示手牌'); - if(game.hasPlayer(function(current){ - return (get.mode()=='versus'?current.isEnemyOf(player):current!=player&¤t!=target)&¤t.countCards('e',{color:color}); - })) list.push('弃置装备'); - if(!list.length){ - event.finish(); - return; - } - if(list.length==1) event._result={control:list[0]}; - else player.chooseControl(list).set('prompt','挫锐:展示对手的至多两张手牌,或弃置对手装备区内至多两张'+get.translation(color)+'牌').set('ai',function(){ - var player=_status.event.player; - var color=_status.event.getParent().color; - if(game.countPlayer(function(current){ - if(!current.isEnemyOf(player)) return false; - return current.countCards('e',function(card){ - return get.color(card)==color&&get.value(card)>0; - }); - })>1) return 1; - return 0; - }); - 'step 3' - if(result.control=='弃置装备') event.goto(5); - else{ - var dialog=['请选择要展示的牌']; - var list=game.filterPlayer(function(current){ - return current.isEnemyOf(player)&¤t.countCards('h'); - }).sortBySeat(); - for(var i of list){ - dialog.push('
    '+get.translation(i)+'
    '); - if(player.hasSkillTag('viewHandcard',null,i,true)) dialog.push(i.getCards('h')); - else dialog.push([i.getCards('h'),'blank']); - } - player.chooseButton([1,2],true).set('createDialog',dialog).set('ai',function(button){ - var color=(get.color(button.link)==_status.event.getParent().color); - return color?Math.random():0.35; - }); - } - 'step 4' - player.showCards(result.links); - var map={}; - var map2={}; - for(var i of result.links){ - var id=get.owner(i).playerid; - if(!map[id]) map[id]=[]; - map[id].push(i); - if(get.color(i)!=event.color) continue; - if(!map2[id]) map2[id]=[]; - map2[id].push(i); - } - for(var i in map){ - var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; - if(map2[i]) player.gain(map2[i],source,'bySelf','give'); - player.line(source); - game.log(player,'展示了',source,'的',map[i]); - } - event.next.sort(function(a,b){ - return lib.sort.seat(a.source||a.player,b.source||b.player); - }); - event.finish(); - 'step 5' - var dialog=['请选择要弃置的牌']; - var list=game.filterPlayer(function(current){ - return current.isEnemyOf(player)&¤t.countCards('e',function(card){ - return get.color(card)==event.color; - }); - }).sortBySeat(); - for(var i of list){ - dialog.push('
    '+get.translation(i)+'
    '); - dialog.push(i.getCards('e',function(card){ - return get.color(card)==event.color; - })); - } - player.chooseButton([1,2],true).set('createDialog',dialog).set('ai',function(button){ - var owner=get.owner(button.link); - return get.value(button.link,owner) - }); - 'step 6' - var map={}; - for(var i of result.links){ - if(get.color(i)!=event.color) continue; - var id=get.owner(i).playerid; - if(!map[id]) map[id]=[]; - map[id].push(i); - } - for(var i in map){ - (_status.connectMode?lib.playerOL:game.playerMap)[i].discard(map[i],'notBySelf').discarder=player; - } - event.next.sort(function(a,b){ - return lib.sort.seat(a.player,b.player); - }); - event.finish(); - 'step 7' - if(!result.cards||!result.cards.length){ - event.finish(); - return; - } - var color=get.color(result.cards[0],result.cards[0].original=='j'?false:target); - event.color=color; - var next=player.chooseTarget(true,'挫锐:选择另一名其他角色','弃置该角色装备区里至多两张'+get.translation(event.color)+'牌;或展示该角色的至多两张手牌,然后获得其中的'+get.translation(event.color)+'牌'); - next.set('filterTarget',(card,player,target)=>{ - return target.countCards('he')>0&&target!=player&&target!=_status.event.getParent().target; - }); - next.set('ai',target=>{ - return -get.attitude(_status.event.player,target)*target.countCards('he')+0.1; - }); - 'step 8' - if(result.bool){ - var targetx=result.targets[0]; - event.targetx=targetx; - player.line(targetx); - player.choosePlayerCard(targetx,'he',true,[1,2]).set('prompt','展示至多两张手牌,或弃置至多两张'+get.translation(event.color)+'装备').set('filterButton',button=>{ - if(ui.selected.buttons.length){ - var linkx=ui.selected.buttons[0].link; - if(get.position(button.link)!=get.position(linkx)) return false; - } - if(get.position(button.link)=='e') return get.color(button.link,_status.event.target)==_status.event.getParent().color; - return true; - }).set('target',targetx); - } - else event.finish(); - 'step 9' - if(result.bool){ - var cards=result.links; - if(get.position(cards[0])=='e'){ - event.targetx.discard(cards,'notBySelf').discarder=player; - event.finish(); - } - else{ - player.showCards(cards,get.translation(event.targetx)+'因【挫锐】展示的牌'); - var cards2=cards.filter(card=>{ - return get.color(card)==event.color; - }); - if(cards2.length) player.gain(cards2,event.targetx,'give'); - } - } - }, - }, - kuiji:{ - audio:2, - usable:1, - enable:"phaseUse", - filter:function(event,player){ - if(player.hasJudge('bingliang')) return false; - return player.countCards('hes',function(card){ - return get.color(card)=='black'&&get.type(card)=='basic'; - })>0; - }, - position:'hes', - discard:false, - lose:false, - delay:false, - prepare:function(cards,player){ - player.$give(cards,player,false); - }, - filterCard:function(card,player,event){ - return get.color(card)=='black'&&get.type(card)=='basic'&&player.canAddJudge({name:'bingliang',cards:[card]}); - }, - selectTarget:-1, - filterTarget:function(card,player,target){ - return player==target; - }, - check:function(card){ - return 9-get.value(card); - }, - // onuse:function(links,player){ - // var next=game.createEvent('kuiji_content',false,_status.event.getParent()); - // next.player=player; - // next.setContent(lib.skill.kuiji.kuiji_content); - // }, - // kuiji_content:function(){ - content:function(){ - 'step 0' - player.addJudge({name:'bingliang'},cards); - player.draw(); - 'step 1' - var next=player.chooseTarget().set('ai',function(target){ - var player=_status.event.player; - return get.damageEffect(target,player,player) - }); - if(!['identity','guozhan'].contains(get.mode())){ - next.set('prompt','选择一名体力值最大的敌方角色,对其造成2点伤害'); - next.set('filterTarget',function(card,player,target){ - return target.isEnemyOf(player)&&!game.hasPlayer(function(current){ - return current.isEnemyOf(player)&¤t.hp>target.hp; - }); - }); - } - else{ - next.set('prompt','选择一名除你外体力值最大的角色,对其造成2点伤害'); - next.set('filterTarget',function(card,player,target){ - return player!=target&&!game.hasPlayer(function(current){ - return current!=player&¤t.hp>target.hp; - }); - }); - } - 'step 2' - if(result.bool){ - var target=result.targets[0]; - player.line(target); - target.damage(2); - } - }, - ai:{ - result:{ - target:function(player,target){ - if(!['identity','guozhan'].contains(get.mode())) return 1; - var target=game.filterPlayer(i=>i!=player).sort((a,b)=>b.hp-a.hp)[0]; - return target&&get.damageEffect(target,player,player)>0?1:0; - }, - }, - order:12, - }, - group:'kuiji_dying', - subSkill:{ - dying:{ - trigger:{global:'dying'}, - forced:true, - popup:false, - filter:function(event,player){ - var evt=event.getParent(2); - if(!evt||evt.name!='kuiji_content'||evt.player!=player) return false; - var list=game.filterPlayer(function(current){ - return current.isFriendOf(player); - }).sort(function(a,b){ - return a.hp-b.hp; - }); - return (list.length==1||list[0].hp0; - }, - check:function(){return 1}, - filterCard:true, - filterTarget:function(event,player,target){ - return target!=player&&target.canEquip(ui.selected.cards[0],true); - }, - prepare:'give', - discard:false, - lose:false, - content:function(){ - 'step 0' - target.equip(cards[0]); - 'step 1' - if(cards[0].name.indexOf('pyzhuren_')==0&&!player.getCards('e').contains(cards[0])) player.draw(2); - }, - ai:{ - order:11, - expose:0.2, - result:{ - target:function(player,target){ - if(ui.selected.cards.length){ - var card=ui.selected.cards[0]; - if(target.getEquip(card)||target.countCards('h',{subtype:get.subtype(card)})) return 0; - return get.effect(target,card,player,target); - } - return 0; - }, - }, - }, - }, - pyzhuren:{ - audio:2, - enable:'phaseUse', - usable:1, - filterCard:true, - selectCard:1, - check:function(card){ - var player=_status.event.player; - var name='pyzhuren_'+(card[card.name=='shandian'?'name':'suit']); - if(!lib.card[name]||_status.pyzhuren&&_status.pyzhuren[name]){ - if(!player.countCards('h','sha')) return 4-get.value(card); - return 0; - } - return 7-get.value(card); - }, - content:function(){ - player.addSkill('pyzhuren_destroy'); - if(!_status.pyzhuren) _status.pyzhuren={}; - var rand=0.85; - var num=get.number(cards[0]); - if(num>4) rand=0.9; - if(num>8) rand=0.95; - if(num>12||cards[0].name=='shandian'||get.isLuckyStar(player)) rand=1; - var name='pyzhuren_'+(cards[0][cards[0].name=='shandian'?'name':'suit']); - if(!lib.card[name]||_status.pyzhuren[name]||Math.random()>rand){ - player.popup('杯具'); - game.log(player,'锻造失败'); - var card=get.cardPile(function(card){ - return card.name=='sha'; - }); - if(card) player.gain(card,'gain2'); - } - else{ - _status.pyzhuren[name]=true; - player.gain(game.createCard(name,cards[0].name=='shandian'?'spade':cards[0].suit,1),'gain2') - } - }, - ai:{ - order:10, - result:{ - player:1, - }, - }, - }, - pyzhuren_destroy:{ - trigger:{global:['loseEnd','cardsDiscardEnd']}, - forced:true, - charlotte:true, - filter:function(event,player){ - var cs=event.cards; - for(var i=0;i0; - }, - content:function(){ - 'step 0' - var next=player.chooseToDiscard('he',function(card,player){ - return card!=player.getEquip('pyzhuren_diamond'); - },get.prompt(event.name,trigger.player),'弃置一张牌,令即将对其造成的伤害+1'); - next.ai=function(card){ - if(_status.event.goon) return 6-get.value(card); - return -1; - }; - next.set('goon',get.attitude(player,trigger.player)<0&&!trigger.player.hasSkillTag('filterDamage',null,{ - player:player, - card:trigger.card, - })); - next.logSkill=[event.name,trigger.player]; - 'step 1' - if(result.bool) trigger.num++; - else player.storage.counttrigger.pyzhuren_diamond--; - }, - ai:{ - expose:0.25, - }, - }, - pyzhuren_club:{ - audio:true, - trigger:{player:'useCard2'}, - direct:true, - equipSkill:true, - filter:function(event,player){ - if(event.card.name!='sha'&&get.type(event.card)!='trick') return false; - var info=get.info(event.card); - if(info.allowMultiple==false) return false; - var num=player.getHistory('useSkill',function(evt){ - return evt.skill=='pyzhuren_club'; - }).length; - if(num>=2) return false; - if(event.targets&&!info.multitarget){ - if(game.hasPlayer(function(current){ - return lib.filter.targetEnabled2(event.card,player,current)&&!event.targets.contains(current); - })){ - return true; - } - } - return false; - }, - content:function(){ - 'step 0' - var prompt2='为'+get.translation(trigger.card)+'额外指定一个目标'; - player.chooseTarget([1,player.storage.fumian_red],get.prompt(event.name),function(card,player,target){ - var player=_status.event.player; - if(_status.event.targets.contains(target)) return false; - return lib.filter.targetEnabled2(_status.event.card,player,target); - }).set('prompt2',prompt2).set('ai',function(target){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - return get.effect(target,trigger.card,player,player); - }).set('targets',trigger.targets).set('card',trigger.card); - 'step 1' - if(result.bool){ - if(!event.isMine()&&!event.isOnline()) game.delayx(); - event.targets=result.targets; - } - 'step 2' - if(event.targets){ - player.logSkill(event.name,event.targets); - trigger.targets.addArray(event.targets); - } - }, - }, - pyzhuren_spade:{ - audio:true, - trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ - return event.card.name=='sha';//&&event.targets.length==1&&get.color(event.card)=='black'; - }, - check:function(event,player){ - return get.attitude(player,event.target)<=0; - }, - logTarget:'target', - content:function(){ - var num=player.getHistory('useSkill',function(evt){ - return evt.skill=='pyzhuren_spade'; - }).length; - trigger.target.loseHp(Math.min(num,5));//.set('source',player); - }, - ai:{ - jueqing:true, - unequip_ai:true, - skillTagFilter:function(player,tag,arg){ - if(tag=='unequip_ai'){ - if(arg&&arg.name=='sha'&&get.color(arg.card)=='black') return true; - return false; - } - } - }, - }, - pyzhuren_shandian:{ - audio:true, - trigger:{player:'useCardToPlayered'}, - filter:function(event,player){ - return event.card.name=='sha';//&&event.targets.length==1; - }, - check:function(event,player){ - return get.attitude(player,event.target)<=0; - }, - logTarget:'target', - content:function(){ - 'step 0' - trigger.target.judge(function(card){ - var suit=get.suit(card); - if(suit=='spade') return -10; - if(suit=='club') return -5; - return 0; - }).judge2=function(result){ - return result.color=='black'?true:false; - }; - 'step 1' - if(result.suit=='spade'){ - trigger.target.damage(3,'thunder'); - //trigger.getParent().excluded.add(trigger.target); - } - else if(result.suit=='club'){ - trigger.target.damage('thunder'); - player.recover(); - player.draw(); - } - }, - }, //上兵伐谋 //伊籍在标包 不会移动 songshu:{ @@ -27953,239 +8435,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //管辂和葛玄 - gxlianhua:{ - derivation:['reyingzi','reguanxing','xinzhiyan','gongxin'], - audio:2, - init:function(player,skill){ - if(!player.storage[skill]) player.storage[skill]={ - red:0,black:0, - } - }, - marktext:'丹', - intro:{ - name:'丹血', - markcount:function(storage){ - return storage.red+storage.black; - }, - content:function(storage){ - return '共有'+(storage.red+storage.black)+'个标记'; - }, - }, - trigger:{global:'damageEnd'}, - forced:true, - locked:false, - filter:function(event,player){ - return event.player!=player&&event.player.isAlive()&&_status.currentPhase!=player; - }, - content:function(){ - player.storage.gxlianhua[player.getFriends().contains(trigger.player)?'red':'black']++; - player.markSkill('gxlianhua'); - }, - group:'gxlianhua_harmonia', - subSkill:{ - harmonia:{ - forced:true, - audio:'gxlianhua', - sub:true, - trigger:{player:'phaseZhunbeiBegin'}, - //filter:function(event,player){ - // return player.storage.gxlianhua&&player.storage.gxlianhua.red+player.storage.gxlianhua.black>0; - //}, - forced:true, - content:function(){ - var cards=[]; - var cards2=[]; - var skill=''; - var red=player.storage.gxlianhua.red; - var black=player.storage.gxlianhua.black; - player.storage.gxlianhua={red:0,black:0}; - player.unmarkSkill('gxlianhua'); - if(red+black<4){ - cards=['tao']; - skill='reyingzi'; - } - else if(red>black){ - cards=['wuzhong']; - skill='reguanxing'; - } - else if(red0) return 1 - return -5/(target.countCards('h')+1); - }, - }, - }, - }, - busuan_angelbeats:{ - mark:true, - intro:{ - mark:function(dialog,content,player){ - if(content&&content.length) dialog.add([content,'vcard']); - }, - }, - trigger:{player:'drawBefore'}, - forced:true, - filter:function(event,player){ - return event.getParent().name=='phaseDraw'; - }, - onremove:true, - content:function(){ - 'step 0' - var list=player.storage['busuan_angelbeats']; - var cards=[]; - for(var i=0;i1) player.loseHp(); - event.finish(); - } - else if(event.count<3) player.chooseBool('是否继续发动【命戒】?').ai=function(){ - if(event.count==2) return Math.random()<0.5; - return lib.skill.mingjie.check(); - }; - } - else event.finish(); - 'step 3' - if(result.bool) event.goto(1); - }, - }, rewenji:{ audio:'spwenji', trigger:{player:'phaseUseBegin'}, @@ -29641,123 +9890,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, card:{ - pyzhuren_heart:{ - fullskin:true, - derivation:'puyuan', - type:'equip', - subtype:'equip1', - distance:{attackFrom:-2}, - skills:['pyzhuren_heart'], - ai:{ - basic:{ - equipValue:4 - } - }, - }, - pyzhuren_diamond:{ - fullskin:true, - derivation:'puyuan', - type:'equip', - subtype:'equip1', - distance:{attackFrom:-1}, - skills:['pyzhuren_diamond'], - ai:{ - basic:{ - equipValue:3 - } - }, - }, - pyzhuren_club:{ - fullskin:true, - derivation:'puyuan', - type:'equip', - subtype:'equip1', - distance:{attackFrom:-1}, - skills:['pyzhuren_club'], - ai:{ - basic:{ - equipValue:5 - } - }, - loseDelay:false, - onLose:function(){ - var next=game.createEvent('baiyin_recover'); - event.next.remove(next); - var evt=event.getParent(); - if(evt.getlx===false) evt=evt.getParent(); - evt.after.push(next); - next.player=player; - next.setContent(function(){ - if(player.isDamaged()) player.logSkill('pyzhuren_club'); - player.recover(); - }); - }, - }, - pyzhuren_spade:{ - fullskin:true, - derivation:'puyuan', - type:'equip', - subtype:'equip1', - skills:['pyzhuren_spade'], - ai:{ - basic:{ - equipValue:3 - } - }, - }, - pyzhuren_shandian:{ - fullskin:true, - derivation:'puyuan', - type:'equip', - subtype:'equip1', - distance:{attackFrom:-3}, - skills:['pyzhuren_shandian'], - ai:{ - basic:{ - equipValue:3 - } - }, - }, - dagongche:{ - fullskin:true, - derivation:'zhangfen', - type:'equip', - subtype:'equip5', - skills:['dagongche_skill'], - cardPrompt:function(card){ - if(!card.storage) return '出牌阶段开始时,你可以视为使用一张【杀】,且当此【杀】因执行效果而对目标角色造成伤害后,你弃置其一张牌。若此【大攻车】未被强化,则其他角色无法弃置你装备区内的【大攻车】。当此牌离开你的装备区后,销毁之。'; - var str='出牌阶段开始时,你可以视为使用一张'; - if(card.storage.大攻车选项一) str+='无距离限制且无视防具的'; - str+='【杀】'; - if(card.storage.大攻车选项二) str+=('(此【杀】的目标上限+'+card.storage.大攻车选项二+')'); - str+=',且当此【杀】因执行效果而对目标角色造成伤害后,你弃置其'; - var num=1; - if(card.storage.大攻车选项三) num+=card.storage.大攻车选项三; - str+=get.cnNumber(num); - str+='张牌。当此牌离开你的装备区后,销毁之。'; - return str; - }, - destroy:true, - ai:{ - basic:{ - equipValue:3 - } - }, - }, - pilitoushiche:{ - fullskin:true, - derivation:'dc_liuye', - cardimage:'ly_piliche', - type:'equip', - subtype:'equip5', - skills:['pilitoushiche'], - destroy:true, - ai:{ - basic:{ - equipValue:3 - } - }, - }, }, characterIntro:{ tangji:'唐姬,会稽太守唐瑁女,弘农怀王刘辩的妃子。刘辩死后,唐姬回归故里,因节烈不愿改嫁他人,后被汉献帝下诏封为弘农王妃。', @@ -29780,7 +9912,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xugong:"许贡是东汉末官吏。先后任吴郡都尉、太守,欲送密信给曹操,要曹操注意孙策,却被孙策发现而被杀。许贡生前招揽了一些门客,当中有三人不忘故主,千方百计想要手刃仇人。建安五年(公元200年),广陵太守陈登派人秘密联系孙策治下的山贼余党,企图颠覆孙策在江东的统治。孙策决定讨伐陈登,行军到丹徒时,许贡门客终于找到了机会。因为孙策有单骑出猎,在野外思考的习惯,三门客趁孙策轻装外出打猎时,放冷箭射中孙策面颊。这些门客后来在与孙策的搏斗中,被赶到的侍卫杀死。孙策此后因为伤口感染,并且俊美的容貌被毁,终于不治身亡,去世时年仅26岁。", mangyachang:"南蛮王孟获的部将,使一口截头大刀,骑一匹黄骠马。率军与蜀军交战,战败王平。后被平北将军马岱斩杀。只出现在《三国演义》里,正史中无此人。", xushao:'许劭(shào)(150年—195年),字子将。汝南平舆(今河南平舆县射桥镇)人。东汉末年著名人物评论家。据说他每月都要对当时人物进行一次品评,人称为“月旦评”。曾任汝南郡功曹,后南渡投靠扬州刺史刘繇。刘繇被孙策击败后,许劭随其逃往豫章郡,并在豫章去世。', - puyuan:'蒲元是三国时蜀汉杰出的工匠。为诸葛亮造刀三千口,并且制作木牛流马。后来姜维为他写过两部传记《蒲元传》《蒲元别传》。', zhangwen:'张温(193年—230年),字惠恕,吴郡吴县(今江苏苏州)人。少修节操,容貌奇伟。孙权召拜议郎、选曹尚书,徙太子太傅。黄武三年(224),以辅义中郎将身份出使蜀汉,孙权原先害怕诸葛亮会有意留难张温,但张温不担心。在呈上蜀汉朝廷的文书刻意称颂蜀汉,以表明和解的诚意,重建两国关系。他在蜀汉表现出色,得蜀汉朝廷重视。回东吴后不久,被调进豫章的军队,事业上再无进展。孙权一方面介怀他出使蜀汉时称颂蜀汉,又嫌他声名太盛,恐怕张温不会尽忠地由他任用。当时正好碰上暨艳事件,暨艳是张温引荐的臣子,但他滥用职权,升迁评定等只看自己喜恶。事件被揭发后暨艳及同党徐彪都自杀。孙权见此,于是以张温与暨艳、徐彪等人多有来往而下罪张温,后更将张温发还到家乡吴郡。将军骆统曾上书为张温辩解,但孙权不理会。六年后,张温病逝。', lisu:'李肃(?-192年),五原(治今内蒙古包头西北)人。永汉三年四月,司徒王允、尚书仆射士孙瑞、卓将吕布共谋诛卓。是时,天子有疾新愈,大会未央殿。布使同郡骑都尉肃等、将亲兵十馀人,伪著卫士服守掖门。布怀诏书。卓至,肃等格卓。卓惊呼布所在。布曰“有诏”,遂杀卓,夷三族。后卓女婿中郎将牛辅典兵别屯陕,分遣校尉李傕、郭汜、张济略陈留、颍川诸县。卓死,吕布使李肃至陕,欲以诏命诛辅。辅等逆与肃战,肃败走弘农,布诛肃。', xinpi:'辛毗(生卒年不详),字佐治,颍川阳翟人。三国时期曹魏大臣。原居陇西(郡治在今甘肃临洮县),东汉光武帝建武年间,其先人东迁。当初,辛毗跟随其兄事袁绍。曹操任司空时,征召辛毗,他不受命。官渡战后,辛毗事袁绍的儿子袁谭。公元204年,曹操攻下邺城,上表推荐辛毗任议郎,后为丞相长史。公元220年,曹丕即皇帝位,以辛毗为侍中,赐爵关内侯,后赐广平亭侯。魏明帝即位,封辛毗颍乡侯,食邑三百户,后为卫尉。公元234年,诸葛亮屯兵渭南,司马懿上表魏明帝。魏明帝任辛毗为大将军军师,加使持节号。诸葛亮病逝后,辛毗返回,仍任卫尉。不久,逝世,谥肃侯。', @@ -29788,141 +9919,49 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xugong:"许贡是东汉末官吏。先后任吴郡都尉、太守,欲送密信给曹操,要曹操注意孙策,却被孙策发现而被杀。许贡生前招揽了一些门客,当中有三人不忘故主,千方百计想要手刃仇人。建安五年(公元200年),广陵太守陈登派人秘密联系孙策治下的山贼余党,企图颠覆孙策在江东的统治。孙策决定讨伐陈登,行军到丹徒时,许贡门客终于找到了机会。因为孙策有单骑出猎,在野外思考的习惯,三门客趁孙策轻装外出打猎时,放冷箭射中孙策面颊。这些门客后来在与孙策的搏斗中,被赶到的侍卫杀死。孙策此后因为伤口感染,并且俊美的容貌被毁,终于不治身亡,去世时年仅26岁。", mangyachang:"南蛮王孟获的部将,使一口截头大刀,骑一匹黄骠马。率军与蜀军交战,战败王平。后被平北将军马岱斩杀。只出现在《三国演义》里,正史中无此人。", - guanlu:"管辂(209年-256年),字公明,平原(今山东德州平原县)人。三国时期曹魏术士。年八九岁,便喜仰观星辰。成人后,精通《周易》,善于卜筮、相术,习鸟语,相传每言辄中,出神入化。体性宽大,常以德报怨。正元初,为少府丞。北宋时被追封为平原子。管辂是历史上著名的术士,被后世奉为卜卦观相的祖师。", - gexuan:"葛玄(164年-244年),汉族,吴丹阳郡句容县都乡吉阳里人(今句容市),祖籍山东琅琊,三国著名高道,道教灵宝派祖师。字孝先,号仙翁,被尊称为“葛天师”。道教尊为葛仙翁,又称太极仙翁,与张道陵、许逊、萨守坚共为四大天师。为汉下邳僮侯葛艾后裔,祖葛矩,安平太守,黄门郎;从祖葛弥,豫章第五郡太守。父葛焉,字德儒,州主簿,山阴令,散骑常侍,大尚书。随左慈学道,得《太清丹经》、《黄帝九鼎神丹经》、《金液丹经》等道经。曾采药海山,吴嘉禾二年(233年),在閤皂山修道建庵,筑坛立炉,修炼九转金丹。喜好遨游山川,去过括苍山、南岳山、罗浮山。编撰《灵宝经诰》,精研上清、灵宝等道家真经,并嘱弟子世世箓传。", - wulan:'吴兰(?~218年),青州(今山东潍坊市)人。东汉末年将领。初为益州牧刘璋部将,后来归降刘备。汉中之战中,与马超、张飞各领一军,驻扎于下辩。建安二十三年,为曹操将领曹洪、张郃所败,退回汉中。途中,为阴平氐族首领强端所杀。', - leitong:'雷铜(?-218年),阴平(今甘肃文县)人,氐族,东汉末年益州名将。本属益州牧刘璋麾下。刘备攻取益州后,归刘备麾下。参加汉中之战,为魏将张郃所杀。', - xingdaorong:'邢道荣是《三国演义》中虚构的人物,为零陵太守刘度手下武将,被评价有万夫不当之勇,于《三国演义》第五十二回登场,被赵云刺死。', - huaman:'花鬘,古典戏曲《龙凤巾》(一名《化外奇缘》)中的人物,身份为三国时期南蛮王孟获与祝融夫人的女儿,关索的夫人之一。在关于关三小姐·关银屏的民间传说中,其名字为“花中秀”,与关索其他几位夫人鲍三娘、王桃、王悦都被关索之姐关银屏编入自己的女兵营中。花鬘在《三国志》,《三国演义》均未有提及,只是戏曲中的虚构人物。其形象并非一般君主家中闺秀,而是与其母祝融相似,是一个可以披甲上阵,善于刀枪作战的女武将。戏曲中在诸葛亮平定南蛮时,花鬘曾与关索作战,失败被俘,两人互生爱意,南蛮王孟获降服后二人成婚。近些年,花鬘接连在各类三国题材的游戏中登场,更广被人知晓。', - wangshuang:'王双(?-228年),三国时期曹魏将领。蜀汉建兴六年(228年)冬,诸葛亮出散关,攻陈仓,后粮尽而退。王双率领骑兵追击蜀军,但在与蜀军的交战中被击败,王双也被蜀军所斩。在《三国演义》中,王双字子全,是陇西郡狄道县(今甘肃临洮县)人,有万夫不当之勇。在诸葛亮北伐期间,被魏延所斩。', - wenyang:"文俶(238年—291年),一作文淑,字次骞,小名阿鸯,世称文鸯,谯郡(今安徽亳州市)人。魏末晋初名将,曹魏扬州刺史文钦之子。骁勇善战,依附大将军曹爽,效忠于王室。司马师废黜皇帝曹芳后,随父联合毌丘俭于淮南起兵勤王。兵败之后,向南投奔吴国。诸葛诞发动淮南叛乱,奉命率军驰援。双方发生内讧,父亲为诸葛诞所害,遂降于司马昭,封关内侯。西晋建立后,任平虏护军。咸宁三年(277年),拜平西将军、都督凉秦雍州三州军事,大破鲜卑首领秃发树机能,名震天下,迁使持节、护东夷校尉、监辽东军事。八王之乱中,为诸葛诞外孙、东安王司马繇所诬杀,惨遭灭族,时年五十四岁。", liuzan:'字正明,会稽长山人人,曾任左护军,有两子:留略、留平。少为会稽郡吏,曾参与镇压黄巾起义,后被东吴大将凌统所引用,任屯骑校尉。吴五凤二年(公元255年)留赞任左护军,随孙峻征淮南,因病撤军,被魏将蒋班围困于道,力战而死,时年73岁。', - caoxing:'曹性,东汉末年吕布部将,史载他曾与身为自己上司的反叛者郝萌交战,并砍去郝萌一臂,受到吕布的嘉奖。在罗贯中所著古典小说《三国演义》中,也有关于曹性箭射夏侯惇左目的描述,而曹性也随即被暴怒的夏侯惇所杀。在穿越小说《三国之银河射手》中,主角穿越成为曹性,经过一番闯荡之后,被封为“银河射手”。', zhujun:'朱儁(?-195年),字公伟。会稽郡上虞县(今浙江绍兴上虞区)人。东汉末年名将。朱儁出身寒门,赡养母亲,以好义轻财闻名,受乡里敬重。后被太守徐珪举为孝廉,任兰陵令,颇有治绩。再升任交州刺史,以家兵五千大破叛军,平定交州。战后以功封都亭侯,入朝为谏议大夫。光和七年(184年),黄巾起义爆发,朱儁以右中郎将、持节平定三郡之地,以功进封西乡侯,迁镇贼中郎将。又率军讨平黄巾,“威声满天下”。中平二年(185年),进拜右车骑将军,更封钱塘侯。后为河内太守,击退进逼的张燕。权臣董卓秉政时,想任朱儁为副手,遭其婉拒。其后出逃荆州,更屯军中牟,徐州刺史陶谦等欲推举他为太师,并传檄各州牧伯,相邀讨伐李傕、奉迎天子。但朱儁却奉诏入京任太仆。初平三年(192年),升任太尉、录尚书事。兴平元年(194年),行骠骑将军事,持节镇关东,因故未成行。兴平二年(195年),李傕与郭汜相互攻杀,郭汜扣留朱儁作为人质。朱儁性格刚烈,即日发病而死。', liuhong:'汉灵帝刘宏(157年,一作156年-189年5月13日),生于冀州河间国(今河北深州)。东汉第十二位皇帝(168年-189年在位),汉章帝刘炟的玄孙。刘宏早年世袭解渎亭侯。永康元年(167年)十二月,汉桓帝刘志逝世,刘宏被外戚窦氏挑选为皇位继承人,于建宁元年(168年)正月即位。刘宏在位的大部分时期,施行党锢及宦官政治。他又设置西园,巧立名目搜刮钱财,甚至卖官鬻爵以用于自己享乐。在位晚期,爆发了黄巾起义,而凉州等地也陷入持续动乱之中。中平六年(189年),刘宏去世,谥号孝灵皇帝,葬于文陵。刘宏喜好辞赋,作有《皇羲篇》、《追德赋》、《令仪颂》、《招商歌》等。', - liubian:'刘辩(176年-190年3月6日),是汉灵帝刘宏与何皇后的嫡长子。刘辩在灵帝驾崩后继位为帝,史称少帝,由于年幼,实权掌握在临朝称制的母亲何太后和母舅大将军何进手中。少帝在位时期,东汉政权已经名存实亡,他即位后不久即遭遇以何进为首的外戚集团和以十常侍为首的内廷宦官集团这两大敌对政治集团的火并,被迫出宫,回宫后又受制于以“勤王”为名进京的凉州军阀董卓,终于被废为弘农王,成为东汉唯一被废黜的皇帝,其同父异母弟陈留王刘协继位为帝,是为汉献帝。被废黜一年之后,刘辩在董卓胁迫下自尽,时年仅十五岁(一说十八岁),其弟献帝追谥他为怀王。中国古代的史书中称刘辩为皇子辩、少帝和弘农王等。因为在位不逾年,传统上称东汉共十二帝,刘辩与东汉另一位少帝刘懿都不在其中,亦皆无本纪;不过,现代史学界也有观点承认两位少帝均是汉朝皇帝,则刘辩为东汉第十三位皇帝。', wangrong:'汉灵怀皇后王荣(?~181年),赵国邯郸(今河北邯郸市)人。五官中郎将王苞孙女,汉灵帝刘宏妃子,汉献帝刘协生母。初以良家子选入掖庭,封为美人,服侍汉灵帝。光和四年(181年),生下陈留王刘协,惨遭灵思皇后毒杀。王荣死后,汉灵帝曾作《追德赋》、《令仪颂》。永汉元年(189年),其子刘协即位,是为汉献帝,追谥灵怀皇后,葬于文昭陵。', hanfu:'韩馥(?—191年),字文节,颍川郡(今河南禹州)人。东汉末年的诸侯,冀州牧。韩馥担任过东汉的御史中丞,之后被董卓举荐为冀州牧;在各诸侯起兵讨伐董卓时,韩馥也是其中之一的参与者。韩馥与袁绍也曾经有意立刘虞为皇帝。当时冀州民殷人盛,兵粮优足,于是袁绍便用计夺取冀州,韩馥被迫投靠张邈;之后张邈与袁绍的使者见面,韩馥以为是要来杀害自己的,于是在厕所中以刻书用的小刀自杀。', - guozhao:'郭照,电视剧《军师联盟》中的女主角之一,由唐艺昕饰演。原型为文德皇后郭氏(字女王),魏国皇后,张春华的义妹,深爱曹丕,替甄宓抚育曹叡,因甄宓之死被曹叡记恨,曹丕死后,成为皇太后,被曹叡逼上死路。自尽身亡。', - fanyufeng:'樊夫人,东汉末年人物,昔桂阳太守赵范寡嫂。赵云随刘备平定江南四郡后,刘备以赵云为桂阳太守。赵范居心叵测,要将自己的嫂嫂樊氏嫁给赵云,但遭到赵云的拒绝。后来,赵范逃走,樊氏也下落不明。2001年,应日本日中青少年文化中心成立50周年之邀,北京京剧院赴日进行40场巡回演出,这次访日的剧目都不同程度地进行了加工改编,以符合日本观众的需求。《取桂阳》是根据老本重新排演的,叶金援饰赵云,王怡饰樊玉凤。剧中的樊玉凤成为文武双全的巾帼英雄,被赵云收降,后来在《龙凤呈祥》中也参与堵截东吴的追兵。', zhaozhong:'赵忠(?—189年),安平人,东汉末年宦官,赵延之兄。桓帝、灵帝时,历为小黄门、中常侍、大长秋、车骑将军等职,封都乡侯。在职时以搜刮暴敛、骄纵贪婪见称,灵帝极为宠信,常谓“赵常侍是我母”。中平六年(189年),何进谋诛宦官,事泄,他和其余几个常侍设计伏杀何进,袁绍、袁术等人闻何进被杀,入宫杀尽宦官,后捕杀赵忠。', caosong:'曹嵩(?—194年),字巨高,沛郡谯县(今安徽省亳州市)人。东汉大臣,大长秋曹腾的养子,曹操之父亲。门荫入仕,历任司隶校尉、鸿胪卿、大司农,位列九卿,位高权重。中平四年(187年),靠着贿赂中官,出任太尉,位列三公。中平五年(188年),受累于黄巾之乱,坐罪免官。兴平元年(194年),投奔兖州牧曹操,遇害于徐州。延康元年(220年),追尊魏国太王。曹魏建立后,追尊皇帝,谥号为太。', - xiahoujie:'夏侯杰(?—208年),是罗贯中的小说《三国演义》中曹操的部将,征战时常常带在身边。在第42回长坂坡之战中,张飞大吼,从马儿受惊跌下马来而死。', - ruanyu:'阮瑀(约165—212年),字元瑜,陈留尉氏(今河南开封市尉氏县)人,是东汉末年文学家,建安七子之一。阮瑀所作章表书记很出色,当时军国书檄文字,多为阮瑀与陈琳所拟。名作有《为曹公作书与孙权》。诗有《驾出北郭门行》,描写孤儿受后母虐待的苦难遭遇,比较生动形象。年轻时曾受学于蔡邕,蔡邕称他为“奇才”。后徙为丞相仓曹掾属。诗歌语言朴素,往往能反映出一般的社会问题。阮瑀的音乐修养颇高,他的儿子阮籍,孙子阮咸皆当时名人,位列“竹林七贤”,妙于音律。明人辑有《阮元瑜集》。', liangxing:'梁兴(?-212年),武威郡姑臧人也,东汉末年凉州军阀之一。与张横、贾诩、段煨是同乡,曾斩杀李傕。建安十六年,同韩遂、马超联合,起兵反抗曹操。梁兴率步骑五千夜袭曹军先头部队徐晃,被击退。联军战败后,梁兴逃到蓝田,劫掠周围郡县。夏侯渊进攻蓝田联合郑浑征讨梁兴,梁兴战败,不知所终。', zhangmiao:'张邈(?-195年),字孟卓,东平寿张(今山东东平县)人。东汉大臣、名士,“八厨”之一。举孝廉出身,授骑都尉,出任陈留太守。参与讨伐董卓,参加汴水之战,归附于曹操。兴平元年(194年),趁着曹操讨伐徐州牧陶谦,联合陈宫发动叛乱,迎立吕布为兖州牧。受到曹操讨伐,兵败投奔徐州牧刘备。兴平二年,张邈向袁术借兵途中,被部下所杀。', duanwei:'段煨(?~209年),字忠明,武威郡姑臧(今甘肃省武威市)人也。东汉末年将领,东汉太尉段颎同族兄弟,与太尉贾诩、张济、宣威侯张绣乃是同乡。原为董卓帐下将领,奉命屯兵华阴,勤劳农业。兴平二年(195年),迎接汉献帝刘协东归洛阳,供给衣食补给,与护驾将领杨定不和,引发激战十余天,听从汉献帝刘协劝解。东汉建安三年(198年),攻打黄白城,击杀李傕,夷其三族,封为镇远将军、闅乡亭侯、北地太守,累迁大鸿胪、金光禄大夫。建安十四年(209年),寿终正寝。', zhangheng:'张横,生卒年不详,武威郡姑臧人,东汉末年凉州军阀之一。与梁兴、贾诩、段煨乃是同乡。建安三年(198),张横与梁兴、段煨等斩杀李傕。十六年(211),同韩遂、马超联合,起兵反抗曹操,兵败后不知所终。', tangji:'唐姬,会稽太守唐瑁女,弘农怀王刘辩的妃子。刘辩死后,唐姬回归故里,因节烈不愿改嫁他人,后被汉献帝下诏封为弘农王妃。', - yangwan:'杨氏(婉字出自小说,史书无记载),生卒年不详,东汉末年凉州人。早年嫁于东汉前将军、槐里侯马腾之子马超,追随马超转战并州、雍州、凉州,为马超生下子嗣。公元212年,马超联军在渭南战败后,杨婉随马超逃亡凉州,很快马超反攻吞并陇上诸郡县。公元213年,杨婉为了帮助马超,结识王异,了解马超这些投降部下。可惜被王异蛊惑,遭致马超大败。自己和孩子都被赵衢、梁宽杀害。', wenqin:'文钦(?~258年),字仲若,沛国谯郡(今安徽省亳州市)人,三国时期曹魏将领,曹操部将文稷之子。魏明帝太和年间文钦任牙门将、五营校督,后拜庐江太守、冠军将军,嘉平元年(249年),曹爽及其同党在高平陵之变中被杀,文钦心中不安,执政的司马氏集团为了安抚文钦,升其为前将军、扬州刺史,任职期间结交镇东将军毌丘俭。击退吴国太傅诸葛恪进攻,取得一定战果。正元二年(255年),文钦与镇东将军毌丘俭在扬州起兵讨伐司马师,兵败后投奔吴国,被封为镇北大将军、幽州牧,封谯侯。甘露二年(257年),文钦随吴军援救起兵反抗司马氏的诸葛诞,此后因被司马昭大军围困,军情告急,文钦与诸葛诞本就有矛盾,对文钦日益不满的诸葛诞遂将文钦杀死。淮南平定之后,文钦遗体被其二子收敛安葬。', - heyan:'何晏(?-249年),字平叔。南阳郡宛县(今河南省南阳市)人。三国时期曹魏大臣、玄学家,东汉大将军何进之孙(一称何进弟何苗之孙)。何晏之父早逝,司空曹操纳其母尹氏为妾,他因而被收养,为曹操所宠爱。少年时以才秀知名,喜好老庄之学,娶曹操之女金乡公主。魏文帝在位时,未被授予官职。魏明帝认为何晏虚浮不实,也只授其冗官之职。大将军曹爽秉政时,何晏与之共事,得以累官至侍中、吏部尚书,典选举,封列侯。高平陵之变后,与大将军曹爽同为太傅司马懿所杀,被夷灭三族。何晏有文集十一卷,并曾与郑冲等共撰《论语集解》,今已佚。钟嵘《诗品》称“平叔鸿鹄之篇,风规见矣。”将何晏诗列入中品。袁宏在《名士传》中将何晏等称为正始名士。他与夏侯玄、王弼等倡导玄学,竞事清谈,遂开一时风气,为魏晋玄学的创始者之一。', qiuliju:'丘力居,东汉末年的辽西乌丸大人。拉拢中山太守张纯反叛东汉,寇略青、徐、幽、冀四州,杀略吏民。死时认为儿子楼班年幼,于是让从子蹋顿总摄三王部。', - fengxi:'冯熙(?—223年),字子柔,颍川郡父城县(今河南省平顶山市宝丰县)人。汉末三国时期吴国官员,东汉初年名将冯异的后人。孙权担任车骑将军时,冯熙担任其幕府东曹掾,后迁立信都尉。刘备去世时,奉命进入蜀汉吊丧,返回后,任中大夫。后奉命出使魏国,受到魏文帝曹丕和尚书令陈群招揽,宁死不从,自尽未果。孙权闻之流泪,称其“东吴苏武”。最终在曹魏死去。', liuba:'刘巴(?-222年),字子初,荆州零陵郡烝阳县(今湖南省衡阳县、邵东县一带)人,东汉末年至三国时期蜀汉时期官员、名士。刘巴少知名,荆州牧刘表多次征用推举,刘巴均不应就。曹操征伐荆州,荆州士人多归刘备,刘巴却北上投靠曹操。后受曹操命令招降荆南三郡,不料先为刘备所得,刘巴不能复命曹操,遂远至交趾,又辗转进入益州。刘备平定益州后,刘巴归附刘备,为左将军西曹掾,法正死后接任尚书令。章武二年(222年)去世。刘巴博学多才,为刘备解决入蜀后的财政困难问题,又与诸葛亮等共制蜀汉的法律文件《蜀科》。为人简朴清高,退无私交,曹魏大臣陈群甚敬重之。所著录于《刘令君集》。', pengyang:'彭羕(184年-220年),字永年,广汉(今四川广汉北)人。东汉末年官吏。彭羕起初在益州任书佐,但后来其他人向益州牧刘璋诽谤他,刘璋于是以“髡钳”(剃去头发和胡须,并戴上刑具)处罚他,并且贬奴隶。此时刘备入蜀,彭羕想投靠刘备,于是去见庞统。庞统和他会面后很欣赏他,而法正亦很清楚彭羕,于是二人共同向刘备推荐彭羕。刘备多次命令彭羕传递军情和指示给诸将,表现都十分满意,日渐被赏识。刘备入主益州,领益州牧后就任命他为治州从事。彭羕见此,又变得嚣张自矜,诸葛亮对他礼待但心中并不喜欢他,多次密告刘备,说彭羕“心大志广,难可保安”。刘备见诸葛亮这样说,决定疏远彭羕,又观察他行事,于是贬他为江阳太守。彭羕见将被派往外地,心感不悦,与马超见面时又曾对他说“老革荒悖,可复道邪!”“卿为其外,我为其内,天下不足定也。”马超听后大惊,彭羕走后以他的说话告发彭羕,彭羕于是被收监下狱。最后彭羕被处死,死时三十七岁。', - huaxin:'华歆(157年-232年1月30日),字子鱼,汉族。平原郡高唐县人(今山东省高唐县)。汉末至三国曹魏初年名士、重臣。华歆早年拜太尉陈球为师,与卢植、郑玄、管宁等为同门,又与管宁、邴原共称一龙,华歆为龙头。汉灵帝时华歆被举为孝廉,任郎中,因病去官。又被大将军何进征召为尚书郎。后任豫章太守,甚得民心。孙策率军南下,华歆举郡投降,被奉为上宾。官渡之战时,被征为议郎、参司空军事。入为尚书、侍中,又代荀彧为尚书令。丞相曹操讨孙权时,授华歆为军师。后为魏王国的御史大夫。曹丕即王位,拜华歆为相国,封安乐乡侯。曹魏建立后,其相国职名改称司徒。魏明帝即位,升任太尉,晋封博平侯。太和五年十二月(232年1月),华歆去世,年七十五,谥号“敬”。有文集三十卷,今佚失,其余见《全三国文》。', - luyusheng:'陆郁生(?年-?),三国时期吴国官员陆绩之女。陆郁生的父亲陆绩是吴郡公认的才子,又是当时吴郡陆氏的领袖。陆绩赴任担任郁林太守,遂取此名。陆郁生年少的时候就定下坚贞的志向。建安二十四年(219年),陆绩早亡,她与两个兄弟陆宏、陆睿当时都只有几岁,一起返回吴县,被他们的从兄陆瑁接回抚养。13周岁的陆郁生嫁给同郡出身的张白为妻。出嫁3个月后,张白因为其兄张温一族的案件遭到连坐,被处以流刑,后死于流放地,陆郁生成为了寡妇,其后公开宣言不再改嫁,困难于生计但拒绝了所有提亲,在艰苦中从未停止服侍、照顾张白的姐妹。事情传到朝廷,皇帝褒奖陆郁生,号其为“义姑”。她的表侄姚信在文集中称赞她的义举。', dongxie:'董卓之女,牛辅之妻。在《三国群英传》中名为董宜,在电视剧《三国群英会之吕布与貂蝉》中名为董媛。', caoanmin:'曹安民(?-197年),沛国谯县(今安徽亳州)人,字安民。东汉时期人物,曹德之子,曹操之侄,曹昂的堂兄弟,曹丕的堂兄,死于宛城之战。按曹丕《典论》记载的“亡兄孝廉子脩、从兄安民遇害。”等情况来看,安民应该是曹操侄子错不了,曹丕是他们属于兄弟关系肯定不会弄错。另外从典论的记载来看安民是和子脩并提的,子脩是曹昂的字,安民则肯定也是字不是名,至于三国志中记载则应取自曹丕之《典论》但陈寿又不知曹安民其名,故写为“长子昂、弟子安民”。', dufuren:'杜夫人(生卒年不详),东汉末年至三国时人。有异色,原为吕布将秦宜禄之妻,生子秦朗。后为曹操纳为妾,又生曹林、曹衮、金乡公主。', - lvlingqi:'吕玲绮,虚拟人物,源于日本光荣株式会社(现光荣特库摩公司)旗下游戏《真·三国无双》系列,初次登场于《真三国无双7:猛将传》。吕布的女儿,寂寥而威风凛凛的战姬,发挥着不亚于父亲的武艺,非常勇敢地身先士卒立于前线。虽然有着能够直面困难的坚强意志,却由于过去的经历而有着非常害怕孤独的一面。', - zhouyi:'周夷,游卡桌游旗下产品《三国杀》自行杜撰的人物。设定为周瑜的妹妹,和周瑜一同征战。', mifangfushiren:'麋芳(生卒年不详),字子方,东海郡朐县(今江苏省连云港市)人。汉末三国时期蜀国将领,刘备糜夫人的兄弟。麋芳本为徐州牧陶谦部下,曾被曹操表为彭城相。后来辞官,随刘备从徐州辗转至邺城、汝南、新野、长坂坡、江夏等地,奔波多年。傅士仁(生卒年不详),字君义,幽州广阳郡(今北京市)人,刘备手下将领。受到刘备的重用,但被关羽轻慢。
    刘备称汉中王时,糜芳为南郡太守,但受到关羽的轻慢。后来,因未完成供给军资的任务而被关羽责骂,心中不安。吕蒙袭取荆州时,将已经投降的傅士仁展示给糜芳,麋芳于是选择投降,导致关羽兵败被杀。此后,在吴国担任将军,并且为吴征伐。', tongyuan:'童渊,字雄付,武术名家,与并州李彦是结拜兄弟,两人均师承义父玉真子,两人分别娶了河北颜家的两位大小姐颜云、颜雨。童飞之父,有张任、张绣为入室弟子,晚年收赵云为关门弟子,传其毕生所学。其成名技为“百鸟朝凤枪”。童渊是南方苏州评话三国中的原创人物,在历史中以及《三国演义》中并不存在。', - liuyong:'刘永,字公寿,涿郡涿县(今河北涿州)人,三国时期蜀汉昭烈帝刘备之子,蜀汉后主刘禅之弟。章武元年(221年)六月,封鲁王。建兴八年(230年),改封甘陵王。咸熙元年(264年),蜀汉灭亡,刘永被迁往洛阳,被任命为奉车都尉,封乡侯。', //zhangning:'张宁,东汉末年大贤良师张角的女儿。自幼学习太平道法,掌握天地法则。', - wanniangongzhu:'刘氏(生卒年不详),河南郡雒阳县(今河南省洛阳市)人,汉灵帝刘宏之女,汉少帝刘辩与汉献帝刘协的姐妹,封万年公主。', xinping:'辛评(?-204年),字仲治,颍川阳翟人,东汉末年人物。曹魏卫尉辛毗之兄。原是韩馥部下,韩馥逃亡后转而辅佐袁绍。袁绍死后,辛评、郭图欲立袁谭为主,与审配等不和。后来曹操破邺,其弟辛毗在城下劝降。审配怒遣手下将辛评全家杀害。', hanmeng:'韩猛,又名韩若、韩荀、韩泣(上荀下大) ,东汉末年袁绍帐下名将,或与《曹瞒传》所言韩莒子为同一人。公元200年,官渡之战爆发。袁绍派遣韩猛劫掠曹操军的西道,被曹军部将曹仁击破于鸡洛山。袁绍又派韩猛前去运送粮车,因为轻敌被曹军部将徐晃、史涣击退。', - caojinyu:'金乡公主,本姓曹氏,名字不详,沛国谯县(今安徽省亳州市)人。魏武帝曹操的女儿,母为杜夫人。适婚的时候,嫁给曹操的养子何晏。高平陵之变,何晏作为大将军曹爽的党羽,遭到太傅司马懿处死。在何晏母亲尹夫人苦苦哀求下,何晏的儿子得以保全。', - wangtao:'王桃是在《花关索传》中登场的虚拟人物,盗贼王令公的两个女儿之一,王悦的姐姐,与妹妹都是关索之妻。姐妹俩原为卢塘寨山贼,以武艺与美貌而闻名,被众多男性求婚却皆不与理睬。她们在关索回西川认父途中与关索交手时不敌,因意气投合而一齐下嫁。虽为架空之人物,但四川省内有记述夫妻三人共同守护葭萌关一事,民间亦流传如夫妻三人曾共同参与诸葛亮之南蛮征伐等轶事。', - wangyue:'王悦是在《花关索传》中登场的虚拟人物,盗贼王令公的两个女儿之一,王桃的妹妹,与姐姐都是关索之妻。姐妹俩原为卢塘寨山贼,以武艺与美貌而闻名,被众多男性求婚却皆不与理睬。她们在关索回西川认父途中与关索交手时不敌,因意气投合而一齐下嫁。虽为架空之人物,但四川省内有记述夫妻三人共同守护葭萌关一事,民间亦流传如夫妻三人曾共同参与诸葛亮之南蛮征伐等轶事。', - zhaoyan:'赵嫣,生卒年不详。东吴方士(一说是丞相)赵达之妹,吴大帝孙权之妃,人称赵夫人。她心灵手巧,多才多艺,有“三绝”之称。孙权曾经想要找擅长绘画之人绘制山川地势军阵之图。赵达举荐了自己的妹妹。赵嫣认为水墨容易褪色,不方便在军旅之中保存。自己擅长刺绣,可以在锦帛上绣出孙权所需之图。待制作完成后献于孙权,只见方帛锦绣之上有五岳河海城邑行阵之形,孙权大为赞叹。时人谓之“针绝”。除刺绣之外,赵嫣还擅长绘画织锦,她能用彩丝织成云霞龙蛇之锦,大则盈尺,小则方寸,宫中谓之“机绝”。孙权在昭阳宫居住之时,饱受暑气之扰,以紫绡制成帷帐缓解暑气。赵嫣认为此物不足为贵,她削下自己的头发剖为细丝,以郁夷国出产的神胶连接,花了数月功夫将其制成一顶幔帐,打开之后薄如蝉翼,轻赛寒烟。放下帐帷能笼罩一丈之地,帐内清风自生暑意顿消。收起来则可纳入枕中,携带方便。时人谓之“丝绝”。', yanfuren:'《三国志》中东汉末年著名武将吕布有一妻子,但姓名未载于史书,或为魏续的姐妹魏氏。在李傕郭汜之乱期间曾受困,幸亏被庞舒所救,私藏于府中而得以幸免。吕布被曹操围困时,反对陈宫的计谋,导致了吕布的失败。《三国演义》中,姓严,通称严夫人,和吕布生有一女欲嫁于袁术之子,未果,吕布失败后与其女一同送往许昌。', haomeng:'郝萌(?-196年),东汉末年吕布帐下名将。建安元年(196年),郝萌在袁术的怂恿下反叛吕布,曾一度打得吕布躲入厕所。后来,被吕布部将高顺所阻,其部将曹性临阵反叛,最终被高顺所杀。在小说《三国演义》中,吕布被围下邳时,郝萌护送许汜王楷回城时,被张飞擒获,被曹操所杀。', - wufan:'吴范(?-226年),字文则,会稽上虞(今浙江绍兴上虞区)人。三国时期孙吴官员,擅长术数。与刘惇、赵达、严武、曹不兴、皇象、宋寿和郑妪合称“吴中八绝”。吴范以推算天象节气和观察气候闻名于郡中。孙权起于东南,他委身事奉,每推算灾祥多应验,遂显名。孙权委以骑都尉,领太史令。初,孙权为将军时,他曾说江南有王气。及孙权立为吴王,论功行封,欲以为都亭侯,但因不愿将其术要诀告知孙权,为权所怨恨,被除名。黄武中,病死。', - mamidi:'马日(mì)磾(dí)(?~194年),字翁叔。扶风茂陵(今陕西省兴平市)人。东汉中后期大臣,经学大师马融之族孙(一作族子)。马日磾年轻时即继承马融学说,以才学入仕。曾任谏议大夫,与蔡邕、卢植等人东观典校官藏的《五经》记传,并参与续写《东观汉记》。后历任射声校尉、太尉、太常等职。初平三年(192年),掌权的李傕任命马日磾为太傅、录尚书事,与太仆赵岐共同出使关东。他到寿春袁术处后,对其多有所求,遭袁术轻鄙,袁术遂夺其符节,来随意征辟将士,并企图强迫马日磾任其军师,马日磾求去不能,忧愤发病,兴平元年(194年),卒于寿春。', licaiwei:'李采薇,生卒年不详,汉末将领庞德之妻,庞会之母。襄樊之战时,庞德任先锋,随于禁率军增援驻守樊城的曹仁。出战前,他将妻子李采薇与年仅六岁的儿子庞会叫来面前,对李采薇说:“吾今为先锋,义当效死疆场。我若死,汝好生看养吾儿。吾儿有异相,长大必当与吾报仇也。”李采薇闻言,与儿子痛哭送别庞德。她知道丈夫已下定决心,若无法胜利归还则必当战死沙场,绝不会投降求生。其后前线果然传来消息:魏军全军覆没,于禁投降,庞德誓死不降被关羽所杀。其子庞会自幼丧父,由母亲抚养长大。成年后,庞会性格勇烈,有先父之风。他多次立下战功,深受魏文帝曹丕的喜爱。后来庞会随钟会、邓艾伐蜀,成都城破之后,尽灭关氏家以报父仇。', - tengyin:'滕胤(?-256年),字承嗣,三国时期吴国重臣,北海郡剧县(今山东省昌乐县)人。滕胤仪表堂堂,少时有节操,后娶公主为妻。孙权称王后,滕胤被封都亭侯。其后历任丹杨太守、吴郡太守、会稽太守。孙亮继位后,出任太常、卫将军。诸葛恪被杀后,群臣推举滕胤为司徒,但遭权臣孙峻党羽所阻挠,滕胤也有意避嫌,最终只晋爵高密侯。孙峻死后,由其堂弟孙綝执政。滕胤的连襟、骠骑将军吕据联系北伐前线诸将推举滕胤为相,希望分割孙綝权力,但并未成功,滕胤被改任大司马,镇守武昌。不久,滕胤与吕据密谋推翻孙綝,因计划泄露而被杀,惨遭灭族。孙綝被杀后,景帝孙休为滕胤平反。', - guanning:'管宁(158年—241年),字幼安。北海郡朱虚县(今山东省安丘、临朐东南)人。汉末三国时期著名隐士。管宁与华歆、邴原并称为“一龙”。汉末天下大乱时,与邴原及王烈等人避于辽。在当地只谈经典而不问世事,做讲解《诗经》《书经》,谈祭礼、整治威仪、陈明礼让等教化工作,人们都很乐于接受他的教导。直到魏文帝黄初四年(公元223年)才返乡,辽东太守公孙恭亲自送别。此后曹魏几代帝王数次征召管宁,他都没有应命。正始二年(公元241年),管宁逝世,年八十四。著有《氏姓论》。', - caomao:'曹髦(241年11月15日-260年6月2日)[1],字彦士,沛国谯县(今安徽省亳州市)人,魏文帝曹丕之孙,东海王曹霖之子,曹魏第四位皇帝(254年11月1日-260年6月2日)。正始二年(241年),生于东海王宫,自幼聪明好学,才慧早成,正始五年(244年),封为高贵乡公,嘉平六年(254年),大将军司马师废除齐王曹芳后,拥立为帝,年号正元,曹髦文才武略,崇拜少康,不满司马氏专权秉政,甘露五年(260年),亲自讨伐司马昭,为太子舍人成济所弑,年仅十九岁,以王礼葬于洛阳西北。曹髦擅长诗文,创制了九言诗,传世文章有《伤魂赋并序》《颜子论》等。爱好儒学,亲赴太学论道,著有《春秋左氏传音》(失传)。精通绘画,一说为中国第一位成为画家的皇帝,唐张彦远《历代名画记》目曹髦为中品。', - laiyinger:'来莺儿,是个传说中的人物,正史及古代典籍并无记载。相传来莺儿是东汉歌妓,建安年间洛阳名妓,后爱上曹操的侍卫王图,王图因延误军机而押赴刑场,当时来莺儿奋不顾身以己命换王图一死。新编古装潮剧《曹营恋歌》,秦腔《雀台歌女》讲述了歌女来莺儿与情人王图及曹操三人之间催人泪下的故事。', - tenggongzhu:'滕公主,名讳不详,三国人物,吴大帝孙权之女。一说为养女,生父为孙权堂弟孙奂。黄武年间(222年—228年),以公主身份下嫁功臣滕胄之子滕胤,当时滕胤年仅20岁。滕胤皮肤白皙,容貌俊美,每逢入朝大臣们没有不惊叹称羡的。滕胤仕官后,上书言及时局,又对政策多有匡弼。孙权对公主也特别宠爱,因为滕胤的缘故,又格外增加对公主的赏赐,又几次探望慰劳。少帝孙亮时期,孙綝以宗室身份独揽大权作恶多端,引发群臣不满。五凤三年(256年)滕胤与连襟吕据密谋推翻孙綝,事败遭到夷三族 。公主则被亲兄孙壹救出,携其逃亡曹魏。', - zhangyao:'张美人,三国东吴末帝孙皓后妃,张布之女。另有张布女,张美人姊被孙皓立为左夫人。《吴书五妃嫔传第五》:江表传曰:皓以张布女为美人,有宠,皓问曰:“汝父所在?”答曰:“贼以杀之。”皓大怒,棒杀之。后思其颜色,使巧工刻木作美人形象,恒置座侧。问左右:“布复有女否?”答曰:“布大女适故卫尉冯朝子纯。”即夺纯妻入宫,大有宠,拜为左夫人,昼夜与夫人房宴,不听朝政,使尚方以金作华燧、步摇、假髻以千数。令宫人著以相扑,朝成夕败,辄出更作,工匠因缘偷盗,府藏为空。会夫人死,皓哀愍思念,葬于苑中,大作冢,使工匠刻柏作木人,内冢中以为兵卫,以金银珍玩之物送葬,不可称计。已葬之后,皓治丧於内,半年不出。国人见葬太奢丽,皆谓皓已死,所葬者是也。皓舅子何都颜状似皓,云都代立。临海太守奚熙信讹言,举兵欲还诛都,都叔父植时为备海督,击杀熙,夷三族,讹言乃息,而人心犹疑。', yanrou:'阎柔(生卒年不详),燕国广阳(今北京市附近)人。三国时期曹魏名将。年少时曾被乌丸、鲜卑俘虏,后来却得到他们的信任。刘虞死后,阎柔被鲜于辅等推举为乌丸司马,联系鲜卑为刘虞报仇,和公孙瓒对抗。在官渡之战时归曹操,拜护乌丸校尉,对曹操讨伐乌丸有功,赐爵关内侯。曹操待其如子,曹丕也视其如亲兄弟,阎柔坐镇北方,统帅幽州兵马,抗击胡人的入侵。曹丕即位后,阎柔被拜为度辽将军。', - zhangxuan:'张嫙,三国时期孙吴将领张布之女,孙皓后妃张媱的姐姐。初为卫尉冯朝之子冯纯的妻子,后为孙皓后妃,册封左夫人。因孙皓诛灭张布,张媱口吐怨言,被暴怒的孙皓下令棒杀。后来孙皓怀念她的容颜,于是询问侍从:“张布还有女儿吗?”侍从回答:“张布的大女儿嫁给了已故卫尉冯朝的儿子冯纯。”于是孙皓夺走了冯纯的妻子张嫙,纳入宫中。孙皓颇为宠爱张嫙,册封其为左夫人。昼夜嬉戏,纸醉金迷,不理朝政。后来张嫙也去世了,孙皓非常悲伤,下令以最高的规格埋葬张嫙。因为悲伤过度,孙皓一度半年都不出宫门,甚至由于葬礼太过奢华被宫外之人认为孙皓已经死了。', qinyilu:'秦宜禄(?—200年),并州云中郡云中县人(今内蒙古自治区呼和浩特市托克托县古城镇)。东汉军阀吕布的部将。吕布战败后归降曹操,后为张飞所杀。', - caohua:'曹华,东汉末年人物,曹操之女,为汉献帝妃嫔。建安十八年(213年),曹操进为魏公,把曹宪、曹节、曹华三个女儿,一齐都送给汉献帝刘协做了妃子,皆封为夫人,聘以束帛五万匹,年龄尚小者在魏公国待年长而聘。', - zhaoang:'赵昂,字伟章(一作伟璋),天水冀人。汉末时曹操部下。初为羌道令,建安中转参军事徒居州治冀城。建安十八年,马超围冀城多天,城中饥困,凉州刺史韦康不愿百姓再受苦而打算投降,赵昂进劝但不为所纳。后马超背信弃义杀韦康并劫其子赵月为人质,把他送至南郑。欲以此要迫使赵昂为己所用。后与梁宽、赵衢、庞恭、杨阜等结谋为康报仇,并举兵讨伐马超。马超兵败遂弃城,投奔张鲁。得张鲁之援后马超于建安十九年复寇,赵昂与妻子王异坚守祁山三十天至夏侯渊的救兵解围,其子赵月终为马超斩杀。自冀城之难,至于祁山,赵昂出九奇策。', fengfang:'冯方,其字不详,司隶人。初掌校事,监察京师及周边地区,刺探文武百官秘事。十常侍之乱后,董卓进京,掌控朝政。冯方认为他胸怀不臣之心,于是弃官携女儿冯妤至江南避祸。其后董卓果然乱政,京师之地生灵涂炭,更将洛阳付之一炬。冯方因其先见之明得以保全家人。
    冯妤长大成人后,有倾国之貌。一日袁术登城观景,得见冯妤,心中非常喜欢,于是将其纳为夫人。冯方心忧自家女儿不谙世事,于是将可以让人更显妩媚的家传宝梳交给她,希望能借此使其获得袁术的宠爱。其后果然传来袁术偏爱冯夫人的消息,冯方因此宽心,接受了袁术的征辟,为其效力。然而好景不长,没过多久,冯妤自缢身亡的消息传出,冯方悲愤不已,弃官而走,自此销声匿迹。', - zhangxun:'张勋,东汉末年军阀袁术帐下大将,袁术称帝后受封大将军。初平四年(公元193年),袁术引兵入陈留,被曹操、袁绍合力击败,逃至雍丘。后入九江,杀死扬州刺史陈温而自领之,并任命张勋、桥蕤为大将。时孙策依附于袁术,被表为怀义校尉,张勋对其倾心敬服。袁术称帝后,任命张勋为大将军,攻打吕布,大败而还。其后曹操又以袁术称帝为名南下进攻,袁术闻之大惊,即走度淮,留张勋、桥蕤守蕲阳以拒曹。曹操破其军,斩桥蕤,张勋退走。建安四年(公元199年),袁术病死,张勋率残军欲南投孙策,途中被袁术旧部刘勋俘虏,其后下落不明。', - xiahoulingnv:'夏侯令女,字令女,名不详。生卒年不详,三国时期人物。夏侯文宁之女(《三国演义》中为夏侯令之女),曹文叔之妻。其事迹见于《三国志·魏书·诸夏侯曹传第九》裴松之注引皇甫谧《列女传》。而在《三国演义》中,由于作者断句错误,便认为“夏侯令女”是“夏侯令之女”之意(见《三国演义》第107回:“乃夏侯令女也”,由其语气可推断)。', bianxi:'小说《三国演义》里的人物。汜水关守将,并州人氏。原是黄巾余党,后投曹操,拨来守汜水关。善使流星锤。在镇国寺设下伏兵欲谋害千里寻兄的关羽,但是寺中僧人普净暗示加以解救。最后被关羽斩杀。', niufu:'牛辅,东汉末年武将,东汉相国董卓的女婿。曾任中郎将,征讨白波军,不能取胜。董卓被杀时,牛辅别屯于陕地。吕布派李肃前去征讨牛辅,被牛辅击败。后来,牛辅营中有士兵半夜背叛出逃,造成内乱,牛辅以为整营皆叛,于是带着金银珠宝,独与亲信胡赤儿等五六人逾城北渡河。赤儿等人以绳索系在牛辅腰间将其从城头放下,但赤儿等因为谋财而在离地面数丈高的地方就松开了绳子使得牛辅重重摔在地上腰部受伤,而后赤儿与诸胡人将牛辅斩首,将其首级送去长安。', - huzhao:'胡昭(162年-250年),字孔明,颍川(治今河南禹州)人。汉末三国时期隐士、书法家。胡昭善长隶书,与钟繇、邯郸淳、卫觊、韦诞齐名。有“钟氏小巧,胡氏豪放”之说,世人并称“钟胡”。', - guanhai:'管亥(生卒年不详),青州黄巾军渠帅,率军侵略北海,围北海相孔融于都昌。孔融派遣太史慈突围而出,前往平原向刘备求援,刘备率军来到,击退管亥。《三国演义》中管亥在单挑中为关羽斩杀。', - liuhui:'刘徽(约225年—约295年),汉族,山东滨州邹平市人,魏晋期间伟大的数学家,中国古典数学理论的奠基人之一。在中国数学史上作出了极大的贡献,他的杰作《九章算术注》和《海岛算经》,是中国最宝贵的数学遗产。刘徽思想敏捷,方法灵活,既提倡推理又主张直观。他是中国最早明确主张用逻辑推理的方式来论证数学命题的人。刘徽的一生是为数学刻苦探求的一生。他虽然地位低下,但人格高尚。他不是沽名钓誉的庸人,而是学而不厌的伟人,他给我们中华民族留下了宝贵的财富。2021年5月,国际天文学联合会(IAU)批准中国在嫦娥五号降落地点附近月球地貌的命名,刘徽(liuhui)为八个地貌地名之一。', - zhangfen:'张奋,徐州彭城(今江苏徐州)人。三国时期孙吴将领,辅吴将军张昭的侄子。善于制作攻城器械。在步骘举荐下,担任将军,累迁平州都督,册封乐乡亭侯,病逝于任上。', - dukui:'杜夔[kuí],字公良,河南人,擅长音律,聪明过人。管弦等各种乐器,他无所不能。他长期总管歌舞音乐,精心研究,继承复兴了前代古乐,并有所创新。仕于曹操、曹丕之世,以通晓音乐称于世。早年任雅乐郎,汉中平五年(188年),因病离职。州郡的司徒以礼相请,他因时世混乱而奔荆州。荆州牧刘表的儿子刘琮投降曹操后,曹操以杜夔为军谋祭酒 ,参与太乐署之事,令他创制雅乐。魏文帝曹丕黄初年间,任太乐令、协律都尉。', - quanhuijie:'全皇后(244年-301年),吴郡钱塘(今浙江杭州)人,吴废帝孙亮的皇后,全尚之女,母孙恭之女。吴大帝长女全公主的侄孙女。赤乌十三年(250年),因全公主推荐全氏被册为孙亮的太子妃,建兴二年(253年),全氏被立为皇后。太平三年(258年),孙亮被权臣孙綝贬为会稽王,全皇后也一同贬为会稽王夫人。永安三年(260年),全皇后随夫到侯官,孙亮在途中死去,全皇后在侯官居住二十余年,吴亡后返回吴郡,永宁元年(301年)去世。', - yinfuren:'尹夫人,原汉大将军何进的儿媳,丈夫早逝,生有一子何晏。曹操任司空时娶尹氏为妾,一并收养何晏,并生有一子曹矩。', - chengui:'陈珪(生卒年不详),一作圭,字汉瑜。徐州下邳(治今江苏睢宁西北)人,广汉太守陈亹之孙,太尉陈球之侄,吴郡太守陈瑀(一作陈璃)、汝阴太守陈琮的从兄,陈登、陈应之父。官至沛相。', - dingshangwan:'丁尚涴,又名丁夫人。东汉末年权臣曹操的原配夫人。丁尚涴嫁给曹操时,曹操另有刘夫人,生长子曹昂和清河长公主。后刘夫人早亡,曹昂便由丁尚涴抚养,丁尚涴视其为己出。
    建安二年(公元197年),曹昂随军出征宛城,战死沙场。丁尚涴悲痛欲绝,口出怨言数落曹操,又悲啼不止。曹操恼羞成怒,将其打发回了娘家。不久之后,心生悔意的曹操亲自前往丁家,打算将丁尚涴接回。然而丁尚涴却只是闷头织布。曹操手抚其背,说:“顾我共载归乎!”丁尚涴依旧不理不睬。曹操走到门口,又回过头:“得无尚可邪!”然而依旧得不到回应,只得感叹:“真诀矣。”于是与之和离,并让丁家允许她改嫁,丁家不敢为之。
    丁尚涴去世后,卞夫人请求曹操安葬她,于是葬在许城以南。后来曹操病重,知道自己时日无多,临终前叹道:“我前后行意,于心未曾有所负也。假令死而有灵,子修若问‘我母所在’,我将何辞以答!”', - luyi:'卢弈,游卡桌游《三国杀》中虚构的人物。设定为卢植之女。至情至孝。其人虽体弱多病,然而却天资聪颖,有过目不忘、出口成章之才。先后拜蔡邕、王允等人为师,纳诸家之长融会贯通。又善弈棋,曾与当时国手山子道、王九真、郭凯对弈,不分胜负,一时之间名动京华,被太学征辟为女博士,世人皆称其为“女先生”。董卓之乱后,卢弈随父亲隐居乡野,创办上谷学宫,邀天下士子论道。相传诸葛亮、曹植、荀彧、张昭等人都参加过。各学派在卢弈主持下论道,成为一时佳话。后上谷学宫遭曹魏所忌,卢弈为请求曹叡赦免学宫,与司马懿对无棋之弈。卢弈破指凝血,以血为棋,终胜司马懿半子。但却旧伤复发,局终而陨。', wangwei:'王威,东汉末年人。荆州刺史刘表部下将领,乃忠义之士。刘表亡后,刘琮投降曹操,王威向刘琮献计偷袭曹操,刘琮没有采纳。小说《三国演义》中,曹操表刘琮为青州刺史,使远离故乡,时只有王威追随,曹操复遣于禁追杀刘琮等人,王威亦于乱军中殉主。', - wanglie:'王烈,字彦方(141-219),平原县(今山东德州平原)人。生于永和六年(公元141年),卒于建安二十三年(公元218年)。王烈少时师从陈寔,闻名遐迩。董卓作乱时避乱辽东,并多次拒绝曹操的聘请。七十八岁时病死于辽东。', - zhaozhi:'赵直,豫章人,生于公元175年左右,死年不详,字不详。为蜀汉官方占梦者。曾预言蒋琬位极人臣、何祗48岁去世、魏延离死期不远,后果一一应验。', liyixiejing:'李异(生卒年不详),三国时吴将领,曾随陆逊大败蜀军。谢旌(生卒年不详),三国时期吴国名将,会稽(今属浙江)人。建安末,李异与谢旌率水陆三千,破蜀将詹晏、陈凤。刘备领兵攻孙权,李异与陆议等屯巫、秭归,为蜀将所破。黄武元年(222),陆逊破刘备于猇亭,他追踪蜀军,屯驻南山。建安二十四年,陆逊击败关羽后,遣李异、谢旌二人将水陆军三千,进攻蜀将詹晏、陈凤。李异率水军,谢旌率陆军,于险要之地设防,击败詹晏,生擒陈凤。其后进攻房陵太守邓辅、南乡太守郭睦,大破之。又攻秭归大姓文布、邓凯等所合夷兵数千人,大胜,文布、邓凯落荒而逃。在《三国演义》中,两人为孙桓麾下部将,皆有“万夫不当之勇”。刘备攻吴时,谢旌迎战张苞,不敌败走。李异接战,被关兴所斩。次日,谢旌于乱军中被张苞一矛刺死。', - panghui:'庞会,(214—?),三国时期曹魏名将,庞德之子。曹丕即位后,思庞德忠烈,遂赐庞会等兄弟四人爵关内侯,邑各百户。庞会勇烈,有先父之风,官至中尉将军,封列侯。', - chenjiao:'陈矫(?-237年7月11日),字季弼,广陵郡东阳县(治今安徽省天长市西北,今地属江苏省如皋市)人。三国时期曹魏名臣。陈矫本姓刘,因过继与母族而改姓陈。早年避乱江东,后广陵太守陈登请为功曹。曹操辟为丞相掾属,迁任相县令,转任征南长史。又为彭城、乐陵太守,迁任魏郡西部都尉。曹操东征,拜丞相长史,转西曹属、尚书。曹丕称帝,领吏部事,封高陵亭侯,迁尚书令。明帝继位后,进爵东乡侯,后转侍中,加光禄大夫,又拜司徒。景初元年(237年),陈矫去世,谥贞侯。', shiyi:'是仪(生卒年不详),本名氏仪,字子羽,北海郡营陵县(今山东昌乐)人,三国时期吴国官员。仕东汉、东吴两朝,早年曾在本县营陵县及本郡北海郡任官,后在东吴历任骑都尉、忠义校尉、裨将军、偏将军、侍中、中执法、尚书仆射等官。先封都亭侯,后进封都乡侯。年八十一岁时病逝,死前要求节葬。', sunlang:'孙狼(生卒年不详),东汉末农民起义军首领。建安二十三年(218)陆浑(今河南嵩县东北)县长张固发民服徭役,百姓惶俱,狼等乘机发动起义,杀县主簿,攻破县城,后南下投奔蜀将关羽。', - dongguiren:'董贵人(?—200年),父董承,汉献帝刘协妃嫔之一。董贵人父亲被曹操所杀,自己也受牵连。董贵人虽有身孕,汉献帝数次为她向曹操求情,仍被杀。', - zhujianping: '朱建平(生卒年不详),汉末三国时期沛国(今安徽省)人。精通相术,于街巷之间为人相面,效果非常灵验。三国时,他在街头巷尾给人们看相。曹丕做五官将时,请他看相,朱建平说:将军寿命80,40会有小难,愿您多多保护。 又说曹彪:您居于自己的封国,到57当遭兵灾,要好好提防此事。 结果曹丕40去世,曹彪57岁时,犯了与王凌合谋罪,被赐死。他的妙算,都这么准确,即使是唐举,许负也比不上。时人将他与平原郡相士管公明并称为“朱”、“管”。', - yuanji:'袁氏(生卒年不详),汝南郡汝阳县(今河南商水)人,袁术之女,孙权妃嫔。袁夫人出身世家大族汝南袁氏,其父袁术败亡后,入吴宫拜为夫人,以节操品行着称。', - chengbing:'程秉(生卒年不详),字德枢,汝南南顿(今河南项城西)人。三国时期吴国官员、儒学家。起初跟随郑玄,后来北方荒乱而到交州避难,期间与刘熙考究五经大义,因此通绕五经。后来交趾太守士燮任命程秉为长史。吴大帝孙权听闻程秉的名声,于是以礼征召他,程秉到后,被任命为太子太傅。黄武四年(225年),孙权为太子孙登娶周瑜之女为妃,程秉以太常身份于吴郡迎候,孙权亲身上程秉的船,可见孙权对他的极为礼待。程秉又教诲孙登对婚后相处要尊重儒家礼教。后来因病在任职期间逝世。著有《周易摘》、《尚书驳》、《论语弼》,凡三万余言。', - gongsundu:'公孙度 (?-204年),字升济,辽东襄平(今辽宁辽阳)人,东汉末年辽东太守。少随父迁居玄菟郡。初为玄菟小吏,建宁二年(169年),继升尚书郎、冀州刺史,后被免官。初平元年(190年),经同乡徐荣推荐,被董卓任命为辽东太守。公孙度到任后,厉行严刑峻法,打击豪强势力,使令行政通,羽翼渐丰。不久,中原地区董卓乱起,各地军阀无暇东顾。公孙度趁机自立为辽东侯、平州牧。继则东伐高句丽,西击乌桓,南取辽东半岛,越海取胶东半岛北部东莱诸县,开疆扩土;又招贤纳士,设馆开学,广招流民,威行海外,俨然以辽东王自居。建安九年(204年)病逝,子公孙康继承其位由于公孙度的锐意进取和苦心经营,使辽东地区在汉末三国的战乱年代,获得了暂时的安宁,推动了当地生产技术和封建文化的发展。', - leibo:'雷薄(生卒年不详),本为东汉末年袁术麾下部将。离开称帝后昏庸奢侈的袁术,与陈兰一起占据嵩山为山贼。后来袭击兵败的袁术,抢夺财宝。同时在《三国演义》中也有出场。', - dc_zhouxuān:'周宣,生卒年不详,字孔和,乐安(治今山东高苑西北)人,擅长解梦,在郡做官时曾为太守解过梦,后又给曹丕解梦,都灵验。官至中郎,死于魏明帝末年。', sp_jiaxu:'字文和,武威姑臧人。三国时期魏国著名谋士。曾先后担任三国军阀李傕、张绣、曹操的谋士。官至魏国太尉,谥曰肃侯。', - xuelingyun:'薛灵芸,东晋王嘉志怪小说《拾遗记》中的人物,魏文帝曹丕的宫人,妙于针工,虽处于深帷之内,不用灯烛之光,裁制立成。凡不是薛灵芸缝制的衣服,文帝一概不穿,宫中号为针神。薛灵芸的故事在正史中虽无记载,却由于许多野史笔记偶尔提及,如《拾遗记》、《太平广记》、《艳异编》等,渐于后世成为中国古代著名美女形象。,', - liupi:'刘辟[pì],东汉末年黄巾起义军将领。黄巾军将领。黄巾之乱后,与龚都一起率军盘踞在汝南。欲追随刘备,将汝南让给刘备。《三国演义》中,在与曹操的部将高览交战时,为保护刘备而战死。', - zhenghun:'郑浑(生卒年不详),字文公。开封(今河南省开封市)人。汉末及三国时期曹魏大臣,东汉名儒郑众曾孙、名士郑泰之弟。郑浑早年避乱淮南,后转投豫章太守华歆。又被曹操辟为掾属,历任下蔡县长、邵陵县令,任内颇有政绩,深得民心。任左冯翊时,击杀扰乱郡县的梁兴,又击败作乱的山贼。历任上党太守、京兆尹、丞相掾属等职。曹丕称帝后,拜侍御史,加驸马都尉。先后任阳平、沛郡太守,任内兴修水利,使农田常年丰收,被百姓称为“郑陂”。后转任山阳和魏郡太守。魏明帝曹叡听闻郑浑的事迹之后,下诏将其政绩布告天下。官至将作大匠。卒年不详。', - furongfuqian:'傅肜[róng](?-222年),义阳(今湖北枣阳)人,三国时蜀汉将领。刘备攻伐吴国时,傅肜为别督。后刘备被陆逊击败,傅肜率部断后,奋战至死。死前怒斥道:“吴狗!何有汉将军降者!”
    傅佥[qiān] ( ? ~263年),义阳(治今湖北省枣阳市)人,蜀汉将领傅彤之子,三国时期蜀汉名将。金长于谋略,并颇有胆勇,姜维甚爱之。傅佥官至关中都督。魏国攻伐蜀汉时,傅佥和蒋舒防守阳安关,兵败战死。', - qinlang:'秦朗(生卒年不详),字元明,小字阿蘇(一作阿鳔),新兴(治今山西忻州)云中人。三国时期曹魏将领,官至骁骑将军、给事中,曾率兵讨伐鲜卑轲比能和步度根的叛军。', - xianglang:'向朗(约167年—247年),字巨达。襄阳郡宜城县(今湖北宜城)人,三国时期蜀汉官员、藏书家、学者。向朗早年师从于司马徽,并被荆州牧刘表任命为临沮县长。后随刘备入蜀,历任巴西、牂牁、房陵太守,并拜步兵校尉,领丞相长史,随丞相诸葛亮北伐。因包庇马谡被免职,后为光禄勋,转左将军、特进,封显明亭侯。曾代理丞相册封张皇后及太子刘璿。晚年专心研究典籍,诱导青年学习,家中藏书丰富,受到举国尊重。延熙十年(247年),向朗去世。《全三国文》收录有一篇《遗言戒子》', - yanghong:'杨弘,东汉末年袁术部将。袁术死后,杨弘等将其众欲归孙策,后庐江太守刘勋截击,转归于勋。', sunhuan:'孙桓(198年-223年),字叔武,吴郡富春(今浙江杭州富阳区)人,三国时期吴国建武将军。孙河第三子。仪容端正,器怀聪明,博学强记,能论议应对,孙权常称为“宗室颜渊”。初擢为武卫都尉。建安二十四年(219年),参与由吕蒙指挥的袭击荆州行动,从讨关羽于华容,招揽关羽余众,得五千人以及大量牛马器械。黄武元年(222年),孙桓二十五岁,拜安东中郎将,跟随陆逊抗击进攻东吴的刘备。当时刘备率领众多兵众进攻,满山都是蜀军,孙桓奋战,与陆逊等协力击破蜀军。刘备兵败逃走,孙桓截击,“斩上夔道,扼要径”,差点生擒刘备。战后孙桓因功拜建武将军,封丹徒侯,督牛渚,修筑横江坞,期间逝世。', - yuantanyuanxiyuanshang:'袁谭袁尚介绍请移步「袁谭袁尚」,此处为袁熙的介绍。
    袁熙(?-207年),字显奕(《后汉书》、《东光世系》作显雍),汝南郡汝阳县(今河南商水)人,是东汉末年占据河北的军阀袁绍次子,袁绍打败公孙瓒后,令袁熙为幽州刺史。袁绍官渡兵败后不久病死,其兄长袁谭、弟弟袁尚各自独立,互相攻伐,曹操趁机进攻袁谭、袁尚,并逐渐占河北。袁熙接纳兵败的袁尚后,因为属下叛变而逃往乌桓,被曹操击败后,逃往辽东太守公孙康帐下,却被公孙康杀死,二人首级被献给曹操。', - zhanghu:'张虎,生卒年不详,雁门马邑(今山西朔城区大夫庄)人。张辽之子,三国时期曹魏武将。官至偏将军,封晋阳侯,有一子张统。', - mengjie:'孟节,南中蛮王孟获之兄。是小说《三国演义》中杜撰的人物,史上并无记载。诸葛亮南征孟获之时,帐下军士因误饮哑泉之水失语。当地山神告知诸葛亮,言万安溪畔有一高士隐居彼处,号“万安隐者”。其草庵后有一泉,名安乐泉,可解哑泉之毒。庵前生有一草,名薤叶芸香,可防瘴气之染。诸葛亮于是带人连夜前往其隐居之处,求得泉水草叶解毒防瘴,拜求隐士姓名,方知其名为孟节,由此而叹:“方信盗跖、下惠之事,今亦有之。”诸葛亮欲申奏刘禅,立其为王,孟节辞之。又以金帛赠之,孟节坚辞不受。诸葛亮嗟叹不已,拜别而回。', guānning:'关宁,《三国演义》的虚构人物,为关定之子,关平的哥哥,学文。关羽前往冀州寻找刘备时曾居于关定庄,关定命关宁、关平二子出拜。后关羽同刘备回到关定庄时,关羽向刘备介绍关宁、关平二人,关定即提出让关平拜关羽为义父。', - peiyuanshao:'裴元绍,《三国演义》人物,原黄巾军之武将。黄巾起义失败之后,与周仓一同率领残部在山中落草当山贼。公元200年,在关羽欲返刘备旗下,在突破曹操的五道关卡后路过其落草之地,与周仓一同向关羽要求能以期成为关羽家臣。但此时仅周仓同行,其他弟兄则于山中等待。不久后,因其欲夺偶然路过的赵云之马,反遭讨伐战败身死。', - zhangchu:'张楚,《阵面对决》第九弹“燎原”中登场的一个原创人物。她是张角的女儿,张宁的姐姐,在逃亡途中被刘备捕获。之后在诸葛亮的建议下,张楚被囚禁。在《阵面对决》的“怒焰”故事线中,张楚随着刘备入了西川,并被软禁在成都。夷陵之战后,刘备大败,全国主力外出用以支援刘备,朝内空虚,张楚趁机逃跑。', - dongwan:'董绾,袁术老婆,嫉妒冯芳女的美貌,与冯方女有矛盾。', - yuanyin:'袁胤(生卒年不详),东汉末期人物,据说是袁隗之子,是袁术从弟。兴平二年(公元195年)被袁术任命为丹杨太守,后因孙策平定江东被逐。建安四年(公元199年),袁术卒,袁胤因畏惧曹操,遂率领袁术部曲并带着其灵柩及妻子到皖城并投奔庐江太守刘勋。6个月后皖城被孙策所破,袁胤等人迁居吴郡,此后事迹不详。', - xielingyu:'谢夫人,会稽山阴(今浙江省绍兴市)人,东汉尚书郎、徐令谢煚之女,吴大帝孙权的原配发妻,又称谢妃。深受孙权宠爱,爱幸有宠。后来孙权为了巩固江东政权,又纳徐氏,欲让谢夫人屈居其下。谢夫人不同意,失志早卒。谢夫人的弟弟是三国著名史学家、武陵太守谢承。豫章太守谢斐与谢夫人同宗同族。', - gaoxiang:'高翔(又作高详、高祥)(生卒年不详),荆州南郡(治今湖北省公安县)人,三国时期蜀汉将领。曾随刘备攻打汉中,后又随蜀汉丞相诸葛亮参加北伐曹魏的战争。建兴九年(公元231年)的北伐中大破司马懿。官至杂号大将军(即某杂号将军加大,但无考何杂号将军),封玄乡侯。此后,关于高翔的记载不详。', - zerong:'笮[zé]融(?—195年),丹杨(治今安徽宣城)人,东汉末年豪强,生性残暴却笃信佛教,为佛教在中国的发展做出了很大贡献。东汉末年投奔徐州刺史陶谦,督管下邳、彭城、广陵三郡运粮。将其中大量物资占为己有累积财力,遂在徐州一带大规模崇佛,修建豪华佛寺,铸造金铜大佛,衣以锦彩,并举行浴佛节,招揽信徒万余人。其崇佛活动奠定了中国大型佛事活动的基础。后又投奔赵昱、薛礼、朱皓并将他们杀害,扬州牧刘繇因此兴兵讨伐笮融。笮融兵败后逃入深山,由于当地山民同样对他恨之入骨,便联手搜捕、杀死笮融,并将他的首级献给刘繇。', - zhoushan:'周善,《三国演义》中人物,不见于正史记载。为吴侯孙权的家将,此人最有胆量,自幼穿房入户,多随孙策。权为骗其妹回吴,遣善将五百人,扮为商人,分作五船;更诈修国书,以备盘诘;船内暗藏兵器。周善领命,往荆州。正骗得孙夫人带刘禅上船,赵云前来抢走禅,周善在后梢挟住舵,只顾放船下水。正僵持时张飞赶到,周善见张飞上船,提刀来迎,被张飞手起一剑砍倒,提头掷于孙夫人前。', - zhangkai:'张闿[kǎi],陶谦的手下都尉。奉命截杀曹操之父曹嵩,杀死曹嵩,夺去财宝逃往淮南投奔袁术,并担任刺杀陈王刘宠和陈国相骆俊的任务。', - huanfan:'桓范(?~249年),字元则,沛郡龙亢县(今安徽省怀远县龙亢镇)人。三国时期曹魏大臣、文学家、画家。建安末年,担任丞相府掾,联合王象等共同撰写《皇览》。延康元年,担任羽林左监。魏明帝时,历任中领军、尚书,出任征虏将军、东中郎将、兖州刺史等。正始年间,授大司农,为大将军曹爽出谋划策,号称“智囊 ”。高平陵政变(249年)发生后,力劝曹爽挟带皇帝曹芳进入许昌,没有得到采纳,最终被太傅司马懿诛杀。桓范颇有文才,著有《世要论》(《桓范新书》)。善于画画,唐朝张彦远《历代名画记》目为中品。', - mengyou:'孟优,《三国演义》里的人物,南蛮王孟获之弟。与诸葛亮的南征军交战,向败战的兄长推荐朵思大王,劝兄长借助朵思之力与蜀汉军对抗。后来与兄长一起发誓归顺蜀汉。', - sunyu:'孙瑜(177年-215年),字仲异,吴郡富春(今浙江富阳)人,孙坚之弟孙静的次子,孙权的堂兄。官至奋威将军、丹杨太守。孙瑜初以恭义校尉的身份统领士兵,曾跟随周瑜、孙权等人征战,擅于安抚部下、招降纳顺。孙瑜爱读古籍,又请学者马普来为将领官员的子弟讲学,于是东吴开始设立学官。215年,孙瑜去世,时年三十九岁。', - xizheng:'郤正(?-278年),本名郤纂,字令先,司州河南郡偃师县(今河南省偃师市)人,三国蜀汉至西晋时期学者、官员。少好学,广读古籍。弱冠即善写文章,为蜀汉朝廷征为秘书吏,官至秘书令。公元263年(景耀六年),曹魏攻伐蜀汉,后主刘禅投降,郤正为之撰写投降书。后随刘禅前往洛阳,受封关内侯,又得到晋武帝司马炎赏识,任巴西郡太守,公元278年(咸宁四年)去世。郤正为人不重名利,曾作《释讥》,表明自己淡泊之心境;又醉心于文学,共作诗歌、论著、辞赋等近百篇,但多散佚于后世。', - liuchongluojun:'刘宠(?~197年),汉明帝刘庄玄孙,陈敬王刘羡曾孙,陈顷王刘崇之孙,陈孝王刘承之子,陈国第六位国君,也是东汉陈国的最后一位国君。骆俊(?-197),字孝远,东汉末年扬州会稽郡乌伤县(今浙江义乌)人。宗室陈王刘宠的国相,在任期间励精图治,深得民众爱戴。刘宠勇猛过人,善使弓弩,箭法高超。在其父刘承死后,继承陈王爵位。中平年间,黄巾军起义,郡县官兵都弃城逃走,刘宠于是征兵自守卫。当时天下饥荒,诸王侯都已不再享有租赋,反屡遭抢掠,有的甚至流离在外,死于荒野。只有陈国仍很富强,邻郡百姓纷纷前去投靠,陈国拥有部众达十余万人。初平元年(190年),各州郡起兵讨伐董卓,刘宠率军屯驻阳夏,自称辅汉大将军。建安二年(197年),袁术向陈国求取粮草,遭陈国国相骆俊拒绝,袁术大为生气,便派刺客张闿假装路过陈国,乘机杀死骆俊和刘宠。', - yuechen:'乐綝(195~257年),字号不详,阳平郡卫国县(今河南省清丰县)人。三国时期曹魏将领,右将军乐进的儿子。果毅坚毅,袭封广昌亭侯,累迁扬州刺史。甘露二年,为叛乱的征东大将军诸葛诞所杀,追赠卫尉。', - zhangjinyun:'张瑾云,张星彩的妹妹,刘禅的第二任皇后,238年正月立为皇后。景耀六年(263年),蜀汉灭亡,刘禅被俘,此后,受封为安乐公。张皇后也随之成为安乐公夫人,咸熙元年(264年),随刘禅到洛阳。', - duanqiaoxiao:'段巧笑,三国时代魏国魏文帝时的宫人,甚受到魏文帝的宠爱。传说她以原有的化妆品中的米粉和胡粉,再加入葵花子汁,发明了女性化妆用的脂粉。', mushun:'穆顺,小说《三国演义》中的人物,男,东汉末宦官。献帝欲修书与国舅伏完,共谋图曹公。因顺为宦官中之忠义可托者,乃命顺往送书。顺藏书于发中,潜出禁宫,径至完宅,将书呈上。及完回书付顺,顺乃藏于头髻内,辞完回宫。然公闻信,先于宫门等候,顺回遇公,公喝左右,遍搜身上,并无夹带,放行。忽然风吹落其帽。公又唤回,取帽视之,遍观无物,还帽令戴。顺双手倒戴其帽。公心疑,令左右搜其头发中,搜出伏完书来。公见书大怒,执下顺于密室问之,顺不肯招。当晚将顺、完等宗族二百余口,皆斩于市。', jsp_guanyu:'关羽,字云长。曾水淹七军、擒于禁、斩庞德、威震华夏,吓得曹操差点迁都躲避,但是东吴偷袭荆州,关羽兵败被害。后传说吕蒙因关羽之魂索命而死。', - ruanji:'阮籍(公元210年~263年),字嗣宗,陈留尉氏(今河南省开封市)人,三国时期魏国诗人、竹林七贤之一。阮瑀之子,门荫入仕,累迁步兵校尉,世称阮步兵。崇奉老庄之学,政治上则采取谨慎避祸的态度。景元四年(公元263年),阮籍去世,享年五十三岁。作为“正始之音”的代表,著有《咏怀八十二首》、《大人先生传》等,其著作收录在《阮籍集》中。', - ganfurenmifuren:'甘夫人,刘备起兵后于沛城娶之为妾。后来,甘夫人随刘备到荆州,生了阿斗(也就是后主刘禅)。223年四月,刘备病死于白帝城,追谥甘夫人为“昭烈皇后”。
    糜夫人,刘备夫人。徐州别驾糜竺之妹。长坂兵败,她怀抱年仅两岁的刘禅在乱军中走散,被赵云发现;但麋夫人因为赵云只有一匹马,不肯上马,在将阿斗托付给赵云后投井而亡。' }, characterTitle:{ - // wulan:'#b对决限定武将', - // leitong:'#b对决限定武将', chunyuqiong:'#b对决限定武将', sp_xuyou:'#g4v4限定武将', }, @@ -29931,66 +9970,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ chunyuqiong:function(mode){ return mode!='identity'&&mode!='guozhan'; }, - // leitong:function(mode){ - // return mode!='identity'&&mode!='guozhan'; - // }, - // wulan:function(mode){ - // return mode!='identity'&&mode!='guozhan'; - // }, sp_xuyou:function(mode){ return mode=='versus'&&['guandu','4v4','four'].contains(_status.mode); }, }, dynamicTranslate:{ - xinlvli:function(player){ - var str='每回合限一次'; - if(player.storage.choujue) str+='(自己的回合内则改为限两次)'; - str+=',当你造成'; - if(player.storage.beishui) str+='或受到'; - str+='伤害后,你可选择:1,若你的体力值大于你的手牌数,你摸X张牌;2,若你的手牌数大于你的体力值且你已受伤,你回复X点体力(X为你的手牌数与体力值之差)。'; - return str; - }, - lvli:function(player){ - var str='每名角色的回合限一次'; - if(player.storage.choujue) str+='(自己的回合内则改为限两次)'; - str+=',你可以声明一个基本牌或普通锦囊牌的牌名,有随机概率视为使用之(装备区里的牌数越多,成功概率越大)'; - if(player.storage.beishui) str+='。当你受到伤害后,你也可以以此法使用一张牌。'; - return str; - }, mubing:function(player){ if(player.storage.mubing2) return '出牌阶段开始时,你可以展示牌堆顶的四张牌。你可弃置任意张手牌,并可获得任意张点数之和不大于你弃置的牌点数之和的牌。然后你可将以此法获得的牌以任意方式交给其他角色。'; return '出牌阶段开始时,你可以展示牌堆顶的三张牌。你可弃置任意张手牌,并可获得任意张点数之和不大于你弃置的牌点数之和的牌。'; }, - rezhongjian:function(player){ - return '出牌阶段限'+(player.hasSkill('recaishi2')?'两':'一')+'次,你可以选择一名本回合内未选择过的角色。你令其获得一项效果直至你的下回合开始:①其下次造成伤害后弃置两张牌,然后你摸一张牌。②其下次受到伤害后摸两张牌,然后你摸一张牌。' - }, - bazhan:function(player){ - if(player.storage.bazhan) return '转换技,出牌阶段限一次,阴:你可以将至多两张手牌交给一名其他角色。阳:你可以获得一名其他角色的至多两张手牌。若以此法移动的牌包含【酒】或♥牌,则你可令得到此牌的角色执行一项:①回复1点体力。②复原武将牌。'; - return '转换技,出牌阶段限一次,阴:你可以将至多两张手牌交给一名其他角色。阳:你可以获得一名其他角色的至多两张手牌。若以此法移动的牌包含【酒】或♥牌,则你可令得到此牌的角色执行一项:①回复1点体力。②复原武将牌。'; - }, - zhiren:function(player){ - return '当你于'+(player.hasSkill('yaner_zhiren')?'一':'你的')+'回合内使用第一张非转化牌时,你可依次执行以下选项中的前X项:①卜算X。②可弃置场上的一张装备牌和延时锦囊牌。③回复1点体力。④摸三张牌。(X为此牌的名称的字数)'; - }, - cuijian:function(player){ - return '出牌阶段限一次,你可以选择一名有手牌的其他角色。若其手牌中有【闪】,则其将所有【闪】和防具牌交给你'+(player.hasMark('zhtongyuan_basic')?'':',然后你交给其等量的牌')+'。'+(player.hasMark('zhtongyuan_trick')?'若其手牌中没有【闪】,则你摸两张牌。':''); - }, - yuqi:function(player){ - var info=lib.skill.yuqi.getInfo(player); - return '每回合限两次。当有角色受到伤害后,若你至其的距离不大于'+info[0]+',则你可以观看牌堆顶的'+info[1]+'张牌。你将其中至多'+info[2]+'张牌交给受伤角色,然后可以获得剩余牌中的至多'+info[3]+'张牌,并将其余牌以原顺序放回牌堆顶。(所有具有颜色的数字至多为5)'; - }, - dunshi:function(player){ - var info=player.storage.dunshi; - var str='每回合限一次。你可以视为使用或打出一张'; - var list=['sha','shan','tao','jiu']; - for(var i of list){ - var strx='【'+get.translation(i)+'】'; - if(!info||!info[0].contains(i)) strx=(''+strx+''); - str+=strx; - if(i!='jiu') str+='/'; - } - str+=',然后当前回合角色于本回合内下一次造成伤害时,你选择两项:⒈防止此伤害。系统从技能名中包含“仁/义/礼/智/信”字样的技能中随机选择三个其未拥有的技能,然后你令当前回合角色获得其中一个技能。⒉从〖遁世〗中删除你本次使用或打出的牌并获得一个“赂”。⒊减1点体力上限并摸X张牌(X为你的“赂”数)。'; - return str; - }, piaoping:function(player){ if(player.storage.piaoping) return '转换技,锁定技。当你使用一张牌时,阴:你摸X张牌。阳:你弃置X张牌。(X为你本阶段内发动过〖漂萍〗的次数且至多等于你的体力值)'; return '转换技,锁定技。当你使用一张牌时,阴:你摸X张牌。阳:你弃置X张牌。(X为你本阶段内发动过〖漂萍〗的次数且至多等于你的体力值)'; @@ -30000,41 +9988,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.storage.piaoping) return '锁定技。当你成为其他角色使用黑色牌的目标后,若你的〖漂萍〗:处于阳状态,则你将〖漂萍〗转换至阴状态;处于阴状态,则你获得一枚“栗”,且令〖惴栗〗于本回合内失效。'; return '锁定技。当你成为其他角色使用黑色牌的目标后,若你的〖漂萍〗:处于阳状态,则你将〖漂萍〗转换至阴状态;处于阴状态,则你获得一枚“栗”,且令〖惴栗〗于本回合内失效。'; }, - caiyi:function(player){ - var current=player.storage.caiyi,list=player.storage.caiyi_info||[[],[]]; - var str='转换技。结束阶段,你可令一名角色选择并执行一项,然后移除此选项。'; - var list1=['⒈回复X点体力。','⒉摸X张牌。','⒊复原武将牌。','⒋随机执行一个已经移除过的阴选项;'],list2=['⒈受到X点伤害。','⒉弃置X张牌。','⒊翻面并横置。','⒋随机执行一个已经移除过的阳选项。'],str1='阴:',str2='阳:'; - for(var i=0;i<4;i++){ - var clip1=list1[i],clip2=list2[i]; - if(list[0].contains(i)) clip1=(''+clip1+''); - if(list[1].contains(i)) clip2=(''+clip2+''); - str1+=clip1; - str2+=clip2; - } - if(current) str2=(''+str2+''); - else str1=(''+str1+''); - return str+str1+str2+'(X为该阴阳态剩余选项的数量)。'; - }, - dchuishu:function(player){ - var list=lib.skill.dchuishu.getList(player); - return '摸牌阶段结束时,你可以摸['+list[0]+']张牌。若如此做:你弃置['+list[1]+']张手牌,且当你于本回合内弃置第['+list[2]+']+1张牌后,你从弃牌堆中随机获得等量的锦囊牌。'; - }, - dcshoutan:function(player){ - if(player.storage.dcshoutan) return '转换技。出牌阶段限一次,阴:你可以弃置一张不为黑色的手牌。阳:你可以弃置一张黑色手牌。'; - return '转换技。出牌阶段限一次,阴:你可以弃置一张不为黑色的手牌。阳:你可以弃置一张黑色手牌。'; - }, dcdouzhen:function(player){ var str='锁定技。①转换技。你的回合内,'; if(player.countMark('dcdouzhen')%2) str+='阴:当你使用非转化且对应的实体牌为一张黑色基本牌的【决斗】时,你获得目标角色各一张牌并获得1枚“☯”;阳:当你使用或打出非转化且对应的实体牌为一张红色基本牌的【杀】时,你获得1枚“☯”。②若你的“☯”数为:偶数,你的黑色基本牌均视为【决斗】;奇数,你的红色基本牌均视为无次数限制的普【杀】。'; else str+='阴:当你使用非转化且对应的实体牌为一张黑色基本牌的【决斗】时,你获得目标角色各一张牌并获得1枚“☯”;阳:当你使用或打出非转化且对应的实体牌为一张红色基本牌的【杀】时,你获得1枚“☯”。②若你的“☯”数为:偶数,你的黑色基本牌均视为【决斗】;奇数,你的红色基本牌均视为无次数限制的普【杀】。'; return str; }, - dcluochong:function(player){ - return '一轮游戏开始时,你可以弃置任意名角色区域里的共计至多['+(4-player.countMark('dcluochong'))+']张牌,然后若你以此法弃置了一名角色的至少三张牌,则你方括号内的数字-1。'; - }, - dcporui:function(player){ - return '每轮限一次。其他角色的结束阶段,你可以弃置一张基本牌并选择另一名于此回合内失去过牌的其他角色,你视为对其依次使用X+1张【杀】'+(player.hasMark('dcgonghu_damage')?'':',然后你交给其X张手牌')+'(X为你的体力值)。'+(player.hasMark('dcgonghu_basic')?'若其没有因此受到伤害,你回复1点体力。':''); - } }, perfectPair:{}, characterReplace:{ @@ -30043,47 +10002,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhangji:['zhangji','ns_zhangji'], zhangchangpu:['zhangchangpu','sp_zhangchangpu','ol_zhangchangpu'], huangfusong:['huangfusong','sp_huangfusong','jsrg_huangfusong','old_huangfusong'], - wenyang:['wenyang','db_wenyang','diy_wenyang'], dingyuan:['ol_dingyuan','dingyuan'], quyi:['quyi','re_quyi'], hansui:['xin_hansui','re_hansui'], jin_simashi:['jin_simashi','simashi'], jin_yanghuiyu:['jin_yanghuiyu','yanghuiyu'], - chunyuqiong:['chunyuqiong','re_chunyuqiong'], taoqian:['taoqian','re_taoqian'], sp_liubei:['jsrg_liubei','sp_liubei'], dongcheng:['re_dongcheng','dongcheng'], hucheer:['tw_hucheer','re_hucheer','hucheer'], - dongbai:['re_dongbai','dongbai','jsrg_dongbai'], - gexuan:['gexuan','tw_gexuan'], - panshu:['panshu','re_panshu'], nanhualaoxian:['re_nanhualaoxian','nanhualaoxian','jsrg_nanhualaoxian'], - kanze:['re_kanze','kanze'], - yangwan:['yangwan','sp_yangwan'], - chendeng:['ol_chendeng','re_chendeng','chendeng'], pangdegong:['re_pangdegong','pangdegong'], zhujun:['sp_zhujun','ol_zhujun','zhujun','jsrg_zhujun'], - sunyi:['re_sunyi','tw_sunyi','sunyi'], tw_liuhong:['tw_liuhong','liuhong','jsrg_liuhong'], - miheng:['miheng','re_miheng'], re_hejin:['re_hejin','tw_hejin','jsrg_hejin'], - fengfangnv:['re_fengfangnv','fengfangnv'], - luotong:['luotong','dc_luotong'], - mamidi:['mamidi','xin_mamidi'], - dc_wangchang:['dc_wangchang','tw_wangchang'], - liuba:['ol_liuba','dc_liuba','liuba'], - lvkuanglvxiang:['lvkuanglvxiang','dc_lvkuanglvxiang'], - dc_huangquan:['dc_huangquan','xf_huangquan'], - yuejiu:['dc_yuejiu','yuejiu'], hujinding:['dc_hujinding','hujinding'], caosong:['caosong','sp_caosong'], re_niujin:['re_niujin','tw_niujin'], haomeng:['haomeng','tw_haomeng'], - jiling:['dc_jiling','tw_jiling','jiling'], zhangning:['zhangning','tw_zhangning'], - sp_jiaxu:['dc_sp_jiaxu','sp_jiaxu','yj_jiaxu'], caoanmin:['caoanmin','ns_caoanmin'], - qiaorui:['qiaorui','tw_qiaorui'], duanwei:['duanwei','junk_duanwei'], xushao:['xushao','jsrg_xushao'], huban:['dc_huban','ol_huban'], @@ -30178,44 +10116,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xinpi:'辛毗', lisu:'李肃', zhangwen:'张温', - puyuan:'蒲元', xushao:'许劭', mangyachang:"忙牙长", xugong:"许贡", zhangchangpu:"张昌蒲", - guanlu:'管辂', - gexuan:'葛玄', - - tuiyan:'推演', - tuiyan_info:'出牌阶段开始时,你可以观看牌堆顶的三张牌。', - busuan:'卜算', - busuan_info:'出牌阶段限一次,你可以选择一名其他角色,然后选择至多两张不同的卡牌名称(限基本牌或锦囊牌)。该角色下次摸牌阶段摸牌时,改为从牌堆或弃牌堆中获得你选择的牌。', - busuan_angelbeats:'卜算', - mingjie:'命戒', - mingjie_info:'结束阶段,你可以摸一张牌,若此牌为红色,你可以重复此流程直到摸到黑色牌或摸到第三张牌。当你以此法摸到黑色牌时,若你的体力值大于1,则你失去1点体力。', - gxlianhua:'炼化', - gxlianhua_info:'你的回合外,每当有其他角色受到伤害后,你获得一个“丹血”标记(该角色与你阵营一致时为红色,不一致为黑色,此颜色对所有玩家均不可见)直到你的准备阶段开始。准备阶段,根据你获得的“丹血”标记的数量和颜色,你从牌堆/弃牌堆中获得相应的牌以及相应技能直到回合结束。3枚或以下:〖英姿〗和【桃】;超过3枚且红色“丹血”较多:〖观星〗和【无中生有】;超过3枚且黑色“丹血”较多:〖直言〗和【顺手牵羊】;超过3枚且红色和黑色一样多:【杀】、【决斗】和〖攻心〗。', - zhafu:'札符', - zhafu_info:' 限定技,出牌阶段,你可以选择一名其他角色,令其获得一枚「札」。有「札」的角色弃牌阶段开始时,若其手牌数大于1,其移去「札」并选择保留一张手牌,然后将其余的手牌交给你。', pingjian:'评荐', pingjian_info:'结束阶段开始时/当你受到伤害后/出牌阶段限一次,你可以令系统随机从剩余武将牌堆中检索出三张拥有发动时机为结束阶段开始时/当你受到伤害后/出牌阶段的技能的武将牌。然后你可以选择尝试发动其中一个技能。每个技能每局只能选择一次。', pingjian_use:'评荐', - pytianjiang:'天匠', - pytianjiang_info:'游戏开始时,你随机获得两张不同副类别的装备牌,并置入你的装备区。出牌阶段,你可以将装备区的牌移动至其他角色的装备区(可替换原装备)。若你以此法移动了〖铸刃〗的衍生装备,你摸两张牌。', - pytianjiang_move:'天匠', - pyzhuren:'铸刃', - pyzhuren_info:'出牌阶段限一次,你可以弃置一张手牌。根据此牌的花色点数,你有一定概率打造成功并获得一张武器牌(若打造失败或武器已有则改为摸一张【杀】,花色决定武器名称,点数决定成功率)。此武器牌进入弃牌堆时,将其移出游戏。', - pyzhuren_destroy:'铸刃', - pyzhuren_heart:'红缎枪', - pyzhuren_heart_info:'每回合限一次,当你使用【杀】造成伤害后,你可以进行判定,若结果为:红色,你回复1点体力;黑色:你摸两张牌。', - pyzhuren_diamond:'烈淬刀', - pyzhuren_diamond_info:'每回合限两次,当你使用【杀】对目标角色造成伤害时,你可以弃置一张牌,令此伤害+1。你使用【杀】的次数上限+1。', - pyzhuren_club:'水波剑', - pyzhuren_club_info:'每回合限两次,当你使用普通锦囊牌或【杀】时,你可以为此牌增加一个目标。当你失去装备区里的【水波剑】后,你回复1点体力。', - pyzhuren_spade:'混毒弯匕', - pyzhuren_spade_info:'当你使用【杀】指定目标后,你可令其失去X点体力(X为此技能本回合内发动过的次数且至多为5)。', - pyzhuren_shandian:'天雷刃', - pyzhuren_shandian_info:'当你使用【杀】指定目标后,可令其进行判定,若结果为:黑桃,其受到3点雷属性伤害;梅花,其受到1点雷属性伤害,你回复1点体力并摸一张牌。', songshu:'颂蜀', songshu_info:'出牌阶段,你可以和其他角色拼点。若你没赢,你与其各摸两张牌,且你本阶段内不能再发动〖颂蜀〗。', @@ -30294,63 +10201,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zezhu_info:'出牌阶段限一次,你可以获得双方主帅的各一张牌(若无牌则改为你摸一张牌),然后交给双方主帅各一张牌。', chenggong:'逞功', chenggong_info:'当有角色使用牌指定目标后,若此牌对目标数大于1,则你可令使用者摸一张牌。', - leitong:'雷铜', - kuiji:'溃击', - kuiji_info:'出牌阶段限一次。你可以将一张黑色基本牌当作【兵粮寸断】置于你的判定区,然后摸一张牌。若如此做,你可以对体力值最多的一名对手造成2点伤害。对手因此进入濒死状态时,你或队友体力值最少的一方回复1点体力。', - kuiji_info_identity:'出牌阶段限一次。你可以将一张黑色基本牌当做【兵粮寸断】置于你的判定区,摸一张牌,然后你可以对体力值最多的一名其他角色造成2点伤害。该角色因此进入濒死状态时,你可令一名除其外体力值最少的角色回复1点体力。', - kuiji_info_guozhan:'出牌阶段限一次。你可以将一张黑色基本牌当做【兵粮寸断】置于你的判定区,摸一张牌,然后你可以对体力值最多的一名其他角色造成2点伤害。该角色因此进入濒死状态时,你可令一名除其外体力值最少的角色回复1点体力。', - wulan:'吴兰', - wlcuorui:'挫锐', - wlcuorui_info:'出牌阶段开始时,你可以弃置你或队友区域里的一张牌。若如此做,你选择一项:1.弃置对手装备区里至多两张与此牌颜色相同的牌;2.展示对手的共计两张手牌,然后获得其中与此牌颜色相同的牌。', - wlcuorui_info_identity:'出牌阶段开始时,你可以弃置一名你至其的距离不大于1的角色区域里的一张牌,然后你选择一项:1.弃置另一名其他角色装备区里至多两张与此牌颜色相同的牌;2.展示另一名其他角色的至多两张手牌,然后获得其中与此牌颜色相同的牌。', - wlcuorui_info_guozhan:'出牌阶段开始时,你可以弃置一名你至其的距离不大于1的角色区域里的一张牌,然后你选择一项:1.弃置另一名其他角色装备区里至多两张与此牌颜色相同的牌;2.展示另一名其他角色的至多两张手牌,然后获得其中与此牌颜色相同的牌。', - re_panfeng:'潘凤', - xinkuangfu:'狂斧', - xinkuangfu_info:'出牌阶段限一次,你可选择:1,弃置装备区里的一张牌,你使用无对应实体牌的普【杀】。若此【杀】造成伤害,你摸两张牌。2,弃置一名其他角色装备区里的一张牌,你使用无对应实体牌的普【杀】。若此【杀】未造成伤害,你弃置两张手牌。', - xingdaorong:'邢道荣', - xuxie:'虚猲', - xuxie_info:'出牌阶段开始时,你可以减1点体力上限并选择所有与你距离为1的角色,弃置这些角色的各一张牌或令这些角色各摸一张牌。出牌阶段结束时,若你的体力上限不为全场最多,则你加1点体力上限,然后回复1点体力或摸两张牌。', - huaman:'花鬘', - hmmanyi:'蛮裔', - hmmanyi_info:'锁定技,【南蛮入侵】对你无效。', - mansi_viewas:'蛮嗣', - mansi:'蛮嗣', - mansi_info:'出牌阶段限一次,你可以将所有手牌当做【南蛮入侵】使用;当有角色受到【南蛮入侵】的伤害后,你摸一张牌。', - souying:'薮影', - souying_info:'每回合限一次,当你对其他角色(或其他角色对你)使用【杀】或普通锦囊牌指定唯一目标后,若此牌不是本回合你对其(或其对你)使用的第一张【杀】或普通锦囊牌,你可以弃置一张牌,获得此牌对应的所有实体牌(或令此牌对你无效)。', - zhanyuan:'战缘', - zhanyuan_info:'觉醒技,准备阶段,若你已因蛮嗣累计获得超过7张牌,你加一点体力上限并回复1点体力,并可以选择一名男性角色,你与其获得技能〖系力〗,然后你失去技能〖蛮嗣〗', - hmxili:'系力', - hmxili_info:'每回合限一次,你的回合外,当其他拥有【系力】技能的角色在其回合内对没有【系力】技能的角色造成伤害时,你可以弃置一张牌,令此伤害+1,然后你与其各摸两张牌。', - wangshuang:'王双', - spzhuilie:'追猎', - spzhuilie2:'追猎', - spzhuilie_info:'锁定技,你使用【杀】无距离限制;当你使用【杀】指定目标后,若其不在你的攻击范围内,此【杀】不计入使用次数限制且你判定。若判定结果为武器牌或坐骑牌,此【杀】的伤害基数改为X(X为其体力值)。否则你失去1点体力。', - wenyang:'文鸯', - xinlvli:'膂力', - xinlvli_info:'每回合限一次,当你造成伤害后,你可选择:1,若你的体力值大于你的手牌数,你摸X张牌;2,若你的手牌数大于你的体力值且你已受伤,你回复X点体力(X为你的手牌数与体力值之差)。', - lvli:'膂力', - lvli4:'膂力', - lvli5:'膂力', - lvli_info:'每名角色的回合限一次,你可以声明一个基本牌或普通锦囊牌的牌名,有随机概率视为使用之(装备区里的牌数越多,成功概率越大)', - choujue:'仇决', - choujue_info:'觉醒技,一名角色的回合结束时,若你的手牌数和体力值相差3或更多,你减1点体力上限并获得技能〖背水〗,然后将〖膂力〗改为“在自己的回合时每回合限两次”。', - beishui:'背水', - beishui_info:'觉醒技,准备阶段,若你的手牌数或体力值小于2,你减1点体力上限并获得技能〖清剿〗,然后将〖膂力〗改为受到伤害后也可以发动。', - qingjiao:'清剿', - qingjiao_info:'出牌阶段开始时,你可以弃置所有手牌,然后从牌堆或弃牌堆中随机获得八张牌名各不相同且副类别不同的牌。若如此做,结束阶段,你弃置所有牌。', - re_liuzan:'留赞', - refenyin:'奋音', - refenyin_info:'锁定技,你的回合内,当一张牌进入弃牌堆后,若本回合内没有过与此牌花色相同的卡牌进入过弃牌堆,则你摸一张牌。', - liji:'力激', - liji_info:'出牌阶段限X次,你可以弃置一张牌并对一名其他角色造成1点伤害。(X为本回合内进入过弃牌堆的卡牌数除以8,若场上人数小于5则改为除以4,向下取整)', - re_sunluyu:'孙鲁育', - remeibu:'魅步', - remeibu_info:'其他角色的出牌阶段开始时,若你在其攻击范围内,你可以弃置一张牌A,该角色于本阶段内拥有〖止息〗,且当其因〖止息〗弃置与牌A花色相同的牌时,你获得之。', - rezhixi:'止息', - rezhixi_info:'锁定技,当你使用【杀】或普通锦囊牌时,你弃置一张手牌。', - remumu:'穆穆', - remumu_info:'出牌阶段开始时,你可以选择一项:1.弃置一名其他角色装备区里的一张牌,然后你本回合可使用【杀】的次数+1;2.获得一名角色装备区里的一张牌,然后你本回合可使用【杀】的次数-1。', sp_zhangliao:'SP张辽', //这仨技能给SP仲村由理毫无违和感好吗!!! mubing:'募兵', @@ -30373,12 +10223,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ rexiemu_info:'结束阶段,若全场没有“协穆”标记,你可以选择一名角色获得“协穆”标记直到你的下回合开始。你或该角色在各自的回合外使用或打出手牌时,你与其各摸一张牌(每回合限一次)。', heli:'贺励', heli_info:'出牌阶段限一次,你可以选择手牌数比你少的一名其他角色。该角色展示所有手牌,然后每缺少一种类型的牌,便从牌堆中随机获得一张此类型的牌。', - caoxing:'曹性', - cxliushi:'流矢', - cxliushi2:'流矢', - cxliushi_info:'出牌阶段,你可以将一张红桃牌置于牌堆顶,视为对一名角色使用一张【杀】(无距离限制且不计入使用次数)。当此【杀】造成伤害后,受到伤害的角色获得一个“流”。有“流”的角色手牌上限-X(X为其“流”数)。', - zhanwan:'斩腕', - zhanwan_info:'锁定技,有“流”的角色于弃牌阶段弃牌后,你摸等量的牌,然后其移去所有的“流”。', zhujun:'朱儁', gongjian:'攻坚', gongjian_info:'每回合限一次,当有角色使用【杀】指定第一个目标后,若此【杀】的目标和本局游戏内被使用的上一张【杀】的目标的交集A不为空,则你可以依次弃置A中所有角色的至多两张牌,然后获得以此法弃置的所有【杀】。', @@ -30401,13 +10245,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ decadexushen_info:"限定技,当你进入濒死状态后,你可以回复1点体力并获得技能“镇南”,然后如果你脱离濒死状态且“关索”不在场,你可令一名其他角色选择是否用“关索”代替其武将并令其摸三张牌。", decadezhennan:"镇南", decadezhennan_info:"当有角色使用普通锦囊牌指定目标后,若此牌目标数大于1,你可以对一名其他角色造成1点伤害。", - liubian:'刘辩', - shiyuan:'诗怨', - shiyuan_info:'每回合每项限一次,当你成为其他角色使用牌的目标后:①若其体力值大于你,你摸三张牌。②若其体力值等于你,你摸两张牌。③若其体力值小于你,你摸一张牌。', - dushi:'毒逝', - dushi_info:'锁定技,你处于濒死状态时,其他角色不能对你使用【桃】。你死亡时,你选择一名其他角色获得〖毒逝〗。', - yuwei:'余威', - yuwei_info:'主公技,锁定技,其他群雄角色的回合内,你将〖诗怨〗改为“每回合每项限两次”。', ol_dingyuan:'丁原', cixiao:'慈孝', cixiao_info:'准备阶段,若场上没有“义子”标记,你可令一名其他角色获得一个“义子”标记;若场上有“义子”标记,你可以弃置一张牌移动“义子”标记。拥有“义子”标记的角色获得技能“叛弑”。', @@ -30423,13 +10260,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jijing_info:'当你受到伤害后,你可以进行一次判定,然后若你弃置任意张点数之和与判定结果点数相同的牌,你回复1点体力。', zhuide:'追德', zhuide_info:'当你死亡时,你可令一名其他角色从牌堆中获得四张名称各不相同的基本牌。', - re_xinxianying:'辛宪英', - rezhongjian:'忠鉴', - rezhongjian2:'忠鉴', - rezhongjian_info:'出牌阶段限一次,你可以选择一名本回合内未选择过的角色。你令其获得一项效果直至你的下回合开始:①其下次造成伤害后弃置两张牌,然后你摸一张牌。②其下次受到伤害后摸两张牌,然后你摸一张牌。', - recaishi:'才识', - recaishi3:'才识', - recaishi_info:'摸牌阶段结束时,若你于本阶段内因摸牌而获得的所有的牌:花色均相同,你将〖忠鉴〗于本回合内改为“出牌阶段限两次”。不均相同,你可回复1点体力。若如此做,你本回合内不能对自己使用牌。', decadewuniang:'武娘', decadewuniang_info:'当你使用或打出【杀】时,你可以获得一名其他角色的一张牌。若如此做,其摸一张牌。(若你已发动许身,则关索也摸一张牌)', dongxie:'董翓', @@ -30457,36 +10287,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hfjieying_info:'结束阶段,你可以选择一名其他角色,该角色下回合使用【杀】或普通锦囊牌无距离限制且可多指定一个目标,且当其造成伤害后,其无法再使用牌直到回合结束。 ', weipo:'危迫', weipo_info:'锁定技,其他角色使用【杀】或普通锦囊牌指定你为目标后,若你的手牌数小于X,则你将手牌摸至X张,并记录摸牌事件结算后的手牌数Y。此牌结算结束后,若你的手牌数小于Y,则你将一张手牌交给此牌的使用者,且此技能失效直到你的下回合开始。(X为你的体力上限且至多为5) ', - guozhao:'郭照', - pianchong:'偏宠', - pianchong2:'偏宠', - pianchong_info:'摸牌阶段开始时,你可放弃摸牌。若如此做,你从牌堆中获得一张红色牌和一张黑色牌。然后你选择一种颜色。你的下回合开始前,当你失去该颜色的一张牌后,你从牌堆中获得另一种颜色的一张牌。', - zunwei:'尊位', - zunwei_backup:'尊位', - zunwei_info:"出牌阶段限一次,你可选择本局游戏内未选择过的一项:①若你已受伤,则你可以选择一名体力值大于你的其他角色,你将体力值回复至X(X为你的体力上限与其体力值中的较小值)②选择一名手牌数大于你的其他角色,你将手牌数摸至与其相同(至多摸五张)③选择一名装备区内牌数大于你的其他角色。你令X=1。若你装备区内的('equip'+X)栏为空,则你使用牌堆中的一张副类别为('equip'+X),且能对自己使用的装备牌。你令X+1。若X不大于5,且你装备区内的牌数仍小于目标角色,则你重复此流程。", - re_chunyuqiong:'淳于琼', - recangchu:'仓储', - recangchu2:'仓储', - recangchu3:'仓储', - recangchu_info:'锁定技,游戏开始时,你获得3个“粮”。你的手牌上限+X(X为“粮”数)。当你于回合外获得牌时,你获得一个“粮”。(你的“粮”数不能超过存活角色数)', - reliangying:'粮营', - reliangying_info:'弃牌阶段开始时,你可以摸至多X张牌,然后交给等量的角色各一张牌。(X为你的“粮”数)', - reshishou:'失守', - reshishou2:'失守', - reshishou_info:'锁定技,当你使用【酒】时或受到1点火焰伤害后,你移去一个“粮”。准备阶段,若你没有“粮”,你失去1点体力。', ol_lisu:'OL李肃', qiaoyan:'巧言', qiaoyan_info:'锁定技,当你于回合外受到其他角色造成的伤害时,若你:有“珠”,则你令伤害来源获得“珠”;没有“珠”,则你防止此伤害,然后摸一张牌,并将一张牌正面朝上置于武将牌上,称为“珠”。', xianzhu:'献珠', xianzhu_info:'锁定技,出牌阶段开始时,你令一名角色A获得“珠”。若A不为你自己,则你选择A攻击范围内的一名角色B,视为A对B使用一张【杀】。', - fanyufeng:'樊玉凤', - bazhan:'把盏', - bazhan_info:'转换技,出牌阶段限一次,阴:你可以将至多两张手牌交给一名其他角色。阳:你可以获得一名其他角色的至多两张手牌。若以此法移动的牌包含【酒】或♥牌,则你可令得到牌的角色执行一项:①回复1点体力。②复原武将牌。', - jiaoying:'醮影', - jiaoying2:'醮影', - jiaoying3:'醮影', - jiaoying3_draw:'醮影', - jiaoying_info:'锁定技,其他角色获得你的手牌后,该角色本回合不能使用或打出与此牌颜色相同的牌。然后此回合结束时,若其本回合没有再使用牌,你令一名角色将手牌摸至五张。', zhaozhong:'赵忠', yangzhong:'殃众', yangzhong_info:'当你造成或受到伤害后,若受伤角色和伤害来源均存活,则伤害来源可弃置两张牌,然后令受伤角色失去1点体力。', @@ -30503,18 +10308,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ csyizheng_info:'结束阶段开始时,你可以选择一名其他角色。你的下回合开始前,当该角色造成伤害或回复体力时,若其体力上限小于你,则你减1点体力上限,且令此伤害值/回复值+1。', reyirang:'揖让', reyirang_info:'出牌阶段开始时,你可以将所有非基本牌交给一名其他角色。若其体力上限大于你,则你将体力上限调整至与其相同。然后你回复X点体力(X为你以此法交给其的牌数)。', - xiahoujie:'夏侯杰', - liedan:'裂胆', - liedan_info:'锁定技,其他角色的准备阶段开始时,若X大于0,则你摸X张牌。若X等于3,则你加1点体力上限(至多加到8)。若X为0,则你失去1点体力并获得一枚“裂”(X为你的手牌数,体力值,装备区牌数中大于其的数量)。准备阶段,若“裂”数大于4,则你死亡。', - zhuangdan:'壮胆', - zhuangdan_mark:'壮胆', - zhuangdan_info:'锁定技,其他角色的回合结束时,若你的手牌数为全场唯一最多,则你令〖裂胆〗失效直到你下回合结束。', - ruanyu:'阮瑀', - xingzuo:'兴作', - xingzuo2:'兴作', - xingzuo_info:'出牌阶段开始时,你可观看牌堆底的三张牌并用任意张手牌替换其中等量的牌。若如此做,结束阶段,你可令一名有手牌的角色用所有手牌替换牌堆底的三张牌。若其因此法失去的牌多于三张,则你失去1点体力。', - miaoxian:'妙弦', - miaoxian_info:'若你的手牌中仅有一张黑色牌,你可将此牌当作任意一张普通锦囊牌使用(每种牌名每回合限一次);若你的手牌中仅有一张红色牌,你使用此牌时摸一张牌。', liangxing:'梁兴', lulve:'掳掠', lulve_info:'出牌阶段开始时,你可选择一名有手牌且手牌数少于你的角色。其选择一项:①将所有手牌交给你,然后你将武将牌翻面。②将武将牌翻面,然后其视为对你使用一张【杀】。', @@ -30546,13 +10339,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jielie_info:'你的第一个回合开始时,选择一名其他角色,该角色每次于其回合外获得牌后,你摸等量的牌(每回合至多摸三张);其进入濒死状态时,你可令其回复体力至1点(每轮限一次)。该角色死亡时,你弃置所有牌并失去1点体力。', kangge:'节烈', kangge_info:'当你受到除自己和“抗歌”角色以外的角色造成的伤害时,你可以防止此伤害并选择一种花色,然后你失去X点体力,令“抗歌”角色从弃牌堆中随机获得X张此花色的牌(X为伤害值)。', - yangwan:'杨婉', - youyan:'诱言', - youyan_info:'出牌阶段/弃牌阶段各限一次。当有牌进入弃牌堆后,若其中有你不因使用或打出而失去的牌,你可以从牌堆中获得你本次失去的牌中没有的花色的牌各一张。', - zhuihuan:'追还', - zhuihuan2:'追还', - zhuihuan2_new:'追还', - zhuihuan_info:'结束阶段开始时,你可以选择一名角色(对其他角色不可见)。记录所有对该角色造成过伤害的角色。该角色的下个准备阶段开始时停止记录,且所有记录过的角色:若体力值大于该角色,则受到其造成的2点伤害;若体力值小于等于该角色,则随机弃置两张手牌。', re_dongcheng:'董承', xuezhao:'血诏', xuezhao_info:'出牌阶段限一次,你可弃置一张手牌并选择至多X名其他角色(X为你的体力上限)。这些角色依次选择是否交给你一张牌,若选择是,该角色摸一张牌且你本回合可多使用一张【杀】;若选择否,该角色本回合无法响应你使用的牌。', @@ -30562,80 +10348,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){ redaoji_info:'其他角色第一次使用武器牌时,你可选择一项:①获得此牌。②令其本回合内不能使用或打出【杀】。', fuzhong:'负重', fuzhong_info:'锁定技,当你于回合外获得牌后,你获得一枚“重”标记。若X:大于0,你于摸牌阶段开始时令额定摸牌数+1;大于1,你至其他角色的距离-2;大于2,你的手牌上限+3;大于3,结束阶段开始时,你对一名其他角色造成1点伤害,然后移去4枚“重”(X为“重”数)。', - heyan:'何晏', - yachai:'崖柴', - yachai_info:'当你受到伤害后,你可令伤害来源选择一项:①其本回合不能再使用手牌,然后你摸两张牌;②其展示所有手牌,然后将其手牌中一种花色的所有牌交给你;③弃置一半数量的手牌(向上取整)。', - qingtan:'清谈', - qingtan_info:'出牌阶段限一次,你可令所有有手牌的角色同时选择一张手牌并同时展示。你可以获得其中一种花色的牌,然后展示此花色牌的角色各摸一张牌。若如此做,弃置其他的牌。', qiuliju:'丘力居', koulve:'寇略', koulve_info:'当你于出牌阶段内对其他角色造成伤害后,你可以展示其X张手牌(X为其已损失的体力值)。若这些牌中:有带有伤害标签的基本牌或锦囊牌,则你获得之;有红色牌,则你失去1点体力(若已受伤则改为减1点体力上限),然后摸两张牌。', qljsuiren:'随认', qljsuiren_info:'当你死亡时,你可以将手牌中所有的带有伤害标签的基本牌或锦囊牌交给一名其他角色。', - re_dongbai:'董白', - relianzhu:'连诛', - relianzhu_info:'出牌阶段限一次,你可将一张牌正面朝上交给一名其他角色。若此牌为:红色,你摸一张牌;黑色,对方弃置两张牌或令你摸两张牌。’', - rexiahui:'黠慧', - rexiahui_info:'锁定技,①你的黑色牌不计入手牌上限。②当有其他角色获得你的黑色牌后,其于下次扣减体力前不能使用,打出,弃置这些牌。③一名其他角色的回合结束时,若其本回合失去过其所有“黠慧”牌,则其失去1点体力。', - huaxin:'华歆', - wanggui:'望归', - wanggui_info:'每回合限触发一次,当你造成或受到伤害后,若你:仅明置了此武将牌,则你可对与你势力不同的一名角色造成1点伤害;武将牌均明置,则你可令与你势力相同的角色各摸一张牌。', - spwanggui:'望归', - spwanggui_info:'①当你受到伤害后,你可以摸一张牌,或和一名势力相同的其他角色各摸一张牌;②每回合限一次,当你造成伤害后,你可以对一名与你势力不同的角色造成1点伤害。', - xibing:'息兵', - xibing_info:'当一名其他角色在其出牌阶段内使用黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力值(至多摸五张)且本回合不能再使用手牌。', - xibing_info_guozhan:'当一名其他角色在其出牌阶段内使用第一张黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力(至多摸五张)值且本回合不能再使用手牌。若你与其均明置了所有武将牌,则你可以暗置你与其各一张武将牌且本回合不能再明置此武将牌。', - luyusheng:'陆郁生', - zhente:'贞特', - zhente2:'贞特', - zhente_info:'每回合限一次,当你成为其他角色使用基本牌或普通锦囊牌的目标后,你可令使用者选择一项:1.本回合不能再使用与此牌颜色相同的牌;2.此牌对你无效。 ', - zhente_info_guozhan:'每回合限一次,当你成为其他角色使用黑色基本牌或黑色普通锦囊牌的目标后,你可令使用者选择一项:1.本回合不能再使用黑色牌;2.此牌对你无效。 ', - zhiwei:'至微', - zhiwei2:'至微', - zhiwei_info:'游戏开始时/你的回合开始时,若场上没有因此法被选择过的角色存活,则你选择一名其他角色。该角色造成伤害后,你摸一张牌,该角色受到伤害后,你随机弃置一张手牌。你弃牌阶段弃置的牌均被该角色获得。', - zhiwei_info_guozhan:'你明置此武将牌时,选择一名其他角色。该角色造成伤害后,你摸一张牌,该角色受到伤害后,你随机弃置一张手牌。你弃牌阶段弃置的牌均被该角色获得。该角色死亡时,若你的两个武将牌均明置,你暗置此武将牌。 ', re_zoushi:'邹氏', rehuoshui:'祸水', rehuoshui_info:'准备阶段,你可以选择至多X名角色(X为你已损失的体力值且至少为1)。你令这些角色中第一名角色的非锁定技失效直到回合结束;第二名角色交给你一张手牌;第三名及之后角色弃置装备区内的所有牌。', reqingcheng:'倾城', reqingcheng_info:'出牌阶段限一次,你可以与一名手牌数不大于你的男性角色交换手牌。', - re_panshu:'潘淑', - zhiren:'织纴', - zhiren_info:'当你于你的回合内使用第一张非转化牌时,你可依次执行以下选项中的前X项:①卜算X。②可弃置场上的一张装备牌和延时锦囊牌。③回复1点体力。④摸三张牌。(X为此牌的名称的字数)', - yaner:'燕尔', - yaner_info:'每回合限一次。当有其他角色于其出牌阶段内失去手牌后,若其没有手牌,则你可以与其各摸两张牌。若其以此法摸得的两张牌类型相同,则其回复1点体力。若你以此法摸得的两张牌类型相同,则你将〖织纴〗中的“你的回合内”改为“一回合内”直至你下回合开始。', caoanmin:'曹安民', xianwei:'险卫', xianwei_info:'锁定技,准备阶段,你废除一个装备栏并摸X张牌(X为你未废除的装备栏数),然后你可以令一名其他角色对其自己使用一张牌堆中的一张与此装备栏副类别相同的装备牌(没有可使用的牌则改为摸一张牌)。当你废除所有装备栏后,你加2点体力上限,然后你与所有其他角色视为在彼此的攻击范围内。', - zhanghu:'张虎', - cuijian:'摧坚', - cuijian_info:'出牌阶段限一次,你可以选择一名有手牌的其他角色。若其手牌中有【闪】,则其将所有【闪】和防具牌交给你,然后你交给其等量的牌。', - zhtongyuan:'同援', - zhtongyuan_info:'锁定技。①当你使用红色锦囊牌后,你于〖摧坚〗后增加“若其手牌中没有【闪】,则你摸两张牌”;②当你使用或打出红色基本牌后,你删除〖摧坚〗中的“,然后你交给其等量的牌”。③当你使用红色的普通锦囊牌/基本牌时,若你已发动过〖摧坚①〗和〖摧坚②〗,则此牌不可被响应/可额外增加一个目标。', dufuren:'杜夫人', yise:'异色', yise_info:'其他角色得到你的牌后,若这些牌中:有红色牌,你可令其回复1点体力;有黑色牌,其下次受到因执行【杀】的效果造成的伤害时,此伤害+1。', shunshi:'顺世', shunshi_info:'准备阶段开始时,或当你受到伤害后,你可将一张牌交给一名不为伤害来源的其他角色并获得如下效果直到你的回合结束:摸牌阶段的额定摸牌数+1,使用【杀】的次数上限+1,手牌上限+1。', - lvlingqi:'吕玲绮', - guowu:'帼舞', - guowu_info:'出牌阶段开始时,你可以展示全部手牌,根据你展示的类型数,你获得对应效果:至少一类,从弃牌堆获得一张【杀】;至少两类,此阶段使用牌无距离限制;至少三类,此阶段使用【杀】或普通锦囊牌可以多指定两个目标。', - guowu_info_guozhan:'出牌阶段开始时,你可以展示全部手牌,根据你展示的类型数,你获得对应效果:至少一类,从弃牌堆获得一张【杀】;至少两类,此阶段使用牌无距离限制;至少三类,此阶段使用【杀】可以多指定两个目标。', - zhuangrong:'妆戎', - zhuangrong_info:'觉醒技,一名角色的回合结束时,若你的体力值或手牌数为1,你减1点体力上限并回复体力至上限,将手牌摸至体力上限,然后获得〖神威〗和〖无双〗。', - llqshenwei:'神威', - llqshenwei_info:'锁定技,摸牌阶段开始时,你令额定摸牌数+2;你的手牌上限+2。', rexingluan:'兴乱', rexingluan_info:'出牌阶段限一次,当你使用的仅指定一个目标的牌结算完成后,你可以获得场上一张与此牌点数相同的牌,或获得牌堆中随机一张点数与此牌相同的牌。', xinxingluan:'兴乱', xinxingluan_info:'每回合限一次。当你于出牌阶段内使用牌结算结束后,你可选择一项:①观看牌堆中的两张点数为6的牌并获得其中一张(没有则改为摸六张牌);②令一名其他角色弃置一张点数为6的牌或交给你一张牌;③获得场上的一张点数为6的牌。', - zhouyi:'周夷', - zhukou:'逐寇', - zhukou_info:'①当你于一名角色的出牌阶段第一次造成伤害后,你可以摸X张牌(X为本回合你已使用的牌数)。②你的结束阶段,若你本回合没有造成伤害,你可以对两名其他角色各造成1点伤害。', - mengqing:'氓情', - mengqing_info:'觉醒技。准备阶段,若场上已受伤的角色数大于你的体力值,你加3点体力上限并回复3点体力,失去〖逐寇〗,获得〖玉殒〗。', - yuyun:'玉殒', - yuyun_info:'锁定技,出牌阶段开始时,你失去1点体力或体力上限(不能减至1以下),然后选择X+1项(X为你已损失的体力值):①摸两张牌;②对一名其他角色造成1点伤害,然后本回合对其使用【杀】无距离和次数限制;③本回合的手牌上限视为无限;④获得一名其他角色区域内的一张牌;⑤令一名其他角色将手牌摸至体力上限(最多摸至5)。', re_nanhualaoxian:'南华老仙', gongxiu:'共修', gongxiu_info:'结束阶段,若你本回合内发动过〖经合〗,则你选择一项:①令所有本回合内成为过〖经合〗目标的角色各摸一张牌;②令所有本回合内未成为过〖经合〗目标的角色各弃置一张手牌。', @@ -30655,9 +10389,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nhguanyue_info:'结束阶段,你可以观看牌堆顶两张牌,然后获得其中—张,另一张放回牌堆顶。', nhyanzheng:'言政', nhyanzheng_info:'准备阶段,若你的手牌数大于1,你可以保留一张手牌并弃置其余的牌,然后选择至多等于弃牌数量的角色,对这些角色各造成1点伤害。', - re_kanze:'阚泽', - rekuanshi:'宽释', - rekuanshi_info:'结束阶段,你可以选择一名角色。你获得如下效果直到你下回合开始:每回合限一次,当其于一回合内受到第2点伤害后,其回复1点体力。', sp_mifangfushiren:'糜芳傅士仁', mffengshi:'锋势', mffengshi_info:'当你使用牌指定唯一目标后,或成为其他角色使用牌的唯一目标后,若此牌使用者的手牌数大于此牌目标的手牌数,则此牌的使用者可令你弃置自己和对方的各一张牌,并令此牌的伤害值+1。', @@ -30670,27 +10401,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ chuanshu_info:'限定技。准备阶段,若你已受伤;或当你死亡时,你可令一名其他角色获得〖朝凤〗。然后你获得〖龙胆〗、〖从谏〗和〖穿云〗。', chuanyun:'穿云', chuanyun_info:'当你使用【杀】指定目标后,你可令目标角色随机弃置其装备区内的一张牌。', - liuyong:'刘永', - zhuning:'诛佞', - zhuning_info:'出牌阶段限一次。你可将任意张牌交给一名其他角色(称为“隙”),然后可视为使用一张具有伤害标签的基本牌/锦囊牌(不计入次数限制)。若你以此法使用的牌未造成伤害,则你将〖诛佞〗于本回合内改为“限两次”。', - fengxiang:'封乡', - fengxiang_info:'锁定技。①当你受到伤害后,若场上:存在“隙”唯一最多的角色,则其回复1点体力;不存在,则你摸一张牌。②当有角色的手牌移动后,若场上“隙”最多的角色因此发生变化,则你摸一张牌。', - fengxiang_tag:'隙', zhangning:'张宁', tianze:'天则', tianze_info:'①每回合限触发一次。其他角色于其出牌阶段内使用的黑色手牌结算结束后,你可以弃置一张黑色牌,并对其造成1点伤害。②其他角色的判定生效后,若结果为黑色,则你摸一张牌。', difa:'地法', difa_info:'每回合限一次。当你于回合内因摸牌而获得红色牌时,你可以弃置之。然后你选择一个锦囊牌的牌名,并从牌堆中获得一张此牌名的牌。', - re_xunchen:'荀谌', - refenglve:'锋略', - refenglve_info:'出牌阶段限一次,你可以和一名其他角色进行拼点。若你赢,其将区域内的两张牌交给你;若平局,则你令此技能于本阶段内的发动次数上限+1;若你输,其获得你的拼点牌。', - anyong:'暗涌', - anyong_info:'当一名角色于其回合内第一次对其他角色造成伤害后,若伤害值为1,则你可弃置一张牌,并对受伤角色造成1点伤害。', - wanniangongzhu:'万年公主', - zhenge:'枕戈', - zhenge_info:'准备阶段,你可以选择一名角色。该角色本局游戏的攻击范围+1(至多+5)。然后若所有其他角色都在该角色的攻击范围内,则你可以令其视为对另一名角色使用一张【杀】。', - xinghan:'兴汉', - xinghan_info:'锁定技,每回合的第一张【杀】造成伤害后,若此【杀】的使用者成为过〖枕戈〗的目标,则你摸一张牌。若你的手牌数不是全场唯一最多的,则改为摸X张牌(X为该角色的攻击范围且最多为5)。', xinping:'辛评', fuyuan:'辅袁', fuyuan_info:'当你于回合外使用或打出牌时,若当前回合角色的手牌数:不小于你,你可摸一张牌;小于你,你可令其摸一张牌。', @@ -30701,64 +10416,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jieliang_info:'其他角色的摸牌阶段开始时,你可弃置一张牌,令其本阶段的摸牌数和本回合的手牌上限-1。然后当其于本回合的弃牌阶段内因弃置而失去牌后,你可获得其中的一张。', quanjiu:'劝酒', quanjiu_info:'锁定技。①你手牌区中的【酒】的牌名视为【杀】。②你使用对应的实体牌为一张【酒】的非转化【杀】不计入次数限制。', - caojinyu:'曹金玉', - yuqi:'隅泣', - yuqi_info:'每回合限两次。当有角色受到伤害后,若你至其的距离不大于0,则你可以观看牌堆顶的3张牌。你将其中至多1张牌交给受伤角色,然后可以获得剩余牌中的至多1张牌,并将其余牌以原顺序放回牌堆顶。(所有具有颜色的数字至多为5)', - shanshen:'善身', - shanshen_info:'当有角色死亡时,你可令你的〖隅泣〗中的一个具有颜色的数字+2。然后若你未对该角色造成过伤害,则你回复1点体力。', - xianjing:'娴静', - xianjing_info:'准备阶段,你可令你的〖隅泣〗中的一个具有颜色的数字+1。若你的体力值等于体力上限,则你可以重复一次此流程。', - re_chendeng:'陈登', - refuyuan:'扶援', - refuyuan_info:'一名角色成为【杀】的目标后,若其本回合内没有成为过其他红色牌的目标,则你可以令其摸一张牌。', - reyingshui:'营说', - reyingshui_info:'出牌阶段限一次,你可将一张牌交给攻击范围内的一名其他角色,然后其选择一项:①交给你至少两张装备牌。②受到1点伤害。', - rewangzu:'望族', - rewangzu_info:'每回合限一次。当你受到其他角色造成的伤害时,你可随机弃置一张手牌,令此伤害-1。若你所在阵营的存活角色数是全场最多的,则你可以自行选择弃置的牌。', - wangtao:'王桃', - wangyue:'王悦', - huguan:'护关', - huguan_info:'一名角色于出牌阶段内使用第一张牌时,若此牌为红色,则你可以声明一种花色。该花色的牌不计入其本回合的手牌上限。', - yaopei:'摇佩', - yaopei_info:'其他角色的弃牌阶段结束时,若你本局游戏内对其发动过〖护关〗,则你可以弃置一张与其于此阶段弃置的牌花色均不相同的牌。然后你选择一项:①其摸两张牌,你回复1点体力。②其回复1点体力,你摸两张牌。', - mingluan:'鸣鸾', - mingluan_info:'其他角色的结束阶段开始时,若有角色于本回合内回复过体力,则你可以弃置任意张牌,然后摸X张牌(X为当前角色的手牌数,且至多摸至5张)。', re_pangdegong:'庞德公', heqia:'和洽', heqia_info:'出牌阶段开始时,你可选择一项:①将任意张牌交给一名其他角色。②令一名有手牌的其他角色交给你任意张牌。然后以此法获得牌的角色可以视为使用一张基本牌,且当其声明使用此牌后,可以为此牌增加至至多X个目标(X为以此法移动的牌数)。', yinyi:'隐逸', yinyi_info:'锁定技。每回合限一次,当你受到非属性伤害时,若你的手牌数和体力值与伤害来源均不相同,则你防止此伤害。', - re_sunyi:'孙翊', - syjiqiao:'激峭', - syjiqiao_info:'出牌阶段开始时,你可将牌堆顶的X张牌置于你的武将牌上(X为你的体力上限)。当你于此出牌阶段内使用的牌结算结束后,你可以获得其中的一张牌,然后若剩余牌中红色牌和黑色牌的数量:不相等,你失去1点体力;相等,你回复1点体力。出牌阶段结束时,你将这些牌置入弃牌堆。', - syxiongyi:'凶疑', - syxiongyi_info:'限定技。当你处于濒死状态时,若剩余武将牌堆中:有“徐氏”,则你可以将体力值回复至3点,并将此武将牌替换为“徐氏”;没有“徐氏”,则你可以将体力值回复至1点并获得〖魂姿〗。', - zhaoyan:'赵嫣', - jinhui:'锦绘', - jinhui_info:'出牌阶段限一次,你可以随机展示牌堆中的三张不具有“伤害”标签且使用目标范围为“自己”或“一名角色”的牌,然后选择一名其他角色。该角色选择并按如下“锦绘”规则使用其中一张,然后你可以按如下“锦绘”规则使用剩余的任意张牌:若此牌的使用目标为“自己”,则对自己使用该牌,否则对对方使用该牌(无距离限制且不计入次数限制)。', - qingman:'轻幔', - qingman_info:'锁定技。一名角色的回合结束时,你将手牌摸至X张(X为其装备区中空栏的数量)。', - re_zhangbao:'张宝', - xinzhoufu:'咒缚', - xinzhoufu2:'咒缚', - xinzhoufu_info:'出牌阶段限一次。你可以将一张手牌置于一名其他角色的武将牌上并称为“咒”,且当其判定时,将其“咒”作为判定牌。', - xinyingbing:'影兵', - xinyingbing_info:'锁定技。每回合每名角色限一次,当你使用牌指定有“咒”的角色为目标后,你摸两张牌。', - re_miheng:'祢衡', - rekuangcai:'狂才', - rekuangcai_info:'锁定技。①你于回合内使用牌无距离和次数限制。②弃牌阶段开始时,若你本回合内:未使用过牌,则你本局游戏的手牌上限+1;使用过牌但未造成过伤害,则你本局游戏的手牌上限-1。③结束阶段开始时,你摸X张牌(X为你本回合内造成的伤害且至多为5)。', - reshejian:'舌箭', - reshejian_info:'当你成为其他角色使用牌的唯一目标后,你可以弃置至少两张手牌。若如此做,你选择一项:⒈弃置其等量的牌。⒉对其造成1点伤害。', - fengxi:'冯熙', - yusui:'玉碎', - yusui_info:'当你成为其他角色使用黑色牌的目标后,你可以失去1点体力,然后选择一项:⒈令其将手牌数弃置至与你相同;⒉令其失去Y点体力(Y为其的体力值减去你的体力值,不为正时不可选择)', - boyan:'驳言', - boyan_info:'出牌阶段限一次,你可选择一名其他角色。其将手牌摸至体力上限(至多摸至五张),然后其本回合不能使用或打出手牌。', - re_dengzhi:'邓芝', - jianliang:'简亮', - jianliang_info:'摸牌阶段开始时,若你的手牌数不为全场最多,则你可以令至多两名角色各摸一张牌。', - weimeng:'危盟', - weimeng_info:'出牌阶段限一次,你可以获得一名其他角色的至多X张手牌,然后交给其等量的牌(X为你的体力值)。若你给出的牌点数之和:大于获得的牌,则你摸一张牌;小于获得的牌,弃置该角色区域内的一张牌。', haomeng:'郝萌', xiongmang:'雄莽', xiongmang_info:'你可将任意张花色各不相同的手牌当做目标数上限为X的【杀】使用(X为此【杀】对应的实体牌数)。此【杀】使用结算结束后,若你未造成过渠道为此牌的伤害,则你减1点体力上限。', @@ -30767,111 +10429,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ channi_info:'出牌阶段限一次。你可将任意张手牌交给一名其他角色,然后其可以将等量的手牌当做【决斗】使用。若其因此【决斗】造成了伤害,则其摸X张牌(X为此【决斗】对应的实体牌数)。若其因此【决斗】受到过伤害,则你弃置所有手牌。', nifu:'匿伏', nifu_info:'锁定技。一名角色的回合结束时,你将手牌摸至或弃置至三张。', - wufan:'吴范', - tianyun:'天运', - tianyun_info:'①游戏的第一个回合开始前,你从牌堆中获得手牌区内没有的花色的各一张牌。②一名角色的回合开始时,若其座位号等于游戏轮数,则你可观看牌堆顶的X张牌并以任意顺序置于牌堆顶或牌堆顶。若你将所有的牌均置于了牌堆底,则你可以令一名角色摸X张牌,然后失去1点体力。(X为你手牌中包含的花色数)', - wfyuyan:'预言', - wfyuyan_info:'一轮游戏开始时,你选择一名角色(对其他角色不可见):当第一次有角色于本轮内进入濒死状态时,若其是你选择的角色,则你获得〖奋音〗直到你的回合结束;当第一次有角色于本轮内造成伤害后,若其是你选择的角色,则你摸两张牌。', - re_fengfangnv:'冯妤', - tiqi:'涕泣', - tiqi_info:'其他角色的摸牌阶段结束时/被跳过时,若其于本阶段内因摸牌而获得的牌数X不等于2,则你可以摸|X-2|张牌,并可令其本回合的手牌上限±|X-2|。', - baoshu:'宝梳', - baoshu_info:'①准备阶段,你可选择Y名角色,这些角色重置武将牌并获得(X-Y+1)个“梳”(X为你的体力上限,Y∈[1, X])。②一名角色的摸牌阶段开始时,若其有“梳”,则其本阶段的额定摸牌数+Z且移去Z个“梳”(Z为其“梳”的数量)。', - mamidi:'马日磾', - bingjie:'秉节', - bingjie_info:'出牌阶段开始时,你可减1点体力上限,然后当你于本阶段内使用【杀】或普通锦囊牌指定其他角色为目标后,其弃置一张牌。若其弃置的牌与你使用的牌颜色相同,其无法响应此牌。', - zhengding:'正订', - zhengding_info:'锁定技。当你于回合外使用或打出牌响应其他角色使用的牌时,若这两张牌颜色相同,则你加1点体力上限并回复1点体力。', licaiwei:'李采薇', yijiao:'异教', yijiao_info:'出牌阶段限一次,你可以选择一名没有“异”标记的其他角色并声明一个整数X(X∈[1,4]),该角色获得10X个“异”标记。有“异”标记的角色的结束阶段,其移去“异”标记,且若其本回合使用牌的点数之和:1.小于“异”标记数,其随机弃置至多三张手牌;2.等于“异”标记数,你摸两张牌且该角色本回合结束后进行一个额外的回合;3.大于“异”标记数,你摸三张牌。', qibie:'泣别', qibie_info:'一名角色死亡后,若你有手牌且这些手牌均可被弃置,则你可以弃置所有手牌,然后回复1点体力并摸X+2张牌(X为你弃置的牌数)。', - dc_jiben:'吉本', - xunli:'寻疠', - xunli_info:'锁定技。①当有黑色牌因弃置而进入弃牌堆后,若X大于0,则你将其中的X张牌置于武将牌上作为“疠”(X=min(这些牌的数量,9-Y),Y=你的“疠”数)。②出牌阶段开始时,你可以用任意张黑色手牌交换等量的“疠”。', - zhishi:'指誓', - zhishi_info:'结束阶段,你可选择一名角色。当该角色于你的下回合开始前{成为【杀】的目标后或进入濒死状态时},你可移去任意张“疠”,然后其摸等量的牌。', - lieyi:'烈医', - lieyi_info:'出牌阶段限一次。你可以展示所有“疠”并选择一名其他角色,对其使用其中的一张可对其使用的牌(无距离和次数限制)并重复此流程,并将其余的牌置于弃牌堆。然后若其存活且未于此流程中因受到伤害而进入过濒死状态,则你失去1点体力。', - dc_luotong:'骆统', - renzheng:'仁政', - renzheng_info:'锁定技。当有伤害被防止时,或伤害值发生过减少的伤害事件结算结束后,你摸两张牌。', - jinjian:'进谏', - jinjian_info:'①当你造成伤害时,你可令此伤害+1,然后你本回合内下一次造成的伤害-1且不触发〖进谏①〗。②当你受到伤害时,你可令此伤害-1。然后你于本回合内下一次受到的伤害+1且不触发〖进谏②〗。', dc_zhuling:'朱灵', dczhanyi:'战意', dczhanyi_info:'出牌阶段开始时,你可以弃置所有基本牌/锦囊牌/装备牌,然后获得另外两种类型的牌对应的效果直到回合结束:基本牌、你使用基本牌无距离限制,且伤害值和回复值基数+1;锦囊牌、你使用锦囊牌时摸一张牌,且锦囊牌不计入手牌上限;装备牌,当你使用装备牌时,你可弃置一名其他角色的一张牌。', - tengyin:'滕胤', - chenjian:'陈见', - chenjian_info:'准备阶段,你可展示牌堆顶的3+X张牌(X为你“陈见”标记的数量且至多为2)。然后你可依次执行以下两项中的任意项:⒈弃置一张牌,然后令一名角色获得与你弃置牌花色相同的牌。⒉使用其中剩余的一张牌。若你执行了所有选项,则你获得一枚“陈见”,然后重铸所有手牌。', - xixiu:'皙秀', - xixiu_info:'锁定技。①当你成为其他角色使用牌的目标时,若你的装备区内有和此牌花色相同的牌,则你摸一张牌。②若你装备区内的牌数为1,则其他角色不能弃置你装备区内的牌。', - guanning:'管宁', - dunshi:'遁世', - dunshi_info:'每回合限一次。你可以视为使用或打出一张【杀】/【闪】/【桃】/【酒】,然后当前回合角色于本回合内下一次造成伤害时,你选择两项:⒈防止此伤害。系统从技能名中包含“仁/义/礼/智/信”字样的技能中随机选择三个其未拥有的技能,然后你令当前回合角色获得其中一个技能。⒉从〖遁世〗中删除你本次使用或打出的牌并获得一个“席”。⒊减1点体力上限并摸X张牌(X为你的“席”数)。', - dc_gaolan:'高览', - xizhen:'袭阵', - xizhen_info:'出牌阶段开始时,你可选择一名其他角色,视为对其使用【杀】或【决斗】。然后当有角色于本阶段内使用或打出牌响应你时,该角色回复1点体力,你摸一张牌(若其满体力,改为两张)。', - caomao:'曹髦', - qianlong:'潜龙', - qianlong_info:'当你受到伤害后,你可以展示牌堆顶的三张牌并获得其中的至多X张牌(X为你已损失的体力值),然后将剩余的牌置于牌堆底。', - fensi:'忿肆', - fensi_info:'锁定技。准备阶段,你须选择一名体力值不小于你的角色并对其造成1点伤害,然后若你选择的角色不为你自己,则其视为对你使用一张【杀】。', - juetao:'决讨', - juetao_info:'限定技。出牌阶段开始时,若你的体力值为1,则你可以选择一名其他角色。你展示牌堆底的一张牌,若此牌能被你使用,则你使用此牌并重复此流程直到出现不可使用的牌或其死亡(你与其以外的角色不是此牌的合法目标)。', - zhushi:'助势', - zhushi_info:'主公技。每回合限一次,其他魏势力角色于回合内回复体力时,其可令你摸一张牌。', - laiyinger:'来莺儿', - xiaowu:'绡舞', - xiaowu_info:'出牌阶段限一次,你可以选择任意名座位连续且包含你的上家/下家的角色。这些角色依次选择一项:⒈令你摸一张牌;⒉其摸一张牌。然后若选择选项一的角色数大于选项二的角色数,则你获得一枚“沙”;若选择选项二的角色数大于选项一的角色数,则你对这些角色依次造成1点伤害。', - huaping:'化萍', - huaping_info:'限定技。①一名其他角色死亡时,你可获得其当前拥有的所有不带有「Charlotte」标签的技能,然后你失去〖绡舞〗,移去所有“沙”并摸等量的牌。②当你死亡时,你可令一名其他角色获得〖沙舞〗和你的所有“沙”。', - shawu:'沙舞', - shawu_info:'当你使用【杀】指定目标后,你可选择一项:⒈弃置两张手牌;⒉移去一枚“沙”并摸两张牌。然后你对目标角色造成1点伤害。', - dc_huangchengyan:'黄承彦', - dcjiezhen:'解阵', - dcjiezhen_info:'出牌阶段限一次,你可选择一名其他角色。该角色获得〖八阵〗,且其所有不为{锁定技、限定技、觉醒技、主公技、带有Charlotte标签}的技能失效。你的下回合开始时,或其因〖八卦阵〗发起的判定结算结束后,你令其恢复其以此法失效的所有技能并失去以此法获得的〖八阵〗,然后获得其区域内的一张牌。', - dczecai:'择才', - dczecai_info:'限定技。一轮游戏开始时,若游戏轮数大于1,则你可令一名其他角色获得〖集智〗直到下一轮游戏开始;若其是上一轮内使用过锦囊牌数量唯一最多的角色,则其获得一个额外的回合。', - dcyinshi:'隐世', - dcyinshi_info:'锁定技。①每回合限一次,当你受到伤害时,若此伤害的渠道不为有颜色的牌,则你防止此伤害。②当有因〖八卦阵〗发起的判定的判定牌生效时,你获得此判定牌。', - tenggongzhu:'滕公主', - xingchong:'幸宠', - xingchong_info:'一轮游戏开始时,你可声明两个自然数X和Y,且(X+Y)≤min(5, 你的体力上限)。你摸X张牌并展示Y张手牌。若如此做,当你于本轮内失去一张以此法展示的牌后,你摸两张牌。', - liunian:'流年', - liunian_info:'锁定技。牌堆第一次洗牌后,你于回合结束时加1点体力上限;牌堆第二次洗牌后,你于本回合结束时回复1点体力,且本局游戏内的手牌上限+10。', - zhangyao:'张媱', - yuanyu:"怨语", - yuanyu_info:"出牌阶段限一次。你可以摸一张牌,然后选择一张手牌和一名其他角色。该角色获得如下效果直到你发动〖夕颜〗:{你与该角色的弃牌阶段开始时,或当该角色造成1点伤害后,其须将一张手牌作为“怨”置于你的武将牌上}。然后你将你选择的手牌作为“怨”置于你的武将牌上。", - xiyan:"夕颜", - xiyan_info:"当有牌作为“怨”移动到你的武将牌上后,若“怨”中的花色数达到4种,则你可以获得所有“怨”。然后若当前回合角色:是你,你本回合手牌上限+4且使用牌无次数限制且重置你的〖怨语〗于此阶段的发动次数;不是你,你可令当前回合角色本回合手牌上限-4且不能使用基本牌。", yanrou:'阎柔', choutao:'仇讨', choutao_info:'当你使用【杀】时,或成为【杀】的目标后,你可以弃置此【杀】使用者的一张牌,令此【杀】不可被响应。若你是此【杀】的使用者,则你令此【杀】不计入次数限制。', xiangshu:'襄戍', xiangshu_info:'限定技。结束阶段开始时,若你本回合内造成过伤害,则你可以选择一名已受伤的角色。该角色回复X点体力并摸X张牌(X为你本回合内造成的伤害值总和且至多为5)。', - caimaozhangyun:'蔡瑁张允', - lianzhou:'连舟', - lianzhou_info:'锁定技。准备阶段,你横置你的武将牌。然后你可横置任意名体力值等于你的角色。', - jinglan:'惊澜', - jinglan_info:'锁定技。当你造成伤害后,若你的手牌数:大于体力值,你弃置四张手牌;等于体力值,你弃置一张手牌并回复1点体力;小于体力值,你受到1点无来源火焰伤害并摸五张牌。', - dc_huangzu:'黄祖', - dcjinggong:'精弓', - dcjinggong_info:'你可以将一张装备牌当做无距离限制的【杀】使用。当你声明使用此【杀】后,你将此杀的伤害值基数改为X(X为你至此【杀】第一个目标角色的距离且至多为5)。', - dcxiaojuan:'骁隽', - dcxiaojuan_info:'当你使用牌指定其他角色为唯一目标后,你可以弃置其一半的手牌(向下取整)。若这些牌中有与你使用牌花色相同的牌,则你弃置一张手牌。', - dc_yanghu:'羊祜', - dcdeshao:'德劭', - dcdeshao_info:'每回合限两次。当你成为其他角色使用的黑色牌的目标后,你可以摸一张牌,然后若其手牌数不小于你,则你弃置其一张牌。', - dcmingfa:'明伐', - dcmingfa_info:'①出牌阶段限一次。当你使用【杀】或普通锦囊牌结算结束后,若你的武将牌上没有“明伐”牌,则你可以将此牌作为“明伐”牌置于武将牌上并选择一名其他角色,记录该角色和此牌的名称。②一名角色的回合结束时,若其是你〖明伐①〗记录的角色,则你视为对其依次使用X张〖明伐①〗记录的牌,然后移去“明伐”牌(X为其手牌数且至少为1,至多为5)。③一名角色死亡时,若其是你〖明伐①〗记录的角色,则你移去“明伐”牌。', - zhangxuan:'张嫙', - tongli:'同礼', - //tongli_info:'当你于出牌阶段内不因〖同礼〗而使用基本牌或普通锦囊牌指定第一个目标后,若你手牌中的花色数和你于本阶段内不因〖同礼〗而使用过的牌数相等,则你可以于此牌结算结束后依次视为对此牌的所有目标使用X张名称和属性相同的牌(X为你手牌中的花色数)。', - tongli_info:'当你于出牌阶段内使用基本牌或普通锦囊牌指定第一个目标后,若你手牌中的花色数和你于本阶段内使用过的牌数相等,则你可以令此牌额外结算X次(X为你手牌中的花色数)。', - shezang:'奢葬', - shezang_info:'每轮限一次。当你或你回合内的其他角色进入濒死状态时,你可以从牌堆中获得每种花色的牌各一张。', qinyilu:'秦宜禄', piaoping:'漂萍', piaoping_info:'转换技,锁定技。当你使用一张牌时,阴:你摸X张牌。阳:你弃置X张牌。(X为你本阶段内发动过〖漂萍〗的次数且至多等于你的体力值)', @@ -30879,56 +10449,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tuoxian_info:'当你因执行〖漂萍〗的效果而弃置牌后,你可以弃置一枚“栗”并令一名其他角色获得这些牌,然后令该角色选择一项:⒈弃置区域内等量的牌。⒉令你的〖漂萍〗失效直到回合结束。', chuaili:'惴栗', chuaili_info:'锁定技。当你成为其他角色使用黑色牌的目标后,若你的〖漂萍〗:处于阳状态,则你将〖漂萍〗转换至阴状态;处于阴状态,则你获得一枚“栗”,且令〖惴栗〗于本回合内失效。', - dc_liuyu:'刘虞', - dcsuifu:'绥抚', - dcsuifu_info:'其他角色的结束阶段开始时,若你和一号位本回合内累计受到过的伤害值大于1,则你可以将该角色的所有手牌置于牌堆顶,然后视为使用一张【五谷丰登】。', - dcpijing:'辟境', - dcpijing_info:'结束阶段开始时,你可以选择任意名角色。你令所有未选择的角色失去〖自牧〗,然后你和这些角色获得〖自牧〗。', - dczimu:'自牧', - dczimu_info:'锁定技。当你受到伤害后,你令所有拥有〖自牧〗的角色各摸一张牌,然后你失去〖自牧〗。', - caohua:'曹华', - caiyi:'彩翼', - caiyi_info:'转换技。结束阶段,你可令一名角色选择并执行一项,然后移除此选项。阴:⒈回复X点体力。⒉摸X张牌,⒊复原武将牌。⒋随机执行一个已经移除过的阴选项;阳:⒈受到X点伤害。⒉弃置X张牌。⒊翻面并横置。⒋随机执行一个已经移除过的阳选项。(X为该阴阳态剩余选项的数量)。', - guili:'归离', - guili_info:'你的第一个回合开始时,你须选择一名其他角色。该角色每轮的第一个回合结束后,若其本回合内未造成过伤害,则你执行一个额外的回合。', - dc_jiling:'纪灵', - dcshuangren:'双刃', - dcshuangren_info:'出牌阶段开始时,你可以和一名其他角色A进行拼点。若你赢,你选择一名角色B,或选择包含A在内的两名角色A和B(B的势力需与A相同),然后视为对被选择的角色使用一张【杀】(不计入次数限制);若你没赢,则你本阶段内不能使用【杀】。', - dc_sunru:'孙茹', - xiecui:'撷翠', - xiecui_info:'当有角色于回合内第一次因执行牌的效果而造成伤害时,你可以令此伤害+1。若其势力为吴,则该角色获得此伤害牌对应的实体牌,且其本回合的手牌上限+1。', - youxu:'忧恤', - youxu_info:'一名角色A的回合结束时,若其手牌数大于体力值,则你可以展示A的一张牌,然后将此牌交给另一名角色B。若B的体力值为全场最少,则B回复1点体力。', - zhaoang:'赵昂', - dczhongjie:'忠节', - dczhongjie_info:'每轮限一次。当有角色因失去体力而进入濒死状态时,你可令其回复1点体力并摸一张牌。', - dcsushou:'夙守', - dcsushou_tag:'对方手牌', - dcsushou_info:'一名角色的出牌阶段开始时,若其手牌数为全场唯一最多,则你可以失去1点体力并摸X张牌。然后若该角色不是你,则你可以观看其一半的手牌(向下取整),且用至多X张手牌替换其中等量的牌。(X为你已损失的体力值)', - dc_wangchang:'王昶', - dckaiji:'开济', - dckaiji_info:'转换技。出牌阶段限一次,你可以:阴:摸X张牌;阳:弃置至多X张牌(X为你的体力上限且至多为5)。', - dcpingxi:'平袭', - dcpingxi_info:'结束阶段,若X大于0,则你可以选择至多X名其他角色(X为本回合内因弃置而进入弃牌堆的牌数)。你依次弃置这些角色的各一张牌,然后视为对这些角色使用一张【杀】。', fengfang:'冯方', dcditing:'谛听', dcditing_info:'其他角色的出牌阶段开始时,若你在该角色的攻击范围内,则你可以观看其的X张手牌(X为你的体力值)并选择其中一张,且获得如下效果:①当其使用对应实体牌包含此牌的牌指定你为目标后,你令此牌对你无效。②当其使用对应实体牌包含此牌的牌结算结束后,若你不是此牌的目标,则你摸两张牌。③其出牌阶段结束时,若此牌位于其的手牌区,则你获得此牌。', dcbihuo:'避祸', dcbihuo_info:'①当你受到其他角色造成的伤害后,你可令一名角色下回合摸牌阶段的额定摸牌数+1。②当你对其他角色造成伤害后,你可令一名角色下回合摸牌阶段的额定摸牌数-1。', - zhangxun:'张勋', - suizheng:'随征', - suizheng_info:'结束阶段,你可以选择一名角色A,获得如下效果直到其下回合结束:①A于下回合出牌阶段内使用【杀】的次数上限+1且无距离限制;②A下回合的出牌阶段结束时,你可以选择一名此阶段内受到过A造成的伤害的角色B,视为对B使用一张【杀】。', - dc_liuba:'刘巴', - dczhubi:'铸币', - dczhubi_info:'当有♦牌因弃置而进入弃牌堆后,你可以令系统从牌堆/弃牌堆中检索一张【无中生有】,并将此牌置于牌堆顶。', - dcliuzhuan:'流转', - dcliuzhuan_tag:'转', - dcliuzhuan_info:'锁定技。①其他角色于其回合内不于摸牌阶段而获得的牌称为“转”。②你不能成为实体牌中包含“转”的牌的目标。③当有“转”直接进入弃牌堆或经由处理区进入弃牌堆后,你获得之。', - xiahoulingnv:'夏侯令女', - fuping:'浮萍', - fuping_info:'①其他角色对你使用的牌结算结束后,若你未因此技能记录过此牌的名称且你有未废除的装备栏,则你可以废除一个装备栏,记录此牌的名称。②每回合每种牌名限一次。你可以将一张非基本牌当做〖浮萍①〗记录过的基本牌或锦囊牌使用或打出。③若你的所有装备栏均已被废除,则你使用牌无距离限制。', - weilie:'炜烈', - weilie_info:'每局游戏限X次。出牌阶段,你可以弃置一张牌并选择一名已受伤的角色,令该角色回复1点体力。然后若其体力值小于体力上限,则其摸一张牌(X为你〖浮萍①〗中的记录数+1)。', bianxi:'卞喜', dunxi:'钝袭', dunxi_info:'①当你使用具有伤害标签的牌结算结束后,你可以令一名不为你的目标角色获得一枚“钝”。②有“钝”的角色使用基本牌或锦囊牌指定唯一目标时,你令其移去一枚“钝”。系统随机选择一名角色,并将此牌的目标改为该角色。若该角色和原目标相同,则其失去1点体力。若其正处于出牌阶段内,则结束此阶段。', @@ -30937,94 +10462,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcxiaoxi_info:'锁定技。出牌阶段开始时,你声明X并减X点体力上限(X∈[1,2])。然后你选择一名攻击范围内的其他角色并选择一项:⒈获得该角色的X张牌。⒉视为对其使用X张【杀】。', xiongrao:'熊扰', xiongrao_info:'限定技。准备阶段开始时,你可以选择所有其他角色。这些角色本回合内所有不为锁定技、限定技、觉醒技的普通技能失效。然后你将体力上限增加至7点并摸X张牌(X为你以此法增加的体力上限数)。', - huzhao:'胡昭', - midu:'弥笃', - midu_info:'出牌阶段限一次。你可以选择一项:⒈废除任意个装备栏或判定区,并令一名角色摸等量的牌。⒉恢复一个已经被废除的装备栏或判定区,然后你获得〖活墨〗直到下回合开始。', - xianwang:'贤望', - xianwang_info:'锁定技。若你有被废除的装备栏,则其他角色至你的距离+1,你至其他角色的距离-1;若废除的装备栏数大于2,则改为距离+2/-2。', - guanhai:'管亥', - suoliang:'索粮', - suoliang_info:'每回合限一次。当你对其他角色造成伤害后,你可以选择并展示其的至多X张牌(X为其体力上限且至多为5)。若这些牌中有♥或♣牌,则你获得这些牌;否则你弃置这些牌。', - qinbao:'侵暴', - qinbao_info:'锁定技。当你使用【杀】或普通锦囊牌时,你令所有手牌数不小于你的角色不能响应此牌。', - liuhui:'刘徽', - dcgeyuan:'割圆', - dcgeyuan_info:'锁定技。①游戏开始时,你将从A至K的所有整数排列为一个环形链表,称为“圆环之理”。②当有一张牌进入弃牌堆后,若此牌的点数在“圆环之理”内,且“圆环之弧”为空或此牌的点数与“圆环之弧”两端的点数相邻,则你将此牌的点数记录进“圆环之弧”;然后若“圆环之弧”与“圆环之理”长度相同,则你从“圆环之理”中移除“圆环之弧”记录的第一个和最后一个数字A和B(当“圆环之理”长度不大于3时则不移除),清空“圆环之弧”,获得场上和牌堆中所有点数为A和B的牌。', - dcjieshu:'解术', - dcjieshu_info:'锁定技。①所有点数不在“圆环之理”中的牌不计入你的手牌上限。②当你使用牌时,若“圆环之弧”为空或此牌的点数与“圆环之弧”两端的点数相邻,则你摸一张牌。', - dcgusuan:'股算', - dcgusuan_info:'觉醒技。一名角色的回合结束时,若你的“圆环之理”长度为3,则你减1点体力上限并修改〖割圆〗。', - dcgeyuan_magica:'割圆·改', - dcgeyuan_magica_info:'锁定技。当有一张牌进入弃牌堆后,若此牌的点数在“圆环之理”内,且“圆环之弧”为空或此牌的点数与“圆环之弧”两端的点数相邻,则你将此牌的点数记录进“圆环之弧”;然后若“圆环之弧”与“圆环之理”长度相同,则你清空“圆环之弧”并选择至多三名角色,这些角色中的第一名角色摸三张牌,第二名角色弃置四张牌,第三名角色将其手牌与牌堆底的五张牌交换。', - zhangfen:'张奋', - dcwanglu:'望橹', - dcwanglu_info:'锁定技。准备阶段开始时,若你的装备区内:有【大攻车】,则你获得一个额外的出牌阶段;没有【大攻车】,则你将一张【大攻车】置入装备区。', - dcxianzhu:'陷筑', - dcxianzhu_info:'当你造成渠道为【杀】伤害后,你可以为你装备区内的【大攻车】选择一项强化(每张【大攻车】最多被强化五次):⒈通过【大攻车】使用【杀】无视距离和防具;⒉通过此【大攻车】使用的【杀】可以额外选择1个目标(可叠加);⒊通过此【大攻车】使用的【杀】造成伤害后的弃置牌数+1(可叠加)。', - dcchaixie:'拆械', - dcchaixie_info:'锁定技。当你的【大攻车】被销毁后,你摸X张牌(X为此【大攻车】被强化过的次数)。', - dagongche:'大攻车', - dagongche_skill:'大攻车', - dagongche_info:'出牌阶段开始时,你可以视为使用一张【杀】,且当此【杀】因执行效果而对目标角色造成伤害后,你弃置其一张牌。若此【大攻车】未被强化,则其他角色无法弃置你装备区内的【大攻车】。当此牌离开你的装备区后,销毁之。', - dc_caiyang:'蔡阳', - dcxunji:'寻嫉', - dcxunji_info:'出牌阶段限一次,你可以选择一名其他角色。该角色的下个结束阶段开始时,若其于该回合内造成过伤害,则你视为对其使用一张【决斗】,且当此【决斗】对其造成伤害后,你失去等量的体力。', - dcjiaofeng:'交锋', - dcjiaofeng_info:'锁定技。每回合限一次,当你造成伤害时,若你本回合内未造成过其他伤害且你已损失的体力值:大于0,则你摸一张牌;大于1,则此伤害+1;大于2,则你回复1点体力。', - dukui:'杜夔', - dcfanyin:'泛音', - dcfanyin_info:'出牌阶段开始时,你可以亮出牌堆中点数最小的一张牌。然后你选择一项,并可以亮出一张点数为此牌二倍的牌且重复此流程:⒈使用此牌;⒉你于本回合内使用的下一张基本牌或普通锦囊牌选择目标后,可以增加一个目标。', - dcpeiqi:'配器', - dcpeiqi_info:'当你受到伤害后,你可以移动场上的一张牌。然后若场上所有角色均在彼此的攻击范围内,则你可以再移动场上的一张牌。', - dc_lvkuanglvxiang:'吕旷吕翔', - dcshuhe:'数合', - dcshuhe_info:'出牌阶段限一次,你可以展示一张手牌。若场上有与此牌点数相同的牌,则你获得这些牌;否则你将此牌交给一名其他角色并获得一枚“爵”。', - dcliehou:'列侯', - dcliehou_info:'锁定技。摸牌阶段开始时,你令额定摸牌数+X;然后此摸牌阶段结束时,你选择一项:⒈弃置X张牌。⒉失去1点体力(X为你的“爵”数+1且至多为5)。', - quanhuijie:'全惠解', - dchuishu:'慧淑', - dchuishu_info:'摸牌阶段结束时,你可以摸[3]张牌。若如此做:你弃置[1]张手牌,且当你于本回合内弃置第[2]+1张牌后,你从弃牌堆中随机获得等量的锦囊牌。', - dcyishu:'易数', - dcyishu_info:'锁定技。当你不因出牌阶段而失去牌后,你令A={〖慧淑〗的中括号内最小的数字},B={〖慧淑〗的中括号内最大的数字}。然后你令A中的一个数字+2,且B中的一个数字-1。', - dcligong:'离宫', - dcligong_info:'觉醒技。准备阶段,若〖慧淑〗的中括号内有不小于5的数字,则你加1点体力上限,回复1点体力并失去〖易数〗。系统随机检索四张吴势力的女性武将牌,然后你选择一项:⒈摸三张牌。⒉失去〖慧淑〗,然后获得这些武将牌上的任意两个非Charlotte技能。', - yinfuren:'尹夫人', - dcyingyu:'媵予', - dcyingyu_info:'准备阶段开始时,你可以展示两名角色的各一张手牌。若这两张牌的花色不同,则你可以令一名角色获得另一名角色的展示牌。', - dcyongbi:'拥嬖', - dcyongbi_info:'限定技。出牌阶段,你可以将所有手牌交给一名其他男性角色。你将〖媵予〗的发动时机改为“准备阶段和结束阶段开始时”。然后若这些牌中包含的花色数:大于1,则你与其本局游戏的手牌上限+2;大于2,则当你或其于本局游戏内受到大于1的伤害时,此伤害-1。', - dc_huangquan:'黄权', - dcquanjian:'劝谏', - dcquanjian_info:'出牌阶段每项各限一次。你可以选择一项流程并选择一名其他角色A:⒈令A对其攻击范围内的另一名角色B造成1点伤害。⒉令A将手牌数调整至体力上限(至多摸至五张),且其本回合内不能使用或打出手牌。然后A选择一项:⒈执行此流程。⒉本回合下次受到的伤害+1。', - dctujue:'途绝', - dctujue_info:'限定技。当你进入濒死状态时,你可以将所有牌交给一名其他角色。然后你回复等量的体力并摸等量的牌。', dc_huban:'胡班', dcchongyi:'崇义', dcchongyi_info:'①一名角色使用【杀】时,若此牌是其于当前出牌阶段内使用的第一张牌,则你可以令其摸两张牌,且其本回合使用【杀】的次数上限+1。②一名角色的出牌阶段结束时,若其于此阶段内使用的最后一张牌为【杀】,则你可以令其本回合的手牌上限+1。', - chengui:'陈珪', - dcyingtu:'营图', - dcyingtu_info:'每回合限一次。当你的上家/下家于摸牌阶段外获得牌后,你可以获得其一张牌,然后将一张牌交给你的下家/上家。若你给出的牌为装备牌,则其使用之。', - dccongshi:'从势', - dccongshi_info:'一名角色使用的装备牌结算结束后,若其装备区内的牌数为全场最多,则你摸一张牌。', - dingshangwan:'丁尚涴', - dcfengyan:'讽言', - dcfengyan_info:'出牌阶段每项各限一次。你可以:⒈令一名体力值不大于你的其他角色交给你一张手牌。⒉视为对一名手牌数不大于你的角色使用一张【杀】(无距离和次数限制)。', - dcfudao:'抚悼', - dcfudao_info:'游戏开始时,你选择一名其他角色,称为“继子”角色。当你或“继子”每回合首次使用牌指定对方为目标后,你与其各摸两张牌。当有角色杀死你或“继子”后,该角色称为“决裂”角色。当你或“继子”对“决裂”造成伤害后,此伤害+1。当你成为“决裂”角色使用牌的目标后,其本回合内不能再使用牌。', - luyi:'卢弈', - dcyaoyi:'邀弈', - dcyaoyi_info:'锁定技。①游戏开始时,你令所有存活且未拥有转换技的角色获得〖手谈〗。②你发动〖手谈〗时无需弃置牌,且无次数限制。③所有拥有转换技的角色不能使用牌指定其他拥有转换技且双方所有转换技状态均相同的角色为目标。', - dcfuxue:'复学', - dcfuxue_info:'①准备阶段,你可以从弃牌堆中选择获得至多X张不因使用而进入弃牌堆的牌。②结束阶段,若你的手牌区中没有因〖复学①〗获得的牌,则你摸X张牌(X为你的体力值)。', - dcshoutan:'手谈', - dcshoutan_info:'转换技。出牌阶段限一次,阴:你可以弃置一张不为黑色的手牌。阳:你可以弃置一张黑色手牌。', - dc_liuye:'刘晔', - dcpoyuan:'破垣', - dcpoyuan_info:'游戏开始时或准备阶段开始时,若你的装备区内:没有【霹雳投石车】,则你可以将一张【霹雳投石车】置入装备区;有【霹雳投石车】,则你可以弃置一名其他角色至多两张牌。', - dchuace:'画策', - dchuace_info:'出牌阶段限一次。你可以将一张手牌当做上一轮内未被使用过的普通锦囊牌使用。', - pilitoushiche:'霹雳投石车', - pilitoushiche_info:'锁定技。①你于回合内使用基本牌无距离限制,且当你于回合内使用基本牌时,你令此牌的牌面数值+1。②当你于回合外使用或打出基本牌时,你摸一张牌。③当此牌离开你的装备区时,销毁之。', wangwei:'王威', dcruizhan:'锐战', dcruizhan_info:'其他角色的准备阶段开始时,若其的手牌数不小于其体力值,则你可以和其拼点。若你赢或拼点牌中有【杀】,则你视为对其使用一张【杀】。然后若此【杀】造成了伤害且以上两个条件均被满足,则你获得其一张牌。', @@ -31040,53 +10480,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcjinjian_info:'①当你受到其他角色造成的伤害后或造成伤害后,你获得一枚“劲”。然后你可以和伤害来源拼点,若你赢,你恢复1点体力。②你的攻击范围+X(X为“劲”数)。', dcshizhao:'失诏', dcshizhao_info:'锁定技。每回合限一次,当你于回合外失去手牌后,若你没有手牌,且你:有“劲”,则你移去一枚“劲”并摸两张牌;没有“劲”,则你本回合下一次受到的伤害+1。', - wanglie:'王烈', - dcchongwang:'崇望', - dcchongwang_info:'其他角色使用基本牌或普通锦囊牌时,若你是本局游戏内上一张被使用的牌的使用者,则你可以选择一项:⒈令其于此牌结算结束后收回此牌对应的所有实体牌;⒉取消此牌的所有目标。', - dchuagui:'化归', - dchuagui_info:'出牌阶段开始时,你可以选择至多X名有牌的其他角色(X为场上每个阵营中最大阵营的人数,且你的选择结果不展示)。这些角色同时选择一项:⒈交给你一张牌,⒉展示一张牌。若这些角色均选择选项二,则你获得所有展示牌。', - gongsundu:'公孙度', - dczhenze:'震泽', - dczhenze_info:'弃牌阶段开始时,你可以选择一项:1.令所有手牌数与体力值大小关系与你不同的角色失去1点体力;2.令所有手牌数和体力值关系与你相同的角色回复1点体力。', - dcanliao:'安辽', - dcanliao_info:'出牌阶段限X次(X为群势力角色数)。你可以重铸一名角色的一张牌。', liyixiejing:'李异谢旌', dcdouzhen:'斗阵', dcdouzhen_info:'锁定技。①转换技。你的回合内,阴:当你使用非转化且对应的实体牌为一张黑色基本牌的【决斗】时,你获得目标角色各一张牌并获得1枚“☯”;阳:当你使用或打出非转化且对应的实体牌为一张红色基本牌的【杀】时,你获得1枚“☯”。②若你的“☯”数为:偶数,你的黑色基本牌均视为【决斗】;奇数,你的红色基本牌均视为无次数限制的普【杀】。', - dc_yuejiu:'乐就', - dccuijin:'催进', - dccuijin_info:'当你或你攻击范围内的角色使用【杀】时,你可以弃置一张牌,令此【杀】的伤害基数+1。然后当此杀被目标角色抵消或无效或防止伤害后,你摸一张牌,对使用者造成1点伤害。', - panghui:'庞会', - dcyiyong:'异勇', - dcyiyong_info:'每回合限两次。当你对其他角色造成伤害时,若你有牌,你可以与其同时弃置至少一张牌。若你以此法弃置的牌的点数之和:不大于其,你摸X张牌;不小于其,此伤害+1(X为其以此法弃置的牌数)。', - chenjiao:'陈矫', - dcxieshoux:'协守/清严', - dcxieshou:'协守', - dcxieshou_info:'每回合限一次。当一名角色受到伤害后,若你至其的距离不大于2,你可以令你的手牌上限-1,然后其选择一项:1.回复1点体力;2.复原,摸两张牌。', - dcqingyan:'清严', - dcqingyan_info:'每回合限两次。当你成为其他角色使用黑色牌的目标后,若你的手牌数:小于体力值,你可以将手牌补至体力上限;不小于体力值,你可以弃置一张牌令你的手牌上限+1。', - dcqizi:'弃子', - dcqizi_info:'锁定技。你不能对至其的距离大于2且正在进行濒死流程的角色使用【桃】。', dc_hujinding:'胡金定', dcdeshi:'德释', dcdeshi_info:'锁定技。当你受到【杀】的伤害时,若你已受伤,则你防止此伤害并令系统从弃牌堆/牌堆中检索一张【杀】,你获得此【杀】,然后减1点体力上限。', dcwuyuan:'武缘', dcwuyuan_info:'出牌阶段限一次。你可将一张【杀】交给一名其他角色,然后你回复1点体力,你与其各摸一张牌。若此【杀】为:红色【杀】,其回复1点体力;属性【杀】,其改为摸两张牌。', - zhaozhi:'赵直', - dctongguan:'统观', - dctongguan_info:'一名角色的第一个回合开始时,你为其选择一项属性(每个属性至多选两次,且仅对你可见)。', - dcmengjie:'梦解', - dcmengjie_info:'一名角色的回合结束时,若其本回合完成了其〖统观〗属性,你执行对应效果:
  • 「武勇」造成伤害:对一名其他角色造成1点伤害;
  • 「刚硬」回复体力,或于获得牌后手牌数大于体力值:令一名角色回复1点体力;
  • 「多谋」于摸牌阶段外摸牌:摸两张牌;
  • 「果决」弃置或获得其他角色的牌:弃置一名角色区域内至多两张牌;
  • 「仁智」交给其他角色牌:令一名其他角色将手牌补至体力上限(至多摸五张)。', - dctongguan_wuyong:'武勇', - dctongguan_wuyong_info:'任务目标:造成伤害。', - dctongguan_gangying:'刚硬', - dctongguan_gangying_info:'任务目标:回复体力,或于获得牌后手牌数大于体力值。', - dctongguan_duomou:'多谋', - dctongguan_duomou_info:'任务目标:于摸牌阶段外摸牌。', - dctongguan_guojue:'果决', - dctongguan_guojue_info:'任务目标:弃置或获得其他角色的牌。', - dctongguan_renzhi:'仁智', - dctongguan_renzhi_info:'任务目标:交给其他角色牌。', shiyi:'是仪', dccuichuan:'榱椽', dccuichuan_info:'出牌阶段限一次。你可以弃置一张手牌并选择一名角色,其随机使用牌堆里一张其空置装备栏对应副类别且其能对其使用的装备牌,你摸X张牌(X为其装备区里的牌数)。然后若其装备区里的牌数增加至四张,你失去〖榱椽〗,获得〖佐谏〗,且令其获得一个额外回合。', @@ -31094,160 +10495,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dczhengxu_info:'每回合每项限一次。①当你受到伤害时,若你本回合失去过牌,你可以防止此伤害。②当你失去牌后,若你本回合受到过伤害,你可以摸等量的牌。', dczuojian:'佐谏', dczuojian_info:'出牌阶段结束时,若你于此阶段使用过的牌数不小于体力值,你可以选择一项:1.令装备区牌数多于你的角色各摸一张牌;2.弃置装备区牌数少于你的角色各一张手牌。', - zhujianping:'朱建平', - olddcxiangmian:'相面', - olddcxiangmian_info:'其他角色的结束阶段,你可以判定。然后你不能再对其发动此技能,其获得以下效果:当其使用第X张结果的花色的牌后(X为结果的点数),其失去等同于其体力值的体力。', - dcxiangmian:'相面', - dcxiangmian_info:'出牌阶段限一次。你可以令一名其他角色判定,然后你不能再对其发动此技能,其获得以下效果:当其使用结果的花色的牌后,或当其使用X张牌后(X为结果的点数),其失去等同于其体力值的体力。', - dctianji:'天机', - dctianji_info:'锁定技。当判定牌进入弃牌堆后,你从牌堆随机获得分别与该牌类型、花色和点数相同的牌各一张。', - yuanji:'袁姬', - dcmengchi:'蒙斥', - dcmengchi_info:'锁定技。若你未于当前回合获得过牌:你不能使用牌;当你横置前,取消之;当你受到无属性伤害后,回复1点体力。', - dcfangdu:'芳妒', - dcfangdu_info:'锁定技。当你于回合外受到伤害后,若此次伤害为你于本回合受到的:第一次无属性伤害,你回复1点体力;第一次属性伤害,你随机获得伤害来源的一张牌。', - dcjiexing:'节行', - dcjiexing_info:'当你受到伤害后、失去体力后或回复体力后,你可以摸一张牌,且此牌不计入本回合的手牌上限。', - dongguiren:'董贵人', - dclianzhi:'连枝', - dclianzhi_info:'①游戏开始时,你选择一名其他角色(仅你可见)。②每回合限一次。当你进入濒死状态时,若〖连枝①〗角色存活,你回复1点体力并与其各摸一张牌。③当〖连枝①〗角色死亡后,你可以与一名其他角色各获得〖受责〗,且其获得与你拥有的等量枚“绞”标记(至少获得1枚)。', - dclingfang:'凌芳', - dclingfang_info:'锁定技。准备阶段,或当其他角色使用黑色牌结算结束后,若你是此牌的目标,或你使用黑色牌结算结束后,若你不是此牌目标,你获得1枚“绞”。', - dcfengying:'风影', - dcfengying_info:'①一名角色的回合开始时,你记录弃牌堆中所有黑色基本牌或黑色普通锦囊牌的牌名。②每回合每种牌名各限一次。你可以将一张点数不大于“绞”数的手牌当做任意一张〖风影①〗记录中的牌使用。', - dcshouze:'受责', - dcshouze_info:'锁定技。结束阶段,若你有“绞”,你弃1枚“绞”,随机获得弃牌堆中的一张黑色牌,失去1点体力。', sunlang:'孙狼', dctingxian:'铤险', dctingxian_info:'每回合限一次。当你使用【杀】指定最后一个目标后,你可以摸X张牌,然后令此【杀】对其中至多X个目标无效(X为你装备区的牌数)。', dcbenshi:'奔矢', dcbenshi_info:'锁定技。①你的攻击范围+1。②你的攻击范围基数不受装备区内武器牌的影响。③由你使用的【杀】的牌面信息中的“使用目标”产生的规则改为“攻击范围内的所有角色”。', - chengbing:'程秉', - dcjingzao:'经造', - dcjingzao_info:'出牌阶段每名角色限一次。你可以选择一名其他角色并亮出牌堆顶三张牌,其选择一项:1.弃置一张牌名与这些牌的其中一张牌名相同的牌,然后你〖经造〗本回合亮出的牌数+1;2.令你随机获得这些牌中每种牌名的牌各一张,然后你本回合不能再发动〖经造〗。', - dcenyu:'恩遇', - dcenyu_info:'锁定技。当你成为其他角色使用牌的目标后,若你本回合成为过此牌名的牌的目标,此牌对你无效。', - leibo:'雷薄', - dcsilve:'私掠', - dcsilve_info:'游戏开始时,你选择一名其他角色(对其他角色不可见),称为“私掠”角色。然后你获得以下效果:①当“私掠”角色造成伤害后,若你本回合未因此效果得到过受伤角色的牌,你可以获得受伤角色一张牌;②当“私掠”角色受到其他角色造成的伤害后,若伤害来源存活,你须对伤害来源使用一张【杀】(无距离限制),否则你弃置一张手牌。', - dcshuaijie:'衰劫', - dcshuaijie_info:'限定技。出牌阶段,若你的体力值与装备区里的牌数均大于“私掠”角色,或没有角色有“私掠”,你可以减1点体力上限,然后选择一项:1.获得“私掠”角色至多三张牌;2.从牌堆随机获得三张类型各不同的牌。最后将你的“私掠”角色改为你。', - dc_zhouxuān:'周宣', - dcwumei:'寤寐', - dcwumei_info:'每轮限一次。回合开始时,你可以令一名角色记录场上所有角色的体力值并进行一个额外的回合,并将你的回合移至该回合后进行。该角色以此法进行的回合的结束阶段,将场上所有角色的体力值改为记录内的对应数值。', - dczhanmeng:'占梦', - dczhanmeng_info:'当你使用牌时,你可以选择本回合未选择过的一项:1.上一回合内,若没有同名牌被使用过,你获得一张非伤害牌;2.下一回合内,当同名牌首次被使用后,你获得一张伤害牌;3.令一名其他角色弃置两张牌,若点数之和大于10,你对其造成1点火焰伤害。', - dc_sp_jiaxu:'魏贾诩', - dcjianshu:'间书', - dcjianshu_info:'出牌阶段限一次。你可以将一张黑色手牌交给一名其他角色,并选择另一名其他角色,你令前者与后者拼点。赢的角色随机弃置一张牌,没赢的角色失去1点体力。若有角色因此死亡,你令你〖间书〗于此阶段发动的次数上限+1。', - dcyongdi:'拥嫡', - dcyongdi_info:'限定技。出牌阶段,你可以选择一名男性角色,若其:体力上限最少,其加1点体力上限;体力值最少,其回复1点体力;手牌数最少,其摸X张牌(X为其体力上限且至多为5)。', - dc_wangyun:'十周年王允', - dc_wangyun_ab:'王允', - dclianji:'连计', - dclianji_info:'出牌阶段限一次。你可以弃置一张手牌并选择一名其他角色,其随机使用牌堆中的一张武器牌,然后其选择一项:1.对另一名其他角色使用一张【杀】,并将武器牌交给其中一个目标;2.令你视为对其使用一张【杀】,并将武器牌交给你。', - dcmoucheng:'谋逞', - dcmoucheng_info:'觉醒技。准备阶段,若你发动过〖连计〗且两个选项均被选择过,你失去〖连计〗,然后获得〖矜功〗。', - liupi:'刘辟', - dcjuying:'踞营', - dcjuying_info:'出牌阶段结束时,若你于此阶段内使用【杀】的次数未达到上限,你可以选择任意项:1.下回合使用【杀】的次数上限+1;2.本回合手牌上限+2;3.摸三张牌。若你选择的项数超过了你的体力值,你弃置X张牌(X为你选择的项数减你的体力值)。', - xuelingyun:'薛灵芸', - dcxialei:'霞泪', - dcxialei_info:'当你的红色牌进入弃牌堆后,或当你使用或打出的红色牌经由处理区进入弃牌堆后,你可以观看牌堆顶的三张牌,获得其中的一张牌,且可以将其余牌置于牌堆底。然后你本回合以此法观看的牌数-1。', - dcanzhi:'暗织', - dcanzhi_info:'出牌阶段或当你受到伤害后,你可以判定,若结果为红色,你重置〖霞泪〗的观看牌数;若结果为黑色,〖暗织〗于本回合失效,然后你可以令一名非当前回合角色获得本回合进入弃牌堆的两张牌。', - dc_huanghao:'黄皓', - dcqinqing:'寝情', - dcqinqing_info:'结束阶段,你可以弃置一名攻击范围内包含一号位的其他角色一张牌。然后若其手牌数大于一号位,你摸一张牌。', - dccunwei:'存畏', - dccunwei_info:'锁定技。当你成为其他角色使用锦囊牌的目标后,若你是唯一目标,你摸一张牌;否则你弃置一张牌。', - dc_zhaotongzhaoguang:'赵统赵广', - dcqingren:'青刃', - dcqingren_info:'结束阶段,你可以摸X张牌(X为你本回合发动〖翊赞〗的次数)。', - dclongyuan:'龙渊', - dclongyuan_info:'锁定技。一名角色的回合结束时,若你本局游戏已发动过至少三次〖翊赞〗,你摸两张牌并回复1点体力,修改〖翊赞〗。', - zhenghun:'郑浑', - dcqiangzhi:'强峙', - dcqiangzhi_info:'出牌阶段限一次。你可以弃置你和一名其他角色的共计三张牌。然后若你与其之中有角色因此失去了三张牌,该角色对另一名角色造成1点伤害。', - dcpitian:'辟田', - dcpitian_info:'①当你的牌被弃置后,或当你受到伤害后,你的手牌上限+1。②结束阶段,若你的手牌数小于手牌上限,你可以摸至手牌上限(至多摸五张),然后重置因〖辟田①〗增加的手牌上限。', - furongfuqian:'傅肜傅佥', - dcxuewei:'血卫', - dcxuewei_info:'结束阶段,你可以选择一名体力值不大于你的角色,然后你获得如下效果直到你的下回合开始时:当其受到伤害时,防止此伤害,然后你失去1点体力,你与其各摸一张牌(若该角色为你,则改为你摸一张牌)。', - dcyuguan:'御关', - dcyuguan_info:'一名角色的回合结束时,若你已损失的体力值为全场最多,你可以减1点体力上限,然后令X名角色将手牌摸至体力上限(X为你已损失的体力值)。', - qinlang:'秦朗', - dchaochong:'昊宠', - dchaochong_info:'当你使用牌后,你可以将手牌摸至或弃置至你的手牌上限数(至多摸五张)。然后若你以此法:获得牌,你的手牌上限-1;失去牌,你的手牌上限+1。', - dcjinjin:'矜谨', - dcjinjin_info:'每回合限一次。当你造成或受到伤害后,你可以重置因〖昊宠〗增加或减少的手牌上限,令伤害来源弃置至多X张牌,然后你摸Y张牌(X为你以此法变化的手牌上限且至少为1,Y为X减其以此法弃置的牌数)。', - xianglang:'向朗', - dckanji:'勘集', - dckanji_info:'出牌阶段限两次。你可以展示所有手牌,若花色均不同,你摸两张牌。然后若你的手牌因此包含了四种花色,你跳过下一个弃牌阶段。', - dcqianzheng:'愆正', - dcqianzheng_info:'每回合限两次。当你成为其他角色使用【杀】或普通锦囊牌的目标后,你可以重铸两张牌。若你以此法重铸的牌中没有与指定你为目标的牌类别相同的牌,你于此牌对应的实体牌进入弃牌堆后获得此牌对应的所有实体牌。', - yanghong:'杨弘', - dcjianji:'间计', - dcjianji_info:'出牌阶段限一次。你可以令至多X名座位连续的角色依次弃置一张牌。然后其中手牌数最多的角色可以视为对一名其他以此法弃置过牌的角色使用一张【杀】(X为你的攻击范围)。', - dcyuanmo:'远谟', - dcyuanmo_info:'①准备阶段或当你受到伤害后,你可以选择一项:1.攻击范围+1,然后若你攻击范围内的角色数因此增加,你可以获得任意名本次进入你攻击范围的角色各一张牌;2.攻击范围-1,然后摸两张牌。②结束阶段,若你的攻击范围内没有角色,你可以令你的攻击范围+1。', - qiaorui:'桥蕤', - dcaishou:'隘守', - dcaishou_tag:'隘', - dcaishou_info:'①结束阶段,你可以摸X张牌,称为“隘”(X为你的体力上限)。②准备阶段,你弃置所有“隘”,若你以此法弃置的牌数大于体力值且你的体力上限小于9,你加1点体力上限。③当你于回合外失去最后一张“隘”后,你减1点体力上限。', - dcsaowei:'扫围', - dcsaowei_info:'当一名其他角色使用【杀】结算结束后,若此牌的目标角色不包含你且均在你的攻击范围内,你可以将一张“隘”当做【杀】对所有目标角色使用。', sunhuan:'孙桓', dcniji:'逆击', dcniji_info:'①当你成为非装备牌的目标后,你可以摸一张牌,称为“逆击”。②一名角色的结束阶段,若你于本回合获得的“逆击”数不小于你的体力值,你可以使用一张“逆击”。你弃置所有“逆击”。', - dc_yangbiao:'杨彪', - dczhaohan:'昭汉', - dczhaohan_info:'摸牌阶段,你可以多摸两张牌,然后你于获得牌后选择一项:1.将两张手牌交给一名没有手牌的角色;2.弃置两张手牌。', - dcjinjie:'尽节', - dcjinjie_info:'当一名角色进入濒死状态时,若你本轮:进行过回合,你可以令其摸一张牌;未进行过回合,你可以弃置X张手牌令其回复1点体力(X为本轮你发动过〖尽节〗的次数)。', - dcjue:'举讹', - dcjue_info:'准备阶段,你可以视为对一名未受伤的角色使用一张【杀】。', //dc_fuwan:'十周年伏完', //dc_fuwan_ab:'伏完', dcmoukui:'谋溃', dcmoukui_info:'当你使用【杀】指定第一个目标后,你可以选择任意项:1.摸一张牌;2.弃置其中一个目标角色一张牌。若你均选择,当此【杀】被无效后或被抵消后,该角色弃置你一张牌。', - yuantanyuanxiyuanshang:'袁谭袁尚袁熙', - dcneifa:'内伐', - dcneifa_info:'出牌阶段开始时,你可以摸三张牌,然后弃置一张牌。若你弃置的牌类型为:基本牌,本阶段你不能使用锦囊牌,且【杀】的使用次数上限+X且可以额外指定一名目标;锦囊牌,本阶段你不能使用基本牌,且使用普通锦囊牌选择目标时可以增加或减少一个目标(X为你发动〖内伐〗弃牌后手牌中因〖内伐〗而不能使用的牌的数量且最多为5。你以此法选择的额外目标均无距离限制)。', - dc_tengfanglan:'滕芳兰', - dcluochong:'落宠', - dcluochong_info:'一轮游戏开始时,你可以弃置任意名角色区域里的共计至多[4]张牌,然后若你以此法弃置了一名角色的至少三张牌,则你方括号内的数字-1。', - dcaichen:'哀尘', - dcaichen_info:'锁定技。若牌堆剩余数:大于80,当你因〖落宠〗弃置你区域内的牌后,你摸两张牌;大于40,你跳过弃牌阶段;小于40,你不能响应♠牌。', - dc_sunziliufang:'孙资刘放', - dcqinshen:'勤慎', - dcqinshen_info:'弃牌阶段结束时,你可以摸X张牌(X为本回合未进入过弃牌堆的花色数)。', - dcweidang:'伪谠', - dcweidang_info:'其他角色的结束阶段,你可以将一张字数为X的牌置于牌堆底,然后获得牌堆里一张字数为X的牌(X为本回合未进入过弃牌堆的花色数)。若你能使用此牌,你使用之。', - mengjie:'孟节', - dcyinlu:'引路', - dcyinlu_info:'①游戏开始时,你令三名角色依次分别获得“乐泉”、“藿溪”、“瘴气”标记(若场上角色数为2则改为令一名其他角色获得其中2枚,你获得剩余标记),然后你获得“芸香”标记并获得1点“芸香”值。②准备阶段/有〖引路〗标记的角色死亡时,你可以移动一名角色的1枚/其的所有〖引路〗标记。', - dcyinlu_lequan:'乐泉', - dcyinlu_lequan_info:'结束阶段,你可以弃置一张♦牌并回复1点体力。', - dcyinlu_huoxi:'藿溪', - dcyinlu_huoxi_info:'结束阶段,你可以弃置一张♥牌并摸两张牌。', - dcyinlu_zhangqi:'瘴气', - dcyinlu_zhangqi_info:'锁定技。结束阶段,你须弃置一张♠牌,否则失去1点体力。', - dcyinlu_yunxiang:'芸香', - dcyinlu_yunxiang_info:'①结束阶段,你可以弃置一张♣牌,获得1点“芸香”值。②当你受到伤害时,你可以扣减所有“芸香”值,减少等量的伤害。', - dcyouqi:'幽栖', - dcyouqi_info:'锁定技。当其他角色因〖引路〗标记弃置牌后,你有一定概率获得此牌。', - dcyouqi_faq:'〖幽栖〗概率
    ', - dcyouqi_faq_info:'当满足〖幽栖〗条件时,系统生成一个随机数X∈[0,1)。若X小于(1.25-0.25Y),你获得此牌(Y为你至该角色的距离)。', - dc_sunhanhua:'孙寒华', - dchuiling:'汇灵', - dchuiling_info:'锁定技。当你使用牌时,若此牌颜色为弃牌堆中数量较少的颜色,你获得1枚“灵”标记。若弃牌堆中:红色牌数大于黑色牌数,你回复1点体力;黑色牌数大于红色牌数,你可以弃置一名其他角色的一张牌。', - dcchongxu:'冲虚', - dcchongxu_info:'限定技。出牌阶段,若“灵”数不小于4,你可以失去〖汇灵〗,增加等同于“灵”数的体力上限,然后获得〖踏寂〗和〖清荒〗。', - dctaji:'踏寂', - dctaji_info:'当你失去手牌后,根据你失去牌的原因执行以下效果:1.使用:你弃置其他角色一张牌;2.打出:你摸一张牌;3.弃置:你回复1点体力;4.其他:你下一次对其他角色造成伤害时,此伤害+1。', - dcqinghuang:'清荒', - dcqinghuang_info:'出牌阶段开始时,你可以减1点体力上限,然后你于本回合发动〖踏寂〗时额外随机执行一种效果。', guānning:'关宁', dcxiuwen:'修文', dcxiuwen_info:'当你使用牌时,若你未记录此牌牌名,你可以记录之并摸一张牌。', @@ -31255,114 +10514,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ oldlongsong_info:'出牌阶段开始时,你可以将一张手牌交给一名其他角色。然后其须选择其所有的发动时机为出牌阶段内的空闲时间点且你至多能于此阶段发动一次的技能,其于此阶段这些技能失效,你获得这些技能。', dclongsong:'龙颂', dclongsong_info:'出牌阶段开始时,你可以将一张红色牌交给一名其他角色。然后其须选择其所有的发动时机包含“出牌阶段”的技能,其于此阶段这些技能失效,你获得这些技能且至多可以发动一次。', - dc_huojun:'霍峻', - dcgue:'孤扼', - dcgue_info:'每名其他角色的回合限一次。当你需要使用或打出【杀】或【闪】时,若你有手牌,你可以展示之。若其中【杀】和【闪】的数量之和不超过1,你视为使用或打出此牌。', - dcsigong:'伺攻', - dcsigong_info:'其他角色的回合结束时,若其于本回合内使用牌被响应过,你可以将手牌摸至或弃置至1,视为对其使用一张需使用X张【闪】抵消的【杀】,且此【杀】的伤害基数+1(X为你以此法弃置的牌数且至少为1)。当你以此法造成伤害后,该技能于本轮失效。', - peiyuanshao:'裴元绍', - dcmoyu:'没欲', - dcmoyu_info:'出牌阶段每名角色限一次。你可以获得一名其他角色区域里的一张牌,然后其可以对你使用一张【杀】,且此【杀】伤害基数为X(X为你于本回合发动此技能的次数)。若此【杀】对你造成了伤害,你令此技能于本回合失效。', - zhangchu:'张楚', - dcjizhong:'集众', - dcjizhong_info:'出牌阶段限一次。你可以令一名其他角色摸两张牌,然后其选择一项:1.若其没有“信众”标记,其获得“信众”标记;2.弃置三张手牌。', - dcrihui:'日彗', - dcrihui_info:'每回合限一次。当你使用普通锦囊牌或黑色基本牌结算结束后,若此牌的目标数为1且目标不为你,且其:没有“信众”,则所有有“信众”的角色依次视为对其使用一张与此牌牌名和属性相同的牌;有“信众”,则你可以获得其区域里的一张牌。', - dcguangshi:'光噬', - dcguangshi_info:'锁定技。准备阶段,若所有其他角色均有“信众”,你失去1点体力并摸两张牌。', - dongwan:'董绾', - dcshengdu:'生妒', - dcshengdu_info:'回合开始时,你可以选择一名其他角色。当其于其的下个摸牌阶段获得牌后,你摸等量的牌。', - dcxianjiao:'献绞', - dcxianjiao_info:'出牌阶段限一次。你可以将两张颜色不同的手牌当无距离限制且无任何次数限制的【杀】使用。然后若此【杀】:造成了伤害,所有目标角色失去1点体力;未造成伤害,你对所有目标角色依次发动一次〖生妒〗。', - yuanyin:'袁胤', - dcmoshou:'墨守', - dcmoshou_info:'当你成为其他角色使用的黑色牌的目标后,你可以摸X张牌(X为你本局游戏此前发动过此技能的次数÷3的余数+1)。', - dcyunjiu:'运柩', - dcyunjiu_info:'一名角色死亡后,你可以弃置等同于其因死亡事件的规则而弃置的牌数,将其此次弃置的牌交给一名其他角色。然后你加1点体力上限并回复1点体力。', - xielingyu:'谢灵毓', - dcyuandi:'元嫡', - dcyuandi_info:'当其他角色于其出牌阶段使用第一张牌时,若此牌仅指定其为目标,你可以选择一项:1.弃置其一张手牌;2.你与其各摸一张牌。', - dcxinyou:'心幽', - dcxinyou_info:'出牌阶段限一次。你可以将体力回复至上限并将手牌补至体力上限。若你以此法:获得了至少两张牌,你于结束阶段失去1点体力;回复了体力,你于结束阶段弃置两张牌。', - gaoxiang:'高翔', - dcchiying:'驰应', - dcchiying_info:'出牌阶段限一次。你可以选择一名体力不大于你的角色,令其攻击范围内的其他角色依次弃置一张牌。然后若你选择的角色不为你,其获得以此法弃置的牌中所有的基本牌。', - zerong:'笮融', - dccansi:'残肆', - dccansi_info:'锁定技。准备阶段,你回复1点体力并选择一名其他角色,其回复1点体力,然后你视为对其依次使用以下能使用的牌:【杀】(无距离限制)、【决斗】、【火攻】。当其以此法受到1点伤害后,你摸两张牌。', - dcfozong:'佛宗', - dcfozong_info:'锁定技。出牌阶段开始时,若你的手牌数大于7,你将X张手牌置于武将牌上(X为你的手牌数-7)。然后若你的武将牌上有至少七张牌,其他角色依次选择一项:1.获得其中的一张牌并令你回复1点体力;2.令你失去1点体力。', - zhoushan:'周善', - dcmiyun:'密运', - dcmiyun_tag:'安', - dcmiyun_info:'锁定技。①一轮游戏开始时,你依次执行:1.若你有“安”,你将包括“安”的在内的任意张手牌交给一名其他角色,然后你将手牌补至体力上限;2.你正面向上获得一名其他角色的一张牌,称为“安”。②当你不因〖密运①〗失去“安”后,你失去1点体力。', - dcdanying:'胆迎', - dcdanying_info:'每回合限一次。你可以展示“安”,然后视为使用或打出一张【杀】或【闪】。然后当你于本回合下一次成为牌的目标后,使用者弃置你的一张牌。', - dc_ruiji:'芮姬', - dcwangyuan:'妄缘', - dcwangyuan_info:'当你于回合外失去牌后,或于回合内发动〖俐影〗后,你可以随机将牌堆里的一张与你所有“妄”牌名均不同的基本牌或锦囊牌置于武将牌上,称为“妄”(不超过游戏人数)。', - dclingyin:'铃音', - // dclingyin_info:'出牌阶段开始时,你可以获得至多X张“妄”(X为游戏轮数)然后若你的“妄”颜色均相同,你于本回合对其他角色造成的伤害+1,且可以将一张武器牌或防具牌当【决斗】使用。', - dclingyin_info:'出牌阶段开始时,你可以选择至多X张“妄”(X为游戏轮数),若这些牌以外的“妄”中不存在颜色不同的牌,则你于本回合对其他角色造成的伤害+1,且可以将一张武器牌或防具牌当【决斗】使用。你获得这些牌。', - dcliying:'俐影', - dcliying_info:'每回合限一次。当你于摸牌阶段外获得牌后,你可以将这些牌中的任意张交给一名其他角色,然后摸一张牌。', - zhangkai:'张闿', - dcxiangshu:'相鼠', - dcxiangshu_info:'其他角色的出牌阶段开始时,若其手牌数不小于其体力值,你可以选择一个不大于5的非负整数,然后你弃置一张牌或声明此数字。若如此做,此阶段结束时,若其手牌数与你选择的数字:差值不大于1,你获得其一张牌;相等,你对其造成1点伤害。', - huanfan:'桓范', - dcjianzheng:'谏诤', - dcjianzheng_info:'出牌阶段限一次。你可以观看一名其他角色的手牌,然后若其中有你可以使用的手牌,你获得并使用其中一张。若你未以此法使用牌,你令你与其横置,然后其观看你的手牌。', - dcfumou:'腹谋', - dcfumou_info:'当你受到1点伤害后,你可以令至多X名角色依次选择一项:1.移动场上的一张牌;2.弃置所有手牌并摸两张牌;3.弃置装备区里的所有牌并回复1点体力(X为你已损失的体力值)。', - mengyou:'孟优', - dcmanzhi:'蛮智', - dcmanzhi_info:'①准备阶段,你可以选择一名其他角色并选择一项:1.令其交给你两张牌,然后其视为使用一张无距离限制的【杀】;2.获得其区域内至多两张牌,然后交给其等量的牌并摸一张牌。②结束阶段,若你的体力值与本回合准备阶段时的体力值相等,你可以执行你未于本回合执行过的〖蛮智①〗的分支。', - chentai:'陈泰', - dcctjiuxian:'救陷', - dcctjiuxian_info:'出牌阶段限一次。你可以重铸一半数量的手牌(向上取整),然后视为使用一张【决斗】。当此牌对目标角色造成伤害后,你可以令其攻击范围内的一名其他角色回复1点体力。', - dcchenyong:'沉勇', - dcchenyong_info:'结束阶段,你可以摸X张牌(X为本回合你使用过的牌的类型数)。', - dc_sunchen:'孙綝', - dczigu:'自固', - dczigu_info:'出牌阶段限一次。你可以弃置一张牌,然后获得场上的一张装备牌。若你没有因此获得其他角色的牌,你摸一张牌。', - dczuowei:'作威', - dczuowei_info:'当你于回合内使用牌时,你可以根据你的手牌数执行对应效果:大于X,令此牌不可被响应;等于X,对一名其他角色造成1点伤害;小于X,摸两张牌并令此技能于本回合失效(X为你装备区里牌的数量且至少为1)。', - sunyu:'孙瑜', - dcquanshou:'劝守', - dcquanshou_info:'一名角色的回合开始时,若其手牌数小于其体力上限,你可以令其选择一项:1.将手牌摸至体力上限,然后本回合使用【杀】的次数上限-1(至多摸五张);2.其本回合使用牌被抵消后,你摸一张牌。', - dcshexue:'设学', - dcshexue_info:'①出牌阶段开始时,你可以将一张牌当做于上回合的角色于其出牌阶段内使用的最后一张基本牌或普通锦囊牌使用。②出牌阶段结束时,你可以令下回合的角色于其出牌阶段开始时可以将一张牌当做你于此阶段内使用的最后一张基本牌或普通锦囊牌使用。', - xizheng:'郤正', - dcdanyi:'耽意', - dcdanyi_info:'当你使用牌指定第一个目标后,若此牌的目标与你使用的上一张牌目标相同,你可以摸X张牌(X为此牌目标数)。', - dcwencan:'文灿', - dcwencan_info:'出牌阶段限一次。你可以选择至多两名体力值不同且均与你的体力值不同的角色,这些角色依次选择一项:1.弃置两张花色不同的牌;2.本回合你对其使用牌无次数限制。', - liuchongluojun:'刘宠骆俊', - dcminze:'悯泽', - dcminze_info:'①出牌阶段每名角色限一次。你可以将至多两张牌名不同的牌交给一名手牌数小于你的角色,若其因此手牌数大于你,〖悯泽①〗于此阶段失效。②结束阶段,你将手牌摸至X张(X为你本回合因〖悯泽①〗失去过的牌的牌名数且至多为5)', - dcjini:'击逆', - dcjini_info:'当你受到伤害后,你可以重铸至多Y张手牌(Y为你的体力上限减本回合你以此法重铸过的牌数)。若你以此法获得了【杀】,你可以对伤害来源使用一张无视距离且不可被响应的【杀】。', - yuechen:'乐綝', - dcporui:'破锐', - dcporui_info:'每轮限一次。其他角色的结束阶段,你可以弃置一张基本牌并选择另一名于此回合内失去过牌的其他角色,你视为对其依次使用X+1张【杀】,然后你交给其X张手牌(X为你的体力值)。', - dcgonghu:'共护', - dcgonghu_info:'锁定技。①当你于回合外失去基本牌后,你于〖破锐〗后增加“若其没有因此受到伤害,你回复1点体力”。②当你于回合外造成或受到伤害后,你删除〖破锐〗中的“,然后你交给其X张手牌”。③当你使用红色基本牌/红色普通锦囊牌时,若你已发动过〖共护①〗和〖共护②〗,则此牌不可被响应/可额外增加一个目标。', dc_zhangmancheng:'张曼成', dclvecheng:'掠城', dclvecheng_info:'出牌阶段限一次。你可以选择一名其他角色,你于本回合对其使用【杀】无次数限制。然后回合结束时,其展示所有手牌,若其中有【杀】,其可以选择对你依次使用其中所有的【杀】。', dczhongji:'螽集', dczhongji_info:'当你使用牌时,若此牌无花色或你手牌区里没有与此牌花色相同的手牌,你可以将手牌摸至体力上限并弃置X张牌(X为本回合发动〖螽集〗的次数)。', - zhangjinyun:'张瑾云', - dchuizhi:'蕙质', - dchuizhi_info:'摸牌阶段结束时,你可以选择是否弃置任意张手牌,然后将手牌摸至与全场手牌数最多的角色相同(至少摸一张,至多摸五张)。', - dcjijiao:'继椒', - dcjijiao_info:'限定技。出牌阶段,你可以令一名角色获得所有弃牌堆中你于本局游戏内使用或弃置过的普通锦囊牌,且这些牌不能被【无懈可击】响应。一名角色的回合结束后,若本回合牌堆洗过牌或有角色死亡,你重置〖继椒〗。', - duanqiaoxiao:'段巧笑', - dccaizhuang:'彩妆', - dccaizhuang_info:'出牌阶段限一次。你可以弃置任意张花色各不相同的牌。然后若你手牌中的花色数小于你以此法弃置的牌数,你摸一张牌并重复此流程。', - dchuayi:'华衣', - dchuayi_info:'结束阶段,你可以判定,然后你获得如下效果直到你下回合开始时:红色,其他角色回合结束时,你摸一张牌;黑色,当你受到伤害后,你摸两张牌。', dc_mengda:'孟达', dclibang:'利傍', dclibang_info:'出牌阶段限一次。你可以弃置一张牌,正面向上获得两名其他角色的各一张牌。然后你判定,若结果与这两张牌的颜色均不同,你交给其中一名角色两张牌或失去1点体力,否则你获得判定牌并视为对其中一名角色使用一张【杀】。', @@ -31373,51 +10529,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dcdanji_info:'觉醒技。准备阶段,若你的手牌数大于体力值,你减1点体力上限,将体力回复至体力上限,然后获得〖马术〗和〖怒嗔〗。', dcnuchen:'怒嗔', dcnuchen_info:'出牌阶段限一次。你可以展示一名其他角色的一张手牌,然后选择一项:1.弃置任意张该花色的牌,对其造成等量伤害;2.获得该角色手牌中所有此花色的牌。', - wu_zhugeliang:'武诸葛亮', - dcjincui:'尽瘁', - dcjincui_info:'锁定技。①游戏开始时,你将手牌摸至七张。②准备阶段,你将体力值回复或失去至等同于牌堆中点数为7的牌数(你的体力值最低因此调整至1)。然后你观看牌堆顶X张牌,将这些牌以任意顺序置于牌堆顶或牌堆底(X为你的体力值)。', - dcqingshi:'情势', - dcqingshi_info:'当你于出牌阶段使用牌时,若你手牌中有同名牌且你本回合未因此牌名的牌发动过该技能,你可以选择一项:1.令此牌对其中一个目标角色造成的伤害+1;2.令任意名其他角色各摸一张牌;3.摸三张牌,然后〖情势〗于本回合无效。', - dczhizhe:'智哲', - dczhizhe_clear:'invisible', - dczhizhe_info:'限定技。出牌阶段,你可以选择一张手牌并复制之。当你使用或打出此复制牌结算结束后,你获得之,然后你本回合不能再使用或打出此牌。', - ruanji:'阮籍', - dczhaowen:'昭文', - dczhaowen_tag:'昭文', - dczhaowen_info:'出牌阶段开始时,你可以展示所有手牌。然后你于本回合获得如下效果:1.你可以将其中一张黑色牌当做任意一张普通锦囊牌使用(每回合每种牌名限一次);2.当你使用其中的一张红色牌时,你摸一张牌。', - dcjiudun:'酒遁', - dcjiudun_info:'①以你为目标的【酒】(使用方法①)的作用效果改为“目标对应的角色使用的下一张【杀】的伤害基数+1”。②当你成为其他角色使用黑色牌的目标后,若你:未处于【酒】状态,你可以摸一张牌并视为使用一张【酒】;处于【酒】状态,你可以弃置一张手牌令此牌对你无效。', - yue_caiwenji:'乐蔡文姬', - dcshuangjia:'霜笳', - dcshuangjia_tag:'胡笳', - dcshuangjia_info:'锁定技。①游戏开始,你将你的手牌标记为“胡笳”。②你的“胡笳”牌不计入手牌上限。③其他角色至你的距离+X(X为你的“胡笳”数且至多为5)。', - dcbeifen:'悲愤', - dcbeifen_info:'锁定技。①当你失去牌后,若这些牌中有“胡笳”牌,你获得与你手牌中“胡笳”牌花色均不同的每种花色的牌各一张。②若你手牌中“胡笳”牌数小于不为“胡笳”牌的牌数,你使用牌无距离和次数限制。', - ganfurenmifuren:'甘夫人糜夫人', - dcchanjuan:'婵娟', - dcchanjuan_info:'每种牌名限一次。当你使用仅指定单一目标的【杀】或普通锦囊牌结算结束后,你可以视为使用一张名称和属性均相同的牌。若这两张牌指定的目标完全相同,你摸一张牌。', - dcxunbie:'殉别', - dcxunbie_info:'限定技。当你进入濒死状态时,你可以将此武将牌替换为“甘夫人”或“糜夫人”(不能选择已在场上的武将)。然后回复至1点体力并防止所有伤害直到当前回合结束。', - dc_mifuren:'糜夫人', - dcguixiu:'闺秀', - dcguixiu_info:'锁定技。①回合开始时,若你于本局游戏未发动过〖闺秀①〗,你摸两张牌。②当你发动〖存嗣〗后,你回复1点体力。', - dccunsi:'存嗣', - dccunsi_info:'限定技。出牌阶段,你可以令一名角色获得〖勇决〗。若该角色不为你,你摸两张牌。', - dcyongjue:'勇决', - dcyongjue_info:'当你于出牌阶段使用第一张【杀】时,你可以选择一项:1.令此【杀】不计入次数;2.获得此牌。', - dc_ganfuren:'甘夫人', - dcshushen:'淑慎', - dcshushen_info:'当你回复1点体力后,你可以选择一名其他角色并选择一项:1.令其回复1点体力;2.你与其各摸一张牌。', - dcshenzhi:'神智', - dcshenzhi_info:'准备阶段,若你的手牌数大于体力值,你可以弃置一张手牌,然后回复1点体力。', - dc_wuban:'吴班', - dcyouzhan:'诱战', - dcyouzhan_info:'锁定技。当其他角色于你的回合内失去牌后,你摸一张牌,且其获得如下效果:1.其于此回合下一次受到的伤害+1;2.结束阶段,若其于此回合未受到过伤害,其摸X张牌(X为其此回合失去过牌的次数)。', - dc_duyu:'杜预', - dcjianguo:'谏国', - dcjianguo_info:'出牌阶段限一次。你可以选择一名角色并选择一项:1.令其摸一张牌,然后其弃置一半的手牌;2.令其弃置一张牌,然后其摸等同于手牌数一半的牌(均向下取整)。', - dcdyqingshi:'倾势', - dcdyqingshi_info:'当你于回合内使用【杀】或普通锦囊牌指定第一个目标后,若目标角色包括其他角色且此牌为你本回合使用的第X张牌,你可以对其中一名不为你的目标角色造成1点伤害(X为你的手牌数)。', + dc_wangjun:'王濬', + dcmianyao:'免徭', + dcmianyao_info:'摸牌阶段结束时,你可以展示手牌中点数最小的一张牌并将此牌随机插入牌堆中。然后你于此回合结束时摸等同于此牌点数的牌。', + dcchangqu:'长驱', + dcchangqu_info:'出牌阶段限一次。你可以开一艘战舰(你从你的上家或下家开始选择任意名座位连续的其他角色,且起点角色获得“战舰”标记)。这些角色按照你选择的顺序依次执行:{若其有本次获得的“战舰”,其选择一项:1.交给你X张手牌,然后将“战舰”移动给你选择的下一名目标角色;2.令其下次受到的属性伤害值+X,然后横置(X为本次〖长驱〗中选项一被选择过的次数且至少为1)。}。', sp_whlw:"文和乱武", sp_zlzy:"逐鹿中原", @@ -31425,42 +10541,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_zizouqi:"自走棋", sp_sbfm:'上兵伐谋', sp_shengun:'三国奇人传', - sp_baigei:'荟萃·无双上将', sp_guandu:'官渡之战', sp_huangjin:'列传·黄巾之乱', sp_fadong:'列传·诸侯伐董', sp_xuzhou:'列传·徐州风云', - sp_caizijiaren:'荟萃·才子佳人', sp_qihuan:'戚宦之争', sp_zhongyuan:'列传·中原狼烟', sp_binglin:'兵临城下', sp_xiaohu:'列传·虓虎悲歌', - sp2_yinyu:'限定·隐山之玉', - sp_zhilan:'荟萃·芝兰玉树', - sp_zongheng:'荟萃·纵横捭阖', sp_fenghuo:'烽火连天', - sp_guixin:'荟萃·天下归心', sp_danqi:'千里单骑', - sp2_huben:'限定·百战虎贲', - sp2_shengun:'限定·奇人异士', - sp2_huangjia:'限定·皇家贵胄', - sp2_zhangtai:'限定·章台春望', - sp2_jinse:'限定·锦瑟良缘', - sp_jianghu:'荟萃·江湖之远', - sp2_bizhe:'限定·笔舌如椽', - sp_daihan:'荟萃·代汉涂高', - sp2_doukou:'限定·豆蔻梢头', - sp2_jichu:'限定·计将安出', - sp_taiping:'荟萃·太平甲子', - sp_yanhan:'荟萃·匡鼎炎汉', - sp_jishi:'荟萃·悬壶济世', - sp_raoting:'荟萃·绕庭之鸦', - sp_yijun:'荟萃·异军突起', - sp2_yuxiu:'限定·钟灵毓秀', - sp2_xiyouji:'神话传说', - sp2_wumiao:'限定·武庙', - sp2_gaoshan:'限定·高山仰止', - sp_zhengyin:'荟萃·正音雅乐', sp_decade:'其他新服武将', }, }; diff --git a/character/xianding.js b/character/xianding.js new file mode 100644 index 000000000..e854f8e1d --- /dev/null +++ b/character/xianding.js @@ -0,0 +1,11013 @@ +'use strict'; +game.import('character',function(lib,game,ui,get,ai,_status){ + return { + name:'xianding', + connect:true, + character:{ + dc_duyu:['male','wei',3,['dcjianguo','dcdyqingshi'],['unseen']], + ganfurenmifuren:['female','shu',3,['dcchanjuan','dcxunbie']], + dc_ganfuren:['female','shu',3,['dcshushen','dcshenzhi']], + dc_mifuren:['female','shu',3,['dcguixiu','dccunsi']], + wanglang:['male','wei',3,['regushe','rejici']], + ruanji:['male','wei',3,['dczhaowen','dcjiudun']], + wu_zhugeliang:['male','shu','4/7',['dcjincui','dcqingshi','dczhizhe']], + duanqiaoxiao:['female','wei',3,['dccaizhuang','dchuayi']], + zhangjinyun:['female','shu',3,['dchuizhi','dcjijiao']], + huanfan:['male','wei',3,['dcjianzheng','dcfumou']], + chentai:['male','wei',4,['dcctjiuxian','dcchenyong']], + sunyu:['male','wu',3,['dcquanshou','dcshexue'],['unseen']], + xizheng:['male','shu',3,['dcdanyi','dcwencan'],['unseen']], + dc_ruiji:['female','wu',4,['dcwangyuan','dclingyin','dcliying']], + zerong:['male','qun',4,['dccansi','dcfozong']], + xielingyu:['female','wu',3,['dcyuandi','dcxinyou']], + dc_yangbiao:['male','qun',3,['dczhaohan','dcjinjie','dcjue']], + dc_tengfanglan:['female','wu',3,['dcluochong','dcaichen']], + yanghong:['male','qun',3,['dcjianji','dcyuanmo']], + xuelingyun:['female','wei',3,['dcxialei','dcanzhi']], + dc_wangyun:['male','qun',4,['dclianji','dcmoucheng'],['clan:太原王氏']], + dc_zhouxuān:['male','wei',3,['dcwumei','dczhanmeng']], + chengbing:['male','wu',3,['dcjingzao','dcenyu']], + dongguiren:['female','qun',3,['dclianzhi','dclingfang','dcfengying']], + yuanji:['female','wu',3,['dcfangdu','dcjiexing']], + zhujianping:['male','qun',3,['dcxiangmian','dctianji']], + zhaozhi:['male','shu',3,['dctongguan','dcmengjie']], + dc_liuye:['male','wei',3,['dcpoyuan','dchuace']], + luyi:['female','qun',3,['dcyaoyi','dcfuxue']], + dingshangwan:['female','wei',3,['dcfengyan','dcfudao']], + quanhuijie:['female','wu',3,['dchuishu','dcyishu','dcligong']], + dukui:['male','wei',3,['dcfanyin','dcpeiqi']], + zhangfen:['male','wu',4,['dcwanglu','dcxianzhu','dcchaixie']], + liuhui:['male','qun',4,['dcgeyuan','dcjieshu','dcgusuan']], + dc_wangchang:['male','wei',3,['dckaiji','dcpingxi'],['clan:太原王氏']], + zhaoang:['male','wei','3/4',['dczhongjie','dcsushou']], + caohua:['female','wei',3,['caiyi','guili']], + dc_liuyu:['male','qun',3,['dcsuifu','dcpijing']], + dc_huangzu:['male','qun',4,['dcjinggong','dcxiaojuan']], + laiyinger:['female','qun',3,['xiaowu','huaping']], + caomao:['male','wei','3/4',['qianlong','fensi','juetao','zhushi'],['zhu']], + dc_luotong:['male','wu',3,['renzheng','jinjian']], + re_fengfangnv:['female','qun',3,['tiqi','baoshu']], + wufan:['male','wu',4,['tianyun','wfyuyan']], + re_zhangbao:['male','qun',3,['xinzhoufu','xinyingbing']], + re_sunyi:['male','wu',5,['syjiqiao','syxiongyi']], + caojinyu:['female','wei',3,['yuqi','shanshen','xianjing']], + zhouyi:['female','wu',3,['zhukou','mengqing']], + re_panshu:['female','wu',3,['zhiren','yaner']], + yangwan:['female','shu',3,['youyan','zhuihuan']], + ruanyu:['male','wei',3,['xingzuo','miaoxian']], + fanyufeng:['female','qun',3,['bazhan','jiaoying']], + guozhao:['female','wei',3,['pianchong','zunwei']], + re_xinxianying:['female','wei',3,['rezhongjian','recaishi']], + liubian:['male','qun',3,['shiyuan','dushi','yuwei'],['zhu']], + re_liuzan:['male','wu',4,['refenyin','liji']], + wenyang:['male','wei',5,['xinlvli','choujue']], + wangshuang:['male','wei',8,['spzhuilie']], + huaman:['female','shu',3,['hmmanyi','mansi','souying','zhanyuan']], + puyuan:['male','shu',4,['pytianjiang','pyzhuren']], + guanlu:['male','wei',3,['tuiyan','busuan','mingjie']], + gexuan:['male','wu',3,['gxlianhua','zhafu']], + leitong:['male','shu',4,['kuiji']], + wulan:['male','shu',4,['wlcuorui']], + }, + characterSort:{ + xianding:{ + sp2_huben:['wangshuang','wenyang','re_liuzan','dc_huangzu','wulan','leitong','chentai','dc_duyu'], + sp2_shengun:["puyuan","guanlu","gexuan",'wufan','re_zhangbao','dukui','zhaozhi','zhujianping','dc_zhouxuān','zerong'], + sp2_bizhe:['dc_luotong','dc_wangchang','chengbing','dc_yangbiao','ruanji'], + sp2_huangjia:['caomao','liubian','dc_liuyu','quanhuijie','dingshangwan','yuanji','xielingyu','sunyu','ganfurenmifuren','dc_ganfuren','dc_mifuren'], + sp2_zhangtai:['guozhao','fanyufeng','ruanyu','yangwan','re_panshu'], + sp2_jinse:['caojinyu','re_sunyi','re_fengfangnv','caohua','laiyinger','zhangfen'], + sp2_yinyu:['zhouyi','luyi'], + sp2_doukou:['re_xinxianying','huaman','xuelingyun','dc_ruiji','duanqiaoxiao'], + sp2_jichu:['zhaoang','dc_liuye','dc_wangyun','yanghong','huanfan','xizheng'], + sp2_yuxiu:['dongguiren','dc_tengfanglan','zhangjinyun'], + sp2_gaoshan:['wanglang','liuhui'], + sp2_wumiao:['wu_zhugeliang'], + } + }, + skill:{ + //杜预 + dcjianguo:{ + audio:2, + enable:'phaseUse', + usable:1, + chooseButton:{ + dialog:function(event,player){ + var dialog=ui.create.dialog('谏国:请选择一项','hidden'); + dialog.add([[ + ['discard','令一名角色摸一张牌,然后弃置一半手牌'], + ['draw','令一名角色弃置一张牌,然后摸等同于手牌数一半的牌'] + ],'textbutton']); + return dialog; + }, + check:function(button){ + var player=_status.event.player; + if(button.link=='discard'){ + var discard=Math.max.apply(Math,game.filterPlayer(current=>{ + return lib.skill.dcjianguo_discard.filterTarget(null,player,current); + }).map(current=>{ + return get.effect(current,'dcjianguo_discard',player,player); + })); + return discard; + } + if(button.link=='draw'){ + var draw=Math.max.apply(Math,game.filterPlayer(current=>{ + return lib.skill.dcjianguo_draw.filterTarget(null,player,current); + }).map(current=>{ + return get.effect(current,'dcjianguo_draw',player,player); + })); + return draw; + } + return 0; + }, + backup:function(links){ + return get.copy(lib.skill['dcjianguo_'+links[0]]); + }, + prompt:function(links){ + if(links[0]=='discard') return '令一名角色摸一张牌,然后弃置一半手牌'; + return '令一名角色弃置一张牌,然后摸等同于手牌数一半的牌'; + }, + }, + ai:{ + order:10, + threaten:2.8, + result:{ + //想让杜预两个技能自我联动写起来太累了,开摆 + player:1, + }, + }, + subSkill:{ + backup:{audio:'dcjianguo'}, + discard:{ + audio:'dcjianguo', + filterTarget:()=>true, + filterCard:()=>false, + selectCard:-1, + charlotte:true, + content:function(){ + 'step 0' + target.draw(); + game.delayex(); + 'step 1' + var num=Math.floor(target.countCards('h')/2); + if(num>0) target.chooseToDiscard(num,true,'谏国:请弃置'+get.cnNumber(num)+'张手牌'); + }, + ai:{ + result:{ + target:function(player,target){ + return 1.1-Math.ceil(target.countCards('h')/2); + }, + }, + tag:{ + gain:1, + loseCard:2, + }, + }, + }, + draw:{ + audio:'dcjianguo', + filterTarget:function(card,player,target){ + return target.countCards('he'); + }, + filterCard:()=>false, + selectCard:-1, + charlotte:true, + content:function(){ + 'step 0' + target.chooseToDiscard('he',true,'谏国:请弃置一张牌'); + 'step 1' + var num=Math.floor(target.countCards('h')/2); + if(num>0) target.draw(num); + }, + ai:{ + result:{ + target:function(player,target){ + var fix=0; + var num=target.countCards('h'); + if(player==target&&num%2==1&&num>=5) fix+=1; + return Math.floor(num/2-0.5)+fix; + }, + }, + tag:{ + loseCard:1, + gain:2, + }, + }, + }, + }, + }, + dcdyqingshi:{ + audio:2, + trigger:{ + player:'useCardToPlayered', + }, + filter:function(event,player){ + if(player!=_status.currentPhase) return false; + if(!event.isFirstTarget) return false; + if(event.card.name!='sha'&&get.type(event.card,false)!='trick') return false; + if(player.countCards('h')!=player.getHistory('useCard').indexOf(event.getParent())+1) return false; + return event.targets.some(target=>{ + return target!=player&&target.isIn(); + }); + }, + direct:true, + content:function(){ + 'step 0' + var targets=trigger.targets.filter(target=>{ + return target!=player&&target.isIn(); + }); + player.chooseTarget(get.prompt('dcdyqingshi'),'对一名不为你的目标角色造成1点伤害',(card,player,target)=>{ + return _status.event.targets.contains(target); + }).set('ai',target=>{ + var player=_status.event.player; + return get.damageEffect(target,player,player); + }).set('targets',targets); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcdyqingshi',target); + target.damage(); + } + }, + mod:{ + aiOrder:function(player,card,num){ + if(_status.currentPhase!=player) return; + var cardsh=[]; + if(Array.isArray(card.cards)){ + cardsh.addArray(card.cards.filter(card=>{ + return get.position(card)=='h'; + })); + } + var del=player.countCards('h')-cardsh.length-player.getHistory('useCard').length-1; + if(del<0) return; + if(del>0){ + if(card.name=='sha'||get.type(card,false)!='trick') return num/3; + return num+1; + } + return num+15; + }, + }, + }, + //甘糜 + dcchanjuan:{ + audio:2, + trigger:{ + player:'useCardAfter', + }, + filter:function(event,player){ + if(event.targets.length!=1) return false; + if(!['basic','trick'].contains(get.type(event.card,false))) return false; + if(event.getParent(2).name=='dcchanjuan') return false; + return !player.getStorage('dcchanjuan').contains(event.card.name); + }, + direct:true, + content:function(){ + 'step 0' + var card={ + name:trigger.card.name, + nature:trigger.card.nature, + isCard:true, + } + player.chooseUseTarget(card,get.prompt('dcchanjuan'),false,false).set('prompt2','视为再使用一张'+get.translation(card)).set('logSkill','dcchanjuan'); + 'step 1' + if(result.bool){ + player.markAuto('dcchanjuan',[trigger.card.name]); + var list1=trigger.targets,list2=result.targets; + if(list1.slice().removeArray(list2).length==0&&list2.slice().removeArray(list1).length==0) player.draw(); + } + }, + ai:{ + threaten:2, + }, + intro:{ + content:'已记录牌名:$', + } + }, + dcxunbie:{ + audio:2, + trigger:{ + player:'dying', + }, + filter:function(event,player){ + if(player.hp>0) return false; + var characters=['dc_ganfuren','dc_mifuren']; + game.countPlayer(current=>{ + if(current.name1=='dc_ganfuren'||current.name2=='dc_ganfuren'){ + characters.remove('dc_ganfuren'); + } + if(current.name1=='dc_mifuren'||current.name2=='dc_mifuren'){ + characters.remove('dc_mifuren'); + } + }); + return characters.length; + }, + check:()=>true, + skillAnimation:true, + animationColor:'fire', + limited:true, + derivation:['dcyongjue','dcshushen','dcshenzhi','dcguixiu','dccunsi'], + content:function(){ + 'step 0' + player.awakenSkill('dcxunbie'); + if(player.name1=='ganfurenmifuren'||player.name2=='ganfurenmifuren'){ + var characters=['dc_ganfuren','dc_mifuren']; + game.countPlayer(current=>{ + if(current.name1=='dc_ganfuren'||current.name2=='dc_ganfuren'){ + characters.remove('dc_ganfuren'); + } + if(current.name1=='dc_mifuren'||current.name2=='dc_mifuren'){ + characters.remove('dc_mifuren'); + } + }); + if(characters.length==1) event._result={control:characters[0]}; + else{ + player.chooseControl(characters).set('dialog',[ + '选择要替换成的武将', + [characters,'character'] + ]).set('ai',()=>[0,1].randomGet()); + } + } + else event.goto(2); + 'step 1' + var character=result.control; + if(!_status.characterlist){ + lib.skill.pingjian.initList(); + } + _status.characterlist.remove(character); + _status.characterlist.add('ganfurenmifuren'); + player.reinit('ganfurenmifuren',character,false); + 'step 2' + player.recover(1-player.hp); + player.addTempSkill('dcxunbie_muteki'); + }, + subSkill:{ + muteki:{ + trigger:{ + player:'damageBegin4', + }, + charlotte:true, + forced:true, + content:function(){ + trigger.cancel(); + }, + mark:true, + intro:{content:'防止本回合受到的所有伤害'}, + ai:{ + nofire:true, + nothunder:true, + nodamage:true, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'damage')) return 'zeroplayertarget'; + } + }, + } + } + } + }, + //散装版糜夫人 + dcguixiu:{ + audio:'guixiu', + trigger:{ + player:'phaseBegin', + }, + forced:true, + onremove:true, + filter:function(event,player){ + return !player.hasMark('dcguixiu'); + }, + group:'dcguixiu_rec', + content:function(){ + player.addMark('dcguixiu',1,false); + player.draw(2); + }, + subSkill:{ + rec:{ + audio:'guixiu', + trigger:{ + player:'logSkill', + }, + forced:true, + filter:function(event,player){ + return event.skill=='dccunsi'&&player.isDamaged(); + }, + content:function(){ + player.recover(); + } + } + } + }, + dccunsi:{ + audio:'cunsi', + enable:'phaseUse', + limited:true, + skillAnimation:true, + animationColor:'orange', + filterTarget:true, + derivation:'dcyongjue', + content:function(){ + 'step 0' + player.awakenSkill('dccunsi'); + target.addSkillLog('dcyongjue'); + if(target!=player) player.draw(2); + }, + ai:{ + order:10, + result:{ + target:1, + } + } + }, + dcyongjue:{ + audio:'yongjue', + trigger:{ + player:'useCard', + }, + filter:function(event,player){ + var evtx=event.getParent('phaseUse'); + if(!evtx||evtx.player!=player) return false; + return player.getHistory('useCard',evt=>{ + return evt.card.name=='sha'&&event.getParent('phaseUse')==evtx; + }).indexOf(event)==0; + }, + direct:true, + content:function(){ + 'step 0' + var choices=['选项一']; + var choiceList=['令'+get.translation(trigger.card)+'不计入次数','获得此牌']; + if(trigger.cards.length){ + choices.push('选项二'); + choiceList[1]='获得'+get.translation(trigger.cards); + } + else choiceList[1]=''+choiceList[1]+''; + choices.push('cancel2'); + player.chooseControl(choices).set('choiceList',choiceList).set('ai',()=>{ + return _status.event.choice; + }).set('choice',function(){ + if(choices.length==3&&trigger.addCount===false) return 1; + if(player.getCardUsable({name:'sha'}){ + var player=_status.event.player; + return get.recoverEffect(target,player,player)/2+get.attitude(player,target); + }); + 'step 2' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('dcshushen',target); + event.num--; + var choices=['选项二']; + var choiceList=[ + '令'+get.translation(target)+'回复1点体力', + '你于'+get.translation(target)+'各摸一张牌' + ]; + if(target.isDamaged()) choices.unshift('选项一'); + else choiceList[0]=''+choiceList[0]+''; + player.chooseControl(choices).set('choiceList',choiceList).set('prompt','淑慎:请选择一项').set('ai',()=>{ + return _status.event.choice; + }).set('choice',function(){ + if(target.hp<=2||get.recoverEffect(target,player,player)>20) return 0; + return '选项二'; + }()); + } + else event.finish(); + 'step 3' + if(result.control=='选项一'){ + target.recover(); + } + else{ + var drawers=[player,target].sortBySeat(_status.currentPhase); + game.asyncDraw(drawers); + } + 'step 4' + if(event.num>0) event.goto(1); + } + }, + dcshenzhi:{ + audio:'shenzhi', + trigger:{ + player:'phaseZhunbeiBegin', + }, + filter:function(event,player){ + return player.countCards('h')>player.hp; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseToDiscard(get.prompt('dcshenzhi'),'弃置一张手牌,然后回复1点体力').set('logSkill','dcshenzhi').set('ai',card=>{ + var player=_status.event.player; + if(!player.isDamaged()) return 0; + return Math.min(3,10-2*player.hp)-get.value(card); + }); + 'step 1' + if(result.bool){ + player.recover(); + } + } + }, + //阮籍 + dczhaowen:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return player.countCards('h'); + }, + check:function(event,player){ + return player.hasCard(card=>{ + return get.color(card)=='black'||get.color(card)=='red'&&player.hasValueTarget(card); + }); + }, + content:function(){ + 'step 0' + player.showHandcards(); + 'step 1' + player.addTempSkill('dczhaowen_effect'); + game.broadcastAll(function(cards){ + cards.forEach(card=>card.addGaintag('dczhaowen_tag')); + },player.getCards('h')); + }, + ai:{ + threaten:3 + }, + subSkill:{ + effect:{ + audio:'dczhaowen', + enable:'chooseToUse', + charlotte:true, + onremove:function(player){ + player.removeGaintag('dczhaowen_tag'); + }, + hiddenCard:function(player,name){ + return get.type(name)=='trick'&&!player.getStorage('dczhaowen_viewed').contains(name)&&player.countCards('h',card=>{ + return get.color(card)=='black'&&card.hasGaintag('dczhaowen_tag'); + })>0; + }, + filter:function(event,player){ + if(!player.hasCard(card=>{ + return get.color(card)=='black'&&card.hasGaintag('dczhaowen_tag'); + })) return false; + var storage=player.getStorage('dczhaowen_viewed'); + for(var i of lib.inpile){ + if(!storage.contains(i)&&get.type(i)=='trick'&&event.filterCard({name:i},player,event)) return true; + } + return false; + }, + chooseButton:{ + dialog:function(event,player){ + var cards=player.getCards('h',card=>{ + return get.color(card)=='black'&&card.hasGaintag('dczhaowen_tag'); + }); + var storage=player.getStorage('dczhaowen_viewed'); + var list=[]; + for(var i of lib.inpile){ + if(!storage.contains(i)&&get.type(i)=='trick'&&event.filterCard({name:i},player,event)){ + list.push(['锦囊','',i]); + } + } + return ui.create.dialog('昭文',[list,'vcard'],'hidden'); + }, + check:function(button){ + var player=_status.event.player; + return player.getUseValue({name:button.link[2]})+1; + }, + backup:function(links,player){ + return { + audio:'dczhaowen', + popname:true, + filterCard:function(card,player){ + return get.color(card)=='black'&&card.hasGaintag('dczhaowen_tag'); + }, + selectCard:1, + position:'h', + viewAs:{ + name:links[0][2], + }, + onuse:function(links,player){ + player.addTempSkill('dczhaowen_viewed'); + player.markAuto('dczhaowen_viewed',[links.card.name]); + }, + } + }, + prompt:function(links,player){ + return '将一张展示过的黑色手牌当做'+get.translation(links[0][2])+'使用'; + }, + }, + group:'dczhaowen_draw', + mod:{ + aiOrder:function(player,card,num){ + var cards=[]; + if(card.cards) cards.addArray(cards); + if(get.itemtype(card)=='card') cards.push(card); + for(var cardx of cards){ + if(get.color(cardx)!='red') continue; + if(cardx.hasGaintag('dczhaowen_tag')) return num+0.2; + } + }, + }, + ai:{ + order:12, + result:{ + player:1, + }, + }, + }, + draw:{ + audio:'dczhaowen', + forced:true, + charlotte:true, + trigger:{player:'useCard'}, + filter:function(event,player){ + var cards=event.cards.filter(card=>get.color(card,player)=='red'); + return player.hasHistory('lose',evt=>{ + if(event!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].contains('dczhaowen_tag')){ + if(cards.some(card=>card.cardid==i)) return true; + } + } + }); + }, + content:function(){ + var num=0; + var cards=trigger.cards.filter(card=>get.color(card,player)=='red'); + player.getHistory('lose',evt=>{ + if(trigger!=evt.getParent()) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].contains('dczhaowen_tag')){ + if(cards.some(card=>card.cardid==i)) num++; + } + } + }); + while(num--) player.draw(); + }, + }, + viewed:{ + onremove:true, + charlotte:true, + }, + effect_backup:{ + audio:'dczhaowen', + }, + } + }, + dcjiudun:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + filter:function(event,player){ + if(event.player==player||get.color(event.card)!='black') return false; + if(player.hasSkill('jiu')) return player.countCards('h',card=>{ + return _status.connectMode||lib.filter.cardDiscardable(card,player,'dcjiudun'); + }); + return true; + }, + direct:true, + content:function(){ + 'step 0' + if(player.hasSkill('jiu')){ + player.chooseToDiscard(get.prompt('dcjiudun'),'
    弃置一张手牌,令'+get.translation(trigger.card)+'对你无效
    ').set('logSkill','dcjiudun').set('ai',card=>{ + if(_status.event.goon) return 4.5+Math.max(0,3-player.hp)-get.value(card); + return 0; + }).set('goon',function(){ + if(get.effect(player,trigger.card,trigger.player,player)<-4*Math.max(0,5-Math.sqrt(player.countCards('h')))) return true; + return false; + }()); + event.goto(2); + } + else{ + player.chooseBool(get.prompt('dcjiudun'),'摸一张牌,然后视为使用一张【酒】').set('ai',()=>1); + } + 'step 1' + if(result.bool){ + player.logSkill('dcjiudun'); + player.draw(); + player.chooseUseTarget('jiu',true); + } + event.finish(); + 'step 2' + if(result.bool){ + trigger.excluded.add(player); + game.log(trigger.card,'对',player,'无效'); + } + }, + ai:{ + jiuSustain:true, + skillTagFilter:function(player,tag,name){ + if(name!='phase') return false; + } + } + }, + //武诸葛 + dcjincui:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return true; + }, + forced:true, + group:'dcjincui_advent', + content:function(){ + 'step 0' + var num=0; + for(var i=0;i=player.maxHp) break; + } + } + if(num<1) num=1; + if(num>player.hp) player.recover(num-player.hp); + else if(num0)) break; + top.unshift(cards.shift()); + } + } + bottom=cards; + return [top,bottom]; + } + 'step 2' + var top=result.moved[0]; + var bottom=result.moved[1]; + top.reverse(); + for(var i=0;i=target.hp){ + bool=true; + break; + } + } + } + if(bool) return 0.2; + } + }, + threaten:0.6, + }, + subSkill:{ + advent:{ + audio:'dcjincui', + trigger:{global:'phaseBefore',player:'enterGame'}, + forced:true, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0)&&player.countCards('h')<7; + }, + content:function(){ + player.drawTo(7); + } + } + }, + }, + dcqingshi:{ + audio:2, + trigger:{player:'useCard'}, + filter:function(event,player){ + if(!player.isPhaseUsing()||player.hasSkill('dcqingshi_blocker')) return false; + if(player.getStorage('dcqingshi_clear').contains(event.card.name)) return false; + if(player.hasCard(card=>{ + return get.name(card)==event.card.name; + })) return true; + return false; + }, + direct:true, + content:function(){ + 'step 0' + var choices=[]; + var choiceList=[ + '令'+get.translation(trigger.card)+'对其中一个目标角色造成的伤害+1', + '令任意名其他角色各摸一张牌', + '摸三张牌,然后〖情势〗于本回合失效' + ]; + if(trigger.targets&&trigger.targets.length) choices.push('选项一'); + else choiceList[0]=''+choiceList[0]+'(无目标角色)'; + if(game.countPlayer(i=>i!=player)) choices.push('选项二'); + else choiceList[1]=''+choiceList[1]+''; + if(player.hp>0) choices.push('选项三'); + else choiceList[2]=''+choiceList[1]+'(体力值为0)'; + player.chooseControl(choices,'cancel2').set('choiceList',choiceList).set('prompt',get.prompt('dcqingshi')).set('ai',()=>{ + return _status.event.choice; + }).set('choice',(()=>{ + var choicesx=choices.slice(); + var cards=player.getCards('hs'); + var bool1=get.tag(trigger.card,'damage')&&choicesx.contains('选项一')&&trigger.targets.some(current=>{ + return get.attitude(player,current)<0; + }),bool2=choicesx.contains('选项二')&&game.countPlayer(current=>get.attitude(player,current)>0)>=1; + if(!bool1&&!bool2){ + for(var i=0;i{ + return _status.event.targets.contains(target); + }).set('ai',target=>{ + return 2-get.attitude(_status.event.player,target); + }).set('targets',event.getParent().getTrigger().targets); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.line(target); + player.addTempSkill('dcqingshi_ex'); + if(!player.storage.dcqingshi_ex) player.storage.dcqingshi_ex=[]; + player.storage.dcqingshi_ex.push([target,card]); + } + }, + content2:function(){ + 'step 0' + player.chooseTarget('令任意名其他角色各摸一张牌',[1,Infinity],true,lib.filter.notMe).set('ai',target=>{ + return get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var targets=result.targets; + targets.sortBySeat(); + player.line(targets); + game.asyncDraw(targets); + game.delayex(); + } + }, + content3:function(){ + 'step 0' + player.draw(3); + player.addTempSkill('dcqingshi_blocker'); + }, + subSkill:{ + ex:{ + trigger:{source:'damageBegin1'}, + filter:function(event,player){ + return player.storage.dcqingshi_ex&&player.storage.dcqingshi_ex.some(info=>{ + return info[0]==event.player&&info[1]==event.card; + }); + }, + forced:true, + charlotte:true, + popup:false, + onremove:true, + content:function(){ + trigger.num++; + for(var i=0;i{ + return get.position(card,true)=='o'&&card.cardid==i; + })) return true; + } + } + return false; + }); + }, + content:function(){ + 'step 0' + var cards=[]; + player.getHistory('lose',function(evt){ + if(evt.getParent()!=trigger) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].contains('dczhizhe')){ + var cardsx=trigger.cards.filter(card=>{ + return get.position(card,true)=='o'&&card.cardid==i; + }); + if(cardsx.length) cards.addArray(cardsx); + } + } + }); + if(cards.length){ + player.gain(cards,'gain2').gaintag.addArray(['dczhizhe','dczhizhe_clear']); + player.addTempSkill('dczhizhe_clear'); + } + }, + }, + clear:{ + charlotte:true, + onremove:function(player){ + player.removeGaintag('dczhizhe_clear'); + }, + mod:{ + cardEnabled2:function(card,player){ + var cards=[]; + if(card.cards) cards.addArray(cards); + if(get.itemtype(card)=='card') cards.push(card); + for(var cardx of cards){ + if(cardx.hasGaintag('dczhizhe_clear')) return false; + } + }, + cardRespondable:function(card,player){ + var cards=[]; + if(card.cards) cards.addArray(cards); + if(get.itemtype(card)=='card') cards.push(card); + for(var cardx of cards){ + if(cardx.hasGaintag('dczhizhe_clear')) return false; + } + }, + cardSavable:function(card,player){ + var cards=[]; + if(card.cards) cards.addArray(cards); + if(get.itemtype(card)=='card') cards.push(card); + for(var cardx of cards){ + if(cardx.hasGaintag('dczhizhe_clear')) return false; + } + }, + } + } + } + }, + //段巧笑 + dccaizhuang:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.hasCard(function(card){ + return lib.filter.cardDiscardable(card,player,'dccaizhuang'); + },'he'); + }, + complexCard:true, + selectCard:[1,4], + position:'he', + filterCard:function(card,player){ + var suit=get.suit(card); + if(!lib.suit.contains(suit)) return false; + if(ui.selected.cards.length){ + if(ui.selected.cards.some(i=>{ + return get.suit(i)==suit; + })) return false; + } + return true; + }, + check:function(card){ + var player=_status.event.player; + var suit=get.suit(card); + if(get.position(card)!='h'&&player.countCards('h',{suit:suit})==1) return 0.1; + if(!player.hasCard(cardx=>cardx!=card&&get.suit(cardx)==suit)) return 7.5-get.value(card); + return 6-get.value(card); + }, + content:function(){ + 'step 0' + var suits=[]; + player.countCards('h',card=>{ + if(suits.length>=4) return; + var suit=get.suit(card); + if(!lib.suit.contains(suit)) return; + suits.add(suit); + }); + if(suits.length>=cards.length) event.finish(); + 'step 1' + player.draw(); + event.goto(0); + }, + ai:{ + order:2, + result:{ + player:function(player){ + var suits=lib.suit.filter(suit=>{ + return player.countCards('h',{suit:suit})>1; + }); + var suits2=[],cards=player.getCards('h'); + for(var card of cards){ + var suitx=get.suit(card); + if(suits2.contains(suitx)) continue; + if(!player.hasCard(cardx=>cardx!=card&&get.suit(cardx)==suitx)&&get.value(card)<7.5||get.value(card)<6) suits2.add(suitx); + } + if(suits2.length<=suits.length) return 0; + return 1; + } + } + } + }, + dchuayi:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + frequent:true, + content:function(){ + 'step 0' + player.judge(()=>1).judge2=(result)=>result.bool; + 'step 1' + var color=result.color; + if(color=='red'||color=='black') player.addTempSkill('dchuayi_'+color,{player:'phaseBegin'}); + }, + subSkill:{ + red:{ + trigger:{global:'phaseEnd'}, + charlotte:true, + forced:true, + filter:function(event,player){ + return event.player!=player; + }, + content:function(){ + player.draw(); + }, + mark:true, + intro:{ + name:'华衣·红', + content:'其他角色的回合结束时,你摸一张牌' + }, + }, + black:{ + trigger:{player:'damageEnd'}, + charlotte:true, + forced:true, + content:function(){ + player.draw(2); + }, + mark:true, + intro:{ + name:'华衣·黑', + content:'当你受到伤害后,摸两张牌' + }, + 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.5; + } + else{ + num=0.3; + } + } + 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]; + } + } + } + } + } + } + }, + //张瑾云 + dchuizhi:{ + audio:2, + trigger:{player:'phaseDrawEnd'}, + direct:true, + content:function(){ + 'step 0' + player.chooseToDiscard(get.prompt('dchuizhi'),'你可以选择弃置任意张手牌并点击“确定”,将手牌摸至与全场手牌数最多的角色数相同。',[0,Infinity]).set('logSkill','dchuizhi').set('ai',card=>{ + if(_status.event.isMax){ + if(ui.selected.cards.length) return -get.value(card); + return 0; + } + return 6-get.value(card); + }).set('isMax',player.isMaxHandcard()); + 'step 1' + if(result.bool){ + var num=0,targets=game.filterPlayer(); + for(var current of targets){ + if(current.isMaxHandcard()){ + num=current.countCards('h'); + break; + } + } + num=Math.max(1,Math.min(5,num-player.countCards('h'))); + player.draw(num); + } + } + }, + dcjijiao:{ + audio:2, + enable:'phaseUse', + limited:true, + skillAnimation:true, + animationColor:'orange', + init:function(player){ + player.addSkill('dcjijiao_machi'); + }, + onremove:function(player){ + player.removeSkill('dcjijiao_machi'); + }, + onChooseToUse:function(event){ + if(event.dcjijiao==undefined&&!game.online){ + var bool=lib.skill.dcjijiao.getCards(event.player,true); + event.set('dcjijiao',bool); + } + }, + filter:function(event,player){ + return event.dcjijiao; + }, + filterTarget:true, + getCards:function(player,bool){ + var cards=Array.from(ui.discardPile.childNodes); + var gains=cards.slice(0); + var history=game.getAllGlobalHistory('cardMove',function(evt){ + if(evt.name=='lose') return evt.position==ui.discardPile; + return evt.name=='cardsDiscard'; + }); + for(var i=history.length-1;i>=0;i--){ + var evt=history[i]; + var cards2=evt.cards.filter(function(card){ + return cards.contains(card); + }); + if(cards2.length){ + if(!lib.skill.dcjijiao.isUse(evt,player)){ + gains.removeArray(cards2); + } + cards.removeArray(cards2); + } + if(!cards.length) break; + } + if(bool) return gains.some(card=>get.type2(card,false)=='trick'); + return gains.filter(card=>get.type2(card,false)=='trick'); + }, + isUse:function(event,player){ + if(event.name!='cardsDiscard') return (event.type=='discard'&&event.player==player); + var evtx=event.getParent(); + if(evtx.name!='orderingDiscard') return false; + var evt2=(evtx.relatedEvent||evtx.getParent()); + return (evt2.name=='useCard'&&evt2.player==player); + }, + content:function(){ + player.awakenSkill('dcjijiao'); + var cards=lib.skill.dcjijiao.getCards(player); + if(cards.length){ + target.gain(cards,'gain2').gaintag.add('dcjijiao'); + target.addSkill('dcjijiao_nowuxie'); + } + }, + ai:{ + order:1, + result:{ + target:function(player,target){ + if(game.roundNumber==1&&ui.cardPile.childNodes.length>game.countPlayer()*5&&!game.hasPlayer(current=>current.hp<=2)&&!player.hasSkill('dcjijiao_risutoa')) return 0; + return 5; + } + } + }, + subSkill:{ + machi:{ + charlotte:true, + forced:true, + popup:false, + trigger:{ + global:['washCard','die'], + }, + filter:function(event,player){ + return player.hasSkill('dcjijiao',null,false,false); + }, + content:function(){ + player.addSkill('dcjijiao_risutoa'); + } + }, + risutoa:{ + charlotte:true, + forced:true, + popup:false, + trigger:{global:'phaseAfter'}, + content:function(){ + if(player.awakenedSkills.contains('dcjijiao')){ + player.restoreSkill('dcjijiao'); + game.log(player,'重置了','#g【继椒】'); + //player.removeSkill('dcjijiao_machi'); + } + player.removeSkill('dcjijiao_risutoa'); + } + }, + nowuxie:{ + trigger:{player:'useCard1'}, + forced:true, + charlotte:true, + firstDo:true, + popup:false, + filter:function(event,player){ + if(get.type(event.card)!='trick') return false; + return player.hasHistory('lose',function(evt){ + if(evt.getParent()!=event) return false; + for(var i in evt.gaintag_map){ + if(evt.gaintag_map[i].contains('dcjijiao')) return true; + } + return false; + }); + }, + content:function(){ + trigger.nowuxie=true; + }, + onremove:function(player){ + player.removeGaintag('dcjijiao'); + }, + } + } + }, + //桓范 + dcjianzheng:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target.countCards('h')&&target!=player; + }, + content:function(){ + 'step 0' + var forced=target.hasCard(i=>player.hasUseTarget(i),'h'); + player.choosePlayerCard(target,'h','visible',forced,'获得并使用其中一张牌').set('filterButton',button=>{ + return _status.event.player.hasUseTarget(button.link); + }).set('ai',button=>{ + return _status.event.player.getUseValue(button.link); + }); + 'step 1' + if(result.bool){ + var card=result.links[0]; + event.card=card; + player.gain(card,'giveAuto'); + } + else event.goto(3); + 'step 2' + if(get.position(card)=='h'&&get.owner(card)==player&&player.hasUseTarget(card)){ + player.chooseUseTarget(card,true); + event.finish(); + } + 'step 3' + player.link(true); + target.link(true); + 'step 4' + target.viewHandcards(player); + }, + ai:{ + order:10, + expose:0.2, + result:{ + target:function(player,target){ + return -Math.sqrt(target.countCards('h')); + } + } + } + }, + //fumo! + dcfumou:{ + audio:2, + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + return player.getDamagedHp()>0; + }, + content:function(){ + 'step 0' + event.num=trigger.num; + 'step 1' + player.chooseTarget(get.prompt2('dcfumou'),[1,player.getDamagedHp()]).set('ai',target=>{ + var att=get.attitude(_status.event.player,target); + if(target.countCards('h')>=3||target.countCards('e')&&!target.isDamaged()){ + if(!target.canMoveCard()) return -att; + else if(!target.canMoveCard(true)) return -att/5; + } + return att; + }); + 'step 2' + if(result.bool){ + var targets=result.targets; + targets.sortBySeat(_status.currentPhase); + event.targets=targets; + player.logSkill('dcfumou',targets); + event.num--; + } + else event.finish(); + 'step 3' + var target=targets.shift(); + event.target=target; + var choices=[]; + var choiceList=[ + '移动场上的一张牌', + '弃置所有手牌并摸两张牌', + '弃置装备区里的所有牌并回复1点体力' + ]; + if(target.canMoveCard()) choices.push('选项一'); + else choiceList[0]=''+choiceList[0]+''; + if(target.countCards('h')&&!target.hasCard(card=>{ + return !lib.filter.cardDiscardable(card,target,'dcfumou'); + },'h')) choices.push('选项二'); + else choiceList[1]=''+choiceList[1]+''; + if(target.countCards('e')&&!target.hasCard(card=>{ + return !lib.filter.cardDiscardable(card,target,'dcfumou'); + },'h')) choices.push('选项三'); + else choiceList[2]=''+choiceList[2]+''; + if(choices.length){ + target.chooseControl(choices).set('prompt','腹谋:请选择一项').set('choiceList',choiceList).set('ai',()=>{ + return _status.event.choice; + }).set('choice',function(){ + if(choices.length==1) return choices[0]; + var func=(choice,target)=>{ + switch(choice){ + case '选项一': + if(target.canMoveCard(true)) return 5; + return 3; + case '选项二': + if(target.countCards('h')<2&&get.value(target.getCards('h')[0])<6) return 4.5; + return 4.5-target.countCards('h'); + case '选项三': + var e2=target.getEquip(2); + if(target.hp+target.countCards('hs',['tao','jiu'])<2&&!e2) return 5.5; + if(get.recoverEffect(target,target,target)<=0) return 3; + if(!e2) return 4.4; + return 5-1.5*target.countCards('e'); + } + } + var choicesx=choices.map(i=>[i,func(i,target)]).sort((a,b)=>b[1]-a[1]); + return choicesx[0][0]; + }()); + } + else event.goto(5); + 'step 4' + game.log(target,'选择了','#y'+result.control); + if(result.control=='选项一'){ + target.moveCard(true); + } + else if(result.control=='选项二'){ + target.chooseToDiscard(true,'h',target.countCards('h')); + target.draw(2); + } + else{ + target.chooseToDiscard(true,'e',target.countCards('e')); + target.recover(); + } + 'step 5' + if(event.targets.length) event.goto(3); + else if(event.num) 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==2&&target.hasFriend()) return [1,num*1.5]; + if(target.hp>=2) return [1,num]; + } + }, + }, + } + }, + //陈泰 + dcctjiuxian:{ + audio:2, + enable:'phaseUse', + usable:1, + filterCard:function(card,player,target){ + var mod=game.checkMod(card,player,'unchanged','cardChongzhuable',player); + return mod=='unchanged'; + }, + selectCard:function(){ + return Math.ceil(_status.event.player.countCards('h')/2); + }, + check:function(card){ + return 6.5-get.value(card); + }, + prepare:function(cards,player){ + player.$throw(cards,1000); + game.log(player,'将',cards,'置入了弃牌堆'); + }, + discard:false, + loseTo:'discardPile', + visible:true, + delay:0.5, + content:function(){ + 'step 0' + player.draw(cards.length); + 'step 1' + player.addTempSkill('dcctjiuxian_help'); + player.chooseUseTarget({ + name:'juedou', + isCard:true, + storage:{dcctjiuxian:true} + },true); + }, + subSkill:{ + help:{ + trigger:{global:'damageSource'}, + filter:function(event,player){ + return event.card&&event.card.storage&&event.card.storage.dcctjiuxian&&event.player.isIn()&& + event.getParent(2).targets.contains(event.player)&&game.hasPlayer(current=>{ + return current!=player&&event.player.inRange(current)&¤t.isDamaged(); + }); + }, + direct:true, + forced:true, + charlotte:true, + content:function(){ + 'step 0' + player.chooseTarget('救陷:是否令其攻击范围内的一名其他角色回复1点体力?',(card,player,target)=>{ + if(_status.event.player==target) return false; + return target.isDamaged()&&_status.event.targetx.inRange(target); + }).set('targetx',trigger.player).set('ai',target=>get.recoverEffect(target,_status.event.player,_status.event.player)); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcctjiuxian_help',target); + target.recover(player); + } + } + } + } + }, + dcchenyong:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + frequent:true, + filter:function(event,player){ + return player.getHistory('useCard').length; + }, + content:function(){ + var types=[]; + var history=player.getHistory('useCard'); + for(var evt of history){ + types.add(get.type2(evt.card)); + } + var num=types.length; + player.draw(num); + }, + ai:{threaten:2.2} + }, + //孙瑜 + dcquanshou:{ + audio:2, + trigger:{global:'phaseBegin'}, + filter:function(event,player){ + return event.player.countCards('h')0||event.player.maxHp-event.player.countCards('h')<=2; + }, + content:function(){ + 'step 0' + var draw=Math.min(5,trigger.player.maxHp-trigger.player.countCards('h')); + trigger.player.chooseControl().set('choiceList',[ + (draw>0?'摸'+get.cnNumber(draw)+'张牌,然后':'令')+'你本回合使用【杀】的次数上限-1', + '当你本回合使用牌被抵消后,'+get.translation(player)+'摸一张牌' + ]).set('ai',()=>_status.event.choice).set('choice',function(){ + var draw=Math.min(5,Math.max(0,trigger.player.maxHp-trigger.player.countCards('h'))); + if(get.attitude(trigger.player,player)>0){ + if(draw>=3||trigger.player.getCardUsable('sha')>1) return '选项一'; + if(draw<=1&&trigger.player.countCards('hs',card=>{ + return get.name(card)=='sha'&&trigger.player.hasValueTarget(card); + })) return '选项二'; + return '选项一'; + } + else{ + if(draw>=4) return '选项一'; + if(draw<2&&trigger.player.countCards('hs',card=>{ + return trigger.player.hasValueTarget(card); + })) return '选项二'; + return '选项一'; + } + }()).set('prompt','劝守:请选择一项'); + 'step 1' + game.log(trigger.player,'选择了','#y'+result.control); + if(result.control=='选项一'){ + var draw=Math.min(5,trigger.player.maxHp-trigger.player.countCards('h')); + if(draw>0) trigger.player.draw(draw); + trigger.player.addTempSkill('dcquanshou_sha'); + trigger.player.addMark('dcquanshou_sha',1,false); + } + else{ + trigger.player.addTempSkill('dcquanshou_respond'); + trigger.player.markAuto('dcquanshou_respond',[player]); + } + }, + ai:{ + expose:0.1 + }, + subSkill:{ + sha:{ + charlotte:true, + onremove:true, + marktext:'守', + intro:{content:'使用【杀】的次数上限-#'}, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num-player.countMark('dcquanshou_sha'); + }, + } + }, + respond:{ + trigger:{player:['shaMiss','eventNeutralized']}, + filter:function(event,player){ + if(event.type!='card'&&event.name!='_wuxie') return false; + return player.getStorage('dcquanshou_respond').some(i=>i.isIn()); + }, + forced:true, + popup:false, + charlotte:true, + onremove:true, + marktext:'守', + intro:{content:'本回合使用的牌被抵消后,$摸一张牌'}, + content:function(){ + var targets=player.getStorage('dcquanshou_respond'); + targets.sortBySeat(); + for(var target of targets){ + if(target.isIn()){ + target.logSkill('dcquanshou_respond',player); + target.draw(); + } + } + } + } + } + }, + dcshexue:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + var card=lib.skill.dcshexue.getLast(); + return card&&player.hasUseTarget(card); + }, + getLast:function(){ + for(var current of game.filterPlayer()){ + var history=current.actionHistory; + if(history.length<2) continue; + if(history[history.length-2].isMe){ + var evts=history[history.length-2].useCard; + for(var i=evts.length-1;i>=0;i--){ + var evt=evts[i]; + if(get.type(evt.card)!='basic'&&get.type(evt.card)!='trick') continue; + var evtx=evt.getParent('phaseUse'); + if(evtx&&evtx.player==current){ + return {name:evt.card.name,nature:evt.card.nature}; + } + } + } + } + return null; + }, + direct:true, + group:'dcshexue_end', + content:function(){ + var card=lib.skill.dcshexue.getLast(); + game.broadcastAll(function(card){ + lib.skill.dcshexue_backup.viewAs=card; + lib.skill.dcshexue_backup.prompt='设学:是否将一张牌当做'+get.translation(card)+'使用?'; + },card); + var next=player.chooseToUse(); + next.set('openskilldialog','设学:是否将一张牌当做'+get.translation(card)+'使用?'); + next.set('norestore',true); + next.set('addCount',false); + next.set('_backupevent','dcshexue_backup'); + next.set('custom',{ + add:{}, + replace:{window:function(){}} + }); + next.backup('dcshexue_backup'); + }, + subSkill:{ + backup:{ + audio:'dcshexue', + filterCard:function(card){ + return get.itemtype(card)=='card'; + }, + position:'hes', + selectCard:1, + check:(card)=>6-get.value(card), + popname:true, + }, + end:{ + audio:'dcshexue', + trigger:{player:'phaseUseEnd'}, + filter:function(event,player){ + return player.getHistory('useCard',evt=>{ + return evt.getParent('phaseUse')==event&&(get.type(evt.card)=='basic'||get.type(evt.card)=='trick'); + }).length; + }, + prompt2:function(event,player){ + var history=player.getHistory('useCard',evt=>{ + return evt.getParent('phaseUse')==event&&(get.type(evt.card)=='basic'||get.type(evt.card)=='trick'); + }); + var card=history[history.length-1].card; + return '令下一回合的角色于其出牌阶段开始时选择是否将一张牌当做'+(get.translation(card.nature)||'')+'【'+get.translation(card.name)+'】使用'; + }, + content:function(){ + var history=player.getHistory('useCard',evt=>{ + return evt.getParent('phaseUse')==trigger&&(get.type(evt.card)=='basic'||get.type(evt.card)=='trick'); + }); + var card=history[history.length-1].card; + card={name:card.name,nature:card.nature}; + player.addSkill('dcshexue_studyclear'); + if(!player.storage.dcshexue_studyclear) player.storage.dcshexue_studyclear=[]; + player.storage.dcshexue_studyclear.push(card); + } + }, + study:{ + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return player.getStorage('dcshexue_study').some(i=>event.player.hasUseTarget(i)); + }, + onremove:true, + charlotte:true, + direct:true, + content:function(){ + 'step 0' + event.cards=player.getStorage('dcshexue_study'); + 'step 1' + var card=cards.pop(); + if(trigger.player.hasUseTarget(card)){ + game.broadcastAll(function(card){ + lib.skill.dcshexue_backup.viewAs=card; + lib.skill.dcshexue_backup.prompt='设学:是否将一张牌当做'+get.translation(card)+'使用?'; + },card); + var next=trigger.player.chooseToUse(); + next.set('openskilldialog','设学:是否将一张牌当做'+get.translation(card)+'使用?'); + next.set('norestore',true); + next.set('addCount',false); + next.set('_backupevent','dcshexue_backup'); + next.set('custom',{ + add:{}, + replace:{window:function(){}} + }); + next.backup('dcshexue_backup'); + } + if(cards.length) event.redo(); + } + }, + studyclear:{ + trigger:{global:'phaseBegin'}, + charlotte:true, + forceDie:true, + silent:true, + onremove:true, + lastDo:true, + content:function(){ + trigger.player.addTempSkill('dcshexue_study'); + if(!trigger.player.storage.dcshexue_study) trigger.player.storage.dcshexue_study=[]; + trigger.player.storage.dcshexue_study=trigger.player.storage.dcshexue_study.concat(player.getStorage('dcshexue_studyclear')); + player.removeSkill('dcshexue_studyclear'); + } + } + } + }, + //郤正 + dcdanyi:{ + audio:2, + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + if(!event.isFirstTarget) return false; + if(!event.targets||!event.targets.length) return false; + var evt=lib.skill.dcjianying.getLastUsed(player,event.getParent()); + if(!evt||!evt.targets||!evt.targets.length||evt.targets.length!=event.targets.length) return false; + var targetsx=event.targets.slice().sort((a,b)=>a.seatNum-b.seatNum); + var targetsy=evt.targets.slice().sort((a,b)=>a.seatNum-b.seatNum); + for(var i=0;iplayer.canUse(card,current)); + if(targetsx.length!=targets.length) return; + } + else if(targets.length>=select[0]&&targets.length<=select[1]){ + var eff=0; + for(var i of targets){ + eff+=get.effect(i,card,player,player); + } + if(eff<0) return; + } + return num+10; + }, + }, + ai:{ + threaten:2.5, + effect:{ + player:function(card,player,target){ + if(player._dcdanyi_aiChecking) return; + player._dcdanyi_aiChecking=true; + var evt=lib.skill.dcjianying.getLastUsed(player),targets; + if(evt){ + targets=evt.targets; + var select=get.select(_status.event.selectTarget); + if(select[0]==-1){ + var targetsx=game.filterPlayer(current=>player.canUse(card,current)); + if(targetsx.length!=targets.length){ + delete player._dcdanyi_aiChecking; + return; + } + } + else if(targets.length>=select[0]&&targets.length<=select[1]){ + var eff=0; + for(var i of targets){ + eff+=get.effect(i,card,player,player); + } + if(eff<0){ + delete player._dcdanyi_aiChecking; + return; + } + } + } + delete player._dcdanyi_aiChecking; + if((targets||[]).contains(target)) return [1,1]; + } + }, + }, + }, + dcwencan:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + if(ui.selected.targets.length){ + if(ui.selected.targets[0].hp==target.hp) return false; + } + return target.hp!=player.hp; + }, + selectTarget:[1,2], + complexTarget:true, + multiline:true, + content:function(){ + 'step 0' + target.chooseToDiscard(get.translation(player)+'对你发动了【文灿】','是否弃置两张花色不同的牌?或者点击“取消”,令其本回合对你使用牌无次数限制','he',2,(card,player)=>{ + if(!ui.selected.cards.length) return true; + var suit=get.suit(card,player); + for(var i of ui.selected.cards){ + if(get.suit(i,player)==suit) return false; + } + return true; + }).set('complexCard',true).set('ai',card=>{ + if(_status.event.nofear) return 0; + return 5-get.value(card); + }).set('nofear',player.countCards('hs',card=>{ + return get.tag(card,'damage')&&player.canUse(card,target)&&get.effect(target,card,player,target)<=0; + })=game.countPlayer()) return false; + if(event.name=='gain'&&event.player==player) return false; + var evt=event.getl(player); + return evt&&evt.cards2&&evt.cards2.length>0; + }, + content:function(){ + 'step 0' + var cards=player.getExpansions('dcwangyuan'); + var card=get.cardPile2(cardx=>{ + var type=get.type2(cardx); + return (type=='basic'||type=='trick')&&!cards.some(cardxx=>get.name(cardx,false)==get.name(cardxx,false)); + }); + if(card) player.addToExpansion(card,'gain2').gaintag.add('dcwangyuan'); + }, + marktext:'妄', + intro:{ + name:'妄(妄缘/铃音)', + content:'expansion', + markcount:'expansion', + }, + }, + dclingyin:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + return player.getExpansions('dcwangyuan').length; + }, + direct:true, + content:function(){ + 'step 0' + var cards=player.getExpansions('dcwangyuan'); + player.chooseButton([ + get.prompt('dclingyin')+'(当前轮数:'+get.cnNumber(game.roundNumber,true)+')', + cards + ],[1,game.roundNumber]).set('ai',button=>{ + var color=_status.event.color,player=_status.event.player; + if(ui.selected.buttons.length>0&&ui.selected.buttons.length==player.getExpansions('dcwangyuan').length-1) return 0; + if(color==1) return get.value(button.link); + if(color) return get.color(button.link)==color?1:0; + return 0; + }).set('color',function(){ + var cardsR=cards.filter(i=>get.color(i)=='red'); + if(cardsR.length==cards.length||cardsR.length==0||cards.length<=game.roundNumber) return 1; + if(cardsR.length<=game.roundNumber) return 'red'; + if(cards.length-cardsR.length<=game.roundNumber) return 'black'; + return 1; + }()); + 'step 1' + if(result.bool){ + player.logSkill('dclingyin'); + var cards=result.links; + player.gain(cards,'gain2'); + var cardsx=player.getExpansions('dcwangyuan').removeArray(cards); + if(cardsx.length<=1||get.color(cardsx)!='none'){ + player.addTempSkill('dclingyin_effect'); + game.log(player,'获得了','#g【铃音】','的后续效果'); + } + } + }, + ai:{ + combo:'dcwangyuan', + threaten:3, + }, + subSkill:{ + effect:{ + audio:'dclingyin', + enable:'phaseUse', + trigger:{source:'damageBegin1'}, + viewAs:{name:'juedou'}, + charlotte:true, + forced:true, + prompt:'将一张武器牌或防具牌当【决斗】使用', + filterCard:function(card){ + return get.subtype(card)=='equip1'||get.subtype(card)=='equip2'; + }, + position:'hes', + filter:function(event,player){ + if(event.name=='chooseToUse') return player.countCards('hes',{subtype:['equip1','equip2']})>0; + return event.player!=player; + }, + content:function(){ + trigger.num++; + }, + ai:{ + damageBonus:true, + } + } + } + }, + dcliying:{ + audio:2, + usable:1, + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', + }, + filter:function(event,player){ + var cards=event.getg(player).filter(i=>get.owner(i)==player&&get.position(i)=='h'); + if(!cards.length) return false; + var evt=event.getParent('phaseDraw'); + if(evt&&evt.name=='phaseDraw') return false; + return true; + }, + direct:true, + content:function(){ + 'step 0' + var cards=trigger.getg(player).filter(i=>get.owner(i)==player&&get.position(i)=='h'); + player.chooseCardTarget({ + prompt:get.prompt('dcliying'), + prompt2:'选择本次获得的任意张牌交给一名其他角色,然后摸一张牌', + filterTarget:lib.filter.notMe, + filterCard:card=>_status.event.cards.contains(card), + cards:cards, + selectCard:[1,cards.length], + ai1:function(card){ + if(ui.selected.cards.length) return 0; + return 3/(Math.abs(get.value(card))+0.1) + }, + ai2:function(target){ + return get.value(ui.selected.cards,target)*get.attitude(_status.event.player,target); + }, + }).set('cards',cards); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcliying',target); + player.give(result.cards,target); + player.draw(); + //if(player!=_status.currentPhase) event.finish(); + } + else{ + player.storage.counttrigger.dcliying--; + event.finish(); + }/* + 'step 2' + var cards=player.getExpansions('dcwangyuan'); + var card=get.cardPile2(cardx=>{ + var type=get.type2(cardx); + return (type=='basic'||type=='trick')&&!cards.some(cardxx=>get.name(cardx,false)==get.name(cardxx,false)); + }); + if(card) player.addToExpansion(card,'gain2').gaintag.add('dcwangyuan');*/ + } + }, + //谢灵毓 + dcyuandi:{ + audio:2, + trigger:{global:'useCard'}, + filter:function(event,player){ + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=event.player) return false; + if(event.player==player||!event.targets||event.targets.length>1||event.targets[0]!=event.player) return false; + return event.player.getHistory('useCard',evtx=>{ + return evtx.getParent('phaseUse')==evt; + }).indexOf(event)==0; + }, + direct:true, + global:'dcyuandi_ai', + content:function(){ + 'step 0' + var target=trigger.player; + var name=get.translation(target); + var choices=['选项二']; + var choiceList=['弃置'+name+'一张手牌','你与'+name+'各摸一张牌']; + if(target.countDiscardableCards(player,'h')) choices.unshift('选项一'); + else choiceList[0]=''+choiceList[0]+''; + player.chooseControl(choices,'cancel2').set('choiceList',choiceList).set('ai',()=>{ + return _status.event.choice; + }).set('prompt',get.prompt('dcyuandi',trigger.player)).set('choice',function(){ + if(get.attitude(player,target)<0){ + if(choices.contains('选项一')) return '选项一'; + return 'cancel2'; + } + return '选项二'; + }()); + 'step 1' + if(result.control!='cancel2'){ + var target=trigger.player; + player.logSkill('dcyuandi',target); + if(result.control=='选项一'){ + player.discardPlayerCard(target,'h',true); + } + else game.asyncDraw([target,player]); + } + }, + subSkill:{ + ai:{ + mod:{ + aiOrder:function(player,card,num){ + var info=get.info(card); + if(!info||!info.toself) return; + var evt=_status.event.getParent('phaseUse'); + if(!evt||evt.player!=player) return; + if(player.hasHistory('useCard',evtx=>evtx.getParent('phaseUse')==evt)) return; + if(game.hasPlayer(current=>{ + return current.hasSkill('dcyuandi')&&get.attitude(player,current)>=0; + })) return num+10; + return num/3; + }, + }, + }, + } + }, + dcxinyou:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h'){ + return evt.getParent(2)==event&&evt.cards.length>=2; + })) check|=1; + if(game.getGlobalHistory('changeHp',evt=>{ + return evt.getParent().name=='recover'&&evt.getParent(2)==event; + }).length) check|=2; + if(check>0){ + player.addTempSkill('dcxinyou_effect'); + player.storage.dcxinyou_effect=check; + } + }, + ai:{ + order:1, + result:{player:1} + }, + subSkill:{ + effect:{ + audio:'dcxinyou', + trigger:{player:'phaseJieshuBegin'}, + charlotte:true, + forced:true, + onremove:true, + filter:function(event,player){ + return player.storage.dcxinyou_effect; + }, + content:function(){ + if((player.storage.dcxinyou_effect&1)>0) player.loseHp(); + if((player.storage.dcxinyou_effect&2)>0) player.chooseToDiscard('心幽:弃置两张牌',2,true,'he'); + } + } + } + }, + //笮融 + dccansi:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + content:function(){ + 'step 0' + player.recover(); + player.chooseTarget('残肆:选择一名其他角色',true,lib.filter.notMe).set('ai',target=>{ + var player=_status.event.player; + var list=['recover','sha','juedou','huogong']; + return list.reduce((p,c)=>{ + return p+get.effect(target,{name:c},player,player); + },0); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.line(target,'fire'); + target.recover(); + event.list=['sha','juedou','huogong']; + player.addTempSkill('dccansi_draw'); + player.storage.dccansi_draw=target; + } + else event.finish(); + 'step 2' + var card={name:event.list.shift(),isCard:true}; + if(player.canUse(card,target,false)) player.useCard(card,target,false); + if(event.list.length) event.redo(); + 'step 3' + player.removeSkill('dccansi_draw'); + }, + subSkill:{ + draw:{ + trigger:{global:'damageEnd'}, + forced:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + return event.getParent(3).name=='dccansi'&&player.storage.dccansi_draw==event.player; + }, + content:function(){ + for(var i=0;i7; + }, + forced:true, + direct:true, + intro:{ + markcount:'expansion', + content:'expansion', + }, + content:function(){ + 'step 0' + var num=player.countCards('h')-7; + player.chooseCard('佛宗:将'+get.cnNumber(num)+'张手牌置于武将上',true,num); + 'step 1' + if(result.bool){ + var cards=result.cards; + player.logSkill('dcfozong'); + player.addToExpansion(cards,player,'give').gaintag.add('dcfozong'); + } + 'step 2' + var cards=player.getExpansions('dcfozong'); + if(cards.length<7) event.finish(); + else{ + event.targets=game.filterPlayer(i=>i!=player).sortBySeat(player); + game.delayx(); + } + 'step 3' + var target=targets.shift(); + event.target=target; + player.line(target); + var cards=player.getExpansions('dcfozong'); + if(!cards.length) event._result={bool:false}; + else target.chooseButton(['###佛宗###
    获得一张牌并令'+get.translation(player)+'回复1点体力,或点击“取消”令其失去1点体力
    ',cards]).set('ai',button=>{ + if(_status.event.refuse) return get.value(button.link)-7.5; + return get.value(button.link); + }).set('refuse',get.attitude(target,player)<1&&get.effect(player,{name:'losehp'},player,target)>0); + 'step 4' + if(result.bool){ + var card=result.links[0]; + target.gain(card,'give',player); + player.recover(target); + } + else player.loseHp(); + 'step 5' + if(targets.length) event.goto(3); + }, + ai:{halfneg:true} + }, + //滕芳兰 + dcluochong:{ + audio:2, + trigger:{global:'roundStart'}, + filter:function(event,player){ + return game.hasPlayer(current=>current.countDiscardableCards(player,'hej')>0); + }, + direct:true, + content:function(){ + 'step 0' + var num=4-player.countMark('dcluochong'); + var dialog=[]; + dialog.push('###'+get.prompt('dcluochong')+'###
    弃置任意名角色区域内共计至多'+get.cnNumber(num)+'张牌
    '); + game.filterPlayer().sortBySeat().forEach(target=>{ + if(target.countDiscardableCards(player,'hej')<=0) return false; + var name=(target==player?'你':get.translation(target)); + if(target.countCards('h')){ + dialog.add('
    '+name+'的手牌区
    '); + if(player.hasSkillTag('viewHandcard',null,target,true)||player==target) dialog.push(target.getCards('h')); + else dialog.push([target.getCards('h'),'blank']); + } + if(target.countCards('e')) dialog.addArray(['
    '+name+'的装备区
    ',target.getCards('e')]); + if(target.countCards('j')) dialog.addArray(['
    '+name+'的判定区
    ',target.getCards('j')]); + }); + player.chooseButton([1,num]).set('createDialog',dialog).set('filterButton',button=>{ + return lib.filter.canBeDiscarded(button.link,_status.event.player,get.owner(button.link)); + }).set('ai',button=>{ + var card=button.link; + var player=_status.event.player,target=get.owner(card); + if(target==player&&ui.cardPile.childNodes.length>80){ + if(ui.selected.buttons.some(i=>get.owner(i.link)==player)) return 0; + if(get.value(card,player)<6) return 60-get.value(card,player); + return 0; + } + var num=ui.selected.buttons.filter(i=>get.owner(i.link)==target).length; + return -(get.position(card)!='h'?get.value(card,target):(4.5+Math.random()-0.2*(num>2?1:0)))*get.attitude(player,target); + }); + 'step 1' + if(result.bool){ + var links=result.links; + var lose_list=[]; + var log=false; + for(var target of game.players){ + var cards=links.filter(card=>get.owner(card)==target); + if(cards.length){ + if(cards.length>2){ + player.addMark('dcluochong',1,false); + log=true; + } + lose_list.push([target,cards]); + } + } + player.logSkill('dcluochong',lose_list.map(i=>i[0])); + if(log) game.log(player,'可弃置牌数','#g-1'); + if(lose_list[0].length==1) lose_list[0][0].discard(lose_list[0][1]); + else{ + game.loseAsync({ + lose_list:lose_list, + discarder:player, + }).setContent('discardMultiple'); + } + } + }, + ai:{ + threaten:2.5, + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='delay'&¤t<0){ + var current=_status.currentPhase; + if(current.getSeatNum()>target.getSeatNum()) return 'zerotarget'; + } + }, + }, + }, + }, + dcaichen:{ + audio:2, + trigger:{ + player:['loseAfter','phaseDiscardBefore'], + global:'loseAsyncAfter', + target:'useCardToTargeted' + }, + filter:function(event,player,name){ + if(event.name=='phaseDiscard') return ui.cardPile.childNodes.length>40; + if(name=='useCardToTargeted') return ui.cardPile.childNodes.length<40&&get.suit(event.card)=='spade'; + if(event.getParent().name!='dcluochong') return false; + if(event.name=='loseAsync'&&!event.getl(player).cards.length) return false; + return ui.cardPile.childNodes.length>80; + }, + forced:true, + content:function(){ + if(trigger.name.indexOf('lose')==0) player.draw(2); + else if(trigger.name=='phaseDiscard'){ + trigger.cancel(); + game.log(player,'跳过了弃牌阶段'); + } + else{ + trigger.directHit.add(player); + game.log(player,'不可响应',trigger.card); + } + } + }, + //杨彪 + dczhaohan:{ + audio:2, + trigger:{player:'phaseDrawBegin2'}, + frequent:true, + filter:function(event,player){ + return !event.numFixed; + }, + content:function(){ + trigger.num+=2; + trigger.dczhaohan=true; + player.addTempSkill('dczhaohan_choose','phaseDrawAfter'); + }, + subSkill:{ + choose:{ + trigger:{player:'gainAfter'}, + filter:function(event,player){ + return event.getParent(2).dczhaohan&&player.countCards('h')>=2; + }, + forced:true, + charlotte:true, + popup:false, + content:function(){ + 'step 0' + var choices=[],choiceList=[ + '将两张手牌交给一名没有手牌的角色', + '弃置两张手牌' + ]; + if(game.hasPlayer(current=>current.countCards('h')==0)) choices.push('选项一'); + else choiceList[0]=''+choiceList[0]+''; + choices.push('选项二'); + if(choices.length==1) event._result={control:'选项二'}; + else player.chooseControl(choices).set('choiceList',choiceList).set('ai',()=>_status.event.choice).set('choice',function(){ + if(game.hasPlayer(current=>{ + return current.countCards('h')==0&&get.attitude(player,current)>0; + })) return '选项一'; + return '选项二'; + }()); + 'step 1' + if(result.control=='选项一'){ + player.chooseCardTarget({ + filterCard:true, + selectCard:2, + forced:true, + filterTarget:function(card,player,target){ + return !target.countCards('h'); + }, + ai1:function(card){ + return 7-get.value(card); + }, + ai2:function(target){ + return get.attitude(_status.event.player,target); + }, + prompt:'将两张手牌交给一名没有手牌的角色' + }); + } + else{ + player.chooseToDiscard('昭汉:请弃置两张手牌',true,2); + event.finish(); + } + 'step 2' + if(result.bool){ + player.give(result.cards,result.targets[0]); + } + } + } + } + }, + dcjinjie:{ + audio:2, + trigger:{global:'dying'}, + hasPhase:function(player){ + var history=player.actionHistory; + for(var i=history.length-1;i>=0;i--){ + if(history[i].isMe) return true; + if(history[i].isRound) break; + } + return false; + }, + direct:true, + content:function(){ + 'step 0' + if(lib.skill.dcjinjie.hasPhase(player)){ + player.chooseBool(get.prompt('dcjinjie',trigger.player),'令其摸一张牌').set('ai',()=>{ + return get.attitude(_status.event.player,_status.event.getTrigger().player)>0; + }); + } + else{ + var num=0; + var history=player.actionHistory; + for(var i=history.length-1;i>=0;i--){ + for(var evt of history[i].useSkill){ + if(evt.skill=='dcjinjie') num++; + } + if(history[i].isRound) break; + } + if(num==0){ + player.chooseBool(get.prompt('dcjinjie',trigger.player),'令其回复1点体力').set('ai',()=>{ + var player=_status.event.player; + return get.effect(_status.event.getTrigger().player,{name:'tao'},player,player)>0; + }); + } + else{ + player.chooseToDiscard(get.prompt('dcjinjie',trigger.player),'弃置'+get.cnNumber(num)+'张牌,令其回复1点体力','he',num).set('ai',card=>{ + if(_status.event.eff>0) return get.value({name:'tao'})-get.value(card); + return 0; + }).set('eff',get.effect(trigger.player,{name:'tao'},player,player)).set('logSkill',['dcjinjie',trigger.player]); + } + event.goto(2); + } + 'step 1' + if(result.bool){ + player.logSkill('dcjinjie',trigger.player); + trigger.player.draw(); + } + event.finish(); + 'step 2' + if(result.bool){ + if(!result.cards||!result.cards.length) player.logSkill('dcjinjie',trigger.player); + trigger.player.recover(); + } + }, + }, + dcjue:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(current=>current.isHealthy()&&player.canUse('sha',current,false)); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('dcjue'),'视为对一名未受伤的角色使用一张【杀】',(card,player,target)=>{ + return player.canUse('sha',target,false)&&target.isHealthy(); + }).set('ai',target=>{ + return get.effect(target,{name:'sha'},_status.event.player); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcjue',target); + player.useCard({name:'sha',isCard:true},target,false); + } + }, + }, + //杨弘 + dcjianji:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.getAttackRange()>=1; + }, + selectTarget:function(){ + return [1,_status.event.player.getAttackRange()]; + }, + complexSelect:true, + complexTarget:true, + filterTarget:function(card,player,target){ + var selected=ui.selected.targets; + if(!selected.length) return true; + for(var i of selected){ + if(i.getNext()==target||i.getPrevious()==target) return true; + } + return false; + }, + contentBefore:function(){ + event.getParent()._dcjianji_discarded=[]; + }, + content:function(){ + 'step 0' + if(target.countCards('he')>0) target.chooseToDiscard(true,'he'); + else event.finish(); + 'step 1' + if(result.bool){ + event.getParent()._dcjianji_discarded.push(target); + } + }, + contentAfter:function(){ + 'step 0' + var list=targets.filter(target=>{ + var num=target.countCards('h'); + return targets.every(targetx=>{ + return targetx.countCards('h')<=num; + }); + }); + if(list.length){ + event.list=list; + event.current=event.list.shift(); + event.getParent()._dcjianji_discarded.remove(player); + event.targets=event.getParent()._dcjianji_discarded; + } + else event.finish(); + 'step 1' + var targets=event.targets.slice(); + targets.remove(event.current); + if(!targets.length) event._result={bool:false}; + else event.current.chooseTarget('间计:是否视为对除'+get.translation(player)+'外的弃置过牌的一名角色使用一张杀?',(card,player,target)=>{ + return _status.event.targets.contains(target)&&player.canUse('sha',target,false); + }).set('targets',event.targets).set('ai',target=>{ + var player=_status.event.player; + return get.effect(target,{name:'sha'},player,player); + }); + 'step 2' + if(result.bool){ + event.current.useCard({name:'sha',isCard:true},result.targets,false); + } + 'step 3' + if(event.list.length){ + event.current=event.list.shift(); + event.goto(1); + } + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + var eff=get.effect(target,{name:'guohe_copy2'},player,target)/2; + if(ui.selected.targets.length&&eff<0){ + var len=target.countCards('h'); + if(ui.selected.targets.every(i=>{ + return i.countCards('h'){ + return get.effect(i,{name:'sha'},target,player)>0; + })) return 0.1; + } + return ui.selected.targets.reduce((p,c)=>p+get.effect(c,{name:'guohe_copy2'},player,c)/2,0)+eff; + } + } + }, + }, + dcyuanmo:{ + audio:2, + trigger:{player:['damageEnd','phaseZhunbeiBegin']}, + direct:true, + group:'dcyuanmo_add', + init:function(player){player.storage.dcyuanmo_range=0}, + change:function(player,num){ + player.addSkill('dcyuanmo_range'); + if(typeof player.storage.dcyuanmo_range!=='number') player.storage.dcyuanmo_range=0; + if(!num) return; + player.storage.dcyuanmo_range+=num; + if(player.storage.dcyuanmo_range!=0) player.markSkill('dcyuanmo_range'); + else player.unmarkSkill('dcyuanmo_range'); + game.log(player,'的攻击范围',(num>0?'+':'')+num); + }, + content:function(){ + 'step 0' + event.targets=game.filterPlayer(current=>player.inRange(current)); + var choiceList=['攻击范围+1。然后若你攻击范围内的角色数因此增加,你可以获得其中任意名角色的一张牌','攻击范围-1。然后你摸两张牌']; + player.chooseControl('cancel2').set('prompt',get.prompt('dcyuanmo')).set('choiceList',choiceList).set('ai',()=>{ + return _status.event.choice; + }).set('choice',function(){ + if(trigger.name=='phaseZhunbei'&&player.getAttackRange()==1&&!player.hasCard(card=>{ + if(get.subtype(card)!='equip1'&&!player.hasUseTarget(card)) return false; + var num=1; + var info=get.info(card,false); + if(info&&info.distance&&typeof info.distance.attackFrom=='number') num-=info.distance.attackFrom; + return num>1; + },'hs')) return '选项一'; + var targets=event.targets.slice(),targetsx=[]; + var _tmp=player.storage.dcyuanmo_range; + player.storage.dcyuanmo_range++; + try{ + targetsx=game.filterPlayer(current=>player.inRange(current)); + } + catch(e){player.storage.dcyuanmo_range=_tmp}; + player.storage.dcyuanmo_range=_tmp; + targetsx.removeArray(targets); + return targetsx.reduce((p,c)=>{ + return p+Math.max(0,get.effect(c,{name:'shunshou_copy2'},player,player)); + },0)>get.effect(player,{name:'wuzhong'},player,player)/1.5?'选项一':'选项二'; + }()); + 'step 1' + if(result.control=='cancel2'){ + event.finish(); return; + } + player.logSkill('dcyuanmo'); + if(result.control=='选项一'){ + lib.skill.dcyuanmo.change(player,1); + var targetsx=game.filterPlayer(current=>player.inRange(current)); + if(targetsx.length<=targets.length){ + event.finish(); + } + else event.targets=targetsx.removeArray(targets); + } + else{ + lib.skill.dcyuanmo.change(player,-1); + player.draw(2); + event.finish(); + } + 'step 2' + player.chooseTarget('远谟:获得任意名本次进入你攻击范围的角色的一张牌',[1,targets.length],(card,player,target)=>{ + return _status.event.getParent().targets.contains(target)&&target.countGainableCards(player,'he')>0; + }).set('ai',target=>{ + var player=_status.event.player; + return get.effect(target,{name:'shunshou_copy2'},player,player); + }); + 'step 3' + if(result.bool){ + var targets=result.targets.sortBySeat(); + player.line(targets); + for(var target of targets){ + player.gainPlayerCard(target,'he',true); + } + } + }, + subSkill:{ + add:{ + audio:'dcyuanmo', + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + return !game.hasPlayer(current=>player.inRange(current)); + }, + prompt2:'令你的攻击范围+1', + check:()=>true, + content:function(){ + lib.skill.dcyuanmo.change(player,1); + }, + }, + range:{ + charlotte:true, + intro:{ + content:function(storage,player){ + var num=player.storage.dcyuanmo_range; + return '攻击范围'+(num>=0?'+':'')+num; + } + }, + mod:{ + attackRange:function(player,num){ + return num+player.countMark('dcyuanmo_range'); + }, + }, + } + }, + }, + //薛灵芸 + dcxialei:{ + audio:2, + trigger:{ + player:'loseAfter', + global:['cardsDiscardAfter','loseAsyncAfter','equipAfter'], + }, + filter:function(event,player){ + if(player.countMark('dcxialei_clear')>=3) return false; + if(event.name!='cardsDiscard'){ + return event.getd(player,'cards2').some(i=>get.color(i,player)=='red'); + } + else{ + if(!event.cards.filterInD('d').some(i=>get.color(i,player)=='red')) return false; + var evt=event.getParent(); + if(evt.name!='orderingDiscard') return false; + var evtx=(evt.relatedEvent||evt.getParent()); + if(evtx.player!=player) return false; + return player.hasHistory('lose',evtxx=>{ + return evtx==(evtxx.relatedEvent||evtxx.getParent())&&evtxx.cards2.length>0; + }); + } + }, + content:function(){ + 'step 0' + var cards=get.cards(3-player.countMark('dcxialei_clear')); + event.cards=cards; + game.cardsGotoOrdering(cards); + if(cards.length==1) event._result={bool:true,links:cards}; + else player.chooseButton(['霞泪:获得其中的一张牌',cards],true); + 'step 1' + if(result.bool){ + var card=result.links[0]; + player.gain(card,'gain2'); + event.cards.remove(card); + if(event.cards.length){ + player.chooseBool().set('createDialog',['是否将剩余牌置于牌堆底?',event.cards]).set('ai',()=>_status.event.bool).set('bool',function(){ + if(!player.hasSkill('dcanzhi')) return Math.random()<0.5; + if(player.hasSkill('dcanzhi_blocker')){ + var next=_status.currentPhase.getNext(); + var judges=next.getCards('j'); + var val=0; + if(judges.length&&!next.hasWuxie()){ + var att=get.attitude(player,next); + for(var i=0;;i++){ + var judge=judges[i]&&get.judge(judges[i]),card=event.cards[i]; + if(!judge||!card) break; + val+=judge(card)*att; + i++; + } + } + if(val>0) return false; + else if(val==0) return Math.random()<0.5; + return true; + } + var card=event.cards[0]; + if(get.color(card,player)=='red'&&player.isPhaseUsing()&&player.countCards('hs',card=>{ + return get.color(card)=='red'&&player.hasValueTarget(card)&&['basic','trick'].contains(get.type(card)); + })>0) return false; + if(get.color(card,player)=='black') return false; + return true; + }()); + } + else event.goto(3); + } else event.finish(); + 'step 2' + if(result.bool){ + player.popup('牌堆底'); + game.log(player,'将'+get.cnNumber(event.cards.length)+'张牌置于了牌堆底'); + } + else player.popup('牌堆顶'); + while(cards.length){ + var card=cards.pop(); + card.fix(); + if(result.bool) ui.cardPile.appendChild(card); + else ui.cardPile.insertBefore(card,ui.cardPile.firstChild); + } + game.updateRoundNumber(); + 'step 3' + player.addMark('dcxialei_clear',1,false); + player.addTempSkill('dcxialei_clear'); + }, + subSkill:{clear:{onremove:true}} + }, + dcanzhi:{ + enable:'phaseUse', + filter:function(event,player){ + return !player.hasSkill('dcanzhi_blocker'); + }, + group:'dcanzhi_damage', + content:function(){ + 'step 0' + player.judge(result=>{ + if(get.color(result)=='red') return _status.event.getParent().player.countMark('dcxialei_clear')/2; + return 2; + }).judge2=result=>result.bool; + 'step 1' + if(result.color=='red'){ + player.removeSkill('dcxialei_clear'); + event.finish(); + } + else if(result.color=='black'){ + player.addTempSkill('dcanzhi_blocker'); + player.chooseTarget('暗织:是否令一名非当前回合角色获得本回合进入弃牌堆的两张牌?',(card,player,target)=>{ + return target!=_status.currentPhase; + }).set('ai',target=>{ + return get.effect(target,{name:'wuzhong'},_status.event.player); + }); + } + else event.finish(); + 'step 2' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.line(target); + var cards=[]; + game.getGlobalHistory('cardMove',evt=>{ + if(evt.name=='lose'&&evt.position==ui.discardPile||evt.name=='cardsDiscard'){ + cards.addArray(evt.cards.filterInD('d')); + } + }); + if(cards.length){ + player.chooseButton(['暗织:选择令'+get.translation(target)+'获得的牌',cards],true,Math.min(cards.length,2)).set('ai',button=>{ + var player=_status.event.player,target=_status.event.getParent().target; + return get.sgnAttitude(player,target)*get.buttonValue(button); + }); + } + }else event.finish(); + 'step 3' + if(result.bool){ + target.gain(result.links,'gain2'); + } + }, + ai:{ + combo:'dcxialei', + order:function(item,player){ + if(player.countMark('dcxialei_clear')>=2) return 10; + if(player.hasHistory('useSkill',evt=>evt.skill=='dcxialei')&&get.color(ui.cardPile.firstChild,player)=='red'&&player.countMark('dcxialei_clear')>0) return 9; + return 1; + }, + result:{ + player:function(player){ + return 1; + } + } + }, + subSkill:{ + damage:{ + audio:'dcanzhi', + trigger:{player:'damageEnd'}, + filter:function(event,player){ + return !player.hasSkill('dcanzhi_blocker'); + }, + check:function(event,player){ + return game.hasPlayer(current=>{ + return get.attitude(player,current)>0&¤t!=_status.currentPhase; + }); + }, + prompt2:'你判定,若结果为红色,你重置〖霞泪〗的观看牌数;若结果为黑色,〖暗织〗于本回合失效,然后你可以令一名非当前回合角色获得本回合进入弃牌堆的两张牌。', + content:function(){ + event.setContent(lib.skill.dcanzhi.content); + event.goto(0); + } + }, + blocker:{charlotte:true} + } + }, + //十周年王允 + dclianji:{ + enable:'phaseUse', + audio:'wylianji', + usable:1, + check:function(card){ + return 5-get.value(card); + }, + filterTarget:function(card,player,target){ + return target!=player; + }, + filterCard:true, + content:function(){ + 'step 0' + var card=get.cardPile2(function(card){ + return get.subtype(card)=='equip1'&&targets[0].hasUseTarget(card); + }); + if(card){ + if(card.name=='qinggang'&&!lib.inpile.contains('qibaodao')){ + card.remove(); + card=game.createCard('qibaodao',card.suit,card.number); + } + targets[0].chooseUseTarget(card,true,'nopopup','nothrow'); + } + else{ + player.chat('没有装备牌了吗'); + game.log('但是牌堆里已经没有装备牌了!'); + } + 'step 1' + game.updateRoundNumber(); + targets[0].chooseToUse(get.translation(player)+'对你发动了【连计】', + {name:'sha'}).set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target==_status.event.source) return false; + return lib.filter.filterTarget.apply(this,arguments); + }).set('addCount',false).set('source',player).set('prompt2','对除'+get.translation(player)+'外的一名角色使用一张【杀】,并将装备区内的武器牌交给其中一名目标角色;或点击“取消”,令'+get.translation(player)+'视为对你使用一张【杀】,并获得你装备区内的武器牌'); + 'step 2' + var card=targets[0].getEquip(1); + if(result.bool){ + player.addSkill('dclianji_1'); + if(card&&result.targets.filter(target=>target.isIn()).length>0){ + event.card=card; + targets[0].chooseTarget(true,'将'+get.translation(card)+'交给一名目标角色',(card,player,target)=>{ + return _status.event.targets.contains(target); + }).set('ai',function(target){ + var card=_status.event.getParent().card; + return (target.hasSkillTag('nogain')?0:get.attitude(_status.event.player,target))*Math.max(0.1,target.getUseValue(card)); + }).set('targets',result.targets); + } else event.finish(); + } + else{ + player.addSkill('dclianji_2'); + event.goto(4); + } + 'step 3' + targets[0].give(card,result.targets[0],'give'); + event.finish(); + 'step 4' + player.useCard({name:'sha',isCard:true},targets[0],false); + 'step 5' + var card=targets[0].getEquip(1); + if(card) targets[0].give(card,player,'give'); + }, + ai:{ + order:4, + result:{ + target:function(player,target){ + if(game.countPlayer()==2) return -3; + if(!target.getEquip(1)){ + if(game.hasPlayer(function(current){ + return current!=target&&!current.hasSkillTag('nogain')&&get.attitude(current,target)>0; + })) return 3; + return -3; + } + if(!game.hasPlayer(function(current){ + return current!=target&&!current.hasSkillTag('nogain')&&get.attitude(current,target)>0; + })) return -6; + return 4-get.value(target.getEquip(1)); + }, + }, + }, + subSkill:{ + 1:{charlotte:true,onremove:true}, + 2:{charlotte:true,onremove:true}, + } + }, + dcmoucheng:{ + trigger:{player:'phaseZhunbeiBegin'}, + audio:'moucheng', + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'gray', + derivation:'xinjingong', + unique:true, + filter:function(event,player){ + return player.hasSkill('dclianji_1')&&player.hasSkill('dclianji_2'); + }, + content:function(){ + player.awakenSkill('dcmoucheng'); + player.removeSkill('dclianji'); + game.log(player,'失去了技能','#g【连计】'); + player.addSkillLog('xinjingong'); + }, + }, + //周宣 + dcwumei:{ + audio:2, + trigger:{player:'phaseBegin'}, + filter:function(event,player){ + return !player.hasSkill('dcwumei_used'); + }, + priority:10,//离谱的优先机制 + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('dcwumei')).set('ai',target=>{ + return get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcwumei',target); + player.addTempSkill('dcwumei_used','roundStart'); + target.insertPhase(); + target.addTempSkill('dcwumei_wake','phaseAfter'); + var targets=game.filterPlayer(); + if(!target.storage.dcwumei_wake) target.storage.dcwumei_wake=[[],[]]; + for(var targetx of targets){ + target.storage.dcwumei_wake[0].push(targetx); + target.storage.dcwumei_wake[1].push(targetx.hp); + } + target.markSkill('dcwumei_wake'); + if(!trigger._finished){ + trigger.finish(); + trigger.untrigger(true); + trigger._triggered=5; + var evt=player.insertPhase(); + delete evt.skill; + } + } + }, + subSkill:{ + used:{charlotte:true}, + wake:{ + trigger:{player:'phaseJieshuBegin'}, + charlotte:true, + popup:false, + forced:true, + onremove:true, + filter:function(event,player){ + return player.storage.dcwumei_wake&&player.storage.dcwumei_wake.length; + }, + content:function(){ + var storage=player.storage.dcwumei_wake; + for(var i=0;i'; + str+='
  • '+str2; + } + return str; + } + }, + ai:{ + effect:{ + player_use:function(card,player,target){ + if(get.tag(card,'damage')) return 0.5; + }, + target:function(card,player,target){ + if(_status.event.type!='phase') return; + if (get.tag(card,'recover')){ + return [1,1-target.hp]; + } + } + } + } + } + } + }, + dczhanmeng:{ + audio:2, + trigger:{player:'useCard'}, + filter:function(event,player){ + return !player.hasSkill('dczhanmeng_choice1')||!player.hasSkill('dczhanmeng_choice2')|| + !player.hasSkill('dczhanmeng_choice0')&&!game.hasPlayer2(current=>{ + var history=current.actionHistory; + if(history.length<2) return false; + var list=history[history.length-2].useCard.map(evt=>evt.card.name); + if(list.contains(event.card.name)) return true; + return false; + }); + }, + direct:true, + content:function(){ + 'step 0' + var list=[]; + var choiceList=[ + '上回合若没有同名牌被使用过,你获得一张非伤害牌', + '下回合当同名牌首次被使用后,你获得一张伤害牌', + '令一名其他角色弃置两张牌,若点数之和大于10,你对其造成1点火焰伤害' + ]; + var used=game.hasPlayer2(current=>{ + var history=current.actionHistory; + if(history.length<2) return false; + var list=history[history.length-2].useCard.map(evt=>evt.card.name); + if(list.contains(trigger.card.name)) return true; + return false; + }); + if(!player.hasSkill('dczhanmeng_choice0')&&!used) list.push('选项一'); + else choiceList[0]=''+choiceList[0]+(used?'(同名牌被使用过)':'(已选择)')+''; + if(!player.hasSkill('dczhanmeng_choice1')) list.push('选项二'); + else choiceList[1]=''+choiceList[1]+'(已选择)'; + if(!player.hasSkill('dczhanmeng_choice2')) list.push('选项三'); + else choiceList[2]=''+choiceList[2]+'(已选择)'; + list.push('cancel2'); + player.chooseControl(list).set('prompt',get.prompt('dczhanmeng')).set('ai',()=>{ + var choices=_status.event.controls.slice().remove('cancel2'); + var player=_status.event.player,evt=_status.event.getTrigger(); + if(!game.hasPlayer(current=>get.attitude(player,current)<0)) choices.remove('选项三'); + else if(choices.contains('选项三')) return '选项三'; + if(choices.contains('选项二')){ + if(evt.card.name=='sha') return '选项二'; + if(get.type(evt.card,null,false)=='equip') choices.remove('选项二'); + } + if(!choices.length) return 'cancel2'; + return choices.randomGet(); + }).set('choiceList',choiceList); + 'step 1' + if(result.control=='cancel2'){event.finish();return;} + if(result.control=='选项一'){ + player.logSkill('dczhanmeng'); + game.log(player,'选择了','#y'+result.control); + player.addTempSkill('dczhanmeng_choice0'); + var card=get.cardPile2(card=>{ + return !get.tag(card,'damage'); + }); + if(card) player.gain(card,'gain2'); + event.finish(); + } + else if(result.control=='选项二'){ + player.logSkill('dczhanmeng'); + game.log(player,'选择了','#y'+result.control); + player.addTempSkill('dczhanmeng_choice1'); + trigger['dczhanmeng_'+player.playerid]=true; + player.addSkill('dczhanmeng_delay'); + event.finish(); + } + else{ + player.addTempSkill('dczhanmeng_choice2'); + player.chooseTarget('占梦:令一名其他角色弃置两张牌',lib.filter.notMe,true).set('ai',target=>{ + var player=_status.event.player; + var eff1=get.effect(target,{name:'guohe_copy2'},player,player)+0.1; + var eff2=get.damageEffect(target,player,player,'fire')+0.1; + if(eff1<0&&eff2<0) return -eff1*eff2; + return eff1*eff2; + }); + } + 'step 2' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('dczhanmeng',target); + game.log(player,'选择了','#y选项三'); + target.chooseToDiscard(2,'he',true); + } else event.finish(); + 'step 3' + if(result.bool){ + var cards=result.cards; + var num=0; + for(var card of cards){ + num+=get.number(card,false); + } + if(num>10){ + player.line(target,'fire'); + target.damage('fire'); + } + } + }, + ai:{threaten:8}, + subSkill:{ + delay:{ + trigger:{global:['useCardAfter','phaseBeginStart']}, + charlotte:true, + forced:true, + popup:false, + filter:function(event,player,name){ + var history=player.actionHistory; + if(history.length<2) return false; + var list=history[history.length-2].useCard; + if(name=='phaseBeginStart'){ + return !list.some(evt=>evt['dczhanmeng_'+player.playerid]); + } + for(var evt of list){ + if(evt['dczhanmeng_'+player.playerid]&&event.card.name==evt.card.name&&game.getGlobalHistory('useCard',evtx=>{ + return evtx.card.name==event.card.name; + }).indexOf(event)==0) return true; + } + return false; + }, + content:function(){ + if(event.triggername!='phaseBeginStart'){ + player.logSkill('dczhanmeng_delay'); + var card=get.cardPile2(card=>{ + return get.tag(card,'damage'); + }); + if(card) player.gain(card,'gain2'); + } + else player.removeSkill('dczhanmeng_delay'); + } + }, + choice0:{charlotte:true}, + choice1:{charlotte:true}, + choice2:{charlotte:true}, + } + }, + //程秉 + dcjingzao:{ + audio:2, + enable:'phaseUse', + filter:function(event,player) { + return !player.hasSkill('dcjingzao_ban')&&game.hasPlayer(current=>lib.skill.dcjingzao.filterTarget(null,player,current)); + }, + filterTarget:function(card,player,target){ + return player!=target&&!target.hasSkill('dcjingzao_temp'); + }, + content:function(){ + 'step 0' + target.addTempSkill('dcjingzao_temp'); + var cards=game.cardsGotoOrdering(get.cards(3+player.countMark('dcjingzao_add'))).cards; + event.cards=cards; + game.log(player,'亮出了',event.cards); + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,target,id,cards){ + var str=get.translation(player)+'对'+(target==game.me?'你':get.translation(target))+'发动了【经造】'; + var dialog=ui.create.dialog(str,cards); + dialog.videoId=id; + },player,target,event.videoId,event.cards); + game.addVideo('showCards',player,[get.translation(player)+'发动了【经造】',get.cardsInfo(event.cards)]); + game.delay(cards.length-1); + 'step 1' + target.chooseToDiscard('he').set('prompt',false).set('filterCard',card=>{ + var names=_status.event.getParent().cards.map(i=>i.name); + return names.contains(get.name(card)); + }).set('ai',card=>{ + var target=_status.event.player,player=_status.event.getParent().player; + var att=get.attitude(target,player),val=get.value(card); + if(!lib.skill.dcjingzao.filter(null,player)){ + if(att>0) return 0; + return 6-val; + } + else{ + if(att>0) return 4-val; + return 0; + } + }); + var update=function(id,source){ + var dialog=get.idDialog(id); + if(dialog){ + var div=ui.create.div('',dialog.content,1); + var name=get.translation(source); + div.innerHTML='弃置一张满足条件的牌,然后'+name+'〖经造〗本回合亮出牌数+1;或点“取消”令'+name+'随机获得每种牌名的牌各一张,且〖经造〗本回合失效'; + ui.update(); + } + }; + if(target==game.me) update(event.videoId,player); + else if(target.isOnline()) target.send(update,event.videoId,player); + 'step 2' + game.broadcastAll('closeDialog',event.videoId); + if(result.bool){ + player.addTempSkill('dcjingzao_add'); + player.addMark('dcjingzao_add',1,false); + } + else{ + var cards=cards.randomSort(),cards2=[]; + for(var card of cards){ + if(!cards2.map(i=>i.name).contains(card.name)) cards2.push(card); + } + if(cards2.length) player.gain(cards2,'gain2'); + player.addTempSkill('dcjingzao_ban'); + } + }, + ai:{ + order:7, + result:{ + player:1, + } + }, + subSkill:{ + add:{charlotte:true,onremove:true}, + ban:{charlotte:true}, + temp:{charlotte:true} + } + }, + dcenyu:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + forced:true, + filter:function(event,player){ + return event.player!=player&&game.hasPlayer2(current=>{ + return current.hasHistory('useCard',evt=>{ + return evt.card.name==event.card.name&&evt!=event.getParent()&&evt.targets&&evt.targets.contains(player); + }); + }); + }, + content:function(){ + trigger.getParent().excluded.add(player); + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(player==target) return; + if(game.hasPlayer2(current=>{ + return current.hasHistory('useCard',evt=>evt.card.name==card.name&&evt.targets&&evt.targets.contains(player)); + })) return 'zerotarget'; + } + } + } + }, + //董贵人 + dclianzhi:{ + audio:2, + trigger:{player:'dying'}, + usable:1, + forced:true, + locked:false, + derivation:'dcshouze', + group:['dclianzhi_connect','dclianzhi_reproach'], + filter:function(event,player){ + return player.getStorage('dclianzhi').filter(i=>i&&i.isIn()).length; + }, + content:function(){ + player.recover(); + game.asyncDraw([player].concat(player.getStorage('dclianzhi').filter(i=>i&&i.isIn())).sortBySeat()); + }, + ai:{ + threaten:0.6, + }, + subSkill:{ + connect:{ + audio:'dclianzhi', + trigger:{ + player:'enterGame', + global:'phaseBefore', + }, + forced:true, + direct:true, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0); + }, + content:function(){ + 'step 0' + player.chooseTarget('连枝:请选择一名其他角色',lib.translate.dclianzhi_info,true,(card,player,target)=>{ + return target!=player&&!player.getStorage('dclianzhi').contains(target); + }).set('ai',target=>{ + var att=get.attitude(_status.event.player,target); + if(att>0) return att+1; + if(att==0) return Math.random(); + return att; + }).set('animate',false); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dclianzhi'); + player.markAuto('dclianzhi',[target]); + } + }, + }, + reproach:{ + audio:'dclianzhi', + trigger:{global:'dieAfter'}, + filter:function(event,player){ + return player.getStorage('dclianzhi').contains(event.player); + }, + direct:true, + content:function(){ + 'step 0' + var num=Math.max(1,player.countMark('dclingfang')); + player.chooseTarget(get.prompt('dclianzhi'),'选择一名其他角色,你与其各获得〖受责〗,且其获得'+num+'枚“绞”标记',(card,player,target)=>{ + return target!=player; + }).set('ai',target=>-get.attitude(_status.event.player,target)); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dclianzhi_reproach',target); + player.addSkillLog('dcshouze'); + target.addSkillLog('dcshouze'); + target.addMark('dclingfang',Math.max(1,player.countMark('dclingfang'))); + } + }, + } + } + }, + dclingfang:{ + audio:2, + trigger:{ + player:'phaseZhunbeiBegin', + global:'useCardAfter', + }, + forced:true, + filter:function(event,player){ + if(event.name!='useCard') return true; + if(get.color(event.card)!='black') return false; + if(event.player==player) return !event.targets||!event.targets.contains(player); + return event.targets&&event.targets.contains(player); + }, + content:function(){ + player.addMark('dclingfang',1); + }, + marktext:'绞', + intro:{ + name:'绞', + name2:'绞', + content:'mark' + } + }, + dcfengying:{ + audio:2, + enable:'chooseToUse', + group:'dcfengying_record', + locked:false, + filter:function(event,player){ + return player.storage.dcfengying&&player.storage.dcfengying.length&&player.storage.dcfengying.filter(name=>{ + return event.filterCard({name:name},player,event); + }).length&&!player.hasSkill('dcfengying_used'); + }, + hiddenCard:function(player,name){ + var list=player.getStorage('dcfengying'); + if(player.getStorage('dcfengying_used').contains(name)) return false; + return list.contains(name)&&player.hasCard((card)=>(get.number(card)<=player.countMark('dclingfang')),'hs'); + }, + chooseButton:{ + dialog:function(event,player){ + var list=[]; + for(var name of player.storage.dcfengying){ + if(get.type(name)=='basic') list.push(['基本','',name]); + if(get.type(name)=='trick') list.push(['锦囊','',name]); + } + return ui.create.dialog('风影',[list,'vcard']); + }, + filter:function(button,player){ + var card={name:button.link[2],storage:{dcfengying:true}}; + if(player.getStorage('dcfengying_used').contains(card.name)) return false; + return _status.event.getParent().filterCard(card,player,_status.event.getParent()); + }, + check:function(button){ + var player=_status.event.player; + if(player.countCards('hs',button.link[2])>0) return 0; + if(button.link[2]=='wugu') return; + var effect=player.getUseValue(button.link[2]); + if(effect>0) return effect; + return 0; + }, + backup:function(links,player){ + return { + filterCard:function(card,player,event){ + return get.number(card)<=player.countMark('dclingfang'); + }, + audio:'dcfengying', + selectCard:1, + popname:true, + check:function(card){ + return 6-get.value(card)+get.number(card)/15; + }, + position:'hs', + viewAs:{ + name:links[0][2], + storage:{dcfengying:true}, + }, + precontent:function(){ + player.logSkill('dcfengying'); + player.addTempSkill('dcfengying_used'); + player.markAuto('dcfengying_used',[event.result.card.name]); + event.getParent().addCount=false; + delete event.result.skill; + } + } + }, + prompt:function(links,player){ + return '将一张点数不大于'+get.strNumber(player.countMark('dclingfang'))+'的手牌当做'+get.translation(links[0][2])+'使用(无距离和次数限制)'; + } + }, + mod:{ + targetInRange:function(card){ + if(card.storage&&card.storage.dcfengying) return true; + }, + cardUsable:function(card,player){ + if(card.storage&&card.storage.dcfengying) return Infinity; + }, + }, + ai:{ + order:4, + result:{ + player:function(player){ + if(_status.event.dying) return get.attitude(player,_status.event.dying); + return 1; + } + }, + threaten:2, + }, + subSkill:{ + record:{ + trigger:{global:'phaseBegin'}, + filter:function(event,player){ + return ui.discardPile.childNodes.length>0; + }, + forced:true, + popup:false, + content:function(){ + player.storage.dcfengying=[]; + for(var i=0;i{ + return lib.inpile.indexOf(a)-lib.inpile.indexOf(b); + }); + } + }, + used:{ + charlotte:true, + onremove:true, + intro:{ + content:'已使用过$', + }, + }, + } + }, + dcshouze:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + return player.countMark('dclingfang')>0; + }, + content:function(){ + 'step 0' + player.removeMark('dclingfang',1); + 'step 1' + var card=get.discardPile(card=>get.color(card,false)=='black'); + if(card) player.gain(card,'gain2'); + player.loseHp(); + } + }, + //袁姬 + dcmengchi:{ + audio:'dcfangdu', + trigger:{player:['linkBefore','damageEnd']}, + forced:true, + filter:function(event,player){ + var num=player.getStat('gain'); + if(num&&num>0) return false; + if(event.name=='link') return !player.isLinked(); + return !event.nature; + }, + content:function(){ + if(trigger.name=='link') trigger.cancel(); + else player.recover(); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(player.hasSkillTag('jueqing',false,target)) return; + if(target.getStat('gain')) return; + if(get.tag(card,'natureDamage')) return; + if(target.hp==1) return 0.75; + if(card.name=='sha'&&!player.hasSkill('jiu')||target.hasSkillTag('filterDamage',null,{ + player:player, + card:card, + })) return [1,Math.min(1.5,0.75+0.25*target.hp)]; + }, + }, + }, + mod:{ + cardEnabled:function(card,player){ + if(!player.getStat('gain')) return false; + }, + cardSavable:function(card,player){ + if(!player.getStat('gain')) return false; + }, + }, + }, + dcfangdu:{ + audio:2, + trigger:{ + player:'damageEnd', + }, + forced:true, + filter:function(event,player){ + if(player==_status.currentPhase) return false; + return !event.nature&&!player.hasHistory('damage',evt=>{ + return !evt.nature&&evt!=event; + },event)||event.nature&&!player.hasHistory('damage',evt=>{ + return evt.nature&&evt!=event; + },event)&&event.source&&event.source.isIn()&&event.source.countGainableCards(player,'h'); + }, + content:function(){ + 'step 0' + if(!trigger.nature){ + player.recover(); + } + else{ + var cards=trigger.source.getGainableCards(player,'h'); + if(cards.length){ + player.gain(cards.randomGet(),trigger.source,'giveAuto','bySelf'); + } + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(!get.tag(card,'damage')) return; + if(player.hasSkillTag('jueqing',false,target)) return; + if(target==_status.currentPhase) return; + if(player._dcfangdu_aiChecking) return; + if(_status.event.getParent('useCard',true)||_status.event.getParent('_wuxie',true)) return; + if(!get.tag(card,'natureDamage')){ + if(target.hasHistory('damage',evt=>!evt.nature)){ + return [1,-2]; + } + else{ + if(get.attitude(player,target)>0){ + if(target.hasSkill('dcjiexing')) return [0,0.2]; + } + if(get.attitude(player,target)<0&&!player.hasSkillTag('damageBonus')){ + var sha=player.getCardUsable({name:'sha'}); + player._dcfangdu_aiChecking=true; + var num=player.countCards('h',function(card){ + if(get.name(card)=='sha'){ + if(sha==0){ + return false; + } + else{ + sha--; + } + } + return player.canUse(card,target)&&get.effect(target,card,player,player)>0; + }); + delete player._dcfangdu_aiChecking; + if(player.hasSkillTag('damage')){ + num++; + } + if(num<2){ + return [0,0.8]; + } + } + } + } + if(!target.hasHistory('damage',evt=>evt.nature)&&player.countCards('h')>1&&get.tag(card,'natureDamage')) return [1,1]; + } + } + } + }, + dcjiexing:{ + audio:2, + trigger:{player:['recoverEnd','damageEnd','loseHpEnd']}, + check:function(event,player){ + var current=_status.currentPhase; + if(!player.hasSkill('dcmengchi')||get.attitude(player,current)>=0) return true; + var num=player.getStat('gain'); + if(num&&num>0) return true; + if(current.countCards('hs',card=>current.canUse(card,player)&&get.effect(player,card,current,player)<0)>=2) return false; + return true; + }, + content:function(){ + player.draw().gaintag=['dcjiexing']; + player.addTempSkill('dcjiexing_add'); + }, + subSkill:{ + add:{ + charlotte:true, + mod:{ + ignoredHandcard:function(card,player){ + if(card.hasGaintag('dcjiexing')) return true; + }, + cardDiscardable:function(card,player,name){ + if(name=='phaseDiscard'&&card.hasGaintag('dcjiexing')) return false; + }, + }, + onremove:function(player){ + player.removeGaintag('dcjiexing'); + }, + } + } + }, + //朱建平 + olddcxiangmian:{ + audio:'dcxiangmian', + trigger:{global:'phaseJieshuBegin'}, + filter:function(event,player){ + return !player.getStorage('olddcxiangmian').contains(event.player)&&player!=event.player; + }, + logTarget:'player', + check:function(event,player){ + return get.attitude(player,event.player)<0; + }, + content:function(){ + 'step 0' + player.judge(card=>2/Math.sqrt(get.number(card,false))).set('judge2',result=>result.bool); + 'step 1' + player.markAuto('olddcxiangmian',[trigger.player]); + trigger.player.addSkill('olddcxiangmian_countdown'); + if (!trigger.player.storage['olddcxiangmian_countdown']) trigger.player.storage['olddcxiangmian_countdown'] = []; + [player.playerid, result.suit, result.number].forEach(i => trigger.player.storage['olddcxiangmian_countdown'].push(i)); + trigger.player.markSkill('olddcxiangmian_countdown'); + }, + intro:{content:'已对$发动过技能'}, + ai:{ + expose:0.3, + }, + subSkill:{ + countdown:{ + trigger:{player:'useCardAfter'}, + mark:true, + marktext:'💀', + silent:true, + forced:true, + charlotte:true, + intro:{ + markcount:function(storage){ + if(storage){ + var list=storage.filter((_,i)=>i%3==2); + return Math.min.apply(null,list); + } + }, + content:function(storage,player){ + var str='使用' + for(var i=0;ii%3==1)).contains(get.suit(event.card,player)); + }, + content:function(){ + 'step 0' + var storage=player.getStorage('olddcxiangmian_countdown'); + for(var i=0;i0) player.loseHp(player.hp); + i--; + } + } + }, + ai:{ + effect:{ + player_use:function(card,player,target){ + if(typeof card!='object') return; + var storage=player.getStorage('olddcxiangmian_countdown'); + for(var i=0;ilib.skill.dcxiangmian.filterTarget(null,player,current)); + }, + filterTarget:function(card,player,target){ + return !player.getStorage('dcxiangmian').contains(target)&&player!=target; + }, + content:function(){ + 'step 0' + target.judge(card=>-2/Math.sqrt(get.number(card,false))).set('judge2',result=>result.bool===false?true:false); + 'step 1' + player.markAuto('dcxiangmian',[target]); + target.addSkill('dcxiangmian_countdown'); + if (!target.storage['dcxiangmian_countdown']) target.storage['dcxiangmian_countdown']=[]; + [player.playerid,result.suit,result.number].forEach(i=>target.storage['dcxiangmian_countdown'].push(i)); + target.markSkill('dcxiangmian_countdown'); + }, + intro:{content:'已对$发动过技能'}, + ai:{ + expose:0.3, + order:10, + result:{target:-5} + }, + subSkill:{ + countdown:{ + trigger:{player:'useCardAfter'}, + mark:true, + marktext:'💀', + silent:true, + forced:true, + charlotte:true, + intro:{ + markcount:function(storage){ + if(storage){ + var list=storage.filter((_,i)=>i%3==2); + return Math.min.apply(null,list); + } + }, + content:function(storage,player){ + if(!storage) return; + var str='使用'; + str+=get.cnNumber(Math.min.apply(null,storage.filter((_,i)=>i%3==2)))+'张牌后,或使用一张'; + for(var i=0;ii%3==1)).contains(get.suit(event.card,player)); + return true; + }, + content:function(){ + 'step 0' + var storage=player.getStorage('dcxiangmian_countdown'); + for(var i=0;i0) player.loseHp(player.hp); + i--; + } + } + }, + ai:{ + effect:{ + player_use:function(card,player,target){ + if(typeof card!='object') return; + var storage=player.getStorage('dcxiangmian_countdown'); + for(var i=0;i{ + if(get[fn](card,player)==get[fn](cardxx,player)&&!cards.contains(cardxx)){ + return true; + } + }); + if(cardx) cards.push(cardx); + } + /*if(cards.length&&!player.isMaxHandcard(true)) player.draw(); + else*/ if(cards.length) player.gain(cards,'gain2') + } + }, + //赵直 + dctongguan:{ + trigger:{ + global:'phaseBegin', + }, + filter:function(event,player){ + return event.player.phaseNumber==1&&lib.skill.dctongguan.derivation.some(i=>{ + return (player.getStorage('dctongguan')[i]||0)<2; + }); + }, + forced:true, + locked:false, + logTarget:'player', + derivation:['dctongguan_wuyong','dctongguan_gangying','dctongguan_duomou','dctongguan_guojue','dctongguan_renzhi'], + content:function(){ + 'step 0' + var skills=lib.skill.dctongguan.derivation.slice(); + player.chooseControl(skills.filter(i=>{ + return (player.getStorage('dctongguan')[i]||0)<2; + })).set('choiceList',skills.map(i=>{ + var info=''; + switch (player.getStorage('dctongguan')[i]){ + case 1: + info=' style="opacity:0.65;"'; + break; + case 2: + info=' style="text-decoration:line-through; opacity:0.3;"'; + break; + } + return '
    「'+get.translation(lib.translate[i+'_ab']||get.translation(i).slice(0,2))+'」
    ' + + ''+get.skillInfoTranslation(i,player)+'(已选过'+get.cnNumber(player.getStorage('dctongguan')[i]||0)+'次)'+''; + })).set('displayIndex',false).set('prompt','统观:为'+get.translation(trigger.player)+'选择一个属性').set('ai',function(){ + var controls=_status.event.controls,target=_status.event.getTrigger().player; + var str=target.getSkills(null,false,false).map(i=>get.skillInfoTranslation(i)).join(''); + var choices=[]; + if(controls.contains('dctongguan_wuyong')&&/你对\S{1,15}造成\S{1,10}伤害/.test(str)) choices.push('dctongguan_wuyong'); + if(controls.contains('dctongguan_gangying')&&/回复\S{1,5}体力/.test(str)&&_status.event.player.getFriends().length) choices.push('dctongguan_gangying'); + if(controls.contains('dctongguan_duomou')&&/你(可|可以)?摸\S{1,3}张牌/.test(str)) choices.push('dctongguan_duomou'); + if(controls.contains('dctongguan_guojue')&&/(当【过河拆桥】使用|((弃置|获得)\S{1,5}其他角色\S{1,7}牌|))/.test(str)) choices.push('dctongguan_guojue'); + if(controls.contains('dctongguan_renzhi')&&/交给\S{0,5}其他角色/.test(str)&&_status.event.player.getFriends().length) choices.push('dctongguan_renzhi'); + if(choices.length) return choices.randomGet(); + return _status.event.controls.randomGet(); + }); + 'step 1' + if(result.control){ + var skill=result.control; + var func=lib.skill.dctongguan.localMark; + if(event.player==game.me) func(skill,trigger.player) + else if(event.isOnline()) player.send(func,skill,trigger.player) + // game.log(player,'为',trigger.player,'选择了','#g「'+get.translation(skill)+'」','属性'); + game.log(player,'为',trigger.player,'选择了','#g一个属性'); + // player.popup(skill); + trigger.player.addSkill(skill); + if(!player.storage.dctongguan) player.storage.dctongguan={}; + if(!player.storage.dctongguan[skill]) player.storage.dctongguan[skill]=0; + player.storage.dctongguan[skill]++; + } + }, + localMark:function(skill,player){ + var name=skill,info; + if(player.marks[name]) player.updateMarks(); + if(lib.skill[name]) info=lib.skill[name].intro; + if(!info) return; + if(player.marks[name]) player.marks[name].info=info; + else player.marks[name]=player.mark(name,info); + player.updateMarks(); + }, + subSkill:{ + forceFinish:{charlotte:true}, + wuyong:{ + marktext:'勇', + intro:{ + name:'武勇', + content:'属性目标:造成伤害', + }, + charlotte:true, + silent:true, + nopop:true, + }, + gangying:{ + marktext:'刚', + intro:{ + name:'刚硬', + content:'属性目标:回复体力,或于获得牌后手牌数大于体力值', + }, + charlotte:true, + silent:true, + forced:true, + nopop:true, + lastDo:true, + trigger:{player:'gainEnd'}, + filter:function(event,player){ + return player.countCards('h')>player.hp; + }, + content:function(){ + trigger._dctongguan_gangying=true; + }, + }, + duomou:{ + marktext:'谋', + intro:{ + name:'多谋', + content:'属性目标:于摸牌阶段外摸牌', + }, + charlotte:true, + silent:true, + nopop:true, + }, + guojue:{ + marktext:'决', + intro:{ + name:'果决', + content:'属性目标:弃置或获得其他角色牌', + }, + charlotte:true, + silent:true, + nopop:true, + }, + renzhi:{ + marktext:'仁', + intro:{ + name:'仁智', + content:'属性目标:交给其他角色牌', + }, + charlotte:true, + silent:true, + nopop:true, + }, + } + }, + dcmengjie:{ + trigger:{ + global:'phaseEnd', + }, + forced:true, + direct:true, + locked:false, + filter:function(event,player){ + var target=event.player; + if((target.hasSkill('dctongguan_gangying')&&(target.hasHistory('gain',function(evt){ + return evt._dctongguan_gangying==true; + })||game.getGlobalHistory('changeHp',function(evt){ + return evt.player==target&&(evt.getParent().name=='recover'||target.countCards('h')>target.hp); + }).length>0)) || + target.hasSkill('dctongguan_wuyong')&&target.getHistory('sourceDamage').length || + target.hasSkill('dctongguan_duomou')&&target.getHistory('gain',evt=>evt.getParent().name=='draw'&&evt.getParent('phaseDraw').name!='phaseDraw').length){ + return true; + } + var guojue=false,renzhi=false; + game.countPlayer2(current=>{ + if(current==target) return false; + if(!guojue&¤t.hasHistory('lose',evt=>{ + if(evt.type=='discard'){ + if((evt.discarder||evt.getParent(2).player)!=target) return false; + if(!evt.getl(current).cards2.length) return false; + return true; + } + else if(evt.type=='gain'){ + var evtx=evt.getParent(); + if(evtx.giver||evtx.getParent().name=='_yongjian_zengyu') return false; + var cards=evtx.getg(target); + if(!cards.length) return false; + var cards2=evtx.getl(current).cards2; + for(var card of cards2){ + if(cards.contains(card)) return true; + } + } + return false; + })) guojue=true; + if(!renzhi&¤t.hasHistory('gain',evt=>{ + if(evt.giver!=target||evt.getParent().name=='_yongjian_zengyu') return false; + return evt.cards.length; + })) renzhi=true; + }); + return target.hasSkill('dctongguan_guojue')&&guojue||target.hasSkill('dctongguan_renzhi')&&renzhi; + }, + rules:[ + (target)=>target.getHistory('sourceDamage').length, + (target)=>target.hasHistory('gain',function(evt){ + return evt._dctongguan_gangying; + })||game.getGlobalHistory('changeHp',function(evt){ + return evt.player==target&&evt.getParent().name=='recover'; + }).length>0||target.countCards('h')>target.hp, + (target)=>target.getHistory('gain',evt=>evt.getParent().name=='draw'&&evt.getParent('phaseDraw').name!='phaseDraw').length, + (target,bool)=>bool, + (target,bool)=>bool + ], + content:function(){ + 'step 0' + event.nowProperty=0; + var target=trigger.player; + var guojue=false,renzhi=false; + game.countPlayer2(current=>{ + if(current==target) return false; + if(!guojue&¤t.hasHistory('lose',evt=>{ + if(evt.type=='discard'){ + if((evt.discarder||evt.getParent(2).player)!=target) return false; + if(!evt.getl(current).cards2.length) return false; + return true; + } + else if(evt.type=='gain'){ + var evtx=evt.getParent(); + if(evtx.giver||evtx.getParent().name=='_yongjian_zengyu') return false; + var cards=evtx.getg(target); + if(!cards.length) return false; + var cards2=evtx.getl(current).cards2; + for(var card of cards2){ + if(cards.contains(card)) return true; + } + } + return false; + })) guojue=true; + if(!renzhi&¤t.hasHistory('gain',evt=>{ + if(evt.giver!=target||evt.getParent().name=='_yongjian_zengyu') return false; + return evt.cards.length; + })) renzhi=true; + }); + event.guojue=guojue; event.renzhi=renzhi; + 'step 1' + if(event.nowProperty>=5){ + event.finish(); + return; + } + var skills=lib.skill.dctongguan.derivation; + if(trigger.player.hasSkill(skills[event.nowProperty])&&lib.skill.dcmengjie.rules[event.nowProperty](trigger.player,event[event.nowProperty==3?'guojue':'renzhi'])){ + event.goto(2+event.nowProperty*2); + } else event.redo(); + event.nowProperty++; + 'step 2' + player.chooseTarget('梦解:对一名其他角色造成1点伤害',true,lib.filter.notMe).set('ai',target=>get.damageEffect(target,player,player)); + 'step 3' + if(result.bool){ + player.logSkill('dcmengjie',result.targets[0]); + result.targets[0].damage(); + } + game.delayx(); + event.goto(1); + 'step 4' + if(game.hasPlayer(target=>target!=player&&target.isDamaged())) player.chooseTarget('梦解:令一名角色回复1点体力',function(card,player,target){ + return target.isDamaged(); + }).set('ai',target=>get.recoverEffect(target,player,player)); + else event._result={bool:false}; + 'step 5' + if(result.bool){ + player.logSkill('dcmengjie',result.targets[0]); + result.targets[0].recover(); + } + game.delayx(); + event.goto(1); + 'step 6' + player.logSkill('dcmengjie'); + player.draw(2); + 'step 7' + game.delayx(); + event.goto(1); + 'step 8' + if(game.hasPlayer(target=>target.countDiscardableCards(player,'hej'))) player.chooseTarget('梦解:弃置一名角色区域内至多两张牌',true,(card,player,target)=>{ + return target.countDiscardableCards(player,'hej'); + }).set('ai',target=>get.effect(target,{name:'guohe'},player,player)); + else event._result={bool:false}; + 'step 9' + if(result.bool){ + player.logSkill('dcmengjie',result.targets[0]); + player.discardPlayerCard(result.targets[0],true,'hej',[1,2]); + } + game.delayx(); + event.goto(1); + 'step 10' + player.chooseTarget('梦解:令一名其他角色将手牌补至上限',true,(card,player,target)=>{ + return target!=player; + }).set('ai',target=>{ + var att=get.attitude(_status.event.player,target); + if(target.hasSkillTag('nogain')) att/=6; + if(att>2){ + return Math.min(5,target.maxHp)-target.countCards('h'); + } + return att/3; + }); + 'step 11' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcmengjie',target); + var num=Math.min(5,target.maxHp-target.countCards('h')); + target.draw(num); + } + game.delayx(); + event.goto(1); + } + }, + //刘晔 + dcpoyuan:{ + audio:2, + trigger:{ + global:'phaseBefore', + player:['phaseZhunbeiBegin','enterGame'], + }, + filter:function(event,player){ + if(event.name=='phase'&&game.phaseNumber>0) return false; + if(player.getEquip('pilitoushiche')){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countDiscardableCards(player,'he')>0; + }); + } + else{ + return !player.isDisabled(5); + } + }, + direct:true, + content:function(){ + 'step 0' + if(player.getEquip('pilitoushiche')){ + event.goto(2); + player.chooseTarget(get.prompt('dcpoyuan'),'弃置一名其他角色的至多两张牌',function(card,player,target){ + return target!=player&&target.countDiscardableCards(player,'he')>0; + }).set('ai',function(target){ + var player=_status.event.player,cards=target.getDiscardableCards(player,'he'); + var att=get.attitude(player,target); + if(att<0&&target.hasSkillTag('noe')) att/=2; + var zheng=[],fu=[]; + for(var i of cards){ + var val=get.value(i,target); + if(val>0) zheng.push(i); + else fu.push(i); + } + zheng.sort((a,b)=>get.value(b,target)-get.value(a,target)); + fu.sort((a,b)=>get.value(b,target)-get.value(a,target)); + zheng=zheng.slice(0,2); + fu=fu.slice(0,2); + var eff1=0,eff2=0; + for(var i of zheng) eff1+=get.value(i,target); + for(var i of fu){ + if(get.position(i)=='e') eff2+=(1-get.value(i,target)); + } + return -att*Math.max(eff1,eff2); + }); + } + else{ + player.chooseBool(get.prompt('dcpoyuan'),'装备一张【霹雳投石车】').set('ai',function(){ + return true; + }) + } + 'step 1' + if(result.bool){ + player.logSkill('dcpoyuan'); + var card=game.createCard('pilitoushiche','diamond',9); + player.$gain2(card); + game.delayx(); + player.equip(card); + } + event.finish(); + 'step 2' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcpoyuan',target); + player.discardPlayerCard(target,true,'he',[1,2]) + } + }, + }, + dchuace:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return event.dchuace&&event.dchuace.length>0&&player.countCards('hs')>0; + }, + onChooseToUse:function(event){ + if(game.online||event.dchuace) return; + var list=lib.inpile.filter(function(i){ + return get.type(i)=='trick'&&lib.filter.filterCard({name:i},event.player,event); + }); + if(!list.length){ + event.set('dchuace',list); + return; + } + var history=_status.globalHistory; + var stop=false; + for(var i=history.length-1;i>=0;i--){ + var evt=history[i]; + if(!stop){ + if(evt.isRound) stop=true; + continue; + } + else{ + for(var j of evt.useCard) list.remove(j.card.name); + if(evt.isRound) break; + } + } + event.set('dchuace',list); + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('画策',[event.dchuace,'vcard'],'hidden'); + }, + check:function(button){ + var player=_status.event.player,card={name:button.link[2]}; + return player.getUseValue(card); + }, + backup:function(links,player){ + return { + audio:'dchuace', + viewAs:{name:links[0][2]}, + ai1:(card)=>7-get.value(card), + filterCard:true, + position:'hs', + popname:true, + } + }, + prompt:function(links,player){ + return '将一张手牌当做【'+get.translation(links[0][2])+'】使用'; + }, + }, + ai:{ + order:6, + result:{player:1}, + }, + subSkill:{backup:{}}, + }, + pilitoushiche:{ + trigger:{player:['useCard','respond']}, + forced:true, + equipSkill:true, + filter:function(event,player){ + return get.type(event.card)=='basic'; + }, + content:function(){ + if(player==_status.currentPhase) trigger.baseDamage++; + else player.draw(); + }, + mod:{ + targetInRange:function(card,player){ + if(get.type(card)=='basic'&&player==_status.currentPhase) return true; + }, + } + }, + //路易 + dcyaoyi:{ + audio:2, + getZhuanhuanji:function(player,bool){ + var skills=player.getSkills(null,false,false).filter(function(i){ + var info=get.info(i); + return info&&!info.charlotte&&info.zhuanhuanji; + }); + if(!bool) return skills; + if(!skills.length) return 'none'; + var state=lib.skill.dcyaoyi.getState(player,skills[0]); + for(var i=1;i0&&!player.getStat('skill').dcshoutan; + }, + selectCard:function(){ + if(_status.event.player.hasSkill('dcyaoyi')) return [0,1]; + return [1,1]; + }, + filterCard:function(card,player){ + if(player.hasSkill('dcyaoyi')) return false; + var color=get.color(card,player); + if(player.storage.dcshoutan) return color=='black'; + return color!='black'; + }, + prompt:function(){ + var player=_status.event.player; + if(player.hasSkill('dcyaoyi')) return '点击“确认”来变更转换技状态'; + if(player.storage.dcshoutan) return '弃置一张黑色手牌,变更转换技状态'; + return '弃置一张非黑色手牌,变更转换技状态'; + }, + check:function(card){ + return 11-get.value(card); + }, + content:function(){ + player.changeZhuanhuanji('dcshoutan'); + player.addTempSkill('dcshoutan_blocker',{player:['useCard1','useSkillBegin','phaseUseEnd']}); + }, + zhuanhuanji:true, + mark:true, + marktext:'☯', + intro:{ + content:function(storage,player){ + if(storage) return '转换技。出牌阶段限一次,你可以弃置一张黑色手牌。'; + return '转换技。出牌阶段限一次,你可以弃置一张不为黑色的手牌。'; + }, + }, + ai:{ + order:0.1, + result:{ + player:function(player){ + var base=0; + if(ui.selected.cards.length) base=get.value(ui.selected.cards[0]); + var status=player.storage.dcshoutan; + var cards=player.getCards('hs',function(card){ + return !ui.selected.cards.contains(card); + }); + for(var card of cards){ + var val1=player.getUseValue(card,null,true); + player.storage.dcshoutan=!status; + var val2=0; + try{ + val2=player.getUseValue(card,null,true); + }catch(e){ + player.storage.dcshoutan=status; + } + player.storage.dcshoutan=status; + if(val2>val1) base-=(val2-val1); + } + if(base<0) return 1; + return 0; + }, + }, + }, + subSkill:{blocker:{charlotte:true}}, + }, + dcfuxue:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + filter:function(event,player){ + return player.hp>0&&ui.discardPile.childNodes.length>0; + }, + content:function(){ + 'step 0' + var cards=Array.from(ui.discardPile.childNodes); + var gains=cards.slice(0); + var history=game.getAllGlobalHistory('cardMove',function(evt){ + if(evt.name=='lose') return evt.position==ui.discardPile; + return evt.name=='cardsDiscard'; + }); + for(var i=history.length-1;i>=0;i--){ + var evt=history[i]; + var cards2=evt.cards.filter(function(card){ + return cards.contains(card); + }); + if(cards2.length){ + if(lib.skill.dcfuxue.isUse(evt)){ + gains.removeArray(cards2); + } + cards.removeArray(cards2); + } + if(!cards.length) break; + } + if(gains.length){ + var num=player.hp; + player.chooseButton([ + '复学:选择获得'+(num>0?'至多':'')+get.cnNumber(num)+'张牌', + gains, + ],[1,num]).set('ai',function(button){ + var player=_status.event.player,card=button.link; + var getn=function(card){ + return player.countCards('h',card.name)+ui.selected.buttons.filter((button)=>button.link.name==card.name).length; + } + var val=player.getUseValue(card); + if(card.name=='tao'&&getn(card)>=player.getDamagedHp()) return 0; + if(card.name=='sha'&&getn(card)>=player.getCardUsable('sha')) return 0; + return val; + }); + } + else event.finish(); + 'step 1' + if(result.bool){ + player.logSkill('dcfuxue'); + player.gain(result.links,'gain2').gaintag.add('dcfuxue'); + } + }, + isUse:function(event){ + if(event.name!='cardsDiscard') return false; + var evtx=event.getParent(); + if(evtx.name!='orderingDiscard') return false; + var evt2=(evtx.relatedEvent||evtx.getParent()); + return (evt2.name=='phaseJudge'||evt2.name=='useCard'); + }, + group:'dcfuxue_draw', + subSkill:{ + draw:{ + audio:'dcfuxue', + trigger:{player:'phaseJieshuBegin'}, + forced:true, + locked:false, + mod:{ + aiOrder:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('dcfuxue')) return num+0.5; + }, + }, + filter:function(event,player){ + return player.hp>0&&!player.hasCard(function(card){ + return card.hasGaintag('dcfuxue'); + },'h'); + }, + content:function(){ + player.draw(player.hp); + }, + }, + }, + }, + //丁尚涴 + dcfengyan:{ + enable:'phaseUse', + usable:2, + chooseButton:{ + dialog:function(event,player){ + var dialog=ui.create.dialog('讽言:请选择一项','hidden'); + dialog.add([[ + ['gain','令一名体力值不大于你的其他角色交给你一张手牌'], + ['sha','视为对一名手牌数不大于你的其他角色使用一张【杀】'] + ],'textbutton']); + return dialog; + }, + filter:function(button,player){ + return !player.hasSkill('dcfengyan_'+button.link,null,null,false); + }, + check:function(button){ + var player=_status.event.player; + if(button.link=='gain'&&game.hasPlayer(function(current){ + return lib.skill.dcfengyan_gain.filterTarget(null,player,current)&&get.effect(current,'dcfengyan_gain',player,player)>0; + })) return 4; + if(button.link=='sha'&&game.hasPlayer(function(current){ + return lib.skill.dcfengyan_sha.filterTarget(null,player,current)&&get.effect(current,'dcfengyan_sha',player,player)>0; + })) return 4; + return 2; + }, + backup:function(links){ + return get.copy(lib.skill['dcfengyan_'+links[0]]); + }, + prompt:function(links){ + if(links[0]=='gain') return '令一名体力值不大于你的其他角色交给你一张手牌'; + return '视为对一名手牌数不大于你的其他角色使用【杀】'; + }, + }, + ai:{ + order:10, + threaten:1.7, + result:{player:1}, + }, + subSkill:{ + backup:{audio:'dcfengyan'}, + gain:{ + audio:'dcfengyan', + filterTarget:function(card,player,target){ + return target!=player&&target.hp<=player.hp&&target.countCards('h')>0; + }, + filterCard:()=>false, + selectCard:-1, + charlotte:true, + content:function(){ + 'step 0' + player.addTempSkill('dcfengyan_gain','phaseUseAfter'); + target.chooseCard('h',true,'交给'+get.translation(player)+'一张牌'); + 'step 1' + if(result.bool) target.give(result.cards,player); + }, + ai:{ + tag:{ + loseCard:1, + gain:1, + }, + result:{ + player:0.1, + target:-1, + }, + }, + }, + sha:{ + audio:'dcfengyan', + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('h')<=player.countCards('h')&&player.canUse('sha',target,false); + }, + filterCard:()=>false, + selectCard:-1, + charlotte:true, + content:function(){ + player.addTempSkill('dcfengyan_sha','phaseUseAfter'); + player.useCard({ + name:'sha', + isCard:true, + },target,false); + }, + ai:{ + result:{ + player:function(player,target){ + return get.effect(target,{ + name:'sha', + isCard:true, + },player,player); + }, + }, + }, + }, + }, + }, + dcfudao:{ + trigger:{ + global:'phaseBefore', + player:'enterGame', + }, + forced:true, + locked:false, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0)&&game.hasPlayer((current)=>current!=player); + }, + content:function(){ + 'step 0' + player.chooseTarget(true,lib.filter.notMe,'抚悼:请选择一名“继子”','你或“继子”每回合首次使用牌指定对方为目标后各摸两张牌;杀死你或“继子”的角色称为“决裂”。你或“继子”对“决裂”造成的伤害+1。“决裂”对你使用牌后,其本回合内不能再使用牌。').set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('dcfudao',target); + game.log(target,'成为了',player,'的继子'); + player.addSkill('dcfudao_effect'); + target.addSkill('dcfudao_effect'); + player.markAuto('dcfudao_effect',[target]); + target.markAuto('dcfudao_effect',[player]); + } + }, + group:'dcfudao_refuse', + subSkill:{ + effect:{ + trigger:{player:'useCardToPlayered'}, + forced:true, + charlotte:true, + usable:1, + filter:function(event,player){ + var target=event.target; + if(player==target||!target.isIn()) return false; + return player.getStorage('dcfudao_effect').contains(target); + }, + logTarget:'target', + content:function(){ + 'step 0' + var list=[player,trigger.target]; + list.sortBySeat(); + game.asyncDraw(list,2); + 'step 1' + game.delayx(); + }, + marktext:'继', + intro:{content:'已和$成为继母子关系'}, + group:['dcfudao_revenge','dcfudao_deadmark'], + }, + deadmark:{ + trigger:{player:'dieBegin'}, + forced:true, + popup:false, + lastDo:true, + silent:true, + filter:function(event,player){ + return get.itemtype(event.source)=='player'; + }, + content:function(){ + trigger.source.markAuto('dcfudao_deadmark',[player]); + }, + marktext:'裂', + intro:{ + name:'决裂', + content:'你害死了$!', + }, + }, + revenge:{ + trigger:{source:'damageBegin1'}, + forced:true, + filter:function(event,player){ + var storage1=event.player.getStorage('dcfudao_deadmark'),storage2=player.getStorage('dcfudao_effect'); + for(var i of storage1){ + if(storage2.contains(i)) return true; + } + return false; + }, + content:function(){ + trigger.num++; + }, + logTarget:'player', + }, + refuse:{ + trigger:{target:'useCardToTargeted'}, + forced:true, + filter:function(event,player){ + var storage1=event.player.getStorage('dcfudao_deadmark'),storage2=player.getStorage('dcfudao_effect'); + for(var i of storage1){ + if(storage2.contains(i)) return true; + } + return false; + }, + content:function(){ + trigger.player.addTempSkill('dcfudao_blocker'); + }, + logTarget:'player', + }, + blocker:{ + charlotte:true, + mod:{ + cardEnabled:()=>false, + cardSavable:()=>false, + }, + }, + }, + }, + //全惠解 + dchuishu:{ + audio:2, + getList:function(player){ + if(!player.storage.dchuishu) return [3,1,2]; + return player.storage.dchuishu.slice(0); + }, + trigger:{player:'phaseDrawEnd'}, + content:function(){ + 'step 0' + var list=lib.skill.dchuishu.getList(player); + event.list=list; + player.draw(list[0]); + 'step 1' + player.storage.dchuishu_effect=event.list[2]; + player.addTempSkill('dchuishu_effect'); + player.chooseToDiscard('h',true,event.list[1]); + }, + onremove:true, + mark:true, + intro:{ + markcount:function(storage,player){ + var list=lib.skill.dchuishu.getList(player); + return Math.max.apply(Math,list); + }, + content:function(storage,player){ + var list=lib.skill.dchuishu.getList(player); + return '摸牌阶段结束时,你可以摸['+list[0]+']张牌。若如此做:你弃置['+list[1]+']张手牌,且当你于本回合内弃置第['+list[2]+']+1张牌后,你从弃牌堆中获得等量的锦囊牌。'; + }, + }, + subSkill:{ + effect:{ + audio:'dchuishu', + trigger:{ + player:'loseAfter', + global:'loseAsyncAfter', + }, + forced:true, + popup:false, + charlotte:true, + onremove:true, + filter:function(event,player){ + var num=player.storage.dchuishu_effect; + if(typeof num!='number') return false; + if(event.type!='discard'||event.getlx===false) return false; + var evt=event.getl(player); + if(evt.cards2.length==0) return false; + var prev=0,goon=true; + player.getHistory('lose',function(evt){ + if(!goon||evt.type!='discard') return false; + prev+=evt.cards2.length; + if(evt==event||event.getParent()==event){ + goon=false; + return false; + } + }); + return prev>num; + }, + content:function(){ + player.removeSkill('dchuishu_effect'); + var evt=trigger.getl(player); + var num=evt.cards2.length; + var cards=[]; + for(var i=0;i=5) return true; + } + return false; + }, + skillAnimation:true, + animationColor:'wood', + content:function(){ + 'step 0' + player.awakenSkill('dcligong'); + player.gainMaxHp(); + player.recover(); + 'step 1' + player.removeSkill('dcyishu'); + 'step 2' + var list; + if(_status.characterlist){ + list=[]; + for(var i=0;i<_status.characterlist.length;i++){ + var name=_status.characterlist[i]; + if(lib.character[name][1]=='wu'&&(lib.character[name][0]=='female'||lib.character[name][0]=='double')) list.push(name); + } + } + else if(_status.connectMode){ + list=get.charactersOL(function(i){ + return lib.character[i][1]!='wu'||(lib.character[i][0]!='female'&&lib.character[i][0]!='double'); + }); + } + else{ + list=get.gainableCharacters(function(info){ + return info[1]=='wu'&&(info[0]=='female'||info[0]=='double'); + }); + } + var players=game.players.concat(game.dead); + for(var i=0;i'; + td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ + if(_status.dragged) return; + if(_status.justdragged) return; + _status.tempNoButton=true; + setTimeout(function(){ + _status.tempNoButton=false; + },500); + var link=this.link; + if(!this.classList.contains('bluebg')){ + if(rSkill.length>=2) return; + rSkill.add(link); + this.classList.add('bluebg'); + } + else{ + this.classList.remove('bluebg'); + rSkill.remove(link); + } + }); + } + dialog.content.appendChild(table); + dialog.add('  '); + dialog.open(); + + event.switchToAuto=function(){ + event.dialog.close(); + event.control.close(); + game.resume(); + _status.imchoosing=false; + }; + event.control=ui.create.control('ok',function(link){ + event.dialog.close(); + event.control.close(); + game.resume(); + _status.imchoosing=false; + }); + for(var i=0;i0; + }, + frequent:true, + locked:false, + content:function(){ + 'step 0' + var card=false; + if(typeof event.num!='number'){ + var num=false; + for(var i=0;i'+choiceList[0]+'(已强化)'); + } + else{ + list.push('选项'+get.cnNumber(i,true)); + if(num) choiceList[i-1]+=('(已强化'+num+'次)'); + } + } + player.chooseControl(list,'cancel2').set('prompt','是否发动【陷筑】强化【大攻车】?').set('choiceList',choiceList).set('ai',function(){ + var player=_status.event.player,controls=_status.event.controls.slice(0); + var getval=function(choice){ + var card=player.getEquip('dagongche'); + if(choice=='选项一'){ + card.storage.大攻车选项一=1; + var goon=false; + if(game.hasPlayer(function(current){ + var eff1=0,eff2=0; + var cardx={name:'sha',isCard:true}; + if(player.canUse(cardx,current)) eff1=get.effect(current,cardx,player,player); + cardx.storage={dagongche:true}; + if(player.canUse(cardx,current)) eff2=get.effect(current,cardx,player,player); + return (eff2>eff1); + })) goon=true; + delete card.storage.大攻车选项一; + if(goon) return 5; + return 0; + } + else if(choice=='选项二'){ + var num=1; + if(card.storage.大攻车选项二) num+=card.storage.大攻车选项二; + var cardx={name:'sha',isCard:true}; + if(game.countPlayer(function(current){ + return player.canUse(cardx,current)&&get.effect(current,cardx,player,player)>0; + })>num) return 2; + } + else if(choice=='选项三') return 1; + return 0; + }; + var eff=0,current='cancel2'; + for(var i of controls){ + var effx=getval(i); + if(effx>eff){ + eff=effx; + current=i; + } + } + return current; + }); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('dcxianzhu'); + var card=player.getEquip('dagongche'),key='大攻车'+result.control; + if(!card.storage[key]) card.storage[key]=0; + card.storage[key]++; + lib.skill.dcwanglu.broadcast(player); + } + }, + }, + dcchaixie:{ + audio:2, + trigger:{ + player:['loseAfter'], + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + forced:true, + filter:function(event,player){ + var evt=event.getl(player); + if(!evt||!evt.es||!evt.es.length) return false; + for(var card of evt.es){ + if(card.name=='dagongche'){ + for(var i=1;i<=3;i++){ + if(card.storage['大攻车选项'+get.cnNumber(i,true)]) return true; + } + } + } + return false; + }, + content:function(){ + var num=0; + var evt=trigger.getl(player); + for(var card of evt.es){ + if(card.name=='dagongche'){ + for(var i=1;i<=3;i++){ + var key='大攻车选项'+get.cnNumber(i,true); + if(card.storage[key]) num+=card.storage[key]; + } + } + } + player.draw(num); + }, + }, + dagongche_skill:{ + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + var cardx={ + name:'sha', + isCard:true, + storage:{dagongche:true}, + }; + return player.hasUseTarget(cardx); + }, + equipSkill:true, + content:function(){ + var card={ + name:'sha', + isCard:true, + storage:{dagongche:true}, + }; + lib.skill.dcwanglu.broadcast(player); + player.chooseUseTarget(card,'大攻车:是否视为使用【杀】?',false).logSkill='dagongche_skill'; + }, + mod:{ + targetInRange:function(card,player,target){ + if(card.storage&&card.storage.dagongche){ + var cardx=player.getEquip('dagongche'); + if(cardx&&cardx.storage.大攻车选项一) return true; + } + }, + selectTarget:function(card,player,range){ + if(card.storage&&card.storage.dagongche&&range[1]!=-1){ + var cardx=player.getEquip('dagongche'); + if(cardx&&cardx.storage.大攻车选项二) range[1]+=cardx.storage.大攻车选项二; + } + }, + canBeDiscarded:function(card){ + if(card.name=='dagongche'&&get.position(card)=='e'){ + for(var i=1;i<=3;i++){ + if(card.storage['大攻车选项'+get.cnNumber(i,true)]) return; + } + return false; + } + }, + }, + ai:{ + unequip:true, + skillTagFilter:function(player,tag,arg){ + if(!arg||!arg.card||!arg.card.storage||!arg.card.storage.dagongche) return false; + var card=player.getEquip('dagongche'); + if(!card||!card.storage.大攻车选项一) return false; + }, + }, + group:'dagongche_skill_discard', + subSkill:{ + discard:{ + trigger:{source:'damageSource'}, + equipSkill:true, + forced:true, + filter:function(event,player){ + if(!event.card||!event.card.storage||!event.card.storage.dagongche) return false; + if(event.getParent().type!='card') return false; + return event.player.hasCard(function(card){ + return lib.filter.canBeDiscarded(card,event.player,player); + },'he'); + }, + logTarget:'player', + content:function(){ + var num=1; + var cardx=player.getEquip('dagongche'); + if(cardx&&cardx.storage.大攻车选项三) num+=cardx.storage.大攻车选项三; + player.discardPlayerCard(trigger.player,true,num,'he'); + }, + }, + }, + }, + //刘徽 + dcgeyuan:{ + audio:2, + trigger:{ + global:['loseAfter','loseAsyncAfter','cardsDiscardAfter','equipAfter'], + }, + forced:true, + filter:function(event,player){ + var cards=event.getd(); + for(var i of cards){ + if(lib.skill.dcgeyuan.filterNumber(player,get.number(i,false))) return true; + } + return false; + }, + content:function(){ + 'step 0' + event.cards=trigger.getd(); + 'step 1' + var card=false; + for(var i of cards){ + if(lib.skill.dcgeyuan.filterNumber(player,get.number(i,false))){ + card=i; + cards.remove(card); + break; + } + } + if(card){ + var number=get.number(card,false); + game.log(player,'将','#y'+get.strNumber(number),'记录为','#g“圆环之弧”'); + player.markAuto('dcgeyuan_homura',[number]); + if(player.getStorage('dcgeyuan').length>player.getStorage('dcgeyuan_homura').length){ + if(cards.length>0) event.redo(); + else event.finish() + } + else if(player.storage.dcgusuan) event.goto(5); + } + else event.finish(); + 'step 2' + var list=player.getStorage('dcgeyuan_homura'); + var num1=list[0],num2=list[list.length-1]; + event.cards2=[]; + var lose_list=[],players=game.filterPlayer(); + for(var current of players){ + var cards=current.getCards('ej',function(card){ + var num=get.number(card); + return num==num1||num==num2; + }); + if(cards.length>0){ + current.$throw(cards); + lose_list.push([current,cards]); + event.cards2.addArray(cards); + } + } + if(lose_list.length){ + event.lose_list=lose_list; + game.loseAsync({ + lose_list:lose_list, + }).setContent('chooseToCompareLose'); + } + 'step 3' + var list=player.getStorage('dcgeyuan_homura'); + var num1=list[0],num2=list[list.length-1]; + var cards=event.cards2; + for(var i=0;i0){ + if(event.lose_list) game.delayx(); + player.gain(cards,'gain2'); + } + 'step 4' + var list=player.getStorage('dcgeyuan_homura'); + var num1=list[0],num2=list[list.length-1]; + player.storage.dcgeyuan_homura=[]; + game.log(player,'清空了','#g“圆环之弧”'); + if(player.getStorage('dcgeyuan').length>3){ + player.unmarkAuto('dcgeyuan',[num1,num2]); + game.log(player,'从','#g“圆环之理”','中移除了','#y'+get.strNumber(num1),'和','#y'+get.strNumber(num2)); + } + event.finish(); + 'step 5' + player.chooseTarget('割圆:选择至多三名角色','第一名角色摸三张牌,第二名角色弃置四张牌,第三名角色将所有手牌与牌堆底的牌交换',true,[1,3]); + 'step 6' + if(result.bool){ + var targets=result.targets; + event.targets=targets; + player.line(targets); + targets[0].draw(3); + if(targets.length<2) event.goto(4); + } + else event.goto(4); + 'step 7' + if(targets[1].countCards('he')>0) targets[1].chooseToDiscard('he',true,4); + if(targets.length<3) event.goto(4); + 'step 8' + var target=targets[2]; + var cards=get.bottomCards(5); + game.cardsGotoOrdering(cards); + var hs=target.getCards('h'); + if(hs.length>0) target.lose(hs,ui.cardPile); + target.gain(cards,'draw'); + event.goto(4); + }, + group:'dcgeyuan_qyubee', + filterNumber:function(player,num){ + var list1=player.getStorage('dcgeyuan'); + var list2=player.getStorage('dcgeyuan_homura'); + if(!list1.contains(num)) return false; + if(!list2.length) return true; + if(list2.contains(num)) return false; + var madoka=list1.indexOf(num); + for(var i of list2){ + var homura=list1.indexOf(i); + var dist=Math.abs(madoka-homura); + if(dist==1||dist==list1.length-1) return true; + } + return false; + }, + subSkill:{ + qyubee:{ + audio:'dcgeyuan', + trigger:{ + global:'phaseBefore', + player:'enterGame', + }, + forced:true, + filter:function(event,player){ + return (event.name!='phase'||game.phaseNumber==0)&&!player.storage.dcgusuan; + }, + content:function(){ + var list=[]; + for(var i=1;i<=13;i++){ + list.push(i); + } + list.randomSort(); + player.storage.dcgeyuan=list; + player.markSkill('dcgeyuan'); + var str='#y'; + for(var i=0;i<13;i++){ + str+=get.strNumber(list[i]); + if(i!=12) str+=','; + } + game.log(player,'将','#y“圆环之理”','赋值为',str); + }, + }, + }, + intro:{ + name:'圆环之理', + mark:function(dialog,storage,player){ + dialog.content.style['overflow-x']='visible'; + var list=storage; + if(!storage||!storage.length) return '(圆环之理尚不存在)'; + var list2=player.getStorage('dcgeyuan_homura'); + var core=document.createElement('div'); + var centerX=-10,centerY=80,radius=80; + var radian=Math.PI*2/list.length; + var fulllist=['A','2','3','4','5','6','7','8','9','10','J','Q','K']; + for(var i=0;i['+fulllist[list[i]-1]+']'; + td.style.position='absolute'; + core.appendChild(td); + td.style.left=(centerX+radius*Math.sin(radian*i))+'px'; + td.style.top=(centerY-radius*Math.cos(radian*i))+'px'; + } + dialog.content.appendChild(core); + }, + }, + }, + dcjieshu:{ + audio:2, + trigger:{player:['useCard','respond']}, + forced:true, + filter:function(event,player){ + var num=get.number(event.card,false); + if(typeof num!='number') return false; + return lib.skill.dcgeyuan.filterNumber(player,num) + }, + content:function(){ + player.draw(); + }, + mod:{ + ignoredHandcard:function(card,player){ + if(!player.getStorage('dcgeyuan').contains(get.number(card))) return true; + }, + cardDiscardable:function(card,player,name){ + if(name=='phaseDiscard'&&!player.getStorage('dcgeyuan').contains(get.number(card))) return false; + }, + }, + }, + dcgusuan:{ + audio:2, + trigger:{global:'phaseEnd'}, + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'soil', + filter:function(event,player){ + return player.getStorage('dcgeyuan').length==3; + }, + content:function(){ + player.awakenSkill('dcgusuan'); + player.storage.dcgusuan=true; + player.loseMaxHp(); + }, + ai:{combo:'dcgeyuan'}, + derivation:'dcgeyuan_magica', + }, + //王昶 + dckaiji:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + if(player.maxHp<=0) return false; + if(!player.storage.dckaiji) return true; + return player.hasCard((card)=>lib.filter.cardDiscardable(card,player,'phaseUse'),'he'); + }, + filterCard:function(card,player){ + if(!player.storage.dckaiji) return false; + return true; + }, + position:'he', + selectCard:function(){ + var player=_status.event.player; + return player.storage.dckaiji?[1,player.maxHp]:-1; + }, + check:function(card){ + var player=_status.event.player; + if(!player.hasSkill('dcpingxi')) return 0; + var num=lib.skill.dcpingxi.getNum()+ui.selected.cards.length; + if(num0; + })){ + if(get.position(card)=='h'&&player.needsToDiscard()>ui.selected.cards.length) return 7+1/Math.max(1,get.value(card)); + return 7-get.value(card); + } + return 0; + }, + content:function(){ + player.changeZhuanhuanji('dckaiji'); + if(!cards.length) player.draw(Math.min(player.maxHp,5)); + }, + zhuanhuanji:true, + mark:true, + marktext:'☯', + intro:{ + content:(storage)=>('转换技。出牌阶段限一次,你可以'+(storage?'弃置至多X张牌':'摸X张牌')+'(X为你的体力上限且至多为5)。'), + }, + ai:{ + threaten:1.6, + order:function(item,player){ + if(player.storage.dckaiji) return 0.1; + return 8; + }, + result:{player:1}, + }, + }, + dcpingxi:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + getNum:function(){ + var num=0; + game.getGlobalHistory('cardMove',function(evt){ + if(evt.name=='lose'&&evt.type=='discard') num+=evt.cards2.length; + }); + return num; + }, + filter:function(event,player){ + return lib.skill.dcpingxi.getNum()>0&&game.hasPlayer(function(current){ + return current!=player; + }); + }, + content:function(){ + 'step 0' + var num=lib.skill.dcpingxi.getNum(); + player.chooseTarget([1,num],function(card,player,target){ + return target!=player; + },get.prompt('dcpingxi'),'选择至多'+get.cnNumber(num)+'名其他角色。弃置这些角色的各一张牌,然后视为对这些角色使用一张【杀】').set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'guohe_copy2'},player,player)+get.effect(target,{name:'sha'},player,player); + }); + 'step 1' + if(result.bool){ + var targets=result.targets.sortBySeat(); + event.targets=targets; + player.logSkill('dcpingxi',targets); + event.num=0; + } + else event.finish(); + 'step 2' + var target=targets[num]; + if(target.hasCard(function(card){ + return lib.filter.canBeDiscarded(card,player,target); + },'he')) player.discardPlayerCard(target,'he',true); + event.num++; + if(event.num0) player.useCard({ + name:'sha', + isCard:true, + },targetsx); + }, + }, + //赵昂 + dczhongjie:{ + audio:2, + round:1, + trigger:{global:'dying'}, + logTarget:'player', + filter:function(event,player){ + return event.player.hp<1&&event.reason&&event.reason.name=='loseHp'; + }, + check:function(event,player){ + return get.attitude(player,event.player)>2; + }, + content:function(){ + trigger.player.recover(); + trigger.player.draw(); + }, + }, + dcsushou:{ + audio:2, + trigger:{global:'phaseUseBegin'}, + filter:function(event,player){ + return player.hp>0&&event.player.isMaxHandcard(true); + }, + logTarget:'player', + check:function(event,player){ + var num=player.hp; + if(player.hasSkill('dczhongjie')&&(player.storage.dczhongjie_roundcount||0)1; + }, + content:function(){ + 'step 0' + player.loseHp(); + event.target=trigger.player; + 'step 1' + var num=player.getDamagedHp(); + if(num>0) player.draw(num); + if(player==target) event.finish(); + 'step 2' + var ts=target.getCards('h'); + if(ts.length<2) event.finish(); + else{ + var hs=player.getCards('h'); + ts=ts.randomGets(Math.floor(ts.length/2)); + if(!hs.length){ + player.viewCards(get.translation(target)+'的部分手牌'); + event.finish(); + return; + } + var next=player.chooseToMove('夙守:交换至多'+get.cnNumber(Math.min(hs.length,ts.length,player.getDamagedHp()))+'张牌'); + next.set('list',[ + [get.translation(target)+'的部分手牌',ts,'dcsushou_tag'], + ['你的手牌',hs], + ]); + next.set('filterMove',function(from,to,moved){ + if(typeof to=='number') return false; + var player=_status.event.player; + var hs=player.getCards('h'); + var changed=hs.filter(function(card){ + return !moved[1].contains(card); + }); + var changed2=moved[1].filter(function(card){ + return !hs.contains(card); + }); + if(changed.length=4) return false; + } + return true; + }, + choices:[[ + '回复X点体力', + '摸X张牌', + '复原武将牌', + '随机执行一个已经移除过的选项', + ],[ + '受到X点伤害', + '弃置X张牌', + '翻面并横置', + '随机执行一个已经移除过的选项', + ]], + filterx:[[ + (player)=>player.isDamaged(), + ()=>true, + (player)=>player.isTurnedOver()||player.isLinked(), + ()=>true, + ],[ + ()=>true, + (player)=>player.hasCard(function(card){ + return lib.filter.cardDiscardable(card,player,'caiyi'); + },'he'), + (player)=>!player.isTurnedOver()||!player.isLinked(), + ()=>true, + ]], + content:function(){ + 'step 0' + if(!player.storage.caiyi_info) player.storage.caiyi_info=[[],[]]; + var index=player.storage.caiyi?1:0; + event.index=index; + var list=player.storage.caiyi_info[index],choices=lib.skill.caiyi.choices[index],numbers=['⒈',';⒉',';⒊',';⒋']; + event.num=4-list.length; + var str='令一名角色选择执行其中一项:'; + for(var i=0;i<4;i++){ + if(list.contains(i)) continue; + if(i==3&&!list.length) continue; + str+=numbers.shift(); + str+=choices[i]; + } + str+='。'; + str=str.replace(/X/g,get.cnNumber(event.num)); + player.chooseTarget(get.prompt('caiyi')+'(当前状态:'+(index?'阳':'阴')+')',str).set('ai',function(target){ + var player=_status.event.player; + return (player.storage.caiyi?-1:1)*get.attitude(player,target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('caiyi',target); + player.changeZhuanhuanji('caiyi'); + event.goto(event.index==1?5:2); + } + else event.finish(); + 'step 2' + var list=[],str=get.cnNumber(num); + var choiceList=[ + '回复'+str+'点体力。', + '摸'+str+'张牌。', + '将武将牌翻至正面且重置。', + '随机执行一个已经被移除的选项。', + ]; + var storage=player.storage.caiyi_info[event.index]; + for(var i=0;i<4;i++){ + if(storage.contains(i)){ + choiceList[i]=(''+choiceList[i]+''); + } + else if(!lib.skill.caiyi.filterx[event.index][i](target)||(i==3&&!storage.length)){ + choiceList[i]=(''+choiceList[i]+''); + } + else list.push('选项'+get.cnNumber(i+1,true)) + } + if(!list.length){ + event.finish(); + return; + } + target.chooseControl(list).set('choiceList',choiceList).set('ai',function(){ + var evt=_status.event,player=evt.player; + var list=evt.controls.slice(0); + var gett=function(choice){ + if(choice=='cancel2') return 0.1; + var max=0,func={ + 选项一:function(current){ + max=get.recoverEffect(current,player,player)*Math.min(evt.getParent().num,player.getDamagedHp()); + }, + 选项二:function(target){ + max=get.effect(target,{name:'wuzhong'},player,player)/2*evt.getParent().num; + }, + 选项三:function(target){ + if(player.isTurnedOver()) max+=25; + if(player.isLinked()) max+=get.effect(player,{name:'tiesuo'},player,player); + }, + 选项四:function(target){ + max=3; + }, + }[choice]; + func(player); + return max; + }; + return list.sort(function(a,b){ + return gett(b)-gett(a); + })[0]; + }); + 'step 3' + var index2=['选项一','选项二','选项三','选项四'].indexOf(result.control); + player.storage.caiyi_info[event.index].push(index2); + if(index2==3){ + var list=player.storage.caiyi_info[event.index].filter(function(i){ + return i!=3&&lib.skill.caiyi.filterx[event.index][i](target); + }); + if(!list.length){ + event.finish(); + return; + } + index2=list.randomGet(); + } + switch(index2){ + case 0: + target.recover(num); + break; + case 1: + target.draw(num); + break; + case 2: + !target.isTurnedOver()||target.turnOver(); + break; + } + if(index2!=2) event.finish(); + 'step 4' + !target.isLinked()||target.link(); + event.finish(); + 'step 5' + var list=[],str=get.cnNumber(num); + var choiceList=[ + '受到'+str+'点伤害。', + '弃置'+str+'张牌。', + '将武将牌翻至背面并横置。', + '随机执行一个已经被移除的选项。', + ]; + var storage=player.storage.caiyi_info[event.index]; + for(var i=0;i<4;i++){ + if(storage.contains(i)){ + choiceList[i]=(''+choiceList[i]+''); + } + else if(!lib.skill.caiyi.filterx[event.index][i](target)||(i==3&&!storage.length)){ + choiceList[i]=(''+choiceList[i]+''); + } + else list.push('选项'+get.cnNumber(i+1,true)) + } + if(!list.length){ + event.finish(); + return; + } + target.chooseControl(list).set('choiceList',choiceList).set('ai',function(){ + var evt=_status.event,player=evt.player; + var list=evt.controls.slice(0); + var gett=function(choice){ + if(choice=='cancel2') return 0.1; + var max=0,func={ + 选项一:function(current){ + max=get.effect(current,{name:'damage'},player,player)*evt.getParent().num; + }, + 选项二:function(target){ + max=get.effect(target,{name:'guohe_copy2'},player,player)*Math.min(player.countCards('he'),evt.getParent().num); + }, + 选项三:function(target){ + if(!player.isTurnedOver()) max-=5; + if(!player.isLinked()) max+=get.effect(player,{name:'tiesuo'},player,player); + }, + 选项四:function(target){ + max=-3; + }, + }[choice]; + func(player); + return max; + }; + return list.sort(function(a,b){ + return gett(b)-gett(a); + })[0]; + }); + 'step 6' + var index2=['选项一','选项二','选项三','选项四'].indexOf(result.control); + player.storage.caiyi_info[event.index].push(index2); + if(index2==3){ + var list=player.storage.caiyi_info[event.index].filter(function(i){ + return i!=3&&lib.skill.caiyi.filterx[event.index][i](target); + }); + if(!list.length){ + event.finish(); + return; + } + index2=list.randomGet(); + } + switch(index2){ + case 0: + target.damage(num); + break; + case 1: + target.chooseToDiscard(num,true,'he'); + break; + case 2: + target.isTurnedOver()||target.turnOver(); + break; + } + if(index2!=2) event.finish(); + 'step 7' + target.isLinked()||target.link(); + event.finish(); + }, + mark:true, + marktext:'☯', + intro:{ + content:function(storage){ + if(storage) return '转换技。结束阶段,你可令一名角色选择并执行一项,然后移除此选项:⒈受到X点伤害。⒉弃置X张牌。⒊翻面并横置。⒋随机执行一个已经移除过的阳选项。(X为该阴阳态剩余选项的数量)。'; + return '转换技。结束阶段,你可令一名角色选择并执行一项,然后移除此选项:⒈回复X点体力。⒉摸X张牌,⒊复原武将牌。⒋随机执行一个已经移除过的阴选项。⒋随机执行一个已经移除过的阳选项。(X为该阴阳态剩余选项的数量)。'; + }, + }, + }, + guili:{ + audio:2, + trigger:{player:'phaseBegin'}, + forced:true, + locked:false, + filter:function(event,player){ + return player.phaseNumber==1&&game.hasPlayer((current)=>current!=player); + }, + content:function(){ + 'step 0' + player.chooseTarget(lib.filter.notMe,true,'请选择【归离】的目标',lib.translate.guili_info).set('ai',function(target){ + return -get.threaten(target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + game.log(player,'选择了',target); + player.storage.guili_insert=target; + player.addSkill('guili_insert'); + game.delayx(); + } + }, + onremove:true, + subSkill:{ + insert:{ + trigger:{global:'phaseAfter'}, + forced:true, + charlotte:true, + logTarget:'player', + filter:function(event,player){ + if(event.player!=player.storage.guili_insert) return false; + if(event.player.getHistory('sourceDamage').length>0) return false; + var history=event.player.actionHistory; + if(history[history.length-1].isRound) return true; + for(var i=history.length-2;i>=0;i--){ + if(history[i].isMe) return false; + if(history[i].isRound) return true; + } + return false; + }, + content:function(){ + player.insertPhase(); + }, + }, + }, + }, + //刘虞 + dcsuifu:{ + audio:2, + trigger:{global:'phaseJieshuBegin'}, + filter:function(event,player){ + if(player==event.player||!event.player.countCards('h')) return false; + var num=0; + game.countPlayer(function(current){ + if(current==player||current.getSeatNum()==1){ + current.getHistory('damage',function(evt){ + num+=evt.num; + }); + } + }); + return num>=2; + }, + logTarget:'player', + check:function(event,player){ + return get.attitude(player,event.player)<=0; + }, + content:function(){ + 'step 0' + var target=trigger.player,cards=target.getCards('h'); + target.lose(cards,ui.cardPile,'insert'); + target.$throw(cards.length); + game.updateRoundNumber(); + game.log(player,'将',target,'的',get.cnNumber(cards.length),'张手牌置于牌堆顶'); + 'step 1' + game.delayx(); + player.chooseUseTarget({name:'wugu',isCard:true},true); + }, + }, + dcpijing:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget([1,game.countPlayer()],get.prompt('dcpijing'),'令任意名角色获得技能〖自牧〗').set('ai',function(target){ + return get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var targets=result.targets; + targets.add(player); + targets.sortBySeat(); + player.logSkill('dcpijing',targets); + game.countPlayer(function(current){ + if(!targets.contains(current)) current.removeSkill('dczimu'); + else current.addSkill('dczimu'); + }); + game.delayx(); + } + }, + derivation:'dczimu', + }, + dczimu:{ + audio:2, + trigger:{player:'damageEnd'}, + forced:true, + mark:true, + logTarget:function(event,player){ + return game.filterPlayer(function(current){ + return current.hasSkill('dczimu',null,null,false); + }).sortBySeat(); + }, + content:function(){ + 'step 0' + var list=game.filterPlayer(function(current){ + return current.hasSkill('dczimu',null,null,false); + }); + if(list.length>0){ + if(list.length==1) list[0].draw(); + else{ + game.asyncDraw(list); + event.delay=true; + } + } + 'step 1' + player.removeSkill('dczimu'); + if(event.delay) game.delayx(); + }, + marktext:'牧', + intro:{content:'锁定技。当你受到伤害后,你令所有拥有〖自牧〗的角色各摸一张牌,然后你失去〖自牧〗。'}, + }, + //黄祖 + dcjinggong:{ + audio:2, + enable:'chooseToUse', + locked:false, + mod:{ + targetInRange:function(card){ + if(card.storage&&card.storage.dcjinggong) return true; + }, + }, + viewAsFilter:function(player){ + return player.hasCard(function(card){ + return get.type(card)=='equip'; + },'ehs'); + }, + position:'hes', + filterCard:{type:'equip'}, + viewAs:{ + name:'sha', + storage:{dcjinggong:true}, + }, + check:function(card){ + return 6-get.value(card); + }, + ai:{ + respondSha:true, + skillTagFilter:function(player){ + return player.hasCard(function(card){ + return get.type(card)=='equip'; + },'ehs'); + }, + }, + group:'dcjinggong_base', + subSkill:{ + base:{ + trigger:{player:'useCard1'}, + forced:true, + popup:false, + firstDo:true, + filter:function(event,player){ + return event.skill=='dcjinggong'&&event.targets.length>0; + }, + content:function(){ + trigger.baseDamage=Math.min(5,get.distance(player,trigger.targets[0])); + }, + }, + }, + }, + dcxiaojuan:{ + audio:2, + trigger:{player:'useCardToPlayered'}, + logTarget:'target', + filter:function(event,player){ + return event.targets.length==1&&player!=event.target&&event.target.countCards('h')>1; + }, + check:function(event,player){ + var target=event.target; + if(get.attitude(player,target)>=0) return false; + if(get.color(event.card)=='none') return true; + return Math.floor(target.countCards('h')/2)>=Math.floor(player.countCards('h')/2); + }, + content:function(){ + 'step 0' + var target=trigger.target; + event.target=target; + var num=Math.floor(target.countCards('h')/2); + if(num>0) player.discardPlayerCard(target,'h',num,true); + else event.finish(); + 'step 1' + var suit=get.suit(trigger.card); + if(result.bool&&lib.suit.contains(suit)&&player.countCards('h')>1){ + var bool=false; + for(var i of result.cards){ + if(get.suit(i,target)==suit){ + bool=true; + break; + } + } + if(!bool) event.finish(); + } + else event.finish(); + 'step 2' + if(player.countCards('h')>0) player.chooseToDiscard('h',1,true); + }, + }, + //来莺儿 + xiaowu:{ + audio:2, + enable:'phaseUse', + usable:1, + selectTarget:function(){ + return [1,game.countPlayer()-1]; + }, + complexSelect:true, + complexTarget:true, + filterTarget:function(card,player,target){ + if(player==target) return false; + var next=player.getNext(),prev=player.getPrevious(); + var selected=ui.selected.targets; + if(!selected.contains(next)&&!selected.contains(prev)) return (target==next||target==prev); + for(var i of selected){ + if(i.getNext()==target||i.getPrevious()==target) return true; + } + return false; + }, + contentBefore:function(){ + event.getParent()._xiaowu_targets=[]; + }, + content:function(){ + 'step 0' + if(!target.isIn()){ + event.finish(); + return; + } + target.chooseControl().set('choiceList',[ + '令'+get.translation(player)+'摸一张牌', + '令自己摸一张牌', + ]).set('ai',function(){ + var player=_status.event.player,target=_status.event.getParent().player; + var all=_status.event.getParent().targets.length,dam=_status.event.getParent(2)._xiaowu_targets.length; + if(get.attitude(player,target)>0||dam>=Math.floor(all/2)) return 0; + return 1; + }); + 'step 1' + if(result.index==0){ + player.draw(); + } + else{ + target.draw(); + event.getParent()._xiaowu_targets.push(target); + } + }, + contentAfter:function(){ + var targetsx=event.getParent()._xiaowu_targets; + var num=(targets.length-targetsx.length-targetsx.length); + if(num>0) player.addMark('shawu',1); + else if(num<0){ + player.line(targetsx,'fire'); + for(var i of targetsx) i.damage(); + } + }, + ai:{ + order:8, + result:{player:1}, + }, + }, + huaping:{ + audio:'huaping', + trigger:{global:'die'}, + limited:true, + skillAnimation:true, + animationColor:'fire', + filter:function(event,player){ + return player!=event.player; + }, + logTarget:'player', + check:function(event,player){ + return get.rank(event.player.name,true)>=5; + }, + content:function(){ + player.awakenSkill('huaping'); + var skills=trigger.player.getSkills(null,false,false).filter(function(i){ + var info=get.info(i); + return info&&!info.charlotte; + }); + if(skills.length){ + for(var i of skills) player.addSkillLog(i); + } + player.removeSkill('xiaowu'); + var num=player.countMark('shawu'); + if(num>0){ + player.removeMark('shawu',num); + player.draw(num); + } + }, + group:'huaping_give', + subSkill:{ + give:{ + audio:'huaping', + trigger:{player:'die'}, + direct:true, + filter:function(event,player){ + return event.player==player; + }, + forceDie:true, + skillAnimation:true, + animationColor:'gray', + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('huaping'),'令一名其他角色获得〖沙舞〗',lib.filter.notMe).set('forceDie',true).set('ai',function(target){ + return get.attitude(_status.event.player,target)+100; + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.awakenSkill('huaping'); + player.logSkill('huaping_give',target); + target.addSkill('shawu'); + var num=player.countMark('shawu'); + if(num>0){ + player.removeMark('shawu',num); + target.addMark('shawu',num); + } + } + }, + }, + }, + derivation:'shawu', + }, + shawu:{ + audio:2, + trigger:{player:'useCardToTargeted'}, + shaRelated:true, + direct:true, + filter:function(event,player){ + return event.card.name=='sha'&&event.player.isIn()&&(player.hasMark('shawu')||player.countCards('h',function(card){ + return lib.filter.cardDiscardable(card,player,'shawu'); + })>1); + }, + content:function(){ + 'step 0' + var list=[]; + if(player.countCards('h',function(card){ + return lib.filter.cardDiscardable(card,player,'shawu'); + })>1) list.push('弃置手牌'); + if(player.hasMark('shawu')) list.push('移除标记'); + list.push('cancel2'); + player.chooseControl(list).set('prompt',get.prompt('shawu',trigger.target)).set('prompt2','弃置两张手牌,或移去一枚“沙”并摸两张牌,然后对该角色造成1点伤害').set('ai',function(){ + var player=_status.event.player,target=_status.event.getTrigger().target; + if(get.damageEffect(target,player,player)<=0) return 'cancel2'; + if(player.hasMark('shawu')) return '移除标记'; + if(player.countCards('h',function(card){ + return lib.filter.cardDiscardable(card,player,'shawu')&&get.value(card)<=6.5; + })>1) return '弃置手牌'; + return 'cancel2'; + }); + 'step 1' + var target=trigger.target; + if(result.control=='cancel2'){ + event.finish(); + return; + } + else if(result.control=='移除标记'){ + player.logSkill('shawu',target); + player.removeMark('shawu',1); + player.draw(2); + target.damage(); + event.finish(); + } + else{ + player.chooseToDiscard('h',true,2).logSkill=['shawu',target]; + } + 'step 2' + trigger.target.damage(); + }, + intro:{ + content:'mark', + }, + }, + //曹髦 + qianlong:{ + audio:2, + trigger:{player:'damageEnd'}, + frequent:true, + content:function(){ + 'step 0' + var cards=get.cards(3); + event.cards=cards; + game.cardsGotoOrdering(cards); + //展示牌 + game.log(player,'展示了',event.cards); + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,id,cards){ + if(player==game.me||player.isUnderControl()) return; + var str=get.translation(player)+'发动了【潜龙】'; + var dialog=ui.create.dialog(str,cards); + dialog.videoId=id; + },player,event.videoId,event.cards); + game.addVideo('showCards',player,[get.translation(player)+'发动了【潜龙】',get.cardsInfo(event.cards)]); + if(player!=game.me&&!player.isUnderControl()&&!player.isOnline()) game.delay(2); + //选牌 + var next=player.chooseToMove('潜龙:获得至多'+get.cnNumber(Math.min(3,player.getDamagedHp()))+'张牌并将其余牌置于牌堆底'); + next.set('list',[ + ['置于牌堆底',cards], + ['自己获得'], + ]) + next.set('filterMove',function(from,to,moved){ + if(moved[0].contains(from.link)){ + if(typeof to=='number'){ + if(to==1){ + if(moved[1].length>=_status.event.player.getDamagedHp()) return false; + } + return true; + } + } + return true; + }); + next.set('processAI',function(list){ + var cards=list[0][1].slice(0).sort(function(a,b){ + if(b.name=='sha') return 1; + return get.value(b)-get.value(a); + }); + return [cards,cards.splice(0,_status.event.player.getDamagedHp())]; + }); + 'step 1' + game.broadcastAll('closeDialog',event.videoId); + game.addVideo('cardDialog',null,event.videoId); + var moved=result.moved; + if(moved[0].length>0){ + for(var i of moved[0]){ + i.fix(); + ui.cardPile.appendChild(i); + } + } + if(moved[1].length>0) player.gain(moved[1],'gain2'); + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')){ + if(player.hasSkillTag('jueqing',false,target)) return; + if(!target.hasFriend()) return; + var num=1; + if(!player.needsToDiscard()&&target.isDamaged()){ + 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]; + } + } + } + } + }, + fensi:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + content:function(){ + 'step 0' + if(!game.hasPlayer(function(current){ + return current!=player&¤t.hp>=player.hp; + })){ + player.damage(); + event.finish(); + return; + } + else{ + player.chooseTarget(true,'忿肆:对一名体力值不小于你的角色造成1点伤害',function(card,player,target){ + return target.hp>=player.hp; + }).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); + }); + } + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.line(target,'green'); + target.damage(); + } + else event.finish(); + 'step 2' + if(target.isIn()&&target.canUse('sha',player,false)) target.useCard({name:'sha',isCard:true},player,false,'noai'); + }, + }, + juetao:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + limited:true, + skillAnimation:true, + animationColor:'thunder', + filter:function(event,player){ + return player.hp==1; + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('juetao'),lib.filter.notMe).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('juetao',target); + player.awakenSkill('juetao'); + } + else event.finish(); + 'step 2' + var card=get.bottomCards()[0]; + game.cardsGotoOrdering(card); + player.showCards(card); + player.chooseUseTarget(card,true,false,'nodistance').set('filterTarget',function(card,player,target){ + var evt=_status.event; + if(_status.event.name=='chooseTarget') evt=evt.getParent(); + if(target!=player&&target!=evt.juetao_target) return false; + return lib.filter.targetEnabledx(card,player,target); + }).set('juetao_target',target); + 'step 3' + if(result.bool&&target.isIn()) event.goto(2); + }, + }, + zhushi:{ + audio:2, + usable:1, + trigger:{global:'recoverEnd'}, + direct:true, + zhuSkill:true, + filter:function(event,player){ + return player!=event.player&&event.player.group=='wei'&&event.player==_status.currentPhase&& + event.player.isIn()&&player.hasZhuSkill('zhushi',event.player); + }, + content:function(){ + 'step 0' + var str=get.translation(player); + trigger.player.chooseBool('是否响应'+get.translation(player)+'的主公技【助势】?','令'+get.translation(player)+'摸一张牌').set('goon',get.attitude(trigger.player,player)>0).set('ai',()=>_status.event.goon); + 'step 1' + if(result.bool){ + player.logSkill('zhushi'); + trigger.player.line(player,'thunder'); + player.draw(); + } + else player.storage.counttrigger.zhushi--; + }, + }, + //骆统 + renzheng:{ + audio:2, + trigger:{global:['damageCancelled','damageZero','damageAfter']}, + forced:true, + filter:function(event,player,name){ + if(name=='damageCancelled') return true; + for(var i of event.change_history){ + if(i<0) return true; + } + return false; + }, + content:function(){ + player.draw(2); + }, + }, + jinjian:{ + audio:2, + trigger:{source:'damageBegin1'}, + logTarget:'player', + filter:function(event,player){ + return !event.jinjian_source2&&!player.hasSkill('jinjian_source2'); + }, + prompt2:'令即将对其造成的伤害+1', + check:function(event,player){ + return get.attitude(player,event.player)<0&&!event.player.hasSkillTag('filterDamage',null,{ + player:player, + card:event.card, + }); + }, + content:function(){ + trigger.jinjian_source=true; + trigger.num++; + player.addTempSkill('jinjian_source2') + }, + group:'jinjian_player', + subSkill:{ + player:{ + audio:'jinjian', + trigger:{player:'damageBegin4'}, + filter:function(event,player){ + return !event.jinjian_player2&&!player.hasSkill('jinjian_player2'); + }, + prompt2:'令即将受到的伤害-1', + content:function(){ + trigger.jinjian_player=true; + trigger.num--; + player.addTempSkill('jinjian_player2') + }, + }, + source2:{ + trigger:{source:'damageBegin1'}, + forced:true, + charlotte:true, + filter:function(event,player){ + return !event.jinjian_source; + }, + content:function(){ + trigger.num--; + trigger.jinjian_source2=true; + player.removeSkill('jinjian_source2'); + }, + marktext:' -1 ', + intro:{ + content:'下次造成的伤害-1', + }, + }, + player2:{ + trigger:{player:'damageBegin3'}, + forced:true, + charlotte:true, + filter:function(event,player){ + return !event.jinjian_player; + }, + content:function(){ + trigger.num++; + trigger.jinjian_player2=true; + player.removeSkill('jinjian_player2'); + }, + marktext:' +1 ', + intro:{ + content:'下次受到的伤害+1', + }, + }, + }, + ai:{ + maixie_defend:true, + threaten:0.9, + effect:{ + target:function(card,player,target){ + if(player.hasSkillTag('jueqing')) return; + //if(target.hujia) return; + if(player._jinjian_tmp) return; + if(_status.event.getParent('useCard',true)||_status.event.getParent('_wuxie',true)) return; + if(get.tag(card,'damage')){ + if(target.hasSkill('jinjian_player2')){ + return [1,-2]; + } + else{ + if(get.attitude(player,target)>0){ + return [0,0.2]; + } + if(get.attitude(player,target)<0&&!player.hasSkillTag('damageBonus')){ + var sha=player.getCardUsable({name:'sha'}); + player._jinjian_tmp=true; + var num=player.countCards('h',function(card){ + if(card.name=='sha'){ + if(sha==0){ + return false; + } + else{ + sha--; + } + } + return get.tag(card,'damage')&&player.canUse(card,target)&&get.effect(target,card,player,player)>0; + }); + delete player._jinjian_tmp; + if(player.hasSkillTag('damage')){ + num++; + } + if(num<2){ + return [0,0.8]; + } + } + } + } + } + } + } + }, + //冯妤 + tiqi:{ + audio:2, + trigger:{global:['phaseDrawEnd','phaseDrawSkipped','phaseDrawCancelled']}, + filter:function(event,player){ + if(player==event.player) return false; + var num=0; + event.player.getHistory('gain',function(evt){ + if(evt.getParent().name=='draw'&&evt.getParent('phaseDraw')==event) num+=evt.cards.length; + }); + return num!=2; + }, + frequent:true, + logTarget:'player', + content:function(){ + 'step 0' + var num=0; + trigger.player.getHistory('gain',function(evt){ + if(evt.getParent().name=='draw'&&evt.getParent('phaseDraw')==trigger) num+=evt.cards.length; + }); + num=Math.abs(num-2); + event.num=num; + player.draw(num); + 'step 1' + if(trigger.player.isIn()){ + player.chooseControl(' +'+num+' ',' -'+num+' ','cancel2').set('prompt','是否改变'+get.translation(trigger.player)+'本回合的手牌上限?').set('ai',function(){ + var sgn=get.sgn(get.attitude(_status.event.player,_status.event.getTrigger().player)); + if(sgn==0) return 2; + if(sgn==1) return 0; + return 1; + }); + } + else event.finish(); + 'step 2' + if(result.index<2){ + var target=trigger.player; + player.line(target); + if(!target.storage.tiqi_effect) target.storage.tiqi_effect=0; + target.storage.tiqi_effect+=(num*get.sgn(0.5-result.index)); + target.addTempSkill('tiqi_effect'); + target.markSkill('tiqi_effect'); + } + }, + subSkill:{ + effect:{ + mod:{ + maxHandcard:function(player,num){ + if(typeof player.storage.tiqi_effect=='number') return num+player.storage.tiqi_effect; + }, + }, + charlotte:true, + onremove:true, + mark:true, + intro:{ + content:(num)=>('手牌上限'+(num<0?'':'+')+num), + }, + }, + }, + }, + baoshu:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + filter:function(event,player){ + return player.maxHp>0; + }, + content:function(){ + 'step 0' + player.chooseTarget([1,player.maxHp],get.prompt('baoshu'),'令至多'+get.cnNumber(player.maxHp)+'名角色重置武将牌并获得“梳”').set('ai',function(target){ + var att=get.attitude(player,target); + if(att<=0) return 0; + //if(target.isTurnedOver()) return 3*att; + if(target.isLinked()&&get.effect(target,{name:'tiesuo'},player,player)>0) return 1.6*att; + if(ui.selected.targets.length>=Math.sqrt(1+player.maxHp)) return 0; + if(target!=player) return 1.3*att; + return att; + }); + 'step 1' + if(result.bool){ + var targets=result.targets; + targets.sortBySeat(); + player.logSkill('baoshu',targets); + event.targets=targets; + event.num=0; + event.num2=(1+player.maxHp-targets.length); + } + else event.finish(); + 'step 2' + var target=targets[num]; + event.target=target; + if(!target.isIn()){ + if(num0; + }, + content:function(){ + 'step 0' + var suits=[],hs=player.getCards('h'); + for(var i of hs){ + suits.add(get.suit(i,player)); + } + var num=suits.length; + event.num=num; + var cards=get.cards(num); + game.cardsGotoOrdering(cards); + var next=player.chooseToMove(); + next.set('list',[ + ['牌堆顶',cards], + ['牌堆底'], + ]); + next.set('prompt','天运:点击将牌移动到牌堆顶或牌堆底'); + next.processAI=function(list){ + var cards=list[0][1] + return [[],cards]; + } + 'step 1' + var top=result.moved[0]; + var bottom=result.moved[1]; + top.reverse(); + for(var i=0;i1&&player.hp>5-num); + 'step 3' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + target.draw(num); + player.loseHp(); + } + else game.delayx(); + }, + group:'tianyun_gain', + subSkill:{ + gain:{ + audio:'tianyun', + trigger:{ + global:'phaseBefore', + player:'enterGame', + }, + forced:true, + locked:false, + filter:function(event,player){ + if(event.name=='phase'&&game.phaseNumber!=0) return false; + var suits=lib.suit.slice(0),hs=player.getCards('h'); + for(var i of hs){ + suits.remove(get.suit(i,player)); + if(!suits.length) return false; + } + return true; + }, + content:function(){ + var suits=lib.suit.slice(0),hs=player.getCards('h'); + for(var i of hs){ + suits.remove(get.suit(i,player)); + } + var cards=[]; + for(var i of suits){ + var card=get.cardPile(function(card){ + return get.suit(card,false)==i; + }); + if(card) cards.push(card); + } + if(cards.length) player.gain(cards,'gain2'); + }, + }, + }, + }, + wfyuyan:{ + audio:2, + derivation:'refenyin', + trigger:{global:'roundStart'}, + forced:true, + locked:false, + content:function(){ + 'step 0' + var next=player.chooseTarget('请选择【预言】的目标',true).set('animate',false).set('ai',function(){ + return Math.random(); + }); + 'step 1' + if(result.bool){ + player.storage.wfyuyan=result.targets[0]; + player.addSkill('wfyuyan_dying'); + player.addSkill('wfyuyan_damage'); + } + }, + subSkill:{ + dying:{ + trigger:{global:'dying'}, + forced:true, + charlotte:true, + popup:false, + content:function(){ + if(trigger.player==player.storage.wfyuyan){ + player.logSkill('wfyuyan',trigger.player); + player.addTempSkill('iwasawa_refenyin',{player:'phaseEnd'}); + } + player.removeSkill('wfyuyan_dying'); + }, + }, + damage:{ + trigger:{global:'damageSource'}, + forced:true, + popup:false, + charlotte:true, + filter:function(event,player){ + return event.source&&event.source.isIn(); + }, + content:function(){ + if(trigger.source==player.storage.wfyuyan){ + player.logSkill('wfyuyan',trigger.source); + player.draw(2); + } + player.removeSkill('wfyuyan_damage'); + }, + }, + }, + }, + //张宝 + xinzhoufu:{ + audio:'zhoufu', + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')>0; + }, + filterCard:true, + filterTarget:function(card,player,target){ + return target!=player&&!target.getExpansions('xinzhoufu2').length; + }, + check:function(card){ + return 6-get.value(card) + }, + position:'he', + discard:false, + lose:false, + delay:false, + content:function(){ + target.addToExpansion(cards,player,'give').gaintag.add('xinzhoufu2'); + target.addSkill('xinzhoufu_judge'); + }, + ai:{ + order:9, + result:{ + target:function(player,target){ + if(player.inRange(target)) return -1.3; + return -1; + }, + }, + }, + subSkill:{ + judge:{ + audio:'zhoufu', + trigger:{player:'judgeBefore'}, + forced:true, + charlotte:true, + filter:function(event,player){ + return !event.directresult&&player.getExpansions('xinzhoufu2').length; + }, + content:function(){ + var cards=[player.getExpansions('xinzhoufu2')[0]]; + trigger.directresult=cards[0]; + }, + }, + }, + }, + xinzhoufu2:{ + intro:{ + content:'expansion', + markcount:'expansion', + }, + }, + xinyingbing:{ + audio:'yingbin', + trigger:{player:'useCardToPlayered'}, + forced:true, + logTarget:'target', + filter:function(event,player){ + return event.target.getExpansions('xinzhoufu2').length>0&&!player.hasHistory('gain',function(evt){ + var evtx=evt.getParent(2); + return evtx&&evtx.name=='xinyingbing'&&evtx._trigger.target==event.target; + }); + }, + content:function(){ + player.draw(2); + }, + ai:{ + effect:{ + player:function(card,player,target){ + if(target&&target.getExpansions('xinzhoufu2').length>0&&!player.hasHistory('gain',function(evt){ + var evtx=evt.getParent(2); + return evtx&&evtx.name=='xinyingbing'&&evtx._trigger.target==target; + })) return [1,1]; + }, + }, + }, + }, + //孙翊 + syjiqiao:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + content:function(){ + var cards=get.cards(player.maxHp); + cards.sort(function(a,b){ + return get.color(b).length-get.color(a).length; + }); + player.addToExpansion(cards,'gain2').gaintag.add('syjiqiao'); + player.addTempSkill('syjiqiao_gain','phaseUseAfter'); + }, + onremove:function(player,skill){ + var cards=player.getExpansions(skill); + if(cards.length) player.loseToDiscardpile(cards); + }, + intro:{ + content:'expansion', + markcount:'expansion', + }, + subSkill:{ + gain:{ + audio:'syjiqiao', + trigger:{player:'useCardAfter'}, + charlotte:true, + forced:true, + filter:function(event,player){ + return player.hasCard((card)=>card.hasGaintag('syjiqiao'),'x'); + }, + content:function(){ + 'step 0' + var cards=player.getExpansions('syjiqiao') + var dialog=['激峭:选择获得一张牌'] + var reds=[],blacks=[]; + for(var i of cards) (get.color(i)=='red'?reds:blacks).push(i); + if(reds.length>0){ + dialog.push('
    红色牌
    '); + dialog.push(reds); + } + if(blacks.length>0){ + dialog.push('
    黑色牌
    '); + dialog.push(blacks); + }; + player.chooseButton(dialog,true).set('ai',function(button){ + var player=_status.event.player; + var color=get.color(button.link),cards=player.getExpansions('syjiqiao'); + var num1=cards.filter((card)=>get.color(card)==color).length,num2=cards.length-num1; + if(num1>=num2) return get.value(button.link); + return 0; + }); + 'step 1' + if(result.bool){ + player.gain(result.links,'gain2'); + } + else event.finish(); + 'step 2' + var map={red:0,black:0},cards=player.getExpansions('syjiqiao') + for(var i of cards){ + var color=get.color(i,false); + if(map[color]!=undefined) map[color]++; + } + if(map.red==map.black) player.recover(); + else player.loseHp(); + }, + onremove:function(player){ + var cards=player.getExpansions('syjiqiao') + if(cards.length) player.loseToDiscardpile(cards); + }, + }, + }, + }, + syxiongyi:{ + audio:2, + skillAnimation:true, + animationColor:'wood', + limited:true, + enable:'chooseToUse', + filter:function(event,player){ + if(event.type!='dying') return false; + if(player!=event.dying) return false; + return true; + }, + content:function(){ + 'step 0' + player.awakenSkill('syxiongyi'); + if(!_status.characterlist){ + lib.skill.pingjian.initList(); + } + event.hp=1-player.hp; + if(_status.characterlist.contains('xushi')){ + if(player.name1=='re_sunyi'||player.name2=='re_sunyi') event._result={control:'re_sunyi'}; + else if(player.name2!=undefined){ + player.chooseControl(player.name1,player.name2).set('prompt','请选择要更换的武将牌'); + } + else event._result={control:player.name1}; + hp+=2; + _status.characterlist.remove('xushi'); + _status.characterlist.add('re_sunyi'); + player.reinit('re_sunyi','xushi',false); + } + else{ + player.addSkillLog('olhunzi'); + event.goto(2); + } + 'step 1' + event.hp+=2; + var name=result.control; + _status.characterlist.remove('xushi'); + _status.characterlist.add(name); + player.reinit(name,'xushi',false); + 'step 2' + var hp=event.hp; + if(hp>0) player.recover(hp); + }, + ai:{ + order:1, + save:true, + skillTagFilter:function(player,arg,target){ + return player==target; + }, + result:{ + player:10 + }, + }, + derivation:['olhunzi','reyingzi','gzyinghun'], + }, + gzyinghun_re_sunyi:{audio:1}, + reyingzi_re_sunyi:{audio:1}, + //曹金玉 + yuqi:{ + audio:2, + trigger:{global:'damageEnd'}, + init:function(player){ + if(!player.storage.yuqi) player.storage.yuqi=[0,3,1,1]; + }, + getInfo:function(player){ + if(!player.storage.yuqi) player.storage.yuqi=[0,3,1,1]; + return player.storage.yuqi; + }, + onremove:true, + usable:2, + filter:function(event,player){ + var list=lib.skill.yuqi.getInfo(player); + return event.player.isIn()&&get.distance(player,event.player)<=list[0]; + }, + logTarget:'player', + content:function(){ + 'step 0' + event.list=lib.skill.yuqi.getInfo(player); + var cards=get.cards(event.list[1]); + event.cards=cards; + game.cardsGotoOrdering(cards); + var next=player.chooseToMove(true,'隅泣(若对话框显示不完整,可下滑操作)'); + next.set('list',[ + ['牌堆顶的牌',cards], + ['交给'+get.translation(trigger.player)+'(至少一张'+(event.list[2]>1?(',至多'+get.cnNumber(event.list[2])+'张'):'')+')'], + ['交给自己(至多'+get.cnNumber(event.list[3])+'张)'], + ]); + next.set('filterMove',function(from,to,moved){ + var info=lib.skill.yuqi.getInfo(_status.event.player); + if(to==1) return moved[1].length0) card2=cards.shift(); + else card2=cards.pop(); + return [cards,[card2],cards1]; + }); + next.set('filterOk',function(moved){ + return moved[1].length>0; + }); + 'step 1' + if(result.bool){ + var moved=result.moved; + cards.removeArray(moved[1]); + cards.removeArray(moved[2]); + while(cards.length){ + ui.cardPile.insertBefore(cards.pop().fix(),ui.cardPile.firstChild); + } + var list=[[trigger.player,moved[1]]]; + if(moved[2].length) list.push([player,moved[2]]); + game.loseAsync({ + gain_list:list, + giver:player, + animate:'gain2', + }).setContent('gaincardMultiple'); + } + }, + mark:true, + intro:{ + content:function(storage,player){ + var info=lib.skill.yuqi.getInfo(player); + return '
    蓝色:'+info[0]+' 红色:'+info[1]+'
    绿色:'+info[2]+' 黄色:'+info[3]+'
    ' + }, + }, + ai:{ + threaten:8.8, + }, + }, + shanshen:{ + audio:2, + trigger:{global:'die'}, + direct:true, + content:function(){ + 'step 0' + event.goon=!player.hasAllHistory('sourceDamage',function(evt){ + return evt.player==trigger.player; + }); + var list=lib.skill.yuqi.getInfo(player); + player.chooseControl('蓝色('+list[0]+')','红色('+list[1]+')','绿色('+list[2]+')','黄色('+list[3]+')','cancel2').set('prompt',get.prompt('shanshen')).set('prompt2','令〖隅泣〗中的一个数字+2'+(event.goon?'并回复1点体力':'')).set('ai',function(){ + var player=_status.event.player,info=lib.skill.yuqi.getInfo(player); + if(info[0]info[0]; + })) return 0; + return 2; + }); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('shanshen',trigger.player); + var list=lib.skill.yuqi.getInfo(player); + list[result.index]=Math.min(5,list[result.index]+2); + game.log(player,'将',result.control,'数字改为','#y'+list[result.index]) + player.markSkill('yuqi'); + if(event.goon) player.recover(); + } + }, + }, + xianjing:{ + audio:2, + trigger:{player:'phaseZhunbeiBegin'}, + direct:true, + content:function(){ + 'step 0' + var list=lib.skill.yuqi.getInfo(player); + player.chooseControl('蓝色('+list[0]+')','红色('+list[1]+')','绿色('+list[2]+')','黄色('+list[3]+')','cancel2').set('prompt',get.prompt('xianjing')).set('prompt2','令〖隅泣〗中的一个数字+1').set('ai',function(){ + var player=_status.event.player,info=lib.skill.yuqi.getInfo(player); + if(info[0]info[0]; + })) return 0; + return 2; + }); + 'step 1' + if(result.control!='cancel2'){ + player.logSkill('xianjing'); + var list=lib.skill.yuqi.getInfo(player); + list[result.index]=Math.min(5,list[result.index]+1); + game.log(player,'将',result.control,'数字改为','#y'+list[result.index]) + player.markSkill('yuqi'); + if(player.isDamaged()) event.finish(); + } + else event.finish(); + 'step 2' + var list=lib.skill.yuqi.getInfo(player); + player.chooseControl('蓝色('+list[0]+')','红色('+list[1]+')','绿色('+list[2]+')','黄色('+list[3]+')','cancel2').set('prompt','是否令〖隅泣〗中的一个数字+1?').set('ai',function(){ + var player=_status.event.player,info=lib.skill.yuqi.getInfo(player); + if(info[0]info[0]; + })) return 0; + return 2; + }); + 'step 3' + if(result.control!='cancel2'){ + var list=lib.skill.yuqi.getInfo(player); + list[result.index]=Math.min(5,list[result.index]+1); + game.log(player,'将',result.control,'数字改为','#y'+list[result.index]) + player.markSkill('yuqi'); + } + }, + }, + //周夷 + zhukou:{ + audio:2, + trigger:{source:'damageSource'}, + filter:function(event,player){ + if(!player.getHistory('useCard').length) return false; + var evt=event.getParent('phaseUse'); + if(!evt||!evt.player) return false; + return player.getHistory('sourceDamage',function(evtx){ + return evtx.getParent('phaseUse')==evt; + }).indexOf(event)==0; + }, + frequent:true, + content:function(){ + player.draw(player.getHistory('useCard').length); + }, + group:'zhukou_all', + subSkill:{ + all:{ + audio:'zhukou', + trigger:{player:'phaseJieshuBegin'}, + filter:function(event,player){ + return game.countPlayer((current)=>(current!=player))>1&&!player.getHistory('sourceDamage').length; + }, + direct:true, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('zhukou'),'对两名其他角色各造成1点伤害',2,lib.filter.notMe).set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); + }); + 'step 1' + if(result.bool){ + var targets=result.targets.sortBySeat(); + player.logSkill('zhukou',targets); + for(var i of targets) i.damage(); + } + }, + }, + }, + }, + mengqing:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return game.countPlayer((current)=>current.isDamaged())>player.hp; + }, + juexingji:true, + skillAnimation:true, + animationColor:'wood', + content:function(){ + player.awakenSkill('mengqing'); + player.gainMaxHp(3); + player.recover(3); + player.removeSkill('zhukou'); + player.addSkill('yuyun'); + }, + derivation:'yuyun', + }, + yuyun:{ + trigger:{player:'phaseUseBegin'}, + forced:true, + filter:function(event,player){ + return player.hp>0||player.maxHp>1; + }, + content:function(){ + 'step 0' + if(player.maxHp<=1) event._result={control:'失去体力',index:0}; + else if(player.hp<1) event._result={control:'减体力上限',index:1}; + else player.chooseControl('失去体力','减体力上限').set('prompt','玉陨:失去1点体力或减1点体力上限').set('ai',function(){ + var player=_status.event.player; + if(player.hp<2||player.getDamagedHp()>2) return 1; + return 0; + }); + 'step 1' + if(result.index==1) player.loseMaxHp(); + else player.loseHp(); + 'step 2' + event.videoId=lib.status.videoId++; + var func=function(player,id){ + var list=[ + '选项一:摸两张牌', + '选项二:对一名其他角色造成1点伤害,且本回合对其使用【杀】无距离和次数限制', + '选项三:本回合手牌上限视为无限', + '选项四:获得一名其他角色区域内的一张牌', + '选项五:令一名其他角色将手牌数摸至体力上限(至多摸至五张)', + ]; + var choiceList=ui.create.dialog('玉陨:请选择一'+(player.getDamagedHp()>0?('至'+get.cnNumber(player.getDamagedHp()+1)):'')+'项'); + choiceList.videoId=id; + for(var i=0;ilib.filter.canBeGained(card,current,player),'hej'); + }).map(function(target){ + return get.effect(target,{name:'shunshou_copy'},player,player); + })); + break; + case 4: + var num=0; + game.countPlayer(function(current){ + if(current!=player&&get.attitude(player,current)>0){ + var num2=Math.min(5,current.maxHp)-current.countCards('h'); + if(num2>num) num=num2; + } + }); + return num*0.8; + break; + } + }); + if(player.getDamagedHp()>0) next.set('selectButton',[1,1+player.getDamagedHp()]); + 'step 3' + if(player.isOnline2()){ + player.send('closeDialog',event.videoId); + } + event.dialog.close(); + result.links.sort(); + for(var i of result.links) game.log(player,'选择了','#g【玉陨】','的','#y选项'+get.cnNumber(1+i,true)) + event.links=result.links; + if(result.links.contains(0)) player.draw(2); + if(result.links.contains(2)) player.addTempSkill('yuyun_114514'); + 'step 4' + if(event.links.contains(1)&&game.hasPlayer(function(current){ + return current!=player; + })) player.chooseTarget(lib.filter.notMe,true,'对一名其他角色造成1点伤害').set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player); + }); + else if(event.links.contains(3)) event.goto(6); + else if(event.links.contains(4)) event.goto(8); + else event.finish(); + 'step 5' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + target.damage(); + player.markAuto('yuyun_sha',[target]); + player.addTempSkill('yuyun_sha'); + } + if(event.links.contains(3)) event.goto(6); + else if(event.links.contains(4)) event.goto(8); + else event.finish(); + 'step 6' + if(event.links.contains(3)&&game.hasPlayer(function(current){ + return current!=player&¤t.hasCard((card)=>lib.filter.canBeGained(card,current,player),'hej'); + })){ + player.chooseTarget(true,'获得一名其他角色区域内的一张牌',function(card,player,current){ + return current!=player&¤t.hasCard((card)=>lib.filter.canBeGained(card,current,player),'hej'); + }).set('ai',function(target){ + var player=_status.event.player; + return get.effect(target,{name:'shunshou_copy'},player,player); + }); + } + else if(event.links.contains(4)) event.goto(8); + else event.finish(); + 'step 7' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + player.gainPlayerCard(target,'hej',true); + } + if(!event.links.contains(4)) event.finish(); + 'step 8' + if(event.links.contains(4)&&game.hasPlayer(function(current){ + return current!=player&¤t.countCards('h')2){ + return Math.min(5,target.maxHp)-target.countCards('h'); + } + return att/3; + }); + } + else event.finish(); + 'step 9' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + target.drawTo(Math.min(5,target.maxHp)); + } + }, + subSkill:{ + '114514':{ + mod:{ + maxHandcardFinal:function(player,num){ + return 114514; + }, + }, + charlotte:true, + }, + sha:{ + mod:{ + cardUsableTarget:function(card,player,target){ + if(card.name=='sha'&&player.getStorage('yuyun_sha').contains(target)) return Infinity; + }, + targetInRange:function(card,player,target){ + if(card.name=='sha'&&player.getStorage('yuyun_sha').contains(target)) return true; + }, + }, + charlotte:true, + onremove:true, + }, + }, + }, + //潘淑 + zhiren:{ + audio:2, + trigger:{player:'useCard'}, + filter:function(event,player){ + return (player==_status.currentPhase||player.hasSkill('yaner_zhiren'))&&event.card.isCard&&player.getHistory('useCard',function(evt){ + return evt.card.isCard; + }).indexOf(event)==0; + }, + frequent:true, + locked:false, + content:function(){ + 'step 0' + event.num=get.translation(trigger.card.name).length; + player.chooseToGuanxing(event.num); + if(event.num<2) event.finish(); + 'step 1' + if(!game.hasPlayer(function(current){ + return current.countDiscardableCards(player,'e')>0; + })){ + event.goto(3); + } + else player.chooseTarget('织纴:是否弃置一名角色装备区内的一张牌?',function(card,player,target){ + return target.countDiscardableCards(player,'e')>0; + }).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target),es=target.getCards('e'),val=0; + for(var i of es){ + var eff=-(get.value(i,target)-0.1)*att; + if(eff>val) val=eff; + } + return eff; + }); + 'step 2' + if(result.bool){ + var target=result.targets[0]; + player.addExpose(0.15); + player.line(target,'green'); + player.discardPlayerCard(target,'e',true); + } + else event.goto(5); + if(event.num<3) event.finish(); + 'step 3' + if(!game.hasPlayer(function(current){ + return current.countDiscardableCards(player,'j')>0; + })){ + if(event.num<3) event.finish(); + else event.goto(5); + } + else player.chooseTarget('织纴:是否弃置一名角色判定区内的一张牌?',function(card,player,target){ + return target.countDiscardableCards(player,'j')>0; + }).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target),es=target.getCards('j'),val=0; + for(var i of es){ + var eff=-(get.effect(target,i,target,player)) + if(eff>val) val=eff; + } + return eff; + }); + 'step 4' + if(result.bool){ + var target=result.targets[0]; + player.addExpose(0.15); + player.line(target,'green'); + player.discardPlayerCard(target,'j',true); + } + if(event.num<3) event.finish(); + 'step 5' + player.recover(); + if(event.num<4) event.finish(); + 'step 6' + player.draw(3); + }, + mod:{ + aiOrder:function(player,card,num){ + if(player==_status.currentPhase&&!player.getHistory('useCard',function(evt){ + return evt.card.isCard; + }).length) return num+Math.pow(get.translation(card.name).length,2); + }, + }, + }, + yaner:{ + audio:2, + trigger:{ + global:['equipAfter','addJudgeAfter','loseAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + filter:function(event,player){ + var current=_status.currentPhase; + if(!current||current==player||!current.isIn()||!current.isPhaseUsing()) return false; + var evt=event.getl(current); + return evt&&evt.hs&&evt.hs.length&¤t.countCards('h')==0; + }, + usable:1, + logTarget:function(){ + return _status.currentPhase; + }, + prompt2:'与该角色各摸两张牌', + check:function(event,player){ + return get.attitude(player,_status.currentPhase)>0; + }, + content:function(){ + 'step 0' + game.asyncDraw([_status.currentPhase,player],2); + 'step 1' + var e1=player.getHistory('gain',function(evt){ + return evt.getParent(2)==event; + })[0]; + if(e1&&e1.cards&&e1.cards.length==2&&get.type(e1.cards[0])==get.type(e1.cards[1])){ + player.addTempSkill('yaner_zhiren',{player:'phaseBegin'}); + game.log(player,'修改了技能','#g【织纴】'); + } + var target=_status.currentPhase; + if(target.isIn()&&target.isDamaged()){ + var e2=target.getHistory('gain',function(evt){ + return evt.getParent(2)==event; + })[0]; + if(e2&&e2.cards&&e2.cards.length==2&&get.type(e2.cards[0])==get.type(e2.cards[1])) target.recover(); + } + 'step 2' + game.delayx(); + }, + subSkill:{ + zhiren:{charlotte:true}, + }, + ai:{ + expose:0.5, + }, + }, + //杨婉 + youyan:{ + audio:2, + // trigger:{ + // player:'loseAfter', + // global:'loseAsyncAfter', + // }, + trigger:{ + player:['loseAfter','equipAfter'], + global:['loseAsyncAfter','cardsDiscardAfter'], + }, + //usable:1, + prompt2:function(event,player){ + var cards2=[]; + if(event.name=='cardsDiscard'){ + var evtx=event.getParent(); + if(evtx.name!='orderingDiscard') return false; + var evtx2=(evtx.relatedEvent||evtx.getParent()); + if(evtx2.name=='useCard'||evtx2.name=='respond') return false; + player.getHistory('lose',evtx3=>{ + var evtx4=evtx3.relatedEvent||evtx3.getParent(); + if(evtx2!=evtx4) return false; + if(!evtx3.cards2||!evtx3.cards2.length) return false; + cards2.addArray(evtx3.cards2.filterInD('d')); + }); + } + else if(event.name=='loseAsync'){ + player.hasHistory('lose',evt=>{ + if(evt.getParent()!=event||evt.position!=ui.discardPile) return false; + cards2.addArray(evt.cards2.filterInD('d')); + }); + } + else{ + cards2.addArray(event.getd(player).filterInD('d')); + } + return '获得与'+get.translation(cards2)+'花色'+(cards2.length>1?'各':'')+'不相同的牌各一张'; + }, + filter:function(event,player){ + if(player!=_status.currentPhase) return false; + var cards2=[]; + if(event.name=='cardsDiscard'){ + var evtx=event.getParent(); + if(evtx.name!='orderingDiscard') return false; + var evtx2=(evtx.relatedEvent||evtx.getParent()); + if(evtx2.name=='useCard'||evtx2.name=='respond') return false; + player.getHistory('lose',evtx3=>{ + var evtx4=evtx3.relatedEvent||evtx3.getParent(); + if(evtx2!=evtx4) return false; + if(!evtx3.cards2||!evtx3.cards2.length) return false; + cards2.addArray(evtx3.cards2.filterInD('d')); + }); + } + else if(event.name=='loseAsync'){ + player.hasHistory('lose',evt=>{ + if(evt.getParent()!=event||evt.position!=ui.discardPile) return false; + cards2.addArray(evt.cards2.filterInD('d')); + }); + } + else{ + cards2.addArray(event.getd(player).filterInD('d')); + } + if(!cards2.length) return false; + var list=[]; + for(var i of cards2){ + list.add(get.suit(i,player)); + if(list.length>=lib.suit.length) return false; + } + var evt=event.getParent('phaseUse'); + if(evt&&evt.player==player&&!evt.youyaned) return true; + var evt=event.getParent('phaseDiscard'); + if(evt&&evt.player==player&&!evt.youyaned) return true; + return false; + }, + content:function(){ + var evt=trigger.getParent('phaseUse'); + if(evt&&evt.player==player) evt.youyaned=true; + else{ + var evt=trigger.getParent('phaseDiscard'); + if(evt) evt.youyaned=true; + } + var list=[],cards=[]; + var cards2=[]; + if(trigger.name=='cardsDiscard'){ + var evtx=trigger.getParent(); + if(evtx.name!='orderingDiscard') return false; + var evtx2=(evtx.relatedEvent||evtx.getParent()); + if(evtx2.name=='useCard'||evtx2.name=='respond') return false; + player.getHistory('lose',evtx3=>{ + var evtx4=evtx3.relatedEvent||evtx3.getParent(); + if(evtx2!=evtx4) return false; + if(!evtx3.cards2||!evtx3.cards2.length) return false; + cards2.addArray(evtx3.cards2.filterInD('d')); + }); + } + else if(trigger.name=='loseAsync'){ + player.hasHistory('lose',evt=>{ + if(evt.getParent()!=trigger||evt.position!=ui.discardPile) return false; + cards2.addArray(evt.cards2.filterInD('d')); + }); + } + else{ + cards2.addArray(trigger.getd(player).filterInD('d')); + } + for(var i of cards2){ + list.add(get.suit(i,player)); + } + for(var i of lib.suit){ + if(list.contains(i)) continue; + var card=get.cardPile2(function(card){ + return get.suit(card,false)==i; + }) + if(card) cards.push(card); + } + if(cards.length) player.gain(cards,'gain2'); + }, + ai:{ + effect:{ + player_use:function(card,player,target){ + if(typeof card=='object'&&player==_status.currentPhase&& + //(!player.storage.counttrigger||!player.storage.counttrigger.youyan)&& + player.needsToDiscard()==1&&card.cards&&card.cards.filter(function(i){ + return get.position(i)=='h'; + }).length>0&&!get.tag(card,'draw')&&!get.tag(card,'gain')&&!get.tag(card,'discard')) return 'zeroplayertarget'; + }, + }, + }, + }, + zhuihuan:{ + audio:2, + trigger:{player:'phaseJieshuBegin'}, + direct:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return !current.hasSkill('zhuihuan2_new'); + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt('zhuihuan'),'令一名角色获得“追还”效果',function(card,player,target){ + return !target.hasSkill('zhuihuan2_new'); + }).set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target); + if(target.hasSkill('maixie')||target.hasSkill('maixie_defend')) att/=3; + if(target!=player) att/=Math.pow(game.players.length-get.distance(player,target,'absolute'),0.7); + return att; + }).set('animate',false); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('zhuihuan'); + target.addTempSkill('zhuihuan2_new',{player:'phaseZhunbei'}); + game.delayx(); + } + }, + }, + zhuihuan2_new:{ + trigger:{player:'phaseZhunbeiBegin'}, + charlotte:true, + forced:true, + onremove:true, + filter:function(event,player){ + if(player.storage.zhuihuan2_new){ + for(var source of player.storage.zhuihuan2_new){ + if(!source.isIn()) continue; + if(source.hp>player.hp) return true; + return source.countCards('h')>0; + } + } + }, + logTarget:function(event,player){ + return player.storage.zhuihuan2_new.filter(function(target){ + return target.isIn(); + }); + }, + content:function(){ + 'step 0' + event.targets=player.storage.zhuihuan2_new; + player.removeSkill('zhuihuan2_new'); + 'step 1' + var target=targets.shift(); + if(target.isIn()){ + if(target.hp>player.hp) target.damage(2); + else{ + var hs=target.getCards('h'); + if(hs.length) target.discard(hs.randomGets(2)); + } + } + if(targets.length) event.redo(); + }, + group:'zhuihuan2_new_count', + subSkill:{ + count:{ + trigger:{player:'damage'}, + forced:true, + silent:true, + popup:false, + charlotte:true, + filter:function(event,player){ + return get.itemtype(event.source)=='player'; + }, + content:function(){ + player.markAuto('zhuihuan2_new',[trigger.source]); + }, + }, + }, + }, + zhuihuan2:{ + trigger:{player:'damageEnd'}, + forced:true, + charlotte:true, + logTarget:'source', + filter:function(event,player){ + var source=event.source; + if(source.hp>player.hp) return true; + return source.countCards('h')>0; + }, + content:function(){ + if(player.hpplayer.getCardUsable({name:'sha'})) return 10; + return -player.getUseValue(button,player); + }; + while(cards.length<3){ + canchoose.sort(function(a,b){ + return getv(b)-getv(a); + }); + cards.push(canchoose.shift()); + } + return [cards,canchoose]; + }) + 'step 1' + if(result.bool){ + event.forceDie=true; + var cards=result.moved[0]; + event.cards=cards; + player.storage.xingzuo2=cards; + var hs=player.getCards('h'); + var lose=[],gain=event.cards2; + for(var i of cards){ + if(hs.contains(i)) lose.push(i); + else gain.remove(i); + } + if(lose.length) player.lose(lose,ui.cardPile); + if(gain.length) player.gain(gain,'draw'); + } + else event.finish(); + 'step 2' + for(var i of cards){ + if(!(('hejsdx').includes(get.position(i,true)))){ + i.fix(); + ui.cardPile.appendChild(i); + } + } + game.updateRoundNumber(); + }, + }, + xingzuo2:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + return game.hasPlayer(function(target){ + return target.countCards('h')>0; + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(function(card,player,target){ + return target.countCards('h')>0; + },'兴作:是否令一名角色将其手牌与牌堆底的三张牌替换?').set('ai',function(target){ + var player=_status.event.player,att=get.attitude(player,target),hs=target.getCards('h'),num=hs.length; + var getv=function(list,target){ + var num=0; + for(var i of list) num+=get.value(i,target); + return num; + },val=getv(hs,target)-getv(player.storage.xingzuo2,target); + if(num<3) return att*Math.sqrt(Math.max(0,-val))*1.5; + if(num==3) return -att*Math.sqrt(Math.max(0,val)); + if(player.hp<(num>4?3:2)) return 0; + return -att*Math.sqrt(Math.max(0,val)); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.logSkill('xingzuo',target); + var cards=get.bottomCards(3); + game.cardsGotoOrdering(cards); + var hs=target.getCards('h'); + target.lose(hs,ui.cardPile); + target.gain(cards,'draw'); + if(hs.length>3) player.loseHp(); + } + else event.finish(); + 'step 2' + game.updateRoundNumber(); + }, + }, + miaoxian:{ + hiddenCard:function(player,name){ + return get.type(name)=='trick'&&!player.getStorage('miaoxian2').contains(name)&&player.countCards('h',{color:'black'})==1; + }, + enable:'chooseToUse', + filter:function(event,player){ + var cards=player.getCards('h',{color:'black'}); + if(cards.length!=1) return false; + var mod2=game.checkMod(cards[0],player,'unchanged','cardEnabled2',player); + if(mod2===false) return false; + var storage=player.getStorage('miaoxian2'); + for(var i of lib.inpile){ + if(!storage.contains(i)&&get.type(i)=='trick'&&event.filterCard({ + name:i, + cards:cards, + },player,event)) return true; + } + return false; + }, + chooseButton:{ + dialog:function(event,player){ + var cards=player.getCards('h',{color:'black'}); + var storage=player.getStorage('miaoxian2'); + var list=[]; + for(var i of lib.inpile){ + if(!storage.contains(i)&&get.type(i)=='trick'&&event.filterCard({ + name:i, + cards:cards, + },player,event)){ + list.push(['锦囊','',i]); + } + } + return ui.create.dialog('妙弦',[list,'vcard'],'hidden'); + }, + check:function(button){ + var player=_status.event.player; + return player.getUseValue({name:button.link[2]})+1; + }, + backup:function(links,player){ + return { + audio:'miaoxian', + popname:true, + filterCard:{color:'black'}, + selectCard:-1, + position:'h', + viewAs:{ + name:links[0][2], + }, + onuse:function(links,player){ + if(!player.storage.miaoxian2) player.storage.miaoxian2=[]; + player.storage.miaoxian2.add(links.card.name); + player.addTempSkill('miaoxian2'); + }, + } + }, + prompt:function(links,player){ + return '将'+get.translation(player.getCards('h',{color:'black'})[0])+'当做'+get.translation(links[0][2])+'使用'; + }, + }, + group:'miaoxian_use', + subfrequent:['use'], + subSkill:{ + use:{ + audio:'miaoxian', + trigger:{player:'loseAfter'}, + frequent:true, + prompt:'是否发动【妙弦】摸一张牌?', + filter:function(event,player){ + var evt=event.getParent(); + if(evt.name!='useCard') return false; + return event.hs&&event.hs.length==1&&event.cards&&event.cards.length==1 + &&get.color(event.hs[0],player)=='red'&&!player.countCards('h',{color:'red'}); + }, + content:function(){ + player.draw(); + }, + }, + backup:{ + audio:'miaoxian', + }, + }, + ai:{ + order:12, + result:{ + player:1, + }, + }, + }, + miaoxian2:{onremove:true}, + //樊玉凤 + bazhan:{ + audio:2, + enable:'phaseUse', + usable:1, + zhuanhuanji:true, + marktext:'☯', + mark:true, + intro:{ + content:function(storage,player){ + return '出牌阶段限一次,'+(storage?'你可以获得一名其他角色的至多两张手牌。':'你可以将至多两张手牌交给一名其他角色。')+'若以此法移动的牌包含【酒】或♥牌,则你可令得到牌的角色执行一项:①回复1点体力。②复原武将牌。' + }, + }, + filter:function(event,player){ + if(player.storage.bazhan){ + return game.hasPlayer(function(current){ + return current!=player&¤t.countGainableCards(player,'h')>0; + }) + } + return player.countCards('h')>0; + }, + filterCard:true, + discard:false, + lose:false, + selectCard:function(){ + if(_status.event.player.storage.bazhan) return 0; + return [1,2]; + }, + filterTarget:function(card,player,target){ + if(player==target) return false; + if(player.storage.bazhan) return target.countGainableCards(player,'h')>0; + return true; + }, + prompt:function(){ + if(_status.event.player.storage.bazhan) return '获得一名其他角色的至多两张手牌'; + return '将至多两张手牌交给一名其他角色'; + }, + delay:false, + check:function(card){ + var player=_status.event.player; + var bool1=false,bool2=false; + for(var i of game.players){ + if(get.attitude(player,i)<=0||player==i) continue; + bool1=true; + if(i.isDamaged()||i.isTurnedOver()){ + bool2=true; + break; + } + } + if(bool2&&!ui.selected.cards.length&&(get.suit(card,player)=='heart'||get.name(card,player)=='jiu')) return 10; + if(bool1) return 9-get.value(card); + if(get.color(card)=='red') return 5-get.value(card); + return 0; + }, + content:function(){ + 'step 0' + if(player.storage.bazhan){ + event.recover=player; + player.gainPlayerCard(target,'h',true,'visibleMove',[1,2]); + } + else{ + event.recover=target; + player.give(cards,target); + } + player.changeZhuanhuanji('bazhan'); + 'step 1' + var target=event.recover; + if(result.bool&&result.cards&&result.cards.length){ + cards=result.cards; + } + if(!cards||!target||!target.getCards('h').filter(function(i){ + return cards.contains(i); + }).length||function(){ + for(var card of cards){ + if(get.suit(card,target)=='heart'||get.name(card,target)=='jiu') return false; + } + return true; + }()){ + event.finish(); + return; + } + var list=[]; + event.addIndex=0; + var str=get.translation(target); + if(target.isDamaged()) list.push('令'+str+'回复一点体力'); + else event.addIndex++; + if(target.isLinked()||target.isTurnedOver()) list.push('令'+get.translation(target)+'复原武将牌'); + if(!list.length) event.finish(); + else player.chooseControl('cancel2').set('choiceList',list).set('ai',function(){ + var evt=_status.event.getParent(); + if(get.attitude(evt.player,evt.target)<0) return 'cancel2'; + if(target.hp>1&&target.isTurnedOver()) return 1-evt.addIndex; + return 0; + }); + 'step 2' + if(result.control=='cancel2') event.finish(); + else if(result.index+event.addIndex==0){ + event.recover.recover(); + event.finish(); + } + else if(event.recover.isLinked()) event.recover.link(); + 'step 3' + if(event.recover.isTurnedOver()) event.recover.turnOver(); + }, + ai:{ + order:7, + result:{ + target:function(player,target){ + if(player.storage.bazhan) return -1; + if(ui.selected.cards.length){ + var cards=ui.selected.cards,card=cards[0]; + if(get.value(cards,target)<0) return -0.5; + if(get.attitude(player,target)>0){ + if((target.isDamaged()||target.isTurnedOver())&&(get.suit(card,target)=='heart'||get.name(card,target)=='jiu')) return 3; + if(target.hasUseTarget(card)&&target.getUseValue(card)>player.getUseValue(card,null,true)) return 1.4; + return 1; + } + } + return 0; + }, + }, + }, + }, + jiaoying:{ + audio:2, + trigger:{source:'gainEnd'}, + forced:true, + filter:function(event,player){ + if(player==event.player) return false; + var evt=event.getl(player); + return evt&&evt.hs&&evt.hs.length; + }, + logTarget:'player', + content:function(){ + var target=trigger.player; + if(!target.storage.jiaoying2) target.storage.jiaoying2=[]; + var cs=trigger.getl(player).hs; + for(var i of cs) target.storage.jiaoying2.add(get.color(i,player)); + target.addTempSkill('jiaoying2'); + target.markSkill('jiaoying2'); + player.addTempSkill('jiaoying3'); + if(!player.storage.jiaoying3) player.storage.jiaoying3=[]; + player.storage.jiaoying3.add(target); + }, + ai:{ + directHit_ai:true, + skillTagFilter:function(player,tag,arg){ + var target=arg.target; + if(target.getStorage('jiaoying2').contains('red')&&get.tag(arg.card,'respondShan')&&!target.hasSkillTag('respondShan',true,null,true)) return true; + return false; + }, + } + }, + jiaoying2:{ + onremove:true, + charlotte:true, + mod:{ + cardEnabled2:function(card,player){ + if(player.getStorage('jiaoying2').contains(get.color(card))) return false; + }, + }, + intro:{ + content:'本回合内不能使用或打出$牌', + }, + }, + jiaoying3:{ + onremove:true, + trigger:{global:'useCard1'}, + silent:true, + firstDo:true, + charlotte:true, + filter:function(event,player){ + return player.storage.jiaoying3.contains(event.player); + }, + content:function(){ + while(player.storage.jiaoying3.contains(trigger.player)) player.storage.jiaoying3.remove(trigger.player); + if(!player.storage.jiaoying3.length) player.removeSkill('jiaoying3'); + }, + group:'jiaoying3_draw', + }, + jiaoying3_draw:{ + trigger:{global:'phaseEnd'}, + direct:true, + charlotte:true, + filter:function(event,player){ + return player.getStorage('jiaoying3').length>0&&game.hasPlayer(function(current){ + return current.countCards('h')<5; + }) + }, + content:function(){ + 'step 0' + player.storage.jiaoying3.shift(); + player.chooseTarget('醮影:令一名角色将手牌摸至五张',function(card,player,target){ + return target.countCards('h')<5; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(att>2){ + return 5-target.countCards('h'); + } + return att/3; + }); + 'step 1' + if(result.bool){ + player.logSkill('jiaoying',result.targets); + for(var i=0;ired) return 'black'; + return 'red'; + }); + 'step 2' + player.storage.pianchong2=result.control; + player.addTempSkill('pianchong2',{player:'phaseBeginStart'}); + player.popup(result.control,result.control=='red'?'fire':'thunder'); + game.log(player,'声明了','#y'+get.translation(result.control)); + }, + ai:{ + threaten:4.8, + }, + }, + pianchong2:{ + audio:'pianchong', + trigger:{ + player:'loseAfter', + global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], + }, + forced:true, + charlotte:true, + onremove:true, + filter:function(event,player){ + var evt=event.getl(player); + if(!evt||!evt.cards2||!evt.cards2.length) return false; + for(var i of evt.cards2){ + if(get.color(i,player)==player.storage.pianchong2) return true; + } + return false; + }, + content:function(){ + 'step 0' + var num=trigger.getl(player).cards2.filter(function(card){ + return get.color(card,player)==player.storage.pianchong2; + }).length; + var cards=[]; + while(num--){ + var card=get.cardPile2(function(card){ + return !cards.contains(card)&&get.color(card,false)!=player.storage.pianchong2; + }); + if(card) cards.push(card); + else break; + } + if(cards.length) player.gain(cards,'gain2'); + }, + mark:true, + intro:{ + content:'失去一张$牌后,从牌堆中获得一张与此牌颜色不同的牌', + }, + }, + zunwei:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return !player.storage.zunwei||player.storage.zunwei.length<3; + }, + chooseButton:{ + dialog:function(event,player){ + var list=[ + '选择体力值大于你的一名角色', + '选择手牌数大于你的一名角色', + '选择装备数大于你的一名角色', + ]; + var choiceList=ui.create.dialog('尊位:清选择一项','forcebutton','hidden'); + for(var i=0;iplayer.hp; + }, + content:function(){ + player.recover(target.hp-player.hp); + if(!player.storage.zunwei) player.storage.zunwei=[]; + player.storage.zunwei.add(0); + }, + ai:{ + order:10, + result:{ + player:function(player,target){ + return (Math.min(target.hp,player.maxHp)-player.hp); + }, + }, + }, + }, + { + filterTarget:function(card,player,target){ + return target.countCards('h')>player.countCards('h'); + }, + content:function(){ + player.draw(Math.min(5,target.countCards('h')-player.countCards('h'))); + if(!player.storage.zunwei) player.storage.zunwei=[]; + player.storage.zunwei.add(1); + }, + ai:{ + order:10, + result:{ + player:function(player,target){ + return Math.min(5,target.countCards('h')-player.countCards('h')); + }, + }, + }, + }, + { + filterTarget:function(card,player,target){ + return target.countCards('e')>player.countCards('e'); + }, + content:function(){ + 'step 0' + if(!player.storage.zunwei) player.storage.zunwei=[]; + player.storage.zunwei.add(2); + event.num=1; + 'step 1' + var type='equip'+num; + if(!player.isEmpty(type)) return; + var card=get.cardPile2(function(card){ + return get.subtype(card,false)==type&&player.canUse(card,player); + }); + if(card) player.chooseUseTarget(card,true).nopopup=true; + 'step 2' + event.num++; + if(event.num<=5&&target.isAlive()&&player.countCards('e')0?1:0; + }); + 'step 1' + player.addTempSkill('rezhongjian2',{player:'phaseBeginStart'}); + //var str=['造成伤害弃牌','受到伤害摸牌'][result.index]; + //player.popup(str,['fire','wood'][result.index]); + //game.log(player,'选择了','#y'+str) + player.storage.rezhongjian2[result.index].push(target); + player.markSkill('rezhongjian2'); + }, + ai:{ + order:10, + expose:0, + result:{ + player:function(player,target){ + if(get.attitude(player,target)==0) return false; + var sgn=get.sgn((get.realAttitude||get.attitude)(player,target)); + if(game.countPlayer(function(current){ + return get.sgn((get.realAttitude||get.attitude)(player,current))==sgn; + })<=game.countPlayer(function(current){ + return get.sgn((get.realAttitude||get.attitude)(player,current))!=sgn; + })) return 1; + return 0.9; + }, + }, + }, + }, + rezhongjian2:{ + trigger:{ + global:['damageSource','damageEnd'], + }, + forced:true, + filter:function(event,player,name){ + var num=(name=='damageSource'?0:1); + var logTarget=(name=='damageSource'?event.source:event.player); + return logTarget&&logTarget.isAlive()&&player.storage.rezhongjian2[num].contains(logTarget); + }, + logTarget:function(event,player,name){ + return (name=='damageSource'?event.source:event.player); + }, + content:function(){ + var num=(event.triggername=='damageSource'?0:1); + var target=(event.triggername=='damageSource'?trigger.source:trigger.player); + var storage=player.storage.rezhongjian2; + storage[num].remove(target); + if(storage[0].length+storage[1].length) player.markSkill('rezhongjian2'); + else player.removeSkill('rezhongjian2'); + target[event.triggername=='damageSource'?'chooseToDiscard':'draw'](2,true,'he'); + player.draw(); + }, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=[[],[]]; + }, + onremove:true, + intro:{ + markcount:function(storage){ + return storage[0].length+storage[1].length; + }, + mark:function(dialog,storage,player){ + if(player==game.me||player.isUnderControl()){ + if(storage[0].length){ + dialog.addText('弃牌'); + dialog.add([storage[0],'player']); + } + if(storage[1].length){ + dialog.addText('摸牌'); + dialog.add([storage[1],'player']); + } + } + else{ + var list=storage[0].concat(storage[1]).sortBySeat(player); + dialog.add([list,'player']); + } + }, + }, + }, + recaishi:{ + trigger:{player:'phaseDrawEnd'}, + direct:true, + audio:'caishi', + isSame:function(event){ + var cards=[]; + event.player.getHistory('gain',function(evt){ + if(evt.getParent().name=='draw'&&evt.getParent('phaseDraw')==event) cards.addArray(evt.cards); + }); + if(!cards.length) return 'nogain'; + var list=[]; + for(var i=0;i0; + })==0; + }); + 'step 1' + if(result.bool){ + player.logSkill('recaishi'); + player.recover(); + player.addTempSkill('recaishi3'); + } + }, + }, + recaishi2:{}, + recaishi3:{ + mod:{ + targetEnabled:function(card,player,target){ + if(player==target) return false; + }, + }, + mark:true, + intro:{content:'本回合内不能对自己使用牌'}, + }, + //刘辩 + shiyuan:{ + audio:2, + trigger:{target:'useCardToTargeted'}, + frequent:true, + filter:function(event,player){ + var num=1; + if(_status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.group=='qun'&&player.hasZhuSkill('yuwei',_status.currentPhase)) num=2; + return player!=event.player&&player.getHistory('gain',function(evt){ + return evt.getParent(2).name=='shiyuan'&&evt.cards.length==(2+get.sgn(event.player.hp-player.hp)); + }).length0; + }, + content:function(){ + var list=[]; + var list2=[]; + var cards=trigger.getd(); + for(var i=0;i4?8:4); + game.getGlobalHistory('cardMove',function(evt){ + if(evt.name=='cardsDiscard'||(evt.name=='lose'&&evt.position==ui.discardPile)) num+=evt.cards.length; + }); + event.set('liji_num',Math.floor(num/evt2.liji_all)); + }, + filterCard:true, + position:'he', + check:function(card){ + var val=get.value(card); + if(!_status.event.player.getStorage('refenyin_mark').contains(get.suit(card))) return 12-val; + return 8-val; + }, + filterTarget:lib.filter.notMe, + content:function(){ + target.damage('nocard'); + }, + ai:{ + order:1, + result:{ + target:-1.5 + }, + tag:{ + damage:1 + }, + }, + }, + //文鸯 + xinlvli:{ + audio:'lvli', + trigger:{player:'damageEnd',source:'damageSource'}, + filter:function(event,player,name){ + var stat=player.getStat().skill; + if(!stat.xinlvli) stat.xinlvli=0; + if(name=='damageEnd'&&!player.storage.beishui) return false; + if(stat.xinlvli>1) return false; + if(stat.xinlvli>0&&(player!=_status.currentPhase||!player.storage.choujue)) return false; + if(player.hp==player.countCards('h')) return false; + if(player.hp0) player.draw(num); + else player.recover(-num); + }, + //group:'lvli3', + }, + lvli:{ + audio:2, + init:function(player,skill){ + player.storage[skill]=0; + }, + enable:'chooseToUse', + filter:function(event,player){ + if(player.storage.lvli>1) return false; + if(player.storage.lvli>0&&(player!=_status.currentPhase||!player.storage.choujue)) return false; + return event.type!='wuxie'&&event.type!='respondShan'; + }, + chooseButton:{ + dialog:function(event,player){ + var list=[]; + for(var i=0;i=Math.random()){ + player.popup('洗具'); + } + else{ + player.popup('杯具'); + trigger.cancel(); + if(!trigger.getParent().lvli6){ + trigger.getParent().goto(0); + } + game.broadcastAll(function(str){ + var dialog=ui.create.dialog(str); + dialog.classList.add('center'); + setTimeout(function(){ + dialog.close(); + },1000); + },get.translation(player)+'声明的'+get.translation(trigger.card.name)+'并没有生效'); + game.log('然而什么都没有发生'); + game.delay(2); + } + }, + }, + lvli3:{ + trigger:{global:'phaseBefore'}, + forced:true, + silent:true, + popup:false, + content:function(){ + player.storage.lvli=0; + }, + }, + lvli4:{ + log:false, + enable:'chooseToUse', + viewAsFilter:function(player){ + if(player.storage.lvli>1) return false; + if(player.storage.lvli>0&&(player!=_status.currentPhase||!player.storage.choujue)) return false; + return true; + }, + filterCard:function(){return false}, + selectCard:-1, + viewAs:{name:'shan'}, + ai:{ + skillTagFilter:function(player){ + if(player.storage.lvli>1) return false; + if(player.storage.lvli>0&&(player!=_status.currentPhase||!player.storage.choujue)) return false; + return true; + }, + threaten:1.5, + respondShan:true, + } + }, + lvli5:{ + log:false, + enable:'chooseToUse', + viewAsFilter:function(player){ + if(player.storage.lvli>1) return false; + if(player.storage.lvli>0&&(player!=_status.currentPhase||!player.storage.choujue)) return false; + return true; + }, + filterCard:function(){return false}, + selectCard:-1, + viewAs:{name:'wuxie'}, + }, + lvli6:{ + trigger:{player:'damageEnd'}, + direct:true, + filter:function(event,player){ + if(!player.storage.beishui) return false; + if(player.storage.lvli>1) return false; + if(player.storage.lvli>0&&(player!=_status.currentPhase||!player.storage.choujue)) return false; + return true; + }, + content:function(){ + var next=player.chooseToUse(); + next.set('norestore',true); + next.set('_backupevent','lvli'); + next.backup('lvli'); + next.set('lvli6',true); + }, + }, + choujue:{ + derivation:['beishui','qingjiao'], + trigger:{global:'phaseAfter'}, + audio:2, + skillAnimation:true, + animationColor:'water', + unique:true, + juexingji:true, + forced:true, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=false; + }, + filter:function(event,player){ + if(player.storage.choujue) return false; + return Math.abs(player.hp-player.countCards('h'))>=3; + }, + content:function(){ + player.awakenSkill('choujue'); + player.storage.choujue=true; + player.loseMaxHp(); + player.addSkill('beishui'); + }, + }, + beishui:{ + trigger:{player:'phaseZhunbeiBegin'}, + audio:2, + skillAnimation:'epic', + animationColor:'thunder', + unique:true, + juexingji:true, + forced:true, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]=false; + }, + filter:function(event,player){ + if(player.storage.beishui) return false; + return Math.min(player.hp,player.countCards('h'))<2; + }, + content:function(){ + player.awakenSkill('beishui'); + player.storage.beishui=true; + player.loseMaxHp(); + player.addSkill('qingjiao'); + }, + }, + qingjiao:{ + trigger:{player:'phaseUseBegin'}, + filter:function(event,player){ + if(!ui.cardPile.hasChildNodes()&&!ui.discardPile.hasChildNodes()); + var hs=player.getCards('h'); + if(!hs.length) return false; + for(var i of hs){ + if(!lib.filter.cardDiscardable(i,player,'qingjiao')) return false; + } + return true; + }, + //check:function(event,player){ + // return player.countCards('h')<=player.hp; + //}, + content:function(){ + 'step 0' + player.chooseToDiscard(true,'h',player.countCards('h')); + 'step 1' + var evt=trigger.getParent(); + if(evt&&evt.getParent&&!evt.qingjiao){ + evt.qingjiao=true; + var next=game.createEvent('qingjiao_discard',false,evt.getParent()); + next.player=player; + next.setContent(function(){ + var hs=player.getCards('he'); + if(hs.length) player.discard(hs); + }); + } + 'step 2' + var list=[]; + var typelist=[]; + var getType=function(card){ + var sub=get.subtype(card); + if(sub) return sub; + return card.name; + }; + for(var i=0;i=8) break; + } + } + if(list.length<8){ + for(var i=0;i=8) break; + } + } + } + player.gain(list,'gain2'); + }, + }, + //王双 + spzhuilie:{ + mod:{ + targetInRange:function(card){ + if(card.name=='sha') return true; + }, + }, + trigger:{player:'useCardToTargeted'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&!player.inRange(event.target); + }, + forced:true, + logTarget:'target', + content:function(){ + 'step 0' + player.judge(function(card){ + var type=get.subtype(card); + return ['equip1','equip4','equip3','equip6'].contains(type)?6:-6; + switch(type){ + case 'equip':return 4; + case 'trick':return -4; + default:return 0; + } + }).judge2=function(result){ + return result.bool; + }; + 'step 1' + if(trigger.getParent().addCount!==false){ + trigger.getParent().addCount=false; + var stat=player.getStat(); + if(stat&&stat.card&&stat.card.sha) stat.card.sha--; + } + if(result.bool===true){ + var map=trigger.customArgs; + var id=trigger.target.playerid; + if(!map[id]) map[id]={}; + if(typeof map[id].extraDamage!='number') map[id].extraDamage=0; + map[id].extraDamage+=trigger.target.hp-1; + } + else if(result.bool===false) player.loseHp(); + }, + }, + spzhuilie2:{ + onremove:true, + intro:{ + content:'使用【杀】的次数上限+#', + }, + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+player.countMark('spzhuilie2'); + }, + }, + }, + //花鬘 + manyi:{ + audio:2, + audioname:['mengyou'], + }, + hmmanyi:{ + trigger:{target:'useCardToBefore'}, + forced:true, + audio:'manyi', + audioname:['mengyou'], + filter:function(event,player){ + return event.card.name=='nanman'; + }, + content:function(){ + trigger.cancel(); + }, + }, + mansi:{ + audio:2, + group:'mansi_viewas', + trigger:{global:'damageEnd'}, + filter:function(event,player){ + return event.card&&event.card.name=='nanman'; + }, + frequent:true, + content:function(){ + player.draw(); + player.addMark('mansi',1,false); + }, + intro:{content:'已因此技能获得了#张牌'}, + }, + mansi_viewas:{ + audio:'mansi', + position:'h', + enable:'phaseUse', + usable:1, + filterCard:true, + selectCard:-1, + filter:function(event,player){ + var hs=player.getCards('h'); + if(!hs.length) return false; + for(var i=0;i0; + } + else{ + var source=event.player; + return source.getHistory('useCard',function(evt){ + return evt.targets&&evt.targets.contains(player); + }).indexOf(event.getParent())>0; + } + }, + content:function(){ + 'step 0' + var next=player.chooseToDiscard('he'); + var prompt; + if(event.triggername=='useCardToTargeted'){ + event.target=trigger.player; + prompt='令'+get.translation(trigger.card)+'对你无效'; + next.set('goon',-get.effect(player,trigger.card,trigger.player,player)); + } + else{ + event.target=trigger.targets[0]; + prompt='弃置一张牌,并获得'+get.translation(trigger.cards.filterInD()); + next.set('goon',get.value(trigger.cards.filterInD())); + } + next.set('prompt',get.prompt('souying',event.target)); + next.set('prompt2',prompt) + next.set('ai',function(card){ + return _status.event.goon-get.value(card); + }); + next.set('logSkill',['souying',event.target]); + 'step 1' + if(result.bool){ + player.addTempSkill('souying2'); + if(event.triggername=='useCardToPlayered') player.gain(trigger.cards.filterInD(),'gain2'); + else trigger.excluded.add(player); + } + }, + ai:{ + expose:0.25, + }, + }, + souying2:{}, + zhanyuan:{ + unique:true, + audio:2, + derivation:'hmxili', + skillAnimation:true, + animationColor:'soil', + juexingji:true, + forced:true, + filter:function(event,player){ + return player.countMark('mansi')>7; + }, + trigger:{player:'phaseZhunbeiBegin'}, + content:function(){ + 'step 0' + player.awakenSkill('zhanyuan'); + player.gainMaxHp(); + player.recover(); + 'step 1' + player.chooseTarget('是否失去〖蛮嗣〗,令一名其他男性角色和自己一同获得技能〖系力〗?',function(card,player,target){ + return target!=player&&target.hasSex('male'); + }).ai=function(target){ + return get.attitude(_status.event.player,target); + }; + 'step 2' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'fire'); + player.addSkill('hmxili'); + target.addSkill('hmxili'); + player.removeSkill('mansi'); + } + }, + }, + hmxili:{ + trigger:{global:'damageBegin1'}, + direct:true, + audio:2, + filter:function(event,player){ + return event.source&&event.source!=player&&event.source==_status.currentPhase&&event.source.hasSkill('hmxili')&&!event.player.hasSkill('hmxili')&&player.countCards('he')>0&&!player.hasSkill('hmxili2'); + }, + content:function(){ + 'step 0' + player.chooseToDiscard('是否弃置一张牌,令'+get.translation(trigger.source)+'对'+get.translation(trigger.player)+'的伤害+1,且你与其各摸两张牌?','he').set('logSkill',['hmxili',trigger.player]).ai=function(card){ + return 9-get.value(card); + }; + 'step 1' + if(result.bool){ + game.asyncDraw([trigger.source,player],2); + trigger.num++; + player.addTempSkill('hmxili2'); + } + else event.finish(); + 'step 2' + game.delayx(); + }, + }, + hmxili2:{}, + //吴兰雷铜 + wlcuorui:{ + audio:2, + trigger:{player:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + if(!['identity','guozhan'].contains(get.mode())){ + return game.hasPlayer(function(current){ + return current.isFriendOf(player)&¤t.countDiscardableCards(player,'hej')>0; + }); + } + return game.hasPlayer(current=>{ + return get.distance(player,current)<=1&¤t.countDiscardableCards(player,'hej')>0; + }); + }, + content:function(){ + 'step 0' + if(!['identity','guozhan'].contains(get.mode())){ + player.chooseTarget(function(card,player,target){ + return target.isFriendOf(player)&&target.countDiscardableCards(player,'hej')>0; + },get.prompt2('wlcuorui')).set('ai',function(target){ + if(target.countCards('e',function(card){ + return card.name!='tengjia'&&get.value(card,target)<=0; + })) return 10; + if(target.countCards('j',function(card){ + return get.effect(target,{name:card.viewAs||card.name},target,target)<0; + })) return 10; + return Math.random()+0.2-1/target.countCards('hej'); + }); + } + else{ + player.chooseTarget(function(card,player,target){ + return get.distance(player,target)<=1&&target.countDiscardableCards(player,'hej')>0; + },get.prompt2('wlcuorui')).set('ai',function(target){ + if(game.hasPlayer(current=>{ + return current!=target&&get.attitude(_status.event.player,current)<0; + })) return get.effect(target,{name:'guohe'},player,player)+10; + return 0; + }); + } + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('wlcuorui',target); + player.discardPlayerCard(target,'hej',true); + if(['identity','guozhan'].contains(get.mode())) event.goto(7); + } + else event.finish(); + 'step 2' + if(!result.cards||!result.cards.length){ + event.finish(); + return; + } + var color=get.color(result.cards[0],result.cards[0].original=='j'?false:target); + event.color=color; + var list=[]; + if(game.hasPlayer(function(current){ + return (get.mode()=='versus'?current.isEnemyOf(player):current!=player&¤t!=target)&¤t.countCards('h'); + })) list.push('展示手牌'); + if(game.hasPlayer(function(current){ + return (get.mode()=='versus'?current.isEnemyOf(player):current!=player&¤t!=target)&¤t.countCards('e',{color:color}); + })) list.push('弃置装备'); + if(!list.length){ + event.finish(); + return; + } + if(list.length==1) event._result={control:list[0]}; + else player.chooseControl(list).set('prompt','挫锐:展示对手的至多两张手牌,或弃置对手装备区内至多两张'+get.translation(color)+'牌').set('ai',function(){ + var player=_status.event.player; + var color=_status.event.getParent().color; + if(game.countPlayer(function(current){ + if(!current.isEnemyOf(player)) return false; + return current.countCards('e',function(card){ + return get.color(card)==color&&get.value(card)>0; + }); + })>1) return 1; + return 0; + }); + 'step 3' + if(result.control=='弃置装备') event.goto(5); + else{ + var dialog=['请选择要展示的牌']; + var list=game.filterPlayer(function(current){ + return current.isEnemyOf(player)&¤t.countCards('h'); + }).sortBySeat(); + for(var i of list){ + dialog.push('
    '+get.translation(i)+'
    '); + if(player.hasSkillTag('viewHandcard',null,i,true)) dialog.push(i.getCards('h')); + else dialog.push([i.getCards('h'),'blank']); + } + player.chooseButton([1,2],true).set('createDialog',dialog).set('ai',function(button){ + var color=(get.color(button.link)==_status.event.getParent().color); + return color?Math.random():0.35; + }); + } + 'step 4' + player.showCards(result.links); + var map={}; + var map2={}; + for(var i of result.links){ + var id=get.owner(i).playerid; + if(!map[id]) map[id]=[]; + map[id].push(i); + if(get.color(i)!=event.color) continue; + if(!map2[id]) map2[id]=[]; + map2[id].push(i); + } + for(var i in map){ + var source=(_status.connectMode?lib.playerOL:game.playerMap)[i]; + if(map2[i]) player.gain(map2[i],source,'bySelf','give'); + player.line(source); + game.log(player,'展示了',source,'的',map[i]); + } + event.next.sort(function(a,b){ + return lib.sort.seat(a.source||a.player,b.source||b.player); + }); + event.finish(); + 'step 5' + var dialog=['请选择要弃置的牌']; + var list=game.filterPlayer(function(current){ + return current.isEnemyOf(player)&¤t.countCards('e',function(card){ + return get.color(card)==event.color; + }); + }).sortBySeat(); + for(var i of list){ + dialog.push('
    '+get.translation(i)+'
    '); + dialog.push(i.getCards('e',function(card){ + return get.color(card)==event.color; + })); + } + player.chooseButton([1,2],true).set('createDialog',dialog).set('ai',function(button){ + var owner=get.owner(button.link); + return get.value(button.link,owner) + }); + 'step 6' + var map={}; + for(var i of result.links){ + if(get.color(i)!=event.color) continue; + var id=get.owner(i).playerid; + if(!map[id]) map[id]=[]; + map[id].push(i); + } + for(var i in map){ + (_status.connectMode?lib.playerOL:game.playerMap)[i].discard(map[i],'notBySelf').discarder=player; + } + event.next.sort(function(a,b){ + return lib.sort.seat(a.player,b.player); + }); + event.finish(); + 'step 7' + if(!result.cards||!result.cards.length){ + event.finish(); + return; + } + var color=get.color(result.cards[0],result.cards[0].original=='j'?false:target); + event.color=color; + var next=player.chooseTarget(true,'挫锐:选择另一名其他角色','弃置该角色装备区里至多两张'+get.translation(event.color)+'牌;或展示该角色的至多两张手牌,然后获得其中的'+get.translation(event.color)+'牌'); + next.set('filterTarget',(card,player,target)=>{ + return target.countCards('he')>0&&target!=player&&target!=_status.event.getParent().target; + }); + next.set('ai',target=>{ + return -get.attitude(_status.event.player,target)*target.countCards('he')+0.1; + }); + 'step 8' + if(result.bool){ + var targetx=result.targets[0]; + event.targetx=targetx; + player.line(targetx); + player.choosePlayerCard(targetx,'he',true,[1,2]).set('prompt','展示至多两张手牌,或弃置至多两张'+get.translation(event.color)+'装备').set('filterButton',button=>{ + if(ui.selected.buttons.length){ + var linkx=ui.selected.buttons[0].link; + if(get.position(button.link)!=get.position(linkx)) return false; + } + if(get.position(button.link)=='e') return get.color(button.link,_status.event.target)==_status.event.getParent().color; + return true; + }).set('target',targetx); + } + else event.finish(); + 'step 9' + if(result.bool){ + var cards=result.links; + if(get.position(cards[0])=='e'){ + event.targetx.discard(cards,'notBySelf').discarder=player; + event.finish(); + } + else{ + player.showCards(cards,get.translation(event.targetx)+'因【挫锐】展示的牌'); + var cards2=cards.filter(card=>{ + return get.color(card)==event.color; + }); + if(cards2.length) player.gain(cards2,event.targetx,'give'); + } + } + }, + }, + kuiji:{ + audio:2, + usable:1, + enable:"phaseUse", + filter:function(event,player){ + if(player.hasJudge('bingliang')) return false; + return player.countCards('hes',function(card){ + return get.color(card)=='black'&&get.type(card)=='basic'; + })>0; + }, + position:'hes', + discard:false, + lose:false, + delay:false, + prepare:function(cards,player){ + player.$give(cards,player,false); + }, + filterCard:function(card,player,event){ + return get.color(card)=='black'&&get.type(card)=='basic'&&player.canAddJudge({name:'bingliang',cards:[card]}); + }, + selectTarget:-1, + filterTarget:function(card,player,target){ + return player==target; + }, + check:function(card){ + return 9-get.value(card); + }, + // onuse:function(links,player){ + // var next=game.createEvent('kuiji_content',false,_status.event.getParent()); + // next.player=player; + // next.setContent(lib.skill.kuiji.kuiji_content); + // }, + // kuiji_content:function(){ + content:function(){ + 'step 0' + player.addJudge({name:'bingliang'},cards); + player.draw(); + 'step 1' + var next=player.chooseTarget().set('ai',function(target){ + var player=_status.event.player; + return get.damageEffect(target,player,player) + }); + if(!['identity','guozhan'].contains(get.mode())){ + next.set('prompt','选择一名体力值最大的敌方角色,对其造成2点伤害'); + next.set('filterTarget',function(card,player,target){ + return target.isEnemyOf(player)&&!game.hasPlayer(function(current){ + return current.isEnemyOf(player)&¤t.hp>target.hp; + }); + }); + } + else{ + next.set('prompt','选择一名除你外体力值最大的角色,对其造成2点伤害'); + next.set('filterTarget',function(card,player,target){ + return player!=target&&!game.hasPlayer(function(current){ + return current!=player&¤t.hp>target.hp; + }); + }); + } + 'step 2' + if(result.bool){ + var target=result.targets[0]; + player.line(target); + target.damage(2); + } + }, + ai:{ + result:{ + target:function(player,target){ + if(!['identity','guozhan'].contains(get.mode())) return 1; + var target=game.filterPlayer(i=>i!=player).sort((a,b)=>b.hp-a.hp)[0]; + return target&&get.damageEffect(target,player,player)>0?1:0; + }, + }, + order:12, + }, + group:'kuiji_dying', + subSkill:{ + dying:{ + trigger:{global:'dying'}, + forced:true, + popup:false, + filter:function(event,player){ + var evt=event.getParent(2); + if(!evt||evt.name!='kuiji_content'||evt.player!=player) return false; + var list=game.filterPlayer(function(current){ + return current.isFriendOf(player); + }).sort(function(a,b){ + return a.hp-b.hp; + }); + return (list.length==1||list[0].hp0; + }, + check:function(){return 1}, + filterCard:true, + filterTarget:function(event,player,target){ + return target!=player&&target.canEquip(ui.selected.cards[0],true); + }, + prepare:'give', + discard:false, + lose:false, + content:function(){ + 'step 0' + target.equip(cards[0]); + 'step 1' + if(cards[0].name.indexOf('pyzhuren_')==0&&!player.getCards('e').contains(cards[0])) player.draw(2); + }, + ai:{ + order:11, + expose:0.2, + result:{ + target:function(player,target){ + if(ui.selected.cards.length){ + var card=ui.selected.cards[0]; + if(target.getEquip(card)||target.countCards('h',{subtype:get.subtype(card)})) return 0; + return get.effect(target,card,player,target); + } + return 0; + }, + }, + }, + }, + pyzhuren:{ + audio:2, + enable:'phaseUse', + usable:1, + filterCard:true, + selectCard:1, + check:function(card){ + var player=_status.event.player; + var name='pyzhuren_'+(card[card.name=='shandian'?'name':'suit']); + if(!lib.card[name]||_status.pyzhuren&&_status.pyzhuren[name]){ + if(!player.countCards('h','sha')) return 4-get.value(card); + return 0; + } + return 7-get.value(card); + }, + content:function(){ + player.addSkill('pyzhuren_destroy'); + if(!_status.pyzhuren) _status.pyzhuren={}; + var rand=0.85; + var num=get.number(cards[0]); + if(num>4) rand=0.9; + if(num>8) rand=0.95; + if(num>12||cards[0].name=='shandian'||get.isLuckyStar(player)) rand=1; + var name='pyzhuren_'+(cards[0][cards[0].name=='shandian'?'name':'suit']); + if(!lib.card[name]||_status.pyzhuren[name]||Math.random()>rand){ + player.popup('杯具'); + game.log(player,'锻造失败'); + var card=get.cardPile(function(card){ + return card.name=='sha'; + }); + if(card) player.gain(card,'gain2'); + } + else{ + _status.pyzhuren[name]=true; + player.gain(game.createCard(name,cards[0].name=='shandian'?'spade':cards[0].suit,1),'gain2') + } + }, + ai:{ + order:10, + result:{ + player:1, + }, + }, + }, + pyzhuren_destroy:{ + trigger:{global:['loseEnd','cardsDiscardEnd']}, + forced:true, + charlotte:true, + filter:function(event,player){ + var cs=event.cards; + for(var i=0;i0; + }, + content:function(){ + 'step 0' + var next=player.chooseToDiscard('he',function(card,player){ + return card!=player.getEquip('pyzhuren_diamond'); + },get.prompt(event.name,trigger.player),'弃置一张牌,令即将对其造成的伤害+1'); + next.ai=function(card){ + if(_status.event.goon) return 6-get.value(card); + return -1; + }; + next.set('goon',get.attitude(player,trigger.player)<0&&!trigger.player.hasSkillTag('filterDamage',null,{ + player:player, + card:trigger.card, + })); + next.logSkill=[event.name,trigger.player]; + 'step 1' + if(result.bool) trigger.num++; + else player.storage.counttrigger.pyzhuren_diamond--; + }, + ai:{ + expose:0.25, + }, + }, + pyzhuren_club:{ + audio:true, + trigger:{player:'useCard2'}, + direct:true, + equipSkill:true, + filter:function(event,player){ + if(event.card.name!='sha'&&get.type(event.card)!='trick') return false; + var info=get.info(event.card); + if(info.allowMultiple==false) return false; + var num=player.getHistory('useSkill',function(evt){ + return evt.skill=='pyzhuren_club'; + }).length; + if(num>=2) return false; + if(event.targets&&!info.multitarget){ + if(game.hasPlayer(function(current){ + return lib.filter.targetEnabled2(event.card,player,current)&&!event.targets.contains(current); + })){ + return true; + } + } + return false; + }, + content:function(){ + 'step 0' + var prompt2='为'+get.translation(trigger.card)+'额外指定一个目标'; + player.chooseTarget([1,player.storage.fumian_red],get.prompt(event.name),function(card,player,target){ + var player=_status.event.player; + if(_status.event.targets.contains(target)) return false; + return lib.filter.targetEnabled2(_status.event.card,player,target); + }).set('prompt2',prompt2).set('ai',function(target){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + return get.effect(target,trigger.card,player,player); + }).set('targets',trigger.targets).set('card',trigger.card); + 'step 1' + if(result.bool){ + if(!event.isMine()&&!event.isOnline()) game.delayx(); + event.targets=result.targets; + } + 'step 2' + if(event.targets){ + player.logSkill(event.name,event.targets); + trigger.targets.addArray(event.targets); + } + }, + }, + pyzhuren_spade:{ + audio:true, + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + return event.card.name=='sha';//&&event.targets.length==1&&get.color(event.card)=='black'; + }, + check:function(event,player){ + return get.attitude(player,event.target)<=0; + }, + logTarget:'target', + content:function(){ + var num=player.getHistory('useSkill',function(evt){ + return evt.skill=='pyzhuren_spade'; + }).length; + trigger.target.loseHp(Math.min(num,5));//.set('source',player); + }, + ai:{ + jueqing:true, + unequip_ai:true, + skillTagFilter:function(player,tag,arg){ + if(tag=='unequip_ai'){ + if(arg&&arg.name=='sha'&&get.color(arg.card)=='black') return true; + return false; + } + } + }, + }, + pyzhuren_shandian:{ + audio:true, + trigger:{player:'useCardToPlayered'}, + filter:function(event,player){ + return event.card.name=='sha';//&&event.targets.length==1; + }, + check:function(event,player){ + return get.attitude(player,event.target)<=0; + }, + logTarget:'target', + content:function(){ + 'step 0' + trigger.target.judge(function(card){ + var suit=get.suit(card); + if(suit=='spade') return -10; + if(suit=='club') return -5; + return 0; + }).judge2=function(result){ + return result.color=='black'?true:false; + }; + 'step 1' + if(result.suit=='spade'){ + trigger.target.damage(3,'thunder'); + //trigger.getParent().excluded.add(trigger.target); + } + else if(result.suit=='club'){ + trigger.target.damage('thunder'); + player.recover(); + player.draw(); + } + }, + }, + //管辂和葛玄 + gxlianhua:{ + derivation:['reyingzi','reguanxing','xinzhiyan','gongxin'], + audio:2, + init:function(player,skill){ + if(!player.storage[skill]) player.storage[skill]={ + red:0,black:0, + } + }, + marktext:'丹', + intro:{ + name:'丹血', + markcount:function(storage){ + return storage.red+storage.black; + }, + content:function(storage){ + return '共有'+(storage.red+storage.black)+'个标记'; + }, + }, + trigger:{global:'damageEnd'}, + forced:true, + locked:false, + filter:function(event,player){ + return event.player!=player&&event.player.isAlive()&&_status.currentPhase!=player; + }, + content:function(){ + player.storage.gxlianhua[player.getFriends().contains(trigger.player)?'red':'black']++; + player.markSkill('gxlianhua'); + }, + group:'gxlianhua_harmonia', + subSkill:{ + harmonia:{ + forced:true, + audio:'gxlianhua', + sub:true, + trigger:{player:'phaseZhunbeiBegin'}, + //filter:function(event,player){ + // return player.storage.gxlianhua&&player.storage.gxlianhua.red+player.storage.gxlianhua.black>0; + //}, + forced:true, + content:function(){ + var cards=[]; + var cards2=[]; + var skill=''; + var red=player.storage.gxlianhua.red; + var black=player.storage.gxlianhua.black; + player.storage.gxlianhua={red:0,black:0}; + player.unmarkSkill('gxlianhua'); + if(red+black<4){ + cards=['tao']; + skill='reyingzi'; + } + else if(red>black){ + cards=['wuzhong']; + skill='reguanxing'; + } + else if(red0) return 1 + return -5/(target.countCards('h')+1); + }, + }, + }, + }, + busuan_angelbeats:{ + mark:true, + intro:{ + mark:function(dialog,content,player){ + if(content&&content.length) dialog.add([content,'vcard']); + }, + }, + trigger:{player:'drawBefore'}, + forced:true, + filter:function(event,player){ + return event.getParent().name=='phaseDraw'; + }, + onremove:true, + content:function(){ + 'step 0' + var list=player.storage['busuan_angelbeats']; + var cards=[]; + for(var i=0;i1) player.loseHp(); + event.finish(); + } + else if(event.count<3) player.chooseBool('是否继续发动【命戒】?').ai=function(){ + if(event.count==2) return Math.random()<0.5; + return lib.skill.mingjie.check(); + }; + } + else event.finish(); + 'step 3' + if(result.bool) event.goto(1); + }, + }, + }, + card:{ + pyzhuren_heart:{ + fullskin:true, + derivation:'puyuan', + type:'equip', + subtype:'equip1', + distance:{attackFrom:-2}, + skills:['pyzhuren_heart'], + ai:{ + basic:{ + equipValue:4 + } + }, + }, + pyzhuren_diamond:{ + fullskin:true, + derivation:'puyuan', + type:'equip', + subtype:'equip1', + distance:{attackFrom:-1}, + skills:['pyzhuren_diamond'], + ai:{ + basic:{ + equipValue:3 + } + }, + }, + pyzhuren_club:{ + fullskin:true, + derivation:'puyuan', + type:'equip', + subtype:'equip1', + distance:{attackFrom:-1}, + skills:['pyzhuren_club'], + ai:{ + basic:{ + equipValue:5 + } + }, + loseDelay:false, + onLose:function(){ + var next=game.createEvent('baiyin_recover'); + event.next.remove(next); + var evt=event.getParent(); + if(evt.getlx===false) evt=evt.getParent(); + evt.after.push(next); + next.player=player; + next.setContent(function(){ + if(player.isDamaged()) player.logSkill('pyzhuren_club'); + player.recover(); + }); + }, + }, + pyzhuren_spade:{ + fullskin:true, + derivation:'puyuan', + type:'equip', + subtype:'equip1', + skills:['pyzhuren_spade'], + ai:{ + basic:{ + equipValue:3 + } + }, + }, + pyzhuren_shandian:{ + fullskin:true, + derivation:'puyuan', + type:'equip', + subtype:'equip1', + distance:{attackFrom:-3}, + skills:['pyzhuren_shandian'], + ai:{ + basic:{ + equipValue:3 + } + }, + }, + dagongche:{ + fullskin:true, + derivation:'zhangfen', + type:'equip', + subtype:'equip5', + skills:['dagongche_skill'], + cardPrompt:function(card){ + if(!card.storage) return '出牌阶段开始时,你可以视为使用一张【杀】,且当此【杀】因执行效果而对目标角色造成伤害后,你弃置其一张牌。若此【大攻车】未被强化,则其他角色无法弃置你装备区内的【大攻车】。当此牌离开你的装备区后,销毁之。'; + var str='出牌阶段开始时,你可以视为使用一张'; + if(card.storage.大攻车选项一) str+='无距离限制且无视防具的'; + str+='【杀】'; + if(card.storage.大攻车选项二) str+=('(此【杀】的目标上限+'+card.storage.大攻车选项二+')'); + str+=',且当此【杀】因执行效果而对目标角色造成伤害后,你弃置其'; + var num=1; + if(card.storage.大攻车选项三) num+=card.storage.大攻车选项三; + str+=get.cnNumber(num); + str+='张牌。当此牌离开你的装备区后,销毁之。'; + return str; + }, + destroy:true, + ai:{ + basic:{ + equipValue:3 + } + }, + }, + pilitoushiche:{ + fullskin:true, + derivation:'dc_liuye', + cardimage:'ly_piliche', + type:'equip', + subtype:'equip5', + skills:['pilitoushiche'], + destroy:true, + ai:{ + basic:{ + equipValue:3 + } + }, + }, + }, + characterIntro:{ + puyuan:'蒲元是三国时蜀汉杰出的工匠。为诸葛亮造刀三千口,并且制作木牛流马。后来姜维为他写过两部传记《蒲元传》《蒲元别传》。', + guanlu:"管辂(209年-256年),字公明,平原(今山东德州平原县)人。三国时期曹魏术士。年八九岁,便喜仰观星辰。成人后,精通《周易》,善于卜筮、相术,习鸟语,相传每言辄中,出神入化。体性宽大,常以德报怨。正元初,为少府丞。北宋时被追封为平原子。管辂是历史上著名的术士,被后世奉为卜卦观相的祖师。", + gexuan:"葛玄(164年-244年),汉族,吴丹阳郡句容县都乡吉阳里人(今句容市),祖籍山东琅琊,三国著名高道,道教灵宝派祖师。字孝先,号仙翁,被尊称为“葛天师”。道教尊为葛仙翁,又称太极仙翁,与张道陵、许逊、萨守坚共为四大天师。为汉下邳僮侯葛艾后裔,祖葛矩,安平太守,黄门郎;从祖葛弥,豫章第五郡太守。父葛焉,字德儒,州主簿,山阴令,散骑常侍,大尚书。随左慈学道,得《太清丹经》、《黄帝九鼎神丹经》、《金液丹经》等道经。曾采药海山,吴嘉禾二年(233年),在閤皂山修道建庵,筑坛立炉,修炼九转金丹。喜好遨游山川,去过括苍山、南岳山、罗浮山。编撰《灵宝经诰》,精研上清、灵宝等道家真经,并嘱弟子世世箓传。", + wulan:'吴兰(?~218年),青州(今山东潍坊市)人。东汉末年将领。初为益州牧刘璋部将,后来归降刘备。汉中之战中,与马超、张飞各领一军,驻扎于下辩。建安二十三年,为曹操将领曹洪、张郃所败,退回汉中。途中,为阴平氐族首领强端所杀。', + leitong:'雷铜(?-218年),阴平(今甘肃文县)人,氐族,东汉末年益州名将。本属益州牧刘璋麾下。刘备攻取益州后,归刘备麾下。参加汉中之战,为魏将张郃所杀。', + huaman:'花鬘,古典戏曲《龙凤巾》(一名《化外奇缘》)中的人物,身份为三国时期南蛮王孟获与祝融夫人的女儿,关索的夫人之一。在关于关三小姐·关银屏的民间传说中,其名字为“花中秀”,与关索其他几位夫人鲍三娘、王桃、王悦都被关索之姐关银屏编入自己的女兵营中。花鬘在《三国志》,《三国演义》均未有提及,只是戏曲中的虚构人物。其形象并非一般君主家中闺秀,而是与其母祝融相似,是一个可以披甲上阵,善于刀枪作战的女武将。戏曲中在诸葛亮平定南蛮时,花鬘曾与关索作战,失败被俘,两人互生爱意,南蛮王孟获降服后二人成婚。近些年,花鬘接连在各类三国题材的游戏中登场,更广被人知晓。', + wangshuang:'王双(?-228年),三国时期曹魏将领。蜀汉建兴六年(228年)冬,诸葛亮出散关,攻陈仓,后粮尽而退。王双率领骑兵追击蜀军,但在与蜀军的交战中被击败,王双也被蜀军所斩。在《三国演义》中,王双字子全,是陇西郡狄道县(今甘肃临洮县)人,有万夫不当之勇。在诸葛亮北伐期间,被魏延所斩。', + wenyang:"文俶(238年—291年),一作文淑,字次骞,小名阿鸯,世称文鸯,谯郡(今安徽亳州市)人。魏末晋初名将,曹魏扬州刺史文钦之子。骁勇善战,依附大将军曹爽,效忠于王室。司马师废黜皇帝曹芳后,随父联合毌丘俭于淮南起兵勤王。兵败之后,向南投奔吴国。诸葛诞发动淮南叛乱,奉命率军驰援。双方发生内讧,父亲为诸葛诞所害,遂降于司马昭,封关内侯。西晋建立后,任平虏护军。咸宁三年(277年),拜平西将军、都督凉秦雍州三州军事,大破鲜卑首领秃发树机能,名震天下,迁使持节、护东夷校尉、监辽东军事。八王之乱中,为诸葛诞外孙、东安王司马繇所诬杀,惨遭灭族,时年五十四岁。", + liubian:'刘辩(176年-190年3月6日),是汉灵帝刘宏与何皇后的嫡长子。刘辩在灵帝驾崩后继位为帝,史称少帝,由于年幼,实权掌握在临朝称制的母亲何太后和母舅大将军何进手中。少帝在位时期,东汉政权已经名存实亡,他即位后不久即遭遇以何进为首的外戚集团和以十常侍为首的内廷宦官集团这两大敌对政治集团的火并,被迫出宫,回宫后又受制于以“勤王”为名进京的凉州军阀董卓,终于被废为弘农王,成为东汉唯一被废黜的皇帝,其同父异母弟陈留王刘协继位为帝,是为汉献帝。被废黜一年之后,刘辩在董卓胁迫下自尽,时年仅十五岁(一说十八岁),其弟献帝追谥他为怀王。中国古代的史书中称刘辩为皇子辩、少帝和弘农王等。因为在位不逾年,传统上称东汉共十二帝,刘辩与东汉另一位少帝刘懿都不在其中,亦皆无本纪;不过,现代史学界也有观点承认两位少帝均是汉朝皇帝,则刘辩为东汉第十三位皇帝。', + guozhao:'郭照,电视剧《军师联盟》中的女主角之一,由唐艺昕饰演。原型为文德皇后郭氏(字女王),魏国皇后,张春华的义妹,深爱曹丕,替甄宓抚育曹叡,因甄宓之死被曹叡记恨,曹丕死后,成为皇太后,被曹叡逼上死路。自尽身亡。', + fanyufeng:'樊夫人,东汉末年人物,昔桂阳太守赵范寡嫂。赵云随刘备平定江南四郡后,刘备以赵云为桂阳太守。赵范居心叵测,要将自己的嫂嫂樊氏嫁给赵云,但遭到赵云的拒绝。后来,赵范逃走,樊氏也下落不明。2001年,应日本日中青少年文化中心成立50周年之邀,北京京剧院赴日进行40场巡回演出,这次访日的剧目都不同程度地进行了加工改编,以符合日本观众的需求。《取桂阳》是根据老本重新排演的,叶金援饰赵云,王怡饰樊玉凤。剧中的樊玉凤成为文武双全的巾帼英雄,被赵云收降,后来在《龙凤呈祥》中也参与堵截东吴的追兵。', + ruanyu:'阮瑀(约165—212年),字元瑜,陈留尉氏(今河南开封市尉氏县)人,是东汉末年文学家,建安七子之一。阮瑀所作章表书记很出色,当时军国书檄文字,多为阮瑀与陈琳所拟。名作有《为曹公作书与孙权》。诗有《驾出北郭门行》,描写孤儿受后母虐待的苦难遭遇,比较生动形象。年轻时曾受学于蔡邕,蔡邕称他为“奇才”。后徙为丞相仓曹掾属。诗歌语言朴素,往往能反映出一般的社会问题。阮瑀的音乐修养颇高,他的儿子阮籍,孙子阮咸皆当时名人,位列“竹林七贤”,妙于音律。明人辑有《阮元瑜集》。', + yangwan:'杨氏(婉字出自小说,史书无记载),生卒年不详,东汉末年凉州人。早年嫁于东汉前将军、槐里侯马腾之子马超,追随马超转战并州、雍州、凉州,为马超生下子嗣。公元212年,马超联军在渭南战败后,杨婉随马超逃亡凉州,很快马超反攻吞并陇上诸郡县。公元213年,杨婉为了帮助马超,结识王异,了解马超这些投降部下。可惜被王异蛊惑,遭致马超大败。自己和孩子都被赵衢、梁宽杀害。', + zhouyi:'周夷,游卡桌游旗下产品《三国杀》自行杜撰的人物。设定为周瑜的妹妹,和周瑜一同征战。', + caojinyu:'金乡公主,本姓曹氏,名字不详,沛国谯县(今安徽省亳州市)人。魏武帝曹操的女儿,母为杜夫人。适婚的时候,嫁给曹操的养子何晏。高平陵之变,何晏作为大将军曹爽的党羽,遭到太傅司马懿处死。在何晏母亲尹夫人苦苦哀求下,何晏的儿子得以保全。', + wufan:'吴范(?-226年),字文则,会稽上虞(今浙江绍兴上虞区)人。三国时期孙吴官员,擅长术数。与刘惇、赵达、严武、曹不兴、皇象、宋寿和郑妪合称“吴中八绝”。吴范以推算天象节气和观察气候闻名于郡中。孙权起于东南,他委身事奉,每推算灾祥多应验,遂显名。孙权委以骑都尉,领太史令。初,孙权为将军时,他曾说江南有王气。及孙权立为吴王,论功行封,欲以为都亭侯,但因不愿将其术要诀告知孙权,为权所怨恨,被除名。黄武中,病死。', + caomao:'曹髦(241年11月15日-260年6月2日)[1],字彦士,沛国谯县(今安徽省亳州市)人,魏文帝曹丕之孙,东海王曹霖之子,曹魏第四位皇帝(254年11月1日-260年6月2日)。正始二年(241年),生于东海王宫,自幼聪明好学,才慧早成,正始五年(244年),封为高贵乡公,嘉平六年(254年),大将军司马师废除齐王曹芳后,拥立为帝,年号正元,曹髦文才武略,崇拜少康,不满司马氏专权秉政,甘露五年(260年),亲自讨伐司马昭,为太子舍人成济所弑,年仅十九岁,以王礼葬于洛阳西北。曹髦擅长诗文,创制了九言诗,传世文章有《伤魂赋并序》《颜子论》等。爱好儒学,亲赴太学论道,著有《春秋左氏传音》(失传)。精通绘画,一说为中国第一位成为画家的皇帝,唐张彦远《历代名画记》目曹髦为中品。', + laiyinger:'来莺儿,是个传说中的人物,正史及古代典籍并无记载。相传来莺儿是东汉歌妓,建安年间洛阳名妓,后爱上曹操的侍卫王图,王图因延误军机而押赴刑场,当时来莺儿奋不顾身以己命换王图一死。新编古装潮剧《曹营恋歌》,秦腔《雀台歌女》讲述了歌女来莺儿与情人王图及曹操三人之间催人泪下的故事。', + caohua:'曹华,东汉末年人物,曹操之女,为汉献帝妃嫔。建安十八年(213年),曹操进为魏公,把曹宪、曹节、曹华三个女儿,一齐都送给汉献帝刘协做了妃子,皆封为夫人,聘以束帛五万匹,年龄尚小者在魏公国待年长而聘。', + zhaoang:'赵昂,字伟章(一作伟璋),天水冀人。汉末时曹操部下。初为羌道令,建安中转参军事徒居州治冀城。建安十八年,马超围冀城多天,城中饥困,凉州刺史韦康不愿百姓再受苦而打算投降,赵昂进劝但不为所纳。后马超背信弃义杀韦康并劫其子赵月为人质,把他送至南郑。欲以此要迫使赵昂为己所用。后与梁宽、赵衢、庞恭、杨阜等结谋为康报仇,并举兵讨伐马超。马超兵败遂弃城,投奔张鲁。得张鲁之援后马超于建安十九年复寇,赵昂与妻子王异坚守祁山三十天至夏侯渊的救兵解围,其子赵月终为马超斩杀。自冀城之难,至于祁山,赵昂出九奇策。', + liuhui:'刘徽(约225年—约295年),汉族,山东滨州邹平市人,魏晋期间伟大的数学家,中国古典数学理论的奠基人之一。在中国数学史上作出了极大的贡献,他的杰作《九章算术注》和《海岛算经》,是中国最宝贵的数学遗产。刘徽思想敏捷,方法灵活,既提倡推理又主张直观。他是中国最早明确主张用逻辑推理的方式来论证数学命题的人。刘徽的一生是为数学刻苦探求的一生。他虽然地位低下,但人格高尚。他不是沽名钓誉的庸人,而是学而不厌的伟人,他给我们中华民族留下了宝贵的财富。2021年5月,国际天文学联合会(IAU)批准中国在嫦娥五号降落地点附近月球地貌的命名,刘徽(liuhui)为八个地貌地名之一。', + zhangfen:'张奋,徐州彭城(今江苏徐州)人。三国时期孙吴将领,辅吴将军张昭的侄子。善于制作攻城器械。在步骘举荐下,担任将军,累迁平州都督,册封乐乡亭侯,病逝于任上。', + dukui:'杜夔[kuí],字公良,河南人,擅长音律,聪明过人。管弦等各种乐器,他无所不能。他长期总管歌舞音乐,精心研究,继承复兴了前代古乐,并有所创新。仕于曹操、曹丕之世,以通晓音乐称于世。早年任雅乐郎,汉中平五年(188年),因病离职。州郡的司徒以礼相请,他因时世混乱而奔荆州。荆州牧刘表的儿子刘琮投降曹操后,曹操以杜夔为军谋祭酒 ,参与太乐署之事,令他创制雅乐。魏文帝曹丕黄初年间,任太乐令、协律都尉。', + quanhuijie:'全皇后(244年-301年),吴郡钱塘(今浙江杭州)人,吴废帝孙亮的皇后,全尚之女,母孙恭之女。吴大帝长女全公主的侄孙女。赤乌十三年(250年),因全公主推荐全氏被册为孙亮的太子妃,建兴二年(253年),全氏被立为皇后。太平三年(258年),孙亮被权臣孙綝贬为会稽王,全皇后也一同贬为会稽王夫人。永安三年(260年),全皇后随夫到侯官,孙亮在途中死去,全皇后在侯官居住二十余年,吴亡后返回吴郡,永宁元年(301年)去世。', + dingshangwan:'丁尚涴,又名丁夫人。东汉末年权臣曹操的原配夫人。丁尚涴嫁给曹操时,曹操另有刘夫人,生长子曹昂和清河长公主。后刘夫人早亡,曹昂便由丁尚涴抚养,丁尚涴视其为己出。
    建安二年(公元197年),曹昂随军出征宛城,战死沙场。丁尚涴悲痛欲绝,口出怨言数落曹操,又悲啼不止。曹操恼羞成怒,将其打发回了娘家。不久之后,心生悔意的曹操亲自前往丁家,打算将丁尚涴接回。然而丁尚涴却只是闷头织布。曹操手抚其背,说:“顾我共载归乎!”丁尚涴依旧不理不睬。曹操走到门口,又回过头:“得无尚可邪!”然而依旧得不到回应,只得感叹:“真诀矣。”于是与之和离,并让丁家允许她改嫁,丁家不敢为之。
    丁尚涴去世后,卞夫人请求曹操安葬她,于是葬在许城以南。后来曹操病重,知道自己时日无多,临终前叹道:“我前后行意,于心未曾有所负也。假令死而有灵,子修若问‘我母所在’,我将何辞以答!”', + luyi:'卢弈,游卡桌游《三国杀》中虚构的人物。设定为卢植之女。至情至孝。其人虽体弱多病,然而却天资聪颖,有过目不忘、出口成章之才。先后拜蔡邕、王允等人为师,纳诸家之长融会贯通。又善弈棋,曾与当时国手山子道、王九真、郭凯对弈,不分胜负,一时之间名动京华,被太学征辟为女博士,世人皆称其为“女先生”。董卓之乱后,卢弈随父亲隐居乡野,创办上谷学宫,邀天下士子论道。相传诸葛亮、曹植、荀彧、张昭等人都参加过。各学派在卢弈主持下论道,成为一时佳话。后上谷学宫遭曹魏所忌,卢弈为请求曹叡赦免学宫,与司马懿对无棋之弈。卢弈破指凝血,以血为棋,终胜司马懿半子。但却旧伤复发,局终而陨。', + zhaozhi:'赵直,豫章人,生于公元175年左右,死年不详,字不详。为蜀汉官方占梦者。曾预言蒋琬位极人臣、何祗48岁去世、魏延离死期不远,后果一一应验。', + dongguiren:'董贵人(?—200年),父董承,汉献帝刘协妃嫔之一。董贵人父亲被曹操所杀,自己也受牵连。董贵人虽有身孕,汉献帝数次为她向曹操求情,仍被杀。', + zhujianping: '朱建平(生卒年不详),汉末三国时期沛国(今安徽省)人。精通相术,于街巷之间为人相面,效果非常灵验。三国时,他在街头巷尾给人们看相。曹丕做五官将时,请他看相,朱建平说:将军寿命80,40会有小难,愿您多多保护。 又说曹彪:您居于自己的封国,到57当遭兵灾,要好好提防此事。 结果曹丕40去世,曹彪57岁时,犯了与王凌合谋罪,被赐死。他的妙算,都这么准确,即使是唐举,许负也比不上。时人将他与平原郡相士管公明并称为“朱”、“管”。', + yuanji:'袁氏(生卒年不详),汝南郡汝阳县(今河南商水)人,袁术之女,孙权妃嫔。袁夫人出身世家大族汝南袁氏,其父袁术败亡后,入吴宫拜为夫人,以节操品行着称。', + chengbing:'程秉(生卒年不详),字德枢,汝南南顿(今河南项城西)人。三国时期吴国官员、儒学家。起初跟随郑玄,后来北方荒乱而到交州避难,期间与刘熙考究五经大义,因此通绕五经。后来交趾太守士燮任命程秉为长史。吴大帝孙权听闻程秉的名声,于是以礼征召他,程秉到后,被任命为太子太傅。黄武四年(225年),孙权为太子孙登娶周瑜之女为妃,程秉以太常身份于吴郡迎候,孙权亲身上程秉的船,可见孙权对他的极为礼待。程秉又教诲孙登对婚后相处要尊重儒家礼教。后来因病在任职期间逝世。著有《周易摘》、《尚书驳》、《论语弼》,凡三万余言。', + dc_zhouxuān:'周宣,生卒年不详,字孔和,乐安(治今山东高苑西北)人,擅长解梦,在郡做官时曾为太守解过梦,后又给曹丕解梦,都灵验。官至中郎,死于魏明帝末年。', + xuelingyun:'薛灵芸,东晋王嘉志怪小说《拾遗记》中的人物,魏文帝曹丕的宫人,妙于针工,虽处于深帷之内,不用灯烛之光,裁制立成。凡不是薛灵芸缝制的衣服,文帝一概不穿,宫中号为针神。薛灵芸的故事在正史中虽无记载,却由于许多野史笔记偶尔提及,如《拾遗记》、《太平广记》、《艳异编》等,渐于后世成为中国古代著名美女形象。,', + yanghong:'杨弘,东汉末年袁术部将。袁术死后,杨弘等将其众欲归孙策,后庐江太守刘勋截击,转归于勋。', + xielingyu:'谢夫人,会稽山阴(今浙江省绍兴市)人,东汉尚书郎、徐令谢煚之女,吴大帝孙权的原配发妻,又称谢妃。深受孙权宠爱,爱幸有宠。后来孙权为了巩固江东政权,又纳徐氏,欲让谢夫人屈居其下。谢夫人不同意,失志早卒。谢夫人的弟弟是三国著名史学家、武陵太守谢承。豫章太守谢斐与谢夫人同宗同族。', + zerong:'笮[zé]融(?—195年),丹杨(治今安徽宣城)人,东汉末年豪强,生性残暴却笃信佛教,为佛教在中国的发展做出了很大贡献。东汉末年投奔徐州刺史陶谦,督管下邳、彭城、广陵三郡运粮。将其中大量物资占为己有累积财力,遂在徐州一带大规模崇佛,修建豪华佛寺,铸造金铜大佛,衣以锦彩,并举行浴佛节,招揽信徒万余人。其崇佛活动奠定了中国大型佛事活动的基础。后又投奔赵昱、薛礼、朱皓并将他们杀害,扬州牧刘繇因此兴兵讨伐笮融。笮融兵败后逃入深山,由于当地山民同样对他恨之入骨,便联手搜捕、杀死笮融,并将他的首级献给刘繇。', + huanfan:'桓范(?~249年),字元则,沛郡龙亢县(今安徽省怀远县龙亢镇)人。三国时期曹魏大臣、文学家、画家。建安末年,担任丞相府掾,联合王象等共同撰写《皇览》。延康元年,担任羽林左监。魏明帝时,历任中领军、尚书,出任征虏将军、东中郎将、兖州刺史等。正始年间,授大司农,为大将军曹爽出谋划策,号称“智囊 ”。高平陵政变(249年)发生后,力劝曹爽挟带皇帝曹芳进入许昌,没有得到采纳,最终被太傅司马懿诛杀。桓范颇有文才,著有《世要论》(《桓范新书》)。善于画画,唐朝张彦远《历代名画记》目为中品。', + sunyu:'孙瑜(177年-215年),字仲异,吴郡富春(今浙江富阳)人,孙坚之弟孙静的次子,孙权的堂兄。官至奋威将军、丹杨太守。孙瑜初以恭义校尉的身份统领士兵,曾跟随周瑜、孙权等人征战,擅于安抚部下、招降纳顺。孙瑜爱读古籍,又请学者马普来为将领官员的子弟讲学,于是东吴开始设立学官。215年,孙瑜去世,时年三十九岁。', + xizheng:'郤正(?-278年),本名郤纂,字令先,司州河南郡偃师县(今河南省偃师市)人,三国蜀汉至西晋时期学者、官员。少好学,广读古籍。弱冠即善写文章,为蜀汉朝廷征为秘书吏,官至秘书令。公元263年(景耀六年),曹魏攻伐蜀汉,后主刘禅投降,郤正为之撰写投降书。后随刘禅前往洛阳,受封关内侯,又得到晋武帝司马炎赏识,任巴西郡太守,公元278年(咸宁四年)去世。郤正为人不重名利,曾作《释讥》,表明自己淡泊之心境;又醉心于文学,共作诗歌、论著、辞赋等近百篇,但多散佚于后世。', + zhangjinyun:'张瑾云,张星彩的妹妹,刘禅的第二任皇后,238年正月立为皇后。景耀六年(263年),蜀汉灭亡,刘禅被俘,此后,受封为安乐公。张皇后也随之成为安乐公夫人,咸熙元年(264年),随刘禅到洛阳。', + duanqiaoxiao:'段巧笑,三国时代魏国魏文帝时的宫人,甚受到魏文帝的宠爱。传说她以原有的化妆品中的米粉和胡粉,再加入葵花子汁,发明了女性化妆用的脂粉。', + ruanji:'阮籍(公元210年~263年),字嗣宗,陈留尉氏(今河南省开封市)人,三国时期魏国诗人、竹林七贤之一。阮瑀之子,门荫入仕,累迁步兵校尉,世称阮步兵。崇奉老庄之学,政治上则采取谨慎避祸的态度。景元四年(公元263年),阮籍去世,享年五十三岁。作为“正始之音”的代表,著有《咏怀八十二首》、《大人先生传》等,其著作收录在《阮籍集》中。', + ganfurenmifuren:'甘夫人,刘备起兵后于沛城娶之为妾。后来,甘夫人随刘备到荆州,生了阿斗(也就是后主刘禅)。223年四月,刘备病死于白帝城,追谥甘夫人为“昭烈皇后”。
    糜夫人,刘备夫人。徐州别驾糜竺之妹。长坂兵败,她怀抱年仅两岁的刘禅在乱军中走散,被赵云发现;但麋夫人因为赵云只有一匹马,不肯上马,在将阿斗托付给赵云后投井而亡。' + }, + characterTitle:{ + // wulan:'#b对决限定武将', + // leitong:'#b对决限定武将', + }, + perfectPair:{}, + characterFilter:{ + // leitong:function(mode){ + // return mode!='identity'&&mode!='guozhan'; + // }, + // wulan:function(mode){ + // return mode!='identity'&&mode!='guozhan'; + // }, + }, + dynamicTranslate:{ + xinlvli:function(player){ + var str='每回合限一次'; + if(player.storage.choujue) str+='(自己的回合内则改为限两次)'; + str+=',当你造成'; + if(player.storage.beishui) str+='或受到'; + str+='伤害后,你可选择:1,若你的体力值大于你的手牌数,你摸X张牌;2,若你的手牌数大于你的体力值且你已受伤,你回复X点体力(X为你的手牌数与体力值之差)。'; + return str; + }, + lvli:function(player){ + var str='每名角色的回合限一次'; + if(player.storage.choujue) str+='(自己的回合内则改为限两次)'; + str+=',你可以声明一个基本牌或普通锦囊牌的牌名,有随机概率视为使用之(装备区里的牌数越多,成功概率越大)'; + if(player.storage.beishui) str+='。当你受到伤害后,你也可以以此法使用一张牌。'; + return str; + }, + rezhongjian:function(player){ + return '出牌阶段限'+(player.hasSkill('recaishi2')?'两':'一')+'次,你可以选择一名本回合内未选择过的角色。你令其获得一项效果直至你的下回合开始:①其下次造成伤害后弃置两张牌,然后你摸一张牌。②其下次受到伤害后摸两张牌,然后你摸一张牌。' + }, + bazhan:function(player){ + if(player.storage.bazhan) return '转换技,出牌阶段限一次,阴:你可以将至多两张手牌交给一名其他角色。阳:你可以获得一名其他角色的至多两张手牌。若以此法移动的牌包含【酒】或♥牌,则你可令得到此牌的角色执行一项:①回复1点体力。②复原武将牌。'; + return '转换技,出牌阶段限一次,阴:你可以将至多两张手牌交给一名其他角色。阳:你可以获得一名其他角色的至多两张手牌。若以此法移动的牌包含【酒】或♥牌,则你可令得到此牌的角色执行一项:①回复1点体力。②复原武将牌。'; + }, + zhiren:function(player){ + return '当你于'+(player.hasSkill('yaner_zhiren')?'一':'你的')+'回合内使用第一张非转化牌时,你可依次执行以下选项中的前X项:①卜算X。②可弃置场上的一张装备牌和延时锦囊牌。③回复1点体力。④摸三张牌。(X为此牌的名称的字数)'; + }, + yuqi:function(player){ + var info=lib.skill.yuqi.getInfo(player); + return '每回合限两次。当有角色受到伤害后,若你至其的距离不大于'+info[0]+',则你可以观看牌堆顶的'+info[1]+'张牌。你将其中至多'+info[2]+'张牌交给受伤角色,然后可以获得剩余牌中的至多'+info[3]+'张牌,并将其余牌以原顺序放回牌堆顶。(所有具有颜色的数字至多为5)'; + }, + caiyi:function(player){ + var current=player.storage.caiyi,list=player.storage.caiyi_info||[[],[]]; + var str='转换技。结束阶段,你可令一名角色选择并执行一项,然后移除此选项。'; + var list1=['⒈回复X点体力。','⒉摸X张牌。','⒊复原武将牌。','⒋随机执行一个已经移除过的阴选项;'],list2=['⒈受到X点伤害。','⒉弃置X张牌。','⒊翻面并横置。','⒋随机执行一个已经移除过的阳选项。'],str1='阴:',str2='阳:'; + for(var i=0;i<4;i++){ + var clip1=list1[i],clip2=list2[i]; + if(list[0].contains(i)) clip1=(''+clip1+''); + if(list[1].contains(i)) clip2=(''+clip2+''); + str1+=clip1; + str2+=clip2; + } + if(current) str2=(''+str2+''); + else str1=(''+str1+''); + return str+str1+str2+'(X为该阴阳态剩余选项的数量)。'; + }, + dchuishu:function(player){ + var list=lib.skill.dchuishu.getList(player); + return '摸牌阶段结束时,你可以摸['+list[0]+']张牌。若如此做:你弃置['+list[1]+']张手牌,且当你于本回合内弃置第['+list[2]+']+1张牌后,你从弃牌堆中随机获得等量的锦囊牌。'; + }, + dcshoutan:function(player){ + if(player.storage.dcshoutan) return '转换技。出牌阶段限一次,阴:你可以弃置一张不为黑色的手牌。阳:你可以弃置一张黑色手牌。'; + return '转换技。出牌阶段限一次,阴:你可以弃置一张不为黑色的手牌。阳:你可以弃置一张黑色手牌。'; + }, + dcluochong:function(player){ + return '一轮游戏开始时,你可以弃置任意名角色区域里的共计至多['+(4-player.countMark('dcluochong'))+']张牌,然后若你以此法弃置了一名角色的至少三张牌,则你方括号内的数字-1。'; + }, + }, + perfectPair:{}, + characterReplace:{ + wenyang:['wenyang','db_wenyang','diy_wenyang'], + gexuan:['gexuan','tw_gexuan'], + panshu:['panshu','re_panshu'], + yangwan:['yangwan','sp_yangwan'], + sunyi:['re_sunyi','tw_sunyi','sunyi'], + fengfangnv:['re_fengfangnv','fengfangnv'], + luotong:['luotong','dc_luotong'], + dc_wangchang:['dc_wangchang','tw_wangchang'], + }, + translate:{ + puyuan:'蒲元', + pytianjiang:'天匠', + pytianjiang_info:'游戏开始时,你随机获得两张不同副类别的装备牌,并置入你的装备区。出牌阶段,你可以将装备区的牌移动至其他角色的装备区(可替换原装备)。若你以此法移动了〖铸刃〗的衍生装备,你摸两张牌。', + pytianjiang_move:'天匠', + pyzhuren:'铸刃', + pyzhuren_info:'出牌阶段限一次,你可以弃置一张手牌。根据此牌的花色点数,你有一定概率打造成功并获得一张武器牌(若打造失败或武器已有则改为摸一张【杀】,花色决定武器名称,点数决定成功率)。此武器牌进入弃牌堆时,将其移出游戏。', + pyzhuren_destroy:'铸刃', + pyzhuren_heart:'红缎枪', + pyzhuren_heart_info:'每回合限一次,当你使用【杀】造成伤害后,你可以进行判定,若结果为:红色,你回复1点体力;黑色:你摸两张牌。', + pyzhuren_diamond:'烈淬刀', + pyzhuren_diamond_info:'每回合限两次,当你使用【杀】对目标角色造成伤害时,你可以弃置一张牌,令此伤害+1。你使用【杀】的次数上限+1。', + pyzhuren_club:'水波剑', + pyzhuren_club_info:'每回合限两次,当你使用普通锦囊牌或【杀】时,你可以为此牌增加一个目标。当你失去装备区里的【水波剑】后,你回复1点体力。', + pyzhuren_spade:'混毒弯匕', + pyzhuren_spade_info:'当你使用【杀】指定目标后,你可令其失去X点体力(X为此技能本回合内发动过的次数且至多为5)。', + pyzhuren_shandian:'天雷刃', + pyzhuren_shandian_info:'当你使用【杀】指定目标后,可令其进行判定,若结果为:黑桃,其受到3点雷属性伤害;梅花,其受到1点雷属性伤害,你回复1点体力并摸一张牌。', + guanlu:'管辂', + tuiyan:'推演', + tuiyan_info:'出牌阶段开始时,你可以观看牌堆顶的三张牌。', + busuan:'卜算', + busuan_info:'出牌阶段限一次,你可以选择一名其他角色,然后选择至多两张不同的卡牌名称(限基本牌或锦囊牌)。该角色下次摸牌阶段摸牌时,改为从牌堆或弃牌堆中获得你选择的牌。', + busuan_angelbeats:'卜算', + mingjie:'命戒', + mingjie_info:'结束阶段,你可以摸一张牌,若此牌为红色,你可以重复此流程直到摸到黑色牌或摸到第三张牌。当你以此法摸到黑色牌时,若你的体力值大于1,则你失去1点体力。', + gexuan:'葛玄', + gxlianhua:'炼化', + gxlianhua_info:'你的回合外,每当有其他角色受到伤害后,你获得一个“丹血”标记(该角色与你阵营一致时为红色,不一致为黑色,此颜色对所有玩家均不可见)直到你的准备阶段开始。准备阶段,根据你获得的“丹血”标记的数量和颜色,你从牌堆/弃牌堆中获得相应的牌以及相应技能直到回合结束。3枚或以下:〖英姿〗和【桃】;超过3枚且红色“丹血”较多:〖观星〗和【无中生有】;超过3枚且黑色“丹血”较多:〖直言〗和【顺手牵羊】;超过3枚且红色和黑色一样多:【杀】、【决斗】和〖攻心〗。', + zhafu:'札符', + zhafu_info:'限定技,出牌阶段,你可以选择一名其他角色,令其获得一枚「札」。有「札」的角色弃牌阶段开始时,若其手牌数大于1,其移去「札」并选择保留一张手牌,然后将其余的手牌交给你。', + leitong:'雷铜', + kuiji:'溃击', + kuiji_info:'出牌阶段限一次。你可以将一张黑色基本牌当作【兵粮寸断】置于你的判定区,然后摸一张牌。若如此做,你可以对体力值最多的一名对手造成2点伤害。对手因此进入濒死状态时,你或队友体力值最少的一方回复1点体力。', + kuiji_info_identity:'出牌阶段限一次。你可以将一张黑色基本牌当做【兵粮寸断】置于你的判定区,摸一张牌,然后你可以对体力值最多的一名其他角色造成2点伤害。该角色因此进入濒死状态时,你可令一名除其外体力值最少的角色回复1点体力。', + kuiji_info_guozhan:'出牌阶段限一次。你可以将一张黑色基本牌当做【兵粮寸断】置于你的判定区,摸一张牌,然后你可以对体力值最多的一名其他角色造成2点伤害。该角色因此进入濒死状态时,你可令一名除其外体力值最少的角色回复1点体力。', + wulan:'吴兰', + wlcuorui:'挫锐', + wlcuorui_info:'出牌阶段开始时,你可以弃置你或队友区域里的一张牌。若如此做,你选择一项:1.弃置对手装备区里至多两张与此牌颜色相同的牌;2.展示对手的共计两张手牌,然后获得其中与此牌颜色相同的牌。', + wlcuorui_info_identity:'出牌阶段开始时,你可以弃置一名你至其的距离不大于1的角色区域里的一张牌,然后你选择一项:1.弃置另一名其他角色装备区里至多两张与此牌颜色相同的牌;2.展示另一名其他角色的至多两张手牌,然后获得其中与此牌颜色相同的牌。', + wlcuorui_info_guozhan:'出牌阶段开始时,你可以弃置一名你至其的距离不大于1的角色区域里的一张牌,然后你选择一项:1.弃置另一名其他角色装备区里至多两张与此牌颜色相同的牌;2.展示另一名其他角色的至多两张手牌,然后获得其中与此牌颜色相同的牌。', + huaman:'花鬘', + hmmanyi:'蛮裔', + hmmanyi_info:'锁定技,【南蛮入侵】对你无效。', + mansi_viewas:'蛮嗣', + mansi:'蛮嗣', + mansi_info:'出牌阶段限一次,你可以将所有手牌当做【南蛮入侵】使用;当有角色受到【南蛮入侵】的伤害后,你摸一张牌。', + souying:'薮影', + souying_info:'每回合限一次,当你对其他角色(或其他角色对你)使用【杀】或普通锦囊牌指定唯一目标后,若此牌不是本回合你对其(或其对你)使用的第一张【杀】或普通锦囊牌,你可以弃置一张牌,获得此牌对应的所有实体牌(或令此牌对你无效)。', + zhanyuan:'战缘', + zhanyuan_info:'觉醒技,准备阶段,若你已因蛮嗣累计获得超过7张牌,你加一点体力上限并回复1点体力,并可以选择一名男性角色,你与其获得技能〖系力〗,然后你失去技能〖蛮嗣〗', + hmxili:'系力', + hmxili_info:'每回合限一次,你的回合外,当其他拥有【系力】技能的角色在其回合内对没有【系力】技能的角色造成伤害时,你可以弃置一张牌,令此伤害+1,然后你与其各摸两张牌。', + wangshuang:'王双', + spzhuilie:'追猎', + spzhuilie2:'追猎', + spzhuilie_info:'锁定技,你使用【杀】无距离限制;当你使用【杀】指定目标后,若其不在你的攻击范围内,此【杀】不计入使用次数限制且你判定。若判定结果为武器牌或坐骑牌,此【杀】的伤害基数改为X(X为其体力值)。否则你失去1点体力。', + wenyang:'文鸯', + xinlvli:'膂力', + xinlvli_info:'每回合限一次,当你造成伤害后,你可选择:1,若你的体力值大于你的手牌数,你摸X张牌;2,若你的手牌数大于你的体力值且你已受伤,你回复X点体力(X为你的手牌数与体力值之差)。', + lvli:'膂力', + lvli4:'膂力', + lvli5:'膂力', + lvli_info:'每名角色的回合限一次,你可以声明一个基本牌或普通锦囊牌的牌名,有随机概率视为使用之(装备区里的牌数越多,成功概率越大)', + choujue:'仇决', + choujue_info:'觉醒技,一名角色的回合结束时,若你的手牌数和体力值相差3或更多,你减1点体力上限并获得技能〖背水〗,然后将〖膂力〗改为“在自己的回合时每回合限两次”。', + beishui:'背水', + beishui_info:'觉醒技,准备阶段,若你的手牌数或体力值小于2,你减1点体力上限并获得技能〖清剿〗,然后将〖膂力〗改为受到伤害后也可以发动。', + qingjiao:'清剿', + qingjiao_info:'出牌阶段开始时,你可以弃置所有手牌,然后从牌堆或弃牌堆中随机获得八张牌名各不相同且副类别不同的牌。若如此做,结束阶段,你弃置所有牌。', + re_liuzan:'留赞', + refenyin:'奋音', + refenyin_info:'锁定技,你的回合内,当一张牌进入弃牌堆后,若本回合内没有过与此牌花色相同的卡牌进入过弃牌堆,则你摸一张牌。', + liji:'力激', + liji_info:'出牌阶段限X次,你可以弃置一张牌并对一名其他角色造成1点伤害。(X为本回合内进入过弃牌堆的卡牌数除以8,若场上人数小于5则改为除以4,向下取整)', + liubian:'刘辩', + shiyuan:'诗怨', + shiyuan_info:'每回合每项限一次,当你成为其他角色使用牌的目标后:①若其体力值大于你,你摸三张牌。②若其体力值等于你,你摸两张牌。③若其体力值小于你,你摸一张牌。', + dushi:'毒逝', + dushi_info:'锁定技,你处于濒死状态时,其他角色不能对你使用【桃】。你死亡时,你选择一名其他角色获得〖毒逝〗。', + yuwei:'余威', + yuwei_info:'主公技,锁定技,其他群雄角色的回合内,你将〖诗怨〗改为“每回合每项限两次”。', + re_xinxianying:'辛宪英', + rezhongjian:'忠鉴', + rezhongjian2:'忠鉴', + rezhongjian_info:'出牌阶段限一次,你可以选择一名本回合内未选择过的角色。你令其获得一项效果直至你的下回合开始:①其下次造成伤害后弃置两张牌,然后你摸一张牌。②其下次受到伤害后摸两张牌,然后你摸一张牌。', + recaishi:'才识', + recaishi3:'才识', + recaishi_info:'摸牌阶段结束时,若你于本阶段内因摸牌而获得的所有的牌:花色均相同,你将〖忠鉴〗于本回合内改为“出牌阶段限两次”。不均相同,你可回复1点体力。若如此做,你本回合内不能对自己使用牌。', + guozhao:'郭照', + pianchong:'偏宠', + pianchong2:'偏宠', + pianchong_info:'摸牌阶段开始时,你可放弃摸牌。若如此做,你从牌堆中获得一张红色牌和一张黑色牌。然后你选择一种颜色。你的下回合开始前,当你失去该颜色的一张牌后,你从牌堆中获得另一种颜色的一张牌。', + zunwei:'尊位', + zunwei_backup:'尊位', + zunwei_info:"出牌阶段限一次,你可选择本局游戏内未选择过的一项:①若你已受伤,则你可以选择一名体力值大于你的其他角色,你将体力值回复至X(X为你的体力上限与其体力值中的较小值)②选择一名手牌数大于你的其他角色,你将手牌数摸至与其相同(至多摸五张)③选择一名装备区内牌数大于你的其他角色。你令X=1。若你装备区内的('equip'+X)栏为空,则你使用牌堆中的一张副类别为('equip'+X),且能对自己使用的装备牌。你令X+1。若X不大于5,且你装备区内的牌数仍小于目标角色,则你重复此流程。", + fanyufeng:'樊玉凤', + bazhan:'把盏', + bazhan_info:'转换技,出牌阶段限一次,阴:你可以将至多两张手牌交给一名其他角色。阳:你可以获得一名其他角色的至多两张手牌。若以此法移动的牌包含【酒】或♥牌,则你可令得到牌的角色执行一项:①回复1点体力。②复原武将牌。', + jiaoying:'醮影', + jiaoying2:'醮影', + jiaoying3:'醮影', + jiaoying3_draw:'醮影', + jiaoying_info:'锁定技,其他角色获得你的手牌后,该角色本回合不能使用或打出与此牌颜色相同的牌。然后此回合结束时,若其本回合没有再使用牌,你令一名角色将手牌摸至五张。', + ruanyu:'阮瑀', + xingzuo:'兴作', + xingzuo2:'兴作', + xingzuo_info:'出牌阶段开始时,你可观看牌堆底的三张牌并用任意张手牌替换其中等量的牌。若如此做,结束阶段,你可令一名有手牌的角色用所有手牌替换牌堆底的三张牌。若其因此法失去的牌多于三张,则你失去1点体力。', + miaoxian:'妙弦', + miaoxian_info:'若你的手牌中仅有一张黑色牌,你可将此牌当作任意一张普通锦囊牌使用(每种牌名每回合限一次);若你的手牌中仅有一张红色牌,你使用此牌时摸一张牌。', + yangwan:'杨婉', + youyan:'诱言', + youyan_info:'出牌阶段/弃牌阶段各限一次。当有牌进入弃牌堆后,若其中有你不因使用或打出而失去的牌,你可以从牌堆中获得你本次失去的牌中没有的花色的牌各一张。', + zhuihuan:'追还', + zhuihuan2:'追还', + zhuihuan2_new:'追还', + zhuihuan_info:'结束阶段开始时,你可以选择一名角色(对其他角色不可见)。记录所有对该角色造成过伤害的角色。该角色的下个准备阶段开始时停止记录,且所有记录过的角色:若体力值大于该角色,则受到其造成的2点伤害;若体力值小于等于该角色,则随机弃置两张手牌。', + re_panshu:'潘淑', + zhiren:'织纴', + zhiren_info:'当你于你的回合内使用第一张非转化牌时,你可依次执行以下选项中的前X项:①卜算X。②可弃置场上的一张装备牌和延时锦囊牌。③回复1点体力。④摸三张牌。(X为此牌的名称的字数)', + yaner:'燕尔', + yaner_info:'每回合限一次。当有其他角色于其出牌阶段内失去手牌后,若其没有手牌,则你可以与其各摸两张牌。若其以此法摸得的两张牌类型相同,则其回复1点体力。若你以此法摸得的两张牌类型相同,则你将〖织纴〗中的“你的回合内”改为“一回合内”直至你下回合开始。', + zhouyi:'周夷', + zhukou:'逐寇', + zhukou_info:'①当你于一名角色的出牌阶段第一次造成伤害后,你可以摸X张牌(X为本回合你已使用的牌数)。②你的结束阶段,若你本回合没有造成伤害,你可以对两名其他角色各造成1点伤害。', + mengqing:'氓情', + mengqing_info:'觉醒技。准备阶段,若场上已受伤的角色数大于你的体力值,你加3点体力上限并回复3点体力,失去〖逐寇〗,获得〖玉殒〗。', + yuyun:'玉殒', + yuyun_info:'锁定技,出牌阶段开始时,你失去1点体力或体力上限(不能减至1以下),然后选择X+1项(X为你已损失的体力值):①摸两张牌;②对一名其他角色造成1点伤害,然后本回合对其使用【杀】无距离和次数限制;③本回合的手牌上限视为无限;④获得一名其他角色区域内的一张牌;⑤令一名其他角色将手牌摸至体力上限(最多摸至5)。', + caojinyu:'曹金玉', + yuqi:'隅泣', + yuqi_info:'每回合限两次。当有角色受到伤害后,若你至其的距离不大于0,则你可以观看牌堆顶的3张牌。你将其中至多1张牌交给受伤角色,然后可以获得剩余牌中的至多1张牌,并将其余牌以原顺序放回牌堆顶。(所有具有颜色的数字至多为5)', + shanshen:'善身', + shanshen_info:'当有角色死亡时,你可令你的〖隅泣〗中的一个具有颜色的数字+2。然后若你未对该角色造成过伤害,则你回复1点体力。', + xianjing:'娴静', + xianjing_info:'准备阶段,你可令你的〖隅泣〗中的一个具有颜色的数字+1。若你的体力值等于体力上限,则你可以重复一次此流程。', + re_sunyi:'孙翊', + syjiqiao:'激峭', + syjiqiao_info:'出牌阶段开始时,你可将牌堆顶的X张牌置于你的武将牌上(X为你的体力上限)。当你于此出牌阶段内使用的牌结算结束后,你可以获得其中的一张牌,然后若剩余牌中红色牌和黑色牌的数量:不相等,你失去1点体力;相等,你回复1点体力。出牌阶段结束时,你将这些牌置入弃牌堆。', + syxiongyi:'凶疑', + syxiongyi_info:'限定技。当你处于濒死状态时,若剩余武将牌堆中:有“徐氏”,则你可以将体力值回复至3点,并将此武将牌替换为“徐氏”;没有“徐氏”,则你可以将体力值回复至1点并获得〖魂姿〗。', + re_zhangbao:'张宝', + xinzhoufu:'咒缚', + xinzhoufu2:'咒缚', + xinzhoufu_info:'出牌阶段限一次。你可以将一张手牌置于一名其他角色的武将牌上并称为“咒”,且当其判定时,将其“咒”作为判定牌。', + xinyingbing:'影兵', + xinyingbing_info:'锁定技。每回合每名角色限一次,当你使用牌指定有“咒”的角色为目标后,你摸两张牌。', + wufan:'吴范', + tianyun:'天运', + tianyun_info:'①游戏的第一个回合开始前,你从牌堆中获得手牌区内没有的花色的各一张牌。②一名角色的回合开始时,若其座位号等于游戏轮数,则你可观看牌堆顶的X张牌并以任意顺序置于牌堆顶或牌堆顶。若你将所有的牌均置于了牌堆底,则你可以令一名角色摸X张牌,然后失去1点体力。(X为你手牌中包含的花色数)', + wfyuyan:'预言', + wfyuyan_info:'一轮游戏开始时,你选择一名角色(对其他角色不可见):当第一次有角色于本轮内进入濒死状态时,若其是你选择的角色,则你获得〖奋音〗直到你的回合结束;当第一次有角色于本轮内造成伤害后,若其是你选择的角色,则你摸两张牌。', + re_fengfangnv:'冯妤', + tiqi:'涕泣', + tiqi_info:'其他角色的摸牌阶段结束时/被跳过时,若其于本阶段内因摸牌而获得的牌数X不等于2,则你可以摸|X-2|张牌,并可令其本回合的手牌上限±|X-2|。', + baoshu:'宝梳', + baoshu_info:'①准备阶段,你可选择Y名角色,这些角色重置武将牌并获得(X-Y+1)个“梳”(X为你的体力上限,Y∈[1, X])。②一名角色的摸牌阶段开始时,若其有“梳”,则其本阶段的额定摸牌数+Z且移去Z个“梳”(Z为其“梳”的数量)。', + dc_luotong:'骆统', + renzheng:'仁政', + renzheng_info:'锁定技。当有伤害被防止时,或伤害值发生过减少的伤害事件结算结束后,你摸两张牌。', + jinjian:'进谏', + jinjian_info:'①当你造成伤害时,你可令此伤害+1,然后你本回合内下一次造成的伤害-1且不触发〖进谏①〗。②当你受到伤害时,你可令此伤害-1。然后你于本回合内下一次受到的伤害+1且不触发〖进谏②〗。', + caomao:'曹髦', + qianlong:'潜龙', + qianlong_info:'当你受到伤害后,你可以展示牌堆顶的三张牌并获得其中的至多X张牌(X为你已损失的体力值),然后将剩余的牌置于牌堆底。', + fensi:'忿肆', + fensi_info:'锁定技。准备阶段,你须选择一名体力值不小于你的角色并对其造成1点伤害,然后若你选择的角色不为你自己,则其视为对你使用一张【杀】。', + juetao:'决讨', + juetao_info:'限定技。出牌阶段开始时,若你的体力值为1,则你可以选择一名其他角色。你展示牌堆底的一张牌,若此牌能被你使用,则你使用此牌并重复此流程直到出现不可使用的牌或其死亡(你与其以外的角色不是此牌的合法目标)。', + zhushi:'助势', + zhushi_info:'主公技。每回合限一次,其他魏势力角色于回合内回复体力时,其可令你摸一张牌。', + laiyinger:'来莺儿', + xiaowu:'绡舞', + xiaowu_info:'出牌阶段限一次,你可以选择任意名座位连续且包含你的上家/下家的角色。这些角色依次选择一项:⒈令你摸一张牌;⒉其摸一张牌。然后若选择选项一的角色数大于选项二的角色数,则你获得一枚“沙”;若选择选项二的角色数大于选项一的角色数,则你对这些角色依次造成1点伤害。', + huaping:'化萍', + huaping_info:'限定技。①一名其他角色死亡时,你可获得其当前拥有的所有不带有「Charlotte」标签的技能,然后你失去〖绡舞〗,移去所有“沙”并摸等量的牌。②当你死亡时,你可令一名其他角色获得〖沙舞〗和你的所有“沙”。', + shawu:'沙舞', + shawu_info:'当你使用【杀】指定目标后,你可选择一项:⒈弃置两张手牌;⒉移去一枚“沙”并摸两张牌。然后你对目标角色造成1点伤害。', + dc_huangzu:'黄祖', + dcjinggong:'精弓', + dcjinggong_info:'你可以将一张装备牌当做无距离限制的【杀】使用。当你声明使用此【杀】后,你将此杀的伤害值基数改为X(X为你至此【杀】第一个目标角色的距离且至多为5)。', + dcxiaojuan:'骁隽', + dcxiaojuan_info:'当你使用牌指定其他角色为唯一目标后,你可以弃置其一半的手牌(向下取整)。若这些牌中有与你使用牌花色相同的牌,则你弃置一张手牌。', + dc_liuyu:'刘虞', + dcsuifu:'绥抚', + dcsuifu_info:'其他角色的结束阶段开始时,若你和一号位本回合内累计受到过的伤害值大于1,则你可以将该角色的所有手牌置于牌堆顶,然后视为使用一张【五谷丰登】。', + dcpijing:'辟境', + dcpijing_info:'结束阶段开始时,你可以选择任意名角色。你令所有未选择的角色失去〖自牧〗,然后你和这些角色获得〖自牧〗。', + dczimu:'自牧', + dczimu_info:'锁定技。当你受到伤害后,你令所有拥有〖自牧〗的角色各摸一张牌,然后你失去〖自牧〗。', + caohua:'曹华', + caiyi:'彩翼', + caiyi_info:'转换技。结束阶段,你可令一名角色选择并执行一项,然后移除此选项。阴:⒈回复X点体力。⒉摸X张牌,⒊复原武将牌。⒋随机执行一个已经移除过的阴选项;阳:⒈受到X点伤害。⒉弃置X张牌。⒊翻面并横置。⒋随机执行一个已经移除过的阳选项。(X为该阴阳态剩余选项的数量)。', + guili:'归离', + guili_info:'你的第一个回合开始时,你须选择一名其他角色。该角色每轮的第一个回合结束后,若其本回合内未造成过伤害,则你执行一个额外的回合。', + zhaoang:'赵昂', + dczhongjie:'忠节', + dczhongjie_info:'每轮限一次。当有角色因失去体力而进入濒死状态时,你可令其回复1点体力并摸一张牌。', + dcsushou:'夙守', + dcsushou_tag:'对方手牌', + dcsushou_info:'一名角色的出牌阶段开始时,若其手牌数为全场唯一最多,则你可以失去1点体力并摸X张牌。然后若该角色不是你,则你可以观看其一半的手牌(向下取整),且用至多X张手牌替换其中等量的牌。(X为你已损失的体力值)', + dc_wangchang:'王昶', + dckaiji:'开济', + dckaiji_info:'转换技。出牌阶段限一次,你可以:阴:摸X张牌;阳:弃置至多X张牌(X为你的体力上限且至多为5)。', + dcpingxi:'平袭', + dcpingxi_info:'结束阶段,若X大于0,则你可以选择至多X名其他角色(X为本回合内因弃置而进入弃牌堆的牌数)。你依次弃置这些角色的各一张牌,然后视为对这些角色使用一张【杀】。', + liuhui:'刘徽', + dcgeyuan:'割圆', + dcgeyuan_info:'锁定技。①游戏开始时,你将从A至K的所有整数排列为一个环形链表,称为“圆环之理”。②当有一张牌进入弃牌堆后,若此牌的点数在“圆环之理”内,且“圆环之弧”为空或此牌的点数与“圆环之弧”两端的点数相邻,则你将此牌的点数记录进“圆环之弧”;然后若“圆环之弧”与“圆环之理”长度相同,则你从“圆环之理”中移除“圆环之弧”记录的第一个和最后一个数字A和B(当“圆环之理”长度不大于3时则不移除),清空“圆环之弧”,获得场上和牌堆中所有点数为A和B的牌。', + dcjieshu:'解术', + dcjieshu_info:'锁定技。①所有点数不在“圆环之理”中的牌不计入你的手牌上限。②当你使用牌时,若“圆环之弧”为空或此牌的点数与“圆环之弧”两端的点数相邻,则你摸一张牌。', + dcgusuan:'股算', + dcgusuan_info:'觉醒技。一名角色的回合结束时,若你的“圆环之理”长度为3,则你减1点体力上限并修改〖割圆〗。', + dcgeyuan_magica:'割圆·改', + dcgeyuan_magica_info:'锁定技。当有一张牌进入弃牌堆后,若此牌的点数在“圆环之理”内,且“圆环之弧”为空或此牌的点数与“圆环之弧”两端的点数相邻,则你将此牌的点数记录进“圆环之弧”;然后若“圆环之弧”与“圆环之理”长度相同,则你清空“圆环之弧”并选择至多三名角色,这些角色中的第一名角色摸三张牌,第二名角色弃置四张牌,第三名角色将其手牌与牌堆底的五张牌交换。', + zhangfen:'张奋', + dcwanglu:'望橹', + dcwanglu_info:'锁定技。准备阶段开始时,若你的装备区内:有【大攻车】,则你获得一个额外的出牌阶段;没有【大攻车】,则你将一张【大攻车】置入装备区。', + dcxianzhu:'陷筑', + dcxianzhu_info:'当你造成渠道为【杀】伤害后,你可以为你装备区内的【大攻车】选择一项强化(每张【大攻车】最多被强化五次):⒈通过【大攻车】使用【杀】无视距离和防具;⒉通过此【大攻车】使用的【杀】可以额外选择1个目标(可叠加);⒊通过此【大攻车】使用的【杀】造成伤害后的弃置牌数+1(可叠加)。', + dcchaixie:'拆械', + dcchaixie_info:'锁定技。当你的【大攻车】被销毁后,你摸X张牌(X为此【大攻车】被强化过的次数)。', + dagongche:'大攻车', + dagongche_skill:'大攻车', + dagongche_info:'出牌阶段开始时,你可以视为使用一张【杀】,且当此【杀】因执行效果而对目标角色造成伤害后,你弃置其一张牌。若此【大攻车】未被强化,则其他角色无法弃置你装备区内的【大攻车】。当此牌离开你的装备区后,销毁之。', + dukui:'杜夔', + dcfanyin:'泛音', + dcfanyin_info:'出牌阶段开始时,你可以亮出牌堆中点数最小的一张牌。然后你选择一项,并可以亮出一张点数为此牌二倍的牌且重复此流程:⒈使用此牌;⒉你于本回合内使用的下一张基本牌或普通锦囊牌选择目标后,可以增加一个目标。', + dcpeiqi:'配器', + dcpeiqi_info:'当你受到伤害后,你可以移动场上的一张牌。然后若场上所有角色均在彼此的攻击范围内,则你可以再移动场上的一张牌。', + quanhuijie:'全惠解', + dchuishu:'慧淑', + dchuishu_info:'摸牌阶段结束时,你可以摸[3]张牌。若如此做:你弃置[1]张手牌,且当你于本回合内弃置第[2]+1张牌后,你从弃牌堆中随机获得等量的锦囊牌。', + dcyishu:'易数', + dcyishu_info:'锁定技。当你不因出牌阶段而失去牌后,你令A={〖慧淑〗的中括号内最小的数字},B={〖慧淑〗的中括号内最大的数字}。然后你令A中的一个数字+2,且B中的一个数字-1。', + dcligong:'离宫', + dcligong_info:'觉醒技。准备阶段,若〖慧淑〗的中括号内有不小于5的数字,则你加1点体力上限,回复1点体力并失去〖易数〗。系统随机检索四张吴势力的女性武将牌,然后你选择一项:⒈摸三张牌。⒉失去〖慧淑〗,然后获得这些武将牌上的任意两个非Charlotte技能。', + dingshangwan:'丁尚涴', + dcfengyan:'讽言', + dcfengyan_info:'出牌阶段每项各限一次。你可以:⒈令一名体力值不大于你的其他角色交给你一张手牌。⒉视为对一名手牌数不大于你的角色使用一张【杀】(无距离和次数限制)。', + dcfudao:'抚悼', + dcfudao_info:'游戏开始时,你选择一名其他角色,称为“继子”角色。当你或“继子”每回合首次使用牌指定对方为目标后,你与其各摸两张牌。当有角色杀死你或“继子”后,该角色称为“决裂”角色。当你或“继子”对“决裂”造成伤害后,此伤害+1。当你成为“决裂”角色使用牌的目标后,其本回合内不能再使用牌。', + luyi:'卢弈', + dcyaoyi:'邀弈', + dcyaoyi_info:'锁定技。①游戏开始时,你令所有存活且未拥有转换技的角色获得〖手谈〗。②你发动〖手谈〗时无需弃置牌,且无次数限制。③所有拥有转换技的角色不能使用牌指定其他拥有转换技且双方所有转换技状态均相同的角色为目标。', + dcfuxue:'复学', + dcfuxue_info:'①准备阶段,你可以从弃牌堆中选择获得至多X张不因使用而进入弃牌堆的牌。②结束阶段,若你的手牌区中没有因〖复学①〗获得的牌,则你摸X张牌(X为你的体力值)。', + dcshoutan:'手谈', + dcshoutan_info:'转换技。出牌阶段限一次,阴:你可以弃置一张不为黑色的手牌。阳:你可以弃置一张黑色手牌。', + dc_liuye:'刘晔', + dcpoyuan:'破垣', + dcpoyuan_info:'游戏开始时或准备阶段开始时,若你的装备区内:没有【霹雳投石车】,则你可以将一张【霹雳投石车】置入装备区;有【霹雳投石车】,则你可以弃置一名其他角色至多两张牌。', + dchuace:'画策', + dchuace_info:'出牌阶段限一次。你可以将一张手牌当做上一轮内未被使用过的普通锦囊牌使用。', + pilitoushiche:'霹雳投石车', + pilitoushiche_info:'锁定技。①你于回合内使用基本牌无距离限制,且当你于回合内使用基本牌时,你令此牌的牌面数值+1。②当你于回合外使用或打出基本牌时,你摸一张牌。③当此牌离开你的装备区时,销毁之。', + zhaozhi:'赵直', + dctongguan:'统观', + dctongguan_info:'一名角色的第一个回合开始时,你为其选择一项属性(每个属性至多选两次,且仅对你可见)。', + dcmengjie:'梦解', + dcmengjie_info:'一名角色的回合结束时,若其本回合完成了其〖统观〗属性,你执行对应效果:
  • 「武勇」造成伤害:对一名其他角色造成1点伤害;
  • 「刚硬」回复体力,或于获得牌后手牌数大于体力值:令一名角色回复1点体力;
  • 「多谋」于摸牌阶段外摸牌:摸两张牌;
  • 「果决」弃置或获得其他角色的牌:弃置一名角色区域内至多两张牌;
  • 「仁智」交给其他角色牌:令一名其他角色将手牌补至体力上限(至多摸五张)。', + dctongguan_wuyong:'武勇', + dctongguan_wuyong_info:'任务目标:造成伤害。', + dctongguan_gangying:'刚硬', + dctongguan_gangying_info:'任务目标:回复体力,或于获得牌后手牌数大于体力值。', + dctongguan_duomou:'多谋', + dctongguan_duomou_info:'任务目标:于摸牌阶段外摸牌。', + dctongguan_guojue:'果决', + dctongguan_guojue_info:'任务目标:弃置或获得其他角色的牌。', + dctongguan_renzhi:'仁智', + dctongguan_renzhi_info:'任务目标:交给其他角色牌。', + zhujianping:'朱建平', + olddcxiangmian:'相面', + olddcxiangmian_info:'其他角色的结束阶段,你可以判定。然后你不能再对其发动此技能,其获得以下效果:当其使用第X张结果的花色的牌后(X为结果的点数),其失去等同于其体力值的体力。', + dcxiangmian:'相面', + dcxiangmian_info:'出牌阶段限一次。你可以令一名其他角色判定,然后你不能再对其发动此技能,其获得以下效果:当其使用结果的花色的牌后,或当其使用X张牌后(X为结果的点数),其失去等同于其体力值的体力。', + dctianji:'天机', + dctianji_info:'锁定技。当判定牌进入弃牌堆后,你从牌堆随机获得分别与该牌类型、花色和点数相同的牌各一张。', + yuanji:'袁姬', + dcmengchi:'蒙斥', + dcmengchi_info:'锁定技。若你未于当前回合获得过牌:你不能使用牌;当你横置前,取消之;当你受到无属性伤害后,回复1点体力。', + dcfangdu:'芳妒', + dcfangdu_info:'锁定技。当你于回合外受到伤害后,若此次伤害为你于本回合受到的:第一次无属性伤害,你回复1点体力;第一次属性伤害,你随机获得伤害来源的一张牌。', + dcjiexing:'节行', + dcjiexing_info:'当你受到伤害后、失去体力后或回复体力后,你可以摸一张牌,且此牌不计入本回合的手牌上限。', + dongguiren:'董贵人', + dclianzhi:'连枝', + dclianzhi_info:'①游戏开始时,你选择一名其他角色(仅你可见)。②每回合限一次。当你进入濒死状态时,若〖连枝①〗角色存活,你回复1点体力并与其各摸一张牌。③当〖连枝①〗角色死亡后,你可以与一名其他角色各获得〖受责〗,且其获得与你拥有的等量枚“绞”标记(至少获得1枚)。', + dclingfang:'凌芳', + dclingfang_info:'锁定技。准备阶段,或当其他角色使用黑色牌结算结束后,若你是此牌的目标,或你使用黑色牌结算结束后,若你不是此牌目标,你获得1枚“绞”。', + dcfengying:'风影', + dcfengying_info:'①一名角色的回合开始时,你记录弃牌堆中所有黑色基本牌或黑色普通锦囊牌的牌名。②每回合每种牌名各限一次。你可以将一张点数不大于“绞”数的手牌当做任意一张〖风影①〗记录中的牌使用。', + dcshouze:'受责', + dcshouze_info:'锁定技。结束阶段,若你有“绞”,你弃1枚“绞”,随机获得弃牌堆中的一张黑色牌,失去1点体力。', + chengbing:'程秉', + dcjingzao:'经造', + dcjingzao_info:'出牌阶段每名角色限一次。你可以选择一名其他角色并亮出牌堆顶三张牌,其选择一项:1.弃置一张牌名与这些牌的其中一张牌名相同的牌,然后你〖经造〗本回合亮出的牌数+1;2.令你随机获得这些牌中每种牌名的牌各一张,然后你本回合不能再发动〖经造〗。', + dcenyu:'恩遇', + dcenyu_info:'锁定技。当你成为其他角色使用牌的目标后,若你本回合成为过此牌名的牌的目标,此牌对你无效。', + dc_zhouxuān:'周宣', + dcwumei:'寤寐', + dcwumei_info:'每轮限一次。回合开始时,你可以令一名角色记录场上所有角色的体力值并进行一个额外的回合,并将你的回合移至该回合后进行。该角色以此法进行的回合的结束阶段,将场上所有角色的体力值改为记录内的对应数值。', + dczhanmeng:'占梦', + dczhanmeng_info:'当你使用牌时,你可以选择本回合未选择过的一项:1.上一回合内,若没有同名牌被使用过,你获得一张非伤害牌;2.下一回合内,当同名牌首次被使用后,你获得一张伤害牌;3.令一名其他角色弃置两张牌,若点数之和大于10,你对其造成1点火焰伤害。', + dc_wangyun:'十周年王允', + dc_wangyun_ab:'王允', + dclianji:'连计', + dclianji_info:'出牌阶段限一次。你可以弃置一张手牌并选择一名其他角色,其随机使用牌堆中的一张武器牌,然后其选择一项:1.对另一名其他角色使用一张【杀】,并将武器牌交给其中一个目标;2.令你视为对其使用一张【杀】,并将武器牌交给你。', + dcmoucheng:'谋逞', + dcmoucheng_info:'觉醒技。准备阶段,若你发动过〖连计〗且两个选项均被选择过,你失去〖连计〗,然后获得〖矜功〗。', + xuelingyun:'薛灵芸', + dcxialei:'霞泪', + dcxialei_info:'当你的红色牌进入弃牌堆后,或当你使用或打出的红色牌经由处理区进入弃牌堆后,你可以观看牌堆顶的三张牌,获得其中的一张牌,且可以将其余牌置于牌堆底。然后你本回合以此法观看的牌数-1。', + dcanzhi:'暗织', + dcanzhi_info:'出牌阶段或当你受到伤害后,你可以判定,若结果为红色,你重置〖霞泪〗的观看牌数;若结果为黑色,〖暗织〗于本回合失效,然后你可以令一名非当前回合角色获得本回合进入弃牌堆的两张牌。', + yanghong:'杨弘', + dcjianji:'间计', + dcjianji_info:'出牌阶段限一次。你可以令至多X名座位连续的角色依次弃置一张牌。然后其中手牌数最多的角色可以视为对一名其他以此法弃置过牌的角色使用一张【杀】(X为你的攻击范围)。', + dcyuanmo:'远谟', + dcyuanmo_info:'①准备阶段或当你受到伤害后,你可以选择一项:1.攻击范围+1,然后若你攻击范围内的角色数因此增加,你可以获得任意名本次进入你攻击范围的角色各一张牌;2.攻击范围-1,然后摸两张牌。②结束阶段,若你的攻击范围内没有角色,你可以令你的攻击范围+1。', + dc_yangbiao:'杨彪', + dczhaohan:'昭汉', + dczhaohan_info:'摸牌阶段,你可以多摸两张牌,然后你于获得牌后选择一项:1.将两张手牌交给一名没有手牌的角色;2.弃置两张手牌。', + dcjinjie:'尽节', + dcjinjie_info:'当一名角色进入濒死状态时,若你本轮:进行过回合,你可以令其摸一张牌;未进行过回合,你可以弃置X张手牌令其回复1点体力(X为本轮你发动过〖尽节〗的次数)。', + dcjue:'举讹', + dcjue_info:'准备阶段,你可以视为对一名未受伤的角色使用一张【杀】。', + dc_tengfanglan:'滕芳兰', + dcluochong:'落宠', + dcluochong_info:'一轮游戏开始时,你可以弃置任意名角色区域里的共计至多[4]张牌,然后若你以此法弃置了一名角色的至少三张牌,则你方括号内的数字-1。', + dcaichen:'哀尘', + dcaichen_info:'锁定技。若牌堆剩余数:大于80,当你因〖落宠〗弃置你区域内的牌后,你摸两张牌;大于40,你跳过弃牌阶段;小于40,你不能响应♠牌。', + xielingyu:'谢灵毓', + dcyuandi:'元嫡', + dcyuandi_info:'当其他角色于其出牌阶段使用第一张牌时,若此牌仅指定其为目标,你可以选择一项:1.弃置其一张手牌;2.你与其各摸一张牌。', + dcxinyou:'心幽', + dcxinyou_info:'出牌阶段限一次。你可以将体力回复至上限并将手牌补至体力上限。若你以此法:获得了至少两张牌,你于结束阶段失去1点体力;回复了体力,你于结束阶段弃置两张牌。', + zerong:'笮融', + dccansi:'残肆', + dccansi_info:'锁定技。准备阶段,你回复1点体力并选择一名其他角色,其回复1点体力,然后你视为对其依次使用以下能使用的牌:【杀】(无距离限制)、【决斗】、【火攻】。当其以此法受到1点伤害后,你摸两张牌。', + dcfozong:'佛宗', + dcfozong_info:'锁定技。出牌阶段开始时,若你的手牌数大于7,你将X张手牌置于武将牌上(X为你的手牌数-7)。然后若你的武将牌上有至少七张牌,其他角色依次选择一项:1.获得其中的一张牌并令你回复1点体力;2.令你失去1点体力。', + dc_ruiji:'芮姬', + dcwangyuan:'妄缘', + dcwangyuan_info:'当你于回合外失去牌后,或于回合内发动〖俐影〗后,你可以随机将牌堆里的一张与你所有“妄”牌名均不同的基本牌或锦囊牌置于武将牌上,称为“妄”(不超过游戏人数)。', + dclingyin:'铃音', + // dclingyin_info:'出牌阶段开始时,你可以获得至多X张“妄”(X为游戏轮数)然后若你的“妄”颜色均相同,你于本回合对其他角色造成的伤害+1,且可以将一张武器牌或防具牌当【决斗】使用。', + dclingyin_info:'出牌阶段开始时,你可以选择至多X张“妄”(X为游戏轮数),若这些牌以外的“妄”中不存在颜色不同的牌,则你于本回合对其他角色造成的伤害+1,且可以将一张武器牌或防具牌当【决斗】使用。你获得这些牌。', + dcliying:'俐影', + dcliying_info:'每回合限一次。当你于摸牌阶段外获得牌后,你可以将这些牌中的任意张交给一名其他角色,然后摸一张牌。', + huanfan:'桓范', + dcjianzheng:'谏诤', + dcjianzheng_info:'出牌阶段限一次。你可以观看一名其他角色的手牌,然后若其中有你可以使用的手牌,你获得并使用其中一张。若你未以此法使用牌,你令你与其横置,然后其观看你的手牌。', + dcfumou:'腹谋', + dcfumou_info:'当你受到1点伤害后,你可以令至多X名角色依次选择一项:1.移动场上的一张牌;2.弃置所有手牌并摸两张牌;3.弃置装备区里的所有牌并回复1点体力(X为你已损失的体力值)。', + chentai:'陈泰', + dcctjiuxian:'救陷', + dcctjiuxian_info:'出牌阶段限一次。你可以重铸一半数量的手牌(向上取整),然后视为使用一张【决斗】。当此牌对目标角色造成伤害后,你可以令其攻击范围内的一名其他角色回复1点体力。', + dcchenyong:'沉勇', + dcchenyong_info:'结束阶段,你可以摸X张牌(X为本回合你使用过的牌的类型数)。', + sunyu:'孙瑜', + dcquanshou:'劝守', + dcquanshou_info:'一名角色的回合开始时,若其手牌数小于其体力上限,你可以令其选择一项:1.将手牌摸至体力上限,然后本回合使用【杀】的次数上限-1(至多摸五张);2.其本回合使用牌被抵消后,你摸一张牌。', + dcshexue:'设学', + dcshexue_info:'①出牌阶段开始时,你可以将一张牌当做于上回合的角色于其出牌阶段内使用的最后一张基本牌或普通锦囊牌使用。②出牌阶段结束时,你可以令下回合的角色于其出牌阶段开始时可以将一张牌当做你于此阶段内使用的最后一张基本牌或普通锦囊牌使用。', + xizheng:'郤正', + dcdanyi:'耽意', + dcdanyi_info:'当你使用牌指定第一个目标后,若此牌的目标与你使用的上一张牌目标相同,你可以摸X张牌(X为此牌目标数)。', + dcwencan:'文灿', + dcwencan_info:'出牌阶段限一次。你可以选择至多两名体力值不同且均与你的体力值不同的角色,这些角色依次选择一项:1.弃置两张花色不同的牌;2.本回合你对其使用牌无次数限制。', + zhangjinyun:'张瑾云', + dchuizhi:'蕙质', + dchuizhi_info:'摸牌阶段结束时,你可以选择是否弃置任意张手牌,然后将手牌摸至与全场手牌数最多的角色相同(至少摸一张,至多摸五张)。', + dcjijiao:'继椒', + dcjijiao_info:'限定技。出牌阶段,你可以令一名角色获得所有弃牌堆中你于本局游戏内使用或弃置过的普通锦囊牌,且这些牌不能被【无懈可击】响应。一名角色的回合结束后,若本回合牌堆洗过牌或有角色死亡,你重置〖继椒〗。', + duanqiaoxiao:'段巧笑', + dccaizhuang:'彩妆', + dccaizhuang_info:'出牌阶段限一次。你可以弃置任意张花色各不相同的牌。然后若你手牌中的花色数小于你以此法弃置的牌数,你摸一张牌并重复此流程。', + dchuayi:'华衣', + dchuayi_info:'结束阶段,你可以判定,然后你获得如下效果直到你下回合开始时:红色,其他角色回合结束时,你摸一张牌;黑色,当你受到伤害后,你摸两张牌。', + wu_zhugeliang:'武诸葛亮', + dcjincui:'尽瘁', + dcjincui_info:'锁定技。①游戏开始时,你将手牌摸至七张。②准备阶段,你将体力值回复或失去至等同于牌堆中点数为7的牌数(你的体力值最低因此调整至1)。然后你观看牌堆顶X张牌,将这些牌以任意顺序置于牌堆顶或牌堆底(X为你的体力值)。', + dcqingshi:'情势', + dcqingshi_info:'当你于出牌阶段使用牌时,若你手牌中有同名牌且你本回合未因此牌名的牌发动过该技能,你可以选择一项:1.令此牌对其中一个目标角色造成的伤害+1;2.令任意名其他角色各摸一张牌;3.摸三张牌,然后〖情势〗于本回合无效。', + dczhizhe:'智哲', + dczhizhe_clear:'invisible', + dczhizhe_info:'限定技。出牌阶段,你可以选择一张手牌并复制之。当你使用或打出此复制牌结算结束后,你获得之,然后你本回合不能再使用或打出此牌。', + ruanji:'阮籍', + dczhaowen:'昭文', + dczhaowen_tag:'昭文', + dczhaowen_info:'出牌阶段开始时,你可以展示所有手牌。然后你于本回合获得如下效果:1.你可以将其中一张黑色牌当做任意一张普通锦囊牌使用(每回合每种牌名限一次);2.当你使用其中的一张红色牌时,你摸一张牌。', + dcjiudun:'酒遁', + dcjiudun_info:'①以你为目标的【酒】(使用方法①)的作用效果改为“目标对应的角色使用的下一张【杀】的伤害基数+1”。②当你成为其他角色使用黑色牌的目标后,若你:未处于【酒】状态,你可以摸一张牌并视为使用一张【酒】;处于【酒】状态,你可以弃置一张手牌令此牌对你无效。', + ganfurenmifuren:'甘夫人糜夫人', + dcchanjuan:'婵娟', + dcchanjuan_info:'每种牌名限一次。当你使用仅指定单一目标的【杀】或普通锦囊牌结算结束后,你可以视为使用一张名称和属性均相同的牌。若这两张牌指定的目标完全相同,你摸一张牌。', + dcxunbie:'殉别', + dcxunbie_info:'限定技。当你进入濒死状态时,你可以将此武将牌替换为“甘夫人”或“糜夫人”(不能选择已在场上的武将)。然后回复至1点体力并防止所有伤害直到当前回合结束。', + dc_mifuren:'糜夫人', + dcguixiu:'闺秀', + dcguixiu_info:'锁定技。①回合开始时,若你于本局游戏未发动过〖闺秀①〗,你摸两张牌。②当你发动〖存嗣〗后,你回复1点体力。', + dccunsi:'存嗣', + dccunsi_info:'限定技。出牌阶段,你可以令一名角色获得〖勇决〗。若该角色不为你,你摸两张牌。', + dcyongjue:'勇决', + dcyongjue_info:'当你于出牌阶段使用第一张【杀】时,你可以选择一项:1.令此【杀】不计入次数;2.获得此牌。', + dc_ganfuren:'甘夫人', + dcshushen:'淑慎', + dcshushen_info:'当你回复1点体力后,你可以选择一名其他角色并选择一项:1.令其回复1点体力;2.你与其各摸一张牌。', + dcshenzhi:'神智', + dcshenzhi_info:'准备阶段,若你的手牌数大于体力值,你可以弃置一张手牌,然后回复1点体力。', + dc_duyu:'杜预', + dcjianguo:'谏国', + dcjianguo_info:'出牌阶段限一次。你可以选择一名角色并选择一项:1.令其摸一张牌,然后其弃置一半的手牌;2.令其弃置一张牌,然后其摸等同于手牌数一半的牌(均向下取整)。', + dcdyqingshi:'倾势', + dcdyqingshi_info:'当你于回合内使用【杀】或普通锦囊牌指定第一个目标后,若目标角色包括其他角色且此牌为你本回合使用的第X张牌,你可以对其中一名不为你的目标角色造成1点伤害(X为你的手牌数)。', + + sp2_yinyu:'隐山之玉', + sp2_huben:'百战虎贲', + sp2_shengun:'奇人异士', + sp2_huangjia:'皇家贵胄', + sp2_zhangtai:'章台春望', + sp2_jinse:'锦瑟良缘', + sp2_bizhe:'笔舌如椽', + sp2_doukou:'豆蔻梢头', + sp2_jichu:'计将安出', + sp2_yuxiu:'钟灵毓秀', + sp2_wumiao:'武庙', + sp2_gaoshan:'高山仰止', + }, + }; +}); diff --git a/game/config.js b/game/config.js index 8e3c14317..4e6d978b5 100644 --- a/game/config.js +++ b/game/config.js @@ -3,7 +3,7 @@ window.config={ GitHub:'https://raw.githubusercontent.com/libccy/noname-extension/master/', }, extension_source:'Coding', - forbidai:['ns_liuzhang','yuji','re_yuji'], + forbidai:['ns_liuzhang'], forbidai_user:[], forbidall:[], forbidstone:['zhugedan','pal_xuanxiao','hs_malfurion','lusu','chenlin','hs_siwangzhiyi', @@ -20,7 +20,7 @@ window.config={ zhinang_tricks:['guohe','wuxie','wuzhong','dongzhuxianji'], connect_zhinang_tricks:['guohe','wuxie','wuzhong','dongzhuxianji'], all:{ - sgscharacters:['standard','shenhua','xinghuoliaoyuan','refresh','yijiang','sp','sp2','extra','old','mobile','tw','yingbian','offline','sb','clan','collab'], + sgscharacters:['standard','shenhua','xinghuoliaoyuan','refresh','yijiang','sp','sp2','xianding','huicui','extra','old','mobile','shiji','tw','yingbian','offline','sb','clan','collab'], sgscards:['standard','extra','sp','guozhan','zhulu','yingbian','yongjian'], sgsmodes:['identity','guozhan','versus','doudizhu','single','brawl','connect'], stockmode:['identity','guozhan','versus','boss','doudizhu','single','chess','stone','connect','brawl','tafang'], @@ -133,7 +133,7 @@ window.config={ sort:'type_sort', cards:['standard','extra'], - characters:['standard','shenhua','sp','sp2','yijiang','refresh','xinghuoliaoyuan','mobile','extra','yingbian','sb','tw','offline','clan','collab'], + characters:['standard','shenhua','sp','sp2','yijiang','refresh','xinghuoliaoyuan','mobile','extra','yingbian','sb','tw','offline','clan','collab','xianding','huicui','shiji'], connect_characters:['diy'], connect_cards:['huanlekapai','guozhan','sp','zhulu','yingbian','yongjian'], plays:[], diff --git a/game/package.js b/game/package.js index b2e9d87b2..0356649b4 100644 --- a/game/package.js +++ b/game/package.js @@ -8,9 +8,12 @@ window.noname_package={ sp:'璀璨星河', yingbian:'文德武备', clan:'门阀士族', + huicui:'群英荟萃', + xianding:'限定专属', sp2:'系列专属', extra:'神将', mobile:'移动版', + shiji:'始计篇', sb:'谋攻篇', collab:'联动卡', offline:'线下武将',