implement delivery ready indicator logic + off-color detection

This commit is contained in:
god
2026-07-06 02:41:37 +08:00
parent 717e8cedae
commit a7a4ca68aa
4 changed files with 99 additions and 14 deletions
+9 -2
View File
@@ -13,11 +13,18 @@ func initialize_random_goals(size: int, min_value: int, max_value: int, null_cou
var rng = RandomNumberGenerator.new()
rng.randomize()
const SPECIAL_VALUES = {1: 7, 2: 8, 3: 9, 4: 10}
if LobbyManager.game_mode == "Candy Survival":
var val = rng.randi_range(min_value, max_value)
var chosen_tile = val if not val in SPECIAL_VALUES else SPECIAL_VALUES[val]
for i in range(size):
goals.append(chosen_tile)
return goals
var null_val = 0
var max_nulls = 3
const SPECIAL_VALUES = {1: 7, 2: 8, 3: 9, 4: 10}
for i in range(size):
if null_val < max_nulls and rng.randf() < null_count:
goals.append(-1)