From e5e0c1c5c9fb6afd68ebe9dc075af23f46f11e25 Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Wed, 11 Apr 2018 14:41:01 +0200 Subject: General Cleanup and retructuring --- DiscoBot/Characters/Character.cs | 11 ++++++----- DiscoBot/Characters/NPC.cs | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'DiscoBot/Characters') diff --git a/DiscoBot/Characters/Character.cs b/DiscoBot/Characters/Character.cs index 6884eaf..9d84fa8 100644 --- a/DiscoBot/Characters/Character.cs +++ b/DiscoBot/Characters/Character.cs @@ -6,6 +6,7 @@ using System.Text; using System.Xml; + using DiscoBot.Audio; using DiscoBot.Auxiliary; public class Character : ICharacter @@ -33,22 +34,22 @@ this.Name = name; foreach (var i in c.Eigenschaften) { - this.Eigenschaften.Add(i.Key, i.Value + (int)Math.Round(Misc.Random(stDv))); + this.Eigenschaften.Add(i.Key, i.Value + (int)Math.Round(RandomMisc.Random(stDv))); } foreach (var i in c.Vorteile) { - this.Vorteile.Add(new Vorteil(i.Name, i.Value + (int)Math.Round(Misc.Random(stDv)))); + this.Vorteile.Add(new Vorteil(i.Name, i.Value + (int)Math.Round(RandomMisc.Random(stDv)))); } foreach (var i in c.Talente) { - this.Talente.Add(new Talent(i.Name, i.Probe, i.Value + (int)Math.Round(Misc.Random(stDv)))); + this.Talente.Add(new Talent(i.Name, i.Probe, i.Value + (int)Math.Round(RandomMisc.Random(stDv)))); } foreach (var i in c.Kampftalente) { - this.Kampftalente.Add(new KampfTalent(i.Name, i.At + (int)Math.Round(Misc.Random(stDv)), i.Pa + (int)Math.Round(Misc.Random(stDv)))); + this.Kampftalente.Add(new KampfTalent(i.Name, i.At + (int)Math.Round(RandomMisc.Random(stDv)), i.Pa + (int)Math.Round(RandomMisc.Random(stDv)))); } } @@ -80,7 +81,7 @@ return $"{this.Name} kann nicht {talent}..."; } - var props = tTalent.Test(); // get the required properties + var props = tTalent.GetEigenschaften(); // get the required properties int tap = tTalent.Value; // get taw var werte = props.Select(p => this.Eigenschaften[this.PropTable[p]]).ToList(); diff --git a/DiscoBot/Characters/NPC.cs b/DiscoBot/Characters/NPC.cs index f399a70..341f775 100644 --- a/DiscoBot/Characters/NPC.cs +++ b/DiscoBot/Characters/NPC.cs @@ -25,7 +25,7 @@ { // foreach property, dice and tap int temp = Dice.Roll(); - int eigenschaft = (int)Math.Round(Misc.Random(this.stDv, this.mean)); + int eigenschaft = (int)Math.Round(RandomMisc.Random(this.stDv, this.mean)); if (eigenschaft < temp) { @@ -45,7 +45,7 @@ public string TestEigenschaft(string eigenschaft, int erschwernis = 0) { int temp = Dice.Roll(); - int prop = (int)Math.Round(Misc.Random(this.stDv, this.stDv)); + int prop = (int)Math.Round(RandomMisc.Random(this.stDv, this.stDv)); if (temp + erschwernis < prop) { -- cgit v1.2.3-70-g09d2