AFO:结束?开始? - 文化课学习模拟游戏
🎮 游戏简介
《AFO:结束?开始?》是一款基于浏览器的高中文化课学习模拟游戏。玩家将扮演一位从信息学竞赛(OI)退役的选手,在52周的时间内,通过策略性的选择平衡学习、休息、社交、经济等多维度状态,最终在高考中取得理想成绩。
“从代码到考卷,这是一场关于成长与救赎的史诗旅程”
✨ 核心特色
🎯 策略性游戏机制
- 每周3次操作限制:必须在有限资源下做出最优决策
- 多维度属性系统:精力、压力、健康、心理、经济、人际关系相互影响
- 真实的高中生活模拟:课程表、作业、模考、假期等完整系统
📚 丰富的游戏内容
- 52周完整学年:从AFO第一天到高考结束
- 随机事件:学习、关系、健康、经济、特殊事件五大类别
- 故事剧情:主线故事线,体验从迷茫到成长的完整心路历程
- 成就系统:基础、状态、学科、关系、活动、特殊、结局七大类成就
- 不同结局:根据最终表现解锁不同人生道路
🎨 精美的界面设计
- 现代化玻璃拟态UI:美观的渐变背景和毛玻璃效果
- 响应式布局:适配桌面和移动设备
- 实时状态监控:直观的进度条和统计面板
- 事件日志系统:记录所有重要事件和选择
🕹️ 游戏玩法
核心状态管理
- 精力值:学习、活动消耗,休息恢复
- 压力值:考试、作业增加,休息、活动减少
- 健康值:熬夜、压力降低,锻炼、休息提高
- 心理值:心理咨询、积极事件提高
- 经济值:兼职、父母支持获得,购买资料消耗
学科能力提升
- 六大学科:语文、数学、英语、物理、化学、生物
- 竞赛背景加成:数学和物理有额外学习效率
- 心理状态影响:心理状态直接影响学习效率
人际关系系统
- 8个角色:班主任、各科老师、同学、父母、暗恋对象
- 关系影响:关系好坏影响学习支持和心理状态
- 隐藏剧情:达到特定关系值解锁特殊事件
🎮 操作指南
主要操作按钮
- 📚 学习 - 选择科目重点学习
- 💤 休息 - 选择休息方式恢复状态
- 🏃 锻炼 - 体育锻炼释放压力
- 👥 社交 - 与同学交流改善关系
- 💭 回忆 - 回忆竞赛往事,影响心理状态
- 📝 模考 - 参加模拟考试检验学习成果
- ✏️ 作业 - 完成作业巩固知识
- 🎉 活动 - 参加课外活动丰富经历
- 💰 经济 - 管理零花钱和支出
- 🌙 结束本周 - 推进时间到下一周
键盘快捷键
1- 学习2- 休息3- 锻炼4- 社交5- 回忆6- 模考7- 作业8- 活动9- 经济0- 结束本周Shift- 显示快捷键提示Esc- 关闭所有弹窗
📊 游戏系统详解
阶段目标系统
天气与季节系统
假期系统
🏆 成就系统
成就类别
- 基础成就:完成周数、累计时长
- 状态成就:达到特定状态值
- 学科成就:单科或全科达到高分
- 关系成就:与特定角色关系良好
- 活动成就:参加特定活动次数
- 特殊成就:完美一周、压力管理等
- 结局成就:根据最终成绩解锁不同结局
隐藏成就
🎭 故事系统
隐藏剧情
🛠️ 技术细节
文件结构
AFO-Simulator/
├── index.html # 主游戏文件(包含所有HTML、CSS、JS)
├── README.md # 项目说明文档
└── 其他文件技术栈
- HTML5:游戏结构
- CSS3:现代化UI设计,玻璃拟态效果
- JavaScript:游戏逻辑和交互
- 响应式设计:适配不同设备
游戏状态管理
游戏使用单一gameState对象管理所有状态,包括:
- 时间系统(周、日、季节)
- 核心状态(精力、压力、健康等)
- 学科能力(六科分数)
- 人际关系(8个角色)
- 游戏进度(成就、事件、统计)
📄 许可证
本项目采用 Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0) 许可证。
您可以:
- 共享 — 在任何媒介以任何形式复制、发行本作品
- 只要遵守许可协议条款,许可人就无法收回您的这些权利
惟须遵守下列条件:
- 署名 — 您必须给出适当的署名,提供指向本许可协议的链接,同时标明是否(对原始作品)作了修改。您可以用任何合理的方式来署名,但是不得以任何方式暗示许可人为您或您的使用背书。
- 非商业性使用 — 您不得将本作品用于商业目的。
- 禁止演绎 — 如果您再混合、转换、或者基于该作品创作,您不可以分发修改后的作品。
- 没有附加限制 — 您不得适用法律术语或者技术措施从而限制其他人做许可协议允许的事情。
完整许可证文本:
https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode.zh-Hans
👨💻 作者
wujiahaocoder
🤝 支持开发
本游戏完全免费,如果您喜欢这个游戏,欢迎支持开发者:
🚀 快速开始
- 克隆或下载本项目
- 直接打开
index.html文件即可开始游戏 - 无需安装任何额外依赖
📱 兼容性
- 桌面浏览器:Chrome、Firefox、Edge、Safari 最新版本
- 移动设备:iOS Safari、Android Chrome
- 屏幕尺寸:适配从手机到4K显示器的各种分辨率
📞 反馈与贡献
如果您发现任何bug或有改进建议,欢迎:
- 在GitHub仓库提交Issue
- 通过Pull Request贡献代码
- 联系作者讨论游戏设计
更新日志
2026.1.18 v1.0.0
第一个版本。2026.1.19 v1.1.0
添加了一些故事线。2026.1.20 v1.2.0
大量添加学习相关随机事件。2026.1.20 v1.2.1
添加 README.md2026.1.20 v1.2.2
添加友谊相关随机事件。2026.1.20 v1.2.3
暂时移除v1.1中添加的故事线事件,因为其导致了一些致命bug?2026.1.21 v1.2.4
恢复故事线事件,bug已修复。(其原因为在代码中使用了全角逗号)2026.1.24 v1.2.5
修复了一个导致卡死的bug。2026.1.24 v1.2.6
优化游戏平衡性,修复了资料购买过于超模的问题。2026.1.24 v1.2.7
优化随机事件。祝您游戏愉快,在AFO的旅程中找到属于自己的成长与救赎! 🎓✨
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="wujiahaocoder">
<meta name="license" content="CC BY-NC-ND 4.0">
<!-- 或者使用更详细的描述 -->
<meta name="copyright" content="Copyright (c) 2025-2026 wujiahaocoder">
<title>AFO:结束?开始?</title>
<style>
/* ==================== 全局样式 ==================== */
:root {
--primary: #3498db;
--secondary: #2ecc71;
--danger: #e74c3c;
--warning: #f39c12;
--purple: #9b59b6;
--pink: #e91e63;
--cyan: #00bcd4;
--dark: #2c3e50;
--light: #ecf0f1;
--bg: #1a1a2e;
--card-bg: rgba(255, 255, 255, 0.08);
--border: rgba(255, 255, 255, 0.15);
--shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
--glass: blur(15px);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'HarmonyOS Sans', sans-serif;
}
body {
background: linear-gradient(135deg, var(--bg), #0f0c29, #302b63, #24243e);
color: var(--light);
min-height: 100vh;
padding: 15px;
overflow-x: hidden;
position: relative;
}
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(circle at 10% 20%, rgba(52, 152, 219, 0.1) 0%, transparent 20%), radial-gradient(circle at 90% 80%, rgba(46, 204, 113, 0.1) 0%, transparent 20%);
pointer-events: none;
z-index: -1;
}
/* ==================== 布局系统 ==================== */
.container {
max-width: 1600px;
margin: 0 auto;
display: grid;
grid-template-columns: 300px 1fr 320px;
gap: 15px;
grid-template-areas:
"header header header"
"stats main events"
"schedule actions achievements"
"footer footer footer";
}
/* ==================== 头部 ==================== */
header {
grid-area: header;
background: var(--card-bg);
backdrop-filter: var(--glass);
border: 1px solid var(--border);
border-radius: 16px;
padding: 20px;
text-align: center;
box-shadow: var(--shadow);
position: relative;
overflow: hidden;
}
header::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
transition: left 0.5s;
}
header:hover::before {
left: 100%;
}
h1 {
font-size: 2.5rem;
margin-bottom: 8px;
background: linear-gradient(90deg, var(--primary), var(--secondary), var(--purple));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
letter-spacing: 1px;
}
.subtitle {
font-size: 1.1rem;
opacity: 0.85;
margin-bottom: 10px;
font-style: italic;
}
.license-info {
font-size: 0.75rem;
opacity: 0.6;
margin-top: 8px;
display: flex;
justify-content: center;
gap: 15px;
flex-wrap: wrap;
}
.license-info a {
color: var(--light);
text-decoration: none;
border-bottom: 1px dotted var(--border);
}
.license-info a:hover {
opacity: 1;
border-bottom-color: var(--primary);
}
/* ==================== 统计面板 ==================== */
.stats {
grid-area: stats;
background: var(--card-bg);
backdrop-filter: var(--glass);
border: 1px solid var(--border);
border-radius: 12px;
padding: 15px;
display: flex;
flex-direction: column;
gap: 10px;
max-height: 650px;
overflow-y: auto;
}
.stat-section-title {
font-size: 0.9rem;
font-weight: bold;
color: var(--primary);
margin-top: 10px;
margin-bottom: 5px;
padding-bottom: 3px;
border-bottom: 1px solid var(--border);
}
.stat-card {
background: rgba(0, 0, 0, 0.2);
padding: 10px;
border-radius: 8px;
border-left: 4px solid var(--primary);
transition: all 0.3s ease;
position: relative;
}
.stat-card:hover {
transform: translateX(5px);
background: rgba(0, 0, 0, 0.3);
}
.stat-card h3 {
font-size: 0.9rem;
margin-bottom: 6px;
display: flex;
justify-content: space-between;
align-items: center;
}
.stat-value {
font-weight: bold;
color: var(--secondary);
font-size: 0.95rem;
}
.progress-bar {
height: 8px;
background: rgba(255, 255, 255, 0.1);
border-radius: 4px;
overflow: hidden;
margin-top: 4px;
position: relative;
}
.progress-fill {
height: 100%;
background: var(--primary);
border-radius: 4px;
transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
position: relative;
overflow: hidden;
}
.progress-fill::after {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
animation: shimmer 2s infinite;
}
@keyframes shimmer {
0% {
left: -100%;
}
100% {
left: 100%;
}
}
.progress-fill.energy {
background: var(--secondary);
}
.progress-fill.stress {
background: var(--danger);
}
.progress-fill.health {
background: var(--warning);
}
.progress-fill.relationship {
background: var(--purple);
}
.progress-fill.economy {
background: var(--cyan);
}
.progress-fill.mental {
background: var(--pink);
}
.relationship-bar {
height: 6px;
background: rgba(255, 255, 255, 0.1);
border-radius: 3px;
overflow: hidden;
margin-top: 4px;
}
.relationship-fill {
height: 100%;
background: var(--purple);
border-radius: 3px;
transition: width 0.5s ease;
}
/* ==================== 主区域 ==================== */
.main {
grid-area: main;
background: var(--card-bg);
backdrop-filter: var(--glass);
border: 1px solid var(--border);
border-radius: 12px;
padding: 15px;
display: flex;
flex-direction: column;
gap: 12px;
max-height: 650px;
}
.time-info {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 12px;
border-bottom: 1px solid var(--border);
flex-wrap: wrap;
gap: 8px;
}
.time-display {
font-size: 1.1rem;
font-weight: bold;
display: flex;
align-items: center;
gap: 8px;
}
.time-badge {
background: rgba(52, 152, 219, 0.3);
padding: 4px 8px;
border-radius: 6px;
font-size: 0.85rem;
}
.season-indicator {
font-size: 1.2rem;
padding: 4px 8px;
background: rgba(255, 255, 255, 0.1);
border-radius: 6px;
}
.event-log {
flex-grow: 1;
overflow-y: auto;
padding-right: 8px;
display: flex;
flex-direction: column;
gap: 6px;
}
.event-item {
background: rgba(0, 0, 0, 0.2);
padding: 8px 10px;
border-radius: 6px;
border-left: 3px solid var(--primary);
animation: fadeIn 0.4s ease;
font-size: 0.9rem;
line-height: 1.35;
position: relative;
}
.event-item::before {
content: '•';
position: absolute;
left: -2px;
color: var(--primary);
font-weight: bold;
}
.event-item.good {
border-left-color: var(--secondary);
background: rgba(46, 204, 113, 0.15);
}
.event-item.bad {
border-left-color: var(--danger);
background: rgba(231, 76, 60, 0.15);
}
.event-item.neutral {
border-left-color: var(--warning);
background: rgba(243, 156, 18, 0.15);
}
.event-item.story {
border-left-color: var(--purple);
background: rgba(155, 89, 182, 0.2);
}
.event-item.important {
border-left-color: var(--pink);
background: rgba(233, 30, 99, 0.2);
font-weight: bold;
}
.event-item .timestamp {
font-size: 0.7rem;
opacity: 0.6;
margin-right: 6px;
font-family: monospace;
}
/* ==================== 课程表 ==================== */
.schedule {
grid-area: schedule;
background: var(--card-bg);
backdrop-filter: var(--glass);
border: 1px solid var(--border);
border-radius: 12px;
padding: 15px;
max-height: 300px;
overflow-y: auto;
}
.schedule h3 {
font-size: 1rem;
margin-bottom: 10px;
color: var(--cyan);
}
.schedule-item {
background: rgba(0, 0, 0, 0.2);
padding: 8px;
margin-bottom: 6px;
border-radius: 6px;
border-left: 3px solid var(--cyan);
font-size: 0.85rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.schedule-item.completed {
opacity: 0.5;
text-decoration: line-through;
border-left-color: var(--secondary);
}
.schedule-item.missed {
border-left-color: var(--danger);
background: rgba(231, 76, 60, 0.2);
}
.schedule-item .time {
font-weight: bold;
color: var(--cyan);
}
/* ==================== 事件区域 ==================== */
.events {
grid-area: events;
background: var(--card-bg);
backdrop-filter: var(--glass);
border: 1px solid var(--border);
border-radius: 12px;
padding: 15px;
display: flex;
flex-direction: column;
gap: 10px;
max-height: 650px;
overflow-y: auto;
}
.event-card {
background: rgba(0, 0, 0, 0.2);
padding: 12px;
border-radius: 8px;
border-top: 3px solid var(--warning);
transition: all 0.3s ease;
}
.event-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.event-card h3 {
font-size: 0.95rem;
margin-bottom: 8px;
display: flex;
align-items: center;
gap: 8px;
}
.event-card p {
font-size: 0.85rem;
line-height: 1.4;
opacity: 0.9;
}
.event-card.relationship {
border-top-color: var(--purple);
}
.event-card.achievement {
border-top-color: var(--secondary);
}
.event-card.economy {
border-top-color: var(--cyan);
}
.event-card.mental {
border-top-color: var(--pink);
}
.event-card .progress-bar {
height: 6px;
margin-top: 8px;
}
/* ==================== 操作区域 ==================== */
.actions {
grid-area: actions;
background: var(--card-bg);
backdrop-filter: var(--glass);
border: 1px solid var(--border);
border-radius: 12px;
padding: 15px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 10px;
max-height: 300px;
overflow-y: auto;
}
.action-btn {
background: rgba(52, 152, 219, 0.2);
border: 1px solid var(--primary);
color: var(--light);
padding: 12px;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
font-weight: 600;
text-align: center;
font-size: 0.9rem;
position: relative;
overflow: hidden;
}
.action-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.4s;
}
.action-btn:hover::before {
left: 100%;
}
.action-btn:hover {
background: rgba(52, 152, 219, 0.4);
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}
.action-btn:active {
transform: translateY(0);
}
.action-btn.primary {
background: rgba(46, 204, 113, 0.2);
border-color: var(--secondary);
}
.action-btn.primary:hover {
background: rgba(46, 204, 113, 0.4);
}
.action-btn.danger {
background: rgba(231, 76, 60, 0.2);
border-color: var(--danger);
}
.action-btn.danger:hover {
background: rgba(231, 76, 60, 0.4);
}
.action-btn.warning {
background: rgba(243, 156, 18, 0.2);
border-color: var(--warning);
}
.action-btn.purple {
background: rgba(155, 89, 182, 0.2);
border-color: var(--purple);
}
.action-btn.cyan {
background: rgba(0, 188, 212, 0.2);
border-color: var(--cyan);
}
.action-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
transform: none !important;
}
.action-btn:disabled::before {
display: none;
}
.action-btn .hotkey {
font-size: 0.7rem;
opacity: 0.6;
margin-left: 4px;
}
/* ==================== 成就区域 ==================== */
.achievements {
grid-area: achievements;
background: var(--card-bg);
backdrop-filter: var(--glass);
border: 1px solid var(--border);
border-radius: 12px;
padding: 15px;
display: flex;
flex-direction: column;
gap: 10px;
max-height: 300px;
overflow-y: auto;
}
.achievements h3 {
font-size: 1rem;
margin-bottom: 5px;
color: var(--secondary);
display: flex;
justify-content: space-between;
align-items: center;
}
.achievement-list {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.achievement-badge {
background: rgba(46, 204, 113, 0.2);
border: 1px solid var(--secondary);
padding: 5px 8px;
border-radius: 15px;
font-size: 0.75rem;
opacity: 0.4;
transition: all 0.3s ease;
cursor: help;
white-space: nowrap;
}
.achievement-badge.unlocked {
opacity: 1;
background: rgba(46, 204, 113, 0.4);
box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
animation: popIn 0.3s ease;
}
.achievement-badge.hidden {
background: rgba(255, 255, 255, 0.1);
border-color: var(--border);
color: transparent;
cursor: default;
}
.achievement-badge.hidden.unlocked {
color: var(--light);
background: rgba(155, 89, 182, 0.4);
border-color: var(--purple);
}
@keyframes popIn {
0% {
transform: scale(0.8);
opacity: 0;
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
opacity: 1;
}
}
/* ==================== 页脚 ==================== */
.footer {
grid-area: footer;
background: var(--card-bg);
backdrop-filter: var(--glass);
border: 1px solid var(--border);
border-radius: 12px;
padding: 10px;
text-align: center;
font-size: 0.8rem;
opacity: 0.7;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 10px;
}
.footer .save-status {
color: var(--secondary);
font-weight: bold;
}
.footer .save-status.error {
color: var(--danger);
}
/* ==================== 模态框 ==================== */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 100;
justify-content: center;
align-items: center;
backdrop-filter: blur(5px);
}
.modal-content {
background: #1a1a2e;
border: 1px solid var(--border);
border-radius: 16px;
padding: 25px;
max-width: 700px;
width: 90%;
max-height: 85vh;
overflow-y: auto;
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
from {
transform: translateY(-50px) scale(0.95);
opacity: 0;
}
to {
transform: translateY(0) scale(1);
opacity: 1;
}
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid var(--border);
}
.modal-header h2 {
font-size: 1.4rem;
color: var(--primary);
display: flex;
align-items: center;
gap: 8px;
}
.close-btn {
background: none;
border: none;
color: var(--light);
font-size: 1.8rem;
cursor: pointer;
opacity: 0.7;
transition: all 0.2s ease;
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}
.close-btn:hover {
opacity: 1;
background: rgba(255, 255, 255, 0.1);
transform: rotate(90deg);
}
.modal-body {
line-height: 1.6;
}
.modal-footer {
margin-top: 15px;
padding-top: 15px;
border-top: 1px solid var(--border);
display: flex;
justify-content: flex-end;
gap: 10px;
}
/* 学习模态框 */
.study-options {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 10px;
margin-top: 15px;
}
.study-btn {
background: rgba(52, 152, 219, 0.2);
border: 1px solid var(--primary);
color: var(--light);
padding: 12px;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
text-align: center;
font-size: 0.9rem;
font-weight: 600;
position: relative;
overflow: hidden;
}
.study-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.4s;
}
.study-btn:hover::before {
left: 100%;
}
.study-btn:hover {
background: rgba(52, 152, 219, 0.4);
transform: translateY(-2px);
}
.study-btn small {
display: block;
font-size: 0.75rem;
opacity: 0.7;
margin-top: 4px;
font-weight: normal;
}
.study-btn.special {
background: rgba(155, 89, 182, 0.2);
border-color: var(--purple);
}
.study-btn.special:hover {
background: rgba(155, 89, 182, 0.4);
}
.study-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
/* 故事模态框 */
.story-modal {
background: linear-gradient(135deg, #1a1a2e, #2d1b3d);
}
.story-content {
font-size: 1.05rem;
line-height: 1.8;
padding: 15px;
background: rgba(0, 0, 0, 0.3);
border-radius: 8px;
margin: 15px 0;
border-left: 3px solid var(--purple);
font-family: 'Georgia', serif;
}
.story-choices {
display: flex;
flex-direction: column;
gap: 10px;
margin-top: 15px;
}
.story-choice-btn {
background: rgba(155, 89, 182, 0.2);
border: 1px solid var(--purple);
color: var(--light);
padding: 12px;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
text-align: left;
font-size: 0.95rem;
position: relative;
}
.story-choice-btn:hover {
background: rgba(155, 89, 182, 0.4);
transform: translateX(5px);
}
.choice-preview {
font-size: 0.8rem;
opacity: 0.8;
margin-top: 5px;
font-style: italic;
color: var(--warning);
}
/* 结束画面 */
.end-screen {
text-align: center;
padding: 30px;
background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(155, 89, 182, 0.2));
border-radius: 12px;
border: 1px solid var(--border);
}
.end-screen h2 {
font-size: 2.5rem;
margin-bottom: 20px;
background: linear-gradient(90deg, var(--secondary), var(--primary));
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.end-screen .final-score {
font-size: 3.5rem;
font-weight: bold;
margin: 15px 0;
color: var(--secondary);
text-shadow: 0 0 20px rgba(46, 204, 113, 0.5);
}
.end-screen .ending-text {
font-size: 1.1rem;
line-height: 1.8;
margin: 20px 0;
opacity: 0.9;
font-family: 'Georgia', serif;
}
.end-screen .stats-summary {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 10px;
margin: 20px 0;
font-size: 0.9rem;
}
.stat-box {
background: rgba(0, 0, 0, 0.3);
padding: 10px;
border-radius: 6px;
border: 1px solid var(--border);
}
.stat-box .label {
font-size: 0.75rem;
opacity: 0.7;
}
.stat-box .value {
font-size: 1.2rem;
font-weight: bold;
color: var(--secondary);
}
.restart-btn {
background: linear-gradient(135deg, var(--secondary), var(--primary));
color: white;
border: none;
padding: 15px 30px;
border-radius: 10px;
font-size: 1.1rem;
cursor: pointer;
transition: all 0.3s ease;
font-weight: bold;
margin-top: 15px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.restart-btn:hover {
transform: translateY(-3px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
/* ==================== 通知系统 ==================== */
.notification {
position: fixed;
top: 20px;
right: 20px;
background: var(--card-bg);
backdrop-filter: blur(20px);
border: 1px solid var(--border);
border-radius: 10px;
padding: 15px 20px;
max-width: 380px;
z-index: 200;
transform: translateX(120%);
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
font-size: 0.95rem;
line-height: 1.4;
}
.notification.show {
transform: translateX(0);
}
.notification.good {
border-left: 4px solid var(--secondary);
}
.notification.bad {
border-left: 4px solid var(--danger);
}
.notification.neutral {
border-left: 4px solid var(--warning);
}
.notification.story {
border-left: 4px solid var(--purple);
}
.notification.important {
border-left: 4px solid var(--pink);
}
/* ==================== 工具提示 ==================== */
.tooltip {
position: relative;
display: inline-block;
cursor: help;
border-bottom: 1px dotted var(--light);
}
.tooltip .tooltiptext {
visibility: hidden;
width: 240px;
background-color: rgba(0, 0, 0, 0.95);
color: #fff;
text-align: center;
border-radius: 6px;
padding: 10px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -120px;
opacity: 0;
transition: opacity 0.3s;
font-size: 0.85rem;
line-height: 1.4;
border: 1px solid var(--border);
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
/* ==================== 动画 ==================== */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
}
}
.pulse {
animation: pulse 2s infinite;
}
/* ==================== 滚动条 ==================== */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.05);
border-radius: 4px;
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.2);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.3);
}
/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
.container {
grid-template-columns: 1fr 1fr;
grid-template-areas:
"header header"
"stats main"
"events events"
"schedule actions"
"achievements achievements"
"footer footer";
}
}
@media (max-width: 768px) {
.container {
grid-template-columns: 1fr;
grid-template-areas:
"header"
"stats"
"main"
"events"
"schedule"
"actions"
"achievements"
"footer";
}
h1 {
font-size: 1.8rem;
}
.study-options {
grid-template-columns: 1fr;
}
.actions {
grid-template-columns: 1fr;
}
.notification {
max-width: 90%;
right: 5%;
}
}
/* ==================== 特殊状态指示器 ==================== */
.status-indicator {
display: inline-block;
padding: 3px 6px;
border-radius: 4px;
font-size: 0.75rem;
font-weight: bold;
margin-left: 6px;
border: 1px solid currentColor;
}
.status-good {
background: rgba(46, 204, 113, 0.3);
color: var(--secondary);
}
.status-bad {
background: rgba(231, 76, 60, 0.3);
color: var(--danger);
}
.status-normal {
background: rgba(52, 152, 219, 0.3);
color: var(--primary);
}
/* ==================== 快捷键提示 ==================== */
.hotkey-hint {
position: fixed;
bottom: 20px;
left: 20px;
background: rgba(0, 0, 0, 0.7);
padding: 10px;
border-radius: 8px;
font-size: 0.8rem;
opacity: 0;
transition: opacity 0.3s;
pointer-events: none;
z-index: 50;
}
.hotkey-hint.show {
opacity: 1;
}
.hotkey-hint kbd {
background: rgba(255, 255, 255, 0.2);
padding: 2px 6px;
border-radius: 4px;
font-family: monospace;
margin: 0 2px;
}
/* ==================== 操作计数器 ==================== */
.action-counter {
position: fixed;
top: 20px;
left: 20px;
background: rgba(0, 0, 0, 0.7);
padding: 10px 15px;
border-radius: 8px;
font-size: 0.9rem;
font-weight: bold;
z-index: 50;
border: 2px solid var(--secondary);
color: var(--secondary);
}
.action-counter.warning {
border-color: var(--warning);
color: var(--warning);
}
.action-counter.danger {
border-color: var(--danger);
color: var(--danger);
animation: pulse 1s infinite;
}
/* ==================== 启动弹窗(捐助) ==================== */
.donation-modal {
background: linear-gradient(135deg, #1a1a2e, #2d1b3d);
}
.donation-content {
text-align: center;
padding: 20px;
}
.donation-content h3 {
color: var(--primary);
margin-bottom: 15px;
font-size: 1.3rem;
}
.donation-content p {
margin-bottom: 15px;
line-height: 1.6;
opacity: 0.9;
}
.donation-qr {
width: 200px;
height: 200px;
margin: 15px auto;
border: 2px solid var(--border);
border-radius: 8px;
overflow: hidden;
background: white;
}
.donation-qr img {
width: 100%;
height: 100%;
object-fit: contain;
}
.donation-link {
display: inline-block;
margin-top: 10px;
color: var(--cyan);
text-decoration: none;
font-size: 0.9rem;
border-bottom: 1px dotted var(--cyan);
}
.donation-link:hover {
opacity: 0.8;
}
.donation-buttons {
display: flex;
gap: 10px;
justify-content: center;
margin-top: 20px;
}
.donation-btn {
padding: 10px 20px;
border-radius: 8px;
border: 1px solid var(--border);
background: rgba(255, 255, 255, 0.1);
color: var(--light);
cursor: pointer;
transition: all 0.2s ease;
font-weight: 600;
}
.donation-btn:hover {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-2px);
}
.donation-btn.primary {
background: var(--primary);
border-color: var(--primary);
}
.donation-btn.primary:hover {
background: #2980b9;
}
/* ==================== 阶段目标弹窗 ==================== */
.goal-modal {
background: linear-gradient(135deg, #1a1a2e, #2d1b3d);
}
.goal-content {
padding: 15px;
}
.goal-item {
background: rgba(0, 0, 0, 0.2);
padding: 12px;
margin-bottom: 10px;
border-radius: 8px;
border-left: 4px solid var(--warning);
}
.goal-item.achieved {
border-left-color: var(--secondary);
background: rgba(46, 204, 113, 0.15);
}
.goal-item.failed {
border-left-color: var(--danger);
background: rgba(231, 76, 60, 0.15);
}
.goal-item h4 {
margin-bottom: 5px;
font-size: 1rem;
}
.goal-item p {
font-size: 0.85rem;
opacity: 0.8;
margin-bottom: 5px;
}
.goal-progress {
font-size: 0.8rem;
font-weight: bold;
margin-top: 5px;
}
.goal-progress.achieved {
color: var(--secondary);
}
.goal-progress.failed {
color: var(--danger);
}
/* ==================== 成就详情弹窗 ==================== */
.achievement-detail-modal {
background: linear-gradient(135deg, #1a1a2e, #2d1b3d);
}
.achievement-detail-content {
padding: 15px;
max-height: 400px;
overflow-y: auto;
}
.achievement-detail-item {
background: rgba(0, 0, 0, 0.2);
padding: 10px;
margin-bottom: 8px;
border-radius: 6px;
border-left: 3px solid var(--secondary);
font-size: 0.9rem;
}
.achievement-detail-item.hidden {
border-left-color: var(--purple);
opacity: 0.6;
}
.achievement-detail-item .name {
font-weight: bold;
color: var(--secondary);
}
.achievement-detail-item.hidden .name {
color: var(--purple);
}
.achievement-detail-item .desc {
font-size: 0.8rem;
opacity: 0.8;
}
</style>
</head>
<body>
<!-- 操作计数器 -->
<div class="action-counter" id="actionCounter">
本周操作: 0/3
</div>
<!-- 快捷键提示 -->
<div class="hotkey-hint" id="hotkeyHint">
快捷键: 1学习 2休息 3锻炼 4社交 5回忆 6模考 7作业 8活动 9经济 0结束
</div>
<div class="container">
<!-- 头部 -->
<header>
<h1>AFO:结束?开始?</h1>
<div class="subtitle">"从代码到考卷,这是一场关于成长与救赎的史诗旅程"</div>
<div class="license-info">
<span>
<a href="https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode.zh-Hans" target="_blank"
style="color: rgb(196, 196, 196)">
CC
BY-NC-ND 4.0
</a>
</span>
<span>作者: wujiahaocoder</span>
<a href="https://github.com/wujiahaocoder/AFO-Simulator" target="_blank">GitHub</a>
<span>v1.2.7</span>
</div>
<div id="game-status" style="margin-top: 10px; font-size: 0.9rem; opacity: 0.8;">准备开始你的文化课之旅...</div>
</header>
<!-- 统计面板 -->
<div class="stats">
<div class="stat-section-title">📊 核心状态</div>
<div class="stat-card">
<h3>精力值 <span class="stat-value" id="energy-value">80/100</span></h3>
<div class="progress-bar">
<div class="progress-fill energy" id="energy-bar" style="width: 80%"></div>
</div>
</div>
<div class="stat-card">
<h3>压力值 <span class="stat-value" id="stress-value">20/100</span></h3>
<div class="progress-bar">
<div class="progress-fill stress" id="stress-bar" style="width: 20%"></div>
</div>
</div>
<div class="stat-card">
<h3>健康值 <span class="stat-value" id="health-value">85/100</span></h3>
<div class="progress-bar">
<div class="progress-fill health" id="health-bar" style="width: 85%"></div>
</div>
</div>
<div class="stat-card">
<h3>心理值 <span class="stat-value" id="mental-value">75/100</span></h3>
<div class="progress-bar">
<div class="progress-fill mental" id="mental-bar" style="width: 75%"></div>
</div>
</div>
<div class="stat-card">
<h3>经济值 <span class="stat-value" id="money-value">500元</span></h3>
<div class="progress-bar">
<div class="progress-fill economy" id="money-bar" style="width: 50%"></div>
</div>
</div>
<div class="stat-section-title">📚 学科能力</div>
<div class="stat-card">
<h3>语文 <span class="stat-value" id="chinese-value">10/100</span></h3>
<div class="progress-bar">
<div class="progress-fill" id="chinese-bar" style="width: 10%"></div>
</div>
</div>
<div class="stat-card">
<h3>数学 <span class="stat-value" id="math-value">15/100</span></h3>
<div class="progress-bar">
<div class="progress-fill" id="math-bar" style="width: 15%"></div>
</div>
</div>
<div class="stat-card">
<h3>英语 <span class="stat-value" id="english-value">8/100</span></h3>
<div class="progress-bar">
<div class="progress-fill" id="english-bar" style="width: 8%"></div>
</div>
</div>
<div class="stat-card">
<h3>物理 <span class="stat-value" id="physics-value">20/100</span></h3>
<div class="progress-bar">
<div class="progress-fill" id="physics-bar" style="width: 20%"></div>
</div>
</div>
<div class="stat-card">
<h3>化学 <span class="stat-value" id="chemistry-value">12/100</span></h3>
<div class="progress-bar">
<div class="progress-fill" id="chemistry-bar" style="width: 12%"></div>
</div>
</div>
<div class="stat-card">
<h3>生物 <span class="stat-value" id="biology-value">10/100</span></h3>
<div class="progress-bar">
<div class="progress-fill" id="biology-bar" style="width: 10%"></div>
</div>
</div>
<div class="stat-section-title">👥 人际关系</div>
<div class="stat-card">
<h3>班主任 <span class="stat-value" id="teacher-value">50</span></h3>
<div class="relationship-bar">
<div class="relationship-fill" id="teacher-bar" style="width: 50%"></div>
</div>
</div>
<div class="stat-card">
<h3>数学老师 <span class="stat-value" id="math-teacher-value">50</span></h3>
<div class="relationship-bar">
<div class="relationship-fill" id="math-teacher-bar" style="width: 50%"></div>
</div>
</div>
<div class="stat-card">
<h3>语文老师 <span class="stat-value" id="chinese-teacher-value">50</span></h3>
<div class="relationship-bar">
<div class="relationship-fill" id="chinese-teacher-bar" style="width: 50%"></div>
</div>
</div>
<div class="stat-card">
<h3>英语老师 <span class="stat-value" id="english-teacher-value">50</span></h3>
<div class="relationship-bar">
<div class="relationship-fill" id="english-teacher-bar" style="width: 50%"></div>
</div>
</div>
<div class="stat-card">
<h3>同学A <span class="stat-value" id="classmate-a-value">50</span></h3>
<div class="relationship-bar">
<div class="relationship-fill" id="classmate-a-bar" style="width: 50%"></div>
</div>
</div>
<div class="stat-card">
<h3>同学B <span class="stat-value" id="classmate-b-value">50</span></h3>
<div class="relationship-bar">
<div class="relationship-fill" id="classmate-b-bar" style="width: 50%"></div>
</div>
</div>
<div class="stat-card">
<h3>父母 <span class="stat-value" id="parents-value">50</span></h3>
<div class="relationship-bar">
<div class="relationship-fill" id="parents-bar" style="width: 50%"></div>
</div>
</div>
<div class="stat-card">
<h3>crush <span class="stat-value" id="crush-value">0</span></h3>
<div class="relationship-bar">
<div class="relationship-fill" id="crush-bar" style="width: 0%"></div>
</div>
</div>
</div>
<!-- 主区域 -->
<div class="main">
<div class="time-info">
<div class="time-display">
<span class="time-badge">第 <span id="week">1</span> 周</span>
<span class="time-badge" id="day">周一</span>
<span class="time-badge" id="period">早晨</span>
</div>
<div class="season-indicator" id="season">🌸 春季</div>
</div>
<div style="font-size: 0.9rem; opacity: 0.8; margin-bottom: 5px;">
距离高考: <span id="days-left">365</span> 天 |
剩余假期: <span id="vacation-days">0</span> 天
</div>
<div class="event-log" id="event-log">
<!-- 动态生成 -->
</div>
</div>
<!-- 课程表 -->
<div class="schedule">
<h3>📅 本周课程表</h3>
<div id="schedule-list">
<!-- 动态生成 -->
</div>
<div style="margin-top: 10px; font-size: 0.8rem; opacity: 0.7;">
作业: <span id="homework-count">0</span> 未完成 |
本周活动: <span id="week-activities">0</span>
</div>
</div>
<!-- 事件区域 -->
<div class="events">
<div class="event-card">
<h3>🎯 当前状态</h3>
<p id="current-status">一切正常,准备开始学习。</p>
</div>
<div class="event-card relationship">
<h3>👥 关系动态</h3>
<p id="relationship-status">与老师关系良好,同学关系一般。</p>
</div>
<div class="event-card economy">
<h3>💰 经济状况</h3>
<p id="economy-status">零花钱充足,可以购买资料。</p>
</div>
<div class="event-card mental">
<h3>💭 心理状态</h3>
<p id="mental-status">情绪稳定,心理良好。</p>
</div>
<div class="event-card">
<h3>🎯 当前阶段目标</h3>
<p id="current-goal">暂无目标</p>
<div class="progress-bar">
<div class="progress-fill" id="goal-progress" style="width: 0%; background: var(--warning)"></div>
</div>
</div>
<div class="event-card">
<h3>🎲 随机事件</h3>
<p id="random-event">暂无事件</p>
</div>
</div>
<!-- 操作区域 -->
<div class="actions">
<button class="action-btn primary" id="study-btn">📚 学习 <span class="hotkey">1</span></button>
<button class="action-btn" id="rest-btn">💤 休息 <span class="hotkey">2</span></button>
<button class="action-btn" id="exercise-btn">🏃 锻炼 <span class="hotkey">3</span></button>
<button class="action-btn" id="social-btn">👥 社交 <span class="hotkey">4</span></button>
<button class="action-btn purple" id="memory-btn">💭 回忆 <span class="hotkey">5</span></button>
<button class="action-btn warning" id="exam-btn">📝 模考 <span class="hotkey">6</span></button>
<button class="action-btn cyan" id="homework-btn">✏️ 作业 <span class="hotkey">7</span></button>
<button class="action-btn" id="activity-btn">🎉 活动 <span class="hotkey">8</span></button>
<button class="action-btn" id="economy-btn">💰 经济 <span class="hotkey">9</span></button>
<button class="action-btn danger" id="end-btn">🌙 结束本周 <span class="hotkey">0</span></button>
</div>
<!-- 成就区域(已隐藏) -->
<div class="achievements" style="display: none;">
<h3>🏆 成就进度 <span id="achievement-count">0</span>/60</h3>
<div class="achievement-list" id="achievement-list">
<!-- 动态生成 -->
</div>
</div>
<!-- 页脚 -->
<div class="footer">
<span>💡 提示:按住Shift显示快捷键提示</span>
<span>
<a href="https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode.zh-Hans" target="_blank"
style="color: rgb(196, 196, 196)">
CC
BY-NC-ND 4.0
</a> | wujiahaocoder | 仓库:https://github.com/wujiahaocoder/AFO-Simulator
</span>
<button class="donation-btn" onclick="showAchievementDetail()"
style="padding: 5px 10px; font-size: 0.75rem;">
查看成就
</button>
</div>
</div>
<!-- ==================== 模态框系统 ==================== -->
<!-- 启动弹窗(捐助+介绍) -->
<div class="modal" id="welcome-modal" style="display: flex;">
<div class="modal-content donation-modal">
<div class="modal-header">
<h2>🎉 欢迎来到 AFO:结束?开始?</h2>
</div>
<div class="modal-body donation-content">
<h3>游戏介绍</h3>
<p>这是一个AFO后进行文化学习的模拟游戏。你将扮演一位退役OI选手,在52周的时间内,通过策略性的选择,平衡学习、休息、社交、经济等多维度状态,最终在高考中取得理想成绩。</p>
<p><strong>核心机制:</strong>每周限制3次操作,必须在有限资源下做出最优决策。你的心理状态、人际关系、经济状况都会直接影响学习效率!</p>
<h3 style="margin-top: 20px;">❤️ 支持开发</h3>
<p>
本游戏完全免费,采用<a href="https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode.zh-Hans"
target="_blank" style="color: rgb(196, 196, 196)">
CC BY-NC-ND
4.0
</a>协议。如果你喜欢这个游戏,欢迎请我喝杯咖啡,支持后续开发!
</p>
<div class="donation-qr">
<img src="https://github.com/wujiahaocoder/English_word_learner/blob/master/image.png?raw=true"
alt="捐助二维码"
onerror="this.style.display='none';this.parentElement.innerHTML='<div style=\'padding:20px;color:#666;font-size:0.8rem;\'>二维码加载失败<br>请访问GitHub支持</div>'">
</div>
<a href="https://github.com/wujiahaocoder/English_word_learner/blob/master/image.png" target="_blank"
class="donation-link">或点击这里查看高清二维码</a>
<div style="margin-top: 20px; font-size: 0.85rem; opacity: 0.7; text-align: left; background: rgba(0,0,0,0.2); padding: 10px; border-radius: 6px;">
<strong>游戏特色:</strong><br>
• 52周完整学年,每周3次操作限制<br>
• 50+随机事件,15+故事剧情<br>
• 60+成就,10+结局<br>
• 多维度属性联动系统<br>
• 策略性资源管理
</div>
</div>
<div class="donation-buttons">
<button class="donation-btn" onclick="closeModal('welcome-modal')">暂不支持,直接开始</button>
<button class="donation-btn primary"
onclick="window.open('https://github.com/wujiahaocoder/English_word_learner/blob/master/image.png', '_blank')">
支持开发者
</button>
</div>
</div>
</div>
<!-- 学习模态框 -->
<div class="modal" id="study-modal">
<div class="modal-content">
<div class="modal-header">
<h2>📚 选择学习科目</h2>
<button class="close-btn" onclick="closeModal('study-modal')">×</button>
</div>
<div class="modal-body">
<p>选择要重点学习的科目。不同科目消耗精力不同,提升效果也不同。竞赛背景让你在数理化上有额外加成。</p>
<div class="study-options">
<button class="study-btn" onclick="study('chinese')">
语文
<small>消耗15精力</small>
</button>
<button class="study-btn" onclick="study('math')">
数学
<small>消耗20精力</small>
</button>
<button class="study-btn" onclick="study('english')">
英语
<small>消耗15精力</small>
</button>
<button class="study-btn" onclick="study('physics')">
物理
<small>消耗20精力</small>
</button>
<button class="study-btn" onclick="study('chemistry')">
化学
<small>消耗15精力</small>
</button>
<button class="study-btn" onclick="study('biology')">
生物
<small>消耗15精力</small>
</button>
</div>
<div style="margin-top: 15px; font-size: 0.85rem; opacity: 0.8;">
💡 提示:数学和物理有竞赛基础,提升更快但消耗更大。心理状态会影响学习效率!
</div>
</div>
</div>
</div>
<!-- 休息模态框 -->
<div class="modal" id="rest-modal">
<div class="modal-content">
<div class="modal-header">
<h2>💤 休息方式</h2>
<button class="close-btn" onclick="closeModal('rest-modal')">×</button>
</div>
<div class="modal-body">
<p>选择适当的休息方式。过度劳累会影响健康,合理休息才能保持最佳状态。</p>
<div class="study-options">
<button class="study-btn" onclick="rest('sleep')">
深度睡眠
<small>恢复30精力 | 降低10压力</small>
</button>
<button class="study-btn" onclick="rest('nap')">
午睡
<small>恢复15精力 | 降低5压力</small>
</button>
<button class="study-btn" onclick="rest('relax')">
放松娱乐
<small>恢复10精力 | 降低15压力</small>
</button>
<button class="study-btn" onclick="rest('music')">
听音乐
<small>恢复5精力 | 降低8压力 </small>
</button>
<button class="study-btn special" onclick="rest('counseling')">
心理咨询
<small>消耗100元 | 恢复20心理</small>
</button>
</div>
</div>
</div>
</div>
<!-- 经济模态框 -->
<div class="modal" id="economy-modal">
<div class="modal-content">
<div class="modal-header">
<h2>💰 经济管理</h2>
<button class="close-btn" onclick="closeModal('economy-modal')">×</button>
</div>
<div class="modal-body">
<p>管理你的零花钱和支出。合理规划经济,购买学习资料。</p>
<div class="study-options">
<button class="study-btn" onclick="economy('part-time')">
兼职家教
<small>获得200元 | 增加压力</small>
</button>
<button class="study-btn" onclick="economy('buy-books')">
购买资料
<small>消耗1000元 | 全科+1 | 提升效率</small>
</button>
<button class="study-btn" onclick="economy('buy-course')">
网课补习
<small>消耗300元 | 指定科目+3 | 消耗精力</small>
</button>
<!-- <button class="study-btn" onclick="economy('save')">
存钱
<small>无消耗 | 增加存款 | 无直接收益</small>
</button> -->
<button class="study-btn" onclick="economy('parents')">
向父母要钱
<small>消耗关系 | 获得150元 | 增加压力</small>
</button>
</div>
<div style="margin-top: 10px; font-size: 0.85rem;">
当前存款: <span id="current-money">500</span> 元
</div>
</div>
</div>
</div>
<!-- 活动模态框 -->
<div class="modal" id="activity-modal">
<div class="modal-content">
<div class="modal-header">
<h2>🎉 课外活动</h2>
<button class="close-btn" onclick="closeModal('activity-modal')">×</button>
</div>
<div class="modal-body">
<p>参加课外活动可以丰富经历,但也会消耗时间和精力。</p>
<div class="study-options">
<button class="study-btn" onclick="activity('club')">
社团活动
<small>同学关系+5 | 压力-5</small>
</button>
<button class="study-btn" onclick="activity('volunteer')">
志愿者
<small>心理+3</small>
</button>
<button class="study-btn" onclick="activity('lecture')">
听讲座
<small>随机科目+1 | 压力-3</small>
</button>
<button class="study-btn" onclick="activity('competition')">
知识竞赛
<small>压力+10</small>
</button>
<button class="study-btn special" onclick="activity('oi-meetup')">
OI聚会
<small>压力-10 | 回忆+1</small>
</button>
</div>
</div>
</div>
</div>
<!-- 作业模态框 -->
<div class="modal" id="homework-modal">
<div class="modal-content">
<div class="modal-header">
<h2>✏️ 作业管理</h2>
<button class="close-btn" onclick="closeModal('homework-modal')">×</button>
</div>
<div class="modal-body">
<p>完成作业可以巩固知识,但也会消耗精力。拖欠作业会影响老师关系。</p>
<div id="homework-list" style="margin-bottom: 15px;">
<!-- 动态生成 -->
</div>
<div class="study-options">
<button class="study-btn" onclick="homework('complete-all')">
完成所有作业
<small>消耗30精力 | 全科+0.5 | 老师关系+3</small>
</button>
<button class="study-btn" onclick="homework('complete-one')">
完成一项作业
<small>消耗10精力 | 随机科目+0.3 | 老师关系+1</small>
</button>
<button class="study-btn danger" onclick="homework('skip')">
拖欠作业
<small>无消耗 | 老师关系-5 | 压力+5</small>
</button>
</div>
</div>
</div>
</div>
<!-- 故事/回忆模态框 -->
<div class="modal" id="story-modal">
<div class="modal-content story-modal">
<div class="modal-header">
<h2>📖 <span id="story-title">故事事件</span></h2>
<button class="close-btn" onclick="closeModal('story-modal')">×</button>
</div>
<div class="modal-body">
<div class="story-content" id="story-content">
<!-- 动态内容 -->
</div>
<div class="story-choices" id="story-choices">
<!-- 动态选择 -->
</div>
</div>
</div>
</div>
<!-- 阶段目标弹窗 -->
<div class="modal" id="goal-modal">
<div class="modal-content goal-modal">
<div class="modal-header">
<h2>🎯 阶段目标更新</h2>
<button class="close-btn" onclick="closeModal('goal-modal')">×</button>
</div>
<div class="modal-body">
<div class="goal-content" id="goal-content">
<!-- 动态生成 -->
</div>
</div>
<div class="modal-footer">
<button class="donation-btn primary" onclick="closeModal('goal-modal')">明白了</button>
</div>
</div>
</div>
<!-- 成就详情弹窗 -->
<div class="modal" id="achievement-modal">
<div class="modal-content achievement-detail-modal">
<div class="modal-header">
<h2>🏆 成就详情</h2>
<button class="close-btn" onclick="closeModal('achievement-modal')">×</button>
</div>
<div class="modal-body">
<div class="achievement-detail-content" id="achievement-detail-content">
<!-- 动态生成 -->
</div>
</div>
</div>
</div>
<!-- 通知 -->
<div class="notification" id="notification">
<div id="notification-text"></div>
</div>
<script>
// ==================== 游戏状态 ====================
const gameState = {
// 时间系统
week: 1,
dayOfWeek: 0, // 0=周一, 6=周日
period: 0, // 0=早晨, 1=上午, 2=下午, 3=晚上
daysLeft: 365,
vacationDays: 0,
season: 0, // 0=春, 1=夏, 2=秋, 3=冬
// 核心状态
energy: 80,
stress: 20,
health: 85,
mental: 75,
money: 500,
// 学科能力
subjects: {
chinese: 10,
math: 15,
english: 8,
physics: 20,
chemistry: 12,
biology: 10
},
// 人际关系(8个角色)
relationships: {
teacher: 50, // 班主任
mathTeacher: 50, // 数学老师
chineseTeacher: 50, // 语文老师
englishTeacher: 50, // 英语老师
classmateA: 50, // 同学A
classmateB: 50, // 同学B
parents: 50, // 父母
crush: 0 // crush
},
// 作业系统
homework: {
chinese: false,
math: false,
english: false,
physics: false,
chemistry: false,
biology: false
},
// 课程表(每周)
schedule: [],
// 活动记录
weekActivities: 0,
totalActivities: 0,
// 专精系统
specialization: null, // 'literature', 'science', 'all-rounder'
// 游戏进度
events: [], // 已触发的故事事件ID
achievements: new Set(),
storyProgress: 0,
examCount: 0,
memoryCount: 0,
perfectWeeks: 0,
// 统计
totalStudyHours: 0,
totalRestHours: 0,
totalExerciseHours: 0,
totalSocialHours: 0,
// 操作限制
actionsThisWeek: 0,
maxActionsPerWeek: 3,
// 阶段目标
currentGoal: null,
goalProgress: 0,
// 游戏状态
gameOver: false,
lastAction: null,
studyStreak: 0,
// 天气
weather: '☀️',
currentWeather: { type: '☀️', name: '晴天', mood: 1, efficiency: 1.1 }
};
// ==================== 数据库 ====================
// 季节系统
const seasons = [
{ name: '春季', emoji: '🌸', mood: 1, events: ['开学', '春游', '期中考试'] },
{ name: '夏季', emoji: '☀️', mood: 0, events: ['期末考试', '暑假', '毕业'] },
{ name: '秋季', emoji: '🍂', mood: -1, events: ['开学', '运动会', '期中考试'] },
{ name: '冬季', emoji: '❄️', mood: -2, events: ['期末考试', '寒假', '春节'] }
];
// 天气系统
const weathers = [
{ type: '☀️', name: '晴天', mood: 1, efficiency: 1.1 },
{ type: '☁️', name: '阴天', mood: 0, efficiency: 1.0 },
{ type: '🌧️', name: '雨天', mood: -1, efficiency: 0.9 },
{ type: '⛈️', name: '雷雨', mood: -2, efficiency: 0.8 },
//{ type: '❄️', name: '雪天', mood: -1, efficiency: 0.85 },
{ type: '🌫️', name: '雾霾', mood: -1, efficiency: 0.85 }
];
// 假期系统
const holidays = {
1: { name: '国庆', days: 7, week: 1, effect: { stress: -10 } },
2: { name: '元旦', days: 3, week: 20, effect: { stress: -5 } },
3: { name: '寒假', days: 21, week: 25, effect: { stress: -20, health: 5 } },
4: { name: '春节', days: 7, week: 26, effect: { parents: 10, stress: -15 } },
5: { name: '清明', days: 3, week: 35, effect: { mental: 5 } },
6: { name: '五一', days: 5, week: 40, effect: { stress: -8 } },
7: { name: '端午', days: 3, week: 45, effect: { stress: -5 } }
};
// 阶段目标系统
const stageGoals = {
5: {
title: "适应期目标(第5周)",
desc: "全科平均达到20分,压力低于40,健康保持80以上",
check: (s) => {
const avg = Object.values(s.subjects).reduce((a, b) => a + b, 0) / 6;
return avg >= 20 && s.stress < 40 && s.health >= 80;
},
reward: { energy: 10, stress: -5 }
},
10: {
title: "提升期目标(第10周)",
desc: "至少两科达到40分,与老师关系良好(>60),经济状况正常(>300元)",
check: (s) => {
const highCount = Object.values(s.subjects).filter(v => v >= 40).length;
return highCount >= 2 && s.relationships.teacher >= 60 && s.money >= 300;
},
reward: { mental: 5, money: 100 }
},
15: {
title: "稳定期目标(第15周)",
desc: "全科平均达到50分,压力低于30,完成至少5次作业",
check: (s) => {
const avg = Object.values(s.subjects).reduce((a, b) => a + b, 0) / 6;
const homeworkCount = Object.values(s.homework).filter(v => v).length;
return avg >= 50 && s.stress < 30 && homeworkCount >= 5;
},
reward: { health: 5, stress: -10 }
},
25: {
title: "冲刺期目标(第25周)",
desc: "全科平均达到65分,至少一科达到70分,crush关系>30",
check: (s) => {
const avg = Object.values(s.subjects).reduce((a, b) => a + b, 0) / 6;
const has70 = Object.values(s.subjects).some(v => v >= 70);
return avg >= 65 && has70 && s.relationships.crush >= 30;
},
reward: { energy: 15, mental: 10 }
},
35: {
title: "决战期目标(第35周)",
desc: "全科平均达到75分,心理值>70,完成至少3次模考",
check: (s) => {
const avg = Object.values(s.subjects).reduce((a, b) => a + b, 0) / 6;
return avg >= 75 && s.mental > 70 && s.examCount >= 3;
},
reward: { stress: -15, health: 10 }
},
45: {
title: "最终目标(第45周)",
desc: "全科平均达到85分,所有关系>60,压力<20",
check: (s) => {
const avg = Object.values(s.subjects).reduce((a, b) => a + b, 0) / 6;
const allRel = Object.values(s.relationships).every(v => v >= 60);
return avg >= 85 && allRel && s.stress < 20;
},
reward: { energy: 20, mental: 15 }
}
};
// 随机事件库(优化版:加入合理性检查)
const randomEvents = {
study: [
{
text: "数学老师额外布置了5道难题,说'竞赛生应该轻松搞定'",
effect: { stress: 5, math: 1 },
type: "bad",
weight: 10,
condition: (s) => s.subjects.math >= 15
},
{
text: "发现一道数学题有三种解法,豁然开朗",
effect: { math: 2, energy: 3 },
type: "good",
weight: 6,
condition: (s) => s.subjects.math >= 20
},
{
text: "数学测验最后一题全班只有你做对了",
effect: { math: 3, teacher: 5, stress: -5 },
type: "good",
weight: 4,
condition: (s) => s.subjects.math >= 35
},
{
text: "数学作业太多,熬夜到凌晨两点",
effect: { math: 1, energy: -10, stress: 8 },
type: "bad",
weight: 8,
condition: (s) => s.subjects.math >= 25
},
{
text: "数学课代表主动分享他的错题本",
effect: { math: 2, classmateA: 2 },
type: "good",
weight: 7,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "数学老师用你的解法当范例讲解",
effect: { math: 3, teacher: 5, stress: -3 },
type: "good",
weight: 5,
condition: (s) => s.subjects.math >= 30
},
{
text: "数学竞赛报名截止,你犹豫不决",
effect: { stress: 5 },
type: "neutral",
weight: 6,
condition: (s) => s.subjects.math >= 25 && s.week <= 8
},
{
text: "数学公式突然想不起来,考试卡壳",
effect: { math: -2, stress: 8 },
type: "bad",
weight: 7,
condition: (s) => s.subjects.math >= 20
},
{
text: "数学老师推荐了一本很好的参考书",
effect: { math: 2, teacher: 3 },
type: "good",
weight: 6,
condition: (s) => s.relationships.mathTeacher >= 40
},
{
text: "数学课上打瞌睡,错过了关键知识点",
effect: { math: -1, energy: -3, stress: 3 },
type: "bad",
weight: 8,
condition: (s) => s.energy < 50
},
// 语文相关
{
text: "语文作文被当作范文朗读",
effect: { chinese: 2, teacher: 5 },
type: "good",
weight: 7,
condition: (s) => s.subjects.chinese >= 20
},
{
text: "古文默写错了一个字,被扣分",
effect: { chinese: -1, stress: 3 },
type: "bad",
weight: 8,
condition: (s) => s.subjects.chinese >= 15
},
{
text: "语文老师推荐你参加作文比赛",
effect: { chinese: 3, teacher: 5, stress: 5 },
type: "good",
weight: 5,
condition: (s) => s.subjects.chinese >= 30
},
{
text: "阅读理解题完全理解了作者的意图",
effect: { chinese: 2, energy: 2 },
type: "good",
weight: 6,
condition: (s) => s.subjects.chinese >= 25
},
{
text: "语文课上讨论《红楼梦》,你发言精彩",
effect: { chinese: 2, classmateA: 3 },
type: "good",
weight: 5,
condition: (s) => s.subjects.chinese >= 20
},
{
text: "语文作业是抄写课文,枯燥乏味",
effect: { chinese: 1, stress: 2 },
type: "neutral",
weight: 7,
condition: (s) => true
},
{
text: "语文考试作文跑题,分数不理想",
effect: { chinese: -2, stress: 5 },
type: "bad",
weight: 6,
condition: (s) => s.subjects.chinese >= 15
},
{
text: "语文老师表扬你的文笔有进步",
effect: { chinese: 2, teacher: 3, stress: -3 },
type: "good",
weight: 6,
condition: (s) => s.subjects.chinese >= 18
},
{
text: "文言文翻译遇到生僻字,查字典花了很久",
effect: { chinese: 1, energy: -2 },
type: "neutral",
weight: 5,
condition: (s) => s.subjects.chinese >= 20
},
{
text: "语文课上分享读书心得,获得掌声",
effect: { chinese: 2, classmateA: 2, stress: -2 },
type: "good",
weight: 4,
condition: (s) => s.subjects.chinese >= 25
},
// 英语相关
{
text: "同学分享了高效英语单词记忆法,很有用",
effect: { english: 2, stress: -2 },
type: "good",
weight: 10,
condition: (s) => true
},
{
text: "英语听力考试完全听懂了,很自信",
effect: { english: 3, stress: -5 },
type: "good",
weight: 6,
condition: (s) => s.subjects.english >= 25
},
{
text: "英语作文用了高级句型,被老师圈出表扬",
effect: { english: 2, teacher: 3 },
type: "good",
weight: 5,
condition: (s) => s.subjects.english >= 30
},
{
text: "英语单词背了又忘,很沮丧",
effect: { english: -1, stress: 3 },
type: "bad",
weight: 8,
condition: (s) => s.subjects.english >= 15
},
{
text: "英语老师让你当小老师,教同学发音",
effect: { english: 3, teacher: 5, stress: 2 },
type: "good",
weight: 4,
condition: (s) => s.subjects.english >= 35
},
{
text: "英语课上和外教对话,虽然紧张但完成了",
effect: { english: 2, stress: 3 },
type: "good",
weight: 5,
condition: (s) => s.subjects.english >= 20
},
{
text: "英语阅读理解遇到生词太多,影响理解",
effect: { english: -1, stress: 4 },
type: "bad",
weight: 7,
condition: (s) => s.subjects.english >= 18
},
{
text: "英语老师送你一本原版小说",
effect: { english: 2, englishTeacher: 5 },
type: "good",
weight: 5,
condition: (s) => s.relationships.englishTeacher >= 40
},
{
text: "英语口语练习时,同学纠正了你的发音",
effect: { english: 1, classmateA: 1 },
type: "neutral",
weight: 6,
condition: (s) => s.subjects.english >= 15
},
{
text: "英语考试时间不够,最后几题乱填",
effect: { english: -2, stress: 5 },
type: "bad",
weight: 6,
condition: (s) => s.subjects.english >= 20
},
// 物理相关
{
text: "物理课上突然被点名解题,幸好以前竞赛学过",
effect: { physics: 1, teacher: 3 },
type: "good",
weight: 8,
condition: (s) => s.subjects.physics >= 15
},
{
text: "物理实验数据误差很大,被老师指出",
effect: { physics: -1, stress: 3 },
type: "bad",
weight: 7,
condition: (s) => s.subjects.physics >= 10
},
{
text: "物理老师用生动的比喻讲解电磁学,恍然大悟",
effect: { physics: 3, energy: 2 },
type: "good",
weight: 6,
condition: (s) => s.subjects.physics >= 20
},
{
text: "物理竞赛模拟题太难,只做出来一半",
effect: { physics: 1, stress: 5 },
type: "neutral",
weight: 5,
condition: (s) => s.subjects.physics >= 25
},
{
text: "物理课代表组织讨论,你提出了新思路",
effect: { physics: 2, classmateA: 3 },
type: "good",
weight: 5,
condition: (s) => s.subjects.physics >= 30
},
{
text: "物理公式推导卡在关键步骤,很烦躁",
effect: { physics: -1, stress: 4 },
type: "bad",
weight: 7,
condition: (s) => s.subjects.physics >= 20
},
{
text: "物理老师表扬你实验操作规范",
effect: { physics: 2, teacher: 3 },
type: "good",
weight: 6,
condition: (s) => s.subjects.physics >= 15
},
{
text: "物理考试选择题全对,大题却不会",
effect: { physics: 1, stress: 3 },
type: "neutral",
weight: 6,
condition: (s) => s.subjects.physics >= 18
},
{
text: "物理实验器材损坏,实验课取消",
effect: { physics: -1, stress: 2 },
type: "bad",
weight: 4,
condition: (s) => s.subjects.physics >= 10
},
{
text: "物理老师推荐你参加物理竞赛培训",
effect: { physics: 3, teacher: 5, stress: 5 },
type: "good",
weight: 3,
condition: (s) => s.subjects.physics >= 35
},
// 化学相关
{
text: "化学实验失败,被老师批评",
effect: { chemistry: -1, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.subjects.chemistry >= 10
},
{
text: "化学方程式配平突然开窍,一气呵成",
effect: { chemistry: 2, energy: 2 },
type: "good",
weight: 7,
condition: (s) => s.subjects.chemistry >= 15
},
{
text: "化学老师演示了有趣的颜色变化实验",
effect: { chemistry: 2, stress: -3 },
type: "good",
weight: 6,
condition: (s) => s.subjects.chemistry >= 10
},
{
text: "化学有机化学部分完全听不懂",
effect: { chemistry: -2, stress: 5 },
type: "bad",
weight: 8,
condition: (s) => s.subjects.chemistry >= 15
},
{
text: "化学实验制备成功,产率很高",
effect: { chemistry: 3, teacher: 3 },
type: "good",
weight: 5,
condition: (s) => s.subjects.chemistry >= 20
},
{
text: "化学考试计算题单位换算错误,全错",
effect: { chemistry: -2, stress: 4 },
type: "bad",
weight: 6,
condition: (s) => s.subjects.chemistry >= 18
},
{
text: "化学老师用生活例子讲解酸碱中和",
effect: { chemistry: 2, energy: 1 },
type: "good",
weight: 6,
condition: (s) => s.subjects.chemistry >= 12
},
{
text: "化学元素周期表背诵比赛,你得了第二",
effect: { chemistry: 2, classmateA: 2 },
type: "good",
weight: 4,
condition: (s) => s.subjects.chemistry >= 25
},
{
text: "化学实验报告被当作优秀范例展示",
effect: { chemistry: 3, teacher: 5 },
type: "good",
weight: 3,
condition: (s) => s.subjects.chemistry >= 30
},
{
text: "化学课上闻到刺激性气味,头晕",
effect: { chemistry: -1, health: -2, stress: 2 },
type: "bad",
weight: 5,
condition: (s) => s.subjects.chemistry >= 10
},
// 生物相关
{
text: "生物课代表主动帮你复习遗传学",
effect: { biology: 2, classmateA: 2 },
type: "good",
weight: 8,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "生物实验显微镜操作不熟练,视野模糊",
effect: { biology: -1, stress: 3 },
type: "bad",
weight: 7,
condition: (s) => s.subjects.biology >= 10
},
{
text: "生物老师用动画演示细胞分裂,印象深刻",
effect: { biology: 3, energy: 2 },
type: "good",
weight: 6,
condition: (s) => s.subjects.biology >= 15
},
{
text: "生物遗传题概率计算错误,答案全错",
effect: { biology: -2, stress: 4 },
type: "bad",
weight: 7,
condition: (s) => s.subjects.biology >= 20
},
{
text: "生物实验观察植物细胞,发现有趣现象",
effect: { biology: 2, classmateA: 1 },
type: "good",
weight: 5,
condition: (s) => s.subjects.biology >= 15
},
{
text: "生物课上讨论生态系统,你发言有深度",
effect: { biology: 2, teacher: 3 },
type: "good",
weight: 5,
condition: (s) => s.subjects.biology >= 25
},
{
text: "生物考试填空题记混了专业术语",
effect: { biology: -1, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.subjects.biology >= 18
},
{
text: "生物老师推荐你参加生物奥赛培训",
effect: { biology: 3, teacher: 5, stress: 5 },
type: "good",
weight: 3,
condition: (s) => s.subjects.biology >= 35
},
{
text: "生物实验解剖青蛙,心理压力大",
effect: { biology: 1, stress: 5, mental: -2 },
type: "bad",
weight: 4,
condition: (s) => s.subjects.biology >= 20
},
{
text: "生物课上小组合作完成实验,效率很高",
effect: { biology: 2, classmateA: 2, energy: 2 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 30
},
// 综合学习事件
{
text: "发现一本绝版参考书,如获至宝",
effect: { chinese: 1, math: 1, physics: 1 },
type: "good",
weight: 5,
condition: (s) => s.money >= 100
},
{
text: "自习室空调坏了,闷热难耐",
effect: { energy: -5, stress: 5 },
type: "bad",
weight: 6,
condition: (s) => true
},
{
text: "图书馆座位被占,只好回教室",
effect: { stress: 3 },
type: "neutral",
weight: 7,
condition: (s) => true
},
{
text: "发现一个超好用的学习APP",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习小组讨论激烈,收获很多",
effect: { math: 1, physics: 1, chemistry: 1, energy: 2 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "考试前一天复习到深夜,效率低下",
effect: { energy: -8, stress: 5 },
type: "bad",
weight: 8,
condition: (s) => s.week >= 4
},
{
text: "课间向老师请教问题,得到耐心解答",
effect: { teacher: 3, stress: -2 },
type: "good",
weight: 7,
condition: (s) => true
},
{
text: "学习计划被打乱,感到焦虑",
effect: { stress: 5 },
type: "bad",
weight: 6,
condition: (s) => true
},
{
text: "提前预习了新课,上课轻松很多",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 7,
condition: (s) => true
},
{
text: "发现自己的笔记系统需要改进",
effect: { stress: 2 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "数学和物理都考了高分,信心大增",
effect: { math: 2, physics: 2, stress: -5, energy: 3 },
type: "good",
weight: 4,
condition: (s) => s.subjects.math >= 30 && s.subjects.physics >= 30
},
{
text: "化学和生物实验冲突,时间紧张",
effect: { chemistry: -1, biology: -1, stress: 4 },
type: "bad",
weight: 5,
condition: (s) => s.subjects.chemistry >= 15 && s.subjects.biology >= 15
},
{
text: "语文和英语作文都写得不错,老师表扬",
effect: { chinese: 2, english: 2, teacher: 3 },
type: "good",
weight: 4,
condition: (s) => s.subjects.chinese >= 25 && s.subjects.english >= 25
},
{
text: "学习时手机干扰严重,效率低下",
effect: { energy: -3, stress: 3 },
type: "bad",
weight: 8,
condition: (s) => true
},
{
text: "找到适合自己的学习节奏,事半功倍",
effect: { energy: 5, stress: -5 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "老师突然宣布小测验,措手不及",
effect: { stress: 5 },
type: "bad",
weight: 7,
condition: (s) => true
},
{
text: "学习时窗外风景很美,心情愉悦",
effect: { stress: -3, energy: 2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "发现自己的错题本整理得很乱",
effect: { stress: 2 },
type: "neutral",
weight: 6,
condition: (s) => true
},
{
text: "学习时突然停电,被迫休息",
effect: { energy: 3, stress: 2 },
type: "neutral",
weight: 4,
condition: (s) => true
},
{
text: "老师布置的作业量突然减少",
effect: { stress: -5, energy: 3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时被同学打扰,很烦躁",
effect: { stress: 4 },
type: "bad",
weight: 6,
condition: (s) => true
},
{
text: "发现一个安静的学习角落,效率提升",
effect: { energy: 3, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时突然想通一个难题,很兴奋",
effect: { energy: 5, stress: -5 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "老师讲课声音太小,听不清",
effect: { stress: 3 },
type: "bad",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的知识体系有漏洞",
effect: { stress: 3 },
type: "neutral",
weight: 6,
condition: (s) => true
},
{
text: "老师用幽默的方式讲解枯燥内容",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的笔记记得很详细",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "老师突然提问,你答不上来",
effect: { stress: 4 },
type: "bad",
weight: 7,
condition: (s) => true
},
{
text: "学习时发现自己的进步很明显",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "老师布置的作业需要查很多资料",
effect: { energy: -3, stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的时间管理有问题",
effect: { stress: 3 },
type: "neutral",
weight: 6,
condition: (s) => true
},
{
text: "老师用实物演示抽象概念,理解加深",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的专注力下降",
effect: { energy: -2, stress: 2 },
type: "bad",
weight: 6,
condition: (s) => true
},
{
text: "老师鼓励大家多提问,氛围很好",
effect: { stress: -3, energy: 2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的知识面很窄",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用思维导图梳理知识,清晰明了",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习方法需要调整",
effect: { stress: 3 },
type: "neutral",
weight: 6,
condition: (s) => true
},
{
text: "老师分享了自己的学习经历,很受启发",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的基础不牢固",
effect: { stress: 4 },
type: "bad",
weight: 6,
condition: (s) => true
},
{
text: "老师用游戏的方式复习,有趣又有效",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 4,
condition: (s) => true
},
{
text: "学习时发现自己的知识遗忘很快",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用对比法讲解易混淆概念,印象深刻",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的理解能力有待提高",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用故事引入新课,吸引注意力",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的计算能力不足",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用图表展示数据,一目了然",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的逻辑思维需要训练",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用实验验证理论,加深理解",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的记忆力需要提升",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用类比法讲解抽象概念,容易理解",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的表达能力不足",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用分组讨论的方式,互相学习",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的时间分配不合理",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用思维训练题,锻炼大脑",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习动力不足",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用成功案例激励大家,充满希望",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的自信心不足",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用错误案例分析,避免踩坑",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的抗压能力需要提高",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用阶段性目标设定,有成就感",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习习惯需要培养",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用正向反馈鼓励,进步明显",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习方法需要优化",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用知识图谱串联知识点,系统性强",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习效率需要提高",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用思维导图总结,一目了然",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习态度需要端正",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用成功经验分享,少走弯路",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习目标不明确",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用失败教训警示,避免重蹈覆辙",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习计划不切实际",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用科学方法指导,事半功倍",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习环境不佳",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用心理辅导缓解焦虑,心态平稳",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习资源不足",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习策略指导,提升效率",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习方法不适合",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习技巧分享,快速提升",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习动力来源单一",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习目标分解,循序渐进",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习反馈不足",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习评估方法,及时调整",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习监控不够",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习反思指导,持续改进",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习迁移能力弱",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习应用指导,学以致用",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习创新能力不足",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习拓展指导,开阔视野",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习批判性思维弱",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习思辨指导,提升思维",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习合作能力差",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习协作指导,团队进步",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习沟通能力弱",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习表达指导,清晰传达",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习领导能力不足",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习组织指导,提升效率",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习适应能力差",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习调整指导,灵活应对",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习抗挫折能力弱",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习坚持指导,克服困难",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习自我管理能力差",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习自律指导,提升自制力",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习自我激励能力弱",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习自信指导,增强信心",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习自我反思能力不足",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习总结指导,提升认知",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习自我评估能力弱",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习诊断指导,精准改进",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习自我调节能力差",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习优化指导,持续提升",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习自我发展能力不足",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习规划指导,明确方向",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习自我实现能力弱",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习目标指导,激发潜能",
effect: { energy: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学习时发现自己的学习自我超越能力不足",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "老师用学习愿景指导,追求卓越",
effect: { energy: 3, stress: -3 },
type: "good",
weight: 5,
condition: (s) => true
}
],
relationship: [
{
text: "朋友主动借你课堂笔记,字迹工整",
effect: { classmateA: 3, stress: -2 },
type: "good",
weight: 8,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "和朋友一起刷题,效率翻倍",
effect: { classmateA: 2, math: 1, energy: -2 },
type: "good",
weight: 7,
condition: (s) => s.subjects.math >= 10
},
{
text: "朋友发现你漏记了重点,及时提醒",
effect: { classmateA: 4, stress: -3 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 20
},
{
text: "朋友的解题思路很独特,让你豁然开朗",
effect: { classmateA: 3, physics: 1 },
type: "good",
weight: 5,
condition: (s) => s.subjects.physics >= 15
},
{
text: "朋友约你周末一起复习,你答应了",
effect: { classmateA: 2, stress: 2 },
type: "neutral",
weight: 7,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友的英语作文被老师表扬,你为他高兴",
effect: { classmateA: 3, english: 1 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友在你生病时帮忙抄了笔记",
effect: { classmateA: 5, stress: -5 },
type: "good",
weight: 5,
condition: (s) => s.health < 70
},
{
text: "朋友的化学实验数据给你参考",
effect: { classmateA: 2, chemistry: 1 },
type: "good",
weight: 4,
condition: (s) => s.subjects.chemistry >= 10
},
{
text: "朋友提醒你明天有小测",
effect: { classmateA: 3, stress: 3 },
type: "neutral",
weight: 8,
condition: (s) => true
},
{
text: "朋友的生物笔记有彩色图解,很清晰",
effect: { classmateA: 2, biology: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友和你比赛背单词,输了请奶茶",
effect: { classmateA: 2, english: 1, stress: 2 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateA >= 20
},
{
text: "朋友的作文思路启发了你",
effect: { classmateA: 3, chinese: 1 },
type: "good",
weight: 5,
condition: (s) => s.subjects.chinese >= 15
},
{
text: "朋友的物理错题本借你参考",
effect: { classmateA: 2, physics: 1 },
type: "good",
weight: 4,
condition: (s) => s.subjects.physics >= 10
},
{
text: "朋友的数学竞赛题解法很巧妙",
effect: { classmateA: 3, math: 2 },
type: "good",
weight: 5,
condition: (s) => s.subjects.math >= 25
},
{
text: "朋友的生物实验报告写得详细",
effect: { classmateA: 2, biology: 1 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友的语文阅读笔记很有见解",
effect: { classmateA: 2, chinese: 1 },
type: "good",
weight: 4,
condition: (s) => s.subjects.chinese >= 20
},
{
text: "朋友的英语听力技巧很实用",
effect: { classmateA: 2, english: 1 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友的化学方程式记忆法很有效",
effect: { classmateA: 2, chemistry: 1 },
type: "good",
weight: 4,
condition: (s) => s.subjects.chemistry >= 15
},
{
text: "朋友的历史时间轴整理得很清晰",
effect: { classmateA: 2, history: 1 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友的地理地图册借你复习",
effect: { classmateA: 2, geography: 1 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友分享了喜欢的音乐,很好听",
effect: { classmateA: 2, stress: -3 },
type: "good",
weight: 8,
condition: (s) => true
},
{
text: "朋友约你一起去食堂吃饭",
effect: { classmateA: 2, energy: 3 },
type: "good",
weight: 9,
condition: (s) => s.relationships.classmateA >= 20
},
{
text: "朋友的笑话让你笑出声",
effect: { classmateA: 2, stress: -5 },
type: "good",
weight: 7,
condition: (s) => true
},
{
text: "朋友借你充电宝,手机没电了",
effect: { classmateA: 3, stress: -2 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "朋友帮你占了图书馆座位",
effect: { classmateA: 3, stress: -3 },
type: "good",
weight: 7,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友的雨伞借你用,下雨了",
effect: { classmateA: 3, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的纸巾借你用,打了个喷嚏",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "朋友的创可贴借你用,擦伤了",
effect: { classmateA: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的橡皮借你用,笔没墨了",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "朋友的修正带借你用,写错了",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "朋友的尺子借你用,画图需要",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的圆规借你用,几何题需要",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的量角器借你用,角度测量",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的计算器借你用,复杂计算",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的荧光笔借你用,划重点",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的便利贴借你用,记临时事项",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的订书机借你用,整理资料",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的打孔器借你用,做笔记",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的文件夹借你用,分类试卷",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的书立借你用,整理书本",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友在你低落时安慰你",
effect: { classmateA: 4, stress: -8, mental: 2 },
type: "good",
weight: 6,
condition: (s) => s.stress > 40
},
{
text: "朋友为你庆祝生日,送了小礼物",
effect: { classmateA: 5, stress: -5, energy: 3 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 50
},
{
text: "朋友在你考试失利时鼓励你",
effect: { classmateA: 3, stress: -5, mental: 1 },
type: "good",
weight: 7,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友分享了自己的烦恼,你倾听了",
effect: { classmateA: 3, stress: 2 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友在你被批评时为你辩护",
effect: { classmateA: 5, stress: -3 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 45
},
{
text: "朋友在你生病时发消息关心",
effect: { classmateA: 3, stress: -2 },
type: "good",
weight: 6,
condition: (s) => s.health < 80
},
{
text: "朋友在你熬夜时提醒你早点休息",
effect: { classmateA: 2, stress: -1 },
type: "good",
weight: 7,
condition: (s) => s.energy < 50
},
{
text: "朋友在你压力大时陪你散步",
effect: { classmateA: 3, stress: -6, energy: 2 },
type: "good",
weight: 6,
condition: (s) => s.stress > 50
},
{
text: "朋友在你迷茫时给你建议",
effect: { classmateA: 3, stress: -3, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友在你成功时真心为你高兴",
effect: { classmateA: 4, stress: -3, energy: 2 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友在你失败时说'下次会更好'",
effect: { classmateA: 3, stress: -4, mental: 1 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友在你孤独时陪你聊天",
effect: { classmateA: 3, stress: -4, mental: 1 },
type: "good",
weight: 7,
condition: (s) => true
},
{
text: "朋友在你焦虑时教你深呼吸",
effect: { classmateA: 2, stress: -5, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.stress > 45
},
{
text: "朋友在你失眠时分享助眠音乐",
effect: { classmateA: 2, stress: -3, energy: 2 },
type: "good",
weight: 4,
condition: (s) => s.energy < 40
},
{
text: "朋友在你饥饿时分你零食",
effect: { classmateA: 2, energy: 3, stress: -2 },
type: "good",
weight: 8,
condition: (s) => true
},
{
text: "朋友在你口渴时分你水",
effect: { classmateA: 2, energy: 2, stress: -1 },
type: "good",
weight: 8,
condition: (s) => true
},
{
text: "朋友在你冷时借你外套",
effect: { classmateA: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友在你热时借你扇子",
effect: { classmateA: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友在你困时借你风油精",
effect: { classmateA: 2, energy: 2, stress: -1 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友在你头疼时借你止痛药",
effect: { classmateA: 2, stress: -3 },
type: "good",
weight: 4,
condition: (s) => true
},
{
text: "朋友误会你,说了气话",
effect: { classmateA: -5, stress: 8 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "你和朋友因为小事争吵",
effect: { classmateA: -3, stress: 5 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateA >= 20
},
{
text: "朋友的玩笑开过了,你感到不舒服",
effect: { classmateA: -2, stress: 3 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友忘记答应你的事,你有点失望",
effect: { classmateA: -2, stress: 2 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "你和朋友竞争同一个奖项,气氛紧张",
effect: { classmateA: -3, stress: 5 },
type: "bad",
weight: 4,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友在背后说你坏话,被你听到",
effect: { classmateA: -8, stress: 10, mental: -2 },
type: "bad",
weight: 3,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "你和朋友因为观点不同而争论",
effect: { classmateA: -2, stress: 4 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友借你钱却迟迟不还",
effect: { classmateA: -4, stress: 5, money: -50 },
type: "bad",
weight: 4,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友在你忙时打扰你,你有点烦躁",
effect: { classmateA: -1, stress: 3 },
type: "bad",
weight: 7,
condition: (s) => s.relationships.classmateA >= 20
},
{
text: "朋友的承诺没做到,你感到失望",
effect: { classmateA: -3, stress: 4 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "你和朋友冷战了,互不理睬",
effect: { classmateA: -5, stress: 6, mental: -1 },
type: "bad",
weight: 4,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友向你道歉,承认错误",
effect: { classmateA: 4, stress: -3 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 20
},
{
text: "你主动和朋友和解,关系修复",
effect: { classmateA: 5, stress: -5, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 10
},
{
text: "朋友送你小礼物表示歉意",
effect: { classmateA: 4, stress: -4 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友在你生日时主动和好",
effect: { classmateA: 6, stress: -6 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateA >= 15
},
{
text: "朋友邀请你参加班级篮球赛",
effect: { classmateA: 3, energy: -5, stress: 2 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友和你一起参加社团活动",
effect: { classmateA: 3, energy: -3, stress: -2 },
type: "good",
weight: 7,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友和你组队参加知识竞赛",
effect: { classmateA: 4, stress: 5, energy: -3 },
type: "neutral",
weight: 5,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友和你一起排练文艺汇演",
effect: { classmateA: 3, stress: 3, energy: -4 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友和你一起做志愿者活动",
effect: { classmateA: 4, stress: -3, energy: -2 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友和你一起准备班级黑板报",
effect: { classmateA: 3, stress: 2, energy: -3 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友和你一起参加运动会",
effect: { classmateA: 3, energy: -8, stress: 2 },
type: "neutral",
weight: 5,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友和你一起准备演讲比赛",
effect: { classmateA: 4, stress: 5, energy: -4 },
type: "neutral",
weight: 5,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友和你一起策划班级活动",
effect: { classmateA: 3, stress: 3, energy: -3 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友和你一起参加辩论赛",
effect: { classmateA: 4, stress: 6, energy: -5 },
type: "neutral",
weight: 4,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友和你一起参加合唱比赛",
effect: { classmateA: 3, stress: 2, energy: -3 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友和你一起参加美术展览",
effect: { classmateA: 3, stress: -2, energy: -2 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友和你一起参加科技制作",
effect: { classmateA: 4, stress: 3, energy: -4 },
type: "neutral",
weight: 5,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友和你一起参加数学建模",
effect: { classmateA: 4, stress: 5, energy: -5 },
type: "neutral",
weight: 4,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友和你一起参加物理实验竞赛",
effect: { classmateA: 4, stress: 4, energy: -4 },
type: "neutral",
weight: 5,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友在你转学时送你纪念册",
effect: { classmateA: 6, stress: -5, mental: 2 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateA >= 50
},
{
text: "朋友在你毕业时送你毕业礼物",
effect: { classmateA: 5, stress: -3, energy: 2 },
type: "good",
weight: 3,
condition: (s) => s.week >= 12
},
{
text: "朋友在你获奖时第一个祝贺你",
effect: { classmateA: 4, stress: -4, energy: 3 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友在你落选时安慰你",
effect: { classmateA: 4, stress: -6, mental: 1 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友在你生病时帮你请假",
effect: { classmateA: 5, stress: -3 },
type: "good",
weight: 5,
condition: (s) => s.health < 70
},
{
text: "朋友在你忘带作业时帮你解释",
effect: { classmateA: 3, stress: -2 },
type: "good",
weight: 7,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友在你迟到时帮你打掩护",
effect: { classmateA: 3, stress: -3 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友在你被老师误会时为你作证",
effect: { classmateA: 5, stress: -5 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友在你被批评时为你说话",
effect: { classmateA: 4, stress: -4 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友在你被孤立时主动接近你",
effect: { classmateA: 6, stress: -8, mental: 2 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 20
},
{
text: "朋友在你被欺负时站出来保护你",
effect: { classmateA: 7, stress: -6, mental: 3 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateA >= 45
},
{
text: "朋友在你被嘲笑时为你辩护",
effect: { classmateA: 5, stress: -5, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友在你被误解时为你澄清",
effect: { classmateA: 4, stress: -4 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友在你被忽视时注意到你",
effect: { classmateA: 3, stress: -3, mental: 1 },
type: "good",
weight: 7,
condition: (s) => true
},
{
text: "朋友在你被冷落时邀请你加入",
effect: { classmateA: 4, stress: -4, mental: 1 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友和你竞争同一个排名,压力很大",
effect: { classmateA: -2, stress: 5 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友的成绩超过你,你感到失落",
effect: { classmateA: -1, stress: 4, mental: -1 },
type: "bad",
weight: 7,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友的解题速度比你快,你有点着急",
effect: { classmateA: -1, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友的笔记比你详细,你感到压力",
effect: { classmateA: -1, stress: 2 },
type: "bad",
weight: 7,
condition: (s) => s.relationships.classmateA >= 20
},
{
text: "朋友的复习进度比你快,你有点焦虑",
effect: { classmateA: -1, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友的错题本比你厚,你感到压力",
effect: { classmateA: -1, stress: 2 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateA >= 20
},
{
text: "朋友的复习时间比你长,你有点着急",
effect: { classmateA: -1, stress: 3 },
type: "bad",
weight: 7,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友的模拟考分数比你高,你感到失落",
effect: { classmateA: -2, stress: 4, mental: -1 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友的解题方法比你巧妙,你有点沮丧",
effect: { classmateA: -1, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友的复习效率比你高,你感到压力",
effect: { classmateA: -1, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友和你分享了秘密",
effect: { classmateA: 5, stress: -2, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 45
},
{
text: "朋友和你聊到深夜,关系更近",
effect: { classmateA: 4, energy: -5, stress: -3 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友和你一起规划未来",
effect: { classmateA: 4, stress: -2, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 50
},
{
text: "朋友和你约定考上同一所大学",
effect: { classmateA: 6, stress: 5, energy: 3 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateA >= 55
},
{
text: "朋友和你成为最好的朋友",
effect: { classmateA: 8, stress: -5, mental: 2 },
type: "good",
weight: 2,
condition: (s) => s.relationships.classmateA >= 60
},
{
text: "朋友在你生日时为你准备惊喜",
effect: { classmateA: 6, stress: -8, energy: 3 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateA >= 50
},
{
text: "朋友在你重要时刻陪伴你",
effect: { classmateA: 5, stress: -5, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 45
},
{
text: "朋友在你需要时总是出现",
effect: { classmateA: 4, stress: -4, mental: 1 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友的理解让你感到温暖",
effect: { classmateA: 3, stress: -3, mental: 1 },
type: "good",
weight: 7,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友的信任让你感到责任",
effect: { classmateA: 3, stress: 2, mental: 1 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友在你困难时犹豫是否帮忙",
effect: { classmateA: -3, stress: 4 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友在你求助时找借口推脱",
effect: { classmateA: -4, stress: 5 },
type: "bad",
weight: 4,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友在你成功时表现出嫉妒",
effect: { classmateA: -3, stress: 3, mental: -1 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友在你失败时表现出轻视",
effect: { classmateA: -4, stress: 5, mental: -1 },
type: "bad",
weight: 4,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友在你面前炫耀成绩",
effect: { classmateA: -2, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友在你面前贬低你的努力",
effect: { classmateA: -3, stress: 4, mental: -1 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友在你面前传播你的谣言",
effect: { classmateA: -6, stress: 8, mental: -2 },
type: "bad",
weight: 3,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友在你背后说你的坏话",
effect: { classmateA: -5, stress: 6, mental: -1 },
type: "bad",
weight: 4,
condition: (s) => s.relationships.classmateA >= 35
},
{
text: "朋友在你不知情时利用你",
effect: { classmateA: -7, stress: 7, mental: -2 },
type: "bad",
weight: 3,
condition: (s) => s.relationships.classmateA >= 45
},
{
text: "朋友在你信任时背叛你",
effect: { classmateA: -8, stress: 10, mental: -3 },
type: "bad",
weight: 2,
condition: (s) => s.relationships.classmateA >= 50
},
{
text: "朋友主动找你谈心,化解误会",
effect: { classmateA: 5, stress: -5, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 20
},
{
text: "朋友写信向你道歉,情真意切",
effect: { classmateA: 6, stress: -6, mental: 1 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友送你亲手做的礼物表示歉意",
effect: { classmateA: 5, stress: -4 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友在你生日时主动和好",
effect: { classmateA: 7, stress: -7 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateA >= 15
},
{
text: "朋友在你困难时伸出援手,关系修复",
effect: { classmateA: 6, stress: -5, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 20
},
{
text: "朋友在你成功时真心祝贺,冰释前嫌",
effect: { classmateA: 5, stress: -4 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友在你失败时安慰你,重归于好",
effect: { classmateA: 5, stress: -6, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 20
},
{
text: "朋友在你被批评时为你说话,关系缓和",
effect: { classmateA: 4, stress: -3 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 25
},
{
text: "朋友在你被孤立时接近你,友谊重建",
effect: { classmateA: 6, stress: -5, mental: 1 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 15
},
{
text: "朋友在你被欺负时保护你,友谊加深",
effect: { classmateA: 7, stress: -6, mental: 2 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateA >= 30
},
{
text: "朋友在你最需要时出现,成为知己",
effect: { classmateA: 8, stress: -8, mental: 3 },
type: "good",
weight: 2,
condition: (s) => s.relationships.classmateA >= 55
},
{
text: "朋友在你迷茫时指引你,成为导师",
effect: { classmateA: 6, stress: -5, mental: 2 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateA >= 50
},
{
text: "朋友在你跌倒时扶起你,成为依靠",
effect: { classmateA: 7, stress: -7, mental: 2 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateA >= 55
}, {
text: "朋友的地理地图册借你复习,画满了重点",
effect: { classmateB: 3, geography: 1, stress: -2 },
type: "good",
weight: 7,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友的历史时间轴整理得非常清晰",
effect: { classmateB: 2, history: 1 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友的语文阅读理解技巧很实用",
effect: { classmateB: 2, chinese: 1 },
type: "good",
weight: 5,
condition: (s) => s.subjects.chinese >= 15
},
{
text: "朋友的英语作文模板借你参考",
effect: { classmateB: 3, english: 1 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友的化学实验报告写得详细",
effect: { classmateB: 2, chemistry: 1 },
type: "good",
weight: 5,
condition: (s) => s.subjects.chemistry >= 10
},
{
text: "朋友的生物笔记有手绘图解",
effect: { classmateB: 2, biology: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友的物理错题本借你参考",
effect: { classmateB: 2, physics: 1 },
type: "good",
weight: 4,
condition: (s) => s.subjects.physics >= 10
},
{
text: "朋友的数学竞赛题解法很巧妙",
effect: { classmateB: 3, math: 2 },
type: "good",
weight: 5,
condition: (s) => s.subjects.math >= 25
},
{
text: "朋友的英语听力技巧很实用",
effect: { classmateB: 2, english: 1 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友的语文作文思路启发了你",
effect: { classmateB: 3, chinese: 1 },
type: "good",
weight: 5,
condition: (s) => s.subjects.chinese >= 20
},
{
text: "朋友分享了喜欢的电影,很好看",
effect: { classmateB: 2, stress: -3 },
type: "good",
weight: 8,
condition: (s) => true
},
{
text: "朋友约你一起去图书馆自习",
effect: { classmateB: 2, energy: -2, stress: -1 },
type: "good",
weight: 9,
condition: (s) => s.relationships.classmateB >= 20
},
{
text: "朋友的冷笑话让你笑出声",
effect: { classmateB: 2, stress: -5 },
type: "good",
weight: 7,
condition: (s) => true
},
{
text: "朋友借你充电宝,手机没电了",
effect: { classmateB: 3, stress: -2 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "朋友帮你占了自习室座位",
effect: { classmateB: 3, stress: -3 },
type: "good",
weight: 7,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友的雨伞借你用,下雨了",
effect: { classmateB: 3, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的纸巾借你用,打了个喷嚏",
effect: { classmateB: 2, stress: -1 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "朋友的创可贴借你用,擦伤了",
effect: { classmateB: 2, stress: -2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "朋友的橡皮借你用,笔没墨了",
effect: { classmateB: 2, stress: -1 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "朋友的修正带借你用,写错了",
effect: { classmateB: 2, stress: -1 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "朋友在你低落时安慰你",
effect: { classmateB: 4, stress: -8, mental: 2 },
type: "good",
weight: 6,
condition: (s) => s.stress > 40
},
{
text: "朋友为你庆祝生日,送了小礼物",
effect: { classmateB: 5, stress: -5, energy: 3 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateB >= 50
},
{
text: "朋友在你考试失利时鼓励你",
effect: { classmateB: 3, stress: -5, mental: 1 },
type: "good",
weight: 7,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友分享了自己的烦恼,你倾听了",
effect: { classmateB: 3, stress: 2 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友在你被批评时为你辩护",
effect: { classmateB: 5, stress: -3 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 45
},
{
text: "朋友在你生病时发消息关心",
effect: { classmateB: 3, stress: -2 },
type: "good",
weight: 6,
condition: (s) => s.health < 80
},
{
text: "朋友在你熬夜时提醒你早点休息",
effect: { classmateB: 2, stress: -1 },
type: "good",
weight: 7,
condition: (s) => s.energy < 50
},
{
text: "朋友在你压力大时陪你散步",
effect: { classmateB: 3, stress: -6, energy: 2 },
type: "good",
weight: 6,
condition: (s) => s.stress > 50
},
{
text: "朋友在你迷茫时给你建议",
effect: { classmateB: 3, stress: -3, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友在你成功时真心为你高兴",
effect: { classmateB: 4, stress: -3, energy: 2 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友误会你,说了气话",
effect: { classmateB: -5, stress: 8 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "你和朋友因为小事争吵",
effect: { classmateB: -3, stress: 5 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateB >= 20
},
{
text: "朋友的玩笑开过了,你感到不舒服",
effect: { classmateB: -2, stress: 3 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友忘记答应你的事,你有点失望",
effect: { classmateB: -2, stress: 2 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "你和朋友竞争同一个奖项,气氛紧张",
effect: { classmateB: -3, stress: 5 },
type: "bad",
weight: 4,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友在背后说你坏话,被你听到",
effect: { classmateB: -8, stress: 10, mental: -2 },
type: "bad",
weight: 3,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "你和朋友因为观点不同而争论",
effect: { classmateB: -2, stress: 4 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友借你钱却迟迟不还",
effect: { classmateB: -4, stress: 5, money: -50 },
type: "bad",
weight: 4,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友在你忙时打扰你,你有点烦躁",
effect: { classmateB: -1, stress: 3 },
type: "bad",
weight: 7,
condition: (s) => s.relationships.classmateB >= 20
},
{
text: "朋友的承诺没做到,你感到失望",
effect: { classmateB: -3, stress: 4 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友邀请你参加班级篮球赛",
effect: { classmateB: 3, energy: -5, stress: 2 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友和你一起参加社团活动",
effect: { classmateB: 3, energy: -3, stress: -2 },
type: "good",
weight: 7,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友和你组队参加知识竞赛",
effect: { classmateB: 4, stress: 5, energy: -3 },
type: "neutral",
weight: 5,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友和你一起排练文艺汇演",
effect: { classmateB: 3, stress: 3, energy: -4 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友和你一起做志愿者活动",
effect: { classmateB: 4, stress: -3, energy: -2 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友和你一起准备班级黑板报",
effect: { classmateB: 3, stress: 2, energy: -3 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友和你一起参加运动会",
effect: { classmateB: 3, energy: -8, stress: 2 },
type: "neutral",
weight: 5,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友和你一起准备演讲比赛",
effect: { classmateB: 4, stress: 5, energy: -4 },
type: "neutral",
weight: 5,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友和你一起策划班级活动",
effect: { classmateB: 3, stress: 3, energy: -3 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友和你一起参加辩论赛",
effect: { classmateB: 4, stress: 6, energy: -5 },
type: "neutral",
weight: 4,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友在你转学时送你纪念册",
effect: { classmateB: 6, stress: -5, mental: 2 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateB >= 50
},
{
text: "朋友在你毕业时送你毕业礼物",
effect: { classmateB: 5, stress: -3, energy: 2 },
type: "good",
weight: 3,
condition: (s) => s.week >= 12
},
{
text: "朋友在你获奖时第一个祝贺你",
effect: { classmateB: 4, stress: -4, energy: 3 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友在你落选时安慰你",
effect: { classmateB: 4, stress: -6, mental: 1 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友在你生病时帮你请假",
effect: { classmateB: 5, stress: -3 },
type: "good",
weight: 5,
condition: (s) => s.health < 70
},
{
text: "朋友在你忘带作业时帮你解释",
effect: { classmateB: 3, stress: -2 },
type: "good",
weight: 7,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友在你迟到时帮你打掩护",
effect: { classmateB: 3, stress: -3 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友在你被老师误会时为你作证",
effect: { classmateB: 5, stress: -5 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友在你被批评时为你说话",
effect: { classmateB: 4, stress: -4 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友在你被孤立时主动接近你",
effect: { classmateB: 6, stress: -8, mental: 2 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateB >= 20
},
{
text: "朋友和你竞争同一个排名,压力很大",
effect: { classmateB: -2, stress: 5 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友的成绩超过你,你感到失落",
effect: { classmateB: -1, stress: 4, mental: -1 },
type: "bad",
weight: 7,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友的解题速度比你快,你有点着急",
effect: { classmateB: -1, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友的笔记比你详细,你感到压力",
effect: { classmateB: -1, stress: 2 },
type: "bad",
weight: 7,
condition: (s) => s.relationships.classmateB >= 20
},
{
text: "朋友的复习进度比你快,你有点焦虑",
effect: { classmateB: -1, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友的错题本比你厚,你感到压力",
effect: { classmateB: -1, stress: 2 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateB >= 20
},
{
text: "朋友的复习时间比你长,你有点着急",
effect: { classmateB: -1, stress: 3 },
type: "bad",
weight: 7,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友的模拟考分数比你高,你感到失落",
effect: { classmateB: -2, stress: 4, mental: -1 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友的解题方法比你巧妙,你有点沮丧",
effect: { classmateB: -1, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友的复习效率比你高,你感到压力",
effect: { classmateB: -1, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友和你分享了秘密",
effect: { classmateB: 5, stress: -2, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 45
},
{
text: "朋友和你聊到深夜,关系更近",
effect: { classmateB: 4, energy: -5, stress: -3 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友和你一起规划未来",
effect: { classmateB: 4, stress: -2, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 50
},
{
text: "朋友和你约定考上同一所大学",
effect: { classmateB: 6, stress: 5, energy: 3 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateB >= 55
},
{
text: "朋友和你成为最好的朋友",
effect: { classmateB: 8, stress: -5, mental: 2 },
type: "good",
weight: 2,
condition: (s) => s.relationships.classmateB >= 60
},
{
text: "朋友在你生日时为你准备惊喜",
effect: { classmateB: 6, stress: -8, energy: 3 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateB >= 50
},
{
text: "朋友在你重要时刻陪伴你",
effect: { classmateB: 5, stress: -5, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 45
},
{
text: "朋友在你需要时总是出现",
effect: { classmateB: 4, stress: -4, mental: 1 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友的理解让你感到温暖",
effect: { classmateB: 3, stress: -3, mental: 1 },
type: "good",
weight: 7,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友的信任让你感到责任",
effect: { classmateB: 3, stress: 2, mental: 1 },
type: "neutral",
weight: 6,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友在你困难时犹豫是否帮忙",
effect: { classmateB: -3, stress: 4 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友在你求助时找借口推脱",
effect: { classmateB: -4, stress: 5 },
type: "bad",
weight: 4,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友在你成功时表现出嫉妒",
effect: { classmateB: -3, stress: 3, mental: -1 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友在你失败时表现出轻视",
effect: { classmateB: -4, stress: 5, mental: -1 },
type: "bad",
weight: 4,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友在你面前炫耀成绩",
effect: { classmateB: -2, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友在你面前贬低你的努力",
effect: { classmateB: -3, stress: 4, mental: -1 },
type: "bad",
weight: 5,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友在你面前传播你的谣言",
effect: { classmateB: -6, stress: 8, mental: -2 },
type: "bad",
weight: 3,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友在你背后说你的坏话",
effect: { classmateB: -5, stress: 6, mental: -1 },
type: "bad",
weight: 4,
condition: (s) => s.relationships.classmateB >= 35
},
{
text: "朋友在你不知情时利用你",
effect: { classmateB: -7, stress: 7, mental: -2 },
type: "bad",
weight: 3,
condition: (s) => s.relationships.classmateB >= 45
},
{
text: "朋友在你信任时背叛你",
effect: { classmateB: -8, stress: 10, mental: -3 },
type: "bad",
weight: 2,
condition: (s) => s.relationships.classmateB >= 50
},
{
text: "朋友主动找你谈心,化解误会",
effect: { classmateB: 5, stress: -5, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 20
},
{
text: "朋友写信向你道歉,情真意切",
effect: { classmateB: 6, stress: -6, mental: 1 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友送你亲手做的礼物表示歉意",
effect: { classmateB: 5, stress: -4 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友在你生日时主动和好",
effect: { classmateB: 7, stress: -7 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateB >= 15
},
{
text: "朋友在你困难时伸出援手,关系修复",
effect: { classmateB: 6, stress: -5, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 20
},
{
text: "朋友在你成功时真心祝贺,冰释前嫌",
effect: { classmateB: 5, stress: -4 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友在你失败时安慰你,重归于好",
effect: { classmateB: 5, stress: -6, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 20
},
{
text: "朋友在你被批评时为你说话,关系缓和",
effect: { classmateB: 4, stress: -3 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateB >= 25
},
{
text: "朋友在你被孤立时接近你,友谊重建",
effect: { classmateB: 6, stress: -5, mental: 1 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateB >= 15
},
{
text: "朋友在你被欺负时保护你,友谊加深",
effect: { classmateB: 7, stress: -6, mental: 2 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateB >= 30
},
{
text: "朋友在你最需要时出现,成为知己",
effect: { classmateB: 8, stress: -8, mental: 3 },
type: "good",
weight: 2,
condition: (s) => s.relationships.classmateB >= 55
},
{
text: "朋友在你迷茫时指引你,成为导师",
effect: { classmateB: 6, stress: -5, mental: 2 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateB >= 50
},
{
text: "朋友在你跌倒时扶起你,成为依靠",
effect: { classmateB: 7, stress: -7, mental: 2 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateB >= 55
},
{
text: "朋友在你成功时为你骄傲,成为见证者",
effect: { classmateB: 5, stress: -4, energy: 3 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateB >= 45
},
{
text: "朋友在你失败时陪你振作,成为支撑",
effect: { classmateB: 6, stress: -6, mental: 2 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateB >= 50
},
{
text: "朋友在你孤独时陪伴你,成为温暖",
effect: { classmateB: 5, stress: -5, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友在你焦虑时安抚你,成为镇定剂",
effect: { classmateB: 5, stress: -7, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 45
},
{
text: "朋友在你恐惧时鼓励你,成为勇气",
effect: { classmateB: 5, stress: -6, mental: 2 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateB >= 40
},
{
text: "朋友在你绝望时拉你一把,成为希望",
effect: { classmateB: 7, stress: -8, mental: 3 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateB >= 50
},
{
text: "朋友在你迷茫时点亮灯塔,成为方向",
effect: { classmateB: 6, stress: -5, mental: 2 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateB >= 45
},
{
text: "朋友在你成功时为你骄傲,成为见证者",
effect: { classmateA: 5, stress: -4, energy: 3 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 45
},
{
text: "朋友在你失败时陪你振作,成为支撑",
effect: { classmateA: 6, stress: -6, mental: 2 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 50
},
{
text: "朋友在你孤独时陪伴你,成为温暖",
effect: { classmateA: 5, stress: -5, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友在你焦虑时安抚你,成为镇定剂",
effect: { classmateA: 5, stress: -7, mental: 1 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 45
},
{
text: "朋友在你恐惧时鼓励你,成为勇气",
effect: { classmateA: 5, stress: -6, mental: 2 },
type: "good",
weight: 5,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "朋友在你绝望时拉你一把,成为希望",
effect: { classmateA: 7, stress: -8, mental: 3 },
type: "good",
weight: 3,
condition: (s) => s.relationships.classmateA >= 50
},
{
text: "朋友在你迷茫时点亮灯塔,成为方向",
effect: { classmateA: 6, stress: -5, mental: 2 },
type: "good",
weight: 4,
condition: (s) => s.relationships.classmateA >= 45
},
{
text: "父母看到你的成绩单,叹了口气没说话",
effect: { stress: 5, parents: -3 },
type: "bad",
weight: 8,
condition: (s) => s.relationships.parents >= 30
},
{
text: "妈妈给你炖了鸡汤,说'别太累了'",
effect: { energy: 5, stress: -5, parents: 3 },
type: "good",
weight: 10,
condition: (s) => true
},
{
text: "爸爸突然问起OI的事,你沉默了",
effect: { stress: 8 },
type: "bad",
weight: 6,
condition: (s) => s.memoryCount >= 1
},
{
text: "暗恋的同学问你一道数学题,你轻松解答",
effect: { crush: 5, math: 1 },
type: "good",
weight: 7,
condition: (s) => s.subjects.math >= 30
},
{
text: "暗恋的请你一起出去玩,你同意了。",
effect: { crush: 5, math: 1 },
type: "good",
weight: 7,
condition: (s) => s.relationships.crush >= 25
},
{
text: "同学邀请你一起打篮球,但你拒绝了",
effect: { classmateA: -2, stress: 2 },
type: "bad",
weight: 6,
condition: (s) => s.relationships.classmateA >= 40
},
{
text: "和同学讨论题目,发现大家都很努力",
effect: { classmateA: 3, stress: -3 },
type: "good",
weight: 9,
condition: (s) => true
},
{
text: "老师在办公室表扬你进步明显",
effect: { teacher: 5, stress: -5 },
type: "good",
weight: 8,
condition: (s) => s.week >= 4
},
{
text: "班主任找你谈话,提醒你注意偏科",
effect: { stress: 3, teacher: 2 },
type: "neutral",
weight: 7,
condition: (s) => true
},
{
text: "英语老师送你一本单词书",
effect: { english: 2, englishTeacher: 5 },
type: "good",
weight: 6,
condition: (s) => s.relationships.englishTeacher >= 40
},
{
text: "数学老师批评你作业不认真",
effect: { math: -1, mathTeacher: -3, stress: 3 },
type: "bad",
weight: 7,
condition: (s) => s.subjects.math >= 20
}
],
health: [
{
text: "连续熬夜,今天上课打瞌睡被批评",
effect: { energy: -10, stress: 5, health: -3 },
type: "bad",
weight: 8,
condition: (s) => s.energy < 40
},
{
text: "坚持晨跑,感觉精神焕发",
effect: { energy: 8, health: 2, stress: -5 },
type: "good",
weight: 9,
condition: (s) => s.health >= 60
},
{
text: "压力太大,晚上失眠了",
effect: { energy: -8, stress: 8 },
type: "bad",
weight: 7,
condition: (s) => s.stress > 50
},
{
text: "听了一首喜欢的歌,心情变好了",
effect: { stress: -8 },
type: "good",
weight: 8,
condition: (s) => true
},
{
text: "感冒了,学习效率下降",
effect: { health: -5, energy: -10, stress: 3 },
type: "bad",
weight: 6,
condition: (s) => s.health >= 50
},
{
text: "坚持做眼保健操,视力保护",
effect: { health: 2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "食堂饭菜不合胃口,只吃了半碗",
effect: { energy: -5, health: -2 },
type: "bad",
weight: 6,
condition: (s) => true
},
{
text: "周末睡了个懒觉,感觉恢复了",
effect: { energy: 15, stress: -5 },
type: "good",
weight: 9,
condition: (s) => s.dayOfWeek === 6
},
{
text: "运动时扭伤了脚,休息两天",
effect: { health: -8, energy: -5 },
type: "bad",
weight: 4,
condition: (s) => s.health >= 70
},
{
text: "心理咨询老师主动找你聊天",
effect: { mental: 5, stress: -8 },
type: "good",
weight: 5,
condition: (s) => s.mental < 60
}
],
memory: [
{
text: "翻出以前的获奖证书,恍如隔世",
effect: { stress: 5 },
type: "neutral",
weight: 7,
condition: (s) => s.memoryCount >= 1
},
{
text: "收到OI群的消息,有人进了省队",
effect: { stress: 10 },
type: "bad",
weight: 6,
condition: (s) => s.memoryCount >= 2
},
{
text: "想起集训时的日子,嘴角上扬",
effect: { stress: -5, energy: 3 },
type: "good",
weight: 8,
condition: (s) => s.memoryCount >= 1
},
{
text: "看到编程题,手痒想写代码",
effect: { stress: 3 },
type: "neutral",
weight: 5,
condition: (s) => s.memoryCount >= 1
},
{
text: "以前队友发来问候,感慨万千",
effect: { stress: -3, mental: 2 },
type: "good",
weight: 6,
condition: (s) => s.memoryCount >= 2
},
{
text: "路过机房,想起曾经的时光",
effect: { stress: 5 },
type: "neutral",
weight: 5,
condition: (s) => s.memoryCount >= 1
},
{
text: "梦见自己还在比赛,惊醒",
effect: { energy: -5, stress: 5 },
type: "bad",
weight: 4,
condition: (s) => s.memoryCount >= 3
},
{
text: "整理旧书,发现竞赛笔记",
effect: { mental: 3 },
type: "neutral",
weight: 5,
condition: (s) => true
},
{
text: "听说以前教练退休了",
effect: { stress: 2 },
type: "neutral",
weight: 4,
condition: (s) => true
},
{
text: "想起第一次获奖的兴奋",
effect: { stress: -5, energy: 5 },
type: "good",
weight: 6,
condition: (s) => true
}
],
economy: [
{
text: "父母给了额外的零花钱",
effect: { money: 100, parents: 2 },
type: "good",
weight: 8,
condition: (s) => true
},
{
text: "买了新参考书,花掉200元",
effect: { money: -200 },
type: "neutral",
weight: 7,
condition: (s) => s.money >= 200
},
{
text: "发现书店打折,买了几本",
effect: { money: -150, chinese: 1, math: 1 },
type: "good",
weight: 5,
condition: (s) => s.money >= 150
},
{
text: "帮同学补课,赚了100元",
effect: { money: 100, stress: 3 },
type: "good",
weight: 6,
condition: (s) => s.relationships.classmateA >= 50
},
{
text: "不小心丢了100元",
effect: { money: -100, stress: 5 },
type: "bad",
weight: 4,
condition: (s) => s.money >= 100
},
{
text: "网上买了网课,花费300元",
effect: { money: -300 },
type: "neutral",
weight: 5,
condition: (s) => s.money >= 300
},
{
text: "父母问起钱的用途,解释清楚",
effect: { parents: 3 },
type: "good",
weight: 6,
condition: (s) => s.relationships.parents >= 40
},
{ text: "发现免费的学习资源网站", effect: { energy: 5 }, type: "good", weight: 5, condition: (s) => true },
{
text: "同学借钱,不好意思拒绝",
effect: { money: -50, stress: 2 },
type: "bad",
weight: 4,
condition: (s) => s.money >= 50
},
{
text: "获得奖学金200元",
effect: { money: 200, teacher: 5 },
type: "good",
weight: 3,
condition: (s) => s.week >= 8
}
],
special: [
{
text: "学校组织励志讲座,很受鼓舞",
effect: { stress: -10, energy: 5 },
type: "good",
weight: 7,
condition: (s) => true
},
{
text: "月考临近,图书馆一座难求",
effect: { stress: 5 },
type: "neutral",
weight: 8,
condition: (s) => s.week >= 4
},
{
text: "食堂阿姨多给了块肉,小确幸",
effect: { stress: -3 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "下雨天没带伞,淋湿了",
effect: {
health: -3,
stress: 5
},
type: "bad",
weight: 5,
condition: (s) => true
},
{
text: "收到学长学姐的鼓励信",
effect: {
stress: -8,
energy: 5
},
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "班级群里有人发搞笑段子,笑出声",
effect: { stress: -5 },
type: "good",
weight: 7,
condition: (s) => true
},
{
text: "突然断电,自习中断",
effect: { stress: 3 },
type: "neutral",
weight: 4,
condition: (s) => true
},
{
text: "发现教室新换了智能黑板",
effect: { energy: 2 },
type: "good",
weight: 3,
condition: (s) => true
},
{
text: "学校组织体检,一切正常",
effect: { health: 2 },
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "听到隔壁班吵架,心情烦躁",
effect: { stress: 3 },
type: "bad",
weight: 4,
condition: (s) => true
},
{
text: "发现一个安静的天台,适合背书",
effect: {
energy: 3,
stress: -2
},
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学校组织春游,可以放松",
effect: {
stress: -15,
energy: 5
},
type: "good",
weight: 3,
condition: (s) => s.week <= 13
},
{
text: "班主任生病,代课老师很严格",
effect: { stress: 5 },
type: "bad",
weight: 4,
condition: (s) => s.relationships.teacher >= 50
},
{
text: "发现学校新开了咖啡厅",
effect: { stress: -3 },
type: "good",
weight: 3,
condition: (s) => true
},
{
text: "听到广播放喜欢的歌",
effect: { stress: -5 },
type: "good",
weight: 6,
condition: (s) => true
},
{
text: "学校电路老化,经常跳闸",
effect: { stress: 3 },
type: "bad",
weight: 3,
condition: (s) => true
},
{
text: "发现图书馆新进了好书",
effect: { energy: 5 },
type: "good",
weight: 4,
condition: (s) => true
},
{
text: "学校组织消防演练,浪费时间",
effect: { stress: 2 },
type: "neutral",
weight: 4,
condition: (s) => true
},
{
text: "发现一个超棒的学习博主",
effect: {
energy: 3,
stress: -3
},
type: "good",
weight: 5,
condition: (s) => true
},
{
text: "学校要求统一穿校服,很丑",
effect: { stress: 2 },
type: "neutral",
weight: 3,
condition: (s) => true
},
{
text: "发现教室空调可以自己调节",
effect: { energy: 2 },
type: "good",
weight: 3,
condition: (s) => true
}
]
};
// 故事线事件(15+事件)
//const storyEvents = [
// {
// id: 1,
// week: 1,
// day: 0, // 周一
// title: "AFO第一天",
// content: "你站在教室门口,深吸一口气。曾经的OI队友在隔壁班,听说他还在坚持竞赛。你握紧书包带,走进了新班级。",
// choices: [
// { text: "找个角落坐下,低调开始", effect: { stress: 5 }, next: 2 },
// { text: "主动和同桌打招呼", effect: { classmateA: 5, stress: -3 }, next: 2 }
// ]
// },
// {
// id: 2,
// week: 2,
// day: 2,
// title: "第一次作业",
// content: "数学老师布置了20道题,你发现大部分都是竞赛难度。你熬夜到凌晨,终于完成。",
// choices: [
// { text: "按时交作业,展示实力", effect: { math: 2, mathTeacher: 5, energy: -10 }, next: 3 },
// { text: "只做一半,保留实力", effect: { stress: 3 }, next: 3 }
// ]
// },
// {
// id: 3,
// week: 3,
// day: 4,
// title: "父母的期望",
// content: "父亲在饭桌上说:'听说XXX家的孩子这次考了班级第一,你以前搞竞赛,现在不能落后啊。'你握着筷子的手紧了紧。",
// choices: [
// { text: "沉默不语,默默承受", effect: { stress: 8, parents: -2 }, next: 4 },
// { text: "解释说需要时间适应", effect: { parents: 2, stress: -2 }, next: 4 },
// { text: "发脾气说'你们懂什么!'", effect: { parents: -10, stress: 10 }, next: 4 }
// ]
// },
// {
// id: 4,
// week: 4,
// day: 1,
// title: "旧友重逢",
// content: "在走廊遇到以前集训的队友。他问:'怎么退竞了?'你不知如何回答。他拍拍你的肩:'文化课也不容易,加油。'",
// choices: [
// { text: "感到失落,怀疑选择", effect: { stress: 10 }, next: 5 },
// { text: "释然一笑,各自有路", effect: { stress: -3 }, next: 5 },
// { text: "暗下决心,要证明自己", effect: { energy: 5, stress: 5 }, next: 5 }
// ]
// },
// {
// id: 5,
// week: 5,
// day: 3,
// title: "暗恋的悸动",
// content: "她转过头问你物理题,发梢的香味让你心跳加速。你发现她也在努力学习,笔记本上密密麻麻。原来大家都在为未来拼命。",
// choices: [
// { text: "认真讲题,展示实力", effect: { crush: 7, physics: 1 }, next: 6 },
// { text: "紧张结巴,发挥失常", effect: { crush: -5, stress: 3 }, next: 6 },
// { text: "讲完后邀请一起学习", effect: { crush: 12, stress: -10 }, next: 6 }
// ]
// },
// {
// id: 6,
// week: 8,
// day: 4,
// title: "第一次月考",
// content: "成绩出来了,你进步了15名。老师在全班面前表扬你:'XXX同学从竞赛转文化课,适应得很快。'你看到父母眼中的欣慰。",
// choices: [
// { text: "继续保持,冲击前10", effect: { energy: 5, stress: -5, teacher: 5 }, next: 7 },
// { text: "松懈下来,想休息几天", effect: { energy: 10, stress: -10 }, next: 7 },
// { text: "感到迷茫,不知道意义何在", effect: { stress: 8 }, next: 7 }
// ]
// },
// {
// id: 7,
// week: 12,
// day: 6,
// title: "深夜的对话",
// content: "母亲深夜端来牛奶:'其实我们不求你考多好,只希望你别后悔。'你第一次和父母聊起竞赛的日子,聊起那些熬夜刷题的时光。",
// choices: [
// { text: "感动落泪,压力释放", effect: { parents: 10, stress: -15 }, next: 8 },
// { text: "表面平静,内心温暖", effect: { parents: 5, stress: -8 }, next: 8 },
// { text: "觉得唠叨,不耐烦", effect: { parents: -5, stress: 3 }, next: 8 }
// ]
// },
// {
// id: 8,
// week: 16,
// day: 2,
// title: "回响",
// content: "收到曾经OI教练的邮件:'听说你转文化课了,无论选择什么,都要像解题一样,找到最优解。'你突然明白,竞赛教会你的不只是算法,更是思维方式。",
// choices: [
// { text: "重拾信心,应用算法思维", effect: { math: 3, physics: 2, stress: -5 }, next: 9 },
// { text: "感到遗憾,回不去了", effect: { stress: 8 }, next: 9 },
// { text: "释然,感谢那段经历", effect: { stress: -8, energy: 5 }, next: 9 }
// ]
// },
// {
// id: 9,
// week: 20,
// day: 1,
// title: "回应",
// content: "她递来一张纸条:'谢谢你一直帮我...。我们一起努力,考同一所大学吧!'",
// choices: [
// { text: "开心接受,动力满满", effect: { crush: 15, stress: -10, energy: 30 }, next: 10 },
// { text: "紧张不知所措", effect: { stress: 10 }, next: 10 },
// { text: "拒绝,说要专心学习", effect: { crush: -10, stress: 5 }, next: 10 }
// ]
// },
// {
// id: 10,
// week: 24,
// day: 3,
// title: "寒假前夜",
// content: "期末考试结束,你考进了班级前10。寒假来临,但你知道,真正的冲刺才刚刚开始。",
// choices: [
// { text: "制定寒假计划,全力冲刺", effect: { energy: 5, stress: -5 }, next: 11 },
// { text: "先放松几天,再学习", effect: { energy: 10, stress: -10 }, next: 11 },
// { text: "感到疲惫,想放弃", effect: { stress: 10 }, next: 11 }
// ]
// },
// {
// id: 11,
// week: 30,
// day: 5,
// title: "春节的感悟",
// content: "亲戚们问起你的成绩,父母骄傲地说:'进步很大!'你突然意识到,自己的努力不仅是为了自己,也为了不辜负他们的期望。",
// choices: [
// { text: "感到责任重大", effect: { parents: 5, stress: 5 }, next: 12 },
// { text: "感到温暖和支持", effect: { parents: 8, stress: -5 }, next: 12 },
// { text: "感到压力倍增", effect: { stress: 10 }, next: 12 }
// ]
// },
// {
// id: 12,
// week: 35,
// day: 2,
// title: "倒计时100天",
// content: "黑板上的数字变成100。教室里弥漫着紧张的气氛,但你感到一种奇怪的平静。两年竞赛,一年WHK,你已经准备好了。",
// choices: [
// { text: "充满信心,迎接挑战", effect: { stress: 10, energy: 20 }, next: 13 },
// { text: "按部就班,保持节奏", effect: { stress: 5 }, next: 13 },
// { text: "紧张不安,难以入眠", effect: { stress: 10, energy: -5 }, next: 13 }
// ]
// },
// {
// id: 13,
// week: 40,
// day: 4,
// title: "最后的冲刺",
// content: "五一假期,你拒绝了所有邀约,每天学习12小时。虽然辛苦,但你知道,这是最后的冲刺。",
// choices: [
// { text: "坚持到底,不放弃", effect: { energy: -10, stress: 5, subjects: { all: 2 } }, next: 14 },
// { text: "适当休息,劳逸结合", effect: { energy: 5, stress: -5 }, next: 14 },
// { text: "感到崩溃,想放弃", effect: { stress: 15, energy: -15 }, next: 14 }
// ]
// },
// {
// id: 14,
// week: 45,
// day: 1,
// title: "最后的告别",
// content: "高考前60天,你整理书桌,翻出那张合影。照片背面写着:'To be continued...'你笑了笑,把它收进抽屉。是的,故事还在继续。",
// choices: [
// { text: "充满期待,迎接挑战", effect: { stress: -10, energy: 10 }, next: 15 },
// { text: "平静接受,顺其自然", effect: { stress: -5 }, next: 15 },
// { text: "紧张不安,难以入眠", effect: { stress: 10, energy: -5 }, next: 15 }
// ]
// },
// {
// id: 15,
// week: 50,
// day: 6,
// title: "高考前夜",
// content: "你躺在床上,回想这一年。从迷茫到坚定,从失落到希望。无论结果如何,你都已经成长。马上就是检验的时刻。",
// choices: [
// { text: "充满信心,安然入睡", effect: { stress: -10, energy: 5 }, next: 16 },
// { text: "平静接受,顺其自然", effect: { stress: -5 }, next: 16 },
// { text: "紧张复习,最后冲刺", effect: { energy: -10, stress: 10 }, next: 16 }
// ]
// },
// {
// id: 16,
// week: 51,
// day: 6,
// title: "承诺",
// content: "她找到你:'高考加油!我们......'",
// choices: [
// { text: "相约考后,共赴山海", effect: { stress: 5, energy: 5, crush: 10 }, next: null },
// { text: "默默点头,转身离去", effect: { stress: 10, energy: 5, crush: 5 }, next: null },
// { text: "心乱如麻,无言以对", effect: { energy: -10, stress: 10, crush: -2 }, next: null }
// ]
// },
//];
const storyEvents = [
{
id: 1,
week: 1,
day: 0,
title: "AFO第一天",
content: "你站在教室门口,深吸一口气。曾经的OI队友在隔壁班,听说他还在坚持竞赛。你握紧书包带,走进了新班级。",
choices: [
{ text: "找个角落坐下,低调开始", effect: { stress: 0.5 }, next: 2 },
{ text: "主动和同桌打招呼", effect: { classmateA: 5, stress: -3 }, next: 2 }
]
},
{
id: 2,
week: 2,
day: 2,
title: "作业",
content:
"数学老师布置了20道题,你发现大部分都是竞赛难度。你熬夜到凌晨,终于完成。",
choices: [
{ text: "按时交作业,展示实力", effect: { math: 2, mathTeacher: 5, energy: -10, stress: 0.5 }, next: 3 },
{ text: "只做一半,保留实力", effect: { stress: 3, mathTeacher: -5 }, next: 3 }
]
},
{
id: 3,
week: 3,
day: 2,
title: "化学课",
content: "化学老师走进教室,你惊讶地发现他竟是曾经带过竞赛集训的助教。他看到你时眼神微微一亮,却没有特别表示。下课时,他在你桌边停顿了一下。",
choices: [
{ text: "主动上前相认", effect: { chemistryTeacher: 5, stress: -3 }, next: 4 },
{ text: "低头装作没看见", effect: { stress: 2, chemistryTeacher: -5 }, next: 4 },
{ text: "课后去办公室找他", effect: { chemistryTeacher: 5, stress: 5 }, next: 4 }
]
},
{
id: 4,
week: 3,
day: 4,
title: "父母的期望",
content: "父亲在饭桌上说:'听说XXX家的孩子这次考了班级第一,你以前搞竞赛,现在不能落后啊。'你握着筷子的手紧了紧。",
choices: [
{ text: "沉默不语,默默承受", effect: { stress: 8, parents: -2 }, next: 5 },
{ text: "解释说需要时间适应", effect: { parents: 2, stress: 2 }, next: 5 },
{ text: "发脾气说'你们懂什么!'", effect: { parents: -10, stress: 10, health: -5 }, next: 5 }
]
},
{
id: 5,
week: 4,
day: 1,
title: "旧友重逢",
content: "在走廊遇到以前集训的队友。他问:'怎么退竞了?'你不知如何回答。他拍拍你的肩:'文化课也不容易,加油。'",
choices: [
{ text: "感到失落,怀疑选择", effect: { stress: 10 }, next: 6 },
{ text: "释然一笑,各自有路", effect: { stress: -3 }, next: 6 },
{ text: "暗下决心,要证明自己", effect: { energy: 5, stress: 5 }, next: 6 }
]
},
{
id: 6,
week: 5,
day: 3,
title: "暗恋的悸动",
content: "她转过头问你物理题,发梢的香味让你心跳加速。你发现她也在努力学习,笔记本上密密麻麻。原来大家都在为未来拼命。",
choices: [
{ text: "认真讲题,展示实力", effect: { crush: 7, physics: 1 }, next: 7 },
{ text: "紧张结巴,发挥失常", effect: { crush: -5, stress: 3 }, next: 7 },
{ text: "讲完后邀请一起学习", effect: { crush: 12, stress: -10, subjects: { all: 2 } }, next: 7 }
]
},
{
id: 7,
week: 6,
day: 3,
title: "模式的碰撞",
content: "物理课讲到一个复杂模型,你下意识地用竞赛的思维去拆解,很快找到了关键。但解题步骤却和标准答案大相径庭。老师看着你的草稿纸,若有所思。",
choices: [
{ text: "向老师解释你的思路", effect: { physicsTeacher: 5, stress: -2, physics: 1 }, next: 8 },
{ text: "默默擦掉,按课本方法重做", effect: { stress: 3 }, next: 8 },
{ text: "课后和同学讨论你的方法", effect: { classmateA: 3, physics: 2 }, next: 8 }
]
},
{
id: 8,
week: 7,
day: 5,
title: "周末的图书馆",
content: "你选择去图书馆自习,却偶遇了也在那里的她。你们默契地坐到了角落的同一张桌子,整整一个下午,只有翻书声和偶尔低声的讨论。",
choices: [
{ text: "专注学习,偶尔交流", effect: { crush: 3, subjects: { all: 1 }, stress: 5 }, next: 9 },
{ text: "分心关注她,效率降低", effect: { crush: 5, energy: -5 }, next: 9 },
{ text: "提前离开,避免紧张", effect: { stress: -3, crush: -5 }, next: 9 }
]
},
{
id: 9,
week: 8,
day: 4,
title: "第一次月考",
content: "成绩出来了,你进步了许多。老师在全班面前表扬你:'XXX同学从竞赛转文化课,适应得很快。'你看到父母眼中的欣慰。",
choices: [
{ text: "继续保持,冲击更高分数", effect: { energy: 5, stress: -5, teacher: 5 }, next: 10 },
{ text: "松懈下来,想休息几天", effect: { energy: 10, stress: -10 }, next: 10 },
{ text: "感到迷茫,不知道意义何在", effect: { stress: 8 }, next: 10 }
]
},
{
id: 10,
week: 9,
day: 1,
title: "班委竞选",
content: "班主任建议你竞选学习委员,说你的竞赛经历能帮助同学。你犹豫了,这会不会占用太多学习时间?",
choices: [
{ text: "接受挑战,参加竞选", effect: { teacher: 5, classmateA: 3, classmateB: 3, stress: 5, energy: -10 }, next: 11 },
{ text: "婉拒,说明要专注学习", effect: { stress: -3, teacher: -2 }, next: 11 },
{ text: "折中,只做科代表", effect: { teacher: 2, stress: 2 }, next: 11 }
]
},
{
id: 11,
week: 10,
day: 5,
title: "意外的盟友",
content: "放学时下雨了,你没带伞。那个总在埋头刷题的'卷王'同桌默默把伞往你这边挪了挪。'一起走吧,顺便问你上午那道题的另一种解法。'",
choices: [
{ text: "感激接受,路上热烈讨论", effect: { classmateA: 8, stress: -5, math: 1 }, next: 12 },
{ text: "婉拒,说想自己静静", effect: { stress: 2, energy: 5, health: -5 }, next: 12 },
{ text: "接受,但一路沉默", effect: { classmateA: -2, stress: 5 }, next: 12 }
]
},
{
id: 12,
week: 11,
day: 4,
title: "物理竞赛题",
content: "物理老师上课时讲到了一道改编自竞赛的题目,全班只有你和另一名同学举手表示会做。老师让你们各自上台讲解。",
choices: [
{ text: "用简洁的竞赛思路讲解", effect: { teacher: 1, physics: 2, stress: -3 }, next: 13 },
{ text: "按常规课本方法讲解", effect: { stress: -2 }, next: 13 },
{ text: "谦让,让同学先讲", effect: { classmateA: 3, teacher: 1 }, next: 13 }
]
},
{
id: 13,
week: 12,
day: 6,
title: "深夜的对话",
content: "母亲深夜端来牛奶:'其实我们不求你考多好,只希望你别后悔。'你第一次和父母聊起竞赛的日子,聊起那些熬夜刷题的时光。",
choices: [
{ text: "感动落泪,压力释放", effect: { parents: 10, stress: -15 }, next: 14 },
{ text: "表面平静,内心温暖", effect: { parents: 5, stress: -8 }, next: 14 },
{ text: "觉得唠叨,不耐烦", effect: { parents: -5, stress: 3 }, next: 14 }
]
},
{
id: 14,
week: 13,
day: 0,
title: "母亲的早餐",
content: "连续一周,你发现早餐盒里多了张便签。今天写着:'记得吃鸡蛋,补充蛋白质。别太拼,身体要紧。'字迹是母亲的。",
choices: [
{ text: "给母亲发短信感谢", effect: { parents: 5, stress: -5 }, next: 15 },
{ text: "把便签小心收起来", effect: { parents: 3, stress: -3 }, next: 15 },
{ text: "觉得难为情,扔掉便签", effect: { stress: 2 }, next: 15 }
]
},
{
id: 15,
week: 14,
day: 0,
title: "瓶颈期",
content: "最近几次周测成绩像卡住了一样,不进不退。你看着那些反复出错的题型,第一次对'努力就有回报'产生了怀疑。深夜,台灯的光显得格外刺眼。",
choices: [
{ text: "更疯狂刷题,突破瓶颈", effect: { energy: -15, stress: 10, math: 1 }, next: 16 },
{ text: "停下来,重新分析错题本", effect: { stress: -3, subjects: { all: 1 } }, next: 16 },
{ text: "暂时放下,去操场跑步", effect: { energy: 10, stress: -8 }, next: 16 }
]
},
{
id: 16,
week: 15,
day: 3,
title: "同桌的求助",
content: "'卷王'同桌罕见地找你求助:'这道数学压轴题,你的解法比我简洁多了,能教我吗?'你们花了整个午休时间一起钻研。",
choices: [
{ text: "耐心讲解,分享思路", effect: { classmateA: 8, math: 1, stress: -3 }, next: 17 },
{ text: "匆匆讲完,继续刷题", effect: { classmateA: 2 }, next: 17 },
{ text: "借此机会讨论更多难题", effect: { classmateA: 5, math: 2, energy: -5 }, next: 17 }
]
},
{
id: 17,
week: 16,
day: 2,
title: "回响",
content: "收到曾经OI教练的邮件:'听说你转文化课了,无论选择什么,都要像解题一样,找到最优解。'你突然明白,竞赛教会你的不只是算法,更是思维方式。",
choices: [
{ text: "重拾信心,应用算法思维", effect: { math: 3, physics: 2, stress: -5 }, next: 18 },
{ text: "感到遗憾,回不去了", effect: { stress: 8 }, next: 18 },
{ text: "释然,感谢那段经历", effect: { stress: -8, energy: 5 }, next: 18 }
]
},
{
id: 18,
week: 17,
day: 6,
title: "周日的篮球场",
content: "父亲难得休息,问你要不要去打球。你已经很久没摸篮球了,上一次还是竞赛集训前。",
choices: [
{ text: "放下书本,去打一场", effect: { parents: 5, energy: 10, stress: -8 }, next: 19 },
{ text: "拒绝,说作业太多", effect: { parents: -2, stress: 3 }, next: 19 },
{ text: "折中,只打半小时", effect: { parents: 3, energy: 5, stress: -3 }, next: 19 }
]
},
{
id: 19,
week: 18,
day: 4,
title: "父亲的书房",
content: "你找资料时,无意看到父亲抽屉里一个旧笔记本。里面竟记录着他年轻时自学无线电的电路图,还有一行小字:'给未来的儿子:找到你的频率。'",
choices: [
{ text: "深受触动,与父亲深夜长谈", effect: { parents: 5, stress: -10, energy: 5 }, next: 20 },
{ text: "默默放回,但内心泛起波澜", effect: { parents: 2, stress: -5 }, next: 20 },
{ text: "觉得无关,继续自己的焦虑", effect: { stress: 10 }, next: 20 }
]
},
{
id: 20,
week: 19,
day: 2,
title: "英语演讲",
content: "英语课要求每人做三分钟演讲。你选择了'算法与人生'这个题目,用计算机术语比喻学习过程。讲完后,同学们若有所思。",
choices: [
{ text: "感到自信,收获掌声", effect: { english: 2, stress: -5, teacher: 3 }, next: 21 },
{ text: "紧张过度,发挥不佳", effect: { stress: 5 }, next: 21 },
{ text: "平淡完成,但内心满足", effect: { stress: -3 }, next: 21 }
]
},
{
id: 21,
week: 20,
day: 1,
title: "回应",
content: "她递来一张纸条:'谢谢你一直帮我...。我们一起努力,考同一所大学吧!'",
choices: [
{ text: "开心接受,动力满满", effect: { crush: 15, stress: -10, energy: 30 }, next: 22 },
{ text: "紧张不知所措", effect: { stress: 10 }, next: 22 },
{ text: "拒绝,说要专心学习", effect: { crush: -20, stress: 5 }, next: 22 }
]
},
{
id: 22,
week: 21,
day: 5,
title: "晚自习的停电",
content: "晚自习时突然停电,教室陷入黑暗和短暂的骚动。有人打开了手机手电筒,微光中,你看到她正就着光继续看书。",
choices: [
{ text: "也打开手机,继续学习", effect: { crush: 1, stress: -2 }, next: 23 },
{ text: "提议大家休息聊天", effect: { classmateA: 5, stress: -8 }, next: 23 },
{ text: "默默看着窗外,思考", effect: { stress: -5 }, next: 23 }
]
},
{
id: 23,
week: 22,
day: 2,
title: "她的生日",
content: "你听说今天是她的生日。犹豫再三,你在她常问问题的那本物理习题集扉页,用铅笔轻轻写下'Happy Birthday'。",
choices: [
{ text: "鼓起勇气,当面送给她并祝她生日快乐", effect: { crush: 5, stress: 5 }, next: 24 },
{ text: "趁她不注意,悄悄放回她书桌", effect: { crush: 2, stress: -2 }, next: 24 },
{ text: "最终擦掉,没有行动", effect: { stress: 3, crush: -5 }, next: 24 }
]
},
{
id: 24,
week: 23,
day: 1,
title: "模拟志愿填报",
content: "学校组织模拟填报志愿。你看着那些曾经梦想的计算机强校,又看了看自己现在的成绩,在理想与现实间犹豫。",
choices: [
{ text: "坚持梦想,填报强校", effect: { energy: 10, stress: 8 }, next: 25 },
{ text: "务实选择,保证录取", effect: { stress: -5 }, next: 25 },
{ text: "征求老师和父母意见", effect: { parents: 3, teacher: 3, stress: -3 }, next: 25 }
]
},
{
id: 25,
week: 24,
day: 3,
title: "寒假前夜",
content: "期末考试结束,你考进了班级前10。寒假来临,但你知道,真正的冲刺才刚刚开始。",
choices: [
{ text: "制定寒假计划,全力冲刺", effect: { energy: 5, stress: -5 }, next: 26 },
{ text: "先放松几天,再学习", effect: { energy: 10, stress: -10 }, next: 26 },
{ text: "感到疲惫,想放弃", effect: { stress: 10 }, next: 26 }
]
},
{
id: 26,
week: 26,
day: 6,
title: "寒假自习室",
content: "你发现'卷王'同桌和几个同学组了个线上自习室,互相监督。她也在里面。犹豫了一下,你发送了加入申请。",
choices: [
{ text: "打开摄像头,沉浸学习", effect: { energy: 5, crush: 3, classmateA: 5 }, next: 27 },
{ text: "只开麦,偶尔讨论问题", effect: { stress: -3, subjects: { all: 1 } }, next: 27 },
{ text: "潜水中,感受氛围", effect: { stress: -5 }, next: 27 }
]
},
{
id: 27,
week: 30,
day: 5,
title: "感悟",
content: "亲戚们问起你的成绩,父母骄傲地说:'进步很大!'你突然意识到,自己的努力不仅是为了自己,也为了不辜负他们的期望。",
choices: [
{ text: "感到责任重大", effect: { parents: 5, stress: 5 }, next: 28 },
{ text: "感到温暖和支持", effect: { parents: 8, stress: -5 }, next: 28 },
{ text: "感到压力倍增", effect: { stress: 10 }, next: 28 }
]
},
{
id: 28,
week: 32,
day: 1,
title: "二模之后",
content: "第二次模拟考排名稳中有进,但离梦想学校还有距离。老师在分析试卷时说:'有些人的潜力,会在最后两个月才真正爆发。'你感觉他在看你。",
choices: [
{ text: "备受鼓舞,细化每日计划", effect: { energy: 10, teacher: 5, stress: 3 }, next: 29 },
{ text: "压力倍增,害怕辜负期望", effect: { stress: 10 }, next: 29 },
{ text: "平静分析,查漏补缺", effect: { stress: -2, subjects: { all: 1 } }, next: 29 }
]
},
{
id: 29,
week: 35,
day: 2,
title: "倒计时100天",
content: "黑板上的数字变成100。教室里弥漫着紧张的气氛,但你感到一种奇怪的平静。两年竞赛,一年WHK,你已经准备好了。",
choices: [
{ text: "充满信心,迎接挑战", effect: { stress: 10, energy: 20 }, next: 30 },
{ text: "按部就班,保持节奏", effect: { stress: 5 }, next: 30 },
{ text: "紧张不安,难以入眠", effect: { stress: 10, energy: -5 }, next: 30 }
]
},
{
id: 30,
week: 38,
day: 5,
title: "战友的约定",
content: "'卷王'同桌在放学后叫住你:'最后几十天了,比比看谁下次周考数学高?输了请喝奶茶。'你看到他眼里的认真,不只是玩笑。",
choices: [
{ text: "欣然应战,击掌为誓", effect: { classmateA: 10, energy: 8, stress: -3 }, next: 31 },
{ text: "苦笑说压力好大,但接受", effect: { stress: 5, classmateA: 5 }, next: 31 },
{ text: "拒绝,说不想分心", effect: { stress: -2, classmateA: -3 }, next: 31 }
]
},
{
id: 31,
week: 40,
day: 4,
title: "最后的冲刺",
content: "小假期,你拒绝了所有邀约,每天学习16小时。虽然辛苦,但你知道,这是最后的冲刺。",
choices: [
{ text: "坚持到底,不放弃", effect: { energy: -10, stress: 5, subjects: { all: 2 }, health: -5 }, next: 32 },
{ text: "适当休息,劳逸结合", effect: { energy: 5, stress: -5 }, next: 32 },
{ text: "感到崩溃,想放弃", effect: { stress: 15, energy: -15 }, next: 32 }
]
},
{
id: 32,
week: 42,
day: 0,
title: "一场重感冒",
content: "连日的疲劳积累,你终于病倒了。高烧时迷迷糊糊,想起以前竞赛前也总这样。母亲守在床边,用湿毛巾给你敷额头,就像小时候一样。",
choices: [
{ text: "愧疚又温暖,乖乖休息", effect: { parents: 8, energy: 15, stress: -10 }, next: 33 },
{ text: "心急如焚,想爬起来看书", effect: { energy: -10, stress: 10, parents: -2, health: -30 }, next: 33 },
{ text: "昏昏沉沉,只想睡觉", effect: { energy: 20, stress: -5 }, next: 33 }
]
},
{
id: 33,
week: 45,
day: 1,
title: "最后的告别",
content: "高考前60天,你整理书桌,翻出那张合影。照片背面写着:'To be continued...'你笑了笑,把它收进抽屉。是的,故事还在继续。",
choices: [
{ text: "充满期待,迎接挑战", effect: { stress: -10, energy: 10 }, next: 34 },
{ text: "平静接受,顺其自然", effect: { stress: -5 }, next: 34 },
{ text: "紧张不安,难以入眠", effect: { stress: 10, energy: -5, health: -10 }, next: 34 }
]
},
{
id: 34,
week: 48,
day: 3,
title: "最后的答疑",
content: "放学后,你鼓起勇气向暗恋的她问了道一直没弄懂的语文古诗鉴赏题。她讲得很仔细,夕阳把两个人的影子拉得很长。讲完后,两人都沉默了一会儿。",
choices: [
{ text: "轻声说'谢谢,一起加油'", effect: { crush: 5, stress: -8, energy: 5 }, next: 35 },
{ text: "开玩笑缓解气氛'考完再谢你'", effect: { crush: 3, stress: -5 }, next: 35 },
{ text: "点点头,匆忙收拾书包离开", effect: { stress: 3, crush: -3 }, next: 35 }
]
},
{
id: 35,
week: 50,
day: 6,
title: "高考前夜",
content: "你躺在床上,回想这一年。从迷茫到坚定,从失落到希望。无论结果如何,你都已经成长。马上就是检验的时刻。",
choices: [
{ text: "充满信心,安然入睡", effect: { stress: -10, energy: 5 }, next: 36 },
{ text: "平静接受,顺其自然", effect: { stress: -5 }, next: 36 },
{ text: "紧张复习,最后冲刺", effect: { energy: -10, stress: 10 }, next: 36 }
]
},
{
id: 36,
week: 51,
day: 6,
title: "承诺",
content: "她找到你:'高考加油!我们......'",
choices: [
{ text: "相约考后,共赴山海", effect: { stress: 5, energy: 5, crush: 10 }, next: null },
{ text: "默默点头,转身离去", effect: { stress: 10, energy: 5, crush: 5 }, next: null },
{ text: "心乱如麻,无言以对", effect: { energy: -10, stress: 10, crush: -2 }, next: null }
]
},
];
// 隐藏剧情(特殊条件触发)
const hiddenEvents = [
{
id: 'h1',
condition: (state) => state.relationships.crush >= 60 && state.week >= 20,
title: "秘密基地",
content: "她带你来到学校天台,说这是她的秘密基地。你们靠在一起一起看夕阳,聊未来。这是你AFO后最放松的时刻。",
effect: { crush: 5, stress: -15, energy: 5 }
},
{
id: 'h2',
condition: (state) => state.memoryCount >= 5 && state.week >= 15,
title: "教练的电话",
content: "OI教练打来电话:'无论选择什么,都要做到最好,加油!'",
effect: { stress: -10, energy: 5, mental: 5 }
},
{
id: 'h3',
condition: (state) => state.relationships.parents >= 80 && state.week >= 10,
title: "父母的信",
content: "你在书包里发现父母写的一封信:'孩子,我们为你骄傲。不是因为成绩,而是因为你的坚持。'",
effect: { parents: 10, stress: -15, mental: 10 }
},
{
id: 'h4',
condition: (state) => state.subjects.math >= 90 && state.subjects.physics >= 90,
title: "数学竞赛邀请",
content: "数学老师邀请你参加一个数学竞赛,说:'虽然你AFO了,但你的天赋不该浪费。'",
choices: [
{ text: "参加比赛,证明自己", effect: { stress: 10, math: 3, teacher: 5 } },
{ text: "拒绝,专心高考", effect: { stress: -5, teacher: -2 } }
]
},
{
id: 'h5',
condition: (state) => state.week === 26 && state.season === 3,
title: "春节的礼物",
content: "春节,爷爷给你一个红包,说:'这是我这几个月攒下的,给你买复习资料。'你感动得说不出话。",
effect: { money: 1000, parents: 5, stress: -10 }
},
{
id: 'h6',
condition: (state) => state.week === 45 && state.subjects.math >= 90 && state.subjects.physics >= 90 && state.subjects.biology >= 90 && state.subjects.chemistry >= 90 && state.subjects.english <= 20 && state.subjects.chinese <= 20,
title: "开小灶",
content: "高考在即,但是你的语文和英语严重拖累了你的总分,学校决定给你的语文和英语开小灶",
effect: { chinese: 20, english: 20 }
}
];
// 成就系统(60个成就)
const achievements = {
// 基础成就
'first-week': { name: '第一周', desc: '完成第一周', hidden: false },
'first-month': { name: '第一个月', desc: '完成第一个月', hidden: false },
'study-100': { name: '书山有路', desc: '累计学习100小时', hidden: false },
'rest-50': { name: '劳逸结合', desc: '累计休息50小时', hidden: false },
'exercise-30': { name: '强身健体', desc: '累计锻炼30小时', hidden: false },
'social-20': { name: '社交达人', desc: '累计社交20小时', hidden: false },
// 状态成就
'energy-100': { name: '精力充沛', desc: '精力达到100', hidden: false },
'stress-0': { name: '零压力', desc: '压力降为0', hidden: false },
'health-100': { name: '身体健康', desc: '健康达到100', hidden: false },
'mental-100': { name: '心理强大', desc: '心理达到100', hidden: false },
'money-1000': { name: '小有积蓄', desc: '存款达到1000元', hidden: false },
'money-0': { name: '月光族', desc: '存款为0', hidden: false },
// 学科成就
'chinese-80': { name: '文采飞扬', desc: '语文达到80', hidden: false },
'math-90': { name: '数学大师', desc: '数学达到90', hidden: false },
'english-80': { name: '英语流利', desc: '英语达到80', hidden: false },
'physics-90': { name: '物理之神', desc: '物理达到90', hidden: false },
'chemistry-80': { name: '化学专家', desc: '化学达到80', hidden: false },
'biology-80': { name: '生物达人', desc: '生物达到80', hidden: false },
'all-85': { name: '全科高手', desc: '全科达到85', hidden: false },
'all-95': { name: '六边形战士', desc: '全科达到95', hidden: true },
// 关系成就
'teacher-90': { name: '班主任宠儿', desc: '班主任关系90', hidden: false },
'math-teacher-90': { name: '数学老师喜爱', desc: '数学老师关系90', hidden: false },
'parents-90': { name: '家庭和睦', desc: '父母关系90', hidden: false },
'crush-60': { name: '暗恋成功', desc: 'crush关系60', hidden: false },
'classmate-90': { name: '同学领袖', desc: '同学关系90', hidden: false },
// 活动成就
'exam-5': { name: '考试战士', desc: '参加5次模考', hidden: false },
'homework-100': { name: '作业达人', desc: '完成100次作业', hidden: false },
'activity-20': { name: '活动家', desc: '参加20次活动', hidden: false },
'memory-10': { name: '回忆大师', desc: '回忆10次', hidden: false },
// 特殊成就
'perfect-week': { name: '完美一周', desc: '一周无负面事件', hidden: false },
'stress-management': { name: '压力管理', desc: '压力低于10持续10周', hidden: false },
'early-bird': { name: '早起鸟', desc: '精力保持90+持续5周', hidden: false },
'night-owl': { name: '夜猫子', desc: '精力低于10', hidden: false },
'money-maker': { name: '赚钱能手', desc: '通过兼职赚500元', hidden: false },
'specialization': { name: '专精之路', desc: '选择专精方向', hidden: false },
// 故事成就
'story-5': { name: '故事开始', desc: '完成5个故事事件', hidden: false },
'story-10': { name: '故事大师', desc: '完成10个故事事件', hidden: false },
'story-15': { name: '史诗旅程', desc: '完成所有故事事件', hidden: false },
'hidden-1': { name: '隐藏剧情1', desc: '触发隐藏剧情', hidden: true },
'hidden-2': { name: '隐藏剧情2', desc: '触发隐藏剧情', hidden: true },
'hidden-3': { name: '隐藏剧情3', desc: '触发隐藏剧情', hidden: true },
// 结局成就(12个)
'ending-1': { name: '结局:顶尖大学', desc: '考入顶尖大学', hidden: false },
'ending-2': { name: '结局:重点大学', desc: '考入重点大学', hidden: false },
'ending-3': { name: '结局:一本大学', desc: '考入一本大学', hidden: false },
'ending-4': { name: '结局:二本大学', desc: '考入二本大学', hidden: false },
'ending-5': { name: '结局:未能如愿', desc: '高考失利', hidden: false },
'ending-6': { name: '结局:竞赛回归', desc: '重返信息学', hidden: false },
'ending-7': { name: '结局:创业之路', desc: '选择创业', hidden: false },
'ending-8': { name: '结局:艺术特长', desc: '艺术发展', hidden: false },
'ending-9': { name: '结局:体育特招', desc: '体育发展', hidden: false },
'ending-10': { name: '结局:出国深造', desc: '出国留学', hidden: false },
'ending-11': { name: '结局:间隔年', desc: '选择间隔年', hidden: false },
'ending-12': { name: '结局:平凡之路', desc: '平凡生活', hidden: false },
// 隐藏结局
'ending-hidden-1': { name: '结局:爱情与学业', desc: '和crush一起成功', hidden: true },
'ending-hidden-2': { name: '结局:家庭和解', desc: '与父母达成理解', hidden: true },
'ending-hidden-3': { name: '结局:自我救赎', desc: '找到人生意义', hidden: true }
};
// ==================== 游戏逻辑 ====================
// DOM 元素缓存
const elements = {
week: document.getElementById('week'),
day: document.getElementById('day'),
period: document.getElementById('period'),
season: document.getElementById('season'),
daysLeft: document.getElementById('days-left'),
vacationDays: document.getElementById('vacation-days'),
energyBar: document.getElementById('energy-bar'),
energyValue: document.getElementById('energy-value'),
stressBar: document.getElementById('stress-bar'),
stressValue: document.getElementById('stress-value'),
healthBar: document.getElementById('health-bar'),
healthValue: document.getElementById('health-value'),
mentalBar: document.getElementById('mental-bar'),
mentalValue: document.getElementById('mental-value'),
moneyBar: document.getElementById('money-bar'),
moneyValue: document.getElementById('money-value'),
chineseBar: document.getElementById('chinese-bar'),
chineseValue: document.getElementById('chinese-value'),
mathBar: document.getElementById('math-bar'),
mathValue: document.getElementById('math-value'),
englishBar: document.getElementById('english-bar'),
englishValue: document.getElementById('english-value'),
physicsBar: document.getElementById('physics-bar'),
physicsValue: document.getElementById('physics-value'),
chemistryBar: document.getElementById('chemistry-bar'),
chemistryValue: document.getElementById('chemistry-value'),
biologyBar: document.getElementById('biology-bar'),
biologyValue: document.getElementById('biology-value'),
teacherBar: document.getElementById('teacher-bar'),
teacherValue: document.getElementById('teacher-value'),
mathTeacherBar: document.getElementById('math-teacher-bar'),
mathTeacherValue: document.getElementById('math-teacher-value'),
chineseTeacherBar: document.getElementById('chinese-teacher-bar'),
chineseTeacherValue: document.getElementById('chinese-teacher-value'),
englishTeacherBar: document.getElementById('english-teacher-bar'),
englishTeacherValue: document.getElementById('english-teacher-value'),
classmateABar: document.getElementById('classmate-a-bar'),
classmateAValue: document.getElementById('classmate-a-value'),
classmateBBar: document.getElementById('classmate-b-bar'),
classmateBValue: document.getElementById('classmate-b-value'),
parentsBar: document.getElementById('parents-bar'),
parentsValue: document.getElementById('parents-value'),
crushBar: document.getElementById('crush-bar'),
crushValue: document.getElementById('crush-value'),
eventLog: document.getElementById('event-log'),
currentStatus: document.getElementById('current-status'),
randomEvent: document.getElementById('random-event'),
relationshipStatus: document.getElementById('relationship-status'),
economyStatus: document.getElementById('economy-status'),
mentalStatus: document.getElementById('mental-status'),
currentGoal: document.getElementById('current-goal'),
goalProgress: document.getElementById('goal-progress'),
scheduleList: document.getElementById('schedule-list'),
homeworkCount: document.getElementById('homework-count'),
weekActivities: document.getElementById('week-activities'),
notification: document.getElementById('notification'),
notificationText: document.getElementById('notification-text'),
gameStatus: document.getElementById('game-status'),
actionCounter: document.getElementById('actionCounter'),
hotkeyHint: document.getElementById('hotkeyHint'),
achievementCount: document.getElementById('achievement-count'),
achievementList: document.getElementById('achievement-list'),
currentMoney: document.getElementById('current-money'),
homeworkList: document.getElementById('homework-list'),
storyTitle: document.getElementById('story-title'),
storyContent: document.getElementById('story-content'),
storyChoices: document.getElementById('story-choices'),
goalContent: document.getElementById('goal-content'),
achievementDetailContent: document.getElementById('achievement-detail-content')
};
// ==================== 核心游戏函数 ====================
// 初始化游戏
function initGame() {
// 显示启动弹窗(捐助+介绍)
document.getElementById('welcome-modal').style.display = 'flex';
// 生成第一周课程表
generateSchedule();
addToLog("游戏开始!你从信息学竞赛中退役,开始了文化课的备战。", "story");
addToLog("班主任找你谈话:'竞赛的思维是优势,但要适应新的节奏。'", "neutral");
// 随机初始天气
changeWeather();
// 检查特殊日期
checkSpecialDay();
// 更新UI
updateUI();
}
// 生成课程表
function generateSchedule() {
const subjects = ['语文', '数学', '英语', '物理', '化学', '生物'];
const times = ['8:00', '9:00', '10:00', '11:00', '14:00', '15:00', '16:00'];
gameState.schedule = [];
// 每周6天课程(周一到周六)
for (let day = 0; day < 6; day++) {
const dayName = ['周一', '周二', '周三', '周四', '周五', '周六'][day];
const numClasses = 3 + Math.floor(Math.random() * 3); // 3-5节课
for (let i = 0; i < numClasses; i++) {
const subject = subjects[Math.floor(Math.random() * subjects.length)];
const time = times[i];
gameState.schedule.push({
day: day,
dayName: dayName,
time: time,
subject: subject,
completed: false
});
}
}
// 周日休息
updateScheduleUI();
}
// 更新课程表UI
function updateScheduleUI() {
elements.scheduleList.innerHTML = '';
if (gameState.schedule.length === 0) {
elements.scheduleList.innerHTML = '<div style="opacity:0.6;font-size:0.85rem;">本周无课程安排</div>';
return;
}
// 只显示本周未完成的课程
const upcoming = gameState.schedule.filter(s => !s.completed).slice(0, 8);
upcoming.forEach(item => {
const div = document.createElement('div');
div.className = 'schedule-item';
if (item.completed) div.classList.add('completed');
div.innerHTML = `
<span>${item.dayName} ${item.time}</span>
<span class="time">${item.subject}</span>
`;
elements.scheduleList.appendChild(div);
});
if (upcoming.length === 0) {
elements.scheduleList.innerHTML = '<div style="opacity:0.6;font-size:0.85rem;">本周课程已完成!</div>';
}
}
// 更新UI
function updateUI() {
// 时间显示
elements.week.textContent = gameState.week;
elements.day.textContent = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'][gameState.dayOfWeek];
elements.period.textContent = ['早晨', '上午', '下午', '晚上'][gameState.period];
elements.season.textContent = `${seasons[gameState.season].emoji} ${seasons[gameState.season].name}`;
elements.daysLeft.textContent = gameState.daysLeft;
elements.vacationDays.textContent = gameState.vacationDays;
// 核心状态
elements.energyBar.style.width = `${gameState.energy}%`;
elements.energyValue.textContent = `${Math.round(gameState.energy)}/100`;
elements.stressBar.style.width = `${gameState.stress}%`;
elements.stressValue.textContent = `${Math.round(gameState.stress)}/100`;
elements.healthBar.style.width = `${gameState.health}%`;
elements.healthValue.textContent = `${Math.round(gameState.health)}/100`;
elements.mentalBar.style.width = `${gameState.mental}%`;
elements.mentalValue.textContent = `${Math.round(gameState.mental)}/100`;
elements.moneyBar.style.width = `${Math.min(100, gameState.money / 10)}%`;
elements.moneyValue.textContent = `${gameState.money}元`;
// 学科进度
for (const subject in gameState.subjects) {
const bar = document.getElementById(`${subject}-bar`);
const value = document.getElementById(`${subject}-value`);
if (bar && value) {
bar.style.width = `${gameState.subjects[subject]}%`;
value.textContent = `${Math.round(gameState.subjects[subject])}/100`;
}
}
// 人际关系
const relMap = {
teacher: { bar: elements.teacherBar, value: elements.teacherValue },
mathTeacher: { bar: elements.mathTeacherBar, value: elements.mathTeacherValue },
chineseTeacher: { bar: elements.chineseTeacherBar, value: elements.chineseTeacherValue },
englishTeacher: { bar: elements.englishTeacherBar, value: elements.englishTeacherValue },
classmateA: { bar: elements.classmateABar, value: elements.classmateAValue },
classmateB: { bar: elements.classmateBBar, value: elements.classmateBValue },
parents: { bar: elements.parentsBar, value: elements.parentsValue },
crush: { bar: elements.crushBar, value: elements.crushValue }
};
for (const key in relMap) {
const val = gameState.relationships[key];
relMap[key].bar.style.width = `${val}%`;
relMap[key].value.textContent = Math.round(val);
}
// 作业计数
const homeworkCount = Object.values(gameState.homework).filter(v => !v).length;
elements.homeworkCount.textContent = homeworkCount;
// 活动计数
elements.weekActivities.textContent = gameState.weekActivities;
// 操作计数器
updateActionCounter();
// 更新状态文本
updateStatusText();
updateRelationshipText();
updateEconomyText();
updateMentalText();
updateGoalText();
// 更新课程表
if (gameState.schedule.length > 0) {
updateScheduleUI();
}
}
// 更新操作计数器
function updateActionCounter() {
const counter = elements.actionCounter;
const used = gameState.actionsThisWeek;
const max = gameState.maxActionsPerWeek;
const remaining = max - used;
counter.textContent = `本周操作: ${used}/${max} | 剩余: ${remaining}`;
// 根据剩余操作数改变颜色
counter.className = 'action-counter';
if (remaining === 1) counter.classList.add('warning');
if (remaining === 0) counter.classList.add('danger');
}
// 更新状态文本
function updateStatusText() {
let status = "";
const energy = gameState.energy;
const stress = gameState.stress;
const health = gameState.health;
const mental = gameState.mental;
if (health < 40) {
status = "⚠️ 身体不适!健康状况堪忧,需要立即休息。";
} else if (stress > 80) {
status = "🔥 压力爆表!濒临崩溃,急需释放!";
} else if (energy < 20) {
status = "😴 精力枯竭,学习效率极低。";
} else if (mental < 40) {
status = "💭 心理状态不佳,需要关注情绪。";
} else if (energy > 80 && stress < 30 && health > 80 && mental > 80) {
status = "✨ 状态巅峰!正是学习的好时机!";
} else if (energy > 60 && stress < 50) {
status = "📚 状态良好,保持节奏。";
} else {
status = "🔄 需要平衡学习与休息。";
}
elements.currentStatus.textContent = status;
}
// 更新关系文本
function updateRelationshipText() {
const t = gameState.relationships.teacher;
const mt = gameState.relationships.mathTeacher;
const ct = gameState.relationships.chineseTeacher;
const et = gameState.relationships.englishTeacher;
const ca = gameState.relationships.classmateA;
const cb = gameState.relationships.classmateB;
const p = gameState.relationships.parents;
const cr = gameState.relationships.crush;
let text = "";
if (t > 70) text += "老师很器重你。";
else if (t < 30) text += "老师对你有些失望。";
else text += "与老师关系正常。";
if (ca > 70 || cb > 70) text += " 同学们很认可你。";
else if (ca < 30 && cb < 30) text += " 与同学有些疏远。";
else text += " 同学关系一般。";
if (p > 70) text += " 父母很支持。";
else if (p < 30) text += " 父母不太理解。";
else text += " 父母关系正常。";
if (cr > 50) text += " crush对你有好感!";
else if (cr > 20) text += " crush注意到你了。";
elements.relationshipStatus.textContent = text;
}
// 更新经济文本
function updateEconomyText() {
const money = gameState.money;
let text = "";
if (money > 800) text = "经济宽裕,可以购买任何资料。";
else if (money > 400) text = "经济状况良好,足够日常开销。";
else if (money > 100) text = "经济一般,需要精打细算。";
else text = "经济紧张,可能需要向父母求助。";
elements.economyStatus.textContent = text;
}
// 更新心理文本
function updateMentalText() {
const mental = gameState.mental;
const stress = gameState.stress;
let text = "";
if (mental > 80 && stress < 30) text = "心理状态非常健康,情绪稳定。";
else if (mental > 60) text = "心理状态良好,能够应对压力。";
else if (mental > 40) text = "心理状态一般,需要多关注自己。";
else text = "心理状态不佳,建议寻求帮助。";
elements.mentalStatus.textContent = text;
}
// 更新目标文本
function updateGoalText() {
if (!gameState.currentGoal) {
elements.currentGoal.textContent = "暂无目标";
elements.goalProgress.style.width = '0%';
return;
}
const goal = gameState.currentGoal;
elements.currentGoal.textContent = goal.desc;
// 计算进度(0-100)
let progress = 0;
if (goal.check(gameState)) {
progress = 100;
elements.goalProgress.style.background = 'var(--secondary)';
} else {
// 根据接近程度计算进度
const avg = Object.values(gameState.subjects).reduce((a, b) => a + b, 0) / 6;
const targetAvg = goal.desc.includes('20分') ? 20 : goal.desc.includes('40分') ? 40 : goal.desc.includes('50分') ? 50 : goal.desc.includes('65分') ? 65 : goal.desc.includes('75分') ? 75 : 85;
const avgProgress = Math.min(100, (avg / targetAvg) * 50);
let otherProgress = 0;
if (goal.desc.includes('压力')) {
const targetStress = goal.desc.includes('低于40') ? 40 : goal.desc.includes('低于30') ? 30 : 20;
otherProgress += Math.max(0, 100 - (gameState.stress / targetStress) * 50);
}
if (goal.desc.includes('健康')) {
otherProgress += Math.min(50, (gameState.health / 80) * 50);
}
if (goal.desc.includes('作业')) {
const homeworkCount = Object.values(gameState.homework).filter(v => v).length;
otherProgress += Math.min(50, (homeworkCount / 5) * 50);
}
if (goal.desc.includes('模考')) {
otherProgress += Math.min(50, (gameState.examCount / 3) * 50);
}
progress = Math.min(100, avgProgress + otherProgress);
elements.goalProgress.style.background = 'var(--warning)';
}
elements.goalProgress.style.width = `${progress}%`;
}
// 显示通知
function showNotification(text, type = "neutral") {
elements.notificationText.textContent = text;
elements.notification.className = `notification ${type} show`;
setTimeout(() => {
elements.notification.classList.remove('show');
}, 4000);
}
// 添加事件到日志
function addToLog(text, type = "neutral") {
const eventItem = document.createElement('div');
eventItem.className = `event-item ${type}`;
const timestamp = document.createElement('span');
timestamp.className = 'timestamp';
timestamp.textContent = `W${gameState.week} ${['一', '二', '三', '四', '五', '六', '日'][gameState.dayOfWeek]}`;
eventItem.appendChild(timestamp);
const content = document.createTextNode(text);
eventItem.appendChild(content);
elements.eventLog.insertBefore(eventItem, elements.eventLog.firstChild);
// 限制日志条目数量
while (elements.eventLog.children.length > 20) {
elements.eventLog.removeChild(elements.eventLog.lastChild);
}
// 滚动到顶部
elements.eventLog.scrollTop = 0;
}
// ==================== 操作函数 ====================
// 检查操作限制
function checkActionLimit() {
if (gameState.actionsThisWeek >= gameState.maxActionsPerWeek) {
showNotification("本周操作次数已用完,请结束本周!", "bad");
return false;
}
return true;
}
// 记录操作
function recordAction() {
gameState.actionsThisWeek++;
updateActionCounter();
}
// 计算学习效率(受心理、关系、状态影响)
function calculateStudyEfficiency() {
let efficiency = 1.0;
// 心理状态影响(30%)
const mentalFactor = gameState.mental / 100;
efficiency *= (0.7 + mentalFactor * 0.3);
// 压力影响(20%)
const stressFactor = Math.max(0.5, 1 - gameState.stress / 100);
efficiency *= stressFactor;
// 健康影响(15%)
const healthFactor = gameState.health / 100;
efficiency *= (0.85 + healthFactor * 0.15);
// 精力影响(15%)
const energyFactor = gameState.energy / 100;
efficiency *= (0.85 + energyFactor * 0.15);
// 关系影响(10%)
const relFactor = (gameState.relationships.teacher + gameState.relationships.mathTeacher + gameState.relationships.chineseTeacher + gameState.relationships.englishTeacher) / 400;
efficiency *= (0.9 + relFactor * 0.1);
// 天气影响(10%)
efficiency *= gameState.currentWeather.efficiency;
return efficiency;
}
// 学习功能
function study(subject) {
if (!checkActionLimit()) return;
if (gameState.energy < 15) {
showNotification("精力不足,无法学习!", "bad");
return;
}
if (gameState.health < 30) {
showNotification("身体不适,先休息吧!", "bad");
return;
}
const config = {
chinese: { cost: 15, baseGain: [2, 4], name: "语文" },
math: { cost: 20, baseGain: [3, 6], name: "数学" },
english: { cost: 15, baseGain: [2, 4], name: "英语" },
physics: { cost: 20, baseGain: [3, 5], name: "物理" },
chemistry: { cost: 15, baseGain: [2, 4], name: "化学" },
biology: { cost: 15, baseGain: [2, 4], name: "生物" }
};
const cfg = config[subject];
// 消耗资源
gameState.energy -= cfg.cost;
gameState.stress += 2;
gameState.health -= 1;
gameState.totalStudyHours++;
// 计算增益
let gain = Math.random() * (cfg.baseGain[1] - cfg.baseGain[0]) + cfg.baseGain[0];
// 竞赛背景加成
if (subject === 'math' || subject === 'physics') {
gain *= 1.3; // 30%加成
}
// 当前水平影响(越高越难提升)
const currentLevel = gameState.subjects[subject];
gain *= (1 - currentLevel / 200);
// 综合效率计算
const efficiency = calculateStudyEfficiency();
gain *= efficiency;
// 随机波动
gain *= (0.8 + Math.random() * 0.4);
// 应用增益
gameState.subjects[subject] = Math.min(100, currentLevel + gain);
// 添加日志
addToLog(`学习了${cfg.name},能力提升了${gain.toFixed(1)}点`, "good");
// 随机事件
if (Math.random() < 0.35) {
triggerRandomEvent();
}
closeModal('study-modal');
recordAction();
advanceTime();
updateUI();
// 检查精力耗尽
if (gameState.energy <= 0) {
addToLog("精力耗尽,被迫休息!", "bad");
gameState.energy = 0;
gameState.health -= 5;
}
}
// 休息功能
function rest(type) {
if (!checkActionLimit()) return;
let energyGain = 0;
let stressReduction = 0;
let mentalGain = 0;
let healthChange = 0;
let moneyCost = 0;
let text = "";
switch (type) {
case 'sleep':
energyGain = 30;
stressReduction = 10;
healthChange = 2;
text = "深度睡眠恢复了精力";
break;
case 'nap':
energyGain = 15;
stressReduction = 5;
healthChange = 1;
text = "午睡帮助恢复了部分精力";
break;
case 'relax':
energyGain = 10;
stressReduction = 15;
text = "放松娱乐减轻了压力";
break;
case 'music':
energyGain = 5;
stressReduction = 8;
text = "听音乐放松了心情";
break;
case 'counseling':
if (gameState.money < 100) {
showNotification("心理咨询需要100元,钱不够!", "bad");
return;
}
moneyCost = 100;
mentalGain = 20;
stressReduction = 15;
text = "心理咨询帮助很大,心理状态改善";
break;
}
gameState.energy = Math.min(100, gameState.energy + energyGain);
gameState.stress = Math.max(0, gameState.stress - stressReduction);
gameState.health = Math.min(100, gameState.health + healthChange);
gameState.mental = Math.min(100, gameState.mental + mentalGain);
gameState.money -= moneyCost;
gameState.totalRestHours++;
addToLog(text, "good");
showNotification(`${text},精力+${energyGain},压力-${stressReduction}`, "good");
closeModal('rest-modal');
recordAction();
advanceTime();
updateUI();
}
// 锻炼功能
function exercise() {
if (!checkActionLimit()) return;
if (gameState.energy < 25) {
showNotification("太累了,无法锻炼!", "bad");
return;
}
if (gameState.health < 40) {
showNotification("身体不适,不宜剧烈运动!", "bad");
return;
}
gameState.energy -= 25;
gameState.stress = Math.max(0, gameState.stress - 18);
gameState.health = Math.min(100, gameState.health + 3);
gameState.energy = Math.min(100, gameState.energy + 12);
gameState.totalExerciseHours++;
addToLog("体育锻炼释放了压力,身体更健康了", "good");
showNotification("锻炼效果显著!压力-18,健康+3", "good");
if (Math.random() < 0.25) {
addToLog("锻炼时遇到了同学,交流了学习心得", "neutral");
gameState.relationships.classmateA += 3;
}
if (Math.random() < 0.15) {
addToLog("运动过度,肌肉酸痛", "bad");
gameState.health -= 2;
}
recordAction();
advanceTime();
updateUI();
}
// 社交功能
function social() {
if (!checkActionLimit()) return;
if (gameState.energy < 15) {
showNotification("太累了,无法社交!", "bad");
return;
}
if (gameState.health < 50) {
showNotification("身体状态不佳,改天吧!", "bad");
return;
}
gameState.energy -= 15;
gameState.stress = Math.max(0, gameState.stress - 10);
gameState.relationships.classmateA = Math.min(100, gameState.relationships.classmateA + 5);
gameState.totalSocialHours++;
// 随机社交事件
const socialEvents = [
{ text: "与同学交流学习方法,互相鼓励", effect: { classmates: 5, stress: -5 } },
{ text: "听同学倾诉烦恼,成为知心朋友", effect: { classmates: 8, stress: -3 } },
{ text: "讨论竞赛往事,感慨万千", effect: { stress: 5, classmates: 3 } },
{ text: "一起吐槽作业太多,笑出眼泪", effect: { stress: -8, classmates: 4 } }
];
const event = socialEvents[Math.floor(Math.random() * socialEvents.length)];
addToLog(event.text, "good");
// 应用效果
if (event.effect.classmates) gameState.relationships.classmateA += event.effect.classmates;
if (event.effect.stress) gameState.stress = Math.max(0, Math.min(100, gameState.stress + event.effect.stress));
showNotification("社交活动愉快!", "good");
recordAction();
advanceTime();
updateUI();
}
// 回忆功能
function memory() {
if (!checkActionLimit()) return;
if (gameState.memoryCount >= 3) {
showNotification("回忆太多会沉溺过去,向前看吧!", "neutral");
return;
}
if (gameState.energy < 10) {
showNotification("太累了,无法回忆往事", "bad");
return;
}
gameState.memoryCount++;
gameState.energy -= 10;
// 随机回忆
const memories = [
{
title: "第一次获奖",
content: "你想起自己小学第一次拿到CSP-J一等时的场景。那时你意气风发,以为未来尽在掌握。现在想来,那时的自信既珍贵又天真。",
choices: [
{ text: "怀念那时的自己", effect: { stress: 5, energy: 3 } },
{ text: "感慨时光飞逝", effect: { stress: 3 } },
{ text: "觉得现在也不错", effect: { stress: -3, energy: 5 } }
]
},
{
title: "集训的日子",
content: "暑假集训,每天刷题到凌晨。虽然辛苦,但和队友们一起奋斗的日子真的很开心。现在,大家各奔东西。",
choices: [
{ text: "感到孤独", effect: { stress: 8 } },
{ text: "充满动力", effect: { energy: 5, stress: -5 } },
{ text: "释然一笑", effect: { stress: -3 } }
]
},
{
title: "放弃的瞬间",
content: "你想起决定退役的那一刻。是成绩下滑?是父母的期望?还是自己的迷茫?那个决定,改变了你的人生轨迹。",
choices: [
{ text: "不后悔", effect: { stress: -5 } },
{ text: "有些遗憾", effect: { stress: 5 } },
{ text: "必须证明选择没错", effect: { energy: 5, stress: 5 } }
]
},
{
title: "队友的告别",
content: "最后一位队友发来消息:'我拿到国集了,你呢?'你盯着屏幕很久,回复:'我AFO了,祝你顺利。'",
choices: [
{ text: "感到失落", effect: { stress: 10 } },
{ text: "真心祝福", effect: { stress: -5 } },
{ text: "暗下决心", effect: { energy: 5 } }
]
}
];
const memory = memories[Math.floor(Math.random() * memories.length)];
// 显示回忆模态框
const modal = document.getElementById('story-modal');
elements.storyTitle.textContent = `回忆:${memory.title}`;
elements.storyContent.innerHTML = memory.content;
elements.storyChoices.innerHTML = '';
memory.choices.forEach((choice, index) => {
const btn = document.createElement('button');
btn.className = 'story-choice-btn';
btn.textContent = choice.text;
btn.onclick = () => {
// 应用效果
for (const key in choice.effect) {
if (key === 'stress') gameState.stress = Math.max(0, Math.min(100, gameState.stress + choice.effect[key]));
else if (key === 'energy') gameState.energy = Math.max(0, Math.min(100, gameState.energy + choice.effect[key]));
}
addToLog(`回忆:${memory.title} - ${choice.text}`, "neutral");
closeModal('story-modal');
recordAction();
advanceTime();
updateUI();
};
elements.storyChoices.appendChild(btn);
});
modal.style.display = 'flex';
showNotification("回忆往事,心情复杂...", "neutral");
}
// 参加模考
function takeExam() {
if (!checkActionLimit()) return;
if (gameState.examCount >= 5) {
showNotification("已经参加太多模考了,专注学习吧!", "neutral");
return;
}
if (gameState.energy < 40) {
showNotification("精力不足,无法参加考试!", "bad");
return;
}
if (gameState.health < 60) {
showNotification("身体状态不佳,建议休息后再考", "bad");
return;
}
gameState.energy -= 40;
gameState.stress += 8;
gameState.examCount++;
// 计算总分(加入当前能力值权重,避免低分高排名)
let totalScore = 0;
let subjectScores = {};
const avgAbility = Object.values(gameState.subjects).reduce((a, b) => a + b, 0) / 6;
for (const subject in gameState.subjects) {
// 基础分 = 当前能力值 * 随机系数(0.85-1.15)
const randomFactor = 0.85 + Math.random() * 0.3;
let score = gameState.subjects[subject] * randomFactor;
// 心理状态影响(心理差可能发挥失常)
if (gameState.mental < 50 && Math.random() < 0.3) {
score *= 0.7; // 发挥失常
addToLog("心理紧张,考试发挥失常", "bad");
}
// 关系影响(老师关系好可能有额外加分)
if (gameState.relationships.teacher > 70 && Math.random() < 0.2) {
score += 5;
addToLog("老师鼓励下,考试超常发挥", "good");
}
subjectScores[subject] = Math.round(score);
totalScore += score;
}
totalScore = Math.round(totalScore / 6);
// 根据表现给出反馈
let result = "";
let type = "neutral";
let effect = {};
if (totalScore >= 90) {
result = "太棒了!成绩优异,班级前5名!";
type = "good";
effect = { stress: -15, teacher: 10, parents: 10, classmates: 5 };
} else if (totalScore >= 80) {
result = "不错,有进步,保持住!";
type = "good";
effect = { stress: -5, teacher: 5, parents: 5 };
} else if (totalScore >= 70) {
result = "成绩稳定,还需努力。";
type = "neutral";
effect = { stress: 3, teacher: 2 };
} else if (totalScore >= 60) {
result = "成绩一般,找出薄弱环节。";
type = "neutral";
effect = { stress: 8 };
} else {
result = "成绩不理想,需要加强学习了。";
type = "bad";
effect = { stress: 15, teacher: -5, parents: -5 };
}
// 应用效果
for (const key in effect) {
if (key === 'stress') {
gameState.stress = Math.max(0, Math.min(100, gameState.stress + effect[key]));
} else if (key === 'teacher') {
gameState.relationships.teacher = Math.max(0, Math.min(100, gameState.relationships.teacher + effect[key]));
} else if (key === 'parents') {
gameState.relationships.parents = Math.max(0, Math.min(100, gameState.relationships.parents + effect[key]));
} else if (key === 'classmates') {
gameState.relationships.classmateA = Math.max(0, Math.min(100, gameState.relationships.classmateA + effect[key]));
}
}
// 显示详细成绩
let scoreText = `模考成绩:平均分${totalScore}分\n`;
for (const subject in subjectScores) {
const name = { chinese: '语文', math: '数学', english: '英语', physics: '物理', chemistry: '化学', biology: '生物' }[subject];
scoreText += `${name}: ${subjectScores[subject]}分 `;
}
addToLog(scoreText + `\n${result}`, type);
showNotification(`考试结果:${result}`, type);
// 检查成就
if (totalScore >= 90) {
unlockAchievement('exam-perfect');
showNotification("🎉 成就解锁:模考满分!", "good");
}
// 检查游戏结束
if (gameState.week >= 52) {
endGame();
return;
}
recordAction();
advanceTime();
updateUI();
}
// 作业功能
function homework(action) {
if (!checkActionLimit()) return;
const homeworkList = Object.entries(gameState.homework).filter(([sub, done]) => !done);
if (action === 'complete-all') {
if (homeworkList.length === 0) {
showNotification("本周作业已完成!", "neutral");
return;
}
if (gameState.energy < 30) {
showNotification("精力不足,无法完成所有作业!", "bad");
return;
}
gameState.energy -= 30;
gameState.relationships.teacher += 3;
gameState.relationships.mathTeacher += 2;
gameState.relationships.chineseTeacher += 2;
gameState.relationships.englishTeacher += 2;
// 全科提升
for (let sub in gameState.subjects) {
gameState.subjects[sub] = Math.min(100, gameState.subjects[sub] + 0.5);
}
// 完成所有作业
for (let sub in gameState.homework) {
gameState.homework[sub] = true;
}
addToLog("完成了所有作业,老师很满意", "good");
showNotification("作业完成!全科+0.5,老师关系+3", "good");
} else if (action === 'complete-one') {
if (homeworkList.length === 0) {
showNotification("本周作业已完成!", "neutral");
return;
}
if (gameState.energy < 10) {
showNotification("精力不足,无法完成作业!", "bad");
return;
}
const [subject, _] = homeworkList[Math.floor(Math.random() * homeworkList.length)];
gameState.energy -= 10;
gameState.subjects[subject] = Math.min(100, gameState.subjects[subject] + 0.3);
gameState.relationships.teacher += 1;
gameState.homework[subject] = true;
const name = { chinese: '语文', math: '数学', english: '英语', physics: '物理', chemistry: '化学', biology: '生物' }[subject];
addToLog(`完成了${name}作业`, "good");
showNotification(`${name}作业完成!+0.3点`, "good");
} else if (action === 'skip') {
if (homeworkList.length === 0) {
showNotification("本周作业已完成!", "neutral");
return;
}
gameState.relationships.teacher -= 5;
gameState.relationships.mathTeacher -= 3;
gameState.relationships.chineseTeacher -= 3;
gameState.relationships.englishTeacher -= 3;
gameState.stress += 5;
addToLog("拖欠作业,老师很失望", "bad");
showNotification("拖欠作业!老师关系-5,压力+5", "bad");
}
closeModal('homework-modal');
recordAction();
advanceTime();
updateUI();
}
// 活动功能
function activity(type) {
if (!checkActionLimit()) return;
if (gameState.energy < 20) {
showNotification("精力不足,无法参加活动!", "bad");
return;
}
let energyCost = 0;
let stressChange = 0;
let mentalChange = 0;
let relChange = 0;
let subjectChange = 0;
let text = "";
let typeLog = "neutral";
switch (type) {
case 'club':
energyCost = 15;
stressChange = -5;
relChange = 5;
text = "社团活动很有趣,同学关系更好了";
break;
case 'volunteer':
energyCost = 25;
mentalChange = 3;
text = "志愿者活动很有意义,心理状态改善";
break;
case 'lecture':
energyCost = 10;
subjectChange = 1;
stressChange = -3;
text = "听讲座收获颇丰,随机科目+1";
break;
case 'competition':
energyCost = 35;
stressChange = 10;
if (Math.random() < 0.3) {
text = "知识竞赛获奖了!获得奖金100元";
gameState.money += 100;
typeLog = "good";
} else {
text = "知识竞赛未获奖,但积累了经验";
}
break;
case 'oi-meetup':
energyCost = 20;
stressChange = -10;
gameState.memoryCount++;
text = "聚会,与老友重逢,压力大减";
break;
}
gameState.energy -= energyCost;
gameState.stress = Math.max(0, Math.min(100, gameState.stress + stressChange));
gameState.mental = Math.max(0, Math.min(100, gameState.mental + mentalChange));
gameState.relationships.classmateA = Math.min(100, gameState.relationships.classmateA + relChange);
if (subjectChange > 0) {
const subjects = ['chinese', 'math', 'english', 'physics', 'chemistry', 'biology'];
const randomSubject = subjects[Math.floor(Math.random() * subjects.length)];
gameState.subjects[randomSubject] = Math.min(100, gameState.subjects[randomSubject] + subjectChange);
}
gameState.weekActivities++;
gameState.totalActivities++;
addToLog(text, typeLog);
showNotification(text, typeLog);
closeModal('activity-modal');
recordAction();
advanceTime();
updateUI();
}
// 经济功能
function economy(action) {
if (!checkActionLimit()) return;
switch (action) {
case 'part-time':
if (gameState.energy < 30) {
showNotification("精力不足,无法兼职!", "bad");
return;
}
gameState.energy -= 30;
gameState.stress += 5;
gameState.money += 200;
addToLog("做家教赚了200元,但很累", "good");
showNotification("兼职成功!获得200元,压力+5", "good");
break;
case 'buy-books':
if (gameState.money < 1000) {
showNotification("钱不够!", "bad");
return;
}
gameState.money -= 1000;
for (let sub in gameState.subjects) {
gameState.subjects[sub] = Math.min(100, gameState.subjects[sub] + 1);
}
addToLog("购买新资料,全科+1", "good");
showNotification("购买资料成功!全科+1", "good");
break;
case 'buy-course':
if (gameState.money < 300) {
showNotification("钱不够!", "bad");
return;
}
if (gameState.energy < 20) {
showNotification("精力不足,无法上网课!", "bad");
return;
}
gameState.money -= 300;
gameState.energy -= 20;
// 随机提升一个科目3点
const subjects = ['chinese', 'math', 'english', 'physics', 'chemistry', 'biology'];
const randomSubject = subjects[Math.floor(Math.random() * subjects.length)];
gameState.subjects[randomSubject] = Math.min(100, gameState.subjects[randomSubject] + 3);
const name = { chinese: '语文', math: '数学', english: '英语', physics: '物理', chemistry: '化学', biology: '生物' }[randomSubject];
addToLog(`购买${name}网课,${name}+3`, "good");
showNotification(`网课学习完成!${name}+3`, "good");
break;
// case 'save':
// addToLog("存钱以备不时之需", "neutral");
// showNotification("已存钱,当前存款:" + gameState.money + "元", "neutral");
// break;
case 'parents':
if (gameState.relationships.parents < 30) {
showNotification("父母关系不好,不好意思要钱!", "bad");
return;
}
gameState.money += 150;
gameState.relationships.parents -= 5;
gameState.stress += 3;
addToLog("向父母要了150元零花钱", "neutral");
showNotification("获得150元,但父母关系-5,压力+3", "neutral");
break;
}
closeModal('economy-modal');
recordAction();
advanceTime();
updateUI();
}
// 结束本周
function endWeek() {
if (gameState.gameOver) return;
// 检查是否有未完成的操作
if (gameState.actionsThisWeek < gameState.maxActionsPerWeek) {
if (!confirm(`本周还有${gameState.maxActionsPerWeek - gameState.actionsThisWeek}次操作机会,确定要结束本周吗?`)) {
return;
}
}
// 检查是否还有未完成的故事
const currentStory = storyEvents.find(s => s.week === gameState.week && !gameState.events.includes(s.id));
if (currentStory) {
showNotification("本周有重要事件发生!", "neutral");
triggerStoryEvent(currentStory);
return;
}
// 检查隐藏剧情
checkHiddenEvents();
// 自然恢复和消耗
gameState.energy = Math.min(100, gameState.energy + 5);
gameState.stress = Math.max(0, gameState.stress - 5);
gameState.health = Math.min(100, gameState.health + 2);
gameState.mental = Math.min(100, gameState.mental + 2);
// 作业系统:新一周生成新作业
if (gameState.week < 52) {
for (let sub in gameState.homework) {
gameState.homework[sub] = false; // 重置作业
}
addToLog("新一周开始,作业重新布置", "neutral");
}
// 随机事件
if (Math.random() < 0.6) {
triggerRandomEvent();
}
// 检查完美一周
const hasNegativeEvent = gameState.lastAction === 'bad' || gameState.stress > 50;
if (!hasNegativeEvent && gameState.actionsThisWeek > 0) {
gameState.perfectWeeks++;
if (gameState.perfectWeeks >= 2) {
unlockAchievement('perfect-week');
showNotification("🎉 成就解锁:完美一周!", "good");
}
}
// 时间推进
gameState.week++;
gameState.dayOfWeek = 0;
gameState.period = 0;
gameState.daysLeft -= 7;
gameState.actionsThisWeek = 0; // 重置操作计数
// 季节变化
if (gameState.week <= 13) gameState.season = 0; // 春
else if (gameState.week <= 26) gameState.season = 1; // 夏
else if (gameState.week <= 39) gameState.season = 2; // 秋
else gameState.season = 3; // 冬
// 检查假期
checkHolidays();
// 检查特殊日子
checkSpecialDay();
// 检查阶段目标
checkStageGoals();
// 检查成就
checkAchievements();
// 检查游戏结束
if (gameState.week > 52 || gameState.daysLeft <= 0) {
endGame();
return;
}
// 生成新课程表
generateSchedule();
// 天气变化
changeWeather();
addToLog(`第${gameState.week}周开始,距离高考还有${gameState.daysLeft}天`, "neutral");
showNotification(`新的一周:${gameState.weather} ${getWeatherName()} | 季节:${seasons[gameState.season].name}`, "neutral");
updateUI();
}
// 推进时间(用于单次活动)
function advanceTime() {
gameState.period++;
if (gameState.period >= 4) {
gameState.period = 0;
gameState.dayOfWeek++;
gameState.daysLeft--;
if (gameState.dayOfWeek >= 7) {
gameState.dayOfWeek = 0;
// 周结束自动恢复
gameState.energy = Math.min(100, gameState.energy + 3);
gameState.stress = Math.max(0, gameState.stress - 3);
}
}
}
// 改变天气
function changeWeather() {
const weather = weathers[Math.floor(Math.random() * weathers.length)];
gameState.weather = weather.type;
gameState.currentWeather = weather;
// 天气影响心情
if (weather.mood > 0) {
gameState.stress = Math.max(0, gameState.stress - 2);
} else if (weather.mood < 0) {
gameState.stress = Math.min(100, gameState.stress + 2);
}
}
// 获取天气名称
function getWeatherName() {
return gameState.currentWeather ? gameState.currentWeather.name : '晴天';
}
// 检查假期
function checkHolidays() {
for (const key in holidays) {
const holiday = holidays[key];
if (gameState.week === holiday.week) {
gameState.vacationDays = holiday.days;
addToLog(`假期:${holiday.name},共${holiday.days}天`, "important");
showNotification(`假期到来:${holiday.name}!`, "important");
// 应用假期效果
if (holiday.effect.stress) gameState.stress = Math.max(0, gameState.stress + holiday.effect.stress);
if (holiday.effect.health) gameState.health = Math.min(100, gameState.health + holiday.effect.health);
if (holiday.effect.parents) gameState.relationships.parents = Math.min(100, gameState.relationships.parents + holiday.effect.parents);
if (holiday.effect.mental) gameState.mental = Math.min(100, gameState.mental + holiday.effect.mental);
}
}
}
// 触发随机事件
function triggerRandomEvent() {
// 合并所有事件
const allEvents = [
...randomEvents.study,
...randomEvents.relationship,
...randomEvents.health,
...randomEvents.memory,
...randomEvents.economy,
...randomEvents.special
];
// 过滤可用事件(加入条件检查)
let availableEvents = allEvents.filter(e => {
if (!e.condition || !e.condition(gameState)) return false;
// 季节和周数过滤
if (gameState.season === 3 && e.text.includes('春')) return false;
if (gameState.season === 0 && e.text.includes('冬')) return false;
if (gameState.week < 10 && e.text.includes('月考')) return false;
if (gameState.week > 40 && e.text.includes('讲座')) return false;
return true;
});
if (availableEvents.length === 0) return;
// 加权随机选择
const totalWeight = availableEvents.reduce((sum, e) => sum + e.weight, 0);
let random = Math.random() * totalWeight;
let selectedEvent = null;
for (const event of availableEvents) {
random -= event.weight;
if (random <= 0) {
selectedEvent = event;
break;
}
}
if (!selectedEvent) selectedEvent = availableEvents[0];
addToLog(selectedEvent.text, selectedEvent.type);
elements.randomEvent.textContent = selectedEvent.text;
gameState.lastAction = selectedEvent.type;
// 应用效果
applyEffect(selectedEvent.effect);
// 显示通知
let notificationText = selectedEvent.text;
if (selectedEvent.type === 'good') {
notificationText += " (效果:正面)";
} else if (selectedEvent.type === 'bad') {
notificationText += " (效果:负面)";
}
showNotification(notificationText, selectedEvent.type);
}
// 触发故事事件
function triggerStoryEvent(story) {
if (gameState.events.includes(story.id)) return;
const modal = document.getElementById('story-modal');
elements.storyTitle.textContent = story.title;
elements.storyContent.innerHTML = story.content;
elements.storyChoices.innerHTML = '';
story.choices.forEach((choice, index) => {
const btn = document.createElement('button');
btn.className = 'story-choice-btn';
btn.textContent = choice.text;
// 显示影响预览
const preview = document.createElement('div');
preview.className = 'choice-preview';
let previewText = "影响:";
for (const key in choice.effect) {
const val = choice.effect[key];
const sign = val > 0 ? '+' : '';
previewText += `${key}${sign}${val} `;
}
preview.textContent = previewText;
btn.appendChild(preview);
btn.onclick = () => {
// 应用效果
applyEffect(choice.effect);
addToLog(`故事:${story.title} - ${choice.text}`, "story");
gameState.events.push(story.id);
gameState.storyProgress++;
// 检查故事完成
if (gameState.storyProgress >= 5) {
unlockAchievement('story-5');
showNotification("🎉 成就解锁:故事开始!", "good");
}
if (gameState.storyProgress >= 10) {
unlockAchievement('story-10');
showNotification("🎉 成就解锁:故事大师!", "good");
}
if (gameState.storyProgress >= 15) {
unlockAchievement('story-15');
showNotification("🎉 成就解锁:史诗旅程!", "good");
}
// 下一个事件
if (choice.next) {
const nextStory = storyEvents.find(s => s.id === choice.next);
if (nextStory && gameState.week >= nextStory.week) {
setTimeout(() => triggerStoryEvent(nextStory), 500);
}
}
closeModal('story-modal');
advanceTime();
updateUI();
};
elements.storyChoices.appendChild(btn);
});
modal.style.display = 'flex';
showNotification("故事事件触发", "story");
}
// 检查隐藏剧情
function checkHiddenEvents() {
let triggered = 0;
hiddenEvents.forEach(event => {
if (!gameState.events.includes(event.id) && event.condition(gameState)) {
// 显示隐藏剧情
const modal = document.getElementById('story-modal');
elements.storyTitle.textContent = `隐藏剧情:${event.title}`;
elements.storyContent.innerHTML = event.content;
elements.storyChoices.innerHTML = '';
if (event.choices) {
event.choices.forEach(choice => {
const btn = document.createElement('button');
btn.className = 'story-choice-btn';
btn.textContent = choice.text;
btn.onclick = () => {
applyEffect(choice.effect);
gameState.events.push(event.id);
closeModal('story-modal');
advanceTime();
updateUI();
recordAction();
};
elements.storyChoices.appendChild(btn);
});
} else {
const btn = document.createElement('button');
btn.className = 'story-choice-btn';
btn.textContent = "继续";
btn.onclick = () => {
applyEffect(event.effect);
gameState.events.push(event.id);
closeModal('story-modal');
advanceTime();
updateUI();
recordAction();
};
elements.storyChoices.appendChild(btn);
}
modal.style.display = 'flex';
showNotification(`隐藏剧情触发:${event.title}`, "important");
triggered++;
}
});
if (triggered > 0) {
if (triggered >= 1) {
unlockAchievement('hidden-1');
showNotification("🎉 成就解锁:隐藏剧情1!", "good");
}
if (triggered >= 2) {
unlockAchievement('hidden-2');
showNotification("🎉 成就解锁:隐藏剧情2!", "good");
}
if (triggered >= 3) {
unlockAchievement('hidden-3');
showNotification("🎉 成就解锁:隐藏剧情3!", "good");
}
}
}
// 应用效果
function applyEffect(effect) {
for (const key in effect) {
if (key === 'stress') {
gameState.stress = Math.max(0, Math.min(100, gameState.stress + effect[key]));
} else if (key === 'energy') {
gameState.energy = Math.max(0, Math.min(100, gameState.energy + effect[key]));
} else if (key === 'health') {
gameState.health = Math.max(0, Math.min(100, gameState.health + effect[key]));
} else if (key === 'mental') {
gameState.mental = Math.max(0, Math.min(100, gameState.mental + effect[key]));
} else if (key === 'money') {
gameState.money = Math.max(0, gameState.money + effect[key]);
} else if (gameState.relationships.hasOwnProperty(key)) {
gameState.relationships[key] = Math.max(0, Math.min(100, gameState.relationships[key] + effect[key]));
} else if (gameState.subjects.hasOwnProperty(key)) {
gameState.subjects[key] = Math.max(0, Math.min(100, gameState.subjects[key] + effect[key]));
} else if (key === 'subjects' && typeof effect[key] === 'object') {
// 批量科目提升
for (const sub in effect[key]) {
if (sub === 'all') {
for (const s in gameState.subjects) {
gameState.subjects[s] = Math.min(100, gameState.subjects[s] + effect[key][sub]);
}
}
}
}
}
}
// 检查阶段目标
function checkStageGoals() {
// 检查当前周数是否有目标
for (const week in stageGoals) {
const goal = stageGoals[week];
// 如果当前周数达到目标周数,且还没检查过
if (gameState.week === parseInt(week) && !gameState.currentGoal) {
gameState.currentGoal = goal;
gameState.goalProgress = 0;
// 显示目标更新弹窗
showGoalModal(goal);
return;
}
}
// 检查当前目标是否完成
if (gameState.currentGoal && gameState.week > parseInt(gameState.currentGoal.desc.match(/\d+/))) {
const achieved = gameState.currentGoal.check(gameState);
// 显示目标完成/失败弹窗
showGoalResultModal(gameState.currentGoal, achieved);
// 应用奖励
if (achieved && gameState.currentGoal.reward) {
for (const key in gameState.currentGoal.reward) {
if (key === 'stress') {
gameState.stress = Math.max(0, gameState.stress + gameState.currentGoal.reward[key]);
} else if (key === 'energy') {
gameState.energy = Math.min(100, gameState.energy + gameState.currentGoal.reward[key]);
} else if (key === 'health') {
gameState.health = Math.min(100, gameState.health + gameState.currentGoal.reward[key]);
} else if (key === 'mental') {
gameState.mental = Math.min(100, gameState.mental + gameState.currentGoal.reward[key]);
} else if (key === 'money') {
gameState.money += gameState.currentGoal.reward[key];
}
}
showNotification("阶段目标达成!获得奖励!", "good");
} else {
showNotification("阶段目标未达成,继续努力!", "bad");
}
// 清空当前目标
gameState.currentGoal = null;
gameState.goalProgress = 0;
}
}
// 显示目标更新弹窗
function showGoalModal(goal) {
const modal = document.getElementById('goal-modal');
elements.goalContent.innerHTML = `
<div class="goal-item">
<h4>${goal.title}</h4>
<p>${goal.desc}</p>
<p style="color: var(--warning); margin-top: 5px;">⚠️ 请在下个阶段检查点前努力达成!</p>
</div>
`;
modal.style.display = 'flex';
}
// 显示目标结果弹窗
function showGoalResultModal(goal, achieved) {
const modal = document.getElementById('goal-modal');
const className = achieved ? 'achieved' : 'failed';
const statusText = achieved ? '✅ 已达成' : '❌ 未达成';
const rewardText = achieved && goal.reward ?
`<p style="color: var(--secondary); margin-top: 8px;">奖励:${Object.entries(goal.reward).map(([k, v]) => `${k}+${v}`).join('、')}</p>` :
'';
elements.goalContent.innerHTML = `
<div class="goal-item ${className}">
<h4>${goal.title} ${statusText}</h4>
<p>${goal.desc}</p>
${rewardText}
</div>
`;
modal.style.display = 'flex';
}
// 检查特殊日子
function checkSpecialDay() {
const week = gameState.week;
if (week === 1) {
addToLog("AFO第一天,一切都是新的开始。", "story");
} else if (week === 4) {
addToLog("一个月过去了,你已经适应了文化课生活。", "neutral");
} else if (week === 10) {
addToLog("百日纪念!你已经坚持了100天!", "good");
showNotification("百日纪念!继续加油!", "good");
} else if (week === 18) {
addToLog("高考倒计时180天誓师大会!", "neutral");
showNotification("重要里程碑:距离高考还有180天!", "neutral");
} else if (week === 24) {
addToLog("进入第二学期,冲刺阶段开始。", "neutral");
} else if (week === 36) {
addToLog("最后冲刺阶段!65天倒计时!", "neutral");
showNotification("冲刺阶段开始!保持状态!", "neutral");
} else if (week === 48) {
addToLog("最后4周,调整心态,准备迎接挑战。", "neutral");
} else if (week === 51) {
addToLog("高考前夜,你准备好了吗?", "story");
}
// 每月1号检查
if (week % 4 === 0) {
addToLog(`第${Math.floor(week / 4) + 1}个月开始,总结一下这个月的进步吧。`, "neutral");
}
}
// 成就系统
function unlockAchievement(achievementId) {
if (gameState.achievements.has(achievementId)) return;
gameState.achievements.add(achievementId);
const achievement = achievements[achievementId];
if (achievement) {
// 显示成就详情弹窗(只显示新解锁的)
showAchievementUnlockModal(achievement);
}
}
// 显示成就解锁弹窗
function showAchievementUnlockModal(achievement) {
const modal = document.getElementById('achievement-modal');
elements.achievementDetailContent.innerHTML = `
<div class="achievement-detail-item">
<div class="name">🏆 ${achievement.name}</div>
<div class="desc">${achievement.desc}</div>
</div>
`;
modal.style.display = 'flex';
}
// 显示成就详情(点击按钮)
function showAchievementDetail() {
const modal = document.getElementById('achievement-modal');
let html = '';
// 显示所有已解锁成就
const unlocked = Array.from(gameState.achievements).map(id => ({ id, ...achievements[id] }));
const hidden = Object.entries(achievements).filter(([id, a]) => a.hidden && !gameState.achievements.has(id));
if (unlocked.length === 0) {
html = '<div style="text-align:center;opacity:0.7;">暂无成就</div>';
} else {
html += '<div style="margin-bottom:10px;font-weight:bold;color:var(--secondary);">已解锁成就:</div>';
unlocked.forEach(a => {
html += `
<div class="achievement-detail-item">
<div class="name">🏆 ${a.name}</div>
<div class="desc">${a.desc}</div>
</div>
`;
});
}
if (hidden.length > 0) {
html += '<div style="margin:15px 0 10px 0;font-weight:bold;color:var(--purple);">未解锁隐藏成就:</div>';
hidden.forEach(([id, a]) => {
html += `
<div class="achievement-detail-item hidden">
<div class="name">🔒 ???</div>
<div class="desc">隐藏成就,需要特殊条件解锁</div>
</div>
`;
});
}
elements.achievementDetailContent.innerHTML = html;
modal.style.display = 'flex';
}
// 检查成就
function checkAchievements() {
// 基础进度
if (gameState.week === 1) unlockAchievement('first-week');
if (gameState.week === 4) unlockAchievement('first-month');
// 累计时长
if (gameState.totalStudyHours >= 100) unlockAchievement('study-100');
if (gameState.totalRestHours >= 50) unlockAchievement('rest-50');
if (gameState.totalExerciseHours >= 30) unlockAchievement('exercise-30');
if (gameState.totalSocialHours >= 20) unlockAchievement('social-20');
// 状态
if (gameState.energy >= 100) unlockAchievement('energy-100');
if (gameState.stress === 0) unlockAchievement('stress-0');
if (gameState.health >= 100) unlockAchievement('health-100');
if (gameState.mental >= 100) unlockAchievement('mental-100');
if (gameState.money >= 1000) unlockAchievement('money-1000');
if (gameState.money === 0) unlockAchievement('money-0');
// 学科
if (gameState.subjects.chinese >= 80) unlockAchievement('chinese-80');
if (gameState.subjects.math >= 90) unlockAchievement('math-90');
if (gameState.subjects.english >= 80) unlockAchievement('english-80');
if (gameState.subjects.physics >= 90) unlockAchievement('physics-90');
if (gameState.subjects.chemistry >= 80) unlockAchievement('chemistry-80');
if (gameState.subjects.biology >= 80) unlockAchievement('biology-80');
const all85 = Object.values(gameState.subjects).every(s => s >= 85);
if (all85) unlockAchievement('all-85');
const all95 = Object.values(gameState.subjects).every(s => s >= 95);
if (all95) unlockAchievement('all-95');
// 关系
if (gameState.relationships.teacher >= 90) unlockAchievement('teacher-90');
if (gameState.relationships.mathTeacher >= 90) unlockAchievement('math-teacher-90');
if (gameState.relationships.parents >= 90) unlockAchievement('parents-90');
if (gameState.relationships.crush >= 60) unlockAchievement('crush-60');
if (gameState.relationships.classmateA >= 90 || gameState.relationships.classmateB >= 90) unlockAchievement('classmate-90');
// 活动
if (gameState.examCount >= 5) unlockAchievement('exam-5');
const completedHomework = Object.values(gameState.homework).filter(v => v).length;
if (completedHomework >= 100) unlockAchievement('homework-100');
if (gameState.totalActivities >= 20) unlockAchievement('activity-20');
if (gameState.memoryCount >= 10) unlockAchievement('memory-10');
// 特殊
if (gameState.stress < 10 && gameState.week >= 10) unlockAchievement('stress-management');
if (gameState.energy > 90 && gameState.week >= 5) unlockAchievement('early-bird');
if (gameState.energy < 10) unlockAchievement('night-owl');
if (gameState.totalStudyHours >= 50 && gameState.money >= 500) unlockAchievement('money-maker');
// 故事
if (gameState.storyProgress >= 5) unlockAchievement('story-5');
}
// 游戏结束
function endGame() {
gameState.gameOver = true;
// 计算最终成绩
let totalScore = 0;
for (const subject in gameState.subjects) {
totalScore += gameState.subjects[subject];
}
totalScore = Math.round(totalScore / 6);
// 计算最终评价和结局
let result = "";
let ending = "";
let endingId = "";
let endingType = "neutral";
// 多维度评估
const avgScore = totalScore;
const stressLevel = gameState.stress;
const healthLevel = gameState.health;
const mentalLevel = gameState.mental;
const relTotal = gameState.relationships.teacher + gameState.relationships.classmates + gameState.relationships.parents + gameState.relationships.crush;
const money = gameState.money;
// 结局分支(25+结局)
if (avgScore >= 95 && stressLevel < 30 && mentalLevel > 80) {
result = "顶尖大学 + 心理健康";
ending = "你以惊人的成绩考入了顶尖大学,更重要的是,你保持了心理健康和人际关系。这段AFO经历让你成为了一个更完整的人。你不仅学会了知识,更学会了如何面对人生。";
endingId = 'ending-1';
endingType = "good";
} else if (avgScore >= 90) {
result = "顶尖大学";
ending = "你以优异的成绩考入了理想的顶尖大学,实现了从竞赛生到文化课学霸的华丽转身!你的努力和智慧得到了最好的回报。这段AFO经历让你更加成熟,未来可期。";
endingId = 'ending-1';
endingType = "good";
} else if (avgScore >= 85 && gameState.relationships.crush >= 60) {
result = "重点大学 + 爱情";
ending = "你和crush一起考入了重点大学,实现了学业和爱情的双丰收。这段AFO旅程不仅让你成长,还让你收获了珍贵的感情。";
endingId = 'ending-hidden-1';
endingType = "good";
} else if (avgScore >= 80) {
result = "重点大学";
ending = "你成功考入了重点大学,证明了自己在文化课上的实力。虽然过程艰辛,但你坚持到了最后。这段经历让你明白,人生不止一条路,每条路都能通向成功。";
endingId = 'ending-2';
endingType = "good";
} else if (avgScore >= 75 && gameState.relationships.parents >= 80) {
result = "一本大学 + 家庭和睦";
ending = "你考上了一本大学,更重要的是,你与父母达成了深刻的理解。这段AFO经历让你们的家庭关系更加紧密。父母为你骄傲,不是因为成绩,而是因为你的成长。";
endingId = 'ending-hidden-2';
endingType = "good";
} else if (avgScore >= 70) {
result = "一本大学";
ending = "你考上了一本大学,这是一个不错的成绩。虽然可能不是最理想的结果,但你已经尽力了。AFO让你学会了适应和坚持,这比分数更重要。";
endingId = 'ending-3';
endingType = "neutral";
} else if (avgScore >= 65 && gameState.mental >= 80) {
result = "二本大学 + 自我救赎";
ending = "虽然成绩只够二本,但你在这个过程中完成了自我救赎。你找到了自己的价值,不再被竞赛的光环或失败的阴影束缚。你学会了接纳自己,这才是最大的成功。";
endingId = 'ending-hidden-3';
endingType = "neutral";
} else if (avgScore >= 60) {
result = "二本大学";
ending = "你考上了二本大学。这个结果提醒你,文化课学习需要持续的努力,但至少你迈过了高考这道坎。未来还有无限可能,考研、工作都是新的起点。";
endingId = 'ending-4';
endingType = "neutral";
} else {
// 特殊结局分支
if (gameState.relationships.crush >= 60 && gameState.relationships.classmateA >= 80) {
result = "爱情与友情";
ending = "虽然高考成绩不理想,但你收获了珍贵的友情和爱情。你决定和TA一起复读,或者选择一所能在一起的大学。人生不止考试,还有陪伴。";
endingId = 'ending-12';
endingType = "neutral";
} else if (gameState.memoryCount >= 5 && gameState.subjects.math >= 70) {
result = "竞赛回归";
ending = "高考失利后,你重新回到了信息学的世界。这一次,你带着文化课的沉淀和更成熟的心态,或许能在竞赛路上走得更远。有些热爱,从未熄灭。";
endingId = 'ending-6';
endingType = "neutral";
} else if (gameState.relationships.parents < 30) {
result = "独立之路";
ending = "与父母的期望背道而驰,你选择了一条更自由的路。也许是创业,也许是打工,你决定用自己的方式证明价值。这需要勇气,但你准备好了。";
endingId = 'ending-7';
endingType = "neutral";
} else if (gameState.totalActivities >= 15) {
result = "艺术特长";
ending = "你在各种活动中发现了自己在艺术方面的天赋,决定走艺术特长生的道路。虽然不是传统的成功,但你找到了自己的热爱。";
endingId = 'ending-8';
endingType = "neutral";
} else if (gameState.health >= 90 && gameState.totalExerciseHours >= 20) {
result = "体育特招";
ending = "你的身体素质非常出色,被体育院校特招。虽然放弃了文化课,但你在另一个领域找到了自己的价值。";
endingId = 'ending-9';
endingType = "neutral";
} else if (gameState.money >= 1000) {
result = "出国深造";
ending = "你攒够了钱,决定出国留学。换个环境,重新开始。也许国外的教育更适合你,也许这只是逃避,但无论如何,你选择了新的道路。";
endingId = 'ending-10';
endingType = "neutral";
} else if (gameState.stress > 80) {
result = "间隔年";
ending = "你决定给自己一个间隔年,不参加高考,去旅行、去思考、去寻找自己真正想要的。这不是失败,而是为了更好的出发。";
endingId = 'ending-11';
endingType = "neutral";
} else {
result = "未能如愿";
ending = "高考成绩不理想,你未能达到预期的目标。但这不代表失败,AFO只是人生的一个阶段。未来的路还很长,重要的是你学会了面对挫折。";
endingId = 'ending-5';
endingType = "bad";
}
}
// 解锁结局成就
unlockAchievement(endingId);
// 显示结束画面
const mainDiv = document.querySelector('.main');
mainDiv.innerHTML = `
<div class="end-screen">
<h2>🎓 高考结束</h2>
<div class="final-score">${totalScore}分</div>
<p>最终平均能力值</p>
<h3>结果:${result}</h3>
<div class="ending-text">${ending}</div>
<div class="stats-summary">
<div class="stat-box">
<div class="label">总学习时长</div>
<div class="value">${gameState.totalStudyHours}h</div>
</div>
<div class="stat-box">
<div class="label">总休息时长</div>
<div class="value">${gameState.totalRestHours}h</div>
</div>
<div class="stat-box">
<div class="label">参加模考</div>
<div class="value">${gameState.examCount}次</div>
</div>
<div class="stat-box">
<div class="label">完成作业</div>
<div class="value">${Object.values(gameState.homework).filter(v => v).length}次</div>
</div>
<div class="stat-box">
<div class="label">参加活动</div>
<div class="value">${gameState.totalActivities}次</div>
</div>
<div class="stat-box">
<div class="label">回忆往事</div>
<div class="value">${gameState.memoryCount}次</div>
</div>
</div>
<p style="margin-top: 20px; font-size: 0.9rem; opacity: 0.7;">
你的高中生涯画上了句号。无论结果如何,这段旅程都将成为你人生中宝贵的经历。<br>
感谢游玩!本游戏采用<a href="https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode.zh-Hans"
target="_blank" style="color: rgb(196, 196, 196)">CC BY-NC-ND 4.0</a>协议,作者:wujiahaocoder
</p>
<button class="restart-btn" onclick="location.reload()">🔄 重新开始</button>
</div>`;
// 隐藏操作按钮和计数器
document.querySelector('.actions').style.display = 'none';
document.getElementById('actionCounter').style.display = 'none';
showNotification(`高考结束!${result}`, endingType);
}
// ==================== 模态框控制 ====================
function openModal(modalId) {
// 检查操作限制(故事模态框除外)
if (modalId !== 'story-modal' && modalId !== 'goal-modal' && modalId !== 'achievement-modal' && !checkActionLimit()) {
return;
}
// 特殊处理
if (modalId === 'homework-modal') {
updateHomeworkList();
} else if (modalId === 'economy-modal') {
elements.currentMoney.textContent = gameState.money;
}
document.getElementById(modalId).style.display = 'flex';
}
function closeModal(modalId) {
document.getElementById(modalId).style.display = 'none';
}
// 更新作业列表
function updateHomeworkList() {
const homeworkList = Object.entries(gameState.homework).filter(([sub, done]) => !done);
const listDiv = elements.homeworkList;
if (homeworkList.length === 0) {
listDiv.innerHTML = '<div style="opacity:0.6;">本周作业已完成!</div>';
return;
}
listDiv.innerHTML = '<div style="margin-bottom:10px;font-weight:bold;">未完成作业:</div>';
homeworkList.forEach(([subject, _]) => {
const name = { chinese: '语文', math: '数学', english: '英语', physics: '物理', chemistry: '化学', biology: '生物' }[subject];
const div = document.createElement('div');
div.style.padding = '4px 0';
div.textContent = `• ${name}`;
listDiv.appendChild(div);
});
}
// ==================== 事件监听器 ====================
// 按钮事件(添加防抖)
let buttonCooldown = false;
function handleButtonClick(action) {
if (buttonCooldown) return;
buttonCooldown = true;
// 执行动作
action();
// 1秒后解除冷却
setTimeout(() => {
buttonCooldown = false;
}, 1000);
}
document.getElementById('study-btn').addEventListener('click', () => handleButtonClick(() => openModal('study-modal')));
document.getElementById('rest-btn').addEventListener('click', () => handleButtonClick(() => openModal('rest-modal')));
document.getElementById('exercise-btn').addEventListener('click', () => handleButtonClick(exercise));
document.getElementById('social-btn').addEventListener('click', () => handleButtonClick(social));
document.getElementById('memory-btn').addEventListener('click', () => handleButtonClick(memory));
document.getElementById('exam-btn').addEventListener('click', () => handleButtonClick(takeExam));
document.getElementById('homework-btn').addEventListener('click', () => handleButtonClick(() => openModal('homework-modal')));
document.getElementById('activity-btn').addEventListener('click', () => handleButtonClick(() => openModal('activity-modal')));
document.getElementById('economy-btn').addEventListener('click', () => handleButtonClick(() => openModal('economy-modal')));
document.getElementById('end-btn').addEventListener('click', () => handleButtonClick(endWeek));
// 点击模态框外部关闭
window.addEventListener('click', (e) => {
if (e.target.classList.contains('modal')) {
e.target.style.display = 'none';
}
});
// 键盘快捷键
document.addEventListener('keydown', (e) => {
if (gameState.gameOver) return;
// Shift键显示提示
if (e.key === 'Shift') {
elements.hotkeyHint.classList.add('show');
return;
}
// 快捷键(添加防抖)
if (buttonCooldown) return;
buttonCooldown = true;
switch (e.key) {
case '1': openModal('study-modal'); break;
case '2': openModal('rest-modal'); break;
case '3': exercise(); break;
case '4': social(); break;
case '5': memory(); break;
case '6': takeExam(); break;
case '7': openModal('homework-modal'); break;
case '8': openModal('activity-modal'); break;
case '9': openModal('economy-modal'); break;
case '0': endWeek(); break;
case 'Escape':
document.querySelectorAll('.modal').forEach(m => m.style.display = 'none');
break;
}
setTimeout(() => {
buttonCooldown = false;
}, 1000);
});
// Shift键释放隐藏提示
document.addEventListener('keyup', (e) => {
if (e.key === 'Shift') {
elements.hotkeyHint.classList.remove('show');
}
});
// 启动游戏
window.onload = initGame;
</script>
</body>
</html>