mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-08-30 10:26:09 +08:00
feature: multiple lock, pick min max
This commit is contained in:
@@ -70,10 +70,13 @@ export function pull(
|
||||
)
|
||||
const result = []
|
||||
const map = new Map(Grades.map(g => [g, new Set(GradeMap.get(g))]))
|
||||
if (profile.lockedTalent) {
|
||||
result.push(profile.lockedTalent)
|
||||
const { grade } = talents.get(profile.lockedTalent)!
|
||||
map.get(grade)!.delete(profile.lockedTalent)
|
||||
if (profile.locked) {
|
||||
result.push(...profile.locked)
|
||||
if (result.length >= options.count) return result
|
||||
for (const talent of result) {
|
||||
const { grade } = talents.get(talent)!
|
||||
map.get(grade)!.delete(talent)
|
||||
}
|
||||
}
|
||||
for (let i = options.count - result.length; i > 0; i--) {
|
||||
const grade = pickWeight(rate, rng)! ?? 0
|
||||
|
||||
Reference in New Issue
Block a user