From 496c9c32cb8d0d067e675855289904a22b05d9ac Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Mon, 9 Jul 2018 23:38:43 +0200 Subject: Implemented critter class and fixed some gui errors --- DSALib/Characters/Critter.cs | 74 ++- DSALib/CritterAttack.cs | 27 + DSALib/DSALib.csproj | 7 + DSALib/packages.config | 4 + ZooBOTanica/CritCreate.Designer.cs | 146 +++-- ZooBOTanica/CritCreate.cs | 83 ++- ZooBOTanica/CritCreate.de-DE.resx | 139 ----- ZooBOTanica/CritCreate.resx | 1059 +++++++++++++++++--------------- "ZooBOTanica/Critters/B\303\244r.json" | 25 + ZooBOTanica/Critters/Gegner.json | 18 + ZooBOTanica/Critters/Goblin.json | 37 ++ ZooBOTanica/TextBoxExtension.cs | 12 - ZooBOTanica/ZooBOTanica.csproj | 11 +- 13 files changed, 912 insertions(+), 730 deletions(-) create mode 100644 DSALib/CritterAttack.cs create mode 100644 DSALib/packages.config delete mode 100644 ZooBOTanica/CritCreate.de-DE.resx create mode 100644 "ZooBOTanica/Critters/B\303\244r.json" create mode 100644 ZooBOTanica/Critters/Gegner.json create mode 100644 ZooBOTanica/Critters/Goblin.json delete mode 100644 ZooBOTanica/TextBoxExtension.cs diff --git a/DSALib/Characters/Critter.cs b/DSALib/Characters/Critter.cs index 5090b6b..c6776ed 100644 --- a/DSALib/Characters/Critter.cs +++ b/DSALib/Characters/Critter.cs @@ -1,26 +1,64 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace DSALib.Characters { + using System.IO; + using DiscoBot.DSA_Game.Characters; + using Newtonsoft.Json; + public class Critter : Being, ICombatant { - private int rs, mr, ko, pa, gs, gw; - + public int Rs { get; set; } + + public int Mr { get; set; } + + public int Ko { get; set; } + + public int Pa { get; set; } + + public int Gs { get; set; } + + public int Gw { get; set; } + + public string Ini { get; set; } + + public string Comment { get; set; } + + public List CritterAttacks { get; set; } - public Critter(int gw, int gs, int rs, int mr, int ko, int pa) + private CritterAttack lastAttack; + + public Critter(int gw, int gs, int rs, int mr, int ko, int pa, string ini, List critterAttacks) + { + this.Gw = gw; + this.Gs = gs; + this.Rs = rs; + this.Mr = mr; + this.Ko = ko; + this.Pa = pa; + this.Ini = ini; + this.CritterAttacks = critterAttacks; + this.lastAttack = this.CritterAttacks[new Random().Next(critterAttacks.Count)]; + } + + public Critter() + { + } + + public static Critter Load(string path) { - this.gw = gw; - this.gs = gs; - this.rs = rs; - this.mr = mr; - this.ko = ko; - this.pa = pa; + try + { + return JsonConvert.DeserializeObject(File.ReadAllText(path)); // Deserialize Data and create Session Object + } + catch (Exception e) + { + Console.WriteLine($"Laden von Save-File {path} fehlgeschlagen." + e); + return null; + } } public string Angriff(string talent, int erschwernis = 0) @@ -32,5 +70,17 @@ namespace DSALib.Characters { throw new NotImplementedException(); } + + public void Save(string path = @"..\..\Critters\") + { + try + { + File.WriteAllText(path + this.Name + ".json", JsonConvert.SerializeObject(this, Formatting.Indented)); // Deserialize Data and create CommandInfo Struct + } + catch (Exception e) + { + Console.WriteLine($"Speichern von Save-File {path} fehlgeschlagen." + e); + } + } } } diff --git a/DSALib/CritterAttack.cs b/DSALib/CritterAttack.cs new file mode 100644 index 0000000..0ad4a66 --- /dev/null +++ b/DSALib/CritterAttack.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DSALib +{ + public class CritterAttack + { + public CritterAttack(string name, int at, string tp, string comment = "") + { + this.Name = name; + this.At = at; + this.Tp = tp; + this.Comment = comment; + } + + public string Name { get; set; } + + public int At { get; set; } + + public string Tp { get; set; } + + public string Comment { get; set; } + } +} diff --git a/DSALib/DSALib.csproj b/DSALib/DSALib.csproj index db17bf7..27514d5 100644 --- a/DSALib/DSALib.csproj +++ b/DSALib/DSALib.csproj @@ -30,6 +30,9 @@ 4 + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + @@ -45,11 +48,15 @@ + + + + \ No newline at end of file diff --git a/DSALib/packages.config b/DSALib/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/DSALib/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ZooBOTanica/CritCreate.Designer.cs b/ZooBOTanica/CritCreate.Designer.cs index 0129815..93e1599 100644 --- a/ZooBOTanica/CritCreate.Designer.cs +++ b/ZooBOTanica/CritCreate.Designer.cs @@ -34,21 +34,21 @@ this.LeLabel = new System.Windows.Forms.Label(); this.LeEdit = new System.Windows.Forms.NumericUpDown(); this.GrundwerteGroup = new System.Windows.Forms.GroupBox(); + this.KoLabel = new System.Windows.Forms.Label(); + this.KoEdit = new System.Windows.Forms.NumericUpDown(); this.AeLabel = new System.Windows.Forms.Label(); this.AeEdit = new System.Windows.Forms.NumericUpDown(); this.AuLabel = new System.Windows.Forms.Label(); this.AuEdit = new System.Windows.Forms.NumericUpDown(); this.VerteidugungGroup = new System.Windows.Forms.GroupBox(); - this.KoLabel = new System.Windows.Forms.Label(); - this.KoEdit = new System.Windows.Forms.NumericUpDown(); + this.PaEdit = new System.Windows.Forms.NumericUpDown(); + this.PaLabel = new System.Windows.Forms.Label(); this.MRLabel = new System.Windows.Forms.Label(); this.MREdit = new System.Windows.Forms.NumericUpDown(); this.RSLAbel = new System.Windows.Forms.Label(); this.RSEdit = new System.Windows.Forms.NumericUpDown(); - this.PALabel = new System.Windows.Forms.Label(); - this.PAEdit = new System.Windows.Forms.NumericUpDown(); this.SecondGroup = new System.Windows.Forms.GroupBox(); - this.textBox1 = new System.Windows.Forms.TextBox(); + this.INIEdit = new System.Windows.Forms.TextBox(); this.GWLabel = new System.Windows.Forms.Label(); this.GWEdit = new System.Windows.Forms.NumericUpDown(); this.INILabel = new System.Windows.Forms.Label(); @@ -60,15 +60,19 @@ this.ATCollum = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.TPCollum = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.KommentarCollum = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.MeisterkommentarEdit = new System.Windows.Forms.TextBox(); + this.MeisterkommentarLabel = new System.Windows.Forms.Label(); + this.SaveButton = new System.Windows.Forms.Button(); + this.LoadButton = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.LeEdit)).BeginInit(); this.GrundwerteGroup.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.KoEdit)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.AeEdit)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.AuEdit)).BeginInit(); this.VerteidugungGroup.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.KoEdit)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PaEdit)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.MREdit)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.RSEdit)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.PAEdit)).BeginInit(); this.SecondGroup.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.GWEdit)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.GsEdit)).BeginInit(); @@ -83,8 +87,8 @@ // // NameEdit // - resources.ApplyResources(this.NameEdit, "NameEdit"); this.NameEdit.ForeColor = System.Drawing.SystemColors.WindowText; + resources.ApplyResources(this.NameEdit, "NameEdit"); this.NameEdit.Name = "NameEdit"; // // LeLabel @@ -104,16 +108,31 @@ // // GrundwerteGroup // - resources.ApplyResources(this.GrundwerteGroup, "GrundwerteGroup"); + this.GrundwerteGroup.Controls.Add(this.KoLabel); + this.GrundwerteGroup.Controls.Add(this.KoEdit); this.GrundwerteGroup.Controls.Add(this.AeLabel); this.GrundwerteGroup.Controls.Add(this.AeEdit); this.GrundwerteGroup.Controls.Add(this.AuLabel); this.GrundwerteGroup.Controls.Add(this.AuEdit); - this.GrundwerteGroup.Controls.Add(this.LeLabel); - this.GrundwerteGroup.Controls.Add(this.LeEdit); + resources.ApplyResources(this.GrundwerteGroup, "GrundwerteGroup"); this.GrundwerteGroup.Name = "GrundwerteGroup"; this.GrundwerteGroup.TabStop = false; // + // KoLabel + // + resources.ApplyResources(this.KoLabel, "KoLabel"); + this.KoLabel.Name = "KoLabel"; + // + // KoEdit + // + resources.ApplyResources(this.KoEdit, "KoEdit"); + this.KoEdit.Name = "KoEdit"; + this.KoEdit.Value = new decimal(new int[] { + 10, + 0, + 0, + 0}); + // // AeLabel // resources.ApplyResources(this.AeLabel, "AeLabel"); @@ -141,30 +160,25 @@ // // VerteidugungGroup // - resources.ApplyResources(this.VerteidugungGroup, "VerteidugungGroup"); - this.VerteidugungGroup.Controls.Add(this.KoLabel); - this.VerteidugungGroup.Controls.Add(this.KoEdit); + this.VerteidugungGroup.Controls.Add(this.PaEdit); + this.VerteidugungGroup.Controls.Add(this.PaLabel); this.VerteidugungGroup.Controls.Add(this.MRLabel); this.VerteidugungGroup.Controls.Add(this.MREdit); this.VerteidugungGroup.Controls.Add(this.RSLAbel); this.VerteidugungGroup.Controls.Add(this.RSEdit); + resources.ApplyResources(this.VerteidugungGroup, "VerteidugungGroup"); this.VerteidugungGroup.Name = "VerteidugungGroup"; this.VerteidugungGroup.TabStop = false; // - // KoLabel + // PaEdit // - resources.ApplyResources(this.KoLabel, "KoLabel"); - this.KoLabel.Name = "KoLabel"; + resources.ApplyResources(this.PaEdit, "PaEdit"); + this.PaEdit.Name = "PaEdit"; // - // KoEdit + // PaLabel // - resources.ApplyResources(this.KoEdit, "KoEdit"); - this.KoEdit.Name = "KoEdit"; - this.KoEdit.Value = new decimal(new int[] { - 10, - 0, - 0, - 0}); + resources.ApplyResources(this.PaLabel, "PaLabel"); + this.PaLabel.Name = "PaLabel"; // // MRLabel // @@ -191,37 +205,23 @@ resources.ApplyResources(this.RSEdit, "RSEdit"); this.RSEdit.Name = "RSEdit"; // - // PALabel - // - resources.ApplyResources(this.PALabel, "PALabel"); - this.PALabel.Name = "PALabel"; - // - // PAEdit - // - resources.ApplyResources(this.PAEdit, "PAEdit"); - this.PAEdit.Name = "PAEdit"; - this.PAEdit.Value = new decimal(new int[] { - 6, - 0, - 0, - 0}); - // // SecondGroup // - resources.ApplyResources(this.SecondGroup, "SecondGroup"); - this.SecondGroup.Controls.Add(this.textBox1); + this.SecondGroup.Controls.Add(this.INIEdit); this.SecondGroup.Controls.Add(this.GWLabel); this.SecondGroup.Controls.Add(this.GWEdit); this.SecondGroup.Controls.Add(this.INILabel); this.SecondGroup.Controls.Add(this.GsLabel); this.SecondGroup.Controls.Add(this.GsEdit); + resources.ApplyResources(this.SecondGroup, "SecondGroup"); this.SecondGroup.Name = "SecondGroup"; this.SecondGroup.TabStop = false; // - // textBox1 + // INIEdit // - resources.ApplyResources(this.textBox1, "textBox1"); - this.textBox1.Name = "textBox1"; + this.INIEdit.CharacterCasing = System.Windows.Forms.CharacterCasing.Lower; + resources.ApplyResources(this.INIEdit, "INIEdit"); + this.INIEdit.Name = "INIEdit"; // // GWLabel // @@ -260,16 +260,14 @@ // // AttackGroup // - resources.ApplyResources(this.AttackGroup, "AttackGroup"); this.AttackGroup.Controls.Add(this.AttackList); - this.AttackGroup.Controls.Add(this.PALabel); - this.AttackGroup.Controls.Add(this.PAEdit); + resources.ApplyResources(this.AttackGroup, "AttackGroup"); this.AttackGroup.Name = "AttackGroup"; this.AttackGroup.TabStop = false; // // AttackList // - resources.ApplyResources(this.AttackList, "AttackList"); + this.AttackList.AllowDrop = true; this.AttackList.AllowUserToResizeRows = false; this.AttackList.BackgroundColor = System.Drawing.Color.PeachPuff; this.AttackList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; @@ -278,6 +276,7 @@ this.ATCollum, this.TPCollum, this.KommentarCollum}); + resources.ApplyResources(this.AttackList, "AttackList"); this.AttackList.Name = "AttackList"; // // NameCollum @@ -302,40 +301,69 @@ resources.ApplyResources(this.KommentarCollum, "KommentarCollum"); this.KommentarCollum.Name = "KommentarCollum"; // + // MeisterkommentarEdit + // + resources.ApplyResources(this.MeisterkommentarEdit, "MeisterkommentarEdit"); + this.MeisterkommentarEdit.Name = "MeisterkommentarEdit"; + // + // MeisterkommentarLabel + // + resources.ApplyResources(this.MeisterkommentarLabel, "MeisterkommentarLabel"); + this.MeisterkommentarLabel.Name = "MeisterkommentarLabel"; + // + // SaveButton + // + resources.ApplyResources(this.SaveButton, "SaveButton"); + this.SaveButton.Name = "SaveButton"; + this.SaveButton.UseVisualStyleBackColor = true; + this.SaveButton.Click += new System.EventHandler(this.SaveButton_Click); + // + // LoadButton + // + resources.ApplyResources(this.LoadButton, "LoadButton"); + this.LoadButton.Name = "LoadButton"; + this.LoadButton.UseVisualStyleBackColor = true; + this.LoadButton.Click += new System.EventHandler(this.LoadButton_Click); + // // CritCreateForm // - resources.ApplyResources(this, "$this"); this.AllowDrop = true; + resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.SandyBrown; + this.Controls.Add(this.LoadButton); + this.Controls.Add(this.SaveButton); + this.Controls.Add(this.MeisterkommentarLabel); + this.Controls.Add(this.MeisterkommentarEdit); this.Controls.Add(this.AttackGroup); + this.Controls.Add(this.LeLabel); + this.Controls.Add(this.LeEdit); this.Controls.Add(this.SecondGroup); this.Controls.Add(this.VerteidugungGroup); this.Controls.Add(this.GrundwerteGroup); this.Controls.Add(this.NameEdit); this.Controls.Add(this.NameLabel); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; this.MaximizeBox = false; this.Name = "CritCreateForm"; this.ShowIcon = false; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.DragDrop += new System.Windows.Forms.DragEventHandler(this.CritCreateForm_DragDrop); ((System.ComponentModel.ISupportInitialize)(this.LeEdit)).EndInit(); this.GrundwerteGroup.ResumeLayout(false); this.GrundwerteGroup.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.KoEdit)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.AeEdit)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.AuEdit)).EndInit(); this.VerteidugungGroup.ResumeLayout(false); this.VerteidugungGroup.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.KoEdit)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PaEdit)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.MREdit)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.RSEdit)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.PAEdit)).EndInit(); this.SecondGroup.ResumeLayout(false); this.SecondGroup.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.GWEdit)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.GsEdit)).EndInit(); this.AttackGroup.ResumeLayout(false); - this.AttackGroup.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.AttackList)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -358,8 +386,6 @@ private System.Windows.Forms.NumericUpDown MREdit; private System.Windows.Forms.Label RSLAbel; private System.Windows.Forms.NumericUpDown RSEdit; - private System.Windows.Forms.Label PALabel; - private System.Windows.Forms.NumericUpDown PAEdit; private System.Windows.Forms.Label KoLabel; private System.Windows.Forms.NumericUpDown KoEdit; private System.Windows.Forms.GroupBox SecondGroup; @@ -368,13 +394,19 @@ private System.Windows.Forms.Label INILabel; private System.Windows.Forms.Label GsLabel; private System.Windows.Forms.NumericUpDown GsEdit; - private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox INIEdit; private System.Windows.Forms.GroupBox AttackGroup; private System.Windows.Forms.DataGridView AttackList; private System.Windows.Forms.DataGridViewTextBoxColumn NameCollum; private System.Windows.Forms.DataGridViewTextBoxColumn ATCollum; private System.Windows.Forms.DataGridViewTextBoxColumn TPCollum; private System.Windows.Forms.DataGridViewTextBoxColumn KommentarCollum; + private System.Windows.Forms.TextBox MeisterkommentarEdit; + private System.Windows.Forms.Label MeisterkommentarLabel; + private System.Windows.Forms.Button SaveButton; + private System.Windows.Forms.Button LoadButton; + private System.Windows.Forms.Label PaLabel; + private System.Windows.Forms.NumericUpDown PaEdit; } } diff --git a/ZooBOTanica/CritCreate.cs b/ZooBOTanica/CritCreate.cs index 7285a78..f570c9e 100644 --- a/ZooBOTanica/CritCreate.cs +++ b/ZooBOTanica/CritCreate.cs @@ -10,13 +10,94 @@ using System.Windows.Forms; namespace ZooBOTanica { + using DSALib; + using DSALib.Characters; + public partial class CritCreateForm : Form { + private DSALib.Characters.Critter critter; + public CritCreateForm() { - InitializeComponent(); + this.InitializeComponent(); + this.AllowDrop = true; + } + + private void Load(string path) + { + this.critter = Critter.Load(path); + this.AeEdit.Value = this.critter.Astralpunkte_Basis; + this.AuEdit.Value = this.critter.Ausdauer_Basis; + this.GWEdit.Value = this.critter.Gw; + this.GsEdit.Value = this.critter.Gs; + this.KoEdit.Value = this.critter.Ko; + this.LeEdit.Value = this.critter.Lebenspunkte_Basis; + this.MREdit.Value = this.critter.Mr; + this.NameEdit.Text = this.critter.Name; + //this.PAEdit.Value = this.critter.Pa; + this.RSEdit.Value = this.critter.Rs; + this.INIEdit.Text = this.critter.Ini; + this.MeisterkommentarEdit.Text = this.critter.Comment; + + this.AttackList.Rows.Clear(); + + foreach (var critterAttack in this.critter.CritterAttacks) + { + this.AttackList.Rows.Add(critterAttack.Name, critterAttack.At, critterAttack.Tp, critterAttack.Comment); + } } + private void CritCreateForm_DragDrop(object sender, DragEventArgs e) + { + this.Load(e.Data.GetData(DataFormats.Text).ToString()); + } + + private void LoadButton_Click(object sender, EventArgs e) + { + var dig = new OpenFileDialog(); + dig.CheckFileExists = true; + dig.Multiselect = false; + dig.Title = "Gespeicherten Gegner laden"; + dig.Filter = "*Json Dateien (*.json)|*.json"; + + if (dig.ShowDialog() == DialogResult.OK) + { + this.Load(dig.FileName); + } + } + + private void SaveButton_Click(object sender, EventArgs e) + { + this.critter = new Critter(); + this.critter.Astralpunkte_Basis = (int)this.AeEdit.Value; + this.critter.Ausdauer_Basis = (int)this.AuEdit.Value; + this.critter.Gw = (int)this.GWEdit.Value; + this.critter.Gs = (int)this.GsEdit.Value; + this.critter.Ko = (int)this.KoEdit.Value; + this.critter.Lebenspunkte_Basis = (int)this.LeEdit.Value; + this.critter.Mr = (int)this.MREdit.Value; + this.critter.Name = this.NameEdit.Text; + //this.critter.Pa = (int)this.PAEdit.Value; + this.critter.Rs = (int)this.RSEdit.Value; + this.critter.Ini = this.INIEdit.Text; + this.critter.Comment = this.MeisterkommentarEdit.Text; + + this.critter.CritterAttacks = new List(); + + for (var index = 0; index < this.AttackList.Rows.Count -1; index++) + { + DataGridViewRow Row = this.AttackList.Rows[index]; + this.critter.CritterAttacks.Add( + new CritterAttack( + (Row.Cells[0].Value ?? "").ToString(), + Convert.ToInt32(Row.Cells[1].Value ?? 0), + (Row.Cells[2].Value ?? "").ToString(), + (Row.Cells[3].Value ?? "").ToString())); + } + + this.critter.Save(); + } } } + diff --git a/ZooBOTanica/CritCreate.de-DE.resx b/ZooBOTanica/CritCreate.de-DE.resx deleted file mode 100644 index 1b630fc..0000000 --- a/ZooBOTanica/CritCreate.de-DE.resx +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Name - - - At - - - - 42 - - - TP - - - 46 - - - Kommentar - - \ No newline at end of file diff --git a/ZooBOTanica/CritCreate.resx b/ZooBOTanica/CritCreate.resx index d213fe9..ccdf4fd 100644 --- a/ZooBOTanica/CritCreate.resx +++ b/ZooBOTanica/CritCreate.resx @@ -117,789 +117,838 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + - - 45, 20 + + 333, 31 - - VerteidugungGroup + + 38, 13 - - 279, 150 + + 0 - - $this + + Name: - - Le: + + NameLabel - - SecondGroup + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - GrundwerteGroup + + 11 - - SecondGroup + + 391, 28 - - AttackGroup + + 100, 20 - - - True + + 1 - - True + + Gegner - - MRLabel + + NameEdit - - Sekundäre Werte + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 185, 21 + + $this - - GWLabel + + 10 - - 27, 13 + + True - - 14 + + 510, 31 - - Kommentar + + 22, 13 - - Ae: + + 2 - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Le: - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + LeLabel - - 5 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 22, 32 + + $this - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 5 - - 2 + + 538, 29 - - 314, 173 + + 45, 20 - - AttackList + + 2 - - 8 + + LeEdit System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - At + + $this + + + 6 + + + True + + + 189, 26 + + + 25, 13 + + + 10 + + + KO: KoLabel - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 121, 19 + + GrundwerteGroup - - 10 + + 0 - - True + + 217, 24 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 45, 20 - - 3 + + 9 - - INILabel + + KoEdit - - 12, 55 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NameEdit + + GrundwerteGroup - - True + + 1 - - 3 + + True - - VerteidugungGroup + + 93, 26 - - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 23, 13 8 - - 2 - - - 0 - - - SecondGroup + + Ae: - - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + AeLabel - - GS: + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + GrundwerteGroup - - 4 + + 2 - - 277, 53 + + 121, 24 - - 80, 29 + + 45, 20 - - 6, 13 + + 8 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + AeEdit - - 0 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 GrundwerteGroup - - $this + + 3 - - 38, 13 + + True - - 131, 23 + + 13, 26 + + + 23, 13 6 - - 11 + + Au: + + + AuLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GrundwerteGroup + + + 4 + + + 36, 24 + + + 45, 20 + + + 7 AuEdit - - 0 - - - $this + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2w6+5 + + GrundwerteGroup - - 3 + + 5 - - 0 + + 325, 117 - - 8, 21 + + 277, 53 - - $this + + 4 Grundwerte - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + GrundwerteGroup - - 42 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 4 + + $this - - AttackGroup + + 9 - - 4 + + 36, 23 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 45, 20 - - INI: + + 3 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + PaEdit - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 296, 218 + + VerteidugungGroup - - 2 + + 0 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True - - 2 + + + NoControl - - 45, 20 + + 11, 29 - - 121, 18 + + 24, 13 - - Gegner + + 10 - - 6 + + PA: - - 5 + + PaLabel - - CritCreateForm + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + VerteidugungGroup - - GrundwerteGroup + + 1 - - GrundwerteGroup + + True - - TP + + 185, 25 - - 10 + + 27, 13 - - 314, 55 + + 8 - - 45, 20 + + MR: - - SecondGroup + + MRLabel - - KO: + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + VerteidugungGroup + + + 2 + + + 213, 23 - - GrundwerteGroup + + 45, 20 - - Name + + 6 - - 8, 189 + + MREdit - - 3 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 213, 19 + + VerteidugungGroup - - 7 + + 3 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True - - 10 + + 93, 25 - - 5 + + 25, 13 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 6 RS: - - 4 - - - 9 + + RSLAbel - - PA: + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + VerteidugungGroup + + 4 + + + 121, 23 + 45, 20 - - 45, 20 + + 4 - - 2 + + RSEdit - - AT + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + VerteidugungGroup - - 93, 21 - - - 100, 20 - - - True + + 5 - - Attacke(n) + + 325, 58 - - NameCollum + + 277, 53 - - GsEdit + + 10 Verteidigung - - 213, 19 + + VerteidugungGroup - - 25, 13 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 45, 20 + + $this - - 3 + + 8 - - AuLabel + + 121, 18 - - Au: + + 55, 20 - - AeLabel + + 11 - - CritCreate + + 1w6 - - GrundwerteGroup + + INIEdit - - 7 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - KommentarCollum + + SecondGroup - + + 0 + + True - - RSLAbel + + 185, 21 - - ATCollum + + 29, 13 - - LeEdit + + 8 - - 3 + + GW: - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + GWLabel - - 25, 13 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 39, 23 + + SecondGroup - + 1 - - 3 + + 213, 19 - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 45, 20 - - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 12 - - 277, 53 + + GWEdit - - 22, 13 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - RSEdit + + SecondGroup - + 2 - - 23, 13 - - - 0 + + True - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 93, 21 - - SecondGroup + + 24, 13 - - 221, 23 + + 6 - - 36, 19 + + INI: - - textBox1 + + INILabel - - 10 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - MR: + + SecondGroup - - 4 + + 3 - + True - - 46 - - - GWEdit - - - 1 - - - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 8, 21 - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 25, 13 - - 0 + + 2 - - 42 + + GS: - - MREdit + + GsLabel - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 11, 19 + + SecondGroup - - 36, 19 + + 4 - - KoEdit + + 36, 19 - + 45, 20 - - Kommentar - - - 6 + + 10 - - AttackGroup + + GsEdit - - 24, 13 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + SecondGroup - - 9 + + 5 - - 1 + + 325, 182 - - 103, 25 + + 277, 53 - - True + + 10 - - 29, 13 + + Sekundäre Werte - - TP + + SecondGroup - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 5 + + $this - - 1 + + 7 - - 185, 21 + + True + + + Name - - GW: + + True + + + At - - NameLabel + + 42 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + TP - - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 46 + + True + Kommentar - - AeEdit - - - TPCollum + + 11, 19 - - AttackGroup + + 279, 150 - - 1 + + 13 - - 45, 20 + + AttackList - - PALabel + + System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + AttackGroup - - At + + 0 - - Name + + 11, 21 - - 600, 284 + + 296, 181 12 - - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Attacke(n) - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + AttackGroup - - SecondGroup + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 11, 25 + + 4 - - 25, 13 + + 22, 227 - - 93, 21 + + True - - PAEdit + + 279, 60 - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 14 - - 46 + + MeisterkommentarEdit - - 8 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Name + + $this - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 3 - + True - - 2 + + 22, 205 - - $this + + 96, 13 - - 314, 114 + + 16 - - Name: + + Meisterkommentar: - - 2 + + MeisterkommentarLabel - - 8, 21 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 277, 53 + + $this - - TP + + 2 - - System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 468, 251 - - 45, 20 + + 119, 36 - - 9 + + 15 - - 24, 13 + + Speichern - - SecondGroup + + SaveButton - - 23, 13 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - LeLabel + + $this - - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 1 - - 193, 25 + + NoControl - - VerteidugungGroup + + 336, 251 - - 1 + + 119, 36 - - True + + 18 - - VerteidugungGroup + + Laden - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + LoadButton - - 36, 187 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - GsLabel + + $this - - 58, 20 + + 0 - - de-DE - - - True - - - True - True - - True - - - True - - - True - True - - True - - - True - - - True - + + 6, 13 + + + 646, 304 + + + CritCreate + + + NameCollum + + + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ATCollum + + + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + TPCollum + + + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + KommentarCollum + + + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + CritCreateForm + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git "a/ZooBOTanica/Critters/B\303\244r.json" "b/ZooBOTanica/Critters/B\303\244r.json" new file mode 100644 index 0000000..ffa5ce2 --- /dev/null +++ "b/ZooBOTanica/Critters/B\303\244r.json" @@ -0,0 +1,25 @@ +{ + "Rs": 0, + "Mr": 5, + "Ko": 10, + "Pa": 0, + "Gs": 8, + "Gw": 3, + "Ini": "2w6+5", + "Comment": "", + "CritterAttacks": [ + { + "Name": "Biss", + "At": 12, + "Tp": "12", + "Comment": "" + } + ], + "Lebenspunkte_Basis": 30, + "Lebenspunkte_Aktuell": 30, + "Ausdauer_Basis": 30, + "Ausdauer_Aktuell": 30, + "Astralpunkte_Basis": 0, + "Astralpunkte_Aktuell": 0, + "Name": "Bär" +} \ No newline at end of file diff --git a/ZooBOTanica/Critters/Gegner.json b/ZooBOTanica/Critters/Gegner.json new file mode 100644 index 0000000..cdf8563 --- /dev/null +++ b/ZooBOTanica/Critters/Gegner.json @@ -0,0 +1,18 @@ +{ + "Rs": 0, + "Mr": 5, + "Ko": 10, + "Pa": 0, + "Gs": 8, + "Gw": 3, + "Ini": "2w6+5", + "Comment": "", + "CritterAttacks": [], + "Lebenspunkte_Basis": 30, + "Lebenspunkte_Aktuell": 30, + "Ausdauer_Basis": 30, + "Ausdauer_Aktuell": 30, + "Astralpunkte_Basis": 0, + "Astralpunkte_Aktuell": 0, + "Name": "Gegner" +} \ No newline at end of file diff --git a/ZooBOTanica/Critters/Goblin.json b/ZooBOTanica/Critters/Goblin.json new file mode 100644 index 0000000..ad763f5 --- /dev/null +++ b/ZooBOTanica/Critters/Goblin.json @@ -0,0 +1,37 @@ +{ + "Rs": 1, + "Mr": 3, + "Ko": 8, + "Pa": 0, + "Gs": 8, + "Gw": 3, + "Ini": "2w6+5", + "Comment": "", + "CritterAttacks": [ + { + "Name": "Biss", + "At": 10, + "Tp": "1W+1", + "Comment": "" + }, + { + "Name": "Schwert", + "At": 10, + "Tp": "1W+4", + "Comment": "" + }, + { + "Name": "Schleuder", + "At": 6, + "Tp": "1W+2", + "Comment": "" + } + ], + "Lebenspunkte_Basis": 22, + "Lebenspunkte_Aktuell": 30, + "Ausdauer_Basis": 30, + "Ausdauer_Aktuell": 30, + "Astralpunkte_Basis": 0, + "Astralpunkte_Aktuell": 0, + "Name": "Goblin" +} \ No newline at end of file diff --git a/ZooBOTanica/TextBoxExtension.cs b/ZooBOTanica/TextBoxExtension.cs deleted file mode 100644 index cc50dac..0000000 --- a/ZooBOTanica/TextBoxExtension.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZooBOTanica -{ - class FormExtension - { - } -} diff --git a/ZooBOTanica/ZooBOTanica.csproj b/ZooBOTanica/ZooBOTanica.csproj index e4d3980..4f87497 100644 --- a/ZooBOTanica/ZooBOTanica.csproj +++ b/ZooBOTanica/ZooBOTanica.csproj @@ -51,14 +51,11 @@ CritCreate.cs - - - CritCreate.cs - CritCreate.cs + Designer ResXFileCodeGenerator @@ -82,5 +79,11 @@ + + + {33281e45-1d5c-4645-8d2b-dd05b40fdfd5} + DSALib + + \ No newline at end of file -- cgit v1.3.1