Skip to content
Snippets Groups Projects
Commit 56da1b7a authored by Chris Davidson's avatar Chris Davidson
Browse files

Copy all of the copy descriptor table to randbosses

Add a descriptor blocking weapons from being equipped from inventory on addedToLevel and give it to Brawler
parent f5709f94
No related branches found
No related tags found
1 merge request!440Brawler equipment fix
......@@ -2000,6 +2000,8 @@ print(" power types: not_power_source =", table.concat(table.keys(b.not_power_
if instant then b:check("birth_create_alchemist_golem") end
elseif k == "soul" then
b.soul = util.bound(1 + math.ceil(data.level / 10), 1, 10) -- Does this need to scale?
else
b[k] = resolver -- Copy any misc attributes that we don't need to play with
end
end
for k, resolver in pairs(mclass.copy or {}) do apply_resolvers(k, resolver) end
......
......@@ -528,7 +528,9 @@ function _M:addedToLevel(level, x, y)
for i = #MainInven, 1, -1 do
o = MainInven[i]
local inven, worn = self:getInven(o:wornInven())
if inven and game.state:checkPowers(self, o, nil, "antimagic_only") then -- check antimagic restrictions
--print("[NPC:addedToLevel]", self.name, self.uid, "checking", o.name, "type", o.type)
if inven and game.state:checkPowers(self, o, nil, "antimagic_only") and not (o.type and o.type == "weapon" and self.no_npc_weapon_equip) then -- check restrictions
--print("[NPC:addedToLevel]", self.name, self.uid, "passed restriction check", o.name)
local ro, replace = inven and inven[1], false
o = self:removeObject(self.INVEN_INVEN, i)
if o then
......
......@@ -317,6 +317,7 @@ newBirthDescriptor{
[ActorTalents.T_UNARMED_MASTERY] = 1, -- early game is absolutely stupid without this
},
copy = {
no_npc_weapon_equip = true, -- avoids randbosses equipping weapons from their inventory
resolvers.equipbirth{ id=true,
{type="armor", subtype="hands", name="iron gauntlets", autoreq=true, ego_chance=-1000, ego_chance=-1000},
{type="armor", subtype="light", name="rough leather armour", autoreq=true, ego_chance=-1000, ego_chance=-1000},
......
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