diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index ed7ee572efeac36f0ed1b6b1459ea31d14cab260..5ef239fe3be8896478fbb8dac0e982e44df909be 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -503,7 +503,8 @@ function _M:setupCommands() end, [{"_g","ctrl"}] = function() if config.settings.tome.cheat then - self:changeLevel(1, "slime-tunnels") + self:changeLevel(15, "high-peak") + self.player:grantQuest("high-peak") end end, } @@ -601,9 +602,9 @@ function _M:setupCommands() PICKUP_FLOOR = not_wild(function() self.player:playerPickup() end), - DROP_FLOOR = not_wild(function() + DROP_FLOOR = function() self.player:playerDrop() - end), + end, SHOW_INVENTORY = function() local d local titleupdator = self.player:getEncumberTitleUpdator("Inventory") diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 791f498a43b7fa7f96b7a7a2da4bf7d4ba522b9a..8372918a0f6e01a566cfc22a69ac29ff3e7083f0 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -393,7 +393,18 @@ function _M:runMoved() end function _M:doDrop(inven, item) - if game.zone.wilderness then game.logPlayer(self, "You can not drop on the world map.") return end + if game.zone.wilderness then + Dialog:yesnoLongPopup("Warning", "You can not drop items on the world map.\nIf you drop it it will be lost forever.", 300, function(ret) + -- The test is reversed because the buttons are reversed, to prevent mistakes + if not ret then + local o = self:removeObject(inven, item, true) + game.logPlayer(self, "You destroy %s.", o:getName{do_colour=true, do_count=true}) + self:sortInven() + self:useEnergy() + end + end, "Cancel", "Destroy") + return + end self:dropFloor(inven, item, true, true) self:sortInven() self:useEnergy() @@ -545,12 +556,18 @@ end --- Use a portal with the orb of many ways function _M:useOrbPortal(portal) - if portal.change_wilderness then - self.current_wilderness = portal.change_wilderness.name - self.wild_x = portal.change_wilderness.x or 0 - self.wild_y = portal.change_wilderness.y or 0 + if portal.teleport_level then + local x, y = util.findFreeGrid(portal.teleport_level.x, portal.teleport_level.y, 2, true, {[Map.ACTOR]=true}) + if x and y then self:move(x, y, true) end + else + if portal.change_wilderness then + self.current_wilderness = portal.change_wilderness.name + self.wild_x = portal.change_wilderness.x or 0 + self.wild_y = portal.change_wilderness.y or 0 + end + game:changeLevel(portal.change_level, portal.change_zone) end - game:changeLevel(portal.change_level, portal.change_zone) + if portal.message then game.logPlayer(self, portal.message) end if portal.on_use then portal:on_use(self) end end diff --git a/game/modules/tome/data/maps/zones/high-peak-last.lua b/game/modules/tome/data/maps/zones/high-peak-last.lua index b39ac07ca914d3d3c5ac1d661bab3c69e900a2e4..0579956117461477a262cb424d0c721dd31d57c5 100644 --- a/game/modules/tome/data/maps/zones/high-peak-last.lua +++ b/game/modules/tome/data/maps/zones/high-peak-last.lua @@ -19,28 +19,94 @@ defineTile('<', "UP") defineTile(',', "FLOOR") -defineTile('.', "FLOOR") +defineTile('.', "FLOOR", nil, nil, nil, {lite=true}) defineTile('+', "DOOR") -defineTile('#', "WALL") -defineTile('*', "WALL") +defineTile('#', "WALL", nil, nil, nil, {lite=true}) +defineTile('*', "WALL", nil, nil, nil, {lite=true, no_teleport=true}) -- Portals -defineTile('&', "FAR_EAST_PORTAL") -defineTile('"', "WEST_PORTAL") -defineTile('V', "VOID_PORTAL") -defineTile('d', "PORTAL_DESTRUCTION") -defineTile('D', "PORTAL_DRAGON") -defineTile('E', "PORTAL_ELEMENTS") -defineTile('U', "PORTAL_UNDEAD") +defineTile('&', "FAR_EAST_PORTAL", nil, nil, nil, {lite=true}) +defineTile('"', "WEST_PORTAL", nil, nil, nil, {lite=true}) +defineTile('V', "VOID_PORTAL", nil, nil, nil, {lite=true}) +defineTile('d', "PORTAL_DESTRUCTION", nil, nil, nil, {lite=true}) +defineTile('D', "PORTAL_DRAGON", nil, nil, nil, {lite=true}) +defineTile('E', "PORTAL_ELEMENTS", nil, nil, nil, {lite=true}) +defineTile('U', "PORTAL_UNDEAD", nil, nil, nil, {lite=true}) -- Bosses -defineTile('A', "FLOOR", nil, "ALATAR") -defineTile('P', "FLOOR", nil, "PALLANDO") +defineTile('A', "FLOOR", nil, "ALATAR", nil, {lite=true}) +defineTile('P', "FLOOR", nil, "PALLANDO", nil, {lite=true}) -startx = 1 -starty = 1 +subGenerator{ + x = 0, y = 23, w = 50, h = 52, + generator = "engine.generator.map.Roomer", + data = { + nb_rooms = 7, + rooms = {"simple", "pilar"}, + ['.'] = "FLOOR", + ['#'] = "WALL", + up = "FLOOR", + down = "PORTAL_BOSS", + door = "DOOR", + force_last_stair = true, + }, + define_up = true, +} + +addSpot({16, 4}, "portal", "destruction") +addSpot({33, 4}, "portal", "dragon") +addSpot({33, 18}, "portal", "undead") +addSpot({16, 18}, "portal", "elements") return [[ +************************************************** +******************..............****************** +************..........................************ +***********..............#.............*********** +***********.....d.......###......U.....*********** +************............###...........************ +*************............#...........************* +*************............#...........************* +**************......................************** +**************......................************** +*****"""******..........VVV.........******&&&***** +*****"""******..#####..AVVVP..####..******&&&***** +*****"""******..........VVV.........******&&&***** +**************......................************** +**************......................************** +*************............#...........************* +*************............#...........************* +************............###...........************ +***********.....E.......###......D.....*********** +***********..............#.............*********** +************..........................************ +******************..............****************** +************************************************** +,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,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,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,****************,,,,,,,,,,,,,,,,, -,,,,,,,,,,,*******..............*******,,,,,,,,,,, -,,,,,,,,,,**..........................**,,,,,,,,,, -,,,,,,,,,,*............................*,,,,,,,,,, -,,,,,,,,,,*.....d................U.....*,,,,,,,,,, -,,,,,,,,,,**..........................**,,,,,,,,,, -,,,,,,,,,,,**........................**,,,,,,,,,,, -,,,,,,,,,,,,*........................*,,,,,,,,,,,, -,,,,,,,,,,,,**......................**,,,,,,,,,,,, -**************......................************** -*****"""******..........VVV.........******&&&***** -*****"""******.........AVVVP........******&&&***** -*****"""******..........VVV.........******&&&***** -**************......................************** -,,,,,,,,,,,,**......................**,,,,,,,,,,,, -,,,,,,,,,,,,*........................*,,,,,,,,,,,, -,,,,,,,,,,,**........................**,,,,,,,,,,, -,,,,,,,,,,**..........................**,,,,,,,,,, -,,,,,,,,,,*.....E................D.....*,,,,,,,,,, -,,,,,,,,,,*............................*,,,,,,,,,, -,,,,,,,,,,**..........................**,,,,,,,,,, -,,,,,,,,,,,*******..............*******,,,,,,,,,,, -,,,,,,,,,,,,,,,,,****************,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/game/modules/tome/data/quests/orb-command.lua b/game/modules/tome/data/quests/orb-command.lua index 4c239d67231dace4ce2a8fb5a550acfb216dc718..ce018a24afdf004fc8ff91a77e9deaebb0542c7a 100644 --- a/game/modules/tome/data/quests/orb-command.lua +++ b/game/modules/tome/data/quests/orb-command.lua @@ -38,6 +38,9 @@ on_status_change = function(self, who, status, sub) end open_high_peak = function(self, who) + local wild = game.memory_levels["wilderness-arda-fareast-1"] + wild.map:removeParticleEmitter(wild.data.istari_shield) + local g = game.zone:makeEntityByName(game.level, "terrain", "PEAK_STAIR") for j = 11, 18 do game.level.map(249, j, engine.Map.TERRAIN, g) diff --git a/game/modules/tome/data/zones/high-peak/grids.lua b/game/modules/tome/data/zones/high-peak/grids.lua index cccc468f658e05d0864fe9cec42a0ab765816d62..b7ba905628657781c0bcf13c270e7507f216a838 100644 --- a/game/modules/tome/data/zones/high-peak/grids.lua +++ b/game/modules/tome/data/zones/high-peak/grids.lua @@ -55,7 +55,7 @@ This one seems to go to the Misty Mountains in the West.]], change_level = 1, change_zone = "wilderness", change_wilderness = { - x = 9, y = 5, + x = 41, y = 33, }, message = "#VIOLET#You enter the swirling portal and in the blink of an eye you set foot on the slopes of the Misty Mountains, with no trace of the portal...", on_use = function(self, who) @@ -113,3 +113,17 @@ newEntity{ show_tooltip = true, desc = [[An invocation portal, perpetualy summoning beings through it.]], } + +newEntity{ + define_as = "PORTAL_BOSS", + name = "Portal: The Sanctum", + display = '&', color=colors.LIGHT_BLUE, back_color=colors.PURPLE, + notice = true, + always_remember = true, + show_tooltip = true, + desc = [[This portal seems to connect to an other part of this level.]], + orb_portal = { + teleport_level = {x=25, y=8}, + message = "#VIOLET#You enter the swirling portal and appear in a large room with other portals and the two wizards.", + }, +} diff --git a/game/modules/tome/data/zones/high-peak/npcs.lua b/game/modules/tome/data/zones/high-peak/npcs.lua index bd88faf808c8ff5feb0741df46b9fa779d6cf50e..e579f61bd5b195cff3c8808ef54c01d1f25ec5ad 100644 --- a/game/modules/tome/data/zones/high-peak/npcs.lua +++ b/game/modules/tome/data/zones/high-peak/npcs.lua @@ -20,13 +20,18 @@ -- Orcs & trolls load("/data/general/npcs/orc-grushnak.lua", rarity(0)) load("/data/general/npcs/orc-vor.lua", rarity(0)) -load("/data/general/npcs/orc-rak-shor.lua", rarity(0)) +load("/data/general/npcs/orc-gorbat.lua", rarity(0)) +load("/data/general/npcs/orc-rak-shor.lua", rarity(6)) load("/data/general/npcs/orc.lua", rarity(8)) --load("/data/general/npcs/troll.lua", rarity(0)) -- Others load("/data/general/npcs/naga.lua", rarity(6)) -load("/data/general/npcs/snow-giant.lua", rarity(0)) +load("/data/general/npcs/snow-giant.lua", rarity(6)) + +-- Demons +load("/data/general/npcs/minor-demon.lua", rarity(3)) +load("/data/general/npcs/major-demon.lua", rarity(3)) -- Drakes load("/data/general/npcs/fire-drake.lua", rarity(10)) @@ -34,10 +39,10 @@ load("/data/general/npcs/cold-drake.lua", rarity(10)) load("/data/general/npcs/multihued-drake.lua", rarity(10)) -- Undeads -load("/data/general/npcs/bone-giant.lua", rarity(3)) -load("/data/general/npcs/vampire.lua", rarity(5)) -load("/data/general/npcs/ghoul.lua", rarity(2)) -load("/data/general/npcs/skeleton.lua", rarity(3)) +load("/data/general/npcs/bone-giant.lua", rarity(10)) +load("/data/general/npcs/vampire.lua", rarity(10)) +load("/data/general/npcs/ghoul.lua", rarity(10)) +load("/data/general/npcs/skeleton.lua", rarity(10)) load("/data/general/npcs/all.lua", rarity(4, 35)) @@ -139,3 +144,57 @@ newEntity{ autolevel = "caster", ai = "dumb_talented_simple", ai_state = { talent_in=1, ai_move="move_astar" }, } + +newEntity{ define_as = "HIGH_SUN_PALADIN_AERYN", + type = "humanoid", subtype = "human", + display = "p", + faction = "blue-wizards", + name = "Fallen Sun Paladin Aeryn", color=colors.VIOLET, unique = true, + desc = [[A beautiful woman, clad in a shining plate armour. Power radiates from her.]], + level_range = {56, 56}, exp_worth = 2, + rank = 5, + size_category = 3, + female = true, + max_life = 250, life_rating = 30, fixed_rating = true, + infravision = 20, + stats = { str=15, dex=10, cun=12, mag=16, con=14 }, + instakill_immune = 1, + move_others=true, + + open_door = true, + + autolevel = "warriormage", + ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_astar", }, + + body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, HEAD=1, FEET=1 }, + resolvers.drops{chance=100, nb=3, {ego_chance=100} }, + + resolvers.equip{ + {type="weapon", subtype="mace", ego_chance=100, autoreq=true}, + {type="armor", subtype="shield", ego_chance=100, autoreq=true}, + {type="armor", subtype="massive", ego_chance=100, autoreq=true}, + {type="armor", subtype="feet", ego_chance=100, autoreq=true}, + {type="armor", subtype="head", ego_chance=100, autoreq=true}, + }, + + positive_regen = 15, + + resolvers.talents{ + [Talents.T_MASSIVE_ARMOUR_TRAINING]=5, + [Talents.T_WEAPON_COMBAT]=10, + [Talents.T_MACE_MASTERY]=10, + + [Talents.T_CHANT_OF_FORTITUDE]=5, + [Talents.T_SEARING_LIGHT]=5, + [Talents.T_MARTYRDOM]=5, + [Talents.T_BARRIER]=5, + [Talents.T_WEAPON_OF_LIGHT]=5, + [Talents.T_MARTYRDOM]=5, + [Talents.T_HEALING_LIGHT]=5, + [Talents.T_CRUSADE]=8, + [Talents.T_SUN_FLARE]=5, + [Talents.T_FIREBEAM]=7, + [Talents.T_SUNBURST]=8, + }, + resolvers.sustains_at_birth(), +} diff --git a/game/modules/tome/data/zones/high-peak/zone.lua b/game/modules/tome/data/zones/high-peak/zone.lua index 3f00ce666d872f9c53849bc22cbb1becc4cb0aff..b7219ab5b85758d752c9df23b070edf8a6793799 100644 --- a/game/modules/tome/data/zones/high-peak/zone.lua +++ b/game/modules/tome/data/zones/high-peak/zone.lua @@ -18,28 +18,28 @@ -- darkgod@te4.org return { - name = "Taragoëol, the High Peak", + name = "Taragoël, the High Peak", level_range = {55, 80}, level_scheme = "player", max_level = 15, 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, + width = 50, height = 75, all_remembered = true, all_lited = true, persistant = "zone", + no_worldport = true, ambiant_music = "Through the Dark Portal.ogg", - no_level_connectivity = true, generator = { map = { class = "engine.generator.map.Roomer", nb_rooms = 10, rooms = {"simple", "pilar", {"pit",6}}, - rooms_config = {pit={filters={{type="orc"}, {type="undead"}, {type="naga"}}}}, - lite_room_chance = 100, + rooms_config = {pit={filters={{type="orc"}, {type="naga"}, {type="dragon"}, {type="demon"}}}}, + lite_room_chance = 10, ['.'] = "FLOOR", ['#'] = "WALL", - up = "UP", + up = "FLOOR", down = "DOWN", door = "DOOR", }, @@ -61,18 +61,16 @@ return { end, levels = { - [1] = { - generator = { map = { - up = "UP_WILDERNESS_FAR_EAST", - }, }, - }, [15] = { generator = { map = { class = "engine.generator.map.Static", map = "zones/high-peak-last", }, - actor = { nb_npc = {0, 0}, }, + actor = { + nb_npc = {30, 40}, + area = {x1=0, x2=49, y1=23, y2=23+50}, + }, }, }, },