Skip to content
Snippets Groups Projects
Commit 9af63260 authored by dg's avatar dg
Browse files

mount doom quest

git-svn-id: http://svn.net-core.org/repos/t-engine4@817 51575b47-30f0-44d4-a5cc-537603b46e54
parent e2ee83f0
No related branches found
No related tags found
No related merge requests found
......@@ -211,7 +211,7 @@ function _M:makeEntityByName(level, type, name)
local e
if type == "actor" then e = self.npc_list[name]
elseif type == "object" then e = self.object_list[name]
elseif type == "grid" then e = self.grid_list[name]
elseif type == "grid" or type == "terrain" then e = self.grid_list[name]
elseif type == "trap" then e = self.trap_list[name]
end
if not e then return nil end
......@@ -319,7 +319,7 @@ function _M:addEntity(level, e, typ, x, y)
elseif typ == "trap" then
if x and y then level.map(x, y, Map.TRAP, e) end
e:added()
elseif typ == "terrain" then
elseif typ == "terrain" or typ == "grid" then
if x and y then level.map(x, y, Map.TERRAIN, e) end
end
e:check("addedToLevel", level, x, y)
......
......@@ -19,23 +19,25 @@
-- CSV export
local src = [[
,Enemies,Undead,Reunited Kingdom,Shire,Lonely Mountain,Eryn Lasgalen,Angolwen,Tol Falas,,Water lair|H,Assassin lair|H,,Sunwall|H,Orc Pride,,Sandworm Burrowers
Enemies,,,,,,,,,,,,,,,,
Undead,-1,,,,,,,,,,,,,,,
Reunited Kingdom,-1,,,,,,,,,,,,,,,
Shire,-1,,1,,,,,,,,,,,,,
Lonely Mountain,-1,,0.5,1,,,,,,,,,,,,
Eryn Lasgalen,-1,,0.5,1,0.3,,,,,,,,,,,
Angolwen,-1,,,,,,,,,,,,,,,
Tol Falas,,-1,-1,-1,-1,-1,-1,,,,,,,,,
,,,,,,,,,,,,,,,,
Water lair|H,-1,,,,,,,,,,,,,,,
Assassin lair|H,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
Sunwall|H,-1,,,,,,0,-1,,,-1,,,,,
Orc Pride,,-1,-1,-1,-1,-1,-1,-1,,,,,-1,,,
,,,,,,,,,,,,,,,,
Sandworm Burrowers,,,,,,,,,,,,,,,,
,Enemies,Undead,Reunited Kingdom,Shire,Lonely Mountain,Eryn Lasgalen,Angolwen,Tol Falas,,Water lair|H,Assassin lair|H,,Sunwall|H,Orc Pride,,Sandworm Burrowers,,Blue Wizards
Enemies,,,,,,,,,,,,,,,,,,
Undead,-1,,,,,,,,,,,,,,,,,
Reunited Kingdom,-1,,,,,,,,,,,,,,,,,
Shire,-1,,1,,,,,,,,,,,,,,,
Lonely Mountain,-1,,0.5,1,,,,,,,,,,,,,,
Eryn Lasgalen,-1,,0.5,1,0.3,,,,,,,,,,,,,
Angolwen,-1,,,,,,,,,,,,,,,,,
Tol Falas,,-1,-1,-1,-1,-1,-1,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
Water lair|H,-1,,,,,,,,,,,,,,,,,
Assassin lair|H,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
Sunwall|H,-1,,,,,,,-1,,,-1,,,,,,,
Orc Pride,,-1,-1,-1,-1,-1,-1,-1,,,,,-1,,,,,
,,,,,,,,,,,,,,,,,,
Sandworm Burrowers,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
Blue Wizards,,-1,-1,-1,-1,-1,-1,-1,,,,,-1,1,,,,
]]
local facts = {}
......
......@@ -38,7 +38,7 @@ newEntity{
energy = { mod=1 },
stats = { str=10, dex=8, mag=6, con=16 },
resists = { [DamageType.PHYSICAL] = 10, [DamageType.FIRE] = 100, },
resists = { [DamageType.PHYSICAL] = 10, [DamageType.FIRE] = 100, [DamageType.COLD] = -30, },
no_breath = 1,
poison_immune = 1,
......
......@@ -25,6 +25,9 @@ defineTile('p', "FLOOR", nil, "SUN_PALADIN_DEFENDER")
defineTile('@', "FLOOR", nil, "SUN_PALADIN_DEFENDER_RODMOUR")
defineTile('o', "FLOOR", nil, "URUK-HAI_ATTACK")
defineTile('1', "LAVA_FLOOR", nil, "ALATAR")
defineTile('2', "LAVA_FLOOR", nil, "PALLANDO")
subGenerator{
x = 0, y = 23, w = 12, h = 401,
generator = "mod.class.generator.map.MountDoom",
......@@ -486,16 +489,16 @@ return [[
~~~~~'''~~~~
~~~~~'''~~~~
~~~~~'''~~~~
~~~~~'#'~~~~
~~~~~#'#~~~~
~~~~~'#'~~~~
~~~~~'''~~~~
~~~~~'''~~~~
~~~~~'''~~~~
~~~~~'''~~~~
~~~~~'''~~~~
~~~~~'''~~~~
~~~~~'''~~~~
~~~~~'''~~~~
~~~~~'''~~~~
~~~~~'''~~~~
~~~~~1'2~~~~
~~~~~~~~~~~~
~~~~~~~~~~~~
~~~~~~~~~~~~
......
-- 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
-- Ruysh mount doom
name = "The Doom of the World!"
desc = function(self, who)
local desc = {}
desc[#desc+1] = "You were sent to Mount Doom, in the ancient land of Mordor, where the One Ring was once forged by Sauron and destroyed by Frodo Baggins."
desc[#desc+1] = "This place is still full of the power of the ring and the Blue Wizard intend to absorb this power using the Staff of Absorption!"
desc[#desc+1] = "Whatever their plan may be, they must be stopped at all cost."
desc[#desc+1] = "The volcano is attacked by orcs, a few Sun Paladins made it there with you, they will hold the line at the cost of their lives to buy you some time."
desc[#desc+1] = "Honor their sacrifice, do not let the Blue Wizards finish their work!"
if self:isCompleted("not-stopped") then
desc[#desc+1] = ""
desc[#desc+1] = "You arrived too late, the place has been drained of its power and the blue wizards have left."
desc[#desc+1] = "Use the portal to go back to the Far East, you *MUST* stop them, no matter the cost."
elseif self:isCompleted("stopped") then
desc[#desc+1] = ""
desc[#desc+1] = "You arrived in time and interrupted the ritual, the blue wizards have departed."
desc[#desc+1] = "Use the portal to go back to the Far East, you *MUST* stop them, no matter the cost."
end
return table.concat(desc, "\n")
end
start_fyrk = function(self)
game.zone.on_turn = nil
game.level.turn_counter = nil
local alatar, pallando
for uid, e in pairs(game.level.entities) do
if e.define_as == "ALATAR" then alatar = e
elseif e.define_as == "PALLANDO" then pallando = e end
end
if alatar then game.level:removeEntity(alatar) alatar.dead = true end
if pallando then game.level:removeEntity(pallando) pallando.dead = true end
local portal = game.zone:makeEntityByName(game.level, "grid", "FAR_EAST_PORTAL")
game.zone:addEntity(game.level, portal, "grid", 6, 455)
local fyrk = game.zone:makeEntityByName(game.level, "actor", "FYRK")
game.zone:addEntity(game.level, fyrk, "actor", 6, 455)
game.logPlayer(game.player, "#VIOLET#The Blue Wizards flee through a portal, as you prepare to follow them a huge faeros appears to block the way.")
game.player:setQuestStatus("mount-doom", engine.Quest.DONE)
end
......@@ -43,3 +43,22 @@ newEntity{
does_block_move = true,
shader = "lava",
}
newEntity{
define_as = "FAR_EAST_PORTAL",
name = "Farportal: the Far East",
display = '&', color_r=255, color_g=0, color_b=220, back_color=colors.VIOLET,
notice = true,
always_remember = true,
show_tooltip = true,
desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use.]],
orb_portal = {
change_level = 1,
change_zone = "wilderness-arda-fareast",
change_wilderness = {
x = 9, y = 5,
},
message = "#VIOLET#You enter the swirling portal and in the blink of an eye you are back to the far east.",
},
}
......@@ -153,3 +153,137 @@ newEntity{ base = "BASE_NPC_ORC_ATTACKER", define_as = "URUK-HAI_ATTACK",
game.level.nb_attackers = game.level.nb_attackers - 1
end,
}
newEntity{
define_as = "ALATAR",
type = "humanoid", subtype = "istari",
name = "Alatar the Blue",
display = "@", color=colors.AQUAMARINE,
faction = "blue-wizards",
desc = [[Lost to the memory of the West, the Blue Wizards have setup in the Far East, slowly growing corrupt. Now they must be stopped.]],
level_range = {70, 70}, exp_worth = 15,
max_life = 1000, life_rating = 36, fixed_rating = true,
max_mana = 10000,
mana_regen = 10,
rank = 5,
size_category = 3,
stats = { str=40, dex=60, cun=60, mag=30, con=40 },
inc_damage = {all=-70},
invulnerable = 1,
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
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=10, {ego_chance=100} },
resolvers.talents{
[Talents.T_FLAME]=5,
[Talents.T_FREEZE]=5,
[Talents.T_LIGHTNING]=5,
[Talents.T_MANATHRUST]=5,
[Talents.T_INFERNO]=5,
[Talents.T_FLAMESHOCK]=5,
[Talents.T_STONE_SKIN]=5,
[Talents.T_STRIKE]=5,
[Talents.T_HEAL]=5,
[Talents.T_REGENERATION]=5,
[Talents.T_ILLUMINATE]=5,
[Talents.T_QUICKEN_SPELLS]=5,
[Talents.T_SPELL_SHAPING]=5,
[Talents.T_ARCANE_POWER]=5,
[Talents.T_METAFLOW]=5,
[Talents.T_PHASE_DOOR]=5,
[Talents.T_ESSENCE_OF_SPEED]=5,
},
autolevel = "caster",
ai = "dumb_talented_simple", ai_state = { talent_in=1, ai_move="move_astar" },
on_acquire_target = function(self, who)
self:doEmote("Damn you, you only postpone your death! Fyrk!", 60)
game.player:hasQuest("mount-doom"):start_fyrk()
game.player:hasQuest("mount-doom"):setStatus(engine.Quest.COMPLETED, "stopped")
end,
}
newEntity{
define_as = "PALLANDO",
type = "humanoid", subtype = "istari",
name = "Pallando the Blue",
display = "@", color=colors.LIGHT_BLUE,
faction = "blue-wizards",
desc = [[Lost to the memory of the West, the Blue Wizards have setup in the Far East, slowly growing corrupt. Now they must be stopped.]],
level_range = {70, 70}, exp_worth = 15,
max_life = 1000, life_rating = 36, fixed_rating = true,
max_mana = 10000,
mana_regen = 10,
rank = 5,
size_category = 3,
stats = { str=40, dex=60, cun=60, mag=30, con=40 },
inc_damage = {all=-70},
invulnerable = 1,
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
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=10, {ego_chance=100} },
resolvers.talents{
[Talents.T_FLAME]=5,
[Talents.T_FREEZE]=5,
[Talents.T_LIGHTNING]=5,
[Talents.T_MANATHRUST]=5,
[Talents.T_INFERNO]=5,
[Talents.T_FLAMESHOCK]=5,
[Talents.T_STONE_SKIN]=5,
[Talents.T_STRIKE]=5,
[Talents.T_HEAL]=5,
[Talents.T_REGENERATION]=5,
[Talents.T_ILLUMINATE]=5,
[Talents.T_QUICKEN_SPELLS]=5,
[Talents.T_SPELL_SHAPING]=5,
[Talents.T_ARCANE_POWER]=5,
[Talents.T_METAFLOW]=5,
[Talents.T_PHASE_DOOR]=5,
[Talents.T_ESSENCE_OF_SPEED]=5,
},
autolevel = "caster",
ai = "dumb_talented_simple", ai_state = { talent_in=1, ai_move="move_astar" },
}
newEntity{ base = "BASE_NPC_FAEROS", define_as = "FYRK",
name = "Fyrk, Faeros High Guard", color=colors.VIOLET,
desc = [[Faeros are highly intelligent fire elementals, rarely seen outside volcanos they are probably not native to this world.
This one looks even nastier and looks toward you with what seems to be disdain. Flames swirly all around him.]],
level_range = {35, nil}, exp_worth = 2,
rank = 5,
max_life = resolvers.rngavg(300,400), life_rating = 20, fixed_rating = true,
combat_armor = 0, combat_def = 20,
on_melee_hit = { [DamageType.FIRE] = resolvers.mbonus(30, 10), },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, NECK=1 },
resolvers.equip{
{type="jewelry", subtype="amulet", defined="FIERY_CHOKER"},
},
resolvers.talents{
[Talents.T_FLAME]=4,
[Talents.T_FIERY_HANDS]=5,
[Talents.T_FLAMESHOCK]=5,
[Talents.T_INFERNO]=5,
[Talents.T_KNOCKBACK]=5,
[Talents.T_STUN]=2,
},
blind_immune = 1,
stun_immune = 1,
}
......@@ -19,29 +19,25 @@
load("/data/general/objects/objects.lua")
-- Artifact, droped (and used!) by the Shade of Angmar
newEntity{ base = "BASE_STAFF",
define_as = "STAFF_ANGMAR", rarity=false,
name = "Angmar's Fall", unique=true,
desc = [[Made from the bones of of many creatures this staff glows with power. You can feel its evilness as you touch it.]],
require = { stat = { mag=25 }, },
cost = 5,
combat = {
dam = 10,
apr = 0,
physcrit = 1.5,
dammod = {mag=1.1},
},
local Stats = require"engine.interface.ActorStats"
newEntity{ base = "BASE_AMULET",
define_as = "FIERY_CHOKER", rarity=false,
name = "Fiery Choker", unique=true,
desc = [[A choker made of pure flame, forever shifting patterns around the neck of its wearer. Its fire seems to not harm the wearer.]],
cost = 50,
wielder = {
see_invisible = 2,
inc_stats = { [Stats.STAT_MAG] = 5, [Stats.STAT_WIL] = 4, [Stats.STAT_CUN] = 3 },
combat_spellpower = 7,
combat_spellcrit = 8,
resists = {
[DamageType.FIRE] = 20,
[DamageType.COLD] = -20,
},
inc_damage={
[DamageType.FIRE] = 4,
[DamageType.COLD] = 4,
[DamageType.ACID] = 4,
[DamageType.LIGHTNING] = 4,
[DamageType.BLIGHT] = 4,
[DamageType.FIRE] = 10,
[DamageType.COLD] = -10,
},
blind_immune = 1,
},
}
......@@ -51,8 +51,20 @@ return {
post_process = function(level)
level.turn_counter = 700 * 10
end,
on_enter = function(lev, old_lev, newzone)
if newzone then
game.player:grantQuest("mount-doom")
end
end,
on_turn = function(self)
require("mod.class.generator.actor.MountDoom").new(self, game.level.map, game.level, {}):tick()
game.level.turn_counter = game.level.turn_counter - 1
game.player.changed = true
if game.level.turn_counter < 0 then
game.player:hasQuest("mount-doom"):start_fyrk()
game.player:hasQuest("mount-doom"):setStatus(engine.Quest.COMPLETED, "not-stopped")
end
end,
}
......@@ -60,6 +60,7 @@ newEntity{ base = "BASE_AMULET",
life_regen = 3,
size_category = 3,
rank = 3,
infravision = 20,
resolvers.tmasteries{ ["technique/other"]=0.5, ["spell/phantasm"]=0.8, },
......
No preview for this file type
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