Skip to content
Snippets Groups Projects
Commit 25cba342 authored by dg's avatar dg
Browse files

all dungeons got traps

git-svn-id: http://svn.net-core.org/repos/t-engine4@302 51575b47-30f0-44d4-a5cc-537603b46e54
parent 54425ede
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,10 @@ function _M:isIdentified()
self.identified = game.object_known_types[self.type][self.subtype][self.name]
end
if self.auto_id then
self.identified = self.auto_id
end
return self.identified
end
......
newEntity{ define_as = "TRAP_NATURAL_FOREST",
type = "natural", subtype="forest", id_by_type=true, unided_name = "trap",
display = '^',
triggered = function(self, x, y, who)
(self.src or who):project({type="hit"}, x, y, self.damtype, self.dam, self.particles and {type=self.particles})
return true
end,
}
newEntity{ base = "TRAP_NATURAL_FOREST",
name = "sliding rock", auto_id = true,
detect_power = 6, disarm_power = 16,
rarity = 3, level_range = {1, 50},
color=colors.UMBER,
message = "@Target@ slides on a rock!",
triggered = function(self, x, y, who)
if who:checkHit(self.disarm_power + 5, who:combatPhysicalResist(), 0, 95, 15) and who:canBe("stun") then
who:setEffect(who.EFF_STUNNED, 4, {})
else
game.logSeen(who, "%s resists!", who.name:capitalize())
end
end
}
newEntity{ base = "TRAP_NATURAL_FOREST",
name = "poison vine", auto_id = true,
detect_power = 8, disarm_power = 2,
rarity = 3, level_range = {1, 50},
color=colors.GREEN,
message = "A poisonous vine strikes at @Target@!",
dam = resolvers.mbonus(150, 15), damtype = DamageType.POISON,
}
load("/data/general/traps/elemental.lua")
......@@ -26,6 +26,10 @@ return {
nb_object = {4, 6},
filters = { {type="potion" }, {type="potion" }, {type="potion" }, {type="scroll" }, {}, {} }
},
trap = {
class = "engine.generator.trap.Random",
nb_trap = {9, 15},
},
},
levels =
{
......
load("/data/general/traps/natural_forest.lua")
......@@ -31,6 +31,10 @@ return {
nb_object = {6, 9},
filters = { {} }
},
trap = {
class = "engine.generator.trap.Random",
nb_trap = {9, 15},
},
},
levels =
{
......
......@@ -32,7 +32,7 @@ return {
},
trap = {
class = "engine.generator.trap.Random",
nb_trap = {60, 90},
nb_trap = {6, 9},
},
},
levels =
......
load("/data/general/traps/natural_forest.lua")
......@@ -30,6 +30,10 @@ return {
nb_object = {6, 9},
filters = { {type="potion" }, {type="potion" }, {type="potion" }, {type="scroll" }, {}, {} }
},
trap = {
class = "engine.generator.trap.Random",
nb_trap = {6, 9},
},
},
levels =
{
......
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