[begin mode view]
[
"<p>Day <b>" & _priority & "</b>: ";
b = split(_body, " ");
res = replace(b[0], "_", " ");
act = b[1];
amount = float(b[2]);
comment = concat(slice(b, 3), " ");
if(comment != "") {[comment] } else {[
var flubs = list(
"Artamo died of dysentery.",
"Artamo died of cholera.",
"Artamo died of a snakebite.",
"Artamo drowned while fording a river.",
"Artamo died of typhoid.",
"Artamo died of syphilis.",
"Artamo is to blame.",
"Artamo was trampled by stampeding feastbeasts.",
"No sign of Snuffles yet.",
"The time for revenge is soon.",
"Does anyone really trust Artamo any more?",
"Sole lied to us.",
"Someone moved our bags in the middle of the night.",
"It's worse than we thought.",
"Artamo was beaten to death for not paying his bar tab. His last words were, \"What are you going to do, beat me to death? Metzli, let's get out of here. Metzli? METZLI!\""
);
if(rand(10) < 1.0)
"<em>" & flubs[int(rand(count(flubs)))] & "</em> ";
]};
if(act == "set") {[
if(amount == 1.0) {[
last_letter = substr(res, -1, 1);
if(last_letter == "s")
res = substr(res, 0, -1);
]};
]
We now have [amount] [res].
} else if(act == "accumulation") {[
if((amount == 1.0) || ((0 - amount) == 1)) {[
last_letter = substr(res, -1, 1);
if(last_letter == "s")
res = substr(res, 0, -1);
]};
if(amount >= 0)
{We are now gaining <b>[amount] [res]</b> per day.}
else if(amount < 0)
{We are now losing <b>[0 - amount] [res]</b> per day.}
]} else if(act == "add") {[
if(amount >= 0)
{We have gained <b>[amount] [res]</b>.}
else if(amount < 0)
{We have lost <b>[0 - amount] [res]</b>.}
]} else if(act == "growth") {
Our <b>[res]</b> now grows by <b>[int((100.0 * amount) + 0.5 - 100)]%</b> per day.
};
if(can_edit()) { <a href="/?id=[_id]&mode=edit">(edit)</a>};
if(can_direct()) { <a href="/?id=[_id]&mode=delete_submit">(delete)</a>};
"</p>";
]
[end mode view]