Game systems
The main fight encounter-related gameplay logic of the kit is located in independent systems. You can find the system game objects as children of the main Systems game object located in the Game scene. Each system has its own script deriving from the parent BaseSystem type. These are all the systems found in the kit:
- DeckDrawingSystem: This system is responsible for drawing the appropriate number of cards from the player's deck into their hand (when the game starts, at the beginning of the turn and when a card with a 'Draw X cards' effect is played).
- HandPresentationSystem: This system is responsible for managing the rendering and animations of the player's hand cards.
- TurnManagementSystem: This system is responsible for managing the turn sequence of a fight encounter.
- TurnIndicatorSystem: This system is responsible for displaying the 'Player turn' and 'Enemy turn' widget at the appropriate times during a fight encounter.
- CardSelectionSystem: This system is responsible for handling the player input related to selecting the cards to play from their hand.
- EffectResolutionSystem: This system is responsible for executing the logic of the effects of the card being currently played.
- ManaResetSystem: This system is responsible for resetting the heroe's mana to its default value every turn.
- PoisonResolutionSystem: This system is responsible for applying the poison status damage to the affected character at the beginning of their turn.
- EnemyBrainSystem: This system is responsible for managing the AI of the enemy characters.
- CharacterDeathSystem: This system is responsible for handling the death of a character and triggering the end-of-fight condition when appropriate.
- SavePlayerDataSystem: This system is responsible for periodically updating the hero's data to the persistent storage.
- CardRewardSystem: This system is responsible for managing the card reward that is given to the player once they successfully finish a fight.