'use strict'; mode.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.skill){ if(lib.skill[i].changeSeat){ lib.skill[i]={}; if(lib.translate[i+'_info']){ lib.translate[i+'_info']='此模式下不可用'; } } } lib.init.css(lib.assetURL+'layout/mode','boss'); game.delay(0.1); "step 1" var bosslist=ui.create.div('#bosslist.hidden'); if(lib.config.player_border!='wide'){ bosslist.classList.add('slim'); } event.bosslist=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')&&get.config(i+'_boss_config')){ var cfg=i+'_bossconfig'; if(get.config(cfg)==undefined){ game.saveConfig(cfg,true,true); } lib.translate[cfg+'_config']=lib.translate[i]; lib.config.current_mode.push([cfg,get.config(cfg),toggleBoss]); lib.mode.boss.config[cfg]={ name:get.translation(i), onclick:toggleBoss, init:true, } var player=ui.create.player(bosslist).init(i); 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(!get.config(cfg)){ player.style.display='none'; } } } if(!list.length){ alert('挑战模式不可隐藏boss武将包,请在选项-其它中选择“重置隐藏扩展包”'); event.finish(); _status.over=true; return; } if(!event.current){ event.current=bosslist.childNodes[1]; event.current.classList.add('highlight'); } ui.create.div(bosslist); lib.translate.boss_pangtong='涅槃凤雏'; ui.create.cards(); game.finishCards(); 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='剩余'+get.cnNumber(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); ui.refresh(boss); boss.classList.remove('highlight'); boss.classList.remove('bossplayer'); boss.style.left=''; boss.style.top=''; boss.style.position=''; setTimeout(function(){ boss.node.equips.style.opacity=''; },500); event.bosslist.delete(); game.arrangePlayers(); for(var i=0;i0){ if(player.hp0?player.node.handcards1:player.node.handcards2; card.fix(); card.animate('start'); position.insertBefore(card,position.firstChild); player.$draw(); game.log(player,'摸了一张牌'); } 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){ 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; } } 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){ game.swapControl(player); game.onSwapControl(); }, chooseCharacter:function(func){ var next=game.createEvent('chooseCharacter',false); 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('withbg'); // dialog.add('0/3'); dialog.add([list.slice(0,20),'character']); dialog.noopen=true; var next=game.me.chooseButton(dialog,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; }; event.dialogxx=ui.create.characterDialog(); event.dialogxx.classList.add('bosscharacter'); event.dialogxx.classList.add('withbg'); event.dialogxx.classList.add('fixed'); 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.style.opacity=1; } } 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.style.opacity=0.6; } } }); 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;i0; }, 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=ai.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.num('h')>0; }, selectTarget:2, multitarget:true, multiline:true, filter:function(event,player){ return player.num('h')>0; }, prepare:'throw', discard:false, filterCard:true, check:function(card){ return 6-ai.get.value(card); }, content:function(){ "step 0" if(targets[0].num('h')&&targets[1].num('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-ai.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:'damageBegin'}, 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'}, 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'}, 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.num('h','shan'); var hs=target.num('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:'phaseBegin'}, 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'}, 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.num('h','shan'); var hs=target.num('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:'useCardToBegin'}, 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:'phaseBegin'}, forced:true, filter:function(event,player){ return event.player!=player&&event.player.num('he')>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.num('h')>1; } break; } case 'e':{ if(ui.selected.cards.length){ return get.position(ui.selected.cards[0])=='h'; } else{ return trigger.player.num('e')>1; } break; } } }); var num=0; if(trigger.player.num('h')>1){ num++; } if(trigger.player.num('e')>1){ num++; } next.selectCard=[num,num]; next.ai=function(card){ return ai.get.value(card); }; 'step 1' if(result.bool){ var he=[]; var hs=trigger.player.get('h'); var es=trigger.player.get('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:'damageBegin'}, 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:'phaseBegin'}, 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.untrigger(); trigger.finish(); } }, end:{ trigger:{player:'phaseEnd'}, 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, 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'}, forced:true, popup:false, 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'], global:'boss_bianshen2x' }, boss_bianshen2x:{ trigger:{global:'dieAfter'}, forced:true, priority:-10, 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' }, boss_bianshen3x:{ trigger:{global:'dieAfter'}, forced:true, priority:-10, 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' }, boss_bianshen4x:{ trigger:{global:'dieAfter'}, forced:true, priority:-10, 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 ai.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 ai.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'}, forced:true, priority:6, filter:function(event,player){ if(player.get('e','2')) return false; if(event.player.num('s','unequip')) return false; if(event.card.name=='nanman') return true; if(event.card.name=='wanjian') return true; if(event.card.name=='sha'&&!event.card.nature) return true; }, content:function(){ trigger.untrigger(); trigger.finish(); }, ai:{ effect:{ target:function(card,player,target,current){ if(target.get('e','2')) return; if(player.num('s','unequip')) return; if(card.name=='nanman'||card.name=='wanjian') return 0; if(card.name=='sha'){ var equip1=player.get('e','1'); if(equip1&&equip1.name=='zhuque') return 2; if(equip1&&equip1.name=='qinggang') return 1; if(!card.nature) return 0; } } } } }, boss_manjia2:{ trigger:{player:'damageBegin'}, filter:function(event,player){ if(player.get('e','2')) return false; if(event.nature=='fire') return true; }, forced:true, check:function(){ return false; }, content:function(){ trigger.num++; }, ai:{ effect:{ target:function(card,player,target,current){ if(target.get('e','2')) return; if(card.name=='sha'){ if(card.nature=='fire'||player.hasSkill('zhuque_skill')) return 2; } if(get.tag(card,'fireDamage')&¤t<0) return 2; } } } }, boss_lianyu:{ trigger:{player:'phaseEnd'}, 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.get('j').randomGet()); }, filter:function(event ,player){ return player.num('j')>0; }, ai:{ effect:{ target:function(card,player,target,current){ if(get.type(card)=='delay'&&target.num('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); 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.players.slice(0),event.parent.parent); } } }, boss_guihuo:{ trigger:{player:'phaseEnd'}, direct:true, content:function(){ "step 0" player.chooseTarget(get.prompt('boss_guihuo'),function(card,player,target){ return player!=target; }).ai=function(target){ return ai.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:'phaseBegin'}, direct:true, content:function(){ "step 0" player.chooseTarget(get.prompt('boss_luolei'),function(card,player,target){ return player!=target; }).ai=function(target){ return ai.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.get('h')); }, ai:{ threaten:0.7 } }, boss_shanbeng:{ global:'boss_shanbeng2', trigger:{player:'dieBegin'}, forced:true, logv:false, content:function(){ var targets=[]; for(var i=0;i0&&event.player.hasSkill('boss_shanbeng')&&event.player.isDead(); }, content:function(){ player.discard(player.get('e')); } }, boss_didong:{ trigger:{player:'phaseEnd'}, 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=ai.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.init(['boss_chi','boss_mo','boss_wang','boss_liang'].randomGet()); game.addVideo('reinit2',player,player.name); } }, zhanjiang:{ trigger:{player:'phaseBegin'}, filter:function(event,player){ for(var i=0;i2){ if(!target.hasSkill('guidao')) return 0; return [0,hastarget?target.num('h')/4:0]; } if(target.num('h')>3||(be&&target.num('h')>=2)){ return [0,0]; } if(target.num('h')==0){ return [1.5,0]; } if(target.num('h')==1&&!be){ return [1.2,0]; } if(!target.hasSkill('guidao')) return [1,0.05]; return [1,Math.min(0.5,(target.num('h')+be)/4)]; } } } } }, wuqin:{ audio:2, trigger:{player:'phaseEnd'}, filter:function(event,player){ return player.num('h')==0; }, content:function(){ player.draw(3) } }, boss_baolin:{ audio:true, inherit:'juece', }, boss_qiangzheng:{ audio:2, trigger:{player:'phaseEnd'}, forced:true, unique:true, filter:function(event,player){ 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:'phaseBegin'}, 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; }, content:function(){ "step 0" player.chooseToDiscard(2,'hj',function(card){ if(ui.selected.cards.length==0) return true; if(get.position(ui.selected.cards[0])=='h'){ if(get.position(card)!='j') return false; } if(get.position(ui.selected.cards[0])=='j'){ if(get.position(card)!='h') return false; } return get.suit(card)==get.suit(ui.selected.cards[0]) },'是否一张手牌来弃置一张花色相同的判定牌?').ai=function(card){ if(get.position(card)=='h'){ return 11-ai.get.value(card); } if(card.name=='lebu') return 5; if(card.name=='bingliang') return 4; if(card.name=='guiyoujie') return 3; return 2; } "step 1" if(result.bool){ player.logSkill('xiuluo'); } } }, shangshix2:{ trigger:{player:'phaseEnd'}, 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(); } } }, wuxin:{ inherit:'miles_xueyi', group:'swd_wuxie', audio:2, }, shenwei:{ audio:2, unique:true, trigger:{player:'phaseDrawBegin'}, forced:true, content:function(){ trigger.num+=3; }, mod:{ maxHandcard:function(player,current){ return current+3; } } }, shenji:{ unique:true, mod:{ selectTarget:function(card,player,range){ if(range[1]==-1) return; if(player.get('e','1')) return; if(card.name=='sha') range[1]+=2; }, cardUsable:function(card,player,num){ if(player.get('e','1')) return; if(card.name=='sha') return num+1; } }, ai:{ effect:{ target:function(card,player,target,current){ if(get.subtype(card)=='equip1') return -1; } } } }, boss_baonuwash:{ trigger:{player:'phaseAfter'}, forced:true, content:function(){ game.over(game.me==game.boss); }, temp:true, }, boss_baonu:{ unique:true, group:'boss_baonu2', trigger:{player:'changeHp',global:'boss_baonuwash'}, forced:true, priority:100, audio:2, mode:['identity','guozhan','boss','stone'], init:function(){ if(get.mode()=='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].chongzhu=true; } } }, filter:function(event,player){ return player.hp<=4||_status.boss_baonuwash; }, content:function(){ 'step 0' if(player.hp>4){ game.delay(); } 'step 1' player.chooseControl('暴怒战神','神鬼无前',function(){ if(Math.random()<0.5) return '神鬼无前'; return '暴怒战神'; }).set('prompt','选择一个形态'); 'step 2' var hp=player.hp; if(result.control=='暴怒战神'){ player.init('boss_lvbu2'); } else{ player.init('boss_lvbu3'); } if(hp>4){ player.maxHp=hp; player.hp=hp; } player.update(); ui.clear(); if(player.isLinked()) player.link(); if(player.isTurnedOver()) player.turnOver(); player.discard(player.get('ej')); 'step 3' while(_status.event.name!='phaseLoop'){ _status.event=_status.event.parent; } for(var i=0;i1) return [0,2]; if(num&&Math.random()<0.7) return [0,1]; } } } } } }, boss_baonu2:{ trigger:{player:'gameDrawBegin'}, forced:true, popup:false, content:function(){ player.draw(4,false); } }, 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:{ enable:'phaseUse', filter:function(event,player){ if(player.num('h')==0) return false; if(!player.hasSkill('qiangxi')) return true; if(!player.hasSkill('lieren')) return true; if(!player.hasSkill('xuanfeng')) return true; if(!player.hasSkill('wansha')) return true; return false; }, filterCard:true, check:function(card){ return 7-ai.get.value(card); }, content:function(){ 'step 0' var list=[]; if(!player.hasSkill('qiangxi')) list.push('qiangxi'); if(!player.hasSkill('lieren')) list.push('lieren'); if(!player.hasSkill('xuanfeng')) list.push('xuanfeng'); if(!player.hasSkill('wansha')) list.push('wansha'); if(list.length==1){ player.addTempSkill(list[0],'phaseAfter'); event.finish(); } else{ player.chooseControl(list,function(){ if(!player.getStat().skill.qiangxi){ if(player.hasSkill('qiangxi')&&player.get('e','1')&&list.contains('xuanfeng')) return 'xuanfeng'; if(list.contains('wansha')||list.contains('qiangxi')){ for(var i=0;i=3) return 1; return 0; } } } } }, translate:{ zhu:'神', cai:'盟', boss_chi:'魑', boss_mo:'魅', boss_wang:'魍', boss_liang:'魉', boss_niutou:'牛头', boss_mamian:'马面', boss_baiwuchang:'白无常', boss_heiwuchang:'黑无常', boss_luocha:'罗刹', boss_yecha:'夜叉', boss_zhuoguiquxie:'捉鬼驱邪', boss_nianshou:'年兽', boss_nianshou_heti:'合体年兽', boss_nianshou_jingjue:'警觉年兽', boss_nianshou_renxing:'任性年兽', boss_nianshou_baonu:'暴怒年兽', boss_nianshou_ruizhi:'睿智年兽', boss_shuijing:'水镜先生', boss_huangyueying:'奇智女杰', boss_zhangchunhua:'冷血皇后', boss_satan:'堕落天使', boss_dongzhuo:'乱世魔王', boss_lvbu1:'最强神话', boss_lvbu2:'暴怒战神', boss_lvbu3:'神鬼无前', boss_zhouyu:'赤壁火神', boss_pangtong:'涅盘凤雏', boss_zhugeliang:'祭风卧龙', boss_zhangjiao:'天公将军', boss_zuoci:'迷之仙人', boss_yuji:'琅琊道士', boss_liubei:'蜀汉烈帝', boss_caiwenji:'异乡孤女', boss_huatuo:'药坛圣手', boss_luxun:'蹁跹君子', boss_zhenji:'洛水仙子', boss_diaochan:'绝代妖姬', boss_zhaoyun:'高达一号', boss_guojia:'世之奇士', boss_caocao:'魏武大帝', jiaoxia:'皎霞', jiaoxia_info:'每当你成为红色牌的目标,你可以摸一张牌', lingbo:'凌波', lingbo_info:'每当你使用或打出一张闪,你可以摸两张牌', tiandao:'天道', tiandao_info:'任意一名角色的判定生效前,你可以打出一张牌替换之', yunshen:'云身', yunshen2:'云身', yunshen_info:'每当你打出一张闪,你可以令其他角色与你的距离+1;回合开始阶段,你将累计的防御距离清零,然后摸等量的牌', lianji:'连计', lianji_info:'出牌阶段限一次,你可以选择一张手牌并指定两名角色进行拼点,拼点赢的角色获得此牌,并对没赢的角色造成一点伤害', mazui:'麻醉', mazui2:'麻醉', mazui_info:'出牌阶段限一次,你可以将一张黑色手牌置于一名角色的武将牌上,该角色造成的下一次伤害-1,然后获得此牌', boss_nbianshen:'变形', boss_nbianshenx:'变形', boss_nbianshenx_info:'你从第二轮开始,每一轮幻化为警觉、任性、睿智、暴怒四种随机状态中的一种', boss_mengtai:'萌态', boss_mengtai_info:'锁定技,若你的出牌阶段被跳过,你跳过本回合的弃牌阶段;若你的摸牌阶段被跳过,结束阶段开始时,你摸三张牌', boss_ruizhi:'睿智', boss_ruizhi_info:'锁定技,其他角色的准备阶段开始时,其选择一张手牌和一张装备区里的牌,然后弃置其余的牌', boss_jingjue:'警觉', boss_jingjue_info:'每当你于回合外失去牌时,你可以进行一次判定,若结果为红色,你回复1点体力', // boss_jingjue_info:'锁定技,当你因弃置而失去牌后,你回复1点体力', boss_renxing:'任性', boss_renxing_info:'锁定技,你的回合外,一名角色受到1点伤害后或回复1点体力时,你摸一张牌', boss_nbaonu:'暴怒', boss_nbaonu_info:'锁定技,摸牌阶段,你改为摸X张牌(X为4到你体力值间的随机数);若你的体力值小于5,则你使用【杀】造成的伤害+1且无次数限制', boss_shouyi:'兽裔', boss_shouyi_info:'锁定技,你使用牌无距离限制', boss_nianrui:'年瑞', boss_nianrui_info:'锁定技,摸牌阶段,你额外摸两张牌', boss_qixiang:'祺祥', boss_qixiang1:'祺祥', boss_qixiang2:'祺祥', boss_qixiang_info:'乐不思蜀判定时,你的方块判定牌视为红桃;兵粮寸断判定时,你的黑桃判定牌视为草花', qiwu:'栖梧', qiwu_info:'锁定技。每当你使用一张梅花牌,你回复一点体力', jizhen:'激阵', jizhen_info:'结束阶段,你可以令所至多两名已受伤角色摸一张牌', boss_yushou:'驭兽', boss_yushou_info:'出牌阶段开始时,你可以对所有敌方角色使用一张南蛮入侵', boss_moyany:'魔炎', boss_moyany_info:'每当你于回合外失去牌时,你可以进行一次判定,若结果为红色,你对一名其他角色造成2点火焰伤害', boss_modao:'魔道', boss_modao_info:'锁定技,准备阶段,你摸两张牌', boss_mojian:'魔箭', boss_mojian_info:'出牌阶段开始时,你可以对所有敌方角色使用一张万箭齐发', boss_danshu:'丹术', boss_danshu_info:'每当你于回合外失去牌时,你可以进行一次判定,若结果为红色,你回复1点体力', boss_zuijiu:'醉酒', boss_zuijiu_info:'锁定技,你的【杀】额外造成1点伤害', boss_taiping:'太平', boss_taiping_info:'锁定技,摸牌阶段摸牌时,你的摸牌数量+2', boss_suoming:'索命', boss_suoming_info:'结束阶段,将任意名未被横置的其他角色的武将牌横置', boss_xixing:'吸星', boss_xixing_info:'准备阶段,对任意一名横置的其他角色造成1点雷电伤害,然后回复1点体力', boss_baolian:'暴敛', boss_baolian_info:'锁定技,结束阶段,你摸两张牌', boss_manjia:'蛮甲', boss_manjia_info:'锁定技,若你的装备区内没有防具牌,则你视为装备了[藤甲]', boss_xiaoshou:'枭首', boss_xiaoshou_info:'结束阶段,对体力不小于你的一名其他角色造成3点伤害', boss_guiji:'诡计', boss_guiji_info:'锁定技,准备阶段结束时,若你的判定区内有牌,你随机弃置其中一张牌', boss_lianyu:'炼狱', boss_lianyu_info:'结束阶段,你可以对所有敌方角色造成1点火焰伤害', boss_guihuo:'鬼火', boss_guihuo_info:'结束阶段,你可以对一名其他角色造成1点火焰伤害', boss_minbao:'冥爆', boss_minbao_info:'锁定技,当你死亡时,对场上所有其他角色造成1点火焰伤害', boss_luolei:'落雷', boss_luolei_info:'准备阶段,你可以对一名其他角色造成1点雷电伤害', boss_beiming:'悲鸣', boss_beiming_info:'锁定技,当你死亡时,你令杀死你的角色弃置所有手牌', boss_guimei:'鬼魅', boss_guimei_info:'锁定技,你不能成为延时类锦囊的目标', boss_didong:'地动', boss_didong_info:'结束阶段,你可以选择一名敌方角色将其武将牌翻面', boss_shanbeng:'山崩', boss_shanbeng_info:'锁定技,当你死亡时,你令所有其他角色弃置其装备区内的所有牌', boss_bianshen:'出场', boss_bianshen_info:'游戏开始时,你随机变身为魑、魅、魍、魉中的一个', boss_bianshen2:'后援', boss_bianshen2_info:'你死亡后,随机召唤牛头、马面中的一个', boss_bianshen3:'后援', boss_bianshen3_info:'你死亡后,随机召唤白无常、黑无常中的一个', boss_bianshen4:'后援', boss_bianshen4_info:'你死亡后,随机召唤罗刹、夜叉中的一个', zhanjiang:'斩将', zhanjiang_info:'准备阶段开始时,如果其他角色的装备区内有【青釭剑】,你可以获得之', boss_qiangzheng:'强征', boss_qiangzheng_info:'锁定技,回合结束阶段,你获得每个敌方角色的一张手牌', boss_baolin:'暴凌', guizhen:'归真', guizhen_info:'每当你失去最后一张手牌,你可以所有敌人失去全部手牌,没有手牌的角色失去一点体力(不触发技能)', boss_shengshou:'圣手', boss_shengshou_info:'每当你使用一张牌,你可以进行一次判定,若为红色,你回复一点体力', wuqin:'五禽戏', wuqin_info:'回合结束阶段,若你没有手牌,可以摸三张牌', boss_konghun:'控心', boss_konghun_info:'回合结束阶段,你可以指定一名敌人令其进入混乱状态(不受对方控制,并将队友视为敌人)直到下一回合开始', yuehun:'月魂', yuehun_info:'回合结束阶段,你可以回复一点体力并摸两张牌', fengwu:'风舞', fengwu_info:'出牌阶段限一次,可令除你外的所有角色依次对与其距离最近的另一名角色使用一张【杀】,无法如此做者失去1点体力。', boss_wange:'笙歌', huanhua:'幻化', huanhua_info:'锁定技,游戏开始时,你获得其他角色的所有技能,体力上限变为其他角色之和;其他角色于摸牌阶段摸牌时,你摸等量的牌;其他角色于弃牌阶段弃牌时,你弃置等量的手牌', boss_leiji:'雷击', boss_leiji_info:'每当你使用或打出一张【闪】,可令任意一名角色进行一次判定,若结果为黑色,其受到一点雷电伤害,然后你摸一张牌', jidian:'亟电', jidian_info:'每当你造成一次伤害,可以指定距离受伤害角色1以内的一名其他角色进行判定,若结果为黑色,该角色受到一点雷电伤害', tinqin:'听琴', boss_guihan:'归汉', boss_guihan_info:'限定技,濒死阶段,你可以将体力回复至体力上限,摸4张牌,令所有敌人的技能恢复,并获得技能【听琴】、【蕙质】', boss_huixin:'蕙质', boss_huixin_info:'每当你于回合外失去牌,可以进行一次判定,若为黑色,当前回合角色失去一点体力,否则你回复一点体力并摸一张牌', boss_hujia:'胡笳', boss_hujia_info:'回合结束阶段,若你已受伤,可以弃置一张牌令一名其他角色的所有技能失效,若其所有技能已失效,改为令其失去一点体力上限', boss_honglian:'红莲', boss_honglian_info:'锁定技,回合结束阶段,你摸两张牌,并对所有敌人造成一点火焰伤害', huoshen:'火神', huoshen_info:'锁定技,你防止即将受到的火焰伤害,改为回复1点体力', boss_xianyin:'仙音', boss_xianyin_info:'每当你于回合外失去牌,你可以进行一次判定,若为红色,你令一名敌人失去一点体力', boss_yuhuo:'浴火', boss_yuhuo_info:'觉醒技,在你涅槃后,你获得技能【神威】、【朱羽】', boss_tianyu:'天狱', boss_tianyu_info:'锁定技,回合结束阶段,你解除横置状态,除你之外的所有角色进入横置状态', boss_juejing:'绝境', boss_juejing2:'绝境', boss_juejing_info:'锁定技,摸牌阶段开始时,你不摸牌;锁定技,若你的手牌数小于4,你将手牌补至四张', boss_jizhi:'集智', boss_jizhi_info:'每当你使用一张锦囊牌或装备牌,你可以摸一张牌并展示之', boss_guiyin:'归隐', boss_guiyin_info:'锁定技,体力值比你多的角色无法在回合内对你使用卡牌', boss_gongshen:'工神', boss_gongshen_info:'锁定技,除你之外的角色没有装备区;你不能成为其他角色的的延时锦囊目标', fanghua:'芳华', fanghua_info:'回合结束阶段,你可以令所有已翻面角色流失一点体力', tashui:'踏水', tashui_info:'每当你使用或打出一张黑色牌,你可以令一名其他角色翻面', wuxin:'无心', wuxin_info:'锁定技,你防止即将受到的伤害,改为流失一点体力;你不能成为其他角色的延时锦囊的目标', shangshix:'伤逝', shangshix2:'伤逝', shangshix_info:'锁定技,你的手牌数至少为4,回合结束阶段,若你的体力值大于1,你令场上所有角色流失一点体力', boss_baonu:'暴怒', boss_baonu_info:'锁定技,当你的体力值降至4或更低时,你变身为暴怒战神或神鬼无前,并立即开始你的回合', shenwei:'神威', shenwei_info:'锁定技,摸牌阶段,你额外摸3张牌,你的手牌上限+3', shenji:'神戟', shenji_info:'锁定技,若你未装备武器,你使用【杀】指定的目标数上限+2,次数上限+1', xiuluo:'修罗', xiuluo_info:'回合开始阶段,你可以弃置一张牌,然后弃置你判定区内一张同花色的牌', shenqu:'神躯', shenqu_info:'每名角色的回合开始时,若你的手牌数少于或等于你的体力上限数,你可以摸两张牌;当你受到伤害后,你可以使用一张【桃】', jiwu:'极武', jiwu_info:'出牌阶段,你可以弃置一张手牌,然后获得一项:“强袭”、“烈刃”、“旋风”、“完杀”,直到回合结束', mode_boss_character_config:'挑战武将', }, ai:{ get:{ rawAttitude:function(from,to){ return (from.side===to.side?6:-6); } } }, }