Add lib.element.player.getHp and change lib.element.player.getDamagedHp.

This commit is contained in:
Tipx-L 2023-08-03 05:27:05 -07:00
parent 6295e29f29
commit d253a27551
1 changed files with 4 additions and 1 deletions

View File

@ -18468,8 +18468,11 @@
inRangeOf:function(source){
return source.inRange(this);
},
getHp:function(){
return Math.max(0,this.hp);
},
getDamagedHp:function(){
return this.maxHp-Math.max(0,this.hp);
return this.maxHp-this.getHp();
},
changeGroup:function(group,log,broadcast){
var next=game.createEvent('changeGroup');