身份牌特效
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 51 KiB |
208
mode/identity.js
|
@ -1290,15 +1290,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
for(var i=0;i<list.length;i++){
|
||||
game.addGlobalSkill(list[i]);
|
||||
}
|
||||
var localMark=(skill)=>{
|
||||
var name=skill,info;
|
||||
if(player.marks[name]) player.updateMarks();
|
||||
if(lib.skill[name]) info=lib.skill[name].intro;
|
||||
if(!info) return;
|
||||
if(player.marks[name]) player.marks[name].info=info;
|
||||
else player.marks[name]=player.mark(name,info);
|
||||
player.updateMarks();
|
||||
}
|
||||
game.players.forEach(current=>{
|
||||
current.storage.zhibi=[];
|
||||
current.storage.zhibi_for=[];
|
||||
|
@ -1506,10 +1497,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
table.style.position='relative';
|
||||
var listi;
|
||||
if(event.zhongmode){
|
||||
listi=['random','zhu','mingzhong','zhong','nei','fan'];
|
||||
listi=['random','zhu','mingzhong','zhong','fan','nei'];
|
||||
}
|
||||
else{
|
||||
listi=['random','zhu','zhong','nei','fan'];
|
||||
listi=['random','zhu','zhong','fan','nei'];
|
||||
}
|
||||
|
||||
for(var i=0;i<listi.length;i++){
|
||||
|
@ -3010,27 +3001,58 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var send=(target,res,id)=>{
|
||||
var str=get.translation(target)+'是'+get.translation(res+'2')+'<br>';
|
||||
var dialog=ui.create.dialog(str,'forcebutton');
|
||||
var card=ui.create.card();
|
||||
card.classList.add('fullskin');
|
||||
var buttons=ui.create.div('.buttons',dialog.content);
|
||||
buttons.appendChild(card);
|
||||
new Promise((resolve)=>{
|
||||
var imageName=`mougong_${res}`;
|
||||
resolve(`${lib.assetURL}image/card/${imageName}.jpg`);
|
||||
}).then(pth=>new Promise((resolve,reject)=>{
|
||||
var image=new Image();
|
||||
image.onload=()=>resolve(pth);
|
||||
image.onerror=reject;
|
||||
image.src=pth;
|
||||
})).then(image=>{
|
||||
var img=document.createElement('img');
|
||||
dialog.content.appendChild(img);
|
||||
img.setAttribute('src',image);
|
||||
img.setAttribute('width','106');
|
||||
img.setAttribute('height','150');
|
||||
img.setAttribute('draggable',false);
|
||||
img.style.transition='all 2s';
|
||||
setTimeout(function(){
|
||||
img.style.transform='rotateY(360deg)';
|
||||
},100);
|
||||
}).then(pth=>{
|
||||
return new Promise((resolve,reject)=>{
|
||||
var image=new Image();
|
||||
image.onload=()=>resolve(pth);
|
||||
image.onerror=reject;
|
||||
image.src=pth;
|
||||
}).then(image=>{
|
||||
card.node.image.setBackgroundImage(image);
|
||||
}).catch(()=>{
|
||||
card.node.background.innerHTML=get.transition(res)[0];
|
||||
});
|
||||
}).then(()=>{
|
||||
if(lib.config.cardback_style!='default'){
|
||||
card.style.transitionProperty='none';
|
||||
ui.refresh(card);
|
||||
card.classList.add('infohidden');
|
||||
ui.refresh(card);
|
||||
card.style.transitionProperty='';
|
||||
}
|
||||
else{
|
||||
card.classList.add('infohidden');
|
||||
}
|
||||
buttons.appendChild(card);
|
||||
card.style.transition='all 0s';
|
||||
card.style.transform='perspective(600px) rotateY(180deg) translateX(0)';
|
||||
dialog.open();
|
||||
}).catch(()=>{});
|
||||
var onEnd01=function(){
|
||||
setTimeout(function(){
|
||||
card.style.transition='all ease-in 0.3s';
|
||||
card.style.transform='perspective(600px) rotateY(270deg) translateX(52px)';
|
||||
var onEnd=function(){
|
||||
card.classList.remove('infohidden');
|
||||
card.style.transition='all 0s';
|
||||
ui.refresh(card);
|
||||
card.style.transform='perspective(600px) rotateY(-90deg) translateX(52px)';
|
||||
ui.refresh(card);
|
||||
card.style.transition='';
|
||||
ui.refresh(card);
|
||||
card.style.transform='';
|
||||
}
|
||||
card.listenTransition(onEnd);
|
||||
},300);
|
||||
};
|
||||
onEnd01();
|
||||
});
|
||||
var control=ui.create.control('ok',()=>{
|
||||
dialog.close();
|
||||
control.close();
|
||||
|
@ -3082,27 +3104,58 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var str=get.translation(target)+'是反贼<br>';
|
||||
event.videoId=lib.status.videoId++;
|
||||
var dialog=ui.create.dialog(str,'forcebutton');
|
||||
var card=ui.create.card();
|
||||
var buttons=ui.create.div('.buttons',dialog.content);
|
||||
buttons.appendChild(card)
|
||||
card.classList.add('fullskin');
|
||||
new Promise((resolve)=>{
|
||||
var imageName=`mougong_fan`;
|
||||
resolve(`${lib.assetURL}image/card/${imageName}.jpg`);
|
||||
}).then(pth=>new Promise((resolve,reject)=>{
|
||||
var image=new Image();
|
||||
image.onload=()=>resolve(pth);
|
||||
image.onerror=reject;
|
||||
image.src=pth;
|
||||
})).then(image=>{
|
||||
var img=document.createElement('img');
|
||||
dialog.content.appendChild(img);
|
||||
img.setAttribute('src',image);
|
||||
img.setAttribute('width','106');
|
||||
img.setAttribute('height','150');
|
||||
img.setAttribute('draggable',false);
|
||||
img.style.transition='all 2s';
|
||||
setTimeout(function(){
|
||||
img.style.transform='rotateY(360deg)';
|
||||
},300);
|
||||
}).then(pth=>{
|
||||
return new Promise((resolve,reject)=>{
|
||||
var image=new Image();
|
||||
image.onload=()=>resolve(pth);
|
||||
image.onerror=reject;
|
||||
image.src=pth;
|
||||
}).then(image=>{
|
||||
card.node.image.setBackgroundImage(image);
|
||||
}).catch(()=>{
|
||||
card.node.background.innerHTML='反';
|
||||
});
|
||||
}).then(()=>{
|
||||
if(lib.config.cardback_style!='default'){
|
||||
card.style.transitionProperty='none';
|
||||
ui.refresh(card);
|
||||
card.classList.add('infohidden');
|
||||
ui.refresh(card);
|
||||
card.style.transitionProperty='';
|
||||
}
|
||||
else{
|
||||
card.classList.add('infohidden');
|
||||
}
|
||||
buttons.appendChild(card);
|
||||
dialog.open();
|
||||
}).catch(()=>{});
|
||||
card.style.transition='all 0s';
|
||||
card.style.transform='perspective(600px) rotateY(180deg) translateX(0)';
|
||||
var onEnd01=function(){
|
||||
setTimeout(function(){
|
||||
card.style.transition='all ease-in 0.3s';
|
||||
card.style.transform='perspective(600px) rotateY(270deg) translateX(52px)';
|
||||
var onEnd=function(){
|
||||
card.classList.remove('infohidden');
|
||||
card.style.transition='all 0s';
|
||||
ui.refresh(card);
|
||||
card.style.transform='perspective(600px) rotateY(-90deg) translateX(52px)';
|
||||
ui.refresh(card);
|
||||
card.style.transition='';
|
||||
ui.refresh(card);
|
||||
card.style.transform='';
|
||||
}
|
||||
card.listenTransition(onEnd);
|
||||
},300);
|
||||
};
|
||||
onEnd01();
|
||||
});
|
||||
dialog.videoId=event.videoId;
|
||||
game.me.chooseControl('ok').set('dialog',dialog);
|
||||
}
|
||||
|
@ -3123,27 +3176,58 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(!game.me.storage.zhibi.contains(target)) game.me.storage.zhibi.push(target);
|
||||
var str=get.translation(target)+'是反贼<br>';
|
||||
var dialog=ui.create.dialog(str,'forcebutton');
|
||||
var card=ui.create.card();
|
||||
var buttons=ui.create.div('.buttons',dialog.content);
|
||||
buttons.appendChild(card)
|
||||
card.classList.add('fullskin');
|
||||
new Promise((resolve)=>{
|
||||
var imageName=`mougong_fan`;
|
||||
resolve(`${lib.assetURL}image/card/${imageName}.jpg`);
|
||||
}).then(pth=>new Promise((resolve,reject)=>{
|
||||
var image=new Image();
|
||||
image.onload=()=>resolve(pth);
|
||||
image.onerror=reject;
|
||||
image.src=pth;
|
||||
})).then(image=>{
|
||||
var img=document.createElement('img');
|
||||
dialog.content.appendChild(img);
|
||||
img.setAttribute('src',image);
|
||||
img.setAttribute('width','106');
|
||||
img.setAttribute('height','150');
|
||||
img.setAttribute('draggable',false);
|
||||
img.style.transition='all 2s';
|
||||
setTimeout(function(){
|
||||
img.style.transform='rotateY(360deg)';
|
||||
},300);
|
||||
}).then(pth=>{
|
||||
return new Promise((resolve,reject)=>{
|
||||
var image=new Image();
|
||||
image.onload=()=>resolve(pth);
|
||||
image.onerror=reject;
|
||||
image.src=pth;
|
||||
}).then(image=>{
|
||||
card.node.image.setBackgroundImage(image);
|
||||
}).catch(()=>{
|
||||
card.node.background.innerHTML='反';
|
||||
});
|
||||
}).then(()=>{
|
||||
if(lib.config.cardback_style!='default'){
|
||||
card.style.transitionProperty='none';
|
||||
ui.refresh(card);
|
||||
card.classList.add('infohidden');
|
||||
ui.refresh(card);
|
||||
card.style.transitionProperty='';
|
||||
}
|
||||
else{
|
||||
card.classList.add('infohidden');
|
||||
}
|
||||
buttons.appendChild(card);
|
||||
dialog.open();
|
||||
}).catch(()=>{});
|
||||
card.style.transition='all 0s';
|
||||
card.style.transform='perspective(600px) rotateY(180deg) translateX(0)';
|
||||
var onEnd01=function(){
|
||||
setTimeout(function(){
|
||||
card.style.transition='all ease-in 0.3s';
|
||||
card.style.transform='perspective(600px) rotateY(270deg) translateX(52px)';
|
||||
var onEnd=function(){
|
||||
card.classList.remove('infohidden');
|
||||
card.style.transition='all 0s';
|
||||
ui.refresh(card);
|
||||
card.style.transform='perspective(600px) rotateY(-90deg) translateX(52px)';
|
||||
ui.refresh(card);
|
||||
card.style.transition='';
|
||||
ui.refresh(card);
|
||||
card.style.transform='';
|
||||
}
|
||||
card.listenTransition(onEnd);
|
||||
},300);
|
||||
};
|
||||
onEnd01();
|
||||
});
|
||||
dialog.videoId=id;
|
||||
game.me.chooseControl('ok').set('dialog',dialog);
|
||||
}
|
||||
|
|