New spells - weapons enhancement
Added new spells from 10.55 update -- with correct cooldown ids.
* The limit for the player's level and magic level with these spell
formulas is 20 -- based on vanilla.
* Buzz
* Chill Out
* Light Stone Shower rune
* Lightest Missile rune
* Mud Attack
* Scorch
* Bruise Bane
* Magic Patch
Added a few new items -- from 10.55 update that are needed for some
spells
* Light Stone Shower rune
* Lightest Missile rune
* Simple arrow
Enhanced weapon files
* Removed incorrect block type "BLOCKSHIELD". The correct (and only)
block type is "BLOCKARMOR"
* Modified setFormula(mina, minb, maxa, maxb)
"combat:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)" so that the value
generated by WeaponDistance::getWeaponDamage will not get modified by
setFormula().
* Renamed "var" to "variant" in onUseWeapon().
* Renamed "1" to "true" in condition/combat (since #1661) parameters,
where a boolean is expected.
* Updated condition damages of "poison_arrow" and "viper_star" -- based
on vanilla.
* Removed comment lines of (burst/poison arrow; viper star) since the
file name is pretty evident.
* Leave only 1 whitespace between comment lines.
* explosion_arrow.lua
* Renamed to burst_arrow.lua
* Replaced the current combat effect on target (CONST_ME_FIREAREA) with
newer effect (CONST_ME_EXPLOSIONAREA).
* poison_arrow
* Replaced incorrect damage type (COMBAT_POISONDAMAGE) with the correct
damage type (COMBAT_PHYSICALDAMAGE) -- based on vanilla.
* viper star
Delete explosion_arrow.lua
Use math.min(level, 20) instead of if's.
Added missing -- math.min(maglevel, 20).
2016-01-07 17:41:43 -08:00
|
|
|
local combat = Combat()
|
|
|
|
|
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
|
|
|
|
|
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_CARNIPHILA)
|
|
|
|
|
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLEARTH)
|
|
|
|
|
|
2017-09-13 23:32:20 -03:00
|
|
|
function onGetFormulaValues(player, level, magicLevel)
|
New spells - weapons enhancement
Added new spells from 10.55 update -- with correct cooldown ids.
* The limit for the player's level and magic level with these spell
formulas is 20 -- based on vanilla.
* Buzz
* Chill Out
* Light Stone Shower rune
* Lightest Missile rune
* Mud Attack
* Scorch
* Bruise Bane
* Magic Patch
Added a few new items -- from 10.55 update that are needed for some
spells
* Light Stone Shower rune
* Lightest Missile rune
* Simple arrow
Enhanced weapon files
* Removed incorrect block type "BLOCKSHIELD". The correct (and only)
block type is "BLOCKARMOR"
* Modified setFormula(mina, minb, maxa, maxb)
"combat:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)" so that the value
generated by WeaponDistance::getWeaponDamage will not get modified by
setFormula().
* Renamed "var" to "variant" in onUseWeapon().
* Renamed "1" to "true" in condition/combat (since #1661) parameters,
where a boolean is expected.
* Updated condition damages of "poison_arrow" and "viper_star" -- based
on vanilla.
* Removed comment lines of (burst/poison arrow; viper star) since the
file name is pretty evident.
* Leave only 1 whitespace between comment lines.
* explosion_arrow.lua
* Renamed to burst_arrow.lua
* Replaced the current combat effect on target (CONST_ME_FIREAREA) with
newer effect (CONST_ME_EXPLOSIONAREA).
* poison_arrow
* Replaced incorrect damage type (COMBAT_POISONDAMAGE) with the correct
damage type (COMBAT_PHYSICALDAMAGE) -- based on vanilla.
* viper star
Delete explosion_arrow.lua
Use math.min(level, 20) instead of if's.
Added missing -- math.min(maglevel, 20).
2016-01-07 17:41:43 -08:00
|
|
|
level = math.min(level, 20)
|
2017-09-13 23:32:20 -03:00
|
|
|
magicLevel = math.min(magicLevel, 20)
|
|
|
|
|
local min = (level / 5) + (magicLevel * 0.4) + 2
|
|
|
|
|
local max = (level / 5) + (magicLevel * 0.8) + 5
|
New spells - weapons enhancement
Added new spells from 10.55 update -- with correct cooldown ids.
* The limit for the player's level and magic level with these spell
formulas is 20 -- based on vanilla.
* Buzz
* Chill Out
* Light Stone Shower rune
* Lightest Missile rune
* Mud Attack
* Scorch
* Bruise Bane
* Magic Patch
Added a few new items -- from 10.55 update that are needed for some
spells
* Light Stone Shower rune
* Lightest Missile rune
* Simple arrow
Enhanced weapon files
* Removed incorrect block type "BLOCKSHIELD". The correct (and only)
block type is "BLOCKARMOR"
* Modified setFormula(mina, minb, maxa, maxb)
"combat:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)" so that the value
generated by WeaponDistance::getWeaponDamage will not get modified by
setFormula().
* Renamed "var" to "variant" in onUseWeapon().
* Renamed "1" to "true" in condition/combat (since #1661) parameters,
where a boolean is expected.
* Updated condition damages of "poison_arrow" and "viper_star" -- based
on vanilla.
* Removed comment lines of (burst/poison arrow; viper star) since the
file name is pretty evident.
* Leave only 1 whitespace between comment lines.
* explosion_arrow.lua
* Renamed to burst_arrow.lua
* Replaced the current combat effect on target (CONST_ME_FIREAREA) with
newer effect (CONST_ME_EXPLOSIONAREA).
* poison_arrow
* Replaced incorrect damage type (COMBAT_POISONDAMAGE) with the correct
damage type (COMBAT_PHYSICALDAMAGE) -- based on vanilla.
* viper star
Delete explosion_arrow.lua
Use math.min(level, 20) instead of if's.
Added missing -- math.min(maglevel, 20).
2016-01-07 17:41:43 -08:00
|
|
|
return -min, -max
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
|
|
|
|
|
|
2024-09-20 00:13:59 +02:00
|
|
|
local spell = Spell(SPELL_INSTANT)
|
|
|
|
|
|
|
|
|
|
function spell.onCastSpell(creature, variant)
|
New spells - weapons enhancement
Added new spells from 10.55 update -- with correct cooldown ids.
* The limit for the player's level and magic level with these spell
formulas is 20 -- based on vanilla.
* Buzz
* Chill Out
* Light Stone Shower rune
* Lightest Missile rune
* Mud Attack
* Scorch
* Bruise Bane
* Magic Patch
Added a few new items -- from 10.55 update that are needed for some
spells
* Light Stone Shower rune
* Lightest Missile rune
* Simple arrow
Enhanced weapon files
* Removed incorrect block type "BLOCKSHIELD". The correct (and only)
block type is "BLOCKARMOR"
* Modified setFormula(mina, minb, maxa, maxb)
"combat:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)" so that the value
generated by WeaponDistance::getWeaponDamage will not get modified by
setFormula().
* Renamed "var" to "variant" in onUseWeapon().
* Renamed "1" to "true" in condition/combat (since #1661) parameters,
where a boolean is expected.
* Updated condition damages of "poison_arrow" and "viper_star" -- based
on vanilla.
* Removed comment lines of (burst/poison arrow; viper star) since the
file name is pretty evident.
* Leave only 1 whitespace between comment lines.
* explosion_arrow.lua
* Renamed to burst_arrow.lua
* Replaced the current combat effect on target (CONST_ME_FIREAREA) with
newer effect (CONST_ME_EXPLOSIONAREA).
* poison_arrow
* Replaced incorrect damage type (COMBAT_POISONDAMAGE) with the correct
damage type (COMBAT_PHYSICALDAMAGE) -- based on vanilla.
* viper star
Delete explosion_arrow.lua
Use math.min(level, 20) instead of if's.
Added missing -- math.min(maglevel, 20).
2016-01-07 17:41:43 -08:00
|
|
|
return combat:execute(creature, variant)
|
|
|
|
|
end
|
2024-09-20 00:13:59 +02:00
|
|
|
|
|
|
|
|
spell:group("attack")
|
|
|
|
|
spell:id(172)
|
|
|
|
|
spell:name("Mud Attack")
|
|
|
|
|
spell:words("exori infir tera")
|
|
|
|
|
spell:level(1)
|
|
|
|
|
spell:mana(6)
|
|
|
|
|
spell:isPremium(true)
|
|
|
|
|
spell:range(3)
|
|
|
|
|
spell:needCasterTargetOrDirection(true)
|
|
|
|
|
spell:blockWalls(true)
|
|
|
|
|
spell:cooldown(2000)
|
|
|
|
|
spell:groupCooldown(2000)
|
|
|
|
|
spell:vocation("druid;true", "elder druid;true")
|
|
|
|
|
spell:register()
|