Skip to content

Commit

Permalink
Fix "spell targeted" event
Browse files Browse the repository at this point in the history
The "target" stored in "spell targeted" event has to be the caster
\ of the autocast, not the target of the current spell
Tower scripts rely on this behavior
  • Loading branch information
Kvel2D committed Feb 18, 2024
1 parent 0bc8fc1 commit 4e33dd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Scenes/Towers/Autocast.gd
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func _do_cast(target: Unit):
_caster.spell_casted.emit(spell_casted_event)

if target != null:
var spell_targeted_event: Event = _make_autocast_event(target)
var spell_targeted_event: Event = _make_autocast_event(_caster)
target.spell_targeted.emit(spell_targeted_event)

if !caster_art.is_empty():
Expand Down

0 comments on commit 4e33dd9

Please sign in to comment.