diff options
Diffstat (limited to 'DSALib/Models/Database')
-rw-r--r-- | DSALib/Models/Database/DSA/Advantage.cs | 16 | ||||
-rw-r--r-- | DSALib/Models/Database/DSA/CharSpell.cs | 16 | ||||
-rw-r--r-- | DSALib/Models/Database/DSA/DatabaseChar.cs | 63 | ||||
-rw-r--r-- | DSALib/Models/Database/DSA/Field.cs | 16 | ||||
-rw-r--r-- | DSALib/Models/Database/DSA/GeneralSpell.cs | 20 | ||||
-rw-r--r-- | DSALib/Models/Database/DSA/GroupChar.cs | 13 | ||||
-rw-r--r-- | DSALib/Models/Database/DSA/Inventory.cs | 12 | ||||
-rw-r--r-- | DSALib/Models/Database/DSA/Talent.cs | 24 | ||||
-rw-r--r-- | DSALib/Models/Database/DSA/Weapon.cs | 52 | ||||
-rw-r--r-- | DSALib/Models/Database/DSA/WeaponTalent.cs | 18 | ||||
-rw-r--r-- | DSALib/Models/Database/DataObject.cs | 13 | ||||
-rw-r--r-- | DSALib/Models/Database/Groups/DSAGroup.cs | 10 | ||||
-rw-r--r-- | DSALib/Models/Database/Groups/Group.cs | 9 | ||||
-rw-r--r-- | DSALib/Models/Database/IDataObject.cs | 7 |
14 files changed, 0 insertions, 289 deletions
diff --git a/DSALib/Models/Database/DSA/Advantage.cs b/DSALib/Models/Database/DSA/Advantage.cs deleted file mode 100644 index 2ed0bf9..0000000 --- a/DSALib/Models/Database/DSA/Advantage.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace DSALib.Models.Database.Dsa -{ - public class Advantage - { - public Advantage(string name, string value = "") - { - Name = name ?? throw new ArgumentNullException(nameof(name)); - Value = value ?? throw new ArgumentNullException(nameof(value)); - } - - public string Name { get; set; } - public string Value { get; set; } - } -}
\ No newline at end of file diff --git a/DSALib/Models/Database/DSA/CharSpell.cs b/DSALib/Models/Database/DSA/CharSpell.cs deleted file mode 100644 index d08bc74..0000000 --- a/DSALib/Models/Database/DSA/CharSpell.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace DSALib.Models.Database.Dsa -{ - public class CharSpell - { - public CharSpell(string representation, int value) - { - this.representation = representation ?? throw new ArgumentNullException(nameof(representation)); - this.value = value; - } - - public string representation { get; set; } - public int value { get; set; } - } -}
\ No newline at end of file diff --git a/DSALib/Models/Database/DSA/DatabaseChar.cs b/DSALib/Models/Database/DSA/DatabaseChar.cs deleted file mode 100644 index 1312f95..0000000 --- a/DSALib/Models/Database/DSA/DatabaseChar.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using DSALib.DSA_Game.Characters; - -namespace DSALib.Models.Database.Dsa -{ - public class DatabaseChar - { - public DatabaseChar() - { - } - - public DatabaseChar(int id, string name, string rasse, List<Field> skills, List<Field> talents, - List<Advantage> advantages, List<CharSpell> spells, List<WeaponTalent> weaponTalents) - { - Id = id; - Name = name ?? throw new ArgumentNullException(nameof(name)); - Race = rasse ?? throw new ArgumentNullException(nameof(rasse)); - Skills = skills ?? throw new ArgumentNullException(nameof(skills)); - Talents = talents ?? throw new ArgumentNullException(nameof(talents)); - Advantages = advantages ?? throw new ArgumentNullException(nameof(advantages)); - Spells = spells ?? throw new ArgumentNullException(nameof(spells)); - WeaponTalents = weaponTalents ?? throw new ArgumentNullException(nameof(weaponTalents)); - } - - public int Id { get; set; } - - public string Name { get; set; } - - public string Race { get; set; } - - public List<Field> Skills { get; set; } = new List<Field>(); - - public List<Field> Talents { get; set; } = new List<Field>(); - - public List<Advantage> Advantages { get; set; } = new List<Advantage>(); - - public List<CharSpell> Spells { get; set; } = new List<CharSpell>(); - - public List<WeaponTalent> WeaponTalents { get; set; } = new List<WeaponTalent>(); - - - public static void LoadChar(Character file, out GroupChar group, out DatabaseChar data) - { - group = new GroupChar(); - data = new DatabaseChar(); - - group.Name = file.Name.Split(' ').First(); - group.Weapon = new Weapon(); - group.Lp = group.LpMax = file.Lebenspunkte_Basis; - group.As = group.AsMax = file.Astralpunkte_Basis; - group.Weapon = new Weapon(); - - data.Name = file.Name; - data.Advantages = file.Vorteile.Select(x => new Advantage(x.Name, x.Value)).ToList(); - data.Skills = file.Eigenschaften.Select(x => new Field(x.Key, x.Value)).ToList(); - data.Spells = file.Zauber.Select(x => new CharSpell(x.Representation, x.Value)).ToList(); - data.Talents = file.Talente.Select(x => new Field(x.Name, x.Value)).ToList(); - data.WeaponTalents = file.Kampftalente.Select(x => new WeaponTalent(x.Name, x.At, x.Pa)).ToList(); - } - } -}
\ No newline at end of file diff --git a/DSALib/Models/Database/DSA/Field.cs b/DSALib/Models/Database/DSA/Field.cs deleted file mode 100644 index 6d1b82e..0000000 --- a/DSALib/Models/Database/DSA/Field.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace DSALib.Models.Database.Dsa -{ - public class Field - { - public Field(string name, int value = 0) - { - Name = name ?? throw new ArgumentNullException(nameof(name)); - Value = value; - } - - public string Name { get; set; } - public int Value { get; set; } - } -}
\ No newline at end of file diff --git a/DSALib/Models/Database/DSA/GeneralSpell.cs b/DSALib/Models/Database/DSA/GeneralSpell.cs deleted file mode 100644 index 964c38e..0000000 --- a/DSALib/Models/Database/DSA/GeneralSpell.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace DSALib.Models.Database.Dsa -{ - public class GeneralSpell : Talent - { - public char Comlexity = 'A'; - - public GeneralSpell(string name, string roll, char comlexity = 'A') : base(name, roll) - { - Comlexity = comlexity; - } - - public GeneralSpell(string name, string roll) : base(name, roll) - { - } - - public GeneralSpell() - { - } - } -}
\ No newline at end of file diff --git a/DSALib/Models/Database/DSA/GroupChar.cs b/DSALib/Models/Database/DSA/GroupChar.cs deleted file mode 100644 index a0115cd..0000000 --- a/DSALib/Models/Database/DSA/GroupChar.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace DSALib.Models.Database.Dsa -{ - public class GroupChar - { - public string Name { get; set; } - public int Id { get; set; } - public int Lp { get; set; } - public int LpMax { get; set; } - public int As { get; set; } - public int AsMax { get; set; } - public Weapon Weapon { get; set; } - } -}
\ No newline at end of file diff --git a/DSALib/Models/Database/DSA/Inventory.cs b/DSALib/Models/Database/DSA/Inventory.cs deleted file mode 100644 index f3f5d7a..0000000 --- a/DSALib/Models/Database/DSA/Inventory.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections.Generic; - -namespace DSALib.Models.Database.Dsa -{ - public class Inventory - { - public int Id { get; set; } - public Dictionary<string, bool> Items { get; set; } = new Dictionary<string, bool>(); - public Dictionary<string, bool> Food { get; set; } = new Dictionary<string, bool>(); - public List<Weapon> Weapons { get; set; } = new List<Weapon>(); - } -}
\ No newline at end of file diff --git a/DSALib/Models/Database/DSA/Talent.cs b/DSALib/Models/Database/DSA/Talent.cs deleted file mode 100644 index 214aecc..0000000 --- a/DSALib/Models/Database/DSA/Talent.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; - -namespace DSALib.Models.Database.Dsa -{ - public class Talent : DSALib.Models.Database.DataObject - { - public Talent() - { - } - - public Talent(string name) - { - Name = name ?? throw new ArgumentNullException(nameof(name)); - } - - public Talent(string name, string roll) - { - Name = name ?? throw new ArgumentNullException(nameof(name)); - Roll = roll.Split('/'); - } - - public string[] Roll { get; set; } = new string[3]; - } -}
\ No newline at end of file diff --git a/DSALib/Models/Database/DSA/Weapon.cs b/DSALib/Models/Database/DSA/Weapon.cs deleted file mode 100644 index 308c6c5..0000000 --- a/DSALib/Models/Database/DSA/Weapon.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; - -namespace DSALib.Models.Database.Dsa -{ - public class Weapon - { - public Weapon() - { - } - - public Weapon(string name, string damage, int weight, string weaponTalent, string price) - { - Name = name ?? throw new ArgumentNullException(nameof(name)); - Damage = damage ?? throw new ArgumentNullException(nameof(damage)); - Weight = weight; - WeaponTalent = weaponTalent ?? throw new ArgumentNullException(nameof(weaponTalent)); - Price = price; - } - - public string Name { get; set; } - public string Damage { get; set; } - public int Weight { get; set; } - public string WeaponTalent { get; set; } - public string Price { get; set; } - } - - public class MeleeWeapon : Weapon - { - public MeleeWeapon(string name, string damage, int weight, string weaponTalent, string price) : base(name, - damage, weight, weaponTalent, price) - { - } - - public string TpKK { get; set; } - public int INI { get; set; } - public string MW { get; set; } - } - - public class RangedWeapon : Weapon - { - public RangedWeapon(string name, string damage, int weight, string weaponTalent, string price) : base(name, - damage, weight, weaponTalent, price) - { - } - - public int AtMod { get; set; } - public int KKMod { get; set; } - public string AtReach { get; set; } - public string TpReach { get; set; } - public int LoadTime { get; set; } - } -}
\ No newline at end of file diff --git a/DSALib/Models/Database/DSA/WeaponTalent.cs b/DSALib/Models/Database/DSA/WeaponTalent.cs deleted file mode 100644 index 2ab921b..0000000 --- a/DSALib/Models/Database/DSA/WeaponTalent.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace DSALib.Models.Database.Dsa -{ - public class WeaponTalent - { - public WeaponTalent(string name, int at, int pa) - { - Name = name ?? throw new ArgumentNullException(nameof(name)); - At = at; - Pa = pa; - } - - public string Name { get; set; } - public int At { get; set; } - public int Pa { get; set; } - } -}
\ No newline at end of file diff --git a/DSALib/Models/Database/DataObject.cs b/DSALib/Models/Database/DataObject.cs deleted file mode 100644 index 59cfdf2..0000000 --- a/DSALib/Models/Database/DataObject.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace DSALib.Models.Database -{ - public class DataObject : IDataObject - { - - public override string ToString() - { - return Name; - } - - public string Name { get; set; } - } -} diff --git a/DSALib/Models/Database/Groups/DSAGroup.cs b/DSALib/Models/Database/Groups/DSAGroup.cs deleted file mode 100644 index adbd0ac..0000000 --- a/DSALib/Models/Database/Groups/DSAGroup.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections.Generic; -using DSALib.Models.Database.Dsa; - -namespace DSALib.Models.Database.Groups -{ - public class DsaGroup : Group - { - public List<GroupChar> Chars { get; set; } = new List<GroupChar>(); - } -}
\ No newline at end of file diff --git a/DSALib/Models/Database/Groups/Group.cs b/DSALib/Models/Database/Groups/Group.cs deleted file mode 100644 index 096f2be..0000000 --- a/DSALib/Models/Database/Groups/Group.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace DSALib.Models.Database.Groups -{ - public class Group - { - public string Name { get; set; } - public string Password { get; set; } - public int Id { get; set; } - } -}
\ No newline at end of file diff --git a/DSALib/Models/Database/IDataObject.cs b/DSALib/Models/Database/IDataObject.cs deleted file mode 100644 index bdc88b7..0000000 --- a/DSALib/Models/Database/IDataObject.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace DSALib.Models.Database -{ - public interface IDataObject - { - string Name { get; set; } - } -}
\ No newline at end of file |