diff --git a/card/extra.js b/card/extra.js index 75c0962b5d..98187bd2d0 100644 --- a/card/extra.js +++ b/card/extra.js @@ -604,6 +604,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, }, mark:true, + markimage2:'image/card/muniu_small.png', intro:{ content:function(storage,player){ var muniu=player.getEquip('muniu'); diff --git a/character/sp.js b/character/sp.js index fa991e9209..521bdb11aa 100755 --- a/character/sp.js +++ b/character/sp.js @@ -1098,7 +1098,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, charlotte:true, filter:(event,player)=>{ - if(!event.olqifan_discard) return false; var num=player.getStorage('olqifan').length,pos=('jeh').slice(0,num); return num>0&&player.countCards(pos)>0; }, @@ -1122,14 +1121,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else card=get.autoViewAs({name,isCard:true}); event.result.card=card; player.markAuto('olqifan',[get.type2(card,false)]); - event.getParent().set('olqifan_discard',true); + var id=get.id(); player.when('chooseToUseAfter') + .filter((evt)=>evt==event.getParent()) .filter(lib.skill.olqifan_discard.filter) .then(()=>{ event.maxNum=Math.min(3,player.getStorage('olqifan').length); event.num=0; }) .then(lib.skill.olqifan_discard.content) + .translation('器翻'); }, filterCard:function(){return false}, selectCard:-1, diff --git a/character/sp2.js b/character/sp2.js index 623dd000a7..a73de5d081 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -2045,7 +2045,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=trigger.target; event.target=target; trigger.targets.remove(target); - trigger.triggeredTargets1.remove(target); + //trigger.triggeredTargets1.remove(target); trigger.untrigger(); game.delayx(); 'step 1' diff --git a/character/xianding.js b/character/xianding.js index 6c7ce8a48e..c76af4b5b7 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -4715,7 +4715,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ countdown:{ trigger:{player:'useCardAfter'}, mark:true, - marktext:'💀', + marktext:'噬', silent:true, forced:true, charlotte:true, diff --git a/game/asset.js b/game/asset.js index 1f4c6b001d..feb798234c 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - 'v1.10.1', + 'v1.10.1.0.1', 'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_online.mp3', 'audio/background/aozhan_rewrite.mp3', @@ -6199,6 +6199,7 @@ window.noname_asset_list=[ 'image/card/mtg_youlin.jpg', 'image/card/mujiaren.png', 'image/card/muniu.png', + 'image/card/muniu_small.png', 'image/card/mutoumianju.png', 'image/card/nanman.png', 'image/card/numa.png', diff --git a/game/game.js b/game/game.js index f2bec4cbfe..0e6f224d33 100644 --- a/game/game.js +++ b/game/game.js @@ -1,5 +1,5 @@ "use strict"; -(()=>{ +{ if(!localStorage.getItem('gplv3_noname_alerted')){ if(confirm('①无名杀是一款基于GPLv3协议的开源软件!\n你可以在遵守GPLv3协议的基础上任意使用,修改并转发《无名杀》,以及所有基于《无名杀》开发的拓展。\n点击“确定”即代表您认可并接受GPLv3协议↓️\nhttps://www.gnu.org/licenses/gpl-3.0.html\n②无名杀官方发布地址仅有GitHub仓库!\n其他所有的所谓“无名杀”社群(包括但不限于绝大多数“官方”QQ群、QQ频道等)均为玩家自发组织,与无名杀官方无关!')){ localStorage.setItem('gplv3_noname_alerted',true); @@ -3938,17 +3938,17 @@ init:true, unfrequent:true, }, - show_skillnamepinyin:{ - name:'显示技能名拼音', - intro:'在武将资料卡显示技能名拼音', - init:true, - unfrequent:true, - }, show_characternamepinyin:{ name:'显示武将名拼音等信息', intro:'在武将资料卡显示武将名及其拼音、性别、势力、体力等信息', init:true, unfrequent:true, + }, + show_skillnamepinyin:{ + name:'显示技能名拼音', + intro:'在武将资料卡显示技能名拼音', + init:true, + unfrequent:true, } } }, @@ -7275,31 +7275,31 @@ } }, comparator:{ - e:function(){ + equals:function(){ if(arguments.length==0) return false; if(arguments.length==1) return true; for(let i=1;i[], set:()=>null }); - Object.defineProperty(lib.creation,"o",{ + Object.defineProperty(lib.creation,"object",{ enumerable:true, get:()=>({}), set:()=>null }); - Object.defineProperty(lib.creation,"no",{ + Object.defineProperty(lib.creation,"nullObject",{ enumerable:true, get:()=>Object.create(null), set:()=>null }); - Object.defineProperty(lib.creation,"s",{ + Object.defineProperty(lib.creation,"string",{ enumerable:true, get:()=>"", set:()=>null @@ -9724,7 +9724,7 @@ _status.extension=lib.extensions[i][0]; _status.evaluatingExtension=lib.extensions[i][3]; if (typeof lib.extensions[i][1]=="function") - yield (gnc.is.coroutine(lib.extensions[i][1])?gnc.of(lib.extensions[i][1]):lib.extensions[i][1])(lib.extensions[i][2],lib.extensions[i][4]); + yield (gnc.is.coroutine(lib.extensions[i][1])?gnc.of(lib.extensions[i][1]):lib.extensions[i][1]).call(lib.extensions[i],lib.extensions[i][2],lib.extensions[i][4]); if(lib.extensions[i][4]){ if(lib.extensions[i][4].character){ for(var j in lib.extensions[i][4].character.character){ @@ -10016,8 +10016,7 @@ js:(path,file,onload,onerror)=>{ if(path[path.length-1]=='/') path=path.slice(0,path.length-1); if(path==`${lib.assetURL}mode`&&lib.config.all.stockmode.indexOf(file)==-1){ - lib.init[`setMode_${file}`](); - onload(); + lib.genAwait(lib.init[`setMode_${file}`]()).then(onload); return; } if(Array.isArray(file)){ @@ -10235,47 +10234,103 @@ localStorage.removeItem(lib.configprefix+'background'); } }, - //by 诗笺、Tipx-L - parsex:function(func){ - //Remove all comments - //移除所有注释 - var str=func.toString().replace(/((?:(?:^[ \t]*)?(?:\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\/(?:[ \t]*\r?\n(?=[ \t]*(?:\r?\n|\/\*|\/\/)))?|\/\/(?:[^\\]|\\(?:\r?\n)?)*?(?:\r?\n(?=[ \t]*(?:\r?\n|\/\*|\/\/))|(?=\r?\n))))+)|("(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|(?:\r?\n|[\s\S])[^\/"'\\\s]*)/mg,'$2').trim(); - //获取第一个 { 后的所有字符 - str=str.slice(str.indexOf('{')+1); - //func中要写步骤的话,必须要写step 0 - if(str.indexOf('step 0')==-1){ - str='{if(event.step==1) {event.finish();return;}\n'+str; - }else{ - var skip=0; - //每层最多找99个step - for (var k=0;k<99;k++) { - //正则表达式 - var reg=new RegExp(`['"]step ${k}['"]`); - var result=str.slice(skip).match(reg); - if(result==null) break; - var insertStr; - if(k==0){ - insertStr=`switch(step){case 0:`; - }else{ - insertStr=`break;case ${k}:`; - } - var copy=str; - copy=copy.slice(0,skip+result.index)+insertStr+copy.slice(skip+result.index+result[0].length); - //测试是否有错误 - try{ - new Function(copy); - str=copy; - skip+=result.index+insertStr.length; - }catch(error){ - k--; - skip+=result.index+result[0].length; + parsex:function(item){ + //by 诗笺、Tipx-L + function Legacy(func){ + //Remove all comments + //移除所有注释 + var str=func.toString().replace(/((?:(?:^[ \t]*)?(?:\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\/(?:[ \t]*\r?\n(?=[ \t]*(?:\r?\n|\/\*|\/\/)))?|\/\/(?:[^\\]|\\(?:\r?\n)?)*?(?:\r?\n(?=[ \t]*(?:\r?\n|\/\*|\/\/))|(?=\r?\n))))+)|("(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|(?:\r?\n|[\s\S])[^\/"'\\\s]*)/mg,'$2').trim(); + //获取第一个 { 后的所有字符 + str=str.slice(str.indexOf('{')+1); + //func中要写步骤的话,必须要写step 0 + if(str.indexOf('step 0')==-1){ + str='{if(event.step==1) {event.finish();return;}\n'+str; + }else{ + var skip=0; + //每层最多找99个step + for (var k=0;k<99;k++) { + //正则表达式 + var reg=new RegExp(`['"]step ${k}['"]`); + var result=str.slice(skip).match(reg); + if(result==null) break; + var insertStr; + if(k==0){ + insertStr=`switch(step){case 0:`; + }else{ + insertStr=`break;case ${k}:`; + } + var copy=str; + copy=copy.slice(0,skip+result.index)+insertStr+copy.slice(skip+result.index+result[0].length); + //测试是否有错误 + try{ + new Function(copy); + str=copy; + skip+=result.index+insertStr.length; + }catch(error){ + k--; + skip+=result.index+result[0].length; + } } + str=`if(event.step==${k}){event.finish();return;}`+str; } - str=`if(event.step==${k}){event.finish();return;}`+str; + return (new Function('event','step','source','player','target','targets', + 'card','cards','skill','forced','num','trigger','result', + '_status','lib','game','ui','get','ai',str)); + } + switch(typeof item){ + case "object": + if(Array.isArray(item)){ + let lastEvent=null; + return (event,step,source,player,target,targets,card,cards,skill,forced,num,trigger,result,_status,lib,game,ui,get,ai)=>{ + if(step>=item.length) return event.finish(); + var current=item[step]; + lastEvent=current(event,{ + event:event, + step:step, + source:source, + player:player, + target:target, + targets:targets, + card:card, + cards:cards, + skill:skill, + forced:forced, + num:num, + trigger:trigger, + result:result + },(lastEvent&&("result" in lastEvent))?lastEvent.result:null); + } + } + else{ + // TODO: Parse Common Object + throw new Error("NYI: Parse Common Object"); + } + case "function": + if (gnc.is.generatorFunc(item)) { + let gen,lastEvent; + return (event,step,source,player,target,targets,card,cards,skill,forced,num,trigger,result,_status,lib,game,ui,get,ai)=>{ + if(!gen)gen=item(event,{ + event:event, + step:step, + source:source, + player:player, + target:target, + targets:targets, + card:card, + cards:cards, + skill:skill, + forced:forced, + num:num, + trigger:trigger, + result:result + }); + var res=gen.next((lastEvent&&("result" in lastEvent))?lastEvent.result:null); + if(res.done) event.finish(); + else lastEvent=res.value; + } + } + else return Legacy(item); } - return (new Function('event','step','source','player','target','targets', - 'card','cards','skill','forced','num','trigger','result', - '_status','lib','game','ui','get','ai',str)); }, eval:function(func){ if(typeof func=='function'){ @@ -19177,6 +19232,18 @@ * 使用者只需要关注技能的效果,而不是技能的本身。 */ when:function(){ + if(!_status.postReconnect.player_when) _status.postReconnect.player_when=[ + function(map){ + for(var i in map){ + lib.skill[i]={ + charlotte:true, + forced:true, + popup:false, + } + if(typeof map[i]=='string') lib.translate[i]=map[i]; + } + },{} + ]; var triggerNames=Array.from(arguments); if(triggerNames.length==0) throw 'player.when的参数数量应大于0'; var skillName='player_when_'+Math.random().toString(36).slice(-8); @@ -19210,7 +19277,20 @@ writable:true, value:skill }); + game.broadcast(function(skillName){ + Object.defineProperty(lib.skill,skillName,{ + configurable:true, + enumerable:false, + writable:true, + value:{ + forced:true, + charlotte:true, + popup:false, + } + }); + },skillName); this.addSkill(skillName); + _status.postReconnect.player_when[1][skillName]=true; return{ filter(fun){ if(lib.skill[skillName]!=skill) throw `This skill has been destroyed`; @@ -19251,7 +19331,10 @@ }, translation(translation){ if(lib.skill[skillName]!=skill) throw `This skill has been destroyed`; - if(typeof translation=='string') lib.translate[skillName]=translation; + if(typeof translation=='string'){ + _status.postReconnect.player_when[1][skillName]=translation; + game.broadcastAll((skillName,translation)=>lib.translate[skillName]=translation,skillName,translation) + } return this; }, assgin(obj) { @@ -24836,6 +24919,11 @@ node.style['box-shadow']='none'; node.style['background-size']='contain'; } + else if(lib.skill[name]&&lib.skill[name].markimage2){ + let img=ui.create.div('.background.skillmark',node); + img.setBackgroundImage(lib.skill[name].markimage2); + img.style['background-size']='contain'; + } else{ var str=lib.translate[name+'_bg']; if(!str||str[0]=='+'||str[0]=='-'){ @@ -28603,16 +28691,19 @@ } return this; }, - setContent:function(name){ - if(typeof name=='function'){ - this.content=lib.init.parsex(name); - } - else{ - if(!lib.element.content[name]._parsed){ - lib.element.content[name]=lib.init.parsex(lib.element.content[name]); - lib.element.content[name]._parsed=true; - } - this.content=lib.element.content[name]; + setContent:function(item){ + switch(typeof item){ + case "object": + case "function": + this.content=lib.init.parsex(item); + break; + default: + if(!lib.element.content[item]._parsed){ + lib.element.content[item]=lib.init.parsex(lib.element.content[item]); + lib.element.content[item]._parsed=true; + } + this.content=lib.element.content[item]; + break; } return this; }, @@ -32519,8 +32610,7 @@ '妹子,交个朋友吧', ], other:{ - bool:(item)=>Boolean(item), - ignore:()=>{} + ignore:()=>void 0 } }; const game={ @@ -32560,15 +32650,15 @@ //基于钩子的添加势力方法 addGroup:(id,short,name,config)=>{ if(!id) throw new TypeError(); - if(lib.comparator.te(short,"object")){ + if(lib.comparator.typeEquals(short,"object")){ config=short; short=null; } - if(lib.comparator.te(name,"object")){ + if(lib.comparator.typeEquals(name,"object")){ config=name; name=null; } - if(!lib.comparator.te(short,"string")&&short){ + if(!lib.comparator.typeEquals(short,"string")&&short){ name=short; } lib.group.add(id); @@ -33737,23 +33827,23 @@ } } }, - import:function(type,content){ + import:function(type,content,url){ if(type=='extension'){ - if(typeof _status.extensionLoading=="undefined")_status.extensionLoading=[]; const promise=game.loadExtension(content); + if(typeof _status.extensionLoading=="undefined")_status.extensionLoading=[]; _status.extensionLoading.add(promise); return promise; } else{ if(!lib.imported[type])lib.imported[type]={}; - if(typeof _status.importing=="undefined")_status.importing={}; - if(!_status.importing[type])_status.importing[type]=[]; const promise=Promise.resolve((gnc.is.generator(content)?gnc.of(content):content)(lib,game,ui,get,ai,_status)).then(content2=>{ if(content2.name){ lib.imported[type][content2.name]=content2; delete content2.name; } }); + if(typeof _status.importing=="undefined")_status.importing={}; + if(!_status.importing[type])_status.importing[type]=[]; _status.importing[type].add(promise); return promise; } @@ -33879,7 +33969,7 @@ } if(obj.precontent){ _status.extension=obj.name; - yield (gnc.is.generatorFunc(obj.precontent)?gnc.of(obj.precontent):obj.precontent)(cfg); + yield (gnc.is.generatorFunc(obj.precontent)?gnc.of(obj.precontent):obj.precontent).call(obj,cfg); delete _status.extension; } if(obj.content){ @@ -36530,12 +36620,12 @@ splash:imgsrc, fromextension:true } - lib.init['setMode_'+name]=function(){ - game.import('mode',function(lib,game,ui,get,ai,_status){ + lib.init['setMode_'+name]=gnc.of(function*(){ + yield game.import('mode',function(lib,game,ui,get,ai,_status){ info.name=name; return info; }); - } + }); if(!lib.config.extensionInfo[extname]){ lib.config.extensionInfo[extname]={}; } @@ -38238,7 +38328,8 @@ }, loadModeAsync:function(name,callback){ window.game=game; - var script=lib.init.js(lib.assetURL+'mode',name,function(){ + var script=lib.init.js(lib.assetURL+'mode',name,gnc.of(function*(){ + yield Promise.allSettled(_status.importing.mode); if(!lib.config.dev) delete window.game; script.remove(); var content=lib.imported.mode[name]; @@ -38247,7 +38338,7 @@ delete lib.imported.mode; } callback(content); - }); + })); }, switchMode:function(name,configx){ if(!lib.layoutfixed.contains(name)){ @@ -38261,7 +38352,8 @@ } } window.game=game; - var script=lib.init.js(lib.assetURL+'mode',name,function(){ + var script=lib.init.js(lib.assetURL+'mode',name,gnc.of(function*(){ + yield Promise.allSettled(_status.importing.mode); if(!lib.config.dev) delete window.game; script.remove(); var mode=lib.imported.mode; @@ -38436,7 +38528,7 @@ game.loop(); }); } - }); + })); }, loadMode:function(mode){ var next=game.createEvent('loadMode',false); @@ -46325,7 +46417,8 @@ } } else if(updates[i].indexOf('image/card')==0){ - if(updates[i].indexOf('qiaosi_card')!=11&&!skipcard.contains(updates[i].slice(11,updates[i].lastIndexOf('.')))){ + let cardname=updates[i].slice(11,updates[i].lastIndexOf('.')); + if(lib.card[cardname]&&!skipcard.contains(cardname)){ updates.splice(i--,1); } } @@ -58997,4 +59090,4 @@ get:get }; lib.init.init(); -})(); +} diff --git a/game/update.js b/game/update.js index da90ce501d..98fe218b8a 100644 --- a/game/update.js +++ b/game/update.js @@ -1,6 +1,6 @@ window.noname_update={ - version:'1.10.1', - update:'1.9.126.1', + version:'1.10.1.0.1', + update:'1.10.1', changeLog:[ '整合@rintim @mengxinzxz @Tipx-L @chen079 @lieren2023 @universe-st @nonameShijian @copcap的Pull Request', '增加/更改一系列全新的机制写法', @@ -16,54 +16,54 @@ window.noname_update={ //'LICENSE', 'card/extra.js', //'card/gujian.js', - 'card/guozhan.js', + //'card/guozhan.js', //'card/gwent.js', //'card/hearth.js', //'card/huanlekapai.js', - 'card/mtg.js', + //'card/mtg.js', //'card/sp.js', //'card/standard.js', //'card/swd.js', //'card/yunchou.js', - 'card/yingbian.js', - 'card/yongjian.js', + //'card/yingbian.js', + //'card/yongjian.js', //'card/zhenfa.js', //'card/zhulu.js', - 'character/clan.js', - 'character/collab.js', - 'character/ddd.js', - 'character/diy.js', - 'character/extra.js', + //'character/clan.js', + //'character/collab.js', + //'character/ddd.js', + //'character/diy.js', + //'character/extra.js', //'character/gujian.js', - 'character/gwent.js', + //'character/gwent.js', //'character/hearth.js', - 'character/huicui.js', - 'character/jsrg.js', - 'character/mobile.js', + //'character/huicui.js', + //'character/jsrg.js', + //'character/mobile.js', //'character/mtg.js', - 'character/offline.js', - 'character/old.js', + //'character/offline.js', + //'character/old.js', //'character/ow.js', - 'character/rank.js', - 'character/refresh.js', - 'character/sb.js', - 'character/shenhua.js', - 'character/shiji.js', + //'character/rank.js', + //'character/refresh.js', + //'character/sb.js', + //'character/shenhua.js', + //'character/shiji.js', 'character/sp.js', 'character/sp2.js', - 'character/standard.js', - 'character/tw.js', + //'character/standard.js', + //'character/tw.js', //'character/swd.js', //'character/xiake.js', 'character/xianding.js', //'character/xianjian.js', - 'character/xinghuoliaoyuan.js', - 'character/yijiang.js', - 'character/yingbian.js', - 'character/yxs.js', + //'character/xinghuoliaoyuan.js', + //'character/yijiang.js', + //'character/yingbian.js', + //'character/yxs.js', //'extension/boss/extension.js', //'font/suits.woff2', - 'image/card/cardtempname_bg.png', + //'image/card/cardtempname_bg.png', 'layout/default/layout.css', //'layout/default/menu.css', //'layout/long2/layout.css', @@ -71,14 +71,14 @@ window.noname_update={ //'layout/mobile/layout.css', //'layout/newlayout/global.css', //'layout/nova/layout.css', - 'mode/boss.js', - 'mode/brawl.js', + //'mode/boss.js', + //'mode/brawl.js', //'mode/chess.js', //'mode/connect.js', - 'mode/doudizhu.js', - 'mode/guozhan.js', + //'mode/doudizhu.js', + //'mode/guozhan.js', 'mode/identity.js', - 'mode/single.js', + //'mode/single.js', //'mode/stone.js', //'mode/tafang.js', //'mode/versus.js', @@ -87,10 +87,10 @@ window.noname_update={ //'game/NoSleep.js', //'game/config.js', //'game/package.js', - 'game/path.min.js', - 'game/pinyinjs.js', + //'game/path.min.js', + //'game/pinyinjs.js', //'game/asset.js', - 'game/source.js', + //'game/source.js', //'theme/simple/style.css', //'theme/style/hp/custom.css', //'theme/style/hp/emotion.css', diff --git a/image/card/muniu_small.png b/image/card/muniu_small.png new file mode 100644 index 0000000000..5c71285c44 Binary files /dev/null and b/image/card/muniu_small.png differ diff --git a/layout/default/layout.css b/layout/default/layout.css index 83ffe267ac..fe1b9338f0 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -1743,7 +1743,7 @@ div:not(.handcards)>.card>.info>span, margin-left: 4px; margin-right: 4px; position: relative; - width: calc(100% - 8px); + /* width: calc(100% - 8px); */ } .content>.caption + .buttons:not(*:last-child){ margin-top: 0; diff --git a/layout/mode/boss.css b/layout/mode/boss.css index 71bde7c454..275819f7e8 100644 --- a/layout/mode/boss.css +++ b/layout/mode/boss.css @@ -1,148 +1,183 @@ -#bosslist{ - width:100%; - height:260px; - text-align:center; - top:calc(50% - 200px); - top:60px; - white-space:nowrap; - z-index:1; - overflow-x:scroll; -} -#window[data-radius_size='reduce'] #bosslist>.player{ - border-radius:4px; -} -#window[data-radius_size='off'] #bosslist>.player{ - border-radius:0px; -} -#window[data-radius_size='increase'] #bosslist>.player{ - border-radius:20px; -} -#window #bosslist>.player{ - border-radius: 10px; -} -#window[data-player_border='normal'] #bosslist>.player>.avatar{ - left: 8px; - top: 8px; - width: 164px; - height: 200px; -} -#window[data-player_border='slim'] #bosslist>.player>.avatar{ - left: 4px; - top: 4px; - width: 172px; - height: 208px; +#bosslist { + width: 100%; + height: 260px; + text-align: center; + top: calc(50% - 200px); + top: 60px; + white-space: nowrap; + z-index: 1; + overflow-x: scroll; } + +#window[data-radius_size='reduce'] #bosslist>.player { + border-radius: 4px; +} + +#window[data-radius_size='off'] #bosslist>.player { + border-radius: 0px; +} + +#window[data-radius_size='increase'] #bosslist>.player { + border-radius: 20px; +} + +#window #bosslist>.player { + border-radius: 10px; +} + +#window[data-player_border='normal'] #bosslist>.player>.avatar { + left: 8px; + top: 8px; + width: 164px; + height: 200px; +} + +#window[data-player_border='slim'] #bosslist>.player>.avatar { + left: 4px; + top: 4px; + width: 172px; + height: 208px; +} + .bosspaused>#bosslist, .bosspaused>#control, -.bosspaused>.dialog.bosscharacter{ - opacity:0.2 !important; +.bosspaused>.dialog.bosscharacter { + opacity: 0.2 !important; } -#bosslist.hidden>.player{ - transition:all 0s; + +#bosslist.hidden>.player { + transition: all 0s; } + #bosslist>div:first-child, -#bosslist>div:last-child{ - width:20px; - position:relative; +#bosslist>div:last-child { + width: 20px; + position: relative; } -#window:not(.nopointer) #bosslist>.player{ - cursor: pointer; + +#bosslist>.player .identity { + align-items: flex-start; +} + +#bosslist>.player .identity>div { + writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; +} + +#window:not(.nopointer) #bosslist>.player { + cursor: pointer; } -.dialog.bosscharacter .buttons .button.selectable{ + +.dialog.bosscharacter .buttons .button.selectable { cursor: pointer; } -.dialog.bosscharacter .buttons .button:not(.selectable){ - opacity: 0.6 + +.dialog.bosscharacter .buttons .button:not(.selectable) { + opacity: 0.6 } -.player.bossplayer.bossing{ - position:absolute; +.player.bossplayer.bossing { + position: absolute; } -.player.bossing .avatar{ - transition:all 0.5s; + +.player.bossing .avatar { + transition: all 0.5s; } -.player.bossplayer.highlight{ - transform:scale(1.1); - opacity:1; + +.player.bossplayer.highlight { + transform: scale(1.1); + opacity: 1; } -#bosslist.removing>.player.bossplayer.highlight{ - transition:all 0s; - opacity:0; + +#bosslist.removing>.player.bossplayer.highlight { + transition: all 0s; + opacity: 0; } -.player.bossplayer{ - position:relative; - margin:10px; - left:0; - top:4px; - width:180px; - height:216px; - transition: all 0.3s; - opacity:0.6; - animation:game_start 0.5s; - -webkit-animation:game_start 0.5s; + +.player.bossplayer { + position: relative; + margin: 10px; + left: 0; + top: 4px; + width: 180px; + height: 216px; + transition: all 0.3s; + opacity: 0.6; + animation: game_start 0.5s; + -webkit-animation: game_start 0.5s; } -.player.bossplayer>div:not(.hp):not(.identity):not(.avatar):not(.framebg){ - display:none !important; + +.player.bossplayer>div:not(.hp):not(.identity):not(.avatar):not(.framebg) { + display: none !important; } -.player.bossplayer>.identity{ - left:16px; - top:20px; - line-height:24px; - white-space:normal; + +.player.bossplayer>.identity { + left: 16px; + top: 18px; + line-height: 24px; + white-space: normal; } -.player.bossplayer>.hp{ - top:22px; - left:144px; + +.player.bossplayer>.hp { + top: 22px; + left: 144px; } -.player.bossplayer>.avatar{ - width:160px; - height:196px; + +.player.bossplayer>.avatar { + width: 160px; + height: 196px; } -#control.bosslist{ - top:calc(100% - 50px) !important; - position:fixed; +#control.bosslist { + top: calc(100% - 50px) !important; + position: fixed; } -.dialog.bosscharacter{ - top:auto; - bottom:65px; - height:calc(100% - 383px); - animation: dialog_start2 0.5s; +.dialog.bosscharacter { + top: auto; + bottom: 65px; + height: calc(100% - 383px); + animation: dialog_start2 0.5s; -webkit-animation: dialog_start2 0.5s; } -.bosschongzheng{ - width:calc(100% - 20px); - white-space:nowrap; - position:relative; +.bosschongzheng { + width: calc(100% - 20px); + white-space: nowrap; + position: relative; } -.bosschongzheng div{ - position:relative; + +.bosschongzheng div { + position: relative; } -.bosschongzheng>div{ - width:100%; - display:block; - margin-bottom:5px; + +.bosschongzheng>div { + width: 100%; + display: block; + margin-bottom: 5px; } -.bosschongzheng>div>div:first-child{ - text-align:left; - width:30%; + +.bosschongzheng>div>div:first-child { + text-align: left; + width: 30%; } -.bosschongzheng>div>div:last-child{ - text-align:right; - width:70%; + +.bosschongzheng>div>div:last-child { + text-align: right; + width: 70%; } @media screen and (min-height: 800px) { - .dialog.bosscharacter{ - height:417px; - bottom:calc(50% - 335px); + .dialog.bosscharacter { + height: 417px; + bottom: calc(50% - 335px); } - #control.bosslist{ - top:calc(50% + 350px) !important; - } - #bosslist{ - top:calc(40% - 260px); - } -} + + #control.bosslist { + top: calc(50% + 350px) !important; + } + + #bosslist { + top: calc(40% - 260px); + } +} \ No newline at end of file diff --git a/mode/identity.js b/mode/identity.js index 8ec7f69433..9601787839 100644 --- a/mode/identity.js +++ b/mode/identity.js @@ -1392,7 +1392,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } } - if(!game.zhu) game.zhu=game.me; + if(!game.zhu) game.zhu=game.me; else{ game.zhu.setIdentity(); game.zhu.identityShown=true;