Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions VoidWanderers.rte/Objects/Case.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ function Create(self)
CF_Write({"ArtifactItemRate"}, 0)
end
artifactActorRate = CF_Read(self, {"ArtifactItemRate"})
local artifactChance =artifactActorRate - (artifactActorRate / (0.5 + math.sqrt(#artItmPresets)))
-- hmm..
local artifactChance =artifactActorRate - (artifactActorRate / (0.5 + math.sqrt(#artItmPresets)))

local f
local ok = false
Expand All @@ -69,7 +70,7 @@ function Create(self)
cfg["Player0Faction"] = f

--print (cfg)
local weaps = CF_Call(self, {"MakeListOfMostPowerfulWeapons"}, {cfg, 0, weaponTypes[math.random(#weaponTypes)], 100000})[1]
local weaps = CF_Call(self, {"MakeListOfMostPowerfulWeapons"}, {cfg, 0, weaponTypes.ANY, 100000})[1]

if math.random() < artifactChance or weaps == nil then
local r = math.random(#artItmPresets)
Expand Down
2 changes: 1 addition & 1 deletion VoidWanderers.rte/Objects/Crate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function Create(self)

--print (cfg)

local acts = CF_Call(self, {"MakeListOfMostPowerfulActors"}, {cfg, 0, actorTypes[math.random(#actorTypes)], 100000})[1]
local acts = CF_Call(self, {"MakeListOfMostPowerfulActors"}, {cfg, 0, actorTypes.ANY, 100000})[1]

if math.random() < artifactChance or acts == nil then
local r = math.random(#artActPresets)
Expand Down