This commit is contained in:
libccy 2016-08-14 02:04:49 +08:00
parent f0c5a5ae9a
commit 74dbb2e578
3 changed files with 32 additions and 6 deletions

View File

@ -1335,7 +1335,7 @@ character.sp={
return false; return false;
}, },
check:function(event,player){ check:function(event,player){
return player.hp>=3&&player.num('h')>player.hp+1; return player.hp>=3&&player.num('h')>player.hp+1+player.storage.xunzhi;
}, },
content:function(){ content:function(){
player.loseHp(); player.loseHp();

View File

@ -4364,7 +4364,7 @@
},100); },100);
},500); },500);
}, },
parse:function(func){ parsex:function(func){
var k; var k;
var str='('; var str='(';
str+=func.toString(); str+=func.toString();
@ -4382,6 +4382,23 @@
str+='})'; str+='})';
return str; return str;
}, },
parse:function(func){
var str=func.toString();
str=str.slice(str.indexOf('{')+1);
if(str.indexOf('step 0')==-1){
str='{if(event.step==1) {event.finish();return;}'+str;
}
else{
for(var k=1;k<99;k++){
if(str.indexOf('step '+k)==-1) break;
str=str.replace(new RegExp("'step "+k+"'",'g'),"break;case "+k+":");
str=str.replace(new RegExp('"step '+k+'"','g'),"break;case "+k+":");
}
str=str.replace(/'step 0'|"step 0"/,'if(event.step=='+k+') {event.finish();return;}switch(step){case 0:');
}
return (new Function('event','step','source','player','target','targets',
'card','cards','skill','forced','num','trigger','result',str));
},
eval:function(func){ eval:function(func){
if(typeof func=='function'){ if(typeof func=='function'){
return eval('('+func.toString()+')'); return eval('('+func.toString()+')');
@ -12553,9 +12570,13 @@
}, },
setContent:function(name){ setContent:function(name){
if(typeof name=='function'){ if(typeof name=='function'){
this.content=name; this.content=lib.init.parse(name);
} }
else{ else{
if(!lib.element.content[name]._parsed){
lib.element.content[name]=lib.init.parse(lib.element.content[name]);
lib.element.content[name]._parsed=true;
}
this.content=lib.element.content[name]; this.content=lib.element.content[name];
} }
return this; return this;
@ -18032,7 +18053,9 @@
event.finish(); event.finish();
} }
else{ else{
eval(lib.init.parse(event.content))(); event.content(event,step,source,player,target,targets,
card,cards,skill,forced,num,trigger,result);
// eval(lib.init.parse(event.content))();
} }
event.step++; event.step++;
} }
@ -26011,6 +26034,9 @@
dialog.classList.add('noupdate'); dialog.classList.add('noupdate');
dialog.classList.add('scroll1'); dialog.classList.add('scroll1');
dialog.classList.add('scroll2'); dialog.classList.add('scroll2');
dialog.addEventListener(lib.config.touchscreen?'touchend':'mouseup',function(){
_status.clicked=true;
});
dialog.getCurrentCapt=function(link,capt,noalph){ dialog.getCurrentCapt=function(link,capt,noalph){
var currentcapt=noalph?this.currentcapt2:this.currentcapt; var currentcapt=noalph?this.currentcapt2:this.currentcapt;
if(this.seperatelist&&noalph){ if(this.seperatelist&&noalph){

View File

@ -1,7 +1,7 @@
window.noname_update={ window.noname_update={
version:'1.8.20.5', version:'1.9.0',
changeLog:[ changeLog:[
'修bug' ''
], ],
files:{ files:{
global:[ global:[