From e2afd77ec9bc99ca9071c53db7a8abc4ab2ceb71 Mon Sep 17 00:00:00 2001 From: kichikuou Date: Wed, 26 Aug 2026 18:12:39 +0900 Subject: [PATCH] System3: Fix Y 4 1 (random) to return 1 Gakuen KING's original implementation returns 1 for num=1; it returns 0 only when num is 0. The line dates back to the initial upstream import and had never been changed. nact_sys1.cpp and nact_sys2.cpp still have the same expression but they are left alone. --- src/sys/nact_sys3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sys/nact_sys3.cpp b/src/sys/nact_sys3.cpp index 77a9436..667a8ad 100644 --- a/src/sys/nact_sys3.cpp +++ b/src/sys/nact_sys3.cpp @@ -713,7 +713,7 @@ void NACT_Sys3::exec_y(int cmd, int param) } break; case 4: - RND = (param == 0 || param == 1) ? 0 : random(param); + RND = param == 0 ? 0 : random(param); break; case 5: break;