diff --git a/phyrexian/index.php b/phyrexian/index.php new file mode 100644 index 00000000..489a34e8 --- /dev/null +++ b/phyrexian/index.php @@ -0,0 +1,38 @@ + + Ask Urza 2.0 +

Phyrexian Text Generator

+ +
+
+
+
Input the text you would like to be "translated"
+ +
+
+
Then copy the "translated" text from here
+ +
+
+
+
+

+ This is not a translator +

+

+ Phyrexian Text Generator simply takes the number of characters that you input and randomizes them into characters that are compatible with Phyrexian fonts. +

+

+ To use the generated text in Card Conjurer, simply copy and paste the output text, but remember to add {fontphyrexian} before it so that the correct font is used! +

+
+ + \ No newline at end of file diff --git a/phyrexian/phyrexian.js b/phyrexian/phyrexian.js new file mode 100644 index 00000000..3acf4280 --- /dev/null +++ b/phyrexian/phyrexian.js @@ -0,0 +1,21 @@ +var randomCharacters = [/*'*',*/ 'N', 'V', 'O', 'A', 'I', 'T', '^', '>', 'M', '<', 'E', 'Q', 'G', 'J', 'L', 'K', 'F', 'H', '"', 'Z', /*'X',*/ '`', 'r', 't', /*'_',*/ 'v', 'x', 'j'] + +function generatePhyrexianText() { + var inputText = document.getElementById('inputText').value + var outputText = '' + var paragraphs = inputText.split('\n') + for (var i = 0; i < paragraphs.length; i ++) { + var sentences = paragraphs[i].split('. ') + for (var j = 0; j < sentences.length; j ++) { + outputText += '[' + for (var k = 0; k < sentences[j].length - 2; k ++) { + outputText += randomCharacters[Math.floor(Math.random() * randomCharacters.length)] + } + outputText += '] ' + } + if (i != paragraphs.length - 1) { + outputText += '\n' + } + } + document.getElementById('outputText').value = outputText +} \ No newline at end of file