'use strict'; game.import('mode',function(lib,game,ui,get,ai,_status){ return { name:'boss', start:function(){ "step 0" var playback=localStorage.getItem(lib.configprefix+'playback'); if(playback){ ui.create.me(); ui.arena.style.display='none'; ui.system.style.display='none'; _status.playback=playback; localStorage.removeItem(lib.configprefix+'playback'); var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); store.get(parseInt(playback)).onsuccess=function(e){ if(e.target.result){ game.playVideoContent(e.target.result.video); } else{ alert('播放失败:找不到录像'); game.reload(); } } event.finish(); return; } for(var i in lib.characterPack.mode_boss){ lib.character[i]=lib.characterPack.mode_boss[i]; if(!lib.character[i][4]){ lib.character[i][4]=[]; } } // for(var i in lib.cardPack.mode_boss){ // lib.card[i]=lib.cardPack.mode_boss[i]; // } for(var i in lib.skill){ if(lib.skill[i].changeSeat){ lib.skill[i]={}; if(lib.translate[i+'_info']){ lib.translate[i+'_info']='此模式下不可用'; } } } lib.translate.restart='返回'; lib.init.css(lib.assetURL+'layout/mode','boss'); game.delay(0.1); "step 1" var bosslist=ui.create.div('#bosslist.hidden'); event.bosslist=bosslist; lib.setScroll(bosslist); // bosslist.ontouchmove = ui.click.touchScroll; // bosslist.style.WebkitOverflowScrolling='touch'; if(!lib.config.touchscreen&&lib.config.mousewheel){ bosslist._scrollspeed=30; bosslist._scrollnum=10; bosslist.onmousewheel=ui.click.mousewheel; } // var bosslistlinks={}; // var toggleBoss=function(bool){ // game.saveConfig(this._link.config._name,bool,true); // var node=bosslistlinks[this._link.config._name]; // if(bool){ // node.style.display=''; // } // else{ // node.style.display='none'; // } // }; var onpause=function(){ ui.window.classList.add('bosspaused'); } var onresume=function(){ ui.window.classList.remove('bosspaused'); } game.onpause=onpause; game.onpause2=onpause; game.onresume=onresume; game.onresume2=onresume; ui.create.div(bosslist); event.current=null; var list=[]; for(var i in lib.character){ var info=lib.character[i]; if(info[4].contains('boss')){ // var cfg=i+'_bossconfig'; // if(get.config(cfg)==undefined){ // game.saveConfig(cfg,true,true); // } // lib.translate[cfg+'_config']=lib.translate[i]; // lib.mode.boss.config[cfg]={ // name:get.translation(i), // onclick:toggleBoss, // init:true, // } var player=ui.create.player(bosslist).init(i); if(lib.characterPack.mode_boss[i]&&get.config(i+'_boss_config')==false){ player.style.display='none'; } if(player.hp==0){ player.node.hp.style.display='none'; } list.push(player); player.node.hp.classList.add('text'); player.node.hp.dataset.condition=''; player.node.hp.innerHTML=info[2]; if(info[2]==Infinity){ player.node.hp.innerHTML='∞'; } player.setIdentity(player.name); player.node.identity.dataset.color=info[5]; // bosslistlinks[cfg]=player; player.classList.add('bossplayer'); if(lib.storage.current==i){ event.current=player; player.classList.add('highlight'); if(!lib.config.continue_name_boss&&lib.boss[i]&&lib.boss[i].control){ _status.bosschoice=lib.boss[i].control(); _status.bosschoice.name=i; _status.bosschoice.link=lib.boss[i].controlid||i; } } // if(!get.config(cfg)){ // player.style.display='none'; // } } } if(!list.length){ alert('没有可挑战的BOSS'); event.finish(); lib.init.onfree(); _status.over=true; return; } if(!event.current){ event.current=bosslist.childNodes[1]; event.current.classList.add('highlight'); } ui.create.div(bosslist); ui.create.cardsAsync(); game.finishCards(); game.addGlobalSkill('autoswap'); ui.arena.setNumber(8); ui.control.style.transitionProperty='opacity'; ui.control.classList.add('bosslist'); setTimeout(function(){ ui.control.style.transitionProperty=''; },1000); ui.window.appendChild(bosslist); setTimeout(function(){ if(event.current){ var left=event.current.offsetLeft-(ui.window.offsetWidth-180)/2; if(bosslist.scrollLeft0){ td.innerHTML='剩余'+(game.bossinfo.chongzheng-game.dead[i].storage.boss_chongzheng)+'回合'; } else{ td.innerHTML='无法重整' } } if(!added){ uiintro.add('
(无重整角色)
'); uiintro.add(ui.create.div('.placeholder.slim')) } else{ uiintro.add(table); } return uiintro; },180); } ui.single_swap=ui.create.system('换人',function(){ var players=get.players(game.me); players.remove(game.boss); if(players.length>1){ if(ui.auto.classList.contains('hidden')){ game.me.popup('请稍后换人'); return; } if(_status.event.isMine()){ ui.click.auto(); setTimeout(function(){ ui.click.auto(); },500); } game.modeSwapPlayer(players[1]); } },true); if(get.config('single_control')||game.me==game.boss){ ui.single_swap.style.display='none'; } ui.arena.appendChild(boss); if(boss.bossinginfo){ var rect=boss.getBoundingClientRect(); boss.style.transform='translate('+(boss.bossinginfo[0]-rect.left-rect.width/2)+'px,'+(boss.bossinginfo[1]-rect.top-rect.height/2)+'px) scale(1.1)'; ui.refresh(boss); boss.style.transition=''; boss.style.transform=''; delete boss.bossinginfo; setTimeout(function(){ boss.node.equips.style.opacity=''; },500); } event.bosslist.delete(); game.arrangePlayers(); for(var i=0;i0&&game.bossinfo.chongzheng){ if(player.hp0?player.node.handcards1:player.node.handcards2; card.fix(); card.animate('start'); position.insertBefore(card,position.firstChild); } player.update(); if(player.storage.boss_chongzheng>=game.bossinfo.chongzheng){ player.revive(player.hp); } } if(game.bossinfo.loopType==2){ game.boss.chongzheng=true; } } else{ if(player.identity=='zhu'&&game.boss!=player){ player=game.boss; } player.phase(); } "step 1" if(game.bossinfo.loopType==2){ _status.roundStart=true; if(event.player==game.boss){ if(!_status.last||_status.last.nextSeat==game.boss){ event.player=game.boss.nextSeat; } else{ event.player=_status.last.nextSeat; } } else{ _status.last=player; event.player=game.boss; if(player.nextSeat==game.boss){ delete _status.roundStart; } } } else{ event.player=event.player.nextSeat; } event.goto(0); }); }, onSwapControl:function(){ if(game.me==game.boss) return; game.addVideo('onSwapControl'); var name=game.me.name; if(ui.fakeme&&ui.fakeme.current!=name){ ui.fakeme.current=name; if(ui.versushighlight&&ui.versushighlight!=game.me){ ui.versushighlight.classList.remove('current_action'); } ui.versushighlight=game.me; game.me.classList.add('current_action'); // game.me.line(ui.fakeme,{opacity:0.5,dashed:true}); ui.fakeme.style.backgroundImage=game.me.node.avatar.style.backgroundImage; // ui.fakeme.style.backgroundSize='cover'; } ui.updatehl(); }, modeSwapPlayer:function(player){ var bool=(game.me==game.boss||player==game.boss); game.swapControl(player); game.onSwapControl(); if(!bool) return; if(game.me==game.boss){ game.singleHandcard=false; ui.arena.classList.remove('single-handcard'); ui.window.classList.remove('single-handcard'); ui.fakeme.style.display='none'; game.me.dataset.position=0; game.me.nextSeat.dataset.position=2; game.me.nextSeat.nextSeat.dataset.position=4; game.me.nextSeat.nextSeat.nextSeat.dataset.position=6; } else{ game.singleHandcard=true; ui.arena.classList.add('single-handcard'); ui.window.classList.add('single-handcard'); ui.fakeme.style.display=''; game.boss.dataset.position=7; game.boss.nextSeat.dataset.position=1; game.boss.nextSeat.nextSeat.dataset.position=2; game.boss.nextSeat.nextSeat.nextSeat.dataset.position=3; if(game.me&&game.me.node.handcards2.childNodes.length){ while(game.me.node.handcards2.childNodes.length){ game.me.node.handcards1.appendChild(game.me.node.handcards2.firstChild); } } } }, chooseCharacter:function(func){ var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.customreplacetarget=func; next.ai=function(player,list){ if(get.config('double_character')){ player.init(list[0],list[1]); } else{ player.init(list[0]); } } next.setContent(function(){ "step 0" var i; var list=[]; event.list=list; for(i in lib.character){ if(lib.character[i][4].contains('minskin')) continue; if(lib.character[i][4].contains('boss')) continue; if(lib.character[i][4].contains('hiddenboss')) continue; if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue; if(lib.config.forbidboss.contains(i)) continue; if(lib.filter.characterDisabled(i)) continue; list.push(i); } list.randomSort(); var dialog=ui.create.dialog('选择参战角色','hidden'); dialog.classList.add('fixed'); ui.window.appendChild(dialog); dialog.classList.add('bosscharacter'); dialog.classList.add('modeshortcutpause'); dialog.classList.add('withbg'); // dialog.add('0/3'); dialog.add([list.slice(0,20),'character']); dialog.noopen=true; var next=game.me.chooseButton(dialog,true).set('onfree',true); next._triggered=null; next.custom.replace.target=event.customreplacetarget; next.selectButton=[3,3]; // next.custom.add.button=function(){ // if(ui.cheat2&&ui.cheat2.backup) return; // _status.event.dialog.content.childNodes[1].innerHTML= // ui.selected.buttons.length+'/3'; // }; event.changeDialog=function(){ if(ui.cheat2&&ui.cheat2.dialog==_status.event.dialog){ return; } if(game.changeCoin){ game.changeCoin(-3); } list.randomSort(); var buttons=ui.create.div('.buttons'); var node=_status.event.dialog.buttons[0].parentNode; _status.event.dialog.buttons=ui.create.buttons(list.slice(0,20),'character',buttons); _status.event.dialog.content.insertBefore(buttons,node); buttons.animate('start'); node.remove(); game.uncheck(); game.check(); }; ui.create.cheat=function(){ _status.createControl=ui.cheat2||event.asboss; ui.cheat=ui.create.control('更换',event.changeDialog); delete _status.createControl; }; var createCharacterDialog=function(){ event.dialogxx=ui.create.characterDialog(); event.dialogxx.classList.add('bosscharacter'); event.dialogxx.classList.add('withbg'); event.dialogxx.classList.add('fixed'); if(ui.cheat2){ ui.cheat2.animate('controlpressdownx',500); ui.cheat2.classList.remove('disabled'); } }; if(lib.onfree){ lib.onfree.push(createCharacterDialog); } else{ createCharacterDialog(); } ui.create.cheat2=function(){ _status.createControl=event.asboss; ui.cheat2=ui.create.control('自由选将',function(){ if(this.dialog==_status.event.dialog){ if(game.changeCoin){ game.changeCoin(50); } this.dialog.close(); _status.event.dialog=this.backup; ui.window.appendChild(this.backup); delete this.backup; game.uncheck(); game.check(); if(ui.cheat){ ui.cheat.animate('controlpressdownx',500); ui.cheat.classList.remove('disabled'); } if(_status.bosschoice){ _status.bosschoice.animate('controlpressdownx',500); _status.bosschoice.classList.remove('disabled'); } } else{ if(game.changeCoin){ game.changeCoin(-10); } this.backup=_status.event.dialog; _status.event.dialog.close(); _status.event.dialog=_status.event.parent.dialogxx; this.dialog=_status.event.dialog; ui.window.appendChild(this.dialog); game.uncheck(); game.check(); if(ui.cheat){ ui.cheat.classList.add('disabled'); } if(_status.bosschoice){ _status.bosschoice.classList.add('disabled'); } } }); if(lib.onfree){ ui.cheat2.classList.add('disabled'); } delete _status.createControl; } if(!ui.cheat&&get.config('change_choice')) ui.create.cheat(); if(!ui.cheat2&&get.config('free_choose')) ui.create.cheat2(); event.asboss=ui.create.control('应战',function(){ event.boss=true; event.enemy=[]; for(var i=0;i1/3){ return name; } else{ var arr=['shen_caocao','shen_simayi','shen_guanyu','shen_zhugeliang','shen_zhaoyun','shen_zhouyu','shen_lvmeng','shen_lvbu','shen_liubei','shen_luxun','shen_ganning','ol_zhangliao','shen_zhenji','shen_caopi','key_kagari','key_shiki','db_key_hina']; arr.removeArray(list); return arr.randomGet(); } }, controlid:'shenwuzaishi', control:function(type,control){ if(type=='cancel'){ if(!control.classList.contains('glow')) return; var dialog=control.dialog; dialog.content.removeChild(control.backup1); dialog.buttons.removeArray(control.backup2); game.uncheck(); game.check(); } else{ var control=ui.create.control('神将',function(){ if(ui.cheat2&&ui.cheat2.dialog==_status.event.dialog){ return; } var dialog=_status.event.dialog; this.dialog=dialog; if(this.classList.contains('glow')){ this.backup1.remove(); dialog.buttons.removeArray(this.backup2); } else{ var links=[]; for(var i=0;i0){ ui.cardPile.insertBefore(cards.shift(),ui.cardPile.childNodes[get.rand(0,ui.cardPile.childElementCount-1)]); } lib.inpile.sort(lib.sort.card); } }, boss_chiyanshilian:{ chongzheng:0, loopType:2, checkResult:function(player){ if(player==game.boss&&game.boss.name!='boss_yandi'){ return false; } }, init:function(){ _status.additionalReward=function(){ return 500; } lib.inpile.remove('shandian'); lib.inpile.remove('huoshan'); lib.inpile.remove('hongshui'); lib.inpile.remove('fulei'); lib.inpile.add('honghuangzhili'); lib.inpile.sort(lib.sort.card); for(var i=0;imin; return game.hasPlayer(current=>{ if(current==player||current==_status.currentPhase) return false; if(!bool&¤t.countCards('h')==0) return false; const history=current.getHistory('gain')[0]; if(!history) return false; if(event.name=='gain'){ return history==event&&event.getlx!==false; } return history.getParent()==event; }) }, content:function(){ 'step 0' event.targets=game.filterPlayer(function(current){ if(current==player||current==_status.currentPhase) return false; const history=current.getHistory('gain')[0]; if(!history) return false; if(trigger.name=='gain'){ return history==trigger&&trigger.getlx!==false; } return history.getParent()==trigger; }).sortBySeat(_status.currentPhase); 'step 1' var target=event.targets.shift(); event.target=target; if(target.isIn()){ var list=[]; var min=0; if(!player.hasSkill('shanrangzhaoshu',null,false)) min+=get.sgn(player.getEquips('shanrangzhaoshu').length); if(player.countCards('he')>min) list.push(`交给${get.translation(target)}一张牌`); if(target.countCards('he')>0) list.push(`令${get.translation(target)}交给你一张牌`); event.list=list; if(list.length==0) event.goto(4); else if(list.length==1) event._result={index:0}; else player.chooseControl('cancel2').set('choiceList',list).set('prompt',get.prompt('shanrangzhaoshu',target)).set('ai',function(){ if(get.attitude(_status.event.player,_status.event.getParent().target)<0) return 1; return 'cancel2'; }); } else event.goto(4); 'step 2' if(result.control=='cancel2'){ event.goto(4); return; } player.logSkill('shanrangzhaoshu',target); if(event.list[result.index][0]=='令'){ event.gainner=player; event.giver=target; target.chooseCard('he',true,`交给${get.translation(player)}一张牌`); } else{ event.giver=player; event.gainner=target; player.chooseCard('he',true,`交给${get.translation(target)}一张牌`).set('filterCard',function(card,player){ if(_status.event.ignoreCard) return true; var cards=player.getEquips('shanrangzhaoshu'); if(!cards.contains(card)) return true; return cards.some(cardx=>(cardx!=card&&!ui.selected.cards.contains(cardx))); }).set('ignoreCard',player.hasSkill('shanrangzhaoshu',null,false)); } 'step 3' if(result.cards&&result.cards.length) event.giver.give(result.cards,event.gainner); 'step 4' if(targets.length>0) event.goto(1); }, }, lingsheji:{ trigger:{player:'phaseUseEnd'}, equipSkill:true, direct:true, content:function(){ 'step 0' var list=['摸一张牌']; if(player.countCards('he')>1) list.push('将一张牌置于武将牌上,于回合结束后获得之'); player.chooseControl('cancel2').set('prompt',get.prompt('lingsheji')).set('choiceList',list).set('ai',function(){ var player=_status.event.player; if(player.countCards('e',function(card){ return card.name!='tengjia'&&get.value(card)<=0; })) return 1; if(!player.needsToDiscard()) return 0; return 1; }); 'step 1' if(result.control=='cancel2'){ event.finish();return; } player.logSkill('lingsheji'); if(result.index==0){ player.draw(); event.finish(); } else{ player.chooseCard('he',true,function(card,player){ return card!=player.getEquip(5); }).set('ai',function(card){ if(get.position(card)=='e'&&get.value(card)<=0) return 10; return (get.position(card)=='h'?2:1)*-get.value(card); }); } 'step 2' player.addSkill('lingsheji2'); player.lose(result.cards,ui.special,'toStorage'); player.markAuto('lingsheji2',result.cards); }, }, lingsheji2:{ trigger:{player:'phaseEnd'}, equipSkill:true, forced:true, popup:false, content:function(){ player.gain(player.getStorage('lingsheji2'),'gain2','log'); player.storage.lingsheji2.length=0; player.removeSkill('lingsheji2'); }, intro:{content:'cards'}, }, noda_axe:{ trigger:{player:'useCardToPlayered'}, equipSkill:true, direct:true, filter:function(event,player){ return player.isPhaseUsing()&&player!=event.target&&event.targets.length==1&&player.countCards('he')>2; }, content:function(){ 'step 0' player.chooseToDiscard('he',get.prompt('noda_axe',trigger.target),2,'弃置两张牌,令'+get.translation(trigger.target)+'本回合内不能使用或打出牌且防具技能无效。',function(card,player){ return card!=player.getEquip(1); }).set('logSkill',['noda_axe',trigger.target]).set('goon',function(event,player){ if(player.hasSkill('noda_axe2')) return false; if(event.getParent().excluded.contains(player)) return false; if(get.attitude(event.player,player)>0){ return false; } if(get.type(event.card)=='trick'&&event.player.hasWuxie()) return true; if(get.tag(event.card,'respondSha')){ if(!player.hasSha()) return false; return true; } else if(get.tag(event.card,'respondShan')){ if(!player.hasShan()) return false; return true; } return false; }(trigger,trigger.target)).set('ai',function(card){ if(_status.event.goon) return 7.5-get.value(card); return 0; }); 'step 1' if(result.bool) trigger.target.addTempSkill('noda_axe2'); }, }, noda_axe2:{ equipSkill:true, mod:{ cardEnabled:function(){return false}, cardSavable:function(){return false}, cardRespondable:function(){return false}, }, mark:true, intro:{ content:'不能使用或打出牌且防具技能无效直到回合结束', }, ai:{unequip2:true}, }, iwasawa_crowbow:{ equipSkill:true, trigger:{ player:'loseAfter', global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter'], }, direct:true, filter:function(event,player){ var evt=event.getl(player); return evt&&evt.hs&&evt.hs.length>1&&player.isPhaseUsing(); }, content:function(){ 'step 0' var evt=trigger.getl(player); event.num=evt.hs.length; player.chooseTarget(get.prompt('iwasawa_crowbow'),'弃置一名其他角色的'+get.cnNumber(event.num)+'张牌',function(card,player,target){ return player!=target&&target.countDiscardableCards(player,'he')>0; }).set('ai',function(target){ var att=get.attitude(_status.event.player,target); if(target.countDiscardableCards(_status.event.player,'he')>=_status.event.getParent().num) att=att*2; return -att; }); 'step 1' if(result.bool){ var target=result.targets[0]; player.logSkill('iwasawa_crowbow',target); player.discardPlayerCard(target,'he',true,num); } }, }, boss_panguan:{ mod:{ targetEnabled:function(card){ if(get.type(card)=='delay') return false; }, }, }, boss_juhun:{ trigger:{player:'phaseJieshuBegin'}, forced:true, content:function(){ var list=game.filterPlayer(function(current){ return current!=player; }); if(list.length){ var target=list.randomGet(); player.line(target); target[['turnOver','link'].randomGet()](); } }, }, boss_wangxiang:{ trigger:{player:'die'}, forced:true, forceDie:true, content:function(){ game.countPlayer(function(current){ if(current!=player&¤t.countCards('e')){ player.line(current); current.discard(current.getCards('e')); }; }); }, }, boss_xhuanren:{ nobracket:true, global:'boss_xhuanren2' }, boss_xhuanren2:{ trigger:{player:'dieBegin'}, forced:true, priority:-10, fixed:true, globalFixed:true, charlotte:true, silent:true, popup:false, filter:function(event,player){ if(lib.config.mode!='boss') return false; if(_status.shidianyanluo_level==undefined) return false; return player==game.boss; }, content:function(){ var next=game.createEvent('shidianyanluo_huanren',false,trigger.getParent()); next.player=player; next.forceDie=true; next.setContent(lib.skill.boss_xhuanren2.contentx); }, contentx:function(){ 'step 0' game.delay(); 'step 1' var list=[ ['boss_chujiangwang','boss_songdiwang','boss_wuguanwang','boss_yanluowang'], ['boss_bianchengwang','boss_taishanwang','boss_dushiwang','boss_pingdengwang'], ['boss_zhuanlunwang'], ][_status.shidianyanluo_level]; if(list.length==1) event._result={control:list[0]}; else player.chooseControl(list).set('prompt','请选择下一个出战的角色').set('forceDie',true).ai=function(){ return list.randomGet(); }; 'step 2' _status.shidianyanluo_level++; game.changeBoss(result.control); } }, boss_newhuanren:{ nobracket:true, global:'boss_newhuanren2', trigger:{global:'gameStart'}, popup:false, forced:true, superCharlotte:true, charlotte:true, fixed:true, content:function(){ if(get.mode()!='boss') return; //孟婆 if(!_status.shidianyanluo_mengpo&&Math.random()<=0.4){ if(game.me!=game.boss){ game.boss.changeSeat(6); } else{ game.boss.nextSeat.changeSeat(3); game.boss.previousSeat.changeSeat(5); } // game.addBossFellow(game.me==game.boss?1:7,'boss_mengpo'); var fellow=game.addFellow(game.me==game.boss?1:7,'boss_mengpo','zoominanim'); if(_status.shidianyanluo_level!=0){ fellow.directgain(get.cards(4)); } fellow.side=true; fellow.identity='zhong'; fellow.setIdentity('zhong'); game.addVideo('setIdentity',fellow,'zhong'); _status.shidianyanluo_mengpo=true; } var list=['luxun','re_luxun','zhangchunhua','zuoci','re_zuoci','re_yuji','xin_yuji','jiangfei','kongrong'];//禁将 game.countPlayer(function(current){ if(current!=game.boss){ for(var i=0;i0; }, content:function(){ player.discard(player.getCards('j').randomGet()) }, }, boss_xuechi:{ trigger:{player:'phaseJieshuBegin'}, forced:true, content:function(){ var list=game.players.slice(0); list.remove(player); var target=list.randomGet(); player.line(target); target.loseHp(2); }, }, boss_tiemian:{ inherit:'renwang_skill', priority:-0.3, equipSkill:false, filter:function(event,player){ if(!player.hasEmptySlot(2)) return false; return lib.skill.renwang_skill.filter.apply(this,arguments); }, }, boss_zhadao:{ inherit:'qinggang_skill', equipSkill:false, }, boss_zhuxin:{ trigger:{player:'die'}, forceDie:true, forced:true, content:function(){ 'step 0' player.chooseTarget('【诛心】:请选择一名角色,令其受到2点伤害。',function(card,player,target){ return target!=player&&!game.hasPlayer(function(current){ return current!=player&¤t!=target&¤t.hp2; }, content:function(){ var list=game.players.slice(0); list.remove(player); list.remove(trigger.player); var target=list.randomGet(); player.line(target); target.loseHp(); }, }, boss_kujiu:{ trigger:{global:'phaseZhunbeiBegin'}, forced:true, filter:function(event,player){ return event.player!=player; }, logTarget:'player', content:function(){ 'step 0' trigger.player.loseHp(); 'step 1' trigger.player.useCard({name:'jiu'},trigger.player); }, }, boss_renao:{ trigger:{player:'die'}, forceDie:true, forced:true, content:function(){ var list=game.players.slice(0); list.remove(player); if(list.length){ var target=list.randomGet(); player.line(target); target.damage(3,'fire'); } } }, boss_remen:{ equipSkill:true, trigger:{target:['useCardToBefore']}, forced:true, priority:6, audio:true, filter:function(event,player){ if(!player.hasEmptySlot('equip2')) return false; if(event.card.name=='nanman') return true; if(event.card.name=='wanjian') return true; return event.card.name=='sha'&&!game.hasNature(event.card); }, content:function(){ trigger.cancel(); }, ai:{ effect:{ target:function(card,player,target,current){ if(!target.hasEmptySlot('equip2')) return; if(card.name=='nanman'||card.name=='wanjian') return 'zerotarget'; if(card.name=='sha'){ var equip1=player.getEquip(1); if(equip1&&equip1.name=='zhuque') return 1.9; if(!game.hasNature(card)) return 'zerotarget'; } } } } }, boss_zhifen:{ trigger:{player:'phaseZhunbeiBegin'}, forced:true, content:function(){ 'step 0' var list=game.filterPlayer(); list.remove(player); if(list.length){ var target=list.randomGet(); player.line(target); event.target=target; if(target.countGainableCards(player,'h')) player.gainPlayerCard(target,'h',true); } else event.finish(); 'step 1' target.damage('fire'); } }, boss_huoxing:{ trigger:{player:'die'}, forceDie:true, forced:true, content:function(){ var list=game.players.slice(0); list.remove(player); if(list.length){ list.sort(lib.sort.seat); player.line(list); for(var i=0;icurrent.hp; }); }); if(list.length){ var target=list.randomGet() player.line(target); target.damage(2).nature=lib.linked.randomGet(); } else event.finish(); 'step 1' var list=game.filterPlayer(function(current){ return current!=player&&!game.hasPlayer(function(current2){ return current2.hp>current.hp; }); }); if(list.length){ var target=list.randomGet(); player.line(target); target.damage().nature=lib.linked.randomGet(); } }, }, boss_lunhui:{ trigger:{player:'phaseZhunbeiBegin'}, forced:true, filter:function(event,player){ return player.hp<=2&&game.hasPlayer(function(current){ return current!=player&¤t.hp>2; }); }, content:function(){ var list=game.filterPlayer(function(current){ return current!=player&¤t.hp>2; }); if(list.length){ var target=list.randomGet(); player.line(target); var hp1=player.hp; var hp2=target.hp; player.hp=Math.min(player.maxHp,hp2); target.hp=Math.min(target.maxHp,hp1); player.update(); target.update(); game.log(player,'和',target,'交换了体力值') } }, }, boss_wangsheng:{ trigger:{player:'phaseUseBegin'}, forced:true, content:function(){ var name=['nanman','wanjian'].randomGet(); player.useCard({name:name},game.filterPlayer(function(current){ return player.canUse({name:name},current) }),'noai'); }, }, boss_zlfanshi:{ trigger:{player:'damageEnd'}, forced:true, content:function(){ if(player.hasSkill('boss_zlfanshi_terra')){ var list=game.players.slice(0); list.remove(player); if(list.length){ var target=list.randomGet(); player.line(target); target.damage(); } } else player.addTempSkill('boss_zlfanshi_terra'); }, }, boss_zlfanshi_terra:{charlotte:true}, //孟婆: "boss_shiyou":{ audio:true, trigger:{global:'loseAfter'}, filter:function(event,player){ var evt=event.getParent(3); return event.type=='discard'&&evt.name=='phaseDiscard'&&evt.player==event.player&&evt.player!=player&&event.cards2&&event.cards2.filterInD('d').length>0; }, content:function(){ "step 0" event.cards=trigger.cards2.filterInD('d'); "step 1" var next=player.chooseCardButton(get.prompt('boss_shiyou'),event.cards,[1,event.cards.length]).set('ai',function(button){ return get.value(button.link,player); }).set('filterButton',function(button){ for(var i=0;i0){ for(var x=0;x0){ skills1=skills1.randomGet(); ran1.disableSkill('boss_wanghun',skills1); game.log(ran1,'失去了',skills1); } else{ game.log(ran1,'没有技能可失去'); } } if(list.length>0){ var ran2=list.randomGet();//第二个角色 list.remove(ran2);//移除 var skills2=ran2.getSkills(true,false); if(skills2.length){ for(var i=0;i0){ skills2=skills2.randomGet(); ran2.disableSkill('boss_wanghun',skills2); game.log(ran2,'失去了',skills2); } else{ game.log(ran2,'没有技能可失去'); } } } //添加两张回魂 if(get.mode()=='boss'){ var card1=game.createCard('boss_mengpohuihun','heart',3,null); var card2=game.createCard('boss_mengpohuihun','club',4,null); var a=[]; if(ui.cardPile.childElementCount<3){ game.boss.getCards(4); } for(var i=0;i1;} return game.hasPlayer(function(target){ return player!=target&&get.distance(player,target)<=1; }); }, content:function(){ var name=event.triggername; if(name=='damageBegin4'){ trigger.num--; } else{ game.countPlayer(function(target){ if(player!=target&&get.distance(player,target)<=1){ target.damage(1,player,'fire'); } }); } }, }, "boss_wuliang":{ forced:true, audio:true, trigger:{ global:"gameDrawAfter", player:['phaseZhunbeiBegin','phaseJieshuBegin','enterGame'], }, filter:function(event,player,name){ if(name=='gameDrawAfter'||name=='enterGame'){ return true; } else if(name=='phaseZhunbeiBegin'){ return player.hp<3; } return true; }, content:function(){ var name=event.triggername; if(name=='phaseZhunbeiBegin'){ player.recover(3-player.hp); } else{ player.draw((name=='gameDrawAfter'||name=='enterGame')?3:2); } }, }, "boss_dayuan":{ trigger:{ global:"judge", }, audio:true, direct:true, lastDo:true, content:function (){ 'step 0' var card=trigger.player.judging[0]; var judge0=trigger.judge(card); var judge1=0; var choice='cancel2'; event.suitchoice='cancel2'; var attitude=get.attitude(player,trigger.player); var list=[]; event.suitx=['heart','diamond','club','spade']; for(var x=0;x<4;x++){ for(var i=1;i<14;i++){ list.add(i); var judge2=(trigger.judge({ name:get.name(card), suit:event.suitx[x], number:i, nature:get.nature(card), })-judge0)*attitude; if(judge2>judge1){ choice=i; event.suitchoice=event.suitx[x]; judge1=judge2; } } } list.push('cancel2'); event.suitx.push('cancel2'); player.chooseControl(list).set('ai',function(){ return _status.event.choice; }).set('choice',choice).prompt=get.prompt2(event.name); 'step 1' if(result.control!='cancel2'){ if(!event.logged){ event.logged=true; player.logSkill(event.name,trigger.player); } game.log(trigger.player,'判定结果点数为','#g'+result.control); player.popup(result.control,'fire'); if(!trigger.fixedResult) trigger.fixedResult={}; trigger.fixedResult.number=result.control; } player.chooseControl(event.suitx).set('ai',function(){ return _status.event.choice; }).set('choice',event.suitchoice).prompt=get.prompt2(event.name); 'step 2' if(result.control!='cancel2'){ if(!event.logged){ event.logged=true; player.logSkill(event.name,trigger.player); } game.log(trigger.player,'判定结果花色为','#g'+result.control); player.popup(result.control,'fire'); if(!trigger.fixedResult) trigger.fixedResult={}; trigger.fixedResult.suit=result.control; if(result.control=='club'||result.control=='spade'){ trigger.fixedResult.color='black'; } else if(result.control=='heart'||result.control=='diamond'){ trigger.fixedResult.color='red'; } } }, }, "boss_diting":{ audio:true, mod:{ globalFrom:function (from,to,distance){ return distance-1; }, globalTo:function (from,to,distance){ return distance+1; }, }, enable:"phaseUse", position:'h', filter:function (event,player){ return player.countCards('he',{subtype:['equip3','equip4','equip6']})>0; }, filterCard:function (card){ return get.subtype(card)=='equip3'||get.subtype(card)=='equip4'||get.subtype(card)=='equip6'; }, check:function (card){ if(_status.event.player.isDisabled(get.subtype(card))) return 5; return 3-get.value(card); }, content:function(){ player.draw(); }, discard:false, visible:true, loseTo:'discardPile', prompt:"将一张坐骑牌置入弃牌堆并摸一张牌", delay:0.5, prepare:function (cards,player){ player.$throw(cards,1000); game.log(player,'将',cards,'置入了弃牌堆'); }, ai:{ order:10, result:{ player:1, }, }, group:'boss_diting_init', subSkill:{ init:{ trigger:{ global:'gameStart', player:'enterGame', }, forced:true, filter:function(event,player){ return player.hasEnabledSlot(3)||player.hasEnabledSlot(4); }, content:function(){ var disables=[]; for(var i=3;i<=4;i++){ for(var j=0;j0) player.disableEquip(disables); }, } }, }, /* "boss_sdyl_level":{ trigger:{global:'gameStart'}, forced:true, superCharlotte:true, charlotte:true, fixed:true, content:function(){}, contentplayer:function(player){ var list=[1,2,3,4,5]; var list2=["boss_sdyl_playerlevel1","boss_sdyl_playerlevel2","boss_sdyl_playerlevel3","boss_sdyl_playerlevel4","boss_sdyl_playerlevel5"]; player.removeAdditionalSkill('boss_sdyl_level'); var num=list.randomGet(); player.storage.boss_sdyl_level=num; var list3=list2.concat(); list3.length=num; player.addAdditionalSkill('boss_sdyl_level',list3); game.log(player,'的等阶为',num); if(num>1){ var a=function(card){ return get.type(card)=='equip'; }; for(var i=0;i1){ var a=function(card){ return get.type(card)=='equip'; }; for(var i=0;i0) return false; }, save:true, result:{ player:function(player){ if(player.hp<=0) return 10; if(player.hp<=2&&player.countCards('he')<=1) return 10; return 0; } }, threaten:function(player,target){ if(!target.storage.boss_sdyl_playerlevel5) return 0.6; } }, intro:{ content:'limited' } }, "boss_sdyl_bosslevel1":{ fixed:true, globalFixed:true, charlotte:true, silent:true, popup:false, forced:true, }, "boss_sdyl_bosslevel3":{ fixed:true, globalFixed:true, charlotte:true, silent:true, popup:false, forced:true, init:function(player){ player.maxHp++; player.hp++; player.update(); }, trigger:{player:'phaseZhunbeiBegin'}, forced:true, content:function(){ var card=get.cardPile('sha'); if(card){ player.gain(card); } }, mod:{ cardUsable:function (card,player,num){ if(card.name=='sha') return num+=1; }, }, }, "boss_sdyl_bosslevel2":{ fixed:true, globalFixed:true, charlotte:true, silent:true, popup:false, forced:true, }, "boss_sdyl_bosslevel4":{ fixed:true, globalFixed:true, charlotte:true, silent:true, popup:false, forced:true, trigger:{player:'phaseDrawBegin2'}, forced:true, filter:function (event,player){ return !event.numFixed; }, content:function(){ trigger.num++; }, mod:{ maxHandcard:function (player,num){ return num+=1; }, }, }, "boss_sdyl_bosslevel5":{ fixed:true, globalFixed:true, charlotte:true, silent:true, popup:false, forced:true, init:function(player){ player.maxHp++; player.hp++; player.update(); if(_status.shidianyanluo_level&&_status.shidianyanluo_level>0){ var players=game.filterPlayer(function(current){return current!=player;}); player.useCard({name:'nanman'},false,players); } }, trigger:{ source:"damageBegin4", player:"useCardAfter", global:'gameDrawAfter', }, filter:function (event,player,name){ if(name=='gameDrawAfter'){ if(!_status.shidianyanluo_level||_status.shidianyanluo_level==0){ var players=game.filterPlayer(function(current){return current!=player;}); player.useCard({name:'nanman'},false,players); } return false; } if(player.storage.boss_sdyl_bosslevel5) return false; if(name=='damageBegin4'){ if(!event.card||event.card.name!='nanman') return false; return true; }else if(name=='useCardAfter'){ if(!event.card||event.card.name!='nanman') return false; player.storage.boss_sdyl_bosslevel5=true; return false; } }, content:function (){ trigger.num++; }, }, */ "boss_jingjia":{}, "boss_aozhan":{ forced:true, locked:true, charlotte:true, group:["boss_aozhan_wuqi","boss_aozhan_fangju","boss_aozhan_zuoji","boss_aozhan_baowu"], subSkill:{ wuqi:{ mod:{ cardUsable:function(card,player,num){ if(player.getEquip(1)&&card.name=='sha') return num+1; }, }, sub:true, }, fangju:{ trigger:{ player:"damageBegin4", }, forced:true, filter:function (event,player){ return player.getEquip(2)&&event.num>1; }, content:function (){ trigger.num=1; }, sub:true, }, zuoji:{ trigger:{ player:"phaseDrawBegin", }, forced:true, filter:function (event,player){ return (player.getEquip(3)||player.getEquip(4)); }, content:function(){ trigger.num++; }, sub:true, }, baowu:{ trigger:{ player:"phaseJudgeBefore", }, forced:true, filter:function (event,player){ return player.getEquip(5); }, content:function (){ trigger.cancel(); game.log(player,'跳过了判定阶段'); }, sub:true, }, }, }, boss_yaoshou:{ mod:{ globalFrom:function(from,to,distance){ return distance-2; }, }, }, boss_duqu:{ trigger:{player:'damageEnd'}, filter:function(event,player){ return event.source&&!event.source.hasSkill('boss_duqu'); }, content:function(){ var target=trigger.source; if(!target.storage.boss_shedu) target.storage.boss_shedu=0; target.storage.boss_shedu++; target.markSkill('boss_shedu'); }, forced:true, global:'boss_shedu', mod:{ cardname:function (card,player){ if(card.name=='tao') return 'sha'; }, }, }, boss_shedu:{ trigger:{player:"phaseBegin"}, mark:true, intro:{content:'mark'}, forced:true, filter:function(event,player){ return player.storage.boss_shedu&&player.storage.boss_shedu>0; }, content:function(){ 'step 0' var num=player.storage.boss_shedu; event.num=num; var chs=get.cnNumber(num); player.chooseToDiscard('he',num,'弃置'+chs+'张牌,或失去'+chs+'点体力').ai=function(card){ return 12-get.value(card); }; 'step 1' if(!result.bool) player.loseHp(num); player.storage.boss_shedu--; if(num>1) player.markSkill('boss_shedu'); else player.unmarkSkill('boss_shedu'); }, }, boss_jiushou:{ mod:{ maxHandcard:function(player,num){ return num-player.hp+9; }, }, trigger:{player:['phaseUseBegin','phaseJieshuBegin','phaseDrawBegin']}, forced:true, filter:function(event,player){ return event.name=='phaseDraw'||player.countCards('h')<9; }, content:function(){ if(trigger.name=='phaseDraw') trigger.cancel(); else player.draw(9-player.countCards('h')); }, }, boss_echou_switch:{ unique:true, charlotte:true, group:['boss_echou_switch_on','boss_echou_switch_off'], subSkill:{ off:{ trigger:{global:'gameStart'}, content:function(){ player.disableSkill('boss_echou_awake','boss_echou'); }, silent:true }, on:{ trigger:{player:'changeHp'}, filter:function(event,player){ return player.hp<=player.maxHp/2; }, forced:true, skillAnimation:true, animationColor:'thunder', content:function(){ player.enableSkill('boss_echou_awake'); player.removeSkill('boss_echou_switch'); } } } }, boss_echou:{ trigger:{global:'useCard'}, filter:function(event,player){ return !event.player.hasSkill('boss_duqu')&&['tao','jiu'].contains(event.card.name); }, content:function(){ var target=trigger.player; player.line(target); if(!target.storage.boss_shedu) target.storage.boss_shedu=0; target.storage.boss_shedu++; target.markSkill('boss_shedu'); }, }, boss_bingxian:{ trigger:{global:'phaseJieshuBegin'}, filter:function(event,player){ return event.player!=player&&event.player.countUsed('sha',true)==0; }, forced:true, content:function(){ player.useCard({name:'sha'},trigger.player); }, }, boss_juyuan:{ init:function(player,skill){ player.storage[skill]=0; }, trigger:{player:'phaseAfter'}, forced:true, silent:true, popup:false, content:function(){ player.storage.boss_juyuan=player.hp; }, mod:{ selectTarget:function (card,player,range){ if(card.name!='sha') return; if(range[1]==-1) return; if(player.hp>=player.storage.boss_juyuan) return; range[1]+=2; }, }, }, boss_xushi_switch:{ unique:true, charlotte:true, group:['boss_xushi_switch_on','boss_xushi_switch_off'], subSkill:{ off:{ trigger:{global:'gameStart'}, content:function(){ player.disableSkill('boss_xushi_awake','boss_xushi'); }, silent:true }, on:{ trigger:{player:'changeHp'}, filter:function(event,player){ return player.hp<=player.maxHp/2; }, forced:true, skillAnimation:true, animationColor:'thunder', content:function(){ player.enableSkill('boss_xushi_awake'); player.removeSkill('boss_xushi_switch'); } } } }, boss_xushi:{ trigger:{player:['phaseUseEnd','turnOverEnd']}, filter:function(event,player){ return event.name=='phaseUse'||!player.isTurnedOver(); }, forced:true, content:function(){ 'step 0' if(trigger.name=='phaseUse'){ player.turnOver(); event.finish(); } else{ event.list=game.filterPlayer(function(current){ return current!=player; }); event.list.sort(lib.sort.seat); player.line(event.list,'green'); } 'step 1' var target=event.list.shift(); target.damage([1,2].randomGet()); if(event.list.length) event.redo(); }, }, boss_zhaohuo:{ trigger:{ player:'damageBegin4', source:'damageBegin1', }, forced:true, filter:function(event,player){ if(player==event.player) return event.hasNature('fire')||player==event.source; return true; }, content:function(){ if(player==trigger.player) trigger.cancel(); else game.setNature(trigger,'fire'); }, ai:{ unequip:true, skillTagFilter:function(player){ if(player!=_status.currentPhase) return false; }, }, }, boss_honglianx:{ mod:{ ignoredHandcard:function (card,player){ if(get.color(card)=='red'){ return true; } }, cardDiscardable:function (card,player,name){ if(name=='phaseDiscard'&&get.color(card)=='red') return false; }, }, forced:true, trigger:{player:'phaseZhunbeiBegin'}, content:function(){ 'step 0' event.num1=3; event.num2=[0,1,2,3].randomGet(); event.togain=[]; while(event.togain.lengthmin){ list.splice(i--,1); } } player.line(list,'green'); list.sortBySeat(); for(var i=0;i1; }, content:function(){ trigger.num=0; } } } }, boss_baiyi:{ group:['boss_baiyi_draw','boss_baiyi_thunder','boss_baiyi_discard'], subSkill:{ discard:{ trigger:{global:'roundStart'}, forced:true, filter:function(){ return game.roundNumber==5; }, logTarget:function(event,player){ return player.getEnemies(); }, content:function(){ 'step 0' event.list=player.getEnemies(); 'step 1' if(event.list.length){ event.list.shift().chooseToDiscard('he',true,2); event.redo(); } } }, draw:{ trigger:{global:'phaseDrawBegin'}, forced:true, filter:function(event,player){ return game.roundNumber<3&&event.player.isEnemyOf(player); }, content:function(){ trigger.num-- } }, thunder:{ trigger:{player:'damageBegin4'}, filter:function(event){ return event.hasNature('thunder')&&game.roundNumber<7; }, forced:true, content:function(){ trigger.cancel(); }, ai:{ nothunder:true, skillTagFilter:function(){ return game.roundNumber<7; }, effect:{ target:function(card,player,target,current){ if(get.tag(card,'thunderDamage')&&game.roundNumber<7) return 0; } } } } } }, boss_qingzhu:{ trigger:{player:'phaseDiscardBefore'}, forced:true, content:function(){ trigger.cancel(); }, mod:{ cardEnabled:function(card,player){ if(card.name=='sha'&&_status.currentPhase==player&& _status.event.getParent('phaseUse')&&!player.hasSkill('boss_jiding')){ return false; } } } }, boss_jiazu:{ trigger:{player:'phaseZhunbeiBegin'}, forced:true, getTargets:function(player){ var targets=[]; targets.add(player.getNext()); targets.add(player.getPrevious()); var enemies=player.getEnemies(); for(var i=0;i0; }, logTarget:function(event,player){ return lib.skill.boss_jiazu.getTargets(player); }, content:function(){ 'step 0' event.list=lib.skill.boss_jiazu.getTargets(player).sortBySeat(); 'step 1' if(event.list.length){ var target=event.list.shift(); var cards=target.getCards('e',function(card){ var subtype=get.subtype(card); return subtype=='equip3'||subtype=='equip4'; }); if(cards.length){ target.discard(cards); } event.redo(); } } }, boss_jiding:{ trigger:{global:'damageEnd'}, forced:true, mark:true, intro:{ content:'info' }, filter:function(event,player){ return event.player!=player&&event.player.isFriendOf(player)&& event.source&&event.source.isIn()&&event.source.isEnemyOf(player); }, logTarget:'source', content:function(){ 'step 0' player.useCard({name:'sha',nature:'thunder'},trigger.source); 'step 1' player.removeSkill('boss_jiding'); }, group:'boss_jiding_recover', subSkill:{ recover:{ trigger:{source:'damageEnd'}, silent:true, filter:function(event,player){ return event.getParent(3).name=='boss_jiding'; }, content:function(){ for(var i=0;i0&&dead[i].parentNode==player.parentNode){ dead[i].revive(dead[i].maxHp); dnum++; } } for(var i=0;i0&&dead[i].parentNode==player.parentNode){ dead[i].revive(dead[i].maxHp); dnum++; } } for(var i=0;i0&&dead[i].parentNode==player.parentNode){ dead[i].revive(dead[i].maxHp); dnum++; } } for(var i=0;i0&&dead[i].parentNode==player.parentNode){ dead[i].revive(dead[i].maxHp); dnum++; } } for(var i=0;i0&&dead[i].parentNode==player.parentNode){ dead[i].revive(dead[i].maxHp); dnum++; } } for(var i=0;i0&&dead[i].parentNode==player.parentNode){ dead[i].revive(dead[i].maxHp); dnum++; } } for(var i=0;i0&&dead[i].parentNode==player.parentNode){ dead[i].revive(dead[i].maxHp); dnum++; } } for(var i=0;i0&&dead[i].parentNode==player.parentNode){ dead[i].revive(dead[i].maxHp); dnum++; } } for(var i=0;i=2; }, unique:true, filterTarget:function(card,player,target){ return target.name=='boss_yanling'; }, selectTarget:-1, line:'fire', content:function(){ target.damage(2,'fire'); }, contentAfter:function(){ 'step 0' player.storage.boss_xingxia=game.roundNumber; player.chooseTarget(function(card,player,target){ return target.side!=player.side; }).ai=function(target){ return get.damageEffect(target,player,player,'fire'); } 'step 1' if(result.bool){ event.target=result.targets[0]; player.line(event.target,'fire'); event.target.chooseToDiscard('he',{color:'red'},'弃置一张红色牌或受到1点火焰伤害').ai=function(card){ var player=_status.event.player; var source=_status.event.parent.player; if(get.damageEffect(player,source,player,'fire')>=0) return 0; return 8-get.value(card); } } else{ event.finish(); } 'step 2' if(!result.bool){ event.target.damage('fire'); } }, ai:{ order:6, result:{ target:function(player,target){ if(target.isLinked()&&player.isLinked()&&get.damageEffect(player,player,player,'fire')<0) return -1; return 1; } } } }, boss_huihuo:{ global:'boss_huihuo2', unique:true, mod:{ cardUsable:function(card,player,num){ if(card.name=='sha') return num+1; } }, ai:{ revertsave:true, effect:{ target:function(card,player,target){ if(!game.boss) return; if(card.name=='tiesuo'){ if(_status.event.player==game.boss) return 'zeroplayertarget'; return 0.5; } if(get.tag(card,'damage')||get.tag(card,'recover')){ if(game.boss.isLinked()&&get.damageEffect(game.boss,player,game.boss,'fire')<0){ if(game.hasPlayer(function(current){ return current.isEnemyOf(game.boss)&¤t.isLinked(); })){ return; } if(get.tag(card,'natureDamage')&&target.isLinked()){ return; } } if(target.isDying()){ if(player.isEnemyOf(target)&&player.hp>=-1) return [0,0,0,1]; return 'zeroplayertarget'; } return -0.5; } } } } }, boss_huihuo2:{ trigger:{global:'dieAfter'}, forced:true, globalFixed:true, unique:true, filter:function(event,player){ return event.player.hasSkill('boss_huihuo')&&event.player.isDead()&&player.isEnemyOf(event.player); }, content:function(){ trigger.player.line(player,'fire'); player.damage('nosource','fire',3).animate=false; player.$damage(trigger.player); player.$damagepop(-3,'fire'); if(lib.config.animation&&!lib.config.low_performance){ player.$fire(); } if(!event.parent.parent.boss_huihuo_logv){ event.parent.parent.boss_huihuo_logv=true; game.logv(trigger.player,'boss_huihuo',game.filterPlayer(),event.parent.parent); } } }, boss_furan:{ unique:true, global:'boss_furan2' }, boss_furan2:{ enable:'chooseToUse', filter:function(event,player){ return event.type=='dying'&&event.dying.hasSkill('boss_furan')&&player.isEnemyOf(event.dying); }, filterCard:function(card){ return get.color(card)=='red'; }, position:'he', viewAs:{name:'tao'}, prompt:'将一张红色牌当桃使用', check:function(card){return 8-get.value(card)}, ai:{ order:5, skillTagFilter:function(player){ var event=_status.event; if(event.dying&&event.dying.hasSkill('boss_furan')&&player.isEnemyOf(event.dying)){ return player.countCards('he',{color:'red'})>0&&_status.currentPhase!=player; } else{ return false; } }, save:true, } }, boss_chiyi:{ trigger:{player:'phaseZhunbeiBegin'}, forced:true, unique:true, filter:function(event,player){ return [3,5,7].contains(game.roundNumber); }, content:function(){ 'step 0' if(game.roundNumber==3){ var enemies=game.filterPlayer(function(current){ return current.isEnemyOf(player); }); player.line(enemies,'green'); for(var i=0;i=2){ for(var i=0;i=3) return 1; if(player.hp>=2&&player!=game.boss) return 1; if(game.hasPlayer(function(current){ return current.name=='boss_shujing'; })){ return 0; } return 1; } } } }, recover:{ enable:'phaseUse', filter:function(event,player){ if(!player.storage.boss_buchun||game.roundNumber-player.storage.boss_buchun>=2){ for(var i=0;i=2){ num=1.5; } return 1.5*get.recoverEffect(target,player,target); } } } } } }, boss_cuidu:{ trigger:{source:'damageEnd'}, forced:true, unique:true, filter:function(event,player){ if(event._notrigger.contains(event.player)) return false; return event.player.isIn()&&event.player.isEnemyOf(player)&&!event.player.hasSkill('boss_zhongdu'); }, logTarget:'player', content:function(){ trigger.player.addSkill('boss_zhongdu'); var boss=game.findPlayer(function(current){ return current.name=='boss_mushengoumang'; }); if(boss){ boss.draw(); } } }, boss_zhongdu:{ trigger:{player:'phaseZhunbeiBegin'}, forced:true, mark:true, nopop:true, temp:true, intro:{ content:'锁定技,回合开始时,你进行判定,若结果不为红桃,你受到1点无来源的伤害,若结果不为黑桃,你失去此技能' }, content:function(){ 'step 0' player.judge(function(card){ var suit=get.suit(card); if(suit=='spade') return -1; if(suit=='heart') return 1; return 0; }); 'step 1' if(result.suit!='heart'){ player.damage('nosource'); } if(result.suit!='spade'){ player.removeSkill('boss_zhongdu'); } } }, boss_qingyi:{ trigger:{player:'phaseZhunbeiBegin'}, forced:true, unique:true, filter:function(event,player){ return [3,5,7].contains(game.roundNumber); }, content:function(){ 'step 0' if(game.roundNumber==7){ var goumang,shujing; for(var i=0;i=0){ if(att1+att2>0){ return '选项二'; } else{ return '选项一'; } } else{ if(trigger.player.isHealthy()&&trigger.source.isHealthy()) return rand; if(trigger.player.isHealthy()){ if(att1<0) return '选项二'; if(att1>0&&!stop) return '选项一'; } if(trigger.source.isHealthy()){ if(att2<0) return '选项二'; if(att2>0&&!stop) return '选项一'; } if(stop) return 'cancel2'; return rand; } }).set('prompt',get.prompt('boss_yuance')).set('choiceList',[ '若判定结果为黑色,'+playername+'失去1点体力,否则'+sourcename+'失去1点体力', '若判定结果为红色,'+playername+'回复1点体力,否则'+sourcename+'回复1点体力' ]); 'step 1' var att1=get.attitude(player,trigger.player); var att2=get.attitude(player,trigger.source); if(result.control=='选项一'){ event.type=1; player.judge(function(card){ if(get.color(card)=='black'){ if(att1>0) return -1; if(att1<0) return 1; } else{ if(att2>0) return -1; if(att2<0) return 1; } return 0; }); } else if(result.control=='选项二'){ event.type=2; player.judge(function(card){ if(get.color(card)=='red'){ if(trigger.player.isDamaged()){ if(att1>0) return 1; if(att1<0) return -1; } } else{ if(trigger.source.isDamaged()){ if(att2>0) return 1; if(att2<0) return -1; } } return 0; }); } else{ event.finish(); } 'step 2' if(event.type==1){ if(result.color=='black'){ trigger.player.loseHp(); } else{ trigger.source.loseHp(); } } else{ if(result.color=='red'){ trigger.player.recover(); } else{ trigger.source.recover(); } } } }, boss_guixin:{ trigger:{global:'drawAfter'}, forced:true, logTarget:'player', filter:function(event,player){ return event.result&&event.result.length>=2&&event.player!=player; }, content:function(){ 'step 0' trigger.player.chooseCard(function(card){ return trigger.result.contains(card); },'归心:交给'+get.translation(player)+'一张牌',true); 'step 1' if(result.bool){ player.gain(result.cards,trigger.player); trigger.player.$give(1,player); } } }, xiongcai:{ unique:true, trigger:{player:'phaseAfter'}, direct:true, init:function(player){ player.storage.xiongcai=[]; // player.storage.xiongcai2=0; }, intro:{ content:'characters' }, content:function(){ 'step 0' // if(player.storage.xiongcai2<1){ // player.storage.xiongcai2++; // event.finish(); // } // else{ // player.storage.xiongcai2=0; // } 'step 1' player.logSkill('xiongcai'); var list=[]; var list2=[]; var players=game.players.concat(game.dead); for(var i=0;i'+get.translation(player)+'发动了【雄才】',[[name],'character']); game.delay(2); 'step 2' event.dialog.close(); } }, xiaoxiong:{ trigger:{global:'useCardAfter'}, forced:true, unique:true, forceunique:true, filter:function(event,player){ var type=get.type(event.card,'trick'); return event.player!=player&&(type=='basic'||type=='trick'); }, content:function(){ player.gain(game.createCard(trigger.card),'gain2'); }, group:'xiaoxiong_damage', subSkill:{ damage:{ trigger:{global:'phaseJieshuBegin'}, forced:true, filter:function(event,player){ return event.player!=player&&event.player.countUsed()==0; }, logTarget:'player', content:function(){ trigger.player.damage(); } } } }, boss_zhangwu:{ global:'boss_zhangwu_ai', trigger:{player:'damageEnd'}, check:function(event,player){ return event.source&&event.source.isIn()&&get.damageEffect(event.source,player,player)>0; }, filter:function(event){ return event.source&&event.source.isAlive(); }, direct:true, logTarget:'source', content:function(){ 'step 0' player.chooseToDiscard(get.prompt('boss_zhangwu',trigger.source),'he',[1,Infinity]).set('ai',function(card){ if(get.attitude(player,target)<0) return 8-get.value(card); return 0; }).set('logSkill',['boss_zhangwu',trigger.source]); 'step 1' if(result.bool){ var num=result.cards.length; var cnum=get.cnNumber(num); event.num=num; trigger.source.chooseToDiscard('he','章武:弃置'+cnum+'张牌,或取消并受到'+cnum+'点伤害',num).set('ai',function(card){ if(!trigger.source.hasSkillTag('nodamage')) return 10-get.value(card); return 0; }); } else{ event.finish(); } 'step 2' if(!result.bool){ trigger.source.damage(event.num); } }, ai:{ maixie:true, maixie_hp:true, effect:{ target:function(card,player,target){ if(get.tag(card,'damage')&&get.attitude(target,player)<0&&player.countCards('he')=4; }); }, x2:function(player){ return player.countCards('j')>=2; }, x1:function(){ return game.players.length==2; } }, }, xiangxing:{ unique:true, init:function(player){ player.storage.xiangxing=7; player.storage.xiangxing_count=0; player.addSkill('xiangxing7'); }, mark:true, intro:{ content:'当前有#枚星' }, trigger:{player:['damageEnd','loseHpEnd']}, forced:true, popup:false, content:function(){ 'step 0' var num=trigger.num; if(num){ player.storage.xiangxing_count+=num; } if(player.storage.xiangxing_count>=7){ if(player.hasSkill('yueyin')&&lib.skill.yueyin.skipDamage['x'+player.storage.xiangxing](player,trigger)){ event.goto(3); } player.removeSkill('xiangxing'+player.storage.xiangxing); player.storage.xiangxing--; player.storage.xiangxing_count=0; player.updateMarks(); if(player.storage.xiangxing){ player.addSkill('xiangxing'+player.storage.xiangxing); } else{ player.awakenSkill('xiangxing'); } player.popup('xiangxing'); game.log(player,'失去了一枚星'); } else{ player.updateMarks(); event.finish(); } 'step 1' var list=game.filterPlayer(); list.remove(player); list.sort(lib.sort.seat); var list2=[]; for(var i=0;i0){ return 1+trigger.judge(button.link); } if(get.attitude(player,trigger.player)<0){ return 1-trigger.judge(button.link); } return 0; }; "step 1" if(!result.bool){ event.finish(); return; } player.logSkill('gaiming',trigger.player); var card=result.links[0]; event.cards.remove(card); var judgestr=get.translation(trigger.player)+'的'+trigger.judgestr+'判定'; event.videoId=lib.status.videoId++; event.dialog=ui.create.dialog(judgestr); event.dialog.classList.add('center'); event.dialog.videoId=event.videoId; game.addVideo('judge1',player,[get.cardInfo(card),judgestr,event.videoId]); for(var i=0;i0){ trigger.result.bool=true; trigger.player.popup('洗具'); } if(trigger.result.judge<0){ trigger.result.bool=false; trigger.player.popup('杯具'); } game.log(trigger.player,'的判定结果为',card); trigger.direct=true; trigger.position.appendChild(card); game.delay(2); } else{ event.finish(); } "step 2" ui.arena.classList.remove('thrownhighlight'); event.dialog.close(); game.addVideo('judge2',null,event.videoId); ui.clear(); var card=trigger.result.card; trigger.position.appendChild(card); trigger.result.node.delete(); game.delay(); }, }, tiandao:{ audio:true, trigger:{global:'judge'}, direct:true, filter:function(event,player){ return player.countCards('he')>0; }, content:function(){ "step 0" player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ get.translation(trigger.player.judging[0])+','+get.prompt('tiandao'),'he').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=get.attitude(player,trigger.player); if(attitude==0||result==0) return 0; if(attitude>0){ return result; } else{ return -result; } }; "step 1" if(result.bool){ player.respond(result.cards,'highlight'); } else{ event.finish(); } "step 2" if(result.bool){ player.logSkill('tiandao'); player.$gain2(trigger.player.judging[0]); player.gain(trigger.player.judging[0]); trigger.player.judging[0]=result.cards[0]; trigger.position.appendChild(result.cards[0]); game.log(trigger.player,'的判定牌改为',result.cards[0]); } "step 3" game.delay(2); }, ai:{ tag:{ rejudge:1 }, threaten:1.5 } }, lianji:{ audio:true, enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ if(player==target) return false; return target.countCards('h')>0; }, selectTarget:2, multitarget:true, multiline:true, filter:function(event,player){ return player.countCards('h')>0; }, prepare:'throw', discard:false, filterCard:true, check:function(card){ return 6-get.value(card); }, content:function(){ "step 0" if(targets[0].countCards('h')&&targets[1].countCards('h')){ targets[0].chooseToCompare(targets[1]); } else{ event.finish(); } "step 1" if(result.bool){ targets[0].gain(cards); targets[0].$gain2(cards); targets[1].damage(targets[0]); } else{ targets[1].gain(cards); targets[1].$gain2(cards); targets[0].damage(targets[1]); } }, ai:{ expose:0.3, threaten:2, order:9, result:{ target:-1 } }, }, mazui:{ audio:true, enable:'phaseUse', usable:1, filterCard:{color:'black'}, filterTarget:function(card,player,target){ return !target.hasSkill('mazui2'); }, check:function(card){ return 6-get.value(card); }, discard:false, prepare:'give', content:function(){ target.storage.mazui2=cards[0]; target.addSkill('mazui2'); game.addVideo('storage',target,['mazui2',get.cardInfo(target.storage.mazui2),'card']); }, ai:{ expose:0.2, result:{ target:function(player,target){ return -target.hp; } }, order:4, threaten:1.2 } }, mazui2:{ trigger:{source:'damageBegin1'}, forced:true, mark:'card', filter:function(event){ return event.num>0; }, content:function(){ trigger.num--; player.addSkill('mazui3'); player.removeSkill('mazui2'); }, intro:{ content:'card' } }, mazui3:{ trigger:{source:['damageEnd','damageZero']}, forced:true, popup:false, content:function(){ player.gain(player.storage.mazui2,'gain2'); game.log(player,'获得了',player.storage.mazui2); player.removeSkill('mazui3'); delete player.storage.mazui2; } }, yunshen:{ trigger:{player:['respond','useCard']}, filter:function(event,player){ return event.card.name=='shan'; }, frequent:true, init:function(player){ player.storage.yunshen=0; }, content:function(){ player.storage.yunshen++; player.markSkill('yunshen'); }, ai:{ effect:{ target:function(card,player,target){ if(get.tag(card,'respondShan')){ var shans=target.countCards('h','shan'); var hs=target.countCards('h'); if(shans>1) return [1,1]; if(shans&&hs>2) return [1,1]; if(shans) return [1,0.5]; if(hs>2) return [1,0.3]; if(hs>1) return [1,0.2]; return [1.2,0]; } } }, threaten:0.8 }, intro:{ content:'mark' }, group:'yunshen2' }, yunshen2:{ trigger:{player:'phaseZhunbeiBegin'}, forced:true, filter:function(event,player){ return player.storage.yunshen>0; }, content:function(){ player.draw(player.storage.yunshen); player.storage.yunshen=0; player.unmarkSkill('yunshen'); }, mod:{ globalTo:function(from,to,distance){ if(typeof to.storage.yunshen=='number') return distance+to.storage.yunshen; } } }, lingbo:{ audio:2, trigger:{player:['respond','useCard']}, filter:function(event,player){ return event.card.name=='shan'; }, frequent:true, content:function(){ player.draw(2); }, ai:{ mingzhi:false, effect:{ target:function(card,player,target){ if(get.tag(card,'respondShan')){ var shans=target.countCards('h','shan'); var hs=target.countCards('h'); if(shans>1) return [0,1]; if(shans&&hs>2) return [0,1]; if(shans) return [0,0]; if(hs>2) return [0,0]; if(hs>1) return [1,0.5]; return [1.5,0]; } } }, threaten:0.8 } }, jiaoxia:{ audio:2, trigger:{target:'useCardToTargeted'}, filter:function(event,player){ return event.card&&get.color(event.card)=='red'; }, frequent:true, content:function(){ player.draw(); }, ai:{ effect:function(card,player,target){ if(get.color(card)=='red') return [1,1]; }, } }, boss_nbianshenx:{}, boss_jingjue:{ inherit:'boss_danshu' }, boss_renxing:{ trigger:{global:['damageEnd','recoverEnd']}, forced:true, filter:function(event,player){ return _status.currentPhase!=player; }, content:function(){ player.draw(); } }, boss_ruizhi:{ trigger:{global:'phaseZhunbeiBegin'}, forced:true, filter:function(event,player){ return event.player!=player&&(event.player.countCards('h')>1||event.player.countCards('e')>1); }, content:function(){ 'step 0' player.line(trigger.player,'green'); var next=trigger.player.chooseCard(true,'选择保留一张手牌和一张装备区内的牌,然后弃置其它牌','he',function(card){ switch(get.position(card)){ case 'h':{ if(ui.selected.cards.length){ return get.position(ui.selected.cards[0])=='e'; } else{ return trigger.player.countCards('h')>1; } } case 'e':{ if(ui.selected.cards.length){ return get.position(ui.selected.cards[0])=='h'; } else{ return trigger.player.countCards('e')>1; } } } }); var num=0; if(trigger.player.countCards('h')>1){ num++; } if(trigger.player.countCards('e')>1){ num++; } next.selectCard=[num,num]; next.ai=function(card){ return get.value(card); }; 'step 1' if(result.bool){ var he=[]; var hs=trigger.player.getCards('h'); var es=trigger.player.getCards('e'); if(hs.length>1){ he=he.concat(hs); } if(es.length>1){ he=he.concat(es); } for(var i=0;i4){ trigger.num=4+Math.floor(Math.random()*(player.hp-3)); } else{ trigger.num=4; } }, subSkill:{ sha:{ mod:{ cardUsable:function(card,player,num){ if(card.name=='sha'&&player.hp<5) return Infinity; } }, trigger:{source:'damageBegin1'}, filter:function(event,player){ return event.card&&event.card.name=='sha'&&event.notLink()&&player.hp<5; }, forced:true, content:function(){ trigger.num++; } } } }, boss_shouyi:{ mod:{ targetInRange:function(){ return true; } }, }, boss_mengtai:{ group:['boss_mengtai_begin','boss_mengtai_draw','boss_mengtai_use', 'boss_mengtai_discard','boss_mengtai_end'], subSkill:{ begin:{ trigger:{player:'phaseZhunbeiBegin'}, forced:true, popup:false, content:function(){ player.storage.boss_mengtai_draw=true; player.storage.boss_mengtai_use=true; } }, draw:{ trigger:{player:'phaseDrawBegin'}, forced:true, popup:false, content:function(){ player.storage.boss_mengtai_draw=false; } }, use:{ trigger:{player:'phaseUseBegin'}, forced:true, popup:false, content:function(){ player.storage.boss_mengtai_use=false; } }, discard:{ trigger:{player:'phaseDiscardBefore'}, forced:true, filter:function(event,player){ if(player.storage.boss_mengtai_use) return true; return false; }, content:function(){ trigger.cancel(); } }, end:{ trigger:{player:'phaseJieshuBegin'}, forced:true, filter:function(event,player){ if(player.storage.boss_mengtai_draw) return true; return false; }, content:function(){ player.draw(3); } } } }, boss_nbianshen:{ trigger:{player:'phaseBefore'}, forced:true, popup:false, priority:25, fixed:true, filter:function(event,player){ if(player.name=='boss_nianshou_heti'||player.storage.boss_nbianshen) return true; return false; }, content:function(){ if(player.storage.boss_nbianshen){ var hp=player.hp, maxHp=player.maxHp, hujia=player.hujia; player.init('boss_nianshou_'+player.storage.boss_nbianshen_next); player.storage.boss_nbianshen.remove(player.storage.boss_nbianshen_next); if(!player.storage.boss_nbianshen.length){ player.storage.boss_nbianshen=['jingjue','renxing','ruizhi','baonu']; } player.storage.boss_nbianshen_next=player.storage.boss_nbianshen.randomGet(player.storage.boss_nbianshen_next); player.hp=hp; player.maxHp=maxHp; player.hujia=hujia; player.update(); } else{ player.storage.boss_nbianshen=['jingjue','renxing','ruizhi','baonu']; player.storage.boss_nbianshen_next=player.storage.boss_nbianshen.randomGet(); player.markSkill('boss_nbianshen'); } }, intro:{ content:function(storage,player){ var map={ jingjue:'警觉', renxing:'任性', ruizhi:'睿智', baonu:'暴怒' }; return '下一个状态:'+map[player.storage.boss_nbianshen_next]; } } }, boss_damagecount:{ mode:['boss'], global:'boss_damagecount2' }, boss_damagecount2:{ trigger:{source:'damageEnd'}, silent:true, filter:function(event,player){ if(!ui.damageCount) return false; return event.num>0&&player.isFriendOf(game.me)&&event.player.isEnemyOf(game.me); }, content:function(){ _status.damageCount+=trigger.num; ui.damageCount.innerHTML='伤害: '+_status.damageCount; } }, boss_nianrui:{ trigger:{player:'phaseDrawBegin'}, forced:true, content:function(){ trigger.num+=2; }, ai:{ threaten:1.6 } }, boss_qixiang:{ group:['boss_qixiang1','boss_qixiang2'], ai:{ effect:{ target:function(card,player,target,current){ if(card.name=='lebu'&&card.name=='bingliang') return 0.8; } } } }, boss_qixiang1:{ trigger:{player:'judge'}, forced:true, filter:function(event,player){ if(event.card){ if(event.card.viewAs){ return event.card.viewAs=='lebu'; } else{ return event.card.name=='lebu'; } } }, content:function(){ player.addTempSkill('boss_qixiang3','judgeAfter'); } }, boss_qixiang2:{ trigger:{player:'judge'}, forced:true, filter:function(event,player){ if(event.card){ if(event.card.viewAs){ return event.card.viewAs=='bingliang'; } else{ return event.card.name=='bingliang'; } } }, content:function(){ player.addTempSkill('boss_qixiang4','judgeAfter'); } }, boss_qixiang3:{ mod:{ suit:function(card,suit){ if(suit=='diamond') return 'heart'; } } }, boss_qixiang4:{ mod:{ suit:function(card,suit){ if(suit=='spade') return 'club'; } } }, boss_bianshen2:{ mode:['boss'], fixed:true, global:'boss_bianshen2x', trigger:{player:'dieBegin'}, silent:true, content:function(){ player.hide(); game.addVideo('hidePlayer',player); } }, boss_bianshen2x:{ trigger:{global:'dieAfter'}, forced:true, priority:-10, fixed:true, globalFixed:true, filter:function(event){ if(lib.config.mode!='boss') return false; return event.player==game.boss&&event.player.hasSkill('boss_bianshen2'); }, content:function(){ 'step 0' game.delay(); 'step 1' game.changeBoss(['boss_niutou','boss_mamian'].randomGet()); } }, boss_bianshen3:{ mode:['boss'], global:'boss_bianshen3x', trigger:{player:'dieBegin'}, silent:true, fixed:true, content:function(){ player.hide(); game.addVideo('hidePlayer',player); } }, boss_bianshen3x:{ trigger:{global:'dieAfter'}, forced:true, priority:-10, fixed:true, globalFixed:true, filter:function(event){ if(lib.config.mode!='boss') return false; return event.player==game.boss&&event.player.hasSkill('boss_bianshen3'); }, content:function(){ 'step 0' game.delay(); 'step 1' game.changeBoss(['boss_baiwuchang','boss_heiwuchang'].randomGet()); } }, boss_bianshen4:{ mode:['boss'], global:'boss_bianshen4x', trigger:{player:'dieBegin'}, silent:true, fixed:true, content:function(){ player.hide(); game.addVideo('hidePlayer',player); } }, boss_bianshen4x:{ trigger:{global:'dieAfter'}, forced:true, priority:-10, fixed:true, globalFixed:true, filter:function(event){ if(lib.config.mode!='boss') return false; return event.player==game.boss&&event.player.hasSkill('boss_bianshen4'); }, content:function(){ 'step 0' game.delay(); 'step 1' game.changeBoss(['boss_yecha','boss_luocha'].randomGet()); } }, boss_moyany:{ trigger:{player:'loseEnd'}, frequent:true, unique:true, filter:function(event,player){ return _status.currentPhase!=player; }, content:function(){ "step 0" player.judge(function(card){ return get.color(card)=='red'?1:0; }); "step 1" if(result.bool){ player.chooseTarget(true,'选择一个目标对其造成两点火焰伤害',function(card,player,target){ return player!=target; }).ai=function(target){ return get.damageEffect(target,player,player,'fire'); } } else{ event.finish(); } "step 2" if(result.targets.length){ player.line(result.targets,'fire'); result.targets[0].damage(2,'fire'); } }, ai:{ effect:{ target:function(card){ if(get.tag(card,'loseCard')){ return [0.5,1]; } } } } }, boss_danshu:{ trigger:{player:'loseEnd'}, frequent:true, unique:true, filter:function(event,player){ return _status.currentPhase!=player&&player.hp=player.hp; }).ai=function(target){ return get.damageEffect(target,player,player,'fire'); } "step 1" if(result.bool){ player.logSkill('boss_xiaoshou',result.targets); result.targets[0].damage('fire',3); } }, }, boss_manjia:{ group:['boss_manjia1','boss_manjia2'] }, boss_manjia1:{ trigger:{target:['useCardToBefore','shaBegin']}, forced:true, priority:6, filter:function(event,player,name){ if(player.getEquip(2)) return false; if(name=='shaBegin') return lib.skill.tengjia3.filter(event,player); return lib.skill.tengjia1.filter(event,player); }, content:function(){ trigger.cancel(); }, ai:{ effect:{ target:function(card,player,target,current){ if(target.getEquip(2)) return; return lib.skill.tengjia1.ai.effect.target.apply(this,arguments); } } } }, boss_manjia2:{ trigger:{player:'damageBegin3'}, filter:function(event,player){ if(player.getEquip(2)) return false; if(event.hasNature('fire')) return true; }, forced:true, check:function(){ return false; }, content:function(){ trigger.num++; }, ai:{ effect:{ target:function(card,player,target,current){ if(target.getEquip(2)) return; return lib.skill.tengjia2.ai.effect.target.apply(this,arguments); } } } }, boss_lianyu:{ trigger:{player:'phaseJieshuBegin'}, unique:true, content:function(){ "step 0" event.players=get.players(player); "step 1" if(event.players.length){ var current=event.players.shift(); if(current.isEnemyOf(player)){ player.line(current,'fire'); current.damage('fire'); } event.redo(); } }, ai:{ threaten:2 } }, boss_guiji:{ trigger:{player:'phaseJudgeBegin'}, forced:true, content:function(){ player.discard(player.getCards('j').randomGet()); }, filter:function(event ,player){ return player.countCards('j')>0; }, ai:{ effect:{ target:function(card,player,target,current){ if(get.type(card)=='delay'&&target.countCards('j')==0) return 0.1; } } } }, boss_minbao:{ global:'boss_minbao2' }, boss_minbao2:{ trigger:{global:'dieAfter'}, forced:true, globalFixed:true, filter:function(event,player){ return event.player.hasSkill('boss_minbao')&&event.player.isDead(); }, content:function(){ trigger.player.line(player,'fire'); player.damage('nosource','fire').animate=false; player.$damage(trigger.player); player.$damagepop(-1,'fire'); if(lib.config.animation&&!lib.config.low_performance){ player.$fire(); } if(!event.parent.parent.boss_minbao_logv){ event.parent.parent.boss_minbao_logv=true; game.logv(trigger.player,'boss_minbao',game.filterPlayer(),event.parent.parent); } } }, boss_guihuo:{ trigger:{player:'phaseJieshuBegin'}, direct:true, content:function(){ "step 0" player.chooseTarget(get.prompt('boss_guihuo'),function(card,player,target){ return player!=target; }).ai=function(target){ return get.damageEffect(target,player,player,'fire'); } "step 1" if(result.bool){ player.logSkill('boss_guihuo',result.targets); result.targets[0].damage('fire'); } }, }, boss_luolei:{ trigger:{player:'phaseZhunbeiBegin'}, direct:true, content:function(){ "step 0" player.chooseTarget(get.prompt('boss_luolei'),function(card,player,target){ return player!=target; }).ai=function(target){ return get.damageEffect(target,player,player,'thunder'); } "step 1" if(result.bool){ player.logSkill('boss_luolei',result.targets); result.targets[0].damage('thunder'); } }, }, boss_beiming:{ trigger:{player:'dieBegin'}, forced:true, filter:function(event){ return event.source!=undefined; }, content:function(){ trigger.source.discard(trigger.source.getCards('h')); }, ai:{ threaten:0.7 } }, boss_shanbeng:{ global:'boss_shanbeng2', trigger:{player:'dieBegin'}, forced:true, logv:false, content:function(){ var targets=game.filterPlayer(function(current){ return current.countCards('e'); }); player.line(targets,'green'); game.delay(); game.logv(player,'boss_shanbeng',targets,null,true); } }, boss_shanbeng2:{ trigger:{global:'dieAfter'}, forced:true, globalFixed:true, filter:function(event,player){ return player.countCards('e')>0&&event.player.hasSkill('boss_shanbeng')&&event.player.isDead(); }, content:function(){ player.discard(player.getCards('e')); } }, boss_didong:{ trigger:{player:'phaseJieshuBegin'}, direct:true, content:function(){ "step 0" player.chooseTarget(get.prompt('boss_didong'),function(card,player,target){ return target.isEnemyOf(player); }).ai=function(target){ var att=get.attitude(player,target); if(target.isTurnedOver()){ if(att>0){ return att+5; } return -1; } if(player.isTurnedOver()){ return 5-att; } return -att; }; "step 1" if(result.bool){ player.logSkill('boss_didong',result.targets); result.targets[0].turnOver(); } }, ai:{ threaten:1.7 } }, boss_guimei:{ mod:{ targetEnabled:function(card,player,target){ if(get.type(card)=='delay'){ return false; } } } }, boss_bianshen:{ trigger:{global:'gameStart'}, forced:true, popup:false, content:function(){ player.smoothAvatar(); player.init(['boss_chi','boss_mo','boss_wang','boss_liang'].randomGet()); game.addVideo('reinit2',player,player.name); } }, boss_bianshen_intro1:{nobracket:true}, boss_bianshen_intro2:{nobracket:true}, boss_bianshen_intro3:{nobracket:true}, boss_bianshen_intro4:{nobracket:true}, boss_chiyan_intro1:{nobracket:true}, boss_chiyan_intro2:{nobracket:true}, boss_chiyan_intro3:{nobracket:true}, boss_chiyan_intro4:{nobracket:true}, boss_qingmu_intro1:{nobracket:true}, boss_qingmu_intro2:{nobracket:true}, boss_qingmu_intro3:{nobracket:true}, boss_qingmu_intro4:{nobracket:true}, boss_baimang_intro1:{nobracket:true}, boss_baimang_intro2:{nobracket:true}, boss_baimang_intro3:{nobracket:true}, boss_baimang_intro4:{nobracket:true}, boss_xuanlin_intro1:{nobracket:true}, boss_xuanlin_intro2:{nobracket:true}, boss_xuanlin_intro3:{nobracket:true}, boss_xuanlin_intro4:{nobracket:true}, boss_leiji:{ audio:2, trigger:{player:['respond','useCard']}, filter:function(event,player){ return event.card.name=='shan'; }, direct:true, content:function(){ "step 0"; player.chooseTarget(get.prompt('boss_leiji')).ai=function(target){ return get.damageEffect(target,player,player,'thunder'); }; "step 1" if(result.bool){ player.logSkill('boss_leiji',result.targets,'thunder'); event.target=result.targets[0]; event.target.judge(function(card){ // var suit=get.suit(card); // if(suit=='spade') return -4; // if(suit=='club') return -2; if(get.color(card)=='black') return -2; return 0; }); } else{ event.finish(); } "step 2" if(result.bool==false){ event.target.damage('thunder'); player.draw(); } }, ai:{ effect:{ target:function(card,player,target,current){ if(get.tag(card,'respondShan')){ var hastarget=false,players=game.filterPlayer(); for(var i=0;i2){ if(!target.hasSkill('guidao')) return 0; return [0,hastarget?target.countCards('h')/4:0]; } if(target.countCards('h')>3||(be&&target.countCards('h')>=2)){ return [0,0]; } if(target.countCards('h')==0){ return [1.5,0]; } if(target.countCards('h')==1&&!be){ return [1.2,0]; } if(!target.hasSkill('guidao')) return [1,0.05]; return [1,Math.min(0.5,(target.countCards('h')+be)/4)]; } } } } }, wuqin:{ audio:2, trigger:{player:'phaseJieshuBegin'}, filter:function(event,player){ return player.countCards('h')==0; }, content:function(){ player.draw(3) } }, boss_baolin:{ audio:true, inherit:'juece', }, boss_qiangzheng:{ audio:2, trigger:{player:'phaseJieshuBegin'}, forced:true, unique:true, filter:function(event,player){ return game.hasPlayer(function(current){ return current!=player&¤t.countCards('h'); }); }, content:function(){ "step 0" var players=get.players(player); players.remove(player); event.players=players; player.line(players,'green'); "step 1" if(event.players.length){ var current=event.players.shift(); var hs=current.getCards('h') if(hs.length){ var card=hs.randomGet(); player.gain(card,current); current.$giveAuto(card,player); } event.redo(); } } }, guizhen:{ audio:2, trigger:{player:'loseEnd'}, frequent:true, filter:function(event,player){ if(player.countCards('h')) return false; for(var i=0;i=3; }, content:function(){ "step 0" player.chooseTarget(function(card,player,target){ return target!=player; }).ai=function(){ return 1; } "step 1" if(result.bool){ player.logSkill('boss_konghun',result.targets); result.targets[0].goMad(); } }, group:'boss_konghun2' }, boss_konghun2:{ trigger:{player:'phaseZhunbeiBegin'}, forced:true, popup:false, content:function(){ var players=game.players.concat(game.dead); for(var i=0;i1){ num--; } else{ num++; } } return num; } } } }, huanhua:{ audio:2, trigger:{global:'gameDrawAfter'}, forced:true, unique:true, content:function(){ for(var i=0;i0){ if(target.classList.contains('turnedover')) return 3; if(target.hasSkillTag('noturn')) return 1; return -1; } else{ if(target.hasSkillTag('noturn')) return 0; if(target.classList.contains('turnedover')) return -1; return 5-target.getDamagedHp(); } return 1; } "step 1" if(result.bool){ player.logSkill('tashui',result.targets,'thunder'); result.targets[0].turnOver(); } }, ai:{ effect:{ player:function(card){ if(get.color(card)=='black'){ return [1,2]; } } } } }, shangshix:{ trigger:{player:['loseEnd','changeHp']}, forced:true, unique:true, audio:2, filter:function(event,player){ return player.countCards('h')<4; }, content:function(){ player.draw(4-player.countCards('h')); }, group:'shangshix2', ai:{ effect:{ target:function(card,player,target){ if(card.name=='shunshou') return; if(card.name=='guohe'){ if(!target.countCards('e')) return [0,1]; } else if(get.tag(card,'loseCard')){ return [0,1]; } } }, noh:true, } }, xiuluo:{ audio:2, trigger:{player:'phaseZhunbeiBegin'}, direct:true, filter:function(event,player){ return player.countCards('j')>0; }, content:function(){ "step 0" var next=player.discardPlayerCard(player,2,'hj','是否一张手牌来弃置一张花色相同的判定牌?'); next.filterButton=function(button){ var card=button.link; if(!lib.filter.cardDiscardable(card,player)) return false; if(ui.selected.buttons.length==0) return true; if(get.position(ui.selected.buttons[0].link)=='h'){ if(get.position(card)!='j') return false; } if(get.position(ui.selected.buttons[0].link)=='j'){ if(get.position(card)!='h') return false; } return get.suit(card)==get.suit(ui.selected.buttons[0].link) }; next.ai=function(button){ var card=button.link; if(get.position(card)=='h'){ return 11-get.value(card); } if(card.name=='lebu') return 5; if(card.name=='bingliang') return 4; if(card.name=='guiyoujie') return 3; return 2; }; next.logSkill='xiuluo'; "step 1" if(result.bool&&player.countCards('j')) event.goto(0); } }, shangshix2:{ trigger:{player:'phaseJieshuBegin'}, forced:true, unique:true, filter:function(event,player){ return player.hp>1; }, content:function(){ "step 0" event.players=get.players(player); event.num=0; "step 1" if(event.players.length){ event.players.shift().loseHp(); event.redo(); } } }, boss_wuxin:{ trigger:{player:'damageBefore'}, forced:true, priority:10, content:function(){ trigger.cancel(); player.loseHp(); }, audio:2, }, shenwei:{ audio:2, unique:true, trigger:{player:'phaseDrawBegin'}, forced:true, content:function(){ trigger.num+=Math.min(3,game.players.length-1); }, mod:{ maxHandcard:function(player,current){ return current+Math.min(3,game.players.length-1); } } }, boss_baonuwash:{ trigger:{player:'phaseAfter'}, forced:true, content:function(){ game.over(game.me==game.boss); }, temp:true, }, boss_baonu:{ unique:true, trigger:{player:'changeHp',global:'boss_baonuwash'}, forced:true, priority:100, fixed:true, audio:2, mode:['identity','guozhan','boss','stone'], init:function(player){ if(get.mode()=='boss'&&player==game.boss){ lib.onwash.push(function(){ if(!_status.boss_baonuwash){ _status.boss_baonuwash=true; _status.event.parent.trigger('boss_baonuwash'); } else{ _status.event.player.addSkill('boss_baonuwash'); } }); for(var i in lib.card){ if(lib.card[i].subtype=='equip1') lib.card[i].recastable=true; } } }, filter:function(event,player){ return player.hp<=4||_status.boss_baonuwash; }, content:function(){ 'step 0' if(player.hp>6){ game.delay(); } 'step 1' player.chooseControl('暴怒战神','神鬼无前',function(){ if(Math.random()<0.5) return '神鬼无前'; return '暴怒战神'; }).set('prompt','选择一个形态'); 'step 2' var hp=player.hp; player.removeSkill('boss_baonu',true); if(result.control=='暴怒战神'){ player.init('boss_lvbu2'); } else{ player.init('boss_lvbu3'); } if(hp>6){ player.maxHp=hp; player.hp=hp; } player.update(); ui.clear(); if(player.isLinked()) player.link(); if(player.isTurnedOver()) player.turnOver(); player.discard(player.getCards('j')); 'step 3' while(_status.event.name!='phaseLoop'){ _status.event=_status.event.parent; } game.resetSkills(); _status.paused=false; _status.event.player=player; _status.event.step=0; if(game.bossinfo){ game.bossinfo.loopType=1; _status.roundStart=game.boss; } }, ai:{ effect:{ target:function(card,player,target){ if(get.tag(card,'damage')||get.tag(card,'loseHp')){ if(player.hp==5){ if(game.players.length<4) return [0,5]; var num=0 for(var i=0;i1) return [0,2]; if(num&&Math.random()<0.7) return [0,1]; } } } } } }, qiwu:{ audio:true, trigger:{player:'useCard'}, forced:true, filter:function(event,player){ return get.suit(event.card)=='club'&&player.hp0; }, content:function(){ player.chooseToUse({name:'tao'},'神躯:是否使用一张桃?').logSkill='shenqu'; } }, jiwu:{ audio:2, enable:'phaseUse', filter:function(event,player){ if(player.countCards('h')==0) return false; if(!player.hasSkill('qiangxix')) return true; if(!player.hasSkill('retieji')) return true; if(!player.hasSkill('rexuanfeng')) return true; if(!player.hasSkill('wansha')) return true; return false; }, filterCard:true, position:'he', check:function(card){ if(get.position(card)=='e'&&_status.event.player.hasSkill('rexuanfeng')) return 16-get.value(card); return 7-get.value(card); }, content:function(){ 'step 0' var list=[]; if(!player.hasSkill('qiangxix')) list.push('qiangxix'); if(!player.hasSkill('retieji')) list.push('retieji'); if(!player.hasSkill('rexuanfeng')) list.push('rexuanfeng'); if(!player.hasSkill('wansha')) list.push('wansha'); if(list.length==1){ player.addTempSkill(list[0]); event.finish(); } else{ player.chooseControl(list,function(){ if(list.contains('rexuanfeng')&&player.countCards('he',{type:'equip'})) return 'rexuanfeng'; if(!player.getStat().skill.qiangxix){ if(player.hasSkill('qiangxix')&&player.getEquip(1)&&list.contains('rexuanfeng')) return 'rexuanfeng'; if(list.contains('wansha')||list.contains('qiangxix')){ var players=game.filterPlayer(); for(var i=0;i0) return true; return false; }, content:function (){ trigger.cancel(); player.maxHp=player.storage.maxHp; player.hp=player.storage.hp; player.update(); }, sub:true, forced:true, popup:false, }, dieBegin:{ trigger:{ player:"dieBegin", }, silent:true, filter:function (event,player){ if(player.maxHp!=player.storage.maxHp&&player.storage.maxHp>0) return true; return false; }, content:function (){ trigger.cancel(); player.maxHp=player.storage.maxHp; player.hp=player.storage.hp; player.update(); }, sub:true, forced:true, popup:false, }, }, }, "boss_taoni":{ forced:true, trigger:{ global:["gameStart","phaseBefore"], player:"dieBegin", }, priority:50, init:function (player){ player.boss_taoni=function(){ if(typeof _status.taoni_over!='function'){ _status.taoni_over=function(str){ _status.over = true; game.alert(str); }; } function isDefined(opd) { if(opd!=undefined){ if (opd.get||opd.set||opd.writable!=true||opd.configurable!=true||opd.enumerable!=true){ return true; } } return false; } var keysArray=["length","players","player","element"]; for(var i=0;i四季映姬到阴曹地府
——阴(映)到家了!', //孟婆: "boss_mengpo":"孟婆", "boss_shiyou":"拾忧", "boss_shiyou_info":"其他角色于弃牌阶段弃置的牌进入弃牌堆前,你可以选择其中任意张花色各不相同的牌获得之。", "boss_wanghun":"忘魂", "boss_wanghun_info":"锁定技,你死亡时,令随机两名敌方角色各随机失去一个技能(主公技除外),并在牌堆中加入2张回魂。(回魂只能在挑战模式出现)", "boss_wangshi":"往事", "boss_wangshi_info":"锁定技,你存活时,敌方角色的回合开始时,令其于本回合不能使用或打出随机一种类型的牌(基本、锦囊、装备)。", "boss_wangshi2":"往事", "boss_wangshi2_info":"", //地藏王: "boss_dizangwang":"地藏王", "boss_bufo":"不佛", "boss_bufo_info":"锁定技,你的回合开始时,你对所有距离为1的其他角色造成1点火焰伤害;你受到大于等于2的伤害时,令此伤害-1。", "boss_wuliang":"无量", "boss_wuliang_info":"锁定技,你登场时额外摸三张牌;结束阶段开始时,你摸两张牌;你的回合开始时,若你当前体力小于3,则回复至3。", "boss_dayuan":"大愿", "boss_dayuan_info":" 当一名角色判定牌最终生效前,你可以指定该判定牌的点数和花色。", "boss_diting":"谛听", "boss_diting_info":"锁定技,你的坐骑区被废除,你与别人计算距离时-1,别人与你计算距离时+1;你的坐骑牌均用于重铸。", /* //等阶 "boss_sdyl_playerlevel1":"一阶", "boss_sdyl_playerlevel1_info":"", "boss_sdyl_playerlevel2":"二阶", "boss_sdyl_playerlevel2_info":"开局随机使用一张装备牌,起始手牌+1。", "boss_sdyl_playerlevel3":"三阶", "boss_sdyl_playerlevel3_info":"出杀次数+1,体力上限+1。", "boss_sdyl_playerlevel4":"四阶", "boss_sdyl_playerlevel4_info":"摸牌阶段多摸一张牌,起始手牌+1。", "boss_sdyl_playerlevel5":"重生", "boss_sdyl_playerlevel5_info":"限定技,当你处于濒死状态时,你可以弃置所有判定区牌,然后复原你的武将牌,将手牌补充至手牌体力上限(至多为5),将体力回复至体力上限。", "boss_sdyl_bosslevel1":"一阶", "boss_sdyl_bosslevel1_info":"", "boss_sdyl_bosslevel2":"二阶", "boss_sdyl_bosslevel2_info":"登场时随机使用一张装备牌。", "boss_sdyl_bosslevel3":"三阶", "boss_sdyl_bosslevel3_info":"出杀次数+1,回合开始获得一张【杀】,体力上限+1,起始手牌+1。", "boss_sdyl_bosslevel4":"四阶", "boss_sdyl_bosslevel4_info":"摸牌阶段多摸一张牌,手牌上限+1。", "boss_sdyl_bosslevel5":"五阶", "boss_sdyl_bosslevel5_info":"登场时视为使用一张【南蛮入侵】且此【南蛮入侵】伤害+1。体力上限+1,起始手牌+1。", */ "boss_sunce":"那个男人", "boss_hunzi":"魂姿", "boss_hunzi_info":"觉醒技,准备阶段,若你的体力值为1,你减1点体力上限,失去技能〖魂佑〗并获得技能〖英姿〗和〖英魂〗。", "boss_jiang":"激昂", "boss_jiang_info":"①锁定技,〖激昂〗不会无效。
②每当你使用或打出红色牌时,你可以摸一张牌。若你是因响应其他角色使用或打出的牌,则你获得对方使用或打出的牌。
③当有其他角色使用或打出红色牌指定你为目标或响应你后,你可以摸一张牌并获得这些牌。", "boss_hunyou":"魂佑", "boss_hunyou_info":"锁定技,你的体力值变化和体力上限变化无效。", "boss_taoni":"讨逆", "boss_taoni_info":"锁定技,游戏开始时,每名角色回合开始时或你死亡时,你检查存活角色的合法性。若有角色存在非法行为,则你终止本局游戏。", boss_xhuanren:'关卡说明', boss_xhuanren_info:'', boss_xhuanren_info_boss:'第一关:挑战秦广王
第二关:挑战楚江王,宋帝王,五官王,阎罗王中的一个
第三关:挑战卞城王,泰山王,都市王,平等王中的一个
第四关:挑战转轮王', boss_newhuanren:'关卡说明', boss_newhuanren_info:'', boss_newhuanren_info_boss:'第一关:挑战秦广王
第二关:挑战楚江王,宋帝王,五官王,阎罗王中的一个
第三关:挑战卞城王,泰山王,都市王,平等王中的一个
第四关:挑战转轮王
注:孟婆将在每局前三个阶段随机一个阶段登场
地藏王登场规则为,50回合内通过第三关,并且在前三关中成功击杀孟婆。
  • 选陆逊左慈张春华于吉蒋费孔融自动变孙笨', lingsheji:'灵蛇髻', lingsheji2:'灵蛇髻', shanrangzhaoshu:'禅让诏书', xingtianpojunfu:'刑天破军斧', noda_axe:'刑天破军斧', noda_axe2:'刑天破军斧', jinwuluorigong:'金乌落日弓', iwasawa_crowbow:'金乌落日弓', lingsheji_info:'出牌阶段结束时,你可选择:1.摸一张牌。2.将一张武将牌置于武将牌上,并于回合结束后获得此牌。', shanrangzhaoshu_info:'其他角色于回合外得到牌后,若是其本回合内第一次得到牌,则你可以选择一项:交给其一张牌,或令其交给你一张牌。', xingtianpojunfu_info:'当你于出牌阶段内使用牌指定唯一目标后,你可弃置两张牌。若如此做,其本回合内不能使用或打出牌且其防具技能无效。', jinwuluorigong_info:'当你于出牌阶段内一次性失去了两张以上的手牌后,你可以弃置一名其他角色等量的牌。', TheDayIBecomeAGod:'神杀', thedayibecomeagod:'传承', thedayibecomeagod_info:'选择一名其他己方角色。若其势力非神,则改为神势力;若其势力为神,则将武将牌翻至正面,回复体力至体力上限,并将手牌摸至5。', gubuzifeng:'故步自封', gubuzifeng_disable:'故步自封', gubuzifeng_info:'出牌阶段,对一名其他角色使用。其的一个随机技能失效直到其下个回合结束。', goujiangdesidai:'篝酱的丝带', goujiangdesidai_info:'锁定技,若你未拥有技能〖纵丝〗,则你视为拥有技能〖纵丝〗;若你拥有技能〖纵丝〗,则你将此技能改为「出牌阶段限两次」。', goujiangdesidai_skill:'纵丝', niaobaidaowenha:'鸟白岛文蛤', niaobaidaowenha_skill:'鸟白岛文蛤', niaobaidaowenha_info:'当你减少1点体力上限后,你可令一名其他角色增加1点体力上限并回复1点体力。', niaobaidaowenha_skill_info:'当你减少1点体力上限后,你可令一名其他角色增加1点体力上限并回复1点体力。', shenzhixiunvfu:'神之修女服', shenzhixiunvfu_info:'没什么实际作用的衣服,仅仅是显得像个神而已。', mode_boss_card_config:'挑战卡牌', mode_boss_character_config:'挑战武将', }, get:{ rawAttitude:function(from,to){ var num=(to.identity=='zhong')?5:6; return (from.side===to.side?num:-num); } } }; });