Files
windroost/p2_godot_sample/scripts/oath_rules_parity_test.gd
T
wushenghua 40c8f86f1e feat: oaths become distinct real rules (stage G, final flat system)
Continued PRODUCTION/51. Oaths were flat "+4% storm/+2% roster each":

- oath_rules.py / .gd: 26 oaths -> 18 distinct combat rules (crit/elemental
  DoT/execute/armor-break/combo/energy/cooldown/ultimate/summon/cleanse/click...)
  + 8 honest out-of-combat meta rules. O14 scoped to ultimate only.
- hero_skill_loader gained active_oaths param (identity preserved); game_root
  injects profile.oaths on the live P3a path.
- test_oath_rules.py PASS 7 checks; check_oath_rules_parity.py PASS 9 cases
  python==gd; run_oath_rules_ui_test.sh PASS in real game_root (O03 adds 4
  poison effects/22 events, O13 cooldown x0.8, meta O09 no change).
- 3 new gates; full P2_CHECKS_PASS (88 gates), identity preserved.

ALL 7 STAGES COMPLETE (A-G). Every previously-flattened system now has real
differentiated mechanisms, dual-engine parity, focused/distinctness gates, and
live-runtime proof: skills, talents, edicts, enemy/boss mechanics, relics, oaths.
Achievements verified to already be genuinely differentiated. prototype/ untracked.
2026-11-19 14:27:13 +08:00

29 lines
966 B
GDScript

extends SceneTree
## Stage G emitter: oath rule skill rewrites for parity.
const HeroSkillLoader = preload("res://scripts/hero_skill_loader.gd")
const OUTPUT_PATH := "res://artifacts/oath_rules_parity_gd.json"
func _init() -> void:
_run.call_deferred()
func _run() -> void:
var skill_data := HeroSkillLoader.load_skill_data()
var hero_stats := HeroSkillLoader.load_hero_stats()
var results: Array = []
for oid in ["O01", "O03", "O04", "O06", "O13", "O14", "O16", "O22", "O09"]:
var skills := HeroSkillLoader.build_skills(["H01"], skill_data, hero_stats,
{}, {}, {}, {}, {oid: true})
results.append({"oath": oid, "skills": skills})
var dir := ProjectSettings.globalize_path("res://artifacts")
DirAccess.make_dir_recursive_absolute(dir)
var f := FileAccess.open(OUTPUT_PATH, FileAccess.WRITE)
if f != null:
f.store_string(JSON.stringify({"results": results}, "\t", true))
f.close()
print("OATH_PARITY_GD cases=%d" % results.size())
quit(0)