diff --git a/game/modules/tome/class/interface/PlayerLore.lua b/game/modules/tome/class/interface/PlayerLore.lua index 084e6a6dfb44003b1325f79ef2be34dc8ad6e967..1d33f2747596b7a2c1deab15c7ee6618772266bd 100644 --- a/game/modules/tome/class/interface/PlayerLore.lua +++ b/game/modules/tome/class/interface/PlayerLore.lua @@ -74,15 +74,17 @@ function _M:additionalLore(id, name, category, lore) end function _M:learnLore(lore) + local l = self:getLore(lore) + local learnt = false if not self:knownLore(lore) then - local l = self:getLore(lore) LorePopup.new(l, game.w * 0.6, 0.8) game.logPlayer(self, "Lore found: #0080FF#%s", l.name) game.logPlayer(self, "#ANTIQUE_WHITE#%s", util.getval(l.lore)) game.logPlayer(self, "You can read all your collected lore in the game menu, by pressing Escape.") - if l.on_learn then l.on_learn(self) end + learnt = true end self.lore_known[lore] = true print("[LORE] learnt", lore) + if learnt then if l.on_learn then l.on_learn(self) end end end diff --git a/game/modules/tome/data/birth/races/construct.lua b/game/modules/tome/data/birth/races/construct.lua index 046c6b0bc0d5ed4f9e329047bf85d4a253701533..f22fc85d7b2f6242eee381fc0296d9e897dd67f5 100644 --- a/game/modules/tome/data/birth/races/construct.lua +++ b/game/modules/tome/data/birth/races/construct.lua @@ -35,7 +35,7 @@ newBirthDescriptor{ ["Runic Golem"] = function() return profile.mod.allow_build.construct_runic_golem and "allow" or "disallow" end, }, }, - random_escort_possibilities = { {"trollmire", 2, 5}, {"ruins-kor-pul", 1, 4}, {"daikara", 1, 7}, {"old-forest", 1, 7}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, + random_escort_possibilities = { {"trollmire", 2, 3}, {"ruins-kor-pul", 1, 2}, {"daikara", 1, 5}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, } newBirthDescriptor diff --git a/game/modules/tome/data/birth/races/dwarf.lua b/game/modules/tome/data/birth/races/dwarf.lua index 462810f2baf633d11ed84e44c05269bb47bf6657..8bee776f68951a8576541ebde9c4799c5d2bce98 100644 --- a/game/modules/tome/data/birth/races/dwarf.lua +++ b/game/modules/tome/data/birth/races/dwarf.lua @@ -49,7 +49,7 @@ newBirthDescriptor{ resolvers.inventory{ id=true, {defined="ORB_SCRYING"} }, resolvers.generic(function(e) e.hotkey[10] = {"inventory", "Orb of Scrying"} end), }, - random_escort_possibilities = { {"trollmire", 2, 5}, {"ruins-kor-pul", 1, 4}, {"daikara", 1, 7}, {"old-forest", 1, 7}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, + random_escort_possibilities = { {"trollmire", 2, 3}, {"ruins-kor-pul", 1, 2}, {"daikara", 1, 5}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, } --------------------------------------------------------- diff --git a/game/modules/tome/data/birth/races/elf.lua b/game/modules/tome/data/birth/races/elf.lua index 52862a1066727700e41607c9adc8bed132dc5292..8667d367a1662aa0412f548c1e2e6309f1b2d0b1 100644 --- a/game/modules/tome/data/birth/races/elf.lua +++ b/game/modules/tome/data/birth/races/elf.lua @@ -83,7 +83,7 @@ newBirthDescriptor resolvers.inscription("RUNE:_PHASE_DOOR", {cooldown=7, range=10}), }, experience = 1.35, - random_escort_possibilities = { {"scintillating-caves", 2, 5}, {"daikara", 1, 7}, {"old-forest", 1, 7}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, + random_escort_possibilities = { {"scintillating-caves", 2, 3}, {"daikara", 1, 5}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, } newBirthDescriptor @@ -114,5 +114,5 @@ newBirthDescriptor resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={poison=true}, dur=4, power=14}), }, experience = 1.35, - random_escort_possibilities = { {"trollmire", 2, 5}, {"ruins-kor-pul", 1, 4}, {"daikara", 1, 7}, {"old-forest", 1, 7}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, + random_escort_possibilities = { {"trollmire", 2, 3}, {"ruins-kor-pul", 1, 2}, {"daikara", 1, 5}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, } diff --git a/game/modules/tome/data/birth/races/halfling.lua b/game/modules/tome/data/birth/races/halfling.lua index cb2604a2e9c58b193a3852c2dd1555ec397135c6..3f014923e6d4eafe5206008b52d3c03b998d7397 100644 --- a/game/modules/tome/data/birth/races/halfling.lua +++ b/game/modules/tome/data/birth/races/halfling.lua @@ -50,7 +50,7 @@ newBirthDescriptor{ resolvers.inventory{ id=true, {defined="ORB_SCRYING"} }, resolvers.generic(function(e) e.hotkey[10] = {"inventory", "Orb of Scrying"} end), }, - random_escort_possibilities = { {"trollmire", 2, 5}, {"ruins-kor-pul", 1, 4}, {"daikara", 1, 7}, {"old-forest", 1, 7}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, + random_escort_possibilities = { {"trollmire", 2, 3}, {"ruins-kor-pul", 1, 2}, {"daikara", 1, 5}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, } --------------------------------------------------------- diff --git a/game/modules/tome/data/birth/races/human.lua b/game/modules/tome/data/birth/races/human.lua index a10e0d490c485f9d29ce01c81964df1ffaf48e15..eeacfb7cf8a953ff5a40460c7364bac834bf2ab4 100644 --- a/game/modules/tome/data/birth/races/human.lua +++ b/game/modules/tome/data/birth/races/human.lua @@ -52,7 +52,7 @@ newBirthDescriptor{ resolvers.inventory{ id=true, {defined="ORB_SCRYING"} }, resolvers.generic(function(e) e.hotkey[10] = {"inventory", "Orb of Scrying"} end), }, - random_escort_possibilities = { {"trollmire", 2, 5}, {"ruins-kor-pul", 1, 4}, {"daikara", 1, 7}, {"old-forest", 1, 7}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, + random_escort_possibilities = { {"trollmire", 2, 3}, {"ruins-kor-pul", 1, 2}, {"daikara", 1, 5}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, } --------------------------------------------------------- diff --git a/game/modules/tome/data/birth/races/undead.lua b/game/modules/tome/data/birth/races/undead.lua index 5f0ed99a24cc88b24295b4296304a61b28fb533f..9f5c493da1f251aefd87f56578b5948b11d827b5 100644 --- a/game/modules/tome/data/birth/races/undead.lua +++ b/game/modules/tome/data/birth/races/undead.lua @@ -57,7 +57,7 @@ newBirthDescriptor{ resolvers.inscription("RUNE:_SHIELDING", {cooldown=14, dur=5, power=100}), resolvers.inscription("RUNE:_PHASE_DOOR", {cooldown=7, range=10}), }, - random_escort_possibilities = { {"trollmire", 2, 5}, {"ruins-kor-pul", 1, 4}, {"daikara", 1, 7}, {"old-forest", 1, 7}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, + random_escort_possibilities = { {"trollmire", 2, 3}, {"ruins-kor-pul", 1, 2}, {"daikara", 1, 5}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, } newBirthDescriptor diff --git a/game/modules/tome/data/birth/races/yeek.lua b/game/modules/tome/data/birth/races/yeek.lua index 515a11acb8ac96ad3e1e2cdb5f155f319cc90a8e..35207930a3142bfd1bbb37f4f11170e315e0cb9a 100644 --- a/game/modules/tome/data/birth/races/yeek.lua +++ b/game/modules/tome/data/birth/races/yeek.lua @@ -49,7 +49,7 @@ newBirthDescriptor{ resolvers.inscription("INFUSION:_REGENERATION", {cooldown=10, dur=5, heal=60}), resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={poison=true}, dur=4, power=14}), }, - random_escort_possibilities = { {"trollmire", 2, 5}, {"ruins-kor-pul", 1, 4}, {"daikara", 1, 7}, {"old-forest", 1, 7}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, + random_escort_possibilities = { {"trollmire", 2, 3}, {"ruins-kor-pul", 1, 2}, {"daikara", 1, 5}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, } --------------------------------------------------------- diff --git a/game/modules/tome/data/lore/trollmire.lua b/game/modules/tome/data/lore/trollmire.lua index 7f3adc4d00c8f8dce05d17bb9a45e95c4f779173..78cc49a87a46a71f6d10c1064331c66fbd66424b 100644 --- a/game/modules/tome/data/lore/trollmire.lua +++ b/game/modules/tome/data/lore/trollmire.lua @@ -21,12 +21,22 @@ -- Trollmire -------------------------------------------------------------------------- +local check = function(who) + local p = game:getPlayer(true) + if p:knownLore("trollmire-note-1") and p:knownLore("trollmire-note-2") and p:knownLore("trollmire-note-3") and p:knownLore("trollmire-note-4") and p:knownLore("trollmire-note-5") then + p:grantQuest("trollmire-treasure") + end +end + newLore{ id = "trollmire-note-1", category = "trollmire", name = "tattered paper scrap (trollmire)", lore = [[You find a tattered page scrap. Perhaps this is part of a diary entry. -"...is a gorgeous glade, but I could swear that looked like a part of a human femur."]], +"...is a gorgeous glade, but I could swear that looked like a part of a human femur." + +Alongside the note is a part of a plan of the region.]], + on_learn = check, } newLore{ @@ -35,7 +45,10 @@ newLore{ name = "tattered paper scrap (trollmire)", lore = [[You find a tattered page scrap. Perhaps this is part of a diary entry. "11th of Allure, year 121« -Saw an absolutely gigantic troll, but fortunately I threw him off my scent."]], +Saw an absolutely gigantic troll, but fortunately I threw him off my scent." + +Alongside the note is a part of a plan of the region.]], + on_learn = check, } newLore{ @@ -43,7 +56,10 @@ newLore{ category = "trollmire", name = "tattered paper scrap (trollmire)", lore = [[You find a tattered page scrap. Perhaps this is part of a diary entry. -"...ack again, but he's just a stupid old troll. It'll be easy to not let him get wind of me."]], +"...ack again, but he's just a stupid old troll. It'll be easy to not let him get wind of me." + +Alongside the note is a part of a plan of the region.]], + on_learn = check, } newLore{ @@ -51,7 +67,10 @@ newLore{ category = "trollmire", name = "tattered paper scrap (trollmire)", lore = [[You find a tattered page scrap. Perhaps this is part of a diary entry. -"...initely found his treasure stash further on, but had to turn back. If you get this, HELP!"]], +"...initely found his treasure stash further on, but had to turn back. If you get this, HELP!" + +Alongside the note is a part of a plan of the region.]], + on_learn = check, } newLore{ @@ -60,5 +79,8 @@ newLore{ name = "tattered paper scrap (trollmire)", bloodstains = 3, lore = [[You find a tattered page scrap. Perhaps this is part of a diary entry. -"...writing this in a tree and he's at the bottom of it. Waiting. His club is the size of a tall dwarf. Don't think I'm going to make it."]], +"...writing this in a tree and he's at the bottom of it. Waiting. His club is the size of a tall dwarf. Don't think I'm going to make it." + +Alongside the note is a part of a plan of the region.]], + on_learn = check, } diff --git a/game/modules/tome/data/maps/zones/trollmire-treasure.lua b/game/modules/tome/data/maps/zones/trollmire-treasure.lua new file mode 100644 index 0000000000000000000000000000000000000000..35427add5d04bdd5a75b70fac7502e197103e94f --- /dev/null +++ b/game/modules/tome/data/maps/zones/trollmire-treasure.lua @@ -0,0 +1,55 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011 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 section +defineTile("$", "GRASS", {random_filter={type="money"}}) +defineTile("*", "GRASS", {random_filter={type="gem"}}) +defineTile("<", "GRASS_UP4") +defineTile(".", "GRASS") +defineTile("@", "GRASS", nil, "TROLL_BILL") +defineTile("t", {"HARDTREE","HARDTREE2","HARDTREE3","HARDTREE4","HARDTREE5","HARDTREE6","HARDTREE7","HARDTREE8","HARDTREE9","HARDTREE10","HARDTREE11","HARDTREE12","HARDTREE13","HARDTREE14","HARDTREE15","HARDTREE16","HARDTREE17","HARDTREE18","HARDTREE19","HARDTREE20"}) +defineTile("T", "GRASS", nil, {random_filter={type="giant", subtype="troll"}}) +defineTile("!", "ROCK_VAULT") + +-- addSpot section + +-- addZone section + +-- ASCII map section +return [[ +tttttttttttttttttttt +tttttttttttttttttttt +ttttttttttt.tttttttt +ttttttttttt..ttttttt +ttttttttttt..ttttttt +tttttt.ttttT.ttttttt +ttttt$$$.......ttttt +tttt.$$$.......ttttt +ttttt.@.........tttt +<...t***........Tttt +ttt.t***........tttt +ttt.t.t.........tttt +ttt.tttt........tttt +ttt.tttttt......Tttt +tttTtttttt......tttt +ttt.ttttt.....tttttt +ttt.tt.tt..tt.tttttt +tt......!Ttttttttttt +tttttttttttttttttttt +tttttttttttttttttttt]] diff --git a/game/modules/tome/data/quests/start-allied.lua b/game/modules/tome/data/quests/start-allied.lua index acfad46ec7dfede1a446b7f3a562964e222024a9..7892bf55f8b3d3750ec1e5b0a51249b767e12616 100644 --- a/game/modules/tome/data/quests/start-allied.lua +++ b/game/modules/tome/data/quests/start-allied.lua @@ -23,7 +23,7 @@ desc = function(self, who) local desc = {} desc[#desc+1] = "Explore the caves below the ruins of Kor'Pul and the Trollmire in search of treasure and glory!\n" if self:isCompleted("trollmire") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Trollmire and vanquished the Bill the Troll.#WHITE#" + desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Trollmire and vanquished the Prox the Troll.#WHITE#" else desc[#desc+1] = "#SLATE#* You must explore the Trollmire and find out what lurks there and what treasures are to be gained!#WHITE#" end diff --git a/game/modules/tome/data/quests/trollmire-treasure.lua b/game/modules/tome/data/quests/trollmire-treasure.lua new file mode 100644 index 0000000000000000000000000000000000000000..b4c215abed35f6d4e4f09b6101e24ae393b5080c --- /dev/null +++ b/game/modules/tome/data/quests/trollmire-treasure.lua @@ -0,0 +1,44 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011 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 = "Hidden treasure" +desc = function(self, who) + local desc = {} + desc[#desc+1] = "You have found all the clues leading to the hidden treasure, there should be a way on the third level of the trollmire." + desc[#desc+1] = "It looks extremely dangerous however, beware." + return table.concat(desc, "\n") +end + +on_grant = function(self) + if game.level.level == 3 then + self:enter_level3() + end +end + +enter_level3 = function(self) + -- Reveal entrance to level 4 + local g = game.zone:makeEntityByName(game.level, "terrain", "GRASS_DOWN6"):clone() + g.name = "way to the hidden trollmire treasure" + g.desc = "Beware!" + local level = game.level + local spot = level.default_down + game.zone:addEntity(level, g, "terrain", spot.x, spot.y) + + require("engine.ui.Dialog"):simplePopup("Hidden treasure", "The way to the treasure is to the east. But beware, death probably awaits there.") +end diff --git a/game/modules/tome/data/zones/trollmire/npcs.lua b/game/modules/tome/data/zones/trollmire/npcs.lua index 08d643d84c2c125b9920a51b298a4f4ddc65a041..fbd1a76dd5cd5298591f7c9eab6aa5f03ff3daa2 100644 --- a/game/modules/tome/data/zones/trollmire/npcs.lua +++ b/game/modules/tome/data/zones/trollmire/npcs.lua @@ -30,15 +30,55 @@ load("/data/general/npcs/all.lua", rarity(4, 35)) local Talents = require("engine.interface.ActorTalents") +newEntity{ define_as = "TROLL_PROX", + allow_infinite_dungeon = true, + type = "giant", subtype = "troll", unique = true, + name = "Prox the Mighty", + display = "T", color=colors.VIOLET, image="npc/troll_bill.png", + desc = [[A huge troll, he might move slowly but he does look dangerous nonetheless.]], + level_range = {7, nil}, exp_worth = 2, + max_life = 150, life_rating = 15, fixed_rating = true, + max_stamina = 85, + stats = { str=20, dex=10, cun=8, mag=10, con=20 }, + rank = 4, + size_category = 4, + infravision = 20, + instakill_immune = 1, + move_others=true, + + body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, + resolvers.equip{ {type="weapon", subtype="greatmaul", autoreq=true}, }, + resolvers.drops{chance=100, nb=1, {unique=true, not_properties={"lore"}} }, + resolvers.drops{chance=100, nb=3, {tome_drops="boss"} }, + resolvers.drops{chance=100, nb=1, {defined="PROX_NOTE"} }, + + resolvers.talents{ + [Talents.T_KNOCKBACK]=1, + }, + resolvers.inscriptions(1, {"movement infusion"}), + inc_damage = { all = -40 }, + + autolevel = "warrior", + ai = "tactical", ai_state = { talent_in=3, ai_move="move_astar", }, + ai_tactic = resolvers.tactic"melee", + + on_die = function(self, who) + game.state:activateBackupGuardian("ALUIN", 2, 35, "... and we thought the trollmire was safer now!") + game.player:resolveSource():grantQuest("start-allied") + game.player:resolveSource():setQuestStatus("start-allied", engine.Quest.COMPLETED, "trollmire") + end, +} + newEntity{ define_as = "TROLL_BILL", allow_infinite_dungeon = true, type = "giant", subtype = "troll", unique = true, name = "Bill the Stone Troll", display = "T", color=colors.VIOLET, image="npc/troll_bill.png", desc = [[Big, brawny, powerful and with a taste for Halfling. -He is wielding a small tree trunk and lumbering toward you.]], +He is wielding a small tree trunk and lumbering toward you. +This is the troll the notes spoke about, no doubt.]], level_range = {7, nil}, exp_worth = 2, - max_life = 150, life_rating = 12, fixed_rating = true, + max_life = 250, life_rating = 18, fixed_rating = true, max_stamina = 85, stats = { str=25, dex=10, cun=8, mag=10, con=20 }, rank = 4, @@ -52,20 +92,16 @@ He is wielding a small tree trunk and lumbering toward you.]], resolvers.drops{chance=100, nb=3, {tome_drops="boss"} }, resolvers.talents{ - [Talents.T_RUSH]=3, - [Talents.T_KNOCKBACK]=1, + [Talents.T_RUSH]=4, + [Talents.T_KNOCKBACK]=3, }, resolvers.inscriptions(1, {"wild infusion", "heroism infusion"}), - inc_damage = { all = -35 }, autolevel = "warrior", ai = "tactical", ai_state = { talent_in=3, ai_move="move_astar", }, ai_tactic = resolvers.tactic"melee", on_die = function(self, who) - game.state:activateBackupGuardian("ALUIN", 2, 35, "... and we thought the trollmire was safer now!") - game.player:resolveSource():grantQuest("start-allied") - game.player:resolveSource():setQuestStatus("start-allied", engine.Quest.COMPLETED, "trollmire") if who and who.level and who.level == 1 then world:gainAchievement("KILL_BILL", game.player) end diff --git a/game/modules/tome/data/zones/trollmire/objects.lua b/game/modules/tome/data/zones/trollmire/objects.lua index df73c6c20e9b808d3f4c85204aaf9d4dffb8d5c9..72eb03e61eea50241678b59faa5ed8646255fd17 100644 --- a/game/modules/tome/data/zones/trollmire/objects.lua +++ b/game/modules/tome/data/zones/trollmire/objects.lua @@ -19,7 +19,7 @@ load("/data/general/objects/objects.lua") -for i = 1, 5 do +for i = 1, 4 do newEntity{ base = "BASE_LORE", define_as = "NOTE"..i, name = "tattered paper scrap", lore="trollmire-note-"..i, @@ -29,3 +29,12 @@ newEntity{ base = "BASE_LORE", encumberance = 0, } end + +newEntity{ base = "BASE_LORE", + define_as = "PROX_NOTE", + name = "tattered paper scrap", lore="trollmire-note-5", + desc = [[A paper scrap, left by an adventurer.]], + rarity = false, + is_magic_device = false, + encumberance = 0, +} diff --git a/game/modules/tome/data/zones/trollmire/zone.lua b/game/modules/tome/data/zones/trollmire/zone.lua index 11cc0a09d7e3df86e2c7790601b5e526497e7a4c..c1c75d41f6c01676eb11afc768234b559c98f948 100644 --- a/game/modules/tome/data/zones/trollmire/zone.lua +++ b/game/modules/tome/data/zones/trollmire/zone.lua @@ -59,7 +59,7 @@ return { nb_npc = {20, 30}, filters = { {max_ood=2}, }, nb_spots = 2, on_spot_chance = 35, - guardian = "TROLL_BILL", + guardian = "TROLL_PROX", }, object = { class = "engine.generator.object.OnSpots", @@ -78,13 +78,48 @@ return { up = "GRASS_UP_WILDERNESS", }, }, }, + [3] = { + generator = { map = { + force_last_stair = true, + down = "GRASS", + }, }, + }, + -- Hidden treasure level + [4] = { + generator = { + map = { + class = "engine.generator.map.Static", + map = "zones/trollmire-treasure", + }, + trap = { nb_trap = {0, 0} }, + object = { nb_object = {3, 4} }, + actor = { nb_npc = {2, 2} }, + }, + }, }, post_process = function(level) -- Place a lore note on each level game:placeRandomLoreObjectScale("NOTE", 5, level.level) + -- Rain on bill + if level.level == 4 and config.settings.tome.weather_effects then + local Map = require "engine.Map" + level.foreground_particle = require("engine.Particles").new("raindrops", 1, {width=Map.viewport.width, height=Map.viewport.height}) + end + -- Some clouds floating happily over the trollmire game.state:makeWeather(level, 7, {max_nb=1, speed={0.5, 1.6}, shadow=true, alpha={0.23, 0.35}, particle_name="weather/grey_cloud_%02d"}) end, + + foreground = function(level, x, y, nb_keyframes) + if not config.settings.tome.weather_effects or not level.foreground_particle then return end + level.foreground_particle.ps:toScreen(x, y, true, 1) + end, + + on_enter = function(lev, old_lev, newzone) + if lev == 3 and game.player:hasQuest("trollmire-treasure") then + game.player:hasQuest("trollmire-treasure"):enter_level3() + end + end, }