Vermilion Gym: Difference between revisions

→‎Generation I: I hope my math isn't off...
(already covered under In the games (by saying that all non-adjacent cans are the result of glitches))
(→‎Generation I: I hope my math isn't off...)
Line 52: Line 52:
====[[Generation I]]====
====[[Generation I]]====
====={{game|Red and Blue|s}}=====
====={{game|Red and Blue|s}}=====
* The first switch can be in one of 8 cans, forming a checkerboard pattern starting from the corners.
* The first switch can be in one of eight cans, forming a checkerboard pattern starting from the corners.
* If the first can was one of the 2 in the middle column that has three neighbors:
* If the first can was one of the two in the middle column that has three neighbors:
** Due to a glitch, the three neighboring cans each have a 25% chance of containing the second switch and the top-left can has a 25% chance (even though it is not adjacent).
** Due to a glitch, the three neighboring cans each have a 25% chance of containing the second switch and the top-left can has a 25% chance (even though it is not adjacent).
* If the first can was one of the other 6 (that have two or four neighbors):
* If the first can was one of the other six (that have two or four neighbors):
** Due to a second glitch on top of the first glitch, there is a 50% chance that the can to the right contains the second switch, and a 50% chance that it is the top-left can. (If there is no can to the right, the 50% chance belongs to the only adjacent one in the same column.) The other one or three neighbors will never contain the second switch.
** Due to a second glitch on top of the first glitch, there is a 50% chance that the can to the right contains the second switch, and a 50% chance that it is the top-left can. (If there is no can to the right, the 50% chance belongs to the only adjacent one in the same column.) The other one or three neighbors will never contain the second switch.


Line 61: Line 61:


====={{game|Yellow}}=====
====={{game|Yellow}}=====
* The first switch can be in one of 8 cans as in Red and Blue.
* The first switch can be in one of eight cans as in Red and Blue.
* If the first can was one of the 4 corners:
* If the first can was one of the four corners:
** There is a 25% chance that one neighbor contains the second switch, a 25% chance that the other neighbor contains the second switch, and a 50% chance that both neighbors contain the second switch (in which case either choice will unlock the door).
** There is a 25% chance that one neighbor contains the second switch, a 25% chance that the other neighbor contains the second switch, and a 50% chance that both neighbors contain the second switch (in which case either choice will unlock the door).
* If the first can was the one in the 2nd row:
* If the first can was the one in the second row:
** There is a 50% chance that the west and north neighbors both contain the second switch, a 25% chance that only the south neighbor contains the second switch, and a 25% chance that only the east neighbor contains the second switch.
** There is a 50% chance that the west and north neighbors both contain the second switch, a 25% chance that only the south neighbor contains the second switch, and a 25% chance that only the east neighbor contains the second switch.
* If the first can was the one in the 4th row:
* If the first can was the one in the fourth row:
** There is a 50% chance that the west and north neighbors both contain the second switch, and a 50% chance that the south and east neighbors both contain the second switch.
** There is a 50% chance that the west and north neighbors both contain the second switch, and a 50% chance that the south and east neighbors both contain the second switch.
* If the first can was the top can of the middle column:
* If the first can was the top can of the middle row:
** Due to yet another glitch, the game attempts to randomly pick from 256 possible pairs of cans for the second switch, most of which correspond to blank neighbor data or data about the neighbors of other cans<ref>https://github.com/pret/pokeyellow/blob/793c715ba253e08d2807d04d128765ca305d6b15/engine/vermilion_gym_trash_cans.asm#L70</ref>. As a result, there is a 216/256 (~84%) chance that only the top-left can has the second switch, a 2/256 (~0.8%) chance that no can has the second switch at all, and a 38/256 (~15%) chance that either one or two unrelated cans in the four rightmost rows has the second switch (with uneven probability).
** Due to yet another glitch, the game attempts to randomly pick from 256 possible pairs of cans for the second switch, most of which correspond to blank neighbor data or data about the neighbors of other cans<ref>https://github.com/pret/pokeyellow/blob/793c715ba253e08d2807d04d128765ca305d6b15/engine/vermilion_gym_trash_cans.asm#L70</ref>. As a result, there is a 220/256 (~86%) chance that only the top-left can has the second switch, a 5/256 (~2%) chance that no can has the second switch at all, and a 31/256 (~12%) chance that either one or two unrelated cans in the four rightmost rows has the second switch (with uneven probability).
* If the first can was the bottom can of the middle column:
* If the first can was the bottom can of the middle column:
** The above glitch applies but with slightly different invalid data, resulting in a 225/256 (~88%) chance that only the top-left can has the second switch, a 1/256 (~0.4%) chance that no can has the second switch at all, and a 30/256 (~12%) chance that either one or two unrelated cans in the four rightmost rows has the second switch.
** The above glitch applies but with slightly different data, resulting in a 228/256 (~89%) chance that only the top-left can has the second switch, a 4/256 (~1.5%) chance that no can has the second switch at all, and a 24/256 (~9.5%) chance that either one or two unrelated cans in the four rightmost rows have the second switch.


====[[Generation II]]====
====[[Generation II]]====