{"list":[{"title":"module:FRjs/convert","link":"<a href=\"module-FRjs_convert.html\">FRjs/convert</a>","description":"<p>A class for converting the relevant data in scrying workshop links and dragon profile pages into indices in the arrays of module:FRjs/data, and for converting those indices into a functioning scrying workshop link. See the <code>DragonTraits</code> class' documentation for more details. See the tutorial for usage examples.</p>"},{"title":"module:FRjs/convert.DragonTraits","link":"<a href=\"module-FRjs_convert.DragonTraits.html\">DragonTraits</a>","description":"<p>Constructs a formal DragonTraits object from a generic object containing indices in FRjs/data arrays for any/all of a single dragon's traits. Calling the constructor directly is useful for converting traits into scrying workshop links, and for quickly getting the actual data objects for all traits.</p>\n<p>Any traits that are left undefined, or which are invalid, will be set to a default value; index 0 for most traits, and for genes the index of Basic.</p>"},{"title":"module:FRjs/convert.DragonTraits.fromProfile","link":"<a href=\"module-FRjs_convert.DragonTraits.html#.fromProfile\">fromProfile</a>","description":"<p>Returns a {@link module:FRjs/convert.DragonTraits DragonTraits} object containing all traits defined in the contents of the given dragon profile. Note: gender is not present in text on dragon profiles, and will be the default of Male.</p>"},{"title":"module:FRjs/convert.DragonTraits.fromScrylink","link":"<a href=\"module-FRjs_convert.DragonTraits.html#.fromScrylink\">fromScrylink</a>","description":"<p>Returns a {@link module:FRjs/convert.DragonTraits DragonTraits} object containing all the traits defined in the given scrying workshop link.</p>"},{"title":"module:FRjs/convert.DragonTraits#indices","link":"<a href=\"module-FRjs_convert.DragonTraits.html#indices\">indices</a>","description":"<p>Object containing all traits as <strong>indices</strong> in the applicable array from {@link module:FRjs/data FRjs/data}.</p>\n<p>The structure of the object is:</p>\n<pre class=\"prettyprint source lang-js\"><code>{\n\tbreed: number,\n\teye: number,\n\telement: number,\n\tgender: number,\n\tage: number,\n\tcolour: {\n\t\tprimary: number,\n\t\tsecondary: number,\n\t\ttertiary: number\n\t},\n\tgene: {\n\t\tprimary: number,\n\t\tsecondary: number,\n\t\ttertiary: number\n\t}\n}\n</code></pre>"},{"title":"module:FRjs/convert.DragonTraits#scrylink","link":"<a href=\"module-FRjs_convert.DragonTraits.html#scrylink\">scrylink</a>","description":"<p>A link to the scrying workshop for a dragon with all defined traits.</p>"},{"title":"module:FRjs/convert.DragonTraits#values","link":"<a href=\"module-FRjs_convert.DragonTraits.html#values\">values</a>","description":"<p>An object containing all traits as <strong>data objects</strong> from {@link module:FRjs/data FRjs/data}.</p>\n<p>The structure of the object is:</p>\n<pre class=\"prettyprint source lang-js\"><code>{\n\tbreed: FR.Breed,\n\teye: FR.EyeType,\n\telement: FR.BasicTrait,\n\tgender: FR.BasicTrait,\n\tage: FR.BasicTrait,\n\tcolour: {\n\t\tprimary: FR.Colour,\n\t\tsecondary: FR.Colour,\n\t\ttertiary: FR.Colour\n\t},\n\tgene: {\n\t\tprimary: FR.Gene,\n\t\tsecondary: FR.Gene,\n\t\ttertiary: FR.Gene\n\t}\n}\n</code></pre>"},{"title":"module:FRjs/data","link":"<a href=\"module-FRjs_data.html\">FRjs/data</a>","description":"<p>Data about Flight Rising's dragon traits and breeding mechanics, and utility functions to streamline working with that data.</p>"},{"title":"module:FRjs/data.AGES","link":"<a href=\"module-FRjs_data.html#.AGES\">AGES</a>","description":"<p>The two possible dragon ages in Flight Rising. Ordered as they are in-game.</p>"},{"title":"module:FRjs/data.areBreedsCompatible","link":"<a href=\"module-FRjs_data.html#.areBreedsCompatible\">areBreedsCompatible</a>","description":"<p>Returns <code>true</code> if the two given breeds are compatible for breeding -- meaning either they're both modern breeds, or they're the same ancient breed -- and <code>false</code> if they aren't. If either parameter is not an index in {@link module:FRjs/data.BREEDS BREEDS}, returns <code>undefined</code>.</p>"},{"title":"module:FRjs/data.BREEDS","link":"<a href=\"module-FRjs_data.html#.BREEDS\">BREEDS</a>","description":"<p>All available breeds in Flight Rising. Sorted by name (ascending). [Data Source]{@link https://www1.flightrising.com/wiki/wiki}</p>"},{"title":"module:FRjs/data.BreedType","link":"<a href=\"module-FRjs_data.html#.BreedType\">BreedType</a>","description":"<p>Enum for breed types. This effects which genes are available on a breed, and which breed(s) it can be paired with.</p>"},{"title":"module:FRjs/data.calcRarityProb","link":"<a href=\"module-FRjs_data.html#.calcRarityProb\">calcRarityProb</a>","description":"<p>Compares two objects with rarities from the given array, and returns the probability of the given <code>target</code> outcome occurring. If the indexes aren't in the array, or the array members don't have rarities, returns <code>undefined</code>.</p>"},{"title":"module:FRjs/data.colourRange","link":"<a href=\"module-FRjs_data.html#.colourRange\">colourRange</a>","description":"<p>Yields indices on {@link module:FRjs/data.COLOURS COLOURS} of all colours in the shortest range between the two given colours. If either parameter is not an index in <code>COLOURS</code>, yields nothing.</p>"},{"title":"module:FRjs/data.colourRangeLength","link":"<a href=\"module-FRjs_data.html#.colourRangeLength\">colourRangeLength</a>","description":"<p>Calculates the length of the shortest range between two colours. If either parameter is not an index in {@link module:FRjs/data.COLOURS COLOURS}, returns <code>undefined</code>.</p>"},{"title":"module:FRjs/data.COLOURS","link":"<a href=\"module-FRjs_data.html#.COLOURS\">COLOURS</a>","description":"<p>All available colours in Flight Rising. Ordered as they are in-game. This should be treated as a circular array.</p>"},{"title":"module:FRjs/data.ELEMENTS","link":"<a href=\"module-FRjs_data.html#.ELEMENTS\">ELEMENTS</a>","description":"<p>All possible elements (flights) in Flight Rising. Ordered as they are in-game.</p>"},{"title":"module:FRjs/data.EYES","link":"<a href=\"module-FRjs_data.html#.EYES\">EYES</a>","description":"<p>All possible eye types in Flight Rising. Sorted by probability (descending). [Data Source (retrieved 2024-04-09 at 12:07 PM EST)]{@link https://docs.google.com/spreadsheets/d/1VOh1gwr-cCNMltfIFG8XHM-kEsBJLgVRg19HgiJ89ZA/edit#gid=0}</p>"},{"title":"module:FRjs/data.GENDERS","link":"<a href=\"module-FRjs_data.html#.GENDERS\">GENDERS</a>","description":"<p>The two possible dragon genders in Flight Rising. Ordered as they are in-game.</p>"},{"title":"module:FRjs/data.GENES","link":"<a href=\"module-FRjs_data.html#.GENES\">GENES</a>","description":"<p>All available genes, organized into primary, secondary, and tertiary slots. Each slot is sorted by name (ascending). [Data Source]{@link https://www1.flightrising.com/forums/gde/3109561}</p>\n<p>This object has the following structure:</p>\n<pre class=\"prettyprint source lang-js\"><code>{\n\tprimary: Gene[],\n\tsecondary: Gene[],\n\ttertiary: Gene[]\n}\n</code></pre>"},{"title":"module:FRjs/data.genesForBreed","link":"<a href=\"module-FRjs_data.html#.genesForBreed\">genesForBreed</a>","description":"<p>Yields indices on {@link module:FRjs/data.GENES GENES} of all genes available to a breed in a specific slot. If no breed id or an invalid breed id is provided, ignores restrictions and yields all genes for this slot. If the slot is invalid, yields nothing.</p>"},{"title":"module:FRjs/data.isColourInRange","link":"<a href=\"module-FRjs_data.html#.isColourInRange\">isColourInRange</a>","description":"<p>Returns <code>true</code> if the target colour is in the shortest range between two given colours, and <code>false</code> if it isn't. If any parameter is not an index in {@link module:FRjs/data.COLOURS COLOURS}, returns <code>undefined</code>. Range includes both end colours.</p>"},{"title":"module:FRjs/data.isColourSubrangeInRange","link":"<a href=\"module-FRjs_data.html#.isColourSubrangeInRange\">isColourSubrangeInRange</a>","description":"<p>Returns <code>true</code> if the colour range from <code>target1</code> to <code>target2</code> is a sub-range of the colour range from <code>range1</code> to <code>range2</code>, and <code>false</code> if not. If any parameter is not an index in {@link module:FRjs/data.COLOURS COLOURS}, returns <code>undefined</code>. Both ranges include both their end colours.</p>"},{"title":"module:FRjs/data.nestSizesForBreeds","link":"<a href=\"module-FRjs_data.html#.nestSizesForBreeds\">nestSizesForBreeds</a>","description":"<p>Returns an array containing possible nest sizes and their probabilities if dragons of the two given breeds are nested. If the given breeds are incompatible, or if either parameter is not an index in {@link module:FRjs/data.BREEDS BREEDS}, returns <code>undefined</code>.</p>"},{"title":"module:FRjs/data.Rarity","link":"<a href=\"module-FRjs_data.html#.Rarity\">Rarity</a>","description":"<p>Enum for rarities. Every breed and gene has a rarity which affects it's probability of occurring through breeding.</p>"},{"title":"module:FRjs/data.rarityTableLookup","link":"<a href=\"module-FRjs_data.html#.rarityTableLookup\">rarityTableLookup</a>","description":"<p>Given two rarities to compare, returns an array containing, in order, the probability that <code>rarity1</code> occurs and the probability that <code>rarity2</code> occurs. If invalid rarities are given, returns <code>undefined</code>.</p>"},{"title":"module:FRjs/data~BasicTrait","link":"<a href=\"module-FRjs_data.html#~BasicTrait\">BasicTrait</a>"},{"title":"module:FRjs/data~Breed","link":"<a href=\"module-FRjs_data.html#~Breed\">Breed</a>"},{"title":"module:FRjs/data~Colour","link":"<a href=\"module-FRjs_data.html#~Colour\">Colour</a>"},{"title":"module:FRjs/data~EyeType","link":"<a href=\"module-FRjs_data.html#~EyeType\">EyeType</a>"},{"title":"module:FRjs/data~Gene","link":"<a href=\"module-FRjs_data.html#~Gene\">Gene</a>"},{"title":"module:FRjs/data~Nest","link":"<a href=\"module-FRjs_data.html#~Nest\">Nest</a>"},{"title":"module:FRjs/forms","link":"<a href=\"module-FRjs_forms.html\">FRjs/forms</a>","description":"<p>Defines extensions of the native HTML <code>&lt;select&gt;</code> element which self-populate with different kinds of Flight Rising data. Available elements are registered as <code>fr-eyes</code>, <code>fr-colours</code>, <code>fr-breeds</code>, <code>fr-genes</code>, <code>fr-ages</code>, <code>fr-genders</code>, and <code>fr-elements</code>. See the tutorials for usage.</p>\n<p>Customized Built-in Elements are not natively supported in Safari, but the custom dropdowns should work in Safari anyway because the module loads a polyfill if CBIE support is not detected.</p>"},{"title":"module:FRjs/forms~AgeSelect","link":"<a href=\"module-FRjs_forms-AgeSelect.html\">AgeSelect</a>"},{"title":"module:FRjs/forms~BreedSelect","link":"<a href=\"module-FRjs_forms-BreedSelect.html\">BreedSelect</a>"},{"title":"module:FRjs/forms~ColourSelect","link":"<a href=\"module-FRjs_forms-ColourSelect.html\">ColourSelect</a>"},{"title":"module:FRjs/forms~ElementSelect","link":"<a href=\"module-FRjs_forms-ElementSelect.html\">ElementSelect</a>"},{"title":"module:FRjs/forms~EyeSelect","link":"<a href=\"module-FRjs_forms-EyeSelect.html\">EyeSelect</a>"},{"title":"module:FRjs/forms~GenderSelect","link":"<a href=\"module-FRjs_forms-GenderSelect.html\">GenderSelect</a>"},{"title":"module:FRjs/forms~GeneSelect","link":"<a href=\"module-FRjs_forms-GeneSelect.html\">GeneSelect</a>"},{"title":"module:FRjs/forms~PubSub#checkMessage","link":"<a href=\"module-FRjs_forms-PubSub.html#checkMessage\">checkMessage</a>","description":"<p>Check the last message sent to a given channel.</p>"},{"title":"module:FRjs/forms~PubSub#sendMessage","link":"<a href=\"module-FRjs_forms-PubSub.html#sendMessage\">sendMessage</a>","description":"<p>Send a message to everyone subscribed to the given channel.</p>"},{"title":"module:FRjs/forms~PubSub#subscribe","link":"<a href=\"module-FRjs_forms-PubSub.html#subscribe\">subscribe</a>","description":"<p>Subscribe to messages sent to a specific channel, and also receive the last message sent to the channel if there is one.</p>"}]}