mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-08 04:39:20 +02:00
introduce poison wave similar to energy wave
This commit is contained in:
parent
d3285ebbd0
commit
8de51cb8ea
21
data/spells/scripts/spells/poison wave.lua
Normal file
21
data/spells/scripts/spells/poison wave.lua
Normal file
@ -0,0 +1,21 @@
|
||||
local combat = Combat()
|
||||
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
|
||||
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GREEN_RINGS)
|
||||
combat:setArea(createCombatArea(AREA_SQUAREWAVE5))
|
||||
|
||||
function onGetFormulaValues(player, level, maglevel)
|
||||
local base = 150
|
||||
local variation = 50
|
||||
|
||||
local formula = 3 * maglevel + (2 * level)
|
||||
|
||||
local min = (formula * (base - variation)) / 100
|
||||
local max = (formula * (base + variation)) / 100
|
||||
return -min, -max
|
||||
end
|
||||
|
||||
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
|
||||
|
||||
function onCastSpell(creature, variant)
|
||||
return combat:execute(creature, variant)
|
||||
end
|
@ -45,6 +45,10 @@
|
||||
<vocation name="Druid" />
|
||||
<vocation name="Elder Druid" />
|
||||
</instant>
|
||||
<instant name="Poison Wave" words="exevo pox hur" lvl="38" mana="250" direction="1" needlearn="0" script="spells/poison wave.lua">
|
||||
<vocation name="Druid" />
|
||||
<vocation name="Elder Druid" />
|
||||
</instant>
|
||||
|
||||
<!-- Knight Spells -->
|
||||
<instant name="Challenge" words="exeta res" lvl="20" mana="30" prem="1" aggressive="0" needlearn="0" script="spells/challenge.lua">
|
||||
|
Loading…
x
Reference in New Issue
Block a user