Skip to content

Commit 6366e74

Browse files
committed
细化符卡数量不足的错误提示
1 parent 26287e0 commit 6366e74

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/kotlin/SpellConfig.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ object SpellConfig {
5656
}
5757
val spellIds = HashSet<String>()
5858
val result = Array(stars.size) {
59-
val isExMap = map[stars[it]] ?: throw HandlerException("符卡数量不足")
60-
val gameMap = isExMap[false] ?: throw HandlerException("符卡数量不足")
59+
val isExMap = map[stars[it]] ?: throw HandlerException("${stars[it]}星符卡数量不足")
60+
val gameMap = isExMap[false] ?: throw HandlerException("${stars[it]}星符卡数量不足")
6161
var spell: Spell
6262
do {
63-
val game = gameMap.keys.randomOrNull(rand) ?: throw HandlerException("符卡数量不足")
63+
val game = gameMap.keys.randomOrNull(rand) ?: throw HandlerException("${stars[it]}星符卡数量不足")
6464
val spellList = gameMap[game]!!
6565
spell = spellList.removeFirst()
6666
if (spellList.isEmpty()) gameMap.remove(game)
@@ -75,7 +75,7 @@ object SpellConfig {
7575
firstTry = false
7676
} else {
7777
index = (index + 1) % result.size
78-
if (index == exPos[i]) throw HandlerException("符卡数量不足")
78+
if (index == exPos[i]) throw HandlerException("EX符卡数量不足")
7979
if (index in exPos) continue
8080
}
8181
val isExMap = map[stars[index]] ?: continue

0 commit comments

Comments
 (0)