update
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user