two
This commit is contained in:
parent
eac3318659
commit
631540be28
17
game/game.js
17
game/game.js
|
@ -4339,11 +4339,15 @@
|
|||
map.replace_handcard_two.show();
|
||||
map.replace_character_two.show();
|
||||
map.change_identity.show();
|
||||
map.two_assign.show();
|
||||
map.two_phaseswap.show();
|
||||
}
|
||||
else{
|
||||
map.replace_handcard_two.hide();
|
||||
map.replace_character_two.hide();
|
||||
map.change_identity.remove();
|
||||
map.two_assign.hide();
|
||||
map.two_phaseswap.hide();
|
||||
}
|
||||
},
|
||||
versus_mode:{
|
||||
|
@ -4398,13 +4402,21 @@
|
|||
four_assign:{
|
||||
name:'代替队友选将',
|
||||
init:false,
|
||||
// frequent:true,
|
||||
restart:true,
|
||||
},
|
||||
four_phaseswap:{
|
||||
name:'代替队友行动',
|
||||
init:false,
|
||||
// frequent:true,
|
||||
restart:true,
|
||||
},
|
||||
two_assign:{
|
||||
name:'代替队友选将',
|
||||
init:false,
|
||||
restart:true,
|
||||
},
|
||||
two_phaseswap:{
|
||||
name:'代替队友行动',
|
||||
init:false,
|
||||
restart:true,
|
||||
},
|
||||
free_choose:{
|
||||
|
@ -15800,6 +15812,7 @@
|
|||
if(_status.mode=='three') return this.side==me.side;
|
||||
if(_status.mode=='standard') return lib.storage.single_control&&this.side==me.side;
|
||||
if(_status.mode=='four') return get.config('four_phaseswap')&&this.side==me.side;
|
||||
if(_status.mode=='two') return get.config('two_phaseswap')&&this.side==me.side;
|
||||
return false;
|
||||
}
|
||||
else if(lib.config.mode=='boss'){
|
||||
|
|
|
@ -818,15 +818,21 @@ mode.versus={
|
|||
else{
|
||||
characterChoice=list.randomGets(7);
|
||||
}
|
||||
var dialog=ui.create.dialog('选择角色',[characterChoice,'character']);
|
||||
var basenum=1;
|
||||
var basestr='选择角色';
|
||||
if(get.config('two_assign')){
|
||||
basenum=2;
|
||||
basestr='选择你和队友的角色';
|
||||
event.two_assign=true;
|
||||
}
|
||||
if(get.config('replace_character_two')){
|
||||
game.me.chooseButton(true,dialog,2).set('onfree',true);
|
||||
basestr+='(含一名替补角色)';
|
||||
_status.replacetwo=true;
|
||||
game.additionaldead=[];
|
||||
basenum*=2;
|
||||
}
|
||||
else{
|
||||
game.me.chooseButton(true,dialog).set('onfree',true);
|
||||
}
|
||||
var dialog=ui.create.dialog(basestr,[characterChoice,'character']);
|
||||
game.me.chooseButton(true,dialog,basenum).set('onfree',true);
|
||||
if(!_status.brawl||!_status.brawl.noAddSetting){
|
||||
if(get.config('change_identity')){
|
||||
addSetting(dialog);
|
||||
|
@ -934,14 +940,35 @@ mode.versus={
|
|||
}
|
||||
}
|
||||
else{
|
||||
game.players[i].init(event.list.randomRemove());
|
||||
game.players[i].replacetwo=event.list.randomRemove();
|
||||
if(event.two_assign&&game.players[i].side==game.me.side){
|
||||
if(_status.replacetwo){
|
||||
game.players[i].init(result.links[2]);
|
||||
game.players[i].replacetwo=result.links[3];
|
||||
}
|
||||
else{
|
||||
game.players[i].init(result.links[1]);
|
||||
}
|
||||
}
|
||||
else{
|
||||
game.players[i].init(event.list.randomRemove());
|
||||
if(_status.replacetwo){
|
||||
game.players[i].replacetwo=event.list.randomRemove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
setTimeout(function(){
|
||||
ui.arena.classList.remove('choose-character');
|
||||
},500)
|
||||
},500);
|
||||
|
||||
if(get.config('two_phaseswap')){
|
||||
game.addGlobalSkill('autoswap');
|
||||
if(lib.config.show_handcardbutton){
|
||||
ui.versushs=ui.create.system('手牌',null,true);
|
||||
lib.setPopped(ui.versushs,game.versusHoverHandcards,220);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
chooseCharacterFour:function(){
|
||||
|
@ -1045,13 +1072,6 @@ mode.versus={
|
|||
_status.ladder=true;
|
||||
_status.ladder_mmr=0;
|
||||
}
|
||||
if(get.config('four_phaseswap')){
|
||||
game.addGlobalSkill('autoswap');
|
||||
if(lib.config.show_handcardbutton){
|
||||
ui.versushs=ui.create.system('手牌',null,true);
|
||||
lib.setPopped(ui.versushs,game.versusHoverHandcards,220);
|
||||
}
|
||||
}
|
||||
"step 1"
|
||||
if(event.current==game.me||(event.four_assign&&event.current.side==game.me.side)){
|
||||
var dialog=event.xdialog;
|
||||
|
@ -1138,6 +1158,13 @@ mode.versus={
|
|||
}
|
||||
}
|
||||
"step 3"
|
||||
if(get.config('four_phaseswap')){
|
||||
game.addGlobalSkill('autoswap');
|
||||
if(lib.config.show_handcardbutton){
|
||||
ui.versushs=ui.create.system('手牌',null,true);
|
||||
lib.setPopped(ui.versushs,game.versusHoverHandcards,220);
|
||||
}
|
||||
}
|
||||
if(event.xdialog){
|
||||
event.xdialog.close();
|
||||
}
|
||||
|
@ -2578,9 +2605,10 @@ mode.versus={
|
|||
},
|
||||
versusHoverHandcards:function(){
|
||||
var uiintro=ui.create.dialog('hidden');
|
||||
|
||||
var added=false;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].name&&game.players[i].side==game.me.side&&game.players[i]!=game.me){
|
||||
added=true;
|
||||
uiintro.add(get.translation(game.players[i]));
|
||||
var cards=game.players[i].getCards('h');
|
||||
if(cards.length){
|
||||
|
@ -2591,8 +2619,7 @@ mode.versus={
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return uiintro;
|
||||
if(added) return uiintro;
|
||||
},
|
||||
versusCheckEnemy:function(){
|
||||
_status.clicked=true;
|
||||
|
|
Loading…
Reference in New Issue