Skip to content

Commit

Permalink
Add Harvest Harbinger and Pest Repellent non-god effects (hannibal002…
Browse files Browse the repository at this point in the history
…#817)

Added Harvest Harbinger and Pest Repellent non-god effects. hannibal002#817
  • Loading branch information
qtlunya authored and Thunderblade73 committed Jan 7, 2024
1 parent 18626ba commit c7b0188
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ class NonGodPotEffectDisplay {
DEEP_TERROR("§4Deepterror", true),

GREAT_SPOOK("§fGreat Spook I", inventoryItemName = "§fGreat Spook Potion"),

HARVEST_HARBINGER("§6Harvest Harbinger V"),

PEST_REPELLENT("§6Pest Repellent I§r"),
PEST_REPELLENT_MAX("§6Pest Repellent II"),
;
}

Expand Down Expand Up @@ -92,6 +97,18 @@ class NonGodPotEffectDisplay {
update()
}

if (event.message == "§a§lBUFF! §fYou have gained §r§6Harvest Harbinger V§r§f! Press TAB or type /effects to view your active effects!") {
effectDuration[NonGodPotEffect.HARVEST_HARBINGER] = Timer(25.minutes)
update()
}

if (event.message == "§a§lYUM! §r§6Pests §r§7will now spawn §r§a2x §r§7less while you break crops for the next §r§a60m§r§7!") {
effectDuration[NonGodPotEffect.PEST_REPELLENT] = Timer(1.hours)
}

if (event.message == "§a§lYUM! §r§6Pests §r§7will now spawn §r§a4x §r§7less while you break crops for the next §r§a60m§r§7!") {
effectDuration[NonGodPotEffect.PEST_REPELLENT_MAX] = Timer(1.hours)
}

if (event.message == "§e[NPC] §6King Yolkar§f: §rThese eggs will help me stomach my pain.") {
effectDuration[NonGodPotEffect.GOBLIN] = Timer(20.minutes)
Expand Down Expand Up @@ -197,7 +214,7 @@ class NonGodPotEffectDisplay {
for (line in lines) {
for (effect in NonGodPotEffect.entries) {
val tabListName = effect.tabListName
if (line.startsWith(tabListName)) {
if ("$line§r".startsWith(tabListName)) {
val string = line.substring(tabListName.length)
try {
val duration = TimeUtils.getMillis(string.split("§f")[1])
Expand Down

0 comments on commit c7b0188

Please sign in to comment.