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

New class: Reavers (Corrupter)

git-svn-id: http://svn.net-core.org/repos/t-engine4@1135 51575b47-30f0-44d4-a5cc-537603b46e54
parent ad634f07
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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)
......
......@@ -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,
}
......@@ -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},
......
......@@ -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,
......
......@@ -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,
......
-- 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.
]]
No preview for this file type
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