Skip to content
Snippets Groups Projects
Commit 250a12d4 authored by dg's avatar dg
Browse files

Ardhungol is now a side quest

git-svn-id: http://svn.net-core.org/repos/t-engine4@1789 51575b47-30f0-44d4-a5cc-537603b46e54
parent e0728687
No related branches found
No related tags found
No related merge requests found
-- ToME - Tales of Maj'Eyal
-- 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 the monstrous spider fell you see something.. moving in her belly until it explodes! A tall black man steps out of the spewed guts, surrounded by a golden light.*#WHITE#
By the sun! I thought I would never again see a friendly face!
Thank you, I am Rashim, and I am in your debt.
]],
answers = {
{"I have been sent by your wife, she was worried for you.", jump="leave"},
}
}
newChat{ id="leave",
text = [[Ah my dear heart!
Well now that I am free I will create a portal to the Gates of Morning, I think I saw enough spiders for the rest of my life.]],
answers = {
{"Lead the way!", action=function(npc, player) player:hasQuest("spydric-infestation"):portal_back(player) end},
}
}
return "welcome"
-- ToME - Tales of Maj'Eyal
-- 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
if not game.player:hasQuest("spydric-infestation") then
newChat{ id="welcome",
text = [[I have heard you are a great hero of the west? Could you help me please?]],
answers = {
{"Maybe, what is it about?", jump="quest", cond=function(npc, player) return not player:hasQuest("spydric-infestation") end},
{"I have got enough problems sorry."},
}
}
else
newChat{ id="welcome",
text = [[Welcome back @playername@.]],
answers = {
{"I have found your husband, I take it he made it home safely?", jump="done", cond=function(npc, player) return player:isQuestStatus("spydric-infestation", engine.Quest.COMPLETED) end},
{"I got to go, bye."},
}
}
end
newChat{ id="quest",
text = [[My husband, Rashim, is a sun paladin, he was sent to clear the spider lair of ardhungol to the north of this town.
It has been three days now, he should be back by now. I have a feeling something terrible has happened to him, please find him.
He should have a magical stone given by the Anorithil to create a portal back here, yet he did not use it!]],
answers = {
{"I will see if I can find him.", action=function(npc, player) player:grantQuest("spydric-infestation") end},
{"Spiders? Eww sorry but he is probably dead now."},
}
}
newChat{ id="done",
text = [[Yes yes he did! He said he would have died if not for you.]],
answers = {
{"It was nothing.", action=function(npc, player)
player:setQuestStatus("spydric-infestation", engine.Quest.DONE)
world:gainAchievement("SPYDRIC_INFESTATION", game.player)
game:setAllowedBuild("divine")
game:setAllowedBuild("divine_sun_paladin", true)
end},
}
}
return "welcome"
......@@ -54,8 +54,6 @@ They roam the lands freely, ever assaulting us.
player:setQuestStatus("strange-new-world", engine.Quest.DONE)
npc:move(46, 27, true)
npc.can_talk = "gates-of-morning-main"
game:setAllowedBuild("divine")
game:setAllowedBuild("divine_sun_paladin", true)
end},
}
}
......
......@@ -45,6 +45,17 @@ defineTile('j', "GRASS", nil, mod.class.NPC.new{
can_quest = true,
})
defineTile('s', "FLOOR", nil, mod.class.NPC.new{
type = "humanoid", subtype = "human",
display = "p", color=colors.GOLD,
name = "Melnela",
size_category = 3, rank = 2,
ai = "simple",
faction = "sunwall",
can_talk = "ardhungol-start",
can_quest = true,
})
quickEntity('1', {show_tooltip=true, name="Closed store", display='1', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"}, {no_teleport=true})
quickEntity('2', {show_tooltip=true, name="Armour Smith", display='2', color=colors.UMBER, resolvers.store("ARMOR"), image="terrain/wood_store_armor.png"}, {no_teleport=true})
quickEntity('3', {show_tooltip=true, name="Weapon Smith", display='3', color=colors.UMBER, resolvers.store("WEAPON"), image="terrain/wood_store_weapon.png"}, {no_teleport=true})
......@@ -80,7 +91,7 @@ MMMMMM O MMMM
MMMMMM ##### O MMMM
MMMMMM ###### O MMMMM
MMMMM #####3OOO OO ### MMMMMM
MMMMM ###### OOOO O ### MMMMMM
MMMMM ###### OOOO s O ### MMMMMM
MMMMM ##### OOOOO O #e# MMMMMM
MMMMM OOOO O O MMMMMM
MMMMM OOOO O MMMMM
......
......@@ -20,11 +20,11 @@
name = "Eight legs of wonder"
desc = function(self, who)
local desc = {}
if not self:isCompleted() then
desc[#desc+1] = "Enter the caverns of Ardhungol and clear the source of the spider infestation there."
if not self:isCompleted() and not self:isEnded() then
desc[#desc+1] = "Enter the caverns of Ardhungol and look for sun paladin Rashim."
desc[#desc+1] = "But be careful, those are not small spiders..."
else
desc[#desc+1] = "#LIGHT_GREEN#You have killed Ungolë in Ardhungol, return to High Sun Paladin Aeryn."
desc[#desc+1] = "#LIGHT_GREEN#You have killed Ungolë in Ardhungol and saved the sun paladin."
end
return table.concat(desc, "\n")
end
......@@ -42,5 +42,21 @@ on_grant = function(self, who)
local level = game.memory_levels["wilderness-1"]
local spot = level:pickSpot{type="zone-pop", subtype="ardhungol"}
game.zone:addEntity(level, g, "terrain", spot.x, spot.y)
game.logPlayer(game.player, "High Sun Paladin Aeryn marks the location of Ardhungol on your map.")
game.logPlayer(game.player, "She marks the location of Ardhungol on your map.")
end
portal_back = function(self, who)
who:setQuestStatus(self.id, engine.Quest.COMPLETED)
-- Reveal entrance
local g = mod.class.Grid.new{
show_tooltip=true, always_remember = true,
name="Portal back to the Gates of Morning",
display='>', color=colors.GOLD,
notice = true,
change_level=1, change_zone="town-gates-of-morning"
}
g:resolve() g:resolve(nil, true)
game.zone:addEntity(game.level, g, "terrain", who.x, who.y)
game.logPlayer(who, "A portal appears right under you and Rashim rushes through.")
end
......@@ -43,6 +43,7 @@ newEntity{ define_as = "UNGOLE", base = "BASE_NPC_SPIDER",
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
resolvers.drops{chance=100, nb=5, {ego_chance=100} },
resolvers.drops{chance=100, nb=1, {type="wand", subtype="wand", defined="ROD_SPYDRIC_POISON"} },
resolvers.drops{chance=100, nb=1, {unique=true} },
resolvers.talents{
[Talents.T_KNOCKBACK]=4,
......@@ -59,6 +60,8 @@ newEntity{ define_as = "UNGOLE", base = "BASE_NPC_SPIDER",
ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_astar", },
on_die = function(self, who)
game.player:resolveSource():setQuestStatus("spydric-infestation", engine.Quest.COMPLETED)
local Chat = require"engine.Chat"
local chat = Chat.new("ardhungol-end", {name="Sun Paladin Rashim"}, game.player:resolveSource())
chat:invoke()
end,
}
......@@ -22,6 +22,7 @@ load("/data/general/objects/lore/sunwall.lua")
newEntity{ base = "BASE_WAND",
define_as = "ROD_SPYDRIC_POISON",
unided_name = "poison dripping wand",
name = "Rod of Spydric Poison", color=colors.LIGHT_GREEN, unique=true,
desc = [[This rod carved out of a giant spider fang continuously drips venom.]],
cost = 50,
......
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