feat: 大境界突破——练气圆满手动花费灵石突破至筑基及以上(D9 完成);失败灵石不返还+修为倒退,配置驱动;修复筑基圆满进度文本越界;文档同步(修炼设计四章/计划表/README)

This commit is contained in:
2026-08-10 00:55:05 +08:00
parent a9de46f1dd
commit 83fbd8fcfc
9 changed files with 245 additions and 43 deletions
+29 -6
View File
@@ -105,10 +105,33 @@ static func from_dict(data: Dictionary) -> Disciple:
return d
## 本层修炼进度文本,如 "1234 / 2000"(当前修为 / 本层门槛)。
## 练气圆满(13 层)返回"练气圆满"非练气期返回空串
## 练气圆满(13 层)返回"练气圆满"筑基及以上返回 "1234 / 6000"(小境门槛),圆满返回"筑基圆满"
func get_cultivation_progress_text() -> String:
if realm_index != 0:
return ""
if sub_realm_index >= GameConfig.level_thresholds.size():
return "练气圆满"
return "%d / %d" % [int(cultivation_exp), int(GameConfig.level_thresholds[sub_realm_index])]
if realm_index == 0:
if sub_realm_index >= GameConfig.level_thresholds.size():
return "练气圆满"
return "%d / %d" % [int(cultivation_exp), int(GameConfig.level_thresholds[sub_realm_index])]
if sub_realm_index >= GameConfig.realm_sub_thresholds.size():
return REALM_NAMES[realm_index] + "圆满"
return "%d / %d" % [int(cultivation_exp), int(GameConfig.realm_sub_thresholds[sub_realm_index])]
## 当前大境界是否修为圆满(练气 = 13 层;筑基及以上 = 4 小境修满)。
## 圆满后解锁"大境界突破"(玩家手动花费灵石)。
func is_realm_peak() -> bool:
if realm_index == 0:
return sub_realm_index >= GameConfig.level_thresholds.size()
return sub_realm_index >= GameConfig.realm_sub_thresholds.size() \
and cultivation_exp >= GameConfig.realm_sub_thresholds[GameConfig.realm_sub_thresholds.size() - 1]
## 目标大境界索引(realm_index+1);化神圆满(最高)返回 -1 表示无可突破。
func get_next_realm_index() -> int:
if realm_index + 1 >= REALM_NAMES.size():
return -1
return realm_index + 1
## 大境界突破所需灵石(按目标大境界索引读配置);无可突破返回 -1。
func get_realm_breakthrough_cost() -> int:
var next := get_next_realm_index()
if next < 0:
return -1
return GameConfig.realm_breakthrough_costs[next - 1]