feat: 断粮离宗(方案B),D6 全部完成;灵石矿贴图
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 7.5 MiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bvpgmj08hilgl"
|
||||
path="res://.godot/imported/灵石矿.png-ecb322a78c1d966bfd5ce47475fa7fb5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/ui/灵石矿.png"
|
||||
dest_files=["res://.godot/imported/灵石矿.png-ecb322a78c1d966bfd5ce47475fa7fb5.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
> 对应开发计划表 D6(8/8):① 灵石矿场景 ② 建造→产出 ③ 升级。交付标准:建筑产资源,升级加速。
|
||||
> 本文档只描述设计,不包含代码。
|
||||
> 状态:步骤 1–6 已实现(食物资源/HUD 灵米/开局赠送/建筑参数配置/Building+BuildingManager/BuildingsPanel/口粮消耗+饥饿减半),步骤 5 的离宗部分待接入
|
||||
> 状态:步骤 1–7 已实现(D6 全部完成:食物/开局/配置/建筑模型管理/面板/口粮饥饿离宗),步骤 7 整体挂机验证待 F5 手测
|
||||
|
||||
---
|
||||
|
||||
@@ -161,12 +161,12 @@ hunger_threshold_days=30 ; 断粮累计天数上限(达到即离宗)
|
||||
| 改动 | `src/Sect/buildings/Building.gd`(type/level + 价格产出计算,运行时读配置);`src/Sect/BuildingManager.gd`(建造/升级/每日产出/`buildings_changed` 信号);`project.godot` 注册 Autoload |
|
||||
| 验证 | ✅ 建造扣费入列、每日产出进 SectManager、升级后产出提升(10→15)、灵石不足拒绝 |
|
||||
|
||||
### 步骤 5:口粮消耗 + 饥饿惩罚 + 断粮离宗 🟡(前两部分已实现,离宗待接入)
|
||||
### 步骤 5:口粮消耗 + 饥饿惩罚 + 断粮离宗 ✅
|
||||
|
||||
| 项 | 内容 |
|
||||
|----|------|
|
||||
| 改动 | `Disciple.gd` 加 `hunger_days`;`CultivationManager.gd` 每日先结算口粮(消耗→饥饿累计),`_gain_exp` 乘饥饿倍率 |
|
||||
| 验证 | ✅ 模拟:充足 30 天食物精确扣减、饥饿清零;断粮 5 天饥饿=5、修为增量精确减半(10→5/日);恢复后清零。离宗(≥阈值移除)待接入 |
|
||||
| 改动 | `Disciple.gd` 加 `hunger_days`;`CultivationManager.gd` 每日先结算口粮(消耗→饥饿累计→离宗移除),`_gain_exp` 乘饥饿倍率 |
|
||||
| 验证 | ✅ 充足 30 天精确扣减清零;断粮饥饿累计、修为减半;第 30 天离宗(日志"断粮日久,离宗而去"+名录移除);恢复清零 |
|
||||
|
||||
### 步骤 6:BuildingsPanel UI + "资源"按钮接线 ✅
|
||||
|
||||
@@ -196,8 +196,8 @@ hunger_threshold_days=30 ; 断粮累计天数上限(达到即离宗)
|
||||
- [x] 灵石不足时建造/升级按钮禁用
|
||||
- [x] 等级达到上限后不可再升级
|
||||
- [x] 练气弟子每日消耗食物;断粮后饥饿天数累计、修炼速度减半
|
||||
- [ ] 断粮累计 30 天弟子离宗(名录移除 + 日志)
|
||||
- [ ] 食物恢复充足后饥饿清零
|
||||
- [x] 断粮累计 30 天弟子离宗(名录移除 + 日志)
|
||||
- [x] 食物恢复充足后饥饿清零
|
||||
- [ ] 建筑/饥饿数据为纯数据(可序列化,D8 存档接入)
|
||||
|
||||
---
|
||||
|
||||
@@ -20,7 +20,8 @@ func _on_day_passed(_year: int, _month: int, _day: int) -> void:
|
||||
_check_breakthrough(d)
|
||||
|
||||
## 每日口粮结算:练气弟子人均消耗灵米(筑基+辟谷豁免)。
|
||||
## 食物充足 → 扣减并饥饿清零;食物不足 → 归零并全员饥饿天数 +1。
|
||||
## 食物充足 → 扣减并饥饿清零;食物不足 → 归零并全员饥饿天数 +1;
|
||||
## 饥饿天数 ≥ 阈值(配置 hunger_threshold_days)→ 弟子离宗,从名录移除。
|
||||
func _settle_food() -> void:
|
||||
var eaters: Array[Disciple] = []
|
||||
for d in DiscipleManager.disciples:
|
||||
@@ -33,8 +34,14 @@ func _settle_food() -> void:
|
||||
d.hunger_days = 0
|
||||
return
|
||||
SectManager.remove_food(SectManager.food)
|
||||
var leavers: Array[Disciple] = []
|
||||
for d in eaters:
|
||||
d.hunger_days += 1
|
||||
if d.hunger_days >= GameConfig.hunger_threshold_days:
|
||||
leavers.append(d)
|
||||
for d in leavers:
|
||||
_log("%s 断粮日久,离宗而去" % d.name)
|
||||
DiscipleManager.remove_disciple(d)
|
||||
|
||||
## 按公式累计一日修为。
|
||||
## 速度 = 基础速度 × 资质倍率 × 灵根容量 × 天灵根加成 × 灵气浓度 × 饥饿倍率
|
||||
|
||||
Reference in New Issue
Block a user