// GENERATED from research/fish.json by gen_species.py. Do not edit by hand.
// Numbers are from the original Breeder's Bible (grams, days, Kudos); -1 = unknown/unlimited/not for sale.
using System.Collections.Generic;
public class Species
{
public readonly string key, name;
public readonly int birthWeight, targetWeight, dailyGrowth, fertileDay, sellPrice;
public readonly bool buyable;
public Species(string key, string name, int birthWeight, int targetWeight, int dailyGrowth, int fertileDay, int sellPrice, bool buyable)
{ this.key = key; this.name = name; this.birthWeight = birthWeight; this.targetWeight = targetWeight; this.dailyGrowth = dailyGrowth; this.fertileDay = fertileDay; this.sellPrice = sellPrice; this.buyable = buyable; }
/// 0..1 growth from weight; length scales with the cube root of weight.
public float SizeFactor(float weightG)
{
float t = targetWeight > 0 ? targetWeight : (birthWeight > 0 ? birthWeight * 10f : 100f);
float b = birthWeight > 0 ? birthWeight : t * 0.1f;
float w = UnityEngine.Mathf.Clamp(weightG, b, t);
return UnityEngine.Mathf.Pow(w / t, 1f / 3f);
}
}
public static class AFXSpecies
{
public static readonly Species[] All =
{
new Species("acute", "Acute Angle fish", 900, 18600, 804, 9, 142800, true),
new Species("atomic", "Atomic Eel", 20000, -1, -1, 3, -1, false),
new Species("bermuda", "Bermuda Tri-Angle fish", 8790, -1, -1, 7, -1, false),
new Species("blasph", "Blasphemous Angle fish", 999, 49494, 9699, 3, -1, false),
new Species("blazing", "Blazing Angelfish", 30, 180, 12, 9, 880, true),
new Species("blue", "Blue Sprat", 2, 30, 4, 1, 51, true),
new Species("coruscating", "Coruscating Angelfish", 15, 120, 8, 9, 800, true),
new Species("double", "Double Bass", 1000, 4200, 145, 17, 18600, true),
new Species("drummen", "Drummen Bass", 1200, 7890, 159, 13, -1, false),
new Species("faded", "Faded Grouper", 52000, 140000, 1600, -1, -1, false),
new Species("friendly", "Friendly Grouper", 3000, 18000, 833, 10, 120000, true),
new Species("greater", "Greater Europan Shark", 3000, 15000, 666, 16, 140000, true),
new Species("green", "Green Sprat", 2, 16, 3, 1, 33, true),
new Species("grey", "Grey Sprat", 15, 30, 3, -1, 60, true),
new Species("heavenly", "Heavenly Choirfish", 8989, -1, -1, -1, -1, false),
new Species("invisib", "Invisible Piranha", 1, 17, 1, -1, -1, false),
new Species("ionic", "Ionic Piranha", 3, 45, 6, 6, 306, true),
new Species("iridescent", "Iridescent Angelfish", 40, 195, 25, 1, -1, false),
new Species("jovian", "Jovian Piranha", 5, 200, 4, 25, 8540, true),
new Species("kants", "Kants Philosofish", 12, 180, 21, 1, 7276, true),
new Species("legendary", "Legendary Grouper", 52000, 160000, 7200, 1, -1, false),
new Species("lesser", "Lesser Europan Shark", 300, 12000, 1063, 9, 8400, true),
new Species("manx", "Manx Catfish", 400, 1200, 100, 5, 6000, true),
new Species("nano", "Nano-Piranha", 1, 6, 0, 4, 24, true),
new Species("nietzs", "Nietzsches Philosofish", 1, 160, 9, 5, -1, false),
new Species("pan", "Pan Europan Shark", 16000, 240000, 9333, 2, -1, false),
new Species("parasitic", "Parasitic Eel", 500, 2500, 222, 4, 65334, true),
new Species("p-eating", "Piranha-eating Eel", 975, -1, 200, 9, 5500, true),
new Species("plato", "Platos Philosofish", 5, 120, 23, 1, 260, true),
new Species("rainbow", "Rainbow Sprat", 30, 35, 2, 1, -1, false),
new Species("recomb", "Recombinant Eel", 75, 900, 91, 4, 3500, true),
new Species("red", "Red Sprat", 2, 25, 2, 1, 29, true),
new Species("right", "Right Angle fish", 500, 1750, 78, 5, 6417, true),
new Species("rock", "Rock Grouper", 11000, 62000, 10200, 3, 308000, true),
new Species("russel", "Russells Philosofish", 80, 160, 10, 1, 2774, true),
new Species("schrod", "Schrodingers Catfish", 800, -1, 200, -1, -1, false),
new Species("siamese", "Siamese Catfish", 100, 600, 50, 7, 1867, true),
new Species("super", "Super Grouper", 18000, 93000, 15000, -1, -1, false),
new Species("support", "Support Grouper", 7000, 32000, 1000, 7, 322000, true),
new Species("swarming", "Swarming Eel", 15, 1500, 165, 4, 13260, true),
new Species("uviolet", "Ultra-violet Sprat", 5, 9, 2, 1, -1, false),
new Species("wailing", "Wailing Choirfish", 800, 4300, 350, 9, 29500, true),
new Species("walking", "Walking Bass", 200, 1600, 116, 7, 5334, true),
new Species("whistling", "Whistling Choirfish", 120, 2200, 94, 7, 24400, true),
new Species("white", "White Sprat", 1, 2, 0, -1, 2, true),
new Species("yodelling", "Yodelling Choirfish", 1200, 6500, 441, 5, 700134, true),
new Species("zen", "Zen Philosofish", -1, -1, -1, -1, -1, false),
};
static Dictionary byKey;
public static Species Get(string key)
{
if (byKey == null) { byKey = new Dictionary(); foreach (var s in All) byKey[s.key] = s; }
return byKey.TryGetValue(key, out var sp) ? sp : null;
}
}