Who knows what
This commit is contained in:
parent
0fe23420ab
commit
9214d13054
422 changed files with 1412 additions and 4783 deletions
|
|
@ -16,6 +16,7 @@ extends Resource
|
|||
@export_enum("Linear", "Exponential") var cost_scaling_type: int = 1 # Default to Exponential
|
||||
@export var cost_scaling_multiplier: float = 1.5 # Exponential: multiplier per rank, Linear: flat increase
|
||||
@export var cost_linear_increase: int = 100 # Only used if cost_scaling_type is Linear
|
||||
@export var cost_ladder: Array[int] = [] # Fixed costs per rank (overrides scaling if defined)
|
||||
|
||||
@export_subgroup("Effect Scaling")
|
||||
@export_enum("Linear", "Exponential") var effect_scaling_type: int = 1 # Default to Exponential
|
||||
|
|
@ -29,7 +30,12 @@ extends Resource
|
|||
func get_next_cost() -> int:
|
||||
if not is_scaling:
|
||||
return base_cost
|
||||
|
||||
|
||||
# Use fixed cost ladder if defined (overrides scaling)
|
||||
if cost_ladder.size() > 0 and current_rank < cost_ladder.size():
|
||||
return cost_ladder[current_rank]
|
||||
|
||||
# Fallback to scaling formulas for backwards compatibility
|
||||
# Cost scaling should start from rank 0 (first purchase at base_cost)
|
||||
if cost_scaling_type == 0: # Linear
|
||||
return base_cost + (cost_linear_increase * current_rank)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue