use templates to prettyify things!

master
Jan Petykiewicz 7 years ago
parent 8bdba90edb
commit 85b399e0bd

@ -28,19 +28,19 @@ function handleMoonslicer(message) {
var old_text = textarea.value;
if (hit0 == 20 || hit1 == 20) {
textarea.value = "20! +[[1d6]] ice";
textarea.value = "&{template:desc} {{desc=20! +[[1d6]] ice}}";
submit_button.click();
}
if (hit0 == 19 || hit1 == 19) {
textarea.value = "19! +[[1d4]] ice";
textarea.value = "&{template:desc} {{desc=19! +[[1d4]] ice}}";
submit_button.click();
}
if (hit0 == 2 || hit1 == 2) {
textarea.value = "2! [[floor(1d4/2)]] ice to self";
textarea.value = "&{template:desc} {{desc=2! [[floor(1d4/2)]] ice to self}}";
submit_button.click();
}
if (hit0 == 1 || hit1 == 1) {
textarea.value = "1! [[1d6]] ice to self";
textarea.value = "&{template:desc} {{desc=1! [[1d6]] ice to self}}";
submit_button.click();
}
textarea.value = old_text;

Loading…
Cancel
Save