diff --git a/src/classes/long_term_objective.py b/src/classes/long_term_objective.py index 2932cc4..7ae490c 100644 --- a/src/classes/long_term_objective.py +++ b/src/classes/long_term_objective.py @@ -1,6 +1,6 @@ """ 长期目标模块 -为角色生成和管理长期目标(3-10年) +为角色生成和管理长期目标(5-10年) """ from __future__ import annotations from dataclasses import dataclass @@ -34,9 +34,9 @@ def can_generate_long_term_objective(avatar: "Avatar") -> bool: 规则: 1. 已有用户设定的目标,永不自动生成 2. 无目标时,可以生成 - 3. 距离上次设定 <3年,不生成 + 3. 距离上次设定 <5年,不生成 4. 距离上次设定 ≥10年,必定生成 - 5. 距离上次设定 3-10年,按概率生成(渐进概率) + 5. 距离上次设定 5-10年,按概率生成(渐进概率) Args: avatar: 要检查的角色 @@ -56,13 +56,13 @@ def can_generate_long_term_objective(avatar: "Avatar") -> bool: years_passed = current_year - avatar.long_term_objective.set_year - if years_passed < 3: + if years_passed < 5: return False elif years_passed >= 10: return True - else: # 3-10年之间 - # 渐进概率:3年时10%,随时间推移逐渐增加,接近10年时接近100% - probability = (years_passed - 3) / 7 * 0.9 + 0.1 + else: # 5-10年之间 + # 渐进概率:5年时10%,随时间推移逐渐增加,接近10年时接近100% + probability = (years_passed - 5) / 5 * 0.9 + 0.1 return random.random() < probability diff --git a/static/game_configs/given_name.csv b/static/game_configs/given_name.csv index 60a231e..dea89e8 100644 --- a/static/game_configs/given_name.csv +++ b/static/game_configs/given_name.csv @@ -865,8 +865,6 @@ given_name,gender,sect,cond 肃穆,男,镇魂宗, 庄严,男,镇魂宗, 威武,男,镇魂宗, -霸气,男,镇魂宗, -正气,男,镇魂宗, 凛然,男,镇魂宗, 浩大,男,镇魂宗, 宏大,男,镇魂宗, diff --git a/static/templates/long_term_objective.txt b/static/templates/long_term_objective.txt index 04a6cc2..51763d1 100644 --- a/static/templates/long_term_objective.txt +++ b/static/templates/long_term_objective.txt @@ -1,4 +1,4 @@ -你是一个仙侠世界的决策者,负责为修仙角色设定长期目标,即角色在接下来3-10年内想要达成的目标。 +你是一个仙侠世界的决策者,负责为修仙角色设定长期目标,即角色在接下来5-10年内想要达成的目标。 当前世界信息: {world_info} @@ -6,7 +6,7 @@ 角色信息: {avatar_info} -全部可执行的动作有: +全部可执行的动作供你参考: {general_action_infos} 基于以上信息,为该角色设定一个符合其身份、性格、境遇的长期目标。