This commit is contained in:
Spmario233 2019-11-07 22:48:06 +08:00 committed by GitHub
parent 9d94fdedd5
commit 8dbafd5e59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 101 additions and 46 deletions

View File

@ -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',

View File

@ -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'],

View File

@ -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<event.targets2.length;i++){
@ -9542,23 +9570,23 @@
}
else{
var next=player.chooseTarget();
next._get_card=card;
next.filterTarget=function(card,player,target){
next.set('_get_card',card);
next.set('filterTarget',function(card,player,target){
if(!_status.event.targets.contains(target)) return false;
return lib.filter[_status.event.nodistance?'targetEnabled':'filterTarget'].apply(this,arguments);
};
});
next.set('ai',event.ai||get.effect);
if(typeof info.selectTarget=='function'){
next.selectTarget=info.selectTarget;
next.set('selectTarget',info.selectTarget);
}
else{
next.selectTarget=get.select(info.selectTarget);
next.set('selectTarget',get.select(info.selectTarget));
}
if(event.nodistance) next.nodistance=true;
if(event.forced) next.forced=true;
next.targets=targets;
next.prompt=event.prompt||('选择'+get.translation(card)+'的目标');
if(event.prompt2) next.prompt2=event.prompt2;
if(event.nodistance) next.set('nodistance',true);
if(event.forced) next.set('forced',true);
next.set('targets',targets);
next.set('prompt',event.prompt||('选择'+get.translation(card)+'的目标'));
if(event.prompt2) next.set('prompt2',event.prompt2);
}
'step 1'
if(result.bool){
@ -9758,7 +9786,7 @@
else{
event.list=list;
var next=player.chooseControl(list);
next.prompt='请选择恢复一个装备栏';
next.set('prompt','请选择恢复一个装备栏');
if(!event.ai) event.ai=function(event,player,list){
return list.randomGet();
}
@ -9784,7 +9812,7 @@
else{
event.list=list;
var next=player.chooseControl(list);
next.prompt='请选择废除一个装备栏';
next.set('prompt','请选择废除一个装备栏');
if(!event.ai) event.ai=function(event,player,list){
return list.randomGet();
}
@ -10538,24 +10566,25 @@
}
if(typeof str=='function'){str=str(trigger,player)}
var next=player.chooseBool(str);
next.set('forceDie',true);
next.ai=function(){
return !check||check(trigger,player);
};
if(typeof info.prompt2=='function'){
next.prompt2=info.prompt2(trigger,player);
next.set('prompt2',info.prompt2(trigger,player));
}
else if(typeof info.prompt2=='string'){
next.prompt2=info.prompt2;
next.set('prompt2',info.prompt2);
}
else if(info.prompt2!=false&&lib.translate[event.skill+'_info']){
next.prompt2=lib.translate[event.skill+'_info'];
next.set('prompt2',lib.translate[event.skill+'_info']);
}
if(trigger.skillwarn){
if(next.prompt2){
next.prompt2='<span class="thundertext">'+trigger.skillwarn+'。</span>'+next.prompt2;
next.set('prompt2','<span class="thundertext">'+trigger.skillwarn+'。</span>'+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 '忠胆英杰';
}

View File

@ -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:'龙纹',

View File

@ -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',

View File

@ -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',
]
};