Skip to content
Snippets Groups Projects
Commit df583ca2 authored by dg's avatar dg
Browse files

Nerfed Blood Fury and Curse of Vulnerability

git-svn-id: http://svn.net-core.org/repos/t-engine4@2350 51575b47-30f0-44d4-a5cc-537603b46e54
parent ef3e71b5
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,55 @@
local Object = require "engine.Object"
local DamageType = require "engine.DamageType"
--- Random tunnel dir
local function randDir()
local dirs = {4,6,8,2}
local d = dir_to_coord[dirs[rng.range(1, #dirs)]]
return d[1], d[2]
end
--- Find the direction in which to tunnel
local function tunnelDir(x1, y1, x2, y2)
local xdir = (x1 == x2) and 0 or ((x1 < x2) and 1 or -1)
local ydir = (y1 == y2) and 0 or ((y1 < y2) and 1 or -1)
if xdir ~= 0 and ydir ~= 0 then
if rng.percent(50) then xdir = 0
else ydir = 0
end
end
return xdir, ydir
end
local function tunnel(self, x1, y1, x2, y2)
if x1 == x2 and y1 == y2 then return end
-- Disable the many prints of tunnelling
-- local print = function()end
local xdir, ydir = tunnelDir(x1, y1, x2, y2)
-- print("tunneling from",x1, y1, "to", x2, y2, "initial dir", xdir, ydir)
local startx, starty = x1, y1
if rng.percent(30) then
if rng.percent(10) then xdir, ydir = randDir()
else xdir, ydir = tunnelDir(x1, y1, x2, y2)
end
end
local nx, ny = x1 + xdir, y1 + ydir
while true do
if self.map:isBound(nx, ny) then break end
if rng.percent(10) then xdir, ydir = randDir()
else xdir, ydir = tunnelDir(x1, y1, x2, y2)
end
nx, ny = x1 + xdir, y1 + ydir
end
print(feat, "try pos", nx, ny, "dir", coord_to_dir[xdir][ydir])
return nx, ny
end
-- Very special AI for sandworm tunnelers in the sandworm lair
-- Does not care about a target, simple crawl toward a level spot and when there, go for the next
newAI("sandworm_tunneler", function(self)
......@@ -41,8 +90,7 @@ newAI("sandworm_tunneler", function(self)
end
-- Move toward it, digging your way to it
local l = line.new(self.x, self.y, self.ai_state.spot_x or self.x, self.ai_state.spot_y or self.y)
local lx, ly = l()
local lx, ly = tunnel(game.level, self.x, self.y, self.ai_state.spot_x, self.ai_state.spot_y)
if not lx then
self.ai_state.spot_x = nil
self.ai_state.spot_y = nil
......
......@@ -43,12 +43,12 @@ function _M:generate()
while used[idx] do s, idx = rng.table(self.spots) end
used[idx] = true
self:placeWorm(s)
-- self:placeWorm(s)
end
-- Always add one near the stairs
self:placeWorm(self.level.default_up)
self:placeWorm(self.level.default_down)
-- self:placeWorm(self.level.default_down)
end
function _M:placeWorm(s)
......
......@@ -109,7 +109,7 @@ newTalent{
activate = function(self, t)
game:playSoundNear(self, "talents/slime")
local ret = {
per = self:addTemporaryValue("combat_spellcrit", self:combatTalentSpellDamage(t, 10, 24)),
per = self:addTemporaryValue("combat_spellcrit", self:combatTalentSpellDamage(t, 10, 14)),
}
return ret
end,
......@@ -121,6 +121,6 @@ newTalent{
return ([[Concentrate on the corruption you bring, increasing your spell critical chance by %d%%.
Each time your spells are critical you enter a blood rage for 5 turns, increasing your blight and acid damage by %d%%.
The damage will increase with your Magic stat.]]):
format(self:combatTalentSpellDamage(t, 10, 24), self:combatTalentSpellDamage(t, 10, 30))
format(self:combatTalentSpellDamage(t, 10, 14), self:combatTalentSpellDamage(t, 10, 30))
end,
}
......@@ -125,14 +125,14 @@ newTalent{
local target = game.level.map(tx, ty, Map.ACTOR)
if not target then return end
if target:checkHit(self:combatSpellpower(), target:combatSpellResist(), 0, 95, 15) then
target:setEffect(target.EFF_CURSE_VULNERABILITY, 10, {power=self:combatTalentSpellDamage(t, 10, 60)})
target:setEffect(target.EFF_CURSE_VULNERABILITY, 7, {power=self:combatTalentSpellDamage(t, 10, 40)})
end
end)
game:playSoundNear(self, "talents/slime")
return true
end,
info = function(self, t)
return ([[Curses your target, decreasing all its resistances by %d%% for 10 turns.
The resistances will decrease with Magic stat.]]):format(self:combatTalentSpellDamage(t, 10, 60))
return ([[Curses your target, decreasing all its resistances by %d%% for 7 turns.
The resistances will decrease with Magic stat.]]):format(self:combatTalentSpellDamage(t, 10, 40))
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