From d63ffc58db0f032cf7573b2a8a7720de2d5050ab Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Sun, 3 Jun 2018 23:16:17 +0200 Subject: -General restructuring -seperated talents and spells --- DiscoBot/Characters/NPC.cs | 109 --------------------------------------------- 1 file changed, 109 deletions(-) delete mode 100644 DiscoBot/Characters/NPC.cs (limited to 'DiscoBot/Characters/NPC.cs') diff --git a/DiscoBot/Characters/NPC.cs b/DiscoBot/Characters/NPC.cs deleted file mode 100644 index 341f775..0000000 --- a/DiscoBot/Characters/NPC.cs +++ /dev/null @@ -1,109 +0,0 @@ -namespace DiscoBot.Characters -{ - using System; - - using DiscoBot.Auxiliary; - - public class Npc : ICharacter - { - private readonly int mean, stDv; - - public Npc(string name, int mean, int stDv) - { - this.mean = mean; - this.stDv = stDv; - this.Name = name; - } - - public string Name { get; set; } - - public int Lebenspunkte { get; set; } - - public string TestTalent(string talent, int tap = 3) - { - for (int i = 0; i <= 2; i++) - { - // foreach property, dice and tap - int temp = Dice.Roll(); - int eigenschaft = (int)Math.Round(RandomMisc.Random(this.stDv, this.mean)); - - if (eigenschaft < temp) - { - tap -= temp - eigenschaft; - } - } - - if (tap >= 0) - { - return $"{this.Name} vollführt {talent} erfolgreich"; - } - - - return $"{this.Name} scheitert an {talent}"; - } - - public string TestEigenschaft(string eigenschaft, int erschwernis = 0) - { - int temp = Dice.Roll(); - int prop = (int)Math.Round(RandomMisc.Random(this.stDv, this.stDv)); - - if (temp + erschwernis < prop) - { - return $"{this.Name} vollführt {eigenschaft} erfolgreich"; - } - - return $"{this.Name} scheitert an {eigenschaft}"; - } - - public string Angriff(string waffe, int erschwernis = 0) - { - int temp = Dice.Roll(); - - if (temp == 1) - { - return $"{this.Name} greift kritisch mit {waffe} an"; - } - - if (temp < erschwernis) - { - return $"{this.Name} greift mit {waffe} an"; - } - - return $"{this.Name} haut mit {waffe} daneben"; - } - - public string Parade(string waffe, int erschwernis = 0) - { - int temp = Dice.Roll(); - - if (temp == 1) - { - return $"{this.Name} pariert mit {waffe} meisterlich"; - } - - if (temp < erschwernis) - { - return $"{this.Name} pariert mit {waffe} an"; - } - - return $"{this.Name} schafft es nicht mit {waffe} zu parieren"; - } - - public string Fernkampf(string waffe, int erschwernis = 0) - { - int temp = Dice.Roll(); - - if (temp == 1) - { - return $"{this.Name} trifft kritisch mit {waffe}"; - } - - if (temp < erschwernis) - { - return $"{this.Name} greift mit {waffe} an"; - } - - return $"{this.Name} schießt mit {waffe} daneben"; - } - } -} -- cgit v1.2.3-70-g09d2