Skip to content

Implemente competences joueur#23

Merged
ptitmorceaux merged 6 commits into
mainfrom
implementeCompetencesJoueur
Nov 14, 2025
Merged

Implemente competences joueur#23
ptitmorceaux merged 6 commits into
mainfrom
implementeCompetencesJoueur

Conversation

@ptitmorceaux
Copy link
Copy Markdown
Owner

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:

  • Added the joueurChoixCompetence function, 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]
  • Integrated the modal skill list (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:

  • Added functions for duplicating effect lists (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]
  • Updated creature initialization and duplication to properly handle immune effect lists, ensuring deep copies and correct allocation. [1] [2]

Combat and user interface improvements:

  • Changed the display of skill cooldowns during combat to show the current and maximum cooldown (e.g., cooldown: 1/3), making it clearer to the player. [1] [2]
  • Improved error handling and user feedback by adding pressEnterToContinue() calls after critical failures in combat and creature generation, pausing for user acknowledgment. [1] [2]

Configuration and initialization updates:

  • Fixed and clarified skill and group configurations, including correcting creature skill lists and group dangerosity entries in config files. [1] [2] [3]
  • Refactored skill list initialization for clarity and error handling, using consistent naming and freeing resources on failure.

Header and dependency updates:

  • Updated header files to declare new functions and include necessary dependencies for the new skill system. [1] [2] [3] [4]

These changes collectively enable a robust, extensible system for player skill progression, improve code safety, and enhance the user experience during gameplay.

@ptitmorceaux ptitmorceaux merged commit f456351 into main Nov 14, 2025
@ptitmorceaux ptitmorceaux deleted the implementeCompetencesJoueur branch November 14, 2025 19:01
ptitmorceaux added a commit that referenced this pull request Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant