Skip to content

Commit

Permalink
Fix Arena Drop State not working, Fix Improper Mob tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
Oxyopiia committed Feb 8, 2024
1 parent 42cba3c commit 241ef18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ object ArenaSession {

private val totalBossWaves get() = waveNumber / 5

val mobsRemaining get() = if (isBossWave()) 1 else totalWaveMobs() - waveMobsKilled

fun totalWaveMobs(): Int {
return if (isBossWave()) 1 else {
(3 + (waveNumber * 2) - (totalBossWaves * 2)).coerceAtMost(35)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ object LiveArenaInformation : HudElement("Live Arena Information", Vice.storage.
val world = session.relatedWorld
val color = "&&${world.displayColor}"
val dropName = ArenaAPI.getUniqueDropName(world)
val mobsRemaining = session.totalWaveMobs() - session.waveMobsKilled

val list = mutableListOf(
"${color}&&l${world.displayName}",
Expand All @@ -40,15 +39,13 @@ object LiveArenaInformation : HudElement("Live Arena Information", Vice.storage.
if (showDropsState != 0) {
list.add("")

when {
showDropsState == 1 || showDropsState == 3 -> list.add("&&fCommon Drop &&7${session.calcCommonDrops()}x")
showDropsState >= 2 -> list.add("${color}${dropName} &&7${session.calcUniqueDropChance()}%")
}
if (showDropsState == 1 || showDropsState == 3) list.add("&&fCommon Drop &&7${session.calcCommonDrops()}x")
if (showDropsState >= 2) list.add("${color}${dropName} &&7${session.calcUniqueDropChance()}%")
}

if (Vice.config.LIVE_ARENA_MOBS) {
list.add("")
list.add("&&fMobs Remaining &&c${mobsRemaining}")
list.add("&&fMobs Remaining &&c${session.mobsRemaining.coerceAtLeast(0)}")
}

position.drawStrings(list, event.context)
Expand Down

0 comments on commit 241ef18

Please sign in to comment.