diff --git a/game/modules/tome/class/NicerTiles.lua b/game/modules/tome/class/NicerTiles.lua index e4e6ca72f96b70461550297584cc1c296316b730..f0cf5eb9a4f224e716445266d392bd87f85e38d2 100644 --- a/game/modules/tome/class/NicerTiles.lua +++ b/game/modules/tome/class/NicerTiles.lua @@ -637,6 +637,30 @@ cavewall = { method="walls", type="cavewall", forbid={}, use_type=true, extended default4={add_displays={{image="terrain/cave/cave_ver_edge_left_01.png", display_x=-1}}, min=1, max=1}, default6={add_displays={{image="terrain/cave/cave_ver_edge_right_01.png", display_x=1}}, min=1, max=1}, }, +bonewall = { method="walls", type="bonewall", forbid={}, use_type=true, extended=true, + default8={add_displays={{image="terrain/bone/bonewall_8_1.png", display_y=-1, z=16}}, min=1, max=1}, + default8p={add_displays={{image="terrain/bone/bone_V3_pillar_top_0%d.png", display_y=-1, z=16}}, min=1, max=4}, + default7={add_displays={{image="terrain/bone/bone_V3_inner_7_01.png", display_y=-1, z=16}}, min=1, max=1}, + default9={add_displays={{image="terrain/bone/bone_V3_inner_9_01.png", display_y=-1, z=16}}, min=1, max=1}, + default7i={add_displays={{image="terrain/bone/bone_V3_3_01.png", display_y=-1, z=16}}, min=1, max=1}, + default8i={add_displays={{image="terrain/bone/bonewall_8h_1.png", display_y=-1, z=16}}, min=1, max=1}, + default9i={add_displays={{image="terrain/bone/bone_V3_1_01.png", display_y=-1, z=16}}, min=1, max=1}, + default73i={add_displays={{image="terrain/bone/bonewall_91d_1.png", display_y=-1, z=16}}, min=1, max=1}, + default91i={add_displays={{image="terrain/bone/bonewall_73d_1.png", display_y=-1, z=16}}, min=1, max=1}, + + default2={image="terrain/bone/bone_floor_1_01.png", add_mos={{image="terrain/bone/bone_V3_8_0%d.png"}}, min=1, max=8}, + default2p={image="terrain/bone/bone_floor_1_01.png", add_mos={{image="terrain/bone/bone_V3_pillar_bottom_0%d.png"}}, min=1, max=3}, + default1={image="terrain/bone/bone_floor_1_01.png", add_mos={{image="terrain/bone/bone_V3_inner_1_01.png"}}, min=1, max=1}, + default3={image="terrain/bone/bone_floor_1_01.png", add_mos={{image="terrain/bone/bone_V3_inner_3_01.png"}}, min=1, max=1}, + default1i={image="terrain/bone/bone_floor_1_01.png", add_mos={{image="terrain/bone/bone_V3_7_01.png"}}, min=1, max=1}, + default2i={image="terrain/bone/bone_floor_1_01.png", add_mos={{image="terrain/bone/bonewall_2h_1.png"}}, min=1, max=1}, + default3i={image="terrain/bone/bone_floor_1_01.png", add_mos={{image="terrain/bone/bone_V3_9_01.png"}}, min=1, max=1}, + default19i={image="terrain/bone/bone_floor_1_01.png", add_mos={{image="terrain/bone/bonewall_19d_1.png"}}, min=1, max=1}, + default37i={image="terrain/bone/bone_floor_1_01.png", add_mos={{image="terrain/bone/bonewall_37d_1.png"}}, min=1, max=1}, + + default4={add_displays={{image="terrain/bone/bone_ver_edge_left_01.png", display_x=-1}}, min=1, max=1}, + default6={add_displays={{image="terrain/bone/bone_ver_edge_right_01.png", display_x=1}}, min=1, max=1}, +}, rift = { method="walls", type="riftwall", forbid={}, use_type=true, extended=true, default8={add_displays={{image="terrain/rift/riftwall_8_1.png", display_y=-1, z=16}}, min=1, max=1}, default8p={add_displays={{image="terrain/rift/rift_V3_pillar_top_01.png", display_y=-1, z=16}}, min=1, max=1}, diff --git a/game/modules/tome/class/Object.lua b/game/modules/tome/class/Object.lua index 62815dc28d59c9a9830f387c0677a58a9e69e47e..07a84fe421d8ceebd821c75b2b1accd979d0fa61 100644 --- a/game/modules/tome/class/Object.lua +++ b/game/modules/tome/class/Object.lua @@ -906,6 +906,7 @@ function _M:getTextualDesc(compare_with) compare_fields(w, compare_with, field, "silence_immune", "%+d%%", "Silence immunity: ", 100) compare_fields(w, compare_with, field, "disarm_immune", "%+d%%", "Disarm immunity: ", 100) compare_fields(w, compare_with, field, "confusion_immune", "%+d%%", "Confusion immunity: ", 100) + compare_fields(w, compare_with, field, "sleep_immune", "%+d%%", "Sleep immunity: ", 100) compare_fields(w, compare_with, field, "pin_immune", "%+d%%", "Pinning immunity: ", 100) compare_fields(w, compare_with, field, "stun_immune", "%+d%%", "Stun/Freeze immunity: ", 100) diff --git a/game/modules/tome/data/general/objects/boss-artifacts.lua b/game/modules/tome/data/general/objects/boss-artifacts.lua index 9ba8313df4be01ee67963f695fb7983048bdb680..6c635b038e6c3b9b8c3280819cdb9ccbc85de78b 100644 --- a/game/modules/tome/data/general/objects/boss-artifacts.lua +++ b/game/modules/tome/data/general/objects/boss-artifacts.lua @@ -1895,3 +1895,25 @@ newEntity{ base = "BASE_GLOVES", define_as = "VARSHA_CLAW", max_power = 24, power_regen = 1, use_talent = { id = Talents.T_FIRE_BREATH, level = 2, power = 24 }, } + +newEntity{ base = "BASE_TOOL_MISC", define_as = "EYE_OF_THE_DREAMING_ONE", + power_source = {psionic=true}, + unique=true, rarity=240, + name = "Eye of the Dreaming One", + unided_name = "translucent sphere", + color = colors.YELLOW, + level_range = {1, 10}, + image = "npc/seed_of_dreams.png", + desc = [[This ethereal eye stares eternally, as if seeing things that do not truly exist.]], + cost = 320, + material_level = 1, + wielder = { + resists={[DamageType.MIND] = 8}, + inc_damage={[DamageType.MIND] = 10}, + sleep_immune=1, + combat_mindresist = 10, + inc_stats = {[Stats.STAT_WIL] = 4,}, + }, + max_power = 25, power_regen = 1, + use_talent = { id = Talents.T_SLEEP, level = 3, power = 20 }, +} diff --git a/game/modules/tome/data/gfx/particles/fulldream.lua b/game/modules/tome/data/gfx/particles/fulldream.lua new file mode 100644 index 0000000000000000000000000000000000000000..58a3572193b36a1807b15e816c7e70f6003507ca --- /dev/null +++ b/game/modules/tome/data/gfx/particles/fulldream.lua @@ -0,0 +1,50 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012, 2013 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 + +base_size = 32 + +local toggle = false + +return { generator = function() + local ad = rng.range(0, 360) + local a = math.rad(ad) + local dir = -math.rad(ad) + local r = rng.range(10, 32 * radius) + local dirchance = rng.chance(2) + + return { + trail = 1, + life = 30, + size = 15, sizev = -0.3, sizea = 0, + + x = r * math.cos(a), xv = 0, xa = 0, + y = r * math.sin(a), yv = 0, ya = 0, + dir = dir, dirv = 0, dira = 0, + vel = dirchance and 0.32 or -0.2, velv = 0, vela = dirchance and -0.01 or 0.01, + + r = 0, rv = 0, ra = 0, + g = rng.float(0.7, 1), gv = 0, ga = 0, + b = rng.float(0.7, 1), bv = 0, ba = 0, + a = rng.range(40, 80) / 255, av = 0, aa = 0, + } +end, }, +function(self) + self.ps:emit(1) +end, +400 diff --git a/game/modules/tome/data/gfx/shockbolt/npc/seed_of_dreams.png b/game/modules/tome/data/gfx/shockbolt/npc/seed_of_dreams.png new file mode 100644 index 0000000000000000000000000000000000000000..a0c0285c47f379a3702acfb0652838c8abf8c307 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/npc/seed_of_dreams.png differ diff --git a/game/modules/tome/data/maps/zones/prides.lua b/game/modules/tome/data/maps/zones/prides.lua index 0976c3a49b8df672b65bc40074b30f6745d1ceec..8d1e4cd20116968a16482540988f4905ca6c6274 100644 --- a/game/modules/tome/data/maps/zones/prides.lua +++ b/game/modules/tome/data/maps/zones/prides.lua @@ -29,9 +29,10 @@ subGenerator{ } local floor = data.floor or data.sublevel.floor +local wall = data.wall or data.sublevel.wall or "HARDWALL" -- defineTile section -defineTile("#", "HARDWALL") +defineTile("#", wall) defineTile("o", floor, nil, {entity_mod=function(e) e.make_escort = nil return e end, random_filter={type='humanoid', subtype='orc', special=function(e) return e.pride == data.sublevel.pride end}}) quickEntity("g", 'o') defineTile(".", floor) diff --git a/game/modules/tome/data/quests/start-thaloren.lua b/game/modules/tome/data/quests/start-thaloren.lua index c802e3ee50171f042923549842358cd66e81c366..131197ee35e5c861a8c0c89fd0017f2b0d98a5fc 100644 --- a/game/modules/tome/data/quests/start-thaloren.lua +++ b/game/modules/tome/data/quests/start-thaloren.lua @@ -32,7 +32,11 @@ desc = function(self, who) desc[#desc+1] = "#SLATE#* You must explore Norgos' Lair.#WHITE#" end if self:isCompleted("heart-gloom") then - desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Heart of the Gloom and slain the Withering Thing.#WHITE#" + if self:isCompleted("heart-gloom-purified") then + desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Heart of the Gloom and slain the Dreaming One.#WHITE#" + else + desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Heart of the Gloom and slain the Withering Thing.#WHITE#" + end else desc[#desc+1] = "#SLATE#* You must explore the Heart of the Gloom.#WHITE#" end diff --git a/game/modules/tome/data/zones/heart-gloom/npcs.lua b/game/modules/tome/data/zones/heart-gloom/npcs.lua index fb8fcba7bb94709e38328e8d821ed1a0bccfc6ec..8b7cd7e4921120622a6c5867e16fd5f7b2ac6ec2 100644 --- a/game/modules/tome/data/zones/heart-gloom/npcs.lua +++ b/game/modules/tome/data/zones/heart-gloom/npcs.lua @@ -19,23 +19,40 @@ local Talents = require("engine.interface.ActorTalents") -local gloomify = function(add, mult) - add = add or 0 - mult = mult or 1 - return function(e) - if e.rarity then - local list = {"T_GLOOM", "T_AGONY", "T_REPROACH", "T_DARK_TENDRILS", "T_BLINDSIDE"} - e[#e+1] = resolvers.talents{[ Talents[rng.table(list)] ] = {base=1, every=5, max=6}} - e.rarity = math.ceil(e.rarity * mult + add) - e.name = rng.table{"gloomy ", "deformed ", "sick "}..e.name +local alter + +if not currentZone.is_purified then + alter = function(add, mult) + add = add or 0 + mult = mult or 1 + return function(e) + if e.rarity then + local list = {"T_GLOOM", "T_AGONY", "T_REPROACH", "T_DARK_TENDRILS", "T_BLINDSIDE"} + e[#e+1] = resolvers.talents{[ Talents[rng.table(list)] ] = {base=1, every=5, max=6}} + e.rarity = math.ceil(e.rarity * mult + add) + e.name = rng.table{"gloomy ", "deformed ", "sick "}..e.name + end + end + end +else + alter = function(add, mult) + add = add or 0 + mult = mult or 1 + return function(e) + if e.rarity then + local list = {"T_PYROKINESIS", "T_DREAM_CRUSHER", "T_FORGE_SHIELD", "T_SOLIPSISM", "T_DREAM_WALK"} + e[#e+1] = resolvers.talents{[ Talents[rng.table(list)] ] = {base=1, every=5, max=6}} + e.rarity = math.ceil(e.rarity * mult + add) + e.name = rng.table{"dreaming ", "slumbering ", "dozing "}..e.name + end end end end -load("/data/general/npcs/rodent.lua", gloomify(0)) -load("/data/general/npcs/bear.lua", gloomify(3)) -load("/data/general/npcs/canine.lua", gloomify(1)) -load("/data/general/npcs/plant.lua", gloomify(0)) +load("/data/general/npcs/rodent.lua", alter(0)) +load("/data/general/npcs/bear.lua", alter(3)) +load("/data/general/npcs/canine.lua", alter(1)) +load("/data/general/npcs/plant.lua", alter(0)) --load("/data/general/npcs/all.lua", rarity(4, 35)) @@ -76,3 +93,45 @@ newEntity{ base="BASE_NPC_CANINE", define_as = "WITHERING_THING", game.player:resolveSource():setQuestStatus("start-thaloren", engine.Quest.COMPLETED, "heart-gloom") end, } + + +newEntity{ define_as = "DREAMING_ONE", + type = "horror", subtype = "eldritch", + display = "h", + unique = true, + name = "The Dreaming One", tint=colors.PURPLE, + color=colors.VIOLET, image = "npc/seed_of_dreams.png", + desc = [[This strange globe of blue light seems to be alive and asleep. Nothing about it moves yet you can feel the crushing power of its dreams assaulting your mind.]], + killer_message = "and corrupted into a pile of writhing worms", + level_range = {7, nil}, exp_worth = 2, + max_life = 70, life_rating = 10, fixed_rating = true, + stats = { str=10, dex=10, cun=20, wil=25, con=10 }, + rank = 4, + tier1 = true, + size_category = 2, + infravision = 10, + instakill_immune = 1, + never_move = 1, + + combat = { dammod={wil=0.6, cun=0.4}, damtype=DamageType.MIND, dam=resolvers.levelup(8, 1, 0.9), atk=15, apr=3 }, + + body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, + resolvers.drops{chance=100, nb=1, {defined="EYE_OF_THE_DREAMING_ONE", random_art_replace={chance=75}} }, + resolvers.drops{chance=100, nb=3, {tome_drops="boss"} }, + + resolvers.talents{ + [Talents.T_SOLIPSISM]=3, + [Talents.T_FORGE_SHIELD]={base=2, every=4, max=6}, + [Talents.T_DISTORTION_BOLT]={base=1, every=4, max=6}, + [Talents.T_MINDHOOK]={base=4, every=4, max=6}, + }, + resolvers.sustains_at_birth(), + + autolevel = "wildcaster", + ai = "tactical", ai_state = { talent_in=1 }, + + on_die = function(self, who) + game.player:resolveSource():setQuestStatus("start-thaloren", engine.Quest.COMPLETED, "heart-gloom") + game.player:resolveSource():setQuestStatus("start-thaloren", engine.Quest.COMPLETED, "heart-gloom-purified") + end, +} diff --git a/game/modules/tome/data/zones/heart-gloom/zone.lua b/game/modules/tome/data/zones/heart-gloom/zone.lua index ccde2864d0814793b1195145e0277ed239304cf7..39d3d8b002f2ccbb882301e4802f87ea7c56368c 100644 --- a/game/modules/tome/data/zones/heart-gloom/zone.lua +++ b/game/modules/tome/data/zones/heart-gloom/zone.lua @@ -17,6 +17,9 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org +local layout = game.state:alternateZone(short_name, {"PURIFIED", 2}) +local is_purified = layout == "PURIFIED" + return { name = "Heart of the Gloom", level_range = {1, 5}, @@ -32,6 +35,7 @@ return { persistent = "zone", ambient_music = "Taking flight.ogg", max_material_level = 2, + is_purified = is_purified, generator = { map = { class = "engine.generator.map.Octopus", @@ -52,7 +56,7 @@ return { class = "mod.class.generator.actor.Random", nb_npc = {20, 30}, filters = { {max_ood=2}, }, - guardian = "WITHERING_THING", + guardian = is_purified and "DREAMING_ONE" or "WITHERING_THING", }, object = { class = "engine.generator.object.Random", @@ -74,7 +78,7 @@ return { post_process = function(level) local Map = require "engine.Map" - level.foreground_particle = require("engine.Particles").new("fullgloom", 1, {radius=(Map.viewport.mwidth + Map.viewport.mheight) / 2}) + level.foreground_particle = require("engine.Particles").new(is_purified and "fulldream" or "fullgloom", 1, {radius=(Map.viewport.mwidth + Map.viewport.mheight) / 2}) end, foreground = function(level, x, y, nb_keyframes) diff --git a/game/modules/tome/data/zones/rak-shor-pride/grids.lua b/game/modules/tome/data/zones/rak-shor-pride/grids.lua index de98386e17cc495eede0dc51364a8093f4262e8b..5dc05813787e168db54735eed316fd4fb403907b 100644 --- a/game/modules/tome/data/zones/rak-shor-pride/grids.lua +++ b/game/modules/tome/data/zones/rak-shor-pride/grids.lua @@ -19,4 +19,5 @@ load("/data/general/grids/basic.lua") load("/data/general/grids/sand.lua") +load("/data/general/grids/bone.lua") load("/data/general/grids/water.lua") 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 9c534ebf249e57286f6ebbf561d54ce27b733cd3..c6192d1c5d43988e5ccd136e189bd56719a3d6cd 100644 --- a/game/modules/tome/data/zones/rak-shor-pride/zone.lua +++ b/game/modules/tome/data/zones/rak-shor-pride/zone.lua @@ -38,18 +38,19 @@ return { map = "zones/prides", up = "SAND_UP6", down = "SAND_DOWN4", - floor = "SAND", + floor = "BONEFLOOR", + wall = "HARDBONEWALL", sublevel = { class = "engine.generator.map.Town", pride = "rak-shor", building_chance = 70, max_building_w = 8, max_building_h = 8, edge_entrances = {6,4}, - floor = "FLOOR", - external_floor = "SAND", - wall = "WALL", - up = "SAND", - down = "SAND", + floor = "BONEFLOOR", + external_floor = "BONEFLOOR", + wall = "BONEWALL", + up = "BONEFLOOR", + down = "BONEFLOOR", door = "DOOR", nb_rooms = {0,0,0,1},