Skip to content

Commit 75e6001

Browse files
committed
🐛 概率转变逻辑错误
1 parent 574f1ca commit 75e6001

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/nonebot_plugin_nyaturingtest/session.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -702,17 +702,17 @@ def __feedback_stage(
702702

703703
match self.__chatting_state:
704704
case _ChattingState.ILDE:
705-
if random_value > chat_chance:
705+
if chat_chance >= random_value:
706706
self.__chatting_state = _ChattingState.ACTIVE
707-
elif random_value > bubble_chance:
707+
elif bubble_chance >= random_value:
708708
self.__chatting_state = _ChattingState.POP_ACTIVE
709709
case _ChattingState.POP_ACTIVE:
710-
if random_value > chat_chance:
710+
if chat_chance >= random_value:
711711
self.__chatting_state = _ChattingState.ACTIVE
712-
elif random_value > idle_chance:
712+
elif idle_chance >= random_value:
713713
self.__chatting_state = _ChattingState.ILDE
714714
case _ChattingState.ACTIVE:
715-
if random_value > idle_chance:
715+
if idle_chance >= random_value:
716716
self.__chatting_state = _ChattingState.ILDE
717717

718718
logger.debug(f"反馈阶段更新对话状态:{self.__chatting_state!s}")

0 commit comments

Comments
 (0)