mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
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:
parent
6c74222b68
commit
f4016e1a12
25 changed files with 539 additions and 442 deletions
41
data/scripts/magic.lua
Normal file
41
data/scripts/magic.lua
Normal file
|
@ -0,0 +1,41 @@
|
|||
-- todo: add enums for status effects in global.lua
|
||||
require("global")
|
||||
|
||||
magic =
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
--[[
|
||||
modifier - Modifier.Intelligence, Modifier.Mind (see Modifier.cs)
|
||||
multiplier -
|
||||
]]
|
||||
function magic.HandleHealingMagic(caster, target, spell, action, modifierId, multiplier, baseAmount)
|
||||
potency = potency or 1.0;
|
||||
healAmount = baseAmount;
|
||||
|
||||
-- todo: shit based on mnd
|
||||
local mind = caster.GetMod(Modifier.Mind);
|
||||
end;
|
||||
|
||||
function magic.HandleAttackMagic(caster, target, spell, action, modifierId, multiplier, baseAmount)
|
||||
-- todo: actually handle this
|
||||
damage = baseAmount or math.random(1,10) * 10;
|
||||
|
||||
return damage;
|
||||
end;
|
||||
|
||||
function magic.HandleEvasion(caster, target, spell, action, modifierId)
|
||||
|
||||
return false;
|
||||
end;
|
||||
|
||||
function magic.HandleStoneskin(caster, target, spell, action, modifierId, damage)
|
||||
--[[
|
||||
if target.statusEffects.HasStatusEffect(StatusEffect.Stoneskin) then
|
||||
-- todo: damage reduction
|
||||
return true;
|
||||
end;
|
||||
]]
|
||||
return false;
|
||||
end;
|
Loading…
Add table
Add a link
Reference in a new issue