2017-08-29 01:15:12 +01:00
|
|
|
-- todo: add enums for status effects in global.lua
|
|
|
|
require("global")
|
2018-02-15 13:20:46 -06:00
|
|
|
require("battleutils")
|
2017-08-29 01:15:12 +01:00
|
|
|
|
|
|
|
magic =
|
|
|
|
{
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
--[[
|
2017-09-10 03:41:58 +01:00
|
|
|
statId - see BattleTemp.cs
|
|
|
|
modifierId - Modifier.Intelligence, Modifier.Mind (see Modifier.cs)
|
2017-08-29 01:15:12 +01:00
|
|
|
multiplier -
|
|
|
|
]]
|
2017-09-10 03:41:58 +01:00
|
|
|
function magic.HandleHealingMagic(caster, target, spell, action, statId, modifierId, multiplier, baseAmount)
|
2017-08-29 01:15:12 +01:00
|
|
|
potency = potency or 1.0;
|
|
|
|
healAmount = baseAmount;
|
|
|
|
|
|
|
|
-- todo: shit based on mnd
|
|
|
|
local mind = caster.GetMod(Modifier.Mind);
|
|
|
|
end;
|
|
|
|
|
2017-09-10 03:41:58 +01:00
|
|
|
function magic.HandleAttackMagic(caster, target, spell, action, statId, modifierId, multiplier, baseAmount)
|
2017-08-29 01:15:12 +01:00
|
|
|
-- todo: actually handle this
|
|
|
|
damage = baseAmount or math.random(1,10) * 10;
|
|
|
|
|
|
|
|
return damage;
|
|
|
|
end;
|
|
|
|
|
2017-09-10 03:41:58 +01:00
|
|
|
function magic.HandleEvasion(caster, target, spell, action, statId, modifierId)
|
2017-08-29 01:15:12 +01:00
|
|
|
|
|
|
|
return false;
|
|
|
|
end;
|
|
|
|
|
2017-09-10 03:41:58 +01:00
|
|
|
function magic.HandleStoneskin(caster, target, spell, action, statId, modifierId, damage)
|
2017-08-29 01:15:12 +01:00
|
|
|
--[[
|
|
|
|
if target.statusEffects.HasStatusEffect(StatusEffect.Stoneskin) then
|
|
|
|
-- todo: damage reduction
|
|
|
|
return true;
|
|
|
|
end;
|
|
|
|
]]
|
|
|
|
return false;
|
|
|
|
end;
|