feat(engine): 实现阵营技能树系统
- 新增 FactionSkill、FactionSkillTree、FactionSkills 数据模型 - 创建 faction_skills.py 模块处理技能解锁和效果应用 - 技能解锁条件:power >= cost 且前置技能已解锁 - 技能效果:increase_positive_emotion、reduce_conflict、increase_fear、suppress_others - 添加 4 个技能树测试用例,全部 30 个测试通过 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ from .factions import (
|
||||
update_factions, apply_faction_influence, check_and_trigger_faction_event
|
||||
)
|
||||
from .voting import process_votes, apply_votes_to_factions
|
||||
from .faction_skills import check_and_unlock_skills, apply_skill_effects
|
||||
|
||||
MAX_EVENTS = 20
|
||||
MAX_MEMORY_PER_AGENT = 3
|
||||
@@ -106,6 +107,12 @@ def process_events(state: WorldState, events: List[Event]) -> WorldState:
|
||||
# 派系影响世界情绪
|
||||
apply_faction_influence(state)
|
||||
|
||||
# 检查并解锁技能
|
||||
check_and_unlock_skills(state)
|
||||
|
||||
# 应用已解锁技能效果
|
||||
apply_skill_effects(state)
|
||||
|
||||
return state
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user