forked from GithubMirrors/cardconjurer
		
	ask urza
This commit is contained in:
		
							
								
								
									
										22
									
								
								data/site/other/askUrza/askUrza.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								data/site/other/askUrza/askUrza.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| var fullAbilityList = new Array() | ||||
|  | ||||
| function loadAbilities() { | ||||
|     var xhttp = new XMLHttpRequest(); | ||||
|     xhttp.onreadystatechange = function() { | ||||
|         if (this.readyState == 4) { | ||||
|             fullAbilityList = xhttp.responseText.split("$$$") | ||||
|             for (var i = 0; i < 3; i ++) { | ||||
|                 fullAbilityList[i] = fullAbilityList[i].split(";") | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     xhttp.open("GET", "/data/site/other/askUrza/planeswalkerAbilities.txt", true); | ||||
|     xhttp.send(); | ||||
| } | ||||
|  | ||||
| function randomAbility(index) { | ||||
|     possibleAbilities = fullAbilityList[index] | ||||
|     document.getElementById("askUrzaResult").innerHTML = possibleAbilities[Math.floor(Math.random() * (possibleAbilities.length - 1))].replace(/\\"/g, '"') | ||||
| } | ||||
|  | ||||
| loadAbilities() | ||||
		Reference in New Issue
	
	Block a user
	 Kyle
					Kyle