Skip to content

Commit

Permalink
elaborate comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Glazelf committed Sep 30, 2023
1 parent a4f0844 commit 8b54078
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/synthesis.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ function synthesisCheck({ pair = [], target = "", parents = [] }) {
let pairVariables = getPairVariables(pair);
let parentsVariables = getPairVariables(parents);
let targetData = monstersJSON[target];
// Check if fusion between both parents' families
// Check if fusion between both parents' families by filtering arrays against eachother, also taking into account ranks
let familySynthesisBool = (pair.filter((element) => !parentsVariables.pairAndFamilies.includes(element)).length === 0 && parentsVariables.pairRanks.includes(targetData.rank));
// Check if fusion between both at least 1 parent and another parent or family
// Check if fusion between both at least 1 parent and another parent or family by filtering arrays against eachother, also taking into account one+ parent has to be a species
let uniqueSynthesisBool = (pair.filter((element) => !parentsVariables.pairAndFamilies.includes(element)).length === 0 && (pair.filter((element) => !parents.includes(element)).length < 2));
let synthesisType = null;
if (familySynthesisBool) synthesisType = "family";
Expand Down

0 comments on commit 8b54078

Please sign in to comment.