Ascuas Funkeln
Rakkedo Game
- Joined
- Apr 14, 2013
- Messages
- 549
- Solutions
- 32
- Reaction score
- 307
- Location
- Poland
- GitHub
- AscuasFunkeln
Hello, i need little help.
For example Whirwind Throw
When cast spell BLOCKARMOR work perfect on monsters(Monster armor reduce damage)... But when spell hit player, armor dont block any damage.
Any idea?
For example Whirwind Throw
Code:
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")
function onCastSpell(creature, variant)
return combat:execute(creature, variant)
end
Any idea?