Anpassung Befehle und Roll darstellung
This commit is contained in:
@ -21,9 +21,9 @@ public class balance extends ListenerAdapter {
|
||||
|
||||
|
||||
public balance() {
|
||||
this.prefixPromote = "!konto";
|
||||
this.prefixDegradation = "!pay ";
|
||||
this.prefixDetail = "!detail";
|
||||
this.prefixPromote = "/konto";
|
||||
this.prefixDegradation = "/pay ";
|
||||
this.prefixDetail = "/detail";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -23,9 +23,9 @@ public class dice extends ListenerAdapter {
|
||||
|
||||
|
||||
public dice() {
|
||||
this.prefixSr = "!sr";
|
||||
this.prefixTest = "!rollTest";
|
||||
this.prefixZitat = "!zitat";
|
||||
this.prefixSr = "/sr";
|
||||
this.prefixTest = "/rollTest";
|
||||
this.prefixZitat = "/zitat";
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -125,7 +125,6 @@ public class dice extends ListenerAdapter {
|
||||
|
||||
int hits = 0;
|
||||
boolean glitches = false;
|
||||
boolean critGlitches = false;
|
||||
|
||||
boolean edge = false;
|
||||
|
||||
@ -145,6 +144,7 @@ public class dice extends ListenerAdapter {
|
||||
try {
|
||||
diceart = Integer.parseInt(diceInterpreter[1]);
|
||||
numberOfDice = Integer.parseInt(diceInterpreter[0]);
|
||||
verteilung = new int[diceart];
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
event.getChannel().sendMessage(event.getMember().getAsMention() + " Irgent was dummes ist passiert beim Verstehen von " + MsgParts[1].trim().toLowerCase()).queue();
|
||||
@ -194,51 +194,38 @@ public class dice extends ListenerAdapter {
|
||||
hits++;
|
||||
}
|
||||
verteilung[dice1]++;
|
||||
if((dice1 >= 4) || (dice1 == 0))
|
||||
result.append("**" + (dice1+1) + "**");
|
||||
else
|
||||
result.append(dice1+1);
|
||||
result.append(" ");
|
||||
}
|
||||
if (verteilung[0] >= (numberOfDice+bonusEdegeDice)/2 && verteilung[0] > 0) {
|
||||
if (verteilung[0] >= (numberOfDice+bonusEdegeDice)/2f) {
|
||||
glitches = true;
|
||||
}
|
||||
|
||||
|
||||
if(hits == 0) {
|
||||
if(hits == 0 && glitches == false) { // kein Erfolg, kein Patzer
|
||||
outputBox.setColor(Color.gray);
|
||||
}
|
||||
else if(hits == 0 && glitches == true) { // kriischer Patzer
|
||||
outputBox.setColor(Color.red);
|
||||
if(glitches == true) {
|
||||
outputBox.setDescription("**Kritischer Patzer** :,(");
|
||||
}
|
||||
else {
|
||||
outputBox.setDescription("**nicht geschafft**");
|
||||
}
|
||||
}
|
||||
else if(glitches == true) {
|
||||
else if(glitches == true) { // Patzer
|
||||
outputBox.setColor(Color.yellow);
|
||||
outputBox.setDescription("**Patzer** :(");
|
||||
}
|
||||
else {
|
||||
else { // Efolg
|
||||
outputBox.setColor(Color.green);
|
||||
if(hits == 1) {
|
||||
outputBox.setDescription("**" + String.valueOf(hits) + " Erfolg**");
|
||||
}
|
||||
else if(hits < 4) {
|
||||
outputBox.setDescription("**" + String.valueOf(hits) + " Erfolge**");
|
||||
}
|
||||
else if(hits < 6) {
|
||||
outputBox.setDescription("**" + String.valueOf(hits) + " Erfolge**, das ist schon ordentlich");
|
||||
}
|
||||
else if(hits < 10) {
|
||||
outputBox.setDescription("**" + String.valueOf(hits) + " Erfolge**, WOW sowas mal nachmachen");
|
||||
}
|
||||
else {
|
||||
outputBox.setDescription("**" + String.valueOf(hits) + " Erfolge**, bist du Wahnsinnig?");
|
||||
}
|
||||
}
|
||||
|
||||
outputBox.setTitle(event.getMember().getEffectiveName() + " dein Wurf " + MsgParts[1] + " ergibt:");
|
||||
String zusatz = "";
|
||||
if(bonusEdegeDice > 0) {
|
||||
zusatz = " + " + bonusEdegeDice + "d" + diceart;
|
||||
}
|
||||
outputBox.setTitle(event.getMember().getEffectiveName() + " " + numberOfDice + "d" + diceart + zusatz+ ":\tErfolge: " + String.valueOf(hits)+ "\tMisserfolge: " + String.valueOf(verteilung[0]));
|
||||
|
||||
outputBox.addField("Erfolge", String.valueOf(hits), true);
|
||||
outputBox.addField("Misserfolge", String.valueOf(verteilung[0]), true);
|
||||
outputBox.addField("Ergbenise", result.toString(), false);
|
||||
|
||||
outputBox.setDescription("(" + result.toString().trim() + ")");
|
||||
|
||||
for(int i = 0; i < diceart; i++) {
|
||||
float pro = verteilung[i]*100f/numberOfDice;
|
||||
@ -263,7 +250,7 @@ public class dice extends ListenerAdapter {
|
||||
|
||||
quotes[0] = "*quiek quiek quiek*";
|
||||
quotes[1] = "" +
|
||||
"(\\\\_____/)\n" +
|
||||
"(\\\\______/)\n" +
|
||||
"( ͡ ͡° ͜ ʖ ͡ ͡°) *snuff snuff*\n" +
|
||||
"\\\\╭☞ \\\\╭☞\n" +
|
||||
"";
|
||||
|
||||
Reference in New Issue
Block a user