From 2865f69b41c2f6b2700c694f668e316a2cb5b149 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Tue, 23 Dec 2014 19:06:44 +0100 Subject: [PATCH] moar rooms --- game/modules/tome/data/lore/age-allure.lua | 6 +-- .../modules/tome/data/timed_effects/other.lua | 4 ++ .../tome/data/zones/conclave-vault/npcs.lua | 7 ++- .../data/zones/conclave-vault/rooms/room3.lua | 52 ++++++++++++++++++ .../data/zones/conclave-vault/rooms/room4.lua | 54 +++++++++++++++++++ .../data/zones/conclave-vault/rooms/room5.lua | 50 +++++++++++++++++ .../tome/data/zones/conclave-vault/zone.lua | 8 ++- 7 files changed, 174 insertions(+), 7 deletions(-) create mode 100644 game/modules/tome/data/zones/conclave-vault/rooms/room3.lua create mode 100644 game/modules/tome/data/zones/conclave-vault/rooms/room4.lua create mode 100644 game/modules/tome/data/zones/conclave-vault/rooms/room5.lua diff --git a/game/modules/tome/data/lore/age-allure.lua b/game/modules/tome/data/lore/age-allure.lua index 1699932733..a1a33d6c4e 100644 --- a/game/modules/tome/data/lore/age-allure.lua +++ b/game/modules/tome/data/lore/age-allure.lua @@ -215,7 +215,7 @@ newLore{ id = "conclave-vault-3", category = "age of allure", name = "healer Astelrid log 3", - lore = [[The Overseers were ecstatic about my ideas! Our staff has been relocated to a more secure location, deep underground with several extensive tunnels leading in from different locations. Although this means we can no longer leave to harvest herbs for our infusions, the increased budget the Overseers have given us does more than enough to compensate. Many wounded are still brought to me through the tunnels, but now our goal is not simply to make them as strong and healthy as they were before, but far stronger and far healthier than they could've dreamed. They are brought to us unconscious, with amnesia spells already applied to ensure they do not resist our experiments; although they are not told they will be test subjects before being brought here, we are sure they would consent to these experiments, if they knew how valuable they were to help the Conclave. I do not see any moral problem with this, and nobody else at this facility has expressed any concerns to me. After all, those who join the Conclave as soldiers have already volunteered to give their lives in service to the Overseers' enlightened rule, and this is surely a much more productive way to do so than dying to a Nargol sling-bullet. + lore = [[The Overseers were ecstatic about my ideas! Our staff have been relocated to a more secure location, deep underground with several extensive tunnels leading in from different locations. Although this means we can no longer leave to harvest herbs for our infusions, the increased budget the Overseers have given us does more than enough to compensate. Many wounded are still brought to me through the tunnels, but now our goal is not simply to make them as strong and healthy as they were before, but far stronger and far healthier than they could've dreamed. They are brought to us unconscious, with amnesia spells already applied to ensure they do not resist our experiments; although they are not told they will be test subjects before being brought here, we are sure they would consent to these experiments, if they knew how valuable they were to help the Conclave. As such, although this process violates several oaths we have taken as healers, I ultimately do not see any moral problem with this, and nobody else at this facility has expressed any concerns to me. After all, those who join the Conclave as soldiers have already volunteered to give their lives in service to the Overseers' enlightened rule, and this is surely a much more productive way to do so than dying to a Nargol sling-bullet. With access to better components, we can make the same basic improvements to their strength as we could before, but the changes do not stop there! With so many subjects to work with, and the Overseers' encouragement to take risks, we've made them much larger (with associated multiplying effects on their effectiveness in combat), and reinforced their constitution to be capable of bearing more inscriptions without collapsing under the stress. A fellow researcher had the brilliant idea to use this runic affinity to both enhance their connection to magic's weave, and make them biologically and structurally dependent on it; now, our front-line soldiers can conjure devastating fireballs with little training, and should those hairy-footed vermin attempt to raise one of these soldiers from the dead, they will collapse, having lost the magic that kept them intact when they still lived. @@ -238,11 +238,11 @@ We are doomed, no matter what happens. My orders from the Overseers in such a s We have a small supply of emergency rations, but it would last us a couple of months at the longest, and we cannot assume the Conclave will reclaim this territory in that time. We could try to repurpose the infusion herb-garden for making edible crops, but that would only buy us a month after that before the grow-lights lost their magic. Without drastic steps, we will surely die of starvation; fortunately, we have drastic steps available to us. -This is my last order: I have prepared a golem to apply the Ogric inscriptions to us, and updated all of our records to reflect our best current knowledge of their effects and effectiveness. I have also brewed several doses of the "stasis" potion for each of us. By the time you find this note, I will have already undergone this process myself, and will be hibernating in one of the storage rooms. If you do not wish to die, you should acquire a weapon from the armory, then follow my lead, after scattering yourselves evenly throughout the facility. When we are sleeping, we will be immune to the ravages of time, and prepared to greet whoever finally digs their way down and finds us. Hopefully, it will be Conclave reinforcements, in which case we will stand down, give them our notes, and await further orders. And if it isn't the Conclave... make them regret it. Send a message stronger than any NO TRESPASSING sign ever could, then resume your sleep. +This is my last order: I have prepared a golem to apply the Ogric inscriptions to us, and updated all of our records to reflect our best current knowledge of their effects and effectiveness. I have also brewed several doses of the "stasis" potion for each of us. By the time you find this note, I will have already undergone this process myself, and will be hibernating in one of the storage rooms. If you do not wish to die, you should acquire a weapon from the armory, then follow my lead, after scattering yourselves evenly throughout the facility. When we are sleeping, we will be immune to the ravages of time, and prepared to greet whoever finally digs their way down and finds us. Hopefully, it will be Conclave reinforcements, in which case we will stand down, give them our notes, and await further orders. And if it isn't the Conclave... make them regret it. Send a message stronger than any NO TRESPASSING sign ever could, then resume your slumber. It has been an honor working with such talented individuals, and an honor doing everything I can for a noble cause. Perhaps we still had some progress to make, but overall I'm proud of what we've accomplished, and the contributions the Ogre race will make to all of Maj'Eyal. -Long live the Conclave, +Long live the Conclave! Healer Astelrid]], on_learn = function(who) game:setAllowedBuild("race_giant") diff --git a/game/modules/tome/data/timed_effects/other.lua b/game/modules/tome/data/timed_effects/other.lua index 5c3afd2a72..60aedc0f7e 100644 --- a/game/modules/tome/data/timed_effects/other.lua +++ b/game/modules/tome/data/timed_effects/other.lua @@ -2661,10 +2661,14 @@ newEffect{ activate = function(self, eff) self:effectTemporaryValue(eff, "status_effect_immune", 1) self:effectTemporaryValue(eff, "invulnerable", 1) + self:effectTemporaryValue(eff, "cant_be_moved", 1) self:effectParticles(eff, self:addParticles3D("volumetric", {kind="dense_cylinder", radius=1.4, shininess=35, growSpeed=0.004, img="coggy_outline_01"})) self.never_act = true + eff.old_faction = self.faction + self.faction = "neutral" end, deactivate = function(self, eff) + self.faction = eff.old_faction self.never_act = nil end, on_timeout = function(self, eff) diff --git a/game/modules/tome/data/zones/conclave-vault/npcs.lua b/game/modules/tome/data/zones/conclave-vault/npcs.lua index 6fe968416f..8e94ae1218 100644 --- a/game/modules/tome/data/zones/conclave-vault/npcs.lua +++ b/game/modules/tome/data/zones/conclave-vault/npcs.lua @@ -17,8 +17,11 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org --- load("/data/general/npcs/skeleton.lua", rarity(0)) - +local special_rarity = function(e) e.special_rarity, e.rarity = e.rarity, nil end +load("/data/general/npcs/jelly.lua", special_rarity) +load("/data/general/npcs/ooze.lua", special_rarity) +load("/data/general/npcs/mold.lua", special_rarity) +load("/data/general/npcs/slime.lua", special_rarity) local Talents = require("engine.interface.ActorTalents") diff --git a/game/modules/tome/data/zones/conclave-vault/rooms/room3.lua b/game/modules/tome/data/zones/conclave-vault/rooms/room3.lua new file mode 100644 index 0000000000..e32ef6d0a5 --- /dev/null +++ b/game/modules/tome/data/zones/conclave-vault/rooms/room3.lua @@ -0,0 +1,52 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009 - 2014 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 = { numbers = '.', +[[#!!!!!!!#]], +[[!.......!]], +[[!.###1#.!]], +[[!.1.3.#.!]], +[[!.#3.3#.!]], +[[!.#.3.1.!]], +[[!.#1###.!]], +[[!.......!]], +[[#!!!!!!!#]], +} + +return function(gen, id) + local room = gen:roomParse(def) + return { name="conclave-ogre-3"..room.w.."x"..room.h, w=room.w, h=room.h, generator = function(self, x, y, is_lit) + + gen:roomFrom(id, x, y, is_lit, room) + util.squareApply(x+2, y+2, room.w-2, room.h-2, function(i, j) gen.map.room_map[i][j].special = true end) + + for _, spot in ipairs(room.spots[1]) do + local e = gen.zone:makeEntity(gen.level, "actor", {type="giant", subtype="ogre"}, nil, true) + if e then gen:roomMapAddEntity(x + spot.x, y + spot.y, "actor", e) gen.map.room_map[x + spot.x][y + spot.y].special = true end + end + for _, spot in ipairs(room.spots[3]) do + local e = gen.zone:makeEntity(gen.level, "object", {tome_drops="boss"}, nil, true) + if e then gen:roomMapAddEntity(x + spot.x, y + spot.y, "object", e)end + + game.level.map(x + spot.x, y + spot.y, gen.map.TRIGGER, engine.Entity.new{ on_move = function(self, x, y, who) if who and game.zone.awaken_ogres then + game.zone.awaken_ogres(who, x, y, 4) + end end}) + end + end} +end diff --git a/game/modules/tome/data/zones/conclave-vault/rooms/room4.lua b/game/modules/tome/data/zones/conclave-vault/rooms/room4.lua new file mode 100644 index 0000000000..18da985acf --- /dev/null +++ b/game/modules/tome/data/zones/conclave-vault/rooms/room4.lua @@ -0,0 +1,54 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009 - 2014 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 = { numbers = '.', +[[#!!!!#!!!!#]], +[[!2221#1222!]], +[[!22#####22!]], +[[!.........!]], +[[!.........!]], +[[!..#####..!]], +[[!..21#12..!]], +[[!2221#1222!]], +[[!..21#12..!]], +[[!..#####..!]], +[[!.........!]], +[[!.........!]], +[[!22#####22!]], +[[!2221#1222!]], +[[#!!!!#!!!!#]], +} + +return function(gen, id) + local room = gen:roomParse(def) + return { name="conclave-ogre-2"..room.w.."x"..room.h, w=room.w, h=room.h, generator = function(self, x, y, is_lit) + + gen:roomFrom(id, x, y, is_lit, room) + + for _, spot in ipairs(room.spots[1]) do + local e = gen.zone:makeEntity(gen.level, "actor", {type="giant", subtype="ogre"}, nil, true) + if e then gen:roomMapAddEntity(x + spot.x, y + spot.y, "actor", e) gen.map.room_map[x + spot.x][y + spot.y].special = true end + end + for _, spot in ipairs(room.spots[2]) do + game.level.map(x + spot.x, y + spot.y, gen.map.TRIGGER, engine.Entity.new{ on_move = function(self, x, y, who) if who and game.zone.awaken_ogres then + game.zone.awaken_ogres(who, x, y, 4) + end end}) + end + end} +end diff --git a/game/modules/tome/data/zones/conclave-vault/rooms/room5.lua b/game/modules/tome/data/zones/conclave-vault/rooms/room5.lua new file mode 100644 index 0000000000..dbf360656b --- /dev/null +++ b/game/modules/tome/data/zones/conclave-vault/rooms/room5.lua @@ -0,0 +1,50 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009 - 2014 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 = { numbers = '.', +[[#!!!!!!!!!!#]], +[[!..........!]], +[[###......#2!]], +[[!1#......#2!]], +[[!1#......#2!]], +[[!1#......#1!]], +[[!1#......#1!]], +[[!2#......#1!]], +[[!2#......#1!]], +[[!2#......###]], +[[!2.........!]], +[[#!!!!!!!!!!#]], + +return function(gen, id) + local room = gen:roomParse(def) + return { name="conclave-ogre-2"..room.w.."x"..room.h, w=room.w, h=room.h, generator = function(self, x, y, is_lit) + + gen:roomFrom(id, x, y, is_lit, room) + + for _, spot in ipairs(room.spots[1]) do + local e = gen.zone:makeEntity(gen.level, "actor", {type="giant", subtype="ogre"}, nil, true) + if e then gen:roomMapAddEntity(x + spot.x, y + spot.y, "actor", e) gen.map.room_map[x + spot.x][y + spot.y].special = true end + end + for _, spot in ipairs(room.spots[2]) do + game.level.map(x + spot.x, y + spot.y, gen.map.TRIGGER, engine.Entity.new{ on_move = function(self, x, y, who) if who and game.zone.awaken_ogres then + game.zone.awaken_ogres(who, x, y, 8) + end end}) + end + end} +end diff --git a/game/modules/tome/data/zones/conclave-vault/zone.lua b/game/modules/tome/data/zones/conclave-vault/zone.lua index 741fc6d6c8..b95ab065c4 100644 --- a/game/modules/tome/data/zones/conclave-vault/zone.lua +++ b/game/modules/tome/data/zones/conclave-vault/zone.lua @@ -35,7 +35,7 @@ return { map = { class = "engine.generator.map.Roomer", nb_rooms = 10, - rooms = {"!room1", "!room2", }, + rooms = {"!room1", "!room2", {"!room3", 3}, "small_x", "!room4", "!room5"}, lite_room_chance = 100, ['.'] = "FLOOR", ['#'] = "WALL", @@ -47,7 +47,8 @@ return { }, actor = { class = "mod.class.generator.actor.Random", - nb_npc = {0, 0}, + filters = {{special_rarity="special_rarity"}}, + nb_npc = {12, 15}, }, object = { class = "engine.generator.object.Random", @@ -64,6 +65,8 @@ return { generator = { map = { class = "engine.generator.map.Static", map = "!conclave-vault-entrance", + }, actor = { + nb_npc = {0, 0}, }, object = { nb_object = {0, 0}, }, trap = { @@ -82,6 +85,7 @@ return { end, awaken_ogres = function(who, x, y, radius, dur) + if not who or who.special_rarity then return end core.fov.calc_circle(x, y, game.level.map.w, game.level.map.h, radius or 4, function(_, i, j) if game.level.map:checkAllEntities(i, j, "block_sight") then return true end end, function(_, i, j) -- GitLab