diff --git a/game/modules/tome/data/achievements/kills.lua b/game/modules/tome/data/achievements/kills.lua index ec5378c8a75e5b1e8fd8d8c0f6a53d8e7e9350d2..940fbe955da9ac886fee31fc2af9fea88193a3c6 100644 --- a/game/modules/tome/data/achievements/kills.lua +++ b/game/modules/tome/data/achievements/kills.lua @@ -49,7 +49,7 @@ newAchievement{ newAchievement{ name = "Reaver", desc = [[Killed 1000 humanoids]], - mode = "player", + mode = "world", can_gain = function(self, who, target) if target.type == "humanoid" then self.nb = (self.nb or 0) + 1 diff --git a/game/modules/tome/data/general/traps/annoy.lua b/game/modules/tome/data/general/traps/annoy.lua new file mode 100644 index 0000000000000000000000000000000000000000..0bd1cc81e80849c4e2c152a33e18ada9432ae5ee --- /dev/null +++ b/game/modules/tome/data/general/traps/annoy.lua @@ -0,0 +1,58 @@ +-- 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 + +newEntity{ define_as = "TRAP_ANNOY", + type = "annoy", subtype="annoy", id_by_type=true, unided_name = "trap", + display = '^', + triggered = function() end, +} + +newEntity{ base = "TRAP_ANNOY", + name = "lethargy trap", auto_id = true, + detect_power = 20, disarm_power = 36, + rarity = 3, level_range = {1, 50}, + color=colors.BLUE, + message = "@Target@ seems less active.", + triggered = function(self, x, y, who) + local tids = {} + for tid, lev in pairs(who.talents) do + if not who.talents_cd[tid] then tids[#tids+1] = tid end + end + for i = 1, 3 do + local tid = rng.tableRemove(tids) + if not tid then break end + who.talents_cd[tid] = rng.range(4, 7) + end + who.changed = true + return true, true + end +} + +newEntity{ base = "TRAP_ANNOY", + name = "burning curse trap", auto_id = true, + detect_power = 50, disarm_power = 58, + rarity = 3, level_range = {30, 50}, + color=colors.ORCHID, + message = "@Target@ triggers a burning curse!", + dam = resolvers.mbonus(80, 5), + triggered = function(self, x, y, who) + who:setEffect(who.EFF_BURNING_HEX, 7, {dam=self.dam}) + return true, true + end +} diff --git a/game/modules/tome/data/zones/high-peak/traps.lua b/game/modules/tome/data/zones/high-peak/traps.lua index 3cd3173e45699446c9ad0526d8ce04b7690a2b32..bf469164e205ed315319a60480ab843df10ddbe5 100644 --- a/game/modules/tome/data/zones/high-peak/traps.lua +++ b/game/modules/tome/data/zones/high-peak/traps.lua @@ -18,3 +18,5 @@ -- darkgod@te4.org load("/data/general/traps/elemental.lua") +load("/data/general/traps/annoy.lua") +load("/data/general/traps/alarm.lua") diff --git a/game/modules/tome/data/zones/tol-falas/traps.lua b/game/modules/tome/data/zones/tol-falas/traps.lua index 3cd3173e45699446c9ad0526d8ce04b7690a2b32..bf469164e205ed315319a60480ab843df10ddbe5 100644 --- a/game/modules/tome/data/zones/tol-falas/traps.lua +++ b/game/modules/tome/data/zones/tol-falas/traps.lua @@ -18,3 +18,5 @@ -- darkgod@te4.org load("/data/general/traps/elemental.lua") +load("/data/general/traps/annoy.lua") +load("/data/general/traps/alarm.lua")