Implemente competences joueur#23
Merged
Merged
Conversation
… skill lists; improve memory management and error handling
…nd duplicate immunized effects list
… selection for player
…or handling, and update cooldown display
ptitmorceaux
added a commit
that referenced
this pull request
Nov 22, 2025
Implemente competences joueur
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a comprehensive system for player skill (compétence) selection and acquisition, along with improvements to memory management and creature data handling. The changes allow players to choose new skills after progressing, ensure proper management of skill and effect lists, and fix or improve several aspects of the game’s combat and configuration logic.
The most important changes are:
New player skill acquisition system:
joueurChoixCompetencefunction, allowing players to select new skills from a list of available (not yet learned) competences after advancing a tier. This includes random selection logic, user prompts, and updates to the player's skill list. [1] [2] [3]modalComp) into the main game loop (runGame), ensuring it's loaded, used for skill selection, and properly freed. [1] [2] [3]Skill and effect list management:
duplicateListeEffet), finding complementary skills (getComplementaireCompList), adding a skill to a list (ajouterCompetence), and freeing complementary skill lists (freeListeCompetenceComplementaire). These functions improve memory safety and enable the new skill selection logic. [1] [2] [3] [4]Combat and user interface improvements:
cooldown: 1/3), making it clearer to the player. [1] [2]pressEnterToContinue()calls after critical failures in combat and creature generation, pausing for user acknowledgment. [1] [2]Configuration and initialization updates:
Header and dependency updates:
These changes collectively enable a robust, extensible system for player skill progression, improve code safety, and enhance the user experience during gameplay.