0ad/binaries/data/mods/public/language/test/functions.js
Wijitmaker 34f1817869 Splitting Internal with Public
This was SVN commit r6391.
2008-09-18 04:38:42 +00:00

15 lines
No EOL
802 B
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function number(n, object) {
var word = lookup("nouns", object);
if (! word) // the word couldn't be found in the dictionary
return n+" "+object;
if (n == 1)
return n+" "+word.singular;
else
return n+" "+word.plural;
}
function test1(creature, num_d, num_i, obj, amnt) {
return num_d+"+"+num_i+"="+(num_d*1+num_i)+". An "+creature+" buys a "+obj+" for "+amnt;
}