This commit is contained in:
libccy 2015-12-09 11:05:36 +08:00
parent 7cdf88b1e8
commit 4059196a0c
5 changed files with 140 additions and 51 deletions

View File

@ -1022,7 +1022,7 @@ character.refresh={
usable:1, usable:1,
content:function(){ content:function(){
"step 0" "step 0"
player.chooseControl(['red','black'].concat(get.types())).ai=function(){ player.chooseControl(['red','black','basic','trick','equip']).ai=function(){
if(player.num('shan')==0) return 'basic'; if(player.num('shan')==0) return 'basic';
if(player.num('e')<=1) return 'equip'; if(player.num('e')<=1) return 'equip';
if(player.num('h')>2) return 'trick'; if(player.num('h')>2) return 'trick';

View File

@ -209,6 +209,7 @@ character.sp={
if(event.isMine()){ if(event.isMine()){
next.openskilldialog='将一张手牌当'+get.translation(card)+'使用'; next.openskilldialog='将一张手牌当'+get.translation(card)+'使用';
} }
next.norestore=true;
next.backup('mozhix'); next.backup('mozhix');
} }
} }

View File

@ -226,7 +226,7 @@
}, },
show_splash:{ show_splash:{
name:'显示开始界面', name:'显示开始界面',
init:false, init:true,
}, },
game_speed:{ game_speed:{
name:'游戏速度', name:'游戏速度',
@ -1339,12 +1339,6 @@
name:'身份', name:'身份',
config:{ config:{
update:function(config,map){ update:function(config,map){
if(config.player_number=='8'){
map.double_nei.show();
}
else{
map.double_nei.hide();
}
if(config.identity_mode=='zhong'){ if(config.identity_mode=='zhong'){
map.player_number.hide(); map.player_number.hide();
map.enhance_zhu.hide(); map.enhance_zhu.hide();
@ -1354,8 +1348,13 @@
else{ else{
map.player_number.show(); map.player_number.show();
map.enhance_zhu.show(); map.enhance_zhu.show();
map.double_nei.show();
map.auto_identity.show(); map.auto_identity.show();
if(config.player_number=='8'){
map.double_nei.show();
}
else{
map.double_nei.hide();
}
} }
}, },
identity_mode:{ identity_mode:{
@ -3014,20 +3013,25 @@
_status.event.aiexclude.length=0; _status.event.aiexclude.length=0;
} }
else{ else{
if(event.skill){ if(!event.norestore){
var skill=event.skill; if(event.skill){
ui.click.cancel(); var skill=event.skill;
event.aiexclude.add(skill); ui.click.cancel();
event.aiexclude.add(skill);
}
else{
get.card().aiexclude();
game.uncheck();
}
event.redo();
game.resume();
} }
else{ else{
get.card().aiexclude(); ui.click.cancel();
game.uncheck();
} }
event.redo();
game.resume();
} }
} }
else if(event.skill){ else if(event.skill&&!event.norestore){
var skill=event.skill; var skill=event.skill;
ui.click.cancel(); ui.click.cancel();
event.aiexclude.add(skill); event.aiexclude.add(skill);
@ -12708,9 +12712,10 @@
delete window.isIpad; delete window.isIpad;
} }
ui.refresh(ui.window); ui.refresh(ui.window);
setTimeout(function(){ // setTimeout(function(){
ui.window.show(); // ui.window.show();
},500); // },500);
ui.window.show();
ui.window.addEventListener(lib.config.touchscreen?'touchend':'click',ui.click.window); ui.window.addEventListener(lib.config.touchscreen?'touchend':'click',ui.click.window);
ui.system=ui.create.div("#system.",ui.window); ui.system=ui.create.div("#system.",ui.window);
ui.arena=ui.create.div('#arena',ui.window); ui.arena=ui.create.div('#arena',ui.window);
@ -13825,6 +13830,7 @@
var button=this; var button=this;
var delnode=ui.create.div('.menubutton.large','删除',confirm.parentNode,function(){ var delnode=ui.create.div('.menubutton.large','删除',confirm.parentNode,function(){
button.remove(); button.remove();
lib.customCharacters.remove(button.link);
game.deleteDB('character',button.link); game.deleteDB('character',button.link);
game.deleteDB('image','character:'+button.link); game.deleteDB('image','character:'+button.link);
var skills=lib.character[button.link][3]; var skills=lib.character[button.link][3];
@ -13998,8 +14004,7 @@
packExporting=true; packExporting=true;
} }
else{ else{
exportCharacter.style.display='none'; resetExport();
packExporting=false;
} }
}); });
var resetExport=function(){ var resetExport=function(){
@ -17080,7 +17085,7 @@
if(event.custom.replace.confirm){ if(event.custom.replace.confirm){
event.custom.replace.confirm(false);return; event.custom.replace.confirm(false);return;
} }
if(event.skill){ if(event.skill&&!event.norestore){
if(event.skillDialog&&get.objtype(event.skillDialog)=='div'){ if(event.skillDialog&&get.objtype(event.skillDialog)=='div'){
event.skillDialog.close(); event.skillDialog.close();
} }
@ -17924,6 +17929,7 @@
updatehl:function(){ updatehl:function(){
if(!game.me) return; if(!game.me) return;
if(!ui.handcards1Container||!ui.handcards2Container) return; if(!ui.handcards1Container||!ui.handcards2Container) return;
if(!ui.handcards1Container.childNodes.length) return;
var hs1=[],hs2=[]; var hs1=[],hs2=[];
for(var i=0;i<ui.handcards1Container.firstChild.childElementCount;i++){ for(var i=0;i<ui.handcards1Container.firstChild.childElementCount;i++){
if(!ui.handcards1Container.firstChild.childNodes[i].classList.contains('removing')){ if(!ui.handcards1Container.firstChild.childNodes[i].classList.contains('removing')){
@ -18063,6 +18069,9 @@
if(!ui.dialog.buttons||!ui.dialog.buttons.length){ if(!ui.dialog.buttons||!ui.dialog.buttons.length){
ui.dialog.classList.add('nobutton'); ui.dialog.classList.add('nobutton');
if(ui.dialog.content.offsetHeight<240){ if(ui.dialog.content.offsetHeight<240){
if(!ui.dialog._heightset){
ui.dialog._heightset=ui.dialog.style.height||true;
}
ui.dialog.style.height=ui.dialog.content.offsetHeight+'px'; ui.dialog.style.height=ui.dialog.content.offsetHeight+'px';
if(lib.config.show_log!='off'){ if(lib.config.show_log!='off'){
ui.dialog.classList.add('scroll1'); ui.dialog.classList.add('scroll1');
@ -18071,10 +18080,23 @@
} }
} }
else{ else{
ui.dialog.style.height=''; if(typeof ui.dialog._heightset=='string'){
ui.dialog.style.height=ui.dialog._heightset;
}
else if(ui.dialog._heightset){
ui.dialog.style.height='';
}
delete ui.dialog._heightset;
} }
} }
else{ else{
if(typeof ui.dialog._heightset=='string'){
ui.dialog.style.height=ui.dialog._heightset;
}
else if(ui.dialog._heightset){
ui.dialog.style.height='';
}
delete ui.dialog._heightset;
ui.dialog.classList.remove('nobutton'); ui.dialog.classList.remove('nobutton');
} }
} }
@ -20529,37 +20551,93 @@
game.start(); game.start();
game.loop(); game.loop();
} }
// if(lib.config.version==1.70&&!lib.config.birthdayshown){
// window.inSplash=true; var goon=function(){
// var splash=ui.create.div('#splash',document.body); if(!mode[lib.config.mode]){
// } window.inSplash=true;
// else var clickNode=function(){
if(!mode[lib.config.mode]){ lib.config.mode=this.link;
splash.delete();
delete window.inSplash;
lib.init.js('mode',lib.config.mode).onload=proceed;
}
var splash=ui.create.div('#splash',document.body);
for(var i=0;i<lib.config.all.mode.length;i++){
var node=ui.create.div(splash,'.hidden',clickNode);
node.link=lib.config.all.mode[i];
ui.create.div(node,'.splashtext',get.verticalStr(get.translation(lib.config.all.mode[i])));
ui.create.div(node,'.avatar').style.backgroundImage='url("image/splash/'+lib.config.all.mode[i]+'.jpg")';
ui.refresh(node);
setTimeout((function(node){
return function(){
node.show();
}
}(node)),i*100);
}
}
else{
proceed();
}
localStorage.removeItem(lib.configprefix+'directstart');
};
if(lib.version==1.7&&!lib.config.birthdayshown){
game.saveConfig('birthdayshown',true);
window.inSplash=true; window.inSplash=true;
var clickNode=function(){ var container=ui.create.div(document.body);
lib.config.mode=this.link; container.style.width='100%';
splash.delete(); container.style.height='100%';
delete window.inSplash; container.style.left=0;
lib.init.js('mode',lib.config.mode).onload=proceed; container.style.top=0;
} var createName=function(str){
var splash=ui.create.div('#splash',document.body); var node=ui.create.div('',str);
for(var i=0;i<lib.config.all.mode.length;i++){ node.style.fontSize='200px';
var node=ui.create.div(splash,'.hidden',clickNode); node.style.color='white';
node.link=lib.config.all.mode[i]; node.style.fontFamily='huangcao,xinwei';
ui.create.div(node,'.splashtext',get.verticalStr(get.translation(lib.config.all.mode[i]))); node.style.opacity=0;
ui.create.div(node,'.avatar').style.backgroundImage='url("image/splash/'+lib.config.all.mode[i]+'.jpg")'; node.style.transform='scale(3)';
node.style.top='calc(50% - 100px)';
node.style.textShadow='black 0 0 2px';
container.appendChild(node);
ui.refresh(node); ui.refresh(node);
setTimeout((function(node){ node.style.opacity=1;
return function(){ node.style.transform='scale(1)';
node.show(); return node;
}
}(node)),i*100);
} }
createName('无').style.left='calc(50% - 300px)';
setTimeout(function(){
createName('名').style.left='calc(50% - 100px)';
},500);
setTimeout(function(){
createName('杀').style.left='calc(50% + 100px)';
},1000);
setTimeout(function(){
var node4=ui.create.div('','两周年');
node4.style.color='white';
node4.style.textShadow='black 0 0 2px';
node4.style.fontFamily='huangcao,xinwei';
node4.style.fontSize='60px';
node4.style.webkitAnimation='flip3t 1s';
node4.style.letterSpacing='-10px';
node4.style.top='calc(50% + 100px)';
node4.style.left='calc(50% + 180px)';
node4.style.border='2px solid white';
node4.style.borderRadius='8px';
node4.style.boxShadow='black 0 0 2px';
node4.style.transform='rotate(-10deg)';
node4.style.animationTimingFunction="linear"
container.appendChild(node4);
setTimeout(function(){
container.style.transform='scale(0.5)';
container.delete();
window.inSplash=false;
},2500);
},1500);
setTimeout(goon,4500);
} }
else{ else{
proceed(); goon();
} }
localStorage.removeItem(lib.configprefix+'directstart');
}; };
if(!lib.config.touchscreen){ if(!lib.config.touchscreen){
document.onmousewheel=ui.click.windowmousewheel; document.onmousewheel=ui.click.windowmousewheel;

View File

@ -11,6 +11,15 @@ body{
} }
div{display: inline-block;position: absolute;transition: all 0.5s;} div{display: inline-block;position: absolute;transition: all 0.5s;}
table{table-layout: fixed;} table{table-layout: fixed;}
@keyframes flip3t{
0%{opacity: 0;transform: scale(2) rotate(530deg)}
25%{opacity: 0.25;transform: scale(1.75) rotate(350deg)}
50%{opacity: 0.5;transform: scale(1.5) rotate(170deg)}
100%{opacity: 1;transform: scale(1) rotate(-10deg)}
/*from{box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important;}
to{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px !important}*/
}
/*--------场景--------*/ /*--------场景--------*/
#window{ #window{
width: 100%; width: 100%;

View File

@ -491,9 +491,10 @@ mode.stone={
list.push(i); list.push(i);
} }
list.randomSort(); list.randomSort();
var dialog=ui.create.dialog('按顺序选择出场角色'+(get.config('double_character')?'(双将)':'')); var dialog=ui.create.dialog('按顺序选择出场角色'+(get.config('double_character')?'(双将)':''),'hidden');
dialog.add('0/'+(get.config('double_character')?2:1)*get.config('battle_number')); dialog.add('0/'+(get.config('double_character')?2:1)*get.config('battle_number'));
dialog.add([list.slice(0,get.config('battle_number')*2+5),'character']); dialog.add([list.slice(0,get.config('battle_number')*2+5),'character']);
dialog.open();
var next=game.me.chooseButton(dialog,true); var next=game.me.chooseButton(dialog,true);
next.selectButton=function(){ next.selectButton=function(){