E2150 - Weather: Difference between revisions
Content deleted Content added
Tags: Mobile edit Mobile web edit |
Tags: Mobile edit Mobile web edit |
||
Line 44: | Line 44: | ||
===== Altering hit location by nearby high elements ===== |
===== Altering hit location by nearby high elements ===== |
||
The hit location is altered in the following way: We take a random number ''r2'' within the range of 4-8. The way this number gets randomized isn't that simple - there is a 1/3 chance that the number will be in <4-6> range, and 2/3 chance that the number will be within <6-8> range. This makes value 6 the most probable (33%), followed by 7 and 8 (both 22%), with 4 and 5 being the least probable (both 11%). The game iterates all terrain |
The hit location is altered in the following way: We take a random number ''r2'' within the range of 4-8. The way this number gets randomized isn't that simple - there is a 1/3 chance that the number will be in <4-6> range, and 2/3 chance that the number will be within <6-8> range. This makes value 6 the most probable (33%), followed by 7 and 8 (both 22%), with 4 and 5 being the least probable (both 11%). The game iterates all terrain tiles within a square area bounded by ''x2 - r2'', ''y2 - r2'', ''x2 + r2'', ''y2 + r2'' and searches for the highest spot. This establishes the final hit location. |
||
===== Type of spawned lightning ===== |
===== Type of spawned lightning ===== |