public Pokemon(BaseStats bs, int l = 1, Move[] ms = null, string n = null) { baseStats = bs; personality = (uint)((PRNG.Instance.Next() << 16) + PRNG.Instance.Next()); nature = (Nature)(personality % 25); happiness = baseStats.baseHappiness; if (baseStats.abilities.Length == 1) ability = baseStats.abilities[0]; else ability = baseStats.abilities[personality % 2]; int iv1 = PRNG.Instance.Next(); int iv2 = PRNG.Instance.Next(); hpIV = (byte)(iv1 & 0x1F); attackIV = (byte)(iv1 & 0x3E0); defenseIV = (byte)(iv1 & 0x7C00); specialDefenseIV = (byte)(iv2 & 0x1F); specialAttackIV = (byte)(iv2 & 0x3E0); speedIV = (byte)(iv2 & 0x7C00); nickname = n; shiny = ((OTid ^ OTsecretid) ^ ((personality >> 16) ^ (personality & 65535))) < 8 ? true : false; for (int i = 0; i < l; i++) LevelUp(); hp = maxHP; metLocation = Player.Instance.currentMap; metLevel = Level; if (ms == null) { int i = 0; foreach (LearnableMove m in baseStats.learnset) { if (Level >= m.level) { moveSet[i] = m.move; PP[i] = m.move.basePP; i = (i == 3) ? 0 : i + 1; } else break; } } else moveSet = ms; }
public TM(byte i, Move m) { this.id = i; this.move = m; }
public HM(byte i, Move m, Action e) : base(i, m) { this.fieldEffect = e; }