forgottenserver/data/scripts/spells/attack/whirlwind_throw.lua
Ranieri Althoff 25df9cfd38
Move spells to scripts folder (#4755)
* Move runes to dedicated folder
* Redirect old XML and lib folder to new location
* Drop unused custom spells
2024-09-20 00:13:59 +02:00

35 lines
1 KiB
Lua

local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setParameter(COMBAT_PARAM_USECHARGES, true)
function onGetFormulaValues(player, skill, attack, factor)
local min = (player:getLevel() / 5) + (skill * attack * 0.01) + 1
local max = (player:getLevel() / 5) + (skill * attack * 0.03) + 6
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
local spell = Spell(SPELL_INSTANT)
function spell.onCastSpell(creature, variant)
return combat:execute(creature, variant)
end
spell:group("attack")
spell:id(107)
spell:name("Whirlwind Throw")
spell:words("exori hur")
spell:level(28)
spell:mana(40)
spell:range(5)
spell:needTarget(true)
spell:blockWalls(true)
spell:needWeapon(true)
spell:cooldown(6000)
spell:groupCooldown(2000)
spell:vocation("knight;true", "elite knight;true")
spell:register()