From f30ad0cb7d5d3c4f5257df9c5aba47045405557b Mon Sep 17 00:00:00 2001 From: MixBadGun <1059129006@qq.com> Date: Sun, 19 Oct 2025 18:48:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E5=AE=9A=E9=83=A8=E5=88=86=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- konabot/plugins/idiomgame/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/konabot/plugins/idiomgame/__init__.py b/konabot/plugins/idiomgame/__init__.py index 2b1b9b0..3b098f0 100644 --- a/konabot/plugins/idiomgame/__init__.py +++ b/konabot/plugins/idiomgame/__init__.py @@ -158,14 +158,16 @@ class IdiomGame: 跳过当前成语,选择下一个成语 """ await self.lock.acquire() - self._skip_idiom_async(buff_score) + self._skip_idiom_async() + self.add_buff_score(buff_score) self.lock.release() return self.last_idiom - def _skip_idiom_async(self, buff_score: int = -100) -> str: + def _skip_idiom_async(self) -> str: self.last_idiom = secrets.choice(IdiomGame.ALL_IDIOMS) self.last_char = self.last_idiom[-1] - self.add_buff_score(buff_score) + if not self.is_nextable(self.last_char): + self._skip_idiom_async() return self.last_idiom async def try_verify_idiom(self, idiom: str, user_id: str) -> TryVerifyState: