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

Added lore to Last Hope

git-svn-id: http://svn.net-core.org/repos/t-engine4@1843 51575b47-30f0-44d4-a5cc-537603b46e54
parent 108bbbd8
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,9 @@ function _M:loadup(level, zone)
for i = 1, rng.range(s.min_fill, s.max_fill) - #inven do
local filter = rng.table(s.filters)
local e = zone:makeEntity(level, "object", filter, nil, true)
local e
if not filter.defined then e = zone:makeEntity(level, "object", filter, nil, true)
else e = zone:makeEntityByName(level, "object", filter.defined) end
if e and not e.not_in_stores then
if filter.id then e:identify(filter.id) end
self:addObject(inven, e)
......
......@@ -687,8 +687,9 @@ function _M:setupCommands()
end,
[{"_g","ctrl"}] = function()
if config.settings.tome.cheat then
local m = game.zone:makeEntityByName(game.level, "actor", "TEST")
game.zone:addEntity(game.level, m, "actor", game.player.x, game.player.y+1)
-- local m = game.zone:makeEntityByName(game.level, "actor", "TEST")
-- game.zone:addEntity(game.level, m, "actor", game.player.x, game.player.y+1)
self:changeLevel(1, "town-last-hope")
end
end,
}
......
......@@ -497,7 +497,7 @@ end
--- Called when trying to pickup
function _M:on_prepickup(who, idx)
if self.lore then
if who.player and self.lore then
game.level.map:removeObject(who.x, who.y, idx)
who:learnLore(self.lore)
return true
......
......@@ -107,7 +107,13 @@ function _M:doBuy(who, o, item, nb, store_dialog)
if nb then
Dialog:yesnoPopup("Buy", ("Buy %d %s for %0.2f gold"):format(nb, o:getName{do_color=true, no_count=true}, price), function(ok) if ok then
self:onBuy(who, o, item, nb, true)
self:transfer(self, who, item, nb)
-- Learn lore ?
if who.player and o.lore then
self:removeObject(self:getInven("INVEN"), item)
who:learnLore(o.lore)
else
self:transfer(self, who, item, nb)
end
self:onBuy(who, o, item, nb, false)
if store_dialog then store_dialog:updateStore() end
end end, "Buy", "Cancel")
......
......@@ -36,7 +36,7 @@ newEntity{
newEntity{
define_as = "BASE_LORE",
type = "scroll", subtype="lore",
type = "lore", subtype="lore",
unided_name = "scroll", id_by_type = true,
display = "?", color=colors.ANTIQUE_WHITE, image="object/scroll-lore.png",
encumber = 0.1,
......
......@@ -161,7 +161,7 @@ newEntity{
},
}
----------- Lost Merchant
----------- Last Hope
newEntity{
define_as = "LOST_MERCHANT",
name = "rare goods",
......@@ -179,3 +179,26 @@ newEntity{
},
},
}
newEntity{
define_as = "LAST_HOPE_LIBRARY",
name = "library",
display = '*', color=colors.LIGHT_RED,
store = {
purse = 5,
restock_after = 1000,
empty_before_restock = true,
buy_percent = 10,
sell_percent = 140,
min_fill = 40,
max_fill = 40,
filters = {
{id=true, defined="FOUNDATION_NOTE1"},
{id=true, defined="FOUNDATION_NOTE2"},
{id=true, defined="FOUNDATION_NOTE3"},
{id=true, defined="FOUNDATION_NOTE4"},
{id=true, defined="FOUNDATION_NOTE5"},
{id=true, defined="FOUNDATION_NOTE6"},
},
},
}
-- 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
--------------------------------------------------------------------------
-- Last Hope
--------------------------------------------------------------------------
newLore{
id = "last-hope-foundation-note-1",
category = "last hope",
name = "The Diaries of King Toknor the Brave",
lore = [[#{italic}#68th of Dusk, Year of Pyre 710#{normal}#
The orcish tribe have routed us. We have retreated to some Mardrop ruins and secured ourselves amongst the fortiments. I have just shy of 2,000 men under my banner, some of the best warriors I have ever served with, but we are simply no match for the numbers we face. Counting them is difficult, but I would put a minimum estimate at 10,000. The tribe has camped a league away - they seem to be waiting for reinforcements. This does not bode well...
I have sent messenger crows to all the kingdoms. I can but hope they send aid in time.]],
}
newLore{
id = "last-hope-foundation-note-2",
category = "last hope",
name = "The Diaries of King Toknor the Brave",
lore = [[#{italic}#25th of Haze, Year of Pyre 710#{normal}#
Five men tried deserting last night. Today I had them flogged in front of all the others. I have given warning that any future deserters shall be hanged. These are measures I do not like to take, but harsh times call for harsher discipline.
Our supplies are holding steady for now, but I fear they may not last. I've received word that it will take at least fifty days to muster a force that can save us. Alas, food may well be the least of our worries, for the orcs have begun to attack our strongholds. Thankfully we have had time to reinforce the existing structures. Indeed, little work was needed, for the foundations of this place are strong. My loremaster tells me it was abandoned following the Crimson Pox, but was once the capital of Mardrop. The men have taken a fondness to the place, and have named it "Last Hope". Though I normally discourage such romantic notions I cannot help but feel the same. These stone walls give strength to my heart - I feel we can fight through this.
Their attack has begun again. They seem to have mages now. Ah, it will be a long night...]],
}
newLore{
id = "last-hope-foundation-note-3",
category = "last hope",
name = "The Diaries of King Toknor the Brave",
lore = [[#{italic}#47th of Haze, Year of Pyre 710#{normal}#
Rations low. Men demoralised. Winterhaze wind is making conditions unbearable. The fortress is holding, but each night they pick off some of our troops. It is but a matter of time before we no longer have the strength to resist.
I can hear their blasted trumpets again. Accursed swine! We have no rest or sleep, not the slightest sojourn without their braying, howling, jeering, taunting, insufferable cantations! It is driving me from my wits! But I must remain strong... I must put on a brave face for the men. They are relying on me, and though the burden feels close to crushing me I must bear it with the dignity of a king.
It is getting dark again. Who will die this night? I am so very afraid... but I cannot show it...]],
}
newLore{
id = "last-hope-foundation-note-4",
category = "last hope",
name = "The Diaries of King Toknor the Brave",
lore = [[#{italic}#51st of Haze, Year of Pyre 710#{normal}#
Oh, happy days! Joyous retribution! From the jaws of defeat we have been saved, and never before have I felt such elation!
Last night as dusk approached, the orcish armies began to prepare a major attack. My men were ready, for I was determined that if they were to have our lives they would pay for them thrice over. But as the sun waned in the western sky I saw what looked like a rain of gold falling amongst the orcish troops and suddenly they were in disarray. Another flurry came and I saw that it were not gold, but bolts of steel reflected in the setting sun. "The halflings!" my scout shouted, and lo I saw then it was indeed a large army of halflings come upon the orc's flank.
The orcish army suddenly forgot about us, turning upon their new enemy. But foolish is any who ignores the wrath of a caged lion which sees its chance for vengeance! I led my men immediately into battle, taking the enemy swiftly from the rear, and throwing their organisation into madness. When the halfling army came upon their flank it was a massacre, and we drove them mercilessly towards the southern lake. There upon the shores we beat them to the last number, and their blood stained the water a horrific black.
Our victory sealed I immediately met with the halfling leader, and found it to be no less than the princess Mirvenia! Truly words cannot express my joy when I saw her face flushed red in the last embers of the setting sun. I almost felt... no, I should not think such things.]],
}
newLore{
id = "last-hope-foundation-note-5",
category = "last hope",
name = "The Diaries of King Toknor the Brave",
lore = [[#{italic}#2nd of Allure, Year of Pyre 711#{normal}#
We have solidified the defences at Last Hope and received more troops from all of the kingdoms. Our tactical position near the sea is proving an excellent base for further attacks on the orcs. I hope to expand our facilities here much further. I am drawing up an alliance now with the other leaders, for only together can we hope to beat this terrible threat to all our kingdoms.
Minerva has been key to the discussions and the plans. She is a tactical genius, and I am constantly amazed by her wealth of knowledge and skills. There is an odd woman that accompanies her though, with long silver hair and a shadowy robe. One of my men swears he saw her riding into battle in a blaze of fire, burning all the orcs before her. The idea of a spellweaver in our midst is unsettling, but Minerva says I should trust her. And if Minerva says so then I must believe her.
She is a remarkable force for good, Minerva, popular with all the troops. I feel my normal iron rule smoothed by her presence. Too long have I led the cold life of a soldier... alone...
Ah, the beating of my heart cannot be silenced. I must speak to Minerva, and tell her how I feel... I only hope she shares some inkling of my emotion.]],
}
newLore{
id = "last-hope-foundation-note-6",
category = "last hope",
name = "The Diaries of King Toknor the Brave",
lore = [[#{italic}#6th of Flare, Year of Pyre 713#{normal}#
Why is it only in times of darkness I turn to my journal? Today has been the darkest day in over two years, but it could have been darker still.
Mirvenia's convoy was attacked by a rogue band of orcs. Though the brutes were repelled she was hurt in the conflict, and her labour brought on early. She lay before the halls of death for many hours. It is only thanks to the skill of her people's healers that she and the baby survived.
The baby... our baby. My son! Mirvenia is still recovering, but the boy seems hale as any freshly-born child. But still I worry... How I wish that he were born into a more perfect world. How I worry for my wife and child in this age of suffering. I want to make a new age for them, free from such threats as almost took away the woman I love. I want to give my son the chance to reign in an era of peace.
Too long have we been content with repelling orcish raids and pushing back small tribes. Last Hope is now a gleaming city, and a focal point for all the armies of the west. Now is the time for us to drive forward and root out every orcish colony on the continent. I will not rest until Maj'Eyal is free from their vile influence, till every accursed brood is burned to ashes and every pig-spawn orc is cast from existence. I shall end this terrible Age of Pyre and usher in a new Age of Ascendency! This I do solemnly swear.]],
}
newLore{
id = "last-hope-tolak-statue",
category = "last hope",
name = "All Hail King Tolak the Fair!",
lore = [[Twice blessed is he of the union of King Toknor of the humans and Queen Mirvenia of the halflings! Praise his glory!
By royal decree it is under absolute conditions forbidden to show racial prejudice against humans or halflings. There shall be no preference of price or service, and no discrimination of trade or business or employment. No halfling shall be named fur-toes, midget or shortbum, and no human shall be named lanklegs, cloudhead or stumpfoot.
The penalty for disobedience shall be flogging. Intolerance will not be tolerated!]],
}
......@@ -24,5 +24,6 @@ load("/data/lore/infinite-dungeon.lua")
load("/data/lore/blighted-ruins.lua")
load("/data/lore/tol-falas.lua")
load("/data/lore/fun.lua")
load("/data/lore/last-hope.lua")
load("/data/lore/sunwall.lua")
load("/data/lore/spellhunt.lua")
......@@ -46,7 +46,7 @@ quickEntity('9', {show_tooltip=true, name="Closed store", display='9', color=col
quickEntity('0', {show_tooltip=true, name="Closed store", display='0', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"})
quickEntity('a', {show_tooltip=true, name="Closed store", display='*', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"})
quickEntity('b', {show_tooltip=true, name="Hall of the King", display='*', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"})
quickEntity('c', {show_tooltip=true, name="Closed store", display='*', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"})
quickEntity('c', {show_tooltip=true, name="Library", display='*', color=colors.LIGHT_RED, resolvers.store("LAST_HOPE_LIBRARY"), image="terrain/wood_store_book.png"})
quickEntity('d', {show_tooltip=true, name="Closed store", display='*', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"})
quickEntity('e', {show_tooltip=true, name="Rare goods", display='*', color=colors.AQUAMARINE, resolvers.store("LOST_MERCHANT"), resolvers.chatfeature("last-hope-lost-merchant"), image="terrain/wood_store_weapon.png"})
quickEntity('g', {show_tooltip=true, name="Rich merchant", display='*', color=colors.AQUAMARINE, resolvers.chatfeature("last-hope-melinda-father"), image="terrain/wood_store_closed.png"})
......@@ -54,6 +54,8 @@ quickEntity('g', {show_tooltip=true, name="Rich merchant", display='*', color=co
quickEntity('E', {show_tooltip=true, name="The Elder", display='*', color=colors.VIOLET, resolvers.chatfeature("last-hope-elder"), image="terrain/wood_store_closed.png"})
quickEntity('f', {show_tooltip=true, name="Tannen's Tower", display='*', color=colors.VIOLET, resolvers.chatfeature("tannen"), image="terrain/wood_store_closed.png"})
quickEntity('@', {show_tooltip=true, name="King Tolak Statue", display='@', color=colors.LIGHT_BLUE, block_move=function(self, x, y, e, act, couldpass) if e and e.player and act then e:learnLore("last-hope-tolak-statue") end return true end})
startx = 95
starty = 45
......@@ -75,7 +77,7 @@ return {
[[#^^^^----###---##--ssS--OOOOO#--ssss--OOOOOO--##--- ]],
[[#^^--------###----ssSs#--OOO-##-##g##--OOOOOO--##--- ---- ]],
[[#^ ----------##--#sts#--OOOO--#---------OOOOOO--#------ -------- ]],
[[#^^-----------###-#s#--OOOOOO-##-#sssss--OOOOOO,#####--- ----------- ]],
[[#^^-----------###-#sc--OOOOOO-##-#sssss--OOOOOO,#####--- ----------- ]],
[[#^^-------------##-#--OOO-OOO--#--ssssss--OOOOO,,,,,#---- ---ssssssss--- ]],
[[#^^--------------#---OOO-t-OOO-##-#SStSS--OOOOOO,##,#---------ssssssss---- ]],
[[#^^^--#----------##-OOO-sssOOO--#--ssssss-OOOOOO--#,#####-----SStSSSSS----- ]],
......@@ -88,7 +90,7 @@ return {
[[#^^############-OOO--##-StSSS-OOO-#-ssss--OOOOO--T-#----,,##---ssssssss-O-------- ]],
[[#^^^#########---OOO---#-sssss-OOO-#-ssss--OOOOOO---#,,,,,##----SSSSStSS-O--------- ]],
[[#^^#########----OOO---#-###6#-OOO-#-##e#---OOOOOO--#######-----ssssssss-O---------- ]],
[[#^^^#######-----OOO---#-------OOO-#---------OOOOOOOOOOOOOOOOO--########-O----------- ]],
[[#^^^#######---@-OOO---#-------OOO-#---------OOOOOOOOOOOOOOOOO--########-O----------- ]],
[[#^^#######bOOOOOOOO-^^^^^^^^^^MMM^^^^^^^^^^^^OOOOOOOOOOOOOOOOOOOOOOOOOOOO----------- ]],
[[#^^#######bOOOOOOO############III############^OOOOOOOOOOOOOOOOOOOOOOOOOOOOO--------- ]],
[[#^ #######bOOOOOOO############III############^OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO--------- ]],
......
......@@ -18,3 +18,15 @@
-- darkgod@te4.org
load("/data/general/objects/objects.lua")
for i = 1, 6 do
newEntity{ base = "BASE_LORE",
define_as = "FOUNDATION_NOTE"..i,
subtype = "last hope foundation", unique=true, no_unique_lore=true,
name = "The Diaries of King Toknor the Brave ("..i..")", lore="last-hope-foundation-note-"..i,
desc = [[A part of the history of Last Hope, and king Toknor the Brave.]],
rarity = false,
encumberance = 0,
cost = 2,
}
end
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