Jump to content

E2150 - Weather: Difference between revisions

Tags: Mobile edit Mobile web edit
Tags: Mobile edit Mobile web edit
Line 44:
 
===== 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 squarestiles withwithin 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 =====
Cookies help us deliver our services. By using our services, you agree to our use of cookies.