This commit is contained in:
libccy 2017-08-15 21:57:18 +08:00
parent fa4981511a
commit b6f52e4a5a
4 changed files with 25 additions and 14 deletions

View File

@ -5626,7 +5626,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseCardButton(player.storage.quanji,true); player.chooseCardButton(player.storage.quanji,true);
"step 1" "step 1"
var card=result.links[0]; var card=result.links[0];
player.discard(card); card.discard();
player.$throw(card);
player.storage.quanji.remove(card); player.storage.quanji.remove(card);
if(!player.storage.quanji.length){ if(!player.storage.quanji.length){
player.unmarkSkill('quanji'); player.unmarkSkill('quanji');

View File

@ -1,9 +1,8 @@
window.noname_update={ window.noname_update={
version:'1.9.36', version:'1.9.36.1',
// update:'1.9.35', update:'1.9.36',
changeLog:[ changeLog:[
'武将修改', 'bug修复',
'可显示游戏时间和剩余牌数'
], ],
files:[ files:[
'game/game.js', 'game/game.js',
@ -11,23 +10,24 @@ window.noname_update={
// 'game/config.js', // 'game/config.js',
// 'game/source.js', // 'game/source.js',
// 'game/pressure.js', // 'game/pressure.js',
'game/asset.js', // 'game/asset.js',
// 'card/*', // 'card/*',
// 'card/standard.js', // 'card/standard.js',
'card/gwent.js', // 'card/gwent.js',
// 'card/gujian.js', // 'card/gujian.js',
// 'character/*', // 'character/*',
// 'character/hearth.js', // 'character/hearth.js',
// 'character/old.js', // 'character/old.js',
'character/gwent.js', // 'character/gwent.js',
// 'character/sp.js', // 'character/sp.js',
// 'character/swd.js', // 'character/swd.js',
// 'character/rank.js', // 'character/rank.js',
// 'character/yijiang.js', 'character/yijiang.js',
// 'character/xianjian.js', // 'character/xianjian.js',
// 'mode/identity.js', // 'mode/identity.js',
// 'mode/guozhan.js', // 'mode/guozhan.js',
// 'mode/versus.js', 'mode/versus.js',
'mode/connect.js',
// 'mode/chess.js', // 'mode/chess.js',
// 'mode/tafang.js', // 'mode/tafang.js',
// 'mode/guozhan.js', // 'mode/guozhan.js',

View File

@ -5,6 +5,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
start:function(){ start:function(){
var directstartmode=lib.config.directstartmode; var directstartmode=lib.config.directstartmode;
ui.create.menu(true); ui.create.menu(true);
event.textnode=ui.create.div('','输入联机地址');
var createNode=function(){ var createNode=function(){
if(event.created) return; if(event.created) return;
if(directstartmode&&lib.node){ if(directstartmode&&lib.node){
@ -39,10 +40,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
node.style.textAlign='center'; node.style.textAlign='center';
var connect=function(e){ var connect=function(e){
event.textnode.innerHTML='正在连接...';
clearTimeout(event.timeout); clearTimeout(event.timeout);
if(e) e.preventDefault(); if(e) e.preventDefault();
game.saveConfig('last_ip',node.innerHTML); game.saveConfig('last_ip',node.innerHTML);
game.connect(node.innerHTML); game.connect(node.innerHTML,function(success){
if(!success&&event.textnode){
alert('连接失败');
event.textnode.innerHTML='输入联机地址';
}
});
}; };
node.addEventListener('keydown',function(e){ node.addEventListener('keydown',function(e){
if(e.keyCode==13){ if(e.keyCode==13){
@ -52,7 +59,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
ui.window.appendChild(node); ui.window.appendChild(node);
ui.ipnode=node; ui.ipnode=node;
var text=ui.create.div(); var text=event.textnode;
text.style.width='400px'; text.style.width='400px';
text.style.height='30px'; text.style.height='30px';
text.style.lineHeight='30px'; text.style.lineHeight='30px';
@ -61,7 +68,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
text.style.padding='10px'; text.style.padding='10px';
text.style.left='calc(50% - 200px)'; text.style.left='calc(50% - 200px)';
text.style.top='calc(50% - 80px)'; text.style.top='calc(50% - 80px)';
text.innerHTML='输入联机地址';
text.style.textAlign='center'; text.style.textAlign='center';
ui.window.appendChild(text); ui.window.appendChild(text);
ui.iptext=text; ui.iptext=text;
@ -117,11 +123,15 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.roomId=info[2]; game.roomId=info[2];
var n=5; var n=5;
var connect=function(){ var connect=function(){
event.textnode.innerHTML='正在连接...';
game.connect(info[0],function(success){ game.connect(info[0],function(success){
if(!success&&n--){ if(!success&&n--){
createNode(); createNode();
event.timeout=setTimeout(connect,1000); event.timeout=setTimeout(connect,1000);
} }
else{
event.textnode.innerHTML='输入联机地址';
}
}); });
}; };
event.timeout=setTimeout(connect,500); event.timeout=setTimeout(connect,500);

View File

@ -1458,7 +1458,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(get.config('change_identity')){ if(get.config('change_identity')){
event.addSetting(); event.addSetting();
} }
if(get.config('fouralign')){ if(get.config('fouralign')&&!event.fouralignbutton){
event.fouralignbutton=ui.create.control('变阵',function(){ event.fouralignbutton=ui.create.control('变阵',function(){
if(!_status.fouralign.length||(_status.fouralign.length==1&&_status.fouralign[0]==0)){ if(!_status.fouralign.length||(_status.fouralign.length==1&&_status.fouralign[0]==0)){
_status.fouralign=[0,1,2,3,4]; _status.fouralign=[0,1,2,3,4];