Bertram25/ValyriaTear — pull request #29 by rootslinux (2012-11-07 11:13:03+00:00)
Title: Two core changes to enemy respawn behavior

1) When a battle begins, now all enemies on the map are set to the dead state. This is done so that the player can't get cornered by multiple enemies on the map, and then have to fight successive battles one after another until they are all killed off. It gives the player some time to react (enter menu mode if necessary) and try to escape the danger. The enemies will respawn after the starndard spawning time expires.

2) There is now a delayed time from when an enemy dies to when it respawns. Previously, an enemy zone on a map would begin immediately respawning an enemy that had just been killed. Now the enemy will "remain dead" for a short period of time before it begins respawning.

I chose to do #2 instead of simply increasing the spawn time like I had proposed in an earlier discussion because when an enemy is spawning in, you can gradually see it taking form by the alpha transparency fading. This looked really odd with a longer spawn period (10 seconds). So instead of increasing the spawn timer from 5 seconds to 10 seconds, I instead added this "wait" period (that is currently set to 5 seconds) so that the alpha fade didn't look odd like that.