diff options
author | uzvkl <dennis.kobert@student.kit.edu> | 2019-06-11 23:05:52 +0200 |
---|---|---|
committer | uzvkl <dennis.kobert@student.kit.edu> | 2019-06-11 23:05:52 +0200 |
commit | e6181c24124d97f2fbc932b8a68311e625463156 (patch) | |
tree | c1f097c344ca266b7941c9668590b0fd35c7870a /DSALib/DSA_Game/Characters/NPC.cs | |
parent | 2490ad5d31fe2ac778ff9303776f0e91f47a2862 (diff) |
Move dsa related stuff to subfolder
Diffstat (limited to 'DSALib/DSA_Game/Characters/NPC.cs')
-rw-r--r-- | DSALib/DSA_Game/Characters/NPC.cs | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/DSALib/DSA_Game/Characters/NPC.cs b/DSALib/DSA_Game/Characters/NPC.cs deleted file mode 100644 index 105adda..0000000 --- a/DSALib/DSA_Game/Characters/NPC.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using DSALib.Auxiliary; -using DSALib.Characters; - -namespace 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; - Name = name; - } - - public string TestTalent(string talent, int tap = 3) - { - for (var i = 0; i <= 2; i++) - { - // foreach property, dice and tap - var temp = Dice.Roll(); - var eigenschaft = (int) Math.Round(RandomMisc.Random(stDv, mean)); - - if (eigenschaft < temp) tap -= temp - eigenschaft; - } - - if (tap >= 0) return $"{Name} vollführt {talent} erfolgreich"; - - - return $"{Name} scheitert an {talent}"; - } - - public string TestEigenschaft(string eigenschaft, int erschwernis = 0) - { - var temp = Dice.Roll(); - var prop = (int) Math.Round(RandomMisc.Random(stDv, stDv)); - - if (temp + erschwernis < prop) return $"{Name} vollführt {eigenschaft} erfolgreich"; - - return $"{Name} scheitert an {eigenschaft}"; - } - - public string Angriff(string waffe, int erschwernis = 0) - { - var temp = Dice.Roll(); - - if (temp == 1) return $"{Name} greift kritisch mit {waffe} an"; - - if (temp < erschwernis) return $"{Name} greift mit {waffe} an"; - - return $"{Name} haut mit {waffe} daneben"; - } - - public string Parade(string waffe, int erschwernis = 0) - { - var temp = Dice.Roll(); - - if (temp == 1) return $"{Name} pariert mit {waffe} meisterlich"; - - if (temp < erschwernis) return $"{Name} pariert mit {waffe} an"; - - return $"{Name} schafft es nicht mit {waffe} zu parieren"; - } - - public string Fernkampf(string waffe, int erschwernis = 0) - { - var temp = Dice.Roll(); - - if (temp == 1) return $"{Name} trifft kritisch mit {waffe}"; - - if (temp < erschwernis) return $"{Name} greift mit {waffe} an"; - - return $"{Name} schießt mit {waffe} daneben"; - } - - public string TestZauber(string zauber, int erschwernis) - { - return TestTalent(zauber, erschwernis); - } - } -}
\ No newline at end of file |