This commit is contained in:
libccy 2017-03-20 13:47:18 +08:00
parent ea3c249609
commit 148814e28d
3 changed files with 59 additions and 27 deletions

View File

@ -1531,7 +1531,7 @@
border_style:{
name:'边框样式',
init:'default',
intro:'设置角色边框的样式',
intro:'设置角色边框的样式,当设为自动时,样式将随着一局游戏中伤害及击杀的数量自动改变',
item:{
gold:'金框',
silver:'银框',
@ -11003,37 +11003,24 @@
},event.nature,player);
player.$damagepop(-num,event.nature);
}
// if(source){
// if(player._damagetimeout!=source){
// player.$damage(source);
// player._damagetimeout=source;
// setTimeout(function(){
// delete player._damagetimeout;
// },500);
// }
// if(player._damagepopup){
// player._damagepopup-=num;
// player._damagenature=event.nature;
// }
// else{
// player._damagepopup=-num;
// player._damagenature=event.nature;
// setTimeout(function(){
// player.popup(player._damagepopup,player._damagenature);
// delete player._damagepopup;
// delete player._damagenature;
// },300);
// }
// }
// else{
// player.$damage();
// }
event.trigger('damage');
"step 1"
if(player.hp<=0&&player.isAlive()){
game.delayx();
player.dying(event);
}
"step 2"
if(lib.config.border_style=='auto'&&player.node.framebg.dataset.auto&&!player.node.framebg.dataset.decoration){
var dnum=0;
for(var j=0;j<player.stat.length;j++){
if(player.stat[j].damage!=undefined) dnum+=player.stat[j].damage;
}
switch(player.node.framebg.dataset.auto){
case 'gold':if(dnum>=9) player.node.framebg.dataset.decoration='gold';break;
case 'silver':if(dnum>=6) player.node.framebg.dataset.decoration='silver';break;
case 'bronze':if(dnum>=3) player.node.framebg.dataset.decoration='bronze';break;
}
}
},
recover:function(){
if(lib.config.background_audio){
@ -11283,6 +11270,23 @@
_status.coin+=10;
}
}
if(source&&lib.config.border_style=='auto'){
switch(source.node.framebg.dataset.auto){
case 'gold':case 'silver':source.node.framebg.dataset.auto='gold';break;
case 'bronze':source.node.framebg.dataset.auto='silver';break;
default:source.node.framebg.dataset.auto='bronze';
}
var dnum=0;
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(){
"step 0"

View File

@ -9,7 +9,7 @@ window.noname_update={
// 'game/package.js',
// 'game/config.js',
// 'game/source.js',
// 'game/asset.js',
'game/asset.js',
// 'card/guozhan.js',
// 'character/rank.js',
// 'character/gwent.js',

View File

@ -1907,6 +1907,34 @@ div:not(.handcards)>.card>.info>span,
display: none;
}
#window .player>.framebg[data-auto="gold"]{
display:block;
background-image:url('../../theme/style/player/gold1.png');
}
#window #arena.long:not(.fewplayer) .player>.framebg[data-auto="gold"],
#arena.oldlayout .player>.framebg[data-auto="gold"]{
display:block;
background-image:url('../../theme/style/player/gold3.png');
}
#window .player>.framebg[data-auto="silver"]{
display:block;
background-image:url('../../theme/style/player/silver1.png');
}
#window #arena.long:not(.fewplayer) .player>.framebg[data-auto="silver"],
#arena.oldlayout .player>.framebg[data-auto="silver"]{
display:block;
background-image:url('../../theme/style/player/silver3.png');
}
#window .player>.framebg[data-auto="bronze"]{
display:block;
background-image:url('../../theme/style/player/bronze1.png');
}
#window #arena.long:not(.fewplayer) .player>.framebg[data-auto="bronze"],
#arena.oldlayout .player>.framebg[data-auto="bronze"]{
display:block;
background-image:url('../../theme/style/player/bronze3.png');
}
.avatar {
width: 100px;
height: 100px;