mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Combat changes and bug fixes
Added the combo and proc systems Added scripts for most weaponskill and spells as well as some abilities and status effects Added support for multihit attacks Added AbilityState for abilities Added hiteffects that change based on an attack's parameters Added positionals Changed how targeting works for battlecommands Fixed bug that occurred when moving or swapping hotbar commands Fixed bug that occurred when losing status effects
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
-- todo: add enums for status effects in global.lua
|
||||
require("global")
|
||||
require("battleutils")
|
||||
|
||||
magic =
|
||||
{
|
||||
@@ -39,4 +40,32 @@ function magic.HandleStoneskin(caster, target, spell, action, statId, modifierId
|
||||
end;
|
||||
]]
|
||||
return false;
|
||||
end;
|
||||
|
||||
function magic.onMagicFinish(caster, target, spell, action)
|
||||
action.battleActionType = BattleActionType.AttackMagic;
|
||||
local damage = math.random(50, 150);
|
||||
action.amount = damage;
|
||||
action.CalcHitType(caster, target, spell);
|
||||
action.TryStatus(caster, target, spell, true);
|
||||
return action.amount;
|
||||
end;
|
||||
|
||||
--For healing magic
|
||||
function magic.onCureMagicFinish(caster, target, spell, action)
|
||||
action.battleActionType = BattleActionType.Heal;
|
||||
local amount = math.random(200, 450);
|
||||
action.amount = amount;
|
||||
action.CalcHitType(caster, target, spell);
|
||||
action.TryStatus(caster, target, spell, true);
|
||||
return action.amount;
|
||||
end;
|
||||
|
||||
--For status magic
|
||||
function magic.onStatusMagicFinish(caster, target, spell, action)
|
||||
action.battleActionType = BattleActionType.Status;
|
||||
action.amount = 0;
|
||||
action.CalcHitType(caster, target, spell);
|
||||
action.TryStatus(caster, target, spell, false);
|
||||
return action.amount;
|
||||
end;
|
||||
Reference in New Issue
Block a user