// function AddDamageHandler takes code damageHandler returns nothing
// - Allows you to add a damage handler function to the system. This is not
// required for GUI users, only for vanilla JASS users. GUI users should
// use the real variable damageEventTrigger to add damage handlers to this
// system as explained above.
The damage handler doesnt work :/
EDIT:
And I use this function and it's still considered as PHYSICAL, not CODE?
call UnitDamageTarget(udg_source, u, udg_Wide__a[v] * udg_amount, false, false, Wide__attack(), Wide__damage(), Wide__weapon())
How can I generate CODE damage anyway?
Well you should add this function to the API
function UnitDamageTargetEx takes unit localSource, unit localTarget, real localAmount, boolean attack, boolean ranged, attacktype localAttackType, damagetype localDamageType, weapontype localWeaponType returns boolean