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

Adventurer parties that wander the worldmap have been busy slaying stuff, they...

Adventurer parties that wander the worldmap have been busy slaying stuff, they can now have ingredients for the alchemists quest


git-svn-id: http://svn.net-core.org/repos/t-engine4@3456 51575b47-30f0-44d4-a5cc-537603b46e54
parent a76155b8
No related branches found
No related tags found
No related merge requests found
...@@ -1305,6 +1305,16 @@ function _M:createRandomBoss(base, data) ...@@ -1305,6 +1305,16 @@ function _M:createRandomBoss(base, data)
b[#b+1] = resolvers.drops{chance=100, nb=data.loot_quantity or 3, {tome_drops=data.loot_quality or "boss"} } b[#b+1] = resolvers.drops{chance=100, nb=data.loot_quantity or 3, {tome_drops=data.loot_quality or "boss"} }
if not data.no_loot_randart then b[#b+1] = resolvers.drop_randart{} end if not data.no_loot_randart then b[#b+1] = resolvers.drop_randart{} end
-- On die
if data.on_die then
b.rng_boss_on_die = b.on_die
b.rng_boss_on_die_custom = data.on_die
b.on_die = function(self, src)
self:check("rng_boss_on_die_custom", src)
self:check("rng_boss_on_die", src)
end
end
------------------------------------------------------------ ------------------------------------------------------------
-- Apply talents from classes -- Apply talents from classes
------------------------------------------------------------ ------------------------------------------------------------
......
...@@ -85,7 +85,7 @@ newEntity{ ...@@ -85,7 +85,7 @@ newEntity{
display = '@', color = colors.UMBER, display = '@', color = colors.UMBER,
level_range = {14, nil}, level_range = {14, nil},
sight = 1, sight = 1,
rarity = 12, rarity = 1,
unit_power = 14, unit_power = 14,
ai = "world_hostile", ai_state = {chase_distance=3}, ai = "world_hostile", ai_state = {chase_distance=3},
on_encounter = { on_encounter = {
...@@ -100,6 +100,15 @@ newEntity{ ...@@ -100,6 +100,15 @@ newEntity{
loot_quality = "store", loot_quality = "store",
loot_quantity = 1, loot_quantity = 1,
no_loot_randart = true, no_loot_randart = true,
on_die = function(self, src) -- When they die they have a chance to drop an alchemist ingredient
local q = game.player:hasQuest("brotherhood-of-alchemists")
if q and rng.percent(40) then
local ing = rng.table(q.needed_ingredients)
if ing then
q:need_part(src, ing.define_as, self)
end
end
end
}}} }}}
}, },
} }
...@@ -213,12 +213,12 @@ winner_is = function(self, player, alchemist_num) ...@@ -213,12 +213,12 @@ winner_is = function(self, player, alchemist_num)
end end
--list of object definitions used to randomly generate ingredients for the elixirs in the table e in the recipes function. --list of object definitions used to randomly generate ingredients for the elixirs in the table e in the recipes function.
local monster_parts = { "TROLL_INTESTINE", "SKELETON_MAGE_SKULL", "RITCH_STINGER", "ORC_HEART", "NAGA_TONGUE", "GREATER_DEMON_BILE", "BONE_GOLEM_DUST", "FROST_ANT_STINGER", "MINOTAUR_NOSE", monster_parts = { "TROLL_INTESTINE", "SKELETON_MAGE_SKULL", "RITCH_STINGER", "ORC_HEART", "NAGA_TONGUE", "GREATER_DEMON_BILE", "BONE_GOLEM_DUST", "FROST_ANT_STINGER", "MINOTAUR_NOSE",
"ELDER_VAMPIRE_BLOOD", "MULTIHUED_WYRM_SCALE", "SPIDER_SPINNERET", "HONEY_TREE_ROOT", "BLOATED_HORROR_HEART", "ELECTRIC_EEL_TAIL", "SQUID_INK", "BEAR_PAW", "ICE_WYRM_TOOTH", "ELDER_VAMPIRE_BLOOD", "MULTIHUED_WYRM_SCALE", "SPIDER_SPINNERET", "HONEY_TREE_ROOT", "BLOATED_HORROR_HEART", "ELECTRIC_EEL_TAIL", "SQUID_INK", "BEAR_PAW", "ICE_WYRM_TOOTH",
"RED_CRYSTAL_SHARD", "FIRE_WYRM_SALIVA", "GHOUL_FLESH", "MUMMY_BONE", "SANDWORM_TOOTH", "BLACK_MAMBA_HEAD", "SNOW_GIANT_KIDNEY", "STORM_WYRM_CLAW", "GREEN_WORM", "RED_CRYSTAL_SHARD", "FIRE_WYRM_SALIVA", "GHOUL_FLESH", "MUMMY_BONE", "SANDWORM_TOOTH", "BLACK_MAMBA_HEAD", "SNOW_GIANT_KIDNEY", "STORM_WYRM_CLAW", "GREEN_WORM",
"WIGHT_ECTOPLASM", "XORN_FRAGMENT", "WARG_CLAW", "FAEROS_ASH", "WRETCHLING_EYE", "FAERLHING_FANG", "VAMPIRE_LORD_FANG", "HUMMERHORN_WING", "LUMINOUS_HORROR_DUST" } "WIGHT_ECTOPLASM", "XORN_FRAGMENT", "WARG_CLAW", "FAEROS_ASH", "WRETCHLING_EYE", "FAERLHING_FANG", "VAMPIRE_LORD_FANG", "HUMMERHORN_WING", "LUMINOUS_HORROR_DUST" }
recipes = function() recipes = function(self)
local ing_list = mod.class.Object:loadList("/data/general/objects/elixir-ingredients.lua") local ing_list = mod.class.Object:loadList("/data/general/objects/elixir-ingredients.lua")
local e = { local e = {
{ {
...@@ -234,9 +234,9 @@ recipes = function() ...@@ -234,9 +234,9 @@ recipes = function()
poached = "fox_poached", poached = "fox_poached",
alchemist = "Stire of Derth", alchemist = "Stire of Derth",
ingredients = { ingredients = {
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
}, },
}, },
{ {
...@@ -251,9 +251,9 @@ recipes = function() ...@@ -251,9 +251,9 @@ recipes = function()
poached = "avoidance_poached", poached = "avoidance_poached",
alchemist = "Stire of Derth", alchemist = "Stire of Derth",
ingredients = { ingredients = {
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
}, },
}, },
{ {
...@@ -268,9 +268,9 @@ recipes = function() ...@@ -268,9 +268,9 @@ recipes = function()
poached = "precision_poached", poached = "precision_poached",
alchemist = "Stire of Derth", alchemist = "Stire of Derth",
ingredients = { ingredients = {
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
}, },
}, },
}, },
...@@ -287,9 +287,9 @@ recipes = function() ...@@ -287,9 +287,9 @@ recipes = function()
poached = "mysticism_poached", poached = "mysticism_poached",
alchemist = "Marus of Elvala", alchemist = "Marus of Elvala",
ingredients = { ingredients = {
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
}, },
}, },
{ {
...@@ -304,9 +304,9 @@ recipes = function() ...@@ -304,9 +304,9 @@ recipes = function()
poached = "savior_poached", poached = "savior_poached",
alchemist = "Marus of Elvala", alchemist = "Marus of Elvala",
ingredients = { ingredients = {
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
}, },
}, },
{ {
...@@ -321,9 +321,9 @@ recipes = function() ...@@ -321,9 +321,9 @@ recipes = function()
poached = "mastery_poached", poached = "mastery_poached",
alchemist = "Marus of Elvala", alchemist = "Marus of Elvala",
ingredients = { ingredients = {
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
}, },
}, },
}, },
...@@ -340,9 +340,9 @@ recipes = function() ...@@ -340,9 +340,9 @@ recipes = function()
poached = "force_poached", poached = "force_poached",
alchemist = "Agrimley the hermit", alchemist = "Agrimley the hermit",
ingredients = { ingredients = {
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
}, },
}, },
{ {
...@@ -357,9 +357,9 @@ recipes = function() ...@@ -357,9 +357,9 @@ recipes = function()
poached = "serendipity_poached", poached = "serendipity_poached",
alchemist = "Agrimley the hermit", alchemist = "Agrimley the hermit",
ingredients = { ingredients = {
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
}, },
}, },
{ {
...@@ -374,9 +374,9 @@ recipes = function() ...@@ -374,9 +374,9 @@ recipes = function()
poached = "focus_poached", poached = "focus_poached",
alchemist = "Agrimley the hermit", alchemist = "Agrimley the hermit",
ingredients = { ingredients = {
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
}, },
}, },
}, },
...@@ -393,9 +393,9 @@ recipes = function() ...@@ -393,9 +393,9 @@ recipes = function()
poached = "brawn_poached", poached = "brawn_poached",
alchemist = "Ungrol of Last Hope", alchemist = "Ungrol of Last Hope",
ingredients = { ingredients = {
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
}, },
}, },
{ {
...@@ -410,9 +410,9 @@ recipes = function() ...@@ -410,9 +410,9 @@ recipes = function()
poached = "stoneskin_poached", poached = "stoneskin_poached",
alchemist = "Ungrol of Last Hope", alchemist = "Ungrol of Last Hope",
ingredients = { ingredients = {
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
}, },
}, },
{ {
...@@ -427,9 +427,9 @@ recipes = function() ...@@ -427,9 +427,9 @@ recipes = function()
poached = "foundations_poached", poached = "foundations_poached",
alchemist = "Ungrol of Last Hope", alchemist = "Ungrol of Last Hope",
ingredients = { ingredients = {
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
ing_list[rng.tableRemove(monster_parts)], ing_list[rng.tableRemove(self.monster_parts)],
}, },
}, },
}, },
......
...@@ -73,7 +73,7 @@ if zone == "Maj'Eyal" then ...@@ -73,7 +73,7 @@ if zone == "Maj'Eyal" then
end end
-- Spawn some hostiles -- Spawn some hostiles
if wda.cur_hostiles < 4 and rng.percent(5) then if wda.cur_hostiles < 5 and rng.percent(5) then
local e = game.zone:makeEntity(game.level, "maj_eyal_encounters_npcs", {type="hostile"}, nil, true) local e = game.zone:makeEntity(game.level, "maj_eyal_encounters_npcs", {type="hostile"}, nil, true)
if e then if e then
local spot = game.level:pickSpot{type="hostile", subtype="maj-eyal"} local spot = game.level:pickSpot{type="hostile", subtype="maj-eyal"}
......
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