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:
@@ -2,6 +2,7 @@ import json
|
||||
from pathlib import Path
|
||||
from .models import WorldState, AgentState, GlobalMeter, Stance, Factions, FactionData
|
||||
from .story_arcs import get_default_story_arcs
|
||||
from .faction_skills import get_default_faction_skills
|
||||
|
||||
STATE_FILE = Path(__file__).parent.parent / "state.json"
|
||||
|
||||
@@ -35,6 +36,7 @@ def get_default_state() -> WorldState:
|
||||
fearful=FactionData(power=0, threshold=10, skill="panic", members=[])
|
||||
),
|
||||
story_arcs=get_default_story_arcs(),
|
||||
faction_skills=get_default_faction_skills(),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user