pretty happy with ladder movement right now

This commit is contained in:
derek
2025-01-17 16:04:03 -06:00
parent 5eb065830a
commit f74d599b64
11 changed files with 111 additions and 80 deletions

View File

@@ -210,14 +210,17 @@ func pickup_spawn(randomized):
4:
i_weight = 1.0 - clamp(float(player.ammo_reserve[str(i)]) / float(expected_ammo["rocket"]),0,1)
if i_weight > ammo_weight:
ammo_weight = i_weight + drop_chance_minimum
ammo_weight = i_weight
ammo_type_weight[i] = i_weight + drop_chance_minimum
pickup_type = HelperFuncs.weighted_random({"0" : ammo_weight, "1" : stamina_weight,"2" : health_weight,"3" : money_weight})
match pickup_type:
"0":
ammo_type = int(HelperFuncs.weighted_random(ammo_type_weight))
if ammo_type_weight.size() > 0:
ammo_type = int(HelperFuncs.weighted_random(ammo_type_weight))
else:
ammo_type = randi_range(0,4)
value = randi_range(1,20)
"1":
value = randi_range(int(player.MAX_STAMINA * .25),player.MAX_STAMINA)