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

also teaches Shoot

git-svn-id: http://svn.net-core.org/repos/t-engine4@414 51575b47-30f0-44d4-a5cc-537603b46e54
parent 3bc2b6aa
No related branches found
No related tags found
No related merge requests found
......@@ -372,7 +372,7 @@ function _M:setupCommands()
self.key:addCommands{
[{"_d","ctrl"}] = function()
self:changeLevel(1, "town-minas-tirith")
if config.settings.tome.cheat then self:changeLevel(5, "tower-amon-sul") end
end,
}
self.key:addBinds
......@@ -504,7 +504,9 @@ function _M:setupCommands()
end,
-- Lua console
LUA_CONSOLE = function()
self:registerDialog(DebugConsole.new())
if config.settings.tome.cheat then
self:registerDialog(DebugConsole.new())
end
end,
-- Switch gfx modes
......@@ -572,7 +574,9 @@ function _M:setupMouse()
if button == "right" then
local tmx, tmy = self.level.map:getMouseTile(mx, my)
-- DEBUG
game.player:move(tmx, tmy, true)
if config.settings.tome.cheat then
game.player:move(tmx, tmy, true)
end
-- Move map around
elseif button == "left" and xrel and yrel then
derivx = derivx + xrel
......
......@@ -11,9 +11,9 @@ newChat{ id="welcome",
}
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.]],
text = [[I can indeed give some martial training (talent type Technique/Combat-training) for a fee of 50 gold pieces or the basic usage of bows and slings (Shoot talent) for 8 gold pieces.]],
answers = {
{"Please train me!", action=function(npc, player)
{"Please train me in generic weapons and armour usage.", 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)
......@@ -23,6 +23,16 @@ newChat{ id="training",
if player:knowTalentType("technique/combat-training") then return end
return true
end},
{"Please train me in the basic usage of bows and slings.", action=function(npc, player)
game.logPlayer(player, "The smith spends some time with you, teaching you the basics of bows and slings.")
player.money = player.money - 8
player:learnTalent(player.T_SHOOT, true)
player.changed = true
end, cond=function(npc, player)
if player.money < 8 then return end
if player:knowTalent(player.T_SHOOT) then return end
return true
end},
{"No thanks."},
}
}
......
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