diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 8326eb68511d01fb98c87a47cd1ce0b6a42a5616..860a7ff8eb608cd0940ad4364e914876b71ddaf0 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -542,10 +542,15 @@ end function _M:learnStats(statorder) self.auto_stat_cnt = self.auto_stat_cnt or 1 + local nb = 0 while self.unused_stats > 0 do - self:incStat(statorder[self.auto_stat_cnt], 1) + if self:getStat(statorder[self.auto_stat_cnt]) < 60 then + self:incStat(statorder[self.auto_stat_cnt], 1) + self.unused_stats = self.unused_stats - 1 + end self.auto_stat_cnt = util.boundWrap(self.auto_stat_cnt + 1, 1, #statorder) - self.unused_stats = self.unused_stats - 1 + nb = nb + 1 + if nb >= #statorder then break end end end diff --git a/game/modules/tome/data/chats/pre-mount-doom.lua b/game/modules/tome/data/chats/pre-mount-doom.lua new file mode 100644 index 0000000000000000000000000000000000000000..2908a9273cacf4c09ab977f19459eef38e65cfd3 --- /dev/null +++ b/game/modules/tome/data/chats/pre-mount-doom.lua @@ -0,0 +1,38 @@ +-- 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 + +newChat{ id="welcome", + text = [[*#LIGHT_GREEN#Suddently a voice appears in your head.#WHITE#* +@playername@, this is High Sun Paladin Aeryn of the Sunwall, I am communicating with you thanks to the power of the anorithil. +I have some urgent information for you: the staff you were looking for has been located.]], + answers = { + {"Where?!", jump="where"}, + } +} + +newChat{ id="where", + text = [[One of our patrols noticed some strange orc movements around in the sourthern part of the contient, inside the desert of Erúan. +A groupd of orcs where guarding something that looks like the staff you talked about. +You should go there and investigate, this might be your only chance.]], + answers = { + {"I will, right now!"}, + } +} + +return "welcome" diff --git a/game/modules/tome/data/maps/wilderness/arda-fareast.lua b/game/modules/tome/data/maps/wilderness/arda-fareast.lua index 30ad74ad575da7431670806e1d7111347bdbc09b..d02f86a2f19ba92a1bfe9781f041d37d010edf8e 100644 --- a/game/modules/tome/data/maps/wilderness/arda-fareast.lua +++ b/game/modules/tome/data/maps/wilderness/arda-fareast.lua @@ -80,9 +80,9 @@ return [[ ======== ~~~~~~~~tttttt~~mmmmmmmmttt ========= ======= ~~~~ ~~~~~~~~ttmmmmmmmtttt ========== ====== ~~~~ tttttttmmmmmmtttt ========== -===== ~~~ ttttttmmmmmmttttt =========== -===== ~~~~ ttttmmmmttttttt w =========== -====~~~~~~~~~~ mmmmtttttttt www============ +===== ~~~ ttttttmmmmmmmmttt =========== +===== ~~~~ ttttmmmmtmmmmtt w =========== +====~~~~~~~~~~ mmmmtttttmmt www============ ===== mmtttttttt www============ ===== www============ ===== www============ diff --git a/game/modules/tome/data/quests/pre-mount-doom.lua b/game/modules/tome/data/quests/pre-mount-doom.lua new file mode 100644 index 0000000000000000000000000000000000000000..6966ad4d6d25eca3dbe8492a8f510579fbb07de0 --- /dev/null +++ b/game/modules/tome/data/quests/pre-mount-doom.lua @@ -0,0 +1,43 @@ +-- 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 + +name = "Important news" +desc = function(self, who) + local desc = {} + desc[#desc+1] = "" + return table.concat(desc, "\n") +end + +on_grant = function(self, who) + local aeryn = {name="High Sun Paladin Aeryn"} + local chat = engine.Chat.new("pre-mount-doom", aeryn, who) + chat:invoke() + + -- Reveal entrance + local g = mod.class.Grid.new{ + show_tooltip=true, + name="The arid wastes of Erúan", + display='>', color=colors.UMBER, + notice = true, + change_level=1, change_zone="eruan" + } + g:resolve() g:resolve(nil, true) + game.zone:addEntity(game.memory_levels["wilderness-arda-fareast-1"], g, "terrain", 56, 51) + game.logPlayer(game.player, "Aeryn explained where the cave is located.") +end diff --git a/game/modules/tome/data/zones/eruan/grids.lua b/game/modules/tome/data/zones/eruan/grids.lua new file mode 100644 index 0000000000000000000000000000000000000000..89852b0fca7f796acfc55505bafef342ed3bad15 --- /dev/null +++ b/game/modules/tome/data/zones/eruan/grids.lua @@ -0,0 +1,42 @@ +-- 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/sand.lua") + +newEntity{ + define_as = "MOUNT_DOOM_PORTAL", + name = "Farportal: Mount Doom", + display = '&', color_r=255, color_g=0, color_b=220, back_color=colors.VIOLET, + notice = true, + always_remember = true, + show_tooltip = true, + desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use. You have no idea if it is even two-way. +This one seems to go to the west, to Mount Doom, in the land of Mordor...]], + + orb_portal = { + change_level = 1, + change_zone = "mount-doom", + message = "#VIOLET#You enter the swirling portal and in the blink of an eye you set foot on hellish land, the heart of a volcano...", + on_use = function(self, who) + who:setQuestStatus("pre-mount-doom", engine.Quest.DONE) + end, + }, +} diff --git a/game/modules/tome/data/zones/eruan/npcs.lua b/game/modules/tome/data/zones/eruan/npcs.lua new file mode 100644 index 0000000000000000000000000000000000000000..6d7e63ae9a55b3940dcc4d6273a2c979fd21a658 --- /dev/null +++ b/game/modules/tome/data/zones/eruan/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/sandworm.lua") +load("/data/general/npcs/orc.lua") + +local Talents = require("engine.interface.ActorTalents") diff --git a/game/modules/tome/data/zones/eruan/objects.lua b/game/modules/tome/data/zones/eruan/objects.lua new file mode 100644 index 0000000000000000000000000000000000000000..aa836bbfc49da4beb82fcf1e2638d61877530775 --- /dev/null +++ b/game/modules/tome/data/zones/eruan/objects.lua @@ -0,0 +1,40 @@ +-- 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") + +-- Artifact, droped (and used!) by Bill the Stone Troll + +newEntity{ base = "BASE_GREATMAUL", + define_as = "GREATMAUL_BILL_TRUNK", + name = "Bill's Tree Trunk", unique=true, + desc = [[This is a big nasty looking tree trunk that Bill was using as a weapon. It could still serve this purpose, should you be strong enough to wield it!]], + require = { stat = { str=25 }, }, + cost = 5, + combat = { + dam = 30, + apr = 7, + physcrit = 1.5, + dammod = {str=1.3}, + damrange = 1.7, + }, + + wielder = { + }, +} diff --git a/game/modules/tome/data/zones/eruan/traps.lua b/game/modules/tome/data/zones/eruan/traps.lua new file mode 100644 index 0000000000000000000000000000000000000000..1c7366dd712b84eb16b65ca892988183984faff4 --- /dev/null +++ b/game/modules/tome/data/zones/eruan/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/natural_forest.lua") diff --git a/game/modules/tome/data/zones/eruan/zone.lua b/game/modules/tome/data/zones/eruan/zone.lua new file mode 100644 index 0000000000000000000000000000000000000000..c78a80b1d71e3b7ee30f0b4c666de82a5598c8dd --- /dev/null +++ b/game/modules/tome/data/zones/eruan/zone.lua @@ -0,0 +1,71 @@ +-- 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 = "Erúan", + level_range = {30, 35}, + level_scheme = "player", + max_level = 5, + 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 = 50, height = 50, +-- all_remembered = true, + all_lited = true, + persistant = "zone", + ambiant_music = "Rainy Day.ogg", + generator = { + map = { + class = "engine.generator.map.Forest", + edge_entrances = {8,2}, + zoom = 6, + sqrt_percent = 40, + noise = "fbm_perlin", + floor = "SAND", + wall = "PALMTREE", + up = "UP", + down = "DOWN", + do_ponds = { + nb = {0, 2}, + size = {w=25, h=25}, + pond = {{0.6, "DEEP_WATER"}, {0.8, "SHALLOW_WATER"}}, + }, + }, + actor = { + class = "engine.generator.actor.Random", + nb_npc = {20, 30}, + }, + object = { + class = "engine.generator.object.Random", + nb_object = {6, 9}, + filters = { {type="potion" }, {type="potion" }, {type="potion" }, {type="scroll" }, {}, {} } + }, + trap = { + class = "engine.generator.trap.Random", + nb_trap = {6, 9}, + }, + }, + levels = + { + [1] = { + generator = { map = { + up = "UP_WILDERNESS", + }, }, + }, + }, +} diff --git a/game/modules/tome/data/zones/rak-shor-pride/npcs.lua b/game/modules/tome/data/zones/rak-shor-pride/npcs.lua index 33eaee8227988d8f7092a2d99a2e8b2154712161..bb2237f7bc82a945adfdf253ca663cb279710f69 100644 --- a/game/modules/tome/data/zones/rak-shor-pride/npcs.lua +++ b/game/modules/tome/data/zones/rak-shor-pride/npcs.lua @@ -51,19 +51,20 @@ newEntity{ base="BASE_NPC_ORC_RAK_SHOR", define_as = "RAK_SHOR", }, summon = { - {type="undead", subtype="skeleton", number=3, hasxp=false}, - {type="humanoid", subtype="ghoul", number=3, hasxp=false}, + {type="undead", number=2, hasxp=false}, }, make_escort = { - {type="undead", subtype="ghoul", no_subescort=true, number=resolvers.mbonus(4, 4)}, - {type="undead", subtype="skeleton", no_subescort=true, number=resolvers.mbonus(4, 4)}, + {type="undead", no_subescort=true, number=resolvers.mbonus(4, 4)}, }, resolvers.talents{ --- [Talents.T_]=2, + [Talents.T_SUMMON]=1, }, on_die = function(self, who) game.player:resolveSource():setQuestStatus("orc-pride", engine.Quest.COMPLETED, "rak-shor") + if not game.player:hasQuest("pre-mount-doom") then + game.player:grantQuest("pre-mount-doom") + end end, } diff --git a/game/modules/tome/data/zones/rak-shor-pride/zone.lua b/game/modules/tome/data/zones/rak-shor-pride/zone.lua index 3d80568756645ae5dd6aa717b70785e63c675974..61ef8b477c34e9851c52ab49a8f55b2549ebfd64 100644 --- a/game/modules/tome/data/zones/rak-shor-pride/zone.lua +++ b/game/modules/tome/data/zones/rak-shor-pride/zone.lua @@ -52,6 +52,9 @@ return { nb_object = {3, 6}, }, }, + post_process = function(level) + for uid, e in pairs(level.entities) do e.faction="orc-pride" end + end, levels = { [1] = { diff --git a/ideas/zones.ods b/ideas/zones.ods index 393177ada405d75e1cc3780e74b8f870dd024b65..5443c5619d37f95c9448b97a7a975acde606f550 100644 Binary files a/ideas/zones.ods and b/ideas/zones.ods differ