diff --git a/game/engine/Zone.lua b/game/engine/Zone.lua index 9388d424069ac25cebc2203d66d530fc31a2671b..8b2c8589d424d908b78486ff1333096412c49a8c 100644 --- a/game/engine/Zone.lua +++ b/game/engine/Zone.lua @@ -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) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 4d24236809a965dca6b7e8f1b4834a6505de8f28..ba682e64c3412412331983ac465d9d89fdbdd48d 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -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 diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 39a9eb9ada68c4e2963435b9fd0c51d288a5cbb3..193c9b1d72d1aa82c16128f6d1ed777d86090d47 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -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, diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 87609cfcdc92662f7d58fa9ef27735c139b4ebf2..c0b1ebee3613855e8f853adaf87be75ec4d4b726 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -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 diff --git a/game/modules/tome/data/damage_types.lua b/game/modules/tome/data/damage_types.lua index f5f18d9a6f088b79098b932ab0a4764138735c0f..3c2b3e1ef938bd799549c70cfad126a7762804d0 100644 --- a/game/modules/tome/data/damage_types.lua +++ b/game/modules/tome/data/damage_types.lua @@ -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, +} diff --git a/game/modules/tome/data/general/npcs/orc-rak-shor.lua b/game/modules/tome/data/general/npcs/orc-rak-shor.lua index 1e8f474d595631d84d7ba815ebf3a43eb4685abf..120a655265cb82aa9961b9958767e75f37b0bcdd 100644 --- a/game/modules/tome/data/general/npcs/orc-rak-shor.lua +++ b/game/modules/tome/data/general/npcs/orc-rak-shor.lua @@ -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, + }, +} diff --git a/game/modules/tome/data/gfx/particles/blightzone.lua b/game/modules/tome/data/gfx/particles/blightzone.lua new file mode 100644 index 0000000000000000000000000000000000000000..add3653b7ed8c878bf118bcdf84454de3847fbd3 --- /dev/null +++ b/game/modules/tome/data/gfx/particles/blightzone.lua @@ -0,0 +1,47 @@ +-- 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" diff --git a/game/modules/tome/data/talents/misc/npcs.lua b/game/modules/tome/data/talents/misc/npcs.lua index 949e75a6a1cc0cafb95733d20b6e71bdc07a18bd..5d43b88d404931cde1e730892f24433f9b9eca65 100644 --- a/game/modules/tome/data/talents/misc/npcs.lua +++ b/game/modules/tome/data/talents/misc/npcs.lua @@ -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", diff --git a/game/modules/tome/data/timed_effects.lua b/game/modules/tome/data/timed_effects.lua index 73a0d6407948f09708147b3ef021a67264043eeb..70035520be53b6663742a9329130a3700b6e936e 100644 --- a/game/modules/tome/data/timed_effects.lua +++ b/game/modules/tome/data/timed_effects.lua @@ -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) diff --git a/game/modules/tome/data/zones/high-peak/zone.lua b/game/modules/tome/data/zones/high-peak/zone.lua index 9126c17391290a6433d4cc6fcc9a4a8aa1bda4d1..3f00ce666d872f9c53849bc22cbb1becc4cb0aff 100644 --- a/game/modules/tome/data/zones/high-peak/zone.lua +++ b/game/modules/tome/data/zones/high-peak/zone.lua @@ -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",