try change #pyu

hash-command-arbitrary
Avril 4 years ago
parent 47f794f2ad
commit bcc947c4db
Signed by untrusted user: flanchan
GPG Key ID: 284488987C31F630

@ -404,7 +404,7 @@ OS.karada = function (body) {
return output; return output;
} }
var dice_re = /(#tea|#dame|#tutturu|#muri|#flip|#when|#du|#pyu|#pcount|#test|#sleep|#janken|#8ball|#imfey|#\?(?:\[(?:\w,*)+\])?|#\d{0,2}d\d{1,4}(?:[+-]\d{1,4})?)/i; var dice_re = /(#tea|#dame|#tutturu|#muri|#flip|#when|#du|#fun|#fcount|#test|#sleep|#janken|#8ball|#imfey|#\?(?:\[(?:\w,*)+\])?|#\d{0,2}d\d{1,4}(?:[+-]\d{1,4})?)/i;
exports.dice_re = dice_re; exports.dice_re = dice_re;
var WHEN = [ var WHEN = [
@ -482,7 +482,7 @@ function parse_dice(frag)
} }
return {n:1, faces: j}; return {n:1, faces: j};
} }
if (frag == '#pyu' || frag == '#pcount' || frag == '#du') if (frag == '#fun' || frag == '#fcount' || frag == '#du')
return {n: 1, faces: 2}; return {n: 1, faces: 2};
if (frag == '#tea') if (frag == '#tea')
return {n: 1, faces: 2}; return {n: 1, faces: 2};
@ -556,8 +556,8 @@ function readable_dice(bit, d) {
else else
return '#du (Try asking again)'; return '#du (Try asking again)';
} }
if (bit == '#pyu') if (bit == '#fun')
return '#pyu (' + d[0]+ ')'; return '#fun (' + d[0]+ ')';
if (bit == '#pcount') if (bit == '#pcount')
return '#pcount (' + d[0] + ')'; return '#pcount (' + d[0] + ')';
if (bit == '#tea') if (bit == '#tea')

@ -56,7 +56,7 @@ function getLoli() {
}); });
return ret; return ret;
} }
getLoli(); //getLoli();
//_cds(); //_cds();
exports.roll_dice = function (frag, post, extra) { exports.roll_dice = function (frag, post, extra) {
@ -111,12 +111,12 @@ exports.roll_dice = function (frag, post, extra) {
dice.push([Math.min(morning_session, evening_session)]); dice.push([Math.min(morning_session, evening_session)]);
} }
} }
else if(ms[i] == '#pyu') { else if(ms[i] == '#fun') {
if( dice.length + (post.dice ? post.dice.length : 0) < rollLimit) if( dice.length + (post.dice ? post.dice.length : 0) < rollLimit)
pyu += 1; pyu += 1;
dice.push([pyu]); dice.push([pyu]);
} }
else if(ms[i] == '#pcount') { else if(ms[i] == '#fcount') {
dice.push([pyu]); dice.push([pyu]);
} }
else { else {

Loading…
Cancel
Save