private void ClickScalarEntry(object sender, EventArgs e) { if (sender is not NumericUpDown nud || ModifierKeys != Keys.Control) { return; } nud.Value = PokeSizeUtil.GetRandomScalar(); }
protected override void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk) { base.ApplyDetails(sav, criteria, pk); var pb = (PB7)pk; pb.AwakeningSetAllTo(2); pb.HeightScalar = PokeSizeUtil.GetRandomScalar(); pb.WeightScalar = PokeSizeUtil.GetRandomScalar(); }
private void NUD_WeightScalar_ValueChanged(object sender, EventArgs e) { ss.WeightScalar = (byte)NUD_WeightScalar.Value; L_SizeW.Text = SizeClass[(int)PokeSizeUtil.GetSizeRating(ss.WeightScalar)]; if (!CHK_Auto.Checked || Loading || pkm == null) { return; } pkm.ResetWeight(); TB_WeightAbs.Text = pkm.WeightAbsolute.ToString("F8"); }
private void NUD_WeightScalar_ValueChanged(object sender, EventArgs e) { if (ss != null) { if (!Loading) { ss.WeightScalar = (byte)NUD_WeightScalar.Value; } L_SizeW.Text = SizeClass[(int)PokeSizeUtil.GetSizeRating(ss.WeightScalar)]; } if (!CHK_Auto.Checked || Loading || sv == null) { return; } sv.ResetWeight(); TB_WeightAbs.Text = GetString(sv.WeightAbsolute); }
protected override void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk) { var pk8 = (PK8)pk; pk8.HT_Name = "PKHeX"; pk8.HT_Language = 2; pk8.CurrentHandler = 1; base.ApplyDetails(sav, criteria, pk); var ball = Type.GetValidBall(); if (ball != Ball.None) { pk.Ball = (int)ball; } pk8.HeightScalar = PokeSizeUtil.GetRandomScalar(); pk8.WeightScalar = PokeSizeUtil.GetRandomScalar(); }