sorcery  Diff

Differences From Artifact [f718356661]:

To Artifact [71f6a713cb]:


1
2
3

4
5
6
7
8
9
10
...
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
local altar_item_offset = {
	x = 0, y = -0.3, z = 0
}


local range = function(min, max)
	local span = max - min
	local val = math.random() * span
	return val + min
end

................................................................................
					-- we pick a random gift and roll against its rarity
					-- to determine if the god is feeling generous
					local gift = sorcery.lib.tbl.pick(god.gifts)
					local data = god.gifts[gift]
					local value, rarity = data[1], data[2]
					if value <= divine_favor and math.random(rarity) == 1 then
						bestow(gift)
						print(god.name .. ' has produced ' .. gift .. ' upon an altar as a gift')
						if math.random(god.generosity) == 1 then
							-- unappreciated gifts may incur divine
							-- irritation
							divine_favor = divine_favor - 1
						end
					end
				end



>







 







|







1
2
3
4
5
6
7
8
9
10
11
...
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
local altar_item_offset = {
	x = 0, y = -0.3, z = 0
}
local log = function(...) sorcery.log('altar',...) end

local range = function(min, max)
	local span = max - min
	local val = math.random() * span
	return val + min
end

................................................................................
					-- we pick a random gift and roll against its rarity
					-- to determine if the god is feeling generous
					local gift = sorcery.lib.tbl.pick(god.gifts)
					local data = god.gifts[gift]
					local value, rarity = data[1], data[2]
					if value <= divine_favor and math.random(rarity) == 1 then
						bestow(gift)
						log(god.name .. ' has produced ' .. gift .. ' upon an altar as a gift')
						if math.random(god.generosity) == 1 then
							-- unappreciated gifts may incur divine
							-- irritation
							divine_favor = divine_favor - 1
						end
					end
				end