pretty happy with ladder movement right now
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user