0ad/binaries/data/mods/public/simulation/components/interfaces/Attack.js
leper 2f12bae102 Deal ranged damage even if the attacker dies. Patch by LeanderH. Fixes #3610.
Create a Damage system component from the Damage helper object and parts
of
the Attack component. This fixes the issue by making ranged damage
independent
of the attacking entity.

While there fix the issue of damaging all nearby entities in case the
actual
target was not hit, instead of only a single one.

This was SVN commit r18625.
2016-08-22 01:00:57 +00:00

7 lines
329 B
JavaScript

Engine.RegisterInterface("Attack");
/**
* Message of the form { "attacker": number, "target": number, "type": string, "damage": number, "attackerOwner": number }
* sent from Attack component and by Damage component to the target entity, each time the target is attacked or damaged.
*/
Engine.RegisterMessageType("Attacked");