aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
index 12c47355f..5cf493fd5 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt
@@ -100,22 +100,16 @@ object EntityUtils {
//TODO remove baseMaxHealth
fun EntityLivingBase.hasMaxHealth(health: Int, boss: Boolean = false, maxHealth: Int = baseMaxHealth): Boolean {
- if (maxHealth == health) return true
+ val derpyMultiplier = if (LorenzUtils.isDerpy) 2 else 1
+ if (maxHealth == health * derpyMultiplier) return true
- if (LorenzUtils.isDerpy) {
- if (maxHealth == health * 2) return true
- }
-
- // TODO runic support
-
- if (!boss) {
+ if (!boss && !LorenzUtils.inDungeons) {
//Corrupted
- if (maxHealth == health * 3) return true
-
- //Derpy + Corrupted
- if (LorenzUtils.isDerpy) {
- if (maxHealth == health * 2 * 3) return true
- }
+ if (maxHealth == health * 3 * derpyMultiplier) return true
+ // Runic
+ if (maxHealth == health * 4 * derpyMultiplier) return true
+ // Corrupted+Runic
+ if (maxHealth == health * 12 * derpyMultiplier) return true
}
return false