diff --git a/game/asset.js b/game/asset.js index 48b1852a9..2d0101026 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - '1.9.36', + '1.9.37', 'image/background/huangtian_bg.jpg', 'image/background/ol_bg.jpg', 'image/background/september_bg.jpg', @@ -95,7 +95,6 @@ window.noname_asset_list=[ 'image/card/hanbing.png', 'image/card/haotianta.png', 'image/card/heilonglinpian.png', - 'image/card/honghuangzhili.png', 'image/card/hongshui.png', 'image/card/hsbaowu_cangbaotu.jpg', 'image/card/hsbaowu_huangjinyuanhou.jpg', @@ -967,6 +966,7 @@ window.noname_asset_list=[ '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_hundun.jpg', 'image/mode/boss/character/boss_huoshenzhurong.jpg', 'image/mode/boss/character/boss_liang.jpg', 'image/mode/boss/character/boss_liubei.jpg', @@ -988,11 +988,14 @@ window.noname_asset_list=[ 'image/mode/boss/character/boss_pangtong.jpg', 'image/mode/boss/character/boss_qinglong.jpg', 'image/mode/boss/character/boss_qingmushilian.jpg', + 'image/mode/boss/character/boss_qiongqi.jpg', 'image/mode/boss/character/boss_satan.jpg', 'image/mode/boss/character/boss_shuijing.jpg', 'image/mode/boss/character/boss_shujing.jpg', 'image/mode/boss/character/boss_sunshangxiang.jpg', 'image/mode/boss/character/boss_taihao.jpg', + 'image/mode/boss/character/boss_taotie.jpg', + 'image/mode/boss/character/boss_taowu.jpg', 'image/mode/boss/character/boss_wang.jpg', 'image/mode/boss/character/boss_yandi.jpg', 'image/mode/boss/character/boss_yanling.jpg', @@ -1006,7 +1009,17 @@ window.noname_asset_list=[ 'image/mode/boss/character/boss_zhugeliang.jpg', 'image/mode/boss/character/boss_zhuoguiquxie.jpg', 'image/mode/boss/character/boss_zhuque.jpg', + 'image/mode/boss/character/boss_zhuyin.jpg', 'image/mode/boss/character/boss_zuoci.jpg', + 'image/mode/boss/card/chixueqingfeng.jpg', + 'image/mode/boss/card/chiyanzhenhunqin.jpg', + 'image/mode/boss/card/guilongzhanyueado.jpg', + 'image/mode/boss/card/guofengyupao.jpg', + 'image/mode/boss/card/honghuangzhili.png', + 'image/mode/boss/card/juechenjinge.jpg', + 'image/mode/boss/card/qimenbagua.jpg', + 'image/mode/boss/card/xiuluolianyuji.jpg', + 'image/mode/boss/card/xuwangzhimian.jpg', 'image/mode/chess/difficulty/leader_easy.jpg', 'image/mode/chess/difficulty/leader_hard.jpg', 'image/mode/chess/difficulty/leader_medium.jpg', diff --git a/game/game.js b/game/game.js index 54d51fe3e..410c26885 100644 --- a/game/game.js +++ b/game/game.js @@ -18672,12 +18672,23 @@ node.classList.add('fullscreenavatar'); ui.create.div('',ui.create.div(node)); // ui.create.div('',str.split('').join('
'),ui.create.div('.text.textbg',node)); - ui.create.div('',str.split('').join('
'),ui.create.div('.text',node)); + ui.create.div('','
'+str.split('').join('

')+'
',ui.create.div('.text',node)); node.firstChild.firstChild.style.backgroundImage=this.node.avatar.style.backgroundImage; node.dataset.nature=nature||'unknown'; setTimeout(function(){ - node.classList.add('flashtext'); - },200); + // node.lastChild.firstChild.firstChild.classList.add('flashtext'); + var num=0; + var nodes=node.lastChild.firstChild.querySelectorAll('div'); + var interval=setInterval(function(){ + if(num.card>.info>span, position: absolute; left: auto; right: 165px; - transform: scale(2.5); +} +#window>.damage.fullscreenavatar>.text>div>div{ + transform: scale(4); opacity: 0; + display: inline-block; + position: relative; } #window>.damage.fullscreenavatar>.textbg{ transition: all 0s; @@ -2078,7 +2082,7 @@ div:not(.handcards)>.card>.info>span, transform: scale(2); opacity: 0; }*/ -#window>.damage.fullscreenavatar.flashtext>.text>div{ +#window>.damage.fullscreenavatar>.text>div>.flashtext{ transform: none; opacity: 1; } diff --git a/mode/boss.js b/mode/boss.js index a0031159c..4e632206c 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -30,9 +30,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ lib.character[i][4]=[]; } } - for(var i in lib.cardPack.mode_boss){ - lib.card[i]=lib.cardPack.mode_boss[i]; - } + // for(var i in lib.cardPack.mode_boss){ + // lib.card[i]=lib.cardPack.mode_boss[i]; + // } for(var i in lib.skill){ if(lib.skill[i].changeSeat){ lib.skill[i]={}; @@ -114,6 +114,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(lib.storage.current==i){ event.current=player; player.classList.add('highlight'); + if(lib.boss[i]&&lib.boss[i].control){ + _status.bosschoice=lib.boss[i].control(); + _status.bosschoice.name=i; + _status.bosschoice.link=lib.boss[i].controlid||i; + } } // if(!get.config(cfg)){ @@ -133,7 +138,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ event.current.classList.add('highlight'); } ui.create.div(bosslist); - lib.translate.boss_pangtong='涅槃凤雏'; ui.create.cardsAsync(); game.finishCards(); game.addGlobalSkill('autoswap'); @@ -168,6 +172,31 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ event.current=target; game.save('current',target.name); target.classList.add('highlight'); + if(_status.bosschoice){ + var name=target.name; + if(lib.boss[target.name]&&lib.boss[target.name].controlid){ + name=lib.boss[target.name].controlid; + } + if(_status.bosschoice.link!=name){ + lib.boss[_status.bosschoice.name].control('cancel',_status.bosschoice); + _status.bosschoice.classList.remove('disabled'); + _status.bosschoice.close(); + delete _status.bosschoice; + } + else{ + return; + } + } + if(lib.boss[target.name]&&lib.boss[target.name].control){ + _status.createControl=ui.control.firstChild; + _status.bosschoice=lib.boss[target.name].control(); + _status.bosschoice.name=target.name; + _status.bosschoice.link=lib.boss[target.name].controlid||target.name; + if(ui.cheat2&&ui.cheat2.dialog==_status.event.dialog){ + _status.bosschoice.classList.add('disabled'); + } + delete _status.createControl; + } }); } if(lib.config.test_game){ @@ -221,7 +250,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ player.side=false; game.players.push(player); if(result.boss){ - player.dataset.position=(i+1)*2; + if(game.bossinfo.minion){ + player.dataset.position=i+3; + } + else{ + player.dataset.position=(i+1)*2; + } } else{ player.dataset.position=i+1; @@ -236,6 +270,48 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.players.push(boss); boss.dataset.position=7; } + if(game.bossinfo.minion){ + if(!result.boss){ + boss.dataset.position=6; + } + for(var i in game.bossinfo.minion){ + var player=ui.create.player(); + player.getId(); + player.init(game.bossinfo.minion[i]); + if(boss.bossinginfo){ + player.animate('bossing'); + player.node.hp.animate('start'); + player.style.transition='all 0s'; + } + else{ + player.animate('start'); + } + player.setIdentity('zhong'); + player.identity='zhong'; + player.side=true; + game.players.push(player); + var num=parseInt(i); + if(result.boss){ + player.dataset.position=num-1; + } + else{ + if(num==2){ + player.dataset.position=7; + } + else{ + player.dataset.position=num-3; + } + } + ui.arena.appendChild(player); + if(boss.bossinginfo){ + var rect=player.getBoundingClientRect(); + player.style.transform='translate('+(boss.bossinginfo[0]-rect.left-rect.width/2)+'px,'+(boss.bossinginfo[1]-rect.top-rect.height/2)+'px) scale(1.1)'; + ui.refresh(player); + player.style.transition=''; + player.style.transform=''; + } + } + } ui.create.me(); ui.fakeme=ui.create.div('.fakeme.avatar',ui.me); if(game.me!==boss){ @@ -394,8 +470,50 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, } }, + card:{ + honghuangzhili:{ + type:'trick', + enable:true, + fullskin:true, + filterTarget:true, + modeimage:'boss', + content:function(){ + if(target.group=='shen'){ + target.addSkill('honghuangzhili'); + if(target.countCards('he')){ + player.gainPlayerCard(target,'he',true); + } + } + else{ + target.turnOver(); + } + }, + ai:{ + order:4, + value:10, + result:{ + target:function(player,target){ + if(target.group=='shen'){ + if(target.countCards('he')) return -2; + return 0; + } + else{ + if(target.isTurnedOver()) return 4; + return -3; + } + } + } + } + } + }, characterPack:{ mode_boss:{ + boss_hundun:['male','shen',20,['boss_xiongshou'],['qun','boss','bossallowed'],'qun'], + boss_qiongqi:['male','shen',20,['boss_xiongshou'],['qun','boss','bossallowed'],'qun'], + boss_taotie:['male','shen',20,['boss_xiongshou'],['qun','boss','bossallowed'],'qun'], + boss_taowu:['male','shen',20,['boss_xiongshou'],['qun','boss','bossallowed'],'qun'], + boss_zhuyin:['male','shen',20,['boss_xiongshou'],['qun','hiddenboss','bossallowed'],'qun'], + boss_chiyanshilian:['male','',0,['boss_chiyan','boss_chiyan_intro1','boss_chiyan_intro2','boss_chiyan_intro3'],['boss'],'zhu'], boss_zhuque:['female','shen',4,['boss_shenyi','boss_fentian','boss_chiyan2'],['shu','hiddenboss','bossallowed']], boss_huoshenzhurong:['male','shen',5,['boss_shenyi','boss_xingxia','boss_chiyan3'],['shu','hiddenboss','bossallowed']], @@ -459,41 +577,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, cardPack:{ - mode_boss:{ - honghuangzhili:{ - type:'trick', - enable:true, - fullskin:true, - filterTarget:true, - content:function(){ - if(target.group=='shen'){ - target.addSkill('honghuangzhili'); - if(target.countCards('he')){ - player.gainPlayerCard(target,'he',true); - } - } - else{ - target.turnOver(); - } - }, - ai:{ - order:4, - value:10, - result:{ - target:function(player,target){ - if(target.group=='shen'){ - if(target.countCards('he')) return -2; - return 0; - } - else{ - if(target.isTurnedOver()) return 4; - return -3; - } - } - } - } - } - } + mode_boss:['honghuangzhili'] }, init:function(){ for(var i in lib.characterPack.mode_boss){ @@ -575,7 +659,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, bossPhaseLoop:function(){ var next=game.createEvent('phaseLoop'); - next.player=game.boss; + if(game.bossinfo.loopFirst){ + next.player=game.bossinfo.loopFirst(); + } + else{ + next.player=game.boss; + } _status.looped=true; next.setContent(function(){ "step 0" @@ -787,6 +876,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ ui.cheat.animate('controlpressdownx',500); ui.cheat.classList.remove('disabled'); } + if(_status.bosschoice){ + _status.bosschoice.animate('controlpressdownx',500); + _status.bosschoice.classList.remove('disabled'); + } } else{ if(game.changeCoin){ @@ -802,6 +895,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(ui.cheat){ ui.cheat.classList.add('disabled'); } + if(_status.bosschoice){ + _status.bosschoice.classList.add('disabled'); + } } }); if(lib.onfree){ @@ -840,6 +936,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ delete ui.cheat2; } event.asboss.close(); + if(_status.bosschoice){ + _status.bosschoice.close(); + delete _status.bosschoice; + } if(event.boss){ event.result={ boss:true, @@ -858,6 +958,87 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, }, boss:{ + boss_taotie:{ + controlid:'shenwuzaishi', + control:function(){ + return lib.boss.boss_taowu.control.apply(this,arguments); + } + }, + boss_taowu:{ + chongzheng:0, + loopFirst:function(){ + return game.boss.nextSeat.nextSeat; + }, + minion:{ + '2':'boss_zhuyin', + '8':'boss_zhuyin', + }, + controlid:'shenwuzaishi', + control:function(type,control){ + if(type=='cancel'){ + if(!control.classList.contains('glow')) return; + var dialog=control.dialog; + dialog.content.removeChild(control.backup1); + dialog.buttons.removeArray(control.backup2); + + game.uncheck(); + game.check(); + } + else{ + var control=ui.create.control('神将',function(){ + if(ui.cheat2&&ui.cheat2.dialog==_status.event.dialog){ + return; + } + var dialog=_status.event.dialog; + this.dialog=dialog; + if(this.classList.contains('glow')){ + this.backup1.remove(); + dialog.buttons.removeArray(this.backup2); + } + else{ + var links=[]; + for(var i=0;i