This commit is contained in:
parent
3b1cc9186e
commit
34ad5e1caf
35
game/game.js
35
game/game.js
|
@ -10208,7 +10208,7 @@
|
|||
if(config.gameStarted){
|
||||
this.node.gaming.show();
|
||||
this.node.waiting.hide();
|
||||
if(config.observe&&config.observeReady){
|
||||
if(config.observe&&config.observeReady&&this.version==lib.versionOL){
|
||||
this.dataset.cursor_style='zoom';
|
||||
}
|
||||
else{
|
||||
|
@ -12819,7 +12819,7 @@
|
|||
}
|
||||
return this;
|
||||
},
|
||||
addSkill:function(skill,checkConflict){
|
||||
addSkill:function(skill,checkConflict,nobroadcast){
|
||||
if(get.objtype(skill)=='array'){
|
||||
for(var i=0;i<skill.length;i++){
|
||||
this.addSkill(skill[i]);
|
||||
|
@ -12829,6 +12829,11 @@
|
|||
if(this.skills.contains(skill)) return;
|
||||
var info=lib.skill[skill];
|
||||
if(!info) return;
|
||||
if(!nobroadcast){
|
||||
game.broadcast(function(player,skill){
|
||||
player.skills.add(skill);
|
||||
},this,skill);
|
||||
}
|
||||
this.skills.add(skill);
|
||||
this.addSkillTrigger(skill);
|
||||
if(this.awakenedSkills.contains(skill)){
|
||||
|
@ -12889,7 +12894,7 @@
|
|||
skills=[skills];
|
||||
}
|
||||
for(var i=0;i<skills.length;i++){
|
||||
this.addSkill(skills[i]);
|
||||
this.addSkill(skills[i],null,true);
|
||||
this.skills.remove(skills[i]);
|
||||
this.additionalSkills[skill].push(skills[i]);
|
||||
}
|
||||
|
@ -13052,6 +13057,9 @@
|
|||
}
|
||||
else{
|
||||
this.unmarkSkill(skill);
|
||||
game.broadcast(function(player,skill){
|
||||
player.skills.remove(skill);
|
||||
},this,skill);
|
||||
this.skills.remove(skill);
|
||||
this.checkConflict(skill);
|
||||
delete this.tempSkills[skill];
|
||||
|
@ -13103,7 +13111,7 @@
|
|||
},
|
||||
addTempSkill:function(skill,expire,checkConflict){
|
||||
if(this.hasSkill(skill)&&this.tempSkills[skill]==undefined) return;
|
||||
this.addSkill(skill,checkConflict);
|
||||
this.addSkill(skill,checkConflict,true);
|
||||
this.skills.remove(skill);
|
||||
this.tempSkills[skill]=expire;
|
||||
|
||||
|
@ -18774,6 +18782,25 @@
|
|||
console.log(num);
|
||||
}
|
||||
},
|
||||
hideCharacter:function(player,num){
|
||||
if(player&&player.classList){
|
||||
switch(num){
|
||||
case 0:
|
||||
player.classList.add('unseen_v');
|
||||
break;
|
||||
case 1:
|
||||
player.classList.add('unseen2_v');
|
||||
break;
|
||||
case 2:
|
||||
player.classList.add('unseen_v');
|
||||
player.classList.add('unseen2_v');
|
||||
break;
|
||||
}
|
||||
}
|
||||
else{
|
||||
console.log(num);
|
||||
}
|
||||
},
|
||||
popup:function(player,info){
|
||||
if(player&&info){
|
||||
player.popup(info[0],info[1]);
|
||||
|
|
|
@ -29,33 +29,46 @@ mode.guozhan={
|
|||
game.delay();
|
||||
game.showChangeLog();
|
||||
}
|
||||
for(var i in lib.characterPack.mode_guozhan){
|
||||
if(!get.config('onlyguozhan')){
|
||||
if(lib.character[i.slice(3)]) continue;
|
||||
}
|
||||
lib.character[i]=lib.characterPack.mode_guozhan[i];
|
||||
if(!lib.character[i][4]){
|
||||
lib.character[i][4]=[];
|
||||
}
|
||||
if(!lib.translate[i]){
|
||||
lib.translate[i]=lib.translate[i.slice(3)];
|
||||
}
|
||||
}
|
||||
if(!_status.connectMode){
|
||||
_status.mode=get.config('guozhan_mode');
|
||||
if(_status.brawl&&_status.brawl.submode){
|
||||
_status.mode=_status.brawl.submode;
|
||||
}
|
||||
for(var i in lib.characterPack.mode_guozhan){
|
||||
if(!get.config('onlyguozhan')){
|
||||
if(lib.character[i.slice(3)]) continue;
|
||||
}
|
||||
lib.character[i]=lib.characterPack.mode_guozhan[i];
|
||||
if(!lib.character[i][4]){
|
||||
lib.character[i][4]=[];
|
||||
}
|
||||
if(!lib.translate[i]){
|
||||
lib.translate[i]=lib.translate[i.slice(3)];
|
||||
}
|
||||
}
|
||||
}
|
||||
"step 1"
|
||||
if(_status.connectMode){
|
||||
game.randomMapOL();
|
||||
game.broadcastAll(function(){
|
||||
game.broadcastAll(function(pack){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].node.name.hide();
|
||||
game.players[i].node.name2.hide();
|
||||
}
|
||||
});
|
||||
lib.characterPack.mode_guozhan=pack;
|
||||
for(var i in pack){
|
||||
if(!lib.configOL.onlyguozhan){
|
||||
if(lib.character[i.slice(3)]) continue;
|
||||
}
|
||||
lib.character[i]=pack[i];
|
||||
if(!lib.character[i][4]){
|
||||
lib.character[i][4]=[];
|
||||
}
|
||||
if(!lib.translate[i]){
|
||||
lib.translate[i]=lib.translate[i.slice(3)];
|
||||
}
|
||||
}
|
||||
},lib.characterPack.mode_guozhan);
|
||||
}
|
||||
else{
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
|
@ -1027,6 +1040,44 @@ mode.guozhan={
|
|||
}
|
||||
return false;
|
||||
},
|
||||
hideCharacter:function(num,log){
|
||||
if(this.classList.contains('unseen')||this.classList.contains('unseen2')){
|
||||
return;
|
||||
}
|
||||
game.addVideo('hideCharacter',this,num);
|
||||
var skills;
|
||||
switch(num){
|
||||
case 0:
|
||||
if(log!==false) game.log(this,'暗置了主将'+get.translation(this.name1));
|
||||
skills=lib.character[this.name][3];
|
||||
this.name=this.name2;
|
||||
this.sex=lib.character[this.name2][0];
|
||||
this.classList.add('unseen');
|
||||
break;
|
||||
case 1:
|
||||
if(log!==false) game.log(this,'暗置了副将'+get.translation(this.name2));
|
||||
skills=lib.character[this.name2][3];
|
||||
this.classList.add('unseen2');
|
||||
break;
|
||||
}
|
||||
game.broadcast(function(player,name,sex,num,skills){
|
||||
player.name=name;
|
||||
player.sex=sex;
|
||||
switch(num){
|
||||
case 0:player.classList.add('unseen');break;
|
||||
case 1:player.classList.add('unseen2');break;
|
||||
}
|
||||
for(var i=0;i<skills.length;i++){
|
||||
player.hiddenSkills.add(skills[i]);
|
||||
player.skills.remove(skills[i]);
|
||||
}
|
||||
},this,this.name,this.sex,num,skills);
|
||||
for(var i=0;i<skills.length;i++){
|
||||
this.hiddenSkills.add(skills[i]);
|
||||
this.skills.remove(skills[i]);
|
||||
}
|
||||
this.checkConflict();
|
||||
},
|
||||
showCharacter:function(num,log){
|
||||
if(!this.classList.contains('unseen')&&!this.classList.contains('unseen2')){
|
||||
return;
|
||||
|
@ -1111,7 +1162,8 @@ mode.guozhan={
|
|||
this.addSkill(skills[i]);
|
||||
}
|
||||
this.checkConflict();
|
||||
if(!this.classList.contains('unseen')&&!this.classList.contains('unseen2')){
|
||||
if(!this.classList.contains('unseen')&&!this.classList.contains('unseen2')&&!this._mingzhied){
|
||||
this._mingzhied=true;
|
||||
if(this.singleHp){
|
||||
this.doubleDraw();
|
||||
}
|
||||
|
@ -1121,7 +1173,6 @@ mode.guozhan={
|
|||
next.setContent('zhulian');
|
||||
}
|
||||
}
|
||||
game.tryResult();
|
||||
},
|
||||
perfectPair:function(){
|
||||
if(!get.config('zhulian')) return false;
|
||||
|
@ -1247,6 +1298,12 @@ mode.guozhan={
|
|||
}
|
||||
},
|
||||
skill:{
|
||||
huoshui:{
|
||||
|
||||
},
|
||||
qingcheng:{
|
||||
|
||||
},
|
||||
duoshi:{
|
||||
enable:'chooseToUse',
|
||||
viewAs:{name:'yiyi'},
|
||||
|
|
Loading…
Reference in New Issue