diff options
| author | Brandon <brandon.wamboldt@gmail.com> | 2023-09-17 08:41:49 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-17 13:41:49 +0200 |
| commit | 5e86d7b1d09705c772f2cf860d1df1aa4f4f2b9d (patch) | |
| tree | 1d188607cba74eb583b0c672a9f850011352f228 /src/main/java/at/hannibal2/skyhanni/utils | |
| parent | 4644ac65070681cc70af20285206170a77bb2597 (diff) | |
| download | skyhanni-5e86d7b1d09705c772f2cf860d1df1aa4f4f2b9d.tar.gz skyhanni-5e86d7b1d09705c772f2cf860d1df1aa4f4f2b9d.tar.bz2 skyhanni-5e86d7b1d09705c772f2cf860d1df1aa4f4f2b9d.zip | |
Fix rare sea creature detection (#462)
Fix rare sea creature detection #462
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/EntityUtils.kt | 22 |
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 |
