use templates to prettyify things!

This commit is contained in:
Jan Petykiewicz 2017-04-06 18:23:39 -07:00
parent 8bdba90edb
commit 85b399e0bd

View File

@ -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;