This commit is contained in:
Marek Lenczewski
2026-03-30 22:56:58 +02:00
parent d6715e9c3f
commit 04749104a0
49 changed files with 1406 additions and 171 deletions

5
scripts/enemy/boss.gd Normal file
View File

@@ -0,0 +1,5 @@
extends "res://scripts/enemy/enemy.gd"
func _ready() -> void:
super._ready()
add_to_group("boss")

View File

@@ -0,0 +1 @@
uid://bkehq3dqyp2yd

View File

@@ -10,6 +10,7 @@ var seconds_outside := 0.0
func _ready() -> void:
EventBus.damage_dealt.connect(_on_damage_dealt)
EventBus.entity_died.connect(_on_entity_died)
EventBus.heal_requested.connect(_on_heal_requested)
func _process(delta: float) -> void:
var outside_portal := false
@@ -53,6 +54,12 @@ func _on_damage_dealt(attacker: Node, target: Node, amount: float) -> void:
multiplier = 2.0
add_aggro(attacker, amount * multiplier)
func _on_heal_requested(healer: Node, _target: Node, amount: float) -> void:
if not healer.is_in_group("player"):
return
if healer in aggro_table:
add_aggro(healer, amount * 0.5)
func _on_entity_died(entity: Node) -> void:
aggro_table.erase(entity)