v1.9.37.2
This commit is contained in:
parent
04517f1fb4
commit
a6616c9ee2
92
game/game.js
92
game/game.js
|
@ -11661,9 +11661,7 @@
|
||||||
var info=get.info(event.skill);
|
var info=get.info(event.skill);
|
||||||
event._skill=event.skill;
|
event._skill=event.skill;
|
||||||
game.trySkillAudio(event.skill,player);
|
game.trySkillAudio(event.skill,player);
|
||||||
if(player.checkShow){
|
var checkShow=player.checkShow(event.skill);
|
||||||
player.checkShow(event.skill);
|
|
||||||
}
|
|
||||||
if(info.discard!=false&&info.lose!=false&&!info.viewAs){
|
if(info.discard!=false&&info.lose!=false&&!info.viewAs){
|
||||||
player.discard(cards).delay=false;
|
player.discard(cards).delay=false;
|
||||||
if(lib.config.low_performance){
|
if(lib.config.low_performance){
|
||||||
|
@ -11724,7 +11722,13 @@
|
||||||
game.log(player,str,'【'+get.skillTranslation(skill,player)+'】');
|
game.log(player,str,'【'+get.skillTranslation(skill,player)+'】');
|
||||||
if(info.logv!==false) game.logv(player,skill,targets);
|
if(info.logv!==false) game.logv(player,skill,targets);
|
||||||
if(lib.config.skill_animation_type!='off'&&lib.skill[skill]&&lib.skill[skill].skillAnimation){
|
if(lib.config.skill_animation_type!='off'&&lib.skill[skill]&&lib.skill[skill].skillAnimation){
|
||||||
player.$skill(lib.skill[skill].animationStr||lib.translate[skill],lib.skill[skill].skillAnimation,lib.skill[skill].animationColor,lib.config.skill_animation_type=='default');
|
if(lib.config.skill_animation_type=='default'){
|
||||||
|
checkShow=checkShow||'main';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
checkShow=false;
|
||||||
|
}
|
||||||
|
player.$skill(lib.skill[skill].animationStr||lib.translate[skill],lib.skill[skill].skillAnimation,lib.skill[skill].animationColor,checkShow);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.popup(get.skillTranslation(skill,player));
|
player.popup(get.skillTranslation(skill,player));
|
||||||
|
@ -11976,9 +11980,7 @@
|
||||||
cardaudio=false;
|
cardaudio=false;
|
||||||
}
|
}
|
||||||
player.logSkill(event.skill);
|
player.logSkill(event.skill);
|
||||||
if(player.checkShow){
|
player.checkShow(event.skill,true);
|
||||||
player.checkShow(event.skill);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(lib.config.show_card_prompt&&!lib.config.hide_card_prompt_basic){
|
else if(lib.config.show_card_prompt&&!lib.config.hide_card_prompt_basic){
|
||||||
player.popup(card.name,'wood');
|
player.popup(card.name,'wood');
|
||||||
|
@ -16093,9 +16095,16 @@
|
||||||
name=name[0];
|
name=name[0];
|
||||||
nopop=true;
|
nopop=true;
|
||||||
}
|
}
|
||||||
|
var checkShow=this.checkShow(name);
|
||||||
if(lib.translate[name]){
|
if(lib.translate[name]){
|
||||||
if(lib.config.skill_animation_type!='off'&&lib.skill[name]&&lib.skill[name].skillAnimation){
|
if(lib.config.skill_animation_type!='off'&&lib.skill[name]&&lib.skill[name].skillAnimation){
|
||||||
this.$skill(lib.skill[name].animationStr||lib.translate[name],lib.skill[name].skillAnimation,lib.skill[name].animationColor,lib.config.skill_animation_type=='default');
|
if(lib.config.skill_animation_type=='default'){
|
||||||
|
checkShow=checkShow||'main';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
checkShow=false;
|
||||||
|
}
|
||||||
|
this.$skill(lib.skill[name].animationStr||lib.translate[name],lib.skill[name].skillAnimation,lib.skill[name].animationColor,checkShow);
|
||||||
}
|
}
|
||||||
else if(!nopop) this.popup(get.skillTranslation(name,this));
|
else if(!nopop) this.popup(get.skillTranslation(name,this));
|
||||||
if(typeof targets=='object'&&targets.length){
|
if(typeof targets=='object'&&targets.length){
|
||||||
|
@ -16121,9 +16130,6 @@
|
||||||
this.logAi&&(!targets||targets.length!=1||targets[0]!=this)){
|
this.logAi&&(!targets||targets.length!=1||targets[0]!=this)){
|
||||||
this.logAi(lib.skill[name].ai.expose);
|
this.logAi(lib.skill[name].ai.expose);
|
||||||
}
|
}
|
||||||
if(this.checkShow){
|
|
||||||
this.checkShow(name);
|
|
||||||
}
|
|
||||||
if(info&&info.round){
|
if(info&&info.round){
|
||||||
var roundname=name+'_roundcount';
|
var roundname=name+'_roundcount';
|
||||||
this.storage[roundname]=game.roundNumber;
|
this.storage[roundname]=game.roundNumber;
|
||||||
|
@ -17357,6 +17363,41 @@
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
checkShow:function(skill,showonly){
|
||||||
|
var sourceSkill=get.info(skill);
|
||||||
|
var noshow=false;
|
||||||
|
if(sourceSkill&&sourceSkill.sourceSkill){
|
||||||
|
skill=sourceSkill.sourceSkill;
|
||||||
|
}
|
||||||
|
if(lib.skill.global.contains(skill)) return false;
|
||||||
|
if(get.mode()!='guozhan'||game.expandSkills(this.getSkills()).contains(skill)){
|
||||||
|
if(showonly){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
noshow=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var unseen0=this.isUnseen(0);
|
||||||
|
var name1=this.name1||this.name;
|
||||||
|
if(lib.character[name1]&&(!showonly||unseen0)){
|
||||||
|
var skills=game.expandSkills(lib.character[name1][3].slice(0));
|
||||||
|
if(skills.contains(skill)){
|
||||||
|
if(!noshow&&this.isUnseen(0)) this.showCharacter(0);
|
||||||
|
return 'main';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var unseen1=this.isUnseen(1);
|
||||||
|
var name2=this.name2;
|
||||||
|
if(lib.character[name2]&&(!showonly||unseen1)){
|
||||||
|
var skills=game.expandSkills(lib.character[name2][3].slice(0));
|
||||||
|
if(skills.contains(skill)){
|
||||||
|
if(!noshow&&this.isUnseen(1)) this.showCharacter(1);
|
||||||
|
return 'vice';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
needsToDiscard:function(num){
|
needsToDiscard:function(num){
|
||||||
if(typeof num!='number') num=0;
|
if(typeof num!='number') num=0;
|
||||||
return Math.max(0,num+this.countCards('h')-this.getHandcardLimit());
|
return Math.max(0,num+this.countCards('h')-this.getHandcardLimit());
|
||||||
|
@ -18668,17 +18709,35 @@
|
||||||
top+this.offsetHeight-30,700,'recover');
|
top+this.offsetHeight-30,700,'recover');
|
||||||
},
|
},
|
||||||
$fullscreenpop:function(str,nature,avatar){
|
$fullscreenpop:function(str,nature,avatar){
|
||||||
game.broadcast(function(player,str,nature){
|
game.broadcast(function(player,str,nature,avatar){
|
||||||
player.$fullscreenpop(str,nature);
|
player.$fullscreenpop(str,nature,avatar);
|
||||||
},this,str,nature);
|
},this,str,nature,avatar);
|
||||||
game.addVideo('fullscreenpop',this,[str,nature,avatar]);
|
game.addVideo('fullscreenpop',this,[str,nature,avatar]);
|
||||||
var node=ui.create.div('.damage');
|
var node=ui.create.div('.damage');
|
||||||
if(avatar&&lib.character[this.name]&&this.node&&this.node.avatar){
|
if(avatar&&this.node){
|
||||||
|
if(avatar=='vice'){
|
||||||
|
if(lib.character[this.name2]){
|
||||||
|
avatar=this.node.avatar2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(lib.character[this.name]){
|
||||||
|
avatar=this.node.avatar;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!get.is.div(avatar)){
|
||||||
|
avatar=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
avatar=false;
|
||||||
|
}
|
||||||
|
if(avatar){
|
||||||
node.classList.add('fullscreenavatar');
|
node.classList.add('fullscreenavatar');
|
||||||
ui.create.div('',ui.create.div(node));
|
ui.create.div('',ui.create.div(node));
|
||||||
// ui.create.div('',str.split('').join('<br>'),ui.create.div('.text.textbg',node));
|
// ui.create.div('',str.split('').join('<br>'),ui.create.div('.text.textbg',node));
|
||||||
ui.create.div('','<div>'+str.split('').join('</div><br><div>')+'</div>',ui.create.div('.text',node));
|
ui.create.div('','<div>'+str.split('').join('</div><br><div>')+'</div>',ui.create.div('.text',node));
|
||||||
node.firstChild.firstChild.style.backgroundImage=this.node.avatar.style.backgroundImage;
|
node.firstChild.firstChild.style.backgroundImage=avatar.style.backgroundImage;
|
||||||
node.dataset.nature=nature||'unknown';
|
node.dataset.nature=nature||'unknown';
|
||||||
var num=0;
|
var num=0;
|
||||||
var nodes=node.lastChild.firstChild.querySelectorAll('div');
|
var nodes=node.lastChild.firstChild.querySelectorAll('div');
|
||||||
|
@ -18693,6 +18752,7 @@
|
||||||
},100);
|
},100);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
avatar=false;
|
||||||
node.innerHTML=str;
|
node.innerHTML=str;
|
||||||
node.dataset.nature=nature||'soil';
|
node.dataset.nature=nature||'soil';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
window.noname_update={
|
window.noname_update={
|
||||||
version:'1.9.37.1',
|
version:'1.9.37.2',
|
||||||
update:'1.9.37',
|
update:'1.9.37',
|
||||||
changeLog:[
|
changeLog:[
|
||||||
'神武再世',
|
|
||||||
'bug修复'
|
'bug修复'
|
||||||
],
|
],
|
||||||
files:[
|
files:[
|
||||||
|
@ -27,8 +26,8 @@ window.noname_update={
|
||||||
// 'character/xianjian.js',
|
// 'character/xianjian.js',
|
||||||
// 'mode/identity.js',
|
// 'mode/identity.js',
|
||||||
'mode/boss.js',
|
'mode/boss.js',
|
||||||
// 'mode/guozhan.js',
|
'mode/guozhan.js',
|
||||||
// 'mode/versus.js',
|
'mode/versus.js',
|
||||||
// 'mode/connect.js',
|
// 'mode/connect.js',
|
||||||
'mode/chess.js',
|
'mode/chess.js',
|
||||||
'mode/tafang.js',
|
'mode/tafang.js',
|
||||||
|
|
|
@ -3121,29 +3121,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
player.chooseControl('ok').set('dialog',content);
|
player.chooseControl('ok').set('dialog',content);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
checkShow:function(skill){
|
|
||||||
var sourceSkill=get.info(skill);
|
|
||||||
if(sourceSkill&&sourceSkill.sourceSkill){
|
|
||||||
skill=sourceSkill.sourceSkill;
|
|
||||||
}
|
|
||||||
if(game.expandSkills(this.getSkills()).contains(skill)) return false;
|
|
||||||
if(lib.skill.global.contains(skill)) return false;
|
|
||||||
if(this.isUnseen(0)){
|
|
||||||
var skills=game.expandSkills(lib.character[this.name1][3].slice(0));
|
|
||||||
if(skills.contains(skill)){
|
|
||||||
this.showCharacter(0);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(this.isUnseen(1)){
|
|
||||||
var skills=game.expandSkills(lib.character[this.name2][3].slice(0));
|
|
||||||
if(skills.contains(skill)){
|
|
||||||
this.showCharacter(1);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
checkViceSkill:function(skill,disable){
|
checkViceSkill:function(skill,disable){
|
||||||
if(game.expandSkills(lib.character[this.name2][3].slice(0)).contains(skill)){
|
if(game.expandSkills(lib.character[this.name2][3].slice(0)).contains(skill)){
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -881,7 +881,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
var createCharacterDialog=function(){
|
var createCharacterDialog=function(){
|
||||||
event.dialogxx=ui.create.characterDialog('heightset',function(name){
|
event.dialogxx=ui.create.characterDialog('heightset',function(name){
|
||||||
if(name==event.friendChoice) return true;
|
// if(name==event.friendChoice) return true;
|
||||||
if(lib.character[name][1]!=game.me.identity) return true;
|
if(lib.character[name][1]!=game.me.identity) return true;
|
||||||
});
|
});
|
||||||
if(ui.cheat2){
|
if(ui.cheat2){
|
||||||
|
@ -933,9 +933,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
game.me.chooseButton(dialog,true).set('onfree',true).set('filterButton',function(button){
|
game.me.chooseButton(dialog,true).set('onfree',true).set('filterButton',function(button){
|
||||||
if(button==button.parentNode.lastChild) return false;
|
if(button.link==_status.event.friendChoice) return false;
|
||||||
return true;
|
return true;
|
||||||
});
|
}).set('friendChoice',event.friendChoice);
|
||||||
if(!ui.cheat&&get.config('change_choice')){
|
if(!ui.cheat&&get.config('change_choice')){
|
||||||
ui.create.cheat();
|
ui.create.cheat();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue