diff --git a/mode/boss.js b/mode/boss.js index a40c9de0c..e55396e4b 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -672,6 +672,33 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ equipValue:9 } }, + longfenghemingjian:{ + type:'equip', + fullskin:true, + cardimage:'feilongduofeng', + subtype:'equip1', + distance:{attackFrom:-2}, + skills:['longfenghemingjian'], + nomod:true, + nopower:true, + unique:true, + ai:{ + equipValue:9 + } + }, + qicaishenlu:{ + fullimage:true, + type:'equip', + subtype:'equip4', + distance:{globalFrom:-1}, + skills:['qicaishenlu'], + nomod:true, + nopower:true, + unique:true, + ai:{ + equipValue:9 + } + }, honghuangzhili:{ type:'trick', enable:true, @@ -709,11 +736,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, characterPack:{ mode_boss:{ - boss_hundun:['male','shen',20,['boss_xiongshou','boss_wuzang','boss_xiangde','boss_yinzei','boss_yinzei_switch'],['qun','boss','bossallowed'],'qun'], - boss_qiongqi:['male','shen',16,['boss_xiongshou','boss_zhue','boss_futai','boss_yandu','boss_yandu_switch'],['qun','boss','bossallowed'],'qun'], + boss_hundun:['male','shen',25,['boss_xiongshou','boss_wuzang','boss_xiangde','boss_yinzei','boss_yinzei_switch'],['qun','boss','bossallowed'],'qun'], + boss_qiongqi:['male','shen',20,['boss_xiongshou','boss_zhue','boss_futai','boss_yandu','boss_yandu_switch'],['qun','boss','bossallowed'],'qun'], boss_taotie:['male','shen',20,['boss_xiongshou','boss_tanyu','boss_cangmu','boss_jicai','boss_jicai_switch'],['qun','boss','bossallowed'],'qun'], - boss_taowu:['male','shen',16,['boss_xiongshou','boss_minwan','boss_nitai','boss_luanchang','boss_luanchang_switch'],['qun','boss','bossallowed'],'qun'], + boss_taowu:['male','shen',25,['boss_xiongshou','boss_minwan','boss_nitai','boss_luanchang','boss_luanchang_switch'],['qun','boss','bossallowed'],'qun'], boss_zhuyin:['male','shen',4,['boss_xiongshou'],['qun','hiddenboss','bossallowed'],'qun'], + + boss_xiangliu:['male','shen',25,['boss_yaoshou','boss_duqu','boss_jiushou','boss_echou','boss_echou_switch'],['qun','boss','bossallowed'],'qun'], + boss_zhuyan:['male','shen',25,['boss_yaoshou','boss_bingxian','boss_juyuan','boss_xushi','boss_xushi_switch'],['qun','boss','bossallowed'],'qun'], + boss_bifang:['male','shen',25,['boss_yaoshou','boss_zhaohuo','boss_honglianx','boss_yanyu','boss_yanyu_switch'],['qun','boss','bossallowed'],'qun'], + boss_yingzhao:['male','shen',25,['boss_yaoshou','boss_fengdong','boss_xunyou','boss_sipu','boss_sipu_switch'],['qun','boss','bossallowed'],'qun'], boss_qingmushilian:['male','',0,['boss_qingmu','boss_qingmu_intro1','boss_qingmu_intro2','boss_qingmu_intro3'],['boss'],'wu'], boss_qinglong:['male','shen',4,['boss_shenyi','releiji','boss_qingmu2'],['wu','hiddenboss','bossallowed']], @@ -790,7 +822,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, cardPack:{ - mode_boss:['honghuangzhili','sadouchengbing','yihuajiemu','guilongzhanyuedao','guofengyupao','chiyanzhenhunqin','qimenbagua','xuwangzhimian','juechenjinge','xiuluolianyuji','chixueqingfeng'] + mode_boss:['honghuangzhili','sadouchengbing','yihuajiemu','guilongzhanyuedao','guofengyupao','chiyanzhenhunqin','qimenbagua','xuwangzhimian','juechenjinge','xiuluolianyuji','chixueqingfeng','longfenghemingjian','qicaishenlu'] }, init:function(){ for(var i in lib.characterPack.mode_boss){ @@ -1199,6 +1231,98 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return lib.boss.boss_taowu.init.apply(this,arguments); } }, + boss_xiangliu:{ + chongzheng:0, + loopFirst:function(){ + return game.boss.nextSeat.nextSeat; + }, + gameDraw:function(player){ + return player==game.boss?8:4; + }, + minion:{ + '2':'boss_zhuyin', + '8':'boss_zhuyin', + }, + randchoice:function(){ + return lib.boss.boss_taowu.randchoice.apply(this,arguments); + }, + controlid:'shenwuzaishi', + control:function(){ + return lib.boss.boss_taowu.control.apply(this,arguments); + }, + init:function(){ + return lib.boss.boss_taowu.init.apply(this,arguments); + } + }, + boss_zhuyan:{ + chongzheng:0, + loopFirst:function(){ + return game.boss.nextSeat.nextSeat; + }, + gameDraw:function(player){ + return player==game.boss?8:4; + }, + minion:{ + '2':'boss_zhuyin', + '8':'boss_zhuyin', + }, + randchoice:function(){ + return lib.boss.boss_taowu.randchoice.apply(this,arguments); + }, + controlid:'shenwuzaishi', + control:function(){ + return lib.boss.boss_taowu.control.apply(this,arguments); + }, + init:function(){ + return lib.boss.boss_taowu.init.apply(this,arguments); + } + }, + boss_bifang:{ + chongzheng:0, + loopFirst:function(){ + return game.boss.nextSeat.nextSeat; + }, + gameDraw:function(player){ + return player==game.boss?8:4; + }, + minion:{ + '2':'boss_zhuyin', + '8':'boss_zhuyin', + }, + randchoice:function(){ + return lib.boss.boss_taowu.randchoice.apply(this,arguments); + }, + controlid:'shenwuzaishi', + control:function(){ + return lib.boss.boss_taowu.control.apply(this,arguments); + }, + init:function(){ + return lib.boss.boss_taowu.init.apply(this,arguments); + } + }, + boss_yingzhao:{ + chongzheng:0, + loopFirst:function(){ + return game.boss.nextSeat.nextSeat; + }, + gameDraw:function(player){ + return player==game.boss?8:4; + }, + minion:{ + '2':'boss_zhuyin', + '8':'boss_zhuyin', + }, + randchoice:function(){ + return lib.boss.boss_taowu.randchoice.apply(this,arguments); + }, + controlid:'shenwuzaishi', + control:function(){ + return lib.boss.boss_taowu.control.apply(this,arguments); + }, + init:function(){ + return lib.boss.boss_taowu.init.apply(this,arguments); + } + }, boss_hundun:{ chongzheng:0, loopFirst:function(){ @@ -1311,7 +1435,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.check(); }); control.backup1=ui.create.div('.buttons'); - control.backup2=ui.create.buttons(['shen_caocao','shen_simayi','shen_guanyu','shen_zhugeliang','shen_zhaoyun','shen_zhouyu','shen_lvmeng','shen_lvbu'],'character',control.backup1); + control.backup2=ui.create.buttons(['shen_caocao','shen_simayi','shen_guanyu','shen_zhugeliang','shen_zhaoyun','shen_zhouyu','shen_lvmeng','shen_lvbu','shen_liubei','shen_luxun'],'character',control.backup1); return control; } }, @@ -1322,44 +1446,66 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ switch(game.players[i].name){ case 'shen_guanyu':{ game.players[i].equip(game.createCard('guilongzhanyuedao','spade',5)); + lib.inpile.add('guilongzhanyuedao'); list.push('qinglong'); break; } case 'shen_zhugeliang':{ game.players[i].equip(game.createCard('qimenbagua','spade',2)); list.push('bagua'); + lib.inpile.add('qimenbagua'); break; } case 'shen_zhouyu':{ game.players[i].equip(game.createCard('chiyanzhenhunqin','diamond',1)); list.push('zhuque'); + lib.inpile.add('chiyanzhenhunqin'); break; } case 'shen_caocao':{ game.players[i].equip(game.createCard('juechenjinge','spade',5)); list.push('jueying'); + lib.inpile.add('juechenjinge'); break; } case 'shen_zhaoyun':{ game.players[i].equip(game.createCard('chixueqingfeng','spade',6)); list.push('qinggang'); + lib.inpile.add('chixueqingfeng'); break; } case 'shen_lvbu':{ game.players[i].equip(game.createCard('xiuluolianyuji','diamond',12)); list.push('fangtian'); + lib.inpile.add('xiuluolianyuji'); break; } case 'shen_simayi':{ game.players[i].equip(game.createCard('xuwangzhimian','diamond',4)); + lib.inpile.add('xuwangzhimian'); + break; + } + case 'shen_liubei':{ + game.players[i].equip(game.createCard('longfenghemingjian','spade',2)); + lib.inpile.add('longfenghemingjian'); + list.push('cixiong'); break; } case 'shen_lvmeng':{ game.players[i].equip(game.createCard('guofengyupao','diamond',3)); + lib.inpile.add('guofengyupao'); + break; + }case 'shen_luxun':{ + game.players[i].equip(game.createCard('qicaishenlu','diamond',3)); + lib.inpile.add('qicaishenlu'); break; } } } + lib.inpile.remove('wuzhong'); + lib.inpile.remove('jiedao'); + lib.inpile.add('sadouchengbing'); + lib.inpile.add('yihuajiemu'); for(var i=0;i0; + }, + 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','phaseAfter','phaseDrawBegin']}, + 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, + 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=event.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:'phaseAfter'}, + filter:function(event,player){ + return event.player!=player&&event.player.countUsed('sha')==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, + group:['boss_xushi_switch_on','boss_xushi_switch_off'], + subSkill:{ + off:{ + trigger:{global:'gameStart'}, + content:function(){ + player.disableSkill('boss_xushi_awake','boss_xushi'); + player.gainMaxHp(5); + }, + 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:'damageBefore', + source:'damageBegin', + }, + forced:true, + filter:function(event,player){ + if(player==event.player) return event.nature=='fire'||player==event.source; + return true; + }, + content:function(){ + if(player==trigger.player) trigger.cancel(); + else trigger.nature='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:'phaseBefore'}, + content:function(){ + 'step 0' + event.num1=3; + event.num2=[0,1,2,3].randomGet(); + event.togain=[]; + while(event.togain.length0) return (1.7+Math.random())*Math.max(num,1); - return 0; + if(num<=0) return 0; + if(list.length>1) return (1.7+Math.random())*Math.max(num,1); } } return 1+Math.random(); @@ -432,6 +432,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return evt.filterCard(card,player,evt); } if(!lib.filter.filterCard(card,player,evt)) return false; + else if(evt.filterCard&&!evt.filterCard(card,player,evt)) return false; if(info.changeTarget){ var list=game.filterPlayer(function(current){ return player.canUse(card,current); @@ -461,7 +462,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var nature=links[1][3]||null; var character=links[0]; var group=lib.character[character][1]; - return{ + var evt=_status.event; + var next={ character:character, group:group, filterCard:function(){ @@ -477,19 +479,21 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ nature:nature, }, filterTarget:function(card,player,target){ - var group=lib.skill.yigui_backup.group; + var xx=lib.skill.yigui_backup; + var evt=_status.event; + var group=xx.group; if(target.group!='unknown'&&target.group!=group) return false; var info=get.info(card); if(info.changeTarget){ var targets=[target]; info.changeTarget(player,targets); for(var i=0;i