systems rework: buffs, prestige graph, research, modular architecture
Decouples core systems from centralized globals in favor of catalogue-based architecture and data-driven content. Key changes: - Prestige: node-based buff tech tree, graph panel, progress bar - Research: multi-worker system, per-generator research, xp generation - Ascension: meta-currency layer via multi-currency prestige resets - Buffs: refactored as generator-independent via catalogues - UI: currency panel, edge-scrolling camera + zoom, current-goal panel - Alchemy Tower: crafting building with recipe/cost system - Testing: 7 test suites (ascension, prestige, research, goals) - Content: migrated from hardcoded idles/ to gym format (tiny_sword)
This commit was merged in pull request #1.
This commit is contained in:
61
test_multi_currency_prestige.gd
Normal file
61
test_multi_currency_prestige.gd
Normal file
@@ -0,0 +1,61 @@
|
||||
@tool
|
||||
extends Node
|
||||
|
||||
func _ready() -> void:
|
||||
if not Engine.is_editor_hint():
|
||||
test_multi_currency_prestige()
|
||||
get_tree().quit()
|
||||
|
||||
func test_multi_currency_prestige() -> void:
|
||||
var game_state: LevelGameState = find_child("LevelGameState")
|
||||
var prestige_manager: PrestigeManager = game_state.find_child("PrestigeManager")
|
||||
|
||||
print("\n=== MULTI-CURRENCY PRESTIGE TEST ===\n")
|
||||
|
||||
# Check config
|
||||
var config = prestige_manager.get_config()
|
||||
var basis_type = config.get("basis", 0)
|
||||
print("Basis type: %d (expected 3 for ALL_CURRENCIES)" % basis_type)
|
||||
|
||||
# Check tracked currencies
|
||||
var tracked_ids = prestige_manager.get_tracked_currency_ids()
|
||||
print("Tracked currency IDs: %s" % str(tracked_ids))
|
||||
|
||||
# Add some test currency amounts
|
||||
var gold = game_state.get_currency_amount_by_id(&"gold")
|
||||
print("Initial gold: %s" % gold.to_string_suffix(2))
|
||||
|
||||
# Simulate earning currencies
|
||||
game_state.add_currency_by_id(&"gold", BigNumber.from_float(1000.0))
|
||||
game_state.add_currency_by_id(&"wood", BigNumber.from_float(2000.0))
|
||||
game_state.add_currency_by_id(&"food", BigNumber.from_float(1500.0))
|
||||
game_state.add_currency_by_id(&"worker", BigNumber.from_float(500.0))
|
||||
|
||||
# Check total
|
||||
var total = prestige_manager.get_basis_value_for_display()
|
||||
print("Total currency sum: %s" % total.to_string_suffix(2))
|
||||
|
||||
# Check threshold
|
||||
var threshold = prestige_manager.get_next_prestige_threshold()
|
||||
print("Prestige threshold: %s" % threshold.to_string_suffix(2))
|
||||
|
||||
# Check if can prestige
|
||||
var can_prestige = prestige_manager.can_prestige()
|
||||
print("Can prestige: %s" % str(can_prestige))
|
||||
|
||||
# Check pending gain
|
||||
var pending_gain = prestige_manager.calculate_pending_gain()
|
||||
print("Pending gain: %s" % pending_gain.to_string_suffix(2))
|
||||
|
||||
# Perform prestige
|
||||
if can_prestige:
|
||||
var result = prestige_manager.perform_prestige()
|
||||
print("Prestige performed: %s" % str(result))
|
||||
|
||||
var total_prestige = prestige_manager.get_total_prestige()
|
||||
print("Total prestige earned: %s" % total_prestige.to_string_suffix(2))
|
||||
|
||||
var ascension = game_state.get_currency_amount_by_id(&"ascension")
|
||||
print("Ascension currency: %s" % ascension.to_string_suffix(2))
|
||||
|
||||
print("\n=== TEST COMPLETE ===\n")
|
||||
Reference in New Issue
Block a user