From 992f5e21d62c14e192b845c589bb498aa6584518 Mon Sep 17 00:00:00 2001
From: Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org>
Date: Tue, 13 Aug 2019 23:25:05 +0200
Subject: ...

---
 headers/messages.tex                 | 29 ++++++++++++++++
 main.tex                             |  1 +
 src/game_design/attributes.tex       | 18 +++++-----
 src/game_design/magical_elements.tex | 67 +++++++++++++++++++++++++++++++-----
 4 files changed, 98 insertions(+), 17 deletions(-)
 create mode 100644 headers/messages.tex

diff --git a/headers/messages.tex b/headers/messages.tex
new file mode 100644
index 0000000..eda07e2
--- /dev/null
+++ b/headers/messages.tex
@@ -0,0 +1,29 @@
+\IfFileExists{todonotes.sty}{\usepackage{todonotes}}{\usepackage{xcolor}}
+
+\newcommand{\todomsg}[1]{%
+   \IfFileExists{todonotes.sty}{%
+      \todo[inline]{TODO: #1}%
+   }{%
+      \textcolor{red}{TODO: #1}%
+   }
+}
+
+\newcommand{\unimplemented}[0]{%
+   \IfFileExists{todonotes.sty}{%
+      \todo[inline,linecolor=blue,backgroundcolor=blue!25,bordercolor=blue]{%
+         Not implemented yet.
+      }%
+   }{%
+      \textcolor{blue}{Not implemented yet.}
+   }
+}
+
+\newcommand{\draft}[0]{%
+   \IfFileExists{todonotes.sty}{%
+      \todo[inline,linecolor=purple,backgroundcolor=purple!25,bordercolor=purple]{%
+         Still an early draft.
+      }%
+   }{%
+      \textcolor{purple}{Still an early draft.}
+   }
+}
diff --git a/main.tex b/main.tex
index af55d88..3dbb11a 100644
--- a/main.tex
+++ b/main.tex
@@ -4,6 +4,7 @@
 
 \input{headers/tikz}
 \input{headers/math}
+\input{headers/messages}
 
 \title{Tacticians Online}
 \subtitle{Design Document}
diff --git a/src/game_design/attributes.tex b/src/game_design/attributes.tex
index ad193de..fd81b65 100644
--- a/src/game_design/attributes.tex
+++ b/src/game_design/attributes.tex
@@ -1,14 +1,16 @@
 \subsection{Attributes}
 \label{character-attributes}
 \begin{description}
-\item[Accuracy] \ldots
-\item[Critical Hit Chance]
+\item[Accuracy (0--100\%)] Likeliness to hit a still target.
+\item[Critical Hit Chance (0--100\%)]
    Likeliness for each attack to be a critical hit (see~\ref{critical-hit}).
    From 0 to 100\%.
-\item[Damage Modifier] \ldots
-\item[Dodge Chance] \ldots
-\item[Double Hit Chance] \ldots
-\item[Health Points] \ldots
-\item[Movement Points] \ldots
-\item[Parry Chance] \ldots
+\item[Damage Modifier (0--300\%)] Multiplier for the damage.
+\item[Dodge Chance (0--175\%)] Likeliness to dodge someone targetting you as if
+you were standin still.
+\item[Double Hit Chance (0--100\%)] Likeliness to perform a follow-up attack.
+\item[Health Points (1--500)] Maximum health points.
+\item[Movement Points (8--200)] Amount of movement points available every turn.
+\item[Parry Chance (0--100\%)]
+   Likeliness to perform a parry, should the circumstances allow it.
 \end{description}
diff --git a/src/game_design/magical_elements.tex b/src/game_design/magical_elements.tex
index c2b6f86..d5a493e 100644
--- a/src/game_design/magical_elements.tex
+++ b/src/game_design/magical_elements.tex
@@ -1,10 +1,15 @@
 \subsection{Magical Elements}
 \label{magical-elements}
+\unimplemented{}
+\draft{}
+
 \begin{figure}
 \begin{center}
-\begin{tikzpicture}[auto,>=stealth']
+\begin{tikzpicture}[node distance=6em]
    \tikzstyle{primary} = [draw,rectangle];
    \tikzstyle{secondary} = [draw,diamond];
+   \tikzstyle{opposite} = [densely dotted,latex reversed-latex reversed,thin];
+   \tikzstyle{component} = [->];
    \node[primary] (WIND) {Wind};
    \node[secondary,below right of = WIND] (SNOW) {Snow};
    \node[primary,below right of = SNOW] (WATER) {Water};
@@ -14,17 +19,61 @@
    \node[primary,above left of = METAL] (FIRE) {Fire};
    \node[secondary,above right of = FIRE] (LIGHTNING) {Lightning};
 
-   \draw (WIND) -- (LIGHTNING);
-   \draw (WIND) -- (SNOW);
-   \draw (WATER) -- (SNOW);
-   \draw (WATER) -- (PLANT);
-   \draw (EARTH) -- (PLANT);
-   \draw (EARTH) -- (METAL);
-   \draw (FIRE) -- (METAL);
-   \draw (FIRE) -- (LIGHTNING);
+   \draw[component] (WIND) -- (LIGHTNING);
+   \draw[component] (WIND) -- (SNOW);
+
+   \draw[component] (WATER) -- (SNOW);
+   \draw[component] (WATER) -- (PLANT);
+
+   \draw[component] (EARTH) -- (PLANT);
+   \draw[component] (EARTH) -- (METAL);
+
+   \draw[component] (FIRE) -- (METAL);
+   \draw[component] (FIRE) -- (LIGHTNING);
+
+   \draw[opposite] (FIRE) -- (WATER);
+   \draw[opposite] (WIND) -- (EARTH);
 \end{tikzpicture}
 \end{center}
 \caption{Magical Elements Wheel}
 \label{magical-elements-wheel}
 \end{figure}
 
+Attacks may have an associated magical element. This element would be one
+of four primaries: \textit{Wind}, \textit{Water}, \textit{Earth}, or
+\textit{Fire}. A status infliction chance, defended against with some other
+attribute, is then rolled to see if the effect occurs. If not, nothing special
+happens. Otherwise:
+\begin{itemize}
+\item
+   If the target has no current element afflictions, it is afflicted with a
+   level 1 status for that element.
+\item
+   If the target already has an affliction for that element, this affliction
+   increases in level. Cooldown for that element is reset.
+\item
+   If the target has an affliction for the element facing the one used in the
+   attack according to Figure~\ref{magical-elements-wheel} (e.g.~\textit{Wind}
+   and \textit{Earth}), the existing affliction's level is lowered and no new
+   affliction is added.
+\item
+   If the target has an affliction of another element, not only does it gain
+   a level of affliction for the attack's element, but it also gains an
+   affliction corresponding to the element between the two primary elements
+   shown in Figure~\ref{magical-elements-wheel} (e.g.~\textit{Wind} plus
+   \textit{Water} also adds \textit{Snow}).
+\end{itemize}
+
+\begin{itemize}
+\item
+   Afflictions for composite elements do not have cooldowns: they disappear as
+   soon as at least one of the primaries generating it is removed.
+\item
+   The level of the affliction for a composite element is the maximum between
+   the current levels of the afflictions that generate it.
+\item
+   Having an affliction reach level 0 removes it.
+\item
+   The mechanics described above prevent having more than three elemental
+   afflictions (two primaries and their composite).
+\end{itemize}
-- 
cgit v0.12-29-g3973

