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

tutorials

git-svn-id: http://svn.net-core.org/repos/t-engine4@1317 51575b47-30f0-44d4-a5cc-537603b46e54
parent 588b0e39
No related branches found
No related tags found
No related merge requests found
......@@ -579,7 +579,7 @@ function _M:newLevel(level_data, lev, old_lev, game)
-- Add the entities we are told to
for i = 0, map.w - 1 do for j = 0, map.h - 1 do
if map.room_map[i][j].add_entities then
if map.room_map[i][j] and map.room_map[i][j].add_entities then
for z = 1, #map.room_map[i][j].add_entities do
local ae = map.room_map[i][j].add_entities[z]
self:addEntity(level, ae[2], ae[1], i, j)
......
......@@ -32,14 +32,11 @@ newBirthDescriptor{
},
},
copy = {
max_life = 120,
max_life = 100,
life_rating = 12,
mana_regen = 0.2,
life_regen = 1,
mana_rating = 7,
resolvers.generic(function(e)
e.hotkey[10] = {"inventory", "potion of lesser mana"}
end),
},
}
......@@ -65,11 +62,7 @@ newBirthDescriptor{
resolvers.equip{ id=true,
{type="weapon", subtype="longsword", name="iron longsword", autoreq=true},
{type="armor", subtype="shield", name="iron shield", autoreq=true},
{type="armor", subtype="heavy", name="iron mail armour", autoreq=true}
},
resolvers.inventory{ id=true,
{type="potion", subtype="potion", name="potion of lesser mana", ego_chance=-1000},
{type="potion", subtype="potion", name="potion of lesser mana", ego_chance=-1000},
-- {type="armor", subtype="heavy", name="iron mail armour", autoreq=true}
},
},
}
......@@ -70,6 +70,7 @@ newBirthDescriptor{
newBirthDescriptor{
type = "difficulty",
name = "Tutorial",
selection_default = not profile.mod.allow_build.tutorial_done,
desc =
{
"Tutorial mode, start with a simplified character and discover the game in a simple quest.",
......@@ -95,7 +96,6 @@ newBirthDescriptor{
newBirthDescriptor{
type = "difficulty",
name = "Easy",
selection_default = true,
desc =
{
"Easy game setting",
......
......@@ -20,22 +20,24 @@
startx = 49
starty = 24
defineTile("'", "DEEP_WATER", nil, {random_filter={type="immovable", subtype="jelly", max_ood=2}}, nil)
defineTile("#", "DEEP_WATER", nil, {random_filter={type="immovable", subtype="jelly", max_ood=2}}, nil)
defineTile("$", "DEEP_WATER", {random_filter={name="potion of lesser healing"}}, nil, nil)
defineTile("&", {"TREE","TREE2","TREE3","TREE4","TREE5","TREE6","TREE7","TREE8","TREE9","TREE10","TREE11","TREE12","TREE13","TREE14","TREE15","TREE16","TREE17","TREE18","TREE19","TREE20"}, nil, nil, nil)
defineTile("j", "GRASS", nil, {random_filter={type="immovable", subtype="jelly", max_ood=2}}, nil)
defineTile("~", "DEEP_WATER", nil, nil, nil)
defineTile("s", "GRASS", nil, "TUTORIAL_NPC_MAGE", nil)
defineTile(",", "GRASS", nil, nil, nil)
defineTile("S", "GRASS", nil, {random_filter={type="animal", subtype="snake", max_ood=2}}, nil)
defineTile("1", "GRASS", nil, nil, "TUTORIAL_MELEE")
defineTile("2", "GRASS", {random_filter={name="potion of lesser healing"}}, nil, "TUTORIAL_OBJECTS")
defineTile("3", "GRASS", nil, nil, "TUTORIAL_TALENTS")
defineTile("4", "GRASS", nil, nil, "TUTORIAL_LEVELUP")
defineTile("S", "GRASS", nil, {random_filter={type="animal", subtype="snake", max_ood=2}}, nil)
defineTile("~", "DEEP_WATER", nil, nil, nil)
defineTile("5", "DEEP_WATER", nil, nil, "TUTORIAL_TERRAIN")
defineTile("6", "GRASS", nil, nil, "TUTORIAL_TACTICS1")
defineTile("7", "GRASS", nil, nil, "TUTORIAL_TACTICS2")
defineTile("?", nil, nil, nil, nil)
defineTile("j", "GRASS", nil, {random_filter={type="immovable", subtype="jelly", max_ood=2}}, nil)
defineTile(" ", "DEEP_WATER", nil, {random_filter={type="immovable", subtype="jelly", max_ood=2}}, nil)
defineTile("!", "GRASS", {random_filter={name="potion of lesser healing"}}, nil, nil)
defineTile('"', "DEEP_WATER", nil, {random_filter={type="immovable", subtype="jelly", max_ood=2}}, nil)
defineTile("#", "DEEP_WATER", {random_filter={name="potion of lesser healing"}}, nil, nil)
return [[
&&&&&&&&&&&&&&&&&&&&&&&&&&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&&&&&&&&&,&&&&&&&&&&&&~&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&#&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&]]
-- ToME - Tales of Middle-Earth
-- 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
return [[You have found a nest of snakes!
As you fought the previous ones you know they are not very strong individualy but if you let them surround you you might be in trouble!
A basic tactic in ToME4 is to try to never get surrounded, do not hesitate to backtrack a bit to get into a safer spot.
#GOLD#Always control the fight.#WHITE#
Now take a few steps backwards to only have to fight one snake at a time and you should survive. Remember to use your talents and maybe a potion of healing if need be.
]]
-- ToME - Tales of Middle-Earth
-- 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
return [[A skeleton mage just fired a spell at you.
While the fireworks look nice you do not want to let them repeat the operation too much.
When under the fire of archers or spell casters always try to break line of sight with them, they will be forced to come to you. (Unless they are smart)
#GOLD#Take cover: Never let them get a clean shot!#WHITE#
Now take cover and wait for the skeleton.
]]
......@@ -17,8 +17,11 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
game.player:learnTalent(game.player.T_SHIELD_PUMMEL, true, 1)
game.player:learnTalent(game.player.T_SHIELD_WALL, true, 1)
if not game.player.tutored_levels then
game.player:learnTalent(game.player.T_SHIELD_PUMMEL, true, 1)
game.player:learnTalent(game.player.T_SHIELD_WALL, true, 1)
game.player.tutored_levels = true
end
return [[You now possess the Shield Pummel and Shield Wall talents.
Talents show up in the lower right part of the screen with their assigned hotkey.
......
-- ToME - Tales of Middle-Earth
-- 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
return [[During your adventures you will encounter a variety of terrains you can pass on: grass, sand, water, lava, ...
Some of those terrains have inate penalities or tricks, you will have to learn them and how to deal with them.
You are about to enter a pond of water, you will not be able to breath inside. When you are in an area where you can not breathe an "Air" counter will appear on the left side of the screen. Do not let it reach zero or you will die.
Now go to the other side of the pond.
]]
......@@ -18,3 +18,20 @@
-- darkgod@te4.org
load("/data/general/npcs/all.lua", rarity(0))
local Talents = require("engine.interface.ActorTalents")
newEntity{ base = "BASE_NPC_SKELETON", define_as="TUTORIAL_NPC_MAGE",
name = "skeleton mage", color=colors.LIGHT_RED,
level_range = {1, nil}, exp_worth = 1,
max_life = resolvers.rngavg(50,60),
max_mana = resolvers.rngavg(70,80),
combat_armor = 3, combat_def = 1,
stats = { str=10, dex=12, cun=14, mag=14, con=10 },
resolvers.talents{ [Talents.T_MANATHRUST]=3 },
resolvers.equip{ {type="weapon", subtype="staff", autoreq=true} },
autolevel = "caster",
ai = "dumb_talented_simple", ai_state = { talent_in=1, },
}
......@@ -26,8 +26,11 @@ newEntity{ define_as = "TRAP_TUTORIAL",
display = ' ', color=colors.WHITE,
message = false,
triggered = function(self, x, y, who)
local d = require("engine.dialogs.ShowText").new("Tutorial: "..self.name, "tutorial/"..self.text)
game:registerDialog(d)
if who.player then
game.player:runStop()
local d = require("engine.dialogs.ShowText").new("Tutorial: "..self.name, "tutorial/"..self.text)
game:registerDialog(d)
end
return false, false
end
}
......@@ -56,3 +59,18 @@ newEntity{ base = "TRAP_TUTORIAL", define_as = "TUTORIAL_LEVELUP",
name = "Experience and Levels",
text = "levelup",
}
newEntity{ base = "TRAP_TUTORIAL", define_as = "TUTORIAL_TERRAIN",
name = "Different terrains",
text = "terrain",
}
newEntity{ base = "TRAP_TUTORIAL", define_as = "TUTORIAL_TACTICS1",
name = "Basic tactic: Do not get surrounded",
text = "tactics1",
}
newEntity{ base = "TRAP_TUTORIAL", define_as = "TUTORIAL_TACTICS2",
name = "Basic tactic: Take cover",
text = "tactics2",
}
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