...
|
...
|
@@ -127,6 +127,7 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr) |
127
|
127
|
local inc
|
128
|
128
|
if src.combatGetDamageIncrease then inc = src:combatGetDamageIncrease(type)
|
129
|
129
|
else inc = (src.inc_damage.all or 0) + (src.inc_damage[type] or 0) end
|
|
130
|
+ if src.getVim and src:attr("demonblood_dam") then inc = inc + ((src.demonblood_dam or 0) * (src:getVim() or 0)) end
|
130
|
131
|
|
131
|
132
|
-- Increases damage for the entity type (Demon, Undead, etc)
|
132
|
133
|
if target.type and src.inc_damage_actor_type then
|
...
|
...
|
@@ -289,6 +290,13 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr) |
289
|
290
|
print("[PROJECTOR] after self-resists dam", dam)
|
290
|
291
|
end
|
291
|
292
|
|
|
293
|
+ --Vim based defence
|
|
294
|
+ if target:attr("demonblood_def") and target.getVim then
|
|
295
|
+ local demon_block = math.min(dam*0.5,target.demonblood_def*(target:getVim() or 0))
|
|
296
|
+ dam= dam - demon_block
|
|
297
|
+ target:incVim((-demon_block)/20)
|
|
298
|
+ end
|
|
299
|
+
|
292
|
300
|
-- Static reduce damage
|
293
|
301
|
if dam > 0 and target.isTalentActive and target:isTalentActive(target.T_ANTIMAGIC_SHIELD) then
|
294
|
302
|
local t = target:getTalentFromId(target.T_ANTIMAGIC_SHIELD)
|
...
|
...
|
|