More Complex Melee Implemented
Space Mercs now has more complex, DnD-like melee combat. The prototype game has been featuring a simple, no-hit roll melee system that simply did damage between 1 and whatever your character’s strength happened to be. Now, characters make a d20 roll whenever a character attempts to melee attack. The d20 roll is modified by your character’s BattleLevel, which is a facet of the game’s unique character-level system.
Here is the code for melee:
An entity calls this method whenever it tries to move into a square occupied by an entity of another team (the teams are currently only Players and Mobs). Initially I was going to have multiple enemy factions that would battle with each other, but I found that monsters would end up killing each other if the PCs waited long enough. Believable, but not fun. Unless I can figure out a way around that, it’s out for now.
Because of the real-time nature of combat in Space Mercs, I had to make sure that missing in melee is implemented in the game, although I was originally planning on having no-miss combat. Without it, the game runs simply too dangerously.