diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-08-06 17:56:30 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-08-06 17:56:30 +0200 |
commit | 4583f00dbc2148159c2fb9ac26d260af5090b29d (patch) | |
tree | f94cde5a50d616573adebe3bf00cac67dd944b40 | |
parent | 84b9b27da573a33d845642547a50510bf8a8a234 (diff) | |
download | skyhanni-4583f00dbc2148159c2fb9ac26d260af5090b29d.tar.gz skyhanni-4583f00dbc2148159c2fb9ac26d260af5090b29d.tar.bz2 skyhanni-4583f00dbc2148159c2fb9ac26d260af5090b29d.zip |
adding m4 debug support
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/dungeon/damageindicator/BossDamageIndicator.kt | 24 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/dungeon/damageindicator/BossFinder.kt | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/dungeon/damageindicator/BossDamageIndicator.kt b/src/main/java/at/hannibal2/skyhanni/dungeon/damageindicator/BossDamageIndicator.kt index fe69dbd61..75c4c3afb 100644 --- a/src/main/java/at/hannibal2/skyhanni/dungeon/damageindicator/BossDamageIndicator.kt +++ b/src/main/java/at/hannibal2/skyhanni/dungeon/damageindicator/BossDamageIndicator.kt @@ -122,6 +122,20 @@ class BossDamageIndicator { health = hitPoints maxHealth = 4 +// } else if (DungeonData.isOneOf("M4")) { +// val hitPoints = when (health) { +// 300_000 -> 4 +// 222_000 -> 3 +// 144_000 -> 2 +// 66_000 -> 1 +// else -> { +// LorenzUtils.error("Unexpected health of thorn in F4! ($health)") +// return +// } +// } + +// health = hitPoints +// maxHealth = 4 } else { val biggestHealth = getMaxHealthFor(event.entity) @@ -143,8 +157,18 @@ class BossDamageIndicator { else -> LorenzColor.RED } + if (data.containsKey(entity)){ + val lastHealth = data[entity]!!.lastHealth + val diff = lastHealth - health + if (diff != 0) { + LorenzUtils.chat("diff: $diff") + } + + } + data[entity] = EntityData( entity, + health, NumberUtil.format(health), color, System.currentTimeMillis(), diff --git a/src/main/java/at/hannibal2/skyhanni/dungeon/damageindicator/BossFinder.kt b/src/main/java/at/hannibal2/skyhanni/dungeon/damageindicator/BossFinder.kt index 9dab49492..021b4d183 100644 --- a/src/main/java/at/hannibal2/skyhanni/dungeon/damageindicator/BossFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/dungeon/damageindicator/BossFinder.kt @@ -153,6 +153,8 @@ class BossFinder { if (DungeonData.isOneOf("F4", "M4")) { if (entity is EntityGhast) { val health = LorenzUtils.formatDouble(entity.health.toDouble()) + LorenzTest.enabled = true + LorenzTest.text = "thorn has $health hp!" return EntityResult(ignoreBlocks = true, finalBoss = true) } |