diff --git a/src/main/kotlin/net/taehui/twilight/Component.kt b/src/main/kotlin/net/taehui/twilight/Component.kt index 9884e19..d4d2845 100644 --- a/src/main/kotlin/net/taehui/twilight/Component.kt +++ b/src/main/kotlin/net/taehui/twilight/Component.kt @@ -121,6 +121,7 @@ const val TEST_HIT_POINTS_MODE = 7 const val DEFAULT_LONG_NOTE_MODE = 0 + const val INPUT_LONG_NOTE_MODE = 2 const val DEFAULT_INPUT_FAVOR_MODE = 0 const val MODE_5_INPUT_FAVOR_MODE = 5 @@ -130,6 +131,7 @@ const val MODE_9_INPUT_FAVOR_MODE = 9 const val DEFAULT_NOTE_MODIFY_MODE = 0 + const val LONG_NOTE_NOTE_MODIFY_MODE = 2 const val STANDARD_HEIGHT = 720.0 const val STANDARD_BPM = 130.0 diff --git a/src/main/kotlin/net/taehui/twilight/JSON.kt b/src/main/kotlin/net/taehui/twilight/JSON.kt index bdc35cc..52ad078 100644 --- a/src/main/kotlin/net/taehui/twilight/JSON.kt +++ b/src/main/kotlin/net/taehui/twilight/JSON.kt @@ -393,7 +393,7 @@ var noteModifyMode = 0 var lowestJudgmentConditionMode = 0 var stand = 0 - var highestBand = 0 + var band = 0 var point = 0.0 var salt = 0 @@ -609,7 +609,7 @@ var noteID = "" var stand = 0 var point = 0.0 - var highestBand = 0 + var band = 0 var judgments = emptyArray() var autoMode = 0 var noteSaltMode = 0 diff --git a/src/main/kotlin/net/taehui/twilight/awilight/DefaultCompute.kt b/src/main/kotlin/net/taehui/twilight/awilight/DefaultCompute.kt index 5689948..42bb55c 100644 --- a/src/main/kotlin/net/taehui/twilight/awilight/DefaultCompute.kt +++ b/src/main/kotlin/net/taehui/twilight/awilight/DefaultCompute.kt @@ -125,7 +125,7 @@ fun handleNotes(w: Double) { modeComponentValue.bpm = bpm - comment.levyingMultiplier = modeComponentValue.getPaidMultiplier() + comment.levyingMultiplier = modeComponentValue.getMultiplier() comment.levyingAudioMultiplier = modeComponentValue.audioMultiplier val inputCount = Component.INPUT_COUNTS[inputMode.value] val drawingComponent = EventOuterClass.Event.DrawingComponent.newBuilder().apply { @@ -416,7 +416,7 @@ @JvmField val isF = this@DefaultCompute.isF - val multiplier = modeComponentValue.getPaidMultiplier() + val multiplier = modeComponentValue.getMultiplier() val audioMultiplier = modeComponentValue.audioMultiplier val ioMillis = System.currentTimeMillis() }, diff --git a/src/main/kotlin/net/taehui/twilight/awilight/ModeComponent.kt b/src/main/kotlin/net/taehui/twilight/awilight/ModeComponent.kt index 0c3b25d..c277e36 100644 --- a/src/main/kotlin/net/taehui/twilight/awilight/ModeComponent.kt +++ b/src/main/kotlin/net/taehui/twilight/awilight/ModeComponent.kt @@ -21,7 +21,7 @@ val salt = System.currentTimeMillis().toInt() var bpm = Component.STANDARD_BPM - fun getPaidMultiplier(): Double { + fun getMultiplier(): Double { return multiplierValue / (bpm * audioMultiplier) } } \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/note/InputNote.kt b/src/main/kotlin/net/taehui/twilight/note/InputNote.kt index fcc21ce..01d479f 100644 --- a/src/main/kotlin/net/taehui/twilight/note/InputNote.kt +++ b/src/main/kotlin/net/taehui/twilight/note/InputNote.kt @@ -43,7 +43,7 @@ } override fun paint(defaultComputer: DefaultCompute) { - val multiplier = defaultComputer.modeComponentValue.getPaidMultiplier() + val multiplier = defaultComputer.modeComponentValue.getMultiplier() if (multiplier > 0.0) { val position1 = getY(multiplier) - NOTE_HEIGHT + NOTE_HEIGHT_JUDGMENT if (position1 + NOTE_HEIGHT > 0.0) { diff --git a/src/main/kotlin/net/taehui/twilight/note/LongNote.kt b/src/main/kotlin/net/taehui/twilight/note/LongNote.kt index 47765a1..64d3759 100644 --- a/src/main/kotlin/net/taehui/twilight/note/LongNote.kt +++ b/src/main/kotlin/net/taehui/twilight/note/LongNote.kt @@ -66,7 +66,7 @@ } override fun paint(defaultComputer: DefaultCompute) { - val multiplier = defaultComputer.modeComponentValue.getPaidMultiplier() + val multiplier = defaultComputer.modeComponentValue.getMultiplier() if (multiplier > 0.0) { val y = getY(multiplier) val pointHeight = longHeight * multiplier diff --git a/src/main/kotlin/net/taehui/twilight/note/MeterNote.kt b/src/main/kotlin/net/taehui/twilight/note/MeterNote.kt index ed36adf..112173f 100644 --- a/src/main/kotlin/net/taehui/twilight/note/MeterNote.kt +++ b/src/main/kotlin/net/taehui/twilight/note/MeterNote.kt @@ -23,7 +23,7 @@ } override fun paint(defaultComputer: DefaultCompute) { - val multiplier = defaultComputer.modeComponentValue.getPaidMultiplier() + val multiplier = defaultComputer.modeComponentValue.getMultiplier() if (multiplier > 0.0) { val y = getY(multiplier) if (y >= 0.0) { diff --git a/src/main/kotlin/net/taehui/twilight/note/TrapNote.kt b/src/main/kotlin/net/taehui/twilight/note/TrapNote.kt index 13ba1ba..e5966b3 100644 --- a/src/main/kotlin/net/taehui/twilight/note/TrapNote.kt +++ b/src/main/kotlin/net/taehui/twilight/note/TrapNote.kt @@ -32,7 +32,7 @@ } override fun paint(defaultComputer: DefaultCompute) { - val multiplier = defaultComputer.modeComponentValue.getPaidMultiplier() + val multiplier = defaultComputer.modeComponentValue.getMultiplier() if (multiplier > 0.0) { val position1 = getY(multiplier) - NOTE_HEIGHT + NOTE_HEIGHT_JUDGMENT if (position1 + NOTE_HEIGHT > 0.0) { diff --git a/src/main/kotlin/net/taehui/twilight/qwilight/QwilightAvatar.kt b/src/main/kotlin/net/taehui/twilight/qwilight/QwilightAvatar.kt index 8e60c5c..4443a30 100644 --- a/src/main/kotlin/net/taehui/twilight/qwilight/QwilightAvatar.kt +++ b/src/main/kotlin/net/taehui/twilight/qwilight/QwilightAvatar.kt @@ -788,13 +788,13 @@ val noteModifyMode = text.noteModifyMode val lowestJudgmentConditionMode = text.lowestJudgmentConditionMode val stand = text.stand - val band = text.highestBand + val band = text.band val point = text.point val salt = text.salt val isPaused = text.isPaused val inputFlags = text.inputFlags val commentFileContents = eventData[1] - if (longNoteMode != INPUT_LONG_NOTE_MODE && judgmentMode != Component.FAVOR_JUDGMENT_MODE && hitPointsMode != Component.FAVOR_HIT_POINTS_MODE && hitPointsMode != Component.TEST_HIT_POINTS_MODE && noteModifyMode != LONG_NOTE_NOTE_MODIFY_MODE) { + if (longNoteMode != Component.INPUT_LONG_NOTE_MODE && judgmentMode != Component.FAVOR_JUDGMENT_MODE && hitPointsMode != Component.FAVOR_HIT_POINTS_MODE && hitPointsMode != Component.TEST_HIT_POINTS_MODE && noteModifyMode != Component.LONG_NOTE_NOTE_MODIFY_MODE) { val noteFileData = eventData[0].toByteArray() val targetComputing = BaseCompiler.handleCompile(noteFileData, dataID).single() val noteID512 = Utility.getID512(noteFileData) @@ -1517,7 +1517,5 @@ const val NET_COMPUTING = 7 const val IO_COMPUTING = 8 const val BUNDLE_AVAILABLE_COUNT = 1 - const val INPUT_LONG_NOTE_MODE = 2 - const val LONG_NOTE_NOTE_MODIFY_MODE = 2 } } \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/DB.kt b/src/main/kotlin/net/taehui/twilight/system/DB.kt index f530c7d..51e8511 100644 --- a/src/main/kotlin/net/taehui/twilight/system/DB.kt +++ b/src/main/kotlin/net/taehui/twilight/system/DB.kt @@ -727,7 +727,7 @@ """ SELECT Avatar, Note_ID, Hit_Points_Mode, Is_P FROM tw_comment - WHERE Lowest_Audio_Multiplier >= 1.0 AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Long_Note_Mode = ${Component.DEFAULT_LONG_NOTE_MODE} AND Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} AND Note_Modify_Mode = ${Component.DEFAULT_NOTE_MODIFY_MODE} + WHERE Lowest_Audio_Multiplier >= 1.0 AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.FAILED_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Long_Note_Mode = ${Component.DEFAULT_LONG_NOTE_MODE} AND Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} AND Note_Modify_Mode = ${Component.DEFAULT_NOTE_MODIFY_MODE} """.trimIndent() ).use { dbStatement -> dbStatement.executeQuery().use { rows -> @@ -2899,7 +2899,7 @@ """ SELECT tw_note.Note_ID, Note_Variety, Artist, Title, Genre, Level_Text, tw_note.Level, Stand, Avatar_ID, Avatar_Name, Ability_5K * (POWER(Stand / 1000000, 3) - 0.5 * POWER(Stand / 1000000, 2) + 0.5 * (Stand / 1000000)) AS Value FROM tw_note, tw_comment, tn_avatar - WHERE tw_note.Note_ID = tw_comment.Note_ID AND tw_comment.Avatar = tn_avatar.Avatar_ID AND Ability_5K > 0.0 AND (Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_5_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_5_1_INPUT_FAVOR_MODE}) AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Is_Max = true + WHERE tw_note.Note_ID = tw_comment.Note_ID AND tw_comment.Avatar = tn_avatar.Avatar_ID AND Ability_5K > 0.0 AND (Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_5_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_5_1_INPUT_FAVOR_MODE}) AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.FAILED_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Is_Max = true ORDER BY Value DESC """.trimIndent() ).use { dbStatement -> @@ -2932,7 +2932,7 @@ """ SELECT Ability_5K * (POWER(Stand / 1000000, 3) - 0.5 * POWER(Stand / 1000000, 2) + 0.5 * (Stand / 1000000)) AS Value FROM tw_note, tw_comment, tn_avatar - WHERE tw_note.Note_ID = tw_comment.Note_ID AND tw_comment.Avatar = tn_avatar.Avatar_ID AND Avatar_ID = ? AND Ability_5K > 0.0 AND (Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_5_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_5_1_INPUT_FAVOR_MODE}) AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Is_Max = true + WHERE tw_note.Note_ID = tw_comment.Note_ID AND tw_comment.Avatar = tn_avatar.Avatar_ID AND Avatar_ID = ? AND Ability_5K > 0.0 AND (Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_5_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_5_1_INPUT_FAVOR_MODE}) AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.FAILED_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Is_Max = true ORDER BY Value DESC LIMIT 50 """.trimIndent() @@ -2956,7 +2956,7 @@ """ SELECT tw_note.Note_ID, Note_Variety, Artist, Title, Genre, Level_Text, tw_note.Level, Stand, Avatar_ID, Avatar_Name, Ability_7K * (POWER(Stand / 1000000, 3) - 0.5 * POWER(Stand / 1000000, 2) + 0.5 * (Stand / 1000000)) AS Value FROM tw_note, tw_comment, tn_avatar - WHERE tw_note.Note_ID = tw_comment.Note_ID AND tw_comment.Avatar = tn_avatar.Avatar_ID AND Ability_7K > 0.0 AND (Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_7_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_7_1_INPUT_FAVOR_MODE}) AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Is_Max = true + WHERE tw_note.Note_ID = tw_comment.Note_ID AND tw_comment.Avatar = tn_avatar.Avatar_ID AND Ability_7K > 0.0 AND (Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_7_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_7_1_INPUT_FAVOR_MODE}) AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.FAILED_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Is_Max = true ORDER BY Value DESC """.trimIndent() ).use { dbStatement -> @@ -2989,7 +2989,7 @@ """ SELECT Ability_7K * (POWER(Stand / 1000000, 3) - 0.5 * POWER(Stand / 1000000, 2) + 0.5 * (Stand / 1000000)) AS Value FROM tw_note, tw_comment, tn_avatar - WHERE tw_note.Note_ID = tw_comment.Note_ID AND tw_comment.Avatar = tn_avatar.Avatar_ID AND Avatar_ID = ? AND Ability_7K > 0.0 AND (Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_7_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_7_1_INPUT_FAVOR_MODE}) AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Is_Max = true + WHERE tw_note.Note_ID = tw_comment.Note_ID AND tw_comment.Avatar = tn_avatar.Avatar_ID AND Avatar_ID = ? AND Ability_7K > 0.0 AND (Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_7_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_7_1_INPUT_FAVOR_MODE}) AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.FAILED_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Is_Max = true ORDER BY Value DESC LIMIT 50 """.trimIndent() @@ -3013,7 +3013,7 @@ """ SELECT tw_note.Note_ID, Note_Variety, Artist, Title, Genre, Level_Text, tw_note.Level, Stand, Avatar_ID, Avatar_Name, Ability_9K * (POWER(Stand / 1000000, 3) - 0.5 * POWER(Stand / 1000000, 2) + 0.5 * (Stand / 1000000)) AS Value FROM tw_note, tw_comment, tn_avatar - WHERE tw_note.Note_ID = tw_comment.Note_ID AND tw_comment.Avatar = tn_avatar.Avatar_ID AND Ability_9K > 0.0 AND (Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_9_INPUT_FAVOR_MODE}) AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Is_Max = true + WHERE tw_note.Note_ID = tw_comment.Note_ID AND tw_comment.Avatar = tn_avatar.Avatar_ID AND Ability_9K > 0.0 AND (Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_9_INPUT_FAVOR_MODE}) AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.FAILED_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Is_Max = true ORDER BY Value DESC """.trimIndent() ).use { dbStatement -> @@ -3046,7 +3046,7 @@ """ SELECT Ability_9K * (POWER(Stand / 1000000, 3) - 0.5 * POWER(Stand / 1000000, 2) + 0.5 * (Stand / 1000000)) AS Value FROM tw_note, tw_comment, tn_avatar - WHERE tw_note.Note_ID = tw_comment.Note_ID AND tw_comment.Avatar = tn_avatar.Avatar_ID AND Avatar_ID = ? AND Ability_9K > 0.0 AND (Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_9_INPUT_FAVOR_MODE}) AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Is_Max = true + WHERE tw_note.Note_ID = tw_comment.Note_ID AND tw_comment.Avatar = tn_avatar.Avatar_ID AND Avatar_ID = ? AND Ability_9K > 0.0 AND (Input_Favor_Mode = ${Component.DEFAULT_INPUT_FAVOR_MODE} OR Input_Favor_Mode = ${Component.MODE_9_INPUT_FAVOR_MODE}) AND (Hit_Points_Mode = ${Component.DEFAULT_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHER_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.HIGHEST_HIT_POINTS_MODE} OR Hit_Points_Mode = ${Component.FAILED_HIT_POINTS_MODE}) AND (Judgment_Mode = ${Component.DEFAULT_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHER_JUDGMENT_MODE} OR Judgment_Mode = ${Component.HIGHEST_JUDGMENT_MODE}) AND Is_Max = true ORDER BY Value DESC LIMIT 50 """.trimIndent() diff --git a/src/main/kotlin/net/taehui/twilight/system/IO.kt b/src/main/kotlin/net/taehui/twilight/system/IO.kt index cccbeb2..385315d 100644 --- a/src/main/kotlin/net/taehui/twilight/system/IO.kt +++ b/src/main/kotlin/net/taehui/twilight/system/IO.kt @@ -9,6 +9,7 @@ import java.nio.file.Path import java.time.LocalDateTime import java.util.concurrent.CompletableFuture +import java.util.concurrent.Future import java.util.concurrent.atomic.AtomicInteger import java.util.stream.StreamSupport @@ -33,51 +34,55 @@ val line = r.readLine("> ") if (line.isNotEmpty()) { val w = r.parsedLine.words() - if (futureWipeNotes != null) { - if ("y".equals(w[0], true)) { - futureWipeNotes?.forEach { - DB.wipeNote(it, this) + val w0 = w[0] + if (w0 != "future") { + val isY = w0 == "y" + if (futureWipeNotes != null) { + if (isY) { + futureWipeNotes?.forEach { + DB.wipeNote(it, this) + } + } else { + logInfo("Cancelled") } - } else { - logInfo("Cancelled") + futureWipeNotes = null + continue } - futureWipeNotes = null - continue - } - if (futurePMSNotes != null) { - if ("y".equals(w[0], true)) { - futurePMSNotes?.forEach { - DB.pmsNote(it, this) + if (futurePMSNotes != null) { + if (isY) { + futurePMSNotes?.forEach { + DB.pmsNote(it, this) + } + } else { + logInfo("Cancelled") } - } else { - logInfo("Cancelled") + futurePMSNotes = null + continue } - futurePMSNotes = null - continue - } - if (futureWipeComments != null) { - if ("y".equals(w[0], true)) { - DB.wipeComments(futureWipeComments!!).thenAccept { - logInfo("Wiped $it Comment Files") + if (futureWipeComments != null) { + if (isY) { + DB.wipeComments(futureWipeComments!!).thenAccept { + logInfo("Wiped $it Comment Files") + } + } else { + logInfo("Cancelled") } - } else { - logInfo("Cancelled") + futureWipeComments = null + continue } - futureWipeComments = null - continue - } - if (futureWipeBundles != null) { - if ("y".equals(w[0], true)) { - DB.wipeBundles(futureWipeBundles!!).thenAccept { - logInfo("Wiped $it Bundle Files") + if (futureWipeBundles != null) { + if (isY) { + DB.wipeBundles(futureWipeBundles!!).thenAccept { + logInfo("Wiped $it Bundle Files") + } + } else { + logInfo("Cancelled") } - } else { - logInfo("Cancelled") + futureWipeBundles = null + continue } - futureWipeBundles = null - continue } - when (w[0]) { + when (w0) { "stop" -> stopText = if (w.size > 1) w[1] else "" "alarm" -> { @@ -195,6 +200,7 @@ logInfo( "Learned ${futureLearnCommentsStatus.get()} Comments" ) + futureLearnCommentsStatus.set(0) } } else { logInfo( @@ -220,6 +226,38 @@ logInfo("comment [wipe] Clean Comment Files") } + "future" -> { + fun getFutureText(futureStatus: AtomicInteger, future: CompletableFuture?): String { + return if (future != null) { + "${future.state()} (${futureStatus})" + } else { + Future.State.CANCELLED.toString() + } + } + + logInfo("Learning Notes: ${getFutureText(futureLearnNotesStatus, futureLearnNotes)}") + logInfo( + "Learning Comments: ${ + getFutureText( + futureLearnCommentsStatus, + futureLearnComments + ) + }" + ) + logInfo( + "Learning Handled: ${ + getFutureText( + futureLearnHandledStatus, + futureLearnHandled + ) + }" + ) + logInfo("Pending Wipe Notes: ${futureWipeNotes?.size ?: 0}") + logInfo("Pending PMS Notes: ${futurePMSNotes?.size ?: 0}") + logInfo("Pending Wipe Comments: ${futureWipeComments?.size ?: 0}") + logInfo("Pending Wipe Bundles: ${futureWipeBundles?.size ?: 0}") + } + "handled" -> { if (w.size > 1) { when (w[1]) { @@ -230,6 +268,7 @@ logInfo( "Learned ${futureLearnHandledStatus.get()} Handled" ) + futureLearnHandledStatus.set(0) } } else { logInfo( @@ -473,6 +512,7 @@ logInfo("[awilight] Handle Awilight") logInfo("[bundle] Handle Bundles") logInfo("[comment] Handle Comments") + logInfo("[future] View Futures") logInfo("[note] Handle Notes") logInfo("[pause] Pause Twilight") logInfo("[platform] Handle Platform") diff --git a/src/main/kotlin/net/taehui/twilight/system/LevelSystem.kt b/src/main/kotlin/net/taehui/twilight/system/LevelSystem.kt index 7f40745..aa8b797 100644 --- a/src/main/kotlin/net/taehui/twilight/system/LevelSystem.kt +++ b/src/main/kotlin/net/taehui/twilight/system/LevelSystem.kt @@ -67,7 +67,7 @@ } != false && isSatisfy(stand, qwilightWwwLevel.stand) && isSatisfy(point, qwilightWwwLevel.point) && - isSatisfy(band, qwilightWwwLevel.highestBand) && + isSatisfy(band, qwilightWwwLevel.band) && isSatisfyMode(autoMode, qwilightWwwLevel.autoMode) && isSatisfyMode(noteSaltMode, qwilightWwwLevel.noteSaltMode) && isSatisfyMode(faintNoteMode, qwilightWwwLevel.faintNoteMode) &&