renamed tables for consistency

- added magic.lua (todo: enumerate modifiers and stuff)
- moved aggro handling to session position update
- some cleanup
This commit is contained in:
Tahir Akhlaq 2017-08-29 01:15:12 +01:00
parent 6c74222b68
commit f4016e1a12
25 changed files with 539 additions and 442 deletions

View file

@ -1,3 +1,5 @@
require("magic");
function onMagicPrepare(caster, target, spell)
return 0;
end;
@ -8,11 +10,14 @@ end;
function onMagicFinish(caster, target, spell, action)
local damage = math.random(10, 100);
print("fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuckkk")
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);
if target.hateContainer then
target.hateContainer.AddBaseHate(caster);
target.hateContainer.UpdateHate(caster, damage);
end;
return damage;