This past month I focused on enemy units and player death.
Now the battle ends gracefully when all enemy units are defeated, and the enemies have a unit phase similar to the player’s, where each enemy unit in that group can attack or take some other action. Right now all they can do is attack player units next to them.
Player units now die when their hit points reach zero, and the group gets separated. Right now if the middle unit dies, the last unit is split from the family and the parent unit moves and fights alone. The details of this will likely change as I continue working on it!
On the UI side, I worked on icons that display above the units: an icon that indicates which player unit’s turn it is, and an attack icon that shows what units can be attacked. I also hid grid tiles that weren’t in range during the player’s move phase to remove some of the clutter.
For combat, the player can no longer attack enemies that aren’t in range. I also added camera rotation to the cutscene system, so when the player attacks an enemy unit, the camera will rotate a small amount to make it a little more cinematic!
I worked on cutscenes in combat some more! Now units face the appropriate direction when attacking or being attacked. The camera also zooms in and the enemy plays a simple hurt sprite animation and gets knocked back during the fight cutscene.
Since the last post I’ve been working on being able to attack an enemy unit with a player unit!
I added rudimentary support for cutscenes in combat and set up the fight command to play a cutscene. Now when the player selects an enemy unit to fight, the gameplay pauses and the cutscene system plays a (work-in-progress) visual effect showing the unit was hurt, then the player unit’s turn is ended. Hopefully the battle cutscenes will be more interesting to look at in the future.