character.extra={ character:{ shen_guanyu:['male','shu',6,['wuhun','wushen'],['fullskin']], shen_zhaoyun:['male','shu',2,['juejing','longhun'],['fullskin'],['fullskin']], shen_zhugeliang:['male','shu',3,['qixing','kuangfeng','dawu'],['fullskin']], shen_lvmeng:['male','wu',3,['shelie','gongxin'],['fullskin']], shen_zhouyu:['male','wu',4,['yeyan','qinyin'],['fullskin']], shen_simayi:['male','wei',4,['renjie','sbaiyin','lianpo'],['fullskin']], shen_caocao:['male','wei',3,['guixin','feiying'],['fullskin']], shen_lvbu:['male','qun',5,['baonu','wuqian','shenfen'],['fullskin']], }, skill:{ lianpo:{ trigger:{source:'dieAfter'}, forced:true, filter:function(event,player){ return !player.skills.contains('lianpo2'); }, content:function(){ player.addSkill('lianpo2'); } }, lianpo2:{ trigger:{global:'phaseAfter'}, forced:true, content:function(){ player.removeSkill('lianpo2'); player.phase(); } }, baonu:{ trigger:{source:'damageEnd',player:'damageEnd'}, forced:true, mark:true, filter:function(event){ return event.num>0; }, init:function(player){ player.storage.baonu=2; }, content:function(){ player.storage.baonu+=trigger.num; }, intro:{ content:'mark' } }, shenfen:{ enable:'phaseUse', filter:function(event,player){ return !player.storage.shenfen&&player.storage.baonu>=6; }, init:function(player){ player.storage.shenfen=false; }, mark:true, content:function(){ "step 0" player.unmark('shenfen'); player.storage.shenfen=true; player.storage.baonu-=6; event.targets=game.players.slice(0); event.targets.remove(player); event.targets.sort(lib.sort.seat); event.targets2=event.targets.slice(0); player.turnOver(); "step 1" if(event.targets.length){ event.targets.shift().damage(); event.redo(); } "step 2" if(event.targets2.length){ var cur=event.targets2.shift(); if(cur&&cur.num('he')){ cur.chooseToDiscard('he',true,4); } event.redo(); } }, intro:{ content:'limited' }, ai:{ order:10, result:{ player:function(player){ var num=0; for(var i=0;i0?1:-1; } } return num; } } } }, wuqian:{ enable:'phaseUse', filter:function(event,player){ return player.storage.baonu>=2&&!player.skills.contains('wushuang'); }, content:function(){ player.storage.baonu-=2; player.addTempSkill('wushuang','phaseAfter'); }, ai:{ order:5, result:{ player:function(player){ if(!player.storage.shenfen) return 0; var cards=player.get('h','sha'); if(cards.length){ for(var i=0;i0&& game.players[i].num('h','shan')){ return 1; } } } return 0; } } } }, renjie:{ trigger:{player:'damageEnd'}, forced:true, unique:true, group:'renjie2', mark:true, filter:function(event){ return event.num>0; }, init:function(player){ player.storage.renjie=0; }, content:function(){ player.storage.renjie+=trigger.num; }, intro:{ content:'mark' }, ai:{ maixie:true, effect:{ target:function(card,player,target){ if(player.skills.contains('jueqing')) return [1,-2]; if(get.tag(card,'damage')){ if(target.hp==target.maxHp){ if(!target.skills.contains('jilue')){ return [0,1]; } return [0.7,1]; } return 0.7; } }, player:function(card,player){ if(_status.currentPhase!=player) return; if(card.name=='wuzhong'||card.name=='yiyi'|| card.name=='yuanjiao'||card.name=='shunshou') return; if(player.hp<=2) return; if(!player.skills.contains('jilue')||player.storage.renjie==0){ return [0,0,0,0]; } } } } }, renjie2:{ trigger:{player:'phaseDiscardEnd'}, forced:true, filter:function(event){ return event.cards&&event.cards.length>0; }, content:function(){ player.storage.renjie+=trigger.cards.length; } }, sbaiyin:{ trigger:{player:'phaseBegin'}, forced:true, unique:true, filter:function(event,player){ return player.storage.renjie>=4; }, content:function(){ player.loseMaxHp(); player.addSkill('jilue'); player.removeSkill('sbaiyin'); } }, jilue:{ unique:true, group:['jilue_guicai','jilue_fangzhu','jilue_wansha','jilue_zhiheng','jilue_jizhi'] }, jilue_guicai:{ trigger:{global:'judge'}, direct:true, filter:function(event,player){ return player.num('h')>0&&player.storage.renjie>0; }, content:function(){ "step 0" player.chooseCard('是否弃置一枚“忍”,并发动【鬼才】?').ai=function(card){ var trigger=_status.event.parent._trigger; var player=_status.event.player; var result=trigger.judge(card)-trigger.judge(trigger.player.judging); var attitude=ai.get.attitude(player,trigger.player); if(attitude==0||result==0) return 0; if(attitude>0){ return result-ai.get.value(card)/2; } else{ return -result-ai.get.value(card)/2; } }; "step 1" if(result.bool){ player.respond(result.cards); } else{ event.finish(); } "step 2" if(result.bool){ player.logSkill('jilue_guicai'); player.storage.renjie--; if(trigger.player.judging.clone) trigger.player.judging.clone.delete(); ui.discardPile.appendChild(trigger.player.judging); trigger.player.judging=result.cards[0]; trigger.position.appendChild(result.cards[0]); game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(result.cards[0])); game.delay(2); } }, ai:{ tag:{ rejudge:1, } } }, jilue_fangzhu:{ trigger:{player:'damageEnd'}, direct:true, priority:-1, filter:function(event,player){ return player.storage.renjie>0; }, content:function(){ "step 0" player.chooseTarget('是否弃置一枚“忍”,并发动【放逐】?',function(card,player,target){ return player!=target }).ai=function(target){ if(target.isTurnedOver()){ return ai.get.attitude(player,target)-1; } else{ if(player.maxHp-player.hp==1){ return -ai.get.attitude(player,target)-1; } } return 0; } "step 1" if(result.bool){ player.storage.renjie--; player.logSkill('jilue_fangzhu',result.targets); result.targets[0].draw(player.maxHp-player.hp); result.targets[0].turnOver(); } }, }, jilue_wansha:{ enable:'phaseUse', usable:1, filter:function(event,player){ return player.storage.renjie>0; }, content:function(){ player.storage.renjie--; player.addTempSkill('wansha','phaseAfter'); } }, jilue_zhiheng:{ enable:'phaseUse', usable:1, filter:function(event,player){ return player.storage.renjie>0; }, position:'he', filterCard:true, selectCard:[1,Infinity], prompt:'弃置一枚“忍”,然后弃置任意张牌并摸等量的牌', check:function(card){return 6-ai.get.value(card)}, content:function(){ player.storage.renjie--; player.draw(cards.length); }, ai:{ order:1, result:{ player:function(player){ var num=0; var cards=player.get('he'); for(var i=0;i2) return 1; if(cards.length==2&&player.storage.jilue>1); return 0; } }, threaten:1.5 }, }, jilue_jizhi:{ trigger:{player:'useCard'}, filter:function(event,player){ return (get.type(event.card)=='trick'&&event.cards[0]&&event.cards[0]==event.card)&&player.storage.renjie>0; }, content:function(){ player.storage.renjie--; player.draw(); }, ai:{ threaten:1.4 } }, wushen:{ mod:{ cardEnabled:function(card,player){ if(card.name!='sha'&&get.suit(card)=='heart') return false; }, cardUsable:function(card,player){ if(card.name!='sha'&&get.suit(card)=='heart') return false; }, cardRespondable:function(card,player){ if(card.name!='sha'&&get.suit(card)=='heart') return false; }, cardSavable:function(card,player){ if(card.name!='sha'&&get.suit(card)=='heart') return false; }, targetInRange:function(card){ if(get.suit(card)=='heart'||_status.event.skill=='wushen') return true; } }, enable:['chooseToUse','chooseToRespond'], filterCard:{suit:'heart'}, viewAs:{name:'sha'}, check:function(){return 1}, ai:{ effect:{ target:function(card,player,target,current){ if(get.tag(card,'respondSha')&¤t<0) return 0.6 } }, respondSha:true, order:4, useful:-1, value:-1 } }, wuhun:{ trigger:{player:'dieBegin'}, forced:true, popup:false, filter:function(event){ return event.source!=undefined; }, content:function(){ trigger.source.addSkill('wuhun2'); }, ai:{ threaten:function(player,target){ if(target.hp==1) return 0.5; }, effect:{ target:function(card,player,target,current){ if(target.hp<=1&&get.tag(card,'damage')){ if(player.skills.contains('jueqing')) return [1,-5]; var hasfriend=false; for(var i=0;i=0){ hasfriend=true;break; } } if(!hasfriend) return; if(player.hp>2&&ai.get.attitude(player,target)<=0) return [0,2]; return [1,0,0,-player.hp]; } } } } }, wuhun2:{ trigger:{global:'dieAfter'}, forced:true, content:function(){ player.loseHp(player.hp); player.removeSkill('wuhun2'); } }, guixin:{ trigger:{player:'damageEnd'}, check:function(event,player){ if(player.isTurnedOver()) return true; var num=0; for(var i=0;i0){ num++; } if(num>=2) return true; } return false; }, content:function(){ "step 0" var targets=game.players.slice(0); targets.remove(player); targets.sort(lib.sort.seat); event.targets=targets; event.num=0; "step 1" if(num0){ num++; } if(num>2) return [0,1]; if(num==2) return [0.5,1]; } } } } } }, qixing:{ unique:true, trigger:{global:'gameDrawAfter',player:'phaseBegin'}, forced:true, check:function(event,player){ return player.hp<=1; }, filter:function(event,player){ return !player.storage.qixing; }, content:function(){ "step 0" player.gain(get.cards(7))._triggered=null; "step 1" player.chooseCard('选择七张牌作为星',7,true).ai=function(card){ return ai.get.value(card); }; "step 2" player.lose(result.cards,ui.special)._triggered=null; player.storage.qixing=result.cards; }, mark:true, intro:{ mark:function(dialog,content,player){ if(content&&content.length){ if(player==game.me||player.isUnderControl()){ dialog.add(content); } else{ return '共有'+get.cnNumber(content.length)+'张星'; } } }, content:function(content,player){ if(content&&content.length){ if(player==game.me||player.isUnderControl()){ return get.translation(content); } return '共有'+get.cnNumber(content.length)+'张星'; } } }, group:['qixing2'], }, qixing2:{ trigger:{player:'phaseDrawAfter'}, direct:true, filter:function(event,player){ return player.storage.qixing&&player.storage.qixing.length; }, content:function(){ "step 0" player.chooseCard('选择任意张手牌与星交换',[1,player.num('h')]).ai=function(card){ return 1; }; "step 1" if(result.bool){ player.logSkill('qixing'); player.lose(result.cards,ui.special)._triggered=null; player.storage.qixing=player.storage.qixing.concat(result.cards); event.num=result.cards.length; } else{ event.finish(); } "step 2" player.chooseCardButton(player.storage.qixing,'选择'+event.num+'张牌作为手牌',event.num,true).ai=function(button){ if(player.skipList.contains('phaseUse')){ return -ai.get.value(button.link); } return ai.get.value(button.link); } if(player==game.me&&_status.auto){ game.delay(0.5); } "step 3" player.gain(result.links)._triggered=null; for(var i=0;i=4){ if(target.hp==1&&target.maxHp>2) return att; if(target.hp==2&&target.maxHp>3&&target.num('he')==0) return att*0.7; return 0; } return -1; } "step 1" if(result.bool){ var length=result.targets.length; for(var i=0;i1 }, }, longhun:{ group:['longhun1','longhun2','longhun3','longhun4'], ai:{ skillTagFilter:function(player,tag){ switch(tag){ case 'respondSha':{ if(player.num('he',{suit:'diamond'})=1) return [0,0]; var hasfriend=false; for(var i=0;i=0){ hasfriend=true;break; } } if(!hasfriend) return; if((get.tag(card,'damage')==1||get.tag(card,'loseHp'))&&target.hp>1) return [0,1]; } }, threaten:function(player,target){ if(target.hp==1) return 2; return 0.5; }, } }, longhun1:{ enable:['chooseToUse','chooseToRespond'], prompt:'将一张红桃牌当桃使用', position:'he', check:function(card,event){ if(_status.event.player.hp>1) return 0; return 10-ai.get.value(card); }, selectCard:function(){ return Math.max(1,_status.event.player.hp); }, viewAs:{name:'tao'}, filterCard:function(card){ return get.suit(card)=='heart'; } }, longhun2:{ enable:['chooseToUse','chooseToRespond'], prompt:'将一张方片牌当火杀使用或打出', position:'he', check:function(card,event){ if(_status.event.player.hp>1) return 0; return 10-ai.get.value(card); }, selectCard:function(){ return Math.max(1,_status.event.player.hp); }, viewAs:{name:'sha',nature:'fire'}, filterCard:function(card){ return get.suit(card)=='diamond'; } }, longhun3:{ enable:['chooseToUse','chooseToRespond'], prompt:'将一张黑桃牌当无懈可击使用', position:'he', check:function(card,event){ if(_status.event.player.hp>1) return 0; return 7-ai.get.value(card); }, selectCard:function(){ return Math.max(1,_status.event.player.hp); }, viewAs:{name:'wuxie'}, viewAsFilter:function(player){ return player.num('he',{suit:'spade'})>=player.hp; }, filterCard:function(card){ return get.suit(card)=='spade'; } }, longhun4:{ enable:['chooseToUse','chooseToRespond'], prompt:'将一张梅花牌当闪打出', position:'he', check:function(card,event){ if(_status.event.player.hp>1) return 0; return 10-ai.get.value(card); }, selectCard:function(){ return Math.max(1,_status.event.player.hp); }, viewAs:{name:'shan'}, filterCard:function(card){ return get.suit(card)=='club'; } }, juejing:{ mod:{ maxHandcard:function(player,num){ return 2+num; } }, trigger:{player:'phaseDrawBegin'}, priority:-5, filter:function(event,player){ return player.hp