Added pokemon global link promotional pokemon

This commit is contained in:
suloku
2016-06-15 20:51:19 +02:00
parent 18fe8d9e5d
commit a4fb0d9a8e
4 changed files with 925 additions and 632 deletions

View File

@@ -87,6 +87,7 @@ namespace BW_tool
private System.Windows.Forms.Button spark_but;
private System.Windows.Forms.Button wind_but;
private System.Windows.Forms.Button pleasant_but;
private System.Windows.Forms.Button pgl_but;
/// <summary>
/// Disposes resources used by the form.
@@ -180,6 +181,7 @@ namespace BW_tool
this.spark_but = new System.Windows.Forms.Button();
this.wind_but = new System.Windows.Forms.Button();
this.pleasant_but = new System.Windows.Forms.Button();
this.pgl_but = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.slot)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
@@ -2031,14 +2033,14 @@ namespace BW_tool
//
this.animbox1.FormattingEnabled = true;
this.animbox1.Items.AddRange(new object[] {
"Randomly turning around",
"Randomly walking",
"Randomly walking",
"Walking up/down",
"Walking left/right",
"Walking left/right and randomly looking up/down",
"Turning around clockwise",
"Turning around counterclockwise",
"00- Randomly turning around",
"02- Randomly walking",
"04- Randomly walking",
"06- Walking up/down",
"08- Walking left/right",
"10- Walking left/right and randomly looking up/down",
"12- Turning around clockwise",
"14- Turning around counterclockwise",
"--- Randomize ---"});
this.animbox1.Location = new System.Drawing.Point(762, 60);
this.animbox1.Name = "animbox1";
@@ -2136,7 +2138,7 @@ namespace BW_tool
this.groupBox2.Controls.Add(this.pleasant_but);
this.groupBox2.Location = new System.Drawing.Point(864, 187);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(141, 256);
this.groupBox2.Size = new System.Drawing.Size(141, 250);
this.groupBox2.TabIndex = 207;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Dream World";
@@ -2221,11 +2223,22 @@ namespace BW_tool
this.pleasant_but.UseVisualStyleBackColor = true;
this.pleasant_but.Click += new System.EventHandler(this.Pleasant_butClick);
//
// pgl_but
//
this.pgl_but.Location = new System.Drawing.Point(870, 438);
this.pgl_but.Name = "pgl_but";
this.pgl_but.Size = new System.Drawing.Size(129, 23);
this.pgl_but.TabIndex = 208;
this.pgl_but.Text = "PGL Promotions";
this.pgl_but.UseVisualStyleBackColor = true;
this.pgl_but.Click += new System.EventHandler(this.Pgl_butClick);
//
// Entralink
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1014, 552);
this.Controls.Add(this.pgl_but);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.formbox1);
this.Controls.Add(this.sprite_warning);

View File

@@ -250,9 +250,52 @@ namespace BW_tool
{
dataGridView1.Rows[i].Cells[0].Value = TEXT.pkmlist[forest.Species];
dataGridView1.Rows[i].Cells[1].Value = TEXT.movelist[forest.Move];
dataGridView1.Rows[i].Cells[2].Value = forest.Gender;
switch(forest.Gender)
{
case 0:
dataGridView1.Rows[i].Cells[2].Value = "Male";
break;
case 1:
dataGridView1.Rows[i].Cells[2].Value = "Female";
break;
case 2:
dataGridView1.Rows[i].Cells[2].Value = "Genderless";
break;
}
dataGridView1.Rows[i].Cells[3].Value = forest.Form;
dataGridView1.Rows[i].Cells[4].Value = forest.Animation;
//dataGridView1.Rows[i].Cells[4].Value = forest.Animation;
switch(forest.Animation)
{
case 0:
dataGridView1.Rows[i].Cells[4].Value = "0"+forest.Animation.ToString()+"- "+"Randomly turning around";
break;
case 2:
dataGridView1.Rows[i].Cells[4].Value = "0"+forest.Animation.ToString()+"- "+"Randomly walking";
break;
case 4:
dataGridView1.Rows[i].Cells[4].Value = "0"+forest.Animation.ToString()+"- "+"Randomly walking";
break;
case 6:
dataGridView1.Rows[i].Cells[4].Value = "0"+forest.Animation.ToString()+"- "+"Walking up/down";
break;
case 8:
dataGridView1.Rows[i].Cells[4].Value = "0"+forest.Animation.ToString()+"- "+"Walking left/right";
break;
case 10:
dataGridView1.Rows[i].Cells[4].Value = forest.Animation.ToString()+"- "+"Walking left/right and randomly looking up/down";
break;
case 12:
dataGridView1.Rows[i].Cells[4].Value = forest.Animation.ToString()+"- "+"Turning around clockwise";
break;
case 14:
dataGridView1.Rows[i].Cells[4].Value = forest.Animation.ToString()+"- "+"Turning around counterclockwise";
break;
default:
dataGridView1.Rows[i].Cells[4].Value = forest.Animation.ToString()+"- "+"Invalid (odd)";
break;
}
}
}
@@ -265,10 +308,13 @@ namespace BW_tool
}
int animation()
{
//MessageBox.Show(animbox1.SelectedIndex.ToString());
if (animbox1.SelectedIndex > 7)
return Entralink_DreamWorld.random_form_anim();
else
else{
//MessageBox.Show((animbox1.SelectedIndex*2).ToString());
return (int)(animbox1.SelectedIndex*2);
}
}
void Add_pkmClick(object sender, EventArgs e)
{
@@ -421,6 +467,7 @@ namespace BW_tool
{
//Only genderless
special_gender = true;
genderbox1.Items.Clear();
genderbox1.Items.AddRange(new object[] {
"Male",
"Female",
@@ -434,6 +481,7 @@ namespace BW_tool
{
//Re-enable list
genderbox1.Enabled = true;
genderbox1.Items.Clear();
genderbox1.Items.AddRange(new object[] {
"Male",
"Female"});
@@ -649,6 +697,12 @@ namespace BW_tool
dreamworld.ShowDialog();
add_dw_pkm();
}
void Pgl_butClick(object sender, EventArgs e)
{
Form dreamworld = new Entralink_DreamWorld(8, "PGL Promotions");
dreamworld.ShowDialog();
add_dw_pkm();
}
public class FOREST
@@ -806,7 +860,7 @@ Bits
get { return (int)((BitConverter.ToInt32(Data, get_pkmoffset()) & 0xF800000) >> 23); }
set { form = value; } }
public int Animation {
get { return (int)((BitConverter.ToInt32(Data, get_pkmoffset()) & 0xF0000000) >> 27); }
get { return (int)((BitConverter.ToInt32(Data, get_pkmoffset()) & 0xF0000000) >> 28); }
set { animation = value; } }
//Just return if there's a valid pkm in current slot
@@ -824,7 +878,7 @@ Bits
//Build a u32 pkm for entralink forest
public UInt32 create_pkm(int sp, int mv, int gdr, int frm, int anim)
{
return (UInt32) ( (sp&0x7FF) | ((mv&0x3FF) << 11) | ((gdr&0x3) << 21) | ((frm&0x1F) << 23) | ((anim&0xF) << 27) );
return unchecked((UInt32) ( (sp&0x7FF) | ((mv&0x3FF) << 11) | ((gdr&0x3) << 21) | ((frm&0x1F) << 23) | ((anim&0xF) << 28) ));
}
//Sets pkm data to current slot
public void edit_pkm(UInt32 pkm)

File diff suppressed because it is too large Load Diff

View File

@@ -27,6 +27,34 @@ namespace BW_tool
exclusive_label.Text = "";
world = DW;
setup_world();
if (DW < 8)
{
moveboxA.Visible = true;
moveboxC.Visible = true;
atkA.Visible = true;
atkB.Visible = true;
atkC.Visible = true;
Move.Text = "Move";
pgl_region_box.Visible = false;
region_lab.Visible = false;
move_lab.Visible = false;
}
else if (DW == 8)
{
moveboxA.Visible = false;
moveboxC.Visible = false;
atkA.Visible = false;
atkB.Visible = false;
atkC.Visible = false;
Move.Text = "Info";
pgl_region_box.Visible = true;
region_lab.Visible = true;
move_lab.Visible = true;
}
//
// TODO: Add constructor code after the InitializeComponent() call.
@@ -320,17 +348,72 @@ namespace BW_tool
"Burmy"});
speciesbox.SelectedIndex = 0;
break;
case 8://PGL Promotions
speciesbox.Items.Clear();
speciesbox.Items.AddRange(new object[] {
"Vaporeon",
"Jolteon",
"Flareon",
"Espeon",
"Umbreon",
"Leafeon",
"Glaceon",
"Bulbasaur",
"Charmander",
"Squirtle",
"Croagunk",
"Turtwig",
"Chimchar",
"Piplup",
"Arceus",
"Treecko",
"Torchic",
"Mudkip",
"Togekiss",
"Mamoswine",
"Porygon",
"Rayquaza",
"Banette",
"Croagunk",
"Altaria",
"Blissey",
"Lucario",
"Gothorita",
"Pikachu",
"Jumpluff",
"Pansage",
"Pansear",
"Panpour",
"Turtwig",
"Chimchar",
"Piplup",
"Gothorita",
"Scizor",
"Garchomp",
"Dragonite",
"Tyranitar",
"Dragonite",
"Metagross"});
speciesbox.SelectedIndex = 0;
break;
}
atkA.Checked = true;
update_atk();
}
void Ok_butClick(object sender, EventArgs e)
{
//Handle forms
if (world == 2 && (speciesbox.SelectedIndex == 25 || speciesbox.SelectedIndex == 36 )) //Blue basculin, East Sea shellos
Entralink.dream_pkm = Entralink.forest.create_pkm(world_species[world][speciesbox.SelectedIndex], world_attacks[world][speciesbox.SelectedIndex][atk], gender, 1, random_form_anim());
else
Entralink.dream_pkm = Entralink.forest.create_pkm(world_species[world][speciesbox.SelectedIndex], world_attacks[world][speciesbox.SelectedIndex][atk], gender, 0, random_form_anim());
if (world < 8)
{
//Handle forms
if (world == 2 && (speciesbox.SelectedIndex == 25 || speciesbox.SelectedIndex == 36 )) //Blue basculin, East Sea shellos
Entralink.dream_pkm = Entralink.forest.create_pkm(world_species[world][speciesbox.SelectedIndex], world_attacks[world][speciesbox.SelectedIndex][atk], gender, 1, random_form_anim());
else
Entralink.dream_pkm = Entralink.forest.create_pkm(world_species[world][speciesbox.SelectedIndex], world_attacks[world][speciesbox.SelectedIndex][atk], gender, 0, random_form_anim());
}
else if (world == 8)
{
Entralink.dream_pkm = Entralink.forest.create_pkm(world_species[world][speciesbox.SelectedIndex], PGL_attacks[speciesbox.SelectedIndex], gender, 0, random_form_anim());
}
this.Close();
}
void Cancel_butClick(object sender, EventArgs e)
@@ -343,44 +426,71 @@ namespace BW_tool
update_atk();
update_gnd();
int i=0;
bool exclusive = false;
if (MainForm.save.B2W2 == true)
if(world < 8)
{
for(i=0;i<world_BW1_exclusives[world].Length;i++)
int i=0;
if (MainForm.save.B2W2 == true)
{
if(world_BW1_exclusives[world][i] == world_species[world][speciesbox.SelectedIndex])
for(i=0;i<world_BW1_exclusives[world].Length;i++)
{
if(world_BW1_exclusives[world][i] == world_species[world][speciesbox.SelectedIndex])
{
exclusive = true;
}
}
if (exclusive == true)
{
exclusive_label.Text = "BW Only";
ok_but.Enabled = false;
}
}else
{
for(i=0;i<world_BW2_exclusives[world].Length;i++)
{
if(world_BW2_exclusives[world][i] == world_species[world][speciesbox.SelectedIndex])
{
exclusive = true;
}
}
if (exclusive == true)
{
exclusive_label.Text = "B2W2 Only";
ok_but.Enabled = false;
}
}
}else if (world == 8)
{
if (MainForm.save.B2W2 == true)
{
if (PGL_exclusives[speciesbox.SelectedIndex] == 0)
{
exclusive_label.Text = "BW Only";
ok_but.Enabled = false;
exclusive = true;
}
}
if (exclusive == true)
else
{
exclusive_label.Text = "BW Only";
ok_but.Enabled = false;
}
}else
{
for(i=0;i<world_BW2_exclusives[world].Length;i++)
{
if(world_BW2_exclusives[world][i] == world_species[world][speciesbox.SelectedIndex])
if (PGL_exclusives[speciesbox.SelectedIndex] == 1)
{
exclusive_label.Text = "B2W2 Only";
ok_but.Enabled = false;
exclusive = true;
}
}
if (exclusive == true)
{
exclusive_label.Text = "B2W2 Only";
ok_but.Enabled = false;
}
}
if (exclusive == false)
{
exclusive_label.Text = "";
ok_but.Enabled = true;
}
if (exclusive == false)
{
exclusive_label.Text = "";
ok_but.Enabled = true;
}
pgl_region_box.SelectedIndex = speciesbox.SelectedIndex;
}
@@ -393,7 +503,8 @@ namespace BW_tool
new int[]{56, 66, 81, 109, 111, 218, 231, 246, 324, 328, 331, 412, 449, 451, 631, 632, 556, 558, 240, 216, 296, 322, 327, 359, 374, 453, 236, 371, 553, 447},
new int[]{27, 74, 95, 100, 104, 173, 213, 293, 299, 304, 337, 338, 343, 363, 408, 459, 529, 621, 50, 206, 525, 583, 600, 215, 361, 410, 220, 443, 610},
new int[]{46, 204, 265, 273, 287, 290, 311, 312, 316, 352, 401, 420, 455, 531, 538, 539, 559, 48, 88, 415, 15, 23, 175, 190, 285, 533, 315, 335, 336, 113, 127, 133, 143, 214},
new int[]{061, 133, 235, 412} //Pokemon Cafe forest
new int[]{061, 133, 235, 412}, //Pokemon Cafe forest
new int[]{134, 135, 136, 196, 197, 470, 471, 1, 4, 7, 453, 387, 390, 393, 493, 252, 255, 258, 468, 473, 137, 384, 354, 453, 334, 242, 448, 575, 25, 189, 511, 513, 515, 387, 390, 393, 575, 212, 445, 149, 248, 149, 376, 376}
};
int[][][] world_attacks = new int[][][]
@@ -408,6 +519,8 @@ namespace BW_tool
new int[][]{ new int[]{240, 114, 352}, new int[]{ 270, 204, 129}, new int[]{ 166, 445, 214}, new int[]{ 182, 450, 173} } //Pokemon Cafe forest
};
int[] PGL_attacks = new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 0, 0, 0, 538, 398, 206, 0, 418, 243, 29, 206, 437, 257, 56, 254, 252, 297, 286, 211, 0, 9, 69, 245, 38};
/* Method deprecated, it seems there's no gender restriction outside pokemon being male/female only or genderless
int[][] world_gender = new int[][]
{
@@ -446,6 +559,8 @@ namespace BW_tool
new int[]{0} //Pokemon Cafe forest
};
int[] PGL_exclusives = new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2};
public static int random_form_anim()
{
Random rnd = new Random(Guid.NewGuid().GetHashCode());
@@ -462,16 +577,24 @@ namespace BW_tool
private int atk = 0;
private void update_atk()
{
if (atkA.Checked == true)
atk = 0;
else if (atkB.Checked == true)
atk = 1;
else if (atkC.Checked == true)
atk = 2;
moveboxA.SelectedIndex = world_attacks[world][speciesbox.SelectedIndex][0];
movebox.SelectedIndex = world_attacks[world][speciesbox.SelectedIndex][1];
moveboxC.SelectedIndex = world_attacks[world][speciesbox.SelectedIndex][2];
if (world < 8)
{
if (atkA.Checked == true)
atk = 0;
else if (atkB.Checked == true)
atk = 1;
else if (atkC.Checked == true)
atk = 2;
moveboxA.SelectedIndex = world_attacks[world][speciesbox.SelectedIndex][0];
movebox.SelectedIndex = world_attacks[world][speciesbox.SelectedIndex][1];
moveboxC.SelectedIndex = world_attacks[world][speciesbox.SelectedIndex][2];
}else if (world == 8)
{
movebox.SelectedIndex = PGL_attacks[speciesbox.SelectedIndex];
}
}
void AtkACheckedChanged(object sender, EventArgs e)
{
@@ -489,7 +612,7 @@ namespace BW_tool
private int gender = 0;
private void update_gnd()
{
//Handle genders
//Handle genders
bool special_gender = false;
int i=0;
for(i=0;i<Entralink.BW_femaleonly.Length;i++)
@@ -533,13 +656,38 @@ namespace BW_tool
if (special_gender == false)
{
//Male/female
if (gender == 2)
gnd_male.Checked = true;
//Male/female
if (gender == 2 || (world == 8) )
{
if (world == 8 && speciesbox.SelectedIndex == 20) //Banette is the only female pokemon distributed via PGL
{
gnd_female.Checked = true;
gnd_male.Enabled = false;
gnd_female.Enabled = true;
}else{
if (world == 8)
gnd_female.Enabled = false;
gnd_male.Checked = true;
gnd_male.Enabled = true;
}
}
if (gnd_male.Checked == false && gnd_female.Checked == false && gnd_none.Checked == false)
gnd_male.Checked = true;
gnd_male.Enabled = true;
gnd_female.Enabled = true;
{
if (world == 8 && speciesbox.SelectedIndex == 20) //Banette is the only female pokemon distributed via PGL
{
gnd_female.Checked = true;
gnd_male.Enabled = false;
}else{
if (world == 8)
gnd_female.Enabled = false;
gnd_male.Checked = true;
gnd_male.Enabled = true;
}
}
if (world != 8)
gnd_male.Enabled = true;
if (world != 8)
gnd_female.Enabled = true;
gnd_none.Enabled = false;
}