Affinity System

Overview
An affinity defines the experience a character has with a specific type of weapon or magic school.

Affinities are split in two major categories: TBD: One last specific affinity could exist: "Bare Fist", when fighting without any weapon equipped
 * Fighting affinities
 * Fighting affinities determine your character's proficiency with a certain type of weapon.
 * There is one fighting affinity type for each type of Fighting Weapons (see Weapon Types)
 * Magic affinities
 * Magic affinities determine your character's proficiency with a certain type of magic.
 * There is one magic affinity type for each Magic School (see Magic Schools)

For a complete list of all affinity types, see Affinity Types List

System
Affinity is gained at the end of combat and depend on the abilities used during the fight.

Each ability available to players have one (or multiple) affinity type(s) that will define which affinity will progress by using this attack.

Physical attacks carry the affinity type of the weapon they are linked to (Ex: Axe throw = Axe affinity)

Spells have an affinity type defined by the Magic School they use (Ex: Ice Lance has an affinity type of Water)

Magical weapons like staff, wands or spell book don't have an affinity type since they will only contain spells that are already linked to a magic school affinity.

/!\ A single magic weapon can have spells from multiple magic schools, need to be set onthe spell and not depend on weapon type /!\

Game Design Logic - MUST READ
Affinities are one of the main ways for players to unlock new abilities and make their characters become more powerful.

Since affinity is gained for each specific type of weapon or magic, it means switching the affinity focus of a character will be a huge downgrade in this character's fighting power until further training is done in the new affinity.

We want to avoid putting the player in this situation frequently

Solution: Each affinity type, be it weapon or magic school, should have a clear focus in the abilities it will provide, allowing players to select lasting affinities for each character depending on the role they play in the team composition.

''To facilitate working on the identity of each affinity, abilities are classified in separate pages for each affinity type. Distinction is important to do between affinity types and weapon types since weapons holding only magic abilities don't have an associated weapon affinity and rely on magic school affinity''

Formula
For a specific affinity type, we can calculate the AffinityXpGain with the following formula:


 * AffinityXpGain = ([CharacterXpGain] * [NbTurnAffinityType]) / [TotalNbTurnPlayed]

[CharacterXpGain] = Amount of general xp gained during the combat

[NbTurnAffinityType] = Number of turned where an ability of this affinity type was used by this character

[TotalNbTurnPlayed] = Total number of turned played by this character

NB: For abilities with more than one affinity types linked, the ammount of affinity xp gained for each affinity, ids devided by the number of affinities linked to this attack