Saturday, 13 January 2007

Warriors - or things that go "Bump" in the night: part two.

If you're reading this from future to past, can I suggest you start with part one of this article.

Its possible to make 'bumping' a lot more interesting without having to resort to a full blown positional combat system. Consider the concept of charging. Charging is a single step, followed immediately by a bump in the same direction or 45 degrees adjacent. e.g. Stepping to the east, followed by a bump to either the east, north east or south east. Charging is useful, because it forces the player to move to take advantage of it. Otherwise, if a monster is one square away, it is often tactically smarter to stand still, and wait for it to come to you.

In Unangband, I made charging do a single blow with a high-damage multiplier based on the weight of the weapon: up to x12 possible with the heaviest weapon in the game. This compares to a character getting x4 to x6 blows per round of combat at maximum stats with the heaviest weapons limited to x4 and lighter weapons allowing x5 or x6 blows. So a character with the heaviest weapon can either charge for x12 damage or stand and wait for up to x4 damage.

This gives a character the following attack options:

1. Step to the monster, charge, step away, step into the monster again, charge etc.
2. Step to the monster, charge, change to a lighter weapon, continue to melee with the monster.
3. Stand still waiting for the monster to step in, attack without charging.

Note also that charging is compulsory. If the character is using a light weapon, charging disadvantages them, because they could potentially get more blows when not charging, than the bonus they get when charging. This is comparable to the disadvantage of trying to close against an enemy with a sword, when you have shorter weapon like a dagger.

Charging is beneficial because of the big advantage of having a first strike. Its also indirectly beneficial, because monsters can be frightened if they suffer a high enough damage a blow, and will flee. However, stepping away from a monster, will often make the monster follow you, which prevents you from being able to step into it to charge it again.

I have also made some monsters, identified as huge monsters, highly resistant to attacks which don't involve charging. Things like dragons and giants should be attacked by and be vulnerable to heavy weapons, and ignore puny light weapons. Coincidentally, I gave these huge monsters the ability to attack out to range 2, instead of just adjacent targets, so they will often not follow you if you step away from you, and instead choose to pound you from this moderate distance. This gives you the opportunity to charge back in, whilst still putting you at some risk.

I have implemented some positional ideas with the concepts of dodging and blocking. Dodging occurs automatically when you move in any direction, for the next turn. Similarly, blocking occurs automatically when you stand still and do nothing else, again just for the next turn.

Dodging acts similarly to the latency combat idea I mentioned earlier, but cheats slightly. Instead of attacks taking one turn to hit you, dodging gives you a percentage chance of monsters targetting the square you dodged from, as opposed to the square you are currently in. The benefits are the same: if you step sideways to the attacker, their projectile attacks will miss you, and their area effect attacks will only hit you with splash damage instead of hitting you full on.

Blocking gives you increased armour class, and doubles the effectiveness of your shield. Since shields are already twice as effective against ranged missile attacks in Unangband, blocking is highly effective against archery monsters, whereas dodging is highly effective against spell casting monsters.

The biggest problems I found with the implementation of dodging and blocking is the user interface. I wanted something on screen to give positive encouragement to the player, so I displayed a Dodging or Blocking status message. Unfortunately, because this flashed up whenever a character was moving or standing still, players correctly complained it was distracting. So instead, I ended up displaying a message whenever an attack was successfully blocked or dodged, with limited degrees of success. I still don't think I've got the user interface quite right on this one.

[Update] In the next part of this article, I've had a look at other ways of giving warriors more defensive options.


Shoku said...

How much drag on the system would it be to display those only when monsters were in line of sight?

Shoku said...
This comment has been removed by the author.