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

High level NPCs ca have stats over 60

Orc corruptors in Rak'Shor Pride


git-svn-id: http://svn.net-core.org/repos/t-engine4@1007 51575b47-30f0-44d4-a5cc-537603b46e54
parent 483acb01
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ require "engine.class"
local Savefile = require "engine.Savefile"
local Map = require "engine.Map"
local Astar = require "engine.Astar"
--local print = function() end
local print = function() end
--- Defines a zone: a set of levels, with depth, nps, objects, level generator, ...
module(..., package.seeall, class.make)
......
......@@ -621,8 +621,13 @@ end
function _M:learnStats(statorder)
self.auto_stat_cnt = self.auto_stat_cnt or 1
local nb = 0
local max = 60
-- Allow to go over a natural 60, up to 80 at level 50
if not self.no_auto_high_stats then max = 60 + (self.level * 20 / 50) end
while self.unused_stats > 0 do
if self:getStat(statorder[self.auto_stat_cnt]) < 60 then
if self:getStat(statorder[self.auto_stat_cnt]) < max then
self:incStat(statorder[self.auto_stat_cnt], 1)
self.unused_stats = self.unused_stats - 1
end
......
......@@ -471,14 +471,15 @@ function _M:setupCommands()
if config.settings.tome.cheat then
self.player:forceLevelup(50)
self.player.no_breath = 1
self.player.invulnerable = 1
self.player.esp.all = 1
self.player.esp.range = 50
self.player.inc_damage.all = 100000
-- self:changeLevel(15, "high-peak")
self:changeLevel(2, "rak-shor-pride")
-- self:changeLevel(1, "town-gates-of-morning")
self:changeLevel(1, "wilderness-arda-fareast")
game.memory_levels["wilderness-arda-fareast-1"] = game.level
self.player:grantQuest("orc-pride")
-- self:changeLevel(1, "wilderness-arda-fareast")
-- game.memory_levels["wilderness-arda-fareast-1"] = game.level
-- self.player:grantQuest("orc-pride")
-- self.player:grantQuest("escort-duty")
end
end,
......
......@@ -60,7 +60,10 @@ function _M:init(t, no_default)
if t.fixed_rating == nil then t.fixed_rating = true end
t.move_others = true
-- Dont give free resists & higher stat max to players
t.no_auto_resists = true
t.no_auto_high_stats = true
t.lite = t.lite or 0
......
......@@ -648,3 +648,17 @@ newDamageType{
end
end,
}
-- Corrupted blood, blight damage + potential diseases
newDamageType{
name = "corrupted blood", type = "CORRUPTED_BLOOD",
projector = function(src, x, y, type, dam)
if _G.type(dam) == "number" then dam = {dam=dam} end
DamageType:get(DamageType.BLIGHT).projector(src, x, y, DamageType.BLIGHT, dam.dam)
local target = game.level.map(x, y, Map.ACTOR)
if target and target:canBe("disease") then
local eff = rng.table{{target.EFF_ROTTING_DISEASE, "con"}, {target.EFF_DECREPITUDE_DISEASE, "dex"}, {target.EFF_WEAKNESS_DISEASE, "str"}}
target:setEffect(eff[1], dam.dur or 5, { src = src, [eff[2]] = dam.disease_power, dam = dam.disease_dam or (dam.dam / 5) })
end
end,
}
......@@ -92,3 +92,28 @@ newEntity{ base = "BASE_NPC_ORC_RAK_SHOR",
[Talents.T_CURSE_OF_VULNERABILITY]=5,
},
}
newEntity{ base = "BASE_NPC_ORC_RAK_SHOR",
name = "orc corruptor", color=colors.GREY,
desc = [[An orc dressed in black robes. He mumbles is a harsh tongue.]],
level_range = {27, nil}, exp_worth = 1,
rarity = 1,
rank = 3,
max_life = resolvers.rngavg(160,180), life_rating = 15,
resolvers.equip{
{type="weapon", subtype="staff", autoreq=true},
{type="armor", subtype="cloth", autoreq=true},
},
combat_armor = 0, combat_def = 5,
inc_damage = { [DamageType.BLIGHT] = resolvers.mbonus(20, 10) },
resolvers.talents{
[Talents.T_SOUL_ROT]=5,
[Talents.T_BLOOD_GRASP]=5,
[Talents.T_CURSE_OF_VULNERABILITY]=5,
[Talents.T_BLIGHTZONE]=3,
-- [Talents.T_BONE_SHIELD]=5,
[Talents.T_BLOOD_SPRAY]=4,
},
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
return { generator = function()
local ad = rng.range(0, 360)
local a = math.rad(ad)
local dir = math.rad(ad + 90)
local r = rng.range(1, 20)
local dirv = math.rad(1)
return {
trail = 1,
life = 10,
size = 1, sizev = 0.5, sizea = 0,
x = r * math.cos(a), xv = -0.1, xa = 0,
y = r * math.sin(a), yv = -0.1, ya = 0,
dir = math.rad(rng.range(0, 360)), dirv = 0, dira = 0,
vel = 0.1, velv = 0, vela = 0,
r = rng.range(0, 0)/255, rv = 0, ra = 0,
g = rng.range(80, 200)/255, gv = 0.005, ga = 0.0005,
b = rng.range(0, 0)/255, bv = 0, ba = 0,
a = rng.range(155, 255)/255, av = 0, aa = 0.005,
}
end, },
function(self)
self.ps:emit(4)
end,
40,
"particle_torus"
......@@ -867,6 +867,39 @@ newTalent{
end,
}
newTalent{
name = "Blightzone",
type = {"corruption/other", 1},
points = 5,
cooldown = 13,
vim = 27,
range = 20,
action = function(self, t)
local duration = self:getTalentLevel(t) + 2
local radius = 4
local dam = self:combatTalentSpellDamage(t, 4, 65)
local tg = {type="ball", range=self:getTalentRange(t), radius=radius}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
local _ _, x, y = self:canProject(tg, x, y)
-- Add a lasting map effect
game.level.map:addEffect(self,
x, y, duration,
DamageType.BLIGHT, dam,
radius,
5, nil,
{type="blightzone"},
nil, self:spellFriendlyFire()
)
game:playSoundNear(self, "talents/cloud")
return true
end,
info = function(self)
return ([[Corrupted vapour rises at the target location doing %0.2f blight damage every turn for %d turns.
The damage will increase with Magic stat.]]):format(self:combatTalentSpellDamage(t, 5, 65), self:getTalentLevel(t) + 2)
end,
}
newTalent{
name = "Blood Grasp",
type = {"corruption/other", 1},
......@@ -888,6 +921,33 @@ newTalent{
The damage will increase with Magic stat.]]):format(self:combatTalentSpellDamage(t, 10, 220))
end,
}
newTalent{
name = "Blood Spray",
type = {"corruption/other", 1},
points = 5,
cooldown = 7,
vim = 24,
range = function(self, t) return math.ceil(3 + self:getTalentLevel(t)) end,
action = function(self, t)
local tg = {type="cone", range=0, radius=self:getTalentRange(t), talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.CORRUPTED_BLOOD, {
dam = self:spellCrit(self:combatTalentSpellDamage(t, 10, 170)),
disease_chance = 20 + self:getTalentLevel(t) * 10,
disease_dam = self:spellCrit(self:combatTalentSpellDamage(t, 10, 220)) / 6,
disease_power = self:combatTalentSpellDamage(t, 10, 20),
dur = 6,
}, {type="blood"})
game:playSoundNear(self, "talents/slime")
return true
end,
info = function(self)
return ([[You extract corrupted blood from your own body, hitting everything in a frontal cone for %0.2f blight damage.
Each affected creature has a %d%% chance of being infected by a random disease doing %0.2f blight damage over 6 turns.
The damage will increase with Magic stat.]]):format(self:combatTalentSpellDamage(t, 10, 170), 20 + self:getTalentLevel(t) * 10, self:combatTalentSpellDamage(t, 10, 220))
end,
}
newTalent{
name = "Curse of Vulnerability",
......
......@@ -819,7 +819,7 @@ newEffect{
end,
-- Lost of CON
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("inc_stats", {[Stats.STAT_CON] = eff.con})
eff.tmpid = self:addTemporaryValue("inc_stats", {[Stats.STAT_CON] = -eff.con})
end,
deactivate = function(self, eff)
self:removeTemporaryValue("inc_stats", eff.tmpid)
......
......@@ -34,7 +34,8 @@ return {
map = {
class = "engine.generator.map.Roomer",
nb_rooms = 10,
rooms = {"simple", "pilar", {"money_vault",5}},
rooms = {"simple", "pilar", {"pit",6}},
rooms_config = {pit={filters={{type="orc"}, {type="undead"}, {type="naga"}}}},
lite_room_chance = 100,
['.'] = "FLOOR",
['#'] = "WALL",
......
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