It’s been a while since the last update but now I can present the first implementation of the game’s battle system. It’s still missing visual feedbacks for the enemy attacks, defensive items like shields and ranged attacks but the core system is in place and these new additions should be easy to implement. Details about the combat system are available after the jump.
For this game I decided to implement a battle system more focused on the management of resources(offensive and defensive items) and strategic planning of battles. The system is turn-based and the player enters battle when he enters the line of sight of an enemy. The game changes to a turn-based mode and then player and enemies alternate turns until the player or all the enemies are dead. To indicate the change of game modes and who should be acting I added a new visual indicator to the bottom-right corner of the screen. The turn indicator stone has three possible states:
- Colorless and transparent – Indicates that the game is in free mode and the player can move freely since there are no visible enemies.
- Green and opaque – Indicates that the game is in turn-based mode and that it is the player’s turn to act.
- Yellow and opaque – Indicates the enemy’s turn and the player cannot act during this period.
When the player enters the battle mode and it’s his turn, there are three possible actions:
- Look – Turning around doesn’t end the player’s turn allowing him to analyze his items and the enemies in order to choose the best action for the turn.
- Move – Moving an step in any direction ends the player turn.
- Use item – The use of an item results in the continuation or end of the player’s turn depending on the item used and/or the result of the action performed.
The enemies have two possible actions during their turns: move and attack. The enemy’s turn ends when he performs any of these actions regardless of the attack performed and its result.
To better understand the battle mechanics we should first take a look on the items and enemies information available to the player.
The image above shows an example of an offensive item and the information that is shown to the player. The meaning of each stat follows:
- Damage – The little squares represent the attack pattern for this weapon. The first number represents the normal damage of the attack and the number in parenthesis indicate the bonus damage caused on a critical hit. The yellow hourglass indicates that this is next attack to be performed by this weapon. Attack patterns, critical hits and multiple attacks will be explained later.
- Toughness – Indicates the toughness of the material that composes the weapon. Weapons will break faster if you attack monsters with higher toughness than the weapon’s toughness.
- Durability – Indicates how many uses the weapon has against a monster with toughness equal to the weapon’s toughness. When durability reaches 0 the item cannot be used anymore.
- Delay – Indicates how long the player has to wait(in turns) until the weapon becomes available for use again after an attack.
The image above shows a monster and the associated info shown to the player. As we did with the item, let’s break down the stats:
- Health – Indicates the current health and the maximum health for the monster. Monsters die when the current health reaches 0.
- Attacks – Shows all monsters effects and the associated patterns and damage values. The yellow hourglass indicates the next attack to be performed by the monster. Multiple lines indicate that the monster will use the attacks in sequence from top to bottom.
- Weakness – Indicates the weaknesses of this monster. Attacking the monster with an attack of the same type of the monster weakness generates a critical hit that causes bonus damage and doesn’t end the player’s turn.
- Toughness – Indicates the toughness of the monster’s defenses. Monsters with higher toughness must be dealt with weapons with similar toughness to avoid breaking weapons.
Now we need to explain what are attack patterns, critical hits and multiple attacks and how they can be used to your advantage on battles.
Attack patterns shows to the player the result of an attack. The iron sword shown above has an attack pattern composed of two white squares and a gray square marked with an ‘x’. Since the square are on the same line, this means that this attack pattern is random and the result of the attack will be one of the three squares. That means this attack has a 2/3 chance of being of white type(a normal attack) and a 1/3 chance of being of gray type(a miss).
Weapons and monsters can have multiple attacks that are shown as multiple lines on the attack field. The cave worm shown above has two attacks. Multiple attacks are performed sequentially from the top to the bottom line. The hourglass changes positions to indicate what is the next attack. In the case of the cave worm, its first attack will always miss and will cause no damage. On its next turn, it will use the next attack and will always hit with a white type attack that causes 1 point of damage.
Critical hits are performed when an attack is performed and its type is the same of the next intact weakness of a monster. Let’s use the goblin shaman above as an example. The shaman’s weaknesses are composed by a white square and a red square. In order to perform a critical hit, we should attack the shaman with a white type attack. The iron sword we showed already is a good choice. If we hit, we’ll break the first weakness causing bonus damage(+1 for the iron sword) and extending the player’s turn that can act again. Now, we can continue attacking but the next weakness of the shaman has red type. If we had a weapon with a red type attack, we could attack the shaman again and if we hit, we would break the last weakness generating a critical hit. When all weaknesses are broken, the monster is stunned for 1 turn and it has to skip the current marked attack. When it returns from the stun, all weaknesses are reset to the initial condition. This also happens if you attack the next intact weakness with different attack type.
Now let’s see how we can use this to our advantage in a battle against the shaman. The goblin shaman has two weak attacks and a strong red type attack that causes 4 points of damage. For the first two attacks we should try to hit the shaman with a white type attack in order to cause bonus damage and break the first weakness. If you manage to hit it, you should then attack other monsters, defend or wait until his next attack is the last. Now we don’t want to be hit by this attack so we will attack with a red type attack in order to break the last weakness. If we manage to hit, the goblin shaman will be stunned, the red type attack will be skipped and you’ll earn an extra turn that you can use to move away from the shaman to give your weapons some time to recover from the delay.
And that is all I have for this update. I tried to create a different kind of combat reducing the number of chance-based elements and increasing the deterministic elements to allow the players to approach battle in a more strategic way than just “move to the enemy and pray the numbers are on your side”. I have nothing against these kind of battle systems but for this game I wanted the player to have more control over battle so that he’s forced to think and find the most effective way to win battles preserving his best weapons and minimizing the amount of damage taken.
For the next updates I still have to add ranged combat that works exactly the same way as melee combat but can be used to reach distant enemies and defensive items that I’m still testing. Visual feedback for attacks directed to the player also are in the works. Then I should start working on dungeon features like doors, traps, levers, buttons, pressure plates(yay!) and level design.