diff --git a/core/game_state.gd b/core/game_state.gd index da4e563..2d85956 100644 --- a/core/game_state.gd +++ b/core/game_state.gd @@ -130,18 +130,19 @@ func get_total_currency_acquired(currency: Resource) -> BigNumber: func get_total_currency_acquired_by_id(currency_id: StringName) -> BigNumber: return _get_total_currency_ref(currency_id) -func register_generator(generator_id: StringName, unlocked: bool = false, available: bool = false) -> void: +func register_generator(generator_id: StringName, unlocked: bool = false, available: bool = false, owned: int = 0) -> void: var key: String = String(generator_id) if key.is_empty(): return + var default_owned: int = _to_non_negative_int(owned, 0) if generator_states.has(key): var existing_raw: Variant = generator_states.get(key) if existing_raw is Dictionary: - generator_states[key] = _sanitize_generator_state(existing_raw, unlocked, available) + generator_states[key] = _sanitize_generator_state(existing_raw, unlocked, available, default_owned) return - var new_state: Dictionary = _default_generator_state(unlocked, available) + var new_state: Dictionary = _default_generator_state(unlocked, available, default_owned) generator_states[key] = new_state generator_state_changed.emit(StringName(key), new_state.duplicate(true)) @@ -446,10 +447,11 @@ func _set_total_currency(currency_id: StringName, value: BigNumber) -> void: return _total_currency_acquired[normalized_currency_id] = _copy_big_number(value) -func _default_generator_state(unlocked: bool, available: bool) -> Dictionary: +func _default_generator_state(unlocked: bool, available: bool, owned: int = 0) -> Dictionary: + var owned_value: int = _to_non_negative_int(owned, 0) return { - GENERATOR_OWNED_KEY: 0, - GENERATOR_PURCHASED_COUNT_KEY: 0, + GENERATOR_OWNED_KEY: owned_value, + GENERATOR_PURCHASED_COUNT_KEY: owned_value, GENERATOR_UNLOCKED_KEY: unlocked, GENERATOR_AVAILABLE_KEY: available, } @@ -457,19 +459,19 @@ func _default_generator_state(unlocked: bool, available: bool) -> Dictionary: func _get_generator_state(generator_id: StringName) -> Dictionary: var key: String = String(generator_id) if key.is_empty(): - return _default_generator_state(false, false) + return _default_generator_state(false, false, 0) if not generator_states.has(key): register_generator(generator_id) - var existing_raw: Variant = generator_states.get(key, _default_generator_state(false, false)) + var existing_raw: Variant = generator_states.get(key, _default_generator_state(false, false, 0)) if existing_raw is Dictionary: var state: Dictionary = existing_raw - var sanitized: Dictionary = _sanitize_generator_state(state, false, false) + var sanitized: Dictionary = _sanitize_generator_state(state, false, false, 0) generator_states[key] = sanitized return sanitized - var fallback: Dictionary = _default_generator_state(false, false) + var fallback: Dictionary = _default_generator_state(false, false, 0) generator_states[key] = fallback return fallback @@ -478,7 +480,7 @@ func _set_generator_state(generator_id: StringName, state: Dictionary) -> void: if key.is_empty(): return - var sanitized: Dictionary = _sanitize_generator_state(state, false, false) + var sanitized: Dictionary = _sanitize_generator_state(state, false, false, 0) generator_states[key] = sanitized generator_state_changed.emit(StringName(key), sanitized.duplicate(true)) @@ -668,8 +670,9 @@ func _deserialize_generator_state_entry(raw_state: Dictionary) -> Dictionary: return parsed_state -func _sanitize_generator_state(raw_state: Dictionary, default_unlocked: bool, default_available: bool) -> Dictionary: - var owned_value: int = _to_non_negative_int(raw_state.get(GENERATOR_OWNED_KEY, 0), 0) +func _sanitize_generator_state(raw_state: Dictionary, default_unlocked: bool, default_available: bool, default_owned: int = 0) -> Dictionary: + var normalized_default_owned: int = _to_non_negative_int(default_owned, 0) + var owned_value: int = _to_non_negative_int(raw_state.get(GENERATOR_OWNED_KEY, normalized_default_owned), normalized_default_owned) var purchased_value: int = _to_non_negative_int(raw_state.get(GENERATOR_PURCHASED_COUNT_KEY, owned_value), owned_value) return { diff --git a/core/generator/currency_generator.gd b/core/generator/currency_generator.gd index 9ca971f..4f10aa8 100644 --- a/core/generator/currency_generator.gd +++ b/core/generator/currency_generator.gd @@ -154,8 +154,12 @@ func can_buy(amount: int = 1) -> bool: if not is_available_to_player(): return false + var purchase_currency_id: StringName = get_purchase_currency_id() + if purchase_currency_id == &"": + return false + var cost: BigNumber = get_cost_for_amount(amount) - var current: BigNumber = _get_currency_amount() + var current: BigNumber = _get_currency_amount_by_id(purchase_currency_id) return current.is_greater_than(cost) or current.is_equal_to(cost) ## Attempts to buy `amount` units and emits purchase success/failure signals. @@ -164,11 +168,14 @@ func buy(amount: int = 1) -> bool: return false if not is_available_to_player(): return false + var purchase_currency_id: StringName = get_purchase_currency_id() + if purchase_currency_id == &"": + return false var safe_amount: int = maxi(amount, 1) var total_cost: BigNumber = get_cost_for_amount(safe_amount) - if not _spend_currency(total_cost): - purchase_failed.emit(safe_amount, total_cost, _get_currency_amount()) + if not _spend_currency_by_id(purchase_currency_id, total_cost): + purchase_failed.emit(safe_amount, total_cost, _get_currency_amount_by_id(purchase_currency_id)) return false owned += safe_amount @@ -182,8 +189,11 @@ func buy_max() -> int: return 0 if not is_available_to_player(): return 0 + var purchase_currency_id: StringName = get_purchase_currency_id() + if purchase_currency_id == &"": + return 0 - var available_currency: float = _big_number_to_float(_get_currency_amount()) + var available_currency: float = _big_number_to_float(_get_currency_amount_by_id(purchase_currency_id)) var estimated_max: int = data.max_affordable(owned, available_currency) if estimated_max <= 0: return 0 @@ -368,6 +378,13 @@ func get_generator_id() -> StringName: func get_currency_id() -> StringName: return GameState.get_currency_id(currency) +func get_purchase_currency_id() -> StringName: + var purchase_currency: Currency = _resolve_purchase_currency() + if purchase_currency == null: + return &"" + + return GameState.get_currency_id(purchase_currency) + ## True when the generator is both unlocked and available. func is_available_to_player() -> bool: return is_unlocked and is_available @@ -406,6 +423,12 @@ func _get_currency_amount() -> BigNumber: return BigNumber.from_float(0.0) return GameState.get_currency_amount(currency) +func _get_currency_amount_by_id(currency_id: StringName) -> BigNumber: + if currency_id == &"": + return BigNumber.from_float(0.0) + + return GameState.get_currency_amount_by_id(currency_id) + ## Safely converts finite float values into BigNumber costs. func _float_to_big_number(value: float) -> BigNumber: if value <= 0.0: @@ -439,6 +462,12 @@ func _resolve_buff_cost_currency_id(buff: GeneratorBuffData) -> StringName: return GameState.get_currency_id(cost_currency) +func _resolve_purchase_currency() -> Currency: + if data != null and data.purchase_currency != null: + return data.purchase_currency + + return currency + func _resolve_buff_target_currency_id(buff: GeneratorBuffData) -> StringName: if buff == null: return &"" @@ -501,7 +530,12 @@ func _ensure_registered() -> void: if _generator_id == &"": return - GameState.register_generator(_generator_id, _default_unlocked_state(), _default_available_state()) + GameState.register_generator( + _generator_id, + _default_unlocked_state(), + _default_available_state(), + _default_owned_state() + ) _register_buffs() _is_registered = true @@ -580,6 +614,11 @@ func _default_available_state() -> bool: return false return data.starts_available +func _default_owned_state() -> int: + if data == null: + return 0 + return maxi(data.initial_owned, 0) + ## Area2D callback: pointer entered generator interaction region. func _on_area_2d_mouse_entered() -> void: _mouse_entered = true diff --git a/core/generator/currency_generator.tscn b/core/generator/currency_generator.tscn index 8da43ad..641782f 100644 --- a/core/generator/currency_generator.tscn +++ b/core/generator/currency_generator.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" uid="uid://dtbxopw6ulhl8" path="res://core/generator/currency_generator.gd" id="1_4n4ca"] [ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="2_5tmvy"] -[ext_resource type="Resource" uid="uid://co0mcc2kvcpo5" path="res://idles/generators/primary_generator.tres" id="3_wx13b"] +[ext_resource type="Resource" uid="uid://co0mcc2kvcpo5" path="res://idles/generators/orb.tres" id="3_wx13b"] [ext_resource type="Texture2D" uid="uid://bgtt3wu43tajh" path="res://icon.svg" id="4_ruf1h"] [ext_resource type="PackedScene" uid="uid://ckos7f22pnmyh" path="res://generator_container.tscn" id="5_bb14m"] diff --git a/core/generator/currency_generator_data.gd b/core/generator/currency_generator_data.gd index aa67f3d..3586206 100644 --- a/core/generator/currency_generator_data.gd +++ b/core/generator/currency_generator_data.gd @@ -10,6 +10,8 @@ enum UnlockGoalBehavior { @export var name: String = "" @export var starts_unlocked: bool = true @export var starts_available: bool = true +@export var initial_owned: int = 0 +@export var purchase_currency: Currency @export var unlock_goal: GoalData @export var unlock_goal_behavior: UnlockGoalBehavior = UnlockGoalBehavior.AUTOMATIC diff --git a/docs/museums/generator_museum.tscn b/docs/gyms/generator_gym.tscn similarity index 61% rename from docs/museums/generator_museum.tscn rename to docs/gyms/generator_gym.tscn index 5dd7674..2a78f8a 100644 --- a/docs/museums/generator_museum.tscn +++ b/docs/gyms/generator_gym.tscn @@ -2,12 +2,14 @@ [ext_resource type="PackedScene" uid="uid://jeoiinukrrsp" path="res://core/generator/currency_generator.tscn" id="1_6pne4"] [ext_resource type="Resource" uid="uid://bnhqk8b31mm4e" path="res://idles/currencies/knowledge.tres" id="2_8qilt"] -[ext_resource type="Resource" uid="uid://04pmc034qupd" path="res://idles/generators/secondary_generator.tres" id="3_4ly0e"] +[ext_resource type="Resource" uid="uid://04pmc034qupd" path="res://idles/generators/library.tres" id="3_4ly0e"] +[ext_resource type="Resource" uid="uid://cythfovqgqlyh" path="res://idles/currencies/wood.tres" id="4_2xpf5"] [ext_resource type="PackedScene" uid="uid://btkxru2gdjsgc" path="res://currency_tile.tscn" id="4_6ri4a"] [ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="5_dl3gy"] +[ext_resource type="Resource" uid="uid://df5k58yu1g6rf" path="res://idles/generators/forestry.tres" id="5_u3cug"] [ext_resource type="PackedScene" uid="uid://dirvi76rkoowf" path="res://goals_debug_ui.tscn" id="7_7i63j"] -[node name="GeneratorMuseum" type="Node2D" unique_id=1219373683] +[node name="GeneratorGym" type="Node2D" unique_id=1219373683] [node name="MagicGenerator" parent="." unique_id=967969064 instance=ExtResource("1_6pne4")] position = Vector2(249, 301) @@ -17,6 +19,14 @@ visible = false position = Vector2(262, 626) currency = ExtResource("2_8qilt") data = ExtResource("3_4ly0e") +press_buys_generator = false + +[node name="WoodGenerator" parent="." unique_id=29858558 instance=ExtResource("1_6pne4")] +visible = false +position = Vector2(969, 304) +currency = ExtResource("4_2xpf5") +data = ExtResource("5_u3cug") +press_buys_generator = false [node name="UI" type="Control" parent="." unique_id=452530906] layout_mode = 3 @@ -24,19 +34,26 @@ anchors_preset = 0 offset_right = 40.0 offset_bottom = 40.0 -[node name="GoldCurrencyTile" parent="UI" unique_id=1440583137 instance=ExtResource("4_6ri4a")] +[node name="MagicCurrencyTile" parent="UI" unique_id=1440583137 instance=ExtResource("4_6ri4a")] layout_mode = 0 offset_right = 160.0 offset_bottom = 31.0 currency = ExtResource("5_dl3gy") -[node name="GemsCurrencyTile" parent="UI" unique_id=1977342362 instance=ExtResource("4_6ri4a")] +[node name="KnowledgeCurrencyTile" parent="UI" unique_id=1977342362 instance=ExtResource("4_6ri4a")] layout_mode = 0 offset_top = 28.0 offset_right = 160.0 offset_bottom = 59.0 currency = ExtResource("2_8qilt") +[node name="WoodCurrencyTile" parent="UI" unique_id=1210103101 instance=ExtResource("4_6ri4a")] +layout_mode = 0 +offset_top = 59.0 +offset_right = 160.0 +offset_bottom = 90.0 +currency = ExtResource("4_2xpf5") + [node name="GoalsDebugUI" parent="UI" unique_id=4710697 instance=ExtResource("7_7i63j")] layout_mode = 1 offset_left = 1253.0 diff --git a/generator_container.gd b/generator_container.gd index 176b6cf..4384765 100644 --- a/generator_container.gd +++ b/generator_container.gd @@ -152,7 +152,11 @@ func _refresh_generator_ui() -> void: _buy_max_button.disabled = not can_interact _owned_value.text = str(_generator.owned) - _next_cost_value.text = _generator.get_next_cost().to_string_suffix(2) if can_interact else "-" + if can_interact: + var purchase_currency_name: String = GameState.get_currency_name(_generator.get_purchase_currency_id()) + _next_cost_value.text = "%s %s" % [_generator.get_next_cost().to_string_suffix(2), purchase_currency_name] + else: + _next_cost_value.text = "-" var production_per_second: float = 0.0 if _generator.data != null and can_interact: diff --git a/idles/buffs/bigger_forest.tres b/idles/buffs/bigger_forest.tres new file mode 100644 index 0000000..5b4050e --- /dev/null +++ b/idles/buffs/bigger_forest.tres @@ -0,0 +1,18 @@ +[gd_resource type="Resource" script_class="GeneratorBuffData" format=3 uid="uid://mvgfe3nc7uwa"] + +[ext_resource type="Resource" uid="uid://bnhqk8b31mm4e" path="res://idles/currencies/knowledge.tres" id="1_1db6v"] +[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="2_pg1j1"] +[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="3_t80he"] +[ext_resource type="Resource" uid="uid://bmlhoeasl7xor" path="res://idles/goals/magic_total_13k.tres" id="4_83vra"] + +[resource] +script = ExtResource("3_t80he") +id = &"bigger_forest" +text = "Bigger Forest" +max_level = 10 +unlock_goal = ExtResource("4_83vra") +effect_increment = 1.0 +cost_currency = ExtResource("1_1db6v") +base_cost_mantissa = 250.0 +cost_multiplier = 1.7 +resource_target_currency = ExtResource("2_pg1j1") diff --git a/idles/buffs/library_auto_flux.tres b/idles/buffs/library_auto_flux.tres new file mode 100644 index 0000000..7608580 --- /dev/null +++ b/idles/buffs/library_auto_flux.tres @@ -0,0 +1,18 @@ +[gd_resource type="Resource" script_class="GeneratorBuffData" format=3 uid="uid://tu63jy51yigb"] + +[ext_resource type="Resource" uid="uid://bnhqk8b31mm4e" path="res://idles/currencies/knowledge.tres" id="1_78qkq"] +[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="2_b57xf"] +[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="3_nc8nr"] +[ext_resource type="Resource" uid="uid://bmlhoeasl7xor" path="res://idles/goals/magic_total_13k.tres" id="4_78qkq"] + +[resource] +script = ExtResource("3_nc8nr") +id = &"library_auto_flux" +text = "Library Dynamo" +max_level = 10 +unlock_goal = ExtResource("4_78qkq") +effect_increment = 1.0 +cost_currency = ExtResource("1_78qkq") +base_cost_mantissa = 100.0 +cost_multiplier = 1.7 +resource_target_currency = ExtResource("2_b57xf") diff --git a/idles/buffs/magic_supply_cache.tres b/idles/buffs/magic_supply_cache.tres deleted file mode 100644 index 882803e..0000000 --- a/idles/buffs/magic_supply_cache.tres +++ /dev/null @@ -1,18 +0,0 @@ -[gd_resource type="Resource" script_class="GeneratorBuffData" format=3 uid="uid://cluds3cw1d65q"] - -[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_fvte4"] -[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="2_ea8w5"] - -[resource] -script = ExtResource("1_fvte4") -id = &"magic_supply_cache" -kind = 2 -text = "Mana Cache" -max_level = 25 -effect_increment = 0.0 -cost_currency = ExtResource("2_ea8w5") -base_cost_mantissa = 12.0 -cost_multiplier = 1.6 -resource_target_currency = ExtResource("2_ea8w5") -resource_purchase_base_mantissa = 12.0 -resource_purchase_increment_multiplier = 1.45 diff --git a/idles/buffs/magic_auto_flux.tres b/idles/buffs/orb_auto_flux.tres similarity index 60% rename from idles/buffs/magic_auto_flux.tres rename to idles/buffs/orb_auto_flux.tres index 22c88f5..858388e 100644 --- a/idles/buffs/magic_auto_flux.tres +++ b/idles/buffs/orb_auto_flux.tres @@ -1,16 +1,18 @@ [gd_resource type="Resource" script_class="GeneratorBuffData" format=3 uid="uid://ceugcxmassmpk"] +[ext_resource type="Resource" uid="uid://bnhqk8b31mm4e" path="res://idles/currencies/knowledge.tres" id="1_lnp8f"] [ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_r7ak1"] [ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="2_h3we5"] +[ext_resource type="Resource" uid="uid://qyxct5gbrxwa" path="res://idles/goals/magic_total_30.tres" id="4_000a0"] [resource] script = ExtResource("1_r7ak1") id = &"magic_auto_flux" text = "Arcane Dynamo" -max_level = 40 -unlocked = true -effect_increment = 0.15 -cost_currency = ExtResource("2_h3we5") +max_level = 10 +unlock_goal = ExtResource("4_000a0") +effect_increment = 1.0 +cost_currency = ExtResource("1_lnp8f") base_cost_mantissa = 25.0 cost_multiplier = 1.7 resource_target_currency = ExtResource("2_h3we5") diff --git a/idles/buffs/magic_click_focus.tres b/idles/buffs/orb_click_focus.tres similarity index 100% rename from idles/buffs/magic_click_focus.tres rename to idles/buffs/orb_click_focus.tres diff --git a/idles/currencies/wood.tres b/idles/currencies/wood.tres new file mode 100644 index 0000000..41b6ffa --- /dev/null +++ b/idles/currencies/wood.tres @@ -0,0 +1,10 @@ +[gd_resource type="Resource" script_class="Currency" format=3 uid="uid://cythfovqgqlyh"] + +[ext_resource type="Texture2D" uid="uid://bgtt3wu43tajh" path="res://icon.svg" id="1_t8m5x"] +[ext_resource type="Script" uid="uid://dtgqjf3bl7pm8" path="res://core/currency/currency.gd" id="2_137dc"] + +[resource] +script = ExtResource("2_137dc") +id = &"wood" +display_name = "Wood" +icon = ExtResource("1_t8m5x") diff --git a/idles/generators/forestry.tres b/idles/generators/forestry.tres new file mode 100644 index 0000000..fa5f692 --- /dev/null +++ b/idles/generators/forestry.tres @@ -0,0 +1,21 @@ +[gd_resource type="Resource" script_class="CurrencyGeneratorData" format=3 uid="uid://df5k58yu1g6rf"] + +[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_ffn26"] +[ext_resource type="Resource" uid="uid://mvgfe3nc7uwa" path="res://idles/buffs/bigger_forest.tres" id="2_rptf4"] +[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="4_rpydf"] +[ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="5_43n1y"] +[ext_resource type="Resource" uid="uid://bmlhoeasl7xor" path="res://idles/goals/magic_total_13k.tres" id="6_ffn26"] + +[resource] +script = ExtResource("5_43n1y") +id = &"Wood" +name = "Forestry" +starts_unlocked = false +starts_available = false +initial_owned = 1 +purchase_currency = ExtResource("4_rpydf") +unlock_goal = ExtResource("6_ffn26") +initial_cost = 200.0 +initial_productivity = 20.0 +buffs = Array[ExtResource("1_ffn26")]([ExtResource("2_rptf4")]) +metadata/_custom_type_script = "uid://b00tqsuhxdy0d" diff --git a/idles/generators/library.tres b/idles/generators/library.tres new file mode 100644 index 0000000..ee117c6 --- /dev/null +++ b/idles/generators/library.tres @@ -0,0 +1,24 @@ +[gd_resource type="Resource" script_class="CurrencyGeneratorData" format=3 uid="uid://04pmc034qupd"] + +[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_jemvk"] +[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="2_b1n9q"] +[ext_resource type="Resource" uid="uid://tu63jy51yigb" path="res://idles/buffs/library_auto_flux.tres" id="2_fcbji"] +[ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="3_xj12v"] +[ext_resource type="Resource" uid="uid://c4mkxj4ubhsi0" path="res://idles/goals/magic_total_1300.tres" id="4_1h03m"] + +[resource] +script = ExtResource("3_xj12v") +id = &"Knowledge" +name = "Library" +starts_unlocked = false +starts_available = false +initial_owned = 1 +purchase_currency = ExtResource("2_b1n9q") +unlock_goal = ExtResource("4_1h03m") +unlock_goal_behavior = 1 +initial_cost = 60.0 +initial_time = 3.0 +initial_revenue = 60.0 +initial_productivity = 20.0 +buffs = Array[ExtResource("1_jemvk")]([ExtResource("2_fcbji")]) +metadata/_custom_type_script = "uid://b00tqsuhxdy0d" diff --git a/idles/generators/primary_generator.tres b/idles/generators/orb.tres similarity index 58% rename from idles/generators/primary_generator.tres rename to idles/generators/orb.tres index 5f0de65..ee381ee 100644 --- a/idles/generators/primary_generator.tres +++ b/idles/generators/orb.tres @@ -2,15 +2,18 @@ [ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="1_c6y77"] [ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_t6lg0"] -[ext_resource type="Resource" uid="uid://ceugcxmassmpk" path="res://idles/buffs/magic_auto_flux.tres" id="2_x505b"] -[ext_resource type="Resource" uid="uid://6i3fcygusuqf" path="res://idles/buffs/magic_click_focus.tres" id="3_fsxdm"] -[ext_resource type="Resource" uid="uid://cluds3cw1d65q" path="res://idles/buffs/magic_supply_cache.tres" id="4_x2byu"] +[ext_resource type="Resource" uid="uid://ceugcxmassmpk" path="res://idles/buffs/orb_auto_flux.tres" id="2_x505b"] +[ext_resource type="Resource" uid="uid://6i3fcygusuqf" path="res://idles/buffs/orb_click_focus.tres" id="3_fsxdm"] +[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="4_jpwus"] +[ext_resource type="Resource" uid="uid://qyxct5gbrxwa" path="res://idles/goals/magic_total_30.tres" id="6_5v0af"] [resource] script = ExtResource("1_c6y77") id = &"Magic" name = "Magic Orb" -initial_time = 0.6 -initial_productivity = 1.67 -buffs = Array[ExtResource("1_t6lg0")]([ExtResource("2_x505b"), ExtResource("3_fsxdm"), ExtResource("4_x2byu")]) +purchase_currency = ExtResource("4_jpwus") +unlock_goal = ExtResource("6_5v0af") +initial_cost = 200.0 +initial_productivity = 20.0 +buffs = Array[ExtResource("1_t6lg0")]([ExtResource("2_x505b"), ExtResource("3_fsxdm")]) metadata/_custom_type_script = "uid://b00tqsuhxdy0d" diff --git a/idles/generators/secondary_generator.tres b/idles/generators/secondary_generator.tres deleted file mode 100644 index e67c8a3..0000000 --- a/idles/generators/secondary_generator.tres +++ /dev/null @@ -1,19 +0,0 @@ -[gd_resource type="Resource" script_class="CurrencyGeneratorData" format=3 uid="uid://04pmc034qupd"] - -[ext_resource type="Script" uid="uid://dnhocfsuvmeyb" path="res://core/generator/generator_buff_data.gd" id="1_d86db"] -[ext_resource type="Script" uid="uid://b00tqsuhxdy0d" path="res://core/generator/currency_generator_data.gd" id="1_s3g28"] -[ext_resource type="Resource" uid="uid://qyxct5gbrxwa" path="res://idles/goals/magic_total_30.tres" id="2_r2b8m"] - -[resource] -script = ExtResource("1_s3g28") -id = &"Knowledge" -name = "Library" -starts_unlocked = false -starts_available = false -unlock_goal = ExtResource("2_r2b8m") -unlock_goal_behavior = 1 -initial_cost = 60.0 -initial_time = 3.0 -initial_revenue = 60.0 -initial_productivity = 20.0 -metadata/_custom_type_script = "uid://b00tqsuhxdy0d" diff --git a/idles/goals/magic_350k_wood_20k.tres b/idles/goals/magic_350k_wood_20k.tres new file mode 100644 index 0000000..8262d37 --- /dev/null +++ b/idles/goals/magic_350k_wood_20k.tres @@ -0,0 +1,16 @@ +[gd_resource type="Resource" script_class="GoalData" format=3 uid="uid://oh1a4tneuons"] + +[ext_resource type="Script" uid="uid://r4js5eajolio" path="res://core/goals/goal_requirement_data.gd" id="1_pj6se"] +[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="2_lsxf0"] +[ext_resource type="Script" uid="uid://dx4kmh33rrkpy" path="res://core/goals/goal_data.gd" id="3_hyry2"] + +[sub_resource type="Resource" id="Resource_tvl3d"] +script = ExtResource("1_pj6se") +currency = ExtResource("2_lsxf0") +amount_mantissa = 1.3 +amount_exponent = 4 + +[resource] +script = ExtResource("3_hyry2") +id = &"magic_total_13k" +requirements = Array[ExtResource("1_pj6se")]([SubResource("Resource_tvl3d")]) diff --git a/idles/goals/magic_total_1300.tres b/idles/goals/magic_total_1300.tres index 0e805e4..49e8568 100644 --- a/idles/goals/magic_total_1300.tres +++ b/idles/goals/magic_total_1300.tres @@ -1,4 +1,4 @@ -[gd_resource type="Resource" script_class="GoalData" format=3 uid="uid://bmlhoeasl7xor"] +[gd_resource type="Resource" script_class="GoalData" format=3 uid="uid://c4mkxj4ubhsi0"] [ext_resource type="Script" uid="uid://dx4kmh33rrkpy" path="res://core/goals/goal_data.gd" id="1_b11ou"] [ext_resource type="Script" uid="uid://r4js5eajolio" path="res://core/goals/goal_requirement_data.gd" id="2_d507t"] diff --git a/idles/goals/magic_total_13k.tres b/idles/goals/magic_total_13k.tres new file mode 100644 index 0000000..c2eb65e --- /dev/null +++ b/idles/goals/magic_total_13k.tres @@ -0,0 +1,16 @@ +[gd_resource type="Resource" script_class="GoalData" format=3 uid="uid://bmlhoeasl7xor"] + +[ext_resource type="Script" uid="uid://r4js5eajolio" path="res://core/goals/goal_requirement_data.gd" id="1_185pw"] +[ext_resource type="Resource" uid="uid://brqaojindcxa5" path="res://idles/currencies/magic.tres" id="2_ox6xg"] +[ext_resource type="Script" uid="uid://dx4kmh33rrkpy" path="res://core/goals/goal_data.gd" id="3_ef7ki"] + +[sub_resource type="Resource" id="Resource_tvl3d"] +script = ExtResource("1_185pw") +currency = ExtResource("2_ox6xg") +amount_mantissa = 1.3 +amount_exponent = 4 + +[resource] +script = ExtResource("3_ef7ki") +id = &"magic_total_13k" +requirements = Array[ExtResource("1_185pw")]([SubResource("Resource_tvl3d")])