mirror of
https://github.com/otland/forgottenserver
synced 2026-08-15 16:32:07 -04:00
* Move runes to dedicated folder * Redirect old XML and lib folder to new location * Drop unused custom spells
30 lines
1,008 B
Lua
30 lines
1,008 B
Lua
local combat = Combat()
|
|
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
|
|
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
|
|
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
|
|
|
|
local spell = Spell(SPELL_INSTANT)
|
|
|
|
function spell.onCastSpell(creature, variant)
|
|
local min = (creature:getLevel() / 80) + (creature:getMagicLevel() * 0.5) + 7
|
|
local max = (creature:getLevel() / 80) + (creature:getMagicLevel() * 0.9) + 8
|
|
local damage = math.random(math.floor(min), math.floor(max))
|
|
for _, target in ipairs(combat:getTargets(creature, variant)) do
|
|
creature:addDamageCondition(target, CONDITION_CURSED, DAMAGELIST_EXPONENTIAL_DAMAGE, damage)
|
|
end
|
|
return true
|
|
end
|
|
|
|
spell:group("attack")
|
|
spell:id(139)
|
|
spell:name("Curse")
|
|
spell:words("utori mort")
|
|
spell:level(75)
|
|
spell:mana(30)
|
|
spell:range(3)
|
|
spell:needCasterTargetOrDirection(true)
|
|
spell:blockWalls(true)
|
|
spell:cooldown(40000)
|
|
spell:groupCooldown(2000)
|
|
spell:vocation("sorcerer;true", "master sorcerer;true")
|
|
spell:register()
|