diff options
author | natrixaeria <janng@gmx.de> | 2019-05-19 17:40:59 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-05-19 17:40:59 +0200 |
commit | 1509b5ef3d7e9e71d9294e234ec0e39f2d831998 (patch) | |
tree | 78300ffff230958101b422a4e6026925b287822f /DiscoBot/DSA_Game/Characters/NPC.cs | |
parent | c3bb858bb54dc8c64bbd48054c2c58dc0073f09c (diff) | |
parent | c4d046858e0822b7c2c540ac2368b2c0e88e7a26 (diff) |
Merge branch 'scribble' of https://github.com/TrueDoctor/DiscoBot into scribble
Diffstat (limited to 'DiscoBot/DSA_Game/Characters/NPC.cs')
-rw-r--r-- | DiscoBot/DSA_Game/Characters/NPC.cs | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/DiscoBot/DSA_Game/Characters/NPC.cs b/DiscoBot/DSA_Game/Characters/NPC.cs deleted file mode 100644 index b1b8e82..0000000 --- a/DiscoBot/DSA_Game/Characters/NPC.cs +++ /dev/null @@ -1,112 +0,0 @@ -namespace DiscoBot.Characters -{ - using System; - - using DiscoBot.Auxiliary; - using DiscoBot.DSA_Game.Characters; - using DSALib.Characters; - - public class Npc : Being, 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 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"; - } - - public string TestZauber(string zauber, int erschwernis) - { - return TestTalent(zauber, erschwernis); - } - } -} |