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

Stores now stock much better quality loot and will update with the player...

Stores now stock much better quality loot and will update with the player level (within limits of the towns)


git-svn-id: http://svn.net-core.org/repos/t-engine4@2702 51575b47-30f0-44d4-a5cc-537603b46e54
parent a591211b
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,9 @@ newEntity{
empty_before_restock = true,
min_fill = 10,
max_fill = 20,
filters = {
{type="armor", id=true},
},
filters = function()
return {type="armor", id=true, ego_chance={ego_chance=100, properties=rng.percent(game.player.level) and {"greater_ego"}}}
end,
},
}
......@@ -43,10 +43,9 @@ newEntity{
empty_before_restock = true,
min_fill = 10,
max_fill = 20,
filters = {
{type="weapon", id=true},
{type="ammo", id=true},
},
filters = function()
return {type="weapon", id=true, ego_chance={ego_chance=100, properties=rng.percent(game.player.level) and {"greater_ego"}}}
end,
},
}
......@@ -58,8 +57,8 @@ newEntity{
purse = 10,
restock_after = 1000,
empty_before_restock = true,
min_fill = 2,
max_fill = 4,
min_fill = 4,
max_fill = 7,
filters = {
{type="scroll", subtype="infusion", id=true},
},
......@@ -74,8 +73,8 @@ newEntity{
purse = 10,
restock_after = 1000,
empty_before_restock = true,
min_fill = 2,
max_fill = 4,
min_fill = 4,
max_fill = 7,
filters = {
{type="scroll", subtype="rune", id=true},
},
......@@ -90,8 +89,8 @@ newEntity{
purse = 30,
restock_after = 1000,
empty_before_restock = true,
min_fill = 40,
max_fill = 60,
min_fill = 20,
max_fill = 30,
filters = {
{type="gem", id=true},
},
......@@ -112,12 +111,14 @@ newEntity{
empty_before_restock = true,
min_fill = 15,
max_fill = 25,
filters = {
{type="weapon", subtype="staff", id=true},
{type="weapon", subtype="staff", id=true},
{type="weapon", subtype="staff", id=true},
{type="wand", subtype="wand", id=true},
},
filters = function()
return rng.table{
{type="weapon", subtype="staff", id=true, ego_chance={ego_chance=100, properties=rng.percent(game.player.level) and {"greater_ego"}}},
{type="weapon", subtype="staff", id=true, ego_chance={ego_chance=100, properties=rng.percent(game.player.level) and {"greater_ego"}}},
{type="weapon", subtype="staff", id=true, ego_chance={ego_chance=100, properties=rng.percent(game.player.level) and {"greater_ego"}}},
{type="wand", subtype="wand", id=true, ego_chance={ego_chance=100, properties=rng.percent(game.player.level) and {"greater_ego"}}},
}
end,
},
}
......@@ -134,6 +135,14 @@ newEntity{
filters = {
{type="jewelry", id=true},
},
filters = function()
return rng.table{
{type="jewelry", subtype="ring", id=true, ego_chance=-1000},
{type="jewelry", id=true, ego_chance={ego_chance=100, properties=rng.percent(game.player.level) and {"greater_ego"}}},
{type="jewelry", id=true, ego_chance={ego_chance=100, properties=rng.percent(game.player.level) and {"greater_ego"}}},
{type="jewelry", id=true, ego_chance={ego_chance=100, properties=rng.percent(game.player.level) and {"greater_ego"}}},
}
end,
},
}
......@@ -145,8 +154,8 @@ newEntity{
purse = 10,
restock_after = 1000,
empty_before_restock = true,
min_fill = 2,
max_fill = 4,
min_fill = 5,
max_fill = 9,
filters = {
{type="scroll", subtype="rune", id=true},
},
......
-- ToME - Tales of Maj'Eyal
-- 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
load("/data/general/traps/store.lua")
newEntity{ base = "BASE_STORE", define_as = "ARMOR_STORE",
name="Armoury",
display='2', color=colors.UMBER,
resolvers.store("ZIGUR_ARMOR"),
}
newEntity{ base = "BASE_STORE", define_as = "WEAPON_STORE",
name="Weapon Store",
display='3', color=colors.UMBER,
resolvers.store("ZIGUR_WEAPON"),
}
newEntity{ base = "BASE_STORE", define_as = "LIBRARY",
name="Library",
display='5', color=colors.RED,
resolvers.store("ZIGUR_LIBRARY"),
}
newEntity{ base = "BASE_STORE", define_as = "TRAINER",
name="Trainer",
display='1', color=colors.UMBER,
resolvers.chatfeature("zigur-trainer", "zigur"),
}
......@@ -19,8 +19,10 @@
return {
name = "Angolwen",
level_range = {20, 50},
level_scheme = "player",
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
level_range = {20, 20},
update_base_level_on_enter = true,
max_level = 1,
width = 50, height = 50,
decay = {300, 800, only={object=true}, no_respawn=true},
......
......@@ -19,8 +19,10 @@
return {
name = "Derth",
level_range = {1, 1},
level_range = {1, 15},
level_scheme = "player",
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
update_base_level_on_enter = true,
max_level = 1,
width = 196, height = 80,
decay = {300, 800, only={object=true}, no_respawn=true},
......
......@@ -19,8 +19,10 @@
return {
name = "Elvala",
level_range = {1, 1},
level_range = {1, 15},
level_scheme = "player",
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
update_base_level_on_enter = true,
max_level = 1,
width = 196, height = 80,
decay = {300, 800, only={object=true}, no_respawn=true},
......
......@@ -19,7 +19,10 @@
return {
name = "Gates of Morning",
level_range = {33, 33},
level_range = {33, 50},
level_scheme = "player",
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
update_base_level_on_enter = true,
max_level = 1,
width = 196, height = 80,
decay = {300, 800, only={object=true}, no_respawn=true},
......
......@@ -19,7 +19,10 @@
return {
name = "Last Hope",
level_range = {15, 15},
level_range = {15, 35},
level_scheme = "player",
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
update_base_level_on_enter = true,
max_level = 1,
width = 196, height = 80,
decay = {300, 800, only={object=true}, no_respawn=true},
......
......@@ -57,7 +57,7 @@ function resolvers.calc.equip(t, e)
e:wearObject(o, true, false)
-- Do not drop it unless it is an ego or better
if not o.egoed and not o.unique then o.no_drop = true print(" * "..o.name.." => no drop") end
if not o.unique then o.no_drop = true print(" * "..o.name.." => no drop") end
if filter.force_drop then o.no_drop = nil end
game.zone:addEntity(game.level, o, "object")
......
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