• Add Review
  • Subscribe
  • Nominate
  • Submit Media
  • RSS

Code rearrangements

Still working on that combat plugin. This month I hit a point where I decided to rearrange some code, taking part of the function that resolves battle actions and turning it into a smaller function that calculates the effect of a skill on a single target. I'd had an inkling when I was first writing the resolve action function that I was probably going to want to break it down further, but I had trouble figuring out exactly how at the time and decided to just move forward. Extracting the sub-function hasn't been easy either. I've twice deleted parts that I shouldn't have by accident. The first time I was able to get around it because I made the changes on a thumb-drive copy, and I got the old code back from my hard drive. The second time I'd already synchronized the thumb drive with the hard drive. I should be able to retrieve an older version from my online backup service, but for some reason it's currently unavailable. Well, that's what I get for not using a version control system.