Skip to content

Commit

Permalink
Merge pull request #496 from loathers/all-familiars-in-bjorn
Browse files Browse the repository at this point in the history
Consider every familiar in the bjorn, even ones that don't have interesting drops
  • Loading branch information
horrible-little-slime authored Aug 5, 2023
2 parents 2efe0b2 + 177ae53 commit 9f4bf86
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions src/resources/2010/CrownOfThrones.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,13 @@ export const ridingFamiliars: readonly FamiliarRider[] = [
},
] as const;

const FULL_RIDING_LIST = [
...ridingFamiliars,
...Familiar.all()
.filter((f) => !ridingFamiliars.some(({ familiar }) => familiar === f))
.map((familiar) => ({ familiar, drops: 0, probability: 1 })),
] as const;

/**
* Value a specified familiar Crown rider
*
Expand Down Expand Up @@ -417,23 +424,21 @@ export function pickRider(mode: string): FamiliarRider | null {
if (!riderLists.has(mode)) {
riderLists.set(
mode,
ridingFamiliars
.filter(({ familiar }) => have(familiar))
.sort(
(a, b) =>
valueRider(
b,
modifierValueFunction,
dropsValueFunction,
ignoreLimitedDrops
) -
valueRider(
a,
modifierValueFunction,
dropsValueFunction,
ignoreLimitedDrops
)
)
FULL_RIDING_LIST.filter(({ familiar }) => have(familiar)).sort(
(a, b) =>
valueRider(
b,
modifierValueFunction,
dropsValueFunction,
ignoreLimitedDrops
) -
valueRider(
a,
modifierValueFunction,
dropsValueFunction,
ignoreLimitedDrops
)
)
);
}

Expand Down

0 comments on commit 9f4bf86

Please sign in to comment.