English above, español bajo. Give the Scratch Cat a number, and it will generate 2 random numbers from 0 to 99 and average the results the number of times you said. It will then give you the averages and a bunch of statistics on them. Dale a Scratch Cat un número, y generará 2 números aleatorios entre 0 y 99 y promediará los resultados la cantidad de veces que le diste. Luego te dará los promedios y muchas estadísticas sobre ellos.
English above, español bajo. According to Google, Fire Emblem games decide whether or not a hit lands by averaging 2 random numbers from 0 to 99. If the result is lower than the displayed hit rate, the hit lands; otherwise, it doesn't. I made a program to simulate this behavior in Python and had it give me lots of statistics on the numbers it gave me. Then I remembered that Scratch is technically Turing-complete, so I could code it in Scratch too, if I, for some strange reason, wanted to do so. This is what happened. The Average variable is the arithmetic mean of the numbers in the first list (their sum divided by how many of them there are). The Count list is a list of how many times each value that appears in the list at least once appears. The "Less than 20" variable shows the (rounded) percentage of numbers that are less than 20 (not counting 20); similarly for 50 and 80. (This is basically the percentage of times that an attack with a displayed probability of 20%, 50%, and 80% would have hit with the generated numbers.) The running total is the sum of all of the numbers. "Times" is how many times the program has generated an average, so it's equal to the length of the "Random averages" list; I put it on screen just in case. There may be some lag if you input a number that's large enough. If you input a number above 200,000, Scratch won't allow the list to go above 200,000 items, so you will only get 200,000 (2*10^5) data points. Según Google, los juegos de Fire Emblem deciden si un ataque tiene éxito promediando 2 números aleatorios entre 0 y 99. Si el resultado es bajo la tasa de aciertos mostrada, el ataque tiene éxito; de manera distinta, no. Hice un programa para simular esto en Python y lo hice darme muchas estadísticas sobre los números que me dio. Luego recordé que Scratch técnicamente es Turing completo, así que podía hacerlo en Scratch también, si quería hacerlo por alguna razón. Esto es lo que se creó. La variable «Average» es la media aritmética de los números en la lista primera (su total dividida por la cuenta de los números). La lista «Count» es una lista de cuántas ocasiones hay de cada número que se generó al menos una vez. La variable «Less than 20» dice el porcentaje (redondeado) de los números que son menos que 20 (no igual a 20); así es con 50 y 80. (Fundamentalmente es el porcentaje de tiempos cuando un ataque con una probabilidad mostrada habría tenido éxito con los números generados.) La «Running total» es la total de todos los números. «Times» muestra cuántos tiempos el programa ha generado un promedio, así que es igual al largo de la lista «Random averages»; lo puse en la pantalla solo para estar segura. Puede que haya un poco de lag si entras un número bastante grande. Si entras un número mayor que 200.000, Scratch no dejará que la lista tenga más que 200.000 números, así que solo te dará 200.000 (2*10^5) datos.