1.修复无懈的一处事件名错误。2.修改讨逆技能代码中的变量名,优化代码结构,修复了非挑战模式报错的问题。3.修正boss.js的代码缩进。

This commit is contained in:
shijian 2023-07-23 01:02:51 +08:00
parent e86790366a
commit bfb630f4ec
2 changed files with 526 additions and 524 deletions

View File

@ -2735,7 +2735,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(event.wuxieresult&&event.wuxieresult2&&event.wuxieresult2.skill){
var info=get.info(event.wuxieresult2.skill);
if(info&&info.precontent&&!game.online){
var next=game.createEvent('pre_'+event.wuxieresult2);
var next=game.createEvent('pre_'+event.wuxieresult2.skill);
next.setContent(info.precontent);
next.set('result',event.wuxieresult2);
next.set('player',event.wuxieresult);

View File

@ -2308,7 +2308,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.countPlayer(function(current){
if(current!=game.boss){
for(var i=0;i<list.length;i++){
if(current.name==list[i]||current.name2==list[i]){current.init('sunce');}
if(current.name==list[i]||current.name2==list[i]){current.init(['sunce','re_sunce','shen_sunce','sb_sunce'].randomGet());}
}
}
});
@ -2888,11 +2888,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
list.remove(ran1);//移除
var skills1=ran1.getSkills(true,false);
if(skills1.length){
for(var i=0;i<skills1.length;i++){
for(var i=0;i<skills1.length;i++){//排除技能,然后随机失去一个可以失去的技能
if(get.skills[i]||lib.skill[skills1[i]].charlotte||!lib.translate[skills1[i]+'_info']||lib.skill[skills1[i]].zhuSkill==true){
skills1.splice(i--,1);
}
}//排除技能,然后随机失去一个可以失去的技能
}
if(skills1.length>0){
skills1=skills1.randomGet();
ran1.disableSkill('boss_wanghun',skills1);
@ -2907,11 +2907,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
list.remove(ran2);//移除
var skills2=ran2.getSkills(true,false);
if(skills2.length){
for(var i=0;i<skills2.length;i++){
for(var i=0;i<skills2.length;i++){//排除技能,然后随机失去一个可以失去的技能
if(get.skills[i]||lib.skill[skills2[i]].charlotte||!lib.translate[skills2[i]+'_info']||lib.skill[skills2[i]].zhuSkill==true){
skills2.splice(i--,1);
}
}//排除技能,然后随机失去一个可以失去的技能
}
if(skills2.length>0){
skills2=skills2.randomGet();
ran2.disableSkill('boss_wanghun',skills2);
@ -2958,7 +2958,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
content:function(){
var name=event.triggername;
if(name=='damageBegin4'){
trigger.num--;return;
trigger.num--;
}
else{
game.countPlayer(function(target){
@ -2988,7 +2988,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
content:function(){
var name=event.triggername;
if(name=='phaseZhunbeiBegin'){
player.recover(3-player.hp);return;
player.recover(3-player.hp);
}
else{
player.draw((name=='gameDrawAfter'||name=='enterGame')?3:2);
@ -8576,7 +8576,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
}
}
},
"boss_hunzi":{
skillAnimation:true,
animationColor:"wood",
@ -8751,34 +8750,37 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
priority:50,
init:function (player){
player.boss_taoni=function(){
var __Ox598df = ["length", "players", "player", "element"];
for (var i = 0; i < game[__Ox598df[0x1]][__Ox598df[0x0]]; i++) {
var node = game[__Ox598df[0x1]][i];
for (var a in lib[__Ox598df[0x3]][__Ox598df[0x2]]) {
var opd=Object.getOwnPropertyDescriptor(node,a);
if(typeof _status.taoni_over!='function'){
_status.taoni_over=function(str){
_status.over = true;
game.alert(str);
};
}
function isDefined(opd) {
if(opd!=undefined){
if (opd.get||opd.set||opd.writable!=true||opd.configurable!=true||opd.enumerable!=true){
_status.taoni_over(lib.translate[node.name]+'触发了〖讨逆〗,游戏已被终止。');
return true;
}
}
node[a] = lib[__Ox598df[0x3]][__Ox598df[0x2]][a];//还原函数
var _xsu8 = ['classList','hp','maxHp','skills'];
for(var b=0;b<_xsu8.length;b++){
var opd2=Object.getOwnPropertyDescriptor(node,_xsu8[b]);
if(opd2!=undefined){
if(opd2.get||opd2.set||opd2.writable!=true||opd2.configurable!=true||opd2.enumerable!=true){
_status.taoni_over(lib.translate[node.name]+'触发了〖讨逆〗,游戏已被终止。');
}
}
}
var _cRYC = ['players','dead','over'];
for(var c=0;c<_cRYC.length;c++){
var opd3=Object.getOwnPropertyDescriptor(game,_cRYC[c]);
if(opd3!=undefined){
if(opd3.get||opd3.set||opd3.writable!=true||opd3.configurable!=true||opd3.enumerable!=true){
_status.taoni_over('〖讨逆〗被触发,游戏终止。');
return false;
}
var keysArray=["length","players","player","element"];
for(var i=0;i<game[keysArray[1]][keysArray[0]];i++){
var node=game[keysArray[1]][i];
for(var a in lib[keysArray[3]][keysArray[2]]){
var opd=Object.getOwnPropertyDescriptor(node,a);
if (isDefined(opd)) _status.taoni_over(lib.translate[node.name] + '触发了〖讨逆〗,游戏已被终止。');
//还原函数
node[a]=lib[keysArray[3]][keysArray[2]][a];
var playerKeysArray=['classList','hp','maxHp','skills'];
for(var b=0;b<playerKeysArray.length;b++){
var opd2=Object.getOwnPropertyDescriptor(node,playerKeysArray[b]);
if (isDefined(opd2)) _status.taoni_over(lib.translate[node.name]+'触发了〖讨逆〗,游戏已被终止。');
}
var gameKeysArray=['players','dead','over'];
for(var c=0;c<gameKeysArray.length;c++){
var opd3=Object.getOwnPropertyDescriptor(game,gameKeysArray[c]);
if (isDefined(opd3)) _status.taoni_over('〖讨逆〗被触发,游戏终止。');
}
}
}