Skip to content
Snippets Groups Projects
Commit 8dcb75fb authored by dg's avatar dg
Browse files

Bosses whose artifact has alredy been generated will not be deprived of artifacts anymore

git-svn-id: http://svn.net-core.org/repos/t-engine4@3552 51575b47-30f0-44d4-a5cc-537603b46e54
parent 59cd5899
No related branches found
No related tags found
No related merge requests found
...@@ -328,7 +328,7 @@ function _M:makeEntityByName(level, type, name, force_unique) ...@@ -328,7 +328,7 @@ function _M:makeEntityByName(level, type, name, force_unique)
local forced = false local forced = false
if e.unique and game.uniques[e.__CLASSNAME.."/"..e.unique] then if e.unique and game.uniques[e.__CLASSNAME.."/"..e.unique] then
if not force_unique then if not force_unique then
print("Refused unique by name", e.name, e.__CLASSNAME.."/"..e.unique) forceprint("Refused unique by name", e.name, e.__CLASSNAME.."/"..e.unique)
return nil return nil
else else
forced = true forced = true
......
...@@ -125,7 +125,13 @@ function resolvers.calc.drops(t, e) ...@@ -125,7 +125,13 @@ function resolvers.calc.drops(t, e)
if not filter.defined then if not filter.defined then
o = game.zone:makeEntity(game.level, "object", filter, nil, true) o = game.zone:makeEntity(game.level, "object", filter, nil, true)
else else
o = game.zone:makeEntityByName(game.level, "object", filter.defined) local forced
o, forced = game.zone:makeEntityByName(game.level, "object", filter.defined, filter.random_art_replace and true or false)
-- If we forced the generation this means it was already found
if forced then
print("Serving unique "..o.name.." but forcing replacement drop")
filter.random_art_replace.chance = 100
end
end end
if o then if o then
print("Zone made us a drop according to filter!", o:getName()) print("Zone made us a drop according to filter!", o:getName())
......
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