From e1e41f1c8511c5d10ee19a9b5cfed0479a680b66 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Fri, 30 Jul 2010 16:08:53 +0000
Subject: [PATCH] some new traps

git-svn-id: http://svn.net-core.org/repos/t-engine4@956 51575b47-30f0-44d4-a5cc-537603b46e54
---
 .../tome/data/general/traps/teleport.lua      | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 game/modules/tome/data/general/traps/teleport.lua

diff --git a/game/modules/tome/data/general/traps/teleport.lua b/game/modules/tome/data/general/traps/teleport.lua
new file mode 100644
index 0000000000..db5981d931
--- /dev/null
+++ b/game/modules/tome/data/general/traps/teleport.lua
@@ -0,0 +1,37 @@
+-- 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_ALARM",
+	type = "annoy", subtype="teleport", id_by_type=true, unided_name = "trap",
+	display = '^',
+	triggered = function() end,
+}
+
+newEntity{ base = "TRAP_TELEPORT",
+	name = "teleport trap", auto_id = true,
+	desc = [[Now you know why nobody ever got close enough to disarm this trap...]],
+	detect_power = resolvers.mbonus(5, 40), disarm_power = resolvers.mbonus(10, 50),
+	rarity = 5, level_range = {5, 50},
+	color=colors.UMBER,
+	message = "@Target@ is teleported away.",
+	triggered = function(self, x, y, who)
+		who:teleportRandom(x, y, 100)
+		return true
+	end
+}
-- 
GitLab