public FusionData(int hp, int atk, int def, int spa, int spd, int spe, DexData.types pt, DexData.types st) { HP = hp; ATK = atk; DEF = def; SPA = spa; SPD = spd; SPE = spe; pType = pt; sType = st; stats = new int[] { hp, atk, def, spa, spd, spe }; }
public PokeStat(string n, int d, int hp, int atk, int def, int spa, int spd, int spe, DexData.types pt, DexData.types st, DexData.types e1, DexData.types e2, DexData.types e3) { Name = n; DexNumber = d; PrimaryType = pt; SecondaryType = st; TypeException1 = e1; TypeException2 = e2; TypeException3 = e3; HP = hp; Attack = atk; Defense = def; SpAtk = spa; SpDef = spd; Speed = spe; statlist = new int[] { hp, atk, def, spa, spd, spe }; }
FusionData calcStat(string a, string b) { PokeStat pokemonA = DexData.pokestats[a]; PokeStat pokemonB = DexData.pokestats[b]; DexData.types t1 = DexData.types.none; DexData.types t2 = DexData.types.none; if (a != b) { t1 = pokemonA.TypeException1 == DexData.types.none ? pokemonA.PrimaryType : pokemonA.TypeException1; t2 = pokemonB.TypeException1 == DexData.types.none ? pokemonB.SecondaryType == DexData.types.none ? pokemonB.PrimaryType == t1 ? DexData.types.none : pokemonB.PrimaryType : pokemonB.SecondaryType == t1 ? pokemonB.PrimaryType : pokemonB.SecondaryType : pokemonB.TypeException1; } else { t1 = pokemonA.TypeException2 == DexData.types.none ? pokemonA.PrimaryType : pokemonA.TypeException2; t2 = pokemonA.TypeException3 == DexData.types.none ? pokemonA.SecondaryType : pokemonA.TypeException3; } return(new FusionData(((pokemonA.HP * 2) + pokemonB.HP) / 3, ((pokemonB.Attack * 2) + pokemonA.Attack) / 3, ((pokemonB.Defense * 2) + pokemonA.Defense) / 3, ((pokemonA.SpAtk * 2) + pokemonB.SpAtk) / 3, ((pokemonA.SpDef * 2) + pokemonB.SpDef) / 3, ((pokemonB.Speed * 2) + pokemonA.Speed) / 3, t1, t2)); }
public FusionData(int hp, int atk, int def, int spa, int spd, int spe, DexData.types pt) : this(hp, atk, def, spa, spd, spe, pt, DexData.types.none) { }