This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This code is modified from Mnementh's code at http://gmc.yoyogames.com/index.php?showtopic=368996 | |
| I did some bug fixes, and I modified it to allow you to pass in a hash of terrain modifier overrides. | |
| So for example, if swamp usually has a cost of 3, but you're a hovercraft, you can pass in {swamp: 1}. | |
| NOTE THAT THIS IS A FUNCTION THAT IS CALLED FROM INSIDE A UNIT WHEN CALCULATING MOVEMENT RANGE | |
| It's important to keep in mind that what this is doing is updating values on each tile. | |
| Every tile has this kind of data in it: |