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
33 lines
1,012 B
Lua
33 lines
1,012 B
Lua
local combat = Combat()
|
|
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
|
|
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
|
|
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
|
|
combat:setParameter(COMBAT_PARAM_USECHARGES, true)
|
|
combat:setArea(createCombatArea(AREA_WAVE6, AREADIAGONAL_WAVE6))
|
|
|
|
function onGetFormulaValues(player, skill, attack, factor)
|
|
local min = (player:getLevel() / 5) + (skill * attack * 0.04) + 11
|
|
local max = (player:getLevel() / 5) + (skill * attack * 0.08) + 21
|
|
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(59)
|
|
spell:name("Front Sweep")
|
|
spell:words("exori min")
|
|
spell:level(70)
|
|
spell:mana(200)
|
|
spell:needWeapon(true)
|
|
spell:needDirection(true)
|
|
spell:cooldown(6000)
|
|
spell:groupCooldown(2000)
|
|
spell:vocation("knight;true", "elite knight;true")
|
|
spell:register()
|