Conversation
ptitmorceaux
added a commit
that referenced
this pull request
Nov 22, 2025
Add random dangerosity level
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 new mechanism for determining the dangerosity level of monster encounters and updates the configuration of creature groups to better reflect different dangerosity levels. The main changes include the addition of a function to randomly select dangerosity levels for encounters, updates to how dangerosity is set in the game logic, and improvements to the configuration file for creature groups.
Gameplay logic improvements:
getRandomDangerosityLevel()that selects a dangerosity level based on weighted probabilities (1: 40%, 2: 30%, 3: 20%, 4: 10%) (creatures.c,creatures.h). [1] [2]getRandomDangerosityLevel()instead of a fixed value, making encounters more dynamic (jeu.c).jeu.c).Configuration updates:
groupes.confto uncomment and adjust groups for dangerosity levels 1, 4, and 5, providing more accurate and varied group definitions for each level (groupes.conf). [1] [2]