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

into texts

git-svn-id: http://svn.net-core.org/repos/t-engine4@381 51575b47-30f0-44d4-a5cc-537603b46e54
parent 19c8caaa
No related branches found
No related tags found
No related merge requests found
Showing
with 78 additions and 51 deletions
......@@ -90,8 +90,10 @@ function _M:newGame()
self:changeLevel(1, self.player.starting_zone)
self.player:resolve()
self.player:resolve(nil, true)
self.player:playerLevelup()
self.player:grantQuest(self.player.starting_quest)
self.player:playerLevelup(function()
self.player:grantQuest(self.player.starting_quest)
self:registerDialog(require("mod.dialogs.IntroDialog").new(self.player))
end)
end)
self:registerDialog(birth)
end
......
......@@ -289,12 +289,12 @@ function _M:playerUseItem(object, item)
)
end
function _M:playerLevelup()
function _M:playerLevelup(on_finish)
if self.unused_stats > 0 then
local ds = LevelupStatsDialog.new(self)
local ds = LevelupStatsDialog.new(self, on_finish)
game:registerDialog(ds)
else
local dt = LevelupTalentsDialog.new(self)
local dt = LevelupTalentsDialog.new(self, on_finish)
game:registerDialog(dt)
end
end
......
......@@ -31,6 +31,7 @@ newBirthDescriptor{
default_wilderness = {"wilderness/main", 39, 19},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "dwarf",
life_rating=12,
},
experience = 1.1,
......
......@@ -26,6 +26,7 @@ newBirthDescriptor{
default_wilderness = {"wilderness/main", 39, 19},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "elf",
},
experience = 1.05,
}
......
......@@ -5,29 +5,16 @@ newBirthDescriptor{
type = "race",
name = "Hobbit",
desc = {
"Hobbits, or halflings, are very good at ranged combat ",
"(especially with slings), throwing, and have good saving ",
"throws. They also are very good at searching, disarming, ",
"perception and stealth; so they make excellent rogues, but ",
"prefer to be called burglars. They are much weaker than ",
"humans, thus not as good at melee fighting, and also not ",
"capable of carrying as many objects. Halflings have fair ",
"infra-vision, so they can detect warm creatures at a ",
"distance. Hobbits have their dexterity sustained and in time ",
"they learn to cook a delicious meal from available ",
"ingredients. Their sturdy constitutions also allow them to ",
"resist the insidious poison of the ring-wraiths. Their feet ",
"are cover from the ankle down in brown hairy fur, preventing ",
"them from wearing boots and shoes. ",
"Hobbits, or halflings, are a race of very short stature, rarely exceeded four feet in height.",
"Most of them are happy to live a quiet life farming and gardening, but a few get an adventurous heart.",
"Hobbits are agile, lucky and resilient but lack in strength.",
},
descriptor_choices =
{
subrace =
{
__ALL__ = "never",
Harfoot = "allow",
Stoor = "allow",
Fallohide = "allow",
Hobbit = "allow",
},
},
stats = { str=-3, dex=3, con=1, cun=3, lck=5, },
......@@ -41,6 +28,7 @@ newBirthDescriptor{
default_wilderness = {"wilderness/main", 39, 19},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "hobbit",
},
}
......@@ -50,27 +38,10 @@ newBirthDescriptor{
newBirthDescriptor
{
type = "subrace",
name = "Harfoot",
desc = {
"An old but quiet race related to humans.",
"They are small and quite weak but good at many things.",
},
}
newBirthDescriptor
{
type = "subrace",
name = "Fallohide",
desc = {
"An old but quiet race related to humans.",
"They are small and quite weak but good at many things.",
},
}
newBirthDescriptor
{
type = "subrace",
name = "Stoor",
name = "Hobbit",
desc = {
"An old but quiet race related to humans.",
"They are small and quite weak but good at many things.",
"Hobbits, or halflings, are a race of very short stature, rarely exceeded four feet in height.",
"Most of them are happy to live a quiet life farming and gardening, but a few get an adventurous heart.",
"Hobbits are agile, lucky and resilient but lack in strength.",
},
}
......@@ -12,7 +12,7 @@ newBirthDescriptor{
subrace =
{
["Bree-man"] = "allow",
Dunadan = "allow",
["Dúnadan"] = "allow",
Rohirrim = "allow",
Beorning = "allow",
__ALL__ = "never",
......@@ -39,16 +39,16 @@ newBirthDescriptor
default_wilderness = {"wilderness/main", 39, 19},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "bree-man",
},
}
newBirthDescriptor
{
type = "subrace",
name = "Dunadan",
name = "Dúnadan",
desc = {
"The greatest of the Edain, humans in all respects but",
"stronger, smarter and wiser.",
"The greatest of the Edain, humans in all respects but stronger, smarter and wiser.",
"They posses the Gift of Kings which allows them to regenerate their wounds once in a while.",
},
stats = { str=1, cun=1, dex=1, wil=1 },
......@@ -61,6 +61,7 @@ newBirthDescriptor
default_wilderness = {"wilderness/main", 39, 19},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "dunadan",
},
}
--[[
......
return [[Welcome #LIGHT_GREEN#]]..name..[[#WHITE#.
You are a native of the town of Bree, a multicultural town that both men and hobbits call home.
Humans are the most common race of the land, and you are part of them. In an attempt to prove your worth you have decided to venture into the old and wild places of the world, looking for treasures of old and glory.
You have come to a land called Rhudaur, just east of Bree, in search of the ruined tower of Amon Sûl. You heard the caves below were infested by vermin and undeads.
Nearby to the east also lies the Trollshaws and other dangerous place, an old forest infested with trolls and all kinds of wild animals.
After days of travels you have found the ruined tower and entered the caves, what will you find there...
]]
return [[Welcome #LIGHT_GREEN#]]..name..[[#WHITE#.
You are a Dúnedain, one of the last descendant of the pround men of Númenor.
Hailing from a great line of greater men you have decided to prove your worth by venturing into the old and wild places of the world, looking for treasures of old and glory.
You have come to a northern land called Rhudaur, on the western steppes of the Misty Mountains in search of the ruined tower of Amon Sûl. You heard the caves below were infested by vermin and undeads.
Nearby to the east also lies the Trollshaws and other dangerous place, an old forest infested with trolls and all kinds of wild animals.
After days of travels you have found the ruined tower and entered the caves, what will you find there...
]]
return [[Welcome #LIGHT_GREEN#]]..name..[[#WHITE#.
You are a member of the pround race of the Dwarves.
Hailing from the dwarven kingdom under the Lonely Mountain you have decided to take the road and start a new life of aventuring.
You have decided to venture into the old and wild places of the world, looking for treasures of old and glory.
You have come to a land called Rhudaur, on the western steppes of the Misty Mountains, far away from your home, in search of the ruined tower of Amon Sûl. You heard the caves below were infested by vermin and undeads.
Nearby to the east also lies the Trollshaws and other dangerous place, an old forest infested with trolls and all kinds of wild animals.
After days of travels you have found the ruined tower and entered the caves, what will you find there...
]]
return [[Welcome #LIGHT_GREEN#]]..name..[[#WHITE#.
You are an elf, the first-born. Many of your kind having gone weary of Middle-earth and left for the immortal lands.
Yet some elves do no wish to leave this land they fought so hard for. In the Mirkwood forest, now called Eryn Lasgalen, the kingdom of Thranduil still thrives.
You lived a peaceful life deep in the forest for many hundred years but lately you have grown restless and decided to step into the world.
You have decided to venture into the old and wild places of the world, looking for treasures of old and glory.
You have come to a land called Rhudaur, on the western steppes of the Misty Mountains, far away from your home, in search of the ruined tower of Amon Sûl. You heard the caves below were infested by vermin and undeads.
Nearby to the east also lies the Trollshaws and other dangerous place, an old forest infested with trolls and all kinds of wild animals.
After days of travels you have found the ruined tower and entered the caves, what will you find there...
]]
return [[Welcome #LIGHT_GREEN#]]..name..[[#WHITE#.
You are a hobbit of the Shire. Most hobbits never leave the borders of their beloved Shire, even in this time of peace. Few know about the distant lands and fewer yet are willing to venture there.
You are one of those rare few, inpired by the stories of dragons, gold and treasures of Bilbo nearly two hundred years before, you have decided to venture into the old and wild places of the world, looking for treasures of old and glory.
You have come to a land called Rhudaur, east of the Shire, in search of the ruined tower of Amon Sûl. You heard the caves below were infested by vermin and undeads.
Nearby to the east also lies the Trollshaws and other dangerous place, an old forest infested with trolls and all kinds of wild animals.
After days of travels you have found the ruined tower and entered the caves, what will you find there...
]]
......@@ -4,7 +4,7 @@ local LevelupTalentsDialog = require "mod.dialogs.LevelupTalentsDialog"
module(..., package.seeall, class.inherit(engine.Dialog))
function _M:init(actor)
function _M:init(actor, on_finish)
self.actor = actor
self.actor_dup = actor:clone()
engine.Dialog.init(self, "Stats Levelup: "..actor.name, 500, 300)
......@@ -22,7 +22,7 @@ function _M:init(actor)
-- if talents to spend, do it now
if self.actor.unused_talents > 0 or self.actor.unused_talents_types > 0 then
local dt = LevelupTalentsDialog.new(self.actor)
local dt = LevelupTalentsDialog.new(self.actor, on_finish)
game:registerDialog(dt)
end
end,
......
......@@ -3,7 +3,7 @@ require "engine.Dialog"
module(..., package.seeall, class.inherit(engine.Dialog))
function _M:init(actor)
function _M:init(actor, on_finish)
self.actor = actor
self.actor_dup = actor:clone()
engine.Dialog.init(self, "Talents Levelup: "..actor.name, 800, 600)
......@@ -20,7 +20,7 @@ function _M:init(actor)
MOVE_LEFT = function() self:learn(false) self.changed = true end,
MOVE_RIGHT = function() self:learn(true) self.changed = true end,
ACCEPT = "EXIT",
EXIT = function() game:unregisterDialog(self) end,
EXIT = function() game:unregisterDialog(self) if on_finish then on_finish() end end,
})
self:mouseZones{
{ x=2, y=45, w=350, h=self.font_h*self.max, fct=function(button, x, y, xrel, yrel, tx, ty)
......
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