This commit is contained in:
parent
e57670d1d7
commit
66445f6351
|
@ -64,7 +64,7 @@ window.config={
|
|||
background_audio:true,
|
||||
background_speak:true,
|
||||
glow_phase:'yellow',
|
||||
die_flip:true,
|
||||
die_move:'flip',
|
||||
|
||||
skin:{},
|
||||
gameRecord:{},
|
||||
|
|
36
game/game.js
36
game/game.js
|
@ -2183,12 +2183,6 @@
|
|||
init:true,
|
||||
unfrequent:true,
|
||||
},
|
||||
die_flip:{
|
||||
name:'阵亡效果',
|
||||
intro:'阵亡后武将位置会随机移动',
|
||||
init:true,
|
||||
unfrequent:true,
|
||||
},
|
||||
animation:{
|
||||
name:'游戏特效',
|
||||
intro:'开启后出现属性伤害、回复体力等情况时会显示动画',
|
||||
|
@ -2201,6 +2195,17 @@
|
|||
init:true,
|
||||
unfrequent:true,
|
||||
},
|
||||
die_move:{
|
||||
name:'阵亡效果',
|
||||
intro:'阵亡后武将的显示效果',
|
||||
init:'flip',
|
||||
unfrequent:true,
|
||||
item:{
|
||||
off:'关闭',
|
||||
move:'移动',
|
||||
flip:'翻面',
|
||||
}
|
||||
},
|
||||
target_shake:{
|
||||
name:'目标效果',
|
||||
intro:'一名玩家成为卡牌或技能的目标时的显示效果',
|
||||
|
@ -18285,14 +18290,14 @@
|
|||
game.broadcast(function(player){
|
||||
player.$die();
|
||||
},this);
|
||||
if(lib.config.die_flip){
|
||||
this.$dieflip();
|
||||
if(lib.config.die_move!='off'){
|
||||
this.$dieflip(lib.config.die_move);
|
||||
}
|
||||
if(lib.element.player.$dieAfter){
|
||||
lib.element.player.$dieAfter.call(this);
|
||||
}
|
||||
},
|
||||
$dieflip:function(){
|
||||
$dieflip:function(type){
|
||||
var top0=ui.window.offsetHeight/2;
|
||||
var left0=ui.window.offsetWidth/2;
|
||||
var ratio=(left0-this.offsetLeft)/(top0-this.offsetTop);
|
||||
|
@ -18305,8 +18310,15 @@
|
|||
top=Math.random()*5+10;
|
||||
}
|
||||
var transform='translate('+left+'px,'+top+'px) '+
|
||||
'rotate('+(Math.random()*20-10)+'deg) '+
|
||||
((Math.random()-0.5<0)?'rotateX(180deg)':'rotateY(180deg)');
|
||||
'rotate('+(Math.random()*20-10)+'deg) ';
|
||||
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)){
|
||||
this.node.avatar.style.transform=transform;
|
||||
this.node.avatar2.style.transform=transform;
|
||||
|
@ -20860,7 +20872,7 @@
|
|||
player.setNickname();
|
||||
if(info.dead){
|
||||
player.classList.add('dead');
|
||||
if(lib.config.die_flip){
|
||||
if(lib.config.die_move){
|
||||
player.$dieflip();
|
||||
}
|
||||
if(lib.element.player.$dieAfter){
|
||||
|
|
|
@ -239,6 +239,7 @@
|
|||
}
|
||||
#arena>.player:not(.minskin)>.damage.dieidentity{
|
||||
font-size: 60px;
|
||||
transform: scale(1);
|
||||
}
|
||||
#arena[data-player_height='default']>.player:not(.minskin){
|
||||
height: 200px !important;
|
||||
|
|
|
@ -880,6 +880,40 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
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;
|
||||
else{
|
||||
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){
|
||||
game.me.chooseButton(dialog,true).set('onfree',true).selectButton=function(){
|
||||
if(_status.brawl&&_status.brawl.doubleCharacter) return 2;
|
||||
|
@ -1131,6 +1173,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
setTimeout(function(){
|
||||
ui.arena.classList.remove('choose-character');
|
||||
},500);
|
||||
|
||||
if(event.special_identity){
|
||||
for(var i=0;i<event.special_identity.length;i++){
|
||||
game.zhu.addSkill(event.special_identity[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
chooseCharacterOL:function(){
|
||||
|
|
Loading…
Reference in New Issue