From 8dbafd5e59e2ede3758ac6ad90c195c99d41b8d9 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Thu, 7 Nov 2019 22:48:06 +0800 Subject: [PATCH] v1.9.95 --- game/asset.js | 6 ++- game/config.js | 4 +- game/game.js | 106 ++++++++++++++++++++++++++++++++++-------------- game/package.js | 6 ++- game/source.js | 1 + game/update.js | 24 ++++++----- 6 files changed, 101 insertions(+), 46 deletions(-) diff --git a/game/asset.js b/game/asset.js index eab87bab6..bb0d7b122 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - '1.9.94.3.1', + '1.9.95', 'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_online.mp3', 'audio/background/aozhan_rewrite.mp3', @@ -2291,7 +2291,9 @@ window.noname_asset_list=[ 'image/character/re_xiaoqiao.jpg', 'image/character/re_xuhuang.jpg', 'image/character/key_haruko.jpg', - + 'image/character/hejin.jpg', + 'image/character/hansui.jpg', + 'image/character/niujin.jpg', 'image/character/baiwuchang.jpg', 'image/character/baosanniang.jpg', diff --git a/game/config.js b/game/config.js index 40fbe41d8..0339e7322 100644 --- a/game/config.js +++ b/game/config.js @@ -16,8 +16,8 @@ window.config={ all:{ sgscharacters:['standard','shenhua','xinghuoliaoyuan','refresh','yijiang','sp','extra','old','mobile','tw'], sgscards:['standard','extra','sp','guozhan'], - sgsmodes:['identity','guozhan','versus','doudizhu','brawl','connect'], - stockmode:['identity','guozhan','versus','boss','doudizhu','chess','stone','connect','brawl','tafang'], + sgsmodes:['identity','guozhan','versus','doudizhu','single','brawl','connect'], + stockmode:['identity','guozhan','versus','boss','doudizhu','single','chess','stone','connect','brawl','tafang'], stockextension:['boss','cardpile','coin','wuxing'], layout:['default','newlayout'], theme:['woodden','music','simple'], diff --git a/game/game.js b/game/game.js index e33fd3332..10205d886 100644 --- a/game/game.js +++ b/game/game.js @@ -5469,6 +5469,34 @@ }, } }, + single:{ + name:'单挑', + connect:{ + connect_single_mode:{ + name:'游戏模式', + init:'normal', + item:{ + normal:'新1v1', + }, + restart:true, + frequent:true, + }, + update:function(config,map){}, + }, + config:{ + single_mode:{ + name:'游戏模式', + init:'normal', + item:{ + normal:'新1v1', + }, + restart:true, + frequent:true, + }, + update:function(config,map){ + }, + } + }, chess:{ name:'战棋', config:{ @@ -9528,8 +9556,8 @@ else event.targets2=[]; if(!event.forced){ var next=player.chooseBool(); - next.prompt=event.prompt||('是否'+(event.targets2.length?'对':'')+get.translation(event.targets2)+'使用'+get.translation(card)+'?'); - if(event.prompt2) next.prompt2=event.prompt2; + next.set('prompt',event.prompt||('是否'+(event.targets2.length?'对':'')+get.translation(event.targets2)+'使用'+get.translation(card)+'?')); + if(event.prompt2) next.set('prompt2',event.prompt2); next.ai=function(){ var eff=0; for(var i=0;i'+next.prompt2; + next.set('prompt2',''+trigger.skillwarn+'。'+next.prompt2); } else{ - next.prompt2=trigger.skillwarn; + next.set('prompt2',trigger.skillwarn); } } } @@ -13539,11 +13568,12 @@ } else{ var losecard=player.lose(cards,ui.special); + if(info.visible) losecard.visible=true; } } if(!info.prepare&&info.viewAs){ player.$throw(cards); - losecard.visible=true; + if(losecard) losecard.visible=true; if(lib.config.sync_speed&&cards[0]&&cards[0].clone){ var waitingForTransition=get.time(); event.waitingForTransition=waitingForTransition; @@ -13627,9 +13657,9 @@ } if(info.prepare){ switch(info.prepare){ - case 'give':losecard.visible=true;player.$give(cards,targets[0]);break; + case 'give':if(losecard) losecard.visible=true;player.$give(cards,targets[0]);break; case 'give2':player.$give(cards.length,targets[0]);break; - case 'throw':losecard.visible=true;player.$throw(cards);break; + case 'throw':if(losecard) losecard.visible=true;player.$throw(cards);break; case 'throw2':player.$throw(cards.length);break; default:info.prepare(cards,player,targets); } @@ -17046,8 +17076,9 @@ } } next.setContent('chooseUseTarget'); + next._args=Array.from(arguments); return next; - // Online-Ready! Enjoy It! + // Fully Online-Ready! Enjoy It! }, chooseTarget:function(){ var next=game.createEvent('chooseTarget'); @@ -17902,7 +17933,8 @@ } if(shown.length) this.$give(shown,target); if(hidden.length) this.$giveAuto(hidden,target); - target.gain(cards,this); + var next=target.gain(cards,this); + if(visible) next.visible=true; }, lose:function(){ var next=game.createEvent('lose'); @@ -23989,6 +24021,7 @@ _chongzhu:{ enable:'phaseUse', logv:false, + visible:true, prompt:'将要重铸的牌置入弃牌堆并摸一张牌', filter:function(event,player){ return player.hasCard(function(card){ @@ -26335,7 +26368,7 @@ game.players[i].init(players[i].name,players[i].name2); game.players[i].setIdentity(players[i].identity); } - else if(lib.config.mode=='doudizhu'){ + else if(lib.config.mode=='doudizhu'||lib.config.mode=='single'){ game.players[i].init(players[i].name,players[i].name2); game.players[i].setIdentity(players[i].identity); } @@ -44085,7 +44118,7 @@ } } else{ - if(lib.configOL.mode=='versus'||lib.configOL.mode=='doudizhu') return; + if(lib.configOL.mode=='versus'||lib.configOL.mode=='doudizhu'||lib.configOL.mode=='single') return; if(lib.configOL.mode=='identity'&&lib.configOL.identity_mode=='zhong') return; if(!this.classList.contains('unselectable2')&&lib.configOL.number<=2) return; this.classList.toggle('unselectable2') @@ -45709,6 +45742,9 @@ versus:function(){ return !_status.connectMode&&get.mode()=='versus'&&_status.mode=='three'; }, + single:function(){ + return get.mode()=='single'&&_status.mode=='normal'; + }, mobileMe:function(player){ return (game.layout=='mobile'||game.layout=='long')&&!game.chess&&player.dataset.position==0; }, @@ -45843,16 +45879,16 @@ }, evtprompt:function(next,str){ if(next.prompt){ - next.prompt2=str; + next.set('prompt2',str); } else{ if(str.indexOf('###')==0){ var prompts=str.slice(3).split('###'); - if(prompts[0]) next.prompt=prompts[0]; - if(prompts[1]) next.prompt2=prompts[1]; + if(prompts[0]) next.set('prompt',prompts[0]); + if(prompts[1]) next.set('prompt2',prompts[1]); } else{ - next.prompt=str; + next.set('prompt',str); } } }, @@ -45886,7 +45922,7 @@ } } else{ - if(card.name!=get.name(card)){ + if(card.name!=get.name(card)||card.nature!=get.nature(card)){ var next={ name:get.name(card), suit:card.suit, @@ -46314,6 +46350,7 @@ } }, modetrans:function(config,server){ + if(config.mode=='doudizhu') return '欢乐斗地主'; if(config.mode=='versus'){ switch(config.versus_mode){ case '1v1':return '单人对决'; @@ -46322,6 +46359,13 @@ case '4v4':return '四人对决'; } } + else if(config.mode=='single'){ + switch(config.single_mode){ + case 'normal':return '新1v1'; + case 'changban':return '血战长坂坡'; + case 'dianjiang':return '点将单挑'; + } + } else if(config.mode=='identity'&&config.identity_mode=='zhong'){ return '忠胆英杰'; } diff --git a/game/package.js b/game/package.js index fc35cd5e7..01d48c048 100644 --- a/game/package.js +++ b/game/package.js @@ -50,6 +50,7 @@ window.noname_package={ stone:'炉石', brawl:'乱斗', doudizhu:'斗地主', + single:'单挑', }, submode:{ identity:{ @@ -72,7 +73,10 @@ window.noname_package={ combat:'战棋模式', three:'战棋统率', leader:'战棋君主' - } + }, + single:{ + normal:'新1v1', + }, }, background:{ ol_bg:'龙纹', diff --git a/game/source.js b/game/source.js index c98d7f3be..414a53fc7 100644 --- a/game/source.js +++ b/game/source.js @@ -64,6 +64,7 @@ window.noname_source_list=[ 'mode/guozhan.js', 'mode/identity.js', 'mode/tafang.js', + 'mode/single.js', 'mode/stone.js', 'mode/brawl.js', 'mode/versus.js', diff --git a/game/update.js b/game/update.js index b8649220e..a5f23c287 100644 --- a/game/update.js +++ b/game/update.js @@ -1,31 +1,35 @@ window.noname_update={ - version:'1.9.94.4', - update:'1.9.94.3.1', + version:'1.9.95', + update:'1.9.94.4', changeLog:[ + '新1v1模式', 'BUG修复', ], files:[ - 'card/extra.js', - 'card/sp.js', + //'card/extra.js', + //'card/sp.js', 'card/standard.js', //'card/swd.js', - //'card/guozhan.js', - 'character/diy.js', + 'card/guozhan.js', + //'character/diy.js', 'character/extra.js', //'character/mobile.js', - 'character/old.js', + //'character/old.js', 'character/refresh.js', 'character/shenhua.js', 'character/sp.js', //'character/tw.js', //'character/standard.js', - //'character/xinghuoliaoyuan.js', + 'character/xinghuoliaoyuan.js', 'character/yijiang.js', - //'mode/doudizhu.js', + 'mode/doudizhu.js', 'mode/guozhan.js', + 'mode/single.js', + 'mode/versus.js', //'mode/boss.js', 'game/game.js', - //'game/config.js', + 'game/config.js', 'game/package.js', + 'game/source.js', ] };