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

Lsot merchant quest works more like normal zones (code changes)

git-svn-id: http://svn.net-core.org/repos/t-engine4@4347 51575b47-30f0-44d4-a5cc-537603b46e54
parent c0842927
No related branches found
No related tags found
No related merge requests found
......@@ -53,60 +53,7 @@ newEntity{
if not ok then
game.logPlayer(who, "#LIGHT_BLUE#You carefully get away without making a sound.")
else
local zone = engine.Zone.new("ambush", {
name = "Unknown tunnels",
level_range = {8, 18},
level_scheme = "player",
max_level = 2,
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
width = 30, height = 30,
no_worldport = true,
reload_lists = false,
ambient_music = "a_lomos_del_dragon_blanco.ogg",
generator = {
map = {
class = "engine.generator.map.TileSet",
tileset = {"3x3/base", "3x3/tunnel", "3x3/windy_tunnel"},
tunnel_chance = 100,
['.'] = "OLD_FLOOR",
['#'] = "OLD_WALL",
['+'] = "DOOR",
["'"] = "DOOR",
up = "OLD_FLOOR",
down = "DOWN",
},
actor = { class = "engine.generator.actor.Random",nb_npc = {5, 7}, },
trap = { class = "engine.generator.trap.Random", nb_trap = {3, 3}, },
},
npc_list = mod.class.NPC:loadList("/data/general/npcs/thieve.lua"),
grid_list = mod.class.Grid:loadList("/data/general/grids/basic.lua"),
object_list = mod.class.Object:loadList("/data/general/objects/objects-maj-eyal.lua"),
trap_list = mod.class.Trap:loadList("/data/general/traps/alarm.lua"),
levels = { [2] = {
all_lited=true, all_remembered=true,
generator = {
map = { class = "engine.generator.map.Static", map = "quests/lost-merchant",},
actor = {
nb_npc = {0, 0},
},
},
post_process = function(level)
for uid, e in pairs(level.entities) do
if e.faction ~= "victim" then
e.faction="assassin-lair"
e.cant_be_moved = true
end
end
end,
}, },
on_leave = function(lev, old_lev, newzone)
if not newzone then return end
game.player:grantQuest("lost-merchant")
game.player:hasQuest("lost-merchant"):leave_zone(game.player)
end,
})
game:changeLevel(1, zone)
game:changeLevel(1, "thieves-tunnels")
game.logPlayer(who, "#LIGHT_RED#You carefully open the trap door and enter the underground tunnels...")
game.logPlayer(who, "#LIGHT_RED#As you enter you notice the trap door has no visible handle on the inside. You are stuck here!")
who:grantQuest("lost-merchant")
......
......@@ -24,79 +24,9 @@ defineTile('+', "DOOR")
defineTile('a', "FLOOR", nil, "THIEF_ASSASSIN")
defineTile('p', "FLOOR", nil, "THIEF_BANDIT")
defineTile('P', "FLOOR", nil, mod.class.NPC.new{
type = "humanoid", subtype = "human",
display = "p", color=colors.VIOLET,
name = "Assassin Lord",
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
cant_be_moved = true,
defineTile('P', "FLOOR", nil, "ASSASSIN_LORD")
resolvers.drops{chance=20, nb=1, {} },
resolvers.equip{
{type="weapon", subtype="dagger", autoreq=true, force_drop=true, tome_drops="boss"},
{type="weapon", subtype="dagger", autoreq=true, force_drop=true, tome_drops="boss"},
{type="armor", subtype="light", autoreq=true, force_drop=true, tome_drops="boss"}
},
resolvers.drops{chance=100, nb=2, {type="money"} },
rank = 4,
size_category = 3,
open_door = true,
autolevel = "rogue",
ai = "dumb_talented_simple", ai_state = { talent_in=5, },
stats = { str=8, dex=15, mag=6, cun=15, con=7 },
resolvers.tmasteries{ ["cunning/stealth"]=1.3, },
desc = [[He is the leader of a gang of bandits, watch out for his men.]],
level_range = {8, 50}, exp_worth = 1,
rarity = 12,
combat_armor = 5, combat_def = 7,
max_life = resolvers.rngavg(90,100), life_rating = 14,
resolvers.talents{
[engine.interface.ActorTalents.T_LETHALITY]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_STEALTH]={base=4, every=4, max=10},
[engine.interface.ActorTalents.T_VILE_POISONS]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_VENOMOUS_STRIKE]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_SHADOWSTEP]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_SHADOW_VEIL]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_AMBUSCADE]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_EMPOWER_POISONS]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_HIDE_IN_PLAIN_SIGHT]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_DIRTY_FIGHTING]={base=3, every=4, max=10},
},
stamina_regen = 5,
mana_regen = 6,
can_talk = "assassin-lord",
on_die = function(self, who)
game.level.map(self.x, self.y, game.level.map.TERRAIN, game.zone.grid_list.UP_WILDERNESS)
game.logSeen(who, "As the assassin dies the magical veil protecting the stairs out vanishes.")
for uid, e in pairs(game.level.entities) do
if e.is_merchant and not e.dead then
e.can_talk = "lost-merchant"
break
end
end
end,
is_assassin_lord = true,
})
defineTile('@', "FLOOR", nil, mod.class.NPC.new{
type = "humanoid", subtype = "human",
display = "@", color=colors.UMBER,
name = "Lost Merchant",
size_category = 3,
ai = "simple",
faction = "victim",
can_talk = "lost-merchant",
is_merchant = true,
cant_be_moved = true,
})
defineTile('@', "FLOOR", nil, "MERCHANT")
startx = 2
starty = 10
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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
load("/data/general/grids/basic.lua")
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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
load("/data/general/npcs/thieve.lua")
local Talents = require("engine.interface.ActorTalents")
newEntity{ define_as = "ASSASSIN_LORD",
type = "humanoid", subtype = "human",
display = "p", color=colors.VIOLET,
name = "Assassin Lord",
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
cant_be_moved = true,
resolvers.drops{chance=20, nb=1, {} },
resolvers.equip{
{type="weapon", subtype="dagger", autoreq=true, force_drop=true, tome_drops="boss"},
{type="weapon", subtype="dagger", autoreq=true, force_drop=true, tome_drops="boss"},
{type="armor", subtype="light", autoreq=true, force_drop=true, tome_drops="boss"}
},
resolvers.drops{chance=100, nb=2, {type="money"} },
rank = 4,
size_category = 3,
open_door = true,
autolevel = "rogue",
ai = "dumb_talented_simple", ai_state = { talent_in=5, },
stats = { str=8, dex=15, mag=6, cun=15, con=7 },
resolvers.tmasteries{ ["cunning/stealth"]=1.3, },
desc = [[He is the leader of a gang of bandits, watch out for his men.]],
level_range = {8, 50}, exp_worth = 1,
rarity = 12,
combat_armor = 5, combat_def = 7,
max_life = resolvers.rngavg(90,100), life_rating = 14,
resolvers.talents{
[engine.interface.ActorTalents.T_LETHALITY]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_STEALTH]={base=4, every=4, max=10},
[engine.interface.ActorTalents.T_VILE_POISONS]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_VENOMOUS_STRIKE]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_SHADOWSTEP]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_SHADOW_VEIL]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_AMBUSCADE]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_EMPOWER_POISONS]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_HIDE_IN_PLAIN_SIGHT]={base=3, every=4, max=10},
[engine.interface.ActorTalents.T_DIRTY_FIGHTING]={base=3, every=4, max=10},
},
stamina_regen = 5,
mana_regen = 6,
can_talk = "assassin-lord",
on_die = function(self, who)
game.level.map(self.x, self.y, game.level.map.TERRAIN, game.zone.grid_list.UP_WILDERNESS)
game.logSeen(who, "As the assassin dies the magical veil protecting the stairs out vanishes.")
for uid, e in pairs(game.level.entities) do
if e.is_merchant and not e.dead then
e.can_talk = "lost-merchant"
break
end
end
end,
is_assassin_lord = true,
}
newEntity{ define_as = "MERCHANT",
type = "humanoid", subtype = "human",
display = "@", color=colors.UMBER,
name = "Lost Merchant",
size_category = 3,
ai = "simple",
faction = "victim",
can_talk = "lost-merchant",
is_merchant = true,
cant_be_moved = true,
}
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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
load("/data/general/objects/objects-maj-eyal.lua")
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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
load("/data/general/traps/alarm.lua")
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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 {
name = "Unknown tunnels",
level_range = {8, 18},
level_scheme = "player",
max_level = 2,
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
width = 30, height = 30,
no_worldport = true,
ambient_music = "a_lomos_del_dragon_blanco.ogg",
generator = {
map = {
class = "engine.generator.map.TileSet",
tileset = {"3x3/base", "3x3/tunnel", "3x3/windy_tunnel"},
tunnel_chance = 100,
['.'] = "OLD_FLOOR",
['#'] = "OLD_WALL",
['+'] = "DOOR",
["'"] = "DOOR",
up = "OLD_FLOOR",
down = "DOWN",
},
actor = { class = "engine.generator.actor.Random",nb_npc = {5, 7}, },
trap = { class = "engine.generator.trap.Random", nb_trap = {3, 3}, },
},
levels = { [2] = {
all_lited=true, all_remembered=true,
generator = {
map = { class = "engine.generator.map.Static", map = "quests/lost-merchant",},
actor = { nb_npc = {0, 0} },
},
post_process = function(level)
for uid, e in pairs(level.entities) do
if e.faction ~= "victim" then
e.faction="assassin-lair"
e.cant_be_moved = true
end
end
end,
}, },
on_leave = function(lev, old_lev, newzone)
if not newzone then return end
game.player:grantQuest("lost-merchant")
game.player:hasQuest("lost-merchant"):leave_zone(game.player)
end,
}
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