Skip to content
Snippets Groups Projects
Commit 116b8b4b authored by dg's avatar dg
Browse files

finish

git-svn-id: http://svn.net-core.org/repos/t-engine4@1584 51575b47-30f0-44d4-a5cc-537603b46e54
parent a27bb795
No related branches found
No related tags found
No related merge requests found
Showing
with 427 additions and 149 deletions
......@@ -603,7 +603,6 @@ function _M:setupCommands()
self.player.esp.all = 1
self.player.esp.range = 50
self.player.inc_damage.all = 100000
self.player:grantQuest("escort-duty")
end
end,
[{"_f","ctrl"}] = function()
......@@ -633,8 +632,9 @@ function _M:setupCommands()
end,
[{"_g","ctrl"}] = function()
if config.settings.tome.cheat then
self:changeLevel(1, "town-minas-tirith")
self.player:grantQuest("east-portal")
self:changeLevel(1, "tannen-tower")
-- self:changeLevel(1, "town-minas-tirith")
-- self.player:grantQuest("east-portal")
end
end,
}
......
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 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
newChat{ id="welcome",
text = [[#LIGHT_GREEN#*As you step out of the portal you notice a human standing there, he wears a robe.*#WHITE#
Well met @playername@!
I am Meranas, Herald of Angolwen, I have come here at the request of King Eldarion who got worried about not seeing you coming back.
It has been some time we watched Tannen, and you revealed his true nature - and stopped him. For this we are grateful, and I think we can pay you back.
We have studied his portal research and if you give me the components I will create the portal for you, here and now!]],
answers = {
{"Yes Tannen was not exactly friendly. I thank you for your help, here are the components. [hand him the diamon and the athame]", action=function(npc, player) who:hasQuest("east-portal"):create_portal(npc, player) end},
}
}
return "welcome"
......@@ -149,7 +149,7 @@ newChat{ id="no_orb_loan3",
}
newChat{ id="orb_loan",
text = [[Fear not. Return in a few days, and I'll have everything prepared. Oh, take this #LIGHT_GREEN#*He hands you a key*#WHITE#. It opens the ruins of Orthanc, which the Mystics of Gondor sealed many years ago. If you happen to find a text in the ruins entitled "Inverted and Reverted Probabilistic Fields," return with it and your odds of surviving our portal attempt will go up drastically.]],
text = [[Fear not. Return in a few days, and I'll have everything prepared. Oh, take this #LIGHT_GREEN#*He hands you a key*#WHITE#. It opens the ruins of Orthanc, which the Mystics of Gondor sealed many years ago. If you happen to find a text in the ruins entitled "Inverted and Reverted Probabilistic Fields", return with it and your odds of surviving our portal attempt will go up drastically.]],
answers = {
{"Thank you, and farewell.", action=function(npc, player) player:hasQuest("east-portal"):open_orthanc(player) end},
}
......
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 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("g", "FLOOR", nil, "DROLEM")
defineTile("X", "HARDWALL")
defineTile("=", "SKY")
defineTile("p", "FLOOR", nil, "TANNEN")
defineTile(">", "DOWN")
defineTile(".", "FLOOR")
-- addSpot section
-- ASCII map section
return [[
=========================
==========XXXXX==========
=======...........=======
=====X.............X=====
====XX.............XX====
===XX...............XX===
===...................===
==.....................==
==...p.................==
==.....................==
=X.....................X=
=X.....................X=
=X.........g...........X=
=X.....................X=
=X.....................X=
==.....................==
==.....................==
==.....................==
===...................===
===XX...............XX===
====XX.............XX====
=====X.............X=====
=======...........=======
==========XXXXX==========
=========================]]
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 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
startx = 19
starty = 4
-- defineTile section
defineTile("X", "HARDWALL")
defineTile("+", "DOOR")
defineTile("<", "UP")
defineTile(">", "DOWN")
defineTile(".", "FLOOR")
-- addSpot section
-- ASCII map section
return [[
XXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXX.....XXXXXXXXXX
XXXXXXX....XXX....XXXXXXX
XXXXX...XXXXXXXXX...XXXXX
XXXX..XXX...X...XXX>.XXXX
XXX..XX.....X.....XX..XXX
XXX.XX......+......XX.XXX
XX..X.......X.......X..XX
XX.XX.......X.......XX.XX
XX.X.......XXX.......X.XX
X..X......+X.XX......X..X
X.XX.....XX...XX.....XX.X
X.XXXXXXXX..<..XXX+XXXX.X
X.XX.....XX...XX.....XX.X
X..X......XX.XX......X..X
XX.X.......XXX.......X.XX
XX.XX.......X.......XX.XX
XX..+.......X.......X..XX
XXX.XX......+......XX.XXX
XXX..XX.....X.....XX..XXX
XXXX..XXX...X...XXX..XXXX
XXXXX...XXXXXXXXX...XXXXX
XXXXXXX....XXX....XXXXXXX
XXXXXXXXXX.....XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXX]]
......@@ -17,72 +17,42 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
startx = 5
startx = 19
starty = 14
-- defineTile section
defineTile("U", "LAVA_FLOOR", nil, {random_filter={type="demon"}})
defineTile('"', "OLD_FLOOR", nil, {random_filter={name="greater multi-hued wyrm",add_levels=12}})
defineTile("#", "OLD_WALL")
defineTile("E", "GRASS", nil, {random_filter={type="elemental"}})
defineTile("$", "FLOOR", nil, {random_filter={type="undead", subtype="giant"}})
defineTile("X", "HARDWALL")
defineTile("~", "LAVA_FLOOR")
defineTile("*", "SEALED_DOOR")
defineTile("+", "DOOR")
defineTile("~", "DEEP_WATER")
defineTile("<", "UP")
defineTile(",", "GRASS")
defineTile(">", "DOWN")
defineTile(".", "FLOOR")
defineTile(" ", "OLD_FLOOR")
defineTile("!", "WALL")
defineTile("T", "TREE")
addData{post_process = function(level)
level.nb_to_open = 0
level.open_doors = function()
local doors = {{11,12},{12,11},{13,12},{12,13}}
local g = game.zone:makeEntityByName(game.level, "terrain", "SEALED_DOOR_CRACKED")
for i, d in ipairs(doors) do game.zone:addEntity(game.level, g, "terrain", d[1], d[2]) end
game.logPlayer(game.player, "#VIOLET#There is a loud crack coming from the center of the level.")
end
-- Need to kill them all
for uid, a in pairs(level.entities) do
if a.faction and game.player:reactionToward(a) < 0 then
level.nb_to_open = level.nb_to_open + 1
a.old_on_die = a.on_die
a.on_die = function(self, who)
game.level.nb_to_open = game.level.nb_to_open - 1
if game.level.nb_to_open <= 0 then game.level.open_doors() end
end
end
end
end}
-- addSpot section
-- ASCII map section
return [[
XXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXX.+.+.XXXXXXXXXX
XXXXXXX....X+X....XXXXXXX
XXXXX...X+XX.XXXX...XXXXX
XXXX..XX# #X.X!~XXX..XXXX
XXX..XXX# #X.XU!~!+X..XXX
XXX.XX### #X.X!~!U!+X.XXX
XX..X## #X.X~!U!~!X..XX
XX.XX# #X.X!~!~!UXX.XX
XX.XX# " #X.XU!~!U!~X.XX
X..XX######X.X!U!~!~!X..X
X+XXXXXXXXXX*XXXXXXXXXX+X
X.+........*<*........+.X
X+XXXXXXXXXX*XXX+XXXXXX+X
X..XX......X.XX,,,XXXX..X
XX.XX......X.XEE,EEXXX.XX
XX.XX......X.XEETEEXXX.XX
XX..X....$$X.XEE,EEXX..XX
XXX.XXXXXX+X.XX,,,XXX.XXX
XXX..XX.$..X.XXXXXXX..XXX
XXXX..X+XXXX.XXXXXX..XXXX
XXXXX...XXXX.XXXX...XXXXX
XXXXXXX....X+X....XXXXXXX
XXXXXXXXXX.+.+.XXXXXXXXXX
XXXXXXXXXX~~~~~XXXXXXXXXX
XXXXXXX~~~.XXX~~~~XXXXXXX
XXXXX~~~XXXXXXXXX~~~XXXXX
XXXX~~XXXXXXXXXXXXX<~XXXX
XXX~~XXXXXXXXXXXXXXX~~XXX
XXX~XX~~~~~~~~~~~~~XX~XXX
XX~~XX~XXXXXXXXXXX~XX~~XX
XX~XXX~X~~.~~~~~~X.XXX~XX
XX~XXX~X~XXXXXXX~X~XXX~XX
X~~XXX~X~X~~~~~X~X~XXX~~X
X~XXXX~X~X~XXX~X~X~XXXX~X
X~XXXX~X~X~~>X~X~X~XXXX~X
X~XXXX~X~XXXXX~X~X~XXXX~X
X~~XXX.X~~~~~~~X~X~XXX~~X
XX~XXX~XXXXXXXXX~X~XXX~XX
XX.XXX~~~~~~~~~~~X~XXX~XX
XX~~XXXXXXXXXXXXXX~XX~.XX
XXX~~~~~~~~~~~.~~~~XX~XXX
XXX~~XXXXXXXXXXXXXXX~~XXX
XXXX~~XXXXXXXXXXXXX~~XXXX
XXXXX~~~XXXXXXXXX~~~XXXXX
XXXXXXX~~~.XXX~~~~XXXXXXX
XXXXXXXXXX~~~~~XXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXX]]
......@@ -56,7 +56,17 @@ desc = function(self, who)
return table.concat(desc, "\n")
end
on_status_change = function(self, who, status, sub)
if sub then
if self:isCompleted("orb-back") and self:isCompleted("diamon-back") and self:isCompleted("athame-back") then
self:tannen_exit(who)
end
end
end
create_portal = function(self, npc, player)
self:remove_materials(player)
-- Farportal
local g = mod.class.Grid.new{
name = "Farportal: Gates of Morning",
......@@ -80,10 +90,10 @@ This one seems to go near the Gates of Morning in the Far East.]],
}
g:resolve() g:resolve(nil, true)
game.zone:addEntity(game.level, g, "terrain", 20, 36)
game.level.map:particleEmitter(20, 36, 3, "farportal_lightning")
game.level.map:particleEmitter(20, 36, 3, "farportal_lightning")
game.level.map:particleEmitter(20, 36, 3, "farportal_lightning")
game.zone:addEntity(game.level, g, "terrain", 13, 43)
game.level.map:particleEmitter(13, 43, 3, "farportal_lightning")
game.level.map:particleEmitter(13, 43, 3, "farportal_lightning")
game.level.map:particleEmitter(13, 43, 3, "farportal_lightning")
player:setQuestStatus(self.id, engine.Quest.DONE)
world:gainAchievement("EAST_PORTAL", game.player)
......@@ -149,3 +159,33 @@ tannen_tower = function(self, player)
game:changeLevel(4, "tannen-tower")
player:setQuestStatus(self.id, engine.Quest.COMPLETED, "trapped")
end
tannen_exit = function(self, player)
require("engine.ui.Dialog"):simplePopup("Back and there again", "A portal appears in the center of the tower!")
local g = game.zone:makeEntityByName(game.level, "terrain", "PORTAL_BACK")
game.zone:addEntity(game.level, g, "terrain", 12, 12)
end
back_to_minas_tirith = function(self)
-- TP minas tirith
game:changeLevel(1, "town-minas-tirith")
-- Move to the portal spot
game.player:move(12, 43, true)
-- Remove tannen
game.level.map(10, 16, engine.Map.TERRAIN, game.level.map(10, 15, engine.Map.TERRAIN))
-- Add the mage
local g = mod.class.NPC.new{
name="Meranas, Herald of Angolwen",
type="humanoid", subtype="human", faction="angolwen",
display='@', color=colors.RED,
}
g:resolve() g:resolve(nil, true)
game.zone:addEntity(game.level, g, "actor", 12, 42)
game.level.map:particleEmitter(12, 42, 1, "teleport")
local Chat = require("engine.Chat")
local chat = Chat.new("east-portal-end", g, game.player)
chat:invoke()
game.logPlayer(who, "#VIOLET#You enter the swirling portal and in the blink of an eye you are back to Minas Tirith.")
end
......@@ -58,7 +58,10 @@ newTalent{
local dam, damtype, particle = t.computeDamage(self, t, ammo)
local prot = self:getTalentLevelRaw(self.T_ALCHEMIST_PROTECTION) * 0.2
local golem = game.level:hasEntity(self.alchemy_golem) and self.alchemy_golem or nil
local golem
if self.alchemy_golem then
golem = game.level:hasEntity(self.alchemy_golem) and self.alchemy_golem or nil
end
local dam_done = 0
local grids = self:project(tg, x, y, function(tx, ty)
......@@ -190,7 +193,10 @@ newTalent{
local dam, damtype, particle = t.computeDamage(self, t, ammo)
local prot = self:getTalentLevelRaw(self.T_ALCHEMIST_PROTECTION) * 0.2
local golem = game.level:hasEntity(self.alchemy_golem) and self.alchemy_golem or nil
local golem
if self.alchemy_golem then
golem = game.level:hasEntity(self.alchemy_golem) and self.alchemy_golem or nil
end
local dam_done = 0
local tmp = {}
......
......@@ -135,7 +135,7 @@ newTalent{
sustain_mana = 250,
points = 5,
range = 1,
proj_speed = 1.3,
proj_speed = 2.4,
range = 12,
do_fire = function(self, t)
if self:getMana() <= 0 then
......
......@@ -23,7 +23,7 @@ return {
level_scheme = "player",
max_level = 8,
decay = {300, 800},
actor_adjust_level = function(zone, level, e) return 1 + zone.max_level - (zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2)) end,
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + (zone.max_level - level.level) + rng.range(-1,2) end,
level_adjust_level = function(zone, level) return zone.base_level + (zone.max_level - level.level) end,
width = 50, height = 50,
-- all_remembered = true,
......
......@@ -21,6 +21,7 @@ load("/data/general/grids/basic.lua")
load("/data/general/grids/forest.lua")
load("/data/general/grids/water.lua")
load("/data/general/grids/lava.lua")
load("/data/general/grids/mountain.lua")
newEntity{
define_as = "SEALED_DOOR",
......@@ -39,3 +40,23 @@ newEntity{
notice = true,
always_remember = true,
}
newEntity{
define_as = "PORTAL_BACK",
name = "Portal to Minas Tirith",
display = '&', color_r=255, color_g=0, color_b=220, back_color=colors.VIOLET,
notice = true,
always_remember = true,
show_tooltip = true,
desc = [[This portal seems to be connected with Minas Tirith, you could probably use it to go back.]],
on_move = function(self, x, y, who)
if who == game.player then
require("engine.ui.Dialog"):yesnoPopup("Back and there again", "Enter the portal back to Minas Tirith?", function(ret)
if not ret then
game.player:hasQuest("east-portal"):back_to_minas_tirith()
end
end, "Stay", "Enter")
end
end,
}
......@@ -23,65 +23,123 @@ load("/data/general/npcs/ghost.lua", rarity(4))
load("/data/general/npcs/bone-giant.lua", rarity(3))
load("/data/general/npcs/faeros.lua", rarity(4))
load("/data/general/npcs/gwelgoroth.lua", rarity(4))
load("/data/general/npcs/aquatic_critter.lua", function(e) if e.rarity then e.aquatic_rarity, e.rarity = e.rarity, nil end end)
load("/data/general/npcs/aquatic_demon.lua", function(e) if e.rarity then e.aquatic_rarity, e.rarity = e.rarity, nil end end)
load("/data/general/npcs/all.lua", rarity(4, 35))
local Talents = require("engine.interface.ActorTalents")
newEntity{ define_as = "SHADE_OF_SARUMAN",
type = "undead", subtype = "ghost", unique = true,
name = "The Shade of Saruman",
display = "G", color=colors.VIOLET,
desc = [[Everybody though Saruman dead and his spirit destroyed, but it seems he still lingers in his old place of power.]],
level_range = {38, nil}, exp_worth = 3,
max_life = 250, life_rating = 22, fixed_rating = true,
newEntity{ define_as = "TANNEN",
type = "humanoid", subtype = "human", unique = true,
name = "Tannen",
display = "p", color=colors.VIOLET,
desc = [[The traitor has been revealed, and he does not intend to let you escape to tell the tale.]],
level_range = {35, nil}, exp_worth = 2,
max_life = 250, life_rating = 16, fixed_rating = true,
max_mana = 850, mana_regen = 40,
mana_regen = 15,
rank = 4,
size_category = 3,
size_category = 2,
infravision = 20,
stats = { str=1, dex=14, cun=34, mag=25, con=10 },
stats = { str=10, dex=12, cun=14, mag=25, con=16 },
movement_speed = 1.4,
combat_def = 40, combat_armor = 30,
instakill_immune = 1,
blind_immune = 1,
undead = 1,
no_breath = 1,
stone_immune = 1,
confusion_immune = 1,
fear_immune = 1,
teleport_immune = 0.5,
disease_immune = 1,
poison_immune = 1,
stun_immune = 1,
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, QUIVER=1, },
equipment = resolvers.equip{
{type="weapon", subtype="staff", ego_chance=100, autoreq=true},
{type="armor", subtype="cloth", ego_chance=100, autoreq=true},
},
resolvers.drops{chance=100, nb=4, {ego_chance=100} },
resolvers.drops{chance=100, nb=1, {defined="ORB_MANY_WAYS2"} },
resolvers.drops{chance=100, nb=1, {defined="ATHAME_WEST2"} },
resists = { [DamageType.ACID] = 100, },
resolvers.talents{
[Talents.T_THROW_BOMB]=4,
[Talents.T_CHANNEL_STAFF]=5,
[Talents.T_STAFF_MASTERY]=5,
[Talents.T_ALCHEMIST_PROTECTION]=5,
[Talents.T_SHOCKWAVE_BOMB]=4,
[Talents.T_HEAT]=4,
[Talents.T_BODY_OF_FIRE]=3,
[Talents.T_ACID_INFUSION]=5,
[Talents.T_STONE_TOUCH]=3,
},
resolvers.generic(function(self)
-- Make and wield some alchemist gems
local t = self:getTalentFromId(self.T_CREATE_ALCHEMIST_GEMS)
local gem = t.make_gem(self, t, "GEM_BLOODSTONE")
self:wearObject(gem, true, false)
end),
autolevel = "dexmage",
ai = "dumb_talented_simple", ai_state = {ai_target="target_player_radius", sense_radius=400, talent_in=1, ai_move="move_astar" },
on_die = function(self, who)
game.player:resolveSource():setQuestStatus("east-portal", engine.Quest.COMPLETED, "tannen-dead")
end,
}
newEntity{ define_as = "DROLEM",
type = "construct", subtype = "golem",
display = 'g', color=colors.GREEN,
desc = [[This is Tannen's construct, a #{bold}#HUGE#{normal}# golem in the rough shape of a dragon.
It is so huge that it blocks sight beyond it.]],
level_range = {35, nil}, exp_worth=2,
max_life = 600, life_rating = 13, fixed_rating = true,
-- Special, the golem is HUGE and blocks LOS
block_sight = true,
combat = { dam=10, atk=10, apr=0, dammod={str=1} },
resists = { [DamageType.ACID] = 100, },
body = { INVEN = 50, MAINHAND=1, OFFHAND=1, BODY=1, HEAD=1, },
instakill_immune = 1,
blind_immune = 1,
see_invisible = 80,
infravision = 20,
see_invisible = 100,
rank = 4,
size_category = 5,
move_others=true,
can_pass = {pass_wall=70},
resists = {all = 25, [DamageType.COLD] = 100, [DamageType.ACID] = 100},
resolvers.talents{
[Talents.T_MASSIVE_ARMOUR_TRAINING]=5,
[Talents.T_HEAVY_ARMOUR_TRAINING]=5,
[Talents.T_WEAPON_COMBAT]=7,
[Talents.T_POISON_BREATH]=6,
[Talents.T_WEAPONS_MASTERY]=11,
},
resolvers.drops{chance=100, nb=1, {defined="RESONATING_DIAMOND_WEST2"} },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, },
resolvers.equip{
{type="weapon", subtype="staff", defined="SARUMAN_TOP_HALF", autoreq=true},
{type="weapon", subtype="staff", defined="SARUMAN_BOTTOM_HALF", autoreq=true},
{type="weapon", subtype="greatsword", ego_chance=100, autoreq=true},
{type="armor", subtype="massive", ego_chance=100, autoreq=true},
{type="armor", subtype="head", ego_chance=100, autoreq=true},
},
resolvers.drops{chance=100, nb=2, {type="wand"} },
resolvers.talents{
[Talents.T_ICE_SHARDS]=5,
[Talents.T_FREEZE]=5,
[Talents.T_TIDAL_WAVE]=5,
[Talents.T_ICE_STORM]=5,
[Talents.T_UTTERCOLD]=8,
[Talents.T_FROZEN_GROUND]=5,
[Talents.T_SHATTER]=5,
[Talents.T_CORROSIVE_VAPOUR]=5,
[Talents.T_CURSE_OF_IMPOTENCE]=5,
[Talents.T_VIRULENT_DISEASE]=5,
},
autolevel = "warrior",
ai = "dumb_talented_simple", ai_state = { ai_target="target_player_radius", sense_radius=400, talent_in=4, },
energy = { mod=1 },
stats = { str=14, dex=12, mag=10, wil=67, con=12 },
autolevel = "caster",
ai = "dumb_talented_simple", ai_state = { talent_in=1, ai_move="move_astar" },
open_door = true,
blind_immune = 1,
fear_immune = 1,
poison_immune = 1,
disease_immune = 1,
stone_immune = 1,
see_invisible = 30,
no_breath = 1,
on_die = function(self, who)
require("engine.ui.Dialog"):simpleLongPopup("Back and there again", 'As the shade dissipates you see no sign of the text entitled "Inverted and Reverted Probabilistic Fields". You should go back to Tannen.', 400)
game.player:resolveSource():setQuestStatus("east-portal", engine.Quest.COMPLETED, "drolem-dead")
end,
}
......@@ -21,43 +21,81 @@ load("/data/general/objects/objects.lua")
local Stats = require "engine.interface.ActorStats"
newEntity{ base = "BASE_STAFF",
define_as = "SARUMAN_TOP_HALF", rarity=false,
slot_forbid = false,
twohanded = false,
name = "Saruman's Staff Top Half", unique=true,
desc = [[The top part of Saruman's broken staff.]],
require = { stat = { mag=35 }, },
cost = 500,
combat = {
dam = 35,
apr = 0,
physcrit = 1.5,
dammod = {mag=1.0},
},
wielder = {
combat_spellpower = 25,
combat_spellcrit = 5,
combat_mentalresist = 8,
inc_stats = { [Stats.STAT_WIL] = 5, },
},
newEntity{ base = "BASE_GEM",
define_as = "RESONATING_DIAMOND_WEST2",
name = "Resonating Diamond", color=colors.VIOLET, quest=true, unique="Resonating Diamond West2", identified=true,
on_drop = function(self, who)
if who == game.player then
game.logPlayer(who, "You cannot bring yourself to drop the %s", self:getName())
return true
end
end,
on_pickup = function(self, who)
if who == game.player then
game.player:resolveSource():setQuestStatus("east-portal", engine.Quest.COMPLETED, "diamon-back")
end
end,
}
newEntity{ define_as = "ATHAME_WEST2",
quest=true, unique="Blood-Runed Athame West2", identified=true,
type = "misc", subtype="misc",
unided_name = "athame",
name = "Blood-Runed Athame",
level_range = {50, 50},
display = "|", color=colors.VIOLET,
encumber = 1,
desc = [[An athame, covered in blood runes. It radiates power.]],
on_drop = function(self, who)
if who == game.player then
game.logPlayer(who, "You cannot bring yourself to drop the %s", self:getName())
return true
end
end,
on_pickup = function(self, who)
if who == game.player then
game.player:resolveSource():setQuestStatus("east-portal", engine.Quest.COMPLETED, "athame-back")
end
end,
}
newEntity{ base = "BASE_STAFF",
slot = "OFFHAND", slot_forbid = false,
twohanded = false, add_name=false,
define_as = "SARUMAN_BOTTOM_HALF", rarity=false,
name = "Saruman's Staff Bottom Half", unique=true,
desc = [[The bottom part of Saruman's broken staff.]],
require = { stat = { mag=35 }, },
cost = 500,
wielder = {
inc_stats = { [Stats.STAT_MAG] = 4, },
max_mana = 50,
combat_mentalresist = 8,
inc_damage={
[DamageType.COLD] = 20,
[DamageType.ACID] = 20,
},
-- The orb of many ways, allows usage of Farportals
newEntity{ define_as = "ORB_MANY_WAYS2",
unique = "Orb of Many Ways2", quest=true,
type = "jewelry", subtype="orb",
unided_name = "swirling orb",
name = "Orb of Many Ways",
level_range = {30, 30},
display = "*", color=colors.VIOLET, image = "object/pearl.png",
encumber = 1,
desc = [[The orb projects images of distance places, some that seem to not be of this world, switching rapidly.
If used near a portal it could probably activate it.]],
max_power = 30, power_regen = 1,
use_power = { name = "activate a portal", power = 10,
use = function(self, who)
self:identify(true)
local g = game.level.map(who.x, who.y, game.level.map.TERRAIN)
if g and g.orb_portal then
world:gainAchievement("SLIDERS", who:resolveSource())
who:useOrbPortal(g.orb_portal)
else
game.logPlayer(who, "There is no portal to activate here.")
end
end
},
on_drop = function(self, who)
if who == game.player then
game.logPlayer(who, "You cannot bring yourself to drop the %s", self:getName())
return true
end
end,
on_pickup = function(self, who)
if who == game.player then
game.player:resolveSource():setQuestStatus("east-portal", engine.Quest.COMPLETED, "orb-back")
end
end,
}
......@@ -23,7 +23,7 @@ return {
level_scheme = "player",
max_level = 4,
decay = {300, 800},
actor_adjust_level = function(zone, level, e) return 1 + zone.max_level - (zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2)) end,
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + (zone.max_level - level.level) + rng.range(-1,2) end,
level_adjust_level = function(zone, level) return zone.base_level + (zone.max_level - level.level) end,
width = 25, height = 25,
all_remembered = true,
......@@ -57,8 +57,8 @@ return {
levels =
{
[1] = { generator = { map = { map = "zones/tannen-tower-1" }, }, },
[2] = { generator = { map = { map = "zones/tannen-tower-2" }, }, },
[3] = { generator = { map = { map = "zones/tannen-tower-3" }, }, },
[2] = { generator = { map = { map = "zones/tannen-tower-2" }, actor = { nb_npc = {22, 22}, }, trap = { nb_trap = {6, 6} }, }, },
[3] = { generator = { map = { map = "zones/tannen-tower-3" }, actor = { nb_npc = {22, 22}, filters={{special_rarity="aquatic_rarity"}} }, trap = { nb_trap = {6, 6} }, }, },
[4] = { generator = { map = { map = "zones/tannen-tower-4" }, }, },
},
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment