This commit is contained in:
libccy 2017-03-20 18:28:41 +08:00
parent 020f5e4a58
commit 492bc89517
4 changed files with 40 additions and 18 deletions

View File

@ -1531,7 +1531,7 @@
border_style:{ border_style:{
name:'边框样式', name:'边框样式',
init:'default', init:'default',
intro:'设置角色边框的样式,当设为自动时,样式将随着一局游戏中伤害击杀的数量自动改变', intro:'设置角色边框的样式,当设为自动时,样式将随着一局游戏中伤害击杀的数量自动改变',
item:{ item:{
gold:'金框', gold:'金框',
silver:'银框', silver:'银框',
@ -1668,6 +1668,16 @@
}, },
unfrequent:true, unfrequent:true,
}, },
autoborder_count:{
name:'边框升级方式',
intro:'每击杀一人,边框提升两级;每造成两点伤害,边框提升一级;升级顺序:铜框→玉龙→银框→银龙→金框→金龙',
init:'kill',
item:{
kill:'击杀',
damage:'伤害'
},
unfrequent:true,
},
player_border:{ player_border:{
name:'边框宽度', name:'边框宽度',
init:'normal', init:'normal',
@ -2336,6 +2346,12 @@
else{ else{
map.cursor_style.show(); map.cursor_style.show();
} }
if(lib.config.border_style=='auto'){
map.autoborder_count.show();
}
else{
map.autoborder_count.hide();
}
}, },
} }
}, },
@ -11009,16 +11025,31 @@
game.delayx(); game.delayx();
player.dying(event); player.dying(event);
} }
"step 2" if(source&&lib.config.border_style=='auto'&&lib.config.autoborder_count=='damage'){
if(source&&source.node.framebg.dataset.auto&&!source.node.framebg.dataset.decoration){
var dnum=0; var dnum=0;
for(var j=0;j<source.stat.length;j++){ for(var j=0;j<source.stat.length;j++){
if(source.stat[j].damage!=undefined) dnum+=source.stat[j].damage; if(source.stat[j].damage!=undefined) dnum+=source.stat[j].damage;
} }
switch(source.node.framebg.dataset.auto){ if(dnum>=2){
case 'gold':if(dnum>=9) source.node.framebg.dataset.decoration='gold';break; source.node.framebg.dataset.decoration='';
case 'silver':if(dnum>=6) source.node.framebg.dataset.decoration='silver';break; if(dnum>=10){
case 'bronze':if(dnum>=3) source.node.framebg.dataset.decoration='bronze';break; source.node.framebg.dataset.auto='gold';
if(dnum>=12){
source.node.framebg.dataset.decoration='gold';
}
}
else if(dnum>=6){
source.node.framebg.dataset.auto='silver';
if(dnum>=8){
source.node.framebg.dataset.decoration='silver';
}
}
else{
source.node.framebg.dataset.auto='bronze';
if(dnum>=4){
source.node.framebg.dataset.decoration='bronze';
}
}
} }
} }
}, },
@ -11270,22 +11301,13 @@
_status.coin+=10; _status.coin+=10;
} }
} }
if(source&&lib.config.border_style=='auto'){ if(source&&lib.config.border_style=='auto'&&lib.config.autoborder_count=='kill'){
switch(source.node.framebg.dataset.auto){ switch(source.node.framebg.dataset.auto){
case 'gold':case 'silver':source.node.framebg.dataset.auto='gold';break; case 'gold':case 'silver':source.node.framebg.dataset.auto='gold';break;
case 'bronze':source.node.framebg.dataset.auto='silver';break; case 'bronze':source.node.framebg.dataset.auto='silver';break;
default:source.node.framebg.dataset.auto='bronze'; default:source.node.framebg.dataset.auto='bronze';
} }
var dnum=0; source.node.framebg.dataset.decoration=source.node.framebg.dataset.auto;
for(var j=0;j<source.stat.length;j++){
if(source.stat[j].damage!=undefined) dnum+=source.stat[j].damage;
}
source.node.framebg.dataset.decoration='';
switch(source.node.framebg.dataset.auto){
case 'gold':if(dnum>=9) source.node.framebg.dataset.decoration='gold';break;
case 'silver':if(dnum>=6) source.node.framebg.dataset.decoration='silver';break;
case 'bronze':if(dnum>=3) source.node.framebg.dataset.decoration='bronze';break;
}
} }
}, },
equip:function(){ equip:function(){

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 117 KiB