commit
7ce47a9c11
|
@ -141,7 +141,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
var target=_status.event.player;
|
var target=_status.event.player;
|
||||||
var evt=_status.event.getParent();
|
var evt=_status.event.getParent();
|
||||||
var bool=true;
|
var bool=true;
|
||||||
if(_status.event.shanRequired>1&&!get.is.object(card)&&target.countCards('h','shan')<_status.event.shanRequired){
|
if(_status.event.shanRequired>1&&!get.is.object(card)&&target.countCards('h','shan')<_status.event.shanRequired-(_status.event.shanIgnored||0)){
|
||||||
bool=false;
|
bool=false;
|
||||||
}
|
}
|
||||||
else if(target.hasSkillTag('useShan')){
|
else if(target.hasSkillTag('useShan')){
|
||||||
|
|
1045
game/game.js
1045
game/game.js
File diff suppressed because it is too large
Load Diff
|
@ -1178,8 +1178,9 @@ body>.background.upper {
|
||||||
z-index: -4
|
z-index: -4
|
||||||
}
|
}
|
||||||
body>.background.land {
|
body>.background.land {
|
||||||
|
background-position: center;
|
||||||
|
background-size: cover;
|
||||||
transition: all 2s;
|
transition: all 2s;
|
||||||
background-size:cover;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup:not(.guanxing) {
|
.popup:not(.guanxing) {
|
||||||
|
@ -3500,9 +3501,13 @@ div:not(.handcards)>.card>.info>span,
|
||||||
animation: config 0.5s;
|
animation: config 0.5s;
|
||||||
-webkit-animation: config 0.5s;
|
-webkit-animation: config 0.5s;
|
||||||
}
|
}
|
||||||
.flash {
|
.flash,
|
||||||
animation: flash 1s;
|
.flash-animation-iteration-count-infinite {
|
||||||
-webkit-animation: flash 1s;
|
animation-name: flash;
|
||||||
|
animation-duration: 1s;
|
||||||
|
}
|
||||||
|
.flash-animation-iteration-count-infinite {
|
||||||
|
animation-iteration-count: infinite;
|
||||||
}
|
}
|
||||||
.flip {
|
.flip {
|
||||||
animation: flip 1s;
|
animation: flip 1s;
|
||||||
|
@ -3884,6 +3889,10 @@ div:hover>.intro {
|
||||||
.player .identity[data-color="zhu"],
|
.player .identity[data-color="zhu"],
|
||||||
.player .identity[data-color="truezhu"],
|
.player .identity[data-color="truezhu"],
|
||||||
.player .identity[data-color="enemy"],
|
.player .identity[data-color="enemy"],
|
||||||
|
div[data-nature='zhu'],
|
||||||
|
span[data-nature='zhu'],
|
||||||
|
div[data-nature='enemy'],
|
||||||
|
span[data-nature='enemy'],
|
||||||
div[data-nature='fire'],
|
div[data-nature='fire'],
|
||||||
span[data-nature='fire'] {
|
span[data-nature='fire'] {
|
||||||
text-shadow: black 0 0 1px,rgba(232, 53, 53,1) 0 0 2px,rgba(232, 53, 53,1) 0 0 5px,rgba(232, 53, 53,1) 0 0 10px,
|
text-shadow: black 0 0 1px,rgba(232, 53, 53,1) 0 0 2px,rgba(232, 53, 53,1) 0 0 5px,rgba(232, 53, 53,1) 0 0 10px,
|
||||||
|
@ -3936,6 +3945,8 @@ span[data-nature='firemx'] {
|
||||||
.player .identity[data-color="qun"],
|
.player .identity[data-color="qun"],
|
||||||
.player .identity[data-color="neutral"],
|
.player .identity[data-color="neutral"],
|
||||||
.player .identity[data-color="friend2"],
|
.player .identity[data-color="friend2"],
|
||||||
|
div[data-nature='zhong'],
|
||||||
|
span[data-nature='zhong'],
|
||||||
div[data-nature='metal'],
|
div[data-nature='metal'],
|
||||||
span[data-nature='metal'] {
|
span[data-nature='metal'] {
|
||||||
text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 5px,rgba(255, 203, 0,1) 0 0 10px,
|
text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 5px,rgba(255, 203, 0,1) 0 0 10px,
|
||||||
|
@ -4006,6 +4017,8 @@ span[data-nature='qunmm'] {
|
||||||
.player .identity[data-color="rYe"],
|
.player .identity[data-color="rYe"],
|
||||||
.player .identity[data-color="bYe"],
|
.player .identity[data-color="bYe"],
|
||||||
.player .identity[data-color="jin"],
|
.player .identity[data-color="jin"],
|
||||||
|
div[data-nature='nei'],
|
||||||
|
span[data-nature='nei'],
|
||||||
div[data-nature='thunder'],
|
div[data-nature='thunder'],
|
||||||
span[data-nature='thunder'] {
|
span[data-nature='thunder'] {
|
||||||
text-shadow: rgba(100, 74, 139,1) 0 0 2px,rgba(100, 74, 139,1) 0 0 5px,rgba(100, 74, 139,1) 0 0 10px,
|
text-shadow: rgba(100, 74, 139,1) 0 0 2px,rgba(100, 74, 139,1) 0 0 5px,rgba(100, 74, 139,1) 0 0 10px,
|
||||||
|
@ -4041,6 +4054,8 @@ span[data-nature='kamimm'] {
|
||||||
|
|
||||||
.player .identity[data-color="fan"],
|
.player .identity[data-color="fan"],
|
||||||
.player .identity[data-color="wu"],
|
.player .identity[data-color="wu"],
|
||||||
|
div[data-nature='fan'],
|
||||||
|
span[data-nature='fan'],
|
||||||
div[data-nature='wood'],
|
div[data-nature='wood'],
|
||||||
span[data-nature='wood'] {
|
span[data-nature='wood'] {
|
||||||
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 5px,rgba(57, 123, 4,1) 0 0 10px,
|
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 5px,rgba(57, 123, 4,1) 0 0 10px,
|
||||||
|
@ -4065,6 +4080,8 @@ span[data-nature='woodmm'] {
|
||||||
.player .identity[data-color="falsezhu"],
|
.player .identity[data-color="falsezhu"],
|
||||||
.player .identity[data-color="friend"],
|
.player .identity[data-color="friend"],
|
||||||
.water,
|
.water,
|
||||||
|
div[data-nature='friend'],
|
||||||
|
span[data-nature='friend'],
|
||||||
div[data-nature='water'],
|
div[data-nature='water'],
|
||||||
span[data-nature='water'] {
|
span[data-nature='water'] {
|
||||||
text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 5px,rgba(78, 117, 140,1) 0 0 10px,
|
text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 5px,rgba(78, 117, 140,1) 0 0 10px,
|
||||||
|
|
|
@ -452,15 +452,6 @@
|
||||||
/*--------位置(1人)------*/
|
/*--------位置(1人)------*/
|
||||||
.player[data-position='0']{top:calc(100% - 170px);left:calc(50% - 75px);}
|
.player[data-position='0']{top:calc(100% - 170px);left:calc(50% - 75px);}
|
||||||
/*--------位置(联机)------*/
|
/*--------位置(联机)------*/
|
||||||
#window>.player.connect[data-position='0']{left:calc(200% / 7 - 1200px / 7);top:calc(300% / 7 - 160px + 5px);}
|
|
||||||
#window>.player.connect[data-position='1']{left:calc(300% / 7 - 750px / 7);top:calc(300% / 7 - 160px + 5px);}
|
|
||||||
#window>.player.connect[data-position='2']{left:calc(400% / 7 - 300px / 7);top:calc(300% / 7 - 160px + 5px);}
|
|
||||||
#window>.player.connect[data-position='3']{left:calc(500% / 7 + 150px / 7);top:calc(300% / 7 - 160px + 5px);}
|
|
||||||
#window>.player.connect[data-position='4']{left:calc(200% / 7 - 1200px / 7);top:calc(400% / 7 - 40px + 5px);}
|
|
||||||
#window>.player.connect[data-position='5']{left:calc(300% / 7 - 750px / 7);top:calc(400% / 7 - 40px + 5px);}
|
|
||||||
#window>.player.connect[data-position='6']{left:calc(400% / 7 - 300px / 7);top:calc(400% / 7 - 40px + 5px);}
|
|
||||||
#window>.player.connect[data-position='7']{left:calc(500% / 7 + 150px / 7);top:calc(400% / 7 - 40px + 5px);}
|
|
||||||
|
|
||||||
#window>.player.connect[data-position='c0']{left:calc(50% - 255px);top:calc(50% - 90px)}
|
#window>.player.connect[data-position='c0']{left:calc(50% - 255px);top:calc(50% - 90px)}
|
||||||
#window>.player.connect[data-position='c1']{left:calc(50% - 75px);top:calc(50% - 90px)}
|
#window>.player.connect[data-position='c1']{left:calc(50% - 75px);top:calc(50% - 90px)}
|
||||||
#window>.player.connect[data-position='c2']{left:calc(50% + 105px);top:calc(50% - 90px)}
|
#window>.player.connect[data-position='c2']{left:calc(50% + 105px);top:calc(50% - 90px)}
|
||||||
|
|
384
mode/brawl.js
384
mode/brawl.js
|
@ -1143,377 +1143,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
qunxionggeju:{
|
|
||||||
name:'群雄割据',
|
|
||||||
mode:'guozhan',
|
|
||||||
intro:[
|
|
||||||
'开放不同势力组合,以优先亮出的武将牌作为自己的势力,双势力武将则使用列表的第一个势力',
|
|
||||||
],
|
|
||||||
showcase:function(init){
|
|
||||||
var node=this;
|
|
||||||
var list=[
|
|
||||||
['re_yuanshao','re_lidian'],
|
|
||||||
['zhangliao','sunquan'],
|
|
||||||
['xin_fazheng','sp_lvfan'],
|
|
||||||
['sunjian','lvbu'],
|
|
||||||
['jin_simashi','re_weiyan'],
|
|
||||||
['guanyu','sunce'],
|
|
||||||
['zhenji','sp_zhangjiao'],
|
|
||||||
['guojia','sp_zhugeliang'],
|
|
||||||
];
|
|
||||||
list.randomSort();
|
|
||||||
var func=function(){
|
|
||||||
var card=ui.create.player(null,true);
|
|
||||||
var name=list.shift();
|
|
||||||
card.init(name[0],name[1]);
|
|
||||||
card.node.marks.remove();
|
|
||||||
card.node.count.remove();
|
|
||||||
card.node.hp.remove();
|
|
||||||
card.classList.remove('unseen');
|
|
||||||
node.nodes.push(card);
|
|
||||||
card.style.position='absolute';
|
|
||||||
card.style.zIndex=2;
|
|
||||||
card.style.transition='all 2s';
|
|
||||||
var rand1=Math.round(Math.random()*100);
|
|
||||||
var rand2=Math.round(Math.random()*100);
|
|
||||||
var rand3=Math.round(Math.random()*40)-20;
|
|
||||||
card.style.left='calc('+rand1+'% - '+(rand1*1.5)+'px)';
|
|
||||||
card.style.top='calc('+rand2+'% - '+(rand2*1.8)+'px)';
|
|
||||||
card.style.transform='scale(0.8) rotate('+rand3+'deg)';
|
|
||||||
node.appendChild(card);
|
|
||||||
ui.refresh(card);
|
|
||||||
};
|
|
||||||
|
|
||||||
var list2=['feilongduofeng','taipingyaoshu','dinglanyemingzhu'];
|
|
||||||
var func2=function(){
|
|
||||||
var card=game.createCard(list2.shift(),'noclick');
|
|
||||||
node.nodes.push(card);
|
|
||||||
card.style.position='absolute';
|
|
||||||
card.style.zIndex=2;
|
|
||||||
card.style.transition='all 2s';
|
|
||||||
var rand1=Math.round(Math.random()*100);
|
|
||||||
var rand2=Math.round(Math.random()*100);
|
|
||||||
var rand3=Math.round(Math.random()*40)-20;
|
|
||||||
card.style.left='calc('+rand1+'% - '+rand1+'px)';
|
|
||||||
card.style.top='calc('+rand2+'% - '+rand2+'px)';
|
|
||||||
card.style.transform='rotate('+rand3+'deg)';
|
|
||||||
node.appendChild(card);
|
|
||||||
ui.refresh(card);
|
|
||||||
};
|
|
||||||
if(init){
|
|
||||||
node.nodes=[];
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
while(node.nodes.length){
|
|
||||||
node.nodes.shift().remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for(var i=0;i<5;i++){
|
|
||||||
func();
|
|
||||||
}
|
|
||||||
for(var i=0;i<3;i++){
|
|
||||||
func2();
|
|
||||||
func();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
init:function(){},
|
|
||||||
content:{
|
|
||||||
chooseCharacterBefore:function(){
|
|
||||||
game.chooseCharacter=function(){
|
|
||||||
var next=game.createEvent('chooseCharacter');
|
|
||||||
next.showConfig=true;
|
|
||||||
next.addPlayer=true;
|
|
||||||
next.ai=function(player,list,back){
|
|
||||||
var mainx=list[0];
|
|
||||||
var vicex=list[1];
|
|
||||||
if(get.guozhanReverse(mainx,vicex)){
|
|
||||||
mainx=list[1];
|
|
||||||
vicex=list[0];
|
|
||||||
}
|
|
||||||
player.init(mainx,vicex,false);
|
|
||||||
if(back){
|
|
||||||
list.remove(player.name1);
|
|
||||||
list.remove(player.name2);
|
|
||||||
for(var i=0;i<list.length;i++){
|
|
||||||
back.push(list[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
next.setContent(function(){
|
|
||||||
"step 0"
|
|
||||||
var eltp={
|
|
||||||
getGuozhanGroup:function(num){
|
|
||||||
if(num==1) return lib.character[this.name2][1];
|
|
||||||
return lib.character[this.name1][1];
|
|
||||||
},
|
|
||||||
wontYe:function(group){
|
|
||||||
if(!group) group=lib.character[this.name1][1];
|
|
||||||
if(_status.yeidentity&&_status.yeidentity.contains(group)) return false;
|
|
||||||
if(get.zhu(this,null,true)) return true;
|
|
||||||
var num=3,total=get.population();
|
|
||||||
if(total<6) num=1;
|
|
||||||
else if(total<8) num=2;
|
|
||||||
return get.totalPopulation(group)+1<=num;
|
|
||||||
},
|
|
||||||
}
|
|
||||||
for(var i of game.players){
|
|
||||||
for(var j in eltp) i[j]=eltp[j];
|
|
||||||
}
|
|
||||||
for(var j in eltp) lib.element.player[j]=eltp[j];
|
|
||||||
ui.arena.classList.add('choose-character');
|
|
||||||
var addSetting=function(dialog){
|
|
||||||
dialog.add('选择座位').classList.add('add-setting');
|
|
||||||
var seats=document.createElement('table');
|
|
||||||
seats.classList.add('add-setting');
|
|
||||||
seats.style.margin='0';
|
|
||||||
seats.style.width='100%';
|
|
||||||
seats.style.position='relative';
|
|
||||||
for(var i=1;i<=game.players.length;i++){
|
|
||||||
var td=ui.create.div('.shadowed.reduce_radius.pointerdiv.tdnode');
|
|
||||||
td.innerHTML='<span>'+get.cnNumber(i,true)+'</span>';
|
|
||||||
td.link=i-1;
|
|
||||||
seats.appendChild(td);
|
|
||||||
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
|
|
||||||
if(_status.dragged) return;
|
|
||||||
if(_status.justdragged) return;
|
|
||||||
if(_status.cheat_seat){
|
|
||||||
_status.cheat_seat.classList.remove('bluebg');
|
|
||||||
if(_status.cheat_seat==this){
|
|
||||||
delete _status.cheat_seat;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.classList.add('bluebg');
|
|
||||||
_status.cheat_seat=this;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
dialog.content.appendChild(seats);
|
|
||||||
if(game.me==game.zhu){
|
|
||||||
seats.previousSibling.style.display='none';
|
|
||||||
seats.style.display='none';
|
|
||||||
}
|
|
||||||
|
|
||||||
dialog.add(ui.create.div('.placeholder.add-setting'));
|
|
||||||
dialog.add(ui.create.div('.placeholder.add-setting'));
|
|
||||||
if(get.is.phoneLayout()) dialog.add(ui.create.div('.placeholder.add-setting'));
|
|
||||||
};
|
|
||||||
var removeSetting=function(){
|
|
||||||
var dialog=_status.event.dialog;
|
|
||||||
if(dialog){
|
|
||||||
dialog.style.height='';
|
|
||||||
delete dialog._scrollset;
|
|
||||||
var list=Array.from(dialog.querySelectorAll('.add-setting'));
|
|
||||||
while(list.length){
|
|
||||||
list.shift().remove();
|
|
||||||
}
|
|
||||||
ui.update();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
event.addSetting=addSetting;
|
|
||||||
event.removeSetting=removeSetting;
|
|
||||||
|
|
||||||
var chosen=lib.config.continue_name||[];
|
|
||||||
game.saveConfig('continue_name');
|
|
||||||
event.chosen=chosen;
|
|
||||||
|
|
||||||
var i;
|
|
||||||
event.list=[];
|
|
||||||
for(i in lib.character){
|
|
||||||
if(i.indexOf('gz_shibing')==0) continue;
|
|
||||||
if(chosen.contains(i)) continue;
|
|
||||||
if(lib.filter.characterDisabled(i)) continue;
|
|
||||||
if(get.config('onlyguozhan')){
|
|
||||||
if(!lib.characterPack.mode_guozhan[i]) continue;
|
|
||||||
if(get.is.jun(i)) continue;
|
|
||||||
}
|
|
||||||
if(lib.character[i][4].contains('hiddenSkill')) continue;
|
|
||||||
if(lib.character[i][2]==3||lib.character[i][2]==4||lib.character[i][2]==5)
|
|
||||||
event.list.push(i);
|
|
||||||
}
|
|
||||||
_status.characterlist=event.list.slice(0);
|
|
||||||
_status.yeidentity=[];
|
|
||||||
event.list.randomSort();
|
|
||||||
// var list=event.list.splice(0,parseInt(get.config('choice_num')));
|
|
||||||
var list=event.list.randomRemove(parseInt(get.config('choice_num')));
|
|
||||||
if(_status.auto){
|
|
||||||
event.ai(game.me,list);
|
|
||||||
lib.init.onfree();
|
|
||||||
}
|
|
||||||
else if(chosen.length){
|
|
||||||
game.me.init(chosen[0],chosen[1],false);
|
|
||||||
lib.init.onfree();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
var dialog=ui.create.dialog('选择角色','hidden',[list,'character']);
|
|
||||||
if(get.config('change_identity')){
|
|
||||||
addSetting(dialog);
|
|
||||||
}
|
|
||||||
var next=game.me.chooseButton(dialog,true,2).set('onfree',true);
|
|
||||||
next.filterButton=function(button){
|
|
||||||
if(ui.dialog.buttons.length<=10){
|
|
||||||
for(var i=0;i<ui.dialog.buttons.length;i++){
|
|
||||||
if(ui.dialog.buttons[i]!=button){
|
|
||||||
if(lib.element.player.perfectPair.call({
|
|
||||||
name1:button.link,name2:ui.dialog.buttons[i].link
|
|
||||||
})){
|
|
||||||
button.classList.add('glow2');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
next.switchToAuto=function(){
|
|
||||||
event.ai(game.me,list);
|
|
||||||
ui.arena.classList.remove('selecting');
|
|
||||||
};
|
|
||||||
var createCharacterDialog=function(){
|
|
||||||
event.dialogxx=ui.create.characterDialog('heightset',function(i){
|
|
||||||
if(i.indexOf('gz_shibing')==0) return true;
|
|
||||||
if(get.config('onlyguozhan')){
|
|
||||||
if(!lib.characterPack.mode_guozhan[i]) return true;
|
|
||||||
if(get.is.jun(i)) return true;
|
|
||||||
}
|
|
||||||
},get.config('onlyguozhanexpand')?'expandall':undefined,get.config('onlyguozhan')?'onlypack:mode_guozhan':undefined);
|
|
||||||
if(ui.cheat2){
|
|
||||||
ui.cheat2.animate('controlpressdownx',500);
|
|
||||||
ui.cheat2.classList.remove('disabled');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
if(lib.onfree){
|
|
||||||
lib.onfree.push(createCharacterDialog);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
createCharacterDialog();
|
|
||||||
}
|
|
||||||
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');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if(lib.onfree){
|
|
||||||
ui.cheat2.classList.add('disabled');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
event.list=event.list.concat(list);
|
|
||||||
event.list.randomSort();
|
|
||||||
// list=event.list.splice(0,parseInt(get.config('choice_num')));
|
|
||||||
list=event.list.randomRemove(parseInt(get.config('choice_num')));
|
|
||||||
var buttons=ui.create.div('.buttons');
|
|
||||||
var node=_status.event.dialog.buttons[0].parentNode;
|
|
||||||
_status.event.dialog.buttons=ui.create.buttons(list,'character',buttons);
|
|
||||||
_status.event.dialog.content.insertBefore(buttons,node);
|
|
||||||
buttons.animate('start');
|
|
||||||
node.remove();
|
|
||||||
game.uncheck();
|
|
||||||
game.check();
|
|
||||||
});
|
|
||||||
delete _status.createControl;
|
|
||||||
}
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
if(result.buttons){
|
|
||||||
game.me.init(result.buttons[0].link,result.buttons[1].link,false);
|
|
||||||
game.addRecentCharacter(result.buttons[0].link,result.buttons[1].link);
|
|
||||||
}
|
|
||||||
// game.me.setIdentity(game.me.group);
|
|
||||||
event.list.remove(game.me.name1);
|
|
||||||
event.list.remove(game.me.name2);
|
|
||||||
for(var i=0;i<game.players.length;i++){
|
|
||||||
if(game.players[i]!=game.me){
|
|
||||||
event.ai(game.players[i],event.list.randomRemove(parseInt(get.config('choice_num'))),event.list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for(var i=0;i<game.players.length;i++){
|
|
||||||
game.players[i].classList.add('unseen');
|
|
||||||
game.players[i].classList.add('unseen2');
|
|
||||||
_status.characterlist.remove(game.players[i].name);
|
|
||||||
_status.characterlist.remove(game.players[i].name2);
|
|
||||||
if(game.players[i]!=game.me){
|
|
||||||
game.players[i].node.identity.firstChild.innerHTML='猜';
|
|
||||||
game.players[i].node.identity.dataset.color='unknown';
|
|
||||||
game.players[i].node.identity.classList.add('guessing');
|
|
||||||
}
|
|
||||||
game.players[i].hiddenSkills=lib.character[game.players[i].name1][3].slice(0);
|
|
||||||
var hiddenSkills2=lib.character[game.players[i].name2][3];
|
|
||||||
for(var j=0;j<hiddenSkills2.length;j++){
|
|
||||||
game.players[i].hiddenSkills.add(hiddenSkills2[j]);
|
|
||||||
}
|
|
||||||
for(var j=0;j<game.players[i].hiddenSkills.length;j++){
|
|
||||||
if(!lib.skill[game.players[i].hiddenSkills[j]]){
|
|
||||||
game.players[i].hiddenSkills.splice(j--,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
game.players[i].group='unknown';
|
|
||||||
game.players[i].sex='unknown';
|
|
||||||
game.players[i].name1=game.players[i].name;
|
|
||||||
game.players[i].name='unknown';
|
|
||||||
game.players[i].identity='unknown';
|
|
||||||
game.players[i].node.name.show();
|
|
||||||
game.players[i].node.name2.show();
|
|
||||||
game.players[i]._group=lib.character[game.players[i].name1][1];
|
|
||||||
for(var j=0;j<game.players[i].hiddenSkills.length;j++){
|
|
||||||
game.players[i].addSkillTrigger(game.players[i].hiddenSkills[j],true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setTimeout(function(){
|
|
||||||
ui.arena.classList.remove('choose-character');
|
|
||||||
},500);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
duzhansanguo:{
|
duzhansanguo:{
|
||||||
name:'毒战三国',
|
name:'毒战三国',
|
||||||
mode:'identity',
|
mode:'identity',
|
||||||
|
@ -4204,7 +3833,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
},style);
|
},style);
|
||||||
var editPile=ui.create.node('button','场景选项',line1,function(){
|
var editPile=ui.create.node('button','场景选项',line1,function(){
|
||||||
resetCharacter();
|
resetCharacter();
|
||||||
addCharacter.disabled=true;
|
|
||||||
// editCode.disabled=true;
|
// editCode.disabled=true;
|
||||||
saveButton.disabled=true;
|
saveButton.disabled=true;
|
||||||
// exportButton.disabled=true;
|
// exportButton.disabled=true;
|
||||||
|
@ -4636,14 +4264,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
player.listen(function(){
|
player.listen(function(){
|
||||||
if(confirm('是否删除此角色?')){
|
if(confirm('是否删除此角色?')){
|
||||||
this.remove();
|
this.remove();
|
||||||
if(line7.childElementCount<8){
|
|
||||||
addCharacter.disabled=false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(line7.childElementCount>=8){
|
|
||||||
addCharacter.disabled=true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return player;
|
return player;
|
||||||
};
|
};
|
||||||
|
@ -4711,12 +4333,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
line9.style.display='none';
|
line9.style.display='none';
|
||||||
line9.style.marginTop='20px';
|
line9.style.marginTop='20px';
|
||||||
var resetStatus=function(all){
|
var resetStatus=function(all){
|
||||||
if(line7.childElementCount>=8){
|
|
||||||
addCharacter.disabled=true;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
addCharacter.disabled=false;
|
|
||||||
}
|
|
||||||
// editCode.disabled=false;
|
// editCode.disabled=false;
|
||||||
saveButton.disabled=false;
|
saveButton.disabled=false;
|
||||||
// exportButton.disabled=false;
|
// exportButton.disabled=false;
|
||||||
|
|
|
@ -685,8 +685,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
var next=game.createEvent('chooseCharacter');
|
var next=game.createEvent('chooseCharacter');
|
||||||
next.showConfig=true;
|
next.showConfig=true;
|
||||||
next.addPlayer=function(player){
|
next.addPlayer=function(player){
|
||||||
var list=lib.config.mode_config.identity.identity[game.players.length-3].slice(0);
|
var list=get.identityList(game.players.length-1);
|
||||||
var list2=lib.config.mode_config.identity.identity[game.players.length-2].slice(0);
|
var list2=get.identityList(game.players.length);
|
||||||
for(var i=0;i<list.length;i++) list2.remove(list[i]);
|
for(var i=0;i<list.length;i++) list2.remove(list[i]);
|
||||||
player.identity=list2[0];
|
player.identity=list2[0];
|
||||||
player.setIdentity('cai');
|
player.setIdentity('cai');
|
||||||
|
|
|
@ -99,11 +99,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
if(_status.brawl&&_status.brawl.submode){
|
if(_status.brawl&&_status.brawl.submode){
|
||||||
_status.mode=_status.brawl.submode;
|
_status.mode=_status.brawl.submode;
|
||||||
}
|
}
|
||||||
|
if(get.config('separatism')) _status.separatism=true;
|
||||||
}
|
}
|
||||||
"step 1"
|
"step 1"
|
||||||
if(_status.connectMode){
|
if(_status.connectMode){
|
||||||
_status.mode=lib.configOL.guozhan_mode;
|
_status.mode=lib.configOL.guozhan_mode;
|
||||||
if(!['normal','yingbian','old'].contains(_status.mode)) _status.mode='normal';
|
if(!['normal','yingbian','old'].contains(_status.mode)) _status.mode='normal';
|
||||||
|
if(lib.configOL.separatism) _status.separatism=true;
|
||||||
//决定牌堆
|
//决定牌堆
|
||||||
switch(_status.mode){
|
switch(_status.mode){
|
||||||
case 'old':lib.card.list=lib.guozhanPile_old.slice(0);break;
|
case 'old':lib.card.list=lib.guozhanPile_old.slice(0);break;
|
||||||
|
@ -115,8 +117,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
default:lib.card.list=lib.guozhanPile.slice(0);break;
|
default:lib.card.list=lib.guozhanPile.slice(0);break;
|
||||||
}
|
}
|
||||||
game.fixedPile=true;
|
game.fixedPile=true;
|
||||||
game.broadcastAll(function(mode){
|
game.broadcastAll((mode,separatism)=>{
|
||||||
_status.mode=mode;
|
_status.mode=mode;
|
||||||
|
if(separatism) _status.separatism=true;
|
||||||
if(mode=='yingbian'){
|
if(mode=='yingbian'){
|
||||||
delete lib.translate.shuiyanqijunx_info_guozhan;
|
delete lib.translate.shuiyanqijunx_info_guozhan;
|
||||||
}
|
}
|
||||||
|
@ -145,7 +148,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lib.characterReplace={};
|
lib.characterReplace={};
|
||||||
},_status.mode);
|
},_status.mode,_status.separatism);
|
||||||
game.randomMapOL();
|
game.randomMapOL();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -13504,6 +13507,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
else{
|
else{
|
||||||
num={mark:'标记',draw:'摸牌'}[lib.configOL.initshow_draw];
|
num={mark:'标记',draw:'摸牌'}[lib.configOL.initshow_draw];
|
||||||
}
|
}
|
||||||
|
uiintro.add('<div class="text chat">群雄割据:'+(lib.configOL.separatism?'开启':'关闭'));
|
||||||
uiintro.add('<div class="text chat">首亮奖励:'+num);
|
uiintro.add('<div class="text chat">首亮奖励:'+num);
|
||||||
uiintro.add('<div class="text chat">珠联璧合:'+(lib.configOL.zhulian?'开启':'关闭'));
|
uiintro.add('<div class="text chat">珠联璧合:'+(lib.configOL.zhulian?'开启':'关闭'));
|
||||||
uiintro.add('<div class="text chat">出牌时限:'+lib.configOL.choose_timeout+'秒');
|
uiintro.add('<div class="text chat">出牌时限:'+lib.configOL.choose_timeout+'秒');
|
||||||
|
@ -13585,7 +13589,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
getVideoName:function(){
|
getVideoName:function(){
|
||||||
var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2);
|
var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2);
|
||||||
var str2=get.cnNumber(parseInt(get.config('player_number')))+'人'+
|
var str2=_status.separatism?get.modetrans({
|
||||||
|
mode:lib.config.mode,
|
||||||
|
separatism:true
|
||||||
|
}):get.cnNumber(parseInt(get.config('player_number')))+'人'+
|
||||||
get.translation(lib.config.mode);
|
get.translation(lib.config.mode);
|
||||||
if(game.me.identity=='ye'){
|
if(game.me.identity=='ye'){
|
||||||
str2+=' - 野心家';
|
str2+=' - 野心家';
|
||||||
|
@ -13689,6 +13696,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var filterChoice=function(name1,name2){
|
var filterChoice=function(name1,name2){
|
||||||
|
if(_status.separatism) return true;
|
||||||
var group1=lib.character[name1][1];
|
var group1=lib.character[name1][1];
|
||||||
var group2=lib.character[name2][1];
|
var group2=lib.character[name2][1];
|
||||||
var doublex=get.is.double(name1,true);
|
var doublex=get.is.double(name1,true);
|
||||||
|
@ -13849,6 +13857,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
if(lib.character[button.link][4].contains('hiddenSkill')) return false;
|
if(lib.character[button.link][4].contains('hiddenSkill')) return false;
|
||||||
var filterChoice=function(name1,name2){
|
var filterChoice=function(name1,name2){
|
||||||
|
if(_status.separatism) return true;
|
||||||
var group1=lib.character[name1][1];
|
var group1=lib.character[name1][1];
|
||||||
var group2=lib.character[name2][1];
|
var group2=lib.character[name2][1];
|
||||||
var doublex=get.is.double(name1,true);
|
var doublex=get.is.double(name1,true);
|
||||||
|
@ -14078,6 +14087,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var filterChoice=function(name1,name2){
|
var filterChoice=function(name1,name2){
|
||||||
|
if(_status.separatism) return true;
|
||||||
var group1=lib.character[name1][1];
|
var group1=lib.character[name1][1];
|
||||||
var group2=lib.character[name2][1];
|
var group2=lib.character[name2][1];
|
||||||
var doublex=get.is.double(name1,true);
|
var doublex=get.is.double(name1,true);
|
||||||
|
@ -14113,13 +14123,21 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}).set('processAI',function(){
|
}).set('processAI',function(){
|
||||||
var buttons=_status.event.dialog.buttons;
|
var buttons=_status.event.dialog.buttons;
|
||||||
var filterChoice=function(name1,name2){
|
var filterChoice=function(name1,name2){
|
||||||
if(get.is.double(name1)) return false;
|
if(_status.separatism) return true;
|
||||||
var group1=lib.character[name1][1];
|
var group1=lib.character[name1][1];
|
||||||
var group2=lib.character[name2][1];
|
var group2=lib.character[name2][1];
|
||||||
if(group1=='ye') return group2!='ye';
|
var doublex=get.is.double(name1,true);
|
||||||
var double=get.is.double(name2,true);
|
if(doublex){
|
||||||
if(double) return double.contains(group1);
|
var double=get.is.double(name2,true);
|
||||||
return group1==group2;
|
if(double) return doublex.some(group=>double.contains(group));
|
||||||
|
return doublex.contains(group2);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(group1=='ye') return group2!='ye';
|
||||||
|
var double=get.is.double(name2,true);
|
||||||
|
if(double) return double.contains(group1);
|
||||||
|
return group1==group2;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
for(var i=0;i<buttons.length-1;i++){
|
for(var i=0;i<buttons.length-1;i++){
|
||||||
for(var j=i+1;j<buttons.length;j++){
|
for(var j=i+1;j<buttons.length;j++){
|
||||||
|
@ -16020,7 +16038,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
if(_status.yeidentity&&_status.yeidentity.contains(group)) return false;
|
if(_status.yeidentity&&_status.yeidentity.contains(group)) return false;
|
||||||
if(get.zhu(this,null,group)) return true;
|
if(get.zhu(this,null,group)) return true;
|
||||||
return get.totalPopulation(group)+1<=get.population()/2;
|
return get.totalPopulation(group)+1<=_status.separatism?Math.max(get.population()/2-1,1):get.population()/2;
|
||||||
},
|
},
|
||||||
perfectPair:function(choosing){
|
perfectPair:function(choosing){
|
||||||
if(_status.connectMode){
|
if(_status.connectMode){
|
||||||
|
|
991
mode/identity.js
991
mode/identity.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue