This commit is contained in:
libccy 2017-02-13 09:04:51 +08:00
parent 6035900b89
commit 55499480a3
3 changed files with 34 additions and 12 deletions

View File

@ -17,7 +17,7 @@ character.hearth={
hs_liadrin:['female','shu',4,['xueren']], hs_liadrin:['female','shu',4,['xueren']],
hs_morgl:['male','wu',3,['s_tuteng']], hs_morgl:['male','wu',3,['s_tuteng']],
hs_khadgar:['male','shu',3,['midian','fuwen','jinzhou']], hs_khadgar:['male','shu',3,['midian','fuwen','jinzhou']],
hs_tyrande:['female','qun',3,['yuelu','xingluo']], hs_tyrande:['female','wei',3,['yuelu','xingluo']],
hs_neptulon:['male','wu',4,['liechao','qingliu']], hs_neptulon:['male','wu',4,['liechao','qingliu']],
hs_wvelen:['male','qun',3,['shengyan','xianzhi']], hs_wvelen:['male','qun',3,['shengyan','xianzhi']],

View File

@ -2885,7 +2885,7 @@
}, },
versus_mode:{ versus_mode:{
name:'游戏模式', name:'游戏模式',
init:'standard', init:'three',
item:{ item:{
standard:'自由', standard:'自由',
three:'统率', three:'统率',
@ -9022,7 +9022,7 @@
}; };
if(event.animate=='draw'){ if(event.animate=='draw'){
player.$draw(cards.length); player.$draw(cards.length);
game.delayx(1,500); game.pause();
setTimeout(function(){ setTimeout(function(){
addv(); addv();
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild); player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
@ -9030,11 +9030,12 @@
player.update(); player.update();
if(player==game.me) ui.updatehl(); if(player==game.me) ui.updatehl();
broadcast(); broadcast();
},500); game.resume();
},get.delayx(500,500));
} }
else if(event.animate=='gain'){ else if(event.animate=='gain'){
player.$gain(cards); player.$gain(cards);
game.delayx(1,700); game.pause();
setTimeout(function(){ setTimeout(function(){
addv(); addv();
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild); player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
@ -9042,14 +9043,15 @@
player.update(); player.update();
if(player==game.me) ui.updatehl(); if(player==game.me) ui.updatehl();
broadcast(); broadcast();
},700); game.resume();
},get.delayx(700,700));
} }
else if(event.animate=='gain2'||event.animate=='draw2'){ else if(event.animate=='gain2'||event.animate=='draw2'){
var gain2t=300; var gain2t=300;
if(player.$gain2(cards)&&player==game.me){ if(player.$gain2(cards)&&player==game.me){
gain2t=500; gain2t=500;
} }
game.delayx(1,gain2t); game.pause();
setTimeout(function(){ setTimeout(function(){
addv(); addv();
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild); player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
@ -9057,7 +9059,8 @@
player.update(); player.update();
if(player==game.me) ui.updatehl(); if(player==game.me) ui.updatehl();
broadcast(); broadcast();
},gain2t); game.resume();
},get.delayx(gain2t,gain2t));
} }
else{ else{
addv(); addv();
@ -9066,10 +9069,13 @@
player.update(); player.update();
if(player==game.me) ui.updatehl(); if(player==game.me) ui.updatehl();
broadcast(); broadcast();
event.finish();
} }
if(event.log){ if(event.log){
game.log(player,'获得了',cards); game.log(player,'获得了',cards);
} }
"step 4"
game.delayx();
}, },
lose:function(){ lose:function(){
"step 0" "step 0"
@ -15574,7 +15580,7 @@
delete _status.connectCallback; delete _status.connectCallback;
} }
if(game.online||game.onlineroom){ if(game.online||game.onlineroom){
if(game.servermode&&_status.over){ if((game.servermode||game.onlinehall)&&_status.over){
} }
else{ else{
@ -16592,6 +16598,7 @@
}, },
roomlist:function(list){ roomlist:function(list){
game.online=true; game.online=true;
game.onlinehall=true;
lib.config.recentIP.remove(_status.ip); lib.config.recentIP.remove(_status.ip);
lib.config.recentIP.unshift(_status.ip); lib.config.recentIP.unshift(_status.ip);
lib.config.recentIP.splice(5); lib.config.recentIP.splice(5);
@ -16742,7 +16749,7 @@
if(mode.game){ if(mode.game){
game.getIdentityList=lib.init.eval(mode.game.getIdentityList); game.getIdentityList=lib.init.eval(mode.game.getIdentityList);
game.updateState=lib.init.eval(mode.game.updateState); game.updateState=lib.init.eval(mode.game.updateState);
game.getRoomInfo=lib.init.eval(mode.game.getRoomInfo); game.getRoomInfo=lib.init.eval(mode.game.getRoomInfo);
} }
if(mode.element&&mode.element.player){ if(mode.element&&mode.element.player){
for(var i in mode.element.player){ for(var i in mode.element.player){
@ -20018,12 +20025,14 @@
ui.tempnowuxie.close(); ui.tempnowuxie.close();
delete ui.tempnowuxie; delete ui.tempnowuxie;
} }
if(ui.auto) ui.auto.hide();
if(ui.wuxie) ui.wuxie.hide();
if(game.getIdentityList){ if(game.getIdentityList){
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
game.players[i].setIdentity(); game.players[i].setIdentity();
} }
} }
return; return;
} }
if(lib.config.background_audio){ if(lib.config.background_audio){
if(result===true){ if(result===true){
@ -20380,7 +20389,7 @@
} }
game.addVideo('over',null,dialog.content.innerHTML); game.addVideo('over',null,dialog.content.innerHTML);
var vinum=parseInt(lib.config.video); var vinum=parseInt(lib.config.video);
if(!_status.video&&vinum&&game.getVideoName&&window.indexedDB&&!game.online){ if(!_status.video&&vinum&&game.getVideoName&&window.indexedDB&&_status.videoInited){
var store=lib.db.transaction(['video'],'readwrite').objectStore('video'); var store=lib.db.transaction(['video'],'readwrite').objectStore('video');
var videos=lib.videos.slice(0); var videos=lib.videos.slice(0);
for(var i=0;i<videos.length;i++){ for(var i=0;i<videos.length;i++){
@ -33320,6 +33329,18 @@
delete lib.tempSortSeat; delete lib.tempSortSeat;
return arr; return arr;
}, },
delayx:function(num,max){
if(typeof num!='number') num=1;
if(typeof max!='number') max=Infinity;
switch(lib.config.game_speed){
case 'vslow':return Math.min(max,2.5*num);
case 'slow':return Math.min(max,1.5*num);
case 'fast':return Math.min(max,0.7*num);
case 'vfast':return Math.min(max,0.4*num);
case 'vvfast':return Math.min(max,0.2*num);
default:return Math.min(max,num);
}
},
prompt:function(skill,target,player){ prompt:function(skill,target,player){
player=player||_status.event.player; player=player||_status.event.player;
if(target){ if(target){

View File

@ -3069,6 +3069,7 @@ mode.boss={
var target=event.targets.shift(); var target=event.targets.shift();
if(!target.isLinked()){ if(!target.isLinked()){
target.link(); target.link();
player.line(target,'green');
} }
event.redo(); event.redo();
} }