2017-08-29 01:15:12 +01:00
|
|
|
require("global");
|
|
|
|
require("magic");
|
|
|
|
|
2017-08-28 04:45:20 +01:00
|
|
|
function onMagicPrepare(caster, target, spell)
|
2017-08-26 06:47:07 +01:00
|
|
|
return 0;
|
|
|
|
end;
|
|
|
|
|
2017-08-28 04:45:20 +01:00
|
|
|
function onMagicStart(caster, target, spell)
|
2017-08-26 06:47:07 +01:00
|
|
|
return 0;
|
|
|
|
end;
|
|
|
|
|
2017-08-28 04:45:20 +01:00
|
|
|
function onMagicFinish(caster, target, spell, action)
|
2017-08-26 06:47:07 +01:00
|
|
|
local damage = math.random(10, 100);
|
|
|
|
|
2017-08-29 01:15:12 +01:00
|
|
|
-- todo: populate a global script with statuses and modifiers
|
|
|
|
action.worldMasterTextId = 0x765D;
|
|
|
|
|
|
|
|
-- todo: populate a global script with statuses and modifiers
|
|
|
|
-- magic.HandleAttackMagic(caster, target, spell, action)
|
|
|
|
-- action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
2017-08-28 04:45:20 +01:00
|
|
|
action.effectId = bit32.bxor(0x8000000, spell.effectAnimation, 15636);
|
2017-08-29 01:15:12 +01:00
|
|
|
|
2017-08-26 06:47:07 +01:00
|
|
|
if target.hateContainer then
|
|
|
|
target.hateContainer.UpdateHate(caster, damage);
|
|
|
|
end;
|
|
|
|
return damage;
|
|
|
|
end;
|