Skip to content
Snippets Groups Projects
Commit 57983668 authored by DarkGod's avatar DarkGod
Browse files

Fixed curse of nightmare, for real this time!

Buffed curse of nighmare to start triggering at level 4 (as the description was implying)
parent 3bcff3ca
No related branches found
No related tags found
No related merge requests found
......@@ -1126,7 +1126,7 @@ newEffect{
getWilChange = function(level) return -1 + level * 2 end,
getBaseSuffocateAirChange = function(level) return Combat:combatTalentLimit(level, 50, 4, 16) end, -- Limit < 50 to take >2 hits to kill most monsters
getSuffocateAirChange = function(level) return Combat:combatTalentLimit(level, 10, 0, 7) end, -- Limit < 10
getNightmareChance = function(level) return Combat:combatTalentLimit(math.max(0, level-4), 25, 3, 10) end, -- Limit < 25%
getNightmareChance = function(level) return Combat:combatTalentLimit(math.max(0, level-3), 25, 3, 10) end, -- Limit < 25%
getNightmareRadius = function(level) return 5 + (level - 4) * 2 end,
display_desc = function(self, eff)
if math.min(eff.unlockLevel, eff.level) >= 4 then
......@@ -1218,16 +1218,12 @@ newEffect{
on_timeout = function(self, eff) -- Chance for nightmare fades over time
if eff.nightmareChance then eff.nightmareChance = math.max(0, eff.nightmareChance-1) end
end,
callbackOnHit = function(self, eff, cb)
game:onTickEnd(function() eff.doNightmare(self, eff) end)
end,
doNightmare = function(self, eff)
callbackOnHit = function(self, eff, cb) game:onTickEnd(function()
if math.min(eff.unlockLevel, eff.level) >= 4 then
-- build chance for a nightmare
local def = self.tempeffect_def[self.EFF_CURSE_OF_NIGHTMARES]
eff.nightmareChance = (eff.nightmareChance or 0) + def.getNightmareChance(eff.level)
-- invoke the nightmare
if rng.percent(eff.nightmareChance) then
local radius = def.getNightmareRadius(eff.level)
......@@ -1291,7 +1287,7 @@ newEffect{
game:playSoundNear(self, "talents/cloud")
end
end
end,
end) end,
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment