Skip to content
Snippets Groups Projects
Commit 2fea7763 authored by DarkGod's avatar DarkGod
Browse files

faction:copyReactions

undead horrors can summon even without the undead files loaded
parent 034e8930
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,14 @@ function _M:setFactionReaction(f1, f2, reaction, mutual)
self:triggerHook{"Faction:setReaction", f1=f1, f2=f2, reaction=reaction, mutual=mutual}
end
--- Copies all the reactions from/to a faction onto a new one
function _M:copyReactions(to, from)
table.merge(self.factions[to].reaction, self.factions[from].reaction)
for f, data in pairs(self.factions) do if f ~= to and f ~= from then
if data.reaction[from] then data.reaction[to] = data.reaction[from] end
end end
end
-- Add a few default factions
_M:add{ name="Players", reaction={enemies=-100} }
_M:add{ name="Enemies", reaction={players=-100} }
......@@ -80,7 +80,8 @@ newEntity{ base = "BASE_NPC_HORROR_UNDEAD",
autolevel = "caster",
summon = {
{type="undead", number=4, hasxp=false},
{type="undead", number=4, hasxp=false, base_list="mod.class.NPC:/data/general/npcs/ghoul.lua"},
{type="undead", number=4, hasxp=false, base_list="mod.class.NPC:/data/general/npcs/skeleton.lua"},
},
resolvers.talents{
......@@ -124,7 +125,7 @@ newEntity{ base = "BASE_NPC_HORROR_UNDEAD",
autolevel = "warriormage",
summon = {
{type="undead", subtype = "skeleton", number=5, hasxp=false},
{type="undead", subtype = "skeleton", number=5, hasxp=false, base_list="mod.class.NPC:/data/general/npcs/skeleton.lua"},
},
resolvers.talents{
......
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