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

the weaponsmith in minas tiriths has things to teach

git-svn-id: http://svn.net-core.org/repos/t-engine4@413 51575b47-30f0-44d4-a5cc-537603b46e54
parent 006ca3bb
No related branches found
No related tags found
No related merge requests found
......@@ -110,6 +110,7 @@ function _M:loaded()
if v ~= nil then
t[x + y * self.w] = v
self._map:setSeen(x, y, v)
self.changed = true
end
return t[x + y * self.w]
end
......@@ -118,6 +119,7 @@ function _M:loaded()
if v ~= nil then
t[x + y * self.w] = v
self._map:setRemember(x, y, v)
self.changed = true
end
return t[x + y * self.w]
end
......@@ -126,6 +128,7 @@ function _M:loaded()
if v ~= nil then
t[x + y * self.w] = v
self._map:setLite(x, y, v)
self.changed = true
end
return t[x + y * self.w]
end
......
......@@ -45,6 +45,14 @@ function _M:use()
self.changed = true
print("[CHAT] selected", a[1], a.action, a.jump)
if a.jump then
self.cur_id = a.jump
self:generateList()
self.sel = 1
self.scroll = 1
else
game:unregisterDialog(self)
end
if a.action then
local id = a.action(self.npc, self.player)
if id then
......@@ -55,14 +63,6 @@ function _M:use()
return
end
end
if a.jump then
self.cur_id = a.jump
self:generateList()
self.sel = 1
self.scroll = 1
else
game:unregisterDialog(self)
end
end
function _M:generateList()
......
......@@ -40,6 +40,7 @@ function _M:onSell(who, o, item, nb)
local price = o:getPrice() / 10
if price <= 0 then return end
who.money = who.money + price * nb
o:identify(true)
return nb
end
......
......@@ -48,3 +48,11 @@ Autolevel:registerScheme{ name = "warriormage", levelup = function(self)
learnStats(self, { self.STAT_STR, self.STAT_STR, self.STAT_DEX })
end
end}
Autolevel:registerScheme{ name = "snake", levelup = function(self)
if self.level % 2 == 0 then
learnStats(self, { self.STAT_CUN, self.STAT_DEX, self.STAT_CON })
else
learnStats(self, { self.STAT_CUN, self.STAT_DEX, self.STAT_STR })
end
end}
newChat{ id="welcome",
text = [[Welcome @playername@ to Minas Tirith traveler, please be quick my time is precious.]],
answers = {
{"Nothing, excuse me. Bye!"},
{"I have found this staff in my travels, it looks really old and powerful. I dare not use it.", jump="found_staff", cond=function(npc, player) return player:isQuestStatus("staff-absorption", engine.Quest.PENDING) and player:findInAllInventories("Staff of Absorption") end},
{"Nothing, excuse me. Bye!"},
}
}
......
newChat{ id="welcome",
text = [[Welcome @playername@ to my shop.]],
answers = {
{"Let me see your wares.", action=function(npc, player)
npc.store:loadup(game.level, game.zone)
npc.store:interact(player)
end},
{"I am looking for martial training.", jump="training"},
{"Sorry I have to go!"},
}
}
newChat{ id="training",
text = [[I can indeed give some martial training (talent type Technique/Combat-training) for a fee of 50 gold pieces if you do not already know it.]],
answers = {
{"Please train me!", action=function(npc, player)
game.logPlayer(player, "The smith spends some time with you, teaching you the basics of armour and weapons usage.")
player.money = player.money - 50
player:learnTalentType("technique/combat-training", true)
player.changed = true
end, cond=function(npc, player)
if player.money < 50 then return end
if player:knowTalentType("technique/combat-training") then return end
return true
end},
{"No thanks."},
}
}
return "welcome"
......@@ -13,7 +13,7 @@ quickEntity('^', {name='hills', display='^', color=colors.SLATE, image="terrain/
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"})
quickEntity('2', {show_tooltip=true, name="Armour Smith", display='2', color=colors.UMBER, resolvers.store("ARMOR"), image="terrain/wood_store_armor.png"})
quickEntity('3', {show_tooltip=true, name="Weapon Smith", display='3', color=colors.UMBER, resolvers.store("WEAPON"), image="terrain/wood_store_weapon.png"})
quickEntity('3', {show_tooltip=true, name="Weapon Smith", display='3', color=colors.UMBER, resolvers.store("WEAPON"), resolvers.chatfeature("minas-tirith-weapon-store"), image="terrain/wood_store_weapon.png"})
quickEntity('4', {show_tooltip=true, name="Alchemist", display='4', color=colors.LIGHT_BLUE, resolvers.store("POTION"), image="terrain/wood_store_potion.png"})
quickEntity('5', {show_tooltip=true, name="Scribe", display='5', color=colors.WHITE, resolvers.store("SCROLL"), image="terrain/wood_store_book.png"})
quickEntity('6', {show_tooltip=true, name="Closed store", display='6', color=colors.LIGHT_UMBER, block_move=true, block_sight=true, image="terrain/wood_store_closed.png"})
......
......@@ -50,7 +50,7 @@ return {
[[====.._...bbbb...._....hhhh__..........A..._.....mm..~.uuuuuu____........._........................]],
[[=====.._..uubb..._........._......h......._Btt...mm..~6uuuuu&&&u._........._.......................]],
[[====...__..ubbb._......hh.._.......hh...._.t^^^._mm..~..uuu&f&&&u._........._......................]],
[[=====..._.....__......hho.-_.2....1hh......._L...mm..~..uuuuuuuuu._........_.......................]],
[[=====..._.....__......hho.-_......1hh......._L...mm..~..uuuuuuuuu._........_.......................]],
[[======..==..=__....h....h..._.hh..ih....._..^^^._m...~..uuuuuuuuuu._........_......................]],
[[=============.....hhh......._.vvD.h......_.._.._mmm...~..uuuuuuuuu.._........_....................t]],
[[======........bb...h........._vvv.hh...._.._...mm.....~..uuuuuuuu...._......_....................tt]],
......
......@@ -11,7 +11,7 @@ return function(gen, id)
for i = 1, self.w do
for j = 1, self.h do
if hm.hmap[i][j] >= Heightmap.max * 5 / 6 then
gen.map.room_map[i-1+x][j-1+y].can_open = true
-- gen.map.room_map[i-1+x][j-1+y].can_open = true
gen.map(i-1+x, j-1+y, Map.TERRAIN, gen.grid_list[gen:resolve('#')])
else
gen.map.room_map[i-1+x][j-1+y].room = id
......
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 are an elf, one of the first born. Many of your kind, having grown weary of Middle Earth, have left for the immortal lands.
Yet some elves do not wish to leave this land they fought so hard for. In Mirkwood Forest, now called Eryn Lasgalen, the kingdom of Thranduil still thrives.
You lived a peaceful life deep in the forest for many years but lately you have grown restless and have 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 decided to venture into the old and wild places looking for ancient treasures 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.
You have come to a land called Rhudaur on the western side of the Misty Mountains, far away from your home in search of the ruined tower of Amon Sul. You have heard that the caverns below are infested with vermin and undead.
Close by, to the east are the Trollshaws another dangerous place - an old forest infested with trolls and other dangerous animals.
After days of travels you have found the ruined tower and entered the caves, what will you find there...
After days of travel you have found the tower and are about to enter the caves. What will you discover...
]]
......@@ -21,7 +21,7 @@ newEntity{ define_as = "MINOTAUR_MAZE",
max_stamina = 200,
stats = { str=25, dex=10, cun=8, mag=20, wil=20, con=20 },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, HEAD=1, },
equipment = resolvers.equip{
{type="weapon", subtype="battleaxe"},
{type="armor", subtype="head", defined="HELM_OF_HAMMERHAND"},
......
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