Skip to content
Snippets Groups Projects
Commit 8833e29a authored by dg's avatar dg
Browse files

Limmir will always make sure to provide a gem on his own when making an amulet

git-svn-id: http://svn.net-core.org/repos/t-engine4@3313 51575b47-30f0-44d4-a5cc-537603b46e54
parent ce5897ed
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,9 @@ local artifact_imbue_amulet = function(npc, player)
require("engine.ui.Dialog"):yesnoPopup("Imbue cost", "You need to use "..price.." gold for the plating, do you accept?", function(ret) if ret then
player:incMoney(-price)
local gem3 = game.zone:makeEntity(game.level, "object", {type="gem"}, nil, true)
local gem3, tries = nil, 10
while gem3 == nil and tries > 0 do gem3 = game.zone:makeEntity(game.level, "object", {type="gem"}, nil, true) tries = tries - 1 end
if not gem3 then gem3 = rng.percent(50) and gem1 or gem2 end
print("Imbue third gem", gem3.name)
if gem1_item > gem2_item then
......
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