'use strict'; character.hearth={ character:{ hs_jaina:['female','wei',3,['huopu','aoshu','bingjia']], hs_lrexxar:['male','shu',4,['yushou']], hs_wuther:['male','qun',4,['fengxian','jieming']], hs_jgarrosh:['male','shu',4,['zhanhou','qiangxi']], hs_malfurion:['male','wu',4,['jihuo']], hs_guldan:['male','wei',3,['fenliu','hongxi']], hs_anduin:['male','qun',3,['shengguang','shijie','anying']], hs_sthrall:['male','wu',4,['tuteng','guozai','zuling']], hs_waleera:['female','shu',3,['jianren','mengun','wlianji']], hs_medivh:['male','wei',3,['jingxiang','zuzhou','mdzhoufu']], hs_alleria:['male','wu',3,['fengxing','xinliegong']], hs_magni:['male','shu',4,['zhongjia','dunji']], hs_liadrin:['female','shu',4,['xueren']], hs_morgl:['male','wu',3,['s_tuteng']], hs_khadgar:['male','shu',3,['midian','fuwen','jinzhou']], hs_tyrande:['female','qun',3,['yuelu','xingluo']], hs_neptulon:['male','wu',4,['liechao','qingliu']], hs_wvelen:['male','qun',3,['shengyan','xianzhi']], hs_antonidas:['male','wei',3,['yanshu','bingshuang']], hs_alakir:['male','wei',3,['fengnu','shengdun']], hs_zhouzhuo:['male','qun',4,['yiwen']], hs_yngvar:['male','qun',3,['huanwu']], hs_bchillmaw:['male','wei',5,['hanshuang','bingshi']], hs_malorne:['male','wu',3,['enze','chongsheng']], hs_malygos:['male','wei',4,['malymowang']], hs_xuefashi:['male','wei',2,['liehun','xjumo']], hs_loatheb:['male','wu',5,['duzhang']], hs_trueheart:['female','qun',3,['qianghuax']], hs_sainaliusi:['male','wu',4,['chongsheng','yulu']], hs_lrhonin:['male','wei',4,['bingyan','yufa']], hs_bolvar:['male','wei',4,['yuanzheng','bzhuiji']], hs_fuding:['male','wei',4,['shengdun','fbeifa']], hs_xuanzhuanjijia:['male','shu',2,['jixuan']], hs_ysera:['female','wu',4,['chenshui']], hs_alextrasza:['female','shu',5,['fushi']], hs_nozdormu:['male','qun',5,['shixu']], // hs_sapphiron:['male','wei',4,['bingdong','stuxi']], hs_kchromaggus:['male','wei',4,['fenlie']], hs_lreno:['male','shu',4,['tanmi']], hs_brann:['male','shu',3,['qianghua']], hs_finley:['male','wu',3,['maoxian']], hs_kcthun:['male','qun',4,['luanji','xianji']], hs_anomalus:['male','wei',4,['mobao']], hs_blingtron:['male','shu',3,['zengli','xiubu']], hs_yogg:['male','wu',4,['kuangluan']], hs_xialikeer:['female','shu',3,['duxin']], hs_zhishigushu:['male','shu',4,['jiaohui']], hs_zhanzhenggushu:['male','wei',6,['biri']], hs_ronghejuren:['male','shu',8,['ronghuo']], hs_shanlingjuren:['male','wu',8,['luoshi']], hs_aedwin:['male','wu',3,['lianzhan']], hs_mijiaojisi:['female','wu',3,['kuixin']], hs_huzhixiannv:['female','wu',3,['jingmeng','qingliu']], // hs_tgolem:['male','wu',4,['xinwuyan','guozai']], hs_totemic:['male','wu',3,['peiyu']], // hs_wujiyuansu:['male','wu',3,['s_tuteng']], hs_xsylvanas:['female','qun',3,['busi','xshixin','xmojian']], hs_siwangzhiyi:['male','qun',12,['mieshi']], hs_bilanyoulong:['male','wei',4,['lingzhou']], hs_jinglinglong:['male','wu',3,['mianyi']], // hs_ruanniguai:['male','wu',3,['nianfu']], // hs_hudunren:['male','shu',3,['hhudun']], hs_nate:['male','wu',4,['chuidiao']], hs_jiaziruila:['male','wu',4,['hannu']], // hs_shifazhe:['male','wei',3,['jizhi','shifa']], hs_lafamu:['male','shu',4,['xieneng']], hs_yelise:['female','wei',3,['xunbao','zhuizong']], hs_fandral:['male','shu',4,['nuyan','chouhuo']], hs_hallazeal:['male','wei',4,['shengteng','yuansu']], // hs_nzoth:['male','shu',4,['nuyan']], hs_walian:['male','shu',4,['wzhanyi']], // hs_pengpeng:['male','qun',4,['zhadan']], // hs_yashaji:['male','wei',3,[]], // hs_wolazi:['male','wei',3,[]], hs_tanghangu:['male','shu',5,['zhongji']], hs_aya:['female','wu',3,['ayuling','qingzun']], // hs_barnes:['male','wei',3,[]], // hs_nuogefu:['male','wei',3,[]], hs_kazhakusi:['male','shu',3,['lianjin']], // hs_lazi:['male','wei',3,[]], hs_shaku:['male','wei',3,['shouji']], hs_laxiao:['male','shu',3,['guimou','yingxi','longyi']], // hs_xiangyaqishi:['male','wei',3,[]], // hs_fenjie:['male','shu',3,['guimou','yingxi']], }, perfectPair:{ hs_sthrall:['hs_totemic','hs_alakir','hs_neptulon','hs_yngvar','hs_tgolem'], hs_anduin:['hs_wvelen','hs_mijiaojisi'], hs_jaina:['hs_antonidas'], hs_malfurion:['hs_malorne'], }, skill:{ longyi:{ mod:{ maxHandcard:function(player,num){ var hs=player.get('h'); for(var i=0;i0; }, content:function(){ "step 0" var next=player.chooseToDiscard(get.prompt('zhongji',trigger.player),{color:'black'}); next.logSkill=['zhongji',trigger.player]; next.ai=function(card){ if(ai.get.attitude(player,trigger.player)<0){ return 7-ai.get.value(card); } return -1; } "step 1" if(result.bool){ trigger.num++; } }, ai:{ threaten:1.3 } }, fuwen:{ trigger:{player:'phaseDiscardEnd'}, frequent:true, filter:function(event,player){ if(event.cards){ for(var i=0;i0; }, content:function(){ 'step 0' player.chooseTarget(get.prompt('jinzhou'),function(card,player,target){ return target!=player&&!target.hasSkill('fengyin'); }).ai=function(target){ var att=ai.get.attitude(player,target); if(att>=0) return 0; var skills=target.get('s'); for(var i=0;i0; }, filterCard:{type:['trick','delay']}, check:function(card){ return 10-ai.get.value(card); }, content:function(){ var list=get.inpile('trick','trick'); var list2=[]; for(var i=0;i<3;i++){ list2.push(game.createCard(list.randomGet())); } player.gain(list2,'draw'); }, ai:{ order:9.8, threaten:1.8, result:{ player:1 } } }, xingluo:{ trigger:{player:'phaseBegin'}, direct:true, filter:function(event,player){ return !player.isMostHandcard(); }, content:function(){ 'step 0' var nh=player.num('h'); var num=game.countPlayer(function(current){ return current.num('h')>nh; }); player.chooseTarget(get.prompt('xingluo'),[1,num],function(card,player,target){ return target.num('h')>nh; }).ai=function(target){ return 0.5-ai.get.attitude(player,target); } 'step 1' if(result.bool){ event.cards=[]; event.list=result.targets.slice(0); event.list.sort(lib.sort.seat); player.logSkill('xingluo',result.targets); } else{ event.finish(); } 'step 2' if(event.list.length){ event.list.shift().chooseToDiscard('h',true); } else{ event.goto(4); } 'step 3' if(result.bool&&result.cards.length){ event.cards.push(result.cards[0]); } event.goto(2); 'step 4' if(event.cards.length){ player.chooseCardButton('选择一张加入手牌',event.cards).ai=function(button){ return ai.get.value(button.link); }; } else{ event.finish(); } 'step 5' if(result.bool){ player.gain(result.links,'gain2'); } }, ai:{ expose:0.2 } }, yuelu:{ enable:'chooseToUse', filter:function(event,player){ return event.type=='dying'&&player.num('he',{color:'black'}); }, filterCard:{color:'black'}, position:'he', check:function(card){ return 11-ai.get.value(card); }, filterTarget:function(card,player,target){ return target==_status.event.dying; }, selectTarget:-1, content:function(){ target.recover(); target.changeHujia(); }, ai:{ order:10, skillTagFilter:function(player){ if(player.num('he',{color:'black'})==0) return false; }, save:true, result:{ target:3 }, threaten:2 }, }, yushou:{ enable:'phaseUse', filterCard:true, position:'he', check:function(card){ return 5-ai.get.value(card); }, filter:function(event,player){ if(player.hasSkill('yushou_misha')&&player.hasSkill('yushou_huofu')&&player.hasSkill('yushou_leiouke')) return false; return true; }, content:function(){ if(!lib.character.stone_misha){ lib.character.stone_misha=['male','shu',3,['chaofeng'],['minskin','stone','mode:stone'],[3,3,'hunter']]; } if(!lib.character.stone_huofu){ lib.character.stone_huofu=['male','qun',2,['stone_chongfeng'],['minskin','stone','mode:stone'],[3,4,'hunter']]; } if(!lib.character.stone_leiouke){ lib.character.stone_leiouke=['male','shu',2,['hunter_zhanhuo'],['minskin','stone','mode:stone'],[3,1,'hunter']]; } var list=['misha','leiouke','huofu']; for(var i=0;i=1; }, usable:1, content:function(){ if(trigger.num>=1){ trigger.num--; } }, ai:{ effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ if(player.hasSkill('jueqing')) return; return 0.5; } } } }, }, yushou_huofu:{ enable:'phaseUse', viewAs:{name:'juedou'}, filterCard:{color:'black'}, position:'he', viewAsFilter:function(player){ if(!player.num('he',{color:'black'})) return false; }, check:function(card){ return 6-ai.get.value(card); }, ai:{ basic:{ order:10 } } }, yushou_leiouke:{ trigger:{source:'damageBegin'}, forced:true, usable:1, content:function(){ trigger.num++; } }, qingzun:{ subSkill:{ count:{ trigger:{player:'useCard'}, forced:true, popup:false, silent:true, filter:function(event,player){ return event.card.name.indexOf('hsqingyu_')==0; }, content:function(){ player.storage.qingzun++; player.updateMarks(); } }, draw1:{ trigger:{player:'phaseBegin'}, filter:function(event,player){ return player.storage.qingzun>=2; }, frequent:true, content:function(){ player.draw(); } }, draw2:{ trigger:{player:'phaseEnd'}, filter:function(event,player){ return player.storage.qingzun>=6; }, frequent:true, content:function(){ player.draw(); } }, }, mod:{ maxHandcard:function(player,num){ return num+player.storage.qingzun; } }, init:function(player){ player.storage.qingzun=0; }, mark:true, marktext:'玉', intro:{ content:function(storage,player){ if(!storage) return '未使用过青玉牌'; var str='手牌上限+'+storage; if(storage>=6){ str+=';准备阶段和结束阶段,你可以摸一张牌' } else if(storage>=2){ str+=';准备阶段,你可以摸一张牌' } return str; } }, group:['qingzun_count','qingzun_draw1','qingzun_draw2'], }, ayuling:{ trigger:{player:'damageEnd'}, frequent:true, content:function(){ var list=['feibiao','hufu','zhao','zhanfang','shandian']; player.gain(game.createCard('hsqingyu_'+list.randomGet()),'draw'); }, ai:{ maixie:true, effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ if(player.hasSkill('jueqing')) return [1,-2]; if(!target.hasFriend()) return; if(target.hp>=4) return [1,get.tag(card,'damage')*2]; if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; } } } } }, aoshu:{ enable:'phaseUse', usable:1, position:'he', filterCard:function(card){ return get.suit(card)=='spade'; }, viewAs:{name:'wuzhong'}, viewAsFilter:function(player){ if(!player.num('he',{suit:'spade'})) return false; }, prompt:'将一张黑桃手牌当作无中生有使用', check:function(card){return 7-ai.get.value(card)}, ai:{ threaten:1.4, order:9, } }, bzhuiji:{ trigger:{global:'dieAfter'}, check:function(event,player){ return ai.get.attitude(player,event.source)<=0; }, filter:function(event,player){ return event.source&&event.source.isAlive()&&event.source!=player; }, content:function(){ player.draw(2); player.useCard({name:'juedou'},trigger.source); }, ai:{ threaten:1.5, expose:0.1 } }, lianjin_old:{ enable:'phaseUse', usable:2, filterCard:true, check:function(card){ return 7-ai.get.value(card); }, content:function(){ 'step 0' var list=get.inpile('trick'); list=list.randomGets(3); for(var i=0;i=2) continue; if(names.length>=3) continue; var select=get.select(info.selectTarget); if(select[0]==-1&&select[1]==-1){ names.push(inpile[i]); if(info.modTarget) single=true; } else if(select[0]==1&&select[1]==1){ names.push(inpile[i]); single=true; } } if(equip){ names.push(equips.randomGet()); } names.sort(lib.sort.name); var name='hsyaoshui_'+names[0]+'_'+names[1]+'_'+names[2]; if(!lib.card[name]){ lib.card[name]=get.copy(lib.skill.lianjin.template); lib.card[name].names=names; lib.card[name].selectTarget=single?1:-1; lib.translate[name]='药水'; lib.translate[name+'_info']=get.translation(names[0])+'、'+ get.translation(names[1])+'、'+get.translation(names[2]); } cards[0].style.transitionDuration='0.2s'; ui.refresh(cards[0]); cards[0].classList.add('opaque'); event.cardname=name; if(player!=game.me){ var fakecard=game.createCard(name); fakecard.node.info.remove(); player.$draw(fakecard); } game.delay(0,200); 'step 1' cards[0].style.transitionDuration='0s'; ui.refresh(cards[0]); cards[0].classList.remove('fullskin'); cards[0].init([cards[0].suit,cards[0].number,event.cardname]); game.delay(0,100); 'step 2' cards[0].style.transitionDuration=''; ui.refresh(cards[0]); cards[0].classList.remove('opaque'); game.delay(0,200); }, template:{ type:'hsyaoshui', enable:true, fullimage:true, image:'card/hsyaoshui', vanish:true, derivation:'hs_kazhakusi', multitarget:true, multiline:true, filterTarget:function(card,player,target){ var info=get.info(card); var names=info.names; for(var i=0;i=3) return -1; var num=0; for(var i=0;i0){ num++; } else if(eff<0){ num-=0.9; } } return num; } } } }, ai:{ order:9, result:{ player:1 }, threaten:1.4 }, }, shouji:{ group:['shouji_begin','shouji_miss'], subSkill:{ begin:{ trigger:{player:'shaBegin'}, frequent:true, usable:1, filter:function(event){ return event.target.num('h')>0; }, content:function(){ player.gain(game.createCard(trigger.target.get('h').randomGet()),'draw'); } }, miss:{ trigger:{player:'shaMiss'}, frequent:true, usable:1, filter:function(event){ return event.target.num('e')>0; }, content:function(){ player.gain(game.createCard(trigger.target.get('e').randomGet()),'draw'); } } } }, yingxi:{ trigger:{player:'phaseEnd'}, direct:true, filter:function(event,player){ return !player.getStat('damage')&&player.num('he',{color:'black'})>0; }, content:function(){ 'step 0' player.chooseCardTarget({ prompt:get.prompt('yingxi'), filterCard:{color:'black'}, filterTarget:function(card,player,target){ return lib.filter.targetEnabled({name:'sha'},player,target); }, position:'he', ai1:function(card){ return 8-ai.get.value(card); }, ai2:function(target){ return ai.get.effect(target,{name:'sha'},player,player); } }); 'step 1' if(result.bool){ player.useCard({name:'sha'},result.cards,result.targets,'yingxi'); } }, group:'yingxi2', }, yingxi2:{ trigger:{player:'shaBegin'}, forced:true, popup:false, filter:function(event,player){ return event.skill=='yingxi'&&event.target.isHealthy(); }, content:function(){ trigger.directHit=true; } }, guimou:{ trigger:{player:'damageEnd'}, check:function(event,player){ return ai.get.attitude(player,event.source)<=0; }, filter:function(event,player){ return event.source&&event.source.isAlive()&&event.source!=player&&event.source.num('h')>0; }, content:function(){ var card=trigger.source.get('h').randomGet(); if(card){ player.gain(card,trigger.source); if(get.color(card)=='black'){ trigger.source.$give(card,player); event.redo(); } else{ trigger.source.$giveAuto(card,player); } game.delay(0.5); } }, ai:{ maixie:true, effect:{ target:function(card,player,target){ if(player.hasSkill('jueqing')) return [1,-2]; if(!target.hasFriend()) return false; if(get.tag(card,'damage')&&player.num('h')>1) return [1,0,0,-1]; } } } }, peiyu:{ trigger:{player:['phaseBegin']}, direct:true, content:function(){ 'step 0' player.chooseTarget(get.prompt('peiyu'),function(card,player,target){ for(var i=1;i<=8;i++){ if(target.hasSkill('tuteng'+i)) return false; } return true; }).ai=function(target){ if(player==target&&ai.get.attitude(player,target)>0&&event.parent.triggername=='phaseBegin'){ return ai.get.attitude(player,target)+10; } return ai.get.attitude(player,target); } 'step 1' if(result.bool){ player.logSkill('peiyu',result.targets); var rand=['tuteng1','tuteng2','tuteng3','tuteng4', 'tuteng5','tuteng6','tuteng7','tuteng8']; result.targets[0].addAdditionalSkill('peiyu',['peiyu2',rand.randomGet()]); } } }, peiyu2:{ trigger:{player:'damageAfter'}, forced:true, popup:false, silent:true, content:function(){ player.removeAdditionalSkill('peiyu'); } }, peiyu_old:{ enable:'phaseUse', filterCard:true, position:'he', filterTarget:true, check:function(card){ return 6-ai.get.value(card); }, content:function(){ 'step 0' var rand=['tuteng1','tuteng2','tuteng3','tuteng4', 'tuteng5','tuteng6','tuteng7','tuteng8']; var rand2=[]; for(var i=0;i1){ rand.remove('tuteng1'); } gain=rand.randomGet(); target.removeSkill(rand2.randomGet()) } } target.addSkill(gain); target.storage.peiyu[gain]=player; game.delay(); event.finish(); } } else{ var gain=rand.randomGet(); target.addSkill(gain); target.storage.peiyu[gain]=player; game.delay(); event.finish(); } 'step 1' var skill1=result.buttons[0].name; var skill2=result.buttons[1].name; if(target.hasSkill(skill1)){ target.removeSkill(skill1); target.addSkill(skill2); target.storage.peiyu[skill2]=player; } else{ target.removeSkill(skill2); target.addSkill(skill1); target.storage.peiyu[skill1]=player; } }, ai:{ expose:0.2, order:5, result:{ target:function(player,target){ for(var i=1;i<=8;i++){ if(target.hasSkill('tuteng'+i)) return 0; } return 1; } } }, group:'peiyu_old2' }, peiyu_old2:{ trigger:{player:'dieBegin'}, forced:true, popup:false, content:function(){ game.countPlayer(function(current){ for(var j in current.storage.peiyu){ if(current.storage.peiyu[j]==player){ current.removeSkill(j); } } }); } }, wzhanyi:{ trigger:{player:'phaseUseBefore'}, check:function(event,player){ return player.num('h')+2<=player.hp; }, content:function(){ 'step 0' event.cards=get.cards(3); trigger.untrigger(); trigger.finish(); player.$draw(event.cards.slice(0)); for(var i=0;i=3; }, filterTarget:function(card,player,target){ return player.canUse('yuansuhuimie',target); }, selectTarget:-1, multitarget:true, multiline:true, line:'thunder', content:function(){ player.maxHp=player.hp; player.update(); targets.sort(lib.sort.seat); player.useCard({name:'yuansuhuimie'},targets).animate=false; } }, chouhuo:{ unique:true, trigger:{player:'phaseBegin'}, forced:true, skillAnimation:true, animationColor:'fire', filter:function(event,player){ if(player.storage.nuyan&&player.storage.nuyan.length){ var num=0; for(var i=0;i0){ if(players[i].hp<2){ lose--; recover+=0.5; } lose--; recover++; } else if(ai.get.attitude(player,players[i])<0){ if(players[i].hp<2){ lose++; recover-=0.5; } lose++; recover--; } } else{ if(ai.get.attitude(player,players[i])>0){ lose--; } else if(ai.get.attitude(player,players[i])<0){ lose++; } } } if(button.link[2]=='nanman'||button.link[2]=='nanman'||button.link[2]=='yuansuhuimie'|| button.link[2]=='chiyuxi'||button.link[2]=='jingleishan'){ if(lose>recover&&lose>0){ return 2; } else{ return 0; } } return 1; }, backup:function(links,player){ return { filterCard:function(){return false}, selectCard:-1, popname:true, viewAs:{name:links[0][2]}, onuse:function(result,player){ player.loseHp(); } } }, prompt:function(links,player){ return '失去一点体力,视为使用一张'+get.translation(links[0][2]); } }, ai:{ order:6, result:{ player:function(player){ if(player.hp>1) return 1; return 0; } }, } }, nuyan:{ enable:'phaseUse', usable:1, filter:function(event,player){ return player.num('he',{color:'red'})>0 }, init:function(player){ player.storage.nuyan=[]; }, chooseButton:{ dialog:function(event,player){ var list=[]; for(var i=0;i0){ if(players[i].hp<2){ lose--; recover+=0.5; } lose--; recover++; } else if(ai.get.attitude(player,players[i])<0){ if(players[i].hp<2){ lose++; recover-=0.5; } lose++; recover--; } } else{ if(ai.get.attitude(player,players[i])>0){ lose--; } else if(ai.get.attitude(player,players[i])<0){ lose++; } } } if(button.link[2]=='nanman'||button.link[2]=='nanman'||button.link[2]=='yuansuhuimie'|| button.link[2]=='chiyuxi'||button.link[2]=='jingleishan'){ if(lose>recover&&lose>0){ return 2; } else{ return 0; } } return 1; }, backup:function(links,player){ return { filterCard:{color:'red'}, selectCard:1, position:'he', popname:true, viewAs:{name:links[0][2]}, ai1:function(card){ return 6-ai.get.value(card); }, onuse:function(result,player){ player.storage.nuyan.add(result.card.name); } } }, prompt:function(links,player){ return '将一张红色牌当作'+get.translation(links[0][2])+'使用'; } }, ai:{ order:6, result:{ player:1 }, } }, duxin:{ trigger:{player:['phaseBegin','phaseEnd']}, frequent:true, filter:function(event,player){ return !player.num('h',{type:'hsdusu'}); }, content:function(){ var list=['hsdusu_xueji','hsdusu_huangxuecao','hsdusu_kuyecao','hsdusu_shinancao','hsdusu_huoyanhua']; if(typeof lib.cardType.hslingjian!='number'){ list.remove('hsdusu_kuyecao'); } var name=list.randomGet(); if(name=='hsdusu_huoyanhua'){ player.gain(game.createCard({name:name,nature:'fire'}),'draw'); } else{ player.gain(game.createCard(name),'draw'); } }, ai:{ threaten:1.6 } }, hsdusu_shinancao:{ mark:true, marktext:'楠', nopop:true, intro:{ content:'下一次造成的伤害+1' }, logv:false, trigger:{source:'damageBegin'}, forced:true, content:function(){ trigger.num++; player.removeSkill('hsdusu_shinancao'); } }, kuangluan_old:{ group:['kuangluan_count1','kuangluan_count2','kuangluan_use'], subSkill:{ count1:{ trigger:{player:'useCard'}, forced:true, popup:false, silent:true, filter:function(event,player){ return _status.currentPhase==player&&get.type(event.card)=='trick'; }, content:function(){ player.storage.kuangluan++; } }, count2:{ trigger:{player:'phaseBegin'}, forced:true, popup:false, silent:true, content:function(){ player.storage.kuangluan=0; } }, use:{ trigger:{player:'phaseUseEnd'}, forced:true, filter:function(event,player){ return player.storage.kuangluan>0; }, content:function(){ var list=[]; for(var i=0;i0&&info.selectTarget[1]>=info.selectTarget[0]){ list.push(lib.inpile[i]); } } else if(typeof info.selectTarget=='number'){ list.push(lib.inpile[i]); } } } } var n=player.storage.kuangluan; delete player.storage.kuangluan; while(list.length){ var card={name:list.randomRemove()}; var info=get.info(card); var targets=game.filterPlayer(function(current){ return lib.filter.filterTarget(card,player,current); }); if(targets.length){ targets.sort(lib.sort.seat); if(info.selectTarget==-1){ player.useCard(card,targets); } else{ var num=info.selectTarget; if(Array.isArray(num)){ if(targets.length=2; }, content:function(){ player.recover(player.maxHp); player.goMad('phaseAfter'); } }, kuangluan3:{ trigger:{player:'phaseBegin'}, forced:true, popup:false, silent:true, content:function(){ player.storage.kuangluan=[]; player.unmarkSkill('kuangluan'); } }, xiubu:{ trigger:{player:'equipEnd'}, frequent:true, filter:function(event){ return lib.inpile.contains(event.card.name)&&get.subtype(event.card)=='equip1'&&typeof lib.cardType.hslingjian=='number'; }, content:function(){ var num=1; var info=get.info(trigger.card); if(info&&info.distance&&typeof info.distance.attackFrom=='number'){ num=1-info.distance.attackFrom; } if(num<1){ num=1; } var list=get.typeCard('hslingjian'); var cards=[]; while(num--){ cards.push(game.createCard(list.randomGet())); } player.gain(cards,'gain2'); }, threaten:1.3 }, zengli:{ enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ return target!=player&&!target.isMin(); }, delay:false, content:function(){ 'step 0' var list=[]; for(var i=0;i1){ return 6-ai.get.value(card); } return 0; }).set('logSkill',['xianji',event.target]); } else{ event.finish(); } 'step 1' if(result.bool){ event.target.draw(result.cards.length); player.storage.xianji3=event.target; player.addSkill('xianji3'); player.addExpose(0.2); } } }, xianji3:{ mark:'character', intro:{ content:'每当$对你使用一张牌,你摸一张牌' }, trigger:{target:'useCardToBegin'}, filter:function(event,player){ return event.player==player.storage.xianji3; }, forced:true, content:function(){ player.draw(); }, }, tanmi:{ trigger:{global:'phaseEnd'}, filter:function(event,player){ return player.num('h')==0&&event.player!=player; }, frequent:true, content:function(){ 'step 0' player.draw(2); 'step 1' player.chooseToUse(); 'step 2' if(result.bool){ event.goto(1); } } }, xueren:{ trigger:{source:'damageEnd'}, filter:function(event){ return event.card&&event.card.name=='sha'&&event.player.isAlive(); }, check:function(event,player){ if(ai.get.attitude(player,event.player)>=0) return false; if(player.hp>2) return true; if(player.hp<2) return false; return player.hp>=event.player.hp; }, content:function(){ 'step 0' trigger.player.loseHp(); 'step 1' player.loseHp(); 'step 2' player.draw(2); } }, maoxian:{ enable:'phaseUse', usable:2, direct:true, delay:false, unique:true, content:function(){ 'step 0' var list=get.gainableSkills(); list.remove('maoxian'); list=list.randomGets(3); event.skillai=function(){ return list.randomGet(); }; if(event.isMine()){ var dialog=ui.create.dialog(); dialog.add('选择获得一项技能'); var clickItem=function(){ _status.event._result=this.link; dialog.close(); game.resume(); }; for(var i=0;i
【'+ translation+'】
'+lib.translate[list[i]+'_info']+'
'); item.firstChild.addEventListener('click',clickItem); item.firstChild.link=list[i]; } } dialog.add(ui.create.div('.placeholder')); event.switchToAuto=function(){ event._result=event.skillai(); dialog.close(); game.resume(); }; _status.imchoosing=true; game.pause(); } else{ event._result=event.skillai(); } 'step 1' _status.imchoosing=false; var link=result; player.addAdditionalSkill('maoxian',link); player.popup(link); game.log(player,'获得了技能','【'+get.translation(link)+'】'); player.checkMarks(); player.markSkill('maoxian'); game.delay(); }, intro:{ content:function(storage,player){ return '当前技能:'+get.translation(player.additionalSkills.maoxian); } }, ai:{ order:11, result:{ player:function(player){ if(player.getStat().skill.maoxian) return 0; return 1; } } } }, maoxian_old:{ enable:'phaseUse', usable:2, direct:true, delay:false, unique:true, getSkills:function(player,current){ var names=[]; var list=[]; var map={}; for(var i=0;i=3; }, content:function(){ 'step 0' event.cards=get.cards(3); if(!event.isMine()) player.showCards(event.cards); 'step 1' player.chooseCardButton('获得任意张类别不同的牌',[1,3],event.cards).filterButton=function(button){ var type=get.type(button.link,'trick'); for(var i=0;iai.get.value(cards[i]); } }); if(!list.length){ list=game.findCards(function(name){ if(cards[i].name==name) return; if(get.type({name:name},'trick')==type){ return ai.get.value({name:name})==ai.get.value(cards[i]); } }); } if(!list.length){ list=[cards[i].name]; } cards2.push(game.createCard(list.randomGet())); } player.gain(cards2,'log'); player.$draw(cards2); }, ai:{ order:8, result:{ player:1 } } }, zhuizong:{ enable:'phaseUse', usable:1, filterCard:true, position:'he', selectCard:[1,Infinity], check:function(card){ if(ui.selected.cards.length) return 0; return 6-ai.get.value(card) }, content:function(){ 'step 0' event.cards=get.cards(4*cards.length); player.chooseCardButton('获得其中的一张牌',true,event.cards,true); 'step 1' player.gain(result.links,'draw'); event.cards.remove(result.links[0]); for(var i=0;i=3) return false; for(var i=0;i0; }, filterTarget:function(card,player,target){ if(get.color(card)=='red'){ return player.canUse('chiyuxi',target); } else{ return player.canUse('jingleishan',target); } }, selectTarget:-1, discard:false, delay:false, line:false, filterCard:true, position:'he', log:'notarget', check:function(card){ return 6-ai.get.value(card); }, multitarget:true, content:function(){ if(get.color(cards[0])=='black'){ player.useCard({name:'jingleishan'},cards,targets); } else{ player.useCard({name:'chiyuxi'},cards,targets); } }, ai:{ order:9.1, result:{ target:function(player,target){ var card=ui.selected.cards[0]; if(card&&get.color(card)=='black'){ return ai.get.effect(target,{name:'jingleishan'},player,target); } return ai.get.effect(target,{name:'chiyuxi'},player,target); } } } }, shifa:{ trigger:{player:'phaseUseBegin'}, forced:true, content:function(){ 'step 0' var players=game.filterPlayer(); var list=[]; for(var i in lib.card){ if(!lib.translate[i+'_info']) continue; if(lib.card[i].mode&&lib.card[i].mode.contains(lib.config.mode)==false) continue; if(lib.card[i].type=='trick') list.push(i); } for(var i=0;i1&&event.target.num('he')>0; }, content:function(){ player.discardPlayerCard(trigger.target,get.prompt('yuanzheng',trigger.target),'hej').logSkill=['yuanzheng',trigger.target]; } }, yuanzheng_old:{ trigger:{player:'useCardToBegin'}, direct:true, filter:function(event,player){ if(event.getParent(2).name=='yuanzheng') return false; return event.target&&event.target!=player&&get.distance(player,event.target,'attack')>1; }, content:function(){ 'step 0' player.chooseControl('draw_card','出杀','cancel2',function(){ if(ai.get.effect(trigger.target,{name:'sha'},player,player)>0){ return '出杀'; } return 'draw_card'; }).prompt='是对'+get.translation(trigger.target)+'发动否发动【远征】?'; 'step 1' if(result.control!='cancel2'){ if(result.control=='draw_card'){ player.draw(); player.logSkill('yuanzheng'); } else{ player.logSkill('yuanzheng',trigger.target); player.useCard({name:'sha'},trigger.target,false).animate=false; // player.discardPlayerCard(trigger.target,'he',true); } } } }, byuhuo:{ unique:true, trigger:{player:'dying'}, priority:6, forced:true, mark:true, skillAnimation:true, animationColor:'fire', init:function(player){ player.storage.byuhuo=false; }, filter:function(event,player){ if(player.hp>0) return false; if(player.storage.byuhuo) return false; return true; }, content:function(){ player.storage.byuhuo=true; player.addSkill('byuhuo2'); player.maxHp=2; player.hp=2; player.update(); if(!player.isTurnedOver()){ player.turnOver(); } }, ai:{ threaten:function(player,target){ if(!target.storage.byuhuo) return 0.6; } }, intro:{ content:function(storage,player){ if(storage){ if(player.hasSkill('byuhuo2')){ return '不能成为其他角色卡牌的目标;在下一准备阶段,对所有其他角色造成两点火焰伤害'; } return '已发动'; } else{ return '未发动'; } } } }, byuhuo2:{ trigger:{player:'phaseBegin'}, forced:true, content:function(){ 'step 0' var targets=game.players.slice(0); targets.remove(player); targets.sort(lib.sort.seat); event.targets=targets; event.num=0; player.unmarkSkill('byuhuo'); 'step 1' if(num0; }, content:function(){ 'step 0' var nh=player.num('h'); if(nh){ player.draw(nh); } else{ event.finish(); } 'step 1' var hs=player.get('h'); if(hs.length>10&&hs.length>player.hp){ player.discard(hs.randomGets(hs.length-player.hp)); } }, ai:{ maixie:true, effect:{ target:function(card,player,target){ if(get.tag(card,'damage')){ if(player.hasSkill('jueqing')) return [1,-2]; if(!target.hasFriend()) return; var nh=target.num('h'); if(nh>5) return [1,-1]; if(nh<=1) return [1,-0.1]; if(nh==2){ if(target.hp>=2) return [1,0.1]; } else{ if(target.hp>=4) return [1,2]; if(target.hp==3) return [1,1.5]; if(target.hp==2) return [1,0.5]; } } } } } }, chuidiao:{ trigger:{player:'phaseEnd'}, forced:true, content:function(){ var num=Math.floor(Math.random()*3); if(num) player.draw(num); }, }, hhudun:{ trigger:{player:'phaseBegin'}, forced:true, filter:function(event,player){ return player.hujia<3; }, content:function(){ player.changeHujia(); player.update(); }, }, fenlie:{ audio:2, forced:true, trigger:{player:'gainAfter'}, filter:function(event,player){ if(event.parent.parent.name=='phaseDraw') return false; if(event.parent.name=='fenlie') return false; if(!event.cards) return false; return true; }, usable:2, content:function(){ var cards=[]; for(var i=0;i0; }, filter:function(event,player){ return game.hasPlayer(function(target){ return target!=player&&target.num('e'); }); }, content:function(){ var es=target.get('e'); if(es.length>1){ es=es.randomGets(Math.ceil(Math.random()*2)); } target.discard(es); }, ai:{ order:9.5, result:{ target:function(player,target){ var ne=target.num('e'); if(ne>1) return -1.5; return -1; } } } }, shixu:{ group:['shixu_begin','shixu_end','shixu_discard'], subSkill:{ begin:{ trigger:{global:'phaseUseBegin'}, forced:true, popup:false, silent:true, content:function(){ trigger.player.storage.shixu_begin=get.time(); } }, end:{ trigger:{global:'phaseUseEnd'}, forced:true, popup:false, silent:true, filter:function(event,player){ return typeof event.player.storage.shixu_begin=='number'; }, content:function(){ trigger.player.storage.shixu=get.time()-trigger.player.storage.shixu_begin; delete trigger.player.storage.shixu_begin; } }, discard:{ trigger:{global:'phaseEnd'}, forced:true, check:function(event,player){ return ai.get.attitude(player,event.player)<0; }, filter:function(event,player){ return typeof event.player.storage.shixu=='number'&& event.player.storage.shixu>3000&&event.player.num('he')>0&&event.player.isAlive(); }, content:function(){ player.line(trigger.player,'green'); trigger.player.chooseToDiscard('he',true,Math.floor(trigger.player.storage.shixu/3000)); delete trigger.player.storage.shixu; } } } }, jixuan:{ trigger:{player:'phaseAfter'}, forced:true, priority:-50, filter:function(event,player){ return event.parent.name!='jixuan'; }, content:function(){ player.draw(); player.phase(); }, ai:{ threaten:1.8 }, }, qianghua:{ trigger:{player:'useCardAfter'}, filter:function(event,player){ if(event.parent.name=='qianghua') return false; if(player.storage.qianghua>=1) return false; if(_status.currentPhase!=player) return false; if(event.parent.parent.name!='phaseUse') return false; if(!event.targets||!event.card) return false; var type=get.type(event.card); if(type!='basic'&&type!='trick') return false; var card=game.createCard(event.card.name,event.card.suit,event.card.number,event.card.nature); for(var i=0;i0&& event.targets.contains(player)==false&&event.targets.length==1; }, direct:true, content:function(){ "step 0" var effect=0; for(var i=0;i0||(event.source&&event.source.num('he')>0); }, content:function(){ 'step 0' var hs=player.get('he'); if(hs.length){ player.discard(hs.randomGet()) } 'step 1' if(trigger.source){ var hs=trigger.source.get('he'); if(hs.length){ trigger.source.discard(hs.randomGet()) } } } }, ronghuo:{ trigger:{player:'useCardToBefore'}, priority:7, filter:function(event,player){ if(event.card.name=='sha'&&!event.card.nature) return true; }, check:function(event,player){ var att=ai.get.attitude(player,event.target); if(event.target.hasSkillTag('nofire')){ return att>0; } return att<=0; }, forced:true, content:function(){ trigger.card.nature='fire'; player.addSkill('ronghuo2'); player.storage.ronghuo=trigger.card; } }, ronghuo2:{ trigger:{player:'useCardAfter'}, forced:true, popup:false, content:function(){ delete player.storage.ronghuo.nature; } }, fushi:{ enable:'phaseUse', filterTarget:function(card,player,target){ return target.hp1&&target.hp<=1){ att+=2; } return att; }; 'step 1' if(result.bool){ event.target=result.targets[0]; player.logSkill('jiaohui',event.target); if(event.target.hp=2||target.hp>=target.maxHp-1) return 'draw_card'; if(target.hp==2&&target.num('h')==0) return 'draw_card'; return 'recover_hp'; }); } else{ event.target.draw(); event.finish(); } } else{ event.finish(); } 'step 2' if(result.control=='draw_card'){ event.target.draw(2); } else{ event.target.recover(); } }, }, chenshui:{ trigger:{player:'phaseEnd'}, frequent:true, content:function(){ var list=['hsmengjing_feicuiyoulong','hsmengjing_huanxiaojiemei', 'hsmengjing_suxing','hsmengjing_mengye','hsmengjing_mengjing']; player.gain(game.createCard(list.randomGet())); player.$draw(); }, ai:{ threaten:2 } }, liehun:{ trigger:{player:'phaseEnd'}, forced:true, filter:function(event,player){ return player.num('h',{type:'basic'})0){ if(target==player){ num++; } if(target.hp==1){ num+=3; } else if(target.hp==2){ num+=1; } } return num; } "step 1" if(result.bool){ player.logSkill('lingzhou',result.targets); var target=result.targets[0]; if(target.hp=3&&target.num('h')0){ if(num>3){ num=3; } target.draw(num); } else if(num<0){ target.chooseToDiscard(-num,true); } }, ai:{ threaten:1.8, order:function(name,player){ var max=true,num=0; var players=game.filterPlayer(); for(var i=0;inum){ if(att>0){ max=true; } else if(att<0){ max=false; } } } if(max) return 10; return 0.5; }, result:{ target:function(player,target){ return player.num('h')-target.num('h'); } }, expose:0.2 } }, chongsheng:{ unique:true, enable:'chooseToUse', mark:true, init:function(player){ player.storage.chongsheng=2; player.syncStorage('chongsheng'); }, filter:function(event,player){ if(event.type!='dying') return false; if(player!=_status.dying) return false; if(player.storage.chongsheng<=0) return false; return true; }, content:function(){ 'step 0' player.hp=Math.min(player.storage.chongsheng,player.maxHp); player.discard(player.get('hej')); player.draw(player.storage.chongsheng); player.storage.chongsheng--; if(player.storage.chongsheng<=0){ player.unmarkSkill('chongsheng'); } 'step 1' if(player.isLinked()) player.link(); 'step 2' if(player.isTurnedOver()) player.turnOver(); player.syncStorage('chongsheng'); }, ai:{ skillTagFilter:function(player){ if(player.storage.chongsheng<=0) return false; if(player.hp>0) return false; }, save:true, result:{ player:10 }, threaten:function(player,target){ if(target.storage.chongsheng>0) return 0.6; } }, intro:{ content:'time' } }, guozai:{ enable:'phaseUse', usable:1, filter:function(event,player){ return player.num('h')<4; }, init:function(player){ player.storage.guozai2=0; }, content:function(){ var num=4-player.num('h'); player.draw(num); player.addSkill('guozai2'); player.storage.guozai2+=num; game.addVideo('storage',player,['guozai2',player.storage.guozai2]); }, ai:{ order:1, result:{ player:1 } } }, guozai2:{ mark:true, intro:{ content:'结束阶段需弃置&张牌' }, trigger:{player:'phaseUseEnd'}, forced:true, content:function(){ player.chooseToDiscard('he',true,player.storage.guozai2); player.storage.guozai2=0; player.removeSkill('guozai2'); } }, guozaix:{ enable:'phaseUse', usable:2, filter:function(event,player){ return player.num('h')<4; }, init:function(player){ player.storage.guozaix2=0; }, content:function(){ var num=4-player.num('h'); player.draw(num); player.addSkill('guozaix2'); player.storage.guozaix2+=num; game.addVideo('storage',player,['guozaix2',player.storage.guozaix2]); }, ai:{ order:1, result:{ player:1 } } }, guozaix2:{ mark:true, intro:{ content:'结束阶段需弃置&张牌' }, trigger:{player:'phaseUseEnd'}, forced:true, content:function(){ player.chooseToDiscard('he',true,player.storage.guozaix2); player.storage.guozaix2=0; player.removeSkill('guozaix2'); } }, hanshuang:{ trigger:{source:'damageEnd'}, forced:true, filter:function(event,player){ return event.card&&get.color(event.card)=='black'&& !event.player.isTurnedOver()&&event.player.isAlive(); }, content:function(){ trigger.player.turnOver(); player.loseHp(); }, ai:{ threaten:1.5, effect:{ player:function(card,player,target,current){ if(get.color(card)=='black'&&get.tag(card,'damage')){ return [1,0,1,-2]; } } } } }, bingshi:{ global:'bingshi2' }, bingshi2:{ trigger:{global:'dieAfter'}, forced:true, globalFixed:true, filter:function(event,player){ return event.player.hasSkill('bingshi')&&event.player.isDead(); }, content:function(){ trigger.player.line(player,'thunder'); player.damage('nosource','thunder').animate=false; player.$damage(trigger.player); if(lib.config.animation&&!lib.config.low_performance){ player.$thunder(); } if(!event.parent.parent.bingshi_logv){ event.parent.parent.bingshi_logv=true; game.logv(trigger.player,'bingshi',game.players.slice(0),event.parent.parent); } } }, huanwu:{ enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ return !target.storage.huanwu; }, content:function(){ target.gainMaxHp(); target.recover(); target.draw(2); target.storage.huanwu=true; target.mark('huanwu',{ name:'唤雾', content:'已发动' }); game.addVideo('mark',target,{ name:'唤雾', content:'已发动', id:'huanwu' }); }, ai:{ threaten:1.2, result:{ target:function(player,target){ return 1/target.hp; } }, order:10, expose:0.3 } }, fengnu:{ mod:{ cardUsable:function(card){ if(get.info(card)&&get.info(card).forceUsable) return; return Infinity; }, targetInRange:function(){ return true; } }, trigger:{player:'useCard'}, filter:function(event,player){ if(_status.currentPhase!=player) return false; return get.cardCount(event.card,player)>1; }, forced:true, usable:3, content:function(){ player.draw(); } }, shengdun:{ trigger:{player:'phaseBegin'}, forced:true, filter:function(event,player){ return !player.hujia; }, content:function(){ player.changeHujia(); player.update(); }, }, shengdun_old:{ trigger:{player:'phaseBegin'}, forced:true, silent:true, popup:false, priority:10, init2:function(player){ player.markSkill('shengdun'); }, content:function(){ if(player.storage.shengdun){ player.markSkill('shengdun'); } player.storage.shengdun=false; }, intro:{ content:'未发动' }, group:'shengdun2' }, shengdun_old2:{ trigger:{player:'damageBegin'}, forced:true, filter:function(event,player){ return event.num>0&&!player.storage.shengdun; }, content:function(){ trigger.num--; player.storage.shengdun=true; player.unmarkSkill('shengdun'); } }, jingmeng:{ trigger:{player:'useCard'}, frequent:true, filter:function(event,player){ return _status.currentPhase==player&&get.cardCount(true,player)==1; }, content:function(){ var type=get.type(trigger.card); var card=get.cardPile(function(card){ return get.type(card)==type; }); if(card){ player.gain(card,'gain2','log'); } }, ai:{ threaten:1.1 } }, kuixin:{ trigger:{player:'phaseEnd'}, direct:true, filter:function(event,player){ var nh=player.num('h'); var nm=1; return game.hasPlayer(function(current){ if(current!=player&&Math.abs(current.num('h')-nh)<=nm){ return true; } }); }, content:function(){ 'step 0' var nh=player.num('h'); var nm=1; var check=true; if(player.num('h','tao')){ check=false; } else if(player.num('h','shan')&&player.num('h','wuxie')){ check=false; } player.chooseTarget(get.prompt('kuixin'),function(card,player,target){ return target!=player&&Math.abs(target.num('h')-nh)<=nm; }).ai=function(target){ if(!check) return 0; if(ai.get.attitude(player,target)<0){ return target.num('h')-nh; } return 0; }; 'step 1' if(result.bool){ var target=result.targets[0]; player.logSkill('kuixin',result.targets); var cards0=target.get('h'); var cards1=player.get('h'); target.gain(cards1,player); player.gain(cards0,target); target.$give(cards0.length,player); player.$give(cards1.length,target); } }, ai:{ expose:0.2, threaten:1.5 } }, lianzhan:{ trigger:{player:'phaseUseEnd'}, frequent:true, filter:function(event,player){ return get.cardCount(true,player)>0; }, content:function(){ player.draw(get.cardCount(true,player)); }, ai:{ threaten:1.3 } }, bingshuang:{ trigger:{source:'damageEnd'}, filter:function(event,player){ return event.card&&get.type(event.card)=='trick'&& event.player.isAlive()&&!event.player.isTurnedOver(); }, check:function(event,player){ if(event.player.isTurnedOver()){ return ai.get.attitude(player,event.player)>0; } return ai.get.attitude(player,event.player)<=0; }, logTarget:'player', content:function(){ trigger.player.draw(2); trigger.player.turnOver(); } }, yanshu:{ trigger:{player:'discardAfter'}, frequent:true, usable:1, filter:function(event,player){ if(!event.cards) return false; for(var i=0;i0; }, content:function(){ trigger.player.recover(); player.addTempSkill('shengyan2','phaseAfter'); }, ai:{ expose:0.2 } }, shengyan2:{}, liechao:{ enable:'phaseUse', usable:1, filter:function(event,player){ return !player.isTurnedOver()&&player.num('h')<=player.hp; }, content:function(){ player.draw(4); player.turnOver(); player.skip('phaseDiscard'); }, ai:{ order:10, result:{ player:1 } } }, qingliu:{ trigger:{player:'damageBefore'}, filter:function(event){ return event.nature=='fire'; }, forced:true, content:function(){ trigger.untrigger(); trigger.finish(); }, ai:{ nofire:true, effect:{ target:function(card,player,target,current){ if(get.tag(card,'fireDamage')) return 0; } } } }, zhongjia:{ trigger:{player:'damageEnd'}, forced:true, filter:function(event){ return event.num>0; }, content:function(){ player.changeHujia(); }, ai:{ nohujia:true, skillTagFilter:function(player){ return player.hp>player.num('h'); }, threaten:function(player,target){ if(!target.hujia) return 0.8; }, effect:{ target:function(card,player){ if(get.tag(card,'damage')){ if(player.hasSkill('jueqing')) return [1,-1]; return 0.8; } } } } }, dunji:{ enable:'phaseUse', usable:1, filter:function(event,player){ return player.hujia?true:false; }, filterTarget:function(card,player,target){ return player!=target; }, selectTarget:function(){ return [1,_status.event.player.hujia]; }, content:function(){ if(target==targets[0]){ player.changeHujia(-player.hujia); } target.damage(); }, ai:{ order:9, result:{ target:function(player,target){ var eff=ai.get.damageEffect(target,player,target)+0.5; if(eff>0&&eff<=0.5) return 0; return eff; } } } }, fengxing:{ trigger:{player:'loseEnd'}, direct:true, filter:function(event,player){ return _status.currentPhase!=player&&!player.hasSkill('fengxing2')&&player.num('he')>0; }, content:function(){ 'step 0' player.addTempSkill('fengxing2','phaseAfter'); player.chooseToDiscard('he',get.prompt('fengxing')).set('ai',function(card){ return 7-ai.get.value(card); }).logSkill='fengxing'; 'step 1' if(result.bool){ player.draw(2); } }, ai:{ threaten:0.6 } }, fengxing2:{}, fengxian:{ enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ return target.num('h')>0; }, selectTarget:-1, content:function(){ target.chooseToDiscard(true); }, ai:{ order:8, result:{ target:function(player,target){ var nh=target.num('h'); switch(nh){ case 0:return 0; case 1:return -1.5; case 2:return -1.3; case 3:return -1; default:return -0.8; } } } } }, qiaodong:{ enable:['chooseToRespond'], filterCard:{type:'equip'}, filter:function(event,player){ return player.num('he',{type:'equip'})>0; }, viewAs:{name:'shan'}, position:'he', prompt:'将一张装备牌当闪使用或打出', check:function(){return 1}, ai:{ respondShan:true, skillTagFilter:function(player){ if(!player.num('he',{type:'equip'})) return false; } } }, hsmengjing_mengye:{ trigger:{player:'phaseEnd'}, forced:true, priority:-1, filter:function(event,player){ return player.num('he')>0; }, content:function(){ player.discard(player.get('he')); player.removeSkill('hsmengjing_mengye'); }, mark:'image', intro:{ content:'结束阶段,弃置所有牌' } }, zhanhou:{ enable:'phaseUse', filterCard:{subtype:'equip2'}, position:'he', filter:function(event,player){ return player.num('he',{subtype:'equip2'})>0; }, check:function(card){ return 7-ai.get.value(card); }, content:function(){ player.changeHujia(); }, ai:{ order:9.5, result:{ player:1 } }, // mod:{ // globalFrom:function(from,to,distance){ // return distance-from.hujia; // } // }, }, shijie:{ trigger:{player:'phaseEnd'}, direct:true, filter:function(event,player){ return game.hasPlayer(function(current){ return current!=player&¤t.num('h'); }); }, content:function(){ 'step 0' player.chooseTarget(get.prompt('shijie'),function(card,player,target){ return player!=target&&target.num('h')>0; }).ai=function(target){ return 11-ai.get.attitude(player,target); }; 'step 1' if(result.bool){ player.logSkill('shijie',result.targets); var target=result.targets[0]; var card=target.get('h').randomGet() player.gain(card,target); event.target=target; target.$giveAuto(card,player); event.target.draw(); } }, ai:{ expose:0.1 } }, shengguang:{ enable:'phaseUse', filterCard:{color:'red'}, filter:function(event,player){ return player.num('he',{color:'red'})>0; }, position:'he', usable:1, check:function(card){ return 9-ai.get.value(card) }, filterTarget:function(card,player,target){ if(player.storage.anying) return true; if(target.hp>=target.maxHp) return false; return true; }, content:function(){ if(player.storage.anying){ target.loseHp(); } else{ target.recover(); } }, ai:{ order:9, result:{ target:function(player,target){ if(player.storage.anying) return -1; if(target.hp==1) return 5; if(player==target&&player.num('h')>player.hp) return 5; return 2; } }, threaten:2, expose:0.2 } }, xinci:{ enable:'phaseUse', filterCard:{color:'black'}, filter:function(event,player){ return player.num('he',{color:'black'})>0; }, position:'he', usable:1, mark:true, intro:{ content:'已进入暗影形态' }, check:function(card){ return 9-ai.get.value(card) }, filterTarget:true, content:function(){ target.loseHp(); }, ai:{ order:9, result:{ target:-1 }, threaten:2, expose:0.2 } }, anying:{ unique:true, enable:'phaseUse', skillAnimation:'epic', animationColor:'thunder', filter:function(event,player){ return !player.storage.anying&&player.num('he',{color:'black'})>1; }, selectCard:2, filterCard:{color:'black'}, position:'he', check:function(card){ return 5-ai.get.value(card); }, content:function(){ player.storage.anying=true; player.awakenSkill('anying'); player.removeSkill('shengguang'); player.addSkill('xinci'); }, ai:{ order:1, result:{ player:1 } } }, bianxing:{ trigger:{global:'useCard'}, filter:function(event,player){ if(player.hasSkill('bianxing2')) return false; if(event.player==player) return false; if(_status.currentPhase!=event.player) return false; if(!event.targets) return false; if(event.targets.length!=1) return false; if(event.targets[0]==event.player) return false; var hs=player.get('h'); for(var i=0;i=0) return 0; if(card.name=='tao'||card.name=='caoyao'){ if(trigger.targets[0].hp==trigger.targets[0].maxHp) return 0; } if(eff>=0) return 0; return ai.get.effect(trigger.targets[0],card,trigger.player,player); }; 'step 1' if(result.bool){ var card=result.cards[0]; player.lose(result.cards); event.cards=result.cards; player.logSkill('bianxing',trigger.player); game.log(player,'将',trigger.card,'变为',result.cards); game.delay(0.5); trigger.untrigger(); trigger.card=card; trigger.cards=[card]; player.addTempSkill('bianxing2','phaseAfter'); } else{ event.finish(); } 'step 2' player.$throw(event.cards); game.delay(); 'step 3' // player.draw(); 'step 4' trigger.trigger('useCard'); }, ai:{ expose:0.2, threaten:1.8 } }, bingjia:{ enable:'phaseUse', filter:function(event,player){ return !player.hasSkill('bingjia2'); }, filterCard:true, check:function(card){ return 6-ai.get.value(card); }, discard:false, prepare:function(cards,player){ player.$give(1,player,false); }, content:function(){ player.storage.bingjia=cards[0]; player.addSkill('bingjia2'); game.addVideo('storage',player,['bingjia',get.cardInfo(cards[0]),'card']); }, ai:{ order:1, result:{ player:1 } } }, bingjia2:{ mark:true, trigger:{target:'useCardToBegin'}, forced:true, filter:function(event,player){ return event.player!=player&&get.suit(event.card)==get.suit(player.storage.bingjia); }, content:function(){ 'step 0' player.showCards([player.storage.bingjia],get.translation(player)+'发动了【冰甲】'); player.removeSkill('bingjia2'); game.addVideo('storage',player,['bingjia',null]); 'step 1' ui.discardPile.appendChild(player.storage.bingjia); delete player.storage.bingjia; player.changeHujia(); player.addTempSkill('bingjia3','phaseAfter'); }, intro:{ mark:function(dialog,content,player){ if(player==game.me||player.isUnderControl()){ dialog.add([player.storage.bingjia]); } else{ return '已发动冰甲'; } }, content:function(content,player){ if(player==game.me||player.isUnderControl()){ return get.translation(player.storage.bingjia); } return '已发动冰甲'; } } }, bingjia3:{ trigger:{player:'damageBefore'}, mark:true, forced:true, content:function(){ trigger.untrigger(); trigger.finish(); }, ai:{ nofire:true, nothunder:true, nodamage:true, effect:{ target:function(card,player,target,current){ if(get.tag(card,'damage')) return [0,0]; } }, }, intro:{ content:'防止所有伤害' } }, bianxing2:{}, zuzhou:{ trigger:{player:'phaseBegin'}, filter:function(event,player){ if(!player.num('h',{suit:'spade'})) return false; return !game.hasPlayer(function(current){ return current.hasJudge('shandian'); }); }, forced:true, check:function(){ return false; }, content:function(){ 'step 0' var card=get.cardPile('shandian',true); if(card){ player.addJudge(card); player.$draw(card); game.delay(); } else{ event.finish(); } 'step 1' game.delay(); }, ai:{ threaten:1.5 } }, mdzhoufu:{ enable:'phaseUse', filterCard:{color:'black'}, filter:function(event,player){ return player.num('h',{color:'black'})>0; }, filterTarget:function(card,player,target){ return player!=target&&!target.hasSkill('mdzhoufu2'); }, prepare:'throw', discard:false, content:function(){ target.$gain2(cards); target.storage.mdzhoufu2=cards[0]; target.addSkill('mdzhoufu2'); target.storage.mdzhoufu3=player; game.addVideo('storage',target,['mdzhoufu2',get.cardInfo(cards[0]),'card']); ui.special.appendChild(cards[0]); }, check:function(card){ if(get.suit(card)=='spade'&&card.number>=2&&card.number<=9){ return 6-ai.get.value(card); } return -1; }, ai:{ tag:{ rejudge:0.1, }, threaten:1.5, expose:0.1, order:10, result:{ target:-1 } } }, mdzhoufu2:{ trigger:{player:'judge'}, forced:true, priority:10, mark:'card', content:function(){ "step 0" ui.discardPile.appendChild(player.storage.mdzhoufu2); player.$throw(player.storage.mdzhoufu2); if(player.storage.mdzhoufu2.clone){ player.storage.mdzhoufu2.clone.classList.add('thrownhighlight'); game.addVideo('highlightnode',player,get.cardInfo(player.storage.mdzhoufu2)); } if(player.storage.mdzhoufu3.isAlive()){ // player.storage.mdzhoufu3.draw(); player.storage.mdzhoufu3.gain(player.judging[0]); player.storage.mdzhoufu3.$gain2(player.judging[0]); } else{ ui.discardPile.appendChild(player.judging[0]); game.delay(1.5); } player.removeSkill('mdzhoufu2'); "step 1" player.judging[0]=player.storage.mdzhoufu2; trigger.position.appendChild(player.storage.mdzhoufu2); // trigger.untrigger(); game.log(player,'的判定牌改为',player.storage.mdzhoufu2); delete player.storage.mdzhoufu2; delete player.storage.mdzhoufu3; }, intro:{ content:'card' }, }, zuzhou_old:{ trigger:{player:'damageEnd',source:'damageEnd'}, check:function(event,player){ var target=(player==event.player)?event.source:event.player; return ai.get.attitude(player,target)<0; }, filter:function(event,player){ var target=(player==event.player)?event.source:event.player; return target.isAlive(); }, prompt:function(event,player){ var target=(player==event.player)?event.source:event.player; return get.prompt('zuzhou',target); }, content:function(){ "step 0" event.target=(player==trigger.player)?trigger.source:trigger.player; event.target.judge(function(card){ return get.color(card)=='black'?-1:0; }); "step 1" if(result.color=='black'){ event.target.loseHp(); } }, ai:{ expose:0.1, threaten:1.3 } }, xianzhi:{ trigger:{global:'judgeBegin'}, frequent:true, filter:function(){ return ui.cardPile.childNodes.length>1; }, check:function(){ return false; }, content:function(){ 'step 0' var str=''; if(trigger.card) str=get.translation(trigger.card.viewAs||trigger.card.name); else if(trigger.skill) str=get.translation(trigger.skill); else str=get.translation(trigger.parent.name); var cards=[ui.cardPile.childNodes[0],ui.cardPile.childNodes[1]]; var att=ai.get.attitude(player,trigger.player); var delta=trigger.judge(ui.cardPile.childNodes[1])-trigger.judge(ui.cardPile.childNodes[0]); player.chooseControl('调换顺序','cancel2', ui.create.dialog('先知:'+get.translation(trigger.player)+'的'+str+'判定',cards,'hidden')).ai=function(){ if(att*delta>0) return '调换顺序'; else return 'cancel2'; }; 'step 1' if(result.control=='调换顺序'){ var card=ui.cardPile.firstChild; ui.cardPile.removeChild(card); ui.cardPile.insertBefore(card,ui.cardPile.firstChild.nextSibling); game.log(player,'调换了牌堆顶两张牌的顺序'); } }, ai:{ expose:0.1, tag:{ rejudge:0.5 } } }, jingxiang:{ trigger:{player:'chooseToRespondBegin'}, direct:true, usable:1, filter:function(event,player){ if(event.responded) return false; return game.hasPlayer(function(current){ return current!=player&¤t.num('h'); }); }, content:function(){ "step 0" player.chooseTarget(get.prompt('jingxiang'),function(card,player,target){ return target!=player&&target.num('h')>0; }).ai=function(target){ return 1-ai.get.attitude(player,target); }; "step 1" if(result.bool){ var target=result.targets[0]; player.logSkill('jingxiang',target); event.target=target; var cards=target.get('h'); player.chooseCardButton('选择'+get.translation(target)+'的一张卡手牌打出',cards).filterButton=function(button){ return trigger.filterCard(button.link); } } else{ event.finish(); } "step 2" if(result.bool){ game.log(player,'使用了',event.target,'的手牌'); event.target.$throw(result.links); event.target.lose(result.links); trigger.untrigger(); trigger.animate=false; trigger.responded=true; result.buttons[0].link.remove(); trigger.result={bool:true,card:result.buttons[0].link} } }, ai:{ effect:{ target:function(card){ if(get.tag(card,'respondShan')) return 0.4; if(get.tag(card,'respondSha')) return 0.4; } } }, }, wlianji:{ trigger:{player:'phaseEnd'}, frequent:true, filter:function(event,player){ return get.cardCount(true,player)>player.hp; }, content:function(){ player.draw(2); }, init:function(player){player.storage.jingce=true}, intro:{ content:function(storage,player){ if(_status.currentPhase==player) return '已使用'+get.cardCount(true,player)+'张牌'; } } }, mengun:{ trigger:{global:'useCardToBefore'}, priority:12, filter:function(event,player){ if(event.player==player) return false; if(_status.currentPhase!=event.player) return false; if(event.player.hasSkill('mengun2')) return false; if(get.itemtype(event.card)!='card') return false; if(!player.num('h',{suit:get.suit(event.card)})) return false; return get.type(event.card)=='basic'; }, direct:true, content:function(){ "step 0" var val=ai.get.value(trigger.card); var suit=get.suit(trigger.card); var eff=ai.get.effect(trigger.target,trigger.card,trigger.player,player); var next=player.chooseToDiscard('是否对'+get.translation(trigger.player)+'使用的'+get.translation(trigger.card)+'发动【闷棍】?',function(card){ return get.suit(card)==suit; }); next.logSkill=['mengun',trigger.player]; next.ai=function(card){ if(eff>=0) return 0; return Math.min(8,1+val)-ai.get.value(card); } "step 1" if(result.bool){ game.log(trigger.player,'收回了',trigger.cards); trigger.untrigger(); trigger.finish(); game.delay(); } else{ event.finish(); } "step 2" trigger.player.$gain2(trigger.cards); trigger.player.gain(trigger.cards); trigger.player.storage.mengun2=trigger.cards[0]; game.addVideo('storage',player,['mengun2',get.cardInfo(trigger.cards[0]),'card']); trigger.player.addTempSkill('mengun2','phaseEnd'); }, ai:{ expose:0.2 } }, mengun2:{ mark:'card', mod:{ cardEnabled:function(card,player){ if(card==player.storage.mengun2) return false; }, }, intro:{ content:'card', onunmark:function(storage,player){ delete player.storage.mengun2; } }, }, jianren:{ enable:'phaseUse', usable:1, filter:function(event,player){ return player.get('e','1')?true:false; }, filterCard:function(card,player){ return card==player.get('e','1'); }, position:'e', filterTarget:function(card,player,target){ return target!=player; }, selectCard:-1, selectTarget:-1, content:function(){ target.damage(); }, ai:{ order:9, result:{ target:function(player,target){ return ai.get.damageEffect(target,player,target); } } } }, jihuo:{ trigger:{player:'phaseAfter'}, filter:function(event,player){ return !player.storage.jihuo&&player.num('h')>0; }, direct:true, priority:-50, content:function(){ "step 0" var next=player.chooseToDiscard(get.prompt('jihuo')); next.ai=ai.get.unuseful2; next.logSkill='jihuo'; "step 1" if(result.bool){ player.storage.jihuo=true; } else{ event.finish(); } "step 2" player.phase(); "step 3" player.storage.jihuo=false; }, ai:{ threaten:1.2 } }, tzhenji:{ trigger:{player:'discardAfter'}, direct:true, filter:function(event,player){ if(player.hasSkill('tzhenji2')){ return false; } if(event.cards){ for(var i=0;i0; return ai.get.damageEffect(target,player,player,'thunder')-(bool?1:0); }; "step 1" if(result.bool){ game.delay(0.5); var target=result.targets[0]; player.logSkill('tzhenji',target,'thunder'); var cs=target.get('he'); if(cs.length){ target.discard(cs.randomGet()); } target.damage('thunder'); player.addTempSkill('tzhenji2','phaseAfter'); } }, ai:{ threaten:1.2, expose:0.3, effect:{ target:function(card,player,target){ if(get.tag(card,'loseCard')&&target.num('he')){ return 0.7; } } }, } }, tzhenji2:{}, tzhenji_old:{ trigger:{player:['useCard','respondEnd']}, filter:function(event){ return get.suit(event.card)=='spade'; }, direct:true, content:function(){ "step 0"; player.chooseTarget(get.prompt('tzhenji_old')).ai=function(target){ return ai.get.damageEffect(target,player,player,'thunder')-1; }; "step 1" if(result.bool){ player.logSkill('tzhenji',result.targets,'thunder'); event.target=result.targets[0]; event.target.judge(); } else{ event.finish(); } "step 2" if(result.color=='red'){ event.target.damage('fire'); } else{ event.target.damage('thunder'); var cs=event.target.get('he'); if(cs.length){ event.target.discard(cs.randomGet()); } cs=player.get('he'); if(cs.length){ player.discard(cs.randomGet()); } } }, ai:{ expose:0.2, threaten:1.2, effect_old:{ target:function(card,player,target){ if(get.tag(card,'respondShan')){ var hastarget=game.hasPlayer(function(current){ return ai.get.attitude(player,current)<0; }); var ns=target.num('h','shan'); var nh=target.num('h'); if(ns>1){ return [0,hastarget?1:0]; } if(ns&&nh>=2){ return [0,0]; } if(nh>3){ return [0,0]; } if(nh==0){ return 1.5; } return [1,0.05]; } } } } }, tuteng_s:{ trigger:{player:'phaseUseBegin'}, forced:true, filter:function(event,player){ var rand=['tuteng1','tuteng2','tuteng3','tuteng4']; for(var i=0;i1||rand2.length>=4)){ var dialog=ui.create.dialog(); for(var i=0;i=4){ dialog.add('替换一个已有图腾'); dialog.add([rand2x,'vcard']); player.chooseButton(dialog,2,true).filterButton=function(button){ if(ui.selected.buttons.length){ var current=ui.selected.buttons[0].name; if(rand.contains(current)){ return rand2.contains(button.name); } else{ return rand.contains(button.name); } } return true; }; } else{ player.chooseButton(dialog,true); } for(var i=0;i1){ rand.remove('tuteng1'); } player.addSkill(rand.randomGet()); } // if(rand2.length>=3){ // player.removeSkill(rand2.randomGet()); // } game.delay(); event.finish(); } } else{ event.finish(); } 'step 1' if(result.buttons.length==1){ player.addSkill(result.buttons[0].name); } else if(result.buttons.length==2){ var skill1=result.buttons[0].name; var skill2=result.buttons[1].name; if(player.hasSkill(skill1)){ player.removeSkill(skill1); player.addSkill(skill2); } else{ player.removeSkill(skill2); player.addSkill(skill1); } } }, ai:{ order:11, result:{ player:1 }, effect:function(card,player){ if(get.tag(card,'damage')){ if(player.hasSkill('jueqing')) return; return 1.2; } }, threaten:2 }, group:'tuteng_lose' }, zuling:{ skillAnimation:'epic', animationColor:'thunder', trigger:{player:'phaseBegin'}, forced:true, unique:true, filter:function(event,player){ if(!player.storage.tuteng_awake){ var rand=['tuteng1','tuteng2','tuteng3','tuteng4', 'tuteng5','tuteng6','tuteng7','tuteng8']; var num=0; for(var i=0;i=2){ return true; } } } return false; }, content:function(){ player.storage.tuteng_awake=true; player.loseMaxHp(); player.awakenSkill('zuling'); } }, tuteng_h:{ mod:{ maxHandcard:function(player,num){ return num-1; } } }, tuteng_lose:{ trigger:{player:'damageEnd'}, forced:true, popup:false, filter:function(event,player){ var tuteng=['tuteng1','tuteng2','tuteng3','tuteng4', 'tuteng5','tuteng6','tuteng7','tuteng8']; for(var i=0;i0; }, trigger:{source:'damageAfter'}, forced:true, content:function(){ player.draw(trigger.num); } }, tuteng3:{ mark:'image', nopop:true, intro:{ content:'你受到的伤害-1' }, trigger:{player:'damageBegin'}, forced:true, filter:function(event){ return event.num>0; }, content:function(){ trigger.num--; }, }, tuteng4:{ mark:'image', nopop:true, intro:{ content:'在你的回合内,你的锦囊牌造成的首次伤害+1' }, trigger:{source:'damageBegin'}, forced:true, usable:1, filter:function(event,player){ return _status.currentPhase==player&&event.card&&get.type(event.card)=='trick'&&event.notLink(); }, content:function(){ trigger.num++; } }, tuteng5:{ mark:'image', nopop:true, intro:{ content:'结束阶段,你摸一张牌' }, trigger:{player:'phaseEnd'}, forced:true, content:function(){ player.draw(); } }, tuteng6:{ mark:'image', nopop:true, intro:{ content:'在你的回合内,你的杀造成的首次伤害+1' }, trigger:{source:'damageBegin'}, forced:true, filter:function(event,player){ return _status.currentPhase==player&&event.card&&event.card.name=='sha'&&event.notLink(); }, usable:1, content:function(){ trigger.num++; } }, tuteng7:{ mark:'image', nopop:true, intro:{ content:'结束阶段,你令一名其他角色回复一点体力' }, trigger:{player:'phaseEnd'}, direct:true, filter:function(event,player){ return game.hasPlayer(function(current){ return current!=player&¤t.isDamaged(); }); }, content:function(){ 'step 0' player.chooseTarget('活力图腾:令一名其他角色回复一点体力',function(card,player,target){ return target!=player&&target.hp=player.hp) return -1; if(player.hp<=2){ if(player.hp==2&&nh==0) return 1; return -1; } return 1; } }, effect:{ target:function(card){ if(get.tag(card,'damage')||get.tag(card,'loseHp')){ return 1.5; } } }, threaten:1.2 } }, hongxi:{ trigger:{global:'dieAfter'}, filter:function(event,player){ return player.hp0; }, content:function(){ var cards=[]; var hs=target.get('h'); var es=target.get('e'); if(hs.length) cards.push(hs.randomGet()); if(es.length) cards.push(es.randomGet()); target.discard(cards); }, ai:{ order:8, useful:3, value:6, result:{ target:function(player,target){ var num=0; if(target.num('h')) num--; if(target.num('e')) num--; return num; }, }, } }, hsqingyu_zhanfang:{ type:'hsqingyu', fullimage:true, vanish:true, enable:true, derivation:'hs_aya', filterTarget:true, content:function(){ target.gainMaxHp(); target.draw(); }, ai:{ order:5, useful:3, value:4, result:{ target:function(player,target){ if(target.hp==target.maxHp){ if(target.maxHp<3) return 2; if(target.maxHp==3) return 1.5; return 1.2; } return 1; }, }, } }, hsqingyu_hufu:{ type:'hsqingyu', fullimage:true, vanish:true, enable:true, derivation:'hs_aya', filterTarget:true, content:function(){ target.changeHujia(); }, ai:{ order:5, useful:3, value:6, result:{ target:function(player,target){ return 2/Math.max(1,Math.sqrt(target.hp)); }, }, } }, hsqingyu_shandian:{ type:'hsqingyu', fullimage:true, vanish:true, enable:true, derivation:'hs_aya', filterTarget:true, content:function(){ target.damage('thunder'); }, ai:{ order:5, result:{ target:-1, }, useful:5, value:8, tag:{ damage:1, thunderDamage:1, natureDamage:1, } } }, hsqingyu_zhao:{ type:'equip', subtype:'equip1', distance:{attackFrom:-1}, fullimage:true, vanish:true, derivation:'hs_aya', onEquip:function(){ player.draw(); }, ai:{ order:9, useful:5, value:4 } }, hsdusu_xueji:{ type:'hsdusu', fullimage:true, vanish:true, enable:true, derivation:'hs_xialikeer', filterTarget:function(card,player,target){ return target.num('e')>0; }, content:function(){ target.discard(target.get('e').randomGets(2)); }, ai:{ order:5, result:{ target:function(player,target){ if(target.hasSkillTag('noe')) return 0; if(target.num('e')>1) return -1.5; return -1; }, }, value:5, } }, hsdusu_kuyecao:{ type:'hsdusu', fullimage:true, vanish:true, enable:true, derivation:'hs_xialikeer', filterTarget:function(card,player,target){ return !target.hasSkill('qianxing'); }, content:function(){ target.addTempSkill('qianxing',{player:'phaseBegin'}); }, ai:{ order:2, result:{ target:function(player,target){ if(player!=target&&get.distance(player,target,'absolute')<=1) return 0; var num=1; if(target==player){ num=1.5; } if(target.hp==1) return 2*num; if(target.hp==2&&target.num('h')<=2) return 1.2*num; return num; } }, value:5, } }, hsdusu_huangxuecao:{ type:'hsdusu', fullimage:true, vanish:true, enable:true, derivation:'hs_xialikeer', filterTarget:function(card,player,target){ return target==player; }, selectTarget:-1, modTarget:true, content:function(){ target.draw(2); }, ai:{ order:9, result:{ target:1, }, value:10, } }, hsdusu_huoyanhua:{ type:'hsdusu', fullimage:true, vanish:true, enable:true, derivation:'hs_xialikeer', range:{attack:1}, filterTarget:true, content:function(){ target.damage('fire'); }, ai:{ order:5, result:{ target:-1, }, useful:5, value:8, tag:{ damage:1, fireDamage:1, natureDamage:1, } } }, hsdusu_shinancao:{ type:'hsdusu', fullimage:true, vanish:true, enable:true, derivation:'hs_xialikeer', filterTarget:function(card,player,target){ return !target.hasSkill('hsdusu_shinancao'); }, content:function(){ target.addSkill('hsdusu_shinancao'); }, ai:{ order:7, result:{ target:function(player,target){ if(target.hp>1){ if(target.num('h')>2) return 1; return 0.5; } return 0.2; }, }, value:5, } }, hsbaowu_cangbaotu:{ type:'hsbaowu', fullimage:true, vanish:true, enable:true, derivation:'hs_yelise', filterTarget:function(card,player,target){ return target==player; }, selectTarget:-1, content:function(){ target.addSkill('hsbaowu_cangbaotu'); target.draw(); }, ai:{ order:10, result:{ player:10 }, useful:10, value:10, } }, hsbaowu_huangjinyuanhou:{ type:'hsbaowu', fullimage:true, vanish:true, enable:true, derivation:'hs_yelise', filterTarget:function(card,player,target){ return target==player; }, selectTarget:-1, content:function(){ player.recover(); var hs=target.get('h'); target.discard(hs); var cs=[]; for(var i=0;i1) return 1; if(player.hp==1) return 1; return 0; } }, useful:10, value:10, } }, hsshenqi_nengliangzhiguang:{ type:'hsshenqi', fullimage:true, vanish:true, enable:function(card,player){ return !player.isTurnedOver(); }, derivation:'hs_lafamu', filterTarget:true, content:function(){ target.gainMaxHp(); target.recover(); target.draw(4); }, contentAfter:function(){ if(!player.isTurnedOver()){ player.turnOver(); } }, ai:{ order:5, result:{ target:function(player,target){ if(target.hp<=1) return 2; if(target.num('h')0; }, selectTarget:-1, content:function(){ if(target.num('hej')) player.gainPlayerCard(target,'hej',true,Math.ceil(Math.random()*2)); }, contentAfter:function(){ if(!player.isTurnedOver()){ player.turnOver(); } }, ai:{ order:9.5, result:{ player:1 }, tag:{ multitarget:1, multineg:1, }, useful:5, value:10, } }, hsmengjing_feicuiyoulong:{ type:'hsmengjing', fullimage:true, vanish:true, enable:true, derivation:'hs_ysera', filterTarget:true, content:function(){ target.damage(); }, ai:{ order:5, result:{ target:-1 }, tag:{ damage:1 }, useful:5, value:10, } }, hsmengjing_suxing:{ type:'hsmengjing', fullimage:true, vanish:true, enable:true, derivation:'hs_ysera', filterTarget:function(card,player,target){ return player!=target; }, selectTarget:-1, content:function(){ target.loseHp(); var he=target.get('he'); if(he.length){ target.discard(he.randomGets(2)); } }, ai:{ result:{ target:-1, }, order:6, useful:5, value:10, } }, hsmengjing_mengye:{ type:'hsmengjing', fullimage:true, vanish:true, enable:true, derivation:'hs_ysera', filterTarget:true, content:function(){ target.draw(); target.addSkill('hsmengjing_mengye'); }, ai:{ order:1, useful:5, value:10, result:{ target:function(player,target){ if(target.hasSkill('hsmengjing_mengye')) return 0.5; return -target.num('he'); } } } }, hsmengjing_mengjing:{ type:'hsmengjing', fullimage:true, vanish:true, enable:true, derivation:'hs_ysera', filterTarget:function(card,player,target){ return !target.num('j','lebu')||target.num('e')>0; }, content:function(){ 'step 0' var es=target.get('e'); if(es.length){ target.gain(es,'gain2'); } 'step 1' if(!target.num('j','lebu')){ target.addJudge(game.createCard('lebu')); } }, ai:{ order:2, useful:5, value:10, result:{ target:function(player,target){ var num=target.hp-target.num('he')-2; if(num>-1) return -1; if(target.hp<3) num--; if(target.hp<2) num--; if(target.hp<1) num--; return num; } } } }, hsmengjing_huanxiaojiemei:{ type:'hsmengjing', fullimage:true, vanish:true, enable:true, derivation:'hs_ysera', filterTarget:function(card,player,target){ return target.hp