diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 4c1a9b99f7cc06adece0667516baab03ec28f466..a2a2a174b973f54f4a222fdbbfe4127da28ea004 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -573,6 +573,22 @@ function _M:onTakeHit(value, src) game.logSeen(self, "%s shatters into pieces!", self.name:capitalize()) end + -- Split ? + if self.clone_on_hit and value >= self.clone_on_hit.min_dam_pct * self.max_life / 100 and rng.percent(self.clone_on_hit.chance) then + -- Find space + local x, y = util.findFreeGrid(self.x, self.y, 1, true, {[Map.ACTOR]=true}) + if x then + -- Find a place around to clone + local a = self:clone() + a.energy.val = 0 + a.exp_worth = 0.1 + a.inven = {} + a.x, a.y = nil, nil + game.zone:addEntity(game.level, a, "actor", x, y) + game.logSeen(self, "%s is split in two!", self.name:capitalize()) + end + end + return value end diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 1313097630a79c64a71ac51ae1370f581432fd92..ed7ee572efeac36f0ed1b6b1459ea31d14cab260 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -501,6 +501,11 @@ function _M:setupCommands() self.logPlayer(self.player, "All world artifacts created.") end end, + [{"_g","ctrl"}] = function() + if config.settings.tome.cheat then + self:changeLevel(1, "slime-tunnels") + end + end, } self.key:addBinds { diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 62afc1482cd9ea4341bae52c6efe399582ce436c..791f498a43b7fa7f96b7a7a2da4bf7d4ba522b9a 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -555,6 +555,20 @@ function _M:useOrbPortal(portal) if portal.on_use then portal:on_use(self) end end +--- Use the orbs of command +function _M:useCommandOrb(o) + local g = game.level.map(self.x, self.y, Map.TERRAIN) + if not g then return end + if not g.define_as or not o.define_as or o.define_as ~= g.define_as then + game.logPlayer(self, "This does not seem to have any effect.") + return + end + + game.logPlayer(self, "You use the %s on the pedestral. There is a distant 'clonk' sound.", o:getName{do_colour=true}) + self:grantQuest("orb-command") + self:setQuestStatus("orb-command", engine.Quest.COMPLETED, o.define_as) +end + --- Tell us when we are targetted function _M:on_targeted(act) if self:attr("invisible") or self:attr("stealth") then diff --git a/game/modules/tome/class/generator/map/SlimeTunnels.lua b/game/modules/tome/class/generator/map/SlimeTunnels.lua new file mode 100644 index 0000000000000000000000000000000000000000..1b41ec43af3f8202b6aa0f7ad70265900ed92638 --- /dev/null +++ b/game/modules/tome/class/generator/map/SlimeTunnels.lua @@ -0,0 +1,86 @@ +-- TE4 - T-Engine 4 +-- 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 + +require "engine.class" +local Map = require "engine.Map" +require "engine.Generator" +module(..., package.seeall, class.inherit(engine.Generator)) + +function _M:init(zone, map, level, data) + engine.Generator.init(self, zone, map, level) + self.data = data + self.grid_list = zone.grid_list +end + +function _M:makePath(sx, sy, ex, ey, wd, excentricity, points) + local ln = 0 + local path = core.noise.new(1) + + local j = sy + local dir = true + for i = sx, ex do + for jj = j - wd, j + wd do if self.map:isBound(i, jj) then self.map(i, jj, Map.TERRAIN, self:resolve(".")) end end + points[#points+1] = {x=i, y=j} + + if i < ex - 10 then + local n = path:fbm_perlin(150 * i / self.map.w, 4) + if ln < -excentricity or ln > excentricity then + if (ln > 0 and n < 0) or (ln < 0 and n > 0) then dir = not dir end + j = util.bound(j + (dir and -1 or 1), 0, self.map.h - 1) + end + ln = n + else + -- Close in on the exit + if j < ey then j = j + 1 + elseif j > ey then j = j - 1 + end + end + end +end + +function _M:generate(lev, old_lev) + for i = 0, self.map.w - 1 do for j = 0, self.map.h - 1 do + self.map(i, j, Map.TERRAIN, self:resolve("#")) + end end + + local points = {} + self:makePath(0, self.data.start, self.map.w - 1, self.data.stop, 1, 0.35, points) + for i = 1, 10 do + local sp, ep + repeat + sp = rng.table(points) + ep = rng.table(points) + until ep.x - sp.x > 80 + self:makePath(sp.x, sp.y, ep.x, ep.y, 0, 0.25, points) + end + + -- Place pedestrals + local orbs = {"ORB_UNDEATH", "ORB_DRAGON", "ORB_ELEMENTS", "ORB_DESTRUCTION"} + for i = 1, 4 do + local orb = rng.tableRemove(orbs) + local p = rng.tableRemove(points) + self.map(p.x, p.y, Map.TERRAIN, self:resolve(orb, nil, true)) + end + + self.level.slime_points = points + + -- Make stairs + local spots = {} + return 1,1,1,1, spots +end diff --git a/game/modules/tome/data/chats/message-minas-tirith.lua b/game/modules/tome/data/chats/message-minas-tirith.lua index 113eb79e900d6042908bd3b4f74812803a8dee96..edd30bd3531b9a2fd0bc1469eaa50f3ddea4a8fb 100644 --- a/game/modules/tome/data/chats/message-minas-tirith.lua +++ b/game/modules/tome/data/chats/message-minas-tirith.lua @@ -25,10 +25,12 @@ But enough talk, take this message, now I must go. answers = { {"Thank you for your courrage.", action=function(npc, player) local o, item, inven_id = npc:findInAllInventories("Sealed Scroll of Minas Tirith") - npc:removeObject(inven_id, item, true) - player:addObject(player.INVEN_INVEN, o) - player:sortInven() - game.logPlayer(player, "The herald gives you %s.", o:getName{do_color=true}) + if o then + npc:removeObject(inven_id, item, true) + player:addObject(player.INVEN_INVEN, o) + player:sortInven() + game.logPlayer(player, "The herald gives you %s.", o:getName{do_color=true}) + end if game.level:hasEntity(npc) then game.level:removeEntity(npc) end end}, diff --git a/game/modules/tome/data/general/grids/slime.lua b/game/modules/tome/data/general/grids/slime.lua new file mode 100644 index 0000000000000000000000000000000000000000..671cd21e597b207928f91790332d3a55ce262848 --- /dev/null +++ b/game/modules/tome/data/general/grids/slime.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 + +newEntity{ + define_as = "SLIME_FLOOR", + name = "slimy floor", image = "terrain/slime_floor.png", + display = '.', color=colors.LIGHT_GREEN, back_color=colors.GREEN, +} + +newEntity{ + define_as = "SLIME_WALL", + name = "slimy wall", image = "terrain/slime_wall.png", + display = '#', color=colors.LIGHT_GREEN, back_color=colors.GREEN, + always_remember = true, + does_block_move = true, + can_pass = {pass_wall=1}, + block_sight = true, + air_level = -20, + dig = "FLOOR", +} diff --git a/game/modules/tome/data/general/npcs/ooze.lua b/game/modules/tome/data/general/npcs/ooze.lua index a0af025998e85823f371a82ff80fb842bf848f5f..47b95b7849c34a30d6920ea1451f51f4fa51cca8 100644 --- a/game/modules/tome/data/general/npcs/ooze.lua +++ b/game/modules/tome/data/general/npcs/ooze.lua @@ -36,10 +36,12 @@ newEntity{ size_category = 3, infravision = 20, + clone_on_hit = {min_dam_pct=15, chance=30}, + resolvers.drops{chance=90, nb=1, {} }, resolvers.drops{chance=60, nb=1, {type="money"} }, - resists = { [DamageType.LIGHT] = -50 }, + resists = { [DamageType.LIGHT] = -50, [DamageType.COLD] = -50 }, fear_immune = 1, } @@ -104,6 +106,69 @@ Through its transparent jelly structure you can see treasures it has engulfed, a level_range = {12, nil}, exp_worth = 1, rarity = 3, max_life = resolvers.rngavg(50,100), - combat = { dam=7, atk=15, apr=6, damtype=DamageType.ACID }, + combat = { dam=resolvers.mbonus(80, 15), atk=15, apr=6, damtype=DamageType.ACID }, drops = resolvers.drops{chance=90, nb=3, {} }, -} \ No newline at end of file +} + +newEntity{ base = "BASE_NPC_OOZE", + name = "crimson ooze", color=colors.CRIMSON, + desc = "It's reddish and it's oozing.", + level_range = {25, nil}, exp_worth = 1, + rarity = 1, + rank = 2, + max_life = resolvers.rngavg(80,90), life_rating = 11, + combat = { dam=resolvers.mbonus(110, 15), atk=15, apr=5, damtype=DamageType.FIREBURN }, + clone_on_hit = {min_dam_pct=15, chance=50}, +} + +newEntity{ base = "BASE_NPC_OOZE", + name = "brittle clear ooze", color=colors.WHITE, + desc = "It's translucent and it's oozing.", + level_range = {25, nil}, exp_worth = 1, + rarity = 1, + rank = 2, + max_life = resolvers.rngavg(80,90), life_rating = 8, + combat = { dam=resolvers.mbonus(40, 15), atk=15, apr=5, }, + clone_on_hit = {min_dam_pct=1, chance=50}, +} + +newEntity{ base = "BASE_NPC_OOZE", + name = "slimy ooze", color=colors.GREEN, + desc = "It's very slimy and it's oozing.", + level_range = {25, nil}, exp_worth = 1, + rarity = 1, + rank = 2, + max_life = resolvers.rngavg(80,90), life_rating = 11, + combat = { dam=resolvers.mbonus(110, 15), atk=15, apr=5, damtype=DamageType.SLIME }, + clone_on_hit = {min_dam_pct=15, chance=50}, + + resolvers.talents{ [Talents.T_SLIME_SPIT]=5 }, +} + +newEntity{ base = "BASE_NPC_OOZE", + name = "poison ooze", color=colors.LIGHT_GREEN, + desc = "It's very slimy and it's oozing.", + level_range = {25, nil}, exp_worth = 1, + rarity = 1, + rank = 2, + max_life = resolvers.rngavg(80,90), life_rating = 11, + combat = { dam=resolvers.mbonus(110, 15), atk=15, apr=5, damtype=DamageType.POISON }, + clone_on_hit = {min_dam_pct=15, chance=50}, + + resolvers.talents{ [Talents.T_POISONOUS_SPORES]=5 }, +} + +--[[ +newEntity{ base = "BASE_NPC_OOZE", + name = "morphic ooze", color=colors.GREY, + desc = "Its shape change every few seconds.", + level_range = {25, nil}, exp_worth = 1, + rarity = 1, + rank = 3, + max_life = resolvers.rngavg(140,170), life_rating = 11, + combat = { dam=resolvers.mbonus(110, 15), atk=15, apr=5, damtype=DamageType.ACID }, + clone_on_hit = {min_dam_pct=40, chance=100}, + + resolvers.talents{ [Talents.T_OOZE_MERGE]=5 }, +} +]] diff --git a/game/modules/tome/data/general/objects/quest-artifacts.lua b/game/modules/tome/data/general/objects/quest-artifacts.lua index 2678e45658a772278f501a77e379e80b20fcadf2..4a0c5c35502a22bdda747a2f96729d0344092e35 100644 --- a/game/modules/tome/data/general/objects/quest-artifacts.lua +++ b/game/modules/tome/data/general/objects/quest-artifacts.lua @@ -117,6 +117,11 @@ newEntity{ define_as = "ORB_UNDEATH", end end, + max_power = 1, power_regen = 1, + use_power = { name = "use the orb", power = 1, + use = function(self, who) who:useCommandOrb(self) end + }, + carrier = { inc_stats = { [Stats.STAT_DEX] = 6, }, }, @@ -140,6 +145,11 @@ newEntity{ define_as = "ORB_DRAGON", end end, + max_power = 1, power_regen = 1, + use_power = { name = "use the orb", power = 1, + use = function(self, who) who:useCommandOrb(self) end + }, + carrier = { inc_stats = { [Stats.STAT_CUN] = 6, }, }, @@ -163,6 +173,11 @@ newEntity{ define_as = "ORB_ELEMENTS", end end, + max_power = 1, power_regen = 1, + use_power = { name = "use the orb", power = 1, + use = function(self, who) who:useCommandOrb(self) end + }, + carrier = { inc_stats = { [Stats.STAT_MAG] = 6, }, }, @@ -186,6 +201,11 @@ newEntity{ define_as = "ORB_DESTRUCTION", end end, + max_power = 1, power_regen = 1, + use_power = { name = "use the orb", power = 1, + use = function(self, who) who:useCommandOrb(self) end + }, + carrier = { inc_stats = { [Stats.STAT_STR] = 6, }, }, diff --git a/game/modules/tome/data/gfx/terrain/slime_floor.png b/game/modules/tome/data/gfx/terrain/slime_floor.png new file mode 100644 index 0000000000000000000000000000000000000000..5889332a260f6f0b1cc6e9f20a3319b8fd53b20e Binary files /dev/null and b/game/modules/tome/data/gfx/terrain/slime_floor.png differ diff --git a/game/modules/tome/data/gfx/terrain/slime_wall.png b/game/modules/tome/data/gfx/terrain/slime_wall.png new file mode 100644 index 0000000000000000000000000000000000000000..c5a56aeb6ff4b51f2d71b641a96c377e94fda02b Binary files /dev/null and b/game/modules/tome/data/gfx/terrain/slime_wall.png differ diff --git a/game/modules/tome/data/maps/zones/slime-tunnels.lua b/game/modules/tome/data/maps/zones/slime-tunnels.lua new file mode 100644 index 0000000000000000000000000000000000000000..e821004f91f7b3e6ad7b194148d1feed4b55697b --- /dev/null +++ b/game/modules/tome/data/maps/zones/slime-tunnels.lua @@ -0,0 +1,69 @@ +-- 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 + +defineTile('#', "SLIME_WALL") +defineTile('.', "SLIME_FLOOR") +defineTile('<', "UP_WILDERNESS_FAR_EAST") +defineTile('+', "PEAK_DOOR") + +subGenerator{ + x = 2, y = 0, w = 241, h = 30, + generator = "mod.class.generator.map.SlimeTunnels", + data = { + start = 15, + stop = 15, + ['.'] = "SLIME_FLOOR", + ['#'] = "SLIME_WALL", + }, +} + +startx = 0 +starty = 15 + +return [[ +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +####################################################################################################################################################################################################################################################.....+ +###################################################################################################################################################################################################################################################......+ +##.################################################################################################################################################################################################################################################......+ +...################################################################################################################################################################################################################################################......+ +<..################################################################################################################################################################################################################################################......+ +...################################################################################################################################################################################################################################################......+ +##.################################################################################################################################################################################################################################################......+ +####################################################################################################################################################################################################################################################.....+ +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +########################################################################################################################################################################################################################################################## +##########################################################################################################################################################################################################################################################]] diff --git a/game/modules/tome/data/quests/orb-command.lua b/game/modules/tome/data/quests/orb-command.lua index 51a7e438d97357e3fc176390c8d04924e9669331..4c239d67231dace4ce2a8fb5a550acfb216dc718 100644 --- a/game/modules/tome/data/quests/orb-command.lua +++ b/game/modules/tome/data/quests/orb-command.lua @@ -20,7 +20,27 @@ name = "The Orbs of Command" desc = function(self, who) local desc = {} - desc[#desc+1] = "You have found an orb of command that seems to be used to open the shield protecting the High Peek." + desc[#desc+1] = "You have found an orb of command that seems to be used to open the shield protecting the High Peak." desc[#desc+1] = "There seems to be a total of four of them, the more you have the weaker the shield will be." return table.concat(desc, "\n") end + +on_status_change = function(self, who, status, sub) + if sub then + if self:isCompleted("ORB_DESTRUCTION") and + self:isCompleted("ORB_UNDEATH") and + self:isCompleted("ORB_DRAGON") and + self:isCompleted("ORB_ELEMENTS") then + who:setQuestStatus(self.id, engine.Quest.DONE) + self:open_high_peak(who) + end + end +end + +open_high_peak = function(self, who) + local g = game.zone:makeEntityByName(game.level, "terrain", "PEAK_STAIR") + for j = 11, 18 do + game.level.map(249, j, engine.Map.TERRAIN, g) + end + game.logPlayer(who, "#LIGHT_BLUE#There is a loud crack. The way is open.") +end diff --git a/game/modules/tome/data/talents/techniques/superiority.lua b/game/modules/tome/data/talents/techniques/superiority.lua index d1e371e41f2473aa7540e8793dc0d4241b2dbe7b..b4ee96f2e8762a37023d39ae4c9a8e060d54d4d6 100644 --- a/game/modules/tome/data/talents/techniques/superiority.lua +++ b/game/modules/tome/data/talents/techniques/superiority.lua @@ -72,7 +72,7 @@ newTalent{ cooldown = 10, stamina = 30, action = function(self, t) - local tg = {type="ball", range=0, friendlyfire=true, radius=2 + self:getTalentLevel(t), talent=t} + local tg = {type="ball", range=0, friendlyfire=false, radius=2 + self:getTalentLevel(t), talent=t} self:project(tg, self.x, self.y, function(px, py) local target = game.level.map(px, py, Map.ACTOR) if not target then return end @@ -84,7 +84,7 @@ newTalent{ end) return true end, - info = function(self, t) + info = function(self, t) return ([[Call all foes in a radius of %d around you into battle, getting them into melee range in an instant.]]):format(2+self:getTalentLevel(t)) end, } diff --git a/game/modules/tome/data/texts/unlock-mage_cryomancer.lua b/game/modules/tome/data/texts/unlock-mage_cryomancer.lua index c60d8e6ab3e3b5b3cc25059036c58ea64a66f790..b578851f39ba2078acc8f156bfbb190860fad72d 100644 --- a/game/modules/tome/data/texts/unlock-mage_cryomancer.lua +++ b/game/modules/tome/data/texts/unlock-mage_cryomancer.lua @@ -26,7 +26,7 @@ This place is Angolwen, the City of Magic, and for over one hundred years has ta You have uncovered the secrets of the ice magic and can now create new characters with the #LIGHT_GREEN#Cryomancer class#WHITE#. -Pyromancers are specialized archmages, attuned to the magical properties of ice. +Cryomancers are specialized archmages, attuned to the magical properties of ice. Class features:#YELLOW# - Cast potent ice spells to freeze your foes. - Freeze your foes and make them shatter into pieces. diff --git a/game/modules/tome/data/zones/slime-tunnels/grids.lua b/game/modules/tome/data/zones/slime-tunnels/grids.lua new file mode 100644 index 0000000000000000000000000000000000000000..e4860a754f5b25165e0683085a6908267f76fbc0 --- /dev/null +++ b/game/modules/tome/data/zones/slime-tunnels/grids.lua @@ -0,0 +1,63 @@ +-- 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 + +load("/data/general/grids/basic.lua") +load("/data/general/grids/water.lua") +load("/data/general/grids/slime.lua") + +newEntity{ + define_as = "ORB_DRAGON", + name = "orb pedestral (dragon)", image = "terrain/orb_pedestral.png", + display = '_', color_r=255, color_g=255, color_b=255, back_color=colors.LIGHT_RED, +} +newEntity{ + define_as = "ORB_UNDEATH", + name = "orb pedestral (undeath)", image = "terrain/orb_pedestral.png", + display = '_', color_r=255, color_g=255, color_b=255, back_color=colors.LIGHT_RED, +} +newEntity{ + define_as = "ORB_ELEMENTS", + name = "orb pedestral (elements)", image = "terrain/orb_pedestral.png", + display = '_', color_r=255, color_g=255, color_b=255, back_color=colors.LIGHT_RED, +} +newEntity{ + define_as = "ORB_DESTRUCTION", + name = "orb pedestral (destruction)", image = "terrain/orb_pedestral.png", + display = '_', color_r=255, color_g=255, color_b=255, back_color=colors.LIGHT_RED, +} + +newEntity{ + define_as = "PEAK_DOOR", + name = "sealed door", image = "terrain/granite_door1.png", + display = '+', color_r=238, color_g=154, color_b=77, back_color=colors.DARK_UMBER, + notice = true, + always_remember = true, + does_block_move = true, + block_sight = true, +} + +newEntity{ + define_as = "PEAK_STAIR", + always_remember = true, + show_tooltip=true, + name="Entrance to the High Peak", + display='>', color=colors.VIOLET, + notice = true, + change_level=1, change_zone="high-peak", +} diff --git a/game/modules/tome/data/zones/slime-tunnels/npcs.lua b/game/modules/tome/data/zones/slime-tunnels/npcs.lua new file mode 100644 index 0000000000000000000000000000000000000000..c758ac3f5981d400109d1e69d2e6043dea031bd4 --- /dev/null +++ b/game/modules/tome/data/zones/slime-tunnels/npcs.lua @@ -0,0 +1,23 @@ +-- 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 + +load("/data/general/npcs/jelly.lua", rarity(0)) +load("/data/general/npcs/ooze.lua", rarity(0)) + +local Talents = require("engine.interface.ActorTalents") diff --git a/game/modules/tome/data/zones/slime-tunnels/objects.lua b/game/modules/tome/data/zones/slime-tunnels/objects.lua new file mode 100644 index 0000000000000000000000000000000000000000..cea7eb148c36c019214139b66715598bceafe35e --- /dev/null +++ b/game/modules/tome/data/zones/slime-tunnels/objects.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 + +load("/data/general/objects/objects.lua") + +newEntity{ base = "BASE_WAND", + define_as = "ROD_SPYDRIC_POISON", + name = "Rod of Spydric Poison", color=colors.LIGHT_GREEN, unique=true, + cost = 50, + elec_proof = true, + + max_power = 75, power_regen = 1, + use_power = { name = "shoot a bolt of spyric poison", power = 25, + use = function(self, who) + local tg = {type="bolt", range=12, talent=t} + local x, y = who:getTarget(tg) + if not x or not y then return nil end + who:project(tg, x, y, engine.DamageType.SPYDRIC_POISON, {dam=200 + who:getMag() * 4, dur=6}, {type="slime"}) + end + }, +} diff --git a/game/modules/tome/data/zones/slime-tunnels/traps.lua b/game/modules/tome/data/zones/slime-tunnels/traps.lua new file mode 100644 index 0000000000000000000000000000000000000000..4ee7b9dd16339fa08f75a53f0729e74fc71d6daf --- /dev/null +++ b/game/modules/tome/data/zones/slime-tunnels/traps.lua @@ -0,0 +1,20 @@ +-- 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 + +load("/data/general/traps/water.lua") diff --git a/game/modules/tome/data/zones/slime-tunnels/zone.lua b/game/modules/tome/data/zones/slime-tunnels/zone.lua new file mode 100644 index 0000000000000000000000000000000000000000..0f9e51882776b2f33f11d5571e4cadd2b1085fa1 --- /dev/null +++ b/game/modules/tome/data/zones/slime-tunnels/zone.lua @@ -0,0 +1,55 @@ +-- 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 { + name = "Slime Tunnels", + level_range = {45, 50}, + level_scheme = "player", + max_level = 1, + decay = {300, 800}, + actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end, + width = 250, height = 30, + all_remembered = true, + all_lited = true, + persistant = "zone", + no_level_connectivity = true, + generator = { + map = { + class = "engine.generator.map.Static", + map = "zones/slime-tunnels", + }, + actor = { + class = "engine.generator.actor.Random", +-- area = {x1=0, x2=11, y1=30, y2=410}, + nb_npc = {20, 30}, + }, + trap = { + class = "engine.generator.trap.Random", + nb_trap = {0, 0}, + }, + }, + levels = + { + [1] = { + generator = { map = { + up = "UP_WILDERNESS_FAR_EAST", + }, }, + }, + }, +} diff --git a/ideas/zones.ods b/ideas/zones.ods index e2a57fb1e34ba4e8a4563c05127263420b1d66b7..68bab0cb279a18d37b46be1650c906ab8a5d37b6 100644 Binary files a/ideas/zones.ods and b/ideas/zones.ods differ