完善护甲机制,修复护甲失效时damagepop不正确的bug
This commit is contained in:
parent
f6fd5259de
commit
4b69a510c7
|
@ -19504,6 +19504,7 @@
|
||||||
event.hujia=Math.min(-num,player.hujia);
|
event.hujia=Math.min(-num,player.hujia);
|
||||||
event.getParent().hujia=event.hujia;
|
event.getParent().hujia=event.hujia;
|
||||||
event.num+=event.hujia;
|
event.num+=event.hujia;
|
||||||
|
//log moved to changeHujia
|
||||||
//game.log(player,'的护甲抵挡了'+get.cnNumber(event.hujia)+'点伤害');
|
//game.log(player,'的护甲抵挡了'+get.cnNumber(event.hujia)+'点伤害');
|
||||||
player.changeHujia(-event.hujia).type='damage';
|
player.changeHujia(-event.hujia).type='damage';
|
||||||
}
|
}
|
||||||
|
@ -19537,7 +19538,7 @@
|
||||||
num=-player.hujia;
|
num=-player.hujia;
|
||||||
event.num=num;
|
event.num=num;
|
||||||
}
|
}
|
||||||
switch(event.type){
|
switch(event.type){ //log moved here
|
||||||
case 'damage':
|
case 'damage':
|
||||||
game.log(player,'的护甲抵挡了'+get.cnNumber(-num)+'点伤害');
|
game.log(player,'的护甲抵挡了'+get.cnNumber(-num)+'点伤害');
|
||||||
break;
|
break;
|
||||||
|
@ -19547,9 +19548,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
player.hujia+=num;
|
player.hujia+=num;
|
||||||
// if(player.hujia<0){
|
/*if(player.hujia<0){
|
||||||
// player.hujia=0;
|
player.hujia=0;
|
||||||
// }
|
}*/
|
||||||
player.update();
|
player.update();
|
||||||
},
|
},
|
||||||
dying:function(){
|
dying:function(){
|
||||||
|
|
Loading…
Reference in New Issue