Skip to content

Commit

Permalink
Merge branch 'beta' of https://github.com/hannibal002/SkyHanni into i…
Browse files Browse the repository at this point in the history
…tem-stack-size-sbleveling
  • Loading branch information
RayDeeUx committed Jan 24, 2024
2 parents cf1a1e7 + bc8490f commit a8ad8ef
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 34 deletions.
15 changes: 12 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@

+ Changed the description of the Dungeon Chat Filter feature to be more descriptive. - Wambo
+ Added options to change exactly what part of the Dungeon Chat Filter should be used. - Wambo
+ Hide F3/M3 guardian Damage Indicators once the professor spawns. - hannibal2
+ Added exact names for the floor 6 giants in the Damage Indicator. - hannibal2

#### Diana Changes

Expand Down Expand Up @@ -170,11 +172,17 @@
+ Fixed Dungeon and Kuudra party finder join message not detecting in party member tab complete. - CalMWolfs
+ Fixed Fire Veil Wand circle shows on left-clicking. - hannibal2
+ Fixed Ashfang Freeze Cooldown being off by one second. Fixed Fire Veil line gets shown even while frozen. - hannibal2
+ Fixed all Damage Indicator boss timers in Dungeons being off by a second. - hannibal2
+ Gave Damage Indicator mobs correct names on floor 1, 2, 3 and 6. (Removed "Generic Dungeon Boss") - hannibal2
+ Fixed time until the next area mini boss spawns being off by one second. - hannibal2

#### Dungeon Fixes

+ Fixed the M3 reinforced guardian not getting detected in the Damage Indicator. - hannibal2
+ Gave Damage Indicator mobs correct names on floor 1, 2, 3 and 6. (Removed "Generic Dungeon Boss") - hannibal2
+ Fixed kill time of slayer in Damage Indicator to be off by one second. - hannibal2
+ Fixed time until the next area mini boss spawns being off by one second. - hannibal2
+ Fixed all Damage Indicator boss timers in Dungeons being off by a second. - hannibal2
+ Fixed Bonzo phase 1 does not get detected properly for Damage Indicator. - hannibal2
+ Fixed Dungeon Clean End sometimes not deactivating when chest spawned. - hannibal2
+ Fixed F3/M3 guardian spawn timer in Damage Indicator. - hannibal2

#### Diana Fixes

Expand Down Expand Up @@ -234,6 +242,7 @@
+ Fixed titles not showing above other SkyHanni GUI elements all the time. - Thunderblade73
+ Fixed Daily City Project Reminder is still working on already-released projects. - alexia
+ Fixed a typo in Odger Waypoint config. - Empa
+ Fixed NPC typos in config. - absterge

### Technical Changes

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
}

group = "at.hannibal2.skyhanni"
version = "0.23.Beta.13"
version = "0.23.Beta.14"

val gitHash by lazy {
val baos = ByteArrayOutputStream()
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ import org.apache.logging.log4j.Logger
clientSideOnly = true,
useMetadata = true,
guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop",
version = "0.23.Beta.13",
version = "0.23.Beta.14",
)
class SkyHanniMod {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ enum class BossType(

DUNGEON_F5("§dLivid", Type.DUNGEON_FLOOR_5),

DUNGEON_F6_GIANT("§eGiant", Type.DUNGEON_FLOOR_6),
DUNGEON_F6_GIANT_1("§eBoulder Tosser", Type.DUNGEON_FLOOR_6, "§eGiant 1"),
DUNGEON_F6_GIANT_2("§eSword Thrower", Type.DUNGEON_FLOOR_6, "§eGiant 2"),
DUNGEON_F6_GIANT_3("§eBigfoot Jumper", Type.DUNGEON_FLOOR_6, "§eGiant 3"),
DUNGEON_F6_GIANT_4("§eLazer Shooter", Type.DUNGEON_FLOOR_6, "§eGiant 4"),
DUNGEON_F6_SADAN("§cSadan", Type.DUNGEON_FLOOR_6),

// TODO implement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ class DamageIndicatorManager {
.map { it.entity.getLorenzVec() }
.minOfOrNull { it.distance(location) } ?: Double.MAX_VALUE
}

fun removeDamageIndicator(type: BossType) {
data = data.editCopy {
values.removeIf {it.bossType == type}
}
}
}

@SubscribeEvent
Expand Down Expand Up @@ -897,7 +903,6 @@ class DamageIndicatorManager {
result
}


}

fun isEnabled() = LorenzUtils.inSkyBlock && config.enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class MobFinder {
//F6
private var floor6Giants = false
private var floor6GiantsSpawnTime = 0L
private var floor6GiantsSeparateDelay = mutableMapOf<UUID, Long>()
private var floor6GiantsSeparateDelay = mutableMapOf<UUID, Pair<Long, BossType>>()
private var floor6Sadan = false
private var floor6SadanSpawnTime = 0L

Expand Down Expand Up @@ -236,11 +236,11 @@ class MobFinder {
private fun tryAddDungeonF6(entity: EntityLivingBase): EntityResult? {
if (entity !is EntityGiantZombie || entity.isInvisible) return null
if (floor6Giants && entity.posY > 68) {
val extraDelay = checkExtraF6GiantsDelay(entity)
val (extraDelay, bossType) = checkExtraF6GiantsDelay(entity)
return EntityResult(
floor6GiantsSpawnTime + extraDelay,
floor6GiantsSpawnTime + extraDelay + 1_000 > System.currentTimeMillis(),
bossType = BossType.DUNGEON_F6_GIANT
bossType = bossType
)
}

Expand Down Expand Up @@ -469,7 +469,7 @@ class MobFinder {
EntityResult(bossType = BossType.THUNDER)
} else null

private fun checkExtraF6GiantsDelay(entity: EntityGiantZombie): Long {
private fun checkExtraF6GiantsDelay(entity: EntityGiantZombie): Pair<Long, BossType> {
val uuid = entity.uniqueID

if (floor6GiantsSeparateDelay.contains(uuid)) {
Expand All @@ -482,37 +482,42 @@ class MobFinder {

var pos = 0

//first

val type: BossType
if (loc.x > middle.x && loc.z > middle.z) {
//first
pos = 2
}

type = BossType.DUNGEON_F6_GIANT_3
} else if (loc.x > middle.x && loc.z < middle.z) {
//second
if (loc.x > middle.x && loc.z < middle.z) {
pos = 3
}

type = BossType.DUNGEON_F6_GIANT_4
} else if (loc.x < middle.x && loc.z < middle.z) {
//third
if (loc.x < middle.x && loc.z < middle.z) {
pos = 0
}

type = BossType.DUNGEON_F6_GIANT_1
} else if (loc.x < middle.x && loc.z > middle.z) {
//fourth
if (loc.x < middle.x && loc.z > middle.z) {
pos = 1
type = BossType.DUNGEON_F6_GIANT_2
} else {
pos = 0
type = BossType.DUNGEON_F6_GIANT_1
}


val extraDelay = 900L * pos
floor6GiantsSeparateDelay[uuid] = extraDelay
val pair = Pair(extraDelay, type)
floor6GiantsSeparateDelay[uuid] = pair

return extraDelay
return pair
}

fun handleChat(message: String) {
if (!LorenzUtils.inDungeons) return
when (message) {
//F1
"§c[BOSS] Bonzo§r§f: Gratz for making it this far, but Im basically unbeatable." -> {
"§c[BOSS] Bonzo§r§f: Gratz for making it this far, but I'm basically unbeatable." -> {
floor1bonzo1 = true
floor1bonzo1SpawnTime = System.currentTimeMillis() + 11_250
}
Expand Down Expand Up @@ -552,14 +557,12 @@ class MobFinder {
//F3
"§c[BOSS] The Professor§r§f: I was burdened with terrible news recently..." -> {
floor3GuardianShield = true
floor3GuardianShieldSpawnTime = System.currentTimeMillis() + 16_400
}

"§c[BOSS] The Professor§r§f: Even if you took my barrier down, I can still fight." -> {
floor3GuardianShield = false
floor3GuardianShieldSpawnTime = System.currentTimeMillis() + 15_400
}

"§c[BOSS] The Professor§r§f: Oh? You found my Guardians' one weakness?" -> {
floor3GuardianShield = false
DamageIndicatorManager.removeDamageIndicator(BossType.DUNGEON_F3_GUARDIAN)
floor3Professor = true
floor3ProfessorSpawnTime = System.currentTimeMillis() + 10_300
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import at.hannibal2.skyhanni.events.PlaySoundEvent
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraft.client.Minecraft
import net.minecraft.client.entity.EntityOtherPlayerMP
import net.minecraft.entity.item.EntityArmorStand
Expand All @@ -20,7 +21,10 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class DungeonCleanEnd {

private val config get() = SkyHanniMod.feature.dungeon.cleanEnd
private val catacombsPattern = "([ ]*)§r§c(The|Master Mode) Catacombs §r§8- §r§eFloor (.*)".toPattern()
private val catacombsPattern by RepoPattern.pattern(
"dungeon.end.chests.spawned",
"(?:§f)?( *)§r§c(The|Master Mode) Catacombs §r§8- §r§eFloor (.*)"
)

private var bossDone = false
private var chestsSpawned = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ object SackDisplay {

enum class PriceFrom(val displayName: String) {
BAZAAR("Bazaar Price"),
NPC("Npc Price"),
NPC("NPC Price"),
;
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/at/hannibal2/skyhanni/test/PriceSource.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ package at.hannibal2.skyhanni.test
enum class PriceSource(val displayName: String) {
BAZAAR_INSTANT_SELL("Instant Sell"),
BAZAAR_SELL_OFFER("Sell Offer"),
NPC("Npc Price"),
NPC("NPC Price"),
;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ class SkyHanniDebugsAndTests {
val internalName = event.itemStack.getInternalNameOrNull() ?: return

val npcPrice = internalName.getNpcPriceOrNull() ?: return
event.toolTip.add("§7Npc price: §6${npcPrice.addSeparators()}")
event.toolTip.add("§7NPC price: §6${npcPrice.addSeparators()}")
}

@SubscribeEvent
Expand Down

0 comments on commit a8ad8ef

Please sign in to comment.