diff --git a/game/engines/default/engine/interface/WorldAchievements.lua b/game/engines/default/engine/interface/WorldAchievements.lua index 4e8933528f6e196bb0058f7dd0ecc76eb83b9fcf..f77341dc23dcf23965715879a1d801844ee96b5f 100644 --- a/game/engines/default/engine/interface/WorldAchievements.lua +++ b/game/engines/default/engine/interface/WorldAchievements.lua @@ -89,6 +89,7 @@ function _M:gainPersonalAchievement(silent, id, src, ...) game.log("#LIGHT_GREEN#Personal New Achievement: %s!", a.name) Dialog:simplePopup("Personal New Achievement: #LIGHT_GREEN#"..a.name, a.desc) end + if a.on_gain then a:on_gain(src, true) end end --- Gain an achievement @@ -125,6 +126,8 @@ function _M:gainAchievement(id, src, ...) profile:saveModuleProfile("achievement."..id, self.achieved[id]) game.log("#LIGHT_GREEN#New Achievement: %s!", a.name) Dialog:simplePopup("New Achievement: #LIGHT_GREEN#"..a.name, a.desc) + + if a.on_gain then a:on_gain(src) end end --- Format an achievement source diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 0186c83007c663b572de3d69646ceb7fe646e163..51b6a9db7a3a5e66ed53b143f18686464edf8bc7 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -659,6 +659,7 @@ function _M:die(src) if math.floor(p.life) <= 1 and not p.dead then world:gainAchievement("THAT_WAS_CLOSE", p) end world:gainAchievement("EXTERMINATOR", p, self) world:gainAchievement("PEST_CONTROL", p, self) + world:gainAchievement("REAVER", p, self) if self.unique then p:registerUniqueKilled(self) diff --git a/game/modules/tome/data/achievements/kills.lua b/game/modules/tome/data/achievements/kills.lua index 7c55fdfe124ded7a5fa466370bfc8f933c890fee..ed06bda422f484f36c77fc95e732490115323805 100644 --- a/game/modules/tome/data/achievements/kills.lua +++ b/game/modules/tome/data/achievements/kills.lua @@ -46,3 +46,18 @@ newAchievement{ end end } +newAchievement{ + name = "Reaver", + desc = [[Killed 1000 humanoids]], + mode = "player", + can_gain = function(self, who, target) + if target.type == "humanoid" then + self.nb = (self.nb or 0) + 500 + if self.nb >= 1000 then return true end + end + end, + on_gain = function(_, src, personal) + game:setAllowedBuild("corrupter") + game:setAllowedBuild("corrupter_reaver", true) + end, +} diff --git a/game/modules/tome/data/birth/classes/corrupted.lua b/game/modules/tome/data/birth/classes/corrupted.lua index b522ebca062c10b2395e4e78bbc1b979cf770426..a998b3a309a383c525571ad2d60cbbe3c37a7917 100644 --- a/game/modules/tome/data/birth/classes/corrupted.lua +++ b/game/modules/tome/data/birth/classes/corrupted.lua @@ -42,10 +42,10 @@ newBirthDescriptor{ name = "Reaver", desc = { "A Reaver is a terrible foe, wielding two weapons while charging his foes.", - "They can harness the blight of evil, infecting their foes with terrible contagious diseases while crushing their skulls.", + "They can harness the blight of evil, infecting their foes with terrible contagious diseases while crushing their skulls with devastating combat techniques.", "Their most important stats are: Strength and Magic", }, - stats = { str=5, mag=3, dex=1, }, + stats = { str=4, mag=4, dex=1, }, talents_types = { ["technique/combat-training"]={true, 0.3}, ["cunning/survival"]={false, 0.1}, diff --git a/game/modules/tome/data/birth/races/hobbit.lua b/game/modules/tome/data/birth/races/hobbit.lua index 42e491394827644bab4f176161ab46c31462f766..e84e3f7dfe31ba48a3807facf021641fc51d4674 100644 --- a/game/modules/tome/data/birth/races/hobbit.lua +++ b/game/modules/tome/data/birth/races/hobbit.lua @@ -35,6 +35,10 @@ newBirthDescriptor{ __ALL__ = "disallow", Hobbit = "allow", }, + class = + { + Corrupter = "disallow", + }, }, stats = { str=-3, dex=3, con=1, cun=3, lck=5, }, experience = 1.1, diff --git a/game/modules/tome/data/talents/corruptions/sanguisuge.lua b/game/modules/tome/data/talents/corruptions/sanguisuge.lua index 6c43fd2f02631146cc4433608732af5b6cb03dd3..74ff142040ae62f5c1e8222bdc98dd8a8128f348 100644 --- a/game/modules/tome/data/talents/corruptions/sanguisuge.lua +++ b/game/modules/tome/data/talents/corruptions/sanguisuge.lua @@ -30,6 +30,20 @@ newTalent{ game.logPlayer(self, "Doing this would kill you.") return end + + local seen = false + -- Check for visible monsters, only see LOS actors, so telepathy wont prevent resting + core.fov.calc_circle(self.x, self.y, 20, function(_, x, y) return game.level.map:opaque(x, y) end, function(_, x, y) + local actor = game.level.map(x, y, game.level.map.ACTOR) + if actor and self:reactionToward(actor) < 0 and self:canSee(actor) and game.level.map.seens(x, y) then + seen = {x=x,y=y,actor=actor} + end + end, nil) + if not seen then + game.logPlayer(self, "There is no foes in sight.") + return + end + self:incVim(self:combatTalentSpellDamage(t, 5, 200)) self:takeHit(self.max_life * 0.2, self) game:playSoundNear(self, "talents/spell_generic2") @@ -37,6 +51,7 @@ newTalent{ end, info = function(self, t) return ([[Sacrifices 20%% of your life to restore %d vim. + This only works if there is at least one foe in sight. The effect will increase with your Magic stat.]]): format(self:combatTalentSpellDamage(t, 5, 200)) end, diff --git a/game/modules/tome/data/texts/unlock-corrupter_reaver.lua b/game/modules/tome/data/texts/unlock-corrupter_reaver.lua new file mode 100644 index 0000000000000000000000000000000000000000..9fcf4b158497935e12b1ac2f7f16c2eed09ce326 --- /dev/null +++ b/game/modules/tome/data/texts/unlock-corrupter_reaver.lua @@ -0,0 +1,36 @@ +-- 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 "New Class: #LIGHT_GREEN#Reaver (Corrupter)", +[[Under a veil of darkness and blight comes the Reavers. +The foot soldiers of evil forces, reavers are found everywhere. +Very rarely a reaver will realise the wrongness of her way and use her powers to atone for her crimes. + +You have slain numerous humanoids and can now create new characters with the #LIGHT_GREEN#Reaver class#WHITE#. + +Reavers are heavy melee with spellcasting support. +Class features:#YELLOW# +- Plague your foes with deadly and contagious diseases +- Hex and curse your foes, hindering and withering them away +- Accomplish deadly melee moves of utmost evil +- Harness the power of bones to attack and protect#WHITE# + +Reavers use "vim" to use their special abilities. +Vim is the life force of all being, it does not regenerate and can only be stolen from your foes. +]] diff --git a/ideas/blight.ods b/ideas/blight.ods index 4654e76476ed54da5c40d4acb74d6161ae210248..37f4ee2f84f042168d784c0bf8bbea72efafe0d5 100644 Binary files a/ideas/blight.ods and b/ideas/blight.ods differ