summaryrefslogtreecommitdiff
path: root/DSACore/Commands/LebenUndAstral.cs
diff options
context:
space:
mode:
Diffstat (limited to 'DSACore/Commands/LebenUndAstral.cs')
-rw-r--r--DSACore/Commands/LebenUndAstral.cs56
1 files changed, 30 insertions, 26 deletions
diff --git a/DSACore/Commands/LebenUndAstral.cs b/DSACore/Commands/LebenUndAstral.cs
index b5bc260..a671296 100644
--- a/DSACore/Commands/LebenUndAstral.cs
+++ b/DSACore/Commands/LebenUndAstral.cs
@@ -1,8 +1,6 @@
using System;
-using System.Linq;
-using System.Threading.Tasks;
-using DSACore.DSA_Game;
using DSACore.Auxiliary;
+using DSACore.DSA_Game;
using DSALib.Characters;
namespace DSACore.Commands
@@ -12,9 +10,9 @@ namespace DSACore.Commands
public static string LEAsync(ulong id, string modifier)
{
//This is the string that will be printed
- string res = "";
+ var res = "";
+
-
//Get the actual text
res += Dsa.GetCharacter(id).get_LE_Text(modifier);
@@ -23,17 +21,17 @@ namespace DSACore.Commands
}
}
- public class AE
+ public class AE
{
public static string AEAsync(ulong id, string modifier)
{
//This is the string that will be printed
- string res = "";
+ var res = "";
//Get the actual text
res += Dsa.GetCharacter(id).get_AE_Text(modifier);
-
+
return res;
}
}
@@ -42,11 +40,11 @@ namespace DSACore.Commands
{
public static string get_LE_Text(this ICharacter c, string prop)
{
- string res = "";
+ var res = "";
var comp = new SpellCorrect();
var character = c;
- res += (character.Name + ":\n");
+ res += character.Name + ":\n";
//If there is actual input we process it
if (prop.Length > 0)
@@ -60,15 +58,20 @@ namespace DSACore.Commands
//Allow overflowing the max
if (prop.StartsWith("++"))
{
- character.Lebenspunkte_Aktuell = character.Lebenspunkte_Aktuell + Convert.ToInt32(prop.Substring(1, prop.Length - 1));
+ character.Lebenspunkte_Aktuell = character.Lebenspunkte_Aktuell +
+ Convert.ToInt32(prop.Substring(1, prop.Length - 1));
}
else
{
- int temp = character.Lebenspunkte_Aktuell + Convert.ToInt32(prop) - character.Lebenspunkte_Basis;
+ var temp = character.Lebenspunkte_Aktuell + Convert.ToInt32(prop) -
+ character.Lebenspunkte_Basis;
//Stop from overflow overflow
if (temp > 0 && prop.StartsWith("+"))
{
- character.Lebenspunkte_Aktuell = (character.Lebenspunkte_Basis > character.Lebenspunkte_Aktuell) ? character.Lebenspunkte_Basis : character.Lebenspunkte_Aktuell;
+ character.Lebenspunkte_Aktuell =
+ character.Lebenspunkte_Basis > character.Lebenspunkte_Aktuell
+ ? character.Lebenspunkte_Basis
+ : character.Lebenspunkte_Aktuell;
res += " Maximale Lebenspunkte sind erreicht ";
}
//Simply apply change
@@ -91,23 +94,23 @@ namespace DSACore.Commands
//If no value is passed, the curent value is displayed
else
{
- res += ("LE: " + character.Lebenspunkte_Aktuell + "/" + character.Lebenspunkte_Basis);
+ res += "LE: " + character.Lebenspunkte_Aktuell + "/" + character.Lebenspunkte_Basis;
}
return res;
}
+
public static string get_AE_Text(this ICharacter c, string prop)
{
- string res = "";
+ var res = "";
var comp = new SpellCorrect();
var character = c;
- res += (character.Name + ":\n");
+ res += character.Name + ":\n";
//If there is actual input we process it
if (prop.Length > 0)
{
-
res += "AE: ";
res += character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis + " -> ";
@@ -117,15 +120,20 @@ namespace DSACore.Commands
//Allow overflowing the max
if (prop.StartsWith("++"))
{
- character.Astralpunkte_Aktuell = character.Astralpunkte_Aktuell + Convert.ToInt32(prop.Substring(1, prop.Length - 1));
+ character.Astralpunkte_Aktuell = character.Astralpunkte_Aktuell +
+ Convert.ToInt32(prop.Substring(1, prop.Length - 1));
}
else
{
- int temp = character.Astralpunkte_Aktuell + Convert.ToInt32(prop) - character.Astralpunkte_Basis;
+ var temp = character.Astralpunkte_Aktuell + Convert.ToInt32(prop) -
+ character.Astralpunkte_Basis;
//Stop from overflow overflow
if (temp > 0 && prop.StartsWith("+"))
{
- character.Astralpunkte_Aktuell = (character.Astralpunkte_Basis > character.Astralpunkte_Aktuell) ? character.Astralpunkte_Basis : character.Astralpunkte_Aktuell;
+ character.Astralpunkte_Aktuell =
+ character.Astralpunkte_Basis > character.Astralpunkte_Aktuell
+ ? character.Astralpunkte_Basis
+ : character.Astralpunkte_Aktuell;
res += " Maximale Astralpunkte sind erreicht ";
}
//Simply apply change
@@ -142,7 +150,6 @@ namespace DSACore.Commands
}
res += character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis;
-
}
//Set to new value regardless of original
else
@@ -155,14 +162,11 @@ namespace DSACore.Commands
//If no value is passed, the curent value is displayed
else
{
- res += ("AE: " + character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis);
+ res += "AE: " + character.Astralpunkte_Aktuell + "/" + character.Astralpunkte_Basis;
}
return res;
}
}
-}
-
-
-
+} \ No newline at end of file