don't let it go under 0
This commit is contained in:
parent
ad707cf9d4
commit
7245991cd1
1 changed files with 5 additions and 3 deletions
|
@ -87,13 +87,15 @@ class borgarCommand extends Command {
|
||||||
message.reply(`u won bro,,,, that's kinda epic if i do say so myself\n**you gained ${xp} xp. you now have ${totalXP} xp**`);
|
message.reply(`u won bro,,,, that's kinda epic if i do say so myself\n**you gained ${xp} xp. you now have ${totalXP} xp**`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let totalXP = curxp - xp;
|
let totalXP;
|
||||||
body = {userID: message.author.id, level: level, xp: totalXP};
|
if (curxp <= 0) {
|
||||||
if (curxp == 0) {
|
|
||||||
message.reply(`you failed noob... you were supposed to make **${hamIngredient}**`);
|
message.reply(`you failed noob... you were supposed to make **${hamIngredient}**`);
|
||||||
|
totalXP = 0;
|
||||||
} else {
|
} else {
|
||||||
message.reply(`you failed noob... you were supposed to make **${hamIngredient}**\n**you lost ${xp} xp. you now have ${totalXP} xp**`);
|
message.reply(`you failed noob... you were supposed to make **${hamIngredient}**\n**you lost ${xp} xp. you now have ${totalXP} xp**`);
|
||||||
|
totalXP = curxp - xp;
|
||||||
}
|
}
|
||||||
|
body = {userID: message.author.id, level: level, xp: totalXP};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curxp == 0) {
|
if (curxp == 0) {
|
||||||
|
|
Loading…
Reference in a new issue