Refactor of health int -> float and fixed armor being useless when

computed damage reduction is less than 1
This commit is contained in:
Dylan K. Taylor
2017-08-30 11:03:07 +01:00
parent ea5bd0348a
commit fd52022065
8 changed files with 61 additions and 71 deletions

View File

@ -2276,7 +2276,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$points += $armorItem->getDefensePoints();
}
$damage[EntityDamageEvent::MODIFIER_ARMOR] = -floor($damage[EntityDamageEvent::MODIFIER_BASE] * $points * 0.04);
$damage[EntityDamageEvent::MODIFIER_ARMOR] = -($damage[EntityDamageEvent::MODIFIER_BASE] * $points * 0.04);
}
$ev = new EntityDamageByEntityEvent($this, $target, EntityDamageEvent::CAUSE_ENTITY_ATTACK, $damage);