diff --git a/TeraFinder.Core/Classes/ExtraMoves.cs b/TeraFinder.Core/Classes/ExtraMoves.cs index 6f2dc395..37a516ec 100644 --- a/TeraFinder.Core/Classes/ExtraMoves.cs +++ b/TeraFinder.Core/Classes/ExtraMoves.cs @@ -4,20 +4,31 @@ namespace TeraFinder.Core; public class ExtraMoves { - public Move ExtraMove1; - public Move ExtraMove2; - public Move ExtraMove3; - public Move ExtraMove4; - public Move ExtraMove5; - public Move ExtraMove6; + public HashSet ExtraMoveList { get; private init; } + + public Move ExtraMove1 { get => ExtraMoveList.Count > 0 ? ExtraMoveList.ElementAt(0) : Move.None; } + public Move ExtraMove2 { get => ExtraMoveList.Count > 1 ? ExtraMoveList.ElementAt(1) : Move.None; } + public Move ExtraMove3 { get => ExtraMoveList.Count > 2 ? ExtraMoveList.ElementAt(2) : Move.None; } + public Move ExtraMove4 { get => ExtraMoveList.Count > 3 ? ExtraMoveList.ElementAt(3) : Move.None; } + public Move ExtraMove5 { get => ExtraMoveList.Count > 4 ? ExtraMoveList.ElementAt(4) : Move.None; } + public Move ExtraMove6 { get => ExtraMoveList.Count > 5 ? ExtraMoveList.ElementAt(5) : Move.None; } public ExtraMoves(ushort extra1 = 0, ushort extra2 = 0, ushort extra3 = 0, ushort extra4 = 0, ushort extra5 = 0, ushort extra6 = 0) { - ExtraMove1 = (Move)extra1; - ExtraMove2 = (Move)extra2; - ExtraMove3 = (Move)extra3; - ExtraMove4 = (Move)extra4; - ExtraMove5 = (Move)extra5; - ExtraMove6 = (Move)extra6; + ExtraMoveList = new HashSet(); + if (extra1 != 0) + ExtraMoveList.Add((Move)extra1); + if (extra2 != 0) + ExtraMoveList.Add((Move)extra2); + if (extra3 != 0) + ExtraMoveList.Add((Move)extra3); + if (extra4 != 0) + ExtraMoveList.Add((Move)extra4); + if (extra5 != 0) + ExtraMoveList.Add((Move)extra5); + if (extra6 != 0) + ExtraMoveList.Add((Move)extra6); } + + public Move GetExtraMove(int index) => ExtraMoveList.ElementAt(index); } \ No newline at end of file diff --git a/TeraFinder.Core/Resources/translations/lang_de.txt b/TeraFinder.Core/Resources/translations/lang_de.txt index e93d818d..934a5158 100644 --- a/TeraFinder.Core/Resources/translations/lang_de.txt +++ b/TeraFinder.Core/Resources/translations/lang_de.txt @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=Reward Calculator EditorForm.LblLvl=Lvl. EditorForm.CmbRaid=Raid EditorForm.lblMap=Location Map: +EditorForm.toolTipMoves=Extra Raid Moves: ShinifyForm.lblValue=Progress: diff --git a/TeraFinder.Core/Resources/translations/lang_en.txt b/TeraFinder.Core/Resources/translations/lang_en.txt index 2a48ae31..fcc2efac 100644 --- a/TeraFinder.Core/Resources/translations/lang_en.txt +++ b/TeraFinder.Core/Resources/translations/lang_en.txt @@ -197,6 +197,7 @@ EditorForm.btnOpenRewardCalculator=Reward Calculator EditorForm.LblLvl=Lvl. EditorForm.CmbRaid=Raid EditorForm.lblMap=Location Map: +EditorForm.toolTipMoves=Extra Raid Moves: ShinifyForm.lblValue=Progress: diff --git a/TeraFinder.Core/Resources/translations/lang_es.txt b/TeraFinder.Core/Resources/translations/lang_es.txt index 3f164e03..4db5c46f 100644 --- a/TeraFinder.Core/Resources/translations/lang_es.txt +++ b/TeraFinder.Core/Resources/translations/lang_es.txt @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=Calculadora Recompensas EditorForm.LblLvl=Nvl. EditorForm.CmbRaid=Teraincursión EditorForm.lblMap=Location Map: +EditorForm.toolTipMoves=Extra Raid Moves: ShinifyForm.lblValue=Progreso: diff --git a/TeraFinder.Core/Resources/translations/lang_fr.txt b/TeraFinder.Core/Resources/translations/lang_fr.txt index 156a3399..d315188e 100644 --- a/TeraFinder.Core/Resources/translations/lang_fr.txt +++ b/TeraFinder.Core/Resources/translations/lang_fr.txt @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=Reward Calculator EditorForm.LblLvl=Lvl. EditorForm.CmbRaid=Raid EditorForm.lblMap=Location Map: +EditorForm.toolTipMoves=Extra Raid Moves: ShinifyForm.lblValue=Progress: diff --git a/TeraFinder.Core/Resources/translations/lang_it.txt b/TeraFinder.Core/Resources/translations/lang_it.txt index b8d22c2a..65119624 100644 --- a/TeraFinder.Core/Resources/translations/lang_it.txt +++ b/TeraFinder.Core/Resources/translations/lang_it.txt @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=Calcolatore Ricompense EditorForm.LblLvl=Lvl. EditorForm.CmbRaid=Raid EditorForm.lblMap=Mappa: +EditorForm.toolTipMoves=Mosse Extra da Raid: ShinifyForm.lblValue=Progress: diff --git a/TeraFinder.Core/Resources/translations/lang_ja.txt b/TeraFinder.Core/Resources/translations/lang_ja.txt index ba0ad8b6..28b4f51c 100644 --- a/TeraFinder.Core/Resources/translations/lang_ja.txt +++ b/TeraFinder.Core/Resources/translations/lang_ja.txt @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=Reward Calculator EditorForm.LblLvl=Lvl. EditorForm.CmbRaid=Raid EditorForm.lblMap=Location Map: +EditorForm.toolTipMoves=Extra Raid Moves: ShinifyForm.lblValue=Progress: diff --git a/TeraFinder.Core/Resources/translations/lang_ko.txt b/TeraFinder.Core/Resources/translations/lang_ko.txt index f8614edf..2085e961 100644 --- a/TeraFinder.Core/Resources/translations/lang_ko.txt +++ b/TeraFinder.Core/Resources/translations/lang_ko.txt @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=보상 계산기 EditorForm.LblLvl=Lvl. EditorForm.CmbRaid=레이드 EditorForm.lblMap=Location Map: +EditorForm.toolTipMoves=Extra Raid Moves: ShinifyForm.lblValue=Progress: diff --git a/TeraFinder.Core/Resources/translations/lang_zh.txt b/TeraFinder.Core/Resources/translations/lang_zh.txt index 6dd4f5ad..b78ec7f2 100644 --- a/TeraFinder.Core/Resources/translations/lang_zh.txt +++ b/TeraFinder.Core/Resources/translations/lang_zh.txt @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=奖励计算器 EditorForm.LblLvl=等级: EditorForm.CmbRaid=太晶洞窟 EditorForm.lblMap=定位图: +EditorForm.toolTipMoves=Extra Raid Moves: ShinifyForm.lblValue=进程: diff --git a/TeraFinder.Core/Resources/translations/lang_zh2.txt b/TeraFinder.Core/Resources/translations/lang_zh2.txt index 1b6f624c..40655794 100644 --- a/TeraFinder.Core/Resources/translations/lang_zh2.txt +++ b/TeraFinder.Core/Resources/translations/lang_zh2.txt @@ -194,6 +194,7 @@ EditorForm.btnOpenRewardCalculator=獎勵計算器 EditorForm.LblLvl=等級: EditorForm.CmbRaid=太晶洞窟 EditorForm.lblMap=定位图: +EditorForm.toolTipMoves=Extra Raid Moves: ShinifyForm.lblValue=Progress: diff --git a/TeraFinder.Plugins/Forms/EditorForm.Designer.cs b/TeraFinder.Plugins/Forms/EditorForm.Designer.cs index 1233db98..c6525bdd 100644 --- a/TeraFinder.Plugins/Forms/EditorForm.Designer.cs +++ b/TeraFinder.Plugins/Forms/EditorForm.Designer.cs @@ -28,6 +28,7 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { + components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditorForm)); cmbDens = new ComboBox(); GrpRaidInfo = new GroupBox(); @@ -74,22 +75,23 @@ private void InitializeComponent() btnOpenRewardCalculator = new Button(); imgMap = new PictureBox(); grpMap = new GroupBox(); - menuStrip1 = new MenuStrip(); + menuStrip = new MenuStrip(); toolsToolStripMenuItem = new ToolStripMenuItem(); + btnShinifyCurrent = new ToolStripMenuItem(); btnShinifyAll = new ToolStripMenuItem(); btnShinifyAllEncounters = new ToolStripMenuItem(); - cmbMap = new ComboBox(); - lblMap = new Label(); - btnShinifyCurrent = new ToolStripMenuItem(); btnRandomizeCurrent = new ToolStripMenuItem(); btnRandomizeAll = new ToolStripMenuItem(); + cmbMap = new ComboBox(); + lblMap = new Label(); + toolTipMoves = new ToolTip(components); GrpRaidInfo.SuspendLayout(); grpPkmInfo.SuspendLayout(); grpMoves.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox).BeginInit(); ((System.ComponentModel.ISupportInitialize)imgMap).BeginInit(); grpMap.SuspendLayout(); - menuStrip1.SuspendLayout(); + menuStrip.SuspendLayout(); SuspendLayout(); // // cmbDens @@ -580,17 +582,17 @@ private void InitializeComponent() grpMap.TabIndex = 23; grpMap.TabStop = false; // - // menuStrip1 + // menuStrip // - menuStrip1.BackColor = SystemColors.ButtonFace; - menuStrip1.ImageScalingSize = new Size(20, 20); - menuStrip1.Items.AddRange(new ToolStripItem[] { toolsToolStripMenuItem }); - menuStrip1.Location = new Point(0, 0); - menuStrip1.Name = "menuStrip1"; - menuStrip1.Padding = new Padding(7, 2, 0, 2); - menuStrip1.Size = new Size(1001, 28); - menuStrip1.TabIndex = 24; - menuStrip1.Text = "menuStrip1"; + menuStrip.BackColor = SystemColors.ButtonFace; + menuStrip.ImageScalingSize = new Size(20, 20); + menuStrip.Items.AddRange(new ToolStripItem[] { toolsToolStripMenuItem }); + menuStrip.Location = new Point(0, 0); + menuStrip.Name = "menuStrip"; + menuStrip.Padding = new Padding(7, 2, 0, 2); + menuStrip.Size = new Size(1001, 28); + menuStrip.TabIndex = 24; + menuStrip.Text = "menuStrip1"; // // toolsToolStripMenuItem // @@ -599,6 +601,13 @@ private void InitializeComponent() toolsToolStripMenuItem.Size = new Size(58, 24); toolsToolStripMenuItem.Text = "Tools"; // + // btnShinifyCurrent + // + btnShinifyCurrent.Name = "btnShinifyCurrent"; + btnShinifyCurrent.Size = new Size(344, 26); + btnShinifyCurrent.Text = "Shinify Current Raid"; + btnShinifyCurrent.Click += btnShinifyCurrent_Click; + // // btnShinifyAll // btnShinifyAll.Name = "btnShinifyAll"; @@ -613,6 +622,20 @@ private void InitializeComponent() btnShinifyAllEncounters.Text = "Shinify All Raids (Keep Encounters)"; btnShinifyAllEncounters.Click += BtnShinyAllEncounters_Click; // + // btnRandomizeCurrent + // + btnRandomizeCurrent.Name = "btnRandomizeCurrent"; + btnRandomizeCurrent.Size = new Size(344, 26); + btnRandomizeCurrent.Text = "Randomize Current Raid"; + btnRandomizeCurrent.Click += btnRandomizeCurrent_Click; + // + // btnRandomizeAll + // + btnRandomizeAll.Name = "btnRandomizeAll"; + btnRandomizeAll.Size = new Size(344, 26); + btnRandomizeAll.Text = "Randomize All Raids"; + btnRandomizeAll.Click += btnRandomizeAll_Click; + // // cmbMap // cmbMap.FormattingEnabled = true; @@ -631,27 +654,6 @@ private void InitializeComponent() lblMap.TabIndex = 26; lblMap.Text = "Location Map:"; // - // btnShinifyCurrent - // - btnShinifyCurrent.Name = "btnShinifyCurrent"; - btnShinifyCurrent.Size = new Size(344, 26); - btnShinifyCurrent.Text = "Shinify Current Raid"; - btnShinifyCurrent.Click += btnShinifyCurrent_Click; - // - // btnRandomizeCurrent - // - btnRandomizeCurrent.Name = "btnRandomizeCurrent"; - btnRandomizeCurrent.Size = new Size(344, 26); - btnRandomizeCurrent.Text = "Randomize Current Raid"; - btnRandomizeCurrent.Click += btnRandomizeCurrent_Click; - // - // btnRandomizeAll - // - btnRandomizeAll.Name = "btnRandomizeAll"; - btnRandomizeAll.Size = new Size(344, 26); - btnRandomizeAll.Text = "Randomize All Raids"; - btnRandomizeAll.Click += btnRandomizeAll_Click; - // // EditorForm // AutoScaleDimensions = new SizeF(8F, 20F); @@ -667,9 +669,9 @@ private void InitializeComponent() Controls.Add(btnOpenCalculator); Controls.Add(grpPkmInfo); Controls.Add(GrpRaidInfo); - Controls.Add(menuStrip1); + Controls.Add(menuStrip); Icon = (Icon)resources.GetObject("$this.Icon"); - MainMenuStrip = menuStrip1; + MainMenuStrip = menuStrip; Margin = new Padding(3, 4, 3, 4); MaximizeBox = false; MinimizeBox = false; @@ -685,8 +687,8 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)pictureBox).EndInit(); ((System.ComponentModel.ISupportInitialize)imgMap).EndInit(); grpMap.ResumeLayout(false); - menuStrip1.ResumeLayout(false); - menuStrip1.PerformLayout(); + menuStrip.ResumeLayout(false); + menuStrip.PerformLayout(); ResumeLayout(false); PerformLayout(); } @@ -737,7 +739,7 @@ private void InitializeComponent() private Label lblScale; private GroupBox grpMap; private Label lblIndex; - private MenuStrip menuStrip1; + private MenuStrip menuStrip; private ToolStripMenuItem toolsToolStripMenuItem; private ToolStripMenuItem btnShinifyAll; private ToolStripMenuItem btnShinifyAllEncounters; @@ -746,4 +748,5 @@ private void InitializeComponent() private ToolStripMenuItem btnShinifyCurrent; private ToolStripMenuItem btnRandomizeCurrent; private ToolStripMenuItem btnRandomizeAll; + private ToolTip toolTipMoves; } \ No newline at end of file diff --git a/TeraFinder.Plugins/Forms/EditorForm.cs b/TeraFinder.Plugins/Forms/EditorForm.cs index 862f871c..1971f70a 100644 --- a/TeraFinder.Plugins/Forms/EditorForm.cs +++ b/TeraFinder.Plugins/Forms/EditorForm.cs @@ -169,6 +169,7 @@ private void GenerateDictionary() { "Plugin.Main", "Main" }, { "Plugin.DLC1", "DLC1" }, { "Plugin.DLC2", "DLC2" }, + { "EditorForm.toolTipMoves", "Extra Raid Moves:" }, }; } @@ -445,6 +446,15 @@ private void UpdatePKMInfo(TeraRaidDetail raid) SetStarSymbols(rngres.Stars); SetLevelLabel(rngres.Level); + + var movestring = $"{Strings["EditorForm.toolTipMoves"]}"; + if (encounter.ExtraMoves.ExtraMoveList.Count > 0) + foreach (var extramove in encounter.ExtraMoves.ExtraMoveList) + movestring += $"{Environment.NewLine}- {moves[(ushort)extramove]}"; + else + movestring += $"{Environment.NewLine}- {moves[0]}"; + toolTipMoves.SetToolTip(grpMoves, movestring); + return; } } @@ -478,6 +488,9 @@ private void UpdatePKMInfo(TeraRaidDetail raid) CurrTera = null; SetStarSymbols(); SetLevelLabel(); + + var extramoves = $"{Strings["EditorForm.toolTipMoves"]}{Environment.NewLine}- {GameInfo.GetStrings(Language).movelist[0]}"; + toolTipMoves.SetToolTip(grpMoves, extramoves); } private void SetStarSymbols(int stars = 0) diff --git a/TeraFinder.Plugins/Forms/EditorForm.resx b/TeraFinder.Plugins/Forms/EditorForm.resx index 04237a61..ce460f6c 100644 --- a/TeraFinder.Plugins/Forms/EditorForm.resx +++ b/TeraFinder.Plugins/Forms/EditorForm.resx @@ -117,9 +117,12 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 17, 17 + + 152, 17 +