From deb3640255abe60289e042944abf66bedcf1184e Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Mon, 9 Jul 2018 00:47:20 +0200 Subject: Revert "Reworked inheritance structure" This reverts commit f0d68ad8edb06ff68400644fd4c943f66705cc97. --- DiscoBot/DSA_Game/Characters/Being.cs | 23 ----------------------- DiscoBot/DSA_Game/Characters/Character.cs | 15 ++++++++++++++- DiscoBot/DSA_Game/Characters/Combatant.cs | 26 -------------------------- DiscoBot/DSA_Game/Characters/Entity.cs | 18 ------------------ DiscoBot/DSA_Game/Characters/ICharacter.cs | 19 ++++++++++++++++++- DiscoBot/DSA_Game/Characters/NPC.cs | 13 ++++++++++++- DiscoBot/DiscoBot.csproj | 3 --- 7 files changed, 44 insertions(+), 73 deletions(-) delete mode 100644 DiscoBot/DSA_Game/Characters/Being.cs delete mode 100644 DiscoBot/DSA_Game/Characters/Combatant.cs delete mode 100644 DiscoBot/DSA_Game/Characters/Entity.cs (limited to 'DiscoBot') diff --git a/DiscoBot/DSA_Game/Characters/Being.cs b/DiscoBot/DSA_Game/Characters/Being.cs deleted file mode 100644 index 154e69e..0000000 --- a/DiscoBot/DSA_Game/Characters/Being.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace DiscoBot.DSA_Game.Characters -{ - public class Being : Entity - { - public int Lebenspunkte_Basis { get; set; } = 30; - - public int Lebenspunkte_Aktuell { get; set; } = 30; - - public int Ausdauer_Basis { get; set; } = 30; - - public int Ausdauer_Aktuell { get; set; } = 30; - - public int Astralpunkte_Basis { get; set; } = 0; - - public int Astralpunkte_Aktuell { get; set; } = 0; - } -} diff --git a/DiscoBot/DSA_Game/Characters/Character.cs b/DiscoBot/DSA_Game/Characters/Character.cs index c2d14eb..6616a03 100644 --- a/DiscoBot/DSA_Game/Characters/Character.cs +++ b/DiscoBot/DSA_Game/Characters/Character.cs @@ -9,7 +9,7 @@ using DiscoBot.Audio; using DiscoBot.Auxiliary; - public class Character : Being, ICharacter + public class Character : ICharacter { public Character() { @@ -61,6 +61,19 @@ this.Post_process(); // calculate derived values } + public string Name { get; set; } // char name + + public int Lebenspunkte_Basis { get; set; } + public int Lebenspunkte_Aktuell { get; set; } + + public int Astralpunkte_Basis { get; set; } + public int Astralpunkte_Aktuell { get; set; } + + public int Ausdauer_Basis { get; set; } + public int Ausdauer_Aktuell { get; set; } + + + public Dictionary Eigenschaften { get; set; } = new Dictionary(); // char properties public List Talente { get; set; } = new List(); // list of talent objects (talents) diff --git a/DiscoBot/DSA_Game/Characters/Combatant.cs b/DiscoBot/DSA_Game/Characters/Combatant.cs deleted file mode 100644 index a99bff9..0000000 --- a/DiscoBot/DSA_Game/Characters/Combatant.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace DiscoBot.DSA_Game.Characters -{ - public interface ICombatant - { - string Name { get; set; } - - int Lebenspunkte_Basis { get; set; } - int Lebenspunkte_Aktuell { get; set; } - - int Ausdauer_Basis { get; set; } - int Ausdauer_Aktuell { get; set; } - - int Astralpunkte_Basis { get; set; } - int Astralpunkte_Aktuell { get; set; } - - string Angriff(string talent, int erschwernis = 0); - - string Parade(string talent, int erschwernis = 0); - } -} diff --git a/DiscoBot/DSA_Game/Characters/Entity.cs b/DiscoBot/DSA_Game/Characters/Entity.cs deleted file mode 100644 index f8e7a12..0000000 --- a/DiscoBot/DSA_Game/Characters/Entity.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace DiscoBot.DSA_Game.Characters -{ - public class Entity - { - public string Name { get; set; } - - public override string ToString() - { - return this.Name; - } - } -} diff --git a/DiscoBot/DSA_Game/Characters/ICharacter.cs b/DiscoBot/DSA_Game/Characters/ICharacter.cs index aabebe6..3ec4258 100644 --- a/DiscoBot/DSA_Game/Characters/ICharacter.cs +++ b/DiscoBot/DSA_Game/Characters/ICharacter.cs @@ -1,11 +1,28 @@ namespace DiscoBot.DSA_Game.Characters { - public interface ICharacter : ICombatant + public interface ICharacter { + string Name { get; set; } + + int Lebenspunkte_Basis { get; set; } + int Lebenspunkte_Aktuell { get; set; } + + int Ausdauer_Basis { get; set; } + int Ausdauer_Aktuell { get; set; } + + int Astralpunkte_Basis { get; set; } + int Astralpunkte_Aktuell { get; set; } + + //int Karmapunkte { get; set; } + string TestTalent(string talent, int erschwernis = 0); string TestEigenschaft(string eigenschaft, int erschwernis = 0); + string Angriff(string talent, int erschwernis = 0); + + string Parade(string talent, int erschwernis = 0); + string Fernkampf(string talent, int erschwernis = 0); string TestZauber(string waffe, int erschwernis); diff --git a/DiscoBot/DSA_Game/Characters/NPC.cs b/DiscoBot/DSA_Game/Characters/NPC.cs index c135e30..0894df6 100644 --- a/DiscoBot/DSA_Game/Characters/NPC.cs +++ b/DiscoBot/DSA_Game/Characters/NPC.cs @@ -5,7 +5,7 @@ using DiscoBot.Auxiliary; using DiscoBot.DSA_Game.Characters; - public class Npc : Being, ICharacter + public class Npc : ICharacter { private readonly int mean, stDv; @@ -16,6 +16,17 @@ this.Name = name; } + public string Name { get; set; } + + public int Lebenspunkte_Basis { get; set; } + public int Lebenspunkte_Aktuell { get; set; } + + public int Astralpunkte_Basis { get; set; } + public int Astralpunkte_Aktuell { get; set; } + + public int Ausdauer_Basis { get; set; } + public int Ausdauer_Aktuell { get; set; } + public string TestTalent(string talent, int tap = 3) { for (int i = 0; i <= 2; i++) diff --git a/DiscoBot/DiscoBot.csproj b/DiscoBot/DiscoBot.csproj index efadae4..e0f8668 100644 --- a/DiscoBot/DiscoBot.csproj +++ b/DiscoBot/DiscoBot.csproj @@ -104,10 +104,7 @@ - - - -- cgit v1.2.3-54-g00ecf