This commit is contained in:
libccy 2017-07-19 12:06:06 +08:00
parent e57670d1d7
commit 66445f6351
4 changed files with 74 additions and 13 deletions

View File

@ -64,7 +64,7 @@ window.config={
background_audio:true, background_audio:true,
background_speak:true, background_speak:true,
glow_phase:'yellow', glow_phase:'yellow',
die_flip:true, die_move:'flip',
skin:{}, skin:{},
gameRecord:{}, gameRecord:{},

View File

@ -2183,12 +2183,6 @@
init:true, init:true,
unfrequent:true, unfrequent:true,
}, },
die_flip:{
name:'阵亡效果',
intro:'阵亡后武将位置会随机移动',
init:true,
unfrequent:true,
},
animation:{ animation:{
name:'游戏特效', name:'游戏特效',
intro:'开启后出现属性伤害、回复体力等情况时会显示动画', intro:'开启后出现属性伤害、回复体力等情况时会显示动画',
@ -2201,6 +2195,17 @@
init:true, init:true,
unfrequent:true, unfrequent:true,
}, },
die_move:{
name:'阵亡效果',
intro:'阵亡后武将的显示效果',
init:'flip',
unfrequent:true,
item:{
off:'关闭',
move:'移动',
flip:'翻面',
}
},
target_shake:{ target_shake:{
name:'目标效果', name:'目标效果',
intro:'一名玩家成为卡牌或技能的目标时的显示效果', intro:'一名玩家成为卡牌或技能的目标时的显示效果',
@ -18285,14 +18290,14 @@
game.broadcast(function(player){ game.broadcast(function(player){
player.$die(); player.$die();
},this); },this);
if(lib.config.die_flip){ if(lib.config.die_move!='off'){
this.$dieflip(); this.$dieflip(lib.config.die_move);
} }
if(lib.element.player.$dieAfter){ if(lib.element.player.$dieAfter){
lib.element.player.$dieAfter.call(this); lib.element.player.$dieAfter.call(this);
} }
}, },
$dieflip:function(){ $dieflip:function(type){
var top0=ui.window.offsetHeight/2; var top0=ui.window.offsetHeight/2;
var left0=ui.window.offsetWidth/2; var left0=ui.window.offsetWidth/2;
var ratio=(left0-this.offsetLeft)/(top0-this.offsetTop); var ratio=(left0-this.offsetLeft)/(top0-this.offsetTop);
@ -18305,8 +18310,15 @@
top=Math.random()*5+10; top=Math.random()*5+10;
} }
var transform='translate('+left+'px,'+top+'px) '+ var transform='translate('+left+'px,'+top+'px) '+
'rotate('+(Math.random()*20-10)+'deg) '+ 'rotate('+(Math.random()*20-10)+'deg) ';
((Math.random()-0.5<0)?'rotateX(180deg)':'rotateY(180deg)'); if(type=='flip'){
if(game.layout=='long'||game.layout=='long2'){
transform+='rotateY(180deg)';
}
else{
transform+=((Math.random()-0.5<0)?'rotateX(180deg)':'rotateY(180deg)');
}
}
if(get.is.mobileMe(this)){ if(get.is.mobileMe(this)){
this.node.avatar.style.transform=transform; this.node.avatar.style.transform=transform;
this.node.avatar2.style.transform=transform; this.node.avatar2.style.transform=transform;
@ -20860,7 +20872,7 @@
player.setNickname(); player.setNickname();
if(info.dead){ if(info.dead){
player.classList.add('dead'); player.classList.add('dead');
if(lib.config.die_flip){ if(lib.config.die_move){
player.$dieflip(); player.$dieflip();
} }
if(lib.element.player.$dieAfter){ if(lib.element.player.$dieAfter){

View File

@ -239,6 +239,7 @@
} }
#arena>.player:not(.minskin)>.damage.dieidentity{ #arena>.player:not(.minskin)>.damage.dieidentity{
font-size: 60px; font-size: 60px;
transform: scale(1);
} }
#arena[data-player_height='default']>.player:not(.minskin){ #arena[data-player_height='default']>.player:not(.minskin){
height: 200px !important; height: 200px !important;

View File

@ -880,6 +880,40 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.players[i].identityShown=false; game.players[i].identityShown=false;
} }
} }
if(get.config('special_identity')&&!event.zhongmode&&game.players.length==8){
for(var i=0;i<game.players.length;i++){
delete game.players[i].special_identity;
}
event.special_identity=[];
var zhongs=game.filterPlayer(function(current){
return current.identity=='zhong';
});
var fans=game.filterPlayer(function(current){
return current.identity=='fan';
});
if(fans.length>=1){
fans.randomRemove().special_identity='identity_zeishou';
event.special_identity.push('identity_zeishou');
}
if(zhongs.length>1){
zhongs.randomRemove().special_identity='identity_dajiang';
zhongs.randomRemove().special_identity='identity_junshi';
event.special_identity.push('identity_dajiang');
event.special_identity.push('identity_junshi');
}
else if(zhongs.length==1){
if(Math.random()<0.5){
zhongs.randomRemove().special_identity='identity_dajiang';
event.special_identity.push('identity_dajiang');
}
else{
zhongs.randomRemove().special_identity='identity_junshi';
event.special_identity.push('identity_junshi');
}
}
}
if(!game.zhu) game.zhu=game.me; if(!game.zhu) game.zhu=game.me;
else{ else{
game.zhu.setIdentity(); game.zhu.setIdentity();
@ -969,6 +1003,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
} }
} }
} }
if(game.me.special_identity){
dialog.setCaption('选择角色('+get.translation(game.me.special_identity)+'');
game.me.node.identity.firstChild.innerHTML=get.translation(game.me.special_identity+'_bg');
}
else{
dialog.setCaption('选择角色');
game.me.setIdentity();
}
if(!event.chosen.length){ if(!event.chosen.length){
game.me.chooseButton(dialog,true).set('onfree',true).selectButton=function(){ game.me.chooseButton(dialog,true).set('onfree',true).selectButton=function(){
if(_status.brawl&&_status.brawl.doubleCharacter) return 2; if(_status.brawl&&_status.brawl.doubleCharacter) return 2;
@ -1131,6 +1173,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
setTimeout(function(){ setTimeout(function(){
ui.arena.classList.remove('choose-character'); ui.arena.classList.remove('choose-character');
},500); },500);
if(event.special_identity){
for(var i=0;i<event.special_identity.length;i++){
game.zhu.addSkill(event.special_identity[i]);
}
}
}); });
}, },
chooseCharacterOL:function(){ chooseCharacterOL:function(){