Skip to content

Commit

Permalink
add check for family synths including themselves
Browse files Browse the repository at this point in the history
  • Loading branch information
Glazelf committed Oct 4, 2023
1 parent 46e2ebf commit 82a0fab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/synthesis.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function synthesisCheck({ pair = [], target = "", parents = [] }) {
let parentsVariables = getPairVariables(parents);
let targetData = monstersJSON[target];
// 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));
let familySynthesisBool = (pair.filter((element) => !parentsVariables.pairAndFamilies.includes(element)).length === 0 && parentsVariables.pairRanks.includes(targetData.rank) && !parents.includes(target)); // Check for matching ranks and unmatching family synths
// 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;
Expand Down

0 comments on commit 82a0fab

Please sign in to comment.