diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 4be784737cd9642a6d1e3aff73de39dcbd32cf9a..e4fefa7317fb49efeeb59ef8ec7bbf7da1cf527a 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -1210,8 +1210,7 @@ function _M:setupCommands() setfenv(f, setmetatable({level=self.level, zone=self.zone}, {__index=_G})) print(pcall(f)) --]] - local o = game.zone:makeEntity(game.level,"object", { - type = "weapon", subtype="battleaxe",random_object={}}, nil, true) + local o = game.zone:makeEntity(game.level,"object", {random_object={}}, nil, true) if o then o:identify(true) game.zone:addEntity(game.level, o, "object", game.player.x, game.player.y) diff --git a/game/modules/tome/data/general/events/old-battle-field.lua b/game/modules/tome/data/general/events/old-battle-field.lua index 54e5ac87f306ac6826f153a7de2ef8c6009e6199..d20441e153f1a8160dcbd2a50ee33f866b4c3b44 100644 --- a/game/modules/tome/data/general/events/old-battle-field.lua +++ b/game/modules/tome/data/general/events/old-battle-field.lua @@ -109,36 +109,36 @@ if tries < 100 then return zone end - - local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull() - g.name = "grave" - g.display='&' g.color_r=255 g.color_g=255 g.color_b=255 g.notice = true - g.add_displays = g.add_displays or {} - g.add_displays[#g.add_displays+1] = mod.class.Grid.new{image="terrain/grave_unopened_0"..rng.range(1,3).."_64.png", display_y=-1, display_h=2} - g.nice_tiler = nil - g.block_move = function(self, x, y, who, act, couldpass) - if not who or not who.player or not act then return false end - who:runStop("grave") - require("engine.ui.Dialog"):yesnoPopup("Grave", "Do you wish to disturb the grave?", function(ret) if ret then - self.block_move = nil - self:change_level_check() - require("engine.ui.Dialog"):simplePopup("Fall...", "As you tried to dig the grave the ground fell under you. You find yourself stranded in an eerie lit cavern.") - end end) - return false - end - g.change_level=1 g.change_zone=id g.glow=true - g.real_change = changer - g.change_level_check = function(self) - game:changeLevel(1, self.real_change(self.change_zone), {temporary_zone_shift=true}) - self.change_level_check = nil - self.real_change = nil - self.change_level = nil - return true - end - local grids = check(x, y) for i = 1, 5 do local p = rng.tableRemove(grids) + + local g = game.level.map(p.x, p.y, engine.Map.TERRAIN):cloneFull() + g.name = "grave" + g.display='&' g.color_r=255 g.color_g=255 g.color_b=255 g.notice = true + g.add_displays = g.add_displays or {} + g.add_displays[#g.add_displays+1] = mod.class.Grid.new{image="terrain/grave_unopened_0"..rng.range(1,3).."_64.png", display_y=-1, display_h=2} + g.nice_tiler = nil + g.block_move = function(self, x, y, who, act, couldpass) + if not who or not who.player or not act then return false end + who:runStop("grave") + require("engine.ui.Dialog"):yesnoPopup("Grave", "Do you wish to disturb the grave?", function(ret) if ret then + self.block_move = nil + self:change_level_check() + require("engine.ui.Dialog"):simplePopup("Fall...", "As you tried to dig the grave the ground fell under you. You find yourself stranded in an eerie lit cavern.") + end end) + return false + end + g.change_level=1 g.change_zone=id g.glow=true + g.real_change = changer + g.change_level_check = function(self) + game:changeLevel(1, self.real_change(self.change_zone), {temporary_zone_shift=true}) + self.change_level_check = nil + self.real_change = nil + self.change_level = nil + return true + end + game.zone:addEntity(game.level, g, "terrain", p.x, p.y) end end diff --git a/game/modules/tome/data/general/objects/random-artifacts/gloves.lua b/game/modules/tome/data/general/objects/random-artifacts/gloves.lua index b81f221d58b9aebe1e5f97199b202a08cf2dedfc..2be89e73db3141f1875863fe0d41f17aa438a028 100644 --- a/game/modules/tome/data/general/objects/random-artifacts/gloves.lua +++ b/game/modules/tome/data/general/objects/random-artifacts/gloves.lua @@ -95,7 +95,7 @@ newEntity{ theme={cold=true}, name="ice melee", points = 1, rarity = 20, level_r wielder.combat = { melee_project = {[DamageType.ICE] = resolvers.randartmax(1, 20), }, }, } newEntity{ theme={antimagic=true}, name="manaburn melee", points = 1, rarity = 18, level_range = {1, 50}, - wielder.combat = { melee_project = {[DamageType.MANA_BURN] = resolvers.randartmax(1, 20), }, }, + wielder.combat = { melee_project = {[DamageType.MANABURN] = resolvers.randartmax(1, 20), }, }, } newEntity{ theme={nature=true, antimagic=true}, name="slime melee", points = 1, rarity = 18, level_range = {1, 50}, wielder.combat = { melee_project = {[DamageType.SLIME] = resolvers.randartmax(1, 20), }, }, diff --git a/game/modules/tome/data/general/objects/random-artifacts/shields.lua b/game/modules/tome/data/general/objects/random-artifacts/shields.lua index 5084c4ecd6f748c6ace197e625e546dd335acdc0..ede65b67469f1c2af2154c1816edde1cdf48158a 100644 --- a/game/modules/tome/data/general/objects/random-artifacts/shields.lua +++ b/game/modules/tome/data/general/objects/random-artifacts/shields.lua @@ -95,7 +95,7 @@ newEntity{ theme={cold=true}, name="ice melee", points = 1, rarity = 20, level_r special_combat = { melee_project = {[DamageType.ICE] = resolvers.randartmax(1, 20), }, }, } newEntity{ theme={antimagic=true}, name="manaburn melee", points = 1, rarity = 18, level_range = {1, 50}, - special_combat = { melee_project = {[DamageType.MANA_BURN] = resolvers.randartmax(1, 20), }, }, + special_combat = { melee_project = {[DamageType.MANABURN] = resolvers.randartmax(1, 20), }, }, } newEntity{ theme={nature=true, antimagic=true}, name="slime melee", points = 1, rarity = 18, level_range = {1, 50}, special_combat = { melee_project = {[DamageType.SLIME] = resolvers.randartmax(1, 20), }, }, diff --git a/game/modules/tome/data/quests/paradoxology.lua b/game/modules/tome/data/quests/paradoxology.lua index a443a6b85dfae436cb2c6dee8cef4aef0ce9fa27..0d23d880488b13413ea3692e79ffbf4df4711a3e 100644 --- a/game/modules/tome/data/quests/paradoxology.lua +++ b/game/modules/tome/data/quests/paradoxology.lua @@ -51,6 +51,7 @@ generate = function(self, player, x, y) a.ai_state = {talent_in=1} a.faction = "enemies" a.max_life = a.max_life * 2 + a.puuid = nil a.life = a.max_life -- Remove all talents diff --git a/game/modules/tome/data/talents/celestial/twilight.lua b/game/modules/tome/data/talents/celestial/twilight.lua index 66382763aa2604dd50519bd570e2d616e05f6d0c..457765c3ae95a0ab9b09f485e650bb0025bf067e 100644 --- a/game/modules/tome/data/talents/celestial/twilight.lua +++ b/game/modules/tome/data/talents/celestial/twilight.lua @@ -237,6 +237,7 @@ newTalent{ m.forceLevelup = function() end -- Handle special things m.on_die = nil + m.puuid = nil m.on_acquire_target = nil m.seen_by = nil m.can_talk = nil diff --git a/game/modules/tome/data/talents/cunning/ambush.lua b/game/modules/tome/data/talents/cunning/ambush.lua index 885b2675377ac7681a2d2c4abdc9ceb7be98d642..c5323130613b2e3838609e0845a4bb8cd9abd611 100644 --- a/game/modules/tome/data/talents/cunning/ambush.lua +++ b/game/modules/tome/data/talents/cunning/ambush.lua @@ -145,6 +145,7 @@ newTalent{ m.on_die = nil m.on_acquire_target = nil m.seen_by = nil + m.puuid = nil m.on_takehit = nil m.can_talk = nil m.clone_on_hit = nil diff --git a/game/modules/tome/data/talents/misc/horrors.lua b/game/modules/tome/data/talents/misc/horrors.lua index 36fcc817aa59edc0ffca451a7a07fcf0e3b312d5..50247e01bdeafc055ea290f280e1326aabd304f6 100644 --- a/game/modules/tome/data/talents/misc/horrors.lua +++ b/game/modules/tome/data/talents/misc/horrors.lua @@ -214,6 +214,7 @@ newTalent{ m.inc_damage.all = (m.inc_damage.all or 0) - 50 m.forceLevelup = function() end m.on_die = nil + m.puuid = nil m.on_acquire_target = nil m.no_inventory_access = true m.on_takehit = nil diff --git a/game/modules/tome/data/talents/spells/shades.lua b/game/modules/tome/data/talents/spells/shades.lua index c99f3bcc23e320269d6faa50b216078fb8014b7a..b09b126869c73d476203d2447cc7a62e6c367015 100644 --- a/game/modules/tome/data/talents/spells/shades.lua +++ b/game/modules/tome/data/talents/spells/shades.lua @@ -204,6 +204,7 @@ newTalent{ m.on_acquire_target = nil m.seen_by = nil m.can_talk = nil + m.puuid = nil m.on_takehit = nil m.exp_worth = 0 m.no_inventory_access = true diff --git a/game/modules/tome/data/zones/ancient-elven-ruins/events.lua b/game/modules/tome/data/zones/ancient-elven-ruins/events.lua new file mode 100644 index 0000000000000000000000000000000000000000..c1771c4df067cd40f2c729130e5025c7f34bcd08 --- /dev/null +++ b/game/modules/tome/data/zones/ancient-elven-ruins/events.lua @@ -0,0 +1,22 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 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 + +return { one_per_level=true, + {group="majeyal-generic"}, +} diff --git a/game/modules/tome/data/zones/daikara/events.lua b/game/modules/tome/data/zones/daikara/events.lua new file mode 100644 index 0000000000000000000000000000000000000000..edaf3b854421b349204a0b71c486221f4f8b505a --- /dev/null +++ b/game/modules/tome/data/zones/daikara/events.lua @@ -0,0 +1,24 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 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 + +return { one_per_level=true, + {group="outdoor-majeyal-gloomy"}, + {group="outdoor-majeyal-generic"}, + {group="majeyal-generic"}, +} diff --git a/game/modules/tome/data/zones/dreadfell/events.lua b/game/modules/tome/data/zones/dreadfell/events.lua new file mode 100644 index 0000000000000000000000000000000000000000..c1771c4df067cd40f2c729130e5025c7f34bcd08 --- /dev/null +++ b/game/modules/tome/data/zones/dreadfell/events.lua @@ -0,0 +1,22 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 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 + +return { one_per_level=true, + {group="majeyal-generic"}, +} diff --git a/game/modules/tome/data/zones/golem-graveyard/events.lua b/game/modules/tome/data/zones/golem-graveyard/events.lua new file mode 100644 index 0000000000000000000000000000000000000000..edaf3b854421b349204a0b71c486221f4f8b505a --- /dev/null +++ b/game/modules/tome/data/zones/golem-graveyard/events.lua @@ -0,0 +1,24 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 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 + +return { one_per_level=true, + {group="outdoor-majeyal-gloomy"}, + {group="outdoor-majeyal-generic"}, + {group="majeyal-generic"}, +} diff --git a/game/modules/tome/data/zones/halfling-ruins/events.lua b/game/modules/tome/data/zones/halfling-ruins/events.lua new file mode 100644 index 0000000000000000000000000000000000000000..edaf3b854421b349204a0b71c486221f4f8b505a --- /dev/null +++ b/game/modules/tome/data/zones/halfling-ruins/events.lua @@ -0,0 +1,24 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 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 + +return { one_per_level=true, + {group="outdoor-majeyal-gloomy"}, + {group="outdoor-majeyal-generic"}, + {group="majeyal-generic"}, +} diff --git a/game/modules/tome/data/zones/mark-spellblaze/events.lua b/game/modules/tome/data/zones/mark-spellblaze/events.lua new file mode 100644 index 0000000000000000000000000000000000000000..edaf3b854421b349204a0b71c486221f4f8b505a --- /dev/null +++ b/game/modules/tome/data/zones/mark-spellblaze/events.lua @@ -0,0 +1,24 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 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 + +return { one_per_level=true, + {group="outdoor-majeyal-gloomy"}, + {group="outdoor-majeyal-generic"}, + {group="majeyal-generic"}, +} diff --git a/game/modules/tome/data/zones/reknor/events.lua b/game/modules/tome/data/zones/reknor/events.lua index 4454fe11bf13bbad0dd058b33d1345a8a88b62f6..e13e24a2a5a140ca36e7406e48d3314c4dc4314e 100644 --- a/game/modules/tome/data/zones/reknor/events.lua +++ b/game/modules/tome/data/zones/reknor/events.lua @@ -19,4 +19,5 @@ return { one_per_level=true, {group="fareast-generic", percent_factor=1.5}, + {group="majeyal-generic", percent_factor=1.5}, } diff --git a/game/modules/tome/data/zones/ring-of-blood/events.lua b/game/modules/tome/data/zones/ring-of-blood/events.lua new file mode 100644 index 0000000000000000000000000000000000000000..c1771c4df067cd40f2c729130e5025c7f34bcd08 --- /dev/null +++ b/game/modules/tome/data/zones/ring-of-blood/events.lua @@ -0,0 +1,22 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 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 + +return { one_per_level=true, + {group="majeyal-generic"}, +} diff --git a/game/modules/tome/data/zones/sandworm-lair/events.lua b/game/modules/tome/data/zones/sandworm-lair/events.lua new file mode 100644 index 0000000000000000000000000000000000000000..c1771c4df067cd40f2c729130e5025c7f34bcd08 --- /dev/null +++ b/game/modules/tome/data/zones/sandworm-lair/events.lua @@ -0,0 +1,22 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 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 + +return { one_per_level=true, + {group="majeyal-generic"}, +} diff --git a/game/modules/tome/data/zones/shadow-crypt/npcs.lua b/game/modules/tome/data/zones/shadow-crypt/npcs.lua index de4b1b6bd9a9b673c1c1b93dc1d65296504b15b3..8b776394ab3ca99ec2c95a45c7bc91dd7580af9a 100644 --- a/game/modules/tome/data/zones/shadow-crypt/npcs.lua +++ b/game/modules/tome/data/zones/shadow-crypt/npcs.lua @@ -86,6 +86,7 @@ newEntity{ base="BASE_NPC_ORC_RAK_SHOR", define_as = "CULTIST_RAK_SHOR", a.color_r = 150 a.color_g = 150 a.color_b = 150 a._mo:invalidate() a.ai = "tactical" + a.puuid = nil a.ai_state = {talent_in=1} a.faction = self.faction a.inc_damage.all = (a.inc_damage.all or 0) - 40 diff --git a/game/modules/tome/data/zones/tempest-peak/events.lua b/game/modules/tome/data/zones/tempest-peak/events.lua new file mode 100644 index 0000000000000000000000000000000000000000..8f522348323406ddfd92e1e774ad484cd78220ba --- /dev/null +++ b/game/modules/tome/data/zones/tempest-peak/events.lua @@ -0,0 +1,23 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011, 2012 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 + +return { one_per_level=true, + {group="outdoor-majeyal-gloomy"}, + {group="majeyal-generic"}, +}