Merge pull request #13 from YakosWG/main

Yakos Gone WIld
This commit is contained in:
Miguel 2025-03-20 23:25:04 +01:00 committed by GitHub
commit effd43cfdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 3476 additions and 1833 deletions

View File

@ -102,6 +102,7 @@
<Compile Include="AddressHelper.Designer.cs">
<DependentUpon>AddressHelper.cs</DependentUpon>
</Compile>
<Compile Include="DocTool.cs" />
<Compile Include="DSUtils\ARM9.cs" />
<Compile Include="DSUtils\DSUtils.cs" />
<Compile Include="DSUtils\ModelUtils.cs" />
@ -110,7 +111,9 @@
<Compile Include="DVCalculator\DVCalc.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DVCalculator\DVCalc.Designer.cs" />
<Compile Include="DVCalculator\DVCalc.Designer.cs">
<DependentUpon>DVCalc.cs</DependentUpon>
</Compile>
<Compile Include="DVCalculator\DVCalcNatureViewerForm.cs">
<SubType>Form</SubType>
</Compile>
@ -405,7 +408,9 @@
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resources\writeText.Designer.cs" />
<EmbeddedResource Include="DVCalculator\DVCalc.resx" />
<EmbeddedResource Include="DVCalculator\DVCalc.resx">
<DependentUpon>DVCalc.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DVCalculator\DVCalcNatureViewerForm.resx" />
<EmbeddedResource Include="Editors\EncountersEditor.resx">
<DependentUpon>EncountersEditor.cs</DependentUpon>

View File

@ -1,4 +1,9 @@
using System.Windows.Forms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DSPRE
{
@ -47,6 +52,18 @@ namespace DSPRE
private Label IV_label;
private ComboBox pokemonSelector;
private Button showAllButton;
private Button helpButton;
private RadioButton radioButtonMale;
private RadioButton radioButtonFemale;
private RadioButton radioButtonAbility1;
private RadioButton radioButtonAbility2;
private NumericUpDown numericUpDownGender;
private GroupBox groupBoxGender;
private GroupBox groupBoxAbility;
private Label labelGenderRatio;
private GroupBox groupBoxHGSS;
private RadioButton radioButtonIngoreGender;
private RadioButton radioButtonIgnoreAbility;
private Button buttonHelp;
private Button buttonHGSS;
}
}

View File

@ -1,17 +1,17 @@
using System;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Xml.Linq;
namespace DSPRE
{
public partial class DVCalc : Form
{
public DVCalc(int TrainerIndex, int TrainerClassIndex)
public DVCalc()
{
InitializeComponent();
PopulateComboBox();
SetTrainerData(TrainerIndex, TrainerClassIndex);
//make Pokemon searchable
pokemonSelector.TextChanged += PokemonSelector_TextChanged;
@ -26,11 +26,16 @@ namespace DSPRE
pokemonSelector.AutoCompleteCustomSource = autoCompleteSource;
Version version = new Version(major: 1, minor: 1);
this.Text = "DVCalc " + version.ToString();
}
private void MainForm_Load(object sender, EventArgs e)
public DVCalc(uint TrainerIndex, uint TrainerClassIndex) : this()
{
trainerIdx.Value = TrainerIndex;
trainerClassIdx.Value = TrainerClassIndex;
}
private void InitializeComponent()
@ -51,25 +56,41 @@ namespace DSPRE
this.IV_label = new System.Windows.Forms.Label();
this.pokemonSelector = new System.Windows.Forms.ComboBox();
this.showAllButton = new System.Windows.Forms.Button();
this.helpButton = new System.Windows.Forms.Button();
this.radioButtonMale = new System.Windows.Forms.RadioButton();
this.radioButtonFemale = new System.Windows.Forms.RadioButton();
this.radioButtonAbility1 = new System.Windows.Forms.RadioButton();
this.radioButtonAbility2 = new System.Windows.Forms.RadioButton();
this.numericUpDownGender = new System.Windows.Forms.NumericUpDown();
this.groupBoxGender = new System.Windows.Forms.GroupBox();
this.radioButtonIngoreGender = new System.Windows.Forms.RadioButton();
this.groupBoxAbility = new System.Windows.Forms.GroupBox();
this.radioButtonIgnoreAbility = new System.Windows.Forms.RadioButton();
this.labelGenderRatio = new System.Windows.Forms.Label();
this.groupBoxHGSS = new System.Windows.Forms.GroupBox();
this.buttonHelp = new System.Windows.Forms.Button();
this.buttonHGSS = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pokeLevel)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.trainerClassIdx)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.trainerIdx)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownGender)).BeginInit();
this.groupBoxGender.SuspendLayout();
this.groupBoxAbility.SuspendLayout();
this.groupBoxHGSS.SuspendLayout();
this.SuspendLayout();
//
// poke_label
//
this.poke_label.AutoSize = true;
this.poke_label.Location = new System.Drawing.Point(28, 154);
this.poke_label.Location = new System.Drawing.Point(22, 78);
this.poke_label.Name = "poke_label";
this.poke_label.Size = new System.Drawing.Size(65, 16);
this.poke_label.TabIndex = 3;
this.poke_label.Text = "Pokémon";
this.poke_label.Text = "Pokémon";
//
// trainerClassIdx_label
//
this.trainerClassIdx_label.AutoSize = true;
this.trainerClassIdx_label.Location = new System.Drawing.Point(28, 87);
this.trainerClassIdx_label.Location = new System.Drawing.Point(172, 22);
this.trainerClassIdx_label.Name = "trainerClassIdx_label";
this.trainerClassIdx_label.Size = new System.Drawing.Size(122, 16);
this.trainerClassIdx_label.TabIndex = 4;
@ -87,7 +108,7 @@ namespace DSPRE
// pokeLVL_label
//
this.pokeLVL_label.AutoSize = true;
this.pokeLVL_label.Location = new System.Drawing.Point(278, 179);
this.pokeLVL_label.Location = new System.Drawing.Point(315, 102);
this.pokeLVL_label.Name = "pokeLVL_label";
this.pokeLVL_label.Size = new System.Drawing.Size(33, 16);
this.pokeLVL_label.TabIndex = 6;
@ -95,7 +116,7 @@ namespace DSPRE
//
// pokeLevel
//
this.pokeLevel.Location = new System.Drawing.Point(318, 177);
this.pokeLevel.Location = new System.Drawing.Point(349, 100);
this.pokeLevel.Minimum = new decimal(new int[] {
1,
0,
@ -112,9 +133,9 @@ namespace DSPRE
//
// trainerClassIdx
//
this.trainerClassIdx.Location = new System.Drawing.Point(28, 110);
this.trainerClassIdx.Location = new System.Drawing.Point(172, 45);
this.trainerClassIdx.Maximum = new decimal(new int[] {
120,
1000,
0,
0,
0});
@ -137,15 +158,15 @@ namespace DSPRE
// natureSelect
//
this.natureSelect.FormattingEnabled = true;
this.natureSelect.Location = new System.Drawing.Point(192, 44);
this.natureSelect.Location = new System.Drawing.Point(433, 44);
this.natureSelect.Name = "natureSelect";
this.natureSelect.Size = new System.Drawing.Size(207, 24);
this.natureSelect.Size = new System.Drawing.Size(227, 24);
this.natureSelect.TabIndex = 11;
//
// nature_label
//
this.nature_label.AutoSize = true;
this.nature_label.Location = new System.Drawing.Point(192, 21);
this.nature_label.Location = new System.Drawing.Point(433, 21);
this.nature_label.Name = "nature_label";
this.nature_label.Size = new System.Drawing.Size(47, 16);
this.nature_label.TabIndex = 12;
@ -154,17 +175,17 @@ namespace DSPRE
// DV_label
//
this.DV_label.AutoSize = true;
this.DV_label.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.DV_label.Location = new System.Drawing.Point(443, 44);
this.DV_label.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.DV_label.Location = new System.Drawing.Point(316, 139);
this.DV_label.Name = "DV_label";
this.DV_label.Size = new System.Drawing.Size(162, 25);
this.DV_label.Size = new System.Drawing.Size(162, 28);
this.DV_label.TabIndex = 13;
this.DV_label.Text = "Difficulty Value: 0";
//
// calcButton
//
this.calcButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.calcButton.Location = new System.Drawing.Point(491, 179);
this.calcButton.Font = new System.Drawing.Font("Segoe UI", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.calcButton.Location = new System.Drawing.Point(546, 292);
this.calcButton.Name = "calcButton";
this.calcButton.Size = new System.Drawing.Size(114, 51);
this.calcButton.TabIndex = 14;
@ -177,7 +198,7 @@ namespace DSPRE
this.maleCheck.AutoSize = true;
this.maleCheck.Checked = true;
this.maleCheck.CheckState = System.Windows.Forms.CheckState.Checked;
this.maleCheck.Location = new System.Drawing.Point(192, 111);
this.maleCheck.Location = new System.Drawing.Point(303, 46);
this.maleCheck.Name = "maleCheck";
this.maleCheck.Size = new System.Drawing.Size(112, 20);
this.maleCheck.TabIndex = 15;
@ -187,35 +208,35 @@ namespace DSPRE
// maxDVNature_label
//
this.maxDVNature_label.AutoSize = true;
this.maxDVNature_label.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.maxDVNature_label.Location = new System.Drawing.Point(323, 127);
this.maxDVNature_label.Font = new System.Drawing.Font("Segoe UI", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.maxDVNature_label.Location = new System.Drawing.Point(316, 170);
this.maxDVNature_label.Name = "maxDVNature_label";
this.maxDVNature_label.Size = new System.Drawing.Size(125, 20);
this.maxDVNature_label.Size = new System.Drawing.Size(133, 25);
this.maxDVNature_label.TabIndex = 16;
this.maxDVNature_label.Text = "DV 255 Nature:";
//
// IV_label
//
this.IV_label.AutoSize = true;
this.IV_label.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.IV_label.Location = new System.Drawing.Point(323, 87);
this.IV_label.Font = new System.Drawing.Font("Segoe UI", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.IV_label.Location = new System.Drawing.Point(315, 198);
this.IV_label.Name = "IV_label";
this.IV_label.Size = new System.Drawing.Size(113, 20);
this.IV_label.Size = new System.Drawing.Size(116, 25);
this.IV_label.TabIndex = 17;
this.IV_label.Text = "Resulting IVs:";
//
// pokemonSelector
//
this.pokemonSelector.FormattingEnabled = true;
this.pokemonSelector.Location = new System.Drawing.Point(28, 176);
this.pokemonSelector.Location = new System.Drawing.Point(22, 99);
this.pokemonSelector.Name = "pokemonSelector";
this.pokemonSelector.Size = new System.Drawing.Size(244, 24);
this.pokemonSelector.Size = new System.Drawing.Size(287, 24);
this.pokemonSelector.TabIndex = 18;
this.pokemonSelector.TextChanged += new System.EventHandler(this.PokemonSelector_TextChanged);
//
// showAllButton
//
this.showAllButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.showAllButton.Location = new System.Drawing.Point(391, 192);
this.showAllButton.Location = new System.Drawing.Point(566, 88);
this.showAllButton.Name = "showAllButton";
this.showAllButton.Size = new System.Drawing.Size(94, 29);
this.showAllButton.TabIndex = 19;
@ -223,20 +244,163 @@ namespace DSPRE
this.showAllButton.UseVisualStyleBackColor = true;
this.showAllButton.Click += new System.EventHandler(this.ShowAllButton_Click);
//
// helpButton
// radioButtonMale
//
this.helpButton.Location = new System.Drawing.Point(541, 2);
this.helpButton.Name = "helpButton";
this.helpButton.Size = new System.Drawing.Size(75, 23);
this.helpButton.TabIndex = 20;
this.helpButton.Text = "Help";
this.helpButton.UseVisualStyleBackColor = true;
this.helpButton.Click += new System.EventHandler(this.buttonHelp_Click);
this.radioButtonMale.AutoSize = true;
this.radioButtonMale.Location = new System.Drawing.Point(6, 47);
this.radioButtonMale.Name = "radioButtonMale";
this.radioButtonMale.Size = new System.Drawing.Size(96, 20);
this.radioButtonMale.TabIndex = 20;
this.radioButtonMale.TabStop = true;
this.radioButtonMale.Text = "Force Male";
this.radioButtonMale.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.radioButtonMale.UseVisualStyleBackColor = true;
//
// radioButtonFemale
//
this.radioButtonFemale.AutoSize = true;
this.radioButtonFemale.Location = new System.Drawing.Point(6, 72);
this.radioButtonFemale.Name = "radioButtonFemale";
this.radioButtonFemale.Size = new System.Drawing.Size(112, 20);
this.radioButtonFemale.TabIndex = 21;
this.radioButtonFemale.TabStop = true;
this.radioButtonFemale.Text = "Force Female";
this.radioButtonFemale.UseVisualStyleBackColor = true;
//
// radioButtonAbility1
//
this.radioButtonAbility1.AutoSize = true;
this.radioButtonAbility1.Location = new System.Drawing.Point(6, 47);
this.radioButtonAbility1.Name = "radioButtonAbility1";
this.radioButtonAbility1.Size = new System.Drawing.Size(112, 20);
this.radioButtonAbility1.TabIndex = 22;
this.radioButtonAbility1.TabStop = true;
this.radioButtonAbility1.Text = "Force Ability 1";
this.radioButtonAbility1.UseVisualStyleBackColor = true;
//
// radioButtonAbility2
//
this.radioButtonAbility2.AutoSize = true;
this.radioButtonAbility2.Location = new System.Drawing.Point(6, 72);
this.radioButtonAbility2.Name = "radioButtonAbility2";
this.radioButtonAbility2.Size = new System.Drawing.Size(112, 20);
this.radioButtonAbility2.TabIndex = 23;
this.radioButtonAbility2.TabStop = true;
this.radioButtonAbility2.Text = "Force Ability 2";
this.radioButtonAbility2.UseVisualStyleBackColor = true;
//
// numericUpDownGender
//
this.numericUpDownGender.Enabled = false;
this.numericUpDownGender.Location = new System.Drawing.Point(6, 170);
this.numericUpDownGender.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.numericUpDownGender.Name = "numericUpDownGender";
this.numericUpDownGender.Size = new System.Drawing.Size(120, 22);
this.numericUpDownGender.TabIndex = 24;
//
// groupBoxGender
//
this.groupBoxGender.Controls.Add(this.radioButtonIngoreGender);
this.groupBoxGender.Controls.Add(this.radioButtonMale);
this.groupBoxGender.Controls.Add(this.radioButtonFemale);
this.groupBoxGender.Location = new System.Drawing.Point(11, 22);
this.groupBoxGender.Name = "groupBoxGender";
this.groupBoxGender.Size = new System.Drawing.Size(132, 112);
this.groupBoxGender.TabIndex = 25;
this.groupBoxGender.TabStop = false;
this.groupBoxGender.Text = "Pokémon Gender";
//
// radioButtonIngoreGender
//
this.radioButtonIngoreGender.AutoSize = true;
this.radioButtonIngoreGender.Checked = true;
this.radioButtonIngoreGender.Location = new System.Drawing.Point(6, 22);
this.radioButtonIngoreGender.Name = "radioButtonIngoreGender";
this.radioButtonIngoreGender.Size = new System.Drawing.Size(76, 20);
this.radioButtonIngoreGender.TabIndex = 22;
this.radioButtonIngoreGender.TabStop = true;
this.radioButtonIngoreGender.Text = "No Flag";
this.radioButtonIngoreGender.TextAlign = System.Drawing.ContentAlignment.TopCenter;
this.radioButtonIngoreGender.UseVisualStyleBackColor = true;
this.radioButtonIngoreGender.CheckedChanged += new System.EventHandler(this.radioButtonNoFlag_CheckedChanged);
//
// groupBoxAbility
//
this.groupBoxAbility.Controls.Add(this.radioButtonIgnoreAbility);
this.groupBoxAbility.Controls.Add(this.radioButtonAbility1);
this.groupBoxAbility.Controls.Add(this.radioButtonAbility2);
this.groupBoxAbility.Location = new System.Drawing.Point(143, 22);
this.groupBoxAbility.Name = "groupBoxAbility";
this.groupBoxAbility.Size = new System.Drawing.Size(138, 112);
this.groupBoxAbility.TabIndex = 26;
this.groupBoxAbility.TabStop = false;
this.groupBoxAbility.Text = "Pokémon Ability";
//
// radioButtonIgnoreAbility
//
this.radioButtonIgnoreAbility.AutoSize = true;
this.radioButtonIgnoreAbility.Checked = true;
this.radioButtonIgnoreAbility.Location = new System.Drawing.Point(6, 22);
this.radioButtonIgnoreAbility.Name = "radioButtonIgnoreAbility";
this.radioButtonIgnoreAbility.Size = new System.Drawing.Size(76, 20);
this.radioButtonIgnoreAbility.TabIndex = 24;
this.radioButtonIgnoreAbility.TabStop = true;
this.radioButtonIgnoreAbility.Text = "No Flag";
this.radioButtonIgnoreAbility.UseVisualStyleBackColor = true;
this.radioButtonIgnoreAbility.CheckedChanged += new System.EventHandler(this.radioButtonNoFlag_CheckedChanged);
//
// labelGenderRatio
//
this.labelGenderRatio.AutoSize = true;
this.labelGenderRatio.Location = new System.Drawing.Point(6, 148);
this.labelGenderRatio.Name = "labelGenderRatio";
this.labelGenderRatio.Size = new System.Drawing.Size(148, 16);
this.labelGenderRatio.TabIndex = 27;
this.labelGenderRatio.Text = "Pokémon Gender Ratio";
//
// groupBoxHGSS
//
this.groupBoxHGSS.Controls.Add(this.buttonHGSS);
this.groupBoxHGSS.Controls.Add(this.groupBoxGender);
this.groupBoxHGSS.Controls.Add(this.labelGenderRatio);
this.groupBoxHGSS.Controls.Add(this.numericUpDownGender);
this.groupBoxHGSS.Controls.Add(this.groupBoxAbility);
this.groupBoxHGSS.Location = new System.Drawing.Point(22, 139);
this.groupBoxHGSS.Name = "groupBoxHGSS";
this.groupBoxHGSS.Size = new System.Drawing.Size(287, 204);
this.groupBoxHGSS.TabIndex = 28;
this.groupBoxHGSS.TabStop = false;
this.groupBoxHGSS.Text = "HGSS Only";
//
// buttonHelp
//
this.buttonHelp.Location = new System.Drawing.Point(591, 123);
this.buttonHelp.Name = "buttonHelp";
this.buttonHelp.Size = new System.Drawing.Size(69, 29);
this.buttonHelp.TabIndex = 29;
this.buttonHelp.Text = "Help";
this.buttonHelp.UseVisualStyleBackColor = true;
this.buttonHelp.Click += new System.EventHandler(this.buttonHelp_Click);
//
// buttonHGSS
//
this.buttonHGSS.Location = new System.Drawing.Point(170, 163);
this.buttonHGSS.Name = "buttonHGSS";
this.buttonHGSS.Size = new System.Drawing.Size(102, 29);
this.buttonHGSS.TabIndex = 28;
this.buttonHGSS.Text = "HGSS Help";
this.buttonHGSS.UseVisualStyleBackColor = true;
this.buttonHGSS.Click += new System.EventHandler(this.buttonHGSS_Click);
//
// DVCalc
//
this.ClientSize = new System.Drawing.Size(628, 242);
this.Controls.Add(this.helpButton);
this.ClientSize = new System.Drawing.Size(664, 347);
this.Controls.Add(this.buttonHelp);
this.Controls.Add(this.groupBoxHGSS);
this.Controls.Add(this.showAllButton);
this.Controls.Add(this.pokemonSelector);
this.Controls.Add(this.IV_label);
@ -261,12 +425,18 @@ namespace DSPRE
((System.ComponentModel.ISupportInitialize)(this.pokeLevel)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.trainerClassIdx)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.trainerIdx)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownGender)).EndInit();
this.groupBoxGender.ResumeLayout(false);
this.groupBoxGender.PerformLayout();
this.groupBoxAbility.ResumeLayout(false);
this.groupBoxAbility.PerformLayout();
this.groupBoxHGSS.ResumeLayout(false);
this.groupBoxHGSS.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
private void PopulateComboBox()
{
// Populate Nature ComboBox (static readonly List)
@ -280,39 +450,47 @@ namespace DSPRE
for (int id = 0; id < pokeNames.Length; id++)
{
pokemonSelector.Items.Add(new KeyValuePair<int, string>(id, pokeNames[id]));
}
}
pokemonSelector.SelectedIndex = 0;
}
private void SetTrainerData(int TrainerIndex, int TrainerClassIndex)
{
trainerIdx.Value = TrainerIndex;
trainerClassIdx.Value = TrainerClassIndex;
}
private void CalcButton_Click(object sender, EventArgs e)
{
// Natures are sorted by their index so this works
uint nature = (uint)natureSelect.SelectedIndex;
int pokemonIndex = 1;
uint pokemonIndex = 1;
if (pokemonSelector.SelectedItem != null)
{
KeyValuePair<int, string> selectedPokemon = (KeyValuePair<int, string>)pokemonSelector.SelectedItem;
pokemonIndex = (int)selectedPokemon.Key;
pokemonIndex = (uint)selectedPokemon.Key;
}
int DV = DVCalculator.findHighestDV((int)trainerIdx.Value, (int)trainerClassIdx.Value, maleCheck.Checked, pokemonIndex, (int)pokeLevel.Value, nature);
int genderOverride = 0;
int abilityOverride = 0;
// Determine nature for max DV (max IV) for convenience
uint maxDVNature = DVCalculator.getNatureFromPID(DVCalculator.generatePID((int)trainerIdx.Value, (int)trainerClassIdx.Value, maleCheck.Checked, pokemonIndex, (int)pokeLevel.Value, 255));
if (radioButtonMale.Checked) { genderOverride = 1; }
else if (radioButtonFemale.Checked) { genderOverride = 2; }
if (radioButtonAbility1.Checked) { abilityOverride = 1; }
else if (radioButtonAbility2.Checked) { abilityOverride = 2; }
int DV = DVCalculator.findHighestDV(
(uint)trainerIdx.Value, (uint)trainerClassIdx.Value, maleCheck.Checked, pokemonIndex,
(byte)pokeLevel.Value, (byte)numericUpDownGender.Value, genderOverride, abilityOverride, nature);
uint maxDVNature = DVCalculator.getNatureFromPID(DVCalculator.generatePID(
(uint)trainerIdx.Value, (uint)trainerClassIdx.Value, maleCheck.Checked, pokemonIndex,
(byte)pokeLevel.Value, (byte)numericUpDownGender.Value, genderOverride, abilityOverride, 255));
// Display results
DV_label.Text = "Difficulty Value: " + DV;
IV_label.Text = "Resulting IVs: " + (DV * 31 / 255);
maxDVNature_label.Text = "DV 255 Nature: " + DVCalculator.Natures[(int)maxDVNature];
@ -321,18 +499,29 @@ namespace DSPRE
private void ShowAllButton_Click(object sender, EventArgs e)
{
int pokemonIndex = 1;
uint pokemonIndex = 1;
if (pokemonSelector.SelectedItem != null)
{
KeyValuePair<int, string> selectedPokemon = (KeyValuePair<int, string>)pokemonSelector.SelectedItem;
pokemonIndex = (int)selectedPokemon.Key;
pokemonIndex = (uint)selectedPokemon.Key;
}
int genderOverride = 0;
int abilityOverride = 0;
if (radioButtonMale.Checked) { genderOverride = 1; }
else if (radioButtonFemale.Checked) { genderOverride = 2; }
if (radioButtonAbility1.Checked) { abilityOverride = 1; }
else if (radioButtonAbility2.Checked) { abilityOverride = 2; }
// Create a list of DV-IV-Nature Triplets
List<DVIVNatureTriplet> natureDict = DVCalculator.getAllNatures((int)trainerIdx.Value, (int)trainerClassIdx.Value, maleCheck.Checked, pokemonIndex, (int)pokeLevel.Value);
List<DVIVNatureTriplet> natureDict = DVCalculator.getAllNatures(
(uint)trainerIdx.Value, (uint)trainerClassIdx.Value, maleCheck.Checked, pokemonIndex,
(byte)pokeLevel.Value, (byte)numericUpDownGender.Value, genderOverride, abilityOverride);
// Create an instance of the view form and pass the data
// There might be a better way to do this?
@ -342,7 +531,7 @@ namespace DSPRE
private void PokemonSelector_TextChanged(object sender, EventArgs e)
{
if (sender == null || !(sender is ComboBox)){ { return; } }
if (sender == null || !(sender is ComboBox)) { return; }
ComboBox comboBox = (ComboBox)sender;
string enteredText = comboBox.Text.ToLower();
@ -358,6 +547,18 @@ namespace DSPRE
}
}
private void radioButtonNoFlag_CheckedChanged(object sender, EventArgs e)
{
if (radioButtonIgnoreAbility.Checked && radioButtonIngoreGender.Checked)
{
numericUpDownGender.Enabled = false;
return;
}
numericUpDownGender.Enabled = true;
}
private void buttonHelp_Click(object sender, EventArgs e)
{
MessageBox.Show("DV, or \"Difficulty Value\", is used by the game engine to calculate how tough an opponent Pokemon should be.\n" +
@ -367,6 +568,20 @@ namespace DSPRE
"\nThis calculator allows you to choose a desired Nature and then find the highest possible DV that will yield that Nature." +
"\nIf you want a specific combination of IVs and Nature instead, please click the \"Show All\" button and find the one you want."
, "Difficulty Value", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void buttonHGSS_Click(object sender, EventArgs e)
{
MessageBox.Show("In Diamond, Pearl and Platinum Pokemon will always have the same gender as their trainer and will always have ability 1. " +
"Heartgold and Soulsilver allow for the Pokemon's Gender and Ability to be set using special flags. " +
"Setting those flags will also affect a Pokemon's Nature. " +
"In order for this calculator to work it needs to know which flags have been set. " +
"You can follow this guide:\n" +
"- If the Pokemon whose nature you are trying to calculate has ability 2 then \"Force Ability 2\" must be selected.\n" +
"- If the Pokemon whose nature you are trying to calculate has a non-default gender then \"Force Male\" / \"Force Female\" must be selected.\n" +
"- If the Pokemon whose nature you are trying to calculate has a non-default gender and ability 1 then \"Force Ability 1\" must also be selected.\n" +
"If you are changing a Pokemon's gender you must also provide the correct Gender Ratio which you can look up using DSPRE's \"Pokémon Editor\".", "How to use" ,MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}

View File

@ -19,39 +19,32 @@ namespace DSPRE
internal static class DVCalculator
{
private static long seed;
public static void setSeed(long seed)
private static uint state;
public static void setSeed(uint seed)
{
DVCalculator.seed = seed;
DVCalculator.state = seed;
}
public static long getSeed()
{
return DVCalculator.seed;
}
// This function is lifted from turtleisaac's Pokeditor (with permission)
// this code is partially lifted from turtleisaac's Pokeditor
// See https://github.com/turtleisaac/PokEditor-v2/blob/72ca6ab641f616b8be9a87624b81896baa45f947/src/com/turtleisaac/pokeditor/utilities/TrainerPersonalityCalculator.java
public static long getNextRandom()
// and the pokeplatinum / pokeheartgold projects See: https://github.com/pret
public static uint getNextRandom()
{
long random = 0x41c64e6d * seed + 0x6073;
state = 1103515245 * state + 24691;
//last 32 bits is new seed
seed = random & 0xFFFFFFFFL;
return random;
// Upper 16 bit are random value
return state >> 16;
}
public static int findHighestDV(int trainerIdx, int trainerClassIdx, bool trainerClassMale, int pokeIdx, int pokeLevel, uint nature)
public static int findHighestDV(uint trainerIdx, uint trainerClassIdx, bool trainerClassMale, uint pokeIdx, byte pokeLevel, byte baseGenderRatio, int genderOverride, int abilityOverride, uint nature)
{
int DV;
byte DV;
// Iterate over all possible PIDs and return highest DV that yields the desired nature
for (DV = 255; DV >= 0; DV--)
for (DV = 255; DV > 0; DV--)
{
if (getNatureFromPID(generatePID(trainerIdx, trainerClassIdx, trainerClassMale, pokeIdx, pokeLevel, DV)) == nature)
if (getNatureFromPID(generatePID(trainerIdx, trainerClassIdx, trainerClassMale, pokeIdx, pokeLevel, baseGenderRatio, genderOverride, abilityOverride, DV)) == nature)
{ return DV; }
}
@ -59,28 +52,52 @@ namespace DSPRE
}
// this function is lifted from turtleisaac's Pokeditor (with permission)
// See https://github.com/turtleisaac/PokEditor-v2/blob/72ca6ab641f616b8be9a87624b81896baa45f947/src/com/turtleisaac/pokeditor/utilities/TrainerPersonalityCalculator.java
public static uint generatePID(int trainerIdx, int trainerClassIdx, bool trainerClassMale, int pokeIdx, int pokeLevel, int difficultyValue)
public static uint generatePID(uint trainerIdx, uint trainerClassIdx, bool trainerClassMale, uint pokeIdx, byte pokeLevel, byte baseGenderRatio, int genderOverride, int abilityOverride, byte difficultyValue)
{
long newSeed = trainerIdx + pokeIdx + pokeLevel + difficultyValue;
long random = 0;
uint newSeed = (uint)(trainerIdx + pokeIdx + pokeLevel + difficultyValue);
setSeed(newSeed);
uint random = 0;
while (trainerClassIdx > 0)
{
trainerClassIdx--;
random = getNextRandom();
}
// Don't really get this part? Why are we shifting to the right then left again?
long PID = (random >> 16) & 0xffff;
PID = PID * 256;
uint genderMod = 0;
// This seems super arbitrary (wtf GameFreak?)
PID += trainerClassMale ? 136 : 120;
// this is always the case in platinum
if (genderOverride == 0)
{
genderMod = trainerClassMale ? 136u : 120u;
}
// Code from here in is HGSS exclusive
if (genderOverride == 1)
{
genderMod = baseGenderRatio + 2u;
}
else if (genderOverride == 2)
{
genderMod = baseGenderRatio - 2u;
}
// Force Ability 1 --> Force lowest bit to 0
if (abilityOverride == 1)
{
genderMod = (uint)(genderMod & ~1);
}
// Force Ability 2 --> Force lowest bit to 1
else if (abilityOverride == 2)
{
genderMod = (uint)(genderMod | 1);
}
uint PID = (random << 8) + genderMod;
return (uint)PID;
}
@ -90,53 +107,52 @@ namespace DSPRE
return (PID % 100) % 25;
}
public static List<DVIVNatureTriplet> getAllNatures(int trainerIdx, int trainerClassIdx, bool trainerClassMale, int pokeIdx, int pokeLevel)
public static List<DVIVNatureTriplet> getAllNatures(uint trainerIdx, uint trainerClassIdx, bool trainerClassMale, uint pokeIdx, byte pokeLevel, byte baseGenderRatio, int genderOverride, int abilityOverride)
{
List<DVIVNatureTriplet> natureList = new List<DVIVNatureTriplet>();
List<DVIVNatureTriplet> natureDict = new List<DVIVNatureTriplet>();
int DV;
byte DV;
uint natureIdx;
// Iterate over all possible PIDs and store the DV IV and Nature String in the custom data type
for (DV = 255; DV >= 0; DV--)
for (DV = 255; DV > 0; DV--)
{
natureIdx = getNatureFromPID(generatePID(trainerIdx, trainerClassIdx, trainerClassMale, pokeIdx, pokeLevel, DV));
natureIdx = getNatureFromPID(generatePID(trainerIdx, trainerClassIdx, trainerClassMale, pokeIdx, pokeLevel, baseGenderRatio, genderOverride, abilityOverride, DV));
natureList.Add(new DVIVNatureTriplet(DV, DV*31/255 , Natures[(int)natureIdx]));
natureDict.Add(new DVIVNatureTriplet(DV, DV * 31 / 255, Natures[(int)natureIdx]));
}
return natureList;
return natureDict;
}
public static readonly List<string> Natures = new List<string>
{
"Hardy: Neutral",
"Lonely: +Atk, -Def",
"Brave: +Atk, -Spe",
"Adamant: +Atk, -SpA",
"Naughty: +Atk, -SpD",
"Bold: +Def, -Atk",
"Docile: Neutral",
"Relaxed: +Def, -Spe",
"Impish: +Def, -SpA",
"Lax: +Def, -SpD",
"Timid: +Spe, -Atk",
"Hasty: +Spe, -Def",
"Serious: Neutral",
"Jolly: +Spe, -SpA",
"Naive: +Spe, -SpD",
"Modest: +SpA, -Atk",
"Mild: +SpA, -Def",
"Quiet: +SpA, -Spe",
"Bashful: Neutral",
"Rash: +SpA, -SpD",
"Calm: +SpD, -Atk",
"Gentle: +SpD, -Def",
"Sassy: +SpD, -Spe",
"Careful: +SpD, -SpA",
"Quirky: Neutral"
};
public static List<string> Natures = new List<string>
{
"Hardy: Neutral",
"Lonely: +Atk, -Def",
"Brave: +Atk, -Spe",
"Adamant: +Atk, -SpA",
"Naughty: +Atk, -SpD",
"Bold: +Def, -Atk",
"Docile: Neutral",
"Relaxed: +Def, -Spe",
"Impish: +Def, -SpA",
"Lax: +Def, -SpD",
"Timid: +Spe, -Atk",
"Hasty: +Spe, -Def",
"Serious: Neutral",
"Jolly: +Spe, -SpA",
"Naive: +Spe, -SpD",
"Modest: +SpA, -Atk",
"Mild: +SpA, -Def",
"Quiet: +SpA, -Spe",
"Bashful: Neutral",
"Rash: +SpA, -SpD",
"Calm: +SpD, -Atk",
"Gentle: +SpD, -Def",
"Sassy: +SpD, -Spe",
"Careful: +SpD, -SpA",
"Quirky: Neutral"
};
}

385
DS_Map/DocTool.cs Normal file
View File

@ -0,0 +1,385 @@
using DSPRE.Resources;
using DSPRE.ROMFiles;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Documents;
using System.Windows.Forms;
using static DSPRE.MoveData;
using static DSPRE.RomInfo;
namespace DSPRE
{
internal class DocTool
{
public static void ExportAll()
{
// Create the subfolder Docs in the executable directory and write the CSV files there
string executablePath = AppDomain.CurrentDomain.BaseDirectory;
string docsFolderPath = Path.Combine(executablePath, "Docs");
string pokePersonalDataPath = Path.Combine(docsFolderPath, "PokemonPersonalData.csv");
string learnsetDataPath = Path.Combine(docsFolderPath, "LearnsetData.csv");
string evolutionDataPath = Path.Combine(docsFolderPath, "EvolutionData.csv");
string trainerDataPath = Path.Combine(docsFolderPath, "TrainerData.txt");
string moveDataPath = Path.Combine(docsFolderPath, "MoveData.csv");
string[] pokeNames = RomInfo.GetPokemonNames();
string[] itemNames = RomInfo.GetItemNames();
string[] abilityNames = RomInfo.GetAbilityNames();
string[] moveNames = RomInfo.GetAttackNames();
string[] trainerNames = RomInfo.GetSimpleTrainerNames();
string[] trainerClassNames = RomInfo.GetTrainerClassNames();
// Handle Forms
int extraCount = RomInfo.GetPersonalFilesCount() - pokeNames.Length;
string[] extraNames = new string[extraCount];
for (int i = 0; i < extraCount; i++)
{
PokeDatabase.PersonalData.PersonalExtraFiles extraEntry = PokeDatabase.PersonalData.personalExtraFiles[i];
extraNames[i] = pokeNames[extraEntry.monId] + " - " + extraEntry.description;
}
pokeNames = pokeNames.Concat(extraNames).ToArray();
// Create the Docs folder if it doesn't exist
if (!Directory.Exists(docsFolderPath))
{
Directory.CreateDirectory(docsFolderPath);
}
ExportPersonalDataToCSV(pokePersonalDataPath, pokeNames, abilityNames);
ExportLearnsetDataToCSV(learnsetDataPath, pokeNames, moveNames);
ExportEvolutionDataToCSV(evolutionDataPath, pokeNames, itemNames, moveNames);
ExportTrainersToText(trainerDataPath, trainerNames, trainerClassNames, pokeNames, itemNames, moveNames, abilityNames);
ExportMoveDataToCSV(moveDataPath, moveNames);
MessageBox.Show($"CSV files exported successfully to path: {docsFolderPath}");
}
private static void ExportPersonalDataToCSV(string pokePersonalDataPath, string[] pokeNames, string[] abilityNames)
{
// Write the Pokemon Personal Data to the CSV file
PokemonPersonalData curPersonalData = null;
StreamWriter sw = new StreamWriter(pokePersonalDataPath);
sw.WriteLine("ID,Name,Type1,Type2,BaseHP,BaseAttack,BaseDefense,BaseSpecialAttack,BaseSpecialDefense,BaseSpeed," +
"Ability1,Ability2");
for (int i = 0; i < RomInfo.GetPersonalFilesCount(); i++)
{
curPersonalData = new PokemonPersonalData(i);
sw.WriteLine($"{i},{pokeNames[i]},{curPersonalData.type1},{curPersonalData.type2}," +
$"{curPersonalData.baseHP},{curPersonalData.baseAtk},{curPersonalData.baseDef}, " +
$"{curPersonalData.baseSpAtk},{curPersonalData.baseSpDef},{curPersonalData.baseSpeed}," +
$"{abilityNames[curPersonalData.firstAbility]},{abilityNames[curPersonalData.secondAbility]}");
}
sw.Close();
}
private static void ExportLearnsetDataToCSV(string learnsetDataPath, string[] pokeNames, string[] moveNames)
{
// Write the Learnset Data to the CSV file
LearnsetData curLearnsetData = null;
StreamWriter sw = new StreamWriter(learnsetDataPath);
sw.WriteLine("ID,Name,[Level|Move]");
for (int i = 0; i < RomInfo.GetLearnsetFilesCount(); i++)
{
curLearnsetData = new LearnsetData(i);
sw.Write($"{i},{pokeNames[i]}");
foreach (var entry in curLearnsetData.list)
{
sw.Write($",[{entry.level}|{moveNames[entry.move]}]");
}
sw.WriteLine();
}
sw.Close();
}
private static void ExportEvolutionDataToCSV(string evolutionDataPath, string[] pokeNames, string[] itemNames, string[] moveNames)
{
// Write the Evolution Data to the CSV file
EvolutionFile curEvolutionFile = null;
StreamWriter sw = new StreamWriter(evolutionDataPath);
sw.WriteLine("ID,Name,[Method|Param|Target]");
for (int i = 0; i < RomInfo.GetEvolutionFilesCount(); i++)
{
curEvolutionFile = new EvolutionFile(i);
sw.Write($"{i},{pokeNames[i]}");
foreach (var entry in curEvolutionFile.data)
{
EvolutionParamMeaning meaning = EvolutionFile.evoDescriptions[entry.method];
string paramString = "";
switch (meaning)
{
case EvolutionParamMeaning.Ignored:
paramString = "Ignored";
break;
case EvolutionParamMeaning.FromLevel:
paramString = entry.param.ToString();
break;
case EvolutionParamMeaning.ItemName:
paramString = itemNames[entry.param];
break;
case EvolutionParamMeaning.MoveName:
paramString = moveNames[entry.param];
break;
case EvolutionParamMeaning.PokemonName:
paramString = pokeNames[entry.param];
break;
case EvolutionParamMeaning.BeautyValue:
paramString = entry.param.ToString();
break;
}
if (entry.target == 0)
{
break;
}
sw.Write($",[{entry.method}|{paramString}|{pokeNames[entry.target]}]");
}
sw.WriteLine();
}
sw.Close();
}
private static void ExportTrainersToText(string trainerDataPath, string[] trainerNames, string[] trainerClassNames, string[] pokeNames, string[] itemNames, string[] moveNames, string[] abilityNames)
{
// Write the Trainer Data to the Text file
TrainerFile curTrainerFile = null;
TrainerProperties curTrainerProperties = null;
FileStream curTrainerParty = null;
StreamWriter sw = new StreamWriter(trainerDataPath);
int trainerCount = Directory.GetFiles(RomInfo.gameDirs[DirNames.trainerProperties].unpackedDir).Length;
for (int i = 1; i < trainerCount; i++)
{
string suffix = "\\" + i.ToString("D4");
curTrainerProperties = new TrainerProperties((ushort)i,
new FileStream(RomInfo.gameDirs[DirNames.trainerProperties].unpackedDir + suffix, FileMode.Open));
curTrainerParty = new FileStream(RomInfo.gameDirs[DirNames.trainerParty].unpackedDir + suffix, FileMode.Open);
curTrainerFile = new TrainerFile(curTrainerProperties, curTrainerParty, trainerNames[i]);
string trainerName = trainerNames[i];
string trainerClass = trainerClassNames[curTrainerProperties.trainerClass];
// Create array of party pokemon
PartyPokemon[] partyPokemon = new PartyPokemon[curTrainerProperties.partyCount];
// Now that we have the party pokemons, we can declare the arrays to store the data
string[] monNames = new string[partyPokemon.Length];
PartyPokemon.GenderAndAbilityFlags[] monFlags = new PartyPokemon.GenderAndAbilityFlags[partyPokemon.Length];
string[] items = new string[partyPokemon.Length];
int[] levels = new int[partyPokemon.Length];
int[] ivs = new int[partyPokemon.Length];
string[][] moves = new string[partyPokemon.Length][];
for (int j = 0; j < partyPokemon.Length; j++)
{
// This assumes that the non-empty mons are at the beginning of the party array which they should be
// if there is some way for this not to be the case, the program will crash
partyPokemon[j] = curTrainerFile.party[j];
// Type cast can be done because CountNonEmptyMons() only returns non-empty mons i.e. mons with non-null pokeID
monNames[j] = pokeNames[(int)partyPokemon[j].pokeID];
monFlags[j] = partyPokemon[j].genderAndAbilityFlags;
// Need to account for the case where the mon has no held item
if (partyPokemon[j].heldItem != null)
{
items[j] = itemNames[(int)partyPokemon[j].heldItem];
}
else
{
items[j] = "None";
}
levels[j] = partyPokemon[j].level;
ivs[j] = partyPokemon[j].difficulty * 31 / 255;
// Need to account for the case where the mon has no moves
if (partyPokemon[j].moves == null)
{
moves[j] = new string[] { "None" };
}
else
{
moves[j] = partyPokemon[j].moves.Select(move => moveNames[move]).ToArray();
}
}
string[] monGenders = new string[partyPokemon.Length];
string[] abilities = new string[partyPokemon.Length];
// This function sets the monGenders and abilities arrays
// We hide this away in a function because it's a bit complex
// and we don't want to clutter the main function more than it already is
SetMonGendersAndAbilities(partyPokemon, monFlags, ref abilityNames, ref monGenders, ref abilities);
sw.Write(TrainerToDocFormat(i, trainerName, trainerClass, monNames, monGenders, items, abilities, levels, ivs, moves));
}
sw.Close();
}
private static void ExportMoveDataToCSV(string moveDataPath, string[] moveNames)
{
StreamWriter sw = new StreamWriter(moveDataPath);
string[] moveFlags = Enum.GetNames(typeof(MoveData.MoveFlags));
string[] attackRange = Enum.GetNames(typeof(MoveData.AttackRange));
string[] battleSeqDesc = PokeDatabase.MoveData.battleSequenceDescriptions;
sw.WriteLine("Move ID,Move Name,Move Type,Move Split,Power,Accuracy,Priority,Side Effect Probability,PP,Ranges,Flags,Effect Description");
for (int i = 0; i < moveNames.Length; i++)
{
MoveData curMoveDataFile = new MoveData(i);
// Lambda magic to select the flags that are set
string moveFlagsString = string.Join("|", moveFlags.Select((flag, index)
=> (curMoveDataFile.flagField & (1 << index)) != 0 ? flag : "").Where(flag => !string.IsNullOrEmpty(flag)));
string attackRangeString = string.Join("|", attackRange.Select((range, index)
=> (curMoveDataFile.target & (1 << index)) != 0 ? range : "").Where(range => !string.IsNullOrEmpty(range)));
string battleSeqDescString = "";
if (curMoveDataFile.battleeffect < battleSeqDesc.Length)
{
battleSeqDescString = battleSeqDesc[curMoveDataFile.battleeffect];
}
sw.WriteLine($"{i},{moveNames[i]},{curMoveDataFile.movetype},{curMoveDataFile.split}," +
$"{curMoveDataFile.damage},{curMoveDataFile.accuracy},{curMoveDataFile.priority}," +
$"{curMoveDataFile.sideEffectProbability},{curMoveDataFile.pp}," +
$"[{attackRangeString}],[{moveFlagsString}],{battleSeqDescString}");
}
sw.Close();
}
private static string TrainerToDocFormat(int index, string trainerName, string trainerClass, string[] monNames, string[] monGenders, string[] items, string[] abilities,
int[] levels, int[] ivs, string[][] moves)
{
StringBuilder sb = new StringBuilder();
sb.Append($"[{index}] {trainerClass} {trainerName}:\n\n");
for (int i = 0; i < monNames.Length; i++)
{
sb.Append(MonToShowdownFormat(monNames[i], monGenders[i], items[i], abilities[i], levels[i], ivs[i], moves[i]));
sb.Append("\n\n");
}
sb.Append("\n\n\n");
return sb.ToString();
}
private static string MonToShowdownFormat(string monName, string gender, string itemName, string ability,
int level, int ivs, string[] moves)
{
StringBuilder sb = new StringBuilder();
sb.Append($"{monName}");
if (gender != "random")
{
sb.Append($" ({gender})");
}
if (itemName != "None")
{
sb.Append($" @ {itemName}");
}
sb.Append("\nAbility: " + ability);
sb.Append("\nLevel: " + level);
sb.Append("\nIVs: " + string.Join(" / ", Enumerable.Repeat(ivs.ToString(), 6)));
moves = moves.Where(move => (move != "None" && move != "-")).ToArray();
sb.Append("\n- " + string.Join("\n- ", moves));
return sb.ToString();
}
private static void SetMonGendersAndAbilities(PartyPokemon[] partyPokemon,
PartyPokemon.GenderAndAbilityFlags[] monFlags, ref string[] abilityNames,
ref string[] monGenders, ref string[] abilities)
{
bool wasFlagSet = false;
for (int j = 0; j < partyPokemon.Length; j++)
{
int genderFlag = (int)monFlags[j] & 0x0F; // Get the lower 4 bits
switch (genderFlag)
{
case 0: // Random
monGenders[j] = "random";
abilities[j] = abilityNames[new PokemonPersonalData((int)partyPokemon[j].pokeID).firstAbility];
break;
case 1: // Male
monGenders[j] = "M";
abilities[j] = abilityNames[new PokemonPersonalData((int)partyPokemon[j].pokeID).secondAbility];
break;
case 2: // Female
monGenders[j] = "F";
abilities[j] = abilityNames[new PokemonPersonalData((int)partyPokemon[j].pokeID).secondAbility];
break;
}
int abilityFlag = (int)monFlags[j] & 0xF0; // Get the upper 4 bits
switch (abilityFlag)
{
case 0: // Unset
// If a gender or ability flag was previously set, we need to use the second ability
if (wasFlagSet)
{
abilities[j] = abilityNames[new PokemonPersonalData((int)partyPokemon[j].pokeID).secondAbility];
}
else
{
abilities[j] = abilityNames[new PokemonPersonalData((int)partyPokemon[j].pokeID).firstAbility];
}
break;
case 1: // Ability 1
abilities[j] = abilityNames[new PokemonPersonalData((int)partyPokemon[j].pokeID).firstAbility];
break;
case 2: // Ability 2
abilities[j] = abilityNames[new PokemonPersonalData((int)partyPokemon[j].pokeID).secondAbility];
break;
}
}
}
}
}

View File

@ -66,21 +66,23 @@
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.pokemonNameInputComboBox, 1, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(5, 5);
this.tableLayoutPanel1.Location = new System.Drawing.Point(7, 6);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.58022F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 88.41978F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(491, 449);
this.tableLayoutPanel1.Size = new System.Drawing.Size(654, 553);
this.tableLayoutPanel1.TabIndex = 0;
//
// saveDataButton
//
this.saveDataButton.Dock = System.Windows.Forms.DockStyle.Fill;
this.saveDataButton.Image = ((System.Drawing.Image)(resources.GetObject("saveDataButton.Image")));
this.saveDataButton.Location = new System.Drawing.Point(441, 3);
this.saveDataButton.Location = new System.Drawing.Point(588, 4);
this.saveDataButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.saveDataButton.Name = "saveDataButton";
this.saveDataButton.Size = new System.Drawing.Size(47, 45);
this.saveDataButton.Size = new System.Drawing.Size(62, 56);
this.saveDataButton.TabIndex = 30;
this.saveDataButton.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.saveDataButton.UseVisualStyleBackColor = true;
@ -89,9 +91,10 @@
// pokemonPictureBox
//
this.pokemonPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.pokemonPictureBox.Location = new System.Drawing.Point(3, 3);
this.pokemonPictureBox.Location = new System.Drawing.Point(4, 4);
this.pokemonPictureBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.pokemonPictureBox.Name = "pokemonPictureBox";
this.pokemonPictureBox.Size = new System.Drawing.Size(44, 45);
this.pokemonPictureBox.Size = new System.Drawing.Size(59, 56);
this.pokemonPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pokemonPictureBox.TabIndex = 12;
this.pokemonPictureBox.TabStop = false;
@ -99,9 +102,10 @@
// monNumberNumericUpDown
//
this.monNumberNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.monNumberNumericUpDown.Location = new System.Drawing.Point(349, 15);
this.monNumberNumericUpDown.Location = new System.Drawing.Point(465, 21);
this.monNumberNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.monNumberNumericUpDown.Name = "monNumberNumericUpDown";
this.monNumberNumericUpDown.Size = new System.Drawing.Size(86, 20);
this.monNumberNumericUpDown.Size = new System.Drawing.Size(115, 22);
this.monNumberNumericUpDown.TabIndex = 16;
this.monNumberNumericUpDown.ValueChanged += new System.EventHandler(this.monNumberNumericUpDown_ValueChanged);
//
@ -111,26 +115,29 @@
this.tableLayoutPanel1.SetColumnSpan(this.tableLayoutPanel2, 4);
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 8.303955F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 8.303955F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 27F));
this.tableLayoutPanel2.Controls.Add(this.groupBox2, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.groupBox3, 1, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 54);
this.tableLayoutPanel2.Location = new System.Drawing.Point(4, 68);
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.Padding = new System.Windows.Forms.Padding(5);
this.tableLayoutPanel2.Padding = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 382F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(485, 392);
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 470F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(646, 481);
this.tableLayoutPanel2.TabIndex = 17;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.movesListBox);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox2.Location = new System.Drawing.Point(8, 8);
this.groupBox2.Location = new System.Drawing.Point(11, 10);
this.groupBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(231, 376);
this.groupBox2.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox2.Size = new System.Drawing.Size(308, 461);
this.groupBox2.TabIndex = 34;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "View";
@ -139,10 +146,11 @@
//
this.movesListBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.movesListBox.FormattingEnabled = true;
this.movesListBox.Location = new System.Drawing.Point(3, 16);
this.movesListBox.Margin = new System.Windows.Forms.Padding(2);
this.movesListBox.ItemHeight = 16;
this.movesListBox.Location = new System.Drawing.Point(4, 19);
this.movesListBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.movesListBox.Name = "movesListBox";
this.movesListBox.Size = new System.Drawing.Size(225, 357);
this.movesListBox.Size = new System.Drawing.Size(300, 438);
this.movesListBox.TabIndex = 0;
this.movesListBox.SelectedIndexChanged += new System.EventHandler(this.movesListBox_SelectedIndexChanged);
//
@ -150,9 +158,11 @@
//
this.groupBox3.Controls.Add(this.tableLayoutPanel3);
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox3.Location = new System.Drawing.Point(245, 8);
this.groupBox3.Location = new System.Drawing.Point(327, 10);
this.groupBox3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(232, 376);
this.groupBox3.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox3.Size = new System.Drawing.Size(308, 461);
this.groupBox3.TabIndex = 35;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Edit";
@ -173,10 +183,10 @@
this.tableLayoutPanel3.Controls.Add(this.moveInputComboBox, 0, 0);
this.tableLayoutPanel3.Controls.Add(this.statusLabel, 0, 3);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 16);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(2);
this.tableLayoutPanel3.Location = new System.Drawing.Point(4, 19);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.Padding = new System.Windows.Forms.Padding(2);
this.tableLayoutPanel3.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tableLayoutPanel3.RowCount = 6;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 34.50088F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 65.49912F));
@ -191,10 +201,11 @@
//
this.descriptorLabel.AutoSize = true;
this.tableLayoutPanel3.SetColumnSpan(this.descriptorLabel, 3);
this.descriptorLabel.Location = new System.Drawing.Point(5, 43);
this.descriptorLabel.Location = new System.Drawing.Point(7, 52);
this.descriptorLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.descriptorLabel.Name = "descriptorLabel";
this.descriptorLabel.Padding = new System.Windows.Forms.Padding(1, 5, 1, 5);
this.descriptorLabel.Size = new System.Drawing.Size(57, 23);
this.descriptorLabel.Padding = new System.Windows.Forms.Padding(1, 6, 1, 6);
this.descriptorLabel.Size = new System.Drawing.Size(71, 28);
this.descriptorLabel.TabIndex = 8;
this.descriptorLabel.Text = "Descriptor";
//
@ -250,10 +261,10 @@
//
this.tableLayoutPanel3.SetColumnSpan(this.levelNumericUpDown, 2);
this.levelNumericUpDown.Dock = System.Windows.Forms.DockStyle.Fill;
this.levelNumericUpDown.Location = new System.Drawing.Point(78, 122);
this.levelNumericUpDown.Margin = new System.Windows.Forms.Padding(2);
this.levelNumericUpDown.Location = new System.Drawing.Point(103, 148);
this.levelNumericUpDown.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.levelNumericUpDown.Name = "levelNumericUpDown";
this.levelNumericUpDown.Size = new System.Drawing.Size(144, 20);
this.levelNumericUpDown.Size = new System.Drawing.Size(191, 22);
this.levelNumericUpDown.TabIndex = 4;
this.levelNumericUpDown.ValueChanged += new System.EventHandler(this.levelNumericUpDown_ValueChanged);
//
@ -261,10 +272,9 @@
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(4, 123);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Location = new System.Drawing.Point(6, 150);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(70, 13);
this.label1.Size = new System.Drawing.Size(91, 16);
this.label1.TabIndex = 5;
this.label1.Text = "Level:";
//
@ -275,10 +285,10 @@
this.moveInputComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.tableLayoutPanel3.SetColumnSpan(this.moveInputComboBox, 3);
this.moveInputComboBox.FormattingEnabled = true;
this.moveInputComboBox.Location = new System.Drawing.Point(4, 12);
this.moveInputComboBox.Margin = new System.Windows.Forms.Padding(2);
this.moveInputComboBox.Location = new System.Drawing.Point(6, 15);
this.moveInputComboBox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.moveInputComboBox.Name = "moveInputComboBox";
this.moveInputComboBox.Size = new System.Drawing.Size(218, 21);
this.moveInputComboBox.Size = new System.Drawing.Size(288, 24);
this.moveInputComboBox.TabIndex = 6;
this.moveInputComboBox.SelectedIndexChanged += new System.EventHandler(this.moveInputComboBox_SelectedIndexChanged);
//
@ -289,8 +299,8 @@
this.tableLayoutPanel3.SetColumnSpan(this.statusLabel, 3);
this.statusLabel.Location = new System.Drawing.Point(5, 261);
this.statusLabel.Name = "statusLabel";
this.statusLabel.Padding = new System.Windows.Forms.Padding(1, 5, 1, 5);
this.statusLabel.Size = new System.Drawing.Size(39, 23);
this.statusLabel.Padding = new System.Windows.Forms.Padding(1, 6, 1, 6);
this.statusLabel.Size = new System.Drawing.Size(46, 28);
this.statusLabel.TabIndex = 7;
this.statusLabel.Text = "Status";
//
@ -300,9 +310,10 @@
this.pokemonNameInputComboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.pokemonNameInputComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.pokemonNameInputComboBox.FormattingEnabled = true;
this.pokemonNameInputComboBox.Location = new System.Drawing.Point(53, 15);
this.pokemonNameInputComboBox.Location = new System.Drawing.Point(71, 20);
this.pokemonNameInputComboBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.pokemonNameInputComboBox.Name = "pokemonNameInputComboBox";
this.pokemonNameInputComboBox.Size = new System.Drawing.Size(290, 21);
this.pokemonNameInputComboBox.Size = new System.Drawing.Size(386, 24);
this.pokemonNameInputComboBox.TabIndex = 31;
this.pokemonNameInputComboBox.SelectedIndexChanged += new System.EventHandler(this.pokemonNameInputComboBox_SelectedIndexChanged);
//
@ -321,15 +332,16 @@
//
// LearnsetEditor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(501, 459);
this.ClientSize = new System.Drawing.Size(668, 565);
this.Controls.Add(this.tableLayoutPanel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "LearnsetEditor";
this.Padding = new System.Windows.Forms.Padding(5);
this.Padding = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.Text = "Learnset Editor";
this.tableLayoutPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pokemonPictureBox)).EndInit();

View File

@ -142,6 +142,7 @@ namespace DSPRE {
}
this._parent.TrySyncIndices((ComboBox)sender);
Helpers.DisableHandlers();
UpdateAddEditStatus();
if (CheckDiscardChanges()) {
int newNumber = pokemonNameInputComboBox.SelectedIndex;
monNumberNumericUpDown.Value = newNumber;
@ -157,6 +158,7 @@ namespace DSPRE {
}
this._parent.TrySyncIndices((NumericUpDown)sender);
Helpers.DisableHandlers();
UpdateAddEditStatus();
if (CheckDiscardChanges()) {
int newNumber = (int)monNumberNumericUpDown.Value;
pokemonNameInputComboBox.SelectedIndex = newNumber;
@ -186,6 +188,12 @@ namespace DSPRE {
private void UpdateAddEditStatus() {
(byte level, ushort move) newEntry = ((byte)levelNumericUpDown.Value, (ushort)moveInputComboBox.SelectedIndex);
if (currentLoadedFile == null)
{
return;
}
bool duplicate = currentLoadedFile.list.Contains(newEntry);
if (duplicate) {
@ -245,6 +253,7 @@ namespace DSPRE {
}
UpdateByEditMode();
UpdateAddEditStatus();
setDirty(true);
}

View File

@ -112,21 +112,23 @@
this.tableLayoutPanel1.Controls.Add(this.moveNameInputComboBox, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.groupBox3, 0, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(5, 5);
this.tableLayoutPanel1.Location = new System.Drawing.Point(7, 6);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 9.036144F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 90.96385F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(740, 557);
this.tableLayoutPanel1.Size = new System.Drawing.Size(986, 686);
this.tableLayoutPanel1.TabIndex = 0;
//
// saveDataButton
//
this.saveDataButton.Dock = System.Windows.Forms.DockStyle.Fill;
this.saveDataButton.Image = ((System.Drawing.Image)(resources.GetObject("saveDataButton.Image")));
this.saveDataButton.Location = new System.Drawing.Point(664, 3);
this.saveDataButton.Location = new System.Drawing.Point(886, 4);
this.saveDataButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.saveDataButton.Name = "saveDataButton";
this.saveDataButton.Size = new System.Drawing.Size(73, 44);
this.saveDataButton.Size = new System.Drawing.Size(96, 53);
this.saveDataButton.TabIndex = 30;
this.saveDataButton.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.saveDataButton.UseVisualStyleBackColor = true;
@ -135,9 +137,10 @@
// moveNumberNumericUpDown
//
this.moveNumberNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.moveNumberNumericUpDown.Location = new System.Drawing.Point(499, 15);
this.moveNumberNumericUpDown.Location = new System.Drawing.Point(665, 19);
this.moveNumberNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.moveNumberNumericUpDown.Name = "moveNumberNumericUpDown";
this.moveNumberNumericUpDown.Size = new System.Drawing.Size(159, 20);
this.moveNumberNumericUpDown.Size = new System.Drawing.Size(213, 22);
this.moveNumberNumericUpDown.TabIndex = 16;
this.moveNumberNumericUpDown.ValueChanged += new System.EventHandler(this.moveNumberNumericUpDown_ValueChanged);
//
@ -148,9 +151,10 @@
this.moveNameInputComboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.moveNameInputComboBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.moveNameInputComboBox.FormattingEnabled = true;
this.moveNameInputComboBox.Location = new System.Drawing.Point(77, 14);
this.moveNameInputComboBox.Location = new System.Drawing.Point(102, 12);
this.moveNameInputComboBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.moveNameInputComboBox.Name = "moveNameInputComboBox";
this.moveNameInputComboBox.Size = new System.Drawing.Size(416, 32);
this.moveNameInputComboBox.Size = new System.Drawing.Size(555, 37);
this.moveNameInputComboBox.TabIndex = 31;
this.moveNameInputComboBox.SelectedIndexChanged += new System.EventHandler(this.moveNameInputComboBox_SelectedIndexChanged);
//
@ -159,10 +163,11 @@
this.tableLayoutPanel1.SetColumnSpan(this.groupBox3, 4);
this.groupBox3.Controls.Add(this.tableLayoutPanel3);
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox3.Location = new System.Drawing.Point(3, 53);
this.groupBox3.Location = new System.Drawing.Point(4, 65);
this.groupBox3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.groupBox3.Size = new System.Drawing.Size(734, 501);
this.groupBox3.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.groupBox3.Size = new System.Drawing.Size(978, 617);
this.groupBox3.TabIndex = 33;
this.groupBox3.TabStop = false;
//
@ -172,10 +177,10 @@
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25.22124F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 53.9823F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20.91647F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 67F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 252F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 69F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 109F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 89F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 336F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 92F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 147F));
this.tableLayoutPanel3.Controls.Add(this.prioPictureBox, 2, 3);
this.tableLayoutPanel3.Controls.Add(this.contestAppealNumericUpDown, 4, 2);
this.tableLayoutPanel3.Controls.Add(this.label6, 3, 2);
@ -204,10 +209,10 @@
this.tableLayoutPanel3.Controls.Add(this.label8, 3, 3);
this.tableLayoutPanel3.Controls.Add(this.sideEffectProbabilityUpDown, 4, 3);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(3, 13);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(2);
this.tableLayoutPanel3.Location = new System.Drawing.Point(4, 15);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.Padding = new System.Windows.Forms.Padding(2);
this.tableLayoutPanel3.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tableLayoutPanel3.RowCount = 8;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.996453F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.282195F));
@ -216,32 +221,34 @@
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 29.6875F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 5.275226F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 31.87116F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(728, 488);
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(970, 602);
this.tableLayoutPanel3.TabIndex = 32;
//
// prioPictureBox
//
this.prioPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.prioPictureBox.Location = new System.Drawing.Point(184, 119);
this.prioPictureBox.Location = new System.Drawing.Point(243, 147);
this.prioPictureBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.prioPictureBox.Name = "prioPictureBox";
this.prioPictureBox.Size = new System.Drawing.Size(41, 31);
this.prioPictureBox.Size = new System.Drawing.Size(54, 38);
this.prioPictureBox.TabIndex = 27;
this.prioPictureBox.TabStop = false;
//
// contestAppealNumericUpDown
//
this.contestAppealNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.contestAppealNumericUpDown.Location = new System.Drawing.Point(298, 88);
this.contestAppealNumericUpDown.Location = new System.Drawing.Point(394, 110);
this.contestAppealNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.contestAppealNumericUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.contestAppealNumericUpDown.Name = "contestAppealNumericUpDown";
this.contestAppealNumericUpDown.Size = new System.Drawing.Size(246, 20);
this.contestAppealNumericUpDown.Size = new System.Drawing.Size(328, 22);
this.contestAppealNumericUpDown.TabIndex = 24;
this.contestAppealNumericUpDown.ValueChanged += new System.EventHandler(this.contestAppealNumericUpDown_ValueChanged);
//
@ -249,9 +256,10 @@
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(231, 85);
this.label6.Location = new System.Drawing.Point(305, 105);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(61, 26);
this.label6.Size = new System.Drawing.Size(81, 32);
this.label6.TabIndex = 23;
this.label6.Text = "Contest Appeal";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -259,9 +267,10 @@
// contestConditionPictureBox
//
this.contestConditionPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.contestConditionPictureBox.Location = new System.Drawing.Point(184, 84);
this.contestConditionPictureBox.Location = new System.Drawing.Point(243, 104);
this.contestConditionPictureBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.contestConditionPictureBox.Name = "contestConditionPictureBox";
this.contestConditionPictureBox.Size = new System.Drawing.Size(41, 29);
this.contestConditionPictureBox.Size = new System.Drawing.Size(54, 35);
this.contestConditionPictureBox.TabIndex = 22;
this.contestConditionPictureBox.TabStop = false;
//
@ -269,9 +278,10 @@
//
this.contestConditionComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.contestConditionComboBox.FormattingEnabled = true;
this.contestConditionComboBox.Location = new System.Drawing.Point(62, 88);
this.contestConditionComboBox.Location = new System.Drawing.Point(82, 109);
this.contestConditionComboBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.contestConditionComboBox.Name = "contestConditionComboBox";
this.contestConditionComboBox.Size = new System.Drawing.Size(116, 21);
this.contestConditionComboBox.Size = new System.Drawing.Size(153, 24);
this.contestConditionComboBox.TabIndex = 21;
this.contestConditionComboBox.SelectedIndexChanged += new System.EventHandler(this.contestConditionComboBox_SelectedIndexChanged);
//
@ -279,9 +289,10 @@
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(5, 85);
this.label3.Location = new System.Drawing.Point(7, 105);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(51, 26);
this.label3.Size = new System.Drawing.Size(67, 32);
this.label3.TabIndex = 20;
this.label3.Text = "Contest\r\nCondition";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -289,9 +300,10 @@
// moveSplitPictureBox
//
this.moveSplitPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.moveSplitPictureBox.Location = new System.Drawing.Point(184, 46);
this.moveSplitPictureBox.Location = new System.Drawing.Point(243, 57);
this.moveSplitPictureBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.moveSplitPictureBox.Name = "moveSplitPictureBox";
this.moveSplitPictureBox.Size = new System.Drawing.Size(41, 32);
this.moveSplitPictureBox.Size = new System.Drawing.Size(54, 39);
this.moveSplitPictureBox.TabIndex = 19;
this.moveSplitPictureBox.TabStop = false;
//
@ -300,9 +312,11 @@
this.tableLayoutPanel3.SetColumnSpan(this.groupBox4, 4);
this.groupBox4.Controls.Add(this.flagsTableLayoutPanel);
this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox4.Location = new System.Drawing.Point(231, 318);
this.groupBox4.Location = new System.Drawing.Point(305, 393);
this.groupBox4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(492, 142);
this.groupBox4.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox4.Size = new System.Drawing.Size(658, 175);
this.groupBox4.TabIndex = 18;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Flags";
@ -322,21 +336,23 @@
this.flagsTableLayoutPanel.Controls.Add(this.checkBox16, 0, 2);
this.flagsTableLayoutPanel.Controls.Add(this.checkBox17, 1, 2);
this.flagsTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.flagsTableLayoutPanel.Location = new System.Drawing.Point(3, 16);
this.flagsTableLayoutPanel.Location = new System.Drawing.Point(4, 19);
this.flagsTableLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.flagsTableLayoutPanel.Name = "flagsTableLayoutPanel";
this.flagsTableLayoutPanel.RowCount = 3;
this.flagsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.flagsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.flagsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.flagsTableLayoutPanel.Size = new System.Drawing.Size(486, 123);
this.flagsTableLayoutPanel.Size = new System.Drawing.Size(650, 152);
this.flagsTableLayoutPanel.TabIndex = 11;
//
// checkBox1
//
this.checkBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox1.Location = new System.Drawing.Point(3, 3);
this.checkBox1.Location = new System.Drawing.Point(4, 4);
this.checkBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(155, 35);
this.checkBox1.Size = new System.Drawing.Size(208, 42);
this.checkBox1.TabIndex = 1;
this.checkBox1.Text = "checkBox1";
this.checkBox1.UseVisualStyleBackColor = true;
@ -344,9 +360,10 @@
// checkBox11
//
this.checkBox11.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox11.Location = new System.Drawing.Point(164, 3);
this.checkBox11.Location = new System.Drawing.Point(220, 4);
this.checkBox11.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox11.Name = "checkBox11";
this.checkBox11.Size = new System.Drawing.Size(156, 35);
this.checkBox11.Size = new System.Drawing.Size(208, 42);
this.checkBox11.TabIndex = 2;
this.checkBox11.Text = "checkBox11";
this.checkBox11.UseVisualStyleBackColor = true;
@ -354,9 +371,10 @@
// checkBox12
//
this.checkBox12.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox12.Location = new System.Drawing.Point(326, 3);
this.checkBox12.Location = new System.Drawing.Point(436, 4);
this.checkBox12.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox12.Name = "checkBox12";
this.checkBox12.Size = new System.Drawing.Size(157, 35);
this.checkBox12.Size = new System.Drawing.Size(210, 42);
this.checkBox12.TabIndex = 3;
this.checkBox12.Text = "checkBox12";
this.checkBox12.UseVisualStyleBackColor = true;
@ -364,9 +382,10 @@
// checkBox13
//
this.checkBox13.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox13.Location = new System.Drawing.Point(3, 44);
this.checkBox13.Location = new System.Drawing.Point(4, 54);
this.checkBox13.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox13.Name = "checkBox13";
this.checkBox13.Size = new System.Drawing.Size(155, 35);
this.checkBox13.Size = new System.Drawing.Size(208, 42);
this.checkBox13.TabIndex = 4;
this.checkBox13.Text = "checkBox13";
this.checkBox13.UseVisualStyleBackColor = true;
@ -374,9 +393,10 @@
// checkBox14
//
this.checkBox14.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox14.Location = new System.Drawing.Point(164, 44);
this.checkBox14.Location = new System.Drawing.Point(220, 54);
this.checkBox14.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox14.Name = "checkBox14";
this.checkBox14.Size = new System.Drawing.Size(156, 35);
this.checkBox14.Size = new System.Drawing.Size(208, 42);
this.checkBox14.TabIndex = 5;
this.checkBox14.Text = "checkBox14";
this.checkBox14.UseVisualStyleBackColor = true;
@ -384,9 +404,10 @@
// checkBox15
//
this.checkBox15.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox15.Location = new System.Drawing.Point(326, 44);
this.checkBox15.Location = new System.Drawing.Point(436, 54);
this.checkBox15.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox15.Name = "checkBox15";
this.checkBox15.Size = new System.Drawing.Size(157, 35);
this.checkBox15.Size = new System.Drawing.Size(210, 42);
this.checkBox15.TabIndex = 6;
this.checkBox15.Text = "checkBox15";
this.checkBox15.UseVisualStyleBackColor = true;
@ -394,9 +415,10 @@
// checkBox16
//
this.checkBox16.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox16.Location = new System.Drawing.Point(3, 85);
this.checkBox16.Location = new System.Drawing.Point(4, 104);
this.checkBox16.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox16.Name = "checkBox16";
this.checkBox16.Size = new System.Drawing.Size(155, 35);
this.checkBox16.Size = new System.Drawing.Size(208, 44);
this.checkBox16.TabIndex = 7;
this.checkBox16.Text = "checkBox16";
this.checkBox16.UseVisualStyleBackColor = true;
@ -404,9 +426,10 @@
// checkBox17
//
this.checkBox17.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox17.Location = new System.Drawing.Point(164, 85);
this.checkBox17.Location = new System.Drawing.Point(220, 104);
this.checkBox17.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox17.Name = "checkBox17";
this.checkBox17.Size = new System.Drawing.Size(156, 35);
this.checkBox17.Size = new System.Drawing.Size(208, 44);
this.checkBox17.TabIndex = 8;
this.checkBox17.Text = "checkBox17";
this.checkBox17.UseVisualStyleBackColor = true;
@ -415,9 +438,10 @@
//
this.moveTypeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.moveTypeComboBox.FormattingEnabled = true;
this.moveTypeComboBox.Location = new System.Drawing.Point(62, 12);
this.moveTypeComboBox.Location = new System.Drawing.Point(82, 15);
this.moveTypeComboBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.moveTypeComboBox.Name = "moveTypeComboBox";
this.moveTypeComboBox.Size = new System.Drawing.Size(116, 21);
this.moveTypeComboBox.Size = new System.Drawing.Size(153, 24);
this.moveTypeComboBox.TabIndex = 7;
this.moveTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.moveTypeComboBox_SelectedIndexChanged);
//
@ -425,9 +449,10 @@
//
this.battleSeqComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.battleSeqComboBox.FormattingEnabled = true;
this.battleSeqComboBox.Location = new System.Drawing.Point(298, 12);
this.battleSeqComboBox.Location = new System.Drawing.Point(394, 15);
this.battleSeqComboBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.battleSeqComboBox.Name = "battleSeqComboBox";
this.battleSeqComboBox.Size = new System.Drawing.Size(246, 21);
this.battleSeqComboBox.Size = new System.Drawing.Size(328, 24);
this.battleSeqComboBox.TabIndex = 0;
this.battleSeqComboBox.SelectedIndexChanged += new System.EventHandler(this.battleSeqComboBox_SelectedIndexChanged);
//
@ -435,9 +460,10 @@
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(231, 9);
this.label1.Location = new System.Drawing.Point(305, 11);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(61, 26);
this.label1.Size = new System.Drawing.Size(81, 32);
this.label1.TabIndex = 1;
this.label1.Text = "Effect Sequence";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -446,9 +472,10 @@
//
this.typeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.typeLabel.AutoSize = true;
this.typeLabel.Location = new System.Drawing.Point(5, 16);
this.typeLabel.Location = new System.Drawing.Point(7, 19);
this.typeLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.typeLabel.Name = "typeLabel";
this.typeLabel.Size = new System.Drawing.Size(51, 13);
this.typeLabel.Size = new System.Drawing.Size(67, 16);
this.typeLabel.TabIndex = 2;
this.typeLabel.Text = "Type";
this.typeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -457,9 +484,10 @@
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(5, 55);
this.label2.Location = new System.Drawing.Point(7, 68);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(51, 13);
this.label2.Size = new System.Drawing.Size(67, 16);
this.label2.TabIndex = 5;
this.label2.Text = "Split";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -468,18 +496,20 @@
//
this.moveSplitComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.moveSplitComboBox.FormattingEnabled = true;
this.moveSplitComboBox.Location = new System.Drawing.Point(62, 51);
this.moveSplitComboBox.Location = new System.Drawing.Point(82, 64);
this.moveSplitComboBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.moveSplitComboBox.Name = "moveSplitComboBox";
this.moveSplitComboBox.Size = new System.Drawing.Size(116, 21);
this.moveSplitComboBox.Size = new System.Drawing.Size(153, 24);
this.moveSplitComboBox.TabIndex = 6;
this.moveSplitComboBox.SelectedIndexChanged += new System.EventHandler(this.moveSplitComboBox_SelectedIndexChanged);
//
// moveTypePictureBox
//
this.moveTypePictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.moveTypePictureBox.Location = new System.Drawing.Point(184, 5);
this.moveTypePictureBox.Location = new System.Drawing.Point(243, 6);
this.moveTypePictureBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.moveTypePictureBox.Name = "moveTypePictureBox";
this.moveTypePictureBox.Size = new System.Drawing.Size(41, 35);
this.moveTypePictureBox.Size = new System.Drawing.Size(54, 43);
this.moveTypePictureBox.TabIndex = 3;
this.moveTypePictureBox.TabStop = false;
//
@ -488,10 +518,12 @@
this.tableLayoutPanel3.SetColumnSpan(this.groupBox1, 4);
this.groupBox1.Controls.Add(this.rangesTableLayoutPanel);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox1.Location = new System.Drawing.Point(231, 156);
this.groupBox1.Location = new System.Drawing.Point(305, 193);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel3.SetRowSpan(this.groupBox1, 2);
this.groupBox1.Size = new System.Drawing.Size(492, 156);
this.groupBox1.Size = new System.Drawing.Size(658, 192);
this.groupBox1.TabIndex = 12;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Range of action";
@ -514,22 +546,24 @@
this.rangesTableLayoutPanel.Controls.Add(this.checkBox9, 1, 2);
this.rangesTableLayoutPanel.Controls.Add(this.checkBox10, 2, 2);
this.rangesTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.rangesTableLayoutPanel.Location = new System.Drawing.Point(3, 16);
this.rangesTableLayoutPanel.Location = new System.Drawing.Point(4, 19);
this.rangesTableLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.rangesTableLayoutPanel.Name = "rangesTableLayoutPanel";
this.rangesTableLayoutPanel.RowCount = 4;
this.rangesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.rangesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.rangesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.rangesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.rangesTableLayoutPanel.Size = new System.Drawing.Size(486, 137);
this.rangesTableLayoutPanel.Size = new System.Drawing.Size(650, 169);
this.rangesTableLayoutPanel.TabIndex = 11;
//
// checkBox20
//
this.checkBox20.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox20.Location = new System.Drawing.Point(164, 105);
this.checkBox20.Location = new System.Drawing.Point(220, 130);
this.checkBox20.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox20.Name = "checkBox20";
this.checkBox20.Size = new System.Drawing.Size(156, 29);
this.checkBox20.Size = new System.Drawing.Size(208, 35);
this.checkBox20.TabIndex = 11;
this.checkBox20.Text = "checkBox20";
this.checkBox20.UseVisualStyleBackColor = true;
@ -537,9 +571,10 @@
// checkBox19
//
this.checkBox19.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox19.Location = new System.Drawing.Point(3, 105);
this.checkBox19.Location = new System.Drawing.Point(4, 130);
this.checkBox19.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox19.Name = "checkBox19";
this.checkBox19.Size = new System.Drawing.Size(155, 29);
this.checkBox19.Size = new System.Drawing.Size(208, 35);
this.checkBox19.TabIndex = 10;
this.checkBox19.Text = "checkBox19";
this.checkBox19.UseVisualStyleBackColor = true;
@ -547,9 +582,10 @@
// checkBox2
//
this.checkBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox2.Location = new System.Drawing.Point(3, 3);
this.checkBox2.Location = new System.Drawing.Point(4, 4);
this.checkBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(155, 28);
this.checkBox2.Size = new System.Drawing.Size(208, 34);
this.checkBox2.TabIndex = 1;
this.checkBox2.Text = "checkBox2";
this.checkBox2.UseVisualStyleBackColor = true;
@ -557,9 +593,10 @@
// checkBox3
//
this.checkBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox3.Location = new System.Drawing.Point(164, 3);
this.checkBox3.Location = new System.Drawing.Point(220, 4);
this.checkBox3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(156, 28);
this.checkBox3.Size = new System.Drawing.Size(208, 34);
this.checkBox3.TabIndex = 2;
this.checkBox3.Text = "checkBox3";
this.checkBox3.UseVisualStyleBackColor = true;
@ -567,9 +604,10 @@
// checkBox4
//
this.checkBox4.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox4.Location = new System.Drawing.Point(326, 3);
this.checkBox4.Location = new System.Drawing.Point(436, 4);
this.checkBox4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox4.Name = "checkBox4";
this.checkBox4.Size = new System.Drawing.Size(157, 28);
this.checkBox4.Size = new System.Drawing.Size(210, 34);
this.checkBox4.TabIndex = 3;
this.checkBox4.Text = "checkBox4";
this.checkBox4.UseVisualStyleBackColor = true;
@ -577,9 +615,10 @@
// checkBox5
//
this.checkBox5.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox5.Location = new System.Drawing.Point(3, 37);
this.checkBox5.Location = new System.Drawing.Point(4, 46);
this.checkBox5.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox5.Name = "checkBox5";
this.checkBox5.Size = new System.Drawing.Size(155, 28);
this.checkBox5.Size = new System.Drawing.Size(208, 34);
this.checkBox5.TabIndex = 4;
this.checkBox5.Text = "checkBox5";
this.checkBox5.UseVisualStyleBackColor = true;
@ -587,9 +626,10 @@
// checkBox6
//
this.checkBox6.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox6.Location = new System.Drawing.Point(164, 37);
this.checkBox6.Location = new System.Drawing.Point(220, 46);
this.checkBox6.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox6.Name = "checkBox6";
this.checkBox6.Size = new System.Drawing.Size(156, 28);
this.checkBox6.Size = new System.Drawing.Size(208, 34);
this.checkBox6.TabIndex = 5;
this.checkBox6.Text = "checkBox6";
this.checkBox6.UseVisualStyleBackColor = true;
@ -597,9 +637,10 @@
// checkBox7
//
this.checkBox7.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox7.Location = new System.Drawing.Point(326, 37);
this.checkBox7.Location = new System.Drawing.Point(436, 46);
this.checkBox7.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox7.Name = "checkBox7";
this.checkBox7.Size = new System.Drawing.Size(157, 28);
this.checkBox7.Size = new System.Drawing.Size(210, 34);
this.checkBox7.TabIndex = 6;
this.checkBox7.Text = "checkBox7";
this.checkBox7.UseVisualStyleBackColor = true;
@ -607,9 +648,10 @@
// checkBox8
//
this.checkBox8.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox8.Location = new System.Drawing.Point(3, 71);
this.checkBox8.Location = new System.Drawing.Point(4, 88);
this.checkBox8.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox8.Name = "checkBox8";
this.checkBox8.Size = new System.Drawing.Size(155, 28);
this.checkBox8.Size = new System.Drawing.Size(208, 34);
this.checkBox8.TabIndex = 7;
this.checkBox8.Text = "checkBox8";
this.checkBox8.UseVisualStyleBackColor = true;
@ -617,9 +659,10 @@
// checkBox9
//
this.checkBox9.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox9.Location = new System.Drawing.Point(164, 71);
this.checkBox9.Location = new System.Drawing.Point(220, 88);
this.checkBox9.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox9.Name = "checkBox9";
this.checkBox9.Size = new System.Drawing.Size(156, 28);
this.checkBox9.Size = new System.Drawing.Size(208, 34);
this.checkBox9.TabIndex = 8;
this.checkBox9.Text = "checkBox9";
this.checkBox9.UseVisualStyleBackColor = true;
@ -627,9 +670,10 @@
// checkBox10
//
this.checkBox10.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox10.Location = new System.Drawing.Point(326, 71);
this.checkBox10.Location = new System.Drawing.Point(436, 88);
this.checkBox10.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.checkBox10.Name = "checkBox10";
this.checkBox10.Size = new System.Drawing.Size(157, 28);
this.checkBox10.Size = new System.Drawing.Size(210, 34);
this.checkBox10.TabIndex = 9;
this.checkBox10.Text = "checkBox10";
this.checkBox10.UseVisualStyleBackColor = true;
@ -639,10 +683,12 @@
this.tableLayoutPanel3.SetColumnSpan(this.groupBox2, 3);
this.groupBox2.Controls.Add(this.textBox1);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox2.Location = new System.Drawing.Point(5, 156);
this.groupBox2.Location = new System.Drawing.Point(7, 193);
this.groupBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel3.SetRowSpan(this.groupBox2, 3);
this.groupBox2.Size = new System.Drawing.Size(220, 304);
this.groupBox2.Size = new System.Drawing.Size(290, 375);
this.groupBox2.TabIndex = 17;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Description";
@ -650,22 +696,24 @@
// textBox1
//
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox1.Font = new System.Drawing.Font("Pokemon DPPt", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox1.Location = new System.Drawing.Point(3, 16);
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox1.Location = new System.Drawing.Point(4, 19);
this.textBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true;
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox1.Size = new System.Drawing.Size(214, 285);
this.textBox1.Size = new System.Drawing.Size(282, 352);
this.textBox1.TabIndex = 0;
//
// label4
//
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(550, 16);
this.label4.Location = new System.Drawing.Point(730, 19);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(63, 13);
this.label4.Size = new System.Drawing.Size(84, 16);
this.label4.TabIndex = 13;
this.label4.Text = "Power";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -673,14 +721,15 @@
// powerNumericUpDown
//
this.powerNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.powerNumericUpDown.Location = new System.Drawing.Point(619, 12);
this.powerNumericUpDown.Location = new System.Drawing.Point(822, 16);
this.powerNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.powerNumericUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.powerNumericUpDown.Name = "powerNumericUpDown";
this.powerNumericUpDown.Size = new System.Drawing.Size(104, 20);
this.powerNumericUpDown.Size = new System.Drawing.Size(141, 22);
this.powerNumericUpDown.TabIndex = 14;
this.powerNumericUpDown.ValueChanged += new System.EventHandler(this.powerNumericUpDown_ValueChanged);
//
@ -688,9 +737,10 @@
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(550, 55);
this.label5.Location = new System.Drawing.Point(730, 68);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(63, 13);
this.label5.Size = new System.Drawing.Size(84, 16);
this.label5.TabIndex = 15;
this.label5.Text = "Accuracy";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -698,9 +748,10 @@
// accuracyNumericUpDown
//
this.accuracyNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.accuracyNumericUpDown.Location = new System.Drawing.Point(619, 52);
this.accuracyNumericUpDown.Location = new System.Drawing.Point(822, 65);
this.accuracyNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.accuracyNumericUpDown.Name = "accuracyNumericUpDown";
this.accuracyNumericUpDown.Size = new System.Drawing.Size(104, 20);
this.accuracyNumericUpDown.Size = new System.Drawing.Size(141, 22);
this.accuracyNumericUpDown.TabIndex = 16;
this.accuracyNumericUpDown.ValueChanged += new System.EventHandler(this.accuracyNumericUpDown_ValueChanged);
//
@ -708,9 +759,10 @@
//
this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(5, 128);
this.label7.Location = new System.Drawing.Point(7, 158);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(51, 13);
this.label7.Size = new System.Drawing.Size(67, 16);
this.label7.TabIndex = 25;
this.label7.Text = "Priority";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -718,7 +770,8 @@
// priorityNumericUpDown
//
this.priorityNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.priorityNumericUpDown.Location = new System.Drawing.Point(62, 124);
this.priorityNumericUpDown.Location = new System.Drawing.Point(82, 155);
this.priorityNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.priorityNumericUpDown.Maximum = new decimal(new int[] {
32,
0,
@ -730,7 +783,7 @@
0,
-2147483648});
this.priorityNumericUpDown.Name = "priorityNumericUpDown";
this.priorityNumericUpDown.Size = new System.Drawing.Size(116, 20);
this.priorityNumericUpDown.Size = new System.Drawing.Size(153, 22);
this.priorityNumericUpDown.TabIndex = 26;
this.priorityNumericUpDown.ValueChanged += new System.EventHandler(this.priorityNumericUpDown_ValueChanged);
//
@ -738,9 +791,10 @@
//
this.ppLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.ppLabel.AutoSize = true;
this.ppLabel.Location = new System.Drawing.Point(231, 55);
this.ppLabel.Location = new System.Drawing.Point(305, 68);
this.ppLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.ppLabel.Name = "ppLabel";
this.ppLabel.Size = new System.Drawing.Size(61, 13);
this.ppLabel.Size = new System.Drawing.Size(81, 16);
this.ppLabel.TabIndex = 4;
this.ppLabel.Text = "PP";
this.ppLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -748,9 +802,10 @@
// ppUpDown
//
this.ppUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.ppUpDown.Location = new System.Drawing.Point(298, 52);
this.ppUpDown.Location = new System.Drawing.Point(394, 65);
this.ppUpDown.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ppUpDown.Name = "ppUpDown";
this.ppUpDown.Size = new System.Drawing.Size(246, 20);
this.ppUpDown.Size = new System.Drawing.Size(328, 22);
this.ppUpDown.TabIndex = 8;
this.ppUpDown.ValueChanged += new System.EventHandler(this.ppUpDown_ValueChanged);
//
@ -758,9 +813,10 @@
//
this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(231, 121);
this.label8.Location = new System.Drawing.Point(305, 150);
this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(61, 26);
this.label8.Size = new System.Drawing.Size(81, 32);
this.label8.TabIndex = 28;
this.label8.Text = "Side Effect Probability";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -768,28 +824,30 @@
// sideEffectProbabilityUpDown
//
this.sideEffectProbabilityUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.sideEffectProbabilityUpDown.Location = new System.Drawing.Point(298, 124);
this.sideEffectProbabilityUpDown.Location = new System.Drawing.Point(394, 155);
this.sideEffectProbabilityUpDown.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.sideEffectProbabilityUpDown.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.sideEffectProbabilityUpDown.Name = "sideEffectProbabilityUpDown";
this.sideEffectProbabilityUpDown.Size = new System.Drawing.Size(246, 20);
this.sideEffectProbabilityUpDown.Size = new System.Drawing.Size(328, 22);
this.sideEffectProbabilityUpDown.TabIndex = 29;
this.sideEffectProbabilityUpDown.ValueChanged += new System.EventHandler(this.sideEffectUpDown_ValueChanged);
//
// MoveDataEditor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(750, 567);
this.ClientSize = new System.Drawing.Size(1000, 698);
this.Controls.Add(this.tableLayoutPanel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MoveDataEditor";
this.Padding = new System.Windows.Forms.Padding(5);
this.Padding = new System.Windows.Forms.Padding(7, 6, 7, 6);
this.Text = "Move Data Editor";
this.tableLayoutPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.moveNumberNumericUpDown)).EndInit();

View File

@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using static DSPRE.MoveData;
using MessageBox = System.Windows.Forms.MessageBox;

View File

@ -398,10 +398,10 @@ namespace DSPRE {
}
private void saveDataButton_Click(object sender, EventArgs e) {
currentLoadedFile.SaveToFileDefaultDir(currentLoadedId, true);
if (modifiedAbilities) {
EditorPanels.MainProgram.RefreshAbilities(currentLoadedId);
modifiedAbilities = false;
}
//if (modifiedAbilities) {
// EditorPanels.MainProgram.RefreshAbilities(currentLoadedId);
// modifiedAbilities = false;
//}
setDirty(false);
}
//-------------------------------

View File

@ -61,9 +61,14 @@ namespace DSPRE {
learnsetEditor.ChangeLoadedFile(sender.SelectedIndex);
}
if (evoEditor.CheckDiscardChanges()) {
evoEditor.pokemonNameInputComboBox.SelectedIndex = sender.SelectedIndex;
evoEditor.monNumberNumericUpDown.Value = sender.SelectedIndex;
evoEditor.ChangeLoadedFile(sender.SelectedIndex);
// SelectedIndex may be out of bounds
if ((int) sender.SelectedIndex < evoEditor.pokemonNameInputComboBox.Items.Count)
{
evoEditor.pokemonNameInputComboBox.SelectedIndex = sender.SelectedIndex;
evoEditor.monNumberNumericUpDown.Value = sender.SelectedIndex;
evoEditor.ChangeLoadedFile(sender.SelectedIndex);
}
}
Helpers.RestoreDisableHandler();
}
@ -85,10 +90,15 @@ namespace DSPRE {
learnsetEditor.monNumberNumericUpDown.Value = sender.Value;
learnsetEditor.ChangeLoadedFile((int)sender.Value);
}
if (evoEditor.CheckDiscardChanges()) {
evoEditor.pokemonNameInputComboBox.SelectedIndex = (int)sender.Value;
evoEditor.monNumberNumericUpDown.Value = sender.Value;
evoEditor.ChangeLoadedFile((int)sender.Value);
// SelectedIndex may be out of bounds
if ((int)sender.Value < evoEditor.pokemonNameInputComboBox.Items.Count)
{
if (evoEditor.CheckDiscardChanges())
{
evoEditor.pokemonNameInputComboBox.SelectedIndex = (int)sender.Value;
evoEditor.monNumberNumericUpDown.Value = sender.Value;
evoEditor.ChangeLoadedFile((int)sender.Value);
}
}
Helpers.RestoreDisableHandler();
}

File diff suppressed because it is too large Load Diff

View File

@ -8275,7 +8275,10 @@ namespace DSPRE {
}
private void DVExplainButton_Click(object sender, EventArgs e) {
DVCalc DVcalcForm = new DVCalc(trainerComboBox.SelectedIndex, trainerClassListBox.SelectedIndex);
uint trainerIdx = (uint)trainerComboBox.SelectedIndex;
uint trainerClassIdx = (uint)trainerClassListBox.SelectedIndex;
DVCalc DVcalcForm = new DVCalc(trainerIdx, trainerClassIdx);
DVcalcForm.ShowDialog();
}
@ -10040,5 +10043,16 @@ namespace DSPRE {
{
MessageBox.Show("Not implemented yet");
}
private void generateCSVToolStripMenuItem_Click(object sender, EventArgs e)
{
Helpers.statusLabelMessage("Exporting to CSV...");
Update();
DocTool.ExportAll();
Helpers.statusLabelMessage();
Update();
}
}
}

View File

@ -117,6 +117,96 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="mainTabImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>239, 17</value>
</metadata>
<data name="mainTabImageList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACM
EgAAAk1TRnQBSQFMAgEBCgEAAQgBHQEIAR0BEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/xMABLwEAAS8KwAGvAIA
BOkBvAMABOkBvCoAASYBHgQAArwBAATpBAAE6QG8KgABJgEeAgABJgEeAQABvAEAAukBvAIABLwBAALp
AbwtAAG8ASYBHgMAAukBvAEABAsCvALpAbwsAAEmAR4CAAG8AgAC6QG8AgsBvAEAAgsBvALpAbwmAAO8
AgABJgEeAgABvAMAAukBvAILArwCCwEAAukBvCUAAc0BCgEAAbwBAAEmAR4BAAHsAwABvAEAAukBvAUL
AgAC6QG8JQABzQEKAQACvAEmAR4BAAESArwBAAG8AQAC6QG8AgsCvAMAAukBvCQAAc0BCgMAAbwBAAEm
AR4GAALpAbwBAAILA7wBAALpAbwkAAHNAQoBEgHsAQABEgG8CAAC6QG8AgADCwIAAukBvCQAAc0BCgES
AgABEgG8CAAC6QO8BAABvALpAbwjAAHNAQoBAAG8AwABvAgABOkBvAMABOkBvAEAAbwhAAHNAQoBAAG8
AwAB7AG8BwAE6QQABOkBGwExAZkhAAFlGwADMT0AARsBMQEbKQAB7AESAe8FAAH0EQAKEhgAAvMC6wHv
AewB6wHzBQAB6gH0BQAC8gH0BgADEgZKAxIUAAHzAfEBvALsAQcBvAEHAewB6wEHBAABDgESAe0EAAHw
ASIBKQHrAfMFAAESAkoGbgJKARIDAAEPBwABDwUAAQ8BAAG8AfcB7QGSAe8BvAEHAfAB9AHyAesB6gQA
AQ4BbQHtAwABBwEjAisBKgHrAfMDAAESAUoBbgFKBm4BSgFuAUoBEgEAAQ8J7wEPAwAB7wIAAW0C9wHw
AbwB8wLyAvQB7QHrAQcDAAEHARUB6gPtASkBKwElAR8BJQEqAesB9AIAARIBSgFuAUoGkwFKAW4BSgES
AgAB7wEBAR8G7wMAAu8CAAG8Ae8B8QH0AfYB8gLwAfQB9gHvAewBbQMAAfQBEAHrAUoBMAEDASUBFwH5
AiABJQEqAeoCAAESAUoBkwFuBkkBbgGTAUoBEgIAAe8CAQEfBe8BAAIPAu8CAAHyAe8C9gH3AW0B6wHy
AfQB9gHzAesB7AEHAgAB9AEQAXMBRQEkASAB+QEXAfkBIAEfASABMQEiAfQBAAESAZMBbgFJBmwBSQFu
AZMBEgIAAe8BAQEfBu8DAALvAwAB7wHzAbwBkgHwAfcB9gH3Ae0BBwHrAewB7wMAAfIBEQFFAR8CIAH5
ARcB+QEgAR8BMQEiAfQBAAESAZMBSQJsBHECbAFJAZMBEgEAAQ8J7wEPAwAB7wMAAQcB8AFEASUBGgKS
AfIC8wH0ARIB6wHyAgAB8gFDAewBRQEfASAB+QEXASYBMQE3ATABFAIAAUkBbgFsAXEBlwRxAZcBcQFs
AW4BEgIAAQ8HAAEPBQABDwIAAfQBbQEsASUB6wH0AvEC7wHyAusBvAIAAfMBbQHrAUUBHwIgAfkBMQFR
Am0B8wIAAUkCbAGXAnEClwJxAZcCbAFJAgABFQEPARUDAAEVAQ8BFQgAARwBLAErAeoBBwG8Au8B9AK8
AfMCbQMAAfABEwFFAR8BJAIrAVEBvAUAAUkBbAJxBpcCcQFsAUkBAAEVAfcBBwH3ARUBAAEVAfcBBwH3
ARUGAAHvAisBSwHvAQcBvAHxBAcB9AGLAeoDAAHwAREBSwEkASMBAwFKAfAHAAFsAXEDlwJ4A5cBcQFs
AgABDwEHAQABBwEPAQABDwEHAQABBwEPBQAB7wErASwBRQK8AQcB7wEHAbwB8AEZAtsBbAEHAwAB8AEj
AisBDgHwAfEIAAFJAXEClwF4BZcBcQFJAgABFQH3AQcB9wEVAQABFQH3AQcB9wEVBQABEgEsAUUB8gHz
Ae8B8gHxAbsC2gGzAosB8wQAAfABIwE3ATEBDgsAAUkBcQKXAXgDlwFxAUkEAAEVAQ8BFQMAARUBDwEV
BwABEgG8AgABBwGzAdQBswJsAe8IAAHvAg4B8wwAAWwBcQSXAXEBbBkAAQcCEgG8HQAEcRcAAfQL8wH0
EwAN8xMAAQcL7wEHAgAPEAEAAQcNswEHBwAEQwcAAe8BAAG7BrMBuwIAAe8CAAEQBjgBEAbTARABAAGz
DQABswUAAkME8AJDBQAB7wEAAbMGAAGzAgAB7wIAARACOAMAATgBEALTAgAC0wEQAQABsw0AAbMEAAFD
CPABQwQAAe8BAAGtAQABlwJWAZcBAAGzAgAB7wIAARADOAEAAjgBEAHTAQAC0wEAAdMBEAEAAbMBAAFW
CVABVgEAAbMDAAFDA/ABkgJDAZID8AFDAwAB7wEAAa0BAARWAQABswH0AQAB7wIAARACOAIAAjgBEAHT
AQAC0wEAAdMBEAEAAbMBAAtWAQABswMAAUMB8AGSARIBQwHwAZIBQwESAZIB8AFDAwAB7wEAAa0BAARW
AQABswH0AQAB7wIAARADOAEAAjgBEALTAgAC0wEQAQABswEAC1YBAAGzAgABQwHwARICYwFDAQAB8AFD
AmMBEgHwAUMCAAHvAQABrQEABHgBAAGzAfQBAAHvAgABEAY4ARAG0wEQAQABswEAC1YBAAGzAgABQwES
BEcCQwRHARIBQwIAAe8BAAGtBgABswHzAQAB7wIADxABAAGzAQALVgEAAbMCAAFDDEcBQwIAAe8BAAG7
Aq0EswG7AfMBAAHvAgABEAZHARAGAAEQAQABswEAC1YBAAGzAgABQwxHAUMCAAHvAQAB8wP0AfMB9AQA
Ae8CAAEQAkcCAAJHARAGAAEQAQABswEAC1YBAAGzAwABQwJHApQGRwFDAwAB7wEAAXQCMgEsAXQBAAG8
AvcBAAHvAgABEAFHAQACRwEAAUcBEAYAARABAAGzAQABVgl4AVYBAAGzAwABQwFHBJQFRwFDAwAB7wEA
ASwDwwFTAQAB9wIAAfMB8AIAARABRwEAAkcBAAFHARAGAAEQAQABswEAC3gBAAGzBAABQwSUBEcBQwQA
Ae8BAAF0AywBdAEAAfcBAAHzAfADAAEQAkcCAAJHARAGAAEQAQABswEAC3gBAAGzBQACQwGUA0cCQwUA
Ae8IAAHzAfAEAAEQBkcBEAYAARABAAGzDQABswcABEMHAAEHCO8BBwUADxABAAEJDbMBCREAAUIBTQE+
BwABPgMAASgDAAFAAwABMAMAAQEBAAEBBQABgAEBFgAD/wEAAv8CwwQAAf8BgQKDBAAB/wEAAYcBgwQA
Af8BMAGMASMEAAH/AeEBiAEDBAAB/wHBAYEBAwQAAfEBgwGAASMEAAHhAQ4BgAFjBAAB4AEAAYAB4wQA
AcABgQGIASMEAAHAAX8BjAFjBAABxAF/AYMBwwQAAYQBfwGDAYIEAAGEAT8BhwGABAABjAF/Af8B+AQA
A/8B+AQAAf8BjwG/Af8B4AEHAv8B+AEHAo8BwAEDAv8BwAEHAY8BBwHAAQMBgAE8AYABBwGOAQMBgAEB
AQABGAGAAQMBgAEBAYABAQIAAYABAwGAAQEBgAEBAgABgAEBAYABAAGAAQECAAHAAQEBwAEAAYABAQEA
ARgBwAEAAcABAQGAAQEBgAE8AcABAAHAAQEBgAEBAY4BPwHAAQAB4AEPAYABAQEEAR8BgAEAAeABHwHA
AQMBJAGfAgAB4AE/AcABAwEEAR8BAAEBAeAB/wHgAQcBjgE/AZgBDwHwAf8B8AEPAv8B+AF/Av8B/AE/
Av8BgAEDAv8BgAEDAv8BgAEDAQABAQEAAQEB/AE/AaABGwEAAQEBfwH9AfABDwGvAdsBAAExAX8B/QHg
AQcBqAFbAQABSQFAAQUBwAEDAagBSwEAAUkBQAEFAcABAwGoAUsBAAExAUABBQGBAQEBqAFLAQABAQFA
AQUBgAEBAa8BywEAAQEBQAEFAYABAQGgAQsBAAH9AUABBQGAAQEBoAF7ARgBxQFAAQUBwAEDAaABiwEk
Ae0BQAEFAcABAwGgAbMBJAHNAUABBQHgAQcBoAGnARgB7QFAAQUB8AEPAb8BzwEAAf0BfwH9AfwBPwGA
AR8BAAEBAQABAQL/Cw==
</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="removeMatrixButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>