mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-03-14 01:51:40 +00:00
Fix focus rolling invisible elves
This commit is contained in:
parent
2fc424c7e3
commit
a3453b84ac
1 changed files with 3 additions and 2 deletions
|
@ -1309,8 +1309,9 @@ const layer = createLayer(id, () => {
|
|||
focusTargets.value = {};
|
||||
const newCount = Decimal.min(count, range);
|
||||
while (newCount.gt(x)) {
|
||||
const roll = Object.values(elfTraining)[Math.floor(Math.random() * range)]?.name ?? "";
|
||||
if (!focusTargets.value[roll]) {
|
||||
const elf = Object.values(elfTraining)[Math.floor(Math.random() * range)];
|
||||
const roll = elf?.name ?? "";
|
||||
if (!focusTargets.value[roll] && unref(elf.visibility) === Visibility.Visible) {
|
||||
focusTargets.value[roll] = true;
|
||||
x++;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue