import { lib, game, ui, get, ai, _status } from '../noname.js'; game.import('character', function () { return { name:'jiange', character:{ jg_pangtong:['male','shu',3,['qiwu','tianyu']], jg_huangyueying:['female','shu',3,['zhinang','jingmiao']], jg_zhugeliang:['male','shu',3,['biantian','bazhen']], jg_liubei:['male','shu',4,['jizhen','lingfeng']], jg_xiahouyuan:['male','wei',4,['xinshensu','juechen']], jg_caozhen:['male','wei',4,['chiying','jingfan']], jg_zhanghe:['male','wei',4,['huodi','jueji']], jg_simayi:['male','wei',5,['xuanlei','sfanshi','konghun']], }, skill:{ sfanshi:{ trigger:{player:'phaseEnd'}, forced:true, check:function(){ return false; }, content:function(){ player.loseHp(); } }, konghun:{ trigger:{player:'phaseUseBegin'}, direct:true, filter:function(event,player){ if(game.players.length>=6){ return player.hp<=2; } return player.hp<=1; }, content:function(){ "step 0" player.chooseTarget(get.prompt('konghun'),function(card,player,target){ return player!=target; },[1,Math.min(4,Math.floor((game.players.length-1)/2))]).ai=function(target){ return get.damageEffect(target,player,player,'thunder')+1; } "step 1" if(result.bool){ event.targets=result.targets.slice(0); player.logSkill('konghun',event.targets,'thunder'); event.targets.sort(lib.sort.seat); event.num=0; } else{ event.finish(); } "step 2" if(event.num0&&event.player!=player&&event.player.hp1||event.targets[0]!=player); }, silent:true, content:function(){ player.addTempSkill('huodi3'); } }, huodi3:{}, jingfan:{ trigger:{player:'phaseUseEnd'}, unique:true, direct:true, content:function(){ "step 0" var num=player.countUsed()-player.countCards('h'); event.num=num; if(num>0){ player.draw(num); } "step 1" if(event.num>0){ player.chooseTarget('选择至多'+get.cnNumber(event.num)+'名角色令其进攻距离+1',[1,event.num],function(card,player,target){ return player!=target; }).ai=function(target){ return get.attitude(player,target); } } else{ event.finish(); } "step 2" if(result.bool&&result.targets){ player.logSkill('jingfan',result.targets); for(var i=0;i0; }, filter:function(event,player){ if(event.num<=1) return false; return true; }, content:function(){ trigger.num=1; if(trigger.source){ trigger.source.addTempSkill('chiying2','damageAfter'); } } }, chiying2:{ trigger:{source:'damageEnd'}, forced:true, popup:false, content:function(){ player.draw(); } }, juechen:{ trigger:{player:'useCard'}, filter:function(event,player){ return event.card.name=='sha'; }, direct:true, content:function(){ "step 0" player.chooseTarget(get.prompt('juechen'),function(card,player,target){ return player!=target&&!trigger.targets.includes(target)&&target.countCards('he')>0; }).set('autodelay',true).ai=function(target){ return -get.attitude(player,target); } "step 1" if(result.bool){ player.logSkill('juechen',result.targets); player.discardPlayerCard(true,result.targets[0],'he'); } } }, lingfeng:{ trigger:{player:'phaseDrawBefore'}, check:function(event,player){ for(var i=0;i0; }).ai=function(target){ return -get.attitude(player,target); } } "step 2" if(result.bool&&result.targets&&result.targets.length){ player.discardPlayerCard(result.targets[0],'he',true); } "step 3" player.gain(event.cards); player.$draw(event.cards); game.delay(); }, ai:{ threaten:1.1 } }, biantian4:{ trigger:{player:'dieBegin'}, forced:true, popup:false, content:function(){ for(var i=0;i0; }, content:function(){ "step 0" player.choosePlayerCard(trigger.player,get.prompt('jingmiao',trigger.player),'he'); "step 1" if(result.bool){ player.logSkill('jingmiao',trigger.player); trigger.player.discard(result.links); } }, ai:{ expose:0.2 } }, zhinang:{ trigger:{player:'phaseBegin'}, frequent:true, content:function(){ "step 0" event.cards=get.cards(3); event.cards2=[]; for(var i=0;iplayer.hp){ if(target==player) return Math.max(1,att-2); } if(target==player) return att+5; return att; } } "step 2" if(result&&result.targets&&result.targets.length){ event.target=result.targets[0]; } if(event.cards2.length){ event.target.gain(event.cards2,'gain2'); } }, ai:{ threaten:1.3 } }, tianyu:{ trigger:{player:'phaseEnd'}, direct:true, filter:function(event,player){ for(var i=0;i