RPG Combat

This Kata that has you building simple combat rules as for a role-playing game (RPG). The domain doesn’t include a map or any other character skills apart from their ability to damage and heal one another.

The problem is broken down into several user stories to help you to focus on doing one thing at a time. Complete one user story before starting on the next one. Be sure to work on the problem in small steps and pay close attention to the design of both the code and the automated tests in every step.

Damage and Health

  1. All Characters, when created, have:
  2. Characters can Deal Damage to Characters.
  3. A Character can Heal themselves.

Levels

  1. All characters have a Level, starting at 1
  2. When dealing damage:

Factions

  1. Characters may belong to one or more Factions.
  2. A Character may Join or Leave one or more Factions.

  3. Players belonging to the same Faction are considered Allies.

Magical objects

  1. As well as Characters there are also Magical Objects
  2. Characters can gain health from a Healing Magical Object.
  3. Characters can deal Damage by using a Magical Weapon.

Changing level

  1. Level 1 Characters that survive 1000 damage points gain a level, (this may be counted over several battles)
  2. Level 1 Characters that have ever been part of 3 distinct factions gain a level
  3. The maximum Level for Characters is 10

Acknowledgements

This Kata was invented by Daniel Ojeda Loisel and this description is adapted from Steve Smith’s version

Referenced in these Learning Hours: