2 require
"compile_achievement_db"
4 local valid_crits_proto
= {0, 43, 54, 68, 70, 72, 109, 110}
6 for _
, v
in ipairs(valid_crits_proto
) do
10 local achievements_out
= {achievements
= {}, monsters
= {}}
11 achievements_out
.achievements
[868] = {unify
= true}
13 for _
, v
in pairs(achievements
) do
14 for achid
, data
in pairs(v
) do
15 local allowed_crits
= 0
16 local denied_crits
= 0
17 local semiallowed_crits
= 0
19 for _
, dat
in ipairs(data
) do
21 semiallowed_crits
= semiallowed_crits
+ 1
22 elseif valid_crits
[dat
.type] then
23 allowed_crits
= allowed_crits
+ 1
25 denied_crits
= denied_crits
+ 1
29 if #data
== 0 then continue
end
30 if denied_crits
~= 0 then continue
end
31 --print(data.name, allowed_crits, denied_crits)
33 if allowed_crits
> 0 and not achievements_out
.achievements
[achid
] then
34 achievements_out
.achievements
[achid
] = {}
37 for _
, dat
in ipairs(data
) do
39 achievements_out
.monsters
[dat
.asset
] = true
45 achievements
= achievements_out