From a952c28ef0695dfb31a1d12e32ffdbfa7578142f Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Sun, 6 May 2012 14:13:26 +0000
Subject: [PATCH] Random elites are in! Each level (except the very first one)
 can contain random elites. Less powerful than random bosses, should spice
 things up!

git-svn-id: http://svn.net-core.org/repos/t-engine4@5086 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/class/Actor.lua             |  29 ++++++++--
 game/modules/tome/class/Game.lua              |  12 +---
 game/modules/tome/class/GameState.lua         |  43 ++++++++++++++-
 .../tome/class/generator/actor/OnSpots.lua    |  47 ++++++++++++++++
 .../tome/class/generator/actor/Random.lua     |  52 ++++++++++++++++++
 .../generator/actor/RandomStairGuard.lua      |   2 +-
 .../tome/class/generator/actor/Sandworm.lua   |   2 +-
 .../tome/data/birth/classes/adventurer.lua    |   1 +
 .../tome/data/birth/classes/afflicted.lua     |   2 +
 .../tome/data/birth/classes/celestial.lua     |   2 +
 .../tome/data/birth/classes/chronomancer.lua  |   2 +
 .../tome/data/birth/classes/corrupted.lua     |   2 +
 game/modules/tome/data/birth/classes/mage.lua |   3 +
 .../tome/data/birth/classes/psionic.lua       |   1 +
 .../modules/tome/data/birth/classes/rogue.lua |   2 +
 .../tome/data/birth/classes/warrior.lua       |   5 ++
 .../tome/data/birth/classes/wilder.lua        |   3 +
 game/modules/tome/data/general/npcs/ant.lua   |   1 +
 .../data/general/npcs/aquatic_critter.lua     |   1 +
 game/modules/tome/data/general/npcs/bear.lua  |   1 +
 game/modules/tome/data/general/npcs/bird.lua  |   1 +
 .../tome/data/general/npcs/bone-giant.lua     |   1 +
 .../modules/tome/data/general/npcs/canine.lua |   1 +
 .../tome/data/general/npcs/construct.lua      |   1 +
 .../tome/data/general/npcs/crystal.lua        |   1 +
 .../tome/data/general/npcs/elven-caster.lua   |   1 +
 .../tome/data/general/npcs/elven-warrior.lua  |   1 +
 .../modules/tome/data/general/npcs/feline.lua |   1 +
 game/modules/tome/data/general/npcs/ghost.lua |   1 +
 game/modules/tome/data/general/npcs/ghoul.lua |   1 +
 .../data/general/npcs/horror_temporal.lua     |   1 +
 game/modules/tome/data/general/npcs/jelly.lua |   1 +
 game/modules/tome/data/general/npcs/lich.lua  |   1 +
 .../tome/data/general/npcs/losgoroth.lua      |   1 +
 game/modules/tome/data/general/npcs/mummy.lua |   1 +
 game/modules/tome/data/general/npcs/ooze.lua  |   1 +
 game/modules/tome/data/general/npcs/plant.lua |   1 +
 game/modules/tome/data/general/npcs/ritch.lua |   1 +
 .../modules/tome/data/general/npcs/rodent.lua |   1 +
 .../tome/data/general/npcs/sandworm.lua       |   1 +
 game/modules/tome/data/general/npcs/shade.lua |   1 +
 .../tome/data/general/npcs/skeleton.lua       |   1 +
 game/modules/tome/data/general/npcs/snake.lua |   1 +
 game/modules/tome/data/general/npcs/swarm.lua |   1 +
 .../tome/data/general/npcs/telugoroth.lua     |  14 ++---
 .../modules/tome/data/general/npcs/thieve.lua |   1 +
 .../tome/data/general/npcs/vampire.lua        |   3 +-
 .../modules/tome/data/general/npcs/vermin.lua |   1 +
 game/modules/tome/data/general/npcs/wight.lua |   1 +
 game/modules/tome/data/general/npcs/xorn.lua  |   5 +-
 .../tome/data/general/npcs/ziguranth.lua      |   1 +
 .../gfx/shockbolt/tactical_enemy_strong.png   | Bin 0 -> 5855 bytes
 .../tome/data/zones/abashed-expanse/zone.lua  |   2 +-
 .../data/zones/ancient-elven-ruins/zone.lua   |   2 +-
 .../tome/data/zones/ardhungol/zone.lua        |   2 +-
 .../tome/data/zones/blighted-ruins/zone.lua   |   2 +-
 .../tome/data/zones/briagh-lair/zone.lua      |   2 +-
 .../tome/data/zones/charred-scar/zone.lua     |   2 +-
 .../data/zones/crypt-kryl-feijan/zone.lua     |   2 +-
 game/modules/tome/data/zones/daikara/zone.lua |   2 +-
 .../tome/data/zones/deep-bellow/zone.lua      |   2 +-
 .../tome/data/zones/demon-plane/zone.lua      |   2 +-
 .../tome/data/zones/dreadfell-ambush/zone.lua |   2 +-
 .../tome/data/zones/dreadfell/zone.lua        |   2 +-
 .../tome/data/zones/eidolon-plane/zone.lua    |   2 +-
 game/modules/tome/data/zones/eruan/zone.lua   |   2 +-
 .../tome/data/zones/flooded-cave/zone.lua     |   2 +-
 .../tome/data/zones/golem-graveyard/zone.lua  |   2 +-
 .../tome/data/zones/gorbat-pride/zone.lua     |   2 +-
 .../tome/data/zones/grushnak-pride/zone.lua   |   2 +-
 .../tome/data/zones/halfling-ruins/zone.lua   |   2 +-
 .../tome/data/zones/heart-gloom/zone.lua      |   2 +-
 .../tome/data/zones/high-peak/zone.lua        |   2 +-
 .../tome/data/zones/illusory-castle/zone.lua  |   2 +-
 .../modules/tome/data/zones/lake-nur/zone.lua |   2 +-
 .../tome/data/zones/mark-spellblaze/zone.lua  |   2 +-
 game/modules/tome/data/zones/maze/zone.lua    |   2 +-
 .../tome/data/zones/murgol-lair/zone.lua      |   2 +-
 .../tome/data/zones/norgos-lair/zone.lua      |   2 +-
 .../tome/data/zones/old-forest/zone.lua       |   2 +-
 .../tome/data/zones/orc-breeding-pit/zone.lua |   2 +-
 .../tome/data/zones/paradox-plane/zone.lua    |   2 +-
 .../tome/data/zones/rak-shor-pride/zone.lua   |   2 +-
 .../tome/data/zones/reknor-escape/zone.lua    |   2 +-
 game/modules/tome/data/zones/reknor/zone.lua  |   2 +-
 .../tome/data/zones/rhaloren-camp/zone.lua    |   2 +-
 .../tome/data/zones/ring-of-blood/zone.lua    |   4 +-
 .../tome/data/zones/ritch-tunnels/zone.lua    |   2 +-
 .../tome/data/zones/ruined-dungeon/zone.lua   |   2 +-
 .../tome/data/zones/ruins-kor-pul/zone.lua    |   2 +-
 .../data/zones/scintillating-caves/zone.lua   |   2 +-
 .../tome/data/zones/shadow-crypt/zone.lua     |   2 +-
 .../zones/shertul-fortress-caldizar/zone.lua  |   2 +-
 .../tome/data/zones/shertul-fortress/zone.lua |   2 +-
 .../tome/data/zones/slazish-fen/zone.lua      |   2 +-
 .../tome/data/zones/slime-tunnels/zone.lua    |   2 +-
 .../tome/data/zones/tannen-tower/zone.lua     |   2 +-
 game/modules/tome/data/zones/telmur/zone.lua  |   2 +-
 .../tome/data/zones/tempest-peak/zone.lua     |   2 +-
 .../data/zones/temple-of-creation/zone.lua    |   2 +-
 .../tome/data/zones/temporal-rift/zone.lua    |  12 ++--
 game/modules/tome/data/zones/test/zone.lua    |   2 +-
 .../tome/data/zones/thieves-tunnels/zone.lua  |   2 +-
 .../tome/data/zones/town-angolwen/zone.lua    |   2 +-
 .../tome/data/zones/town-derth/zone.lua       |   2 +-
 .../tome/data/zones/town-elvala/zone.lua      |   2 +-
 .../data/zones/town-gates-of-morning/zone.lua |   2 +-
 .../tome/data/zones/town-irkkk/zone.lua       |   2 +-
 .../data/zones/town-iron-council/zone.lua     |   2 +-
 .../tome/data/zones/town-last-hope/zone.lua   |   2 +-
 .../zones/town-lumberjack-village/zone.lua    |   2 +-
 .../tome/data/zones/town-shatur/zone.lua      |   2 +-
 .../tome/data/zones/town-zigur/zone.lua       |   2 +-
 .../tome/data/zones/trollmire/zone.lua        |   2 +-
 .../data/zones/tutorial-combat-stats/zone.lua |   2 +-
 .../modules/tome/data/zones/tutorial/zone.lua |   2 +-
 .../data/zones/unremarkable-cave/zone.lua     |   2 +-
 .../data/zones/valley-moon-caverns/zone.lua   |   2 +-
 .../tome/data/zones/valley-moon/zone.lua      |   2 +-
 game/modules/tome/data/zones/void/zone.lua    |   2 +-
 .../tome/data/zones/vor-armoury/zone.lua      |   2 +-
 .../tome/data/zones/vor-pride/zone.lua        |   2 +-
 game/modules/tome/load.lua                    |   4 +-
 123 files changed, 310 insertions(+), 109 deletions(-)
 create mode 100644 game/modules/tome/class/generator/actor/OnSpots.lua
 create mode 100644 game/modules/tome/class/generator/actor/Random.lua
 create mode 100644 game/modules/tome/data/gfx/shockbolt/tactical_enemy_strong.png

diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua
index f5a80dff3c..c180b7986b 100644
--- a/game/modules/tome/class/Actor.lua
+++ b/game/modules/tome/class/Actor.lua
@@ -257,7 +257,7 @@ function _M:stripForExport()
 		self:forceUseTalent(eff, {ignore_energy=true, no_equilibrium_fail=true, no_paradox_fail=true})
 	end
 end
-	
+
 
 function _M:useEnergy(val)
 	engine.Actor.useEnergy(self, val)
@@ -718,6 +718,7 @@ function _M:defineDisplayCallback()
 
 	local f_self = nil
 	local f_danger = nil
+	local f_danger = nil
 	local f_powerful = nil
 	local f_friend = nil
 	local f_enemy = nil
@@ -756,7 +757,8 @@ function _M:defineDisplayCallback()
 				if not f_self then
 					f_self = game.level.map.tilesTactic:get(nil, 0,0,0, 0,0,0, map.faction_self)
 					f_powerful = game.level.map.tilesTactic:get(nil, 0,0,0, 0,0,0, map.faction_powerful)
-					f_danger = game.level.map.tilesTactic:get(nil, 0,0,0, 0,0,0, map.faction_danger)
+					f_danger2 = game.level.map.tilesTactic:get(nil, 0,0,0, 0,0,0, map.faction_danger2)
+					f_danger1 = game.level.map.tilesTactic:get(nil, 0,0,0, 0,0,0, map.faction_danger1)
 					f_friend = game.level.map.tilesTactic:get(nil, 0,0,0, 0,0,0, map.faction_friend)
 					f_enemy = game.level.map.tilesTactic:get(nil, 0,0,0, 0,0,0, map.faction_enemy)
 					f_neutral = game.level.map.tilesTactic:get(nil, 0,0,0, 0,0,0, map.faction_neutral)
@@ -771,7 +773,13 @@ function _M:defineDisplayCallback()
 						f_self:toScreen(x, y, w, h)
 					elseif map:faction_danger_check(self) then
 						if friend >= 0 then f_powerful:toScreen(x, y, w, h)
-						else f_danger:toScreen(x, y, w, h) end
+						else
+							if map:faction_danger_check(self, true) then
+								f_danger2:toScreen(x, y, w, h)
+							else
+								f_danger1:toScreen(x, y, w, h)
+							end
+						end
 					elseif friend > 0 then
 						f_friend:toScreen(x, y, w, h)
 					elseif friend < 0 then
@@ -1088,6 +1096,7 @@ function _M:getRankStatAdjust()
 	if self.rank == 1 then return -1
 	elseif self.rank == 2 then return -0.5
 	elseif self.rank == 3 then return 0
+	elseif self.rank == 3.2 then return 0.5
 	elseif self.rank == 3.5 then return 1
 	elseif self.rank == 4 then return 1
 	elseif self.rank >= 5 then return 1
@@ -1099,6 +1108,7 @@ function _M:getRankLevelAdjust()
 	if self.rank == 1 then return -1
 	elseif self.rank == 2 then return 0
 	elseif self.rank == 3 then return 1
+	elseif self.rank == 3.2 then return 1
 	elseif self.rank == 3.5 then return 2
 	elseif self.rank == 4 then return 3
 	elseif self.rank >= 5 then return 4
@@ -1110,6 +1120,7 @@ function _M:getRankVimAdjust()
 	if self.rank == 1 then return 0.7
 	elseif self.rank == 2 then return 1
 	elseif self.rank == 3 then return 1.2
+	elseif self.rank == 3.2 then return 1.2
 	elseif self.rank == 3.5 then return 2.2
 	elseif self.rank == 4 then return 2.6
 	elseif self.rank >= 5 then return 2.8
@@ -1122,6 +1133,7 @@ function _M:getRankLifeAdjust(value)
 	if self.rank == 1 then return value * (level_adjust - 0.2)
 	elseif self.rank == 2 then return value * (level_adjust - 0.1)
 	elseif self.rank == 3 then return value * (level_adjust + 0.1)
+	elseif self.rank == 3.2 then return value * (level_adjust + 0.15)
 	elseif self.rank == 3.5 then return value * (level_adjust + 1)
 	elseif self.rank == 4 then return value * (level_adjust + 2)
 	elseif self.rank >= 5 then return value * (level_adjust + 3)
@@ -1133,6 +1145,7 @@ function _M:getRankResistAdjust()
 	if self.rank == 1 then return 0.4, 0.9
 	elseif self.rank == 2 then return 0.5, 1.5
 	elseif self.rank == 3 then return 0.8, 1.5
+	elseif self.rank == 3.2 then return 0.8, 1.5
 	elseif self.rank == 3.5 then return 0.9, 1.5
 	elseif self.rank == 4 then return 0.9, 1.5
 	elseif self.rank >= 5 then return 0.9, 1.5
@@ -1144,6 +1157,7 @@ function _M:getRankSaveAdjust()
 	if self.rank == 1 then return 0.6, 0.9
 	elseif self.rank == 2 then return 1, 1.5
 	elseif self.rank == 3 then return 1.3, 1.8
+	elseif self.rank == 3.2 then return 1.3, 1.8
 	elseif self.rank == 3.5 then return 1.5, 2
 	elseif self.rank == 4 then return 1.7, 2.1
 	elseif self.rank >= 5 then return 1.9, 2.3
@@ -1156,6 +1170,7 @@ function _M:TextRank()
 	if self.rank == 1 then rank, color = "critter", "#C0C0C0#"
 	elseif self.rank == 2 then rank, color = "normal", "#ANTIQUE_WHITE#"
 	elseif self.rank == 3 then rank, color = "elite", "#YELLOW#"
+	elseif self.rank == 3.2 then rank, color = "rare", "#SALMON#"
 	elseif self.rank == 3.5 then rank, color = "unique", "#SANDY_BROWN#"
 	elseif self.rank == 4 then rank, color = "boss", "#ORANGE#"
 	elseif self.rank >= 5 then rank, color = "elite boss", "#GOLD#"
@@ -3392,9 +3407,10 @@ function _M:worthExp(target)
 		if self.rank == 1 then mult = 0.6
 		elseif self.rank == 2 then mult = 0.8
 		elseif self.rank == 3 then mult = 3
-		elseif self.rank == 3.5 then mult = 12
-		elseif self.rank == 4 then mult = 45
-		elseif self.rank >= 5 then mult = 100
+		elseif self.rank == 3.2 then mult = 3
+		elseif self.rank == 3.5 then mult = 11
+		elseif self.rank == 4 then mult = 40
+		elseif self.rank >= 5 then mult = 90
 		end
 
 		return self.level * mult * self.exp_worth * (target.exp_kill_multiplier or 1)
@@ -3403,6 +3419,7 @@ function _M:worthExp(target)
 		if self.rank == 1 then mult = 2
 		elseif self.rank == 2 then mult = 2
 		elseif self.rank == 3 then mult = 3.5
+		elseif self.rank == 3.2 then mult = 3.5
 		elseif self.rank == 3.5 then mult = 5
 		elseif self.rank == 4 then mult = 6
 		elseif self.rank >= 5 then mult = 6.5
diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua
index ac179c9ed2..c594f2d033 100644
--- a/game/modules/tome/class/Game.lua
+++ b/game/modules/tome/class/Game.lua
@@ -1115,17 +1115,7 @@ function _M:setupCommands()
 			end end
 		end end,
 		[{"_g","ctrl"}] = function() if config.settings.cheat then
-			local m = game.zone:makeEntity(game.level, "actor", {random_boss={
-				nb_classes=1,
-				rank=3, ai = "tactical",
-				life_rating=function(v) return v * 1.3 + 2 end,
-				loot_quality = "store",
-				loot_quantity = 1,
-				drop_equipment = false,
-				no_loot_randart = true,
-			}}, nil, true)
-
-			FINISH ME
+			local m = game.zone:makeEntity(game.level, "actor", {random_elite={}}, nil, true)
 
 			if m then game.zone:addEntity(game.level, m, "actor", self.player.x, self.player.y-1) end
 		end end,
diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua
index 1e5c931f37..0a26f1b5fa 100644
--- a/game/modules/tome/class/GameState.lua
+++ b/game/modules/tome/class/GameState.lua
@@ -482,7 +482,7 @@ function _M:spawnWorldAmbush(enc, dx, dy)
 		min_material_level = util.bound(math.ceil(game.player.level / 10), 1, 5) - 1,
 		generator =  {
 			map = gen,
-			actor = { class = "engine.generator.actor.Random", nb_npc = enc.nb or {1,1}, filters=enc.filters },
+			actor = { class = "mod.class.generator.actor.Random", nb_npc = enc.nb or {1,1}, filters=enc.filters },
 		},
 
 		npc_list = mod.class.NPC:loadList("/data/general/npcs/all.lua", nil, nil, function(e) e.make_escort=nil end),
@@ -1071,7 +1071,44 @@ function _M:entityFilterPost(zone, level, type, e, filter)
 			if _G.type(filter.random_boss) == "boolean" then filter.random_boss = {}
 			else filter.random_boss = table.clone(filter.random_boss, true) end
 			filter.random_boss.level = filter.random_boss.level or zone:level_adjust_level(level, zone, type)
+			filter.random_boss.class_filter = filter.random_boss.class_filter or function(c)
+				if e.power_source then
+					for ps, _ in pairs(e.power_source) do if c.power_source and c.power_source[ps] then return true end end
+					return false
+				end
+				if e.not_power_source then
+					for ps, _ in pairs(e.not_power_source) do if c.power_source and c.power_source[ps] then return false end end
+					return true
+				end
+				return true
+			end
+
 			e = self:createRandomBoss(e, filter.random_boss)
+		elseif filter.random_elite then
+			if _G.type(filter.random_elite) == "boolean" then filter.random_elite = {}
+			else filter.random_elite = table.clone(filter.random_elite, true) end
+			local base = {
+				nb_classes=1,
+				rank=3.2, ai = "tactical",
+				life_rating=function(v) return v * 1.3 + 2 end,
+				loot_quality = "store",
+				loot_quantity = 1,
+				drop_equipment = false,
+				no_loot_randart = true,
+				class_filter = function(c)
+					if e.power_source then
+						for ps, _ in pairs(e.power_source) do if c.power_source and c.power_source[ps] then return true end end
+						return false
+					end
+					if e.not_power_source then
+						for ps, _ in pairs(e.not_power_source) do if c.power_source and c.power_source[ps] then return false end end
+						return true
+					end
+					return true
+				end,
+				level = filter.random_elite.level or zone:level_adjust_level(level, zone, type),
+			}
+			e = self:createRandomBoss(e, table.merge(base, filter.random_elite, true))
 		end
 	end
 
@@ -1398,7 +1435,7 @@ function _M:createRandomZone(zbase)
 		reload_lists = false,
 		generator =  {
 			map = layout.gen(data),
-			actor = { class = "engine.generator.actor.Random", nb_npc = nb_npc, guardian = boss_id, abord_no_guardian=true, guardian_alert=layout.guardian_alert },
+			actor = { class = "mod.class.generator.actor.Random", nb_npc = nb_npc, guardian = boss_id, abord_no_guardian=true, guardian_alert=layout.guardian_alert },
 			trap = { class = "engine.generator.trap.Random", nb_trap = nb_trap, },
 			object = { class = "engine.generator.object.Random", nb_object = nb_object, },
 		},
@@ -1576,7 +1613,7 @@ function _M:createRandomBoss(base, data)
 	local force_classes = data.force_classes and table.clone(data.force_classes)
 	for name, cdata in pairs(classes) do
 		if force_classes and force_classes[cdata.name] then apply_class(table.clone(cdata, true)) force_classes[cdata.name] = nil
-		elseif not cdata.not_on_random_boss then list[#list+1] = cdata
+		elseif not cdata.not_on_random_boss and (not data.class_filter or data.class_filter(cdata))then list[#list+1] = cdata
 		end
 	end
 	for i = 1, data.nb_classes or 2 do
diff --git a/game/modules/tome/class/generator/actor/OnSpots.lua b/game/modules/tome/class/generator/actor/OnSpots.lua
new file mode 100644
index 0000000000..b968056d7f
--- /dev/null
+++ b/game/modules/tome/class/generator/actor/OnSpots.lua
@@ -0,0 +1,47 @@
+-- ToME - Tales of Maj'Eyal
+-- Copyright (C) 2009, 2010, 2011, 2012 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
+
+require "engine.class"
+local Map = require "engine.Map"
+local OnSpots = require "engine.generator.actor.OnSpots"
+module(..., package.seeall, class.inherit(OnSpots))
+
+function _M:init(zone, map, level, spots)
+	OnSpots.init(self, zone, map, level, spots)
+	local data = level.data.generator.actor
+	self.randelite = data.randelite or 20
+end
+
+function _M:generateOne()
+	local f = nil
+	if self.filters then f = self.filters[rng.range(1, #self.filters)] end
+	if rng.chance(self.randelite) and self.zone:level_adjust_level(self.level, "actor") > 1 then
+		print("Random elite generating")
+		if not f then f = {} else f = table.clone(f, true) end
+		f.random_elite = f.random_elite or true
+	end
+	local m = self.zone:makeEntity(self.level, "actor", f, nil, true)
+	if m then
+		local x, y = self:getSpawnSpot(m)
+		if x and y then
+			self.zone:addEntity(self.level, m, "actor", x, y)
+			if self.post_generation then self.post_generation(m) end
+		end
+	end
+end
diff --git a/game/modules/tome/class/generator/actor/Random.lua b/game/modules/tome/class/generator/actor/Random.lua
new file mode 100644
index 0000000000..e6f11b1de8
--- /dev/null
+++ b/game/modules/tome/class/generator/actor/Random.lua
@@ -0,0 +1,52 @@
+-- ToME - Tales of Maj'Eyal
+-- Copyright (C) 2009, 2010, 2011, 2012 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
+
+require "engine.class"
+local Map = require "engine.Map"
+local Random = require "engine.generator.actor.Random"
+module(..., package.seeall, class.inherit(Random))
+
+function _M:init(zone, map, level, spots)
+	Random.init(self, zone, map, level, spots)
+	local data = level.data.generator.actor
+	self.randelite = data.randelite or 20
+end
+
+function _M:generateOne()
+	local f = nil
+	if self.filters then f = self.filters[rng.range(1, #self.filters)] end
+	if rng.chance(self.randelite) and self.zone:level_adjust_level(self.level, "actor") > 1 then
+		print("Random elite generating")
+		if not f then f = {} else f = table.clone(f, true) end
+		f.random_elite = f.random_elite or true
+	end
+	local m = self.zone:makeEntity(self.level, "actor", f, nil, true)
+	if m then
+		local x, y = rng.range(self.area.x1, self.area.x2), rng.range(self.area.y1, self.area.y2)
+		local tries = 0
+		while (not m:canMove(x, y) or (self.map.room_map[x][y] and self.map.room_map[x][y].special)) and tries < 100 do
+			x, y = rng.range(self.area.x1, self.area.x2), rng.range(self.area.y1, self.area.y2)
+			tries = tries + 1
+		end
+		if tries < 100 then
+			self.zone:addEntity(self.level, m, "actor", x, y)
+			if self.post_generation then self.post_generation(m) end
+		end
+	end
+end
diff --git a/game/modules/tome/class/generator/actor/RandomStairGuard.lua b/game/modules/tome/class/generator/actor/RandomStairGuard.lua
index 0a668b9942..d75008e43b 100644
--- a/game/modules/tome/class/generator/actor/RandomStairGuard.lua
+++ b/game/modules/tome/class/generator/actor/RandomStairGuard.lua
@@ -20,7 +20,7 @@
 require "engine.class"
 local Map = require "engine.Map"
 require "engine.Generator"
-local Random = require "engine.generator.actor.Random"
+local Random = require "mod.class.generator.actor.Random"
 
 --- Very specialized generator that puts sandworms in interesting spots to dig tunnels
 module(..., package.seeall, class.inherit(Random))
diff --git a/game/modules/tome/class/generator/actor/Sandworm.lua b/game/modules/tome/class/generator/actor/Sandworm.lua
index c475cc1a06..b6d3caf12b 100644
--- a/game/modules/tome/class/generator/actor/Sandworm.lua
+++ b/game/modules/tome/class/generator/actor/Sandworm.lua
@@ -20,7 +20,7 @@
 require "engine.class"
 local Map = require "engine.Map"
 require "engine.Generator"
-local Random = require "engine.generator.actor.Random"
+local Random = require "mod.class.generator.actor.Random"
 
 --- Very specialized generator that puts sandworms in interesting spots to dig tunnels
 module(..., package.seeall, class.inherit(engine.Generator))
diff --git a/game/modules/tome/data/birth/classes/adventurer.lua b/game/modules/tome/data/birth/classes/adventurer.lua
index 0d89ed83e1..b7fc99d57d 100644
--- a/game/modules/tome/data/birth/classes/adventurer.lua
+++ b/game/modules/tome/data/birth/classes/adventurer.lua
@@ -48,6 +48,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +2 Strength, +2 Dexterity, +2 Constitution",
 		"#LIGHT_BLUE# * +2 Magic, +2 Willpower, +2 Cunning",
 	},
+	not_on_random_boss = true,
 	stats = { str=2, con=2, dex=2, mag=2, wil=2, cun=2 },
 	talents_types = function(birth)
 		local tts = {}
diff --git a/game/modules/tome/data/birth/classes/afflicted.lua b/game/modules/tome/data/birth/classes/afflicted.lua
index 63b174454d..3d41d7cac8 100644
--- a/game/modules/tome/data/birth/classes/afflicted.lua
+++ b/game/modules/tome/data/birth/classes/afflicted.lua
@@ -54,6 +54,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +5 Strength, +0 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +0 Magic, +4 Willpower, +0 Cunning",
 	},
+	power_source = {psionic=true, technique=true},
 	stats = { wil=4, str=5, },
 	talents_types = {
 		["cursed/gloom"]={true, 0.3},
@@ -104,6 +105,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +0 Magic, +4 Willpower, +5 Cunning",
 	},
+	power_source = {psionic=true},
 	stats = { wil=4, cun=5, },
 	talents_types = {
 		["cursed/dark-sustenance"]={true, 0.3},
diff --git a/game/modules/tome/data/birth/classes/celestial.lua b/game/modules/tome/data/birth/classes/celestial.lua
index b3dbc4fe52..a78ff11073 100644
--- a/game/modules/tome/data/birth/classes/celestial.lua
+++ b/game/modules/tome/data/birth/classes/celestial.lua
@@ -64,6 +64,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +5 Strength, +0 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +4 Magic, +0 Willpower, +0 Cunning",
 	},
+	power_source = {technique=true, arcane=true},
 	stats = { mag=4, str=5, },
 	talents_types = {
 		["technique/shield-offense"]={true, 0.1},
@@ -112,6 +113,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +6 Magic, +0 Willpower, +3 Cunning",
 	},
+	power_source = {arcane=true},
 	stats = { mag=6, cun=3, },
 	talents_types = {
 		["cunning/survival"]={false, 0.1},
diff --git a/game/modules/tome/data/birth/classes/chronomancer.lua b/game/modules/tome/data/birth/classes/chronomancer.lua
index 24f6dd932e..4f1f4a54fb 100644
--- a/game/modules/tome/data/birth/classes/chronomancer.lua
+++ b/game/modules/tome/data/birth/classes/chronomancer.lua
@@ -52,6 +52,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +5 Magic, +3 Willpower, +1 Cunning",
 	},
+	power_source = {arcane=true},
 	stats = { mag=5, wil=3, cun=1, },
 	talents_types = {
 		["chronomancy/age-manipulation"]={true, 0.3},
@@ -100,6 +101,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +2 Strength, +3 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +2 Magic, +2 Willpower, +0 Cunning",
 	},
+	power_source = {technique=true, arcane=true},
 	stats = { str=2, wil=2, dex=3, mag=2},
 	talents_types = {
 		["technique/archery-bow"]={true, 0},
diff --git a/game/modules/tome/data/birth/classes/corrupted.lua b/game/modules/tome/data/birth/classes/corrupted.lua
index 3ba0af573c..f41fceae13 100644
--- a/game/modules/tome/data/birth/classes/corrupted.lua
+++ b/game/modules/tome/data/birth/classes/corrupted.lua
@@ -52,6 +52,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +4 Strength, +1 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +4 Magic, +0 Willpower, +0 Cunning",
 	},
+	power_source = {arcane=true, technique=true},
 	stats = { str=4, mag=4, dex=1, },
 	talents_types = {
 		["technique/combat-training"]={true, 0.3},
@@ -97,6 +98,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +2 Constitution",
 		"#LIGHT_BLUE# * +4 Magic, +3 Willpower, +0 Cunning",
 	},
+	power_source = {arcane=true},
 	stats = { mag=4, wil=3, con=2, },
 	talents_types = {
 		["cunning/survival"]={false, 0},
diff --git a/game/modules/tome/data/birth/classes/mage.lua b/game/modules/tome/data/birth/classes/mage.lua
index efeba4911a..36edf04b1b 100644
--- a/game/modules/tome/data/birth/classes/mage.lua
+++ b/game/modules/tome/data/birth/classes/mage.lua
@@ -53,6 +53,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +0 Strength, +3 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +5 Magic, +1 Willpower, +0 Cunning",
 	},
+	power_source = {arcane=true},
 	stats = { mag=5, dex=3, wil=1, },
 	talents_types = {
 		["spell/explosives"]={true, 0.3},
@@ -117,6 +118,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +5 Magic, +3 Willpower, +1 Cunning",
 	},
+	power_source = {arcane=true},
 	stats = { mag=5, wil=3, cun=1, },
 	talents_types = {
 		["spell/arcane"]={true, 0.3},
@@ -183,6 +185,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +5 Magic, +3 Willpower, +1 Cunning",
 	},
+	power_source = {arcane=true},
 	stats = { mag=5, wil=3, cun=1, },
 	talents_types = {
 		["spell/conveyance"]={true, 0.2},
diff --git a/game/modules/tome/data/birth/classes/psionic.lua b/game/modules/tome/data/birth/classes/psionic.lua
index c1d97456d6..efadffd7ac 100644
--- a/game/modules/tome/data/birth/classes/psionic.lua
+++ b/game/modules/tome/data/birth/classes/psionic.lua
@@ -52,6 +52,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +1 Strength, +0 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +0 Magic, +4 Willpower, +4 Cunning",
 	},
+	power_source = {psionic=true},
 	stats = { str=1, wil=4, cun=4, },
 	talents_types = {
 		--Level 0 trees:
diff --git a/game/modules/tome/data/birth/classes/rogue.lua b/game/modules/tome/data/birth/classes/rogue.lua
index 8acc9d9bd1..36da78440f 100644
--- a/game/modules/tome/data/birth/classes/rogue.lua
+++ b/game/modules/tome/data/birth/classes/rogue.lua
@@ -49,6 +49,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +1 Strength, +3 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +5 Cunning",
 	},
+	power_source = {technique=true},
 	stats = { dex=3, str=1, cun=5, },
 	talents_types = {
 		["technique/dualweapon-attack"]={true, 0.3},
@@ -93,6 +94,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +0 Strength, +3 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +3 Magic, +0 Willpower, +3 Cunning",
 	},
+	power_source = {technique=true, arcane=true},
 	stats = { dex=3, mag=3, cun=3, },
 	talents_types = {
 		["spell/phantasm"]={true, 0},
diff --git a/game/modules/tome/data/birth/classes/warrior.lua b/game/modules/tome/data/birth/classes/warrior.lua
index 5c97509943..406fb00e7f 100644
--- a/game/modules/tome/data/birth/classes/warrior.lua
+++ b/game/modules/tome/data/birth/classes/warrior.lua
@@ -51,6 +51,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +5 Strength, +1 Dexterity, +3 Constitution",
 		"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +0 Cunning",
 	},
+	power_source = {technique=true},
 	stats = { str=5, con=3, dex=1, },
 	talents_types = {
 		["technique/archery-training"]={false, 0.1},
@@ -96,6 +97,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +5 Strength, +2 Dexterity, +2 Constitution",
 		"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +0 Cunning",
 	},
+	power_source = {technique=true},
 	stats = { str=5, con=2, dex=2, },
 	talents_types = {
 		["technique/archery-training"]={false, 0.1},
@@ -143,6 +145,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +2 Strength, +5 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +2 Cunning",
 	},
+	power_source = {technique=true},
 	stats = { dex=5, str=2, cun=2, },
 	talents_types = {
 		["technique/archery-training"]={true, 0.3},
@@ -195,6 +198,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +3 Strength, +3 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +3 Magic, +0 Willpower, +0 Cunning",
 	},
+	power_source = {technique=true, arcane=true},
 	stats = { mag=3, str=3, dex=3},
 	talents_types = {
 		["spell/fire"]={true, 0.2},
@@ -249,6 +253,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +3 Strength, +3 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +0 Magic, +0 Willpower, +3 Cunning",
 	},
+	power_source = {technique=true},
 	stats = { str=3, dex=3, cun=3},
 	talents_types = {
 		["cunning/dirty"]={false, 0},
diff --git a/game/modules/tome/data/birth/classes/wilder.lua b/game/modules/tome/data/birth/classes/wilder.lua
index 94619da0c2..ed754b0280 100644
--- a/game/modules/tome/data/birth/classes/wilder.lua
+++ b/game/modules/tome/data/birth/classes/wilder.lua
@@ -53,6 +53,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +0 Strength, +1 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +0 Magic, +5 Willpower, +3 Cunning",
 	},
+	power_source = {nature=true},
 	getStatDesc = function(stat, actor)
 		if stat == actor.STAT_CUN then
 			return "Max summons: "..math.floor(actor:getCun()/10)
@@ -102,6 +103,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +5 Strength, +0 Dexterity, +1 Constitution",
 		"#LIGHT_BLUE# * +0 Magic, +3 Willpower, +0 Cunning",
 	},
+	power_source = {nature=true, technique=true},
 	stats = { str=5, wil=3, con=1, },
 	talents_types = {
 		["wild-gift/call"]={true, 0.2},
@@ -149,6 +151,7 @@ newBirthDescriptor{
 		"#LIGHT_BLUE# * +2 Strength, +0 Dexterity, +0 Constitution",
 		"#LIGHT_BLUE# * +4 Magic, +3 Willpower, +0 Cunning",
 	},
+	power_source = {nature=true, arcane=true},
 	not_on_random_boss = true,
 	stats = { str=2, wil=3, mag=4, },
 	talents_types = {
diff --git a/game/modules/tome/data/general/npcs/ant.lua b/game/modules/tome/data/general/npcs/ant.lua
index 923c8c8970..eb7e2ae5ca 100644
--- a/game/modules/tome/data/general/npcs/ant.lua
+++ b/game/modules/tome/data/general/npcs/ant.lua
@@ -39,6 +39,7 @@ newEntity{
 	max_life = resolvers.rngavg(10,20),
 	rank = 1,
 	size_category = 1,
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_ANT",
diff --git a/game/modules/tome/data/general/npcs/aquatic_critter.lua b/game/modules/tome/data/general/npcs/aquatic_critter.lua
index 2f828e86e2..907c1ed2d0 100644
--- a/game/modules/tome/data/general/npcs/aquatic_critter.lua
+++ b/game/modules/tome/data/general/npcs/aquatic_critter.lua
@@ -38,6 +38,7 @@ newEntity{
 	can_breath={water=1},
 
 	resists = { [DamageType.COLD] = 25, },
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_AQUATIC_CRITTER",
diff --git a/game/modules/tome/data/general/npcs/bear.lua b/game/modules/tome/data/general/npcs/bear.lua
index 061779fde7..579e1dfb35 100644
--- a/game/modules/tome/data/general/npcs/bear.lua
+++ b/game/modules/tome/data/general/npcs/bear.lua
@@ -52,6 +52,7 @@ newEntity{
 			game.player:hasQuest("brotherhood-of-alchemists"):need_part(who, part, self)
 		end
 	end,
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_BEAR",
diff --git a/game/modules/tome/data/general/npcs/bird.lua b/game/modules/tome/data/general/npcs/bird.lua
index 9145f885e7..6028822ad3 100644
--- a/game/modules/tome/data/general/npcs/bird.lua
+++ b/game/modules/tome/data/general/npcs/bird.lua
@@ -40,6 +40,7 @@ newEntity{
 	levitation = 1,
 
 	can_pass = {pass_tree=10},
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base="BASE_NPC_BIRD", define_as = "NPC_PHOENIX",
diff --git a/game/modules/tome/data/general/npcs/bone-giant.lua b/game/modules/tome/data/general/npcs/bone-giant.lua
index f211623f6d..574f21630e 100644
--- a/game/modules/tome/data/general/npcs/bone-giant.lua
+++ b/game/modules/tome/data/general/npcs/bone-giant.lua
@@ -56,6 +56,7 @@ newEntity{
 			game.player:hasQuest("brotherhood-of-alchemists"):need_part(who, part, self)
 		end
 	end,
+	not_power_source = {nature=true},
 }
 
 newEntity{ base = "BASE_NPC_BONE_GIANT",
diff --git a/game/modules/tome/data/general/npcs/canine.lua b/game/modules/tome/data/general/npcs/canine.lua
index 2915e24c5d..4337cab3a8 100644
--- a/game/modules/tome/data/general/npcs/canine.lua
+++ b/game/modules/tome/data/general/npcs/canine.lua
@@ -41,6 +41,7 @@ newEntity{
 	stats = { str=10, dex=17, mag=3, con=7 },
 	combat = { dammod={str=0.6}, sound="creatures/wolves/wolf_attack_1" },
 	combat_armor = 1, combat_def = 1,
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_CANINE",
diff --git a/game/modules/tome/data/general/npcs/construct.lua b/game/modules/tome/data/general/npcs/construct.lua
index d051e25500..061a95fc47 100644
--- a/game/modules/tome/data/general/npcs/construct.lua
+++ b/game/modules/tome/data/general/npcs/construct.lua
@@ -51,6 +51,7 @@ newEntity{
 		[Talents.T_STAMINA_POOL]=1, [Talents.T_MANA_POOL]=1,
 		[Talents.T_ARMOUR_TRAINING]={base=4, every=5, max=10},
 	},
+	not_power_source = {nature=true},
 }
 
 newEntity{ base = "BASE_NPC_CONSTRUCT",
diff --git a/game/modules/tome/data/general/npcs/crystal.lua b/game/modules/tome/data/general/npcs/crystal.lua
index b356b89756..3486e20486 100644
--- a/game/modules/tome/data/general/npcs/crystal.lua
+++ b/game/modules/tome/data/general/npcs/crystal.lua
@@ -34,6 +34,7 @@ newEntity{
 	},
 
 	lite = 2,
+	not_power_source = {nature=true, technique=true},
 }
 
 newEntity{ name = "wisp",
diff --git a/game/modules/tome/data/general/npcs/elven-caster.lua b/game/modules/tome/data/general/npcs/elven-caster.lua
index a522787956..6f6568c5e6 100644
--- a/game/modules/tome/data/general/npcs/elven-caster.lua
+++ b/game/modules/tome/data/general/npcs/elven-caster.lua
@@ -48,6 +48,7 @@ newEntity{
 	autolevel = "caster",
 	ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=1, },
 	stats = { str=20, dex=8, mag=6, con=16 },
+	power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_ELVEN_CASTER",
diff --git a/game/modules/tome/data/general/npcs/elven-warrior.lua b/game/modules/tome/data/general/npcs/elven-warrior.lua
index 8662641c5a..2310b15131 100644
--- a/game/modules/tome/data/general/npcs/elven-warrior.lua
+++ b/game/modules/tome/data/general/npcs/elven-warrior.lua
@@ -47,6 +47,7 @@ newEntity{
 	autolevel = "warrior",
 	ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=3, },
 	stats = { str=20, dex=8, mag=6, con=16 },
+	power_source = {technique=true},
 }
 
 newEntity{ base = "BASE_NPC_ELVEN_WARRIOR",
diff --git a/game/modules/tome/data/general/npcs/feline.lua b/game/modules/tome/data/general/npcs/feline.lua
index 6ca9a72520..9dd4e48f5a 100644
--- a/game/modules/tome/data/general/npcs/feline.lua
+++ b/game/modules/tome/data/general/npcs/feline.lua
@@ -33,6 +33,7 @@ newEntity{
 	combat_physspeed = 2, -- Double attack per turn
 
 	resolvers.sustains_at_birth(),
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_CAT",
diff --git a/game/modules/tome/data/general/npcs/ghost.lua b/game/modules/tome/data/general/npcs/ghost.lua
index 1ddb8a2511..572153a98a 100644
--- a/game/modules/tome/data/general/npcs/ghost.lua
+++ b/game/modules/tome/data/general/npcs/ghost.lua
@@ -52,6 +52,7 @@ newEntity{
 	see_invisible = 80,
 	undead = 1,
 	resolvers.sustains_at_birth(),
+	not_power_source = {nature=true},
 }
 
 newEntity{ base = "BASE_NPC_GHOST",
diff --git a/game/modules/tome/data/general/npcs/ghoul.lua b/game/modules/tome/data/general/npcs/ghoul.lua
index b4f2f70cb2..acc9608f18 100644
--- a/game/modules/tome/data/general/npcs/ghoul.lua
+++ b/game/modules/tome/data/general/npcs/ghoul.lua
@@ -49,6 +49,7 @@ newEntity{
 			game.player:hasQuest("brotherhood-of-alchemists"):need_part(who, part, self)
 		end
 	end,
+	not_power_source = {nature=true},
 }
 
 newEntity{ base = "BASE_NPC_GHOUL",
diff --git a/game/modules/tome/data/general/npcs/horror_temporal.lua b/game/modules/tome/data/general/npcs/horror_temporal.lua
index a34129e908..42774c7442 100644
--- a/game/modules/tome/data/general/npcs/horror_temporal.lua
+++ b/game/modules/tome/data/general/npcs/horror_temporal.lua
@@ -40,6 +40,7 @@ newEntity{
 
 	no_breath = 1,
 	fear_immune = 1,
+	not_power_source = {nature=true},
 }
 
 -- temporal horrors
diff --git a/game/modules/tome/data/general/npcs/jelly.lua b/game/modules/tome/data/general/npcs/jelly.lua
index 977c1658fa..efec8a3cbe 100644
--- a/game/modules/tome/data/general/npcs/jelly.lua
+++ b/game/modules/tome/data/general/npcs/jelly.lua
@@ -47,6 +47,7 @@ newEntity{
 	drops = resolvers.drops{chance=60, nb=1, {type="money"} },
 
 	resists = { [DamageType.LIGHT] = -50 },
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_JELLY",
diff --git a/game/modules/tome/data/general/npcs/lich.lua b/game/modules/tome/data/general/npcs/lich.lua
index 421fb221a0..69ce913276 100644
--- a/game/modules/tome/data/general/npcs/lich.lua
+++ b/game/modules/tome/data/general/npcs/lich.lua
@@ -65,6 +65,7 @@ newEntity{
 	combat_spellcrit = resolvers.mbonus(5, 5),
 
 	resolvers.sustains_at_birth(),
+	not_power_source = {nature=true},
 }
 
 newEntity{ base = "BASE_NPC_LICH",
diff --git a/game/modules/tome/data/general/npcs/losgoroth.lua b/game/modules/tome/data/general/npcs/losgoroth.lua
index 05cc54cf38..f698a5e168 100644
--- a/game/modules/tome/data/general/npcs/losgoroth.lua
+++ b/game/modules/tome/data/general/npcs/losgoroth.lua
@@ -51,6 +51,7 @@ newEntity{
 	blind_immune = 1,
 	knockback_immune = 1,
 	confusion_immune = 1,
+	power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_LOSGOROTH",
diff --git a/game/modules/tome/data/general/npcs/mummy.lua b/game/modules/tome/data/general/npcs/mummy.lua
index a221eeb48d..e9c1386ee6 100644
--- a/game/modules/tome/data/general/npcs/mummy.lua
+++ b/game/modules/tome/data/general/npcs/mummy.lua
@@ -52,4 +52,5 @@ newEntity{
 			game.player:hasQuest("brotherhood-of-alchemists"):need_part(who, part, self)
 		end
 	end,
+	not_power_source = {nature=true},
 }
diff --git a/game/modules/tome/data/general/npcs/ooze.lua b/game/modules/tome/data/general/npcs/ooze.lua
index 459e4a08cb..59df24ce8a 100644
--- a/game/modules/tome/data/general/npcs/ooze.lua
+++ b/game/modules/tome/data/general/npcs/ooze.lua
@@ -48,6 +48,7 @@ newEntity{
 
 	resists = { [DamageType.LIGHT] = -50, [DamageType.COLD] = -50 },
 	fear_immune = 1,
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_OOZE",
diff --git a/game/modules/tome/data/general/npcs/plant.lua b/game/modules/tome/data/general/npcs/plant.lua
index 167ef78736..58b90fc99e 100644
--- a/game/modules/tome/data/general/npcs/plant.lua
+++ b/game/modules/tome/data/general/npcs/plant.lua
@@ -37,6 +37,7 @@ newEntity{
 	size_category = 1,
 	never_move = 1,
 	fear_immune = 1,
+	not_power_source = {arcane=true, technique=true},
 }
 
 newEntity{ base = "BASE_NPC_PLANT",
diff --git a/game/modules/tome/data/general/npcs/ritch.lua b/game/modules/tome/data/general/npcs/ritch.lua
index 1baaea9601..40e24bf162 100644
--- a/game/modules/tome/data/general/npcs/ritch.lua
+++ b/game/modules/tome/data/general/npcs/ritch.lua
@@ -49,6 +49,7 @@ Vicious predators, they inject corrupting diseases into their foes, and their sh
 			game.player:hasQuest("brotherhood-of-alchemists"):need_part(who, part, self)
 		end
 	end,
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_RITCH",
diff --git a/game/modules/tome/data/general/npcs/rodent.lua b/game/modules/tome/data/general/npcs/rodent.lua
index ec70bdca88..a33f150400 100644
--- a/game/modules/tome/data/general/npcs/rodent.lua
+++ b/game/modules/tome/data/general/npcs/rodent.lua
@@ -37,6 +37,7 @@ newEntity{ --rodent base
 	combat_armor = 1, combat_def = 1,
 	rank = 1,
 	size_category = 1,
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_RODENT",
diff --git a/game/modules/tome/data/general/npcs/sandworm.lua b/game/modules/tome/data/general/npcs/sandworm.lua
index 0257369fd7..19eb783280 100644
--- a/game/modules/tome/data/general/npcs/sandworm.lua
+++ b/game/modules/tome/data/general/npcs/sandworm.lua
@@ -49,6 +49,7 @@ newEntity{
 			game.player:hasQuest("brotherhood-of-alchemists"):need_part(who, part, self)
 		end
 	end,
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_SANDWORM",
diff --git a/game/modules/tome/data/general/npcs/shade.lua b/game/modules/tome/data/general/npcs/shade.lua
index 6ccedcc122..e826d5fd0f 100644
--- a/game/modules/tome/data/general/npcs/shade.lua
+++ b/game/modules/tome/data/general/npcs/shade.lua
@@ -26,6 +26,7 @@ newEntity{
 	type = "undead", subtype = "shade",
 	display = "G", color=colors.DARK_GREY,
 	blood_color = colors.GREY,
+	power_source = {}, -- means forbid randelites
 
 	resolvers.generic(function(e)
 		local base = game.zone:makeEntity(game.level, "actor", e.shade_filter, nil , true)
diff --git a/game/modules/tome/data/general/npcs/skeleton.lua b/game/modules/tome/data/general/npcs/skeleton.lua
index df65e8b611..e699d78e67 100644
--- a/game/modules/tome/data/general/npcs/skeleton.lua
+++ b/game/modules/tome/data/general/npcs/skeleton.lua
@@ -52,6 +52,7 @@ newEntity{
 	poison_immune = 1,
 	see_invisible = 2,
 	undead = 1,
+	not_power_source = {nature=true},
 }
 
 newEntity{ base = "BASE_NPC_SKELETON",
diff --git a/game/modules/tome/data/general/npcs/snake.lua b/game/modules/tome/data/general/npcs/snake.lua
index c4c2cfafe9..96d9d9d7d2 100644
--- a/game/modules/tome/data/general/npcs/snake.lua
+++ b/game/modules/tome/data/general/npcs/snake.lua
@@ -40,6 +40,7 @@ newEntity{
 	stats = { str=14, dex=23, mag=5, con=5 },
 	combat = {sound="creatures/snakes/snake_attack"},
 	combat_armor = 1, combat_def = 1,
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_SNAKE",
diff --git a/game/modules/tome/data/general/npcs/swarm.lua b/game/modules/tome/data/general/npcs/swarm.lua
index 62a7c1db16..07748eb847 100644
--- a/game/modules/tome/data/general/npcs/swarm.lua
+++ b/game/modules/tome/data/general/npcs/swarm.lua
@@ -39,6 +39,7 @@ newEntity{
 	combat_armor = 1, combat_def = 10,
 	rank = 1,
 	size_category = 1,
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_INSECT",
diff --git a/game/modules/tome/data/general/npcs/telugoroth.lua b/game/modules/tome/data/general/npcs/telugoroth.lua
index 8d0a16f03f..e81e745054 100644
--- a/game/modules/tome/data/general/npcs/telugoroth.lua
+++ b/game/modules/tome/data/general/npcs/telugoroth.lua
@@ -36,11 +36,11 @@ local function doTeluvortaSwap(self)
 		-- Randomly take a target
 		local a, id = rng.table(tgts)
 		local target = a
-	
+
 		if target:canBe("teleport") and self:canBe("teleport") then
 			-- first remove the target so the destination tile is empty
 			game.level.map:remove(target.x, target.y, Map.ACTOR)
-			local px, py 
+			local px, py
 			px, py = self.x, self.y
 			if self:teleportRandom(a.x, a.y, 0) then
 				-- return the target at the casters old location
@@ -86,7 +86,7 @@ newEntity{
 	resists = { [DamageType.TEMPORAL] = 100, },
 
 	negative_status_effect_immune = 1,
-	
+	not_power_source = {nature=true},
 }
 
 newEntity{ base = "BASE_NPC_TELUGOROTH",
@@ -153,13 +153,13 @@ newEntity{ base = "BASE_NPC_TELUGOROTH",
 	ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_snake" },
 
 	talent_cd_reduction = {[Talents.T_DUST_TO_DUST]=-3},
-	
+
 	resolvers.talents{
 		[Talents.T_DUST_TO_DUST]={base=3, every=10, max=7},
 		[Talents.T_TEMPORAL_WAKE]={base=3, every=10, max=7},
 	},
 	resolvers.sustains_at_birth(),
-	
+
 	on_act = function(self)
 		doTeluvortaSwap(self)
 	end,
@@ -177,7 +177,7 @@ newEntity{ base = "BASE_NPC_TELUGOROTH",
 	ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_snake" },
 
 	talent_cd_reduction = {[Talents.T_DUST_TO_DUST]=-3},
-	
+
 	resolvers.talents{
 		[Talents.T_DIMENSIONAL_STEP]={base=5, every=10, max=9},
 		[Talents.T_DUST_TO_DUST]={base=4, every=10, max=8},
@@ -203,7 +203,7 @@ newEntity{ base = "BASE_NPC_TELUGOROTH",
 	ai = "tactical", ai_state = { talent_in=2, ai_move="move_snake" },
 
 	talent_cd_reduction = {[Talents.T_DUST_TO_DUST]=-3},
-	
+
 	resolvers.talents{
 		[Talents.T_ANOMALY_TEMPORAL_STORM]=1,
 		[Talents.T_DUST_TO_DUST]={base=4, every=7},
diff --git a/game/modules/tome/data/general/npcs/thieve.lua b/game/modules/tome/data/general/npcs/thieve.lua
index ba45fe5aef..1393911244 100644
--- a/game/modules/tome/data/general/npcs/thieve.lua
+++ b/game/modules/tome/data/general/npcs/thieve.lua
@@ -52,6 +52,7 @@ newEntity{
 	stats = { str=8, dex=15, mag=6, cun=15, con=7 },
 
 	resolvers.talents{ [Talents.T_LETHALITY]={base=1, every=6, max=5}, },
+	power_source = {technique=true},
 }
 
 newEntity{ base = "BASE_NPC_THIEF",
diff --git a/game/modules/tome/data/general/npcs/vampire.lua b/game/modules/tome/data/general/npcs/vampire.lua
index e3d0f6969a..22fbdb37dc 100644
--- a/game/modules/tome/data/general/npcs/vampire.lua
+++ b/game/modules/tome/data/general/npcs/vampire.lua
@@ -56,6 +56,7 @@ newEntity{
 	undead = 1,
 --	free_action = 1,
 --	sleep_immune = 1,
+	not_power_source = {nature=true},
 }
 
 newEntity{ base = "BASE_NPC_VAMPIRE",
@@ -167,7 +168,7 @@ newEntity{ base = "BASE_NPC_VAMPIRE",
 
 -- Arch Zephyr, Vampiric Storm Lord. Wields a bow and lightning magic with equal effectiveness, and moves quickly.
 newEntity{ base = "BASE_NPC_VAMPIRE", unique=true, define_as="ARCH_ZEPHYR",
-	name = "Arch Zephyr", color=colors.BLUE, 
+	name = "Arch Zephyr", color=colors.BLUE,
 	resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_vampire_arch_zephyr.png", display_h=2, display_y=-1}}},
 	desc=[[The robes of this ancient vampire billow with intense winds. Bolts of lightning arc along its body. In its hand it holds a bow, electricity streaking across it.]],
 	level_range = {45, nil}, exp_worth = 1,
diff --git a/game/modules/tome/data/general/npcs/vermin.lua b/game/modules/tome/data/general/npcs/vermin.lua
index c51ab12ccd..03a5142235 100644
--- a/game/modules/tome/data/general/npcs/vermin.lua
+++ b/game/modules/tome/data/general/npcs/vermin.lua
@@ -39,6 +39,7 @@ newEntity{
 	size_category = 1,
 	blind_immune = 1,
 	life_rating = 6,
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_WORM",
diff --git a/game/modules/tome/data/general/npcs/wight.lua b/game/modules/tome/data/general/npcs/wight.lua
index fdd076d0b0..d6e33306ed 100644
--- a/game/modules/tome/data/general/npcs/wight.lua
+++ b/game/modules/tome/data/general/npcs/wight.lua
@@ -63,6 +63,7 @@ newEntity{
 			game.player:hasQuest("brotherhood-of-alchemists"):need_part(who, part, self)
 		end
 	end,
+	not_power_source = {nature=true},
 }
 
 newEntity{ base = "BASE_NPC_WIGHT",
diff --git a/game/modules/tome/data/general/npcs/xorn.lua b/game/modules/tome/data/general/npcs/xorn.lua
index 15510057a3..75ab096ac4 100644
--- a/game/modules/tome/data/general/npcs/xorn.lua
+++ b/game/modules/tome/data/general/npcs/xorn.lua
@@ -57,6 +57,7 @@ newEntity{
 			game.player:hasQuest("brotherhood-of-alchemists"):need_part(who, part, self)
 		end
 	end,
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_XORN",
@@ -176,7 +177,7 @@ newEntity{ base = "BASE_NPC_XORN", define_as = "FULL_HARKOR_ZUN",
 
 	resists = { [DamageType.PHYSICAL] = 50, [DamageType.ACID] = 50, },
 	no_auto_resists = true,
-	
+
 	silence_immune = 1,
 	stun_immune = 1,
 	demon = 1,
@@ -196,7 +197,7 @@ newEntity{ base = "BASE_NPC_XORN", define_as = "FULL_HARKOR_ZUN",
 		[Talents.T_CRYSTALLINE_FOCUS]={base=4, every=7, max=8},
 		[Talents.T_VOLCANO]={base=2, every=7, max=4},
 	},
-	
+
 	resolvers.inscriptions(1, {"shielding rune"}),
 	resolvers.sustains_at_birth(),
 
diff --git a/game/modules/tome/data/general/npcs/ziguranth.lua b/game/modules/tome/data/general/npcs/ziguranth.lua
index c6bd69bb60..200f534537 100644
--- a/game/modules/tome/data/general/npcs/ziguranth.lua
+++ b/game/modules/tome/data/general/npcs/ziguranth.lua
@@ -49,6 +49,7 @@ newEntity{
 	autolevel = "warrior",
 	ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=3, },
 	stats = { str=20, dex=15, mag=1, con=16, wil=19 },
+	not_power_source = {arcane=true},
 }
 
 newEntity{ base = "BASE_NPC_ZIGURANTH",
diff --git a/game/modules/tome/data/gfx/shockbolt/tactical_enemy_strong.png b/game/modules/tome/data/gfx/shockbolt/tactical_enemy_strong.png
new file mode 100644
index 0000000000000000000000000000000000000000..bed9de0e766d16ccd11c0a4c7bb2d0aef575d91f
GIT binary patch
literal 5855
zcmV<579i<~P)<h;3K|Lk000e1NJLTq002M$002M;1^@s6s%dfF000N7X+uL$P-t&-
zZ*ypGa3D!TLm+T+Z)Rz1WdHzp+U=QXP*hhMhM#+Tffi`CRzV;%Dw_&)(<mb10;sql
z3aAi8SsEk)YSV(mEvON9B|%iieG3|c(ZobaLZav(DiS2>D9Jc#M&rcESjMr&jAiCW
z<A{5#%#W#}pQ=;$yQgm7zVG{e=hQiMz_S~G*blOEjD}Hz!qsCF64e$Lu||P{AVQK;
zbEgiE9T*1?JtBGlk0Zd{a|i&9ei3=GQ+YM4()78hAXoy^Ql}b>Aj|@S@{LoCAbbd@
z3}X`#K{yJiGEDKG09A@9z6q!daibzY1W;y}Vmm;YVv5y(GA}j52%-ig4sj7NMvz5<
z`wymX0HFQQ<gCmTgWiytli?rYpQg|C57cNi{LeA!XBYu|Qhft8T8%m~*_fO<C2NX7
z?Grn-AWd)34amwg>eWI18vj5)tuMgXghaLJ*FV>oJimANQQ!Jv7#;wE?onURVAvc4
z&dHDZJnw_U1~|Abb-E$%VID;tyzJiOUo#Q`1O!2pNF-93Ty9}$X{l&qWo=`lw6(K$
zaCB6)ZP(t($+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7q<Jr+CXT;kXo<w;m)
zSmo7}9tl|hFgASX`zaBHihShNmPKY>=Bco_b=~L1Yrp(O-MY+Zn??Xa>kKn<1weQH
z2glJqayMw#5x#-^EdDYH%o2bb0dxXbo$urv+O>m}=%!0_vkJfnA*>{&*Y#{IC%TEV
zlZRP=rU57-CACRpqMKuA=ReH=sCa=yYGPIZ{Mm^X0NlT<WAzsS%#x5w+q9%@np$TB
zfI9#@Iyp05s}#DdV|zUSZJm+YrdgcMFbQdiNExde`;I(eCV!16F@NTVM|L*={OF@{
z3_XLpqH>{DpKM%kaauP3y4{&)>`QTsyKnx>5&-gK;PQ#SKaCBXbBWkKaF5-#ZU=Su
zRuL2xbZTL=g%AR1Y*-LXuF_qT<1>h}S#G4$Hm@--#_I9e*7#lkF$u{4j%k~oc5Gu~
z^+f<Nfb+RY%q1$i;gQ|u5>@0rfDHhy%Nbm+J&RNbRIy9Rpa7uTITH}6b)gsCTncNx
zBF{OtT=Xk4f2QzN$OXS7JkLX+?13Gi@}tn%i59H2*n8}mcSK%3UyXuVfr!FD6@?@v
zNJ!z>A~iAEMHMlOZF_%h)A?B)EdYA~oB&{nXa+!&nG4Ju=PXlmo@t1DQ1-ug<jJ=$
zr2${q{D7i%O>nPs#uq}Cgb>0x6Ej@ZSX~oB++m$r1HegAsiZckrDWjwvLJ*I?AWTz
pB+fbGv`yjIQf~4-GYe)u^}i1ZQ?f5yzI^}y002ovPDHLkV1glf?<D{L

literal 0
HcmV?d00001

diff --git a/game/modules/tome/data/zones/abashed-expanse/zone.lua b/game/modules/tome/data/zones/abashed-expanse/zone.lua
index d122c712c3..cbc8a66e2e 100644
--- a/game/modules/tome/data/zones/abashed-expanse/zone.lua
+++ b/game/modules/tome/data/zones/abashed-expanse/zone.lua
@@ -48,7 +48,7 @@ return {
 			door = "GRASS",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 20},
 			filters = { {max_ood=2}, },
 			guardian = "SPACIAL_DISTURBANCE",
diff --git a/game/modules/tome/data/zones/ancient-elven-ruins/zone.lua b/game/modules/tome/data/zones/ancient-elven-ruins/zone.lua
index 71d7aa3476..9574549791 100644
--- a/game/modules/tome/data/zones/ancient-elven-ruins/zone.lua
+++ b/game/modules/tome/data/zones/ancient-elven-ruins/zone.lua
@@ -44,7 +44,7 @@ return {
 			down = "DOWN",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 20},
 			guardian = "GREATER_MUMMY_LORD",
 		},
diff --git a/game/modules/tome/data/zones/ardhungol/zone.lua b/game/modules/tome/data/zones/ardhungol/zone.lua
index 2272e090f1..f85dfe29c3 100644
--- a/game/modules/tome/data/zones/ardhungol/zone.lua
+++ b/game/modules/tome/data/zones/ardhungol/zone.lua
@@ -46,7 +46,7 @@ return {
 			door = "CAVEFLOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {70, 80},
 			guardian = "UNGOLE",
 		},
diff --git a/game/modules/tome/data/zones/blighted-ruins/zone.lua b/game/modules/tome/data/zones/blighted-ruins/zone.lua
index ce2a69e7dd..d1f1eb0beb 100644
--- a/game/modules/tome/data/zones/blighted-ruins/zone.lua
+++ b/game/modules/tome/data/zones/blighted-ruins/zone.lua
@@ -47,7 +47,7 @@ return {
 			door = "DOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			filters = { {max_ood=2}, },
 			guardian = "HALF_BONE_GIANT", guardian_level = 1,
diff --git a/game/modules/tome/data/zones/briagh-lair/zone.lua b/game/modules/tome/data/zones/briagh-lair/zone.lua
index 5b000ee93c..1b35e5ced8 100644
--- a/game/modules/tome/data/zones/briagh-lair/zone.lua
+++ b/game/modules/tome/data/zones/briagh-lair/zone.lua
@@ -43,7 +43,7 @@ return {
 			door = "UNDERGROUND_SAND",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {120, 140},
 			guardian = "BRIAGH",
 		},
diff --git a/game/modules/tome/data/zones/charred-scar/zone.lua b/game/modules/tome/data/zones/charred-scar/zone.lua
index 52bcade825..4b026e4a2d 100644
--- a/game/modules/tome/data/zones/charred-scar/zone.lua
+++ b/game/modules/tome/data/zones/charred-scar/zone.lua
@@ -41,7 +41,7 @@ return {
 			map = "zones/charred-scar",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			area = {x1=0, x2=11, y1=30, y2=410},
 			nb_npc = {30, 30},
 			rate = 0.25,
diff --git a/game/modules/tome/data/zones/crypt-kryl-feijan/zone.lua b/game/modules/tome/data/zones/crypt-kryl-feijan/zone.lua
index 177c0b03db..65ee05bba0 100644
--- a/game/modules/tome/data/zones/crypt-kryl-feijan/zone.lua
+++ b/game/modules/tome/data/zones/crypt-kryl-feijan/zone.lua
@@ -46,7 +46,7 @@ return {
 			door = "DOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 20},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/daikara/zone.lua b/game/modules/tome/data/zones/daikara/zone.lua
index 89d570c190..0814de9f2f 100644
--- a/game/modules/tome/data/zones/daikara/zone.lua
+++ b/game/modules/tome/data/zones/daikara/zone.lua
@@ -48,7 +48,7 @@ return {
 			door = "ROCKY_GROUND",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			guardian = "RANTHA_THE_WORM",
 		},
diff --git a/game/modules/tome/data/zones/deep-bellow/zone.lua b/game/modules/tome/data/zones/deep-bellow/zone.lua
index ab31ba3ceb..71c7fb2f24 100644
--- a/game/modules/tome/data/zones/deep-bellow/zone.lua
+++ b/game/modules/tome/data/zones/deep-bellow/zone.lua
@@ -42,7 +42,7 @@ return {
 			door = "UNDERGROUND_FLOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			filters = { {max_ood=2}, },
 		},
diff --git a/game/modules/tome/data/zones/demon-plane/zone.lua b/game/modules/tome/data/zones/demon-plane/zone.lua
index a8e34dd4f1..24330f6477 100644
--- a/game/modules/tome/data/zones/demon-plane/zone.lua
+++ b/game/modules/tome/data/zones/demon-plane/zone.lua
@@ -51,7 +51,7 @@ return {
 			},
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {40, 40},
 			guardian = "DRAEBOR",
 		},
diff --git a/game/modules/tome/data/zones/dreadfell-ambush/zone.lua b/game/modules/tome/data/zones/dreadfell-ambush/zone.lua
index 05b189c793..1f368829ea 100644
--- a/game/modules/tome/data/zones/dreadfell-ambush/zone.lua
+++ b/game/modules/tome/data/zones/dreadfell-ambush/zone.lua
@@ -38,7 +38,7 @@ return {
 			map = "zones/dreadfell-ambush",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {0, 0},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/dreadfell/zone.lua b/game/modules/tome/data/zones/dreadfell/zone.lua
index cb2e5e24a3..43ead351d1 100644
--- a/game/modules/tome/data/zones/dreadfell/zone.lua
+++ b/game/modules/tome/data/zones/dreadfell/zone.lua
@@ -49,7 +49,7 @@ return {
 			door = "DOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			guardian = "THE_MASTER",
 		},
diff --git a/game/modules/tome/data/zones/eidolon-plane/zone.lua b/game/modules/tome/data/zones/eidolon-plane/zone.lua
index 60c80bafb4..78dbc63b99 100644
--- a/game/modules/tome/data/zones/eidolon-plane/zone.lua
+++ b/game/modules/tome/data/zones/eidolon-plane/zone.lua
@@ -41,7 +41,7 @@ return {
 			down = "VOID",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {0, 0},
 			guardian = "EIDOLON",
 		},
diff --git a/game/modules/tome/data/zones/eruan/zone.lua b/game/modules/tome/data/zones/eruan/zone.lua
index f553bbe7db..255cfd15a3 100644
--- a/game/modules/tome/data/zones/eruan/zone.lua
+++ b/game/modules/tome/data/zones/eruan/zone.lua
@@ -55,7 +55,7 @@ return {
 			lite_room_chance = 100,
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/flooded-cave/zone.lua b/game/modules/tome/data/zones/flooded-cave/zone.lua
index 7c6b4eb478..a1a6118138 100644
--- a/game/modules/tome/data/zones/flooded-cave/zone.lua
+++ b/game/modules/tome/data/zones/flooded-cave/zone.lua
@@ -46,7 +46,7 @@ return {
 			door = "WATER_FLOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {30, 40},
 --			guardian = "UKLLMSWWIK",
 		},
diff --git a/game/modules/tome/data/zones/golem-graveyard/zone.lua b/game/modules/tome/data/zones/golem-graveyard/zone.lua
index 37392bc628..9718b8acc4 100644
--- a/game/modules/tome/data/zones/golem-graveyard/zone.lua
+++ b/game/modules/tome/data/zones/golem-graveyard/zone.lua
@@ -45,7 +45,7 @@ return {
 			down = "GRASS_DOWN6",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {6, 8},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/gorbat-pride/zone.lua b/game/modules/tome/data/zones/gorbat-pride/zone.lua
index aed469e7b7..b3adac01e3 100644
--- a/game/modules/tome/data/zones/gorbat-pride/zone.lua
+++ b/game/modules/tome/data/zones/gorbat-pride/zone.lua
@@ -59,7 +59,7 @@ return {
 			},
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			guardian = "GORBAT",
 		},
diff --git a/game/modules/tome/data/zones/grushnak-pride/zone.lua b/game/modules/tome/data/zones/grushnak-pride/zone.lua
index 4bba647aca..932715a230 100644
--- a/game/modules/tome/data/zones/grushnak-pride/zone.lua
+++ b/game/modules/tome/data/zones/grushnak-pride/zone.lua
@@ -55,7 +55,7 @@ return {
 			['+'] = "UNDERGROUND_FLOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			guardian = "GRUSHNAK",
 		},
diff --git a/game/modules/tome/data/zones/halfling-ruins/zone.lua b/game/modules/tome/data/zones/halfling-ruins/zone.lua
index 943e5fe0b4..58e9d406c2 100644
--- a/game/modules/tome/data/zones/halfling-ruins/zone.lua
+++ b/game/modules/tome/data/zones/halfling-ruins/zone.lua
@@ -46,7 +46,7 @@ return {
 			force_last_stair = true,
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/heart-gloom/zone.lua b/game/modules/tome/data/zones/heart-gloom/zone.lua
index 713a3cda4f..22b8365741 100644
--- a/game/modules/tome/data/zones/heart-gloom/zone.lua
+++ b/game/modules/tome/data/zones/heart-gloom/zone.lua
@@ -47,7 +47,7 @@ return {
 			door = "UNDERGROUND_FLOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			filters = { {max_ood=2}, },
 			guardian = "WITHERING_THING",
diff --git a/game/modules/tome/data/zones/high-peak/zone.lua b/game/modules/tome/data/zones/high-peak/zone.lua
index 3868fc7ede..9f024447e1 100644
--- a/game/modules/tome/data/zones/high-peak/zone.lua
+++ b/game/modules/tome/data/zones/high-peak/zone.lua
@@ -105,7 +105,7 @@ return {
 					map = "zones/high-peak-last",
 				},
 				actor = {
-					class = "engine.generator.actor.Random",
+					class = "mod.class.generator.actor.Random",
 					nb_npc = {0, 0},
 				},
 			},
diff --git a/game/modules/tome/data/zones/illusory-castle/zone.lua b/game/modules/tome/data/zones/illusory-castle/zone.lua
index c378d8603a..2014fb2e2d 100644
--- a/game/modules/tome/data/zones/illusory-castle/zone.lua
+++ b/game/modules/tome/data/zones/illusory-castle/zone.lua
@@ -44,7 +44,7 @@ return {
 			door = "DOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 --			nb_npc = {20*5, 20*5},
 			nb_npc = {0, 0},
 		},
diff --git a/game/modules/tome/data/zones/lake-nur/zone.lua b/game/modules/tome/data/zones/lake-nur/zone.lua
index faea62b646..1d6b72add9 100644
--- a/game/modules/tome/data/zones/lake-nur/zone.lua
+++ b/game/modules/tome/data/zones/lake-nur/zone.lua
@@ -46,7 +46,7 @@ return {
 			door = "WATER_DOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 25},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/mark-spellblaze/zone.lua b/game/modules/tome/data/zones/mark-spellblaze/zone.lua
index e4974809fb..3ed0fc132a 100644
--- a/game/modules/tome/data/zones/mark-spellblaze/zone.lua
+++ b/game/modules/tome/data/zones/mark-spellblaze/zone.lua
@@ -51,7 +51,7 @@ return {
 			},
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/maze/zone.lua b/game/modules/tome/data/zones/maze/zone.lua
index 33a2bd1fbf..71e4973236 100644
--- a/game/modules/tome/data/zones/maze/zone.lua
+++ b/game/modules/tome/data/zones/maze/zone.lua
@@ -40,7 +40,7 @@ return {
 			floor = "OLD_FLOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {50, 60},
 			guardian = "MINOTAUR_MAZE",
 			guardian_alert = true,
diff --git a/game/modules/tome/data/zones/murgol-lair/zone.lua b/game/modules/tome/data/zones/murgol-lair/zone.lua
index 0b757652e8..fd29d87838 100644
--- a/game/modules/tome/data/zones/murgol-lair/zone.lua
+++ b/game/modules/tome/data/zones/murgol-lair/zone.lua
@@ -44,7 +44,7 @@ return {
 			door = "WATER_DOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			filters = { {max_ood=2}, },
 			guardian = "MURGOL",
diff --git a/game/modules/tome/data/zones/norgos-lair/zone.lua b/game/modules/tome/data/zones/norgos-lair/zone.lua
index 257f579287..9a53cb8061 100644
--- a/game/modules/tome/data/zones/norgos-lair/zone.lua
+++ b/game/modules/tome/data/zones/norgos-lair/zone.lua
@@ -47,7 +47,7 @@ return {
 			door = "ROCKY_GROUND",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			filters = { {max_ood=2}, },
 			guardian = "NORGOS",
diff --git a/game/modules/tome/data/zones/old-forest/zone.lua b/game/modules/tome/data/zones/old-forest/zone.lua
index 460149a63d..c09b74273f 100644
--- a/game/modules/tome/data/zones/old-forest/zone.lua
+++ b/game/modules/tome/data/zones/old-forest/zone.lua
@@ -49,7 +49,7 @@ return {
 			door = "GRASS",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			guardian = "WRATHROOT",
 		},
diff --git a/game/modules/tome/data/zones/orc-breeding-pit/zone.lua b/game/modules/tome/data/zones/orc-breeding-pit/zone.lua
index 1f0501fc0c..e84c82daff 100644
--- a/game/modules/tome/data/zones/orc-breeding-pit/zone.lua
+++ b/game/modules/tome/data/zones/orc-breeding-pit/zone.lua
@@ -43,7 +43,7 @@ return {
 			door = "UNDERGROUND_FLOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {40, 50},
 			guardian = "GREATMOTHER",
 		},
diff --git a/game/modules/tome/data/zones/paradox-plane/zone.lua b/game/modules/tome/data/zones/paradox-plane/zone.lua
index 916ef45724..11ee9350b9 100644
--- a/game/modules/tome/data/zones/paradox-plane/zone.lua
+++ b/game/modules/tome/data/zones/paradox-plane/zone.lua
@@ -53,7 +53,7 @@ return {
 				edge_entrances = {4,6},
 			},
 			actor = {
-				class = "engine.generator.actor.Random",
+				class = "mod.class.generator.actor.Random",
 				nb_npc = {1, 1},
 				guardian = "EPOCH",
 			},
diff --git a/game/modules/tome/data/zones/rak-shor-pride/zone.lua b/game/modules/tome/data/zones/rak-shor-pride/zone.lua
index b8b585aea3..826682e76e 100644
--- a/game/modules/tome/data/zones/rak-shor-pride/zone.lua
+++ b/game/modules/tome/data/zones/rak-shor-pride/zone.lua
@@ -59,7 +59,7 @@ return {
 			},
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			guardian = "RAK_SHOR",
 		},
diff --git a/game/modules/tome/data/zones/reknor-escape/zone.lua b/game/modules/tome/data/zones/reknor-escape/zone.lua
index 49307e13c2..303bb62b5a 100644
--- a/game/modules/tome/data/zones/reknor-escape/zone.lua
+++ b/game/modules/tome/data/zones/reknor-escape/zone.lua
@@ -44,7 +44,7 @@ return {
 			force_down = true,
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {50, 60},
 			filters = { {max_ood=2}, },
 			nb_spots = 2, on_spot_chance = 35,
diff --git a/game/modules/tome/data/zones/reknor/zone.lua b/game/modules/tome/data/zones/reknor/zone.lua
index 23f8d97cea..dce08c595c 100644
--- a/game/modules/tome/data/zones/reknor/zone.lua
+++ b/game/modules/tome/data/zones/reknor/zone.lua
@@ -43,7 +43,7 @@ return {
 			down = "DOWN",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {50, 60},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/rhaloren-camp/zone.lua b/game/modules/tome/data/zones/rhaloren-camp/zone.lua
index ec71082e28..06e41532e6 100644
--- a/game/modules/tome/data/zones/rhaloren-camp/zone.lua
+++ b/game/modules/tome/data/zones/rhaloren-camp/zone.lua
@@ -44,7 +44,7 @@ return {
 			door = "DOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			filters = { {max_ood=2}, },
 		},
diff --git a/game/modules/tome/data/zones/ring-of-blood/zone.lua b/game/modules/tome/data/zones/ring-of-blood/zone.lua
index e4b40e6d15..d77c01b520 100644
--- a/game/modules/tome/data/zones/ring-of-blood/zone.lua
+++ b/game/modules/tome/data/zones/ring-of-blood/zone.lua
@@ -47,7 +47,7 @@ return {
 			down = "DOWN",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {10, 15},
 		},
 		object = {
@@ -75,7 +75,7 @@ return {
 					map = "zones/ring-of-blood",
 				},
 				actor = {
-					class = "engine.generator.actor.Random",
+					class = "mod.class.generator.actor.Random",
 					nb_npc = {0, 0},
 				},
 				object = {
diff --git a/game/modules/tome/data/zones/ritch-tunnels/zone.lua b/game/modules/tome/data/zones/ritch-tunnels/zone.lua
index 857a09d385..59933cd6ac 100644
--- a/game/modules/tome/data/zones/ritch-tunnels/zone.lua
+++ b/game/modules/tome/data/zones/ritch-tunnels/zone.lua
@@ -46,7 +46,7 @@ return {
 			door = "UNDERGROUND_SAND",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			filters = { {max_ood=2}, },
 			guardian = "HIVE_MOTHER",
diff --git a/game/modules/tome/data/zones/ruined-dungeon/zone.lua b/game/modules/tome/data/zones/ruined-dungeon/zone.lua
index 012a28e28d..26199f12b1 100644
--- a/game/modules/tome/data/zones/ruined-dungeon/zone.lua
+++ b/game/modules/tome/data/zones/ruined-dungeon/zone.lua
@@ -36,7 +36,7 @@ return {
 			map = "zones/ruined-dungeon",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {60, 60},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/ruins-kor-pul/zone.lua b/game/modules/tome/data/zones/ruins-kor-pul/zone.lua
index b50c572607..6aa17e724f 100644
--- a/game/modules/tome/data/zones/ruins-kor-pul/zone.lua
+++ b/game/modules/tome/data/zones/ruins-kor-pul/zone.lua
@@ -45,7 +45,7 @@ return {
 			door = "DOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.OnSpots",
+			class = "mod.class.generator.actor.OnSpots",
 			nb_npc = {20, 30},
 			filters = { {max_ood=2}, },
 			nb_spots = 2, on_spot_chance = 35,
diff --git a/game/modules/tome/data/zones/scintillating-caves/zone.lua b/game/modules/tome/data/zones/scintillating-caves/zone.lua
index 5cd88fd89a..b5bdc702e0 100644
--- a/game/modules/tome/data/zones/scintillating-caves/zone.lua
+++ b/game/modules/tome/data/zones/scintillating-caves/zone.lua
@@ -42,7 +42,7 @@ return {
 			door = "CRYSTAL_FLOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			filters = { {max_ood=2}, },
 			guardian = "SPELLBLAZE_CRYSTAL",
diff --git a/game/modules/tome/data/zones/shadow-crypt/zone.lua b/game/modules/tome/data/zones/shadow-crypt/zone.lua
index afb13d57b6..0444ae6fad 100644
--- a/game/modules/tome/data/zones/shadow-crypt/zone.lua
+++ b/game/modules/tome/data/zones/shadow-crypt/zone.lua
@@ -46,7 +46,7 @@ return {
 			down = "DOWN",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 20},
 --			guardian = "CULTIST_RAK_SHOR",
 		},
diff --git a/game/modules/tome/data/zones/shertul-fortress-caldizar/zone.lua b/game/modules/tome/data/zones/shertul-fortress-caldizar/zone.lua
index fc3030fd20..cad0b88da3 100644
--- a/game/modules/tome/data/zones/shertul-fortress-caldizar/zone.lua
+++ b/game/modules/tome/data/zones/shertul-fortress-caldizar/zone.lua
@@ -41,7 +41,7 @@ return {
 			map = "zones/shertul-fortress-caldizar",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {0, 0},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/shertul-fortress/zone.lua b/game/modules/tome/data/zones/shertul-fortress/zone.lua
index 628d5545b3..6c20bfd838 100644
--- a/game/modules/tome/data/zones/shertul-fortress/zone.lua
+++ b/game/modules/tome/data/zones/shertul-fortress/zone.lua
@@ -42,7 +42,7 @@ return {
 			map = "zones/shertul-fortress",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {0, 0},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/slazish-fen/zone.lua b/game/modules/tome/data/zones/slazish-fen/zone.lua
index da411f386f..2b294c9a83 100644
--- a/game/modules/tome/data/zones/slazish-fen/zone.lua
+++ b/game/modules/tome/data/zones/slazish-fen/zone.lua
@@ -55,7 +55,7 @@ return {
 --			lite_room_chance = 100,
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {7, 10},
 			filters = { {max_ood=2}, },
 		},
diff --git a/game/modules/tome/data/zones/slime-tunnels/zone.lua b/game/modules/tome/data/zones/slime-tunnels/zone.lua
index 63b5c5929c..ae43381913 100644
--- a/game/modules/tome/data/zones/slime-tunnels/zone.lua
+++ b/game/modules/tome/data/zones/slime-tunnels/zone.lua
@@ -37,7 +37,7 @@ return {
 			map = "zones/slime-tunnels",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 		},
 		trap = {
diff --git a/game/modules/tome/data/zones/tannen-tower/zone.lua b/game/modules/tome/data/zones/tannen-tower/zone.lua
index 4d682c497e..820d059e86 100644
--- a/game/modules/tome/data/zones/tannen-tower/zone.lua
+++ b/game/modules/tome/data/zones/tannen-tower/zone.lua
@@ -37,7 +37,7 @@ return {
 			class = "engine.generator.map.Static",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {0, 0},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/telmur/zone.lua b/game/modules/tome/data/zones/telmur/zone.lua
index b9079463ca..0a3dc5fe84 100644
--- a/game/modules/tome/data/zones/telmur/zone.lua
+++ b/game/modules/tome/data/zones/telmur/zone.lua
@@ -44,7 +44,7 @@ return {
 			door = "DOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {14, 14},
 			guardian = "SHADE_OF_TELOS",
 		},
diff --git a/game/modules/tome/data/zones/tempest-peak/zone.lua b/game/modules/tome/data/zones/tempest-peak/zone.lua
index 5ae9c57109..069c0bed74 100644
--- a/game/modules/tome/data/zones/tempest-peak/zone.lua
+++ b/game/modules/tome/data/zones/tempest-peak/zone.lua
@@ -45,7 +45,7 @@ return {
 			door = "DOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {40, 50},
 			guardian = "URKIS",
 		},
diff --git a/game/modules/tome/data/zones/temple-of-creation/zone.lua b/game/modules/tome/data/zones/temple-of-creation/zone.lua
index 9c7f61d050..927174de7c 100644
--- a/game/modules/tome/data/zones/temple-of-creation/zone.lua
+++ b/game/modules/tome/data/zones/temple-of-creation/zone.lua
@@ -45,7 +45,7 @@ return {
 			door = "WATER_FLOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {30, 40},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/temporal-rift/zone.lua b/game/modules/tome/data/zones/temporal-rift/zone.lua
index ab8cf458e8..57bb8c46ff 100644
--- a/game/modules/tome/data/zones/temporal-rift/zone.lua
+++ b/game/modules/tome/data/zones/temporal-rift/zone.lua
@@ -57,7 +57,7 @@ return {
 				edge_entrances = {4,6},
 			},
 			actor = {
-				class = "engine.generator.actor.Random",
+				class = "mod.class.generator.actor.Random",
 				filters = {{type="elemental", subtype="temporal",}},
 				nb_npc = {15, 25},
 			},
@@ -70,7 +70,7 @@ return {
 				map = "towns/lumberjack-village",
 			},
 			actor = {
-				class = "engine.generator.actor.Random",
+				class = "mod.class.generator.actor.Random",
 				filters = {{type="horror", subtype="temporal",}},
 				nb_npc = {3, 3},
 			},
@@ -91,7 +91,7 @@ return {
 				door = "ROCKY_GROUND",
 			},
 			actor = {
-				class = "engine.generator.actor.Random",
+				class = "mod.class.generator.actor.Random",
 				filters = {{type="horror", subtype="temporal",}},
 				nb_npc = {15, 25},
 			},
@@ -104,7 +104,7 @@ return {
 				map = "zones/lake-nur",
 			},
 			actor = {
-				class = "engine.generator.actor.Random",
+				class = "mod.class.generator.actor.Random",
 				nb_npc = {0, 0},
 			},
 		} },
@@ -131,11 +131,11 @@ return {
 		elseif lev == 2 and not game.level.shown_warning then
 			Dialog:simplePopup("Temporal Rift", "This looks like Maj'Eyal's forest but it looks strangely distorted, beware...")
 			game.level.shown_warning = true
-			require("engine.generator.actor.Random").new(game.zone, game.level.map, game.level, {}):generateGuardian("BEN_CRUTHDAR_ABOMINATION")
+			require("mod.class.generator.actor.Random").new(game.zone, game.level.map, game.level, {}):generateGuardian("BEN_CRUTHDAR_ABOMINATION")
 		elseif lev == 3 and not game.level.shown_warning then
 			Dialog:simplePopup("Temporal Rift", "As you pass the rift you see what seems to be the Daikara mountains, yet they are not.")
 			game.level.shown_warning = true
-			require("engine.generator.actor.Random").new(game.zone, game.level.map, game.level, {}):generateGuardian("ABOMINATION_RANTHA")
+			require("mod.class.generator.actor.Random").new(game.zone, game.level.map, game.level, {}):generateGuardian("ABOMINATION_RANTHA")
 		elseif lev == 4 and not game.level.shown_warning then
 			Dialog:simplePopup("Temporal Rift", "The peace of this place has been disturbed.")
 			game.level.shown_warning = true
diff --git a/game/modules/tome/data/zones/test/zone.lua b/game/modules/tome/data/zones/test/zone.lua
index 4e29fcca39..0020404a20 100644
--- a/game/modules/tome/data/zones/test/zone.lua
+++ b/game/modules/tome/data/zones/test/zone.lua
@@ -66,7 +66,7 @@ return {
 --]]
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {0, 0},
 		},
 --[[
diff --git a/game/modules/tome/data/zones/thieves-tunnels/zone.lua b/game/modules/tome/data/zones/thieves-tunnels/zone.lua
index 6827ca947f..88075dfff7 100644
--- a/game/modules/tome/data/zones/thieves-tunnels/zone.lua
+++ b/game/modules/tome/data/zones/thieves-tunnels/zone.lua
@@ -37,7 +37,7 @@ return {
 			up = "OLD_FLOOR",
 			down = "DOWN",
 		},
-		actor = { class = "engine.generator.actor.Random",nb_npc = {5, 7}, },
+		actor = { class = "mod.class.generator.actor.Random",nb_npc = {5, 7}, },
 		trap = { class = "engine.generator.trap.Random", nb_trap = {3, 3}, },
 	},
 	levels = { [2] = {
diff --git a/game/modules/tome/data/zones/town-angolwen/zone.lua b/game/modules/tome/data/zones/town-angolwen/zone.lua
index 79954f9fde..f1643e65f8 100644
--- a/game/modules/tome/data/zones/town-angolwen/zone.lua
+++ b/game/modules/tome/data/zones/town-angolwen/zone.lua
@@ -42,7 +42,7 @@ return {
 			map = "towns/angolwen",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {10, 10},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/town-derth/zone.lua b/game/modules/tome/data/zones/town-derth/zone.lua
index 5e1e13e7c1..c3c6157016 100644
--- a/game/modules/tome/data/zones/town-derth/zone.lua
+++ b/game/modules/tome/data/zones/town-derth/zone.lua
@@ -40,7 +40,7 @@ return {
 			map = "towns/derth",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {10, 10},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/town-elvala/zone.lua b/game/modules/tome/data/zones/town-elvala/zone.lua
index f75170cc14..ebe0970f19 100644
--- a/game/modules/tome/data/zones/town-elvala/zone.lua
+++ b/game/modules/tome/data/zones/town-elvala/zone.lua
@@ -40,7 +40,7 @@ return {
 			map = "towns/elvala",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {10, 10},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/town-gates-of-morning/zone.lua b/game/modules/tome/data/zones/town-gates-of-morning/zone.lua
index eb6cc04957..9d9dcb1509 100644
--- a/game/modules/tome/data/zones/town-gates-of-morning/zone.lua
+++ b/game/modules/tome/data/zones/town-gates-of-morning/zone.lua
@@ -41,7 +41,7 @@ return {
 			map = "towns/gates-of-morning",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			area = {x1=6, x2=46, y1=3, y2=47},
 			nb_npc = {10, 10},
 		},
diff --git a/game/modules/tome/data/zones/town-irkkk/zone.lua b/game/modules/tome/data/zones/town-irkkk/zone.lua
index d170d79a80..53d23571b6 100644
--- a/game/modules/tome/data/zones/town-irkkk/zone.lua
+++ b/game/modules/tome/data/zones/town-irkkk/zone.lua
@@ -40,7 +40,7 @@ return {
 			map = "towns/irkkk",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {10, 10},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/town-iron-council/zone.lua b/game/modules/tome/data/zones/town-iron-council/zone.lua
index df1d13cb32..351b989cb0 100644
--- a/game/modules/tome/data/zones/town-iron-council/zone.lua
+++ b/game/modules/tome/data/zones/town-iron-council/zone.lua
@@ -39,7 +39,7 @@ return {
 			map = "towns/iron-council",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {10, 10},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/town-last-hope/zone.lua b/game/modules/tome/data/zones/town-last-hope/zone.lua
index 20468e0646..1244a991e2 100644
--- a/game/modules/tome/data/zones/town-last-hope/zone.lua
+++ b/game/modules/tome/data/zones/town-last-hope/zone.lua
@@ -40,7 +40,7 @@ return {
 			map = "towns/last-hope",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {10, 10},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/town-lumberjack-village/zone.lua b/game/modules/tome/data/zones/town-lumberjack-village/zone.lua
index f28541a6f5..594159783a 100644
--- a/game/modules/tome/data/zones/town-lumberjack-village/zone.lua
+++ b/game/modules/tome/data/zones/town-lumberjack-village/zone.lua
@@ -37,7 +37,7 @@ return {
 			map = "towns/lumberjack-village",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 20},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/town-shatur/zone.lua b/game/modules/tome/data/zones/town-shatur/zone.lua
index da7aed860b..4d30847e4a 100644
--- a/game/modules/tome/data/zones/town-shatur/zone.lua
+++ b/game/modules/tome/data/zones/town-shatur/zone.lua
@@ -40,7 +40,7 @@ return {
 			map = "towns/shatur",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {10, 10},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/town-zigur/zone.lua b/game/modules/tome/data/zones/town-zigur/zone.lua
index 9970b63e69..5beacbdd8d 100644
--- a/game/modules/tome/data/zones/town-zigur/zone.lua
+++ b/game/modules/tome/data/zones/town-zigur/zone.lua
@@ -42,7 +42,7 @@ return {
 			map = "towns/zigur",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {0, 0},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/trollmire/zone.lua b/game/modules/tome/data/zones/trollmire/zone.lua
index 51c2a0646f..3be0ec9795 100644
--- a/game/modules/tome/data/zones/trollmire/zone.lua
+++ b/game/modules/tome/data/zones/trollmire/zone.lua
@@ -58,7 +58,7 @@ return {
 			lite_room_chance = 100,
 		},
 		actor = {
-			class = "engine.generator.actor.OnSpots",
+			class = "mod.class.generator.actor.OnSpots",
 			nb_npc = {20, 30},
 			filters = { {max_ood=2}, },
 			nb_spots = 2, on_spot_chance = 35,
diff --git a/game/modules/tome/data/zones/tutorial-combat-stats/zone.lua b/game/modules/tome/data/zones/tutorial-combat-stats/zone.lua
index 4dcd86de88..34d6071a7a 100644
--- a/game/modules/tome/data/zones/tutorial-combat-stats/zone.lua
+++ b/game/modules/tome/data/zones/tutorial-combat-stats/zone.lua
@@ -36,7 +36,7 @@ return {
 			class = "engine.generator.map.Static",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {0, 0},
 --			guardian = "LONE_WOLF",
 		},
diff --git a/game/modules/tome/data/zones/tutorial/zone.lua b/game/modules/tome/data/zones/tutorial/zone.lua
index 2c7ec112ff..a9e8fce9e0 100644
--- a/game/modules/tome/data/zones/tutorial/zone.lua
+++ b/game/modules/tome/data/zones/tutorial/zone.lua
@@ -36,7 +36,7 @@ return {
 			class = "engine.generator.map.Static",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {0, 0},
 --			guardian = "LONE_WOLF",
 		},
diff --git a/game/modules/tome/data/zones/unremarkable-cave/zone.lua b/game/modules/tome/data/zones/unremarkable-cave/zone.lua
index 8f774406a9..b54a3011db 100644
--- a/game/modules/tome/data/zones/unremarkable-cave/zone.lua
+++ b/game/modules/tome/data/zones/unremarkable-cave/zone.lua
@@ -37,7 +37,7 @@ return {
 			map = "zones/unremarkable-cave",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			area = {x1=0, x2=85, y1=0, y2=49},
 			nb_npc = {50, 60},
 		},
diff --git a/game/modules/tome/data/zones/valley-moon-caverns/zone.lua b/game/modules/tome/data/zones/valley-moon-caverns/zone.lua
index d4548b7fd2..c44fc4dc99 100644
--- a/game/modules/tome/data/zones/valley-moon-caverns/zone.lua
+++ b/game/modules/tome/data/zones/valley-moon-caverns/zone.lua
@@ -46,7 +46,7 @@ return {
 			door = "CAVEFLOOR",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {30, 40},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/valley-moon/zone.lua b/game/modules/tome/data/zones/valley-moon/zone.lua
index 99a64b4399..1fd8d89708 100644
--- a/game/modules/tome/data/zones/valley-moon/zone.lua
+++ b/game/modules/tome/data/zones/valley-moon/zone.lua
@@ -38,7 +38,7 @@ return {
 			map = "zones/valley-moon",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {0, 0},
 			rate = 0.27,
 		},
diff --git a/game/modules/tome/data/zones/void/zone.lua b/game/modules/tome/data/zones/void/zone.lua
index b139f80bdd..8fe574facf 100644
--- a/game/modules/tome/data/zones/void/zone.lua
+++ b/game/modules/tome/data/zones/void/zone.lua
@@ -48,7 +48,7 @@ return {
 			edge_entrances = {4,6},
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {15, 25},
 		},
 	},
diff --git a/game/modules/tome/data/zones/vor-armoury/zone.lua b/game/modules/tome/data/zones/vor-armoury/zone.lua
index 67b8c6714a..5d4428aa3b 100644
--- a/game/modules/tome/data/zones/vor-armoury/zone.lua
+++ b/game/modules/tome/data/zones/vor-armoury/zone.lua
@@ -44,7 +44,7 @@ return {
 			down = "DOWN",
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 		},
 		object = {
diff --git a/game/modules/tome/data/zones/vor-pride/zone.lua b/game/modules/tome/data/zones/vor-pride/zone.lua
index 710f28b90a..c223baf072 100644
--- a/game/modules/tome/data/zones/vor-pride/zone.lua
+++ b/game/modules/tome/data/zones/vor-pride/zone.lua
@@ -59,7 +59,7 @@ return {
 			},
 		},
 		actor = {
-			class = "engine.generator.actor.Random",
+			class = "mod.class.generator.actor.Random",
 			nb_npc = {20, 30},
 			guardian = "VOR",
 		},
diff --git a/game/modules/tome/load.lua b/game/modules/tome/load.lua
index c0f597691f..87e58448bc 100644
--- a/game/modules/tome/load.lua
+++ b/game/modules/tome/load.lua
@@ -77,7 +77,9 @@ if not config.settings.tome.scroll_dist then config.settings.tome.scroll_dist =
 if not config.settings.tome.hotkey_icons_rows then config.settings.tome.hotkey_icons_rows = 1 end
 if not config.settings.tome.hotkey_icons_size then config.settings.tome.hotkey_icons_size = 48 end
 Map.smooth_scroll = config.settings.tome.smooth_move
-Map.faction_danger_check = function(self, e) return e.rank > 3 end
+Map.faction_danger2 = "tactical_danger.png"
+Map.faction_danger1 = "tactical_enemy_strong.png"
+Map.faction_danger_check = function(self, e, max) return (not max and e.rank > 3) or (max and e.rank >= 3.5) end
 
 -- Dialog UI
 UIBase.ui = config.settings.tome.ui_theme2
-- 
GitLab