character.extra={ character:{ shen_guanyu:['male','shu',6,['wuhun','wushen']], shen_zhaoyun:['male','shu',2,['juejing','longhun']], shen_zhugeliang:['male','shu',3,['qixing','kuangfeng','dawu']], shen_lvmeng:['male','wu',3,['shelie','gongxin']], shen_zhouyu:['male','wu',4,['yeyan','qinyin']], shen_simayi:['male','wei',4,['renjie','sbaiyin','lianpo']], shen_caocao:['male','wei',3,['guixin','feiying']], shen_lvbu:['male','qun',5,['baonu','wuqian','shenfen']], }, skill:{ qinyin:{ audio:2, trigger:{player:'phaseDiscardEnd'}, direct:true, filter:function(event,player){ return event.cards&&event.cards.length>1 }, content:function(){ "step 0" if(typeof event.count!='number'){ // event.count=trigger.cards.length-1; event.count=1; } var recover=0,lose=0; for(var i=0;i0){ if(game.players[i].hp<2){ lose--; recover+=0.5; } lose--; recover++; } else if(ai.get.attitude(player,game.players[i])<0){ if(game.players[i].hp<2){ lose++; recover-=0.5; } lose++; recover--; } } else{ if(ai.get.attitude(player,game.players[i])>0){ lose--; } else if(ai.get.attitude(player,game.players[i])<0){ lose++; } } } } var prompt='是否发动【琴音】(剩余'+get.cnNumber(event.count)+'次)'; player.chooseControl('失去体力','回复体力','cancel', ui.create.dialog('是否发动【琴音】?','hidden')).ai=function(){ // console.log(lose,recover); if(lose>recover&&lose>0) return 0; if(lose0) return 1; return 2; } "step 1" if(result.bool==false||result.control=='cancel'){ event.finish(); } else{ player.logSkill('qinyin'); event.bool=(result.control=='回复体力'); event.num=0; event.players=game.players.slice(0); } "step 2" if(event.num1){ event.count--; event.goto(0); } }, ai:{ expose:0.1, threaten:2 } }, lianpo:{ audio:true, 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, audio:2, filter:function(event){ return event.num>0; }, init:function(player){ player.storage.baonu=2; game.addVideo('storage',player,['baonu',player.storage.baonu]); }, content:function(){ player.storage.baonu+=trigger.num; game.addVideo('storage',player,['baonu',player.storage.baonu]); }, intro:{ content:'mark' } }, shenfen:{ audio:2, enable:'phaseUse', filter:function(event,player){ return !player.storage.shenfen&&player.storage.baonu>=6; }, init:function(player){ player.storage.shenfen=false; }, skillAnimation:true, animationColor:'metal', 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:{ audio:2, 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:{ audio:true, 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; game.addVideo('storage',player,['renjie',player.storage.renjie]); }, content:function(){ player.storage.renjie+=trigger.num; game.addVideo('storage',player,['renjie',player.storage.renjie]); }, 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(get.type(card)=='basic'||get.type(card,'trick')=='trick') return; if(player.hp<=2) return; if(!player.skills.contains('jilue')||player.storage.renjie==0){ return [0,0,0,0]; } } } } }, renjie2:{ audio:true, trigger:{player:'phaseDiscardEnd'}, forced:true, filter:function(event){ return event.cards&&event.cards.length>0; }, content:function(){ player.storage.renjie+=trigger.cards.length; game.addVideo('storage',player,['renjie',player.storage.renjie]); } }, sbaiyin:{ skillAnimation:'epic', trigger:{player:'phaseBegin'}, forced:true, unique:true, audio: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:{ audio:true, 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[0]); 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,'highlight'); } else{ event.finish(); } "step 2" if(result.bool){ player.logSkill('jilue_guicai'); player.storage.renjie--; player.updateMarks(); if(trigger.player.judging[0].clone){ trigger.player.judging[0].clone.delete(); game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging[0].clone])); } ui.discardPile.appendChild(trigger.player.judging[0]); trigger.player.judging[0]=result.cards[0]; trigger.position.appendChild(result.cards[0]); game.log(trigger.player,'的判定牌改为',result.cards[0]); game.delay(2); } }, ai:{ tag:{ rejudge:1, } } }, jilue_fangzhu:{ audio:true, 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.updateMarks(); player.logSkill('jilue_fangzhu',result.targets); result.targets[0].draw(player.maxHp-player.hp); result.targets[0].turnOver(); } }, }, jilue_wansha:{ audio:true, enable:'phaseUse', usable:1, filter:function(event,player){ return player.storage.renjie>0; }, content:function(){ player.storage.renjie--; player.updateMarks(); player.addTempSkill('wansha','phaseAfter'); } }, jilue_zhiheng:{ audio:true, 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.updateMarks(); 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:{ audio:true, 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.updateMarks(); 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; } }, audio:2, 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:{ audio:3, trigger:{global:'dieAfter'}, forced:true, content:function(){ if(player.hp0){ 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:{ audio:2, 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" if(player==game.me){ game.addVideo('delay',null); } 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; game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'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); game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'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;i=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:{ audio:true, 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:{ audio:true, 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:{ audio:true, 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:{ audio:true, 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; } }, audio:true, trigger:{player:'phaseDrawBegin'}, priority:-5, filter:function(event,player){ return player.hp