From 4a1ee6ae56b5f5b9cab8ad61ef6b26f4aceec694 Mon Sep 17 00:00:00 2001 From: nea Date: Mon, 19 Dec 2022 19:05:20 +0100 Subject: PetLeveling: Fix non legendary pets being able to be leveled above 100 Also adds tests for this --- .../kotlin/io/github/moulberry/notenoughupdates/util/PetLeveling.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/kotlin') diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/util/PetLeveling.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/util/PetLeveling.kt index e7d29642..0a9e37b9 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/util/PetLeveling.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/util/PetLeveling.kt @@ -105,7 +105,7 @@ object PetLeveling { } maxLevel = customLeveling["max_level"]?.asInt ?: maxLevel } - return ExpLadder(levels.drop(offset).take(maxLevel)) + return ExpLadder(levels.drop(offset).take(maxLevel - 1)) } } -- cgit