summaryrefslogtreecommitdiff
path: root/DiscoBot/Commands
diff options
context:
space:
mode:
authorTrueDoctor <d-kobert@web.de>2018-06-18 11:39:41 +0200
committerTrueDoctor <d-kobert@web.de>2018-06-18 11:39:41 +0200
commit68e49d3b0936101deba1251e95b9788716c0722a (patch)
tree431d8b26148505ad8b5584fd9e7c2db644bcba15 /DiscoBot/Commands
parentba1f440d0762ab77cd3f08734043df7db5b4329e (diff)
reworked Properties, to split each fiel into a different File
Diffstat (limited to 'DiscoBot/Commands')
-rw-r--r--DiscoBot/Commands/Gm.cs11
-rw-r--r--DiscoBot/Commands/HeldList.cs2
-rw-r--r--DiscoBot/Commands/Help.cs4
-rw-r--r--DiscoBot/Commands/LebenUndAstral.cs4
-rw-r--r--DiscoBot/Commands/ProbenTest.cs16
5 files changed, 17 insertions, 20 deletions
diff --git a/DiscoBot/Commands/Gm.cs b/DiscoBot/Commands/Gm.cs
index 7fe858c..1ff0286 100644
--- a/DiscoBot/Commands/Gm.cs
+++ b/DiscoBot/Commands/Gm.cs
@@ -20,7 +20,7 @@
if (givenName.Length == 0 || (givenName.Length == 1 && (givenName[0].ToLower().Equals("bin") || givenName[0].ToLower().Equals("am"))))
{
- res = " \nDu bist " + Dsa.Relation[this.Context.User.Username] + "!\n \n";
+ res = " \nDu bist " + Dsa.Session.Relation[this.Context.User.Username] + "!\n \n";
return this.ReplyAsync("```xl\n" + res + "\n```");
}
@@ -41,11 +41,8 @@
}
var character = Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(name, x.Name)).First(); // usage of compareEasy
-
-
-
- Dsa.Relation[this.Context.User.Username] = character.Name;
+ Dsa.Session.Relation[this.Context.User.Username] = character.Name;
res = " \nWillkommen " + character.Name + "!\n \n";
@@ -103,7 +100,7 @@
temp = erschwernis.ToString();
}
- res = Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(Dsa.Relation[this.Context.User.Username], x.Name)).First().get_LE_Text(waffe.Trim() + temp);
+ res = Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(Dsa.Session.Relation[this.Context.User.Username], x.Name)).First().get_LE_Text(waffe.Trim() + temp);
break;
case "ae":
@@ -117,7 +114,7 @@
temp = erschwernis.ToString();
}
- res = Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(Dsa.Relation[this.Context.User.Username], x.Name)).First().get_AE_Text(waffe.Trim() + temp);
+ res = Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(Dsa.Session.Relation[this.Context.User.Username], x.Name)).First().get_AE_Text(waffe.Trim() + temp);
break;
default:
diff --git a/DiscoBot/Commands/HeldList.cs b/DiscoBot/Commands/HeldList.cs
index d1b25be..ab4e794 100644
--- a/DiscoBot/Commands/HeldList.cs
+++ b/DiscoBot/Commands/HeldList.cs
@@ -21,7 +21,7 @@
{
var res = new List<string>();
- var character = ((Character)Dsa.Chars.Find(x => x.Name.Equals(Dsa.Relation[this.Context.User.Username])));
+ var character = ((Character)Dsa.Chars.Find(x => x.Name.Equals(Dsa.Session.Relation[this.Context.User.Username])));
int first_column_width = 18;
diff --git a/DiscoBot/Commands/Help.cs b/DiscoBot/Commands/Help.cs
index bf58070..aa168fc 100644
--- a/DiscoBot/Commands/Help.cs
+++ b/DiscoBot/Commands/Help.cs
@@ -46,14 +46,14 @@ namespace DiscoBot.Commands
public static string Get_Specific_Help(string command)
{
// return command specific help
- var com = Dsa.Properties.CommandInfos.OrderBy(x => SpellCorrect.CompareEasy(x.Name, command.ToLower())).First(); // get best fit command
+ var com = DSA_Game.Save.Properties.CommandInfos.OrderBy(x => SpellCorrect.CompareEasy(x.Name, command.ToLower())).First(); // get best fit command
return com.GetDescription();
}
public static string Get_Generic_Help()
{
string res = "";
- foreach (var com in Dsa.Properties.CommandInfos)
+ foreach (var com in DSA_Game.Save.Properties.CommandInfos)
{
int first_column_width = 8;
res += ("!" + com.Name + ": ").AddSpaces(first_column_width) + com.Brief;
diff --git a/DiscoBot/Commands/LebenUndAstral.cs b/DiscoBot/Commands/LebenUndAstral.cs
index 86fe6f2..2b5e8f1 100644
--- a/DiscoBot/Commands/LebenUndAstral.cs
+++ b/DiscoBot/Commands/LebenUndAstral.cs
@@ -31,7 +31,7 @@
//Get the actual text
- res += Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(Dsa.Relation[this.Context.User.Username], x.Name)).First().get_LE_Text(prop);
+ res += Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(Dsa.Session.Relation[this.Context.User.Username], x.Name)).First().get_LE_Text(prop);
await this.ReplyAsync("```xl\n" + res + "\n```");
@@ -59,7 +59,7 @@
//Get the actual text
- res += Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(Dsa.Relation[this.Context.User.Username], x.Name)).First().get_AE_Text(prop);
+ res += Dsa.Chars.OrderBy(x => SpellCorrect.CompareEasy(Dsa.Session.Relation[this.Context.User.Username], x.Name)).First().get_AE_Text(prop);
diff --git a/DiscoBot/Commands/ProbenTest.cs b/DiscoBot/Commands/ProbenTest.cs
index e14d5a4..9614b7c 100644
--- a/DiscoBot/Commands/ProbenTest.cs
+++ b/DiscoBot/Commands/ProbenTest.cs
@@ -16,7 +16,7 @@
try
{
res = Gm.CheckCommand(
- Dsa.Relation[this.Context.User.Username],
+ Dsa.Session.Relation[this.Context.User.Username],
CommandTypes.Talent,
talent,
erschwernis);
@@ -24,7 +24,7 @@
catch
{
res = Gm.CheckCommand(
- Dsa.Relation["Tardis"],
+ Dsa.Session.Relation["Tardis"],
CommandTypes.Talent,
talent,
erschwernis);
@@ -41,7 +41,7 @@
try
{
res = Gm.CheckCommand(
- Dsa.Relation[this.Context.User.Username],
+ Dsa.Session.Relation[this.Context.User.Username],
CommandTypes.Zauber,
zauber,
erschwernis);
@@ -49,7 +49,7 @@
catch
{
res = Gm.CheckCommand(
- Dsa.Relation["Tardis"],
+ Dsa.Session.Relation["Tardis"],
CommandTypes.Zauber,
zauber,
erschwernis);
@@ -62,7 +62,7 @@
[Alias("E", "Eigenschaft", "eigenschaft", "eigen")]
public Task EigenschaftAsync([Summary("Eigenschaftskürzel und Erschwernis")] string talent, int erschwernis = 0)
{
- var chr = Dsa.Chars.Find(x => x.Name.Equals(Dsa.Relation[this.Context.User.Username]));
+ var chr = Dsa.Chars.Find(x => x.Name.Equals(Dsa.Session.Relation[this.Context.User.Username]));
string res = chr.TestEigenschaft(talent, erschwernis);
return this.ReplyAsync("```xl\n" + res + "\n```");
}
@@ -71,21 +71,21 @@
[Alias("A", "At", "at", "Angriff", "angriff", "attackiere_mit", "attacke", "Attacke")]
public Task AngriffAsync([Summary("Weapon")] string weapon, int erschwernis = 0)
{
- return this.ReplyAsync("```xl\n" + Dsa.Chars.Find(x => x.Name.Equals(Dsa.Relation[this.Context.User.Username])).Angriff(weapon, erschwernis) + "\n```");
+ return this.ReplyAsync("```xl\n" + Dsa.Chars.Find(x => x.Name.Equals(Dsa.Session.Relation[this.Context.User.Username])).Angriff(weapon, erschwernis) + "\n```");
}
[Command("p"), Summary("Würfelt eine Parade Probe")]
[Alias("P", "Parade", "parade", "pariere_mit")]
public Task ParadeAsync([Summary("Parade Weapon")] string talent, int erschwernis = 0)
{
- return this.ReplyAsync("```xl\n" + Dsa.Chars.Find(x => x.Name.Equals(Dsa.Relation[this.Context.User.Username])).Parade(talent, erschwernis) + "\n```");
+ return this.ReplyAsync("```xl\n" + Dsa.Chars.Find(x => x.Name.Equals(Dsa.Session.Relation[this.Context.User.Username])).Parade(talent, erschwernis) + "\n```");
}
[Command("f"), Summary("Führt eine Fernkampfprobe aus")]
[Alias("F", "fern", "Fern", "Schuss", "schuss", "fernkampf", "Fernkampf", "schieße", "schieße_mit")]
public Task FernkampfAsync([Summary("Fernkampfwaffe")] string waffe, int erschwernis = 0)
{
- return this.ReplyAsync("```xl\n" + Dsa.Chars.Find(x => x.Name.Equals(Dsa.Relation[this.Context.User.Username])).Fernkampf(waffe, erschwernis) + "\n```");
+ return this.ReplyAsync("```xl\n" + Dsa.Chars.Find(x => x.Name.Equals(Dsa.Session.Relation[this.Context.User.Username])).Fernkampf(waffe, erschwernis) + "\n```");
}
}
}