Kuantikum
Member
- Joined
- Jul 3, 2015
- Messages
- 219
- Solutions
- 1
- Reaction score
- 20
Hello guys!
I'm trying to add the bleeding condition, but apparently I'm not getting it, there is no error in the log, the spell is normally casted, but nothing happens.
That was the modification I made so far:
I am so gratefull!
I'm trying to add the bleeding condition, but apparently I'm not getting it, there is no error in the log, the spell is normally casted, but nothing happens.
That was the modification I made so far:
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setParameter(COMBAT_PARAM_USECHARGES, true)
combat:setArea(createCombatArea(AREA_CIRCLE3X3))
local condition = Condition(CONDITION_BLEEDING)
function onGetFormulaValues(player, skill, attack, factor)
local min = (player:getLevel() / 5) + (skill * attack * 0.02) + 4
local max = (player:getLevel() / 5) + (skill * attack * 0.03) + 6
local damage = math.random(math.floor(min) * 1000, math.floor(max) * 1000) / 1000
addDamageCondition(Condition, DAMAGELIST_LOGARITHMIC_DAMAGE and damage)
end
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant)
return combat:execute(creature, variant)
end
I am so gratefull!