v1.9.46.1
This commit is contained in:
parent
2961693eef
commit
c6a60a39a2
|
@ -234,7 +234,14 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(target.isLinked()) return 1;
|
||||
if(target.isLinked()){
|
||||
if(target.hasSkillTag('link')) return 0;
|
||||
var f=target.hasSkillTag('nofire');
|
||||
var t=target.hasSkillTag('nothunder');
|
||||
if(f&&t) return 0;
|
||||
if(f||t) return 0.5;
|
||||
return 2;
|
||||
}
|
||||
if(get.attitude(player,target)>=0) return -0.9;
|
||||
if(ui.selected.targets.length) return -0.9;
|
||||
if(game.hasPlayer(function(current){
|
||||
|
|
|
@ -4131,6 +4131,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(player.isLinked()==false) player.link();
|
||||
},
|
||||
ai:{
|
||||
link:true,
|
||||
order:2,
|
||||
result:{
|
||||
player:function(player){
|
||||
|
|
|
@ -1363,7 +1363,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.draw(2);
|
||||
'step 1'
|
||||
player.chooseToDiscard('he',2,true).ai=function(card){
|
||||
var val=get.value(card);
|
||||
var val=-get.value(card);
|
||||
if(ui.selected.cards.length){
|
||||
if(get.suit(card)==get.suit(ui.selected.cards[0])) val++;
|
||||
if(get.number(card)==get.number(ui.selected.cards[0])) val+=3;
|
||||
|
|
|
@ -4771,7 +4771,7 @@
|
|||
map.enable_all_three.hide();
|
||||
map.enable_all_cards.hide();
|
||||
}
|
||||
if(config.versus_mode=='jiange'||config.versus_mode=='two'||
|
||||
if(config.versus_mode=='jiange'||config.versus_mode=='two'||config.versus_mode=='endless'||
|
||||
config.versus_mode=='three'||config.versus_mode=='one'||config.versus_mode=='siguo'){
|
||||
map.free_choose.show();
|
||||
}
|
||||
|
@ -4822,6 +4822,7 @@
|
|||
three:'统率',
|
||||
jiange:'剑阁',
|
||||
siguo:'四国',
|
||||
// endless:'无尽',
|
||||
// one:'<span style="display:inline-block;width:100%;text-align:center">1v1</span>',
|
||||
two:'<span style="display:inline-block;width:100%;text-align:center">2v2</span>',
|
||||
four:'<span style="display:inline-block;width:100%;text-align:center">4v4</span>'
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
window.noname_update={
|
||||
version:'1.9.46',
|
||||
// update:'1.9.45.3',
|
||||
version:'1.9.46.1',
|
||||
update:'1.9.46',
|
||||
changeLog:[
|
||||
'bug修复',
|
||||
'部分DIY比赛武将',
|
||||
'players://["old_lingju","yj_jushou","swd_guyue","ns_duangui","ns_shenpei","ns_masu","ns_zhangxiu","ns_zhangbao","yxs_luobinhan"]',
|
||||
// '部分DIY比赛武将',
|
||||
// 'players://["old_lingju","yj_jushou","swd_guyue","ns_duangui","ns_shenpei","ns_masu","ns_zhangxiu","ns_zhangbao","yxs_luobinhan"]',
|
||||
],
|
||||
files:[
|
||||
'game/game.js',
|
||||
|
@ -14,19 +14,19 @@ window.noname_update={
|
|||
// 'game/pressure.js',
|
||||
// 'game/asset.js',
|
||||
// 'card/*',
|
||||
// 'card/gujian.js',
|
||||
'card/extra.js',
|
||||
// 'card/yunchou.js',
|
||||
// 'card/hearth.js',
|
||||
// 'card/gwent.js',
|
||||
// 'card/standard.js',
|
||||
// 'character/*',
|
||||
// 'character/hearth.js',
|
||||
// 'character/gwent.js',
|
||||
// 'character/diy.js',
|
||||
'character/gwent.js',
|
||||
'character/diy.js',
|
||||
// 'character/standard.js',
|
||||
'character/shenhua.js',
|
||||
// 'character/shenhua.js',
|
||||
// 'character/refresh.js',
|
||||
'character/yijiang.js',
|
||||
// 'character/yijiang.js',
|
||||
// 'character/sp.js',
|
||||
// 'character/rank.js',
|
||||
// 'mode/identity.js',
|
||||
|
@ -34,7 +34,7 @@ window.noname_update={
|
|||
// 'mode/guozhan.js',
|
||||
'mode/versus.js',
|
||||
// 'mode/connect.js',
|
||||
'mode/chess.js',
|
||||
// 'mode/chess.js',
|
||||
// 'mode/tafang.js',
|
||||
// 'mode/guozhan.js',
|
||||
// 'mode/stone.js',
|
||||
|
@ -48,7 +48,7 @@ window.noname_update={
|
|||
// 'layout/long/layout.css',
|
||||
// 'layout/long2/layout.css',
|
||||
// 'layout/mobile/layout.css',
|
||||
// 'layout/newlayout/global.css',
|
||||
'layout/newlayout/global.css',
|
||||
// 'layout/mode/chess.css',
|
||||
// 'extension/boss/extension.js',
|
||||
]
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 59 KiB |
Binary file not shown.
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
@ -251,6 +251,8 @@
|
|||
|
||||
#arena.mobile.uslim_player .player:not([data-position='0'])>.count,
|
||||
#arena.mobile.lslim_player .player:not([data-position='0'])>.count,
|
||||
#arena.mobile.uslim_player.chess .player>.count,
|
||||
#arena.mobile.lslim_player.chess .player>.count,
|
||||
#arena:not(.mobile).uslim_player .player>.count,
|
||||
#arena:not(.mobile).lslim_player .player>.count{
|
||||
z-index: 3 !important;
|
||||
|
|
|
@ -2068,6 +2068,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var line1=ui.create.div(style2,this);
|
||||
var line2=ui.create.div(style2,this);
|
||||
line2.style.lineHeight='50px';
|
||||
line2.style.overflow='scroll';
|
||||
lib.setScroll(line2);
|
||||
var container=this.parentNode.parentNode;
|
||||
setTimeout(function(){
|
||||
var rect1=container.getBoundingClientRect();
|
||||
var rect2=line2.getBoundingClientRect();
|
||||
line2.style.height=(rect1.height-(rect2.top-rect1.top))+'px';
|
||||
},1000);
|
||||
if(_status.extensionmade.contains(name)){
|
||||
ui.create.node('button','管理扩展',line1,function(){
|
||||
ui.click.configMenu();
|
||||
|
@ -2142,8 +2150,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(init){
|
||||
this.style.transition='all 0s';
|
||||
this.style.height=(this.offsetHeight-10)+'px';
|
||||
this.style.overflow='scroll';
|
||||
lib.setScroll(this);
|
||||
// this.style.overflow='scroll';
|
||||
// lib.setScroll(this);
|
||||
var style2={position:'relative',display:'block',left:0,top:0,marginBottom:'6px',padding:0,width:'100%'};
|
||||
var style3={marginLeft:'4px',marginRight:'4px',position:'relative'}
|
||||
|
||||
|
@ -2158,6 +2166,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var line2=ui.create.div(style2,this);
|
||||
line1.style.marginBottom='10px';
|
||||
line2.style.lineHeight='50px';
|
||||
line2.style.overflow='scroll';
|
||||
lib.setScroll(line2);
|
||||
var container=this.parentNode.parentNode;
|
||||
setTimeout(function(){
|
||||
var rect1=container.getBoundingClientRect();
|
||||
var rect2=line2.getBoundingClientRect();
|
||||
line2.style.height=(rect1.height-(rect2.top-rect1.top))+'px';
|
||||
},1000);
|
||||
var scenes=[];
|
||||
for(var i in lib.storage.scene){
|
||||
scenes.push([i,i]);
|
||||
|
|
164
mode/versus.js
164
mode/versus.js
|
@ -92,6 +92,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
else if(_status.mode=='two'){
|
||||
game.prepareArena(4);
|
||||
}
|
||||
else if(_status.mode=='endless'){
|
||||
game.prepareArena(2);
|
||||
}
|
||||
else if(_status.mode=='three'){
|
||||
if(!get.config('enable_all_cards')){
|
||||
lib.translate.wuzhong_info+='若对方存活角色多于己方,则额外摸一张牌';
|
||||
|
@ -198,6 +201,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
game.chooseCharacterTwo();
|
||||
}
|
||||
else if(_status.mode=='endless'){
|
||||
game.chooseCharacterEndless();
|
||||
}
|
||||
else if(_status.mode=='siguo'){
|
||||
var list=['wei','wei','shu','shu','wu','wu','qun','qun'].randomSort();
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
|
@ -266,7 +272,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
}
|
||||
_status.videoInited=true;
|
||||
if(_status.mode=='four'||_status.mode=='jiange'||_status.connectMode||_status.mode=='two'||_status.mode=='siguo'){
|
||||
if(_status.mode=='four'||_status.mode=='jiange'||_status.connectMode||
|
||||
_status.mode=='two'||_status.mode=='siguo'||_status.mode=='endless'){
|
||||
info.push(false);
|
||||
}
|
||||
else if(_status.mode=='three'){
|
||||
|
@ -318,6 +325,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
game.phaseLoop(firstChoose);
|
||||
}
|
||||
else if(_status.mode=='endless'){
|
||||
_status.first_less=true;
|
||||
_status.first_less_forced=true;
|
||||
var firstChoose=_status.firstAct;
|
||||
game.gameDraw(firstChoose);
|
||||
game.phaseLoop(firstChoose);
|
||||
}
|
||||
else if(_status.mode=='four'){
|
||||
game.gameDraw(_status.firstAct,function(player){
|
||||
if(player==_status.firstAct.previousSeat){
|
||||
|
@ -510,6 +524,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var str2;
|
||||
switch(_status.mode){
|
||||
case 'two':str2='欢乐成双';break;
|
||||
case 'endless':str2='无尽模式';break;
|
||||
case 'three':str2='统率三军';break;
|
||||
case 'siguo':str2='同舟共济';break;
|
||||
case 'jiange':str2='守卫剑阁';break;
|
||||
|
@ -1296,6 +1311,153 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
});
|
||||
},
|
||||
chooseCharacterEndless:function(){
|
||||
var next=game.createEvent('chooseCharacter',false);
|
||||
next.showConfig=true;
|
||||
next.setContent(function(){
|
||||
'step 0'
|
||||
ui.arena.classList.add('choose-character');
|
||||
for(var i in lib.skill){
|
||||
if(lib.skill[i].changeSeat){
|
||||
lib.skill[i]={};
|
||||
if(lib.translate[i+'_info']){
|
||||
lib.translate[i+'_info']='此模式下不可用';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var firstChoose=game.players.randomGet();
|
||||
_status.firstAct=firstChoose;
|
||||
|
||||
firstChoose.side=false;
|
||||
firstChoose.next.side=true;
|
||||
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side==game.me.side){
|
||||
game.players[i].node.identity.firstChild.innerHTML='友';
|
||||
}
|
||||
else{
|
||||
game.players[i].node.identity.firstChild.innerHTML='敌';
|
||||
}
|
||||
game.players[i].node.identity.dataset.color=game.players[i].side+'zhu';
|
||||
}
|
||||
var list=[];
|
||||
for(i in lib.character){
|
||||
if(!lib.filter.characterDisabled(i)){
|
||||
list.push(i);
|
||||
}
|
||||
}
|
||||
var choose=[];
|
||||
event.list=list;
|
||||
_status.endlessListAll=list.slice(0);
|
||||
|
||||
var characterChoice=list.randomGets(6);
|
||||
var dialog=ui.create.dialog('选择角色',[characterChoice,'character']);
|
||||
game.me.chooseButton(true,dialog).set('onfree',true);
|
||||
|
||||
ui.create.cheat=function(){
|
||||
_status.createControl=ui.cheat2;
|
||||
ui.cheat=ui.create.control('更换',function(){
|
||||
if(ui.cheat2&&ui.cheat2.dialog==_status.event.dialog){
|
||||
return;
|
||||
}
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-3);
|
||||
}
|
||||
var buttons=ui.create.div('.buttons');
|
||||
var node=_status.event.dialog.buttons[0].parentNode;
|
||||
_status.event.dialog.buttons=ui.create.buttons(list.randomGets(7),'character',buttons);
|
||||
_status.event.dialog.content.insertBefore(buttons,node);
|
||||
buttons.animate('start');
|
||||
node.remove();
|
||||
game.uncheck();
|
||||
game.check();
|
||||
});
|
||||
delete _status.createControl;
|
||||
};
|
||||
if(lib.onfree){
|
||||
lib.onfree.push(function(){
|
||||
event.dialogxx=ui.create.characterDialog('heightset');
|
||||
if(ui.cheat2){
|
||||
ui.cheat2.animate('controlpressdownx',500);
|
||||
ui.cheat2.classList.remove('disabled');
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
event.dialogxx=ui.create.characterDialog('heightset');
|
||||
}
|
||||
ui.create.cheat2=function(){
|
||||
ui.cheat2=ui.create.control('自由选将',function(){
|
||||
if(this.dialog==_status.event.dialog){
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(50);
|
||||
}
|
||||
this.dialog.close();
|
||||
_status.event.dialog=this.backup;
|
||||
this.backup.open();
|
||||
delete this.backup;
|
||||
game.uncheck();
|
||||
game.check();
|
||||
if(ui.cheat){
|
||||
ui.cheat.animate('controlpressdownx',500);
|
||||
ui.cheat.classList.remove('disabled');
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(game.changeCoin){
|
||||
game.changeCoin(-10);
|
||||
}
|
||||
this.backup=_status.event.dialog;
|
||||
_status.event.dialog.close();
|
||||
_status.event.dialog=_status.event.parent.dialogxx;
|
||||
this.dialog=_status.event.dialog;
|
||||
this.dialog.open();
|
||||
game.uncheck();
|
||||
game.check();
|
||||
if(ui.cheat){
|
||||
ui.cheat.classList.add('disabled');
|
||||
}
|
||||
}
|
||||
});
|
||||
ui.cheat2.classList.add('disabled');
|
||||
}
|
||||
if(!_status.brawl||!_status.brawl.chooseCharacterFixed){
|
||||
if(!ui.cheat&&get.config('change_choice')){
|
||||
ui.create.cheat();
|
||||
}
|
||||
if(!ui.cheat2&&get.config('free_choose')){
|
||||
ui.create.cheat2();
|
||||
}
|
||||
}
|
||||
'step 1'
|
||||
if(ui.cheat){
|
||||
ui.cheat.close();
|
||||
delete ui.cheat;
|
||||
}
|
||||
if(ui.cheat2){
|
||||
ui.cheat2.close();
|
||||
delete ui.cheat2;
|
||||
}
|
||||
for(var i=0;i<result.links.length;i++){
|
||||
game.addRecentCharacter(result.links[i]);
|
||||
}
|
||||
game.me.init(result.links[0]);
|
||||
event.list.remove(game.me.name);
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i]!=game.me){
|
||||
game.players[i].init(event.list.randomRemove());
|
||||
if(_status.replacetwo){
|
||||
game.players[i].replacetwo=event.list.randomRemove();
|
||||
}
|
||||
}
|
||||
}
|
||||
_status.endlessList=event.list;
|
||||
setTimeout(function(){
|
||||
ui.arena.classList.remove('choose-character');
|
||||
},500);
|
||||
});
|
||||
},
|
||||
chooseCharacterFour:function(){
|
||||
var next=game.createEvent('chooseCharacter',false);
|
||||
next.showConfig=true;
|
||||
|
|
Loading…
Reference in New Issue