diff --git a/character/boss.js b/character/boss.js deleted file mode 100644 index 3879fa3af..000000000 --- a/character/boss.js +++ /dev/null @@ -1,3234 +0,0 @@ -'usr strict'; -character.boss={ - character:{ - boss_zhangchunhua:['female','wei',4,['jueqing','wuxin','shangshix'],['boss','bossallowed'],'wei'], - boss_zhenji:['female','wei',4,['tashui','lingbo','jiaoxia','fanghua'],['boss','bossallowed'],'wei'], - // boss_liubei:['male','shu',5,['lingfeng'],['boss','bossallowed'],'qun'], - // boss_zhugeliang:['male','shu',4,[],['boss','bossallowed'],'qun'], - boss_huangyueying:['female','shu',4,['boss_gongshen','boss_jizhi','qicai','boss_guiyin'],['boss','bossallowed'],'wei'], - boss_pangtong:['male','shu',4,['boss_tianyu','qiwu','niepan','boss_yuhuo'],['boss','bossallowed'],'zhu'], - boss_zhaoyun:['male','shu',1,['boss_juejing','longhun','zhanjiang'],['boss','bossallowed'],'qun'], - boss_zhouyu:['male','wu',6,['huoshen','boss_honglian','boss_xianyin'],['boss','bossallowed'],'zhu'], - - boss_zhuoguiquxie:['male','qun',0,['boss_bianshen'],['boss','bossallowed'],'shu'], - boss_nianshou:['male','qun',Infinity,['boss_nianrui','boss_qixiang','boss_damagecount'],['boss'],'shu'], - boss_nianshou_heti:['male','qun',12,['boss_nianrui','boss_mengtai','boss_nbianshen','boss_nbianshenx'],['boss','bossallowed'],'shu'], - boss_nianshou_jingjue:['male','qun',12,['boss_nianrui','boss_mengtai','boss_jingjue','boss_nbianshen'],['hiddenboss','bossallowed'],'shu'], - boss_nianshou_renxing:['male','qun',12,['boss_nianrui','boss_mengtai','boss_renxing','boss_nbianshen'],['hiddenboss','bossallowed'],'shu'], - boss_nianshou_ruizhi:['male','qun',12,['boss_nianrui','boss_mengtai','boss_ruizhi','boss_nbianshen'],['hiddenboss','bossallowed'],'shu'], - boss_nianshou_baonu:['male','qun',12,['boss_nianrui','boss_mengtai','boss_nbaonu','boss_shouyi','boss_nbianshen'],['hiddenboss','bossallowed'],'shu'], - boss_baiwuchang:['male','qun',9,['boss_baolian','boss_qiangzheng','boss_zuijiu','juece','boss_bianshen4'],['hiddenboss','bossallowed']], - boss_heiwuchang:['male','qun',9,['boss_guiji','boss_taiping','boss_suoming','boss_xixing','boss_bianshen4'],['hiddenboss','bossallowed']], - boss_luocha:['male','qun',12,['boss_modao','boss_yushou','yizhong','boss_moyany'],['hiddenboss','bossallowed']], - boss_yecha:['male','qun',11,['boss_modao','boss_mojian','bazhen','boss_danshu'],['hiddenboss','bossallowed']], - boss_niutou:['male','qun',7,['boss_baolian','niepan','boss_manjia','boss_xiaoshou','boss_bianshen3'],['hiddenboss','bossallowed']], - boss_mamian:['male','qun',6,['boss_guiji','fankui','boss_lianyu','juece','boss_bianshen3'],['hiddenboss','bossallowed']], - boss_chi:['male','qun',5,['boss_guimei','boss_didong','boss_shanbeng','boss_bianshen2'],['hiddenboss','bossallowed']], - boss_mo:['female','qun',5,['boss_guimei','enyuan','boss_beiming','boss_bianshen2'],['hiddenboss','bossallowed']], - boss_wang:['male','qun',5,['boss_guimei','boss_luolei','huilei','boss_bianshen2'],['hiddenboss','bossallowed']], - boss_liang:['female','qun',5,['boss_guimei','boss_guihuo','boss_minbao','boss_bianshen2'],['hiddenboss','bossallowed']], - - boss_lvbu1:['male','qun',8,['mashu','wushuang','boss_baonu'],['boss','bossallowed'],'wei'], - boss_lvbu2:['male','qun',4,['mashu','wushuang','swd_xiuluo','shenwei','shenji'],['hiddenboss','bossallowed'],'qun'], - boss_caiwenji:['female','qun',4,['beige','boss_hujia','boss_guihan'],['boss','bossallowed'],'wei'], - boss_zhangjiao:['male','qun',8,['boss_leiji','tiandao','jidian'],['boss','bossallowed'],'shu'], - boss_zuoci:['male','qun',0,['huanhua'],['boss','bossallowed'],'shu'], - // boss_yuji:['male','qun',8,[],['boss','bossallowed'],'nei'], - boss_diaochan:['female','qun',4,['fengwu','yunshen','lianji','boss_wange','yuehun'],['boss','bossallowed'],'qun'], - boss_huatuo:['male','qun',6,['chulao','mazui','boss_shengshou','guizhen','wuqin'],['boss','bossallowed'],'wu'], - boss_dongzhuo:['male','qun',20,['jiuchi','boss_qiangzheng','boss_baolin'],['boss','bossallowed'],'shu'], - // boss_shuijing:['male','qun',8,[],['boss','bossallowed'],'wei'], - - boss_liedixuande:['male','shu',5,['boss_lingfeng','boss_jizhen'],['jiangeboss','hiddenboss','bossallowed'],'shu'], - boss_gongshenyueying:['male','shu',4,['boss_gongshenjg','boss_jingmiao','boss_zhinang'],['jiangeboss','hiddenboss','bossallowed'],'shu'], - boss_tianhoukongming:['male','shu',4,['boss_biantian','bazhen'],['jiangeboss','hiddenboss','bossallowed'],'shu'], - boss_yuhuoshiyuan:['male','shu',4,['boss_yuhuojg','boss_qiwu','boss_tianyujg'],['jiangeboss','hiddenboss','bossallowed'],'shu'], - boss_qiaokuijunyi:['male','wei',4,['boss_huodi','boss_jueji'],['jiangeboss','hiddenboss','bossallowed'],'wei'], - boss_jiarenzidan:['male','wei',5,['boss_chiying','boss_jingfan'],['jiangeboss','hiddenboss','bossallowed'],'wei'], - boss_duanyuzhongda:['male','wei',5,['boss_fanshi','boss_xuanlei','boss_skonghun'],['jiangeboss','hiddenboss','bossallowed'],'wei'], - boss_juechenmiaocai:['male','wei',4,['boss_chuanyun','boss_leili','boss_fengxing'],['jiangeboss','hiddenboss','bossallowed'],'wei'], - - boss_jileibaihu:['male','shu',4,['boss_jiguan','boss_zhenwei','boss_benlei'],['jiangemech','hiddenboss','bossallowed'],'shu'], - boss_yunpingqinglong:['male','shu',4,['boss_jiguan','boss_mojian'],['jiangemech','hiddenboss','bossallowed'],'shu'], - boss_lingjiaxuanwu:['male','shu',5,['boss_jiguan','yizhong','boss_lingyu'],['jiangemech','hiddenboss','bossallowed'],'shu'], - boss_chiyuzhuque:['male','shu',5,['boss_jiguan','boss_yuhuojg','boss_tianyun'],['jiangemech','hiddenboss','bossallowed'],'shu'], - boss_fudibian:['male','wei',4,['boss_jiguan','boss_didong'],['jiangemech','hiddenboss','bossallowed'],'wei'], - boss_tuntianchiwen:['male','wei',5,['boss_jiguan','boss_tanshi','boss_tunshi'],['jiangemech','hiddenboss','bossallowed'],'wei'], - boss_shihuosuanni:['male','wei',3,['boss_jiguan','boss_lianyu'],['jiangemech','hiddenboss','bossallowed'],'wei'], - boss_lieshiyazi:['male','wei',4,['boss_jiguan','boss_nailuo'],['jiangemech','hiddenboss','bossallowed'],'wei'], - - }, - skill:{ - tiandao:{ - audio:true, - trigger:{global:'judge'}, - direct:true, - filter:function(event,player){ - return player.num('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=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:function(cards,player,targets){ - player.$throw(cards); - player.line(targets); - }, - discard:false, - filterCard:true, - check:function(card){ - return 6-ai.get.value(card); - }, - content:function(){ - "step 0" - if(!player.storage.lianji){ - player.storage.lianji=[]; - } - if(targets[0].num('h')&&targets[1].num('h')){ - targets[0].chooseToCompare(targets[1]); - player.storage.lianji.add(targets[0]); - player.storage.lianji.add(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]); - } - if(!player.hasSkill('yinmo')){ - event.finish(); - } - "step 2" - for(var i=0;i0; - }, - 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:{ - 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:{ - 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_lingyu:{ - trigger:{player:'phaseEnd'}, - check:function(event,player){ - if(player.isTurnedOver()) return true; - var num=0; - for(var i=0;i0){ - if(game.players[i].hp==1){ - return true; - } - num++; - if(num>=2) return true; - } - } - return false; - }, - content:function(){ - 'step 0' - player.turnOver(); - 'step 1' - var list=[]; - for(var i=0;i0; - } - } - } - return num>=4; - }, - filter:function(event,player){ - for(var i=0;i0; - }, - content:function(){ - player.chooseToDiscard('h',true); - } - }, - boss_tunshi:{ - trigger:{player:'phaseBegin'}, - forced:true, - filter:function(event,player){ - var nh=player.num('h'); - for(var i=0;inh){ - return true; - } - } - return false; - }, - content:function(){ - 'step 0' - var targets=[]; - var nh=player.num('h'); - for(var i=0;inh){ - targets.push(game.players[i]); - } - } - targets.sort(lib.sort.seat); - event.targets=targets; - 'step 1' - if(event.targets.length){ - var current=event.targets.shift(); - current.damage('thunder'); - player.line(current,'thunder'); - event.redo(); - } - } - }, - boss_jiguan:{ - mod:{ - targetEnabled:function(card,player,target){ - if(card.name=='lebu'){ - return false; - } - } - } - }, - boss_gongshenjg:{ - audio:2, - trigger:{player:'phaseEnd'}, - mode:['versus'], - filter:function(event,player){ - if(_status.mode!='jiange') return false; - for(var i=0;i0&&target.num('j','lebu')){ - return 0.1; - } - if(player.num('h')>player.hp){ - if(target==player) return Math.max(1,att-2); - } - if(target==player) return att+5; - return att; - } - } - "step 2" - if(result&&result.targets&&result.targets.length){ - event.target=result.targets[0]; - } - if(event.cards2.length){ - player.line(event.target,'green'); - game.log(event.target,'获得了',event.cards2); - event.target.gain(event.cards2,'gain2'); - } - }, - ai:{ - threaten:1.3 - } - }, - boss_biantian4:{ - trigger:{player:'dieBegin'}, - forced:true, - popup:false, - content:function(){ - for(var i=0;i0&&event.player!=player&&event.player.hp=0; - }, - forced:true, - content:function(){ - 'step 0' - var targets=[]; - for(var i=0;i=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;i-3) return 0; - var eff=ai.get.damageEffect(target,player,player,'fire'); - if(eff>0){ - return eff+target.num('e')/2; - } - return 0; - } - "step 1" - if(result.bool){ - player.logSkill('boss_tianyun',result.targets,'fire'); - player.loseHp(); - event.target=result.targets[0]; - } - else{ - event.finish(); - } - "step 2" - if(event.target){ - event.target.damage(2,'fire'); - } - "step 3" - if(event.target){ - var es=event.target.get('e'); - if(es.length){ - event.target.discard(es); - } - } - }, - ai:{ - threaten:2 - } - }, - boss_tianyu:{ - audio:true, - trigger:{player:'phaseEnd'}, - forced:true, - filter:function(event,player){ - if(player.isLinked()) return true; - for(var i=0;i0){ - if(noneed&&player==target){ - num=0.5; - } - else if(target.hp==1){ - num+=3; - } - else if(target.hp==2){ - num+=1; - } - } - return num; - } - "step 1" - if(result.bool){ - player.logSkill('qiwu',result.targets); - result.targets[0].recover(); - } - }, - ai:{ - expose:0.3, - threaten:1.5 - } - }, - boss_jizhi:{ - audio:2, - trigger:{player:'useCard'}, - frequent:true, - unique:true, - filter:function(event){ - var type=get.type(event.card,'trick'); - return (type=='trick'||type=='equip')&&event.cards[0]&&event.cards[0]==event.card; - }, - content:function(){ - var cards=get.cards(); - player.gain(cards,'gain2'); - game.log(player,'获得了',cards); - }, - ai:{ - threaten:1.4 - } - }, - boss_guiyin:{ - mod:{ - targetEnabled:function(card,player,target){ - if(_status.currentPhase==player&&target.hp1; - }, - 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+=Math.max(2,game.players.length-1); - }, - mod:{ - maxHandcard:function(player,current){ - return current+Math.max(2,game.players.length-1); - } - } - }, - shenji:{ - unique:true, - mod:{ - selectTarget:function(card,player,range){ - if(range[1]==-1) return; - if(card.name=='sha'||card.name=='juedou') range[1]=3; - }, - } - }, - boss_baonu:{ - unique:true, - group:'boss_baonu2', - trigger:{player:'changeHp'}, - forced:true, - priority:100, - audio:2, - mode:['identity','guozhan','boss','stone'], - filter:function(event,player){ - return player.hp<=4 - }, - content:function(){ - player.init('boss_lvbu2'); - player.update(); - ui.clear(); - 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(){ + trigger.num--; + player.addSkill('lmazui3'); + player.removeSkill('lmazui2'); + }, + intro:{ + content:'card' + } + }, + lmazui3:{ + trigger:{source:'damageEnd'}, + forced:true, + popup:false, + content:function(){ + player.gain(player.storage.lmazui2,'gain2'); + game.log(player,'获得了',player.storage.lmazui2); + player.removeSkill('lmazui3'); + delete player.storage.lmazui2; + } + }, + hyunshen:{ + trigger:{player:'respond'}, + filter:function(event,player){ + return event.card.name=='shan'; + }, + frequent:true, + init:function(player){ + player.storage.hyunshen=0; + }, + content:function(){ + player.storage.hyunshen++; + player.markSkill('hyunshen'); + }, + 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:'hyunshen2' + }, + hyunshen2:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + return player.storage.hyunshen>0; + }, + content:function(){ + player.draw(player.storage.hyunshen); + player.storage.hyunshen=0; + player.unmarkSkill('hyunshen'); + }, + mod:{ + globalTo:function(from,to,distance){ + if(typeof to.storage.hyunshen=='number') return distance+to.storage.hyunshen; + } + } + }, + hlingbo:{ + audio:['lingbo',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 + } + }, + gtiandao:{ + audio:true, + trigger:{global:'judge'}, + direct:true, + filter:function(event,player){ + return player.num('he')>0; + }, + content:function(){ + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('gtiandao'),'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('gtiandao'); + 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 + } + }, jinlin:{ enable:'phaseUse', unique:true, @@ -2755,6 +2947,58 @@ character.swd={ player.removeSkill('touxi2'); } }, + nlianji:{ + audio:'lianji', + 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:function(cards,player,targets){ + player.$throw(cards); + player.line(targets); + }, + 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 + } + }, + }, lianji2:{ group:['lianji3','lianji4'] }, @@ -7804,6 +8048,18 @@ character.swd={ swd_quxian:'屈娴', swd_xiyan:'犀衍', + lmazui:'麻醉', + lmazui2:'麻醉', + lmazui_info:'出牌阶段限一次,你可以将一张黑色手牌置于一名角色的武将牌上,该角色造成的下一次伤害-1,然后获得此牌', + hyunshen:'云身', + hyunshen2:'云身', + hyunshen_info:'每当你打出一张闪,你可以令其他角色与你的距离+1;回合开始阶段,你将累计的防御距离清零,然后摸等量的牌', + hlingbo:'凌波', + hlingbo_info:'每当你使用或打出一张闪,你可以摸两张牌', + gtiandao:'天道', + gtiandao_info:'任意一名角色的判定生效前,你可以打出一张牌替换之', + nlianji:'连计', + nlianji_info:'出牌阶段限一次,你可以选择一张手牌并指定两名角色进行拼点,拼点赢的角色获得此牌,并对没赢的角色造成一点伤害', fengze:'风泽', fengze_info:'出牌阶段限一次,你可以将一张黑色牌当作桃园结义使用', lingyue:'凌月', diff --git a/game/asset.js b/game/asset.js index d109699a2..00494221c 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - '1.9.1', + '1.9.2', 'image/background/huangtian_bg.jpg', 'image/background/shengshi_bg.jpg', 'image/background/xueji_bg.jpg', @@ -187,60 +187,6 @@ window.noname_asset_list=[ 'image/card/zixin.png', 'image/card/zuzhoumojie.png', 'image/character/baiwuchang.jpg', - 'image/character/boss_baiwuchang.jpg', - 'image/character/boss_caiwenji.jpg', - 'image/character/boss_chi.jpg', - 'image/character/boss_chiyuzhuque.jpg', - 'image/character/boss_diaochan.jpg', - 'image/character/boss_dongzhuo.jpg', - 'image/character/boss_duanyuzhongda.jpg', - 'image/character/boss_fudibian.jpg', - 'image/character/boss_gongshenyueying.jpg', - 'image/character/boss_heiwuchang.jpg', - 'image/character/boss_huangyueying.jpg', - 'image/character/boss_huatuo.jpg', - 'image/character/boss_jiarenzidan.jpg', - 'image/character/boss_jileibaihu.jpg', - 'image/character/boss_juechenmiaocai.jpg', - 'image/character/boss_liang.jpg', - 'image/character/boss_liedixuande.jpg', - 'image/character/boss_lieshiyazi.jpg', - 'image/character/boss_lingjiaxuanwu.jpg', - 'image/character/boss_liubei.jpg', - 'image/character/boss_luocha.jpg', - 'image/character/boss_luxun.jpg', - 'image/character/boss_lvbu1.jpg', - 'image/character/boss_lvbu2.jpg', - 'image/character/boss_mamian.jpg', - 'image/character/boss_mo.jpg', - 'image/character/boss_nianshou.jpg', - 'image/character/boss_nianshou_baonu.jpg', - 'image/character/boss_nianshou_heti.jpg', - 'image/character/boss_nianshou_jingjue.jpg', - 'image/character/boss_nianshou_renxing.jpg', - 'image/character/boss_nianshou_ruizhi.jpg', - 'image/character/boss_niutou.jpg', - 'image/character/boss_pangtong.jpg', - 'image/character/boss_qiaokuijunyi.jpg', - 'image/character/boss_satan.jpg', - 'image/character/boss_shihuosuanni.jpg', - 'image/character/boss_shuijing.jpg', - 'image/character/boss_sunshangxiang.jpg', - 'image/character/boss_tianhoukongming.jpg', - 'image/character/boss_tuntianchiwen.jpg', - 'image/character/boss_wang.jpg', - 'image/character/boss_yecha.jpg', - 'image/character/boss_yuhuoshiyuan.jpg', - 'image/character/boss_yuji.jpg', - 'image/character/boss_yunpingqinglong.jpg', - 'image/character/boss_zhangchunhua.jpg', - 'image/character/boss_zhangjiao.jpg', - 'image/character/boss_zhaoyun.jpg', - 'image/character/boss_zhenji.jpg', - 'image/character/boss_zhouyu.jpg', - 'image/character/boss_zhugeliang.jpg', - 'image/character/boss_zhuoguiquxie.jpg', - 'image/character/boss_zuoci.jpg', 'image/character/bulianshi.jpg', 'image/character/buzhi.jpg', 'image/character/caifuren.jpg', @@ -748,6 +694,44 @@ window.noname_asset_list=[ 'image/character/zhuzhi.jpg', 'image/character/zumao.jpg', 'image/character/zuoci.jpg', + 'image/mode/boss/character/boss_baiwuchang.jpg', + 'image/mode/boss/character/boss_caiwenji.jpg', + 'image/mode/boss/character/boss_chi.jpg', + 'image/mode/boss/character/boss_diaochan.jpg', + 'image/mode/boss/character/boss_dongzhuo.jpg', + 'image/mode/boss/character/boss_heiwuchang.jpg', + 'image/mode/boss/character/boss_huangyueying.jpg', + 'image/mode/boss/character/boss_huatuo.jpg', + 'image/mode/boss/character/boss_liang.jpg', + 'image/mode/boss/character/boss_liubei.jpg', + 'image/mode/boss/character/boss_luocha.jpg', + 'image/mode/boss/character/boss_luxun.jpg', + 'image/mode/boss/character/boss_lvbu1.jpg', + 'image/mode/boss/character/boss_lvbu2.jpg', + 'image/mode/boss/character/boss_mamian.jpg', + 'image/mode/boss/character/boss_mo.jpg', + 'image/mode/boss/character/boss_nianshou.jpg', + 'image/mode/boss/character/boss_nianshou_baonu.jpg', + 'image/mode/boss/character/boss_nianshou_heti.jpg', + 'image/mode/boss/character/boss_nianshou_jingjue.jpg', + 'image/mode/boss/character/boss_nianshou_renxing.jpg', + 'image/mode/boss/character/boss_nianshou_ruizhi.jpg', + 'image/mode/boss/character/boss_niutou.jpg', + 'image/mode/boss/character/boss_pangtong.jpg', + 'image/mode/boss/character/boss_satan.jpg', + 'image/mode/boss/character/boss_shuijing.jpg', + 'image/mode/boss/character/boss_sunshangxiang.jpg', + 'image/mode/boss/character/boss_wang.jpg', + 'image/mode/boss/character/boss_yecha.jpg', + 'image/mode/boss/character/boss_yuji.jpg', + 'image/mode/boss/character/boss_zhangchunhua.jpg', + 'image/mode/boss/character/boss_zhangjiao.jpg', + 'image/mode/boss/character/boss_zhaoyun.jpg', + 'image/mode/boss/character/boss_zhenji.jpg', + 'image/mode/boss/character/boss_zhouyu.jpg', + 'image/mode/boss/character/boss_zhugeliang.jpg', + 'image/mode/boss/character/boss_zhuoguiquxie.jpg', + 'image/mode/boss/character/boss_zuoci.jpg', 'image/mode/chess/difficulty/leader_easy.jpg', 'image/mode/chess/difficulty/leader_hard.jpg', 'image/mode/chess/difficulty/leader_medium.jpg', @@ -1088,6 +1072,22 @@ window.noname_asset_list=[ 'image/mode/stone/card/spell_ziyang.jpg', 'image/mode/stone/card/spell_zuozhandongyuan.jpg', 'image/mode/stone/card/spell_zuzhou.jpg', + 'image/mode/versus/character/boss_chiyuzhuque.jpg', + 'image/mode/versus/character/boss_duanyuzhongda.jpg', + 'image/mode/versus/character/boss_fudibian.jpg', + 'image/mode/versus/character/boss_gongshenyueying.jpg', + 'image/mode/versus/character/boss_jiarenzidan.jpg', + 'image/mode/versus/character/boss_jileibaihu.jpg', + 'image/mode/versus/character/boss_juechenmiaocai.jpg', + 'image/mode/versus/character/boss_liedixuande.jpg', + 'image/mode/versus/character/boss_lieshiyazi.jpg', + 'image/mode/versus/character/boss_lingjiaxuanwu.jpg', + 'image/mode/versus/character/boss_qiaokuijunyi.jpg', + 'image/mode/versus/character/boss_shihuosuanni.jpg', + 'image/mode/versus/character/boss_tianhoukongming.jpg', + 'image/mode/versus/character/boss_tuntianchiwen.jpg', + 'image/mode/versus/character/boss_yuhuoshiyuan.jpg', + 'image/mode/versus/character/boss_yunpingqinglong.jpg', 'image/splash/boss.jpg', 'image/splash/chess.jpg', 'image/splash/guozhan.jpg', diff --git a/game/source.js b/game/source.js index 1388cb76f..7c081c045 100644 --- a/game/source.js +++ b/game/source.js @@ -7,7 +7,6 @@ window.noname_source_list=[ 'card/swd.js', 'card/yunchou.js', 'card/zhenfa.js', - 'character/boss.js', 'character/diy.js', 'character/extra.js', 'character/gujian.js', diff --git a/game/update.js b/game/update.js index e66d58783..a3abc1deb 100644 --- a/game/update.js +++ b/game/update.js @@ -21,3 +21,8 @@ window.noname_update={ // 'card/swd.js', // 'game/package.js', +// 'game/asset.js', +// 'character/diy.js', +// 'character/swd.js', +// 'mode/boss.js', +// 'mode/versus.js', diff --git a/image/character/boss_baiwuchang.jpg b/image/mode/boss/character/boss_baiwuchang.jpg similarity index 100% rename from image/character/boss_baiwuchang.jpg rename to image/mode/boss/character/boss_baiwuchang.jpg diff --git a/image/character/boss_caiwenji.jpg b/image/mode/boss/character/boss_caiwenji.jpg similarity index 100% rename from image/character/boss_caiwenji.jpg rename to image/mode/boss/character/boss_caiwenji.jpg diff --git a/image/character/boss_chi.jpg b/image/mode/boss/character/boss_chi.jpg similarity index 100% rename from image/character/boss_chi.jpg rename to image/mode/boss/character/boss_chi.jpg diff --git a/image/character/boss_diaochan.jpg b/image/mode/boss/character/boss_diaochan.jpg similarity index 100% rename from image/character/boss_diaochan.jpg rename to image/mode/boss/character/boss_diaochan.jpg diff --git a/image/character/boss_dongzhuo.jpg b/image/mode/boss/character/boss_dongzhuo.jpg similarity index 100% rename from image/character/boss_dongzhuo.jpg rename to image/mode/boss/character/boss_dongzhuo.jpg diff --git a/image/character/boss_heiwuchang.jpg b/image/mode/boss/character/boss_heiwuchang.jpg similarity index 100% rename from image/character/boss_heiwuchang.jpg rename to image/mode/boss/character/boss_heiwuchang.jpg diff --git a/image/character/boss_huangyueying.jpg b/image/mode/boss/character/boss_huangyueying.jpg similarity index 100% rename from image/character/boss_huangyueying.jpg rename to image/mode/boss/character/boss_huangyueying.jpg diff --git a/image/character/boss_huatuo.jpg b/image/mode/boss/character/boss_huatuo.jpg similarity index 100% rename from image/character/boss_huatuo.jpg rename to image/mode/boss/character/boss_huatuo.jpg diff --git a/image/character/boss_liang.jpg b/image/mode/boss/character/boss_liang.jpg similarity index 100% rename from image/character/boss_liang.jpg rename to image/mode/boss/character/boss_liang.jpg diff --git a/image/character/boss_liubei.jpg b/image/mode/boss/character/boss_liubei.jpg similarity index 100% rename from image/character/boss_liubei.jpg rename to image/mode/boss/character/boss_liubei.jpg diff --git a/image/character/boss_luocha.jpg b/image/mode/boss/character/boss_luocha.jpg similarity index 100% rename from image/character/boss_luocha.jpg rename to image/mode/boss/character/boss_luocha.jpg diff --git a/image/character/boss_luxun.jpg b/image/mode/boss/character/boss_luxun.jpg similarity index 100% rename from image/character/boss_luxun.jpg rename to image/mode/boss/character/boss_luxun.jpg diff --git a/image/character/boss_lvbu1.jpg b/image/mode/boss/character/boss_lvbu1.jpg similarity index 100% rename from image/character/boss_lvbu1.jpg rename to image/mode/boss/character/boss_lvbu1.jpg diff --git a/image/character/boss_lvbu2.jpg b/image/mode/boss/character/boss_lvbu2.jpg similarity index 100% rename from image/character/boss_lvbu2.jpg rename to image/mode/boss/character/boss_lvbu2.jpg diff --git a/image/character/boss_mamian.jpg b/image/mode/boss/character/boss_mamian.jpg similarity index 100% rename from image/character/boss_mamian.jpg rename to image/mode/boss/character/boss_mamian.jpg diff --git a/image/character/boss_mo.jpg b/image/mode/boss/character/boss_mo.jpg similarity index 100% rename from image/character/boss_mo.jpg rename to image/mode/boss/character/boss_mo.jpg diff --git a/image/character/boss_nianshou.jpg b/image/mode/boss/character/boss_nianshou.jpg similarity index 100% rename from image/character/boss_nianshou.jpg rename to image/mode/boss/character/boss_nianshou.jpg diff --git a/image/character/boss_nianshou_baonu.jpg b/image/mode/boss/character/boss_nianshou_baonu.jpg similarity index 100% rename from image/character/boss_nianshou_baonu.jpg rename to image/mode/boss/character/boss_nianshou_baonu.jpg diff --git a/image/character/boss_nianshou_heti.jpg b/image/mode/boss/character/boss_nianshou_heti.jpg similarity index 100% rename from image/character/boss_nianshou_heti.jpg rename to image/mode/boss/character/boss_nianshou_heti.jpg diff --git a/image/character/boss_nianshou_jingjue.jpg b/image/mode/boss/character/boss_nianshou_jingjue.jpg similarity index 100% rename from image/character/boss_nianshou_jingjue.jpg rename to image/mode/boss/character/boss_nianshou_jingjue.jpg diff --git a/image/character/boss_nianshou_renxing.jpg b/image/mode/boss/character/boss_nianshou_renxing.jpg similarity index 100% rename from image/character/boss_nianshou_renxing.jpg rename to image/mode/boss/character/boss_nianshou_renxing.jpg diff --git a/image/character/boss_nianshou_ruizhi.jpg b/image/mode/boss/character/boss_nianshou_ruizhi.jpg similarity index 100% rename from image/character/boss_nianshou_ruizhi.jpg rename to image/mode/boss/character/boss_nianshou_ruizhi.jpg diff --git a/image/character/boss_niutou.jpg b/image/mode/boss/character/boss_niutou.jpg similarity index 100% rename from image/character/boss_niutou.jpg rename to image/mode/boss/character/boss_niutou.jpg diff --git a/image/character/boss_pangtong.jpg b/image/mode/boss/character/boss_pangtong.jpg similarity index 100% rename from image/character/boss_pangtong.jpg rename to image/mode/boss/character/boss_pangtong.jpg diff --git a/image/character/boss_satan.jpg b/image/mode/boss/character/boss_satan.jpg similarity index 100% rename from image/character/boss_satan.jpg rename to image/mode/boss/character/boss_satan.jpg diff --git a/image/character/boss_shuijing.jpg b/image/mode/boss/character/boss_shuijing.jpg similarity index 100% rename from image/character/boss_shuijing.jpg rename to image/mode/boss/character/boss_shuijing.jpg diff --git a/image/character/boss_sunshangxiang.jpg b/image/mode/boss/character/boss_sunshangxiang.jpg similarity index 100% rename from image/character/boss_sunshangxiang.jpg rename to image/mode/boss/character/boss_sunshangxiang.jpg diff --git a/image/character/boss_wang.jpg b/image/mode/boss/character/boss_wang.jpg similarity index 100% rename from image/character/boss_wang.jpg rename to image/mode/boss/character/boss_wang.jpg diff --git a/image/character/boss_yecha.jpg b/image/mode/boss/character/boss_yecha.jpg similarity index 100% rename from image/character/boss_yecha.jpg rename to image/mode/boss/character/boss_yecha.jpg diff --git a/image/character/boss_yuji.jpg b/image/mode/boss/character/boss_yuji.jpg similarity index 100% rename from image/character/boss_yuji.jpg rename to image/mode/boss/character/boss_yuji.jpg diff --git a/image/character/boss_zhangchunhua.jpg b/image/mode/boss/character/boss_zhangchunhua.jpg similarity index 100% rename from image/character/boss_zhangchunhua.jpg rename to image/mode/boss/character/boss_zhangchunhua.jpg diff --git a/image/character/boss_zhangjiao.jpg b/image/mode/boss/character/boss_zhangjiao.jpg similarity index 100% rename from image/character/boss_zhangjiao.jpg rename to image/mode/boss/character/boss_zhangjiao.jpg diff --git a/image/character/boss_zhaoyun.jpg b/image/mode/boss/character/boss_zhaoyun.jpg similarity index 100% rename from image/character/boss_zhaoyun.jpg rename to image/mode/boss/character/boss_zhaoyun.jpg diff --git a/image/character/boss_zhenji.jpg b/image/mode/boss/character/boss_zhenji.jpg similarity index 100% rename from image/character/boss_zhenji.jpg rename to image/mode/boss/character/boss_zhenji.jpg diff --git a/image/character/boss_zhouyu.jpg b/image/mode/boss/character/boss_zhouyu.jpg similarity index 100% rename from image/character/boss_zhouyu.jpg rename to image/mode/boss/character/boss_zhouyu.jpg diff --git a/image/character/boss_zhugeliang.jpg b/image/mode/boss/character/boss_zhugeliang.jpg similarity index 100% rename from image/character/boss_zhugeliang.jpg rename to image/mode/boss/character/boss_zhugeliang.jpg diff --git a/image/character/boss_zhuoguiquxie.jpg b/image/mode/boss/character/boss_zhuoguiquxie.jpg similarity index 100% rename from image/character/boss_zhuoguiquxie.jpg rename to image/mode/boss/character/boss_zhuoguiquxie.jpg diff --git a/image/character/boss_zuoci.jpg b/image/mode/boss/character/boss_zuoci.jpg similarity index 100% rename from image/character/boss_zuoci.jpg rename to image/mode/boss/character/boss_zuoci.jpg diff --git a/image/character/boss_chiyuzhuque.jpg b/image/mode/versus/character/boss_chiyuzhuque.jpg similarity index 100% rename from image/character/boss_chiyuzhuque.jpg rename to image/mode/versus/character/boss_chiyuzhuque.jpg diff --git a/image/character/boss_duanyuzhongda.jpg b/image/mode/versus/character/boss_duanyuzhongda.jpg similarity index 100% rename from image/character/boss_duanyuzhongda.jpg rename to image/mode/versus/character/boss_duanyuzhongda.jpg diff --git a/image/character/boss_fudibian.jpg b/image/mode/versus/character/boss_fudibian.jpg similarity index 100% rename from image/character/boss_fudibian.jpg rename to image/mode/versus/character/boss_fudibian.jpg diff --git a/image/character/boss_gongshenyueying.jpg b/image/mode/versus/character/boss_gongshenyueying.jpg similarity index 100% rename from image/character/boss_gongshenyueying.jpg rename to image/mode/versus/character/boss_gongshenyueying.jpg diff --git a/image/character/boss_jiarenzidan.jpg b/image/mode/versus/character/boss_jiarenzidan.jpg similarity index 100% rename from image/character/boss_jiarenzidan.jpg rename to image/mode/versus/character/boss_jiarenzidan.jpg diff --git a/image/character/boss_jileibaihu.jpg b/image/mode/versus/character/boss_jileibaihu.jpg similarity index 100% rename from image/character/boss_jileibaihu.jpg rename to image/mode/versus/character/boss_jileibaihu.jpg diff --git a/image/character/boss_juechenmiaocai.jpg b/image/mode/versus/character/boss_juechenmiaocai.jpg similarity index 100% rename from image/character/boss_juechenmiaocai.jpg rename to image/mode/versus/character/boss_juechenmiaocai.jpg diff --git a/image/character/boss_liedixuande.jpg b/image/mode/versus/character/boss_liedixuande.jpg similarity index 100% rename from image/character/boss_liedixuande.jpg rename to image/mode/versus/character/boss_liedixuande.jpg diff --git a/image/character/boss_lieshiyazi.jpg b/image/mode/versus/character/boss_lieshiyazi.jpg similarity index 100% rename from image/character/boss_lieshiyazi.jpg rename to image/mode/versus/character/boss_lieshiyazi.jpg diff --git a/image/character/boss_lingjiaxuanwu.jpg b/image/mode/versus/character/boss_lingjiaxuanwu.jpg similarity index 100% rename from image/character/boss_lingjiaxuanwu.jpg rename to image/mode/versus/character/boss_lingjiaxuanwu.jpg diff --git a/image/character/boss_qiaokuijunyi.jpg b/image/mode/versus/character/boss_qiaokuijunyi.jpg similarity index 100% rename from image/character/boss_qiaokuijunyi.jpg rename to image/mode/versus/character/boss_qiaokuijunyi.jpg diff --git a/image/character/boss_shihuosuanni.jpg b/image/mode/versus/character/boss_shihuosuanni.jpg similarity index 100% rename from image/character/boss_shihuosuanni.jpg rename to image/mode/versus/character/boss_shihuosuanni.jpg diff --git a/image/character/boss_tianhoukongming.jpg b/image/mode/versus/character/boss_tianhoukongming.jpg similarity index 100% rename from image/character/boss_tianhoukongming.jpg rename to image/mode/versus/character/boss_tianhoukongming.jpg diff --git a/image/character/boss_tuntianchiwen.jpg b/image/mode/versus/character/boss_tuntianchiwen.jpg similarity index 100% rename from image/character/boss_tuntianchiwen.jpg rename to image/mode/versus/character/boss_tuntianchiwen.jpg diff --git a/image/character/boss_yuhuoshiyuan.jpg b/image/mode/versus/character/boss_yuhuoshiyuan.jpg similarity index 100% rename from image/character/boss_yuhuoshiyuan.jpg rename to image/mode/versus/character/boss_yuhuoshiyuan.jpg diff --git a/image/character/boss_yunpingqinglong.jpg b/image/mode/versus/character/boss_yunpingqinglong.jpg similarity index 100% rename from image/character/boss_yunpingqinglong.jpg rename to image/mode/versus/character/boss_yunpingqinglong.jpg diff --git a/mode/boss.js b/mode/boss.js index bc67baad0..d60f32c71 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -2,10 +2,6 @@ mode.boss={ start:function(){ "step 0" - if(lib.config.hiddenCharacterPack.contains('boss')){ - game.loadPackage('character/boss'); - } - "step 1" var playback=localStorage.getItem(lib.configprefix+'playback'); if(playback){ ui.create.me(); @@ -26,6 +22,12 @@ mode.boss={ 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]={}; @@ -36,7 +38,7 @@ mode.boss={ } lib.init.css(lib.assetURL+'layout/mode','boss'); game.delay(0.1); - "step 2" + "step 1" var bosslist=ui.create.div('#bosslist.hidden'); event.bosslist=bosslist; bosslist.ontouchmove = ui.click.touchScroll; @@ -167,7 +169,7 @@ mode.boss={ ui.auto.classList.add('glow'); game.save('current',event.current.name); } - "step 3" + "step 2" game.bossinfo=lib.boss.global; for(var i in lib.boss[event.current.name]){ game.bossinfo[i]=lib.boss[event.current.name][i]; @@ -341,7 +343,7 @@ mode.boss={ if(game.bossinfo.init){ game.bossinfo.init(); } - "step 5" + "step 3" if(get.config('single_control')){ 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:function(cards,player,targets){ + player.$throw(cards); + player.line(targets); + }, + 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:function(cards,player,targets){ + player.$give(cards,targets[0]); + player.line(targets[0],'green'); + }, + content:function(){ + "step 0" + game.delay(); + "step 1" + 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;i1; + }, + 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+=Math.max(2,game.players.length-1); + }, + mod:{ + maxHandcard:function(player,current){ + return current+Math.max(2,game.players.length-1); + } + } + }, + shenji:{ + unique:true, + mod:{ + selectTarget:function(card,player,range){ + if(range[1]==-1) return; + if(card.name=='sha'||card.name=='juedou') range[1]=3; + }, + } + }, + boss_baonu:{ + unique:true, + group:'boss_baonu2', + trigger:{player:'changeHp'}, + forced:true, + priority:100, + audio:2, + mode:['identity','guozhan','boss','stone'], + filter:function(event,player){ + return player.hp<=4 + }, + content:function(){ + player.init('boss_lvbu2'); + player.update(); + ui.clear(); + 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){ + return att+5; + } + return -1; + } + if(player.isTurnedOver()){ + return 5-att; + } + return -att; + }; + "step 1" + if(result.bool){ + player.logSkill('boss_didongjg',result.targets); + result.targets[0].turnOver(); + } + }, + ai:{ + threaten:1.7 + } + }, + boss_lianyujg:{ + 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_mojianjg:{ + trigger:{player:'phaseUseBegin'}, + content:function(){ + var list=[]; + for(var i=0;i0){ + if(noneed&&player==target){ + num=0.5; + } + else if(target.hp==1){ + num+=3; + } + else if(target.hp==2){ + num+=1; + } + } + return num; + } + "step 1" + if(result.bool){ + player.logSkill('qiwu',result.targets); + result.targets[0].recover(); + } + }, + ai:{ + expose:0.3, + threaten:1.5 + } + }, + boss_tianyujg:{ + audio:true, + trigger:{player:'phaseEnd'}, + forced:true, + filter:function(event,player){ + for(var i=0;i0&&event.player!=player&&event.player.hp=0; + }, + forced:true, + content:function(){ + 'step 0' + var targets=[]; + for(var i=0;i0){ + if(game.players[i].hp==1){ + return true; + } + num++; + if(num>=2) return true; + } + } + return false; + }, + content:function(){ + 'step 0' + player.turnOver(); + 'step 1' + var list=[]; + for(var i=0;i0; + } + } + } + return num>=4; + }, + filter:function(event,player){ + for(var i=0;i0; + }, + content:function(){ + player.chooseToDiscard('h',true); + } + }, + boss_tunshi:{ + trigger:{player:'phaseBegin'}, + forced:true, + filter:function(event,player){ + var nh=player.num('h'); + for(var i=0;inh){ + return true; + } + } + return false; + }, + content:function(){ + 'step 0' + var targets=[]; + var nh=player.num('h'); + for(var i=0;inh){ + targets.push(game.players[i]); + } + } + targets.sort(lib.sort.seat); + event.targets=targets; + 'step 1' + if(event.targets.length){ + var current=event.targets.shift(); + current.damage('thunder'); + player.line(current,'thunder'); + event.redo(); + } + } + }, + boss_jiguan:{ + mod:{ + targetEnabled:function(card,player,target){ + if(card.name=='lebu'){ + return false; + } + } + } + }, + boss_gongshenjg:{ + audio:2, + trigger:{player:'phaseEnd'}, + mode:['versus'], + filter:function(event,player){ + if(_status.mode!='jiange') return false; + for(var i=0;i0&&target.num('j','lebu')){ + return 0.1; + } + if(player.num('h')>player.hp){ + if(target==player) return Math.max(1,att-2); + } + if(target==player) return att+5; + return att; + } + } + "step 2" + if(result&&result.targets&&result.targets.length){ + event.target=result.targets[0]; + } + if(event.cards2.length){ + player.line(event.target,'green'); + game.log(event.target,'获得了',event.cards2); + event.target.gain(event.cards2,'gain2'); + } + }, + ai:{ + threaten:1.3 + } + }, + boss_biantian4:{ + trigger:{player:'dieBegin'}, + forced:true, + popup:false, + content:function(){ + for(var i=0;i-3) return 0; + var eff=ai.get.damageEffect(target,player,player,'fire'); + if(eff>0){ + return eff+target.num('e')/2; + } + return 0; + } + "step 1" + if(result.bool){ + player.logSkill('boss_tianyun',result.targets,'fire'); + player.loseHp(); + event.target=result.targets[0]; + } + else{ + event.finish(); + } + "step 2" + if(event.target){ + event.target.damage(2,'fire'); + } + "step 3" + if(event.target){ + var es=event.target.get('e'); + if(es.length){ + event.target.discard(es); + } + } + }, + ai:{ + threaten:2 + } + }, versus_swap:{ trigger:{player:['phaseBegin','chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin', 'chooseButtonBegin','chooseCardBegin','chooseTargetBegin','chooseCardTargetBegin','chooseControlBegin',