diff --git a/scripts/WorldState.gd b/scripts/WorldState.gd index bff03b2..02da11a 100644 --- a/scripts/WorldState.gd +++ b/scripts/WorldState.gd @@ -3,4 +3,4 @@ extends Node @export var current_zone: Globals.World.Zone -@export var last_played: Dictionary +@export var last_played: float diff --git a/scripts/combat_ui_scene.gd b/scripts/combat_ui_scene.gd index b9d0f51..1838466 100644 --- a/scripts/combat_ui_scene.gd +++ b/scripts/combat_ui_scene.gd @@ -2,8 +2,8 @@ extends Control -var deltaCount := 0 -var enemyMoveSpeed := 5.0 +# var deltaCount := 0 +# var enemyMoveSpeed := 5.0 # var questComplete := false var canContinue := false @@ -23,7 +23,7 @@ func _ready() -> void: func _process(_delta: float) -> void: - deltaCount += 1 + # deltaCount += 1 if canContinue: _continue_show() @@ -34,7 +34,12 @@ func _create_area() -> void: move_child(worldArea, 0) func _on_button_test_pressed() -> void: - pass + # slowly increasing chance to get 1 + # bad luck protection for rare spawns, drops, etc. + var testVal := 0.0 + for i in range(1000): + testVal += 0.001 + print(testVal, bool(RandomNumberGenerator.new().rand_weighted([1, testVal]))) func _on_button_exit_pressed() -> void: