changeset 166:0f1f4919792e

Docs: add battle.md specifications
author David Demelier <markand@malikania.fr>
date Tue, 03 Jul 2018 21:45:44 +0200
parents 3e3040d085b5
children efb28047f568
files doc/specs/battle.md
diffstat 1 files changed, 66 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/specs/battle.md	Tue Jul 03 21:45:44 2018 +0200
@@ -0,0 +1,66 @@
+# Battle
+
+This document describes the battle system in Malikania's Kingdom.
+
+# Synopsis
+
+Malikania is a 2D MMORPG where battles occur in a different map system. When a
+battle starts, a grid is shown where players and ennemies are placed on cells.
+
+Battles usually end once all ennemies or all players are defeated. Once finished
+players win random amount of money and optionally ennemy content.
+
+# Terms
+
+- battle: the battle game concept.
+- cell: a cell position in the grid.
+- grid: the battle grid owning players, ennemies and decorative objects.
+- spell: a spell that can be cast on a specific cell.
+- player: a human player.
+- ennemy: an IA character.
+- character: a player or ennemy.
+
+# Battle creation
+
+When the player walks on a map, battle randomly starts after several footsteps,
+the number if randomly created and may be different in maps. This can also
+disabled as we may need to create maps without battle (e.g. villages).
+
+If the player is in a group, the required footsteps is defined among the number
+of players in a group (see below).
+
+The scenario is obviously allowed to spawn battles on different events, such as
+after a discussion with an ennemy.
+
+# Grid system
+
+The battle contains a 20x20 size grid where characters move on adjacent cells
+when they are ready to play.
+
+The grid may contain up to 16 characters at max (8 players, 8 ennemies). It is
+possible to increase this limits in case of dynamic character spawning spells.
+
+# Turn time
+
+Each character must wait to be ready to perform a set of actions which can be to
+move into the grid or casting a spell. This time is determined using the agility
+level from the character.
+
+The default time is set to 10 seconds, more agility reduces the turn time.
+
+TODO: determine math function.
+
+# Spells
+
+Each character have their own set of spells, those spells objects are recreated
+at each battle to store local variables needed to perform the spell correctly.
+
+# Groups
+
+When a group is walking on a map and all players are enough close to each
+others, the battle will starts will all players in that group. Anybody else on
+the map that is not in the group won't be included in that battle.
+
+When a player does not follow the group quickly enough, a warning will be
+emitted on the client to indicate that it will not be included in the battle if
+it does not come quickly. It is not removed from the group though.