adjusted famira balancing

This commit is contained in:
pennyrigate 2024-06-11 19:30:24 -04:00
parent 7240402776
commit 9e8abe19ef
19 changed files with 128 additions and 41 deletions

View file

@ -5,16 +5,17 @@ signal died()
signal health_changed(amount)
export var push_speed: float = 60.0
export var chase_speed: float = 40.0
export var breath_dps: float = 50.0
export var push_speed: float = 30.0
export var chase_speed: float = 50.0
export var breath_dps: float = 20.0
export var breath_knockback: float = 16.0
export var punch_damage: float = 10.0
export var punch_knockback: float = 8.0
export var punch_damage: float = 8.0
export var punch_knockback: float = 40.0
export var hurting: bool = false
export var hp: float = 100.0
export var sg2083_beam_dps: float = 10.0
export var sg2083_path: NodePath
export var defense: float = 0.6
onready var animation_player: AnimationPlayer = $"%AnimationPlayer"
@ -22,7 +23,7 @@ onready var state_chart: StateChart = $StateChart
onready var in_range_cast: RayCast2D = $InRangeCast
onready var out_range_cast: RayCast2D = $OutRangeCast
onready var shoot_range_cast: RayCast2D = $ShootRangeCast
onready var grumble = $Grumble
func _physics_process(delta: float) -> void:
var sg2083 := get_node(sg2083_path)
@ -35,6 +36,8 @@ func _physics_process(delta: float) -> void:
state_chart.send_event("out_of_range")
elif in_range_cast.is_colliding():
state_chart.send_event("in_range")
if fmod(Game.time, 15.0) == 0.0:
Audio.play_sound(Audio.a_grumble,Audio.ac_boss)
func start_push() -> void:
@ -48,7 +51,7 @@ func stop_push() -> void:
func hurt(amount: float) -> void:
if hp <= 0.0:
return
hp -= amount
hp -= amount * defense
hp = max(hp, 0.0)
emit_signal("health_changed", hp)
if hp <= 0.0:
@ -64,6 +67,7 @@ func _attack() -> void:
func _on_Roar_state_entered() -> void:
animation_player.play("roar", 0.25)