This commit is contained in:
parent
2255244038
commit
9b8f4dee4e
10
game/game.js
10
game/game.js
|
@ -4674,8 +4674,8 @@
|
|||
name:'专属武将出场率',
|
||||
init:'increase',
|
||||
item:{
|
||||
increase:'大概率出现',
|
||||
normal:'与其他武将一致',
|
||||
increase:'大概率',
|
||||
normal:'默认概率',
|
||||
off:'不出现',
|
||||
},
|
||||
frequent:true
|
||||
|
@ -12951,7 +12951,7 @@
|
|||
return this;
|
||||
},
|
||||
smoothAvatar:function(){
|
||||
var div=ui.create.div('.fulldiv');
|
||||
var div=ui.create.div('.fullsize');
|
||||
div.style.background=getComputedStyle(this.node.avatar).background;
|
||||
this.node.avatar.appendChild(div);
|
||||
ui.refresh(div);
|
||||
|
@ -33785,7 +33785,7 @@
|
|||
text.style.left='30px';
|
||||
text.style.top='50px';
|
||||
text.style.wordBreak='break-all';
|
||||
var pre=ui.create.node('pre.fulldiv',text);
|
||||
var pre=ui.create.node('pre.fullsize',text);
|
||||
pre.style.margin=0;
|
||||
pre.style.padding=0;
|
||||
pre.style.position='relative';
|
||||
|
@ -39966,7 +39966,7 @@
|
|||
ui.dialog.classList.add('scroll1');
|
||||
ui.dialog.classList.add('scroll2');
|
||||
if(game.layout!='default'){
|
||||
ui.dialog.style.height=Math.min(height1,400)+'px';
|
||||
ui.dialog.style.height=Math.min(height1,410)+'px';
|
||||
ui.dialog._scrollset=true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1089,7 +1089,7 @@ body>.background.upper {
|
|||
transition-property: top,box-shadow,opacity,transform;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
.fulldiv{
|
||||
.fullsize{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
|
|
|
@ -1072,7 +1072,8 @@ input.fileinput::-webkit-file-upload-button {
|
|||
background-image: linear-gradient(rgba(75,75,75,1), rgba(70,70,70,1));
|
||||
}
|
||||
.menubutton.large.blue,
|
||||
.menubutton.large.red{
|
||||
.menubutton.large.red,
|
||||
.redbg{
|
||||
color:white !important;
|
||||
box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.3) 0 3px 10px !important;
|
||||
}
|
||||
|
@ -1080,6 +1081,9 @@ input.fileinput::-webkit-file-upload-button {
|
|||
.menubutton.blue{
|
||||
background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1));
|
||||
}
|
||||
.bluebg{
|
||||
background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1)) !important;
|
||||
}
|
||||
#system>div>.pressdown{
|
||||
transform: scale(0.97);
|
||||
}
|
||||
|
|
|
@ -2280,31 +2280,35 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var addSetting=function(dialog){
|
||||
dialog.add('选择座位').classList.add('add-setting');
|
||||
var seats=document.createElement('table');
|
||||
seats.classList.add('pointertable');
|
||||
seats.classList.add('add-setting');
|
||||
seats.style.margin='0 auto';
|
||||
seats.style.maxWidth=(60*parseInt(get.config('player_number')))+'px';
|
||||
var tr=document.createElement('tr');
|
||||
seats.appendChild(tr);
|
||||
seats.style.margin='0';
|
||||
seats.style.width='100%';
|
||||
seats.style.position='relative';
|
||||
for(var i=1;i<=game.players.length;i++){
|
||||
var td=document.createElement('td');
|
||||
tr.appendChild(td);
|
||||
td.style.width='40px';
|
||||
td.style.fontSize='25px';
|
||||
td.style.fontFamily='xinwei';
|
||||
var td=ui.create.div('.shadowed.reduce_radius.pointerdiv');
|
||||
td.style.position='relative';
|
||||
td.style.display='inline-block';
|
||||
td.style.padding='5px';
|
||||
td.style.paddingLeft='8px';
|
||||
td.style.paddingRight='8px';
|
||||
td.style.fontSize='18px';
|
||||
td.style.margin='4px';
|
||||
td.style.marginLeft='6px';
|
||||
td.style.marginRight='6px';
|
||||
td.innerHTML='<span>'+get.cnNumber(i,true)+'</span>';
|
||||
td.link=i-1;
|
||||
seats.appendChild(td);
|
||||
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
|
||||
if(_status.dragged) return;
|
||||
if(_status.justdragged) return;
|
||||
if(_status.cheat_seat){
|
||||
_status.cheat_seat.classList.remove('thundertext');
|
||||
_status.cheat_seat.classList.remove('bluebg');
|
||||
if(_status.cheat_seat==this){
|
||||
delete _status.cheat_seat;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.classList.add('thundertext');
|
||||
this.classList.add('bluebg');
|
||||
_status.cheat_seat=this;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -639,13 +639,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
|
||||
var addSetting=function(dialog){
|
||||
dialog.add('选择身份').classList.add('add-setting');
|
||||
var table=document.createElement('table');
|
||||
table.style.margin='0 auto';
|
||||
table.style.maxWidth='400px';
|
||||
table.classList.add('pointertable');
|
||||
var table=document.createElement('div');
|
||||
table.classList.add('add-setting');
|
||||
var tr=document.createElement('tr');
|
||||
table.appendChild(tr);
|
||||
table.style.margin='0';
|
||||
table.style.width='100%';
|
||||
table.style.position='relative';
|
||||
var listi;
|
||||
if(event.zhongmode){
|
||||
listi=['random','zhu','mingzhong','zhong','nei','fan'];
|
||||
|
@ -655,14 +653,21 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
|
||||
for(var i=0;i<listi.length;i++){
|
||||
var td=document.createElement('td');
|
||||
tr.appendChild(td);
|
||||
var td=ui.create.div('.shadowed.reduce_radius.pointerdiv');
|
||||
td.style.position='relative';
|
||||
td.style.display='inline-block';
|
||||
td.link=listi[i];
|
||||
td.style.fontSize='25px';
|
||||
td.style.fontFamily='xinwei';
|
||||
td.style.padding='5px';
|
||||
td.style.paddingLeft='8px';
|
||||
td.style.paddingRight='8px';
|
||||
td.style.fontSize='18px';
|
||||
td.style.margin='4px';
|
||||
td.style.marginLeft='6px';
|
||||
td.style.marginRight='6px';
|
||||
if(td.link===game.me.identity){
|
||||
td.classList.add('thundertext');
|
||||
td.classList.add('bluebg');
|
||||
}
|
||||
table.appendChild(td);
|
||||
td.innerHTML='<span>'+get.translation(listi[i]+'2')+'</span>';
|
||||
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
|
||||
if(_status.dragged) return;
|
||||
|
@ -680,13 +685,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
delete game.zhu.isZhu;
|
||||
delete game.zhu.identityShown;
|
||||
}
|
||||
var current=this.parentNode.querySelector('.thundertext');
|
||||
var current=this.parentNode.querySelector('.bluebg');
|
||||
if(current){
|
||||
current.classList.remove('thundertext');
|
||||
current.classList.remove('bluebg');
|
||||
}
|
||||
current=seats.querySelector('.thundertext');
|
||||
current=seats.querySelector('.bluebg');
|
||||
if(current){
|
||||
current.classList.remove('thundertext');
|
||||
current.classList.remove('bluebg');
|
||||
}
|
||||
if(link=='random'){
|
||||
if(event.zhongmode){
|
||||
|
@ -697,12 +702,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
for(var i=0;i<this.parentNode.childElementCount;i++){
|
||||
if(this.parentNode.childNodes[i].link==link){
|
||||
this.parentNode.childNodes[i].classList.add('thundertext');
|
||||
this.parentNode.childNodes[i].classList.add('bluebg');
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.classList.add('thundertext');
|
||||
this.classList.add('bluebg');
|
||||
}
|
||||
num=get.config('choice_'+link);
|
||||
if(event.zhongmode){
|
||||
|
@ -722,7 +727,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
game.check();
|
||||
for(var i=0;i<seats.firstChild.childElementCount;i++){
|
||||
if(get.distance(game.zhu,game.me,'absolute')===seats.firstChild.childNodes[i].link){
|
||||
seats.firstChild.childNodes[i].classList.add('thundertext');
|
||||
seats.firstChild.childNodes[i].classList.add('bluebg');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -743,33 +748,37 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
dialog.content.appendChild(table);
|
||||
|
||||
dialog.add('选择座位').classList.add('add-setting');
|
||||
var seats=document.createElement('table');
|
||||
seats.classList.add('pointertable');
|
||||
var seats=document.createElement('div');
|
||||
seats.classList.add('add-setting');
|
||||
seats.style.margin='0 auto';
|
||||
seats.style.maxWidth=(60*get.playerNumber()-1)+'px';
|
||||
var tr=document.createElement('tr');
|
||||
seats.appendChild(tr);
|
||||
seats.style.margin='0';
|
||||
seats.style.width='100%';
|
||||
seats.style.position='relative';
|
||||
for(var i=2;i<=game.players.length;i++){
|
||||
var td=document.createElement('td');
|
||||
tr.appendChild(td);
|
||||
td.style.width='40px';
|
||||
td.style.fontSize='25px';
|
||||
td.style.fontFamily='xinwei';
|
||||
td.innerHTML='<span>'+get.cnNumber(i,true)+'</span>';
|
||||
var td=ui.create.div('.shadowed.reduce_radius.pointerdiv');
|
||||
td.style.position='relative';
|
||||
td.style.display='inline-block';
|
||||
td.style.padding='5px';
|
||||
td.style.paddingLeft='8px';
|
||||
td.style.paddingRight='8px';
|
||||
td.style.fontSize='18px';
|
||||
td.style.margin='4px';
|
||||
td.style.marginLeft='6px';
|
||||
td.style.marginRight='6px';
|
||||
td.innerHTML=get.cnNumber(i,true);
|
||||
td.link=i-1;
|
||||
seats.appendChild(td);
|
||||
if(get.distance(game.zhu,game.me,'absolute')===i-1){
|
||||
td.classList.add('thundertext');
|
||||
td.classList.add('bluebg');
|
||||
}
|
||||
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
|
||||
if(_status.dragged) return;
|
||||
if(_status.justdragged) return;
|
||||
if(get.distance(game.zhu,game.me,'absolute')==this.link) return;
|
||||
var current=this.parentNode.querySelector('.thundertext');
|
||||
var current=this.parentNode.querySelector('.bluebg');
|
||||
if(current){
|
||||
current.classList.remove('thundertext');
|
||||
current.classList.remove('bluebg');
|
||||
}
|
||||
this.classList.add('thundertext');
|
||||
this.classList.add('bluebg');
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(get.distance(game.players[i],game.me,'absolute')==this.link){
|
||||
game.swapSeat(game.zhu,game.players[i],false);return;
|
||||
|
|
|
@ -793,32 +793,36 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var addSetting=function(dialog){
|
||||
dialog.add('选择座位').classList.add('add-setting');
|
||||
var seats=document.createElement('table');
|
||||
seats.classList.add('pointertable');
|
||||
seats.classList.add('add-setting');
|
||||
seats.style.margin='0 auto';
|
||||
seats.style.width='200px';
|
||||
var tr=document.createElement('tr');
|
||||
seats.appendChild(tr);
|
||||
seats.classList.add('add-setting');
|
||||
seats.style.margin='0';
|
||||
seats.style.width='100%';
|
||||
seats.style.position='relative';
|
||||
for(var i=1;i<=game.players.length;i++){
|
||||
var td=document.createElement('td');
|
||||
tr.appendChild(td);
|
||||
td.style.width='40px';
|
||||
td.style.fontSize='25px';
|
||||
td.style.fontFamily='xinwei';
|
||||
td.innerHTML='<span>'+get.cnNumber(i,true)+'</span>';
|
||||
td.link=i-1;
|
||||
var td=ui.create.div('.shadowed.reduce_radius.pointerdiv');
|
||||
td.style.position='relative';
|
||||
td.style.display='inline-block';
|
||||
td.style.padding='5px';
|
||||
td.style.paddingLeft='8px';
|
||||
td.style.paddingRight='8px';
|
||||
td.style.fontSize='18px';
|
||||
td.style.margin='4px';
|
||||
td.style.marginLeft='6px';
|
||||
td.style.marginRight='6px';
|
||||
td.innerHTML=get.cnNumber(i,true);
|
||||
td.link=i-1;
|
||||
seats.appendChild(td);
|
||||
if(get.distance(_status.firstAct,game.me,'absolute')===i-1){
|
||||
td.classList.add('thundertext');
|
||||
td.classList.add('bluebg');
|
||||
}
|
||||
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
|
||||
if(_status.dragged) return;
|
||||
if(_status.justdragged) return;
|
||||
if(get.distance(_status.firstAct,game.me,'absolute')==this.link) return;
|
||||
var current=this.parentNode.querySelector('.thundertext');
|
||||
var current=this.parentNode.querySelector('.bluebg');
|
||||
if(current){
|
||||
current.classList.remove('thundertext');
|
||||
current.classList.remove('bluebg');
|
||||
}
|
||||
this.classList.add('thundertext');
|
||||
this.classList.add('bluebg');
|
||||
_status.firstAct=game.me;
|
||||
for(var i=0;i<this.link;i++){
|
||||
_status.firstAct=_status.firstAct.previous;
|
||||
|
@ -1079,32 +1083,36 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var addSetting=function(dialog){
|
||||
dialog.add('选择座位').classList.add('add-setting');
|
||||
var seats=document.createElement('table');
|
||||
seats.classList.add('pointertable');
|
||||
seats.classList.add('add-setting');
|
||||
seats.style.margin='0 auto';
|
||||
seats.style.width='200px';
|
||||
var tr=document.createElement('tr');
|
||||
seats.appendChild(tr);
|
||||
for(var i=1;i<=game.players.length;i++){
|
||||
var td=document.createElement('td');
|
||||
tr.appendChild(td);
|
||||
td.style.width='40px';
|
||||
td.style.fontSize='25px';
|
||||
td.style.fontFamily='xinwei';
|
||||
td.innerHTML='<span>'+get.cnNumber(i,true)+'</span>';
|
||||
td.link=i-1;
|
||||
seats.classList.add('add-setting');
|
||||
seats.style.margin='0';
|
||||
seats.style.width='100%';
|
||||
seats.style.position='relative';
|
||||
for(var i=1;i<=game.players.length;i++){
|
||||
var td=ui.create.div('.shadowed.reduce_radius.pointerdiv');
|
||||
td.style.position='relative';
|
||||
td.style.display='inline-block';
|
||||
td.style.padding='5px';
|
||||
td.style.paddingLeft='8px';
|
||||
td.style.paddingRight='8px';
|
||||
td.style.fontSize='18px';
|
||||
td.style.margin='4px';
|
||||
td.style.marginLeft='6px';
|
||||
td.style.marginRight='6px';
|
||||
td.innerHTML=get.cnNumber(i,true);
|
||||
td.link=i-1;
|
||||
seats.appendChild(td);
|
||||
if(get.distance(_status.firstAct,game.me,'absolute')===i-1){
|
||||
td.classList.add('thundertext');
|
||||
td.classList.add('bluebg');
|
||||
}
|
||||
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
|
||||
if(_status.dragged) return;
|
||||
if(_status.justdragged) return;
|
||||
if(get.distance(_status.firstAct,game.me,'absolute')==this.link) return;
|
||||
var current=this.parentNode.querySelector('.thundertext');
|
||||
var current=this.parentNode.querySelector('.bluebg');
|
||||
if(current){
|
||||
current.classList.remove('thundertext');
|
||||
current.classList.remove('bluebg');
|
||||
}
|
||||
this.classList.add('thundertext');
|
||||
this.classList.add('bluebg');
|
||||
_status.firstAct=game.me;
|
||||
for(var i=0;i<this.link;i++){
|
||||
_status.firstAct=_status.firstAct.previous;
|
||||
|
|
Loading…
Reference in New Issue