Skip to content

Conversation

@BastLast
Copy link
Member

No description provided.

@BastLast BastLast added this to the 5.0.3 milestone May 25, 2025
@BastLast BastLast linked an issue May 25, 2025 that may be closed by this pull request
82 tasks
@BastLast BastLast added enhancement New feature or request event / mini event New event or fixes on an event file test Checking that something works as intended labels May 25, 2025
@BastLast BastLast force-pushed the outcomerequirements branch 2 times, most recently from b6d4dc8 to 83a1326 Compare May 26, 2025 22:32
@BastLast BastLast marked this pull request as ready for review May 26, 2025 22:33
@BastLast BastLast modified the milestones: 5.0.3, 5.1.0 May 27, 2025
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sur l'évent 1

chopTree 3 : vous finissez par abandonner et vous reposez -> vous finissez par abandonner et vous reposer OU vous finissez par abandonner et vous vous reposez (je suis plus partiel au deuxième perso)

findPath 1 : répétition sémantique avec le "racines de l'arbre déraciné", je propose un qualificatif différent, pour un truc style "racines de l'arbre effondré", d'autant plus que "déraciné" a déjà été utilisé dans le texte d'intro de l'évent

texte d'intro de l'évent : sur le sentier sinueux -> sur un sentier sinueux
et aussi :
L'arbre ancestral, dont le tronc fait bien deux mètres de diamètre et barre complètement le passage.
Pourquoi cette phrase n'a aucun verbe dans sa première proposition ? Si on enlève le "dont le tronc fait bien [bla bla]", la phrase c'est "L'arbre ancestral", et ça n'a aucun sens. Peut-être l'intention ici est-elle plutôt de dire que c'est l'arbre ancestral qui barre la passage, auquel cas il faudrait remplacer le "et" par une virgule pour que ce qui barre soit effectivement l'arbre ancestral et non pas "le tronc".

@BastLast BastLast modified the milestones: 5.1.0, 5.2.0 Jun 1, 2025
}

function getAllLevelBoundaries(outcomes: Record<string, Outcome>): number[] {
const boundaries = new Set<number>([0, 1]); // Always include level 0 and 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explique pourquoi ces valeurs là pour les tests, car je vois vraiment pas à quoi ca correspond exactement (same comment pour les autres Set en dessous)

}

function getAllClasses(outcomes: Record<string, Outcome>): number[] {
const classes = new Set<number>([1, 2, 3, 4, 5]); // Assume common class IDs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test bugprone : Si une classe n'est pas incluse ici, elle pourrait être ignorée par les tests

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

je croyais qu'on lisais pas les constantes dans les tests

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok mon commentaire est stupide, je fixerai

export interface PossibilityOutcome {

requirements?: {
level: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo "?" ?


export interface PossibilityOutcome {

requirements?: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requirements est pas présent dans tous les events ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

il va falloire que je le rajoute, cette pr est pas finie mdr

Comment on lines +49 to +80
function isRangeValid(
range: { min?: number; max?: number } | undefined,
value: number
): boolean {
if (!range) return true;
if (range.min !== undefined && value < range.min) return false;
if (range.max !== undefined && value > range.max) return false;
return true;
}

function isOutcomeValidForStats(
requirements: OutcomeRequirements | undefined,
stats: {
level: number;
health: number;
defense: number;
attack: number;
speed: number;
class: number;
}
): boolean {
if (!requirements) return true;

return (
isRangeValid(requirements.level, stats.level) &&
isRangeValid(requirements.health, stats.health) &&
isRangeValid(requirements.defense, stats.defense) &&
isRangeValid(requirements.attack, stats.attack) &&
isRangeValid(requirements.speed, stats.speed) &&
(requirements.validClassIds === undefined || requirements.validClassIds.includes(stats.class))
);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ces deux fonctions sont des copy paste de la vraie fonction, faut faire des valeurs en dur pour les tests

codescene-delta-analysis[bot]

This comment was marked as outdated.

@BastLast BastLast force-pushed the outcomerequirements branch from 73c1181 to f4503f4 Compare July 29, 2025 23:07
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@BastLast BastLast force-pushed the outcomerequirements branch from 113aacc to 93206b1 Compare July 31, 2025 23:31
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@BastLast BastLast force-pushed the outcomerequirements branch from 03c1732 to 61436d3 Compare October 26, 2025 21:34
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gates Failed
Prevent hotspot decline (1 hotspot with Large Method)
Enforce advisory code health rules (2 files with Complex Method, Large Method)

Gates Passed
2 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Prevent hotspot decline Violations Code Health Impact
Player.ts 1 rule in this hotspot 6.34 → 6.33 Suppress
Enforce advisory code health rules Violations Code Health Impact
PossibilityOutcome.ts 1 advisory rule 8.55 → 8.50 Suppress
Player.ts 1 advisory rule 6.34 → 6.33 Suppress

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

@romain22222
Copy link
Member

pourquoi je sens que cette pr va être un enfer à merge ?

@BastLast
Copy link
Member Author

BastLast commented Dec 3, 2025

pourquoi je sens que cette pr va être un enfer à merge ?

Nan tkt. CA ira

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request event / mini event New event or fixes on an event file test Checking that something works as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add outcome requirements

6 participants