diff --git a/game/engines/default/engine/Zone.lua b/game/engines/default/engine/Zone.lua index f9e4a7c735ad5f0cc0a74bb46515958f111ffb80..b0ff7cd431be2a78e269bf8578abe329967abd7f 100644 --- a/game/engines/default/engine/Zone.lua +++ b/game/engines/default/engine/Zone.lua @@ -584,29 +584,29 @@ function _M:newLevel(level_data, lev, old_lev, game) map.room_map = nil -- Check for connectivity from entrance to exit + local a = Astar.new(map, game:getPlayer()) if not level_data.no_level_connectivity then - local a = Astar.new(map, game:getPlayer()) print("[LEVEL GENERATION] checking entrance to exit A*", ux, uy, "to", dx, dy) if ux and uy and dx and dy and (ux ~= dx or uy ~= dy) and not a:calc(ux, uy, dx, dy) then print("Level unconnected, no way from entrance to exit", ux, uy, "to", dx, dy) level:removed() return self:newLevel(level_data, lev, old_lev, game) end - for i = 1, #spots do - local spot = spots[i] - if spot.check_connectivity then - local cx, cy - if type(spot.check_connectivity) == "string" and spot.check_connectivity == "entrance" then cx, cy = ux, uy - elseif type(spot.check_connectivity) == "string" and spot.check_connectivity == "exit" then cx, cy = dx, dy - else cx, cy = spot.check_connectivity.x, spot.check_connectivity.y - end + end + for i = 1, #spots do + local spot = spots[i] + if spot.check_connectivity then + local cx, cy + if type(spot.check_connectivity) == "string" and spot.check_connectivity == "entrance" then cx, cy = ux, uy + elseif type(spot.check_connectivity) == "string" and spot.check_connectivity == "exit" then cx, cy = dx, dy + else cx, cy = spot.check_connectivity.x, spot.check_connectivity.y + end - print("[LEVEL GENERATION] checking A*", spot.x, spot.y, "to", cx, cy) - if spot.x and spot.y and cx and cy and (spot.x ~= cx or spot.y ~= cy) and not a:calc(spot.x, spot.y, cx, cy) then - print("Level unconnected, no way from", spot.x, spot.y, "to", cx, cy) - level:removed() - return self:newLevel(level_data, lev, old_lev, game) - end + print("[LEVEL GENERATION] checking A*", spot.x, spot.y, "to", cx, cy) + if spot.x and spot.y and cx and cy and (spot.x ~= cx or spot.y ~= cy) and not a:calc(spot.x, spot.y, cx, cy) then + print("Level unconnected, no way from", spot.x, spot.y, "to", cx, cy) + level:removed() + return self:newLevel(level_data, lev, old_lev, game) end end end diff --git a/game/engines/default/engine/generator/map/Static.lua b/game/engines/default/engine/generator/map/Static.lua index 8e04f927672f57d19986eadd92fd8f510797e0a7..7a3d2d4a487e1d292c9b82b61cfaaa01979b674f 100644 --- a/game/engines/default/engine/generator/map/Static.lua +++ b/game/engines/default/engine/generator/map/Static.lua @@ -175,9 +175,11 @@ function _M:generate(lev, old_lev) end if status then - if status.lite then self.level.map.lites(i-1, j-1, true) status.lite = nil end - if status.remember then self.level.map.remembers(i-1, j-1, true) status.remember = nil end - if pairs(status) then for k, v in pairs(status) do self.level.map.attrs(i-1, j-1, k, v) end end + local s = table.clone(status) + if s.lite then self.level.map.lites(i-1, j-1, true) s.lite = nil end + if s.remember then self.level.map.remembers(i-1, j-1, true) s.remember = nil end + if s.special then self.map.room_map[i-1][j-1].special = s.special end + if pairs(s) then for k, v in pairs(s) do self.level.map.attrs(i-1, j-1, k, v) end end end if define_spot then diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 14b7e2ad2a4d50268e02cec6ded89b44e32c8aa9..d1185309acf590374de332c4c3b961350291c86a 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -449,6 +449,7 @@ function _M:tooltip(x, y, seen_by) end return ([[%s%s%s +%s / %s Rank: %s%s #00ffff#Level: %d Exp: %d/%d @@ -460,6 +461,7 @@ Size: #ANTIQUE_WHITE#%s Faction: %s%s (%s, %d) %s]]):format( self:getDisplayString(), rank_color, self.name, + self.type:capitalize(), self.subtype:capitalize(), rank_color, rank, self.level, self.exp, diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 7c4d8a9ba7369fd7af6ca422a173ce6ae62ba1d5..492ab94f105463b3ad8f6e7aa65d2a7cbbd747f9 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -135,7 +135,7 @@ function _M:newGame() self.player.wild_x, self.player.wild_y = self.player.default_wilderness[1], self.player.default_wilderness[2] self.player.last_wilderness = self.player.default_wilderness[3] or "wilderness" - self:changeLevel(self.player.starting_level or 1, self.player.starting_zone) + self:changeLevel(self.player.starting_level or 1, self.player.starting_zone, nil, self.player.starting_level_force_down) print("[PLAYER BIRTH] resolve...") self.player:resolve() self.player:resolve(nil, true) @@ -146,11 +146,12 @@ function _M:newGame() self.paused = true print("[PLAYER BIRTH] resolved!") self.player:playerLevelup(function() - self.player:grantQuest(self.player.starting_quest) - self:registerDialog(require("mod.dialogs.IntroDialog").new(self.player)) - self.player:resetToFull() - self.player:registerCharacterPlayed() - self.player:onBirth(birth) + self:registerDialog(require("mod.dialogs.IntroDialog").new(self.player, function() + self.player:resetToFull() + self.player:registerCharacterPlayed() + self.player:grantQuest(self.player.starting_quest) + self.player:onBirth(birth) + end)) end) end, quickbirth) self:registerDialog(birth) @@ -276,7 +277,7 @@ function _M:leaveLevel(level, lev, old_lev) end end -function _M:changeLevel(lev, zone, keep_old_lev) +function _M:changeLevel(lev, zone, keep_old_lev, force_down) if not self.player.game_ender then game.logPlayer(self.player, "#LIGHT_RED#You may not change level without your own body!") return @@ -320,7 +321,7 @@ function _M:changeLevel(lev, zone, keep_old_lev) self.player:move(self.player.wild_x, self.player.wild_y, true) self.player.last_wilderness = self.zone.short_name else - if lev > old_lev then + if lev > old_lev and not force_down then self.player:move(self.level.default_up.x, self.level.default_up.y, true) else self.player:move(self.level.default_down.x, self.level.default_down.y, true) diff --git a/game/modules/tome/data/birth/descriptors.lua b/game/modules/tome/data/birth/descriptors.lua index eaa09017e36bc1107179dbf873a258305f4fc1be..ce06b32e08299cb9166c3e48ce8dc436818ece72 100644 --- a/game/modules/tome/data/birth/descriptors.lua +++ b/game/modules/tome/data/birth/descriptors.lua @@ -41,7 +41,7 @@ newBirthDescriptor{ }, talents = {}, experience = 1.0, - body = { INVEN = 1000, QS_MAINHAND = 1, QS_OFFHAND = 1, MAINHAND = 1, OFFHAND = 1, FINGER = 2, NECK = 1, LITE = 1, BODY = 1, HEAD = 1, HANDS = 1, FEET = 1, TOOL = 1, QUIVER = 1, MOUNT = 1 }, + body = { INVEN = 1000, QS_MAINHAND = 1, QS_OFFHAND = 1, MAINHAND = 1, OFFHAND = 1, FINGER = 2, NECK = 1, LITE = 1, BODY = 1, HEAD = 1, CLOAK = 1, HANDS = 1, FEET = 1, TOOL = 1, QUIVER = 1, MOUNT = 1 }, copy = { -- Mages are unheard of at first, nobody but them regenerates mana diff --git a/game/modules/tome/data/birth/races/undead.lua b/game/modules/tome/data/birth/races/undead.lua index e8c009e89707f9eff339b838103d9bdb54ebcd82..6d4fc2d1caa33b4c7d25ded05dd69db42347ec54 100644 --- a/game/modules/tome/data/birth/races/undead.lua +++ b/game/modules/tome/data/birth/races/undead.lua @@ -46,7 +46,7 @@ newBirthDescriptor{ faction = "undead", default_wilderness = {34, 49}, starting_zone = "paths-of-the-dead", - starting_level = 8, + starting_level = 8, starting_level_force_down = true, starting_quest = "start-undead", undead = 1, } diff --git a/game/modules/tome/data/chats/undead-start-game.lua b/game/modules/tome/data/chats/undead-start-game.lua new file mode 100644 index 0000000000000000000000000000000000000000..f734505f03a0dfb4462b0319d308d2d95c11b98b --- /dev/null +++ b/game/modules/tome/data/chats/undead-start-game.lua @@ -0,0 +1,50 @@ +-- 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#*Before you stands an human clothed in black robes. He seems to be ignoring you.*#WHITE# +#LIGHT_GREEN#*You stand inside some kind of summoning circle, which prevents you from moving.*#WHITE# +Oh yes! YES one more for my collection. My collection yes. A powerful one indeed!]], + answers = { + {"[listen]", jump="welcome2"}, + } +} + +newChat{ id="welcome2", + text = [[A powerful tool aginst my ennemies. Yes yes. They all hate me, but I will show them my power! +I will show them! SHOW THEM!]], + answers = { + {"I am not a tool! RELEASE ME!", jump="welcome3"}, + } +} + +newChat{ id="welcome3", + text = [[You can not talk. You can not talk! You are a slave, a tool! +You are mine! Be quiet! +#LIGHT_GREEN#*As his mind drifts off you notice part of the summoning circle is fading, you can probably escape!*#WHITE# +]], + answers = { + {"[attack]", action=function(npc, player) + local floor = game.zone:makeEntityByName(game.level, "terrain", "FLOOR") + game.zone:addEntity(game.level, floor, "terrain", 22, 3) + end}, + } +} + +return "welcome" diff --git a/game/modules/tome/data/chats/undead-start-kill.lua b/game/modules/tome/data/chats/undead-start-kill.lua new file mode 100644 index 0000000000000000000000000000000000000000..f31c5600244e9b99eaca9991e471e6a8564ef736 --- /dev/null +++ b/game/modules/tome/data/chats/undead-start-kill.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 + +newChat{ id="welcome", + text = [[#LIGHT_GREEN#*He falls to his knees.*#WHITE# +Please spare me! I am pitiful I will not stop you. Let me leave!]], + answers = { + {"No!", jump="welcome2"}, + } +} + +newChat{ id="welcome2", + text = [[But but you were my.. you.. +You need me! What do you think you will do on the surface? Everythin you will meet will try to destroy you. +You are strong but you can not resist them all!]], + answers = { + {"So what do you propose?", jump="what"}, + {"[kill him]", action=function(npc, player) + npc.die = nil + npc:doEmote("ARRGGggg... You are alone! You will be destroyed!", 60) + npc:die(player) + end}, + } +} + +newChat{ id="what", + text = [[I can give you a cloak that will conceal your true nature! +With it all people will see when they look at you is a normal average human. You can go about your business. +Please!]], + answers = { + {"Thanks for the information, now you may die. [kill him]", action=function(npc, player) + npc.die = nil + npc:doEmote("ARRGGggg... You are alone! You will be destroyed!", 60) + npc:die(player) + end}, + } +} + +return "welcome" diff --git a/game/modules/tome/data/factions.lua b/game/modules/tome/data/factions.lua index 08fe2f0ccc0954e9adf5eba93f089618d4f4a8d1..ab1d77f9f6df26e7795958dd23bae2a6174dc7c0 100644 --- a/game/modules/tome/data/factions.lua +++ b/game/modules/tome/data/factions.lua @@ -22,18 +22,18 @@ local src = [[ ,Enemies,Undead,Reunited Kingdom,Shire,Lonely Mountain,Eryn Lasgalen,Angolwen,Tol Falas,,Silmaril Guardians|H,Water lair|H,Assassin lair|H,,Sunwall|H,Orc Pride,,Sandworm Burrowers,,Blue Wizards Enemies,,,,,,,,,,,,,,,,,,, Undead,-1,,,,,,,,,,,,,,,,,, -Reunited Kingdom,-1,,,,,,,,,,,,,,,,,, -Shire,-1,,1,,,,,,,,,,,,,,,, -Lonely Mountain,-1,,0.5,1,,,,,,,,,,,,,,, -Eryn Lasgalen,-1,,0.5,1,0.3,,,,,,,,,,,,,, -Angolwen,-1,,,,,,,,,,,,,,,,,, +Reunited Kingdom,-1,-1,,,,,,,,,,,,,,,,, +Shire,-1,-1,1,,,,,,,,,,,,,,,, +Lonely Mountain,-1,-1,0.5,1,,,,,,,,,,,,,,, +Eryn Lasgalen,-1,-1,0.5,1,0.3,,,,,,,,,,,,,, +Angolwen,-1,-1,,,,,,,,,,,,,,,,, Tol Falas,,-1,-1,-1,-1,-1,-1,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,, Silmaril Guardians|H,,,,,,,,,,,,,,,,,,, Water lair|H,-1,,,,,,,,,-1,,,,,,,,, Assassin lair|H,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,, -Sunwall|H,-1,,,,,,,-1,,,,-1,,,,,,, +Sunwall|H,-1,-1,,,,,,-1,,,,-1,,,,,,, Orc Pride,,-1,-1,-1,-1,-1,-1,-1,,,,,,-1,,,,, ,,,,,,,,,,,,,,,,,,, Sandworm Burrowers,,,,,,,,,,,,,,,,,,, diff --git a/game/modules/tome/data/gfx/terrain/sumomn-glyph.png b/game/modules/tome/data/gfx/terrain/sumomn-glyph.png new file mode 100644 index 0000000000000000000000000000000000000000..d2641b107e69d633dfaa60b16731805ed6a7a286 Binary files /dev/null and b/game/modules/tome/data/gfx/terrain/sumomn-glyph.png differ diff --git a/game/modules/tome/data/maps/zones/paths-of-the-dead-last.lua b/game/modules/tome/data/maps/zones/paths-of-the-dead-last.lua new file mode 100644 index 0000000000000000000000000000000000000000..2837b4e8878d3adfd78ef0aabcfcc0f511bbc7b0 --- /dev/null +++ b/game/modules/tome/data/maps/zones/paths-of-the-dead-last.lua @@ -0,0 +1,99 @@ +-- 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 + +local def = {special="start", lite=true, remember=true} +defineTile(' ', "FLOOR", nil, nil, nil, def) +defineTile('#', "WALL", nil, nil, nil, def) +defineTile('+', "DOOR", nil, nil, nil, def) +defineTile(';', "SUMMON_CIRCLE", nil, nil, nil, def) +defineTile('N', "FLOOR", nil, "NECROMANCER", nil, def) + +subGenerator{ + x = 0, y = 9, w = 50, h = 41, + generator = "engine.generator.map.Roomer", + data = { + nb_rooms = 10, + rooms = {"simple", "pilar"}, + ['.'] = "FLOOR", + ['#'] = "WALL", + up = "UP", + door = "DOOR", + force_tunnels = { + {"random", {25, 8}, id=-500}, + }, + }, + define_up = true, +} + +endx = 25 +endy = 3 + +checkConnectivity({25,8}, "entrance", "start-area", "start-area") + +return [[ +############ ;;;;; ############ +############ ;; ;; ############ +############ ; ; ############ +############ ## N ; ; ## ############ +############ ## ; ; ## ############ +############# ;; ;; ############# +############# ;;;;; ############# +############# ## ## ############# +########################++######################## +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +.................................................. +..................................................]] diff --git a/game/modules/tome/data/quests/start-undead.lua b/game/modules/tome/data/quests/start-undead.lua index 148a44d4b106efb4d019e4bf1d42340f0479bc35..c616269b34b74e9ddb7041e7839c6da680211e9c 100644 --- a/game/modules/tome/data/quests/start-undead.lua +++ b/game/modules/tome/data/quests/start-undead.lua @@ -30,3 +30,15 @@ on_status_change = function(self, who, status, sub) who:grantQuest("starter-zones") end end + +on_grant = function(self, who) + local npc + for uid, e in pairs(game.level.entities) do + if e.define_as and e.define_as == "NECROMANCER" then npc = e break end + end + + local Chat = require"engine.Chat" + local chat = Chat.new("undead-start-game", npc, who) + chat:invoke() + self:setStatus(engine.Quest.COMPLETED, "talked-start") +end diff --git a/game/modules/tome/data/zones/paths-of-the-dead/grids.lua b/game/modules/tome/data/zones/paths-of-the-dead/grids.lua index 14dc047df0c83b59498fb0f62c673df2fbc8ca70..40b1c65343ec19828981edddea6898b856892528 100644 --- a/game/modules/tome/data/zones/paths-of-the-dead/grids.lua +++ b/game/modules/tome/data/zones/paths-of-the-dead/grids.lua @@ -18,3 +18,11 @@ -- darkgod@te4.org load("/data/general/grids/basic.lua") + +newEntity{ + define_as = "SUMMON_CIRCLE", + name = "unholy circle", image = "terrain/summon-glyph.png", + display = ';', color=colors.GOLD, back_color=colors.GREY, + always_remember = true, + does_block_move = true, +} diff --git a/game/modules/tome/data/zones/paths-of-the-dead/npcs.lua b/game/modules/tome/data/zones/paths-of-the-dead/npcs.lua index 85aa1d78ff1d0651a4e1ecd0eb68e17091de3b40..c73d70d056a018df692b99f1919e97988187d85d 100644 --- a/game/modules/tome/data/zones/paths-of-the-dead/npcs.lua +++ b/game/modules/tome/data/zones/paths-of-the-dead/npcs.lua @@ -27,38 +27,46 @@ load("/data/general/npcs/all.lua", rarity(4, 35)) local Talents = require("engine.interface.ActorTalents") --- The boss of Amon Sul, no "rarity" field means it will not be randomly generated -newEntity{ define_as = "SHADE_OF_ANGMAR", - type = "undead", subtype = "skeleton", unique = true, - name = "The Shade of Angmar", - display = "s", color=colors.VIOLET, - shader = "unique_glow", - desc = [[This skeleton looks nasty. There is red flames in its empty eye sockets. It wield a nasty sword and towers toward you, throwing spells.]], - level_range = {7, 20}, exp_worth = 2, - max_life = 150, life_rating = 15, fixed_rating = true, - max_mana = 85, - max_stamina = 85, - rank = 4, - size_category = 3, +newEntity{ + define_as = "NECROMANCER", + type = "humanoid", subtype = "human", + display = "p", color=colors.DARK_GREY, + name = "Necromancer", color=colors.DARK_GREY, + desc = [[An human dressed in black robes. He mumbles is a harsh tongue. He seems to think you are his slave.]], + level_range = {1, nil}, exp_worth = 1, + + combat = { dam=resolvers.rngavg(5,12), atk=2, apr=6, physspeed=2 }, + + body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, CLOAK=1, QUIVER=1 }, + resolvers.drops{chance=20, nb=1, {} }, + resolvers.drops{chance=10, nb=1, {type="money"} }, infravision = 20, - stats = { str=16, dex=12, cun=14, mag=25, con=16 }, - instakill_immune = 1, - blind_immune = 1, - move_others=true, + lite = 2, - body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, - equipment = resolvers.equip{ {type="weapon", subtype="staff", defined="STAFF_ANGMAR", autoreq=true}, {type="armor", subtype="light", autoreq=true}, }, - drops = resolvers.drops{chance=100, nb=3, {ego_chance=100} }, + rank = 2, + size_category = 2, - resolvers.talents{ - [Talents.T_MANA_POOL]=1, [Talents.T_MANATHRUST]=4, [Talents.T_FREEZE]=4, [Talents.T_TIDAL_WAVE]=2, - [Talents.T_STAMINA_POOL]=1, [Talents.T_SWORD_MASTERY]=3, [Talents.T_STUNNING_BLOW]=1, + open_door = true, + + autolevel = "caster", + ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=1, }, + energy = { mod=1 }, + stats = { str=10, dex=8, mag=16, con=6 }, + + max_life = resolvers.rngavg(70,80), life_rating = 7, + resolvers.equip{ + {type="weapon", subtype="staff", autoreq=true}, + {type="armor", subtype="cloak", defined="CLOAK_DECEPTION", autoreq=true}, }, - autolevel = "warriormage", - ai = "dumb_talented_simple", ai_state = { talent_in=4, ai_move="move_astar" }, + resolvers.talents{ + [Talents.T_SOUL_ROT]=1, + }, - on_die = function(self, who) - game.player:resolveSource():setQuestStatus("start-dunadan", engine.Quest.COMPLETED, "amon-sul") + die = function(self, src) + self.die = function() end + local Chat = require "engine.Chat" + local chat = Chat.new("undead-start-kill", self, game.player) + chat:invoke() end, } diff --git a/game/modules/tome/data/zones/paths-of-the-dead/objects.lua b/game/modules/tome/data/zones/paths-of-the-dead/objects.lua index fa9642c33dee08637bc5da672fc56bd70a5e87e0..37842c475775ab4da6bf0f24a80af4eb536029e7 100644 --- a/game/modules/tome/data/zones/paths-of-the-dead/objects.lua +++ b/game/modules/tome/data/zones/paths-of-the-dead/objects.lua @@ -19,29 +19,31 @@ load("/data/general/objects/objects.lua") --- Artifact, droped (and used!) by the Shade of Angmar -newEntity{ base = "BASE_STAFF", - define_as = "STAFF_ANGMAR", rarity=false, - name = "Angmar's Fall", unique=true, - desc = [[Made from the bones of of many creatures this staff glows with power. You can feel its evilness as you touch it.]], - require = { stat = { mag=25 }, }, - cost = 5, - combat = { - dam = 10, - apr = 0, - physcrit = 1.5, - dammod = {mag=1.1}, - }, +-- Allows undeads to pass as normal humans +newEntity{ define_as = "CLOAK_DECEPTION", + unique = true, quest=true, + slot = "CLOAK", + type = "armor", subtype="cloak", + unided_name = "black cloak", + name = "Cloak of Deception", + display = ")", color=colors.DARk_GREY, + encumber = 1, + desc = [[A black cloak, with subtle illusion enchantments woven in its very fabric.]], + wielder = { - see_invisible = 2, - combat_spellpower = 7, - combat_spellcrit = 8, - inc_damage={ - [DamageType.FIRE] = 4, - [DamageType.COLD] = 4, - [DamageType.ACID] = 4, - [DamageType.LIGHTNING] = 4, - [DamageType.BLIGHT] = 4, - }, + combat_spellpower = 5, + combat_dam = 5, }, + + on_wear = function(self, who) + who.old_faction_cloak = who.faction + who.faction = "reunited-kingdom" + if who.player then engine.Map:setViewerFaction(who.faction) end + game.logPlayer(who, "#LIGHT_BLUE#An illusion appears around %s, making it appear human.", who.name:capitalize()) + end, + on_takeoff = function(self, who) + who.faction = who.old_faction_cloak + if who.player then engine.Map:setViewerFaction(who.faction) end + game.logPlayer(who, "#LIGHT_BLUE#The illusion covering %s disappears", who.name:capitalize()) + end, } diff --git a/game/modules/tome/data/zones/paths-of-the-dead/zone.lua b/game/modules/tome/data/zones/paths-of-the-dead/zone.lua index afe5a7ca8414c553ae02a0bd6a5f131418516048..bae443b91d0cb5b9cd005a36071666577cc2b138 100644 --- a/game/modules/tome/data/zones/paths-of-the-dead/zone.lua +++ b/game/modules/tome/data/zones/paths-of-the-dead/zone.lua @@ -21,7 +21,7 @@ return { name = "Paths of the Dead", level_range = {1, 8}, level_scheme = "player", - max_level = 5, + max_level = 8, decay = {300, 800}, actor_adjust_level = function(zone, level, e) return 1 + zone.max_level - (zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2)) end, width = 50, height = 50, @@ -29,9 +29,11 @@ return { -- all_lited = true, persistant = "zone", ambiant_music = "Dark Secrets.ogg", + no_level_connectivity = true, generator = { map = { class = "engine.generator.map.Roomer", + force_last_stair = true, nb_rooms = 10, rooms = {"simple", "pilar", {"money_vault",5}}, lite_room_chance = 100, @@ -44,7 +46,6 @@ return { actor = { class = "engine.generator.actor.Random", nb_npc = {20, 30}, --- guardian = "SHADE_OF_ANGMAR", -- The gardian is set in the static map }, object = { class = "engine.generator.object.Random", @@ -63,5 +64,11 @@ return { up = "UP_WILDERNESS", }, }, }, + [8] = { + generator = { map = { + class = "engine.generator.map.Static", + map = "zones/paths-of-the-dead-last", + }, }, + }, }, } diff --git a/game/modules/tome/dialogs/IntroDialog.lua b/game/modules/tome/dialogs/IntroDialog.lua index 65a2dd5f6241c3f42d78d652b0cb9fa39e371e27..30b890fdb2b376e724384903edff69826bdf192c 100644 --- a/game/modules/tome/dialogs/IntroDialog.lua +++ b/game/modules/tome/dialogs/IntroDialog.lua @@ -22,7 +22,7 @@ require "engine.Dialog" module(..., package.seeall, class.inherit(engine.Dialog)) -function _M:init(actor) +function _M:init(actor, on_exit) self.actor = actor engine.Dialog.init(self, "Welcome to ToME", 500, 400) @@ -30,6 +30,7 @@ function _M:init(actor) ACCEPT = "EXIT", EXIT = function() game:unregisterDialog(self) + on_exit() end, }) end diff --git a/ideas/factions.ods b/ideas/factions.ods index 6cb7c8f072b3272e9274fb35dea53c67b3e017c7..f4a20db3b59ecb1ee07c3f00871437bc874e6b0d 100644 Binary files a/ideas/factions.ods and b/ideas/factions.ods differ